=== Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00000004 ???? eldlReserved: resw 1 ; reserved and all-zeroes 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 97 <2> eldlOld: 98 <2> 0 00000018 ???? eldlDualAmount: resw 1 0 0000001A ???? eldlDualPrefixes: resw 1 0 0000001C ???? eldlDualEntries: resw 1 0 0000001E ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00000000 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00000004 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00000008 ???? smName1: resw 1 ; -> first string part 0 0000000A ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 0000000C ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 0000000E ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00000010 ???? smBaseNext: resw 1 0 00000012 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00000014 ???? smSpecialNext: resw 1 0 00000016 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00000000 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00000001 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00000002 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00000000 ???? shHash: resw 1 ; hash value 0 00000002 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00000000 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00000004 ???? xmsmSourceHandle: resw 1 0 00000006 ???????? xmsmSourceAddress: resd 1 0 0000000A ???? xmsmDestHandle: resw 1 0 0000000C ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <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 align 16, nop 223 usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 223 ------------------ note: usesection ASMTABLE1 224 align 16, nop 225 usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 225 ------------------ note: usesection ASMTABLE2 226 align 16, nop 227 usesection DATASTACKBASE === Switch to base=000000h -> "DATASTACKBASE" 227 ------------------ note: usesection DATASTACKBASE 228 align 16, nop 229 behind_progbits_dataentry: 230 usesection MESSAGESEGMENT === Switch to base=009D80h -> "MESSAGESEGMENT" 230 ------------------ note: usesection MESSAGESEGMENT 231 align 16, nop 232 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 232 ------------------ note: usesection lDEBUG_CODE 233 align 16, nop 234 behind_messagesegment: 235 %ifn _MESSAGESEGMENT 236 behind_messagesegment_nobits_truncated: 237 %endif 238 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 238 ------------------ note: usesection lDEBUG_CODE2 239 align 16, nop 240 %if !_BOOTLDR 241 behind_code_truncated: 242 %endif 243 behind_code: 244 usesection INIT === Switch to base=0250E0h -> "INIT" 244 ------------------ note: usesection INIT 245 align 16, nop 246 behind_code2: 247 usesection WLEMITALIGNINITEND === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 247 ------------------ note: usesection WLEMITALIGNINITEND 248 behind_init: 249 usesection DEVICESHIM === Switch to base=029330h -> "DEVICESHIM" 249 ------------------ note: usesection DEVICESHIM 250 align 16, nop 251 usesection WLEMITALIGNRELOCZERO === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 251 ------------------ note: usesection WLEMITALIGNRELOCZERO 252 behind_deviceshim: 253 relocatedzero: 254 255 %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 256 257 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 257 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 00000000 00 times 256 db 0 259 ..start: 260 %endif 261 262 263 %if _DEVICE 264 ; The final resident copy of this device header 265 ; is relocated from the shim to in front of our 266 ; PSP. Therefore, this space after the PSP can 267 ; be re-used for the newly expanded N buffer. 268 ; (Refer to N_BUFFER_END.) 269 270 ; The device header is of a fixed format. 271 ; For our purposes, the 4-byte code for 272 ; each the strategy entry and the 273 ; interrupt entry is part of this format. 274 ; (DOS may read the attributes or entrypoint 275 ; offsets before calling either, so the 276 ; inicomp stage needs to recreate in its 277 ; entrypoints part exactly what we have here.) 278 %macro writedeviceheader 3 279 hiddenusesection %1 280 %2: 281 .next: 282 %ifidni %1, DEVICESHIM 283 dd -1 284 %else 285 fill 2, -1, jmp strict short j_zero_entrypoint 286 dw -1 287 %endif 288 .attributes: 289 dw 8800h ; character device, open/close supported 290 ; Setting bit 800h means that opening the device 291 ; will already cause a critical error. This 292 ; discourages opening the character device. 293 ; As we never use it we want to avoid opens. 294 .strategy: 295 dw .strategy_entry %3 ; -> strategy entry 296 .interrupt: 297 dw .interrupt_entry %3 ; -> interrupt entry 298 .name: 299 fill 8, 32, db "LDEBUG$$" ; character device name 300 .strategy_entry: 301 fill 4, 90h, jmp %2 %+ .device_entrypoint 302 .interrupt_entry: 303 fill 4, 90h, retf 304 %endmacro 305 306 writedeviceheader lDEBUG_DATA_ENTRY, device_header, - 100h 279 <1> hiddenusesection %1 279 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY 280 <1> %2: 281 <1> .next: 282 <1> %ifidni %1, DEVICESHIM 283 <1> dd -1 284 <1> %else 0 00000100 EB3E fill 2, -1, jmp strict short j_zero_entrypoint 0 00000102 FFFF dw -1 287 <1> %endif 288 <1> .attributes: 0 00000104 0088 dw 8800h 290 <1> 291 <1> 292 <1> 293 <1> 294 <1> .strategy: 0 00000106 [1200] dw .strategy_entry %3 296 <1> .interrupt: 0 00000108 [1600] dw .interrupt_entry %3 298 <1> .name: 0 0000010A 4C44454255472424 fill 8, 32, db "LDEBUG$$" 300 <1> .strategy_entry: 0 00000112 EB3690 fill 4, 90h, jmp %2 %+ .device_entrypoint 302 <1> .interrupt_entry: 0 00000116 CB90 fill 4, 90h, retf 307 .pass_lcfg: 0 0000011A 00000000 dd 0 ; (not used yet) 309 %else 310 jmp initcode_j 311 %endif 312 313 ; Startup codes can be discarded after one of 314 ; them is used to enter the initialisation part. 315 ; Therefore the N buffer is now extended past 316 ; these codes, refer to N_BUFFER_END. 317 %if _BOOTLDR 0 0000011E 00 align 32, db 0 319 %if !_LINK && ($ - $$) != 32 320 %error Wrong kernel iniload entrypoint 321 %endif 322 %if _LINK && ($ - $$) != 256 + 32 323 %error Wrong kernel iniload entrypoint 324 %endif 0 00000120 BB[0000] mov bx, boot_initcode 326 %endif 327 328 %if _BOOTLDR || _DEVICE 329 ; INP: cs:0 => program image 330 ; INIT:bx -> init entrypoint 331 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 336 %endif 0 0000012C 00 align 64, db 0 338 %if !_LINK && ($ - $$) != 64 339 %error Wrong application entrypoint 340 %endif 341 %if _LINK && ($ - $$) != 256 + 64 342 %error Wrong application entrypoint 343 %endif 344 345 ; INP: cs = ds => PSP 346 j_zero_entrypoint: 347 initcode_j: 0 00000140 8CC8 mov ax, cs 0 00000142 31DB xor bx, bx 350 351 ; INP: ds:100h = ax:100h -> program image 352 ; INIT:bx -> init entrypoint 353 @@: 354 %if _LINK 0 00000144 05[0000] add ax, strict word relocatedzero + 0 356 wlcalc word_segrel_INIT, equ $ - 2 357 %else 358 add ax, paras(INITSECTIONOFFSET) 359 ; => original INIT section in program image 360 %endif 0 00000147 50 push ax 0 00000148 53 push bx 0 00000149 CB retf ; dispatch to INIT code 364 365 366 %if _DEVICE 367 ; INP: es:bx -> device request header 368 ; ss:sp -> a DOS stack, far return address to DOS 369 ; cs:0 -> our start image 370 ; OUT: bx = offset of init function in INIT segment 371 ; ss:sp -> bx, fl, ds, ax, far return address 372 device_header.device_entrypoint: 0 0000014A 26807F0200 cmp byte [es:bx + 2], 0 ; command code 0 (init) ? 0 0000014F 7414 je @F 375 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 381 382 @@: 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 389 390 391 writedeviceheader DEVICESHIM, shim_device_header, - 0 279 <1> hiddenusesection %1 === Switch to base=029330h -> "DEVICESHIM" 279 ------------------ <1> note: usesection DEVICESHIM 280 <1> %2: 281 <1> .next: 282 <1> %ifidni %1, DEVICESHIM 0 00000000 FFFFFFFF dd -1 284 <1> %else 285 <1> fill 2, -1, jmp strict short j_zero_entrypoint 286 <1> dw -1 287 <1> %endif 288 <1> .attributes: 0 00000004 0088 dw 8800h 290 <1> 291 <1> 292 <1> 293 <1> 294 <1> .strategy: 0 00000006 [1200] dw .strategy_entry %3 296 <1> .interrupt: 0 00000008 [1600] dw .interrupt_entry %3 298 <1> .name: 0 0000000A 4C44454255472424 fill 8, 32, db "LDEBUG$$" 300 <1> .strategy_entry: 0 00000012 EB0690 fill 4, 90h, jmp %2 %+ .device_entrypoint 302 <1> .interrupt_entry: 0 00000016 CB90 fill 4, 90h, retf 392 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 398 0 0000002E 90 align 16 400 deviceshim_size equ $ - $$ 401 endarea deviceshim, 1 402 403 404 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 404 ------------------ note: usesection lDEBUG_DATA_ENTRY 405 %else 406 deviceshim_size equ 0 407 %endif 408 409 410 align 2, db 0 411 N_BUFFER_END equ $ ; end of N buffer (starts in PSP at 80h) 412 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 [1017][170C][0000] 0 00000186 [0000][F80B][0000] 0 0000018C [0000][380F][0000] repeatdw pp,qq,rr,sss,tt,uu,vv,ww,xx,yy 0 00000192 [0000][0000][0000] 0 00000198 [0000][0000][1017] 0 0000019E [0000] 415 %if _SYMBOLIC 0 000001A0 [0000] dw zz 417 %endif 418 419 %if _LOADER 420 aa equ error 421 cc equ error 422 kk equ error 423 ll equ error 424 nn equ error 425 pp equ error 426 tt equ error 427 ww equ error 428 %endif 429 430 431 %ifn _LINK 432 %include "options.mac" 433 %endif 434 0 000001A2 00 align 4, db 0 436 ; options, startoptions and internalflags 437 ; have to be consecutive 0 000001A4 00000002 options: dd DEFAULTOPTIONS ; run-time options 0 000001A8 10410080 options2: dd DEFAULTOPTIONS2 0 000001AC 0F000060 options3: dd DEFAULTOPTIONS3 0 000001B0 02000000 options4: dd DEFAULTOPTIONS4 0 000001B4 00000000 options5: dd 0 0 000001B8 00000100 options6: dd DEFAULTOPTIONS6 0 000001BC 00200000 options7: dd DEFAULTOPTIONS7 445 ; options, options2, options3, options4, options5, options6, options7 446 ; are each assumed to be dwords 447 ; and all consecutive in expr.asm isvariable? 448 0 000001C0 00000002 startoptions: dd DEFAULTOPTIONS ; options as determined during startup; read-only for user 0 000001C4 10410080 startoptions2: dd DEFAULTOPTIONS2 0 000001C8 0F000060 startoptions3: dd DEFAULTOPTIONS3 0 000001CC 02000000 startoptions4: dd DEFAULTOPTIONS4 0 000001D0 00000000 startoptions5: dd 0 0 000001D4 00000100 startoptions6: dd DEFAULTOPTIONS6 0 000001D8 00200000 startoptions7: dd DEFAULTOPTIONS7 456 ; startoptions, startoptions2, startoptions3, startoptions4, 457 ; startoptions5, startoptions6 458 ; are each assumed 459 ; to be dwords and all consecutive in expr.asm isvariable? 460 0 000001DC F8308000 internalflags: dd attachedterm|pagedcommand|notstdinput|inputfile|notstdoutput|outputfile|debuggeeA20|debuggerA20 462 ; flags only modified by DEBUG itself 463 internalflags2: 464 %if _SYMBOLIC 0 000001E0 00600000 dd dif2_sym_req_xms | dif2_sym_req_86mm 466 %else 467 dd 0 468 %endif 0 000001E4 80040000 internalflags3: dd dif3_partition_changed | dif3_at_line_end 0 000001E8 00000000 internalflags4: dd 0 0 000001EC 00000000 internalflags5: dd 0 472 internalflags6: 473 %if _MCP 474 %assign DIF6MCP dif6_mcp 475 %else 476 %assign DIF6MCP 0 477 %endif 478 %if (_DEBUG && ! _DEBUG_COND) || _LOADER 479 dd DIF6MCP | dif6_debug_mode ; always indicate debuggable 480 %else 0 000001F0 00000000 dd DIF6MCP 482 %endif 0 000001F4 00000000 internalflags7: dd 0 484 ; internalflags, internalflags2, internalflags3, internalflags4, 485 ; internalflags5, internalflags6, internalflags7 486 ; are each assumed 487 ; to be dwords and all consecutive in expr.asm isvariable? 488 489 %if !_LOADER 0 000001F8 07F00000 asm_options: dd DEFAULTASMOPTIONS 491 asm_startoptions: 0 000001FC 07F00000 dd DEFAULTASMOPTIONS 493 0 00000200 00000000 gg_first_cseip_linear: dd 0 0 00000204 00000000 gg_next_cseip_linear: dd 0 0 00000208 00000000 tpg_possible_breakpoint:dd 0 0 0000020C [0000] gg_deferred_message: dw msg.empty_message 498 bb_deferred_message_in_lineout_behind: 0 0000020E 0000 dw 0 500 align 4, db 0 0 00000210 00 tpg_proceed_bp: times BPSIZE db 0 502 %if _DEBUG1 503 align 2, db 0 504 test_records_Readmem: times 6 * 16 db 0 505 test_records_Writemem: times 6 * 16 db 0 506 test_records_getLinear: times 6 * 16 db 0 507 test_records_getSegmented: times 6 * 16 db 0 508 509 test_readmem_value: db 0 510 %endif 0 00000219 00 pp_instruction: db 0 512 %if _RH 0 0000021A 00 skip_rh: db 0 514 %endif 515 %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER || _EXTENSIONS 0 0000021B 00 in_re: db 0 517 %endif 518 align 4, db 0 0 0000021C 00000000 pp_operand: dd 0 520 %if _PM && _DEBUG_PM_ENTRY 521 debug_pm_entry_total: dd 0 522 debug_pm_entry_esph: dd 0 523 debug_pm_entry_b: dd 0 524 %endif 525 %endif 526 %if _LOADER 527 currentposition: db 2 ; 0 = bottom, 1 = top, 2 = hidden 528 db 0 529 %endif 530 align 2, db 0 531 ; code_seg, code_sel, code2_seg, code2_sel, extseg, extcssel 532 ; expected in this particular order here! used for dispatch 533 ; of the dualret_helper functions 0 00000220 0000 code_seg: dw 0 ; LOADER-relocate 535 %if _PM 0 00000222 0000 code_sel: dw 0 537 %endif 538 %if _DUALCODE 0 00000224 0000 code2_seg: dw 0 540 %if _PM 0 00000226 0000 code2_sel: dw 0 542 %endif 543 %endif 544 %if _EXTENSIONS 0 00000228 0000 extseg: dw 0 ; LOADER-relocate 546 %if _PM 0 0000022A 0000 extcssel: dw 0 548 %if extseg + 2 != extcssel 549 %error code_ret_to_ext expects extcssel after extseg 550 %endif 0 0000022C 0000 extdssel: dw 0 552 %else 553 extcssel equ extseg 554 extdssel equ extseg 555 %endif 556 %endif 557 %if _IMMASM 0 0000022E 0000 immseg: dw 0 559 %endif 560 %if _MESSAGESEGMENT 561 %if _ELDLINKINFO 0 00000230 [0000] linkinfoaddress:dw linkinfo 563 %endif 0 00000232 0000 messageseg: dw 0 ; LOADER-relocate 565 %if _PM 0 00000234 0000 messagesel: dw 0 567 %endif 568 %endif 569 %if _APP_ENV_SIZE || _DEV_ENV_SIZE || _BOOT_ENV_SIZE 0 00000236 0000 envseg: dw 0 ; (includes pseudo-MCB) ; LOADER-relocate 0 00000238 0000 env_size: dw 0 572 %endif 573 574 %if _LINK 0 0000023A [0054] entryseg_size: dw end_of_datastack 0 0000023C [0000] code_size: dw behind_code wrt lDEBUG_CODE ; may truncate 577 %if _DUALCODE 0 0000023E [0000] code2_size: dw behind_code2 wrt lDEBUG_CODE2 579 %endif 580 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000240 0020 historyseg_size: dw historysegment_boot_size 582 %endif 583 %if _MESSAGESEGMENT 0 00000242 [0000] messageseg_size: dw behind_messagesegment_nobits wrt MESSAGESEGMENT 585 ; may truncate 586 %endif 587 %if _HELP_COMPRESSED && _BOOTLDR_DISCARD_HELP 588 indirect_hshrink_message_buffer: 0 00000244 [0000] dw nontruncated_hshrink_message_buffer 590 %endif 591 %else 592 entryseg_size: dw 100h + DATAENTRYTABLESIZE + datastack_size 593 code_size: dw ldebug_code_size ; may truncate 594 %if _DUALCODE 595 code2_size: dw ldebug_code2_size 596 %endif 597 %if _HISTORY_SEPARATE_FIXED && _HISTORY 598 historyseg_size: dw historysegment_boot_size 599 %endif 600 %if _MESSAGESEGMENT 601 messageseg_size: dw messagesegment_nobits_size ; may truncate 602 %endif 603 %if _HELP_COMPRESSED && _BOOTLDR_DISCARD_HELP 604 indirect_hshrink_message_buffer: 605 dw nontruncated_hshrink_message_buffer 606 %endif 607 %endif 608 609 %if _EXTENSIONS 0 00000246 0020 extseg_size: dw extsegment_size 0 00000248 0000 extseg_used: dw 0 0 0000024A [0014] extdata: dw ext_data_area 0 0000024C 0040 extdata_size: dw ext_data_area.size 0 0000024E 0000 extdata_used: dw 0 0 00000250 0000 ext_command_handler: dw 0 0 00000252 0000 ext_preprocess_handler: dw 0 0 00000254 0000 ext_inject_handler: dw 0 618 %if !_LOADER 0 00000256 0000 ext_aa_before_getline_handler: dw 0 0 00000258 0000 ext_aa_inject_handler: dw 0 0 0000025A 0000 ext_aa_after_getline_handler: dw 0 622 %endif 0 0000025C 0000 ext_puts_handler: dw 0 0 0000025E 0000 ext_puts_copyoutput_handler: dw 0 625 %if _EXT_PUTS_GETLINE 0 00000260 0000 ext_puts_getline_handler: dw 0 627 %endif 628 %if _CATCHINT2D 0 00000262 0000 ext_amis_handler: dw 0 630 %endif 631 %if _COMLEVELS 0 00000264 0000 ext_comlevels_handler: dw 0 633 %endif 634 %if _EXT_PUTS_GETLINE 0 00000266 00 in_getinput: db 0 0 00000267 00 db 0 ; reserved, zeroed in cmd3 637 %endif 0 00000268 0000 pm_2_86m_0: dw 0 ; for fast, fl preserving dispatch 639 640 extcall_table: 641 .ret: 642 ; return near addresses/thunk entries for non-dual 0 0000026A [C414] dw entry_ret_to_ext 644 %if _PM 0 0000026C [9108] dw code_retf 646 %endif 0 0000026E [7E08] dw code_ret_to_ext 648 %if _PM 0 00000270 [9108] dw code_retf 650 %endif 651 %if _DUALCODE 0 00000272 [0A00] dw code2_ret_to_ext 653 %if _PM 0 00000274 [9108] dw code_retf 655 %endif 656 %endif 657 658 ; repeat for dual entries (thunk entries) 0 00000276 0000 dw 0 660 %if _PM 0 00000278 [E708] dw code_dual_thunk 662 %endif 0 0000027A 0000 dw 0 664 %if _PM 0 0000027C [E708] dw code_dual_thunk 666 %endif 667 %if _DUALCODE 0 0000027E 0000 dw 0 669 %if _PM 0 00000280 [E708] dw code_dual_thunk 671 %endif 672 %endif 673 674 .segsel: 675 ; seg/sel variables for non-dual 0 00000282 [980C] dw pspdbg 677 %if _PM 0 00000284 [0000] dw cssel 679 %endif 0 00000286 [2002] dw code_seg 681 %if _PM 0 00000288 [2202] dw code_sel 683 %endif 684 %if _DUALCODE 0 0000028A [2402] dw code2_seg 686 %if _PM 0 0000028C [2602] dw code2_sel 688 %endif 689 %endif 690 691 ; repeat for dual entries 0 0000028E [980C] dw pspdbg 693 %if _PM 0 00000290 [0000] dw cssel 695 %endif 0 00000292 [2002] dw code_seg 697 %if _PM 0 00000294 [2202] dw code_sel 699 %endif 700 %if _DUALCODE 0 00000296 [2402] dw code2_seg 702 %if _PM 0 00000298 [2602] dw code2_sel 704 %endif 705 %endif 706 707 %if ! _PM 708 .thunk: 709 ; just the thunk entries 710 dw code_retf 711 dw code_retf 712 %if _DUALCODE 713 dw code_retf ; just retf, linkcall sets everything up 714 %endif 715 dw code_dual_thunk 716 dw code_dual_thunk 717 %if _DUALCODE 718 dw code_dual_thunk ; our thunk function 719 %endif 720 %endif 721 %endif 0 0000029A 0000 alloc_size: dw 0 0 0000029C 0000 alloc_seg: dw 0 ; LOADER-relocate 724 %if !_LOADER 0 0000029E 0000 next_reserved_segment: dw 0 0 000002A0 0000 alloc_size_not_reserved:dw 0 0 000002A2 0000 reserved_address: dw 0 728 %endif 729 0 000002A4 0D db 13 0 000002A5 0D align 16, db 13 ; insure the cmdline_buffer is prefixed by CR 732 cmdline_buffer: 733 .size: equ _RC_BUFFER_SIZE 0 000002B0 00 times .size db 0 735 .end: 0 000003B0 [B002] .position: dw cmdline_buffer 737 738 %if !_LOADER 0 000003B2 0D db 13 0 000003B3 0D align 2, db 13 ; insure the re_buffer is prefixed by CR 741 re_buffer: 742 .size: equ _RE_BUFFER_SIZE 0 000003B4 405200 fill .size,0,db "@R" 744 .end: 0 00000BB4 [B403] .position: dw re_buffer 746 0 00000BB6 00 align 4, db 0 0 00000BB8 00000000 re_count: dd 0 0 00000BBC 00010000 re_limit: dd 256 750 %endif 751 align 4, db 0 0 00000BC0 00000000 rc_count: dd 0 0 00000BC4 00100000 rc_limit: dd 4096 754 755 align 2, db 0 0 00000BC8 0000 cmd3_set_options: dw 0 757 %if _PM 0 00000BCA 0000 auxbuff_switchbuffer_size: dw 0 759 %endif 0 00000BCC 00 auxbuff_segorsel:segonlyaddress ; LOADER-relocate 761 %if !_LOADER 762 auxbuff_behind_last_silent: 0 00000BD2 0000 dw 0 ; -> behind last silent buffer entry 764 %if _RH 765 auxbuff_start_silent: 0 00000BD4 0000 dw 0 767 auxbuff_amount_silent: 0 00000BD6 0000 dw 0 769 %endif 770 %endif 771 auxbuff_current_size: 0 00000BD8 1020 dw auxbuff_size 773 %if _ELDLINKINFO || _AUXBUFFSIZE != _AUXBUFFMAXSIZE 774 auxbuff_current_size_minus_24: 0 00000BDA F81F dw auxbuff_size - 24 776 %endif 777 778 %if !_LOADER 779 tt_silent_mode_number: 0 00000BDC 0000 dw 0 ; if non-zero: maximum amount of dumps 781 ; displayed after T/TP/P while silent 782 %endif 783 %if _SYMBOLIC 0 00000BDE 0000 created_psp: dw 0 0 00000BE0 0000 created_size: dw 0 786 %endif 787 %if _CONFIG 0 00000BE2 0000 yy_boot_attempt_open_stack: dw 0 0 00000BE4 0000 yy_boot_attempt_open_pathname: dw 0 790 %endif 791 792 %if _INPUT_FILE_HANDLES 0 00000BE6 90 align INPUTFILEHANDLE_size 794 input_file_handles: 0 00000BE8 FF times _INPUT_FILE_HANDLES * INPUTFILEHANDLE_size db -1 0 00000C68 0000 .active: dw 0 0 00000C6A 0000 .to_close: dw 0 798 %endif 799 align 2, db 0 0 00000C6C 0142 indos_remember_seek_function: dw 4201h 0 00000C6E FFFF indos_remember_seek_handle: dw -1 802 align 4, db 0 0 00000C70 00000000 indos_remember_seek_offset: dd 0 804 %if _INPUT_FILE_BOOT 805 align 4, db 0 0 00000C74 00000000 boot_remember_seek_offset: dd 0 807 align 2, db 0 0 00000C78 FFFF boot_remember_seek_handle: dw -1 809 %endif 810 %if _EXTENSIONS 811 alignb 2 0 00000C7A FFFF ext_handle: dw -1 813 %endif 814 0 00000C7C 00 charcounter: db 0 ; used by raw output to handle tab 0 00000C7D 00 linecounter: db 0 ; used by paging in puts 0 00000C7E 00 align 4, db 0 0 00000C80 [0014] savesp: dw stack_end ; saved stack pointer 0 00000C82 0000 dw 0 ; 0 to set high word of esp 820 %if !_LOADER 0 00000C84 0000 re_sp: dw 0 822 %endif 0 00000C86 [0000] errret: dw cmd3 ; return here if error 0 00000C88 [3E17] throwret: dw errhandler ; return here if error - priority, no display 0 00000C8A [0014] throwsp: dw stack_end ; stack pointer set before jumping to throwret 0 00000C8C 0000 run_sp: dw 0 ; stack pointer when running 0 00000C8E 0000 dw 0 ; (zero for esph) 0 00000C90 0000 run_sp_reserve: dw 0 ; additional space to reserve between the 829 ; near return address of run and the run_sp 0 00000C92 4000 spadjust: dw 40h ; adjust sp by this amount for save 831 %if _SYMBOLIC 832 stack_low_address: 0 00000C94 [0010] dw str_buffer ; low end of stack, default = str_buffer 834 %endif 835 836 %if !_LOADER 0 00000C96 0000 pspdbe: dw 0 ; debuggee's PSP (86M segment) 838 ; unless DIF&attachedterm or bootloaded 839 %endif 840 %ifn _MESSAGESEGMENT 841 %if _ELDLINKINFO 842 linkinfoaddress:dw linkinfo 843 %endif 844 %endif 0 00000C98 0000 pspdbg: dw 0 ; debugger's PSP (86M segment) ; LOADER-relocate 846 847 %if _LINK 848 %ifn _PM 849 dssel equ pspdbg 850 %endif 851 %endif 852 853 %if !_LOADER 0 00000C9A 00 align 4, db 0 0 00000C9C 0000000000000000 run2324: dd 0,0 ; debuggee's interrupt vectors 23h and 24h (both modes) 856 %if _PM 0 00000CA4 00000000 dd 0 0 00000CA8 [0000][0000] dbg2324: dw i23pm, i24pm 859 %endif 860 %if _VDD 0 00000CAC FFFF hVdd: dw -1 ; NTVDM VDD handle 862 %endif 0 00000CAE 00 align 4, db 0 0 00000CB0 0000000000000000 sav2324: dd 0,0 ; debugger's interrupt vectors 23h and 24h (real-mode only) 0 00000CB8 00 hakstat: db 0 ; whether we have hacked the vectors or not 866 %if _MS_0RANGE_COMPAT 0 00000CB9 00 getrange_is_uu: db 0 868 %endif 0 00000CBA 00 align 4, db 0 0 00000CBC 00000000 psp22: dd 0 ; original terminate address from our PSP 0 00000CC0 0000 parent: dw 0 ; original parent process from our PSP (must follow psp22) 872 %if _MCB || _INT || _EXTENSIONS 0 00000CC2 FFFF firstmcb: dw -1 ; start of MCB chain (always segment) 0 00000CC4 FFFF firstumcb: dw -1 875 %endif 0 00000CC6 00 pInDOS: segofs16address ; far16 address of InDOS flag (bimodal) 877 %if _USESDA 0 00000CCE FFFFFFFFFFFFFFFF pSDA: segofs16address minusone 879 ; far16 address of SDA (bimodal) 880 %endif 881 %endif 0 00000CD6 00 machine: db 0 ; type of processor for assembler and disassembler (1..6) 0 00000CD7 00 has_87: db 0 ; if there is a math coprocessor present 0 00000CD8 00 mach_87: db 0 ; type of coprocessor present 0 00000CD9 00 encodedmach87: db 0 ; C0 = no coproceasor, C = coprocessor present, 886 ; C2 = 287 present on a 386 887 %if _MMXSUPP 0 00000CDA 00 has_mmx: db 0 889 %endif 890 %if _VXCHG 891 %ifn _VXCHGBIOS 0 00000CDB 00 align 4, db 0 0 00000CDC 00000000 xmsdrv: dd 0 ; XMM driver address, obtained thru int 2F, ax=4310h 894 xmsmove:istruc XMSM ; XMS block move struct, used to save/restore screens 0 00000CE0 00 iend 896 %endif 897 align 2, db 0 0 00000CF0 0000 csrpos: dw 0 ; cursor position of currently inactive screen 0 00000CF2 00 vrows: db 0 ; current rows; to see if debuggee changed video mode 900 %endif 901 %if _ALTVID ; exchange some video BIOS data fields for option /2. 0 00000CF3 0000 oldcsrpos: dw 0 ; cursor position 0 00000CF5 0000 oldcrtp: dw 0 ; CRTC port 0 00000CF7 5000 oldcols: dw 80 ; columns 905 oldmr: ; label word 0 00000CF9 00 oldmode: db 0 ; video mode 0 00000CFA 18 oldrows: db 24 ; rows - 1 908 %endif 0 00000CFB 01 bInDbg: db 1 ; 1=debugger is running 0 00000CFC 0A notatty: db 10 ; if standard input is from a file 911 ; this is also used for a linebreak processing hack 0 00000CFD 00 vpage: db 0 ; video page the debugger is to use for BIOS output 913 %if _MCLOPT 914 master_pic_base:db _MCLOPT_DEFAULT 915 %endif 0 00000CFE 00 switchar: db 0 ; switch character 0 00000CFF 20 swch1: db ' ' ; switch character if it's a slash 918 align 2, db 0 919 dd_default_length: 0 00000D00 8000 dw 80h 921 dd_default_lines: 0 00000D02 0000 dw 0 923 %if !_LOADER 924 uu_default_length: 0 00000D04 2000 dw 20h 926 uu_default_lines: 0 00000D06 0000 dw 0 928 %endif 0 00000D08 0000 promptlen: dw 0 ; length of prompt 0 00000D0A [1200] bufnext: dw line_in+2 ; address of next available character 0 00000D0C [1200] bufend: dw line_in+2 ; address + 1 of last valid character 932 %if _EXTENSIONS 933 indirect_array_errfix: 0 00000D0E 0000 dw 0 ; -> errfix.eld's array, 0 if none installed 935 %endif 0 00000D10 0000 rc: dw 0 0 00000D12 0000 priorrc: dw 0 0 00000D14 0000 erc: dw 0 939 %if _HISTORY 940 history: 941 %if _HISTORY_SEPARATE_FIXED 0 00000D16 00 .segorsel: segonlyaddress ; LOADER-relocate 0 00000D1C FE1F .first: dw historysegment_boot_size - 2 0 00000D1E FE1F .last: dw historysegment_boot_size - 2 945 %else 946 .first: dw historybuffer.end - 2 947 .last: dw historybuffer.end - 2 948 %endif 949 %endif 950 951 var_addr_entries: 952 %if !_LOADER 0 00000D20 00 a_addr: segmentedaddress; address for next A command 954 %endif 0 00000D2A 00 d_addr: segmentedaddress; address for next D command; must follow a_addr 956 %if !_LOADER 0 00000D34 00 behind_r_u_addr:segmentedaddress; address behind R's disassembly 0 00000D3E 00 u_addr: segmentedaddress; address for next U command; must follow d_addr 959 %endif 0 00000D48 00 e_addr: segmentedaddress; address for current/next E command 961 %if _DSTRINGS 0 00000D52 00 dz_addr: segmentedaddress; address for next ASCIZ string 0 00000D5C 00 dcpm_addr: segmentedaddress; address for next $-terminated string 0 00000D66 00 dcount_addr: segmentedaddress; address for next byte-counted string 0 00000D70 00 dwcount_addr: segmentedaddress; address for next word-counted string 966 %endif 967 var_addr_entries.amount equ ($ - var_addr_entries) / SEGADR_size 968 %if _DX 969 x_addr: dd 0 ; (phys) address for next DX command 970 %endif 971 %if _DSTRINGS 0 00000D7A 00 dstringtype: db 0 ; FFh byte-counted, FEh word-counted, else terminator byte 0 00000D7B 00 align 2, db 0 0 00000D7C [520D] dstringaddr: dw dz_addr ; -> address of last string 975 %endif 976 %if _INT 0 00000D7E 00 align 4, db 0 0 00000D80 00000000 intaddress: dd 0 979 lastint_is_86m_and_mcb: 0 00000D84 0000 dw 0 0 00000D86 00 lastint: db 0 982 %endif 983 %if !_LOADER 0 00000D87 00 align 4, db 0 985 search_results: 986 %if _PM 0 00000D88 00 times 6 * search_results_amount db 0 988 %else 989 times 4 * search_results_amount db 0 990 %endif 991 align 4, db 0 0 00000DE8 00000000 sscounter: dd 0 0 00000DEC 00 eqflag: db 0 ; flag indicating presence of `=' operand 0 00000DED 00 align 2, db 0 0 00000DEE 000000000000 eqladdr: dw 0,0,0 ; address of `=' operand in G, P and T command 996 align 2, db 0 0 00000DF4 0000 run_int: dw 0 ; interrupt type that stopped the running 998 %endif 0 00000DF6 [5206] lastcmd: dw dmycmd 1000 %if _EXTENSIONS 1001 lastcmd_transfer_ext_address: 0 00000DF8 0000 dw 0 1003 near_transfer_ext_address: 0 00000DFA 0000 dw 0 1005 %endif 1006 %if !_LOADER 0 00000DFC 00 fileext: db 0 ; file extension (0 if no file name) 1008 %endif 1009 0 00000DFD 00 align 4, db 0 0 00000E00 00000000 mmxbuff: dd 0 ; buffer with a (read-only) part of MMX register 1012 ; for access from within expressions 1013 %if _CATCHINT08 0 00000E04 0000 intr8_counter: dw 0 0 00000E06 5A00 intr8_limit: dw 18 * 5 ; ca 5 seconds 1016 %endif 1017 %if !_LOADER 0 00000E08 00 maxmachinetype: db 0 1019 %endif 1020 serial_rows: 0 00000E09 18 db 24 1022 serial_columns: 0 00000E0A 50 db 80 1024 serial_keep_timeout: 0 00000E0B 0F db 15 1026 %if _USE_TX_FIFO 1027 serial_fifo_size: 0 00000E0C 10 db _BI_TX_FIFO_SIZE 1029 ; size of built-in TX fifo (1 is as if no FIFO) 1030 %endif 0 00000E0D 00 serial_flags: db 0 ; flags in options.mac 1032 0 00000E0E 0B serial_var_intnum: db _INTNUM 0 00000E0F 03 serial_var_params: db _UART_PARAMS 0 00000E10 00 serial_var_fifo: db _UART_FIFO 0 00000E11 00 align 2, db 0 0 00000E12 F802 serial_var_baseport: dw _UART_BASE 0 00000E14 0C00 serial_var_dl: dw _UART_RATE 0 00000E16 0800 serial_var_irqmask: dw _OFFMASK 1040 0 00000E18 01 io_rows: db 1 0 00000E19 01 io_columns: db 1 1043 align 2, db 0 1044 %if _40COLUMNS 0 00000E1A 0000 io_columns_getline: dw 0 ; byte variable zero-extended 1046 %endif 0 00000E1C 0000 io_start_buffer: dw 0 0 00000E1E 0000 io_end_buffer: dw 0 0 00000E20 FF00 io_levels: dw 255 0 00000E22 0300 io_flags: dw DEFAULTIOFLAGS 1051 iof_extra_iol_for_tpg_re: equ 1 1052 iof_extra_iol_for_rc: equ 2 1053 DEFAULTIOFLAGS equ iof_extra_iol_for_tpg_re | iof_extra_iol_for_rc 1054 1055 align 2, db 0 0 00000E24 0000 getline_timer_count: dw 0 0 00000E26 0000 getline_timer_last: dw 0 0 00000E28 [5206] getline_timer_func: dw dmycmd 1059 1060 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1061 align 2, db 0 0 00000E2A 0000 if_exists_then_address: dw 0 0 00000E2C 0000 if_exists_si: dw 0 0 00000E2E 0000 if_exists_sp: dw 0 0 00000E30 0000 if_exists_length: dw 0 1066 %endif 1067 1068 align 2, db 0 1069 terminator_in_line_in: 0 00000E32 0000 .offset: dw 0 0 00000E34 00 .value: db 0 1072 1073 %if !_LOADER 0 00000E35 00 qqtermcode: db 0 1075 align 2, db 0 0 00000E36 0000 device_mcb_paragraphs: dw 0 0 00000E38 00000000 device_header_address: dd 0 1078 %endif 1079 1080 align 2, db 0 1081 inttab_optional: 1082 .: 1083 serial_installed_intnum: equ $ 0 00000E3C 0001 dw 100h 0 00000E3E [0000] dw serial_interrupt_handler 0 00000E40 0100 dw dif4_int_serial_hooked 1087 %if _LOADER 1088 dw 118h 1089 dw intr_loader_18 1090 dw dif4_int_18_hooked 1091 dw 119h 1092 dw intr_loader_19 1093 dw dif4_int_19_hooked 1094 %endif 1095 %if _PM 0 00000E42 2F01 dw 12Fh 0 00000E44 [0000] dw debug2F 0 00000E46 0200 dw dif4_int_2F_hooked 1099 %endif 1100 %if _CATCHINT08 0 00000E48 0801 dw 108h 0 00000E4A [0000] dw intr8 0 00000E4C 0400 dw dif4_int_08_hooked 1104 %endif 1105 %if _CATCHINTFAULTCOND && _CATCHINT0D 0 00000E4E 0D01 dw 10Dh 0 00000E50 [0000] dw intr0D 0 00000E52 1000 dw dif4_int_0D_hooked 1109 %endif 1110 %if _CATCHINTFAULTCOND && _CATCHINT0C 0 00000E54 0C01 dw 10Ch 0 00000E56 [0000] dw intr0C 0 00000E58 2000 dw dif4_int_0C_hooked 1114 %endif 1115 .amount: equ ($ - .) / 6 0 00000E5A 0000 dw 0 1117 1118 1119 amisintr_offset: 0 00000E5C [6D0E] dw inttab 1121 1122 inttab_pre: 0 00000E5E 00 times 3 * inttab_optional.amount db 0 1124 1125 inttab: 1126 %if _CATCHINT00 0 00000E6D 00 db 0 0 00000E6E [0000] dw intr0 ; table of interrupt initialization stuff 1129 %endif 1130 %if _CATCHINT01 0 00000E70 01 db 1 0 00000E71 [0000] dw intr1 1133 %endif 1134 %if _CATCHINT03 0 00000E73 03 db 3 0 00000E74 [0000] dw intr3 1137 %endif 1138 %if _CATCHINT07 1139 db 7 1140 dw intr7 1141 %endif 1142 %if ! _CATCHINTFAULTCOND && _CATCHINT0C 1143 db 0Ch 1144 dw intr0C 1145 %endif 1146 %if ! _CATCHINTFAULTCOND && _CATCHINT0D 1147 db 0Dh 1148 dw intr0D 1149 %endif 1150 %if _CATCHINT18 0 00000E76 18 db 18h 0 00000E77 [0000] dw intr18 1153 %endif 1154 %if _CATCHINT19 0 00000E79 19 db 19h 0 00000E7A [0000] dw intr19 1157 %endif 1158 %if _CATCHSYSREQ 1159 db _SYSREQINT 1160 dw intr_sysreq 1161 %endif 1162 %if _CATCHINT06 0 00000E7C 06 .i06: db 6 0 00000E7D [0000] dw intr6 1165 %endif 1166 endarea inttab 1167 inttab_number equ inttab_size / 3 1168 %if _CATCHINT2D 0 00000E7F 2D .i2D: db 2Dh 0 00000E80 [0000] dw int2D 1171 %endif 1172 1173 1174 intforcetab: 1175 %if _CATCHINT00 0 00000E82 01 db opt4_int_00_force >> 24 1177 %endif 1178 %if _CATCHINT01 0 00000E83 02 db opt4_int_01_force >> 24 1180 %endif 1181 %if _CATCHINT03 0 00000E84 04 db opt4_int_03_force >> 24 1183 %endif 1184 %if _CATCHINT07 1185 db opt4_int_07_force >> 24 1186 %endif 1187 %if _CATCHINT0C 0 00000E85 00 db opt4_int_0C_force >> 24 1189 %endif 1190 %if _CATCHINT0D 0 00000E86 00 db opt4_int_0D_force >> 24 1192 %endif 1193 %if _CATCHINT18 0 00000E87 10 db opt4_int_18_force >> 24 1195 %endif 1196 %if _CATCHINT19 0 00000E88 20 db opt4_int_19_force >> 24 1198 %endif 1199 %if _CATCHSYSREQ 1200 %if _SYSREQINT == 09h 1201 db opt4_int_09_force >> 24 1202 %elif _SYSREQINT == 15h 1203 db opt4_int_15_force >> 24 1204 %else 1205 %error Unknown SysReq interrupt 1206 %endif 1207 %endif 1208 %if _CATCHINT06 0 00000E89 08 db opt4_int_06_force >> 24 1210 %endif 1211 1212 %if _CATCHINT06 && _DETECT95LX 1213 align 2, db 0 1214 inttab_number_variable: 0 00000E8A 0600 dw inttab_number 1216 %endif 1217 1218 1219 %if !_LOADER 1220 align 2, db 0 1221 ; Parameter block for EXEC call 1222 execblk: 0 00000E8C 0000 dw 0 ;(00) zero: copy the parent's environment 0 00000E8E 00000000 .cmdline: dw 0,0 ;(02) address of command tail to copy 0 00000E92 5C000000 .fcb1: dw 5Ch,0 ;(06) address of first FCB to copy 0 00000E96 6C000000 .fcb2: dw 6Ch,0 ;(10) address of second FCB to copy 0 00000E9A 00000000 .sssp: dw 0,0 ;(14) initial SS:SP 0 00000E9E 00000000 .csip: dw 0,0 ;(18) initial CS:IP 1229 %endif 1230 1231 1232 ; Register save area (32 words). 1233 ; must be DWORD aligned, used as stack 0 00000EA2 00 align 4, db 0 1235 regs: 0 00000EA4 00000000 reg_eax: dd 0 ;+00 eax 0 00000EA8 00000000 reg_ebx: dd 0 ;+04 ebx 0 00000EAC 00000000 reg_ecx: dd 0 ;+08 ecx 0 00000EB0 00000000 reg_edx: dd 0 ;+12 edx 0 00000EB4 00000000 reg_esp: dd 0 ;+16 esp 0 00000EB8 00000000 reg_ebp: dd 0 ;+20 ebp 0 00000EBC 00000000 reg_esi: dd 0 ;+24 esi 0 00000EC0 00000000 reg_edi: dd 0 ;+28 edi 0 00000EC4 00000000 reg_ds: dd 0 ;+32 ds (high word unused) 0 00000EC8 00000000 reg_es: dd 0 ;+36 es (high word unused) 0 00000ECC 00000000 reg_ss: dd 0 ;+40 ss (high word unused) 0 00000ED0 00000000 reg_cs: dd 0 ;+44 cs (high word unused) 0 00000ED4 00000000 reg_fs: dd 0 ;+48 fs (high word unused) 0 00000ED8 00000000 reg_gs: dd 0 ;+52 gs (high word unused) 0 00000EDC 00000000 reg_eip: dd 0 ;+56 eip 0 00000EE0 00000000 reg_efl: dd 0 ;+60 efl(ags) 1252 regs.end: 1253 regs.size: equ regs.end - regs 1254 regs.size_w equ regs.size / 2 1255 1256 %if _REGSHIGHLIGHT 1257 regs_prior: 1258 .: 0 00000EE4 00000000 times 16 dd 0 1260 .end: 1261 .size: equ .end - . 1262 .size_w equ .size / 2 1263 1264 %if .size != regs.size 1265 %error regs prior save area size mismatch 1266 %endif 1267 %endif 1268 1269 %if _DEVICE 1270 device_quittable_regs: 1271 .: 0 00000F24 00000000 times 16 dd 0 1273 .end: 1274 .size: equ .end - . 1275 .size_w equ .size / 2 1276 1277 %if .size != regs.size 1278 %error regs prior save area size mismatch 1279 %endif 1280 %endif 1281 1282 %if _VARIABLES 1283 vregs: 1284 .amount: equ 256 0 00000F64 00000000 times .amount dd 0 ; internal v0..vff 1286 %if _LINK && VREGSAMOUNT != .amount 1287 %error Wrong amount of vregs 1288 %endif 1289 %endif 1290 1291 %if _BOOTLDR 1292 align 2, db 0 1293 boot_init_foundname: 0 00001364 00 times 8+1+3+1 db 0 1295 %endif 1296 %if _EXECUTABLE 0 00001371 00 align 2, db 0 1298 init_executable_pathname: 0 00001372 00 times 128 db 0 0 000013F2 [7213] .end: dw init_executable_pathname 1301 %endif 1302 1303 ; possible byte encoding of lDebug variables for dynamic computations: 1304 ; xxxxyyyy 1305 ; 10: register 1306 ; xx: size (0 = 1, 1 = 2, 2 = 4) 1307 ; yyyy: 0..15: register as stored in the register save area 1308 ; as SIL, DIL, BPL, SPL aren't supported these map to xH 1309 ; xSL, IPL and FLL are invalid, ExS are invalid 1310 ; 1011: variable 1311 ; yyyy: which variable. variables are always dword-sized 1312 ; 11000000: 32-bit compound, next byte stores: xxxxyyyy first, second 16-bit reg 1313 ; 11000001..11111111: available for encoding other compound regs, vars, indirection, 1314 ; symbols, types etc 1315 ; 0xxxxxxx: operators 1316 1317 1318 %if !_LOADER 1319 ; Instruction set information needed for the 'p' command. 1320 ; ppbytes and ppinfo needs to be consecutive. 0 000013F4 6667262E363E6465F2 ppbytes:db 66h,67h,26h,2Eh,36h,3Eh,64h,65h,0F2h,0F3h,0F0h ; prefixes 0 000013FD F3F0 1322 PPLEN_ONLY_PREFIXES equ $-ppbytes 1323 .string: 0 000013FF ACADAAABA4A5 db 0ACh,0ADh,0AAh,0ABh,0A4h,0A5h ; lods,stos,movs 0 00001405 6C6D6E6F db 6Ch,6Dh,6Eh,6Fh ; ins,outs 0 00001409 A6A7AEAF db 0A6h,0A7h,0AEh,0AFh ; cmps,scas 1327 PPLEN_ONLY_STRING equ $-ppbytes 1328 .string_amount: equ $ - .string 0 0000140D CCCD db 0CCh,0CDh ; int instructions 0 0000140F E0E1E2 db 0E0h,0E1h,0E2h ; loop instructions 0 00001412 E8 db 0E8h ; call rel16/32 0 00001413 9A db 09Ah ; call far seg16:16/32 1333 ; (This last one is done explicitly by the code.) 1334 ; db 0FFh ; FF/2 or FF/3: indirect call 1335 1336 PPLEN equ $-ppbytes ; size of the above table 1337 1338 ; Info for the above, respectively. This MUST follow 1339 ; immediately after ppbytes, as we add + PPLEN - 1 to 1340 ; di after repne scasb to index into this (ppinfo). 1341 ; 80h = prefix; 82h = operand size prefix; 81h = address size prefix. 1342 ; If the high bit is not set, the next highest bit (40h) indicates 1343 ; that the instruction size depends on whether there is an operand 1344 ; size prefix; if set, under o32 two bytes are added to the size. 1345 ; (This is only used for direct near and far call.) 1346 ; If both the two highest bits are clear, then PP_STRDEST, 1347 ; PP_STRSRC, or PP_STRSRC2 may be set. This only happens for 1348 ; string instructions, which always are neither prefixes nor 1349 ; use additional bytes. 1350 ; The remaining bits tell the number of additional bytes in the 1351 ; instruction. This is at most 4. It must be below-or-equal to 1352 ; 7, or if PP_VARSIZ is used, 5 (so the sum stays below 8). 1353 1354 %if 0 ; moved to debug.mac 1355 PP_ADRSIZ equ 01h 1356 PP_OPSIZ equ 02h 1357 PP_PREFIX equ 80h 1358 PP_VARSIZ equ 40h 1359 PP_STRDEST equ 20h 1360 PP_STRSRC equ 10h 1361 PP_STRSRC2 equ 08h 1362 PP_SIZ_MASK equ 07h 1363 %endif 1364 0 00001414 8281 ppinfo: db PP_PREFIX | PP_OPSIZ, PP_PREFIX | PP_ADRSIZ 0 00001416 80 times 9 db PP_PREFIX ; prefixes 0 0000141F 1010 db PP_STRSRC, PP_STRSRC ; lods 0 00001421 2020 db PP_STRDEST, PP_STRDEST ; stos 0 00001423 3030 db PP_STRDEST | PP_STRSRC, PP_STRDEST | PP_STRSRC 1370 ; movs 0 00001425 2020 db PP_STRDEST, PP_STRDEST ; ins 0 00001427 1010 db PP_STRSRC, PP_STRSRC ; outs 0 00001429 1818 db PP_STRSRC2 | PP_STRSRC, PP_STRSRC2 | PP_STRSRC 1374 ; cmps 0 0000142B 0808 db PP_STRSRC2, PP_STRSRC2 ; scas 0 0000142D 0001 db 0,1 ; int 0 0000142F 010101 db 1,1,1 ; loop 0 00001432 42 db PP_VARSIZ | 2 ; call rel16/32 with displacement 0 00001433 44 db PP_VARSIZ | 4 ; call far 16:16 or 16:32 immediate 1380 1381 %if PPLEN != $-ppinfo 1382 %error "ppinfo table has wrong size" 1383 %endif 1384 1385 1386 %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 1387 1388 1389 ; Instructions that have an implicit operand subject to a segment prefix. 1390 ; This means a prefixed segment is allowed by the strict assembler, and 1391 ; the disassembler treats a segment prefix as part of the instruction and 1392 ; displays it in front of the instruction's mnemonic. 1393 ; (outs, movs, cmps, lods, xlat). 1394 segprfxtab: 0 00001434 6E6FA4A5A6A7ACAD db 06Eh,06Fh,0A4h,0A5h,0A6h,0A7h,0ACh,0ADh 1396 a32prfxtab: 0 0000143C D7 db 0D7h ; xlat, last in segprfxtab, first in a32prfxtab 1398 SEGP_LEN equ $-segprfxtab 1399 1400 ; Instructions that can be used with REPE/REPNE. 1401 ; (ins, outs, movs, stos, lods; cmps, scas) 0 0000143D 6C6EA4AAAC replist:db 06Ch,06Eh,0A4h,0AAh,0ACh ; REP (no difference) 1403 REP_SAME_LEN equ $-replist ; number of indifferent replist entries 0 00001442 A6AE db 0A6h,0AEh ; REPE/REPNE 1405 REP_LEN equ $-replist 1406 REP_DIFF_LEN equ REP_LEN-REP_SAME_LEN ; number of replist entries with difference 1407 1408 A32P_LEN equ $-a32prfxtab 1409 1410 ; prfxtab P_LEN REP_LEN REPE_REPNE_LEN 1411 1412 ; All the instructions in replist also have an implicit operand 1413 ; subject to ASIZE (similar to segprfxtab). Additionally, the 1414 ; xlat instruction (0D7h) has such an implicit operand too. 1415 ; maskmovq too. 1416 1417 align 2, db 0 1418 o32prfxtab: 0 00001444 0E001E0006001600 dw 0Eh, 1Eh, 06h, 16h, SPARSE_BASE + 0A0h, SPARSE_BASE + 0A8h 0 0000144C [A000][A800] 1420 ; push cs, push ds, push es, push ss, push fs, push gs 0 00001450 1F0007001700[A100] dw 1Fh, 07h, 17h, SPARSE_BASE + 0A1h, SPARSE_BASE + 0A9h 0 00001458 [A900] 1422 ; pop ds, pop es, pop ss, pop fs, pop gs 1423 O32P_AMOUNT equ ($ - o32prfxtab) / 2 1424 1425 %ifn _LINK 1426 %include "asmtabs.asm" 1427 %endif 1428 %endif 1429 1430 1431 %ifn _LINK || _LINK_COMPAT 1432 usesection lDEBUG_DATA_ENTRY 1433 1434 msg_start: 1435 %include "msg.asm" 1436 1437 msg_end: 1438 1439 numdef SHOWMSGSIZE, _DEFAULTSHOWSIZE 1440 %if _SHOWMSGSIZE 1441 %assign MSGSIZE msg_end - msg_start 1442 %warning msg holds MSGSIZE bytes 1443 %endif 1444 %endif 1445 1446 1447 usesection lDEBUG_DATA_ENTRY 1447 ------------------ note: usesection lDEBUG_DATA_ENTRY 1448 1449 ..@symhint_trace_caller_entry_to_code_segsel: 1450 entry_to_code_segsel: 1451 %if _PM 0 0000145A 57 push di 0 0000145B 2E8B3E[6802] mov di, word [cs:pm_2_86m_0] 0 00001460 2EFFA5[6614] jmp near word [cs:.table + di] 1455 1456 ; REM: Dispatch table in section lDEBUG_DATA_ENTRY 0 00001465 90 align 2 1458 .table: 0 00001466 [7214] dw .86m 0 00001468 [6A14] dw .pm 1461 1462 .pm: 0 0000146A 5F pop di 1464 ..@symhint_trace_caller_entry_to_code_sel: 1465 entry_to_code_sel: equ $ 0 0000146B 50 push ax 0 0000146C 2EA1[2202] mov ax, word [cs:code_sel] 0 00001470 EB06 jmp entry_to_code_common 1469 1470 .86m: 0 00001472 5F pop di 1472 %endif 1473 1474 ; INP: word [cs:ip] = near address to jump to in other segment 1475 ..@symhint_trace_caller_entry_to_code_seg: 1476 entry_to_code_seg: 0 00001473 50 push ax ; word space for ?jumpaddress_ip, is ax 0 00001474 2EA1[2002] mov ax, word [cs:code_seg] 1479 1480 entry_to_code_common: 1481 lframe 0 1482 lpar word, jumpaddress_cs_and_orig_ip 1483 lpar word, jumpaddress_ip 0 00001478 5589E5 lenter 1485 0 0000147B 56 push si 0 0000147C 9C pushf 0 0000147D FC cld 1489 0 0000147E 874604 xchg word [bp + ?jumpaddress_cs_and_orig_ip], ax ; fill function segment 0 00001481 89C6 mov si, ax 0 00001483 2EAD cs lodsw 1493 %if _DEBUG && !(_LINK || _LINK_COMPAT) 1494 cmp al, 0CCh ; debugger breakpoint ? 1495 jne @F ; no --> 1496 int3 ; break to make it remove the breakpoint 1497 dec si 1498 dec si 1499 cs lodsw ; reload the word 1500 cmp al, 0CCh 1501 jne @F 1502 1503 .l: 1504 int3 1505 jmp .l 1506 1507 @@: 1508 %endif 0 00001485 874602 xchg word [bp + ?jumpaddress_ip], ax ; fill function offset 1510 ; (and restore ax) 1511 0 00001488 9D popf 0 00001489 5E pop si 1514 0 0000148A 5D lleave 0 0000148B CB retf ; jump to dword [bp + ?jumpaddress] 1517 1518 1519 %if !_LOADER 1520 ; debug22 - Interrupt 22h handler 1521 ; 1522 ; This is for DEBUG itself: it's a catch-all for the various Int23 1523 ; and Int24 calls that may occur unpredictably at any time. What we 1524 ; do is pretend to be a command interpreter (which we are, in a sense, 1525 ; just with different sort of commands) by setting our parent PSP 1526 ; value equal to our own PSP so that DOS does not free our memory when 1527 ; we quit. Therefore control ends up here when DOS detects Control-C 1528 ; or an Abort in the critical error prompt is selected. 1529 debug22: 0 0000148C FA cli 1531 .cleartraceflag: 0 0000148D FC cld ; reestablish things 0 0000148E 8CC8 mov ax, cs 0 00001490 8ED8 mov ds, ax 0 00001492 8ED0 mov ss, ax 0 00001494 8B26[800C] mov sp, word [ savesp ] ; restore stack 1537 %if _PM 0 00001498 C606[6802]00 mov byte [pm_2_86m_0], 0 0 0000149D 8026[DD01]F7 clropt [internalflags], protectedmode ; reset PM flag 1540 %endif 0 000014A2 90 times 1 - (($ - $$) & 1) nop ; align in-code parameter 0 000014A3 E8CDFF call entry_to_code_seg 0 000014A6 [9B05] dw cmd2_reset_re_maybe_pm 1544 %endif 1545 1546 1547 %if _DUALCODE 1548 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 1548 ------------------ note: usesection lDEBUG_CODE2 1549 %if $ - $$ 1550 %error cmd3_mirror is not at offset 0 in lDEBUG_CODE2 1551 %endif 1552 cmd3_mirror: 0 00000000 B9 db 0B9h ; mov cx, imm16 (cx = nonzero) 0 00000001 31C9 xor cx, cx ; cx = 0 0 00000003 E82600EB02[0300] dualcall cmd3.have_cx_convenience 1556 %endif 1557 1558 1559 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 1559 ------------------ note: usesection lDEBUG_CODE 1560 %if $ - $$ 1561 %error cmd3 is not at offset 0 in lDEBUG_CODE 1562 %endif 1563 1564 code_insure_low_byte_not_0CCh 1565 ; Begin main command loop. 1566 cmd3: section_of_function 1567 ; A convenience entrypoint: Entering 1568 ; cmd3 at offset 1 instead of 0 will 1569 ; make the debugger additionally 1570 ; display a linebreak early on. 0 00000000 B9 db 0B9h ; mov cx, imm16 (cx = nonzero) 0 00000001 31C9 xor cx, cx ; cx = 0 1573 .have_cx_convenience: 1574 0 00000003 16 push ss 0 00000004 1F pop ds 0 00000005 66 _386_o32 ; mov esp 0 00000006 8B26[800C] 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[800C] _386 mov sp, word [ savesp ] ; restore stack 0 00000018 FC cld 0 00000019 FB sti 0 0000001A C706[860C][0000] mov word [ errret ], cmd3 0 00000020 C706[880C][3E17] mov word [ throwret ], errhandler 0 00000026 8926[8A0C] mov word [ throwsp ], sp 1592 %if _SYMBOLIC 0 0000002A C706[940C][0010] mov word [ stack_low_address ], str_buffer 1594 %endif 0 00000030 31C0 xor ax, ax 1596 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 00000032 A3[6602] mov word [in_getinput], ax ; set this byte and reserved next byte 1598 %endif 0 00000035 8706[C80B] xchg ax, word [cmd3_set_options] 0 00000039 0906[A401] or word [options], ax 1601 0 0000003D 1E push ds 0 0000003E 07 pop es 1604 %if _EXTENSIONS && ! _DUALCODE 1605 push cx 1606 mov cx, duallink_return_table.amount 1607 mov di, duallink_return_table 1608 mov ax, DUALLINK_UNUSED 1609 rep stosw 1610 pop cx 1611 %endif 0 0000003F E302 jcxz @F 0 00000041 EB06 jmp @FF 1614 @@: 0 00000043 BA[0000] mov dx, crlf 0 00000046 E8[0000] call putsz 1617 @@: 1618 1619 %if _SYMBOLIC 0 00000049 8026[E201]FD clropt [internalflags2], dif2_xms_detection_done 0 0000004E E80409EB02[0000] nearcall zz_save_strat 1622 %endif 1623 0 00000055 31FF xor di, di 0 00000057 873E[320E] xchg di, word [terminator_in_line_in.offset] 0 0000005B 85FF test di, di 0 0000005D 7409 jz @F 0 0000005F 803D00 cmp byte [di], 0 0 00000062 7504 jne @F 0 00000064 A0[340E] mov al, byte [terminator_in_line_in.value] 0 00000067 AA stosb 1632 @@: 1633 0 00000068 8326[900C]00 and word [run_sp_reserve], 0 1635 %if !_LOADER 1636 %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER || _EXTENSIONS 0 0000006D D006[1B02] rol byte [in_re], 1 0 00000071 7205 jc @F 0 00000073 8026[DF01]FB clropt [internalflags], tt_while 1640 @@: 1641 %endif 1642 %endif 1643 %if _RH 0 00000078 8026[F201]EF clropt [internalflags6], dif6_rh_mode 0 0000007D C606[1A02]00 mov byte [skip_rh], 0 1646 %endif 1647 %if _IMMASM 0 00000082 8026[F301]FC clropt [internalflags6], dif6_immasm_no_output | dif6_immasm 1649 %endif 0 00000087 8026[E501]DF clropt [internalflags3], dif3_unquiet_error 1651 %if _REGSHIGHLIGHT 0 0000008C 8026[E601]FD clropt [internalflags3], dif3_do_not_highlight 1653 %endif 1654 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00000091 8026[E701]E7 clropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_in_if 1656 %else 1657 clropt [internalflags3], dif3_auxbuff_guarded_1 1658 %endif 0 00000096 8026[E401]CF clropt [internalflags3], dif3_input_serial_override | dif3_input_terminal_override 0 0000009B 8026[E301]EF clropt [internalflags2], dif2_in_silence_dump 1662 %if _PM 1663 %if _DEBUG 0 000000A0 8026[F001]F9 clropt [internalflags6], dif6_in_hook2F | dif6_in_amis_hook2F 1665 %else 1666 clropt [internalflags6], dif6_in_amis_hook2F 1667 %endif 0 000000A5 E8[0000] call resetmode 1669 %endif 1670 1671 %ifn _VXCHG 1672 mov ah, 0Fh 1673 int 10h 1674 mov byte [vpage], bh ; update page 1675 %endif 1676 1677 %if _TEST_HELP_FILE 1678 cmd3_close_handle: 1679 call InDOS 1680 jnz @F 1681 mov ah, 3Eh 1682 mov bx, -1 1683 xchg bx, [handle] 1684 cmp bx, -1 1685 je @F 1686 doscall 1687 @@: 1688 %endif 1689 1690 %if _EXTENSIONS 1691 cmd3_close_ext: 0 000000A8 E8[0000] call close_ext 1693 %endif 1694 1695 %if _RH 1696 cmd3_rh_init: 0 000000AB F606[BA01]10 testopt [options6], opt6_rh_mode 0 000000B0 7419 jz .check_disable 1699 .check_enable: 0 000000B2 F606[F201]08 testopt [internalflags6], dif6_rh_mode_was 0 000000B7 7529 jnz .done 1702 .enable: 1703 ; guarded_1 is always reset by cmd3 1704 ; guarded_2 is only set by RE indicating silent mode 1705 ; so we never want to not enable RH mode 0 000000B9 800E[E701]40 setopt [internalflags3], dif3_auxbuff_guarded_3 0 000000BE 800E[F201]08 setopt [internalflags6], dif6_rh_mode_was 1708 0 000000C3 E8[0000] call tpg_initialise_empty_auxbuff.reset 1710 0 000000C6 BA[0000] mov dx, msg.rh_enabled 0 000000C9 EB14 jmp .done_putsz 1713 1714 .check_disable: 0 000000CB F606[F201]08 testopt [internalflags6], dif6_rh_mode_was 0 000000D0 7410 jz .done 1717 .disable: 0 000000D2 8026[E701]BF clropt [internalflags3], dif3_auxbuff_guarded_3 0 000000D7 8026[F201]F7 clropt [internalflags6], dif6_rh_mode_was 0 000000DC BA[0000] mov dx, msg.rh_disabled 1721 1722 .done_putsz: 0 000000DF E8[0000] call putsz 1724 .done: 1725 %endif 1726 1727 %if _DEBUG && _DEBUG_COND 1728 cmd3_debug_mode_init: 0 000000E2 F606[B901]01 testopt [options6], opt6_debug_mode 0 000000E7 7411 jz .check_disable 1731 .check_enable: 0 000000E9 F606[F101]01 testopt [internalflags6], dif6_debug_mode 0 000000EE 7519 jnz .done 0 000000F0 E8[0000] call reset_interrupts 0 000000F3 800E[F101]01 setopt [internalflags6], dif6_debug_mode 0 000000F8 EB0F jmp .done 1737 1738 .check_disable: 0 000000FA F606[F101]01 testopt [internalflags6], dif6_debug_mode 0 000000FF 7408 jz .done 0 00000101 E8[0000] call set_interrupts 0 00000104 8026[F101]FE clropt [internalflags6], dif6_debug_mode 1743 .done: 1744 %endif 1745 1746 1747 %if _PM 1748 cmd3_int2F_init: 0 00000109 B02F mov al, 2Fh ; interrupt number 0 0000010B BE[0000] mov si, debug2F ; -> IISP entry header 1751 0 0000010E F606[B001]02 testopt [options4], opt4_int_2F_hook 0 00000113 750D jnz .done 1754 .check_disable: 0 00000115 BA0200 mov dx, opt4_int_2F_force >> 16 1756 %if (opt4_int_2F_force >> 16) == dif4_int_2F_hooked 0 00000118 E89E06 call cmd3_int_disable.set_bx_to_dx 1758 %else 1759 mov bx, dif4_int_2F_hooked 1760 call cmd3_int_disable 1761 %endif 0 0000011B 7205 jc .done 0 0000011D 8026[DD01]FE clropt [internalflags], hooked2F 1764 1765 .done: 1766 %endif 1767 1768 1769 %if _CATCHINTFAULTCOND && _CATCHINT0D 1770 cmd3_int0D_init: 0 00000122 B00D mov al, 0Dh ; interrupt number 0 00000124 BE[0000] mov si, intr0D ; -> IISP entry header 0 00000127 BA1000 mov dx, opt4_int_0D_force >> 16 1774 %if (opt4_int_0D_force >> 16) == dif4_int_0D_hooked 0 0000012A 89D3 mov bx, dx 1776 %else 1777 mov bx, dif4_int_0D_hooked 1778 %endif 1779 0 0000012C F606[B001]10 testopt [options4], opt4_int_fault_hook 0 00000131 7405 jz .check_disable 1782 .check_enable: 0 00000133 E87006 call cmd3_int_enable 0 00000136 EB03 jmp .done 1785 1786 .check_disable: 0 00000138 E88006 call cmd3_int_disable 1788 1789 .done: 1790 %endif 1791 1792 1793 %if _CATCHINTFAULTCOND && _CATCHINT0C 1794 cmd3_int0C_init: 0 0000013B B00C mov al, 0Ch ; interrupt number 0 0000013D BE[0000] mov si, intr0C ; -> IISP entry header 0 00000140 BA2000 mov dx, opt4_int_0C_force >> 16 1798 %if (opt4_int_0C_force >> 16) == dif4_int_0C_hooked 0 00000143 89D3 mov bx, dx 1800 %else 1801 mov bx, dif4_int_0C_hooked 1802 %endif 1803 0 00000145 F606[B001]10 testopt [options4], opt4_int_fault_hook 0 0000014A 7405 jz .check_disable 1806 .check_enable: 0 0000014C E85706 call cmd3_int_enable 0 0000014F EB03 jmp .done 1809 1810 .check_disable: 0 00000151 E86706 call cmd3_int_disable 1812 1813 .done: 1814 %endif 1815 1816 1817 %if _CATCHINT08 1818 cmd3_int08_init: 0 00000154 B008 mov al, 08h ; interrupt number 0 00000156 BE[0000] mov si, intr8 ; -> IISP entry header 0 00000159 BA0400 mov dx, opt4_int_08_force >> 16 1822 %if (opt4_int_08_force >> 16) == dif4_int_08_hooked 0 0000015C 89D3 mov bx, dx 1824 %else 1825 mov bx, dif4_int_08_hooked 1826 %endif 1827 0 0000015E F606[B001]04 testopt [options4], opt4_int_08_hook 0 00000163 7405 jz .check_disable 1830 .check_enable: 0 00000165 E83E06 call cmd3_int_enable 0 00000168 EB03 jmp .done 1833 1834 .check_disable: 0 0000016A E84E06 call cmd3_int_disable 1836 1837 .done: 1838 %endif 1839 1840 1841 %if _CATCHINT2D 1842 cmd3_int2D_init: 0 0000016D B02D mov al, 2Dh ; interrupt number 0 0000016F BE[0000] mov si, int2D ; -> IISP entry header 0 00000172 BB0800 mov bx, dif4_int_2D_hooked 0 00000175 BA0800 mov dx, opt4_int_2D_force >> 16 1847 0 00000178 F606[B001]08 testopt [options4], opt4_int_2D_hook 0 0000017D 7447 jz .check_disable 1850 .check_enable: 0 0000017F 851E[E801] test word [internalflags4], bx 0 00000183 7544 jnz .done 1853 0 00000185 E8[0000] call intchk ; ZR if offset = -1 or segment = 0 1855 ; CHG: ax, dx, bx 0 00000188 742F jz .fail 1857 0 0000018A 8A26[0000] mov ah, byte [try_amis_multiplex_number] 0 0000018E B000 mov al, 00h 1860 ; function 0 changes dx, di, cx, al 1861 %if _PM 0 00000190 E8280A call call_int2D 1863 %else 1864 int 2Dh ; enquire whether there's anyone 1865 %endif 0 00000193 84C0 test al, al 0 00000195 7414 jz .got 1868 0 00000197 31C0 xor ax, ax ; start with multiplex number 0 1870 .loopplex: 0 00000199 B000 mov al, 00h ; AMIS installation check 1872 ; function 0 changes dx, di, cx, al 1873 %if _PM 0 0000019B E81D0A call call_int2D 1875 %else 1876 int 2Dh ; enquire whether there's anyone 1877 %endif 0 0000019E 84C0 test al, al ; free ? 0 000001A0 7409 jz .got ; yes, put it to use --> 0 000001A2 FEC4 inc ah 0 000001A4 75F3 jnz .loopplex ; try next multiplexer --> 1882 0 000001A6 BA[0000] mov dx, msg.cannot_hook_2D.nofree 0 000001A9 EB11 jmp .fail_putsz 1885 1886 .got: 0 000001AB 8826[0000] mov byte [amis_multiplex_number], ah 1888 0 000001AF B02D mov al, 2Dh ; interrupt number 0 000001B1 BB0800 mov bx, dif4_int_2D_hooked 0 000001B4 E8F505 call cmd3_int_enable.need 0 000001B7 EB10 jmp .done 1893 1894 .fail: 0 000001B9 BA[0000] mov dx, msg.cannot_hook_2D.invalid 1896 .fail_putsz: 0 000001BC E8[0000] call putsz 0 000001BF 8026[B001]F7 clropt [options4], opt4_int_2D_hook 0 000001C4 EB03 jmp .done 1900 1901 .check_disable: 0 000001C6 E8F205 call cmd3_int_disable 1903 1904 .done: 1905 %endif 1906 1907 0 000001C9 F606[E701]01 testopt [internalflags3], dif3_input_re 0 000001CE 7403E9FA01 jnz cmd3_continue_1_re 0 000001D3 8026[A901]7F clropt [options2], opt2_re_cancel_tpg 1911 %if !_LOADER 0 000001D8 E8[0000] call silence_dump 1913 %endif 1914 1915 1916 cmd3_serial_init: 0 000001DB F606[A501]40 testopt [options], enable_serial 0 000001E0 7503E95701 jz .check_disable_serial 1919 .check_enable_serial: 0 000001E5 F606[0D0E]01 testopt [serial_flags], sf_init_done 0 000001EA 7408 jz .enable_serial 1922 ; If we disabled the actual use flag prior somehow 1923 ; (sf_use_serial clear) but we get here with 1924 ; sf_init_done set then re-enable use of serial I/O. 0 000001EC 800E[0D0E]10 setopt [serial_flags], sf_use_serial 0 000001F1 E98F01 jmp .done_serial 1927 1928 .enable_serial: 1929 0 000001F4 A0[0E0E] mov al, byte [serial_var_intnum] 0 000001F7 A2[DC0C] mov byte [serial_use_intnum], al 0 000001FA A0[0F0E] mov al, byte [serial_var_params] 0 000001FD A2[DD0C] mov byte [serial_use_params], al 0 00000200 A0[100E] mov al, byte [serial_var_fifo] 0 00000203 A2[DE0C] mov byte [serial_use_fifo], al 0 00000206 A1[120E] mov ax, word [serial_var_baseport] 0 00000209 A3[E20C] mov word [serial_use_baseport], ax 0 0000020C A1[140E] mov ax, word [serial_var_dl] 0 0000020F A3[E40C] mov word [serial_use_dl], ax 0 00000212 A1[160E] mov ax, word [serial_var_irqmask] 0 00000215 A3[E60C] mov word [serial_use_irqmask], ax 0 00000218 E8[0000] call serial_clear_fifos 0 0000021B E8[0000] call serial_install_interrupt_handler 0 0000021E 7317 jnc @F 0 00000220 BF[0000] mov di, msg.serial_cannot_hook.old_int 0 00000223 A0[3C0E] mov al, byte [serial_installed_intnum] 0 00000226 E8[0000] call hexbyte 0 00000229 BF[0000] mov di, msg.serial_cannot_hook.new_int 0 0000022C A0[DC0C] mov al, byte [serial_use_intnum] 0 0000022F E8[0000] call hexbyte 0 00000232 BA[0000] mov dx, msg.serial_cannot_hook 0 00000235 EB5C jmp .no_keep 1953 1954 @@: 0 00000237 C606[0800]80 mov byte [serial_interrupt_handler + ieEOI], 80h 0 0000023C E8[0000] call serial_init_UART 1957 0 0000023F 800E[0D0E]11 setopt [serial_flags], sf_init_done | sf_use_serial 1959 0 00000244 BA[0000] mov dx, msg.serial_request_keep 0 00000247 E8[0000] call putsz 1962 0 0000024A BF[C20B] mov di, line_out 1964 %if _DEBUG 1965 %if _DEBUG_COND 0 0000024D F606[F101]01 testopt [internalflags6], dif6_debug_mode 0 00000252 7403 jz @F 1968 %endif 0 00000254 B07E mov al, '~' ; indicate instance is to be debugged 0 00000256 AA stosb 1971 @@: 1972 %endif 0 00000257 B83D20 mov ax, "= " 0 0000025A AB stosw 1975 0 0000025B 31C0 xor ax, ax 0 0000025D A3[240E] mov word [getline_timer_count], ax 0 00000260 06 push es 0 00000261 B84000 mov ax, 40h 0 00000264 8EC0 mov es, ax 0 00000266 26A16C00 mov ax, word [es:6Ch] 0 0000026A A3[260E] mov word [getline_timer_last], ax 0 0000026D 07 pop es 0 0000026E C706[280E][A302] mov word [getline_timer_func], .timer 1985 1986 ; if we're executing from the command line 1987 ; buffer or a Y file then we want to 1988 ; override input to be from serial for the 1989 ; KEEP confirmation prompt. 1990 ; output is always to serial if we're here. 0 00000274 800E[E401]20 setopt [internalflags3], dif3_input_serial_override 0 00000279 E8[0000] call getline00 0 0000027C 8026[E401]DF clropt [internalflags3], dif3_input_serial_override 1994 0 00000281 E8[0000] call skipcomm0 0 00000284 4E dec si 0 00000285 BA[0000] mov dx, msg.keep 0 00000288 E8[0000] call isstring? 0 0000028B 7503E9F300 je .done_serial 2000 0 00000290 BA[0000] mov dx, msg.serial_no_keep_enter 2002 .no_keep: 2003 ; Immediately disable use of serial I/O. 0 00000293 8026[0D0E]EF clropt [serial_flags], sf_use_serial 2005 ; Set the flag for next cmd3 loop to properly disable 2006 ; and de-initialise the serial port. 0 00000298 8026[A501]BF clropt [options], enable_serial 0 0000029D E8[0000] call putsz 0 000002A0 E95DFD jmp cmd3 2010 2011 2012 .timer: 0 000002A3 50 push ax 0 000002A4 52 push dx 0 000002A5 51 push cx 0 000002A6 53 push bx 0 000002A7 06 push es 2018 0 000002A8 BA4000 mov dx, 40h 0 000002AB 8EC2 mov es, dx 2021 0 000002AD B00B mov al, 0Bh ; request In-Service Register (ISR) 0 000002AF E6A0 out 0A0h, al ; from secondary PIC 0 000002B1 E4A0 in al, 0A0h ; read the ISR 0 000002B3 8406[E70C] test al, byte [serial_use_irqmask + 1] 0 000002B7 756B jnz .timer_ours 0 000002B9 B00B mov al, 0Bh ; request In-Service Register (ISR) 0 000002BB E620 out 20h, al ; from primary PIC 0 000002BD E420 in al, 20h ; read the ISR 0 000002BF 24FB and al, ~100b 0 000002C1 8406[E60C] test al, byte [serial_use_irqmask] 0 000002C5 755D jnz .timer_ours 2033 .timer_ours_done: 2034 0 000002C7 8B0E[D20C] mov cx, word [serial_save_irq_mask] 0 000002CB 31DB xor bx, bx ; all bits clear (= IRQ ON) 0 000002CD E8[0000] call set_irq ; enable IRQs and get prior status 0 000002D0 85DB test bx, bx ; IRQs were still enabled ? 0 000002D2 7405 jz @F ; yes, fine --> 0 000002D4 8026[BA01]FE clropt [options6], opt6_share_serial_irq 2041 ; no, make sure not to chain any longer 2042 @@: 0 000002D9 8B0E[240E] mov cx, word [getline_timer_count] 0 000002DD 8B16[260E] mov dx, word [getline_timer_last] 2045 2046 %if _SLEEP_NEW 0 000002E1 26A16C00 mov ax, word [es:6Ch] 0 000002E5 39C2 cmp dx, ax 0 000002E7 7445 je .timer_next 0 000002E9 F7DA neg dx ; minus prior tick 0 000002EB 01C2 add dx, ax ; new tick - prior tick 2052 0 000002ED 3B16[0000] cmp dx, word [sleep_delta_limit] 0 000002F1 7609 jbe @F 0 000002F3 8B16[0000] mov dx, word [sleep_delta_limit] 0 000002F7 85D2 test dx, dx 0 000002F9 7501 jnz @F 0 000002FB 42 inc dx ; limit 0 would lead to stagnant sleep 2059 @@: 0 000002FC 3B16[0000] cmp dx, word [sleep_highest_delta] 0 00000300 7604 jbe @F 0 00000302 8916[0000] mov word [sleep_highest_delta], dx 2063 @@: 0 00000306 01D1 add cx, dx 0 00000308 7303 jnc @F 0 0000030A B9FFFF mov cx, -1 2067 @@: 0 0000030D 89C2 mov dx, ax 2069 %else 2070 cmp dx, word [es:6Ch] 2071 je .timer_next 2072 mov dx, word [es:6Ch] 2073 inc cx 2074 %endif 0 0000030F B012 mov al, 18 0 00000311 F626[0B0E] mul byte [serial_keep_timeout] 0 00000315 85C0 test ax, ax 0 00000317 7415 jz .timer_next 0 00000319 39C1 cmp cx, ax 0 0000031B 7211 jb .timer_next 2081 0 0000031D 07 pop es 0 0000031E BA[0000] mov dx, msg.serial_no_keep_timer 0 00000321 E96FFF jmp .no_keep 2085 2086 .timer_ours: 0 00000324 800E[BA01]02 setopt [options6], opt6_serial_EOI_call 0 00000329 E8[0000] call serial_eoi 0 0000032C EB99 jmp .timer_ours_done 2090 2091 .timer_next: 0 0000032E 890E[240E] mov word [getline_timer_count], cx 0 00000332 8916[260E] mov word [getline_timer_last], dx 0 00000336 07 pop es 0 00000337 5B pop bx 0 00000338 59 pop cx 0 00000339 5A pop dx 0 0000033A 58 pop ax 0 0000033B C3 retn 2100 2101 2102 .check_disable_serial: 2103 ; If serial is initialised, uninstall it. 0 0000033C F606[0D0E]01 testopt [serial_flags], sf_init_done 0 00000341 751D jnz .disable_serial 2106 ; Not initialised. Is the interrupt still hooked? 0 00000343 F606[E801]01 testopt [internalflags4], dif4_int_serial_hooked 0 00000348 7439 jz .done_serial 2109 ; Try unhooking the interrupt handler. 0 0000034A E8[0000] call serial_uninstall_interrupt_handler 0 0000034D 7234 jc .done_serial ; if it failed again --> 0 0000034F BF[0000] mov di, msg.serial_late_unhook.int 0 00000352 A0[3C0E] mov al, byte [serial_installed_intnum] 0 00000355 E8[0000] call hexbyte 0 00000358 BA[0000] mov dx, msg.serial_late_unhook 0 0000035B E8[0000] call putsz 0 0000035E EB23 jmp .done_serial 2118 2119 .disable_serial: 2120 0 00000360 E8[0000] call serial_clean_up 0 00000363 7319 jnc @F 2123 ; Immediately disable use of serial I/O, 2124 ; so that our error message goes to the 2125 ; local terminal rather than to serial I/O. 0 00000365 8026[0D0E]EF clropt [serial_flags], sf_use_serial 0 0000036A BF[0000] mov di, msg.serial_cannot_unhook.int 0 0000036D A0[3C0E] mov al, byte [serial_installed_intnum] 0 00000370 E8[0000] call hexbyte 0 00000373 BA[0000] mov dx, msg.serial_cannot_unhook 0 00000376 E8[0000] call putsz 0 00000379 C606[0800]00 mov byte [serial_interrupt_handler + ieEOI], 0 2133 ; we do not issue EOI any longer 2134 @@: 0 0000037E 8026[0D0E]EE clropt [serial_flags], sf_init_done | sf_use_serial 2136 .done_serial: 2137 2138 2139 %if _VXCHG 2140 cmd3_vv_set: 0 00000383 E8[0000] call vv_set 2142 %endif 2143 2144 2145 %if _PM 2146 cmd3_ss_init: 0 00000386 E89706 call ispm 0 00000389 752F jnz .done 2149 2150 subcpu 286 0 0000038B 8CD3 mov bx, ss 0 0000038D 0F02CB lar cx, bx 0 00000390 7528 jnz .done 0 00000392 C1E908 shr cx, 8 2155 0 00000395 F606[AE01]10 testopt [options3], opt3_ss_b_bit_set 0 0000039A 740B jz .check_clear 2158 .check_set: 0 0000039C F606[E601]10 testopt [internalflags3], dif3_ss_b_bit_set 0 000003A1 7517 jnz .done 2161 0 000003A3 B540 mov ch, 40h 0 000003A5 EB07 jmp @F 2164 2165 .check_clear: 0 000003A7 F606[E601]10 testopt [internalflags3], dif3_ss_b_bit_set 0 000003AC 740C jz .done 2168 2169 @@: 0 000003AE B80900 mov ax, 0009h 0 000003B1 CD31 int 31h 0 000003B3 7205 jc .done 2173 0 000003B5 8036[E601]10 xoropt [internalflags3], dif3_ss_b_bit_set 2175 subcpureset 2176 2177 .done: 2178 %endif 2179 2180 2181 %if _IMMASM 0 000003BA FF16[0000] call near [ ia_restore ] 2183 %endif 2184 0 000003BE F606[BD01]10 testopt [options7], opt7_no_ensure 0 000003C3 7508 jnz .skip 2187 2188 %if _PM 0 000003C5 E85806 call ispm 0 000003C8 7403 jz @F 2191 %endif 2192 %if !_LOADER 0 000003CA E8F716 call ensuredebuggeeloaded ; if no task is active, create a dummy one 2194 %endif 2195 %if _PM && 0 2196 jmp @FF 2197 @@: 2198 testopt [internalflags], attachedterm 2199 jz @F 2200 mov dx, .message 2201 call putsz 2202 2203 usesection lDEBUG_DATA_ENTRY 2204 .message: ascizline "Attached term is set in PM!" 2205 usesection lDEBUG_CODE 2206 %endif 2207 @@: 2208 .skip: 2209 2210 2211 cmd3_continue_1_re: 0 000003CD C606[0000]00 mov byte [hhflag], 0 0 000003D2 8326[0000]00 and word [hh_depth], 0 0 000003D7 8326[0000]00 and word [hh_depth_of_single_term], 0 0 000003DC C706[280E][5206] mov word [getline_timer_func], dmycmd 0 000003E2 8026[DE01]FE clropt [internalflags], usecharcounter ; reset this automatically 2217 0 000003E7 F606[E701]01 testopt [internalflags3], dif3_input_re 0 000003EC 7515 jnz cmd3_continue_2_re 2220 0 000003EE 800E[DC01]08 setopt [internalflags], pagedcommand ; 2009-02-21: default to page all commands 0 000003F3 8026[DF01]CF clropt [internalflags], tt_silence | tt_silent_mode 2223 ; reset, in case it's still set 0 000003F8 8126[E001]3FF7 clropt [internalflags2], dif2_tpg_proceed_bp_set | dif2_bp_failure | dif2_tpg_keep_proceed_bp, 1 2226 %if _INPUT_FILE_HANDLES 0 000003FE 8026[E201]DF clropt [internalflags2], dif2_closed_input_file 2228 %endif 2229 2230 cmd3_continue_2_re: 0 00000403 E8CF03 call determine_quiet_output 2232 0 00000406 31C9 xor cx, cx 0 00000408 870E[100D] xchg cx, word [rc] ; reset rc 0 0000040C 890E[120D] mov word [priorrc], cx ; make prior value available 0 00000410 E304 jcxz @F 0 00000412 890E[140D] mov word [erc], cx ; update to last non-zero value 2238 @@: 2239 2240 %if !_LOADER 2241 cmd3_check_relimit: 0 00000416 F606[E701]01 testopt [internalflags3], dif3_input_re 0 0000041B 7425 jz cmd3_continue_not_re 2244 0 0000041D 8306[B80B]01 add word [re_count], 1 0 00000422 8316[BA0B]00 adc word [re_count + 2], 0 0 00000427 8B16[BE0B] mov dx, word [re_limit + 2] 0 0000042B A1[BC0B] mov ax, word [re_limit] 0 0000042E 3916[BA0B] cmp word [re_count + 2], dx 0 00000432 7504 jne @F 0 00000434 3906[B80B] cmp word [re_count], ax 2252 @@: 2253 ; This branch bypasses cmd3_check_rclimit 2254 ; because RE buffer commands should not 2255 ; count towards the RC limit. 0 00000438 765C jbe cmd3_continue_relimit_not_reached 2257 0 0000043A BA[0000] mov dx, msg.re_limit_reached 0 0000043D B84301 mov ax, 0143h 0 00000440 EB3D jmp cmd3_check_common 2261 2262 cmd3_continue_not_re: 2263 %endif 2264 2265 cmd3_check_rclimit: 2266 2267 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 2268 ; If executing from a script file then 2269 ; command doesn't count for RC limit. 2270 %if _INPUT_FILE_BOOT 0 00000442 F606[E301]02 testopt [internalflags2], dif2_input_file_boot 0 00000447 754D jnz .file 2273 %endif 2274 %if _INPUT_FILE_HANDLES 0 00000449 E8D714 call InDOS 0 0000044C 7507 jnz .file_not 0 0000044E F606[E201]10 testopt [internalflags2], dif2_input_file 0 00000453 7541 jnz .file 2279 %endif 2280 .file_not: 2281 2282 .file: equ cmd3_continue_rclimit_not_reached 2283 %endif 2284 0 00000455 F606[E501]01 testopt [internalflags3], dif3_input_cmdline 0 0000045A 743A jz cmd3_continue_not_rc 2287 0 0000045C 8306[C00B]01 add word [rc_count], 1 0 00000461 8316[C20B]00 adc word [rc_count + 2], 0 0 00000466 8B16[C60B] mov dx, word [rc_limit + 2] 0 0000046A A1[C40B] mov ax, word [rc_limit] 0 0000046D 3916[C20B] cmp word [rc_count + 2], dx 0 00000471 7504 jne @F 0 00000473 3906[C00B] cmp word [rc_count], ax 2295 @@: 0 00000477 761D jbe cmd3_continue_rclimit_not_reached 2297 0 00000479 BA[0000] mov dx, msg.rc_limit_reached 0 0000047C B84401 mov ax, 0144h 2300 cmd3_check_common: 0 0000047F E8[0000] call putsz_error 0 00000482 E8E112 call setrc 0 00000485 800E[E501]04 setopt [internalflags3], dif3_at_line_end 0 0000048A A1[100D] mov ax, word [rc] 0 0000048D A3[120D] mov word [priorrc], ax 0 00000490 E8[0000] call getline_close_file 0 00000493 E96AFB jmp cmd3 2308 2309 cmd3_continue_not_rc: 2310 cmd3_continue_rclimit_not_reached: 2311 cmd3_continue_relimit_not_reached: 2312 2313 cmd3_check_line_out_overflow: 0 00000496 813E[CA0C]4226 cmp word [line_out_overflow], 2642h 0 0000049C 740C je @F 0 0000049E C706[CA0C]4226 mov word [line_out_overflow], 2642h 0 000004A4 BA[0000] mov dx, msg.line_out_overflow 0 000004A7 E8[0000] call putsz_error 2319 @@: 2320 2321 cmd3_getline_repeat: 0 000004AA 8B26[800C] mov sp, word [ savesp ] ; restore stack 2323 0 000004AE BF[C20B] mov di, line_out ; build prompt 2325 %if _DEBUG 2326 %if _DEBUG_COND 0 000004B1 F606[F101]01 testopt [internalflags6], dif6_debug_mode 0 000004B6 7403 jz @F 2329 %endif 0 000004B8 B07E mov al, '~' ; indicate instance is to be debugged 0 000004BA AA stosb 2332 @@: 2333 %endif 2334 %if !_LOADER 2335 %if _INDOS_PROMPT 0 000004BB E86514 call InDOS 0 000004BE 740F jz @F 2338 %if _BOOTLDR 0 000004C0 F606[DD01]40 testopt [internalflags], nodosloaded 2340 ; boot mode ? 2341 %if _INDOS_PROMPT_NOBOOT 0 000004C5 7508 jnz @F ; yes, do not show special prompt --> 2343 %elif _INDOS_PROMPT_NOFLAG 2344 jnz .indos_prompt ; yes, show special prompt --> 2345 ; (do not call .real_indos check) 2346 %endif 2347 %endif 2348 %if _INDOS_PROMPT_NOFLAG 2349 %if _APPLICATION || _DEVICE 2350 ; Never branches to here if bootloaded, 2351 ; so no need to handle only bootloaded. 0 000004C7 E86714 call InDOS.real_indos ; real InDOS set ? 0 000004CA 7403 jz @F ; no, do not show special prompt --> 2354 %endif 2355 %endif 2356 .indos_prompt: 0 000004CC B021 mov al, '!' 0 000004CE AA stosb 2359 @@: 2360 %endif 2361 %endif 2362 %if !_LOADER 0 000004CF B02D mov al, '-' ; main prompt 2364 %else 2365 mov al, '*' 2366 %endif 2367 %if _PM 0 000004D1 E84C05 call ispm 0 000004D4 7502 jnz .realmode 0 000004D6 B023 mov al, '#' ; PM main prompt 2371 .realmode: 2372 %endif 0 000004D8 F606[E501]01 testopt [internalflags3], dif3_input_cmdline 0 000004DD 7402 jz @F 0 000004DF B026 mov al, '&' 2376 @@: 0 000004E1 F606[E701]01 testopt [internalflags3], dif3_input_re 0 000004E6 7402 jz @F 0 000004E8 B025 mov al, '%' 2380 @@: 0 000004EA AA stosb 2382 2383 %if _EXTENSIONS 0 000004EB 31C9 xor cx, cx 0 000004ED 870E[5402] xchg cx, word [ext_inject_handler] 0 000004F1 E303 jcxz cmd3_not_inject 0 000004F3 E9[0000] jmp transfer_ext_cx 2388 2389 cmd3_not_inject: section_of_function 0 000004F6 8B26[800C] mov sp, word [ savesp ] ; restore stack 0 000004FA E8[0000] call getline00 ; prompted input, also resets linecounter 2392 %if _COMLEVELS 2393 cmd3_getline_return_address: 0 000004FD 72AB jc cmd3_getline_repeat 2395 %endif 2396 cmd3_injected: section_of_function 0 000004FF 8B26[800C] mov sp, word [ savesp ] ; restore stack 2398 2399 0 00000503 8B0E[5202] mov cx, word [ext_preprocess_handler] 0 00000507 E303 jcxz cmd3_preprocessed 0 00000509 E9[0000] jmp transfer_ext_cx 2403 2404 cmd3_preprocessed: section_of_function 0 0000050C 16 push ss 0 0000050D 1F pop ds 0 0000050E 16 push ss 0 0000050F 07 pop es 0 00000510 8B26[800C] mov sp, word [ savesp ] ; restore stack 2410 2411 0 00000514 8B0E[5002] mov cx, word [ext_command_handler] 0 00000518 E303 jcxz cmd3_not_ext 0 0000051A E9[0000] jmp transfer_ext_cx 2415 2416 cmd3_not_ext: section_of_function 0 0000051D 16 push ss 0 0000051E 1F pop ds 0 0000051F 16 push ss 0 00000520 07 pop es 0 00000521 8B26[800C] mov sp, word [ savesp ] ; restore stack 0 00000525 4E dec si 0 00000526 AC lodsb 2424 %else 2425 call getline00 ; prompted input, also resets linecounter 2426 cmd3_injected: section_of_function 2427 %endif 2428 0 00000527 E8[0000] call iseol?.notsemicolon 0 0000052A 7518 jne cmd3_notblank 0 0000052C F606[AF01]10 testopt [options3], opt3_disable_autorepeat 0 00000531 7508 jnz @F 0 00000533 8B16[F60D] mov dx, word [lastcmd] 0 00000537 8804 mov byte [si], al 0 00000539 EB56 jmp short cmd4 2436 2437 @@: 0 0000053B C706[F60D][5206] mov word [lastcmd], dmycmd 0 00000541 E9BCFA jmp cmd3 2440 2441 cmd3_notblank: 2442 %if _SYMBOLIC 0 00000544 8026[E601]FB clropt [internalflags3], dif3_nosymbols_1 2444 %endif 0 00000549 C706[F60D][5206] mov word [lastcmd], dmycmd 0 0000054F 3C3B cmp al, ';' 0 00000551 7445 je cmd3_j1 ; if comment --> 0 00000553 3C3A cmp al, ':' 0 00000555 7441 je cmd3_j1 ; if jump label --> 0 00000557 3C3F cmp al, '?' 0 00000559 7503E90D01 je help ; if request for help --> 0 0000055E 3C2E cmp al, '.' 0 00000560 7503E9[0000] je immasm ; if assembling/immediate execution --> 0 00000565 3C2D cmp al, '-' 0 00000567 7508 jne @F ; if not no symbol prefix --> 2456 %if _SYMBOLIC 0 00000569 800E[E601]04 setopt [internalflags3], dif3_nosymbols_1 2458 %endif 0 0000056E E8[0000] call skipwhite ; skip to next command letter 2460 ; Empty line (autorepeat) not valid. 2461 ; Comment not valid. Goto label not valid. 2462 ; Help request not valid. 2463 @@: 0 00000571 E8[0000] call capitalise 0 00000574 2C41 sub al, 'A' 2466 %if _SYMBOLIC 0 00000576 3C19 cmp al, 'Z' - 'A' 0 00000578 7603E99311 ja error ; if not recognised --> 0 0000057D 7407 je @F ; if Z, do not commit --> 0 0000057F E8D303EB02[0000] nearcall zz_commit_insert ; if not Z, commit now 2471 @@: 2472 %else 2473 cmp al, 'Y' - 'A' 2474 ja error ; if not recognised --> 2475 %endif 0 00000586 98 cbw 0 00000587 93 xchg bx, ax 0 00000588 E8[0000] call skipcomma 0 0000058B D1E3 shl bx, 1 0 0000058D 8B97[6E01] mov dx, word [ cmdlist+bx ] 2481 cmd4: 0 00000591 BF[C20B] mov di, line_out 2483 %if _DEBUG || _LOADER 0 00000594 A8 db __TEST_IMM8 ; (skip int3) 2485 .int3: 0 00000595 CC int3 ; used by BU command 2487 %endif 0 00000596 FFD2 call dx 2489 cmd3_j1: 0 00000598 E965FA jmp cmd3 ; back to the top 2491 2492 2493 %if !_LOADER 2494 code_insure_low_byte_not_0CCh 2495 cmd2_reset_re_maybe_pm: 2496 0 0000059B 66 _386_o32 ; mov esp 0 0000059C 8B26[800C] mov sp, word [ savesp ] ; restore stack 0 000005A0 83E4FC _386 and sp, ~3 ; align stack 0 000005A3 66 _386_o32 0 000005A4 31C0 xor ax, ax 0 000005A6 66 _386_o32 0 000005A7 50 push ax 0 000005A8 66 _386_o32 0 000005A9 9D popf 0 000005AA 8B26[800C] _386 mov sp, word [ savesp ] ; restore stack 0 000005AE FC cld 0 000005AF FB sti 2509 2510 %if _PM 0 000005B0 E8[0000] call handle_mode_changed 2512 %endif 2513 %endif 2514 2515 code_insure_low_byte_not_0CCh 2516 cmd2_reset_re: 0 000005B3 8B1E[200E] mov bx, word [io_levels] 2518 .entry_bx_levels: 0 000005B7 31C9 xor cx, cx 2520 .entry_bx_levels_cx_cmdline: 0 000005B9 31D2 xor dx, dx 2522 %if _INPUT_FILE_HANDLES 0 000005BB F606[E201]10 testopt [internalflags2], dif2_input_file 0 000005C0 7405 jz @F 0 000005C2 030E[680C] add cx, word [input_file_handles.active] 0 000005C6 41 inc cx 2527 @@: 2528 %endif 2529 %if _INPUT_FILE_BOOT 0 000005C7 F606[E301]02 testopt [internalflags2], dif2_input_file_boot 0 000005CC 7405 jz @F 0 000005CE 030E[0000] add cx, word [load_input_file.active] 0 000005D2 41 inc cx 2534 @@: 2535 %endif 2536 %if !_LOADER 0 000005D3 F606[E701]01 testopt [internalflags3], dif3_input_re 0 000005D8 740C jz @F 0 000005DA 41 inc cx 0 000005DB F606[220E]01 testopt [io_flags], iof_extra_iol_for_tpg_re 0 000005E0 7404 jz @F 0 000005E2 43 inc bx 0 000005E3 7501 jnz @F 0 000005E5 4B dec bx 2545 @@: 2546 %endif 0 000005E6 F606[E501]01 testopt [internalflags3], dif3_input_cmdline 0 000005EB 740C jz @F 0 000005ED 41 inc cx 0 000005EE F606[220E]02 testopt [io_flags], iof_extra_iol_for_rc 0 000005F3 7404 jz @F 0 000005F5 43 inc bx 0 000005F6 7501 jnz @F 0 000005F8 4B dec bx 2555 @@: 2556 %if _EXTENSIONS && _COMLEVELS 0 000005F9 51 push cx 0 000005FA 53 push bx 0 000005FB BB0090 mov bx, COMLEVEL_COUNT_ALIASES 0 000005FE 31C0 xor ax, ax 0 00000600 8B0E[6402] mov cx, [ext_comlevels_handler] 0 00000604 E303 jcxz @F 2563 ; INP: ax = debugger initially sets it to 0, 2564 ; may be nonzero when passed to a downlink 2565 ; bx = function, COMLEVEL_COUNT_ALIASES 2566 ; cx destroyed 2567 ; OUT: cx don't care 2568 ; ax incremented to indicate how many non-stopped 2569 ; non-ACT_END multi-alias instances are resident 2570 ; jump to downlink or extcall near_transfer_ext_return 0 00000606 E8[0000] call transfer_ext_cx_NC_push_ax 2572 @@: 0 00000609 5B pop bx 0 0000060A 59 pop cx 0 0000060B 01C1 add cx, ax 0 0000060D 7303 jnc @F 0 0000060F B9FFFF mov cx, -1 2578 @@: 2579 %endif 0 00000612 39D9 cmp cx, bx 0 00000614 7602 jbe @F 0 00000616 89D9 mov cx, bx 2583 @@: 0 00000618 E335 jcxz cmd3_j1b ; IOL zero or nothing active --> 0 0000061A 1E push ds 0 0000061B 07 pop es 0 0000061C 31D2 xor dx, dx 2588 .loop: 0 0000061E 51 push cx 0 0000061F 52 push dx 2591 %if _EXTENSIONS && _COMLEVELS 2592 .loop_more_aliases: 0 00000620 BB0190 mov bx, COMLEVEL_CONTROLC_ALIASES 0 00000623 31C0 xor ax, ax ; signals a nonstopped alias was popped 0 00000625 31D2 xor dx, dx ; count of stopped aliases popped 0 00000627 8B0E[6402] mov cx, [ext_comlevels_handler] 0 0000062B E303 jcxz @F 2598 ; INP: ax = 0 2599 ; dx = debugger initially sets it to 0, 2600 ; may be nonzero when passed to a downlink 2601 ; bx = function, COMLEVEL_CONTROLC_ALIASES 2602 ; cx destroyed 2603 ; OUT: cx don't care 2604 ; ax = 1 and immediately return to debugger, do not 2605 ; pass to downlink, if a non-stopped multi-alias 2606 ; instance was popped by this call 2607 ; dx incremented to indicate how many stopped or 2608 ; ACT_END pointing multi-alias instances were 2609 ; popped by this call (do not count for IOL) 2610 ; REM: This call's handler should reenter the comlevels 2611 ; handler chain with bx equal to either 2612 ; COMLEVEL_EXIT_ALIAS_CONTROLC (non-stopped) or 2613 ; COMLEVEL_EXIT_ALIAS_CONTROLC_END (-> ACT_END) or 2614 ; COMLEVEL_EXIT_ALIAS_CONTROLC_STOP (stopped) 2615 ; to call out to other handlers when popping any 2616 ; runnable (non-inhibited) multi-alias instances. 2617 ; As usual, ax passes the alias.eld instance then. 2618 ; Any number of stopped instances may be popped by 2619 ; this call, but only a single non-stopped instance 2620 ; may be popped. If the return to the debugger has 2621 ; ax = 0 and dx != 0, the caller will loop back to 2622 ; calling this function expecting that a different 2623 ; alias.eld instance may pop more instances. 2624 ; If ax != 0 is returned, the caller counts this as 2625 ; an I/O level that has been cancelled. 2626 ; jump to downlink or extcall near_transfer_ext_return 0 0000062D E8[0000] call transfer_ext_cx_NC_push_ax 2628 @@: 0 00000630 31DB xor bx, bx 0 00000632 85C0 test ax, ax ; did we pop a nonstopped alias ? 0 00000634 7507 jnz .next ; yes --> 0 00000636 85D2 test dx, dx ; did we pop a stopped alias ? 0 00000638 75E6 jnz .loop_more_aliases ; yes --> 2634 %endif 0 0000063A E8[0000] call getline_close_file.resetstuff 2636 .next: 0 0000063D 5A pop dx 0 0000063E 09DA or dx, bx 0 00000640 59 pop cx 0 00000641 E2DB loop .loop 2641 %if !_LOADER 0 00000643 85D2 test dx, dx ; one of cancelled was RE ? 0 00000645 7908 jns cmd3_j1b ; no, just proceed now --> 0 00000647 800E[A901]80 setopt [options2], opt2_re_cancel_tpg 2645 ; set to cancel command 0 0000064C E9[0000] jmp dumpregs_extended.exit ; clean up RE state 2647 %endif 2648 2649 cmd3_j1b: 0 0000064F E946FF jmp cmd3_j1 2651 2652 dmycmd: 0 00000652 C3 retn 2654 2655 %if _EXTENSIONS 2656 lastcmd_transfer_ext_entry: 2657 %if _LINK 0 00000653 B9[0000] mov cx, eld_linkcall.call_cmd3 2659 wlcalc word_minusext_eld_linkcall, equ $ - 2 2660 %else 2661 mov cx, eld_linkcall.call_cmd3 - eld_linkcall 2662 %endif 0 00000656 51 push cx 0 00000657 8B0E[F80D] mov cx, word [lastcmd_transfer_ext_address] 0 0000065B E9[0000] jmp transfer_ext_cx 2666 2667 near_transfer_ext_entry: 0 0000065E 51 push cx 0 0000065F 8B0E[FA0D] mov cx, word [near_transfer_ext_address] 0 00000663 E9[0000] jmp transfer_ext_cx 2671 ; INP: cx = entrypoint ip 2672 ; ss:sp -> original cx value, near return address 2673 2674 ; INP: ss:sp -> three words to discard, cx, near return 2675 near_transfer_ext_return: section_of_function 0 00000666 59 pop cx ; discard near return address 0 00000667 59 pop cx 0 00000668 59 pop cx ; discard far return address 0 00000669 59 pop cx ; restore cx 0 0000066A C3 retn ; return 2681 %endif 2682 2683 help: 0 0000066B E8[0000] call skipcomma 0 0000066E E8[0000] call capitalise 2686 %if _EXTHELP 2687 %if _COND 0 00000671 BA[0000] mov dx, msg.condhelp 0 00000674 3C43 cmp al, 'C' 0 00000676 7503E99200 je .spec 2691 %endif 2692 %if _OPTIONS 0 0000067B 3C4F cmp al, 'O' 0 0000067D 7503E9AC00 je .options ; option help --> 2695 %endif 2696 %if _EXPRESSIONS 0 00000682 BA[0000] mov dx, msg.expressionhelp 0 00000685 3C45 cmp al, 'E' 0 00000687 7503E98100 je .spec 2700 %endif 2701 %endif 2702 %if _EMS 2703 mov dx, msg.xhelp 2704 cmp al, 'X' 2705 je .spec 2706 %endif 0 0000068C 4E dec si 2708 %if _BOOTLDR && _EXTHELPBOOT 0 0000068D BA[0000] mov dx, msg.boot 0 00000690 E8[0000] call isstring? 0 00000693 BA[0000] mov dx, msg.boothelp 2712 %if _LINK || _LINK_COMPAT 2713 patch_boothelp_uncompressed: equ $ - 2 2714 %endif 0 00000696 7475 je .spec 2716 %endif 2717 %if _PM 0 00000698 BA[0000] mov dx, msg.desc 0 0000069B E8[0000] call isstring? 0 0000069E BA[0000] mov dx, msg.deschelp 0 000006A1 746A je .spec 2722 %endif 2723 %if _EXTHELP 0 000006A3 BA[0000] mov dx, msg.source 0 000006A6 E8[0000] call isstring? 0 000006A9 BA[0000] mov dx, msg.help_source 0 000006AC 745F je .spec 2728 %endif 2729 %if !_LOADER 0 000006AE BA[0000] mov dx, msg.re 0 000006B1 E8[0000] call isstring? 0 000006B4 BA[0000] mov dx, msg.help_re 0 000006B7 7454 je .spec 0 000006B9 BA[0000] mov dx, msg.run 0 000006BC E8[0000] call isstring? 0 000006BF BA[0000] mov dx, msg.help_run 0 000006C2 7449 je .spec 2738 %endif 0 000006C4 BA[0000] mov dx, msg.string_version 0 000006C7 E8[0000] call isstring? 0 000006CA BB[0000] mov bx, msg.build_array 0 000006CD B9[0000] mov cx, msg.build_version_amount 0 000006D0 744D je .spec_multi 0 000006D2 BA[0000] mov dx, msg.string_build 0 000006D5 E8[0000] call isstring? 2746 %if _LINK_COMPAT 0 000006D8 B9[0000] mov cx, msg.build_short_amount 2748 %else 2749 mov cl, msg.build_short_amount 2750 %endif 0 000006DB 7442 je .spec_multi 0 000006DD AC lodsb 0 000006DE E8[0000] call capitalise 2754 %if _LINK_COMPAT 0 000006E1 B9[0000] mov cx, msg.build_long_amount 2756 %else 2757 mov cl, msg.build_long_amount 2758 %endif 0 000006E4 3C42 cmp al, 'B' 0 000006E6 7437 je .spec_multi ; build info --> 2761 %if _EXTHELP 0 000006E8 BA[0000] mov dx, msg.license 0 000006EB 3C4C cmp al, 'L' 0 000006ED 741E je .spec ; licence --> 0 000006EF BA[0000] mov dx, msg.flaghelp 0 000006F2 3C46 cmp al, 'F' 0 000006F4 7417 je .spec ; flag help --> 0 000006F6 BA[0000] mov dx, msg.reghelp 0 000006F9 3C52 cmp al, 'R' 0 000006FB 7410 je .spec ; register help --> 2771 %if _VARIABLES || _OPTIONS || _PSPVARIABLES 0 000006FD BA[0000] mov dx, msg.varhelp 0 00000700 3C56 cmp al, 'V' 0 00000702 7409 je .spec ; variable help --> 2775 %endif 2776 %endif 0 00000704 BB[0000] mov bx, msg.help_array ; default help 2778 %if _LINK_COMPAT 0 00000707 B9[0000] mov cx, msg.help_array_amount 2780 %else 2781 mov cl, msg.help_array_amount 2782 %endif 0 0000070A 4E dec si 0 0000070B EB12 jmp .spec_multi 2785 2786 .spec: 0 0000070D AC lodsb 0 0000070E E8[0000] call chkeol 2789 %if _MESSAGESEGMENT || _HELP_COMPRESSED 0 00000711 E8[0000] call putsz_exthelp 0 00000714 EB03 jmp cmd3_j1a 2792 %endif 2793 2794 prnquit: 0 00000716 E8[0000] call putsz ; print string 2796 cmd3_j1a: 0 00000719 E933FF jmp cmd3_j1b ; done 2798 0 0000071C E9F10F errorj1:jmp error 2800 2801 help.spec_multi: 0 0000071F AC lodsb 0 00000720 E8[0000] call chkeol 2804 .loop: 0 00000723 8B17 mov dx, word [bx] 0 00000725 E8[0000] call putsz_exthelp 0 00000728 43 inc bx 0 00000729 43 inc bx 0 0000072A E2F7 loop .loop 0 0000072C EBEB jmp short cmd3_j1a 2811 2812 %if _EXTHELP && _OPTIONS 2813 help.options: 0 0000072E 89F3 mov bx, si 0 00000730 E8[0000] call skipwhite 0 00000733 E8[0000] call iseol? 0 00000736 7443 je .all 0 00000738 E8[0000] call capitalise 0 0000073B 3C41 cmp al, 'A' 0 0000073D BA[0000] mov dx, msg.asmoptions_1 0 00000740 7427 je .single 0 00000742 3C49 cmp al, 'I' 0 00000744 BA[0000] mov dx, msg.flags_1 0 00000747 7420 je .single 0 00000749 BF[0000] mov di, msg.options_scan 0 0000074C B9[0000] mov cx, msg.options_scan_amount 0 0000074F F2AE repne scasb 0 00000751 7518 jne .pages 0 00000753 81EF[0100] sub di, msg.options_scan + 1 0 00000757 D1E7 shl di, 1 0 00000759 8BBD[0000] mov di, word [msg.options_array + di] 0 0000075D 89FA mov dx, di 2833 %if _MESSAGESEGMENT 0 0000075F 1E push ds 2835 %if _PM 0 00000760 E8[0000] call get_messagesegsel 2837 %else 2838 mov ds, word [ss:messageseg] 2839 %endif 2840 %if _HELP_COMPRESSED 0 00000763 833D05 cmp word [di], 2 + !!_LZEXEDAT * 3 2842 %else 2843 cmp byte [di], 0 2844 %endif 0 00000766 1F pop ds 2846 %else 2847 %if _HELP_COMPRESSED 2848 cmp word [di], 2 + !!_LZEXEDAT * 3 2849 %else 2850 cmp byte [di], 0 2851 %endif 2852 %endif 0 00000767 74B3 je errorj1 2854 .single: 0 00000769 EBA2 jmp help.spec 2856 2857 .pages: 0 0000076B 8D77FF lea si, [bx - 1] 0 0000076E BA[0000] mov dx, msg.string_options 0 00000771 E8[0000] call isstring? 0 00000774 75A6 jne errorj1 0 00000776 BA[0000] mov dx, msg.options_pages 0 00000779 EBEE jmp .single 2864 2865 .all: 0 0000077B BB[0000] mov bx, msg.options_array 0 0000077E B9[0000] mov cx, msg.options_array_amount 2868 .loop: 0 00000781 8B3F mov di, word [bx] 0 00000783 8B17 mov dx, word [bx] 0 00000785 E8[0000] call putsz_exthelp 0 00000788 43 inc bx 0 00000789 43 inc bx 2874 %if _MESSAGESEGMENT 0 0000078A 1E push ds 2876 %if _PM 0 0000078B E8[0000] call get_messagesegsel 2878 %else 2879 mov ds, word [ss:messageseg] 2880 %endif 2881 %if _HELP_COMPRESSED 0 0000078E 833D05 cmp word [di], 2 + !!_LZEXEDAT * 3 2883 %else 2884 cmp byte [di], 0 2885 %endif 0 00000791 1F pop ds 2887 %else 2888 %if _HELP_COMPRESSED 2889 cmp word [di], 2 + !!_LZEXEDAT * 3 2890 %else 2891 cmp byte [di], 0 2892 %endif 2893 %endif 0 00000792 740B je @F 0 00000794 83F901 cmp cx, 1 0 00000797 7406 je @F 0 00000799 BA[0000] mov dx, crlf 0 0000079C E8[0000] call putsz 2899 @@: 0 0000079F E2E0 loop .loop 0 000007A1 E95CF8 jmp cmd3 2902 %endif 2903 2904 2905 %if (_CATCHINTFAULTCOND && _CATCHINT0D) || (_CATCHINTFAULTCOND && _CATCHINT0C) || _CATCHINT2D || _CATCHINT08 || _LOADER 2908 ; INP: ds:si -> IISP entry header 2909 ; al = interrupt number 2910 ; bx = interrupt hooked status flag (dif4 low word) 2911 ; OUT: - 2912 ; CHG: ax, bx, cx, dx, di, si 2913 cmd3_int_enable.set_bx_to_dx: 0 000007A4 89D3 mov bx, dx 2915 2916 cmd3_int_enable: 0 000007A6 851E[E801] test word [internalflags4], bx 0 000007AA 750C jnz .ret 2919 2920 .need: 0 000007AC 53 push bx 0 000007AD E8[0000] call install_86m_interrupt_handler 0 000007B0 5B pop bx 0 000007B1 091E[E801] or word [internalflags4], bx 0 000007B5 E8[0000] call update_inttab_optional 2926 .ret: 0 000007B8 C3 retn 2928 %endif 2929 2930 2931 %if (_CATCHINTFAULTCOND && _CATCHINT0D) || (_CATCHINTFAULTCOND && _CATCHINT0C) || _CATCHINT2D || _CATCHINT08 || _PM || _LOADER 2934 ; INP: ds:si -> IISP entry header 2935 ; al = interrupt number 2936 ; dx = interrupt unhook force flag (dif4 high word) 2937 ; bx = interrupt hooked status flag (dif4 low word) 2938 ; OUT: NC if successfully unhooked 2939 ; dif4 low word cleared 2940 ; CY if already unhooked or failed to unhook, 2941 ; ZR if already unhooked 2942 ; (dif4 low word is clear) 2943 ; NZ if failed to unhook 2944 ; (dif4 low word is still set) 2945 ; CHG: ax, bx, di, si 2946 cmd3_int_disable.set_bx_to_dx: 0 000007B9 89D3 mov bx, dx 2948 2949 cmd3_int_disable: 0 000007BB 851E[E801] test word [internalflags4], bx 0 000007BF 7412 jz .ret_CY ; --> (ZR) 2952 0 000007C1 E8[0000] call UnhookInterruptForce 0 000007C4 720B jc .ret_CY_NZ 2955 0 000007C6 F7D3 not bx 0 000007C8 211E[E801] and word [internalflags4], bx 0 000007CC E8[0000] call update_inttab_optional 0 000007CF F8 clc ; (NC) 0 000007D0 C3 retn 2961 2962 .ret_CY_NZ: 0 000007D1 85E4 test sp, sp ; (NZ) 2964 .ret_CY: 0 000007D3 F9 stc ; (CY) 0 000007D4 C3 retn 2967 %endif 2968 2969 2970 determine_quiet_output: 0 000007D5 8026[E501]EF clropt [internalflags3], dif3_quiet_output 2972 0 000007DA 57 push di 0 000007DB 50 push ax 0 000007DC F606[E701]01 testopt [internalflags3], dif3_input_re 0 000007E1 7549 jnz .notquiet 2977 2978 %if _INPUT_FILE_BOOT 0 000007E3 F606[E301]02 testopt [internalflags2], dif2_input_file_boot 0 000007E8 7412 jz @F 0 000007EA B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 000007ED 52 push dx 0 000007EE F726[0000] mul word [load_input_file.active] 0 000007F2 5A pop dx 0 000007F3 89C7 mov di, ax 0 000007F5 F685[2700]80 testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietOutput 0 000007FA EB29 jmp .quiet_if_nz 2988 2989 @@: 2990 %endif 2991 %if _INPUT_FILE_HANDLES 0 000007FC E82411 call InDOS 0 000007FF 7518 jnz @F 2994 0 00000801 F606[E201]10 testopt [internalflags2], dif2_input_file 0 00000806 7411 jz @F 0 00000808 8B3E[680C] mov di, word [input_file_handles.active] 0 0000080C D1E7 shl di, 1 0 0000080E D1E7 shl di, 1 0 00000810 D1E7 shl di, 1 ; to qword array index 3001 %if INPUTFILEHANDLE_size != 8 3002 %error Unexpected structure size 3003 %endif 0 00000812 F685[EB0B]80 testopt [input_file_handles + di + ifhFlags], ifhfQuietOutput 0 00000817 EB0C jmp .quiet_if_nz 3006 3007 @@: 3008 %endif 0 00000819 F606[E501]01 testopt [internalflags3], dif3_input_cmdline 0 0000081E 740C jz @F 0 00000820 F606[A701]80 testopt [options], opt_cmdline_quiet_output 3012 ; jmp .quiet_if_nz 3013 3014 .quiet_if_nz: 0 00000825 7405 jz @F 3016 .quiet: 0 00000827 800E[E501]10 setopt [internalflags3], dif3_quiet_output 3018 .notquiet: 3019 @@: 0 0000082C 58 pop ax 0 0000082D 5F pop di 0 0000082E C3 retn 3023 3024 3025 guard_auxbuff.1_or_2: 0 0000082F F606[E701]30 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 0 00000834 EB05 jmp @F 3029 3030 guard_auxbuff: section_of_function 0 00000836 F606[E701]70 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 | dif3_auxbuff_guarded_3 3034 @@: 0 0000083B 7506 jnz @F 0 0000083D 800E[E701]10 setopt [internalflags3], dif3_auxbuff_guarded_1 0 00000842 C3 retn 3038 3039 @@: 0 00000843 B80101 mov ax, 0101h 0 00000846 E81D0F call setrc 0 00000849 BA[0000] mov dx, msg.guard_auxbuff_error 3043 .putsz_error: 0 0000084C E8[0000] call putsz 0 0000084F E9AEF7 jmp cmd3 3046 3047 3048 ; This is used to disallow commands 3049 ; while reading from the RE buffer. 3050 guard_re: section_of_function 3051 %if !_LOADER 0 00000852 F606[E701]01 testopt [internalflags3], dif3_input_re 0 00000857 7501 jnz @F 0 00000859 C3 retn 3055 3056 @@: 0 0000085A BA[0000] mov dx, msg.guard_re_error 0 0000085D EB0B jmp guard_rc.specificerror102 3059 %else 3060 retn 3061 %endif 3062 3063 ; This is used to disallow commands 3064 ; while reading from the RC buffer. 3065 guard_rc: 0 0000085F F606[E501]01 testopt [internalflags3], dif3_input_cmdline 0 00000864 7501 jnz @F 0 00000866 C3 retn 3069 3070 @@: 0 00000867 BA[0000] mov dx, msg.guard_rc_error 3072 .specificerror102: 0 0000086A B80201 mov ax, 0102h 0 0000086D E8F60E call setrc 0 00000870 EBDA jmp guard_auxbuff.putsz_error 3076 3077 3078 %if _EXTENSIONS 3079 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 3079 ------------------ note: usesection lDEBUG_DATA_ENTRY 3080 align 2, db 0 3081 linkcall_table: 0 000014A8 0000 .init: dw 0 0 000014AA 0C00 dw (.end - .) / 2 3084 .: 0 000014AC 0000 dw 0 0 000014AE 0000 .code1: dw 0 3087 %if _DUALCODE 0 000014B0 0100 dw 1 0 000014B2 0000 .code2: dw 0 3090 %endif 0 000014B4 0200 dw 2 0 000014B6 0000 .entry: dw 0 3093 0 000014B8 1000 dw 10h 0 000014BA 0000 .dualcode1: dw 0 3096 %if _DUALCODE 0 000014BC 1100 dw 11h 0 000014BE 0000 .dualcode2: dw 0 3099 %endif 0 000014C0 1200 dw 12h 0 000014C2 0000 .dualentry: dw 0 3102 .end: 3103 3104 %ifn _DUALCODE 3105 align 2, db 0 3106 duallink_return_table: 3107 .amount: equ 8 3108 times .amount dw DUALLINK_UNUSED 3109 %endif 3110 3111 ; INP: _PM=0: ss:sp -> dword far return address 3112 ; _PM=1: ss:sp -> word near return address 3113 ; followed by an uninitialised placeholder word 3114 ; CHG: - (not even flags) 3115 entry_ret_to_ext: 3116 %if _PM 0 000014C4 E893FF call entry_to_code_segsel 0 000014C7 [7E08] dw code_ret_to_ext 3119 %else 3120 retf ; simple 3121 %endif 3122 3123 3124 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 3124 ------------------ note: usesection lDEBUG_CODE 3125 %if _DUALCODE && _PM 3126 ; INP: ss:sp -> dword dual call return address (to discard) 3127 ; ss:sp + 4 -> word near return address 3128 ; followed by an uninitialised placeholder word 3129 ; CHG: - (not even flags) 3130 dualfunction 3131 code2_to_code_ret_to_ext: section_of_function 3132 lframe 0 3133 lpar word, dualseg 3134 lpar word, dualofs 0 00000872 5589E5 lenter 0 00000875 FF7600 push word [bp + ?frame_bp] 0 00000878 8F4604 pop word [bp + ?dualseg] 3138 lleave ctx 0 0000087B 5D pop bp ; (discard) 0 0000087C 5D pop bp ; (discard) 0 0000087D 5D pop bp ; restore bp 3142 ; fall through to code_ret_to_ext 3143 %endif 3144 3145 ; INP: _PM=0: ss:sp -> dword far return address 3146 ; _PM=1: ss:sp -> word near return address 3147 ; followed by an uninitialised placeholder word 3148 ; CHG: - (not even flags) 3149 code_ret_to_ext: 3150 %if _PM 3151 ; ss:sp -> word near return address, placeholder word 3152 lframe 0 3153 lpar word, retseg 3154 lpar word, retofs 0 0000087E 5589E5 lenter 0 00000881 57 push di 0 00000882 368B3E[6802] mov di, word [ss:pm_2_86m_0] 3158 %if extseg + 2 != extcssel 3159 %error code_ret_to_ext expects extcssel after extseg 3160 %endif 0 00000887 36FFB5[2802] push word [ss:extseg + di] 0 0000088C 8F4604 pop word [bp + ?retseg] 0 0000088F 5F pop di 0 00000890 5D lleave , optimiserestoresp 3165 %endif 3166 code_retf: section_of_function 0 00000891 CB retf ; now return to ext 3168 3169 %if _DUALCODE 3170 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 3170 ------------------ note: usesection lDEBUG_CODE2 3171 code2_ret_to_ext: 3172 %if _PM 0 0000000A E81F00EB02[7208] dualcall code2_to_code_ret_to_ext 3174 %else 3175 retf ; simple case if _PM=0 3176 %endif 3177 %endif 3178 %endif 3179 3180 %ifn _EXTENSIONS 3181 code_retf: section_of_function 3182 retf 3183 %endif 3184 3185 %ifn _LINK_COMPAT 3186 %ifn _LINK 3187 %include "amis.asm" 3188 %endif 3189 3190 usesection lDEBUG_CODE 3191 3192 %if _DEBUG4 || _DEBUG5 3193 %define _DEB_ASM_PREFIX 3194 %include "deb.asm" 3195 %endif 3196 3197 3198 %ifn _LINK 3199 %if !_LOADER 3200 %include "aa.asm" 3201 %endif 3202 %include "dd.asm" 3203 %if _RN 3204 %imacro internaldatarelocation 0-*.nolist 3205 %endmacro 3206 %include "fptostr.asm" 3207 %unimacro internaldatarelocation 0-*.nolist 3208 %endif 3209 %include "run.asm" 3210 %include "install.asm" 3211 %include "uu.asm" 3212 %if _IMMASM 3213 %include "immasm.asm" 3214 %else 3215 immasm: 3216 lodsb 3217 call chkeol 3218 jmp cmd3 3219 %endif 3220 %if _HELP_COMPRESSED 3221 overridedef STANDALONE, 0 3222 %include "helpdepk.asm" 3223 resetdef STANDALONE 3224 %endif 3225 %endif 3226 %else ; _LINK_COMPAT 3227 %if _DEBUG4 || _DEBUG5 3228 %define _DEB_ASM_PREFIX 3229 %include "deb.asm" 3230 %endif 3231 %endif ; _LINK_COMPAT 3232 3233 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 3233 ------------------ note: usesection lDEBUG_DATA_ENTRY 3234 3235 %if _PM || _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 0 000014C9 00 align 4, db 0 0 000014CC 00000000 exception_csip: dd 0 ; 16:16 far 16-bit address of debugger exception 3238 %if _AREAS 0 000014D0 0000 exception_stack:times 4 dw 0 3240 ; stack of debugger exception 3241 %endif 3242 %endif 3243 3244 %if _PM 3245 %ifn _LINK || _LINK_COMPAT 3246 %include "pmdata.asm" 3247 %include "pminit.asm" 3248 %include "pmentry.asm" 3249 %endif 3250 3251 3252 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 3252 ------------------ note: usesection lDEBUG_CODE 3253 3254 subcpu 286 3255 resetmode_and_test_d_b_bit: section_of_function 3256 %if _PM 0 00000892 E8[0000] call resetmode 3258 %endif 3259 3260 ; Test if bx is a 32-bit selector 3261 ; (as opposed to a 16-bit selector or a segment) 3262 ; 3263 ; INP: bx = selector (PM) or segment (86M) 3264 ; OUT: NZ = 32-bit 3265 ; ZR = 16-bit (always if 86M) 3266 ; NC 3267 ; REM: This checks whether a code segment's D bit or 3268 ; a stack segment's B bit is set. This operation 3269 ; is not meaningful otherwise. 3270 test_d_b_bit: section_of_function 0 00000895 E88801 _386 call ispm 0 00000898 7403 _386 jz .pm ; 386 and PM, check selector --> 3273 ; not PM or no 386 3274 .ZR: 0 0000089A 38C0 cmp al, al ; ZR, NC 0 0000089C C3 retn 3277 .pm: 3278 [cpu 386] 0 0000089D 6650 push eax 0 0000089F 6631C0 xor eax, eax ; use rights = 0 if inaccessible 0 000008A2 660F02C3 lar eax, ebx ; access rights 3282 ; eax is unchanged if the access rights are inaccessible 3283 ; (and NZ is set in that case) 0 000008A6 66A900004000 test eax, 400000h ; test bit (NC) 0 000008AC 6658 pop eax 0 000008AE C3 retn 3287 __CPU__ 3288 3289 3290 ; Test if selector in bx has a limit beyond 64 KiB - 1 B 3291 ; 3292 ; INP: bx = selector (PM) or segment (86M) 3293 ; OUT: NZ = limit above 64 KiB - 1 B 3294 ; ZR = limit below 64 KiB (always if 86M) 3295 ; NC 3296 test_high_limit: section_of_function 0 000008AF E86E01 _386 call ispm 0 000008B2 7402 _386 jz .pm ; 386 and PM, check selector --> 3299 ; not PM or no 386 0 000008B4 EBE4 jmp test_d_b_bit.ZR 3301 3302 .pm: 3303 [cpu 386] 0 000008B6 6650 push eax 0 000008B8 6631C0 xor eax, eax ; use limit = 0 if inaccessible 0 000008BB 660F03C3 lsl eax, ebx ; segment limit 3307 ; eax is unchanged if the segment limit is inaccessible 3308 ; (and NZ is set in that case) 0 000008BF 66A90000FFFF test eax, 0FFFF_0000h ; (NC) ZR if low limit, else NZ 0 000008C5 6658 pop eax 0 000008C7 C3 retn 3312 __CPU__ 3313 3314 subcpureset ; subcpu used in pminit.asm (!_LINK) 3315 %endif ; _PM 3316 3317 %if _NOEXTENDER 3318 ; When we support non-extended DPMI, some calls to Int21 3319 ; are (extended) Int21 calls and some are (not extended) 3320 ; calls down to the real mode Int21. doscall is a macro 3321 ; that will always call the non-extended Int21. 3322 3323 ; Execute a non-extended DOS call 3324 _doscall: section_of_function 0 000008C8 57 push di 0 000008C9 368B3E[6802] mov di, word [ss:pm_2_86m_0] 0 000008CE 36FFA5[D814] jmp near word [ss:.table + di] 3328 3329 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 3329 ------------------ note: usesection lDEBUG_DATA_ENTRY 3330 ; REM: Dispatch table in section lDEBUG_CODE 3331 align 2, db 0 3332 .table: 0 000014D8 [E308] dw .86m_pop 0 000014DA [D308] dw .pm_pop 3335 3336 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 3336 ------------------ note: usesection lDEBUG_CODE 3337 .pm_pop: 0 000008D3 5F pop di 3339 subcpu 286 3340 ; Execute a non-extended DOS call from PM 3341 .pm: 0 000008D4 36FF36[980C] push word [ss:pspdbg] 0 000008D9 6A21 push 21h 0 000008DB E81500EB02[640B] dualcall intcall 0 000008E2 C3 retn 3346 subcpureset 3347 .86m_pop: 0 000008E3 5F pop di 0 000008E4 E9EA01 jmp _int21 3350 %endif 3351 3352 3353 %if _EXTENSIONS 3354 usesection lDEBUG_CODE 3354 ------------------ note: usesection lDEBUG_CODE 3355 3356 %if _DUALCODE 3357 code_dual_thunk: 3358 %if _PM ; if _PM=0 just do retf 2 3359 lframe 0 3360 lpar word, origret_farret_seg 3361 lpar word, origbx_farret_ofs 3362 lpar word, restore_back_nearret 3363 lpar dword, transfer 0 000008E7 5589E5 lenter 0 000008EA C7460A0200 mov word [bp + ?origret_farret_seg], 2 ; extseg index 3366 ; (set up far-like return address) 0 000008EF 5D lleave , optimiserestoresp 3368 %endif 0 000008F0 CA0200 retf 2 ; discard nearret, 3370 ; and jump to transfer 3371 %else 3372 3373 ; _DUALCODE=0 therefore we can only come from code1 3374 %assign INDEX 0 3375 duallink_return: 3376 duallink_return_%[INDEX]: 3377 push bx 3378 mov bl, INDEX * 2 3379 duallink_return_size equ ($ + 2) - duallink_return 3380 %rep duallink_return_table.amount - 1 3381 %assign INDEX INDEX + 1 3382 jmp strict short @F 3383 duallink_return_%[INDEX]: 3384 push bx 3385 mov bl, INDEX * 2 3386 %endrep 3387 @@: 3388 lframe 0 3389 ; original stack to restore 3390 lpar word, bx_farret_seg ; INP:bx, use space for ELD seg/sel 3391 lpar word, farret_ofs ; placeholder for ELD offset 3392 push ax ; make space for the offset 3393 lenter 3394 push ax ; preserve ax 3395 mov ax, DUALLINK_UNUSED ; reset value 3396 mov bh, 0 ; bx = INDEX * 2 3397 xchg word [ss:duallink_return_table + bx], ax 3398 ; reset table entry and get prior value 3399 mov word [bp + ?farret_ofs], ax ; store offset from table entry for ret 3400 %if _PM 3401 mov bx, word [ss:pm_2_86m_0] 3402 %if extseg + 2 != extcssel 3403 %error Unexpected layout 3404 %endif 3405 mov bx, word [ss:extseg + bx] ; = ext seg/sel 3406 %else 3407 mov bx, word [ss:extseg] ; = ext seg 3408 %endif 3409 xchg bx, word [bp + ?bx_farret_seg] 3410 ; set seg/sel, restore bx 3411 pop ax 3412 lleave , optimiserestoresp 3413 retf 3414 3415 3416 duallink_return_error: 3417 %if _DEBUG 3418 pushf 3419 %if _DEBUG_COND 3420 testopt [ss:internalflags6], dif6_debug_mode 3421 jz @F 3422 %endif 3423 int3 3424 @@: 3425 %endif 3426 cld 3427 push ss 3428 pop ds 3429 push ss 3430 pop es 3431 mov ax, 014Ah 3432 mov dx, msg.duallink_return_error 3433 nearcall setrc 3434 nearcall putsz 3435 jmp cmd3 3436 3437 code_dual_thunk: 3438 lframe 0 3439 lpar word, farret_seg 3440 lpar word, farret_ofs 3441 lpar word, nearret 3442 lpar dword, transfer 3443 lenter 3444 push ax 3445 push cx 3446 push si 3447 pushf 3448 cld 3449 mov ax, cs ; = code1 seg/sel 3450 cmp word [bp + ?transfer + 2], ax 3451 jne duallink_return_error ; only allow calling code1 3452 mov cx, duallink_return_table.amount 3453 mov si, duallink_return_table ; -> table 3454 @@: 3455 ss lodsw ; load table entry 3456 cmp ax, strict word DUALLINK_UNUSED 3457 ; is it unused ? 3458 loopne @B ; loop if not --> 3459 jne duallink_return_error ; ran out, all used --> 3460 3461 %if duallink_return_size != 5 3462 %error Unexpected layout 3463 %endif 3464 mov ax, word [bp + ?farret_ofs] 3465 mov word [ss:si - 2], ax ; store real return address offset 3466 sub si, duallink_return_table + 2 3467 ; index * 2 3468 mov ax, si 3469 shr ax, 1 ; index * 1 3470 add si, si ; index * 4 3471 add ax, si ; index * 5 3472 add ax, duallink_return ; -> return entrypoint 3473 mov word [bp + ?farret_seg], ax ; set as near return address 3474 popf ; restore flags 3475 pop si 3476 pop cx 3477 pop ax ; restore other registers 3478 lleave , optimiserestoresp ; restore bp 3479 retf 4 ; discard nearret and farret_ofs, 3480 ; and jump to transfer 3481 %endif 3482 %endif 3483 3484 3485 %if _DUALCODE 3486 %push 3487 %assign %$counter 0 3488 3489 %rep 2 3490 3491 %if %$counter == 0 3492 %define %$currentindex 0 3493 %define %$currentname lDEBUG_CODE 3494 %define %$othername lDEBUG_CODE2 3495 %define %$othersegvar code2_seg 3496 %define %$otherselvar code2_sel 3497 %else 3498 %define %$currentindex 1 3499 %define %$currentname lDEBUG_CODE2 3500 %define %$othername lDEBUG_CODE 3501 %define %$othersegvar code_seg 3502 %define %$otherselvar code_sel 3503 %endif 3504 3505 hiddenusesection %$currentname 3506 %if _PM 3507 %$currentname %+ _to_ %+ %$currentname %+ _dualcall_helper: 3508 push ax ; placeholder 3509 push ax ; chain 3510 lframe 0 3511 lpar word, offset_segment 3512 lpar word, placeholder 3513 lpar word, chain 3514 lenter 3515 push bx 3516 mov bx, word [bp + ?offset_segment] 3517 %if _DEBUG 3518 mov word [bp + ?placeholder], bx 3519 push word [cs:bx + 2] 3520 %else 3521 push word [cs:bx] 3522 lea bx, [bx + 2] 3523 mov word [bp + ?placeholder], bx 3524 %endif 3525 pop word [bp + ?chain] 3526 mov word [bp + ?offset_segment], %$$currentindex 3527 pop bx 3528 lleave 3529 retn 3530 3531 %$currentname %+ _to_ %+ %$othername %+ _dualcall_helper: 3532 push ax ; placeholder 3533 push ax ; chain 3534 push ax ; chain 3535 lframe 0 3536 lpar word, offset_segment 3537 lpar word, placeholder 3538 lpar dword, chain 3539 lenter 3540 push bx 3541 mov bx, word [bp + ?offset_segment] 3542 %if _DEBUG 3543 mov word [bp + ?placeholder], bx 3544 push word [cs:bx + 2] 3545 %else 3546 push word [cs:bx] 3547 lea bx, [bx + 2] 3548 mov word [bp + ?placeholder], bx 3549 %endif 3550 pop word [bp + ?chain] 3551 mov bx, word [ss:pm_2_86m_0] 3552 %if %$$othersegvar + 2 != %$$otherselvar 3553 %error Expected sel variable after seg variable 3554 %endif 3555 mov bx, word [ss:%$$othersegvar + bx] 3556 mov word [bp + ?chain + 2], bx 3557 mov word [bp + ?offset_segment], %$$currentindex 3558 pop bx 3559 lleave 3560 retf 3561 3562 3563 %$currentname %+ _dualret_helper: 3564 lframe near 3565 lpar word, index_segment 3566 lpar word, offset 3567 lpar_return 3568 lenter 3569 push bx 3570 push di 3571 3572 %if code_seg + 2 != code_sel 3573 %error Unexpected layout 3574 %endif 3575 %if code2_seg + 2 != code2_sel 3576 %error Unexpected layout 3577 %endif 3578 %if _EXTENSIONS 3579 %if extseg + 2 != extcssel 3580 %error Unexpected layout 3581 %endif 3582 %endif 3583 mov bx, word [bp + ?index_segment] 3584 ; 0 = code, 1 = code2, 2 = ext 3585 mov bl, byte [ss:.table + bx] ; multiply without fl change 3586 mov di, word [ss:pm_2_86m_0] ; 2 in PM, 0 in 86M 3587 mov bx, word [ss:code_seg + bx + di] 3588 ; get seg/sel from the variables 3589 ; This code is sensitive to the exact order and layout 3590 ; of the code|code2|ext segment and selector variables. 3591 mov word [bp + ?index_segment], bx 3592 ; store seg/sel for the next retf 3593 pop di 3594 pop bx 3595 lleave 3596 lret 3597 3598 usesection lDEBUG_DATA_ENTRY 3599 .table: 3600 db 0 ; zero adjust needed for code_seg 3601 db code2_seg - code_seg ; the adjust for code2_seg 3602 %if _EXTENSIONS 3603 db extseg - code_seg ; the adjust for extseg 3604 ; (not used yet) 3605 %endif 3606 3607 hiddenusesection %$currentname 3608 %endif 3609 3610 3611 %ifn _DUALCODE && ! _PM && _DUALCODENEARDUAL 3612 %$currentname %+ _to_ %+ %$othername %+ _nearcall_helper: 3613 push ax ; return_offset 3614 push ax ; placeholder 3615 push ax ; chain 3616 push ax ; chain 3617 lframe 0 3618 lpar word, offset_segment 3619 lpar word, return_offset ; far return 3620 lpar word, placeholder ; near return 3621 lpar dword, chain ; far target address 3622 lenter 3623 push bx 3624 mov bx, word [bp + ?offset_segment] 3625 %if _DEBUG 3626 mov word [bp + ?return_offset], bx 3627 push word [cs:bx + 2] 3628 %else 3629 push word [cs:bx] 3630 lea bx, [bx + 2] 3631 mov word [bp + ?return_offset], bx 3632 %endif 3633 pop word [bp + ?chain] 3634 3635 %if _PM 3636 mov bx, word [ss:pm_2_86m_0] 3637 %if %$$othersegvar + 2 != %$$otherselvar 3638 %error Expected sel variable after seg variable 3639 %endif 3640 mov bx, word [ss:%$$othersegvar + bx] 3641 %else 3642 mov bx, word [ss:%$$othersegvar] 3643 %endif 3644 mov word [bp + ?chain + 2], bx 3645 %if _PM 3646 mov word [bp + ?offset_segment], %$$currentindex 3647 %else 3648 mov word [bp + ?offset_segment], cs 3649 %endif 3650 mov word [bp + ?placeholder], %$$othername %+ _retf_from_dual 3651 pop bx 3652 lleave 3653 retf 3654 3655 %$currentname %+ _retf_from_dual: 3656 dualreturn 3657 retf 3658 %endif 3659 3660 3661 %assign %$counter %$counter + 1 3662 %endrep 3490 <1> 3491 <1> %if %$counter == 0 3492 <1> %define %$currentindex 0 3493 <1> %define %$currentname lDEBUG_CODE 3494 <1> %define %$othername lDEBUG_CODE2 3495 <1> %define %$othersegvar code2_seg 3496 <1> %define %$otherselvar code2_sel 3497 <1> %else 3498 <1> %define %$currentindex 1 3499 <1> %define %$currentname lDEBUG_CODE2 3500 <1> %define %$othername lDEBUG_CODE 3501 <1> %define %$othersegvar code_seg 3502 <1> %define %$otherselvar code_sel 3503 <1> %endif 3504 <1> 3505 <1> hiddenusesection %$currentname 3505 ------------------ <1> note: usesection lDEBUG_CODE 3506 <1> %if _PM 3507 <1> %$currentname %+ _to_ %+ %$currentname %+ _dualcall_helper: 0 000008F3 50 push ax 0 000008F4 50 push ax 3510 <1> lframe 0 3511 <1> lpar word, offset_segment 3512 <1> lpar word, placeholder 3513 <1> lpar word, chain 0 000008F5 5589E5 lenter 0 000008F8 53 push bx 0 000008F9 8B5E06 mov bx, word [bp + ?offset_segment] 3517 <1> %if _DEBUG 0 000008FC 895E04 mov word [bp + ?placeholder], bx 0 000008FF 2EFF7702 push word [cs:bx + 2] 3520 <1> %else 3521 <1> push word [cs:bx] 3522 <1> lea bx, [bx + 2] 3523 <1> mov word [bp + ?placeholder], bx 3524 <1> %endif 0 00000903 8F4602 pop word [bp + ?chain] 0 00000906 C746060000 mov word [bp + ?offset_segment], %$$currentindex 0 0000090B 5B pop bx 0 0000090C 5D lleave 0 0000090D C3 retn 3530 <1> 3531 <1> %$currentname %+ _to_ %+ %$othername %+ _dualcall_helper: 0 0000090E 50 push ax 0 0000090F 50 push ax 0 00000910 50 push ax 3535 <1> lframe 0 3536 <1> lpar word, offset_segment 3537 <1> lpar word, placeholder 3538 <1> lpar dword, chain 0 00000911 5589E5 lenter 0 00000914 53 push bx 0 00000915 8B5E08 mov bx, word [bp + ?offset_segment] 3542 <1> %if _DEBUG 0 00000918 895E06 mov word [bp + ?placeholder], bx 0 0000091B 2EFF7702 push word [cs:bx + 2] 3545 <1> %else 3546 <1> push word [cs:bx] 3547 <1> lea bx, [bx + 2] 3548 <1> mov word [bp + ?placeholder], bx 3549 <1> %endif 0 0000091F 8F4602 pop word [bp + ?chain] 0 00000922 368B1E[6802] mov bx, word [ss:pm_2_86m_0] 3552 <1> %if %$$othersegvar + 2 != %$$otherselvar 3553 <1> %error Expected sel variable after seg variable 3554 <1> %endif 0 00000927 368B9F[2402] mov bx, word [ss:%$$othersegvar + bx] 0 0000092C 895E04 mov word [bp + ?chain + 2], bx 0 0000092F C746080000 mov word [bp + ?offset_segment], %$$currentindex 0 00000934 5B pop bx 0 00000935 5D lleave 0 00000936 CB retf 3561 <1> 3562 <1> 3563 <1> %$currentname %+ _dualret_helper: 3564 <1> lframe near 3565 <1> lpar word, index_segment 3566 <1> lpar word, offset 3567 <1> lpar_return 0 00000937 5589E5 lenter 0 0000093A 53 push bx 0 0000093B 57 push di 3571 <1> 3572 <1> %if code_seg + 2 != code_sel 3573 <1> %error Unexpected layout 3574 <1> %endif 3575 <1> %if code2_seg + 2 != code2_sel 3576 <1> %error Unexpected layout 3577 <1> %endif 3578 <1> %if _EXTENSIONS 3579 <1> %if extseg + 2 != extcssel 3580 <1> %error Unexpected layout 3581 <1> %endif 3582 <1> %endif 0 0000093C 8B5E06 mov bx, word [bp + ?index_segment] 3584 <1> 0 0000093F 368A9F[DC14] mov bl, byte [ss:.table + bx] 0 00000944 368B3E[6802] mov di, word [ss:pm_2_86m_0] 0 00000949 368B99[2002] mov bx, word [ss:code_seg + bx + di] 3588 <1> 3589 <1> 3590 <1> 0 0000094E 895E06 mov word [bp + ?index_segment], bx 3592 <1> 0 00000951 5F pop di 0 00000952 5B pop bx 0 00000953 5D lleave 0 00000954 C3 lret 3597 <1> 3598 <1> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 3598 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY 3599 <1> .table: 0 000014DC 00 db 0 0 000014DD 04 db code2_seg - code_seg 3602 <1> %if _EXTENSIONS 0 000014DE 08 db extseg - code_seg 3604 <1> 3605 <1> %endif 3606 <1> 3607 <1> hiddenusesection %$currentname === Switch to base=00F6D0h -> "LDEBUG_CODE" 3607 ------------------ <1> note: usesection lDEBUG_CODE 3608 <1> %endif 3609 <1> 3610 <1> 3611 <1> %ifn _DUALCODE && ! _PM && _DUALCODENEARDUAL 3612 <1> %$currentname %+ _to_ %+ %$othername %+ _nearcall_helper: 0 00000955 50 push ax 0 00000956 50 push ax 0 00000957 50 push ax 0 00000958 50 push ax 3617 <1> lframe 0 3618 <1> lpar word, offset_segment 3619 <1> lpar word, return_offset 3620 <1> lpar word, placeholder 3621 <1> lpar dword, chain 0 00000959 5589E5 lenter 0 0000095C 53 push bx 0 0000095D 8B5E0A mov bx, word [bp + ?offset_segment] 3625 <1> %if _DEBUG 0 00000960 895E08 mov word [bp + ?return_offset], bx 0 00000963 2EFF7702 push word [cs:bx + 2] 3628 <1> %else 3629 <1> push word [cs:bx] 3630 <1> lea bx, [bx + 2] 3631 <1> mov word [bp + ?return_offset], bx 3632 <1> %endif 0 00000967 8F4602 pop word [bp + ?chain] 3634 <1> 3635 <1> %if _PM 0 0000096A 368B1E[6802] mov bx, word [ss:pm_2_86m_0] 3637 <1> %if %$$othersegvar + 2 != %$$otherselvar 3638 <1> %error Expected sel variable after seg variable 3639 <1> %endif 0 0000096F 368B9F[2402] mov bx, word [ss:%$$othersegvar + bx] 3641 <1> %else 3642 <1> mov bx, word [ss:%$$othersegvar] 3643 <1> %endif 0 00000974 895E04 mov word [bp + ?chain + 2], bx 3645 <1> %if _PM 0 00000977 C7460A0000 mov word [bp + ?offset_segment], %$$currentindex 3647 <1> %else 3648 <1> mov word [bp + ?offset_segment], cs 3649 <1> %endif 0 0000097C C74606[A200] mov word [bp + ?placeholder], %$$othername %+ _retf_from_dual 0 00000981 5B pop bx 0 00000982 5D lleave 0 00000983 CB retf 3654 <1> 3655 <1> %$currentname %+ _retf_from_dual: 0 00000984 E8B0FF dualreturn 0 00000987 CB retf 3658 <1> %endif 3659 <1> 3660 <1> 3661 <1> %assign %$counter %$counter + 1 3490 <1> 3491 <1> %if %$counter == 0 3492 <1> %define %$currentindex 0 3493 <1> %define %$currentname lDEBUG_CODE 3494 <1> %define %$othername lDEBUG_CODE2 3495 <1> %define %$othersegvar code2_seg 3496 <1> %define %$otherselvar code2_sel 3497 <1> %else 3498 <1> %define %$currentindex 1 3499 <1> %define %$currentname lDEBUG_CODE2 3500 <1> %define %$othername lDEBUG_CODE 3501 <1> %define %$othersegvar code_seg 3502 <1> %define %$otherselvar code_sel 3503 <1> %endif 3504 <1> 3505 <1> hiddenusesection %$currentname === Switch to base=01F580h -> "LDEBUG_CODE2" 3505 ------------------ <1> note: usesection lDEBUG_CODE2 3506 <1> %if _PM 3507 <1> %$currentname %+ _to_ %+ %$currentname %+ _dualcall_helper: 0 00000011 50 push ax 0 00000012 50 push ax 3510 <1> lframe 0 3511 <1> lpar word, offset_segment 3512 <1> lpar word, placeholder 3513 <1> lpar word, chain 0 00000013 5589E5 lenter 0 00000016 53 push bx 0 00000017 8B5E06 mov bx, word [bp + ?offset_segment] 3517 <1> %if _DEBUG 0 0000001A 895E04 mov word [bp + ?placeholder], bx 0 0000001D 2EFF7702 push word [cs:bx + 2] 3520 <1> %else 3521 <1> push word [cs:bx] 3522 <1> lea bx, [bx + 2] 3523 <1> mov word [bp + ?placeholder], bx 3524 <1> %endif 0 00000021 8F4602 pop word [bp + ?chain] 0 00000024 C746060100 mov word [bp + ?offset_segment], %$$currentindex 0 00000029 5B pop bx 0 0000002A 5D lleave 0 0000002B C3 retn 3530 <1> 3531 <1> %$currentname %+ _to_ %+ %$othername %+ _dualcall_helper: 0 0000002C 50 push ax 0 0000002D 50 push ax 0 0000002E 50 push ax 3535 <1> lframe 0 3536 <1> lpar word, offset_segment 3537 <1> lpar word, placeholder 3538 <1> lpar dword, chain 0 0000002F 5589E5 lenter 0 00000032 53 push bx 0 00000033 8B5E08 mov bx, word [bp + ?offset_segment] 3542 <1> %if _DEBUG 0 00000036 895E06 mov word [bp + ?placeholder], bx 0 00000039 2EFF7702 push word [cs:bx + 2] 3545 <1> %else 3546 <1> push word [cs:bx] 3547 <1> lea bx, [bx + 2] 3548 <1> mov word [bp + ?placeholder], bx 3549 <1> %endif 0 0000003D 8F4602 pop word [bp + ?chain] 0 00000040 368B1E[6802] mov bx, word [ss:pm_2_86m_0] 3552 <1> %if %$$othersegvar + 2 != %$$otherselvar 3553 <1> %error Expected sel variable after seg variable 3554 <1> %endif 0 00000045 368B9F[2002] mov bx, word [ss:%$$othersegvar + bx] 0 0000004A 895E04 mov word [bp + ?chain + 2], bx 0 0000004D C746080100 mov word [bp + ?offset_segment], %$$currentindex 0 00000052 5B pop bx 0 00000053 5D lleave 0 00000054 CB retf 3561 <1> 3562 <1> 3563 <1> %$currentname %+ _dualret_helper: 3564 <1> lframe near 3565 <1> lpar word, index_segment 3566 <1> lpar word, offset 3567 <1> lpar_return 0 00000055 5589E5 lenter 0 00000058 53 push bx 0 00000059 57 push di 3571 <1> 3572 <1> %if code_seg + 2 != code_sel 3573 <1> %error Unexpected layout 3574 <1> %endif 3575 <1> %if code2_seg + 2 != code2_sel 3576 <1> %error Unexpected layout 3577 <1> %endif 3578 <1> %if _EXTENSIONS 3579 <1> %if extseg + 2 != extcssel 3580 <1> %error Unexpected layout 3581 <1> %endif 3582 <1> %endif 0 0000005A 8B5E06 mov bx, word [bp + ?index_segment] 3584 <1> 0 0000005D 368A9F[DF14] mov bl, byte [ss:.table + bx] 0 00000062 368B3E[6802] mov di, word [ss:pm_2_86m_0] 0 00000067 368B99[2002] mov bx, word [ss:code_seg + bx + di] 3588 <1> 3589 <1> 3590 <1> 0 0000006C 895E06 mov word [bp + ?index_segment], bx 3592 <1> 0 0000006F 5F pop di 0 00000070 5B pop bx 0 00000071 5D lleave 0 00000072 C3 lret 3597 <1> 3598 <1> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 3598 ------------------ <1> note: usesection lDEBUG_DATA_ENTRY 3599 <1> .table: 0 000014DF 00 db 0 0 000014E0 04 db code2_seg - code_seg 3602 <1> %if _EXTENSIONS 0 000014E1 08 db extseg - code_seg 3604 <1> 3605 <1> %endif 3606 <1> 3607 <1> hiddenusesection %$currentname === Switch to base=01F580h -> "LDEBUG_CODE2" 3607 ------------------ <1> note: usesection lDEBUG_CODE2 3608 <1> %endif 3609 <1> 3610 <1> 3611 <1> %ifn _DUALCODE && ! _PM && _DUALCODENEARDUAL 3612 <1> %$currentname %+ _to_ %+ %$othername %+ _nearcall_helper: 0 00000073 50 push ax 0 00000074 50 push ax 0 00000075 50 push ax 0 00000076 50 push ax 3617 <1> lframe 0 3618 <1> lpar word, offset_segment 3619 <1> lpar word, return_offset 3620 <1> lpar word, placeholder 3621 <1> lpar dword, chain 0 00000077 5589E5 lenter 0 0000007A 53 push bx 0 0000007B 8B5E0A mov bx, word [bp + ?offset_segment] 3625 <1> %if _DEBUG 0 0000007E 895E08 mov word [bp + ?return_offset], bx 0 00000081 2EFF7702 push word [cs:bx + 2] 3628 <1> %else 3629 <1> push word [cs:bx] 3630 <1> lea bx, [bx + 2] 3631 <1> mov word [bp + ?return_offset], bx 3632 <1> %endif 0 00000085 8F4602 pop word [bp + ?chain] 3634 <1> 3635 <1> %if _PM 0 00000088 368B1E[6802] mov bx, word [ss:pm_2_86m_0] 3637 <1> %if %$$othersegvar + 2 != %$$otherselvar 3638 <1> %error Expected sel variable after seg variable 3639 <1> %endif 0 0000008D 368B9F[2002] mov bx, word [ss:%$$othersegvar + bx] 3641 <1> %else 3642 <1> mov bx, word [ss:%$$othersegvar] 3643 <1> %endif 0 00000092 895E04 mov word [bp + ?chain + 2], bx 3645 <1> %if _PM 0 00000095 C7460A0100 mov word [bp + ?offset_segment], %$$currentindex 3647 <1> %else 3648 <1> mov word [bp + ?offset_segment], cs 3649 <1> %endif 0 0000009A C74606[8409] mov word [bp + ?placeholder], %$$othername %+ _retf_from_dual 0 0000009F 5B pop bx 0 000000A0 5D lleave 0 000000A1 CB retf 3654 <1> 3655 <1> %$currentname %+ _retf_from_dual: 0 000000A2 E8B0FF dualreturn 0 000000A5 CB retf 3658 <1> %endif 3659 <1> 3660 <1> 3661 <1> %assign %$counter %$counter + 1 3663 %pop 3664 %endif 3665 3666 3667 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 3667 ------------------ note: usesection lDEBUG_CODE 3668 3669 %if _SYMBOLIC 3670 %ifn _DUALCODE && _SYMBOLSASMDUALCODE 3671 usesection lDEBUG_CODE 3672 3673 section_of symbolasm_error 3674 check_section_of symbolasm_error 3675 symbolasm_error equ error 3676 %endif 3677 3678 %ifn _LINK || _LINK_COMPAT 3679 %include "symbols.asm" 3680 %endif 3681 %else 3682 3683 %if _PM 3684 3685 3686 hiddenusesection SECTION_OF_ %+ selector_to_segment 3687 3688 ; For branches other than symbolic, here's selector_to_segment 3689 ; (as used by the puts in lineio.asm). Picked from symsnip 3690 ; binsrch.asm at revision 9c232415d568. 3691 ; INP: word [ss:sp] = selector to access 3692 ; OUT: word [ss:sp] = segment value to use for access 3693 ; CHG: - 3694 dualfunction 3695 selector_to_segment: section_of_function 3696 lframe dualdistance 3697 lpar word, in_selector_out_segment 3698 lpar_return 3699 lenter 3700 3701 call _CURRENT_SECTION %+ _ispm 3702 ; is it PM ? 3703 jnz .ret ; no, 86M --> (selector == segment) 3704 3705 subcpu 286 3706 push ax 3707 push bx 3708 push cx 3709 push dx 3710 3711 mov bx, word [bp + ?in_selector_out_segment] 3712 mov ax, 6 3713 int 31h ; get segment base to cx:dx 3714 shr dx, 4 3715 shl cx, 12 3716 or dx, cx 3717 mov word [bp + ?in_selector_out_segment], dx 3718 3719 pop dx 3720 pop cx 3721 pop bx 3722 pop ax 3723 subcpureset 3724 3725 .ret: 3726 lleave 3727 dualreturn 3728 lret 3729 %endif 3730 3731 %endif 3732 3733 3734 ; support functions for symbols.asm 3735 usesection lDEBUG_CODE 3735 ------------------ note: usesection lDEBUG_CODE 3736 %if _PM 3737 dualfunction 3738 push_cxdx_or_edx: section_of_function 3739 lframe dualdistance 3740 lpar dword, return 3741 lpar_return 0 00000988 5589E5 lenter 0 0000098B 51 _no386 push cx 0 0000098C 66 _386_o32 0 0000098D 52 push dx 0 0000098E 8F4606 pop word [bp + ?return] 0 00000991 8F4608 pop word [bp + ?return + 2] 0 00000994 5D lleave 0 00000995 E89FFF dualreturn 0 00000998 CB lret 3751 %endif 3752 3753 ; INP: ds:dx -> message 3754 ; cx = length 3755 ; CHG: - 3756 ; STT: ds, es don't care 3757 disp_message_length_cx: section_of_function 0 00000999 50 push ax 0 0000099A 53 push bx 0 0000099B 51 push cx 0 0000099C 52 push dx 0 0000099D 06 push es 0 0000099E 1E push ds 0 0000099F 1E push ds 0 000009A0 07 pop es ; es:dx -> message, cx = length 0 000009A1 16 push ss 0 000009A2 1F pop ds ; ds = ss (required for puts) 0 000009A3 E8[0000] call puts 0 000009A6 1F pop ds 0 000009A7 07 pop es 0 000009A8 5A pop dx 0 000009A9 59 pop cx 0 000009AA 5B pop bx 0 000009AB 58 pop ax 0 000009AC C3 retn 3776 3777 ; INP: ds:dx -> message, ASCIZ 3778 ; CHG: - 3779 ; STT: ds, es don't care 3780 disp_message: section_of_function 0 000009AD 06 push es 0 000009AE 1E push ds 0 000009AF 07 pop es ; es:dx -> message 0 000009B0 E8[0000] call putsz ; (sets up ds = ss internally) 0 000009B3 07 pop es 0 000009B4 C3 retn 3787 3788 ; INP: al = character to display 3789 ; CHG: - 3790 ; STT: ds, es don't care 3791 %ifn _LINK 3792 disp_al: equ putc 3793 %endif 3794 3795 3796 ; Display number in ax hexadecimal, always 4 digits 3797 ; 3798 ; INP: ax = number 3799 ; OUT: displayed using disp_al 3800 ; CHG: none 3801 disp_ax_hex: section_of_function 0 000009B5 86C4 xchg al, ah 0 000009B7 E80200 nearcall disp_al_hex 0 000009BA 86C4 xchg al, ah 3805 disp_al_hex: section_of_function 0 000009BC 51 push cx 0 000009BD B104 mov cl, 4 0 000009BF D2C0 rol al, cl 0 000009C1 E80300 nearcall disp_al_nybble_hex 0 000009C4 D2C0 rol al, cl 0 000009C6 59 pop cx 3812 disp_al_nybble_hex: section_of_function 0 000009C7 50 push ax 0 000009C8 240F and al, 0Fh 0 000009CA 0430 add al, '0' 0 000009CC 3C39 cmp al, '9' 0 000009CE 7602 jbe @F 0 000009D0 0407 add al, -'9' -1 +'A' 3819 @@: 0 000009D2 E8[0000] nearcall disp_al 0 000009D5 58 pop ax 0 000009D6 C3 retn 3823 3824 3825 ; Display number in ax decimal 3826 ; 3827 ; INP: ax = number 3828 ; OUT: displayed using disp_al 3829 ; CHG: none 3830 disp_ax_dec: section_of_function ; ax (no leading zeros) 0 000009D7 53 push bx 0 000009D8 31DB xor bx, bx 3833 .pushax: 0 000009DA 52 push dx 0 000009DB 50 push ax 0 000009DC 08DB or bl, bl 0 000009DE 7405 jz .nobl 0 000009E0 80EB05 sub bl, 5 0 000009E3 F6DB neg bl 3840 .nobl: 0 000009E5 51 push cx 0 000009E6 B91027 mov cx, 10000 0 000009E9 E81B00 call .divide_out 0 000009EC B9E803 mov cx, 1000 0 000009EF E81500 call .divide_out 0 000009F2 B96400 mov cx, 100 0 000009F5 E80F00 call .divide_out 0 000009F8 B10A mov cl, 10 0 000009FA E80A00 call .divide_out 3850 ; (Divisor 1 is useless) 0 000009FD 0430 add al, '0' 0 000009FF E8[0000] nearcall disp_al 0 00000A02 59 pop cx 0 00000A03 58 pop ax 0 00000A04 5A pop dx 0 00000A05 5B pop bx ; Caller's register 0 00000A06 C3 retn 3858 3859 3860 ; INP: ax = number 3861 ; cx = divisor 3862 ; OUT: ax = remainder of operation 3863 ; result displayed 3864 .divide_out: 0 00000A07 52 push dx 0 00000A08 31D2 xor dx, dx 0 00000A0A F7F1 div cx ; 0:ax / cx 0 00000A0C 52 push dx ; remainder 0 00000A0D FECB dec bl 0 00000A0F 7503 jnz .nobl2 0 00000A11 80CF01 or bh, 1 3872 .nobl2: 0 00000A14 08C7 or bh, al 0 00000A16 7405 jz .leadingzero 0 00000A18 0430 add al, '0' 0 00000A1A E8[0000] nearcall disp_al ; display result 3877 .leadingzero: 0 00000A1D 58 pop ax ; remainder 0 00000A1E 5A pop dx 0 00000A1F C3 retn 3881 3882 3883 %ifn _LINK || _LINK_COMPAT 3884 %if !_LOADER 3885 %include "cc.asm" 3886 %endif 3887 3888 3889 %include "bb.asm" 3890 3891 3892 %include "ee.asm" 3893 3894 3895 %include "ff.asm" 3896 3897 3898 %include "hh.asm" 3899 3900 3901 %include "iioo.asm" 3902 %endif 3903 3904 3905 usesection lDEBUG_CODE 3905 ------------------ note: usesection lDEBUG_CODE 3906 3907 %if _PM == 0 && _ELDLINKINFO 3908 ispm: section_of_function 3909 test sp, sp ; NZ, NC 3910 retn 3911 3912 test_d_b_bit: section_of_function 3913 test_high_limit: section_of_function 3914 cmp al, al ; ZR, NC 3915 retn 3916 3917 setes2dx: section_of_function 3918 mov es, dx 3919 retn 3920 3921 call_int2D: section_of_function 3922 int 2Dh 3923 retn 3924 3925 _doscall: section_of_function 3926 doscall_extseg: section_of_function 3927 int 21h 3928 retn 3929 3930 usesection lDEBUG_DATA_ENTRY 3931 dpmi32: db 0 3932 3933 usesection lDEBUG_CODE 3934 %endif 3935 3936 %if _PM 3937 3938 %if _DUALCODE 3939 %assign REPEAT 2 3940 %else 3941 %assign REPEAT 1 3942 %endif 3943 3944 usesection lDEBUG_CODE 3944 ------------------ note: usesection lDEBUG_CODE 3945 %rep REPEAT 3946 ; OUT: NC 3947 ; ZR if in protected mode 3948 ; NZ otherwise 3949 ; STT: - 3950 ; ([internalflags] & nodosloaded, [internalflags] & protectedmode set up) 3951 _CURRENT_SECTION %+ _ispm: 3952 push ax 3953 %if protectedmode & ~0FF00h 3954 %error Internal flags re-ordered, adjust code here 3955 %endif 3956 mov al, byte [ss:internalflags+1] ; get flag byte 3957 and al, protectedmode>>8 ; separate PM flag 3958 xor al, protectedmode>>8 ; ZR if in PM (NC) 3959 pop ax 3960 retn 3961 3962 usesection lDEBUG_CODE2 3963 %endrep 3946 <1> 3947 <1> 3948 <1> 3949 <1> 3950 <1> 3951 <1> _CURRENT_SECTION %+ _ispm: 0 00000A20 50 push ax 3953 <1> %if protectedmode & ~0FF00h 3954 <1> %error Internal flags re-ordered, adjust code here 3955 <1> %endif 0 00000A21 36A0[DD01] mov al, byte [ss:internalflags+1] 0 00000A25 2408 and al, protectedmode>>8 0 00000A27 3408 xor al, protectedmode>>8 0 00000A29 58 pop ax 0 00000A2A C3 retn 3961 <1> 3962 <1> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 3962 ------------------ <1> note: usesection lDEBUG_CODE2 3946 <1> 3947 <1> 3948 <1> 3949 <1> 3950 <1> 3951 <1> _CURRENT_SECTION %+ _ispm: 0 000000A6 50 push ax 3953 <1> %if protectedmode & ~0FF00h 3954 <1> %error Internal flags re-ordered, adjust code here 3955 <1> %endif 0 000000A7 36A0[DD01] mov al, byte [ss:internalflags+1] 0 000000AB 2408 and al, protectedmode>>8 0 000000AD 3408 xor al, protectedmode>>8 0 000000AF 58 pop ax 0 000000B0 C3 retn 3961 <1> 3962 <1> usesection lDEBUG_CODE2 3962 ------------------ <1> note: usesection lDEBUG_CODE2 3964 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 3964 ------------------ note: usesection lDEBUG_CODE 3965 ispm equ _CURRENT_SECTION %+ _ispm 3966 check_section_of ispm 3967 3968 %endif 3969 3970 3971 setpspdbg: 3972 %if _PM 0 00000A2B 8B1E[980C] mov bx, word [pspdbg] 3974 %else 3975 mov bx, ss ; = word [pspdbg] (if _PM=0 or in 86M) 3976 %endif 3977 3978 setpsp: 3979 %if _APPLICATION || _DEVICE 3980 %if _BOOTLDR 0 00000A2F F606[DD01]40 testopt [internalflags], nodosloaded 0 00000A34 7403E9A400 jnz .ret ; no PSPs --> 3983 %endif 3984 3985 %if _USESDA 0 00000A39 833E[CE0C]FF cmp word [pSDA+0], byte -1 0 00000A3E 7411 je .int21 3988 3989 .86m: 0 00000A40 1E push ds 0 00000A41 56 push si 0 00000A42 BE[D00C] mov si, pSDA + so16aSegSel 0 00000A45 E8FA0E call update_dosdata_segment 0 00000A48 C574FE lds si, [si - so16aSegSel] 0 00000A4B 895C10 mov word [si+10h], bx ; set PSP segment 0 00000A4E 5E pop si 0 00000A4F 1F pop ds 0 00000A50 C3 retn 3999 4000 .int21: 4001 %endif 0 00000A51 B450 mov ah, 50h 4003 %if _PM 0 00000A53 E8CAFF call ispm 0 00000A56 7503 jnz .int21_86m 4006 %if _NOEXTENDER 0 00000A58 E979FE jmp _doscall.pm ; insure non-extended (set to bx = PSP segment) 4008 %else 4009 mov ax, 0002h 4010 int 31h ; segment to selector 4011 xchg bx, ax ; bx = selector 4012 mov ah, 50h ; reset to function number 4013 %endif 4014 .int21_86m: 4015 %endif 0 00000A5B EB74 jmp _int21 4017 %else 4018 retn 4019 %endif 4020 4021 4022 getpsp: 4023 %if _APPLICATION || _DEVICE 4024 %if _BOOTLDR 0 00000A5D 31DB xor bx, bx ; = placeholder value if no PSPs 0 00000A5F F606[DD01]40 testopt [internalflags], nodosloaded 0 00000A64 7577 jnz .ret ; no PSPs --> 4028 %endif 4029 %if _USESDA 0 00000A66 833E[CE0C]FF cmp word [pSDA+0], byte -1 0 00000A6B 7411 je .int21 0 00000A6D 1E push ds 0 00000A6E 56 push si 0 00000A6F BE[D00C] mov si, pSDA + so16aSegSel 0 00000A72 E8CD0E call update_dosdata_segment 0 00000A75 C574FE lds si, [si - so16aSegSel] 0 00000A78 8B5C10 mov bx, word [si + 10h] ; bx = PSP segment 0 00000A7B 5E pop si 0 00000A7C 1F pop ds 0 00000A7D C3 retn 4041 4042 .int21: 4043 %endif 0 00000A7E B451 mov ah, 51h 4045 %if _PM 0 00000A80 E89DFF call ispm 0 00000A83 7503 jnz .int21_86m 4048 %if _NOEXTENDER 0 00000A85 E94CFE jmp _doscall.pm ; insure non-extended (bx = PSP segment) 4050 %else 4051 call _int21 ; get PSP as a selector 4052 push bx 4053 dualcall selector_to_segment 4054 pop bx ; bx = PSP segment 4055 retn 4056 %endif 4057 .int21_86m: 4058 %endif 0 00000A88 EB47 jmp _int21 ; in 86 Mode call DOS the normal way 4060 %else 4061 xor bx, bx ; = placeholder value if no PSPs 4062 retn 4063 %endif 4064 4065 4066 dual2function 4067 _doscall_return_es: section_of_function 4068 _doscall_return_es_parameter_es_ds: section_of_function 4069 lframe dual2distance 4070 lpar word, es_ds_value 4071 lpar_return 4072 %if _PM 4073 lvar word, int_number 0 00000A8A 5589E550 lenter 0 00000A8E C746FE2100 mov word [bp + ?int_number], 21h 0 00000A93 57 push di 0 00000A94 368B3E[6802] mov di, word [ss:pm_2_86m_0] 0 00000A99 36FFA5[E214] jmp near word [ss:.table + di] 4079 4080 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 4080 ------------------ note: usesection lDEBUG_DATA_ENTRY 4081 ; REM: Dispatch table in section lDEBUG_CODE 4082 align 2, db 0 4083 .table: 0 000014E2 [BA0A] dw .86m 0 000014E4 [9E0A] dw .pm 4086 4087 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 4087 ------------------ note: usesection lDEBUG_CODE 4088 .pm: 0 00000A9E 5F pop di 0 00000A9F FF7606 push word [bp + ?es_ds_value] 0 00000AA2 FF7606 push word [bp + ?es_ds_value] 0 00000AA5 FF76FE push word [bp + ?int_number] 0 00000AA8 FF7600 push word [bp + ?frame_bp] 0 00000AAB E845FEEB02[E40A] dualcall intcall_return_parameter_es_parameter_ds 0 00000AB2 8F4606 pop word [bp + ?es_ds_value] ; discard returned ds 0 00000AB5 8F4606 pop word [bp + ?es_ds_value] ; get es 0 00000AB8 EB10 jmp .ret 4098 .86m: 0 00000ABA 5F pop di 4100 %else 4101 lenter 4102 %endif 0 00000ABB 06 push es 0 00000ABC 1E push ds 0 00000ABD 8E5E06 mov ds, word [bp + ?es_ds_value] 0 00000AC0 8E4606 mov es, word [bp + ?es_ds_value] 0 00000AC3 CD21 int 21h 0 00000AC5 8C4606 mov word [bp + ?es_ds_value], es 0 00000AC8 1F pop ds 0 00000AC9 07 pop es 4111 .ret: 0 00000ACA 89EC5D lleave 0 00000ACD E867FE dual2return 0 00000AD0 CB lret 4115 4116 4117 ; Execute real Int21 instruction. If this is in PM it might get extended. 4118 _int21: 4119 %if _APPLICATION || _DEVICE 4120 %if _BOOTLDR 0 00000AD1 9C pushf 0 00000AD2 36F606[DD01]40 testopt [ss:internalflags], nodosloaded 0 00000AD8 7504 jnz .reterr ; no Int21 --> (throw?) 0 00000ADA 9D popf 4125 %endif 0 00000ADB CD21 int 21h 4127 setpsp.ret: equ $ 4128 getpsp.ret: equ $ 0 00000ADD C3 retn 4130 %if _BOOTLDR 4131 .reterr: 0 00000ADE 9D popf 0 00000ADF B80100 mov ax, 1 0 00000AE2 F9 stc 0 00000AE3 C3 retn 4136 %endif 4137 %else 4138 mov ax, 1 4139 stc 4140 retn 4141 %endif 4142 4143 4144 %if _PM 4145 dualfunction 4146 intcall_return_parameter_es_parameter_ds: section_of_function 4147 lframe dualdistance 4148 lpar word, es_value 4149 lpar word, ds_value 4150 lpar_return 4151 lpar word, int_number 4152 lpar word, bp_value 4153 lvar 32h, 86m_call_struc 0 00000AE4 5589E58D66CE lenter 0 00000AEA 06 push es 0 00000AEB 897ECE mov word [bp + ?86m_call_struc +00h], di ; edi 0 00000AEE 8976D2 mov word [bp + ?86m_call_struc +04h], si ; esi 0 00000AF1 895EDE mov word [bp + ?86m_call_struc +10h], bx ; ebx 0 00000AF4 8956E2 mov word [bp + ?86m_call_struc +14h], dx ; edx 0 00000AF7 894EE6 mov word [bp + ?86m_call_struc +18h], cx ; ecx 0 00000AFA 8946EA mov word [bp + ?86m_call_struc +1Ch], ax ; eax 0 00000AFD 8B4606 mov ax, word [bp + ?bp_value] 0 00000B00 8946D6 mov word [bp + ?86m_call_struc +08h], ax ; bp 0 00000B03 B000 mov al, 0 ; (preserve flags!) 0 00000B05 9F lahf 0 00000B06 86C4 xchg al, ah 0 00000B08 8946EE mov word [bp + ?86m_call_struc +20h], ax ; flags 0 00000B0B 31C0 xor ax, ax 0 00000B0D 8946DC mov word [bp + ?86m_call_struc +0Ch + 2], ax 0 00000B10 8946DA mov word [bp + ?86m_call_struc +0Ch], ax 0 00000B13 8946FC mov word [bp + ?86m_call_struc +2Eh], ax ; sp 0 00000B16 8946FE mov word [bp + ?86m_call_struc +30h], ax ; ss 0 00000B19 8B460C mov ax, word [bp + ?es_value] ; usually [pspdbg] 0 00000B1C 8946F0 mov word [bp + ?86m_call_struc +22h], ax ; es 0 00000B1F 8B460A mov ax, word [bp + ?ds_value] ; usually [pspdbg] 0 00000B22 8946F2 mov word [bp + ?86m_call_struc +24h], ax ; ds 0 00000B25 16 push ss 0 00000B26 07 pop es ; => stack 0 00000B27 8D7ECE lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 0 00000B2A 660FB7FF _386 movzx edi, di ; (previously checked b[dpmi32] here) 0 00000B2E 8B5E08 mov bx, word [bp + ?int_number] ; int# 0 00000B31 31C9 xor cx, cx 0 00000B33 B80003 mov ax, 0300h 0 00000B36 CD31 int 31h 0 00000B38 8A66EE mov ah, byte [bp + ?86m_call_struc +20h] ; flags 0 00000B3B 9E sahf 0 00000B3C 8B7ECE mov di, word [bp + ?86m_call_struc +00h] ; edi 0 00000B3F 8B76D2 mov si, word [bp + ?86m_call_struc +04h] ; esi 0 00000B42 8B5EDE mov bx, word [bp + ?86m_call_struc +10h] ; ebx 0 00000B45 8B56E2 mov dx, word [bp + ?86m_call_struc +14h] ; edx 0 00000B48 8B4EE6 mov cx, word [bp + ?86m_call_struc +18h] ; ecx 0 00000B4B 8B46EA mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 0 00000B4E FF76F0 push word [bp + ?86m_call_struc +22h] ; return es value 0 00000B51 8F460C pop word [bp + ?es_value] ; in the parameter 0 00000B54 FF76F2 push word [bp + ?86m_call_struc +24h] ; return ds value 0 00000B57 8F460A pop word [bp + ?ds_value] ; in the parameter 0 00000B5A 07 pop es 0 00000B5B 89EC5D lleave 0 00000B5E E8D6FD dualreturn 0 00000B61 CA0400 lret 4201 4202 dualfunction 4203 intcall: section_of_function 4204 lframe dualdistance 4205 lpar word, es_ds_value 4206 lpar word, int_number 0 00000B64 5589E5 lenter 0 00000B67 FF7608 push word [bp + ?es_ds_value] ; es 0 00000B6A FF7608 push word [bp + ?es_ds_value] ; ds 0 00000B6D FF7606 push word [bp + ?int_number] ; int number 0 00000B70 FF7600 push word [bp + ?frame_bp] ; bp 0 00000B73 E87DFDEB02[E40A] dualcall intcall_return_parameter_es_parameter_ds 4213 ; (discard returned parameters ?es_value, ?ds_value, done by lleave) 0 00000B7A 89EC5D lleave , forcerestoresp 0 00000B7D E8B7FD dualreturn 0 00000B80 CA0400 lret 4217 4218 4219 %if _EXTENSIONS 4220 intcall_ext_return_es: section_of_function 4221 lframe 6 4222 lpar word, es_ds_value 4223 lpar word, int_number 4224 lpar_return 0 00000B83 5589E5 lenter 0 00000B86 FF760A push word [bp + ?es_ds_value] ; es 0 00000B89 FF760A push word [bp + ?es_ds_value] ; ds 0 00000B8C FF7608 push word [bp + ?int_number] ; int number 0 00000B8F FF7600 push word [bp + ?frame_bp] ; bp 0 00000B92 E85EFDEB02[E40A] dualcall intcall_return_parameter_es_parameter_ds 0 00000B99 8F460A pop word [bp + ?es_ds_value] ; discard ds 0 00000B9C 8F460A pop word [bp + ?es_ds_value] ; return es 0 00000B9F 5D lleave , optimiserestoresp 0 00000BA0 C3 retn 4235 4236 4237 doscall_extseg: section_of_function 0 00000BA1 9C pushf 0 00000BA2 E87BFE call ispm 0 00000BA5 7510 jnz .rm 4241 subcpu 286 0 00000BA7 9D popf 4243 .pm: 0 00000BA8 36FF36[2802] push word [ss:extseg] 0 00000BAD 6A21 push 21h 0 00000BAF E841FDEB02[640B] dualcall intcall 0 00000BB6 C3 retn 4248 subcpureset 4249 .rm: 0 00000BB7 9D popf 0 00000BB8 E916FF jmp _int21 4252 %endif 4253 4254 call_int2D: section_of_function 0 00000BBB E862FE call ispm 0 00000BBE 750F jnz short .rm 4257 subcpu 286 0 00000BC0 36FF36[980C] push word [ss:pspdbg] ; es ds value. generally unused 0 00000BC5 6A2D push 2Dh ; interrupt 2Dh 0 00000BC7 E829FDEB02[640B] dualcall intcall ; call it 0 00000BCE C3 retn 4262 subcpureset 4263 .rm: 0 00000BCF CD2D int 2Dh ; directly call int 2Dh 0 00000BD1 C3 retn 4266 4267 4268 ; Called in PM only, ds unknown. 4269 ; 4270 ; INP: - 4271 ; OUT: CY if no DOS extender available ("MS-DOS" on Int2F.168A) 4272 ; NC if DOS extender available 4273 ; CHG: - 4274 isextenderavailable: 4275 subcpu 286 0 00000BD2 1E push ds 0 00000BD3 06 push es 0 00000BD4 60 pusha 0 00000BD5 16 push ss 0 00000BD6 1F pop ds 0 00000BD7 BE[0000] mov si, msg.msdos 0 00000BDA 660FB7F6 _386 movzx esi, si 0 00000BDE B88A16 mov ax, 168Ah 0 00000BE1 CD2F int 2Fh 0 00000BE3 3C01 cmp al, 1 ; CY if al is zero 0 00000BE5 F5 cmc ; NC if al is zero, CY else 0 00000BE6 61 popa 0 00000BE7 07 pop es 0 00000BE8 1F pop ds 0 00000BE9 C3 retn 4291 subcpureset 4292 4293 nodosextinst: 0 00000BEA 16 push ss 0 00000BEB 1F pop ds 0 00000BEC B83D01 mov ax, 013Dh 0 00000BEF E8740B call setrc 0 00000BF2 BA[0000] mov dx, nodosext 0 00000BF5 E9[0000] jmp putsz 4300 %endif 4301 4302 4303 %ifn _LINK || _LINK_COMPAT 4304 %if !_LOADER 4305 %include "ll.asm" 4306 %endif 4307 4308 4309 %include "mm.asm" 4310 %endif 4311 4312 4313 usesection lDEBUG_CODE 4313 ------------------ note: usesection lDEBUG_CODE 4314 4315 %if !_LOADER 4316 ; K command - enter Kommand line in new style 4317 ; N command - change the Name of the program being debugged 4318 ; 4319 ; N command is subject to weird Microsoft compatibility if 4320 ; an options2 flag is set. In this mode, the entire line_in 4321 ; contents after the N command are used for the command line 4322 ; tail rather than only the tail after the program name. 4323 ; (Yes, really.) Also, the debuggee ds is assumed to point 4324 ; to a PSP and the FCBs and command line tail are written 4325 ; to this segment. 4326 %if _MS_N_COMPAT 4327 nn: 0 00000BF8 800E[E301]80 setopt [internalflags2], dif2_nn_capitalise 4329 ; prepare old style (MS Debug compatibility) 0 00000BFD F606[AA01]02 testopt [options2], opt2_nn_capitalise 0 00000C02 7505 jnz @F ; leave it set --> 0 00000C04 8026[E301]7F clropt [internalflags2], dif2_nn_capitalise 4333 ; disable old style, use new style 4334 @@: 4335 0 00000C09 800E[E301]40 setopt [internalflags2], dif2_nn_compat 4337 ; prepare old style (MS Debug compatibility) 0 00000C0E F606[AA01]01 testopt [options2], opt2_nn_compat 0 00000C13 750C jnz @FF ; leave it set --> 0 00000C15 EB05 jmp @F 4341 kk: 0 00000C17 8026[E301]7F clropt [internalflags2], dif2_nn_capitalise 4343 ; also disable capitalisation 4344 @@: 0 00000C1C 8026[E301]BF clropt [internalflags2], dif2_nn_compat 4346 ; disable old style, use new style 4347 @@: 4348 %else 4349 kk: 4350 nn: 4351 %endif 0 00000C21 16 push ss 0 00000C22 07 pop es 4354 4355 %if _MS_N_COMPAT 0 00000C23 4E dec si ; -> first non-blank 4357 @@: 0 00000C24 4E dec si ; -> before prior start of command 0 00000C25 803C20 cmp byte [si], 32 ; blank ? 0 00000C28 74FA je @B 0 00000C2A 803C09 cmp byte [si], 9 0 00000C2D 74F5 je @B ; yes, decrement --> 0 00000C2F 803C2C cmp byte [si], ',' 0 00000C32 74F0 je @B 0 00000C34 46 inc si ; restore -> start of command (first blank, if any) 0 00000C35 AC lodsb ; make al = first text byte, si -> after 4367 %endif 4368 4369 %if _BOOTLDR 4370 %if _APPLICATION || _DEVICE 0 00000C36 36F606[DD01]40 testopt [ss:internalflags], nodosloaded 0 00000C3C 740C jz @F 4373 %endif 0 00000C3E BA[0000] mov dx, msg.nobootsupp 0 00000C41 B81901 mov ax, 0119h 0 00000C44 E81F0B call setrc 0 00000C47 E9[0000] jmp putsz 4378 @@: 4379 %endif 4380 %if _APPLICATION || _DEVICE 4381 %if _MS_N_COMPAT 0 00000C4A F606[E301]40 testopt [internalflags2], dif2_nn_compat 0 00000C4F 7405 jz @F 0 00000C51 E89800 call nn_copy_to_line_out 0 00000C54 4E dec si 0 00000C55 AC lodsb ; restore al 4387 @@: 4388 %endif 0 00000C56 BF8000 mov di, DTA ; destination address 4390 %if _MS_N_COMPAT ; (not needed if not including the blank scan) 0 00000C59 E8[0000] call skipcomm0 ; skip blanks before program load filename 4392 %endif 4393 4394 ; Copy and canonicalize file name. 4395 nn1: 0 00000C5C 81FF[6E01] cmp di, N_BUFFER_END 0 00000C60 7313 jae .toolong 0 00000C62 E88C01 call ifsep ; check for separators CR, blank, tab, comma, ;, = 0 00000C65 742E je nn3 ; if end of file name 0 00000C67 363A06[FF0C] cmp al, byte [ss:swch1] 4401 ; The use of ss here appears to be intended to 4402 ; allow loading from ds different from the 4403 ; data entry and PSP segment, However, the 4404 ; subsequent copy of the command tail around 4405 ; nn4 does not participate in this scheme. 4406 ; So if this is used make sure to adjust that. 0 00000C6C 7427 je nn3 ; if '/' (and '/' is the switch character) 0 00000C6E E8[0000] call capitalise 0 00000C71 AA stosb 0 00000C72 AC lodsb 0 00000C73 EBE7 jmp short nn1 ; back for more 4412 4413 .toolong: 4414 nn4.toolong: 0 00000C75 16 push ss 0 00000C76 1F pop ds 0 00000C77 BA[0000] mov dx, msg.n_toolongname 0 00000C7A E8[0000] call putsz 0 00000C7D B82601 mov ax, 0126h 0 00000C80 E8E30A call setrc 0 00000C83 BF[6B01] mov di, N_BUFFER_END - 3 0 00000C86 B000 mov al, 0 ; truncate the name 0 00000C88 AA stosb 0 00000C89 A2[FC0D] mov byte [fileext], al ; invalid / none 0 00000C8C 893E[8E0E] mov word [execblk.cmdline], di 0 00000C90 B8000D mov ax, 13 << 8 ; 0 in low byte (tail length), CR in high byte 0 00000C93 AB stosw 0 00000C94 C3 retn 4429 4430 4431 nn3: 0 00000C95 16 push ss 0 00000C96 1F pop ds 0 00000C97 B000 mov al, 0 ; null terminate the file name string 0 00000C99 AA stosb 0 00000C9A 893E[8E0E] mov word [execblk.cmdline], di 4437 ; save start of command tail 4438 4439 %if _DEBUG4 4440 push dx 4441 mov dx, DTA 4442 call d4disp_msg 4443 mov dx, crlf 4444 call d4disp_msg 4445 pop dx 4446 %endif 4447 ; Determine file extension 0 00000C9E 81FF8100 cmp di, DTA+1 0 00000CA2 7438 je nn3d ; if no file name at all 0 00000CA4 81FF8500 cmp di, DTA+5 0 00000CA8 7230 jb nn3c ; if no extension (name too short) 0 00000CAA B008 mov al, EXT_HEX 0 00000CAC 817DFB2E48 cmp word [di-5], ".H" 0 00000CB1 7507 jne nn3a ; if not .HEX 0 00000CB3 817DFD4558 cmp word [di-3], "EX" 0 00000CB8 7422 je nn3d ; if .HEX 4457 nn3a: 0 00000CBA B004 mov al, EXT_EXE 0 00000CBC 817DFB2E45 cmp word [di-5], ".E" 0 00000CC1 7507 jne nn3b ; if not .EXE 0 00000CC3 817DFD5845 cmp word [di-3], "XE" 0 00000CC8 7412 je nn3d ; if .EXE 4463 nn3b: 0 00000CCA B002 mov al, EXT_COM 0 00000CCC 817DFB2E43 cmp word [di-5], ".C" 0 00000CD1 7507 jne nn3c ; if not .COM 0 00000CD3 817DFD4F4D cmp word [di-3], "OM" 0 00000CD8 7402 je nn3d ; if .COM 4469 nn3c: 0 00000CDA B001 mov al, EXT_OTHER 4471 nn3d: 0 00000CDC A2[FC0D] mov byte [fileext], al 4473 4474 ; Finish the N command 0 00000CDF 57 push di 4476 %if _MS_N_COMPAT 0 00000CE0 F606[E301]40 testopt [internalflags2], dif2_nn_compat 0 00000CE5 751D jnz @F 0 00000CE7 E80200 call nn_copy_to_line_out 0 00000CEA EB18 jmp @F 4481 4482 ; INP: si - 1 -> command line tail 4483 ; OUT: line_out has tail, terminated by 0 or 13 (CR) 4484 ; CHG: di, al 4485 nn_copy_to_line_out: 0 00000CEC 56 push si 4487 %endif 0 00000CED BF[C20B] mov di, line_out 0 00000CF0 4E dec si 4490 nn4: 0 00000CF1 AC lodsb ; copy the remainder to line_out 0 00000CF2 F606[E301]80 testopt [internalflags2], dif2_nn_capitalise 0 00000CF7 7403 jz .nocaps 0 00000CF9 E8[0000] call capitalise 4495 .nocaps: 0 00000CFC AA stosb 0 00000CFD E8[0000] call iseol?.notsemicolon 0 00000D00 75EF jne nn4 4499 %if _MS_N_COMPAT 0 00000D02 5E pop si 0 00000D03 C3 retn 4502 4503 @@: 4504 %endif 0 00000D04 E81C0C call InDOS 0 00000D07 740E jz .fcb_setup 4507 %if _DEVICE 0 00000D09 F606[F201]40 testopt [internalflags6], dif6_device_mode 0 00000D0E 7505 jnz @F 4510 %endif 0 00000D10 8326[A40E]00 and word [reg_eax], 0 4512 @@: 0 00000D15 EB23 jmp .fcb_none 4514 4515 .fcb_setup: 4516 ; Set up FCBs. 0 00000D17 BE[C20B] mov si, line_out 0 00000D1A BF5C00 mov di, 5Ch 0 00000D1D E87A00 call nn6 ; do first FCB 4520 %if _DEVICE 0 00000D20 F606[F201]40 testopt [internalflags6], dif6_device_mode 0 00000D25 7503 jnz @F 4523 %endif 0 00000D27 A2[A40E] mov byte [reg_eax], al 4525 @@: 0 00000D2A BF6C00 mov di, 6Ch 0 00000D2D E86A00 call nn6 ; second FCB 4528 %if _DEVICE 0 00000D30 F606[F201]40 testopt [internalflags6], dif6_device_mode 0 00000D35 7503 jnz @F 4531 %endif 0 00000D37 A2[A50E] mov byte [reg_eax+1], al 4533 @@: 4534 .fcb_none: 4535 4536 ; Copy command tail. 0 00000D3A BE[C20B] mov si, line_out 0 00000D3D 5F pop di 0 00000D3E 81FF[6C01] cmp di, N_BUFFER_END - 2 0 00000D42 7203E92EFF jae .toolong 0 00000D47 57 push di ; -> counter byte 0 00000D48 47 inc di ; -> first byte of buffer 0 00000D49 8D5D7F lea bx, [di + 127] ; -> behind last byte of PSP target buffer 4544 ; (within 128 bytes the CR must be written) 0 00000D4C B8[6E01] mov ax, N_BUFFER_END ; -> behind last byte in our N buffer 0 00000D4F 39C3 cmp bx, ax ; use whichever limit is smaller 0 00000D51 7202 jb @F 0 00000D53 89C3 mov bx, ax ; N buffer is smaller, use it as limit 4549 @@: 4550 nn5: 0 00000D55 39DF cmp di, bx ; can store one more (possibly CR) ? 0 00000D57 7331 jae .toolong ; no --> 0 00000D59 AC lodsb 0 00000D5A AA stosb ; store byte 0 00000D5B E8[0000] call iseol?.notsemicolon; end of string ? 0 00000D5E 75F5 jne nn5 ; if not end of string --> 4557 .toolong_terminate: ; jump destination from .toolong 0 00000D60 C645FF0D mov byte [di - 1], 13 ; (just overwrite this unconditionally) 0 00000D64 57 push di 0 00000D65 89F9 mov cx, di 0 00000D67 81E9[6E01] sub cx, N_BUFFER_END 0 00000D6B F7D9 neg cx 0 00000D6D 31C0 xor ax, ax 0 00000D6F F3AA rep stosb 0 00000D71 5F pop di 0 00000D72 58 pop ax ; recover old DI 0 00000D73 97 xchg ax, di 0 00000D74 29F8 sub ax, di ; compute length of tail 4569 %if _MS_N_COMPAT 0 00000D76 89C1 mov cx, ax 4571 %endif 0 00000D78 48 dec ax 0 00000D79 48 dec ax 0 00000D7A AA stosb 4575 %if _MS_N_COMPAT 0 00000D7B F606[E301]40 testopt [internalflags2], dif2_nn_compat 0 00000D80 7407 jz @F 0 00000D82 8E06[C40E] mov es, word [reg_ds] ; modify current ds, assuming a PSP 0 00000D86 E8[0000] call ll_copy_cmdline_and_fcbs.have_cx 4580 @@: 4581 %endif 4582 %if _DEBUG4 4583 mov dx, DTA 4584 call d4disp_msg 4585 mov dx, crlf 4586 call d4disp_msg 4587 %endif 0 00000D89 C3 retn ; done 4589 4590 .toolong: 0 00000D8A BA[0000] mov dx, msg.n_toolongtail 0 00000D8D E8[0000] call putsz 0 00000D90 B82701 mov ax, 0127h 0 00000D93 E8D009 call setrc 0 00000D96 89DF mov di, bx 0 00000D98 EBC6 jmp .toolong_terminate 4597 4598 4599 ; Subroutine to process an FCB. 4600 ; 4601 ; INP: di -> FCB 4602 ; si -> input 4603 nn6: 0 00000D9A AC lodsb 0 00000D9B E8[0000] call iseol?.notsemicolon 0 00000D9E 740B je nn7 ; if end 0 00000DA0 E84E00 call ifsep 0 00000DA3 74F5 je nn6 ; if separator (other than CR) 0 00000DA5 3A06[FE0C] cmp al, byte [switchar] 0 00000DA9 741C je nn10 ; if switch character 4611 nn7: 0 00000DAB 4E dec si 0 00000DAC B80129 mov ax, 2901h ; parse filename 4614 doscall 0 00000DAF E816FB nearcall _doscall 0 00000DB2 50 push ax ; save AL 4616 nn8: 0 00000DB3 AC lodsb ; skip till separator 0 00000DB4 E83A00 call ifsep 0 00000DB7 7406 je nn9 ; if separator character (including CR) 0 00000DB9 3A06[FF0C] cmp al, byte [swch1] 0 00000DBD 75F4 jne nn8 ; if not switchar (sort of) 4622 nn9: 0 00000DBF 4E dec si 0 00000DC0 58 pop ax ; recover AL 0 00000DC1 3C01 cmp al, 1 0 00000DC3 7501 jne nn9a ; if not 1 0 00000DC5 48 dec ax 4628 nn9a: 0 00000DC6 C3 retn 4630 4631 ; Handle a switch (differently). 0 00000DC7 AC nn10: lodsb 0 00000DC8 E8[0000] call iseol?.notsemicolon 0 00000DCB 74DE je nn7 ; if end of string 0 00000DCD E82100 call ifsep 0 00000DD0 74F5 je nn10 ; if another separator (other than CR) 0 00000DD2 B000 mov al, 0 0 00000DD4 AA stosb 0 00000DD5 4E dec si 0 00000DD6 AC lodsb 0 00000DD7 3C61 cmp al, 'a' 0 00000DD9 7206 jb nn11 ; if not a lower case letter 0 00000DDB 3C7A cmp al, 'z' 0 00000DDD 7702 ja nn11 0 00000DDF 24DF and al, TOUPPER ; convert to upper case 0 00000DE1 AA nn11: stosb 0 00000DE2 B82020 mov ax, 32<<8|32 0 00000DE5 AB stosw 0 00000DE6 AB stosw 0 00000DE7 AB stosw 0 00000DE8 AB stosw 0 00000DE9 AB stosw 0 00000DEA 31C0 xor ax, ax 0 00000DEC AB stosw 0 00000DED AB stosw 0 00000DEE AB stosw 0 00000DEF AB stosw 0 00000DF0 C3 retn ; return with al = 0 4659 4660 4661 ; Compare character with separators 4662 ; 4663 ; INP: al = character 4664 ; OUT: ZR if al is CR, NUL, blank, tab, comma, semicolon, or equal sign 4665 ; NZ else 4666 ; REM: This is only used for parsing FCBs. 4667 ifsep: section_of_function 0 00000DF1 E8[0000] call iseol? ; semicolon or CR or NUL 0 00000DF4 740E je .return 0 00000DF6 3C20 cmp al, 32 0 00000DF8 740A je .return 0 00000DFA 3C09 cmp al, 9 0 00000DFC 7406 je .return 0 00000DFE 3C2C cmp al, ',' 0 00000E00 7402 je .return 0 00000E02 3C3D cmp al, '=' 4677 .return: 0 00000E04 C3 retn 4679 %endif 4680 %endif 4681 4682 4683 %if _ELDLINKINFO && !_PM 4684 verifysegm_or_error: section_of_function 4685 verifysegm: section_of_function 4686 clc 4687 retn 4688 %endif 4689 4690 ; Ensure segment in bx is writeable 4691 ; 4692 ; INP: bx = selector/segment 4693 ; OUT: NC if in 86M, bx unchanged 4694 ; NC if in PM and bx not a code segment, bx unchanged 4695 ; NC if in PM and was a code segment, 4696 ; bx = word [scratchsel], set up to mirror INP:bx selector 4697 ; CY if in PM and a failure occurred, segment not writeable 4698 ; CHG: bx 4699 ; STT: ss = debugger data selector 4700 %if _PM 4701 verifysegm_or_error: section_of_function 0 00000E05 53 push bx 0 00000E06 E82100 call verifysegm 0 00000E09 7204 jc .ro 0 00000E0B 83C402 add sp, 2 ; (discard bx on stack) 0 00000E0E C3 retn 4707 4708 .ro: 0 00000E0F 16 push ss 0 00000E10 07 pop es 0 00000E11 E8[0000] call ee0a 0 00000E14 BF[0000] mov di, msg.readonly_verifysegm.selector 0 00000E17 58 pop ax ; get original selector 0 00000E18 E8[0000] call hexword 0 00000E1B BA[0000] mov dx, msg.readonly_verifysegm 0 00000E1E E8[0000] call putsz_error 0 00000E21 B80901 mov ax, 0109h 0 00000E24 E83F09 call setrc 0 00000E27 E9D6F1 jmp cmd3 4720 4721 4722 verifysegm: section_of_function 0 00000E2A E8F3FB call ispm 0 00000E2D 7537 jnz .rm ; (NC) 0 00000E2F 50 push ax 0 00000E30 06 push es 0 00000E31 66 _386_o32 ; push edi 0 00000E32 57 push di 0 00000E33 55 push bp 0 00000E34 89E5 mov bp, sp 0 00000E36 83EC08 sub sp, 8 0 00000E39 16 push ss 0 00000E3A 07 pop es 0 00000E3B 89E7 mov di, sp 0 00000E3D 660FB7FF _386 movzx edi, di 0 00000E41 B80B00 mov ax, 000Bh ; get descriptor 0 00000E44 CD31 int 31h 0 00000E46 7217 jc @F 0 00000E48 F6450508 test byte [di+5], 8 ; code segment ? 0 00000E4C 7411 jz @F ; (NC) no --> 0 00000E4E 806505F3 and byte [di+5], 0F3h ; reset CODE+conforming attr 0 00000E52 804D0502 or byte [di+5], 2 ; set writable 0 00000E56 8B1E[0000] mov bx, word [scratchsel] 0 00000E5A B80C00 mov ax, 000Ch 0 00000E5D CD31 int 31h 4746 @@: 0 00000E5F 89EC mov sp, bp 0 00000E61 5D pop bp 0 00000E62 66 _386_o32 ; pop edi 0 00000E63 5F pop di 0 00000E64 07 pop es 0 00000E65 58 pop ax 4753 .rm: 4754 .retn: 0 00000E66 C3 retn 4756 4757 subcpu 286 4758 ; INP: dx = 86 Mode segment to access 4759 ; OUT: bx = scratch selector, addressing that segment, 4760 ; limit set to 64 KiB (allow all 16-bit accesses) 4761 ; CHG: - 4762 ; STT: ss = lDEBUG_DATA_ENTRY selector, in PM 4763 setrmsegm: section_of_function 0 00000E67 368B1E[0000] mov bx, word [ss:scratchsel] 0 00000E6C E81100 call setrmaddr 4766 4767 ; INP: bx = selector 4768 ; OUT: limit set to 0FFFFh 4769 ; STT: in PM 4770 setrmlimit: section_of_function 0 00000E6F 50 push ax 0 00000E70 51 push cx 0 00000E71 52 push dx 0 00000E72 31C9 xor cx, cx 4775 ; _386 dec cx ; limit 0FFFF_FFFFh on 386+ 4776 ; We don't want that here. All users expect a 64 KiB segment. 0 00000E74 BAFFFF mov dx, -1 ; limit 0FFFFh on 286 0 00000E77 B80800 mov ax, 8 0 00000E7A CD31 int 31h ; set limit 0 00000E7C 5A pop dx ; restore base segment 0 00000E7D 59 pop cx 0 00000E7E 58 pop ax 0 00000E7F C3 retn 4784 4785 setrmaddr: ;<--- set selector in BX to segment address in DX 4786 .: 0 00000E80 50 push ax 0 00000E81 51 push cx 0 00000E82 52 push dx 0 00000E83 89D1 mov cx, dx 0 00000E85 C1E204 shl dx, 4 0 00000E88 C1E90C shr cx, 12 ; cx:dx = base address 0 00000E8B B80700 mov ax, 7 0 00000E8E CD31 int 31h ; set base 0 00000E90 5A pop dx 0 00000E91 59 pop cx 0 00000E92 58 pop ax 0 00000E93 C3 retn 4799 4800 subcpureset 4801 %endif 4802 4803 ; Read a byte relative to cs:eip 4804 ; 4805 ; INP: reg_cs, reg_eip 4806 ; cx = (signed) eip adjustment 4807 ; OUT: al = byte at that address 4808 ; (e)bx = new offset (eip+adjustment) 4809 ; CHG: - 4810 getcseipbyte: 0 00000E94 06 push es 4812 %if _PM 0 00000E95 8B1E[D00E] mov bx, word [reg_cs] 0 00000E99 8EC3 mov es, bx 0 00000E9B E8F7F9 call test_d_b_bit 0 00000E9E 7416 jz .16 4817 [cpu 386] 0 00000EA0 668B1E[DC0E] mov ebx, dword [reg_eip] 0 00000EA5 6652 push edx 0 00000EA7 660FBFD1 movsx edx, cx 0 00000EAB 6601D3 add ebx, edx 4822 ..@getcseipbyte_fault_skip_6_near_call: 0 00000EAE 26678A03 mov al, byte [es:ebx] 0 00000EB2 665A pop edx 0 00000EB4 07 pop es 0 00000EB5 C3 retn 4827 __CPU__ 4828 .16: 4829 %else 4830 mov es, word [reg_cs] 4831 %endif 0 00000EB6 8B1E[DC0E] mov bx, word [reg_eip] 0 00000EBA 01CB add bx, cx 4834 ..@getcseipbyte_fault_skip_2_near_call: 0 00000EBC 268A07 mov al, byte [es:bx] 0 00000EBF 07 pop es 0 00000EC0 C3 retn 4838 4839 ; Write to a byte relative to cs:eip 4840 ; 4841 ; INP: reg_cs, reg_eip 4842 ; cx = (signed) eip adjustment 4843 ; al = source byte to write 4844 ; OUT: NC if apparently written 4845 ; CY if failed to get a writeable selector 4846 ; CHG: (e)bx 4847 setcseipbyte: 0 00000EC1 06 push es 4849 %if _PM 0 00000EC2 8B1E[D00E] mov bx, word [reg_cs] 0 00000EC6 E861FF call verifysegm 0 00000EC9 7226 jc .ret 0 00000ECB 8EC3 mov es, bx 0 00000ECD E8C5F9 call test_d_b_bit 0 00000ED0 7415 jz .16 4856 [cpu 386] 0 00000ED2 668B1E[DC0E] mov ebx, dword [reg_eip] 0 00000ED7 6652 push edx 0 00000ED9 660FBFD1 movsx edx, cx 4860 ..@setcseipbyte_fault_skip_6_near_call: 0 00000EDD 2667880413 mov byte [es:ebx+edx],al 0 00000EE2 665A pop edx 0 00000EE4 07 pop es 0 00000EE5 F8 clc 0 00000EE6 C3 retn 4866 __CPU__ 4867 .16: 4868 %else 4869 mov es, word [reg_cs] 4870 %endif 0 00000EE7 8B1E[DC0E] mov bx, word [reg_eip] 0 00000EEB 01CB add bx, cx 4873 ..@setcseipbyte_fault_skip_2_near_call: 0 00000EED 268807 mov byte [es:bx], al 0 00000EF0 F8 clc 4876 .ret: 0 00000EF1 07 pop es 0 00000EF2 C3 retn 4879 4880 ; Exchange byte with memory 4881 ; 4882 ; INP: bx:(e)dx-> destination byte 4883 ; al = source byte 4884 ; REM: Determines whether to use edx by the 4885 ; segment limit of the selector. 4886 ; (Uses in run.asm always pass a segmented 4887 ; address obtained from getsegmented. This 4888 ; will have edxh = 0 always so it doesn't 4889 ; matter whether we use edx or dx.) 4890 ; OUT: CY if failed due to segment not writable 4891 ; NC if successful, 4892 ; al = previous value of destination byte 4893 ; CHG: ah 4894 writemem: 4895 %if _DEBUG1 4896 push dx 4897 push ax 4898 4899 call getlinear_high_limit.do_not_use_test ; NB do NOT resetmode 4900 jc @F ; already an error ? then return --> (CY) 4901 push bx 4902 push cx 4903 mov bx, test_records_Writemem 4904 call handle_test_case_multiple_16 4905 ; check whether this should testcase the error 4906 ; CY to indicate error from this call 4907 pop cx 4908 pop bx 4909 @@: 4910 pop ax 4911 pop dx 4912 jnc .do_not_use_test 4913 retn ; return CY here 4914 4915 %endif 4916 .do_not_use_test: 4917 0 00000EF3 88C4 mov ah, al 4919 %if _PM 0 00000EF5 E828FB call ispm 0 00000EF8 7516 jnz .16 ; (NC from ispm) --> 0 00000EFA E82DFF call verifysegm ; make bx a writeable segment 0 00000EFD 7220 jc .ret 0 00000EFF E8ADF9 _386_PM call test_high_limit ; 32-bit segment ? 0 00000F02 740C jz .16 ; (NC from test_d_b_bit) --> 4926 [cpu 386] 0 00000F04 1E push ds 0 00000F05 8EDB mov ds, bx 4929 ..@writemem_fault_skip_2_near_call_a: 0 00000F07 678602 xchg al, byte [edx] 4931 ..@writemem_fault_skip_2_near_call_b: 0 00000F0A 673A22 cmp ah, byte [edx] 0 00000F0D 1F pop ds 4934 __CPU__ 0 00000F0E EB0C jmp short .cmp 4936 .16: 4937 %endif 0 00000F10 1E push ds 0 00000F11 8EDB mov ds, bx 0 00000F13 53 push bx 0 00000F14 89D3 mov bx, dx 4942 ..@writemem_fault_skip_4_near_call_a: 0 00000F16 8607 xchg al, byte [bx] 4944 ..@writemem_fault_skip_4_near_call_b: 0 00000F18 3A27 cmp ah, byte [bx] 0 00000F1A 5B pop bx 0 00000F1B 1F pop ds 4948 .cmp: 0 00000F1C 7401 je .ret ; (NC) 0 00000F1E F9 stc ; Failed to compare (i.e. memory wasn't our byte after writing). 4951 ; This check catches ROM that will silently fail to write. 4952 .ret: 0 00000F1F C3 retn 4954 4955 4956 ; Read byte from memory 4957 ; 4958 ; INP: bx:(e)dx-> destination byte 4959 ; REM: Determines whether to use edx by the 4960 ; segment limit of the selector. 4961 ; (Uses in run.asm always pass a segmented 4962 ; address obtained from getsegmented. This 4963 ; will have edxh = 0 always so it doesn't 4964 ; matter whether we use edx or dx.) 4965 ; OUT: al = value of byte read 4966 readmem: section_of_function 4967 %if _DEBUG1 4968 push dx 4969 push ax 4970 4971 call getlinear_high_limit.do_not_use_test ; NB do NOT resetmode 4972 jc @F ; already an error ? then return --> (CY) 4973 push bx 4974 push cx 4975 mov bx, test_records_Readmem 4976 call handle_test_case_multiple_16 4977 ; check whether this should testcase the error 4978 ; CY to indicate error from this call 4979 pop cx 4980 pop bx 4981 @@: 4982 pop ax 4983 pop dx 4984 jnc .do_not_use_test 4985 mov al, byte [test_readmem_value] 4986 ; return a most likely wrong value 4987 retn 4988 4989 %endif 4990 .do_not_use_test: 4991 4992 %if _PM 0 00000F20 E88CF9 _386_PM call test_high_limit ; 32-bit segment ? 0 00000F23 7408 jz .16 4995 [cpu 386] 0 00000F25 1E push ds 0 00000F26 8EDB mov ds, bx 4998 ..@readmem_fault_skip_2_near_call: 0 00000F28 678A02 mov al, byte [edx] 0 00000F2B 1F pop ds 0 00000F2C C3 retn 5002 __CPU__ 5003 .16: 5004 %endif 0 00000F2D 1E push ds 0 00000F2E 53 push bx 0 00000F2F 8EDB mov ds, bx 0 00000F31 89D3 mov bx, dx 5009 ..@readmem_fault_skip_4_near_call: 0 00000F33 8A07 mov al, byte [bx] 0 00000F35 5B pop bx 0 00000F36 1F pop ds 0 00000F37 C3 retn 5014 5015 5016 %if !_LOADER 5017 ; Q command - quit. 5018 qq: 0 00000F38 E817F9 call guard_re 0 00000F3B 31C9 xor cx, cx ; no qq mode selected 0 00000F3D 4E dec si 5022 .loop: 0 00000F3E AC lodsb 0 00000F3F E8[0000] call capitalise 0 00000F42 3C41 cmp al, 'A' 0 00000F44 741C je qq_a 0 00000F46 B501 mov ch, qqmode_b; QB mode (breakpoint before terminate) 0 00000F48 3C42 cmp al, 'B' 0 00000F4A 7412 je .otherletter 0 00000F4C B502 mov ch, qqmode_c; QC mode (terminate device in a container MCB) 0 00000F4E 3C43 cmp al, 'C' 0 00000F50 740C je .otherletter 0 00000F52 B504 mov ch, qqmode_d; QD mode (terminate device in initialisation) 0 00000F54 3C44 cmp al, 'D' 0 00000F56 7406 je .otherletter 0 00000F58 880E[E614] mov byte [qq_mode], cl 0 00000F5C EB1B jmp qq_default 5038 5039 .otherletter: 0 00000F5E 08E9 or cl, ch 0 00000F60 EBDC jmp .loop 5042 5043 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 5043 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 000014E6 00 qq_mode: db 0 5045 qqmode_b: equ 1 5046 qqmode_c: equ 2 5047 qqmode_d: equ 4 5048 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 5048 ------------------ note: usesection lDEBUG_CODE 5049 5050 qq_a: 0 00000F62 AC lodsb 0 00000F63 E8[0000] call chkeol 0 00000F66 E80808 call terminate_attached_process 0 00000F69 BB[0000] mov bx, msg.qq_a_unterminated 0 00000F6C 7403 jz .attached_unterminated 0 00000F6E BB[0000] mov bx, msg.qq_a_terminated 5057 .attached_unterminated: 0 00000F71 E8[0000] call putrunint 0 00000F74 89DA mov dx, bx 0 00000F76 E9[0000] jmp putsz 5061 5062 5063 qq_default: 0 00000F79 E8[0000] call chkeol 5065 5066 %if _RH 0 00000F7C 8026[BA01]EF clropt [options6], opt6_rh_mode 0 00000F81 8026[E701]BF clropt [internalflags3], dif3_auxbuff_guarded_3 0 00000F86 8026[F201]C7 clropt [internalflags6], dif6_rh_mode_was | dif6_rh_mode | dif6_rh_mode_2 5070 %endif 0 00000F8B E8A8F8 call guard_auxbuff 5072 5073 %if _DEVICE 5074 %if _APPLICATION || _BOOTLDR 0 00000F8E F606[F201]40 testopt [internalflags6], dif6_device_mode 0 00000F93 7411 jz .nondevice 5077 %endif 0 00000F95 F6C106 test cl, qqmode_c | qqmode_d 0 00000F98 750C jnz .deviceselected 0 00000F9A BA[0000] mov dx, msg.qq_device_none_selected 0 00000F9D B83701 mov ax, 0137h 0 00000FA0 E8C307 call setrc 0 00000FA3 E9[0000] jmp putsz 5084 5085 .deviceselected: 5086 .nondevice: 5087 %endif 5088 %if _BOOTLDR 5089 ; Test whether we are in non-DOS mode, and were 5090 ; currently entered in protected mode. Since 5091 ; this will make the entire operation fail, 5092 ; it has to be checked for before modifying 5093 ; or releasing any of the resources. 5094 ; (Does this ever occur? No?) 0 00000FA6 F606[DD01]40 testopt [internalflags], nodosloaded 0 00000FAB 741E jz .notpmnodos 5097 %if _PM 0 00000FAD E870FA call ispm 5099 %if _TSR ; same message, reuse code 0 00000FB0 7425 jz .cannotpmquit 5101 %else 5102 jnz .notpmnodos_nodos 5103 mov dx, msg.cannotpmquit 5104 mov ax, 0115h 5105 call setrc 5106 jmp putsz_error 5107 %endif 5108 %endif 5109 .notpmnodos_nodos: 0 00000FB2 E8D90A call bootgetmemorysize ; dx => behind usable memory 0 00000FB5 A1[0000] mov ax, word [ boot_new_memsizekib ] 0 00000FB8 B106 mov cl, 6 0 00000FBA D3E0 shl ax, cl 0 00000FBC 39D0 cmp ax, dx ; same? 0 00000FBE 740B je @F 0 00000FC0 BA[0000] mov dx, msg.cannotbootquit_memsizes 0 00000FC3 B81B01 mov ax, 011Bh 0 00000FC6 E89D07 call setrc 0 00000FC9 EB15 jmp .putsz 5120 %if !_TSR || !_PM 5121 .putsz equ putsz 5122 %endif 5123 5124 @@: 5125 .notpmnodos: 5126 %endif 5127 %if _PM 5128 %if _TSR 5129 ; Test whether we are in TSR mode, and were 5130 ; currently entered in protected mode. Since 5131 ; this will make the entire operation fail, 5132 ; it has to be checked for before modifying 5133 ; or releasing any of the resources. 0 00000FCB F606[DE01]40 testopt [internalflags], tsrmode 0 00000FD0 7411 jz .notpmtsr 0 00000FD2 E84BFA call ispm 0 00000FD5 750C jnz .notpmtsr 5138 5139 ; This isn't yet implemented. Broken down: 5140 ; * Uses terminate_attached_process which returns in real mode. 5141 ; * Exception vectors are implicitly restored/discarded by that. 5142 ; * (RM) Interrupt vectors are currently restored in real mode. Unnecessary. 5143 ; * The VDD is un-registered in real mode. Necessary? 5144 ; * Normal 21.4C is used to return to the real parent. 5145 ; * We have to discard our DOS process resources. Any DPMI TSR resources? 5146 ; * We must again gain control in debuggee's mode after discarding them. 5147 ; * We must return to the debuggee and seemlessly discard our memory. The 5148 ; stack trick possibly/probably does not work in protected mode. 5149 5150 .cannotpmquit: 0 00000FD7 BA[0000] mov dx, msg.cannotpmquit 0 00000FDA B81501 mov ax, 0115h 0 00000FDD E88607 call setrc 5154 .putsz: 0 00000FE0 E9[0000] jmp putsz 5156 5157 .notpmtsr: 5158 %endif 5159 5160 %if (opt4_int_2F_hook)&~0FFh 5161 %fatal DCO4 re-ordered, adjust code here 5162 %endif 0 00000FE3 A1[B001] mov ax, [options4] 0 00000FE6 B4A8 mov ah, __TEST_IMM8 0 00000FE8 8626[0000] xchg ah, [dpmidisable] ; disable DPMI hook 5166 ; (SMC in section lDEBUG_DATA_ENTRY) 0 00000FEC 50 push ax 0 00000FED 8026[B001]FD clropt [options4], opt4_int_2F_hook ; avoid a new hook while terminating 5169 %endif 5170 %else ; !_LOADER 5171 qq: 5172 call chkeol 5173 %endif 5174 5175 qq_restore_interrupts_simulated: 0 00000FF2 31ED xor bp, bp 5177 5178 %if _CATCHINT2D 5179 .2D: 0 00000FF4 B02D mov al, 2Dh ; interrupt number 0 00000FF6 BE[0000] mov si, int2D ; -> IISP entry header 0 00000FF9 B93244 mov cx, "2D" 0 00000FFC BA0800 mov dx, opt4_int_2D_force >> 16 5184 %if (opt4_int_2D_force >> 16) == dif4_int_2D_hooked 0 00000FFF E8D006 call qq_int_unhook_sim.set_bx_to_dx 5186 %else 5187 mov bx, dif4_int_2D_hooked 5188 call qq_int_unhook_sim 5189 %endif 5190 %endif 5191 5192 5193 %if _CATCHINTFAULTCOND && _CATCHINT0D 5194 .0D: 0 00001002 B00D mov al, 0Dh ; interrupt number 0 00001004 BE[0000] mov si, intr0D ; -> IISP entry header 0 00001007 B93044 mov cx, "0D" 0 0000100A BA1000 mov dx, opt4_int_0D_force >> 16 5199 %if (opt4_int_0D_force >> 16) == dif4_int_0D_hooked 0 0000100D E8C206 call qq_int_unhook_sim.set_bx_to_dx 5201 %else 5202 mov bx, dif4_int_0D_hooked 5203 call qq_int_unhook_sim 5204 %endif 5205 %endif 5206 5207 5208 %if _CATCHINTFAULTCOND && _CATCHINT0C 5209 .0C: 0 00001010 B00C mov al, 0Ch ; interrupt number 0 00001012 BE[0000] mov si, intr0C ; -> IISP entry header 0 00001015 B93043 mov cx, "0C" 0 00001018 BA2000 mov dx, opt4_int_0C_force >> 16 5214 %if (opt4_int_0C_force >> 16) == dif4_int_0C_hooked 0 0000101B E8B406 call qq_int_unhook_sim.set_bx_to_dx 5216 %else 5217 mov bx, dif4_int_0C_hooked 5218 call qq_int_unhook_sim 5219 %endif 5220 %endif 5221 5222 5223 %if _CATCHINT08 5224 .08: 0 0000101E B008 mov al, 08h ; interrupt number 0 00001020 BE[0000] mov si, intr8 ; -> IISP entry header 0 00001023 B93038 mov cx, "08" 0 00001026 BA0400 mov dx, opt4_int_08_force >> 16 5229 %if (opt4_int_08_force >> 16) == dif4_int_08_hooked 0 00001029 E8A606 call qq_int_unhook_sim.set_bx_to_dx 5231 %else 5232 mov bx, dif4_int_08_hooked 5233 call qq_int_unhook_sim 5234 %endif 5235 %endif 5236 5237 5238 .serial: 0 0000102C A0[3C0E] mov al, byte [serial_installed_intnum] 0 0000102F BE[0000] mov si, serial_interrupt_handler 0 00001032 51 push cx ; (make space) 0 00001033 89E7 mov di, sp ; es:di -> word on stack 0 00001035 E8[0000] call hexbyte ; write byte value as text 0 00001038 59 pop cx ; cx = what to write into error message 0 00001039 BA0100 mov dx, opt4_int_serial_force >> 16 5246 %if (opt4_int_serial_force >> 16) == dif4_int_serial_hooked 0 0000103C E89306 call qq_int_unhook_sim.set_bx_to_dx 5248 %else 5249 mov bx, dif4_int_serial_hooked 5250 call qq_int_unhook_sim 5251 %endif 5252 5253 %if _PM 5254 .2F: 0 0000103F B02F mov al, 2Fh ; interrupt number 0 00001041 BE[0000] mov si, debug2F ; -> IISP entry header 0 00001044 B93246 mov cx, "2F" 0 00001047 BA0200 mov dx, opt4_int_2F_force >> 16 0 0000104A F606[DD01]01 testopt [internalflags], hooked2F 0 0000104F 7403 jz .noint2F 0 00001051 E88606 call qq_int_unhook_sim.need 5262 5263 .noint2F: 5264 %endif 5265 5266 5267 %if CATCHINTAMOUNT && ! (_DEBUG && ! _DEBUG_COND) 5268 %if _DEBUG 0 00001054 F606[F101]01 testopt [internalflags6], dif6_debug_mode 0 00001059 7530 jnz .skipints 5271 %endif 5272 ; Simulate to restore interrupt vectors. 0 0000105B BE[6D0E] mov si, inttab 0 0000105E BF[820E] mov di, intforcetab 5275 %if _CATCHINT06 && _DETECT95LX 0 00001061 8B0E[8A0E] mov cx, word [inttab_number_variable] 5277 %else 5278 mov cx, inttab_number 5279 %endif 0 00001065 E324 jcxz .intsimend 0 00001067 31D2 xor dx, dx 5282 .nextintsim: 0 00001069 AC lodsb 0 0000106A 93 xchg ax, bx ; bl = number 0 0000106B AD lodsw ; si -> list 0 0000106C 96 xchg ax, si ; si -> entry, ax -> list 0 0000106D 93 xchg ax, bx ; al = number, bx -> list 0 0000106E 57 push di 0 0000106F 8A35 mov dh, byte [di] 0 00001071 E8[0000] call UnhookInterruptForceSim 0 00001074 5F pop di 0 00001075 16 push ss 0 00001076 07 pop es 0 00001077 730D jnc @F 0 00001079 BF[0000] mov di, msg.serial_cannot_unhook.int 0 0000107C E8[0000] call hexbyte 0 0000107F BA[0000] mov dx, msg.serial_cannot_unhook.nowarn 0 00001082 E8[0000] call putsz 0 00001085 45 inc bp 5300 @@: 0 00001086 47 inc di 0 00001087 87DE xchg bx, si ; si -> list 0 00001089 E2DE loop .nextintsim 5304 5305 .intsimend: 5306 .skipints: 5307 %endif 5308 0 0000108B BA[0000] mov dx, msg.empty_message 0 0000108E 85ED test bp, bp 0 00001090 7403E9D503 jnz qq_attached_unterminated.common 5312 5313 5314 %if _DEVICE 5315 qq_device_prepare: 5316 %if _APPLICATION || _BOOTLDR 0 00001095 F606[F201]40 testopt [internalflags6], dif6_device_mode 0 0000109A 7503E9A401 jz qq_nondevice 5319 %endif 5320 5321 %if _PM 0 0000109F BA[0000] mov dx, msg.qq_device_pm 0 000010A2 E87BF9 call ispm 0 000010A5 7441 jz @F ; in PM --> 5325 %endif 5326 5327 ; Try quitting early in device init ? 0 000010A7 F606[E614]04 testopt [qq_mode], qqmode_d 0 000010AC 743D jz .device_c ; no, must be container quit --> 5330 5331 .device_d: 0 000010AE F606[DE01]40 testopt [internalflags], tsrmode 0 000010B3 741E jz .check_device_c 5334 0 000010B5 BE[A40E] mov si, regs 0 000010B8 BF[240F] mov di, device_quittable_regs 0 000010BB B92000 mov cx, words(regs.size) 0 000010BE F3A7 repe cmpsw ; can quit to device init ? 0 000010C0 7511 jne .check_device_c 0 000010C2 C43E[380E] les di, [device_header_address] 0 000010C6 B0FF mov al, -1 0 000010C8 B104 mov cl, 4 0 000010CA F3AE repe scasb ; is next device pointer still -1 ? 0 000010CC 16 push ss 0 000010CD 07 pop es 0 000010CE 7503E97001 je qq_device_got ; yes --> 5347 5348 .check_device_c: 5349 ; Cannot quit to device init. Clear the flag 5350 ; so we know later on that we're trying QC. 0 000010D3 8026[E614]FB clropt [qq_mode], qqmode_d 0 000010D8 F606[E614]02 testopt [qq_mode], qqmode_c 5353 ; actually want to try QC ? 0 000010DD 750C jnz .device_c ; yes --> 5355 0 000010DF BA[0000] mov dx, msg.qq_device_no_d 0 000010E2 B82101 mov ax, 0121h 0 000010E5 E87E06 call setrc 5359 @@: 0 000010E8 E97F03 jmp qq_attached_unterminated.common 5361 5362 .device_c: 0 000010EB B80258 mov ax, 5802h 0 000010EE CD21 int 21h 0 000010F0 B400 mov ah, 0 0 000010F2 50 push ax ; preserve UMB link 0 000010F3 B80358 mov ax, 5803h 0 000010F6 BB0100 mov bx, 1 0 000010F9 CD21 int 21h ; enable UMB link 5370 ; we want to support the case in which 5371 ; the first UMCB may have changed. so 5372 ; instead of searching for it again we 5373 ; just request the link enabled. 5374 0 000010FB BBFFFF mov bx, -1 0 000010FE B452 mov ah, 52h 0 00001100 CD21 int 21h 0 00001102 89DF mov di, bx 0 00001104 83FBBE cmp bx, - (30h + 12h) 0 00001107 7603E91E01 ja .no_c 0 0000110C 83FB01 cmp bx, 1 0 0000110F 7503E91601 je .no_c 0 00001114 268B57FE mov dx, word [es:bx - 2] 0 00001118 B93000 mov cx, 30h 5385 5386 .nulloop: 0 0000111B BE[0000] mov si, msg.NULblank 0 0000111E A7 cmpsw ; di += 2, si += 2. compare 0 0000111F 750A jne .nulnext 5390 .nulcheck: 0 00001121 57 push di 0 00001122 51 push cx 0 00001123 B103 mov cl, 3 ; 3 more words to go 0 00001125 F3A7 repe cmpsw ; match ? 0 00001127 59 pop cx 0 00001128 5F pop di 0 00001129 7406 je .nulfound 5398 .nulnext: 0 0000112B 4F dec di ; di -= 1 so it ends up 1 higher than prior 0 0000112C E2ED loop .nulloop 0 0000112E E9F900 jmp .no_c 5402 5403 .nulfound: 0 00001131 83EF0C sub di, 3 * 2 + 4 + 2 ; (strategy, interrupt, flags are words, 5405 ; next device pointer is a dword. 5406 ; additional plus 2 for the cmpsw output.) 5407 5408 ; es:di -> NUL device header 5409 .devloop: 0 00001134 A1[380E] mov ax, word [device_header_address] 0 00001137 263B05 cmp ax, word [es:di] 0 0000113A 7509 jne .devnext 0 0000113C A1[3A0E] mov ax, word [device_header_address + 2] 0 0000113F 263B4502 cmp ax, word [es:di + 2] 0 00001143 7411 je .mcb 5416 .devnext: 0 00001145 41 inc cx 0 00001146 7903E9DF00 js .no_c 5419 0 0000114B 26C43D les di, [es:di] 0 0000114E 83FFFF cmp di, -1 0 00001151 75E1 jne .devloop 0 00001153 E9D400 jmp .no_c 5424 5425 .mcb: 5426 0 00001156 893E[E814] mov word [.device_reference], di 0 0000115A 8C06[EA14] mov word [.device_reference + 2], es 5429 0 0000115E 8326[F214]00 and word [.counter], 0 0 00001163 89C7 mov di, ax ; => start of memory allocated to us 0 00001165 8B0E[360E] mov cx, word [device_mcb_paragraphs] 5433 ; = amount paragraphs allocated to us 0 00001169 01CF add di, cx ; => behind memory allocated to us 5435 5436 ; dx => first MCB 5437 .mcbloop: 0 0000116B 8EC2 mov es, dx 0 0000116D 89D6 mov si, dx ; => MCB 0 0000116F 2603360300 add si, word [es:3] 0 00001174 46 inc si ; => next MCB (or behind current MCB) 0 00001175 26803E00004D cmp byte [es:0], 'M' ; valid MCB ? 0 0000117B 740B je @F 0 0000117D 26803E00005A cmp byte [es:0], 'Z' 0 00001183 7403E9A200 jne .no_c ; no --> 5446 @@: 0 00001188 39C2 cmp dx, ax ; start of MCB < allocation ? 0 0000118A 731F jae .mcbnext ; no --> 0 0000118C 39FE cmp si, di ; end of MCB > allocation ? 0 0000118E 721B jb .mcbnext ; no --> 5451 0 00001190 26833E010000 cmp word [es:1], 0 ; free ? 0 00001196 7413 je .mcbnext ; do not match --> 0 00001198 48 dec ax ; => our (sub) MCB 0 00001199 39C2 cmp dx, ax ; matches (DEVLOAD style) ? 0 0000119B 7520 jne .mcbcontainer ; no --> 0 0000119D 26390E0300 cmp word [es:3], cx ; size matches ? 0 000011A2 7519 jne .mcbcontainer ; no --> 0 000011A4 8326[EC14]00 and word [.container_segment], 0 0 000011A9 EB7E jmp .mcbdone ; found a non-container MCB 5461 5462 .mcbnext: 0 000011AB FF06[F214] inc word [.counter] ; safeguard against infinite loop 0 000011AF 7479 jz .no_c 0 000011B1 89F2 mov dx, si ; => next MCB 0 000011B3 26803E00004D cmp byte [es:0], 'M' ; prior was 'M' ? 0 000011B9 74B0 je .mcbloop ; yes, so loop --> 0 000011BB EB6D jmp .no_c 5469 5470 .mcbcontainer: 0 000011BD 40 inc ax ; => allocated block (device header) 0 000011BE 26833E010050 cmp word [es:1], 50h ; SD owner system ? 0 000011C4 73E5 jae .mcbnext 0 000011C6 26813E08005344 cmp word [es:8], "SD" 0 000011CD 75DC jne .mcbnext ; no --> 5476 0 000011CF 26FF360000 push word [es:0] 0 000011D4 8F06[F014] pop word [.container_is_z] 0 000011D8 8936[EE14] mov word [.container_end], si 0 000011DC 8916[EC14] mov word [.container_segment], dx 0 000011E0 42 inc dx ; => sub-MCB 5482 .submcbloop: 0 000011E1 8EC2 mov es, dx 0 000011E3 89D6 mov si, dx 0 000011E5 2603360300 add si, word [es:3] 0 000011EA 46 inc si ; => next sub or MCB (or behind Z MCB) 0 000011EB 39C2 cmp dx, ax 0 000011ED 731C jae .submcbnext 0 000011EF 39FE cmp si, di 0 000011F1 7218 jb .submcbnext 5491 0 000011F3 50 push ax 0 000011F4 48 dec ax ; => our (sub) MCB 0 000011F5 39C2 cmp dx, ax ; matched start of allocation ? 0 000011F7 58 pop ax 0 000011F8 7511 jne .submcbnext 0 000011FA 26390E0300 cmp word [es:3], cx ; matches allocation size ? 0 000011FF 750A jne .submcbnext 0 00001201 26833E010000 cmp word [es:1], 0 ; is not free ? 0 00001207 7402 je .submcbnext 0 00001209 EB1E jmp .mcbdone ; all yes, found it --> 5502 5503 .submcbnext: 0 0000120B FF06[F214] inc word [.counter] ; safeguard against infinite loop 0 0000120F 7419 jz .no_c 0 00001211 89F2 mov dx, si ; => next sub MCB or after container 0 00001213 8B36[EE14] mov si, word [.container_end] 0 00001217 39F2 cmp dx, si ; after container ? 0 00001219 72C6 jb .submcbloop ; no --> 5510 ; This jump could be a jne but generally 5511 ; we can assume that the container does 5512 ; not overflow across the 1 MiB limit. 5513 ; And this is more hardened against errors. 0 0000121B 89F2 mov dx, si ; insure we use actual container end 0 0000121D 803E[F014]5A cmp byte [.container_is_z], 'Z' 5516 ; container had a Z ? 0 00001222 7403E944FF jne .mcbloop ; no --> 5518 ; if here, loop now, dx already updated and 5519 ; furthermore es does not point at container! 0 00001227 EB01 jmp .no_c 5521 5522 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 5522 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 000014E7 00 align 4, db 0 0 000014E8 00000000 .device_reference: dd 0 0 000014EC 0000 .container_segment: dw 0 0 000014EE 0000 .container_end: dw 0 0 000014F0 0000 .container_is_z: dw 0 0 000014F2 0000 .counter: dw 0 5529 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 5529 ------------------ note: usesection lDEBUG_CODE 5530 5531 .mcbdone: 5532 0 00001229 A8 db __TEST_IMM8 ; (skip stc, NC) 5534 .no_c: 0 0000122A F9 stc 0 0000122B 5B pop bx 0 0000122C 9C pushf 0 0000122D B80358 mov ax, 5803h 0 00001230 CD21 int 21h ; restore UMB link 0 00001232 9D popf 0 00001233 16 push ss 0 00001234 07 pop es 0 00001235 730C jnc @F 0 00001237 BA[0000] mov dx, msg.qq_device_no_c 0 0000123A B82201 mov ax, 0122h 0 0000123D E82605 call setrc 0 00001240 E92702 jmp qq_attached_unterminated.common 5548 5549 @@: 5550 5551 qq_device_got: 5552 qq_nondevice: 5553 %endif 5554 5555 5556 qq_restore_interrupts: 5557 %if _CATCHINT2D 5558 .2D: 0 00001243 B02D mov al, 2Dh ; interrupt number 0 00001245 BE[0000] mov si, int2D ; -> IISP entry header 0 00001248 B93244 mov cx, "2D" 0 0000124B BA0800 mov dx, opt4_int_2D_force >> 16 5563 %if (opt4_int_2D_force >> 16) == dif4_int_2D_hooked 0 0000124E E89D04 call qq_int_unhook_real.set_bx_to_dx 5565 %else 5566 mov bx, dif4_int_2D_hooked 5567 call qq_int_unhook_real 5568 %endif 0 00001251 7303E91402 jc qq_attached_unterminated.common 5570 %endif 5571 5572 5573 %if _CATCHINTFAULTCOND && _CATCHINT0D 5574 .0D: 0 00001256 B00D mov al, 0Dh ; interrupt number 0 00001258 BE[0000] mov si, intr0D ; -> IISP entry header 0 0000125B B93044 mov cx, "0D" 0 0000125E BA1000 mov dx, opt4_int_0D_force >> 16 5579 %if (opt4_int_0D_force >> 16) == dif4_int_0D_hooked 0 00001261 E88A04 call qq_int_unhook_real.set_bx_to_dx 5581 %else 5582 mov bx, dif4_int_0D_hooked 5583 call qq_int_unhook_real 5584 %endif 0 00001264 7303E90102 jc qq_attached_unterminated.common 5586 %endif 5587 5588 5589 %if _CATCHINTFAULTCOND && _CATCHINT0C 5590 .0C: 0 00001269 B00C mov al, 0Ch ; interrupt number 0 0000126B BE[0000] mov si, intr0C ; -> IISP entry header 0 0000126E B93043 mov cx, "0C" 0 00001271 BA2000 mov dx, opt4_int_0C_force >> 16 5595 %if (opt4_int_0C_force >> 16) == dif4_int_0C_hooked 0 00001274 E87704 call qq_int_unhook_real.set_bx_to_dx 5597 %else 5598 mov bx, dif4_int_0C_hooked 5599 call qq_int_unhook_real 5600 %endif 0 00001277 7303E9EE01 jc qq_attached_unterminated.common 5602 %endif 5603 5604 5605 %if _CATCHINT08 5606 .08: 0 0000127C B008 mov al, 08h ; interrupt number 0 0000127E BE[0000] mov si, intr8 ; -> IISP entry header 0 00001281 B93038 mov cx, "08" 0 00001284 BA0400 mov dx, opt4_int_08_force >> 16 5611 %if (opt4_int_08_force >> 16) == dif4_int_08_hooked 0 00001287 E86404 call qq_int_unhook_real.set_bx_to_dx 5613 %else 5614 mov bx, dif4_int_08_hooked 5615 call qq_int_unhook_real 5616 %endif 0 0000128A 7303E9DB01 jc qq_attached_unterminated.common 5618 %endif 5619 5620 5621 .serial: 0 0000128F F606[0D0E]01 testopt [serial_flags], sf_init_done 0 00001294 740D jz @F 0 00001296 E8[0000] call serial_clean_up ; unhook interrupt 0 00001299 8026[0D0E]EE clropt [serial_flags], sf_init_done | sf_use_serial 5626 ; clear (in case return to cmd3) 0 0000129E 8026[A501]BF clropt [options], enable_serial ; do not output to serial any longer 5628 @@: 0 000012A3 F606[E801]01 testopt [internalflags4], dif4_int_serial_hooked 0 000012A8 741F jz .done_serial 0 000012AA E8[0000] call serial_uninstall_interrupt_handler 0 000012AD 731A jnc .done_serial ; if it succeeded --> 5633 0 000012AF BF[0000] mov di, msg.serial_cannot_unhook.int 0 000012B2 A0[3C0E] mov al, byte [serial_installed_intnum] 0 000012B5 E8[0000] call hexbyte 0 000012B8 BA[0000] mov dx, msg.serial_cannot_unhook.nowarn 0 000012BB C606[0800]00 mov byte [serial_interrupt_handler + ieEOI], 0 5639 ; we do not issue EOI any longer 0 000012C0 B82301 mov ax, 0123h 0 000012C3 E8A004 call setrc 0 000012C6 E9A101 jmp qq_attached_unterminated.common 5643 5644 5645 .done_serial: 5646 5647 %if _PM 5648 .2F: 0 000012C9 B02F mov al, 2Fh ; interrupt number 0 000012CB BE[0000] mov si, debug2F ; -> IISP entry header 0 000012CE B93246 mov cx, "2F" 0 000012D1 BA0200 mov dx, opt4_int_2F_force >> 16 5653 %if (opt4_int_2F_force >> 16) == dif4_int_2F_hooked 0 000012D4 89D3 mov bx, dx 5655 %else 5656 mov bx, dif4_int_2F_hooked 5657 %endif 0 000012D6 F606[DD01]01 testopt [internalflags], hooked2F 0 000012DB 740D jz .noint2F 0 000012DD E81604 call qq_int_unhook_real.need 0 000012E0 7303E98501 jc qq_attached_unterminated.common 5662 5663 .got2F: 0 000012E5 8026[DD01]FE clropt [internalflags], hooked2F 5665 5666 .noint2F: 5667 %endif 5668 5669 %if _LOADER 5670 int 19h 5671 %else ; _LOADER 5672 %if _BOOTLDR 5673 %if _APPLICATION || _DEVICE 0 000012EA F606[DD01]40 testopt [internalflags], nodosloaded 0 000012EF 7543 jnz .areas 5676 %else 5677 jmp .areas 5678 %endif 5679 %endif 5680 5681 5682 %if _APPLICATION || _DEVICE 5683 ; Cancel child's process if any. 5684 ; This will drop to real mode if debuggee is in protected mode. 5685 %if _TSR || _DEVICE 0 000012F1 F606[DE01]40 testopt [internalflags], tsrmode 0 000012F6 7423 jz .terminate_attached ; falls through for device or TSR application 5688 5689 %if _PM 0 000012F8 E825F7 call ispm 0 000012FB 7414 jz @F ; in PM --> 0 000012FD F606[DE01]04 testopt [internalflags], canswitchmode 0 00001302 7415 jz @FF ; in 86 Mode and cannot switch to PM --> 5694 0 00001304 800E[DE01]08 setopt [internalflags], modeswitched ; set flag for resetmode 0 00001309 B000 mov al, 0 0 0000130B E8[0000] call sr_state ; save state 0 0000130E E8[0000] call switchmode ; switch to PM 5699 ; ! handle_mode_changed not called here ! 5700 ; do not call InDOS or other functions using seg/sels 5701 @@: 0 00001311 E8[0000] call pm_reset_handlers 5703 ; ! this calls resetmode 5704 5705 ; remember that we cannot access Protected Mode any longer 0 00001314 8026[DE01]DB clropt [internalflags], canswitchmode | switchbuffer 5707 @@: 5708 %endif 5709 0 00001319 EB19 jmp .areas 5711 5712 .terminate_attached: 5713 %endif 5714 0 0000131B E85304 call terminate_attached_process 0 0000131E 7503E93B01 jz qq_attached_unterminated 5717 %if _PM 0 00001323 E8FAF6 call ispm 0 00001326 750C jnz @F 5720 0 00001328 BA[0000] mov dx, msg.qq_still_pm 0 0000132B B82401 mov ax, 0124h 0 0000132E E83504 call setrc 0 00001331 E93601 jmp qq_attached_unterminated.common 5725 @@: 5726 %endif 5727 %endif 5728 5729 5730 .areas: 5731 %if _AREAS && _AREAS_HOOK_CLIENT 0 00001334 E8[0000] call uninstall_areas.qq_entry 5733 %if _AREAS_HOOK_SERVER 0 00001337 7228 jc .areas_error 5735 %else 5736 jnc @F 5737 mov dx, msg.qqlate_areas_error 5738 mov ax, 0125h 5739 call setrc 5740 jmp qq_attached_unterminated.common 5741 %endif 5742 %endif 5743 5744 @@: 5745 %if _AREAS_HOOK_SERVER 0 00001339 8B16[0200] mov dx, word [ddebugareas.next + 2] 0 0000133D 8B1E[0000] mov bx, word [ddebugareas.next] 0 00001341 8CD0 mov ax, ss 0 00001343 39C2 cmp dx, ax 0 00001345 7426 je @F 0 00001347 52 push dx 0 00001348 53 push bx 0 00001349 B000 mov al, 0 0 0000134B 0E push cs 0 0000134C E80901 call qqlate_86m_to_areastruc_entry 0 0000134F 16 push ss 0 00001350 1F pop ds 0 00001351 16 push ss 0 00001352 07 pop es 0 00001353 5B pop bx 0 00001354 5A pop dx 0 00001355 3B16[0200] cmp dx, word [ddebugareas.next + 2] 0 00001359 75DE jne @B 0 0000135B 3B1E[0000] cmp bx, word [ddebugareas.next] 0 0000135F 75D8 jne @B 5766 .areas_error: 0 00001361 BA[0000] mov dx, msg.qqlate_areas_error 0 00001364 B82501 mov ax, 0125h 0 00001367 E8FC03 call setrc 0 0000136A E9FD00 jmp qq_attached_unterminated.common 5771 5772 @@: 5773 %endif 5774 5775 5776 .restoreints: 5777 %if CATCHINTAMOUNT && ! (_DEBUG && ! _DEBUG_COND) 5778 %if _DEBUG 0 0000136D F606[F101]01 testopt [internalflags6], dif6_debug_mode 0 00001372 751F jnz .skiprestoreints 5781 %endif 5782 ; Restore interrupt vectors. 0 00001374 BE[6D0E] mov si, inttab 0 00001377 BF[820E] mov di, intforcetab 5785 %if _CATCHINT06 && _DETECT95LX 0 0000137A 8B0E[8A0E] mov cx, word [inttab_number_variable] 5787 %else 5788 mov cx, inttab_number 5789 %endif 0 0000137E E313 jcxz .intend 0 00001380 31D2 xor dx, dx 5792 .nextint: 0 00001382 AC lodsb 0 00001383 93 xchg ax, bx ; bl = number 0 00001384 AD lodsw ; si -> list 0 00001385 96 xchg ax, si ; si -> entry, ax -> list 0 00001386 93 xchg ax, bx ; al = number, bx -> list 0 00001387 57 push di 0 00001388 8A35 mov dh, byte [di] 0 0000138A E8[0000] call UnhookInterruptForce 0 0000138D 5F pop di 0 0000138E 47 inc di 0 0000138F 87DE xchg bx, si ; si -> list 0 00001391 E2EF loop .nextint 5805 5806 .intend: 5807 .skiprestoreints: 5808 %endif 5809 5810 5811 %if _PM 0 00001393 58 pop ax ; (discard) 5813 %endif 5814 5815 5816 qqlate: 5817 %if _SYMBOLIC 5818 ; Free XMS symbol table. 86 Mode memory backed symbol table 5819 ; is freed by our process's termination. 5820 ; Update: QD device termination does not currently terminate 5821 ; our process. In the meantime, free things explicitly. 5822 ; Note that the calls need to be in this order because of 5823 ; how zz_free_xms calls zz_free_reset first. 0 00001394 E8BEF5EB02[0000] nearcall zz_free_dos 0 0000139B E8B7F5EB02[0000] nearcall zz_free_xms 5826 %endif 5827 5828 ; Release the registered VDD. 5829 %if _VDD 0 000013A2 F606[DC01]04 testopt [internalflags], ntpacket 0 000013A7 7408 jz .novdd 0 000013A9 A1[AC0C] mov ax, word [hVdd] 0 000013AC C4C4580190 UnRegisterModule 5834 .novdd: 5835 %endif 5836 5837 %if _VXCHG 0 000013B1 F606[F001]01 testopt [internalflags6], dif6_vv_mode 0 000013B6 7403 jz @F 5840 0 000013B8 E8[0000] call vv_disable 5842 @@: 5843 %endif 5844 5845 %if _ALTVID 0 000013BB E8[0000] call setscreen 5847 %endif 5848 5849 ; Restore termination address. 5850 %if _BOOTLDR 5851 %if _APPLICATION || _DEVICE 0 000013BE F606[DD01]40 testopt [internalflags], nodosloaded 0 000013C3 7403E9AD01 jnz .bootterminate ; terminate --> 5854 %else 5855 jmp .bootterminate 5856 %endif 5857 %endif 5858 %if _DEVICE 5859 %if _APPLICATION 0 000013C8 F606[F201]40 testopt [internalflags6], dif6_device_mode 0 000013CD 7403E9B100 jnz .deviceterminate 5862 %else 5863 jmp .deviceterminate 5864 %endif 5865 %endif 5866 5867 %if _APPLICATION || _DEVICE 5868 %if _TSR || _DEVICE 5869 .appterminate: 0 000013D2 16 push ss 0 000013D3 07 pop es 0 000013D4 F606[DE01]40 testopt [internalflags], tsrmode 0 000013D9 745D jz .nontsrterminate 5874 5875 .tsrterminate: 0 000013DB BA[0515] mov dx, qq.proceedtsrtermination 5877 5878 .terminate_to_shim_process: 0 000013DE 31F6 xor si, si 0 000013E0 8E06[CC0B] mov es, word [auxbuff_segorsel] 0 000013E4 31FF xor di, di 0 000013E6 31C0 xor ax, ax 0 000013E8 B90800 mov cx, 8 0 000013EB F3AB rep stosw ; 10h MCB bytes 0 000013ED B94000 mov cx, 40h 0 000013F0 F3A5 rep movsw ; 80h PSP bytes 0 000013F2 8CC0 mov ax, es 0 000013F4 40 inc ax 0 000013F5 26A30100 mov word [es:1], ax ; fake MCB 0 000013F9 1E push ds 0 000013FA 8ED8 mov ds, ax 0 000013FC C70634001800 mov word [34h], 18h 0 00001402 A33600 mov word [36h], ax ; insure default PHT and fix segment 0 00001405 C70632000100 mov word [32h], 1 ; only one PHT entry (zero might crash) 0 0000140B C6061800FF mov byte [18h], -1 ; PHT entry is closed 0 00001410 C7062C000000 mov word [2Ch], 0 ; PSP clear 0 00001416 E85001 call .setparent ; make it self-owned, just in case 0 00001419 8CD3 mov bx, ss ; => process segment 0 0000141B 4B dec bx ; span actual MCB 5900 %if _DEVICE 5901 %if _APPLICATION 0 0000141C 36F606[F201]40 testopt [ss:internalflags6], dif6_device_mode 0 00001422 7403 jz @F 5904 %endif 0 00001424 83EB04 sub bx, deviceshim_size_p + paras(10h) 5906 ; span shim and pseudo MCB 5907 @@: 5908 %endif 0 00001427 8EDB mov ds, bx ; => our (real) MCB 0 00001429 81FA[0515] cmp dx, qq.proceedtsrtermination 0 0000142D 7503 jne @F 0 0000142F A30100 mov word [1], ax ; owner = fake PSP 5913 @@: 0 00001432 1F pop ds 0 00001433 E83301 call .setparent ; make the fake PSP our parent 0 00001436 EB1B jmp short terminate_00 ; see ya 5917 5918 .nontsrterminate: 5919 %endif 0 00001438 BE[BC0C] mov si, psp22 ; restore termination address 0 0000143B BF0A00 mov di, TPIV 0 0000143E A5 movsw 0 0000143F A5 movsw 0 00001440 BF1600 mov di, 16h ; restore PSP of parent 0 00001443 A5 movsw 5926 ; Really done. 5927 0 00001444 F606[E614]01 testopt [qq_mode], qqmode_b 0 00001449 7401 jz @F 0 0000144B CC int3 5931 5932 @@: 0 0000144C B44C mov ah, 4Ch ; quit 0 0000144E A0[350E] mov al, byte [qqtermcode] 5935 ; return code 0 00001451 CD21 int 21h 5937 %endif 5938 5939 5940 terminate_00: ; used by terminate_attached_process 0 00001453 B8004C mov ax, 4C00h ; quit 0 00001456 CD21 int 21h 5943 5944 5945 %if _AREAS_HOOK_SERVER 5946 qqlate_86m_to_areastruc_entry: 0 00001458 B9[0000] mov cx, areastruc_entry.qq_entry 0 0000145B 16 push ss 0 0000145C 51 push cx 0 0000145D CB retf 5951 %endif 5952 %endif ; !_LOADER 5953 5954 5955 qq_attached_unterminated: 5956 %if !_LOADER 0 0000145E E8[0000] call putrunint 5958 %endif ; !_LOADER 0 00001461 BA[0000] mov dx, msg.qq_unterm 0 00001464 B82001 mov ax, 0120h 0 00001467 E8FC02 call setrc 5962 5963 .common: 0 0000146A B81F01 mov ax, 011Fh 0 0000146D E8F602 call setrc 5966 ; Restore state: 5967 %if _PM 5968 %if (opt4_int_2F_hook)&~0FFh 5969 %fatal DCO4 re-ordered, adjust code here 5970 %endif 0 00001470 58 pop ax 0 00001471 8826[0000] mov [dpmidisable], ah ; (SMC in section lDEBUG_DATA_ENTRY) 0 00001475 2402 and al, opt4_int_2F_hook 0 00001477 8026[B001]FD clropt [options4], opt4_int_2F_hook 0 0000147C 0806[B001] or [options4], al 5976 %endif 0 00001480 E9[0000] jmp putsz 5978 5979 5980 %if !_LOADER 5981 %if _DEVICE 5982 qqlate.deviceterminate: 0 00001483 F606[E614]04 testopt [qq_mode], qqmode_d 0 00001488 7438 jz .mode_c 5985 5986 .mode_d: 5987 ; We modify the device request header 5988 ; only now, so in case of being unable 5989 ; to release something then the debugger 5990 ; will remain usable and stay resident. 0 0000148A 8E06[C80E] mov es, word [reg_es] 0 0000148E 8B1E[A80E] mov bx, word [reg_ebx] 0 00001492 8CD8 mov ax, ds ; => process segment 0 00001494 83E804 sub ax, paras(deviceshim_size + 10h) 5995 ; span shim and pseudo MCB 0 00001497 26C747030381 mov word [es:bx + 3], 8103h ; error, done, code: unknown command 0 0000149D 2683670E00 and word [es:bx + 0Eh], 0 0 000014A2 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 5999 ; es reset in run or qqlate.terminate_to_shim_process 6000 6001 %if 0 ; old code to manually release process resources 6002 xor bx, bx ; = 0 6003 mov cx, word [32h] ; get amount of handles 6004 .loop: 6005 mov ah, 3Eh 6006 int 21h ; close it 6007 inc bx ; next handle 6008 loop .loop ; loop for all process handles --> 6009 %else ; new code re-using TSR terminate handling 0 000014A6 BA[F414] mov dx, .proceed 0 000014A9 E932FF jmp qqlate.terminate_to_shim_process 6012 6013 6014 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 6014 ------------------ note: usesection lDEBUG_DATA_ENTRY 6015 .proceed: 0 000014F4 FA cli 0 000014F5 8CC8 mov ax, cs 0 000014F7 8ED0 mov ss, ax 0 000014F9 BC[0014] mov sp, stack_end 0 000014FC 8ED8 mov ds, ax 0 000014FE FC cld 0 000014FF FB sti 6023 0 00001500 E870FF call entry_to_code_seg 0 00001503 [AC14] dw .proceedcode 6026 6027 6028 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 6028 ------------------ note: usesection lDEBUG_CODE 6029 code_insure_low_byte_not_0CCh 6030 .proceedcode: 6031 %endif 6032 6033 %if _DEBUG 6034 ; avoid hooking interrupts again: 0 000014AC 2EC606[0000]E9 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 6036 ; (SMC in section lDEBUG_CODE) 6037 %endif 0 000014B2 F606[E614]01 testopt [qq_mode], qqmode_b 0 000014B7 7406 jz @F 0 000014B9 C706[DC0E][0000] mov word [reg_eip], entry_int3_retf 6041 @@: 0 000014BF E9[0000] jmp run ; run this 6043 6044 6045 .mode_c: 6046 qqlate_device_container: 0 000014C2 06 push es 0 000014C3 C43E[E814] les di, [qq_device_prepare.device_reference] 0 000014C7 8CC2 mov dx, es ; => device header pointing to ours 0 000014C9 8CD0 mov ax, ss ; => process segment 0 000014CB 83E804 sub ax, deviceshim_size_p + paras(10h) 6052 ; span shim and pseudo MCB 6053 ; ! ax is re-used in .handlecontainer 0 000014CE 8EC0 mov es, ax ; => our device header 0 000014D0 26FF360200 push word [es:0 + 2] 0 000014D5 26FF360000 push word [es:0] ; get our next link 0 000014DA 8EC2 mov es, dx 0 000014DC 268F05 pop word [es:di] 0 000014DF 268F4502 pop word [es:di + 2] ; update their next link 0 000014E3 8EC0 mov es, ax 0 000014E5 26830E0000FF or word [es:0], -1 0 000014EB 26830E0200FF or word [es:0 + 2], -1 ; de-initialise our next link 0 000014F1 07 pop es 6064 0 000014F2 31C9 xor cx, cx ; flag: do not shrink our allocation 0 000014F4 8B1E[EC14] mov bx, word [qq_device_prepare.container_segment] 0 000014F8 85DB test bx, bx ; are we in a container ? 0 000014FA 7451 jz .nocontainer ; no --> 6069 .handlecontainer: 0 000014FC 0306[360E] add ax, word [device_mcb_paragraphs] 6071 ; => behind our allocation 0 00001500 89C2 mov dx, ax 0 00001502 F7DA neg dx 0 00001504 0316[EE14] add dx, word [qq_device_prepare.container_end] 6075 ; are we last in container ? 0 00001508 1E push ds 0 00001509 8EDB mov ds, bx ; => container 6078 0 0000150B 7418 je .notrail ; yes, easier --> 6080 0 0000150D 48 dec ax ; => last paragraph allocated to us 6082 ; (buffer for trailer container MCB) 0 0000150E 8EC0 mov es, ax 0 00001510 31F6 xor si, si 0 00001512 31FF xor di, di 6086 ; copy over MCB letter, owner, and name/type 0 00001514 B90800 mov cx, words(16) 0 00001517 F3A5 rep movsw 0 00001519 36C606[F014]4D mov byte [ss:qq_device_prepare.container_is_z], 'M' 6090 ; tell subsequent handler to use 'M' 0 0000151F 2689160300 mov word [es:3], dx ; set new size 0 00001524 41 inc cx ; flag: shrink our allocation 6093 6094 .notrail: 0 00001525 E82B00 call .setowner 0 00001528 26290E0300 sub word [es:3], cx ; -= 1 in case we have trail 0 0000152D 36A0[F014] mov al, byte [ss:qq_device_prepare.container_is_z] 0 00001531 26A20000 mov byte [es:0], al ; set our letter to M or Z 6099 ; (Z only if container had Z and also 6100 ; there is no trailing container created) 6101 0 00001535 29DA sub dx, bx ; device mode MCB minus container MCB 0 00001537 4A dec dx ; account for MCB paragraph to get MCB size 0 00001538 89160300 mov word [3], dx ; adjust size 0 0000153C C60600004D mov byte [0], 'M' ; set M unconditionally 0 00001541 85D2 test dx, dx ; size zero ? 0 00001543 7504 jnz @F 0 00001545 89160100 mov word [1], dx ; yes, zero the owner too 6109 @@: 0 00001549 1F pop ds 0 0000154A E985FE jmp qqlate.appterminate 6112 6113 .nocontainer: 0 0000154D E80300 call .setowner 0 00001550 E97FFE jmp qqlate.appterminate 6116 6117 6118 ; INP: ss = debugger process/data segment 6119 ; OUT: es = dx => our device mode MCB 6120 ; owner of this MCB set to our process 6121 ; STT: R86M 6122 ; CHG: - 6123 .setowner: 0 00001553 8CD2 mov dx, ss 0 00001555 83EA05 sub dx, deviceshim_size_p + paras(10h + 10h) 6126 ; span shim, pseudo MCB, actual MCB 0 00001558 8EC2 mov es, dx ; => device mode MCB 0 0000155A 268C160100 mov word [es:1], ss ; insure valid owner (must be our PSP) 0 0000155F C3 retn 6130 %endif 6131 6132 6133 %if (_APPLICATION && _TSR) || _DEVICE 6134 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 6134 ------------------ note: usesection lDEBUG_DATA_ENTRY 6135 6136 qq.proceedtsrtermination: 0 00001505 FA cli 0 00001506 8CC8 mov ax, cs 0 00001508 8ED0 mov ss, ax 0 0000150A BC[0014] mov sp, stack_end 0 0000150D 8ED8 mov ds, ax 0 0000150F FC cld 0 00001510 FB sti 0 00001511 832E[B40E]12 sub word [reg_esp], 2+4+((qq.tsrfreecode_size+1)&~1) 0 00001516 8B3E[B40E] mov di, word [reg_esp] ; -> stack frame 0 0000151A 8E06[CC0E] mov es, word [reg_ss] 0 0000151E A1[C40E] mov ax, word [reg_ds] 0 00001521 AB stosw ; debuggee's ds 0 00001522 A1[DC0E] mov ax, word [reg_eip] 0 00001525 AB stosw 0 00001526 A1[D00E] mov ax, word [reg_cs] 0 00001529 AB stosw ; debuggee's cs:ip 0 0000152A 06 push es 0 0000152B 57 push di 0 0000152C BE[6815] mov si, qq.tsrfreecode 0 0000152F B90600 mov cx, ((qq.tsrfreecode_size+1)>>1) 0 00001532 F3A5 rep movsw ; code on stack 0 00001534 8CC8 mov ax, cs ; => process segment 0 00001536 48 dec ax ; span actual MCB 6160 %if _DEVICE 6161 %if _APPLICATION 0 00001537 F606[F201]40 testopt [internalflags6], dif6_device_mode 0 0000153C 7403 jz @F 6164 %endif 0 0000153E 83E804 sub ax, deviceshim_size_p + paras(10h) 6166 ; span shim + pseudo MCB 6167 @@: 6168 %endif 0 00001541 A3[C40E] mov word [reg_ds], ax ; = our MCB 0 00001544 8F06[DC0E] pop word [reg_eip] 0 00001548 8F06[D00E] pop word [reg_cs] ; -> code on stack (at int3) 0 0000154C F606[E614]01 testopt [qq_mode], qqmode_b 6173 ; QB mode ? 0 00001551 7504 jnz @F ; yes, leave pointing cs:ip at int3 0 00001553 FF06[DC0E] inc word [reg_eip] ; point cs:ip past the int3 6176 @@: 0 00001557 F606[AF01]80 testopt [options3], opt3_tsr_quit_leave_tf 0 0000155C 7505 jnz @F 0 0000155E 8026[E10E]FE clropt [reg_efl], 100h ; clear TF 6180 @@: 6181 0 00001563 E80DFF call entry_to_code_seg 0 00001566 [6015] dw .proceedtsrcode 6184 6185 6186 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 6186 ------------------ note: usesection lDEBUG_CODE 6187 6188 code_insure_low_byte_not_0CCh 6189 .proceedtsrcode: 6190 %if _DEBUG 6191 ; avoid hooking interrupts again: 0 00001560 2EC606[0000]E9 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 6193 ; (SMC in section lDEBUG_CODE) 6194 %endif 0 00001566 E9[0000] jmp run ; run this 6196 6197 6198 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 6198 ------------------ note: usesection lDEBUG_DATA_ENTRY 6199 6200 align 2, db 0 6201 ; (Update: Explicitly clears TF now, except if the 6202 ; option opt3_tsr_quit_leave_tf is set. See above.) 6203 ; 6204 ; Note that since we are in control of debuggee's TF and 6205 ; reset it every time the debugger is entered, this code 6206 ; will not be entered with TF set. It might be entered 6207 ; with IF set and an interrupt might occur; the only harm 6208 ; done then is that the interrupt handler has less stack 6209 ; available. All flags must be preserved by this code. 6210 qq.tsrfreecode: 0 00001568 CC int3 ; breakpoint for QB mode, 1 byte 0 00001569 C70601000000 mov word [1], 0 ; free the MCB 0 0000156F 1F pop ds ; restore debuggee's ds 0 00001570 CA0C00 retf ((qq.tsrfreecode_size+1)&~1) ; jump 6215 qq.tsrfreecode_size: equ $-qq.tsrfreecode 6216 6217 6218 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 6218 ------------------ note: usesection lDEBUG_CODE 6219 6220 ; INP: ax => PSP segment to set as parent 6221 ; ss:dx -> entrypoint to set as PRA 6222 qqlate.setparent: 0 00001569 A31600 mov word [16h], ax 0 0000156C 89160A00 mov word [0Ah], dx 0 00001570 8C160C00 mov word [0Ah+2], ss 0 00001574 C3 retn 6227 %endif 6228 6229 6230 usesection lDEBUG_CODE 6230 ------------------ note: usesection lDEBUG_CODE 6231 6232 %if _BOOTLDR 6233 qqlate.bootterminate: 0 00001575 812E[B40E]BE00 sub word [reg_esp], 2*8+4+((qq.bootfreecode_size+1)&~1) 0 0000157B 8B3E[B40E] mov di, word [reg_esp] ; -> stack frame 0 0000157F 8E06[CC0E] mov es, word [reg_ss] 0 00001583 A1[C40E] mov ax, word [reg_ds] 0 00001586 AB stosw 0 00001587 A1[C80E] mov ax, word [reg_es] 0 0000158A AB stosw 0 0000158B A1[BC0E] mov ax, word [reg_esi] 0 0000158E AB stosw 0 0000158F A1[C00E] mov ax, word [reg_edi] 0 00001592 AB stosw 0 00001593 A1[A40E] mov ax, word [reg_eax] 0 00001596 AB stosw 0 00001597 A1[AC0E] mov ax, word [reg_ecx] 0 0000159A AB stosw 0 0000159B A1[A80E] mov ax, word [reg_ebx] 0 0000159E AB stosw 0 0000159F A1[B00E] mov ax, word [reg_edx] 0 000015A2 AB stosw 0 000015A3 A1[DC0E] mov ax, word [reg_eip] 0 000015A6 AB stosw 0 000015A7 A1[D00E] mov ax, word [reg_cs] 0 000015AA AB stosw ; debuggee's cs:ip 0 000015AB 06 push es 0 000015AC 57 push di 0 000015AD 1E push ds 0 000015AE 0E push cs 0 000015AF 1F pop ds ; => lDEBUG_CODE 0 000015B0 BE[2816] mov si, qq.bootfreecode 0 000015B3 B95500 mov cx, ((qq.bootfreecode_size+1)>>1) 0 000015B6 F3A5 rep movsw ; code on stack 0 000015B8 1F pop ds 6266 0 000015B9 16 push ss 0 000015BA 07 pop es 6269 0 000015BB A1[0000] mov ax, word [ boot_new_memsizekib ] 0 000015BE B106 mov cl, 6 0 000015C0 D3E0 shl ax, cl ; ax => source of EBDA (new position) 0 000015C2 8B16[0000] mov dx, word [ boot_old_memsizekib ] 0 000015C6 D3E2 shl dx, cl ; dx => destination of EBDA (old position) 0 000015C8 31C9 xor cx, cx ; size of EBDA to move (if none) 0 000015CA 1E push ds 0 000015CB 8ED9 mov ds, cx 0 000015CD 8B1E0E04 mov bx, word [40Eh] ; new ref in word [0:40Eh] (if none) 0 000015D1 1F pop ds 0 000015D2 803E[0000]00 cmp byte [ boot_ebdaflag ], 0 ; any EBDA ? 0 000015D7 7412 jz .noebda 6282 0 000015D9 1E push ds 0 000015DA 8ED8 mov ds, ax ; => EBDA 0 000015DC 31DB xor bx, bx 0 000015DE 8A1E0000 mov bl, byte [ 0 ] ; EBDA size in KiB 0 000015E2 B106 mov cl, 6 0 000015E4 D3E3 shl bx, cl ; *64, to paragraphs 0 000015E6 89D9 mov cx, bx ; = size of EBDA to move (in paragraphs) 0 000015E8 89D3 mov bx, dx ; = new EBDA reference to put in word [0:40Eh] 0 000015EA 1F pop ds 6292 6293 .noebda: 0 000015EB A3[A40E] mov word [reg_eax], ax ; => relocated (new) EBDA position 6295 ; (in front of debugger image) 0 000015EE 891E[A80E] mov word [reg_ebx], bx ; = what to put in word [0:40Eh], 6297 ; unchanged content of that word if no EBDA 0 000015F2 890E[AC0E] mov word [reg_ecx], cx ; = EBDA size, 0 if no EBDA 0 000015F6 8916[B00E] mov word [reg_edx], dx ; = original (old) EBDA position 6300 ; = original mem size (in paras) 6301 ; (behind/in debugger image) 0 000015FA C706[C40E]0000 mov word [reg_ds], 0 6303 0 00001600 8F06[DC0E] pop word [reg_eip] 0 00001604 8F06[D00E] pop word [reg_cs] ; -> code on stack 0 00001608 F606[E614]01 testopt [qq_mode], qqmode_b 6307 ; QB mode ? 0 0000160D 7504 jnz @F ; yes, leave pointing cs:ip at int3 0 0000160F FF06[DC0E] inc word [reg_eip] ; point cs:ip past the int3 6310 @@: 0 00001613 F606[AF01]80 testopt [options3], opt3_tsr_quit_leave_tf 0 00001618 7505 jnz @F 0 0000161A 8026[E10E]FE clropt [reg_efl], 100h ; clear TF 6314 @@: 6315 ; call dumpregs 6316 %if _DEBUG 6317 ; avoid hooking interrupts again: 0 0000161F 2EC606[0000]E9 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 6319 ; (SMC in section lDEBUG_CODE) 6320 %endif 6321 ; jmp cmd3 0 00001625 E9[0000] jmp run ; run this 6323 6324 6325 align 2, db 0 6326 qq.bootfreecode: 0 00001628 CC int3 ; breakpoint for QB mode, 1 byte 0 00001629 9C pushf 0 0000162A FA cli 0 0000162B E81800 call movp ; move EBDA back (if any) 0 0000162E 891E0E04 mov word [40Eh], bx ; back relocate EBDA (if any) 0 00001632 B106 mov cl, 6 0 00001634 D3EA shr dx, cl ; = to KiB 0 00001636 89161304 mov word [413h], dx ; back relocate mem size 0 0000163A 9D popf 0 0000163B 1F pop ds 0 0000163C 07 pop es 0 0000163D 5E pop si 0 0000163E 5F pop di 0 0000163F 58 pop ax 0 00001640 59 pop cx 0 00001641 5B pop bx 0 00001642 5A pop dx 0 00001643 CAAA00 retf ((qq.bootfreecode_size+1)&~1) 6345 %endif 6346 %endif ; !_LOADER 6347 6348 6349 ; Move paragraphs 6350 ; 6351 ; INP: ax:0-> source 6352 ; dx:0-> destination 6353 ; cx = number of paragraphs 6354 ; CHG: - 6355 ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 6356 ; Do not provide a wrapped/HMA source or destination! 6357 movp: section_of_function 0 00001646 51 push cx 0 00001647 1E push ds 0 00001648 56 push si 0 00001649 06 push es 0 0000164A 57 push di 6363 0 0000164B 39D0 cmp ax, dx ; source above destination ? 0 0000164D 770A ja .up ; yes, move up (forwards) --> 0 0000164F 747B je .return ; same, no need to move --> 0 00001651 50 push ax 0 00001652 01C8 add ax, cx ; (expected not to carry) 0 00001654 39D0 cmp ax, dx ; end of source is above destination ? 0 00001656 58 pop ax 0 00001657 7730 ja .down ; yes, move from top down --> 6372 ; Here, the end of source is below-or-equal the destination, 6373 ; so they do not overlap. In this case we prefer moving up. 6374 6375 .up: 0 00001659 50 push ax 0 0000165A 52 push dx 6378 .uploop: 0 0000165B 8ED8 mov ds, ax 0 0000165D 8EC2 mov es, dx 0 0000165F 31FF xor di, di 0 00001661 31F6 xor si, si ; -> start of segment 0 00001663 81E90010 sub cx, 1000h ; 64 KiB left ? 0 00001667 7610 jbe .uplast ; no --> 0 00001669 51 push cx 0 0000166A B90080 mov cx, 10000h /2 0 0000166D F3A5 rep movsw ; move 64 KiB 0 0000166F 59 pop cx 0 00001670 050010 add ax, 1000h 0 00001673 81C20010 add dx, 1000h ; -> next segment 0 00001677 EBE2 jmp short .uploop ; proceed for more --> 6392 .uplast: 0 00001679 81C10010 add cx, 1000h ; restore counter 0 0000167D D1E1 shl cx, 1 0 0000167F D1E1 shl cx, 1 0 00001681 D1E1 shl cx, 1 ; *8, paragraphs to words 0 00001683 F3A5 rep movsw ; move last part 0 00001685 5A pop dx 0 00001686 58 pop ax 0 00001687 EB43 jmp short .return 6401 6402 .down: 0 00001689 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 6404 .dnloop: 0 0000168A 81E90010 sub cx, 1000h ; 64 KiB left ? 0 0000168E 761A jbe .dnlast ; no --> 0 00001690 50 push ax 0 00001691 52 push dx 0 00001692 01C8 add ax, cx 0 00001694 01CA add dx, cx 0 00001696 8ED8 mov ds, ax ; -> 64 KiB not yet moved 0 00001698 8EC2 mov es, dx 0 0000169A 5A pop dx 0 0000169B 58 pop ax 0 0000169C BFFEFF mov di, -2 0 0000169F 89FE mov si, di ; moved from last word down 0 000016A1 51 push cx 0 000016A2 B90080 mov cx, 10000h /2 0 000016A5 F3A5 rep movsw ; move 64 KiB 0 000016A7 59 pop cx 0 000016A8 EBE0 jmp short .dnloop ; proceed for more --> 6422 .dnlast: 0 000016AA 81C10010 add cx, 1000h ; restore counter 0 000016AE D1E1 shl cx, 1 0 000016B0 D1E1 shl cx, 1 0 000016B2 D1E1 shl cx, 1 ; *8, paragraphs to words 0 000016B4 89CF mov di, cx 0 000016B6 4F dec di 0 000016B7 D1E7 shl di, 1 ; words to offset, -> last word 0 000016B9 89FE mov si, di 0 000016BB 8ED8 mov ds, ax 0 000016BD 8EC2 mov es, dx ; first segment correct 6433 6434 6435 numdef AMD_ERRATUM_109_WORKAROUND, 1 6436 ; Refer to comment in init.asm init_movp. 6437 6438 %if _AMD_ERRATUM_109_WORKAROUND 0 000016BF E308 jcxz @FF 0 000016C1 83F914 cmp cx, 20 0 000016C4 7703 ja @FF 6442 @@: 0 000016C6 A5 movsw 0 000016C7 E2FD loop @B 6445 @@: 6446 %endif 0 000016C9 F3A5 rep movsw ; move first part 0 000016CB FC cld 6449 .return: 0 000016CC 5F pop di 0 000016CD 07 pop es 0 000016CE 5E pop si 0 000016CF 1F pop ds 0 000016D0 59 pop cx 0 000016D1 C3 retn 6456 %if !_LOADER && _BOOTLDR 6457 qq.bootfreecode_size: equ $-qq.bootfreecode 6458 %endif 6459 6460 6461 %if (_CATCHINTFAULTCOND && _CATCHINT0D) || (_CATCHINTFAULTCOND && _CATCHINT0C) || _CATCHINT08 || _CATCHINT2D || _PM || 1 ; (serial) 6465 ; INP: ds:si -> IISP entry 6466 ; al = interrupt number 6467 ; dx = interrupt unhook force flag (dif4 high word) 6468 ; bx = interrupt hook status flag (dif4 low word) 6469 ; cx = letters to insert into message 6470 ; bp = number of interrupts already unable to unhook 6471 ; OUT: NC if able to unhook or not currently hooked 6472 ; CY if currently hooked and unable to unhook, 6473 ; error message displayed 6474 ; bp incremented 6475 ; CHG: es, dx, ah, di 6476 qq_int_unhook_sim.set_bx_to_dx: 0 000016D2 89D3 mov bx, dx 6478 6479 qq_int_unhook_sim: 0 000016D4 851E[E801] test word [internalflags4], bx 0 000016D8 7413 jz .ret ; (NC) 6482 6483 .need: 0 000016DA E8[0000] call UnhookInterruptForceSim 6485 ; try unhooking it 0 000016DD 16 push ss 0 000016DE 07 pop es 0 000016DF 730C jnc .ret 6489 0 000016E1 890E[0000] mov word [msg.serial_cannot_unhook.int], cx 0 000016E5 BA[0000] mov dx, msg.serial_cannot_unhook.nowarn 0 000016E8 E8[0000] call putsz 0 000016EB 45 inc bp 0 000016EC F9 stc 6495 6496 .ret: 0 000016ED C3 retn 6498 %endif 6499 6500 6501 %if (_CATCHINTFAULTCOND && _CATCHINT0D) || (_CATCHINTFAULTCOND && _CATCHINT0C) || _CATCHINT08 || _CATCHINT2D || _PM 6504 ; INP: al = interrupt number 6505 ; ds:si -> IISP entry 6506 ; dx = interrupt unhook force flag (dif4 high word) 6507 ; bx = interrupt hook status flag (dif4 low word) 6508 ; cx = text to insert into error message 6509 ; OUT: CY if is hooked and error unhooking, 6510 ; dx -> error message 6511 ; NC if not hooked now (already wasn't or have unhooked), 6512 ; ZR if was already unhooked 6513 ; NZ if has been unhooked, was hooked 6514 qq_int_unhook_real.set_bx_to_dx: 0 000016EE 89D3 mov bx, dx 6516 6517 qq_int_unhook_real: 0 000016F0 851E[E801] test word [internalflags4], bx 0 000016F4 7419 jz .ret ; --> (NC, ZR) 6520 6521 .need: 0 000016F6 E8[0000] call UnhookInterruptForce 6523 ; try unhooking it 0 000016F9 7309 jnc .unhooked 6525 0 000016FB 890E[0000] mov word [msg.serial_cannot_unhook.int], cx 0 000016FF BA[0000] mov dx, msg.serial_cannot_unhook.nowarn 0 00001702 F9 stc 0 00001703 C3 retn 6530 6531 .unhooked: 0 00001704 F7D3 not bx 0 00001706 211E[E801] and word [internalflags4], bx 0 0000170A E8[0000] call update_inttab_optional 0 0000170D 85E4 test sp, sp ; (NC, NZ) 6536 .ret: 0 0000170F C3 retn 6538 %endif 6539 6540 6541 %ifn _LINK || _LINK_COMPAT 6542 %include "ss.asm" 6543 %endif 6544 6545 6546 usesection lDEBUG_CODE 6546 ------------------ note: usesection lDEBUG_CODE 6547 6548 %if 0 6549 getdebuggeebyte: 6550 push bp 6551 mov bp, sp 6552 sub sp, byte 4 6553 push bx 6554 push cx 6555 %define _dedata -4 6556 %define _bp 0 6557 %define _ip 2 6558 %define _adroffset 4 6559 %define _adrsegment 8 6560 test byte [], memorydump 6561 jz .realmemory 6562 6563 jmp short .return 6564 .realmemory32: 6565 .realmemory: 6566 mov ax, word [ bp + _adrsegment ] 6567 mov bx, word [ bp + _adroffset ] 6568 push ds 6569 mov ds, ax 6570 push word [ bx ] 6571 pop word [ bp + _dedata ] 6572 push word [ bx +2 ] 6573 pop word [ bp + _dedata +2 ] 6574 pop ds 6575 ; test ax, ax 6576 ; jnz .return 6577 mov dx, ax 6578 mov cl, 4 6579 shl ax, cl 6580 mov cl, 12 6581 shr dx, cl 6582 add ax, bx 6583 adc dx, byte 0 6584 jnz .return 6585 sub ax, 23h*4 6586 jb .return 6587 cmp ax, 2*4 6588 jae .return 6589 6590 push ds 6591 xor bx, bx 6592 mov ds, bx 6593 push si 6594 push di 6595 mov si, 22h*4 6596 mov di, hackints.dummy22 6597 movsw 6598 movsw 6599 mov bl, 8 6600 add si, bx 6601 add di, bx 6602 movsw 6603 movsw 6604 6605 mov cl, byte [ bx - 4 + hackints2324 ] 6606 mov byte [ bp + _dedata ], cl 6607 .return: 6608 pop cx 6609 pop bx 6610 pop ax 6611 pop dx 6612 pop bp 6613 retn 6 6614 6615 6616 ; Interrupt hack table 6617 ; 6618 ; This contains the Int23 and Int24 handler we want to show 6619 ; the user. As we'll retrieve a dword per access, 6620 align 4, db 0 6621 hackints: 6622 .dummy22: dd 0 6623 .23: dd 0 6624 .24: dd 0 6625 .dummy25: dd 0 6626 %endif 6627 6628 6629 %ifn _LINK || _LINK_COMPAT 6630 %if !_LOADER 6631 %include "ww.asm" 6632 %endif 6633 %endif 6634 6635 6636 usesection lDEBUG_CODE 6636 ------------------ note: usesection lDEBUG_CODE 6637 6638 %ifn _EMS 6639 xx: equ error 6640 %else 6641 %define extcall nearcall 6642 %define extcallcall nearcall 6643 %imacro internalcoderelocation 0-*.nolist 6644 %endmacro 6645 %imacro internaldatarelocation 0-*.nolist 6646 %endmacro 6647 %imacro linkdatarelocation 0-*.nolist 6648 %endmacro 6649 %define relocated(address) address 6650 %assign ELD 0 6651 6652 %include "xxshared.asm" 6653 6654 %undef extcall 6655 %undef extcallcall 6656 %unimacro internalcoderelocation 0-*.nolist 6657 %unimacro internaldatarelocation 0-*.nolist 6658 %unimacro linkdatarelocation 0-*.nolist 6659 %undef relocated 6660 %endif ; _EMS 6661 6662 %if _DUALCODE 6663 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 6663 ------------------ note: usesection lDEBUG_CODE2 6664 error_mirror: 0 000000B1 E878FFEB02[1017] dualcall error 6666 6667 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 6667 ------------------ note: usesection lDEBUG_CODE 6668 %else 6669 error_mirror equ error 6670 %endif 6671 6672 %ifn _EXPRDUALCODE && _DUALCODE 6673 %if _LINK 6674 error_expr: equ error 6675 %endif 6676 %endif 6677 6678 ; Error handlers. 6679 dualfunction 6680 error: section_of_function 0 00001710 16 push ss 0 00001711 07 pop es 0 00001712 16 push ss 0 00001713 1F pop ds 6685 %if _RH 0 00001714 8026[F201]CF clropt [internalflags6], dif6_rh_mode_2 | dif6_rh_mode 6687 %endif 6688 6689 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 00001719 B304 mov bl, 4 6691 ; INP: bl = 4 means want to get effective carat position, 6692 ; si -> text with error 6693 ; bl = 5 means want to get carat position with 6694 ; si = input value for counter 6695 ; OUT: bl == 4 if to run default handling, 6696 ; si may be modified 6697 ; bl == 5 if to use si as number of spaces to indent, 6698 ; si = value for counter 6699 ; bl must be 4 or 5 6700 ; CHG: ax, bh, cx, dx, di 6701 ; STT: ds = es = ss 6702 ; UP, EI 0 0000171B E8[0000] call transfer_to_ext_puts_getline 0 0000171E 89F1 mov cx, si 0 00001720 80FB04 cmp bl, 4 0 00001723 7511 jne .gotcx 6707 %else 6708 mov cx, si 6709 %endif 0 00001725 81E9[1300] sub cx, line_in+3 0 00001729 81F90001 cmp cx, 256 0 0000172D 7705 ja .invalid 0 0000172F 030E[080D] add cx, word [promptlen]; number of spaces to skip 0 00001733 A9 db __TEST_IMM16 ; (skip xor) 6715 .invalid: 0 00001734 31C9 xor cx, cx ; if we're really messed up 6717 .gotcx: 0 00001736 8B26[8A0C] mov sp, [throwsp] 0 0000173A FF26[880C] jmp near [throwret] 6720 ; INP: cx = number of spaces to indent 6721 6722 ; This is the default address in throwret. 6723 ; Display the error, then jump to errret. 6724 errhandler: 0 0000173E E8[0000] call get_columns ; ax = columns 6726 .: 0 00001741 29C1 sub cx, ax 0 00001743 73FC jnc . 0 00001745 01C1 add cx, ax 0 00001747 7407 jz err2 0 00001749 B020 mov al, 32 6732 .loop: 0 0000174B E8[0000] call putc 0 0000174E E2FB loop .loop 6735 err2: 0 00001750 BA[0000] mov dx, errcarat 0 00001753 E8[0000] call putsz ; print string 0 00001756 B8FF01 mov ax, 01FFh 0 00001759 E80A00 call setrc 0 0000175C C706[F60D][5206] mov word [lastcmd], dmycmd 6741 ; cancel command repetition 0 00001762 FF26[860C] jmp near [errret] ; return to the prompt (cmd3, aa01) 6743 6744 6745 setrc: section_of_function 0 00001766 833E[100D]00 cmp word [rc], 0 0 0000176B 7503 jne .ret 0 0000176D A3[100D] mov word [rc], ax 6749 .ret: 0 00001770 C3 retn 6751 6752 6753 %if !_LOADER 6754 ; Terminate the attached process, if any 6755 ; 6756 ; OUT: NZ if now no process attached 6757 ; ZR if still a process attached, 6758 ; ie we failed to terminate this one 6759 terminate_attached_process: 0 00001771 F606[DE01]80 testopt [internalflags], attachedterm 0 00001776 7552 jnz @F 6762 %if _TSR && (_APPLICATION || _DEVICE) 0 00001778 F606[DE01]40 testopt [internalflags], tsrmode 0 0000177D 754C jnz .tsr 6765 %endif 0 0000177F 8026[E10E]FC clropt [reg_efl], 300h ; clear TF and IF 0 00001784 8C0E[D00E] mov word [reg_cs], cs 0 00001788 C706[DC0E][5314] mov word [reg_eip], terminate_00 0 0000178E 50 push ax ; (dummy to take space for return address) 0 0000178F 8C16[CC0E] mov word [reg_ss], ss 0 00001793 8926[B40E] mov word [reg_esp], sp ; save current ss:sp 0 00001797 58 pop ax ; (discard) 0 00001798 31C0 xor ax, ax 0 0000179A A3[DE0E] mov word [reg_eip+2], ax 0 0000179D A3[B60E] mov word [reg_esp+2], ax 0 000017A0 A3[E20E] mov word [reg_efl+2], ax 6777 %if _PM 0 000017A3 A3[C80E] mov word [reg_es], ax 0 000017A6 A3[C40E] mov word [reg_ds], ax 0 000017A9 A3[D40E] mov word [reg_fs], ax 0 000017AC A3[D80E] mov word [reg_gs], ax ; insure valid segregs in PM 6782 %endif 0 000017AF C706[900C]8000 mov word [run_sp_reserve], 128 0 000017B5 E8[0000] call run 6785 ; The dummy stack space above is to hold the return address 6786 ; of this call. The debugger stack is used by this run. 0 000017B8 8326[900C]00 and word [run_sp_reserve], 0 6788 6789 %if _SYMBOLIC 0 000017BD E8[0000] nearcall zz_detect_xms 0 000017C0 8026[E301]F7 clropt [internalflags2], dif2_createdprocess 6792 %endif 6793 .testagain: 0 000017C5 F606[DE01]80 testopt [internalflags], attachedterm 6795 @@: 0 000017CA C3 retn 6797 6798 %if _TSR && (_APPLICATION || _DEVICE) 6799 .tsr: 0 000017CB C706[F40D][0000] mov word [run_int], msg.tsr_cannot_terminate_attached 0 000017D1 EBF2 jmp .testagain 6802 %endif 6803 %endif 6804 6805 6806 %ifn _LINK || _LINK_COMPAT 6807 %include "vv.asm" 6808 %endif 6809 %if !_VXCHG && _LINK 6810 vv equ error 6811 %endif 6812 6813 6814 %if _DEVICE && _DEVICE_SET_2324 6815 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 6815 ------------------ note: usesection lDEBUG_DATA_ENTRY 6816 devint23: 0 00001573 F9 stc 0 00001574 CB retf 6819 6820 devint24: 0 00001575 B003 mov al, 3 0 00001577 CF iret 6823 6824 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 6824 ------------------ note: usesection lDEBUG_CODE 6825 %endif 6826 6827 6828 ;--- this is called by "run" 6829 ;--- set debuggee's INT 23/24. 6830 ;--- don't use INT 21h here, DOS might be "in use". 6831 ;--- registers may be modified - will soon be set to debuggee's 6832 6833 %if !_LOADER 6834 ; Low-level functions to reset to debuggee's interrupt vectors 23h/24h 6835 ; INP: - 6836 ; OUT: - 6837 ; CHG: bx, (e)dx, cx, ax 6838 ; STT: ds = our segment 6839 ; Do not use Int21, even if not in InDOS mode 6840 setint2324: 6841 %if _BOOTLDR 6842 %if _APPLICATION || _DEVICE 0 000017D3 F606[DD01]40 testopt [internalflags], nodosloaded 0 000017D8 7521 jnz .ret ; don't touch int23/24 --> 6845 %else 6846 retn 6847 %endif 6848 %endif 6849 %if _APPLICATION || _DEVICE 6850 %if _PM 0 000017DA E843F2 call ispm 0 000017DD 741D jz .pm 6853 %endif 0 000017DF 06 push es 0 000017E0 57 push di 0 000017E1 56 push si 6857 0 000017E2 31FF xor di, di 0 000017E4 8EC7 mov es, di 0 000017E6 BF8C00 mov di, 23h *4 0 000017E9 BE[9C0C] mov si, run2324 0 000017EC A5 movsw 0 000017ED A5 movsw 0 000017EE A5 movsw 0 000017EF A5 movsw 6866 6867 %if _PM 0 000017F0 E83001 call InDOS 0 000017F3 7503 jnz @F 0 000017F5 E87704 call hook2F 6871 @@: 6872 %endif 0 000017F8 5E pop si 0 000017F9 5F pop di 0 000017FA 07 pop es 6876 .ret: 0 000017FB C3 retn 6878 %if _PM 6879 .pm: 0 000017FC 56 push si 0 000017FD BE[9C0C] mov si, run2324 0 00001800 BB2302 mov bx, 0223h 6883 .loop: 0 00001803 66 _386_o32 ; mov edx, dword [si+0] 0 00001804 8B14 mov dx, word [si+0] 0 00001806 8B4C04 mov cx, word [si+4] 0 00001809 B80502 mov ax, 0205h 0 0000180C CD31 int 31h 0 0000180E 83C606 add si, 6 0 00001811 FEC3 inc bl 0 00001813 FECF dec bh 0 00001815 75EC jnz .loop 0 00001817 5E pop si 0 00001818 C3 retn 6895 %endif 6896 %endif 6897 6898 6899 ; Low-level functions to save debuggee's interrupt vectors 23h/24h 6900 ; and set our interrupt vectors instead 6901 ; INP: - 6902 ; OUT: - 6903 ; CHG: - 6904 ; STT: ds = our segment 6905 ; Do not use Int21, even if not in InDOS mode 6906 getint2324: 6907 %if _BOOTLDR 6908 %if _APPLICATION || _DEVICE 0 00001819 F606[DD01]40 testopt [internalflags], nodosloaded 0 0000181E 752A jnz .ret ; don't touch int23/24 --> 6911 %else 6912 retn 6913 %endif 6914 %endif 6915 %if _APPLICATION || _DEVICE 6916 %if _PM 0 00001820 E8FDF1 call ispm 0 00001823 7426 jz .pm 6919 %endif 0 00001825 56 push si 0 00001826 57 push di 0 00001827 06 push es 6923 0 00001828 1E push ds 0 00001829 07 pop es 0 0000182A 31FF xor di, di 0 0000182C 8EDF mov ds, di 0 0000182E BF[9C0C] mov di, run2324 0 00001831 BE8C00 mov si, 23h *4 0 00001834 56 push si 0 00001835 A5 movsw ; save interrupt vector 23h 0 00001836 A5 movsw 0 00001837 A5 movsw ; save interrupt vector 24h 0 00001838 A5 movsw 0 00001839 5F pop di 0 0000183A 06 push es 0 0000183B 1F pop ds 0 0000183C 31F6 xor si, si 0 0000183E 8EC6 mov es, si 0 00001840 BE0E00 mov si, CCIV 0 00001843 A5 movsw 0 00001844 A5 movsw 0 00001845 A5 movsw 0 00001846 A5 movsw 6945 0 00001847 07 pop es 0 00001848 5F pop di 0 00001849 5E pop si 6949 .ret: 0 0000184A C3 retn 6951 %if _PM 6952 subcpu 286 6953 .pm: 0 0000184B 66 _386_o32 0 0000184C 60 pusha 0 0000184D BF[9C0C] mov di, run2324 0 00001850 BB2302 mov bx, 0223h 6958 .loop: 0 00001853 B80402 mov ax, 0204h 0 00001856 CD31 int 31h 0 00001858 66 _386_o32 ; mov dword [di+0], edx 0 00001859 8915 mov word [di+0], dx 0 0000185B 894D04 mov word [di+4], cx 0 0000185E 83C706 add di, byte 6 0 00001861 FEC3 inc bl 0 00001863 FECF dec bh 0 00001865 75EC jnz .loop 6968 %if _ONLYNON386 6969 db __TEST_IMM8 ; (skip pusha) 6970 %else 0 00001867 A9 db __TEST_IMM16 ; (skip pushad) 6972 %endif 6973 6974 restoredbgi2324: 6975 setdbgi2324: 0 00001868 66 _386_o32 0 00001869 60 pusha 0 0000186A BE[A80C] mov si, dbg2324 0 0000186D BB2302 mov bx, 0223h 0 00001870 6631D2 _386 xor edx, edx 6981 .loop: 0 00001873 AD lodsw 0 00001874 89C2 mov dx, ax 0 00001876 8B0E[0000] mov cx, word [cssel] 0 0000187A B80502 mov ax, 0205h 0 0000187D CD31 int 31h 0 0000187F FEC3 inc bl 0 00001881 FECF dec bh 0 00001883 75EE jnz .loop 0 00001885 66 _386_o32 0 00001886 61 popa 0 00001887 C3 retn 6993 subcpureset 6994 %endif 6995 %endif 6996 6997 %if 0 6998 The next three subroutines concern the handling of Int23 and 24. 6999 These interrupt vectors are saved and restored when running the 7000 child process, but are not active when DEBUG itself is running. 7001 It is still useful for the programmer to be able to check where Int23 7002 and 24 point, so these values are copied into the interrupt table 7003 during parts of the C, D, (DX, DI,) E, M, and S commands, so that 7004 they appear to be in effect. The E command also copies these values 7005 back. 7006 7007 Between calls to dohack and unhack, there should be no calls to DOS, 7008 so that there is no possibility of these vectors being used when 7009 DEBUG itself is running. 7010 7011 ; As long as no DOS is loaded anyway, Int23 and Int24 won't be touched 7012 by us, so the whole hack is unnecessary and will be skipped. 7013 %endif 7014 7015 ; PREPHACK - Set up for interrupt vector substitution. 7016 ; Entry es = cs 7017 prephack: section_of_function 0 00001888 803E[B80C]00 cmp byte [hakstat], 0 0 0000188D 7509 jne .err ; if hack status error --> 0 0000188F 57 push di 0 00001890 BF[B00C] mov di, sav2324 ; debugger's Int2324 0 00001893 E80B00 call prehak1 0 00001896 5F pop di 0 00001897 C3 retn 7025 7026 .err: 0 00001898 52 push dx 0 00001899 BA[0000] mov dx, ph_msg 0 0000189C E8[0000] call putsz ; display error 0 0000189F 5A pop dx 0 000018A0 C3 retn 7032 7033 ; INP: di-> saved interrupt vectors 7034 ; OUT: - 7035 ; CHG: - 7036 prehak1: 7037 %if _PM 0 000018A1 E87CF1 call ispm 0 000018A4 740F jz .pm ; nothing to do 7040 %endif 0 000018A6 1E push ds 0 000018A7 56 push si 0 000018A8 31F6 xor si, si 0 000018AA 8EDE mov ds, si 0 000018AC BE8C00 mov si, 23h *4 0 000018AF A5 movsw 0 000018B0 A5 movsw 0 000018B1 A5 movsw 0 000018B2 A5 movsw 0 000018B3 5E pop si 0 000018B4 1F pop ds 7052 .pm: 0 000018B5 C3 retn 7054 7055 7056 ; DOHACK - Fake the interrupt vectors 23h and 24h to debuggee's 7057 ; UNHACK - Restore interrupt vectors 23h and 24h to our values 7058 ; It's OK to do either of these twice in a row. 7059 ; In particular, the S command may do unhack twice in a row. 7060 ; INP: ds = our segment 7061 ; OUT: es = our segment 7062 ; CHG: - 7063 ; STT: Do not use Int21 7064 dohack: section_of_function 0 000018B6 16 push ss 0 000018B7 07 pop es 7067 %if _BOOTLDR 7068 %if _APPLICATION || _DEVICE 0 000018B8 F606[DD01]40 testopt [internalflags], nodosloaded 0 000018BD 7555 jnz unhack.ret ; nothing to hack --> 7071 %else 7072 retn 7073 %endif 7074 %endif 7075 %if _APPLICATION || _DEVICE 0 000018BF 56 push si 0 000018C0 C606[B80C]01 mov byte [hakstat], 1 0 000018C5 BE[9C0C] mov si, run2324 ; debuggee's interrupt vectors 7079 %if _PM 0 000018C8 E855F1 call ispm 0 000018CB 7537 jnz unhack.common 7082 subcpu 286 0 000018CD 66 _386_o32 0 000018CE 60 pusha 0 000018CF BB2302 mov bx, 0223h 7086 .pm_loop: 0 000018D2 66 _386_o32 0 000018D3 8B14 mov dx, word [si+0+0] 0 000018D5 8B4C04 mov cx, word [si+0+4] 0 000018D8 B80502 mov ax, 205h 0 000018DB CD31 int 31h 0 000018DD 83C606 add si, byte 6 0 000018E0 FEC3 inc bl 0 000018E2 FECF dec bh 0 000018E4 75EC jnz .pm_loop 0 000018E6 66 _386_o32 0 000018E7 61 popa 0 000018E8 5E pop si 0 000018E9 C3 retn 7100 subcpureset 7101 %else 7102 jmp short unhack.common 7103 %endif 7104 %endif 7105 7106 unhack: section_of_function 0 000018EA 16 push ss 0 000018EB 07 pop es 7109 %if _BOOTLDR 7110 %if _APPLICATION || _DEVICE 0 000018EC F606[DD01]40 testopt [internalflags], nodosloaded 0 000018F1 7521 jnz .ret ; nothing to hack --> 7113 %else 7114 retn 7115 %endif 7116 %endif 7117 %if _APPLICATION || _DEVICE 0 000018F3 C606[B80C]00 mov byte [hakstat], 0 7119 %if _PM 0 000018F8 E825F1 call ispm 0 000018FB 7503E968FF jz restoredbgi2324 7122 %endif 0 00001900 56 push si 0 00001901 BE[B00C] mov si, sav2324 ; debugger's interrupt vectors 7125 .common: 0 00001904 57 push di 0 00001905 06 push es 0 00001906 31FF xor di, di 0 00001908 8EC7 mov es, di 0 0000190A BF8C00 mov di, 23h *4 0 0000190D A5 movsw 0 0000190E A5 movsw 0 0000190F A5 movsw 0 00001910 A5 movsw 0 00001911 07 pop es 0 00001912 5F pop di 0 00001913 5E pop si 7138 .ret: 0 00001914 C3 retn 7140 %endif 7141 %endif 7142 7143 %if _LOADER 7144 prephack: section_of_function 7145 dohack: section_of_function 7146 unhack: section_of_function 7147 retn 7148 %endif 7149 7150 7151 InDOS_or_BIOS_output: 0 00001915 F606[B901]02 testopt [options6], opt6_bios_output 0 0000191A 7525 jnz InDOS.return ; if should do output to ROM-BIOS --> 7154 7155 InDOS_or_BIOS_IO: 0 0000191C F606[BB01]01 testopt [options6], opt6_bios_io 0 00001921 751E jnz InDOS.return ; if should do I/O from/to ROM-BIOS --> 7158 7159 7160 ; OUT: NZ if InDOS mode 7161 ; ZR if not 7162 ; CHG: - 7163 ; STT: ss = ds 7164 InDOS: section_of_function 7165 %if _BOOTLDR 0 00001923 F606[DD01]40 testopt [internalflags], nodosloaded 0 00001928 7517 jnz .return ; always "in DOS" --> 7168 %endif 7169 %if _APPLICATION || _DEVICE 0 0000192A F606[A401]08 testopt [options], fakeindos 0 0000192F 7510 jnz .return ; faking InDOS on anyway --> 7172 .real_indos: 0 00001931 1E push ds 0 00001932 56 push si 0 00001933 BE[C80C] mov si, pInDOS + so16aSegSel 0 00001936 E80900 call update_dosdata_segment 0 00001939 C574FE lds si, [si - so16aSegSel] 0 0000193C 803C00 cmp byte [si], 0 0 0000193F 5E pop si 0 00001940 1F pop ds 7181 %endif 7182 .return: 0 00001941 C3 retn 7184 7185 7186 ; INP: si -> word seg or sel, word segment, word selector 7187 update_dosdata_segment: 7188 %if _APPLICATION || _DEVICE 0 00001942 F606[E301]20 testopt [internalflags2], dif2_int31_segment 0 00001947 742C jz .ret 0 00001949 52 push dx 0 0000194A 50 push ax 0 0000194B 53 push bx 0 0000194C B031 mov al, 31h 0 0000194E E8[0000] call get_86m_interrupt_handler_no_dos 7196 %if _PM 0 00001951 395402 cmp word [si + soaSegment], dx 0 00001954 7419 je @F 7199 0 00001956 E8C7F0 call ispm 0 00001959 750E jnz .realmode 7202 0 0000195B 89D3 mov bx, dx 0 0000195D B80200 mov ax, 0002h 0 00001960 CD31 int 31h 7206 0 00001962 8904 mov word [si + soaSegSel], ax 0 00001964 894404 mov word [si + soaSelector], ax 0 00001967 EB06 jmp @F 7210 7211 .realmode: 0 00001969 8914 mov word [si + soaSegSel], dx 0 0000196B 83640400 and word [si + soaSelector], 0 7214 7215 @@: 0 0000196F 895402 mov word [si + soaSegment], dx 0 00001972 5B pop bx 0 00001973 58 pop ax 7219 %else 7220 pop bx 7221 pop ax 7222 mov word [si + soaSegSel], dx 7223 %endif 0 00001974 5A pop dx 7225 %endif 7226 .ret: 0 00001975 C3 retn 7228 7229 7230 ; PARSECM - Parse command line for C and M commands. 7231 ; Entry AL First nonwhite character of parameters 7232 ; SI Address of the character after that 7233 ; DI (If _PM) getaddr or getaddrX for second parameter 7234 ; Exit DS:ESI Address from first parameter 7235 ; ES:EDI Address from second parameter 7236 ; ECX Length of address range minus one 7237 ; [bAddr32] Set if any high word non-zero 7238 7239 parsecm_have_address: 0 00001976 E8DCEFEB02[0000] nearcall getrangeX_have_address_need_length 0 0000197D EB10 jmp @F 7242 7243 parsecm: 0 0000197F E806FF call prephack 0 00001982 8B1E[C40E] mov bx, word [reg_ds] ; get source range 0 00001986 31C9 xor cx, cx 0 00001988 E8CAEFEB02[0000] nearcall getrangeX ; get address range into bx:(e)dx bx:(e)cx 7248 ; Bug fixed in Debug/X 2.00: This used the same scratch 7249 ; selector as the getaddr used for the second operand. 7250 ; As we never write to the first operand of an C or M 7251 ; command the simple fix is to use getrangeX here. 7252 @@: 0 0000198F 53 push bx ; save segment first address 0 00001990 E8[0000] call skipcomm0 0 00001993 8B1E[C40E] mov bx, word [reg_ds] 0 00001997 66 _386_PM_o32 ; sub ecx, edx 0 00001998 29D1 sub cx, dx ; number of bytes minus one 0 0000199A 66 _386_PM_o32 ; push edx 0 0000199B 52 push dx 0 0000199C 66 _386_PM_o32 ; push ecx 0 0000199D 51 push cx 7262 %if _PM 0 0000199E 8A0E[0000] mov cl, byte [bAddr32] 0 000019A2 51 push cx 7265 %if _DUALCODE && _EXPRDUALCODE 0 000019A3 E8AFEFEB02[B800] nearcall ..@parsecm_getaddr 7267 7268 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 7268 ------------------ note: usesection lDEBUG_CODE2 7269 ..@parsecm_getaddr: section_of_function 0 000000B8 FFE7 jmp di 7271 7272 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 7272 ------------------ note: usesection lDEBUG_CODE 7273 %else 7274 call di ; get destination address into bx:edx 7275 %endif 0 000019AA 59 pop cx 0 000019AB 080E[0000] or byte [bAddr32], cl ; if either is 32-bit, handle both as 32-bit 7278 %else 7279 nearcall getaddr ; get destination address into bx:dx 7280 %endif 0 000019AF 66 _386_PM_o32 0 000019B0 59 pop cx ; pop ecx 0 000019B1 66 _386_PM_o32 ; mov edi, edx 0 000019B2 89D7 mov di, dx 0 000019B4 66 _386_PM_o32 0 000019B5 01CA add dx, cx ; add edx, ecx 0 000019B7 7209 jc short errorj7 ; if it wrapped around 0 000019B9 E8[0000] call chkeol ; expect end of line 0 000019BC 8EC3 mov es, bx 0 000019BE 66 _386_PM_o32 ; pop esi 0 000019BF 5E pop si 0 000019C0 1F pop ds 0 000019C1 C3 retn 7294 7295 errorj7: 0 000019C2 E94BFD jmp error 7297 7298 7299 %if _APPLICATION || _DEVICE 7300 ; PARSELW - Parse command line for L and W commands. 7301 ; 7302 ; Entry AL First nonwhite character of parameters 7303 ; SI Address of the character after that 7304 ; 7305 ; Exit If there is at most one argument (program load/write), then the 7306 ; zero flag is set, and registers are set as follows: 7307 ; bx:(e)dx Transfer address 7308 ; 7309 ; If there are more arguments (absolute disk read/write), then the 7310 ; zero flag is clear, and registers are set as follows: 7311 ; 7312 ; DOS versions prior to 3.31: 7313 ; AL Drive number 7314 ; CX Number of sectors to read 7315 ; DX Beginning logical sector number 7316 ; DS:BX Transfer address 7317 ; 7318 ; Later DOS versions: 7319 ; AL Drive number 7320 ; BX Offset of packet 7321 ; CX 0FFFFh 7322 7323 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 7323 ------------------ note: usesection lDEBUG_DATA_ENTRY 7324 align 4, db 0 0 00001578 00000000 packet: dd 0 ; sector number 0 0000157C 0000 dw 0 ; number of sectors to read 0 0000157E 00000000 dd 0 ; transfer address Segm:OOOO 7328 %if _PM 0 00001582 0000 dw 0 ; transfer address might be Segm:OOOOOOOO! 7330 %endif 7331 7332 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 7332 ------------------ note: usesection lDEBUG_CODE 7333 parselw: 0 000019C5 8B1E[D00E] mov bx, word [reg_cs] ; default segment 0 000019C9 66 _386_o32 ; xor edx, edx 0 000019CA 31D2 xor dx, dx 0 000019CC F606[FC0D]08 test byte [fileext], EXT_HEX 0 000019D1 7502 jnz @F ; if .HEX file, default offset is 0 --> 0 000019D3 B601 mov dh, 1 ; default offset in dx = 100h 7340 @@: 0 000019D5 E8[0000] call iseol? 0 000019D8 747B je plw2 ; if no arguments 0 000019DA E878EFEB02[0000] nearcall getaddr ; get buffer address into bx:(e)dx 0 000019E1 E8[0000] call skipcomm0 0 000019E4 E8[0000] call iseol? 0 000019E7 746C je plw2 ; if only one argument 0 000019E9 53 push bx ; save segment 0 000019EA 52 push dx ; save offset 0 000019EB BB8000 mov bx, 80h ; max number of sectors to read 0 000019EE F7DA neg dx 0 000019F0 7406 jz plw1 ; if address is zero 0 000019F2 B109 mov cl, 9 0 000019F4 D3EA shr dx, cl ; max number of sectors which can be read 0 000019F6 89D7 mov di, dx 7355 plw1: 0 000019F8 803C3A cmp byte [si], ':' ; drive letter specification ? 0 000019FB 750F jne @F ; no --> 7358 0 000019FD 50 push ax 0 000019FE E8[0000] call capitalise 0 00001A01 2C41 sub al, 'A' 0 00001A03 3C20 cmp al, 32 ; valid drive ? 0 00001A05 88C2 mov dl, al ; put drive number 0 00001A07 46 inc si ; -> past the colon 0 00001A08 58 pop ax 0 00001A09 7209 jb @FF ; got it --> 0 00001A0B 4E dec si ; -> at colon 7368 7369 @@: 0 00001A0C E846EFEB02[0000] nearcall getbyte ; get drive number (DL) 0 00001A13 A8 db __TEST_IMM8 ; (skip lodsb) 7372 @@: 0 00001A14 AC lodsb 0 00001A15 E8[0000] call skipcomm0 0 00001A18 52 push dx 0 00001A19 80C241 add dl, 'A' 0 00001A1C 8816[0000] mov byte [driveno], dl 0 00001A20 E832EFEB02[0000] nearcall getdword ; get relative sector number 0 00001A27 E8[0000] call skipcomm0 0 00001A2A 53 push bx ; save sector number high 0 00001A2B 52 push dx ; save sector number low 0 00001A2C 56 push si ; in case we find an error 0 00001A2D E825EFEB02[0000] nearcall getword ; get sector count 0 00001A34 4A dec dx 0 00001A35 39FA cmp dx, di 0 00001A37 7389 jae errorj7 ; if too many sectors 0 00001A39 42 inc dx 0 00001A3A 89D1 mov cx, dx 0 00001A3C E8[0000] call chkeol ; expect end of line 0 00001A3F F606[DC01]07 testopt [internalflags], oldpacket| newpacket| ntpacket 0 00001A44 7510 jnz plw3 ; if using a packet --> 0 00001A46 5E pop si ; in case of error 0 00001A47 5A pop dx ; get LoWord starting logical sector number 0 00001A48 5B pop bx ; get HiWord 0 00001A49 85DB test bx, bx ; just a 16-bit sector number possible 0 00001A4B 7403E972FF jnz errorj7 ; if too big 0 00001A50 58 pop ax ; drive number 0 00001A51 5B pop bx ; transfer buffer ofs 0 00001A52 1F pop ds ; transfer buffer seg 0 00001A53 85C9 test cx, cx ; NZ 7401 plw2: 0 00001A55 C3 retn 7403 7404 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 7405 plw3: 0 00001A56 5B pop bx ; discard si 0 00001A57 BB[7815] mov bx, packet 0 00001A5A 8F07 pop word [bx+0] ; LoWord sector number 0 00001A5C 8F4702 pop word [bx+2] ; HiWord sector number 0 00001A5F 894F04 mov word [bx+4], cx ; number of sectors 0 00001A62 58 pop ax ; drive number 0 00001A63 8F4706 pop word [bx+6] ; transfer address ofs 0 00001A66 5A pop dx 0 00001A67 31C9 xor cx, cx 7415 %if _PM 0 00001A69 E8B4EF call ispm 0 00001A6C 751B jnz plw3_1 0 00001A6E 803E[0000]00 cmp byte [dpmi32], 0 0 00001A73 7414 jz plw3_1 7420 [cpu 386] 0 00001A75 89570A mov word [bx+10], dx ; save segment of transfer buffer 0 00001A78 660FB7DB movzx ebx, bx 0 00001A7C 66C1EA10 shr edx, 16 ; get HiWord(offset) 0 00001A80 803E[0000]01 cmp byte [bAddr32], 1 0 00001A85 7402 jz plw3_1 0 00001A87 31D2 xor dx, dx 7427 __CPU__ 7428 plw3_1: 7429 %endif 0 00001A89 895708 mov word [bx+8], dx ; transfer address seg 0 00001A8C 49 dec cx ; NZ and make cx = -1 0 00001A8D C3 retn 7433 %endif 7434 7435 7436 %ifn _LINK || _LINK_COMPAT 7437 %include "expr.asm" 7438 %include "rr.asm" 7439 7440 7441 %include "lineio.asm" 7442 7443 7444 %include "ints.asm" 7445 %endif 7446 %if !_40COLUMNS && _LINK 7447 puts_break_line_more: equ dmycmd 7448 %endif 7449 7450 7451 usesection lDEBUG_CODE 7451 ------------------ note: usesection lDEBUG_CODE 7452 7453 %if _BOOTLDR 7454 ; Determine the amount of actual memory 7455 ; 7456 ; This is important to call at the time we need the size, 7457 ; not just save the size initially. Loading other pre-boot 7458 ; installers or RPLs will change the size. 7459 ; 7460 ; INP: - 7461 ; OUT: dx = segment behind usable memory (taking EBDAs & RPLs into account) 7462 ; ds = ss 7463 ; CHG: ax, cx, di, si, ds 7464 bootgetmemorysize: section_of_function 0 00001A8E 06 push es 0 00001A8F 31C0 xor ax, ax 0 00001A91 8ED8 mov ds, ax 0 00001A93 CD12 int 12h ; get memory size in KiB 0 00001A95 B106 mov cl, 6 0 00001A97 D3E0 shl ax, cl ; *64, convert to paragraphs 0 00001A99 50 push ax 0 00001A9A C536BC00 lds si, [ 2Fh *4 ] ; get current Int2F 0 00001A9E 46 inc si ; pointer valid (not 0FFFFh) ? (left increased!) 0 00001A9F 741B jz .norpl ; no --> 0 00001AA1 8CD8 mov ax, ds 0 00001AA3 85C0 test ax, ax ; segment valid (not zero) ? 0 00001AA5 7415 jz .norpl ; no --> 0 00001AA7 46 times 2 inc si ; +3 with above inc 0 00001AA9 0E push cs 0 00001AAA 07 pop es 0 00001AAB BF[C11A] mov di, .rpl 0 00001AAE B90300 mov cx, .rpl_size 0 00001AB1 F3A6 repe cmpsb ; "RPL" signature ? 0 00001AB3 7507 jne .norpl ; no --> 0 00001AB5 5A pop dx 0 00001AB6 B8064A mov ax, 4A06h 0 00001AB9 CD2F int 2Fh ; adjust usable memory size for RPL 0 00001ABB A8 db __TEST_IMM8 ; (skip pop) 7489 .norpl: 0 00001ABC 5A pop dx 7491 ; dx = segment behind last available memory 0 00001ABD 16 push ss 0 00001ABE 1F pop ds 0 00001ABF 07 pop es 0 00001AC0 C3 retn 7496 0 00001AC1 52504C .rpl: db "RPL" 7498 endarea .rpl 7499 %endif 7500 7501 7502 %if !_LOADER 7503 ; Ensure a debuggee process is loaded 7504 ; 7505 ; INP: si:di = to preserve if have a process already 7506 ; OUT: NZ if have no process and unable to create process 7507 ; ZR if have a process or created empty process 7508 ; NC if had no process yet, created one or not 7509 ; CY if had a process already, 7510 ; si:di = preserved input 7511 ; NC, ZR if had no process, created empty one, 7512 ; si:di = debuggee cs:ip 7513 ; NC, NZ if int19 occurred (or bootloaded) 7514 ; CHG: si, di, cx 7515 ensuredebuggeeloaded: 0 00001AC4 50 push ax 0 00001AC5 53 push bx 0 00001AC6 52 push dx 7519 0 00001AC7 F606[E601]20 testopt [internalflags3], dif3_gotint19 0 00001ACC 746F jz .notint19 7522 0 00001ACE 8026[E601]DF clropt [internalflags3], dif3_gotint19 7524 %if _BOOTLDR 7525 %if _APPLICATION || _DEVICE 0 00001AD3 F606[DD01]40 testopt [internalflags], nodosloaded 0 00001AD8 743B jz .dosint19 7528 %endif 7529 7530 .bootint19: 0 00001ADA E87C01 call zeroregs 7532 0 00001ADD B86000 mov ax, 60h 0 00001AE0 50 push ax 0 00001AE1 BF[C40E] mov di, reg_ds 0 00001AE4 AB stosw 0 00001AE5 AF scasw ; (skip dummy high word) 0 00001AE6 AB stosw 0 00001AE7 AF scasw 0 00001AE8 AB stosw 0 00001AE9 AF scasw 0 00001AEA AB stosw 0 00001AEB E8[0000] call adusetup 0 00001AEE E89DFF call bootgetmemorysize 0 00001AF1 83EA60 sub dx, 60h 0 00001AF4 81FA0010 cmp dx, 1000h 0 00001AF8 7602 jbe .bootbelow64kib ; if memory left <= 64 KiB 0 00001AFA 31D2 xor dx, dx ; dx = 1000h (same thing, after shifting) 7549 .bootbelow64kib: 0 00001AFC B104 mov cl, 4 0 00001AFE D3E2 shl dx, cl 0 00001B00 4A dec dx 0 00001B01 4A dec dx 0 00001B02 8916[B40E] mov word [reg_esp], dx 0 00001B06 07 pop es 0 00001B07 87D7 xchg dx, di ; es:di = child stack pointer 0 00001B09 31C0 xor ax, ax 0 00001B0B AB stosw ; push 0 on client's stack 7559 0 00001B0C 26C7060000CD19 mov word [es:0], 019CDh ; place opcode for int 19h at cs:ip 0 00001B13 EB1B jmp @F 7562 %endif 7563 7564 %if _APPLICATION || _DEVICE 7565 .dosint19: 0 00001B15 8B16[B40E] mov dx, word [reg_esp] 0 00001B19 8B1E[CC0E] mov bx, word [reg_ss] 7568 0 00001B1D E83901 call zeroregs 7570 7571 ; Upon receiving an int 19h in DOS 7572 ; just set up some shim that will 7573 ; lead to process termination. 7574 ; Unlike before we do not longer try 7575 ; to create a new process then. 0 00001B20 8916[B40E] mov word [reg_esp], dx 0 00001B24 891E[CC0E] mov word [reg_ss], bx ; preserve our stack 0 00001B28 FF36[960C] push word [pspdbe] 0 00001B2C 8F06[D00E] pop word [reg_cs] ; cs = PSP, ip = 0, 7580 ; cs:ip -> int 20h instruction 7581 7582 @@: 0 00001B30 F606[DE01]80 testopt [internalflags], attachedterm 0 00001B35 7511 jnz .noprocess ; if also process not loaded 7585 0 00001B37 80CA01 or dl, 1 ; flags return NC, NZ 0 00001B3A E90C01 jmp .return 7588 %endif 7589 7590 .notint19: 0 00001B3D F606[DE01]80 testopt [internalflags], attachedterm 0 00001B42 7504 jnz .noprocess ; not loaded, create --> 7593 ; flags return ZR 0 00001B44 F9 stc ; flags return CY 0 00001B45 E90101 jmp .return 7596 7597 .noprocess: 7598 %if _BOOTLDR 7599 %if _APPLICATION || _DEVICE 0 00001B48 F606[DD01]40 testopt [internalflags], nodosloaded 0 00001B4D 7403E9F700 jnz .return ; flags return NC, NZ 7602 %else 7603 jmp .return 7604 %endif 7605 %endif 7606 7607 %if _APPLICATION || _DEVICE 7608 .dosnoprocess: 0 00001B52 B448 mov ah, 48h ; get size of largest free block 0 00001B54 BBFFFF mov bx, -1 0 00001B57 CD21 int 21h 0 00001B59 83FB20 cmp bx, 20h ; enough for PSP + 256 Bytes for code/stack ? 0 00001B5C 7303E9EE00 jb .return_no_clr ; no --> 0 00001B61 B448 mov ah, 48h ; allocate it 0 00001B63 CD21 int 21h 0 00001B65 7303E9E500 jc .return_no_clr ; (memory taken between the calls) 7617 0 00001B6A 50 push ax 0 00001B6B E8EB00 call zeroregs 0 00001B6E C606[DD0E]01 mov byte [reg_eip+1], 100h>>8 0 00001B73 58 pop ax 7622 0 00001B74 53 push bx 7624 %if _SYMBOLIC 0 00001B75 53 push bx 7626 %endif 0 00001B76 BF[C40E] mov di, reg_ds ; fill segment registers ds,es,ss,cs 0 00001B79 AB stosw 0 00001B7A AF scasw ; (skip dummy high word) 0 00001B7B AB stosw 0 00001B7C AF scasw 0 00001B7D AB stosw 0 00001B7E AF scasw 0 00001B7F AB stosw 0 00001B80 E8[0000] call adusetup 0 00001B83 8B1E[D00E] mov bx, word [reg_cs] ; bx:dx = where to load program 0 00001B87 8EC3 mov es, bx 0 00001B89 58 pop ax ; get size of memory block 0 00001B8A 89C2 mov dx, ax 0 00001B8C 01DA add dx, bx 0 00001B8E 2689160200 mov word [es:ALASAP], dx 0 00001B93 50 push ax 0 00001B94 3D0010 cmp ax, 1000h 0 00001B97 7602 jbe .below64kib ; if memory left <= 64 KiB 0 00001B99 31C0 xor ax, ax ; ax = 1000h (same thing, after shifting) 7646 .below64kib: 0 00001B9B B104 mov cl, 4 0 00001B9D D3E0 shl ax, cl 0 00001B9F 48 dec ax 0 00001BA0 48 dec ax 0 00001BA1 A3[B40E] mov word [reg_esp], ax 0 00001BA4 97 xchg ax, di ; es:di = child stack pointer 0 00001BA5 31C0 xor ax, ax 0 00001BA7 AB stosw ; push 0 on client's stack 7655 7656 ; Create a PSP 0 00001BA8 B455 mov ah, 55h ; create child PSP 0 00001BAA 8CC2 mov dx, es 0 00001BAC 268B360200 mov si, word [es:ALASAP] 0 00001BB1 F8 clc ; works around OS/2 bug 0 00001BB2 CD21 int 21h 0 00001BB4 2689360200 mov word [es:ALASAP], si 0 00001BB9 E86FEE call setpspdbg ; reset PSP to ours 0 00001BBC E8[0000] call ll_copy_cmdline_and_fcbs 0 00001BBF 58 pop ax 7666 0 00001BC0 1E push ds 0 00001BC1 06 push es 0 00001BC2 1F pop ds 0 00001BC3 3DFF0F cmp ax, 0FFFh 0 00001BC6 7603 jbe @F 0 00001BC8 B8FF0F mov ax, 0FFFh ; 0FFFh for large blocks 7673 @@: 0 00001BCB 83E810 sub ax, 10h ; cannot underflow because block is >= 110h Bytes 7675 ; at most 0FEFh 0 00001BCE BB0C00 mov bx, 0Ch 0 00001BD1 29C3 sub bx, ax ; 000Ch - 00FEFh = 0F01Dh 0 00001BD3 B104 mov cl, 4 0 00001BD5 D3E0 shl ax, cl ; 0FEF0h 7680 ; call far 0F01Dh:0FEF0h = 1000C0h 7681 ; This is either the same as 0C0h if A20 masked, or in the HMA. 0 00001BD7 C60605009A mov byte [CPMCALL], 09Ah; call far imm:imm opcode 0 00001BDC A30600 mov word [CPMCALL + 1], ax 0 00001BDF 891E0800 mov word [CPMCALL + 3], bx ; adjusted CALL 5 dispatcher 7685 0 00001BE3 BA8000 mov dx, 80h 0 00001BE6 B41A mov ah, 1Ah ; set DTA to default DTA 0 00001BE8 CD21 int 21h 0 00001BEA 1F pop ds 7690 7691 ; Finish up. Set termination address. 0 00001BEB B82225 mov ax, 2522h ; set interrupt vector 22h 0 00001BEE BA[0000] mov dx, int22 0 00001BF1 CD21 int 21h 0 00001BF3 2689160A00 mov word [es:TPIV], dx 0 00001BF8 268C1E0C00 mov word [es:TPIV+2], ds 7697 0 00001BFD 26C6060001C3 mov byte [es:100h], 0C3h ; place opcode for retn at cs:ip 7699 7700 %if _SYMBOLIC 0 00001C03 5B pop bx ; size of memory block 7702 %endif 0 00001C04 8C06[960C] mov word [pspdbe], es 0 00001C08 8CC0 mov ax, es 0 00001C0A 48 dec ax 0 00001C0B 8EC0 mov es, ax 0 00001C0D 40 inc ax 0 00001C0E 26C70608004445 mov word [es:8+0], "DE" 0 00001C15 26C7060A004255 mov word [es:8+2], "BU" 0 00001C1C 26C7060C004747 mov word [es:8+4], "GG" 0 00001C23 26C7060E004545 mov word [es:8+6], "EE" ; set MCB name 0 00001C2A 26A30100 mov word [es:1], ax ; set MCB owner 7713 7714 %if _SYMBOLIC 0 00001C2E 800E[E301]08 setopt [internalflags2], dif2_createdprocess 0 00001C33 A3[DE0B] mov word [created_psp], ax 0 00001C36 891E[E00B] mov word [created_size], bx 7718 %endif 7719 0 00001C3A 8B36[D00E] mov si, word [reg_cs] 0 00001C3E 8B3E[DC0E] mov di, word [reg_eip] ; ? is this ever used ? 7722 0 00001C42 8026[DE01]7F clropt [internalflags], attachedterm 0 00001C47 38C0 cmp al, al ; flags return ZR, NC 7725 %endif 7726 7727 .return: 7728 @@: 0 00001C49 16 push ss 0 00001C4A 07 pop es 7731 0 00001C4B 5A pop dx 0 00001C4C 5B pop bx 0 00001C4D 58 pop ax 0 00001C4E C3 retn 7736 7737 .return_no_clr: 0 00001C4F BA[0000] mov dx, msg.ensure_no_memory 0 00001C52 E8[0000] call putsz 0 00001C55 85D2 test dx, dx ; flags return NZ, NC 0 00001C57 EBF0 jmp .return 7742 %endif 7743 7744 7745 zeroregs: 7746 ; call set_efl_to_fl ; initialise EFL, and ax = 0 7747 ; set_efl_to_fl: 0 00001C59 31C0 xor ax, ax ; initialise ax = 0 and FL = ZR NC etc 0 00001C5B 50 _no386 push ax ; dummy high word 0 00001C5C 66 _386_o32 ; pushfd 0 00001C5D 9C pushf 0 00001C5E 8F06[E00E] pop word [reg_efl] ; set to FL 0 00001C62 8F06[E20E] pop word [reg_efl+2] ; set to high word of EFL, or zero 7754 ; retn 7755 0 00001C66 BF[A40E] mov di, regs 0 00001C69 B91E00 mov cx, 15 * 2 ; (8 standard + 6 segregs + eip) * 2 0 00001C6C F3AB rep stosw ; initialise all registers 0 00001C6E C3 retn 7760 7761 7762 %if _PM 7763 ; Hook Int2F if a DPMI host is found. However for Win9x and DosEmu 7764 ; Int2F.1687 is not hooked because it doesn't work. Debugging in 7765 ; protected mode may still work, but the initial switch must be 7766 ; single-stepped. 7767 ; 7768 ; CHG: ah, bx, cx, dx, di, es 7769 ; OUT: al = 0FFh if installed 7770 ; al = status value 0F0h..0FEh else 7771 ; STT: V86/RM 7772 ; ds = debugger data segment 7773 ; ! might be called with unknown ss 7774 ; if [internalflags6] & dif6_in_amis_hook2F 7775 hook2F: 0 00001C6F E8B1FC call InDOS 0 00001C72 B0FE mov al, 0FEh 0 00001C74 7403E9D700 jnz .return 7779 %if _APPLICATION || _DEVICE 7780 .not_in_dos: 0 00001C79 B0FD mov al, 0FDh 0 00001C7B F606[DD01]01 testopt [internalflags], hooked2F 0 00001C80 7403E9CB00 jnz .return ; don't hook now --> 0 00001C85 48 dec ax ; 0FCh 7785 %if _DEBUG 0 00001C86 F606[F001]02 testopt [internalflags6], dif6_in_hook2F 0 00001C8B 7403E9C000 jnz .return 7788 %endif 7789 .loop: 7790 %if _GUARD_86M_INT2F 0 00001C90 06 push es 0 00001C91 31C0 xor ax, ax 0 00001C93 8EC0 mov es, ax ; (only used in 86 Mode) 0 00001C95 26A1BC00 mov ax, [es:2Fh * 4] 0 00001C99 83F8FF cmp ax, -1 0 00001C9C 7405 je @F ; --> (ZR) 0 00001C9E 260B06BE00 or ax, [es:2Fh * 4 + 2] 7798 @@: 0 00001CA3 07 pop es 0 00001CA4 B0FB mov al, 0FBh 0 00001CA6 7503E9A500 jz .return 7802 %endif 7803 %if _DEBUG 0 00001CAB F606[F001]04 testopt [internalflags6], dif6_in_amis_hook2F 0 00001CB0 751E jnz @F 0 00001CB2 56 push si 0 00001CB3 E8[0000] call findinstalleddebugger 7808 ; CHG: si, di, es, ax, cx, dx 0 00001CB6 5E pop si 0 00001CB7 7217 jc @F 0 00001CB9 800E[F001]02 setopt [internalflags6], dif6_in_hook2F 7812 ; avoid recursion 0 00001CBE 40 inc ax ; al = 31h 0 00001CBF CD2D int 2Dh ; call out to debugger 0 00001CC1 8026[F001]FD clropt [internalflags6], dif6_in_hook2F 0 00001CC6 3CFF cmp al, 0FFh 0 00001CC8 7506 jne @F 7818 %if _DISPHOOK 0 00001CCA BA[0000] mov dx, dpmihookamis 0 00001CCD E8[0000] call putsz 7821 %endif 7822 @@: 7823 %endif 0 00001CD0 B88716 mov ax, 1687h ; DPMI host installed? 0 00001CD3 CD2F int 2Fh 0 00001CD5 85C0 test ax, ax 0 00001CD7 B0FA mov al, 0FAh 0 00001CD9 7575 jnz .return 0 00001CDB 893E[0000] mov word [dpmientry+0], di ; true host DPMI entry 0 00001CDF 8C06[0200] mov word [dpmientry+2], es 0 00001CE3 893E[0000] mov word [dpmiwatch+0], di 0 00001CE7 8C06[0200] mov word [dpmiwatch+2], es 0 00001CEB 48 dec ax ; 0F9h 7834 ; Previously checked DIF nohook2F here. 0 00001CEC 48 dec ax ; 0F8h 0 00001CED F606[B001]02 testopt [options4], opt4_int_2F_hook 0 00001CF2 745C jz .return ; requested to not hook --> 0 00001CF4 B82F35 mov ax, 352Fh 0 00001CF7 CD21 int 21h 0 00001CF9 891E[0000] mov word [oldi2F+0], bx 0 00001CFD 8C06[0200] mov word [oldi2F+2], es 0 00001D01 BA[0000] mov dx, debug2F ; ds => lDEBUG_DATA_ENTRY 0 00001D04 B82F25 mov ax, 252Fh 0 00001D07 CD21 int 21h 7845 7846 ; Test whether we can hook the DPMI entrypoint call. 0 00001D09 B88716 mov ax, 1687h 0 00001D0C CD2F int 2Fh 0 00001D0E 85C0 test ax, ax 0 00001D10 7541 jnz .nohost 0 00001D12 81FF[0000] cmp di, mydpmientry ; our entrypoint returned ? 0 00001D16 753B jne .nohook 0 00001D18 8CC0 mov ax, es 0 00001D1A 8CDB mov bx, ds ; bx => lDEBUG_DATA_ENTRY 0 00001D1C 39D8 cmp ax, bx 0 00001D1E 7533 jne .nohook ; no --> 7857 0 00001D20 C706[0000][0000] mov word [dpmiwatch+0], mydpmientry 0 00001D26 8C1E[0200] mov word [dpmiwatch+2], ds ; => lDEBUG_DATA_ENTRY 7860 0 00001D2A 800E[DD01]01 setopt [internalflags], hooked2F 0 00001D2F 800E[E801]02 setopt [internalflags4], dif4_int_2F_hooked 0 00001D34 E8[0000] call update_inttab_optional 7864 %if _DISPHOOK 0 00001D37 F606[F001]04 testopt [internalflags6], dif6_in_amis_hook2F 0 00001D3C 7510 jnz @F 0 00001D3E 8CD8 mov ax, ds ; ax => lDEBUG_DATA_ENTRY 0 00001D40 1E push ds 0 00001D41 07 pop es 0 00001D42 BF[0000] mov di, dpmihookcs 0 00001D45 E8[0000] call hexword 0 00001D48 BA[0000] mov dx, dpmihook 0 00001D4B E8[0000] call putsz 7874 @@: 7875 %endif 0 00001D4E B0FF mov al, 0FFh 7877 %endif 7878 .return: 0 00001D50 1E push ds 0 00001D51 07 pop es 0 00001D52 C3 retn 7882 7883 %if _APPLICATION || _DEVICE 7884 .nohost: 7885 .nohook: 0 00001D53 1E push ds 0 00001D54 C516[0000] lds dx, [oldi2F] 0 00001D58 B82F25 mov ax, 252Fh 0 00001D5B CD21 int 21h ; unhook 0 00001D5D 1F pop ds 0 00001D5E 1E push ds 0 00001D5F 07 pop es ; restore segregs 0 00001D60 8026[B001]FD clropt [options4], opt4_int_2F_hook 7894 ; disable hook next 0 00001D65 F606[F001]04 testopt [internalflags6], dif6_in_amis_hook2F 0 00001D6A 7506 jnz @F 0 00001D6C BA[0000] mov dx, msg.dpmi_no_hook 0 00001D6F E8[0000] call putsz ; display message about it 7899 @@: 0 00001D72 E81BFF call .loop 0 00001D75 B0F0 mov al, 0F0h 0 00001D77 C3 retn 7903 %endif 7904 %endif 7905 7906 7907 ; Following bits need to be *before* boot.asm 7908 ; to support the _BOOTLDR_DISCARD option. 7909 ; But boot.asm must be included before init.asm 7910 ; so that init will get the nearcall/dualcall 7911 ; uses in boot.asm in its relocation tables. 7912 ; So all code section contents originally from 7913 ; init.asm is now moved to here. 7914 %if _SYMBOLIC && (_APPLICATION || _DEVICE) 7915 ; Moved this here so the nearcall macro is used 7916 ; before we write the relocate_from_code table. 7917 usesection lDEBUG_CODE 7917 ------------------ note: usesection lDEBUG_CODE 7918 ..@switch_s_cont: 0 00001D78 E8DAEBEB02[0000] nearcall zz_save_strat 0 00001D7F E8D3EBEB02[0000] nearcall zz_switch_s 0 00001D86 4E dec si 0 00001D87 89F2 mov dx, si 0 00001D89 CB retf 7924 7925 ..@switch_s_catch: 0 00001D8A 8B26[8A0C] mov sp, word [throwsp] ; restore stack 7927 ; (needed here if returned to errret) 0 00001D8E BA[0000] mov dx, errcarat 0 00001D91 E8[0000] call putsz 0 00001D94 31D2 xor dx, dx 0 00001D96 CB retf 7932 %endif 7933 7934 7935 usesection lDEBUG_CODE 7935 ------------------ note: usesection lDEBUG_CODE 7936 initcont: 7937 %if _APPLICATION 0 00001D97 CD21 int 21h ; resize to required 7939 ; jc ... ; (expected to work since it had to be larger. also we hooked ints) 7940 %endif 7941 7942 %if _APPLICATION || _DEVICE 7943 .device: 7944 %if _VXCHG 0 00001D99 E8[0000] call vv_set 7946 %endif 7947 0 00001D9C 1E push ds 0 00001D9D 07 pop es 0 00001D9E E878FA call getint2324 ; init run2324 to avoid using or displaying NUL vectors 7951 0 00001DA1 1E push ds 0 00001DA2 07 pop es 0 00001DA3 5E pop si 0 00001DA4 AC lodsb 0 00001DA5 E86FEE call kk ; process the rest of the command line 7957 %endif 7958 7959 .boot_entry: 0 00001DA8 1E push ds 0 00001DA9 07 pop es ; => lDEBUG_DATA_ENTRY 7962 7963 %if _ALTVID 7964 ; mov al, ALTSCREENBITS 0 00001DAA E8[0000] call setscreen 7966 %endif 7967 0 00001DAD BE[0000] mov si, cmd3 7969 %if _BOOTLDR 7970 %if _APPLICATION || _DEVICE 0 00001DB0 F606[DD01]40 testopt [internalflags], nodosloaded 0 00001DB5 7402 jz @F 7973 %endif 7974 %if _LOADER 7975 push si 7976 jmp moveloader_hook_ints 7977 %else 0 00001DB7 FFE6 jmp si ; directly jump to cmd3 of the installed image 7979 %endif 7980 @@: 7981 %endif 7982 %if _APPLICATION || _DEVICE 0 00001DB9 56 push si 0 00001DBA E9[0000] jmp ll3 ; load a program if one has been given at the command line 7985 %endif 7986 7987 7988 %if !_LINK && _LINK_COMPAT 7989 usesection lDEBUG_CODE 7990 %if !_LOADER 7991 %include "aa.asm" 7992 %endif 7993 7994 usesection lDEBUG_CODE 7995 %include "amis.asm" 7996 7997 usesection lDEBUG_CODE 7998 %include "bb.asm" 7999 8000 %if !_LOADER 8001 usesection lDEBUG_CODE 8002 %include "cc.asm" 8003 %endif 8004 8005 usesection lDEBUG_CODE 8006 %include "dd.asm" 8007 8008 usesection lDEBUG_CODE 8009 %include "ee.asm" 8010 8011 usesection lDEBUG_CODE 8012 %include "expr.asm" 8013 8014 usesection lDEBUG_CODE 8015 %include "ff.asm" 8016 8017 %if _RN 8018 %imacro internaldatarelocation 0-*.nolist 8019 %endmacro 8020 usesection lDEBUG_CODE 8021 %include "fptostr.asm" 8022 %unimacro internaldatarelocation 0-*.nolist 8023 %endif 8024 %if _HELP_COMPRESSED 8025 overridedef STANDALONE, 0 8026 usesection lDEBUG_CODE 8027 %include "helpdepk.asm" 8028 resetdef STANDALONE 8029 %endif 8030 8031 usesection lDEBUG_CODE 8032 %include "hh.asm" 8033 8034 usesection lDEBUG_CODE 8035 %include "iioo.asm" 8036 8037 %if _IMMASM 8038 usesection lDEBUG_CODE 8039 %include "immasm.asm" 8040 %else 8041 usesection lDEBUG_CODE 8042 immasm: 8043 lodsb 8044 call chkeol 8045 jmp cmd3 8046 %endif 8047 8048 usesection lDEBUG_CODE 8049 %include "install.asm" 8050 8051 usesection lDEBUG_CODE 8052 %include "ints.asm" 8053 8054 usesection lDEBUG_CODE 8055 %include "lineio.asm" 8056 8057 %if !_LOADER 8058 usesection lDEBUG_CODE 8059 %include "ll.asm" 8060 %endif 8061 8062 usesection lDEBUG_CODE 8063 %include "mm.asm" 8064 8065 usesection lDEBUG_DATA_ENTRY 8066 msg_start: 8067 %include "msg.asm" 8068 msg_end: 8069 8070 numdef SHOWMSGSIZE, _DEFAULTSHOWSIZE 8071 %if _SHOWMSGSIZE 8072 %assign MSGSIZE msg_end - msg_start 8073 %warning msg holds MSGSIZE bytes 8074 %endif 8075 8076 %if _PM 8077 usesection lDEBUG_CODE 8078 %include "pmdata.asm" 8079 8080 usesection lDEBUG_CODE 8081 %include "pmentry.asm" 8082 8083 usesection lDEBUG_CODE 8084 %include "pminit.asm" 8085 %endif 8086 8087 usesection lDEBUG_CODE 8088 %include "rr.asm" 8089 8090 usesection lDEBUG_CODE 8091 %include "run.asm" 8092 8093 usesection lDEBUG_CODE 8094 %include "serialp.asm" 8095 8096 usesection lDEBUG_CODE 8097 %include "ss.asm" 8098 8099 %if _SYMBOLIC 8100 usesection lDEBUG_CODE 8101 %include "symbols.asm" 8102 %endif 8103 8104 usesection lDEBUG_CODE 8105 %include "uu.asm" 8106 8107 usesection lDEBUG_CODE 8108 %include "vv.asm" 8109 8110 %if !_LOADER 8111 usesection lDEBUG_CODE 8112 %include "ww.asm" 8113 %endif 8114 8115 %endif 8116 8117 %ifn _LINK 8118 %if _BOOTLDR_DISCARD 8119 usesection lDEBUG_CODE 8120 ldebug_code_bootldr_truncated_size: equ fromparas(paras($ - code_start)) 8121 %else 8122 ldebug_code_bootldr_truncated_size: equ ldebug_code_size 8123 %endif 8124 endarea ldebug_code_bootldr_truncated, 1 8125 8126 %if _BOOTLDR 8127 %include "boot.asm" 8128 %endif 8129 %endif 8130 8131 8132 %if _LINK 8133 [list -] 8206 usesection DATASTACKBASE === Switch to base=000000h -> "DATASTACKBASE" 8206 ------------------ note: usesection DATASTACKBASE 8207 absolute $ 8208 %endif 8209 8210 %if !_LOADER 8211 alignb 4 0 00009D80 ???? bp_offset: resw 1 8213 %if _PM 0 00009D82 ???? resw 1 8215 %endif 8216 %endif 8217 8218 %if _BREAKPOINTS 8219 alignb 4 0 00009D84 ???????? ..@bb_saved_linear: resd 1 8221 8222 alignb 4 0 00009D88 ???? ..@bb_id_start: resw 1 0 00009D8A ???? ..@bb_id_length: resw 1 0 00009D8C ???? ..@bb_when_start: resw 1 0 00009D8E ???? ..@bb_when_length: resw 1 8227 %endif 8228 8229 ; I/O buffers 8230 alignb 2 0 00009D90 ?? line_in: resb 1 ; maximal length of input line 0 00009D91 ?? resb 1 ; actual length (must be one less than previous byte) 8233 00000012 resb 255 ; buffer for 13-terminated input line 8234 .end: 8235 8236 %if _CONFIG 0 00009E91 ?? alignb 2 8238 00000112 configpath: resb 128 + 256 0 0000A012 ???? .dir_end: resw 1 8240 8241 alignb 2 8242 00000294 scriptspath: resb 128 + 256 0 0000A194 ???? .dir_end: resw 1 8244 8245 yy_try_scriptspath: 0 0000A196 ?? .nokeywordused: resb 1 0 0000A197 ?? .didnotyettry: resb 1 8248 %endif 8249 %if _EXTENSIONS 8250 alignb 2 0 0000A198 ???? ext_cmdline: resw 1 8252 %if _ELDTRAILER 0 0000A19A ???????? eldheader: resd 1 8254 %endif 8255 %endif 8256 %if _EXTENSIONS || _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 0000A19E ?? yy_is_script: resb 1 ; else extension 8258 %endif 8259 8260 ; zero-initialisation starts here 8261 ..@init_first: 0 0000A19F ?? resb 1 ; line_in overflow stop 8263 ; This byte is zero-initialised. When line_in 8264 ; is scanned using skipcomma (in bb.asm) but 8265 ; al already had the CR, then the scan may 8266 ; overflow line_in. Including this byte here 8267 ; (_after_ line_in) insures that the scan will 8268 ; stop while still reading within the section. 8269 ; b_bplist and g_bplist are expected in that order by initcont 8270 %if _BREAKPOINTS 8271 alignb 2 8272 b_bplist: 0 0000A1A0 ???????? .used_mask: resb (_NUM_B_BP + _NUM_SYM_BP + 7) >> 3 8274 ; bitmask of used points 0 0000A1A4 ???????? .disabled_mask: resb (_NUM_B_BP + _NUM_SYM_BP + 7) >> 3 8276 ; bitmask of disabled points 8277 %if _BREAKPOINTS_STICKY 8278 .sticky_mask: resb (_NUM_B_BP + _NUM_SYM_BP + 7) >> 3 8279 ; bitmask of sticky points 8280 ; desc: stay around during DEBUG's operation unless 8281 ; explicitly removed/un-stickified. This allows 8282 ; to keep breakpoints around while changing from PM. 8283 ; Hits while in DEBUG are ignored though, use DDEBUG. 8284 ; Disabling won't remove them, just ignores hits. 8285 %endif 8286 alignb 2 8287 00000428 .bp: resb (_NUM_B_BP + _NUM_SYM_BP) * BPSIZE 8288 alignb 2 8289 00000548 .counter: resw _NUM_B_BP 8290 alignb 2 8291 00000568 .id: resw _NUM_B_BP ; array of lengths/offsets, 0 = unused 8292 ; low 10 bits = offset into .idbuffer (0..1023) 8293 ; high 6 bits = length (0..63, 0 if unused) 8294 alignb 2 8295 00000588 .when: resw _NUM_B_BP ; array of pointers, 0 = unused 8296 .idbuffer.free: 0 0000A328 ???? resw 1 ; offset into .idbuffer of free space 8298 ; (0..1024) 8299 .whenbuffer.free: 0 0000A32A ???? resw 1 ; *offset* into .whenbuffer 8301 ; (not a pointer) 8302 .idbuffer: 8303 000005AC resb _NUM_B_ID_BYTES ; buffer holding ID strings 8304 .whenbuffer: 8305 0000072C resb _NUM_B_WHEN_BYTES ; buffer holding condition strings 8306 %endif 8307 %if _NUM_G_BP 0 0000A8AC ?? resb 1 - (($-$$) % 2) ; make g_bplist.bp aligned 8309 g_bplist: 0 0000A8AD ?? .used_count: resb 1 ; for the byte counter of saved breakpoints 8311 00000B2E .bp: resb _NUM_G_BP*BPSIZE 8312 .end: 8313 %endif 8314 %if !_LOADER 0 0000A93E ?? sss_silent_count_used: resb 1 0 0000A93F ?? drivenumber: resb 1 8317 %if _MCBPOSITION 8318 mcbposition: resb 1 8319 %endif 8320 %if _SDSUB 8321 skipsd: resb 1 8322 %endif 8323 %if _MCBLIMIT 8324 alignb 2 8325 mcblimit: resw 1 8326 %endif 8327 %endif 8328 %if _HISTORY && ! _HISTORY_SEPARATE_FIXED 8329 alignb 2 8330 historybuffer: resb _HISTORY_SIZE 8331 .end: 8332 %endif 8333 8334 ; $ - $$ = offset into section 8335 ; % 2 = 1 if odd offset, 0 if even 8336 ; 2 - = 1 if odd, 2 if even 8337 ; % 2 = 1 if odd, 0 if even 8338 ; resb (2 - (($-$$) % 2)) % 2 8339 ; $ - $$ = offset into section 8340 ; % 2 = 1 if odd offset, 0 if even 8341 ; 1 - = 0 if odd, 1 if even 0 0000A940 ?? resb 1 - (($-$$) % 2) ; make line_out aligned 0 0000A941 ?? trim_overflow: resb 1 ; actually part of line_out to avoid overflow of trimputs loop 8344 00000BC2 line_out: resb 263 0 0000AA49 ?? resb 1 ; reserved for terminating zero 8346 line_out_end: 8347 alignb 2 0 0000AA4A ???? line_out_overflow: resw 1 ; 2642h if line_out didn't overflow 8349 8350 %if !_LOADER 8351 alignb 4 0 0000AA4C ???????? sss_silent_count: resd 1 8353 %endif 8354 alignb 2 0 0000AA50 ???? getrange_lines: resw 1 8356 0 0000AA52 ???? serial_save_irq_mask: resw 1 0 0000AA54 ???? serial_save_irq_off: resw 1 0 0000AA56 ???? serial_save_dl: resw 1 0 0000AA58 ?? serial_save_ier: resb 1 0 0000AA59 ?? serial_save_lcr: resb 1 0 0000AA5A ?? serial_save_mcr: resb 1 8363 %if _USE_TX_FIFO 0 0000AA5B ?? serial_fcr_setting: resb 1 8365 %endif 0 0000AA5C ?? serial_use_intnum: resb 1 0 0000AA5D ?? serial_use_params: resb 1 0 0000AA5E ?? serial_use_fifo: resb 1 8369 %if _RH 0 0000AA5F ?? rh_display_with_count: resb 1 8371 alignb 2 0 0000AA60 ???? rh_count_number: resw 1 8373 %endif 8374 alignb 2 8375 baseport: 0 0000AA62 ???? serial_use_baseport: resw 1 0 0000AA64 ???? serial_use_dl: resw 1 0 0000AA66 ???? serial_use_irqmask: resw 1 8379 8380 alignb 2 0 0000AA68 ???? rxhead: resw 1 0 0000AA6A ???? rxtail: resw 1 0 0000AA6C ???? txhead: resw 1 0 0000AA6E ???? txtail: resw 1 8385 alignb 16 8386 00000CF0 rxfifo: resb _RXFIFOSIZE 8387 alignb 16 8388 00000D70 txfifo: resb _TXFIFOSIZE 8389 8390 %if _SYMBOLIC 8391 %if _BUFFER_86MM_SLICE || _XMS_SYMBOL_TABLE 8392 alignb 16 8393 access_slice_buffer: 8394 .: 8395 00000DF0 resb ssString + 255 0 0000AC73 ?? alignb 2 8397 .size: equ $ - . 8398 %if _SECOND_SLICE 8399 alignb 16 8400 second_access_slice_buffer: 8401 .: 8402 resb ssString + 255 8403 alignb 2 8404 .size: equ $ - . 8405 %endif 8406 %endif 8407 %endif 8408 8409 alignb 2 8410 while_buffer: 8411 .length equ _WHILEBUFFSIZE 8412 00000EF4 resb .length 8413 .end: 8414 8415 %if (_MMXSUPP && _RM && ! _RM_AUX) || (_RN && ! _RN_AUX) 8416 alignb 4 8417 rn_rm_buffer: 8418 %if (_RN && ! _RN_AUX) 8419 resb 128 8420 %else 8421 resb 108 8422 %endif 8423 %endif 8424 8425 %if _SYMBOLIC 0 0000AD7C ???????? alignb 16 8427 00001000 str_buffer: resb 512 ; long enough for smName1 + smName2 content 8428 ; by placing this buffer below the stack, a stack overflow 8429 ; might be less harmful if the str_buffer isn't in use. 8430 %endif 8431 8432 ; zero-initialisation ends here 8433 ..@init_behind: 8434 8435 alignb 16 ; stack might be re-used as GDT, so align it on a paragraph 8436 00001200 stack: resb _STACKSIZE 8437 alignb 2 ; ensure stack aligned 8438 stack_end: 8439 8440 %if _EXTENSIONS 8441 alignb 16 8442 ext_data_area: 8443 00001400 .: resb _EXT_DATA_BOOT_SIZE 8444 alignb 16 8445 .size equ $ - . 8446 8447 %ifn _LINK 8448 ext_data_max_size_equate equ 0FFF0h - (ext_data_area + SECTIONFIXUP) 8449 %if ((_EXT_DATA_BOOT_SIZE + 15) & ~15) <= ((_EXT_DATA_INIT_SIZE + 15) & ~15) 8450 ext_data_nonboot_add_size equ ((_EXT_DATA_INIT_SIZE + 15) & ~15) - ((_EXT_DATA_BOOT_SIZE + 15) & ~15) 8451 %else 8452 ext_data_nonboot_add_size equ 0 8453 %endif 8454 %endif 8455 %else 8456 %ifn _LINK 8457 ext_data_max_size_equate equ 0 8458 ext_data_nonboot_add_size equ 0 8459 %endif 8460 %endif 8461 8462 %if _LINK 8463 global end_of_datastack 8464 %endif 8465 alignb 16 8466 end_of_datastack: 8467 8468 %ifn _LINK 8469 datastack_size equ $-section.DATASTACK.vstart 8470 endarea datastack, 1 8471 8472 8473 auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 8474 endarea auxbuff, 1 8475 8476 auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 8477 endarea auxbuff_max, 1 8478 8479 %if _INIT_MAX 8480 auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 8481 %else 8482 auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 8483 %endif 8484 endarea auxbuff_init, 1 8485 8486 8487 pspsegment_size: equ 100h + DATAENTRYTABLESIZE + datastack_size 8488 endarea pspsegment, 1 ; size of PSP and image when installed 8489 8490 8491 numdef SHOWASMTABLESIZE, _DEFAULTSHOWSIZE 8492 %if _SHOWASMTABLESIZE 8493 %assign ASMTABLESIZE asmtable1_size + asmtable2_size 8494 %warning asmtables hold ASMTABLESIZE bytes 8495 %endif 8496 8497 8498 %assign __INITSIZE init_size 8499 %if __INITSIZE > (64 * 1024) 8500 %error init segment too large (%[__INITSIZE]) 8501 %endif 8502 8503 numdef SHOWINITSIZE, _DEFAULTSHOWSIZE 8504 %if _SHOWINITSIZE 8505 %warning init segment holds __INITSIZE bytes 8506 %endif 8507 8508 8509 %assign __CODESIZE ldebug_code_size 8510 %if __CODESIZE > (64 * 1024) 8511 %error code segment too large (%[__CODESIZE]) 8512 %endif 8513 8514 numdef SHOWCODESIZE, _DEFAULTSHOWSIZE 8515 %if _SHOWCODESIZE 8516 %warning code segment holds __CODESIZE bytes 8517 %endif 8518 8519 8520 %assign __CODETRUNCATEDSIZE ldebug_code_bootldr_truncated_size 8521 %assign __CODEDISCARDSIZE ldebug_code_size - ldebug_code_bootldr_truncated_size 8522 8523 %if _BOOTLDR_DISCARD 8524 numdef SHOWCODETRUNCATEDSIZE, _DEFAULTSHOWSIZE 8525 %else 8526 numdef SHOWCODETRUNCATEDSIZE, 0 8527 %endif 8528 %if _SHOWCODETRUNCATEDSIZE 8529 %warning code segment truncated holds __CODETRUNCATEDSIZE bytes (__CODEDISCARDSIZE bytes discarded) 8530 %endif 8531 8532 8533 %assign __CODE2SIZE ldebug_code2_size 8534 %if __CODE2SIZE > (64 * 1024) 8535 %error code segment 2 too large (%[__CODE2SIZE]) 8536 %endif 8537 8538 %if _DUALCODE 8539 numdef SHOWCODE2SIZE, _DEFAULTSHOWSIZE 8540 %else 8541 numdef SHOWCODE2SIZE, 0 8542 %endif 8543 %if _SHOWCODE2SIZE 8544 %warning code segment 2 holds __CODE2SIZE bytes 8545 %endif 8546 8547 8548 %assign __MESSAGESEGMENTSIZE messagesegment_nobits_size 8549 %if __MESSAGESEGMENTSIZE > (64 * 1024) 8550 %error message segment too large (%[__MESSAGESEGMENTSIZE]) 8551 %endif 8552 8553 %if _MESSAGESEGMENT 8554 numdef SHOWMESSAGESEGMENTSIZE, _DEFAULTSHOWSIZE 8555 %else 8556 numdef SHOWMESSAGESEGMENTSIZE, 0 8557 %endif 8558 %if _SHOWMESSAGESEGMENTSIZE 8559 %warning message segment holds __MESSAGESEGMENTSIZE bytes 8560 %endif 8561 8562 8563 %assign __MESSAGESEGMENTTRUNCATEDSIZE messagesegment_nobits_truncated_size 8564 %assign __MESSAGESEGMENTDISCARDSIZE messagesegment_nobits_size - messagesegment_nobits_truncated_size 8565 8566 %if _BOOTLDR_DISCARD_HELP 8567 numdef SHOWMESSAGESEGMENTTRUNCATEDSIZE, _DEFAULTSHOWSIZE 8568 %else 8569 numdef SHOWMESSAGESEGMENTTRUNCATEDSIZE, 0 8570 %endif 8571 %if _SHOWMESSAGESEGMENTTRUNCATEDSIZE 8572 %warning message segment truncated holds __MESSAGESEGMENTTRUNCATEDSIZE bytes (__MESSAGESEGMENTDISCARDSIZE bytes discarded) 8573 %endif 8574 8575 8576 %assign __PSPSEGMENTSIZE pspsegment_size 8577 %assign __PSPSEGMENTMAXSIZE pspsegment_size - _EXT_DATA_BOOT_SIZE + ext_data_max_size_equate 8578 %if __PSPSEGMENTSIZE > (64 * 1024) 8579 %error resident size of PSP segment too large (%[__PSPSEGMENTSIZE]) 8580 %elif __PSPSEGMENTMAXSIZE > (64 * 1024 - 16) 8581 %error resident maximum size of PSP segment too large (%[__PSPSEGMENTMAXSIZE]) 8582 %endif 8583 8584 numdef SHOWPSPSIZE, _DEFAULTSHOWSIZE 8585 %if _SHOWPSPSIZE 8586 %warning PSP segment holds __PSPSEGMENTSIZE bytes 8587 %if _EXTENSIONS 8588 %warning Maximum PSP segment holds __PSPSEGMENTMAXSIZE bytes 8589 %endif 8590 %endif 8591 8592 %if CODE_INSURE_COUNT 8593 %warning code_insure_low_byte_not_0CCh needed CODE_INSURE_COUNT times 8594 %endif 8595 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00001584 ???????? eldhSignature: resb 4 ; "ELD1" 0 00001588 ?????? resb 3 ; reserved 0 0000158B ?? resb 1 ; 26 (Ctrl-Z) 0 0000158C ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00001590 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00001592 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00001594 ???????? eldhDataOffset: resd 1 0 00001598 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000159A ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000159C ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000159E ???????? eldhReserved: resb 4 ; reserved 0 000015A2 ???? 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 000015A4 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000015A8 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000015AC ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000015B0 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00001584 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000158C ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00001590 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00001592 ???? 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 00001584 ???? 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 00001586 ???? eldltAmount: resw 1 0 00001588 ???????? 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 00001584 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00001586 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00001588 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000158A ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000158C ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00001594 ???? 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 00001584 ???? eldlSignature: resw 1 ; 0E1D1h 0 00001586 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00001588 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 0000158A ???? eldlUseLinkHash: resw 1 0 0000158C ???? eldlDataAmount: resw 1 0 0000158E ???? eldlDataPrefixes: resw 1 0 00001590 ???? eldlDataEntries: resw 1 0 00001592 ???? eldlDataAddresses: resw 1 0 00001594 ???? eldlCodeAmount: resw 1 0 00001596 ???? eldlCodePrefixes: resw 1 0 00001598 ???? eldlCodeEntries: resw 1 0 0000159A ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 0000159C ???? eldlDualAmount: resw 1 0 0000159E ???? eldlDualPrefixes: resw 1 0 000015A0 ???? eldlDualEntries: resw 1 0 000015A2 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00001584 ???? ifKeyword: resw 1 0 00001586 ???? ifDescription: resw 1 0 00001588 ???? ifOptions: resw 1 0 0000158A ???? ifValue: resw 1 0 0000158C ???? ifTrying: resw 1 0 0000158E ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00001584 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00001588 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 0000158C ???? smName1: resw 1 ; -> first string part 0 0000158E ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00001590 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00001592 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00001594 ???? smBaseNext: resw 1 0 00001596 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00001598 ???? smSpecialNext: resw 1 0 0000159A ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00001584 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00001585 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00001586 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00001584 ???? shHash: resw 1 ; hash value 0 00001586 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00001584 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00001588 ???? xmsmSourceHandle: resw 1 0 0000158A ???????? xmsmSourceAddress: resd 1 0 0000158E ???? xmsmDestHandle: resw 1 0 00001590 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <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 00007DB0 00 opl OP_END ; idx=0, ofs=Ch, used=99 0 00007DB1 484100 opl OP_ALL+OP_AX, OP_ALL+OP_IMM_NOT_EXTEND, OP_END ; idx=1, ofs=Dh, used=18 0 00007DB4 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 00007DBA 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 00007DC0 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 00007DC6 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 00007DCC 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 00007DD2 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 00007DD8 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 00007DDE 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 00007DE6 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 00007DEC 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 00007DF4 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 00007DFD 00 0 00007DFE 23727600 opl OP_M_SRC_DST, OP_16+OP_RM, OP_16+OP_R, OP_END ; idx=13, ofs=5Ah, used=1 0 00007E02 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 00007E07 56215200 opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=15, ofs=63h, used=35 0 00007E0B 8700 opl OP_32+OP_R_ADD, OP_END ; idx=16, ofs=67h, used=8 0 00007E0D 23525600 opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=17, ofs=69h, used=3 0 00007E11 21525600 opl OP_M_SRC, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=18, ofs=6Dh, used=1 0 00007E15 2352 opl OP_M_SRC_DST, OP_1632+OP_RM ; idx=19, ofs=71h, used=3 0 00007E17 1200 opl OP_IMM8, OP_END ; idx=20, ofs=73h, used=0 + 3 0 00007E19 21521200 opl OP_M_SRC, OP_1632+OP_RM, OP_IMM8, OP_END ; idx=21, ofs=75h, used=1 0 00007E1D 24 opl OP_STACK_PUSH ; idx=22, ofs=79h, used=1 0 00007E1E 1C0900 opl OP_NEAR, OP_REL1632, OP_END ; idx=23, ofs=7Ah, used=31 + 1 0 00007E21 26 opl OP_STACK_SPECIAL ; idx=24, ofs=7Dh, used=1 0 00007E22 1D0600 opl OP_FAR, OP_FARIMM, OP_END ; idx=25, ofs=7Eh, used=1 + 1 0 00007E25 26 opl OP_STACK_SPECIAL ; idx=26, ofs=81h, used=1 0 00007E26 1E0700 opl OP_FAR_REQUIRED, OP_FAR_OFFSET, OP_END ; idx=27, ofs=82h, used=1 + 1 0 00007E29 26 opl OP_STACK_SPECIAL ; idx=28, ofs=85h, used=1 0 00007E2A 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 00007E2F 230100 opl OP_M_SRC_DST, OP_M64, OP_END ; idx=30, ofs=8Bh, used=1 0 00007E32 210100 opl OP_M_SRC, OP_M64, OP_END ; idx=31, ofs=8Eh, used=1 0 00007E35 220100 opl OP_M_DST, OP_M64, OP_END ; idx=32, ofs=91h, used=1 0 00007E38 1804 opl OP_X, OPX_MOD_IF_REG_1632 ; idx=33, ofs=94h, used=4 0 00007E3A 234200 opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_END ; idx=34, ofs=96h, used=2 + 4 0 00007E3D 214200 opl OP_M_SRC, OP_ALL+OP_RM, OP_END ; idx=35, ofs=99h, used=4 0 00007E40 24 opl OP_STACK_PUSH ; idx=36, ofs=9Ch, used=8 0 00007E41 5700 opl OP_1632+OP_R_ADD, OP_END ; idx=37, ofs=9Dh, used=16 + 8 0 00007E43 255700 opl OP_STACK_POP, OP_1632+OP_R_ADD, OP_END ; idx=38, ofs=9Fh, used=8 0 00007E46 24701200 opl OP_STACK_PUSH, OP_16+OP_IMM, OP_IMM8, OP_END ; idx=39, ofs=A2h, used=1 0 00007E4A 210200 opl OP_M_SRC, OP_MFLOAT, OP_END ; idx=40, ofs=A6h, used=9 0 00007E4D 220200 opl OP_M_DST, OP_MFLOAT, OP_END ; idx=41, ofs=A9h, used=2 0 00007E50 210300 opl OP_M_SRC, OP_MDOUBLE, OP_END ; idx=42, ofs=ACh, used=9 0 00007E53 220300 opl OP_M_DST, OP_MDOUBLE, OP_END ; idx=43, ofs=AFh, used=2 0 00007E56 2D opl OP_ST ; idx=44, ofs=B2h, used=20 0 00007E57 0B00 opl OP_STI, OP_END ; idx=45, ofs=B3h, used=4 + 20 0 00007E59 0A opl OP_1CHK ; idx=46, ofs=B5h, used=6 0 00007E5A 0B2D00 opl OP_STI, OP_ST, OP_END ; idx=47, ofs=B6h, used=6 + 6 0 00007E5D 218300 opl OP_M_SRC, OP_32+OP_M, OP_END ; idx=48, ofs=B9h, used=9 0 00007E60 228300 opl OP_M_DST, OP_32+OP_M, OP_END ; idx=49, ofs=BCh, used=2 0 00007E63 217300 opl OP_M_SRC, OP_16+OP_M, OP_END ; idx=50, ofs=BFh, used=10 0 00007E66 227300 opl OP_M_DST, OP_16+OP_M, OP_END ; idx=51, ofs=C2h, used=4 0 00007E69 210400 opl OP_M_SRC, OP_M80, OP_END ; idx=52, ofs=C5h, used=2 0 00007E6C 220400 opl OP_M_DST, OP_M80, OP_END ; idx=53, ofs=C8h, used=2 0 00007E6F 0A0B00 opl OP_1CHK, OP_STI, OP_END ; idx=54, ofs=CBh, used=9 0 00007E72 21 opl OP_M_SRC ; idx=55, ofs=CEh, used=4 0 00007E73 0500 opl OP_MXX, OP_END ; idx=56, ofs=CFh, used=1 + 4 0 00007E75 220500 opl OP_M_DST, OP_MXX, OP_END ; idx=57, ofs=D1h, used=4 0 00007E78 7800 opl OP_16+OP_AX, OP_END ; idx=58, ofs=D4h, used=1 0 00007E7A 5621521000 opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_IMMS8, OP_END ; idx=59, ofs=D6h, used=1 0 00007E7F 54561000 opl OP_1632+OP_R_MOD, OP_1632+OP_R, OP_IMMS8, OP_END ; idx=60, ofs=DBh, used=1 0 00007E83 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 00007E88 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 00007E8C 481200 opl OP_ALL+OP_AX, OP_IMM8, OP_END ; idx=63, ofs=E8h, used=2 0 00007E8F 482B00 opl OP_ALL+OP_AX, OP_DX, OP_END ; idx=64, ofs=EBh, used=2 0 00007E92 262A00 opl OP_STACK_SPECIAL, OP_3, OP_END ; idx=65, ofs=EEh, used=1 0 00007E95 1300 opl OP_IMM8_OPTIONAL, OP_END ; idx=66, ofs=F1h, used=2 0 00007E97 1808 opl OP_X, OPX_LOOP_OPTION ; idx=67, ofs=F3h, used=3 0 00007E99 1B0800 opl OP_SHORT, OP_REL8, OP_END ; idx=68, ofs=F5h, used=42 + 3 0 00007E9C 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 00007EA2 225200 opl OP_M_DST, OP_1632+OP_RM, OP_END ; idx=70, ofs=FEh, used=2 0 00007EA5 217200 opl OP_M_SRC, OP_16+OP_RM, OP_END ; idx=71, ofs=101h, used=5 0 00007EA8 227200 opl OP_M_DST, OP_16+OP_RM, OP_END ; idx=72, ofs=104h, used=1 0 00007EAB 2722520F00 opl OP_M_ALWAYS_16, OP_M_DST, OP_1632+OP_RM, OP_SEGREG, OP_END ; idx=73, ofs=107h, used=1 0 00007EB0 270F215200 opl OP_M_ALWAYS_16, OP_SEGREG, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=74, ofs=10Ch, used=1 0 00007EB5 48214500 opl OP_ALL+OP_AX, OP_M_SRC, OP_ALL+OP_MOFFS, OP_END ; idx=75, ofs=111h, used=2 0 00007EB9 22454800 opl OP_M_DST, OP_ALL+OP_MOFFS, OP_ALL+OP_AX, OP_END ; idx=76, ofs=115h, used=2 0 00007EBD 676000 opl OP_8+OP_R_ADD, OP_8+OP_IMM, OP_END ; idx=77, ofs=119h, used=8 0 00007EC0 575000 opl OP_1632+OP_R_ADD, OP_1632+OP_IMM, OP_END ; idx=78, ofs=11Ch, used=8 0 00007EC3 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 00007EC9 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 00007ECF 124800 opl OP_IMM8, OP_ALL+OP_AX, OP_END ; idx=81, ofs=12Bh, used=2 0 00007ED2 2B4800 opl OP_DX, OP_ALL+OP_AX, OP_END ; idx=82, ofs=12Eh, used=2 0 00007ED5 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 00007EDB 2419A100 opl OP_STACK_PUSH, OP_SHOSIZ, OP_1632_DEFAULT+OP_IMM_NOT_EXTEND, OP_END ; idx=84, ofs=137h, used=2 0 00007EDF 24191000 opl OP_STACK_PUSH, OP_SHOSIZ, OP_IMMS8, OP_END ; idx=85, ofs=13Bh, used=2 0 00007EE3 23422900 opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_1, OP_END ; idx=86, ofs=13Fh, used=9 0 00007EE7 23422C00 opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_CL, OP_END ; idx=87, ofs=143h, used=9 0 00007EEB 23421500 opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_IMM8_SHIFTROT, OP_END ; idx=88, ofs=147h, used=9 0 00007EEF 25 opl OP_STACK_POP ; idx=89, ofs=14Bh, used=2 0 00007EF0 7000 opl OP_16+OP_IMM, OP_END ; idx=90, ofs=14Ch, used=1 + 2 0 00007EF2 267000 opl OP_STACK_SPECIAL, OP_16+OP_IMM, OP_END ; idx=91, ofs=14Eh, used=1 0 00007EF5 226200 opl OP_M_DST, OP_8+OP_RM, OP_END ; idx=92, ofs=151h, used=30 0 00007EF8 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 00007EFD 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 00007F02 585700 opl OP_1632+OP_AX, OP_1632+OP_R_ADD, OP_END ; idx=95, ofs=15Eh, used=7 0 00007F05 575800 opl OP_1632+OP_R_ADD, OP_1632+OP_AX, OP_END ; idx=96, ofs=161h, used=1 0 00007F08 24 opl OP_STACK_PUSH ; idx=97, ofs=164h, used=1 0 00007F09 3000 opl OP_ES, OP_END ; idx=98, ofs=165h, used=1 + 1 0 00007F0B 24 opl OP_STACK_PUSH ; idx=99, ofs=167h, used=1 0 00007F0C 2E00 opl OP_CS, OP_END ; idx=100, ofs=168h, used=1 + 1 0 00007F0E 24 opl OP_STACK_PUSH ; idx=101, ofs=16Ah, used=1 0 00007F0F 3300 opl OP_SS, OP_END ; idx=102, ofs=16Bh, used=1 + 1 0 00007F11 24 opl OP_STACK_PUSH ; idx=103, ofs=16Dh, used=1 0 00007F12 2F00 opl OP_DS, OP_END ; idx=104, ofs=16Eh, used=1 + 1 0 00007F14 24 opl OP_STACK_PUSH ; idx=105, ofs=170h, used=1 0 00007F15 3100 opl OP_FS, OP_END ; idx=106, ofs=171h, used=1 + 1 0 00007F17 24 opl OP_STACK_PUSH ; idx=107, ofs=173h, used=1 0 00007F18 3200 opl OP_GS, OP_END ; idx=108, ofs=174h, used=1 + 1 0 00007F1A 253000 opl OP_STACK_POP, OP_ES, OP_END ; idx=109, ofs=176h, used=1 0 00007F1D 253300 opl OP_STACK_POP, OP_SS, OP_END ; idx=110, ofs=179h, used=1 0 00007F20 252F00 opl OP_STACK_POP, OP_DS, OP_END ; idx=111, ofs=17Ch, used=1 0 00007F23 253100 opl OP_STACK_POP, OP_FS, OP_END ; idx=112, ofs=17Fh, used=1 0 00007F26 253200 opl OP_STACK_POP, OP_GS, OP_END ; idx=113, ofs=182h, used=1 0 00007F29 1809840C00 opl OP_X, OPX_MOD_FORCE_3, OP_32+OP_R_MOD, OP_CR, OP_END ; idx=114, ofs=185h, used=1 0 00007F2E 18090C8400 opl OP_X, OPX_MOD_FORCE_3, OP_CR, OP_32+OP_R_MOD, OP_END ; idx=115, ofs=18Ah, used=1 0 00007F33 1809840D00 opl OP_X, OPX_MOD_FORCE_3, OP_32+OP_R_MOD, OP_DR, OP_END ; idx=116, ofs=18Fh, used=1 0 00007F38 18090D8400 opl OP_X, OPX_MOD_FORCE_3, OP_DR, OP_32+OP_R_MOD, OP_END ; idx=117, ofs=194h, used=1 0 00007F3D 1809840E00 opl OP_X, OPX_MOD_FORCE_3, OP_32+OP_R_MOD, OP_TR, OP_END ; idx=118, ofs=199h, used=1 0 00007F42 18090E8400 opl OP_X, OPX_MOD_FORCE_3, OP_TR, OP_32+OP_R_MOD, OP_END ; idx=119, ofs=19Eh, used=1 0 00007F47 16218200 opl OP_MMX, OP_M_SRC, OP_32+OP_RM, OP_END ; idx=120, ofs=1A3h, used=1 0 00007F4B 22821600 opl OP_M_DST, OP_32+OP_RM, OP_MMX, OP_END ; idx=121, ofs=1A7h, used=1 0 00007F4F 16219200 opl OP_MMX, OP_M_SRC, OP_64+OP_RM, OP_END ; idx=122, ofs=1ABh, used=45 0 00007F53 22921600 opl OP_M_DST, OP_64+OP_RM, OP_MMX, OP_END ; idx=123, ofs=1AFh, used=1 0 00007F57 171200 opl OP_MMX_MOD, OP_IMM8, OP_END ; idx=124, ofs=1B3h, used=8 0 00007F5A 560500 opl OP_1632+OP_R, OP_MXX, OP_END ; idx=125, ofs=1B6h, used=1 0 00007F5D 24 opl OP_STACK_PUSH ; idx=126, ofs=1B9h, used=1 0 00007F5E 1C21A200 opl OP_NEAR, OP_M_SRC, OP_1632_DEFAULT+OP_RM, OP_END ; idx=127, ofs=1BAh, used=1 + 1 0 00007F62 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 00007F67 261400 opl OP_STACK_SPECIAL, OP_IMM8_INT, OP_END ; idx=129, ofs=1C3h, used=1 0 00007F6A 1B082800 opl OP_SHORT, OP_REL8, OP_E_CX, OP_END ; idx=130, ofs=1C6h, used=5 0 00007F6E 2500 opl OP_STACK_POP, OP_END ; idx=131, ofs=1CAh, used=3 0 00007F70 2400 opl OP_STACK_PUSH, OP_END ; idx=132, ofs=1CCh, used=1 0 00007F72 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 00007F74 FE00 dw 0FEh ; 0 0 00007F76 8300 dw 083h ; 1 0 00007F78 8000 dw 080h ; 2 0 00007F7A BA01 dw 1BAh ; 3 0 00007F7C FF00 dw 0FFh ; 4 0 00007F7E C701 dw 1C7h ; 5 0 00007F80 F600 dw 0F6h ; 6 0 00007F82 0101 dw 101h ; 7 0 00007F84 0001 dw 100h ; 8 0 00007F86 C600 dw 0C6h ; 9 0 00007F88 7101 dw 171h ; 10 0 00007F8A 7201 dw 172h ; 11 0 00007F8C 7301 dw 173h ; 12 0 00007F8E 8F00 dw 08Fh ; 13 0 00007F90 D000 dw 0D0h ; 14 0 00007F92 D200 dw 0D2h ; 15 0 00007F94 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000094D0 FF db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F96 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 00007F98 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000094D1 FF db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007F9B 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 00007F9D 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000094D2 FF db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FA0 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 00007FA2 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000094D3 FF db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FA5 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 00007FA7 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FAA 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 00007FAC 424F584342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DB4 F43D84 variant AGRP(0,7), 90 === Switch to base=000000h -> "ASMTABLE2" 186 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 186 ------------------ <2> note: usesection ASMTABLE1 0 00007DB7 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 187 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 187 ------------------ <2> note: usesection ASMTABLE1 188 <2> mne AAA ; ofs=Ch 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FB1 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 00007FB3 414141 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DB8 1CCA variant 037h, 0 === Switch to base=000000h -> "ASMTABLE2" 189 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 189 ------------------ <2> note: usesection ASMTABLE1 0 00007DBA FF endvariant === Switch to base=000000h -> "ASMTABLE2" 190 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 190 ------------------ <2> note: usesection ASMTABLE1 191 <2> mne AAD, ASM_SPECIAL ; ofs=Fh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000094DB FF db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FB6 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 00007FB8 414144 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DBC 6FC0 variant 0D5h, 66 === Switch to base=000000h -> "ASMTABLE2" 192 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 192 ------------------ <2> note: usesection ASMTABLE1 0 00007DBE FF endvariant === Switch to base=000000h -> "ASMTABLE2" 193 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 193 ------------------ <2> note: usesection ASMTABLE1 194 <2> mne AAM, ASM_SPECIAL ; ofs=13h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000094DF FF db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FBB 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 00007FBD 41414D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DC0 6F3A variant 0D4h, 66 === Switch to base=000000h -> "ASMTABLE2" 195 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 195 ------------------ <2> note: usesection ASMTABLE1 0 00007DC2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 196 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 196 ------------------ <2> note: usesection ASMTABLE1 197 <2> mne AAS ; ofs=17h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FC0 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 00007FC2 414153 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DC3 20FA variant 03Fh, 0 === Switch to base=000000h -> "ASMTABLE2" 198 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 198 ------------------ <2> note: usesection ASMTABLE1 0 00007DC5 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 199 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 199 ------------------ <2> note: usesection ASMTABLE1 200 <2> mne ADC ; ofs=1Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FC5 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 00007FC7 414443 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DC6 FBF43EC1 variant AGRP(1,2), 5, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 201 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 201 ------------------ <2> note: usesection ASMTABLE1 0 00007DCA 0A79 variant 014h, 1 === Switch to base=000000h -> "ASMTABLE2" 202 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 202 ------------------ <2> note: usesection ASMTABLE1 0 00007DCC FBF442EE variant AGRP(2,2), 2, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 203 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 203 ------------------ <2> note: usesection ASMTABLE1 0 00007DD0 FB0867 variant 010h, 7, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 204 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 204 ------------------ <2> note: usesection ASMTABLE1 0 00007DD3 0976 variant 012h, 10 === Switch to base=000000h -> "ASMTABLE2" 205 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 205 ------------------ <2> note: usesection ASMTABLE1 0 00007DD5 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 206 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 206 ------------------ <2> note: usesection ASMTABLE1 207 <2> mne ADD ; ofs=2Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FCA 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 00007FCC 414444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DD6 FBF43DB5 variant AGRP(1,0), 5, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 208 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 208 ------------------ <2> note: usesection ASMTABLE1 0 00007DDA 0219 variant 004h, 1 === Switch to base=000000h -> "ASMTABLE2" 209 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 209 ------------------ <2> note: usesection ASMTABLE1 0 00007DDC FBF441E2 variant AGRP(2,0), 2, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 210 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 210 ------------------ <2> note: usesection ASMTABLE1 0 00007DE0 FB0007 variant 000h, 7, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 211 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 211 ------------------ <2> note: usesection ASMTABLE1 0 00007DE3 0116 variant 002h, 10 === Switch to base=000000h -> "ASMTABLE2" 212 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 212 ------------------ <2> note: usesection ASMTABLE1 0 00007DE5 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 213 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 213 ------------------ <2> note: usesection ASMTABLE1 214 <2> mne AND ; ofs=3Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FCF 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 00007FD1 414E44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DE6 FBF43FCD variant AGRP(1,4), 5, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 215 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 215 ------------------ <2> note: usesection ASMTABLE1 0 00007DEA 12D9 variant 024h, 1 === Switch to base=000000h -> "ASMTABLE2" 216 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 216 ------------------ <2> note: usesection ASMTABLE1 0 00007DEC FBF443FA variant AGRP(2,4), 2, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 217 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 217 ------------------ <2> note: usesection ASMTABLE1 0 00007DF0 FB10C7 variant 020h, 7, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 218 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 218 ------------------ <2> note: usesection ASMTABLE1 0 00007DF3 11D6 variant 022h, 10 === Switch to base=000000h -> "ASMTABLE2" 219 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 219 ------------------ <2> note: usesection ASMTABLE1 0 00007DF5 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 220 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 220 ------------------ <2> note: usesection ASMTABLE1 221 <2> mne ARPL ; ofs=4Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FD4 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 00007FD6 4152504C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DF6 F633DF variant 063h, 13, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 222 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 222 ------------------ <2> note: usesection ASMTABLE1 0 00007DF9 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 223 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 223 ------------------ <2> note: usesection ASMTABLE1 224 <2> mne BOUND ; ofs=4Eh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FDA 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 00007FDC 424F554E44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DFA F533CC variant 062h, 128, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 225 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 225 ------------------ <2> note: usesection ASMTABLE1 0 00007DFD FF endvariant === Switch to base=000000h -> "ASMTABLE2" 226 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 226 ------------------ <2> note: usesection ASMTABLE1 227 <2> mne BSF ; ofs=52h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FE1 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 00007FE3 425346 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007DFE F7E877 variant 1BCh, 15, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 228 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 228 ------------------ <2> note: usesection ASMTABLE1 0 00007E01 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 229 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 229 ------------------ <2> note: usesection ASMTABLE1 230 <2> mne BSR ; ofs=56h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FE6 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 00007FE8 425352 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E02 F7E8FD variant 1BDh, 15, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 231 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 231 ------------------ <2> note: usesection ASMTABLE1 0 00007E05 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 232 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 232 ------------------ <2> note: usesection ASMTABLE1 233 <2> mne BSWAP, ASM_D32 ; ofs=5Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009526 FD db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FEB 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 00007FED 4253574150 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E07 F8EEC0 variant 1C8h, 16, ASM_MACH4 === Switch to base=000000h -> "ASMTABLE2" 234 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 234 ------------------ <2> note: usesection ASMTABLE1 0 00007E0A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 235 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 235 ------------------ <2> note: usesection ASMTABLE1 236 <2> mne BT ; ofs=5Fh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FF2 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 00007FF4 4254 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E0B F7DB64 variant 1A3h, 18, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 237 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 237 ------------------ <2> note: usesection ASMTABLE1 0 00007E0E F7F4483D variant AGRP(3,4), 21, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 238 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 238 ------------------ <2> note: usesection ASMTABLE1 0 00007E12 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 239 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 239 ------------------ <2> note: usesection ASMTABLE1 240 <2> mne BTC ; ofs=67h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FF6 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 00007FF8 425443 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E13 FBF7E7F3 variant 1BBh, 17, ASM_LOCKABLE, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 241 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 241 ------------------ <2> note: usesection ASMTABLE1 0 00007E17 FBF7F449CD variant AGRP(3,7), 19, ASM_LOCKABLE, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 242 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 242 ------------------ <2> note: usesection ASMTABLE1 0 00007E1C FF endvariant === Switch to base=000000h -> "ASMTABLE2" 243 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 243 ------------------ <2> note: usesection ASMTABLE1 244 <2> mne BTR ; ofs=71h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00007FFB 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 00007FFD 425452 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E1D FBF7E3C3 variant 1B3h, 17, ASM_LOCKABLE, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 245 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 245 ------------------ <2> note: usesection ASMTABLE1 0 00007E21 FBF7F44947 variant AGRP(3,6), 19, ASM_LOCKABLE, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 246 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 246 ------------------ <2> note: usesection ASMTABLE1 0 00007E26 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 247 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 247 ------------------ <2> note: usesection ASMTABLE1 248 <2> mne BTS ; ofs=7Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008000 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 00008002 425453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E27 FBF7DF93 variant 1ABh, 17, ASM_LOCKABLE, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 249 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 249 ------------------ <2> note: usesection ASMTABLE1 0 00007E2B FBF7F448C1 variant AGRP(3,5), 19, ASM_LOCKABLE, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 250 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 250 ------------------ <2> note: usesection ASMTABLE1 0 00007E30 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 251 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 251 ------------------ <2> note: usesection ASMTABLE1 252 <2> mne CALL ; ofs=85h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008005 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 00008007 43414C4C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E31 50B6 variant 09Ah, 26 === Switch to base=000000h -> "ASMTABLE2" 253 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 253 ------------------ <2> note: usesection ASMTABLE1 0 00007E33 7986 variant 0E8h, 22 === Switch to base=000000h -> "ASMTABLE2" 254 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 254 ------------------ <2> note: usesection ASMTABLE1 0 00007E35 F44BCA variant AGRP(4,2), 126 === Switch to base=000000h -> "ASMTABLE2" 255 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 255 ------------------ <2> note: usesection ASMTABLE1 0 00007E38 F44BEE variant AGRP(4,3), 28 === Switch to base=000000h -> "ASMTABLE2" 256 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 256 ------------------ <2> note: usesection ASMTABLE1 0 00007E3B 50B4 variant 09Ah, 24 === Switch to base=000000h -> "ASMTABLE2" 257 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 257 ------------------ <2> note: usesection ASMTABLE1 0 00007E3D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 258 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 258 ------------------ <2> note: usesection ASMTABLE1 259 <2> mne CBW, ASM_D16 ; ofs=92h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 0000955E FC db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000800B 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 0000800D 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 0000955F FD db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008010 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 00008012 43574445 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E40 4F90 variant 098h, 0 === Switch to base=000000h -> "ASMTABLE2" 261 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 261 ------------------ <2> note: usesection ASMTABLE1 0 00007E42 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 262 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 262 ------------------ <2> note: usesection ASMTABLE1 263 <2> mne CLC ; ofs=97h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008016 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 00008018 434C43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E43 81D0 variant 0F8h, 0 === Switch to base=000000h -> "ASMTABLE2" 264 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 264 ------------------ <2> note: usesection ASMTABLE1 0 00007E45 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 265 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 265 ------------------ <2> note: usesection ASMTABLE1 266 <2> mne CLD ; ofs=9Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000801B 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 0000801D 434C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E46 83E8 variant 0FCh, 0 === Switch to base=000000h -> "ASMTABLE2" 267 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 267 ------------------ <2> note: usesection ASMTABLE1 0 00007E48 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 268 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 268 ------------------ <2> note: usesection ASMTABLE1 269 <2> mne CLI ; ofs=9Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008020 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 00008022 434C49 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E49 82DC variant 0FAh, 0 === Switch to base=000000h -> "ASMTABLE2" 270 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 270 ------------------ <2> note: usesection ASMTABLE1 0 00007E4B FF endvariant === Switch to base=000000h -> "ASMTABLE2" 271 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 271 ------------------ <2> note: usesection ASMTABLE1 272 <2> mne CLTS ; ofs=A0h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008025 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 00008027 434C5453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E4C F68924 variant 106h, 0, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 273 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 273 ------------------ <2> note: usesection ASMTABLE1 0 00007E4F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 274 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 274 ------------------ <2> note: usesection ASMTABLE1 275 <2> mne CMC ; ofs=A4h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 0000802D 434D43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E50 803E variant 0F5h, 0 === Switch to base=000000h -> "ASMTABLE2" 276 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 276 ------------------ <2> note: usesection ASMTABLE1 0 00007E52 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 277 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 277 ------------------ <2> note: usesection ASMTABLE1 278 <2> mne CMOVA ; ofs=A7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 00008032 434D4F5641 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E53 FAAB39 variant 147h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 279 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 279 ------------------ <2> note: usesection ASMTABLE1 0 00007E56 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 280 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 280 ------------------ <2> note: usesection ASMTABLE1 281 <2> mne CMOVAE ; ofs=ABh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008037 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 00008039 434D4F564145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E57 FAA921 variant 143h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 282 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 282 ------------------ <2> note: usesection ASMTABLE1 0 00007E5A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 283 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 283 ------------------ <2> note: usesection ASMTABLE1 284 <2> mne CMOVB ; ofs=AFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000803F 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 00008041 434D4F5642 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E5B FAA89B variant 142h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 285 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 285 ------------------ <2> note: usesection ASMTABLE1 0 00007E5E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 286 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 286 ------------------ <2> note: usesection ASMTABLE1 287 <2> mne CMOVBE ; ofs=B3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008046 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 00008048 434D4F564245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E5F FAAAB3 variant 146h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 288 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 288 ------------------ <2> note: usesection ASMTABLE1 0 00007E62 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 289 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 289 ------------------ <2> note: usesection ASMTABLE1 290 <2> mne CMOVC ; ofs=B7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000804E 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 00008050 434D4F5643 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E63 FAA89B variant 142h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 291 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 291 ------------------ <2> note: usesection ASMTABLE1 0 00007E66 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 292 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 292 ------------------ <2> note: usesection ASMTABLE1 293 <2> mne CMOVE ; ofs=BBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008055 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 00008057 434D4F5645 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E67 FAA9A7 variant 144h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 294 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 294 ------------------ <2> note: usesection ASMTABLE1 0 00007E6A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 295 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 295 ------------------ <2> note: usesection ASMTABLE1 296 <2> mne CMOVG ; ofs=BFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000805C 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 0000805E 434D4F5647 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E6B FAAF69 variant 14Fh, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 297 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 297 ------------------ <2> note: usesection ASMTABLE1 0 00007E6E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 298 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 298 ------------------ <2> note: usesection ASMTABLE1 299 <2> mne CMOVGE ; ofs=C3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008063 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 00008065 434D4F564745 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E6F FAAE5D variant 14Dh, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 300 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 300 ------------------ <2> note: usesection ASMTABLE1 0 00007E72 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 301 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 301 ------------------ <2> note: usesection ASMTABLE1 302 <2> mne CMOVL ; ofs=C7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000806B 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 0000806D 434D4F564C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E73 FAADD7 variant 14Ch, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 303 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 303 ------------------ <2> note: usesection ASMTABLE1 0 00007E76 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 304 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 304 ------------------ <2> note: usesection ASMTABLE1 305 <2> mne CMOVLE ; ofs=CBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008072 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 00008074 434D4F564C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E77 FAAEE3 variant 14Eh, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 306 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 306 ------------------ <2> note: usesection ASMTABLE1 0 00007E7A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 307 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 307 ------------------ <2> note: usesection ASMTABLE1 308 <2> mne CMOVNA ; ofs=CFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000807A 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 0000807C 434D4F564E41 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E7B FAAAB3 variant 146h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 309 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 309 ------------------ <2> note: usesection ASMTABLE1 0 00007E7E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 310 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 310 ------------------ <2> note: usesection ASMTABLE1 311 <2> mne CMOVNAE ; ofs=D3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008082 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 00008084 434D4F564E4145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E7F FAA89B variant 142h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 312 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 312 ------------------ <2> note: usesection ASMTABLE1 0 00007E82 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 313 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 313 ------------------ <2> note: usesection ASMTABLE1 314 <2> mne CMOVNB ; ofs=D7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000808B 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 0000808D 434D4F564E42 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E83 FAA921 variant 143h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 315 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 315 ------------------ <2> note: usesection ASMTABLE1 0 00007E86 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 316 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 316 ------------------ <2> note: usesection ASMTABLE1 317 <2> mne CMOVNBE ; ofs=DBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 00008095 434D4F564E4245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E87 FAAB39 variant 147h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 318 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 318 ------------------ <2> note: usesection ASMTABLE1 0 00007E8A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 319 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 319 ------------------ <2> note: usesection ASMTABLE1 320 <2> mne CMOVNC ; ofs=DFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000809C 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 0000809E 434D4F564E43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E8B FAA921 variant 143h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 321 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 321 ------------------ <2> note: usesection ASMTABLE1 0 00007E8E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 322 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 322 ------------------ <2> note: usesection ASMTABLE1 323 <2> mne CMOVNE ; ofs=E3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080A4 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 000080A6 434D4F564E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E8F FAAA2D variant 145h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 324 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 324 ------------------ <2> note: usesection ASMTABLE1 0 00007E92 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 325 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 325 ------------------ <2> note: usesection ASMTABLE1 326 <2> mne CMOVNG ; ofs=E7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080AC 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 000080AE 434D4F564E47 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E93 FAAEE3 variant 14Eh, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 327 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 327 ------------------ <2> note: usesection ASMTABLE1 0 00007E96 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 328 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 328 ------------------ <2> note: usesection ASMTABLE1 329 <2> mne CMOVNGE ; ofs=EBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080B4 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 000080B6 434D4F564E4745 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E97 FAADD7 variant 14Ch, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 330 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 330 ------------------ <2> note: usesection ASMTABLE1 0 00007E9A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 331 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 331 ------------------ <2> note: usesection ASMTABLE1 332 <2> mne CMOVNL ; ofs=EFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080BD 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 000080BF 434D4F564E4C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E9B FAAE5D variant 14Dh, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 333 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 333 ------------------ <2> note: usesection ASMTABLE1 0 00007E9E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 334 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 334 ------------------ <2> note: usesection ASMTABLE1 335 <2> mne CMOVNLE ; ofs=F3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 000080C7 434D4F564E4C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007E9F FAAF69 variant 14Fh, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 336 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 336 ------------------ <2> note: usesection ASMTABLE1 0 00007EA2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 337 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 337 ------------------ <2> note: usesection ASMTABLE1 338 <2> mne CMOVNO ; ofs=F7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080CE 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 000080D0 434D4F564E4F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EA3 FAA815 variant 141h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 339 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 339 ------------------ <2> note: usesection ASMTABLE1 0 00007EA6 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 340 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 340 ------------------ <2> note: usesection ASMTABLE1 341 <2> mne CMOVNP ; ofs=FBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080D6 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 000080D8 434D4F564E50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EA7 FAAD51 variant 14Bh, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 342 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 342 ------------------ <2> note: usesection ASMTABLE1 0 00007EAA FF endvariant === Switch to base=000000h -> "ASMTABLE2" 343 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 343 ------------------ <2> note: usesection ASMTABLE1 344 <2> mne CMOVNS ; ofs=FFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080DE 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 000080E0 434D4F564E53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EAB FAAC45 variant 149h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 345 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 345 ------------------ <2> note: usesection ASMTABLE1 0 00007EAE FF endvariant === Switch to base=000000h -> "ASMTABLE2" 346 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 346 ------------------ <2> note: usesection ASMTABLE1 347 <2> mne CMOVNZ ; ofs=103h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080E6 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 000080E8 434D4F564E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EAF FAAA2D variant 145h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 348 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 348 ------------------ <2> note: usesection ASMTABLE1 0 00007EB2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 349 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 349 ------------------ <2> note: usesection ASMTABLE1 350 <2> mne CMOVO ; ofs=107h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 000080F0 434D4F564F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EB3 FAA78F variant 140h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 351 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 351 ------------------ <2> note: usesection ASMTABLE1 0 00007EB6 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 352 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 352 ------------------ <2> note: usesection ASMTABLE1 353 <2> mne CMOVP ; ofs=10Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080F5 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 000080F7 434D4F5650 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EB7 FAACCB variant 14Ah, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 354 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 354 ------------------ <2> note: usesection ASMTABLE1 0 00007EBA FF endvariant === Switch to base=000000h -> "ASMTABLE2" 355 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 355 ------------------ <2> note: usesection ASMTABLE1 356 <2> mne CMOVPE ; ofs=10Fh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000080FC 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 000080FE 434D4F565045 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EBB FAACCB variant 14Ah, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 357 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 357 ------------------ <2> note: usesection ASMTABLE1 0 00007EBE FF endvariant === Switch to base=000000h -> "ASMTABLE2" 358 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 358 ------------------ <2> note: usesection ASMTABLE1 359 <2> mne CMOVPO ; ofs=113h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 00008106 434D4F56504F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EBF FAAD51 variant 14Bh, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 360 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 360 ------------------ <2> note: usesection ASMTABLE1 0 00007EC2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 361 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 361 ------------------ <2> note: usesection ASMTABLE1 362 <2> mne CMOVS ; ofs=117h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000810C 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 0000810E 434D4F5653 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EC3 FAABBF variant 148h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 363 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 363 ------------------ <2> note: usesection ASMTABLE1 0 00007EC6 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 364 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 364 ------------------ <2> note: usesection ASMTABLE1 365 <2> mne CMOVZ ; ofs=11Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008113 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 00008115 434D4F565A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EC7 FAA9A7 variant 144h, 15, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 366 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 366 ------------------ <2> note: usesection ASMTABLE1 0 00007ECA FF endvariant === Switch to base=000000h -> "ASMTABLE2" 367 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 367 ------------------ <2> note: usesection ASMTABLE1 368 <2> mne CMP ; ofs=11Fh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000811A 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 0000811C 434D50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007ECB F44160 variant AGRP(1,7), 6 === Switch to base=000000h -> "ASMTABLE2" 369 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 369 ------------------ <2> note: usesection ASMTABLE1 0 00007ECE 1F69 variant 03Ch, 1 === Switch to base=000000h -> "ASMTABLE2" 370 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 370 ------------------ <2> note: usesection ASMTABLE1 0 00007ED0 F4458D variant AGRP(2,7), 3 === Switch to base=000000h -> "ASMTABLE2" 371 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 371 ------------------ <2> note: usesection ASMTABLE1 0 00007ED3 1D58 variant 038h, 8 === Switch to base=000000h -> "ASMTABLE2" 372 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 372 ------------------ <2> note: usesection ASMTABLE1 0 00007ED5 1E66 variant 03Ah, 10 === Switch to base=000000h -> "ASMTABLE2" 373 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 373 ------------------ <2> note: usesection ASMTABLE1 0 00007ED7 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 374 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 374 ------------------ <2> note: usesection ASMTABLE1 375 <2> mne CMPSB ; ofs=12Ch 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 00008121 434D505342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007ED8 56E4 variant 0A6h, 0 === Switch to base=000000h -> "ASMTABLE2" 376 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 376 ------------------ <2> note: usesection ASMTABLE1 0 00007EDA FF endvariant === Switch to base=000000h -> "ASMTABLE2" 377 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 377 ------------------ <2> note: usesection ASMTABLE1 378 <2> mne CMPXCHG ; ofs=132h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008126 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 00008128 434D5058434847 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EDB FBF8E227 variant 1B0h, 7, ASM_LOCKABLE, ASM_MACH4 === Switch to base=000000h -> "ASMTABLE2" 379 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 379 ------------------ <2> note: usesection ASMTABLE1 0 00007EDF FF endvariant === Switch to base=000000h -> "ASMTABLE2" 380 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 380 ------------------ <2> note: usesection ASMTABLE1 381 <2> mne CMPXCHG8B ; ofs=137h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000812F 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 00008131 434D50584348473842 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EE0 F9F44F14 variant AGRP(5,1), 30, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 382 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 382 ------------------ <2> note: usesection ASMTABLE1 0 00007EE4 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 383 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 383 ------------------ <2> note: usesection ASMTABLE1 384 <2> mne CPUID ; ofs=13Ch 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 0000813C 4350554944 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EE5 F9DACC variant 1A2h, 0, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 385 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 385 ------------------ <2> note: usesection ASMTABLE1 0 00007EE8 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 386 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 386 ------------------ <2> note: usesection ASMTABLE1 387 <2> mne CWD, ASM_D16 ; ofs=140h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009609 FC db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008141 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 00008143 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 0000960A FD db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008146 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 00008148 434451 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EEB 5016 variant 099h, 0 === Switch to base=000000h -> "ASMTABLE2" 389 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 389 ------------------ <2> note: usesection ASMTABLE1 0 00007EED FF endvariant === Switch to base=000000h -> "ASMTABLE2" 390 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 390 ------------------ <2> note: usesection ASMTABLE1 391 <2> mne DAA ; ofs=145h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000814B 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 0000814D 444141 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EEE 146A variant 027h, 0 === Switch to base=000000h -> "ASMTABLE2" 392 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 392 ------------------ <2> note: usesection ASMTABLE1 0 00007EF0 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 393 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 393 ------------------ <2> note: usesection ASMTABLE1 394 <2> mne DAS ; ofs=148h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008150 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 00008152 444153 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EF1 189A variant 02Fh, 0 === Switch to base=000000h -> "ASMTABLE2" 395 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 395 ------------------ <2> note: usesection ASMTABLE1 0 00007EF3 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 396 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 396 ------------------ <2> note: usesection ASMTABLE1 397 <2> mne DB, ASM_SPECIAL ; ofs=14Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009614 FF db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008155 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 00008157 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009615 FF db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008159 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 0000815B 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 0000815F 444543 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EF6 25D5 variant 048h, 37 === Switch to base=000000h -> "ASMTABLE2" 400 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 400 ------------------ <2> note: usesection ASMTABLE1 0 00007EF8 FBF43A27 variant AGRP(0,1), 33, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 401 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 401 ------------------ <2> note: usesection ASMTABLE1 0 00007EFC FF endvariant === Switch to base=000000h -> "ASMTABLE2" 402 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 402 ------------------ <2> note: usesection ASMTABLE1 403 <2> mne DIV ; ofs=156h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008162 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 00008164 444956 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007EFD F455E7 variant AGRP(6,6), 35 === Switch to base=000000h -> "ASMTABLE2" 404 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 404 ------------------ <2> note: usesection ASMTABLE1 0 00007F00 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 405 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 405 ------------------ <2> note: usesection ASMTABLE1 406 <2> mne DW, ASM_SPECIAL ; ofs=15Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009621 FF db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008167 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 00008169 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 0000816D 454D4D53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F02 F9C44A variant 177h, 0, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 408 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 408 ------------------ <2> note: usesection ASMTABLE1 0 00007F05 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 409 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 409 ------------------ <2> note: usesection ASMTABLE1 410 <2> mne F2XM1 ; ofs=164h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008171 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 00008173 4632584D31 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F06 7196F0 fpvariant 0D9h, 0, 0F0h === Switch to base=000000h -> "ASMTABLE2" 411 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 411 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 411 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 411 ------------------ <2> note: usesection ASMTABLE1 0 00007F09 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 412 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 412 ------------------ <2> note: usesection ASMTABLE1 413 <2> mne FABS ; ofs=168h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008178 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 0000817A 46414253 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F0A 7196E1 fpvariant 0D9h, 0, 0E1h === Switch to base=000000h -> "ASMTABLE2" 414 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 414 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 414 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 414 ------------------ <2> note: usesection ASMTABLE1 0 00007F0D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 415 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 415 ------------------ <2> note: usesection ASMTABLE1 416 <2> mne FADD ; ofs=16Ch 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000817E 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 00008180 46414444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F0E F41828 variant 200h, 40 === Switch to base=000000h -> "ASMTABLE2" 417 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 417 ------------------ <2> note: usesection ASMTABLE1 0 00007F11 F41A42 variant 204h, 42 === Switch to base=000000h -> "ASMTABLE2" 418 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 418 ------------------ <2> note: usesection ASMTABLE1 0 00007F14 713CC0 fpvariant 0D8h, 44, 0C0h === Switch to base=000000h -> "ASMTABLE2" 419 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 419 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 419 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 419 ------------------ <2> note: usesection ASMTABLE1 0 00007F17 7357C0 fpvariant 0DCh, 47, 0C0h === Switch to base=000000h -> "ASMTABLE2" 420 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 420 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 420 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 420 ------------------ <2> note: usesection ASMTABLE1 0 00007F1A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 421 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 421 ------------------ <2> note: usesection ASMTABLE1 422 <2> mne FADDP ; ofs=179h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008184 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 00008186 4641444450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F1B 7462C0 fpvariant 0DEh, 46, 0C0h === Switch to base=000000h -> "ASMTABLE2" 423 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 423 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 423 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 423 ------------------ <2> note: usesection ASMTABLE1 0 00007F1E 7434C1 fpvariant 0DEh, 0, 0C1h === Switch to base=000000h -> "ASMTABLE2" 424 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 424 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 424 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 424 ------------------ <2> note: usesection ASMTABLE1 0 00007F21 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 425 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 425 ------------------ <2> note: usesection ASMTABLE1 426 <2> mne FIADD ; ofs=180h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000818B 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 0000818D 4649414444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F22 F4193C variant 202h, 48 === Switch to base=000000h -> "ASMTABLE2" 427 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 427 ------------------ <2> note: usesection ASMTABLE1 0 00007F25 F41B56 variant 206h, 50 === Switch to base=000000h -> "ASMTABLE2" 428 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 428 ------------------ <2> note: usesection ASMTABLE1 0 00007F28 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 429 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 429 ------------------ <2> note: usesection ASMTABLE1 430 <2> mne FBLD ; ofs=187h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008192 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 00008194 46424C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F29 F42C9E variant 227h, 52 === Switch to base=000000h -> "ASMTABLE2" 431 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 431 ------------------ <2> note: usesection ASMTABLE1 0 00007F2C FF endvariant === Switch to base=000000h -> "ASMTABLE2" 432 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 432 ------------------ <2> note: usesection ASMTABLE1 433 <2> mne FBSTP ; ofs=18Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008198 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 0000819A 4642535450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F2D F434FF variant 237h, 53 === Switch to base=000000h -> "ASMTABLE2" 434 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 434 ------------------ <2> note: usesection ASMTABLE1 0 00007F30 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 435 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 435 ------------------ <2> note: usesection ASMTABLE1 436 <2> mne FCHS ; ofs=18Fh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000819F 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 000081A1 46434853 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F31 7196E0 fpvariant 0D9h, 0, 0E0h === Switch to base=000000h -> "ASMTABLE2" 437 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 437 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 437 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 437 ------------------ <2> note: usesection ASMTABLE1 0 00007F34 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 438 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 438 ------------------ <2> note: usesection ASMTABLE1 439 <2> mne FCLEX, ASM_WAIT ; ofs=193h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009655 FE db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081A5 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 000081A7 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 000081AE 464E434C4558 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F36 72A2E2 fpvariant 0DBh, 0, 0E2h === Switch to base=000000h -> "ASMTABLE2" 441 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 441 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 441 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 441 ------------------ <2> note: usesection ASMTABLE1 0 00007F39 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 442 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 442 ------------------ <2> note: usesection ASMTABLE1 443 <2> mne FCMOVA ; ofs=198h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081B4 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 000081B6 46434D4F5641 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F3A FA72CED0 fpvariant 0DBh, 44, 0D0h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 444 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 444 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 444 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 444 ------------------ <2> note: usesection ASMTABLE1 0 00007F3E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 445 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 445 ------------------ <2> note: usesection ASMTABLE1 446 <2> mne FCMOVAE ; ofs=19Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081BC 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 000081BE 46434D4F564145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F3F FA72CEC0 fpvariant 0DBh, 44, 0C0h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 447 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 447 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 447 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 447 ------------------ <2> note: usesection ASMTABLE1 0 00007F43 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 448 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 448 ------------------ <2> note: usesection ASMTABLE1 449 <2> mne FCMOVB ; ofs=1A2h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081C5 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 000081C7 46434D4F5642 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F44 FA7248C0 fpvariant 0DAh, 44, 0C0h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 450 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 450 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 450 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 450 ------------------ <2> note: usesection ASMTABLE1 0 00007F48 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 451 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 451 ------------------ <2> note: usesection ASMTABLE1 452 <2> mne FCMOVBE ; ofs=1A7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081CD 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 000081CF 46434D4F564245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F49 FA7248D0 fpvariant 0DAh, 44, 0D0h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 453 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 453 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 453 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 453 ------------------ <2> note: usesection ASMTABLE1 0 00007F4D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 454 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 454 ------------------ <2> note: usesection ASMTABLE1 455 <2> mne FCMOVE ; ofs=1ACh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081D6 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 000081D8 46434D4F5645 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F4E FA7248C8 fpvariant 0DAh, 44, 0C8h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 456 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 456 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 456 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 456 ------------------ <2> note: usesection ASMTABLE1 0 00007F52 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 457 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 457 ------------------ <2> note: usesection ASMTABLE1 458 <2> mne FCMOVNA ; ofs=1B1h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081DE 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 000081E0 46434D4F564E41 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F53 FA7248D0 fpvariant 0DAh, 44, 0D0h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 459 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 459 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 459 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 459 ------------------ <2> note: usesection ASMTABLE1 0 00007F57 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 460 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 460 ------------------ <2> note: usesection ASMTABLE1 461 <2> mne FCMOVNAE ; ofs=1B6h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081E7 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 000081E9 46434D4F564E4145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F58 FA7248C0 fpvariant 0DAh, 44, 0C0h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 462 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 462 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 462 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 462 ------------------ <2> note: usesection ASMTABLE1 0 00007F5C FF endvariant === Switch to base=000000h -> "ASMTABLE2" 463 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 463 ------------------ <2> note: usesection ASMTABLE1 464 <2> mne FCMOVNB ; ofs=1BBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081F1 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 000081F3 46434D4F564E42 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F5D FA72CEC0 fpvariant 0DBh, 44, 0C0h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 465 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 465 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 465 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 465 ------------------ <2> note: usesection ASMTABLE1 0 00007F61 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 466 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 466 ------------------ <2> note: usesection ASMTABLE1 467 <2> mne FCMOVNBE ; ofs=1C0h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000081FA 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 000081FC 46434D4F564E4245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F62 FA72CED0 fpvariant 0DBh, 44, 0D0h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 468 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 468 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 468 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 468 ------------------ <2> note: usesection ASMTABLE1 0 00007F66 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 469 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 469 ------------------ <2> note: usesection ASMTABLE1 470 <2> mne FCMOVNE ; ofs=1C5h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008204 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 00008206 46434D4F564E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F67 FA72CEC8 fpvariant 0DBh, 44, 0C8h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 471 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 471 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 471 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 471 ------------------ <2> note: usesection ASMTABLE1 0 00007F6B FF endvariant === Switch to base=000000h -> "ASMTABLE2" 472 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 472 ------------------ <2> note: usesection ASMTABLE1 473 <2> mne FCMOVNU ; ofs=1CAh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 0000820F 46434D4F564E55 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F6C FA72CED8 fpvariant 0DBh, 44, 0D8h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 474 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 474 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 474 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 474 ------------------ <2> note: usesection ASMTABLE1 0 00007F70 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 475 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 475 ------------------ <2> note: usesection ASMTABLE1 476 <2> mne FCMOVNZ ; ofs=1CFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008216 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 00008218 46434D4F564E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F71 FA72CEC8 fpvariant 0DBh, 44, 0C8h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 477 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 477 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 477 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 477 ------------------ <2> note: usesection ASMTABLE1 0 00007F75 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 478 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 478 ------------------ <2> note: usesection ASMTABLE1 479 <2> mne FCMOVU ; ofs=1D4h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000821F 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 00008221 46434D4F5655 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F76 FA7248D8 fpvariant 0DAh, 44, 0D8h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 480 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 480 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 480 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 480 ------------------ <2> note: usesection ASMTABLE1 0 00007F7A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 481 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 481 ------------------ <2> note: usesection ASMTABLE1 482 <2> mne FCMOVZ ; ofs=1D9h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008227 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 00008229 46434D4F565A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F7B FA7248C8 fpvariant 0DAh, 44, 0C8h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 483 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 483 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 483 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 483 ------------------ <2> note: usesection ASMTABLE1 0 00007F7F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 484 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 484 ------------------ <2> note: usesection ASMTABLE1 485 <2> mne FCOM ; ofs=1DEh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 00008231 46434F4D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F80 F42088 variant 210h, 40 === Switch to base=000000h -> "ASMTABLE2" 486 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 486 ------------------ <2> note: usesection ASMTABLE1 0 00007F83 F422A2 variant 214h, 42 === Switch to base=000000h -> "ASMTABLE2" 487 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 487 ------------------ <2> note: usesection ASMTABLE1 0 00007F86 7146D0 fpvariant 0D8h, 54, 0D0h === Switch to base=000000h -> "ASMTABLE2" 488 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 488 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 488 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 488 ------------------ <2> note: usesection ASMTABLE1 0 00007F89 7110D1 fpvariant 0D8h, 0, 0D1h === Switch to base=000000h -> "ASMTABLE2" 489 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 489 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 489 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 489 ------------------ <2> note: usesection ASMTABLE1 0 00007F8C FF endvariant === Switch to base=000000h -> "ASMTABLE2" 490 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 490 ------------------ <2> note: usesection ASMTABLE1 491 <2> mne FCOMI ; ofs=1EBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008235 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 00008237 46434F4D49 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F8D FA72D8F0 fpvariant 0DBh, 54, 0F0h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 492 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 492 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 492 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 492 ------------------ <2> note: usesection ASMTABLE1 0 00007F91 FA72A2F1 fpvariant 0DBh, 0, 0F1h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 493 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 493 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 493 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 493 ------------------ <2> note: usesection ASMTABLE1 0 00007F95 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 494 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 494 ------------------ <2> note: usesection ASMTABLE1 495 <2> mne FCOMIP ; ofs=1F4h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000823C 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 0000823E 46434F4D4950 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F96 FA74F0F0 fpvariant 0DFh, 54, 0F0h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 496 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 496 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 496 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 496 ------------------ <2> note: usesection ASMTABLE1 0 00007F9A FA74BAF1 fpvariant 0DFh, 0, 0F1h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 497 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 497 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 497 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 497 ------------------ <2> note: usesection ASMTABLE1 0 00007F9E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 498 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 498 ------------------ <2> note: usesection ASMTABLE1 499 <2> mne FCOMP ; ofs=1FDh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 00008246 46434F4D50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007F9F F424B8 variant 218h, 40 === Switch to base=000000h -> "ASMTABLE2" 500 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 500 ------------------ <2> note: usesection ASMTABLE1 0 00007FA2 F426D2 variant 21Ch, 42 === Switch to base=000000h -> "ASMTABLE2" 501 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 501 ------------------ <2> note: usesection ASMTABLE1 0 00007FA5 7146D8 fpvariant 0D8h, 54, 0D8h === Switch to base=000000h -> "ASMTABLE2" 502 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 502 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 502 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 502 ------------------ <2> note: usesection ASMTABLE1 0 00007FA8 7110D9 fpvariant 0D8h, 0, 0D9h === Switch to base=000000h -> "ASMTABLE2" 503 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 503 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 503 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 503 ------------------ <2> note: usesection ASMTABLE1 0 00007FAB FF endvariant === Switch to base=000000h -> "ASMTABLE2" 504 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 504 ------------------ <2> note: usesection ASMTABLE1 505 <2> mne FCOMPP ; ofs=20Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000824B 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 0000824D 46434F4D5050 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FAC 7434D9 fpvariant 0DEh, 0, 0D9h === Switch to base=000000h -> "ASMTABLE2" 506 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 506 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 506 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 506 ------------------ <2> note: usesection ASMTABLE1 0 00007FAF FF endvariant === Switch to base=000000h -> "ASMTABLE2" 507 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 507 ------------------ <2> note: usesection ASMTABLE1 508 <2> mne FCOS ; ofs=20Eh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008253 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 00008255 46434F53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FB0 F77196FF fpvariant 0D9h, 0, 0FFh, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 509 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 509 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 509 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 509 ------------------ <2> note: usesection ASMTABLE1 0 00007FB4 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 510 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 510 ------------------ <2> note: usesection ASMTABLE1 511 <2> mne FDECSTP ; ofs=213h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 0000825B 46444543535450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FB5 7196F6 fpvariant 0D9h, 0, 0F6h === Switch to base=000000h -> "ASMTABLE2" 512 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 512 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 512 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 512 ------------------ <2> note: usesection ASMTABLE1 0 00007FB8 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 513 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 513 ------------------ <2> note: usesection ASMTABLE1 514 <2> mne FDISI, ASM_WAIT ; ofs=217h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000096D9 FE db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008262 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 00008264 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008269 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 0000826B 464E44495349 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FBA 72A2E1 fpvariant 0DBh, 0, 0E1h === Switch to base=000000h -> "ASMTABLE2" 516 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 516 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 516 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 516 ------------------ <2> note: usesection ASMTABLE1 0 00007FBD FF endvariant === Switch to base=000000h -> "ASMTABLE2" 517 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 517 ------------------ <2> note: usesection ASMTABLE1 518 <2> mne FDIV ; ofs=21Ch 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 00008273 46444956 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FBE F43148 variant 230h, 40 === Switch to base=000000h -> "ASMTABLE2" 519 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 519 ------------------ <2> note: usesection ASMTABLE1 0 00007FC1 F43362 variant 234h, 42 === Switch to base=000000h -> "ASMTABLE2" 520 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 520 ------------------ <2> note: usesection ASMTABLE1 0 00007FC4 713CF0 fpvariant 0D8h, 44, 0F0h === Switch to base=000000h -> "ASMTABLE2" 521 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 521 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 521 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 521 ------------------ <2> note: usesection ASMTABLE1 0 00007FC7 7357F8 fpvariant 0DCh, 47, 0F8h === Switch to base=000000h -> "ASMTABLE2" 522 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 522 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 522 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 522 ------------------ <2> note: usesection ASMTABLE1 0 00007FCA FF endvariant === Switch to base=000000h -> "ASMTABLE2" 523 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 523 ------------------ <2> note: usesection ASMTABLE1 524 <2> mne FDIVP ; ofs=229h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008277 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 00008279 4644495650 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FCB 7462F8 fpvariant 0DEh, 46, 0F8h === Switch to base=000000h -> "ASMTABLE2" 525 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 525 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 525 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 525 ------------------ <2> note: usesection ASMTABLE1 0 00007FCE 7434F9 fpvariant 0DEh, 0, 0F9h === Switch to base=000000h -> "ASMTABLE2" 526 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 526 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 526 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 526 ------------------ <2> note: usesection ASMTABLE1 0 00007FD1 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 527 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 527 ------------------ <2> note: usesection ASMTABLE1 528 <2> mne FIDIV ; ofs=230h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000827E 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 00008280 4649444956 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FD2 F4325C variant 232h, 48 === Switch to base=000000h -> "ASMTABLE2" 529 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 529 ------------------ <2> note: usesection ASMTABLE1 0 00007FD5 F43476 variant 236h, 50 === Switch to base=000000h -> "ASMTABLE2" 530 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 530 ------------------ <2> note: usesection ASMTABLE1 0 00007FD8 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 531 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 531 ------------------ <2> note: usesection ASMTABLE1 532 <2> mne FDIVR ; ofs=237h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008285 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 00008287 4644495652 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FD9 F43578 variant 238h, 40 === Switch to base=000000h -> "ASMTABLE2" 533 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 533 ------------------ <2> note: usesection ASMTABLE1 0 00007FDC F43792 variant 23Ch, 42 === Switch to base=000000h -> "ASMTABLE2" 534 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 534 ------------------ <2> note: usesection ASMTABLE1 0 00007FDF 713CF8 fpvariant 0D8h, 44, 0F8h === Switch to base=000000h -> "ASMTABLE2" 535 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 535 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 535 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 535 ------------------ <2> note: usesection ASMTABLE1 0 00007FE2 7357F0 fpvariant 0DCh, 47, 0F0h === Switch to base=000000h -> "ASMTABLE2" 536 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 536 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 536 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 536 ------------------ <2> note: usesection ASMTABLE1 0 00007FE5 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 537 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 537 ------------------ <2> note: usesection ASMTABLE1 538 <2> mne FDIVRP ; ofs=244h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000828C 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 0000828E 464449565250 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FE6 7462F0 fpvariant 0DEh, 46, 0F0h === Switch to base=000000h -> "ASMTABLE2" 539 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 539 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 539 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 539 ------------------ <2> note: usesection ASMTABLE1 0 00007FE9 7434F1 fpvariant 0DEh, 0, 0F1h === Switch to base=000000h -> "ASMTABLE2" 540 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 540 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 540 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 540 ------------------ <2> note: usesection ASMTABLE1 0 00007FEC FF endvariant === Switch to base=000000h -> "ASMTABLE2" 541 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 541 ------------------ <2> note: usesection ASMTABLE1 542 <2> mne FIDIVR ; ofs=24Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008294 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 00008296 464944495652 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FED F4368C variant 23Ah, 48 === Switch to base=000000h -> "ASMTABLE2" 543 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 543 ------------------ <2> note: usesection ASMTABLE1 0 00007FF0 F438A6 variant 23Eh, 50 === Switch to base=000000h -> "ASMTABLE2" 544 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 544 ------------------ <2> note: usesection ASMTABLE1 0 00007FF3 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 545 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 545 ------------------ <2> note: usesection ASMTABLE1 546 <2> mne FENI, ASM_WAIT ; ofs=252h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009714 FE db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000829C 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 0000829E 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082A2 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 000082A4 464E454E49 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FF5 72A2E0 fpvariant 0DBh, 0, 0E0h === Switch to base=000000h -> "ASMTABLE2" 548 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 548 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 548 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 548 ------------------ <2> note: usesection ASMTABLE1 0 00007FF8 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 549 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 549 ------------------ <2> note: usesection ASMTABLE1 550 <2> mne FFREE ; ofs=257h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082A9 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 000082AB 4646524545 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FF9 73DBC0 fpvariant 0DDh, 45, 0C0h === Switch to base=000000h -> "ASMTABLE2" 551 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 551 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 551 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 551 ------------------ <2> note: usesection ASMTABLE1 0 00007FFC FF endvariant === Switch to base=000000h -> "ASMTABLE2" 552 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 552 ------------------ <2> note: usesection ASMTABLE1 553 <2> mne FICOM ; ofs=25Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082B0 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 000082B2 4649434F4D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00007FFD F4219C variant 212h, 48 === Switch to base=000000h -> "ASMTABLE2" 554 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 554 ------------------ <2> note: usesection ASMTABLE1 0 00008000 F423B6 variant 216h, 50 === Switch to base=000000h -> "ASMTABLE2" 555 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 555 ------------------ <2> note: usesection ASMTABLE1 0 00008003 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 556 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 556 ------------------ <2> note: usesection ASMTABLE1 557 <2> mne FICOMP ; ofs=262h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082B7 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 000082B9 4649434F4D50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008004 F425CC variant 21Ah, 48 === Switch to base=000000h -> "ASMTABLE2" 558 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 558 ------------------ <2> note: usesection ASMTABLE1 0 00008007 F427E6 variant 21Eh, 50 === Switch to base=000000h -> "ASMTABLE2" 559 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 559 ------------------ <2> note: usesection ASMTABLE1 0 0000800A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 560 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 560 ------------------ <2> note: usesection ASMTABLE1 561 <2> mne FILD ; ofs=269h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082BF 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 000082C1 46494C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000800B F419C2 variant 203h, 48 === Switch to base=000000h -> "ASMTABLE2" 562 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 562 ------------------ <2> note: usesection ASMTABLE1 0 0000800E F41BDC variant 207h, 50 === Switch to base=000000h -> "ASMTABLE2" 563 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 563 ------------------ <2> note: usesection ASMTABLE1 0 00008011 F430B9 variant 22Fh, 31 === Switch to base=000000h -> "ASMTABLE2" 564 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 564 ------------------ <2> note: usesection ASMTABLE1 0 00008014 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 565 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 565 ------------------ <2> note: usesection ASMTABLE1 566 <2> mne FINCSTP ; ofs=273h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082C5 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 000082C7 46494E43535450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008015 7196F7 fpvariant 0D9h, 0, 0F7h === Switch to base=000000h -> "ASMTABLE2" 567 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 567 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 567 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 567 ------------------ <2> note: usesection ASMTABLE1 0 00008018 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 568 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 568 ------------------ <2> note: usesection ASMTABLE1 569 <2> mne FINIT, ASM_WAIT ; ofs=277h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009739 FE db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082CE 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 000082D0 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082D5 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 000082D7 464E494E4954 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000801A 72A2E3 fpvariant 0DBh, 0, 0E3h === Switch to base=000000h -> "ASMTABLE2" 571 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 571 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 571 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 571 ------------------ <2> note: usesection ASMTABLE1 0 0000801D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 572 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 572 ------------------ <2> note: usesection ASMTABLE1 573 <2> mne FIST ; ofs=27Ch 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082DD 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 000082DF 46495354 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000801E F42223 variant 213h, 49 === Switch to base=000000h -> "ASMTABLE2" 574 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 574 ------------------ <2> note: usesection ASMTABLE1 0 00008021 F4243D variant 217h, 51 === Switch to base=000000h -> "ASMTABLE2" 575 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 575 ------------------ <2> note: usesection ASMTABLE1 0 00008024 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 576 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 576 ------------------ <2> note: usesection ASMTABLE1 577 <2> mne FISTP ; ofs=283h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082E3 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 000082E5 4649535450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008025 F42653 variant 21Bh, 49 === Switch to base=000000h -> "ASMTABLE2" 578 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 578 ------------------ <2> note: usesection ASMTABLE1 0 00008028 F4286D variant 21Fh, 51 === Switch to base=000000h -> "ASMTABLE2" 579 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 579 ------------------ <2> note: usesection ASMTABLE1 0 0000802B F4391A variant 23Fh, 32 === Switch to base=000000h -> "ASMTABLE2" 580 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 580 ------------------ <2> note: usesection ASMTABLE1 0 0000802E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 581 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 581 ------------------ <2> note: usesection ASMTABLE1 582 <2> mne FLD ; ofs=28Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082EA 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 000082EC 464C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000802F F418AE variant 201h, 40 === Switch to base=000000h -> "ASMTABLE2" 583 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 583 ------------------ <2> note: usesection ASMTABLE1 0 00008032 F41AC8 variant 205h, 42 === Switch to base=000000h -> "ASMTABLE2" 584 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 584 ------------------ <2> note: usesection ASMTABLE1 0 00008035 F42EB6 variant 22Bh, 52 === Switch to base=000000h -> "ASMTABLE2" 585 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 585 ------------------ <2> note: usesection ASMTABLE1 0 00008038 71C3C0 fpvariant 0D9h, 45, 0C0h === Switch to base=000000h -> "ASMTABLE2" 586 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 586 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 586 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 586 ------------------ <2> note: usesection ASMTABLE1 0 0000803B FF endvariant === Switch to base=000000h -> "ASMTABLE2" 587 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 587 ------------------ <2> note: usesection ASMTABLE1 588 <2> mne FLD1 ; ofs=29Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082EF 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 000082F1 464C4431 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000803C 7196E8 fpvariant 0D9h, 0, 0E8h === Switch to base=000000h -> "ASMTABLE2" 589 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 589 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 589 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 589 ------------------ <2> note: usesection ASMTABLE1 0 0000803F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 590 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 590 ------------------ <2> note: usesection ASMTABLE1 591 <2> mne FLDL2T ; ofs=29Eh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082F5 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 000082F7 464C444C3254 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008040 7196E9 fpvariant 0D9h, 0, 0E9h === Switch to base=000000h -> "ASMTABLE2" 592 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 592 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 592 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 592 ------------------ <2> note: usesection ASMTABLE1 0 00008043 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 593 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 593 ------------------ <2> note: usesection ASMTABLE1 594 <2> mne FLDL2E ; ofs=2A2h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000082FD 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 000082FF 464C444C3245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008044 7196EA fpvariant 0D9h, 0, 0EAh === Switch to base=000000h -> "ASMTABLE2" 595 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 595 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 595 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 595 ------------------ <2> note: usesection ASMTABLE1 0 00008047 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 596 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 596 ------------------ <2> note: usesection ASMTABLE1 597 <2> mne FLDPI ; ofs=2A6h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008305 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 00008307 464C445049 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008048 7196EB fpvariant 0D9h, 0, 0EBh === Switch to base=000000h -> "ASMTABLE2" 598 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 598 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 598 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 598 ------------------ <2> note: usesection ASMTABLE1 0 0000804B FF endvariant === Switch to base=000000h -> "ASMTABLE2" 599 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 599 ------------------ <2> note: usesection ASMTABLE1 600 <2> mne FLDLG2 ; ofs=2AAh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000830C 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 0000830E 464C444C4732 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000804C 7196EC fpvariant 0D9h, 0, 0ECh === Switch to base=000000h -> "ASMTABLE2" 601 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 601 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 601 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 601 ------------------ <2> note: usesection ASMTABLE1 0 0000804F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 602 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 602 ------------------ <2> note: usesection ASMTABLE1 603 <2> mne FLDLN2 ; ofs=2AEh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008314 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 00008316 464C444C4E32 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008050 7196ED fpvariant 0D9h, 0, 0EDh === Switch to base=000000h -> "ASMTABLE2" 604 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 604 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 604 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 604 ------------------ <2> note: usesection ASMTABLE1 0 00008053 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 605 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 605 ------------------ <2> note: usesection ASMTABLE1 606 <2> mne FLDZ ; ofs=2B2h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000831C 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 0000831E 464C445A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008054 7196EE fpvariant 0D9h, 0, 0EEh === Switch to base=000000h -> "ASMTABLE2" 607 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 607 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 607 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 607 ------------------ <2> note: usesection ASMTABLE1 0 00008057 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 608 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 608 ------------------ <2> note: usesection ASMTABLE1 609 <2> mne FLDCW, ASM_WAIT ; ofs=2B6h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009778 FE db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008322 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 00008324 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008329 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 0000832B 464E4C444357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008059 F42DA8 variant 229h, 50 === Switch to base=000000h -> "ASMTABLE2" 611 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 611 ------------------ <2> note: usesection ASMTABLE1 0 0000805C FF endvariant === Switch to base=000000h -> "ASMTABLE2" 612 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 612 ------------------ <2> note: usesection ASMTABLE1 613 <2> mne FMUL ; ofs=2BFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008331 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 00008333 464D554C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000805D F41C58 variant 208h, 40 === Switch to base=000000h -> "ASMTABLE2" 614 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 614 ------------------ <2> note: usesection ASMTABLE1 0 00008060 F41E72 variant 20Ch, 42 === Switch to base=000000h -> "ASMTABLE2" 615 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 615 ------------------ <2> note: usesection ASMTABLE1 0 00008063 713CC8 fpvariant 0D8h, 44, 0C8h === Switch to base=000000h -> "ASMTABLE2" 616 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 616 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 616 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 616 ------------------ <2> note: usesection ASMTABLE1 0 00008066 7357C8 fpvariant 0DCh, 47, 0C8h === Switch to base=000000h -> "ASMTABLE2" 617 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 617 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 617 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 617 ------------------ <2> note: usesection ASMTABLE1 0 00008069 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 618 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 618 ------------------ <2> note: usesection ASMTABLE1 619 <2> mne FMULP ; ofs=2CCh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008337 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 00008339 464D554C50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000806A 7462C8 fpvariant 0DEh, 46, 0C8h === Switch to base=000000h -> "ASMTABLE2" 620 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 620 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 620 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 620 ------------------ <2> note: usesection ASMTABLE1 0 0000806D 7434C9 fpvariant 0DEh, 0, 0C9h === Switch to base=000000h -> "ASMTABLE2" 621 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 621 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 621 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 621 ------------------ <2> note: usesection ASMTABLE1 0 00008070 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 622 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 622 ------------------ <2> note: usesection ASMTABLE1 623 <2> mne FIMUL ; ofs=2D3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000833E 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 00008340 46494D554C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008071 F41D6C variant 20Ah, 48 === Switch to base=000000h -> "ASMTABLE2" 624 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 624 ------------------ <2> note: usesection ASMTABLE1 0 00008074 F41F86 variant 20Eh, 50 === Switch to base=000000h -> "ASMTABLE2" 625 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 625 ------------------ <2> note: usesection ASMTABLE1 0 00008077 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 626 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 626 ------------------ <2> note: usesection ASMTABLE1 627 <2> mne FNOP ; ofs=2DAh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008345 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 00008347 464E4F50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008078 7196D0 fpvariant 0D9h, 0, 0D0h === Switch to base=000000h -> "ASMTABLE2" 628 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 628 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 628 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 628 ------------------ <2> note: usesection ASMTABLE1 0 0000807B FF endvariant === Switch to base=000000h -> "ASMTABLE2" 629 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 629 ------------------ <2> note: usesection ASMTABLE1 630 <2> mne FPATAN ; ofs=2DEh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 0000834D 46504154414E db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000807C 7196F3 fpvariant 0D9h, 0, 0F3h === Switch to base=000000h -> "ASMTABLE2" 631 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 631 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 631 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 631 ------------------ <2> note: usesection ASMTABLE1 0 0000807F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 632 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 632 ------------------ <2> note: usesection ASMTABLE1 633 <2> mne FPREM ; ofs=2E2h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 00008355 465052454D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008080 7196F8 fpvariant 0D9h, 0, 0F8h === Switch to base=000000h -> "ASMTABLE2" 634 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 634 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 634 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 634 ------------------ <2> note: usesection ASMTABLE1 0 00008083 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 635 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 635 ------------------ <2> note: usesection ASMTABLE1 636 <2> mne FPREM1 ; ofs=2E6h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 0000835C 465052454D31 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008084 F77196F5 fpvariant 0D9h, 0, 0F5h, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 637 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 637 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 637 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 637 ------------------ <2> note: usesection ASMTABLE1 0 00008088 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 638 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 638 ------------------ <2> note: usesection ASMTABLE1 639 <2> mne FPTAN ; ofs=2EBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 00008364 465054414E db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008089 7196F2 fpvariant 0D9h, 0, 0F2h === Switch to base=000000h -> "ASMTABLE2" 640 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 640 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 640 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 640 ------------------ <2> note: usesection ASMTABLE1 0 0000808C FF endvariant === Switch to base=000000h -> "ASMTABLE2" 641 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 641 ------------------ <2> note: usesection ASMTABLE1 642 <2> mne FRNDINT ; ofs=2EFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 0000836B 46524E44494E54 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000808D 7196FC fpvariant 0D9h, 0, 0FCh === Switch to base=000000h -> "ASMTABLE2" 643 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 643 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 643 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 643 ------------------ <2> note: usesection ASMTABLE1 0 00008090 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 644 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 644 ------------------ <2> note: usesection ASMTABLE1 645 <2> mne FSCALE ; ofs=2FCh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008372 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 00008374 465343414C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008091 7196FD fpvariant 0D9h, 0, 0FDh === Switch to base=000000h -> "ASMTABLE2" 646 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 646 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 646 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 646 ------------------ <2> note: usesection ASMTABLE1 0 00008094 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 647 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 647 ------------------ <2> note: usesection ASMTABLE1 648 <2> mne FSETPM, ASM_WAIT ; ofs=300h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000097B5 FE db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000837A 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 0000837C 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008382 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 00008384 464E534554504D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008096 F672A2E4 fpvariant 0DBh, 0, 0E4h, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 650 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 650 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 650 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 650 ------------------ <2> note: usesection ASMTABLE1 0 0000809A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 651 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 651 ------------------ <2> note: usesection ASMTABLE1 652 <2> mne FSIN ; ofs=306h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000838B 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 0000838D 4653494E db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000809B F77196FE fpvariant 0D9h, 0, 0FEh, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 653 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 653 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 653 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 653 ------------------ <2> note: usesection ASMTABLE1 0 0000809F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 654 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 654 ------------------ <2> note: usesection ASMTABLE1 655 <2> mne FSINCOS ; ofs=30Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 00008393 4653494E434F53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080A0 F77196FB fpvariant 0D9h, 0, 0FBh, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 656 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 656 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 656 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 656 ------------------ <2> note: usesection ASMTABLE1 0 000080A4 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 657 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 657 ------------------ <2> note: usesection ASMTABLE1 658 <2> mne FSQRT ; ofs=310h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000839A 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 0000839C 4653515254 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080A5 7196FA fpvariant 0D9h, 0, 0FAh === Switch to base=000000h -> "ASMTABLE2" 659 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 659 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 659 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 659 ------------------ <2> note: usesection ASMTABLE1 0 000080A8 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 660 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 660 ------------------ <2> note: usesection ASMTABLE1 661 <2> mne FST ; ofs=314h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083A1 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 000083A3 465354 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080A9 F4210F variant 211h, 41 === Switch to base=000000h -> "ASMTABLE2" 662 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 662 ------------------ <2> note: usesection ASMTABLE1 0 000080AC F42329 variant 215h, 43 === Switch to base=000000h -> "ASMTABLE2" 663 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 663 ------------------ <2> note: usesection ASMTABLE1 0 000080AF 73DBD0 fpvariant 0DDh, 45, 0D0h === Switch to base=000000h -> "ASMTABLE2" 664 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 664 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 664 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 664 ------------------ <2> note: usesection ASMTABLE1 0 000080B2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 665 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 665 ------------------ <2> note: usesection ASMTABLE1 666 <2> mne FSTP ; ofs=31Eh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083A6 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 000083A8 46535450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080B3 F4253F variant 219h, 41 === Switch to base=000000h -> "ASMTABLE2" 667 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 667 ------------------ <2> note: usesection ASMTABLE1 0 000080B6 F42759 variant 21Dh, 43 === Switch to base=000000h -> "ASMTABLE2" 668 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 668 ------------------ <2> note: usesection ASMTABLE1 0 000080B9 F43717 variant 23Bh, 53 === Switch to base=000000h -> "ASMTABLE2" 669 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 669 ------------------ <2> note: usesection ASMTABLE1 0 000080BC 73DBD8 fpvariant 0DDh, 45, 0D8h === Switch to base=000000h -> "ASMTABLE2" 670 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 670 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 670 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 670 ------------------ <2> note: usesection ASMTABLE1 0 000080BF FF endvariant === Switch to base=000000h -> "ASMTABLE2" 671 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 671 ------------------ <2> note: usesection ASMTABLE1 672 <2> mne FSTCW, ASM_WAIT ; ofs=32Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000097E0 FE db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083AC 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 000083AE 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083B3 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 000083B5 464E53544357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080C1 F43609 variant 239h, 51 === Switch to base=000000h -> "ASMTABLE2" 674 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 674 ------------------ <2> note: usesection ASMTABLE1 0 000080C4 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 675 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 675 ------------------ <2> note: usesection ASMTABLE1 676 <2> mne FSTSW, ASM_WAIT ; ofs=335h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000097E5 FE db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083BB 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 000083BD 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 000083C4 464E53545357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080C6 74F4E0 fpvariant 0DFh, 58, 0E0h === Switch to base=000000h -> "ASMTABLE2" 678 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 678 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 678 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 678 ------------------ <2> note: usesection ASMTABLE1 0 000080C9 F43821 variant 23Dh, 51 === Switch to base=000000h -> "ASMTABLE2" 679 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 679 ------------------ <2> note: usesection ASMTABLE1 0 000080CC FF endvariant === Switch to base=000000h -> "ASMTABLE2" 680 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 680 ------------------ <2> note: usesection ASMTABLE1 681 <2> mne FSUB ; ofs=33Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083CA 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 000083CC 46535542 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080CD F428E8 variant 220h, 40 === Switch to base=000000h -> "ASMTABLE2" 682 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 682 ------------------ <2> note: usesection ASMTABLE1 0 000080D0 F42B02 variant 224h, 42 === Switch to base=000000h -> "ASMTABLE2" 683 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 683 ------------------ <2> note: usesection ASMTABLE1 0 000080D3 713CE0 fpvariant 0D8h, 44, 0E0h === Switch to base=000000h -> "ASMTABLE2" 684 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 684 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 684 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 684 ------------------ <2> note: usesection ASMTABLE1 0 000080D6 7357E8 fpvariant 0DCh, 47, 0E8h === Switch to base=000000h -> "ASMTABLE2" 685 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 685 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 685 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 685 ------------------ <2> note: usesection ASMTABLE1 0 000080D9 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 686 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 686 ------------------ <2> note: usesection ASMTABLE1 687 <2> mne FSUBP ; ofs=34Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083D0 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 000083D2 4653554250 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080DA 7462E8 fpvariant 0DEh, 46, 0E8h === Switch to base=000000h -> "ASMTABLE2" 688 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 688 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 688 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 688 ------------------ <2> note: usesection ASMTABLE1 0 000080DD 7434E9 fpvariant 0DEh, 0, 0E9h === Switch to base=000000h -> "ASMTABLE2" 689 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 689 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 689 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 689 ------------------ <2> note: usesection ASMTABLE1 0 000080E0 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 690 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 690 ------------------ <2> note: usesection ASMTABLE1 691 <2> mne FISUB ; ofs=351h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 000083D9 4649535542 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080E1 F429FC variant 222h, 48 === Switch to base=000000h -> "ASMTABLE2" 692 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 692 ------------------ <2> note: usesection ASMTABLE1 0 000080E4 F42C16 variant 226h, 50 === Switch to base=000000h -> "ASMTABLE2" 693 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 693 ------------------ <2> note: usesection ASMTABLE1 0 000080E7 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 694 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 694 ------------------ <2> note: usesection ASMTABLE1 695 <2> mne FSUBR ; ofs=358h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 000083E0 4653554252 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080E8 F42D18 variant 228h, 40 === Switch to base=000000h -> "ASMTABLE2" 696 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 696 ------------------ <2> note: usesection ASMTABLE1 0 000080EB F42F32 variant 22Ch, 42 === Switch to base=000000h -> "ASMTABLE2" 697 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 697 ------------------ <2> note: usesection ASMTABLE1 0 000080EE 713CE8 fpvariant 0D8h, 44, 0E8h === Switch to base=000000h -> "ASMTABLE2" 698 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 698 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 698 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 698 ------------------ <2> note: usesection ASMTABLE1 0 000080F1 7357E0 fpvariant 0DCh, 47, 0E0h === Switch to base=000000h -> "ASMTABLE2" 699 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 699 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 699 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 699 ------------------ <2> note: usesection ASMTABLE1 0 000080F4 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 700 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 700 ------------------ <2> note: usesection ASMTABLE1 701 <2> mne FSUBRP ; ofs=365h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083E5 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 000083E7 465355425250 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080F5 7462E0 fpvariant 0DEh, 46, 0E0h === Switch to base=000000h -> "ASMTABLE2" 702 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 702 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 702 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 702 ------------------ <2> note: usesection ASMTABLE1 0 000080F8 7434E1 fpvariant 0DEh, 0, 0E1h === Switch to base=000000h -> "ASMTABLE2" 703 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 703 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 703 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 703 ------------------ <2> note: usesection ASMTABLE1 0 000080FB FF endvariant === Switch to base=000000h -> "ASMTABLE2" 704 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 704 ------------------ <2> note: usesection ASMTABLE1 705 <2> mne FISUBR ; ofs=36Ch 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083ED 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 000083EF 464953554252 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000080FC F42E2C variant 22Ah, 48 === Switch to base=000000h -> "ASMTABLE2" 706 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 706 ------------------ <2> note: usesection ASMTABLE1 0 000080FF F43046 variant 22Eh, 50 === Switch to base=000000h -> "ASMTABLE2" 707 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 707 ------------------ <2> note: usesection ASMTABLE1 0 00008102 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 708 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 708 ------------------ <2> note: usesection ASMTABLE1 709 <2> mne FTST ; ofs=373h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083F5 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 000083F7 46545354 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008103 7196E4 fpvariant 0D9h, 0, 0E4h === Switch to base=000000h -> "ASMTABLE2" 710 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 710 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 710 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 710 ------------------ <2> note: usesection ASMTABLE1 0 00008106 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 711 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 711 ------------------ <2> note: usesection ASMTABLE1 712 <2> mne FUCOM ; ofs=377h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000083FB 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 000083FD 4655434F4D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008107 F773E4E0 fpvariant 0DDh, 54, 0E0h, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 713 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 713 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 713 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 713 ------------------ <2> note: usesection ASMTABLE1 0 0000810B F773AEE1 fpvariant 0DDh, 0, 0E1h, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 714 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 714 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 714 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 714 ------------------ <2> note: usesection ASMTABLE1 0 0000810F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 715 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 715 ------------------ <2> note: usesection ASMTABLE1 716 <2> mne FUCOMI ; ofs=380h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008402 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 00008404 4655434F4D49 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008110 FA72D8E8 fpvariant 0DBh, 54, 0E8h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 717 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 717 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 717 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 717 ------------------ <2> note: usesection ASMTABLE1 0 00008114 FA72A2E9 fpvariant 0DBh, 0, 0E9h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 718 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 718 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 718 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 718 ------------------ <2> note: usesection ASMTABLE1 0 00008118 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 719 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 719 ------------------ <2> note: usesection ASMTABLE1 720 <2> mne FUCOMIP ; ofs=389h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000840A 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 0000840C 4655434F4D4950 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008119 FA74F0E8 fpvariant 0DFh, 54, 0E8h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 721 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 721 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 721 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 721 ------------------ <2> note: usesection ASMTABLE1 0 0000811D FA74BAE9 fpvariant 0DFh, 0, 0E9h, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 722 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 722 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 722 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 722 ------------------ <2> note: usesection ASMTABLE1 0 00008121 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 723 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 723 ------------------ <2> note: usesection ASMTABLE1 724 <2> mne FUCOMP ; ofs=392h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008413 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 00008415 4655434F4D50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008122 F773E4E8 fpvariant 0DDh, 54, 0E8h, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 725 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 725 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 725 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 725 ------------------ <2> note: usesection ASMTABLE1 0 00008126 F773AEE9 fpvariant 0DDh, 0, 0E9h, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 726 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 726 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 726 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 726 ------------------ <2> note: usesection ASMTABLE1 0 0000812A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 727 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 727 ------------------ <2> note: usesection ASMTABLE1 728 <2> mne FUCOMPP ; ofs=39Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000841B 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 0000841D 4655434F4D5050 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000812B F7721CE9 fpvariant 0DAh, 0, 0E9h, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 729 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 729 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 729 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 729 ------------------ <2> note: usesection ASMTABLE1 0 0000812F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 730 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 730 ------------------ <2> note: usesection ASMTABLE1 731 <2> mne FWAIT ; ofs=3A0h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008424 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 00008426 4657414954 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008130 5122 variant 09Bh, 0 === Switch to base=000000h -> "ASMTABLE2" 732 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 732 ------------------ <2> note: usesection ASMTABLE1 0 00008132 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 733 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 733 ------------------ <2> note: usesection ASMTABLE1 734 <2> mne FXAM ; ofs=3A3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000842B 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 0000842D 4658414D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008133 7196E5 fpvariant 0D9h, 0, 0E5h === Switch to base=000000h -> "ASMTABLE2" 735 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 735 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 735 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 735 ------------------ <2> note: usesection ASMTABLE1 0 00008136 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 736 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 736 ------------------ <2> note: usesection ASMTABLE1 737 <2> mne FXCH ; ofs=3A7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008431 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 00008433 46584348 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008137 71CCC8 fpvariant 0D9h, 54, 0C8h === Switch to base=000000h -> "ASMTABLE2" 738 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 738 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 738 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 738 ------------------ <2> note: usesection ASMTABLE1 0 0000813A 7196C9 fpvariant 0D9h, 0, 0C9h === Switch to base=000000h -> "ASMTABLE2" 739 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 739 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 739 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 739 ------------------ <2> note: usesection ASMTABLE1 0 0000813D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 740 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 740 ------------------ <2> note: usesection ASMTABLE1 741 <2> mne FXTRACT ; ofs=3AEh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008437 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 00008439 46585452414354 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000813E 7196F4 fpvariant 0D9h, 0, 0F4h === Switch to base=000000h -> "ASMTABLE2" 742 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 742 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 742 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 742 ------------------ <2> note: usesection ASMTABLE1 0 00008141 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 743 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 743 ------------------ <2> note: usesection ASMTABLE1 744 <2> mne FYL2X ; ofs=3B2h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008440 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 00008442 46594C3258 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008142 7196F1 fpvariant 0D9h, 0, 0F1h === Switch to base=000000h -> "ASMTABLE2" 745 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 745 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 745 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 745 ------------------ <2> note: usesection ASMTABLE1 0 00008145 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 746 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 746 ------------------ <2> note: usesection ASMTABLE1 747 <2> mne FYL2XP1 ; ofs=3B6h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008447 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 00008449 46594C32585031 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008146 7196F9 fpvariant 0D9h, 0, 0F9h === Switch to base=000000h -> "ASMTABLE2" 748 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 748 ------------------ <2> note: usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE2" 748 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 748 ------------------ <2> note: usesection ASMTABLE1 0 00008149 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 749 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 749 ------------------ <2> note: usesection ASMTABLE1 750 <2> mne HLT ; ofs=3BAh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 00008452 484C54 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000814A 7FB8 variant 0F4h, 0 === Switch to base=000000h -> "ASMTABLE2" 751 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 751 ------------------ <2> note: usesection ASMTABLE1 0 0000814C FF endvariant === Switch to base=000000h -> "ASMTABLE2" 752 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 752 ------------------ <2> note: usesection ASMTABLE1 753 <2> mne IDIV ; ofs=3BDh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008455 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 00008457 49444956 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000814D F4566D variant AGRP(6,7), 35 === Switch to base=000000h -> "ASMTABLE2" 754 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 754 ------------------ <2> note: usesection ASMTABLE1 0 00008150 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 755 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 755 ------------------ <2> note: usesection ASMTABLE1 756 <2> mne IMUL ; ofs=3C1h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000845B 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 0000845D 494D554C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008151 F45561 variant AGRP(6,5), 35 === Switch to base=000000h -> "ASMTABLE2" 757 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 757 ------------------ <2> note: usesection ASMTABLE1 0 00008154 F7E1A9 variant 1AFh, 15, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 758 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 758 ------------------ <2> note: usesection ASMTABLE1 0 00008157 F5383D variant 06Bh, 59, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 759 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 759 ------------------ <2> note: usesection ASMTABLE1 0 0000815A F5383E variant 06Bh, 60, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 760 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 760 ------------------ <2> note: usesection ASMTABLE1 0 0000815D F53733 variant 069h, 61, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 761 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 761 ------------------ <2> note: usesection ASMTABLE1 0 00008160 F53734 variant 069h, 62, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 762 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 762 ------------------ <2> note: usesection ASMTABLE1 0 00008163 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 763 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 763 ------------------ <2> note: usesection ASMTABLE1 764 <2> mne IN ; ofs=3D4h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008461 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 00008463 494E db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008164 7797 variant 0E4h, 63 === Switch to base=000000h -> "ASMTABLE2" 765 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 765 ------------------ <2> note: usesection ASMTABLE1 0 00008166 7BC8 variant 0ECh, 64 === Switch to base=000000h -> "ASMTABLE2" 766 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 766 ------------------ <2> note: usesection ASMTABLE1 0 00008168 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 767 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 767 ------------------ <2> note: usesection ASMTABLE1 768 <2> mne INC ; ofs=3D9h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008465 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 00008467 494E43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008169 21A5 variant 040h, 37 === Switch to base=000000h -> "ASMTABLE2" 769 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 769 ------------------ <2> note: usesection ASMTABLE1 0 0000816B FBF439A1 variant AGRP(0,0), 33, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 770 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 770 ------------------ <2> note: usesection ASMTABLE1 0 0000816F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 771 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 771 ------------------ <2> note: usesection ASMTABLE1 772 <2> mne INSB ; ofs=3E0h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000846A 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 0000846C 494E5342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008170 F53888 variant 06Ch, 0, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 773 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 773 ------------------ <2> note: usesection ASMTABLE1 0 00008173 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 774 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 774 ------------------ <2> note: usesection ASMTABLE1 775 <2> mne INT ; ofs=3E8h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008470 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 00008472 494E54 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008174 6B09 variant 0CCh, 65 === Switch to base=000000h -> "ASMTABLE2" 776 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 776 ------------------ <2> note: usesection ASMTABLE1 0 00008176 6BCF variant 0CDh, 129 === Switch to base=000000h -> "ASMTABLE2" 777 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 777 ------------------ <2> note: usesection ASMTABLE1 0 00008178 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 778 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 778 ------------------ <2> note: usesection ASMTABLE1 779 <2> mne INT1 ; ofs=3EDh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 00008477 494E5431 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008179 FA7EAB variant 0F1h, 133, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 780 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 780 ------------------ <2> note: usesection ASMTABLE1 0 0000817C FF endvariant === Switch to base=000000h -> "ASMTABLE2" 781 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 781 ------------------ <2> note: usesection ASMTABLE1 782 <2> mne INT01 ; ofs=3F1h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000847B 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 0000847D 494E543031 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000817D FA7EAB variant 0F1h, 133, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 783 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 783 ------------------ <2> note: usesection ASMTABLE1 0 00008180 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 784 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 784 ------------------ <2> note: usesection ASMTABLE1 785 <2> mne ICEBP ; ofs=3F5h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008482 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 00008484 4943454250 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008181 FA7EAB variant 0F1h, 133, ASM_MACH6 === Switch to base=000000h -> "ASMTABLE2" 786 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 786 ------------------ <2> note: usesection ASMTABLE1 0 00008184 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 787 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 787 ------------------ <2> note: usesection ASMTABLE1 788 <2> mne INT3 ; ofs=3F9h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008489 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 0000848B 494E5433 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008185 6B4D variant 0CCh, 133 === Switch to base=000000h -> "ASMTABLE2" 789 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 789 ------------------ <2> note: usesection ASMTABLE1 0 00008187 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 790 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 790 ------------------ <2> note: usesection ASMTABLE1 791 <2> mne INT03 ; ofs=3FCh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000848F 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 00008491 494E543033 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008188 6B4D variant 0CCh, 133 === Switch to base=000000h -> "ASMTABLE2" 792 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 792 ------------------ <2> note: usesection ASMTABLE1 0 0000818A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 793 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 793 ------------------ <2> note: usesection ASMTABLE1 794 <2> mne INTO ; ofs=3FFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008496 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 00008498 494E544F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000818B 6C59 variant 0CEh, 133 === Switch to base=000000h -> "ASMTABLE2" 795 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 795 ------------------ <2> note: usesection ASMTABLE1 0 0000818D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 796 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 796 ------------------ <2> note: usesection ASMTABLE1 797 <2> mne INVD ; ofs=402h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 0000849E 494E5644 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000818E F88A30 variant 108h, 0, ASM_MACH4 === Switch to base=000000h -> "ASMTABLE2" 798 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 798 ------------------ <2> note: usesection ASMTABLE1 0 00008191 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 799 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 799 ------------------ <2> note: usesection ASMTABLE1 800 <2> mne INVLPG ; ofs=406h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084A2 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 000084A4 494E564C5047 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008192 F8F45AB2 variant AGRP(7,7), 56, ASM_MACH4 === Switch to base=000000h -> "ASMTABLE2" 801 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 801 ------------------ <2> note: usesection ASMTABLE1 0 00008196 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 802 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 802 ------------------ <2> note: usesection ASMTABLE1 803 <2> mne JA ; ofs=40Eh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084AA 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 000084AC 4A41 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008197 3E8E variant 077h, 68 === Switch to base=000000h -> "ASMTABLE2" 804 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 804 ------------------ <2> note: usesection ASMTABLE1 0 00008199 F7CCC1 variant 187h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 805 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 805 ------------------ <2> note: usesection ASMTABLE1 0 0000819C FF endvariant === Switch to base=000000h -> "ASMTABLE2" 806 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 806 ------------------ <2> note: usesection ASMTABLE1 807 <2> mne JAE ; ofs=414h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084AE 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 000084B0 4A4145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000819D 3C76 variant 073h, 68 === Switch to base=000000h -> "ASMTABLE2" 808 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 808 ------------------ <2> note: usesection ASMTABLE1 0 0000819F F7CAA9 variant 183h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 809 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 809 ------------------ <2> note: usesection ASMTABLE1 0 000081A2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 810 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 810 ------------------ <2> note: usesection ASMTABLE1 811 <2> mne JB ; ofs=41Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084B3 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 000084B5 4A42 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081A3 3BF0 variant 072h, 68 === Switch to base=000000h -> "ASMTABLE2" 812 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 812 ------------------ <2> note: usesection ASMTABLE1 0 000081A5 F7CA23 variant 182h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 813 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 813 ------------------ <2> note: usesection ASMTABLE1 0 000081A8 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 814 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 814 ------------------ <2> note: usesection ASMTABLE1 815 <2> mne JBE ; ofs=420h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084B7 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 000084B9 4A4245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081A9 3E08 variant 076h, 68 === Switch to base=000000h -> "ASMTABLE2" 816 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 816 ------------------ <2> note: usesection ASMTABLE1 0 000081AB F7CC3B variant 186h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 817 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 817 ------------------ <2> note: usesection ASMTABLE1 0 000081AE FF endvariant === Switch to base=000000h -> "ASMTABLE2" 818 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 818 ------------------ <2> note: usesection ASMTABLE1 819 <2> mne JC ; ofs=426h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084BC 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 000084BE 4A43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081AF 3BF0 variant 072h, 68 === Switch to base=000000h -> "ASMTABLE2" 820 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 820 ------------------ <2> note: usesection ASMTABLE1 0 000081B1 F7CA23 variant 182h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 821 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 821 ------------------ <2> note: usesection ASMTABLE1 0 000081B4 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 822 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 822 ------------------ <2> note: usesection ASMTABLE1 823 <2> mne JCXZ, ASM_D16 ; ofs=42Ch 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000098D5 FC db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084C0 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 000084C2 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000098D6 FD db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084C6 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 000084C8 4A4543585A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081B7 7716 variant 0E3h, 68 === Switch to base=000000h -> "ASMTABLE2" 825 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 825 ------------------ <2> note: usesection ASMTABLE1 0 000081B9 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 826 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 826 ------------------ <2> note: usesection ASMTABLE1 827 <2> mne JE ; ofs=431h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084CD 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 000084CF 4A45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081BA 3CFC variant 074h, 68 === Switch to base=000000h -> "ASMTABLE2" 828 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 828 ------------------ <2> note: usesection ASMTABLE1 0 000081BC F7CB2F variant 184h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 829 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 829 ------------------ <2> note: usesection ASMTABLE1 0 000081BF FF endvariant === Switch to base=000000h -> "ASMTABLE2" 830 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 830 ------------------ <2> note: usesection ASMTABLE1 831 <2> mne JG ; ofs=437h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084D1 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 000084D3 4A47 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081C0 42BE variant 07Fh, 68 === Switch to base=000000h -> "ASMTABLE2" 832 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 832 ------------------ <2> note: usesection ASMTABLE1 0 000081C2 F7D0F1 variant 18Fh, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 833 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 833 ------------------ <2> note: usesection ASMTABLE1 0 000081C5 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 834 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 834 ------------------ <2> note: usesection ASMTABLE1 835 <2> mne JGE ; ofs=43Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084D5 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 000084D7 4A4745 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081C6 41B2 variant 07Dh, 68 === Switch to base=000000h -> "ASMTABLE2" 836 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 836 ------------------ <2> note: usesection ASMTABLE1 0 000081C8 F7CFE5 variant 18Dh, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 837 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 837 ------------------ <2> note: usesection ASMTABLE1 0 000081CB FF endvariant === Switch to base=000000h -> "ASMTABLE2" 838 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 838 ------------------ <2> note: usesection ASMTABLE1 839 <2> mne JL ; ofs=443h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084DA 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 000084DC 4A4C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081CC 412C variant 07Ch, 68 === Switch to base=000000h -> "ASMTABLE2" 840 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 840 ------------------ <2> note: usesection ASMTABLE1 0 000081CE F7CF5F variant 18Ch, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 841 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 841 ------------------ <2> note: usesection ASMTABLE1 0 000081D1 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 842 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 842 ------------------ <2> note: usesection ASMTABLE1 843 <2> mne JLE ; ofs=449h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084DE 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 000084E0 4A4C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081D2 4238 variant 07Eh, 68 === Switch to base=000000h -> "ASMTABLE2" 844 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 844 ------------------ <2> note: usesection ASMTABLE1 0 000081D4 F7D06B variant 18Eh, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 845 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 845 ------------------ <2> note: usesection ASMTABLE1 0 000081D7 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 846 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 846 ------------------ <2> note: usesection ASMTABLE1 847 <2> mne JNA ; ofs=44Fh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 000084E5 4A4E41 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081D8 3E08 variant 076h, 68 === Switch to base=000000h -> "ASMTABLE2" 848 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 848 ------------------ <2> note: usesection ASMTABLE1 0 000081DA F7CC3B variant 186h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 849 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 849 ------------------ <2> note: usesection ASMTABLE1 0 000081DD FF endvariant === Switch to base=000000h -> "ASMTABLE2" 850 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 850 ------------------ <2> note: usesection ASMTABLE1 851 <2> mne JNAE ; ofs=455h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084E8 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 000084EA 4A4E4145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081DE 3BF0 variant 072h, 68 === Switch to base=000000h -> "ASMTABLE2" 852 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 852 ------------------ <2> note: usesection ASMTABLE1 0 000081E0 F7CA23 variant 182h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 853 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 853 ------------------ <2> note: usesection ASMTABLE1 0 000081E3 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 854 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 854 ------------------ <2> note: usesection ASMTABLE1 855 <2> mne JNB ; ofs=45Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 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 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 000084F0 4A4E42 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081E4 3C76 variant 073h, 68 === Switch to base=000000h -> "ASMTABLE2" 856 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 856 ------------------ <2> note: usesection ASMTABLE1 0 000081E6 F7CAA9 variant 183h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 857 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 857 ------------------ <2> note: usesection ASMTABLE1 0 000081E9 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 858 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 858 ------------------ <2> note: usesection ASMTABLE1 859 <2> mne JNBE ; ofs=461h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084F3 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 000084F5 4A4E4245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081EA 3E8E variant 077h, 68 === Switch to base=000000h -> "ASMTABLE2" 860 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 860 ------------------ <2> note: usesection ASMTABLE1 0 000081EC F7CCC1 variant 187h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 861 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 861 ------------------ <2> note: usesection ASMTABLE1 0 000081EF FF endvariant === Switch to base=000000h -> "ASMTABLE2" 862 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 862 ------------------ <2> note: usesection ASMTABLE1 863 <2> mne JNC ; ofs=467h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084F9 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 000084FB 4A4E43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081F0 3C76 variant 073h, 68 === Switch to base=000000h -> "ASMTABLE2" 864 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 864 ------------------ <2> note: usesection ASMTABLE1 0 000081F2 F7CAA9 variant 183h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 865 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 865 ------------------ <2> note: usesection ASMTABLE1 0 000081F5 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 866 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 866 ------------------ <2> note: usesection ASMTABLE1 867 <2> mne JNE ; ofs=46Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000084FE 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 00008500 4A4E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081F6 3D82 variant 075h, 68 === Switch to base=000000h -> "ASMTABLE2" 868 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 868 ------------------ <2> note: usesection ASMTABLE1 0 000081F8 F7CBB5 variant 185h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 869 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 869 ------------------ <2> note: usesection ASMTABLE1 0 000081FB FF endvariant === Switch to base=000000h -> "ASMTABLE2" 870 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 870 ------------------ <2> note: usesection ASMTABLE1 871 <2> mne JNG ; ofs=473h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008503 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 00008505 4A4E47 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000081FC 4238 variant 07Eh, 68 === Switch to base=000000h -> "ASMTABLE2" 872 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 872 ------------------ <2> note: usesection ASMTABLE1 0 000081FE F7D06B variant 18Eh, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 873 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 873 ------------------ <2> note: usesection ASMTABLE1 0 00008201 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 874 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 874 ------------------ <2> note: usesection ASMTABLE1 875 <2> mne JNGE ; ofs=479h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008508 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 0000850A 4A4E4745 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008202 412C variant 07Ch, 68 === Switch to base=000000h -> "ASMTABLE2" 876 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 876 ------------------ <2> note: usesection ASMTABLE1 0 00008204 F7CF5F variant 18Ch, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 877 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 877 ------------------ <2> note: usesection ASMTABLE1 0 00008207 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 878 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 878 ------------------ <2> note: usesection ASMTABLE1 879 <2> mne JNL ; ofs=47Fh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000850E 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 00008510 4A4E4C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008208 41B2 variant 07Dh, 68 === Switch to base=000000h -> "ASMTABLE2" 880 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 880 ------------------ <2> note: usesection ASMTABLE1 0 0000820A F7CFE5 variant 18Dh, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 881 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 881 ------------------ <2> note: usesection ASMTABLE1 0 0000820D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 882 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 882 ------------------ <2> note: usesection ASMTABLE1 883 <2> mne JNLE ; ofs=485h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008513 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 00008515 4A4E4C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000820E 42BE variant 07Fh, 68 === Switch to base=000000h -> "ASMTABLE2" 884 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 884 ------------------ <2> note: usesection ASMTABLE1 0 00008210 F7D0F1 variant 18Fh, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 885 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 885 ------------------ <2> note: usesection ASMTABLE1 0 00008213 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 886 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 886 ------------------ <2> note: usesection ASMTABLE1 887 <2> mne JNO ; ofs=48Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008519 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 0000851B 4A4E4F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008214 3B6A variant 071h, 68 === Switch to base=000000h -> "ASMTABLE2" 888 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 888 ------------------ <2> note: usesection ASMTABLE1 0 00008216 F7C99D variant 181h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 889 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 889 ------------------ <2> note: usesection ASMTABLE1 0 00008219 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 890 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 890 ------------------ <2> note: usesection ASMTABLE1 891 <2> mne JNP ; ofs=491h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000851E 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 00008520 4A4E50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000821A 40A6 variant 07Bh, 68 === Switch to base=000000h -> "ASMTABLE2" 892 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 892 ------------------ <2> note: usesection ASMTABLE1 0 0000821C F7CED9 variant 18Bh, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 893 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 893 ------------------ <2> note: usesection ASMTABLE1 0 0000821F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 894 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 894 ------------------ <2> note: usesection ASMTABLE1 895 <2> mne JNS ; ofs=497h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008523 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 00008525 4A4E53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008220 3F9A variant 079h, 68 === Switch to base=000000h -> "ASMTABLE2" 896 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 896 ------------------ <2> note: usesection ASMTABLE1 0 00008222 F7CDCD variant 189h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 897 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 897 ------------------ <2> note: usesection ASMTABLE1 0 00008225 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 898 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 898 ------------------ <2> note: usesection ASMTABLE1 899 <2> mne JNZ ; ofs=49Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008528 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 0000852A 4A4E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008226 3D82 variant 075h, 68 === Switch to base=000000h -> "ASMTABLE2" 900 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 900 ------------------ <2> note: usesection ASMTABLE1 0 00008228 F7CBB5 variant 185h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 901 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 901 ------------------ <2> note: usesection ASMTABLE1 0 0000822B FF endvariant === Switch to base=000000h -> "ASMTABLE2" 902 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 902 ------------------ <2> note: usesection ASMTABLE1 903 <2> mne JO ; ofs=4A3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000852D 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 0000852F 4A4F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000822C 3AE4 variant 070h, 68 === Switch to base=000000h -> "ASMTABLE2" 904 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 904 ------------------ <2> note: usesection ASMTABLE1 0 0000822E F7C917 variant 180h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 905 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 905 ------------------ <2> note: usesection ASMTABLE1 0 00008231 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 906 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 906 ------------------ <2> note: usesection ASMTABLE1 907 <2> mne JP ; ofs=4A9h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008531 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 00008533 4A50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008232 4020 variant 07Ah, 68 === Switch to base=000000h -> "ASMTABLE2" 908 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 908 ------------------ <2> note: usesection ASMTABLE1 0 00008234 F7CE53 variant 18Ah, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 909 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 909 ------------------ <2> note: usesection ASMTABLE1 0 00008237 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 910 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 910 ------------------ <2> note: usesection ASMTABLE1 911 <2> mne JPE ; ofs=4AFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008535 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 00008537 4A5045 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008238 4020 variant 07Ah, 68 === Switch to base=000000h -> "ASMTABLE2" 912 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 912 ------------------ <2> note: usesection ASMTABLE1 0 0000823A F7CE53 variant 18Ah, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 913 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 913 ------------------ <2> note: usesection ASMTABLE1 0 0000823D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 914 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 914 ------------------ <2> note: usesection ASMTABLE1 915 <2> mne JPO ; ofs=4B5h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000853A 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 0000853C 4A504F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000823E 40A6 variant 07Bh, 68 === Switch to base=000000h -> "ASMTABLE2" 916 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 916 ------------------ <2> note: usesection ASMTABLE1 0 00008240 F7CED9 variant 18Bh, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 917 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 917 ------------------ <2> note: usesection ASMTABLE1 0 00008243 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 918 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 918 ------------------ <2> note: usesection ASMTABLE1 919 <2> mne JS ; ofs=4BBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000853F 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 00008541 4A53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008244 3F14 variant 078h, 68 === Switch to base=000000h -> "ASMTABLE2" 920 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 920 ------------------ <2> note: usesection ASMTABLE1 0 00008246 F7CD47 variant 188h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 921 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 921 ------------------ <2> note: usesection ASMTABLE1 0 00008249 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 922 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 922 ------------------ <2> note: usesection ASMTABLE1 923 <2> mne JZ ; ofs=4C1h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008543 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 00008545 4A5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000824A 3CFC variant 074h, 68 === Switch to base=000000h -> "ASMTABLE2" 924 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 924 ------------------ <2> note: usesection ASMTABLE1 0 0000824C F7CB2F variant 184h, 23, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 925 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 925 ------------------ <2> note: usesection ASMTABLE1 0 0000824F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 926 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 926 ------------------ <2> note: usesection ASMTABLE1 927 <2> mne JMP ; ofs=4C7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008547 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 00008549 4A4D50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008250 7A97 variant 0EAh, 27 === Switch to base=000000h -> "ASMTABLE2" 928 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 928 ------------------ <2> note: usesection ASMTABLE1 0 00008252 7B46 variant 0EBh, 68 === Switch to base=000000h -> "ASMTABLE2" 929 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 929 ------------------ <2> note: usesection ASMTABLE1 0 00008254 7A0D variant 0E9h, 23 === Switch to base=000000h -> "ASMTABLE2" 930 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 930 ------------------ <2> note: usesection ASMTABLE1 0 00008256 F44CD7 variant AGRP(4,4), 127 === Switch to base=000000h -> "ASMTABLE2" 931 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 931 ------------------ <2> note: usesection ASMTABLE1 0 00008259 F44CFB variant AGRP(4,5), 29 === Switch to base=000000h -> "ASMTABLE2" 932 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 932 ------------------ <2> note: usesection ASMTABLE1 0 0000825C 7A95 variant 0EAh, 25 === Switch to base=000000h -> "ASMTABLE2" 933 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 933 ------------------ <2> note: usesection ASMTABLE1 0 0000825E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 934 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 934 ------------------ <2> note: usesection ASMTABLE1 935 <2> mne LAHF ; ofs=4D6h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000854C 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 0000854E 4C414846 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000825F 533A variant 09Fh, 0 === Switch to base=000000h -> "ASMTABLE2" 936 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 936 ------------------ <2> note: usesection ASMTABLE1 0 00008261 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 937 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 937 ------------------ <2> note: usesection ASMTABLE1 938 <2> mne LAR ; ofs=4D9h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008552 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 00008554 4C4152 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008262 F6871B variant 102h, 15, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 939 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 939 ------------------ <2> note: usesection ASMTABLE1 0 00008265 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 940 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 940 ------------------ <2> note: usesection ASMTABLE1 941 <2> mne LDS ; ofs=4DDh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008557 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 00008559 4C4453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008266 672C variant 0C5h, 14 === Switch to base=000000h -> "ASMTABLE2" 942 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 942 ------------------ <2> note: usesection ASMTABLE1 0 00008268 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 943 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 943 ------------------ <2> note: usesection ASMTABLE1 944 <2> mne LSS ; ofs=4E0h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000855C 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 0000855E 4C5353 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008269 F7E33A variant 1B2h, 14, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 945 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 945 ------------------ <2> note: usesection ASMTABLE1 0 0000826C FF endvariant === Switch to base=000000h -> "ASMTABLE2" 946 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 946 ------------------ <2> note: usesection ASMTABLE1 947 <2> mne LES ; ofs=4E4h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008561 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 00008563 4C4553 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000826D 66A6 variant 0C4h, 14 === Switch to base=000000h -> "ASMTABLE2" 948 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 948 ------------------ <2> note: usesection ASMTABLE1 0 0000826F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 949 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 949 ------------------ <2> note: usesection ASMTABLE1 950 <2> mne LFS ; ofs=4E7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008566 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 00008568 4C4653 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008270 F7E446 variant 1B4h, 14, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 951 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 951 ------------------ <2> note: usesection ASMTABLE1 0 00008273 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 952 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 952 ------------------ <2> note: usesection ASMTABLE1 953 <2> mne LGS ; ofs=4EBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000856B 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 0000856D 4C4753 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008274 F7E4CC variant 1B5h, 14, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 954 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 954 ------------------ <2> note: usesection ASMTABLE1 0 00008277 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 955 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 955 ------------------ <2> note: usesection ASMTABLE1 956 <2> mne LEA ; ofs=4EFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008570 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 00008572 4C4541 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008278 4A4B variant 08Dh, 125 === Switch to base=000000h -> "ASMTABLE2" 957 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 957 ------------------ <2> note: usesection ASMTABLE1 0 0000827A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 958 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 958 ------------------ <2> note: usesection ASMTABLE1 959 <2> mne LGDT ; ofs=4F6h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008575 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 00008577 4C474454 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000827B F6F45813 variant AGRP(7,2), 55, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 960 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 960 ------------------ <2> note: usesection ASMTABLE1 0 0000827F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 961 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 961 ------------------ <2> note: usesection ASMTABLE1 962 <2> mne LIDT ; ofs=4FBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000857B 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 0000857D 4C494454 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008280 F6F45899 variant AGRP(7,3), 55, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 963 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 963 ------------------ <2> note: usesection ASMTABLE1 0 00008284 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 964 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 964 ------------------ <2> note: usesection ASMTABLE1 965 <2> mne LLDT ; ofs=500h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008581 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 00008583 4C4C4454 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008285 F6F45C53 variant AGRP(8,2), 71, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 966 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 966 ------------------ <2> note: usesection ASMTABLE1 0 00008289 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 967 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 967 ------------------ <2> note: usesection ASMTABLE1 968 <2> mne LMSW ; ofs=505h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008587 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 00008589 4C4D5357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000828A F6F45A3B variant AGRP(7,6), 71, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 969 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 969 ------------------ <2> note: usesection ASMTABLE1 0 0000828E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 970 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 970 ------------------ <2> note: usesection ASMTABLE1 971 <2> mne LOCK, ASM_SPECIAL, 0F0h ; ofs=50Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 000099AF FFF0 db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000858D 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 0000858F 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008593 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 00008595 4C4F445342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008291 5A08 variant 0ACh, 0 === Switch to base=000000h -> "ASMTABLE2" 973 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 973 ------------------ <2> note: usesection ASMTABLE1 0 00008293 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 974 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 974 ------------------ <2> note: usesection ASMTABLE1 975 <2> mne LOOP ; ofs=521h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000859A 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 0000859C 4C4F4F50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008294 76CE variant 0E2h, 130 === Switch to base=000000h -> "ASMTABLE2" 976 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 976 ------------------ <2> note: usesection ASMTABLE1 0 00008296 7690 variant 0E2h, 68 === Switch to base=000000h -> "ASMTABLE2" 977 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 977 ------------------ <2> note: usesection ASMTABLE1 0 00008298 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 978 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 978 ------------------ <2> note: usesection ASMTABLE1 979 <2> mne LOOPZ ; ofs=526h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085A0 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 000085A2 4C4F4F505A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008299 7648 variant 0E1h, 130 === Switch to base=000000h -> "ASMTABLE2" 980 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 980 ------------------ <2> note: usesection ASMTABLE1 0 0000829B 760A variant 0E1h, 68 === Switch to base=000000h -> "ASMTABLE2" 981 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 981 ------------------ <2> note: usesection ASMTABLE1 0 0000829D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 982 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 982 ------------------ <2> note: usesection ASMTABLE1 983 <2> mne LOOPE ; ofs=52Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085A7 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 000085A9 4C4F4F5045 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000829E 7648 variant 0E1h, 130 === Switch to base=000000h -> "ASMTABLE2" 984 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 984 ------------------ <2> note: usesection ASMTABLE1 0 000082A0 760A variant 0E1h, 68 === Switch to base=000000h -> "ASMTABLE2" 985 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 985 ------------------ <2> note: usesection ASMTABLE1 0 000082A2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 986 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 986 ------------------ <2> note: usesection ASMTABLE1 987 <2> mne LOOPNZ ; ofs=530h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085AE 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 000085B0 4C4F4F504E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000082A3 75C2 variant 0E0h, 130 === Switch to base=000000h -> "ASMTABLE2" 988 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 988 ------------------ <2> note: usesection ASMTABLE1 0 000082A5 7584 variant 0E0h, 68 === Switch to base=000000h -> "ASMTABLE2" 989 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 989 ------------------ <2> note: usesection ASMTABLE1 0 000082A7 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 990 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 990 ------------------ <2> note: usesection ASMTABLE1 991 <2> mne LOOPNE ; ofs=535h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085B6 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 000085B8 4C4F4F504E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000082A8 75C2 variant 0E0h, 130 === Switch to base=000000h -> "ASMTABLE2" 992 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 992 ------------------ <2> note: usesection ASMTABLE1 0 000082AA 7584 variant 0E0h, 68 === Switch to base=000000h -> "ASMTABLE2" 993 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 993 ------------------ <2> note: usesection ASMTABLE1 0 000082AC FF endvariant === Switch to base=000000h -> "ASMTABLE2" 994 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 994 ------------------ <2> note: usesection ASMTABLE1 995 <2> mne LSL ; ofs=53Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085BE 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 000085C0 4C534C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000082AD F687A1 variant 103h, 15, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 996 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 996 ------------------ <2> note: usesection ASMTABLE1 0 000082B0 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 997 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 997 ------------------ <2> note: usesection ASMTABLE1 998 <2> mne LTR ; ofs=53Eh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085C3 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 000085C5 4C5452 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000082B1 F6F45CD9 variant AGRP(8,3), 71, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 999 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 999 ------------------ <2> note: usesection ASMTABLE1 0 000082B5 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1000 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1000 ------------------ <2> note: usesection ASMTABLE1 1001 <2> mne MOV ; ofs=543h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085C8 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 000085CA 4D4F56 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000082B6 540B variant 0A0h, 75 === Switch to base=000000h -> "ASMTABLE2" 1002 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1002 ------------------ <2> note: usesection ASMTABLE1 0 000082B8 5518 variant 0A2h, 76 === Switch to base=000000h -> "ASMTABLE2" 1003 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1003 ------------------ <2> note: usesection ASMTABLE1 0 000082BA 4739 variant 088h, 9 === Switch to base=000000h -> "ASMTABLE2" 1004 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1004 ------------------ <2> note: usesection ASMTABLE1 0 000082BC 4847 variant 08Ah, 11 === Switch to base=000000h -> "ASMTABLE2" 1005 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1005 ------------------ <2> note: usesection ASMTABLE1 0 000082BE 4991 variant 08Ch, 73 === Switch to base=000000h -> "ASMTABLE2" 1006 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1006 ------------------ <2> note: usesection ASMTABLE1 0 000082C0 4A9E variant 08Eh, 74 === Switch to base=000000h -> "ASMTABLE2" 1007 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1007 ------------------ <2> note: usesection ASMTABLE1 0 000082C2 5C6D variant 0B0h, 77 === Switch to base=000000h -> "ASMTABLE2" 1008 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1008 ------------------ <2> note: usesection ASMTABLE1 0 000082C4 609E variant 0B8h, 78 === Switch to base=000000h -> "ASMTABLE2" 1009 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1009 ------------------ <2> note: usesection ASMTABLE1 0 000082C6 F45F34 variant AGRP(9,0), 4 === Switch to base=000000h -> "ASMTABLE2" 1010 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1010 ------------------ <2> note: usesection ASMTABLE1 0 000082C9 F79732 variant 120h, 114, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1011 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1011 ------------------ <2> note: usesection ASMTABLE1 0 000082CC F7983F variant 122h, 115, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1012 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1012 ------------------ <2> note: usesection ASMTABLE1 0 000082CF F797BA variant 121h, 116, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1013 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1013 ------------------ <2> note: usesection ASMTABLE1 0 000082D2 F798C7 variant 123h, 117, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1014 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1014 ------------------ <2> note: usesection ASMTABLE1 0 000082D5 F7994E variant 124h, 118, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1015 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1015 ------------------ <2> note: usesection ASMTABLE1 0 000082D8 F79A5B variant 126h, 119, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1016 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1016 ------------------ <2> note: usesection ASMTABLE1 0 000082DB FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1017 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1017 ------------------ <2> note: usesection ASMTABLE1 1018 <2> mne MOVD ; ofs=569h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085CD 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 000085CF 4D4F5644 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000082DC F9C00C variant 16Eh, 120, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1019 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1019 ------------------ <2> note: usesection ASMTABLE1 0 000082DF F9C86D variant 17Eh, 121, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1020 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1020 ------------------ <2> note: usesection ASMTABLE1 0 000082E2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1021 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1021 ------------------ <2> note: usesection ASMTABLE1 1022 <2> mne MOVQ ; ofs=570h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085D3 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 000085D5 4D4F5651 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000082E3 F9C094 variant 16Fh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1023 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1023 ------------------ <2> note: usesection ASMTABLE1 0 000082E6 F9C8F5 variant 17Fh, 123, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1024 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1024 ------------------ <2> note: usesection ASMTABLE1 0 000082E9 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1025 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1025 ------------------ <2> note: usesection ASMTABLE1 1026 <2> mne PACKSSDW ; ofs=577h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085D9 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 000085DB 5041434B53534457 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000082EA F9BE7C variant 16Bh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1027 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1027 ------------------ <2> note: usesection ASMTABLE1 0 000082ED FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1028 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1028 ------------------ <2> note: usesection ASMTABLE1 1029 <2> mne PACKSSWB ; ofs=57Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085E3 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 000085E5 5041434B53535742 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000082EE F9BA4C variant 163h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1030 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1030 ------------------ <2> note: usesection ASMTABLE1 0 000082F1 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1031 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1031 ------------------ <2> note: usesection ASMTABLE1 1032 <2> mne PACKUSWB ; ofs=57Fh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085ED 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 000085EF 5041434B55535742 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000082F2 F9BC64 variant 167h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1033 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1033 ------------------ <2> note: usesection ASMTABLE1 0 000082F5 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1034 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1034 ------------------ <2> note: usesection ASMTABLE1 1035 <2> mne PADDB ; ofs=583h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085F7 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 000085F9 5041444442 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000082F6 F9F41662 variant 1FCh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1036 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1036 ------------------ <2> note: usesection ASMTABLE1 0 000082FA FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1037 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1037 ------------------ <2> note: usesection ASMTABLE1 1038 <2> mne PADDW ; ofs=588h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000085FE 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 00008600 5041444457 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000082FB F9F416E8 variant 1FDh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1039 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1039 ------------------ <2> note: usesection ASMTABLE1 0 000082FF FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1040 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1040 ------------------ <2> note: usesection ASMTABLE1 1041 <2> mne PADDD ; ofs=58Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008605 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 00008607 5041444444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008300 F9F4176E variant 1FEh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1042 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1042 ------------------ <2> note: usesection ASMTABLE1 0 00008304 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1043 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1043 ------------------ <2> note: usesection ASMTABLE1 1044 <2> mne PADDSB ; ofs=592h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000860C 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 0000860E 504144445342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008305 F9F40E02 variant 1ECh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1045 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1045 ------------------ <2> note: usesection ASMTABLE1 0 00008309 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1046 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1046 ------------------ <2> note: usesection ASMTABLE1 1047 <2> mne PADDSW ; ofs=597h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008614 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 00008616 504144445357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000830A F9F40E88 variant 1EDh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1048 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1048 ------------------ <2> note: usesection ASMTABLE1 0 0000830E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1049 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1049 ------------------ <2> note: usesection ASMTABLE1 1050 <2> mne PADDUSB ; ofs=59Ch 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000861C 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 0000861E 50414444555342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000830F F9F405A2 variant 1DCh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1051 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1051 ------------------ <2> note: usesection ASMTABLE1 0 00008313 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1052 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1052 ------------------ <2> note: usesection ASMTABLE1 1053 <2> mne PADDUSW ; ofs=5A1h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008625 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 00008627 50414444555357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008314 F9F40628 variant 1DDh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1054 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1054 ------------------ <2> note: usesection ASMTABLE1 0 00008318 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1055 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1055 ------------------ <2> note: usesection ASMTABLE1 1056 <2> mne PAND ; ofs=5A6h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000862E 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 00008630 50414E44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008319 F9F4051C variant 1DBh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1057 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1057 ------------------ <2> note: usesection ASMTABLE1 0 0000831D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1058 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1058 ------------------ <2> note: usesection ASMTABLE1 1059 <2> mne PANDN ; ofs=5ABh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008634 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 00008636 50414E444E db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000831E F9F40734 variant 1DFh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1060 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1060 ------------------ <2> note: usesection ASMTABLE1 0 00008322 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1061 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1061 ------------------ <2> note: usesection ASMTABLE1 1062 <2> mne PCMPEQB ; ofs=5B0h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000863B 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 0000863D 50434D50455142 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008323 F9C332 variant 174h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1063 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1063 ------------------ <2> note: usesection ASMTABLE1 0 00008326 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1064 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1064 ------------------ <2> note: usesection ASMTABLE1 1065 <2> mne PCMPEQW ; ofs=5B4h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008644 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 00008646 50434D50455157 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008327 F9C3B8 variant 175h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1066 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1066 ------------------ <2> note: usesection ASMTABLE1 0 0000832A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1067 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1067 ------------------ <2> note: usesection ASMTABLE1 1068 <2> mne PCMPEQD ; ofs=5B8h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000864D 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 0000864F 50434D50455144 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000832B F9C43E variant 176h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1069 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1069 ------------------ <2> note: usesection ASMTABLE1 0 0000832E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1070 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1070 ------------------ <2> note: usesection ASMTABLE1 1071 <2> mne PCMPGTB ; ofs=5BCh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008656 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 00008658 50434D50475442 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000832F F9BAD2 variant 164h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1072 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1072 ------------------ <2> note: usesection ASMTABLE1 0 00008332 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1073 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1073 ------------------ <2> note: usesection ASMTABLE1 1074 <2> mne PCMPGTW ; ofs=5C0h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000865F 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 00008661 50434D50475457 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008333 F9BB58 variant 165h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1075 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1075 ------------------ <2> note: usesection ASMTABLE1 0 00008336 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1076 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1076 ------------------ <2> note: usesection ASMTABLE1 1077 <2> mne PCMPGTD ; ofs=5C4h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008668 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 0000866A 50434D50475444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008337 F9BBDE variant 166h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1078 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1078 ------------------ <2> note: usesection ASMTABLE1 0 0000833A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1079 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1079 ------------------ <2> note: usesection ASMTABLE1 1080 <2> mne PMADDWD ; ofs=5C8h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008671 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 00008673 504D4144445744 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000833B F9F412B8 variant 1F5h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1081 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1081 ------------------ <2> note: usesection ASMTABLE1 0 0000833F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1082 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1082 ------------------ <2> note: usesection ASMTABLE1 1083 <2> mne PMULHW ; ofs=5CDh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000867A 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 0000867C 504D554C4857 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008340 F9F40A58 variant 1E5h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1084 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1084 ------------------ <2> note: usesection ASMTABLE1 0 00008344 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1085 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1085 ------------------ <2> note: usesection ASMTABLE1 1086 <2> mne PMULLW ; ofs=5D2h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008682 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 00008684 504D554C4C57 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008345 F9F401F8 variant 1D5h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1087 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1087 ------------------ <2> note: usesection ASMTABLE1 0 00008349 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1088 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1088 ------------------ <2> note: usesection ASMTABLE1 1089 <2> mne POR ; ofs=5D7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000868A 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 0000868C 504F52 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000834A F9F40D7C variant 1EBh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1090 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1090 ------------------ <2> note: usesection ASMTABLE1 0 0000834E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1091 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1091 ------------------ <2> note: usesection ASMTABLE1 1092 <2> mne PSLLW ; ofs=5DCh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000868F 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 00008691 50534C4C57 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000834F F9F410A0 variant 1F1h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1093 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1093 ------------------ <2> note: usesection ASMTABLE1 0 00008353 F9F46700 variant AGRP(10,6), 124, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1094 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1094 ------------------ <2> note: usesection ASMTABLE1 0 00008357 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1095 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1095 ------------------ <2> note: usesection ASMTABLE1 1096 <2> mne PSLLD ; ofs=5E5h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008696 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 00008698 50534C4C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008358 F9F41126 variant 1F2h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1097 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1097 ------------------ <2> note: usesection ASMTABLE1 0 0000835C F9F46B30 variant AGRP(11,6), 124, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1098 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1098 ------------------ <2> note: usesection ASMTABLE1 0 00008360 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1099 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1099 ------------------ <2> note: usesection ASMTABLE1 1100 <2> mne PSLLQ ; ofs=5EEh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000869D 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 0000869F 50534C4C51 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008361 F9F411AC variant 1F3h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1101 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1101 ------------------ <2> note: usesection ASMTABLE1 0 00008365 F9F46F60 variant AGRP(12,6), 124, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1102 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1102 ------------------ <2> note: usesection ASMTABLE1 0 00008369 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1103 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1103 ------------------ <2> note: usesection ASMTABLE1 1104 <2> mne PSRAW ; ofs=5F7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086A4 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 000086A6 5053524157 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000836A F9F40840 variant 1E1h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1105 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1105 ------------------ <2> note: usesection ASMTABLE1 0 0000836E F9F465F4 variant AGRP(10,4), 124, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1106 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1106 ------------------ <2> note: usesection ASMTABLE1 0 00008372 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1107 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1107 ------------------ <2> note: usesection ASMTABLE1 1108 <2> mne PSRAD ; ofs=600h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086AB 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 000086AD 5053524144 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008373 F9F408C6 variant 1E2h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1109 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1109 ------------------ <2> note: usesection ASMTABLE1 0 00008377 F9F46A24 variant AGRP(11,4), 124, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1110 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1110 ------------------ <2> note: usesection ASMTABLE1 0 0000837B FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1111 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1111 ------------------ <2> note: usesection ASMTABLE1 1112 <2> mne PSRLW ; ofs=609h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086B2 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 000086B4 5053524C57 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000837C F9F3E0 variant 1D1h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1113 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1113 ------------------ <2> note: usesection ASMTABLE1 0 0000837F F9F464E8 variant AGRP(10,2), 124, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1114 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1114 ------------------ <2> note: usesection ASMTABLE1 0 00008383 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1115 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1115 ------------------ <2> note: usesection ASMTABLE1 1116 <2> mne PSRLD ; ofs=611h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086B9 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 000086BB 5053524C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008384 F9F40066 variant 1D2h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1117 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1117 ------------------ <2> note: usesection ASMTABLE1 0 00008388 F9F46918 variant AGRP(11,2), 124, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1118 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1118 ------------------ <2> note: usesection ASMTABLE1 0 0000838C FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1119 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1119 ------------------ <2> note: usesection ASMTABLE1 1120 <2> mne PSRLQ ; ofs=61Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086C0 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 000086C2 5053524C51 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000838D F9F400EC variant 1D3h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1121 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1121 ------------------ <2> note: usesection ASMTABLE1 0 00008391 F9F46D48 variant AGRP(12,2), 124, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1122 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1122 ------------------ <2> note: usesection ASMTABLE1 0 00008395 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1123 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1123 ------------------ <2> note: usesection ASMTABLE1 1124 <2> mne PSUBB ; ofs=623h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086C7 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 000086C9 5053554242 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008396 F9F4144A variant 1F8h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1125 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1125 ------------------ <2> note: usesection ASMTABLE1 0 0000839A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1126 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1126 ------------------ <2> note: usesection ASMTABLE1 1127 <2> mne PSUBW ; ofs=628h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086CE 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 000086D0 5053554257 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000839B F9F414D0 variant 1F9h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1128 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1128 ------------------ <2> note: usesection ASMTABLE1 0 0000839F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1129 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1129 ------------------ <2> note: usesection ASMTABLE1 1130 <2> mne PSUBD ; ofs=62Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086D5 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 000086D7 5053554244 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083A0 F9F41556 variant 1FAh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1131 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1131 ------------------ <2> note: usesection ASMTABLE1 0 000083A4 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1132 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1132 ------------------ <2> note: usesection ASMTABLE1 1133 <2> mne PSUBSB ; ofs=632h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086DC 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 000086DE 505355425342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083A5 F9F40BEA variant 1E8h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1134 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1134 ------------------ <2> note: usesection ASMTABLE1 0 000083A9 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1135 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1135 ------------------ <2> note: usesection ASMTABLE1 1136 <2> mne PSUBSW ; ofs=637h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086E4 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 000086E6 505355425357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083AA F9F40C70 variant 1E9h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1137 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1137 ------------------ <2> note: usesection ASMTABLE1 0 000083AE FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1138 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1138 ------------------ <2> note: usesection ASMTABLE1 1139 <2> mne PSUBUSB ; ofs=63Ch 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086EC 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 000086EE 50535542555342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083AF F9F4038A variant 1D8h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1140 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1140 ------------------ <2> note: usesection ASMTABLE1 0 000083B3 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1141 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1141 ------------------ <2> note: usesection ASMTABLE1 1142 <2> mne PSUBUSW ; ofs=641h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086F5 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 000086F7 50535542555357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083B4 F9F40410 variant 1D9h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1143 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1143 ------------------ <2> note: usesection ASMTABLE1 0 000083B8 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1144 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1144 ------------------ <2> note: usesection ASMTABLE1 1145 <2> mne PUNPCKHBW ; ofs=646h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000086FE 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 00008700 50554E50434B484257 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083B9 F9BCEA variant 168h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1146 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1146 ------------------ <2> note: usesection ASMTABLE1 0 000083BC FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1147 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1147 ------------------ <2> note: usesection ASMTABLE1 1148 <2> mne PUNPCKHWD ; ofs=64Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008709 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 0000870B 50554E50434B485744 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083BD F9BD70 variant 169h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1149 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1149 ------------------ <2> note: usesection ASMTABLE1 0 000083C0 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1150 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1150 ------------------ <2> note: usesection ASMTABLE1 1151 <2> mne PUNPCKHDQ ; ofs=64Eh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008714 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 00008716 50554E50434B484451 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083C1 F9BDF6 variant 16Ah, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1152 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1152 ------------------ <2> note: usesection ASMTABLE1 0 000083C4 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1153 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1153 ------------------ <2> note: usesection ASMTABLE1 1154 <2> mne PUNPCKLBW ; ofs=652h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000871F 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 00008721 50554E50434B4C4257 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083C5 F9B8BA variant 160h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1155 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1155 ------------------ <2> note: usesection ASMTABLE1 0 000083C8 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1156 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1156 ------------------ <2> note: usesection ASMTABLE1 1157 <2> mne PUNPCKLWD ; ofs=656h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000872A 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 0000872C 50554E50434B4C5744 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083C9 F9B940 variant 161h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1158 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1158 ------------------ <2> note: usesection ASMTABLE1 0 000083CC FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1159 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1159 ------------------ <2> note: usesection ASMTABLE1 1160 <2> mne PUNPCKLDQ ; ofs=65Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008735 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 00008737 50554E50434B4C4451 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083CD F9B9C6 variant 162h, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1161 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1161 ------------------ <2> note: usesection ASMTABLE1 0 000083D0 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1162 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1162 ------------------ <2> note: usesection ASMTABLE1 1163 <2> mne PXOR ; ofs=65Eh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008740 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 00008742 50584F52 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083D1 F9F40F94 variant 1EFh, 122, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1164 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1164 ------------------ <2> note: usesection ASMTABLE1 0 000083D5 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1165 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1165 ------------------ <2> note: usesection ASMTABLE1 1166 <2> mne MOVSB ; ofs=663h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008746 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 00008748 4D4F565342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083D6 55D8 variant 0A4h, 0 === Switch to base=000000h -> "ASMTABLE2" 1167 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1167 ------------------ <2> note: usesection ASMTABLE1 0 000083D8 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1168 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1168 ------------------ <2> note: usesection ASMTABLE1 1169 <2> mne MOVSX ; ofs=669h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000874D 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 0000874F 4D4F565358 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083D9 F7E9C3 variant 1BEh, 79, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1170 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1170 ------------------ <2> note: usesection ASMTABLE1 0 000083DC F7EA4A variant 1BFh, 80, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1171 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1171 ------------------ <2> note: usesection ASMTABLE1 0 000083DF FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1172 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1172 ------------------ <2> note: usesection ASMTABLE1 1173 <2> mne MOVZX ; ofs=670h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008754 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 00008756 4D4F565A58 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083E0 F7E593 variant 1B6h, 79, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1174 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1174 ------------------ <2> note: usesection ASMTABLE1 0 000083E3 F7E61A variant 1B7h, 80, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1175 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1175 ------------------ <2> note: usesection ASMTABLE1 0 000083E6 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1176 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1176 ------------------ <2> note: usesection ASMTABLE1 1177 <2> mne MUL ; ofs=677h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000875B 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 0000875D 4D554C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083E7 F454DB variant AGRP(6,4), 35 === Switch to base=000000h -> "ASMTABLE2" 1178 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1178 ------------------ <2> note: usesection ASMTABLE1 0 000083EA FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1179 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1179 ------------------ <2> note: usesection ASMTABLE1 1180 <2> mne NEG ; ofs=67Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008760 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 00008762 4E4547 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083EB FBF45454 variant AGRP(6,3), 34, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1181 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1181 ------------------ <2> note: usesection ASMTABLE1 0 000083EF FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1182 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1182 ------------------ <2> note: usesection ASMTABLE1 1183 <2> mne NOP ; ofs=680h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008765 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 00008767 4E4F50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083F0 4B60 variant 090h, 0 === Switch to base=000000h -> "ASMTABLE2" 1184 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1184 ------------------ <2> note: usesection ASMTABLE1 0 000083F2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1185 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1185 ------------------ <2> note: usesection ASMTABLE1 1186 <2> mne NOT ; ofs=683h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000876A 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 0000876C 4E4F54 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083F3 FBF453CE variant AGRP(6,2), 34, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1187 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1187 ------------------ <2> note: usesection ASMTABLE1 0 000083F7 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1188 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1188 ------------------ <2> note: usesection ASMTABLE1 1189 <2> mne OR ; ofs=688h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000876F 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 00008771 4F52 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000083F8 FBF43E3B variant AGRP(1,1), 5, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1190 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1190 ------------------ <2> note: usesection ASMTABLE1 0 000083FC 0649 variant 00Ch, 1 === Switch to base=000000h -> "ASMTABLE2" 1191 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1191 ------------------ <2> note: usesection ASMTABLE1 0 000083FE FBF44268 variant AGRP(2,1), 2, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1192 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1192 ------------------ <2> note: usesection ASMTABLE1 0 00008402 FB0437 variant 008h, 7, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1193 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1193 ------------------ <2> note: usesection ASMTABLE1 0 00008405 0546 variant 00Ah, 10 === Switch to base=000000h -> "ASMTABLE2" 1194 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1194 ------------------ <2> note: usesection ASMTABLE1 0 00008407 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1195 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1195 ------------------ <2> note: usesection ASMTABLE1 1196 <2> mne ORG, ASM_SPECIAL ; ofs=698h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009B28 FF db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008773 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 00008775 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008778 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 0000877A 4F5554 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008409 78B5 variant 0E6h, 81 === Switch to base=000000h -> "ASMTABLE2" 1198 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1198 ------------------ <2> note: usesection ASMTABLE1 0 0000840B 7CE6 variant 0EEh, 82 === Switch to base=000000h -> "ASMTABLE2" 1199 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1199 ------------------ <2> note: usesection ASMTABLE1 0 0000840D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1200 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1200 ------------------ <2> note: usesection ASMTABLE1 1201 <2> mne OUTSB ; ofs=69Fh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000877D 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 0000877F 4F55545342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000840E F53994 variant 06Eh, 0, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1202 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1202 ------------------ <2> note: usesection ASMTABLE1 0 00008411 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1203 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1203 ------------------ <2> note: usesection ASMTABLE1 1204 <2> mne POP ; ofs=6A7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008784 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 00008786 504F50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008412 2E36 variant 058h, 38 === Switch to base=000000h -> "ASMTABLE2" 1205 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1205 ------------------ <2> note: usesection ASMTABLE1 0 00008414 F47043 variant AGRP(13,0), 83 === Switch to base=000000h -> "ASMTABLE2" 1206 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1206 ------------------ <2> note: usesection ASMTABLE1 0 00008417 10A9 variant 01Fh, 111 === Switch to base=000000h -> "ASMTABLE2" 1207 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1207 ------------------ <2> note: usesection ASMTABLE1 0 00008419 0417 variant 007h, 109 === Switch to base=000000h -> "ASMTABLE2" 1208 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1208 ------------------ <2> note: usesection ASMTABLE1 0 0000841B 0C78 variant 017h, 110 === Switch to base=000000h -> "ASMTABLE2" 1209 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1209 ------------------ <2> note: usesection ASMTABLE1 0 0000841D F7DAB6 variant 1A1h, 112, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1210 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1210 ------------------ <2> note: usesection ASMTABLE1 0 00008420 F7DEE7 variant 1A9h, 113, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1211 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1211 ------------------ <2> note: usesection ASMTABLE1 0 00008423 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1212 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1212 ------------------ <2> note: usesection ASMTABLE1 1213 <2> mne PUSH ; ofs=6C0h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008789 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 0000878B 50555348 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008424 2A04 variant 050h, 36 === Switch to base=000000h -> "ASMTABLE2" 1214 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1214 ------------------ <2> note: usesection ASMTABLE1 0 00008426 F44DA9 variant AGRP(4,6), 69 === Switch to base=000000h -> "ASMTABLE2" 1215 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1215 ------------------ <2> note: usesection ASMTABLE1 0 00008429 F537D1 variant 06Ah, 85, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1216 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1216 ------------------ <2> note: usesection ASMTABLE1 0 0000842C F536C4 variant 068h, 84, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1217 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1217 ------------------ <2> note: usesection ASMTABLE1 0 0000842F 07B7 variant 00Eh, 99 === Switch to base=000000h -> "ASMTABLE2" 1218 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1218 ------------------ <2> note: usesection ASMTABLE1 0 00008431 0BE9 variant 016h, 101 === Switch to base=000000h -> "ASMTABLE2" 1219 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1219 ------------------ <2> note: usesection ASMTABLE1 0 00008433 101B variant 01Eh, 103 === Switch to base=000000h -> "ASMTABLE2" 1220 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1220 ------------------ <2> note: usesection ASMTABLE1 0 00008435 0385 variant 006h, 97 === Switch to base=000000h -> "ASMTABLE2" 1221 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1221 ------------------ <2> note: usesection ASMTABLE1 0 00008437 F7DA29 variant 1A0h, 105, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1222 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1222 ------------------ <2> note: usesection ASMTABLE1 0 0000843A F7DE5B variant 1A8h, 107, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1223 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1223 ------------------ <2> note: usesection ASMTABLE1 0 0000843D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1224 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1224 ------------------ <2> note: usesection ASMTABLE1 1225 <2> mne RCL ; ofs=6E8h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000878F 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 00008791 52434C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000843E F47582 variant AGRP(14,2), 86 === Switch to base=000000h -> "ASMTABLE2" 1226 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1226 ------------------ <2> note: usesection ASMTABLE1 0 00008441 F479B3 variant AGRP(15,2), 87 === Switch to base=000000h -> "ASMTABLE2" 1227 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1227 ------------------ <2> note: usesection ASMTABLE1 0 00008444 F5F47DE4 variant AGRP(16,2), 88, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1228 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1228 ------------------ <2> note: usesection ASMTABLE1 0 00008448 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1229 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1229 ------------------ <2> note: usesection ASMTABLE1 1230 <2> mne RCR ; ofs=6F3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008794 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 00008796 524352 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008449 F47608 variant AGRP(14,3), 86 === Switch to base=000000h -> "ASMTABLE2" 1231 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1231 ------------------ <2> note: usesection ASMTABLE1 0 0000844C F47A39 variant AGRP(15,3), 87 === Switch to base=000000h -> "ASMTABLE2" 1232 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1232 ------------------ <2> note: usesection ASMTABLE1 0 0000844F F5F47E6A variant AGRP(16,3), 88, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1233 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1233 ------------------ <2> note: usesection ASMTABLE1 0 00008453 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1234 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1234 ------------------ <2> note: usesection ASMTABLE1 1235 <2> mne ROL ; ofs=6FEh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008799 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 0000879B 524F4C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008454 F47476 variant AGRP(14,0), 86 === Switch to base=000000h -> "ASMTABLE2" 1236 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1236 ------------------ <2> note: usesection ASMTABLE1 0 00008457 F478A7 variant AGRP(15,0), 87 === Switch to base=000000h -> "ASMTABLE2" 1237 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1237 ------------------ <2> note: usesection ASMTABLE1 0 0000845A F5F47CD8 variant AGRP(16,0), 88, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1238 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1238 ------------------ <2> note: usesection ASMTABLE1 0 0000845E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1239 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1239 ------------------ <2> note: usesection ASMTABLE1 1240 <2> mne ROR ; ofs=709h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000879E 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 000087A0 524F52 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000845F F474FC variant AGRP(14,1), 86 === Switch to base=000000h -> "ASMTABLE2" 1241 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1241 ------------------ <2> note: usesection ASMTABLE1 0 00008462 F4792D variant AGRP(15,1), 87 === Switch to base=000000h -> "ASMTABLE2" 1242 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1242 ------------------ <2> note: usesection ASMTABLE1 0 00008465 F5F47D5E variant AGRP(16,1), 88, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1243 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1243 ------------------ <2> note: usesection ASMTABLE1 0 00008469 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1244 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1244 ------------------ <2> note: usesection ASMTABLE1 1245 <2> mne RDMSR ; ofs=714h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087A3 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 000087A5 52444D5352 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000846A F9A02C variant 132h, 0, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1246 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1246 ------------------ <2> note: usesection ASMTABLE1 0 0000846D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1247 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1247 ------------------ <2> note: usesection ASMTABLE1 1248 <2> mne RDTSC ; ofs=718h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087AA 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 000087AC 5244545343 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000846E F99FA6 variant 131h, 0, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1249 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1249 ------------------ <2> note: usesection ASMTABLE1 0 00008471 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1250 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1250 ------------------ <2> note: usesection ASMTABLE1 1251 <2> mne REP, ASM_SPECIAL, 0F3h ; ofs=71Ch 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009B92 FFF3 db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087B1 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 000087B3 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009B94 FFF3 db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087B6 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 000087B8 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009B96 FFF2 db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087BC 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 000087BE 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009B98 FFF3 db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087C3 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 000087C5 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009B9A FFF2 db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087C9 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 000087CB 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087D0 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 000087D2 52534D db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000847C F9DEFC variant 1AAh, 0, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1257 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1257 ------------------ <2> note: usesection ASMTABLE1 0 0000847F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1258 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1258 ------------------ <2> note: usesection ASMTABLE1 1259 <2> mne SAHF ; ofs=739h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087D5 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 000087D7 53414846 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008480 52B4 variant 09Eh, 0 === Switch to base=000000h -> "ASMTABLE2" 1260 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1260 ------------------ <2> note: usesection ASMTABLE1 0 00008482 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1261 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1261 ------------------ <2> note: usesection ASMTABLE1 1262 <2> mne SAL ; ofs=73Ch 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087DB 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 000087DD 53414C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008483 F4768E variant AGRP(14,4), 86 === Switch to base=000000h -> "ASMTABLE2" 1263 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1263 ------------------ <2> note: usesection ASMTABLE1 0 00008486 F47ABF variant AGRP(15,4), 87 === Switch to base=000000h -> "ASMTABLE2" 1264 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1264 ------------------ <2> note: usesection ASMTABLE1 0 00008489 F5F47EF0 variant AGRP(16,4), 88, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1265 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1265 ------------------ <2> note: usesection ASMTABLE1 0 0000848D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1266 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1266 ------------------ <2> note: usesection ASMTABLE1 1267 <2> mne SAR ; ofs=747h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087E0 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 000087E2 534152 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000848E F47820 variant AGRP(14,7), 86 === Switch to base=000000h -> "ASMTABLE2" 1268 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1268 ------------------ <2> note: usesection ASMTABLE1 0 00008491 F47C51 variant AGRP(15,7), 87 === Switch to base=000000h -> "ASMTABLE2" 1269 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1269 ------------------ <2> note: usesection ASMTABLE1 0 00008494 F5F48082 variant AGRP(16,7), 88, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1270 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1270 ------------------ <2> note: usesection ASMTABLE1 0 00008498 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1271 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1271 ------------------ <2> note: usesection ASMTABLE1 1272 <2> mne SEG ; ofs=752h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087E5 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 000087E7 534547 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008499 1446 variant 026h, 98 === Switch to base=000000h -> "ASMTABLE2" 1273 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1273 ------------------ <2> note: usesection ASMTABLE1 0 0000849B 1878 variant 02Eh, 100 === Switch to base=000000h -> "ASMTABLE2" 1274 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1274 ------------------ <2> note: usesection ASMTABLE1 0 0000849D 1CAA variant 036h, 102 === Switch to base=000000h -> "ASMTABLE2" 1275 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1275 ------------------ <2> note: usesection ASMTABLE1 0 0000849F 20DC variant 03Eh, 104 === Switch to base=000000h -> "ASMTABLE2" 1276 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1276 ------------------ <2> note: usesection ASMTABLE1 0 000084A1 F734C2 variant 064h, 106, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1277 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1277 ------------------ <2> note: usesection ASMTABLE1 0 000084A4 F7354A variant 065h, 108, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1278 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1278 ------------------ <2> note: usesection ASMTABLE1 0 000084A7 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1279 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1279 ------------------ <2> note: usesection ASMTABLE1 1280 <2> mne ES, ASM_SPECIAL, 026h ; ofs=761h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009BC8 FF26 db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087EA 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 000087EC 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009BCA FF2E db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087EE 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 000087F0 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009BCC FF36 db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087F2 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 000087F4 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009BCE FF3E db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087F6 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 000087F8 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009BD0 FFF764 db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087FA 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 000087FC 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009BD3 FFF765 db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000087FE 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 00008800 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008802 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 00008804 53484C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084B6 F4768E variant AGRP(14,4), 86 === Switch to base=000000h -> "ASMTABLE2" 1287 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1287 ------------------ <2> note: usesection ASMTABLE1 0 000084B9 F47ABF variant AGRP(15,4), 87 === Switch to base=000000h -> "ASMTABLE2" 1288 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1288 ------------------ <2> note: usesection ASMTABLE1 0 000084BC F5F47EF0 variant AGRP(16,4), 88, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1289 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1289 ------------------ <2> note: usesection ASMTABLE1 0 000084C0 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1290 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1290 ------------------ <2> note: usesection ASMTABLE1 1291 <2> mne SHR ; ofs=77Ah 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008807 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 00008809 534852 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084C1 F47714 variant AGRP(14,5), 86 === Switch to base=000000h -> "ASMTABLE2" 1292 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1292 ------------------ <2> note: usesection ASMTABLE1 0 000084C4 F47B45 variant AGRP(15,5), 87 === Switch to base=000000h -> "ASMTABLE2" 1293 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1293 ------------------ <2> note: usesection ASMTABLE1 0 000084C7 F5F47F76 variant AGRP(16,5), 88, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1294 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1294 ------------------ <2> note: usesection ASMTABLE1 0 000084CB FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1295 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1295 ------------------ <2> note: usesection ASMTABLE1 1296 <2> mne SBB ; ofs=785h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000880C 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 0000880E 534242 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084CC FBF43F47 variant AGRP(1,3), 5, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1297 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1297 ------------------ <2> note: usesection ASMTABLE1 0 000084D0 0EA9 variant 01Ch, 1 === Switch to base=000000h -> "ASMTABLE2" 1298 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1298 ------------------ <2> note: usesection ASMTABLE1 0 000084D2 FBF44374 variant AGRP(2,3), 2, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1299 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1299 ------------------ <2> note: usesection ASMTABLE1 0 000084D6 FB0C97 variant 018h, 7, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1300 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1300 ------------------ <2> note: usesection ASMTABLE1 0 000084D9 0DA6 variant 01Ah, 10 === Switch to base=000000h -> "ASMTABLE2" 1301 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1301 ------------------ <2> note: usesection ASMTABLE1 0 000084DB FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1302 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1302 ------------------ <2> note: usesection ASMTABLE1 1303 <2> mne SCASB ; ofs=795h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008811 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 00008813 5343415342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084DC 5B14 variant 0AEh, 0 === Switch to base=000000h -> "ASMTABLE2" 1304 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1304 ------------------ <2> note: usesection ASMTABLE1 0 000084DE FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1305 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1305 ------------------ <2> note: usesection ASMTABLE1 1306 <2> mne SETA ; ofs=79Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008818 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 0000881A 53455441 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084DF F7D566 variant 197h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1307 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1307 ------------------ <2> note: usesection ASMTABLE1 0 000084E2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1308 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1308 ------------------ <2> note: usesection ASMTABLE1 1309 <2> mne SETAE ; ofs=79Fh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000881E 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 00008820 5345544145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084E3 F7D34E variant 193h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1310 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1310 ------------------ <2> note: usesection ASMTABLE1 0 000084E6 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1311 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1311 ------------------ <2> note: usesection ASMTABLE1 1312 <2> mne SETB ; ofs=7A3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008825 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 00008827 53455442 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084E7 F7D2C8 variant 192h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1313 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1313 ------------------ <2> note: usesection ASMTABLE1 0 000084EA FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1314 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1314 ------------------ <2> note: usesection ASMTABLE1 1315 <2> mne SETBE ; ofs=7A7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000882B 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 0000882D 5345544245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084EB F7D4E0 variant 196h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1316 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1316 ------------------ <2> note: usesection ASMTABLE1 0 000084EE FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1317 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1317 ------------------ <2> note: usesection ASMTABLE1 1318 <2> mne SETC ; ofs=7ABh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008832 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 00008834 53455443 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084EF F7D2C8 variant 192h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1319 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1319 ------------------ <2> note: usesection ASMTABLE1 0 000084F2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1320 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1320 ------------------ <2> note: usesection ASMTABLE1 1321 <2> mne SETE ; ofs=7AFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008838 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 0000883A 53455445 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084F3 F7D3D4 variant 194h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1322 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1322 ------------------ <2> note: usesection ASMTABLE1 0 000084F6 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1323 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1323 ------------------ <2> note: usesection ASMTABLE1 1324 <2> mne SETG ; ofs=7B3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000883E 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 00008840 53455447 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084F7 F7D996 variant 19Fh, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1325 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1325 ------------------ <2> note: usesection ASMTABLE1 0 000084FA FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1326 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1326 ------------------ <2> note: usesection ASMTABLE1 1327 <2> mne SETGE ; ofs=7B7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008844 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 00008846 5345544745 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084FB F7D88A variant 19Dh, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1328 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1328 ------------------ <2> note: usesection ASMTABLE1 0 000084FE FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1329 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1329 ------------------ <2> note: usesection ASMTABLE1 1330 <2> mne SETL ; ofs=7BBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000884B 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 0000884D 5345544C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000084FF F7D804 variant 19Ch, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1331 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1331 ------------------ <2> note: usesection ASMTABLE1 0 00008502 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1332 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1332 ------------------ <2> note: usesection ASMTABLE1 1333 <2> mne SETLE ; ofs=7BFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008851 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 00008853 5345544C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008503 F7D910 variant 19Eh, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1334 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1334 ------------------ <2> note: usesection ASMTABLE1 0 00008506 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1335 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1335 ------------------ <2> note: usesection ASMTABLE1 1336 <2> mne SETNA ; ofs=7C3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008858 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 0000885A 5345544E41 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008507 F7D4E0 variant 196h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1337 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1337 ------------------ <2> note: usesection ASMTABLE1 0 0000850A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1338 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1338 ------------------ <2> note: usesection ASMTABLE1 1339 <2> mne SETNAE ; ofs=7C7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000885F 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 00008861 5345544E4145 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000850B F7D2C8 variant 192h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1340 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1340 ------------------ <2> note: usesection ASMTABLE1 0 0000850E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1341 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1341 ------------------ <2> note: usesection ASMTABLE1 1342 <2> mne SETNB ; ofs=7CBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008867 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 00008869 5345544E42 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000850F F7D34E variant 193h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1343 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1343 ------------------ <2> note: usesection ASMTABLE1 0 00008512 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1344 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1344 ------------------ <2> note: usesection ASMTABLE1 1345 <2> mne SETNBE ; ofs=7CFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000886E 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 00008870 5345544E4245 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008513 F7D566 variant 197h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1346 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1346 ------------------ <2> note: usesection ASMTABLE1 0 00008516 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1347 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1347 ------------------ <2> note: usesection ASMTABLE1 1348 <2> mne SETNC ; ofs=7D3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008876 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 00008878 5345544E43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008517 F7D34E variant 193h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1349 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1349 ------------------ <2> note: usesection ASMTABLE1 0 0000851A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1350 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1350 ------------------ <2> note: usesection ASMTABLE1 1351 <2> mne SETNE ; ofs=7D7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000887D 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 0000887F 5345544E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000851B F7D45A variant 195h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1352 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1352 ------------------ <2> note: usesection ASMTABLE1 0 0000851E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1353 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1353 ------------------ <2> note: usesection ASMTABLE1 1354 <2> mne SETNG ; ofs=7DBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008884 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 00008886 5345544E47 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000851F F7D910 variant 19Eh, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1355 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1355 ------------------ <2> note: usesection ASMTABLE1 0 00008522 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1356 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1356 ------------------ <2> note: usesection ASMTABLE1 1357 <2> mne SETNGE ; ofs=7DFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000888B 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 0000888D 5345544E4745 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008523 F7D804 variant 19Ch, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1358 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1358 ------------------ <2> note: usesection ASMTABLE1 0 00008526 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1359 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1359 ------------------ <2> note: usesection ASMTABLE1 1360 <2> mne SETNL ; ofs=7E3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008893 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 00008895 5345544E4C db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008527 F7D88A variant 19Dh, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1361 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1361 ------------------ <2> note: usesection ASMTABLE1 0 0000852A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1362 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1362 ------------------ <2> note: usesection ASMTABLE1 1363 <2> mne SETNLE ; ofs=7E7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000889A 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 0000889C 5345544E4C45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000852B F7D996 variant 19Fh, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1364 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1364 ------------------ <2> note: usesection ASMTABLE1 0 0000852E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1365 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1365 ------------------ <2> note: usesection ASMTABLE1 1366 <2> mne SETNO ; ofs=7EBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088A2 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 000088A4 5345544E4F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000852F F7D242 variant 191h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1367 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1367 ------------------ <2> note: usesection ASMTABLE1 0 00008532 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1368 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1368 ------------------ <2> note: usesection ASMTABLE1 1369 <2> mne SETNP ; ofs=7EFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088A9 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 000088AB 5345544E50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008533 F7D77E variant 19Bh, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1370 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1370 ------------------ <2> note: usesection ASMTABLE1 0 00008536 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1371 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1371 ------------------ <2> note: usesection ASMTABLE1 1372 <2> mne SETNS ; ofs=7F3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088B0 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 000088B2 5345544E53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008537 F7D672 variant 199h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1373 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1373 ------------------ <2> note: usesection ASMTABLE1 0 0000853A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1374 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1374 ------------------ <2> note: usesection ASMTABLE1 1375 <2> mne SETNZ ; ofs=7F7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088B7 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 000088B9 5345544E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000853B F7D45A variant 195h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1376 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1376 ------------------ <2> note: usesection ASMTABLE1 0 0000853E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1377 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1377 ------------------ <2> note: usesection ASMTABLE1 1378 <2> mne SETO ; ofs=7FBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088BE 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 000088C0 5345544F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000853F F7D1BC variant 190h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1379 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1379 ------------------ <2> note: usesection ASMTABLE1 0 00008542 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1380 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1380 ------------------ <2> note: usesection ASMTABLE1 1381 <2> mne SETP ; ofs=7FFh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088C4 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 000088C6 53455450 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008543 F7D6F8 variant 19Ah, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1382 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1382 ------------------ <2> note: usesection ASMTABLE1 0 00008546 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1383 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1383 ------------------ <2> note: usesection ASMTABLE1 1384 <2> mne SETPE ; ofs=803h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088CA 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 000088CC 5345545045 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008547 F7D6F8 variant 19Ah, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1385 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1385 ------------------ <2> note: usesection ASMTABLE1 0 0000854A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1386 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1386 ------------------ <2> note: usesection ASMTABLE1 1387 <2> mne SETPO ; ofs=807h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088D1 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 000088D3 534554504F db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000854B F7D77E variant 19Bh, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1388 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1388 ------------------ <2> note: usesection ASMTABLE1 0 0000854E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1389 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1389 ------------------ <2> note: usesection ASMTABLE1 1390 <2> mne SETS ; ofs=80Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088D8 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 000088DA 53455453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000854F F7D5EC variant 198h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1391 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1391 ------------------ <2> note: usesection ASMTABLE1 0 00008552 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1392 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1392 ------------------ <2> note: usesection ASMTABLE1 1393 <2> mne SETZ ; ofs=80Fh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088DE 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 000088E0 5345545A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008553 F7D3D4 variant 194h, 92, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1394 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1394 ------------------ <2> note: usesection ASMTABLE1 0 00008556 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1395 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1395 ------------------ <2> note: usesection ASMTABLE1 1396 <2> mne SGDT ; ofs=813h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088E4 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 000088E6 53474454 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008557 F6F45709 variant AGRP(7,0), 57, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 1397 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1397 ------------------ <2> note: usesection ASMTABLE1 0 0000855B FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1398 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1398 ------------------ <2> note: usesection ASMTABLE1 1399 <2> mne SIDT ; ofs=818h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088EA 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 000088EC 53494454 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000855C F6F4578F variant AGRP(7,1), 57, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 1400 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1400 ------------------ <2> note: usesection ASMTABLE1 0 00008560 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1401 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1401 ------------------ <2> note: usesection ASMTABLE1 1402 <2> mne SHLD ; ofs=81Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088F0 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 000088F2 53484C44 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008561 F7DC35 variant 1A4h, 93, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1403 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1403 ------------------ <2> note: usesection ASMTABLE1 0 00008564 F7DCBC variant 1A5h, 94, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1404 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1404 ------------------ <2> note: usesection ASMTABLE1 0 00008567 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1405 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1405 ------------------ <2> note: usesection ASMTABLE1 1406 <2> mne SHRD ; ofs=824h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088F6 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 000088F8 53485244 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008568 F7E065 variant 1ACh, 93, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1407 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1407 ------------------ <2> note: usesection ASMTABLE1 0 0000856B F7E0EC variant 1ADh, 94, ASM_MACH3 === Switch to base=000000h -> "ASMTABLE2" 1408 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1408 ------------------ <2> note: usesection ASMTABLE1 0 0000856E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1409 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1409 ------------------ <2> note: usesection ASMTABLE1 1410 <2> mne SLDT ; ofs=82Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000088FC 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 000088FE 534C4454 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000856F F6F45B46 variant AGRP(8,0), 70, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 1411 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1411 ------------------ <2> note: usesection ASMTABLE1 0 00008573 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1412 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1412 ------------------ <2> note: usesection ASMTABLE1 1413 <2> mne SMSW ; ofs=830h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008902 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 00008904 534D5357 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008574 F6F4592E variant AGRP(7,4), 70, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 1414 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1414 ------------------ <2> note: usesection ASMTABLE1 0 00008578 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1415 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1415 ------------------ <2> note: usesection ASMTABLE1 1416 <2> mne STC ; ofs=835h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008908 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 0000890A 535443 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008579 8256 variant 0F9h, 0 === Switch to base=000000h -> "ASMTABLE2" 1417 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1417 ------------------ <2> note: usesection ASMTABLE1 0 0000857B FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1418 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1418 ------------------ <2> note: usesection ASMTABLE1 1419 <2> mne STD ; ofs=838h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000890D 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 0000890F 535444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000857C 846E variant 0FDh, 0 === Switch to base=000000h -> "ASMTABLE2" 1420 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1420 ------------------ <2> note: usesection ASMTABLE1 0 0000857E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1421 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1421 ------------------ <2> note: usesection ASMTABLE1 1422 <2> mne STI ; ofs=83Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008912 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 00008914 535449 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000857F 8362 variant 0FBh, 0 === Switch to base=000000h -> "ASMTABLE2" 1423 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1423 ------------------ <2> note: usesection ASMTABLE1 0 00008581 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1424 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1424 ------------------ <2> note: usesection ASMTABLE1 1425 <2> mne STOSB ; ofs=83Eh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008917 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 00008919 53544F5342 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008582 58FC variant 0AAh, 0 === Switch to base=000000h -> "ASMTABLE2" 1426 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1426 ------------------ <2> note: usesection ASMTABLE1 0 00008584 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1427 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1427 ------------------ <2> note: usesection ASMTABLE1 1428 <2> mne STR ; ofs=844h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000891E 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 00008920 535452 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008585 F6F45BCE variant AGRP(8,1), 72, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 1429 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1429 ------------------ <2> note: usesection ASMTABLE1 0 00008589 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1430 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1430 ------------------ <2> note: usesection ASMTABLE1 1431 <2> mne SUB ; ofs=849h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008923 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 00008925 535542 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000858A FBF44053 variant AGRP(1,5), 5, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1432 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1432 ------------------ <2> note: usesection ASMTABLE1 0 0000858E 1709 variant 02Ch, 1 === Switch to base=000000h -> "ASMTABLE2" 1433 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1433 ------------------ <2> note: usesection ASMTABLE1 0 00008590 FBF44480 variant AGRP(2,5), 2, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1434 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1434 ------------------ <2> note: usesection ASMTABLE1 0 00008594 FB14F7 variant 028h, 7, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1435 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1435 ------------------ <2> note: usesection ASMTABLE1 0 00008597 1606 variant 02Ah, 10 === Switch to base=000000h -> "ASMTABLE2" 1436 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1436 ------------------ <2> note: usesection ASMTABLE1 0 00008599 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1437 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1437 ------------------ <2> note: usesection ASMTABLE1 1438 <2> mne SALC ; ofs=859h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008928 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 0000892A 53414C43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000859A F67004 variant 0D6h, 0, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 1439 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1439 ------------------ <2> note: usesection ASMTABLE1 0 0000859D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1440 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1440 ------------------ <2> note: usesection ASMTABLE1 1441 <2> mne SETALC ; ofs=85Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000892E 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 00008930 534554414C43 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000859E F67004 variant 0D6h, 0, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 1442 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1442 ------------------ <2> note: usesection ASMTABLE1 0 000085A1 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1443 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1443 ------------------ <2> note: usesection ASMTABLE1 1444 <2> mne TEST ; ofs=861h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008936 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 00008938 54455354 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085A2 57F1 variant 0A8h, 1 === Switch to base=000000h -> "ASMTABLE2" 1445 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1445 ------------------ <2> note: usesection ASMTABLE1 0 000085A4 F452A3 variant AGRP(6,0), 3 === Switch to base=000000h -> "ASMTABLE2" 1446 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1446 ------------------ <2> note: usesection ASMTABLE1 0 000085A7 4520 variant 084h, 8 === Switch to base=000000h -> "ASMTABLE2" 1447 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1447 ------------------ <2> note: usesection ASMTABLE1 0 000085A9 4522 variant 084h, 10 === Switch to base=000000h -> "ASMTABLE2" 1448 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1448 ------------------ <2> note: usesection ASMTABLE1 0 000085AB FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1449 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1449 ------------------ <2> note: usesection ASMTABLE1 1450 <2> mne UD0 ; ofs=86Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000893C 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 0000893E 554430 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085AC F5F4177A variant 1FFh, 0, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1451 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1451 ------------------ <2> note: usesection ASMTABLE1 0 000085B0 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1452 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1452 ------------------ <2> note: usesection ASMTABLE1 1453 <2> mne UD1 ; ofs=870h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008941 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 00008943 554431 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085B1 F5E6D6 variant 1B9h, 0, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1454 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1454 ------------------ <2> note: usesection ASMTABLE1 0 000085B4 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1455 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1455 ------------------ <2> note: usesection ASMTABLE1 1456 <2> mne UD2 ; ofs=874h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008946 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 00008948 554432 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085B5 F58BC2 variant 10Bh, 0, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1457 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1457 ------------------ <2> note: usesection ASMTABLE1 0 000085B8 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1458 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1458 ------------------ <2> note: usesection ASMTABLE1 1459 <2> mne VERR ; ofs=878h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000894B 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 0000894D 56455252 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085B9 F6F45D5F variant AGRP(8,4), 71, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 1460 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1460 ------------------ <2> note: usesection ASMTABLE1 0 000085BD FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1461 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1461 ------------------ <2> note: usesection ASMTABLE1 1462 <2> mne VERW ; ofs=87Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008951 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 00008953 56455257 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085BE F6F45DE5 variant AGRP(8,5), 71, ASM_MACH2 === Switch to base=000000h -> "ASMTABLE2" 1463 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1463 ------------------ <2> note: usesection ASMTABLE1 0 000085C2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1464 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1464 ------------------ <2> note: usesection ASMTABLE1 1465 <2> mne WAIT ; ofs=882h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008957 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 00008959 57414954 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085C3 5122 variant 09Bh, 0 === Switch to base=000000h -> "ASMTABLE2" 1466 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1466 ------------------ <2> note: usesection ASMTABLE1 0 000085C5 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1467 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1467 ------------------ <2> note: usesection ASMTABLE1 1468 <2> mne WBINVD ; ofs=885h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000895D 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 0000895F 5742494E5644 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085C6 F88AB6 variant 109h, 0, ASM_MACH4 === Switch to base=000000h -> "ASMTABLE2" 1469 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1469 ------------------ <2> note: usesection ASMTABLE1 0 000085C9 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1470 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1470 ------------------ <2> note: usesection ASMTABLE1 1471 <2> mne WRMSR ; ofs=889h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008965 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 00008967 57524D5352 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085CA F99F20 variant 130h, 0, ASM_MACH5 === Switch to base=000000h -> "ASMTABLE2" 1472 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1472 ------------------ <2> note: usesection ASMTABLE1 0 000085CD FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1473 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1473 ------------------ <2> note: usesection ASMTABLE1 1474 <2> mne XADD ; ofs=88Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000896C 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 0000896E 58414444 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085CE FBF8EA87 variant 1C0h, 7, ASM_LOCKABLE, ASM_MACH4 === Switch to base=000000h -> "ASMTABLE2" 1475 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1475 ------------------ <2> note: usesection ASMTABLE1 0 000085D2 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1476 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1476 ------------------ <2> note: usesection ASMTABLE1 1477 <2> mne XCHG ; ofs=892h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008972 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 00008974 58434847 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085D3 4BBF variant 090h, 95 === Switch to base=000000h -> "ASMTABLE2" 1478 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1478 ------------------ <2> note: usesection ASMTABLE1 0 000085D5 4BC0 variant 090h, 96 === Switch to base=000000h -> "ASMTABLE2" 1479 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1479 ------------------ <2> note: usesection ASMTABLE1 0 000085D7 FB4630 variant 086h, 12, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1480 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1480 ------------------ <2> note: usesection ASMTABLE1 0 000085DA FB462B variant 086h, 7, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1481 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1481 ------------------ <2> note: usesection ASMTABLE1 0 000085DD FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1482 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1482 ------------------ <2> note: usesection ASMTABLE1 1483 <2> mne XLAT ; ofs=89Dh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008978 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 0000897A 584C4154 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085DE 708A variant 0D7h, 0 === Switch to base=000000h -> "ASMTABLE2" 1484 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1484 ------------------ <2> note: usesection ASMTABLE1 0 000085E0 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1485 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1485 ------------------ <2> note: usesection ASMTABLE1 1486 <2> mne XLATB ; ofs=8A0h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000897E 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 00008980 584C415442 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085E1 708A variant 0D7h, 0 === Switch to base=000000h -> "ASMTABLE2" 1487 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1487 ------------------ <2> note: usesection ASMTABLE1 0 000085E3 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1488 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1488 ------------------ <2> note: usesection ASMTABLE1 1489 <2> mne XOR ; ofs=8A3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008985 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 00008987 584F52 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085E4 FBF440D9 variant AGRP(1,6), 5, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1490 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1490 ------------------ <2> note: usesection ASMTABLE1 0 000085E8 1B39 variant 034h, 1 === Switch to base=000000h -> "ASMTABLE2" 1491 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1491 ------------------ <2> note: usesection ASMTABLE1 0 000085EA FBF44506 variant AGRP(2,6), 2, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1492 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1492 ------------------ <2> note: usesection ASMTABLE1 0 000085EE FB1927 variant 030h, 7, ASM_LOCKABLE === Switch to base=000000h -> "ASMTABLE2" 1493 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1493 ------------------ <2> note: usesection ASMTABLE1 0 000085F1 1A36 variant 032h, 10 === Switch to base=000000h -> "ASMTABLE2" 1494 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1494 ------------------ <2> note: usesection ASMTABLE1 0 000085F3 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1495 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1495 ------------------ <2> note: usesection ASMTABLE1 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000898A 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 0000898C 4C4F4F50 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085F4 7690 variant 0E2h, 68 === Switch to base=000000h -> "ASMTABLE2" 1504 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1504 ------------------ <2> note: usesection ASMTABLE1 0 000085F6 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1505 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1505 ------------------ <2> note: usesection ASMTABLE1 1506 <2> mne LOOPZ ; ofs=515h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008990 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 00008992 4C4F4F505A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085F7 760A variant 0E1h, 68 === Switch to base=000000h -> "ASMTABLE2" 1507 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1507 ------------------ <2> note: usesection ASMTABLE1 0 000085F9 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1508 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1508 ------------------ <2> note: usesection ASMTABLE1 1509 <2> mne LOOPE ; ofs=518h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008997 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 00008999 4C4F4F5045 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085FA 760A variant 0E1h, 68 === Switch to base=000000h -> "ASMTABLE2" 1510 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1510 ------------------ <2> note: usesection ASMTABLE1 0 000085FC FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1511 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1511 ------------------ <2> note: usesection ASMTABLE1 1512 <2> mne LOOPNZ ; ofs=51Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 0000899E 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 000089A0 4C4F4F504E5A db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 000085FD 7584 variant 0E0h, 68 === Switch to base=000000h -> "ASMTABLE2" 1513 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1513 ------------------ <2> note: usesection ASMTABLE1 0 000085FF FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1514 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1514 ------------------ <2> note: usesection ASMTABLE1 1515 <2> mne LOOPNE ; ofs=51Eh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089A6 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 000089A8 4C4F4F504E45 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008600 7584 variant 0E0h, 68 === Switch to base=000000h -> "ASMTABLE2" 1516 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1516 ------------------ <2> note: usesection ASMTABLE1 0 00008602 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1517 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1517 ------------------ <2> note: usesection ASMTABLE1 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089AE 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 000089B0 454E544552 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008603 F568D7 variant 0C8h, 39, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1526 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1526 ------------------ <2> note: usesection ASMTABLE1 0 00008606 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1527 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1527 ------------------ <2> note: usesection ASMTABLE1 1528 <2> mne FLDENV ; ofs=2BBh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089B5 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 000089B7 464C44454E56 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008607 F4297D variant 221h, 55 === Switch to base=000000h -> "ASMTABLE2" 1529 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1529 ------------------ <2> note: usesection ASMTABLE1 0 0000860A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1530 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1530 ------------------ <2> note: usesection ASMTABLE1 1531 <2> mne FRSTOR ; ofs=2F3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089BD 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 000089BF 465253544F52 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000860B F42B95 variant 225h, 55 === Switch to base=000000h -> "ASMTABLE2" 1532 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1532 ------------------ <2> note: usesection ASMTABLE1 0 0000860E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1533 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1533 ------------------ <2> note: usesection ASMTABLE1 1534 <2> mne FSAVE, ASM_WAIT ; ofs=2F7h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009D2F FE db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089C5 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 000089C7 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089CC 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 000089CE 464E53415645 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008610 F433F7 variant 235h, 57 === Switch to base=000000h -> "ASMTABLE2" 1536 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1536 ------------------ <2> note: usesection ASMTABLE1 0 00008613 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1537 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1537 ------------------ <2> note: usesection ASMTABLE1 1538 <2> mne FSTENV, ASM_WAIT ; ofs=330h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 0 00009D34 FE db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089D4 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 000089D6 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089DC 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 000089DE 464E5354454E56 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008615 F431DF variant 231h, 57 === Switch to base=000000h -> "ASMTABLE2" 1540 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1540 ------------------ <2> note: usesection ASMTABLE1 0 00008618 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1541 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1541 ------------------ <2> note: usesection ASMTABLE1 1542 <2> mne IRET ; ofs=40Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089E5 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 000089E7 49524554 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008619 6CDF variant 0CFh, 133 === Switch to base=000000h -> "ASMTABLE2" 1543 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1543 ------------------ <2> note: usesection ASMTABLE1 0 0000861B FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1544 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1544 ------------------ <2> note: usesection ASMTABLE1 1545 <2> mne LEAVE ; ofs=4F2h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089EB 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 000089ED 4C45415645 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000861C F569BB variant 0C9h, 133, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1546 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1546 ------------------ <2> note: usesection ASMTABLE1 0 0000861F FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1547 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1547 ------------------ <2> note: usesection ASMTABLE1 1548 <2> mne POPA ; ofs=6B9h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089F2 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 000089F4 504F5041 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008620 F5334B variant 061h, 133, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1549 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1549 ------------------ <2> note: usesection ASMTABLE1 0 00008623 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1550 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1550 ------------------ <2> note: usesection ASMTABLE1 1551 <2> mne POPF ; ofs=6BDh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089F8 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 000089FA 504F5046 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008624 52B1 variant 09Dh, 131 === Switch to base=000000h -> "ASMTABLE2" 1552 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1552 ------------------ <2> note: usesection ASMTABLE1 0 00008626 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1553 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1553 ------------------ <2> note: usesection ASMTABLE1 1554 <2> mne PUSH ; ofs=6DAh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 000089FE 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 00008A00 50555348 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008627 F537D1 variant 06Ah, 85, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1555 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1555 ------------------ <2> note: usesection ASMTABLE1 0 0000862A F536C4 variant 068h, 84, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1556 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1556 ------------------ <2> note: usesection ASMTABLE1 0 0000862D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1557 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1557 ------------------ <2> note: usesection ASMTABLE1 1558 <2> mne PUSHA ; ofs=6E1h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008A04 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 00008A06 5055534841 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000862E F532C5 variant 060h, 133, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1559 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1559 ------------------ <2> note: usesection ASMTABLE1 0 00008631 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1560 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1560 ------------------ <2> note: usesection ASMTABLE1 1561 <2> mne PUSHF ; ofs=6E5h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008A0B 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 00008A0D 5055534846 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008632 522C variant 09Ch, 132 === Switch to base=000000h -> "ASMTABLE2" 1562 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1562 ------------------ <2> note: usesection ASMTABLE1 0 00008634 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1563 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1563 ------------------ <2> note: usesection ASMTABLE1 1564 <2> mne RETN ; ofs=726h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008A12 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 00008A14 5245544E db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008635 6695 variant 0C3h, 131 === Switch to base=000000h -> "ASMTABLE2" 1565 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1565 ------------------ <2> note: usesection ASMTABLE1 0 00008637 65E5 variant 0C2h, 89 === Switch to base=000000h -> "ASMTABLE2" 1566 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1566 ------------------ <2> note: usesection ASMTABLE1 0 00008639 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1567 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1567 ------------------ <2> note: usesection ASMTABLE1 1568 <2> mne RET ; ofs=72Bh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008A18 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 00008A1A 524554 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000863A 6695 variant 0C3h, 131 === Switch to base=000000h -> "ASMTABLE2" 1569 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1569 ------------------ <2> note: usesection ASMTABLE1 0 0000863C 65E5 variant 0C2h, 89 === Switch to base=000000h -> "ASMTABLE2" 1570 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1570 ------------------ <2> note: usesection ASMTABLE1 0 0000863E FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1571 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1571 ------------------ <2> note: usesection ASMTABLE1 1572 <2> mne RETF ; ofs=730h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008A1D 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 00008A1F 52455446 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000863F 6AC7 variant 0CBh, 133 === Switch to base=000000h -> "ASMTABLE2" 1573 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1573 ------------------ <2> note: usesection ASMTABLE1 0 00008641 6A17 variant 0CAh, 91 === Switch to base=000000h -> "ASMTABLE2" 1574 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1574 ------------------ <2> note: usesection ASMTABLE1 0 00008643 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1575 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1575 ------------------ <2> note: usesection ASMTABLE1 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 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008A23 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 00008A25 434D5053 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008644 576A variant 0A7h, 0 === Switch to base=000000h -> "ASMTABLE2" 1583 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1583 ------------------ <2> note: usesection ASMTABLE1 0 00008646 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1584 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1584 ------------------ <2> note: usesection ASMTABLE1 1585 <2> mne INS ; ofs=3E4h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008A29 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 00008A2B 494E53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008647 F5390E variant 06Dh, 0, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1586 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1586 ------------------ <2> note: usesection ASMTABLE1 0 0000864A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1587 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1587 ------------------ <2> note: usesection ASMTABLE1 1588 <2> mne LODS ; ofs=50Fh 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008A2E 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 00008A30 4C4F4453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000864B 5A8E variant 0ADh, 0 === Switch to base=000000h -> "ASMTABLE2" 1589 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1589 ------------------ <2> note: usesection ASMTABLE1 0 0000864D FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1590 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1590 ------------------ <2> note: usesection ASMTABLE1 1591 <2> mne MOVS ; ofs=666h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008A34 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 00008A36 4D4F5653 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 0000864E 565E variant 0A5h, 0 === Switch to base=000000h -> "ASMTABLE2" 1592 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1592 ------------------ <2> note: usesection ASMTABLE1 0 00008650 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1593 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1593 ------------------ <2> note: usesection ASMTABLE1 1594 <2> mne OUTS ; ofs=6A3h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008A3A 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 00008A3C 4F555453 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008651 F53A1A variant 06Fh, 0, ASM_MACH1 === Switch to base=000000h -> "ASMTABLE2" 1595 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1595 ------------------ <2> note: usesection ASMTABLE1 0 00008654 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1596 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1596 ------------------ <2> note: usesection ASMTABLE1 1597 <2> mne SCAS ; ofs=798h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008A40 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 00008A42 53434153 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008655 5B9A variant 0AFh, 0 === Switch to base=000000h -> "ASMTABLE2" 1598 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1598 ------------------ <2> note: usesection ASMTABLE1 0 00008657 FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1599 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1599 ------------------ <2> note: usesection ASMTABLE1 1600 <2> mne STOS ; ofs=841h 87 <3> %push 88 <3> usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE2" 88 ------------------ <3> note: usesection ASMTABLE2 89 <3> %assign %$currofs $ - asmtab 90 <3> %ifnempty %2 91 <3> db %2 92 <3> %endif 93 <3> usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 93 ------------------ <3> note: usesection ASMTABLE1 94 <3> %defstr %$string %1 95 <3> %strlen %$string_size %$string 96 <3> %if %$string_size > 15 97 <3> %error Mnemonic %1 is too long! 98 <3> %endif 0 00008A46 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 00008A48 53544F53 db %$string 105 <3> %pop 106 <3> %define MNCURRENT %1%[MNSUFFIX] 0 00008658 5982 variant 0ABh, 0 === Switch to base=000000h -> "ASMTABLE2" 1601 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1601 ------------------ <2> note: usesection ASMTABLE1 0 0000865A FF endvariant === Switch to base=000000h -> "ASMTABLE2" 1602 ------------------ <2> note: usesection ASMTABLE2 === Switch to base=000000h -> "ASMTABLE1" 1602 ------------------ <2> note: usesection ASMTABLE1 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 00008A4C 00 align 8, db 0 1611 <2> optypes label byte 0 00008A50 131316160D0D6D79 db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(61),OT(6D) ; 00 - 07 (main opcode part) 0 00008A58 131316160D0D6F02 db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(63), 002h ; 08 - 0F 0 00008A60 131316160D0D717A db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(65),OT(6E) ; 10 - 17 0 00008A68 131316160D0D737B db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(67),OT(6F) ; 18 - 1F 0 00008A70 131316160D0D0A0C db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 20 - 27 0 00008A78 131316160D0D0A0C db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 28 - 2F 0 00008A80 131316160D0D0A0C db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 30 - 37 0 00008A88 141416160D0D0A0C db OT(08),OT(08),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 38 - 3F 0 00008A90 3131313131313131 db OT(25),OT(25),OT(25),OT(25),OT(25),OT(25),OT(25),OT(25) ; 40 - 47 0 00008A98 3131313131313131 db OT(25),OT(25),OT(25),OT(25),OT(25),OT(25),OT(25),OT(25) ; 48 - 4F 0 00008AA0 3030303030303030 db OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24) ; 50 - 57 0 00008AA8 3232323232323232 db OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26) ; 58 - 5F 0 00008AB0 91918C190A0A0A0A db OT(85),OT(85),OT(80),OT(0D), 00Ah, 00Ah, 00Ah, 00Ah ; 60 - 67 0 00008AB8 604961470C0C0C0C db OT(54),OT(3D),OT(55),OT(3B),OT(00),OT(00),OT(00),OT(00) ; 68 - 6F 0 00008AC0 5050505050505050 db OT(44),OT(44),OT(44),OT(44),OT(44),OT(44),OT(44),OT(44) ; 70 - 77 0 00008AC8 5050505050505050 db OT(44),OT(44),OT(44),OT(44),OT(44),OT(44),OT(44),OT(44) ; 78 - 7F 0 00008AD0 0404040414141818 db 004h, 004h, 004h, 004h,OT(08),OT(08),OT(0C),OT(0C) ; 80 - 87 0 00008AD8 1515171755895604 db OT(09),OT(09),OT(0B),OT(0B),OT(49),OT(7D),OT(4A), 004h ; 88 - 8F 0 00008AE0 0C6B6B6B6B6B6B6B db OT(00),OT(5F),OT(5F),OT(5F),OT(5F),OT(5F),OT(5F),OT(5F) ; 90 - 97 0 00008AE8 0C0C240C908F0C0C db OT(00),OT(00),OT(18),OT(00),OT(84),OT(83),OT(00),OT(00) ; 98 - 9F 0 00008AF0 575758580C0C0C0C db OT(4B),OT(4B),OT(4C),OT(4C),OT(00),OT(00),OT(00),OT(00) ; A0 - A7 0 00008AF8 0D0D0C0C0C0C0C0C db OT(01),OT(01),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; A8 - AF 0 00008B00 5959595959595959 db OT(4D),OT(4D),OT(4D),OT(4D),OT(4D),OT(4D),OT(4D),OT(4D) ; B0 - B7 0 00008B08 5A5A5A5A5A5A5A5A db OT(4E),OT(4E),OT(4E),OT(4E),OT(4E),OT(4E),OT(4E),OT(4E) ; B8 - BF 0 00008B10 0404658F1A1A0404 db 004h, 004h,OT(59),OT(83),OT(0E),OT(0E), 004h, 004h ; C0 - C7 0 00008B18 33916791918D9191 db OT(27),OT(85),OT(5B),OT(85),OT(85),OT(81),OT(85),OT(85) ; C8 - CF 0 00008B20 040404044E4E0C0C db 004h, 004h, 004h, 004h,OT(42),OT(42),OT(00),OT(00) ; D0 - D7 0 00008B28 0606060606060606 db 006h, 006h, 006h, 006h, 006h, 006h, 006h, 006h ; D8 - DF 0 00008B30 4F4F4F504B4B5D5D db OT(43),OT(43),OT(43),OT(44),OT(3F),OT(3F),OT(51),OT(51) ; E0 - E7 0 00008B38 222325504C4C5E5E db OT(16),OT(17),OT(19),OT(44),OT(40),OT(40),OT(52),OT(52) ; E8 - EF 0 00008B40 0A910A0A0C0C0404 db 00Ah,OT(85), 00Ah, 00Ah,OT(00),OT(00), 004h, 004h ; F0 - F7 0 00008B48 0C0C0C0C0C0C0404 db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 004h, 004h ; F8 - FF 0 00008B50 0E0E0E0E0E0E0E0F db OT(02),OT(02),OT(02),OT(02),OT(02),OT(02),OT(02),OT(03) ; 100 - 107 (Intel group 1) 0 00008B58 1111111111111112 db OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(06) ; 108 - 10F 0 00008B60 6262626262626262 db OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56) ; 110 - 117 (Intel group 2) 0 00008B68 6363636363636363 db OT(57),OT(57),OT(57),OT(57),OT(57),OT(57),OT(57),OT(57) ; 118 - 11F 0 00008B70 6464646464646464 db OT(58),OT(58),OT(58),OT(58),OT(58),OT(58),OT(58),OT(58) ; 120 - 127 (Intel group 2a) 0 00008B78 0F0F2E2E2F2F2F2F db OT(03),OT(03),OT(22),OT(22),OT(23),OT(23),OT(23),OT(23) ; 128 - 12F (Intel group 3) 0 00008B80 2D2D8A288B295100 db OT(21),OT(21),OT(7E),OT(1C),OT(7F),OT(1D),OT(45), 000h ; 130 - 137 (Intel group 5) 0 00008B88 5254535353530000 db OT(46),OT(48),OT(47),OT(47),OT(47),OT(47), 000h, 000h ; 138 - 13F (Intel group 6) 0 00008B90 4545434352005344 db OT(39),OT(39),OT(37),OT(37),OT(46), 000h,OT(47),OT(38) ; 140 - 147 (Intel group 7) 0 00008B98 3434343434343434 db OT(28),OT(28),OT(28),OT(28),OT(28),OT(28),OT(28),OT(28) ; 148 - 14F (Coprocessor d8) 0 00008BA0 3838424238383838 db OT(2C),OT(2C),OT(36),OT(36),OT(2C),OT(2C),OT(2C),OT(2C) ; 150 - 157 0 00008BA8 34003535433E453F db OT(28), 000h,OT(29),OT(29),OT(37),OT(32),OT(39),OT(33) ; 158 - 15F (Coprocessor d9) 0 00008BB0 3942080008080808 db OT(2D),OT(36), 008h, 000h, 008h, 008h, 008h, 008h ; 160 - 167 0 00008BB8 3C3C3C3C3C3C3C3C db OT(30),OT(30),OT(30),OT(30),OT(30),OT(30),OT(30),OT(30) ; 168 - 16F (Coprocessor da) 0 00008BC0 3838383800080000 db OT(2C),OT(2C),OT(2C),OT(2C), 000h, 008h, 000h, 000h ; 170 - 177 0 00008BC8 3C003D3D00400041 db OT(30), 000h,OT(31),OT(31), 000h,OT(34), 000h,OT(35) ; 178 - 17F (Coprocessor db) 0 00008BD0 3838383808424200 db OT(2C),OT(2C),OT(2C),OT(2C), 008h,OT(36),OT(36), 000h ; 180 - 187 0 00008BD8 3636363636363636 db OT(2A),OT(2A),OT(2A),OT(2A),OT(2A),OT(2A),OT(2A),OT(2A) ; 188 - 18F (Coprocessor dc) 0 00008BE0 3B3B00003B3B3B3B db OT(2F),OT(2F), 000h, 000h,OT(2F),OT(2F),OT(2F),OT(2F) ; 190 - 197 0 00008BE8 360037374300453F db OT(2A), 000h,OT(2B),OT(2B),OT(37), 000h,OT(39),OT(33) ; 198 - 19F (Coprocessor dd) 0 00008BF0 3900393942420000 db OT(2D), 000h,OT(2D),OT(2D),OT(36),OT(36), 000h, 000h ; 1A0 - 1A7 0 00008BF8 3E3E3E3E3E3E3E3E db OT(32),OT(32),OT(32),OT(32),OT(32),OT(32),OT(32),OT(32) ; 1A8 - 1AF (Coprocessor de) 0 00008C00 3A3A00083A3A3A3A db OT(2E),OT(2E), 000h, 008h,OT(2E),OT(2E),OT(2E),OT(2E) ; 1B0 - 1B7 0 00008C08 3E003F3F402B412C db OT(32), 000h,OT(33),OT(33),OT(34),OT(1F),OT(35),OT(20) ; 1B8 - 1BF (Coprocessor df) 0 00008C10 0000000008424200 db 000h, 000h, 000h, 000h, 008h,OT(36),OT(36), 000h ; 1C0 - 1C7 0 00008C18 0C0C0C0C0C0C0C00 db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 000h ; 1C8 - 1CF (Coprocessor groups) 0 00008C20 0C0C0C0C0C0C0C0C db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D0 - 1D7 0 00008C28 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 00008C30 0004041B1B0C0C0C db 0, 004h, 004h,OT(0F),OT(0F),OT(00),OT(00),OT(00) ; 00 0 00008C38 0C7E807F8182830C db OT(00),OT(72),OT(74),OT(73),OT(75),OT(76),OT(77),OT(00) ; 08 0 00008C40 0C0C1B1B1B1B1B1B db OT(00),OT(00),OT(0F),OT(0F),OT(0F),OT(0F),OT(0F),OT(0F) ; 10 0 00008C48 1B1B1B1B1B1B1B1B db OT(0F),OT(0F),OT(0F),OT(0F),OT(0F),OT(0F),OT(0F),OT(0F) ; 18 0 00008C50 1B1B868686868686 db OT(0F),OT(0F),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A) ; 20 0 00008C58 8686868686868486 db OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(78),OT(7A) ; 28 0 00008C60 0404048686860C85 db 004h, 004h, 004h,OT(7A),OT(7A),OT(7A),OT(00),OT(79) ; 30 0 00008C68 8723232323232323 db OT(7B),OT(17),OT(17),OT(17),OT(17),OT(17),OT(17),OT(17) ; 38 0 00008C70 2323232323232323 db OT(17),OT(17),OT(17),OT(17),OT(17),OT(17),OT(17),OT(17) ; 40 0 00008C78 2368686868686868 db OT(17),OT(5C),OT(5C),OT(5C),OT(5C),OT(5C),OT(5C),OT(5C) ; 48 0 00008C80 6868686868686868 db OT(5C),OT(5C),OT(5C),OT(5C),OT(5C),OT(5C),OT(5C),OT(5C) ; 50 0 00008C88 68757C0C1E696A77 db OT(5C),OT(69),OT(70),OT(00),OT(12),OT(5D),OT(5E),OT(6B) ; 58 0 00008C90 7D0C1D696A1B1313 db OT(71),OT(00),OT(11),OT(5D),OT(5E),OT(0F),OT(07),OT(07) ; 60 0 00008C98 1A1D1A1A5B5C0C04 db OT(0E),OT(11),OT(0E),OT(0E),OT(4F),OT(50),OT(00), 004h ; 68 0 00008CA0 1D1B1B5B5C131304 db OT(11),OT(0F),OT(0F),OT(4F),OT(50),OT(07),OT(07), 004h ; 70 0 00008CA8 1C1C1C1C1C1C1C1C db OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 78 0 00008CB0 8686868686868686 db OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A) ; 80 0 00008CB8 8686868686868686 db OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A) ; 88 0 00008CC0 8686868686868686 db OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(7A) ; 90 0 00008CC8 86868686860C2D2D db OT(7A),OT(7A),OT(7A),OT(7A),OT(7A),OT(00),OT(21),OT(21) ; 98 0 00008CD0 66211F1F1F2A5F10 db OT(5A),OT(15),OT(13),OT(13),OT(13),OT(1E),OT(53),OT(04) ; A0 0 00008CD8 8888888888888888 db OT(7C),OT(7C),OT(7C),OT(7C),OT(7C),OT(7C),OT(7C),OT(7C) ; A8 0 00008CE0 0C0C0C0C0C0C0C0C db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; B0 0 00008CE8 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 00008CED 00 align 2, db 0 1710 <2> opinfo label word 0 00008CEE 3600360036003600 dw MN_ADD, MN_ADD, MN_ADD, MN_ADD ; 00 0 00008CF6 36003600F507F007 dw MN_ADD, MN_ADD, MN_PUSH, MN_POP ; 04 0 00008CFE DB07DB07DB07DB07 dw MN_OR, MN_OR, MN_OR, MN_OR ; 08 0 00008D06 DB07DB07F507E001 dw MN_OR, MN_OR, MN_PUSH, 01E0h ; 0C 0 00008D0E 3100310031003100 dw MN_ADC, MN_ADC, MN_ADC, MN_ADC ; 10 0 00008D16 31003100F507F007 dw MN_ADC, MN_ADC, MN_PUSH, MN_POP ; 14 0 00008D1E 7808780878087808 dw MN_SBB, MN_SBB, MN_SBB, MN_SBB ; 18 0 00008D26 78087808F507F007 dw MN_SBB, MN_SBB, MN_PUSH, MN_POP ; 1C 0 00008D2E 3B003B003B003B00 dw MN_AND, MN_AND, MN_AND, MN_AND ; 20 0 00008D36 3B003B000100B701 dw MN_AND, MN_AND, 0001h, MN_DAA ; 24 0 00008D3E 8F098F098F098F09 dw MN_SUB, MN_SUB, MN_SUB, MN_SUB ; 28 0 00008D46 8F098F090101BC01 dw MN_SUB, MN_SUB, 0101h, MN_DAS ; 2C 0 00008D4E F109F109F109F109 dw MN_XOR, MN_XOR, MN_XOR, MN_XOR ; 30 0 00008D56 F109F10901021D00 dw MN_XOR, MN_XOR, 0201h, MN_AAA ; 34 0 00008D5E 8601860186018601 dw MN_CMP, MN_CMP, MN_CMP, MN_CMP ; 38 0 00008D66 8601860101032C00 dw MN_CMP, MN_CMP, 0301h, MN_AAS ; 3C 0 00008D6E D104D104D104D104 dw MN_INC, MN_INC, MN_INC, MN_INC ; 40 0 00008D76 D104D104D104D104 dw MN_INC, MN_INC, MN_INC, MN_INC ; 44 0 00008D7E C901C901C901C901 dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 48 0 00008D86 C901C901C901C901 dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 4C 0 00008D8E F507F507F507F507 dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 50 0 00008D96 F507F507F507F507 dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 54 0 00008D9E F007F007F007F007 dw MN_POP, MN_POP, MN_POP, MN_POP ; 58 0 00008DA6 F007F007F007F007 dw MN_POP, MN_POP, MN_POP, MN_POP ; 5C 0 00008DAE 701A5E1A46104020 dw P186 + MN_PUSHA_OSA, P186 + MN_POPA_OSA, P186 + MN_BOUND, P286 + MN_ARPL ; 60 0 00008DB6 0134013510302030 dw P386 + 0401h, P386 + 0501h, P386 + 0010h, P386 + 0020h ; 64 0 00008DBE 6A1AC7146A1AC714 dw P186 + MN_PUSH_OSA, P186 + MN_IMUL, P186 + MN_PUSH_OSA, P186 + MN_IMUL ; 68 0 00008DC6 D614951AE917A61A dw P186 + MN_INSB, P186 + MN_INS_OSR, P186 + MN_OUTSB, P186 + MN_OUTS_OSR ; 6C 0 00008DCE 990585051F051A05 dw MN_JO, MN_JNO, MN_JB, MN_JAE ; 70 0 00008DD6 AF05940523051605 dw MN_JZ, MN_JNZ, MN_JBE, MN_JA ; 74 0 00008DDE AB058F05A105A605 dw MN_JS, MN_JNS, MN_JPE, MN_JPO ; 78 0 00008DE6 460541054A053D05 dw MN_JL, MN_JGE, MN_JLE, MN_JG ; 7C 0 00008DEE 0001000100010801 dw 0100h, 0100h, 0100h, 0108h ; 80 0 00008DF6 A209A209DE09DE09 dw MN_TEST, MN_TEST, MN_XCHG, MN_XCHG ; 84 0 00008DFE 3406340634063406 dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; 88 0 00008E06 3406DC053406F802 dw MN_MOV, MN_LEA, MN_MOV, 02F8h ; 8C 0 00008E0E D107DE09DE09DE09 dw MN_NOP, MN_XCHG, MN_XCHG, MN_XCHG ; 90 0 00008E16 DE09DE09DE09DE09 dw MN_XCHG, MN_XCHG, MN_XCHG, MN_XCHG ; 94 0 00008E1E 7700AD017100C309 dw MN_CBW, MN_CWD, MN_CALL, MN_WAIT ; 98 0 00008E26 770A640A4108B805 dw MN_PUSHF_OSA, MN_POPF_OSA, MN_SAHF, MN_LAHF ; 9C 0 00008E2E 3406340634063406 dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; A0 0 00008E36 B207A00A8B018F0A dw MN_MOVSB, MN_MOVS_OSR, MN_CMPSB, MN_CMPS_OSR ; A4 0 00008E3E A209A2098309B20A dw MN_TEST, MN_TEST, MN_STOSB, MN_STOS_OSR ; A8 0 00008E46 FF059A0A7D08AC0A dw MN_LODSB, MN_LODS_OSR, MN_SCASB, MN_SCAS_OSR ; AC 0 00008E4E 3406340634063406 dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B0 0 00008E56 3406340634063406 dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B4 0 00008E5E 3406340634063406 dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B8 0 00008E66 3406340634063406 dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; BC 0 00008E6E 200120017E0A7E0A dw 0120h, 0120h, MN_RETN_OSA, MN_RETN_OSA ; C0 0 00008E76 CD05C30500030003 dw MN_LES, MN_LDS, 0300h, 0300h ; C4 0 00008E7E 1A1A571A890A890A dw P186 + MN_ENTER_OSA, P186 + MN_LEAVE_OSA, MN_RETF_OSA, MN_RETF_OSA ; C8 0 00008E86 F504DC040205510A dw MN_INT3, MN_INT, MN_INTO, MN_IRET_OSA ; CC 0 00008E8E 1001100118011801 dw 0110h, 0110h, 0118h, 0118h ; D0 0 00008E96 270022009A29EA09 dw MN_AAM, MN_AAD, P286 + MN_SETALC, MN_XLATB ; D4 0 00008E9E 4801580168017801 dw 0148h, 0158h, 0168h, 0178h ; D8 0 00008EA6 88019801A801B801 dw 0188h, 0198h, 01A8h, 01B8h ; DC 0 00008EAE 0A0AFC09F6092C05 dw MN_LOOPNZ_ASA, MN_LOOPZ_ASA, MN_LOOP_ASA, MN_JCXZ ; E0 0 00008EB6 CD04CD04E407E407 dw MN_IN, MN_IN, MN_OUT, MN_OUT ; E4 0 00008EBE 7100B305B305B305 dw MN_CALL, MN_JMP, MN_JMP, MN_JMP ; E8 0 00008EC6 CD04CD04E407E407 dw MN_IN, MN_IN, MN_OUT, MN_OUT ; EC 0 00008ECE 0800E16402000600 dw 0008h, P686 + MN_INT1, 0002h, 0006h ; F0 0 00008ED6 BC04970028012801 dw MN_HLT, MN_CMC, 0128h, 0128h ; F4 0 00008EDE 820074098C007E09 dw MN_CLC, MN_STC, MN_CLI, MN_STI ; F8 0 00008EE6 87007909E0023001 dw MN_CLD, MN_STD, 02E0h, 0130h ; FC 0 00008EEE 3600DB0731007808 dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 100 0 00008EF6 3B008F09F1098601 dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 104 0 00008EFE 3600DB0731007808 dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 108 0 00008F06 3B008F09F1098601 dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 10C 0 00008F0E 05080A08FB070008 dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 110 0 00008F16 6E0873086E084C08 dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 114 0 00008F1E 05080A08FB070008 dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 118 0 00008F26 6E0873086E084C08 dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 11C 0 00008F2E 05180A18FB170018 dw P186 + MN_ROL, P186 + MN_ROR, P186 + MN_RCL, P186 + MN_RCR ; 120 0 00008F36 6E1873186E184C18 dw P186 + MN_SHL, P186 + MN_SHR, P186 + MN_SHL, P186 + MN_SAR ; 124 0 00008F3E A209A209D607CC07 dw MN_TEST, MN_TEST, MN_NOT, MN_NEG ; 128 0 00008F46 C707C704CE01C104 dw MN_MUL, MN_IMUL, MN_DIV, MN_IDIV ; 12C 0 00008F4E D104C90171007100 dw MN_INC, MN_DEC, MN_CALL, MN_CALL ; 130 0 00008F56 B305B305F5070000 dw MN_JMP, MN_JMP, MN_PUSH, 0000h ; 134 0 00008F5E 68298A29ED252F26 dw P286 + MN_SLDT, P286 + MN_STR, P286 + MN_LLDT, P286 + MN_LTR ; 138 0 00008F66 B729BD2900000000 dw P286 + MN_VERR, P286 + MN_VERW, 0000h, 0000h ; 13C 0 00008F6E 50295629E125E725 dw P286 + MN_SGDT, P286 + MN_SIDT, P286 + MN_LGDT, P286 + MN_LIDT ; 140 0 00008F76 6E290000F3250E45 dw P286 + MN_SMSW, 0000h, P286 + MN_LMSW, P486 + MN_INVLPG ; 144 0 00008F7E EA019D039B02B002 dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 148 0 00008F86 36044A04DD02F102 dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 14C 0 00008F8E EA019D039B02B002 dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 150 0 00008F96 36044A04DD02F102 dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 154 0 00008F9E 560300000D041204 dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 158 0 00008FA6 210A9503480A1F04 dw MN_FLDENV_OSA, MN_FNLDCW, MN_FNSTENV_OSA, MN_FNSTCW ; 15C 0 00008FAE 56039D0420030000 dw MN_FLD, MN_FXCH, 0320h, 0000h ; 160 0 00008FB6 2803C801D001D801 dw 0328h, 01C8h, 01D0h, 01D8h ; 164 0 00008FBE F701AA031C032303 dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 168 0 00008FC6 43045904EA020003 dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 16C 0 00008FCE 3162426239628B62 dw P686 + MN_FCMOVB, P686 + MN_FCMOVE, P686 + MN_FCMOVBE, P686 + MN_FCMOVU ; 170 0 00008FD6 0000300300000000 dw 0000h, 0330h, 0000h, 0000h ; 174 0 00008FDE 2B03000049034F03 dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 178 0 00008FE6 0000560300001204 dw 0000h, MN_FLD, 0000h, MN_FSTP ; 17C 0 00008FEE 5D62706266627962 dw P686 + MN_FCMOVNB, P686 + MN_FCMOVNE, P686 + MN_FCMOVNBE, P686 + MN_FCMOVNU ; 180 0 00008FF6 38036E64A1620000 dw 0338h, P686 + MN_FUCOMI, P686 + MN_FCOMI, 0000h ; 184 0 00008FFE EA019D039B02B002 dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 188 0 00009006 36044A04DD02F102 dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 18C 0 0000900E EA019D0300000000 dw MN_FADD, MN_FMUL, 0000h, 0000h ; 190 0 00009016 4A043604F102DD02 dw MN_FSUBR, MN_FSUB, MN_FDIVR, MN_FDIV ; 194 0 0000901E 560300000D041204 dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 198 0 00009026 290A0000380A2E04 dw MN_FRSTOR_OSA, 0000h, MN_FNSAVE_OSA, MN_FNSTSW ; 19C 0 0000902E 150300000D041204 dw MN_FFREE, 0000h, MN_FST, MN_FSTP ; 1A0 0 00009036 67347F3400000000 dw P386 + MN_FUCOM, P386 + MN_FUCOMP, 0000h, 0000h ; 1A4 0 0000903E F701AA031C032303 dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 1A8 0 00009046 43045904EA020003 dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 1AC 0 0000904E F001A30300004003 dw MN_FADDP, MN_FMULP, 0000h, 0340h ; 1B0 0 00009056 51043C04F802E302 dw MN_FSUBRP, MN_FSUBP, MN_FDIVRP, MN_FDIVP ; 1B4 0 0000905E 2B03000049034F03 dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 1B8 0 00009066 FE012B0304024F03 dw MN_FBLD, MN_FILD, MN_FBSTP, MN_FISTP ; 1BC 0 0000906E 0000000000000000 dw 0000h, 0000h, 0000h, 0000h ; 1C0 0 00009076 48037664A8620000 dw 0348h, P686 + MN_FUCOMIP, P686 + MN_FCOMIP, 0000h ; 1C4 0 0000907E 5B03610369037103 dw MN_FLD1, MN_FLDL2T, MN_FLDL2E, MN_FLDPI ; 1C8 0 00009086 7803800388030000 dw MN_FLDLG2, MN_FLDLN2, MN_FLDZ, 0000h ; 1CC 0 0000908E DD01AC04CE03B703 dw MN_F2XM1, MN_FYL2X, MN_FPTAN, MN_FPATAN ; 1D0 0 00009096 A304C633C5023103 dw MN_FXTRACT, P386 + MN_FPREM1, MN_FDECSTP, MN_FINCSTP ; 1D4 0 0000909E BF03B3040604FD33 dw MN_FPREM, MN_FYL2XP1, MN_FSQRT, P386 + MN_FSINCOS ; 1D8 0 000090A6 D503DE03F733BF32 dw MN_FRNDINT, MN_FSCALE, P386 + MN_FSIN, P386 + MN_FCOS ; 1DC 1831 <2> ;--- The rest of these are squeezed. 0 000090AE 000038014001BE25 dw 0, 0138h, 0140h, P286 + MN_LAR ; 00 0 000090B6 2A2691200845C949 dw P286 + MN_LSL, P286 + MN_CLTS, P486 + MN_INVD, P486 + MN_WBINVD ; 04 0 000090BE B219343634363436 dw P186 + MN_UD2, P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV ; 08 0 000090C6 343634363436D159 dw P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV, P586 + MN_WRMSR ; 0C 0 000090CE 16580F585A613A61 dw P586 + MN_RDTSC, P586 + MN_RDMSR, P686 + MN_CMOVO, P686 + MN_CMOVNO ; 10 0 000090D6 AB60A3607F615261 dw P686 + MN_CMOVB, P686 + MN_CMOVAE, P686 + MN_CMOVZ, P686 + MN_CMOVNZ ; 14 0 000090DE B2609C6078614A61 dw P686 + MN_CMOVBE, P686 + MN_CMOVA, P686 + MN_CMOVS, P686 + MN_CMOVNS ; 18 0 000090E6 68617061D760CF60 dw P686 + MN_CMOVPE, P686 + MN_CMOVPO, P686 + MN_CMOVL, P686 + MN_CMOVGE ; 1C 0 000090EE DE60C8608B579657 dw P686 + MN_CMOVLE, P686 + MN_CMOVG, P586 + MN_PUNPCKLBW, P586 + MN_PUNPCKLWD ; 20 0 000090F6 A1574F56C256CB56 dw P586 + MN_PUNPCKLDQ, P586 + MN_PACKSSWB, P586 + MN_PCMPGTB, P586 + MN_PCMPGTW ; 24 0 000090FE D45659566A577557 dw P586 + MN_PCMPGTD, P586 + MN_PACKUSWB, P586 + MN_PUNPCKHBW, P586 + MN_PUNPCKHWD ; 28 0 00009106 8057455639563F56 dw P586 + MN_PUNPCKHDQ, P586 + MN_PACKSSDW, P586 + MN_MOVD, P586 + MN_MOVQ ; 2C 0 0000910E 080310031803A756 dw 0308h, 0310h, 0318h, P586 + MN_PCMPEQB ; 30 0 00009116 B056B956D7513956 dw P586 + MN_PCMPEQW, P586 + MN_PCMPEQD, P586 + MN_EMMS, P586 + MN_MOVD ; 34 0 0000911E 3F56993585351F35 dw P586 + MN_MOVQ, P386 + MN_JO, P386 + MN_JNO, P386 + MN_JB ; 38 0 00009126 1A35AF3594352335 dw P386 + MN_JAE, P386 + MN_JZ, P386 + MN_JNZ, P386 + MN_JBE ; 3C 0 0000912E 1635AB358F35A135 dw P386 + MN_JA, P386 + MN_JS, P386 + MN_JNS, P386 + MN_JPE ; 40 0 00009136 A635463541354A35 dw P386 + MN_JPO, P386 + MN_JL, P386 + MN_JGE, P386 + MN_JLE ; 44 0 0000913E 3D352A390E399138 dw P386 + MN_JG, P386 + MN_SETO, P386 + MN_SETNO, P386 + MN_SETB ; 48 0 00009146 8A384A3923399738 dw P386 + MN_SETAE, P386 + MN_SETZ, P386 + MN_SETNZ, P386 + MN_SETBE ; 4C 0 0000914E 843844391C393639 dw P386 + MN_SETA, P386 + MN_SETS, P386 + MN_SETNS, P386 + MN_SETPE ; 50 0 00009156 3D39B738B038BD38 dw P386 + MN_SETPO, P386 + MN_SETL, P386 + MN_SETGE, P386 + MN_SETLE ; 54 0 0000915E AA38F537F037A651 dw P386 + MN_SETG, P386 + MN_PUSH, P386 + MN_POP, P586 + MN_CPUID ; 58 0 00009166 5E305C395C39F537 dw P386 + MN_BT, P386 + MN_SHLD, P386 + MN_SHLD, P386 + MN_PUSH ; 5C 0 0000916E F0373C586C306239 dw P386 + MN_POP, P586 + MN_RSM, P386 + MN_BTS, P386 + MN_SHRD ; 60 0 00009176 6239C73492419241 dw P386 + MN_SHRD, P386 + MN_IMUL, P486 + MN_CMPXCHG, P486 + MN_CMPXCHG ; 64 0 0000917E C8356730D235D735 dw P386 + MN_LSS, P386 + MN_BTR, P386 + MN_LFS, P386 + MN_LGS ; 68 0 00009186 C037C037AD19E802 dw P386 + MN_MOVZX, P386 + MN_MOVZX, P186 + MN_UD1, 02E8h ; 6C 0 0000918E 62304D305230B937 dw P386 + MN_BTC, P386 + MN_BSF, P386 + MN_BSR, P386 + MN_MOVSX ; 70 0 00009196 B937D849D849F002 dw P386 + MN_MOVSX, P486 + MN_XADD, P486 + MN_XADD, 02F0h ; 74 0 0000919E 5740574057405740 dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 78 0 000091A6 5740574057405740 dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 7C 0 000091AE 1E5725572C57EE56 dw P586 + MN_PSRLW, P586 + MN_PSRLD, P586 + MN_PSRLQ, P586 + MN_PMULLW ; 80 0 000091B6 585761579A568856 dw P586 + MN_PSUBUSB, P586 + MN_PSUBUSW, P586 + MN_PAND, P586 + MN_PADDUSB ; 84 0 000091BE 9156A05610571757 dw P586 + MN_PADDUSW, P586 + MN_PANDN, P586 + MN_PSRAW, P586 + MN_PSRAD ; 88 0 000091C6 E65648575057F656 dw P586 + MN_PMULHW, P586 + MN_PSUBSB, P586 + MN_PSUBSW, P586 + MN_POR ; 8C 0 000091CE 78568056AC57FB56 dw P586 + MN_PADDSB, P586 + MN_PADDSW, P586 + MN_PXOR, P586 + MN_PSLLW ; 90 0 000091D6 02570957DD563357 dw P586 + MN_PSLLD, P586 + MN_PSLLQ, P586 + MN_PMADDWD, P586 + MN_PSUBB ; 94 0 000091DE 3A57415763566A56 dw P586 + MN_PSUBW, P586 + MN_PSUBD, P586 + MN_PADDB, P586 + MN_PADDW ; 98 0 000091E6 7156A819D104C901 dw P586 + MN_PADDD, P186 + MN_UD0, MN_INC, MN_DEC ; 9C 0 000091EE 16005E306C306730 dw MN_BOXCB, P386 + MN_BT, P386 + MN_BTS, P386 + MN_BTR ; A0 0 000091F6 62309B51F0073406 dw P386 + MN_BTC, P586 + MN_CMPXCHG8B, MN_POP, MN_MOV ; A4 0 000091FE 1E571057FB562557 dw P586 + MN_PSRLW, P586 + MN_PSRAW, P586 + MN_PSLLW, P586 + MN_PSRLD ; A8 0 00009206 175702572C570957 dw P586 + MN_PSRAD, P586 + MN_PSLLD, P586 + MN_PSRLQ, P586 + MN_PSLLQ ; AC 0 0000920E B1030B02E4016104 dw MN_FNOP, MN_FCHS, MN_FABS, MN_FTST ; B0 0 00009216 970487340E03D502 dw MN_FXAM, P386 + MN_FUCOMPP, MN_FNENI, MN_FNDISI ; B4 0 0000921E 18024103EE23B702 dw MN_FNCLEX, MN_FNINIT, P286 + MN_FNSETPM, MN_FCOMPP ; B8 0 00009226 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 00009228 0102030400000500 db 1, 2, 3, 4, 0, 0, 5, 0 ; 1E0 0 00009230 0607000800000000 db 6, 7, 0, 8, 0, 0, 0, 0 ; 1E8 0 00009238 0000000000000000 db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F0 0 00009240 0000000000000000 db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F8 0 00009248 090A0B0C0D000E00 db 9, 10, 11, 12, 13, 0, 14, 0 ; 200 0 00009250 0000000000000000 db 0, 0, 0, 0, 0, 0, 0, 0 ; 208 0 00009258 0F10110000000000 db 15, 16, 17, 0, 0, 0, 0, 0 ; 210 0 00009260 0000000000000000 db 0, 0, 0, 0, 0, 0, 0, 0 ; 218 0 00009268 1213141516171819 db 18, 19, 20, 21, 22, 23, 24, 25 ; 220 0 00009270 1A1B1C1D1E1F2021 db 26, 27, 28, 29, 30, 31, 32, 33 ; 228 0 00009278 0000000000000000 db 0, 0, 0, 0, 0, 0, 0, 0 ; 230 0 00009280 0000000000000000 db 0, 0, 0, 0, 0, 0, 0, 0 ; 238 0 00009288 2223242526272829 db 34, 35, 36, 37, 38, 39, 40, 41 ; 240 0 00009290 2A2B2C2D00002E2F db 42, 43, 44, 45, 0, 0, 46, 47 ; 248 0 00009298 0030313233343536 db 0, 48, 49, 50, 51, 52, 53, 54 ; 250 0 000092A0 0000000000003738 db 0, 0, 0, 0, 0, 0, 55, 56 ; 258 0 000092A8 393A3B3C3D3E3F40 db 57, 58, 59, 60, 61, 62, 63, 64 ; 260 0 000092B0 4142434445464748 db 65, 66, 67, 68, 69, 70, 71, 72 ; 268 0 000092B8 494A4B4C4D4E4F50 db 73, 74, 75, 76, 77, 78, 79, 80 ; 270 0 000092C0 5152535455565758 db 81, 82, 83, 84, 85, 86, 87, 88 ; 278 0 000092C8 595A5B5C5D5E0000 db 89, 90, 91, 92, 93, 94, 0, 0 ; 280 0 000092D0 5F60616263640065 db 95, 96, 97, 98, 99,100, 0,101 ; 288 0 000092D8 666768696A6B6C6D db 102,103,104,105,106,107,108,109 ; 290 0 000092E0 006E6F7071727374 db 0,110,111,112,113,114,115,116 ; 298 0 000092E8 7576000000000077 db 117,118, 0, 0, 0, 0, 0,119 ; 2A0 0 000092F0 78797A7B7C7D7E7F db 120,121,122,123,124,125,126,127 ; 2A8 0 000092F8 0080818200830000 db 0,128,129,130, 0,131, 0, 0 ; 2B0 0 00009300 8485008687880089 db 132,133, 0,134,135,136, 0,137 ; 2B8 0 00009308 008A8B00008C0000 db 0,138,139, 0, 0,140, 0, 0 ; 2C0 0 00009310 8D8E008F90910092 db 141,142, 0,143,144,145, 0,146 ; 2C8 0 00009318 0093949500960000 db 0,147,148,149, 0,150, 0, 0 ; 2D0 0 00009320 979899009A9B9C9D db 151,152,153, 0,154,155,156,157 ; 2D8 0 00009328 9E9F0000000000A0 db 158,159, 0, 0, 0, 0, 0,160 ; 2E0 0 00009330 00000000A1A2A3A4 db 0, 0, 0, 0,161,162,163,164 ; 2E8 0 00009338 00A5000000000000 db 0,165, 0, 0, 0, 0, 0, 0 ; 2F0 0 00009340 A600000000000000 db 166, 0, 0, 0, 0, 0, 0, 0 ; 2F8 0 00009348 A700000000000000 db 167, 0, 0, 0, 0, 0, 0, 0 ; 300 0 00009350 0000A800A900AA00 db 0, 0,168, 0,169, 0,170, 0 ; 308 0 00009358 0000AB00AC00AD00 db 0, 0,171, 0,172, 0,173, 0 ; 310 0 00009360 0000AE000000AF00 db 0, 0,174, 0, 0, 0,175, 0 ; 318 0 00009368 B000000000000000 db 176, 0, 0, 0, 0, 0, 0, 0 ; 320 0 00009370 B1B20000B3B40000 db 177,178, 0, 0,179,180, 0, 0 ; 328 0 00009378 00B5000000000000 db 0,181, 0, 0, 0, 0, 0, 0 ; 330 0 00009380 B6B7B8B9BA000000 db 182,183,184,185,186, 0, 0, 0 ; 338 0 00009388 00BB000000000000 db 0,187, 0, 0, 0, 0, 0, 0 ; 340 0 00009390 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 00009398 3A03390338033B035D dw 033Ah,0339h,0338h,033Bh,015Dh,019Eh,033Ch,015Fh 0 000093A1 019E013C035F01 0 000093A8 5E0148039F01 dw 015Eh,0348h,019Fh 1939 <2> wtab2 label word 0 000093AE 1102 dw MN_FCLEX 0 000093B0 CE02 dw MN_FDISI 0 000093B2 0803 dw MN_FENI 0 000093B4 3A03 dw MN_FINIT 0 000093B6 8E03 dw MN_FLDCW 0 000093B8 310A dw MN_FSAVE_OSA 0 000093BA E603 dw MN_FSETPM 0 000093BC 1804 dw MN_FSTCW 0 000093BE 400A dw MN_FSTENV_OSA 0 000093C0 2704 dw MN_FSTSW 0 000093C2 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 000093C4 98009900 dw 098h,099h 1959 <2> ltabo2 label word 0 000093C8 7C00 dw MN_CWDE 0 000093CA 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 000093CC E300 dw 0E3h 1970 <2> ltaba2 label word 0 000093CE 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 000093D0 0A0102011000110008 dw 010Ah,0102h,010h,011h,0108h,0100h,00h,01h 0 000093D9 01000100000100 0 000093E0 0C010401200021009B dw 010Ch,0104h,020h,021h,029Bh,02EFh,0293h,02EEh 0 000093E9 02EF029302EE02 0 000093F0 8B02ED0290029102E1 dw 028Bh,02EDh,0290h,0291h,02E1h,0131h,02E0h,0130h 0 000093F9 023101E0023001 0 00009400 2B012A010901010108 dw 012Bh,012Ah,0109h,0101h,08h,09h,010Bh,0103h 0 00009409 0009000B010301 0 00009410 180019000D01050128 dw 018h,019h,010Dh,0105h,028h,029h,02A0h,02A1h 0 00009419 002900A002A102 0 00009420 860087000E01060130 dw 086h,087h,010Eh,0106h,030h,031h 0 00009429 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 0000942C 01 db %$index 386 <2> [list -] 0 0000942D 00 db %$index 386 <2> [list -] 0 0000942E 01 db %$index 386 <2> [list -] 0 0000942F 05 db %$index 386 <2> [list -] 0 00009430 09 db %$index 386 <2> [list -] 0 00009431 0D db %$index 386 <2> [list -] 0 00009432 11 db %$index 386 <2> [list -] 0 00009433 15 db %$index 386 <2> [list -] 0 00009434 19 db %$index 386 <2> [list -] 0 00009435 1D db %$index 386 <2> [list -] 0 00009436 23 db %$index 386 <2> [list -] 0 00009437 27 db %$index 386 <2> [list -] 0 00009438 2D db %$index 386 <2> [list -] 0 00009439 35 db %$index 386 <2> [list -] 0 0000943A 37 db %$index 386 <2> [list -] 0 0000943B 3A db %$index 386 <2> [list -] 0 0000943C 3C db %$index 386 <2> [list -] 0 0000943D 3C db %$index 386 <2> [list -] 0 0000943E 3E db %$index 386 <2> [list -] 0 0000943F 40 db %$index 386 <2> [list -] 0 00009440 40 db %$index 386 <2> [list -] 0 00009441 40 db %$index 386 <2> [list -] 0 00009442 42 db %$index 386 <2> [list -] 0 00009443 41 db %$index 386 <2> [list -] 0 00009444 42 db %$index 386 <2> [list -] 0 00009445 41 db %$index 386 <2> [list -] 0 00009446 42 db %$index 386 <2> [list -] 0 00009447 41 db %$index 386 <2> [list -] 0 00009448 42 db %$index 386 <2> [list -] 0 00009449 41 db %$index 386 <2> [list -] 0 0000944A 44 db %$index 386 <2> [list -] 0 0000944B 45 db %$index 386 <2> [list -] 0 0000944C 46 db %$index 386 <2> [list -] 0 0000944D 47 db %$index 386 <2> [list -] 0 0000944E 47 db %$index 386 <2> [list -] 0 0000944F 48 db %$index 386 <2> [list -] 0 00009450 49 db %$index 386 <2> [list -] 0 00009451 48 db %$index 386 <2> [list -] 0 00009452 48 db %$index 386 <2> [list -] 0 00009453 49 db %$index 386 <2> [list -] 0 00009454 4B db %$index 386 <2> [list -] 0 00009455 4C db %$index 386 <2> [list -] 0 00009456 4D db %$index 386 <2> [list -] 0 00009457 4E db %$index 386 <2> [list -] 0 00009458 4F db %$index 386 <2> [list -] 0 00009459 4E db %$index 386 <2> [list -] 0 0000945A 4E db %$index 386 <2> [list -] 0 0000945B 4D db %$index 386 <2> [list -] 0 0000945C 4E db %$index 386 <2> [list -] 0 0000945D 4F db %$index 386 <2> [list -] 0 0000945E 50 db %$index 386 <2> [list -] 0 0000945F 51 db %$index 386 <2> [list -] 0 00009460 52 db %$index 386 <2> [list -] 0 00009461 53 db %$index 386 <2> [list -] 0 00009462 54 db %$index 386 <2> [list -] 0 00009463 55 db %$index 386 <2> [list -] 0 00009464 54 db %$index 386 <2> [list -] 0 00009465 54 db %$index 386 <2> [list -] 0 00009466 55 db %$index 386 <2> [list -] 0 00009467 55 db %$index 386 <2> [list -] 0 00009468 58 db %$index 386 <2> [list -] 0 00009469 5A db %$index 386 <2> [list -] 0 0000946A 5D db %$index 386 <2> [list -] 0 0000946B 5F db %$index 386 <2> [list -] 0 0000946C 60 db %$index 386 <2> [list -] 0 0000946D 61 db %$index 386 <2> [list -] 0 0000946E 62 db %$index 386 <2> [list -] 0 0000946F 62 db %$index 386 <2> [list -] 0 00009470 62 db %$index 386 <2> [list -] 0 00009471 63 db %$index 386 <2> [list -] 0 00009472 67 db %$index 386 <2> [list -] 0 00009473 68 db %$index 386 <2> [list -] 0 00009474 69 db %$index 386 <2> [list -] 0 00009475 6A db %$index 386 <2> [list -] 0 00009476 6D db %$index 386 <2> [list -] 0 00009477 70 db %$index 386 <2> [list -] 0 00009478 72 db %$index 386 <2> [list -] 0 00009479 74 db %$index 386 <2> [list -] 0 0000947A 75 db %$index 386 <2> [list -] 0 0000947B 76 db %$index 386 <2> [list -] 0 0000947C 7A db %$index 386 <2> [list -] 0 0000947D 7E db %$index 386 <2> [list -] 0 0000947E 7F db %$index 386 <2> [list -] 0 0000947F 80 db %$index 386 <2> [list -] 0 00009480 84 db %$index 386 <2> [list -] 0 00009481 86 db %$index 386 <2> [list -] 0 00009482 88 db %$index 386 <2> [list -] 0 00009483 8A db %$index 386 <2> [list -] 0 00009484 8C db %$index 386 <2> [list -] 0 00009485 8E db %$index 386 <2> [list -] 0 00009486 8D db %$index 386 <2> [list -] 0 00009487 8D db %$index 386 <2> [list -] 0 00009488 8E db %$index 386 <2> [list -] 0 00009489 8F db %$index 386 <2> [list -] 0 0000948A 92 db %$index 386 <2> [list -] 0 0000948B 95 db %$index 386 <2> [list -] 0 0000948C 96 db %$index 386 <2> [list -] 0 0000948D 97 db %$index 386 <2> [list -] 0 0000948E 96 db %$index 386 <2> [list -] 0 0000948F 96 db %$index 386 <2> [list -] 0 00009490 95 db %$index 386 <2> [list -] 0 00009491 95 db %$index 386 <2> [list -] 0 00009492 94 db %$index 386 <2> [list -] 0 00009493 94 db %$index 386 <2> [list -] 0 00009494 93 db %$index 386 <2> [list -] 0 00009495 93 db %$index 386 <2> [list -] 0 00009496 92 db %$index 386 <2> [list -] 0 00009497 92 db %$index 386 <2> [list -] 0 00009498 91 db %$index 386 <2> [list -] 0 00009499 91 db %$index 386 <2> [list -] 0 0000949A 92 db %$index 386 <2> [list -] 0 0000949B 93 db %$index 386 <2> [list -] 0 0000949C 94 db %$index 386 <2> [list -] 0 0000949D 95 db %$index 386 <2> [list -] 0 0000949E 96 db %$index 386 <2> [list -] 0 0000949F 99 db %$index 386 <2> [list -] 0 000094A0 9C db %$index 386 <2> [list -] 0 000094A1 9F db %$index 386 <2> [list -] 0 000094A2 A2 db %$index 386 <2> [list -] 0 000094A3 A5 db %$index 386 <2> [list -] 0 000094A4 A8 db %$index 386 <2> [list -] 0 000094A5 AA db %$index 386 <2> [list -] 0 000094A6 AC db %$index 386 <2> [list -] 0 000094A7 AE db %$index 386 <2> [list -] 0 000094A8 B0 db %$index 386 <2> [list -] 0 000094A9 B1 db %$index 386 <2> [list -] 0 000094AA B2 db %$index 386 <2> [list -] 0 000094AB B1 db %$index 386 <2> [list -] 0 000094AC B3 db %$index 386 <2> [list -] 0 000094AD B6 db %$index 386 <2> [list -] 0 000094AE B7 db %$index 386 <2> [list -] 0 000094AF B9 db %$index 386 <2> [list -] 0 000094B0 B9 db %$index 386 <2> [list -] 0 000094B1 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 00001584 0000 aa13a_mnemposition: dw 0 ; -> mnemonic, to display error 0 00001586 00 aa_mnemsuffix: db 0 ; 0 = none, 'W' = W suffix, 'D' = D suffix 33 0 00001587 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 00001588 00 aa_saved_prefix:db 0 ; WAIT or REP... prefix 45 ; aa_saved_prefix and aa_seg_pre must be consecutive. 0 00001589 00 aa_seg_pre: db 0 ; segment prefix 47 48 align 2, db 0 0 0000158A 0000 mneminfo: dw 0 ; address associated with the mnemonic 50 51 ; The following 8 words (including modrmflag) must all be consecutive. 0 0000158C 0000 rmaddr: dw 0 ; address of operand giving the R/M byte 53 ; regmem and sibbyte must be consecutive 0 0000158E 00 regmem: db 0 ; mod reg r/m part of instruction 0 0000158F 00 sibbyte: db 0 ; SIB byte 0 00001590 0000 immaddr: dw 0 ; address of operand giving the immed stf 0 00001592 0000 xxaddr: dw 0 ; address of additional stuff 58 ; dismach and dmflags must be consecutive 0 00001594 00 dismach: db 0 ; type of processor needed 0 00001595 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 00001596 00 opcode_or: db 0 ; extra bits in the op code 0 00001597 00 opsize: db 0 ; size of this operation (2 or 4) 0 00001598 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 00001599 00 alloweddist: db 0 0 0000159A 00 modrmalready: db 0 0 0000159B 00 modrmflag: db 0 ; must be directly after modrmalready 82 0 0000159C 00 a_reqsize: db 0 ; size that this arg should be 0 0000159D 00 align 2, db 0 0 0000159E 0000 a_opcode: dw 0 ; op code info for this variant 86 87 align 2, db 0 0 000015A0 0000 a_opcode2: dw 0 ; copy of a_opcode for obs-instruction 0 000015A2 E0DBE1DBE4DB240126 a_obstab: dw 0DBE0h,0DBE1h,0DBE4h,124h,126h ; obs. instruction codes 0 000015AB 01 0 000015AC 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 000015B1 00040201 aadbsiz: db 0,4,2,1 ; table for max size of db operand 0 000015B5 00 align 2, db 0 0 000015B6 0000 aadbsto: dw 0 0 000015B8 [6A03] dw aa_sto_dword 0 000015BA [7203] dw aa_sto_word 0 000015BC [7A03] 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 000015BE 0B000D00 modrmtab: db REG_BX,0,REG_BP,0 ; [bx], [bp] 0 000015C2 0F000E00 db REG_DI,0,REG_SI,0 ; [di], [si] 0 000015C6 0F0D0E0D db REG_DI,REG_BP,REG_SI,REG_BP ; [bp+di],[bp+si] 0 000015CA 0F0B0E0B db REG_DI,REG_BX,REG_SI,REG_BX ; [bx+di],[bx+si] 110 111 %if _IMMASM 0 000015CE [4400] aa_ret: dw aa01_main_loop ; used by immasm 113 %endif 0 000015D0 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 000015D2 101005010401040404 db BITTAB_OPSIZEDITEMS 0 000015DB 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 000015E2 010101010120101010 db BITTAB_OPITEMS 0 000015EB 080808080808101010 0 000015F4 1010100808FFFFFFFF 0 000015FD FFFFFFFFFFFFFFFFFF 0 00001606 FFFFFF041010040408 0 0000160F 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 00001615 00 align 2, db 0 143 asmjmp: 0 00001616 [5E0A][5E0A][400A] dw ASMJMP_OPSIZEDITEMS 0 0000161C [400A][400A][640A] 0 00001622 [450A][540A][6F0A] 0 00001628 [130E] 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 00001636 [0D0B][0D0B][0D0B] dw ASMJMP_OPITEMS 0 0000163C [0D0B][0D0B][220B] 0 00001642 [170B][660B][F60B] 0 00001648 [6B0C][6F0C][840C] 0 0000164E [A00C][A40C][CE0C] 0 00001654 [E50C][EA0C][F30C] 0 0000165A [F30C][F30C][F30C] 0 00001660 [760C][7A0C][810D] 0 00001666 [8B0D][BE0D][D90D] 0 0000166C [E10D][EB0D][E50D] 0 00001672 [BA0D][BA0D][BA0D] 0 00001678 [BA0D][BA0D][4E08] 0 0000167E [4E08][4E08][D20D] 0 00001684 [3C0D][EF0D][FC0D] 0 0000168A [090E][090E][090E] 0 00001690 [090E][090E][090E] 0 00001696 [090E][090E][090E] 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 0000169C [BA0D][BA0D][BA0D] dw ASMJMP_OPXITEMS 0 000016A2 [BA0D][BA0D][BA0D] 0 000016A8 [BA0D][BA0D][4E08] 0 000016AE [BA0D] 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 000016B0 414C defgpr AL 0 000016B2 434C defgpr CL 0 000016B4 444C defgpr DL 0 000016B6 424C defgpr BL 0 000016B8 4148 defgpr AH 0 000016BA 4348 defgpr CH 0 000016BC 4448 defgpr DH 0 000016BE 4248 defgpr BH ; 0..7 184 rgnam16: 0 000016C0 4158 defgpr AX 0 000016C2 4358 defgpr CX 0 000016C4 4458 defgpr DX 0 000016C6 4258 defgpr BX 0 000016C8 5350 defgpr SP 0 000016CA 4250 defgpr BP 0 000016CC 5349 defgpr SI 0 000016CE 4449 defgpr DI ; 8..15 (16-bit), 16..23 (32-bit) 193 N_REGS16 equ ($ - rgnam16) >> 1 194 segrgnam: 0 000016D0 4553 defsr ES 0 000016D2 4353 defsr CS 0 000016D4 5353 defsr SS 0 000016D6 4453 defsr DS 0 000016D8 4653 defsr FS 0 000016DA 4753 defsr GS ; 24..29 201 N_SEGREGS equ ($ - segrgnam) >> 1 202 xregnam: 0 000016DC 5354 defsr ST 0 000016DE 4D4D defsr MM 0 000016E0 4352 defsr CR 0 000016E2 4452 defsr DR 0 000016E4 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 000016E6 0A011E asm_regnum: db REG_DX, REG_CL, REG_ST 0 000016E9 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 000016EF 05060708 asm_siznum: db SIZ_QWORD, SIZ_FLOAT, SIZ_DOUBLE, SIZ_TBYTE 0 000016F3 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 000016F4 4259574F574F4457 sizetcnam: db "BY","WO","WO","DW" 246 endarea sizedisnam 0 000016FC 5157464C444F5442 db "QW","FL","DO","TB" 248 endarea sizetcnam 249 250 align 2, db 0 0 00001704 53484E454641 distnam: db "SH","NE","FA" 252 endarea distnam 253 254 255 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 255 ------------------ note: usesection lDEBUG_CODE 256 257 ..@aa_access_start: 258 259 aa_cmd3_check: 0 00001DBD AC lodsb 0 00001DBE E8[0000] call chkeol 262 aa_cmd3: 0 00001DC1 E9[0000] jmp cmd3 ; exit assembler mode --> 264 265 266 aa: 0 00001DC4 E8[0000] call guard_re 268 %if _ATTACH 0 00001DC7 4E dec si 0 00001DC8 4E dec si 0 00001DC9 BA[0000] mov dx, msg.attach 0 00001DCC E8[0000] call isstring? 0 00001DCF AC lodsb 0 00001DD0 7503E9[0000] je attach 0 00001DD5 AC lodsb 276 %endif 0 00001DD6 8B1E[0000] mov bx, word [ reg_cs ] ; default segment to use 278 aa00a_set_address: 0 00001DDA E8[0000] call iseol? 0 00001DDD 7422 je aa01_main_loop ; if end of line --> 0 00001DDF E8[0000]EB02[0000] nearcall getaddrX ; get address into bx:(e)dx 282 ; (no scratchsel) 0 00001DE6 E8[0000] call chkeol ; expect end of line here 0 00001DE9 66 _386_PM_o32 ; mov dword [ a_addr ], edx 0 00001DEA 8916[0000] mov word [ a_addr ], dx ; save the address 0 00001DEE 891E[0400] mov word [a_addr + saSegSel], bx 287 %if _PM 0 00001DF2 E8[0000] call ispm 0 00001DF5 7506 jnz .86m 290 .pm: 0 00001DF7 891E[0800] mov word [a_addr + saSelector], bx 0 00001DFB EB04 jmp @F 293 .86m: 0 00001DFD 891E[0600] mov word [a_addr + saSegment], bx 295 @@: 296 %endif 297 298 ; Begin loop over input lines. 299 aa01_main_loop: 300 %if _IMMASM 0 00001E01 C706[4A00][4400] mov word [ aa_ret ], aa01_main_loop 302 %endif 0 00001E07 C706[0000][4400] mov word [ errret ], aa01_main_loop 0 00001E0D 8B26[0000] mov sp, word [ savesp ] ; restore the stack (this implies no "retn") 0 00001E11 BF[0000] mov di, line_out 0 00001E14 A1[0400] mov ax, word [a_addr + saSegSel] 307 %if _PM 0 00001E17 89C3 mov bx, ax ; this is the original selector, 309 ; not the scratchsel 310 %endif 0 00001E19 E8[0000] call hexword 0 00001E1C B03A mov al, ':' 0 00001E1E AA stosb 314 %if _PM 0 00001E1F C606[0000]00 mov byte [ bCSAttr ], 0 0 00001E24 E8[0000] call test_d_b_bit 0 00001E27 740B jz .16 0 00001E29 C606[0000]40 mov byte [ bCSAttr ], 40h ; set 32-bit attrib for later checks here 0 00001E2E A1[0200] mov ax, word [ a_addr+2 ] 0 00001E31 E8[0000] call hexword 321 .16: 322 %endif 0 00001E34 A1[0000] mov ax, word [ a_addr+0 ] 0 00001E37 E8[0000] call hexword 0 00001E3A B020 mov al, 32 0 00001E3C AA stosb 327 %if _EXTENSIONS 0 00001E3D 8B0E[0000] mov cx, word [ext_aa_before_getline_handler] 0 00001E41 E303 jcxz aa_before_getline 0 00001E43 E9[0000] jmp transfer_ext_cx 331 332 aa_before_getline: section_of_function 0 00001E46 8B26[0000] mov sp, word [ savesp ] ; restore stack 334 0 00001E4A 31C9 xor cx, cx 0 00001E4C 870E[0000] xchg cx, word [ext_aa_inject_handler] 0 00001E50 E303 jcxz aa_not_inject 0 00001E52 E9[0000] jmp transfer_ext_cx 339 340 aa_not_inject: section_of_function 0 00001E55 8B26[0000] mov sp, word [ savesp ] ; restore stack 0 00001E59 E8[0000] call getline00 343 aa_injected: section_of_function 0 00001E5C 8B26[0000] mov sp, word [ savesp ] ; restore stack 345 0 00001E60 8B0E[0000] mov cx, word [ext_aa_after_getline_handler] 0 00001E64 E303 jcxz aa_after_getline 0 00001E66 E9[0000] jmp transfer_ext_cx 349 350 aa_after_getline: section_of_function 0 00001E69 8B26[0000] mov sp, word [ savesp ] ; restore stack 352 %else 353 call getline00 354 %endif 0 00001E6D 3C2E cmp al, '.' 0 00001E6F 7503E949FF je aa_cmd3_check 0 00001E74 3C3B cmp al, ';' 0 00001E76 7489 je aa01_main_loop ; if comment 0 00001E78 E8[0000] call iseol?.notsemicolon 0 00001E7B 7503E941FF je aa_cmd3 ; if done, return to command line --> 361 aa_imm_entry: section_of_function 0 00001E80 C606[0300]00 mov byte [ asm_mn_flags ], 0 0 00001E85 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 00001E8A BF[0000] mov di, line_out ; -> buffer 0 00001E8D 31C9 xor cx, cx ; = 0 0 00001E8F 8936[0000] mov [ aa13a_mnemposition ], si 374 0 00001E93 A9 db __TEST_IMM16 ; skip stosb,lodsb initially 376 @@: 0 00001E94 AA stosb 0 00001E95 AC lodsb 0 00001E96 41 inc cx ; count length 0 00001E97 E8[0000] call capitalise 0 00001E9A E8[0000] call iseol? ; end of mnemonic ? 0 00001E9D 740C je @F 0 00001E9F 3C3A cmp al, ':' 0 00001EA1 7408 je @F ; (for prefixes, else will be an error later) 0 00001EA3 3C20 cmp al, 32 0 00001EA5 7404 je @F 0 00001EA7 3C09 cmp al, 9 0 00001EA9 75E9 jne @B ; not yet --> 389 @@: 390 0 00001EAB 49 dec cx ; = length of input 0 00001EAC E8[0000] call skipwh0 ; skip to next field 0 00001EAF 4E dec si 394 0 00001EB0 8A45FF mov al, [di-1] ; get last stored character 0 00001EB3 3C57 cmp al, 'W' ; possible suffix? 0 00001EB5 7406 je @F 0 00001EB7 3C44 cmp al, 'D' 0 00001EB9 7402 je @F ; yes --> 0 00001EBB 30C0 xor al, al 401 @@: 0 00001EBD A2[0200] mov [aa_mnemsuffix], al ; store 'D', 'W', or 0 403 0 00001EC0 56 push si ; save position in input line 405 0 00001EC1 BE[E601] mov si, mnlist ; -> first area: no or optional suffix 0 00001EC4 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 00001EC7 AD lodsw ; load combined word, si-> name 0 00001EC8 83E00F and ax, 0Fh ; separate mnemonic length 0 00001ECB 39C8 cmp ax, cx ; length matches ? 0 00001ECD 741D je .length_match ; yes, check name --> 419 .cmps_mismatch: 0 00001ECF 01C6 add si, ax ; -> behind entry 0 00001ED1 39D6 cmp si, dx ; at end of this list area ? 0 00001ED3 72F2 jb aa_mnemlistloop ; not yet, check next entry --> 423 0 00001ED5 81FA[730C] cmp dx, mnlist_o_suffix_required; was first or second area ? 0 00001ED9 750D jne .mnem_invalid ; second, not found --> 426 0 00001EDB BE[DA0B] mov si, mnlist_a_suffix_allowed ; -> second area: optional or required suffix 0 00001EDE BA[9C0C] mov dx, end_mnlist ; -> end of second area 429 0 00001EE1 49 dec cx ; prepare for second look-up 0 00001EE2 3826[0200] cmp [aa_mnemsuffix], ah ; is there a valid suffix ? (ah still 0) 0 00001EE6 75DF jne aa_mnemlistloop ; yes, check for suffixed instruction --> 433 434 .mnem_invalid: 0 00001EE8 58 pop ax ; (discard) 0 00001EE9 E99101 jmp aa13a_error ; complain --> 437 438 .length_match: ; found a name of correct length 0 00001EEC BF[0000] mov di, line_out ; -> all-capitals input 0 00001EEF 89F3 mov bx, si ; -> name 0 00001EF1 F3A6 repe cmpsb ; compare names 0 00001EF3 89DE mov si, bx 0 00001EF5 89C1 mov cx, ax ; restore length 0 00001EF7 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 00001EF9 89F0 mov ax, si ; -> mnemonic's name 451 0 00001EFB 81FA[9C0C] cmp dx, end_mnlist ; was first or second area ? 0 00001EFF 740B je .handlesuffix ; second, there's a suffix to handle --> 454 0 00001F01 3D[DA0B] cmp ax, mnlist_a_suffix_allowed ; optional suffix that was not specified? 0 00001F04 7234 jb aa_mnemonic_found ; no, done with the suffixes already --> 457 458 %if _PM 0 00001F06 8A16[0000] mov dl, byte [ bCSAttr ] ; dl = whether a 32-bit CS 460 %else 461 xor dl, dl ; 86 Mode is always 16-bit 462 %endif 0 00001F0A EB09 jmp sho .suffix_decide 464 465 .handlesuffix: 466 0 00001F0C 8A16[0200] mov dl, byte [ aa_mnemsuffix ] ; dl = 'W' or 'D'. 'W' is odd, 'D' is even 0 00001F10 F6D2 not dl ; make 'W' an even value, 'D' an odd one 0 00001F12 80E201 and dl, 1 ; 'W' results in 0, 'D' in 1 470 471 .suffix_decide: 0 00001F15 3D[FE0B] cmp ax, mnlist_o_suffix_allowed ; address size suffix ? 0 00001F18 7212 jb .a_suffix ; yes --> 474 475 ; Operand size suffix. 0 00001F1A 84D2 test dl, dl ; which ? 0 00001F1C 7407 jz .o_suffix_w 0 00001F1E 800E[0300]01 or byte [asm_mn_flags], AMF_D32 ; o32 0 00001F23 EB15 jmp sho aa_mnemonic_found 480 481 .o_suffix_w: 0 00001F25 800E[0300]40 or byte [asm_mn_flags], AMF_D16 ; o16 0 00001F2A EB0E jmp sho aa_mnemonic_found 484 485 ; Address size suffix. 486 .a_suffix: 0 00001F2C 84D2 test dl, dl ; which ? 0 00001F2E 7405 jz .a_suffix_w 0 00001F30 800E[0300]84 or byte [asm_mn_flags], AMF_ADDR|AMF_A32; a32 490 .a_suffix_w: 0 00001F35 800E[0300]80 or byte [asm_mn_flags], AMF_ADDR ; a16 (AMF_A32 still clear) 492 493 aa_mnemonic_found: 0 00001F3A C606[1000]00 mov byte [dismach], 0 0 00001F3F B104 mov cl, 4 0 00001F41 8B74FE mov si, [si-2] ; get the combined word 0 00001F44 D3EE shr si, cl ; extract offset into asmtab 0 00001F46 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 00001F4A AC lodsb ; get a possible prefix 562 .checkprefix: 563 %if 1 0 00001F4B 3CFF cmp al, ASM_SPECIAL ; a special mnemonic ? 0 00001F4D 7403E99A00 jne .notspecial ; no --> 566 567 ; Dispatch based on mnemonic. 568 %ifdef MN_O32 0 00001F52 31C0 xor ax, ax 0 00001F54 81FB[F701] cmp bx, mnlist+MN_O16 0 00001F58 7503E9A600 je aa_sizeprefix ; o16 (ax = 0) --> 0 00001F5D 40 inc ax 0 00001F5E 81FB[ED01] cmp bx, mnlist+MN_A16 0 00001F62 7503E99C00 je aa_sizeprefix ; a16 (ax = 1) --> 0 00001F67 B402 mov ah, 2 0 00001F69 81FB[E801] cmp bx, mnlist+MN_A32 0 00001F6D 7503E99100 je aa_sizeprefix ; a32 (ax = 201h) --> 0 00001F72 48 dec ax 0 00001F73 81FB[F201] cmp bx, mnlist+MN_O32 0 00001F77 7503E98700 je aa_sizeprefix ; o32 (ax = 200h) --> 581 %endif 0 00001F7C 81FB[DF07] cmp bx, mnlist+MN_LOCK 0 00001F80 7503E9EF00 je aa18_lockrep_prefix ; lock --> 0 00001F85 81FB[030A] cmp bx, mnlist+MN_REP 0 00001F89 7209 jb .notreplock 0 00001F8B 81FB[1B0A] cmp bx, mnlist+MN_REPNE 0 00001F8F 7703E9E000 jbe aa18_lockrep_prefix ; rep, repe, repne --> 588 .notreplock: 0 00001F94 81FB[3C0A] cmp bx, mnlist+MN_ES 0 00001F98 7209 jb .notseg 591 %ifdef MN_GS 0 00001F9A 81FB[500A] cmp bx, mnlist+MN_GS 0 00001F9E 7703E9BB00 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 00001FA3 81FB[0802] cmp bx, mnlist+MN_AAD 0 00001FA7 7503E98D01 je aa_aax ; aad --> 0 00001FAC 81FB[0D02] cmp bx, mnlist+MN_AAM 0 00001FB0 7503E98401 je aa_aax ; aam --> 0 00001FB5 833E[0400]00 cmp word [ aa_saved_prefix ], byte 0 0 00001FBA 7403E9BE00 jne aa13a_error ; if there was a prefix or a segment, error --> 0 00001FBF 5E pop si ; get position in input line 606 ;cmp bx, mnlist+MN_SEG 607 ;je aa_seg ; SEG mnemonic, process --> 0 00001FC0 81FB[C509] cmp bx, mnlist+MN_ORG 0 00001FC4 7503E9BB00 je aa_org 0 00001FC9 B80100 mov ax, 1 0 00001FCC 81FB[AB03] cmp bx, mnlist+MN_DD 0 00001FD0 7503E9B700 je aa20m_dx ; dd (ax = 1) --> 0 00001FD5 40 inc ax 0 00001FD6 81FB[B903] cmp bx, mnlist+MN_DW 0 00001FDA 7503E9AD00 je aa20m_dx ; dw (ax = 2) --> 0 00001FDF 40 inc ax 0 00001FE0 81FB[A703] cmp bx, mnlist+MN_DB 0 00001FE4 7503E9A300 je aa20m_dx ; db (ax = 3) --> 0 00001FE9 E99100 jmp aa13a_error ; unhandled special mnemonic --> 620 621 .notspecial: 0 00001FEC 2CFC sub al, ASM_D16 ; mnemonic has a prefix ? 0 00001FEE 7207 jb .normal ; no --> 0 00001FF0 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 00001FF2 0806[0300] or [ asm_mn_flags ], al ; save AMF_D32 or AMF_WAIT (1 or 2) 0 00001FF6 A8 db __TEST_IMM8 ; (skip dec) 647 .normal: 0 00001FF7 4E dec si ; -> first byte of mnemonic info 649 .ab01: 0 00001FF8 E94E01 jmp ab01_process_args ; now process the arguments 651 .d16: 0 00001FFB 800E[0300]40 or byte [ asm_mn_flags ], AMF_D16 0 00002000 46 inc si ; skip the ASM_D32 byte 0 00002001 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 0 00002003 0A26[0000] or ah, byte [ bCSAttr ] 0 00002007 740E jz .nobyte ; 16-bit CS and 16-bit prefix, no output --> 0 00002009 80FC42 cmp ah, 40h| 2 0 0000200C 7409 je .nobyte ; 32-bit CS and 32-bit prefix, no output --> 668 %else 669 test ah, ah 670 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 0000200E 0466 add al, 66h ; 66h if OSIZE, 67h if ASIZE 0 00002010 BF[0000] mov di, line_out 0 00002013 AA stosb 0 00002014 E8D400 call aa_copymem 679 .nobyte: 680 %endif 681 aa_handleprefixes: 0 00002017 5E pop si 0 00002018 AC lodsb ; get character 0 00002019 3C3A cmp al, ':' 0 0000201B 7503 jne .nocolon 0 0000201D E8[0000] call skipwhite ; skip a colon 687 .nocolon: 0 00002020 E8[0000] call iseol? ; end of line? 0 00002023 7403E962FE jne aa02_parse_mnem ; no, process instruction --> 690 691 ; No instruction follows. 692 ; Write out saved LOCK/REP and/or segment prefix. 0 00002028 A0[0500] mov al, byte [ aa_seg_pre ] 0 0000202B 84C0 test al, al 0 0000202D 7409 jz .noseg 0 0000202F BF[0000] mov di, line_out 0 00002032 AA stosb 0 00002033 56 push si 0 00002034 E8B400 call aa_copymem 0 00002037 5E pop si 701 .noseg: 0 00002038 A0[0400] mov al, byte [ aa_saved_prefix ] 0 0000203B 84C0 test al, al 0 0000203D 7409 jz .noreplock 0 0000203F BF[0000] mov di, line_out 0 00002042 AA stosb 0 00002043 56 push si 0 00002044 E8A400 call aa_copymem 0 00002047 5E pop si 710 .noreplock: 711 0 00002048 BF[1E00] mov di, a_obstab ; info on this instruction 0 0000204B 31C9 xor cx, cx 0 0000204D E8[0000] call sm1 ; get machine message into si, length into cx 0 00002050 E308 jcxz .ac33 ; if no message 0 00002052 BF[0000] mov di, line_out 0 00002055 F3A4 rep movsb ; copy the line to line_out 0 00002057 E8[0000] call putsline_crlf 719 .ac33: 720 721 aa01_j1: 722 %if _IMMASM 0 0000205A 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 0000205E AC lodsb ; get prefix value 0 0000205F 3CF5 cmp al, ASM_MACH1 0 00002061 7207 jb @F 0 00002063 2CF5 sub al, ASM_MACH1 0 00002065 40 inc ax 0 00002066 A2[1000] mov byte [dismach], al ; save machine type 0 00002069 AC lodsb 764 @@: 0 0000206A A2[0500] mov byte [ aa_seg_pre ], al 0 0000206D 800E[0300]10 or byte [ asm_mn_flags ], AMF_MSEG 0 00002072 EBA3 jmp short aa_handleprefixes 768 769 ; LOCK or REP prefix 770 aa18_lockrep_prefix: 0 00002074 AC lodsb ; get prefix value 0 00002075 8606[0400] xchg al, byte [ aa_saved_prefix ] 0 00002079 84C0 test al, al 0 0000207B 749A jz aa_handleprefixes 775 ; if there already was a saved prefix: 776 aa13a_error: 0 0000207D 8B36[0000] mov si, [ aa13a_mnemposition ] 0 00002081 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 00002084 AC lodsb 0 00002085 8B1E[0400] mov bx, word [a_addr + saSegSel]; default segment 0 00002089 E94EFD 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 0000208C F606[0300]02 testopt [internalflags6], dif6_immasm 0 00002091 7548 jnz aa24_error 801 %endif 0 00002093 BF[0000] mov di, line_out ; put the bytes here when we get them 0 00002096 93 xchg ax, bx ; mov bx,ax 0 00002097 8A87[2D00] mov al, byte [ aadbsiz+bx ] ; move maximum size 0 0000209B A2[2D00] mov byte [ aadbsiz ], al 0 0000209E D1E3 shl bx, 1 0 000020A0 8B87[3200] mov ax, word [ aadbsto+bx ] ; move address of storage routine 0 000020A4 A3[3200] mov word [ aadbsto ],ax 0 000020A7 E8[0000] call skipwhite 0 000020AA E8[0000] call iseol? 0 000020AD 7438 je aa27_main_loop ; if end of line 812 813 aa21_dx_loop: 0 000020AF 88C4 mov ah, al 0 000020B1 3C22 cmp al, '"' 0 000020B3 7416 je aa22_dx_into_quote ; if string 0 000020B5 3C27 cmp al, "'" 0 000020B7 7412 je aa22_dx_into_quote ; if string 0 000020B9 E8860B call aageti ; get a numerical value into dx:bx, size into cl 0 000020BC 3A0E[2D00] cmp cl, byte [ aadbsiz ] 0 000020C0 7719 ja aa24_error ; if overflow 0 000020C2 93 xchg ax, bx 0 000020C3 FF16[3200] call near [ aadbsto ] ; store the value 0 000020C7 93 xchg ax, bx 0 000020C8 EB15 jmp short aa26_dx_next ; done with this one 826 827 aa23_dx_quoted_loop: 0 000020CA AA stosb 829 aa22_dx_into_quote: 0 000020CB AC lodsb 0 000020CC E8[0000] call iseol?.notsemicolon 0 000020CF 740A je aa24_error ; if end of line (closing quote missing) --> 0 000020D1 38E0 cmp al, ah 0 000020D3 7409 je aa25_dx_out_quote ; if end of string 0 000020D5 81FF[FFFF] cmp di, line_out_end - 1 0 000020D9 76EF jbe aa23_dx_quoted_loop ; if output line not overflowing 837 aa24_error: 0 000020DB E9[0000] jmp error ; error 839 aa25_dx_out_quote: 0 000020DE AC lodsb 841 aa26_dx_next: 0 000020DF E8[0000] call skipcomm0 0 000020E2 E8[0000] call iseol? 0 000020E5 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 000020E7 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 000020EB BE[0000] mov si, line_out ; ds:si-> data 0 000020EE 89F9 mov cx, di ; -> behind data 0 000020F0 29F1 sub cx, si ; = size of data 866 %if _PM 0 000020F2 53 push bx 0 000020F3 8B1E[0400] mov bx, word [a_addr + saSegSel] 0 000020F7 E8[0000] call verifysegm_or_error 0 000020FA 8EC3 mov es, bx 0 000020FC 5B pop bx 872 %else 873 mov es, word [a_addr + saSegSel] 874 %endif 0 000020FD 66 _386_PM_o32 ; mov edi, dword [ a_addr+0 ] 0 000020FE 8B3E[0000] mov di, word [ a_addr+0 ] ; es:(e)di-> destination 0 00002102 660FB7C9 _386_PM movzx ecx, cx 0 00002106 660FB7F6 _386_PM movzx esi, si ; fix high words 0 0000210A 67 _386_PM_a32 0 0000210B F3A4 rep movsb ; copy it 0 0000210D 66 _386_PM_o32 ; mov dword [ a_addr+0 ], edi 0 0000210E 893E[0000] mov word [ a_addr+0 ], di ; save new address 0 00002112 16 push ss 0 00002113 07 pop es 885 %if _IMMASM && (!_IMMASM_AUXBUFF || _AUXBUFFSIZE < (128 + 16)) 0 00002114 F606[0300]02 testopt [internalflags6], dif6_immasm 0 00002119 740B jz @F 888 %if _LINK_COMPAT 0 0000211B 81FF[F0FF] cmp di, strict word immasm_length - 16 890 %else 891 cmp di, immasm_length - 16 892 %endif 0 0000211F 7605 jbe @F 0 00002121 5E pop si ; discard near return address 0 00002122 5E pop si ; get offset in input line 0 00002123 E9[0000] jmp error 897 898 @@: 899 %endif 0 00002126 C3 retn 901 902 ; Routines to store a byte/word/dword, 903 ; into a buffer in our memory. 904 aa_sto_dword: 0 00002127 81FF[FCFF] cmp di, line_out_end - 4 0 0000212B 77AE ja aa24_error ; if output line overflow --> 0 0000212D AB stosw ; store a dword value 0 0000212E 92 xchg ax, dx 909 aa_sto_word: 0 0000212F 81FF[FEFF] cmp di, line_out_end - 2 0 00002133 77A6 ja aa24_error ; if output line overflow --> 0 00002135 AB stosw ; store a word value 0 00002136 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 00002137 AA stosb ; store a byte value 0 00002138 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 00002139 8936[0600] mov word [ mneminfo ], si ; save this address 0 0000213D 5E pop si 0 0000213E AC lodsb 0 0000213F E8[0000] call iseol? 0 00002142 750B jne ab01b_process_args ; if not end of line --> 0 00002144 BE[4C00] mov si, aam_args ; fake a 0Ah argument if none given 0 00002147 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 00001DBD ?? .flags: resb 1 ; 0 flags (ARG_DEREF, etc) 0 00001DBE ?? .distflags: resb 1 ; 1 distance flags 1040 ; (short = 1, near = 2, far = 4) 0 00001DBF ?? .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 00001DC0 ?? .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 00001DC1 ?? .numadd: resb 1 ; 4 number of additional bytes at num2 (up to 4) 1048 .num2: ; 5 second number (word) 0 00001DC2 ?? .reg2: resb 1 ; 5 index register, second register or SIB byte 1050 ; reg2 needs to follow reg1 immediately 0 00001DC3 ?? .index: resb 1 ; 6 index factor 0 00001DC4 ?? .orednum: resb 1 ; 7 sizes of numbers are ORed here 0 00001DC5 ???????? .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 00002149 8936[0600] mov word [ mneminfo ], si ; save this address 0 0000214D 5E pop si ; get position in line 1065 ab01a_process_args: 0 0000214E AC lodsb 1067 ab01b_process_args: 0 0000214F BF[0000] mov di, line_out 1069 1070 ; Loop over operands. 1071 ab02_process_loop: 0 00002152 E8[0000] call iseol? 0 00002155 7503 jne .ab04 ; if not end of line 0 00002157 E9BF03 jmp ab99_match_args ; to next phase 1075 1076 .ab04: 0 0000215A 57 push di ; clear out the next storage area 0 0000215B B90600 mov cx, OPRND_size_w 0 0000215E 31C0 xor ax, ax 0 00002160 F3AB rep stosw 0 00002162 5F pop di 1082 1083 ; Small loop over "BYTE PTR" and segment prefixes. 1084 ab05_keyword_loop: 0 00002163 4E dec si 0 00002164 8B04 mov ax, word [ si ] 0 00002166 25DFDF and ax, TOUPPER_W 0 00002169 3D4D4F cmp ax, "MO" 0 0000216C 7506 jne .checksize 0 0000216E 804D0108 or byte [di + OPRND.distflags], odfModRM 0 00002172 EB54 jmp .skipalpha 1092 1093 .checksize: 0 00002174 807D0200 cmp byte [ di+OPRND.sizearg ], SIZ_NONE 0 00002178 750C jne .notsize ; if already have a size qualifier ("BYTE PTR",...) 0 0000217A 57 push di 0 0000217B BF[7001] mov di, sizetcnam 0 0000217E B90800 mov cx, sizetcnam_size_w 0 00002181 F2AF repne scasw 0 00002183 5F pop di 0 00002184 742D je .size ; if found --> 1102 .notsize: 1103 .checkdist: 0 00002186 F6450107 test byte [ di + OPRND.distflags ], odfShort | odfNear | odfFar 0 0000218A 7541 jnz .notdist 0 0000218C 57 push di 0 0000218D BF[8001] mov di, distnam 0 00002190 B90300 mov cx, distnam_size_w 0 00002193 F2AF repne scasw 0 00002195 5F pop di 0 00002196 7535 jne .notdist 0 00002198 85C9 test cx, cx 0 0000219A 7509 jnz .dist ; if not "FA" 0 0000219C 8A4402 mov al, byte [ si+2 ] 0 0000219F 24DF and al, TOUPPER 0 000021A1 3C52 cmp al, 'R' 0 000021A3 7528 jne .notdist ; if not "FAR" (could be hexadecimal) --> 1118 .dist: 1119 ; 0 = far, 1 = near, 2 = short 0 000021A5 80E902 sub cl, distnam_size_w - 1 1121 ; -2 = far, -1 = near, -0 = short 0 000021A8 F6D9 neg cl 1123 ; 2 = far, 1 = near, 0 = short 0 000021AA B501 mov ch, 1 0 000021AC D2E5 shl ch, cl 1126 ; 4 = far, 2 = near, 1 = short 1127 ; 1128 ; This matches odfFar = 4, odfNear = 2, odfShort = 1 0 000021AE 086D01 or byte [ di + OPRND.distflags ], ch 0 000021B1 EB08 jmp .skipptr 1131 1132 .size: 0 000021B3 80E908 sub cl, sizetcnam_size_w 0 000021B6 F6D9 neg cl ; convert to 1..8 0 000021B8 884D02 mov byte [ di+OPRND.sizearg ], cl 1136 .skipptr: 0 000021BB E8[0000] call skipalpha ; go to next token 0 000021BE 8A24 mov ah, byte [si] 0 000021C0 25DFDF and ax, TOUPPER_W 0 000021C3 3D5054 cmp ax, "PT" 0 000021C6 7503 jne ab05_j1 ; if not "PTR" 1142 .skipalpha: 0 000021C8 E8[0000] call skipalpha ; go to next token (ignore "PTR") 1144 ab05_j1: equ $ 0 000021CB EB96 jmp ab05_keyword_loop 1146 1147 .notdist: 0 000021CD E80400 call ab08_keyword_seg 0 000021D0 7531 jne ab09_keyword_done ; not a segment prefix --> 0 000021D2 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 000021D4 803E[0500]00 cmp byte [ aa_seg_pre ], 0 0 000021D9 7525 jne .ret ; if we already have a segment prefix --> (NZ) 0 000021DB 57 push di 0 000021DC BF[4C01] mov di, segrgnam 1168 %ifdef MN_GS 0 000021DF B90600 mov cx, N_SEGREGS 1170 %else 1171 mov cx, N_SEGREGS - 2 1172 %endif 0 000021E2 F2AF repne scasw 0 000021E4 5F pop di 0 000021E5 7519 jne .ret ; if not found --> (NZ) 0 000021E7 56 push si ; save si in case there's no colon 0 000021E8 AD lodsw ; skip "?s" 0 000021E9 E8[0000] call skipwhite 0 000021EC 3C3A cmp al, ':' 0 000021EE 7511 jne .retpopsi ; if not followed by ':' --> (NZ) 0 000021F0 58 pop ax ; discard saved si 0 000021F1 E8[0000] call skipwhite ; skip it 0 000021F4 BB[FFFF] mov bx, prefixlist.after_segment - 1 0 000021F7 29CB sub bx, cx 0 000021F9 8A07 mov al, byte [ bx ] ; look up the prefix byte 0 000021FB A2[0500] mov byte [ aa_seg_pre ], al ; save it away 0 000021FE 38C0 cmp al, al ; ZR, valid segment prefix 1188 .ret: 0 00002200 C3 retn 1190 1191 .retpopsi: 0 00002201 5E pop si 0 00002202 C3 retn 1194 1195 ; Begin parsing main part of argument. 1196 1197 ; First check registers. 1198 ab09_keyword_done: 0 00002203 57 push di ; check for solo registers 0 00002204 BF[2C01] mov di, rgnam816 0 00002207 B91B00 mov cx, N_ALLREGS ; 27 0 0000220A E8EF0A call aagetreg 0 0000220D 5F pop di 0 0000220E 727F jc ab14_not_reg ; if not a register 0 00002210 800D04 or byte [di+OPRND.flags], ARG_JUSTREG 0 00002213 885D04 mov byte [di+OPRND.reg1], bl ; save register number 0 00002216 80FB18 cmp bl, 24 ; 0..23 = AL..DH, AX..DI, EAX..EDI 0 00002219 730B jae .ab09a ; if it's not a normal register 0 0000221B 93 xchg ax, bx ; mov al, bl 0 0000221C B103 mov cl, 3 0 0000221E D2E8 shr al, cl ; al = size: 0 -> byte, 1 -> word, 2 -> dword 0 00002220 04FE add al, -2 0 00002222 1403 adc al, 3 ; convert to 1, 2, 4 (respectively) 1214 ; matching SIZ_BYTE, SIZ_WORD, SIZ_DWORD 0 00002224 EB5A jmp short ab13_handle_size 1216 1217 .ab09a: 0 00002226 80350C xor byte [di+OPRND.flags], ARG_JUSTREG|ARG_WEIRDREG 0 00002229 B002 mov al, SIZ_WORD ; register size 0 0000222B 80FB1E cmp bl, REG_ST ; 24..29 = segment registers 0 0000222E 7737 ja ab11_special_reg; if it's MM, CR, DR, or TR --> 0 00002230 740C je .ab09b ; if it's ST --> 0 00002232 80FB1C cmp bl, 28 0 00002235 7249 jb ab13_handle_size; if it's a non-386 segment register --> 0 00002237 800E[0300]20 or byte [asm_mn_flags], AMF_FSGS ; else flag it 0 0000223C EB42 jmp short ab13_handle_size 1227 1228 ; ST registers 1229 .ab09b: 0 0000223E AC lodsb 1231 ; Check for NASM FPU register notation: ST0..ST7 0 0000223F 3C30 cmp al, '0' ; digit following ? 0 00002241 720B jb .par 0 00002243 3C37 cmp al, '7' 0 00002245 7707 ja .par ; no --> 0 00002247 2C30 sub al, '0' 0 00002249 884505 mov byte [di+OPRND.reg2], al ; save number 0 0000224C EB30 jmp short ab12_size_0 ; --> 1239 1240 .par: 1241 ; Check for MASM FPU register notation: ST(0)..ST(7) 0 0000224E 3C28 cmp al, '(' ; parenthesis following ? 0 00002250 7403 je .ispar ; yes --> 1244 ; Plain ST (= ST0) 0 00002252 4E dec si 0 00002253 EB29 jmp short ab12_size_0 1247 1248 .ispar: 0 00002255 AC lodsb ; get digit 0 00002256 2C30 sub al, '0' 0 00002258 3C07 cmp al, 7 0 0000225A 7708 ja ab10_error ; if not 0..7 0 0000225C 884505 mov byte [di+OPRND.reg2], al ; save the number 0 0000225F AC lodsb 0 00002260 3C29 cmp al, ')' ; validate that there's a closing parenthesis 0 00002262 741A je ab12_size_0 ; okay --> 1257 ab10_error: 1258 aa24_j2: 0 00002264 E974FE jmp aa24_error ; error 1260 1261 ; other registers: 31..34 (MM, CR, DR, TR) 1262 ab11_special_reg: 0 00002267 AC lodsb 0 00002268 2C30 sub al, '0' ; get digit 0 0000226A 3C07 cmp al, 7 0 0000226C 77F6 ja ab10_error ; if error --> 0 0000226E 884505 mov byte [di+OPRND.reg2], al ; save the number 0 00002271 B004 mov al, SIZ_DWORD ; register size 0 00002273 80FB1F cmp bl, REG_MM 0 00002276 7508 jne ab13_handle_size; if not MM register 0 00002278 800D04 or byte [di+OPRND.flags], ARG_JUSTREG 0 0000227B B005 mov al, SIZ_QWORD 0 0000227D A9 db __TEST_IMM16 ; (skip mov) 1274 ab12_size_0: 0 0000227E B000 mov al, 0 ; size for ST registers 1276 ab13_handle_size: 0 00002280 3A4502 cmp al, byte [di+OPRND.sizearg] ; compare with stated size 0 00002283 7407 je .ab13a ; if same 0 00002285 864502 xchg al, byte [di+OPRND.sizearg] 0 00002288 84C0 test al, al ; SIZ_NONE ? 0 0000228A 75D8 jnz ab10_error ; if wrong size given, error --> 1282 .ab13a: 0 0000228C E96C02 jmp ab44 ; done with this operand 1284 1285 ; It's not a register reference. Try for a number. 1286 ab14_not_reg: 0 0000228F AC lodsb 0 00002290 E88B09 call aaifnum 0 00002293 7236 jc ab17_not_num ; it's not a number 1290 0 00002295 E8AA09 call aageti ; get the number 0 00002298 884D07 mov byte [di+OPRND.orednum], cl 0 0000229B 895D08 mov word [di+OPRND.num+0], bx 0 0000229E 89550A mov word [di+OPRND.num+2], dx 0 000022A1 E8[0000] call skipwh0 0 000022A4 80F902 cmp cl, 2 0 000022A7 7F22 jg ab17_not_num ; if we can't have a colon here 0 000022A9 3C3A cmp al, ':' 0 000022AB 751E jne ab17_not_num ; if not xxxx:yyyy 0 000022AD E8[0000] call skipwhite 0 000022B0 E88F09 call aageti 0 000022B3 8B4D08 mov cx, word [di+OPRND.num+0] 0 000022B6 894D05 mov word [di+OPRND.num2], cx 0 000022B9 895D08 mov word [di+OPRND.num+0], bx 0 000022BC 89550A mov word [di+OPRND.num+2], dx 0 000022BF 800D20 or byte [di+OPRND.flags], ARG_FARADDR 0 000022C2 E93502 jmp ab43 ; done with this operand 1308 1309 ab15: 0 000022C5 E9E600 jmp ab30 ; do post-processing 1311 1312 ; Check for [...]. 1313 ab16_loop_bracket: 0 000022C8 E8[0000] call skipwhite 1315 ab17_not_num: 0 000022CB 3C5B cmp al, '[' ; begin loop over sets of [] 0 000022CD 75F6 jne ab15 ; if not [ 0 000022CF 800D01 or byte [di+OPRND.flags], ARG_DEREF ; set the flag 1319 1320 ; Process NASM segment prefix inside brackets if any 0 000022D2 E8[0000] call skipwhite 0 000022D5 8A24 mov ah, byte [si] 0 000022D7 25DFDF and ax, TOUPPER_W 0 000022DA 4E dec si ; set up for ab08 0 000022DB E8F6FE call ab08_keyword_seg 0 000022DE 7403 jz ab19 ; if segment prefix (called skipwhite) 1327 ab18: 0 000022E0 E8[0000] call skipwhite 1329 ab19: 0 000022E3 3C5D cmp al, ']' ; begin loop within [] 0 000022E5 74E1 je ab16_loop_bracket ; if done 1332 0 000022E7 4E dec si 0 000022E8 8B04 mov ax, word [ si ] 0 000022EA 25DFDF and ax, TOUPPER_W 1336 .checksize: 0 000022ED 807D0300 cmp byte [ di + OPRND.sizedis ], SIZ_NONE 0 000022F1 7527 jne .notsize ; if already have a size qualifier ("BYTE PTR",...) 0 000022F3 57 push di 0 000022F4 BF[7001] mov di, sizedisnam 0 000022F7 B90400 mov cx, sizedisnam_size_w 0 000022FA F2AF repne scasw 0 000022FC 5F pop di 0 000022FD 751B jne .notsize 1345 1346 .size: 0 000022FF 80E904 sub cl, sizedisnam_size_w 0 00002302 F6D9 neg cl ; convert to 1..8 0 00002304 884D03 mov byte [ di + OPRND.sizedis ], cl 1350 .skipptr: 0 00002307 E8[0000] call skipalpha ; go to next token 0 0000230A 8A24 mov ah, byte [si] 0 0000230C 25DFDF and ax, TOUPPER_W 0 0000230F 3D5054 cmp ax, "PT" 0 00002312 7503 jne ab28_j1 ; if not "PTR" 0 00002314 E8[0000] call skipalpha ; go to next token (ignore "PTR") 1357 ab28_j1: equ $ 0 00002317 E98600 jmp ab28 1359 1360 .notsize: 1361 ; Check for a register (within []). 0 0000231A 57 push di 0 0000231B BF[3C01] mov di, rgnam16 0 0000231E B90800 mov cx, N_REGS16 0 00002321 E8D809 call aagetreg 0 00002324 5F pop di 0 00002325 7244 jc ab25 ; if not a register 0 00002327 80FB10 cmp bl, 16 0 0000232A 7305 jae ab20 ; if 32-bit register 0 0000232C 80C308 add bl, 8 ; adjust 0..7 to 8..15 0 0000232F EB1E jmp short ab21 1372 ab20: 0 00002331 807D0500 cmp byte [di+OPRND.reg2], 0 0 00002335 7518 jnz ab21 ; if we already have an index 0 00002337 E8[0000] call skipwhite 0 0000233A 4E dec si 0 0000233B 3C2A cmp al, '*' 0 0000233D 7510 jne ab21 ; if not followed by '*' 0 0000233F 46 inc si 0 00002340 885D05 mov byte [di+OPRND.reg2], bl ; save index register 0 00002343 E8[0000] call skipwhite 0 00002346 E8F908 call aageti 0 00002349 E88E09 call aaconvindex 0 0000234C 4E dec si 0 0000234D EB14 jmp short ab23 ; ready for next part 1386 1387 ab21: 0 0000234F 807D0400 cmp byte [di+OPRND.reg1], 0 0 00002353 7505 jne ab22 ; if there's already a register 0 00002355 885D04 mov byte [di+OPRND.reg1], bl 0 00002358 EB09 jmp ab23 1392 ab22: 0 0000235A 807D0500 cmp byte [di+OPRND.reg2], 0 0 0000235E 7508 jne ab24 ; if too many registers 0 00002360 885D05 mov byte [di+OPRND.reg2], bl 1396 ab23: 0 00002363 E8[0000] call skipwhite 0 00002366 EB38 jmp short ab28 ; ready for next part 1399 1400 ab24: 1401 aa24_j3: 0 00002368 E970FD jmp aa24_error ; error 1403 1404 ; Try for a number (within []). 1405 ab25: 0 0000236B AC lodsb 1407 ab26: 0 0000236C E8D308 call aageti ; get a number (or flag an error) 0 0000236F E8[0000] call skipwh0 0 00002372 3C2A cmp al, '*' 0 00002374 740B je ab27 ; if it's an index factor 0 00002376 084D07 or byte [di+OPRND.orednum], cl 0 00002379 015D08 add word [di+OPRND.num+0], bx 0 0000237C 11550A adc word [di+OPRND.num+2], dx 0 0000237F EB1F jmp short ab28 ; next part ... 1416 1417 ab27: 0 00002381 E85609 call aaconvindex 0 00002384 E8[0000] call skipwhite 0 00002387 4E dec si 0 00002388 57 push di 0 00002389 BF[3C01] mov di, rgnam16 0 0000238C 31C9 xor cx, cx 0 0000238E E86B09 call aagetreg 0 00002391 5F pop di 0 00002392 72D4 jc ab24 ; if error 0 00002394 807D0500 cmp byte [di+OPRND.reg2], 0 0 00002398 75CE jne ab24 ; if there is already a register 0 0000239A 885D05 mov byte [di+OPRND.reg2], bl 0 0000239D E8[0000] call skipwhite 1431 1432 ; Ready for the next term within []. 1433 ab28: 0 000023A0 3C2D cmp al, '-' 0 000023A2 74C8 je ab26 ; if a (negative) number is next 0 000023A4 3C2B cmp al, '+' 0 000023A6 7503 jne ab29 ; if no next term (presumably) 0 000023A8 E935FF jmp ab18 1439 ab29: 0 000023AB E935FF jmp ab19 ; back for more 1441 1442 ; Post-processing for complicated arguments. 1443 ab30: 0 000023AE 837D0400 cmp word [di+OPRND.reg1], 0 0 000023B2 756D jne ab32 ; if registers were given ( ==> create MOD R/M) 0 000023B4 807D0700 cmp byte [di+OPRND.orednum], 0 0 000023B8 7424 je ab31 ; if nothing was given ( ==> error) 0 000023BA 803D00 cmp byte [di+OPRND.flags], 0 0 000023BD 7506 jne ab30b ; if it was not immediate 0 000023BF 800D10 or byte [di+OPRND.flags], ARG_IMMED 1451 ab30a: 0 000023C2 E93501 jmp ab43 ; done with this argument 1453 ab30b: 0 000023C5 800E[0300]80 or byte [asm_mn_flags], AMF_ADDR 0 000023CA B002 mov al, 2 ; size of the displacement 0 000023CC F6450704 test byte [di+OPRND.orednum], 4 0 000023D0 7407 jz ab30c ; if no 32-bit displacement --> 0 000023D2 40 inc ax 0 000023D3 40 inc ax ; al = 4 0 000023D4 800E[0300]04 or byte [asm_mn_flags], AMF_A32 ; 32-bit addressing 1461 ab30c: 0 000023D9 E80400 call ab_set_sizedis.offset_only 0 000023DC EBE4 jmp short ab30a ; done with this argument 1464 ab31: 0 000023DE 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 000023E0 384503 cmp byte [di + OPRND.sizedis], al 0 000023E3 743B je .skip 0 000023E5 807D0304 cmp byte [di + OPRND.sizedis], SIZ_DWORD 0 000023E9 7408 je .a32 0 000023EB 807D0300 cmp byte [di + OPRND.sizedis], SIZ_NONE 0 000023EF 75ED jne ab31 0 000023F1 EB2A jmp .set_al 1480 1481 .a32: 0 000023F3 800E[0300]04 or byte [asm_mn_flags], AMF_A32 ; 32-bit addressing 0 000023F8 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 000023F9 807D0300 cmp byte [di + OPRND.sizedis], SIZ_NONE 0 000023FD 741B je .set_al_cx ; trivial case --> 0 000023FF 384503 cmp byte [di + OPRND.sizedis], al 0 00002402 72DA jb ab31 ; specified is smaller than needed --> 0 00002404 7414 je .set_al_cx ; same specified as needed --> 1501 1502 ; cannot get here if al = SIZ_DWORD 0 00002406 8A4503 mov al, byte [di + OPRND.sizedis] ; get forced size 0 00002409 80E13F and cl, ~ (11b << 6) 0 0000240C 80C940 or cl, 01b << 6 ; set Mod=01b (prepare for byte size) 0 0000240F 3C01 cmp al, SIZ_BYTE ; byte size ? 0 00002411 7407 je .set_al_cx ; yes --> 0 00002413 38E0 cmp al, ah ; word/dword size ? 0 00002415 75C7 jne ab31 ; no, error --> 1510 .set_modify_cx_2: 0 00002417 80F1C0 xor cl, 11b << 6 ; set Mod=10b 1512 1513 .set_al_cx: 0 0000241A 894D04 mov word [di+OPRND.reg1], cx ; store MOD R/M and maybe SIB 1515 .set_al: 0 0000241D 884503 mov byte [di + OPRND.sizedis], al ; store displacement size 1517 .skip: 0 00002420 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 00002421 800D02 or byte [di+OPRND.flags], ARG_MODRM 0 00002424 8A4504 mov al, byte [di+OPRND.reg1] 0 00002427 0A4505 or al, byte [di+OPRND.reg2] 0 0000242A A810 test al, 10h 0 0000242C 7525 jnz ab34 ; if 32-bit addressing 0 0000242E F6450704 test byte [di+OPRND.orednum], 4 0 00002432 751F jnz ab34 ; if 32-bit addressing 0 00002434 800E[0300]80 or byte [asm_mn_flags], AMF_ADDR 0 00002439 8B4504 mov ax, word [di+OPRND.reg1] ; get reg1 and reg2 0 0000243C 38E0 cmp al, ah 0 0000243E 7702 ja ab33 ; make sure al >= ah 0 00002440 86C4 xchg al, ah 1536 ab33: 0 00002442 57 push di 0 00002443 BF[3A00] mov di, modrmtab 0 00002446 B90800 mov cx, 8 0 00002449 F2AF repne scasw 0 0000244B 5F pop di 0 0000244C 7590 jne ab31 ; if not among the possibilities (error) 0 0000244E BB0602 mov bx, 206h ; max disp = 2 bytes; 6 ==> (non-existent) [bp] 0 00002451 EB65 jmp short ab39 ; done (just about) 1545 1546 ; 32-bit addressing 1547 ab34: 0 00002453 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 00002458 BB0504 mov bx, 405h ; max disp = 4 bytes; 5 ==> (non-existent) [bp] 0 0000245B 807D0500 cmp byte [di+OPRND.reg2], 0 0 0000245F 7513 jne ab36 ; if there's a SIB 0 00002461 8A4D04 mov cl, byte [di+OPRND.reg1] 0 00002464 80F910 cmp cl, 16 0 00002467 7D03E972FF jl ab31 ; if wrong register type 0 0000246C 80E107 and cl, 7 0 0000246F 80F904 cmp cl, 4 ; check for ESP 0 00002472 7544 jne ab39 ; if not, then we're done (otherwise do SIB) 1567 1568 ab36: 0 00002474 800E[0300]08 or byte [asm_mn_flags], AMF_SIB ; form SIB 0 00002479 8A6D06 mov ch, byte [di+OPRND.index] ; get SS bits 0 0000247C B103 mov cl, 3 0 0000247E D2E5 shl ch, cl ; shift them halfway into place 0 00002480 8A4505 mov al, byte [di+OPRND.reg2] ; index register 0 00002483 3C14 cmp al, 20 0 00002485 7503E954FF je ab31 ; if ESP ( ==> error) 0 0000248A 3C00 cmp al, 0 0 0000248C 7502 jne ab37 ; if not zero 0 0000248E B014 mov al, 20 ; set it for index byte 4 1579 ab37: 0 00002490 3C10 cmp al, 16 0 00002492 7D03E947FF jl ab31 ; if wrong register type 0 00002497 2407 and al, 7 0 00002499 08C5 or ch, al ; put it into the SIB 0 0000249B D2E5 shl ch, cl ; shift it into place 0 0000249D 41 inc cx ; R/M for SIB = 4 0 0000249E 8A4504 mov al, byte [di+OPRND.reg1] ; now get the low 3 bits 0 000024A1 84C0 test al, al 0 000024A3 7505 jnz ab38 ; if there was a first register 0 000024A5 80CD05 or ch, 5 0 000024A8 EB4B jmp short ab42_no_pop ; MOD = 0, disp is 4 bytes 1591 1592 ab38: 0 000024AA 3C10 cmp al, 16 0 000024AC 7C68 jl ab45 ; if wrong register type 0 000024AE 2407 and al, 7 ; first register 0 000024B0 08C5 or ch, al ; put it into the SIB 0 000024B2 88FC mov ah, bh ; longest displacement 0 000024B4 3C05 cmp al, 5 0 000024B6 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 000024B8 88FC mov ah, bh ; longest displacement 0 000024BA 38D9 cmp cl, bl 0 000024BC 7402 je ab40 ; if it's [(E)BP], then disp=0 is still 1 byte 0 000024BE B300 mov bl, 0 ; allow 0-byte disp 1608 1609 ab40: 0 000024C0 50 push ax 0 000024C1 51 push cx 0 000024C2 8A4508 mov al, byte [di+OPRND.num+0] 0 000024C5 B107 mov cl, 7 0 000024C7 D2F8 sar al, cl 0 000024C9 59 pop cx 0 000024CA 8A6509 mov ah, byte [di+OPRND.num+1] 0 000024CD 38E0 cmp al, ah 0 000024CF 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 000024D1 F606[0300]04 testopt [asm_mn_flags], AMF_A32 0 000024D6 7506 jnz @F 0 000024D8 837D0A00 cmp word [di + OPRND.num + 2], 0 1625 ; high word is zero ? 0 000024DC 7405 je @FF ; yes, do not require sign extension --> 1627 @@: 0 000024DE 3B450A cmp ax, word [di + OPRND.num + 2] 1629 ; high word is sign extension ? 0 000024E1 750E jne ab41 ; no, need more than 1 byte --> 1631 @@: 0 000024E3 B700 mov bh, 0 ; no displacement 0 000024E5 0A5D08 or bl, byte [di+OPRND.num+0] 0 000024E8 740A jz ab42 ; if disp = 0 and it's not (E)BP 0 000024EA FEC7 inc bh ; disp = 1 byte 0 000024EC 80C940 or cl, 40h ; set MOD = 1 0 000024EF EB03 jmp short ab42 ; done 1638 1639 ab41: 0 000024F1 80C980 or cl, 80h ; set MOD = 2 1641 1642 ab42: 0 000024F4 58 pop ax ; ah = max displacement 1644 ab42_no_pop: ; here bh = SIZ_DWORD 0 000024F5 88F8 mov al, bh ; al = displacement, ah = max displacement 0 000024F7 E8FFFE call ab_set_sizedis.modrm 1647 1648 ; Finish up with the operand. 1649 ab43: 0 000024FA 4E dec si 1651 ab44: 0 000024FB E8[0000] call skipwhite 0 000024FE 83C70C add di, byte OPRND_size 0 00002501 E8[0000] call iseol? 0 00002504 7413 je ab99_match_args ; if end of line --> 0 00002506 3C2C cmp al, ',' 0 00002508 750C jne ab45 ; if not comma ( ==> error) 0 0000250A 81FF[2400] cmp di, line_out+3*OPRND_size 0 0000250E 7306 jae ab45 ; if too many operands 0 00002510 E8[0000] call skipwhite 0 00002513 E93CFC jmp ab02_process_loop 1662 1663 ab45: 0 00002516 E9C2FB jmp aa24_error ; error jump 1665 1666 ab99_match_args: 0 00002519 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 0000251C 31C0 xor ax, ax 0 0000251E BF[0800] mov di, rmaddr 0 00002521 B90800 mov cx, 8 0 00002524 F3AB rep stosw ; clear variant-specific variables 1694 ; cx = 0 0 00002526 8B36[0600] mov si, word [mneminfo] 1696 ; -> the next argument variant 1697 %if _ASM_ESCAPE_USED 0 0000252A 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 0000252C AC lodsb 1707 %if _ASM_ESCAPE_USED 0 0000252D 3CF4 cmp al, ASM_ESCAPE 0 0000252F 750B jne .notescape 0 00002531 81C300F4 add bx, ASM_ESCAPE << 8 0 00002535 83D100 adc cx, byte 0 0 00002538 7219 jc ac04 ; if this branches, too many escapes --> 0 0000253A EBF0 jmp short ac02 1714 .notescape: 1715 %endif 0 0000253C 2CF5 sub al, ASM_MACH1 0 0000253E 7216 jb ac05 ; if no more special bytes 0 00002540 3C06 cmp al, ASM_LOCKABLE-ASM_MACH1 0 00002542 7408 je ac03 ; if ASM_LOCKABLE 0 00002544 770D ja ac04 ; if ASM_END or another (--> error) 0 00002546 40 inc ax 0 00002547 A2[1000] mov byte [dismach], al ; save machine type 0 0000254A EBE0 jmp short ac02 ; back for next byte 1724 ac03: 0 0000254C 800E[1400]01 or byte [varflags], VAR_LOCKABLE 0 00002551 EBD9 jmp short ac02 ; back for next byte 1727 1728 ac04: 0 00002553 E927FB jmp aa13a_error ; error 1730 1731 ; Get and unpack the word. 1732 ac05: 0 00002556 4E dec si 0 00002557 AD lodsw 0 00002558 86C4 xchg al, ah ; put into little-endian order 0 0000255A 31D2 xor dx, dx 1737 %if _ASM_ESCAPE_USED 0 0000255C 01D8 add ax, bx ; add in the ASM_ESCAPE adjustment 0 0000255E 11CA adc dx, cx ; account for overflow (cx = 0) 1740 %endif 0 00002560 BB8600 mov bx, ASMMOD 0 00002563 F7F3 div bx ; ax = a_opcode; dx = index into opindex 0 00002565 A3[1A00] mov word [a_opcode], ax ; save ax 0 00002568 A3[1C00] mov word [a_opcode2], ax ; save the second copy 0 0000256B 3DDF00 cmp ax, 0DFh ; a coprocessor instruction ? 0 0000256E 7717 ja ac05a 0 00002570 3CD8 cmp al, 0D8h 0 00002572 7213 jb ac05a ; if no coprocessor instruction --> 0 00002574 800E[1100]01 or byte [dmflags], DM_COPR ; flag it as an x87 instruction 0 00002579 88C4 mov ah, al ; ah = low order byte of opcode 0 0000257B AC lodsb ; get extra byte 0 0000257C A2[0A00] mov byte [regmem], al ; save it in regmem 0 0000257F A3[1C00] mov word [a_opcode2], ax ; save this for obsolete-instruction detection 0 00002582 800E[1400]02 or byte [varflags], VAR_MODRM ; flag its presence 1755 ac05a: 0 00002587 8936[0600] mov [mneminfo], si ; save si back again 0 0000258B 89D6 mov si, dx 1758 %if ASMMOD > 0FFh 1759 xor bx, bx 1760 %endif 0 0000258D 8A9C[7C16] mov bl, byte [opindex+si] 0 00002591 01D2 add dx, dx 0 00002593 4A dec dx 0 00002594 01D3 add bx, dx ; adjust to get correct index into oplists 0 00002596 8DB7[0000] lea si, [oplists+bx] ; si = the address of our operand list 0 0000259A 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 0000259D AC lodsb ; get next operand byte 0 0000259E 3C00 cmp al, OP_END 0 000025A0 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 000025A2 3C24 cmp al, OP_STACK_PUSH 0 000025A4 7204 jb @F ; below stack hinting operand types --> 0 000025A6 3C26 cmp al, OP_STACK_SPECIAL 0 000025A8 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 000025AA 803DFF cmp byte [di+OPRND.flags], -1 0 000025AD 7468 je ac01_j1 ; if too few operands were given 0 000025AF 3C40 cmp al, OP_SIZE 0 000025B1 720E jb ac07 ; if no size needed 1800 %if 1 0 000025B3 B400 mov ah, 0 0 000025B5 B104 mov cl, 4 0 000025B7 D3E0 shl ax, cl ; move bits 4..7 (size) to ah (OP_1632=5, OP_8=6, OP_16=7, ...) 0 000025B9 D2E8 shr al, cl ; move bits 0..3 back 1805 %else 1806 aam 16 ; ax=00XY -> ax=0X0Y 1807 %endif 0 000025BB 8826[1800] mov byte [a_reqsize], ah ; save it away 0 000025BF EB02 jmp short ac08 1810 1811 ac07: ; al = OP_M64.. 1812 ; have al = 1..x 1813 ; want al = 16..y 0 000025C1 040F add al, 16-1 ; adjust for the 16 start entries in asmjmp 1815 1816 ac08: 0 000025C3 98 cbw ; al = 0..7 or 16..y, 1818 ; al < 128, thus ax = al 0 000025C4 93 xchg ax, bx ; now bx contains the index 0 000025C5 8A87[4E00] mov al, byte [bittab+bx] 0 000025C9 D1E3 shl bx, 1 ; = offset into word array 0 000025CB 8B8F[9200] mov cx, word [asmjmp + bx] 1823 ; subroutine address 0 000025CF D1EB shr bx, 1 ; return to index 0 000025D1 83FB43 cmp bx, OP_AMOUNT_TABLE 0 000025D4 7335 jae ac09_internal_error ; internal error 0 000025D6 8405 test al, byte [di+OPRND.flags] 0 000025D8 743D jz ac09 ; if no required bits are present 0 000025DA B400 mov ah, 0 ; (insure ah = 0 for ao90) 0 000025DC FFD1 call cx ; call its specific routine 0 000025DE A0[1500] mov al, [alloweddist] 0 000025E1 F6D0 not al 0 000025E3 2407 and al, odfShort | odfNear | odfFar 0 000025E5 844501 test byte [di + OPRND.distflags], al 0 000025E8 752D jnz ac09 ; if invalid distance specified --> 1836 0 000025EA A1[1600] mov ax, word [modrmalready] 0 000025ED F6450108 test byte [di + OPRND.distflags], odfModRM 0 000025F1 7405 jz @F 0 000025F3 3D00FF cmp ax, 0FF00h ; modrmflag set, modrmalready clear ? 0 000025F6 751F jne ac09 ; no --> 1842 @@: 0 000025F8 08E0 or al, ah ; al |= prior modrmflag 0 000025FA B400 mov ah, 0 ; clear modrmflag 0 000025FC A3[1600] mov word [modrmalready], ax 1846 0 000025FF 817CFF5456 cmp word [si-1], (OP_1632|OP_R)<<8|(OP_1632|OP_R_MOD) 0 00002604 7403 je ac06_j1 ; (hack) for IMUL instruction 0 00002606 83C70C add di, byte OPRND_size 1850 ; -> next operand 1851 ac06_j1: 0 00002609 EB92 jmp ac06 ; back for more 1853 1854 ac09_internal_error: 0 0000260B B80D01 mov ax, 010Dh 0 0000260E E8[0000] call setrc 0 00002611 BA[0000] mov dx, msg.aa_internal_error 0 00002614 E8[0000] call putsz 1859 ac09: 1860 ac01_j1: 0 00002617 E902FF jmp ac01 ; back to next possibility 1862 1863 ; End of operand list. 1864 ac10: 0 0000261A 803DFF cmp byte [di+OPRND.flags], -1 0 0000261D 75F8 jne ac09 ; if too many operands were given 1867 0 0000261F F606[1400]02 test byte [varflags], VAR_MODRM 0 00002624 740C jz @F ; if no ModR/M --> 0 00002626 803E[0A00]C0 cmp byte [regmem], 0C0h 0 0000262B 7205 jb @F ; if not both high bits set --> 1872 ; both bits are set, ModR/M is for a register operand 0 0000262D 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 00002632 A0[1400] mov al, byte [varflags] 0 00002635 A810 test al, VAR_SIZ_NEED 0 00002637 7414 jz ac12 ; if no size needed 0 00002639 A804 test al, VAR_SIZ_GIVN 0 0000263B 7510 jnz ac12 ; if a size was given 0 0000263D A808 test al, VAR_SIZ_FORCD 0 0000263F 74D6 jz ac09 ; if the size was not forced ( ==> reject) 0 00002641 8B36[0600] mov si, word [mneminfo] 0 00002645 803CFF cmp byte [si], ASM_END 0 00002648 7403 je ac12 ; if this is the last one 1888 ac11: 0 0000264A E930FA jmp aa13a_error ; it was not, error --> (not a retry) 1890 1891 ac12: 0 0000264D A880 test al, VAR_M_ALWAYS_16 0 0000264F 740E jz @F 0 00002651 A0[1300] mov al, byte [opsize] 0 00002654 3C00 cmp al, SIZ_NONE 0 00002656 7407 je @F 0 00002658 3C02 cmp al, SIZ_WORD 0 0000265A 7403 je @F 0 0000265C E91EFA jmp aa13a_error 1900 @@: 1901 1902 ; Check other prefixes. 0 0000265F A0[0400] mov al, byte [aa_saved_prefix] 0 00002662 3C00 cmp al, 0 0 00002664 7421 je ac14 ; if no saved prefixes to check 0 00002666 3CF0 cmp al, 0F0h 0 00002668 7509 jne ac13 ; if it's a rep prefix 0 0000266A F606[1400]01 test byte [varflags], VAR_LOCKABLE 0 0000266F 74D9 jz ac11 ; if this variant is not lockable, error --> 0 00002671 EB14 jmp short ac14 ; done 1911 1912 ac13: 0 00002673 A1[1A00] mov ax, word [a_opcode] ; check if opcode is OK for rep{,z,nz} 0 00002676 24FE and al, ~1 ; clear low order bit (MOVSW -> MOVSB) 1915 0 00002678 3DFF00 cmp ax, 0FFh 0 0000267B 77CD ja ac11 ; if it's not a 1-byte instruction, error --> 0 0000267D BF[0000] mov di, replist ; list of instructions that go with rep 0 00002680 B9[0000] mov cx, REP_LEN ; scan all (REP + REPxx) 0 00002683 F2AE repne scasb 0 00002685 75C3 jne ac11 ; if it's not among them, error --> 1922 1923 ac14: 0 00002687 F606[0300]10 test byte [asm_mn_flags], AMF_MSEG 0 0000268C 7412 jz ac15 ; if no segment prefix before mnemonic --> 0 0000268E A1[1A00] mov ax, word [a_opcode] ; check if opcode allows this 0 00002691 3DFF00 cmp ax, 0FFh 0 00002694 77B4 ja ac11 ; if it's not a 1-byte instruction, error --> 0 00002696 BF[0000] mov di, segprfxtab 0 00002699 B9[0000] mov cx, SEGP_LEN 0 0000269C F2AE repne scasb 0 0000269E 75AA jne ac11 ; if it's not in the list, error --> 1933 1934 ac15: 0 000026A0 8B1E[0C00] mov bx, word [immaddr] 0 000026A4 09DB or bx, bx 0 000026A6 740C jz ac16 ; if no immediate data 0 000026A8 A0[1300] mov al, byte [opsize] 0 000026AB F6D8 neg al 0 000026AD 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 000026AF 844707 test al, byte [bx + OPRND.orednum] 0 000026B2 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: 0 000026B4 66 _386_PM_o32 ; mov edi, dword [a_addr] 0 000026B5 8B3E[0000] mov di, word [a_addr] 1957 %if _PM 0 000026B9 8B1E[0400] mov bx, word [a_addr + saSegSel] 0 000026BD E8[0000] call verifysegm_or_error 0 000026C0 8EC3 mov es, bx 1961 %else 1962 mov es, word [a_addr + saSegSel] 1963 %endif 0 000026C2 F606[0300]02 test byte [asm_mn_flags], AMF_WAIT 0 000026C7 7404 jz .nowaitprefix ; if no wait instruction beforehand 0 000026C9 B09B mov al, 9Bh 0 000026CB 67 _386_PM_a32 0 000026CC AA stosb 1969 .nowaitprefix: 1970 0 000026CD A0[0400] mov al,[aa_saved_prefix] 0 000026D0 84C0 test al, al 0 000026D2 7402 jz .noprefix ; if no LOCK or REP prefix 0 000026D4 67 _386_PM_a32 0 000026D5 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 000026D6 A0[0300] mov al, byte [asm_mn_flags] 0 000026D9 A880 test al, AMF_ADDR 0 000026DB 7410 jz .noaddressprefix 0 000026DD 2404 and al, AMF_A32 1986 %if _PM 0 000026DF 0A06[0000] or al, byte [bCSAttr] 0 000026E3 7408 jz .noaddressprefix ; if 16-bit CS and 16-bit addressing --> 0 000026E5 3C44 cmp al, AMF_A32| 40h 0 000026E7 7404 jz .noaddressprefix ; if 32-bit CS and 32-bit addressing --> 1991 %else 1992 jz .noaddressprefix ; 16-bit addressing in RM --> 1993 %endif 1994 ; Otherwise, the CS and addressing bitness mismatch. Write a prefix. 0 000026E9 B067 mov al, 67h 0 000026EB 67 _386_PM_a32 0 000026EC 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 000026ED F606[1400]80 testopt [varflags], VAR_M_ALWAYS_16 0 000026F2 751E jnz .nodataprefix ; mov segreg never emits an osize --> 0 000026F4 8A26[0300] mov ah, byte [asm_mn_flags] 0 000026F8 A0[1400] mov al, byte [varflags] 2008 %if _PM 0 000026FB F606[0000]40 test byte [bCSAttr], 40h 0 00002700 7407 jz .dataprefix_rm 0 00002702 A92040 test ax, VAR_D16|(AMF_D16<<8) 0 00002705 7507 jnz .dataprefix 0 00002707 EB09 jmp short .nodataprefix 2014 .dataprefix_rm: 2015 %endif 0 00002709 A94001 test ax, VAR_D32|(AMF_D32<<8) 0 0000270C 7404 jz .nodataprefix 2018 .dataprefix: 0 0000270E B066 mov al, 66h 0 00002710 67 _386_PM_a32 0 00002711 AA stosb ; store operand size prefix 2022 .nodataprefix: 2023 0 00002712 A0[0500] mov al, [aa_seg_pre] 0 00002715 3C00 cmp al, 0 0 00002717 740B je ac22 ; if no segment prefix 0 00002719 67 _386_PM_a32 0 0000271A AA stosb 0 0000271B 3C64 cmp al, 64h 0 0000271D 7205 jb ac22 ; if not 64 or 65 (FS or GS) --> 0 0000271F 800E[0300]20 or byte [asm_mn_flags], AMF_FSGS ; flag it 2032 ac22: 2033 2034 ; Now emit the instruction itself. 0 00002724 A1[1A00] mov ax, word [a_opcode] 0 00002727 89C3 mov bx, ax 0 00002729 81EB4002 sub bx, 240h 0 0000272D 7317 jae ac23 ; if 576.. (AGRP) --> 0 0000272F 3D0002 cmp ax, 200h 0 00002732 7229 jb ac24 ; if regular instruction --> 0 00002734 800E[1100]01 or byte [dmflags], DM_COPR ; flag it as an x87 instruction 0 00002739 2438 and al, 38h ; get register part 0 0000273B 0806[0A00] or byte [regmem], al 0 0000273F 93 xchg ax, bx ; mov ax, bx (the low bits of bx are good) 0 00002740 2407 and al, 7 0 00002742 0CD8 or al, 0D8h 0 00002744 EB21 jmp short ac25 ; on to decoding the instruction 2048 2049 ac23: 0 00002746 800E[1400]02 or byte [varflags], VAR_MODRM ; flag presence of ModR/M byte 0 0000274B B103 mov cl, 3 ; one instruction of a group 0 0000274D D3EB shr bx, cl ; separate AGRP()'s num part 0 0000274F 2407 and al, 7 ; separate ModR/M register value 0 00002751 D2E0 shl al, cl 0 00002753 0806[0A00] or byte [regmem], al ; fix ModR/M byte 0 00002757 D1E3 shl bx, 1 0 00002759 8B87[C401] mov ax, word [agroups+bx] ; get actual opcode 2058 2059 ac24: 0 0000275D 84E4 test ah, ah 0 0000275F 7406 jz ac25 ; if no 0Fh first --> 0 00002761 50 push ax ; store a 0Fh 0 00002762 B00F mov al, 0Fh 0 00002764 67 _386_PM_a32 0 00002765 AA stosb 0 00002766 58 pop ax 2067 ac25: 0 00002767 0A06[1200] or al, byte [opcode_or] ; put additional bits into the opcode 0 0000276B 67 _386_PM_a32 0 0000276C AA stosb ; store the op code itself 2071 2072 ; Now store the extra stuff that comes with the instruction. 0 0000276D A1[0A00] mov ax, word [regmem] 0 00002770 F606[1400]02 test byte [varflags], VAR_MODRM 0 00002775 740D jz ac26 ; if no ModR/M --> 0 00002777 67 _386_PM_a32 0 00002778 AA stosb ; store the ModR/M byte 0 00002779 F606[0300]08 test byte [asm_mn_flags], AMF_SIB 0 0000277E 7404 jz ac26 ; if no SIB --> 0 00002780 88E0 mov al, ah 0 00002782 67 _386_PM_a32 0 00002783 AA stosb ; store the SIB byte, too 2083 ac26: 2084 0 00002784 8B1E[0800] mov bx, word [rmaddr] 0 00002788 85DB test bx, bx 0 0000278A 740D jz ac27 ; if no offset associated with the R/M --> 0 0000278C 66 _386_PM_o32 ; xor ecx, ecx 0 0000278D 31C9 xor cx, cx 0 0000278F 8A4F03 mov cl, byte [bx+OPRND.sizedis] 0 00002792 66 _386_PM_o32 ; lea esi, [bx+OPRND.num] 0 00002793 8D7708 lea si, [bx+OPRND.num] 0 00002796 67 _386_PM_a32 0 00002797 F3A4 rep movsb ; store the R/M offset (or memory offset) 2095 ac27: 2096 2097 ; Now store immediate data 0 00002799 8B1E[0C00] mov bx, word [immaddr] 0 0000279D 85DB test bx, bx 0 0000279F 740E jz ac28 ; if no immediate data --> 0 000027A1 66 _386_PM_o32 ; xor ecx, ecx 0 000027A2 31C9 xor cx, cx 0 000027A4 8A0E[1300] mov cl, byte [opsize] 0 000027A8 66 _386_PM_o32 ; lea esi, [bx+OPRND.num] 0 000027A9 8D7708 lea si, [bx+OPRND.num] 0 000027AC 67 _386_PM_a32 0 000027AD F3A4 rep movsb 2108 ac28: 2109 2110 ; Now store additional bytes (needed for, e.g., enter instruction 2111 ; and far memory address) 0 000027AF 8B1E[0E00] mov bx, word [xxaddr] 0 000027B3 85DB test bx, bx 0 000027B5 740D jz ac29 ; if no additional data --> 0 000027B7 66 _386_PM_o32 ; lea esi, [bx+OPRND.numadd] 0 000027B8 8D7704 lea si, [bx+OPRND.numadd] 0 000027BB 66 _386_PM_o32 ; xor eax, eax 0 000027BC 31C0 xor ax, ax 0 000027BE AC lodsb 0 000027BF 66 _386_PM_o32 ; xchg eax, ecx 0 000027C0 91 xchg ax, cx ; (mov cx, ax) 0 000027C1 67 _386_PM_a32 0 000027C2 F3A4 rep movsb 2124 ac29: 2125 2126 ; Done emitting. Update assembler address offset. 0 000027C4 16 push ss 0 000027C5 07 pop es ; restore es 0 000027C6 66 _386_PM_o32 ; mov dword [a_addr], edi 0 000027C7 893E[0000] mov word [a_addr], di 2131 2132 ; Compute machine type. 0 000027CB 803E[1000]03 cmp byte [dismach], 3 0 000027D0 7313 jae ac31 ; if we already know a 386 is needed 0 000027D2 F606[0300]25 test byte [asm_mn_flags], AMF_D32 | AMF_A32 | AMF_FSGS 0 000027D7 7507 jnz ac30 ; if 386 --> 0 000027D9 F606[1400]40 test byte [varflags], VAR_D32 0 000027DE 7405 jz ac31 ; if not 386 --> 2139 ac30: 0 000027E0 C606[1000]03 mov byte [dismach], 3 2141 ac31: 0 000027E5 BF[1E00] mov di, a_obstab ; info on this instruction 0 000027E8 8B0E[1C00] mov cx, word [a_opcode2] 0 000027EC E8[0000] call showmach ; get machine message into si, length into cx 0 000027EF E308 jcxz ac33 ; if no message 2146 2147 ac32: 0 000027F1 BF[0000] mov di, line_out 0 000027F4 F3A4 rep movsb ; copy the line to line_out 0 000027F6 E8[0000] call putsline_crlf 2151 2152 ac33: 2153 %if _IMMASM 0 000027F9 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 000027FD E8E303 call ao90 ; form reg/mem byte 0 00002800 EB30 jmp short ao07 ; go to the size check 2208 2209 ; OP_R: register. 2210 aop_r: 0 00002802 8A4504 mov al, byte [di+OPRND.reg1] ; register number 0 00002805 2407 and al, 7 0 00002807 B103 mov cl, 3 0 00002809 D2E0 shl al, cl ; shift it into place 0 0000280B 0806[0A00] or byte [regmem], al ; put it into the reg/mem byte 0 0000280F EB21 jmp short ao07 ; go to the size check 2217 2218 ; OP_R_ADD: register, added to the instruction. 2219 aop_r_add: 0 00002811 8A4504 mov al, byte [di+OPRND.reg1] 0 00002814 2407 and al, 7 0 00002816 A2[1200] mov byte [opcode_or], al ; put it there 0 00002819 EB17 jmp short ao07 ; go to the size check 2224 2225 ; OP_IMM: immediate data. 2226 aop_imm: 2227 aop_imm_not_extend: 0 0000281B 893E[0C00] mov word [immaddr], di ; save the location of this 0 0000281F EB11 jmp short ao07 ; go to the size check 2230 2231 ; OP_MOFFS: just the memory offset 2232 aop_moffs: 0 00002821 F60502 test byte [di+OPRND.flags], ARG_MODRM 0 00002824 7553 jnz ao11 ; if MOD R/M byte ( ==> reject) 0 00002826 893E[0800] mov word [rmaddr], di ; save the operand pointer 0 0000282A EB06 jmp short ao07 ; go to the size check 2237 2238 ; OP_AX: check for AL/AX/EAX 2239 aop_ax: 0 0000282C F6450407 test byte [di+OPRND.reg1], 7 0 00002830 7547 jnz ao11 ; if wrong register, reject --> 2242 ; jmp short ao07 ; go to the size check 2243 2244 ; Size check 2245 ao07: 0 00002832 800E[1400]10 or byte [varflags], VAR_SIZ_NEED 0 00002837 A0[1800] mov al, byte [a_reqsize] 0 0000283A 2C05 sub al, 5 ; OP_1632 >> 4 0 0000283C 7C3E jl ao12 ; if OP_ALL 0 0000283E 7467 je ao13 ; if OP_1632 0 00002840 3C05 cmp al, 5 ; OP_1632_DEFAULT ? 0 00002842 7448 je ao_1632_default 0 00002844 3C06 cmp al, 6 ; OP_1632_DEFAULT_ASM ? 0 00002846 7444 je ao_1632_default 2255 ; OP_8 = 1, OP_16 = 2, OP_32 = 3, OP_64 = 4 0 00002848 04FD add al, -3 0 0000284A 1403 adc al, 3 ; convert 3 --> 4 and 4 --> 5 2258 ao08: 0 0000284C 800E[1400]18 or byte [varflags], VAR_SIZ_FORCD| VAR_SIZ_NEED 2260 ao08_1: 0 00002851 8A5D02 mov bl, byte [di+OPRND.sizearg] 0 00002854 84DB test bl, bl ; SIZ_NONE ? 0 00002856 7409 jz ao09 ; yes, if no size given --> 0 00002858 800E[1400]04 or byte [varflags], VAR_SIZ_GIVN 0 0000285D 38D8 cmp al, bl 0 0000285F 7518 jne ao11 ; if sizes conflict, reject --> 2267 ao09: 0 00002861 3A06[1300] cmp al, byte [opsize] 0 00002865 7411 je ao10 ; if sizes agree --> 0 00002867 3CFF cmp al, -1 ; is it OP_MXX (for lea) ? 0 00002869 740D je ao10 0 0000286B 8606[1300] xchg al, byte [opsize] 0 0000286F 3C00 cmp al, SIZ_NONE 0 00002871 7506 jne ao11 ; if sizes disagree, reject --> 0 00002873 800E[1400]04 or byte [varflags], VAR_SIZ_GIVN ; added in DEBUG/X 1.18 2276 ao10: 0 00002878 C3 retn 2278 2279 ao11: 2280 ao50_j1: 0 00002879 E95403 jmp ao50 ; reject 2282 2283 ; OP_ALL - Allow all sizes. 2284 ao12: 0 0000287C 8A4502 mov al, byte [di+OPRND.sizearg] 0 0000287F 3C01 cmp al, SIZ_BYTE 0 00002881 743F je ao15 ; if byte 0 00002883 7225 jb ao14 ; if unknown (SIZ_NONE) --> 0 00002885 800E[1200]01 or byte [opcode_or], 1 ; set bit in instruction 0 0000288A EB1E jmp short ao14 ; if size is 16 or 32 2291 2292 ; OP_1632_DEFAULT 2293 ao_1632_default: 0 0000288C 8A4502 mov al, byte [di+OPRND.sizearg] 0 0000288F 84C0 test al, al ; SIZ_NONE ? 0 00002891 751B jnz @F ; no --> 0 00002893 A0[1300] mov al, byte [opsize] ; (for push imm16/32) 0 00002896 84C0 test al, al ; SIZ_NONE ? 0 00002898 7514 jnz @F ; no --> 0 0000289A B002 mov al, SIZ_WORD 2301 %if _PM 0 0000289C F606[0000]40 test byte [bCSAttr], 40h 0 000028A1 740B jz @F 0 000028A3 B004 mov al, SIZ_DWORD 2305 %endif 0 000028A5 EB07 jmp @F 2307 2308 ; OP_1632 - word or dword. 2309 ao13: 0 000028A7 8A4502 mov al, byte [di+OPRND.sizearg] 2311 ao14: 0 000028AA 84C0 test al, al ; SIZ_NONE ? 0 000028AC 741B jz ao16 ; yes, if still unknown --> 2314 @@: 0 000028AE 3C02 cmp al, SIZ_WORD 0 000028B0 7507 jne ao15_1 ; if word 0 000028B2 800E[1400]20 or byte [varflags], VAR_D16 0 000028B7 EB09 jmp short ao15 2319 ao15_1: 0 000028B9 3C04 cmp al, SIZ_DWORD 0 000028BB 75BC jne ao11 ; if not dword 0 000028BD 800E[1400]40 or byte [varflags], VAR_D32 ; set flag 2323 ao15: 0 000028C2 800E[1400]04 or byte [varflags], VAR_SIZ_GIVN 2325 ; hack for pushd/pushw imm: check for match 0 000028C7 EB98 jmp ao09 2327 ao16: 0 000028C9 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 000028CA E81603 call ao90 ; form reg/mem byte 0 000028CD 8A87[5B01] mov al, byte [asm_siznum + bx - (OP_FIRST_ASM_SIZNUM + 16 - 1)] 0 000028D1 E978FF 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: 2352 %if _IMMASM 0 000028D4 800E[0300]08 setopt [internalflags6], dif6_immasm_faroffset 2354 %endif 0 000028D9 A1[0400] mov ax, word [a_addr + saSegSel] 2356 ; get the cs we're assembling to 0 000028DC 894505 mov word [di + OPRND.num2], ax 2358 ; overwrites OPRND.reg2 and OPRND.index 2359 ; (they aren't used for immediates) 2360 2361 ; OP_FARIMM - far address contained in instruction 2362 ao21: 0 000028DF 8A4502 mov al, byte [di+OPRND.sizearg] 0 000028E2 84C0 test al, al ; have a size ? (check for not SIZ_NONE) 0 000028E4 750B jnz @F ; yes --> 0 000028E6 B002 mov al, SIZ_WORD ; default to word, assuming 16-bit CS 2367 %if _PM 0 000028E8 F606[0000]40 test byte [bCSAttr], 40h; is it a 32-bit CS ? 0 000028ED 7402 jz @F ; no --> 0 000028EF B004 mov al, SIZ_DWORD ; yes, default to dword 2371 %endif 2372 2373 @@: 0 000028F1 3C02 cmp al, SIZ_WORD ; is it word ? 0 000028F3 750D jne .o32_check ; no, check for dword size --> 2376 .o16: 0 000028F5 800E[1400]20 or byte [varflags], VAR_D16 2378 ; mark flag for o16 prefix if needed 2379 0 000028FA 837D0A00 cmp word [di+OPRND.num+2], byte 0 0 000028FE 7504 jne ..@ao50_j_NZ ; if not a 16-bit offset --> 2382 0 00002900 EB0C jmp short .common 2384 2385 .o32_check: 0 00002902 3C04 cmp al, SIZ_DWORD ; is it dword ? 2387 ..@ao50_j_NZ: 0 00002904 7403E9C702 jne ao50 ; no, invalid --> 2389 .o32: 0 00002909 800E[1400]40 or byte [varflags], VAR_D32 2391 ; mark flag for o32 prefix if needed 2392 2393 .common: 0 0000290E 800E[1400]04 or byte [varflags], VAR_SIZ_GIVN 2395 0 00002913 C6450402 mov byte [di+OPRND.numadd], 2 ; 2 additional bytes (segment part) 0 00002917 893E[0C00] mov word [immaddr], di 0 0000291B A2[1300] mov byte [opsize], al ; size of offset, 2 or 4 2399 ao22a: 0 0000291E 893E[0E00] mov word [xxaddr], di 0 00002922 C3 retn 2402 2403 ; OP_REL8 - relative address 2404 ao23: 0 00002923 807D0200 cmp byte [di+OPRND.sizearg], SIZ_NONE 0 00002927 75DB jne ..@ao50_j_NZ 2407 0 00002929 66 _386_PM_o32 0 0000292A A1[0000] mov ax, word [a_addr] ; offset 0 0000292D 66 _386_PM_o32 0 0000292E 40 inc ax 0 0000292F 66 _386_PM_o32 0 00002930 40 inc ax ; $ 0 00002931 8A0E[0300] mov cl, byte [asm_mn_flags] 2415 0 00002935 F6C180 test cl, AMF_ADDR 0 00002938 7517 jnz ao23aa 2418 ; JxCXZ, LOOPx, LOOPZx and LOOPNZx need a 67h, not a 66h prefix 0 0000293A F6C141 test cl, AMF_D32 | AMF_D16 0 0000293D 7422 jz ao23b ; if not JxCXZ, LOOPx 0 0000293F F6C101 test cl, AMF_D32 0 00002942 7403 jz ao23a 0 00002944 80C904 or cl, AMF_A32 2424 ao23a: 0 00002947 80E1BE and cl, ~(AMF_D32 | AMF_D16) 0 0000294A 80C980 or cl, AMF_ADDR 0 0000294D 880E[0300] mov byte [asm_mn_flags], cl 2428 ao23aa: 0 00002951 80E104 and cl, AMF_A32 2430 %if _PM 0 00002954 0A0E[0000] or cl, byte [bCSAttr] 0 00002958 7407 jz ao23b ; 16-bit CS and addressing --> 0 0000295A 80F944 cmp cl, AMF_A32| 40h 0 0000295D 7402 je ao23b ; 32-bit CS and addressing --> 2435 %else 2436 jz ao23b ; RM CS and 16-bit addressing --> 2437 %endif 0 0000295F 66 _386_PM_o32 0 00002960 40 inc ax ; adjust $ for the prefix that will be used 2440 ao23b: 0 00002961 89C3 mov bx, ax 0 00002963 31C9 xor cx, cx 0 00002965 6650 _386_PM push eax 0 00002967 58 _386_PM pop ax 0 00002968 59 _386_PM pop cx 0 00002969 8B4508 mov ax, word [di+OPRND.num+0] 0 0000296C 8B550A mov dx, word [di+OPRND.num+2] 2448 2449 %if _IMMASM 0 0000296F F606[0300]02 testopt [internalflags6], dif6_immasm 0 00002974 7410 jz @F 2452 0 00002976 A3[0000] mov word [immasm_rel8_target+0], ax 0 00002979 8916[0200] mov word [immasm_rel8_target+2], dx 0 0000297D 800E[0300]04 setopt [internalflags6], dif6_immasm_rel8 2456 0 00002982 89D8 mov ax, bx 0 00002984 89CA mov dx, cx 2459 @@: 2460 %endif 2461 0 00002986 29D8 sub ax, bx 0 00002988 19CA sbb dx, cx 2464 0 0000298A 884505 mov byte [di+OPRND.num2], al 0 0000298D 3D8000 cmp ax, 80h ; just one byte beyond range ? 0 00002990 750E jne @F 0 00002992 85D2 test dx, dx 0 00002994 750A jnz @F ; no --> 0 00002996 803C28 cmp byte [si], OP_E_CX ; we're trying for loop with (e)cx explicit ? 0 00002999 7505 jne @F ; no --> 0 0000299B 800D80 setopt [di + OPRND.flags], ARG_ECX_SPECIAL 2473 ; remember that we have to overflow 0 0000299E EB0C jmp @FF 2475 @@: 0 000029A0 B107 mov cl, 7 0 000029A2 D2F8 sar al, cl 0 000029A4 38E0 cmp al, ah 0 000029A6 757D jne ao24 ; if too big, reject --> 0 000029A8 39D0 cmp ax, dx 0 000029AA 7579 jne ao24 ; if too big, reject --> 2482 @@: 0 000029AC C6450401 mov byte [di+OPRND.numadd], 1 ; save the length 0 000029B0 E96BFF jmp ao22a ; save it away 2485 2486 2487 ; OP_REL1632: relative jump/call to a longer address. 2488 ; 2489 ; size of instruction is 2490 ; a) CS 16-bit: 2491 ; 3 (xx xxxx, near jmp/call E9/E8) or 2492 ; 4 (0F xx xxxx, near jcc 0F 80+cc) 2493 ; 6 (66 xx xxxxxxxx, near 32-bit jmp/call E9/E8) 2494 ; 7 (66 0F xx xxxxxxxx, near 32-bit jcc 0F 80+cc) 2495 ; 2496 ; b) CS 32-bit: 2497 ; 5 (xx xxxxxxxx, near jmp/call E9/E8) or 2498 ; 6 (0F xx xxxxxxxx, near jcc 0F 80+cc) 2499 ; 4 (66 xx xxxx, near 16-bit jmp/call E9/E8) 2500 ; 5 (66 0F xx xxxx, near 16-bit jcc 0F 80+cc) 2501 ao25: 0 000029B3 8B1E[0000] mov bx, word [a_addr+0] 2503 %if _PM 0 000029B7 8B0E[0200] mov cx, word [a_addr+2] 2505 %else 2506 xor cx, cx 2507 %endif 2508 0 000029BB 31C0 xor ax, ax 0 000029BD 8A4502 mov al, byte [di+OPRND.sizearg] 0 000029C0 84C0 test al, al ; SIZ_NONE ? 0 000029C2 750B jnz @F ; no --> 0 000029C4 B002 mov al, SIZ_WORD ; in 16-bit CS default to word (2) 2514 %if _PM 0 000029C6 F606[0000]40 test byte [bCSAttr], 40h 0 000029CB 7402 jz @F 0 000029CD B004 mov al, SIZ_DWORD ; in 32-bit CS default to dword (4) 2518 %endif 2519 @@: 0 000029CF 50 push ax ; preserve size 2521 2522 %if _PM 0 000029D0 F606[0000]40 test byte [bCSAttr], 40h 0 000029D5 7404 jz .adjust_16bitcs 2525 .adjust_32bitcs: 0 000029D7 3C04 cmp al, SIZ_DWORD ; default size ? 0 000029D9 EB02 jmp .adjust_common 2528 %endif 2529 2530 .adjust_16bitcs: 0 000029DB 3C02 cmp al, SIZ_WORD ; default size ? 2532 .adjust_common: 0 000029DD 7401 je .adjust_done 0 000029DF 40 inc ax ; no, increment for 66h prefix (osize) 2535 .adjust_done: 2536 0 000029E0 40 inc ax ; add size of opcode (E8h/E9h/80h+cc) 2538 0 000029E1 813E[1A00]0001 cmp word [a_opcode], 100h 2540 ; is it a 0Fh-prefixed opcode ? 2541 ; (that is, a 0Fh 80h+cc conditional jump) 0 000029E7 7201 jb @F 0 000029E9 40 inc ax ; add size of 0Fh prefix opcode 2544 @@: 0 000029EA 01C3 add bx, ax 0 000029EC 83D100 adc cx, byte 0 0 000029EF 58 pop ax ; restore size (2 or 4) 0 000029F0 8B550A mov dx, word [di+OPRND.num+2] 2549 0 000029F3 3C04 cmp al, SIZ_DWORD 0 000029F5 740B je ao27_1 ; if the size given was "dword" --> 2552 2553 ao27: 0 000029F7 85D2 test dx, dx 0 000029F9 752A jnz ao24 ; if operand is too big, reject --> 0 000029FB 800E[1400]20 or byte [varflags], VAR_D16 0 00002A00 EB05 jmp short ao28 2558 2559 ao27_1: 0 00002A02 800E[1400]40 or byte [varflags], VAR_D32 2561 2562 ao28: 0 00002A07 884504 mov byte [di+OPRND.numadd], al ; store the size 0 00002A0A 8B4508 mov ax, word [di+OPRND.num+0] 2565 %if _IMMASM 0 00002A0D A3[0000] mov word [immasm_rel1632_target+0], ax 0 00002A10 8916[0200] mov word [immasm_rel1632_target+2], dx 2568 %endif 0 00002A14 31C9 xor cx, cx 0 00002A16 29D8 sub ax, bx 0 00002A18 19CA sbb dx, cx ; compute DX:AX - CX:BX 0 00002A1A 894505 mov word [di+OPRND.num2+0], ax 0 00002A1D 895507 mov word [di+OPRND.num2+2], dx 0 00002A20 893E[0E00] mov word [xxaddr], di 0 00002A24 C3 retn 2576 2577 ao24: 2578 ao50_j2: 0 00002A25 E9A801 jmp ao50 ; reject 2580 2581 ; OP_1CHK - The assembler can ignore this one. 2582 ao29: 0 00002A28 58 pop ax ; discard return address 2584 ac06_j2: 0 00002A29 E9DDFB jmp ac06_j1 ; next operand 2586 2587 ; OP_STI - ST(I). 2588 aop_sti: 0 00002A2C B01E mov al, REG_ST ; code for ST 0 00002A2E 8A5D05 mov bl, byte [di+OPRND.reg2] 0 00002A31 EB47 jmp short ao38 ; to common code --> 2592 2593 ; OP_MMX (previously was OP_ECX (used for LOOPx)) 2594 aop_mmx: 0 00002A33 B01F mov al, REG_MM 0 00002A35 EB3C jmp short ao37 ; to common code --> 2597 2598 ; OP_MMX_MOD 2599 aop_mmx_mod: 0 00002A37 B01F mov al, REG_MM 0 00002A39 8A5D05 mov bl, byte [di+OPRND.reg2] 0 00002A3C 80CBC0 or bl, 0C0h 0 00002A3F EB39 jmp short ao38 2604 2605 ; OP_CR 2606 aop_cr: 0 00002A41 8A4505 mov al, byte [di+OPRND.reg2] ; get the index 0 00002A44 3C04 cmp al, 4 0 00002A46 77DD ja ao24 ; if too big, reject --> 0 00002A48 7505 jne ao32 ; if not CR4 0 00002A4A C606[1000]05 mov byte [dismach], 5 ; CR4 is new to the 586 2612 ao32: 0 00002A4F 3C01 cmp al, 1 0 00002A51 7506 jne ao33 0 00002A53 807D0CFF cmp byte [di+OPRND_size+OPRND.flags], -1 0 00002A57 75CC jne ao24 ; reject if no other arg (can't mov CR1,xx) 2617 ao33: 0 00002A59 B020 mov al, REG_CR ; code for CR 0 00002A5B EB16 jmp short ao37 ; to common code 2620 2621 ; OP_DR 2622 ao34: 0 00002A5D B021 mov al, REG_DR ; code for DR 0 00002A5F EB12 jmp short ao37 ; to common code 2625 2626 ; OP_TR 2627 ao35: 0 00002A61 8A4505 mov al, byte [di+OPRND.reg2] ; get the index 0 00002A64 3C03 cmp al, 3 0 00002A66 72BD jb ao24 ; if too small, reject --> 0 00002A68 3C06 cmp al, 6 0 00002A6A 7305 jae ao36 0 00002A6C C606[1000]04 mov byte [dismach], 4 ; TR3-5 are new to the 486 2634 ao36: 0 00002A71 B022 mov al, REG_TR ; code for TR 2636 2637 ; Common code for these weird registers. 2638 ao37: 0 00002A73 8A5D05 mov bl, byte [di+OPRND.reg2] 0 00002A76 B103 mov cl, 3 0 00002A78 D2E3 shl bl, cl 2642 ao38: 0 00002A7A 081E[0A00] or byte [regmem], bl 0 00002A7E 800E[1400]02 or byte [varflags], VAR_MODRM 0 00002A83 3A4504 cmp al, byte [di+OPRND.reg1] ; check for the right numbered register 0 00002A86 7419 je ao40 ; if yes, then return 2647 ao38a: 0 00002A88 E94501 jmp ao50 ; reject --> 2649 2650 ; OP_SEGREG 2651 ao39: 0 00002A8B 8A4504 mov al, byte [di+OPRND.reg1] 0 00002A8E 2C18 sub al, 24 0 00002A90 3C06 cmp al, 6 0 00002A92 73F4 jae ao38a ; if not a segment register, reject --> 0 00002A94 B103 mov cl, 3 0 00002A96 D2E0 shl al, cl 0 00002A98 0806[0A00] or byte [regmem], al 2659 ;--- v1.26: don't force size for MOV sreg, mxx / MOV mxx, sreg 0 00002A9C 800E[1400]04 or byte [varflags], VAR_SIZ_GIVN 2661 ao40: 0 00002AA1 C3 retn 2663 2664 ; OP_IMMS8 - Sign-extended immediate byte (PUSH xx) 2665 ; Also used for IMUL, but clearing VAR_SIZ_NEED has 2666 ; no effect because there is always a reg operand. 2667 ao41: 0 00002AA2 8026[1400]EF and byte [varflags], ~VAR_SIZ_NEED ; added for v1.09. Ok? 2669 2670 ; OP_IMMS8_EXTEND - Sign-extended imm8 which does not 2671 ; count as a size specified (mem op needs a size). 2672 ; This is used for arithmetic operations in which an 2673 ; imm8 is sign-extended to operate on a 16- or 32-bit 2674 ; operand (reg/mem). 2675 ao41_extend: 0 00002AA7 8B4508 mov ax, word [di+OPRND.num+0] 0 00002AAA B107 mov cl, 7 0 00002AAC D2F8 sar al, cl 0 00002AAE EB05 jmp short ao43 ; common code 2680 2681 ; OP_IMM8 - Immediate byte 2682 ao42: 0 00002AB0 8B4508 mov ax, word [di+OPRND.num+0] 0 00002AB3 B000 mov al, 0 2685 ao43: 0 00002AB5 38E0 cmp al, ah 0 00002AB7 7403E91401 jne ao50 ; if too big, reject --> 2688 2689 ; The following code allows to optimise an 2690 ; "adc dx, FFFF" to the imms8 form, where 2691 ; previously only "adc dx, -1" would work. 2692 ; Now adapted to work with 3-operand imul 2693 ; like "imul dx, dx, FFFF" as well. 2694 ; Updated to allow "push FFFF" in a 16-bit CS 2695 ; as well as "pushw FFFF" to optimise to an 2696 ; imms8 form as well. 2697 ; 2698 ; Bug: "adc dx, FFFF_FFFF" is still accepted 2699 ; as well. We do want to allow the all-1s 2700 ; bit pattern here if we parsed it as -1 but 2701 ; not if it came in as an unsigned number. 2702 ; However, this bug is not too bad, it only 2703 ; accepts invalid input when it shouldn't. 0 00002ABC 81FF[0C00] cmp di, line_out + OPRND_size 2705 ; are we operating on the first operand ? 0 00002AC0 7312 jae .notfirstoperand ; no --> 2707 2708 .firstoperand: 2709 ; This is either an OP_IMM8 (eg "int", "out") 2710 ; in which case running .compare16bit doesn't 2711 ; change anything, or it is "push imms8". 0 00002AC2 803E[1300]02 cmp byte [opsize], SIZ_WORD 2713 ; "pushw" instruction ? 2714 %if _PM 0 00002AC7 7412 je .compare16bit ; yes --> 0 00002AC9 7716 ja @F ; SIZ_DWORD = "pushd", skip past .compare16bit --> 0 00002ACB F606[0000]40 test byte [bCSAttr], 40h; D-bit set / o32 cs ? 0 00002AD0 7409 jz .compare16bit ; no --> 2719 %else 2720 jbe .compare16bit ; not SIZ_DWORD = "pushd" --> 2721 %endif 0 00002AD2 EB0D jmp @F ; "pushd" or D-bit set, skip .compare16bit --> 2723 2724 .notfirstoperand: 0 00002AD4 803E[0200]02 cmp byte [line_out + OPRND.sizearg], SIZ_WORD 2726 ; is first operand a word ? 0 00002AD9 7506 jne @F ; no --> 2728 .compare16bit: 0 00002ADB 837D0A00 cmp word [di + OPRND.num + 2], 0 2730 ; is our high word zero ? 0 00002ADF 7408 je @FF ; yes, accept 16-bit value --> 2732 @@: 0 00002AE1 3B450A cmp ax, word [di+OPRND.num+2] 0 00002AE4 7403E9E700 jne ao50 ; if too big, reject --> 2735 @@: 0 00002AE9 B001 mov al, SIZ_BYTE 0 00002AEB E8E700 call aasizchk ; check that size == 0 or 1 0 00002AEE 8A6508 mov ah, byte [di+OPRND.num+0] ; store the byte, length 1 0 00002AF1 894504 mov word [di+OPRND.numadd], ax ; store length (0/1) + the byte 0 00002AF4 893E[0E00] mov word [xxaddr], di 2741 ao43r: 0 00002AF8 C3 retn 2743 2744 2745 aop_e_cx: 0 00002AF9 B980FB mov cx, AMF_ADDR | 0 | (~AMF_A32 << 8) 0 00002AFC 837D0409 cmp word [di + OPRND.reg1], REG_CX 0 00002B00 740B je .a16 2749 .a32: 0 00002B02 B984FF mov cx, AMF_ADDR | AMF_A32 | (~0 << 8) 0 00002B05 E80500 call .common 0 00002B08 B011 mov al, REG_CX + 8 0 00002B0A E9BD00 jmp ao48a 2754 2755 .a16: 2756 .common: 0 00002B0D 202E[0300] and byte [asm_mn_flags], ch 0 00002B11 080E[0300] or byte [asm_mn_flags], cl 2759 0 00002B15 8B1E[0E00] mov bx, word [xxaddr] 0 00002B19 8A0E[0300] mov cl, byte [asm_mn_flags] 0 00002B1D 80E104 and cl, AMF_A32 2763 %if _PM 0 00002B20 0A0E[0000] or cl, byte [bCSAttr] 0 00002B24 7410 jz .noprefix ; 16-bit CS and addressing --> 0 00002B26 80F944 cmp cl, AMF_A32| 40h 0 00002B29 740B je .noprefix ; 32-bit CS and addressing --> 2768 %else 2769 jz .noprefix ; 86 Mode CS and 16-bit addressing --> 2770 %endif 0 00002B2B FE4F05 dec byte [bx + OPRND.num2] 0 00002B2E 7105 jno .ret ; (no need to check special flag) 2773 .prefix_overflow: 0 00002B30 F60780 testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 0 00002B33 7406 jz .ao50 ; not special, overflow -128 to +127 2776 ; special, accept +128 to +127 2777 .ret: 0 00002B35 C3 retn 2779 2780 .noprefix: 0 00002B36 F60780 testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 0 00002B39 74FA jz .ret ; not special, no prefix 2783 ; special and no prefix: reject 2784 .ao50: 0 00002B3B E99200 jmp ao50 2786 2787 2788 ao_x: 0 00002B3E AC lodsb 0 00002B3F B400 mov ah, 0 0 00002B41 93 xchg bx, ax 0 00002B42 01DB add bx, bx 0 00002B44 FFA7[1801] jmp [asmjmp_opx + bx] 2794 2795 2796 ; OP_SHOSIZ - force the user to declare the size of the next operand 2797 ao44: 0 00002B48 F606[1400]10 test byte [varflags], VAR_SIZ_NEED 0 00002B4D 7407 jz ao45 ; if no testing needs to be done 0 00002B4F F606[1400]04 test byte [varflags], VAR_SIZ_GIVN 0 00002B54 747A jz ao50 ; if size was given ( ==> reject) 2802 ao45: 0 00002B56 8026[1400]FB and byte [varflags], ~VAR_SIZ_GIVN ; clear the flag 0 00002B5B 800E[1400]10 or byte [varflags], VAR_SIZ_NEED 2805 2806 ; hack for pushd/pushw imm (the only OP_SHOSIZ with suffix), 2807 ; set operand size to 2 for pushw, 4 for pushd. 2808 ; this is checked by ao15 later so as to match. 0 00002B60 B002 mov al, 2 0 00002B62 8A26[0200] mov ah, byte [aa_mnemsuffix] 2811 ; 0 = normal, 'W' suffix, or 'D' suffix 0 00002B66 80FC44 cmp ah, 'D' 0 00002B69 7407 je @F ; if D, al = 2 --> 0 00002B6B 48 dec ax ; al = 1 0 00002B6C 80FC57 cmp ah, 'W' 0 00002B6F 7401 je @F ; if W, al = 1 --> 0 00002B71 48 dec ax ; al = 0 2818 @@: 0 00002B72 00C0 add al, al ; 0 = no suffix, 2 = 'W' suffix, 4 = 'D' suffix 2820 ; as 0 = SIZ_NONE, 2 = SIZ_WORD, 4 = SIZ_DWORD 0 00002B74 A2[1300] mov byte [opsize], al 2822 ao_modifier_continue: 0 00002B77 58 pop ax ; discard return address 0 00002B78 E9AEFE jmp ac06_j2 ; next operand 2825 2826 2827 ; OP_ASM_MOVX - Next operand is movsx/movzx source 2828 ; 2829 ; Make sure that either a size is specified for the source, 2830 ; or the first operand is a 16-bit register and the source 2831 ; operand type is OP_8 (implied byte size if unspecified). 2832 ao_movx: 0 00002B7B 803E[0200]02 cmp byte [line_out + OPRND.sizearg], SIZ_WORD 2834 ; first operand is 16-bit ? 0 00002B80 7505 jne @F ; no, make no exception --> 0 00002B82 803C70 cmp byte [si], OP_16 ; is OP_8 ? 0 00002B85 7206 jb .done ; yes, this exception is valid --> 2838 @@: 0 00002B87 807D0200 cmp byte [di + OPRND.sizearg], SIZ_NONE 2840 ; size specified ? 0 00002B8B 7443 je ao50 ; no, error --> 2842 .done: 0 00002B8D EBE8 jmp ao_modifier_continue 2844 2845 2846 ao_m_always_16: 0 00002B8F 800E[1400]80 setopt [varflags], VAR_M_ALWAYS_16 0 00002B94 EBE1 jmp ao_modifier_continue 2849 2850 2851 ao_short: 0 00002B96 B001 mov al, odfShort 2853 ao_distance: 0 00002B98 0806[1500] or byte [alloweddist], al 0 00002B9C EBD9 jmp ao_modifier_continue 2856 2857 ao_near: 0 00002B9E B002 mov al, odfNear 0 00002BA0 EBF6 jmp ao_distance 2860 2861 ao_far_required: 0 00002BA2 F6450104 test byte [di + OPRND.distflags], odfFar 0 00002BA6 7428 jz ao50 ; if not far, reject --> 2864 ao_far: 0 00002BA8 B004 mov al, odfFar 0 00002BAA EBEC jmp ao_distance 2867 2868 2869 ; OP_1 (shift/rotate without immediate) 2870 ao46: 0 00002BAC 807D0200 cmp byte [di + OPRND.sizearg], SIZ_NONE 0 00002BB0 751E jne ao50 ; if BYTE is specified, reject this --> 0 00002BB2 817D070101 cmp word [di+OPRND.orednum], 101h 2874 ; check both size and value (OPRND.num) 0 00002BB7 EB15 jmp short ao49 ; test it later 2876 2877 ; OP_3 (int 3 / int3) 2878 ao47: 0 00002BB9 807D0200 cmp byte [di + OPRND.sizearg], SIZ_NONE 0 00002BBD 7511 jne ao50 ; if BYTE is specified, reject this --> 0 00002BBF 817D070103 cmp word [di+OPRND.orednum], 301h 2882 ; check both size and value (OPRND.num) 0 00002BC4 EB08 jmp short ao49 ; test it later 2884 2885 ; OP_DX, OP_CL, OP_ST, OP_ES, ..., OP_GS 2886 ; INP: (from ac08 calling this:) 2887 ; bx = index into bittab 2888 ao48: 0 00002BC6 8A87[2801] mov al, [asm_regnum + bx - (OP_FIRST_ASM_REGNUM + 16 - 1)] 2890 ao48a: 0 00002BCA 98 cbw 0 00002BCB 3B4504 cmp ax, word [di+OPRND.reg1] 2893 2894 ao49: 0 00002BCE 7404 je ao51 2896 2897 ; Reject this operand list. 2898 ao50: 0 00002BD0 58 pop ax ; discard return address 0 00002BD1 E948F9 jmp ac01 ; go back to try the next alternative 2901 2902 ao51: 0 00002BD4 C3 retn 2904 2905 ; AASIZCHK - Check that the size given is 0 or AL. 2906 aasizchk: 0 00002BD5 807D0200 cmp byte [di+OPRND.sizearg], SIZ_NONE 0 00002BD9 74F9 je ao51 0 00002BDB 384502 cmp byte [di+OPRND.sizearg], al 0 00002BDE 74F4 je ao51 0 00002BE0 58 pop ax ; discard return address 0 00002BE1 EBED jmp short ao50 ; reject this list --> 2913 2914 ; Do reg/mem processing. 2915 ; 2916 ; INP: di-> OPRND structure 2917 ; CHG: ax 2918 ao90: 0 00002BE3 F60504 test byte [di+OPRND.flags], ARG_JUSTREG 0 00002BE6 7516 jnz ao92 ; if just register 0 00002BE8 F60502 test byte [di+OPRND.flags], ARG_MODRM 0 00002BEB 7405 jz ao91 ; if no precomputed MOD R/M byte 0 00002BED 8B4504 mov ax, word [di+OPRND.reg1] ; get the precomputed bytes 0 00002BF0 EB1A jmp short ao93 ; done 2925 2926 ao91: 0 00002BF2 B006 mov al, 6 ; convert plain displacement to MOD R/M 0 00002BF4 F606[0300]04 test byte [asm_mn_flags], AMF_A32 0 00002BF9 7411 jz ao93 ; if 16-bit addressing 0 00002BFB 48 dec ax 0 00002BFC EB0E jmp short ao93 ; done 2932 2933 ao92: 0 00002BFE 8A4504 mov al, byte [di+OPRND.reg1] ; convert register to MOD R/M 2935 %if 1 0 00002C01 3C1F cmp al, REG_MM 0 00002C03 7503 jne .notmm 0 00002C05 8A4505 mov al, byte [di+OPRND.reg2] 2939 .notmm: 2940 %endif 0 00002C08 2407 and al, 7 ; get low 3 bits 0 00002C0A 0CC0 or al, 0C0h 2943 2944 ao93: 0 00002C0C 0906[0A00] or word [regmem], ax ; store the MOD R/M and SIB 0 00002C10 800E[1400]02 or byte [varflags], VAR_MODRM ; flag its presence 0 00002C15 F616[1700] not byte [modrmflag] ; indicate ModR/M 0 00002C19 893E[0800] mov word [rmaddr], di ; save a pointer 0 00002C1D C3 retn ; done 2950 2951 ; AAIFNUM - Determine if a number starts here 2952 ; 2953 ; INP: al = first character 2954 ; si-> next character 2955 ; OUT: CY if no number starts there 2956 ; NC if a number starts there 2957 ; CHG: - 2958 ; 2959 ; Note: Actually checks for a plus or minus sign that 2960 ; is followed by a valid (hexadecimal) digit, 2961 ; or just a digit without specified sign. 2962 aaifnum: 0 00002C1E 56 push si 0 00002C1F 50 push ax 0 00002C20 3C2D cmp al, '-' ; minus or plus sign ? 0 00002C22 7404 je @F 0 00002C24 3C2B cmp al, '+' 0 00002C26 7503 jne @FF ; no --> 2969 @@: 0 00002C28 E8[0000] call skipwhite ; skip sign, and (if any) blanks 2971 @@: 0 00002C2B 3C28 cmp al, '(' 0 00002C2D F9 stc 0 00002C2E 7404 je @F 0 00002C30 2C30 sub al, '0' 0 00002C32 3C0A cmp al, 10 2977 @@: 0 00002C34 58 pop ax 0 00002C35 7208 jb @F ; if a decimal digit --> 2980 0 00002C37 50 push ax 0 00002C38 24DF and al, TOUPPER 0 00002C3A 2C41 sub al, 'A' 0 00002C3C 3C06 cmp al, 6 0 00002C3E 58 pop ax 2986 @@: 0 00002C3F F5 cmc ; carry clear <==> it's a number 0 00002C40 5E pop si 0 00002C41 C3 retn 2990 2991 2992 ; AAGETI - Get a number from the input line. 2993 ; 2994 ; Entry AL First character of number 2995 ; SI Address of next character of number 2996 ; Exit DX:BX Resulting number 2997 ; CL 1 if it's a byte, 2 if a word, 4 if a dword 2998 ; AL Next character not in number 2999 ; SI Address of next character after that 3000 ; Uses AH, CH 3001 aageti: 0 00002C42 3C2D cmp al, '-' 0 00002C44 7416 je aag1 ; if negative number --> 0 00002C46 3C2B cmp al, '+' ; (unnecessary) plus sign ? 0 00002C48 7503 jne @F ; no --> 0 00002C4A E8[0000] call skipwhite ; skip it, plus blanks 3007 @@: 0 00002C4D E84100 call aag4 ; get the bare number 0 00002C50 B90100 mov cx, 1 ; set up cx 0 00002C53 09D2 or dx, dx 0 00002C55 7536 jnz aag2 ; if dword 0 00002C57 08FF or bh, bh 0 00002C59 7534 jnz aag3 ; if word 0 00002C5B C3 retn ; it's a byte 3015 3016 aag1: 0 00002C5C E8[0000] call skipwhite 0 00002C5F E82F00 call aag4 ; get the bare number 0 00002C62 89D9 mov cx, bx 0 00002C64 09D1 or cx, dx 0 00002C66 B90100 mov cx, 1 0 00002C69 7421 jz aag1a ; if -0 0 00002C6B F7D2 not dx ; negate the answer 0 00002C6D F7DB neg bx 0 00002C6F F5 cmc 0 00002C70 83D200 adc dx, byte 0 0 00002C73 F6C680 test dh, 80h 0 00002C76 745F jz aag7 ; if error 0 00002C78 83FAFF cmp dx, byte -1 0 00002C7B 7510 jne aag2 ; if dword 0 00002C7D F6C780 test bh, 80h 0 00002C80 740B jz aag2 ; if dword 0 00002C82 80FFFF cmp bh, -1 0 00002C85 7508 jne aag3 ; if word 0 00002C87 F6C380 test bl, 80h 0 00002C8A 7403 jz aag3 ; if word 3037 aag1a: 3038 aag4.got_expr: 0 00002C8C C3 retn ; it's a byte 3040 3041 aag2: 0 00002C8D 41 inc cx ;return: it's a dword 0 00002C8E 41 inc cx 3044 aag3: 0 00002C8F 41 inc cx ;return: it's a word 0 00002C90 C3 retn 3047 3048 aag4: 0 00002C91 3C28 cmp al, '(' 0 00002C93 7515 jne .not_expr 0 00002C95 AC lodsb ; skip opening paren 0 00002C96 E8[0000]EB02[0000] nearcall getexpression ; returns bx:dx = numerical value 0 00002C9D 87DA xchg bx, dx ; dx:bx = number 0 00002C9F E8[0000] call skipwh0 0 00002CA2 3C29 cmp al, ')' 0 00002CA4 AC lodsb 0 00002CA5 74E5 je .got_expr 0 00002CA7 4E dec si 0 00002CA8 EB2D jmp aag7 3060 3061 .not_expr: 0 00002CAA 31DB xor bx, bx ; get the basic integer 0 00002CAC 31D2 xor dx, dx 0 00002CAE E8[0000]EB02[0000] nearcall getnyb 0 00002CB5 7220 jc aag7 ; if not a hex digit 3066 aag5: 0 00002CB7 08C3 or bl, al ; add it to the number 3068 @@: 0 00002CB9 AC lodsb 0 00002CBA 3C5F cmp al, '_' 0 00002CBC 74FB je @B 0 00002CBE E8[0000]EB02[0000] nearcall getnyb 0 00002CC5 72C5 jc aag1a ; if done 0 00002CC7 F6C6F0 test dh, 0F0h 0 00002CCA 750B jnz aag7 ; if overflow 0 00002CCC B90400 mov cx, 4 3077 aag6: 0 00002CCF D1E3 shl bx, 1 ; shift it by 4 0 00002CD1 D1D2 rcl dx, 1 0 00002CD3 E2FA loop aag6 0 00002CD5 EBE0 jmp short aag5 3082 3083 aag7: 0 00002CD7 E9[0000] jmp error 3085 3086 ; AACONVINDEX - Convert results from AAGETI and store index value 3087 ; 3088 ; Entry DX:BX,CL As in exit from AAGETI 3089 ; DI Points to information record for this arg 3090 ; Exit SS bits stored in [di+OPRND.index] 3091 ; Uses DL 3092 aaconvindex: 0 00002CDA 80F901 cmp cl, 1 0 00002CDD 7517 jne aacv1 ; if the number is too large 0 00002CDF 80FB01 cmp bl, 1 0 00002CE2 7414 je aacv2 ; if 1 0 00002CE4 42 inc dx 0 00002CE5 80FB02 cmp bl, 2 0 00002CE8 740E je aacv2 ; if 2 0 00002CEA 42 inc dx 0 00002CEB 80FB04 cmp bl, 4 0 00002CEE 7408 je aacv2 ; if 4 0 00002CF0 42 inc dx 0 00002CF1 80FB08 cmp bl, 8 0 00002CF4 7402 je aacv2 ; if 8 3106 aacv1: 0 00002CF6 EBDF jmp short aag7 ; error 3108 3109 aacv2: 0 00002CF8 885506 mov byte [di+OPRND.index], dl ; save the value 0 00002CFB C3 retn 3112 3113 ; AAGETREG - Get register for the assembler. 3114 ; 3115 ; Entry DI Start of register table 3116 ; CX Length of register table (or 0) 3117 ; SI Address of first character in register name 3118 ; Exit NC if a register was found, 3119 ; SI Updated if a register was found 3120 ; BX Register number, defined as in the table below 3121 ; Uses AX, CX, DI 3122 ; 3123 ; Exit value of BX: 3124 ; DI = rgnam816, CX = 27 DI = rgnam16, CX = 8 3125 ; ---------------------- -------------------- 3126 ; 0 .. 7: AL .. BH 0 .. 7: AX .. DI 3127 ; 8 .. 15: AX .. DI 3128 ; 16 .. 23: EAX..EDI 16 .. 23: EAX..EDI 3129 ; 24 .. 29: ES .. GS 3130 ; 30 .. 34: ST .. TR 3131 ; (This has to match the REG_ equs defined in uu.asm 3132 ; around rgnam816 and following.) 3133 aagetreg: 0 00002CFC 8B04 mov ax, word [si] 0 00002CFE 25DFDF and ax, TOUPPER_W ; convert to upper case 0 00002D01 3C45 cmp al, 'E' ; check for EAX, etc. 0 00002D03 7522 jne aagr1 ; if not 'E' --> (NZ) 0 00002D05 50 push ax 0 00002D06 88E0 mov al, ah 0 00002D08 8A6402 mov ah, byte [si+2] 0 00002D0B 80E4DF and ah, TOUPPER 0 00002D0E 57 push di 0 00002D0F BF[3C01] mov di, rgnam16 0 00002D12 51 push cx 0 00002D13 B90800 mov cx, N_REGS16 0 00002D16 F2AF repne scasw 0 00002D18 89CB mov bx, cx 0 00002D1A 59 pop cx 0 00002D1B 5F pop di 0 00002D1C 58 pop ax 0 00002D1D 7508 jne aagr1 ; if no match --> (NZ) 0 00002D1F 46 inc si 0 00002D20 F7D3 not bx 0 00002D22 80C318 add bl, 8+16 ; adjust BX 0 00002D25 EB11 jmp short aagr2 ; finish up 3156 3157 aagr1: ; (entered with NZ) 0 00002D27 89CB mov bx, cx ; (if cx = 0, this is always reached with 0 00002D29 F2AF repne scasw ; ZF clear, that is, NZ) 0 00002D2B 750F jne aagr3 ; if no match 0 00002D2D 29CB sub bx, cx 0 00002D2F 4B dec bx 0 00002D30 80FB10 cmp bl, 16 0 00002D33 7203 jb aagr2 ; if AL .. BH or AX .. DI 0 00002D35 80C308 add bl, 8 3166 aagr2: 0 00002D38 46 inc si ; skip the register name 0 00002D39 46 inc si 0 00002D3A F8 clc 0 00002D3B C3 retn 3171 aagr3: 0 00002D3C F9 stc ; not found 0 00002D3D C3 retn 3174 3175 ..@aa_access_end: 3176 %endif === Trace listing source: ../lst/csx.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 VERSIONMAC 1 <1> %define _VERSION " (2026-09-22)" 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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 0000170A ???????? eldhSignature: resb 4 ; "ELD1" 0 0000170E ?????? resb 3 ; reserved 0 00001711 ?? resb 1 ; 26 (Ctrl-Z) 0 00001712 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00001716 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00001718 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 0000171A ???????? eldhDataOffset: resd 1 0 0000171E ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00001720 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00001722 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00001724 ???????? eldhReserved: resb 4 ; reserved 0 00001728 ???? 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 0000172A ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 0000172E ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00001732 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00001736 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 0000170A ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00001712 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00001716 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00001718 ???? 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 0000170A ???? 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 0000170C ???? eldltAmount: resw 1 0 0000170E ???????? 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 0000170A ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 0000170C ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000170E ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00001710 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00001712 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 0000171A ???? 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 0000170A ???? eldlSignature: resw 1 ; 0E1D1h 0 0000170C ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 0000170E ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00001710 ???? eldlUseLinkHash: resw 1 0 00001712 ???? eldlDataAmount: resw 1 0 00001714 ???? eldlDataPrefixes: resw 1 0 00001716 ???? eldlDataEntries: resw 1 0 00001718 ???? eldlDataAddresses: resw 1 0 0000171A ???? eldlCodeAmount: resw 1 0 0000171C ???? eldlCodePrefixes: resw 1 0 0000171E ???? eldlCodeEntries: resw 1 0 00001720 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00001722 ???? eldlDualAmount: resw 1 0 00001724 ???? eldlDualPrefixes: resw 1 0 00001726 ???? eldlDualEntries: resw 1 0 00001728 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 0000170A ???? ifKeyword: resw 1 0 0000170C ???? ifDescription: resw 1 0 0000170E ???? ifOptions: resw 1 0 00001710 ???? ifValue: resw 1 0 00001712 ???? ifTrying: resw 1 0 00001714 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 0000170A ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 0000170E ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00001712 ???? smName1: resw 1 ; -> first string part 0 00001714 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00001716 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00001718 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 0000171A ???? smBaseNext: resw 1 0 0000171C ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 0000171E ???? smSpecialNext: resw 1 0 00001720 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 0000170A ?? ssLength: resb 1 ; how long this string is (only ssString) 0 0000170B ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 0000170C ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 0000170A ???? shHash: resw 1 ; hash value 0 0000170C ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 0000170A ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 0000170E ???? xmsmSourceHandle: resw 1 0 00001710 ???????? xmsmSourceAddress: resd 1 0 00001714 ???? xmsmDestHandle: resw 1 0 00001716 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 usesection lDEBUG_DATA_ENTRY 23 ------------------ note: usesection lDEBUG_DATA_ENTRY 24 25 align 2, db 0 0 0000170A 0000 debuggerfunction: dw 0 27 28 %if ! _CATCHINT2D 29 align 2, db 0 30 debuggeramissig: 31 .ven: fill 8,32,db "ecm" ; vendor 32 .prod: fill 8,32,db "lDebug" ; product 33 db 0, 0 34 35 try_debugger_amis_multiplex_number: 36 db -1 37 %else 38 %if 0 39 40 Supported Int2D functions: 41 42 AMIS - Installation check 43 INP: al = 00h 44 OUT: al = 0FFh 45 cx = Private version number (currently 0100h) 46 dx:di-> signature: "ecm ", "lDebug " 47 48 AMIS - Get private entry point - NOP: no private entry point 49 INP: al = 01h 50 OUT: al = 00h 51 52 AMIS - Uninstall - NOP: can't uninstall 53 INP: al = 02h 54 OUT: al = 00h (not implemented) 55 56 AMIS - Request pop-up - NOP: no pop-up 57 INP: al = 03h 58 OUT: al = 00h 59 60 AMIS - Determine chained interrupts 61 INP: al = 04h 62 OUT: al = 04h 63 dx:bx -> interrupt hook list (Int2D always.) 64 65 AMIS - Get hotkeys - NOP: no hotkeys 66 INP: al = 05h 67 OUT: al = 00h 68 69 AMIS - Get device driver information 70 INP: al = 06h 71 OUT: al = 00h if not device mode 72 al = 01h to indicate one device, 73 ah = device flags = 01h 74 (01h set = installed from CONFIG.SYS, 75 02h clear = device is linked into DOS device chain, 76 04h clear = inreentrant device) 77 dx:bx -> device header 78 79 AMIS - Reserved for AMIS 80 INP: al = 07h..0Fh 81 OUT: al = 00h 82 83 TSR - Reserved for TSR 84 INP: al = 10h..2Fh 85 OUT: al = 00h 86 87 lDebug - Update IISP Header 88 INP: al = 30h 89 ds:si -> source IISP header (or pseudo header) 90 es:di -> destination IISP header 91 OUT: al = FFh to indicate suppported, 92 si and di both incremented by 6 93 destination's ieNext field updated from source 94 al != FFh if not supported, 95 si and di unchanged 96 CHG: - 97 REM: This function is intended to aid in debugging 98 handler re-ordering, removal, or insertion. 99 The 32-bit far pointer needs to be updated 100 as atomically as possible to avoid using 101 an incorrect pointer. 102 Test case: Run a program such as our TSRs' 103 uninstaller or SHUFHOOK and step through it 104 with "tp fffff" when operating on something 105 crucial such as interrupt 21h. Without this 106 function the machine will crash! 107 To enable this function to be called, first run 108 the command "r dco4 or= 8", or "INSTALL AMIS" 109 (install our AMIS multiplexer handler). 110 Other workaround: Use SILENT for TP and disable 111 DCO3 flag 4000_0000 (do not call int 21.0B to 112 check for Ctrl-C status). 113 Yet another workaround: Set flag DCO 8 (enable 114 fake InDOS mode, avoid calling int 21h). 115 REM: The source may be a pseudo IISP header. In this 116 case the ieEntry field should hold 0FEEBh 117 (jmp short $) and the ieSignature field 118 should indicate the source, eg "VT" for the IVT 119 or "NH" for inserting a New Handler. 120 121 lDebugX - Install DPMI hook 122 INP: al = 31h 123 OUT: al = FFh if installed 124 al = FEh..F0h if not installed but call is supported 125 al = 00h if not supported 126 CHG: - 127 STT: not in DOS 128 129 lDebugX - Reserved 130 INP: al = 32h 131 132 lDebugX - Install fault areas 133 INP: al = 33h 134 dx:bx -> fault area structure of client 135 OUT: al = FFh if installed 136 al = FEh..01h if not installed but call is supported 137 al = 00h if not supported 138 CHG: al, bx, cx, dx, si, di, es, ds 139 REM: The area structure is defined in the lDebug sources' 140 debug.mac file. The first 32 bytes of the structure 141 start with a signature word, which is equal to the 142 word value CBF9h (encoding the instruction sequence 143 of stc \ retf) if the structure is not currently 144 installed into any debugger. The remainder of the 145 32 bytes, as well as the details of how the first 146 two bytes are used otherwise, are private to the 147 debugger that provides this service (the server). 148 The area structure may be far-called in 86 Mode. The 149 only currently defined function (in al) for this call 150 is function 00h, which attempts to uninstall the area 151 structure which is being called. It is valid for 152 either the server or the client to uninstall an 153 area structure if they so wish. 154 The fields of the structure behind the first 32 bytes 155 point to a number of sub-structures and area function 156 lists and area lists. All of these structures are 157 to be accessed using the same segment as the main 158 area structure. They contain linear start and linear 159 end addresses, which the client sets up before it 160 tries to install the areas. The linear start address 161 is also assumed to point to the segment base address 162 which is used as the reference for the area functions 163 and areas. (They do not have to match the offset part 164 actually used to run the code, but the lists must be 165 based on the linear start address.) 166 167 TSR - Reserved for TSR 168 INP: al = 34h..3Fh 169 OUT: al = 00h 170 171 lDebug - AMIS message ELD - Display message to debugger terminal 172 INP: al = 40h 173 dx:bx -> ASCIZ message, will be truncated if > 384 Bytes 174 OUT: al = 00h if not supported 175 al = FFh if supported and full message stored 176 (older revisions unconditionally returned al = FFh) 177 al = FEh if supported and truncated message stored 178 (truncation may occur at 383 or 384 Bytes of non-NUL text) 179 REM: Older versions of the ELD only had a buffer of 128 Bytes. 180 181 lDebug - AMIS message ELD - Query message status 182 INP: al = 41h 183 OUT: al = 00h if not supported 184 al = 01h if supported and no message is stored 185 al = 02h if supported and message is still stored (not yet displayed) 186 187 lDebug - AMIS other debugger link ELD - Get other link data 188 INP: al = 42h 189 OUT: al = 00h if not supported 190 al = FFh if supported 191 bx (86M segment) => link tables 192 cx (selector) => link tables 193 dx (86M segment) => PSP 194 si (selector) => PSP 195 di -> link info in link tables section 196 REM: If the debugger is without DPMI support or if not in PM, 197 the selector values may be uninitialised or stale. 198 199 lDebug - AMIS command ELD - Inject a debugger command 200 INP: al = 43h 201 cx = flags, all reserved for now (must pass as 0) 202 dx:bx -> message in byte-counted string, 203 1 byte length (<= 254) 204 N bytes text, length matching the value of length byte 205 1 byte Carriage Return (= 13) 206 OUT: al = 00h if not supported 207 al = 01h if supported, but buffer is full 208 al = 02h if supported, but unknown bit set in cx 209 al = FFh if successfully stored in buffer 210 211 lDebug - Reserved for ELD interfacing 212 INP: al = 44h..4Fh 213 OUT: al = 00h 214 215 TSR - Reserved for TSR 216 INP: al = 50h..FFh 217 OUT: al = 00h 218 219 %endif 220 221 align 2, db 0 222 debuggeramissig: 223 %if _LOADER 224 .ven: fill 8,32,db "ecm" ; vendor 225 .prod: fill 8,32,db "lDebug" ; product 226 227 align 2, db 0 228 %endif 229 amissig: 0 0000170C 65636D20 .ven: fill 8,32,db "ecm" ; vendor 231 %if _LOADER 232 .prod: fill 8,32,db "Loader" ; product 233 .desc: asciz _PROGNAME,_VERSION,"." 234 ; description 235 %else 0 00001714 6C446562756720 .prod: fill 8,32,db "lDebug" ; product 0 00001714 0 0000171C 436F6E64746E6C2E20 .desc: asciz _PROGNAME,_VERSION,", debugger." 0 00001725 44656275676761626C 0 0000172E 65206C446562756758 0 00001737 2028323032362D3039 0 00001740 2D3232292C20646562 0 00001749 75676765722E00 238 ; description 239 %endif 240 %if $ - .desc > 64 241 %error AMIS description too long 242 %endif 0 00001750 00 _fill_at_least 56,0,.desc 244 245 try_amis_multiplex_number: 0 00001754 00 db 0 247 try_debugger_amis_multiplex_number: 0 00001755 FF db -1 249 250 0 00001756 CB90EB10FFFFFFFF4B iispentry int2D 0 0000175F 4200EBF300 0 0000176A 80FC00 cmp ah, 0 ; magic bytes, used by ecm RENUMBER 253 amis_multiplex_number equ $-1 ; AMIS multiplex number (data for cmp opcode) 254 ; SMC in section lDEBUG_DATA_ENTRY 0 0000176D 7405 je .handle ; our multiplex number --> 0 0000176F 2EFF2E[5000] jmp far [cs:.next] ; else go to next handler --> 257 258 .handle: 0 00001774 FC cld 260 %if _EXTENSIONS 0 00001775 50 push ax 0 00001776 53 push bx 0 00001777 51 push cx 0 00001778 52 push dx 0 00001779 1E push ds 0 0000177A 0E push cs 0 0000177B 1F pop ds 0 0000177C 8B0E[0000] mov cx, word [ext_amis_handler] 269 ; clc ; (already NC from cmp) 0 00001780 E304 jcxz @F 271 ; INP: NC 272 ; ds => entry segment 273 ; ss:sp -> far return address, ds, dx, cx, bx, ax, iret frame 274 ; cx destroyed 275 ; ax, bx, dx, bp, si, di, es, ss = original 276 ; fs, gs, high words = original 277 ; OUT: stack frame modified if desired 278 ; CY to iret after popping frame, 279 ; should retf (not use downlink) 280 ; NC to process function as usual (stack al = function), 281 ; may use downlink 282 ; STT: Real/Virtual 86 Mode 283 ; ss != debugger data/entry/stack segment 284 ; UP 285 ; DI 0 00001782 0E push cs 0 00001783 E87500 call .transfer_to_ext 288 @@: 0 00001786 1F pop ds 0 00001787 5A pop dx 0 00001788 59 pop cx 0 00001789 5B pop bx 0 0000178A 58 pop ax 0 0000178B 7225 jc .iret 295 %endif 0 0000178D 84C0 test al, al 0 0000178F 7417 jz .installationcheck ; installation check --> 298 ; cmp al, 02h 299 ; je .uninstall ; uninstallation --> 0 00001791 3C04 cmp al, 04h 0 00001793 741E je .determineinterrupts ; determine hooked interrupts --> 302 %if _DEVICE 0 00001795 3C06 cmp al, 06h 0 00001797 7421 je .getdevice 305 %endif 0 00001799 3C30 cmp al, 30h 0 0000179B 7431 je .updateiispheader 308 %if _PM 0 0000179D 3C31 cmp al, 31h 0 0000179F 7434 je .installdpmihook 311 %endif 312 %if _AREAS_HOOK_SERVER 0 000017A1 3C33 cmp al, 33h 0 000017A3 745C je .installareas 315 %endif 316 ; all other functions are reserved or not supported by TSR 317 .uninstall: 318 .nop: 0 000017A5 B000 mov al, 0 ; show not implemented 0 000017A7 CF iret 321 322 .installationcheck: 0 000017A8 FEC8 dec al ; (= FFh) show we're here 0 000017AA B90001 mov cx, 0100h ; = version 0 000017AD BF[0200] mov di, amissig ; dx:di -> AMIS signature strings of this program 326 .iret_dx_cs: 0 000017B0 8CCA mov dx, cs 328 .iret: 0 000017B2 CF iret 330 331 .determineinterrupts: ; al = 04h, always returns list 0 000017B3 2E8B1E[0000] mov bx, word [cs:amisintr_offset] 333 ; dx:bx -> hooked interrupts list 0 000017B8 EBF6 jmp short .iret_dx_cs 335 336 %if _DEVICE 337 .getdevice: 338 %if _APPLICATION || _BOOTLDR 0 000017BA 2EF606[0200]40 testopt [cs:internalflags6], dif6_device_mode 0 000017C0 74E3 jz .nop 341 %endif 0 000017C2 B80101 mov ax, 0101h ; CONFIG.SYS, one device 0 000017C5 31DB xor bx, bx 0 000017C7 8CCA mov dx, cs 345 %if _LINK 0 000017C9 81EA[1000] sub dx, strict word deviceshim_size + 10h 347 wlcalc word_shr_4, equ $ - 2 348 %elif _LINK_COMPAT 349 sub dx, strict word paras(deviceshim_size + 10h) 350 %else 351 sub dx, paras(deviceshim_size + 10h) 352 %endif 353 ; -> device header 0 000017CD CF iret 355 %endif 356 357 .updateiispheader: 0 000017CE B0FF mov al, 0FFh ; show supported 0 000017D0 FA cli ; try to rest while updating chain 0 000017D1 A7 cmpsw ; skip over first word (entrypoint) 361 ; (generally xxEBh or 0EA90h) 0 000017D2 A5 movsw 0 000017D3 A5 movsw ; transfer source ieNext to dest ieNext 0 000017D4 CF iret 365 366 %if _PM 367 .installdpmihook: 0 000017D5 53 push bx 0 000017D6 50 push ax 0 000017D7 51 push cx 0 000017D8 52 push dx 0 000017D9 57 push di 0 000017DA 06 push es 0 000017DB 1E push ds 0 000017DC 0E push cs 0 000017DD 1F pop ds 0 000017DE 800E[0000]04 setopt [internalflags6], dif6_in_amis_hook2F 0 000017E3 0E push cs 0 000017E4 E80F00 call .installdpmitocode 0 000017E7 8026[0000]FB clropt [internalflags6], dif6_in_amis_hook2F 0 000017EC 1F pop ds 0 000017ED 07 pop es 0 000017EE 5F pop di 0 000017EF 5A pop dx 0 000017F0 59 pop cx 0 000017F1 5B pop bx 0 000017F2 88FC mov ah, bh 0 000017F4 5B pop bx 0 000017F5 CF iret 390 391 .installdpmitocode: 0 000017F6 E8[0000] call entry_to_code_seg 0 000017F9 [0000] dw .installdpmicode 394 395 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 395 ------------------ note: usesection lDEBUG_CODE 396 .installdpmicode: 397 %if _APPLICATION || _DEVICE 0 00002D3E E8[0000] call hook2F.not_in_dos 399 %else 400 mov al, 0F1h 401 %endif 402 ; CHG: bx, cx, dx, di, es 403 ; STT: V86/RM 404 ; ds = debugger data segment 0 00002D41 CB retf 406 %endif 407 408 409 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 409 ------------------ note: usesection lDEBUG_DATA_ENTRY 410 411 %if _EXTENSIONS 412 .transfer_to_ext: 0 000017FB FF36[0000] push word [extseg] 0 000017FF 51 push cx 0 00001800 CB retf 416 %endif 417 418 419 %if _AREAS_HOOK_SERVER 420 .installareas: 0 00001801 50 push ax 0 00001802 0E push cs 0 00001803 1F pop ds 0 00001804 8EC2 mov es, dx 0 00001806 26813FF9CB cmp word [es:bx + areastrucEntry], 0CBF9h 0 0000180B B101 mov cl, 1 0 0000180D 7538 jne .areasend 428 429 ; Set new prev = old last 0 0000180F A1[6401] mov ax, word [ddebugareas.prev] 0 00001812 2689471C mov word [es:bx + areastrucPrev], ax 0 00001816 A1[6601] mov ax, word [ddebugareas.prev + 2] 0 00001819 2689471E mov word [es:bx + areastrucPrev + 2], ax 434 435 ; Set old last's next to new 0 0000181D C536[6401] lds si, [ddebugareas.prev] 0 00001821 895C18 mov word [si + areastrucNext], bx 0 00001824 89541A mov word [si + areastrucNext + 2], dx 439 440 ; Set new's next to entry 0 00001827 26C74718[4801] mov word [es:bx + areastrucNext], ddebugareas. 0 0000182D 268C4F1A mov word [es:bx + areastrucNext + 2], cs 443 444 ; Set entry's prev to new 0 00001831 0E push cs 0 00001832 1F pop ds 0 00001833 891E[6401] mov word [ddebugareas.prev], bx 0 00001837 8916[6601] mov word [ddebugareas.prev + 2], dx 449 0 0000183B 89DF mov di, bx 0 0000183D BE[4201] mov si, .areascode 0 00001840 B90300 mov cx, words(.areascodelength) 0 00001843 F3A5 rep movsw 454 0 00001845 B1FF mov cl, 0FFh 456 .areasend: 0 00001847 58 pop ax 0 00001848 88C8 mov al, cl 0 0000184A CF iret 460 461 0 0000184B 00 align 2, db 0 463 .areascode: 0 0000184C 9A[7001]0000 call 0:areastruc_entry 465 ..@patch_entry_seg: equ $ - 2 466 .areasaftercall: 0 00001851 90 nop 468 469 align 2, nop 470 .areascodelength: equ $ - .areascode 471 472 align 2, db 0 473 ddebugareas: 474 istruc AREASTRUC 475 .: 476 at areastrucEntry 0 00001852 B081 mov al, 81h 0 00001854 F9 stc 0 00001855 CB retf 0 00001856 00 at areastrucNext 0 0000186A [4801]0000 .next: dw ., 0 482 at areastrucPrev 0 0000186E [4801]0000 .prev: dw ., 0 0 00001872 00 iend 485 486 487 ; INP; al = function number (up to 7Fh) 488 ; dword [ss:sp] -> after far call 16:16 of areas struc 489 ; dword [ss:sp + 4] = far return address to caller 490 ; OUT: al = 0FFh if success 491 ; al = 80h if function not supported 492 ; al = 80h..0FEh if supported but error 493 ; al = unchanged INP:al if not supported 494 ; (probably area struc not installed) 495 ; CHG: ax, bx, cx, dx, si, di, ds, es 496 areastruc_entry: 0 0000187A 5B pop bx 0 0000187B 5A pop dx 0 0000187C 83EB05 sub bx, int2D.areasaftercall - int2D.areascode 500 .qq_entry: 0 0000187F 3C00 cmp al, 0 0 00001881 7404 je .uninstall 0 00001883 F9 stc 0 00001884 B080 mov al, 80h 0 00001886 CB retf 506 507 508 ; INP: al = 00h 509 ; dx:bx -> areas struc 510 ; OUT: al = 0FFh if success 511 ; al = 80h if function not supported 512 ; al = 81h if your area struc not found in our list 513 ; al = 82h if your prev does not match our next to you 514 ; al = 83h if your next's prev does not match you 515 ; al = 84h if your area struc not found and malformed list 516 ; al = 80h..0FEh if supported but error 517 ; al = unchanged INP:al if not supported 518 ; CHG: ax, bx, cx, dx, si, di, ds, es 519 .uninstall: 0 00001887 8CC9 mov cx, cs 0 00001889 8ED9 mov ds, cx 0 0000188B BE[4801] mov si, ddebugareas 523 0 0000188E 31FF xor di, di 525 .uninstall_loop: 0 00001890 4F dec di 0 00001891 B084 mov al, 84h 0 00001893 741E jz .uninstall_error 0 00001895 395C18 cmp word [si + areastrucNext], bx 0 00001898 7505 jne .uninstall_next 0 0000189A 39541A cmp word [si + areastrucNext + 2], dx 0 0000189D 7416 je .uninstall_found 533 .uninstall_next: 0 0000189F C57418 lds si, [si + areastrucNext] 0 000018A2 8CD8 mov ax, ds 0 000018A4 39C8 cmp ax, cx 0 000018A6 75E8 jne .uninstall_loop 0 000018A8 81FE[4801] cmp si, ddebugareas 0 000018AC 75E2 jne .uninstall_loop 0 000018AE B081 mov al, 81h 0 000018B0 A9 db __TEST_IMM16 542 .uninstall_error_2: 0 000018B1 B082 mov al, 82h 544 .uninstall_error: 0 000018B3 F9 stc 0 000018B4 CB retf 547 548 .uninstall_found: 0 000018B5 8EC2 mov es, dx 0 000018B7 2639771C cmp word [es:bx + areastrucPrev], si 0 000018BB 75F4 jne .uninstall_error_2 0 000018BD 8CD8 mov ax, ds 0 000018BF 2639471E cmp word [es:bx + areastrucPrev + 2], ax 0 000018C3 75EC jne .uninstall_error_2 555 0 000018C5 1E push ds 0 000018C6 56 push si 0 000018C7 26C57718 lds si, [es:bx + areastrucNext] 0 000018CB 395C1C cmp word [si + areastrucPrev], bx 0 000018CE 7505 jne @F 0 000018D0 39541E cmp word [si + areastrucPrev + 2], dx 0 000018D3 5E pop si 0 000018D4 1F pop ds 564 @@: 0 000018D5 B083 mov al, 83h 0 000018D7 75DA jne .uninstall_error 567 0 000018D9 268B4718 mov ax, word [es:bx + areastrucNext] 0 000018DD 894418 mov word [si + areastrucNext], ax 0 000018E0 268B471A mov ax, word [es:bx + areastrucNext + 2] 0 000018E4 89441A mov word [si + areastrucNext + 2], ax 572 0 000018E7 26C57718 lds si, [es:bx + areastrucNext] 0 000018EB 268B471C mov ax, word [es:bx + areastrucPrev] 0 000018EF 89441C mov word [si + areastrucPrev], ax 0 000018F2 268B471E mov ax, word [es:bx + areastrucPrev + 2] 0 000018F6 89441E mov word [si + areastrucPrev + 2], ax 578 0 000018F9 B0FF mov al, 0FFh 0 000018FB F8 clc 0 000018FC 26C707F9CB mov word [es:bx + areastrucEntry], 0CBF9h 0 00001901 CB retf 583 %endif ; _AREAS_HOOK_SERVER 584 585 %endif ; _CATCHINT2D === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00001902 ???????? eldhSignature: resb 4 ; "ELD1" 0 00001906 ?????? resb 3 ; reserved 0 00001909 ?? resb 1 ; 26 (Ctrl-Z) 0 0000190A ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000190E ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00001910 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00001912 ???????? eldhDataOffset: resd 1 0 00001916 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00001918 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000191A ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000191C ???????? eldhReserved: resb 4 ; reserved 0 00001920 ???? 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 00001922 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00001926 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000192A ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000192E ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00001902 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000190A ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000190E ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00001910 ???? 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 00001902 ???? 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 00001904 ???? eldltAmount: resw 1 0 00001906 ???????? 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 00001902 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00001904 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00001906 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00001908 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000190A ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00001912 ???? 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 00001902 ???? eldlSignature: resw 1 ; 0E1D1h 0 00001904 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00001906 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00001908 ???? eldlUseLinkHash: resw 1 0 0000190A ???? eldlDataAmount: resw 1 0 0000190C ???? eldlDataPrefixes: resw 1 0 0000190E ???? eldlDataEntries: resw 1 0 00001910 ???? eldlDataAddresses: resw 1 0 00001912 ???? eldlCodeAmount: resw 1 0 00001914 ???? eldlCodePrefixes: resw 1 0 00001916 ???? eldlCodeEntries: resw 1 0 00001918 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 0000191A ???? eldlDualAmount: resw 1 0 0000191C ???? eldlDualPrefixes: resw 1 0 0000191E ???? eldlDualEntries: resw 1 0 00001920 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00001902 ???? ifKeyword: resw 1 0 00001904 ???? ifDescription: resw 1 0 00001906 ???? ifOptions: resw 1 0 00001908 ???? ifValue: resw 1 0 0000190A ???? ifTrying: resw 1 0 0000190C ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00001902 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00001906 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 0000190A ???? smName1: resw 1 ; -> first string part 0 0000190C ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 0000190E ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00001910 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00001912 ???? smBaseNext: resw 1 0 00001914 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00001916 ???? smSpecialNext: resw 1 0 00001918 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00001902 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00001903 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00001904 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00001902 ???? shHash: resw 1 ; hash value 0 00001904 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00001902 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00001906 ???? xmsmSourceHandle: resw 1 0 00001908 ???????? xmsmSourceAddress: resd 1 0 0000190C ???? xmsmDestHandle: resw 1 0 0000190E ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <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 00001902 43 db 'C' 0 00001903 44 db 'D' 0 00001904 45 db 'E' 0 00001905 54 db 'T' 0 00001906 50 db 'P' 0 00001907 4E db 'N' 0 00001908 4C db 'L' 0 00001909 49 db 'I' 0 0000190A 57 db 'W' 39 %if BPSIZE == 6 || BPSIZE == 9 0 0000190B 4F db 'O' 41 %endif 0 0000190C 53 db 'S' 43 %endif 0 0000190D 55 db 'U' ; BU command 0 0000190E 00 db 0 ; placeholder, never matches 46 .scanamount: equ $ - .scan 47 48 ; REM: Dispatch table in section lDEBUG_CODE 0 0000190F 00 align 2, db 0 50 .offset: 51 %if _BREAKPOINTS 0 00001910 [C504] dw point_clear_enable_disable_toggle_common ; C 0 00001912 [C504] dw point_clear_enable_disable_toggle_common ; D 0 00001914 [C504] dw point_clear_enable_disable_toggle_common ; E 0 00001916 [C504] dw point_clear_enable_disable_toggle_common ; T 0 00001918 [3A00] dw point_set ; P 0 0000191A [1802] dw point_number ; N 0 0000191C [E405] dw point_list ; L 0 0000191E [6702] dw point_id ; I 0 00001920 [A903] dw point_when ; W 61 %if BPSIZE == 6 || BPSIZE == 9 0 00001922 [4803] dw point_offset ; O 63 %endif 0 00001924 [B608] dw point_swap ; S 65 %endif 0 00001926 [6B09] dw bu_breakpoint; U 0 00001928 [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 0000192A [A604] dw point_clear ; C 0 0000192C [DA05] dw point_disable; D 0 0000192E [D305] dw point_enable ; E 0 00001930 [DF05] dw point_toggle ; T 81 %endif 82 83 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 00002D42 F606[0100]40 testopt [internalflags], nodosloaded 0 00002D47 740F jz @F 93 %endif 0 00002D49 4E dec si 0 00002D4A 4E dec si ; -> at 'B' 0 00002D4B BA[0000] mov dx, msg.boot 0 00002D4E E8[0000] call isstring? ; check for "BOOT" 0 00002D51 7503E9[0000] je bootcmd 0 00002D56 46 inc si ; skip 'B' 0 00002D57 AC lodsb ; load next 101 @@: 102 %endif 0 00002D58 E8[0000] call capitalise 0 00002D5B BF[0000] mov di, bb_dispatch.scan 0 00002D5E B90D00 mov cx, bb_dispatch.scanamount 0 00002D61 F2AE repne scasb 107 ; di -> behind the NUL if no valid subcommand 0 00002D63 81EF[0100] sub di, bb_dispatch.scan + 1 109 ; get 0-based index 0 00002D67 D1E7 shl di, 1 ; byte index to word index 0 00002D69 89F3 mov bx, si 0 00002D6B E8[0000] call skipcomma ; (most commands shared this) 0 00002D6E FFB5[0E00] push word [bb_dispatch.offset + di] 114 ; dispatch into (near word) table 0 00002D72 8BBD[2800] mov di, word [bb_dispatch.di + di] 0 00002D76 C3 retn ; jump to routine 117 118 error_at_bx: 0 00002D77 89DE mov si, bx 0 00002D79 E9[0000] jmp error 121 122 123 %if _BREAKPOINTS 124 point_set: 0 00002D7C E89407 call getpointat ; "AT" keyword ? 0 00002D7F 720B jc .not_at ; no --> 0 00002D81 BF[8300] mov di, .get_saved ; access saved address later 0 00002D84 E84C07 call findpointat ; do we find it ? 0 00002D87 7210 jc .find_new ; no, treat as if "NEW" keyword given --> 130 ; point index is in dx 0 00002D89 52 push dx ; stack = point index 0 00002D8A EB57 jmp @FF ; skip check whether used 133 134 .not_at: 0 00002D8C BF[7700] mov di, .get_addr ; get address from input command line later 0 00002D8F E8A207 call getpointindex 0 00002D92 733E jnc @F ; got an index --> 0 00002D94 7503E9[0000] jz error ; "ALL" is invalid 139 ; got "NEW" keyword 140 .find_new: 0 00002D99 31C9 xor cx, cx ; loop counter = 0 (start with point index 0) 0 00002D9B 50 push ax ; stack = next text byte 143 .new_loop: 0 00002D9C 89C8 mov ax, cx ; try this index 0 00002D9E E82307 call calcpointbit ; bx, ah = offset and mask 146 %if ((_NUM_B_BP+7)>>3) != 1 0 00002DA1 84A7[0000] test byte [b_bplist.used_mask+bx], ah 148 %else 149 test byte [b_bplist.used_mask], ah 150 %endif 0 00002DA5 7427 jz .new_found ; found unused one --> 152 0 00002DA7 41 inc cx ; = next index 0 00002DA8 83F910 cmp cx, _NUM_B_BP ; valid ? 0 00002DAB 72EF jb .new_loop ; yes, try next --> 156 0 00002DAD BA[0000] mov dx, msg.bb_no_new ; no free point found 0 00002DB0 B80801 mov ax, 0108h 0 00002DB3 E8[0000] call setrc 0 00002DB6 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 00002DB9 8B1E[0000] mov bx, word [reg_cs] ; default seg/sel is cs 0 00002DBD E8[0000] call getlinearaddr ; parse address (segmented or "@ " linear) 0 00002DC0 730B jnc .retn ; success --> 0 00002DC2 E9[0000] jmp error 173 174 175 ; INP: al=, si-> input line 176 ; OUT: bx:dx = linear address 177 ; CHG: - 178 .get_saved: 0 00002DC5 8B16[0000] mov dx, word [..@bb_saved_linear] 0 00002DC9 8B1E[0200] mov bx, word [..@bb_saved_linear + 2] 181 .retn: 0 00002DCD C3 retn 183 184 185 .new_found: 0 00002DCE 58 pop ax ; restore text byte in al 0 00002DCF 51 push cx ; stack = point index 0 00002DD0 EB11 jmp @FF 189 190 @@: 0 00002DD2 52 push dx ; preserve point index 0 00002DD3 50 push ax 0 00002DD4 89D0 mov ax, dx 0 00002DD6 E8EB06 call calcpointbit 195 %if ((_NUM_B_BP+7)>>3) != 1 0 00002DD9 84A7[0000] test byte [b_bplist.used_mask+bx], ah 197 %else 198 test byte [b_bplist.used_mask], ah 199 %endif 0 00002DDD 58 pop ax 0 00002DDE 7403E9[0000] jnz error 202 @@: 0 00002DE3 FFD7 call di ; call either .get_addr or .get_saved 204 ; in any case, bx:dx = linear address 0 00002DE5 BF0080 mov di, 8000h ; default counter 0 00002DE8 52 push dx ; preserve linear low word 0 00002DE9 31D2 xor dx, dx 208 0 00002DEB 8916[0000] mov word [..@bb_id_length], dx 0 00002DEF 8916[0000] mov word [..@bb_when_length], dx 211 ; initialise to empty ID and WHEN condition 0 00002DF3 52 push dx ; stack = 0 initially 213 .loop_additional: 0 00002DF4 E8[0000] call skipcomm0 0 00002DF7 4E dec si 0 00002DF8 BA[0000] mov dx, msg.number 0 00002DFB E8[0000] call isstring? 0 00002DFE 7435 je .additional_number 0 00002E00 BA[0000] mov dx, msg.counter 0 00002E03 E8[0000] call isstring? 0 00002E06 742D je .additional_number 0 00002E08 BA[0000] mov dx, msg.id 0 00002E0B E8[0000] call isstring? 0 00002E0E 745E je .additional_id 0 00002E10 BA[0000] mov dx, msg.when 0 00002E13 E8[0000] call isstring? 0 00002E16 7448 je .additional_when 228 %if BPSIZE == 6 || BPSIZE == 9 0 00002E18 BA[0000] mov dx, msg.offset 0 00002E1B E8[0000] call isstring? 0 00002E1E 7425 je .additional_offset 232 %endif 0 00002E20 AC lodsb 0 00002E21 E8[0000] call iseol? 0 00002E24 744F je .no_additional 0 00002E26 5A pop dx ; get stack (0 if no number yet) 0 00002E27 85D2 test dx, dx ; already got a number without keyword? 0 00002E29 7403E9[0000] jnz error ; yes --> 0 00002E2E 42 inc dx ; remember for subsequent iterations 0 00002E2F 52 push dx ; stack = nonzero 0 00002E30 E8[0000] call skipwh0 0 00002E33 EB0B jmp @F 243 244 .additional_number: 0 00002E35 E8[0000] call skipequals 0 00002E38 E8[0000] call iseol? 0 00002E3B 7503E9[0000] je error 248 @@: 0 00002E40 E8DF00 call getcounter 0 00002E43 EBAF jmp .loop_additional 251 252 %if BPSIZE == 6 || BPSIZE == 9 253 .additional_offset: 0 00002E45 5A pop dx 0 00002E46 80CA01 or dl, 1 ; remember for subsequent iterations 256 ; not to accept number without keyword 0 00002E49 52 push dx 0 00002E4A E8[0000] call skipequals 259 %if _PM 0 00002E4D 53 push bx 0 00002E4E E8[0000]EB02[0000] nearcall getdword 0 00002E55 8916[0000] mov word [bp_offset], dx 0 00002E59 891E[0200] mov word [bp_offset + 2], bx 0 00002E5D 5B pop bx 265 %else 266 nearcall getword 267 mov word [bp_offset], dx 268 %endif 0 00002E5E EB94 jmp .loop_additional 270 %endif 271 272 .additional_when: 0 00002E60 5A pop dx 0 00002E61 80CA01 or dl, 1 ; remember for subsequent iterations 275 ; not to accept number without keyword 0 00002E64 52 push dx 0 00002E65 E8[0000] call skipequals 0 00002E68 4E dec si 0 00002E69 E88700 call get_when 0 00002E6C EB86 jmp .loop_additional 281 282 .additional_id: 0 00002E6E E8[0000] call skipequals 0 00002E71 4E dec si 0 00002E72 E84E00 call get_id 286 287 .no_additional: 0 00002E75 5A pop dx ; discard non-keyword NUMBER indicator 0 00002E76 5A pop dx ; restore dx = low word of linear 290 0 00002E77 87DA xchg bx, dx ; dx:bx = linear 0 00002E79 93 xchg bx, ax ; dx:ax = linear 0 00002E7A 5B pop bx ; = 0-based point index to set 0 00002E7B 52 push dx 0 00002E7C 50 push ax ; on stack: dword linear 296 0 00002E7D 57 push di ; stack = counter 0 00002E7E 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 00002E80 E8EC02 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 00002E83 E85F01 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 00002E86 E8AB02 call set_when ; CHG ax, bx, cx, si, di 0 00002E89 92 xchg ax, dx ; ax = point index 321 0 00002E8A 89C3 mov bx, ax 0 00002E8C 01DB add bx, bx ; * 2 0 00002E8E 8F87[0000] pop word [ b_bplist.counter + bx ] 325 ; = counter value 0 00002E92 01DB add bx, bx ; * 4 327 %if BPSIZE == 4 328 %elif BPSIZE == 5 329 add bx, ax ; * 5 330 %elif BPSIZE == 6 331 add bx, ax ; * 5 332 add bx, ax ; * 6 333 %elif BPSIZE == 9 0 00002E94 01DB add bx, bx ; * 8 0 00002E96 01C3 add bx, ax ; * 9 336 %else 337 %error Unexpected breakpoint size 338 %endif 0 00002E98 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 00002E9C 8F87[0200] pop word [ b_bplist.bp + bx + 2 ] 0 00002EA0 C687[0800]CC mov byte [ b_bplist.bp + bx + BPSIZE - 1 ], 0CCh 348 %if BPSIZE == 6 349 push word [bp_offset] 350 pop word [ b_bplist.bp + bx + 3 ] 351 %elif BPSIZE == 9 0 00002EA5 FF36[0000] push word [bp_offset] 0 00002EA9 8F87[0400] pop word [ b_bplist.bp + bx + 4 ] 0 00002EAD FF36[0200] push word [bp_offset + 2] 0 00002EB1 8F87[0600] pop word [ b_bplist.bp + bx + 6 ] 356 %endif 0 00002EB5 E80C06 call calcpointbit ; bx, ah = offset and mask 358 %if ((_NUM_B_BP+7)>>3) != 1 0 00002EB8 08A7[0000] or byte [b_bplist.used_mask+bx], ah 360 ; mark as used 0 00002EBC F6D4 not ah 0 00002EBE 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 00002EC2 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 00002EC3 8936[0000] mov word [..@bb_id_start], si 384 ; -> text to use 385 @@: 0 00002EC7 AC lodsb ; load next text byte 0 00002EC8 E8[0000] call iseol?.notsemicolon; end reached ? 0 00002ECB 75FA jne @B ; not yet --> 389 ; si -> after EOL char 390 ; si - 1 -> EOL char 391 @@: 0 00002ECD 4E dec si ; -> past text to use 0 00002ECE 3B36[0000] cmp si, word [..@bb_id_start] 394 ; start reached ? 0 00002ED2 740C je @F ; yes, avoid underflow --> 0 00002ED4 807CFF20 cmp byte [si - 1], 32 ; last byte is a blank ? 0 00002ED8 74F3 je @B 0 00002EDA 807CFF09 cmp byte [si - 1], 9 0 00002EDE 74ED je @B ; yes, decrement offset --> 400 @@: 0 00002EE0 89F1 mov cx, si ; -> past text 0 00002EE2 2B0E[0000] sub cx, word [..@bb_id_start] 403 ; = length of text to use 0 00002EE6 890E[0000] mov word [..@bb_id_length], cx 405 ; store the length 0 00002EEA 83F93F cmp cx, 63 ; may fit ? 0 00002EED 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 00002EF2 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 00002EF3 8936[0000] mov word [..@bb_when_start], si 436 ; -> text to use 437 @@: 0 00002EF7 AC lodsb 0 00002EF8 52 push dx 0 00002EF9 53 push bx 0 00002EFA E8[0000]EB02[0000] nearcall getexpression ; parse the number 0 00002F01 5B pop bx 0 00002F02 5A pop dx 444 ; si -> after next nonblank 445 ; si - 1 -> next nonblank 446 @@: 0 00002F03 4E dec si ; -> past text to use 0 00002F04 3B36[0000] cmp si, word [..@bb_when_start] 449 ; start reached ? 0 00002F08 740C je @F ; yes, avoid underflow --> 451 ; (cannot actually be reached) 0 00002F0A 807CFF20 cmp byte [si - 1], 32 ; last byte is a blank ? 0 00002F0E 74F3 je @B 0 00002F10 807CFF09 cmp byte [si - 1], 9 0 00002F14 74ED je @B ; yes, decrement offset --> 456 @@: 0 00002F16 89F1 mov cx, si ; -> past text 0 00002F18 2B0E[0000] sub cx, word [..@bb_when_start] 459 ; = length of text to use 0 00002F1C 890E[0000] mov word [..@bb_when_length], cx 461 ; store the length 462 0 00002F20 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 00002F21 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 00002F22 E8[0000] call skipwh0 0 00002F25 E8[0000] call iseol? 0 00002F28 740B je .got_counter 0 00002F2A 52 push dx 0 00002F2B E8[0000]EB02[0000] nearcall getword 0 00002F32 89D7 mov di, dx 0 00002F34 5A pop dx 501 .got_counter: 0 00002F35 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 00002F36 BF0080 mov di, 8000h ; default counter 0 00002F39 9C pushf 0 00002F3A 52 push dx 0 00002F3B 4E dec si ; -> text 0 00002F3C BA[0000] mov dx, msg.number ; NUMBER= keyword ? 0 00002F3F E8[0000] call isstring? 0 00002F42 7408 je @F 0 00002F44 BA[0000] mov dx, msg.counter ; COUNTER= keyword ? 0 00002F47 E8[0000] call isstring? 0 00002F4A 7504 jne @FF ; no --> 520 @@: 0 00002F4C E8[0000] call skipequals ; yes, eat optional equals sign 0 00002F4F A8 db __TEST_IMM8 ; (skip lodsb) 523 @@: 0 00002F50 AC lodsb 0 00002F51 5A pop dx 0 00002F52 E8CDFF call . ; get the counter 0 00002F55 E8[0000] call chkeol ; make sure we end line 0 00002F58 9D popf 0 00002F59 C3 retn 530 531 532 point_number: 0 00002F5A E8B605 call getpointat ; "AT" keyword ? 0 00002F5D 720D jc .not_at ; no --> 0 00002F5F E87105 call findpointat ; do we find it ? 0 00002F62 7303E9[0000] jc error ; not found --> 0 00002F67 E8CCFF call getcounter.pushf_chkeol 0 00002F6A EB26 jmp @F ; point index is in dx --> 539 540 .not_at: 0 00002F6C E8C505 call getpointindex 0 00002F6F E8C4FF call getcounter.pushf_chkeol 0 00002F72 731E jnc @F 0 00002F74 7403E9[0000] jnz error ; "NEW" is invalid --> 545 0 00002F79 31C9 xor cx, cx 547 .all_loop: 0 00002F7B 89C8 mov ax, cx 0 00002F7D 89CA mov dx, cx 0 00002F7F E84205 call calcpointbit 551 %if ((_NUM_B_BP+7)>>3) != 1 0 00002F82 84A7[0000] test byte [b_bplist.used_mask+bx], ah 553 %else 554 test byte [b_bplist.used_mask], ah 555 %endif 0 00002F86 7403 jz .all_next ; skip if unused --> 0 00002F88 E81500 call .setnumber 558 .all_next: 0 00002F8B 41 inc cx ; next point 0 00002F8C 83F910 cmp cx, _NUM_B_BP ; more to go ? 0 00002F8F 72EA jb .all_loop ; yes --> 0 00002F91 C3 retn ; done 563 564 @@: 0 00002F92 89D0 mov ax, dx 0 00002F94 E82D05 call calcpointbit 567 %if ((_NUM_B_BP+7)>>3) != 1 0 00002F97 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 00002F9B 7503E9[0000] jz error ; no --> 573 574 .setnumber: 0 00002FA0 89D3 mov bx, dx ; = index 0 00002FA2 01DB add bx, bx ; * 2, = word index 0 00002FA4 89BF[0000] mov word [b_bplist.counter + bx], di 0 00002FA8 C3 retn 579 580 581 point_id: 0 00002FA9 E86705 call getpointat ; "AT" keyword ? 0 00002FAC 720A jc .not_at ; no --> 0 00002FAE E82205 call findpointat ; do we find it ? 0 00002FB1 7303E9[0000] jc error ; not found --> 0 00002FB6 EB08 jmp @F ; point index is in dx --> 587 588 .not_at: 0 00002FB8 E87905 call getpointindex 0 00002FBB 7303E9[0000] jc error ; "NEW" and "ALL" keywords are invalid --> 591 592 @@: 0 00002FC0 50 push ax ; preserve text 0 00002FC1 89D0 mov ax, dx 0 00002FC3 E8FE04 call calcpointbit 596 %if ((_NUM_B_BP+7)>>3) != 1 0 00002FC6 84A7[0000] test byte [b_bplist.used_mask+bx], ah 598 %else 599 test byte [b_bplist.used_mask], ah 600 %endif 0 00002FCA 7503E9[0000] jz error 0 00002FCF 58 pop ax ; restore al = text 603 0 00002FD0 E8[0000] call skipcomm0 605 0 00002FD3 4E dec si ; si -> nonblank 0 00002FD4 52 push dx 0 00002FD5 BA[0000] mov dx, msg.id ; "ID=" keyword ? 0 00002FD8 E8[0000] call isstring? 0 00002FDB 7504 jne .no_id_kw ; no --> 0 00002FDD E8[0000] call skipequals ; skip optional equals sign 0 00002FE0 4E dec si ; si -> nonblank 613 .no_id_kw: 0 00002FE1 5A pop dx 0 00002FE2 E8DEFE 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 00002FE5 BBFFFF mov bx, -1 ; just get, do not set 0 00002FE8 E84000 call get_set_id_offset_length 0 00002FEB B10A mov cl, 10 0 00002FED 89D8 mov ax, bx 0 00002FEF D3EB shr bx, cl ; bx = length of ID to free 628 0 00002FF1 8B36[0000] mov si, word [b_bplist.idbuffer.free] 630 ; displacement free 0 00002FF5 F7DE neg si ; - displacement free 0 00002FF7 81C68001 add si, _NUM_B_ID_BYTES 633 ; 1024 - displacement free = amount free 0 00002FFB 01DE add si, bx ; amount free + length of ID to free 0 00002FFD 8B0E[0000] mov cx, word [..@bb_id_length] 0 00003001 E33F jcxz .empty ; if no ID to set --> 0 00003003 39CE cmp si, cx ; enough free ? 0 00003005 8B36[0000] mov si, word [..@bb_id_start] 639 ; -> ID string 0 00003009 7303E9[0000] jb error ; no --> 641 0 0000300E 51 push cx 0 0000300F E83700 call free_id ; actually free it now 0 00003012 59 pop cx 0 00003013 51 push cx 0 00003014 89CB mov bx, cx ; length 0 00003016 B10A mov cl, 10 ; offset part is 10 bits (0..1023) 0 00003018 D3E3 shl bx, cl ; length is in top 6 bits (0..63) 0 0000301A 59 pop cx 0 0000301B 8B3E[0000] mov di, word [b_bplist.idbuffer.free] 651 ; = displacement of free part 0 0000301F 010E[0000] add word [b_bplist.idbuffer.free], cx 653 ; mark space as used 0 00003023 09FB or bx, di ; OR in the offset 0 00003025 81C7[0000] add di, b_bplist.idbuffer 656 ; -> into buffer space 0 00003029 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 0000302B 87D3 xchg dx, bx ; bx = index, dx = to set 0 0000302D D1E3 shl bx, 1 ; bx = word index (undone later) 0 0000302F FFB7[0000] push word [b_bplist.id + bx] 668 ; stack = get it 0 00003033 83FAFF cmp dx, -1 ; get only ? 0 00003036 7404 je @F ; yes --> 0 00003038 8997[0000] mov word [b_bplist.id + bx], dx 672 ; set it 673 @@: 0 0000303C 5A pop dx ; get it from stack 0 0000303D D1EB shr bx, 1 ; undo to get back (byte) index 0 0000303F 87D3 xchg dx, bx 0 00003041 C3 retn 678 679 .empty: 0 00003042 E80400 call free_id 0 00003045 31DB xor bx, bx ; offset = 0 and length = 0 0 00003047 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 00003049 B10A mov cl, 10 0 0000304B 89C3 mov bx, ax 0 0000304D 80E703 and bh, 1023 >> 8 ; bx = offset of ID to free 0 00003050 D3E8 shr ax, cl ; ax = length of ID to free 0 00003052 91 xchg cx, ax ; cx = length of ID to free 703 0 00003053 56 push si 0 00003054 57 push di 706 0 00003055 E330 jcxz .return ; if none to free --> 708 0 00003057 51 push cx 0 00003058 8DBF[0000] lea di, [b_bplist.idbuffer + bx] 711 ; -> ID to be freed 712 ; (destination of following data) 0 0000305C 89FE mov si, di 0 0000305E 01CE add si, cx ; -> behind ID to be freed 715 ; (source of following data) 0 00003060 89F1 mov cx, si 0 00003062 F7D9 neg cx ; minus pointer to first subsequent data 0 00003064 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 00003068 F3A4 rep movsb ; now di -> first uninitialised byte 0 0000306A 59 pop cx ; = length of data freed 723 0 0000306B 290E[0000] sub word [b_bplist.idbuffer.free], cx 725 ; mark as free 0 0000306F 51 push cx 0 00003070 30C0 xor al, al 0 00003072 F3AA rep stosb ; clear the buffer trailer (uninitialised part) 0 00003074 5F pop di ; di = length of data freed 730 0 00003075 BE[0000] mov si, b_bplist.id 732 %if _NUM_B_BP < 256 0 00003078 B110 mov cl, _NUM_B_BP 734 %else 735 mov cx, _NUM_B_BP 736 %endif 737 .loop: 0 0000307A AD lodsw 0 0000307B 25FF03 and ax, 1023 ; get offset 0 0000307E 39D8 cmp ax, bx ; offset matches what we're freeing ?, OR 741 ; is it below/equal the offset we're freeing ? 0 00003080 7603 jbe .next ; yes --> (also jumps if ax == 0) 0 00003082 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 00003085 E2F3 loop .loop 749 750 .return: 0 00003087 5F pop di 0 00003088 5E pop si 0 00003089 C3 retn 754 755 756 %if BPSIZE == 6 || BPSIZE == 9 757 point_offset: 0 0000308A E88604 call getpointat ; "AT" keyword ? 0 0000308D 720A jc .not_at ; no --> 0 0000308F E84104 call findpointat ; do we find it ? 0 00003092 7303E9[0000] jc error ; not found --> 0 00003097 EB08 jmp @F ; point index is in dx --> 763 764 .not_at: 0 00003099 E89804 call getpointindex 0 0000309C 7303E9[0000] jc error ; "NEW" and "ALL" keywords are invalid --> 767 768 @@: 0 000030A1 50 push ax 0 000030A2 89D0 mov ax, dx 0 000030A4 E81D04 call calcpointbit 772 %if ((_NUM_B_BP+7)>>3) != 1 0 000030A7 84A7[0000] test byte [b_bplist.used_mask+bx], ah 774 %else 775 test byte [b_bplist.used_mask], ah 776 %endif 0 000030AB 7503E9[0000] jz error 0 000030B0 58 pop ax 779 0 000030B1 E8[0000] call skipcomm0 0 000030B4 52 push dx ; stack = point index 0 000030B5 BAFFFF mov dx, -1 ; all-1s pattern to uninit offset 783 %if BPSIZE == 9 0 000030B8 89D3 mov bx, dx ; upper word of all-1s pattern 785 %endif 0 000030BA E8[0000] call iseol? 0 000030BD 7418 je @F ; uninit it --> 0 000030BF 4E dec si 0 000030C0 BA[0000] mov dx, msg.offset 0 000030C3 E8[0000] call isstring? 0 000030C6 7504 jne .no_offset_kw 0 000030C8 E8[0000] call skipequals 0 000030CB 4E dec si 794 .no_offset_kw: 0 000030CC AC lodsb 796 %if BPSIZE == 9 0 000030CD E8[0000]EB02[0000] nearcall getdword ; bx:dx = offset 798 %else 799 nearcall getword ; dx = offset 800 %endif 0 000030D4 E8[0000] call chkeol 802 @@: 0 000030D7 58 pop ax ; = point index 0 000030D8 89C7 mov di, ax 0 000030DA 01FF add di, di ; * 2 0 000030DC 01FF add di, di ; * 4 807 %if BPSIZE == 6 808 add di, ax ; * 5 809 add di, ax ; * 6 810 add di, b_bplist.bp + 3 ; +3 = skip 24-bit linear address 811 %elif BPSIZE == 9 0 000030DE 01FF add di, di ; * 8 0 000030E0 01C7 add di, ax ; * 9 0 000030E2 81C7[0400] add di, b_bplist.bp + 4 ; +4 = skip 32-bit linear address 815 %else 816 %error Unexpected breakpoint size 817 %endif 0 000030E6 92 xchg ax, dx 0 000030E7 AB stosw ; store low word of offset 820 %if BPSIZE == 9 0 000030E8 93 xchg ax, bx 0 000030E9 AB stosw ; store high word of offset 823 %endif 0 000030EA C3 retn ; done 825 %endif 826 827 828 point_when: 0 000030EB E82504 call getpointat ; "AT" keyword ? 0 000030EE 720A jc .not_at ; no --> 0 000030F0 E8E003 call findpointat ; do we find it ? 0 000030F3 7303E9[0000] jc error ; not found --> 0 000030F8 EB08 jmp @F ; point index is in dx --> 834 835 .not_at: 0 000030FA E83704 call getpointindex 0 000030FD 7303E9[0000] jc error ; "NEW" and "ALL" keywords are invalid --> 838 839 @@: 0 00003102 50 push ax ; preserve text 0 00003103 89D0 mov ax, dx 0 00003105 E8BC03 call calcpointbit 843 %if ((_NUM_B_BP+7)>>3) != 1 0 00003108 84A7[0000] test byte [b_bplist.used_mask+bx], ah 845 %else 846 test byte [b_bplist.used_mask], ah 847 %endif 0 0000310C 7503E9[0000] jz error 0 00003111 58 pop ax ; restore text 850 0 00003112 E8[0000] call skipcomm0 0 00003115 8326[0000]00 and word [..@bb_when_length], 0 853 ; init variable to empty (length = 0) 0 0000311A E8[0000] call iseol? ; EOL ? 0 0000311D 7415 je @F ; yes, set immediately --> 0 0000311F 4E dec si ; -> nonblank 0 00003120 52 push dx ; stack = point index 0 00003121 BA[0000] mov dx, msg.when ; "WHEN=" keyword ? 0 00003124 E8[0000] call isstring? 0 00003127 7504 jne .no_when_kw ; no --> 0 00003129 E8[0000] call skipequals ; skip optional equals sign 0 0000312C 4E dec si ; -> nonblank 863 .no_when_kw: 0 0000312D 5A pop dx ; = point index 0 0000312E E8C2FD call get_when ; set WHEN variables 0 00003131 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 00003134 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 00003137 E32F jcxz .empty 881 0 00003139 51 push cx 0 0000313A E86A00 call free_when ; actually free it now (INP ax) 0 0000313D 59 pop cx 0 0000313E 8B3E[0000] mov di, word [b_bplist.whenbuffer.free] 886 ; = displacement of free part 0 00003142 010E[0000] add word [b_bplist.whenbuffer.free], cx 888 ; mark space as used 0 00003146 81C7[0000] add di, b_bplist.whenbuffer 890 ; -> into buffer space 0 0000314A 89FB mov bx, di ; bx -> buffer for clause, for set function 892 ; si -> new clause (left by check function) 0 0000314C F3A4 rep movsb ; write (with space for the NUL) 0 0000314E 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 00003151 87D3 xchg dx, bx ; bx = index, dx = to set 0 00003153 D1E3 shl bx, 1 ; bx = word index (undone later) 0 00003155 FFB7[0000] push word [b_bplist.when + bx] 905 ; stack = get it 0 00003159 83FAFF cmp dx, -1 ; get only ? 0 0000315C 7404 je @F ; yes --> 0 0000315E 8997[0000] mov word [b_bplist.when + bx], dx 909 ; set it 910 @@: 0 00003162 5A pop dx ; get it from stack 0 00003163 D1EB shr bx, 1 ; undo to get back (byte) index 0 00003165 87D3 xchg dx, bx 0 00003167 C3 retn 915 916 .empty: 0 00003168 E83C00 call free_when 0 0000316B 31DB xor bx, bx ; offset = 0 0 0000316D 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 0000316F BBFFFF mov bx, -1 0 00003172 E8DCFF call get_set_when_offset 936 0 00003175 53 push bx 0 00003176 85DB test bx, bx ; any ? 0 00003178 740D jz @F ; no --> 0 0000317A 89DF mov di, bx ; -> current condition 0 0000317C B9FFFF mov cx, -1 0 0000317F B000 mov al, 0 ; NUL 0 00003181 F2AE repne scasb ; scan it 0 00003183 F7D1 not cx ; = length to free (including terminating NUL) 0 00003185 89CB mov bx, cx 946 @@: ; bx = length to free 0 00003187 58 pop ax ; ax -> prior clause in .whenbuffer (or 0) 948 0 00003188 8B36[0000] mov si, word [b_bplist.whenbuffer.free] 950 ; displacement free 0 0000318C F7DE neg si ; - displacement free 0 0000318E 81C60004 add si, _NUM_B_WHEN_BYTES 953 ; 1024 - displacement free = amount free 0 00003192 01DE add si, bx ; amount free + length of condition to free 0 00003194 8B0E[0000] mov cx, word [..@bb_when_length] 0 00003198 E30C jcxz .empty ; if no condition to set --> 0 0000319A 41 inc cx ; count terminating NUL 0 0000319B 39CE cmp si, cx ; enough free ? 0 0000319D 8B36[0000] mov si, word [..@bb_when_start] 960 ; -> condition string 0 000031A1 7303E9[0000] jb error ; no --> 962 .empty: 0 000031A6 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 000031A7 56 push si 0 000031A8 57 push di 981 0 000031A9 85C0 test ax, ax ; nothing stored ? 0 000031AB 7438 jz .return ; yes, just return --> 984 0 000031AD 89C7 mov di, ax 0 000031AF 89C3 mov bx, ax 987 ; -> condition to be freed 988 ; (destination of following data) 0 000031B1 57 push di 0 000031B2 B9FFFF mov cx, -1 0 000031B5 B000 mov al, 0 ; NUL 0 000031B7 F2AE repne scasb ; scan it 0 000031B9 F7D1 not cx ; = length to free (including terminating NUL) 0 000031BB 5F pop di ; -> destination of following data 0 000031BC 51 push cx ; length to free 0 000031BD 89FE mov si, di 0 000031BF 01CE add si, cx ; -> behind condition to be freed 998 ; (source of following data) 0 000031C1 89F1 mov cx, si 0 000031C3 F7D9 neg cx ; minus pointer to first subsequent data 0 000031C5 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 000031C9 F3A4 rep movsb ; now di -> first uninitialised byte 0 000031CB 59 pop cx ; = length of data freed 1006 0 000031CC 290E[0000] sub word [b_bplist.whenbuffer.free], cx 1008 ; mark as free 0 000031D0 51 push cx 0 000031D1 30C0 xor al, al 0 000031D3 F3AA rep stosb ; clear the buffer trailer (uninitialised part) 0 000031D5 5F pop di ; di = length of data freed 1013 0 000031D6 BE[0000] mov si, b_bplist.when ; -> list of words pointing into WHEN buffer 1015 %if _NUM_B_BP < 256 0 000031D9 B110 mov cl, _NUM_B_BP ; cx = number of points 1017 %else 1018 mov cx, _NUM_B_BP 1019 %endif 1020 .loop: 0 000031DB AD lodsw 0 000031DC 39D8 cmp ax, bx ; offset we're freeing ?, OR 1023 ; is it below/equal the offset we're freeing ? 0 000031DE 7603 jbe .next ; yes --> (also jumps if ax == 0) 0 000031E0 297CFE sub word [si - 2], di ; adjust offset 1026 .next: 0 000031E3 E2F6 loop .loop 1028 1029 .return: 0 000031E5 5F pop di 0 000031E6 5E pop si 0 000031E7 C3 retn 1033 1034 1035 point_clear: 0 000031E8 F7D0 not ax 1037 %if ((_NUM_B_BP+7)>>3) != 1 0 000031EA 20A7[0000] and byte [b_bplist.used_mask+bx], ah 0 000031EE 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 000031F2 51 push cx 1045 0 000031F3 31DB xor bx, bx ; replace by empty word 0 000031F5 E833FE call get_set_id_offset_length 0 000031F8 93 xchg ax, bx ; ax = word what to free 0 000031F9 E84DFE call free_id ; actually free it now 1050 0 000031FC 31DB xor bx, bx ; replace by empty word 0 000031FE E850FF call get_set_when_offset 0 00003201 93 xchg ax, bx ; ax = word what to free 0 00003202 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 00003205 59 pop cx 0 00003206 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 00003207 BD[B805] mov bp, .checkend 0 0000320A 4E dec si ; -> nonblank 0 0000320B BA[0000] mov dx, msg.in ; "IN" keyword ? 0 0000320E E8[0000] call isstring? 0 00003211 7403E9A600 jne .notin ; no --> 0 00003216 BD[6405] mov bp, .parse_next ; set up for IN list 0 00003219 E8[0000] call skipcomma 0 0000321C 4E dec si 0 0000321D BA[0000] mov dx, msg.existing ; "EXISTING" keyword ? 0 00003220 E8[0000] call isstring? 0 00003223 AC lodsb 0 00003224 7506 jne .notexisting ; no --> 0 00003226 BD[3C05] mov bp, .parse_next_existing 1152 ; set up for IN EXISTING list 0 00003229 E8[0000] call skipcomm0 1154 .notexisting: 0 0000322C 56 push si ; stack -> start of list 0 0000322D E98B00 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 00003230 57 push di 0 00003231 4E dec si ; si -> nonblank 0 00003232 E8[0000]EB02[0000] nearcall get_value_range; OUT: cx:di = from, bx:dx = to 0 00003239 730C jnc @F ; normal value range --> 0 0000323B 7507 jnz .error ; NZ if nonzero length --> 0 0000323D 83FF10 cmp di, _NUM_B_BP ; start in range ? 0 00003240 7302 jae .error ; no --> 0 00003242 E31A jcxz .in_multiple.next ; yes --> (cx = 0) 1174 .error: 0 00003244 E9[0000] jmp error 1176 1177 @@: 0 00003247 83FF10 cmp di, _NUM_B_BP ; start in range ? 0 0000324A 73F8 jae .error 0 0000324C E302 jcxz @F 0 0000324E EBF4 jmp .error ; no --> 1182 1183 @@: 0 00003250 85DB test bx, bx ; end in range ? 0 00003252 75F0 jnz .error 0 00003254 83FA10 cmp dx, _NUM_B_BP 0 00003257 73EB jae .error ; no --> 1188 0 00003259 89D1 mov cx, dx ; = end 0 0000325B 29F9 sub cx, di ; = end - start = amount - 1 0 0000325D 41 inc cx ; = amount (nonzero) 1192 .in_multiple.next: 0 0000325E 89FA mov dx, di ; dx = first index 0 00003260 5F pop di 0 00003261 F8 clc ; no keywords 0 00003262 C3 retn 1197 1198 0 00003263 00 align 2, db 0 0 00003264 [EE04] dw .in_multiple 1201 .do_next_existing: 0 00003266 E30A jcxz @FFF ; value range with length zero ? 1203 @@: 0 00003268 E8A000 call .checkindex_internal 0 0000326B 7402 jz @F ; skip unused point --> 0 0000326D FFD7 call di ; has to preserve cx, dx, di, si, bp 1207 @@: 0 0000326F 42 inc dx 0 00003270 E2F6 loop @BB ; loop through value range 1210 @@: 0 00003272 4E dec si 0 00003273 E8[0000] call skipcomma 0 00003276 E8[0000] call iseol? ; EOL reached ? 0 00003279 7540 jne .in ; not yet --> 0 0000327B C3 retn ; yes, done 1216 1217 align 2, db 0 0 0000327C [EE04] 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 0000327E 4E dec si 0 0000327F E8[0000] call skipcomma 0 00003282 E8[0000] call iseol? ; EOL reached ? 0 00003285 7534 jne .in ; not yet --> 1226 0 00003287 5E pop si ; restore -> start of list 0 00003288 BD[2405] mov bp, .do_next_existing 1229 ; next do them 0 0000328B EB2E jmp .in ; and loop again 1231 0 0000328D 00 align 2, db 0 0 0000328E [EE04] dw .in_multiple 1234 .do_next: 0 00003290 E308 jcxz @FFF ; value range with length zero ? 1236 @@: 0 00003292 E86D00 call .checkindex ; error if invalid/unused point 0 00003295 FFD7 call di ; has to preserve cx, dx, di, si, bp 1239 @@: 0 00003297 42 inc dx ; next point 0 00003298 E2F8 loop @BB ; loop through value range 1242 @@: 0 0000329A 4E dec si 0 0000329B E8[0000] call skipcomma 0 0000329E E8[0000] call iseol? ; EOL reached ? 0 000032A1 7518 jne .in ; not yet --> 0 000032A3 C3 retn ; done 1248 1249 align 2, db 0 0 000032A4 [EE04] dw .in_multiple 1251 .parse_next: ; cx = length, dx = start 0 000032A6 E306 jcxz @FFF ; value range with length zero ? 1253 @@: 0 000032A8 E85700 call .checkindex ; error if invalid/unused point 1255 @@: 0 000032AB 42 inc dx ; next point 0 000032AC E2FA loop @BB ; loop through value range 1258 @@: 0 000032AE 4E dec si 0 000032AF E8[0000] call skipcomma 0 000032B2 E8[0000] call iseol? 0 000032B5 7504 jne .in ; more elements follow --> 1263 0 000032B7 5E pop si ; restore -> start of list 0 000032B8 BD[4E05] mov bp, .do_next ; set up handler to do, next 1266 ; (fall through) and loop again 1267 1268 .in: 0 000032BB 4E dec si ; -> next nonblank 1270 .notin: 0 000032BC AC lodsb ; load first text byte 0 000032BD E85302 call getpointat ; "AT" keyword ? 0 000032C0 720D jc .not_at ; no --> 0 000032C2 E80E02 call findpointat ; do we find it ? 0 000032C5 7303E9[0000] jc error ; not found --> 0 000032CA B90100 mov cx, 1 ; (for bb IN) 0 000032CD EB26 jmp @F ; point index is in dx --> 1278 1279 .not_at: 0 000032CF 2EFF56FE call near word [cs:bp - 2] 1281 ; parse point indices 1282 ; (value range or single getpointindex) 0 000032D3 7320 jnc @F ; point index is in dx, no keyword --> 1284 .error_NZ: 0 000032D5 7403E9[0000] jnz error ; "NEW" is invalid --> 1286 0 000032DA E8[0000] call chkeol ; check that after "ALL" there is EOL 0 000032DD 31C9 xor cx, cx 1289 .all_loop: 0 000032DF 89C8 mov ax, cx 0 000032E1 E8E001 call calcpointbit ; get offset and mask 1292 %if ((_NUM_B_BP+7)>>3) != 1 0 000032E4 84A7[0000] test byte [b_bplist.used_mask+bx], ah 1294 %else 1295 test byte [b_bplist.used_mask], ah 1296 %endif 0 000032E8 7404 jz .all_next ; skip unused point --> 0 000032EA 89CA mov dx, cx ; dx = point index 0 000032EC FFD7 call di ; has to preserve cx, dx, di, si, bp 1300 .all_next: 0 000032EE 41 inc cx 0 000032EF 83F910 cmp cx, _NUM_B_BP 0 000032F2 72EB jb .all_loop ; do for all points 0 000032F4 C3 retn ; done 1305 1306 @@: 0 000032F5 FFE5 jmp bp ; handle dx = point, cx = amount 1308 ; with di = handler, si -> text 1309 0 000032F7 00 align 2, db 0 0 000032F8 [F207] dw getpointindex 1312 .checkend: 0 000032FA E8[0000] call chkeol 0 000032FD E80200 call .checkindex ; specified a valid point ? 0 00003300 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 00003302 E80600 call .checkindex_internal 0 00003305 7503E9[0000] jz error 0 0000330A 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 0000330B 89D0 mov ax, dx 0 0000330D E8B401 call calcpointbit ; bx, ah = offset and mask 1334 %if ((_NUM_B_BP+7)>>3) != 1 0 00003310 84A7[0000] test byte [b_bplist.used_mask+bx], ah 1336 %else 1337 test byte [b_bplist.used_mask], ah 1338 %endif 0 00003314 C3 retn 1340 1341 1342 point_enable: 0 00003315 F7D0 not ax 1344 %if ((_NUM_B_BP+7)>>3) != 1 0 00003317 20A7[0000] and byte [b_bplist.disabled_mask+bx], ah 1346 %else 1347 and byte [b_bplist.disabled_mask], ah 1348 %endif 0 0000331B C3 retn 1350 1351 1352 point_disable: 1353 %if ((_NUM_B_BP+7)>>3) != 1 0 0000331C 08A7[0000] or byte [b_bplist.disabled_mask+bx], ah 1355 %else 1356 or byte [b_bplist.disabled_mask], ah 1357 %endif 0 00003320 C3 retn 1359 1360 1361 point_toggle: 1362 %if ((_NUM_B_BP+7)>>3) != 1 0 00003321 30A7[0000] xor byte [b_bplist.disabled_mask+bx], ah 1364 %else 1365 xor byte [b_bplist.disabled_mask], ah 1366 %endif 0 00003325 C3 retn 1368 1369 1370 point_list: 0 00003326 E8[0000] call iseol? 0 00003329 747B je .all 1373 0 0000332B E8E501 call getpointat ; "AT" keyword ? 0 0000332E 7256 jc .not_at ; no --> 0 00003330 E8A001 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 00003333 7307 jnc .all_matching 1382 0 00003335 BA[0000] mov dx, msg.bpnone_at 0 00003338 E8[0000] call putsz 0 0000333B C3 retn 1386 1387 1388 .all_matching: 0 0000333C 31ED xor bp, bp 0 0000333E 31DB xor bx, bx 0 00003340 31D2 xor dx, dx 0 00003342 BF[0000] mov di, line_out 1393 .loop_matching: 0 00003345 89DE mov si, bx 0 00003347 01F6 add si, si ; * 2 0 00003349 01F6 add si, si ; * 4 1397 %if BPSIZE == 4 1398 %elif BPSIZE == 5 1399 add si, bx ; * 5 1400 %elif BPSIZE == 6 1401 add si, bx ; * 5 1402 add si, bx ; * 6 1403 %elif BPSIZE == 9 0 0000334B 01F6 add si, si ; * 8 0 0000334D 01DE add si, bx ; * 9 1406 %else 1407 %error Unexpected breakpoint size 1408 %endif 0 0000334F 81C6[0000] add si, b_bplist.bp ; -> bp structure 0 00003353 AD lodsw 0 00003354 3906[0000] cmp word [..@bb_saved_linear], ax 0 00003358 7524 jne .next_matching 1413 %if _PM 0 0000335A AD lodsw 1415 %else 1416 xor ax, ax 1417 lodsb ; ax = high byte 1418 %endif 0 0000335B 3906[0200] cmp word [..@bb_saved_linear + 2], ax 0 0000335F 751D jne .next_matching 1421 0 00003361 57 push di 0 00003362 B020 mov al, 32 0 00003364 B92800 mov cx, 40 0 00003367 F3AA rep stosb ; initialize field with blanks 0 00003369 30C0 xor al, al 0 0000336B AA stosb ; terminate it 0 0000336C 5F pop di 1429 0 0000336D E88000 call .single ; fill buffer 1431 0 00003370 52 push dx 0 00003371 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 00003372 E8[0000] call putsline_crlf ; put line with linebreak (and no excess blanks) 0 00003375 E83201 call handle_bl_when 0 00003378 BF[0000] mov di, line_out ; write next point at start of field 1444 .was_even_matching: 0 0000337B 5B pop bx 0 0000337C 5A pop dx 0 0000337D 42 inc dx ; increment odd/even counter 1448 .next_matching: 0 0000337E 43 inc bx ; increment breakpoint index 0 0000337F 83FB10 cmp bx, _NUM_B_BP 0 00003382 75C1 jne .loop_matching 0 00003384 EB51 jmp .end 1453 1454 1455 .not_at: 0 00003386 E8AB01 call getpointindex 0 00003389 730A jnc @F 0 0000338B 7403E9[0000] jnz error ; "NEW" is invalid --> 1459 0 00003390 E8[0000] call chkeol 0 00003393 EB11 jmp .all 1462 @@: 0 00003395 E8[0000] call chkeol 0 00003398 89D3 mov bx, dx 0 0000339A BF[0000] mov di, line_out 0 0000339D E85000 call .single 0 000033A0 E8[0000] call putsline_crlf 0 000033A3 E90401 jmp handle_bl_when 1469 1470 1471 .all: 0 000033A6 31ED xor bp, bp ; high byte: any set points encountered yet, 1473 ; low byte: current line has any set points 0 000033A8 31DB xor bx, bx 0 000033AA BF[0000] mov di, line_out 1476 .loop: 0 000033AD 57 push di 0 000033AE B020 mov al, 32 0 000033B0 B92800 mov cx, 40 0 000033B3 F3AA rep stosb ; initialize field with blanks 0 000033B5 30C0 xor al, al 0 000033B7 AA stosb ; terminate it 0 000033B8 5F pop di 1484 0 000033B9 E83400 call .single ; fill buffer 1486 0 000033BC 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 000033BD F7C5FF00 test bp, 00FFh ; any point set in this line ? 0 000033C1 740A jz .skip_putsline ; no --> 0 000033C3 E8[0000] call putsline_crlf ; put line with linebreak (and no excess blanks) 0 000033C6 E8E100 call handle_bl_when 1499 0 000033C9 81E500FF and bp, ~00FFh ; clear flag for next line processing 1501 .skip_putsline: 0 000033CD BF[0000] mov di, line_out ; write next point at start of field 1503 .was_even: 0 000033D0 5B pop bx 0 000033D1 43 inc bx 0 000033D2 83FB10 cmp bx, _NUM_B_BP 0 000033D5 75D6 jne .loop 1508 .end: 0 000033D7 81FF[0000] cmp di, line_out 0 000033DB 7406 je @F 0 000033DD E8[0000] call putsline_crlf 0 000033E0 E8C700 call handle_bl_when 1513 @@: 0 000033E3 F7C500FF test bp, 0FF00h 0 000033E7 7506 jnz @F 0 000033E9 BA[0000] mov dx, msg.bpnone 0 000033EC E8[0000] call putsz 1518 @@: 0 000033EF C3 retn 1520 1521 .single: 0 000033F0 BE[0000] mov si, msg.bp 0 000033F3 E8[0000] call showstring 0 000033F6 53 push bx 0 000033F7 89D8 mov ax, bx 0 000033F9 E8[0000] call hexbyte ; store index of this point 0 000033FC E8C500 call calcpointbit 0 000033FF BE[0000] mov si, msg.bpunused 1529 %if ((_NUM_B_BP+7)>>3) != 1 0 00003402 84A7[0000] test byte [b_bplist.used_mask+bx], ah 1531 %else 1532 test byte [b_bplist.used_mask], ah 1533 %endif 0 00003406 7508 jnz @F ; if set --> 0 00003408 E8[0000] call showstring 0 0000340B 31F6 xor si, si 0 0000340D E99800 jmp .unused 1538 1539 @@: 0 00003410 81CD0101 or bp, 0101h ; flag that there was a point set in this line 0 00003414 BE[0000] mov si, msg.bpdisabled 1542 %if ((_NUM_B_BP+7)>>3) != 1 0 00003417 84A7[0000] test byte [b_bplist.disabled_mask+bx], ah 1544 %else 1545 test byte [b_bplist.disabled_mask], ah 1546 %endif 0 0000341B 7503 jnz .disabled ; disabled --> (D) 0 0000341D BE[0000] mov si, msg.bpenabled 1549 .disabled: 0 00003420 E8[0000] call showstring 0 00003423 BE[0000] mov si, msg.bpaddress 0 00003426 E8[0000] call showstring 0 00003429 58 pop ax 0 0000342A 50 push ax 0 0000342B 89C6 mov si, ax 0 0000342D 01F6 add si, si ; * 2 0 0000342F 01F6 add si, si ; * 4 1558 %if BPSIZE == 4 1559 %elif BPSIZE == 5 1560 add si, ax ; * 5 1561 %elif BPSIZE == 6 1562 add si, ax ; * 5 1563 add si, ax ; * 6 1564 %elif BPSIZE == 9 0 00003431 01F6 add si, si ; * 8 0 00003433 01C6 add si, ax ; * 9 1567 %else 1568 %error Unexpected breakpoint size 1569 %endif 0 00003435 81C6[0000] add si, b_bplist.bp ; -> point 0 00003439 52 push dx 0 0000343A AD lodsw 0 0000343B 92 xchg ax, dx 1574 %if _PM 0 0000343C AD lodsw 0 0000343D E8[0000] call hexword 1577 %else 1578 xor ax, ax 1579 lodsb ; ax = high byte 1580 call hexbyte 1581 %endif 0 00003440 50 push ax 0 00003441 B05F mov al, '_' 0 00003443 AA stosb 0 00003444 58 pop ax 0 00003445 92 xchg ax, dx 0 00003446 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 00003449 E81001 call bp_display_offset ; BPSIZE implied 1597 %else 1598 xor cx, cx 1599 %endif 0 0000344C 5A pop dx 0 0000344D AC lodsb 0 0000344E 50 push ax 0 0000344F BE[0000] mov si, msg.bpcontent 0 00003452 E8[0000] call showstring 0 00003455 58 pop ax 0 00003456 E8[0000] call hexbyte ; display content 0 00003459 BE[0000] mov si, msg.bpcounter 0 0000345C E8[0000] call showstring 0 0000345F 58 pop ax 0 00003460 50 push ax 0 00003461 89C3 mov bx, ax 0 00003463 52 push dx 0 00003464 89C2 mov dx, ax 0 00003466 01DB add bx, bx ; * 2 0 00003468 8B87[0000] mov ax, word [b_bplist.counter + bx] 0 0000346C E8[0000] call hexword 1617 0 0000346F BBFFFF mov bx, -1 0 00003472 E8B6FB call get_set_id_offset_length 0 00003475 F6C7FC test bh, 63 << 2 ; length nonzero ? 0 00003478 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 0000347A BE[0000] mov si, msg.bb_hitpass_id.short 1626 ; set up message for short ID 0 0000347D D0E1 shl cl, 1 0 0000347F D0E1 shl cl, 1 ; length offset displayed << 2 1629 ; (bx >> 10 is ID length, ie bh >> 2) 0 00003481 F6D9 neg cl ; minus displayed 0 00003483 80C18C add cl, 35 << 2 ; 35 minus displayed 0 00003486 38CF cmp bh, cl ; long ? 0 00003488 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 0000348A BE[0000] mov si, msg.bb_hitpass_id.long 1638 ; use long ID message imstead 1639 .trigger_short_id: 1640 0 0000348D E8[0000] call copy_single_counted_string 0 00003490 88F9 mov cl, bh 0 00003492 D0E9 shr cl, 1 0 00003494 D0E9 shr cl, 1 ; cx = length 0 00003496 80E703 and bh, 1023 >> 8 ; bx = offset 0 00003499 8DB7[0000] lea si, [b_bplist.idbuffer + bx] 1647 ; -> ID in buffer 0 0000349D F3A4 rep movsb ; copy ID 1649 1650 @@: 1651 0 0000349F BBFFFF mov bx, -1 0 000034A2 E8ACFC call get_set_when_offset 0 000034A5 89DE mov si, bx 0 000034A7 5A pop dx 1656 1657 .unused: 0 000034A8 5B pop bx ; restore counter (if displaying all) 0 000034A9 C3 retn 1660 1661 1662 ; CHG: si, al 1663 handle_bl_when: 0 000034AA 87D6 xchg dx, si 0 000034AC 85D2 test dx, dx ; no WHEN condition ? 0 000034AE 7411 jz @F ; yes --> 0 000034B0 52 push dx 0 000034B1 BA[0000] mov dx, msg.bb_when 0 000034B4 E8[0000] call putsz ; display label 0 000034B7 5A pop dx 0 000034B8 E8[0000] call putsz ; display condition 1672 %if 0 1673 mov al, '$' 1674 call putc 1675 %endif 0 000034BB BA[0000] mov dx, crlf 0 000034BE E8[0000] call putsz ; display trailer 1678 @@: 0 000034C1 87D6 xchg dx, si 0 000034C3 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 000034C4 89C3 mov bx, ax ; index 1691 %endif 0 000034C6 2407 and al, 7 ; 0 to 7 0 000034C8 B401 mov ah, 1 ; prepare mask 0 000034CA 91 xchg ax, cx ; cl = counter 0 to 7, ch = mask prepared 0 000034CB D2E5 shl ch, cl ; shift mask to access correct bit 1696 %if ((_NUM_B_BP+7)>>3) != 1 0 000034CD B103 mov cl, 3 0 000034CF D3EB shr bx, cl ; get offset 1699 %else 1700 xor bx, bx ; offset = 0 1701 %endif 0 000034D1 91 xchg ax, cx ; ah = mask 0 000034D2 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 000034D3 5589E5 lenter 1715 lvar word, orig_ax 0 000034D6 50 push ax 1717 lvar word, orig_si 0 000034D7 56 push si 1719 lvar dword, orig_bxdx 0 000034D8 53 push bx 0 000034D9 52 push dx 0 000034DA 31D2 xor dx, dx 1723 .loop: 0 000034DC 89D0 mov ax, dx 0 000034DE E8E3FF call calcpointbit 1726 %if ((_NUM_B_BP+7)>>3) != 1 0 000034E1 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 000034E5 741D jz .next ; no --> 1732 0 000034E7 89D6 mov si, dx 0 000034E9 01F6 add si, si ; * 2 0 000034EB 01F6 add si, si ; * 4 1736 %if BPSIZE == 4 1737 %elif BPSIZE == 5 1738 add si, dx ; * 5 1739 %elif BPSIZE == 6 1740 add si, dx ; * 5 1741 add si, dx ; * 6 1742 %elif BPSIZE == 9 0 000034ED 01F6 add si, si ; * 8 0 000034EF 01D6 add si, dx ; * 9 1745 %else 1746 %error Unexpected breakpoint size 1747 %endif 0 000034F1 81C6[0000] add si, b_bplist.bp ; -> point 0 000034F5 AD lodsw 0 000034F6 3946F8 cmp word [bp + ?orig_bxdx], ax 0 000034F9 7509 jne .next 1752 %if _PM 0 000034FB AD lodsw 1754 %else 1755 xor ax, ax 1756 lodsb ; ax = high byte 1757 %endif 0 000034FC 3946FA cmp word [bp + ?orig_bxdx + 2], ax 0 000034FF 7503 jne .next 1760 ; (NC) 0 00003501 5B pop bx ; discard dx on stack, clobbering bx 0 00003502 EB08 jmp .ret_with_dx 1763 1764 .next: 0 00003504 42 inc dx 0 00003505 83FA10 cmp dx, _NUM_B_BP 0 00003508 72D2 jb .loop 1768 0 0000350A F9 stc 1770 .ret: 0 0000350B 5A pop dx 1772 .ret_with_dx: 0 0000350C 5B pop bx ; pop ?orig_bxdx 0 0000350D 5E pop si ; pop ?orig_si 0 0000350E 58 pop ax ; pop ?orig_ax 0 0000350F 89EC5D lleave 0 00003512 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 00003513 4E dec si ; -> nonblank 0 00003514 BA[0000] mov dx, msg.at ; "AT" keyword ? 0 00003517 E8[0000] call isstring? 0 0000351A AC lodsb ; load separator or nonblank 0 0000351B 7402 je .at ; yes --> 0 0000351D F9 stc ; no 0 0000351E C3 retn 1795 1796 .at: 0 0000351F 8B1E[0000] mov bx, word [reg_cs] 0 00003523 E8[0000] call getlinearaddr ; get address 0 00003526 7303E9[0000] jc error 0 0000352B 8916[0000] mov word [..@bb_saved_linear], dx 0 0000352F 891E[0200] mov word [..@bb_saved_linear + 2], bx 1802 ; also store this 0 00003533 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 00003534 4E dec si 0 00003535 BA[0000] mov dx, msg.all ; "ALL" keyword ? 0 00003538 E8[0000] call isstring? 0 0000353B 741C je .is_all ; yes --> (ZR) 0 0000353D BA[0000] mov dx, msg.new ; "NEW" keyword ? 0 00003540 E8[0000] call isstring? 0 00003543 7412 je .is_new ; yes --> 0 00003545 AC lodsb 0 00003546 E8[0000]EB02[0000] nearcall getword ; get index 0 0000354D 83FA10 cmp dx, _NUM_B_BP ; valid index ? 0 00003550 7203E9[0000] jae error ; no --> 0 00003555 F8 clc ; (NC) 0 00003556 C3 retn 1826 1827 .is_new: 0 00003557 85F6 test si, si ; (NZ) (si points into line_in) 1829 .is_all: 0 00003559 F9 stc ; (CY) 0 0000355A AC lodsb ; al = separator, si-> after 0 0000355B 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 0000355C 5589E55050 lenter 1848 lvar dword, linear 0 00003561 52 push dx 0 00003562 50 push ax 0 00003563 B82020 mov ax, " " 1852 lvar word, prefix 0 00003566 50 push ax ; prefix: two blanks 1854 lvar word, start_write 0 00003567 57 push di 0 00003568 53 push bx 0 00003569 AD lodsw 1858 %if _PM 0 0000356A 92 xchg ax, dx 0 0000356B AD lodsw 0 0000356C 83F8FF cmp ax, -1 ; high word is all-1s ? 0 0000356F 92 xchg ax, dx 0 00003570 7505 jne @F ; no --> 1864 %else 1865 xor dx, dx 1866 %endif 0 00003572 83F8FF cmp ax, -1 ; all-1s ? 0 00003575 746C je .skip ; yes --> 1869 @@: 0 00003577 8956FE mov word [bp + ?offset + 2], dx 0 0000357A 8946FC mov word [bp + ?offset], ax 1872 0 0000357D 8B56FA mov dx, word [bp + ?linear + 2] 0 00003580 8B46F8 mov ax, word [bp + ?linear] 0 00003583 2B46FC sub ax, word [bp + ?offset] 0 00003586 1B56FE sbb dx, word [bp + ?offset + 2] 1877 ; = base we want 1878 1879 %if _PM 0 00003589 E8[0000] call ispm 0 0000358C 7527 jnz .r86m 1882 0 0000358E 52 push dx 0 0000358F 50 push ax ; stack = wanted base 0 00003590 B80600 mov ax, 6 0 00003593 8B1E[0000] mov bx, word [reg_cs] ; user CS 0 00003597 CD31 int 31h ; cx:dx = CS base 0 00003599 89D3 mov bx, dx ; cx:bx = base 0 0000359B 58 pop ax 0 0000359C 5A pop dx ; dx:ax = wanted base 0 0000359D 7212 jc .try_r86m 1892 0 0000359F 39D1 cmp cx, dx ; does it match CS ? 0 000035A1 750E jne .try_r86m 0 000035A3 39C3 cmp bx, ax 0 000035A5 750A jne .try_r86m ; no --> 1897 ; yes 0 000035A7 B82020 mov ax, " " 0 000035AA AB stosw 0 000035AB B84353 mov ax, "CS" 0 000035AE AB stosw 0 000035AF EB1F jmp .offset 1903 1904 .try_r86m: 0 000035B1 C646F724 mov byte [bp + ?prefix + 1], '$' 1906 ; change prefix to " $" to indicate 86M 1907 %endif 1908 1909 .r86m: 0 000035B5 B90400 mov cx, 4 0 000035B8 A80F test al, 15 ; on a paragraph boundary ? 0 000035BA 7531 jnz .questionmarks ; no --> 0 000035BC F7C2F0FF test dx, 0FFF0h ; segment base <= 0F_FFF0h ? 0 000035C0 752B jnz .questionmarks ; no --> 0 000035C2 D3E8 shr ax, cl ; = low 12 bits of base segment 0 000035C4 D3CA ror dx, cl ; move high 4 bits of base segment up 0 000035C6 09C2 or dx, ax ; = base 0 000035C8 8B46F6 mov ax, word [bp + ?prefix] 0 000035CB AB stosw ; store the prefix 0 000035CC 92 xchg ax, dx 0 000035CD E8[0000] call hexword ; write address 1922 1923 .offset: 0 000035D0 B03A mov al, ':' 0 000035D2 AA stosb ; store a colon 1926 %if _PM 0 000035D3 8B46FE mov ax, word [bp + ?offset + 2] 0 000035D6 85C0 test ax, ax 0 000035D8 7403 jz @F 0 000035DA E8[0000] call hexword ; nonzero upper word 1931 @@: 1932 %endif 0 000035DD 8B46FC mov ax, word [bp + ?offset] 0 000035E0 E8[0000] call hexword ; lower word 1935 1936 .skip: 0 000035E3 5B pop bx 0 000035E4 59 pop cx ; get ?start_write 0 000035E5 F7D9 neg cx ; minus start offset 0 000035E7 01F9 add cx, di ; end offset minus start offset = length 0 000035E9 89EC5D lleave 0 000035EC C3 retn 1943 1944 .questionmarks: 0 000035ED B82020 mov ax, " " 0 000035F0 AB stosw 0 000035F1 B83F3F mov ax, "??" 0 000035F4 AB stosw 0 000035F5 AB stosw ; fill with question marks 0 000035F6 EBD8 jmp .offset 1951 1952 1953 %if _BREAKPOINTS 1954 point_swap: 0 000035F8 E839FF call getpointindex 0 000035FB 7303E9AA00 jc .error 0 00003600 89D5 mov bp, dx ; bp = first index 0 00003602 E82FFF call getpointindex ; dx = second index 0 00003605 7303E9A000 jc .error 0 0000360A E8[0000] call chkeol 1961 0 0000360D B90200 mov cx, 2 ; loop across pushing twice 1963 .loop_push: 0 00003610 89D0 mov ax, dx 0 00003612 E8AFFE call calcpointbit 0 00003615 88E0 mov al, ah ; al = ah = mask 0 00003617 22A7[0000] and ah, byte [b_bplist.used_mask + bx] 0 0000361B 2287[0000] and al, byte [b_bplist.disabled_mask + bx] 1969 ; ah = nonzero if used, al = nonzero if disabled 0 0000361F 50 push ax ; push flag bits word 0 00003620 89D3 mov bx, dx 0 00003622 01DB add bx, bx ; * 2 0 00003624 FFB7[0000] push word [b_bplist.counter + bx] 0 00003628 FFB7[0000] push word [b_bplist.id + bx] 0 0000362C FFB7[0000] push word [b_bplist.when + bx] 1976 ; push array entries 1977 0 00003630 01DB add bx, bx ; * 4 1979 %if BPSIZE == 4 1980 %elif BPSIZE == 5 1981 add bx, dx ; * 5 1982 %elif BPSIZE == 6 1983 add bx, dx ; * 5 1984 add bx, dx ; * 6 1985 %elif BPSIZE == 9 0 00003632 01DB add bx, bx ; * 8 0 00003634 01D3 add bx, dx ; * 9 1988 %else 1989 %error Unexpected breakpoint size 1990 %endif 0 00003636 FFB7[0000] push word [b_bplist.bp + bx] 0 0000363A 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 1997 push word [b_bplist.bp + bx + 4] 1998 %elif BPSIZE == 9 0 0000363E FFB7[0400] push word [b_bplist.bp + bx + 4] 0 00003642 FFB7[0600] push word [b_bplist.bp + bx + 6] 0 00003646 FFB7[0800] push word [b_bplist.bp + bx + 8] 2002 %else 2003 %error Unexpected breakpoint size 2004 %endif ; push point 0 0000364A 87EA xchg bp, dx ; swap to the other point 0 0000364C E2C2 loop .loop_push ; iterate for two times pushing 2007 0 0000364E B102 mov cl, 2 ; loop across popping twice 2009 .loop_pop: 0 00003650 89D3 mov bx, dx 0 00003652 01DB add bx, bx ; * 2 0 00003654 01DB add bx, bx ; * 4 2013 %if BPSIZE == 4 2014 %elif BPSIZE == 5 2015 add bx, dx ; * 5 2016 %elif BPSIZE == 6 2017 add bx, dx ; * 5 2018 add bx, dx ; * 6 2019 %elif BPSIZE == 9 0 00003656 01DB add bx, bx ; * 8 0 00003658 01D3 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 2030 pop word [b_bplist.bp + bx + 4] 2031 %elif BPSIZE == 9 0 0000365A 58 pop ax 0 0000365B 8887[0800] mov byte [b_bplist.bp + bx + 8], al 0 0000365F 8F87[0600] pop word [b_bplist.bp + bx + 6] 0 00003663 8F87[0400] pop word [b_bplist.bp + bx + 4] 2036 %else 2037 %error Unexpected breakpoint size 2038 %endif 0 00003667 8F87[0200] pop word [b_bplist.bp + bx + 2] 0 0000366B 8F87[0000] pop word [b_bplist.bp + bx] 2041 ; pop point 2042 0 0000366F 89D3 mov bx, dx 0 00003671 01DB add bx, bx ; * 2 0 00003673 8F87[0000] pop word [b_bplist.when + bx] 0 00003677 8F87[0000] pop word [b_bplist.id + bx] 0 0000367B 8F87[0000] pop word [b_bplist.counter + bx] 2048 ; pop array entries 0 0000367F 5E pop si 0 00003680 89D0 mov ax, dx 0 00003682 E83FFE call calcpointbit 0 00003685 87F2 xchg si, dx 0 00003687 F6D4 not ah ; mask to turn off flag bits 0 00003689 20A7[0000] and byte [b_bplist.used_mask + bx], ah 0 0000368D 20A7[0000] and byte [b_bplist.disabled_mask + bx], ah 2056 ; clear bits 0 00003691 F6D4 not ah ; get back mask to turn on 0 00003693 84D2 test dl, dl ; nonzero if disabled 0 00003695 7404 jz @F ; not disabled --> 0 00003697 08A7[0000] or byte [b_bplist.disabled_mask + bx], ah 2061 @@: 0 0000369B 84F6 test dh, dh ; nonzero if used 0 0000369D 7404 jz @F ; not used --> 0 0000369F 08A7[0000] or byte [b_bplist.used_mask + bx], ah 2065 @@: 0 000036A3 87F2 xchg si, dx ; restore dx = point index 0 000036A5 87EA xchg bp, dx ; swap to the other point 0 000036A7 E2A7 loop .loop_pop 0 000036A9 C3 retn 2070 2071 .error: 0 000036AA E9[0000] jmp error 2073 %endif 2074 %endif 2075 2076 %if _DUALCODE 2077 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 2077 ------------------ note: usesection lDEBUG_CODE2 2078 2079 section_of bu_relocated 2080 dualfunction 2081 bu_relocated: section_of_function 2082 lframe dualdistance 2083 lpar word, sign 0 000000BA 5589E5 lenter 0 000000BD 8B4606 mov ax, word [bp + ?sign] 0 000000C0 BF[0000] mov di, msg.bu_relocated.sign 0 000000C3 E8[0000]EB02[0000] nearcall hexword 0 000000CA BA[0000] mov dx, msg.bu_relocated 0 000000CD E8[0000]EB02[0000] nearcall putsz 0 000000D4 5D lleave 0 000000D5 E8[0000] dualreturn 0 000000D8 CA0200 lret 2093 2094 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 2094 ------------------ note: usesection lDEBUG_CODE 2095 %endif 2096 2097 bu_breakpoint: 2098 %if _DUALCODE 0 000036AD 3C32 cmp al, '2' 0 000036AF 7423 je .2 2101 %endif 0 000036B1 E8[0000] call chkeol 2103 %if _DEBUG || _LOADER 2104 %if _DEBUG_COND 0 000036B4 F606[0100]01 testopt [internalflags6], dif6_debug_mode 0 000036B9 750C jnz @F 0 000036BB B83A01 mov ax, 013Ah 0 000036BE E8[0000] call setrc 0 000036C1 BA[0000] mov dx, msg.bu_disabled 0 000036C4 E9[0000] jmp putsz 2111 @@: 2112 %endif 0 000036C7 BA[0000] mov dx, msg.bu 0 000036CA E8[0000] call putsz 0 000036CD 5A pop dx ; discard near return address 0 000036CE BA[0000] mov dx, dmycmd ; point dx to empty function 0 000036D1 E9[0000] jmp cmd4.int3 ; run a breakpoint right before dispatcher 2118 %else 2119 mov ax, 013Bh 2120 call setrc 2121 mov dx, msg.notbu 2122 jmp putsz 2123 %endif 2124 2125 %if _DUALCODE 2126 .2: 0 000036D4 E8[0000] call skipwhite 0 000036D7 E8[0000] call chkeol 0 000036DA B84226 mov ax, 2642h 0 000036DD 50 push ax 0 000036DE E8[0000]EB02[0000] dualcall bu_relocated 0 000036E5 C3 retn 2133 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00001932 ???????? eldhSignature: resb 4 ; "ELD1" 0 00001936 ?????? resb 3 ; reserved 0 00001939 ?? resb 1 ; 26 (Ctrl-Z) 0 0000193A ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000193E ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00001940 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00001942 ???????? eldhDataOffset: resd 1 0 00001946 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00001948 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000194A ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000194C ???????? eldhReserved: resb 4 ; reserved 0 00001950 ???? 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 00001952 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00001956 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000195A ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000195E ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00001932 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000193A ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000193E ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00001940 ???? 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 00001932 ???? 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 00001934 ???? eldltAmount: resw 1 0 00001936 ???????? 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 00001932 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00001934 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00001936 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00001938 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000193A ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00001942 ???? 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 00001932 ???? eldlSignature: resw 1 ; 0E1D1h 0 00001934 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00001936 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00001938 ???? eldlUseLinkHash: resw 1 0 0000193A ???? eldlDataAmount: resw 1 0 0000193C ???? eldlDataPrefixes: resw 1 0 0000193E ???? eldlDataEntries: resw 1 0 00001940 ???? eldlDataAddresses: resw 1 0 00001942 ???? eldlCodeAmount: resw 1 0 00001944 ???? eldlCodePrefixes: resw 1 0 00001946 ???? eldlCodeEntries: resw 1 0 00001948 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 0000194A ???? eldlDualAmount: resw 1 0 0000194C ???? eldlDualPrefixes: resw 1 0 0000194E ???? eldlDualEntries: resw 1 0 00001950 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00001932 ???? ifKeyword: resw 1 0 00001934 ???? ifDescription: resw 1 0 00001936 ???? ifOptions: resw 1 0 00001938 ???? ifValue: resw 1 0 0000193A ???? ifTrying: resw 1 0 0000193C ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00001932 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00001936 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 0000193A ???? smName1: resw 1 ; -> first string part 0 0000193C ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 0000193E ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00001940 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00001942 ???? smBaseNext: resw 1 0 00001944 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00001946 ???? smSpecialNext: resw 1 0 00001948 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00001932 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00001933 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00001934 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00001932 ???? shHash: resw 1 ; hash value 0 00001934 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00001932 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00001936 ???? xmsmSourceHandle: resw 1 0 00001938 ???????? xmsmSourceAddress: resd 1 0 0000193C ???? xmsmDestHandle: resw 1 0 0000193E ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 %if !_LINK || !_LOADER 24 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 24 ------------------ note: usesection lDEBUG_CODE 25 26 %if _COUNT 27 count_cmd: 0 000036E6 E8[0000] call skipcomma 29 0 000036E9 4E dec si 0 000036EA BA[0000] mov dx, msg.range 0 000036ED E8[0000] call isstring? 0 000036F0 AC lodsb 0 000036F1 7518 jne .notrange 35 0 000036F3 8B1E[0000] mov bx, word [reg_ds] ; get range 0 000036F7 31C9 xor cx, cx 0 000036F9 E8[0000]EB02[0000] nearcall getrangeX ; try to get range 0 00003700 E8[0000] call chkeol ; and insure end-of-line 40 ; successful if it returned 0 00003703 66 _386_PM_o32 ; mov esi, edx 0 00003704 89D6 mov si, dx ; bx:esi-> source string 0 00003706 66 _386_PM_o32 ; sub ecx, edx 0 00003707 29D1 sub cx, dx ; ecx = count - 1 0 00003709 EB14 jmp short .setesedi 46 47 .notrange: 0 0000370B E8[0000]EB02[0000] nearcall getstr ; get string of bytes 0 00003712 81EF[0000] sub di, line_out ; di = number of bytes to look for 0 00003716 7409 jz .0 0 00003718 89F9 mov cx, di 0 0000371A 49 dec cx 0 0000371B 660FB7C9 _386_PM movzx ecx, cx ; ecx = count - 1 54 .setesedi: 0 0000371F 85E4 test sp, sp ; (NZ) 56 .0: 0 00003721 E80800 call count_store.maybe_0 0 00003724 BF[0000] mov di, line_out 0 00003727 E9[0000] jmp hh.single 60 %endif 61 62 63 %if _COUNT || _SCOUNT 64 count_store: section_of_function 0 0000372A 85E4 test sp, sp ; (NZ) 66 .maybe_0: section_of_function count_store 0 0000372C BB0000 mov bx, 0 0 0000372F 89DA mov dx, bx 0 00003731 740A jz .0 0 00003733 66 _386_PM_o32 0 00003734 51 push cx 0 00003735 5A pop dx 0 00003736 5B _386_PM pop bx 0 00003737 83C201 add dx, 1 0 0000373A 83D300 adc bx, 0 76 .0: 0 0000373D 8916[0000] mov word [count_var], dx 0 00003741 891E[0200] mov word [count_var + 2], bx 0 00003745 C3 retn 80 %endif 81 82 %if _CLEAR 83 clear_cmd: 0 00003746 AC lodsb 0 00003747 E8[0000] call chkeol 0 0000374A BA[0000] mov dx, msg.clear_sequence 0 0000374D E9[0000] jmp putsz 88 %endif 89 90 ; C command - compare bytes. 91 cc: 92 %if _COUNT || _CLEAR 0 00003750 4E dec si 0 00003751 4E dec si 95 %if _COUNT 0 00003752 BA[0000] mov dx, msg.count 0 00003755 E8[0000] call isstring? 0 00003758 748C je count_cmd 99 %endif 100 %if _CLEAR 0 0000375A BA[0000] mov dx, msg.clear 0 0000375D E8[0000] call isstring? 0 00003760 74E4 je clear_cmd 104 %endif 0 00003762 46 inc si 0 00003763 AC lodsb 107 %endif 108 %if _PM 0 00003764 BF[0000] mov di, getaddrX ; second parameter needn't be writable 110 %endif 0 00003767 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 0 0000376A 36803E[0000]00 cmp byte [ss:bAddr32], 0 0 00003770 7407 je .16 121 [cpu 386] 0 00003772 6641 inc ecx 0 00003774 7504 jnz cc1 0 00003776 E9[0000] jmp error 125 __CPU__ 126 .16: 127 %endif 0 00003779 41 inc cx 129 cc1: 0 0000377A 1E push ds 0 0000377B 06 push es 0 0000377C 16 push ss 0 0000377D 1F pop ds ; ds := cs 0 0000377E E8[0000] call dohack ; do the interrupt pointer hack 0 00003781 07 pop es 0 00003782 1F pop ds 137 %if _PM 0 00003783 36803E[0000]00 cmp byte [ss:bAddr32], 0 0 00003789 740E jz .cmp16 0 0000378B 67F3A6 a32 repe cmpsb 0 0000378E 678A56FF mov dl, byte [esi-1] 0 00003792 26678A77FF mov dh, byte [es:edi-1] 0 00003797 EB0D 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 00003799 49 dec cx 0 0000379A A6 cmpsb 0 0000379B 7502 jne .skip 0 0000379D F3A6 repe cmpsb ; start comparing 157 .skip: 0 0000379F 8A54FF mov dl, byte [si-1] ; save the possibly errant characters 0 000037A2 268A75FF mov dh, byte [es:di-1] 160 .cmpdone: 0 000037A6 9F lahf 0 000037A7 1E push ds 0 000037A8 06 push es 0 000037A9 16 push ss 0 000037AA 1F pop ds 0 000037AB E8[0000] call unhack ; undo the interrupt pointer hack 0 000037AE 07 pop es 0 000037AF 1F pop ds 0 000037B0 9E sahf 0 000037B1 7475 je cc2 ; if we're done 0 000037B3 06 push es 0 000037B4 16 push ss 0 000037B5 07 pop es 0 000037B6 66 _386_PM_o32 ; mov ebx, edi 0 000037B7 89FB mov bx, di 0 000037B9 BF[0000] mov di, line_out 0 000037BC 8CD8 mov ax, ds 0 000037BE E8[0000] call hexword 0 000037C1 B03A mov al, ':' 0 000037C3 AA stosb 0 000037C4 66 _386_PM_o32 ; mov eax, esi 0 000037C5 89F0 mov ax, si 0 000037C7 66 _386_PM_o32 ; dec eax 0 000037C8 48 dec ax 185 %if _PM 0 000037C9 36803E[0000]00 cmp byte [ss:bAddr32], 0 0 000037CF 7403 jz .16si 0 000037D1 E8[0000] call hexword_high 189 .16si: 190 %endif 0 000037D4 E8[0000] call hexword 0 000037D7 B82020 mov ax, 32<<8|32 0 000037DA AB stosw 0 000037DB 88D0 mov al, dl 0 000037DD E8[0000] call hexbyte 0 000037E0 B82020 mov ax, 32<<8|32 0 000037E3 AB stosw 0 000037E4 88F0 mov al, dh 0 000037E6 E8[0000] call hexbyte 0 000037E9 B82020 mov ax, 32<<8|32 0 000037EC AB stosw 0 000037ED 58 pop ax 0 000037EE 50 push ax 0 000037EF E8[0000] call hexword 0 000037F2 B03A mov al, ':' 0 000037F4 AA stosb 0 000037F5 66 _386_PM_o32 ; mov eax, ebx 0 000037F6 89D8 mov ax, bx 0 000037F8 66 _386_PM_o32 ; dec eax 0 000037F9 48 dec ax 211 %if _PM 0 000037FA 36803E[0000]00 cmp byte [ss:bAddr32], 0 0 00003800 7403 jz .16bx 0 00003802 E8[0000] call hexword_high 215 .16bx: 216 %endif 0 00003805 E8[0000] call hexword 0 00003808 1E push ds 0 00003809 16 push ss 0 0000380A 1F pop ds 0 0000380B 53 push bx 0 0000380C 51 push cx 0 0000380D E8[0000] call putsline_crlf 0 00003810 59 pop cx 0 00003811 5F pop di 0 00003812 1F pop ds 0 00003813 07 pop es 228 %if _PM 0 00003814 36803E[0000]00 cmp byte [ss:bAddr32],0 0 0000381A 7406 jz cc1_6 231 [cpu 386] 0 0000381C 67E309 jecxz cc2 233 __CPU__ 234 cc1_j1: 0 0000381F E958FF 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 0 00003822 67 _386_PM_a32 ; jecxz cc2 0 00003823 E303 jcxz cc2 0 00003825 E952FF jmp cc1 ; if not done yet 249 %endif 250 cc2: 0 00003828 16 push ss ; restore segment registers 0 00003829 1F pop ds 0 0000382A 16 push ss 0 0000382B 07 pop es 0 0000382C C3 retn 256 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00001934 ???????? eldhSignature: resb 4 ; "ELD1" 0 00001938 ?????? resb 3 ; reserved 0 0000193B ?? resb 1 ; 26 (Ctrl-Z) 0 0000193C ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00001940 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00001942 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00001944 ???????? eldhDataOffset: resd 1 0 00001948 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000194A ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000194C ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000194E ???????? eldhReserved: resb 4 ; reserved 0 00001952 ???? 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 00001954 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00001958 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000195C ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00001960 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00001934 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000193C ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00001940 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00001942 ???? 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 00001934 ???? 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 00001936 ???? eldltAmount: resw 1 0 00001938 ???????? 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 00001934 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00001936 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00001938 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000193A ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000193C ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00001944 ???? 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 00001934 ???? eldlSignature: resw 1 ; 0E1D1h 0 00001936 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00001938 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 0000193A ???? eldlUseLinkHash: resw 1 0 0000193C ???? eldlDataAmount: resw 1 0 0000193E ???? eldlDataPrefixes: resw 1 0 00001940 ???? eldlDataEntries: resw 1 0 00001942 ???? eldlDataAddresses: resw 1 0 00001944 ???? eldlCodeAmount: resw 1 0 00001946 ???? eldlCodePrefixes: resw 1 0 00001948 ???? eldlCodeEntries: resw 1 0 0000194A ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 0000194C ???? eldlDualAmount: resw 1 0 0000194E ???? eldlDualPrefixes: resw 1 0 00001950 ???? eldlDualEntries: resw 1 0 00001952 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00001934 ???? ifKeyword: resw 1 0 00001936 ???? ifDescription: resw 1 0 00001938 ???? ifOptions: resw 1 0 0000193A ???? ifValue: resw 1 0 0000193C ???? ifTrying: resw 1 0 0000193E ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00001934 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00001938 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 0000193C ???? smName1: resw 1 ; -> first string part 0 0000193E ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00001940 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00001942 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00001944 ???? smBaseNext: resw 1 0 00001946 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00001948 ???? smSpecialNext: resw 1 0 0000194A ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00001934 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00001935 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00001936 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00001934 ???? shHash: resw 1 ; hash value 0 00001936 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00001934 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00001938 ???? xmsmSourceHandle: resw 1 0 0000193A ???????? xmsmSourceAddress: resd 1 0 0000193E ???? xmsmDestHandle: resw 1 0 00001940 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <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 00001934 0000 ddoffset: dw 0 ; offset word for dd 39 ; (number of skipped bytes at start of line) 40 %if _PM 0 00001936 0000 dw 0 ; high word initialised to and fixed at zero 42 %endif 0 00001938 0000 ddskipped: dw 0 44 %if _PM 0 0000193A 0000 dw 0 ; high word initialised to and fixed at zero 46 %endif 0 0000193C 0100 ddsize: dw 1 ; size of dd item 0 0000193E 00 ddoffset2: db 0 49 %endif 50 51 usesection lDEBUG_DATA_ENTRY 51 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 0000193F FF dd_text_and: db 0FFh 53 54 55 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 0000382D 8026[0200]7F clropt [internalflags6], dif6_cpdepchars 63 %endif 64 %if _INT || _PM || _MCB || _DSTRINGS || 1 0 00003832 E8[0000] call capitalise 66 %endif 0 00003835 86C4 xchg al, ah 0 00003837 8A44FE mov al, byte [si - 2] 0 0000383A E8[0000] call capitalise 0 0000383D 3C44 cmp al, 'D' 0 0000383F 86C4 xchg al, ah 0 00003841 7403E9AC00 jne .not_d_suffix 73 %if _DSTRINGS 0 00003846 3C5A cmp al, 'Z' ; DZ command ? 0 00003848 7503E90D08 je dz ; yes --> 0 0000384D 3C24 cmp al, '$' ; D$ command ? 0 0000384F 7503E9DF07 je dcpm ; yes --> 0 00003854 3C23 cmp al, '#' ; D# command ? 0 00003856 7503E9F207 je dcounted ; yes --> 0 0000385B 3C57 cmp al, 'W' 0 0000385D 750B jne .notstring 0 0000385F 50 push ax 0 00003860 AC lodsb 0 00003861 3C23 cmp al, '#' ; DW# command ? 0 00003863 58 pop ax 0 00003864 7503E9D707 je dwcounted ; yes --> 0 00003869 4E dec si 88 .notstring: 89 %endif 90 %if _INT 0 0000386A 3C49 cmp al, 'I' ; DI command ? 0 0000386C 750D jne .notdi 93 %if 1 0 0000386E 50 push ax 0 0000386F AC lodsb 0 00003870 4E dec si 0 00003871 24DF and al, TOUPPER 0 00003873 3C50 cmp al, 'P' ; distinguish 'di ...' and 'd ip' 0 00003875 58 pop ax 0 00003876 7403 je .notdi 101 %endif 0 00003878 E9A308 jmp gateout ; yes --> 103 .notdi: 104 %endif 105 %if _PM 0 0000387B 3C4C cmp al, 'L' ; DL command ? 0 0000387D 7503 jne .notdl 0 0000387F E9F806 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 0 00003882 3C2E cmp al, '.' 0 00003884 7503E9B706 je descsubcommand 119 %endif 120 %if _MCB 0 00003889 3C4D cmp al, 'M' ; DM command ? 0 0000388B 7503 jne .notdm 0 0000388D E9DA0E jmp mcbout ; yes --> 124 .notdm: 125 %endif 126 %if _DT 0 00003890 3C54 cmp al, 'T' 0 00003892 7508 jne @F 129 %if _DTOP 0 00003894 E84300 call .handletop0 0 00003897 745C je .d_top 132 %endif 0 00003899 E9F510 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 0000389C B90100 mov cx, 1 144 %endif 0 0000389F 3C42 cmp al, 'B' 0 000038A1 7428 je .d_suffix_size 0 000038A3 41 inc cx ; = 2 0 000038A4 3C57 cmp al, 'W' 0 000038A6 7423 je .d_suffix_size 0 000038A8 41 inc cx 0 000038A9 41 inc cx ; = 4 0 000038AA 3C44 cmp al, 'D' 0 000038AC 7544 jne .not_d_suffix 154 %if 1 0 000038AE 50 push ax 0 000038AF 56 push si 0 000038B0 AC lodsb 0 000038B1 24DF and al, TOUPPER 0 000038B3 3C49 cmp al, 'I' ; possibly "D DI" ? 0 000038B5 7408 je .check_dd_separator 0 000038B7 3C58 cmp al, 'X' ; possibly "D DX" ? 0 000038B9 7404 je .check_dd_separator 0 000038BB 3C53 cmp al, 'S' ; possibly "D DS" ? 0 000038BD 7508 jne .check_dd_no_if_ZR ; no, --> NZ 165 .check_dd_separator: 0 000038BF AC lodsb ; load next text 0 000038C0 E8[0000]EB02[0000] nearcall isseparator? ; if a separator then cannot be valid "DD" 168 .check_dd_no_if_ZR: 0 000038C7 5E pop si 0 000038C8 58 pop ax 0 000038C9 7427 je .not_d_suffix 172 %endif 173 .d_suffix_size: 0 000038CB 880E[0800] mov byte [ddsize], cl 175 %if _DTOP 0 000038CF E80700 call .handletop 177 %else 178 call skipwhite 179 %endif 0 000038D2 E8[0000] call iseol? 0 000038D5 7571 jne dd1 ; jump to getting range --> (with new size) 0 000038D7 EB21 jmp lastddd ; default range (ADS:ADO length 128), 183 ; but with new size --> 184 %endif 185 186 %if _DTOP 187 .handletop: 0 000038D9 AC lodsb 189 .handletop0: 0 000038DA E8[0000] call skipcomm0 0 000038DD 4E dec si 0 000038DE BA[0000] mov dx, msg.top 0 000038E1 E8[0000] call isstring? 0 000038E4 AC lodsb 0 000038E5 750A jne @F ; --> NZ 0 000038E7 E8[0000] call skipcomm0 0 000038EA 800E[0200]80 setopt [internalflags6], dif6_cpdepchars 198 %if _DT 0 000038EF 38C0 cmp al, al ; ZR 200 %endif 201 @@: 0 000038F1 C3 retn 203 %endif 204 205 .not_d_suffix: 206 %if _DTOP 0 000038F2 E8E5FF call .handletop0 208 %else 209 call skipwh0 210 %endif 211 .d_top: 0 000038F5 E8[0000] call iseol? 213 %if _DNUM 0 000038F8 7549 jne dd1_bytes ; if an address was given --> (set byte size) 215 %else 216 jne dd1 217 %endif 218 219 lastddd: 0 000038FA 6631C0 _386_PM xor eax, eax 0 000038FD A1[0000] mov ax, word [dd_default_lines] 222 ; default length in lines, if nonzero 0 00003900 85C0 test ax, ax 0 00003902 7409 jz @F 0 00003904 782F js short .error 0 00003906 A3[0000] mov word [getrange_lines], ax 0 00003909 31C0 xor ax, ax 0 0000390B EB0E jmp @FF 229 230 @@: 0 0000390D C706[0000]0080 mov word [getrange_lines], 8000h 0 00003913 A1[0000] mov ax, word [dd_default_length] 0 00003916 85C0 test ax, ax 0 00003918 741B jz short .error 0 0000391A 48 dec ax 236 @@: 237 ; byte [ddsize] = size already set 0 0000391B 66 _386_PM_o32 ; mov edx, dword [d_addr] 0 0000391C 8B16[0000] mov dx, word [d_addr] ; compute range of 80h or until end of segment 0 00003920 66 _386_PM_o32 ; mov esi, edx 0 00003921 89D6 mov si, dx 0 00003923 8B1E[0400] mov bx, [d_addr + saSegSel] 0 00003927 E8[0000] _386_PM call test_high_limit 0 0000392A 750C _386_PM jnz .32 0 0000392C 01C2 add dx, ax 0 0000392E 734D jnc dd2_0 0 00003930 83CAFF or dx, byte -1 0 00003933 EB48 jmp short dd2_0 249 250 .error: 0 00003935 E9[0000] jmp error 252 253 %if _PM 254 [cpu 386] 255 .32: 0 00003938 6601C2 add edx, eax 0 0000393B 7340 jnc dd2_0 ; if no overflow 0 0000393D 6683CAFF or edx, byte -1 0 00003941 EB3A jmp short dd2_0 260 __CPU__ 261 %endif 262 263 %if _DNUM 264 dd1_bytes: 0 00003943 C606[0800]01 mov byte [ddsize], 1 266 %endif 267 dd1: 0 00003948 8B0E[0000] mov cx, word [dd_default_length] 269 ; default length (128 bytes) 0 0000394C 8B3E[0000] mov di, word [dd_default_lines] 271 ; default length in lines, if nonzero 0 00003950 8B1E[0000] mov bx, word [reg_ds] 0 00003954 C706[0000]0080 mov word [getrange_lines], 8000h 0 0000395A E8[0000]EB02[0000] nearcall getrangeX.lines ; get address range into bx:(e)dx 275 0 00003961 E8[0000] call chkeol ; expect end of line here 277 0 00003964 891E[0400] mov word [d_addr + saSegSel], bx 279 ; save segment (offset is saved later) 280 %if _PM 0 00003968 E8[0000] call ispm 0 0000396B 7506 jnz .86m 283 .pm: 0 0000396D 891E[0800] mov word [d_addr + saSelector], bx 0 00003971 EB04 jmp @F 286 .86m: 0 00003973 891E[0600] mov word [d_addr + saSegment], bx 288 @@: 289 %endif 0 00003977 66 _386_PM_o32 ; mov esi, edx 0 00003978 89D6 mov si, dx ; bx:(e)si = start 0 0000397A 66 _386_PM_o32 ; mov edx, ecx 0 0000397B 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 0 0000397D E8[0000] call ispm 0 00003980 750B jnz dd2_1 303 [cpu 286] 0 00003982 0F00E3 verr bx ; readable ? 305 __CPU__ 0 00003985 7406 jz dd2_1 307 %if 1 0 00003987 BA[0C00] mov dx, .errmsg 0 0000398A E9[0000] jmp putsz_error 310 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 310 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 00001940 5365676D656E742069 .errmsg:asciz "Segment is not readable.",13,10 0 00001949 73206E6F7420726561 0 00001952 6461626C652E0D0A00 312 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 312 ------------------ note: 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 0000398D F606[0100]80 testopt [getrange_lines], 8000h 0 00003992 7503 jnz .notlines 0 00003994 E85A02 call dd_get_one_line_range 332 333 .notlines: 334 335 %if _DNUM 0 00003997 A1[0800] mov ax, word [ddsize] 0 0000399A 48 dec ax ; 0 = byte, 1 = word, 3 = dword 0 0000399B 21F0 and ax, si ; how many bytes to skip at the beginning 0 0000399D A2[0A00] mov byte [ddoffset2], al 340 %endif 341 0 000039A0 B80100 mov ax, opt2_db_header 343 %if _DNUM 0 000039A3 803E[0800]02 cmp byte [ddsize], 2 0 000039A8 7207 jb @F 0 000039AA B010 mov al, opt2_dw_header 0 000039AC 7403 je @F 0 000039AE B80001 mov ax, opt2_dd_header 349 ; fixme dq 350 @@: 351 %endif 0 000039B1 E89B01 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 0 000039B4 5589E58D66F4 lenter 0 000039BA 31C0 xor ax, ax 365 lvar dword, offset 0 000039BC 50 push ax ; (zero-initialise high word) 0 000039BD 50 push ax 368 lvar dword, adjust 0 000039BE 50 push ax ; (zero-initialise high word) 0 000039BF 50 push ax ; (zero-initialise offset (low) word) 371 0 000039C0 66 _386_PM_o32 0 000039C1 8976F0 mov word [bp + ?offset], si 374 0 000039C4 53 push bx 0 000039C5 66 _386_PM_o32 0 000039C6 56 push si 0 000039C7 66 _386_PM_o32 0 000039C8 52 push dx 380 0 000039C9 F606[0200]0C testopt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 0 000039CE 7403E94A01 jnz .justdisplay 383 0 000039D3 66 _386_PM_o32 0 000039D4 87D6 xchg dx, si ; bx:(e)dx = start address, bx:(e)si = end 0 000039D6 E8[0000] call getlinear_32bit ; dx:ax = start linear 0 000039D9 7303E93F01 jc .justdisplay 388 0 000039DE 8956FE mov word [bp + ?startlinear + 2], dx 0 000039E1 8946FC mov word [bp + ?startlinear], ax 0 000039E4 52 push dx 0 000039E5 50 push ax 393 0 000039E6 66 _386_PM_o32 0 000039E7 87D6 xchg dx, si ; bx:(e)dx = end address 0 000039E9 E8[0000] call getlinear_32bit ; dx:ax = end linear 397 0 000039EC 8956FA mov word [bp + ?endlinear + 2], dx 0 000039EF 8946F8 mov word [bp + ?endlinear], ax 0 000039F2 5B pop bx 0 000039F3 59 pop cx ; cx:bx = start linear 0 000039F4 7303E92401 jc .justdisplay 403 0 000039F9 93 xchg ax, bx 0 000039FA 87D1 xchg dx, cx ; cx:bx = end linear, dx:ax = start linear 406 0 000039FC E8[0000]EB02[0000] nearcall binsearchmain ; es:di -> first entry, cx = number, bx = index 0 00003A03 895EF6 mov word [bp + ?sym_index], bx 0 00003A06 85C9 test cx, cx 0 00003A08 7503E91001 jz .justdisplay 411 0 00003A0D 66 _386_PM_o32 0 00003A0E 5A pop dx 0 00003A0F 66 _386_PM_o32 0 00003A10 5E pop si 0 00003A11 5B pop bx 417 418 .loop: 0 00003A12 894EF4 mov word [bp + ?sym_count], cx 420 421 .loop_no_cx: 0 00003A15 FF76F6 push word [bp + ?sym_index] 0 00003A18 50 push ax ; (reserve space, uninitialised) 0 00003A19 E8[0000]EB02[0000] dualcall getfarpointer.main 0 00003A20 5F pop di 0 00003A21 07 pop es 427 0 00003A22 8B5EEE mov bx, word [bp + ?adjust + 2] 0 00003A25 8B4EEC mov cx, word [bp + ?adjust] 430 ; bx:cx = adjust 431 0 00003A28 034EFC add cx, word [bp + ?startlinear] 0 00003A2B 135EFE adc bx, word [bp + ?startlinear + 2] 434 ; bx:cx = adjust + start linear (adjust linear) 435 0 00003A2E F7DB neg bx 0 00003A30 F7D9 neg cx 0 00003A32 83DB00 sbb bx, byte 0 ; neg bx:cx 439 0 00003A35 26030D add cx, word [es:di + smLinear] 0 00003A38 26135D02 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 0 00003A3C 85DB test bx, bx ; is there a chunk of ddsize at least ? 0 00003A3E 7403E9AD00 jnz .chunk 447 %if _DNUM 0 00003A43 3B0E[0800] cmp cx, [ddsize] 449 %else 450 cmp cx, 1 451 %endif 0 00003A47 7203E9A400 jae .chunk ; yes, display a chunk --> 453 0 00003A4C 6681E1FFFF0000 _386_PM and ecx, 0FFFFh 0 00003A53 66 _386_PM_o32 0 00003A54 56 push si 0 00003A55 66 _386_PM_o32 0 00003A56 01CE add si, cx 0 00003A58 16 push ss 0 00003A59 07 pop es 0 00003A5A BF[0000] mov di, line_out 0 00003A5D E85303 call dd_display_offset 463 0 00003A60 F606[0300]01 testopt [options], dd_no_blanks_sym 0 00003A65 7526 jnz @FF 466 0 00003A67 58 pop ax ; ax = original si value 0 00003A68 50 push ax 469 0 00003A69 56 push si 0 00003A6A 89C6 mov si, ax 472 %if _DNUM 0 00003A6C 8B0E[0800] mov cx, word [ddsize] 474 %else 475 mov cx, 1 476 %endif 0 00003A70 89C8 mov ax, cx 0 00003A72 49 dec cx 0 00003A73 21F1 and cx, si ; how many bytes to skip at the beginning 0 00003A75 29CE sub si, cx ; = offset after skipped to first displayed 0 00003A77 01C9 add cx, cx ; how many digits to skip at the beginning 0 00003A79 83E60F and si, 0Fh ; = offset in single line 0 00003A7C 01C0 add ax, ax ; = 8 for dword, 4 for word, 2 for byte 0 00003A7E 40 inc ax ; = 9 for dword, 5 for word, 3 for byte 0 00003A7F A9 db __TEST_IMM16 ; (skip add in first iteration) 486 @@: 0 00003A80 01C1 add cx, ax ; (in subsequent iterations:) add blanks 488 %if _DNUM 0 00003A82 2B36[0800] sub si, word [ddsize] ; still a whole unit to add ? (subtract it) 490 %else 491 sub si, 1 492 %endif 0 00003A86 73F8 jae @B ; yes --> 494 ; cx = number of blanks to skip 0 00003A88 B020 mov al, 32 0 00003A8A F3AA rep stosb ; store blanks for each byte 0 00003A8C 5E pop si 498 @@: 499 0 00003A8D 52 push dx 0 00003A8E E8[0000] call putsline ; puts offset + blanks 502 0 00003A91 FF76F6 push word [bp + ?sym_index] 0 00003A94 E8[0000]EB02[0000] dualcall displaystring ; puts symbol label 505 0 00003A9B FF76F6 push word [bp + ?sym_index] 0 00003A9E 50 push ax 0 00003A9F E8[0000]EB02[0000] dualcall getfarpointer.main 0 00003AA6 5F pop di 0 00003AA7 07 pop es 0 00003AA8 31D2 xor dx, dx 0 00003AAA E8[0000] _386_PM call test_high_limit ; 32-bit segment ? 0 00003AAD 7404 _386_PM jz .16 ; no --> (don't display zero high word) 0 00003AAF 6656 _386_PM push esi 0 00003AB1 5E _386_PM pop si 0 00003AB2 5A _386_PM pop dx 517 .16: 0 00003AB3 263B5506 cmp dx, word [es:di + smOffset + 2] 0 00003AB7 BA[0000] mov dx, msg.dd_after_symbol.non_wrt 0 00003ABA 7506 jne .wrt 0 00003ABC 263B7504 cmp si, word [es:di + smOffset] 0 00003AC0 741B je .non_wrt 523 .wrt: 0 00003AC2 BA[0000] mov dx, msg.dd_after_symbol.1_wrt 0 00003AC5 E8[0000] call disp_message 526 0 00003AC8 A1[0400] mov ax, word [d_addr + 4] 0 00003ACB 16 push ss 0 00003ACC 07 pop es 0 00003ACD BF[0000] mov di, line_out 0 00003AD0 E8[0000] call hexword 0 00003AD3 53 push bx 0 00003AD4 51 push cx 0 00003AD5 E8[0000] call putsline 0 00003AD8 59 pop cx 0 00003AD9 5B pop bx 537 0 00003ADA BA[0000] mov dx, msg.dd_after_symbol.2_wrt 539 .non_wrt: 0 00003ADD E8[0000] call disp_message ; puts after 0 00003AE0 5A pop dx 542 0 00003AE1 66 _386_PM_o32 0 00003AE2 5E pop si 545 0 00003AE3 FF46F6 inc word [bp + ?sym_index] 547 ; point to next symbol's SYMMAIN (if any) 0 00003AE6 8B4EF4 mov cx, word [bp + ?sym_count] 0 00003AE9 E202 loop .j_loop ; loop if any more to go 0 00003AEB EB35 jmp .justdisplay_no_pop ; if none, just display remainder --> 551 552 553 .j_loop: 0 00003AED E922FF 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 0 00003AF0 A1[0800] mov ax, word [ddsize] 0 00003AF3 48 dec ax 0 00003AF4 F7D0 not ax 0 00003AF6 21C1 and cx, ax 569 %endif 570 0 00003AF8 014EEC add word [bp + ?adjust], cx 0 00003AFB 115EEE adc word [bp + ?adjust + 2], bx 573 0 00003AFE FF76EE _386_PM push word [bp + ?adjust + 2] 0 00003B01 50 _386_PM push ax 0 00003B02 6658 _386_PM pop eax 0 00003B04 8B46EC mov ax, word [bp + ?adjust] 578 ; (e)ax = adjust 0 00003B07 66 _386_PM_o32 0 00003B08 48 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 0 00003B09 66 _386_PM_o32 0 00003B0A 52 push dx ; stack := end offset 0 00003B0B 66 _386_PM_o32 0 00003B0C 8B56F0 mov dx, word [bp + ?offset] 589 ; (e)dx := start offset 0 00003B0F 66 _386_PM_o32 0 00003B10 01C2 add dx, ax ; (e)dx := intermediate end offset 592 0 00003B12 E81201 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 0 00003B15 66 _386_PM_o32 0 00003B16 89D6 mov si, dx ; (e)si := intermediate start offset 0 00003B18 66 _386_PM_o32 0 00003B19 5A pop dx ; (e)dx := end offset 0 00003B1A E9F8FE jmp .loop_no_cx 603 604 .justdisplay: 0 00003B1D 66 _386_PM_o32 0 00003B1E 5A pop dx 0 00003B1F 66 _386_PM_o32 0 00003B20 5E pop si 0 00003B21 5B pop bx 610 611 .justdisplay_no_pop: 0 00003B22 89EC5D lleave 613 %endif 614 0 00003B25 E8FF00 call dd_display 616 0 00003B28 F606[0100]80 testopt [getrange_lines], 8000h 0 00003B2D 750F jnz .notlines 0 00003B2F FF0E[0000] dec word [getrange_lines] 0 00003B33 7409 jz .linesdone 0 00003B35 66 _386_PM_o32 0 00003B36 89D6 mov si, dx ; = new start offset 0 00003B38 E8B600 call dd_get_one_line_range 624 ; get a new end offset 0 00003B3B E976FE jmp dd_loop_line 626 627 .linesdone: 628 .notlines: 0 00003B3E B80200 mov ax, opt2_db_trailer 630 %if _DNUM 0 00003B41 803E[0800]02 cmp byte [ddsize], 2 0 00003B46 7207 jb @F 0 00003B48 B020 mov al, opt2_dw_trailer 0 00003B4A 7403 je @F 0 00003B4C 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 00003B4F 8506[0000] test word [options2], ax 0 00003B53 7503E99800 jz .ret 0 00003B58 53 push bx 0 00003B59 56 push si 0 00003B5A 52 push dx 655 0 00003B5B BF[0000] mov di, line_out 657 %if _40COLUMNS 0 00003B5E F606[0100]10 testopt [options6], opt6_40_columns 0 00003B63 7417 jz @F 0 00003B65 89D8 mov ax, bx 0 00003B67 E8[0000] call hexword 0 00003B6A B03A mov al, ':' 0 00003B6C AA stosb 664 %if _PM 0 00003B6D B9FBFF mov cx, -5 0 00003B70 B80600 mov ax, 4 + 2 0 00003B73 E8[0000] call test_high_limit ; 32-bit segment ? 0 00003B76 7422 jz .add ; no --> 0 00003B78 B00A mov al, 8 + 2 0 00003B7A EB1E jmp .add 671 %else 672 mov cx, 1 673 jmp .blank 674 %endif 675 @@: 676 %endif 677 678 %if _LINK 0 00003B7C 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 00003B7F BA[0000] mov dx, msg.header 0 00003B82 A91101 test ax, opt2_db_header | opt2_dw_header | opt2_dd_header ; fixme dq 0 00003B85 7506 jnz @F 687 %if _LINK 0 00003B87 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 00003B8A BA[0000] mov dx, msg.trailer 694 @@: 0 00003B8D E8[0000] call putsz ; put initial word 696 ; cx = minus length of initial word 0 00003B90 B80B00 mov ax, 4 + 1 + 4 + 2 ; length of address with 16-bit offset 698 %if _PM 699 ; mov bx, word [d_addr + saSegSel] 0 00003B93 E8[0000] call test_high_limit ; 32-bit segment ? 0 00003B96 7402 jz .16 ; no --> 0 00003B98 B00F mov al, 4 + 1 + 8 + 2 ; length of address with 32-bit offset 703 .16: 704 %endif 705 .add: 0 00003B9A 01C1 add cx, ax ; length of address minus length of word 707 ; = length to pad 708 .blank: 0 00003B9C B020 mov al, 32 0 00003B9E F3AA rep stosb ; pad 711 ; ch = 0 712 0 00003BA0 B83020 mov ax, '0 ' ; al = '0', ah = blank 714 %if _DNUM 0 00003BA3 8A0E[0A00] mov cl, byte [ddoffset2]; cx = ddoffset2 0 00003BA7 E304 jcxz @FF ; if none to skip --> 717 @@: 0 00003BA9 AB stosw 0 00003BAA 40 inc ax ; increment the number (up to '7') 0 00003BAB E2FC loop @B ; loop for skipping --> 721 @@: 722 %endif 0 00003BAD 2C30 sub al, '0' ; = back to numerical (0 .. 7) 0 00003BAF 89C2 mov dx, ax ; dl = numerical offset 725 0 00003BB1 52 push dx 727 %if _DNUM 0 00003BB2 8B1E[0800] mov bx, [ddsize] ; ddsize 729 %else 730 mov bx, 1 731 %endif 0 00003BB6 BE1000 mov si, 16 ; loop counter 733 %if _40COLUMNS 0 00003BB9 F606[0100]10 testopt [options6], opt6_40_columns 0 00003BBE 7402 jz @F 0 00003BC0 D1EE shr si, 1 737 %endif 738 @@: 0 00003BC2 88D0 mov al, dl ; next numerical offset 0 00003BC4 E8[0000] call hexnyb ; display it 741 %if _DNUM 0 00003BC7 89D9 mov cx, bx 0 00003BC9 01C9 add cx, cx ; cx = 2 * ddsize 0 00003BCB B020 mov al, 32 0 00003BCD F3AA rep stosb ; pad to next position 746 %else 747 mov al, 32 748 stosb 749 stosb 750 %endif 0 00003BCF 01DA add dx, bx ; increment dl by how many positions we use 0 00003BD1 29DE sub si, bx ; decrement loop counter 0 00003BD3 77ED ja @B ; don't jump if si was below-or-equal-to bx 0 00003BD5 5A pop dx 755 0 00003BD6 B91000 mov cx, 16 ; loop counter 757 %if _40COLUMNS 0 00003BD9 F606[0100]10 testopt [options6], opt6_40_columns 0 00003BDE 7402 jz @F 0 00003BE0 D1E9 shr cx, 1 761 %endif 762 @@: 0 00003BE2 88D0 mov al, dl 0 00003BE4 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 00003BE7 42 inc dx ; increment offset 0 00003BE8 E2F8 loop @B ; loop 769 0 00003BEA E8[0000] call putsline_crlf 771 0 00003BED 5A pop dx 0 00003BEE 5E pop si 0 00003BEF 5B pop bx 775 .ret: 0 00003BF0 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: 0 00003BF1 66 _386_PM_o32 0 00003BF2 89F2 mov dx, si 785 %if _DNUM 0 00003BF4 6631C0 _386_PM xor eax, eax 0 00003BF7 A1[0800] mov ax, word [ddsize] 0 00003BFA 48 dec ax 0 00003BFB 21F0 and ax, si 790 %else 791 _386_PM_o32 792 xor ax, ax 793 %endif 794 %if _40COLUMNS 0 00003BFD 80CA07 or dl, 7 0 00003C00 F606[0100]10 testopt [options6], opt6_40_columns 0 00003C05 7503 jnz @F 798 %endif 0 00003C07 80CA0F or dl, 15 800 @@: 801 802 %if _PM 0 00003C0A 53 push bx 0 00003C0B 8B1E[0400] mov bx, word [d_addr + saSegSel] 0 00003C0F E8[0000] call test_high_limit ; 32-bit segment ? 0 00003C12 5B pop bx 0 00003C13 740A jz .16 ; no --> 808 .32: 0 00003C15 66 _386_PM_o32 0 00003C16 01C2 add dx, ax 0 00003C18 7304 jnc @F 0 00003C1A 66 _386_PM_o32 0 00003C1B 83CAFF or dx, strict byte -1 814 @@: 0 00003C1E C3 retn 816 .16: 817 %endif 0 00003C1F 01C2 add dx, ax 0 00003C21 7303 jnc @F 0 00003C23 83CAFF or dx, strict byte -1 821 @@: 0 00003C26 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 00003C27 16 push ss 0 00003C28 07 pop es 837 dd2_loop: 0 00003C29 E8[0000] call handle_serial_flags_ctrl_c 839 0 00003C2C C706[0000][CD00] mov word [lastcmd], lastddd 841 0 00003C32 BF[0000] mov di, line_out ; reset di for next line 843 %if _40COLUMNS 0 00003C35 BBF0FF mov bx, ~0Fh 0 00003C38 F606[0100]10 testopt [options6], opt6_40_columns 0 00003C3D 7402 jz @F 0 00003C3F B3F8 mov bl, ~7 848 @@: 849 %endif 0 00003C41 E8AC01 call dd_display_offset.masklownybble 851 ; ax = offset & ~ 0Fh 852 %if _40COLUMNS 0 00003C44 89C3 mov bx, ax 854 %endif 855 856 %if _DNUM 0 00003C46 8B0E[0800] mov cx, word [ddsize] 0 00003C4A 51 push cx 0 00003C4B 49 dec cx ; 0 = byte, 1 = word, 3 = dword 0 00003C4C 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 00003C4E 01C8 add ax, cx ; = where to start 0 00003C50 890E[0000] mov word [ddoffset], cx 869 %endif 0 00003C54 50 push ax 0 00003C55 B82020 mov ax, 32 << 8 | 32 872 %if _DNUM 0 00003C58 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 00003C5A F606[0100]30 testopt [options6], opt6_40_columns | opt6_40_indent_odd 0 00003C5F 7408 jz @F ; neither set --> 0 00003C61 7B06 jpo @F ; only one set --> 0 00003C63 F6C308 test bl, 8 0 00003C66 7401 jz @F 0 00003C68 AA stosb 885 @@: 886 %endif 0 00003C69 58 pop ax 888 %if _DNUM 0 00003C6A 59 pop cx 890 %else 891 mov cx, 1 892 %endif 893 0 00003C6B BB3000 mov bx, (2+1)*16 ; 16 bytes (2 digits each) 895 %if _DNUM 0 00003C6E 80F902 cmp cl, 2 0 00003C71 7206 jb @F ; if it is 1 --> 0 00003C73 B328 mov bl, (4+1)*8 ; 8 words (4 digits each) 0 00003C75 7402 je @F ; if it is 2 --> 900 ; it is 4 0 00003C77 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 00003C79 F606[0100]10 testopt [options6], opt6_40_columns 0 00003C7E 7402 jz @F 0 00003C80 D1EB shr bx, 1 ; half as many items 913 @@: 914 %endif 0 00003C82 01FB add bx, di 0 00003C84 E8[0000] call prephack ; set up for faking int vectors 23 and 24 917 0 00003C87 50 push ax 919 ; blank the start of the line if offset isn't paragraph aligned 920 dd3: 0 00003C88 39F0 cmp ax, si ; skip to position in line 0 00003C8A 7429 je dd4 ; if we're there yet 0 00003C8C 7718 ja .error 924 %if _DNUM 0 00003C8E 50 push ax 0 00003C8F B82020 mov ax, 32 << 8| 32 0 00003C92 51 push cx 0 00003C93 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 00003C95 59 pop cx 0 00003C96 AA stosb ; store additional blank as separator 0 00003C97 51 push cx 934 @@: 0 00003C98 268807 mov byte [es:bx], al 0 00003C9B 43 inc bx 0 00003C9C E2FA loop @B ; store as many blanks in text dump as bytes 0 00003C9E 59 pop cx 0 00003C9F 58 pop ax 0 00003CA0 0306[0800] 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 00003CA4 EBE2 jmp short dd3 952 953 954 .error: 0 00003CA6 BA[2700] mov dx, .msg_internal_error 0 00003CA9 E8[0000] call putsz_error 0 00003CAC B80106 mov ax, 0601h 0 00003CAF E8[0000] call setrc 0 00003CB2 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 0000195B 496E7465726E616C20 asciz "Internal error in dd3.",13,10 0 00001964 6572726F7220696E20 0 0000196D 6464332E0D0A00 964 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 964 ------------------ note: usesection lDEBUG_CODE 965 966 967 ; Begin main loop over lines of output. 968 dd4: 0 00003CB5 58 pop ax 970 %if _40COLUMNS 0 00003CB6 66 _386_PM_o32 ; xor ecx, ecx 0 00003CB7 31C9 xor cx, cx 0 00003CB9 B10F mov cl, 0Fh 0 00003CBB F606[0100]10 testopt [options6], opt6_40_columns 0 00003CC0 7402 jz @F 0 00003CC2 B107 mov cl, 7 977 @@: 978 %if _PM 0 00003CC4 53 push bx 0 00003CC5 8B1E[0400] mov bx, word [d_addr + saSegSel] 0 00003CC9 E8[0000] call test_high_limit ; 32-bit segment ? 0 00003CCC 5B pop bx 0 00003CCD 7401 jz .16 ; no --> 0 00003CCF 66 _386_PM_o32 ; add ecx, eax 985 %endif 986 .16: 0 00003CD0 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 00003CD2 7205 jc @F 0 00003CD4 66 _386_PM_o32 ; cmp ecx, edx 0 00003CD5 39D1 cmp cx, dx ; compare with end address 0 00003CD7 7202 jb dd5 ; if we write to the end of the line --> 1006 @@: 1007 ;_386_PM_o32 ; mov ecx, edx 0 00003CD9 89D1 mov cx, dx ; only write until (e)dx, inclusive 1009 dd5: 1010 ;_386_PM_o32 ; sub ecx, esi 0 00003CDB 29F1 sub cx, si 1012 ;_386_PM_o32 ; inc ecx 0 00003CDD 41 inc cx ; cx = number of bytes to print this line 1014 ; up to 16. no 32-bit register required 1015 %if _DNUM 0 00003CDE 8326[0400]00 and word [ddskipped], 0 1017 %endif 1018 0 00003CE3 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 00003CE6 8E1E[0400] mov ds, word [d_addr + saSegSel] 1025 1026 dd6: 1027 %if _DNUM 0 00003CEA 36A1[0800] mov ax, word [ss:ddsize] 0 00003CEE 39C8 cmp ax, cx ; ddsize <= left bytes ? 0 00003CF0 7617 jbe dd6_simple ; yes, display ddsize bytes --> 1031 0 00003CF2 50 push ax 0 00003CF3 51 push cx 0 00003CF4 57 push di 0 00003CF5 F7D9 neg cx ; - left bytes 0 00003CF7 01C1 add cx, ax ; ddsize - left bytes = how many skipped 0 00003CF9 36890E[0400] mov word [ss:ddskipped], cx 1038 0 00003CFE 89C1 mov cx, ax ; 1 = bytes, 2 = words, 4 = dwords 0 00003D00 49 dec cx ; 0 = bytes, 1 = words, 3 = dwords 0 00003D01 B85858 mov ax, 'XX' 0 00003D04 F3AB rep stosw ; fill filler digits not to be written 0 00003D06 5F pop di 0 00003D07 59 pop cx 0 00003D08 58 pop ax 1046 %endif 1047 1048 dd6_simple: 1049 %if _DNUM 0 00003D09 01C0 add ax, ax ; 2 = bytes, 4 = words, 8 = dwords 0 00003D0B 50 push ax 1052 @@: 0 00003D0C 48 dec ax 0 00003D0D 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 00003D0E 57 push di 0 00003D0F 01C7 add di, ax ; -> where to write next 2 hex digits 0 00003D11 50 push ax 1062 %endif 0 00003D12 67 _386_PM_a32 0 00003D13 AC lodsb ; al = data 0 00003D14 E8E500 call dd_store ; stores number at es:di->, char at es:bx-> 1066 %if _DNUM 0 00003D17 58 pop ax 0 00003D18 5F pop di ; -> start of hex digits space 0 00003D19 85C0 test ax, ax ; did we write the left-most digits? 0 00003D1B E0EF loopnz @B ; not yet --> (or no more bytes to display) 0 00003D1D 58 pop ax ; = how many digits we wrote 0 00003D1E 01C7 add di, ax ; -> after right-most digit 0 00003D20 B020 mov al, 32 0 00003D22 AA stosb ; store a blank 0 00003D23 85C9 test cx, cx 0 00003D25 75C3 jnz dd6 ; (16-bit. cx <= 16) 1077 0 00003D27 16 push ss ; restore ds 0 00003D28 1F pop ds 0 00003D29 66 _386_PM_o32 0 00003D2A 2B36[0000] sub si, word [ddoffset] 0 00003D2E 66 _386_PM_o32 0 00003D2F 0336[0400] 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 00003D33 B80F00 mov ax, 0Fh 0 00003D36 F606[0100]10 testopt [options6], opt6_40_columns 0 00003D3B 7402 jz @F 0 00003D3D B007 mov al, 7 1098 @@: 0 00003D3F 85C6 test si, ax 1100 %else 1101 test si, 0Fh ; space out till end of line 1102 %endif 0 00003D41 7418 jz dd10 1104 %if _DNUM 1105 %if _40COLUMNS 0 00003D43 50 push ax 1107 %endif 0 00003D44 B82020 mov ax, 32 << 8 | 32 0 00003D47 8B0E[0800] mov cx, word [ddsize] 0 00003D4B 51 push cx 0 00003D4C F3AB rep stosw ; store blanks for the number 0 00003D4E AA stosb ; store additional blank as separator 0 00003D4F 59 pop cx 1114 %if _40COLUMNS 0 00003D50 58 pop ax 1116 %endif 1117 @@: 0 00003D51 66 _386_PM_o32 0 00003D52 46 inc si ; skip as many bytes 1120 %if _40COLUMNS 0 00003D53 85C6 test si, ax 1122 %else 1123 test si, 0Fh 1124 %endif 0 00003D55 7404 jz dd10 0 00003D57 E2F8 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 00003D59 EBD8 jmp short dd9 1141 1142 dd10: 1143 %if _DNUM 0 00003D5B 66 _386_PM_o32 0 00003D5C 0336[0000] add si, word [ddoffset] 0 00003D60 66 _386_PM_o32 0 00003D61 2B36[0400] sub si, word [ddskipped] 1148 %endif 1149 0 00003D65 B91900 mov cx, (1 + 8 * (2 + 1)) ; go back 8 bytes (2 digits each) 1151 %if _DNUM 0 00003D68 803E[0800]02 cmp byte [ddsize], 2 0 00003D6D 7206 jb @F ; if it is 1 --> 0 00003D6F B115 mov cl, (1 + 4 * (4 + 1)) ; go back 4 words (4 digits each) 0 00003D71 7402 je @F ; if it is 2 --> 1156 ; it is 4 0 00003D73 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 00003D75 F606[0100]10 testopt [options6], opt6_40_columns 0 00003D7A 740B jz @F 0 00003D7C F606[0100]40 testopt [options6], opt6_40_dash 0 00003D81 7409 jz .nodash ; do not write a dash 1170 %if 1 1171 ; calculate dash position 0 00003D83 49 dec cx 0 00003D84 D1E9 shr cx, 1 0 00003D86 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 00003D87 29CF sub di, cx 0 00003D89 C6052D mov byte [di], '-' 1193 .nodash: 0 00003D8C E8[0000] call unhack 0 00003D8F 89DF mov di, bx 0 00003D91 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 00003D92 E8[0000] call putsline_crlf 1309 @@: 0 00003D95 5A pop dx 0 00003D96 66 _386_PM_o32 ; dec esi 0 00003D97 4E dec si 0 00003D98 66 _386_PM_o32 ; cmp esi, edx 0 00003D99 39D6 cmp si, dx 0 00003D9B 66 _386_PM_o32 ; inc esi 0 00003D9C 46 inc si 0 00003D9D 7303E987FE 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 00003DA2 8B1E[0400] mov bx, word [d_addr + saSegSel] 1322 ; reset bx (also set segment for trailer) 0 00003DA6 E8[0000] _386_PM call test_high_limit ; 32-bit segment ? 0 00003DA9 7401 _386_PM jz .16 ; no --> 0 00003DAB 66 _386_PM_o32 ; inc edx 1326 .16: 0 00003DAC 42 inc dx ; set up the address for the next 'D' command. 0 00003DAD 66 _386_PM_o32 ; mov dword [d_addr], edx 0 00003DAE 8916[0000] mov word [d_addr], dx 0 00003DB2 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 00003DB3 A1[0400] mov ax, word [d_addr + saSegSel] 0 00003DB6 89C3 mov bx, ax 1342 %if _40COLUMNS 0 00003DB8 F606[0100]10 testopt [options6], opt6_40_columns 0 00003DBD 7506 jnz @F 1345 %endif 0 00003DBF E8[0000] call hexword 0 00003DC2 B03A mov al, ':' 0 00003DC4 AA stosb 1349 @@: 0 00003DC5 66 _386_PM_o32 ; mov eax, esi 0 00003DC6 89F0 mov ax, si 0 00003DC8 E8[0000] _386_PM call test_high_limit ; 32-bit segment ? 0 00003DCB 740B _386_PM jz .386_16 ; no --> (don't display zero high word) 0 00003DCD E8[0000] _386_PM call hexword_high ; yes, display high word of address 1355 .common: 0 00003DD0 E8[0000] call hexword 0 00003DD3 B82020 mov ax, 32<<8|32 0 00003DD6 AB stosw 0 00003DD7 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 0 00003DD8 66F7C20000FFFF _386 test edx, ~0FFFFh 0 00003DDF 74EF _386 jz .common 1368 ;.error: 0 00003DE1 B83C01 _386 mov ax, 013Ch 0 00003DE4 E8[0000] _386 call setrc 0 00003DE7 BA[0000] _386 mov dx, msg.ofs32 0 00003DEA E8[0000] _386 call putsz_error 0 00003DED E9[0000] _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 00003DF0 56 push si 1386 %if _40COLUMNS 0 00003DF1 21DE and si, bx 1388 %else 1389 and si, ~0Fh 1390 %endif 0 00003DF3 66 _386_PM_o32 0 00003DF4 56 push si 0 00003DF5 E8BBFF call . 0 00003DF8 66 _386_PM_o32 0 00003DF9 58 pop ax 0 00003DFA 5E pop si 0 00003DFB 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 1408 ; CHG: ax 1409 ; STT: ds unknown 1410 dd_store: section_of_function 0 00003DFC E8[0000] call hexbyte ; dump hexadecimal number 0 00003DFF 362206[0B00] and al, byte [ss:dd_text_and] 1413 ; for MSDebug compatibility 0 00003E04 3C20 cmp al, 32 ; below blank ? 0 00003E06 7216 jb .ctrl ; control char --> 0 00003E08 3C7F cmp al, 127 ; DEL ? 0 00003E0A 7412 je .ctrl ; yes, control char --> 0 00003E0C 7212 jb .noctrl ; below, not a control char --> 0 00003E0E 36F606[0000]04 testopt [ss:options], cpdepchars 1420 ; allow CP-dependent characters ? 0 00003E14 750A jnz .noctrl ; yes --> 1422 %if _DTOP 0 00003E16 36F606[0200]80 testopt [ss:internalflags6], dif6_cpdepchars 1424 ; allow CP-dependent characters ? 0 00003E1C 7502 jnz .noctrl ; yes --> 1426 %endif 1427 .ctrl: 0 00003E1E B02E mov al, '.' ; replace by dot 1429 .noctrl: 0 00003E20 268807 mov byte [es:bx], al ; store dot or printable text byte 0 00003E23 43 inc bx 0 00003E24 C3 retn 1433 1434 1435 %if _PM 1436 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 1436 ------------------ note: usesection lDEBUG_DATA_ENTRY 1437 align 2, db 0 0 00001974 FFFF daresult: dw -1 1439 1440 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 1440 ------------------ note: usesection lDEBUG_CODE 1441 1442 descalloc: 0 00003E25 E8[0000] call skipwhite 0 00003E28 E8[0000] call chkeol 0 00003E2B 31C0 xor ax, ax 0 00003E2D B90100 mov cx, 1 0 00003E30 CD31 int 31h 0 00003E32 7210 jc .error 0 00003E34 BF[0000] mov di, msg.d.a_success_sel 0 00003E37 E8[0000] call hexword 0 00003E3A BA[0000] mov dx, msg.d.a_success 1452 .display: 0 00003E3D E8[0000] call putsz 0 00003E40 A3[4000] mov word [daresult], ax 0 00003E43 C3 retn 1456 1457 .error: 0 00003E44 BF[0000] mov di, msg.d.a_error_code 0 00003E47 E8[0000] call hexword 0 00003E4A BA[0000] mov dx, msg.d.a_error 0 00003E4D 3D0080 cmp ax, 8000h 0 00003E50 7303 jae @F 0 00003E52 B80108 mov ax, 0801h 1464 @@: 0 00003E55 E8[0000] call setrc 0 00003E58 B8FFFF mov ax, -1 0 00003E5B EBE0 jmp .display 1468 1469 1470 descdealloc: 0 00003E5D E8[0000] call skipwhite 0 00003E60 E8[0000]EB02[0000] nearcall getword 0 00003E67 E8[0000] call chkeol 0 00003E6A B80100 mov ax, 1 0 00003E6D 89D3 mov bx, dx 0 00003E6F CD31 int 31h 0 00003E71 7206 jc .error 0 00003E73 BA[0000] mov dx, msg.d.d_success 1479 .display: 0 00003E76 E9[0000] jmp putsz 1481 1482 .error: 0 00003E79 BF[0000] mov di, msg.d.d_error_code 0 00003E7C E8[0000] call hexword 0 00003E7F BA[0000] mov dx, msg.d.d_error 0 00003E82 3D0080 cmp ax, 8000h 0 00003E85 7303 jae @F 0 00003E87 B80208 mov ax, 0802h 1489 @@: 0 00003E8A E8[0000] call setrc 0 00003E8D EBE7 jmp .display 1492 1493 1494 descbase: 0 00003E8F E8[0000] call skipwhite 0 00003E92 E8[0000]EB02[0000] nearcall getword 0 00003E99 89D1 mov cx, dx 0 00003E9B E8[0000]EB02[0000] nearcall getdword 0 00003EA2 E8[0000] call chkeol 0 00003EA5 87CB xchg cx, bx ; cx:dx = base, bx = desc 0 00003EA7 B80700 mov ax, 7 0 00003EAA CD31 int 31h 0 00003EAC 7206 jc .error 0 00003EAE BA[0000] mov dx, msg.d.b_success 1505 .display: 0 00003EB1 E9[0000] jmp putsz 1507 1508 .error: 0 00003EB4 BF[0000] mov di, msg.d.b_error_code 0 00003EB7 E8[0000] call hexword 0 00003EBA BA[0000] mov dx, msg.d.b_error 0 00003EBD 3D0080 cmp ax, 8000h 0 00003EC0 7303 jae @F 0 00003EC2 B80308 mov ax, 0803h 1515 @@: 0 00003EC5 E8[0000] call setrc 0 00003EC8 EBE7 jmp .display 1518 1519 1520 desclimit: 0 00003ECA E8[0000] call skipwhite 0 00003ECD E8[0000]EB02[0000] nearcall getword 0 00003ED4 89D1 mov cx, dx 0 00003ED6 E8[0000]EB02[0000] nearcall getdword 0 00003EDD E8[0000] call chkeol 0 00003EE0 87CB xchg cx, bx ; cx:dx = limit, bx = desc 0 00003EE2 B80800 mov ax, 8 0 00003EE5 CD31 int 31h 0 00003EE7 7206 jc .error 0 00003EE9 BA[0000] mov dx, msg.d.l_success 1531 .display: 0 00003EEC E9[0000] jmp putsz 1533 1534 .error: 0 00003EEF BF[0000] mov di, msg.d.l_error_code 0 00003EF2 E8[0000] call hexword 0 00003EF5 BA[0000] mov dx, msg.d.l_error 0 00003EF8 3D0080 cmp ax, 8000h 0 00003EFB 7303 jae @F 0 00003EFD B80408 mov ax, 0804h 1541 @@: 0 00003F00 E8[0000] call setrc 0 00003F03 EBE7 jmp .display 1544 1545 1546 desctype: 0 00003F05 E8[0000] call skipwhite 0 00003F08 E8[0000]EB02[0000] nearcall getword 0 00003F0F 89D3 mov bx, dx 0 00003F11 E8[0000]EB02[0000] nearcall getword 0 00003F18 E8[0000] call chkeol 0 00003F1B 89D1 mov cx, dx ; cx = type, bx = desc 0 00003F1D B80900 mov ax, 9 0 00003F20 CD31 int 31h 0 00003F22 7206 jc .error 0 00003F24 BA[0000] mov dx, msg.d.t_success 1557 .display: 0 00003F27 E9[0000] jmp putsz 1559 1560 .error: 0 00003F2A BF[0000] mov di, msg.d.t_error_code 0 00003F2D E8[0000] call hexword 0 00003F30 BA[0000] mov dx, msg.d.t_error 0 00003F33 3D0080 cmp ax, 8000h 0 00003F36 7303 jae @F 0 00003F38 B80508 mov ax, 0805h 1567 @@: 0 00003F3B E8[0000] call setrc 0 00003F3E EBE7 jmp .display 1570 1571 1572 descsubcommand: 0 00003F40 AC lodsb 0 00003F41 3C3F cmp al, '?' 0 00003F43 742B je deschelp 0 00003F45 E8[0000] call ispm 0 00003F48 7563 jne display_nodesc 0 00003F4A E8[0000] call capitalise 0 00003F4D 3C41 cmp al, 'A' 0 00003F4F 7503E9D1FE je descalloc 0 00003F54 3C44 cmp al, 'D' 0 00003F56 7503E902FF je descdealloc 0 00003F5B 3C42 cmp al, 'B' 0 00003F5D 7503E92DFF je descbase 0 00003F62 3C4C cmp al, 'L' 0 00003F64 7503E961FF je desclimit 0 00003F69 3C54 cmp al, 'T' 0 00003F6B 7498 je desctype 0 00003F6D E9[0000] jmp error 1590 1591 deschelp: 0 00003F70 AC lodsb 0 00003F71 E8[0000] call chkeol 0 00003F74 BA[0000] mov dx, msg.deschelp 0 00003F77 E9[0000] jmp putsz_exthelp ; print string and return 1596 1597 1598 ; DL command 1599 descout: 0 00003F7A E8[0000] call skipwhite 0 00003F7D E8[0000]EB02[0000] nearcall getword; get word into DX 0 00003F84 89D3 mov bx, dx 0 00003F86 E8[0000] call skipcomm0 0 00003F89 BA0100 mov dx, 1 0 00003F8C E8[0000] call iseol? 0 00003F8F 7414 je .onlyone 0 00003F91 E8[0000] call capitalise 0 00003F94 3C4C cmp al, 'L' 0 00003F96 7503 jne .notlength 0 00003F98 E8[0000] call skipcomma 1611 .notlength: 0 00003F9B E8[0000]EB02[0000] nearcall getword 0 00003FA2 E8[0000] call chkeol 1614 .onlyone: 0 00003FA5 42 inc dx ; (note js at nextdesc changed to jz) 0 00003FA6 89D6 mov si, dx ; save count 0 00003FA8 E8[0000] call ispm 0 00003FAB 740D je nextdesc 1619 display_nodesc: 0 00003FAD BA[0000] mov dx, nodesc 0 00003FB0 B80008 mov ax, 0800h 0 00003FB3 E8[0000] call setrc 0 00003FB6 E9[0000] jmp putsz 1624 desc_done: 0 00003FB9 C3 retn 1626 subcpu 286 1627 nextdesc: 0 00003FBA 4E dec si 0 00003FBB 74FC jz desc_done 0 00003FBD BF[0000] mov di, descriptor 0 00003FC0 89D8 mov ax, bx 0 00003FC2 E8[0000] call hexword 0 00003FC5 BF[0000] mov di, descriptor.base 0 00003FC8 57 push di 0 00003FC9 B83F3F mov ax, "??" 0 00003FCC AB stosw 0 00003FCD AB stosw 0 00003FCE AB stosw 0 00003FCF AB stosw 1640 %ifn _LINK 1641 add di, byte (descriptor.limit - (descriptor.base + 8)) 1642 %else 0 00003FD0 83C7F8 add di, strict byte -8 1644 wlcalc byte_ext_descriptor.limit, equ $ - 1 1645 wlcalc byte_minusext_descriptor.base, equ $ - 1 1646 %endif 0 00003FD3 AB stosw 0 00003FD4 AB stosw 0 00003FD5 AB stosw 0 00003FD6 AB stosw 1651 %ifn _LINK 1652 add di, byte (descriptor.attrib - (descriptor.limit + 8)) 1653 %else 0 00003FD7 83C7F8 add di, strict byte -8 1655 wlcalc byte_ext_descriptor.attrib, equ $ - 1 1656 wlcalc byte_minusext_descriptor.limit, equ $ - 1 1657 %endif 0 00003FDA AB stosw 0 00003FDB AB stosw 0 00003FDC 5F pop di 1661 ; lar ax, bx 1662 ; jnz skipdesc ; tell that this descriptor is invalid 0 00003FDD B80600 mov ax, 6 0 00003FE0 CD31 int 31h 0 00003FE2 720A jc desc_o1 0 00003FE4 89C8 mov ax, cx 0 00003FE6 E8[0000] call hexword 0 00003FE9 89D0 mov ax, dx 0 00003FEB E8[0000] call hexword 1670 desc_o1: 0 00003FEE BF[0000] mov di, descriptor.limit 0 00003FF1 EB2B _no386_jmps use16desc 1673 subcpu 386 0 00003FF3 660F03C3 lsl eax, ebx 0 00003FF7 751A jnz desc_out 0 00003FF9 50 push ax 0 00003FFA 66C1E810 shr eax, 16 0 00003FFE E8[0000] call hexword 0 00004001 58 pop ax 0 00004002 E8[0000] call hexword 0 00004005 660F02C3 lar eax, ebx 0 00004009 66C1E808 shr eax, 8 1683 desc_o2: 0 0000400D BF[0000] mov di, descriptor.attrib 0 00004010 E8[0000] call hexword 1686 desc_out: 0 00004013 BA[0000] mov dx, descriptor 0 00004016 E8[0000] call putsz 0 00004019 83C308 add bx, byte 8 0 0000401C EB9C jmp short nextdesc 1691 subcpureset ; subcpu 386 1692 use16desc: 0 0000401E 0F03C3 lsl ax, bx 0 00004021 75F0 jnz desc_out 0 00004023 E8[0000] call hexword 0 00004026 B82020 mov ax, 32<<8|32 0 00004029 AB stosw 0 0000402A AB stosw 0 0000402B 0F02C3 lar ax, bx 0 0000402E C1E808 shr ax, 8 0 00004031 EBDA jmp short desc_o2 1702 subcpureset ; subcpu 286 1703 %endif 1704 1705 %if _DSTRINGS 1706 ; D$ command 1707 dcpm: 0 00004033 C606[0000]24 mov byte [dstringtype], 36 0 00004038 C706[0000][0000] mov word [dstringaddr], dcpm_addr 0 0000403E EB25 jmp short dstring 1711 1712 ; DW# command 1713 dwcounted: 0 00004040 C606[0000]FE mov byte [dstringtype], 0FEh 0 00004045 C706[0000][0000] mov word [dstringaddr], dwcount_addr 0 0000404B EB18 jmp short dstring 1717 1718 ; D# command 1719 dcounted: 0 0000404D C606[0000]FF mov byte [dstringtype], 0FFh 0 00004052 C706[0000][0000] mov word [dstringaddr], dcount_addr 0 00004058 EB0B jmp short dstring 1723 1724 ; DZ command 1725 dz: 0 0000405A C606[0000]00 mov byte [dstringtype], 0 0 0000405F C706[0000][0000] mov word [dstringaddr], dz_addr 1728 1729 ; common code for all string commands 1730 dstring: 0 00004065 E8[0000] call skipwhite 0 00004068 E8[0000] call iseol? 0 0000406B 7509 jne .getaddr ; if an address was given 1734 .last: 0 0000406D 8B1E[0000] mov bx, word [dstringaddr] 0 00004071 66 _386_PM_o32 ; mov edx, dword [bx] 0 00004072 8B17 mov dx, word [bx] 0 00004074 EB24 jmp short .haveaddr ; edx = offset, [bx + saSegSel] = segment 1739 .getaddr: 0 00004076 8B1E[0000] mov bx, word [reg_ds] 0 0000407A E8[0000]EB02[0000] nearcall getaddrX ; get address into bx:(e)dx 0 00004081 E8[0000] call chkeol ; expect end of line here 1743 %if _PM 0 00004084 53 push bx 1745 %endif 0 00004085 53 push bx 0 00004086 8B1E[0000] mov bx, word [dstringaddr] 0 0000408A 8F4704 pop word [bx + saSegSel]; save segment (offset behind string is saved later) 1749 %if _PM 0 0000408D E8[0000] call ispm 0 00004090 7505 jnz .86m 1752 .pm: 0 00004092 8F4708 pop word [bx + saSelector] 0 00004095 EB03 jmp @F 1755 .86m: 0 00004097 8F4706 pop word [bx + saSegment] 1757 @@: 1758 %endif 1759 .haveaddr: 0 0000409A C706[0000][4008] mov word [lastcmd], dstring.last 0 000040A0 E8[0000] call prephack 0 000040A3 66 _386_PM_o32 ; mov esi, edx 0 000040A4 89D6 mov si, dx 0 000040A6 800E[0200]01 setopt [internalflags], usecharcounter 0 000040AB C606[0000]01 mov byte [ charcounter ], 1 1766 ; initialize 0 000040B0 E8[0000] call dohack 0 000040B3 BF[0000] mov di, line_out ; es:di -> line_out 0 000040B6 8E5F04 mov ds, word [bx + saSegSel] 1770 ; ds:(e)si-> string 0 000040B9 36803E[0000]FE cmp byte [ss:dstringtype], 0FEh 0 000040BF 723E jb .terminated ; terminated string --> 0 000040C1 9F lahf 0 000040C2 67 _386_PM_a32 0 000040C3 AC lodsb ; load first byte 0 000040C4 31C9 xor cx, cx 0 000040C6 88C1 mov cl, al ; low byte of count 0 000040C8 9E sahf 0 000040C9 7504 jne .counted ; only byte count --> 0 000040CB 67 _386_PM_a32 0 000040CC AC lodsb ; load second byte 0 000040CD 88C5 mov ch, al ; high byte of count 1783 .counted: 0 000040CF E33C jcxz .done ; length zero --> 1785 .loop: 0 000040D1 67 _386_PM_a32 0 000040D2 AC lodsb ; get character 0 000040D3 E80400 call .char ; display 0 000040D6 E2F9 loop .loop ; until done --> 0 000040D8 EB33 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 000040DA 81FF[0000] cmp di, line_out_end ; end of buffer ? 0 000040DE 720B jb @F ; not yet, only store to buffer --> 1804 0 000040E0 1E push ds 0 000040E1 E80900 call .dump 1807 ; go back to special state 0 000040E4 E8[0000] call dohack 0 000040E7 1F pop ds 0 000040E8 BF[0000] mov di, line_out ; reset buffer to start 1811 1812 @@: 0 000040EB AA stosb ; store the text byte to buffer 0 000040EC 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 000040ED 50 push ax 0 000040EE 51 push cx 0 000040EF 53 push bx 0 000040F0 16 push ss 0 000040F1 1F pop ds 0 000040F2 E8[0000] call unhack ; restore state 0 000040F5 E8[0000] call putsline ; write buffered content 0 000040F8 E8[0000] call handle_serial_flags_ctrl_c 1831 ; handle Control-C 0 000040FB 5B pop bx 0 000040FC 59 pop cx 0 000040FD 58 pop ax 0 000040FE C3 retn 1836 1837 .terminated: 0 000040FF 67 _386_PM_a32 0 00004100 AC lodsb ; load character 0 00004101 363A06[0000] cmp al, byte [ss:dstringtype] 0 00004106 7405 je .done ; it's the terminator --> 0 00004108 E8CFFF call .char ; display 0 0000410B EBF2 jmp short .terminated ; and get next --> 1844 1845 .done: 1846 ; Finally dump the last chunk (may be empty). 0 0000410D E8DDFF call .dump ; this resets ds and calls unhack 0 00004110 66 _386_PM_o32 ; mov dword [bx], esi 0 00004111 8937 mov word [bx], si 0 00004113 B00D mov al, 13 0 00004115 E8[0000] call putc 0 00004118 B00A mov al, 10 0 0000411A E8[0000] call putc 0 0000411D 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 0000411E 31C9 xor cx, cx 0 00004120 AC lodsb 22 <1> %if !_LOADER 0 00004121 E8[0000] extcallcall capitalise 0 00004124 3C52 cmp al, 'R' 0 00004126 7502 jne @F 0 00004128 41 inc cx ; always 86 Mode 0 00004129 AC lodsb 28 <1> @@: 0 0000412A E8[0000] extcallcall capitalise 0 0000412D 3C4D cmp al, 'M' 0 0000412F 7503 jne @F 0 00004131 FEC5 inc ch ; show MCB names 0 00004133 AC lodsb 34 <1> @@: 0 00004134 E8[0000] extcallcall capitalise 0 00004137 3C4C cmp al, 'L' 0 00004139 7504 jne @F 0 0000413B 80CD02 or ch, 2 ; follow AMIS interrupt lists 0 0000413E AC lodsb 40 <1> @@: 41 <1> %endif 0 0000413F E8[0000] extcallcall skipcomm0 43 <1> 0 00004142 4E dec si 0 00004143 BA[0000] mov dx, relocated(msg.in) 46 <1> linkdatarelocation msg.in 0 00004146 E8[0000] extcallcall isstring? 0 00004149 7568 jne .not_in 49 <1> 0 0000414B E8[0000] extcallcall skipcomma 0 0000414E 4E dec si 0 0000414F 56 push si 0 00004150 51 push cx 54 <1> .in.loop: 0 00004151 E8[0000] extcallcall skipwhite 0 00004154 4E dec si 57 <1> 0 00004155 E8[0000]EB02[0000] extcallcall get_value_range; OUT: cx:di = from, bx:dx = to 0 0000415C 730D jnc @F 0 0000415E 7508 jnz .error 0 00004160 81FFFF00 cmp di, 255 0 00004164 7702 ja .error 0 00004166 E317 jcxz .in.next 64 <1> .error: 0 00004168 E9[0000] jmp error 66 <1> 67 <1> @@: 0 0000416B 81FFFF00 cmp di, 255 0 0000416F 77F7 ja .error 0 00004171 E302 jcxz @F 0 00004173 EBF3 jmp .error 72 <1> 73 <1> @@: 0 00004175 85DB test bx, bx 0 00004177 75EF jnz .error 0 00004179 81FAFF00 cmp dx, 255 0 0000417D 77E9 ja .error 78 <1> 79 <1> .in.next: 80 <1> @@: 0 0000417F E8[0000] extcallcall skipwh0 0 00004182 3C2C cmp al, ',' 0 00004184 74CB je .in.loop 0 00004186 E8[0000] extcallcall chkeol 0 00004189 59 pop cx 0 0000418A E8A500 call .prepare 0 0000418D 5E pop si 88 <1> 89 <1> .indo.loop: 0 0000418E E8[0000] extcallcall skipwhite 0 00004191 4E dec si 92 <1> 0 00004192 51 push cx 0 00004193 E8[0000]EB02[0000] extcallcall get_value_range; OUT: cx:di = from, bx:dx = to 0 0000419A 59 pop cx 0 0000419B 720D jc .indo.next 97 <1> 0 0000419D 89FB mov bx, di 0 0000419F A8 db __TEST_IMM8 ; (skip inc) 100 <1> @@: 0 000041A0 43 inc bx 0 000041A1 52 push dx 0 000041A2 E8A200 call .do 0 000041A5 5A pop dx 0 000041A6 39D3 cmp bx, dx 0 000041A8 72F6 jb @B 107 <1> 108 <1> .indo.next: 0 000041AA 4E dec si 0 000041AB E8[0000] extcallcall skipwhite 0 000041AE 3C2C cmp al, ',' 0 000041B0 74DC je .indo.loop 0 000041B2 C3 retn 114 <1> 115 <1> 116 <1> 117 <1> .not_in: 0 000041B3 AC lodsb 0 000041B4 E8[0000]EB02[0000] extcallcall getbyte; get byte into DL 0 000041BB 30F6 xor dh, dh 0 000041BD 89D3 mov bx, dx 0 000041BF E8[0000] extcallcall skipcomm0 0 000041C2 BA0100 mov dx, 1 0 000041C5 E8[0000] extcallcall iseol? 0 000041C8 745B je .onlyone 0 000041CA E8[0000] extcallcall capitalise 0 000041CD 3C4C cmp al, 'L' 0 000041CF 7543 jne .notlength 0 000041D1 E8[0000] extcallcall skipcomma 0 000041D4 E8[0000]EB02[0000] extcallcall getword; get byte into DL 0 000041DB 85D2 test dx, dx 0 000041DD 741A jz .err 0 000041DF 81FA0001 cmp dx, 100h 0 000041E3 740A je .checkrange 0 000041E5 50 push ax 0 000041E6 80E41F and ah, 1Fh 0 000041E9 80FC08 cmp ah, 8 0 000041EC 58 pop ax 0 000041ED 770A ja .err 140 <1> .checkrange: 0 000041EF 52 push dx 0 000041F0 01DA add dx, bx 0 000041F2 81FA0001 cmp dx, 100h 0 000041F6 5A pop dx 0 000041F7 7629 jna .rangeok 146 <1> .err: 0 000041F9 E9[0000] jmp error 148 <1> 149 <1> .last: 0 000041FC 31DB xor bx, bx 0 000041FE 8A1E[0000] mov bl, byte [lastint] 152 <1> internaldatarelocation 0 00004202 8B0E[0000] mov cx, word [lastint_is_86m_and_mcb] 154 <1> internaldatarelocation 0 00004206 BA0100 mov dx, 1 0 00004209 FEC3 inc bl 0 0000420B 7518 jnz .onlyone 0 0000420D C706[0000][0000] mov word [relocated(lastcmd)], relocated(dmycmd) 159 <1> linkdatarelocation lastcmd, -4 160 <1> linkdatarelocation dmycmd 0 00004213 C3 retn 162 <1> 163 <1> .notlength: 0 00004214 E8[0000]EB02[0000] extcallcall getbyte 0 0000421B 30F6 xor dh, dh 0 0000421D 28DA sub dl, bl 0 0000421F 72D8 jc .err 0 00004221 42 inc dx 169 <1> .rangeok: 0 00004222 E8[0000] extcallcall chkeol 171 <1> .onlyone: 0 00004225 E80A00 call .prepare 0 00004228 89D6 mov si, dx ; save count 174 <1> .next: 0 0000422A E81A00 call .do 0 0000422D 43 inc bx 0 0000422E 4E dec si 0 0000422F 75F9 jnz .next 0 00004231 C3 retn 180 <1> 181 <1> 182 <1> .prepare: 0 00004232 F6C502 test ch, 2 0 00004235 7403 jz @F 0 00004237 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 0000423A C706[0000][CF09] mov word [lastcmd], .last 196 <1> %endif 0 00004240 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 00004244 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 00004247 881E[0000] mov byte [lastint], bl 214 <1> internaldatarelocation 0 0000424B E8[0000] extcallcall handle_serial_flags_ctrl_c 0 0000424E E8[0000] extcallcall dohack 0 00004251 BF[0000] mov di, relocated(line_out) 218 <1> linkdatarelocation line_out 0 00004254 B8696E mov ax, "in" 0 00004257 AB stosw 0 00004258 B87420 mov ax, "t " 0 0000425B AB stosw 0 0000425C 88D8 mov al, bl 0 0000425E E8[0000] extcallcall hexbyte 0 00004261 B020 mov al, 32 0 00004263 AA stosb 227 <1> %if _PM 0 00004264 84C9 test cl, cl 0 00004266 7545 jnz .rm 0 00004268 E8[0000] extcallcall ispm 0 0000426B 7540 jnz .rm 232 <1> 0 0000426D B80402 mov ax, 0204h 0 00004270 80FB20 cmp bl, 20h 0 00004273 80D701 adc bh, 1 ; if below, bh = 2 236 <1> .loopexception: 0 00004276 51 push cx 0 00004277 CD31 int 31h 0 00004279 89C8 mov ax, cx 0 0000427B 59 pop cx 0 0000427C 7303E9BC00 jc .failed 0 00004281 E8[0000] extcallcall hexword 0 00004284 B03A mov al, ':' 0 00004286 AA 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 0 00004287 66 _386_PM_o32 ; mov eax, edx 253 <1> %endif 0 00004288 89D0 mov ax, dx 0 0000428A 803E[0000]00 cmp byte [relocated(dpmi32)], 0 256 <1> linkdatarelocation dpmi32, -3 0 0000428F 7403 jz .gate16 0 00004291 E8[0000] extcallcall hexword_high 259 <1> .gate16: 0 00004294 E8[0000] extcallcall hexword 0 00004297 B020 mov al, 32 0 00004299 AA stosb 0 0000429A B80202 mov ax, 0202h 0 0000429D FECF dec bh 0 0000429F 75D5 jnz .loopexception 0 000042A1 4F dec di 0 000042A2 E8[0000] extcallcall unhack 0 000042A5 53 push bx 0 000042A6 51 push cx 0 000042A7 E8[0000] extcallcall putsline_crlf 0 000042AA 59 pop cx 0 000042AB 5B pop bx 0 000042AC C3 retn 274 <1> 275 <1> .rm: 276 <1> %endif 0 000042AD 53 push bx 0 000042AE 51 push cx 0 000042AF 56 push si 280 <1> 0 000042B0 53 push bx 0 000042B1 31ED xor bp, bp 0 000042B3 D1E3 shl bx, 1 0 000042B5 D1E3 shl bx, 1 0 000042B7 31D2 xor dx, dx 286 <1> %if _PM 0 000042B9 E8[0000] extcallcall setes2dx 288 <1> %else 289 <1> mov es, dx ; es => IVT 290 <1> %endif 0 000042BC 268B4702 mov ax, word [es:bx + 2] ; ax = segment 0 000042C0 268B17 mov dx, word [es:bx] 0 000042C3 5B pop bx 294 <1> 295 <1> %if !_LOADER 0 000042C4 F6C502 test ch, 2 0 000042C7 7403E98100 jnz int_list 298 <1> %endif 299 <1> 300 <1> .loop_chain: 0 000042CC 50 push ax ; segment 0 000042CD 52 push dx 303 <1> 0 000042CE 16 push ss 0 000042CF 07 pop es ; ! es = ss 0 000042D0 E8[0000] extcallcall hexword 0 000042D3 B03A mov al, ':' 0 000042D5 AA stosb 0 000042D6 89D0 mov ax, dx 0 000042D8 E8[0000] extcallcall hexword 311 <1> 0 000042DB 5B pop bx 0 000042DC 5A pop dx ; segment 314 <1> 0 000042DD 8916[0200] mov word [intaddress + 2], dx 316 <1> internaldatarelocation 0 000042E1 891E[0000] mov word [intaddress], bx 318 <1> internaldatarelocation 319 <1> 0 000042E5 45 inc bp 0 000042E6 81FD0001 cmp bp, 256 0 000042EA 774C ja .toomany ; --> (! es = ss) 323 <1> 0 000042EC E82903 call check_int_chain 0 000042EF 722C jc .end_chain 326 <1> 0 000042F1 52 push dx ; segment 0 000042F2 50 push ax 0 000042F3 16 push ss 0 000042F4 07 pop es 0 000042F5 E8[0000] extcallcall unhack 0 000042F8 51 push cx 0 000042F9 E8[0000] extcallcall copy_single_counted_string 0 000042FC 59 pop cx 0 000042FD E8C703 call .mcbname 0 00004300 51 push cx 0 00004301 E8[0000] extcallcall putsline_crlf 0 00004304 59 pop cx 0 00004305 E8[0000] extcallcall handle_serial_flags_ctrl_c 0 00004308 E8[0000] extcallcall dohack 0 0000430B BF[0000] mov di, relocated(line_out) 342 <1> linkdatarelocation line_out 0 0000430E B8202D mov ax, " -" 0 00004311 AB stosw 0 00004312 B82D3E mov ax, "->" 0 00004315 AB stosw 0 00004316 B020 mov al, 32 0 00004318 AA stosb 349 <1> 0 00004319 5A pop dx 0 0000431A 58 pop ax ; (ax = segment) 0 0000431B EBAF jmp .loop_chain 353 <1> 354 <1> .end_chain: 0 0000431D 16 push ss 0 0000431E 07 pop es 0 0000431F 750A jnz @F 358 <1> .end_chain_string: 0 00004321 E8[0000] extcallcall unhack 0 00004324 51 push cx 0 00004325 E8[0000] extcallcall copy_single_counted_string 0 00004328 59 pop cx 0 00004329 EB03 jmp @FF 364 <1> @@: 0 0000432B E8[0000] extcallcall unhack 366 <1> @@: 0 0000432E E89603 call .mcbname 0 00004331 E8[0000] extcallcall putsline_crlf 369 <1> .86next: 0 00004334 5E pop si 0 00004335 59 pop cx 0 00004336 5B pop bx 0 00004337 C3 retn 374 <1> 375 <1> .toomany: 0 00004338 BE[0000] mov si, msg.di_toomany 377 <1> internaldatarelocation 0 0000433B EBE4 jmp .end_chain_string 379 <1> 380 <1> %if _PM 381 <1> .failed: 0 0000433D E8[0000] extcallcall unhack 0 00004340 5A pop dx ; discard a near return address 0 00004341 BA[0000] mov dx, gatewrong 385 <1> internaldatarelocation 0 00004344 B83401 mov ax, 0134h 0 00004347 E8[0000] extcallcall setrc 388 <1> %if ELD 389 <1> extcallcall putsz 390 <1> retn 391 <1> %else 0 0000434A E9[0000] 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 0000434D 57 push di 0 0000434E 51 push cx 0 0000434F 53 push bx 0 00004350 92 xchg ax, dx ; dx = segment 444 <1> 0 00004351 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 446 <1> linkdatarelocation auxbuff_segorsel 0 00004356 31FF xor di, di ; -> auxbuff 0 00004358 AB stosw ; store offset 0 00004359 92 xchg ax, dx ; dx = offset 0 0000435A AB stosw ; store segment 0 0000435B 92 xchg ax, dx ; dx = segment 0 0000435C 93 xchg bx, ax ; bx = offset 0 0000435D B80003 mov ax, 300h ; flag for IVT | unused 0 00004360 AB stosw ; which multiplex number 0 00004361 31C0 xor ax, ax 0 00004363 AB stosw ; which int list entry = none = 0 457 <1> 458 <1> .loop_ivt_chain: 0 00004364 E8B102 call check_int_chain 0 00004367 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 00004369 363B3E[0000] cmp di, word [ss:relocated(auxbuff_current_size_minus_24)] 466 <1> linkdatarelocation auxbuff_current_size_minus_24 467 <1> %endif 0 0000436E 773A ja .error 0 00004370 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 470 <1> linkdatarelocation auxbuff_segorsel 0 00004375 AB stosw ; store offset 0 00004376 92 xchg ax, dx 0 00004377 AB stosw ; store segment 0 00004378 92 xchg ax, dx 0 00004379 93 xchg bx, ax 0 0000437A B80002 mov ax, 200h ; flag for unused 0 0000437D AB stosw ; found in chain = 200h 0 0000437E 31C0 xor ax, ax 0 00004380 AB stosw 0 00004381 EBE1 jmp .loop_ivt_chain 481 <1> 482 <1> .end_ivt_chain: 0 00004383 B8FFFF mov ax, -1 0 00004386 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 485 <1> linkdatarelocation auxbuff_segorsel 0 0000438B B90800 mov cx, 8 0 0000438E F3AB rep stosw ; terminator is all-ones 488 <1> ; (two terminators actually) 489 <1> 0 00004390 B02D mov al, 2Dh 0 00004392 E8[0000] extcallcall intchk ; ZR if offset = -1 or segment = 0 492 <1> ; CHG: ax, dx, bx 0 00004395 7412 jz .done 494 <1> 0 00004397 31C0 xor ax, ax 496 <1> .loopplex: 0 00004399 B000 mov al, 00h ; AMIS installation check 498 <1> ; function 0 changes dx, di, cx, al 499 <1> %if _PM 0 0000439B E8[0000] extcallcall call_int2D 501 <1> %else 502 <1> int 2Dh ; enquire whether there's anyone 503 <1> ; but we don't care who it might be 504 <1> %endif 0 0000439E FEC0 inc al ; = FFh ? 0 000043A0 7503E91101 jz .search ; yes, it is in use --> 507 <1> .nextplex: 0 000043A5 FEC4 inc ah 0 000043A7 75F0 jnz .loopplex ; try next multiplexer --> 510 <1> 511 <1> .done: 0 000043A9 A8 db __TEST_IMM8 ; (NC) 513 <1> .error: 0 000043AA F9 stc 515 <1> 0 000043AB 5B pop bx 0 000043AC 59 pop cx 0 000043AD 5F pop di 0 000043AE 16 push ss 0 000043AF 1F pop ds 0 000043B0 16 push ss 0 000043B1 07 pop es 523 <1> 0 000043B2 BE[0000] mov si, msg.di_error 525 <1> internaldatarelocation 0 000043B5 7303E9B900 jc .error_string 527 <1> 0 000043BA 31F6 xor si, si 529 <1> 530 <1> .loop_chain: 0 000043BC 8E1E[0000] mov ds, word [relocated(auxbuff_segorsel)] 532 <1> linkdatarelocation auxbuff_segorsel 0 000043C0 AD lodsw 0 000043C1 92 xchg ax, dx 0 000043C2 AD lodsw 0 000043C3 833CFF cmp word [si], -1 0 000043C6 8D7404 lea si, [si + 4] 0 000043C9 747A je .next_seq 539 <1> 540 <1> .next_chain: 0 000043CB 16 push ss 0 000043CC 1F pop ds 543 <1> 0 000043CD 50 push ax ; segment 0 000043CE 52 push dx 546 <1> 0 000043CF 16 push ss 0 000043D0 07 pop es 0 000043D1 E8[0000] extcallcall hexword 0 000043D4 B03A mov al, ':' 0 000043D6 AA stosb 0 000043D7 89D0 mov ax, dx 0 000043D9 E8[0000] extcallcall hexword 554 <1> 0 000043DC 5B pop bx 0 000043DD 5A pop dx ; segment 557 <1> 0 000043DE 8916[0200] mov word [intaddress + 2], dx 559 <1> internaldatarelocation 0 000043E2 891E[0000] mov word [intaddress], bx 561 <1> internaldatarelocation 562 <1> 0 000043E6 56 push si 0 000043E7 E82E02 call check_int_chain 0 000043EA 722E jc .end_chain 566 <1> 0 000043EC 16 push ss 0 000043ED 07 pop es 0 000043EE E8[0000] extcallcall unhack 0 000043F1 51 push cx 0 000043F2 E8[0000] extcallcall copy_single_counted_string 0 000043F5 59 pop cx 0 000043F6 5E pop si 0 000043F7 E88B00 call .mpx 0 000043FA 56 push si 0 000043FB E8C902 call gateout.mcbname 0 000043FE 51 push cx 0 000043FF E8[0000] extcallcall putsline_crlf 0 00004402 59 pop cx 0 00004403 E8[0000] extcallcall handle_serial_flags_ctrl_c 0 00004406 E8[0000] extcallcall dohack 0 00004409 BF[0000] mov di, relocated(line_out) 583 <1> linkdatarelocation line_out 0 0000440C B8202D mov ax, " -" 0 0000440F AB stosw 0 00004410 B82D3E mov ax, "->" 0 00004413 AB stosw 0 00004414 B020 mov al, 32 0 00004416 AA stosb 590 <1> 0 00004417 5E pop si 0 00004418 EBA2 jmp .loop_chain 593 <1> 594 <1> .end_chain: 0 0000441A 16 push ss 0 0000441B 07 pop es 0 0000441C 750A jnz @F 0 0000441E E8[0000] extcallcall unhack 0 00004421 51 push cx 0 00004422 E8[0000] extcallcall copy_single_counted_string 0 00004425 59 pop cx 0 00004426 EB03 jmp @FF 603 <1> @@: 0 00004428 E8[0000] extcallcall unhack 605 <1> @@: 0 0000442B 5E pop si 0 0000442C E85600 call .mpx 0 0000442F 56 push si 0 00004430 E89402 call gateout.mcbname 0 00004433 51 push cx 0 00004434 E8[0000] extcallcall putsline_crlf 0 00004437 59 pop cx 0 00004438 BF[0000] mov di, relocated(line_out) 614 <1> linkdatarelocation line_out 0 0000443B E8[0000] extcallcall handle_serial_flags_ctrl_c 0 0000443E E8[0000] extcallcall dohack 0 00004441 5E pop si 0 00004442 E977FF jmp .loop_chain 619 <1> 620 <1> .next_seq: 0 00004445 AD lodsw 0 00004446 92 xchg ax, dx 0 00004447 AD lodsw 0 00004448 833CFF cmp word [si], -1 0 0000444B 8D7404 lea si, [si + 4] 0 0000444E 741A je @F 627 <1> 0 00004450 16 push ss 0 00004451 1F pop ds 0 00004452 16 push ss 0 00004453 07 pop es 0 00004454 E8[0000] extcallcall unhack 0 00004457 51 push cx 0 00004458 56 push si 0 00004459 BE[0000] mov si, msg.di_hidden 636 <1> internaldatarelocation 0 0000445C E8[0000] extcallcall copy_single_counted_string 0 0000445F 5E pop si 0 00004460 59 pop cx 0 00004461 E8[0000] extcallcall handle_serial_flags_ctrl_c 0 00004464 E8[0000] extcallcall dohack 642 <1> 0 00004467 E961FF jmp .next_chain 644 <1> 645 <1> @@: 0 0000446A 16 push ss 0 0000446B 1F pop ds 0 0000446C 16 push ss 0 0000446D 07 pop es 0 0000446E E8[0000] extcallcall unhack 0 00004471 EB0F jmp @F 652 <1> 653 <1> 654 <1> .error_string: 0 00004473 E8[0000] extcallcall copy_single_counted_string 656 <1> 0 00004476 E8[0000] extcallcall unhack 0 00004479 E8[0000] extcallcall putsline_crlf 0 0000447C B83301 mov ax, 0133h 0 0000447F 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 00004482 E9AFFE jmp gateout.86next 669 <1> 670 <1> 671 <1> .mpx: 0 00004485 8E06[0000] mov es, word [relocated(auxbuff_segorsel)] 673 <1> linkdatarelocation auxbuff_segorsel 0 00004489 268B44FC mov ax, word [es:si - 4] 0 0000448D 268B54FE mov dx, word [es:si - 2] 0 00004491 16 push ss 0 00004492 07 pop es 0 00004493 F6C402 test ah, 2 0 00004496 751D jnz @F 0 00004498 56 push si 0 00004499 51 push cx 0 0000449A BE[0000] mov si, msg.di_multiplex.1 683 <1> internaldatarelocation 0 0000449D E8[0000] extcallcall copy_single_counted_string 0 000044A0 E8[0000] extcallcall hexbyte 0 000044A3 BE[0000] mov si, msg.di_multiplex.2 687 <1> internaldatarelocation 0 000044A6 E8[0000] extcallcall copy_single_counted_string 0 000044A9 92 xchg ax, dx 0 000044AA E8[0000] extcallcall hexword 0 000044AD BE[0000] mov si, msg.di_multiplex.3 692 <1> internaldatarelocation 0 000044B0 E8[0000] extcallcall copy_single_counted_string 0 000044B3 59 pop cx 0 000044B4 5E pop si 696 <1> @@: 0 000044B5 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 000044B6 B004 mov al, 04h 0 000044B8 5B pop bx 0 000044B9 53 push bx ; low byte is the interrupt number 707 <1> ; function 4 changes dx, bx, al 708 <1> %if _PM 0 000044BA E8[0000] extcallcall call_int2D 710 <1> %else 711 <1> int 2Dh 712 <1> %endif 0 000044BD 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 000044BF 743D je .search_dxbx 0 000044C1 3C04 cmp al, 04h ; returned list of hooked interrupts ? 0 000044C3 7403E9DDFE jne .nextplex ; no, try next multiplexer --> 0 000044C8 89DF mov di, bx 0 000044CA 5B pop bx 0 000044CB 53 push bx ; bl = interrupt number 0 000044CC 31C9 xor cx, cx ; = index into list 0 000044CE 88D8 mov al, bl 725 <1> .search_intlist_seg: 726 <1> %if _PM 0 000044D0 E8[0000] extcallcall setes2dx 728 <1> %else 729 <1> mov es, dx ; es:di-> list 730 <1> %endif 731 <1> .search_intlist: ; Search the returned list for the required interrupt number. 0 000044D3 AE scasb ; our interrupt number ? 0 000044D4 740E je .search_found_intlist 0 000044D6 26807DFF2D cmp byte [es:di-1], 2Dh ; was last in list ? 0 000044DB 7503E9C5FE je .nextplex 0 000044E0 AF scasw ; skip pointer 0 000044E1 41 inc cx 0 000044E2 EBEF jmp short .search_intlist ; try next entry --> 739 <1> 740 <1> .search_found_intlist: 0 000044E4 268B1D mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 0 000044E7 AF scasw ; skip pointer 0 000044E8 52 push dx ; preserve dx for .search_intlist_seg 0 000044E9 57 push di 0 000044EA E82200 call .add 0 000044ED 5F pop di 0 000044EE 5A pop dx 0 000044EF 7303E9B6FE 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 000044F4 3C2D cmp al, 2Dh ; was last in list ? 0 000044F6 7503E9AAFE je .nextplex 0 000044FB 41 inc cx 0 000044FC EBD2 jmp short .search_intlist_seg 758 <1> 759 <1> .search_dxbx: 760 <1> %if _PM 0 000044FE E8[0000] extcallcall setes2dx 762 <1> %else 763 <1> 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 00004501 B9FFFF mov cx, -1 ; indicator for return = 3 (no list) 0 00004504 E80800 call .add 0 00004507 7303E99EFE jc .error 771 <1> ; jne .nextplex ; didn't find our entry in the chain --> 0 0000450C E996FE jmp .nextplex 773 <1> 774 <1> 775 <1> int_list.add: 0 0000450F 31FF xor di, di ; start at beginning of buffer 0 00004511 368E1E[0000] mov ds, word [ss:relocated(auxbuff_segorsel)] 778 <1> linkdatarelocation auxbuff_segorsel 779 <1> ; ds => auxbuff 0 00004516 BEFFFF mov si, -1 ; check all 0 00004519 E8D900 call .check ; check for match 0 0000451C 7516 jne @F ; not matched, di -> second terminator 0 0000451E F6450502 testopt [di + 4], 200h ; not yet claimed by a multiplexer ? 0 00004522 7503E9CC00 jz .error ; no, error --> 0 00004527 886504 mov byte [di + 4], ah ; store the multiplex number 0 0000452A 806505FD clropt [di + 4], 200h ; indicate it is claimed 0 0000452E 894D06 mov word [di + 6], cx ; = how many list entries before ours, 788 <1> ; or = -1 if not from a list 0 00004531 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 00004534 363B3E[0000] cmp di, word [ss:relocated(auxbuff_current_size_minus_24)] 797 <1> linkdatarelocation auxbuff_current_size_minus_24 798 <1> %endif 0 00004539 7603E9B500 ja .error 0 0000453E 8D75F8 lea si, [di - 8] ; check up to this point later 801 <1> ; si -> first of two terminators 802 <1> 0 00004541 93 xchg ax, bx 0 00004542 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 805 <1> linkdatarelocation auxbuff_segorsel 806 <1> ; => auxbuff 0 00004547 AB stosw ; store offset 0 00004548 92 xchg ax, dx ; dx = offset 0 00004549 AB stosw ; store segment 0 0000454A 92 xchg ax, dx ; dx = segment 0 0000454B 93 xchg ax, bx ; dx:bx = vector -> handler 0 0000454C 50 push ax 0 0000454D B000 mov al, 0 ; flags = 0 (claimed, not IVT) 0 0000454F 86C4 xchg al, ah 0 00004551 AB stosw ; which multiplex number 0 00004552 89C8 mov ax, cx 0 00004554 AB stosw ; which int list entry 0 00004555 58 pop ax ; preserve multiplex number 819 <1> 820 <1> .loop_chain: 0 00004556 50 push ax 0 00004557 56 push si 0 00004558 E8BD00 call check_int_chain ; does it go on ? 0 0000455B 5E pop si 0 0000455C 5B pop bx 0 0000455D 7303 jnc @F ; for _LINK compat 0 0000455F 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 00004562 363B3E[0000] cmp di, word [ss:relocated(auxbuff_current_size_minus_24)] 834 <1> linkdatarelocation auxbuff_current_size_minus_24 835 <1> %endif 0 00004567 7603E98700 ja .error 0 0000456C 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 838 <1> linkdatarelocation auxbuff_segorsel 0 00004571 AB stosw ; store offset 0 00004572 92 xchg ax, dx 0 00004573 AB stosw ; store segment 0 00004574 92 xchg ax, dx 0 00004575 93 xchg bx, ax ; ah = multiplex number, bx = offset 0 00004576 50 push ax 0 00004577 B80002 mov ax, 200h 0 0000457A AB stosw ; found in chain = 200h (unclaimed) 0 0000457B 31C0 xor ax, ax 0 0000457D AB stosw 0 0000457E 58 pop ax 0 0000457F 57 push di 0 00004580 31FF xor di, di ; start at beginning 0 00004582 E87000 call .check ; already listed in another chain ? 0 00004585 7403 je @F 0 00004587 5F pop di 0 00004588 EBCC jmp .loop_chain ; no, try to walk downlink --> 856 <1> 857 <1> @@: 0 0000458A 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 0000458B F6450501 testopt [di + 4], 100h ; is it from the IVT ? (very first entry) 0 0000458F 7562 jnz .error ; yes, error --> 0 00004591 837DFCFF cmp word [di - 8 + 4], -1 ; is it the start of a hidden chain ? 0 00004595 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 00004597 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 0000459A FF7706 push word [bx + 6] 0 0000459D FF7704 push word [bx + 4] 0 000045A0 FF7702 push word [bx + 2] 0 000045A3 FF37 push word [bx] ; get the last entry 0 000045A5 57 push di 0 000045A6 56 push si 0 000045A7 51 push cx ; preserve interrupt list index 0 000045A8 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 897 <1> linkdatarelocation auxbuff_segorsel 0 000045AD 89F9 mov cx, di ; = where to insert 899 <1> ; -> first to displace 0 000045AF F7D9 neg cx 0 000045B1 89DE mov si, bx ; -> after end of source 0 000045B3 8D7F08 lea di, [bx + 8] ; -> after end of dest 0 000045B6 01F1 add cx, si ; after end of source - first to displace 904 <1> ; = how many bytes to displace 0 000045B8 D1E9 shr cx, 1 0 000045BA FD std ; _AMD_ERRATUM_109_WORKAROUND as below 0 000045BB 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 000045BC E308 jcxz @FF 0 000045BE 83F914 cmp cx, 20 0 000045C1 7703 ja @FF 916 <1> @@: 0 000045C3 A5 movsw 0 000045C4 E2FD loop @B 919 <1> @@: 920 <1> %endif 0 000045C6 F3A5 rep movsw ; relocate up the following entries 922 <1> ; by 8 bytes (size of 1 entry) 0 000045C8 FC cld 0 000045C9 59 pop cx 0 000045CA 5E pop si 0 000045CB 5F pop di 0 000045CC 8F05 pop word [di] 0 000045CE 8F4502 pop word [di + 2] 0 000045D1 8F4504 pop word [di + 4] 0 000045D4 8F4506 pop word [di + 6] ; insert moved entry 0 000045D7 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 000045DA 39DE cmp si, bx ; if last to move != terminator 0 000045DC 75BC jne .insert ; then move another -> 0 000045DE 89F7 mov di, si ; -> where to put double terminator 941 <1> 0 000045E0 93 xchg ax, bx 943 <1> .end_chain: 0 000045E1 53 push bx 0 000045E2 51 push cx ; preserve interrupt list index 0 000045E3 B8FFFF mov ax, -1 0 000045E6 368E06[0000] mov es, word [ss:relocated(auxbuff_segorsel)] 948 <1> linkdatarelocation auxbuff_segorsel 0 000045EB B90800 mov cx, 8 0 000045EE F3AB rep stosw ; terminator is all-ones 951 <1> ; (two terminators actually) 0 000045F0 59 pop cx 0 000045F1 58 pop ax ; preserve multiplex number 954 <1> 955 <1> .done: 0 000045F2 A8 db __TEST_IMM8 ; (NC) 957 <1> .error: 0 000045F3 F9 stc 959 <1> 0 000045F4 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 000045F5 391D cmp word [di + 0], bx 0 000045F7 7506 jne .mismatch 0 000045F9 395502 cmp word [di + 2], dx 0 000045FC 7501 jne .mismatch 980 <1> .match: 0 000045FE C3 retn ; (ZR) 982 <1> 983 <1> .mismatch: 0 000045FF 83C708 add di, 8 985 <1> 0 00004602 39F7 cmp di, si 0 00004604 730F jae .checkret 988 <1> 0 00004606 837D04FF cmp word [di + 4], -1 0 0000460A 75E9 jne .check 991 <1> 0 0000460C 83C708 add di, 8 0 0000460F 837D04FF cmp word [di + 4], -1 0 00004613 75E0 jne .check 995 <1> .checkret: 0 00004615 85FF test di, di ; (NZ) 0 00004617 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 0 00004618 E8[0000] extcallcall setes2dx 1013 <1> %else 1014 <1> mov es, dx ; es:bx -> entrypoint 1015 <1> %endif 0 0000461B E8[0000] extcallcall IsIISPEntry? 0 0000461E 7531 jnz .not_iisp 1018 <1> 0 00004620 26FF7704 push word [es:bx + ieNext + 2] 0 00004624 26FF7702 push word [es:bx + ieNext] 1021 <1> 0 00004628 BE[0000] mov si, msg.di_uninst_iisp 1023 <1> internaldatarelocation 0 0000462B 26813F90EA cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 0 00004630 7414 je @F 0 00004632 BE[0000] mov si, msg.di_iisp 1027 <1> internaldatarelocation 0 00004635 26807F09EB cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ? 0 0000463A 7507 jne .nonstd 0 0000463C 26813FEB10 cmp word [ es:bx + ieEntry ], 010EBh ; jmp short $+18 ? 0 00004641 7403 je @F 1032 <1> .nonstd: 0 00004643 BE[0000] mov si, msg.di_nonstd_iisp 1034 <1> internaldatarelocation 1035 <1> @@: 0 00004646 58 pop ax 0 00004647 5A pop dx ; segment 1038 <1> 0 00004648 50 push ax 0 00004649 21D0 and ax, dx 0 0000464B 40 inc ax 0 0000464C 58 pop ax 0 0000464D 7476 jz .CY 1044 <1> 0 0000464F F8 clc 0 00004650 C3 retn 1047 <1> 1048 <1> 1049 <1> .not_iisp: 0 00004651 83FBF8 cmp bx, -8 0 00004654 771A ja .not_fd 0 00004656 26803FE8 cmp byte [es:bx], 0E8h 0 0000465A 7514 jne .not_fd 0 0000465C 26807F03EA cmp byte [es:bx + 3], 0EAh 0 00004661 750D jne .not_fd 0 00004663 26FF7706 push word [es:bx + 4 + 2] 0 00004667 26FF7704 push word [es:bx + 4] 0 0000466B BE[0000] mov si, msg.di_freedos_reloc 1059 <1> internaldatarelocation 0 0000466E EBD6 jmp @B 1061 <1> 1062 <1> .not_fd: 0 00004670 83FBFB cmp bx, -5 0 00004673 7713 ja .not_jmpfar 0 00004675 BE[0000] mov si, msg.di_jmpfar 1066 <1> internaldatarelocation 0 00004678 26803FEA cmp byte [es:bx], 0EAh 0 0000467C 750A jne .not_jmpfar 0 0000467E 26FF7703 push word [es:bx + 1 + 2] 0 00004682 26FF7701 push word [es:bx + 1] 0 00004686 EBBE jmp @B 1072 <1> 1073 <1> .not_jmpfar: 0 00004688 BE[0000] mov si, msg.di_jmpfarindirect 1075 <1> internaldatarelocation 0 0000468B 26803FEB cmp byte [es:bx], 0EBh 0 0000468F 750D jne .not_testhook_try_jmpfarindirect 0 00004691 BE[0000] mov si, msg.di_testhook 1079 <1> internaldatarelocation 0 00004694 268A4701 mov al, byte [es:bx + 1] 0 00004698 98 cbw 0 00004699 83C002 add ax, 2 0 0000469C 01C3 add bx, ax 1084 <1> .not_testhook_try_jmpfarindirect: 0 0000469E 83FBFA cmp bx, -6 0 000046A1 7720 ja .not_testhook_or_jmpfarindirect 0 000046A3 26813F2EFF cmp word [es:bx], 0FF2Eh 0 000046A8 7519 jne .not_testhook_or_jmpfarindirect 0 000046AA 26807F022E cmp byte [es:bx + 2], 2Eh 0 000046AF 7512 jne .not_testhook_or_jmpfarindirect 0 000046B1 268B5F03 mov bx, word [es:bx + 3] 0 000046B5 83FBFC cmp bx, -4 0 000046B8 7709 ja .not_testhook_or_jmpfarindirect 0 000046BA 26FF7702 push word [es:bx + 2] 0 000046BE 26FF37 push word [es:bx] 0 000046C1 EB83 jmp @B 1097 <1> 1098 <1> .not_testhook_or_jmpfarindirect: 0 000046C3 85E4 test sp, sp ; NZ 1100 <1> .CY: 0 000046C5 F9 stc 0 000046C6 C3 retn 1103 <1> 1104 <1> 1105 <1> gateout.mcbname: 1106 <1> %if !_LOADER 0 000046C7 F6C501 test ch, 1 0 000046CA 7503E99A00 jz .ret 0 000046CF 8B16[0000] mov dx, word [relocated(firstmcb)] 1110 <1> linkdatarelocation firstmcb 0 000046D3 83FAFF cmp dx, -1 0 000046D6 7503E98E00 je .ret 0 000046DB 51 push cx 0 000046DC A1[0000] mov ax, word [intaddress] 1115 <1> internaldatarelocation 0 000046DF B104 mov cl, 4 0 000046E1 D3E8 shr ax, cl 0 000046E3 0306[0200] add ax, word [intaddress + 2] ; => segment of handler 1119 <1> internaldatarelocation 0 000046E7 7251 jc .hma 1121 <1> .loop: 1122 <1> %if _PM 0 000046E9 E8[0000] extcallcall setes2dx 1124 <1> %else 1125 <1> mov es, dx 1126 <1> %endif 0 000046EC 89D1 mov cx, dx 0 000046EE 26030E0300 add cx, word [es:3] 0 000046F3 41 inc cx 0 000046F4 39D0 cmp ax, dx 0 000046F6 7247 jb .next 0 000046F8 39C8 cmp ax, cx 0 000046FA 7343 jae .next 0 000046FC 268B160100 mov dx, word [es:1] 0 00004701 BE[0000] mov si, msg.di_system_mcb 1136 <1> internaldatarelocation 0 00004704 83FA50 cmp dx, 50h 0 00004707 725A jb .copy 0 00004709 4A dec dx 1140 <1> %if _PM 0 0000470A E8[0000] extcallcall setes2dx 1142 <1> %else 1143 <1> mov es, dx 1144 <1> %endif 0 0000470D 06 push es 0 0000470E 1F pop ds 0 0000470F 16 push ss 0 00004710 07 pop es 0 00004711 B020 mov al, 32 0 00004713 AA stosb 0 00004714 89F8 mov ax, di 0 00004716 BE0800 mov si, 8 0 00004719 89F1 mov cx, si 0 0000471B 57 push di 0 0000471C F3A4 rep movsb 0 0000471E B000 mov al, 0 0 00004720 AA stosb ; append zero-value byte 0 00004721 5F pop di ; -> name in buffer 0 00004722 16 push ss 0 00004723 1F pop ds 1161 <1> @@: 0 00004724 AE scasb ; is it zero ? 0 00004725 75FD jne @B ; no, continue --> 1164 <1> ; first dec makes it -> at the zero 1165 <1> @@: 0 00004727 4F dec di 0 00004728 39F8 cmp ax, di 0 0000472A 7408 je .empty 0 0000472C 807DFF20 cmp byte [di - 1], 32 0 00004730 74F5 je @B 0 00004732 EB34 jmp .ret_cx 1172 <1> 1173 <1> .empty: 0 00004734 4F dec di 0 00004735 BE[0000] mov si, msg.di_empty 1176 <1> internaldatarelocation 0 00004738 EB29 jmp .copy 1178 <1> 1179 <1> .hma: 0 0000473A BE[0000] mov si, msg.di_hma 1181 <1> internaldatarelocation 0 0000473D EB24 jmp .copy 1183 <1> 1184 <1> .next: 0 0000473F 89CA mov dx, cx 0 00004741 3B16[0000] cmp dx, word [relocated(firstumcb)] 1187 <1> linkdatarelocation firstumcb 1188 <1> ; is next one the first UMCB ? 0 00004745 74A2 je .loop ; yes, ignore the "Z" (if any) --> 0 00004747 26803E00004D cmp byte [es:0], "M" ; check current signature 0 0000474D 749A je .loop ; if "M" then loop to next --> 1192 <1> 0 0000474F 8B36[0000] mov si, word [relocated(firstumcb)] 1194 <1> linkdatarelocation firstumcb 0 00004753 46 inc si 0 00004754 7503 jnz @F 0 00004756 BE00A0 mov si, 0A000h 1198 <1> @@: 0 00004759 39F0 cmp ax, si 0 0000475B BE[0000] mov si, msg.di_system_upper 1201 <1> internaldatarelocation 0 0000475E 7303 jae @F 0 00004760 BE[0000] mov si, msg.di_system_low 1204 <1> internaldatarelocation 1205 <1> @@: 1206 <1> .copy: 0 00004763 16 push ss 0 00004764 07 pop es 0 00004765 E8[0000] extcallcall copy_single_counted_string 1210 <1> .ret_cx: 0 00004768 59 pop cx 1212 <1> .ret: 1213 <1> %endif ; !_LOADER 0 00004769 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 0000476A E8[0000] extcallcall skipwhite 93 <1> %endif 0 0000476D 8B16[0000] mov dx, word [relocated(firstmcb)] 95 <1> linkdatarelocation firstmcb 0 00004771 E8[0000] extcallcall iseol? 0 00004774 740A je .lolmcb 0 00004776 E8[0000]EB02[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 0000477D E8[0000] extcallcall chkeol 118 <1> .lolmcb: 0 00004780 89D6 mov si, dx 0 00004782 BF[0000] mov di, relocated(line_out) 121 <1> linkdatarelocation line_out 0 00004785 B85053 mov ax, "PS" 0 00004788 AB stosw 0 00004789 B8503A mov ax, "P:" 0 0000478C AB stosw 0 0000478D B020 mov al, 32 0 0000478F AA stosb 0 00004790 A1[0000] mov ax, word [relocated(pspdbe)] 129 <1> linkdatarelocation pspdbe 0 00004793 E8[0000] extcallcall hexword 0 00004796 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 00004799 B14D mov cl, 'M' 164 <1> .next: 0 0000479B 83FEFF cmp si, byte -1 0 0000479E 7405 je .invmcb 0 000047A0 83FE50 cmp si, byte 50h 0 000047A3 7306 jae .valmcb 169 <1> .invmcb: 0 000047A5 BA[0000] mov dx, msg.invmcbadr 171 <1> internaldatarelocation 0 000047A8 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 000047AB BF[0000] mov di, relocated(line_out) 182 <1> linkdatarelocation line_out 0 000047AE 1E push ds 184 <1> %if _PM 0 000047AF E8D600 extcallcall setds2si 186 <1> %else 187 <1> mov ds, si 188 <1> %endif 0 000047B2 8A2E0000 mov ch, byte [0000] 0 000047B6 8B1E0100 mov bx, word [0001] 0 000047BA 8B160300 mov dx, word [0003] 192 <1> 0 000047BE 89F0 mov ax, si 0 000047C0 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 000047C3 B020 mov al, 32 0 000047C5 AA stosb 232 <1> %endif 0 000047C6 88E8 mov al, ch 0 000047C8 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 000047CB B020 mov al, 32 0 000047CD AA stosb 241 <1> %endif 0 000047CE 89D8 mov ax, bx 0 000047D0 E8[0000] extcallcall hexword ; MCB owner 244 <1> %if ELD 245 <1> mov ah, 1 246 <1> call stosb_repeated 247 <1> %else 0 000047D3 B020 mov al, 32 0 000047D5 AA stosb 250 <1> %endif 0 000047D6 89D0 mov ax, dx 0 000047D8 E8[0000] extcallcall hexword ; MCB size in paragraphs 253 <1> 0 000047DB B020 mov al, 32 0 000047DD AA stosb 0 000047DE 89D0 mov ax, dx ; ax = size in paragraphs 0 000047E0 53 push bx 0 000047E1 50 push ax 0 000047E2 52 push dx 0 000047E3 51 push cx 0 000047E4 31D2 xor dx, dx ; dx:ax = size in paragraphs 0 000047E6 B91000 mov cx, 16 ; cx = 16, multiplier (get size in bytes) 0 000047E9 BB0900 mov bx, 5+4 ; bx = 5+4, width 264 <1> 0 000047EC E8A900 extcallcall disp_dxax_times_cx_width_bx_size.store 0 000047EF 59 pop cx 0 000047F0 5A pop dx 0 000047F1 58 pop ax 0 000047F2 5B pop bx 270 <1> 0 000047F3 85DB test bx, bx 0 000047F5 7472 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 000047F7 B020 mov al, 32 0 000047F9 AA stosb 279 <1> %endif 0 000047FA 56 push si 0 000047FB 51 push cx 0 000047FC 52 push dx 283 <1> 0 000047FD 1E push ds 0 000047FE BE0800 mov si, 8 0 00004801 B90200 mov cx, 2 0 00004804 39F3 cmp bx, si ; is it a "system" MCB? (owner 0008h or 0007h) 0 00004806 7707 ja @F 0 00004808 803C53 cmp byte [si], "S" ; "S", "SD", "SC" ? 0 0000480B 7408 je .nextmcbchar ; yes, limit name to two characters --> 0 0000480D EB04 jmp .nextmcbchar_cx_si ; no, assume full name given 292 <1> @@: 0 0000480F 4B dec bx ; => owner block's MCB 294 <1> %if _PM 0 00004810 E87700 extcallcall setds2bx 296 <1> %else 297 <1> mov ds, bx 298 <1> %endif 299 <1> .nextmcbchar_cx_si: 0 00004813 89F1 mov cx, si ; = 8 301 <1> .nextmcbchar: ; copy name of owner MCB 0 00004815 AC lodsb 0 00004816 AA stosb 0 00004817 84C0 test al, al 0 00004819 E0FA loopnz .nextmcbchar ; was not NUL and more bytes left ? 0 0000481B 84C0 test al, al 0 0000481D 7501 jnz @F 0 0000481F 4F dec di 309 <1> @@: 0 00004820 1F pop ds 311 <1> 0 00004821 833E010008 cmp word [1], 8 0 00004826 753E jne .not_s_mcb 0 00004828 833E080053 cmp word [8], "S" ; S MCB ? 0 0000482D 7537 jne .not_s_mcb_check_sd 316 <1> 0 0000482F B82074 mov ax, " t" 0 00004832 AB stosw 0 00004833 B87970 mov ax, "yp" 0 00004836 AB stosw 0 00004837 B86520 mov ax, "e " 0 0000483A AB stosw 323 <1> 0 0000483B 31C0 xor ax, ax 0 0000483D A00A00 mov al, [10] 0 00004840 E8[0000] extcallcall hexbyte 327 <1> 0 00004843 16 push ss 0 00004844 1F pop ds 0 00004845 BE[0000] mov si, smcbtypes 331 <1> internaldatarelocation 332 <1> .s_mcb_loop: 0 00004848 833CFF cmp word [si], -1 0 0000484B 740E je .s_mcb_unknown 0 0000484D 3904 cmp word [si], ax 0 0000484F 7405 je .s_mcb_known 0 00004851 83C604 add si, 4 0 00004854 EBF2 jmp .s_mcb_loop 339 <1> 340 <1> .s_mcb_known: 0 00004856 8B7402 mov si, word [si + 2] 0 00004859 EB03 jmp .s_mcb_common 343 <1> 344 <1> .s_mcb_unknown: 0 0000485B BE[0000] mov si, smcbmsg_unknown 346 <1> internaldatarelocation 347 <1> .s_mcb_common: 0 0000485E B020 mov al, 32 349 <1> @@: 0 00004860 AA stosb 0 00004861 AC lodsb 0 00004862 84C0 test al, al 0 00004864 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 00004866 5A pop dx 0 00004867 59 pop cx 0 00004868 5E pop si 588 <1> .freemcb: 589 <1> 0 00004869 1F pop ds 0 0000486A 80FD4D cmp ch, 'M' 0 0000486D 7406 je .disp 0 0000486F 80FD5A cmp ch, 'Z' 0 00004872 7401 je .disp 595 <1> .ret: 0 00004874 C3 retn 597 <1> 598 <1> .disp: 0 00004875 88E9 mov cl, ch 0 00004877 52 push dx 0 00004878 51 push cx 0 00004879 E8[0000] extcallcall putsline_crlf ; destroys cx,dx,bx 0 0000487C 59 pop cx 0 0000487D 5A pop dx 0 0000487E 01D6 add si, dx 0 00004880 72F2 jc .ret ; over FFFFh, must be end of chain --> (hmm) 0 00004882 46 inc si 0 00004883 74EF jz .ret 0 00004885 E913FF 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 0 00004888 89F3 mov bx, si 1890 setds2bx: section_of_function 0 0000488A E8[0000] call ispm 0 0000488D 7505 jnz sd2s_ex 0 0000488F 89DA mov dx, bx 0 00004891 E8[0000] call setrmsegm 1895 sd2s_ex: 0 00004894 8EDB mov ds, bx 0 00004896 C3 retn 1898 %elif _EXTENSIONS 1899 setds2si: section_of_function 1900 mov bx, si 1901 setds2bx: section_of_function 1902 mov ds, bx 1903 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 00004897 A8 db __TEST_IMM8 ; (skip stc, NC) 1915 .store: section_of_function disp_dxax_times_cx_width_bx_size 0 00004898 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 00004899 5589E58D66F0 lenter 1926 lvar word, bit_0_is_store 0 0000489F 9C pushf 1928 lvar word, width 0 000048A0 53 push bx 0 000048A1 56 push si 0 000048A2 1E push ds 0 000048A3 51 push cx 0 000048A4 50 push ax 0 000048A5 52 push dx 0 000048A6 06 push es 0 000048A7 57 push di 1937 0 000048A8 16 push ss ; push cs 0 000048A9 1F pop ds 0 000048AA 16 push ss 0 000048AB 07 pop es 1942 0 000048AC E310 jcxz .use_si 1944 0 000048AE 52 push dx 0 000048AF F7E1 mul cx 0 000048B1 97 xchg ax, di 0 000048B2 87D6 xchg dx, si ; si:di = first mul 1949 0 000048B4 58 pop ax 0 000048B5 F7E1 mul cx 0 000048B7 01F0 add ax, si 0 000048B9 83D200 adc dx, 0 ; dx:ax = second mul + adj, dx:ax:di = mul 1954 0 000048BC EB05 jmp @F 1956 1957 .use_si: 0 000048BE 89C7 mov di, ax 0 000048C0 92 xchg ax, dx 0 000048C1 89F2 mov dx, si 1961 1962 @@: 0 000048C3 897EF0 mov word [bp + ?dividend], di 0 000048C6 8946F2 mov word [bp + ?dividend + 2], ax 0 000048C9 8956F4 mov word [bp + ?dividend + 4], dx 1966 1967 ; set up divisor for the unit prefixes 0 000048CC B90004 mov cx, 1024 ; 1000 here if SI units 0 000048CF F606[0100]10 testopt [options], use_si_units ; SI units ? 0 000048D4 7403 jz @F ; no --> 0 000048D6 B9E803 mov cx, 1000 ; yes, use 1000 1972 @@: 1973 0 000048D9 BE[0000] mov si, msg.prefixes ; -> first prefix (blank) 0 000048DC 31D2 xor dx, dx ; init remainder (not really needed) 1976 .loop: 0 000048DE 837EF400 cmp word [bp + ?dividend + 4], 0 0 000048E2 750D jnz .divide 0 000048E4 837EF200 cmp word [bp + ?dividend + 2], 0 0 000048E8 7507 jnz .divide 0 000048EA 817EF00008 cmp word [bp + ?dividend], 2048 1982 ; is dividend <= 2048 ? 0 000048EF 7614 jbe .end ; yes, end unit division loop --> 1984 .divide: 0 000048F1 46 inc si ; -> next prefix 1986 0 000048F2 31D2 xor dx, dx 0 000048F4 BF0600 mov di, 6 1989 .loop_divide: 0 000048F7 8B43EE mov ax, [bp + ?dividend - 2 + di] 0 000048FA F7F1 div cx 0 000048FC 8943EE mov word [bp + ?dividend - 2 + di], ax 0 000048FF 4F dec di 0 00004900 4F dec di 0 00004901 75F4 jnz .loop_divide 1996 ; dx = last remainder 0 00004903 EBD9 jmp .loop 1998 1999 .end: 2000 ; dx = last remainder 0 00004905 B80A00 mov ax, 10 ; ax = 10 0 00004908 F7E2 mul dx ; dx:ax = last remainder * 10 0 0000490A F7F1 div cx ; divide by unit multiplier, 2004 ; ax = 0..9 tenth digit 0 0000490C 92 xchg dx, ax ; dl = 0..9 tenth digit 2006 0 0000490D 8D7EFF lea di, [bp + ?buffer + ?buffer_size - 1] 0 00004910 FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 0 00004911 B042 mov al, "B" 0 00004913 AA stosb 0 00004914 AC lodsb ; al = prefix (blank or kMGT) 0 00004915 3C20 cmp al, 32 ; unit is Bytes ? 0 00004917 7416 je @FF ; yes, skip past unit handling --> 2014 0 00004919 F606[0100]10 testopt [options], use_si_units 2016 ; SI units ? 0 0000491E 750E jnz @F ; yes --> 0 00004920 24DF and al, ~20h ; uppercase, don't do this if SI units 0 00004922 F606[0100]20 testopt [options], use_jedec_units 2020 ; JEDEC units ? 0 00004927 7505 jnz @F ; yes --> 0 00004929 50 push ax 0 0000492A B069 mov al, "i" 0 0000492C AA stosb ; don't store this if SI or JEDEC units 0 0000492D 58 pop ax ; preserve unit prefix 2026 @@: 0 0000492E AA stosb ; store prefix letter 2028 @@: 0 0000492F 3C20 cmp al, 32 ; unit is Bytes ? 0 00004931 B020 mov al, 32 0 00004933 AA stosb ; (store a blank) 0 00004934 8B46F0 mov ax, word [bp + ?dividend] 2033 ; (ax = dividend, <= 2048) 0 00004937 740D je @F ; yes, no tenth digit to display --> 0 00004939 83F864 cmp ax, 100 ; displaying above-or-equal 100 ? 0 0000493C 7308 jae @F ; yes, display no tenth digit --> 0 0000493E 92 xchg ax, dx ; al = tenth digit 0 0000493F 0430 add al, '0' ; make it text 0 00004941 AA stosb ; store fractional digit 0 00004942 B02E mov al, '.' 0 00004944 AA stosb ; store decimal point 0 00004945 92 xchg ax, dx ; get back ax = dividend 2043 @@: 0 00004946 B90A00 mov cx, 10 2045 .loop_write: 0 00004949 31D2 xor dx, dx 0 0000494B F7F1 div cx 0 0000494D 92 xchg ax, dx 2049 ; ax = remainder (next digit) 2050 ; dx = result of div 0 0000494E 0430 add al, '0' 0 00004950 AA stosb 0 00004951 92 xchg ax, dx ; ax = result of div 0 00004952 85C0 test ax, ax ; any more ? 0 00004954 75F3 jnz .loop_write ; loop --> 2056 0 00004956 FC cld 2058 0 00004957 47 inc di ; -> first digit 0 00004958 8D5E00 lea bx, [bp + ?buffer + ?buffer_size] 2061 ; -> behind 'B' 0 0000495B 29FB sub bx, di ; = length of string 0 0000495D 89FE mov si, di 2064 0 0000495F 5F pop di 0 00004960 07 pop es ; restore es:di 2067 ; -> where to store (if storing) 2068 0 00004961 8B4EEC mov cx, [bp + ?width] 0 00004964 29D9 sub cx, bx 0 00004966 760F jbe .none_blank 0 00004968 B020 mov al, 32 0 0000496A F646EE01 test byte [bp + ?bit_0_is_store], 1 0 0000496E 7505 jnz @F 2075 .loop_blank_disp: 0 00004970 E8[0000] nearcall disp_al 0 00004973 E2FB loop .loop_blank_disp 2078 ; now cx = 0 so the rep stosb is a nop 2079 @@: 0 00004975 F3AA rep stosb 2081 .none_blank: 2082 2083 0 00004977 89D9 mov cx, bx 0 00004979 F646EE01 test byte [bp + ?bit_0_is_store], 1 0 0000497D 7506 jnz @F 2087 2088 ; ! note ss = ds 0 0000497F 89F2 mov dx, si ; ds:dx -> string 0 00004981 E8[0000] call disp_message_length_cx 0 00004984 A9 db __TEST_IMM16 ; (skip rep movsb) 2092 @@: 2093 ; ! note ss = ds 2094 ; ds:si -> string, cx = length 0 00004985 F3A4 rep movsb 2096 0 00004987 5A pop dx 0 00004988 58 pop ax 0 00004989 59 pop cx 0 0000498A 1F pop ds 0 0000498B 5E pop si 0 0000498C 5B pop bx 0 0000498D 89EC5D lleave 0 00004990 C3 lret 2105 2106 %if _DT 2107 ; DT command 2108 dumptable: 0 00004991 E8[0000] call skipcomma 0 00004994 31DB xor bx, bx 0 00004996 E8[0000] call capitalise 0 00004999 3C54 cmp al, 'T' 0 0000499B 7504 jne @F 0 0000499D E8[0000] call skipcomma 0 000049A0 43 inc bx 2116 @@: 0 000049A1 53 push bx 0 000049A2 E8[0000] call iseol? 0 000049A5 742B je .table 0 000049A7 E8[0000]EB02[0000] nearcall getdword 0 000049AE E8[0000] call chkeol 0 000049B1 5E pop si 2123 .loopsingle: 0 000049B2 53 push bx 0 000049B3 52 push dx 0 000049B4 92 xchg ax, dx 0 000049B5 B4FF mov ah, -1 0 000049B7 E84700 call .item 0 000049BA 5A pop dx 0 000049BB 5B pop bx 0 000049BC E89D00 call .blank 0 000049BF 88F2 mov dl, dh 0 000049C1 88DE mov dh, bl 0 000049C3 88FB mov bl, bh 0 000049C5 B700 mov bh, 0 0 000049C7 84DB test bl, bl 0 000049C9 75E7 jnz .loopsingle 0 000049CB 85D2 test dx, dx 0 000049CD 75E3 jnz .loopsingle 0 000049CF E9[0000] jmp trimputs 2141 2142 2143 .table: 0 000049D2 BE[0000] mov si, msg.tableheader 0 000049D5 85DB test bx, bx 0 000049D7 7403 jz @F 0 000049D9 BE[0000] mov si, msg.tableheadertop 2148 @@: 0 000049DC E8[0000] call copy_single_counted_string 0 000049DF 5E pop si 0 000049E0 B000 mov al, 0 ; low nybble is base, high nybble column 2152 2153 .line: 0 000049E2 85F6 test si, si 0 000049E4 7402 jz @F 0 000049E6 0C80 or al, 128 2157 @@: 0 000049E8 B408 mov ah, 8 ; reset items per row 2159 .column: 0 000049EA E81400 call .item 2161 0 000049ED 0410 add al, 16 ; next column is 16 codepoints higher 0 000049EF FECC dec ah ; more columns to go ? 0 000049F1 75F7 jnz .column ; yes --> 2165 0 000049F3 50 push ax 0 000049F4 E8[0000] call trimputs ; display 0 000049F7 BF[0000] mov di, line_out 0 000049FA 58 pop ax 2170 0 000049FB 40 inc ax ; increment base (low nybble) 0 000049FC 240F and al, 15 ; test low nybble 0 000049FE 75E2 jnz .line ; loop if not yet overflowed --> 2174 0 00004A00 C3 retn 2176 2177 2178 .item: 0 00004A01 B90300 mov cx, 3 ; width = 3 columns 0 00004A04 31D2 xor dx, dx 0 00004A06 50 push ax 0 00004A07 B400 mov ah, 0 ; dx:ax = number 0 00004A09 E8[0000] call dec_dword_minwidth ; decimal 0 00004A0C 57 push di 0 00004A0D 29CF sub di, cx ; -> start of decimal number written 0 00004A0F 49 dec cx 0 00004A10 B030 mov al, '0' ; ASCII zero 2188 @@: 0 00004A12 AE scasb ; a leading zero ? 0 00004A13 7506 jne @F ; no --> 0 00004A15 C645FF20 mov byte [di - 1], 32 ; replace by blank 0 00004A19 E2F7 loop @B ; check for another leading zero --> 2193 @@: 0 00004A1B 5F pop di ; restore -> after decimal number written 0 00004A1C 58 pop ax 0 00004A1D E83C00 call .blank 0 00004A20 E8[0000] call hexbyte ; hexadecimal 0 00004A23 E83600 call .blank 0 00004A26 88C3 mov bl, al ; = index 0 00004A28 3C20 cmp al, 32 0 00004A2A 720E jb .named 2202 0 00004A2C B320 mov bl, (asciitablenames.del - asciitablenames.) / 3 2204 ; point to DEL entry 0 00004A2E 3C7F cmp al, 127 0 00004A30 7408 je .named 0 00004A32 B321 mov bl, (asciitablenames.top - asciitablenames.) / 3 2208 ; point to top entry 0 00004A34 7218 jb .printable 0 00004A36 85F6 test si, si 0 00004A38 7514 jnz .printable 2212 .named: 0 00004A3A B700 mov bh, 0 ; bx = index 0 00004A3C 89DA mov dx, bx 0 00004A3E 01DB add bx, bx 0 00004A40 01D3 add bx, dx ; times 3 0 00004A42 81C3[4200] add bx, asciitablenames ; -> padded 3-byte text 0 00004A46 87F3 xchg si, bx 0 00004A48 A5 movsw 0 00004A49 A4 movsb 0 00004A4A 87DE xchg bx, si 0 00004A4C EB07 jmp @F 2223 .printable: 0 00004A4E E81000 call .quote 0 00004A51 AA stosb 0 00004A52 E80C00 call .quote 2227 @@: 0 00004A55 E80400 call .blank 0 00004A58 3C50 cmp al, 80 0 00004A5A 7214 jb @F 2231 2232 .blank: 0 00004A5C 50 push ax 0 00004A5D B020 mov al, 32 0 00004A5F EB0D jmp .retstosb 2236 2237 .quote: 0 00004A61 85C0 test ax, ax 0 00004A63 790B jns @F 0 00004A65 50 push ax 0 00004A66 3C27 cmp al, "'" 0 00004A68 B027 mov al, "'" 0 00004A6A 7502 jne .retstosb 0 00004A6C B022 mov al, '"' 2245 .retstosb: 0 00004A6E AA stosb 0 00004A6F 58 pop ax 2248 @@: 0 00004A70 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 00001976 4E554C .: asciitableentry NUL 0 00001979 534F48 asciitableentry SOH 0 0000197C 535458 asciitableentry STX 0 0000197F 455458 asciitableentry ETX 0 00001982 454F54 asciitableentry EOT 0 00001985 454E51 asciitableentry ENQ 0 00001988 41434B asciitableentry ACK 0 0000198B 42454C asciitableentry BEL 0 0000198E 425320 asciitableentry BS 0 00001991 544142 asciitableentry TAB 0 00001994 4C4620 asciitableentry LF 0 00001997 565420 asciitableentry VT 0 0000199A 464620 asciitableentry FF 0 0000199D 435220 asciitableentry CR 0 000019A0 534F20 asciitableentry SO 0 000019A3 534920 asciitableentry SI 0 000019A6 444C45 asciitableentry DLE 0 000019A9 444331 asciitableentry DC1 0 000019AC 444332 asciitableentry DC2 0 000019AF 444333 asciitableentry DC3 0 000019B2 444334 asciitableentry DC4 0 000019B5 4E414B asciitableentry NAK 0 000019B8 53594E asciitableentry SYN 0 000019BB 455442 asciitableentry ETB 0 000019BE 43414E asciitableentry CAN 0 000019C1 454D20 asciitableentry EM 0 000019C4 535542 asciitableentry SUB 0 000019C7 455343 asciitableentry ESC 0 000019CA 465320 asciitableentry FS 0 000019CD 475320 asciitableentry GS 0 000019D0 525320 asciitableentry RS 0 000019D3 555320 asciitableentry US 0 000019D6 44454C .del: asciitableentry DEL 2293 %if (.del - .) / 3 != 32 2294 %error Wrong table size 2295 %endif 0 000019D9 746F70 .top: asciitableentry top 2297 2298 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 2298 ------------------ note: usesection lDEBUG_CODE 2299 2300 %endif 2301 2302 ..@dd_access_end: === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 000019DC ???????? eldhSignature: resb 4 ; "ELD1" 0 000019E0 ?????? resb 3 ; reserved 0 000019E3 ?? resb 1 ; 26 (Ctrl-Z) 0 000019E4 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 000019E8 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000019EA ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000019EC ???????? eldhDataOffset: resd 1 0 000019F0 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000019F2 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000019F4 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000019F6 ???????? eldhReserved: resb 4 ; reserved 0 000019FA ???? 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 000019FC ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00001A00 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00001A04 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00001A08 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 000019DC ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 000019E4 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 000019E8 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000019EA ???? 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 000019DC ???? 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 000019DE ???? eldltAmount: resw 1 0 000019E0 ???????? 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 000019DC ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 000019DE ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 000019E0 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 000019E2 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 000019E4 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000019EC ???? 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 000019DC ???? eldlSignature: resw 1 ; 0E1D1h 0 000019DE ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 000019E0 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 000019E2 ???? eldlUseLinkHash: resw 1 0 000019E4 ???? eldlDataAmount: resw 1 0 000019E6 ???? eldlDataPrefixes: resw 1 0 000019E8 ???? eldlDataEntries: resw 1 0 000019EA ???? eldlDataAddresses: resw 1 0 000019EC ???? eldlCodeAmount: resw 1 0 000019EE ???? eldlCodePrefixes: resw 1 0 000019F0 ???? eldlCodeEntries: resw 1 0 000019F2 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 000019F4 ???? eldlDualAmount: resw 1 0 000019F6 ???? eldlDualPrefixes: resw 1 0 000019F8 ???? eldlDualEntries: resw 1 0 000019FA ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 000019DC ???? ifKeyword: resw 1 0 000019DE ???? ifDescription: resw 1 0 000019E0 ???? ifOptions: resw 1 0 000019E2 ???? ifValue: resw 1 0 000019E4 ???? ifTrying: resw 1 0 000019E6 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 000019DC ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 000019E0 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 000019E4 ???? smName1: resw 1 ; -> first string part 0 000019E6 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 000019E8 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 000019EA ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 000019EC ???? smBaseNext: resw 1 0 000019EE ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 000019F0 ???? smSpecialNext: resw 1 0 000019F2 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 000019DC ?? ssLength: resb 1 ; how long this string is (only ssString) 0 000019DD ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 000019DE ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 000019DC ???? shHash: resw 1 ; hash value 0 000019DE ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 000019DC ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 000019E0 ???? xmsmSourceHandle: resw 1 0 000019E2 ???????? xmsmSourceAddress: resd 1 0 000019E6 ???? xmsmDestHandle: resw 1 0 000019E8 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 00004A71 E9[0000] jmp error 131 132 %if _EXTENSIONS 133 @@: 0 00004A74 E9[0000] jmp load_extension 135 %endif 136 137 ; E command - edit memory. 138 ee: 139 %if _EXTENSIONS 0 00004A77 4E dec si 0 00004A78 4E dec si 0 00004A79 BA[0000] mov dx, msg.ext 0 00004A7C E8[0000] call isstring? 0 00004A7F 74F3 je @B 0 00004A81 46 inc si 0 00004A82 AC lodsb 147 %endif 0 00004A83 E8[0000] call prephack 0 00004A86 E8[0000] call iseol? 0 00004A89 750B jne @F 0 00004A8B 8B1E[0400] mov bx, word [e_addr + saSegSel] 0 00004A8F 66 _386_PM_o32 0 00004A90 8B16[0000] mov dx, word [e_addr] 0 00004A94 EB72 jmp ee1 155 156 @@: 0 00004A96 8B1E[0000] mov bx, word [reg_ds] 0 00004A9A E8[0000]EB02[0000] nearcall getaddrX ; get address into bx:(e)dx, no scratchsel 0 00004AA1 E8[0000] call skipcomm0 0 00004AA4 E8[0000] call iseol? 0 00004AA7 745F je ee1 ; if prompt mode 162 163 eeparsestr: 0 00004AA9 53 push bx 165 %if _PM 0 00004AAA E8[0000] call verifysegm_or_error; get scratchsel if code selector 167 %endif 0 00004AAD 66 _386_PM_o32 ; push edx 0 00004AAE 52 push dx ; save destination offset 0 00004AAF E8[0000]EB02[0000] nearcall getstr ; get data bytes 0 00004AB6 89F9 mov cx, di 0 00004AB8 BA[0000] mov dx, line_out 0 00004ABB 29D1 sub cx, dx ; length of byte string 0 00004ABD 66 _386_PM_o32 ; pop edi 0 00004ABE 5F pop di 0 00004ABF 7427 jz ee2_empty ; if length == 0 --> 0 00004AC1 660FB7C9 _386_PM movzx ecx, cx 0 00004AC5 66 _386_PM_o32 ; mov eax, ecx 0 00004AC6 89C8 mov ax, cx 0 00004AC8 48 dec ax ; (cannot be 0) 0 00004AC9 E8[0000] _386_PM call test_high_limit ; 32-bit segment ? 0 00004ACC 7401 _386_PM jz .16 ; no --> 0 00004ACE 66 _386_PM_o32 ; add eax, edi 184 .16: 0 00004ACF 01F8 add ax, di 0 00004AD1 729E jc short errorj4 ; if it wraps around 0 00004AD3 E8[0000] call dohack 0 00004AD6 89D6 mov si, dx 0 00004AD8 8EC3 mov es, bx 190 %if _PM 0 00004ADA 803E[0000]00 cmp byte [bAddr32], 0 0 00004ADF 7405 jz ee_2 193 [cpu 386] 0 00004AE1 660FB7F6 movzx esi, si ; ds:esi -> source 0 00004AE5 67 a32 ; a32 rep movsb 196 __CPU__ 197 ee_2: 198 %endif 0 00004AE6 F3A4 rep movsb 200 ee2_empty: 0 00004AE8 5B pop bx 0 00004AE9 E8[0000] _386_PM call test_high_limit ; 32-bit segment ? 0 00004AEC 7504 _386_PM jnz .32 ; yes --> 0 00004AEE 660FB7FF _386_PM movzx edi, di ; limit to 16 bits 205 .32: 0 00004AF2 891E[0400] mov word [e_addr + saSegSel], bx 0 00004AF6 66 _386_PM_o32 0 00004AF7 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 00004AFB 16 push ss ; restore ds 0 00004AFC 1F pop ds 0 00004AFD 16 push ss ; restore es 0 00004AFE 07 pop es 217 %if !_LOADER 0 00004AFF BF[0000] mov di, run2324 ; debuggee's int 23/24 values 0 00004B02 E8[0000] call prehak1 ; copy things back 0 00004B05 E9[0000] jmp unhack 221 %else 222 retn 223 %endif 224 225 ..@ee_interactive_access_start: 226 227 ; Prompt mode. 228 ee1: 0 00004B08 E8[0000] call guard_re 230 ; Begin loop over lines. 231 ee2: ; <--- next line 0 00004B0B 89D8 mov ax, bx ; print out segment and offset 0 00004B0D E8[0000] call hexword ; (uses original selector, not scratchsel) 0 00004B10 B03A mov al, ':' 0 00004B12 AA stosb 0 00004B13 66 _386_PM_o32 ; mov eax, edx 0 00004B14 89D0 mov ax, dx 238 %if _PM 0 00004B16 E8[0000] call test_high_limit ; 32-bit segment ? 0 00004B19 7403 jz .16 ; no --> 0 00004B1B E8[0000] call hexword_high 242 .16: 243 %endif 0 00004B1E E8[0000] call hexword 245 246 %if _40COLUMNS 0 00004B21 F606[0100]10 testopt [options6], opt6_40_columns 0 00004B26 7405 jz ee3 0 00004B28 B020 mov al, 32 0 00004B2A AA stosb ; only one blank byte here 0 00004B2B EB04 jmp @F 252 %endif 253 254 ; Begin loop over bytes. 255 ee3: ; <--- next byte 0 00004B2D B82020 mov ax, 32<<8|32 ; print old value of byte 0 00004B30 AB stosw 258 @@: 0 00004B31 E8[0000] call dohack ; do the INT pointer hack 0 00004B34 E8[0000] call readmem ; read mem at BX:(E)DX 0 00004B37 E8[0000] call unhack ; undo the INT pointer hack 0 00004B3A 891E[0400] mov word [e_addr + saSegSel], bx 0 00004B3E 66 _386_PM_o32 0 00004B3F 8916[0000] mov word [e_addr], dx 0 00004B43 E8[0000] call hexbyte 0 00004B46 B02E mov al, '.' 0 00004B48 AA stosb 0 00004B49 C606[0000]00 mov byte [ linecounter ], 0 ; reset counter 0 00004B4E 8026[0200]EF clropt [internalflags], promptwaiting 0 00004B53 53 push bx 0 00004B54 52 push dx 0 00004B55 E8[0000] call putsline 0 00004B58 5A pop dx 0 00004B59 5B pop bx 0 00004B5A BE[1000] mov si, line_out+16 ; address of buffer for characters 0 00004B5D 31C9 xor cx, cx ; number of characters so far 277 278 ee4_next: 0 00004B5F E8[0000] call getline_is_input_file? 0 00004B62 7238 jc ee9_getc_tty ; if it's a TTY 281 282 ee_getc_file: 0 00004B64 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 00004B69 56 push si 288 %if _NEWFULLHANDLING 0 00004B6A BF[0300] mov di, line_in+3 ; read max 290 %else 291 mov di, line_in+2 292 %endif 0 00004B6D 8B36[0000] mov si, word [bufnext] 294 ee5: 0 00004B71 3B36[0000] cmp si, word [bufend] 0 00004B75 7207 jb ee6 ; if there's a character already 0 00004B77 E8[0000] call fillbuf 0 00004B7A B00D mov al, 13 0 00004B7C 7217 jc ee8 ; if eof 300 ee6: 0 00004B7E 803E[0000]0D cmp byte [notatty], 13 0 00004B83 750C jne ee7 ; if no need to compress CR/LF 0 00004B85 803C0A cmp byte [si], 10 0 00004B88 7507 jne ee7 ; if not a line feed 0 00004B8A 46 inc si ; skip it 0 00004B8B FE06[0000] inc byte [notatty] ; avoid repeating this 0 00004B8F EBE0 jmp ee5 ; next character 308 309 ee7: 0 00004B91 AC lodsb ; get the character 0 00004B92 A2[0000] mov byte [notatty], al 312 ee8: 0 00004B95 8936[0000] mov word [bufnext], si 0 00004B99 5E pop si 0 00004B9A EB03 jmp ee10_got_codepoint 316 317 ee9_getc_tty: 0 00004B9C E8[0000] call getc ; character input without echo 319 ee10_got_codepoint: 0 00004B9F 3C20 cmp al, 32 ; (go to next byte) 0 00004BA1 744C je ee13_write 0 00004BA3 3C2D cmp al, '-' ; (go to prior byte) 0 00004BA5 7448 je ee13_write 0 00004BA7 3C2E cmp al, '.' ; (exit E interactive mode) 0 00004BA9 7444 je ee13_write 0 00004BAB 3C0A cmp al, 10 0 00004BAD 7440 je ee13_write 0 00004BAF E8[0000] call iseol?.notsemicolon; (also exit E interactive mode) 0 00004BB2 743B je ee13_write ; all: done with this byte --> 0 00004BB4 3C08 cmp al, 8 0 00004BB6 7428 je ee11_backspace ; if backspace --> 0 00004BB8 3C7F cmp al, 7Fh 0 00004BBA 7424 je ee11_backspace ; if DEL (handle like backspace) --> 0 00004BBC 83F902 cmp cx, byte 2 ; otherwise, it should be a hex character 0 00004BBF 7326 jae ee4_next_j ; if we have a full byte already 0 00004BC1 8804 mov byte [si], al 0 00004BC3 E8[0000]EB02[0000] nearcall getnyb 0 00004BCA 721B jc ee4_next_j ; if it's not a hex character 0 00004BCC 41 inc cx 0 00004BCD AC lodsb ; get the character back 0 00004BCE EB1A jmp ee12_put_then_next 342 343 ee112_priorbyte: 0 00004BD0 E8[0000] call putc ; display the minus 0 00004BD3 E8[0000] _386_PM call test_high_limit ; 32-bit segment ? 0 00004BD6 7401 _386_PM jz .16 ; no --> 0 00004BD8 66 _386_PM_o32 348 .16: 0 00004BD9 4A dec dx ; decrement offset (16 bit or 32 bit) 0 00004BDA BF[0000] mov di, line_out 0 00004BDD E98700 jmp ee15_linebreak_and_ee2 352 353 ee11_backspace: 0 00004BE0 E305 jcxz ee4_next_j ; if nothing to backspace over 0 00004BE2 49 dec cx 0 00004BE3 4E dec si 0 00004BE4 E8[0000] call fullbsout 358 ee4_next_j: 0 00004BE7 E975FF jmp ee4_next 360 361 ee12_put_then_next: 0 00004BEA E8[0000] call putc 0 00004BED EBF8 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 00004BEF E337 jcxz ee14_done_write ; if no change for this byte 371 0 00004BF1 50 push ax ; preserve proceed control 0 00004BF2 31C0 xor ax, ax ; ah = 0, al = 0 0 00004BF4 8804 mov byte [si], al ; terminate the string 0 00004BF6 29CE sub si, cx ; point to beginning 376 @@: 0 00004BF8 00E4 add ah, ah 0 00004BFA 00E4 add ah, ah 0 00004BFC 00E4 add ah, ah 0 00004BFE 00E4 add ah, ah ; prior value times 16 0 00004C00 00C4 add ah, al ; add next digit (0 in first iteration) 0 00004C02 AC lodsb ; load next digit (or NUL) 0 00004C03 E8[0000]EB02[0000] nearcall getnyb 0 00004C0A 73EC jnc @B ; if another digit --> (NC) 385 ; (CY can only mean we reached the NUL) 0 00004C0C 88E0 mov al, ah ; get byte value 0 00004C0E E8[0000] call dohack ; do the INT pointer hack 0 00004C11 E8[0000] call writemem ; write AL at BX:(E)DX (may use scratchsel) 389 %if !_LOADER 0 00004C14 BF[0000] mov di, run2324 ; debuggee's int 23/24 0 00004C17 E8[0000] call prehak1 ; copy things back 0 00004C1A E8[0000] call unhack ; undo the INT pointer hack 393 %endif 0 00004C1D E8[0000] _386_PM call test_high_limit ; 32-bit segment ? 0 00004C20 7401 _386_PM jz .16 ; no --> 0 00004C22 66 _386_PM_o32 397 .16: 0 00004C23 FF06[0000] inc word [e_addr] 0 00004C27 58 pop ax ; al = how to proceed 400 401 ; End the loop over bytes. 402 ee14_done_write: 0 00004C28 BF[0000] mov di, line_out ; reset output buffer 404 0 00004C2B 3C20 cmp al, 32 ; (go to next byte) 0 00004C2D 7414 je ee_nextbyte 0 00004C2F 3C2D cmp al, '-' ; (go to prior byte) 0 00004C31 749D je ee112_priorbyte 0 00004C33 3C2E cmp al, '.' ; (exit E interactive mode) 0 00004C35 7437 je ee16_end 0 00004C37 3C0A cmp al, 10 0 00004C39 7433 je ee16_end 0 00004C3B E8[0000] call iseol?.notsemicolon; (also exit E interactive mode) 0 00004C3E 742E je ee16_end 0 00004C40 E9[0000] jmp error ; unexpected value 416 417 ee_nextbyte: 0 00004C43 E8[0000] _386_PM call test_high_limit ; 32-bit segment ? 0 00004C46 7401 _386_PM jz .16 ; no --> 0 00004C48 66 _386_PM_o32 421 .16: 0 00004C49 42 inc dx ; increment offset (16 bit or 32 bit) 423 %if _40COLUMNS 0 00004C4A F606[0100]10 testopt [options6], opt6_40_columns 0 00004C4F 7405 jz @F 0 00004C51 F6C203 test dl, 3 0 00004C54 7411 jz ee15_linebreak_and_ee2 428 @@: 429 %endif 0 00004C56 F6C207 test dl, 7 0 00004C59 740C jz ee15_linebreak_and_ee2 432 ; if new line 0 00004C5B F7D1 not cx 0 00004C5D 83C104 add cx, byte 4 ; compute 3 - cx 0 00004C60 B020 mov al, 32 0 00004C62 F3AA rep stosb ; store that many spaces 0 00004C64 E9C6FE jmp ee3 ; back for more 438 439 ee15_linebreak_and_ee2: 0 00004C67 B80D0A mov ax, 10 << 8 | 13 ; terminate this line 0 00004C6A AB stosw 0 00004C6B E99DFE jmp ee2 ; back for a new line 443 444 ee16_end: 0 00004C6E E9[0000] jmp putsline_crlf ; call putsline and return 446 447 ..@ee_interactive_access_end: 448 449 ..@ee_access_end: === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 000019DC ???????? eldhSignature: resb 4 ; "ELD1" 0 000019E0 ?????? resb 3 ; reserved 0 000019E3 ?? resb 1 ; 26 (Ctrl-Z) 0 000019E4 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 000019E8 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000019EA ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000019EC ???????? eldhDataOffset: resd 1 0 000019F0 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000019F2 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000019F4 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000019F6 ???????? eldhReserved: resb 4 ; reserved 0 000019FA ???? 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 000019FC ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00001A00 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00001A04 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00001A08 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 000019DC ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 000019E4 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 000019E8 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000019EA ???? 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 000019DC ???? 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 000019DE ???? eldltAmount: resw 1 0 000019E0 ???????? 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 000019DC ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 000019DE ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 000019E0 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 000019E2 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 000019E4 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000019EC ???? 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 000019DC ???? eldlSignature: resw 1 ; 0E1D1h 0 000019DE ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 000019E0 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 000019E2 ???? eldlUseLinkHash: resw 1 0 000019E4 ???? eldlDataAmount: resw 1 0 000019E6 ???? eldlDataPrefixes: resw 1 0 000019E8 ???? eldlDataEntries: resw 1 0 000019EA ???? eldlDataAddresses: resw 1 0 000019EC ???? eldlCodeAmount: resw 1 0 000019EE ???? eldlCodePrefixes: resw 1 0 000019F0 ???? eldlCodeEntries: resw 1 0 000019F2 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 000019F4 ???? eldlDualAmount: resw 1 0 000019F6 ???? eldlDualPrefixes: resw 1 0 000019F8 ???? eldlDualEntries: resw 1 0 000019FA ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 000019DC ???? ifKeyword: resw 1 0 000019DE ???? ifDescription: resw 1 0 000019E0 ???? ifOptions: resw 1 0 000019E2 ???? ifValue: resw 1 0 000019E4 ???? ifTrying: resw 1 0 000019E6 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 000019DC ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 000019E0 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 000019E4 ???? smName1: resw 1 ; -> first string part 0 000019E6 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 000019E8 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 000019EA ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 000019EC ???? smBaseNext: resw 1 0 000019EE ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 000019F0 ???? smSpecialNext: resw 1 0 000019F2 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 000019DC ?? ssLength: resb 1 ; how long this string is (only ssString) 0 000019DD ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 000019DE ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 000019DC ???? shHash: resw 1 ; hash value 0 000019DE ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 000019DC ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 000019E0 ???? xmsmSourceHandle: resw 1 0 000019E2 ???????? xmsmSourceAddress: resd 1 0 000019E6 ???? xmsmDestHandle: resw 1 0 000019E8 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <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 === Switch to base=01F580h -> "LDEBUG_CODE2" 29 ------------------ note: usesection lDEBUG_CODE2 30 0 000000DB E8[0000]EB02[0000] 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 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 000000E2 51 push cx ; preserve 0 000000E3 53 push bx ; preserve 0 000000E4 88E5 mov ch, ah ; ch = 0 if must be an offset 81 %if _PM 0 000000E6 6631D2 _386 xor edx, edx ; properly initialize high word 0 000000E9 E8[0000]EB02[0000] nearcall test_high_limit 0 000000F0 740E jz .16 ; 16-bit segment --> 85 [cpu 386] 0 000000F2 E82111 nearcall getdword 0 000000F5 53 push bx 0 000000F6 52 push dx 0 000000F7 665A pop edx ; edx = 32-bit offset 0 000000F9 E81300 nearcall checkpointer 0 000000FC B401 mov ah, 1 ; return 32-bit offset flag 0 000000FE EB0B jmp .ret_pop_NC 93 __CPU__ 94 %endif 95 96 .16: 0 00000100 E81311 nearcall getexpression 0 00000103 E80900 nearcall checkpointer 0 00000106 E80017 nearcall getword.checksignificantbits 100 %if _PM 0 00000109 B400 mov ah, 0 ; return 16-bit offset flag 102 %endif 103 .ret_pop_NC: 0 0000010B 5B pop bx 0 0000010C 59 pop cx ; restore 0 0000010D F8 clc ; NC: not a pointer type 0 0000010E 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 0000010F 84E4 test ah, ah ; pointer type ? 0 00000111 790E jns .ret ; no --> 0 00000113 84ED test ch, ch ; can be a pointer or segment ? 0 00000115 7436 jz errorj10 ; no --> 0 00000117 59 pop cx ; discard a near return address 0 00000118 59 pop cx ; discard bx 0 00000119 59 pop cx ; restore cx 134 %if _PM 0 0000011A 660FB7D2 _386 movzx edx, dx ; edx = dx 0 0000011E B400 mov ah, 0 ; always treat as 16-bit offset 137 %endif 0 00000120 F9 stc ; return a pointer type 139 .ret: 140 retn_expr: 0 00000121 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 0 00000122 8326[0000]00 and word [getrange_lines], 0 164 .lines: section_of_function getrangeX 165 %if _MS_0RANGE_COMPAT 166 %if !_LOADER 0 00000127 C606[0000]00 mov byte [getrange_is_uu], 0 168 %endif 169 .lines_and_uu: section_of_function getrangeX 170 %endif 0 0000012C 8026[0300]FB clropt [internalflags3], dif3_accept_getrange_0 0 00000131 660FB7C9 _386 movzx ecx, cx 173 .ecx_and_0_valid: section_of_function getrangeX 0 00000135 66 _386_PM_o32 0 00000136 51 push cx 0 00000137 E82C01 nearcall getaddrX 0 0000013A EB2B 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 0000013C 8326[0000]00 and word [getrange_lines], 0 0 00000141 8026[0300]FB clropt [internalflags3], dif3_accept_getrange_0 0 00000146 66 _386_PM_o32 0 00000147 31C9 xor cx, cx 0 00000149 66 _386_PM_o32 0 0000014A 51 push cx ; save the default length 0 0000014B EB1A jmp getrange.common 201 202 0 0000014D EB8C errorj10: jmp error_expr 204 205 getrange: section_of_function 0 0000014F 8326[0000]00 and word [getrange_lines], 0 207 .lines: section_of_function getrange 208 %if _MS_0RANGE_COMPAT 209 %if !_LOADER 0 00000154 C606[0000]00 mov byte [getrange_is_uu], 0 211 %endif 212 .lines_and_uu: section_of_function getrange 213 %endif 0 00000159 8026[0300]FB clropt [internalflags3], dif3_accept_getrange_0 0 0000015E 660FB7C9 _386_PM movzx ecx, cx 216 .ecx_and_0_valid: section_of_function getrange 0 00000162 66 _386_PM_o32 0 00000163 51 push cx ; save the default length 0 00000164 E8F400 nearcall getaddr ; get address into bx:(e)dx (sets bAddr32) (returns edx) 220 .common: 0 00000167 66 _386_PM_o32 0 00000168 59 pop cx 0 00000169 E8[0000]EB02[0000] nearcall skipcomm0 0 00000170 E8[0000]EB02[0000] nearcall iseol? 0 00000177 7560 jne getrange_not_eol 226 0 00000179 F606[0100]80 testopt [getrange_lines], 8000h 0 0000017E 740E jz @F ; if lines length not supported --> 0 00000180 85FF test di, di ; default lines given ? 0 00000182 740A jz @F ; no --> 0 00000184 78C7 js short errorj10 ; error if sign bit set --> 0 00000186 893E[0000] mov word [getrange_lines], di 233 ; return lines (PL) 0 0000018A 66 _386_PM_o32 0 0000018B 31C9 xor cx, cx ; (e)cx = 0 0 0000018D 41 inc cx ; placeholder length = 1 237 @@: 238 0 0000018E B402 mov ah, 2 ; do not allow past boundary if F RANGE 0 00000190 F606[0300]04 testopt [internalflags3], dif3_accept_getrange_0 241 ; F RANGE special case ? 0 00000195 7505 jnz @F ; yes --> 0 00000197 67 _386_PM_a32 0 00000198 E3B3 jcxz errorj10 ; if a range is mandatory 0 0000019A 30E4 xor ah, ah ; default range, allow clamping to boundary 246 @@: 247 getrange_length.addcheck: 0 0000019C 803E[0000]00 _386_PM cmp byte [bAddr32], 0 0 000001A1 740D _386_PM je .16 0 000001A3 6649 _386_PM dec ecx 0 000001A5 6601D1 _386_PM add ecx, edx 0 000001A8 7356 _386_PM jnc getrange_retn ; if no wraparound 0 000001AA 6683C9FF _386_PM or ecx, byte -1 ; go to end of segment 0 000001AE EB22 _386_PM jmp short .checkclamped ; check if clamping allowed --> 255 .16: 0 000001B0 F6C402 _386_PM test ah, 2 ; F RANGE with implicit length ? 0 000001B3 7409 _386_PM jz @F ; no --> 0 000001B5 6681F900000100 _386_PM cmp ecx, 1_0000h ; yes, is it a 32-bit length > 64 KiB ? 0 000001BC 778F _386_PM ja short errorj10 ; error if so (don't try to clamp) --> 260 @@: 0 000001BE 6681F9FFFF0000 _386_PM cmp ecx, 0FFFFh ; was high ? 0 000001C5 7603 _386_PM jbe @F ; no --> (ecxh = 0) 0 000001C7 6631C9 _386_PM xor ecx, ecx ; ecxh = 0 and prepare so as to 264 ; result in cx = FFFFh after dec 265 @@: 0 000001CA 49 dec cx 0 000001CB 01D1 add cx, dx 0 000001CD 7331 jnc getrange_retn ; if no wraparound 0 000001CF B9FFFF mov cx, -1 ; go to end of segment 270 ; next, check if clamping allowed 271 .checkclamped: ; checks if clamping allowed 0 000001D2 84E4 test ah, ah ; clamping allowed ? 0 000001D4 742A jz getrange_retn 0 000001D6 E974FF jmp errorj10 ; (no) if a specified length wrapped --> 275 276 getrange_not_eol: 0 000001D9 E8[0000]EB02[0000] nearcall capitalise 0 000001E0 3C4C cmp al, 'L' 0 000001E2 741D je getrange_length ; if a range with length is given 0 000001E4 66 _386_PM_o32 ; xchg ecx, edx 0 000001E5 87CA xchg cx, dx ; ecx = start offset, edx clobbered 0 000001E7 BA[0000] mov dx, msg.end ; dx clobbered 0 000001EA 4E dec si ; -> nonblank 0 000001EB E8[0000]EB02[0000] nearcall isstring? ; (advance si if match) 0 000001F2 AC lodsb ; load separator byte or initial nonblank 0 000001F3 B400 mov ah, 0 ; must be offset 0 000001F5 E8FE00 nearcall getofsforbx_remember_bitness 288 ; (DebugX: returns edx no matter what) 0 000001F8 66 _386_PM_o32 ; xchg ecx, edx 0 000001F9 87CA xchg cx, dx ; ecx = end offset, edx = start offset 0 000001FB 66 _386_PM_o32 ; cmp edx, ecx 0 000001FC 39CA cmp dx, cx 0 000001FE 7758 ja short errorj2b ; if empty range --> 294 getrange_retn: 0 00000200 C3 retn 296 297 getrange_length: 0 00000201 4E dec si ; -> at 'L' 0 00000202 52 push dx 0 00000203 BA[0000] mov dx, msg.length 0 00000206 E8[0000]EB02[0000] nearcall isstring? ; if match: ZR, NC, else: NZ, CY 0 0000020D 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 0000020E 83D600 adc si, 0 ; -> behind 'L' if mismatch, 310 ; stay at -> behind "LENGTH" else 311 %endif 0 00000211 E8[0000]EB02[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 00000218 52 push dx 0 00000219 53 push bx 0 0000021A E8[0000]EB02[0000] _386_PM nearcall test_high_limit 0 00000221 9C _386_PM pushf 0 00000222 8B0E[0000] mov cx, word [getrange_lines] 320 ; cx from getrange_not_eol clobbered 0 00000226 E85102 nearcall get_length.lines 0 00000229 9D _386_PM popf 0 0000022A 750B _386_PM jnz .not16_64kib ; don't check for <= 64 KiB 0 0000022C 83FB01 cmp bx, byte 1 0 0000022F 7206 jb .not16_64kib ; < 64 KiB in 16-bit segment --> 0 00000231 7525 jne short errorj2b ; 16-bit segment, above 64 KiB --> 0 00000233 85D2 test dx, dx 0 00000235 7521 jnz short errorj2b ; 16-bit segment, above 64 KiB --> 329 .not16_64kib: 330 @@: 331 %if _PM 0 00000237 53 _386 push bx ; (only push high word on 386+) 0 00000238 52 push dx 0 00000239 66 _386_o32 ; pop ecx ; mov ecx, bxdx 0 0000023A 59 pop cx ; mov cx, dx 336 %else 337 mov cx, dx 338 %endif 0 0000023B 09D3 or bx, dx ; zero ? 0 0000023D 7407 jz short explicit0range ; yes, error --> 0 0000023F 5B pop bx 0 00000240 5A pop dx 0 00000241 B401 mov ah, 1 ; disallow clamping / overflow 0 00000243 E956FF jmp .addcheck ; check for overflow 345 346 explicit0range: 347 %if _MS_0RANGE_COMPAT 0 00000246 F606[0200]04 testopt [options2], opt2_0range_compat 0 0000024B 740B jz errorj2b 0 0000024D 43 inc bx ; bx:dx = 10000h (64 KiB) 351 %if !_LOADER 0 0000024E D006[0000] rol byte [getrange_is_uu], 1 0 00000252 73E3 jnc @B ; if not uu --> 0 00000254 87DA xchg bx, dx ; bx:dx = 1 355 %endif 0 00000256 EBDF jmp @B 357 %endif 358 errorj2b: 0 00000258 E980FE 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 0 0000025B E80800 nearcall getaddrX 379 %if _EXPRDUALCODE && _DUALCODE 0 0000025E E8[0000]EB02[0000] nearcall verifysegm_or_error ; make BX a writeable segment 0 00000265 C3 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 0 00000266 C606[0000]00 mov byte [bAddr32], 0 0 0000026B 31C9 xor cx, cx 0 0000026D 3C24 cmp al, '$' ; a real-mode segment? 0 0000026F 7541 jne getaddr_no_dollar 0 00000271 AC lodsb 397 %if _DOUBLEDOLLAR 398 cmp al, '$' 399 jne @F 400 lodsb 401 dec cx ; indicate double dollar sign (0FFFFh) 402 @@: 403 %endif 404 0 00000272 6631D2 _386 xor edx, edx ; edxh = 0 0 00000275 E89E0F nearcall getexpression 0 00000278 84E4 test ah, ah ; pointer type ? 0 0000027A 7915 jns @F 409 0 0000027C E8[0000]EB02[0000] nearcall ispm ; need to translate ? 0 00000283 750B 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) 0 00000285 50 push ax 0 00000286 B80200 mov ax, 0002h 0 00000289 CD31 int 31h 0 0000028B 7222 jc short errorj2 0 0000028D 89C3 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 0 0000028F 58 pop ax 438 .ret: 0 00000290 C3 retn 440 441 @@: 0 00000291 E87515 nearcall getword.checksignificantbits 0 00000294 E8[0000]EB02[0000] nearcall ispm ; need to translate ? 0 0000029B 7507 jnz .checkseg ; no --> 0 0000029D 89D3 mov bx, dx 0 0000029F E8E3FF nearcall seg_bx_to_sel 0 000002A2 89DA mov dx, bx 448 .checkseg: 0 000002A4 E8[0000]EB02[0000] nearcall skipwh0 0 000002AB 3C3A cmp al, ':' ; was a segment at all? 0 000002AD 743C je getaddr_segment ; yes --> 452 errorj2: 0 000002AF E929FE jmp error_expr 454 %else 455 getaddrX: section_of_function 456 cmp al, '$' 457 jne getaddr_no_dollar 458 lodsb 459 %if _DOUBLEDOLLAR 460 cmp al, '$' 461 jne @F 462 lodsb 463 @@: 464 %endif 465 nearcall getexpression 466 test ah, ah ; pointer type ? 467 js .ret ; return bx:dx = segmented address 468 nearcall getword.checksignificantbits 469 nearcall skipwh0 470 cmp al, ':' 471 je getaddr_segment 472 jmp error_expr 473 474 .ret: 475 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 000019DC [0000]0100 dw msg.t, 1 0 000019E0 [0000]0100 dw msg.taken, 1 0 000019E4 [0000]0000 dw msg.nt, 0 0 000019E8 [0000]0000 dw msg.nottaken, 0 0 000019EC 0000 dw 0 ; end of table 489 %endif 490 491 %if _EXPRDUALCODE && _DUALCODE 492 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 492 ------------------ note: usesection lDEBUG_CODE2 493 %else 494 usesection lDEBUG_CODE 495 %endif 496 getaddr_no_dollar: 0 000002B2 4E dec si ; si -> text 498 %if !_LOADER 0 000002B3 57 push di 0 000002B4 BF[FEFF] mov di, getaddr_taken_table - 2 501 ; -> table minus 2 502 @@: 0 000002B7 AF scasw ; di += 2, -> -> string to compare 0 000002B8 8B15 mov dx, [di] ; -> string to compare (0 if end of table) 0 000002BA AF scasw ; di += 2, -> taken status (1 = taken) 0 000002BB 85D2 test dx, dx ; end of table ? 0 000002BD 740D jz @F ; if end of table --> 0 000002BF E8[0000]EB02[0000] nearcall isstring? ; is it this keyword ? 0 000002C6 75EF jne @B ; no, loop --> 0 000002C8 8B05 mov ax, [di] ; get taken status 0 000002CA EB32 jmp getaddr_taken ; branch to taken handling, di on stack 512 513 @@: 0 000002CC 5F pop di ; restore di 515 %endif 0 000002CD AC lodsb ; reload al = text, si -> after 0 000002CE B401 mov ah, 1 ; might be a pointer type 0 000002D0 E80FFE nearcall getofsforbx 0 000002D3 720B jc .ret ; if pointer type then return --> 0 000002D5 E8[0000]EB02[0000] nearcall skipwh0 0 000002DC 3C3A cmp al, ':' 0 000002DE 7402 je getaddr_segment_check_high 523 ; if this is a segment/selector --> 524 .ret: 525 %if _PM 0 000002E0 EB17 jmp short remember_bitness 527 ; remember 32-bitness (only if no segment) 528 %else 529 retn 530 %endif 531 532 getaddr_segment_check_high: 0 000002E2 6681FA00000100 _386_PM cmp edx, 0001_0000h ; segment/selector fits in word ? 0 000002E9 73C4 _386_PM jae short errorj2 ; no --> 535 getaddr_segment: 536 ; al = colon ':' 537 ; si -> text after colon 0 000002EB 89D3 mov bx, dx ; mov segment into BX 0 000002ED E8[0000]EB02[0000] nearcall skipwhite ; skip to next word 0 000002F4 B400 mov ah, 0 ; must be an offset 541 %if _PM 542 getofsforbx_remember_bitness: section_of_function 0 000002F6 E8E9FD nearcall getofsforbx 544 remember_bitness: section_of_function 0 000002F9 0826[0000] or byte [bAddr32], ah ; remember 32-bitness 0 000002FD C3 retn 547 %else 548 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 0 000002FE 66 _386_PM_o32 ; (push esi) 0 000002FF 56 push si 0 00000300 66 _386_PM_o32 ; (push eax) 0 00000301 50 push ax ; ! must be the LAST word in this stack frame 563 0 00000302 BA0F00 mov dx, 15 ; DL = number of bytes to go, DH = prefix flags 0 00000305 8B1E[0000] mov bx, word [reg_cs] 0 00000309 66 _386_PM_o32 ; mov esi, dword [reg_eip] 0 0000030A 8B36[0000] mov si, word [reg_eip] 568 .pp2: 0 0000030E E8[0000]EB02[0000] nearcall pp16 ; get next instruction byte into AL 0 00000315 BF[0000] mov di, ppbytes 0 00000318 B9[0000] mov cx, PPLEN_ONLY_PREFIXES 0 0000031B F2AE repne scasb ; asize, osize, seg prefixes (ie, hints) ? 0 0000031D 7513 jne @F ; no --> 574 %if _LINK_COMPAT 0 0000031F 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 00000323 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 00000325 FECA dec dl 0 00000327 75E5 jnz .pp2 ; if not out of bytes --> 590 .pp5: ; unknown, error out on the (NOT)TAKEN keyword 0 00000329 66 _386_PM_o32 ; (pop eax) 0 0000032A 58 pop ax 0 0000032B 66 _386_PM_o32 ; (pop esi) 0 0000032C 5E pop si ; restore si so error will be behind keyword 0 0000032D 5F pop di 0 0000032E 46 inc si 0 0000032F E99F00 jmp errorj2a 598 599 @@: 0 00000332 3C70 cmp al, 70h ; jcc rel8 ? 0 00000334 7204 jb @F ; no --> 0 00000336 3C7F cmp al, 7Fh 0 00000338 7655 jbe .rel_8 ; yes --> 604 @@: 0 0000033A 3CE0 cmp al, 0E0h ; loop* / j(e)cxz rel8 ? 0 0000033C 7204 jb @F ; no --> 0 0000033E 3CE3 cmp al, 0E3h 0 00000340 764D jbe .rel_8 ; yes --> 609 @@: 0 00000342 3C0F cmp al, 0Fh ; prefix byte ? 0 00000344 75E3 jne .pp5 ; no, no valid conditional branch (error) --> 0 00000346 E8[0000]EB02[0000] nearcall pp16 0 0000034D 3C80 cmp al, 80h ; jcc rel16/rel32 ? 0 0000034F 72D8 jb .pp5 0 00000351 3C8F cmp al, 8Fh 0 00000353 77D4 ja .pp5 ; no, error --> 617 .rel_16_32: 0 00000355 E8[0000]EB02[0000] _386_PM nearcall pp_fix32bitflags 0 0000035C E8[0000]EB02[0000] nearcall pp16 0 00000363 86C4 xchg al, ah 0 00000365 E8[0000]EB02[0000] nearcall pp16 0 0000036C 86C4 xchg al, ah ; ax = rel16 0 0000036E F6C602 _386_PM test dh, PP_OPSIZ 0 00000371 7424 _386_PM jz @F ; have 16-bit displacement --> 0 00000373 66C1C010 _386_PM rol eax, 16 ; preserve low 16 bits in high 16 bits 0 00000377 E8[0000]EB02[0000] _386_PM nearcall pp16 0 0000037E 66C1C808 _386_PM ror eax, 8 0 00000382 E8[0000]EB02[0000] _386_PM nearcall pp16 0 00000389 66C1C808 _386_PM ror eax, 8 ; magic swap to put high 16 bits where they belong 0 0000038D EB0A 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 0000038F E8[0000]EB02[0000] nearcall pp16 ; get 8-bit displacement 0 00000396 98 cbw ; 8 to 16 bits 637 @@: 0 00000397 6698 _386_PM cwde ; 16 to 32 bits 639 @@: 0 00000399 5A pop dx ; get ax from stack 0 0000039A 52 push dx ; restore it to the stack 0 0000039B 84D2 test dl, dl ; 1 if taken, 0 if nottaken 0 0000039D 7403 jz @F ; nottaken, esi has eip value after inst --> 0 0000039F 66 _386_PM_o32 ; (add esi, eax) 0 000003A0 01C6 add si, ax ; taken: apply displacement to esi 646 @@: 0 000003A2 66 _386_PM_o32 0 000003A3 89F2 mov dx, si ; get into (e)dx, bx already has seg/sel 0 000003A5 E8[0000]EB02[0000] _386_PM nearcall test_d_b_bit 0 000003AC 7504 _386_PM jnz @F ; if 32-bit cs --> 0 000003AE 660FB7D2 _386_PM movzx edx, dx ; clear high 16 bits 652 @@: 0 000003B2 66 _386_PM_o32 ; (pop eax) 0 000003B3 58 pop ax 0 000003B4 66 _386_PM_o32 ; (pop esi) 0 000003B5 5E pop si 0 000003B6 5F pop di 0 000003B7 B400 _386_PM mov ah, 0 ; do not remember bitness (is 16 bit) 0 000003B9 7402 _386_PM jz @F ; if 16-bit cs --> 0 000003BB FEC4 _386_PM inc ah ; remember bitness as 1 (is 32 bit) 661 @@: 0 000003BD E839FF _386_PM nearcall remember_bitness 663 %if _EXPRDUALCODE && _DUALCODE 0 000003C0 E8[0000]EB02[0000] nearcall skipwhite 0 000003C7 C3 retn 666 %else 667 jmp skipwhite 668 %endif 669 %endif 670 671 %if _STRNUM 672 getstr_check_limit: 0 000003C8 3BBF[1E00] cmp di, word [getstr_dispatch_table.limit + bx] 0 000003CC 7703E98000 jbe getstr_retn 675 %endif 676 errorj2a: 0 000003D1 E907FD 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 000003D4 53 push bx 0 000003D5 31DB xor bx, bx ; 0 = byte size as default 691 %endif 0 000003D7 BF[0000] mov di, line_out 0 000003DA E8[0000]EB02[0000] nearcall iseol? 0 000003E1 74EE je short errorj2a ; we don't allow empty byte strings 695 getstr_loop: 696 %if _STRNUM 0 000003E3 E8[0000]EB02[0000] nearcall skipcomm0 0 000003EA 4E dec si ; -> nonblank 0 000003EB BA[0000] mov dx, msg.as ; "AS" keyword ? 0 000003EE E8[0000]EB02[0000] nearcall isstring? 0 000003F5 AC lodsb 0 000003F6 7519 jne .notas ; no --> 0 000003F8 E8[0000]EB02[0000] nearcall skipcomm0 0 000003FF 4E dec si ; -> nonblank 0 00000400 E8C800 nearcall get_length_keyword 0 00000403 75CC jnz errorj2a 0 00000405 80F902 cmp cl, 2 ; 0 = bytes, 1 = words, 2 = dwords 708 ; (ch is always zero) 0 00000408 77C7 ja errorj2a ; higher is invalid --> 0 0000040A 89CB mov bx, cx 0 0000040C 01DB add bx, bx ; make a table offset 0 0000040E AC lodsb 0 0000040F EB2F jmp getstr_next 714 715 .notas: 716 %endif 0 00000411 3C27 cmp al, "'" 0 00000413 740D je getstr_start_quote ; if string 0 00000415 3C22 cmp al, '"' 0 00000417 7409 je getstr_start_quote ; ditto 721 722 %if _STRNUM 0 00000419 E8ACFF call getstr_check_limit 0 0000041C 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 00000420 EB1E jmp short getstr_next 731 732 getstr_start_quote: 0 00000422 88C4 mov ah, al ; save quote character 734 getstr_loop_quoted: 0 00000424 AC lodsb 0 00000425 38E0 cmp al, ah 0 00000427 7412 je getstr_quote_quoted ; if possible end of string 0 00000429 E8[0000]EB02[0000] nearcall iseol?.notsemicolon 0 00000430 749F je short errorj2a ; if end of line 740 getstr_store_quoted: 741 %if _STRNUM 0 00000432 E893FF call getstr_check_limit 0 00000435 FF97[1800] call near [getstr_dispatch_table.string + bx] 744 %else 745 stosb ; save character and continue 746 %endif 0 00000439 EBE9 jmp short getstr_loop_quoted 748 749 getstr_quote_quoted: 0 0000043B AC lodsb 0 0000043C 38E0 cmp al, ah 0 0000043E 74F2 je getstr_store_quoted ; if doubled quote character 753 getstr_next: 0 00000440 E8[0000]EB02[0000] nearcall skipcomm0 ; go back for more 0 00000447 E8[0000]EB02[0000] nearcall iseol? 0 0000044E 7593 jne getstr_loop ; if not done yet 757 %if _STRNUM 0 00000450 5B pop bx 759 getstr_retn: 760 %endif 0 00000451 C3 retn 762 763 764 %if _STRNUM 765 getstr_numeric_byte: 0 00000452 E8BD13 nearcall getbyte ; byte in DL 0 00000455 8815 mov byte [di], dl ; store the byte 0 00000457 47 inc di 0 00000458 C3 retn 770 771 getstr_numeric_word: 0 00000459 E8A813 nearcall getword ; dx 0 0000045C 8915 mov word [di], dx ; store 0 0000045E AF scasw ; di += 2 0 0000045F C3 retn 776 777 getstr_numeric_dword: 0 00000460 53 push bx 0 00000461 E8B20D nearcall getdword ; bx:dx 0 00000464 8915 mov word [di], dx ; store 0 00000466 AF scasw ; di += 2 0 00000467 891D mov word [di], bx ; store 0 00000469 AF scasw ; di += 2 0 0000046A 5B pop bx 0 0000046B C3 retn 786 787 788 getstr_string_word: 0 0000046C AA stosb ; save character and continue 0 0000046D B000 mov al, 0 0 0000046F AA stosb 0 00000470 C3 retn 793 794 getstr_string_dword: 0 00000471 AA stosb ; save character and continue 0 00000472 B000 mov al, 0 0 00000474 AA stosb 0 00000475 AA stosb 799 getstr_string_byte: 0 00000476 AA stosb 0 00000477 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 000019EE [7703] .numeric: dw getstr_numeric_byte 0 000019F0 [7E03] dw getstr_numeric_word 0 000019F2 [8503] dw getstr_numeric_dword 0 000019F4 [9B03] .string: dw getstr_string_byte 0 000019F6 [9103] dw getstr_string_word 0 000019F8 [9603] dw getstr_string_dword 0 000019FA [FFFF] .limit: dw line_out_end - 1 0 000019FC [FEFF] dw line_out_end - 2 0 000019FE [FCFF] dw line_out_end - 4 818 819 %if _EXPRDUALCODE && _DUALCODE 820 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 820 ------------------ note: usesection lDEBUG_CODE2 821 %else 822 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 00000478 31C9 xor cx, cx ; do not allow LINES 842 .lines: section_of_function get_length 843 0 0000047A E8990D nearcall getdword 0 0000047D 4E dec si 0 0000047E 56 push si ; -> before comma 0 0000047F E8[0000]EB02[0000] nearcall skipcomma 848 0 00000486 52 push dx ; = low word of number 0 00000487 4E dec si 851 0 00000488 85C9 test cx, cx ; LINES allowed ? 0 0000048A 7923 jns @F ; no --> 854 0 0000048C BA[0000] mov dx, msg.lines 0 0000048F E8[0000]EB02[0000] nearcall isstring? ; LINES specified ? 0 00000496 7517 jne @F ; no --> 858 0 00000498 5A pop dx ; restore = low word of number 0 00000499 85DB test bx, bx ; lines must be <= 7FFFh 0 0000049B 750F jnz .error ; if > FFFFh --> 0 0000049D 85D2 test dx, dx 0 0000049F 740B jz .error ; lines mustn't be zero --> 0 000004A1 7809 js .error ; if >= 8000h --> 0 000004A3 8916[0000] mov word [getrange_lines], dx 866 ; save lines specified 0 000004A7 BA0100 mov dx, 1 ; return a placeholder size in bx:dx 0 000004AA EB13 jmp .done 869 870 .error: 0 000004AC E92CFC jmp error_expr 872 873 @@: 0 000004AF E81900 nearcall get_length_keyword 875 ; si -> terminator after length unit 876 ; (or -> after expression if no unit) 0 000004B2 5A pop dx ; restore = low word of number 0 000004B3 7513 jnz .nokeyword ; no unit given, reset to -> before comma --> 0 000004B5 E308 jcxz .noshift ; "BYTES" given --> 880 .shiftloop: 0 000004B7 D1E2 shl dx, 1 0 000004B9 D1D3 rcl bx, 1 0 000004BB 72EF jc short .error ; too large --> 0 000004BD E2F8 loop .shiftloop ; loop shifting (if it was shift count > 1) 885 .noshift: 886 .done: 0 000004BF 59 pop cx ; discard -> before comma 0 000004C0 E8[0000]EB02[0000] nearcall skipwhite ; al = next character, si -> after that 0 000004C7 C3 retn 890 891 .nokeyword: 0 000004C8 5E pop si ; restore -> before comma 0 000004C9 AC lodsb ; al = comma or other nonblank, si -> after 0 000004CA 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 000004CB 57 push di 0 000004CC BF[0000] mov di, table_length_keywords 0 000004CF A9 db __TEST_IMM16 ; (skip jcxz in first iteration) 909 @@: 0 000004D0 E30F 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 000004D2 8B0D mov cx, word [di] ; = shift count (0 if last entry of table) 0 000004D4 AF scasw ; di += 2 0 000004D5 8B15 mov dx, word [di] ; -> keyword in allcaps ASCIZ 0 000004D7 AF scasw ; di += 2 0 000004D8 E8[0000]EB02[0000] nearcall isstring? ; this keyword matches ? 0 000004DF 75EF jne @B ; no, loop --> (NZ, si unchanged) 919 ; matched, si is advanced -> past the keyword 920 ; ZR 921 922 .gotsize: 0 000004E1 5F pop di 0 000004E2 C3 retn 925 926 927 isbracketorunaryoperator?: section_of_function 0 000004E3 E80900 nearcall isunaryoperator? 0 000004E6 7406 je .yes 930 %if _INDIRECTION 0 000004E8 3C5B cmp al, '[' 0 000004EA 7402 je .yes 933 %endif 0 000004EC 3C28 cmp al, '(' 935 .yes: 0 000004EE 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 000004EF 57 push di 0 000004F0 BF[5800] mov di, unaryoperators ; -> countedw 0 000004F3 EB04 jmp short isoperator?.common 948 949 ; See previous description. 950 isoperator?: section_of_function 0 000004F5 57 push di 0 000004F6 BF[4000] mov di, operators ; -> countedw 953 .common: 0 000004F9 8B0D mov cx, word [di] ; get amount of scan byte entries 0 000004FB 51 push cx 0 000004FC AF scasw ; skip amount 0 000004FD F2AE repne scasb ; scan, cx = remainder of entries 0 000004FF 5F pop di ; = amount 0 00000500 7506 jne .no ; --> (NZ) 960 ; neg cx = not cx \ inc cx 961 ; therefore not cx = neg cx \ dec cx 0 00000502 F7D1 not cx ; minus remainder minus 1 0 00000504 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 00000506 38C0 cmp al, al ; NC, ZR 968 .no: 0 00000508 5F pop di 0 00000509 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 0000050A E8[0000]EB02[0000] nearcall capitalise 0 00000511 51 push cx 981 %if _EXPRESSIONS 0 00000512 3C41 cmp al, 'A' 0 00000514 7204 jb @F 0 00000516 3C5A cmp al, 'Z' 0 00000518 7605 jbe @FF 986 @@: 0 0000051A E8D8FF nearcall isoperator? ; normal operators are separators (also handles equality sign) 0 0000051D 740A je .yes ; if match --> (ZR, NC) 989 @@: 990 %endif 0 0000051F 57 push di 0 00000520 BF[A40C] mov di, separators 0 00000523 8B0D mov cx, word [di] ; = amount of scan byte entries 0 00000525 AF scasw ; skip amount 0 00000526 F2AE repne scasb ; ZR, NC on match, NZ else 0 00000528 5F pop di 997 .yes: 0 00000529 59 pop cx 0 0000052A 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 0000052B E8[0000]EB02[0000] nearcall capitalise 0 00000532 3C2E cmp al, '.' 0 00000534 7404 je .ret_NZ 0 00000536 3C4C cmp al, 'L' 0 00000538 75D0 jne . 1011 .ret_NZ: 0 0000053A 84C0 test al, al 0 0000053C 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 0000053D B90800 mov cx, maxtypesize+1 ; = maximum count + 1 1044 %else 1045 mov cx, maxtypesize ; = maximum count 1046 %endif 1047 ; cx is even here! 0 00000540 52 push dx 0 00000541 50 push ax 0 00000542 56 push si 1051 0 00000543 29CC sub sp, cx ; allocate name buffer 0 00000545 89E7 mov di, sp ; -> name buffer 0 00000547 57 push di 0 00000548 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 0000054A A9 db __TEST_IMM16 ; (skip stosb and lodsb) 1065 .storename: 0 0000054B AA stosb ; store in name buffer 0 0000054C AC lodsb ; get next character to check 0 0000054D E8[0000]EB02[0000] nearcall capitalise 0 00000554 51 push cx 0 00000555 E88BFF nearcall isbracketorunaryoperator?; terminator ? 0 00000558 59 pop cx 0 00000559 741B je .endname 0 0000055B E8[0000]EB02[0000] nearcall iseol? 0 00000562 7412 je .endname 0 00000564 3C20 cmp al, 32 0 00000566 740E je .endname 0 00000568 3C09 cmp al, 9 0 0000056A 740A je .endname 0 0000056C 3C2C cmp al, ',' 0 0000056E 7406 je .endname ; yes --> 1081 ; We don't check for digits here. 1082 ; Immediate values and variables 1083 ; must leave a space inbetween. 0 00000570 43 inc bx ; count characters 0 00000571 E2D8 loop .storename ; count remaining buffer space 1086 ; Here, the potential name was too 1087 ; long for a valid type name. 0 00000573 F9 stc 0 00000574 EB23 jmp short .done ; --> 1090 1091 .endname: 0 00000576 E8[0000]EB02[0000] nearcall skipwh0 ; skip to next field 0 0000057D 4E dec si ; -> behind potential name 0 0000057E 5F pop di ; -> name buffer 0 0000057F 89D9 mov cx, bx ; cx = length 0 00000581 56 push si ; save position in input line 0 00000582 89FE mov si, di ; si-> name buffer 0 00000584 53 push bx 0 00000585 57 push di 0 00000586 F8 clc ; indicate unsigned check 0 00000587 E81900 nearcall isunsignedtype? ; matches an unsigned type ? 0 0000058A 5E pop si 0 0000058B 59 pop cx 0 0000058C 730B jnc .done ; yes --> 1105 0 0000058E AC lodsb ; al = first, si-> second character 0 0000058F 49 dec cx ; cx = length less one 0 00000590 3C53 cmp al, 'S' ; first character an "S" ? 0 00000592 F9 stc ; (indicate signed check, or: no type) 0 00000593 7504 jne .done ; no, not signed either --> 0 00000595 E80B00 nearcall isunsignedtype? ; matches an unsigned type now ? 0 00000598 43 inc bx ; if NC, set to indicate signed type 1113 .done: 0 00000599 9F lahf 0 0000059A 5F pop di ; if NC, -> behind matched type name 0 0000059B 83C408 add sp, (maxtypesize+1) & ~1 ; discard name buffer 0 0000059E 5E pop si 0 0000059F 9E sahf 0 000005A0 58 pop ax 0 000005A1 5A pop dx 0 000005A2 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 000005A3 BF[0000] mov di, types 0 000005A6 19D2 sbb dx, dx ; 0FFFFh if signed check else 0 0 000005A8 E352 jcxz .notype ; if zero characters --> 0 000005AA 83F902 cmp cx, 2 0 000005AD 750C jne @F 0 000005AF 813C4348 cmp word [si], "CH" 0 000005B3 7447 je .notype 0 000005B5 813C3342 cmp word [si], "3B" 0 000005B9 7441 je .notype 1142 @@: 0 000005BB E214 loop .single_character_checked ; if not single character --> 1144 0 000005BD AC lodsb ; get that character 0 000005BE 3C53 cmp al, 'S' ; specified "S" or "SS" ? 0 000005C0 743A je .notype ; yes, not allowed --> 0 000005C2 08D0 or al, dl ; iff signed check, al |= 0FFh 0 000005C4 4E dec si ; (restore) 0 000005C5 3C33 cmp al, '3' 0 000005C7 7433 je .notype 0 000005C9 3C41 cmp al, 'A' ; specified only a valid digit ? 0 000005CB 7204 jb .single_character_checked 0 000005CD 3C47 cmp al, 'F'+1 0 000005CF 722B jb .notype ; yes, not allowed --> 1156 1157 .single_character_checked: 0 000005D1 41 inc cx ; (restore) 1159 %if _LINK_COMPAT 0 000005D2 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 000005D6 31C0 xor ax, ax ; initialise ah, and ax = 0 first 0 000005D8 31DB xor bx, bx 0 000005DA 87FE xchg di, si 0 000005DC 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 000005E0 A9 db __TEST_IMM16 ; (skip two times inc bx) 1183 .loop: 0 000005E1 43 inc bx 0 000005E2 43 inc bx ; increase index 0 000005E3 01C6 add si, ax ; -> next table entry 0 000005E5 AC lodsb ; ax = length of full name 0 000005E6 39D6 cmp si, dx ; checked all allowed names? 0 000005E8 7312 jae .notype ; yes, done --> 0 000005EA 39C8 cmp ax, cx ; full name large enough ? 0 000005EC 72F3 jb .loop ; no --> 0 000005EE 57 push di 0 000005EF 51 push cx 0 000005F0 56 push si 0 000005F1 F3A6 repe cmpsb ; potential name matches ? 0 000005F3 5E pop si 0 000005F4 59 pop cx 0 000005F5 5F pop di 0 000005F6 75E9 jne .loop ; no --> 1200 0 000005F8 80E3FC and bl, ~3 ; conflate alternative type names 0 000005FB A8 db __TEST_IMM8 ; (NC, skip stc) 1203 .notype: 0 000005FC F9 stc 0 000005FD 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 00001A00 0001 db 0, 1b ; byte 0 00001A02 0003 db 0, 11b ; word 0 00001A04 0007 db 0, 111b ; 3byte 0 00001A06 000F db 0, 1111b ; dword 0 00001A08 000F db 0, 1111b ; pointer 0 00001A0A 0003 db 0, 11b ; offset 0 00001A0C 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 00001A0E [3605] dw handlebyte 0 00001A10 [4105] dw handleword 0 00001A12 [2905] dw handle3byte 0 00001A14 [4C05] dw handledword 0 00001A16 [5405] dw handlepointer 0 00001A18 [4105] dw handleoffset 0 00001A1A [2305] dw handlesegment 1276 1277 1278 %if _EXPRDUALCODE && _DUALCODE 1279 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 1279 ------------------ note: usesection lDEBUG_CODE2 1280 %else 1281 usesection lDEBUG_CODE 1282 %endif 1283 1284 handlesegment: section_of_function 0 000005FE 89DA mov dx, bx 0 00000600 30E4 xor ah, ah ; NC, ah = 0 0 00000602 EB18 jmp short handleword 1288 handleoffset equ handleword 1289 1290 handle3byte: section_of_function 0 00000604 B700 mov bh, 0 0 00000606 7307 jnc .zero ; (iff unsigned type -->) 0 00000608 84DB test bl, bl ; signed ? 0 0000060A 7902 jns .zero_f ; no --> 0 0000060C FECF dec bh 1296 .zero_f: 0 0000060E 9E sahf ; restore CF 1298 .zero: 0 0000060F EB16 jmp handledword 1300 1301 handlebyte: section_of_function 0 00000611 B600 mov dh, 0 0 00000613 7307 jnc .zero ; (iff unsigned type -->) 0 00000615 84D2 test dl, dl ; signed ? 0 00000617 7902 jns .zero_f ; no --> 0 00000619 FECE dec dh 1307 .zero_f: 0 0000061B 9E sahf ; restore CF 1309 .zero: 1310 handleword: section_of_function 0 0000061C BB0000 mov bx, 0 0 0000061F 7306 jnc .zero ; (iff unsigned type -->) 0 00000621 85D2 test dx, dx ; signed ? 0 00000623 7901 jns .zero_f ; no --> 0 00000625 4B dec bx 1316 .zero_f: 0 00000626 9E sahf ; restore CF 1318 .zero: 1319 handledword: section_of_function 0 00000627 7203 jc .signed ; if signed --> 0 00000629 30E4 xor ah, ah ; return pointer=0 signed=0 0 0000062B C3 retn 1323 1324 .signed: 0 0000062C B440 mov ah, 40h ; return pointer=0 signed=1 0 0000062E C3 retn 1327 1328 handlepointer: section_of_function 0 0000062F B480 mov ah, 80h ; return pointer=1 signed=0 0 00000631 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 00001A1C 15006F4F6141785863 .: countedw "oOaAxXcC?","+-*/%<>=!|&^" 0 00001A25 433F2B2D2A2F253C3E 0 00001A2E 3D217C265E 1341 .amount: equ $ - . - 2 0 00001A33 00 align 2, db 0 1343 unaryoperators: 0 00001A34 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 00001A3B 00 align 2, db 0 1359 unaryoperatorhandlers: 1360 .: 0 00001A3C [6A05] dw uoh_plus ; + 0 00001A3E [6005] dw uoh_minus ; - 0 00001A40 [6B05] dw uoh_not_bitwise ; ~ 0 00001A42 [7205] dw uoh_not_boolean ; ! 0 00001A44 [5705] 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 === Switch to base=01F580h -> "LDEBUG_CODE2" 1373 ------------------ note: usesection lDEBUG_CODE2 1374 %else 1375 usesection lDEBUG_CODE 1376 %endif 1377 1378 uoh_abs: section_of_function 0 00000632 80E4BF and ah, ~ 40h ; make type signed=0 0 00000635 F6C780 test bh, 80h ; negative ? 0 00000638 7504 jnz calculate_minus_bxdx; yes --> 0 0000063A C3 retn ; no, done 1383 1384 uoh_minus: section_of_function 0 0000063B 80CC40 or ah, 40h ; make type signed=1 1386 calculate_minus_bxdx: section_of_function 0 0000063E F7DB neg bx 0 00000640 F7DA neg dx 0 00000642 83DB00 sbb bx, byte 0 ; neg bx:dx 1390 uoh_plus: section_of_function ; (nop) 0 00000645 C3 retn 1392 1393 uoh_not_bitwise: section_of_function 0 00000646 B400 mov ah, 0 ; make type pointer=0 signed=0 0 00000648 F7D3 not bx 0 0000064A F7D2 not dx 0 0000064C C3 retn 1398 1399 uoh_not_boolean: section_of_function 0 0000064D B400 mov ah, 0 ; make type pointer=0 signed=0 0 0000064F E8CE01 nearcall toboolean 0 00000652 80F201 xor dl, 1 ; toggle only bit 0 0 00000655 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 000019DC ?? OPPREC_INVALID: resb 1 0 000019DD ?? OPPREC_COND: resb 1 0 000019DE ?? OPPREC_BOOL_OR: resb 1 0 000019DF ?? OPPREC_BOOL_XOR:resb 1 0 000019E0 ?? OPPREC_BOOL_AND:resb 1 0 000019E1 ?? OPPREC_COMPARE: resb 1 0 000019E2 ?? OPPREC_BIT_OR: resb 1 0 000019E3 ?? OPPREC_BIT_XOR: resb 1 0 000019E4 ?? OPPREC_BIT_AND: resb 1 0 000019E5 ?? OPPREC_BIT_CLR: resb 1 0 000019E6 ?? OPPREC_SHIFT: resb 1 0 000019E7 ?? OPPREC_ADDSUB: resb 1 0 000019E8 ?? OPPREC_MULDIV: resb 1 0 000019E9 ?? 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 000019DC ?? OPERATOR_INVALID: resb 1 ; 0 - invalid 0 000019DD ?? OPERATOR_PLUS: resb 1 ; + 0 000019DE ?? OPERATOR_MINUS: resb 1 ; - 0 000019DF ?? OPERATOR_MULTIPLY: resb 1 ; * 0 000019E0 ?? OPERATOR_DIVIDE: resb 1 ; / 0 000019E1 ?? OPERATOR_MODULO: resb 1 ; % 0 000019E2 ?? OPERATOR_POWER: resb 1 ; ** 0 000019E3 ?? OPERATOR_CMP_BELOW: resb 1 ; < 0 000019E4 ?? OPERATOR_CMP_BELOW_EQUAL: resb 1 ; <= 0 000019E5 ?? OPERATOR_CMP_ABOVE: resb 1 ; > 0 000019E6 ?? OPERATOR_CMP_ABOVE_EQUAL: resb 1 ; >= 0 000019E7 ?? OPERATOR_CMP_EQUAL: resb 1 ; == 0 000019E8 ?? OPERATOR_CMP_NOT_EQUAL: resb 1 ; != 0 000019E9 ?? OPERATOR_SHIFT_LEFT: resb 1 ; << 0 000019EA ?? OPERATOR_SHIFT_RIGHT: resb 1 ; >> 0 000019EB ?? OPERATOR_SHIFT_RIGHT_SIGNED: resb 1 ; >>> 0 000019EC ?? OPERATOR_BIT_MIRROR: resb 1 ; >< 0 000019ED ?? OPERATOR_BIT_CLR: resb 1 ; clr (bitwise AND with bitwise NOT) 0 000019EE ?? OPERATOR_BIT_OR: resb 1 ; | 0 000019EF ?? OPERATOR_BIT_XOR: resb 1 ; ^ 0 000019F0 ?? OPERATOR_BIT_AND: resb 1 ; & 0 000019F1 ?? OPERATOR_BOOL_OR: resb 1 ; || 0 000019F2 ?? OPERATOR_BOOL_XOR: resb 1 ; ^^ 0 000019F3 ?? OPERATOR_BOOL_AND: resb 1 ; && 0 000019F4 ?? OPERATOR_COND: resb 1 ; ?? :: construct (special) 0 000019F5 ?? 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 00001A46 [D405] dw od_o ; o 0 00001A48 [D405] dw od_o ; O 0 00001A4A [D405] dw od_a ; a 0 00001A4C [D405] dw od_a ; A 0 00001A4E [D405] dw od_x ; x 0 00001A50 [D405] dw od_x ; X 0 00001A52 [D405] dw od_c ; c 0 00001A54 [D405] dw od_c ; C 0 00001A56 [D405] dw od_cond ; ? 1455 0 00001A58 [D305] dw od_plus ; + 0 00001A5A [D305] dw od_minus ; - 0 00001A5C [7B05] dw od_multiply ; * ** 0 00001A5E [D305] dw od_divide ; / 0 00001A60 [D305] dw od_modulo ; % 0 00001A62 [A205] dw od_below ; < <> <= << 0 00001A64 [8305] dw od_above ; > >< >= >> >>> 0 00001A66 [B505] dw od_equal ; == =< => 0 00001A68 [C305] dw od_not ; != 0 00001A6A [CB05] dw od_or ; | || 0 00001A6C [CB05] dw od_and ; & && 0 00001A6E [CB05] 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 00001A70 1200 dw OPERATOR_BIT_OR ; o 0 00001A72 1200 dw OPERATOR_BIT_OR ; O 0 00001A74 1400 dw OPERATOR_BIT_AND ; a 0 00001A76 1400 dw OPERATOR_BIT_AND ; A 0 00001A78 1300 dw OPERATOR_BIT_XOR ; x 0 00001A7A 1300 dw OPERATOR_BIT_XOR ; X 0 00001A7C 1100 dw OPERATOR_BIT_CLR ; c 0 00001A7E 1100 dw OPERATOR_BIT_CLR ; C 0 00001A80 1800 dw OPERATOR_COND ; ? 1490 0 00001A82 0100 dw OPERATOR_PLUS ; + 0 00001A84 0200 dw OPERATOR_MINUS ; - 0 00001A86 0300 dw OPERATOR_MULTIPLY ; * ** 0 00001A88 0400 dw OPERATOR_DIVIDE ; / 0 00001A8A 0500 dw OPERATOR_MODULO ; % 0 00001A8C 0C00 dw OPERATOR_CMP_NOT_EQUAL ; < <> <= << 0 00001A8E 0900 dw OPERATOR_CMP_ABOVE ; > >< >= >> >>> 0 00001A90 0B00 dw OPERATOR_CMP_EQUAL ; == =< => 0 00001A92 0C00 dw OPERATOR_CMP_NOT_EQUAL ; != 0 00001A94 1200 dw OPERATOR_BIT_OR ; | || 0 00001A96 1400 dw OPERATOR_BIT_AND ; & && 0 00001A98 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 00001A9A [0000] dw msg.r ; o 0 00001A9C [0000] dw msg.r ; O 0 00001A9E [0000] dw msg.nd ; a 0 00001AA0 [0000] dw msg.nd ; A 0 00001AA2 [0000] dw msg.or ; x 0 00001AA4 [0000] dw msg.or ; X 0 00001AA6 [0000] dw msg.lr ; c 0 00001AA8 [0000] dw msg.lr ; C 0 00001AAA [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 00001AAC 00 db OPPREC_INVALID ; need this for some checks 0 00001AAD 0B db OPPREC_ADDSUB ; + 0 00001AAE 0B db OPPREC_ADDSUB ; - 0 00001AAF 0C db OPPREC_MULDIV ; * 0 00001AB0 0C db OPPREC_MULDIV ; / 0 00001AB1 0C db OPPREC_MULDIV ; % 0 00001AB2 0D db OPPREC_POWER ; ** 0 00001AB3 05 db OPPREC_COMPARE ; < 0 00001AB4 05 db OPPREC_COMPARE ; <= 0 00001AB5 05 db OPPREC_COMPARE ; > 0 00001AB6 05 db OPPREC_COMPARE ; >= 0 00001AB7 05 db OPPREC_COMPARE ; == 0 00001AB8 05 db OPPREC_COMPARE ; != 0 00001AB9 0A db OPPREC_SHIFT ; << 0 00001ABA 0A db OPPREC_SHIFT ; >> 0 00001ABB 0A db OPPREC_SHIFT ; >>> 0 00001ABC 0A db OPPREC_SHIFT ; >< 0 00001ABD 09 db OPPREC_BIT_CLR ; clr 0 00001ABE 06 db OPPREC_BIT_OR ; | 0 00001ABF 07 db OPPREC_BIT_XOR ; ^ 0 00001AC0 08 db OPPREC_BIT_AND ; & 0 00001AC1 02 db OPPREC_BOOL_OR ; || 0 00001AC2 03 db OPPREC_BOOL_XOR ; ^^ 0 00001AC3 04 db OPPREC_BOOL_AND ; && 0 00001AC4 01 db OPPREC_COND ; ?? :: construct 0 00001AC5 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 00001AC6 [0000] dw error_expr ; should not be called 0 00001AC8 [0106] dw of_plus ; + 0 00001ACA [FE05] dw of_minus ; - 0 00001ACC [0E06] dw of_multiply ; * 0 00001ACE [3406] dw of_divide ; / 0 00001AD0 [DE05] dw of_modulo ; % 0 00001AD2 [CE06] dw of_power ; ** 0 00001AD4 [2707] dw of_compare_below ; < 0 00001AD6 [2107] dw of_compare_below_equal ; <= 0 00001AD8 [3F07] dw of_compare_above ; > 0 00001ADA [3907] dw of_compare_above_equal ; >= 0 00001ADC [3307] dw of_compare_equal ; == 0 00001ADE [2D07] dw of_compare_not_equal ; != 0 00001AE0 [7A07] dw of_shift_left ; << 0 00001AE2 [6207] dw of_shift_right ; >> 0 00001AE4 [6E07] dw of_shift_right_signed ; >>> 0 00001AE6 [A107] dw of_bit_mirror ; >< 0 00001AE8 [FE07] dw of_clr_bitwise ; clr 0 00001AEA [EC07] dw of_or_bitwise ; | 0 00001AEC [1308] dw of_xor_bitwise ; ^ 0 00001AEE [0208] dw of_and_bitwise ; & 0 00001AF0 [F707] dw of_or_boolean ; || 0 00001AF2 [1D08] dw of_xor_boolean ; ^^ 0 00001AF4 [0C08] dw of_and_boolean ; && 0 00001AF6 [A616] dw of_cond ; ?? :: construct 0 00001AF8 [4F07] 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 === Switch to base=01F580h -> "LDEBUG_CODE2" 1663 ------------------ note: usesection lDEBUG_CODE2 1664 %else 1665 usesection lDEBUG_CODE 1666 %endif 1667 1668 1669 od_multiply: section_of_function 0 00000656 3804 cmp byte [si], al 0 00000658 7503 jne .ret 0 0000065A 46 inc si 0 0000065B B306 mov bl, OPERATOR_POWER 1674 .ret: 0 0000065D C3 retn 1676 1677 od_above: section_of_function 0 0000065E 3804 cmp byte [si], al 0 00000660 740E je .shr 0 00000662 803C3C cmp byte [si], '<' 0 00000665 7412 je .mirror 0 00000667 803C3D cmp byte [si], '=' 0 0000066A 7542 jne od_retn 1684 .cmp_ae: 0 0000066C 46 inc si 0 0000066D B30A mov bl, OPERATOR_CMP_ABOVE_EQUAL 0 0000066F C3 retn 1688 .shr: 0 00000670 46 inc si 0 00000671 3804 cmp byte [si], al 0 00000673 B30F mov bl, OPERATOR_SHIFT_RIGHT_SIGNED 0 00000675 7404 je .inc_si 1693 %if OPERATOR_SHIFT_RIGHT_SIGNED - 1 != OPERATOR_SHIFT_RIGHT 1694 %error Unexpected layout 1695 %endif 0 00000677 4B dec bx ; = OPERATOR_SHIFT_RIGHT 0 00000678 C3 retn 1698 .mirror: 0 00000679 B310 mov bl, OPERATOR_BIT_MIRROR 1700 .inc_si: 0 0000067B 46 inc si 0 0000067C C3 retn 1703 1704 od_below: section_of_function 0 0000067D 3804 cmp byte [si], al 0 0000067F 740C je .shl 0 00000681 803C3E cmp byte [si], '>' 0 00000684 7408 je .ncmp ; (default index) 0 00000686 B307 mov bl, OPERATOR_CMP_BELOW 0 00000688 803C3D cmp byte [si], '=' 0 0000068B 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 0000068D 43 inc bx 1722 .ncmp: 1723 od_not.ncmp: 1724 od_equal.inc_si: 0 0000068E 46 inc si 0 0000068F C3 retn 1727 1728 od_equal: section_of_function 0 00000690 803C3E cmp byte [si], '>' 0 00000693 74D7 je od_above.cmp_ae 0 00000695 803C3C cmp byte [si], '<' 0 00000698 74F3 je od_below.cmp_be 0 0000069A 3804 cmp byte [si], al 0 0000069C 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 0000069E 803C3D cmp byte [si], '=' 0 000006A1 74EB je .ncmp ; (default index) 1741 od_equal.invalid: 1742 od_string_common.invalid: 0 000006A3 B300 mov bl, OPERATOR_INVALID 0 000006A5 C3 retn 1745 1746 od_or: section_of_function 1747 od_and: section_of_function 1748 od_xor: section_of_function 0 000006A6 3804 cmp byte [si], al 0 000006A8 7504 jne od_retn 0 000006AA 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 000006AB 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 000006AE 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 000006AF E8[0000]EB02[0000] nearcall isstring? 0 000006B6 75EB jne .invalid 0 000006B8 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 000006B9 FF36[BA0C] push word [hhvar+2] 0 000006BD FF36[B80C] push word [hhvar] 0 000006C1 53 push bx 0 000006C2 52 push dx 0 000006C3 E86D00 call of_divide.no_hh_div; bx:dx := prev / foll 0 000006C6 8F06[B80C] pop word [hhvar] 0 000006CA 8F06[BA0C] pop word [hhvar+2] 0 000006CE E81800 nearcall of_multiply ; bx:dx := (prev / foll) * foll 0 000006D1 8F06[B80C] pop word [hhvar] 0 000006D5 8F06[BA0C] pop word [hhvar+2] 1868 ; jmp short of_minus ; bx:dx := prev - ((prev / foll) * foll) 1869 1870 of_minus: section_of_function 0 000006D9 E862FF nearcall calculate_minus_bxdx 1872 of_plus: section_of_function 0 000006DC 0316[B80C] add dx, word [hhvar] 0 000006E0 131E[BA0C] adc bx, word [hhvar+2] 1875 or_hhtype: section_of_function 0 000006E4 0A26[C90C] or ah, byte [hhtype] 0 000006E8 C3 retn 1878 1879 of_multiply: section_of_function; bx:dx := var * bx:dx 0 000006E9 0826[C90C] or byte [hhtype], ah 0 000006ED 57 push di ; di is used as temporary storage 0 000006EE 89D0 mov ax, dx ; low word 0 000006F0 50 push ax ; save low word 0 000006F1 F726[B80C] mul word [hhvar] ; low * low 0 000006F5 97 xchg di, ax ; di = low word result, clobber ax 0 000006F6 58 pop ax 0 000006F7 53 push bx 0 000006F8 89D3 mov bx, dx ; bx = high word result 1 0 000006FA F726[BA0C] mul word [hhvar+2] ; low * high 0 000006FE 01C3 add bx, ax ; bx = high word result 1 plus low * high 0 00000700 58 pop ax ; high word 0 00000701 F726[B80C] mul word [hhvar] 0 00000705 01C3 add bx, ax ; bx = high word result 1894 ; bx*[hhvar+2] not required, completely overflows 0 00000707 89FA mov dx, di ; dx = low word result 0 00000709 5F pop di ; restore those 1897 set_hhtype: section_of_function 0 0000070A 8A26[C90C] mov ah, byte [hhtype] 0 0000070E C3 retn 1900 1901 of_divide: section_of_function ; bx:dx := var / bx:dx 1902 %if _HHDIVREMAIN 0 0000070F 833E[C40C]01 cmp word [hh_depth], 1 0 00000714 751D jne @F 0 00000716 C606[CA0C]FF mov byte [hh_div_active], -1 0 0000071B 8916[C00C] mov word [hh_div_divisor], dx 0 0000071F 891E[C20C] mov word [hh_div_divisor + 2], bx 0 00000723 FF36[BA0C] push word [hhvar + 2] 0 00000727 FF36[B80C] push word [hhvar] 0 0000072B 8F06[BC0C] pop word [hh_div_dividend] 0 0000072F 8F06[BE0C] pop word [hh_div_dividend + 2] 1912 @@: 1913 %endif 1914 .no_hh_div: 0 00000733 0826[C90C] or byte [hhtype], ah 0 00000737 53 push bx 0 00000738 09D3 or bx, dx ; divisor zero ? 0 0000073A 5B pop bx 0 0000073B 7448 jz short .error ; divisor zero ! 0 0000073D EB49 _386_jmps .32 ; 386, use 32-bit code --> 1921 %ifn _ONLY386 0 0000073F 85DB test bx, bx ; need only 16-bit divisor ? 0 00000741 7512 jnz .difficultdiv16 ; nope --> 0 00000743 89D1 mov cx, dx 0 00000745 31D2 xor dx, dx 0 00000747 A1[BA0C] mov ax, word [hhvar+2] ; dx:ax = high word of previous number 0 0000074A F7F1 div cx 0 0000074C 93 xchg bx, ax ; bx = ax, clobber ax 0 0000074D A1[B80C] mov ax, word [hhvar] ; ax = low word of previous number, dx = remainder 0 00000750 F7F1 div cx 0 00000752 92 xchg dx, ax ; bx:dx = result, clobber ax 0 00000753 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 00000755 B92000 mov cx, 32 0 00000758 55 push bp 0 00000759 56 push si 0 0000075A 57 push di 0 0000075B A1[B80C] mov ax, word [hhvar] 0 0000075E 8B2E[BA0C] mov bp, word [hhvar+2] ; bp:ax = previous number 0 00000762 31FF xor di, di 0 00000764 31F6 xor si, si ; clear variable si:di 0 00000766 92 xchg ax, dx 0 00000767 87EB xchg bp, bx ; bx:dx = previous number, bp:ax = divisor 1946 .bitloop: 0 00000769 D1E2 shl dx, 1 0 0000076B D1D3 rcl bx, 1 0 0000076D D1D7 rcl di, 1 0 0000076F D1D6 rcl si, 1 ; si:di:bx:dx << 1 0 00000771 39EE cmp si, bp ; does the divisor fit into si:di here ? 0 00000773 7502 jne @F 0 00000775 39C7 cmp di, ax 1954 @@: 0 00000777 7205 jb .trynext ; no --> 1956 .goesinto: 0 00000779 29C7 sub di, ax 0 0000077B 19EE sbb si, bp ; subtract divisor 0 0000077D 42 inc dx ; set a bit of the result (bit was zero before, never carries) 1960 .trynext: 0 0000077E E2E9 loop .bitloop ; loop for 32 bits 0 00000780 5F pop di 0 00000781 5E pop si 0 00000782 5D pop bp 0 00000783 EB85 jmp set_hhtype 1966 %endif 1967 1968 .error: 0 00000785 E953F9 jmp error_expr 1970 1971 %ifn _ONLYNON386 1972 .32: 1973 [cpu 386] 0 00000788 6650 push eax 0 0000078A 6653 push ebx 0 0000078C 6652 push edx ; to preserve the high words 0 0000078E 53 push bx 0 0000078F 52 push dx 0 00000790 665B pop ebx ; ebx = following number 0 00000792 6631D2 xor edx, edx 0 00000795 66A1[B80C] mov eax, dword [hhvar] ; edx:eax = previous number 0 00000799 66F7F3 div ebx 0 0000079C 665A pop edx 0 0000079E 665B pop ebx ; restore high words 0 000007A0 6650 push eax 0 000007A2 5A pop dx 0 000007A3 5B pop bx ; bx:dx = result 0 000007A4 6658 pop eax ; restore high word of eax 1989 __CPU__ 0 000007A6 E961FF jmp set_hhtype 1991 %endif 1992 1993 1994 of_power: section_of_function 0 000007A9 0826[C90C] or byte [hhtype], ah 0 000007AD 89D9 mov cx, bx 0 000007AF 89D0 mov ax, dx ; get exponent 0 000007B1 09D3 or bx, dx ; exponent zero ? 0 000007B3 BB0000 mov bx, 0 0 000007B6 BA0100 mov dx, 1 0 000007B9 743E jz .ret ; yes, return with result as 1 --> 0 000007BB 3916[B80C] cmp word [hhvar], dx ; optimization: 0 000007BF 7506 jne .notone 0 000007C1 391E[BA0C] cmp word [hhvar+2], bx 0 000007C5 7432 je .ret ; if base is one (and exponent not zero), result is 1 --> 2006 .notone: 0 000007C7 55 push bp 2008 2009 .loop: ; cx:ax non-zero here 0 000007C8 D1E9 shr cx, 1 0 000007CA D1D8 rcr ax, 1 ; exponent /= 2 0 000007CC 50 push ax 0 000007CD 51 push cx 0 000007CE 7303 jnc .even ; if exponent was even --> 0 000007D0 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 000007D3 53 push bx 0 000007D4 52 push dx 0 000007D5 8B1E[BA0C] mov bx, word [hhvar+2] 0 000007D9 8B16[B80C] mov dx, word [hhvar] ; base 0 000007DD E809FF nearcall of_multiply ; * base = base squared 0 000007E0 891E[BA0C] mov word [hhvar+2], bx 0 000007E4 8916[B80C] mov word [hhvar], dx ; store as new base 0 000007E8 5A pop dx 0 000007E9 5B pop bx 0 000007EA 59 pop cx 0 000007EB 58 pop ax 2030 0 000007EC 89DD mov bp, bx ; optimization: 0 000007EE 09D5 or bp, dx ; register now zero ? 0 000007F0 7406 jz .ret_bp ; if so, return now --> (multiplying zero always results in zero) 0 000007F2 89CD mov bp, cx 0 000007F4 09C5 or bp, ax ; exponent now zero ? 0 000007F6 75D0 jnz .loop ; no, loop --> 2037 2038 .ret_bp: 0 000007F8 5D pop bp 2040 .ret: 0 000007F9 E90EFF jmp set_hhtype 2042 2043 of_compare_below_equal: section_of_function 0 000007FC E82C00 nearcall of_helper_compare 0 000007FF 7628 jbe of_helper_compare_true 0 00000801 C3 retn 2047 2048 of_compare_below: section_of_function 0 00000802 E82600 nearcall of_helper_compare 0 00000805 7222 jb of_helper_compare_true 0 00000807 C3 retn 2052 2053 of_compare_not_equal: section_of_function 0 00000808 E82000 nearcall of_helper_compare 0 0000080B 751C jne of_helper_compare_true 0 0000080D C3 retn 2057 2058 of_compare_equal: section_of_function 0 0000080E E81A00 nearcall of_helper_compare 0 00000811 7416 je of_helper_compare_true 0 00000813 C3 retn 2062 2063 of_compare_above_equal: section_of_function 0 00000814 E81400 nearcall of_helper_compare 0 00000817 7310 jae of_helper_compare_true 0 00000819 C3 retn 2067 2068 of_compare_above: section_of_function 0 0000081A E80E00 nearcall of_helper_compare 0 0000081D 770A ja of_helper_compare_true 0 0000081F 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 00000820 09D3 or bx, dx ; = 0 iff it was 0000_0000h 0 00000822 83FB01 cmp bx, byte 1 ; CY iff it was 0000_0000h, else NC 0 00000825 19D2 sbb dx, dx ; -1 iff it was 0000_0000h, else 0 0 00000827 31DB xor bx, bx 2085 2086 ; INP: dx 2087 ; OUT: dx += 1 2088 of_helper_compare_true: section_of_function 0 00000829 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 0000082A 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 0000082B 30E4 xor ah, ah ; type signed=0 pointer=0 0 0000082D 391E[BA0C] cmp word [hhvar+2], bx 0 00000831 7504 jne .ret 0 00000833 3916[B80C] cmp word [hhvar], dx 2117 .ret: 0 00000837 BB0000 mov bx, 0 0 0000083A 89DA mov dx, bx ; set both to zero (without affecting flags) 0 0000083C C3 retn 2121 2122 of_shift_right: section_of_function 0 0000083D 30E4 xor ah, ah 0 0000083F E81F00 nearcall of_helper_getshiftdata 2125 .loop: 0 00000842 D1EB shr bx, 1 0 00000844 D1DA rcr dx, 1 0 00000846 E2FA loop .loop 0 00000848 C3 retn 2130 2131 of_shift_right_signed: section_of_function 0 00000849 B440 mov ah, 40h 0 0000084B E81300 nearcall of_helper_getshiftdata 2134 .loop: 0 0000084E D1FB sar bx, 1 0 00000850 D1DA rcr dx, 1 0 00000852 E2FA loop .loop 0 00000854 C3 retn 2139 2140 of_shift_left: section_of_function 0 00000855 30E4 xor ah, ah 0 00000857 E80700 nearcall of_helper_getshiftdata 2143 .loop: 0 0000085A D1E2 shl dx, 1 0 0000085C D1D3 rcl bx, 1 0 0000085E E2FA loop .loop 0 00000860 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 00000861 89D1 mov cx, dx 0 00000863 85DB test bx, bx 0 00000865 7505 jnz .largeshift 0 00000867 83FA20 cmp dx, byte 32 0 0000086A 7203 jb .normalshift 2173 .largeshift: 0 0000086C B92000 mov cx, 32 ; fix at maximal shift count 2175 .normalshift: 0 0000086F 8B16[B80C] mov dx, word [hhvar] 0 00000873 8B1E[BA0C] mov bx, word [hhvar+2] 0 00000877 E301 jcxz .break ; shift count zero, return input --> 0 00000879 C3 retn 2180 2181 .break: 0 0000087A 59 pop cx ; discard near return address 0 0000087B C3 retn 2184 2185 of_bit_mirror: section_of_function 0 0000087C 30E4 xor ah, ah 0 0000087E 89D1 mov cx, dx 0 00000880 85DB test bx, bx 0 00000882 7505 jnz .large 0 00000884 83FA40 cmp dx, byte 64 0 00000887 7205 jb .normal 2192 .large: 0 00000889 31DB xor bx, bx ; mirror count 64 or higher: 0 0000088B 31D2 xor dx, dx ; all 32 bits mirrored with (nonexistent) zero bits 0 0000088D C3 retn 2196 .normal: 0 0000088E 8B16[B80C] mov dx, word [hhvar] 0 00000892 8B1E[BA0C] mov bx, word [hhvar+2] 0 00000896 80F901 cmp cl, 1 0 00000899 762B jbe .ret ; mirror count one or zero, return input --> 0 0000089B 56 push si 0 0000089C 57 push di 2203 0 0000089D 51 push cx 0 0000089E BFFFFF mov di, -1 0 000008A1 89FE mov si, di 2207 .loopmask: 0 000008A3 D1E7 shl di, 1 0 000008A5 D1D6 rcl si, 1 0 000008A7 E2FA loop .loopmask ; create mask of bits not involved in mirroring 0 000008A9 21DE and si, bx 0 000008AB 21D7 and di, dx ; get the uninvolved bits 0 000008AD 59 pop cx 2214 0 000008AE 56 push si 0 000008AF 57 push di ; save them 0 000008B0 31F6 xor si, si 0 000008B2 31FF xor di, di ; initialize mirrored register 2219 .loop: 0 000008B4 D1EB shr bx, 1 0 000008B6 D1DA rcr dx, 1 ; shift out of original register's current LSB 0 000008B8 D1D7 rcl di, 1 0 000008BA D1D6 rcl si, 1 ; into other register's current LSB 0 000008BC E2F6 loop .loop 0 000008BE 5A pop dx 0 000008BF 5B pop bx ; restore uninvolved bits 0 000008C0 09F3 or bx, si 0 000008C2 09FA or dx, di ; combine with mirrored bits 2229 0 000008C4 5F pop di 0 000008C5 5E pop si 2232 .ret: 0 000008C6 C3 retn 2234 2235 of_or_bitwise: section_of_function 0 000008C7 0B16[B80C] or dx, word [hhvar] 0 000008CB 0B1E[BA0C] or bx, word [hhvar+2] ; bitwise or 2238 or_hhtype_1: section_of_function 0 000008CF E912FE jmp or_hhtype 2240 2241 of_or_boolean: section_of_function 0 000008D2 E82B00 nearcall of_helper_getbool 0 000008D5 09DA or dx, bx ; boolean or 0 000008D7 EB24 jmp short of_helper_retbool 2245 2246 of_clr_bitwise: section_of_function 0 000008D9 F7D3 not bx 0 000008DB F7D2 not dx 2249 2250 of_and_bitwise: section_of_function 0 000008DD 2316[B80C] and dx, word [hhvar] 0 000008E1 231E[BA0C] and bx, word [hhvar+2] ; bitwise and 0 000008E5 EBE8 jmp or_hhtype_1 2254 2255 of_and_boolean: section_of_function 0 000008E7 E81600 nearcall of_helper_getbool 0 000008EA 21DA and dx, bx ; boolean and 0 000008EC EB0F jmp short of_helper_retbool 2259 2260 of_xor_bitwise: section_of_function 0 000008EE 3316[B80C] xor dx, word [hhvar] 0 000008F2 331E[BA0C] xor bx, word [hhvar+2] ; bitwise xor 0 000008F6 EBD7 jmp or_hhtype_1 2264 2265 of_xor_boolean: section_of_function 0 000008F8 E80500 nearcall of_helper_getbool 0 000008FB 31DA xor dx, bx ; boolean xor 2268 of_helper_retbool: section_of_function 0 000008FD 31DB xor bx, bx ; high word always zero 0 000008FF 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 00000900 30E4 xor ah, ah 0 00000902 E81BFF nearcall toboolean 0 00000905 52 push dx 0 00000906 8B16[B80C] mov dx, word [hhvar] 0 0000090A 8B1E[BA0C] mov bx, word [hhvar+2] 0 0000090E E80FFF nearcall toboolean 0 00000911 5B pop bx 0 00000912 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 00001AFA 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 00001AFB 00 align 4, db 0 0 00001AFC 02000000 lfsr: dd 2 0 00001B00 01000000 reverselfsr: dd 1 0 00001B04 03002080 lfsrtap: dd 8020_0003h 2308 %if _SLEEP_NEW 0 00001B08 0000 getc_repeat_idle: dw 0 0 00001B0A 0000 sleep_repeat_idle: dw 0 0 00001B0C 0000 sleep_highest_delta: dw 0 0 00001B0E 0500 sleep_delta_limit: dw 5 2313 %endif 2314 %if _COUNT || _SCOUNT 0 00001B10 00000000 count_var: dd 0 2316 %endif 2317 %if _RH 0 00001B14 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 00001B16 00003000[0000] isvariablestruc "V", 4, 0, vregs, VREGSAMOUNT - 1 0 00001B1C [290F]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 00001B20 0000 at ivName, dw 0 0 00001B22 0000 at ivFlags, dw 0 0 00001B24 0000 at ivAddress, dw 0 0 00001B26 [3808] at ivSetup, dw var_ext_setup 0 00001B28 00 at ivArrayLast, db 0 0 00001B29 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001B2A 0000 at ivName, dw 0 0 00001B2C 0000 at ivFlags, dw 0 0 00001B2E 0000 at ivAddress, dw 0 0 00001B30 [3808] at ivSetup, dw var_ext_setup 0 00001B32 00 at ivArrayLast, db 0 0 00001B33 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001B34 0000 at ivName, dw 0 0 00001B36 0000 at ivFlags, dw 0 0 00001B38 0000 at ivAddress, dw 0 0 00001B3A [3808] at ivSetup, dw var_ext_setup 0 00001B3C 00 at ivArrayLast, db 0 0 00001B3D 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001B3E 0000 at ivName, dw 0 0 00001B40 0000 at ivFlags, dw 0 0 00001B42 0000 at ivAddress, dw 0 0 00001B44 [3808] at ivSetup, dw var_ext_setup 0 00001B46 00 at ivArrayLast, db 0 0 00001B47 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001B48 0000 at ivName, dw 0 0 00001B4A 0000 at ivFlags, dw 0 0 00001B4C 0000 at ivAddress, dw 0 0 00001B4E [3808] at ivSetup, dw var_ext_setup 0 00001B50 00 at ivArrayLast, db 0 0 00001B51 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001B52 0000 at ivName, dw 0 0 00001B54 0000 at ivFlags, dw 0 0 00001B56 0000 at ivAddress, dw 0 0 00001B58 [3808] at ivSetup, dw var_ext_setup 0 00001B5A 00 at ivArrayLast, db 0 0 00001B5B 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001B5C 0000 at ivName, dw 0 0 00001B5E 0000 at ivFlags, dw 0 0 00001B60 0000 at ivAddress, dw 0 0 00001B62 [3808] at ivSetup, dw var_ext_setup 0 00001B64 00 at ivArrayLast, db 0 0 00001B65 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001B66 0000 at ivName, dw 0 0 00001B68 0000 at ivFlags, dw 0 0 00001B6A 0000 at ivAddress, dw 0 0 00001B6C [3808] at ivSetup, dw var_ext_setup 0 00001B6E 00 at ivArrayLast, db 0 0 00001B6F 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001B70 0000 at ivName, dw 0 0 00001B72 0000 at ivFlags, dw 0 0 00001B74 0000 at ivAddress, dw 0 0 00001B76 [3808] at ivSetup, dw var_ext_setup 0 00001B78 00 at ivArrayLast, db 0 0 00001B79 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001B7A 0000 at ivName, dw 0 0 00001B7C 0000 at ivFlags, dw 0 0 00001B7E 0000 at ivAddress, dw 0 0 00001B80 [3808] at ivSetup, dw var_ext_setup 0 00001B82 00 at ivArrayLast, db 0 0 00001B83 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001B84 0000 at ivName, dw 0 0 00001B86 0000 at ivFlags, dw 0 0 00001B88 0000 at ivAddress, dw 0 0 00001B8A [3808] at ivSetup, dw var_ext_setup 0 00001B8C 00 at ivArrayLast, db 0 0 00001B8D 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001B8E 0000 at ivName, dw 0 0 00001B90 0000 at ivFlags, dw 0 0 00001B92 0000 at ivAddress, dw 0 0 00001B94 [3808] at ivSetup, dw var_ext_setup 0 00001B96 00 at ivArrayLast, db 0 0 00001B97 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001B98 0000 at ivName, dw 0 0 00001B9A 0000 at ivFlags, dw 0 0 00001B9C 0000 at ivAddress, dw 0 0 00001B9E [3808] at ivSetup, dw var_ext_setup 0 00001BA0 00 at ivArrayLast, db 0 0 00001BA1 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001BA2 0000 at ivName, dw 0 0 00001BA4 0000 at ivFlags, dw 0 0 00001BA6 0000 at ivAddress, dw 0 0 00001BA8 [3808] at ivSetup, dw var_ext_setup 0 00001BAA 00 at ivArrayLast, db 0 0 00001BAB 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001BAC 0000 at ivName, dw 0 0 00001BAE 0000 at ivFlags, dw 0 0 00001BB0 0000 at ivAddress, dw 0 0 00001BB2 [3808] at ivSetup, dw var_ext_setup 0 00001BB4 00 at ivArrayLast, db 0 0 00001BB5 00 at ivArrayBetween, db 0 2351 <1> iend 2352 <1> %xdefine IVS_MOREBYTE_NAMEHEADERS IVS_MOREBYTE_NAMEHEADERS, 0 2344 <1> istruc ISVARIABLESTRUC 0 00001BB6 0000 at ivName, dw 0 0 00001BB8 0000 at ivFlags, dw 0 0 00001BBA 0000 at ivAddress, dw 0 0 00001BBC [3808] at ivSetup, dw var_ext_setup 0 00001BBE 00 at ivArrayLast, db 0 0 00001BBF 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 00001BC0 [C809]1600[0000] isvariablestruc "INT8CTRL", 2, 0, intr8_limit 0 00001BC6 [290F]0000 2358 %endif 0 00001BCA [CE09]32000000 isvariablestruc "LFSR", 4, 0, 0, 0, 0, var_lfsr_setup 0 00001BD0 [7208]0000 0 00001BD4 [D009]33000000 isvariablestruc "RLFSR", 4, 0, 0, 0, 0, var_reverselfsr_setup 0 00001BDA [8808]0000 0 00001BDE [D309]3500[2801] isvariablestruc "LFSRTAP", 4, 0, lfsrtap 0 00001BE4 [290F]0000 0 00001BE8 [D809]0600[1E01] isvariablestruc "RLFSRTOP", 1, 0, reverselfsrtop 0 00001BEE [290F]0000 2363 %if _SLEEP_NEW 0 00001BF2 [DE09]0600[2C01] isvariablestruc "GREPIDLE", 1, 0, getc_repeat_idle 0 00001BF8 [290F]0000 0 00001BFC [E409]0600[2E01] isvariablestruc "SREPIDLE", 1, 0, sleep_repeat_idle 0 00001C02 [290F]0000 0 00001C06 [EA09]1700[3001] isvariablestruc "SMAXDELTA", 2, 0, sleep_highest_delta 0 00001C0C [290F]0000 0 00001C10 [F109]1900[3201] isvariablestruc "SDELTALIMIT", 2, 0, sleep_delta_limit 0 00001C16 [290F]0000 2368 %endif 2369 %if !_LOADER 0 00001C1A [FA09]9800[0000] isvariablestruc "DEVICESIZE", 2, ivfReadOnly, device_mcb_paragraphs 0 00001C20 [290F]0000 0 00001C24 [020A]BA00[0000] isvariablestruc "DEVICEHEADER", 4, ivfReadOnly, device_header_address 0 00001C2A [290F]0000 2372 %endif 0 00001C2E [0C0A]0700[0000] isvariablestruc "DDTEXTAND", 1, 0, dd_text_and 0 00001C34 [290F]0000 0 00001C38 [130A]8500[0000] isvariablestruc "MACHX86", 1, ivfReadOnly, machine 0 00001C3E [290F]0000 0 00001C42 [180A]8500[0000] isvariablestruc "MACHX87", 1, ivfReadOnly, encodedmach87 0 00001C48 [290F]0000 2376 %if !_LOADER 0 00001C4C [1D0A]0100[0000] isvariablestruc "MMT", 1, 0, maxmachinetype 0 00001C52 [290F]0000 2378 %endif 0 00001C56 [1E0A]3103[0000] isvariablestruc "DCO", 4, ivfArrayOneBased | ivfArrayOptional, options, 7 0 00001C5C [290F]0700 0 00001C60 [1F0A]B103[0000] isvariablestruc "DCS", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, startoptions, 7 0 00001C66 [290F]0700 0 00001C6A [200A]B103[0000] isvariablestruc "DIF", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, internalflags, 7 0 00001C70 [290F]0700 2385 %if !_LOADER 0 00001C74 [210A]3100[0000] isvariablestruc "DAO", 4, 0, asm_options 0 00001C7A [290F]0000 0 00001C7E [220A]B100[0000] isvariablestruc "DAS", 4, ivfReadOnly, asm_startoptions 0 00001C84 [290F]0000 0 00001C88 [230A]B100[0000] isvariablestruc "DPI", 4, ivfReadOnly, psp22 0 00001C8E [290F]0000 2392 %endif 0 00001C92 [240A]9100[0000] isvariablestruc "DPR", 2, ivfReadOnly, pspdbg 0 00001C98 [290F]0000 2395 %if !_LOADER 0 00001C9C [250A]9100[0000] isvariablestruc "DPP", 2, ivfReadOnly, parent 0 00001CA2 [290F]0000 0 00001CA6 [260A]B200[0000] isvariablestruc "DPRA", 4, ivfReadOnly, psp22 0 00001CAC [290F]0000 2400 %endif 0 00001CB0 [280A]9200[0000] isvariablestruc "DPSP", 2, ivfReadOnly, pspdbg 0 00001CB6 [290F]0000 2403 %if !_LOADER 0 00001CBA [2A0A]9500[0000] isvariablestruc "DPARENT", 2, ivfReadOnly, parent 0 00001CC0 [290F]0000 2406 %endif 2407 %if _PM 0 00001CC4 [2F0A]91000000 isvariablestruc "DPS", 2, ivfReadOnly, 0, 0, 0, var_seldbg_setup 0 00001CCA [EB08]0000 0 00001CCE [300A]95000000 isvariablestruc "DPSPSEL", 2, ivfReadOnly, 0, 0, 0, var_dpspsel_setup 0 00001CD4 [E408]0000 2412 %else 2413 isvariablestruc "DPSPSEL", 2, ivfReadOnly, pspdbg 2415 %endif 2416 2417 %if !_LOADER 0 00001CD8 [350A]3100[0000] isvariablestruc "PPC", 4, 0, default_pp_count 0 00001CDE [290F]0000 0 00001CE2 [360A]3100[0000] isvariablestruc "TPC", 4, 0, default_tp_count 0 00001CE8 [290F]0000 0 00001CEC [370A]3100[0000] isvariablestruc "TTC", 4, 0, default_tt_count 0 00001CF2 [290F]0000 2421 0 00001CF6 [380A]3500[0000] isvariablestruc "RELIMIT", 4, 0, re_limit 0 00001CFC [290F]0000 0 00001D00 [3D0A]3500[0000] isvariablestruc "RECOUNT", 4, 0, re_count 0 00001D06 [290F]0000 2424 %endif 0 00001D0A [420A]3500[0000] isvariablestruc "RCLIMIT", 4, 0, rc_limit 0 00001D10 [290F]0000 0 00001D14 [470A]3500[0000] isvariablestruc "RCCOUNT", 4, 0, rc_count 0 00001D1A [290F]0000 2427 0 00001D1E [4C0A]1000[0000] isvariablestruc "RC", 2, 0, priorrc 0 00001D24 [290F]0000 0 00001D28 [4C0A]1100[0000] isvariablestruc "ERC", 2, 0, erc 0 00001D2E [290F]0000 2430 %if !_LOADER 0 00001D32 [4D0A]0400[0000] isvariablestruc "QQCODE", 1, 0, qqtermcode 0 00001D38 [290F]0000 0 00001D3C [510A]1600[0000] isvariablestruc "TERMCODE", 2, 0, usertermcode 0 00001D42 [290F]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 00001D46 [570A]3100[0000] isvariablestruc "AAO", var_addr_offset, 0, a_addr 0 00001D4C [290F]0000 0 00001D50 [580A]1100[0400] isvariablestruc "AAS", 2, 0, a_addr + saSegSel 0 00001D56 [290F]0000 2444 %endif 0 00001D5A [590A]3100[0000] isvariablestruc "ADO", var_addr_offset, 0, d_addr 0 00001D60 [290F]0000 0 00001D64 [5A0A]1100[0400] isvariablestruc "ADS", 2, 0, d_addr + saSegSel 0 00001D6A [290F]0000 2447 %if !_LOADER 0 00001D6E [5B0A]3100[0000] isvariablestruc "ABO", var_addr_offset, 0, behind_r_u_addr 0 00001D74 [290F]0000 0 00001D78 [5C0A]1100[0400] isvariablestruc "ABS", 2, 0, behind_r_u_addr + saSegSel 0 00001D7E [290F]0000 0 00001D82 [5D0A]3100[0000] isvariablestruc "AUO", var_addr_offset, 0, u_addr 0 00001D88 [290F]0000 0 00001D8C [5E0A]1100[0400] isvariablestruc "AUS", 2, 0, u_addr + saSegSel 0 00001D92 [290F]0000 2452 %endif 0 00001D96 [5F0A]3100[0000] isvariablestruc "AEO", var_addr_offset, 0, e_addr 0 00001D9C [290F]0000 0 00001DA0 [600A]1100[0400] isvariablestruc "AES", 2, 0, e_addr + saSegSel 0 00001DA6 [290F]0000 2455 %if _DSTRINGS 0 00001DAA [610A]3100[0000] isvariablestruc "AZO", var_addr_offset, 0, dz_addr 0 00001DB0 [290F]0000 0 00001DB4 [620A]1100[0400] isvariablestruc "AZS", 2, 0, dz_addr + saSegSel 0 00001DBA [290F]0000 0 00001DBE [630A]3100[0000] isvariablestruc "ACO", var_addr_offset, 0, dcpm_addr 0 00001DC4 [290F]0000 0 00001DC8 [640A]1100[0400] isvariablestruc "ACS", 2, 0, dcpm_addr + saSegSel 0 00001DCE [290F]0000 0 00001DD2 [650A]3100[0000] isvariablestruc "APO", var_addr_offset, 0, dcount_addr 0 00001DD8 [290F]0000 0 00001DDC [660A]1100[0400] isvariablestruc "APS", 2, 0, dcount_addr + saSegSel 0 00001DE2 [290F]0000 0 00001DE6 [670A]3100[0000] isvariablestruc "AWO", var_addr_offset, 0, dwcount_addr 0 00001DEC [290F]0000 0 00001DF0 [680A]1100[0400] isvariablestruc "AWS", 2, 0, dwcount_addr + saSegSel 0 00001DF6 [290F]0000 2464 %endif 2465 %if _DX 2466 isvariablestruc "AXO", 4, 0, x_addr 2467 %endif 2468 0 00001DFA [690A]0100[0000] isvariablestruc "DSR", 1, 0, serial_rows 0 00001E00 [290F]0000 0 00001E04 [6A0A]0100[0000] isvariablestruc "DSC", 1, 0, serial_columns 0 00001E0A [290F]0000 0 00001E0E [6B0A]0100[0000] isvariablestruc "DST", 1, 0, serial_keep_timeout 0 00001E14 [290F]0000 2472 %if _USE_TX_FIFO 0 00001E18 [6C0A]0100[0000] isvariablestruc "DSF", 1, 0, serial_fifo_size 0 00001E1E [290F]0000 2474 %endif 0 00001E22 [6D0A]0300[0000] isvariablestruc "DSPVI", 1, 0, serial_var_intnum 0 00001E28 [290F]0000 0 00001E2C [700A]8300[0000] isvariablestruc "DSPUI", 1, ivfReadOnly, serial_use_intnum 0 00001E32 [290F]0000 0 00001E36 [730A]0300[0000] isvariablestruc "DSPVS", 1, 0, serial_var_params 0 00001E3C [290F]0000 0 00001E40 [760A]8300[0000] isvariablestruc "DSPUS", 1, ivfReadOnly, serial_use_params 0 00001E46 [290F]0000 0 00001E4A [790A]0300[0000] isvariablestruc "DSPVF", 1, 0, serial_var_fifo 0 00001E50 [290F]0000 0 00001E54 [7C0A]8300[0000] isvariablestruc "DSPUF", 1, ivfReadOnly, serial_use_fifo 0 00001E5A [290F]0000 0 00001E5E [7F0A]1300[0000] isvariablestruc "DSPVP", 2, 0, serial_var_baseport 0 00001E64 [290F]0000 0 00001E68 [820A]9300[0000] isvariablestruc "DSPUP", 2, ivfReadOnly, serial_use_baseport 0 00001E6E [290F]0000 0 00001E72 [850A]1300[0000] isvariablestruc "DSPVD", 2, 0, serial_var_dl 0 00001E78 [290F]0000 0 00001E7C [880A]9300[0000] isvariablestruc "DSPUD", 2, ivfReadOnly, serial_use_dl 0 00001E82 [290F]0000 0 00001E86 [8B0A]1300[0000] isvariablestruc "DSPVM", 2, 0, serial_var_irqmask 0 00001E8C [290F]0000 0 00001E90 [8E0A]9300[0000] isvariablestruc "DSPUM", 2, ivfReadOnly, serial_use_irqmask 0 00001E96 [290F]0000 2487 2488 %if _40COLUMNS 0 00001E9A [910A]0500[0000] isvariablestruc "IOCLINE", 1, 0, io_columns_getline 0 00001EA0 [290F]0000 2490 ; IOCLINE must be before IOC as otherwise "IOCLINE" would get 2491 ; misdetected as "IOC" + "L" separator + junk 2492 %endif 0 00001EA4 [960A]0100[0000] isvariablestruc "IOR", 1, 0, io_rows 0 00001EAA [290F]0000 0 00001EAE [970A]0100[0000] isvariablestruc "IOC", 1, 0, io_columns 0 00001EB4 [290F]0000 0 00001EB8 [980A]1100[0000] isvariablestruc "IOS", 2, 0, io_start_buffer 0 00001EBE [290F]0000 0 00001EC2 [990A]1100[0000] isvariablestruc "IOE", 2, 0, io_end_buffer 0 00001EC8 [290F]0000 0 00001ECC [9A0A]1100[0000] isvariablestruc "IOL", 2, 0, io_levels 0 00001ED2 [290F]0000 0 00001ED6 [9B0A]1100[0000] isvariablestruc "IOF", 2, 0, io_flags 0 00001EDC [290F]0000 0 00001EE0 [9C0A]91000000 isvariablestruc "IOI", 2, ivfReadOnly, 0, 0, 0, var_ioi_setup 0 00001EE6 [1D09]0000 0 00001EEA [9D0A]91000000 isvariablestruc "IOK", 2, ivfReadOnly, 0, 0, 0, var_iok_setup 0 00001EF0 [3509]0000 2501 2502 %if _CATCHINT2D 0 00001EF4 [9E0A]8500[0000] isvariablestruc "AMISNUM", 1, ivfReadOnly, amis_multiplex_number 0 00001EFA [290F]0000 0 00001EFE [A30A]0800[0000] isvariablestruc "TRYAMISNUM", 1, 0, try_amis_multiplex_number 0 00001F04 [290F]0000 2505 %endif 2506 0 00001F08 [AB0A]3600[0000] isvariablestruc "HHRESULT", 4, 0, hhresult 0 00001F0E [290F]0000 2508 %if _PM 0 00001F12 [B10A]1600[0000] isvariablestruc "DARESULT", 2, 0, daresult 0 00001F18 [290F]0000 2510 %endif 2511 %if _EMS 2512 isvariablestruc "XARESULT", 2, 0, xaresult 2513 %endif 2514 %if _COUNT || _SCOUNT 0 00001F1C [B70A]3300[3401] isvariablestruc "COUNT", 4, 0, count_var 0 00001F22 [290F]0000 2516 %endif 2517 %if _RH 0 00001F26 [BA0A]95000000 isvariablestruc "RHCOUNT", 2, ivfReadOnly, 0, 0, 0, var_rhcount_setup 0 00001F2C [FE08]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 0 00001F30 [BF0A]B102[0000] isvariablestruc "SRO", 4, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 0 00001F36 [290F]0F02 0 00001F3A [C00A]9102[0400] isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 4, 15, 4 0 00001F40 [290F]0F04 2549 %else 2550 isvariablestruc "SRO", 2, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 2552 isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 2, 15, 2 2554 %endif 0 00001F44 [C10A]B100[0000] isvariablestruc "SRC", 4, ivfReadOnly, sscounter 0 00001F4A [290F]0000 2557 %endif 2558 0 00001F4E [C20A]90040000 isvariablestruc "RI", 2, ivfSeparatorSpecial | ivfReadOnly, 0, 255, 0, var_ri_setup 0 00001F54 [F40F]FF00 2561 2562 %if _MMXSUPP 0 00001F58 [C20A]B0040000 isvariablestruc "MM", 4, ivfSeparatorSpecial | ivfReadOnly, 0, 7, 0, var_mm_setup 0 00001F5E [420F]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 00001F62 [C20A]11020000 isvariablestruc "YSF", 2, ivfArrayOptional, 0, 15, 0, var_ysf_setup 0 00001F68 [AF10]0F00 2574 %if _INPUT_FILE_HANDLES 0 00001F6C [C30A]11020000 isvariablestruc "YHF", 2, ivfArrayOptional, 0, 15, 0, var_ysf_setup 0 00001F72 [AF10]0F00 2577 %endif 2578 %if _INPUT_FILE_BOOT 0 00001F76 [C40A]11020000 isvariablestruc "YBF", 2, ivfArrayOptional, 0, 15, 0, var_ysf_setup 0 00001F7C [AF10]0F00 2581 %endif 2582 %endif 2583 2584 %if _ACCESS_VARIABLES_AMOUNT 0 00001F80 [C50A]B502[0000] isvariablestruc "READADR", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 0 00001F86 [290F]0304 0 00001F8A [CA0A]B502[0400] isvariablestruc "READLEN", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 0 00001F90 [290F]0304 0 00001F94 [CF0A]B502[0000] isvariablestruc "WRITADR", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 0 00001F9A [290F]0304 0 00001F9E [D40A]B502[0400] isvariablestruc "WRITLEN", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 0 00001FA4 [290F]0304 2593 %endif 2594 2595 %if !_LOADER 2596 %if _PSPVARIABLES 2597 %if _PM 0 00001FA8 [D90A]92000000 isvariablestruc "PSPS", 2, ivfReadOnly, 0, 0, 0, var_psps_setup 0 00001FAE [4D09]0000 0 00001FB2 [DB0A]94000000 isvariablestruc "PSPSEL", 2, ivfReadOnly, 0, 0, 0, var_psps_setup 0 00001FB8 [4D09]0000 2600 %else 2601 isvariablestruc "PSPS", 2, ivfReadOnly, pspdbe 2602 isvariablestruc "PSPSEL", 2, ivfReadOnly, pspdbe 2603 %endif 0 00001FBC [DF0A]9100[0000] isvariablestruc "PSP", 2, ivfReadOnly, pspdbe 0 00001FC2 [290F]0000 0 00001FC6 [E00A]91000000 isvariablestruc "PPR", 2, ivfReadOnly, 0, 0, 0, var_ppr_setup 0 00001FCC [6A09]0000 0 00001FD0 [E10A]B1000000 isvariablestruc "PPI", 4, ivfReadOnly, 0, 0, 0, var_ppi_setup 0 00001FD6 [9809]0000 0 00001FDA [E20A]94000000 isvariablestruc "PARENT", 2, ivfReadOnly, 0, 0, 0, var_ppr_setup 0 00001FE0 [6A09]0000 0 00001FE4 [E60A]B1000000 isvariablestruc "PRA", 4, ivfReadOnly, 0, 0, 0, var_ppi_setup 0 00001FEA [9809]0000 2609 %endif 2610 %endif 2611 2612 %if _BOOTLDR 0 00001FEE [E70A]08000000 isvariablestruc "BOOTUNITFL", 1, 0, 0, 255, 0, var_bootunitflags_setup 0 00001FF4 [5C0A]FF00 0 00001FF8 [EF0A]89000000 isvariablestruc "BOOTLDPUNIT", 1, ivfReadOnly, 0, 0, 0, var_bootldpunit_setup 0 00001FFE [1A0A]0000 0 00002002 [F80A]89000000 isvariablestruc "BOOTSDPUNIT", 1, ivfReadOnly, 0, 0, 0, var_bootsdpunit_setup 0 00002008 [1F0A]0000 2616 %if _INPUT_FILE_BOOT 0 0000200C [010B]89000000 isvariablestruc "BOOTYDPUNIT", 1, ivfReadOnly, 0, 0, 0, var_bootydpunit_setup 0 00002012 [240A]0000 2618 %endif 0 00002016 [0A0B]B9000000 isvariablestruc "BOOTLDPPART", 4, ivfReadOnly, 0, 0, 0, var_bootldppart_setup 0 0000201C [3B0A]0000 0 00002020 [130B]B9000000 isvariablestruc "BOOTSDPPART", 4, ivfReadOnly, 0, 0, 0, var_bootsdppart_setup 0 00002026 [400A]0000 2621 %if _INPUT_FILE_BOOT 0 0000202A [1C0B]B9000000 isvariablestruc "BOOTYDPPART", 4, ivfReadOnly, 0, 0, 0, var_bootydppart_setup 0 00002030 [450A]0000 2623 %endif 2624 %endif 2625 2626 %if !_LOADER 0 00002034 [250B]0900[0000] isvariablestruc "TRYDEBUGNUM", 1, 0, try_debugger_amis_multiplex_number 0 0000203A [290F]0000 0 0000203E [2E0B]9700[0000] isvariablestruc "DEBUGFUNC", 2, ivfReadOnly, debuggerfunction 0 00002044 [290F]0000 2629 %if _MCLOPT 2630 isvariablestruc "MASTERPICBASE", 1, 0, master_pic_base 2631 %endif 2632 %endif 2633 0 00002048 [350B]9700[0000] isvariablestruc "DSTACKLEN", 2, ivfReadOnly, entryseg_size 0 0000204E [290F]0000 0 00002052 [3C0B]9700[0000] isvariablestruc "DSTACKSEG", 2, ivfReadOnly, pspdbg 0 00002058 [290F]0000 0 0000205C [430B]9700[0000] isvariablestruc "DENTRYLEN", 2, ivfReadOnly, entryseg_size 0 00002062 [290F]0000 0 00002066 [4A0B]9700[0000] isvariablestruc "DENTRYSEG", 2, ivfReadOnly, pspdbg 0 0000206C [290F]0000 0 00002070 [510B]9700[0000] isvariablestruc "DCODE1LEN", 2, ivfReadOnly, code_size 0 00002076 [290F]0000 0 0000207A [580B]9700[0000] isvariablestruc "DCODE1SEG", 2, ivfReadOnly, code_seg 0 00002080 [290F]0000 2640 %if _DUALCODE 0 00002084 [5F0B]9700[0000] isvariablestruc "DCODE2LEN", 2, ivfReadOnly, code2_size 0 0000208A [290F]0000 0 0000208E [660B]9700[0000] isvariablestruc "DCODE2SEG", 2, ivfReadOnly, code2_seg 0 00002094 [290F]0000 2643 %endif 2644 %if _MESSAGESEGMENT 0 00002098 [6D0B]9900[0000] isvariablestruc "DMESSAGELEN", 2, ivfReadOnly, messageseg_size 0 0000209E [290F]0000 0 000020A2 [760B]9900[0000] isvariablestruc "DMESSAGESEG", 2, ivfReadOnly, messageseg 0 000020A8 [290F]0000 2647 %endif 0 000020AC [7F0B]9800[0000] isvariablestruc "DAUXBUFLEN", 2, ivfReadOnly, auxbuff_current_size 0 000020B2 [290F]0000 2649 %if _PM 0 000020B6 [870B]9800[0200] isvariablestruc "DAUXBUFSEG", 2, ivfReadOnly, auxbuff_segorsel + soaSegment 0 000020BC [290F]0000 2651 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 000020C0 [8F0B]9800[0000] isvariablestruc "DHISBUFLEN", 2, ivfReadOnly, historyseg_size 0 000020C6 [290F]0000 0 000020CA [970B]9800[0200] isvariablestruc "DHISBUFSEG", 2, ivfReadOnly, history.segorsel + soaSegment 0 000020D0 [290F]0000 2654 %endif 2655 %else 2656 isvariablestruc "DAUXBUFSEG", 2, ivfReadOnly, auxbuff_segorsel 2657 %if _HISTORY_SEPARATE_FIXED && _HISTORY 2658 isvariablestruc "DHISBUFLEN", 2, ivfReadOnly, historyseg_size 2659 isvariablestruc "DHISBUFSEG", 2, ivfReadOnly, history.segorsel 2660 %endif 2661 %endif 2662 %if _IMMASM 0 000020D4 [9F0B]9500[0000] isvariablestruc "DIMMSEG", 2, ivfReadOnly, immseg 0 000020DA [290F]0000 2664 %endif 2665 %if _EXTENSIONS 0 000020DE [A40B]9500[0000] isvariablestruc "DEXTLEN", 2, ivfReadOnly, extseg_size 0 000020E4 [290F]0000 0 000020E8 [A90B]9600[0000] isvariablestruc "DEXTUSED", 2, ivfReadOnly, extseg_used 0 000020EE [290F]0000 2668 ; problem: is not currently effective value if to reclaim 0 000020F2 [AF0B]9500[0000] isvariablestruc "DEXTSEG", 2, ivfReadOnly, extseg 0 000020F8 [290F]0000 0 000020FC [B40B]9900[0000] isvariablestruc "DEXTDATALEN", 2, ivfReadOnly, extdata_size 0 00002102 [290F]0000 0 00002106 [BD0B]9A00[0000] isvariablestruc "DEXTDATAUSED", 2, ivfReadOnly, extdata_used 0 0000210C [290F]0000 2672 ; problem: is not currently effective value if to reclaim 0 00002110 [C70B]9900[0000] isvariablestruc "DEXTDATAOFS", 2, ivfReadOnly, extdata 0 00002116 [290F]0000 2674 %endif 2675 %if _APP_ENV_SIZE || _DEV_ENV_SIZE || _BOOT_ENV_SIZE 0 0000211A [D00B]9500[0000] isvariablestruc "DENVLEN", 2, ivfReadOnly, env_size 0 00002120 [290F]0000 0 00002124 [D50B]9500[0000] isvariablestruc "DENVSEG", 2, ivfReadOnly, envseg 0 0000212A [290F]0000 2678 %endif 0 0000212E [DA0B]9800[0000] isvariablestruc "DALLOCSIZE", 2, ivfReadOnly, alloc_size 0 00002134 [290F]0000 0 00002138 [E20B]9700[0000] isvariablestruc "DALLOCSEG", 2, ivfReadOnly, alloc_seg 0 0000213E [290F]0000 2681 2682 %if _PM 0 00002142 [E90B]9700[0000] isvariablestruc "DSTACKSEL", 2, ivfReadOnly, dssel 0 00002148 [290F]0000 0 0000214C [F00B]9700[0000] isvariablestruc "DENTRYSEL", 2, ivfReadOnly, cssel 0 00002152 [290F]0000 0 00002156 [F70B]9700[0000] isvariablestruc "DCODE1SEL", 2, ivfReadOnly, code_sel 0 0000215C [290F]0000 2686 %if _DUALCODE 0 00002160 [FE0B]9700[0000] isvariablestruc "DCODE2SEL", 2, ivfReadOnly, code2_sel 0 00002166 [290F]0000 2688 %endif 2689 %if _MESSAGESEGMENT 0 0000216A [050C]9900[0000] isvariablestruc "DMESSAGESEL", 2, ivfReadOnly, messagesel 0 00002170 [290F]0000 2691 %endif 0 00002174 [0E0C]9800[0400] isvariablestruc "DAUXBUFSEL", 2, ivfReadOnly, auxbuff_segorsel + soaSelector 0 0000217A [290F]0000 2693 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 0000217E [160C]9800[0400] isvariablestruc "DHISBUFSEL", 2, ivfReadOnly, history.segorsel + soaSelector 0 00002184 [290F]0000 2695 %endif 0 00002188 [1E0C]9900[0000] isvariablestruc "DSCRATCHSEL", 2, ivfReadOnly, scratchsel 0 0000218E [290F]0000 2697 %if _SYMBOLIC 0 00002192 [270C]9600[0000] isvariablestruc "DSYM1SEL", 2, ivfReadOnly, symsel1 0 00002198 [290F]0000 0 0000219C [2D0C]9600[0000] isvariablestruc "DSYM2SEL", 2, ivfReadOnly, symsel2 0 000021A2 [290F]0000 2700 %endif 2701 %if _IMMASM 0 000021A6 [330C]9500[0000] isvariablestruc "DIMMSEL", 2, ivfReadOnly, immsel 0 000021AC [290F]0000 2703 %endif 2704 %if _EXTENSIONS 0 000021B0 [380C]9700[0000] isvariablestruc "DEXTCSSEL", 2, ivfReadOnly, extcssel 0 000021B6 [290F]0000 0 000021BA [3F0C]9700[0000] isvariablestruc "DEXTDSSEL", 2, ivfReadOnly, extdssel 0 000021C0 [290F]0000 2707 %endif 2708 %endif 2709 0 000021C4 [460C]1900[0000] isvariablestruc "DEFAULTDLEN", 2, 0, dd_default_length 0 000021CA [290F]0000 0 000021CE [4F0C]1B00[0000] isvariablestruc "DEFAULTDLINES", 2, 0, dd_default_lines 0 000021D4 [290F]0000 2712 %if !_LOADER 0 000021D8 [5A0C]1900[0000] isvariablestruc "DEFAULTULEN", 2, 0, uu_default_length 0 000021DE [290F]0000 0 000021E2 [630C]1B00[0000] isvariablestruc "DEFAULTULINES", 2, 0, uu_default_lines 0 000021E8 [290F]0000 2715 %endif 2716 2717 %if _PM 0 000021EC [6E0C]11000000 isvariablestruc "CIP", 2, 0, 0, 0, 0, var_cip_setup 0 000021F2 [4E08]0000 0 000021F6 [6F0C]11000000 isvariablestruc "CSP", 2, 0, 0, 0, 0, var_csp_setup 0 000021FC [6208]0000 2720 %else 2721 isvariablestruc "CIP", 2, 0, reg_eip 2722 isvariablestruc "CSP", 2, 0, reg_esp 2723 %endif 2724 2725 %if _ELDLINKINFO 0 00002200 [700C]9800[0000] isvariablestruc "LINKOFFSET", 2, ivfReadOnly, linkinfoaddress 0 00002206 [290F]0000 0 0000220A [780C]B900[0000] isvariablestruc "LINKPOINTER", 4, ivfReadOnly, linkinfoaddress 0 00002210 [290F]0000 0 00002214 [810C]9500[0000] isvariablestruc "LINKSEG", 2, ivfReadOnly, linkseg 0 0000221A [290F]0000 2729 %if _PM 0 0000221E [860C]9500[0000] isvariablestruc "LINKSEL", 2, ivfReadOnly, linksel 0 00002224 [290F]0000 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 00002228 00000000 interrupt_var: dd 0 2763 align 2, db 0 0 0000222C 0000 ioi_var: dw 0 0 0000222E 0000 iok_var: dw 0 2766 %if _PM 2767 align 2, db 0 0 00002230 0000 seldbg: dw 0 2769 align 2, db 0 0 00002232 0000 dpspsel: dw 0 2771 %endif 2772 %if _PSPVARIABLES 2773 align 2, db 0 2774 %if _PM 0 00002234 0000 psp_selector: dw 0 2776 %endif 0 00002236 0000 psp_parent: dw 0 0 00002238 00000000 psp_pra: dd 0 2779 %endif 2780 2781 align 2, db 0 2782 isvariable_morebyte_nameheaders: 2783 .ext: 0 0000223C 000000000000000000 dw IVS_MOREBYTE_NAMEHEADERS 0 00002245 000000000000000000 0 0000224E 000000000000000000 0 00002257 0000000000494E4C46 0 00002260 524C4C46524C475253 0 00002269 52534D534444454445 0 00002272 44444D414D414D4D44 0 0000227B 434443444944414441 0 00002284 445044504450445044 0 0000228D 504450445044505050 0 00002296 545054545245524552 0 0000229F 435243524345525151 0 000022A8 544541414141414441 0 000022B1 444142414241554155 0 000022BA 41454145415A415A41 0 000022C3 434143415041504157 0 000022CC 415744534453445344 0 000022D5 534453445344534453 0 000022DE 445344534453445344 0 000022E7 53445344534453494F 0 000022F0 494F494F494F494F49 0 000022F9 4F494F494F494F414D 0 00002302 545248484441434F52 0 0000230B 485352535253525249 0 00002314 4D4D59535948594252 0 0000231D 455245575257525053 0 00002326 505350535050505050 0 0000232F 415052424F424F424F 0 00002338 424F424F424F424F54 0 00002341 524445445344534445 0 0000234A 444544434443444344 0 00002353 43444D444D44414441 0 0000235C 444844484449444544 0 00002365 454445444544454445 0 0000236E 444544454441444144 0 00002377 53444544434443444D 0 00002380 444144484453445344 0 00002389 534449444544454445 0 00002392 444544454445434943 0 0000239B 534C494C494C494C49 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 000023A4 54384354524C535246 isvariablestrings ISVARIABLESTRINGS 0 000023AD 535253525441504653 0 000023B6 52544F50455049444C 0 000023BF 45455049444C454158 0 000023C8 44454C5441454C5441 0 000023D1 4C494D495456494345 0 000023DA 53495A455649434548 0 000023E3 454144455254455854 0 000023EC 414E44434858383643 0 000023F5 48583837544F53464F 0 000023FE 534952505241535041 0 00002407 52454E545353505345 0 00002410 4C4343434C494D4954 0 00002419 434F554E544C494D49 0 00002422 54434F554E5443434F 0 0000242B 4445524D434F44454F 0 00002434 534F534F534F534F53 0 0000243D 4F534F534F534F5352 0 00002446 435446505649505549 0 0000244F 505653505553505646 0 00002458 505546505650505550 0 00002461 50564450554450564D 0 0000246A 50554D434C494E4552 0 00002473 4353454C46494B4953 0 0000247C 4E554D59414D49534E 0 00002485 554D524553554C5452 0 0000248E 4553554C54554E5443 0 00002497 4F554E544F53434646 0 000024A0 46414441445241444C 0 000024A9 454E49544144524954 0 000024B2 4C454E50535053454C 0 000024BB 50524952454E54414F 0 000024C4 54554E4954464C4F54 0 000024CD 4C4450554E49544F54 0 000024D6 534450554E49544F54 0 000024DF 594450554E49544F54 0 000024E8 4C4450504152544F54 0 000024F1 534450504152544F54 0 000024FA 594450504152545944 0 00002503 454255474E554D4255 0 0000250C 4746554E435441434B 0 00002515 4C454E5441434B5345 0 0000251E 474E5452594C454E4E 0 00002527 5452595345474F4445 0 00002530 314C454E4F44453153 0 00002539 45474F4445324C454E 0 00002542 4F4445325345474553 0 0000254B 534147454C454E4553 0 00002554 534147455345475558 0 0000255D 4255464C454E555842 0 00002566 554653454749534255 0 0000256F 464C454E4953425546 0 00002578 5345474D4D53454758 0 00002581 544C454E5854555345 0 0000258A 445854534547585444 0 00002593 4154414C454E585444 0 0000259C 415441555345445854 0 000025A5 444154414F46534E56 0 000025AE 4C454E4E565345474C 0 000025B7 4C4F4353495A454C4C 0 000025C0 4F435345475441434B 0 000025C9 53454C4E5452595345 0 000025D2 4C4F44453153454C4F 0 000025DB 44453253454C455353 0 000025E4 41474553454C555842 0 000025ED 554653454C49534255 0 000025F6 4653454C4352415443 0 000025FF 4853454C594D315345 0 00002608 4C594D3253454C4D4D 0 00002611 53454C585443535345 0 0000261A 4C5854445353454C46 0 00002623 41554C54444C454E46 0 0000262C 41554C54444C494E45 0 00002635 534641554C54554C45 0 0000263E 4E4641554C54554C49 0 00002647 4E455350504E4B4F46 0 00002650 465345544E4B504F49 0 00002659 4E5445524E4B534547 0 00002662 4E4B53454C 2793 2794 2795 %if _EXPRDUALCODE && _DUALCODE 2796 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 2796 ------------------ note: usesection lDEBUG_CODE2 2797 %else 2798 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 00000913 87F9 xchg di, cx 0 00000915 8B4F04 mov cx, word [bx + ivAddress] 0 00000918 E307 jcxz .cy 2817 %if _EXPRDUALCODE && _DUALCODE 0 0000091A E8[0000]EB02[0000] nearcall transfer_ext_cx_nearcall_from_code2 2819 2820 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 2820 ------------------ note: usesection lDEBUG_CODE 2821 transfer_ext_cx_nearcall_from_code2: section_of_function 0 00004C71 83C406 add sp, 6 2823 %endif 0 00004C74 E9[0000] jmp transfer_ext_cx 2825 2826 %if _EXPRDUALCODE && _DUALCODE 2827 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 2827 ------------------ note: usesection lDEBUG_CODE2 2828 %endif 2829 2830 var_ext_setup.cy: 0 00000921 87F9 xchg di, cx 0 00000923 F9 stc 0 00000924 C3 retn 2834 2835 var_ext_setup_done: section_of_function 0 00000925 58 pop ax 0 00000926 58 pop ax 0 00000927 58 pop ax 0 00000928 C3 retn 2840 %endif 2841 2842 2843 %if _PM 2844 var_cip_setup: section_of_function 0 00000929 8B1E[0000] mov bx, word [reg_cs] 0 0000092D E8[0000]EB02[0000] nearcall test_d_b_bit 0 00000934 BB[0000] mov bx, reg_eip 2848 @@: 0 00000937 7402 jz .ret 0 00000939 41 inc cx 0 0000093A 41 inc cx ; = 4 2852 .ret: 0 0000093B F8 clc ; (NC) 0 0000093C C3 retn 2855 2856 var_csp_setup: section_of_function 0 0000093D 8B1E[0000] mov bx, word [reg_ss] 0 00000941 E8[0000]EB02[0000] nearcall test_d_b_bit 0 00000948 BB[0000] mov bx, reg_esp 0 0000094B EBEA jmp @B 2861 %endif 2862 2863 2864 var_lfsr_setup: section_of_function 0 0000094D BB[2001] mov bx, lfsr 0 00000950 D16F02 shr word [bx + 2], 1 0 00000953 D11F rcr word [bx], 1 0 00000955 730B jnc .ret ; if not to tap --> (NC) 0 00000957 A1[2801] mov ax, word [lfsrtap] 0 0000095A 3107 xor word [bx], ax 0 0000095C A1[2A01] mov ax, word [lfsrtap + 2] 0 0000095F 314702 xor word [bx + 2], ax ; (NC) 2873 .ret: 0 00000962 C3 retn 2875 2876 2877 var_reverselfsr_setup: section_of_function 0 00000963 BB[2401] mov bx, reverselfsr 0 00000966 91 xchg ax, cx ; preserve original cx 0 00000967 8A0E[1E01] mov cl, byte [reverselfsrtop] 0 0000096B BE0100 mov si, 1 ; register for shift mask 0 0000096E 80F910 cmp cl, 16 ; fits in low 16 bits ? 0 00000971 721B jb .below_16 ; yes --> 0 00000973 80E910 sub cl, 16 ; get bit within high word 0 00000976 80F910 cmp cl, 16 ; beyond maximum ? 0 00000979 7202 jb @F 0 0000097B B10F mov cl, 15 ; yes, clamp to bit 31 (for now) 2888 @@: 0 0000097D D3E6 shl si, cl ; shift to get a bitmask 0 0000097F 91 xchg cx, ax ; restore the original cx 0 00000980 857702 test word [bx + 2], si ; is top bit set ? 0 00000983 9F lahf ; preserve ZF 0 00000984 F7D6 not si ; invert mask to allow clearing 0 00000986 217702 and word [bx + 2], si ; clear the bit if it was set 0 00000989 BFFFFF mov di, -1 ; si:di = mask what to clear in taps 0 0000098C EB0F jmp @F 2897 2898 .below_16: 0 0000098E D3E6 shl si, cl ; shift to get a bitmask 0 00000990 91 xchg cx, ax ; restore the original cx 0 00000991 8537 test word [bx], si ; is top bit set ? 0 00000993 9F lahf ; preserve ZF 0 00000994 F7D6 not si ; invert mask to allow clearing 0 00000996 2137 and word [bx], si ; clear the bit if it was set 0 00000998 89F7 mov di, si 0 0000099A BEFFFF mov si, -1 ; si:di = mask what to clear in taps 2907 @@: 0 0000099D 9E sahf ; restore ZF 0 0000099E 97 xchg ax, di ; si:ax = mask what to clear in taps 0 0000099F 7416 jz .justshift ; if not to tap, just shift --> (NC) 0 000009A1 E81300 call .justshift ; also shift, but return to us afterwards 0 000009A4 2306[2801] and ax, word [lfsrtap] 0 000009A8 2336[2A01] and si, word [lfsrtap + 2] 2914 ; get the taps (highest bit cleared) 0 000009AC F9 stc ; lowest bit will get set to 1 0 000009AD D1D0 rcl ax, 1 0 000009AF D1D6 rcl si, 1 ; shift the taps to create reverse taps 0 000009B1 3107 xor word [bx], ax 0 000009B3 317702 xor word [bx + 2], si ; tap (NC) 0 000009B6 C3 retn 2921 2922 .justshift: 0 000009B7 D127 shl word [bx], 1 0 000009B9 D15702 rcl word [bx + 2], 1 0 000009BC 31FF xor di, di ; restore di = 0 2926 ; also: set NC if return from setup function 0 000009BE C3 retn 2928 2929 2930 %if _PM 2931 var_dpspsel_setup: section_of_function 0 000009BF BB[5608] mov bx, dpspsel 0 000009C2 8C17 mov word [bx], ss 0 000009C4 F8 clc 0 000009C5 C3 retn 2936 2937 var_seldbg_setup: section_of_function 0 000009C6 BB[5408] mov bx, seldbg 0 000009C9 832700 and word [bx], byte 0 0 000009CC E8[0000]EB02[0000] nearcall ispm 0 000009D3 7502 jnz @F 0 000009D5 8C1F mov word [bx], ds 2943 @@: 0 000009D7 F8 clc 0 000009D8 C3 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 000009D9 51 push cx 2974 %if _PM 0 000009DA 8B3E[0000] mov di, word [auxbuff_switchbuffer_size] 2976 %else 2977 xor di, di 2978 %endif 0 000009DE E8[0000]EB02[0000] nearcall silence_get_start.have_di 0 000009E5 E8[0000]EB02[0000] nearcall silence_count_zeroes 2981 0 000009EC 93 xchg bx, ax 0 000009ED BB[3801] mov bx, rhcount 0 000009F0 8907 mov word [bx], ax 0 000009F2 59 pop cx 0 000009F3 16 push ss 0 000009F4 07 pop es 0 000009F5 31FF xor di, di ; NC 0 000009F7 C3 retn 2990 %endif 2991 2992 2993 var_ioi_setup: section_of_function 0 000009F8 800E[0000]10 setopt [internalflags3], dif3_input_terminal_override 0 000009FD E8[0000]EB02[0000] nearcall peekc 0 00000A04 8026[0000]EF clropt [internalflags3], dif3_input_terminal_override 0 00000A09 BB[5008] mov bx, ioi_var 0 00000A0C 8907 mov word [bx], ax 0 00000A0E F8 clc 0 00000A0F C3 retn 3001 3002 var_iok_setup: section_of_function 0 00000A10 800E[0000]10 setopt [internalflags3], dif3_input_terminal_override 0 00000A15 E8[0000]EB02[0000] nearcall getc 0 00000A1C 8026[0000]EF clropt [internalflags3], dif3_input_terminal_override 0 00000A21 BB[5208] mov bx, iok_var 0 00000A24 8907 mov word [bx], ax 0 00000A26 F8 clc 0 00000A27 C3 retn 3010 3011 %if !_LOADER 3012 %if _PSPVARIABLES 3013 %if _PM 3014 var_psps_setup: section_of_function 0 00000A28 BB[5808] mov bx, psp_selector 0 00000A2B E86D00 nearcall var_get_psp_segment 0 00000A2E 7211 jc @F 0 00000A30 E8[0000]EB02[0000] nearcall ispm 0 00000A37 7508 jnz @F 0 00000A39 53 push bx 0 00000A3A 93 xchg ax, bx 0 00000A3B B80200 mov ax, 0002h 0 00000A3E CD31 int 31h 0 00000A40 5B pop bx 3025 @@: 0 00000A41 8907 mov word [bx], ax 0 00000A43 F8 clc 0 00000A44 C3 retn 3029 %endif 3030 3031 3032 var_ppr_setup: section_of_function 3033 %if _PM 0 00000A45 83EC08 sub sp, 8 0 00000A48 E8[0000]EB02[2818] dualcall save_scratchsel 3036 %endif 0 00000A4F BB[5A08] mov bx, psp_parent 0 00000A52 31C0 xor ax, ax 0 00000A54 8907 mov word [bx], ax 0 00000A56 E85100 nearcall var_get_psp_selector 0 00000A59 7206 jc @F 0 00000A5B 26A11600 mov ax, word [es:16h] 0 00000A5F 8907 mov word [bx], ax ; retrieve parent process 3044 @@: 0 00000A61 16 push ss 0 00000A62 07 pop es 3047 %if _PM 0 00000A63 E8[0000]EB02[5018] dualcall 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. 0 00000A6A E8[0000]EB02[0000] nearcall resetmode ; reset mode if we switched 3053 %endif 0 00000A71 F8 clc 0 00000A72 C3 retn 3056 3057 3058 var_ppi_setup: section_of_function 3059 %if _PM 0 00000A73 83EC08 sub sp, 8 0 00000A76 E8[0000]EB02[2818] dualcall save_scratchsel 3062 %endif 0 00000A7D BB[5C08] mov bx, psp_pra 0 00000A80 31C0 xor ax, ax 0 00000A82 8907 mov word [bx], ax 0 00000A84 894702 mov word [bx + 2], ax 0 00000A87 E82000 nearcall var_get_psp_selector 0 00000A8A 72D5 jc @B 0 00000A8C 26A10A00 mov ax, word [es:TPIV] 0 00000A90 8907 mov word [bx], ax 0 00000A92 26A10C00 mov ax, word [es:TPIV + 2] 0 00000A96 894702 mov word [bx + 2], ax ; retrieve Int22 address 0 00000A99 EBC6 jmp @B 3074 3075 3076 var_get_psp_segment: section_of_function 0 00000A9B A1[0000] mov ax, word [pspdbe] 0 00000A9E 40 inc ax ; FFFFh ? 0 00000A9F 7405 jz short .pspvar_psp_invalid ; yes, invalid --> 0 00000AA1 48 dec ax ; 0 ? 0 00000AA2 7402 jz short .pspvar_psp_invalid ; yes, invalid --> 0 00000AA4 F8 clc 0 00000AA5 C3 retn 3084 3085 .pspvar_psp_invalid: 0 00000AA6 31C0 xor ax, ax 0 00000AA8 F9 stc 0 00000AA9 C3 retn 3089 3090 3091 var_get_psp_selector: section_of_function 0 00000AAA E8EEFF nearcall var_get_psp_segment 0 00000AAD 723F jc .pspvar_psp_invalid 3094 %if _PM 0 00000AAF E8[0000]EB02[0000] nearcall ispm 0 00000AB6 7529 jnz short .pspvar_rm 0 00000AB8 53 push bx 0 00000AB9 66 _386_o32 ; push edx 0 00000ABA 52 push dx 0 00000ABB 51 push cx 0 00000ABC 31D2 xor dx, dx 0 00000ABE B90400 mov cx, 4 3103 .pspvar_shift: 0 00000AC1 D1E0 shl ax, 1 0 00000AC3 D1D2 rcl dx, 1 0 00000AC5 E2FA loop .pspvar_shift ; dx:ax = PSP segment << 4 0 00000AC7 E8[0000]EB02[0000] nearcall getsegmented 3108 ; getsegmented is assumed not to switch modes (see below). 0 00000ACE 7220 jc short .pspvar_error ; (shouldn't happen) 0 00000AD0 66 _386_o32 0 00000AD1 85D2 test dx, dx ; test edx, edx 0 00000AD3 751B jnz short .pspvar_error ; (assumed not to happen) 0 00000AD5 E8[0000]EB02[0000] nearcall setrmlimit 0 00000ADC 59 pop cx 0 00000ADD 66 _386_o32 0 00000ADE 5A pop dx ; pop edx 0 00000ADF 93 xchg ax, bx ; ax = selector 0 00000AE0 5B pop bx 3119 .pspvar_rm: 3120 %endif 0 00000AE1 8EC0 mov es, ax ; es = segment/selector 0 00000AE3 26813E0000CD20 cmp word [es:0], 20CDh ; int 20h opcode ? 0 00000AEA 7502 jne short .pspvar_psp_invalid ; no, invalid --> 0 00000AEC F8 clc 0 00000AED C3 retn 3126 3127 .pspvar_psp_invalid: 0 00000AEE F9 stc 0 00000AEF C3 retn 3130 3131 .pspvar_error: 0 00000AF0 31F6 xor si, si 0 00000AF2 E9E6F5 jmp error_expr 3134 %endif 3135 %endif 3136 3137 3138 %if _BOOTLDR 3139 var_bootldpunit_setup: section_of_function 0 00000AF5 BB[6000] mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit 0 00000AF8 EB45 jmp @F 3143 3144 var_bootsdpunit_setup: section_of_function 0 00000AFA BB[7000] mov bx, load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 0 00000AFD EB40 jmp @F 3148 3149 %if _INPUT_FILE_BOOT 3150 var_bootydpunit_setup: section_of_function 0 00000AFF F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00000B04 7440 jz .retc 3153 0 00000B06 52 push dx 0 00000B07 B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 00000B0A F726[0000] mul word [load_input_file.active] 0 00000B0E 5A pop dx 3158 0 00000B0F 93 xchg ax, bx 0 00000B10 8D9F[8000] lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 0 00000B14 EB29 jmp @F 3163 %endif 3164 3165 var_bootldppart_setup: section_of_function 0 00000B16 BB[3C00] mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 0 00000B19 EB24 jmp @F 3169 3170 var_bootsdppart_setup: section_of_function 0 00000B1B BB[4C00] mov bx, load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 0 00000B1E EB1F jmp @F 3174 3175 %if _INPUT_FILE_BOOT 3176 var_bootydppart_setup: section_of_function 0 00000B20 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00000B25 741F jz .retc 3179 0 00000B27 52 push dx 0 00000B28 B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 00000B2B F726[0000] mul word [load_input_file.active] 0 00000B2F 5A pop dx 3184 0 00000B30 93 xchg ax, bx 0 00000B31 8D9F[5C00] lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 0 00000B35 EB08 jmp @F 3189 %endif 3190 3191 var_bootunitflags_setup: section_of_function 0 00000B37 05[0000] add ax, load_unit_flags 0 00000B3A 89C3 mov bx, ax 0 00000B3C BF[A00C] mov di, mask_bootunitflags 3195 @@: 0 00000B3F F606[0100]40 testopt [internalflags], nodosloaded 0 00000B44 7501 jnz @F ; (NC) 3198 var_bootydpunit_setup.retc: 3199 var_bootydppart_setup.retc: 0 00000B46 F9 stc 3201 @@: 0 00000B47 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 00002667 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 00002668 00 mask_4byte: db 0 0 00002669 00 mask_3byte: db 0 0 0000266A 00 mask_2byte: db 0 0 0000266B 00 mask_1byte: db 0 0 0000266C FFFFFFFF mask_0byte: dd -1 0 00002670 FFFF0000 mask_compoundwithzero: db -1, -1, 0, 0 3222 mask_compoundreg8withzero: 0 00002674 FFFF00FF db -1, -1, 0, -1 0 00002678 FF0FFFFF mask_ysf: dd ~ (ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput) 3226 %if _BOOTLDR 0 0000267C 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 === Switch to base=01F580h -> "LDEBUG_CODE2" 3241 ------------------ note: usesection lDEBUG_CODE2 3242 %else 3243 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 0 00000B48 E8[0000]EB02[0000] nearcall zz_detect_xms ; re-detect XMS if used after run (eg WHILE) 3260 3261 lframe near 3262 lvar word, new_si 0 00000B4F 5589E550 lenter 3264 lvar word, orig_si 0 00000B53 56 push si 3266 lvar word, orig_ax 0 00000B54 50 push ax 0 00000B55 31DB 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 0 00000B57 53 push bx 3277 lvar word, main_index ; used as parameter to zz_match_symbol 0 00000B58 50 push ax 3279 0 00000B59 4E 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 0 00000B5A 3C30 cmp al, '0' 0 00000B5C 7207 jb @F 0 00000B5E 3C39 cmp al, '9' 0 00000B60 7703E9AA01 jbe .not 3292 @@: 3293 0 00000B65 BA[0000] mov dx, msg.sl 0 00000B68 E8[0000]EB02[0000] nearcall isstring? 0 00000B6F 750B jne @F 0 00000B71 AC lodsb 0 00000B72 3C2E cmp al, '.' 0 00000B74 757C jne short .error 0 00000B76 804EF806 or byte [bp + ?flags], ?flag_has_symbol_prefix | ?flag_has_linear 0 00000B7A EB60 jmp .not_symbol_prefix 3302 @@: 3303 0 00000B7C BA[0000] mov dx, msg.symbol 0 00000B7F E8[0000]EB02[0000] nearcall isstring? 0 00000B86 7554 jne .not_symbol_prefix 0 00000B88 AC lodsb 0 00000B89 3C2E cmp al, '.' 0 00000B8B 7565 jne short .error 0 00000B8D 804EF802 or byte [bp + ?flags], ?flag_has_symbol_prefix 3311 0 00000B91 BA[0000] mov dx, msg.linear 0 00000B94 E8[0000]EB02[0000] nearcall isstring? 0 00000B9B 7509 jne @F 0 00000B9D AC lodsb 0 00000B9E 3C2E cmp al, '.' 0 00000BA0 7550 jne short .error 0 00000BA2 804EF804 or byte [bp + ?flags], ?flag_has_linear 3319 @@: 3320 0 00000BA6 BA[0000] mov dx, msg.offset 0 00000BA9 E8[0000]EB02[0000] nearcall isstring? 0 00000BB0 750F jne @F 0 00000BB2 AC lodsb 0 00000BB3 3C2E cmp al, '.' 0 00000BB5 753B jne short .error 0 00000BB7 F646F804 test byte [bp + ?flags], ?flag_has_linear 0 00000BBB 7535 jnz short .error 0 00000BBD 804EF808 or byte [bp + ?flags], ?flag_has_offset 3330 @@: 3331 0 00000BC1 BA[0000] mov dx, msg.base 0 00000BC4 E8[0000]EB02[0000] nearcall isstring? 0 00000BCB 750F jne @F 0 00000BCD AC lodsb 0 00000BCE 3C2E cmp al, '.' 0 00000BD0 7520 jne short .error 0 00000BD2 F646F80C test byte [bp + ?flags], ?flag_has_linear | ?flag_has_offset 0 00000BD6 751A jnz short .error 0 00000BD8 804EF810 or byte [bp + ?flags], ?flag_has_base 3341 @@: 3342 3343 .not_symbol_prefix: 3344 0 00000BDC 31DB xor bx, bx 0 00000BDE 89F2 mov dx, si 3347 .loopname: 0 00000BE0 AC lodsb 0 00000BE1 E847F9 nearcall isseparator?.except_L_or_dot 0 00000BE4 740F je .endname 0 00000BE6 E8770B nearcall getexpression.lit_ishexdigit? 0 00000BE9 7304 jnc @F 0 00000BEB 804EF801 or byte [bp + ?flags], ?flag_has_nondigit 3354 @@: 0 00000BEF 43 inc bx 0 00000BF0 EBEE jmp .loopname 3357 3358 .error: 0 00000BF2 E9E6F4 jmp error_expr ; does not use es 3360 3361 .endname: 0 00000BF5 8976FE mov word [bp + ?new_si], si 0 00000BF8 89D9 mov cx, bx 0 00000BFA 85C9 test cx, cx 0 00000BFC 7503E90E01 jz .not 3366 0 00000C01 F646F803 test byte [bp + ?flags], ?flag_has_nondigit | ?flag_has_symbol_prefix 0 00000C05 7503E90501 jz .not 3369 0 00000C0A 89D6 mov si, dx 0 00000C0C 51 push cx 0 00000C0D E8[0000] nearcall zz_hash 0 00000C10 59 pop cx 3374 3375 .loop: 3376 ; ?main_index used as parameter 0 00000C11 16 push ss 0 00000C12 52 push dx 0 00000C13 51 push cx 3380 0 00000C14 E8[0000]EB02[0000] dualcall zz_match_symbol ; ! note that possibly es != ss 0 00000C1B 7303E9EF00 jc .not 3383 0 00000C20 26F6450D10 testopt [es:di + smFlags], smfPoison 0 00000C25 7405 jz @F 0 00000C27 800E[0200]80 setopt [internalflags2], dif2_poison 3387 @@: 3388 0 00000C2C 268B15 mov dx, word [es:di + smLinear] 0 00000C2F 268B5D02 mov bx, word [es:di + smLinear + 2] 0 00000C33 F646F804 test byte [bp + ?flags], ?flag_has_linear 0 00000C37 7403E9BD00 jnz .got 0 00000C3C F646F810 test byte [bp + ?flags], ?flag_has_base 0 00000C40 740B jz .offset 3395 .base: 3396 ; offset=100 linear=10100 base=10000 0 00000C42 262B5504 sub dx, word [es:di + smOffset] 0 00000C46 261B5D06 sbb bx, word [es:di + smOffset + 2] 0 00000C4A E9AC00 jmp .got 3400 3401 .offset: 0 00000C4D 8B76FE mov si, word [bp + ?new_si] 0 00000C50 4E dec si 0 00000C51 E8[0000]EB02[0000] nearcall skipcomma ; does not use es 0 00000C58 4E dec si 0 00000C59 BA[0000] mov dx, msg.wrt 0 00000C5C 06 push es 0 00000C5D 16 push ss 0 00000C5E 07 pop es 0 00000C5F E8[0000]EB02[0000] nearcall isstring? ; uses es 0 00000C66 07 pop es 0 00000C67 7403E98500 jne .offset_no_wrt 3413 0 00000C6C E8[0000]EB02[0000] nearcall skipcomma ; does not use es 3415 0 00000C73 3C24 cmp al, '$' 0 00000C75 750B jne @F 3418 0 00000C77 804EF820 or byte [bp + ?flags], ?flag_is_86m_segment 0 00000C7B E8[0000]EB02[0000] nearcall skipcomma ; does not use es 3421 @@: 3422 0 00000C82 FF36[C60C] push word [hh_depth_of_single_term] 0 00000C86 8B16[C40C] mov dx, word [hh_depth] 0 00000C8A 42 inc dx 0 00000C8B 8916[C60C] mov word [hh_depth_of_single_term], dx 0 00000C8F 16 push ss 0 00000C90 07 pop es 0 00000C91 E88205 nearcall getexpression ; (recursive) uses es 0 00000C94 8F06[C60C] 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. 0 00000C98 FF76F6 push word [bp + ?main_index] 0 00000C9B 50 push ax ; (reserve space, uninitialised) 0 00000C9C E8[0000]EB02[0000] dualcall getfarpointer.main 0 00000CA3 5F pop di 0 00000CA4 07 pop es 3441 0 00000CA5 E8[0000]EB02[0000] nearcall skipcomm0 ; does not use es 0 00000CAC 8976FE mov word [bp + ?new_si], si 3444 0 00000CAF 85DB test bx, bx 0 00000CB1 753B jnz short .errorj1 3447 0 00000CB3 89D3 mov bx, dx 3449 %if _PM 0 00000CB5 F646F820 test byte [bp + ?flags], ?flag_is_86m_segment 0 00000CB9 7514 jnz .wrt_rm 0 00000CBB E8[0000]EB02[0000] nearcall ispm ; does not use es 0 00000CC2 750B jnz .wrt_rm 3454 0 00000CC4 B80600 mov ax, 0006h 0 00000CC7 CD31 int 31h ; cx:dx = base 0 00000CC9 7223 jc short .errorj1 0 00000CCB 91 xchg ax, cx ; ax:dx = base 0 00000CCC 92 xchg dx, ax ; dx:ax = base 0 00000CCD EB0D jmp .offset_wrt 3461 3462 .wrt_rm: 3463 %endif 0 00000CCF 31D2 xor dx, dx 0 00000CD1 89D8 mov ax, bx 0 00000CD3 B90400 mov cx, 4 3467 @@: 0 00000CD6 D1E0 shl ax, 1 0 00000CD8 D1D2 rcl dx, 1 0 00000CDA E2FA 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 0 00000CDC F7DA neg dx 0 00000CDE F7D8 neg ax 0 00000CE0 83DA00 sbb dx, byte 0 ; neg dx:ax 0 00000CE3 260305 add ax, word [es:di + smLinear] 0 00000CE6 26135502 adc dx, word [es:di + smLinear + 2] ; linear - seg base 0 00000CEA 92 xchg ax, dx ; ax:dx = value 0 00000CEB 93 xchg ax, bx ; bx:dx = value 0 00000CEC EB0B jmp .got 3487 3488 .errorj1: 0 00000CEE E9EAF3 jmp error_expr ; does not use es 3490 3491 3492 .offset_no_wrt: 0 00000CF1 268B5504 mov dx, word [es:di + smOffset] 0 00000CF5 268B5D06 mov bx, word [es:di + smOffset + 2] 3495 3496 .got: 0 00000CF9 26F6450D01 testopt [es:di + smFlags], smfBase 0 00000CFE 7407 jz @F 0 00000D00 FF76F6 push word [bp + ?main_index] 0 00000D03 8F06[0000] pop word [sym_storage.main.based.base] 3501 ; if called from zz_add set up base 3502 @@: 3503 0 00000D07 8B76FE mov si, word [bp + ?new_si] 0 00000D0A 4E dec si 0 00000D0B AC lodsb 0 00000D0C F8 clc 0 00000D0D EB07 jmp .ret 3509 .not: 0 00000D0F F9 stc 3511 0 00000D10 8B76FC mov si, word [bp + ?orig_si] 0 00000D13 8B46FA mov ax, word [bp + ?orig_ax] 3514 .ret: 0 00000D16 16 push ss 0 00000D17 07 pop es ; reset es 0 00000D18 89EC5D lleave 0 00000D1B C3 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 00000D1C 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 00000D1D F9 stc 3582 0 00000D1E 4E dec si 3584 lframe 0 00000D1F 5589E5 lenter 3586 lvar word, bit0_is_return_name 0 00000D22 9C pushf 3588 lvar word, return_name_pointer 0 00000D23 57 push di 3590 %if ivfNameLengthLimit != 13 3591 %error Adjust code here to new ivfNameLengthLimit 3592 %endif 0 00000D24 31C0 xor ax, ax 3594 lvar 16, namebuffer 0 00000D26 50 push ax ; ax = 0 so that accidentally reading past 3596 ; the actual buffer wouldn't match 0 00000D27 FF740C push word [si+12] 0 00000D2A FF740A push word [si+10] 0 00000D2D FF7408 push word [si+8] 0 00000D30 FF7406 push word [si+6] 0 00000D33 FF7404 push word [si+4] 0 00000D36 FF7402 push word [si+2] 0 00000D39 FF34 push word [si] 0 00000D3B 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 00000D3D 50 push ax ; field type initialised to 0 (RW), flags too 0 00000D3E 31DB _386 xor bx, bx ; (a flag for the 32-bit register name check) 3611 lvar word, length_to_add 0 00000D40 50 push ax ; = 0 3613 lvar word, startpointer 0 00000D41 56 push si ; -> name start 0 00000D42 89FE mov si, di 0 00000D44 57 push di 3617 0 00000D45 B91000 mov cx, 16 3619 .store: 0 00000D48 AC lodsb 3621 ; nearcall uppercase; (isseparator? calls uppercase) 0 00000D49 E8BEF7 nearcall isseparator? 0 00000D4C F8 clc 0 00000D4D 7501 jne short .not_separator 0 00000D4F F9 stc 3626 .not_separator: 0 00000D50 D1DA rcr dx, 1 ; dl = flags indicating separators 0 00000D52 AA stosb 0 00000D53 E2F3 loop .store 3630 0 00000D55 5E pop si 3632 0 00000D56 F646FE01 test byte [bp + ?bit0_is_return_name], 1 0 00000D5A 7409 jz @F 3635 0 00000D5C 56 push si 0 00000D5D B107 mov cl, 14 >> 1 0 00000D5F 8B7EFC mov di, word [bp + ?return_name_pointer] 0 00000D62 F3A5 rep movsw 0 00000D64 5E pop si 3641 3642 @@: 0 00000D65 F6C214 test dl, 1<<2|1<<4 0 00000D68 AD lodsw 0 00000D69 7503E9A500 jz .notreg16 3646 0 00000D6E E88C00 call .reg16names_match ; (iff no match, --> .notreg16) 3648 ; bx-> regs entry of (first) match 0 00000D71 F6C204 test dl, 1<<2 0 00000D74 AD lodsw 0 00000D75 7436 jz @F 0 00000D77 F6C220 test dl, 1<<5 0 00000D7A 742E jz .reg16_j 0 00000D7C 817CFC464C cmp word [si - 4], "FL" 0 00000D81 7527 jne .reg16_j 0 00000D83 3C2E cmp al, '.' 0 00000D85 7523 jne .reg16_j 0 00000D87 4E dec si 0 00000D88 AD lodsw 0 00000D89 BF[0000] mov di, flagnames 0 00000D8C B9[0000] mov cx, flagbits.amount 0 00000D8F F2AF repne scasw 0 00000D91 7517 jne .reg16_j 3664 %if _LINK 0 00000D93 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 00000D97 BB[0000] mov bx, flagvaron 0 00000D9A 8506[0000] test ax, word [reg_efl] 0 00000D9E 7501 jnz .flagon 0 00000DA0 43 inc bx 3676 .flagon: 0 00000DA1 B90105 mov cx, (5 << 8) | 1 ; 5-byte name, 1-byte variable 0 00000DA4 FE46EB inc byte [bp + ?fieldtype] 3679 ; = 1 (RO) 0 00000DA7 E9D300 jmp .return_success_var32_set_dx 3681 3682 .reg16_j: 0 00000DAA E9CC00 jmp .reg16 ; iff single match --> 3684 3685 @@: 0 00000DAD 3D3030 cmp ax, "00" 0 00000DB0 743E je .compoundwithzero 3688 3689 ; Check for a second 16-bit register name 3690 ; (ie check for a compound register name) 0 00000DB2 E84800 call .reg16names_match ; (iff no match, --> .notreg16) 3692 ; bx-> regs entry of second match 0 00000DB5 92 xchg dx, ax ; dx-> regs entry of first match 0 00000DB6 B90404 mov cx, 4<<8|4 3695 .return_success: ; cx, bx, dx, ?fieldtype set 0 00000DB9 31C0 xor ax, ax 0 00000DBB 88C8 mov al, cl 0 00000DBD F7D8 neg ax 0 00000DBF 05[900C] add ax, masks + 4 ; 4 - size = offset into masks 0 00000DC2 97 xchg di, ax ; di -> mask 0 00000DC3 807EEB01 cmp byte [bp + ?fieldtype], 1 0 00000DC7 7503 jne @F 0 00000DC9 BF[900C] mov di, mask_0byte ; di -> mask 3704 @@: 3705 .return_success_di: 0 00000DCC 31C0 xor ax, ax 0 00000DCE 88E8 mov al, ch ; ax = length 3708 0 00000DD0 F646FE01 test byte [bp + ?bit0_is_return_name], 1 0 00000DD4 7407 jz @F 3711 0 00000DD6 8B76FC mov si, word [bp + ?return_name_pointer] 0 00000DD9 01C6 add si, ax 0 00000DDB 8824 mov byte [si], ah ; zero-terminate 3715 @@: 3716 0 00000DDD 5E pop si ; ?startpointer 0 00000DDE F646EA01 testopt [bp + ?flags], 1 0 00000DE2 7402 jz @F 0 00000DE4 58 pop ax ; get length to add to start 0 00000DE5 50 push ax ; fill stack slot again 3722 @@: 0 00000DE6 01C6 add si, ax ; -> behind name (should NC) 0 00000DE8 58 pop ax ; discard ?length_to_add 0 00000DE9 F8 clc ; (NC) 3726 .return_ax_frame_lodsb: 0 00000DEA 58 pop ax ; ah = ?type 0 00000DEB 89EC5D lleave code 0 00000DEE AC lodsb 3730 .retn: 0 00000DEF C3 retn 3732 3733 3734 .compoundwithzero: 0 00000DF0 BF[940C] mov di, mask_compoundwithzero 3736 ; only allow writing upper word 0 00000DF3 B90404 mov cx, 4 << 8 | 4 ; 4-byte name, 4-byte variable 3738 .return_compoundwithzero: 0 00000DF6 89DA mov dx, bx ; -> word to use as upper word 0 00000DF8 BB[960C] mov bx, mask_compoundwithzero + 2 3741 ; -> (constant) word that is zero, as lower word 3742 ; This depends on the contents of mask_compoundwithzero. 0 00000DFB 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 00000DFD BF[0000] mov di, reg16names 0 00000E00 B110 mov cl, 16 0 00000E02 F2AF repne scasw 0 00000E04 750C jne short .notreg16_pop ; no match --> 0 00000E06 01FF add di, di 0 00000E08 93 xchg ax, bx ; (returned for compound register name match) 3771 %if _LINK 0 00000E09 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 00000E0D C3 _386 retn 3780 ; cx = number of remaining reg16names 0 00000E0E 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 00000E10 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 00000E12 58 pop ax ; (discard near return address) 3788 .notreg16: 3789 ; Check for a 32-bit register name 0 00000E13 F6C208 _386 test dl, 1<<3 0 00000E16 7419 _386 jz short .notreg32 3792 0 00000E18 8D76EC _386 lea si, [bp+?namebuffer] 0 00000E1B AC _386 lodsb 0 00000E1C D0EB _386 shr bl, 1 ; CY iff second entry during same call 3796 ; (in that case, al contains 'E') 0 00000E1E 1C45 _386 sbb al, 'E' ; possibly an 'E' register ? (on first entry) 0 00000E20 AD _386 lodsw 0 00000E21 750E _386 jne short .notreg32 ; no --> (or after second entry) 0 00000E23 43 _386 inc bx ; prepare flag for second entry 3801 ; (this requires regs to be dword-aligned!) 0 00000E24 80FC53 _386 cmp ah, 'S' ; candidate segment register ? 0 00000E27 7408 _386 je short .notreg32 ; yes, skip check (disallow match) --> 3804 0 00000E29 E8D1FF _386 call .reg16names_match ; (iff no match, --> .notreg16 (second entry)) 3806 ; bx-> regs entry of match 0 00000E2C B90403 _386 mov cx, 3<<8|4 0 00000E2F EB4C _386 jmp short .return_success_var32_set_dx 3809 3810 .notreg32: 3811 ; Check for an 8-bit register name 0 00000E31 F6C214 test dl, 1 << 2 | 1 << 4 0 00000E34 744D jz .notreg8 3814 0 00000E36 8D76EC lea si, [bp+?namebuffer] 0 00000E39 AD lodsw 0 00000E3A BF[0000] mov di, reg8names 0 00000E3D B108 mov cl, 8 0 00000E3F F2AF repne scasw 0 00000E41 7540 jne short .notreg8 3821 ; cx = cl = number of remaining reg8names 0 00000E43 80E101 and cl, 1 ; cx = cl = 1 iff an xL register, else 0 3823 %if _LINK 0 00000E46 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 00000E4A 01CB add bx, cx ; bx-> reg_eax if AL, reg_eax+1 if AH, etc 0 00000E4C B101 mov cl, 1 3832 0 00000E4E F6C204 test dl, 1 << 2 0 00000E51 7528 jnz .got2bytename 3835 0 00000E53 AD lodsw 0 00000E54 3D3030 cmp ax, "00" 0 00000E57 7417 je .compoundreg8withzero 3839 0 00000E59 BF[0000] mov di, reg16names 0 00000E5C B110 mov cl, 16 0 00000E5E F2AF repne scasw 0 00000E60 7521 jne short .notreg8 ; no match --> 0 00000E62 01FF add di, di 0 00000E64 87D3 xchg dx, bx 3846 %if _LINK 0 00000E66 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 00000E6A B90304 mov cx, 4 << 8 | 3 ; 4-byte name, 3-byte variable 0 00000E6D E949FF jmp .return_success ; cx, bx, dx, ?fieldtype set 3858 3859 .compoundreg8withzero: 0 00000E70 BF[980C] mov di, mask_compoundreg8withzero 3861 ; only allow writing low byte of upper word 0 00000E73 B90304 mov cx, 4 << 8 | 3 ; 4-byte name, 3-byte variable 0 00000E76 E97DFF jmp .return_compoundwithzero 3864 3865 .reg16: 0 00000E79 B102 mov cl, 2 3867 .got2bytename: 3868 .got2bytename_var32_set_dx: 0 00000E7B B502 mov ch, 2 3870 .return_success_var32_set_dx: 0 00000E7D 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 00000E80 E936FF jmp .return_success 3875 3876 .notreg8: 3877 0 00000E83 BF[6008] mov di, isvariable_morebyte_nameheaders 3879 3880 .loop: 0 00000E86 8366EA00 and word [bp + ?fieldtype_high_flags_low], 0 3882 ; clear in case earlier iteration set it 3883 0 00000E8A 8B46EC mov ax, word [bp + ?namebuffer] 0 00000E8D B9[C809] mov cx, isvariable_morebyte_nameheaders.end 0 00000E90 39CF cmp di, cx 0 00000E92 730A jae @F 0 00000E94 29F9 sub cx, di 0 00000E96 D1E9 shr cx, 1 ; = how many headers remaining 0 00000E98 F2AF repne scasw 0 00000E9A 7421 je .check_morebyte 3892 %if IVS_HAVE_ONEBYTE 0 00000E9C EB0C jmp .next_no_pop 3894 3895 @@: 3896 %if IVS_SINGLE_ONEBYTE 0 00000E9E 41 inc cx 0 00000E9F 39CF cmp di, cx ; iteration after one byte var check ? 0 00000EA1 7309 jae @F ; yes, end --> 0 00000EA3 47 inc di ; remember we did the one byte check 0 00000EA4 3C56 cmp al, IVS_SINGLE_ONEBYTE_NAME 0 00000EA6 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 00000EA8 A8 db __TEST_IMM8 ; (skip pop) 3912 .next: 0 00000EA9 5F pop di 3914 .next_no_pop: 0 00000EAA EBDA jmp .loop 3916 3917 @@: 3918 .end: 3919 .return_failure: 0 00000EAC 5E pop si ; ?startpointer 0 00000EAD 58 pop ax ; ?length_to_add 0 00000EAE F9 stc 0 00000EAF E938FF jmp .return_ax_frame_lodsb 3924 3925 3926 %if IVS_HAVE_ONEBYTE 3927 .check_onebyte: 0 00000EB2 57 push di 3929 %if IVS_SINGLE_ONEBYTE 0 00000EB3 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 00000EB6 8D76ED lea si, [bp + ?namebuffer + 1] ; -> buffered string (allcaps) 0 00000EB9 31C9 xor cx, cx ; = 0, gets incremented next 0 00000EBB EB25 jmp @F 3948 %endif 3949 3950 .check_morebyte: 0 00000EBD 57 push di 0 00000EBE 81EF[6208] sub di, isvariable_morebyte_nameheaders + 2 3953 ; = index * 2 3954 %if ISVARIABLESTRUC_size == 10 0 00000EC2 89FB mov bx, di ; = index * 2 0 00000EC4 01FF add di, di ; = index * 4 0 00000EC6 01FF add di, di ; = index * 8 0 00000EC8 01DF add di, bx ; = index * 10 3959 %else 3960 %error Unexpected structure size 3961 %endif 0 00000ECA 8D9D[4401] lea bx, [di + isvariable_struc_morebyte_list] 0 00000ECE 8B4F02 mov cx, word [bx + ivFlags] 0 00000ED1 83E10F and cx, ivfNameLengthMask ; cx = length 0 00000ED4 8B3F mov di, word [bx + ivName] ; -> name 0 00000ED6 8D76EE lea si, [bp + ?namebuffer + 2] ; -> buffered string (allcaps) 0 00000ED9 38C0 cmp al, al ; ZR (in case remaining length is zero) 0 00000EDB 51 push cx 0 00000EDC F3A6 repe cmpsb ; compare 0 00000EDE 59 pop cx 0 00000EDF 75C8 jne .next ; if not same --> 0 00000EE1 41 inc cx ; increment twice 3973 @@: 0 00000EE2 41 inc cx ; increment once 0 00000EE3 AC lodsb ; get next byte in buffer 0 00000EE4 807F0800 cmp byte [bx + ivArrayLast], 0 0 00000EE8 7503E9DD00 je .notarray 3978 3979 .array: 0 00000EED 3C28 cmp al, '(' 0 00000EEF 7560 jne .array_not_index_expression ; not index expression --> 3982 3983 .array_index_expression: 0 00000EF1 8B76E6 mov si, word [bp + ?startpointer] 0 00000EF4 01CE add si, cx ; -> at opening parens 0 00000EF6 46 inc si ; -> behind opening parens 0 00000EF7 AC lodsb 0 00000EF8 52 push dx 0 00000EF9 53 push bx 0 00000EFA E81903 nearcall getexpression 0 00000EFD 50 push ax 0 00000EFE 80E43F and ah, 3Fh 0 00000F01 80FC08 cmp ah, 8 ; from checksignificantbits 0 00000F04 58 pop ax 0 00000F05 B600 mov dh, 0 0 00000F07 89D7 mov di, dx ; di = index 0 00000F09 5B pop bx 0 00000F0A 5A pop dx 0 00000F0B 779C ja short .next ; more than 8 significant bits --> 0 00000F0D E8[0000]EB02[0000] nearcall skipwh0 0 00000F14 3C29 cmp al, ')' ; insure closing parens 0 00000F16 7547 jne short .error_j3 4003 0 00000F18 56 push si 0 00000F19 2B76E6 sub si, word [bp + ?startpointer] 4006 ; = how much to skip 0 00000F1C 8976E8 mov word [bp + ?length_to_add], si 0 00000F1F 5E pop si 0 00000F20 804EEA01 setopt [bp + ?flags], 1 4010 0 00000F24 F646FE01 test byte [bp + ?bit0_is_return_name], 1 0 00000F28 741D jz .array_no_return_name 4013 0 00000F2A 97 xchg ax, di 0 00000F2B 8B7EFC mov di, word [bp + ?return_name_pointer] 0 00000F2E 01CF add di, cx ; -> behind name 0 00000F30 807F080F cmp byte [bx + ivArrayLast], 0Fh 0 00000F34 7709 ja @F ; if >= 10h is a valid index --> 0 00000F36 E8[0000]EB02[0000] nearcall hexnyb ; expand to single digit 0 00000F3D EB07 jmp @FF 4021 @@: 0 00000F3F E8[0000]EB02[0000] nearcall hexbyte ; expand to two digits 4023 @@: 0 00000F46 97 xchg ax, di ; restore di = index 4025 4026 .array_no_return_name: 0 00000F47 41 inc cx ; make space for one digit 0 00000F48 807F080F cmp byte [bx + ivArrayLast], 0Fh 0 00000F4C 7601 jna @F ; if maximum index <= 0Fh --> 0 00000F4E 41 inc cx ; make space for another digit 4031 @@: 0 00000F4F EB66 jmp .array_index_expression_common 4033 4034 .array_not_index_expression: 0 00000F51 E8B6F5 nearcall isseparator? ; name ends ? 0 00000F54 750C jne @F ; no --> 0 00000F56 F6470302 testopt [bx + ivFlags], ivfArrayOptional 4038 ; is the index optional ? 0 00000F5A 7573 jnz .arrayfirst ; yes, handle as if first --> 4040 .next_j1: 0 00000F5C E94AFF jmp .next ; no, mismatch --> 4042 4043 .error_j3: 0 00000F5F E979F1 jmp error_expr 4045 4046 @@: 0 00000F62 E8C408 nearcall getnyb 0 00000F65 72F5 jc .next_j1 0 00000F67 98 cbw ; ax = first nybble of index 0 00000F68 97 xchg di, ax ; di = first nybble of index 0 00000F69 AC lodsb 0 00000F6A F6470304 testopt [bx + ivFlags], ivfSeparatorSpecial 0 00000F6E 740D jz @F 0 00000F70 807F080F cmp byte [bx + ivArrayLast], 0Fh 4055 ; highest > 0Fh ? 0 00000F74 7635 jna .gotseparatorspecial; no --> 0 00000F76 E8B008 nearcall getnyb 0 00000F79 7230 jc .gotseparatorspecial ; not hexit, treat as separator --> 0 00000F7B EB10 jmp .have_second_digit ; have al == 0..0Fh 4060 4061 @@: 0 00000F7D E88AF5 nearcall isseparator? ; single digit ? 0 00000F80 7424 je @F ; yes --> 0 00000F82 807F080F cmp byte [bx + ivArrayLast], 0Fh 4065 ; highest > 0Fh ? 0 00000F86 76D4 jna .next_j1 ; no --> 4067 .get_second_digit: 0 00000F88 E89E08 nearcall getnyb 0 00000F8B 72CF jc .next_j1 4070 .have_second_digit: 0 00000F8D 98 cbw ; ax = second nybble of index 0 00000F8E 01FF add di, di 0 00000F90 01FF add di, di 0 00000F92 01FF add di, di 0 00000F94 01FF add di, di ; di = first digit times 16 0 00000F96 01C7 add di, ax ; di = full index 0 00000F98 AC lodsb 0 00000F99 F6470304 testopt [bx + ivFlags], ivfSeparatorSpecial 0 00000F9D 7507 jnz @F 0 00000F9F E868F5 nearcall isseparator? 0 00000FA2 75B8 jne .next_j1 0 00000FA4 EB05 jmp .gotseparatorspecial 4083 @@: ; make sure no hexit follows 0 00000FA6 E88008 nearcall getnyb 0 00000FA9 73B1 jnc .next_j1 4086 .gotseparatorspecial: 4087 0 00000FAB F7DE neg si ; minus -> after separator 0 00000FAD 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 00000FB0 F7D9 neg cx ; -> at separator minus -> buffered string 0 00000FB2 8B76E6 mov si, word [bp + ?startpointer] 0 00000FB5 01CE add si, cx 4096 4097 .array_index_expression_common: 4098 ; si -> behind index 0 00000FB7 89F8 mov ax, di 4100 ; test ah, ah 4101 ; jnz short .error_j1 ; (not possible) 0 00000FB9 3A4708 cmp al, byte [bx + ivArrayLast] 4103 ; index > last ? 0 00000FBC 779E ja short .next_j1 ; then error --> 4105 0 00000FBE F6470301 testopt [bx + ivFlags], ivfArrayOneBased 0 00000FC2 7403 jz @F ; got index 0 00000FC4 48 dec ax ; decrement index to get 0-based 0 00000FC5 7895 js short .next_j1 ; if it was 0, invalid --> 4110 @@: 0 00000FC7 96 xchg ax, si ; si = index 0 00000FC8 EB07 jmp .arraycommon ; continue 4113 4114 4115 .notarray: 0 00000FCA E83DF5 nearcall isseparator? ; name ends ? 0 00000FCD 758D jne short .next_j1 ; no, mismatch --> 4118 4119 .arrayfirst: 0 00000FCF 31F6 xor si, si ; si = array index (0 here) 4121 4122 .arraycommon: 0 00000FD1 88CD mov ch, cl ; ch = name length 0 00000FD3 8B4702 mov ax, word [bx + ivFlags] 0 00000FD6 83E030 and ax, ivfVarLengthMask; ax = shifted encoded var length 0 00000FD9 B104 mov cl, ivfVarLengthShift 0 00000FDB D3E8 shr ax, cl ; ax = encoded var length 0 00000FDD 40 inc ax ; decode var length 0 00000FDE 88C1 mov cl, al ; cl = var length 4130 0 00000FE0 96 xchg ax, si ; ax = array index 4132 0 00000FE1 F6470280 testopt [bx + ivFlags], ivfReadOnly 0 00000FE5 7403 jz @F 0 00000FE7 FE46EB inc byte [bp + ?fieldtype] 4136 ; = 1 (RO) 4137 @@: 0 00000FEA 31FF xor di, di ; (NC) 0 00000FEC 8B7706 mov si, word [bx + ivSetup] 0 00000FEF 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 00000FF1 7303E9B3FE jc .next 0 00000FF6 5A pop dx ; (discard pointer into names/headers) 0 00000FF7 8D5702 lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 0 00000FFA 85FF test di, di 0 00000FFC 7503E9B8FD jz .return_success 0 00001001 E9C8FD jmp .return_success_di 4156 4157 4158 default_variable_setup: section_of_function 0 00001004 8A5709 mov dl, byte [bx + ivArrayBetween] 0 00001007 B600 mov dh, 0 ; dx = array between offset 0 00001009 00CA add dl, cl 0 0000100B 10F6 adc dh, dh ; dx = array item size 0 0000100D F7E2 mul dx ; dx:ax = ax times dx 0 0000100F 85D2 test dx, dx 0 00001011 7507 jnz short .error_j2 0 00001013 034704 add ax, word [bx + ivAddress] 4167 ; ax -> variable 0 00001016 7202 jc short .error_j2 4169 ; NC 0 00001018 93 xchg ax, bx ; bx -> variable 0 00001019 C3 retn 4172 4173 .error_j2: 0 0000101A E9BEF0 jmp error_expr 4175 4176 4177 %if _MMXSUPP 4178 var_mm_setup: section_of_function 0 0000101D 803E[0000]01 cmp byte [has_mmx], 1 ; MMX supported ? 0 00001022 7301 jae @F ; yes --> 0 00001024 C3 retn ; (CY) 4182 4183 @@: 4184 [cpu 586] 0 00001025 50 push ax 0 00001026 8D76EF lea si, [bp + ?namebuffer + 3] 4187 ; -> may be type letter, if not index expression 0 00001029 F646EA01 testopt [bp + ?flags], 1 0 0000102D 7409 jz @F 0 0000102F 8B76E6 mov si, word [bp + ?startpointer] 0 00001032 0376E8 add si, word [bp + ?length_to_add] 0 00001035 FF46E8 inc word [bp + ?length_to_add] 4193 4194 @@: 0 00001038 AC lodsb ; load what may be type letter 0 00001039 E8[0000]EB02[0000] nearcall capitalise 4197 0 00001040 3C5A cmp al, 'Z' 0 00001042 7418 je @F ; 0 = ZX low --> 0 00001044 B310 mov bl, 2<<3 ; = 10h = low 0 00001046 3C4C cmp al, 'L' 0 00001048 7414 je @FF 0 0000104A B308 mov bl, 1<<3 ; = 8h = SX low 0 0000104C 3C53 cmp al, 'S' 0 0000104E 740E je @FF 0 00001050 B318 mov bl, 3<<3 ; = 18h = high 0 00001052 3C48 cmp al, 'H' 0 00001054 7408 je @FF 0 00001056 FF4EE8 dec word [bp + ?length_to_add] 0 00001059 4E dec si ; -> back at the last text 4211 ; (subsequent code will check for separator) 0 0000105A B000 mov al, 0 4213 @@: 0 0000105C B300 mov bl, 0 ; 0 = ZX low 4215 @@: ; is valid letter 0 0000105E 50 push ax 0 0000105F AC lodsb ; = candidate separator 0 00001060 E8A7F4 nearcall isseparator? ; is it ? 0 00001063 58 pop ax 0 00001064 7566 jne .ret_CY_pop ; no --> 4221 0 00001066 F646FE01 test byte [bp + ?bit0_is_return_name], 1 0 0000106A 7406 jz .no_return_name 4224 0 0000106C 8B76FC mov si, word [bp + ?return_name_pointer] 0 0000106F 884403 mov byte [si + 3], al ; store the additional letter (or 0) 4227 ; pointer + 3 ("MM" then hexit) 4228 4229 .no_return_name: 0 00001072 84C0 test al, al 0 00001074 58 pop ax 0 00001075 7402 jz @F 0 00001077 FEC5 inc ch ; increment name length 4234 @@: 0 00001079 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 0000107A 08D8 or al, bl 0 0000107C 40 inc ax 0 0000107D 40 inc ax 0 0000107E 8846EB mov byte [bp + ?fieldtype], al 4243 4244 %if _PM 0 00001081 83EC08 sub sp, 8 0 00001084 E8[0000]EB02[2818] dualcall save_scratchsel 4247 %if _EXPRDUALCODE && _DUALCODE 0 0000108B 8B16[0000] mov dx, word [code2_seg] 4249 %else 4250 mov dx, word [code_seg] 4251 %endif 0 0000108F E8[0000]EB02[0000] nearcall setes2dx ; es => lDEBUG_CODE/2 (writable) 4253 %else 4254 %if _EXPRDUALCODE && _DUALCODE 4255 mov es, word [code2_seg]; es => lDEBUG_CODE2 4256 %else 4257 mov es, word [code_seg] ; es => lDEBUG_CODE 4258 %endif 4259 %endif 0 00001096 C0E303 shl bl, 3 ; shift into reg field 0 00001099 80CB07 or bl, 07h ; code to get our ModR/M byte (r/m = [bx]) 0 0000109C 26881E[DB0F] mov byte [es:.getmmxlow_modrm], bl 4263 ; SMC in section lDEBUG_CODE or lDEBUG_CODE2 0 000010A1 26881E[E80F] mov byte [es:.getmmxhigh_modrm], bl 4265 ; SMC in section lDEBUG_CODE or lDEBUG_CODE2 0 000010A6 EB00 jmp @F ; try to invalidate prefetch 4267 @@: 4268 0 000010A8 16 push ss 0 000010A9 07 pop es 4271 4272 %if _PM 0 000010AA E8[0000]EB02[5018] dualcall restore_scratchsel 4274 %endif 4275 0 000010B1 BB[0000] mov bx, mmxbuff 4277 .getmmxlow: 4278 .getmmxlow_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 0 000010B4 0F7E07 movd dword [bx], mm0 ; first, initialise with low dword 4280 0 000010B7 3C18 cmp al, 18h ; want to write high dword ? 0 000010B9 720F jb .mmxcommon ; no --> 4283 4284 .getmmxhigh: 0 000010BB 83EC08 sub sp, byte 8 0 000010BE 89E0 mov ax, sp ; (ss = ds) 0 000010C0 93 xchg bx, ax ; bx -> qword on stack, ax -> mmxbuff 4288 .getmmxhigh_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 0 000010C1 0F7F07 movq qword [bx], mm0 0 000010C4 93 xchg bx, ax ; restore bx -> mmxbuff 0 000010C5 5E pop si 0 000010C6 5E pop si ; discard low dword 0 000010C7 668F07 pop dword [bx] ; save high dword here 4294 4295 .mmxcommon: 0 000010CA F8 clc 0 000010CB C3 retn 4298 __CPU__ 4299 4300 4301 .ret_CY_pop: 0 000010CC 58 pop ax 4303 .ret_CY: 0 000010CD F9 stc 0 000010CE C3 retn 4306 %endif 4307 4308 4309 var_ri_setup: section_of_function 0 000010CF 8D76EF lea si, [bp + ?namebuffer + 3] 0 000010D2 F646EA01 testopt [bp + ?flags], 1 0 000010D6 740F jz @F 0 000010D8 8B76E6 mov si, word [bp + ?startpointer] 0 000010DB 0376E8 add si, word [bp + ?length_to_add] 0 000010DE FF46E8 inc word [bp + ?length_to_add] 0 000010E1 50 push ax 0 000010E2 B301 mov bl, 1 ; set up 1 additional digit 0 000010E4 AC lodsb ; load what must be type letter 0 000010E5 EB0A jmp .expr 4320 4321 @@: 0 000010E7 50 push ax 0 000010E8 B3FF mov bl, -1 4324 @@: 0 000010EA AC lodsb ; al = candidate type letter, or hexit 0 000010EB 43 inc bx ; count number of hexits 0 000010EC E83A07 nearcall getnyb 0 000010EF 73F9 jnc @B ; if was a hexit, loop --> 4329 .expr: ; al = type letter 0 000010F1 E8[0000]EB02[0000] nearcall capitalise 0 000010F8 88C7 mov bh, al ; bh = letter 0 000010FA 3C4C cmp al, 'L' ; valid one ? 0 000010FC 740C je @F 0 000010FE 3C4F cmp al, 'O' 0 00001100 7408 je @F 0 00001102 3C53 cmp al, 'S' 0 00001104 7404 je @F 0 00001106 3C50 cmp al, 'P' 0 00001108 7504 jne .ret_CY_pop_j1_NZ ; no --> 4340 @@: ; is valid letter 0 0000110A AC lodsb ; = candidate separator 0 0000110B E8FCF3 nearcall isseparator? ; is it ? 4343 .ret_CY_pop_j1_NZ: 0 0000110E 7577 jne .ret_CY_pop ; no --> 0 00001110 58 pop ax 4346 0 00001111 F646FE01 test byte [bp + ?bit0_is_return_name], 1 0 00001115 740E jz .interrupt_no_return_name 4349 0 00001117 89DF mov di, bx 0 00001119 81E7FF00 and di, 255 ; get number of additional hexits 0 0000111D 037EFC add di, word [bp + ?return_name_pointer] 0 00001120 83C703 add di, 3 ; amount hexits + 3 + pointer 0 00001123 883D mov byte [di], bh ; store the additional letter 4355 4356 .interrupt_no_return_name: 0 00001125 FEC5 inc ch ; increment name length 0 00001127 93 xchg ax, bx 4359 4360 ; INP: bx = interrupt number 0..255 4361 ; ah = 'S' for segment, 'O' for offset, 'L' for linear 4362 %if _PM 0 00001128 83EC08 sub sp, 8 0 0000112B E8[0000]EB02[2818] dualcall save_scratchsel 4365 %endif 0 00001132 31F6 xor si, si 4367 %if _PM 0 00001134 53 push bx 0 00001135 E8[0000]EB02[0000] nearcall setds2si ; ds => IVT 0 0000113C 5B pop bx 4371 %else 4372 mov ds, si ; ds => IVT 4373 %endif 0 0000113D 80FC53 cmp ah, 'S' 0 00001140 7502 jne @F 0 00001142 46 inc si 0 00001143 46 inc si ; si = 2 (displacement to get segment) 4378 @@: 0 00001144 01DB add bx, bx 0 00001146 01DB add bx, bx ; ds:bx -> IVT entry 0 00001148 FF7002 push word [bx + si + 2] 0 0000114B FF30 push word [bx + si] ; get segment:offset or trash:segment 0 0000114D 16 push ss 0 0000114E 1F pop ds 0 0000114F BB[4C08] mov bx, interrupt_var 0 00001152 8F07 pop word [bx] 0 00001154 8F4702 pop word [bx + 2] 4388 ; store in variable 4389 %if _PM 0 00001157 E8[0000]EB02[5018] dualcall restore_scratchsel 4391 %endif 0 0000115E 80FC50 cmp ah, 'P' ; for pointer type ? 0 00001161 741F je .var_size_4 ; yes --> 0 00001163 80FC4C cmp ah, 'L' 0 00001166 751C jne @FF 0 00001168 51 push cx 0 00001169 31C0 xor ax, ax 0 0000116B 874702 xchg ax, word [bx + 2] ; clear high word, get segment 0 0000116E 31D2 xor dx, dx ; dx:ax = segment 0 00001170 B90400 mov cx, 4 4401 @@: 0 00001173 D1E0 shl ax, 1 0 00001175 D1D2 rcl dx, 1 0 00001177 E2FA loop @B ; shift up 4 bits 0 00001179 0107 add word [bx], ax 0 0000117B 115702 adc word [bx + 2], dx ; add to dword 0 0000117E 59 pop cx 0 0000117F B103 mov cl, 3 ; 3byte variable (21 bits needed) 0 00001181 A9 db __TEST_IMM16 ; (skip mov) 4410 .var_size_4: 0 00001182 B104 mov cl, 4 ; dword variable 4412 @@: 0 00001184 31FF xor di, di ; (NC) 0 00001186 C3 retn 4415 4416 .ret_CY_pop: 0 00001187 58 pop ax 4418 .ret_CY: 0 00001188 F9 stc 0 00001189 C3 retn 4421 4422 4423 4424 %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 4425 var_ysf_setup: section_of_function 0 0000118A 93 xchg ax, bx ; bx = index 0 0000118B 8A46ED mov al, byte [bp + ?namebuffer + 1] 0 0000118E 3C53 cmp al, 'S' 0 00001190 750B jne @F 4430 %if _INPUT_FILE_BOOT 0 00001192 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00001197 B042 mov al, 'B' 0 00001199 7502 jnz @F 4434 %endif 0 0000119B B048 mov al, 'H' 4436 @@: 0 0000119D 3C42 cmp al, 'B' 0 0000119F 7509 jne @F 4439 %if _INPUT_FILE_BOOT 0 000011A1 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 000011A6 750D jnz @FF 4442 %endif 4443 .notysf: 0 000011A8 F9 stc 0 000011A9 C3 retn 4446 @@: 4447 %if _INPUT_FILE_HANDLES 0 000011AA 3C48 cmp al, 'H' 0 000011AC 75FA jne short .notysf 0 000011AE F606[0200]10 testopt [internalflags2], dif2_input_file 0 000011B3 74F3 jz .notysf 4452 %else 4453 jmp .notysf 4454 %endif 4455 @@: 4456 ; bx = index 4457 %if _INPUT_FILE_HANDLES 0 000011B5 BF[0000] mov di, input_file_handles.active 4459 ; -> active index for YHF 4460 %endif 4461 %if _INPUT_FILE_BOOT 4462 %if _INPUT_FILE_HANDLES 0 000011B8 3C42 cmp al, 'B' 0 000011BA 7503 jne @F 4465 %endif 0 000011BC BF[0000] mov di, load_input_file.active 4467 ; -> active index for YBF 4468 @@: 4469 %endif 0 000011BF F7DB neg bx ; -1 .. 0 0 000011C1 7406 jz @F ; if 0, always valid --> 4472 ; index was nonzero, meaning bx now holds a 4473 ; negative number. if [.active] is large enough, 4474 ; adding it to bx yields a positive number, which 4475 ; carries in the addition. check for that. 0 000011C3 031D add bx, word [di] 0 000011C5 73E1 jnc .notysf ; not valid index --> 0 000011C7 EB02 jmp @FF ; valid, use it 4479 @@: 0 000011C9 031D add bx, word [di] 4481 ; 0 means the topmost level 4482 @@: 4483 %if _INPUT_FILE_BOOT 4484 %if _INPUT_FILE_HANDLES 0 000011CB 3C42 cmp al, 'B' 0 000011CD 750D jne @F 4487 %endif 4488 0 000011CF B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 000011D2 93 xchg ax, bx 0 000011D3 F7E3 mul bx ; dx ignored, should be zero 0 000011D5 93 xchg ax, bx ; bx = offset into array 0 000011D6 81C3[2600] add bx, load_input_file - LOADDATA3 + ldFATType 4494 ; -> flag word 0 000011DA EB0A jmp @FF 4496 4497 @@: 4498 %endif 4499 %if _INPUT_FILE_HANDLES 0 000011DC D1E3 shl bx, 1 0 000011DE D1E3 shl bx, 1 0 000011E0 D1E3 shl bx, 1 ; to qword array index 4503 %if INPUTFILEHANDLE_size != 8 4504 %error Unexpected structure size 4505 %endif 0 000011E2 81C3[0200] add bx, input_file_handles + ifhFlags 4507 ; -> flags word 4508 %endif 4509 @@: 0 000011E6 BF[9C0C] mov di, mask_ysf ; give the mask of read-only bits 0 000011E9 F8 clc 0 000011EA C3 retn 4513 %endif 4514 4515 4516 lleave ctx 4517 4518 4519 ; INP: al, si-> string 4520 ; OUT: CY if no valid digit 0..7 4521 ; NC if valid digit, 4522 ; bl = 0..7 4523 ; al, si-> behind digit specification 4524 ; CHG: bl 4525 getstmmxdigit: section_of_function 0 000011EB 3C28 cmp al, '(' 0 000011ED 7407 je .paropen 0 000011EF E81A00 call .isdigit? 0 000011F2 7201 jc .ret 4530 .retlodsb: 0 000011F4 AC lodsb 4532 .ret: 0 000011F5 C3 retn 4534 4535 .paropen: 0 000011F6 50 push ax 0 000011F7 56 push si 0 000011F8 AC lodsb 0 000011F9 E81000 call .isdigit? 0 000011FC 720B jc .retpop 0 000011FE AC lodsb 0 000011FF 3C29 cmp al, ')' ; closing parenthesis ? 0 00001201 F9 stc 0 00001202 7505 jne .retpop ; no --> (CY) 0 00001204 83C404 add sp, byte 4 ; discard saved registers (NC) 0 00001207 EBEB jmp short .retlodsb 4547 4548 .retpop: 0 00001209 5E pop si 0 0000120A 58 pop ax 0 0000120B C3 retn 4552 4553 .isdigit?: 0 0000120C 88C3 mov bl, al 0 0000120E 80EB30 sub bl, '0' 0 00001211 80FB08 cmp bl, 8 ; valid digit 0..7 ? (CY if so) 0 00001214 F5 cmc ; NC if so 0 00001215 C3 retn 4559 4560 4561 %if _EXPRDUALCODE && _DUALCODE 4562 usesection lDEBUG_CODE2 4562 ------------------ note: usesection lDEBUG_CODE2 4563 %else 4564 usesection lDEBUG_CODE 4565 %endif 4566 isvariable_code_size equ $ - isvariable_code 4567 4568 4569 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 4569 ------------------ note: usesection lDEBUG_DATA_ENTRY 4570 isvariable_data_size equ $ - isvariable_data 4571 4572 numdef SHOW_ISVARIABLE_SIZE, _DEFAULTSHOWSIZE 4573 %if _SHOW_ISVARIABLE_SIZE 4574 %assign CODESIZE isvariable_code_size 4575 %assign DATASIZE isvariable_data_size 4576 %warning isvariable size: CODESIZE code, DATASIZE data 4577 %endif 4578 4579 4580 align 2, db 0 0 00002680 110020090D2F5C2C4C separators: countedw 32,9,13,"/\,L;]:)(=.'",'"',0 0 00002689 3B5D3A29283D2E2722 0 00002692 00 4582 4583 %ifn _EXPRESSIONS 4584 %error Building without the expression evaluator is not possible right now 4585 %endif 4586 4587 %if _EXPRESSIONS 4588 0 00002693 00 align 4, db 0 0 00002694 00000000 hhvar: dd 0 ; left-hand operand for operator functions 4591 %if _HHDIVREMAIN 4592 hh_div_dividend: 0 00002698 00000000 dd 0 4594 hh_div_divisor: 0 0000269C 00000000 dd 0 4596 %endif 4597 align 2, db 0 4598 hh_depth: 0 000026A0 0000 dw 0 4600 hh_depth_of_single_term: 0 000026A2 0000 dw 0 0 000026A4 00 hhflag: db 0 ; &2: getdword called from hh, default to sub (precedence over 1) 4603 ; &1: getdword called from hh, default to add 4604 ; &4: getdword defaulted to add/sub for hh 4605 ; (Note that during recursive getexpression calls (ie, 4606 ; bracket handling), hh_depth is incremented to 2 and 4607 ; higher. As these flags are only used with hh_depth == 1, 4608 ; this means inside brackets the hh defaulting is 4609 ; not in effect.) 0 000026A5 00 hhtype: db 0 ; type info on left-hand operand for operator functions 4611 %if _HHDIVREMAIN 4612 hh_div_active: 0 000026A6 00 db 0 4614 %endif 4615 %endif 4616 4617 4618 %if _EXPRDUALCODE && _DUALCODE 4619 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 4619 ------------------ note: usesection lDEBUG_CODE2 4620 %else 4621 usesection lDEBUG_CODE 4622 %endif 4623 4624 ; Get a numerical value from input line 4625 ; INP: al = first character 4626 ; si-> next character 4627 ; OUT: bx:dx = numerical value 4628 ; ah&80h = whether a pointer 4629 ; ah&40h = whether a signed type 4630 ; ah&3Fh = number of significant bits 4631 ; one-based position of highest one bit if unsigned or signed but positive 4632 ; one-based position of lowest one bit from the top if negative signed 4633 ; 4634 ; Note: This invalidates the symbol table access slice. 4635 getdword: section_of_function 4636 getexpression: section_of_function 0 00001216 FF06[C40C] inc word [hh_depth] 0 0000121A E8[0000]EB02[0000] nearcall skipcomm0 0 00001221 51 push cx 0 00001222 57 push di 4641 lframe 0 00001223 5589E5 lenter 4643 0 00001226 31C9 xor cx, cx 0 00001228 51 push cx 4646 lvar word, ??Count 4647 %define lCount ???Count 4648 4649 ; The first number field's operator is initialized to 4650 ; the dummy right-operand operator, which is set up with 4651 ; the highest precedence. This means it'll be processed 4652 ; immediately in the first iteration below. 0 00001229 B119 mov cl, OPERATOR_RIGHTOP 0 0000122B 51 push cx ; initialize dummy first number operator 0 0000122C 83EC0A sub sp, byte 6+4 4656 lvar 6, ??A 4657 %define lA ???A 4658 lvar 6, ??B 4659 %define lB ???B 4660 4661 .loop: 4662 ; Get next term of an expression. A term is one variable, 4663 ; one immediate number, one expression contained within 4664 ; round brackets or one expression used to access memory. 4665 ; This code also parses any number of unary operators 4666 ; (including type conversions) in front of the term. 4667 ; 4668 ; INP: (si-1)-> first character 4669 ; OUT: (see label .term_done) 4670 ; bx:dx = numerical value of term 4671 ; ah&80h = whether a pointer 4672 ; ah&40h = whether a signed type 4673 ; al = first character behind term 4674 ; si-> line 4675 ; CHG: di, cx 4676 ; 4677 ; This part might be simplified by directly modifying 6byte[bp+lB] 4678 ; instead of setting bx:dx and ah. (The current interface is one of 4679 ; the holdovers of getexpressionterm as a separate function.) In 4680 ; that case, bx:dx and ah presumably will then be simply added to 4681 ; the CHG specification. 4682 .term: 0 0000122F 4E dec si 0 00001230 56 push si ; -> term 4685 4686 ; count unary operators and type specifiers, 4687 ; get the bit mask of required bytes 4688 ; and skip past the operators and specifiers 0 00001231 E88C05 nearcall count_unary_operators 4690 4691 %if _INDIRECTION 0 00001234 3C5B cmp al, '[' 0 00001236 7503E9C802 je .indirection ; handle indirected value --> 4694 %endif 0 0000123B 3C28 cmp al, '(' 0 0000123D 7503E92803 je .parens ; handle term with precedence --> 4697 0 00001242 52 push dx ; remember the count+1 4699 ; (only if no indirection or bracket) 4700 0 00001243 4E dec si 0 00001244 BA[0000] mov dx, msg.value ; does a VALUE keyword for VALUE x IN y go here ? 0 00001247 E8[0000]EB02[0000] nearcall isstring? 0 0000124E 7503E9D301 je .value_in ; yes --> 4705 0 00001253 BA[0000] mov dx, msg.linear ; does a LINEAR keyword go here ? 0 00001256 E8[0000]EB02[0000] nearcall isstring? 0 0000125D 7503E98901 je .linear ; yes --> 4709 4710 %if _PM 0 00001262 BA[0000] mov dx, msg.desctype 0 00001265 E8[0000]EB02[0000] nearcall isstring? 0 0000126C 7503E93501 je .desctype ; yes --> 4714 %endif 4715 0 00001271 AC lodsb 4717 0 00001272 E8A7FA nearcall isvariable? ; is it a variable ? 0 00001275 7226 jc .check_literal_or_symbol 4720 ; no, may be an immediate value or symbol --> 4721 4722 .variable: 0 00001277 87DA xchg bx, dx ; bx-> high word 0 00001279 88CC mov ah, cl 0 0000127B 31C9 xor cx, cx 0 0000127D 80FC02 cmp ah, 2 0 00001280 7609 jbe .variable_nohigh 0 00001282 8B0F mov cx, word [bx] ; get high word 0 00001284 80FC03 cmp ah, 3 0 00001287 7702 ja @F 0 00001289 B500 mov ch, 0 4732 @@: 4733 .variable_nohigh: 0 0000128B 87DA xchg bx, dx ; bx-> low word 0 0000128D 8B17 mov dx, word [bx] ; get low word 0 0000128F 89CB mov bx, cx ; high word/zero 0 00001291 80FC01 cmp ah, 1 0 00001294 7702 ja .variable_notbyte 0 00001296 B600 mov dh, 0 ; limit to byte 4740 .variable_notbyte: 4741 .symbol: 0 00001298 B400 mov ah, 0 ; type pointer=0 signed=0 0 0000129A E9DD02 jmp .term_end 4744 4745 4746 .check_literal_or_symbol: 4747 %if _SYMBOLIC 0 0000129D E8A8F8 nearcall issymbol? ; is it a symbol ? 0 000012A0 73F6 jnc .symbol ; yes --> 4750 ; no, must be an immediate value 4751 %endif 4752 4753 .literal: 0 000012A2 31DB xor bx, bx ; (in case of decimal base shortcut: 0 000012A4 BA0A00 mov dx, 10 ; set base: decimal) 0 000012A7 3C23 cmp al, '#' ; shortcut change to decimal base, or string literal? 0 000012A9 7547 jne .lithex_common 0 000012AB 803C22 cmp byte [si], '"' 0 000012AE 7408 je .lit_string 0 000012B0 803C27 cmp byte [si], "'" 0 000012B3 7403 je .lit_string 0 000012B5 E98000 jmp .lit_base ; decimal base --> 4763 4764 .lit_string: 0 000012B8 31D2 xor dx, dx 0 000012BA AC lodsb 0 000012BB 86C4 xchg al, ah 4768 0 000012BD E81900 call @F 0 000012C0 88C2 mov dl, al 0 000012C2 E81400 call @F 0 000012C5 88C6 mov dh, al 0 000012C7 E80F00 call @F 0 000012CA 88C3 mov bl, al 0 000012CC E80A00 call @F 0 000012CF 88C7 mov bh, al 0 000012D1 AC lodsb 0 000012D2 38E0 cmp al, ah 0 000012D4 7419 je @FFF 4780 .err3: 0 000012D6 E9CA00 jmp .err2 4782 4783 @@: 0 000012D9 AC lodsb 0 000012DA 38E0 cmp al, ah 0 000012DC 740A je @F 0 000012DE E8[0000]EB02[0000] nearcall iseol?.notsemicolon 0 000012E5 74EF je .err3 4789 .lit_string_retn: 0 000012E7 C3 retn 4791 4792 @@: 0 000012E8 AC lodsb 0 000012E9 38E0 cmp al, ah 0 000012EB 74FA je .lit_string_retn 0 000012ED 59 pop cx ; (discard near return address) 0 000012EE 4E dec si 4798 @@: 0 000012EF AC lodsb 0 000012F0 EB3C jmp .lit_end_string 4801 4802 4803 .lithex_common: 0 000012F2 E86B04 call .lit_ishexdigit? ; the first character must be a digit then 0 000012F5 7303E9A900 jc .err2 0 000012FA 30D2 xor dl, dl ; initialize value 4807 .lithex_loopdigit: 0 000012FC 3C5F cmp al, '_' 0 000012FE 7427 je .lithex_skip 0 00001300 E85D04 call .lit_ishexdigit? ; was last character ? 0 00001303 7225 jc .lit_end ; yes --> 0 00001305 F6C7F0 test bh, 0F0h ; would shift bits out ? 0 00001308 7403E99600 jnz .err2 0 0000130D E8[0000]EB02[0000] nearcall capitalise 0 00001314 2C30 sub al, '0' 0 00001316 3C09 cmp al, 9 ; was decimal digit ? 0 00001318 7602 jbe .lithex_decimaldigit; yes --> 0 0000131A 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 4819 .lithex_decimaldigit: 0 0000131C B90400 mov cx, 4 4821 .lithex_loopshift: 0 0000131F D1E2 shl dx, 1 0 00001321 D1D3 rcl bx, 1 0 00001323 E2FA loop .lithex_loopshift ; *16 0 00001325 08C2 or dl, al ; add in the new digit 4826 .lithex_skip: 0 00001327 AC lodsb 0 00001328 EBD2 jmp short .lithex_loopdigit 4829 4830 .lit_end: 0 0000132A 3C23 cmp al, '#' ; base change specification? 0 0000132C 740A je .lit_base ; yes --> 4833 .lit_end_string: 0 0000132E E8D9F1 nearcall isseparator? ; after the number, there must be a separator 0 00001331 7570 jne .err2 ; none here --> 0 00001333 B400 mov ah, 0 ; type pointer=0 signed=0 0 00001335 E94202 jmp .term_end ; okay --> 4838 .lit_base: 0 00001338 85DB test bx, bx ; insure base <= 36 0 0000133A 7567 jnz .err2 0 0000133C 83FA24 cmp dx, byte 36 0 0000133F 7762 ja .err2 0 00001341 83FA02 cmp dx, byte 2 ; and >= 2 0 00001344 725D jb .err2 ; otherwise error --> 4845 0 00001346 AC lodsb 0 00001347 80FA10 cmp dl, 16 ; hexadecimal ? 0 0000134A 74A6 je .lithex_common ; yes, use specific handling --> 4849 0 0000134C 89D7 mov di, dx ; di = base 0 0000134E 88D1 mov cl, dl 0 00001350 80C12F add cl, '0'-1 0 00001353 80F939 cmp cl, '9' 0 00001356 7602 jbe .lit_basebelow11 0 00001358 B139 mov cl, '9' 4856 .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 0 0000135A 88D5 mov ch, dl 0 0000135C 80C536 add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 4859 0 0000135F E80104 call .lit_isdigit? ; first character must be a digit 0 00001362 723F jc .err2 0 00001364 31D2 xor dx, dx ; initialize value 4863 .lit_loopdigit: 0 00001366 3C5F cmp al, '_' 0 00001368 7436 je .lit_skip 0 0000136A E8F603 call .lit_isdigit? ; was last character ? 0 0000136D 72BB jc .lit_end ; yes --> 0 0000136F E8[0000]EB02[0000] nearcall capitalise 0 00001376 2C30 sub al, '0' 0 00001378 3C09 cmp al, 9 ; was decimal digit ? 0 0000137A 7602 jbe .lit_decimaldigit ; yes --> 0 0000137C 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 4873 .lit_decimaldigit: 0 0000137E 50 push ax 0 0000137F 89D0 mov ax, dx 0 00001381 53 push bx 0 00001382 F7E7 mul di ; multiply low word with base 0 00001384 89D3 mov bx, dx 0 00001386 89C2 mov dx, ax 0 00001388 58 pop ax 0 00001389 52 push dx 0 0000138A F7E7 mul di ; multiply high word with base 0 0000138C 85D2 test dx, dx 0 0000138E 5A pop dx 0 0000138F 7512 jnz .err2 ; overflow --> 0 00001391 01C3 add bx, ax ; add them 0 00001393 58 pop ax 0 00001394 720D jc .err2 ; overflow --> 0 00001396 00C2 add dl, al ; add in the new digit 0 00001398 80D600 adc dh, 0 0 0000139B 83D300 adc bx, byte 0 0 0000139E 7203 jc .err2 ; overflow --> 4893 ; The value 3#102002022201221111210 is exactly equal to ffffFFFFh 4894 ; so 3#102002022201221111211 (or ...2) overflows 32 bits and 4895 ; needs to be detected here when adding in the as yet least 4896 ; significant digit. This is why this jump is needed. 4897 ; This also applies to decimal #4294967296. 4898 4899 .lit_skip: 0 000013A0 AC lodsb 0 000013A1 EBC3 jmp short .lit_loopdigit 4902 4903 .err2: 0 000013A3 E935ED jmp error_expr 4905 4906 4907 %if _PM 4908 .desctype: 0 000013A6 58 pop ax ; discard unary operators counter 4910 4911 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_DESCTYPE_STACK_CHECK 0 000013A7 E80F05 call stack_check_indirection 4913 %else 4914 mov ax, _EXPRESSION_DESCTYPE_STACK_CHECK 4915 call stack_check ; abort if deep recursion 4916 %endif 0 000013AA A9[0000] test ax, msg.stack_overflow.desctype 4918 0 000013AD AC lodsb 0 000013AE E8[0000]EB02[0000] nearcall ispm 0 000013B5 75EC jnz short .err2 0 000013B7 E8[0000]EB02[0000] nearcall skipwh0 0 000013BE E84304 nearcall getword 0 000013C1 6652 _386 push edx 0 000013C3 5A _386 pop dx 0 000013C4 660F02D2 _386 lar edx, edx 0 000013C8 7403 _386 jz @F 0 000013CA 6631D2 _386 xor edx, edx 4929 @@: 0 000013CD 66C1EA08 _386 shr edx, 8 0 000013D1 52 _386 push dx 0 000013D2 665A _386 pop edx 4933 subcpu 286 0 000013D4 0F02D2 _no386 lar dx, dx 0 000013D7 7402 _no386 jz @F 0 000013D9 31D2 _no386 xor dx, dx 4937 @@: 0 000013DB 86D6 _no386 xchg dl, dh 4939 subcpureset 0 000013DD 31DB xor bx, bx 0 000013DF E8[0000]EB02[0000] nearcall skipcomm0 0 000013E6 B400 mov ah, 0 ; type pointer=0 signed=0 0 000013E8 E98E01 jmp .term_end_recount 4944 %endif 4945 4946 4947 .linear: 0 000013EB 58 pop ax ; discard unary operators counter 4949 4950 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_LINEAR_STACK_CHECK 0 000013EC E8CA04 call stack_check_indirection 4952 %else 4953 mov ax, _EXPRESSION_LINEAR_STACK_CHECK 4954 call stack_check ; abort if deep recursion 4955 %endif 0 000013EF A9[0000] test ax, msg.stack_overflow.linear 4957 0 000013F2 E8[0000]EB02[0000] nearcall skipwhite 0 000013F9 FF36[0000] _386_PM push word [bAddr32] 0 000013FD 6652 _386_PM push edx 0 000013FF 5A _386_PM pop dx 0 00001400 8B1E[0000] mov bx, word [reg_ds] 0 00001404 E8[0000]EB02[0000] nearcall getlinearaddr 0 0000140B 52 _386_PM push dx 0 0000140C 665A _386_PM pop edx 0 0000140E 8F06[0000] _386_PM pop word [bAddr32] 0 00001412 728F jc .err2 4968 4969 %if !_LOADER 0 00001414 66 _386_PM_o32 ; or dword 0 00001415 830E[0000]FF or word [bp_offset], strict byte -1 4972 ; do not use a preferred offset 4973 %endif 4974 0 0000141A E8[0000]EB02[0000] nearcall skipcomm0 0 00001421 B400 mov ah, 0 ; type pointer=0 signed=0 0 00001423 E95301 jmp .term_end_recount 4978 4979 4980 .value_in: 0 00001426 58 pop ax ; discard unary operators counter 4982 4983 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 0 00001427 E88F04 call stack_check_indirection 4985 %else 4986 mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 4987 call stack_check ; abort if deep recursion 4988 %endif 0 0000142A A9[0000] test ax, msg.stack_overflow.value_in 4990 0 0000142D E8[0000]EB02[0000] nearcall skipcomma 0 00001434 4E dec si 0 00001435 BA[0000] mov dx, msg.executing 0 00001438 E8[0000]EB02[0000] nearcall isstring? 0 0000143F 751C jne @F 0 00001441 E8[0000]EB02[0000] nearcall skipcomma 0 00001448 56 push si 0 00001449 BE[0000] mov si, msg.executing_value_range 0 0000144C E8F903 nearcall get_value_range 0 0000144F 9C pushf ; ! preserve CF 0 00001450 E8[0000]EB02[0000] nearcall chkeol 0 00001457 9D popf 0 00001458 5E pop si 0 00001459 4E dec si ; preserves CF 0 0000145A AC lodsb 0 0000145B EB03 jmp @FF 5007 5008 @@: 0 0000145D E8E803 nearcall get_value_range; OUT: cx:di = from, bx:dx = to 5010 @@: 0 00001460 E8[0000]EB02[0000] nearcall skipcomm0 5012 5013 ; If the VALUE is a not normal range (zero length 5014 ; or from > to) then we still have to parse the 5015 ; remaining input line to find the end of the 5016 ; VALUE x IN y construct. So we do this with a 5017 ; sort of hack: we take the invalid / unset 5018 ; range values, do all the (invalid) comparisons, 5019 ; but do not count any of the possible matches. 5020 ; Look at .value_in.found for this hack. 5021 lframe none, nested 0 00001467 5589E5 lenter 5023 lvar word, bit0_do_not_match 0 0000146A 9C pushf 5025 lvar dword, value_from 0 0000146B 51 push cx 0 0000146C 57 push di 5028 lvar dword, value_to 0 0000146D 53 push bx 0 0000146E 52 push dx 0 0000146F 31C9 xor cx, cx 5032 lvar dword, found 0 00001471 51 push cx 0 00001472 51 push cx 5035 0 00001473 51 push cx ; zero terminator of keyword remembered offsets 0 00001474 4E dec si 0 00001475 BA[0000] mov dx, msg.in 0 00001478 E8[0000]EB02[0000] nearcall isstring? 5040 .err3_NZ: 5041 .err4_NZ: 0 0000147F 7403E91FFF jne .err2 5043 0 00001484 E8[0000]EB02[0000] nearcall skipcomma 0 0000148B 4E dec si 5046 5047 .value_in.loop: 0 0000148C E8[0000]EB02[0000] nearcall skipwhite 0 00001493 4E dec si 0 00001494 BB[0000] mov bx, msgtable_value_range 5051 ; -> table 5052 5053 @@: 0 00001497 8B17 mov dx, word [bx] 0 00001499 85D2 test dx, dx 0 0000149B 7421 jz @F ; last checked, go get range --> 0 0000149D E8[0000]EB02[0000] nearcall isstring? 0 000014A4 7405 je .value_in.keyword ; found a keyword --> 0 000014A6 83C304 add bx, 4 ; go to next table entry 0 000014A9 EBEC jmp @B 5061 5062 .value_in.keyword: 5063 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 0 000014AB E80B04 call stack_check_indirection 5065 %else 5066 mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 5067 call stack_check ; abort if deep recursion 5068 %endif 0 000014AE A9[0000] test ax, msg.stack_overflow.value_in 5070 0 000014B1 E8[0000]EB02[0000] nearcall skipwhite ; skip past blanks 0 000014B8 56 push si ; remember offset after keyword 0 000014B9 8B7702 mov si, word [bx + 2] ; -> keyword replacement text 0 000014BC EBCE jmp .value_in.loop ; handle replacement --> 5075 5076 @@: 0 000014BE E88703 nearcall get_value_range; OUT: cx:di = from, bx:dx = to 0 000014C1 7223 jc .value_in.next 5079 5080 ; ! (StartVal > EndMatch) 0 000014C3 395EFC cmp word [bp + ?value_from + 2], bx 0 000014C6 7503 jne @F 0 000014C8 3956FA cmp word [bp + ?value_from], dx 5084 @@: 0 000014CB 7719 ja .value_in.next 5086 5087 ; ! (EndVal < StartMatch) 0 000014CD 394EF8 cmp word [bp + ?value_to + 2], cx 0 000014D0 7503 jne @F 0 000014D2 397EF6 cmp word [bp + ?value_to], di 5091 @@: 0 000014D5 720F jb .value_in.next 5093 5094 .value_in.found: 0 000014D7 8B4EFE mov cx, word [bp + ?bit0_do_not_match] 0 000014DA F7D1 not cx 0 000014DC 83E101 and cx, 1 0 000014DF 014EF2 add word [bp + ?found], cx 0 000014E2 8356F200 adc word [bp + ?found], 0 5100 5101 .value_in.next: 5102 @@: 0 000014E6 E8[0000]EB02[0000] nearcall skipwh0 0 000014ED 3C2C cmp al, ',' 0 000014EF 749B je .value_in.loop 5106 0 000014F1 59 pop cx ; get next remembered offset 0 000014F2 E306 jcxz @F ; if none --> 0 000014F4 89CE mov si, cx ; -> behind keyword 0 000014F6 4E dec si 0 000014F7 AC lodsb ; reload al 0 000014F8 EBEC jmp @B ; continue after the keyword --> 5113 5114 @@: 0 000014FA 5A pop dx 0 000014FB 5B pop bx ; pop ?found counter variable 0 000014FC 89EC5D lleave 5118 0 000014FF B400 mov ah, 0 ; type pointer=0 signed=0 0 00001501 EB76 jmp .term_end_recount 5121 5122 5123 %if _INDIRECTION 5124 .indirection: 0 00001503 E8B303 call stack_check_indirection 5126 ; abort if deep recursion 0 00001506 A9[0000] test ax, msg.stack_overflow.indirection 5128 0 00001509 FF36[0000] _386_PM push word [bAddr32] 0 0000150D 6652 _386_PM push edx 0 0000150F 5A _386_PM pop dx 5132 0 00001510 E8[0000]EB02[0000] nearcall skipcomma ; also skips the '[' in al 0 00001517 8B1E[0000] mov bx, word [reg_ds] ; default segment/selector 0 0000151B 51 push cx ; save previous bit mask (ch) 0 0000151C E847ED nearcall getaddrX ; (recursively calls getexpression:) 0 0000151F 59 pop cx 0 00001520 B100 mov cl, 0 0 00001522 3C5D cmp al, ']' ; verify this is the closing bracket 5140 .err5_NZ: 0 00001524 7403E956FF jne .err4_NZ ; if not --> 0 00001529 AC lodsb ; get next character 5143 ; bx:(e)dx-> data 5144 ; ch = bit mask of required bytes 5145 ; cl = 0 5146 5147 ..@hh_indirection_memory_access_start: 0 0000152A 50 push ax 0 0000152B 55 push bp 0 0000152C 31ED xor bp, bp 0 0000152E 55 push bp 0 0000152F 55 push bp 0 00001530 89E5 mov bp, sp ; -> buffer 5154 0 00001532 E8[0000]EB02[0000] nearcall prephack 0 00001539 E8[0000]EB02[0000] nearcall dohack 5157 ; Regarding how this loop handles cx, 5158 ; remember that ch holds the flags for 5159 ; the required bytes. 5160 ; And cl is initialised to 0. In 5161 ; each iteration, cl is incremented. 5162 ; The loop instruction then decrements 5163 ; cl again, but the entire cx is only 5164 ; zero if no more bytes are required. 5165 ; (This hack saves a single byte over 5166 ; the "test ch, ch \ jnz" alternative 5167 ; but it isn't very pretty. It 5168 ; also probably slows down a bit.) 5169 .indirection_loop: 0 00001540 D0ED shr ch, 1 ; need to read this byte ? 0 00001542 730A jnc .indirection_skip ; no --> 5172 %if _DUALCODE && _EXPRDUALCODE 5173 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 5173 ------------------ note: usesection lDEBUG_CODE 5174 ..@hh_code1_indirection_memory_access_start: 5175 5176 dualfunction 5177 ..@hh_readmem: section_of_function 5178 lframe dualdistance, nested 5179 lframe_needonlyregistered 5180 lenter 0 00004C77 E8[0000] call readmem 5182 lleave 0 00004C7A E8[0000] dualreturn 0 00004C7D CB lret 5185 5186 ..@hh_code1_indirection_memory_access_end: 5187 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 5187 ------------------ note: usesection lDEBUG_CODE2 0 00001544 E8[0000]EB02[0600] dualcall ..@hh_readmem ; else read byte 5189 %else 5190 nearcall readmem ; else read byte 5191 %endif 0 0000154B 884600 mov byte [bp+0], al ; store byte 5193 .indirection_skip: 0 0000154E 41 inc cx ; = 1 if no more to read 0 0000154F 45 inc bp ; increase buffer pointer 0 00001550 66 _386_PM_o32 ; inc edx 0 00001551 42 inc dx ; increase offset 0 00001552 E2EC loop .indirection_loop ; read next byte if any --> 0 00001554 E8[0000]EB02[0000] nearcall unhack 5200 0 0000155B 5A pop dx 0 0000155C 5B pop bx 0 0000155D 5D pop bp 0 0000155E 58 pop ax 5205 ..@hh_indirection_memory_access_end: 5206 0 0000155F 52 _386_PM push dx 0 00001560 665A _386_PM pop edx 0 00001562 8F06[0000] _386_PM pop word [bAddr32] 0 00001566 B400 mov ah, 0 ; type pointer=0 signed=0 0 00001568 EB0F jmp short .term_end_recount 5212 %endif 5213 5214 5215 .parens: 5216 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PARENS_STACK_CHECK 0 0000156A E84C03 call stack_check_indirection 5218 %else 5219 mov ax, _EXPRESSION_PARENS_STACK_CHECK 5220 call stack_check ; abort if deep recursion 5221 %endif 0 0000156D A9[0000] test ax, msg.stack_overflow.parens 5223 0 00001570 AC lodsb 0 00001571 E8A2FC nearcall getexpression ; (recursive) bx:dx = number, ah = type 0 00001574 3C29 cmp al, ')' ; closing parens ? 0 00001576 75AC jne .err5_NZ ; no --> 0 00001578 AC lodsb 5229 5230 .term_end_recount: 0 00001579 A9 db __TEST_IMM16 ; skip pop, stc; NC 5232 .term_end: 0 0000157A 59 pop cx ; get count+1 of unary operators and type specifiers 0 0000157B F9 stc 0 0000157C 5F pop di ; -> term 0 0000157D 87F7 xchg si, di 0 0000157F 57 push di ; save -> behind 5238 ; si-> unary operators and types 0 00001580 720B jc .unary_processnext ; if we preserved the count --> 5240 0 00001582 53 push bx 0 00001583 52 push dx 0 00001584 56 push si 0 00001585 E83802 nearcall count_unary_operators 0 00001588 89D1 mov cx, dx ; get count+1 again 0 0000158A 5E pop si 0 0000158B 5A pop dx 0 0000158C 5B pop bx 5249 5250 .unary_processnext: 0 0000158D E204 loop .unary_doprocess 0 0000158F 5E pop si ; -> behind term 0 00001590 4E dec si ; -> character to reload in skipwhite 0 00001591 EB38 jmp short .term_done 5255 5256 .unary_doprocess: 0 00001593 56 push si 0 00001594 51 push cx 0 00001595 53 push bx 0 00001596 52 push dx 5261 0 00001597 89CF mov di, cx ; count+1 of operators to skip 0 00001599 E82602 nearcall count_unary_operators_restrict ; skip them 0 0000159C 752A jnz .err ; if not enough --> (?!) 5265 0 0000159E E89CEF nearcall istype? ; get type info if it's a type 0 000015A1 7216 jc .unary_processnotype ; isn't a type --> 0 000015A3 86C4 xchg al, ah ; al = type input 0 000015A5 D1EB shr bx, 1 ; CF = signedness 0 000015A7 9F lahf ; with CF = signedness 0 000015A8 8B8F[3200] mov cx, word [ typehandlers + bx ] ; function 5272 .unary_processcall: 0 000015AC 5A pop dx 0 000015AD 5B pop bx 5275 %if _HHDIVREMAIN 0 000015AE C606[CA0C]00 mov byte [hh_div_active], 0 5277 %endif 0 000015B3 FFD1 call cx ; call type or unary operator handler 5279 ; bx:dx = output number, ah = type 0 000015B5 59 pop cx ; restore processing counter 0 000015B6 5E pop si ; restore ->term 0 000015B7 EBD4 jmp short .unary_processnext 5283 5284 .unary_processnotype: 0 000015B9 E833EF nearcall isunaryoperator?; get unary operator index 0 000015BC 750A jne .err ; if no unary operator --> (?!) 0 000015BE 89CB mov bx, cx 0 000015C0 D1E3 shl bx, 1 0 000015C2 8B8F[6000] mov cx, word [ unaryoperatorhandlers + bx ] 0 000015C6 EBE4 jmp short .unary_processcall 5291 5292 .err: 0 000015C8 E910EB jmp error_expr 5294 5295 .term_done: ; bx:dx = number, ah = type 5296 ; get the operator following this number 0 000015CB E8[0000]EB02[0000] nearcall skipwhite 0 000015D2 8956F2 mov word [bp+lB+0], dx 0 000015D5 895EF4 mov word [bp+lB+2], bx ; store numeric value 0 000015D8 8B1E[C60C] mov bx, word [hh_depth_of_single_term] 0 000015DC 3B1E[C40C] cmp bx, word [hh_depth] 0 000015E0 746C je .operator_invalid 0 000015E2 E810EF nearcall isoperator? ; cl = operator index (if any) 0 000015E5 7454 je .operator_apparently_valid 0 000015E7 E8[0000]EB02[0000] nearcall iseol? ; end of line follows ? 0 000015EE 745E 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 000015F0 807EFC18 cmp byte [bp + lA + 4], OPERATOR_COND 0 000015F4 7458 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 000015F6 8B4EFE mov cx, word [bp + lCount] ; = how many operators waiting 0 000015F9 E30C jcxz @FF ; if none waiting --> (do hh twofold) 0 000015FB 89E3 mov bx, sp ; -> first waiting operator on stack 5333 @@: 0 000015FD 803F18 cmp byte [bx], OPERATOR_COND ; is it a conditional operator ? 0 00001600 744C je .operator_invalid ; yes, treat as invalid operator --> 5336 ; (it must be a :: to be valid) 0 00001602 83C306 add bx, 6 ; -> next waiting operator on stack 0 00001605 E2F6 loop @B ; loop if any waiting operator left --> 5339 @@: 0 00001607 833E[C40C]01 cmp word [hh_depth], 1 ; are we in first level expression ? 0 0000160C 7540 jne .operator_invalid ; no, do not do special H operation --> 0 0000160E F606[C80C]03 test byte [hhflag], 1|2 ; special H operation requested ? 0 00001613 7439 jz .operator_invalid ; no --> 0 00001615 B302 mov bl, OPERATOR_MINUS ; assume it's sub 0 00001617 F606[C80C]02 test byte [hhflag], 2 ; sub requested by H ? 0 0000161C 7501 jnz .hh_twofold_found ; yes --> 0 0000161E 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 0000161F 800E[C80C]04 or byte [hhflag], 4 ; set flag for H twofold operation 0 00001624 4E dec si 0 00001625 E8[0000]EB02[0000] nearcall skipcomma 0 0000162C EB22 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 0000162E FFB7[6A00] push word [operatordispatchers + bx] 5368 ; on stack: -> operator dispatcher 0 00001632 8B97[BE00] mov dx, word [operator_default_strings + bx] 5370 ; dx = default operator string 0 00001636 8B9F[9400] mov bx, word [operator_default_indexes + bx] 5372 ; bx = default operator index 0 0000163A C3 retn 5374 5375 .operator_apparently_valid: 0 0000163B 89CB mov bx, cx 0 0000163D 01DB add bx, bx 0 0000163F E8ECFF call ..@call_operator_dispatchers 0 00001642 84DB test bl, bl ; valid ? 0 00001644 74AA jz .hh_twofold_check ; no, check for H twofold operation --> 0 00001646 E8[0000]EB02[0000] nearcall skipwhite 0 0000164D A9 db __TEST_IMM16 5383 .operator_invalid: 0 0000164E 31DB xor bx, bx ; bl = 0 (no operator) 5385 .operator_done: 0 00001650 88E7 mov bh, ah ; bh = type info 0 00001652 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 00001655 8A4EFC mov cl, byte [bp+lA+4] 0 00001658 E8F300 call .compare_operators ; (cmp bl, cl = cmp Boprtr, Aoprtr) 0 0000165B 7249 jb .high_precedence_A ; compute the first operand first --> 5524 ; (jump taken for invalid Boprtr too) 0 0000165D 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 0000165F 83FB01 cmp bx, OPPREC_COND 0 00001662 7542 jne .high_precedence_A 5550 5551 @@: 0 00001664 FF46FE inc word [bp+lCount] ; increase loop count 0 00001667 FF76F8 push word [bp+lA+0] 0 0000166A FF76FA push word [bp+lA+2] 0 0000166D 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 00001670 FF76F6 push word [bp+lB+4] 0 00001673 FF76F4 push word [bp+lB+2] 0 00001676 FF76F2 push word [bp+lB+0] 0 00001679 8F46F8 pop word [bp+lA+0] 0 0000167C 8F46FA pop word [bp+lA+2] 0 0000167F 8F46FC pop word [bp+lA+4] ; set A to B, including operator 5582 5583 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PRECEDENCE_STACK_CHECK 0 00001682 E83402 call stack_check_indirection 5585 %else 5586 mov ax, _EXPRESSION_PRECEDENCE_STACK_CHECK 5587 call stack_check ; abort if deep recursion 5588 %endif 0 00001685 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 00001688 E9A4FB 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 0000168B FF76FC push word [bp+lA+4] 0 0000168E FF76FA push word [bp+lA+2] 0 00001691 FF76F8 push word [bp+lA+0] 0 00001694 8F46F2 pop word [bp+lB+0] 0 00001697 8F46F4 pop word [bp+lB+2] 0 0000169A 8F46F6 pop word [bp+lB+4] ; set B to A, including operator 5608 0 0000169D 8F46FC pop word [bp+lA+4] 0 000016A0 8F46FA pop word [bp+lA+2] 0 000016A3 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 000016A6 8B4EFC mov cx, word [bp+lA+4] ; retrieve A's type info and operator 0 000016A9 FF76FA push word [bp+lA+2] 0 000016AC FF76F8 push word [bp+lA+0] 0 000016AF 8B46F6 mov ax, word [bp+lB+4] ; retrieve B's type info and operator 0 000016B2 882E[C90C] mov byte [hhtype], ch ; set type info 0 000016B6 8F06[B80C] pop word [hhvar] 0 000016BA B500 mov ch, 0 ; cx = A's 1-based operator index 0 000016BC 8F06[BA0C] pop word [hhvar+2] ; retrieve A's number 0 000016C0 8B56F2 mov dx, word [bp+lB+0] 0 000016C3 89CF mov di, cx 0 000016C5 8B5EF4 mov bx, word [bp+lB+2] ; retrieve B's number 0 000016C8 01FF add di, di ; = offset into dispatch table 0 000016CA 50 push ax ; preserve B's operator 5685 %if _HHDIVREMAIN 0 000016CB C606[CA0C]00 mov byte [hh_div_active], 0 5687 %endif 0 000016D0 FF95[EA00] call near [operatorfunctions+di]; compute: (A) operatorA (B) 0 000016D4 59 pop cx ; cl = B's operator 5690 0 000016D5 8956F8 mov word [bp+lA+0], dx 0 000016D8 88C8 mov al, cl ; B's operator 0 000016DA 895EFA mov word [bp+lA+2], bx 0 000016DD 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 000016E0 84C0 test al, al ; (previous B's) operator valid ? 0 000016E2 7412 jz .end ; no, end of sequence --> 5701 0 000016E4 837EFE00 cmp word [bp+lCount], byte 0 ; in recursion ? 0 000016E8 749E je .loop_j ; no, loop --> 5704 0 000016EA 5B pop bx 0 000016EB 53 push bx ; retrieve saved ('@') operator 5707 0 000016EC E85F00 call .compare_operators ; (cmp bl, cl = cmp @oprtr, Aoprtr) 0 000016EF 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 000016F1 83FB01 cmp bx, OPPREC_COND 0 000016F4 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 000016F6 FF4EFE dec word [bp+lCount] ; decrease loop count 0 000016F9 7990 jns .cont ; process next operand from stack --> 5745 0 000016FB 8B56F8 mov dx, word [bp+lA+0] 0 000016FE 8B5EFA mov bx, word [bp+lA+2] ; retrieve A 0 00001701 8B46FC mov ax, word [bp+lA+4] ; (discard (invalid) operator) 5749 0 00001704 89EC5D lleave code ; remove the stack frame 5751 0 00001707 5F pop di 0 00001708 59 pop cx ; restore registers 5754 0 00001709 FF0E[C40C] dec word [hh_depth] 0 0000170D 4E dec si 0 0000170E AC lodsb ; (restore al) 5758 5759 .countsignificantbits: section_of_function getexpression 0 0000170F 51 push cx 0 00001710 52 push dx 0 00001711 53 push bx 0 00001712 B90100 mov cx, 1 0 00001715 53 push bx 0 00001716 F6C440 test ah, 40h ; signed type ? 0 00001719 7416 jz .unsigned ; no --> 0 0000171B F6C780 test bh, 80h ; negative value ? 0 0000171E 7411 jz .unsigned ; no --> 5769 .signed: 0 00001720 21D3 and bx, dx 0 00001722 43 inc bx ; = 0 if -1 (all bits set) 0 00001723 5B pop bx 0 00001724 741F jz .done ; is -1, 1 significant bit --> 0 00001726 B122 mov cl, 32+1+1 ; number of significant bits is 1 + 1-based index of highest clear bit 5775 .signedloop: 0 00001728 D1E2 shl dx, 1 0 0000172A D1D3 rcl bx, 1 ; shift up the number 0 0000172C 49 dec cx ; maintain index 0 0000172D 72F9 jc .signedloop ; still a set bit --> 0 0000172F EB14 jmp short .done 5781 .unsigned: 0 00001731 09D3 or bx, dx ; = 0 if 0 (all bits cleared) 0 00001733 5B pop bx 0 00001734 740F jz .done ; is 0, 1 significant bit --> 0 00001736 B121 mov cl, 32+1 ; number of significant bits is 1-based index of highest set bit 5786 .unsignedloop: 0 00001738 D1E2 shl dx, 1 0 0000173A D1D3 rcl bx, 1 0 0000173C 49 dec cx 0 0000173D 73F9 jnc .unsignedloop 0 0000173F F6C440 test ah, 40h ; positive signed value ? 0 00001742 7401 jz .done ; no --> 0 00001744 41 inc cx ; then the following zero bit is required too 5794 .done: 0 00001745 80E4C0 and ah, 1100_0000b 5796 ; insure we only pass the top two type bits 0 00001748 08CC or ah, cl 5798 ; low 6 bits = number of significant bits 0 0000174A 5B pop bx 0 0000174B 5A pop dx 0 0000174C 59 pop cx 0 0000174D 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 0000174E E80600 call .getprecedence 0 00001751 E80300 call .getprecedence 0 00001754 39CB cmp bx, cx 0 00001756 C3 retn 5814 5815 .getprecedence: 0 00001757 30FF xor bh, bh 0 00001759 8A9F[D000] mov bl, byte [operatorprecedences+bx] 0 0000175D 87D9 xchg bx, cx 0 0000175F C3 retn 5820 5821 getexpression.lit_ishexdigit?: section_of_function 0 00001760 B93946 mov cx, "9F" 5823 getexpression.lit_isdigit?: section_of_function 0 00001763 3C30 cmp al, '0' 0 00001765 7218 jb .no 0 00001767 38C8 cmp al, cl 0 00001769 7611 jbe .yes 0 0000176B 50 push ax 0 0000176C E8[0000]EB02[0000] nearcall capitalise 0 00001773 38E8 cmp al, ch 0 00001775 7707 ja .no_p 0 00001777 3C41 cmp al, 'A' 0 00001779 7203 jb .no_p 0 0000177B 58 pop ax 5835 .yes: 0 0000177C F8 clc 0 0000177D C3 retn 5838 5839 .no_p: 0 0000177E 58 pop ax 5841 .no: 0 0000177F F9 stc 0 00001780 C3 retn 5844 5845 5846 of_cond: section_of_function 0 00001781 50 push ax ; second operand type 0 00001782 4E dec si 0 00001783 AD lodsw 0 00001784 3D3A3A cmp ax, "::" 0 00001787 7534 jne short .error 5852 %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_COND_STACK_CHECK 0 00001789 E82D01 call stack_check_indirection 5854 %else 5855 mov ax, _EXPRESSION_COND_STACK_CHECK 5856 call stack_check ; abort if deep recursion 5857 %endif 0 0000178C A9[0000] test ax, msg.stack_overflow.cond 5859 0 0000178F A1[B80C] mov ax, word [hhvar] 0 00001792 0B06[BA0C] or ax, word [hhvar + 2] ; ax = flag (zero if to take third operand) 0 00001796 53 push bx 0 00001797 52 push dx 0 00001798 50 push ax ; preserve stack 0 00001799 AC lodsb 0 0000179A E879FA nearcall getexpression ; parse third operand 0 0000179D E8[0000]EB02[0000] nearcall skipcomm0 ; allow comma afterwards 0 000017A4 59 pop cx 0 000017A5 E309 jcxz @F ; if to take third operand --> 0 000017A7 5A pop dx 0 000017A8 5B pop bx ; take second operand 0 000017A9 88C1 mov cl, al 0 000017AB 58 pop ax ; ah = second operand type 0 000017AC 88C8 mov al, cl ; preserve al 0 000017AE EB03 jmp @FF 5876 5877 @@: 0 000017B0 59 pop cx 0 000017B1 59 pop cx ; discard second operand value 0 000017B2 59 pop cx ; discard second operand type 5881 @@: 0 000017B3 59 pop cx ; discard near return address 0 000017B4 59 pop cx ; discard cx on stack 5884 0 000017B5 C646FC19 mov byte [bp+lA+4], OPERATOR_RIGHTOP 0 000017B9 4E dec si 0 000017BA E90EFE jmp getexpression.term_done 5888 5889 .error: 0 000017BD E91BE9 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 000017C0 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 000017C2 B50F mov ch, 1111b ; default to access a full dword 0 000017C4 31D2 xor dx, dx ; initialize counter to zero 0 000017C6 EB09 jmp @F 5924 5925 .loop: 0 000017C8 E8[0000]EB02[0000] nearcall skipcomma 0 000017CF 4E dec si 0 000017D0 5F pop di ; get maximum count 5929 @@: 0 000017D1 42 inc dx ; count unary operators and type specifiers 0 000017D2 57 push di ; save maximum count again 0 000017D3 E8[0000]EB02[0000] nearcall skipwhite ; load next character and skip blanks 0 000017DA 39FA cmp dx, di ; reached maximum ? 0 000017DC 741B je .end ; yes --> (ZR) 0 000017DE 51 push cx 0 000017DF E85BED nearcall istype? ; check for type and if so retrieve info 0 000017E2 720F jc .notype ; not a type --> 0 000017E4 59 pop cx 5939 0 000017E5 D1EB shr bx, 1 ; discard signedness bit 0 000017E7 89FE mov si, di ; -> behind the type specifier 0 000017E9 B11F mov cl, 01Fh ; prepare shift count register 0 000017EB 238F[2400] and cx,[typebitmasks+bx]; apply mask and get shift count register 0 000017EF D2E5 shl ch, cl ; apply shift 0 000017F1 EBD5 jmp short .loop ; check for more --> 5946 5947 .notype: 0 000017F3 E8F9EC nearcall isunaryoperator?; is it a unary operator? 0 000017F6 59 pop cx 0 000017F7 74CF je .loop ; yes, check for more --> 5951 ; (NZ) 5952 .end: 0 000017F9 5F pop di ; discard 0 000017FA C3 retn 5955 5956 5957 get3byte.checksignificantbits: section_of_function 0 000017FB 50 push ax 0 000017FC 80E43F and ah, 3Fh 0 000017FF 80FC18 cmp ah, 24 0 00001802 EB1E jmp checksignificantbitscommon 5962 5963 getword: section_of_function 0 00001804 53 push bx 0 00001805 E80EFA nearcall getexpression 0 00001808 5B pop bx 5967 .checksignificantbits: section_of_function getword 0 00001809 50 push ax 0 0000180A 80E43F and ah, 3Fh 0 0000180D 80FC10 cmp ah, 16 0 00001810 EB10 jmp checksignificantbitscommon 5972 5973 getbyte: section_of_function 0 00001812 53 push bx 0 00001813 52 push dx 0 00001814 E8FFF9 nearcall getexpression 0 00001817 5B pop bx 0 00001818 88FE mov dh, bh 0 0000181A 5B pop bx 5980 .checksignificantbits: section_of_function getbyte 0 0000181B 50 push ax 0 0000181C 80E43F and ah, 3Fh 0 0000181F 80FC08 cmp ah, 8 5984 checksignificantbitscommon: section_of_function 0 00001822 58 pop ax 0 00001823 7701 ja short errorj6 ; if error 0 00001825 C3 retn 5988 5989 errorj6: 0 00001826 E9B2E8 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 00001829 50 push ax 0 0000182A 2C30 sub al, '0' 0 0000182C 3C09 cmp al, 9 0 0000182E 7611 jbe .return ; if normal digit 0 00001830 58 pop ax 0 00001831 50 push ax 0 00001832 E8[0000]EB02[0000] nearcall capitalise 0 00001839 2C41 sub al, 'A' 0 0000183B 3C05 cmp al, 'F'-'A' 0 0000183D 7706 ja .error ; if not A..F 0 0000183F 040A add al, 10 6008 .return: 0 00001841 44 inc sp ; normal return (first pop old AX) 0 00001842 44 inc sp 0 00001843 F8 clc 0 00001844 C3 retn 6013 .error: 0 00001845 58 pop ax ; error return 0 00001846 F9 stc 0 00001847 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 00001848 E8[0000]EB02[0000] nearcall skipwhite 0 0000184F 4E dec si 0 00001850 BA[0000] mov dx, msg.from 0 00001853 E8[0000]EB02[0000] nearcall isstring? 0 0000185A AC lodsb 0 0000185B 754C jne .not_from 6036 6037 .from: 0 0000185D E8B6F9 nearcall getexpression ; (recursive) 0 00001860 89D7 mov di, dx 0 00001862 89D9 mov cx, bx ; cx:di = from 6041 0 00001864 E8[0000]EB02[0000] nearcall skipcomm0 0 0000186B 4E dec si 0 0000186C BA[0000] mov dx, msg.to 0 0000186F E8[0000]EB02[0000] nearcall isstring? 0 00001876 742B je .from_to 0 00001878 BA[0000] mov dx, msg.length 0 0000187B E8[0000]EB02[0000] nearcall isstring? 0 00001882 7510 jne short .error 6050 6051 .from_length: 0 00001884 AC lodsb 0 00001885 51 push cx 0 00001886 E8EFEB nearcall get_length ; (recursive call to getexpression) 0 00001889 59 pop cx 0 0000188A 85DB test bx, bx 0 0000188C 7509 jnz @F 0 0000188E 85D2 test dx, dx 0 00001890 7505 jnz @F 6060 ; ZR = length is zero, cx:di = from 6061 .notnormal: 0 00001892 F9 stc 0 00001893 C3 retn 6064 6065 .error: 0 00001894 E944E8 jmp error_expr 6067 6068 @@: 6069 ; bx:dx = length 0 00001897 01FA add dx, di 0 00001899 11CB adc bx, cx ; bx:dx = from + length 0 0000189B 83EA01 sub dx, 1 0 0000189E 83DB00 sbb bx, 0 ; bx:dx = from + length - 1 0 000018A1 EB0D jmp @F 6075 6076 .from_to: 0 000018A3 AC lodsb 6078 0 000018A4 E86FF9 nearcall getexpression ; (recursive) 6080 ; bx:dx = to 6081 ; cx:di = from 0 000018A7 EB07 jmp @F 6083 6084 .not_from: 0 000018A9 E86AF9 nearcall getexpression ; (recursive) 0 000018AC 89D7 mov di, dx 0 000018AE 89D9 mov cx, bx ; bx:dx = cx:ax = value 6088 6089 @@: 0 000018B0 39CB cmp bx, cx 0 000018B2 7502 jne @F 0 000018B4 39FA cmp dx, di 6093 @@: 0 000018B6 72DA jb .notnormal ; NZ = length overflow or not normal FROM TO 0 000018B8 C3 retn ; (NC) 6096 6097 6098 stack_check_indirection: 0 000018B9 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: 0 000018BC E83B00 call .internal 0 000018BF 7201 jb @F 0 000018C1 C3 retn 6110 6111 @@: 0 000018C2 58 pop ax 6113 0 000018C3 16 push ss 0 000018C4 07 pop es 0 000018C5 8B26[0000] mov sp, [throwsp] 6117 0 000018C9 BF[0000] mov di, msg.stack_overflow.caller 0 000018CC E8[0000]EB02[0000] nearcall hexword 0 000018D3 BA[0000] mov dx, msg.stack_overflow 0 000018D6 E8[0000]EB02[0000] nearcall putsz 0 000018DD 93 xchg ax, bx 0 000018DE 2E8B5701 mov dx, [cs:bx + 1] 0 000018E2 E8[0000]EB02[0000] nearcall putsz 0 000018E9 B83801 mov ax, 0138h 0 000018EC E8[0000]EB02[0000] nearcall setrc 6127 6128 %if _EXPRDUALCODE && _DUALCODE 0 000018F3 E8[0000]EB02[0D00] nearcall to_errret_pop 6130 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 6130 ------------------ note: usesection lDEBUG_CODE 6131 6132 to_errret_pop: equ $ 0 00004C7E 83C406 add sp, 6 0 00004C81 FF26[0000] jmp near [errret] 6135 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 6135 ------------------ note: usesection lDEBUG_CODE2 6136 %else 6137 jmp near [errret] 6138 %endif 6139 6140 6141 ; INP: ax = how much stack should be left 6142 ; OUT: CY if stack overflow 6143 ; CHG: ax 6144 ; STT: ds = ss 6145 .internal: section_of_function stack_check 6146 %if _SYMBOLIC 0 000018FA 0306[0000] add ax, word [stack_low_address] 6148 %else 6149 add ax, stack 6150 %endif 0 000018FE 7202 jc .ret 0 00001900 39C4 cmp sp, ax 6153 .ret: 0 00001902 C3 retn 6155 6156 %if _PM 6157 ; INP: ss:sp -> 8-byte save area 6158 ; OUT: in PM: save area filled 6159 ; save area left on stack 6160 ; CHG: - 6161 ; STT: es = ds = debugger data selector 6162 dualfunction 6163 save_scratchsel: section_of_function 6164 lframe dualdistance 6165 lpar qword, savearea 6166 lpar_return 0 00001903 5589E5 lenter 0 00001906 E8[0000]EB02[0000] nearcall ispm 0 0000190D 7517 jnz .ret 0 0000190F 50 push ax 0 00001910 53 push bx 0 00001911 66 _386_o32 0 00001912 57 push di 0 00001913 6631FF _386 xor edi, edi 0 00001916 8D7E06 lea di, [bp + ?savearea] 0 00001919 8B1E[0000] mov bx, word [scratchsel] 0 0000191D B80B00 mov ax, 000Bh 0 00001920 CD31 int 31h ; get descriptor 0 00001922 66 _386_o32 0 00001923 5F pop di 0 00001924 5B pop bx 0 00001925 58 pop ax 6183 .ret: 0 00001926 5D lleave 0 00001927 E8[0000] dualreturn 0 0000192A CB lret 6187 6188 ; INP: ss:sp -> 8-byte save area 6189 ; OUT: in PM: save area used 6190 ; save area popped from stack 6191 ; CHG: - 6192 ; STT: es = ds = debugger data selector 6193 dualfunction 6194 restore_scratchsel: section_of_function 6195 lframe dualdistance 6196 lpar qword, savearea 0 0000192B 5589E5 lenter 0 0000192E E8[0000]EB02[0000] nearcall ispm 0 00001935 7517 jnz .ret 0 00001937 50 push ax 0 00001938 53 push bx 0 00001939 66 _386_o32 0 0000193A 57 push di 0 0000193B 6631FF _386 xor edi, edi 0 0000193E 8D7E06 lea di, [bp + ?savearea] 0 00001941 8B1E[0000] mov bx, word [scratchsel] 0 00001945 B80C00 mov ax, 000Ch 0 00001948 CD31 int 31h ; set descriptor 0 0000194A 66 _386_o32 0 0000194B 5F pop di 0 0000194C 5B pop bx 0 0000194D 58 pop ax 6213 .ret: 0 0000194E 5D lleave 0 0000194F E8[0000] dualreturn 0 00001952 CA0800 lret 6217 %elif _EXTENSIONS 6218 ; shim functions to allow calling from ELDs 6219 ; in _PM=0 builds of the debugger. 6220 dualfunction 6221 save_scratchsel: section_of_function 6222 lframe dualdistance 6223 lpar qword, savearea, notneedframe 6224 lpar_return 6225 lframe_needonlyregistered 6226 lenter 6227 .ret: 6228 lleave 6229 dualreturn 6230 lret 6231 6232 dualfunction 6233 restore_scratchsel: section_of_function 6234 lframe dualdistance 6235 lpar qword, savearea, notneedframe 6236 lframe_needonlyregistered 6237 lenter 6238 lleave 6239 dualreturn 6240 lret 6241 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 000026A7 ???????? eldhSignature: resb 4 ; "ELD1" 0 000026AB ?????? resb 3 ; reserved 0 000026AE ?? resb 1 ; 26 (Ctrl-Z) 0 000026AF ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 000026B3 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000026B5 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000026B7 ???????? eldhDataOffset: resd 1 0 000026BB ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000026BD ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000026BF ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000026C1 ???????? eldhReserved: resb 4 ; reserved 0 000026C5 ???? 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 000026C7 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000026CB ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000026CF ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000026D3 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 000026A7 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 000026AF ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 000026B3 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000026B5 ???? 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 000026A7 ???? 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 000026A9 ???? eldltAmount: resw 1 0 000026AB ???????? 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 000026A7 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 000026A9 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 000026AB ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 000026AD ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 000026AF ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000026B7 ???? 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 000026A7 ???? eldlSignature: resw 1 ; 0E1D1h 0 000026A9 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 000026AB ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 000026AD ???? eldlUseLinkHash: resw 1 0 000026AF ???? eldlDataAmount: resw 1 0 000026B1 ???? eldlDataPrefixes: resw 1 0 000026B3 ???? eldlDataEntries: resw 1 0 000026B5 ???? eldlDataAddresses: resw 1 0 000026B7 ???? eldlCodeAmount: resw 1 0 000026B9 ???? eldlCodePrefixes: resw 1 0 000026BB ???? eldlCodeEntries: resw 1 0 000026BD ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 000026BF ???? eldlDualAmount: resw 1 0 000026C1 ???? eldlDualPrefixes: resw 1 0 000026C3 ???? eldlDualEntries: resw 1 0 000026C5 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 000026A7 ???? ifKeyword: resw 1 0 000026A9 ???? ifDescription: resw 1 0 000026AB ???? ifOptions: resw 1 0 000026AD ???? ifValue: resw 1 0 000026AF ???? ifTrying: resw 1 0 000026B1 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 000026A7 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 000026AB ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 000026AF ???? smName1: resw 1 ; -> first string part 0 000026B1 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 000026B3 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 000026B5 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 000026B7 ???? smBaseNext: resw 1 0 000026B9 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 000026BB ???? smSpecialNext: resw 1 0 000026BD ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 000026A7 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 000026A8 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 000026A9 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 000026A7 ???? shHash: resw 1 ; hash value 0 000026A9 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 000026A7 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 000026AB ???? xmsmSourceHandle: resw 1 0 000026AD ???????? xmsmSourceAddress: resd 1 0 000026B1 ???? xmsmDestHandle: resw 1 0 000026B3 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 23 ------------------ note: usesection lDEBUG_CODE 24 25 ; F command - fill memory 26 ff: 0 00004C85 31C9 xor cx, cx ; get address range (no default length) 0 00004C87 8B1E[0000] mov bx, word [reg_ds] 0 00004C8B E8[0000]EB02[0000] nearcall getrange ; get address range into bx:(e)dx 0 00004C92 66 _386_PM_o32 ; sub ecx, edx 0 00004C93 29D1 sub cx, dx 0 00004C95 66 _386_PM_o32 ; inc ecx 0 00004C96 41 inc cx ; (e)cx = number of bytes 0 00004C97 53 push bx 0 00004C98 66 _386_PM_o32 ; push ecx 0 00004C99 51 push cx ; save it 0 00004C9A 66 _386_PM_o32 ; push edx 0 00004C9B 52 push dx ; save start address 39 0 00004C9C 4E dec si 0 00004C9D BA[0000] mov dx, msg.range 0 00004CA0 E8[0000] call isstring? 0 00004CA3 AC lodsb 0 00004CA4 7520 jne .notrange 45 0 00004CA6 8B1E[0000] mov bx, word [reg_ds] ; get search range 0 00004CAA 800E[0300]04 setopt [internalflags3], dif3_accept_getrange_0 48 %if _MS_0RANGE_COMPAT && !_LOADER 0 00004CAF C606[0000]00 mov byte [getrange_is_uu], 0 50 %endif 0 00004CB4 E8[0000]EB02[0000] nearcall getrangeX.ecx_and_0_valid 52 ; try to get second range 0 00004CBB E8[0000] call chkeol ; and insure end-of-line 54 ; successful if it returned 0 00004CBE 66 _386_PM_o32 ; mov esi, edx 0 00004CBF 89D6 mov si, dx ; bx:esi-> source string 0 00004CC1 66 _386_PM_o32 ; sub ecx, edx 0 00004CC2 29D1 sub cx, dx ; ecx = count - 1 0 00004CC4 EB22 jmp short @F 60 61 .notrange: 0 00004CC6 E8[0000] call skipcomm0 0 00004CC9 E8[0000]EB02[0000] nearcall getstr ; get string of bytes 0 00004CD0 89F9 mov cx, di 0 00004CD2 81E9[0000] sub cx, line_out 0 00004CD6 7503E9[0000] jz error 0 00004CDB 49 dec cx 0 00004CDC 660FB7C9 _386_PM movzx ecx, cx 0 00004CE0 8CDB mov bx, ds 0 00004CE2 6631F6 _386_PM xor esi, esi 0 00004CE5 BE[0000] mov si, line_out 72 73 @@: 0 00004CE8 66 _386_PM_o32 ; pop edi 0 00004CE9 5F pop di 0 00004CEA 66 _386_PM_o32 ; pop eax 0 00004CEB 58 pop ax 0 00004CEC 07 pop es 0 00004CED 8EDB mov ds, bx 80 %if _PM 0 00004CEF 36803E[0000]00 cmp byte [ss:bAddr32], 0 0 00004CF5 7440 jz ff16 83 ff32: 84 [cpu 386] 0 00004CF7 6641 inc ecx 0 00004CF9 0F84[0000] jz error 0 00004CFD 6683F901 cmp ecx, byte 1 0 00004D01 7429 je .onebytesource 0 00004D03 6631D2 xor edx, edx ; edx:eax = size 0 00004D06 66F7F1 div ecx 0 00004D09 6685C0 test eax, eax 0 00004D0C 7413 jz .partial 93 .loop: 0 00004D0E 6656 push esi 0 00004D10 6651 push ecx 0 00004D12 67A4 a32 movsb 0 00004D14 6649 dec ecx 0 00004D16 67F3A4 a32 rep movsb 0 00004D19 6659 pop ecx 0 00004D1B 665E pop esi 0 00004D1D 6648 dec eax 0 00004D1F 75ED jnz .loop 103 .partial: 0 00004D21 6689D1 mov ecx, edx ; get remainder (number of bytes in partial copy) 0 00004D24 67E344 jecxz ffret ; if no partial copy --> 0 00004D27 67F3A4 a32 rep movsb 0 00004D2A EB3F jmp short ffret ; done --> 108 .onebytesource: 0 00004D2C 6689C1 mov ecx, eax ; size 0 00004D2F 678A06 mov al, byte [esi] 0 00004D32 67F3AA a32 rep stosb 0 00004D35 EB34 jmp short ffret 113 __CPU__ 114 ff16: 115 %endif 0 00004D37 31D2 xor dx, dx ; dx:ax = size 0 00004D39 83F801 cmp ax, byte 1 0 00004D3C 83D200 adc dx, byte 0 ; convert 0000:0000 to 0001:0000 (0 = 64 KiB) 0 00004D3F 41 inc cx 0 00004D40 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 00004D42 92 xchg ax, dx 0 00004D43 EB07 jmp @FF 126 127 @@: 0 00004D45 83F901 cmp cx, byte 1 0 00004D48 7419 je .onebytesource ; a common optimization 0 00004D4A F7F1 div cx ; compute number of whole repetitions 131 @@: 0 00004D4C 85C0 test ax, ax 0 00004D4E 740B jz .partial ; if less than one whole rep 134 .loop: 0 00004D50 56 push si 0 00004D51 51 push cx 0 00004D52 A4 movsb 0 00004D53 49 dec cx 0 00004D54 F3A4 rep movsb 0 00004D56 59 pop cx 0 00004D57 5E pop si 0 00004D58 48 dec ax 0 00004D59 75F5 jnz .loop ; if more to go 144 .partial: 0 00004D5B 89D1 mov cx, dx ; get remainder (number of bytes in partial copy) 0 00004D5D E30C jcxz ffret ; if no partial copy --> 0 00004D5F F3A4 rep movsb 0 00004D61 EB08 jmp short ffret ; done --> 149 .onebytesource: 0 00004D63 89C1 mov cx, ax ; size 0 00004D65 8A04 mov al, byte [si] 0 00004D67 AA stosb ; cx=0 -> 64 kB 0 00004D68 49 dec cx 0 00004D69 F3AA rep stosb 155 ffret: 0 00004D6B 16 push ss ; restore ds 0 00004D6C 1F pop ds 0 00004D6D 16 push ss ; restore es 0 00004D6E 07 pop es 0 00004D6F C3 retn === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 000026A7 ???????? eldhSignature: resb 4 ; "ELD1" 0 000026AB ?????? resb 3 ; reserved 0 000026AE ?? resb 1 ; 26 (Ctrl-Z) 0 000026AF ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 000026B3 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000026B5 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000026B7 ???????? eldhDataOffset: resd 1 0 000026BB ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000026BD ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000026BF ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000026C1 ???????? eldhReserved: resb 4 ; reserved 0 000026C5 ???? 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 000026C7 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000026CB ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000026CF ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000026D3 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 000026A7 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 000026AF ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 000026B3 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000026B5 ???? 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 000026A7 ???? 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 000026A9 ???? eldltAmount: resw 1 0 000026AB ???????? 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 000026A7 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 000026A9 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 000026AB ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 000026AD ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 000026AF ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000026B7 ???? 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 000026A7 ???? eldlSignature: resw 1 ; 0E1D1h 0 000026A9 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 000026AB ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 000026AD ???? eldlUseLinkHash: resw 1 0 000026AF ???? eldlDataAmount: resw 1 0 000026B1 ???? eldlDataPrefixes: resw 1 0 000026B3 ???? eldlDataEntries: resw 1 0 000026B5 ???? eldlDataAddresses: resw 1 0 000026B7 ???? eldlCodeAmount: resw 1 0 000026B9 ???? eldlCodePrefixes: resw 1 0 000026BB ???? eldlCodeEntries: resw 1 0 000026BD ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 000026BF ???? eldlDualAmount: resw 1 0 000026C1 ???? eldlDualPrefixes: resw 1 0 000026C3 ???? eldlDualEntries: resw 1 0 000026C5 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 000026A7 ???? ifKeyword: resw 1 0 000026A9 ???? ifDescription: resw 1 0 000026AB ???? ifOptions: resw 1 0 000026AD ???? ifValue: resw 1 0 000026AF ???? ifTrying: resw 1 0 000026B1 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 000026A7 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 000026AB ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 000026AF ???? smName1: resw 1 ; -> first string part 0 000026B1 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 000026B3 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 000026B5 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 000026B7 ???? smBaseNext: resw 1 0 000026B9 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 000026BB ???? smSpecialNext: resw 1 0 000026BD ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 000026A7 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 000026A8 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 000026A9 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 000026A7 ???? shHash: resw 1 ; hash value 0 000026A9 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 000026A7 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 000026AB ???? xmsmSourceHandle: resw 1 0 000026AD ???????? xmsmSourceAddress: resd 1 0 000026B1 ???? xmsmDestHandle: resw 1 0 000026B3 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <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 ; 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/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 000026A8 ???????? eldhSignature: resb 4 ; "ELD1" 0 000026AC ?????? resb 3 ; reserved 0 000026AF ?? resb 1 ; 26 (Ctrl-Z) 0 000026B0 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 000026B4 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000026B6 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000026B8 ???????? eldhDataOffset: resd 1 0 000026BC ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000026BE ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000026C0 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000026C2 ???????? eldhReserved: resb 4 ; reserved 0 000026C6 ???? 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 000026C8 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000026CC ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000026D0 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000026D4 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 000026A8 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 000026B0 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 000026B4 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000026B6 ???? 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 000026A8 ???? 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 000026AA ???? eldltAmount: resw 1 0 000026AC ???????? 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 000026A8 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 000026AA ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 000026AC ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 000026AE ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 000026B0 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000026B8 ???? 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 000026A8 ???? eldlSignature: resw 1 ; 0E1D1h 0 000026AA ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 000026AC ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 000026AE ???? eldlUseLinkHash: resw 1 0 000026B0 ???? eldlDataAmount: resw 1 0 000026B2 ???? eldlDataPrefixes: resw 1 0 000026B4 ???? eldlDataEntries: resw 1 0 000026B6 ???? eldlDataAddresses: resw 1 0 000026B8 ???? eldlCodeAmount: resw 1 0 000026BA ???? eldlCodePrefixes: resw 1 0 000026BC ???? eldlCodeEntries: resw 1 0 000026BE ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 000026C0 ???? eldlDualAmount: resw 1 0 000026C2 ???? eldlDualPrefixes: resw 1 0 000026C4 ???? eldlDualEntries: resw 1 0 000026C6 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 000026A8 ???? ifKeyword: resw 1 0 000026AA ???? ifDescription: resw 1 0 000026AC ???? ifOptions: resw 1 0 000026AE ???? ifValue: resw 1 0 000026B0 ???? ifTrying: resw 1 0 000026B2 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 000026A8 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 000026AC ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 000026B0 ???? smName1: resw 1 ; -> first string part 0 000026B2 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 000026B4 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 000026B6 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 000026B8 ???? smBaseNext: resw 1 0 000026BA ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 000026BC ???? smSpecialNext: resw 1 0 000026BE ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 000026A8 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 000026A9 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 000026AA ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 000026A8 ???? shHash: resw 1 ; hash value 0 000026AA ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 000026A8 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 000026AC ???? xmsmSourceHandle: resw 1 0 000026AE ???????? xmsmSourceAddress: resd 1 0 000026B2 ???? xmsmDestHandle: resw 1 0 000026B4 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 19 overridedef STANDALONE, 0 20 %else 21 %include "lmacros3.mac" 22 %assign _LINK 0 23 %endif 24 25 %if _LINK 26 [list -] === Switch to base=00F6D0h -> "LDEBUG_CODE" 26 ------------------ note: usesection lDEBUG_CODE 225 226 227 ; INP: cx = length of source 228 ; es:di -> destination 229 ; si -> behind end of destination 230 ; OUT: NC if success 231 ; CY if error, 232 ; bx = ?errordata (if _DEBUG0) 233 ; CHG: ax, (bx), cx, dx, es, ds, si, di 234 ; STT: UP 235 depack: 236 lframe near 0 00004D70 5589E5 lenter 238 %if _DEBUG0 || _COUNTER 239 xor bx, bx 240 %endif 241 %if _DEBUG0 242 lvar word, errordata 243 push bx 244 %endif 245 %if _COUNTER 246 lvar word, unused_and_counter 247 lequ ?unused_and_counter + 1, counter 248 push bx ; initialise counter (high byte) to zero 249 %endif 250 251 lvar dword, original_dst 0 00004D73 06 push es 0 00004D74 57 push di 254 lvar dword, dst 0 00004D75 06 push es 0 00004D76 57 push di 257 lvar word, src_remaining 0 00004D77 51 push cx 259 0 00004D78 89F1 mov cx, si 0 00004D7A 29F9 sub cx, di 262 263 lvar word, dst_remaining 0 00004D7C 51 push cx ; push into [bp + ?dst_remaining] 265 266 %if _LZEXEDAT 267 .lze_init: 268 lvar word, tagword 0 00004D7D 50 push ax 0 00004D7E B80100 mov ax, 1 271 lvar word, tagbitscycle 0 00004D81 50 push ax ; = 1 273 0 00004D82 E89500 call get_bit 275 0 00004D85 EB13 jmp .lze_loop 277 278 .lze_literal: 279 %if _LONGLITERAL 0 00004D87 41 inc cx 281 .loop_literal: 282 %endif 283 0 00004D88 E8AD00 call load_byte 285 %if _DEPACKINLINELITERAL 0 00004D8B 836EF401 sub word [bp + ?dst_remaining], 1 287 ; enough space left ? 0 00004D8F 7275 jb .error ; no --> (CY) 0 00004D91 C47EF8 les di, [bp + ?dst] ; -> destination 0 00004D94 AA stosb ; store it 0 00004D95 897EF8 mov word [bp + ?dst], di ; update ?dst 292 %else 293 %if _LONGLITERAL 294 push cx 295 %endif 296 push ax ; on stack: the literal 297 push ss 298 pop ds 299 mov si, sp ; ds:si -> data on stack 300 %if _LONGLITERAL 301 xor ax, ax 302 %else 303 xchg ax, cx ; ax = 0 304 %endif 305 inc ax ; length = 1 306 mov bx, ax ; bx NZ 307 call copy_data.bx 308 pop ax ; (discard) 309 d0 mov byte [bp + ?errordata], 75h 310 jc .error 311 %if _LONGLITERAL 312 pop cx 313 %endif 314 %endif 315 316 %if _LONGLITERAL 0 00004D98 E2EE loop .loop_literal 318 %endif 319 320 %assign LENGTHOFLITERAL $ - .lze_literal 321 %warning length of lze literal = LENGTHOFLITERAL 321 ****************** warning: length of lze literal = 19 [-w+user] 322 323 .lze_loop: 0 00004D9A 31C9 xor cx, cx ; ! ch = 0, cx = 0 0 00004D9C E87B00 call get_bit 0 00004D9F 72E6 jc .lze_literal 327 328 .lze_notliteral: 329 %if _COUNTER 330 inc byte [bp + ?counter] 331 test byte [bp + ?counter], _COUNTER - 1 332 jnz @F 333 mov al, '.' 334 call disp_al_counter 335 @@: 336 %endif 337 0 00004DA1 E87600 call get_bit 0 00004DA4 7220 jc .lze_combined 340 341 .lze_shortmatch: 342 ; cx = 0 0 00004DA6 E87100 call get_bit 0 00004DA9 D1D1 rcl cx, 1 0 00004DAB E86C00 call get_bit 0 00004DAE D1D1 rcl cx, 1 ; cx = 0..3 347 0 00004DB0 E88500 call load_byte ; load displacement 349 0 00004DB3 B4FF mov ah, -1 ; sign extend for negative number 0 00004DB5 93 xchg bx, ax ; bx = displacement (-1 to -256) 352 353 .lze_match_cx_plus_2: 0 00004DB6 41 inc cx 355 .lze_match_cx_plus_1: 0 00004DB7 41 inc cx 357 358 ; INP: bx = match displacement (-1 to -4096) 359 ; cx = match count (2 to 256) 0 00004DB8 93 xchg ax, bx ; ax = displacement, cx = count 0 00004DB9 91 xchg ax, cx ; cx = displacement, ax = length of match 0 00004DBA C576F8 lds si, [bp + ?dst] 0 00004DBD 01CE add si, cx 0 00004DBF E84900 call copy_data ; give ?dst -> dest, ds:si -> source 365 ; returns: ?dst incremented, ds:si -> after match source 366 d0 mov byte [bp + ?errordata], 7Bh 0 00004DC2 7242 jc .error 368 369 .lze_loop_j1: 0 00004DC4 EBD4 jmp .lze_loop 371 372 .lze_combined: 0 00004DC6 E86400 call load_word ; load combined word 374 0 00004DC9 89C3 mov bx, ax 0 00004DCB F9 stc ; CY 0 00004DCC D0DF rcr bh, 1 ; rotate in a 1 0 00004DCE D0FF sar bh, 1 0 00004DD0 D0FF sar bh, 1 ; fill top three bits with 1s 380 %if 1 ; _4 0 00004DD2 D0FF sar bh, 1 ; fill top *four* bits with 1s 0 00004DD4 80E40F and ah, 15 383 %else 384 and ah, 7 385 %endif 0 00004DD7 88E1 mov cl, ah ; ch already = 0 0 00004DD9 75DB jnz .lze_match_cx_plus_2 ; length = cx + 2, bx = displacement 388 389 .lze_escape: 0 00004DDB E85A00 call load_byte ; ah = 0 0 00004DDE 3C01 cmp al, 1 0 00004DE0 7213 jb .end_check 0 00004DE2 91 xchg cx, ax ; cx = length 0 00004DE3 77D2 ja .lze_match_cx_plus_1 ; length = cx + 1, bx = displacement 395 396 .lze_normalise: 397 %if _LONGLITERAL 0 00004DE5 87CB xchg cx, bx ; cx = displacement, top 4 or 3 bits sets 399 %if 1 ; _4 0 00004DE7 80E50F and ch, ~ 1111_0000b ; isolate 12-bit displacement 401 %else 402 and ch, ~ 1110_0000b ; isolate 13-bit displacement 403 %endif 0 00004DEA E307 jcxz .normalise ; displacement 0 means segment change --> 0 00004DEC 83F91A cmp cx, 26 ; long literals command needs >= 26 bytes 0 00004DEF 7215 jb .error ; (reserved for future expansion) 0 00004DF1 EB95 jmp .loop_literal ; process the literals --> 408 %endif 409 .normalise: 0 00004DF3 EBCF jmp .lze_loop_j1 411 412 .end_check: 413 d0 mov byte [bp + ?errordata], 7Dh 0 00004DF5 31C9 xor cx, cx 0 00004DF7 394EF6 cmp word [bp + ?src_remaining], cx 0 00004DFA 750A jne .error 0 00004DFC 394EF4 cmp word [bp + ?dst_remaining], cx 0 00004DFF 7405 je .error 419 0 00004E01 C47EF8 les di, [bp + ?dst] 0 00004E04 AA stosb ; NUL terminate data 422 423 .end: 0 00004E05 A8 db __TEST_IMM8 ; (NC) 425 .error: 0 00004E06 F9 stc 427 428 %if _COUNTER 429 lahf 430 mov al, 13 431 call disp_al_for_progress 432 mov al, 10 433 call disp_al_for_progress 434 sahf 435 %endif 436 d0 mov bx, word [bp + ?errordata] 0 00004E07 89EC5D lleave code 0 00004E0A C3 lret 439 %else 440 441 @@: 442 call read_byte 443 d0 mov byte [bp + ?errordata], 70h 444 jc .error 445 446 mov ah, 0 447 test ax, ax 448 d0 mov byte [bp + ?errordata], 71h 449 jz .error 450 cmp al, 15 451 ja .error 452 453 lvar word, window_size_bits 454 push ax 455 456 call read_byte 457 d0 mov byte [bp + ?errordata], 72h 458 jc .error 459 460 mov ah, 0 461 test ax, ax 462 d0 mov byte [bp + ?errordata], 73h 463 jz .error 464 cmp ax, word [bp + ?window_size_bits] 465 jae .error 466 467 lvar word, lookahead_size_bits 468 push ax 469 470 xor cx, cx 471 lvar word, low_bit_index_and_high_current_byte 472 push cx 473 474 .loop: 475 %if _COUNTER 476 inc byte [bp + ?counter] 477 test byte [bp + ?counter], _COUNTER - 1 478 jnz @F 479 mov al, '.' 480 call disp_al 481 @@: 482 %endif 483 mov cx, 1 484 call get_bits 485 jnc .notend ; (cx = 0 if jumping) 486 487 d0 mov byte [bp + ?errordata], 7Dh 488 .end_check: 489 xor ax, ax 490 cmp word [bp + ?src_remaining], ax 491 jne .error 492 493 cmp word [bp + ?dst_remaining], ax 494 je .error 495 496 les di, [bp + ?dst] 497 stosb ; NUL terminate data 498 499 db __TEST_IMM8 ; (NC) 500 .error: 501 stc 502 503 %if _COUNTER 504 lahf 505 mov al, 13 506 call disp_al 507 mov al, 10 508 call disp_al 509 sahf 510 %endif 511 d0 mov bx, word [bp + ?errordata] 512 lleave code 513 lret 514 515 .notend: ; (cx = 0) 516 test al, al 517 jz .notliteral 518 519 .hs_literal: 520 mov cl, 8 521 call get_bits ; cx = 0 522 d0 mov byte [bp + ?errordata], 74h 523 jc .end_check 524 %if _DEPACKINLINELITERAL 525 sub word [bp + ?dst_remaining], 1 526 ; enough space left ? 527 jb .error ; no --> (CY) 528 les di, [bp + ?dst] ; -> destination 529 stosb ; store it 530 mov word [bp + ?dst], di ; update ?dst 531 %else 532 push ax ; on stack: the literal 533 push ss 534 pop ds 535 mov si, sp ; ds:si -> data on stack 536 xchg ax, cx ; ax = 0 537 inc ax ; length = 1 538 call copy_data 539 pop ax ; (discard) 540 d0 mov byte [bp + ?errordata], 75h 541 jc .error 542 %endif 543 %assign LENGTHOFLITERAL $ - .hs_literal 544 %warning length of hs literal = LENGTHOFLITERAL 545 546 jmp .loop 547 548 .notliteral: ; (cx = 0) 549 mov cl, byte [bp + ?window_size_bits] 550 ; cx = -w parameter 551 call get_bits 552 d0 mov byte [bp + ?errordata], 76h 553 jc .end_check 554 ; ax = output index 555 ; cx = 0 556 xchg bx, ax 557 mov cl, byte [bp + ?lookahead_size_bits] 558 ; cx = -l parameter 559 call get_bits 560 d0 mov byte [bp + ?errordata], 77h 561 jc .end_check 562 ; bx = output index less 1 563 ; ax = output count less 1 564 inc bx ; = output index 565 d0 mov byte [bp + ?errordata], 78h 566 jz .error 567 568 ; ax = length of match less one 569 inc ax ; = length of match 570 jz .error 571 572 mov cx, bx 573 neg cx ; -1 .. -65535 574 575 lds si, [bp + ?dst] 576 add si, cx 577 %ifn _Z 578 jnc .copy_zeros 579 580 cmp word [bp + ?original_dst], si 581 ; is source of matching within ?dst ? 582 ja .copy_zeros ; no, ?original_dst is above it --> 583 %endif 584 585 .copy_data: 586 call copy_data ; give ?dst -> dest, ds:si -> source 587 ; returns: ?dst incremented, ds:si -> after match source 588 d0 mov byte [bp + ?errordata], 7Bh 589 jc .error 590 591 jmp .loop 592 593 594 %ifn _Z 595 ; INP: cx = negative displacement from ?dst 596 ; ax = length of match 597 ; ?dst 598 ; ?original_dst 599 .copy_zeros: 600 push ax ; stacked = length of match 601 602 neg cx 603 604 mov di, word [bp + ?dst] 605 606 mov ax, word [bp + ?original_dst] 607 sub di, ax ; di = ?dst - ?original_dst 608 ; = maximum displacement 609 610 sub cx, di ; = over-long displacement - max 611 ; = how many zeros to insert 612 mov ax, cx ; ax = how many zeros 613 pop di ; di = length of match 614 d0 mov byte [bp + ?errordata], 81h 615 jb .error 616 617 sub di, ax ; = how many - how many zeros 618 ; = how much to copy from ?original_dst 619 jnc @F ; = jnb = jae = jump if di is >= 0 620 add di, ax ; restore di 621 mov ax, di ; ax = full match length 622 ; (below "how many zeros") 623 xor di, di ; reset to zero, no copy from ?original_dst 624 @@: 625 push di ; stack it again 626 call store_zeros ; store zeros 627 pop ax ; ax = how much to copy 628 d0 mov byte [bp + ?errordata], 83h 629 jc .error 630 631 lds si, [bp + ?original_dst] ; -> ?original_dst 632 jmp .copy_data ; back to common handling --> 633 %endif 634 %endif 635 636 637 ; INP: ?dst -> destination 638 ; ds:si -> source 639 ; ax = how long the data is (0 is valid) 640 ; OUT: ?dst incremented 641 ; ?dst_remaining shortened 642 ; CY if error (buffer too small) 643 ; NC if success 644 ; CHG: cx, bx, dx, ax, es, di, ds, si 645 %if !_Z && !_LZEXEDAT 646 store_zeros: 647 mov bx, copy_data.stosb_zeros 648 jmp @F 649 %endif 650 651 copy_data: 652 %if !_Z && !_LZEXEDAT 653 mov bx, .movsb 654 @@: 655 %endif 656 d0 inc byte [bp + ?errordata + 1] 0 00004E0B 2946F4 sub word [bp + ?dst_remaining], ax 658 ; enough space left ? 0 00004E0E 7209 jb .ret ; no --> (CY) 660 ; now NC 0 00004E10 C47EF8 les di, [bp + ?dst] 662 0 00004E13 91 xchg cx, ax ; cx = remaining length 664 %if !_Z && !_LZEXEDAT 665 call bx ; move 666 %else 0 00004E14 F3A4 rep movsb ; NC preserved 668 %endif 0 00004E16 897EF8 mov word [bp + ?dst], di 670 .ret: 0 00004E19 C3 retn 672 673 %if _Z && !_LZEXEDAT 674 ; INP: NC 675 ; cx = count, may be zero 676 ; OUT: NC 677 .movsb: 678 rep movsb 679 retn 680 681 ; INP: cx = count, may be zero 682 ; OUT: NC 683 .stosb_zeros: 684 push ax 685 xor ax, ax 686 rep stosb 687 pop ax 688 retn 689 %endif 690 691 692 %if _LZEXEDAT 693 ; INP: ?src_remaining 694 ; word [?tagword] = tag word 695 ; word [?tagbitscycle] = circular tag bits indicator 696 ; (there's always a single bit set in this word. 697 ; if this word is equal to 1 on INP then the tag 698 ; word must be reloaded, and the last bit shifted 699 ; out of the INP prior tag word.) 700 ; OUT: NC if read a zero, 701 ; CY if read a one, 702 ; ?src_remaining decremented 703 ; word [?tagword] updated 704 ; word [?tagbitscycle] updated 705 ; branches to depack.error on error 706 ; CHG: ds, si, ax 707 get_bit: 0 00004E1A D14EF0 ror word [bp + ?tagbitscycle], 1 0 00004E1D 730A jnc .left 710 ; after this branch not taken, the cycle word 711 ; wraps around to be equal to 8000h. this 712 ; will wrap around again after 15 more ror. 0 00004E1F E80B00 call load_word 0 00004E22 D16EF2 shr word [bp + ?tagword], 1 0 00004E25 8946F2 mov word [bp + ?tagword], ax 0 00004E28 C3 retn 717 718 .left: 0 00004E29 D16EF2 shr word [bp + ?tagword], 1 0 00004E2C C3 retn 721 722 ; lodsw with ?src_remaining check 723 load_word: 0 00004E2D E80800 call load_byte 0 00004E30 86C4 xchg al, ah 0 00004E32 E80300 call load_byte 0 00004E35 86C4 xchg al, ah 0 00004E37 C3 retn 729 730 ; lodsb with ?src_remaining check 731 load_byte: 0 00004E38 E80300 call read_byte 733 d0 mov byte [bp + ?errordata], 84h 0 00004E3B 72C9 jc depack.error 0 00004E3D C3 retn 736 %else 737 ; INP: cx = 0..15 738 ; OUT: NC if successful, 739 ; ax = value read 740 ; cx = 0 741 ; CY if error 742 ; CHG: ds, si 743 get_bits: 744 push bx 745 mov bx, word [bp + ?low_bit_index_and_high_current_byte] 746 cmp cx, 15 747 ja .error 748 jcxz .error 749 xor ax, ax 750 .loop: 751 test bl, bl 752 jnz .havebit 753 push ax 754 call read_byte 755 mov bh, al 756 mov bl, 80h 757 pop ax 758 jc .error 759 .havebit: 760 shl ax, 1 761 test bh, bl 762 jz @F 763 inc ax 764 @@: 765 shr bl, 1 766 loop .loop 767 .end: 768 db __TEST_IMM8 ; skip stc, NC 769 .error: 770 stc 771 mov word [bp + ?low_bit_index_and_high_current_byte], bx 772 pop bx 773 retn 774 %endif 775 776 777 ; INP: ?src_remaining 778 ; OUT: NC if success, 779 ; al = value read 780 ; ?src_remaining decremented 781 ; CY if error (source buffer too small), 782 ; ?src_remaining = 0 783 ; CHG: ds, si 784 read_byte: 0 00004E3E 836EF601 sub word [bp + ?src_remaining], 1 0 00004E42 7206 jb .empty 787 788 %if _STANDALONE 789 call get_file_byte 790 %else 0 00004E44 36FF16[0200] call near [ss:hshrink_get_file_byte] 792 %endif 0 00004E49 C3 retn 794 795 .empty: ; CY 0 00004E4A FF46F6 inc word [bp + ?src_remaining] 0 00004E4D C3 retn 798 799 lleave ctx 800 801 %ifn _STANDALONE 802 resetdef COUNTER 803 resetdef DEBUG0 804 805 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 805 ------------------ note: usesection lDEBUG_DATA_ENTRY 806 align 2, db 0 807 hshrink_memory_source: 0 000026A8 0000 .offset: dw 0 809 %if ! _PM && _MESSAGESEGMENT 810 .segment: dw 0 ; LOADER-relocate 811 %endif 812 hshrink_get_file_byte: 0 000026AA [DE00] dw hshrink_memory_read 814 815 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 815 ------------------ note: usesection lDEBUG_CODE 816 hshrink_memory_read: 817 %if _MESSAGESEGMENT 818 %if _PM 0 00004E4E E8[0000] call get_messagesegsel 0 00004E51 368B36[0000] mov si, [ss:hshrink_memory_source.offset] 821 %else 822 lds si, [ss:hshrink_memory_source] 823 %endif 824 %else 825 push ss 826 pop ds 827 mov si, [hshrink_memory_source.offset] 828 %endif 0 00004E56 AC lodsb 0 00004E57 368936[0000] mov word [ss:hshrink_memory_source.offset], si 0 00004E5C F8 clc 0 00004E5D C3 retn 833 834 %if _TEST_HELP_FILE 835 usesection lDEBUG_DATA_ENTRY 836 filebuffer equ line_out 837 filebuffer.end equ line_out + 256 838 align 2, db 0 839 filebuffer.next: dw 0 840 filebuffer.tail: dw 0 841 handle: dw -1 842 843 usesection lDEBUG_CODE 844 845 testhelpfile: 846 call InDOS 847 jnz error 848 849 @@: 850 lodsb 851 cmp al, 9 852 je @B 853 cmp al, 32 854 je @B 855 call iseol? 856 je error 857 mov dx, si 858 dec dx 859 860 @@: 861 lodsb 862 cmp al, 9 863 je @F 864 cmp al, 32 865 je @F 866 call iseol? 867 jne @B 868 @@: 869 mov byte [si - 1], 0 870 871 mov ax, 3D00h | 1_010_0_000b ; RO, DENY WRITE, No inherit 872 doscall 873 jc error 874 mov word [handle], ax 875 mov word [filebuffer.next], filebuffer 876 mov word [filebuffer.tail], filebuffer 877 878 xchg bx, ax 879 mov ax, 4202h 880 xor cx, cx 881 xor dx, dx 882 doscall 883 jc error 884 885 test dx, dx 886 jnz error 887 888 push ax 889 mov ax, 4200h 890 xor cx, cx 891 xor dx, dx 892 doscall 893 pop cx ; = file size 894 jc error 895 896 mov word [ss:hshrink_get_file_byte], hshrink_file_read 897 ; insure correct source 898 899 %if _MESSAGESEGMENT 900 %if _PM 901 call get_messagesegsel ; ds => message segment 902 push es 903 push ds 904 pop es 905 pop ds ; swap ds, es 906 %else 907 mov es, word [ss:messageseg] ; ds => message segment 908 %endif 909 %else 910 push ss 911 pop es 912 %endif 913 %if _BOOTLDR_DISCARD_HELP 914 mov di, [ss:indirect_hshrink_message_buffer] 915 lea si, [di + hshrink_message_buffer_size] 916 %else 917 mov di, nontruncated_hshrink_message_buffer 918 ; es:di -> destination 919 mov si, nontruncated_hshrink_message_buffer + hshrink_message_buffer_size 920 ; si -> behind destination end 921 %endif 922 push es 923 push di 924 call depack ; try depacking 925 push ss 926 pop es 927 pop dx ; display our decompressed string 928 pop ds 929 jnc @F ; skip next part if not error --> 930 push ss 931 pop ds 932 mov ax, 012Ah 933 call setrc 934 mov dx, msg.hshrink_error ; if error 935 @@: 936 call putsz 937 push ss 938 pop ds 939 mov bx, -1 940 xchg bx, [handle] 941 mov ah, 3Eh 942 doscall 943 retn 944 945 946 hshrink_file_read: 947 push ss 948 pop ds 949 mov si, [filebuffer.next] 950 cmp si, [filebuffer.tail] 951 jb .buffered 952 953 push ax 954 push bx 955 push cx 956 push dx 957 mov dx, filebuffer 958 mov [filebuffer.next], dx 959 mov [filebuffer.tail], dx 960 mov ah, 3Fh 961 mov bx, [handle] 962 mov cx, filebuffer.end - filebuffer 963 doscall 964 jc .error 965 test ax, ax 966 jz .error 967 add ax, dx 968 mov word [filebuffer.tail], ax 969 mov si, dx 970 pop dx 971 pop cx 972 pop bx 973 pop ax 974 975 .buffered: 976 lodsb 977 mov [filebuffer.next], si 978 clc 979 retn 980 981 .error: 982 mov si, line_in + 2 983 jmp error 984 %endif 985 986 %endif 987 %endif 988 989 [list +] === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 000026AC ???????? eldhSignature: resb 4 ; "ELD1" 0 000026B0 ?????? resb 3 ; reserved 0 000026B3 ?? resb 1 ; 26 (Ctrl-Z) 0 000026B4 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 000026B8 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000026BA ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000026BC ???????? eldhDataOffset: resd 1 0 000026C0 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000026C2 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000026C4 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000026C6 ???????? eldhReserved: resb 4 ; reserved 0 000026CA ???? 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 000026CC ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000026D0 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000026D4 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000026D8 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 000026AC ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 000026B4 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 000026B8 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000026BA ???? 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 000026AC ???? 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 000026AE ???? eldltAmount: resw 1 0 000026B0 ???????? 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 000026AC ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 000026AE ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 000026B0 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 000026B2 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 000026B4 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000026BC ???? 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 000026AC ???? eldlSignature: resw 1 ; 0E1D1h 0 000026AE ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 000026B0 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 000026B2 ???? eldlUseLinkHash: resw 1 0 000026B4 ???? eldlDataAmount: resw 1 0 000026B6 ???? eldlDataPrefixes: resw 1 0 000026B8 ???? eldlDataEntries: resw 1 0 000026BA ???? eldlDataAddresses: resw 1 0 000026BC ???? eldlCodeAmount: resw 1 0 000026BE ???? eldlCodePrefixes: resw 1 0 000026C0 ???? eldlCodeEntries: resw 1 0 000026C2 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 000026C4 ???? eldlDualAmount: resw 1 0 000026C6 ???? eldlDualPrefixes: resw 1 0 000026C8 ???? eldlDualEntries: resw 1 0 000026CA ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 000026AC ???? ifKeyword: resw 1 0 000026AE ???? ifDescription: resw 1 0 000026B0 ???? ifOptions: resw 1 0 000026B2 ???? ifValue: resw 1 0 000026B4 ???? ifTrying: resw 1 0 000026B6 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 000026AC ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 000026B0 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 000026B4 ???? smName1: resw 1 ; -> first string part 0 000026B6 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 000026B8 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 000026BA ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 000026BC ???? smBaseNext: resw 1 0 000026BE ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 000026C0 ???? smSpecialNext: resw 1 0 000026C2 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 000026AC ?? ssLength: resb 1 ; how long this string is (only ssString) 0 000026AD ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 000026AE ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 000026AC ???? shHash: resw 1 ; hash value 0 000026AE ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 000026AC ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 000026B0 ???? xmsmSourceHandle: resw 1 0 000026B2 ???????? xmsmSourceAddress: resd 1 0 000026B6 ???? xmsmDestHandle: resw 1 0 000026B8 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 23 ------------------ note: usesection lDEBUG_CODE 24 25 %if _EXPRESSIONS 26 27 ; H command - hex computation 28 hh: 0 00004E5E E8[0000] call skipcomm0 0 00004E61 4E dec si 0 00004E62 BA[0000] mov dx, msg.base 0 00004E65 E8[0000] call isstring? 0 00004E68 7403E9DB00 jne .normal 0 00004E6D E8[0000] call skipequals 0 00004E70 E8[0000]EB02[0000] nearcall getexpression 0 00004E77 85DB test bx, bx 37 @@: 0 00004E79 7403E9C700 jnz .error 0 00004E7E 83FA24 cmp dx, 36 0 00004E81 77F6 ja @B 0 00004E83 83FA02 cmp dx, 2 0 00004E86 72F1 jb @B 0 00004E88 52 push dx 44 0 00004E89 E8[0000] call skipcomm0 0 00004E8C 4E dec si 0 00004E8D BA[0000] mov dx, msg.group 0 00004E90 E8[0000] call isstring? 0 00004E93 BA0000 mov dx, 0 0 00004E96 7517 jne .gotgroup 0 00004E98 E8[0000] call skipequals 0 00004E9B E8[0000]EB02[0000] nearcall getexpression 0 00004EA2 E8[0000] call skipcomm0 0 00004EA5 85DB test bx, bx 0 00004EA7 75D0 jnz @B 0 00004EA9 83FA20 cmp dx, 32 0 00004EAC 77CB ja @B 0 00004EAE 4E dec si 59 .gotgroup: 0 00004EAF 52 push dx 0 00004EB0 BA[0000] mov dx, msg.width 0 00004EB3 E8[0000] call isstring? 0 00004EB6 BB0000 mov bx, 0 0 00004EB9 7519 jne .gotwidth 0 00004EBB E8[0000] call skipequals 0 00004EBE E8[0000]EB02[0000] nearcall getexpression 0 00004EC5 E8[0000] call skipcomm0 0 00004EC8 85DB test bx, bx 0 00004ECA 75AD jnz @B 0 00004ECC 83FA20 cmp dx, 32 0 00004ECF 77A8 ja @B 0 00004ED1 89D3 mov bx, dx 0 00004ED3 A8 db __TEST_IMM8 ; (skip lodsb) 74 .gotwidth: 0 00004ED4 AC lodsb 0 00004ED5 53 push bx 0 00004ED6 E85F01 call .compute 0 00004ED9 58 pop ax 0 00004EDA 5E pop si 0 00004EDB 59 pop cx 0 00004EDC BF[4200] mov di, line_out + 66 82 0 00004EDF E89A01 call .storeresult 84 0 00004EE2 93 xchg bx, ax ; ax:dx = number, bx = width 0 00004EE3 92 xchg ax, dx ; dx:ax = number 87 lframe 0 00004EE4 5589E5 lenter 89 lvar dword, dividend 0 00004EE7 52 push dx 0 00004EE8 50 push ax 0 00004EE9 4B dec bx 93 lvar word, minwidth 0 00004EEA 53 push bx 95 lvar word, group 0 00004EEB 56 push si 97 lvar word, groupcounter 0 00004EEC 56 push si 99 0 00004EED 89FB mov bx, di 0 00004EEF 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 00004EF0 31D2 xor dx, dx 0 00004EF2 57 push di 0 00004EF3 BF0400 mov di, 4 110 .loop_divide: 0 00004EF6 8B43FA mov ax, [bp + ?dividend - 2 + di] 0 00004EF9 F7F1 div cx 0 00004EFB 8943FA mov word [bp + ?dividend - 2 + di], ax 0 00004EFE 4F dec di 0 00004EFF 4F dec di 0 00004F00 75F4 jnz .loop_divide 117 ; dx = last remainder 0 00004F02 5F pop di 0 00004F03 92 xchg ax, dx ; ax = remainder (next digit) 120 ; dword [bp + ?dividend] = result of div 0 00004F04 0430 add al, '0' 0 00004F06 3C39 cmp al, '9' 0 00004F08 7602 jbe @F 0 00004F0A 0407 add al, -('9'+1)+'A' 125 @@: 0 00004F0C AA stosb 127 0 00004F0D FF4EF6 dec word [bp + ?groupcounter] 0 00004F10 7509 jnz @F 0 00004F12 FF76F8 push word [bp + ?group] 0 00004F15 8F46F6 pop word [bp + ?groupcounter] 0 00004F18 B05F mov al, '_' 0 00004F1A AA stosb 134 @@: 135 0 00004F1B FF4EFA dec word [bp + ?minwidth] 0 00004F1E 79D0 jns .loop_write 138 0 00004F20 837EFE00 cmp word [bp + ?dividend + 2], 0 0 00004F24 75CA jnz .loop_write 0 00004F26 837EFC00 cmp word [bp + ?dividend], 0 142 ; any more ? 0 00004F2A 75C4 jnz .loop_write ; loop --> 144 0 00004F2C FC cld 146 0 00004F2D 29FB sub bx, di 0 00004F2F 89D9 mov cx, bx 0 00004F31 89FE mov si, di 0 00004F33 46 inc si 151 0 00004F34 BF[0000] mov di, line_out 153 0 00004F37 803C5F cmp byte [si], '_' 0 00004F3A 7502 jne @F 0 00004F3C 46 inc si 0 00004F3D 49 dec cx 158 ; never need to loop because next digit is always a digit 159 160 @@: 0 00004F3E F3A4 rep movsb ; overlapping! 162 0 00004F40 89EC5D lleave 0 00004F43 EB7A jmp short .putsline_crlf 165 166 167 .error: 0 00004F45 E9[0000] jmp error 169 170 171 .normal: 0 00004F48 BA[0000] mov dx, msg.as 0 00004F4B E8[0000] call isstring? 0 00004F4E 7536 jne .not_as 175 176 .as: 0 00004F50 E8[0000] call skipcomma 0 00004F53 4E dec si 0 00004F54 E8[0000]EB02[0000] nearcall get_length_keyword 0 00004F5B AC lodsb 0 00004F5C 75E7 jne short .error 0 00004F5E E8D700 call .compute 0 00004F61 E308 jcxz @FF 184 @@: 0 00004F63 D1E2 shl dx, 1 0 00004F65 D1D3 rcl bx, 1 0 00004F67 72DC jc short .error 0 00004F69 E2F8 loop @B 189 @@: 0 00004F6B E80E01 call .storeresult 191 0 00004F6E B400 mov ah, 0 0 00004F70 53 push bx 0 00004F71 52 push dx 0 00004F72 E8CE00 call .store 196 0 00004F75 B82020 mov ax, (32 << 8) | 32 0 00004F78 AB stosw 0 00004F79 58 pop ax 0 00004F7A 5A pop dx 0 00004F7B B90100 mov cx, 1 ; cx = 1, multiplier 0 00004F7E BB0900 mov bx, 5+4 ; bx = 5+4, width 0 00004F81 E8[0000] call disp_dxax_times_cx_width_bx_size.store 0 00004F84 EB39 jmp short .putsline_crlf 205 206 207 .not_as: 0 00004F86 AC lodsb 0 00004F87 56 push si 0 00004F88 50 push ax 0 00004F89 800E[0000]01 or byte [hhflag], 1 ; set flag so no operator means add 212 %if _HHDIVREMAIN 0 00004F8E C606[0000]00 mov byte [hh_div_active], 0 214 %endif 0 00004F93 E8A200 call .compute 0 00004F96 58 pop ax 0 00004F97 5E pop si 0 00004F98 E8E100 call .storeresult 0 00004F9B F606[0000]04 test byte [hhflag], 4 ; any two-fold operation ? 0 00004FA0 7420 jz .single_and_div ; no --> 0 00004FA2 8A26[0100] mov ah, byte [options2 + 1] 0 00004FA6 80E410 and ah, opt2_hh_compat >> 8 0 00004FA9 E8AC00 call .store2 ; display "FFFFFFFF (-0001)" 0 00004FAC 50 push ax 0 00004FAD B82020 mov ax, 32<<8|32 0 00004FB0 AB stosw 0 00004FB1 58 pop ax 0 00004FB2 50 push ax 0 00004FB3 800E[0000]02 or byte [hhflag], 2 ; set flag so no operator means sub 0 00004FB8 E87D00 call .compute 0 00004FBB 58 pop ax 0 00004FBC E89900 call .store2 ; display "FFFFFFFF (-0001)" 233 .putsline_crlf: 0 00004FBF E9[0000] jmp putsline_crlf 235 236 .single_and_div: 237 %if _HHDIVREMAIN 0 00004FC2 D006[0000] rol byte [hh_div_active], 1 0 00004FC6 7331 jnc .single 240 0 00004FC8 E82E00 call .single 242 0 00004FCB BF[0000] mov di, line_out 0 00004FCE BE[0000] mov si, msg.hh_div_remainder 0 00004FD1 E8[0000] call copy_single_counted_string 246 0 00004FD4 8B16[0000] mov dx, word [hh_div_divisor] 0 00004FD8 8B1E[0200] mov bx, word [hh_div_divisor + 2] 0 00004FDC FF36[0200] push word [hh_div_dividend + 2] 0 00004FE0 FF36[0000] push word [hh_div_dividend] 0 00004FE4 8F06[0000] pop word [hhvar] 0 00004FE8 8F06[0200] pop word [hhvar + 2] 0 00004FEC 31C0 xor ax, ax 0 00004FEE 8826[0000] mov byte [hhtype], ah 0 00004FF2 E8[0000]EB02[0000] nearcall of_modulo 256 %endif 257 258 .single: 0 00004FF9 B400 mov ah, 0 0 00004FFB 53 push bx 0 00004FFC 52 push dx 0 00004FFD E85800 call .store2 263 0 00005000 B82020 mov ax, (32 << 8) | 32 0 00005003 AB stosw 0 00005004 B86465 mov ax, "de" 0 00005007 AB stosw 0 00005008 B86369 mov ax, "ci" 0 0000500B AB stosw 0 0000500C B86D61 mov ax, "ma" 0 0000500F AB stosw 0 00005010 B86C3A mov ax, "l:" 0 00005013 AB stosw 0 00005014 B020 mov al, 32 0 00005016 AA stosb 0 00005017 58 pop ax 0 00005018 5A pop dx 0 00005019 E8[0000] call decdword 0 0000501C 85D2 test dx, dx ; result negative ? 0 0000501E 7916 jns @F ; no --> 0 00005020 50 push ax 0 00005021 B82028 mov ax, " (" 0 00005024 AB stosw 0 00005025 B02D mov al, "-" 0 00005027 AA stosb 0 00005028 58 pop ax 0 00005029 F7DA neg dx 0 0000502B F7D8 neg ax 0 0000502D 83DA00 sbb dx, byte 0 ; neg bx:dx 0 00005030 E8[0000] call decdword 0 00005033 B029 mov al, ")" 0 00005035 AA stosb 293 @@: 0 00005036 EB87 jmp .putsline_crlf 295 296 297 .compute: 0 00005038 E8[0000]EB02[0000] nearcall getdword 0 0000503F E8[0000] call chkeol ; expect end of line here 300 .comp_ret: 0 00005042 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 00005043 50 push ax 0 00005044 84E4 test ah, ah 0 00005046 7509 jnz .store_nothigh 0 00005048 85DB test bx, bx 0 0000504A 7405 jz .store_nothigh ; no need to display 32-bit value 0 0000504C 89D8 mov ax, bx 0 0000504E E8[0000] call hexword 315 .store_nothigh: 0 00005051 89D0 mov ax, dx 0 00005053 E8[0000] call hexword 0 00005056 58 pop ax 0 00005057 C3 retn 320 321 .store2: 0 00005058 E8E8FF call .store 0 0000505B 50 push ax 0 0000505C 84E4 test ah, ah 0 0000505E 751A jnz .store2_ret 0 00005060 85DB test bx, bx ; result negative ? 0 00005062 7916 jns .store2_ret ; no --> 0 00005064 B82028 mov ax, " (" 0 00005067 AB stosw 0 00005068 B02D mov al, "-" 0 0000506A AA stosb 0 0000506B F7DB neg bx 0 0000506D F7DA neg dx 0 0000506F 83DB00 sbb bx, byte 0 ; neg bx:dx 0 00005072 58 pop ax 0 00005073 50 push ax 0 00005074 E8CCFF call .store 0 00005077 B029 mov al, ")" 0 00005079 AA stosb 340 .store2_ret: 0 0000507A 58 pop ax 0 0000507B C3 retn 343 344 345 .storeresult: 0 0000507C 8916[0000] mov word [hhresult], dx 0 00005080 891E[0200] mov word [hhresult + 2], bx 0 00005084 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 000026AC 00000000 hhresult: dd 0 === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 000026B0 ???????? eldhSignature: resb 4 ; "ELD1" 0 000026B4 ?????? resb 3 ; reserved 0 000026B7 ?? resb 1 ; 26 (Ctrl-Z) 0 000026B8 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 000026BC ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000026BE ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000026C0 ???????? eldhDataOffset: resd 1 0 000026C4 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000026C6 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000026C8 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000026CA ???????? eldhReserved: resb 4 ; reserved 0 000026CE ???? 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 000026D0 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000026D4 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000026D8 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000026DC ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 000026B0 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 000026B8 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 000026BC ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000026BE ???? 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 000026B0 ???? 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 000026B2 ???? eldltAmount: resw 1 0 000026B4 ???????? 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 000026B0 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 000026B2 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 000026B4 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 000026B6 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 000026B8 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000026C0 ???? 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 000026B0 ???? eldlSignature: resw 1 ; 0E1D1h 0 000026B2 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 000026B4 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 000026B6 ???? eldlUseLinkHash: resw 1 0 000026B8 ???? eldlDataAmount: resw 1 0 000026BA ???? eldlDataPrefixes: resw 1 0 000026BC ???? eldlDataEntries: resw 1 0 000026BE ???? eldlDataAddresses: resw 1 0 000026C0 ???? eldlCodeAmount: resw 1 0 000026C2 ???? eldlCodePrefixes: resw 1 0 000026C4 ???? eldlCodeEntries: resw 1 0 000026C6 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 000026C8 ???? eldlDualAmount: resw 1 0 000026CA ???? eldlDualPrefixes: resw 1 0 000026CC ???? eldlDualEntries: resw 1 0 000026CE ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 000026B0 ???? ifKeyword: resw 1 0 000026B2 ???? ifDescription: resw 1 0 000026B4 ???? ifOptions: resw 1 0 000026B6 ???? ifValue: resw 1 0 000026B8 ???? ifTrying: resw 1 0 000026BA ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 000026B0 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 000026B4 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 000026B8 ???? smName1: resw 1 ; -> first string part 0 000026BA ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 000026BC ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 000026BE ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 000026C0 ???? smBaseNext: resw 1 0 000026C2 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 000026C4 ???? smSpecialNext: resw 1 0 000026C6 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 000026B0 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 000026B1 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 000026B2 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 000026B0 ???? shHash: resw 1 ; hash value 0 000026B2 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 000026B0 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 000026B4 ???? xmsmSourceHandle: resw 1 0 000026B6 ???????? xmsmSourceAddress: resd 1 0 000026BA ???? xmsmDestHandle: resw 1 0 000026BC ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 00005086 B44F mov ah, 'O' 0 00005088 BB[0800] mov bx, .tab 0 0000508B E92102 jmp ii.common 33 34 35 align 2, db 0 36 .tab: 0 0000508E [0E00][1C00][2A00] dw .byte, .word, .dword 38 39 40 .byte: 0 00005094 E8[0000]EB02[0000] nearcall getbyte ; read value from command line 0 0000509B E8[0000] call chkeol ; expect end of line here 0 0000509E 92 xchg ax, dx ; al = value 0 0000509F 5A pop dx ; recover port number 0 000050A0 EE out dx, al ; send 0 000050A1 C3 retn 47 48 .word: 0 000050A2 E8[0000]EB02[0000] nearcall getword 0 000050A9 E8[0000] call chkeol 0 000050AC 92 xchg ax, dx ; ax = value 0 000050AD 5A pop dx 0 000050AE EF out dx, ax 0 000050AF C3 retn 55 56 .dword: 57 [cpu 386] 0 000050B0 E8[0000]EB02[0000] nearcall getdword 0 000050B7 E8[0000] call chkeol ; expect end of line here 0 000050BA 53 push bx 0 000050BB 52 push dx 0 000050BC 6658 pop eax ; eax = value 0 000050BE 5A pop dx 0 000050BF 66EF out dx, eax 0 000050C1 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 000050C2 16 push ss 0 000050C3 07 pop es 0 000050C4 8B3E[0000] mov di, word [if_exists_si] 0 000050C8 8B0E[0000] mov cx, word [if_exists_length] 0 000050CC 8B36[0000] mov si, word [if_exists_sp] 0 000050D0 F3A4 rep movsb 0 000050D2 8B0E[0000] mov cx, word [if_exists_length] 0 000050D6 41 inc cx 0 000050D7 80E1FE and cl, ~1 28 <1> 0 000050DA 8B36[0000] mov si, word [if_exists_then_address] 0 000050DE 85F6 test si, si 0 000050E0 740A jz .error 0 000050E2 4E dec si 0 000050E3 BA[0000] mov dx, msg.then 0 000050E6 E8[0000] call isstring? 0 000050E9 7501 jne .error 0 000050EB C3 retn 37 <1> 38 <1> .error: 0 000050EC B84901 mov ax, 0149h 0 000050EF E8[0000] call setrc 0 000050F2 E9[0000] jmp error 42 <1> 43 <1> if_exists_not_found: 0 000050F5 E8CAFF call if_exists_check 45 <1> %if _EXTENSIONS 0 000050F8 E8[0000] call close_ext 47 <1> %endif 0 000050FB F606[0000]40 testopt [internalflags3], dif3_if_not 0 00005100 7519 jnz if_exists_condition_met 50 <1> if_exists_condition_not_met: 0 00005102 E9[0000] jmp cmd3 52 <1> 53 <1> %if _EXTENSIONS 54 <1> if_exists_found_ext_open: 0 00005105 16 push ss 0 00005106 07 pop es 0 00005107 E8[0000] call close_ext 0 0000510A EB05 jmp @F 59 <1> %endif 60 <1> 61 <1> if_exists_found_open: 0 0000510C 16 push ss 0 0000510D 07 pop es 0 0000510E E8[0000] call getline_close_file 65 <1> 66 <1> @@: 67 <1> if_exists_found_closed: 0 00005111 E8AEFF call if_exists_check 0 00005114 F606[0000]40 testopt [internalflags3], dif3_if_not 0 00005119 75E7 jnz if_exists_condition_not_met 71 <1> if_exists_condition_met: 0 0000511B 8B26[0000] mov sp, word [if_exists_sp] 0 0000511F 01CC add sp, cx 74 <1> .numeric: 0 00005121 E8[0000] call skipcomma 0 00005124 5A pop dx ; discard near return address 0 00005125 8026[0300]E7 clropt [internalflags3], dif3_in_if | dif3_auxbuff_guarded_1 0 0000512A 4E dec si 0 0000512B 56 push si 0 0000512C 31C9 xor cx, cx 81 <1> @@: 0 0000512E 41 inc cx 0 0000512F AC lodsb 0 00005130 E8[0000] call iseol?.notsemicolon 0 00005133 75F9 jne @B ; cx = length including CR 0 00005135 5E pop si 0 00005136 BF[0100] mov di, line_in + 1 0 00005139 88C8 mov al, cl 0 0000513B 48 dec ax ; al = length excluding CR 0 0000513C AA stosb ; store 91 <1> %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 0000513D B306 mov bl, 6 0 0000513F 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 00005140 E8[0000] call transfer_to_ext_puts_getline 0 00005143 91 xchg ax, cx 104 <1> %endif 0 00005144 F3A4 rep movsb ; move down 0 00005146 BE[0200] mov si, line_in + 2 0 00005149 AC lodsb ; al = first text byte 0 0000514A E9[0000] jmp cmd3_injected 109 <1> %endif 110 <1> 111 <1> 112 <1> ; IF command -- conditional 113 <1> ii: 0 0000514D 89F2 mov dx, si 0 0000514F 50 push ax 0 00005150 8B44FE mov ax, [si - 2] 0 00005153 25DFDF and ax, TOUPPER_W 0 00005156 3D4946 cmp ax, "IF" 0 00005159 58 pop ax 0 0000515A 7403E93A01 jne .not_if 121 <1> 0 0000515F E8[0000] call skipcomma 0 00005162 E8[0000]EB02[0000] nearcall isoperator? 0 00005169 7517 jne .if 0 0000516B 89CB mov bx, cx 0 0000516D 01DB add bx, bx ; bh = 0 ! 0 0000516F 50 push ax 0 00005170 E8[0000]EB02[0000] nearcall ..@call_operator_dispatchers 0 00005177 58 pop ax 0 00005178 85DB test bx, bx 0 0000517A 7403E91A01 jnz .not_if 0 0000517F E8[0000] call skipcomma 133 <1> .if: 0 00005182 8026[0000]BF clropt [internalflags3], dif3_if_not 0 00005187 4E dec si 0 00005188 BA[0000] mov dx, msg.not 0 0000518B E8[0000] call isstring? 0 0000518E AC lodsb 0 0000518F 7508 jne @F 0 00005191 E8[0000] call skipcomm0 0 00005194 800E[0000]40 setopt [internalflags3], dif3_if_not 142 <1> 143 <1> @@: 144 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00005199 4E dec si 0 0000519A BA[0000] mov dx, msg.exists 0 0000519D E8[0000] call isstring? 0 000051A0 AC lodsb 0 000051A1 7571 jne .if_numeric 0 000051A3 E8[0000] call skipcomm0 0 000051A6 4E dec si 0 000051A7 BA[0000] mov dx, msg.r 0 000051AA E8[0000] call isstring? 0 000051AD 7503E99500 je .is_variable 0 000051B2 C606[0000]00 mov byte [yy_is_script], 0 156 <1> %if _EXTENSIONS 0 000051B7 BA[0000] mov dx, msg.ext 0 000051BA E8[0000] call isstring? 0 000051BD 740F je .is_ext 160 <1> %endif 0 000051BF F616[0000] not byte [yy_is_script] 0 000051C3 BA[0000] mov dx, msg.y 0 000051C6 E8[0000] call isstring? 0 000051C9 7403E9[0000] jne error 165 <1> .is_ext: 0 000051CE E8[0000] call skipcomma 167 <1> 0 000051D1 4E dec si 0 000051D2 8936[0000] mov word [if_exists_si], si 0 000051D6 89F3 mov bx, si 171 <1> @@: 0 000051D8 AC lodsb 0 000051D9 E8[0000] call iseol?.notsemicolon 0 000051DC 75FA jne @B 0 000051DE 89F1 mov cx, si ; -> after EOL byte 0 000051E0 29D9 sub cx, bx ; = length including EOL 0 000051E2 890E[0000] mov word [if_exists_length], cx 0 000051E6 41 inc cx ; round up 0 000051E7 80E1FE and cl, ~1 ; make even 0 000051EA 29CC sub sp, cx 0 000051EC 8926[0000] mov word [if_exists_sp], sp 0 000051F0 89E7 mov di, sp 0 000051F2 89DE mov si, bx 0 000051F4 D1E9 shr cx, 1 0 000051F6 F3A5 rep movsw 186 <1> 0 000051F8 89DE mov si, bx 0 000051FA AC lodsb 0 000051FB 8326[0000]00 and word [if_exists_then_address], 0 0 00005200 800E[0300]08 setopt [internalflags3], dif3_in_if 0 00005205 D006[0000] rol byte [yy_is_script], 1 0 00005209 7303 jnc @F 0 0000520B E8[0000] call guard_re 194 <1> @@: 0 0000520E E8[0000] call yy_or_ext_no_guard_re 0 00005211 E9[0000] jmp error 197 <1> %endif 198 <1> 199 <1> .if_numeric: 0 00005214 E8[0000]EB02[0000] nearcall getexpression 0 0000521B E8[0000]EB02[0000] nearcall toboolean 0 00005222 E8[0000] call skipcomm0 0 00005225 89D3 mov bx, dx 204 <1> .if_bx: 0 00005227 BA[0000] mov dx, msg.then 0 0000522A 4E dec si 0 0000522B E8[0000] call isstring? 0 0000522E 7403E9[0000] jne error 209 <1> .if_bx_after_then: 0 00005233 F606[0000]40 testopt [internalflags3], dif3_if_not 0 00005238 7403 jz @F 0 0000523A 80F301 xor bl, 1 213 <1> @@: 0 0000523D 85DB test bx, bx 0 0000523F 7403 jz .if_false 0 00005241 E9DDFE jmp if_exists_condition_met.numeric 217 <1> 218 <1> .if_false: 0 00005244 E9[0000] jmp resetrc 220 <1> 221 <1> 222 <1> .is_variable: 0 00005247 E8[0000] call skipcomma 0 0000524A 56 push si 0 0000524B E8[0000]EB02[0000] nearcall isvariable? 0 00005252 5F pop di ; - 1 -> start of candidate variable name 0 00005253 7212 jc .skipvariablename ; not valid, go to skip --> (si unchanged) 228 <1> 0 00005255 BB0100 mov bx, 1 ; prepare valid variable return 0 00005258 4E dec si 0 00005259 E8[0000] call skipcomma 0 0000525C BA[0000] mov dx, msg.then 0 0000525F 4E dec si 0 00005260 E8[0000] call isstring? ; keyword as expected ? 0 00005263 74CE je .if_bx_after_then ; yes, handle THEN command --> 0 00005265 89FE mov si, di ; reset - 1 -> start of name 237 <1> 238 <1> .skipvariablename: 0 00005267 4E dec si ; -> start of name 240 <1> @@: 0 00005268 AC lodsb 0 00005269 3C20 cmp al, 32 ; end of name ? 0 0000526B 7424 je @F 0 0000526D 3C09 cmp al, 9 0 0000526F 7420 je @F 0 00005271 3C2C cmp al, ',' 0 00005273 741C je @F 0 00005275 E8[0000] call iseol? 0 00005278 7417 je @F ; yes --> 0 0000527A 3C28 cmp al, '(' ; parens (index expression) ? 0 0000527C 75EA jne @B ; no, loop --> 0 0000527E E8[0000] call skipwhite 0 00005281 E8[0000]EB02[0000] nearcall getexpression ; parse index expression (must be valid) 0 00005288 3C29 cmp al, ')' ; closing parens ? 0 0000528A 7403E9[0000] jne error ; no, error --> 0 0000528F EBD7 jmp @B ; loop --> 257 <1> 258 <1> @@: 0 00005291 31DB xor bx, bx ; prepare invalid variable return 260 <1> .if_bx_comma: 0 00005293 4E dec si 0 00005294 E8[0000] call skipcomma 0 00005297 EB8E jmp .if_bx ; check for the THEN keyword --> 70 ; I command - input from I/O port. 71 .not_if: 0 00005299 89D6 mov si, dx 0 0000529B 4E dec si 0 0000529C 4E dec si 0 0000529D BA[0000] mov dx, msg.install 0 000052A0 E8[0000] call isstring? 0 000052A3 AC lodsb 78 %if _LINK_COMPAT 0 000052A4 7503 jne @F 0 000052A6 E9[0000] jmp strict near install 81 @@: 82 %else 83 je install 84 %endif 0 000052A9 AC lodsb 86 0 000052AA B449 mov ah, 'I' 0 000052AC BB[6002] 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 000052AF 50 push ax 0 000052B0 E8[0000] call capitalise 0 000052B3 3C57 cmp al, 'W' 0 000052B5 7507 jne .notw 98 .incbx2: 0 000052B7 43 inc bx 0 000052B8 43 inc bx ; use word handler 0 000052B9 E8[0000] call skipwhite ; skip the 'W' til next character 0 000052BC EB12 jmp short .sizeset 103 104 .notw: 0 000052BE 3C44 cmp al, 'D' 0 000052C0 750E jne .sizeset 107 %if 1 0 000052C2 3264FE xor ah, byte [si-2] 0 000052C5 7405 jz .d ; "Id" or "Od" --> (uppercase command) 0 000052C7 80F420 xor ah, 32 0 000052CA 7504 jnz .sizeset ; no space is allowed between the command and 'D' --> 112 ; "id" or "od" here (lowercase command) 113 .d: 114 %endif 0 000052CC 43 _386 inc bx 0 000052CD 43 _386 inc bx ; use dword handler 0 000052CE 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 000052D0 E8[0000]EB02[0000] nearcall getword ; get port 0 000052D7 59 pop cx ; restore letter if necessary 0 000052D8 80FD49 cmp ch, 'I' ; check whether I or O 0 000052DB 7504 jne .o ; O --> 0 000052DD E8[0000] call chkeol ; expect end of line here for I commands 0 000052E0 A8 db __TEST_IMM8 ; (skip push) 126 .o: 0 000052E1 52 push dx ; save port number for O commands 0 000052E2 2EFF27 jmp near [cs:bx] 129 130 0 000052E5 00 align 2, db 0 132 .tab: 0 000052E6 [6602][6C02][7302] dw .byte, .word, .dword 134 135 .byte: 0 000052EC EC in al, dx 0 000052ED E8[0000] call hexbyte 0 000052F0 EB04 jmp short .done 139 140 .word: 0 000052F2 ED in ax, dx 142 .doneword: 0 000052F3 E8[0000] call hexword 144 .done: 0 000052F6 E9[0000] jmp putsline_crlf 146 147 .dword: 148 [cpu 386] 0 000052F9 66ED in eax, dx 0 000052FB E8[0000] call hexword_high 151 __CPU__ 0 000052FE EBF3 jmp short .doneword 153 154 0 00005300 E9[0000] errorj5:jmp error === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 000026B0 ???????? eldhSignature: resb 4 ; "ELD1" 0 000026B4 ?????? resb 3 ; reserved 0 000026B7 ?? resb 1 ; 26 (Ctrl-Z) 0 000026B8 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 000026BC ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 000026BE ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000026C0 ???????? eldhDataOffset: resd 1 0 000026C4 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000026C6 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000026C8 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000026CA ???????? eldhReserved: resb 4 ; reserved 0 000026CE ???? 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 000026D0 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000026D4 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000026D8 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000026DC ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 000026B0 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 000026B8 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 000026BC ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 000026BE ???? 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 000026B0 ???? 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 000026B2 ???? eldltAmount: resw 1 0 000026B4 ???????? 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 000026B0 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 000026B2 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 000026B4 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 000026B6 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 000026B8 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000026C0 ???? 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 000026B0 ???? eldlSignature: resw 1 ; 0E1D1h 0 000026B2 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 000026B4 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 000026B6 ???? eldlUseLinkHash: resw 1 0 000026B8 ???? eldlDataAmount: resw 1 0 000026BA ???? eldlDataPrefixes: resw 1 0 000026BC ???? eldlDataEntries: resw 1 0 000026BE ???? eldlDataAddresses: resw 1 0 000026C0 ???? eldlCodeAmount: resw 1 0 000026C2 ???? eldlCodePrefixes: resw 1 0 000026C4 ???? eldlCodeEntries: resw 1 0 000026C6 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 000026C8 ???? eldlDualAmount: resw 1 0 000026CA ???? eldlDualPrefixes: resw 1 0 000026CC ???? eldlDualEntries: resw 1 0 000026CE ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 000026B0 ???? ifKeyword: resw 1 0 000026B2 ???? ifDescription: resw 1 0 000026B4 ???? ifOptions: resw 1 0 000026B6 ???? ifValue: resw 1 0 000026B8 ???? ifTrying: resw 1 0 000026BA ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 000026B0 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 000026B4 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 000026B8 ???? smName1: resw 1 ; -> first string part 0 000026BA ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 000026BC ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 000026BE ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 000026C0 ???? smBaseNext: resw 1 0 000026C2 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 000026C4 ???? smSpecialNext: resw 1 0 000026C6 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 000026B0 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 000026B1 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 000026B2 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 000026B0 ???? shHash: resw 1 ; hash value 0 000026B2 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 000026B0 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 000026B4 ???? xmsmSourceHandle: resw 1 0 000026B6 ???????? xmsmSourceAddress: resd 1 0 000026BA ???? xmsmDestHandle: resw 1 0 000026BC ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 18 %endif 19 20 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 === Switch to base=01F580h -> "LDEBUG_CODE2" 30 ------------------ note: usesection lDEBUG_CODE2 31 section_of immasm_relocated 32 33 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 33 ------------------ note: usesection lDEBUG_CODE 0 00005303 E8[0000]EB02[0000] dualcall immasm_relocated 35 36 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 36 ------------------ note: usesection lDEBUG_CODE2 37 38 dualfunction 39 immasm_relocated: section_of_function 40 %endif 0 00001955 E8[0000]EB02[0000] nearcall skipwhite 0 0000195C E8[0000]EB02[0000] nearcall iseol? 0 00001963 7503E9F802 je .ret 0 00001968 C606[4A00]00 mov byte [ ia_exec ], 0 0 0000196D 3C2E cmp al, '.' ; second dot ? 0 0000196F 750B jne .nodot ; no --> 0 00001971 FE06[4A00] inc byte [ ia_exec ] ; note it 0 00001975 E8[0000]EB02[0000] nearcall skipwhite ; skip it 49 .nodot: 0 0000197C 3C2C cmp al, ',' ; comma ? 0 0000197E 750C jne .nocomma ; no --> 0 00001980 800E[4A00]80 or byte [ ia_exec ], 80h ; note it 0 00001985 E8[0000]EB02[0000] nearcall skipwhite ; skip it 54 .nocomma: 0 0000198C E8[0000]EB02[0000] nearcall iseol? 0 00001993 7503E9CB00 je .ret_e ; empty --> 57 58 %if _IMMASM_AUXBUFF 59 nearcall guard_auxbuff 60 %endif 61 0 00001998 50 push ax 0 00001999 56 push si 64 0 0000199A BE[0000] mov si, a_addr 0 0000199D BF[2000] mov di, ia_savedaddr 0 000019A0 A5 movsw 0 000019A1 A5 movsw 0 000019A2 A5 movsw ; save A command address 0 000019A3 C706[4600][0E00] mov word [ ia_restore ], ia_restore_a_addr 71 0 000019A9 06 push es 0 000019AA E80403 call getimmselseg 0 000019AD 31FF xor di, di 0 000019AF 891E[0400] mov word [ a_addr+4 ], bx 0 000019B3 8326[0200]00 _386_PM and word [ a_addr+2 ], byte 0 0 000019B8 893E[0000] mov word [ a_addr+0 ], di ; initialize address 78 79 %if _PM 0 000019BC 53 push bx 0 000019BD E8[0000]EB02[0000] nearcall verifysegm_or_error 82 %endif 0 000019C4 8EC3 mov es, bx 0 000019C6 B92000 mov cx, immasm_length 0 000019C9 B0CC mov al, 0CCh 0 000019CB F3AA rep stosb ; initialize buffer 87 %if _PM 0 000019CD 5B pop bx 89 %endif 0 000019CE 07 pop es 91 0 000019CF 5E pop si 0 000019D0 58 pop ax 0 000019D1 C706[0000][0700] mov word [ aa_ret ], .aa_ret ; make assembler return here 0 000019D7 8926[4800] mov word [ ia_sp ], sp ; (possibly unnecessary) 96 97 %if _PM 0 000019DB C606[0000]00 mov byte [ bCSAttr ], 0 0 000019E0 E8[0000]EB02[0000] nearcall test_d_b_bit 0 000019E7 7405 jz .16 0 000019E9 C606[0000]40 mov byte [ bCSAttr ], 40h 102 .16: 103 %endif 104 0 000019EE 800E[0300]02 setopt [internalflags6], dif6_immasm 0 000019F3 8026[0300]F3 clropt [internalflags6], dif6_immasm_rel8 | dif6_immasm_faroffset 107 %if _DUALCODE 0 000019F8 E8[0000]EB02[0000] dualcall aa_imm_entry 109 110 section_of immasm_relocated.aa_ret_relocated 111 112 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 112 ------------------ note: usesection lDEBUG_CODE 113 .aa_ret: 0 0000530A E8[0000]EB02[AA00] dualcall immasm_relocated.aa_ret_relocated 115 116 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 116 ------------------ note: usesection lDEBUG_CODE2 117 .aa_ret_relocated: 118 %else 119 jmp aa_imm_entry 120 121 .aa_ret: 122 %endif 0 000019FF 8B26[4800] mov sp, word [ ia_sp ] 0 00001A03 16 push ss 0 00001A04 1F pop ds 0 00001A05 16 push ss 0 00001A06 07 pop es 128 129 ; dwo [a_addr] - dwo [ia_savedaddr] = len of opcode 130 0 00001A07 E8[0000]EB02[0E00] nearcall ia_restore_a_addr 132 133 ; for now, disassemble the result 0 00001A0E BE[0000] mov si, u_addr 0 00001A11 BF[2000] mov di, ia_savedaddr 0 00001A14 A5 movsw 0 00001A15 A5 movsw 0 00001A16 A5 movsw ; save U command address 0 00001A17 C706[4600][3800] mov word [ ia_restore ], ia_restore_u_addr 140 0 00001A1D E89102 call getimmselseg 0 00001A20 891E[0400] mov word [ u_addr+4 ], bx 0 00001A24 8326[0200]00 _386_PM and word [ u_addr+2 ], byte 0 0 00001A29 8326[0000]00 and word [ u_addr+0 ], byte 0 ; initialize address 145 0 00001A2E F606[0300]02 testopt [options6], opt6_immasm_display_uu 0 00001A33 7505 jnz @F 0 00001A35 800E[0300]01 setopt [internalflags6], dif6_immasm_no_output 149 @@: 150 0 00001A3A C706[0000]0200 mov word [disflags], DIS_F_SHOW 0 00001A40 E8[0000]EB02[0000] nearcall disasm 0 00001A47 8026[0300]FE clropt [internalflags6], dif6_immasm_no_output 154 0 00001A4C 16 push ss 0 00001A4D 1F pop ds 0 00001A4E 16 push ss 0 00001A4F 07 pop es 159 0 00001A50 E8[0000]EB02[3800] nearcall ia_restore_u_addr 161 0 00001A57 F606[0300]08 testopt [options6], opt6_immasm_flag 0 00001A5C 740A jz @F 0 00001A5E F606[4A00]01 test byte [ ia_exec ], 1 ; test execution ? 165 .ret_e: 0 00001A63 7503E9F801 jz .ret ; no --> 167 @@: 168 0 00001A68 BE[0000] mov si, reg_eip 0 00001A6B BF[2600] mov di, ia_savedcseip 0 00001A6E A5 movsw 0 00001A6F A5 _386_PM movsw 0 00001A70 BE[0000] mov si, reg_cs 0 00001A73 A5 movsw ; save CS:(E)IP 0 00001A74 A1[0000] mov ax, word [reg_ds] 0 00001A77 A3[4000] mov word [immasm_save_ds], ax ; unconditionally store ds 177 0 00001A7A 8326[4200]00 and word [immasm_temp], 0 0 00001A7F 803E[0000]01 cmp byte [segmnt], 1 0 00001A84 7538 jne .not_cs_prefix 0 00001A86 FF06[4200] inc word [immasm_temp] ; flag used by .lds 0 00001A8A C606[0000]03 mov byte [segmnt], 3 0 00001A8F C706[4600][3D00] mov word [ ia_restore ], ia_restore_ds 0 00001A95 A1[0000] mov ax, word [reg_cs] 0 00001A98 A3[0000] mov word [reg_ds], ax 0 00001A9B E81302 call getimmselseg 0 00001A9E 8EC3 mov es, bx 0 00001AA0 31FF xor di, di 0 00001AA2 B02E mov al, 2Eh 0 00001AA4 B92000 mov cx, immasm_length 0 00001AA7 F2AE repne scasb 0 00001AA9 7403E9[0000] jne error_mirror 193 %if _PM 0 00001AAE E8[0000]EB02[0000] nearcall verifysegm_or_error 0 00001AB5 8EC3 mov es, bx 196 %endif 0 00001AB7 26C645FF3E mov byte [es:di - 1], 3Eh 0 00001ABC 16 push ss 0 00001ABD 07 pop es 200 201 .not_cs_prefix: 0 00001ABE A1[0000] mov ax, word [index] 0 00001AC1 BF[4C00] mov di, immasm_special_indices 0 00001AC4 B91200 mov cx, immasm_special_indices.amount 0 00001AC7 F2AF repne scasw 0 00001AC9 7403E9B200 jne .notspecial 0 00001ACE F606[0300]04 testopt [options6], opt6_immasm_debug 0 00001AD3 7414 jz @F 0 00001AD5 8B5522 mov dx, word [di - (immasm_special_indices. + 2) + immasm_special_indices.names] 0 00001AD8 E8[0000]EB02[0000] nearcall putsz 0 00001ADF BA[0000] mov dx, crlf 0 00001AE2 E8[0000]EB02[0000] nearcall putsz 213 @@: 0 00001AE9 8B5546 mov dx, word [di - (immasm_special_indices. + 2) + immasm_special_indices.functions] 0 00001AEC BF[0000] mov di, line_out 216 0 00001AEF A1[0000] mov ax, word [reg_efl] 0 00001AF2 A3[3A00] mov word [immasm_efl], ax 0 00001AF5 A1[0200] mov ax, word [reg_efl + 2] 0 00001AF8 A3[3C00] mov word [immasm_efl + 2], ax 0 00001AFB A1[4000] mov ax, word [immasm_save_ds] 0 00001AFE A3[3E00] mov word [immasm_ds], ax 0 00001B01 C706[4400][0102] 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 00001B07 FFD2 call dx 0 00001B09 F606[0300]04 testopt [options6], opt6_immasm_debug 0 00001B0E 740F jz @F 0 00001B10 50 push ax 0 00001B11 53 push bx 0 00001B12 51 push cx 0 00001B13 52 push dx 0 00001B14 E8[0000]EB02[0000] nearcall putsline_crlf 0 00001B1B 5A pop dx 0 00001B1C 59 pop cx 0 00001B1D 5B pop bx 0 00001B1E 58 pop ax 242 @@: 0 00001B1F F606[0300]10 testopt [options6], opt6_immasm_nobranch 0 00001B24 7557 jnz .ret_j 0 00001B26 85D2 test dx, dx 0 00001B28 742D jz @F 247 %if _PM 0 00001B2A E8[0000]EB02[0000] nearcall ispm 0 00001B31 750D jnz .error_eip 0 00001B33 53 push bx 0 00001B34 89CB mov bx, cx 0 00001B36 E8[0000]EB02[0000] nearcall test_d_b_bit 0 00001B3D 5B pop bx 0 00001B3E 7517 jnz @F 255 %endif 256 .error_eip: 0 00001B40 BA[0000] mov dx, msg.immasm_error_eip 0 00001B43 E8[0000]EB02[0000] nearcall putsz 0 00001B4A B83201 mov ax, 0132h 0 00001B4D E8[0000]EB02[0000] nearcall setrc 0 00001B54 EB27 jmp .ret_j 262 263 .retn: 0 00001B56 C3 retn 265 266 @@: 0 00001B57 A3[0000] mov word [reg_eip], ax 0 00001B5A 8916[0200] mov word [reg_eip + 2], dx 0 00001B5E 890E[0000] mov word [reg_cs], cx 0 00001B62 66 _386_PM_o32 0 00001B63 891E[0000] mov word [reg_esp], bx 0 00001B67 FF16[4400] call near [immasm_callback] 0 00001B6B A1[3A00] mov ax, word [immasm_efl] 0 00001B6E A3[0000] mov word [reg_efl], ax 0 00001B71 A1[3C00] mov ax, word [immasm_efl + 2] 0 00001B74 A3[0200] mov word [reg_efl + 2], ax 0 00001B77 A1[3E00] mov ax, word [immasm_ds] 0 00001B7A A3[0000] mov word [reg_ds], ax 279 .ret_j: 0 00001B7D E9E000 jmp .ret 281 282 .notspecial: 283 ..@immasm_not_special: 0 00001B80 F606[0300]04 testopt [internalflags6], dif6_immasm_rel8 0 00001B85 7429 jz .exec 286 0 00001B87 8B36[0000] mov si, word [condmsg] 0 00001B8B 85F6 test si, si 0 00001B8D 7406 jz .jumping ; this is an unconditional jump --> 0 00001B8F 81FE[0000] cmp si, msg.condjump ; jumping ? 0 00001B93 7508 jne .exec_if_loop ; no, just decrement (e)cx 292 293 .jumping: 0 00001B95 66 _386_PM_o32 0 00001B96 A1[2C00] mov ax, word [immasm_rel8_target] 0 00001B99 66 _386_PM_o32 0 00001B9A A3[0000] mov word [reg_eip], ax ; update (e)ip with branch target 298 299 .exec_if_loop: 0 00001B9D A1[0000] mov ax, word [index] 0 00001BA0 3DE000 cmp ax, 0E0h 0 00001BA3 7303E9B800 jb .ret 0 00001BA8 3DE200 cmp ax, 0E2h 0 00001BAB 7603E9B000 ja .ret 305 ; decrement (e)cx but keep (e)ip 306 307 .exec: 0 00001BB0 B8[2C00] mov ax, ia_restore_cseip_and_u_addr 0 00001BB3 813E[4600][3D00] cmp word [ ia_restore ], ia_restore_ds 0 00001BB9 7503 jne @F 0 00001BBB B8[2600] mov ax, ia_restore_cseip_and_u_addr_and_ds 312 @@: 0 00001BBE 813E[4600][4500] cmp word [ ia_restore ], ia_restore_es 0 00001BC4 7503 jne @F 0 00001BC6 B8[1E00] mov ax, ia_restore_cseip_and_u_addr_and_es 316 @@: 0 00001BC9 A3[4600] mov word [ ia_restore ], ax 318 0 00001BCC E8E200 call getimmselseg 0 00001BCF 891E[0000] mov word [ reg_cs ], bx 0 00001BD3 8326[0200]00 _386_PM and word [ reg_eip+2 ], byte 0 0 00001BD8 8326[0000]00 and word [ reg_eip+0 ], byte 0 ; initialize address 323 324 325 %if _PM 0 00001BDD E8[0000]EB02[0000] nearcall resetmode 327 %endif 0 00001BE4 BA0F00 mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 0 00001BE7 8B1E[0000] mov bx, word [reg_cs] 0 00001BEB 66 _386_PM_o32 ; mov esi, dword [reg_eip] 0 00001BEC 8B36[0000] mov si, word [reg_eip] 332 .pp2: 0 00001BF0 E8[0000]EB02[0000] nearcall pp16 ; get next instruction byte into AL 0 00001BF7 BF[0000] mov di, ppbytes 0 00001BFA B9[0000] mov cx, PPLEN_ONLY_STRING 336 %if _SYMBOLIC 0 00001BFD A2[0000] mov byte [pp_instruction], al 338 %endif 0 00001C00 F2AE repne scasb 0 00001C02 753E jne .not_p ; if not one of these --> 341 %if _LINK_COMPAT 0 00001C04 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 00001C08 A880 test al, PP_PREFIX ; prefix ? 0 00001C0A 7412 jz .pp3 ; no --> 0 00001C0C 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 00001C0E FECA dec dl 0 00001C10 75DE jnz .pp2 ; if not out of bytes --> 0 00001C12 BA[0000] mov dx, msg.warnprefix 0 00001C15 E8[0000]EB02[0000] nearcall putsz 0 00001C1C EB24 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: 0 00001C1E E8[0000]EB02[0000] _386_PM nearcall pp_fix32bitflags 0 00001C25 A847 test al, PP_VARSIZ | PP_SIZ_MASK 0 00001C27 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: 0 00001C2C E8[0000]EB02[0000] _386_PM nearcall resetmode_and_test_d_b_bit 0 00001C33 7504 _386_PM jnz .32 ; full 32-bit offset valid --> 0 00001C35 660FB7F6 _386_PM movzx esi, si ; clear high word here 387 .32: 0 00001C39 E8[0000]EB02[0000] nearcall proceedbreakpoint ; run until the breakpoint is hit 389 ; This call might return modeswitched. 0 00001C40 EB07 jmp short @F 391 392 .not_p: 0 00001C42 E8[0000]EB02[0000] nearcall traceone ; call common code 394 @@: 395 %if _PM 0 00001C49 E8[0000]EB02[0000] nearcall resetmode 397 %endif 0 00001C50 7211 jc .unexpected ; --> (returns to cmd3) 0 00001C52 F606[0300]04 testopt [options6], opt6_immasm_debug 0 00001C57 7407 jz .ret 0 00001C59 E8[0000]EB02[0000] nearcall dumpregs_no_disasm ; dump registers (only) 402 .ret: 403 %if _DUALCODE 0 00001C60 E9[0000] jmp cmd3_mirror 405 406 .unexpected: 0 00001C63 E8[0000]EB02[0000] dualcall unexpectedinterrupt 408 %else 409 jmp cmd3 410 411 .unexpected: 412 jmp unexpectedinterrupt 413 %endif 414 415 416 417 immasm_run_near: 0 00001C6A 8B1E[0000] mov bx, word [reg_cs] 0 00001C6E 66 _386_PM_o32 0 00001C6F 8B36[0000] mov si, word [reg_eip] 0 00001C73 B20F mov dl, 15 ; number of bytes to go 422 .loop: 0 00001C75 E8[0000]EB02[0000] nearcall pp16 0 00001C7C 3CCB cmp al, 0CBh ; retf ? 0 00001C7E 742F je .trace 0 00001C80 3CCA cmp al, 0CAh ; retf imm16 ? 0 00001C82 742B je .trace 0 00001C84 3CCF cmp al, 0CFh ; iret ? 0 00001C86 7427 je .trace 0 00001C88 BF[0000] mov di, ppbytes 0 00001C8B B9[0000] mov cx, PPLEN_ONLY_PREFIXES 0 00001C8E F2AE repne scasb 0 00001C90 7504 jne .done 434 ; if one of the prefixes 0 00001C92 FECA dec dl 0 00001C94 75DF jnz .loop ; if not out of bytes --> 437 438 ; fall through: do not trace 439 .done: 440 441 immasm_run_far: 0 00001C96 E8[0000]EB02[3D00] nearcall ia_restore_ds 443 0 00001C9D BE[2600] mov si, ia_savedcseip 0 00001CA0 66 _386_PM_o32 0 00001CA1 AD lodsw ; (e)ax = (e)ip 0 00001CA2 66 _386_PM_o32 0 00001CA3 50 push ax 0 00001CA4 AD lodsw ; ax = cs 0 00001CA5 93 xchg bx, ax ; bx = cs 0 00001CA6 66 _386_PM_o32 0 00001CA7 5E pop si ; (e)si = (e)ip 0 00001CA8 E8[0000]EB02[0000] nearcall proceedbreakpoint 454 immasm_run_near.trace: 0 00001CAF EB98 jmp @B 456 457 458 getimmselseg: 0 00001CB1 8B1E[0000] mov bx, word [immseg] 460 %if _PM 0 00001CB5 E8[0000]EB02[0000] nearcall ispm 0 00001CBC 752A jnz .ret 0 00001CBE 51 push cx 0 00001CBF 50 push ax 465 subcpu 286 0 00001CC0 8B1E[0000] mov bx, word [reg_cs] 0 00001CC4 E8[0000]EB02[0000] nearcall test_d_b_bit 0 00001CCB 8B1E[0000] mov bx, word [immsel] 0 00001CCF 740A jz .16 470 .32: 0 00001CD1 0F02CB lar cx, bx 0 00001CD4 C1E908 shr cx, 8 0 00001CD7 B540 mov ch, 40h 0 00001CD9 EB06 jmp .common 475 476 .16: 0 00001CDB 0F02CB lar cx, bx 0 00001CDE C1E908 shr cx, 8 479 .common: 0 00001CE1 B80900 mov ax, 0009h 0 00001CE4 CD31 int 31h 0 00001CE6 58 pop ax 0 00001CE7 59 pop cx 484 subcpureset 485 %endif 486 .ret: 0 00001CE8 C3 retn 488 489 490 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 490 ------------------ note: usesection lDEBUG_CODE 491 ia_restore_a_addr: section_of_function 0 00005311 BF[0000] mov di, a_addr 493 .common_u: 0 00005314 BE[2000] mov si, ia_savedaddr 0 00005317 A5 movsw 0 00005318 A5 movsw 0 00005319 A5 movsw ; restore address 498 ia_restore_reset: 0 0000531A C706[4600][1D00] mov word [ ia_restore ], ia_restore_none 500 ia_restore_none: 0 00005320 C3 retn 502 503 ia_restore_cseip_and_u_addr_and_es: 0 00005321 A1[4000] mov ax, word [immasm_save_es] 0 00005324 A3[0000] mov word [reg_es], ax 0 00005327 EB06 jmp ia_restore_cseip_and_u_addr 507 508 ia_restore_cseip_and_u_addr_and_ds: 0 00005329 A1[4000] mov ax, word [immasm_save_ds] 0 0000532C A3[0000] mov word [reg_ds], ax 511 ia_restore_cseip_and_u_addr: 0 0000532F BF[0000] mov di, reg_eip 0 00005332 BE[2600] mov si, ia_savedcseip 0 00005335 A5 movsw 0 00005336 A5 _386_PM movsw 0 00005337 BF[0000] mov di, reg_cs 0 0000533A A5 movsw 518 519 ia_restore_u_addr: section_of_function 0 0000533B BF[0000] mov di, u_addr 0 0000533E EBD4 jmp short ia_restore_a_addr.common_u 522 523 ia_restore_ds: section_of_function 0 00005340 A1[4000] mov ax, word [immasm_save_ds] 0 00005343 A3[0000] mov word [reg_ds], ax 0 00005346 EBD2 jmp ia_restore_reset 527 528 ia_restore_es: 0 00005348 A1[4000] mov ax, word [immasm_save_es] 0 0000534B A3[0000] mov word [reg_es], ax 0 0000534E EBCA 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 000026B0 00 immasm_buffer: times immasm_length db 0 544 %endif 545 align 2, db 0 0 000026D0 000000000000 ia_savedaddr: dw 0,0,0 ; a_addr or u_addr 0 000026D6 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 000026DC 00000000 dd 0 551 immasm_far_target: 0 000026E0 000000000000 dw 0,0,0 0 000026E6 0000 immasm_imm16: dw 0 0 000026E8 0000 dw 0 ; allow loading as a dword 0 000026EA 00000000 immasm_efl: dd 0 0 000026EE 0000 immasm_ds: dw 0 557 immasm_save_es: ; (not used at the same time) 0 000026F0 0000 immasm_save_ds: dw 0 0 000026F2 0000 immasm_temp: dw 0 0 000026F4 0000 immasm_callback:dw 0 0 000026F6 [1D00] ia_restore: dw ia_restore_none ; called by cmd3 0 000026F8 0000 ia_sp: dw 0 0 000026FA 00 ia_exec: db 0 564 0 000026FB 00 align 2, db 0 566 immasm_special_indices: 567 .: 0 000026FC [0400] dw GROUP7 + 4 ; jmp near r/m 0 000026FE [0500] dw GROUP7 + 5 ; jmp far r/m 0 00002700 [0200] dw GROUP7 + 2 ; call near r/m 0 00002702 [0300] dw GROUP7 + 3 ; call far r/m 0 00002704 E800 dw 00E8h ; call near imm 0 00002706 9A00 dw 009Ah ; call far imm 574 ; dw 00EBh ; not needed: jmp short imm 575 ; dw 00E9h ; not needed: jmp near imm 0 00002708 EA00 dw 00EAh ; jmp far imm 0 0000270A C300 dw 00C3h ; retn 0 0000270C C200 dw 00C2h ; retn imm 0 0000270E CB00 dw 00CBh ; retf 0 00002710 CA00 dw 00CAh ; retf imm 0 00002712 CF00 dw 00CFh ; iret 0 00002714 8E00 dw 008Eh ; mov to ds 0 00002716 8C00 dw 008Ch ; mov from ds, cs 0 00002718 0E00 dw 000Eh ; push cs 0 0000271A 1E00 dw 001Eh ; push ds 0 0000271C 1F00 dw 001Fh ; pop ds 0 0000271E 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 00002720 [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 00002722 [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 00002724 [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 00002726 [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 00002728 [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 0000272A [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 0000272C [FB00] dw %%message 612 immasm_special .rn, "retn" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 0000272E [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 00002730 [0A01] dw %%message 614 immasm_special .rf, "retf" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 00002732 [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 00002734 [1601] dw %%message 616 immasm_special .ir, "iret" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 00002736 [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 00002738 [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 0000273A [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 0000273C [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 0000273E [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 00002740 [4C01] dw %%message 622 immasm_special .lds, "lds" 594 <1> %xdefine IMMASMSPECIALFUNCTIONS IMMASMSPECIALFUNCTIONS, dw %1 595 <1> %xdefine IMMASMSPECIALMESSAGES IMMASMSPECIALMESSAGES, %%message:, {asciz %2} 0 00002742 [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 00002744 [9403][1B04][CD04] immasm_special_dump IMMASMSPECIALFUNCTIONS 0 0000274A [5905][2306][4C06] 0 00002750 [5206][9706][0E07] 0 00002756 [3407][D807][DE07] 0 0000275C [5E08][C908][4F09] 0 00002762 [9A09][9F09][A909] 631 .functions_amount: equ ($ - .functions) / 2 632 633 %if .functions_amount != .amount 634 %error Table mismatch 635 %endif 636 0 00002768 6A6D70206E65617220 immasm_special_dump IMMASMSPECIALMESSAGES 0 00002771 6D006A6D7020666172 0 0000277A 206D0063616C6C206E 0 00002783 656172206D0063616C 0 0000278C 6C20666172206D0063 0 00002795 616C6C206E65617220 0 0000279E 690063616C6C206661 0 000027A7 722069006A6D702066 0 000027B0 61722069007265746E 0 000027B9 007265746E20690072 0 000027C2 657466007265746620 0 000027CB 690069726574006D6F 0 000027D4 7620746F206473006D 0 000027DD 6F762066726F6D2064 0 000027E6 732C20637300707573 0 000027EF 682063730070757368 0 000027F8 20647300706F702064 0 00002801 73006C647300 638 639 640 %if _DUALCODE 641 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 641 ------------------ note: usesection lDEBUG_CODE2 642 %else 643 usesection lDEBUG_CODE 644 %endif 645 .jnm: 0 00001CE9 A0[0000] mov al, byte [regmem] 0 00001CEC 3CC0 cmp al, 1100_0000b 0 00001CEE 7235 jb .jnm_m 0 00001CF0 83E007 and ax, 7 0 00001CF3 89C3 mov bx, ax 0 00001CF5 01DB add bx, bx 0 00001CF7 8B9F[0000] mov bx, word [reg32addr + bx] 0 00001CFB 8B5702 mov dx, [bx + 2] 0 00001CFE 8B07 mov ax, [bx] 655 .jnm_dxax: 0 00001D00 8B0E[0000] mov cx, word [reg_cs] 0 00001D04 F606[0000]10 test byte [presizeflags], PRE32D 0 00001D09 740B jz @F 0 00001D0B 92 xchg ax, dx 0 00001D0C E8[0000]EB02[0000] nearcall hexword 0 00001D13 92 xchg ax, dx 0 00001D14 EB02 jmp @FF 663 @@: 0 00001D16 31D2 xor dx, dx 665 @@: 0 00001D18 E8[0000]EB02[0000] nearcall hexword 0 00001D1F 66 _386_PM_o32 0 00001D20 8B1E[0000] mov bx, word [reg_esp] 0 00001D24 C3 retn 670 671 .jnm_m: 0 00001D25 F606[0000]04 testopt [disflags], DIS_I_SHOW 0 00001D2A 7503E9[0000] jz error_mirror 674 0 00001D2F A0[0000] mov al, [segmnt] ; segment number 0 00001D32 98 cbw 0 00001D33 D1E0 shl ax, 1 0 00001D35 93 xchg ax, bx ; mov bx, ax 0 00001D36 8B9F[0000] mov bx, [segrgaddr + bx]; get address of value 0 00001D3A 8E07 mov es, [bx] 681 0 00001D3C 66 _386_o32 0 00001D3D 8B1E[0000] mov bx, word [addrr] 0 00001D41 F606[0100]08 testopt [disflags], DIS_I_SHOW_A32 0 00001D46 7415 jz @F 0 00001D48 26678A7303 _386 mov dh, [es:ebx + 3] 0 00001D4D 26678A5302 _386 mov dl, [es:ebx + 2] 0 00001D52 26678A6301 _386 mov ah, [es:ebx + 1] 0 00001D57 26678A03 _386 mov al, [es:ebx] 0 00001D5B EB0F _386 jmp @FF 691 692 @@: 0 00001D5D 268A7703 mov dh, [es:bx + 3] 0 00001D61 268A5702 mov dl, [es:bx + 2] 0 00001D65 268A6701 mov ah, [es:bx + 1] 0 00001D69 268A07 mov al, [es:bx] 697 @@: 0 00001D6C 16 push ss 0 00001D6D 07 pop es 0 00001D6E EB90 jmp .jnm_dxax 701 702 703 .jfm: 0 00001D70 A0[0000] mov al, byte [regmem] 0 00001D73 3CC0 cmp al, 1100_0000b 0 00001D75 7203E9[0000] jae error_mirror 707 708 .jfm_m: 0 00001D7A F606[0000]04 testopt [disflags], DIS_I_SHOW 0 00001D7F 7503E9[0000] jz error_mirror 711 0 00001D84 A0[0000] mov al, [segmnt] ; segment number 0 00001D87 98 cbw 0 00001D88 D1E0 shl ax, 1 0 00001D8A 93 xchg ax, bx ; mov bx, ax 0 00001D8B 8B9F[0000] mov bx, [segrgaddr + bx]; get address of value 0 00001D8F 8E07 mov es, [bx] 718 0 00001D91 66 _386_o32 0 00001D92 8B1E[0000] mov bx, word [addrr] 0 00001D96 F606[0100]08 testopt [disflags], DIS_I_SHOW_A32 0 00001D9B 7426 jz @F 0 00001D9D F606[0000]10 _386 test byte [presizeflags], PRE32D 0 00001DA2 740A _386 jz .jfm_m_nocx_32 0 00001DA4 26678A6B05 _386 mov ch, [es:ebx + 5] 0 00001DA9 26678A4B04 _386 mov cl, [es:ebx + 4] 727 .jfm_m_nocx_32: 0 00001DAE 26678A7303 _386 mov dh, [es:ebx + 3] 0 00001DB3 26678A5302 _386 mov dl, [es:ebx + 2] 0 00001DB8 26678A6301 _386 mov ah, [es:ebx + 1] 0 00001DBD 26678A03 _386 mov al, [es:ebx] 0 00001DC1 EB1E _386 jmp @FF 733 734 @@: 0 00001DC3 F606[0000]10 test byte [presizeflags], PRE32D 0 00001DC8 7408 jz .jfm_m_nocx_16 0 00001DCA 268A6F05 mov ch, [es:bx + 5] 0 00001DCE 268A4F04 mov cl, [es:bx + 4] 739 .jfm_m_nocx_16: 0 00001DD2 268A7703 mov dh, [es:bx + 3] 0 00001DD6 268A5702 mov dl, [es:bx + 2] 0 00001DDA 268A6701 mov ah, [es:bx + 1] 0 00001DDE 268A07 mov al, [es:bx] 744 @@: 0 00001DE1 16 push ss 0 00001DE2 07 pop es 747 0 00001DE3 F606[0000]10 test byte [presizeflags], PRE32D 0 00001DE8 7419 jz @F 0 00001DEA 50 push ax 0 00001DEB 89C8 mov ax, cx 0 00001DED E8[0000]EB02[0000] nearcall hexword 0 00001DF4 B03A mov al, ':' 0 00001DF6 AA stosb 0 00001DF7 58 pop ax 0 00001DF8 92 xchg ax, dx 0 00001DF9 E8[0000]EB02[0000] nearcall hexword 0 00001E00 92 xchg ax, dx 0 00001E01 EB12 jmp @FF 760 @@: 0 00001E03 89D1 mov cx, dx 0 00001E05 50 push ax 0 00001E06 89C8 mov ax, cx 0 00001E08 E8[0000]EB02[0000] nearcall hexword 0 00001E0F B03A mov al, ':' 0 00001E11 AA stosb 0 00001E12 58 pop ax 0 00001E13 31D2 xor dx, dx 769 @@: 0 00001E15 E8[0000]EB02[0000] nearcall hexword 0 00001E1C 66 _386_PM_o32 0 00001E1D 8B1E[0000] mov bx, word [reg_esp] 0 00001E21 C3 retn 774 775 776 .cnm: 0 00001E22 E8C4FE call .jnm 778 .cni_common: 0 00001E25 52 push dx 0 00001E26 51 push cx 0 00001E27 50 push ax 0 00001E28 8B1E[0000] mov bx, word [reg_ss] 0 00001E2C 8EC3 mov es, bx 0 00001E2E 8B16[0200] mov dx, word [reg_eip + 2] 0 00001E32 A1[0000] mov ax, word [reg_eip] 786 %if _PM 0 00001E35 E8[0000]EB02[0000] nearcall test_d_b_bit 0 00001E3C 66 _386_o32 0 00001E3D 8B1E[0000] mov bx, word [reg_esp] 0 00001E41 7419 jz .cnm_16bitstack 791 subcpu 386 0 00001E43 F606[0000]10 test byte [presizeflags], PRE32D 0 00001E48 7408 jz @F 0 00001E4A 6683EB02 sub ebx, 2 0 00001E4E 26678913 mov word [es:ebx], dx 796 797 @@: 0 00001E52 6683EB02 sub ebx, 2 0 00001E56 26678903 mov word [es:ebx], ax 0 00001E5A EB15 jmp .cnm_commonstack 801 subcpureset 802 803 .cnm_16bitstack: 804 %else 805 mov bx, word [reg_esp] 806 %endif 0 00001E5C F606[0000]10 test byte [presizeflags], PRE32D 0 00001E61 7406 jz @F 0 00001E63 83EB02 sub bx, 2 0 00001E66 268917 mov word [es:bx], dx 811 812 @@: 0 00001E69 83EB02 sub bx, 2 0 00001E6C 268907 mov word [es:bx], ax 0 00001E6F EB00 jmp .cnm_commonstack 816 817 .cnm_commonstack: 818 ; _386_o32 819 ; mov word [reg_esp], bx 820 0 00001E71 16 push ss 0 00001E72 07 pop es 823 0 00001E73 96 xchg ax, si 0 00001E74 B03D mov al, '=' 0 00001E76 AA stosb 0 00001E77 96 xchg ax, si 0 00001E78 F606[0000]10 test byte [presizeflags], PRE32D 0 00001E7D 7409 jz @F 0 00001E7F 92 xchg ax, dx 0 00001E80 E8[0000]EB02[0000] nearcall hexword 0 00001E87 92 xchg ax, dx 833 @@: 0 00001E88 E8[0000]EB02[0000] nearcall hexword 835 0 00001E8F 96 xchg ax, si 0 00001E90 B040 mov al, '@' 0 00001E92 AA stosb 0 00001E93 96 xchg ax, si 840 0 00001E94 93 xchg ax, bx 0 00001E95 E8[0000]EB02[0000] nearcall hexword 0 00001E9C 93 xchg ax, bx 844 0 00001E9D 58 pop ax 0 00001E9E 59 pop cx 0 00001E9F 5A pop dx 848 0 00001EA0 F606[4A00]80 testopt [ia_exec], 80h 0 00001EA5 7406 jz .cnm_retn 0 00001EA7 C706[4400][1503] mov word [immasm_callback], immasm_run_near 852 .cnm_retn: 0 00001EAD C3 retn 854 855 856 .cfm: 0 00001EAE E8BFFE call .jfm 858 .cfi_common: 0 00001EB1 52 push dx 0 00001EB2 51 push cx 0 00001EB3 50 push ax 0 00001EB4 8B1E[0000] mov bx, word [reg_ss] 0 00001EB8 8EC3 mov es, bx 0 00001EBA 8B2E[0000] mov bp, word [reg_cs] 0 00001EBE 8B16[0200] mov dx, word [reg_eip + 2] 0 00001EC2 A1[0000] mov ax, word [reg_eip] 867 %if _PM 0 00001EC5 E8[0000]EB02[0000] nearcall test_d_b_bit 0 00001ECC 66 _386_o32 0 00001ECD 8B1E[0000] mov bx, word [reg_esp] 0 00001ED1 7431 jz .cfm_16bitstack 872 subcpu 386 0 00001ED3 F606[0000]10 test byte [presizeflags], PRE32D 0 00001ED8 7409 jz @F 0 00001EDA 6683EB02 sub ebx, 2 0 00001EDE 2667832300 and word [es:ebx], 0 877 @@: 0 00001EE3 6683EB02 sub ebx, 2 0 00001EE7 2667892B mov word [es:ebx], bp 880 0 00001EEB F606[0000]10 test byte [presizeflags], PRE32D 0 00001EF0 7408 jz @F 0 00001EF2 6683EB02 sub ebx, 2 0 00001EF6 26678913 mov word [es:ebx], dx 885 @@: 0 00001EFA 6683EB02 sub ebx, 2 0 00001EFE 26678903 mov word [es:ebx], ax 0 00001F02 EB29 jmp .cfm_commonstack 889 subcpureset 890 891 .cfm_16bitstack: 892 %else 893 mov bx, word [reg_esp] 894 %endif 0 00001F04 F606[0000]10 test byte [presizeflags], PRE32D 0 00001F09 7407 jz @F 0 00001F0B 83EB02 sub bx, 2 0 00001F0E 26832700 and word [es:bx], 0 899 @@: 0 00001F12 83EB02 sub bx, 2 0 00001F15 26892F mov word [es:bx], bp 902 0 00001F18 F606[0000]10 test byte [presizeflags], PRE32D 0 00001F1D 7406 jz @F 0 00001F1F 83EB02 sub bx, 2 0 00001F22 268917 mov word [es:bx], dx 907 @@: 0 00001F25 83EB02 sub bx, 2 0 00001F28 268907 mov word [es:bx], ax 0 00001F2B EB00 jmp .cfm_commonstack 911 912 .cfm_commonstack: 913 ; _386_o32 914 ; mov word [reg_esp], bx 915 0 00001F2D 16 push ss 0 00001F2E 07 pop es 918 0 00001F2F 96 xchg ax, si 0 00001F30 B03D mov al, '=' 0 00001F32 AA stosb 0 00001F33 96 xchg ax, si 0 00001F34 95 xchg ax, bp 0 00001F35 E8[0000]EB02[0000] nearcall hexword 0 00001F3C 95 xchg ax, bp 0 00001F3D 96 xchg ax, si 0 00001F3E B03A mov al, ':' 0 00001F40 AA stosb 0 00001F41 96 xchg ax, si 930 0 00001F42 F606[0000]10 test byte [presizeflags], PRE32D 0 00001F47 7409 jz @F 0 00001F49 92 xchg ax, dx 0 00001F4A E8[0000]EB02[0000] nearcall hexword 0 00001F51 92 xchg ax, dx 936 @@: 0 00001F52 E8[0000]EB02[0000] nearcall hexword 938 0 00001F59 96 xchg ax, si 0 00001F5A B040 mov al, '@' 0 00001F5C AA stosb 0 00001F5D 96 xchg ax, si 943 0 00001F5E 93 xchg ax, bx 0 00001F5F E8[0000]EB02[0000] nearcall hexword 0 00001F66 93 xchg ax, bx 947 0 00001F67 58 pop ax 0 00001F68 59 pop cx 0 00001F69 5A pop dx 0 00001F6A F606[4A00]80 testopt [ia_exec], 80h 0 00001F6F 7406 jz .cfm_retn 0 00001F71 C706[4400][4103] mov word [immasm_callback], immasm_run_far 954 .cfm_retn: 0 00001F77 C3 retn 956 957 .cni: 0 00001F78 8B16[2E00] mov dx, [immasm_rel1632_target + 2] 0 00001F7C A1[2C00] mov ax, [immasm_rel1632_target] 0 00001F7F 8B0E[0000] mov cx, word [reg_cs] 0 00001F83 F606[0000]10 test byte [presizeflags], PRE32D 0 00001F88 740B jz @F 0 00001F8A 92 xchg ax, dx 0 00001F8B E8[0000]EB02[0000] nearcall hexword 0 00001F92 92 xchg ax, dx 0 00001F93 EB02 jmp @FF 967 @@: 0 00001F95 31D2 xor dx, dx 969 @@: 0 00001F97 E8[0000]EB02[0000] nearcall hexword 0 00001F9E E984FE jmp .cni_common 972 973 .cfi: 0 00001FA1 E80300 call .jfi 0 00001FA4 E90AFF jmp .cfi_common 976 977 .jfi: 0 00001FA7 8B16[3200] mov dx, [immasm_far_target + 2] 0 00001FAB A1[3000] mov ax, [immasm_far_target] 0 00001FAE 8B0E[3400] mov cx, word [immasm_far_target + 4] 981 0 00001FB2 F606[0300]08 testopt [internalflags6], dif6_immasm_faroffset 0 00001FB7 7404 jz @F 0 00001FB9 8B0E[0000] mov cx, word [reg_cs] 985 @@: 0 00001FBD 50 push ax 0 00001FBE 89C8 mov ax, cx 0 00001FC0 E8[0000]EB02[0000] nearcall hexword 0 00001FC7 B03A mov al, ':' 0 00001FC9 AA stosb 0 00001FCA 58 pop ax 0 00001FCB F606[0000]10 test byte [presizeflags], PRE32D 0 00001FD0 740B jz @F 0 00001FD2 92 xchg ax, dx 0 00001FD3 E8[0000]EB02[0000] nearcall hexword 0 00001FDA 92 xchg ax, dx 0 00001FDB EB02 jmp @FF 998 @@: 0 00001FDD 31D2 xor dx, dx 1000 @@: 0 00001FDF E8[0000]EB02[0000] nearcall hexword 0 00001FE6 66 _386_PM_o32 0 00001FE7 8B1E[0000] mov bx, word [reg_esp] 0 00001FEB C3 retn 1005 1006 1007 .rn: 0 00001FEC 8B0E[0000] mov cx, word [reg_cs] 0 00001FF0 8B1E[0000] mov bx, word [reg_ss] 0 00001FF4 8EC3 mov es, bx 1011 %if _PM 0 00001FF6 E8[0000]EB02[0000] nearcall test_d_b_bit 0 00001FFD 66 _386_o32 0 00001FFE 8B1E[0000] mov bx, word [reg_esp] 0 00002002 741B jz .rn_16bitstack 1016 subcpu 386 0 00002004 26678B03 mov ax, word [es:ebx] 0 00002008 6683C302 add ebx, 2 0 0000200C 31D2 xor dx, dx 0 0000200E F606[0000]10 test byte [presizeflags], PRE32D 0 00002013 7408 jz @F 0 00002015 26678B13 mov dx, word [es:ebx] 0 00002019 6683C302 add ebx, 2 1024 @@: 0 0000201D EB17 jmp .rn_commonstack 1026 subcpureset 1027 1028 .rn_16bitstack: 1029 %else 1030 mov bx, word [reg_esp] 1031 %endif 0 0000201F 268B07 mov ax, word [es:bx] 0 00002022 83C302 add bx, 2 0 00002025 31D2 xor dx, dx 0 00002027 F606[0000]10 test byte [presizeflags], PRE32D 0 0000202C 7406 jz @F 0 0000202E 268B17 mov dx, word [es:bx] 0 00002031 83C302 add bx, 2 1039 @@: 0 00002034 EB00 jmp .rn_commonstack 1041 1042 .rn_commonstack: 1043 ; _386_o32 1044 ; mov word [reg_esp], bx 1045 0 00002036 16 push ss 0 00002037 07 pop es 1048 0 00002038 96 xchg ax, si 0 00002039 B03D mov al, '=' 0 0000203B AA stosb 0 0000203C 96 xchg ax, si 0 0000203D F606[0000]10 test byte [presizeflags], PRE32D 0 00002042 7409 jz @F 0 00002044 92 xchg ax, dx 0 00002045 E8[0000]EB02[0000] nearcall hexword 0 0000204C 92 xchg ax, dx 1058 @@: 0 0000204D E8[0000]EB02[0000] nearcall hexword 1060 0 00002054 96 xchg ax, si 0 00002055 B040 mov al, '@' 0 00002057 AA stosb 0 00002058 96 xchg ax, si 1065 0 00002059 93 xchg ax, bx 0 0000205A E8[0000]EB02[0000] nearcall hexword 0 00002061 93 xchg ax, bx 1069 0 00002062 C3 retn 1071 1072 1073 .rni: 0 00002063 E886FF call .rn 1075 .rfi_common: 1076 %if _PM 0 00002066 53 push bx 0 00002067 8B1E[0000] mov bx, word [reg_ss] 0 0000206B E8[0000]EB02[0000] nearcall test_d_b_bit 0 00002072 5B pop bx 0 00002073 7401 jz .rni_16 0 00002075 66 _386_o32 1083 %endif 1084 .rni_16: 0 00002076 031E[3600] add bx, word [immasm_imm16] 1086 ; _386_o32 1087 ; mov word [reg_esp], bx 0 0000207A 50 push ax 0 0000207B B02C mov al, ',' 0 0000207D AA stosb 0 0000207E 58 pop ax 0 0000207F 93 xchg ax, bx 0 00002080 E8[0000]EB02[0000] nearcall hexword 0 00002087 93 xchg ax, bx 0 00002088 C3 retn 1096 1097 .rf: 0 00002089 8B1E[0000] mov bx, word [reg_ss] 0 0000208D 8EC3 mov es, bx 1100 %if _PM 0 0000208F E8[0000]EB02[0000] nearcall test_d_b_bit 0 00002096 66 _386_o32 0 00002097 8B1E[0000] mov bx, word [reg_esp] 0 0000209B 742E jz .rf_16bitstack 1105 subcpu 386 0 0000209D 26678B03 mov ax, word [es:ebx] 0 000020A1 6683C302 add ebx, 2 0 000020A5 31D2 xor dx, dx 0 000020A7 F606[0000]10 test byte [presizeflags], PRE32D 0 000020AC 7408 jz @F 0 000020AE 26678B13 mov dx, word [es:ebx] 0 000020B2 6683C302 add ebx, 2 1113 @@: 0 000020B6 26678B0B mov cx, word [es:ebx] 0 000020BA 6683C302 add ebx, 2 0 000020BE F606[0000]10 test byte [presizeflags], PRE32D 0 000020C3 7404 jz @F 0 000020C5 6683C302 add ebx, 2 1119 @@: 0 000020C9 EB27 jmp .rf_commonstack 1121 subcpureset 1122 1123 .rf_16bitstack: 1124 %else 1125 mov bx, word [reg_esp] 1126 %endif 0 000020CB 268B07 mov ax, word [es:bx] 0 000020CE 83C302 add bx, 2 0 000020D1 31D2 xor dx, dx 0 000020D3 F606[0000]10 test byte [presizeflags], PRE32D 0 000020D8 7406 jz @F 0 000020DA 268B17 mov dx, word [es:bx] 0 000020DD 83C302 add bx, 2 1134 @@: 0 000020E0 268B0F mov cx, word [es:bx] 0 000020E3 83C302 add bx, 2 0 000020E6 F606[0000]10 test byte [presizeflags], PRE32D 0 000020EB 7403 jz @F 0 000020ED 83C302 add bx, 2 1140 @@: 0 000020F0 EB00 jmp .rf_commonstack 1142 1143 .rf_commonstack: 1144 ; _386_o32 1145 ; mov word [reg_esp], bx 1146 0 000020F2 16 push ss 0 000020F3 07 pop es 1149 0 000020F4 96 xchg ax, si 0 000020F5 B03D mov al, '=' 0 000020F7 AA stosb 0 000020F8 96 xchg ax, si 0 000020F9 91 xchg ax, cx 0 000020FA E8[0000]EB02[0000] nearcall hexword 0 00002101 91 xchg ax, cx 0 00002102 96 xchg ax, si 0 00002103 B03A mov al, ':' 0 00002105 AA stosb 0 00002106 96 xchg ax, si 0 00002107 F606[0000]10 test byte [presizeflags], PRE32D 0 0000210C 7409 jz @F 0 0000210E 92 xchg ax, dx 0 0000210F E8[0000]EB02[0000] nearcall hexword 0 00002116 92 xchg ax, dx 1166 @@: 0 00002117 E8[0000]EB02[0000] nearcall hexword 1168 0 0000211E 96 xchg ax, si 0 0000211F B040 mov al, '@' 0 00002121 AA stosb 0 00002122 96 xchg ax, si 1173 0 00002123 93 xchg ax, bx 0 00002124 E8[0000]EB02[0000] nearcall hexword 0 0000212B 93 xchg ax, bx 1177 0 0000212C C3 retn 1179 1180 .rfi: 0 0000212D E859FF call .rf 0 00002130 E933FF jmp .rfi_common 1183 1184 1185 .ir: 0 00002133 E853FF call .rf 0 00002136 50 push ax 0 00002137 53 push bx 0 00002138 8B1E[0000] mov bx, word [reg_ss] 0 0000213C 8EC3 mov es, bx 1191 %if _PM 0 0000213E E8[0000]EB02[0000] nearcall test_d_b_bit 0 00002145 5B pop bx 0 00002146 741F jz .ir_16bitstack 1195 subcpu 386 0 00002148 26678B03 mov ax, word [es:ebx] 0 0000214C A3[3A00] mov word [immasm_efl], ax 0 0000214F 6683C302 add ebx, 2 0 00002153 F606[0000]10 test byte [presizeflags], PRE32D 0 00002158 740B jz @F 0 0000215A 26678B03 mov ax, word [es:ebx] 0 0000215E A3[3C00] mov word [immasm_efl + 2], ax 0 00002161 6683C302 add ebx, 2 1204 @@: 0 00002165 EB1B jmp .ir_commonstack 1206 subcpureset 1207 1208 .ir_16bitstack: 1209 %else 1210 pop bx 1211 %endif 0 00002167 268B07 mov ax, word [es:bx] 0 0000216A A3[3A00] mov word [immasm_efl], ax 0 0000216D 83C302 add bx, 2 0 00002170 F606[0000]10 test byte [presizeflags], PRE32D 0 00002175 7409 jz @F 0 00002177 268B07 mov ax, word [es:bx] 0 0000217A A3[3C00] mov word [immasm_efl + 2], ax 0 0000217D 83C302 add bx, 2 1220 @@: 0 00002180 EB00 jmp .ir_commonstack 1222 1223 .ir_commonstack: 1224 ; _386_o32 1225 ; mov word [reg_esp], bx 1226 0 00002182 16 push ss 0 00002183 07 pop es 1229 0 00002184 B05E mov al, '^' 0 00002186 AA stosb 0 00002187 F606[0000]10 test byte [presizeflags], PRE32D 0 0000218C 740D jz @F 0 0000218E A1[3C00] mov ax, word [immasm_efl + 2] 0 00002191 E8[0000]EB02[0000] nearcall hexword 0 00002198 B05F mov al, '_' 0 0000219A AA stosb 1238 @@: 0 0000219B A1[3A00] mov ax, word [immasm_efl] 0 0000219E E8[0000]EB02[0000] nearcall hexword 1241 0 000021A5 B02C mov al, ',' 0 000021A7 AA stosb 0 000021A8 58 pop ax 0 000021A9 93 xchg ax, bx 0 000021AA E8[0000]EB02[0000] nearcall hexword 0 000021B1 93 xchg ax, bx 0 000021B2 C3 retn 1249 1250 1251 .movto: 0 000021B3 A0[0000] mov al, byte [regmem] 0 000021B6 2438 and al, 00_111_000b 0 000021B8 B103 mov cl, 3 0 000021BA D2E8 shr al, cl 0 000021BC 3C03 cmp al, 3 ; to ds ? 0 000021BE 755A jne .notspecial 1258 0 000021C0 A0[0000] mov al, byte [regmem] 0 000021C3 3CC0 cmp al, 1100_0000b 0 000021C5 721A jb .movto_mem 1262 .movto_reg: 0 000021C7 83E007 and ax, 7 0 000021CA 89C3 mov bx, ax 0 000021CC 01DB add bx, bx 0 000021CE 8B9F[0000] mov bx, word [reg32addr + bx] 0 000021D2 8B07 mov ax, [bx] 1268 .movto_common: 0 000021D4 A3[3E00] mov word [immasm_ds], ax 0 000021D7 E8[0000]EB02[3D00] nearcall ia_restore_ds 0 000021DE E96D01 jmp .noop 1272 1273 .movto_mem: 0 000021E1 F606[0000]04 testopt [disflags], DIS_I_SHOW 0 000021E6 7503E9[0000] jz error_mirror 1276 0 000021EB A0[0000] mov al, [segmnt] ; segment number 0 000021EE 98 cbw 0 000021EF D1E0 shl ax, 1 0 000021F1 93 xchg ax, bx ; mov bx, ax 0 000021F2 8B9F[0000] mov bx, [segrgaddr + bx]; get address of value 0 000021F6 8E07 mov es, [bx] 1283 0 000021F8 66 _386_o32 0 000021F9 8B1E[0000] mov bx, word [addrr] 0 000021FD F606[0100]08 testopt [disflags], DIS_I_SHOW_A32 0 00002202 740B jz @F 0 00002204 26678A6301 _386 mov ah, [es:ebx + 1] 0 00002209 26678A03 _386 mov al, [es:ebx] 0 0000220D EB07 _386 jmp @FF 1291 1292 @@: 0 0000220F 268A6701 mov ah, [es:bx + 1] 0 00002213 268A07 mov al, [es:bx] 1295 @@: 0 00002216 16 push ss 0 00002217 07 pop es 0 00002218 EBBA jmp .movto_common 1299 1300 .notspecial: 0 0000221A 58 pop ax 0 0000221B E962F9 jmp ..@immasm_not_special 1303 1304 1305 .movfrom: 0 0000221E A0[0000] mov al, byte [regmem] 0 00002221 2438 and al, 00_111_000b 0 00002223 B103 mov cl, 3 0 00002225 D2E8 shr al, cl 0 00002227 3C03 cmp al, 3 ; to ds ? 0 00002229 740A je .movfrom_ds 0 0000222B 3C01 cmp al, 1 0 0000222D 75EB jne .notspecial 1314 .movfrom_cs: 0 0000222F 8B0E[0000] mov cx, word [reg_cs] 0 00002233 EB04 jmp @F 1317 1318 .movfrom_ds: 0 00002235 8B0E[4000] mov cx, word [immasm_save_ds] 1320 @@: 0 00002239 890E[4200] mov word [immasm_temp], cx 0 0000223D C706[4400][F108] mov word [immasm_callback], .movfrom_callback 0 00002243 E90801 jmp .noop 1324 1325 .movfrom_callback: 0 00002246 A0[0000] mov al, byte [regmem] 0 00002249 3CC0 cmp al, 1100_0000b 0 0000224B 721C jb .movfrom_mem 1329 .movfrom_reg: 0 0000224D 83E007 and ax, 7 0 00002250 89C3 mov bx, ax 0 00002252 01DB add bx, bx 0 00002254 8B9F[0000] mov bx, word [reg32addr + bx] 0 00002258 A1[4200] mov ax, word [immasm_temp] 0 0000225B 8907 mov [bx], ax 0 0000225D F606[0000]10 test byte [presizeflags], PRE32D 0 00002262 7404 jz @F 0 00002264 83670200 and word [bx + 2], 0 1339 @@: 0 00002268 C3 retn 1341 1342 .movfrom_mem: 0 00002269 F606[0000]04 testopt [disflags], DIS_I_SHOW 0 0000226E 7503E9[0000] jz error_mirror 1345 0 00002273 A0[0000] mov al, [segmnt] ; segment number 0 00002276 98 cbw 0 00002277 D1E0 shl ax, 1 0 00002279 93 xchg ax, bx ; mov bx, ax 0 0000227A 8B9F[0000] mov bx, [segrgaddr + bx]; get address of value 0 0000227E 8E07 mov es, [bx] 1352 0 00002280 66 _386_o32 0 00002281 8B1E[0000] mov bx, word [addrr] 0 00002285 A1[4200] mov ax, word [immasm_temp] 0 00002288 F606[0100]08 testopt [disflags], DIS_I_SHOW_A32 0 0000228D 740B jz @F 0 0000228F 2667886301 _386 mov [es:ebx + 1], ah 0 00002294 26678803 _386 mov [es:ebx], al 0 00002298 EB07 _386 jmp @FF 1361 1362 @@: 0 0000229A 26886701 mov [es:bx + 1], ah 0 0000229E 268807 mov [es:bx], al 1365 @@: 0 000022A1 16 push ss 0 000022A2 07 pop es 0 000022A3 C3 retn 1369 1370 1371 .pushcs: 0 000022A4 A1[0000] mov ax, word [reg_cs] 1373 .push_common: 0 000022A7 8B1E[0000] mov bx, word [reg_ss] 0 000022AB 8EC3 mov es, bx 1376 %if _PM 0 000022AD E8[0000]EB02[0000] nearcall test_d_b_bit 0 000022B4 66 _386_o32 0 000022B5 8B1E[0000] mov bx, word [reg_esp] 0 000022B9 741A jz .push_16bitstack 1381 subcpu 386 0 000022BB F606[0000]10 test byte [presizeflags], PRE32D 0 000022C0 7409 jz @F 0 000022C2 6683EB02 sub ebx, 2 0 000022C6 2667832300 and word [es:ebx], 0 1386 1387 @@: 0 000022CB 6683EB02 sub ebx, 2 0 000022CF 26678903 mov word [es:ebx], ax 0 000022D3 EB16 jmp .push_commonstack 1391 subcpureset 1392 1393 .push_16bitstack: 1394 %else 1395 mov bx, word [reg_esp] 1396 %endif 0 000022D5 F606[0000]10 test byte [presizeflags], PRE32D 0 000022DA 7407 jz @F 0 000022DC 83EB02 sub bx, 2 0 000022DF 26832700 and word [es:bx], 0 1401 1402 @@: 0 000022E3 83EB02 sub bx, 2 0 000022E6 268907 mov word [es:bx], ax 0 000022E9 EB00 jmp .push_commonstack 1406 1407 .push_commonstack: 1408 ; _386_o32 1409 ; mov word [reg_esp], bx 1410 0 000022EB 16 push ss 0 000022EC 07 pop es 0 000022ED EB64 jmp .noop_except_esp 1414 1415 1416 .pushds: 0 000022EF A1[4000] mov ax, word [immasm_save_ds] 0 000022F2 EBB3 jmp .push_common 1419 1420 1421 .popds: 0 000022F4 E8[0000]EB02[3D00] nearcall ia_restore_ds 0 000022FB E91CFF jmp .notspecial 1424 1425 .lds: 0 000022FE 833E[4200]00 cmp word [immasm_temp], 0 0 00002303 7503E912FF je .notspecial 1428 0 00002308 E8[0000]EB02[3D00] nearcall ia_restore_ds 0 0000230F C606[0000]00 mov byte [segmnt], 0 0 00002314 A1[0000] mov ax, word [reg_es] 0 00002317 A3[4000] mov word [immasm_save_es], ax 0 0000231A C706[4600][4500] mov word [ ia_restore ], ia_restore_es 0 00002320 A1[0000] mov ax, word [reg_cs] 0 00002323 A3[0000] mov word [reg_es], ax 0 00002326 E888F9 call getimmselseg 0 00002329 8EC3 mov es, bx 0 0000232B 57 push di 0 0000232C 31FF xor di, di 0 0000232E B03E mov al, 3Eh 0 00002330 B92000 mov cx, immasm_length 0 00002333 F2AE repne scasb 0 00002335 7403E9[0000] jne error_mirror 1444 %if _PM 0 0000233A E8[0000]EB02[0000] nearcall verifysegm_or_error 0 00002341 8EC3 mov es, bx 1447 %endif 0 00002343 26C645FF26 mov byte [es:di - 1], 26h 0 00002348 5F pop di 0 00002349 16 push ss 0 0000234A 07 pop es 0 0000234B E9CCFE jmp .notspecial 1453 1454 1455 .noop: 0 0000234E 66 _386_PM_o32 0 0000234F 8B1E[0000] mov bx, word [reg_esp] 1458 .noop_except_esp: 0 00002353 8B0E[0000] mov cx, word [reg_cs] 0 00002357 8B16[0200] mov dx, word [reg_eip + 2] 0 0000235B A1[0000] mov ax, word [reg_eip] 0 0000235E C3 retn 1463 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00002807 ???????? eldhSignature: resb 4 ; "ELD1" 0 0000280B ?????? resb 3 ; reserved 0 0000280E ?? resb 1 ; 26 (Ctrl-Z) 0 0000280F ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00002813 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002815 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002817 ???????? eldhDataOffset: resd 1 0 0000281B ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000281D ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000281F ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00002821 ???????? eldhReserved: resb 4 ; reserved 0 00002825 ???? 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 00002827 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 0000282B ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000282F ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00002833 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002807 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000280F ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00002813 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002815 ???? 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 00002807 ???? 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 00002809 ???? eldltAmount: resw 1 0 0000280B ???????? 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 00002807 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002809 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000280B ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000280D ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000280F ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002817 ???? 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 00002807 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002809 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 0000280B ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 0000280D ???? eldlUseLinkHash: resw 1 0 0000280F ???? eldlDataAmount: resw 1 0 00002811 ???? eldlDataPrefixes: resw 1 0 00002813 ???? eldlDataEntries: resw 1 0 00002815 ???? eldlDataAddresses: resw 1 0 00002817 ???? eldlCodeAmount: resw 1 0 00002819 ???? eldlCodePrefixes: resw 1 0 0000281B ???? eldlCodeEntries: resw 1 0 0000281D ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 0000281F ???? eldlDualAmount: resw 1 0 00002821 ???? eldlDualPrefixes: resw 1 0 00002823 ???? eldlDualEntries: resw 1 0 00002825 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00002807 ???? ifKeyword: resw 1 0 00002809 ???? ifDescription: resw 1 0 0000280B ???? ifOptions: resw 1 0 0000280D ???? ifValue: resw 1 0 0000280F ???? ifTrying: resw 1 0 00002811 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00002807 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 0000280B ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 0000280F ???? smName1: resw 1 ; -> first string part 0 00002811 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00002813 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00002815 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00002817 ???? smBaseNext: resw 1 0 00002819 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 0000281B ???? smSpecialNext: resw 1 0 0000281D ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00002807 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00002808 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00002809 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00002807 ???? shHash: resw 1 ; hash value 0 00002809 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00002807 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 0000280B ???? xmsmSourceHandle: resw 1 0 0000280D ???????? xmsmSourceAddress: resd 1 0 00002811 ???? xmsmDestHandle: resw 1 0 00002813 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 19 %endif 20 21 22 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 22 ------------------ note: usesection lDEBUG_CODE 23 24 uninstall: 0 00005350 B9[8B00] mov cx, install.clear 0 00005353 EB13 jmp install.common 27 28 install: 0 00005355 B9[5000] mov cx, .toggle 0 00005358 E8[0000] call skipcomm0 0 0000535B 4E dec si 0 0000535C BA[0000] mov dx, msg.toggle 0 0000535F E8[0000] call isstring? 0 00005362 AC lodsb 0 00005363 7403 je .common 0 00005365 B9[6700] mov cx, .set 37 38 .common: 0 00005368 E8[0000] call skipcomm0 0 0000536B 56 push si 41 .loopcheck: 0 0000536C 4E dec si 0 0000536D E8A000 call checkinstallflag ; valid command ? (errors out if no) 0 00005370 E8[0000] call skipcomma 0 00005373 E8[0000] call iseol? 0 00005376 75F4 jne .loopcheck 47 0 00005378 5E pop si 49 .loopdo: 0 00005379 4E dec si 0 0000537A E89300 call checkinstallflag ; re-detect which it is, cannot fail 0 0000537D 8B5702 mov dx, word [bx + ifDescription] 0 00005380 8B7F04 mov di, word [bx + ifOptions] 0 00005383 8B4706 mov ax, word [bx + ifValue] 0 00005386 85FF test di, di ; normal with options pointer ? 0 00005388 7503 jnz @F ; yes --> 0 0000538A FFD0 call ax ; call ifValue function pointer 0 0000538C A9 db __TEST_IMM16 ; (skip call cx) 59 @@: 0 0000538D FFD1 call cx ; call install.set or install.clear 0 0000538F E8[0000] call skipcomma 0 00005392 E8[0000] call iseol? 0 00005395 75E2 jne .loopdo 0 00005397 C3 retn 65 66 67 ; OUT: ZR if not reverse 68 .isreverse: 69 ; (n & (n - 1)) != 0 0 00005398 53 push bx 0 00005399 89C3 mov bx, ax 0 0000539B 4B dec bx 0 0000539C 21C3 and bx, ax 0 0000539E 5B pop bx 0 0000539F C3 retn 76 77 78 .toggle: 0 000053A0 E8F5FF call .isreverse 0 000053A3 740A jz .togglenormal 81 82 .togglereverse: 0 000053A5 F7D0 not ax 0 000053A7 3105 xor word [di], ax 0 000053A9 8505 test word [di], ax 0 000053AB 7421 jz .settry 0 000053AD EB06 jmp @F 88 89 .togglenormal: 0 000053AF 3105 xor word [di], ax 0 000053B1 8505 test word [di], ax 0 000053B3 7519 jnz .settry 93 @@: 0 000053B5 EB3B jmp .cleartry 95 96 97 .set: 0 000053B7 E8DEFF call .isreverse 0 000053BA 740C jz .setnormal 100 101 .setreverse: 0 000053BC F7D0 not ax 0 000053BE 8505 test word [di], ax ; already clear ? 0 000053C0 7410 jz @F ; yes --> 0 000053C2 F7D0 not ax 0 000053C4 2105 and word [di], ax ; clear flag 0 000053C6 EB06 jmp .settry 108 109 110 .setnormal: 0 000053C8 8505 test word [di], ax ; already set ? 0 000053CA 7506 jnz @F ; yes --> 0 000053CC 0905 or word [di], ax ; set flag 114 .settry: 0 000053CE F8 clc ; NC = setting 0 000053CF FF6708 jmp near [bx + ifTrying]; call try handler 117 118 @@: 0 000053D2 E8[0000] call putsz 0 000053D5 BA[0000] mov dx, msg.alreadyenabled 121 .putsz: 0 000053D8 E9[0000] jmp putsz 123 124 125 .clear: 0 000053DB E8BAFF call .isreverse 0 000053DE 740A jz .clearnormal 128 129 .clearreverse: 0 000053E0 F7D0 not ax 0 000053E2 8505 test word [di], ax ; already set ? 0 000053E4 7510 jnz @F 0 000053E6 0905 or word [di], ax ; set flag 0 000053E8 EB08 jmp .cleartry 135 136 .clearnormal: 0 000053EA 8505 test word [di], ax ; already clear ? 0 000053EC 7408 jz @F ; yes --> 0 000053EE F7D0 not ax ; get mask value 0 000053F0 2105 and word [di], ax ; clear flag 141 .cleartry: 0 000053F2 F9 stc ; CY = clearing 0 000053F3 FF6708 jmp near [bx + ifTrying]; call try handler 144 145 @@: 0 000053F6 E8[0000] call putsz 0 000053F9 BA[0000] mov dx, msg.alreadydisabled 0 000053FC EBDA jmp .putsz 149 150 151 install_trying: 0 000053FE 7208 jc .clear 153 .set: 0 00005400 E8[0000] call putsz 0 00005403 BA[0000] mov dx, msg.tryenable 0 00005406 EB06 jmp .putsz 157 158 .clear: 0 00005408 E8[0000] call putsz 0 0000540B BA[0000] mov dx, msg.trydisable 161 .putsz: 0 0000540E EBC8 jmp install.putsz 163 164 checkinstallflag: 0 00005410 BB[F4FF] mov bx, installflags - INSTALLFLAG_size 166 @@: 0 00005413 83C30C add bx, INSTALLFLAG_size 0 00005416 8B17 mov dx, word [bx + ifKeyword] 0 00005418 85D2 test dx, dx 0 0000541A 7406 jz .error 0 0000541C E8[0000] call isstring? 0 0000541F 75F2 jne @B 0 00005421 C3 retn 174 175 .error: 0 00005422 E9[0000] jmp error 177 178 179 %if _AREAS && _AREAS_HOOK_CLIENT 180 install_areas: 0 00005425 81F9[8B00] cmp cx, install.clear 0 00005429 740E je .uninstall 0 0000542B 81F9[5000] cmp cx, install.toggle 0 0000542F 750A jne .install 185 186 .toggle: 0 00005431 813E[0000]F9CB cmp word [areas_struc + areastrucEntry], 0CBF9h 0 00005437 7402 je .install 189 .uninstall: 0 00005439 EB5B jmp uninstall_areas 191 192 .install: 0 0000543B 56 push si 0 0000543C 51 push cx 0 0000543D 813E[0000]F9CB cmp word [areas_struc + areastrucEntry], 0CBF9h 0 00005443 740F je @F 0 00005445 BA[0000] mov dx, msg.areasalreadyinstalled 0 00005448 B80307 mov ax, 0703h 199 .setrc_putsz_ret: 0 0000544B E8[0000] call setrc 201 .putsz_ret: 0 0000544E E8[0000] call putsz 0 00005451 59 pop cx 0 00005452 5E pop si 0 00005453 C3 retn 206 207 @@: 0 00005454 E8[0000] call findinstalleddebugger 209 ; CHG: si, di, es, ax, cx, dx 0 00005457 16 push ss 0 00005458 07 pop es 0 00005459 7308 jnc @F 213 0 0000545B BA[0000] mov dx, msg.areasnodebuggerfound 0 0000545E B80407 mov ax, 0704h 0 00005461 EBE8 jmp .setrc_putsz_ret 217 218 @@: 0 00005463 B033 mov al, 33h 0 00005465 BB[0000] mov bx, areas_struc 221 %if _PM 0 00005468 8B16[0000] mov dx, word [pspdbg] 0 0000546C E8[0000] call call_int2D 224 %else 225 mov dx, ss 226 int 2Dh ; install areas 227 %endif 0 0000546F 16 push ss 0 00005470 1F pop ds 0 00005471 16 push ss 0 00005472 07 pop es 232 0 00005473 84C0 test al, al 0 00005475 7412 jz .not_supported 0 00005477 3CFF cmp al, -1 0 00005479 7416 je .installed 0 0000547B BF[0000] mov di, msg.areasnotinstalled.code 0 0000547E E8[0000] call hexbyte 0 00005481 BA[0000] mov dx, msg.areasnotinstalled 0 00005484 B80207 mov ax, 0702h 0 00005487 EBC2 jmp .setrc_putsz_ret 242 243 .not_supported: 0 00005489 BA[0000] mov dx, msg.areasnotsupported 0 0000548C B80107 mov ax, 0701h 0 0000548F EBBA jmp .setrc_putsz_ret 247 248 .installed: 0 00005491 BA[0000] mov dx, msg.areasinstalled 0 00005494 EBB8 jmp .putsz_ret 251 252 253 uninstall_areas: 0 00005496 56 push si 255 ; cx != 0 0 00005497 51 push cx 0 00005498 813E[0000]F9CB cmp word [areas_struc + areastrucEntry], 0CBF9h 0 0000549E 7528 jne .is_installed 0 000054A0 BA[0000] mov dx, msg.areasalreadyuninstalled 0 000054A3 B80507 mov ax, 0705h 261 .setrc_putsz_ret: 0 000054A6 EBA3 jmp install_areas.setrc_putsz_ret 263 .putsz_ret: 0 000054A8 EBA4 jmp install_areas.putsz_ret 265 266 267 .qq_entry: 0 000054AA 56 push si 0 000054AB 31C9 xor cx, cx 0 000054AD 51 push cx 0 000054AE 813E[0000]F9CB cmp word [areas_struc + areastrucEntry], 0CBF9h 0 000054B4 7512 jne .is_installed 273 ; (NC) 274 .ret: 0 000054B6 59 pop cx 0 000054B7 5E pop si 0 000054B8 C3 retn 278 279 .ret_qq: 0 000054B9 3CFF cmp al, 0FFh 0 000054BB 72F9 jb .ret ; --> (CY) 0 000054BD 813E[0000]F9CB cmp word [areas_struc + areastrucEntry], 0CBF9h 0 000054C3 74F1 je .ret ; --> (NC) 0 000054C5 F9 stc 0 000054C6 EBEE jmp .ret 286 287 288 .is_installed: 0 000054C8 B000 mov al, 0 290 %if _PM 0 000054CA E8[0000] call ispm 0 000054CD 7547 jnz .86m 293 subcpu 286 294 .pm: 295 lframe none 296 lvar 32h, 86m_call_struc 0 000054CF 5589E58D66CE lenter 0 000054D5 8946EA mov word [bp + ?86m_call_struc +1Ch], ax ; eax 0 000054D8 31C0 xor ax, ax 0 000054DA 8946EE mov word [bp + ?86m_call_struc +20h], ax ; flags 0 000054DD 8946DC mov word [bp + ?86m_call_struc +0Ch + 2], ax 0 000054E0 8946DA mov word [bp + ?86m_call_struc +0Ch], ax 0 000054E3 8946FC mov word [bp + ?86m_call_struc +2Eh], ax ; sp 0 000054E6 8946FE mov word [bp + ?86m_call_struc +30h], ax ; ss 0 000054E9 8946F0 mov word [bp + ?86m_call_struc +22h], ax ; es 0 000054EC 8946F2 mov word [bp + ?86m_call_struc +24h], ax ; ds 0 000054EF A1[0000] mov ax, word [pspdbg] 0 000054F2 C746F8[0000] mov word [bp + ?86m_call_struc +2Ah], areas_struc + areastrucEntry 309 ; ip 0 000054F7 8946FA mov word [bp + ?86m_call_struc +2Ch], ax ; cs 311 ; push ss 312 ; pop es ; => stack 0 000054FA 8D7ECE lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 0 000054FD 660FB7FF _386 movzx edi, di ; (previously checked b[dpmi32] here) 0 00005501 31DB xor bx, bx ; flags/reserved 0 00005503 31C9 xor cx, cx ; do not copy from PM stack 0 00005505 B80103 mov ax, 0301h 0 00005508 CD31 int 31h ; call 86 mode function with far return 0 0000550A 8A66EE mov ah, byte [bp + ?86m_call_struc +20h] ; flags 0 0000550D 9E sahf 0 0000550E 8B46EA mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 0 00005511 89EC5D lleave 323 subcpureset 0 00005514 EB04 jmp .common 325 %endif 326 .86m: 0 00005516 0E push cs 0 00005517 E81400 call .86m_to_entry_areas_struc 329 .common: 0 0000551A 59 pop cx 0 0000551B 51 push cx 0 0000551C 16 push ss 0 0000551D 1F pop ds 0 0000551E 16 push ss 0 0000551F 07 pop es 0 00005520 E397 jcxz .ret_qq 0 00005522 BF[0000] mov di, msg.areasuninstalled.code 0 00005525 E8[0000] call hexbyte 0 00005528 BA[0000] mov dx, msg.areasuninstalled 0 0000552B E97AFF jmp .putsz_ret 341 342 .86m_to_entry_areas_struc: 0 0000552E BB[0000] mov bx, areas_struc + areastrucEntry 0 00005531 16 push ss 0 00005532 53 push bx 0 00005533 CB retf 347 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00002807 ???????? eldhSignature: resb 4 ; "ELD1" 0 0000280B ?????? resb 3 ; reserved 0 0000280E ?? resb 1 ; 26 (Ctrl-Z) 0 0000280F ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00002813 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002815 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002817 ???????? eldhDataOffset: resd 1 0 0000281B ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000281D ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000281F ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00002821 ???????? eldhReserved: resb 4 ; reserved 0 00002825 ???? 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 00002827 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 0000282B ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000282F ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00002833 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002807 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000280F ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00002813 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002815 ???? 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 00002807 ???? 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 00002809 ???? eldltAmount: resw 1 0 0000280B ???????? 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 00002807 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002809 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000280B ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000280D ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000280F ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002817 ???? 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 00002807 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002809 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 0000280B ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 0000280D ???? eldlUseLinkHash: resw 1 0 0000280F ???? eldlDataAmount: resw 1 0 00002811 ???? eldlDataPrefixes: resw 1 0 00002813 ???? eldlDataEntries: resw 1 0 00002815 ???? eldlDataAddresses: resw 1 0 00002817 ???? eldlCodeAmount: resw 1 0 00002819 ???? eldlCodePrefixes: resw 1 0 0000281B ???? eldlCodeEntries: resw 1 0 0000281D ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 0000281F ???? eldlDualAmount: resw 1 0 00002821 ???? eldlDualPrefixes: resw 1 0 00002823 ???? eldlDualEntries: resw 1 0 00002825 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00002807 ???? ifKeyword: resw 1 0 00002809 ???? ifDescription: resw 1 0 0000280B ???? ifOptions: resw 1 0 0000280D ???? ifValue: resw 1 0 0000280F ???? ifTrying: resw 1 0 00002811 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00002807 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 0000280B ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 0000280F ???? smName1: resw 1 ; -> first string part 0 00002811 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00002813 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00002815 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00002817 ???? smBaseNext: resw 1 0 00002819 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 0000281B ???? smSpecialNext: resw 1 0 0000281D ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00002807 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00002808 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00002809 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00002807 ???? shHash: resw 1 ; hash value 0 00002809 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00002807 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 0000280B ???? xmsmSourceHandle: resw 1 0 0000280D ???????? xmsmSourceAddress: resd 1 0 00002811 ???? xmsmDestHandle: resw 1 0 00002813 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 19 %endif 20 21 22 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 0 00005534 E8[0000] call ispm 0 00005537 7518 jnz .rm 35 0 00005539 93 xchg ax, bx ; bl = interrupt number 0 0000553A B80002 mov ax, 0200h 0 0000553D CD31 int 31h ; cx:dx = interrupt vector 0 0000553F 895402 mov word [si + ieNext], dx 0 00005542 894C04 mov word [si + ieNext + 2], cx 41 0 00005545 B80102 mov ax, 0201h 43 ; bl still = interrupt number 0 00005548 8B0E[0000] mov cx, word [pspdbg] ; cx => lDEBUG_DATA_ENTRY 0 0000554C 89F2 mov dx, si ; cx:dx -> our entrypoint 0 0000554E CD31 int 31h ; change vector to our handler 0 00005550 C3 retn 48 49 .rm: 50 %endif 51 0 00005551 E8[0000] call InDOS 0 00005554 7419 jz .notindos 0 00005556 06 push es 0 00005557 1E push ds 56 %if 0 && _PM 57 push ax 58 dualcall push_if 59 %else 0 00005558 9C pushf 61 %endif 0 00005559 E82600 call access_ivt_86m 0 0000555C C417 les dx, [bx] ; es:dx = vector 0 0000555E 36895402 mov word [ss:si + ieNext], dx 0 00005562 368C4404 mov word [ss:si + ieNext + 2], es 66 ; save prior vector 0 00005566 8937 mov word [bx], si 0 00005568 8C5702 mov word [bx + 2], ss ; ss => lDEBUG_DATA_ENTRY 69 ; change vector to our handler 70 %if 0 && _PM 71 dualcall pop_if 72 %else 0 0000556B 9D popf 74 %endif 0 0000556C 1F pop ds 0 0000556D 07 pop es 0 0000556E C3 retn 78 79 .notindos: 0 0000556F 06 push es 0 00005570 B435 mov ah, 35h 0 00005572 CD21 int 21h 0 00005574 895C02 mov word [si + ieNext], bx 0 00005577 8C4404 mov word [si + ieNext + 2], es 0 0000557A 07 pop es 0 0000557B B425 mov ah, 25h 0 0000557D 89F2 mov dx, si ; ds => lDEBUG_DATA_ENTRY 0 0000557F CD21 int 21h ; change vector to our handler 0 00005581 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 00005582 31DB xor bx, bx 0 00005584 8EDB mov ds, bx 0 00005586 88C3 mov bl, al 0 00005588 01DB add bx, bx 0 0000558A 01DB add bx, bx ; ds:bx -> interrupt vector 0 0000558C FA cli 0 0000558D C3 retn 104 105 106 %if _PM 107 get_86m_interrupt_handler_no_dos: 0 0000558E E8[0000] call ispm 0 00005591 7519 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 0 00005593 E8[0000] call ispm 0 00005596 750F jnz .rm 119 0 00005598 50 push ax 0 00005599 51 push cx 0 0000559A 93 xchg ax, bx ; bl = interrupt number 0 0000559B B80002 mov ax, 0200h 0 0000559E CD31 int 31h ; cx:dx = interrupt vector 0 000055A0 87CB xchg cx, bx ; bx:dx 0 000055A2 87DA xchg bx, dx ; dx:bx 0 000055A4 59 pop cx 0 000055A5 58 pop ax 0 000055A6 C3 retn 130 131 .rm: 132 %endif 133 0 000055A7 E8[0000] call InDOS 0 000055AA 740D jz .notindos 136 %ifn _PM 137 get_86m_interrupt_handler_no_dos: equ $ 138 %endif 139 .rm_indos: 0 000055AC 1E push ds 141 %if 0 && _PM 142 push ax 143 dualcall push_if 144 %else 0 000055AD 9C pushf 146 %endif 0 000055AE E8D1FF call access_ivt_86m 0 000055B1 8B5702 mov dx, word [bx + 2] 0 000055B4 8B1F mov bx, word [bx] 150 %if 0 && _PM 151 dualcall pop_if 152 %else 0 000055B6 9D popf 154 %endif 0 000055B7 1F pop ds 0 000055B8 C3 retn 157 158 .notindos: 0 000055B9 06 push es 0 000055BA B435 mov ah, 35h 0 000055BC CD21 int 21h 0 000055BE 8CC2 mov dx, es 0 000055C0 07 pop es 0 000055C1 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 000055C2 E8CEFF call get_86m_interrupt_handler 0 000055C5 43 inc bx 0 000055C6 7402 jz @F ; was 0FFFFh --> 0 000055C8 85D2 test dx, dx 176 ; jz @F ; was 0000h --> 177 @@: 0 000055CA 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 000055CB 50 push ax 0 000055CC 53 push bx 0 000055CD 51 push cx 0 000055CE 52 push dx 189 %if _PM 0 000055CF E8[0000] call ispm 0 000055D2 750A jnz .rm 192 0 000055D4 93 xchg ax, bx ; bl = interrupt number, 194 ; dx:ax = vector 0 000055D5 92 xchg ax, dx ; ax:dx 0 000055D6 91 xchg cx, ax ; cx:dx 0 000055D7 B80102 mov ax, 0201h 0 000055DA CD31 int 31h ; cx:dx = interrupt vector 0 000055DC EB1C jmp .ret 200 201 .rm: 202 %endif 203 0 000055DE 1E push ds 0 000055DF E8[0000] call InDOS 0 000055E2 740D jz .notindos 207 %if 0 && _PM 208 push ax 209 dualcall push_if 210 %else 0 000055E4 9C pushf 212 %endif 0 000055E5 53 push bx 0 000055E6 E899FF call access_ivt_86m 0 000055E9 895702 mov word [bx + 2], dx 0 000055EC 8F07 pop word [bx] 217 %if 0 && _PM 218 dualcall pop_if 219 %else 0 000055EE 9D popf 221 %endif 0 000055EF EB08 jmp .ret_ds 223 224 .notindos: 0 000055F1 87DA xchg bx, dx 0 000055F3 8EDB mov ds, bx ; ds:dx = vector 0 000055F5 B425 mov ah, 25h 0 000055F7 CD21 int 21h 229 .ret_ds: 0 000055F9 1F pop ds 231 .ret: 0 000055FA 5A pop dx 0 000055FB 59 pop cx 0 000055FC 5B pop bx 0 000055FD 58 pop ax 0 000055FE 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 0 000055FF E8[0000] call ispm 0 00005602 7508 jnz @F 0 00005604 53 push bx 0 00005605 E8[0000] call setrmsegm 0 00005608 8EC3 mov es, bx 0 0000560A 5B pop bx 0 0000560B C3 retn 251 252 @@: 0 0000560C 8EC2 mov es, dx 0 0000560E C3 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 0000560F 50 push ax 0 00005610 51 push cx 0 00005611 52 push dx 0 00005612 57 push di 0 00005613 56 push si 0 00005614 06 push es 272 %if _PM 0 00005615 E8[0000]EB02[0000] dualcall selector_to_segment 274 %endif 0 0000561C 1E push ds 0 0000561D 16 push ss 0 0000561E 1F pop ds 0 0000561F E85000 call findinstalleddebugger 0 00005622 A3[0000] mov word [debuggerfunction], ax 0 00005625 1F pop ds ; must be not using scratchsel ! 281 %if _PM 0 00005626 5A pop dx 0 00005627 E8D5FF call setes2dx ; this one uses scratchsel 284 %else 285 pop es 286 %endif 0 0000562A 5E pop si 0 0000562B 5F pop di 0 0000562C 5A pop dx 0 0000562D 59 pop cx 0 0000562E 85C0 test ax, ax ; found the debugger ? 0 00005630 742B jz @F ; no --> 293 %if _PM 0 00005632 E8[0000] call ispm 0 00005635 751E jnz .86m 296 [cpu 286] 0 00005637 06 push es ; es 0 00005638 E8[0000]EB02[0000] dualcall selector_to_segment ; convert to segment 0 0000563F 1E push ds ; ds 0 00005640 E8[0000]EB02[0000] dualcall selector_to_segment ; convert to segment 0 00005647 6A2D push word 2Dh ; int 2Dh 0 00005649 55 push bp ; bp 0 0000564A E8[0000]EB02[0000] dualcall intcall_return_parameter_es_parameter_ds 0 00005651 83C404 add sp, 4 ; discard returned ds, es 305 __CPU__ 0 00005654 A9 db __TEST_IMM16 ; (skip int) 307 %endif 308 .86m: 0 00005655 CD2D int 2Dh ; call its Update IISP Header function 0 00005657 3CFF cmp al, 0FFh ; supported ? 0 00005659 58 pop ax 0 0000565A 7415 je .ret ; yes. done --> 0 0000565C A8 db __TEST_IMM8 ; (skip pop) 314 @@: 0 0000565D 58 pop ax ; restore ax, then do manual update 316 %endif 317 %if _PM 0 0000565E 50 push ax 0 0000565F E8[0000]EB02[0000] dualcall push_if 320 %else 321 pushf 322 %endif 0 00005666 FA cli ; try to rest while updating chain 0 00005667 A7 cmpsw ; skip over first word (entrypoint) 325 ; (generally xxEBh or 0EA90h) 0 00005668 A5 movsw 0 00005669 A5 movsw ; transfer source ieNext to dest ieNext 328 %if _PM 0 0000566A E8[0000]EB02[0000] dualcall pop_if 330 %else 331 popf 332 %endif 333 .ret: 0 00005671 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 00005672 B02D mov al, 2Dh 0 00005674 53 push bx 0 00005675 E84AFF call intchk 0 00005678 5B pop bx 0 00005679 741E jz .zero 349 0 0000567B F606[0300]08 testopt [options3], opt3_no_call_amis 0 00005680 7517 jnz .zero 352 0 00005682 8A26[0000] mov ah, byte [try_debugger_amis_multiplex_number] 0 00005686 E81400 call .check 0 00005689 7305 jnc @F 356 0 0000568B B4FF mov ah, 0FFh ; start with multiplex number 0FFh 358 .loop: 0 0000568D E80D00 call .check 360 @@: 0 00005690 B030 mov al, 30h ; al = 30h to indicate found, ah = multiplex number 0 00005692 7308 jnc .end ; if found --> (NC) 0 00005694 80EC01 sub ah, 1 ; search is backward (to find latest installed first), from 0FFh to 00h including 0 00005697 73F4 jnc .loop ; try next if we didn't check all yet --> 365 366 .zero: 0 00005699 31C0 xor ax, ax ; al = 0 to indicate none found 0 0000569B F9 stc ; (CY) 369 .end: 0 0000569C 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 0000569D F606[0000]08 testopt [internalflags4], dif4_int_2D_hooked 0 000056A2 7406 jz @F 0 000056A4 3A26[0000] cmp ah, byte [amis_multiplex_number] 0 000056A8 7416 je .notfound ; do not use our own multiplexer --> 386 @@: 387 %endif 0 000056AA B000 mov al, 00h ; AMIS installation check 389 %if _PM 0 000056AC E8[0000] call call_int2D 391 %else 392 int 2Dh ; AMIS (or "DOS reserved" = iret if no AMIS present) 393 %endif 0 000056AF 3CFF cmp al, 0FFh 0 000056B1 750D jne .notfound 0 000056B3 BE[0000] mov si, debuggeramissig ; ds:si -> our AMIS name strings 397 %if _PM 0 000056B6 E846FF call setes2dx 399 %else 400 mov es, dx ; es:di -> name strings of AMIS multiplexer that just answered 401 %endif 0 000056B9 B90800 mov cx, 8 ; Ignore description, only compare vendor and program name 0 000056BC F3A7 repe cmpsw 0 000056BE 7401 je .checkret ; ZR, NC = match --> 405 .notfound: 0 000056C0 F9 stc ; CY no match 407 .checkret: 0 000056C1 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 000056C2 E80F00 call UnhookInterrupt 0 000056C5 730C jnc .ret 0 000056C7 83FAFF cmp dx, -1 0 000056CA 7416 je UnhookInterrupt.easy 0 000056CC 8516[0200] test word [options4 + 2], dx 0 000056D0 7510 jnz UnhookInterrupt.easy 0 000056D2 F9 stc 431 .ret: 0 000056D3 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 000056D4 E82900 call UnhookInterruptSim 0 000056D7 721E jc .ret ; bad. --> (CY) 0 000056D9 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 000056DB 56 push si 0 000056DC E830FF call update_iisp_header ; copies our stored pointer into the other's entry 0 000056DF 5E pop si ; restore --> header 0 000056E0 EB0D jmp .done 465 .easy: 0 000056E2 52 push dx 0 000056E3 53 push bx 0 000056E4 8B5404 mov dx, word [si + ieNext + 2] 0 000056E7 8B5C02 mov bx, word [si + ieNext] ; get what we stored in the entry 0 000056EA E8DEFE call set_86m_interrupt_handler ; easy case - just reset to the value stored 0 000056ED 5B pop bx 0 000056EE 5A pop dx 473 .done: 0 000056EF 834C04FF or word [si + ieNext + 2], -1 0 000056F3 834C02FF or word [si + ieNext], -1 ; (NC) 476 .ret: 0 000056F7 16 push ss 0 000056F8 07 pop es 0 000056F9 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 000056FA 8516[0200] test word [options4 + 2], dx 0 000056FE 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 00005700 52 push dx 0 00005701 53 push bx 512 513 ; harden this, check we are an IISP entry 0 00005702 1E push ds 0 00005703 07 pop es ; es => our handler segment 0 00005704 89F3 mov bx, si ; es:bx -> our handler 0 00005706 E8A200 call IsIISPEntry? ; does it have an IISP header ? 0 00005709 753D jne .fail ; fail if not 519 0 0000570B E885FE call get_86m_interrupt_handler ; get current vector 0 0000570E 39DE cmp si, bx ; our pointer ? 0 00005710 750C jne .hard 0 00005712 3916[0000] cmp word [pspdbg], dx ; our segment ? 0 00005716 7506 jne .hard 525 0 00005718 80E400 and ah, 00h ; NC, ZR 0 0000571B 5B pop bx 0 0000571C 5A pop dx 529 .retn: 0 0000571D C3 retn 531 532 .hard: 533 %if _PM 0 0000571E E8DEFE call setes2dx 535 %else 536 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 00005721 E87100 call SearchIISPChain 0 00005724 7508 jne .harder 551 .found: ; found reference to our interrupt handler 0 00005726 89DF mov di, bx ; es:di-> IISP entry that references our's 0 00005728 80CCFF or ah, 0FFh ; NC, NZ 0 0000572B 5B pop bx 0 0000572C 5A pop dx 0 0000572D 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 0000572E 51 push cx 0 0000572F 50 push ax ; register with interrupt number last 575 0 00005730 B02D mov al, 2Dh 0 00005732 E88DFE call intchk ; ZR if offset = -1 or segment = 0 578 ; CHG: ax, dx, bx 0 00005735 740F jz .fail_ax_cx 580 0 00005737 31C0 xor ax, ax 582 .loopplex: 0 00005739 B000 mov al, 00h ; AMIS installation check 584 ; function 0 changes dx, di, cx, al 585 %if _PM 0 0000573B E8[0000] call call_int2D 587 %else 588 int 2Dh ; enquire whether there's anyone 589 %endif 590 ; but we don't care who it might be 0 0000573E FEC0 inc al ; = FFh ? 0 00005740 740A jz .search ; yes, it is in use --> 593 .nextplex: 0 00005742 FEC4 inc ah 0 00005744 75F3 jnz .loopplex ; try next multiplexer --> 596 .fail_ax_cx: 0 00005746 58 pop ax 0 00005747 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 00005748 F9 stc 0 00005749 5B pop bx 0 0000574A 5A pop dx 0 0000574B 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 0000574C B004 mov al, 04h 0 0000574E 5B pop bx 0 0000574F 53 push bx ; low byte is the interrupt number 613 ; function 4 changes dx, bx, al 614 %if _PM 0 00005750 E8[0000] call call_int2D 616 %else 617 int 2Dh 618 %endif 0 00005753 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 00005755 742B je .search_dxbx 0 00005757 3C04 cmp al, 04h ; returned list of hooked interrupts ? 0 00005759 75E7 jne .nextplex ; no, try next multiplexer --> 0 0000575B 89DF mov di, bx 0 0000575D 5B pop bx 0 0000575E 53 push bx ; bl = interrupt number 0 0000575F 88D8 mov al, bl 630 .search_intlist_seg: 631 %if _PM 0 00005761 E89BFE call setes2dx 633 %else 634 mov es, dx ; es:di-> list 635 %endif 636 .search_intlist: 637 ; Search the returned list for the required interrupt number. 0 00005764 AE scasb ; our interrupt number ? 0 00005765 740A je .search_found_intlist 0 00005767 26807DFF2D cmp byte [es:di-1], 2Dh ; was last in list ? 0 0000576C 74D4 je .nextplex 0 0000576E AF scasw ; skip pointer 0 0000576F EBF3 jmp short .search_intlist ; try next entry --> 644 645 .search_found_intlist: 0 00005771 268B1D mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 0 00005774 AF scasw ; skip pointer 0 00005775 52 push dx ; preserve dx for .search_intlist_seg 0 00005776 E81C00 call SearchIISPChain 0 00005779 5A pop dx 0 0000577A 740E 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 0000577C 3C2D cmp al, 2Dh ; was last in list ? 0 0000577E 74C2 je .nextplex 0 00005780 EBDF jmp short .search_intlist_seg 659 660 .search_dxbx: 661 %if _PM 0 00005782 E87AFE call setes2dx 663 %else 664 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 00005785 E80D00 call SearchIISPChain 0 00005788 75B8 jne .nextplex ; didn't find our entry in the chain --> 671 .search_found: 0 0000578A 58 pop ax 0 0000578B 59 pop cx 0 0000578C EB98 jmp short .found 675 676 677 SearchIISPChain.next: 678 %if _PM 679 ; dx already next segment 0 0000578E 268B5F02 mov bx, word [es:bx + ieNext] ; get next offset 0 00005792 E86AFE call setes2dx ; point es:bx -> next handler 682 %else 683 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 00005795 E81300 call IsIISPEntry? ; that an IISP entry ? 0 00005798 7510 jnz .return ; nope --> (NZ) 0 0000579A 268B5704 mov dx, word [es:bx + ieNext + 2] ; (for _PM: dx = next segment) 0 0000579E 263B7702 cmp si, word [es:bx + ieNext] ; our offset ? 0 000057A2 75EA jne .next ; no, try next --> 0 000057A4 3B16[0000] cmp dx, word [pspdbg] ; our segment ? 0 000057A8 75E4 jne .next ; no, try next --> 700 .return: ; yes, found (ZR) 0 000057AA 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 000057AB 83FBF8 cmp bx, - (ieSignature + 2) ; may access word at offset FFFFh ? 0 000057AE 7728 ja .return ; yes, avoid --> (NZ) 0 000057B0 26817F064B42 cmp word [ es:bx + ieSignature ], "KB" ; "KB"/424Bh ? ("BK" in MASM) 0 000057B6 7520 jne .return 0 000057B8 26813F90EA cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 0 000057BD 7419 je .return ; unused IISP entry (created by iHPFS) --> 0 000057BF 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 000057C3 7513 jne .return 0 000057C5 26807F09EB cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ... ? 0 000057CA 740C je .return ; usual IISP entry --> 0 000057CC 26807F09CB cmp byte [ es:bx + ieJmphwreset ], 0CBh ; retf ? 0 000057D1 7405 je .return ; a shorter variant --> 0 000057D3 26807F09CF cmp byte [ es:bx + ieJmphwreset ], 0CFh ; iret ? 724 .return: 0 000057D8 C3 retn 726 727 728 ; ! might be called with unknown ss 729 update_inttab_optional: 0 000057D9 50 push ax 0 000057DA 53 push bx 0 000057DB 51 push cx 0 000057DC 52 push dx 0 000057DD 56 push si 0 000057DE BE[0000] mov si, inttab_optional 0 000057E1 BB[0000] mov bx, inttab 737 .loop: 0 000057E4 AD lodsw 0 000057E5 91 xchg ax, cx 0 000057E6 E314 jcxz .end 0 000057E8 AD lodsw 0 000057E9 91 xchg ax, cx 0 000057EA 92 xchg ax, dx 0 000057EB AD lodsw 0 000057EC 92 xchg ax, dx 0 000057ED 8516[0000] test word [internalflags4], dx 0 000057F1 7407 jz .next 0 000057F3 4B dec bx 0 000057F4 4B dec bx 0 000057F5 890F mov word [bx], cx 0 000057F7 4B dec bx 0 000057F8 8807 mov byte [bx], al 753 .next: 0 000057FA EBE8 jmp .loop 755 756 .end: 0 000057FC 891E[0000] mov word [amisintr_offset], bx 0 00005800 5E pop si 0 00005801 5A pop dx 0 00005802 59 pop cx 0 00005803 5B pop bx 0 00005804 58 pop ax 0 00005805 C3 retn 764 === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00002808 ???????? eldhSignature: resb 4 ; "ELD1" 0 0000280C ?????? resb 3 ; reserved 0 0000280F ?? resb 1 ; 26 (Ctrl-Z) 0 00002810 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00002814 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002816 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002818 ???????? eldhDataOffset: resd 1 0 0000281C ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000281E ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00002820 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00002822 ???????? eldhReserved: resb 4 ; reserved 0 00002826 ???? 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 00002828 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 0000282C ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00002830 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00002834 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002808 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00002810 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00002814 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002816 ???? 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 00002808 ???? 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 0000280A ???? eldltAmount: resw 1 0 0000280C ???????? 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 00002808 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 0000280A ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 0000280C ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000280E ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00002810 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002818 ???? 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 00002808 ???? eldlSignature: resw 1 ; 0E1D1h 0 0000280A ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 0000280C ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 0000280E ???? eldlUseLinkHash: resw 1 0 00002810 ???? eldlDataAmount: resw 1 0 00002812 ???? eldlDataPrefixes: resw 1 0 00002814 ???? eldlDataEntries: resw 1 0 00002816 ???? eldlDataAddresses: resw 1 0 00002818 ???? eldlCodeAmount: resw 1 0 0000281A ???? eldlCodePrefixes: resw 1 0 0000281C ???? eldlCodeEntries: resw 1 0 0000281E ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00002820 ???? eldlDualAmount: resw 1 0 00002822 ???? eldlDualPrefixes: resw 1 0 00002824 ???? eldlDualEntries: resw 1 0 00002826 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00002808 ???? ifKeyword: resw 1 0 0000280A ???? ifDescription: resw 1 0 0000280C ???? ifOptions: resw 1 0 0000280E ???? ifValue: resw 1 0 00002810 ???? ifTrying: resw 1 0 00002812 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00002808 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 0000280C ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00002810 ???? smName1: resw 1 ; -> first string part 0 00002812 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00002814 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00002816 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00002818 ???? smBaseNext: resw 1 0 0000281A ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 0000281C ???? smSpecialNext: resw 1 0 0000281E ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00002808 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00002809 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 0000280A ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00002808 ???? shHash: resw 1 ; hash value 0 0000280A ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00002808 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 0000280C ???? xmsmSourceHandle: resw 1 0 0000280E ???????? xmsmSourceAddress: resd 1 0 00002812 ???? xmsmDestHandle: resw 1 0 00002814 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 00005806 56 push si 0 00005807 87D7 xchg dx, di 35 <1> .loop: 0 00005809 AC lodsb 0 0000580A E84800 call %[PREFIX]capitalise 0 0000580D AE scasb 0 0000580E 7506 jne .mismatch 0 00005810 84C0 test al, al ; NC 0 00005812 75F5 jne .loop 42 <1> ; ZR 0 00005814 EB39 jmp .matched_zr_nc 44 <1> 45 <1> .mismatch: 0 00005816 E85800 call %[PREFIX]iseol? 0 00005819 742D je .checkend 0 0000581B 3C20 cmp al, 32 0 0000581D 7429 je .checkend 0 0000581F 3C09 cmp al, 9 0 00005821 7425 je .checkend 0 00005823 3C2E cmp al, '.' 0 00005825 7421 je .checkend 0 00005827 3C2C cmp al, ',' 0 00005829 741D je .checkend 0 0000582B 3C3D cmp al, '=' 0 0000582D 7419 je .checkend 0 0000582F 3C3A cmp al, ':' 0 00005831 7415 je .checkend 0 00005833 3C5B cmp al, '[' 0 00005835 7411 je .checkend 0 00005837 3C5D cmp al, ']' 0 00005839 740D je .checkend 0 0000583B 3C28 cmp al, '(' 0 0000583D 7409 je .checkend 0 0000583F 3C29 cmp al, ')' 0 00005841 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 00005843 5E pop si 0 00005844 F9 stc ; CY 80 <1> .ret: 0 00005845 87D7 xchg dx, di 0 00005847 C3 retn 83 <1> 84 <1> .checkend: 0 00005848 26807DFF00 cmp byte [es:di - 1], 0 0 0000584D 75F4 jne .ret_nz 87 <1> ; ZR, NC 88 <1> .matched_zr_nc: ; ZR, NC 0 0000584F 5F pop di ; (discard) 0 00005850 8D74FF lea si, [si - 1] ; -> separator (preserve ZR) 0 00005853 EBF0 jmp .ret 92 <1> 93 <1> 94 <1> %[PREFIX]capitalise: section_of_function 0 00005855 3C61 cmp al, 'a' 0 00005857 7206 jb .ret 0 00005859 3C7A cmp al, 'z' 0 0000585B 7702 ja .ret 0 0000585D 24DF and al, TOUPPER 100 <1> .ret: 0 0000585F C3 retn 102 <1> 103 <1> %ifempty PREFIX 104 <1> iseol?_or_then: 105 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00005860 F606[0300]08 testopt [internalflags3], dif3_in_if 0 00005865 740A jz iseol? 0 00005867 BA[0000] mov dx, msg.then 0 0000586A 4E dec si 0 0000586B E898FF call isstring? 0 0000586E 740B je iseol?.ret 0 00005870 AC lodsb 113 <1> %endif 114 <1> %endif 115 <1> 116 <1> %[PREFIX]iseol?: 0 00005871 3C3B cmp al, ';' 0 00005873 7406 je .ret 119 <1> .notsemicolon: 0 00005875 3C0D cmp al, 13 ; this *IS* iseol? 0 00005877 7402 je .ret 0 00005879 3C00 cmp al, 0 123 <1> .ret: 0 0000587B 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 0000587C 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 0000587D E82C00 call %[PREFIX]skipwh0 0 00005880 3C2C cmp al, ',' 0 00005882 7510 jne .return ; if no comma 0 00005884 56 push si 0 00005885 E82300 call %[PREFIX]skipwhite 0 00005888 E8E6FF call %[PREFIX]iseol? 0 0000588B 7504 jne .noteol ; if not end of line 0 0000588D 5E pop si 0 0000588E B02C mov al, ',' 0 00005890 C3 retn 149 <1> .noteol: 0 00005891 83C402 add sp, byte 2 ; pop si into nowhere 151 <1> .return: 0 00005894 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 00005895 AC lodsb 158 <1> %[PREFIX]skipequ0: 0 00005896 E81300 call %[PREFIX]skipwh0 0 00005899 3C3D cmp al, '=' 0 0000589B 7503 jne .return 0 0000589D E80B00 call %[PREFIX]skipwhite 163 <1> .return: 0 000058A0 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 000058A1 AC lodsb 0 000058A2 24DF and al, TOUPPER 0 000058A4 2C41 sub al, 'A' 0 000058A6 3C19 cmp al, 'Z'-'A' 0 000058A8 76F7 jbe . 0 000058AA 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 000058AB 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 000058AC 3C20 cmp al, 32 0 000058AE 74FB je %[PREFIX]skipwhite 0 000058B0 3C09 cmp al, 9 0 000058B2 74F7 je %[PREFIX]skipwhite 0 000058B4 F8 clc 0 000058B5 C3 retn 27 28 29 ; REM: call skipcomma/skipcomm0 before this! 30 chkeol_or_then: 31 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 000058B6 E8A7FF call iseol?_or_then 0 000058B9 74C0 je iseol?.ret ; if EOL --> 0 000058BB 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 000058BD E8ECFF call skipwh0 0 000058C0 E8AEFF call iseol? 0 000058C3 74B6 je iseol?.ret ; if EOL --> 48 49 @@: 0 000058C5 B80001 mov ax, 0100h 0 000058C8 E8[0000] call setrc 52 errorj8: 0 000058CB E9[0000] jmp error 54 55 56 ; SHOWSTRING - Print ASCIZ string. 57 showstring.next: 0 000058CE AA stosb 59 showstring: 0 000058CF AC lodsb 0 000058D0 84C0 test al, al 0 000058D2 75FA jnz .next 0 000058D4 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 000058D5 50 push ax 0 000058D6 51 push cx 0 000058D7 B96400 mov cx, 100 0 000058DA E80B00 call .div 0 000058DD B10A mov cl, 10 0 000058DF E80600 call .div 0 000058E2 0430 add al, '0' 0 000058E4 AA stosb 0 000058E5 59 pop cx 0 000058E6 58 pop ax 0 000058E7 C3 retn 84 85 .div: 0 000058E8 30E4 xor ah, ah 0 000058EA F6F1 div cl 0 000058EC 08C5 or ch, al 0 000058EE 7403 jz .leadingzero 0 000058F0 0430 add al, '0' 0 000058F2 AA stosb 92 .leadingzero: 0 000058F3 86C4 xchg al, ah 0 000058F5 C3 retn 95 96 97 decword: section_of_function 0 000058F6 52 push dx 0 000058F7 31D2 xor dx, dx 0 000058F9 E80200 call decdword 0 000058FC 5A pop dx 0 000058FD C3 retn 103 104 105 decdword: section_of_function 0 000058FE 51 push cx 0 000058FF 31C9 xor cx, cx 0 00005901 E80200 call dec_dword_minwidth 0 00005904 59 pop cx 0 00005905 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 00005906 5589E58D66F6 lenter 126 lvar dword, dividend 0 0000590C 52 push dx 0 0000590D 50 push ax 0 0000590E 49 dec cx 130 lvar word, minwidth 0 0000590F 51 push cx 0 00005910 41 inc cx 133 0 00005911 50 push ax 0 00005912 53 push bx 0 00005913 51 push cx 0 00005914 52 push dx 0 00005915 56 push si 0 00005916 57 push di 0 00005917 06 push es 141 0 00005918 16 push ss 0 00005919 07 pop es 144 0 0000591A 8D7EFF lea di, [bp + ?buffer + ?bufferlen - 1] 0 0000591D 89FB mov bx, di 0 0000591F FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 148 149 ; dword [bp + ?dividend] = number to display 0 00005920 B90A00 mov cx, 10 ; divisor 151 .loop_write: 152 0 00005923 31D2 xor dx, dx 0 00005925 57 push di 0 00005926 BF0400 mov di, 4 156 .loop_divide: 0 00005929 8B43F0 mov ax, [bp + ?dividend - 2 + di] 0 0000592C F7F1 div cx 0 0000592E 8943F0 mov word [bp + ?dividend - 2 + di], ax 0 00005931 4F dec di 0 00005932 4F dec di 0 00005933 75F4 jnz .loop_divide 163 ; dx = last remainder 0 00005935 5F pop di 0 00005936 92 xchg ax, dx ; ax = remainder (next digit) 166 ; dword [bp + ?dividend] = result of div 0 00005937 0430 add al, '0' 0 00005939 AA stosb 0 0000593A FF4EF0 dec word [bp + ?minwidth] 0 0000593D 79E4 jns .loop_write 171 0 0000593F 837EF400 cmp word [bp + ?dividend + 2], 0 0 00005943 75DE jnz .loop_write 0 00005945 837EF200 cmp word [bp + ?dividend], 0 175 ; any more ? 0 00005949 75D8 jnz .loop_write ; loop --> 177 0 0000594B FC cld 179 0 0000594C 29FB sub bx, di 0 0000594E 89D9 mov cx, bx 0 00005950 89FE mov si, di 0 00005952 46 inc si 184 0 00005953 07 pop es 0 00005954 5F pop di 187 188 @@: 0 00005955 36A4 ss movsb ; do not replace by rep ss movsb, because 190 ; some 8086 don't like two-prefix opcodes 0 00005957 E2FC loop @B 192 0 00005959 5E pop si 0 0000595A 5A pop dx 0 0000595B 59 pop cx 0 0000595C 5B pop bx 0 0000595D 58 pop ax 198 0 0000595E 89EC5D lleave 0 00005961 C3 retn 201 202 203 ; dump high word of eax - assumes 386 204 hexword_high: section_of_function 205 [cpu 386] 0 00005962 66C1C010 rol eax, 16 0 00005966 E80800 call hexword 0 00005969 66C1C010 rol eax, 16 209 __CPU__ 0 0000596D 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 0000596E E8F1FF call hexword_high 220 hexword: section_of_function 0 00005971 86C4 xchg al, ah 0 00005973 E80200 call hexbyte 0 00005976 86C4 xchg al, ah 224 225 hexbyte: section_of_function 0 00005978 51 push cx 0 00005979 B104 mov cl, 4 0 0000597B D2C0 rol al, cl 0 0000597D E80300 call hexnyb 0 00005980 D2C0 rol al, cl 0 00005982 59 pop cx 232 233 hexnyb: section_of_function 0 00005983 50 push ax 0 00005984 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 00005986 3C0A cmp al, 10 ; set CF according to digit <= 9 0 00005988 1C69 sbb al, 69h ; read CF, set CF and conditionally set AF 0 0000598A 2F das ; magic, which happens to work 0 0000598B AA stosb 0 0000598C 58 pop ax 0 0000598D 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 0000598E 50 push ax 0 0000598F 48 dec ax ; make sure at least two blanks 0 00005990 39F8 cmp ax, di 0 00005992 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 00005994 E80B00 call trimputs 0 00005997 BF[0000] mov di, line_out 272 .sameline: 0 0000599A 59 pop cx 0 0000599B 29F9 sub cx, di 0 0000599D B020 mov al, 32 0 0000599F F3AA rep stosb ; space fill to the right end 277 puts.retn: 0 000059A1 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 000059A2 4F dec di 0 000059A3 26803D20 cmp byte [es:di], 32 0 000059A7 74F9 je trimputs 0 000059A9 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 000059AA B80D0A mov ax, 10<<8| 13 0 000059AD 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 000059AE 89F9 mov cx, di 0 000059B0 BA[0000] mov dx, line_out 0 000059B3 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 000059B5 91 xchg ax, cx 0 000059B6 8B0E[0000] mov cx, word [ext_puts_handler] 0 000059BA E308 jcxz @F 331 check_section_of puts_ext_next 332 puts_ext_next: equ $ 0 000059BC E9551A jmp transfer_ext_cx_NC 334 335 check_section_of puts_ext_done 336 puts_ext_done: equ $ 0 000059BF 59 pop cx 0 000059C0 59 pop cx 0 000059C1 59 pop cx ; discard return addresses 0 000059C2 72DD jc .retn 341 342 @@: 0 000059C4 91 xchg ax, cx 344 %endif 345 346 %if _IMMASM 0 000059C5 F606[0300]01 testopt [internalflags6], dif6_immasm_no_output 0 000059CA 75D5 jnz .retn 349 %endif 350 %if _RH 0 000059CC D006[0000] rol byte [skip_rh], 1 0 000059D0 7218 jc .no_rh 353 %endif 354 %if !_LOADER 0 000059D2 F606[0300]20 testopt [internalflags], tt_silence 0 000059D7 7403E95403 jnz puts_silence 357 %endif 358 %if _RH 0 000059DC F606[0200]30 testopt [internalflags6], dif6_rh_mode | dif6_rh_mode_2 0 000059E1 7407 jz @F 0 000059E3 52 push dx 0 000059E4 51 push cx 0 000059E5 E84803 call puts_silence ; also copy to auxbuff 0 000059E8 59 pop cx 0 000059E9 5A pop dx 366 @@: 367 %endif 368 .no_rh: 369 0 000059EA F606[0100]60 testopt [internalflags3], dif3_unquiet 0 000059EF 7507 jnz @F 0 000059F1 F606[0100]10 testopt [internalflags3], dif3_quiet_output 0 000059F6 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 000059F8 91 xchg ax, cx 0 000059F9 8B0E[0000] mov cx, word [ext_puts_copyoutput_handler] 0 000059FD E308 jcxz @F 0 000059FF E9121A jmp transfer_ext_cx_NC 385 386 check_section_of puts_copyoutput_ext_done 387 puts_copyoutput_ext_done: equ $ 0 00005A02 59 pop cx 0 00005A03 59 pop cx 0 00005A04 59 pop cx ; discard return addresses 0 00005A05 729A jc .retn 392 393 @@: 0 00005A07 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 00005A08 F606[0000]10 testopt [options], nonpagingdevice 0 00005A0D 7403E93901 jnz .display ; deactivated by user --> 0 00005A12 F606[0100]10 testopt [options3], opt3_paging_rc 0 00005A17 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 00005A19 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00005A1E 7403E92801 jnz .display 416 @@: 417 0 00005A23 F606[0100]40 testopt [options3], opt3_paging_re 0 00005A28 750C jnz @F ; enable for RE 0 00005A2A F606[0300]01 testopt [internalflags3], dif3_input_re 421 ; is RE ? 0 00005A2F 7403E91701 jnz .display ; yes, don't do paging --> 0 00005A34 EB07 jmp @FF 424 425 @@: 0 00005A36 F606[0300]01 testopt [internalflags3], dif3_input_re 427 ; is RE ? 0 00005A3B 7555 jnz .dontcheckredirection ; yes, do paging --> 429 @@: 430 0 00005A3D F606[0100]20 testopt [options3], opt3_paging_yy 0 00005A42 740E jz @F 0 00005A44 F606[0000]10 testopt [serial_flags], sf_use_serial 434 ; I/O done using serial port ? 0 00005A49 7547 jnz .dontcheckredirection ; yes, is paged --> 0 00005A4B E8[0000] call InDOS_or_BIOS_IO ; InDOS mode ? 0 00005A4E 7542 jnz .dontcheckredirection ; yes, then we display with Int10 anyway --> 0 00005A50 EB2F jmp @FF ; re-use later @@ 439 440 @@: 441 %if _INPUT_FILE_BOOT 0 00005A52 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00005A57 7403E9EF00 jnz .display 444 %endif 0 00005A5C E8[0000] call InDOS_or_BIOS_IO ; InDOS mode ? 0 00005A5F 7531 jnz .dontcheckredirection ; yes, then we display with Int10 anyway --> 447 %if _INPUT_FILE_HANDLES 0 00005A61 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00005A66 7403E9E000 jnz .display 450 %endif 0 00005A6B F606[0000]10 testopt [serial_flags], sf_use_serial 452 ; I/O done using serial port ? 0 00005A70 7520 jnz .dontcheckredirection ; yes, is paged --> 0 00005A72 E8[0000] call InDOS_or_BIOS_output 0 00005A75 750A jnz @F 0 00005A77 F606[0000]80 testopt [internalflags], outputfile 0 00005A7C 7403E9CA00 jnz .display ; output redirected to file. never page --> 458 @@: ; targeted by two branches 0 00005A81 F606[0100]01 testopt [options], nondospaging 0 00005A86 750A jnz .dontcheckredirection 0 00005A88 F606[0000]20 testopt [internalflags], inputfile 0 00005A8D 7403E9B900 jnz .display ; input redirected from a file. never page --> 463 .dontcheckredirection: 0 00005A92 57 push di 0 00005A93 51 push cx ; used as variable: remaining (not yet displayed) line length 0 00005A94 89D7 mov di, dx ; es:di-> string, cx = length 467 .looplf: 0 00005A96 85C9 test cx, cx 0 00005A98 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 00005A9D F606[0200]10 testopt [internalflags], promptwaiting ; do we have a prompt to display ? 0 00005AA2 7550 jnz .promptnow ; yes, display it before the string --> 487 0 00005AA4 31C0 xor ax, ax 0 00005AA6 F606[0000]10 testopt [serial_flags], sf_use_serial 490 ; serial ? 0 00005AAB 7409 jz @F ; no --> 0 00005AAD 0A06[0000] or al, byte [serial_rows] ; ax = number of rows if serial 0 00005AB1 7419 jz .display_pop_ZR ; if zero, do not page --> 0 00005AB3 48 dec ax ; was 1 ? (adjust to rows minus one) 0 00005AB4 7516 jnz @FF ; no, use as rows minus one --> (NZ) 496 ; ax = 0 if it was 1 497 @@: 0 00005AB6 0A06[0000] or al, [io_rows] 0 00005ABA 7410 jz .display_pop_ZR 0 00005ABC 48 dec ax ; was 1 ? (adjust to rows minus one) 0 00005ABD 750D jnz @F ; no, use as rows minus one --> (NZ) 502 ; yes, automatic (use BDA) 0 00005ABF 06 push es 0 00005AC0 B84000 mov ax, 40h ; 0040h is a bimodal segment/selector 0 00005AC3 8EC0 mov es, ax 0 00005AC5 26A08400 mov al, byte [ es:84h ] ; rows on screen 0 00005AC9 07 pop es 0 00005ACA 85C0 test ax, ax 509 @@: 510 .display_pop_ZR: 0 00005ACC 747B jz .display_pop 512 0 00005ACE 3806[0000] cmp byte [ linecounter ], al 0 00005AD2 7268 jb .notyet ; not yet reached --> 0 00005AD4 F606[0000]08 testopt [internalflags], pagedcommand ; active ? 0 00005AD9 7506 jnz .prompt ; yes, prompt --> 0 00005ADB FE0E[0000] dec byte [ linecounter ] ; keep count, but don't prompt til next LF 0 00005ADF EB5B jmp short .notyet 519 520 .prompt: 0 00005AE1 58 pop ax ; ax = length of string, cx = length of string remaining 0 00005AE2 29C8 sub ax, cx ; ax = length of string til LF 0 00005AE4 91 xchg ax, cx ; cx = til LF incl., ax = behind LF 0 00005AE5 50 push ax ; new count 525 ; cx = length til LF 526 ; es:dx-> start of part til LF 0 00005AE6 E86200 call .display ; display part of message which fits on screen 0 00005AE9 59 pop cx 0 00005AEA 51 push cx ; update cx from variable 0 00005AEB 89FA mov dx, di ; dx-> start of next part 0 00005AED 800E[0200]10 setopt [internalflags], promptwaiting ; mark as prompting necessary 0 00005AF2 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 00005AF4 52 push dx 0 00005AF5 51 push cx 0 00005AF6 C606[0000]00 mov byte [ linecounter ], 0 ; prompting, so reset the line counter 0 00005AFB 8026[0200]EF clropt [internalflags], promptwaiting 0 00005B00 06 push es 0 00005B01 16 push ss 0 00005B02 07 pop es 0 00005B03 BA[0000] mov dx, msg.more ; es:dx -> message 0 00005B06 B9[0000] mov cx, msg.more_size 0 00005B09 E83F00 call .display ; print string (avoiding a recursion) 0 00005B0C 07 pop es 553 0 00005B0D 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 00005B12 F606[0100]01 testopt [options], nondospaging 0 00005B17 7405 jz .getc 0 00005B19 E89004 call getc.raw ; get a character from BIOS 0 00005B1C EB03 jmp short .dispover 562 .getc: 0 00005B1E E87204 call getc ; get a character 564 .dispover: 0 00005B21 8026[0000]EF clropt [internalflags3], dif3_input_terminal_override 0 00005B26 3C03 cmp al, 3 ; is it Ctrl+C ? 0 00005B28 7447 je .ctrlc ; yes, handle that --> 0 00005B2A E8[0000] call handle_serial_flags_ctrl_c 0 00005B2D 06 push es 0 00005B2E 16 push ss 0 00005B2F 07 pop es 0 00005B30 BA[0000] mov dx, msg.more_over ; es:dx -> message 0 00005B33 B9[0000] mov cx, msg.more_over_size 0 00005B36 E81200 call .display ; overwrite the prompt (avoiding a recursion) 0 00005B39 07 pop es 0 00005B3A 59 pop cx 0 00005B3B 5A pop dx 578 579 .notyet: 0 00005B3C B00A mov al, 10 0 00005B3E F2AE repne scasb ; search LF 0 00005B40 7507 jne .display_pop ; none --> 583 0 00005B42 FE06[0000] inc byte [ linecounter ] ; record how many LFs will be displayed 0 00005B46 E94DFF jmp .looplf ; search for next LF --> 586 587 .display_pop: 0 00005B49 59 pop cx 0 00005B4A 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 00005B4B F606[0000]10 testopt [serial_flags], sf_use_serial 0 00005B50 752C jnz .notdos 0 00005B52 E8[0000] call InDOS_or_BIOS_output 0 00005B55 7527 jnz .notdos 599 ; es:dx -> message 0 00005B57 BB0100 mov bx, 1 ; standard output 0 00005B5A B440 mov ah, 40h ; write to file 0 00005B5C E312 jcxz @F 603 %if _PM 604 d5 push di 0 00005B5E 06 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 0 00005B5F E8[0000]EB02[0000] 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 0 00005B66 E8[0000]EB02[0000] dual2call _doscall_return_es_parameter_es_ds 0 00005B6D 83C402 add sp, 2 ; discard es returned from call 627 d5 pop di 628 %else 629 push ds 630 push es 631 pop ds ; ds:dx -> message 632 int 21h ; simply call into DOS 633 pop ds 634 %endif 635 @@: 0 00005B70 C3 retn 637 638 .ctrlc: 639 %if !_LOADER 0 00005B71 F606[0300]10 testopt [internalflags2], dif2_in_silence_dump 0 00005B76 7403 jz @F 0 00005B78 E80003 call reset_silent_mode 643 @@: 644 %endif 0 00005B7B 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 00005B7E 55 push bp 667 ; Some int 10h functions can corrupt bp, eg 668 ; 06h and 0Eh. Insure to preserve it here. 0 00005B7F 56 push si 0 00005B80 F606[0200]01 testopt [internalflags], usecharcounter 0 00005B85 7505 jnz .dontresetcharcounter 0 00005B87 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 00005B8C E35F jcxz .return 0 00005B8E 89D6 mov si, dx 682 .loop: 0 00005B90 26AC es lodsb 0 00005B92 3C09 cmp al, 9 0 00005B94 750B jne .nottab ; is no tab --> 0 00005B96 A0[0000] mov al, byte [ charcounter ] 0 00005B99 2407 and al, 7 ; at 8 character boundary ? 0 00005B9B B020 mov al, 32 ; (always replaced by blank) 0 00005B9D 7402 jz .nottab ; yes, don't use hack --> 0 00005B9F 41 inc cx 0 00005BA0 4E dec si ; find tab again next lodsb 692 .nottab: 0 00005BA1 3C0D cmp al, 13 ; (exact match for CR) 0 00005BA3 7505 jne .notcr 695 .cr: 0 00005BA5 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 00005BAA 3C0A cmp al, 10 0 00005BAC 7406 je .dontcount_lf ; must not count line feeds! 0 00005BAE FE06[0000] inc byte [ charcounter ] 726 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00005BB2 EB05 jmp @F 728 .dontcount_lf: 0 00005BB4 8026[0200]FD clropt [internalflags3], dif3_int10_highlight 730 @@: 731 %else 732 .dontcount_lf: 733 %endif 0 00005BB9 F606[0000]10 testopt [serial_flags], sf_use_serial 0 00005BBE 7405 jz @F 736 0 00005BC0 E8[0000] call serial_send_char 738 0 00005BC3 EB26 jmp .next 740 @@: 741 742 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT || _CLEAR 0 00005BC5 3C1B cmp al, 27 0 00005BC7 7427 je .try_highlight 745 746 .nohighlight: 747 %endif 0 00005BC9 8A3E[0000] mov bh, byte [vpage] ; use the current video page 749 750 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00005BCD F606[0200]02 testopt [internalflags3], dif3_int10_highlight 0 00005BD2 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 00005BD4 3C20 cmp al, 32 0 00005BD6 720D jb @F 0 00005BD8 B409 mov ah, 09h 0 00005BDA 8A1E[0000] mov bl, byte [.attribute] 0 00005BDE 51 push cx 0 00005BDF B90100 mov cx, 1 0 00005BE2 CD10 int 10h 0 00005BE4 59 pop cx 768 @@: 769 %endif 770 0 00005BE5 B307 mov bl, 7 0 00005BE7 B40E mov ah, 0Eh 0 00005BE9 CD10 int 10h 774 .next: 0 00005BEB E2A3 loop .loop 776 .return: 0 00005BED 5E pop si 0 00005BEE 5D pop bp 0 00005BEF C3 retn 780 781 782 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT || _CLEAR 783 .try_highlight: 0 00005BF0 F606[0200]02 testopt [options3], opt3_r_highlight_dumb 0 00005BF5 75D2 jnz .nohighlight 0 00005BF7 83F902 cmp cx, 2 0 00005BFA 76CD jbe .nohighlight 0 00005BFC 26803C5B cmp byte [es:si], '[' 0 00005C00 75C7 jne .nohighlight 790 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00005C02 26807C016D cmp byte [es:si + 1], 'm' 0 00005C07 742F je .highlight_reset 793 %endif 0 00005C09 83F903 cmp cx, 3 0 00005C0C 74BB je .nohighlight 796 %if _CLEAR 0 00005C0E 26807C0132 cmp byte [es:si + 1], '2' 0 00005C13 7507 jne @F 0 00005C15 26807C024A cmp byte [es:si + 2], 'J' 0 00005C1A 7458 je .clear 801 @@: 802 %endif 803 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00005C1C 26807C0137 cmp byte [es:si + 1], '7' 0 00005C21 75A6 jne .nohighlight 0 00005C23 26807C026D cmp byte [es:si + 2], 'm' 0 00005C28 759F jne .nohighlight 808 .highlight_set: 0 00005C2A E87D00 call check_dumb_mode 0 00005C2D 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 00005C2F 800E[0200]02 setopt [internalflags3], dif3_int10_highlight 0 00005C34 49 dec cx 0 00005C35 46 inc si 0 00005C36 EB05 jmp @F 818 819 .highlight_reset: 0 00005C38 E86F00 call check_dumb_mode 0 00005C3B 748C jz .nohighlight 822 ; Refer to above comment. 823 @@: 0 00005C3D 800E[0200]02 setopt [internalflags3], dif3_int10_highlight 0 00005C42 E81800 call .getattrib 0 00005C45 88E0 mov al, ah 0 00005C47 257788 and ax, 8877h 0 00005C4A D0C0 rol al, 1 0 00005C4C D0C0 rol al, 1 0 00005C4E D0C0 rol al, 1 0 00005C50 D0C0 rol al, 1 0 00005C52 08E0 or al, ah 0 00005C54 A2[0000] mov byte [.attribute], al 834 %endif 835 836 .dec_2: 0 00005C57 49 dec cx 0 00005C58 49 dec cx 0 00005C59 46 inc si 0 00005C5A 46 inc si 0 00005C5B EB8E jmp .next 842 843 .getattrib: 0 00005C5D FECA dec dl 0 00005C5F B402 mov ah, 02h 0 00005C61 8A3E[0000] mov bh, byte [vpage] 0 00005C65 CD10 int 10h ; set cursor position 0 00005C67 B408 mov ah, 08h 0 00005C69 CD10 int 10h ; read attribute to ah 0 00005C6B 50 push ax 0 00005C6C FEC2 inc dl 0 00005C6E B402 mov ah, 02h 0 00005C70 CD10 int 10h ; set cursor position 0 00005C72 58 pop ax 0 00005C73 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 00002808 00 .attribute: db 0 864 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 864 ------------------ note: usesection lDEBUG_CODE 865 %endif 866 867 %if _CLEAR 868 .clear: 0 00005C74 E83300 call check_dumb_mode 0 00005C77 7503E94DFF jz .nohighlight 871 0 00005C7C E8DEFF call .getattrib 0 00005C7F 93 xchg bx, ax ; bh = attrib 874 0 00005C80 06 push es 0 00005C81 B84000 mov ax, 40h ; bi-modal seg/sel 0 00005C84 8EC0 mov es, ax 0 00005C86 51 push cx 879 880 ; copied from RxANSI 0 00005C87 31C9 xor cx, cx 0 00005C89 268A164A00 mov dl, [es:4Ah] ; number of rows 0 00005C8E FECA dec dl 0 00005C90 268A368400 mov dh, [es:84h] ; number of columns 0 00005C95 B80006 mov ax, 0600h 0 00005C98 CD10 int 10h ; Clear screen (bh = attrib) 0 00005C9A 31D2 xor dx, dx ; Reset cursor to 0/0 0 00005C9C 8A3E[0000] mov bh, byte [vpage] 0 00005CA0 B402 mov ah, 02h 0 00005CA2 CD10 int 10h ; Set cursor 891 0 00005CA4 59 pop cx 0 00005CA5 07 pop es 894 0 00005CA6 49 dec cx 0 00005CA7 46 inc si 0 00005CA8 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 00005CAA 50 push ax 0 00005CAB 51 push cx 0 00005CAC B403 mov ah, 3 0 00005CAE 8A3E[0000] mov bh, byte [vpage] 0 00005CB2 31D2 xor dx, dx ; pre-initialise to zero 0 00005CB4 CD10 int 10h ; dl = column, dh = row 0 00005CB6 84D2 test dl, dl 0 00005CB8 7416 jz .ret 0 00005CBA F606[0300]01 testopt [internalflags], runningdosemu 0 00005CBF 740D jz .ret_NZ 0 00005CC1 B85500 mov ax, 55h ; function DOS_HELPER_GET_TERM_TYPE 0 00005CC4 CDE6 int 0E6h ; CHG: ax, bx, cx 0 00005CC6 80E401 and ah, 1 ; ax & 100h = dumb mode 0 00005CC9 80F401 xor ah, 1 ; NZ if not dumb mode 0 00005CCC EB02 jmp .ret 920 .ret_NZ: 0 00005CCE 85E4 test sp, sp ; (NZ) 922 .ret: 0 00005CD0 59 pop cx 0 00005CD1 58 pop ax 0 00005CD2 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 00005CD3 89F9 mov cx, di 0 00005CD5 BA[0000] mov dx, line_out 0 00005CD8 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 00005CDA 01C8 add ax, cx ; how much in this line if fits 0 00005CDC 8B1E[0000] mov bx, word [io_columns_getline] ; = how many columns to fill 0 00005CE0 85DB test bx, bx ; disabled ? 0 00005CE2 7415 jz .no_split ; yes, use normal handler --> 0 00005CE4 39D8 cmp ax, bx ; total <= columns ? 0 00005CE6 7611 jbe .no_input_split ; yes, back to normal code --> 0 00005CE8 56 push si 0 00005CE9 89CE mov si, cx ; si = length input 0 00005CEB 29C8 sub ax, cx ; restore last fragment length 0 00005CED 89D9 mov cx, bx 0 00005CEF 29C1 sub cx, ax ; = how much fits in first line 0 00005CF1 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 00005CF3 E81500 call puts_partial_write 0 00005CF6 91 xchg ax, cx ; ax = last fragment length 0 00005CF7 5E pop si 0 00005CF8 C3 retn 975 976 .no_split: 977 .no_input_split: 0 00005CF9 50 push ax 0 00005CFA E8B8FC call puts 0 00005CFD 58 pop ax 981 puts_break_line_more.retn: 0 00005CFE 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 00005CFF 85C0 test ax, ax 0 00005D01 75FB jnz .retn 0 00005D03 BA[0000] mov dx, crlf 0 00005D06 E92602 jmp putsz 997 998 999 puts_partial_write.loop: 0 00005D09 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 00005D0B 53 push bx 0 00005D0C 51 push cx 0 00005D0D 52 push dx 0 00005D0E E8A4FC call puts ; display partial 0 00005D11 85F6 test si, si ; more to go ? 0 00005D13 7406 jz @F ; no --> 0 00005D15 BA[0000] mov dx, crlf 0 00005D18 E81402 call putsz ; put linebreak 1017 @@: 0 00005D1B 5A pop dx 0 00005D1C 59 pop cx 0 00005D1D 5B pop bx 0 00005D1E 01CA add dx, cx ; advance pointer 0 00005D20 29DE sub si, bx ; subtract from counter 0 00005D22 73E5 jnc .loop ; still above zero, loop --> 0 00005D24 01DE add si, bx ; restore prior si value 0 00005D26 89F1 mov cx, si 0 00005D28 53 push bx 0 00005D29 51 push cx 0 00005D2A E888FC call puts ; display last part (possibly empty) 0 00005D2D 59 pop cx ; return cx 0 00005D2E 5B pop bx 0 00005D2F 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 00005D30 56 push si 0 00005D31 57 push di 1047 1048 .try_again: 0 00005D32 89D6 mov si, dx ; es:si -> message 0 00005D34 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 00005D38 A1[0000] mov ax, word [auxbuff_current_size] 0 00005D3B 48 dec ax 1057 %endif 0 00005D3C 29F8 sub ax, di ; number of bytes left free 1059 ; (+ 1 byte terminator) 0 00005D3E 7204 jc .delete 0 00005D40 39C8 cmp ax, cx ; fits ? 0 00005D42 730B jae .simple ; yes --> 1063 1064 .delete: 0 00005D44 06 push es 0 00005D45 8E06[0000] mov es, word [auxbuff_segorsel] 0 00005D49 E81600 call silence_delete_one_string 0 00005D4C 07 pop es 0 00005D4D EBE3 jmp .try_again 1070 1071 .simple: 0 00005D4F 1E push ds 0 00005D50 06 push es 0 00005D51 06 push es 0 00005D52 8E06[0000] mov es, word [auxbuff_segorsel] 1076 ; es:di -> next buffer 0 00005D56 1F pop ds ; ds:si -> message 0 00005D57 F3A4 rep movsb ; copy over 0 00005D59 07 pop es 0 00005D5A 1F pop ds 0 00005D5B 893E[0000] mov word [auxbuff_behind_last_silent], di 1082 ; update pointer 0 00005D5F 5F pop di 0 00005D60 5E pop si 0 00005D61 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 00005D62 E81F00 call .internal ; call internal implementation 0 00005D65 735D jnc .retn ; no error ? --> 1099 .error: ; else: error, abort command 0 00005D67 16 push ss 0 00005D68 1F pop ds 0 00005D69 16 push ss 0 00005D6A 07 pop es 0 00005D6B 8026[0300]DF clropt [internalflags], tt_silence 1105 %if _RH 0 00005D70 C606[0000]FF mov byte [skip_rh], 0FFh 1107 %endif 0 00005D75 BA[0000] mov dx, msg.silent_error 0 00005D78 E8B401 call putsz 0 00005D7B B83501 mov ax, 0135h 0 00005D7E E8[0000] call setrc 0 00005D81 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 00005D84 51 push cx 0 00005D85 8B0E[0000] mov cx, [auxbuff_behind_last_silent] 1124 ; -> next buffer position 1125 %if _PM 0 00005D89 8B3E[0000] mov di, word [auxbuff_switchbuffer_size] 0 00005D8D 29F9 sub cx, di 1128 %else 1129 xor di, di 1130 %endif 0 00005D8F B000 mov al, 0 0 00005D91 3C01 cmp al, 1 ; initialise to NZ (if cx is zero) 0 00005D93 F2AE repne scasb 0 00005D95 F9 stc 0 00005D96 752C jne .retn ; error, no NUL found in data (CY) 1136 ; es:di -> behind first NUL 1137 0 00005D98 89FE mov si, di ; es:si -> next message 1139 %if _RH 0 00005D9A 89F8 mov ax, di 1141 %endif 1142 %if _PM 0 00005D9C 8B3E[0000] mov di, word [auxbuff_switchbuffer_size] 1144 %if _RH 0 00005DA0 29F8 sub ax, di ; -> next minus -> first, length of first 1146 %endif 1147 %else 1148 xor di, di 1149 %endif 1150 %if _RH 0 00005DA2 2906[0000] sub word [auxbuff_start_silent], ax 1152 %if _PM 0 00005DA6 7206 jb .reset_start 0 00005DA8 393E[0000] cmp word [auxbuff_start_silent], di 1155 %endif 0 00005DAC 7304 jae @F 1157 .reset_start: 0 00005DAE 893E[0000] mov word [auxbuff_start_silent], di 1159 @@: 1160 %endif 0 00005DB2 8B0E[0000] mov cx, word [auxbuff_behind_last_silent] 0 00005DB6 06 push es 0 00005DB7 1F pop ds ; ds:si -> next message 0 00005DB8 29F1 sub cx, si ; remaining buffer 0 00005DBA F3A4 rep movsb ; move to start of silent buffer 0 00005DBC 16 push ss 0 00005DBD 1F pop ds 0 00005DBE 893E[0000] mov word [auxbuff_behind_last_silent], di 0 00005DC2 59 pop cx 0 00005DC3 F8 clc ; (NC) 1171 .retn: 0 00005DC4 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 00005DC5 F606[0300]10 testopt [internalflags], tt_silent_mode ; is in use ? 0 00005DCA 7501 jnz @F ; yes --> 0 00005DCC C3 retn ; no. simple 1188 1189 @@: 1190 %if _RH 0 00005DCD C606[0000]00 mov byte [rh_display_with_count], 0 1192 .rh.all: 0 00005DD2 B8FFFF mov ax, -1 1194 .rh: 0 00005DD5 A3[0000] mov word [auxbuff_amount_silent], ax 1196 %endif 0 00005DD8 8026[0300]DF clropt [internalflags], tt_silence 0 00005DDD 800E[0300]10 setopt [internalflags2], dif2_in_silence_dump 1199 0 00005DE2 F606[0100]01 testopt [options3], opt3_silence_paging_set 0 00005DE7 7413 jz @F 0 00005DE9 F606[0100]02 testopt [options3], opt3_silence_paging_on 0 00005DEE 7407 jz .turn_paging_off 1204 1205 .turn_paging_on: 0 00005DF0 800E[0000]08 setopt [internalflags], pagedcommand 0 00005DF5 EB05 jmp @F 1208 1209 .turn_paging_off: 0 00005DF7 8026[0000]F7 clropt [internalflags], pagedcommand 1211 @@: 1212 0 00005DFC E8BA00 call silence_get_start 0 00005DFF 741E jz .no_number_given 1215 0 00005E01 8B16[0000] mov dx, word [tt_silent_mode_number] 0 00005E05 85D2 test dx, dx 0 00005E07 7416 jz .no_number_given 1219 0 00005E09 E8BC00 call silence_count_zeroes 1221 1222 %if _RH 0 00005E0C 8B3E[0000] mov di, word [auxbuff_start_silent] 1224 ; reset to -> silent buffered data 1225 %endif 0 00005E10 29D3 sub bx, dx ; number of dumps - requested number 1227 ; = excess number of dumps 0 00005E12 760B jbe .no_number_given 1229 0 00005E14 89D9 mov cx, bx ; use excess number as loop counter 1231 @@: 1232 %if _RH 0 00005E16 51 push cx 0 00005E17 B9FFFF mov cx, -1 1235 ; mov al, 0 0 00005E1A F2AE repne scasb 0 00005E1C 59 pop cx 1238 %else 1239 call silence_delete_one_string 1240 ; delete one string 1241 %endif 0 00005E1D E2F7 loop @B ; loop for however many to delete --> 1243 1244 .no_number_given: 1245 %if _RH 0 00005E1F 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 00005E22 8E06[0000] mov es, word [auxbuff_segorsel] 0 00005E26 8B0E[0000] mov cx, word [auxbuff_behind_last_silent] 0 00005E2A 29F9 sub cx, di ; any more data ? 0 00005E2C 744B jz .return ; no, return --> 0 00005E2E B000 mov al, 0 0 00005E30 49 dec cx ; (in case of branching for next conditional) 0 00005E31 AE scasb ; starts with a NUL byte ? 0 00005E32 7404 je @F ; yes, skipped --> 0 00005E34 41 inc cx ; (restore cx to original value) 0 00005E35 4F dec di ; no, decrement 1268 %if _RH 0 00005E36 EB05 jmp @FF 1270 @@: 0 00005E38 E303 jcxz @F ; anything follows the NUL ? 0 00005E3A E84900 call .rh_display_count 1273 %endif 1274 @@: 0 00005E3D 89FE mov si, di ; es:si -> start of string 1276 0 00005E3F 81F90001 cmp cx, 256 ; cx > 256 ? 0 00005E43 7603 jbe @F ; no --> 0 00005E45 B90001 mov cx, 256 ; limit to 256 bytes per string 1280 ; (line_out is 264 bytes) 1281 @@: 0 00005E48 E32F jcxz .return ; (if single byte that was NUL remaining -->) 0 00005E4A 89CB mov bx, cx ; search string length 0 00005E4C B000 mov al, 0 0 00005E4E F2AE repne scasb ; scan for NUL bytes 0 00005E50 7505 jne @F ; (if none found: cx = 0) 1287 ; (if any found: cx = remaining length) 0 00005E52 41 inc cx ; cx = remaining length + 1 (do not output NUL) 1289 %if _RH 0 00005E53 FF0E[0000] dec word [auxbuff_amount_silent] 1291 %endif 1292 @@: 0 00005E57 29CB sub bx, cx ; search length - remaining = found length 0 00005E59 89D9 mov cx, bx ; how much to show 0 00005E5B 06 push es 0 00005E5C 1F pop ds ; ds => auxbuff (ds:si -> start of string) 0 00005E5D 16 push ss 0 00005E5E 07 pop es ; es => line_out 0 00005E5F BF[0000] mov di, line_out ; es:di -> line_out 0 00005E62 51 push cx 0 00005E63 F3A4 rep movsb ; copy over to line_out 0 00005E65 59 pop cx ; cx = message length 1303 0 00005E66 16 push ss 0 00005E67 1F pop ds ; reset seg regs to ss 0 00005E68 BA[0000] mov dx, line_out ; dx -> message, cx = length 0 00005E6B 56 push si 0 00005E6C E87BFB call puts.no_rh ; print out 0 00005E6F 5F pop di ; -> next silent message 1310 %if _RH 0 00005E70 833E[0000]00 cmp word [auxbuff_amount_silent], 0 0 00005E75 7402 je .return 1313 %endif 0 00005E77 EBA9 jmp .loop_line 1315 1316 .return: 0 00005E79 16 push ss 0 00005E7A 07 pop es 1319 1320 reset_silent_mode: equ $ 0 00005E7B 8026[0300]CF clropt [internalflags], tt_silent_mode | tt_silence 0 00005E80 8026[0300]EF clropt [internalflags2], dif2_in_silence_dump 0 00005E85 C3 retn 1324 1325 1326 %if _RH 1327 .rh_display_count: 0 00005E86 D006[0000] rol byte [rh_display_with_count], 1 0 00005E8A 57 push di 0 00005E8B 51 push cx 0 00005E8C 06 push es 0 00005E8D 7326 jnc @F 0 00005E8F A1[0000] mov ax, word [rh_count_number] 0 00005E92 83F8FF cmp ax, -1 0 00005E95 741E je @F 0 00005E97 FF0E[0000] dec word [rh_count_number] 0 00005E9B 16 push ss 0 00005E9C 07 pop es 0 00005E9D BF[0000] mov di, line_out 0 00005EA0 BE[0000] mov si, msg.rh_step.1 0 00005EA3 E8[0000] call copy_single_counted_string 0 00005EA6 E8C8FA call hexword 0 00005EA9 BE[0000] mov si, msg.rh_step.2 0 00005EAC E8[0000] call copy_single_counted_string 0 00005EAF E844FA call decword 0 00005EB2 E8F5FA call putsline_crlf 1347 @@: 0 00005EB5 07 pop es 0 00005EB6 59 pop cx 0 00005EB7 5F pop di 0 00005EB8 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 00005EB9 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 00005EBD 8E06[0000] mov es, word [auxbuff_segorsel] 0 00005EC1 8B0E[0000] mov cx, word [auxbuff_behind_last_silent] 0 00005EC5 29F9 sub cx, di 0 00005EC7 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 00005EC8 31DB xor bx, bx ; counter of zeros 1384 @@: 0 00005ECA 43 inc bx ; count zeros (NZ) 0 00005ECB 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 00005ECD F2AE repne scasb ; another zero ? 0 00005ECF 74F9 je @B ; yes, count and search for next --> 1394 ; no, done 1395 @@: 0 00005ED1 4B dec bx ; drop bias 0 00005ED2 C3 retn 1398 %endif 1399 1400 1401 %if _MESSAGESEGMENT && _PM 1402 get_messagesegsel: 0 00005ED3 368E1E[0000] mov ds, word [ss:messagesel] 0 00005ED8 E8[0000] call ispm 0 00005EDB 7405 jz .ret_pm 1406 .86m: 0 00005EDD 368E1E[0000] mov ds, word [ss:messageseg] 1408 .ret_pm: 0 00005EE2 C3 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: section_of_function 1422 %if _HELP_COMPRESSED 0 00005EE3 F6C201 test dl, 1 0 00005EE6 7538 jnz .uncompressed 1425 1426 .compressed: 0 00005EE8 1E push ds 0 00005EE9 50 push ax 0 00005EEA 53 push bx 0 00005EEB 51 push cx 0 00005EEC 52 push dx 0 00005EED 06 push es 0 00005EEE 57 push di 0 00005EEF 56 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 0 00005EF0 87F2 xchg si, dx ; si -> message compressed length 1441 %if _MESSAGESEGMENT 1442 %if _PM 0 00005EF2 E8DEFF call get_messagesegsel ; ds => message segment 1444 %else 1445 mov ds, word [ss:messageseg] ; ds => message segment 1446 %endif 0 00005EF5 AD lodsw ; = length 1448 %else 1449 ss lodsw ; = length 1450 %endif 0 00005EF6 91 xchg cx, ax ; = length 0 00005EF7 368936[0000] mov word [ss:hshrink_memory_source.offset], si 1453 ; save offset of data 0 00005EFC 1E push ds 0 00005EFD 07 pop es ; => message segment 1456 %if _BOOTLDR_DISCARD_HELP 0 00005EFE 368B3E[0000] mov di, [ss:indirect_hshrink_message_buffer] 0 00005F03 8DB50A0B 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 0 00005F07 06 push es 0 00005F08 57 push di 0 00005F09 E8[0000] call depack ; try depacking 1467 ; ds reset before calling puts 0 00005F0C 5A pop dx ; display our decompressed string 0 00005F0D 07 pop es 0 00005F0E 730D jnc @F ; skip next part if not error --> 0 00005F10 16 push ss 0 00005F11 07 pop es 0 00005F12 16 push ss 0 00005F13 1F pop ds 0 00005F14 B82B01 mov ax, 012Bh 0 00005F17 E8[0000] call setrc 0 00005F1A BA[0000] mov dx, msg.hshrink_error ; if error 1478 @@: 0 00005F1D 5E pop si 0 00005F1E EB18 jmp putsz.saved 1481 1482 .uncompressed: 0 00005F20 80E2FE and dl, ~1 1484 ; fall through to putsz_messagesegsel 1485 1486 %endif 1487 1488 putsz_messagesegsel: 0 00005F23 1E push ds 1490 %if _MESSAGESEGMENT 1491 %if _PM 0 00005F24 E8ACFF call get_messagesegsel 1493 %else 1494 mov ds, word [ss:messageseg] 1495 %endif 1496 %else 1497 push ss 1498 pop ds 1499 %endif 0 00005F27 EB07 jmp @F 1501 1502 1503 putsz_error: section_of_function 0 00005F29 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 00005F2F 1E push ds 1513 @@: 0 00005F30 50 push ax 0 00005F31 53 push bx 0 00005F32 51 push cx 0 00005F33 52 push dx 0 00005F34 06 push es 0 00005F35 1E push ds 0 00005F36 07 pop es 0 00005F37 57 push di 1522 .saved: 0 00005F38 89D7 mov di, dx ; es:di-> string 0 00005F3A 30C0 xor al, al 0 00005F3C B9FFFF mov cx, -1 0 00005F3F F2AE repne scasb ; search zero 0 00005F41 F7D1 not cx 0 00005F43 49 dec cx ; cx = length of message 0 00005F44 5F pop di 0 00005F45 16 push ss 0 00005F46 1F pop ds ; ds = ss 0 00005F47 E86BFA call puts 0 00005F4A 07 pop es 0 00005F4B 5A pop dx 0 00005F4C 59 pop cx 0 00005F4D 5B pop bx 0 00005F4E 58 pop ax 0 00005F4F 1F pop ds 0 00005F50 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 00005F51 53 push bx 0 00005F52 51 push cx 0 00005F53 52 push dx 0 00005F54 06 push es 0 00005F55 1E push ds 0 00005F56 16 push ss 0 00005F57 07 pop es ; es:dx -> message 0 00005F58 16 push ss 0 00005F59 1F pop ds ; ds = ss 0 00005F5A 50 push ax 0 00005F5B B90100 mov cx, 1 ; one character 0 00005F5E 89E2 mov dx, sp ; ds:dx-> ax on stack 0 00005F60 E852FA call puts 0 00005F63 58 pop ax 0 00005F64 1F pop ds 0 00005F65 07 pop es 0 00005F66 5A pop dx 0 00005F67 59 pop cx 0 00005F68 5B pop bx 0 00005F69 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 00005F6A F606[0000]10 testopt [serial_flags], sf_use_serial 0 00005F6F 750C jnz .serial 0 00005F71 E8[0000] call InDOS_or_BIOS_IO 0 00005F74 740E jz .dos 1583 .bios: 0 00005F76 B401 mov ah, 01h 0 00005F78 CD16 int 16h ; key available ? 1586 @@: 0 00005F7A 7413 jz .return_ax_0 0 00005F7C C3 retn 1589 1590 .serial: 0 00005F7D E8[0000] call serial_check_receive_char 1592 ; do serial getc (check rx buffer) 0 00005F80 B400 mov ah, 0 0 00005F82 EBF6 jmp @B 1595 1596 .dos: 0 00005F84 B40B mov ah, 0Bh 1598 doscall 0 00005F86 E8[0000] nearcall _doscall 0 00005F89 B4FF mov ah, -1 0 00005F8B 84C0 test al, al 0 00005F8D EBEB jmp @B 1602 1603 .return_ax_0: 0 00005F8F B80000 mov ax, 0 1605 .return: 0 00005F92 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 00005F93 57 push di 0 00005F94 BF[EA09] mov di, getc_if_any 1621 0 00005F97 F606[0000]20 testopt [internalflags3], dif3_input_serial_override 0 00005F9C 750C jnz @F 0 00005F9E F606[0000]10 testopt [serial_flags], sf_use_serial 0 00005FA3 7505 jnz @F 0 00005FA5 E8[0000] call InDOS_or_BIOS_IO 0 00005FA8 7450 jz getc_dos_pop_di 1628 @@: 0 00005FAA EB04 jmp @F 1630 1631 .raw: 0 00005FAC 57 push di 0 00005FAD BF[540A] mov di, getc_if_any.raw 1634 .loop: 1635 @@: 0 00005FB0 FF16[0000] call near word [getline_timer_func] 0 00005FB4 F606[0000]20 testopt [internalflags3], dif3_input_serial_override 0 00005FB9 7523 jnz @F 0 00005FBB F606[0300]01 testopt [internalflags3], dif3_input_re 0 00005FC0 751C jnz @F 1641 %if _INPUT_FILE_BOOT 0 00005FC2 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00005FC7 7515 jnz @F 1644 %endif 0 00005FC9 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00005FCE 750E jnz @F 0 00005FD0 F606[0000]10 testopt [serial_flags], sf_use_serial 0 00005FD5 7507 jnz @F 0 00005FD7 F606[0100]04 testopt [options], biosidles 1650 ; idling disabled? 0 00005FDC 7516 jnz .rawkey ; yes, just request a key --> 1652 1653 @@: 0 00005FDE FFD7 call di ; got a key ? 0 00005FE0 7516 jnz .return ; yes --> 1656 .idle: ; common idling for BIOS keyboard and serial 0 00005FE2 E8[0000] call handle_serial_flags_ctrl_c 1658 %if _SLEEP_NEW 0 00005FE5 57 push di 0 00005FE6 8B3E[0000] mov di, word [getc_repeat_idle] 0 00005FEA 47 inc di 1662 @@: 0 00005FEB E8E502 call idle 0 00005FEE 4F dec di 0 00005FEF 75FA jnz @B 0 00005FF1 5F pop di 1667 %else 1668 call idle 1669 %endif 0 00005FF2 EBBC jmp .loop ; check again --> 1671 1672 .rawkey: 0 00005FF4 31C0 xor ax, ax 0 00005FF6 CD16 int 16h ; get the key and scancode 1675 .return: 0 00005FF8 5F pop di 0 00005FF9 C3 retn 1678 1679 1680 getc_dos_pop_di: 0 00005FFA 5F pop di 1682 getc_dos: 1683 %if _PM 0 00005FFB E8[0000] call ispm 0 00005FFE 7507 jnz @F ; if 86 Mode --> 0 00006000 F606[0100]40 testopt [options2], opt2_getc_idle_dpmi 0 00006005 7507 jnz @FF 1688 @@: 1689 %endif 0 00006007 F606[0100]20 testopt [options2], opt2_getc_idle 0 0000600C 7410 jz getc_dos_internal 1692 @@: 1693 .with_idle: 0 0000600E E8DF01 call getc_if_any 0 00006011 7403E9BF00 jnz .return 0 00006016 E8[0000] call handle_serial_flags_ctrl_c 0 00006019 E8B702 call idle 0 0000601C 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 0000601E F606[0000]10 testopt [internalflags3], dif3_input_terminal_override 0 00006023 7403E99400 jnz .terminal 1710 %if !_LOADER 0 00006028 F606[0300]01 testopt [internalflags3], dif3_input_re 0 0000602D 741B jz @F 0 0000602F 56 push si 0 00006030 8B36[0000] mov si, word [re_buffer.position] 0 00006034 31C0 xor ax, ax 0 00006036 AC lodsb 0 00006037 84C0 test al, al 0 00006039 8936[0000] mov word [re_buffer.position], si 0 0000603D 5E pop si 0 0000603E 7403E99200 jnz .return 0 00006043 FF0E[0000] dec word [re_buffer.position] 0 00006047 E98B00 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 0000604A F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000604F 750E jnz .file 1733 %endif 1734 %if _INPUT_FILE_HANDLES 0 00006051 E8[0000] call InDOS_or_BIOS_IO 0 00006054 7546 jnz .file_not 0 00006056 F606[0200]10 testopt [internalflags2], dif2_input_file 0 0000605B 7502 jnz .file 1739 %endif 0 0000605D EB3D jmp .file_not 1741 1742 .file: 0 0000605F 52 push dx 0 00006060 51 push cx 0 00006061 53 push bx 0 00006062 57 push di 0 00006063 31C0 xor ax, ax ; initialise ah to zero 0 00006065 50 push ax 0 00006066 89E2 mov dx, sp ; ds:dx -> al byte on stack 0 00006068 B90100 mov cx, 1 1751 %if _INPUT_FILE_BOOT 1752 %if _INPUT_FILE_HANDLES 0 0000606B F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00006070 7408 jz @F 1755 %endif 0 00006072 E8[0000] call yy_boot_remember_seek 0 00006075 E8[0000] call yy_boot_read 1758 %if _INPUT_FILE_HANDLES 0 00006078 EB0B jmp @FF 1760 @@: 1761 %endif 1762 %endif 1763 %if _INPUT_FILE_HANDLES 0 0000607A B43F mov ah, 3Fh 0 0000607C E86201 call yy_get_handle 0 0000607F E8D414 call yy_remember_seek 1767 doscall ; (depends on ds = ss) 0 00006082 E8[0000] nearcall _doscall 1768 %endif 1769 @@: 0 00006085 7204 jc @F 0 00006087 85C0 test ax, ax 0 00006089 750B jnz .file_got 1773 1774 @@: 0 0000608B E85B00 call yy_close_file 0 0000608E 58 pop ax 0 0000608F 5F pop di 0 00006090 5B pop bx 0 00006091 59 pop cx 0 00006092 5A pop dx 0 00006093 E9FDFE jmp getc 1782 1783 1784 .file_got: 0 00006096 58 pop ax ; ah = 0, al = character read 0 00006097 5F pop di 0 00006098 5B pop bx 0 00006099 59 pop cx 0 0000609A 5A pop dx 0 0000609B C3 retn 1791 1792 .file_not: 1793 %endif 0 0000609C F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 000060A1 7419 jz @F 0 000060A3 56 push si 0 000060A4 8B36[0000] mov si, word [cmdline_buffer.position] 0 000060A8 31C0 xor ax, ax 0 000060AA AC lodsb 0 000060AB 84C0 test al, al 0 000060AD 8936[0000] mov word [cmdline_buffer.position], si 0 000060B1 5E pop si 0 000060B2 7521 jnz .return 0 000060B4 8026[0100]FE clropt [internalflags3], dif3_input_cmdline 0 000060B9 E9D7FE jmp getc 1806 1807 @@: 1808 .terminal: 0 000060BC B408 mov ah, 8 1810 doscall ; wait for a key 0 000060BE E8[0000] nearcall _doscall 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 000060C1 80FC4C cmp ah, 4Ch 0 000060C4 7410 je .freedos_ctrlc_workaround 0 000060C6 B400 mov ah, 0 ; assume it is ASCII 0 000060C8 84C0 test al, al 0 000060CA 7509 jne .return ; ASCII, return with ah zero --> 0 000060CC B408 mov ah, 8 1827 doscall ; scancode of non-ASCII key to al 0 000060CE E8[0000] nearcall _doscall 0 000060D1 86C4 xchg al, ah ; to ah 0 000060D3 B000 mov al, 0 ; return zero for non-ASCII key 1830 .return: 0 000060D5 C3 retn 1832 1833 .freedos_ctrlc_workaround: 0 000060D6 BA[0000] mov dx, msg.freedos_ctrlc_workaround 0 000060D9 E853FE call putsz 0 000060DC E992FA jmp puts.ctrlc ; use common handler 1837 1838 1839 %if _EXTENSIONS && _COMLEVELS 1840 call_comlevel_bx_ax: section_of_function 0 000060DF 8B0E[0000] mov cx, [ext_comlevels_handler] 0 000060E3 E303 jcxz @F 1843 ; INP: ax = various (may be alias.eld ID) 1844 ; cx destroyed 1845 ; bx = function 1846 ; OUT: cx don't care 1847 ; jump to downlink or extcall near_transfer_ext_return 0 000060E5 E82B13 call transfer_ext_cx_NC_push_ax 1849 @@: 0 000060E8 C3 retn 1851 %endif 1852 1853 1854 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 1855 ; INP: [input_file_handles], dif2_input_file 1856 ; OUT: most recent file closed, flag cleared if no longer file 1857 ; (_COMLEVELS) bx == 0 to loop back to getline caller 1858 ; bl = 0 if comlevels handler returned ax = 0 1859 ; bh & 80h set if RE buffer execution ended 1860 ; CHG: di, bx, ax 1861 yy_close_file: 1862 %if !_LOADER 0 000060E9 31DB xor bx, bx 0 000060EB F606[0300]01 testopt [internalflags3], dif3_input_re 0 000060F0 741F jz .notre 0 000060F2 8026[0300]FE clropt [internalflags3], dif3_input_re 0 000060F7 800E[0300]02 setopt [internalflags3], dif3_input_re_closed 1868 %if _EXTENSIONS && _COMLEVELS 0 000060FC 51 push cx 0 000060FD BB8008 mov bx, COMLEVEL_EXIT_RE 0 00006100 89D8 mov ax, bx 0 00006102 8B0E[0000] mov cx, [ext_comlevels_handler] 0 00006106 E303 jcxz @F 1874 ; INP: ax = nonzero from debugger, 1875 ; a handler may modify this to pass along zero 1876 ; (note that al is always nonzero by itself) 1877 ; cx destroyed 1878 ; bx = function, 1879 ; COMLEVEL_EXIT_RC 1880 ; COMLEVEL_EXIT_YY 1881 ; COMLEVEL_EXIT_YY_SUB 1882 ; COMLEVEL_EXIT_YY_BOOT 1883 ; COMLEVEL_EXIT_YY_BOOT_SUB 1884 ; COMLEVEL_EXIT_RE 1885 ; OUT: cx don't care 1886 ; jump to downlink or extcall near_transfer_ext_return 1887 ; ax == 0 to loop back to getline caller 0 00006108 E80813 call transfer_ext_cx_NC_push_ax 1889 @@: 0 0000610B 93 xchg bx, ax 0 0000610C 59 pop cx 1892 %endif 0 0000610D 80CF80 or bh, 80h 0 00006110 C3 retn 1895 1896 .notre: 1897 %endif 1898 %if _INPUT_FILE_BOOT 0 00006111 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00006116 7406 jz .notbootyy 0 00006118 E8[0000] call yy_boot_clear_remember_seek 0 0000611B E9[0000] jmp yy_boot_close_file 1903 1904 .notbootyy: 1905 %endif 1906 %if _INPUT_FILE_HANDLES 0 0000611E F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006123 7476 jz .notfile 0 00006125 8B3E[0000] mov di, word [input_file_handles.active] 0 00006129 57 push di 0 0000612A D1E7 shl di, 1 0 0000612C D1E7 shl di, 1 0 0000612E D1E7 shl di, 1 1914 %if INPUTFILEHANDLE_size != 8 1915 %error Unexpected structure size 1916 %endif 0 00006130 8B9D[0000] mov bx, word [input_file_handles + di + ifhHandle] 0 00006134 E80314 call yy_clear_remember_seek 1919 0 00006137 F685[0300]01 testopt [input_file_handles + di + ifhFlags], ifhfIsDup 0 0000613C 7416 jz @F 1922 0 0000613E 51 push cx 0 0000613F 52 push dx 1925 0 00006140 8B9D[F8FF] mov bx, word [input_file_handles + di - INPUTFILEHANDLE_size + ifhHandle] 0 00006144 8B95[0400] mov dx, word [input_file_handles + di + ifhParentSeek] 0 00006148 8B8D[0600] mov cx, word [input_file_handles + di + ifhParentSeek + 2] 0 0000614C B80042 mov ax, 4200h ; seek from start 0 0000614F E87213 call handle_seek_or_remember 1931 0 00006152 5A pop dx 0 00006153 59 pop cx 1934 1935 @@: 1936 0 00006154 E8[0000] call InDOS 0 00006157 7406 jz .closefile 1939 0 00006159 FF06[0000] inc word [input_file_handles.to_close] 0 0000615D EB06 jmp @F 1942 1943 .closefile: 0 0000615F B80100 mov ax, 1 0 00006162 E85E00 call yy_close_file_handles 1946 1947 @@: 0 00006165 5F pop di 0 00006166 4F dec di 0 00006167 791C jns .next 0 00006169 8026[0200]EF clropt [internalflags2], dif2_input_file 0 0000616E 800E[0200]20 setopt [internalflags2], dif2_closed_input_file 1953 %if _EXTENSIONS && _COMLEVELS 0 00006173 51 push cx 0 00006174 BB8004 mov bx, COMLEVEL_EXIT_YY 0 00006177 89D8 mov ax, bx 0 00006179 8B0E[0000] mov cx, [ext_comlevels_handler] 0 0000617D E303 jcxz @F 1959 ; INP: ax = nonzero from debugger, 1960 ; a handler may modify this to pass along zero 1961 ; (note that al is always nonzero by itself) 1962 ; cx destroyed 1963 ; bx = function, 1964 ; COMLEVEL_EXIT_RC 1965 ; COMLEVEL_EXIT_YY 1966 ; COMLEVEL_EXIT_YY_SUB 1967 ; COMLEVEL_EXIT_YY_BOOT 1968 ; COMLEVEL_EXIT_YY_BOOT_SUB 1969 ; COMLEVEL_EXIT_RE 1970 ; OUT: cx don't care 1971 ; jump to downlink or extcall near_transfer_ext_return 1972 ; ax == 0 to loop back to getline caller 0 0000617F E89112 call transfer_ext_cx_NC_push_ax 1974 @@: 0 00006182 93 xchg bx, ax 0 00006183 59 pop cx 1977 %else 1978 xor bx, bx 1979 %endif 0 00006184 C3 retn 1981 .next: 0 00006185 893E[0000] mov word [input_file_handles.active], di 1983 %if _EXTENSIONS && _COMLEVELS 0 00006189 51 push cx 0 0000618A BB8804 mov bx, COMLEVEL_EXIT_YY_SUB 0 0000618D 89D8 mov ax, bx 0 0000618F 8B0E[0000] mov cx, [ext_comlevels_handler] 0 00006193 E303 jcxz @F 1989 ; INP: ax = nonzero from debugger, 1990 ; a handler may modify this to pass along zero 1991 ; (note that al is always nonzero by itself) 1992 ; cx destroyed 1993 ; bx = function, 1994 ; COMLEVEL_EXIT_RC 1995 ; COMLEVEL_EXIT_YY 1996 ; COMLEVEL_EXIT_YY_SUB 1997 ; COMLEVEL_EXIT_YY_BOOT 1998 ; COMLEVEL_EXIT_YY_BOOT_SUB 1999 ; COMLEVEL_EXIT_RE 2000 ; OUT: cx don't care 2001 ; jump to downlink or extcall near_transfer_ext_return 2002 ; ax == 0 to loop back to getline caller 0 00006195 E87B12 call transfer_ext_cx_NC_push_ax 2004 @@: 0 00006198 93 xchg bx, ax 0 00006199 59 pop cx 2007 %else 2008 xor bx, bx 2009 %endif 0 0000619A C3 retn 2011 %endif 2012 2013 .notfile: 0 0000619B F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 000061A0 741C jz .notcmdline 0 000061A2 8026[0100]FE clropt [internalflags3], dif3_input_cmdline 0 000061A7 800E[0100]02 setopt [internalflags3], dif3_input_cmdline_closed 2018 %if _EXTENSIONS && _COMLEVELS 0 000061AC 51 push cx 0 000061AD BB8002 mov bx, COMLEVEL_EXIT_RC 0 000061B0 89D8 mov ax, bx 0 000061B2 8B0E[0000] mov cx, [ext_comlevels_handler] 0 000061B6 E303 jcxz @F 2024 ; INP: ax = nonzero from debugger, 2025 ; a handler may modify this to pass along zero 2026 ; (note that al is always nonzero by itself) 2027 ; cx destroyed 2028 ; bx = function, 2029 ; COMLEVEL_EXIT_RC 2030 ; COMLEVEL_EXIT_YY 2031 ; COMLEVEL_EXIT_YY_SUB 2032 ; COMLEVEL_EXIT_YY_BOOT 2033 ; COMLEVEL_EXIT_YY_BOOT_SUB 2034 ; COMLEVEL_EXIT_RE 2035 ; OUT: cx don't care 2036 ; jump to downlink or extcall near_transfer_ext_return 2037 ; ax == 0 to loop back to getline caller 0 000061B8 E85812 call transfer_ext_cx_NC_push_ax 2039 @@: 0 000061BB 93 xchg bx, ax 0 000061BC 59 pop cx 2042 %else 2043 xor bx, bx 2044 %endif 0 000061BD C3 retn 2046 2047 .notcmdline: 0 000061BE 31F6 xor si, si 0 000061C0 E9[0000] jmp error 2050 2051 2052 %if _INPUT_FILE_HANDLES 2053 ; INP: word [input_file_handles.to_close] = how many 2054 ; ax = additionally how many (0 or 1) 2055 ; input_file_handles + di -> first to close 2056 ; OUT: word [input_file_handles.to_close] = 0 2057 ; closed handle fields = -1 2058 ; CHG: ax, bx, di 2059 ; STT: DOS must be accessible 2060 yy_close_file_handles: 0 000061C3 51 push cx 0 000061C4 31C9 xor cx, cx 0 000061C6 870E[0000] xchg cx, word [input_file_handles.to_close] 0 000061CA 01C1 add cx, ax 0 000061CC 7411 jz @FF 2066 @@: 0 000061CE BBFFFF mov bx, -1 0 000061D1 879D[0000] xchg bx, word [input_file_handles + di + ifhHandle] 0 000061D5 B43E mov ah, 3Eh 2070 doscall 0 000061D7 E8[0000] nearcall _doscall 0 000061DA 83C708 add di, INPUTFILEHANDLE_size 0 000061DD E2EF loop @B 2073 @@: 0 000061DF 59 pop cx 0 000061E0 C3 retn 2076 2077 2078 ; INP: - 2079 ; OUT: di = active handle offset 2080 ; bx = active handle 2081 ; CHG: - 2082 yy_get_handle: 0 000061E1 8B3E[0000] mov di, word [input_file_handles.active] 0 000061E5 D1E7 shl di, 1 0 000061E7 D1E7 shl di, 1 0 000061E9 D1E7 shl di, 1 2087 %if INPUTFILEHANDLE_size != 8 2088 %error Unexpected structure size 2089 %endif 0 000061EB 8B9D[0000] mov bx, word [input_file_handles + di + ifhHandle] 2091 %endif 0 000061EF C3 retn 2093 %endif 2094 2095 2096 ; INP: - 2097 ; OUT: NZ if received any, 2098 ; al = character 2099 ; ah = scan code or zero 2100 ; ZR if none received 2101 ; CHG: ax 2102 ; STT: ds = ss = debugger segment/selector 2103 getc_if_any: 0 000061F0 F606[0000]20 testopt [internalflags3], dif3_input_serial_override 0 000061F5 755B jnz .serial 0 000061F7 F606[0000]10 testopt [internalflags3], dif3_input_terminal_override 0 000061FC 754D jnz .terminal 2108 2109 %if !_LOADER 0 000061FE F606[0300]01 testopt [internalflags3], dif3_input_re 0 00006203 741D jz @F 0 00006205 56 push si 0 00006206 8B36[0000] mov si, word [re_buffer.position] 0 0000620A 31C0 xor ax, ax 0 0000620C AC lodsb 0 0000620D 84C0 test al, al 0 0000620F 8936[0000] mov word [re_buffer.position], si 0 00006213 5E pop si 0 00006214 7403E9B900 jnz .return 0 00006219 FF0E[0000] dec word [re_buffer.position] 0 0000621D 38C0 cmp al, al ; ZR 0 0000621F E9B000 jmp .return 2123 %endif 2124 2125 @@: 2126 %if _INPUT_FILE_BOOT 0 00006222 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00006227 755B jnz .file 2129 %endif 2130 0 00006229 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 0000622E 741B jz @F 0 00006230 56 push si 0 00006231 8B36[0000] mov si, word [cmdline_buffer.position] 0 00006235 31C0 xor ax, ax 0 00006237 AC lodsb 0 00006238 84C0 test al, al 0 0000623A 8936[0000] mov word [cmdline_buffer.position], si 0 0000623E 5E pop si 0 0000623F 7403E98E00 jnz .return 0 00006244 8026[0100]FE clropt [internalflags3], dif3_input_cmdline 0 00006249 EBA5 jmp getc_if_any 2143 2144 @@: 2145 .terminal: 0 0000624B F606[0000]10 testopt [serial_flags], sf_use_serial 0 00006250 7411 jz @F ; do BIOS keyboard or DOS getc --> 2148 2149 .serial: 0 00006252 E8[0000] call serial_receive_char ; do serial getc (check rx buffer) 0 00006255 747B jz .return ; no data, go and idle --> 0 00006257 B400 mov ah, 0 0 00006259 C3 retn 2154 2155 .raw: 0 0000625A F606[0000]10 testopt [serial_flags], sf_use_serial 0 0000625F 75F1 jnz .serial 0 00006261 EB61 jmp .bios 2159 2160 @@: 0 00006263 E8[0000] call InDOS_or_BIOS_IO 0 00006266 755C jnz .bios 2163 0 00006268 F606[0000]10 testopt [internalflags3], dif3_input_terminal_override 0 0000626D 7547 jnz .dos_terminal 2166 2167 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 2168 %if _INPUT_FILE_BOOT 0 0000626F F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00006274 750E jnz .file 2171 %endif 2172 %if _INPUT_FILE_HANDLES 0 00006276 E8[0000] call InDOS_or_BIOS_IO 0 00006279 753B jnz .file_not 0 0000627B F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006280 7502 jnz .file 2177 %endif 0 00006282 EB32 jmp .file_not 2179 2180 .file: 0 00006284 57 push di 0 00006285 53 push bx 0 00006286 51 push cx 0 00006287 52 push dx 0 00006288 31C0 xor ax, ax 0 0000628A 50 push ax 2187 0 0000628B 89E2 mov dx, sp ; ds:dx -> al byte on stack 0 0000628D B90100 mov cx, 1 ; buffer length = 1 2190 %if _INPUT_FILE_BOOT 2191 %if _INPUT_FILE_HANDLES 0 00006290 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00006295 7408 jz @F 2194 %endif 0 00006297 E8[0000] call yy_boot_remember_seek 0 0000629A E8[0000] call yy_boot_read 0 0000629D EB0B jmp @FF 2198 @@: 2199 %endif 2200 %if _INPUT_FILE_HANDLES 0 0000629F B43F mov ah, 3Fh 0 000062A1 E83DFF call yy_get_handle 0 000062A4 E8AF12 call yy_remember_seek 2204 doscall ; DOS read file (depends on ds = ss) 0 000062A7 E8[0000] nearcall _doscall 2205 %endif 2206 @@: 0 000062AA 7302 jnc @F 0 000062AC 31C0 xor ax, ax 2209 @@: 0 000062AE 85C0 test ax, ax 0 000062B0 58 pop ax 0 000062B1 5A pop dx 0 000062B2 59 pop cx 0 000062B3 5B pop bx 0 000062B4 5F pop di 0 000062B5 C3 retn ; ZR if no character read 2217 2218 .file_not: 2219 %endif 2220 .dos_terminal: 2221 %if 0 2222 push dx 2223 mov ah, 06h 2224 mov dl, -1 2225 doscall 2226 jz .return_dx ; none available 2227 ; bugfix: the 06h call is a *destructive* read. 2228 ; so do not call getc again, just handle the 2229 ; possible second byte returned. 2230 call getc_dos_internal_get_extended 2231 pop dx 2232 jmp .return_NZ 2233 .return_dx: 2234 pop dx 2235 retn 2236 %else 0 000062B6 B40B mov ah, 0Bh 2238 doscall 0 000062B8 E8[0000] nearcall _doscall 0 000062BB 84C0 test al, al 0 000062BD 7413 jz .return 0 000062BF E85CFD call getc_dos_internal 0 000062C2 EB0A jmp .return_NZ 2243 %endif 2244 2245 .bios: 0 000062C4 B401 mov ah, 01h 0 000062C6 CD16 int 16h ; key available ? 0 000062C8 7408 jz .return 0 000062CA 31C0 xor ax, ax 0 000062CC CD16 int 16h 2251 .return_NZ: 0 000062CE 50 push ax 0 000062CF 0C01 or al, 1 ; (NZ) 0 000062D1 58 pop ax 2255 .return: 0 000062D2 C3 retn 2257 2258 2259 ; INP: - 2260 ; OUT: - 2261 ; CHG: ax 2262 ; STT: ds = ss = debugger segment/selector 2263 ; 2264 ; Idle system, using 2F.1680 (in given mode), or 2F.1680 2265 ; (calling down to 86 Mode), or sti \ hlt. 2266 idle: 0 000062D3 FB sti 2268 ; Might be required for dosemu2 in loops. Refer to 2269 ; https://hg.pushbx.org/ecm/insight/rev/7973d5dd16f7 0 000062D4 90 nop ; help debugging 2271 2272 %if _APPLICATION || _DEVICE 2273 %if _BOOTLDR 0 000062D5 F606[0100]40 testopt [internalflags], nodosloaded 0 000062DA 7568 jnz .hlt ; can't call 2F --> 2276 %endif 2277 0 000062DC F606[0300]02 testopt [options3], opt3_no_idle_2F 0 000062E1 7561 jnz .hlt 2280 %if _GUARD_86M_INT2F 2281 %if _PM 0 000062E3 E8[0000] call ispm 0 000062E6 7416 jz @FF ; --> (NZ) 2284 %endif 0 000062E8 06 push es 0 000062E9 31C0 xor ax, ax 0 000062EB 8EC0 mov es, ax ; (only used in 86 Mode) 0 000062ED 26A1BC00 mov ax, [es:2Fh * 4] 0 000062F1 83F8FF cmp ax, -1 0 000062F4 7405 je @F ; --> (ZR) 0 000062F6 260B06BE00 or ax, [es:2Fh * 4 + 2] 2292 @@: 0 000062FB 07 pop es 0 000062FC 7409 jz @FF 2295 @@: 2296 %endif 0 000062FE B88016 mov ax, 1680h 0 00006301 CD2F int 2Fh ; release timeslice in multitasker 0 00006303 84C0 test al, al 0 00006305 7453 jz .return ; done idling --> 2301 @@: 2302 %if _PM 0 00006307 E8[0000] call ispm 0 0000630A 7538 jnz .hlt 2305 0 0000630C 53 push bx 0 0000630D 51 push cx 0 0000630E 06 push es 0 0000630F 66 _386_PM_o32 ; push edi 0 00006310 57 push di 0 00006311 6631FF _386 xor edi, edi ; clear EDIH 0 00006314 31C9 xor cx, cx ; (copy no words from stack) 2313 2314 [cpu 286] 0 00006316 51 push cx ; ss 0 00006317 51 push cx ; sp (0:0 = host should allocate a stack) 0 00006318 83EC0C sub sp, byte 12 ; cs:ip (ignored), segments (uninitialized) 0 0000631B 9C pushf 0 0000631C 51 push cx ; EAXH (uninitialized) 0 0000631D 688016 push 1680h ; AX 0 00006320 83EC0C sub sp, byte 12 ; ecx, edx, ebx (uninitialized) 0 00006323 51 push cx 0 00006324 51 push cx ; reserved (zero) 0 00006325 83EC0C sub sp, byte 12 ; ebp, esi, edi (uninitialized) 0 00006328 16 push ss 0 00006329 07 pop es 0 0000632A 89E7 mov di, sp ; es:(e)di -> 86 Mode call structure 0 0000632C B80003 mov ax, 0300h 0 0000632F BB2F00 mov bx, 2Fh ; bl = interrupt, bh = reserved (zero) 0 00006332 CD31 int 31h ; call real mode 2F.1680 2331 __CPU__ 2332 0 00006334 83C41C add sp, byte 28 ; discard RM call structure 0 00006337 58 pop ax ; get AX 0 00006338 83C414 add sp, byte 20 ; discard RM call structure 2336 0 0000633B 66 _386_PM_o32 ; pop edi 0 0000633C 5F pop di 0 0000633D 07 pop es 0 0000633E 59 pop cx 0 0000633F 5B pop bx 2342 0 00006340 84C0 test al, al 0 00006342 7416 jz .return ; done idling --> 2345 %endif 2346 %endif 2347 .hlt: 2348 %if _PM 0 00006344 E8[0000] call ispm 0 00006347 7507 jnz .hlt_86m 2351 .hlt_pm: 0 00006349 F606[0300]80 testopt [options2], opt2_dpminohlt 0 0000634E EB05 jmp @F ; NZ = DPMI host throws GPF when we execute hlt --> 2354 %endif 2355 .hlt_86m: 0 00006350 F606[0100]02 testopt [options], opt1_86mnohlt 2357 @@: 0 00006355 7503 jnz .return 0 00006357 FB sti 0 00006358 F4 hlt ; else idle by hlt 0 00006359 90 nop 2362 .return: 0 0000635A C3 retn 2364 2365 2366 %if _MS_PROMPT_COMPAT 2367 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 2367 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 00002809 00 align 2, db 0 2369 ; REM: Dispatch table in section lDEBUG_CODE 2370 table_getline_prepare_ldebug: 0 0000280A [5D0B] dw getline_prepare_blank_blank_colon 0 0000280C [5D0B] dw getline_prepare_blank_blank_colon 0 0000280E [5D0B] dw getline_prepare_blank_blank_colon 2374 2375 ; word +0: other 2376 ; word +2: variable (register) 2377 ; word +4: symbolic F (flag states) 2378 ; REM: Dispatch table in section lDEBUG_CODE 2379 table_getline_prepare_ms_debug: 0 00002810 [5D0B] dw getline_prepare_blank_blank_colon 0 00002812 [550B] dw getline_prepare_crlf_colon 0 00002814 [650B] dw getline_prepare_blank_dash 2383 2384 2385 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 2385 ------------------ note: usesection lDEBUG_CODE 2386 2387 getline_prepare_crlf_colon: 0 0000635B E84CF6 call putsline_crlf 0 0000635E BF[0000] mov di, line_out 0 00006361 EB04 jmp @F 2391 2392 getline_prepare_blank_blank_colon: 0 00006363 B82020 mov ax, 32<<8|32 ; add two spaces and a colon 0 00006366 AB stosw 2395 @@: 0 00006367 B03A mov al, ':' 0 00006369 AA stosb 0 0000636A C3 retn 2399 2400 getline_prepare_blank_dash: 0 0000636B B8202D mov ax, '-' << 8 | 32 0 0000636E AB stosw 0 0000636F C3 retn 2404 %endif 2405 2406 2407 ; GETLINE - Print a prompt (address in DX, length in CX) and read a line 2408 ; of input. 2409 ; GETLINE0 - Same as above, but use the output line (so far), plus two 2410 ; spaces and a colon, as a prompt. 2411 ; GETLINE00 - Same as above, but use the output line (so far) as a prompt. 2412 ; Entry CX Length of prompt (getline only) 2413 ; DX Address of prompt string (getline only) 2414 ; 2415 ; DI Address + 1 of last character in prompt (getline0 and 2416 ; getline00 only) 2417 ; 2418 ; Exit AL First nonwhite character in input line 2419 ; SI Address of the next character after that 2420 ; (_COMLEVELS) CY to loop, NC to accept returned line 2421 ; Uses AH,BX,CX,DX,DI 2422 2423 %ifn _MS_PROMPT_COMPAT 2424 getline0: 2425 mov ax, 32<<8|32 ; add two spaces and a colon 2426 stosw 2427 mov al, ':' 2428 stosb 2429 %endif 2430 getline00: 0 00006370 BA[0000] mov dx, line_out 0 00006373 89F9 mov cx, di 0 00006375 29D1 sub cx, dx 2434 2435 getline: ; note: this entry is no longer used 0 00006377 8026[0100]77 clropt [internalflags3], dif3_quiet_input_single | dif3_return_eof 2437 .use_dif3_flags: 2438 %if _DEBUG && ! _DEBUG_COND 2439 d0bp 2440 %endif 0 0000637C 890E[0000] mov word [promptlen], cx ; save length of prompt 0 00006380 8326[0000]00 and word [terminator_in_line_in.offset], 0 2443 ; reset this when reading new line 2444 0 00006385 E8A602 call getline_is_input_file? 0 00006388 7303E90F01 jc getline_nofile 2447 2448 getline_file: 0 0000638D F606[0300]01 testopt [internalflags3], dif3_input_re 0 00006392 7549 jnz .notquiet 2451 2452 %if _INPUT_FILE_BOOT 0 00006394 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00006399 7412 jz @F 0 0000639B B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 0000639E 52 push dx 0 0000639F F726[0000] mul word [load_input_file.active] 0 000063A3 5A pop dx 0 000063A4 89C7 mov di, ax 0 000063A6 F685[2700]40 testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietInput 0 000063AB EB29 jmp .quiet_if_nz 2462 2463 @@: 2464 %endif 2465 %if _INPUT_FILE_HANDLES 0 000063AD E8[0000] call InDOS_or_BIOS_IO 0 000063B0 7518 jnz @F 0 000063B2 F606[0200]10 testopt [internalflags2], dif2_input_file 0 000063B7 7411 jz @F 0 000063B9 8B3E[0000] mov di, word [input_file_handles.active] 0 000063BD D1E7 shl di, 1 0 000063BF D1E7 shl di, 1 0 000063C1 D1E7 shl di, 1 ; to qword array index 2474 %if INPUTFILEHANDLE_size != 8 2475 %error Unexpected structure size 2476 %endif 0 000063C3 F685[0300]40 testopt [input_file_handles + di + ifhFlags], ifhfQuietInput 0 000063C8 EB0C jmp .quiet_if_nz 2479 2480 @@: 2481 %endif 0 000063CA F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 000063CF 740C jz @F 0 000063D1 F606[0300]40 testopt [options], opt_cmdline_quiet_input 2485 ; jmp .quiet_if_nz 2486 2487 .quiet_if_nz: 0 000063D6 7405 jz @F 2489 .quiet: 0 000063D8 800E[0100]08 setopt [internalflags3], dif3_quiet_input_single 2491 .notquiet: 2492 @@: 2493 0 000063DD 800E[0200]40 setopt [internalflags2], dif2_did_getline_file 2495 2496 2497 ; This part reads the input line from a file (in the case of 2498 ; `debug < file'). It is necessary to do this by hand because DOS 2499 ; function 0Ah does not handle EOF correctly otherwise. This is 2500 ; especially important for DEBUG because it traps Control-C. 0 000063E2 C706[0000][0000] mov word [lastcmd], dmycmd ; disable auto-repeat while reading from a file 2502 2503 %if _NEWFULLHANDLING 0 000063E8 BF[0300] mov di, line_in+3 ; read max 2505 %else 2506 mov di, line_in+2 2507 %endif 0 000063EB 8B36[0000] mov si, word [bufnext] 0 000063EF 3B36[0000] cmp si, word [bufend] 0 000063F3 721D jb .char_buffered ; if there's a character already 0 000063F5 E83508 call fillbuf 0 000063F8 7318 jnc .fillbuf_had_data 0 000063FA F606[0100]80 testopt [internalflags3], dif3_return_eof 0 000063FF 7402 jz @F 2515 .ret_CY: 0 00006401 F9 stc 0 00006402 C3 retn 2518 @@: 0 00006403 E86102 call getline_close_file 2520 %if _COMLEVELS 0 00006406 740A jz @F ; not end --> 0 00006408 58 pop ax 0 00006409 3D[0000] cmp ax, cmd3_getline_return_address 0 0000640C 50 push ax ; are we from cmd3 ? 0 0000640D 74F2 je .ret_CY ; yes --> 0 0000640F E965FF jmp getline ; else do internal loop --> 2527 @@: 2528 %else 2529 jnz getline 2530 %endif 2531 2532 .fillbuf_had_data: 2533 .char_buffered: 2534 %if _NEWFULLHANDLING 0 00006412 4F dec di 2536 %endif 2537 2538 ; Discard an LF if the last character read was CR. 0 00006413 803E[0000]0D cmp byte [notatty], 13 ; last parsed character was CR ? 0 00006418 750A jne .no_lf_skip ; no, nothing more to do --> 0 0000641A 803C0A cmp byte [si], 10 ; first read character is LF ? 0 0000641D 7505 jne .no_lf_skip ; no --> 0 0000641F 46 inc si ; skip the LF 0 00006420 FE06[0000] inc byte [notatty] ; avoid repeating this 2545 .no_lf_skip: 2546 0 00006424 3B36[0000] cmp si, word [bufend] 0 00006428 740B je @F 0 0000642A 803C40 cmp byte [si], '@' ; no display ? 0 0000642D 7506 jne @F 2551 0 0000642F 46 inc si ; increment past @ 0 00006430 800E[0100]08 setopt [internalflags3], dif3_quiet_input_single 2554 @@: 0 00006435 F606[0100]08 testopt [internalflags3], dif3_quiet_input_single 0 0000643A 7503 jnz gl1 2557 0 0000643C E876F5 call puts ; display prompt (having checked it wasn't EOF) 2559 2560 ; si-> next character in buffer 2561 ; w[bufend]-> behind last valid character of buffer 2562 gl1: 0 0000643F 8B0E[0000] mov cx, word [bufend] 0 00006443 29F1 sub cx, si ; cx = number of valid characters in buffer 0 00006445 740C jz gl3 ; if none --> 2566 gl2: 0 00006447 AC lodsb 0 00006448 3C0D cmp al, 13 ; (exact match for CR) 0 0000644A 7410 je gl4 0 0000644C 3C0A cmp al, 10 0 0000644E 740C je gl4 ; if EOL --> 0 00006450 AA stosb 0 00006451 E2F4 loop gl2 ; if more valid characters --> 2574 2575 ; The buffer is empty. Fill it again. 2576 gl3: 2577 %if _NEWFULLHANDLING 0 00006453 47 inc di 2579 %endif 0 00006454 E8D607 call fillbuf 2581 %if _NEWFULLHANDLING 0 00006457 4F dec di 2583 %endif 0 00006458 73E5 jnc gl1 ; if we have more characters --> 0 0000645A B00A mov al, 10 ; make jump after gl4 always branch 2586 %ifn _NEWFULLHANDLING ; should now always have at least one byte free 2587 cmp di, line_in+LINE_IN_LEN 2588 jb @F 2589 dec si 2590 dec di 2591 @@: 2592 %endif 2593 2594 gl4: 0 0000645C 3C0D cmp al, 13 ; terminator was CR ? 0 0000645E 7508 jne @F ; no --> 0 00006460 E306 jcxz @F ; if no other byte buffered --> 0 00006462 803C0A cmp byte [si], 10 ; next byte is an LF ? 0 00006465 7501 jne @F ; no --> 0 00006467 AC lodsb ; increment si past the LF and set al = 10 2601 ; dec cx ; (not used in subsequent code) 2602 @@: 0 00006468 8936[0000] mov word [bufnext], si 0 0000646C A2[0000] mov byte [notatty], al ; store 10 or 13 (depending on the kind of EOL) 2605 0 0000646F 800E[0100]04 setopt [internalflags3], dif3_at_line_end 0 00006474 E83A07 call getline_reset_notatty 2608 0 00006477 89F9 mov cx, di ; (counter is for input without CR) 0 00006479 B00D mov al, 13 0 0000647B AA stosb ; terminate line for our usage 0 0000647C BA[0200] mov dx, line_in + 2 0 0000647F 29D1 sub cx, dx ; = length of input (no CR) 0 00006481 880E[0100] mov byte [line_in+1], cl 0 00006485 F606[0100]08 testopt [internalflags3], dif3_quiet_input_single 0 0000648A 750D jnz @F 0 0000648C 800E[0200]01 setopt [internalflags], usecharcounter 0 00006491 E821F5 call puts ; print out the received line 0 00006494 8026[0200]FE clropt [internalflags], usecharcounter 2620 @@: 0 00006499 E92B01 jmp getline_eol ; done 2622 2623 getline_nofile: 0 0000649C E89F0F call yy_reset_buf 0 0000649F C606[0000]00 mov byte [linecounter], 0 ; reset counter 0 000064A4 8026[0200]EF clropt [internalflags], promptwaiting 0 000064A9 51 push cx 0 000064AA 52 push dx 0 000064AB E807F5 call puts ; display prompt 0 000064AE 5A pop dx 0 000064AF 59 pop cx 0 000064B0 F606[0000]10 testopt [serial_flags], sf_use_serial 0 000064B5 7516 jnz .getinput_NZ 0 000064B7 E8[0000] call InDOS_or_BIOS_output 2635 ; Special case: If output is to ROM-BI0S we must use 2636 ; getinput so as to use putc and friends, not the 2637 ; DOS interrupt 21h service 0Ah. 0 000064BA 7511 jnz .getinput_NZ 2639 %if _PM 0 000064BC E8[0000] call ispm 0 000064BF 7507 jnz @F ; if 86 Mode --> 0 000064C1 F606[0100]08 testopt [options2], opt2_getinput_dpmi 0 000064C6 7505 jnz .getinput_NZ 2644 @@: 2645 %endif 0 000064C8 F606[0100]08 testopt [options], opt_usegetinput 2647 .getinput_NZ: 0 000064CD 7403E93D02 jnz getinput 2649 2650 %if _PM 0 000064D2 E8[0000] call ispm 0 000064D5 7537 jnz @F ; if 86 Mode --> 0 000064D7 F606[0200]04 testopt [internalflags], canswitchmode 0 000064DC 7430 jz @F ; can't switch to 86M --> 0 000064DE 800E[0200]08 setopt [internalflags], modeswitched 2656 ; set flag for resetmode 0 000064E3 B000 mov al, 0 0 000064E5 E8[0000] call sr_state ; save state 0 000064E8 E8[0000] call switchmode ; switch to 86M 0 000064EB E8[0000] call handle_mode_changed ; ! called with flag set 2661 0 000064EE BE[1000] mov si, getline_extra_int23 0 000064F1 B023 mov al, 23h 0 000064F3 E8[0000] call install_86m_interrupt_handler 2665 ; override DPMI host's int 23h vector 0 000064F6 BA[2400] mov dx, getline_extra_int22 0 000064F9 B82225 mov ax, 2522h 0 000064FC CD21 int 21h 0 000064FE 89160A00 mov word [TPIV], dx ; override our PRI 2670 0 00006502 BA[0000] mov dx, line_in 0 00006505 B40A mov ah, 0Ah 0 00006507 CD21 int 21h ; call DOS 2674 0 00006509 E8ED00 call getline_extra_uninstall 2676 ; undo patches 0 0000650C EB08 jmp @FF 2678 ; go to common trail 2679 2680 @@: 2681 %endif 0 0000650E BA[0000] mov dx, line_in 0 00006511 B40A mov ah, 0Ah ; buffered keyboard input 2684 doscall 0 00006513 E8[0000] nearcall _doscall 2685 2686 @@: 2687 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 00006516 B300 mov bl, 0 2689 %endif 2690 2691 getline_eol_enter_history_and_ext: 2692 %if _EXTENSIONS && _EXT_PUTS_GETLINE 2693 ; byte [line_in + 1] = length 2694 ; line_in + 2 -> text 2695 ; bl = 0 means text is from int 21h service 0Ah 2696 ; bl = 1 means text is from getinput 0 00006518 E8D100 call transfer_to_ext_puts_getline 2698 %endif 2699 2700 %if _HISTORY 2701 %if 0 2702 2703 The history buffer is implemented as two arrays that grow towards 2704 the middle from either end of the buffer. The first is a byte array 2705 storing text data that starts at the low end (start) of the buffer. 2706 (This is offset 0 in the separate history segment, if used.) The 2707 text is stored back to back, only the content of the lines, no 2708 separators or terminators. 2709 2710 The second array gives the *end* of each history entry's text. 2711 There are N + 1 array entries, each a 16-bit offset word, where 2712 N is the amount of history entries in use. The words are used as 2713 displacement from a base that's the start of the history buffer. 2714 (Again, the start base is at offset 0 for the separate history 2715 segment. However, for simplicity of the code we always do store 2716 the actual base start offset into a register and displace from 2717 that, even when the actual value of that register will be zero.) 2718 The very first entry of the high array is special. It always 2719 holds the displacement value zero. When used as a displacement 2720 added to the base this points at the very beginning of the 2721 entire history buffer (and thus the start of the low array). 2722 2723 The size of a history entry in the low array is obtained by 2724 reading both the entry's end displacement from the high array, 2725 and the prior entry (at the next higher address) also from the 2726 high array to receive the end displacement of the prior history 2727 entry. The end displacement of the prior entry is also the 2728 start displacement of the current entry. The delta of the two 2729 end displacements is the size of this history entry. This also 2730 explains why the very first entry of the high array is needed, 2731 and why it contains a zero displacement. It is needed in order 2732 to determine the start displacement and size of the very first 2733 actual history entry. (We could special case the first entry a 2734 different way but using the special first entry of the high 2735 array that holds a constant zero simplifies the code.) 2736 2737 The history pointers in the word [history.first] as well as 2738 word [history.last] point at the very first (special) entry 2739 of the high array as well as the very last entry of the high 2740 array. (Because the high array grows from the top down, the 2741 first entry is at the highest address and the last entry is 2742 at the lowest address.) Although the word [history.first] is 2743 currently a constant, we use a variable to enable changing 2744 the history allocation dynamically if desired later. If the 2745 two pointers are one and the same then there is no actual 2746 history entry stored in the history. Otherwise, if the 2747 distance between the last high array entry and the last 2748 low array entry is lower than X + 2 bytes then the history is 2749 too full to insert a new entry, where X is the length of the 2750 new history entry's text data and the additional 2 bytes are 2751 for the high array entry to store the end displacement. 2752 2753 The special first entry of the high array *must* be 2754 initialised to hold the displacement value zero. This happens 2755 in init.asm for the separate history buffer segment (when 2756 initialising the entire segment with zeroes) or in the 2757 zeroing of most of the DATASTACK section (when initialising 2758 the variables from ..@init_first up to ..@init_behind). 2759 2760 Insertion is simple, if enough space is left in the history 2761 buffer: Copy the text to behind the last entry of the low 2762 array (this is pointed to by the end displacement in the last 2763 high array entry), then create a new last entry of the high 2764 array which points behind the text's destination. 2765 2766 Deletion is more difficult. (Generally we will delete the 2767 oldest entry, that is the first history entry.) The second 2768 entry of the high array needs to be deleted. All subsequent 2769 entries of the high array need to move "forward" (towards 2770 the higher address), and also must have the length of the 2771 text of the entry to delete subtracted. In the low array the 2772 text data of the first history entry needs to be overwritten 2773 with any subsequent text data; the entire subsequent text data 2774 must be moved "forward" (towards the lower address) by the 2775 distance that equals the length of the entry's text to delete. 2776 2777 %endif 2778 2779 .loop: 0 0000651B BE[0200] mov si, line_in + 2 0 0000651E 31C9 xor cx, cx 0 00006520 0A4CFF or cl, byte [si - 1] 0 00006523 7503E99D00 jz .dontenter 2784 gethistorysegment es 0 00006528 368E06[0000] mov %1, word [ss:history.segorsel] 2785 gethistoryoffset bx 0 0000652D BB0000 mov %1, 0 0 00006530 A1[0000] mov ax, word [history.last] 0 00006533 3B06[0000] cmp ax, word [history.first] 0 00006537 7419 je @F ; if there are no history entries --> 0 00006539 89C7 mov di, ax ; -> last displacement in high array 0 0000653B 268B15 mov dx, [es:di] ; + bx -> behind last history entry text 0 0000653E 268B7D02 mov di, [es:di + 2] ; + bx -> at last history entry text 0 00006542 29FA sub dx, di ; = length of last history entry text 0 00006544 39D1 cmp cx, dx ; length match ? 0 00006546 750A jne @F ; no --> 2795 2796 ; always ZR here. would need to keep this in mind if 2797 ; zero-length entries were considered. (repe cmpsb 2798 ; with cx = 0 leaves cx, si, di, fl unchanged.) 0 00006548 8D39 lea di, [di + bx] ; -> at last text 0 0000654A 51 push cx 0 0000654B 56 push si 0 0000654C F3A6 repe cmpsb ; compare candidate text to last text 0 0000654E 5E pop si 0 0000654F 59 pop cx 0 00006550 7473 je .dontenter ; equal, so skip it --> 2806 @@: 0 00006552 89C7 mov di, ax ; -> last displacement 0 00006554 268B15 mov dx, [es:di] ; + bx -> free space 0 00006557 01DA add dx, bx ; -> free space 0 00006559 F7DA neg dx ; - free space start 0 0000655B 7502 jnz @F 0 0000655D 4A dec dx ; cause add to overflow (= FFFFh) 0 0000655E 47 inc di ; adjust for prior instruction 2814 @@: 0 0000655F 01FA add dx, di ; - free space start + free space end 2816 ; = free space size 0 00006561 730A jnc .delete ; invalid (shouldn't happen) --> 0 00006563 7408 jz .delete ; zero bytes free --> 0 00006565 4A dec dx 0 00006566 7405 jz .delete ; one byte free --> 0 00006568 4A dec dx 2822 ; jz .delete ; one or two bytes free --> 2823 ; Commented, a zero will fail the next check 2824 ; already. Unless we modify the above code 2825 ; so that empty lines can be entered into 2826 ; the history, at which point we do not want 2827 ; to fail the insertion when only two bytes 2828 ; are free, ie enough for the displacement and 2829 ; a zero-byte length text. 2830 0 00006569 39D1 cmp cx, dx 0 0000656B 7646 jbe .insert ; enough bytes for the new entry --> 2833 .delete: 0 0000656D 3B06[0000] cmp ax, word [history.first] 0 00006571 7508 jne @F 2836 2837 .error: 0 00006573 BA[0000] mov dx, msg.history_internal_error 0 00006576 E8B6F9 call putsz 0 00006579 EB4A jmp .dontenter 2841 2842 @@: 0 0000657B 89C7 mov di, ax ; -> at last displacement 0 0000657D 268B3D mov di, [es:di] ; + bx -> after last entry's text 0 00006580 8B36[0000] mov si, word [history.first] 0 00006584 268B74FE mov si, [es:si - 2] ; + bx -> at second entry's text 0 00006588 29F7 sub di, si ; = after last - after first 2848 ; = text length excluding first 0 0000658A 89F9 mov cx, di ; length to move 0 0000658C 56 push si 0 0000658D 01DE add si, bx ; -> after first entry's text 0 0000658F 89DF mov di, bx ; -> start of buffer 0 00006591 06 push es 0 00006592 1F pop ds 0 00006593 F3A4 rep movsb ; move subsequent text 0 00006595 59 pop cx ; = how far we moved (deleted text length) 0 00006596 89C7 mov di, ax ; -> at last displacement 0 00006598 8B15 mov dx, word [di] ; load last displacement 2859 @@: 0 0000659A 47 inc di 0 0000659B 47 inc di ; -> prior displacement 0 0000659C 363B3E[0000] cmp di, word [ss:history.first] 0 000065A1 7306 jae @F ; (hardened, shouldn't ever be above) 0 000065A3 29CA sub dx, cx ; adjust next displacement 2865 ; by deleted text length 0 000065A5 8715 xchg word [di], dx ; store in prior displacement 2867 ; and load its old value 0 000065A7 EBF1 jmp @B 2869 2870 @@: 0 000065A9 16 push ss 0 000065AA 1F pop ds 0 000065AB 8306[0000]02 add word [history.last], 2 2874 ; deleted one displacement 0 000065B0 E968FF jmp .loop 2876 2877 .insert: 0 000065B3 89C7 mov di, ax 0 000065B5 48 dec ax 0 000065B6 48 dec ax 0 000065B7 A3[0000] mov word [history.last], ax 0 000065BA 268B3D mov di, word [es:di] 0 000065BD 01DF add di, bx 0 000065BF F3A4 rep movsb 0 000065C1 29DF sub di, bx 0 000065C3 97 xchg di, ax ; es:di -> new last history displacement, 2887 ; ax -> after history text 0 000065C4 AB stosw 2889 2890 .dontenter: 0 000065C5 16 push ss 0 000065C6 07 pop es 2893 %endif 2894 2895 getline_eol: 0 000065C7 F606[0100]08 testopt [internalflags3], dif3_quiet_input_single 0 000065CC 750B jnz @F ; NC 0 000065CE B00D mov al, 13 0 000065D0 E87EF9 call putc ; fix ZDOS Int21.0A display bug 0 000065D3 B00A mov al, 10 0 000065D5 E879F9 call putc 0 000065D8 F9 stc 2903 @@: 2904 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 000065D9 B302 mov bl, 2 0 000065DB 80D300 adc bl, 0 ; = 3 if displayed 0 000065DE E80500 call set_si_line_in_and_skipwhite 2908 ; INP: byte [line_in + 1] = length 2909 ; line_in + 2 -> text 2910 ; word [promptlen] = length of prompt 2911 ; al = first non-whitespace text byte 2912 ; si -> next text 2913 ; bl = 2 or 3 means from getline_eol, any line read 2914 ; bl = 2 if not displayed, = 3 if displayed 2915 ; CHG: ah, bh, cx, dx, di 2916 ; STT: ds = es = ss 2917 ; UP, EI 0 000065E1 E80800 call transfer_to_ext_puts_getline 0 000065E4 F8 clc ; NC 0 000065E5 C3 retn 2921 %endif 2922 2923 set_si_line_in_and_skipwhite: 0 000065E6 BE[0200] mov si, line_in+2 0 000065E9 E9BFF2 jmp skipwhite ; NC 2926 2927 2928 %if _EXTENSIONS && _EXT_PUTS_GETLINE 2929 transfer_to_ext_puts_getline: 0 000065EC 8B0E[0000] mov cx, word [ext_puts_getline_handler] 0 000065F0 E306 jcxz @F 0 000065F2 E9200E jmp transfer_ext_cx 2933 2934 check_section_of puts_getline_ext_done 2935 puts_getline_ext_done: equ $ 0 000065F5 59 pop cx 0 000065F6 59 pop cx 0 000065F7 59 pop cx ; discard return addresses 2939 @@: 0 000065F8 C3 retn 2941 %endif 2942 2943 2944 %if _PM 2945 getline_extra_uninstall: 0 000065F9 BA[0000] mov dx, debug22 0 000065FC B82225 mov ax, 2522h 0 000065FF CD21 int 21h 0 00006601 89160A00 mov word [TPIV], dx ; restore default int 22h (PRI) 0 00006605 BE[1000] mov si, getline_extra_int23 0 00006608 B023 mov al, 23h 0 0000660A BAFFFF mov dx, -1 0 0000660D E8[0000] call UnhookInterruptForce 2954 ; restore DPMI host's int 23h handler 0 00006610 E9[0000] jmp resetmode ; return to PM 2956 2957 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 2957 ------------------ note: usesection lDEBUG_DATA_ENTRY 2958 0 00002816 CB90EB10FFFFFFFF4B iispentry getline_extra_int23 0 0000281F 4200EBF300 0 0000282A F9 stc 0 0000282B CB retf ; indicate to abort syscall and process 2962 2963 align 2 2964 getline_extra_int22: 0 0000282C FA cli 2966 .cleartraceflag: 0 0000282D FC cld ; reestablish things 0 0000282E 8CC8 mov ax, cs 0 00002830 8ED8 mov ds, ax 0 00002832 8ED0 mov ss, ax 0 00002834 8B26[0000] mov sp, word [ savesp ] ; restore stack 0 00002838 90 times 1 - (($ - $$) & 1) nop ; align in-code parameter 0 00002839 E8[0000] call entry_to_code_seg 0 0000283C [0D0E] dw .code 2975 2976 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 2976 ------------------ note: usesection lDEBUG_CODE 2977 2978 .code: 2979 0 00006613 66 _386_o32 ; mov esp 0 00006614 8B26[0000] mov sp, word [ savesp ] ; restore stack 0 00006618 83E4FC _386 and sp, ~3 ; align stack 0 0000661B 66 _386_o32 0 0000661C 31C0 xor ax, ax 0 0000661E 66 _386_o32 0 0000661F 50 push ax 0 00006620 66 _386_o32 0 00006621 9D popf 0 00006622 8B26[0000] _386 mov sp, word [ savesp ] ; restore stack 0 00006626 FC cld 0 00006627 FB sti 2992 0 00006628 E8CEFF call getline_extra_uninstall 2994 ; undo patches and return to PM 0 0000662B E9[0000] jmp handle_ctrl_c ; go to common handler --> 2996 %endif 2997 2998 2999 getline_is_input_file?: 0 0000662E F606[0000]20 testopt [internalflags3], dif3_input_serial_override 0 00006633 7530 jnz .nofile 0 00006635 F606[0300]01 testopt [internalflags3], dif3_input_re 0 0000663A 7528 jnz .file 0 0000663C F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00006641 7521 jnz .file 3006 %if _INPUT_FILE_BOOT 0 00006643 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00006648 751A jnz .file 3009 %endif 0 0000664A E8[0000] call InDOS_or_BIOS_IO 0 0000664D 7516 jnz .nofile ; InDOS, not reading from a file --> 3012 %if _INPUT_FILE_HANDLES 0 0000664F F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006654 750E jnz .file 3015 %endif 0 00006656 F606[0000]10 testopt [serial_flags], sf_use_serial 0 0000665B 7508 jnz .nofile 0 0000665D 803E[0000]00 cmp byte [notatty], 0 ; check this weird flag 0 00006662 7401 je .nofile ; not reading from a file --> 3020 3021 .file: 0 00006664 A8 db __TEST_IMM8 ; (skip stc, NC) 3023 .nofile: 0 00006665 F9 stc 0 00006666 C3 retn 3026 3027 3028 getline_close_file: 0 00006667 51 push cx 3030 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 3031 ; EOF reached. if not input file, quit. else, close input file. 3032 %if !_LOADER 0 00006668 F606[0300]01 testopt [internalflags3], dif3_input_re 0 0000666D 7515 jnz .re 3035 %endif 3036 %if _INPUT_FILE_HANDLES && _INPUT_FILE_BOOT 0 0000666F F706[0200]1002 testopt [internalflags2], dif2_input_file | dif2_input_file_boot, 1 0 00006675 750A jnz @F 3039 %elif _INPUT_FILE_HANDLES 3040 testopt [internalflags2], dif2_input_file 3041 jnz @F 3042 %elif _INPUT_FILE_BOOT 3043 testopt [internalflags2], dif2_input_file_boot 3044 jnz @F 3045 %endif 0 00006677 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 0000667C 7467 jz .qq ; if EOF, quit --> 3048 0 0000667E B1FE mov cl, -2 0 00006680 A9 db __TEST_IMM16 3051 @@: 0 00006681 31C9 xor cx, cx 3053 %if !_LOADER 0 00006683 A9 db __TEST_IMM16 3055 .re: 0 00006684 B1FF mov cl, -1 3057 %endif 3058 0 00006686 51 push cx 0 00006687 E86E00 call .resetstuff 0 0000668A 59 pop cx 3062 0 0000668B E302 jcxz .notre 0 0000668D EB1A jmp @F 3065 3066 .notre: 0 0000668F 59 pop cx 0 00006690 F606[0100]04 testopt [internalflags3], dif3_at_line_end 0 00006695 7511 jnz .return ; (NZ) 3070 3071 ; this code is difficult to reach, might be unused 0 00006697 B80D0A mov ax, 13 | 10 << 8 ; pretend we read a CR LF sequence 0 0000669A AB stosw 0 0000669B 893E[0000] mov word [bufend], di 0 0000669F 4F dec di 0 000066A0 4F dec di 3077 %if _EXTENSIONS && _COMLEVELS 0 000066A1 83FB01 cmp bx, 1 0 000066A4 7202 jb .return ; if bx == 0, branch --> (NZ) 3080 %endif 0 000066A6 38C0 cmp al, al ; ZR 3082 .return: 0 000066A8 C3 retn 3084 3085 @@: 0 000066A9 80F9FE cmp cl, -2 0 000066AC 59 pop cx 3088 %if !_LOADER 0 000066AD 741B je .finish_cmdline 3090 3091 .finish_re: 0 000066AF F606[0100]04 testopt [internalflags3], dif3_at_line_end 0 000066B4 750E jnz @F 0 000066B6 B82801 mov ax, 0128h 0 000066B9 E8[0000] call setrc 0 000066BC BA[0000] mov dx, msg.unexpected_noneol_re 0 000066BF E867F8 call putsz_error 0 000066C2 EB03 jmp @FF 3099 @@: 0 000066C4 E8C70F call resetrc 3101 @@: 0 000066C7 E9[0000] jmp dumpregs_extended.exit 3103 %endif 3104 3105 .finish_cmdline: 0 000066CA F606[0100]04 testopt [internalflags3], dif3_at_line_end 0 000066CF 750E jnz @F 0 000066D1 B82901 mov ax, 0129h 0 000066D4 E8[0000] call setrc 0 000066D7 BA[0000] mov dx, msg.unexpected_noneol_rc 0 000066DA E84CF8 call putsz_error 0 000066DD EB03 jmp @FF 3113 @@: 0 000066DF E8AC0F call resetrc 3115 @@: 0 000066E2 E9[0000] jmp cmd3 3117 %endif 3118 3119 .qq: 0 000066E5 C606[0200]0D mov byte [line_in + 2], 13 0 000066EA E8F9FE call set_si_line_in_and_skipwhite 0 000066ED 830E[0000]08 or word [cmd3_set_options], fakeindos 0 000066F2 E8[0000] call qq ; if EOF, quit --> 0 000066F5 E9[0000] jmp cmd3 3125 3126 ; OUT: bl = 0 if comlevels handler returned ax = 0 3127 ; bh & 80h set if RE buffer execution ended 3128 .resetstuff: 0 000066F8 57 push di 0 000066F9 E8EDF9 call yy_close_file ; close file 0 000066FC 5F pop di 3132 3133 %if _NEWFULLHANDLING 0 000066FD C706[0000][0300] mov word [bufnext], line_in + 3 0 00006703 C706[0000][0300] mov word [bufend], line_in + 3 3136 %else 3137 mov word [bufnext], line_in + 2 3138 mov word [bufend], line_in + 2 3139 %endif 3140 0 00006709 E8A504 call getline_reset_notatty 3142 0 0000670C E9[0000] jmp determine_quiet_output 3144 3145 3146 getinput: 3147 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 0000670F F616[0000] not byte [in_getinput] ; set 3149 %endif 3150 lframe 3151 lequ 254, limit 3152 lvar word, columns 3153 lvar word, maxpercol 3154 lvar word, maxpercolhalf 0 00006713 5589E58D66FA lenter 0 00006719 06 push es 0 0000671A 52 push dx 3158 lvar dword, prompt ; (in line_out buffer) 0 0000671B 31C0 xor ax, ax 3160 %if _HISTORY 0 0000671D 50 push ax 3162 lvar word, historyentry 3163 %endif 0 0000671E 50 push ax 3165 lvar word, length_displayed 0 0000671F 50 push ax 3167 lvar word, length_input 0 00006720 50 push ax 3169 lvar word, offset 0 00006721 50 push ax 3171 lvar word, lastskip 0 00006722 50 push ax 3173 lvar word, low_redraw_and_high_beep 3174 lequ ?low_redraw_and_high_beep, redraw 3175 lequ ?low_redraw_and_high_beep + 1, beep 0 00006723 50 push ax 3177 lvar word, low_cursormove_and_high_append 3178 lequ ?low_cursormove_and_high_append, cursormove 3179 lequ ?low_cursormove_and_high_append + 1,append 0 00006724 50 push ax 3181 lvar word, low_cursorright_and_high_edited 3182 lequ ?low_cursorright_and_high_edited, cursorright 3183 lequ ?low_cursorright_and_high_edited + 1, edited 0 00006725 51 push cx 3185 lvar word, column 0 00006726 51 push cx 3187 lvar word, promptlength 3188 0 00006727 57 push di 0 00006728 1E push ds 0 00006729 07 pop es 3192 3193 .next: 0 0000672A E8[0000] call handle_serial_flags_ctrl_c 3195 0 0000672D D046EA rol byte [bp + ?redraw], 1 0 00006730 7203E90701 jnc .no_do_redraw 3198 .do_redraw: 3199 0 00006735 E8F203 call get_columns 3201 0 00006738 8946FE mov word [bp + ?columns], ax 0 0000673B 48 dec ax ; $COLS - 1 0 0000673C 2B46E2 sub ax, word [bp + ?promptlength]; - $promptlength 0 0000673F 8946FC mov word [bp + ?maxpercol], ax 0 00006742 D1E8 shr ax, 1 ; int($maxpercol / 2) 0 00006744 7501 jnz @F 0 00006746 40 inc ax ; insure nonzero 3209 @@: 0 00006747 8946FA mov word [bp + ?maxpercolhalf], ax 3211 0 0000674A 8B46F0 mov ax, [bp + ?length_input] 0 0000674D 89C1 mov cx, ax 0 0000674F 31FF xor di, di ; variable "skip" 3215 ; + line_in + 2 -> to display 0 00006751 3B46FC cmp ax, word [bp + ?maxpercol] 0 00006754 8B46E4 mov ax, word [bp + ?column] ; variable "col" 0 00006757 763B jna .not_show_a_maxpercol 3219 .show_a_maxpercol: 3220 0 00006759 8B56FC mov dx, word [bp + ?maxpercol] 0 0000675C 0356E2 add dx, word [bp + ?promptlength] 3223 0 0000675F 8B5EEC mov bx, word [bp + ?lastskip] 0 00006762 395EEE cmp word [bp + ?offset], bx 0 00006765 7307 jae .offset_ae_lastskip ; spaghetti branch --> 3227 .not_offset_ae_lastskip: 3228 3229 @@: 0 00006767 39D0 cmp ax, dx 0 00006769 760B jna .not_col_a_maxpercol 3232 .col_a_maxpercol: 0 0000676B 8B5EFA mov bx, [bp + ?maxpercolhalf] ; bx = step length 3234 3235 .offset_ae_lastskip: ; spaghetti branch target, re-uses the 3236 ; code of .col_a_maxpercol 3237 ; sub ax, bx ; col -= lastskip 3238 ; add di, bx ; skip += lastskip 3239 ; sub cx, bx ; lessen length of part to display 0 0000676E 29D8 sub ax, bx ; lessen col 0 00006770 01DF add di, bx ; heighten offset of part to display 0 00006772 29D9 sub cx, bx ; lessen length of part to display 0 00006774 EBF1 jmp @B 3244 3245 .not_col_a_maxpercol: 0 00006776 3B7EEC cmp di, word [bp + ?lastskip] ; scrolling forwards ? 0 00006779 7711 ja @F ; yes --> (else backwards or same) 3248 ; The next check should be redundant with the 3249 ; one after it. However, the call to puts with 3250 ; the comment "draw (to move cursor)" will 3251 ; underflow its counter if ax is decremented 3252 ; when it was below-or-equal ?promptlength. 3253 ; Therefore, this check hardens against that. 3254 ; By checking here we ensure that the sub there 3255 ; doesn't underflow, staying above-or-equal 0. 0 0000677B 3B46E2 cmp ax, word [bp + ?promptlength] 3257 ; possibly at end ? 0 0000677E 760C jbe @F ; no --> 0 00006780 39D0 cmp ax, dx ; are we at end ? 0 00006782 7508 jne @F ; no --> 0 00006784 3B4EFC cmp cx, word [bp + ?maxpercol] ; displaying the last fragment ? 0 00006787 7603 jbe @F ; yes, do not move up --> 0 00006789 48 dec ax 0 0000678A 47 inc di 0 0000678B 49 dec cx ; move up display by one column 3266 @@: 0 0000678C 3B4EFC cmp cx, word [bp + ?maxpercol] 0 0000678F 7603 jbe @F 0 00006791 8B4EFC mov cx, word [bp + ?maxpercol] 3270 @@: 3271 .not_show_a_maxpercol: 0 00006794 397EEC cmp word [bp + ?lastskip], di ; need to scroll ? 0 00006797 7408 je @F ; no --> 0 00006799 8366E800 and word [bp + ?low_cursormove_and_high_append], 0 3275 ; yes, ignore appending status 3276 ; ignore cursor move status too 0 0000679D C646E600 mov byte [bp + ?cursorright], 0 ; also reset this flag 3278 @@: 3279 0 000067A1 897EEC mov word [bp + ?lastskip], di ; update variable for next iteration 0 000067A4 8D95[0200] lea dx, [di + line_in + 2] ; -> visible text's data 3282 0 000067A8 89CB mov bx, cx 0 000067AA 875EF2 xchg bx, word [bp + ?length_displayed] 3285 ; bx = remember how much we had, 3286 ; and update variable 3287 0 000067AD D046E8 rol byte [bp + ?cursormove], 1 ; cursor move without visible window move ? 0 000067B0 7250 jc .redraw_always_move_cursor ; yes, skip full redraw and also 3290 ; force to do cursor movement --> 0 000067B2 50 push ax 0 000067B3 53 push bx 0 000067B4 51 push cx 0 000067B5 52 push dx 3295 ; On stack: 3296 ; -> start of visible text's data 3297 ; length of visible text 3298 ; prior length of visible text (from prior iteration) 3299 ; variable "col" 0 000067B6 D046E9 rol byte [bp + ?append], 1 ; text appended without visible window move ? 0 000067B9 730E jnc .not_append_redraw ; no, do full redraw --> 0 000067BB F656E9 not byte [bp + ?append] ; = 0, reset flag after its use 0 000067BE 01CA add dx, cx ; -> behind text to write 0 000067C0 4A dec dx ; -> at last codepoint (appended) 0 000067C1 B90100 mov cx, 1 ; only append 3306 %if _GETLINEHIGHLIGHT 3307 ; This appended text is always the very last text 3308 ; in the buffer so it never should get highlighted. 3309 ; If this build option is not in use then the next 3310 ; branch is to the call puts below, re-using that 3311 ; call there that's also used for the full redraw. 0 000067C4 E8EEF1 call puts ; draw appended text 3313 %endif 0 000067C7 EB1A jmp .after_append_redraw ; skip past more prompt/text redraw 3315 3316 .not_append_redraw: 0 000067C9 51 push cx 0 000067CA 52 push dx 0 000067CB B00D mov al, 13 0 000067CD E881F7 call putc ; reset to start of line 3321 0 000067D0 C456F6 les dx, [bp + ?prompt] 0 000067D3 8B4EE2 mov cx, [bp + ?promptlength] 0 000067D6 E8DCF1 call puts ; redraw the prompt 0 000067D9 16 push ss 0 000067DA 07 pop es ; reset es 0 000067DB 5A pop dx 0 000067DC 59 pop cx ; restore registers for text redraw 3329 %if _GETLINEHIGHLIGHT 3330 ; di for prefix highlight condition 0 000067DD 8B5EF0 mov bx, word [bp + ?length_input] 3332 ; bx for suffix highlight condition 0 000067E0 E87703 call puts_with_highlight ; redraw the text 3334 .after_append_redraw: 3335 %else 3336 .after_append_redraw: 3337 call puts ; redraw the text 3338 %endif 0 000067E3 5A pop dx 0 000067E4 5B pop bx 0 000067E5 59 pop cx 3342 ; dx -> start of visible text's data 3343 ; bx = new length of visible text 3344 ; cx = prior length of visible text (from prior iteration) 3345 ; on stack = variable "col" 0 000067E6 29D9 sub cx, bx ; = how many blanks needed to overwrite 0 000067E8 7609 jbe @FF 0 000067EA 01CB add bx, cx ; = length displayed 0 000067EC B020 mov al, 32 3350 @@: 0 000067EE E860F7 call putc 0 000067F1 E2FB loop @B 3353 @@: 0 000067F3 58 pop ax 3355 ; dx -> start of visible text's data 3356 ; ax = variable "col" 3357 ; bx = length of redrawn text (including blanks), 3358 ; this indicates where the cursor is 3359 3360 ; The following check determines whether the 3361 ; cursor is already where we want it to be 3362 ; after the full redraw is done, including the 3363 ; blanks after the visible text that were used 3364 ; to erase the prior visible text (if any). 3365 ; If this branches then the cursor movement is 3366 ; not needed and thus we're done redrawing. 0 000067F4 01D3 add bx, dx 0 000067F6 81EB[0200] sub bx, line_in + 2 ; offset into line (with length displayed) 0 000067FA 035EE2 add bx, word [bp + ?promptlength]; offset into display 0 000067FD 3B5EE4 cmp bx, word [bp + ?column] ; same as column ? 0 00006800 7437 je .do_redraw_done ; yes, skip cursor movement stuff --> 3372 3373 .redraw_always_move_cursor: 0 00006802 C646E800 mov byte [bp + ?cursormove], 0 ; reset flag after its use 3375 3376 ; dx -> start of visible text's data 3377 ; ax = variable "col" 0 00006806 D046E6 rol byte [bp + ?cursorright], 1 ; only cursor to the right without 3379 ; having to scroll the visible text ? 0 00006809 7312 jnc @F ; no, do redraw --> 0 0000680B F656E6 not byte [bp + ?cursorright] ; = 0, reset for next iteration 0 0000680E B90100 mov cx, 1 ; length of text to write 0 00006811 2B46E2 sub ax, word [bp + ?promptlength] 3384 ; = offset into input text 0 00006814 48 dec ax ; -> last codepoint of text 3386 ;; test ax, ax ; at start of visible text ? 0 00006815 741D jz .redraw_cursorright ; yes, leave di so as to highlight 3388 ; the prefix as appropriate --> 3389 ; (and dx is correct, we'd add zero) 0 00006817 31FF xor di, di ; else, tell it not to highlight 0 00006819 01C2 add dx, ax ; dx = "skip" + line_in + 2 + index 0 0000681B EB17 jmp .redraw_cursorright 3393 3394 @@: 0 0000681D 50 push ax 0 0000681E 52 push dx 0 0000681F B00D mov al, 13 0 00006821 E82DF7 call putc ; reset cursor 0 00006824 C456F6 les dx, [bp + ?prompt] 0 00006827 8B4EE2 mov cx, [bp + ?promptlength] 0 0000682A E888F1 call puts ; redraw prompt 0 0000682D 16 push ss 0 0000682E 07 pop es 0 0000682F 5A pop dx ; -> current input text 0 00006830 59 pop cx ; = col 0 00006831 2B4EE2 sub cx, word [bp + ?promptlength] 3407 ; = offset into input text, 3408 ; draw that much 3409 .redraw_cursorright: 3410 %if _GETLINEHIGHLIGHT 3411 ; ! di is still set to lastskip value, 3412 ; or reset to zero if cursor right with 3413 ; just a single codepoint redraw but the 3414 ; codepoint to redraw is not at the start 3415 ; of the visible text. 3416 ; di for prefix highlight condition 3417 ; We need to make sure that the suffix is never 3418 ; highlighted here because we are writing a 3419 ; fragment that does not include the last part 3420 ; of the visible text. By zeroing bx we can 3421 ; ensure the suffix highlight condition is 3422 ; always considered to be false. 0 00006834 31DB xor bx, bx ; bx = 0, never highlight a suffix 0 00006836 E82103 call puts_with_highlight 3425 %else 3426 call puts ; draw (to move cursor) 3427 %endif 3428 3429 .do_redraw_done: 0 00006839 F656EA not byte [bp + ?redraw] ; = 0 3431 3432 .no_do_redraw: 3433 0 0000683C D046EB rol byte [bp + ?beep], 1 0 0000683F 7308 jnc .no_do_beep 3436 .do_beep: 0 00006841 B007 mov al, 7 0 00006843 E80BF7 call putc 3439 0 00006846 F656EB not byte [bp + ?beep] ; = 0 3441 .no_do_beep: 3442 0 00006849 E847F7 call getc ; ax = keycode, al = ASCII or 0 3444 3445 ; check scancode for int 16h in non-dumb dosemu first 0 0000684C 86C4 xchg al, ah 0 0000684E 3C48 cmp al, 48h 0 00006850 7503E9F501 je .up 0 00006855 3C4B cmp al, 4Bh 0 00006857 7503E9C201 je .left 0 0000685C 3C50 cmp al, 50h 0 0000685E 7503E90202 je .down 0 00006863 3C4D cmp al, 4Dh 0 00006865 7503E9C701 je .right 0 0000686A 3C52 cmp al, 52h 0 0000686C 7503E94B02 je .insert 0 00006871 3C53 cmp al, 53h 0 00006873 7503E96801 je .del 0 00006878 3C47 cmp al, 47h 0 0000687A 7503E98501 je .home 0 0000687F 3C4F cmp al, 4Fh 0 00006881 7503E98A01 je .end 0 00006886 3C49 cmp al, 49h 0 00006888 7503E92F02 je .pageup 0 0000688D 3C51 cmp al, 51h 0 0000688F 7503E92802 je .pagedown 3467 3468 ; not a special scancode, check character returned 0 00006894 86C4 xchg al, ah 0 00006896 3C1B cmp al, 1Bh 0 00006898 7403E98B00 jne .not_esc 3472 3473 ; check escape scancodes for int 16h in -dumb dosemu 3474 ; or input from serial I/O (picocom/screen/ssh/mate-terminal) 3475 .esc: 0 0000689D E8F3F6 call getc 0 000068A0 3C5B cmp al, '[' 0 000068A2 7403E91502 jne .beep 0 000068A7 E8E9F6 call getc 0 000068AA 3C41 cmp al, 41h 0 000068AC 7503E99901 je .up 0 000068B1 3C44 cmp al, 44h 0 000068B3 7503E96601 je .left 0 000068B8 3C42 cmp al, 42h 0 000068BA 7503E9A601 je .down 0 000068BF 3C43 cmp al, 43h 0 000068C1 7503E96B01 je .right 0 000068C6 3C32 cmp al, 32h 0 000068C8 7425 je .check_insert 0 000068CA 3C33 cmp al, 33h 0 000068CC 7421 je .check_del 0 000068CE 3C31 cmp al, 31h 0 000068D0 741D je .check_home 0 000068D2 3C34 cmp al, 34h 0 000068D4 7419 je .check_end 0 000068D6 3C48 cmp al, 48h 0 000068D8 7503E92701 je .home 0 000068DD 3C46 cmp al, 46h 0 000068DF 7503E92C01 je .end 0 000068E4 3C35 cmp al, 35h 0 000068E6 7407 je .check_pageup 0 000068E8 3C36 cmp al, 36h 0 000068EA 7403 je .check_pagedown 0 000068EC E9CD01 jmp .beep 3505 3506 3507 .check_insert: 3508 .check_del: 3509 .check_home: 3510 .check_end: 3511 .check_pageup: 3512 .check_pagedown: 0 000068EF 50 push ax 0 000068F0 E8A0F6 call getc 0 000068F3 3C7E cmp al, 7Eh 0 000068F5 58 pop ax 0 000068F6 7403E9C101 jne .beep 3518 0 000068FB 3C32 cmp al, 32h 0 000068FD 7503E9BA01 je .insert 0 00006902 3C33 cmp al, 33h 0 00006904 7503E9D700 je .del 0 00006909 3C31 cmp al, 31h 0 0000690B 7503E9F400 je .home 0 00006910 3C34 cmp al, 34h 0 00006912 7503E9F900 je .end 0 00006917 3C35 cmp al, 35h 0 00006919 7503E99E01 je .pageup 0 0000691E 3C36 cmp al, 36h 0 00006920 7503E99701 je .pagedown 3531 0 00006925 E99401 jmp .beep 3533 3534 3535 .not_esc: 3536 ; check regular characters 0 00006928 84C0 test al, al ; waste? 0 0000692A 7503E9FBFD je .next 0 0000692F 3CE0 cmp al, 0E0h 0 00006931 7503E9F4FD je .next ; waste --> 3541 0 00006936 3C01 cmp al, 'A' - '@' 0 00006938 7503E9C700 je .home 0 0000693D 3C05 cmp al, 'E' - '@' 0 0000693F 7503E9CC00 je .end 0 00006944 3C03 cmp al, 03h 0 00006946 7503E97801 je .ctrlc 0 0000694B 3C09 cmp al, 09h 0 0000694D 7503E96A01 je .beep ; tab 0 00006952 3C08 cmp al, 08h 0 00006954 745F je .backspace 0 00006956 3C7F cmp al, 7Fh 3553 ; On the server in int 16h of -dumb dosemu, as well as on 3554 ; both systems across serial I/O this code is used. 0 00006958 745B je .backspace 0 0000695A 3C0A cmp al, 10 ; (allow Linux style linebreak) 0 0000695C 7503E96501 je .done 0 00006961 3C0D cmp al, 13 ; (match for CR keypress) 0 00006963 7503E95E01 je .done 3560 3561 .textcodepoint: 0 00006968 8B5EF0 mov bx, word [bp + ?length_input] 0 0000696B 81FBFE00 cmp bx, ?limit 0 0000696F 7207 jb @F 3565 .redraw_and_beep: 0 00006971 C646EAFF mov byte [bp + ?redraw], -1 0 00006975 E94401 jmp .beep 3568 @@: 3569 0 00006978 C646E7FF mov byte [bp + ?edited], -1 0 0000697C 8B56F0 mov dx, word [bp + ?length_input] 0 0000697F 89D1 mov cx, dx 0 00006981 89D7 mov di, dx 0 00006983 16 push ss 0 00006984 07 pop es 0 00006985 81C7[0200] add di, line_in + 2 ; di -> behind end of input 0 00006989 89FE mov si, di 0 0000698B 4E dec si ; si -> at last entry of input 0 0000698C 2B4EEE sub cx, word [bp + ?offset] 0 0000698F 7504 jnz @F ; not appending --> 3581 .textappend: 0 00006991 C646E9FF mov byte [bp + ?append], -1 3583 @@: 0 00006995 FD std ; AMD erratum 109 workaround done 3585 numdef AMD_ERRATUM_109_WORKAROUND, 1 3586 %if _AMD_ERRATUM_109_WORKAROUND 0 00006996 E308 jcxz @FF 0 00006998 83F914 cmp cx, 20 0 0000699B 7703 ja @FF 3590 @@: 0 0000699D A4 movsb 0 0000699E E2FD loop @B 3593 @@: 3594 %endif 0 000069A0 F3A4 rep movsb 0 000069A2 FC cld 0 000069A3 8805 mov byte [di], al 0 000069A5 FF46E4 inc word [bp + ?column] 0 000069A8 FF46EE inc word [bp + ?offset] 0 000069AB FF46F0 inc word [bp + ?length_input] 3601 .redraw: 0 000069AE C646EAFF mov byte [bp + ?redraw], -1 0 000069B2 E975FD jmp .next 3604 3605 .backspace: 0 000069B5 837EEE00 cmp word [bp + ?offset], 0 0 000069B9 7422 je .backspace_offset_0 3608 0 000069BB C646E7FF mov byte [bp + ?edited], -1 0 000069BF 16 push ss 0 000069C0 07 pop es 0 000069C1 8B7EEE mov di, word [bp + ?offset] 0 000069C4 8B4EF0 mov cx, word [bp + ?length_input] 0 000069C7 29F9 sub cx, di ; length after offset 0 000069C9 81C7[0200] add di, line_in + 2 ; -> at offset in line 0 000069CD 89FE mov si, di ; -> at offset in line 0 000069CF 4F dec di ; -> at offset - 1 in line 0 000069D0 F3A4 rep movsb ; move down additional content 0 000069D2 FF4EE4 dec word [bp + ?column] 0 000069D5 FF4EEE dec word [bp + ?offset] 0 000069D8 FF4EF0 dec word [bp + ?length_input] 0 000069DB EBD1 jmp .redraw 3623 3624 .backspace_offset_0: 3625 .del_offset_ae_length_input: 3626 .left_offset_0: 3627 .right_offset_too_high: 0 000069DD E9DC00 jmp .beep 3629 3630 .del: 0 000069E0 8B46EE mov ax, word [bp + ?offset] 0 000069E3 3B46F0 cmp ax, word [bp + ?length_input] 0 000069E6 73F5 jae .del_offset_ae_length_input 0 000069E8 C646E7FF mov byte [bp + ?edited], -1 0 000069EC 89C7 mov di, ax 0 000069EE 81C7[0200] add di, line_in + 2 ; -> at current offset 0 000069F2 89FE mov si, di 0 000069F4 46 inc si ; -> after current offset 0 000069F5 40 inc ax ; offset + 1 0 000069F6 F7D8 neg ax ; - (offset + 1) 0 000069F8 0346F0 add ax, word [bp + ?length_input]; length input - (offset + 1) 0 000069FB 89C1 mov cx, ax 0 000069FD F3A4 rep movsb ; move down part after deleted point 0 000069FF FF4EF0 dec word [bp + ?length_input] 0 00006A02 EBAA jmp .redraw 3646 3647 .home: 0 00006A04 8366EE00 and word [bp + ?offset], 0 0 00006A08 FF76E2 push word [bp + ?promptlength] 0 00006A0B 8F46E4 pop word [bp + ?column] 0 00006A0E EB9E jmp .redraw 3652 3653 .end: 0 00006A10 8B46F0 mov ax, word [bp + ?length_input] 0 00006A13 8946EE mov word [bp + ?offset], ax 0 00006A16 0346E2 add ax, word [bp + ?promptlength] 0 00006A19 8946E4 mov word [bp + ?column], ax 0 00006A1C EB90 jmp .redraw 3659 3660 .left: 0 00006A1E 837EEE00 cmp word [bp + ?offset], 0 0 00006A22 74B9 je .left_offset_0 0 00006A24 C646E8FF mov byte [bp + ?cursormove], -1 0 00006A28 FF4EEE dec word [bp + ?offset] 0 00006A2B FF4EE4 dec word [bp + ?column] 0 00006A2E E97DFF jmp .redraw 3667 3668 .right: 0 00006A31 8B46EE mov ax, word [bp + ?offset] 0 00006A34 3B46F0 cmp ax, word [bp + ?length_input] 0 00006A37 73A4 jnb .right_offset_too_high 0 00006A39 C646E8FF mov byte [bp + ?cursormove], -1 0 00006A3D C646E6FF mov byte [bp + ?cursorright], -1 0 00006A41 FF46EE inc word [bp + ?offset] 0 00006A44 FF46E4 inc word [bp + ?column] 0 00006A47 E964FF jmp .redraw 3677 3678 .up: 0 00006A4A D046E7 rol byte [bp + ?edited], 1 0 00006A4D 726D jc .beep 3681 %if _HISTORY 0 00006A4F 8B76F4 mov si, word [bp + ?historyentry] 0 00006A52 85F6 test si, si 0 00006A54 8D7402 lea si, [si + 2] 0 00006A57 7504 jnz @F 0 00006A59 8B36[0000] mov si, word [history.last] 3687 @@: 0 00006A5D 3B36[0000] cmp si, word [history.first] 0 00006A61 7459 je .beep 0 00006A63 EB1A jmp .copyline 3691 3692 .down: 0 00006A65 D046E7 rol byte [bp + ?edited], 1 0 00006A68 7252 jc .beep 0 00006A6A 8B76F4 mov si, word [bp + ?historyentry] 0 00006A6D 85F6 test si, si 0 00006A6F 744B jz .beep 0 00006A71 3B36[0000] cmp si, word [history.last] 0 00006A75 7506 jne @F 0 00006A77 31C0 xor ax, ax 0 00006A79 31C9 xor cx, cx 0 00006A7B EB10 jmp .setline 3703 3704 @@: 0 00006A7D 4E dec si 0 00006A7E 4E dec si 3707 3708 .copyline: 0 00006A7F 89F0 mov ax, si 3710 gethistorysegment ds 0 00006A81 368E1E[0000] mov %1, word [ss:history.segorsel] 0 00006A86 8B0C mov cx, [si] 0 00006A88 8B7402 mov si, [si + 2] 0 00006A8B 29F1 sub cx, si 3714 3715 .setline: 0 00006A8D 8946F4 mov word [bp + ?historyentry], ax 3717 gethistoryoffset bx 0 00006A90 BB0000 mov %1, 0 0 00006A93 8D30 lea si, [si + bx] 0 00006A95 16 push ss 0 00006A96 07 pop es 0 00006A97 BF[0100] mov di, line_in + 1 0 00006A9A 88C8 mov al, cl 0 00006A9C AA stosb 0 00006A9D F3A4 rep movsb 0 00006A9F B00D mov al, 13 0 00006AA1 AA stosb 0 00006AA2 16 push ss 0 00006AA3 1F pop ds 3729 %else 3730 .down: equ .beep 3731 3732 mov byte [bp + ?edited], -1 3733 %endif 0 00006AA4 31C0 xor ax, ax 0 00006AA6 A0[0100] mov al, byte [line_in + 1] 0 00006AA9 8946EE mov word [bp + ?offset], ax 0 00006AAC 8946F0 mov word [bp + ?length_input], ax 0 00006AAF 0346E2 add ax, word [bp + ?promptlength] 0 00006AB2 8946E4 mov word [bp + ?column], ax 0 00006AB5 8366EC00 and word [bp + ?lastskip], 0 0 00006AB9 E9F2FE jmp .redraw 3742 3743 .insert: 3744 .pageup: 3745 .pagedown: 3746 .beep: 0 00006ABC C646EBFF mov byte [bp + ?beep], -1 0 00006AC0 E967FC jmp .next 3749 3750 .ctrlc: 0 00006AC3 E9[0000] jmp handle_ctrl_c 3752 3753 .done: 0 00006AC6 8B7EF0 mov di, word [bp + ?length_input] 3755 0 00006AC9 8B56EC mov dx, word [bp + ?lastskip] 0 00006ACC 0356F2 add dx, word [bp + ?length_displayed] 3758 ; offset into line (with length displayed) 0 00006ACF 0356E2 add dx, word [bp + ?promptlength]; offset into display 0 00006AD2 3B56E4 cmp dx, word [bp + ?column] ; same as column ? 0 00006AD5 750A jne @F ; no, always redraw --> 3762 0 00006AD7 89F8 mov ax, di 0 00006AD9 0346E2 add ax, word [bp + ?promptlength] 0 00006ADC 3946FE cmp word [bp + ?columns], ax 0 00006ADF 7720 ja .done_no_redraw 3767 3768 @@: 0 00006AE1 B00D mov al, 13 0 00006AE3 E86BF4 call putc ; reset cursor 0 00006AE6 C456F6 les dx, [bp + ?prompt] 0 00006AE9 8B4EE2 mov cx, [bp + ?promptlength] ; es:dx length cx -> prompt data 3773 %if _40COLUMNS 0 00006AEC 31C0 xor ax, ax ; last fragment length = 0 0 00006AEE E8E9F1 call puts_break_line 0 00006AF1 16 push ss 0 00006AF2 07 pop es 0 00006AF3 8B4EF0 mov cx, word [bp + ?length_input] 0 00006AF6 E303 jcxz @F ; if empty line --> 0 00006AF8 E804F2 call puts_break_line_more ; more follows, do a linebreak if ax == 0 3781 @@: 0 00006AFB BA[0200] mov dx, line_in + 2 ; es:dx length cx -> input line data 0 00006AFE E8D9F1 call puts_break_line ; INP:ax = last fragment length 3784 ; jmp .done_no_redraw 3785 ; (fall through) 3786 %else 3787 call puts ; redraw prompt 3788 push ss 3789 pop es 3790 mov dx, line_in + 2 3791 mov cx, word [bp + ?length_input] 3792 call puts ; draw 3793 %endif 3794 3795 .done_no_redraw: 0 00006B01 81C7[0200] add di, line_in + 2 0 00006B05 B00D mov al, 13 0 00006B07 AA stosb ; store the CR (there always is room) 0 00006B08 97 xchg ax, di ; -> behind CR 3800 %ifn _LINK 3801 sub al, ((-section.DATASTACK.vstart+100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size) +line_in+3) & 0FFh ; length of string, excluding CR 3804 ; (This instruction disregards the unnecessary higher byte.) 3805 %else 0 00006B09 2C03 sub al, 3 3807 wlcalc byte_ext_line_in, equ $ - 1 3808 %endif 0 00006B0B 5F pop di ; restore di 0 00006B0C A2[0100] mov byte [line_in+1], al ; store the length byte 0 00006B0F 89EC5D lleave code 3812 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 00006B12 F616[0000] not byte [in_getinput] ; clear 0 00006B16 B301 mov bl, 1 3815 %endif 0 00006B18 E9FDF9 jmp getline_eol_enter_history_and_ext 3817 3818 lleave ctx 3819 3820 3821 fullbsout: 0 00006B1B B008 mov al, 8 0 00006B1D E831F4 call putc 0 00006B20 B020 mov al, 32 0 00006B22 E82CF4 call putc 0 00006B25 B008 mov al, 8 0 00006B27 E927F4 jmp putc 3828 3829 3830 ; INP: - 3831 ; OUT: ax = number of columns to use 3832 ; STT: ds = ss = debugger data selector 3833 get_columns: 0 00006B2A 31C0 xor ax, ax 0 00006B2C F606[0000]10 testopt [serial_flags], sf_use_serial 3836 ; serial ? 0 00006B31 7411 jz @F ; no --> 0 00006B33 0A06[0000] or al, byte [serial_columns] ; ax = number of columns if serial 0 00006B37 7407 jz .default_columns 0 00006B39 3C01 cmp al, 1 0 00006B3B 751C jne @FF 0 00006B3D 48 dec ax ; = 0 0 00006B3E EB04 jmp @F ; use IOC / BDA selection 3844 .default_columns: 0 00006B40 B050 mov al, 80 0 00006B42 EB15 jmp @FF 3847 @@: 0 00006B44 0A06[0000] or al, [io_columns] 0 00006B48 74F6 jz .default_columns 0 00006B4A 3C01 cmp al, 1 ; is 1 ? 0 00006B4C 750B jne @F ; no, use as columns --> 3852 ; yes, automatic (use BDA) 0 00006B4E 06 push es 0 00006B4F B84000 mov ax, 40h ; 0040h is a bimodal segment/selector 0 00006B52 8EC0 mov es, ax 0 00006B54 26A14A00 mov ax, word [ es:4Ah ] ; columns on screen 0 00006B58 07 pop es 3858 @@: 0 00006B59 C3 retn 3860 3861 3862 %if _GETLINEHIGHLIGHT 3863 ; INP: di = index from total text start to visible text 3864 ; cx = length of visible text to display 3865 ; dx -> visible text to display 3866 ; bx = length of total text 3867 ; di != 0 if to highlight first codepoint 3868 ; di + cx < bx if to highlight last codepoint 3869 ; OUT: if INP:cx == 0, 3870 ; just returns 3871 ; if opt3_getline_highlight not set, 3872 ; just chains to puts 3873 ; no prefix highlight if INP:di == 0, 3874 ; else first codepoint displayed highlighted 3875 ; no suffix highlight if INP:di + INP:cx >= INP:bx, 3876 ; else last codepoint displayed highlighted 3877 ; calls puts and/or putsz to display all text 3878 ; CHG: ax, bx, cx, dx 3879 puts_with_highlight: 0 00006B5A E33F jcxz .retn 0 00006B5C F606[0300]01 testopt [options3], opt3_getline_highlight 0 00006B61 7439 jz .justputs 0 00006B63 51 push cx 0 00006B64 85FF test di, di ; prefix to highlight ? 0 00006B66 7414 jz @F ; no --> 3886 .prefix: 0 00006B68 53 push bx 0 00006B69 E83300 call emit_highlight 0 00006B6C 52 push dx ; ! dx on stack 0 00006B6D 51 push cx 0 00006B6E B90100 mov cx, 1 0 00006B71 E841EE call puts ; draw one codepoint 0 00006B74 59 pop cx 0 00006B75 E83000 call emit_unhighlight 0 00006B78 5A pop dx ; ! restore dx -> data 0 00006B79 42 inc dx ; -> second codepoint 0 00006B7A 49 dec cx ; length one less 0 00006B7B 5B pop bx 3899 @@: 0 00006B7C 58 pop ax ; = length of text (including prefix) 0 00006B7D 01F8 add ax, di ; = index past last displayed 0 00006B7F 39D8 cmp ax, bx ; is it equal to total text length ? 0 00006B81 7319 jae .justputs ; yes, just display --> 3904 3905 .suffix: 0 00006B83 E316 jcxz .retn ; if no suffix possible --> 0 00006B85 49 dec cx ; = length of unhighlighted text 0 00006B86 89C8 mov ax, cx 0 00006B88 01D0 add ax, dx ; -> at codepoint to highlight 0 00006B8A 50 push ax 0 00006B8B E827EE call puts ; draw unhighlighted text 0 00006B8E E80E00 call emit_highlight 0 00006B91 5A pop dx ; -> at codepoint to highlight 0 00006B92 B90100 mov cx, 1 0 00006B95 E81DEE call puts ; draw one codepoint 0 00006B98 E80D00 call emit_unhighlight 3917 .retn: 0 00006B9B C3 retn 3919 3920 .justputs: 0 00006B9C E916EE jmp puts ; draw text (no highlight) 3922 %endif 3923 3924 3925 %if _GETLINEHIGHLIGHT || _DHIGHLIGHT 3926 emit_highlight: 0 00006B9F 52 push dx 0 00006BA0 BA[0100] mov dx, msg.highlight + 1 ; -> ASCIZ escape code 0 00006BA3 E889F3 call putsz 0 00006BA6 5A pop dx 0 00006BA7 C3 retn 3932 3933 emit_unhighlight: 0 00006BA8 52 push dx 0 00006BA9 BA[0100] mov dx, msg.unhighlight + 1 ; -> ASCIZ escape code 0 00006BAC E880F3 call putsz 0 00006BAF 5A pop dx 0 00006BB0 C3 retn 3939 %endif 3940 3941 3942 getline_reset_notatty: 0 00006BB1 F606[0300]02 testopt [internalflags3], dif3_input_re_closed 0 00006BB6 7421 jz @F 0 00006BB8 8026[0300]FD clropt [internalflags3], dif3_input_re_closed 0 00006BBD F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00006BC2 7515 jnz @F 3948 %if _INPUT_FILE_HANDLES 0 00006BC4 E8[0000] call InDOS_or_BIOS_IO 0 00006BC7 7507 jnz .notfile1 0 00006BC9 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006BCE 7509 jnz @F 3953 .notfile1: 3954 %endif 3955 %if _INPUT_FILE_BOOT 0 00006BD0 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00006BD5 7502 jnz @F 3958 %endif 0 00006BD7 EB47 jmp .clear_notatty 3960 3961 @@: 0 00006BD9 F606[0100]02 testopt [internalflags3], dif3_input_cmdline_closed 0 00006BDE 741A jz @F 0 00006BE0 8026[0100]FD clropt [internalflags3], dif3_input_cmdline_closed 3965 %if _INPUT_FILE_HANDLES 0 00006BE5 E8[0000] call InDOS_or_BIOS_IO 0 00006BE8 7507 jnz .notfile2 0 00006BEA F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006BEF 7509 jnz @F 3970 .notfile2: 3971 %endif 3972 %if _INPUT_FILE_BOOT 0 00006BF1 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00006BF6 7502 jnz @F 3975 %endif 0 00006BF8 EB26 jmp .clear_notatty 3977 3978 @@: 3979 %if _INPUT_FILE_BOOT 0 00006BFA F606[0300]04 testopt [internalflags2], dif2_closed_input_file_boot 0 00006BFF 7413 jz @F 0 00006C01 8026[0300]FB clropt [internalflags2], dif2_closed_input_file_boot 3983 %if _INPUT_FILE_HANDLES 0 00006C06 E8[0000] call InDOS_or_BIOS_IO 0 00006C09 7507 jnz .notfile3 0 00006C0B F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006C10 7502 jnz @F 3988 .notfile3: 3989 %endif 0 00006C12 EB0C jmp .clear_notatty 3991 @@: 3992 %endif 3993 %if _INPUT_FILE_HANDLES 0 00006C14 F606[0200]20 testopt [internalflags2], dif2_closed_input_file 0 00006C19 7411 jz @F 0 00006C1B 8026[0200]DF clropt [internalflags2], dif2_closed_input_file 3997 %else 3998 jmp @F 3999 %endif 4000 .clear_notatty: 0 00006C20 F606[0000]30 testopt [internalflags], inputfile | notstdinput 0 00006C25 7505 jnz @F 0 00006C27 C606[0000]00 mov byte [notatty], 0 ; it _is_ a tty 4004 @@: 0 00006C2C C3 retn 4006 4007 4008 ; Fill input buffer from file. 4009 ; 4010 ; INP: di-> first available byte in input buffer 4011 ; OUT: CY if DOS returned an error or EOF occured 4012 ; NC if no error 4013 ; si = di 4014 ; CHG: - 4015 fillbuf: 0 00006C2D E8[0000] call handle_serial_flags_ctrl_c 0 00006C30 50 push ax 0 00006C31 53 push bx 0 00006C32 51 push cx 0 00006C33 52 push dx 0 00006C34 89FE mov si, di ; we know this already 0 00006C36 B9[0101] mov cx, line_in+LINE_IN_LEN 0 00006C39 89FA mov dx, di 0 00006C3B 29F9 sub cx, di 0 00006C3D 7703E99F00 jbe .ret_cy ; if no more room --> 4026 4027 %if !_LOADER 0 00006C42 F606[0300]01 testopt [internalflags3], dif3_input_re 0 00006C47 7429 jz .not_re 0 00006C49 56 push si 0 00006C4A 57 push di 0 00006C4B 89CB mov bx, cx 0 00006C4D 8B36[0000] mov si, word [re_buffer.position] 0 00006C51 89F7 mov di, si 0 00006C53 B9FFFF mov cx, -1 0 00006C56 31C0 xor ax, ax 0 00006C58 F2AE repne scasb 0 00006C5A F7D1 not cx 0 00006C5C 49 dec cx 0 00006C5D 39CB cmp bx, cx 0 00006C5F 7702 ja @F 0 00006C61 89D9 mov cx, bx 4043 @@: 0 00006C63 89C8 mov ax, cx 0 00006C65 89D7 mov di, dx 0 00006C67 F3A4 rep movsb 0 00006C69 8936[0000] mov word [re_buffer.position], si 0 00006C6D 5F pop di 0 00006C6E 5E pop si 0 00006C6F F8 clc 0 00006C70 EB61 jmp .after 4052 4053 .not_re: 4054 %endif 4055 4056 %if _INPUT_FILE_BOOT 0 00006C72 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00006C77 7408 jz @F 0 00006C79 E8[0000] call yy_boot_remember_seek 0 00006C7C E8[0000] call yy_boot_read 0 00006C7F EB52 jmp .after 4062 @@: 4063 %endif 4064 4065 %if _INPUT_FILE_HANDLES 0 00006C81 E8[0000] call InDOS_or_BIOS_IO 0 00006C84 750E jnz @F 0 00006C86 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006C8B 7407 jz @F ; if not input file --> 0 00006C8D 57 push di 0 00006C8E E850F5 call yy_get_handle ; bx = handle 0 00006C91 5F pop di 0 00006C92 EB37 jmp .file_handle 4074 %endif 4075 4076 @@: 0 00006C94 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00006C99 7429 jz .not_cmdline 0 00006C9B 56 push si 0 00006C9C 57 push di 0 00006C9D 89CB mov bx, cx 0 00006C9F 8B36[0000] mov si, word [cmdline_buffer.position] 0 00006CA3 89F7 mov di, si 0 00006CA5 B9FFFF mov cx, -1 0 00006CA8 31C0 xor ax, ax 0 00006CAA F2AE repne scasb 0 00006CAC F7D1 not cx 0 00006CAE 49 dec cx 0 00006CAF 39CB cmp bx, cx 0 00006CB1 7702 ja @F 0 00006CB3 89D9 mov cx, bx 4092 @@: 0 00006CB5 89C8 mov ax, cx 0 00006CB7 89D7 mov di, dx 0 00006CB9 F3A4 rep movsb 0 00006CBB 8936[0000] mov word [cmdline_buffer.position], si 0 00006CBF 5F pop di 0 00006CC0 5E pop si 0 00006CC1 F8 clc 0 00006CC2 EB0F jmp .after 4101 4102 .not_cmdline: 4103 4104 @@: 0 00006CC4 31DB xor bx, bx ; bx = handle (0 is STDIN) 0 00006CC6 E8[0000] call InDOS_or_BIOS_IO 0 00006CC9 7516 jnz .ret_cy 4108 4109 .file_handle: 0 00006CCB B43F mov ah, 3Fh ; read from file 0 00006CCD E88608 call yy_remember_seek 4112 doscall 0 00006CD0 E8[0000] nearcall _doscall 4113 .after: 0 00006CD3 720C jc .ret_cy ; if error --> 0 00006CD5 85C0 test ax, ax 0 00006CD7 7408 jz .ret_cy ; if EOF --> 0 00006CD9 01C2 add dx, ax ; -> behind last valid byte 4118 0 00006CDB 8026[0100]FB clropt [internalflags3], dif3_at_line_end 4120 0 00006CE0 A8 db __TEST_IMM8 ; (NC) 4122 .ret_cy: 0 00006CE1 F9 stc 0 00006CE2 8916[0000] mov word [bufend], dx ; -> behind last valid byte 0 00006CE6 5A pop dx 0 00006CE7 59 pop cx 0 00006CE8 5B pop bx 0 00006CE9 58 pop ax 0 00006CEA C3 retn 4130 4131 4132 %if _EXTENSIONS || _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4133 display_y_or_ext: 0 00006CEB 52 push dx 4135 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00006CEC BA[0000] mov dx, msg.y 4137 %if _EXTENSIONS 0 00006CEF D006[0000] rol byte [yy_is_script], 1 0 00006CF3 7203 jc @F 4140 %endif 4141 %endif 4142 %if _EXTENSIONS 0 00006CF5 BA[0000] mov dx, msg.ext 4144 %endif 4145 @@: 0 00006CF8 E82EF2 call putsz_error 0 00006CFB 5A pop dx 0 00006CFC C3 retn 4149 %endif 4150 4151 4152 %if _EXTENSIONS 4153 close_ext: section_of_function 4154 %if _APPLICATION || _DEVICE 0 00006CFD E8[0000] call InDOS 0 00006D00 7511 jnz @F 0 00006D02 BBFFFF mov bx, -1 0 00006D05 871E[0000] xchg bx, word [ext_handle] 0 00006D09 83FBFF cmp bx, -1 0 00006D0C 7405 je @F 0 00006D0E B43E mov ah, 3Eh 4162 doscall 0 00006D10 E8[0000] nearcall _doscall 4163 @@: 4164 %endif 0 00006D13 C3 retn 4166 4167 load_extension: 0 00006D14 E865EB call skipcomma 0 00006D17 C606[0000]00 mov byte [yy_is_script], 0 0 00006D1C EB08 jmp @F 4171 %endif 4172 4173 %ifn _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4174 yy equ error 4175 %else 4176 yy: 0 00006D1E C606[0000]FF mov byte [yy_is_script], 0FFh 4178 %endif 4179 %if _EXTENSIONS || _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00006D23 E8[0000] call guard_re 4181 @@: 4182 yy_or_ext_no_guard_re: 4183 %if _INPUT_FILE_BOOT || (_EXTENSIONS && _BOOTLDR) 0 00006D26 F606[0100]40 testopt [internalflags], nodosloaded 0 00006D2B 7403E9[0000] jnz yy_boot 4186 %endif 4187 %ifn _INPUT_FILE_HANDLES || (_EXTENSIONS && (_APPLICATION || _DEVICE)) 4188 jmp error 4189 %else 4190 %if _EXTENSIONS && (_APPLICATION || _DEVICE) 0 00006D30 D006[0000] rol byte [yy_is_script], 1 0 00006D34 721A jc @F 0 00006D36 E8[0000] call InDOS 0 00006D39 E84D01 call yy_dos_parse_name 0 00006D3C 8D54FF lea dx, [si - 1] 0 00006D3F 8916[0000] mov word [ext_cmdline], dx 0 00006D43 E837EB call skipcomm0 0 00006D46 8936[0000] mov word [if_exists_then_address], si 0 00006D4A E84C02 call yy_open_file 0 00006D4D E91E03 jmp ext_finish 4201 4202 @@: 4203 %endif 4204 %ifn _INPUT_FILE_HANDLES 4205 jmp error 4206 %else 0 00006D50 E8[0000] call InDOS_or_BIOS_IO 0 00006D53 E83301 call yy_dos_parse_name 4209 0 00006D56 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006D5B 7413 jz @F 4212 ; IFH = 1 4213 ; IFH - 1 = 0 4214 ; cmp active, 0 4215 ; active >= 0 --> error 4216 4217 ; IFH = 2 4218 ; IFH - 1 = 1 4219 ; cmp active, 1 4220 ; active >= 1 --> error 0 00006D5D 833E[0000]0F cmp word [input_file_handles.active], _INPUT_FILE_HANDLES - 1 0 00006D62 720C jb @F 4223 0 00006D64 B80803 mov ax, 0308h 0 00006D67 E8[0000] call setrc 0 00006D6A BA[0000] mov dx, msg.yy_too_many_handles 0 00006D6D E9BB01 jmp yy_disp_error_1 4228 @@: 4229 0 00006D70 803F3A cmp byte [bx], ':' 0 00006D73 7572 jne .not_yy_goto_subfunction 4232 4233 %if _EXTENSIONS && _COMLEVELS 0 00006D75 51 push cx 0 00006D76 53 push bx 0 00006D77 89D8 mov ax, bx 0 00006D79 BB9004 mov bx, COMLEVEL_DO_YY_GOTO 0 00006D7C 8B0E[0000] mov cx, [ext_comlevels_handler] 0 00006D80 E303 jcxz @F 4240 ; INP: ax -> yy goto subfunction 4241 ; cx destroyed 4242 ; bx = function, 4243 ; COMLEVEL_DO_YY_GOTO 4244 ; COMLEVEL_DO_YY_BOOT_GOTO 4245 ; OUT: cx don't care 4246 ; jump to downlink or extcall near_transfer_ext_return 4247 ; extcall cmd3 to skip remaining code 0 00006D82 E88E06 call transfer_ext_cx_NC_push_ax 4249 @@: 0 00006D85 5B pop bx 0 00006D86 59 pop cx 4252 %endif 0 00006D87 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006D8C 750C jnz @F 4255 0 00006D8E E89DF8 call getline_is_input_file? 0 00006D91 7248 jc .no_file 0 00006D93 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00006D98 7541 jnz .no_file 4260 @@: 4261 0 00006D9A 8B3E[0000] mov di, word [terminator_in_line_in.offset] 0 00006D9E A0[0000] mov al, byte [terminator_in_line_in.value] 0 00006DA1 8805 mov byte [di], al 4265 0 00006DA3 43 inc bx 0 00006DA4 89DE mov si, bx 0 00006DA6 E802EB call skipwhite 0 00006DA9 4E dec si 0 00006DAA 89F5 mov bp, si 4271 0 00006DAC E88F06 call yy_reset_buf 4273 0 00006DAF 31DB xor bx, bx ; bx = handle (0 is STDIN) 4275 %if _INPUT_FILE_HANDLES 0 00006DB1 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006DB6 7405 jz @F ; if not input file --> 0 00006DB8 57 push di 0 00006DB9 E825F4 call yy_get_handle ; bx = handle 0 00006DBC 5F pop di 4281 @@: 4282 %endif 0 00006DBD B445 mov ah, 45h 4284 doscall ; duplicate file handle 0 00006DBF E8[0000] nearcall _doscall 0 00006DC2 7303E91002 jc yy_open_file.error 0 00006DC7 93 xchg ax, bx 4287 0 00006DC8 31C9 xor cx, cx 0 00006DCA 31D2 xor dx, dx 0 00006DCC B80142 mov ax, 4201h ; lseek, from current file position 4291 doscall ; call DOS 0 00006DCF E8[0000] nearcall _doscall 0 00006DD2 91 xchg ax, cx ; dx:cx = current seek 0 00006DD3 87D1 xchg dx, cx ; cx:dx = current seek 0 00006DD5 BE0001 mov si, ifhfIsDup 0 00006DD8 93 xchg ax, bx 0 00006DD9 EB4F jmp yy_finish 4297 4298 4299 .no_file: 0 00006DDB B80903 mov ax, 0309h 0 00006DDE E8[0000] call setrc 0 00006DE1 BA[0000] mov dx, msg.yy_no_file 0 00006DE4 E94401 jmp yy_disp_error_1 4304 4305 .not_yy_goto_subfunction: 0 00006DE7 31ED xor bp, bp 0 00006DE9 E891EA call skipcomm0 0 00006DEC 8936[0000] mov word [if_exists_then_address], si 0 00006DF0 E86DEA call iseol?_or_then 0 00006DF3 7429 je .not_yy_goto 4311 0 00006DF5 3C3A cmp al, ':' 0 00006DF7 7403E9[0000] jne error 4314 0 00006DFC E8ACEA call skipwhite 0 00006DFF 4E dec si 0 00006E00 89F5 mov bp, si 4318 4319 @@: 0 00006E02 AC lodsb 0 00006E03 3C20 cmp al, 32 0 00006E05 740D je @F 0 00006E07 3C09 cmp al, 9 0 00006E09 7409 je @F 0 00006E0B 3C2C cmp al, ',' 0 00006E0D 7405 je @F 0 00006E0F E85FEA call iseol? 0 00006E12 75EE jne @B 4329 @@: 0 00006E14 E866EA call skipcomm0 0 00006E17 8936[0000] mov word [if_exists_then_address], si 0 00006E1B E898EA call chkeol_or_then 4333 4334 .not_yy_goto: 0 00006E1E E87801 call yy_open_file 4336 4337 ; ax = file handle 0 00006E21 E81A06 call yy_reset_buf 4339 0 00006E24 31C9 xor cx, cx 0 00006E26 31D2 xor dx, dx 0 00006E28 31F6 xor si, si 4343 yy_finish: 0 00006E2A F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006E2F 7509 jnz @F 0 00006E31 800E[0200]10 setopt [internalflags2], dif2_input_file 0 00006E36 31DB xor bx, bx 0 00006E38 EB18 jmp @FF 4349 4350 @@: 0 00006E3A FF06[0000] inc word [input_file_handles.active] 0 00006E3E 8B1E[0000] mov bx, word [input_file_handles.active] 0 00006E42 D1E3 shl bx, 1 0 00006E44 D1E3 shl bx, 1 0 00006E46 D1E3 shl bx, 1 ; to qword array index 4356 %if INPUTFILEHANDLE_size != 8 4357 %error Unexpected structure size 4358 %endif 0 00006E48 8BBF[FAFF] mov di, word [input_file_handles + bx - INPUTFILEHANDLE_size + ifhFlags] 0 00006E4C 81E700F0 and di, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 0 00006E50 09FE or si, di 4363 @@: 4364 0 00006E52 8987[0000] mov word [input_file_handles + bx + ifhHandle], ax 0 00006E56 89B7[0200] mov word [input_file_handles + bx + ifhFlags], si 0 00006E5A 8997[0400] mov word [input_file_handles + bx + ifhParentSeek], dx 0 00006E5E 898F[0600] mov word [input_file_handles + bx + ifhParentSeek + 2], cx 4369 4370 %if _EXTENSIONS && _COMLEVELS 0 00006E62 31C0 xor ax, ax 0 00006E64 BB0004 mov bx, COMLEVEL_INIT_YY 0 00006E67 8B0E[0000] mov cx, [ext_comlevels_handler] 0 00006E6B E303 jcxz @F 4375 ; INP: ax = 0 4376 ; cx destroyed 4377 ; bx = function, 4378 ; COMLEVEL_INIT_RC 4379 ; COMLEVEL_INIT_YY 4380 ; COMLEVEL_INIT_YY_BOOT 4381 ; COMLEVEL_INIT_RE 4382 ; OUT: cx don't care 4383 ; jump to downlink or extcall near_transfer_ext_return 4384 ; REM: the initialisation of RC buffer execution set up by 4385 ; the debugger's init doesn't call out this way. 4386 ; RE buffer execution only calls out if the entire RE 4387 ; buffer does not equal "@R", else dumpregs is called 4388 ; internally without setup of reading the RE buffer. 0 00006E6D E8A305 call transfer_ext_cx_NC_push_ax 4390 @@: 4391 %endif 4392 0 00006E70 8026[0300]EF clropt [internalflags3], dif3_auxbuff_guarded_1 0 00006E75 89EE mov si, bp 0 00006E77 85F6 test si, si 0 00006E79 7403E92407 jnz cmd_goto.yy_entry 4397 4398 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00006E7E F606[0300]08 testopt [internalflags3], dif3_in_if 0 00006E83 7403E9[0000] jnz if_exists_found_open 4401 %endif 0 00006E88 C3 retn 4403 %endif 4404 %endif 4405 %endif 4406 4407 4408 %if _INPUT_FILE_HANDLES || (_EXTENSIONS && (_APPLICATION || _DEVICE)) 4409 yy_dos_parse_name: section_of_function 0 00006E89 740C jz @F 0 00006E8B B80503 mov ax, 0305h 0 00006E8E E8[0000] call setrc 0 00006E91 BA[0000] mov dx, msg.yy_no_dos 0 00006E94 E99400 jmp yy_disp_error_1 4415 4416 @@: 4417 ; If input_file_handles.to_close is set, 4418 ; close all left over open files. (This 4419 ; may only be done when DOS is available.) 0 00006E97 31DB xor bx, bx ; if none left open, -> first structure 0 00006E99 F606[0200]10 testopt [internalflags2], dif2_input_file 0 00006E9E 740B jz @F 0 00006EA0 8B1E[0000] mov bx, word [input_file_handles.active] 0 00006EA4 43 inc bx ; point to first unused structure 0 00006EA5 D1E3 shl bx, 1 0 00006EA7 D1E3 shl bx, 1 0 00006EA9 D1E3 shl bx, 1 ; to qword array index 4428 %if INPUTFILEHANDLE_size != 8 4429 %error Unexpected structure size 4430 %endif 4431 @@: 0 00006EAB 89DF mov di, bx ; + input_file_handles -> to close 0 00006EAD 31C0 xor ax, ax ; zero base amount to close 0 00006EAF E811F3 call yy_close_file_handles 4435 ; CHG: ax, bx, di 4436 ; if we remembered to close any, do it now 4437 %if _EXTENSIONS 0 00006EB2 E848FE call close_ext 4439 %endif 4440 %endif 4441 4442 yy_common_parse_name: section_of_function 0 00006EB5 8D5CFF lea bx, [si - 1] ; -> start of name 4444 4445 ; INP: si - 1 -> text 4446 ; bx -> buffer to store to, 256 Bytes 4447 ; OUT: al = first text byte of trailer 4448 ; si - 1 -> trailer 4449 ; byte [si - 1] may be NUL written there 4450 ; in case that INP:bx == INP:si - 1 4451 ; bx -> pathname, NUL-terminated 4452 ; di -> terminator NUL 4453 ; bx may point into a config path buffer 4454 ; CHG: ax, dx 4455 yy_common_parse_name_bx_buffer: section_of_function 0 00006EB8 4E dec si 4457 %if _CONFIG || _EXECUTABLE 0 00006EB9 56 push si ; -> start of name 0 00006EBA 53 push bx ; -> start of buffer (may != si) 4460 %if _EXECUTABLE 0 00006EBB BB[0000] mov bx, init_executable_pathname 0 00006EBE 8B3E[0000] mov di, word [init_executable_pathname.end] 0 00006EC2 BA[0000] mov dx, msg.executablekeyword 0 00006EC5 E83EE9 call isstring? 0 00006EC8 743D je .execkw 4466 %endif 4467 %if _CONFIG 0 00006ECA 830E[0000]FF or word [yy_try_scriptspath], -1 0 00006ECF BB[0000] mov bx, scriptspath 0 00006ED2 8B3E[0000] mov di, word [scriptspath.dir_end] 0 00006ED6 BA[0000] mov dx, msg.scriptskeyword 0 00006ED9 E82AE9 call isstring? 0 00006EDC 741B je .kw 0 00006EDE BB[0000] mov bx, configpath 0 00006EE1 8B3E[0000] mov di, word [configpath.dir_end] 0 00006EE5 BA[0000] mov dx, msg.configkeyword 0 00006EE8 E81BE9 call isstring? 0 00006EEB 740C je .kw 0 00006EED 5B pop bx ; -> start of buffer 0 00006EEE 53 push bx 0 00006EEF 89DF mov di, bx ; -> start of buffer 0 00006EF1 BA[0000] mov dx, msg.emptykeyword 0 00006EF4 E80FE9 call isstring? 0 00006EF7 751F jne @F 4485 .kw: 0 00006EF9 AC lodsb 0 00006EFA 3C3A cmp al, ':' 0 00006EFC 751A jne @F 0 00006EFE F616[0000] not byte [yy_try_scriptspath.nokeywordused] 0 00006F02 58 pop ax 0 00006F03 58 pop ax 0 00006F04 AC lodsb ; load character 0 00006F05 EB33 jmp @FFF 4494 %endif 4495 4496 %if _EXECUTABLE 4497 .execkw: 0 00006F07 AC lodsb 0 00006F08 3C3A cmp al, ':' 0 00006F0A 750C jne @F 0 00006F0C F616[0000] not byte [yy_try_scriptspath.nokeywordused] 0 00006F10 58 pop ax 0 00006F11 58 pop ax 0 00006F12 AC lodsb ; load character 0 00006F13 39FB cmp bx, di ; empty ? 0 00006F15 7449 je .empty ; yes --> 0 00006F17 C3 retn 4508 %endif 4509 @@: 0 00006F18 5B pop bx 0 00006F19 5E pop si 4512 %endif 0 00006F1A 89DF mov di, bx ; -> start of buffer 4514 @@: 0 00006F1C AC lodsb ; load character 0 00006F1D E851E9 call iseol? 0 00006F20 7518 jne @F 0 00006F22 BA[0000] mov dx, msg.yy_requires_filename 0 00006F25 B80403 mov ax, 0304h 0 00006F28 E8[0000] call setrc 4521 yy_disp_error_1: equ $ 0 00006F2B B8FF03 mov ax, 03FFh 0 00006F2E E8[0000] call setrc 0 00006F31 E8B7FD call display_y_or_ext 0 00006F34 E8F2EF call putsz_error 0 00006F37 E9[0000] jmp cmd3 4527 4528 @@: 4529 .unquoted_loop: 0 00006F3A 3C20 cmp al, 32 ; blank or EOL outside quoted part ? 0 00006F3C 7449 je .blank 0 00006F3E 3C09 cmp al, 9 0 00006F40 7445 je .blank 0 00006F42 E82CE9 call iseol? ; (includes semicolon in lDebug) 0 00006F45 7440 je .blank ; yes --> 0 00006F47 3C2C cmp al, ',' 0 00006F49 743C je .blank 0 00006F4B 3C22 cmp al, '"' ; starting quote mark ? 0 00006F4D 740E je .quoted ; yes --> 0 00006F4F AA stosb ; store character 4541 .unquote: 0 00006F50 AC lodsb ; load character 0 00006F51 EBE7 jmp .unquoted_loop ; continue in not-quoted loop --> 4544 4545 .quoted_loop: 0 00006F53 E81FE9 call iseol?.notsemicolon; EOL inside quoted part ? 0 00006F56 7424 je .quoted_eol ; if yes, error --> 0 00006F58 3C22 cmp al, '"' ; ending quote mark ? 0 00006F5A 74F4 je .unquote ; yes --> 0 00006F5C AA stosb ; store character 4551 .quoted: 0 00006F5D AC lodsb ; load character 0 00006F5E EBF3 jmp .quoted_loop ; continue in quoted loop --> 4554 4555 .empty: 0 00006F60 E81AE9 call skipcomm0 0 00006F63 8936[0000] mov word [if_exists_then_address], si 0 00006F67 F606[0300]08 testopt [internalflags3], dif3_in_if 0 00006F6C 7403E9[0000] jnz if_exists_not_found 0 00006F71 B80603 mov ax, 0306h 0 00006F74 E8[0000] call setrc 0 00006F77 BA[0000] mov dx, msg.yy_filename_empty 0 00006F7A EBAF jmp yy_disp_error_1 4564 4565 .quoted_eol: 0 00006F7C B80703 mov ax, 0307h 0 00006F7F E8[0000] call setrc 0 00006F82 BA[0000] mov dx, msg.yy_filename_missing_unquote 0 00006F85 EBA4 jmp yy_disp_error_1 4570 4571 .blank: 0 00006F87 39FB cmp bx, di ; empty ? 0 00006F89 74D5 je .empty ; yes --> 4574 ; done 0 00006F8B 50 push ax 0 00006F8C B000 mov al, 0 0 00006F8E 8605 xchg al, byte [di] ; terminate after filename 0 00006F90 893E[0000] mov word [terminator_in_line_in.offset], di 0 00006F94 A2[0000] mov byte [terminator_in_line_in.value], al 0 00006F97 58 pop ax 0 00006F98 C3 retn 4582 4583 4584 ; INP: ds:bx -> filename 4585 ; OUT: File opened, 4586 ; ax = file handle 4587 ; STT: ds = es = ss = debugger data selector/segment 4588 yy_open_file: section_of_function 0 00006F99 89DF mov di, bx 0 00006F9B E85400 call .setup_opencreate ; ds:si -> pathname 0 00006F9E B86C71 mov ax, 716Ch ; LFN open-create 0 00006FA1 57 push di 0 00006FA2 31FF xor di, di ; alias hint 0 00006FA4 F9 stc 4595 doscall 0 00006FA5 E8[0000] nearcall _doscall 0 00006FA8 5F pop di 0 00006FA9 7351 jnc .got ; LFN call succeeded --> 4598 4599 ; Early case for no-LFN-interface available. 4600 ; cmp ax, 1 4601 ; je .try_sfn 0 00006FAB 3D0071 cmp ax, 7100h 0 00006FAE 7405 je .try_sfn 4604 0 00006FB0 E84A00 call yy_check_lfn 0 00006FB3 7322 jnc .error ; if LFN interface is available, actual error 4607 ; if LFN interface is not available, try SFN 4608 4609 .try_sfn: 0 00006FB5 E83A00 call .setup_opencreate 0 00006FB8 B8006C mov ax, 6C00h ; Open-create 0 00006FBB F9 stc 4613 doscall 0 00006FBC E8[0000] nearcall _doscall 0 00006FBF 733B jnc .got 4615 0 00006FC1 83F801 cmp ax, 1 0 00006FC4 7405 je .try_old_open 0 00006FC6 3D006C cmp ax, 6C00h 0 00006FC9 750C jne .error 4620 4621 .try_old_open: 0 00006FCB 88D8 mov al, bl ; access and sharing modes 0 00006FCD B43D mov ah, 3Dh ; Open 0 00006FCF 89F2 mov dx, si ; -> filename 0 00006FD1 F9 stc 4626 doscall 0 00006FD2 E8[0000] nearcall _doscall 0 00006FD5 7325 jnc .got 4628 4629 .error: 4630 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4631 %if _CONFIG 0 00006FD7 E86F00 call retry_open_scriptspath 0 00006FDA 74BD je yy_open_file 4634 %endif 0 00006FDC F606[0300]08 testopt [internalflags3], dif3_in_if 0 00006FE1 7403E9[0000] jnz if_exists_not_found 4637 %endif 0 00006FE6 B80A03 mov ax, 030Ah 0 00006FE9 E8[0000] call setrc 0 00006FEC BA[0000] mov dx, msg.yy_error_file_open 0 00006FEF E939FF jmp yy_disp_error_1 4642 4643 .setup_opencreate: 0 00006FF2 89FE mov si, di ; -> filename 0 00006FF4 BBA060 mov bx, 0110_0000_1010_0000b ; Auto-commit, no int 24h 4646 ; No inherit 4647 ; DENY WRITE, Read-only 0 00006FF7 31C9 xor cx, cx ; create attribute 0 00006FF9 BA0100 mov dx, 0000_0000_0000_0001b ; no create / open, no truncate 4650 .got: 0 00006FFC C3 retn 4652 4653 4654 ; INP: ds:si -> pathname, possibly with drive letter 4655 ; OUT: NC if LFN services available 4656 ; CY if no LFN services available 4657 yy_check_lfn: section_of_function 4658 ; Only now, we check whether the used drive supports LFNs. 4659 ; If it does, then we treat the error received as an 4660 ; actual error and cancel here. If not, the SFN function 4661 ; is called next as a fallback. 4662 ; 4663 ; We cannot rely on specific error returns like the 4664 ; expected 7100h CY (or 7100h CF-unchanged) or the similar 4665 ; 0001h CY (Invalid function) because no one agrees on what 4666 ; error code to use. 4667 ; 4668 ; dosemu returns 0003h (Path not found) on FATFS and 4669 ; redirected-non-dosemu drives. But may be changed so as to 4670 ; return 0059h (Function not supported on network). 4671 ; MSWindows 98SE returns 0002h (File not found) on 4672 ; DOS-redirected drives. 4673 ; DOSLFN with Fallback mode enabled supports the call (albeit 4674 ; limited to SFNs). 4675 ; 4676 ; To suss out what the error means, check LFN availability. 4677 ; 4678 ; Refer to https://github.com/stsp/dosemu2/issues/770 0 00006FFD 1E push ds 0 00006FFE 06 push es 0 00006FFF 57 push di 0 00007000 50 push ax 4683 lframe 4684 lvar 34, fstype_buffer 4685 lvar 4, pathname_buffer 0 00007001 5589E58D66DA lenter 4687 0 00007007 AD lodsw ; load first two bytes of pathname 4689 0 00007008 16 push ss 0 00007009 1F pop ds 0 0000700A 89E2 mov dx, sp ; ds:dx -> ?pathname_buffer 0 0000700C 16 push ss 0 0000700D 07 pop es 0 0000700E 89E7 mov di, sp ; es:di -> ?pathname_buffer 4696 0 00007010 80FC3A cmp ah, ':' ; starts with drive specifier ? 0 00007013 7409 je @F ; yes --> 4699 0 00007015 B419 mov ah, 19h 4701 doscall ; get current default drive 0 00007017 E8[0000] nearcall _doscall 0 0000701A 0441 add al, 'A' ; A: = 0, convert to drive letter 0 0000701C B43A mov ah, ':' ; drive specifier 4704 @@: 0 0000701E AB stosw 0 0000701F B85C00 mov ax, '\' ; backslash and zero terminator 0 00007022 AB stosw ; es:di -> ?fstype_buffer 4708 0 00007023 31C0 xor ax, ax 0 00007025 B91100 mov cx, 34 >> 1 0 00007028 57 push di 0 00007029 F3AB rep stosw ; initialise ?fstype_buffer to all zeros 0 0000702B 5F pop di ; -> ?fstype_buffer 4714 0 0000702C B92000 mov cx, 32 ; size of ?fstype_buffer 0 0000702F 31DB xor bx, bx ; harden, initialise this 0 00007031 B8A071 mov ax, 71A0h ; get volume information 0 00007034 F9 stc 4719 doscall ; (depends on ds = es = ss) 0 00007035 E8[0000] nearcall _doscall 4720 0 00007038 7207 jc @F ; if call not supported --> 4722 ; bx = FS flags 0 0000703A F6C740 test bh, 0100_0000b ; LFN interface available ? 0 0000703D F9 stc ; if no 0 0000703E 7401 jz @F ; no --> 4726 0 00007040 F8 clc ; is available 4728 @@: 4729 0 00007041 89EC5D lleave 0 00007044 58 pop ax ; (restore error code) 0 00007045 5F pop di 0 00007046 07 pop es 0 00007047 1F pop ds 0 00007048 C3 retn 4736 4737 4738 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || _EXTENSIONS 4739 %if _CONFIG 4740 ; INP: di -> filepath tried 4741 ; word [yy_try_scriptspath] 4742 ; OUT: ZR if to retry, 4743 ; bx -> new filepath 4744 ; NZ if not 4745 ; STT: es = ds = ss 4746 retry_open_scriptspath: section_of_function 0 00007049 833E[0000]FF cmp word [yy_try_scriptspath], -1 0 0000704E 751D jne @F ; --> NZ 0 00007050 F616[0000] not byte [yy_try_scriptspath.didnotyettry] 0 00007054 89FE mov si, di 0 00007056 B9FF00 mov cx, 255 0 00007059 B000 mov al, 0 0 0000705B F2AE repne scasb 0 0000705D 89F9 mov cx, di 0 0000705F 29F1 sub cx, si 0 00007061 8B3E[0000] mov di, word [scriptspath.dir_end] 0 00007065 F3A4 rep movsb 0 00007067 AA stosb 0 00007068 BB[0000] mov bx, scriptspath 0 0000706B 38C0 cmp al, al ; ZR 4761 @@: 0 0000706D C3 retn 4763 %elif _EXTENSIONS 4764 retry_open_scriptspath: section_of_function 4765 test sp, sp ; NZ 4766 retn 4767 %endif 4768 %endif 4769 4770 %if _EXTENSIONS 4771 ext_finish: 0 0000706E A3[0000] mov word [ext_handle], ax 0 00007071 93 xchg bx, ax 4774 .boot: 0 00007072 8B3E[0000] mov di, word [terminator_in_line_in.offset] 0 00007076 A0[0000] mov al, byte [terminator_in_line_in.value] 0 00007079 8805 mov byte [di], al 4778 4779 %if _RECLAIM 0 0000707B 53 push bx 4781 %if _PM 0 0000707C E8B103 call get_es_ext 4783 %else 4784 mov es, word [extseg] 4785 %endif 4786 4787 %define extcall nearcall 4788 %define extcallcall nearcall 4789 %imacro internalcoderelocation 0-*.nolist 4790 %endmacro 4791 %imacro internaldatarelocation 0-*.nolist 4792 %endmacro 4793 %imacro linkdatarelocation 0-*.nolist 4794 %endmacro 4795 %define relocated(address) address 4796 %assign ELD 0 4797 %include "reclaims.asm" 1 <1> 2 <1> ; Public Domain 3 <1> 4 <1> loop_free_data: 5 <1> .outer: 0 0000707F 31F6 xor si, si 7 <1> .inner: 0 00007081 8B1E[0000] mov bx, [relocated(extdata_used)] 9 <1> linkdatarelocation extdata_used 0 00007085 031E[0000] add bx, [relocated(extdata)] 11 <1> linkdatarelocation extdata 0 00007089 3B36[0000] cmp si, [relocated(extseg_used)] 13 <1> linkdatarelocation extseg_used ; behind last instance ? 0 0000708D 735A jae .end ; yes --> 0 0000708F 263934 cmp word [es:si + eldiStartCode], si 0 00007092 7403E94803 jne .error ; start matches itself ? 0 00007097 26F6441001 testopt [es:si + eldiFlags], eldifResident 0 0000709C 7539 jnz .next ; is free ? 0 0000709E 268B5406 mov dx, word [es:si + eldiEndData] 0 000070A2 89D0 mov ax, dx 0 000070A4 262B4404 sub ax, word [es:si + eldiStartData] 22 <1> ; = length of block 0 000070A8 7303E93203 jc .error ; block must not be negative size --> 24 <1> ; ZR if empty range 0 000070AD 7506 jnz @F ; not empty --> 26 <1> ; special zeroing handling 0 000070AF 85D2 test dx, dx ; is it already zero ? 0 000070B1 7424 jz .next ; yes --> 0 000070B3 EB09 jmp @FF ; zero it and re-loop outer --> 30 <1> @@: 0 000070B5 39DA cmp dx, bx ; end > last data ? 0 000070B7 7603E92303 ja .error ; yes, error --> 0 000070BC 7519 jne .next ; end == last data ? 34 <1> @@: ; yes, free it 0 000070BE 3B06[0000] cmp ax, word [relocated(extdata_used)] 36 <1> linkdatarelocation extdata_used 0 000070C2 7603E91803 ja .error 0 000070C7 2906[0000] sub word [relocated(extdata_used)], ax 39 <1> linkdatarelocation extdata_used ; subtract size of block (or 0) 0 000070CB 31C0 xor ax, ax 0 000070CD 26894404 mov word [es:si + eldiStartData], ax 0 000070D1 26894406 mov word [es:si + eldiEndData], ax 43 <1> ; reset the block data 0 000070D5 EBA8 jmp .outer ; restart search for trailing data 45 <1> 46 <1> .next: 0 000070D7 89F2 mov dx, si 0 000070D9 83C220 add dx, ELD_INSTANCE_size 0 000070DC 268B7402 mov si, word [es:si + eldiEndCode] 0 000070E0 39D6 cmp si, dx 0 000070E2 7303E9F802 jb .error 0 000070E7 EB98 jmp .inner 53 <1> 54 <1> .end: 55 <1> 56 <1> 57 <1> loop_free_code: 58 <1> .outer: 0 000070E9 BAFFFF mov dx, -1 ; remember no candidate 0 000070EC 31F6 xor si, si ; -> start of ext seg 61 <1> .inner: 0 000070EE 3B36[0000] cmp si, [relocated(extseg_used)] 63 <1> linkdatarelocation extseg_used ; behind last instance ? 0 000070F2 733D jae .end_inner ; yes --> 0 000070F4 263934 cmp word [es:si + eldiStartCode], si 0 000070F7 7403E9E302 jne .error ; start matches itself ? 0 000070FC 26F6441001 testopt [es:si + eldiFlags], eldifResident 0 00007101 7519 jnz .next_not_free ; is free ? 0 00007103 89F2 mov dx, si ; -> candidate free block 0 00007105 26807C0400 cmp byte [es:si + eldiStartData], 0 0 0000710A 750B jne .next_data_used ; is free ? 0 0000710C 26807C0600 cmp byte [es:si + eldiEndData], 0 0 00007111 7504 jne .next_data_used ; is free ? 0 00007113 31C9 xor cx, cx ; remember candidate has no data 0 00007115 EB08 jmp .next 76 <1> 77 <1> .next_data_used: 0 00007117 B90100 mov cx, 1 ; remember candidate has data 0 0000711A EB03 jmp .next 80 <1> 81 <1> .next_not_free: 0 0000711C BAFFFF mov dx, -1 ; remember no candidate (used block) 83 <1> .next: 0 0000711F 89F0 mov ax, si 0 00007121 83C020 add ax, ELD_INSTANCE_size 0 00007124 268B7402 mov si, word [es:si + eldiEndCode] 0 00007128 39C6 cmp si, ax 0 0000712A 7303E9B002 jb .error 0 0000712F EBBD jmp .inner 90 <1> 91 <1> .end_inner: 0 00007131 83FAFF cmp dx, -1 ; last ELD instance is free ? 0 00007134 742A je .end ; no --> 0 00007136 31DB xor bx, bx ; if to not keep ELD instance, = 0 0 00007138 E302 jcxz .free ; no data ? then use bx = 0 --> 0 0000713A B320 mov bl, 32 ; need to keep ELD instance, = 32 97 <1> .free: 0 0000713C 89D6 mov si, dx ; -> instance to free/resize 0 0000713E 268B4402 mov ax, word [es:si + eldiEndCode] 0 00007142 3B06[0000] cmp ax, [relocated(extseg_used)] ; validity check 101 <1> linkdatarelocation extseg_used 0 00007146 7403E99402 jne .error 0 0000714B 268B14 mov dx, word [es:si + eldiStartCode] 0 0000714E 29D0 sub ax, dx ; size of entire instance 0 00007150 01DA add dx, bx ; start of instance + how much to keep 0 00007152 26895402 mov word [es:si + eldiEndCode], dx 107 <1> ; enter into instance's end 0 00007156 29D8 sub ax, bx ; size to discard 0 00007158 2906[0000] sub word [relocated(extseg_used)], ax ; do discard it 110 <1> linkdatarelocation extseg_used 0 0000715C 85DB test bx, bx ; only resized ? 0 0000715E 7489 jz .outer ; no, go back try to free new last block 113 <1> 114 <1> .end: 4798 4799 %undef extcall 4800 %undef extcallcall 4801 %unimacro internalcoderelocation 0-*.nolist 4802 %unimacro internaldatarelocation 0-*.nolist 4803 %unimacro linkdatarelocation 0-*.nolist 4804 %undef relocated 4805 0 00007160 5B pop bx 0 00007161 16 push ss 0 00007162 07 pop es 4809 ext_finish_reclaimed: 4810 4811 loop_free_data.error equ .error_internal 4812 loop_free_code.error equ .error_internal 4813 4814 %endif 4815 4816 4817 %define extcall nearcall 4818 %define extcallcall nearcall 4819 %imacro internalcoderelocation 0-*.nolist 4820 %endmacro 4821 %imacro internaldatarelocation 0-*.nolist 4822 %endmacro 4823 %imacro linkdatarelocation 0-*.nolist 4824 %endmacro 4825 %define relocated(address) address 4826 %assign ELD 0 4827 4828 %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-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 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 00007163 55 push bp 24 <1> %endif 25 <1> 26 <1> %if _ELDTRAILER 0 00007164 31C0 xor ax, ax 0 00007166 A3[0000] mov word [eldheader], ax 29 <1> internaldatarelocation 0 00007169 A3[0200] mov word [eldheader + 2], ax 31 <1> internaldatarelocation 32 <1> 0 0000716C 91 xchg cx, ax 0 0000716D B80242 mov ax, 4202h 0 00007170 31D2 xor dx, dx 36 <1> %if _BOOTLDR 37 <1> %if _APPLICATION || _DEVICE 0 00007172 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 39 <1> linkdatarelocation internalflags, -3 0 00007177 7417 jz @F 41 <1> %endif 0 00007179 E8[0000] extcallcall yy_boot_seek_start.bx 0 0000717C 8B0E[F6FF] mov cx, word [load_data - LOADDATA2 + ldFileSize + 2] 44 <1> internaldatarelocation 0 00007180 8B16[F4FF] mov dx, word [load_data - LOADDATA2 + ldFileSize] 46 <1> internaldatarelocation 0 00007184 E8[0000] extcallcall yy_boot_seek_current.bx 0 00007187 8B16[FEFF] mov dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 49 <1> internaldatarelocation 0 0000718B A1[FCFF] mov ax, word [load_data - LOADDATA2 + ldCurrentSeek] 51 <1> internaldatarelocation 52 <1> %if _APPLICATION || _DEVICE 0 0000718E EB03 jmp @FF 54 <1> %endif 55 <1> %endif 56 <1> 57 <1> @@: 58 <1> %if _APPLICATION || _DEVICE 59 <1> doscall 0 00007190 E8[0000] nearcall _doscall 60 <1> %endif 61 <1> @@: 0 00007193 7303E94F02 jc .io_error 63 <1> 0 00007198 85D2 test dx, dx 0 0000719A 7508 jnz @F 0 0000719C 83F830 cmp ax, ELD_HEADER_size + ELD_TRAILER_HEADER_size 0 0000719F 7303E98700 jb .no_trailer 68 <1> @@: 69 <1> 0 000071A4 B80142 mov ax, 4201h 0 000071A7 B9FFFF mov cx, -1 0 000071AA BAF0FF mov dx, - ELD_TRAILER_HEADER_size 73 <1> %if _BOOTLDR 74 <1> %if _APPLICATION || _DEVICE 0 000071AD F606[0100]40 testopt [relocated(internalflags)], nodosloaded 76 <1> linkdatarelocation internalflags, -3 0 000071B2 740C jz @F 78 <1> %endif 0 000071B4 E8[0000] extcallcall yy_boot_seek_current.bx 0 000071B7 8B16[FEFF] mov dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 81 <1> internaldatarelocation 0 000071BB A1[FCFF] mov ax, word [load_data - LOADDATA2 + ldCurrentSeek] 83 <1> internaldatarelocation 84 <1> %if _APPLICATION || _DEVICE 0 000071BE EB03 jmp @FF 86 <1> %endif 87 <1> %endif 88 <1> 89 <1> @@: 90 <1> %if _APPLICATION || _DEVICE 91 <1> doscall 0 000071C0 E8[0000] nearcall _doscall 92 <1> %endif 93 <1> @@: 0 000071C3 7303E91F02 jc .io_error 95 <1> 0 000071C8 52 push dx 0 000071C9 50 push ax 98 <1> 0 000071CA B91000 mov cx, fromwords(ELD_TRAILER_HEADER_size_w) 0 000071CD 29CC sub sp, cx 0 000071CF 89E2 mov dx, sp 102 <1> 0 000071D1 B43F mov ah, 3Fh 104 <1> %if _BOOTLDR 105 <1> %if _APPLICATION || _DEVICE 0 000071D3 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 107 <1> linkdatarelocation internalflags, -3 0 000071D8 7405 jz @F 109 <1> %endif 0 000071DA E8[0000] extcallcall yy_boot_read.bx 111 <1> %if _APPLICATION || _DEVICE 0 000071DD EB03 jmp @FF 113 <1> %endif 114 <1> %endif 115 <1> 116 <1> @@: 117 <1> %if _APPLICATION || _DEVICE 118 <1> doscall 0 000071DF E8[0000] nearcall _doscall 119 <1> %endif 120 <1> @@: 0 000071E2 7303E90002 jc .io_error 0 000071E7 89E7 mov di, sp 0 000071E9 89E6 mov si, sp 124 <1> 0 000071EB 39C8 cmp ax, cx 0 000071ED 7539 jne .no_trailer_pop 127 <1> 0 000071EF 31D2 xor dx, dx 0 000071F1 D1E9 shr cx, 1 130 <1> @@: 0 000071F3 AD lodsw 0 000071F4 01C2 add dx, ax 0 000071F6 E2FB loop @B 0 000071F8 752E jnz .no_trailer_pop 135 <1> 0 000071FA 58 pop ax 0 000071FB 3D454C cmp ax, "EL" 0 000071FE 7528 jne .no_trailer_pop 0 00007200 58 pop ax 0 00007201 3D4431 cmp ax, "D1" 0 00007204 7522 jne .no_trailer_pop 0 00007206 58 pop ax 0 00007207 3D5441 cmp ax, "TA" 0 0000720A 751C jne .no_trailer_pop 0 0000720C 58 pop ax 0 0000720D 3D494C cmp ax, "IL" 0 00007210 7516 jne .no_trailer_pop 148 <1> 0 00007212 5E pop si 0 00007213 59 pop cx ; cx:si = displacement to subtract 0 00007214 58 pop ax ; reserved 0 00007215 58 pop ax ; checksum 153 <1> 0 00007216 58 pop ax 0 00007217 5A pop dx ; dx:ax = offset of trailer header 0 00007218 01F0 add ax, si 0 0000721A 11CA adc dx, cx ; dx:ax = offset of header 0 0000721C 7203E9C601 jnc .io_error 159 <1> 0 00007221 A3[0000] mov word [eldheader], ax 161 <1> internaldatarelocation 0 00007224 8916[0200] mov word [eldheader + 2], dx 163 <1> internaldatarelocation 164 <1> 165 <1> .no_trailer_pop: 0 00007228 8D6514 lea sp, [di + fromwords(ELD_TRAILER_HEADER_size_w) + 4] 167 <1> 168 <1> .no_trailer: 0 0000722B B80042 mov ax, 4200h 0 0000722E 8B16[0000] mov dx, word [eldheader] 171 <1> internaldatarelocation 0 00007232 8B0E[0200] mov cx, word [eldheader + 2] 173 <1> internaldatarelocation 174 <1> 175 <1> %if _BOOTLDR 176 <1> %if _APPLICATION || _DEVICE 0 00007236 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 178 <1> linkdatarelocation internalflags, -3 0 0000723B 7408 jz @F 180 <1> %endif 0 0000723D E8[0000] extcallcall yy_boot_seek_start.bx 0 00007240 E8[0000] extcallcall yy_boot_seek_current.bx 183 <1> %if _APPLICATION || _DEVICE 0 00007243 EB03 jmp @FF 185 <1> %endif 186 <1> %endif 187 <1> 188 <1> @@: 189 <1> %if _APPLICATION || _DEVICE 190 <1> doscall 0 00007245 E8[0000] nearcall _doscall 191 <1> %endif 192 <1> @@: 0 00007248 7303E99A01 jc .io_error 194 <1> %endif 195 <1> 0 0000724D B92000 mov cx, fromwords(ELD_HEADER_size_w) 0 00007250 29CC sub sp, cx 0 00007252 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 00007254 B43F mov ah, 3Fh 215 <1> %if _BOOTLDR 216 <1> %if _APPLICATION || _DEVICE 0 00007256 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 218 <1> linkdatarelocation internalflags, -3 0 0000725B 7405 jz @F 220 <1> %endif 0 0000725D E8[0000] extcallcall yy_boot_read.bx 222 <1> %if _APPLICATION || _DEVICE 0 00007260 EB03 jmp @FF 224 <1> %endif 225 <1> %endif 226 <1> 227 <1> @@: 228 <1> %if _APPLICATION || _DEVICE 229 <1> doscall 0 00007262 E8[0000] nearcall _doscall 230 <1> %endif 231 <1> @@: 232 <1> %endif 0 00007265 89E7 mov di, sp 234 <1> 235 <1> %if _BOOTLDR == 0 && ELD == 0 236 <1> jc short .io_error_CY_1 237 <1> %else 0 00007267 7303E98D00 jc .io_error_CY_1 239 <1> %endif 0 0000726C 39C8 cmp ax, cx 0 0000726E 7511 jne .invalid_NZ 242 <1> 0 00007270 58 pop ax 0 00007271 3D454C cmp ax, "EL" 0 00007274 750B jne .invalid_NZ 0 00007276 58 pop ax 0 00007277 3D4431 cmp ax, "D1" 0 0000727A 7505 jne .invalid_NZ 0 0000727C 58 pop ax 0 0000727D 58 pop ax 0 0000727E 80FC1A cmp ah, 26 252 <1> .invalid_NZ: 0 00007281 7403E96901 jne .invalid 254 <1> 255 <1> %ifn ELD 0 00007286 F606[0300]08 testopt [internalflags3], dif3_in_if 0 0000728B 7403E9[0000] jnz if_exists_found_ext_open 258 <1> %endif 259 <1> 260 <1> %if ELD 261 <1> ; times 16 nop 262 <1> ; The NOPs were needed for some reason, else the extpak.xld build gets: 263 <1> ; extpak.asm: error: unable to find valid values for all labels after 1005 passes; stalled for 1001, giving up. 264 <1> houdini 265 <1> %endif 0 00007290 A1[0000] mov ax, word [relocated(extseg_size)] 267 <1> linkdatarelocation extseg_size 0 00007293 2B06[0000] sub ax, word [relocated(extseg_used)] 269 <1> linkdatarelocation extseg_used 0 00007297 721F jc .error_internal_CY 271 <1> %if ELD 272 <1> sub ax, fromparas(relocator_size_p) 273 <1> jc .error_internal_CY 274 <1> %endif 275 <1> 0 00007299 8B4D0C mov cx, word [di + eldhCodeImageLength] 277 <1> %if ELD 278 <1> cmp ax, cx 279 <1> jae .not_oom_codeimage 280 <1> 281 <1> ; ax = how much free between lib ELD and relocator 282 <1> add ax, word [cs:code + eldiEndCode] 283 <1> internalcoderelocation 284 <1> sub ax, word [cs:code + eldiStartCode] 285 <1> internalcoderelocation 286 <1> ; ax = how much free below relocator, overwriting lib ELD 287 <1> ; cx = how much needed bellow relocator 288 <1> cmp ax, cx 289 <1> jb .oom_CY 290 <1> 291 <1> add cx, word [di + eldhCodeAllocLength] 292 <1> jc .invalid_CY 293 <1> add cx, 15 294 <1> jc .invalid_CY 295 <1> and cl, ~ 15 296 <1> 297 <1> add ax, fromparas(relocator_size_p) 298 <1> jc .error_internal_CY 299 <1> ; ax = how much free including space for relocator 300 <1> ; cx = how much needed in final allocation 301 <1> cmp ax, cx 302 <1> jb .oom_CY 303 <1> 304 <1> mov ax, word [di + eldhCodeImageLength] 305 <1> test ax, ax 306 <1> jnz .try_in_data 307 <1> jmp .invalid 308 <1> 309 <1> .not_oom_codeimage: 310 <1> %endif 311 <1> 0 0000729C 034D0E add cx, word [di + eldhCodeAllocLength] 0 0000729F 7227 jc .invalid_CY 0 000072A1 83C10F add cx, 15 0 000072A4 7222 jc .invalid_CY 0 000072A6 80E1F0 and cl, ~ 15 317 <1> 318 <1> %if ELD 319 <1> add ax, word [cs:code + eldiEndCode] 320 <1> internalcoderelocation 321 <1> sub ax, word [cs:code + eldiStartCode] 322 <1> internalcoderelocation 323 <1> %endif 0 000072A9 39C8 cmp ax, cx 325 <1> .oom_CY: 0 000072AB 7303E95101 jb .oom 327 <1> %if ELD 328 <1> xor ax, ax 329 <1> .try_in_data: 330 <1> %endif 331 <1> 0 000072B0 8B16[0000] mov dx, word [relocated(extdata_size)] 333 <1> linkdatarelocation extdata_size 0 000072B4 2B16[0000] sub dx, word [relocated(extdata_used)] 335 <1> linkdatarelocation extdata_used 336 <1> .error_internal_CY: 0 000072B8 7303E92201 jc .error_internal 338 <1> 0 000072BD 8B7514 mov si, word [di + eldhDataImageLength] 340 <1> %if ELD 341 <1> cmp dx, si 342 <1> jb .oom_CY 343 <1> 344 <1> add si, ax ; si = to store data and code 345 <1> jc .oom_CY 346 <1> cmp dx, si ; enough in data block ? 347 <1> jb .oom_CY ; no --> 348 <1> sub si, ax ; restore si = data size for alloc check 349 <1> jc .invalid_CY 350 <1> %endif 0 000072C0 037516 add si, word [di + eldhDataAllocLength] 0 000072C3 7203 jc .invalid_CY 0 000072C5 83C60F add si, 15 354 <1> .invalid_CY: 0 000072C8 7303E92201 jc .invalid 0 000072CD 83E6F0 and si, ~ 15 357 <1> 358 <1> %if ELD 359 <1> add dx, word [cs:code + eldiEndData] 360 <1> internalcoderelocation 361 <1> sub dx, word [cs:code + eldiStartData] 362 <1> internalcoderelocation 363 <1> %endif 0 000072D0 39F2 cmp dx, si 0 000072D2 72D7 jb .oom_CY 366 <1> 0 000072D4 56 push si ; data size image + alloc 0 000072D5 51 push cx ; code size image + alloc 369 <1> %if ELD 370 <1> push ax ; nonzero to load code into data area 371 <1> %endif 372 <1> 0 000072D6 B80042 mov ax, 4200h 0 000072D9 8B4D0A mov cx, word [di + eldhCodeOffset + 2] 0 000072DC 8B5508 mov dx, word [di + eldhCodeOffset] 376 <1> %if ELD || _ELDTRAILER 0 000072DF 0316[0000] add dx, word [eldheader] 378 <1> internaldatarelocation 0 000072E3 130E[0200] adc cx, word [eldheader + 2] 380 <1> internaldatarelocation 381 <1> %else 382 <1> ; ELD header is at seek 0 383 <1> %endif 384 <1> %if _ELDCOMPRESSED 385 <1> mov word [depackskip], dx 386 <1> internaldatarelocation 387 <1> mov word [depackskip + 2], cx 388 <1> internaldatarelocation 389 <1> %elif _DOSORBOOTIO 390 <1> call dos_or_boot_io 391 <1> %else 392 <1> %if _BOOTLDR 393 <1> %if _APPLICATION || _DEVICE 0 000072E7 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 395 <1> linkdatarelocation internalflags, -3 0 000072EC 7408 jz @F 397 <1> %endif 0 000072EE E8[0000] extcallcall yy_boot_seek_start.bx 0 000072F1 E8[0000] extcallcall yy_boot_seek_current.bx 400 <1> %if _APPLICATION || _DEVICE 0 000072F4 EB03 jmp @FF 402 <1> %endif 403 <1> %endif 404 <1> 405 <1> @@: 406 <1> %if _APPLICATION || _DEVICE 407 <1> doscall 0 000072F6 E8[0000] nearcall _doscall 408 <1> %endif 409 <1> @@: 410 <1> %endif 411 <1> .io_error_CY_1: 0 000072F9 7231 jc .io_error_CY_2 413 <1> 414 <1> %if ELD 415 <1> pop ax 416 <1> push ax ; = nonzero to load code into data area 417 <1> test ax, ax 418 <1> jz .load_code_into_code 419 <1> 420 <1> .load_code_into_data: 421 <1> mov dx, word [relocated(extdata_size)] 422 <1> linkdatarelocation extdata_size 423 <1> add dx, word [relocateddata] 424 <1> linkdatarelocation extdata 425 <1> sub dx, ax 426 <1> mov cx, word [di + eldhCodeImageLength] 427 <1> %if _ELDCOMPRESSED 428 <1> call read_and_depack 429 <1> %elif _DOSORBOOTIO 430 <1> mov ax, 3F00h 431 <1> call dos_or_boot_io 432 <1> %else 433 <1> mov ah, 3Fh 434 <1> %if _BOOTLDR 435 <1> %if _APPLICATION || _DEVICE 436 <1> testopt [relocated(internalflags)], nodosloaded 437 <1> linkdatarelocation internalflags, -3 438 <1> jz @F 439 <1> %endif 440 <1> extcallcall yy_boot_read.bx 441 <1> %if _APPLICATION || _DEVICE 442 <1> jmp @FF 443 <1> %endif 444 <1> %endif 445 <1> 446 <1> @@: 447 <1> %if _APPLICATION || _DEVICE 448 <1> doscall 449 <1> %endif 450 <1> %endif 451 <1> @@: 452 <1> jmp .loaded_code 453 <1> 454 <1> .load_code_into_code: 455 <1> %endif 456 <1> 0 000072FB 8B16[0000] mov dx, word [relocated(extseg_used)] 458 <1> linkdatarelocation extseg_used 459 <1> %if _PM 0 000072FF E8[0000] extcallcall ispm 0 00007302 7506 jnz @F 0 00007304 8E1E[0000] mov ds, word [relocated(extdssel)] 463 <1> linkdatarelocation extdssel 0 00007308 EB04 jmp @FF 465 <1> 466 <1> @@: 467 <1> %endif 0 0000730A 8E1E[0000] mov ds, word [relocated(extseg)] 469 <1> linkdatarelocation extseg 470 <1> @@: 0 0000730E 368B4D0C mov cx, word [ss:di + eldhCodeImageLength] 472 <1> %if _ELDCOMPRESSED 473 <1> push ds 474 <1> pop es 475 <1> push ss 476 <1> pop ds 477 <1> call read_and_depack 478 <1> push ss 479 <1> pop es 480 <1> %elif _DOSORBOOTIO 481 <1> mov ax, 3FFFh 482 <1> call dos_or_boot_io 483 <1> %else 0 00007312 B43F mov ah, 3Fh 485 <1> %if _BOOTLDR 486 <1> %if _APPLICATION || _DEVICE 0 00007314 36F606[0100]40 testopt [ss:relocated(internalflags)], nodosloaded 488 <1> linkdatarelocation internalflags, -3 0 0000731A 740B jz @F 490 <1> %endif 0 0000731C 1E push ds 0 0000731D 07 pop es 0 0000731E 16 push ss 0 0000731F 1F pop ds 0 00007320 E8[0000] extcallcall yy_boot_read.bx 0 00007323 16 push ss 0 00007324 07 pop es 498 <1> %if _APPLICATION || _DEVICE 0 00007325 EB03 jmp @FF 500 <1> %endif 501 <1> %endif 502 <1> 503 <1> @@: 504 <1> %if _APPLICATION || _DEVICE 505 <1> %if _PM 0 00007327 E8[0000] extcallcall doscall_extseg 507 <1> %else 508 <1> doscall 509 <1> %endif 510 <1> %endif 511 <1> @@: 512 <1> %endif 0 0000732A 16 push ss 0 0000732B 1F pop ds 515 <1> .loaded_code: 516 <1> .io_error_CY_2: 0 0000732C 7204 jc .io_error_1 0 0000732E 39C1 cmp cx, ax 0 00007330 7403 je @F 520 <1> .io_error_1: 0 00007332 E9B200 jmp .io_error 522 <1> @@: 523 <1> 0 00007335 B80042 mov ax, 4200h 0 00007338 8B4D12 mov cx, word [di + eldhDataOffset + 2] 0 0000733B 8B5510 mov dx, word [di + eldhDataOffset] 527 <1> %if ELD || _ELDTRAILER 0 0000733E 0316[0000] add dx, word [eldheader] 529 <1> internaldatarelocation 0 00007342 130E[0200] adc cx, word [eldheader + 2] 531 <1> internaldatarelocation 532 <1> %else 533 <1> ; ELD header is at seek 0 534 <1> %endif 535 <1> 536 <1> %if _ELDCOMPRESSED 537 <1> mov word [depackskip], dx 538 <1> internaldatarelocation 539 <1> mov word [depackskip + 2], cx 540 <1> internaldatarelocation 541 <1> %elif _DOSORBOOTIO 542 <1> call dos_or_boot_io 543 <1> %else 544 <1> %if _BOOTLDR 545 <1> %if _APPLICATION || _DEVICE 0 00007346 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 547 <1> linkdatarelocation internalflags, -3 0 0000734B 7408 jz @F 549 <1> %endif 0 0000734D E8[0000] extcallcall yy_boot_seek_start.bx 0 00007350 E8[0000] extcallcall yy_boot_seek_current.bx 552 <1> %if _APPLICATION || _DEVICE 0 00007353 EB03 jmp @FF 554 <1> %endif 555 <1> %endif 556 <1> 557 <1> @@: 558 <1> %if _APPLICATION || _DEVICE 559 <1> doscall 0 00007355 E8[0000] nearcall _doscall 560 <1> %endif 561 <1> @@: 562 <1> %endif 0 00007358 72D8 jc .io_error_1 564 <1> 565 <1> %if ELD 566 <1> mov dx, word [relocateddata] 567 <1> linkdatarelocation extdata 568 <1> %else 0 0000735A BA[0000] mov dx, ext_data_area 570 <1> %endif 0 0000735D 0316[0000] add dx, word [relocated(extdata_used)] 572 <1> linkdatarelocation extdata_used 0 00007361 8B4D14 mov cx, word [di + eldhDataImageLength] 574 <1> %if _ELDCOMPRESSED 575 <1> call read_and_depack 576 <1> %elif _DOSORBOOTIO 577 <1> mov ax, 3F00h 578 <1> call dos_or_boot_io 579 <1> %else 0 00007364 B43F mov ah, 3Fh 581 <1> %if _BOOTLDR 582 <1> %if _APPLICATION || _DEVICE 0 00007366 F606[0100]40 testopt [relocated(internalflags)], nodosloaded 584 <1> linkdatarelocation internalflags, -3 0 0000736B 7405 jz @F 586 <1> %endif 0 0000736D E8[0000] extcallcall yy_boot_read.bx 588 <1> %if _APPLICATION || _DEVICE 0 00007370 EB03 jmp @FF 590 <1> %endif 591 <1> %endif 592 <1> 593 <1> @@: 594 <1> %if _APPLICATION || _DEVICE 595 <1> doscall 0 00007372 E8[0000] nearcall _doscall 596 <1> %endif 597 <1> @@: 598 <1> %endif 0 00007375 72BB jc .io_error_1 0 00007377 39C1 cmp cx, ax 0 00007379 75B7 jne .io_error_1 602 <1> ; seek now -> behind data image. 603 <1> ; this is expected by library ELDs to find their 604 <1> ; library images within the file, even if the 605 <1> ; library ELD was appended using eldapend. 606 <1> 607 <1> %if _PM 0 0000737B E8B200 call get_es_ext 609 <1> %else 610 <1> mov es, word [extseg] 611 <1> %endif 612 <1> 613 <1> %if ELD 614 <1> pop cx ; size of code if in data 615 <1> jcxz .not_code_loaded_to_data 616 <1> 617 <1> .code_loaded_to_data: 618 <1> mov bx, word [relocated(extdata_size)] 619 <1> linkdatarelocation extdata_size 620 <1> add bx, word [relocateddata] 621 <1> linkdatarelocation extdata 622 <1> sub bx, cx ; -> code in data block 623 <1> mov byte [es:relocator.code_seg_push_inst], 16h 624 <1> ; set segment = push ss 625 <1> internalcoderelocation -3 626 <1> jmp @F 627 <1> 628 <1> .not_code_loaded_to_data: 629 <1> mov bx, word [relocateddata] 630 <1> linkdatarelocation extseg_used ; es:bx -> where we loaded code 631 <1> 632 <1> es ; es:bx for code image 633 <1> @@: 634 <1> mov word [bx + eldiStartCode], code 635 <1> internalcoderelocation ; fix its start 636 <1> 637 <1> mov ax, [di + eldhCodeEntrypoint] 638 <1> add ax, strict word code ; -> entry destination 639 <1> internalcoderelocation 640 <1> mov word [es:relocator.entry], ax 641 <1> internalcoderelocation 642 <1> 643 <1> mov ax, word [di + eldhCodeImageLength] 644 <1> mov word [es:relocator.codelength], ax 645 <1> internalcoderelocation 646 <1> 647 <1> mov ax, word [di + eldhDataImageLength] 648 <1> mov word [es:relocator.datalength], ax 649 <1> internalcoderelocation 650 <1> 651 <1> pop ax ; code size image + alloc 652 <1> 653 <1> mov di, word [relocateddata] 654 <1> linkdatarelocation extseg_size 655 <1> sub di, fromparas(relocator_size_p) 656 <1> 657 <1> mov word [es:relocator.codesource], bx 658 <1> internalcoderelocation ; -> start 659 <1> add ax, strict word code 660 <1> internalcoderelocation 661 <1> jcxz @F 662 <1> db __TEST_IMM8 ; skip seg es 663 <1> @@: 664 <1> es 665 <1> mov word [bx + eldiEndCode], ax 666 <1> ; -> past destination 667 <1> mov word [es:relocator.extseg_used], ax 668 <1> internalcoderelocation ; new extseg_used 669 <1> 670 <1> pop ax ; data size image + alloc 671 <1> 672 <1> mov dx, word [relocateddata] 673 <1> linkdatarelocation extdata_used 674 <1> add dx, word [relocateddata] 675 <1> linkdatarelocation extdata 676 <1> 677 <1> mov word [es:relocator.datasource], dx 678 <1> internalcoderelocation 679 <1> 680 <1> houdini 681 <1> mov dx, datastart 682 <1> internaldatarelocation 683 <1> jcxz @F 684 <1> db __TEST_IMM8 ; skip seg es 685 <1> @@: 686 <1> es 687 <1> mov word [bx + eldiStartData], dx 688 <1> add ax, dx 689 <1> jcxz @F 690 <1> db __TEST_IMM8 ; skip seg es 691 <1> @@: 692 <1> es 693 <1> mov word [bx + eldiEndData], ax 694 <1> 695 <1> sub ax, word [relocateddata] 696 <1> linkdatarelocation extdata 697 <1> mov word [es:relocator.extdata_used], ax 698 <1> internalcoderelocation ; new extdata_used 699 <1> 700 <1> mov dx, code 701 <1> internalcoderelocation ; es:dx -> ELD code instance (dest) 702 <1> mov bx, datastart 703 <1> internaldatarelocation 704 <1> 705 <1> mov si, relocator 706 <1> internalcoderelocation 707 <1> mov cx, relocator_size_w 708 <1> push es 709 <1> pop ds 710 <1> push di 711 <1> rep movsw 712 <1> pop cx ; -> relocator entry 713 <1> push ss 714 <1> pop ds 715 <1> %else 0 0000737E 58 pop ax ; allocated code size 0 0000737F 8B16[0000] mov dx, word [extseg_used] 0 00007383 89D5 mov bp, dx 0 00007385 26895600 mov word [es:bp+eldiStartCode], dx 720 <1> ; -> loaded code 0 00007389 0306[0000] add ax, word [extseg_used] 0 0000738D A3[0000] mov word [extseg_used], ax ; -> behind 0 00007390 26894602 mov word [es:bp+eldiEndCode], ax; -> behind 724 <1> 0 00007394 58 pop ax ; allocated data size 0 00007395 8B1E[0000] mov bx, word [extdata_used] 0 00007399 81C3[0000] add bx, ext_data_area ; -> loaded data 0 0000739D 26895E04 mov word [es:bp+eldiStartData], bx 0 000073A1 0106[0000] add word [extdata_used], ax ; = amount new used 0 000073A5 01D8 add ax, bx ; -> behind 0 000073A7 26894606 mov word [es:bp+eldiEndData], ax 732 <1> 0 000073AB 8B4D18 mov cx, [di + eldhCodeEntrypoint] 0 000073AE 01D1 add cx, dx 735 <1> %endif 0 000073B0 83C418 add sp, ELD_HEADER_size - 8 737 <1> 738 <1> %if ELD 739 <1> pop si ; -> command line tail 740 <1> mov ax, word [relocateddata] 741 <1> linkdatarelocation linksel 742 <1> extcallcall ispm 743 <1> jz @F 744 <1> mov ax, word [relocateddata] 745 <1> linkdatarelocation linkseg 746 <1> @@: 747 <1> 748 <1> mov di, relocateddata 749 <1> linkdatarelocation linkinfoaddress 750 <1> mov di, [di] 751 <1> mov ds, ax 752 <1> 753 <1> jmp cx 754 <1> ; INP: es:dx -> loaded initial ELD image 755 <1> ; ELD instance structure filled 756 <1> ; es => ELD code area 757 <1> ; ds:di -> link info 758 <1> ; ss:bx -> loaded initial data 759 <1> ; ss:si -> command line tail 760 <1> ; cs:ip -> entrypoint 761 <1> ; ss:sp -> far return address for current mode 762 <1> ; STT: UP, EI 763 <1> ; REM: if loaded as an ELD by an uncompressed library ELD, 764 <1> ; file seek -> behind data image just loaded 765 <1> ; file seek is not meaningful when loaded as an ELD 766 <1> ; by a compressed library ELD 767 <1> %else 768 <1> ext_finish.bp_is_set equ $ 0 000073B3 5D pop bp 770 <1> 0 000073B4 8B36[0000] mov si, word [ext_cmdline] 772 <1> 773 <1> %if _MESSAGESEGMENT 774 <1> %if _PM 0 000073B8 E818EB call get_messagesegsel 776 <1> %else 777 <1> mov ds, word [ss:messageseg] 778 <1> %endif 779 <1> %endif 0 000073BB BF[0000] mov di, linkinfo 781 <1> 0 000073BE 0E push cs 0 000073BF E85200 call .transfer 784 <1> ; INP: es:dx -> loaded initial ELD image 785 <1> ; ELD instance structure filled 786 <1> ; es => ELD code area 787 <1> ; ds:di -> link info 788 <1> ; ss:bx -> loaded initial data 789 <1> ; ss:si -> command line tail 790 <1> ; cs:ip -> entrypoint 791 <1> ; ss:sp -> far return address for current mode 792 <1> ; STT: UP, EI 793 <1> ; REM: file seek -> behind data image just loaded 794 <1> %endif 4829 4830 %undef extcall 4831 %undef extcallcall 4832 %unimacro internalcoderelocation 0-*.nolist 4833 %unimacro internaldatarelocation 0-*.nolist 4834 %unimacro linkdatarelocation 0-*.nolist 4835 %undef relocated 4836 4837 0 000073C2 3D00FF cmp ax, 0FF00h 0 000073C5 7215 jb @F 0 000073C7 16 push ss 0 000073C8 07 pop es 0 000073C9 16 push ss 0 000073CA 1F pop ds 0 000073CB BF[0000] mov di, msg.eld_error_code 0 000073CE E8A0E5 call hexword 0 000073D1 B40F mov ah, 0Fh 0 000073D3 E8[0000] call setrc 0 000073D6 BA[0000] mov dx, msg.eld_load_error 0 000073D9 E84DEB call putsz_error 4850 @@: 0 000073DC E9[0000] jmp cmd3 4852 4853 4854 .error_internal: 0 000073DF BA[0000] mov dx, msg.ext_error_internal 0 000073E2 B82C01 mov ax, 012Ch 0 000073E5 EB20 jmp .specificerror 4858 4859 .io_error: 0 000073E7 BA[0000] mov dx, msg.ext_error_io 0 000073EA B82D01 mov ax, 012Dh 0 000073ED EB06 jmp .specificerror_or_if 4863 4864 .invalid: 0 000073EF BA[0000] mov dx, msg.ext_error_invalid 0 000073F2 B82E01 mov ax, 012Eh 4867 .specificerror_or_if: 0 000073F5 F606[0300]08 testopt [internalflags3], dif3_in_if 0 000073FA 7403E9[0000] jnz if_exists_not_found 0 000073FF EB06 jmp .specificerror 4871 4872 .oom: 0 00007401 BA[0000] mov dx, msg.ext_error_oom 0 00007404 B82F01 mov ax, 012Fh 4875 4876 .specificerror: 0 00007407 16 push ss 0 00007408 1F pop ds 0 00007409 E8[0000] call setrc 0 0000740C E81AEB call putsz_error 0 0000740F FF26[0000] jmp [errret] 4882 4883 4884 transfer_ext_cx_NC_push_ax: equ $ 0 00007413 50 push ax 4886 .transfer: 4887 transfer_ext_cx_NC: 0 00007414 F8 clc 4889 4890 transfer_ext_cx: 4891 %if _PM 0 00007415 57 push di 0 00007416 368B3E[0000] mov di, word [ss:pm_2_86m_0] 0 0000741B 36FFA5[3600] jmp near word [ss:.table + di] 4895 4896 .pm: 0 00007420 5F pop di 0 00007421 36FF36[0000] push word [ss:extcssel] ; => code 0 00007426 51 push cx ; -> entrypoint 0 00007427 CB retf 4901 4902 .86m: 0 00007428 5F pop di 4904 %endif 0 00007429 36FF36[0000] push word [ss:extseg] ; => code 0 0000742E 51 push cx ; -> entrypoint 0 0000742F CB retf 4908 4909 %if _PM 4910 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 4910 ------------------ note: usesection lDEBUG_DATA_ENTRY 4911 ; REM: Dispatch table in section lDEBUG_CODE 4912 align 2, db 0 4913 .table: 0 0000283E [221C] dw .86m 0 00002840 [1A1C] dw .pm 4916 4917 4918 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 4918 ------------------ note: usesection lDEBUG_CODE 4919 get_es_ext: 0 00007430 8E06[0000] mov es, word [extdssel] 0 00007434 E8[0000] call ispm 0 00007437 7404 jz .ret 0 00007439 8E06[0000] mov es, word [extseg] 4924 .ret: 0 0000743D C3 retn 4926 %endif 4927 %endif 4928 4929 ; INP: word [bufnext], word [bufend] 4930 ; CHG: - 4931 ; 4932 ; Note: When reading from a file, we buffer some of the input 4933 ; in line_in. When switching to a non-file, or starting 4934 ; to read from another file, we have to reset the seek 4935 ; position of the (prior) file to avoid losing the data. 4936 ; This cropped up during yy development, but actually 4937 ; affects serial and InDOS input, too. Therefore, 4938 ; this function is not below the conditional for yy. 4939 yy_reset_buf: section_of_function 0 0000743E 51 push cx 4941 %if _NEWFULLHANDLING 0 0000743F B9[0300] mov cx, line_in + 3 4943 %else 4944 mov cx, line_in + 2 4945 %endif 0 00007442 870E[0000] xchg cx, word [bufnext] 0 00007446 F7D9 neg cx 0 00007448 030E[0000] add cx, word [bufend] ; cx = how much remaining in buffer 4949 %if _NEWFULLHANDLING 0 0000744C C706[0000][0300] mov word [bufend], line_in + 3 4951 %else 4952 mov word [bufend], line_in + 2 4953 %endif 4954 0 00007452 F606[0200]40 testopt [internalflags2], dif2_did_getline_file 0 00007457 7469 jz .not_used 4957 0 00007459 50 push ax 0 0000745A 52 push dx 0 0000745B 53 push bx 0 0000745C 89CA mov dx, cx 0 0000745E 31C9 xor cx, cx 0 00007460 F7DA neg dx ; dx = minus how much remaining 0 00007462 7456 jz .done ; if zero, do not seek at all --> 0 00007464 49 dec cx ; sign extension into cx:dx 4966 4967 %if !_LOADER 0 00007465 F606[0300]01 testopt [internalflags3], dif3_input_re 0 0000746A 7406 jz @F 0 0000746C 0116[0000] add word [re_buffer.position], dx 0 00007470 EB48 jmp .done 4972 @@: 4973 %endif 4974 4975 %if _INPUT_FILE_BOOT 0 00007472 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00007477 741E jz @F 0 00007479 F606[0300]30 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 0 0000747E 7412 jz .do_boot_seek 4980 0 00007480 FF36[0000] push word [load_input_file.active] 0 00007484 8F06[0000] pop word [boot_remember_seek_handle] 0 00007488 890E[0200] mov word [boot_remember_seek_offset + 2], cx 0 0000748C 8916[0000] mov word [boot_remember_seek_offset], dx 0 00007490 EB28 jmp .done 4986 4987 .do_boot_seek: 0 00007492 E8[0000] call yy_boot_seek_current 0 00007495 EB23 jmp .done 4990 @@: 4991 %endif 4992 4993 %if _INPUT_FILE_HANDLES 0 00007497 F606[0200]10 testopt [internalflags2], dif2_input_file 0 0000749C 7407 jz @F ; if not input file --> 0 0000749E 57 push di 0 0000749F E83FED call yy_get_handle ; bx = handle 0 000074A2 5F pop di 0 000074A3 EB0F jmp .filehandle 5000 @@: 5001 %endif 5002 0 000074A5 F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 000074AA 7406 jz @F 0 000074AC 0116[0000] add word [cmdline_buffer.position], dx 0 000074B0 EB08 jmp .done 5007 @@: 5008 0 000074B2 31DB xor bx, bx ; bx = handle (0 is STDIN) 5010 .filehandle: 0 000074B4 B80142 mov ax, 4201h ; lseek, from current file position 0 000074B7 E80A00 call handle_seek_or_remember 5013 5014 .done: 0 000074BA 5B pop bx 0 000074BB 5A pop dx 0 000074BC 58 pop ax 5018 0 000074BD 8026[0200]BF clropt [internalflags2], dif2_did_getline_file 5020 5021 .not_used: 0 000074C2 59 pop cx 0 000074C3 C3 retn 5024 5025 5026 handle_seek_or_remember: 0 000074C4 E8[0000] call InDOS 0 000074C7 7411 jz @F 5029 0 000074C9 A3[0000] mov word [indos_remember_seek_function], ax 0 000074CC 891E[0000] mov word [indos_remember_seek_handle], bx 0 000074D0 890E[0200] mov word [indos_remember_seek_offset + 2], cx 0 000074D4 8916[0000] mov word [indos_remember_seek_offset], dx 0 000074D8 EB03 jmp .done 5035 5036 @@: 5037 doscall ; call DOS 0 000074DA E8[0000] nearcall _doscall 5038 .done: 0 000074DD C3 retn 5040 5041 5042 yy_reset_buf_and_seek_start: 0 000074DE 51 push cx 0 000074DF 50 push ax 0 000074E0 52 push dx 0 000074E1 53 push bx 5047 %if _NEWFULLHANDLING 0 000074E2 B8[0300] mov ax, line_in + 3 5049 %else 5050 mov ax, line_in + 2 5051 %endif 0 000074E5 A3[0000] mov word [bufnext], ax 0 000074E8 A3[0000] mov word [bufend], ax 5054 0 000074EB 31D2 xor dx, dx 0 000074ED 31C9 xor cx, cx 5057 5058 %if !_LOADER 0 000074EF F606[0300]01 testopt [internalflags3], dif3_input_re 0 000074F4 7408 jz @F 0 000074F6 C706[0000][0000] mov word [re_buffer.position], re_buffer 0 000074FC EB37 jmp .done 5063 @@: 5064 %endif 5065 5066 %if _INPUT_FILE_BOOT 0 000074FE F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 00007503 7408 jz @F 0 00007505 E8[0000] call yy_boot_clear_remember_seek 0 00007508 E8[0000] call yy_boot_seek_start 0 0000750B EB28 jmp .done 5072 @@: 5073 %endif 5074 5075 %if _INPUT_FILE_HANDLES 0 0000750D F606[0200]10 testopt [internalflags2], dif2_input_file 0 00007512 7407 jz @F ; if not input file --> 0 00007514 57 push di 0 00007515 E8C9EC call yy_get_handle ; bx = handle 0 00007518 5F pop di 0 00007519 EB11 jmp .filehandle 5082 @@: 5083 %endif 5084 0 0000751B F606[0100]01 testopt [internalflags3], dif3_input_cmdline 0 00007520 7408 jz @F 0 00007522 C706[0000][0000] mov word [cmdline_buffer.position], cmdline_buffer 0 00007528 EB0B jmp .done 5089 @@: 5090 0 0000752A 31DB xor bx, bx ; bx = handle (0 is STDIN) 5092 5093 .filehandle: 0 0000752C E80B00 call yy_clear_remember_seek 0 0000752F B80042 mov ax, 4200h ; seek from start 0 00007532 E88FFF call handle_seek_or_remember 5097 .done: 0 00007535 5B pop bx 0 00007536 5A pop dx 0 00007537 58 pop ax 0 00007538 59 pop cx 0 00007539 C3 retn 5103 5104 5105 yy_clear_remember_seek: 0 0000753A 391E[0000] cmp word [indos_remember_seek_handle], bx 0 0000753E 7515 jne .ret 5108 .clear: 0 00007540 C706[0000]0142 mov word [indos_remember_seek_function], 4201h 0 00007546 830E[0000]FF or word [indos_remember_seek_handle], -1 0 0000754B 8326[0200]00 and word [indos_remember_seek_offset + 2], 0 0 00007550 8326[0000]00 and word [indos_remember_seek_offset], 0 5113 .ret: 0 00007555 C3 retn 5115 5116 5117 yy_remember_seek: 0 00007556 391E[0000] cmp word [indos_remember_seek_handle], bx 0 0000755A 75F9 jne yy_clear_remember_seek.ret 5120 0 0000755C 50 push ax 0 0000755D 51 push cx 0 0000755E 52 push dx 0 0000755F 8B0E[0200] mov cx, word [indos_remember_seek_offset + 2] 0 00007563 8B16[0000] mov dx, word [indos_remember_seek_offset] 0 00007567 A1[0000] mov ax, word [indos_remember_seek_function] 5127 doscall ; call DOS 0 0000756A E8[0000] nearcall _doscall 0 0000756D 5A pop dx 0 0000756E 59 pop cx 0 0000756F 58 pop ax 0 00007570 EBCE jmp yy_clear_remember_seek.clear 5132 5133 5134 cmd_goto: 0 00007572 E836E3 call skipwhite 0 00007575 3C3A cmp al, ':' 0 00007577 7503 jne @F 0 00007579 E82FE3 call skipwhite 5139 @@: 5140 5141 5142 %if _EXTENSIONS && _COMLEVELS 0 0000757C 31C0 xor ax, ax 0 0000757E BB0080 mov bx, COMLEVEL_DO_GOTO 0 00007581 8B0E[0000] mov cx, [ext_comlevels_handler] 0 00007585 E303 jcxz @F 5147 ; INP: ax = 0 5148 ; cx destroyed 5149 ; bx = function, 5150 ; COMLEVEL_DO_GOTO 5151 ; si - 1 -> goto label 5152 ; OUT: cx don't care 5153 ; jump to downlink or extcall near_transfer_ext_return, 5154 ; or return to main cmd3 loop 0 00007587 E889FE call transfer_ext_cx_NC_push_ax 5156 @@: 5157 %endif 5158 0 0000758A E8A1F0 call getline_is_input_file? 0 0000758D 7312 jnc @F 0 0000758F BA[0000] mov dx, msg.goto_not_file 0 00007592 B80003 mov ax, 0300h 0 00007595 E8[0000] call setrc 5164 .error: 0 00007598 B8FF03 mov ax, 03FFh 0 0000759B E8[0000] call setrc 0 0000759E E988E9 jmp putsz_error 5168 5169 @@: 0 000075A1 4E dec si 5171 .yy_entry: ; si -> destination label 0 000075A2 BA[0000] mov dx, msg.sof 0 000075A5 E85EE2 call isstring? 0 000075A8 751B jne @F 0 000075AA E8CFE2 call skipcomma 5176 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 000075AD 8936[0000] mov word [if_exists_then_address], si 5178 %endif 0 000075B1 E802E3 call chkeol_or_then 0 000075B4 E8D700 call resetrc 0 000075B7 E824FF call yy_reset_buf_and_seek_start 5182 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 000075BA F606[0300]08 testopt [internalflags3], dif3_in_if 0 000075BF 7403E9[0000] jnz if_exists_found_open 5185 %endif 0 000075C4 C3 retn 5187 5188 @@: 0 000075C5 BA[0000] mov dx, msg.eof 0 000075C8 E83BE2 call isstring? 0 000075CB 751B jne @F 0 000075CD E8ACE2 call skipcomma 5193 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 000075D0 8936[0000] mov word [if_exists_then_address], si 5195 %endif 0 000075D4 E8DFE2 call chkeol_or_then 0 000075D7 E8B400 call resetrc 0 000075DA E88AF0 call getline_close_file 5199 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 000075DD F606[0300]08 testopt [internalflags3], dif3_in_if 0 000075E2 7403E9[0000] jnz if_exists_found_closed 5202 %endif 0 000075E7 C3 retn 5204 5205 @@: 0 000075E8 89F3 mov bx, si 0 000075EA B9FFFF mov cx, -1 5208 .loop: 0 000075ED 41 inc cx 0 000075EE AC lodsb 0 000075EF 3C20 cmp al, 32 0 000075F1 7409 je .end 0 000075F3 3C09 cmp al, 9 0 000075F5 7405 je .end 0 000075F7 E877E2 call iseol? 0 000075FA 75F1 jne .loop 5217 .end: 0 000075FC C644FF00 mov byte [si - 1], 0 ; terminate 0 00007600 E87AE2 call skipcomm0 5220 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00007603 8936[0000] mov word [if_exists_then_address], si 5222 %endif 0 00007607 E8ACE2 call chkeol_or_then 0 0000760A E376 jcxz .empty 0 0000760C 41 inc cx ; space for zero terminator 0 0000760D 41 inc cx ; round up 0 0000760E 80E1FE and cl, ~1 ; align to word 0 00007611 89E5 mov bp, sp 0 00007613 29CC sub sp, cx ; allocate stack space 0 00007615 89DE mov si, bx ; -> label in line_in 0 00007617 89E7 mov di, sp ; -> buffer on stack 0 00007619 57 push di 5233 @@: 0 0000761A AC lodsb 0 0000761B E837E2 call capitalise ; normalise the name in buffer 0 0000761E AA stosb 0 0000761F E2F9 loop @B ; copy all or all+1 5238 0 00007621 E8BAFE call yy_reset_buf_and_seek_start 5240 5241 .next_line: 0 00007624 800E[0100]88 setopt [internalflags3], dif3_quiet_input_single | dif3_return_eof 0 00007629 31C9 xor cx, cx 0 0000762B E84EED call getline.use_dif3_flags 0 0000762E 7228 jc .notfound 0 00007630 89F3 mov bx, si 0 00007632 3C3A cmp al, ':' 0 00007634 75EE jne .next_line 0 00007636 E872E2 call skipwhite 0 00007639 5A pop dx 0 0000763A 52 push dx 0 0000763B 4E dec si 0 0000763C E8C7E1 call isstring? 0 0000763F 75E3 jne .next_line 0 00007641 8D77FF lea si, [bx - 1] 0 00007644 AC lodsb 0 00007645 89EC mov sp, bp 0 00007647 E84400 call resetrc 5259 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 0000764A F606[0300]08 testopt [internalflags3], dif3_in_if 0 0000764F 7403E9[0000] jnz if_exists_found_open 5262 %endif 0 00007654 5A pop dx ; return address to cmd3 0 00007655 E9[0000] jmp cmd3_injected 5265 5266 .notfound: 5267 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00007658 F606[0300]08 testopt [internalflags3], dif3_in_if 0 0000765D 751B jnz @F 5270 %endif 0 0000765F B80103 mov ax, 0301h 0 00007662 E8[0000] call setrc 0 00007665 BA[0000] mov dx, msg.goto_not_found.1 0 00007668 E8BEE8 call putsz_error 0 0000766B 5A pop dx 0 0000766C E8BAE8 call putsz_error 0 0000766F BA[0000] mov dx, msg.goto_not_found.2 0 00007672 E8B4E8 call putsz_error 0 00007675 89EC mov sp, bp 0 00007677 E9EDEF jmp getline_close_file 5281 5282 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 5283 @@: 0 0000767A 89EC mov sp, bp 0 0000767C E8E8EF call getline_close_file 0 0000767F E9[0000] jmp if_exists_not_found 5287 %endif 5288 5289 .empty: 0 00007682 B80203 mov ax, 0302h 0 00007685 E8[0000] call setrc 0 00007688 BA[0000] mov dx, msg.goto_empty 0 0000768B E90AFF jmp .error 5294 5295 5296 resetrc: section_of_function 0 0000768E FF36[0000] push word [priorrc] 0 00007692 8F06[0000] pop word [rc] 0 00007696 C3 retn 5300 5301 5302 %ifn _LINK || _LINK_COMPAT 5303 %include "serialp.asm" 5304 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00002842 ???????? eldhSignature: resb 4 ; "ELD1" 0 00002846 ?????? resb 3 ; reserved 0 00002849 ?? resb 1 ; 26 (Ctrl-Z) 0 0000284A ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000284E ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002850 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002852 ???????? eldhDataOffset: resd 1 0 00002856 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00002858 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000285A ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000285C ???????? eldhReserved: resb 4 ; reserved 0 00002860 ???? 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 00002862 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00002866 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000286A ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000286E ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002842 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000284A ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000284E ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002850 ???? 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 00002842 ???? 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 00002844 ???? eldltAmount: resw 1 0 00002846 ???????? 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 00002842 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002844 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00002846 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00002848 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000284A ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002852 ???? 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 00002842 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002844 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00002846 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00002848 ???? eldlUseLinkHash: resw 1 0 0000284A ???? eldlDataAmount: resw 1 0 0000284C ???? eldlDataPrefixes: resw 1 0 0000284E ???? eldlDataEntries: resw 1 0 00002850 ???? eldlDataAddresses: resw 1 0 00002852 ???? eldlCodeAmount: resw 1 0 00002854 ???? eldlCodePrefixes: resw 1 0 00002856 ???? eldlCodeEntries: resw 1 0 00002858 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 0000285A ???? eldlDualAmount: resw 1 0 0000285C ???? eldlDualPrefixes: resw 1 0 0000285E ???? eldlDualEntries: resw 1 0 00002860 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00002842 ???? ifKeyword: resw 1 0 00002844 ???? ifDescription: resw 1 0 00002846 ???? ifOptions: resw 1 0 00002848 ???? ifValue: resw 1 0 0000284A ???? ifTrying: resw 1 0 0000284C ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00002842 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00002846 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 0000284A ???? smName1: resw 1 ; -> first string part 0 0000284C ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 0000284E ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00002850 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00002852 ???? smBaseNext: resw 1 0 00002854 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00002856 ???? smSpecialNext: resw 1 0 00002858 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00002842 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00002843 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00002844 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00002842 ???? shHash: resw 1 ; hash value 0 00002844 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00002842 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00002846 ???? xmsmSourceHandle: resw 1 0 00002848 ???????? xmsmSourceAddress: resd 1 0 0000284C ???? xmsmDestHandle: resw 1 0 0000284E ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 %if !_LINK || !_LOADER 24 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 00007697 F606[0100]40 testopt [internalflags], nodosloaded 0 0000769C 740C jz @F 32 %endif 0 0000769E BA[0000] mov dx, msg.nobootsupp 0 000076A1 B81801 mov ax, 0118h 0 000076A4 E8[0000] call setrc 0 000076A7 E9[0000] jmp putsz 37 @@: 38 %endif 39 40 %if _APPLICATION || _DEVICE 0 000076AA E8[0000] call parselw ; parse L and W argument format 0 000076AD 7444 jz ll1 ; if request to read program 43 %if _PM && _NOEXTENDER 0 000076AF E8[0000] call ispm 0 000076B2 7508 jnz .rm 0 000076B4 E8[0000] call isextenderavailable 0 000076B7 7303E9[0000] jc nodosextinst 48 .rm: 49 %endif 0 000076BC 36F606[0000]06 testopt [ss:internalflags], newpacket| ntpacket 0 000076C2 7427 jz .oldint 0 000076C4 88C2 mov dl, al ; zero-based drive 0 000076C6 BE0060 mov si, 6000h ; read, assume "file data" 54 %if _VDD 0 000076C9 F606[0000]04 testopt [internalflags], ntpacket 0 000076CE 750A jnz .vdd 57 %endif 0 000076D0 FEC2 inc dl ; one-based drive 0 000076D2 B80573 mov ax, 7305h ; ds:(e)bx-> packet 0 000076D5 F9 stc 0 000076D6 CD21 int 21h ; use int 21h here, not doscall 0 000076D8 EB13 jmp short .done 63 %if _VDD 64 .vdd: 0 000076DA A1[0000] mov ax, word [hVdd] 0 000076DD B90500 mov cx, 5 67 %if _PM 0 000076E0 020E[0000] add cl, byte [dpmi32] 69 %endif 0 000076E4 C4C4580290 DispatchCall 0 000076E9 EB02 jmp short .done 72 %endif 73 .oldint: 0 000076EB CD25 int 25h 75 .done: 0 000076ED BA[0000] mov dx, reading 0 000076F0 E9[0000] jmp ww1 78 79 ; For .COM or .EXE files, we can only load at cs:100. Check that first. 80 ll1: 0 000076F3 E8[0000] call InDOS 0 000076F6 7520 jnz not_while_indos 0 000076F8 E8[0000] call guard_re 0 000076FB F606[0100]04 testopt [options6], opt6_flat_binary 0 00007700 7532 jnz ll4 0 00007702 F606[0000]06 test byte [fileext], EXT_COM| EXT_EXE 0 00007707 742B jz ll4 ; if not .COM or .EXE file 0 00007709 3B1E[0000] cmp bx, word [reg_cs] 0 0000770D 7506 jne ll2 ; if segment is wrong 0 0000770F 81FA0001 cmp dx, 100h 0 00007713 741F je ll4 ; if address is OK (or not given) 92 ll2: 0 00007715 E9[0000] jmp error ; can only load .COM or .EXE at cs:100 94 95 not_while_indos: 0 00007718 B84701 mov ax, 0147h 0 0000771B BA[0000] mov dx, msg.not_while_indos 98 @@: 0 0000771E E8[0000] call setrc 0 00007721 E9[0000] jmp putsz_error 101 102 %if _TSR 103 ll_no_tsr_ll: 0 00007724 B84801 mov ax, 0148h 0 00007727 BA[0000] mov dx, msg.tsr_cannot_ll 0 0000772A EBF2 jmp @B 107 %endif 108 109 ; load (any) file (if not .EXE or .COM, load at BX:DX) 110 ll3: 0 0000772C 803E[0000]00 cmp byte [fileext], 0 0 00007731 7501 jne ll4 0 00007733 C3 retn 114 115 ; open file and get length 116 ll4: 117 %if _TSR && (_APPLICATION || _DEVICE) 0 00007734 F606[0200]40 testopt [internalflags], tsrmode 0 00007739 7407 jz @F 0 0000773B F606[0100]20 testopt [options7], opt7_no_tsr_ll 0 00007740 75E2 jnz ll_no_tsr_ll 122 @@: 123 %endif 124 0 00007742 89DE mov si, bx ; save destination address, segment 0 00007744 89D7 mov di, dx ; and offset 0 00007746 B8003D mov ax, 3D00h ; open file for reading 0 00007749 BA8000 mov dx, DTA 129 doscall 0 0000774C E8[0000] nearcall _doscall 0 0000774F 7303E92C03 jc ll16 ; error 0 00007754 93 xchg ax, bx ; mov bx, ax 0 00007755 B80242 mov ax, 4202h ; lseek 0 00007758 31C9 xor cx, cx 0 0000775A 31D2 xor dx, dx 0 0000775C 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 0000775E F606[0100]04 testopt [options6], opt6_flat_binary 0 00007763 750A jnz @F 0 00007765 F606[0000]06 test byte [fileext], EXT_COM | EXT_EXE 0 0000776A 7403E9FF01 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 0 0000776F E8[0000] call ispm 0 00007772 750F jnz .rm 0 00007774 B83E01 mov ax, 013Eh 0 00007777 E8[0000] call setrc 0 0000777A BA[0000] mov dx, nopmsupp 0 0000777D E8[0000] call putsz 0 00007780 E9B200 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 00007783 F606[0100]04 testopt [options6], opt6_flat_binary 0 00007788 750A jnz @F 0 0000778A F606[0000]08 test byte [fileext], EXT_HEX 0 0000778F 7403E9BF00 jnz ll_hex ; if .HEX file --> 172 @@: 173 0 00007794 E8[0000] call ensuredebuggeeloaded ; make sure a debuggee is loaded 0 00007797 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 00007799 8E06[0000] mov es, word [pspdbe] 181 182 ; Check the size against available space. 0 0000779D 56 push si 0 0000779E 53 push bx 185 0 0000779F 263B360200 cmp si, word [es:ALASAP] 0 000077A4 9C pushf 0 000077A5 F7DE neg si 0 000077A7 9D popf 0 000077A8 7305 jae ll6 ; if loading past end of mem, allow through ffff 0 000077AA 2603360200 add si, word [es:ALASAP] ; si = number of paragraphs available 192 ll6: 0 000077AF B90400 mov cx, 4 0 000077B2 31DB xor bx, bx ; bx:si = amount of paragraphs 195 ll7: 0 000077B4 D1E6 shl si, 1 0 000077B6 D1D3 rcl bx, 1 0 000077B8 E2FA loop ll7 ; bx:si = amount of bytes from paragraphs 0 000077BA 29FE sub si, di 0 000077BC 19CB sbb bx, cx ; bx:si = amount of bytes left 0 000077BE 7208 jb ll9 ; if already we're out of space --> 0 000077C0 39D3 cmp bx, dx ; cmp bx:si, dx:ax (compare high word) 0 000077C2 7502 jne @F ; if high word differs --> 0 000077C4 39C6 cmp si, ax ; compare low word 205 @@: 0 000077C6 7310 jae ll10 ; if not out of space --> 207 ll9: 0 000077C8 5B pop bx ; out of space 0 000077C9 5E pop si 210 .common: 0 000077CA B83F01 mov ax, 013Fh 0 000077CD E8[0000] call setrc 0 000077D0 BA[0000] mov dx, doserr8 ; not enough memory 0 000077D3 E8[0000] call putsz ; print string 0 000077D6 EB5D jmp short ll12 ; finally close file --> 216 217 ll10: 0 000077D8 5B pop bx 0 000077D9 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 000077DA 8916[0000] mov word [reg_ebx], dx 0 000077DE A3[0000] mov word [reg_ecx], ax 235 .noregmodify: 236 0 000077E1 E80200 call ll_bin_hex_common 0 000077E4 EB33 jmp ll10_5 239 240 241 ll_bin_hex_common: 0 000077E6 F606[0100]08 testopt [options6], opt6_big_stack 0 000077EB 7422 jz .nostacksetup 0 000077ED A1[0000] mov ax, word [pspdbe] 0 000077F0 48 dec ax 0 000077F1 8ED8 mov ds, ax ; => MCB 0 000077F3 8B160300 mov dx, word [3] ; size in paragraphs 0 000077F7 83EA1F sub dx, 20h - 1 0 000077FA 01C2 add dx, ax 0 000077FC 8EDA mov ds, dx ; => our stack 0 000077FE 8326FE0100 and word [200h - 2], 0 ; put a zero on top 0 00007803 16 push ss 0 00007804 1F pop ds ; restore debugger segment 0 00007805 8916[0000] mov word [reg_ss], dx 0 00007809 C706[0000]FE01 mov word [reg_esp], 200h - 2 256 ; -> at the zero 257 258 .nostacksetup: 259 260 ; Rewind the file 0 0000780F B80042 mov ax, 4200h ; lseek 0 00007812 31C9 xor cx, cx 0 00007814 31D2 xor dx, dx 0 00007816 CD21 int 21h 0 00007818 C3 retn 266 267 268 ll10_5: 0 00007819 BA0F00 mov dx, 0Fh 0 0000781C 21FA and dx, di 0 0000781E B104 mov cl, 4 0 00007820 D3EF shr di, cl 0 00007822 01FE add si, di ; si:dx -> address to read to 274 275 ; Loop over chunks to read 276 ll11: 0 00007824 B43F mov ah, 3Fh ; read from file into DS:(E)DX 0 00007826 B900FE mov cx, 0FE00h ; read up to this many bytes 0 00007829 8EDE mov ds, si 0 0000782B CD21 int 21h ; ax = how many bytes read 281 0 0000782D 81C6E00F add si, 0FE0h ; (won't work in protected mode!) 0 00007831 39C8 cmp ax, cx ; read a full chunk ? 0 00007833 74EF je ll11 ; yes, end of file maybe not yet reached --> 285 286 ; Close the file and finish up. 287 ll12: 0 00007835 B43E mov ah, 3Eh ; close file 0 00007837 CD21 int 21h 0 00007839 16 push ss ; restore ds 0 0000783A 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 0000783B B98000 mov cx, 128 ; counter = 128 bytes 300 301 ; INP: cx = length to copy 302 .have_cx: 303 %endif 0 0000783E C536[0000] lds si, [execblk.cmdline] 0 00007842 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 00007845 F3A4 rep movsb ; copy over 0 00007847 BF5C00 mov di, 5Ch 311 ; lds si, [ss:execblk.fcb1] 0 0000784A 89FE mov si, di 0 0000784C B110 mov cl, 16 ; 32 bytes 0 0000784E F3A5 rep movsw 0 00007850 16 push ss 0 00007851 1F pop ds 0 00007852 C3 retn ; done 318 319 320 ll_hex: 0 00007853 E8[0000] call ensuredebuggeeloaded ; make sure a debuggee is loaded 0 00007856 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 0000785B 7202 jc @F 0 0000785D 31FF xor di, di ; created process, reset di (100h) to 0 328 @@: 329 0 0000785F 8EC6 mov es, si ; => segment to write to 331 0 00007861 E882FF call ll_bin_hex_common 333 lframe none 334 lvar word, high_effective_offset 0 00007864 5589E550 lenter 0 00007868 31C0 xor ax, ax 337 lvar dword, highest 0 0000786A 50 push ax 0 0000786B 50 push ax 340 lvar word, highoffset 0 0000786C 50 push ax 342 lvar dword, base 0 0000786D 06 push es 0 0000786E 57 push di ; -> base address for write 0 0000786F BE[0001] mov si, line_out + 256 346 .find_line_start: 0 00007872 E8D000 call ll_hex_read ; scan for colon 0 00007875 3C3A cmp al, ':' 0 00007877 75F9 jne .find_line_start 350 0 00007879 E8A400 call ll_hex_read_byte ; amount of data bytes 0 0000787C B400 mov ah, 0 0 0000787E 91 xchg ax, cx 0 0000787F E378 jcxz ll_hex_done 0 00007881 E89C00 call ll_hex_read_byte ; MSByte of offset 0 00007884 88C6 mov dh, al 0 00007886 E89700 call ll_hex_read_byte ; LSByte of offset 0 00007889 88C2 mov dl, al 0 0000788B E89200 call ll_hex_read_byte ; type 0 0000788E 3C04 cmp al, 4 ; new high offset ? 0 00007890 7457 je .change_high_offset 0 00007892 3C00 cmp al, 0 ; data ? 0 00007894 75DC jne .find_line_start ; no --> 364 0 00007896 8B46F8 mov ax, word [bp + ?highoffset] 0 00007899 8946FE mov word [bp + ?high_effective_offset], ax 0 0000789C 83F810 cmp ax, 10h 0 0000789F 7372 jae ll_hex_error 0 000078A1 51 push cx 0 000078A2 B10C mov cl, 12 0 000078A4 D3E0 shl ax, cl ; high offset * 1000h = segment adjust 0 000078A6 59 pop cx 0 000078A7 0346F6 add ax, word [bp + ?base + 2] 374 ; => target 0 000078AA 7267 jc ll_hex_error 0 000078AC 0356F4 add dx, [bp + ?base] ; -> target. except if CY 0 000078AF 7306 jnc @F 0 000078B1 FF46FE inc word [bp + ?high_effective_offset] 0 000078B4 050010 add ax, 1000h ; => next 64 KiB 380 @@: 0 000078B7 8EC0 mov es, ax 0 000078B9 89D7 mov di, dx ; es:di -> destination 383 .loop: 0 000078BB E86200 call ll_hex_read_byte ; data byte 0 000078BE AA stosb ; write it 0 000078BF 85FF test di, di ; past end of 64 KiB segment ? 0 000078C1 750F jnz @F 0 000078C3 8CC7 mov di, es 0 000078C5 81C70010 add di, 1000h ; => next 64 KiB 0 000078C9 7248 jc ll_hex_error 0 000078CB 8EC7 mov es, di 0 000078CD FF46FE inc word [bp + ?high_effective_offset] 393 ; next 64 KiB 0 000078D0 31FF xor di, di ; reset offset 395 @@: 0 000078D2 8B46FE mov ax, word [bp + ?high_effective_offset] 397 0 000078D5 3B46FC cmp ax, word [bp + ?highest + 2] 0 000078D8 7503 jne @F 0 000078DA 3B7EFA cmp di, word [bp + ?highest] 401 @@: 0 000078DD 7606 jbe @F 0 000078DF 8946FC mov word [bp + ?highest + 2], ax 0 000078E2 897EFA mov word [bp + ?highest], di 405 ; remember the highest offset after 406 @@: 0 000078E5 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 000078E7 EB89 jmp .find_line_start 412 413 414 .change_high_offset: 0 000078E9 E83400 call ll_hex_read_byte ; MSByte of offset 0 000078EC 88C6 mov dh, al 0 000078EE E82F00 call ll_hex_read_byte ; LSByte of offset 0 000078F1 88C2 mov dl, al 0 000078F3 8956F8 mov word [bp + ?highoffset], dx 0 000078F6 E979FF jmp .find_line_start 421 422 423 ll_hex_done: 0 000078F9 B43E mov ah, 3Eh 0 000078FB CD21 int 21h 0 000078FD 8B46FC mov ax, word [bp + ?highest + 2] 0 00007900 A3[0000] mov word [reg_ebx], ax 0 00007903 8B46FA mov ax, word [bp + ?highest] 0 00007906 A3[0000] mov word [reg_ecx], ax 0 00007909 89EC5D lleave , forcerestoresp 0 0000790C 8E06[0000] mov es, word [pspdbe] 0 00007910 E928FF jmp ll_copy_cmdline_and_fcbs 433 434 435 ll_hex_error: 0 00007913 B43E mov ah, 3Eh 0 00007915 CD21 int 21h 0 00007917 BA[0000] mov dx, msg.hexerror 0 0000791A E8[0000] call putsz 0 0000791D 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 00007920 51 push cx 0 00007921 52 push dx 0 00007922 E82000 call ll_hex_read 0 00007925 E8[0000]EB02[0000] nearcall getnyb 0 0000792C 72E5 jc ll_hex_error 0 0000792E 88C4 mov ah, al 0 00007930 E81200 call ll_hex_read 0 00007933 E8[0000]EB02[0000] nearcall getnyb 0 0000793A 72D7 jc ll_hex_error 0 0000793C B104 mov cl, 4 0 0000793E D2E4 shl ah, cl 0 00007940 08E0 or al, ah 0 00007942 5A pop dx 0 00007943 59 pop cx 0 00007944 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 00007945 50 push ax 0 00007946 81FE[0001] cmp si, line_out + 256 ; at end of buffer ? 0 0000794A 7517 jne .simple ; not yet --> 477 0 0000794C B90001 mov cx, 256 ; buffer size 0 0000794F BA[0000] mov dx, line_out ; -> buffer 0 00007952 B43F mov ah, 3Fh 0 00007954 CD21 int 21h 0 00007956 72BB jc ll_hex_error 0 00007958 89D6 mov si, dx ; reset -> buffer 0 0000795A 39C1 cmp cx, ax ; full buffer read ? 0 0000795C 7405 je .simple ; yes --> 0 0000795E 93 xchg ax, bx 0 0000795F C6001A mov byte [si + bx], 1Ah ; insert an EOF after read data 0 00007962 93 xchg ax, bx 489 490 .simple: 0 00007963 58 pop ax ; preserve ah 0 00007964 AC lodsb ; al = next text 0 00007965 84C0 test al, al ; 0 ? 0 00007967 7490 jz ll_hex_done 0 00007969 3C1A cmp al, 1Ah ; EOF ? 0 0000796B 748C je ll_hex_done ; yes --> 0 0000796D 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 0000796E 52 push dx 0 0000796F 50 push ax 509 0 00007970 B80042 mov ax, 4200h ; lseek set 0 00007973 31C9 xor cx, cx 0 00007975 31D2 xor dx, dx 0 00007977 CD21 int 21h 0 00007979 16 push ss 0 0000797A 1F pop ds 516 0 0000797B 89E5 mov bp, sp 0 0000797D B91C00 mov cx, EXEHEADER_size 0 00007980 29CC sub sp, cx 0 00007982 89E2 mov dx, sp 0 00007984 89E6 mov si, sp 0 00007986 B43F mov ah, 3Fh 0 00007988 CD21 int 21h 524 525 ; Close the file 0 0000798A 50 push ax 0 0000798B B43E mov ah, 3Eh ; close file 0 0000798D CD21 int 21h 0 0000798F 58 pop ax 530 0 00007990 39C8 cmp ax, cx 0 00007992 7526 jne .no_exe ; (ax = 0 if empty file) 0 00007994 813C4D5A cmp word [si + exeSignature], "MZ" 0 00007998 7406 je @F 0 0000799A 813C5A4D cmp word [si + exeSignature], "ZM" 0 0000799E 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 000079A0 8B4408 mov ax, [si + exeHeaderSize] 0 000079A3 31F6 xor si, si 0 000079A5 B90400 mov cx, 4 545 @@: 0 000079A8 D1E0 shl ax, 1 0 000079AA D1D6 rcl si, 1 0 000079AC E2FA loop @B ; si:ax <<= 4 549 0 000079AE 89EC mov sp, bp 0 000079B0 5B pop bx 0 000079B1 5A pop dx 553 0 000079B2 29C3 sub bx, ax 0 000079B4 19F2 sbb dx, si ; file size minus header size 556 0 000079B6 B001 mov al, 1 ; indicate nonzero filesize 0 000079B8 EB04 jmp @F 559 560 .no_exe: 0 000079BA 89EC mov sp, bp 0 000079BC 5B pop bx 0 000079BD 5A pop dx ; full file size 564 @@: 565 566 ; Clear registers 567 568 ll14: 0 000079BE 50 push ax ; zero if empty file 0 000079BF 53 push bx 0 000079C0 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 000079C1 E8[0000] call terminate_attached_process 0 000079C4 7503E9BA00 jz ll_attached_unterminated 580 %if _PM 0 000079C9 E8[0000] call ispm 0 000079CC 7503E9BD00 jz ll_still_pm 583 %endif 584 0 000079D1 E8[0000] call zeroregs 586 0 000079D4 8F06[0000] pop word [reg_ebx] 0 000079D8 8F06[0000] pop word [reg_ecx] 589 590 ; Fix up interrupt vectors in PSP 0 000079DC BE0E00 mov si, CCIV ; address of original INT 23 and 24 (in PSP) 0 000079DF BF[0000] mov di, run2324 0 000079E2 A5 movsw 0 000079E3 A5 movsw 0 000079E4 A5 movsw 0 000079E5 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 000079E6 58 pop ax ; zero if empty file 0 000079E7 85C0 test ax, ax 0 000079E9 B00B mov al, 0Bh ; ax = 000Bh (Invalid format) 0 000079EB 7503E99000 jz ll16 606 607 ; Actual program loading. Use the DOS interrupt. 0 000079F0 B8014B mov ax, 4B01h ; load program 0 000079F3 BA8000 mov dx, DTA ; offset of file to load 0 000079F6 BB[0000] mov bx, execblk ; parameter block 0 000079F9 CD21 int 21h ; load it 0 000079FB 7303E98000 jc ll16 ; if error 0 00007A00 89E0 mov ax, sp 0 00007A02 2B062E00 sub ax, [SPSAV] 0 00007A06 3D8000 cmp ax, 80h 0 00007A09 7203 jb ll15 ; if in range 0 00007A0B B88000 mov ax, 80h 618 ll15: 0 00007A0E A3[0000] mov word [spadjust], ax 0 00007A11 C436[0000] les si, [execblk.sssp] 0 00007A15 26AD es lodsw ; recover ax 0 00007A17 A3[0000] mov word [reg_eax], ax 0 00007A1A 8936[0000] mov word [reg_esp], si 0 00007A1E 8C06[0000] mov word [reg_ss], es 0 00007A22 C436[0000] les si, [execblk.csip] 0 00007A26 8936[0000] mov word [reg_eip], si 0 00007A2A 8C06[0000] mov word [reg_cs], es 0 00007A2E 16 push ss 0 00007A2F 07 pop es 0 00007A30 E8[0000] call getpsp 0 00007A33 93 xchg ax, bx ; ax = PSP, clobber bx 0 00007A34 A3[0000] mov word [pspdbe], ax 0 00007A37 8026[0200]7F clropt [internalflags], attachedterm 0 00007A3C BF[0000] mov di, reg_ds 0 00007A3F AB stosw 0 00007A40 AF scasw 0 00007A41 AB stosw ; reg_es 0 00007A42 50 push ax 0 00007A43 E8[0000] call setpspdbg 640 641 ; Finish up. Set termination address. 0 00007A46 B82225 mov ax, 2522h ; set interrupt vector 22h 0 00007A49 BA[0000] mov dx, int22 ; ds => lDEBUG_DATA_ENTRY 0 00007A4C CD21 int 21h 0 00007A4E 1F pop ds 0 00007A4F 89160A00 mov word [TPIV], dx 0 00007A53 8C160C00 mov word [TPIV+2], ss ; => lDEBUG_DATA_ENTRY 0 00007A57 16 push ss 0 00007A58 1F pop ds 650 %endif 651 652 ; Set up initial addresses for 'a', 'd', and 'u' commands. 653 adusetup: 0 00007A59 A1[0000] mov ax, word [reg_eip] 0 00007A5C 8B0E[0200] mov cx, word [reg_eip+2] 0 00007A60 8B1E[0000] mov bx, word [reg_cs] 0 00007A64 BA[0000] mov dx, var_addr_entries.amount 0 00007A67 BF[0000] mov di, var_addr_entries 659 660 .loop: 0 00007A6A AB stosw ; IP 662 %if saSegSel == 4 0 00007A6B 890D mov word [di], cx 0 00007A6D AF scasw ; skip this word 665 %endif 0 00007A6E 93 xchg ax, bx 0 00007A6F AB stosw ; CS 668 %if _PM 669 %if SEGADR_size != 10 670 %error Unexpected SEGADR size 671 %endif 0 00007A70 E8[0000] call ispm 0 00007A73 7504 jnz .86m 674 .pm: 0 00007A75 AF scasw ; skip saSegment 0 00007A76 AB stosw ; store saSelector 0 00007A77 EB02 jmp @F 678 .86m: 0 00007A79 AB stosw ; store saSegment 0 00007A7A AF scasw ; skip saSelector 681 @@: 682 %else 683 %if SEGADR_size == 10 684 %error Unexpected SEGADR size 685 %endif 686 %endif 0 00007A7B 93 xchg ax, bx ; d_addr 688 0 00007A7C 4A dec dx 0 00007A7D 75EB jnz .loop 0 00007A7F C3 retn 692 693 %if _APPLICATION || _DEVICE 694 ; Error messages. Print and quit. 695 ll16: 0 00007A80 E9[0000] jmp ww15 ; print error message 697 698 699 ll_attached_unterminated: 0 00007A83 E8[0000] call putrunint 0 00007A86 BA[0000] mov dx, msg.ll_unterm 0 00007A89 B81601 mov ax, 0116h 703 %if _PM 0 00007A8C EB06 jmp @F 705 706 ll_still_pm: 0 00007A8E BA[0000] mov dx, msg.cannotpmload 0 00007A91 B81701 mov ax, 0117h 709 %endif 710 @@: 0 00007A94 E8[0000] call setrc 0 00007A97 E8[0000] call putsz 0 00007A9A E9[0000] jmp cmd3 714 %endif 715 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00002842 ???????? eldhSignature: resb 4 ; "ELD1" 0 00002846 ?????? resb 3 ; reserved 0 00002849 ?? resb 1 ; 26 (Ctrl-Z) 0 0000284A ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000284E ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002850 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002852 ???????? eldhDataOffset: resd 1 0 00002856 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00002858 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000285A ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000285C ???????? eldhReserved: resb 4 ; reserved 0 00002860 ???? 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 00002862 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00002866 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000286A ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000286E ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002842 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000284A ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000284E ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002850 ???? 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 00002842 ???? 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 00002844 ???? eldltAmount: resw 1 0 00002846 ???????? 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 00002842 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002844 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00002846 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00002848 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000284A ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002852 ???? 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 00002842 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002844 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00002846 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00002848 ???? eldlUseLinkHash: resw 1 0 0000284A ???? eldlDataAmount: resw 1 0 0000284C ???? eldlDataPrefixes: resw 1 0 0000284E ???? eldlDataEntries: resw 1 0 00002850 ???? eldlDataAddresses: resw 1 0 00002852 ???? eldlCodeAmount: resw 1 0 00002854 ???? eldlCodePrefixes: resw 1 0 00002856 ???? eldlCodeEntries: resw 1 0 00002858 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 0000285A ???? eldlDualAmount: resw 1 0 0000285C ???? eldlDualPrefixes: resw 1 0 0000285E ???? eldlDualEntries: resw 1 0 00002860 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00002842 ???? ifKeyword: resw 1 0 00002844 ???? ifDescription: resw 1 0 00002846 ???? ifOptions: resw 1 0 00002848 ???? ifValue: resw 1 0 0000284A ???? ifTrying: resw 1 0 0000284C ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00002842 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00002846 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 0000284A ???? smName1: resw 1 ; -> first string part 0 0000284C ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 0000284E ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00002850 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00002852 ???? smBaseNext: resw 1 0 00002854 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00002856 ???? smSpecialNext: resw 1 0 00002858 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00002842 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00002843 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00002844 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00002842 ???? shHash: resw 1 ; hash value 0 00002844 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00002842 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00002846 ???? xmsmSourceHandle: resw 1 0 00002848 ???????? xmsmSourceAddress: resd 1 0 0000284C ???? xmsmDestHandle: resw 1 0 0000284E ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 69 mov ax, ss 70 add ax, [ss:liiAmountParagraphs] 71 cmp dx, ax 72 jb .error_overlap 73 74 cmp word [40Eh], 400h ; have an EBDA ? 75 jb @F 76 cmp word [40Eh], dx 77 ja @F 78 ; MEMDISK can allocate memory *below* the EBDA. 79 ; just pretend we don't see any EBDA. 80 jne .error_ebdanottop 81 mov ds, dx 82 push ax 83 xor ax, ax ; ah = 0 84 mov al, byte [0] ; EBDA size in KiB 85 mov cl, 6 86 shl ax, cl 87 xchg cx, ax ; cx = EBDA size in paras 88 pop ax 89 sub dx, bx ; => destination of EBDA 90 jc .error_oom 91 cmp dx, ax 92 jb .error_overlap 93 add dx, cx ; => behind destination of EBDA 94 jc .error_toolargeebda ; if not branching: NC 95 mov ax, 1 96 jmp .done_j1 97 98 @@: 99 sub dx, bx 100 jc .error_oom 101 cmp dx, ax 102 jb .error_overlap 103 xor ax, ax ; NC 104 .done_j1: 105 jmp .done 106 107 .error_ebdanottop: 108 mov dx, msg.move_ebdanottop 109 mov ax, 0284h 110 jmp .specificerror 111 112 .error_toolargeebda: 113 mov dx, msg.move_toolargeebda 114 mov ax, 0285h 115 jmp .specificerror 116 117 .error_empty: 118 mov dx, msg.move_empty 119 mov ax, 0291h 120 jmp .specificerror 121 122 .error_must_be_bottom: 123 mov dx, msg.move_must_be_bottom 124 mov ax, 0292h 125 jmp .specificerror 126 127 .error_rpl: 128 mov dx, msg.move_rpl 129 mov ax, 0281h 130 jmp .specificerror 131 132 .error_overlap: 133 extern msg.move_overlap 134 mov dx, msg.move_overlap 135 mov ax, 0296h 136 jmp .specificerror 137 138 .error_oom: 139 mov dx, msg.move_oom 140 mov ax, 0283h 141 .specificerror: 142 stc 143 .done: 144 pop di 145 pop si 146 pop ds 147 retn 148 149 150 151 ; INP: bx = how many paragraphs wanted (including image ident) 152 ; OUT: CY if error, 153 ; ax = error code 154 ; ss:dx -> error message (ASCIZ) 155 ; NC if success, 156 ; ax = 0 if no EBDA 157 ; ax = 1 if EBDA present 158 ; dx => image ident address, 159 ; image ident initialised (NEXT00), remainder zeroed 160 ; bx = rounded up amount paragraphs 161 ; cx = EBDA size in paragraphs, 0 if ax = 0 162 ; dx - cx => EBDA destination if ax = 1 163 ; CHG: ax, bx, cx, dx 164 loader_prepare_resident: section_of_function 165 push ds 166 push es 167 push si 168 push di 169 170 call loader_get_resident_address 171 jc .done 172 xor si, si 173 mov ds, si ; ds => IVT, BDA 174 push ax 175 test ax, ax 176 jz .no_ebda 177 push dx 178 mov ax, word [40Eh] ; => EBDA source 179 sub dx, cx ; => EBDA destination 180 call movp ; move EBDA 181 mov word [40Eh], dx ; relocate 182 call .set_memsize ; set mem size to point to EBDA 183 pop dx 184 jmp @F 185 186 .no_ebda: 187 call .set_memsize ; set mem size to point to NEXT image ident 188 @@: 189 push cx 190 push dx 191 192 mov si, bx ; = how many paragraphs to init 193 .loop_init: 194 mov cx, paras(64 * 1024) 195 cmp si, cx ; > 64 KiB left ? 196 jae @F ; yes --> 197 mov cx, si ; no, do remainder only 198 @@: 199 sub si, cx ; si = remainder after this round 200 mov es, dx ; => current chunk 201 add dx, cx ; => next chunk 202 xchg ax, cx ; ax = paragraphs this round 203 mov cl, 3 204 shl ax, cl ; ax = words this round 205 xchg ax, cx ; cx = words this round 206 xor di, di ; es:di -> current chunk 207 xor ax, ax ; ax = 0 208 rep stosw ; init to all-zeroes 209 test si, si ; another round needed ? 210 jnz .loop_init ; yes --> 211 212 pop dx 213 214 mov ds, dx ; => image ident 215 xor si, si 216 mov word [si + liiSignature + 0], "NE" 217 mov word [si + liiSignature + 2], "XT" 218 mov word [si + liiVersion], "00" 219 ; write "NEXT00" 220 mov word [si + liiAmountParagraphs], bx 221 ; write size 222 mov cx, words(16) 223 xor di, di 224 @@: 225 lodsw 226 add di, ax ; add all words (liiChecksum == 0) 227 loop @B 228 neg di ; get checksum 229 mov word [liiChecksum], di 230 ; finish the header 231 pop cx 232 pop ax 233 clc 234 .done: 235 pop di 236 pop si 237 pop es 238 pop ds 239 retn 240 241 .set_memsize: 242 push dx 243 push cx 244 mov cl, 6 245 shr dx, cl 246 mov word [413h], dx 247 pop cx 248 pop dx 249 retn 250 251 252 usesection lDEBUG_DATA_ENTRY 253 254 ; INP: cs => NLDR image ident 255 ; ip = this word field content 256 ; ax = 60h 257 ; OUT: ax => behind memory requested (should be >= 60h) 258 ; CHG: es, ds, di, si, bx, cx, dx 259 ; STT: far called, UP, EI 260 loader_query: 261 cmp ax, 60h 262 jne loader_error 263 add ax, word [cs:liiAmountParagraphs] 264 retf 265 266 267 ; INP: cs => NLDR image ident 268 ; ip = this word field content 269 ; ax = 60h 270 ; OUT: ax => relocated NLDR segment (usually 60h) 271 ; CHG: es, ds, di, si, bx, cx, dx 272 ; STT: far called, UP, EI 273 loader_transfer_relocate: 274 cmp ax, 60h 275 jne loader_error 276 277 push ax 278 push bp 279 mov dx, ss 280 mov bx, sp 281 cli 282 push cs 283 pop ss 284 mov sp, stack_end ; have to run on our stack 285 sti 286 push dx 287 push bx 288 times 1 - (($ - $$) & 1) nop ; align in-code parameter 289 call entry_to_code_seg 290 dw .code 291 292 usesection lDEBUG_CODE 293 .code: 294 push ss 295 pop ds 296 push ss 297 pop es 298 mov bx, movetable.bottom 299 call moveloader.change_no_line 300 301 pop bx 302 pop dx ; -> caller's stack 303 cli 304 mov ss, dx 305 mov sp, bx ; restore caller's stack 306 sti 307 pop bp 308 pop ax ; ax, bp preserved 309 retf 310 311 312 usesection lDEBUG_DATA_ENTRY 313 314 loader_error: 315 mov bx, cs 316 cli 317 mov ss, bx 318 mov sp, stack_end 319 sti 320 mov ds, bx 321 mov es, bx 322 times 1 - (($ - $$) & 1) nop ; align in-code parameter 323 call entry_to_code_seg 324 dw .code 325 326 usesection lDEBUG_CODE 327 .code: 328 mov dx, msg.loader_error 329 mov ax, 011Eh 330 call setrc 331 loader_error_msg: 332 call putsz 333 jmp cmd3 334 335 336 usesection lDEBUG_DATA_ENTRY 337 338 ; INP: es = ds = cs = ss => relocated NLDR 339 ; ip = this word field content 340 ; sp = next word field content 341 ; STT: running as debuggee, UP, EI 342 loader_transfer_cmd3: 343 times 1 - (($ - $$) & 1) nop ; align in-code parameter 344 call entry_to_code_seg 345 dw cmd3 346 347 348 iispentry intr_loader_18, 80h, mm_sharedentry 349 mov dx, int18msg 350 jmp @F 351 mm_sharedentry.hwreset: 352 retf 353 354 iispentry intr_loader_19, 80h, mm_sharedentry 355 mov dx, int19msg 356 @@: 357 mov ax, cs 358 cli 359 mov ss, ax 360 mov sp, stack_end 361 sti 362 mov ds, ax 363 mov es, ax 364 times 1 - (($ - $$) & 1) nop ; align in-code parameter 365 call entry_to_code_seg 366 dw loader_error_msg 367 368 369 usesection lDEBUG_CODE 370 371 moveloader_hook_ints: 372 cmp byte [currentposition], 2 373 jne .ret 374 375 push bx 376 377 mov al, 18h ; interrupt number 378 mov si, intr_loader_18 ; -> IISP entry header 379 mov dx, opt4_int_18_force >> 16 380 %if (opt4_int_18_force >> 16) == dif4_int_18_hooked 381 call cmd3_int_enable.set_bx_to_dx 382 %else 383 mov bx, dif4_int_18_hooked 384 call cmd3_int_enable 385 %endif 386 387 mov al, 19h ; interrupt number 388 mov si, intr_loader_19 ; -> IISP entry header 389 mov dx, opt4_int_19_force >> 16 390 %if (opt4_int_19_force >> 16) == dif4_int_19_hooked 391 call cmd3_int_enable.set_bx_to_dx 392 %else 393 mov bx, dif4_int_19_hooked 394 call cmd3_int_enable 395 %endif 396 397 pop bx 398 399 .ret: 400 retn 401 402 403 ; INP: bx => destination for auxbuff 404 ; OUT: ZR if this destination for auxbuff doesn't cross 405 ; a 64 KiB boundary 406 ; NZ else 407 ; CHG: si, di 408 moveloader_check_auxbuff: 409 mov si, bx ; => auxbuff 410 %if _AUXBUFFSIZE < 8192 411 %error Expected full sector length auxbuff 412 %endif 413 lea di, [si + (8192 >> 4)]; => behind auxbuff (at additional paragraph) 414 and si, 0F000h ; => 64 KiB chunk of first paragraph of auxbuff 415 and di, 0F000h ; => 64 KiB chunk of additional paragraph 416 cmp di, si ; same ? 417 ; ZR if they are the same 418 retn 419 420 421 ; INP: dx => destination 422 ; ax => old source 423 ; cs => old code segment 424 ; cx = delta 425 ; CHG: ax, cx, dx, si, di 426 ; STT: ds = es = ss => source 427 moveloader_auxup: 428 mov ds, dx 429 lframe near 430 lenter 431 lvar word, source 432 push ax 433 lvar word, delta 434 push cx 435 lvar word, destination 436 push dx 437 mov dx, word [auxbuff_current_size] 438 mov cl, 4 439 shr dx, cl 440 lvar word, auxsize 441 push dx 442 %ifn _LINK 443 mov cx, paras(ldebug_code_size + ldebug_code2_size) ; untruncated 444 %else 445 mov cx, relocatedzero + 0 ; untruncated 446 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 447 %endif 448 mov dx, word [auxbuff_segorsel] ; => destination 449 mov ax, word [code_seg] ; => source 450 call movp 451 mov word [code_seg], dx ; update 452 mov es, word [bp + ?source] 453 add dx, cx ; => behind code1+2 454 mov ax, word [es:auxbuff_segorsel] 455 ; => unrelocated auxbuff 456 mov cx, word [bp + ?auxsize] 457 call movp 458 mov word [auxbuff_segorsel], dx 459 push ss 460 pop ds 461 push ss 462 pop es 463 lleave 464 mov dx, msg.move_auxup 465 jmp putsz 466 467 468 moveloader_auxdown: 469 mov ds, dx 470 lframe near 471 lenter 472 lvar word, source 473 push ax 474 lvar word, delta 475 push cx 476 lvar word, destination 477 push dx 478 mov dx, word [auxbuff_current_size] 479 mov cl, 4 480 shr dx, cl 481 lvar word, auxsize 482 push dx 483 mov cx, dx 484 mov dx, word [code_seg] ; => destination 485 mov ax, word [auxbuff_segorsel] ; => source 486 call movp 487 mov word [auxbuff_segorsel], dx ; update 488 mov es, word [bp + ?source] 489 add dx, cx ; => behind aux 490 mov ax, word [es:code_seg] 491 ; => unrelocated code1+2 492 %ifn _LINK 493 mov cx, paras(ldebug_code_size + ldebug_code2_size) ; untruncated 494 %else 495 mov cx, relocatedzero + 0 ; untruncated 496 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 497 %endif 498 call movp 499 mov word [code_seg], dx 500 push ss 501 pop ds 502 push ss 503 pop es 504 lleave 505 mov dx, msg.move_auxdown 506 jmp putsz 507 508 509 moveloader_auxnop: 510 retn 511 512 513 ; INP: ss = ax => old data/entry segment 514 ; dx => new segment (stack and code is usable) 515 ; CHG: si, di, es 516 ; OUT: ds => old segment 517 ; doesn't return if error 518 moveloader_rehook_serial: 519 push bx 520 push cx 521 push ax 522 push dx 523 524 mov ds, ax ; ! => old segment 525 testopt [internalflags4], dif4_int_serial_hooked 526 jz .done_serial 527 call serial_uninstall_interrupt_handler ; CHG si, ax, dx, di, es 528 ; ! es = ss 529 jnc .rehook_serial ; if it succeeded --> 530 531 mov di, msg.serial_cannot_unhook.int 532 mov al, byte [serial_installed_intnum] 533 call hexbyte 534 mov dx, msg.serial_cannot_unhook.nowarn 535 call putsz_error 536 mov dx, msg.move_int_panic 537 call putsz_error 538 mov ax, 011Ch 539 call setrc 540 call near [moveloader_undo] 541 jmp cmd3 542 543 .rehook_serial: 544 ; old segment will be discarded soon, so do not reset these 545 ; setopt [internalflags4], dif4_int_serial_hooked 546 ; call update_inttab_optional 547 548 pop dx ; dx => new segment 549 push dx 550 mov ss, dx ; ! need to run on new stack 551 nop 552 push ds ; => old segment 553 mov ds, dx ; ss = ds => new segment 554 mov es, dx ; harden 555 mov al, byte [serial_installed_intnum] 556 mov si, serial_interrupt_handler 557 call install_86m_interrupt_handler ; CHG: ax, bx, cx, dx 558 pop dx ; => old segment 559 mov ss, dx ; ! careful, return stack frame is on old stack 560 nop 561 mov ds, dx 562 mov es, dx 563 564 .done_serial: 565 566 %if _CATCHINT2D 567 ; ! ds => old segment 568 testopt [internalflags4], dif4_int_2D_hooked 569 jz .done_2D 570 ; call serial_uninstall_interrupt_handler ; CHG si, ax, dx, di, es 571 mov si, int2D 572 mov al, 2Dh 573 mov dx, opt4_int_2D_force >> 16 574 call UnhookInterruptForce 575 jc @F 576 clropt [internalflags4], dif4_int_2D_hooked 577 call update_inttab_optional 578 ; (NC) 579 @@: 580 ; ! es = ss 581 jnc .rehook_2D ; if it succeeded --> 582 583 pop dx 584 push dx ; => new segment 585 mov ds, dx 586 mov es, dx 587 mov ss, dx 588 nop 589 590 testopt [internalflags4], dif4_int_serial_hooked 591 jz .2D_panic_done_serial 592 call serial_uninstall_interrupt_handler ; CHG si, ax, dx, di, es 593 ; ! es = ss 594 jnc .2D_panic_rehook_serial ; if it succeeded --> 595 jmp moveloader.haltmsg ; panic if this happens 596 597 .2D_panic_rehook_serial: 598 pop dx 599 pop ax 600 push ax 601 push dx 602 mov ds, ax 603 mov es, ax 604 mov ss, ax ; => old segment 605 nop 606 607 mov al, byte [serial_installed_intnum] 608 mov si, serial_interrupt_handler 609 call install_86m_interrupt_handler ; CHG: ax, bx, cx, dx 610 ; new segment will be discarded soon, so do not reset these 611 ; there. but do reset them in old segment now ! 612 setopt [internalflags4], dif4_int_serial_hooked 613 call update_inttab_optional 614 .2D_panic_done_serial: 615 616 mov di, msg.serial_cannot_unhook.int 617 mov al, 2Dh 618 call hexbyte 619 mov dx, msg.serial_cannot_unhook.nowarn 620 call putsz_error 621 mov dx, msg.move_int_panic 622 call putsz_error 623 mov ax, 011Dh 624 call setrc 625 call near [moveloader_undo] 626 jmp cmd3 627 628 .rehook_2D: 629 ; old segment will be discarded soon, so do not reset these 630 ; setopt [internalflags4], dif4_int_2D_hooked 631 ; call update_inttab_optional 632 633 pop dx ; dx => new segment 634 push dx 635 mov ss, dx ; ! need to run on new stack 636 nop 637 push ds ; => old segment 638 mov ds, dx ; ss = ds => new segment 639 mov es, dx ; harden 640 mov al, 2Dh 641 mov si, int2D 642 call install_86m_interrupt_handler ; CHG: ax, bx, cx, dx 643 pop dx ; => old segment 644 mov ss, dx ; ! careful, return stack frame is on old stack 645 nop 646 mov ds, dx 647 mov es, dx 648 649 .done_2D: 650 %endif 651 652 pop dx 653 pop ax 654 pop cx 655 pop bx 656 retn 657 658 659 moveloader_check_serial: 660 mov al, byte [serial_installed_intnum] 661 mov si, serial_interrupt_handler 662 push cx ; (make space) 663 mov di, sp ; es:di -> word on stack 664 call hexbyte ; write byte value as text 665 pop cx ; cx = what to write into error message 666 mov dx, opt4_int_serial_force >> 16 667 %if (opt4_int_serial_force >> 16) == dif4_int_serial_hooked 668 call qq_int_unhook_sim.set_bx_to_dx 669 %else 670 mov bx, dif4_int_serial_hooked 671 call qq_int_unhook_sim 672 %endif 673 674 %if _CATCHINT2D 675 mov al, 2Dh 676 mov si, int2D 677 mov cx, "2D" 678 mov dx, opt4_int_2D_force >> 16 679 %if (opt4_int_2D_force >> 16) == dif4_int_2D_hooked 680 call qq_int_unhook_sim.set_bx_to_dx 681 %else 682 mov bx, dif4_int_2D_hooked 683 call qq_int_unhook_sim 684 %endif 685 %endif 686 retn 687 688 689 ; INP: ss => source 690 ; dx => destination 691 ; cx = EBDA size if relevant 692 ; NC if EBDA is part of destination 693 ; CY if EBDA is part of source 694 ; CHG: ax, cx, si, di, ds, es 695 ; OUT: doesn't return if error 696 ; cx -> code to handle auxbuffer (after entire movp) 697 moveloader_check_dx_destination: 698 push bp 699 push bx 700 push dx 701 702 push ss 703 pop ds 704 push ss 705 pop es 706 707 mov di, 0 ; di = destination adjust = 0 708 mov si, cx ; si = source adjust = EBDA size 709 jc @F 710 xchg di, si ; di = destination adjust = EBDA size 711 @@: 712 713 mov ax, dx ; y start 714 add ax, word [liiAmountParagraphs] ; y end 715 jc .overlap 716 mov cx, ss ; x start 717 mov bx, cx 718 add bx, word [liiAmountParagraphs] ; x end 719 jc .overlap 720 721 sub dx, di ; adjust destination down 722 jc .overlap 723 sub cx, si ; adjust source down 724 jc .overlap 725 726 ; overlap: x end > y start && x start < y end 727 cmp bx, dx 728 jbe @F ; x end is <= y start --> 729 cmp cx, ax 730 jae @F ; x start is >= y end --> 731 .overlap: 732 mov dx, msg.move_overlap 733 mov ax, 0297h 734 jmp .specificerror 735 736 @@: 737 xor bp, bp 738 .serial: 739 call moveloader_check_serial 740 741 mov dx, msg.move_int_error 742 mov ax, 0287h 743 test bp, bp 744 jnz .specificerror 745 746 pop dx 747 push dx 748 749 mov ax, ss 750 mov cx, dx 751 sub cx, ax ; cx = dx - ax 752 ; cx + ax = dx 753 mov bx, word [auxbuff_segorsel] ; bx => auxbuff 754 add bx, cx 755 call moveloader_check_auxbuff 756 jz .ret_nop 757 mov dx, word [code_seg] 758 add dx, cx 759 760 cmp dx, bx 761 je .error 762 jb .auxdown ; if cs < aux, put aux to cs 763 .auxup: ; if cs > aux, put aux to aux + cs size 764 %ifn _LINK 765 add bx, paras(ldebug_code_size + ldebug_code2_size) ; untruncated 766 %else 767 add bx, strict word relocatedzero + 0 ; untruncated 768 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 769 %endif 770 call moveloader_check_auxbuff 771 mov cx, moveloader_auxup 772 jz .ret 773 jmp .error 774 775 .auxdown: 776 mov bx, dx 777 call moveloader_check_auxbuff 778 mov cx, moveloader_auxdown 779 jz .ret 780 781 .error: 782 mov dx, msg.move_auxbuff_error 783 mov ax, 0286h 784 .specificerror: 785 jmp moveloader.specificerror 786 787 .ret_nop: 788 mov cx, moveloader_auxnop 789 .ret: 790 pop dx 791 pop bx 792 pop bp 793 retn 794 795 usesection lDEBUG_DATA_ENTRY 796 align 2, db 0 797 moveloader_undo: dw moveloader_undo_noop 798 usesection lDEBUG_CODE 799 800 801 moveloader_undo_ebda_move: 802 xor ax, ax 803 mov ds, ax 804 mov dx, word [40Eh] 805 mov es, dx 806 mov al, byte [es:0] ; EBDA size in KiB 807 mov cl, 6 808 shl ax, cl 809 mov cx, ax ; cx = EBDA size in paras 810 mov ax, dx ; => EBDA source (moved here previously) 811 add dx, [ss:liiAmountParagraphs] 812 ; => EBDA destination 813 call movp ; move EBDA 814 xor ax, ax 815 mov ds, ax 816 mov word [40Eh], dx ; relocate EBDA segment pointer 817 mov cl, 6 818 shr dx, cl 819 mov word [413h], dx ; relocate memory size in KiB 820 push ss 821 pop es 822 push ss 823 pop ds 824 mov word [moveloader_undo], moveloader_undo_noop 825 moveloader_undo_noop: 826 retn 827 828 829 moveloader: 830 call skipcomma 831 call iseol? 832 je .query 833 dec si 834 mov bx, movetable 835 .loop: 836 mov dx, word [bx + mteIdentifier] 837 test dx, dx 838 jz .error 839 call isstring? 840 je .change 841 add bx, MOVETABLEENTRY_size 842 jmp .loop 843 844 .error: 845 jmp error 846 847 .query: 848 mov al, [currentposition] 849 cmp al, 2 850 ja .error 851 mov ah, MOVETABLEENTRY_size 852 mul ah 853 xchg bx, ax 854 mov dx, word [movetable + bx + mteStatusMessage] 855 jmp putsz 856 857 .change: 858 call skipwhite 859 call chkeol 860 .change_no_line: 861 xor ax, ax 862 mov al, [currentposition] 863 cmp al, 2 864 ja .error 865 add ax, ax 866 xchg si, ax 867 mov word [moveloader_undo], moveloader_undo_noop 868 jmp word [bx + mteFromArray + si] 869 870 .already: 871 mov dx, msg.isalready 872 .statusplus: 873 push ss 874 pop ds 875 call putsz 876 mov dx, [bx + mteStatusMessage] 877 inc dx 878 jmp putsz 879 880 881 ; entry for no EBDA size to consider 882 .mov_zero: 883 xor cx, cx 884 ; INP: dx => destination 885 ; ss => source 886 ; ss => DATA ENTRY STACK segment 887 ; cx = EBDA size if relevant 888 ; NC if EBDA is part of destination 889 ; CY if EBDA is part of source 890 ; OUT: es = ds = ss => destination 891 ; cs => destination code segment 892 ; CHG: ax, cx, dx, si, di, es 893 .mov: 894 call moveloader_check_dx_destination 895 push cx 896 mov ax, ss 897 push ax 898 mov cx, [ss:liiAmountParagraphs] 899 call movp ; move entire program (including stack !) 900 mov cx, dx 901 sub cx, ax ; cx = dx - ax 902 ; cx + ax = dx 903 mov ds, dx ; => destination segment 904 mov si, movesegrefstable 905 @@: 906 lodsw 907 test ax, ax ; end of table ? 908 jz @F 909 xchg di, ax ; ds:di -> segment reference 910 add word [di], cx ; fixup 911 jmp @B 912 913 @@: 914 pop ax ; => old position 915 pop di ; -> function to swap auxbuff/code if needed 916 push dx 917 push ax 918 mov ds, ax 919 mov es, ax 920 call di 921 ; INP: dx => destination 922 ; ax = ds = ss = es => old source 923 ; cs => old code segment 924 ; cx = delta 925 ; CHG: ax, cx, dx, si, di 926 pop ax 927 pop dx 928 call moveloader_rehook_serial 929 930 cmp byte [currentposition], 2 931 jne @F 932 push bx 933 push dx 934 935 mov al, 18h ; interrupt number 936 mov si, intr_loader_18 ; -> IISP entry header 937 mov dx, opt4_int_18_force >> 16 938 %if (opt4_int_18_force >> 16) == dif4_int_18_hooked 939 call cmd3_int_disable.set_bx_to_dx 940 %else 941 mov bx, dif4_int_18_hooked 942 call cmd3_int_disable 943 %endif 944 jnc .18done 945 jz .18done 946 947 .haltmsg: 948 mov dx, msg.move_int_panic 949 call putsz 950 .halt: 951 int3 952 sti 953 hlt 954 jmp .halt 955 956 .18done: 957 mov al, 19h ; interrupt number 958 mov si, intr_loader_19 ; -> IISP entry header 959 mov dx, opt4_int_19_force >> 16 960 %if (opt4_int_19_force >> 16) == dif4_int_19_hooked 961 call cmd3_int_disable.set_bx_to_dx 962 %else 963 mov bx, dif4_int_19_hooked 964 call cmd3_int_disable 965 %endif 966 jnc .19done 967 jz .19done 968 jmp .haltmsg 969 970 .19done: 971 pop dx 972 pop bx 973 974 @@: 975 mov ds, dx 976 mov es, dx 977 mov ss, dx ; => new data entry stack segment 978 nop ; ! near return address must be on new stack 979 clropt [internalflags4], dif4_int_18_hooked | dif4_int_19_hooked 980 ; fix the flags in new segment 981 call update_inttab_optional 982 983 push word [code_seg] 984 call .retf 985 mov al, [bx + mteArrayIndex] 986 mov byte [currentposition], al 987 call moveloader_hook_ints 988 retn 989 990 .retf: 991 retf 992 993 .top_to_bottom: 994 mov dx, 60h 995 call .mov_zero 996 mov dx, msg.isnow 997 call .statusplus 998 retn 999 1000 .hidden_to_bottom: 1001 xor bp, bp 1002 1003 push bx 1004 ; redundant call to find inability early 1005 call moveloader_check_serial 1006 1007 mov al, 18h 1008 mov si, intr_loader_18 1009 mov cx, "18" 1010 mov dx, opt4_int_18_force >> 16 1011 %if (opt4_int_18_force >> 16) == dif4_int_18_hooked 1012 call qq_int_unhook_sim.set_bx_to_dx 1013 %else 1014 mov bx, dif4_int_18_hooked 1015 call qq_int_unhook_sim 1016 %endif 1017 1018 mov al, 19h 1019 mov si, intr_loader_19 1020 mov cx, "19" 1021 mov dx, opt4_int_19_force >> 16 1022 %if (opt4_int_19_force >> 16) == dif4_int_19_hooked 1023 call qq_int_unhook_sim.set_bx_to_dx 1024 %else 1025 mov bx, dif4_int_19_hooked 1026 call qq_int_unhook_sim 1027 %endif 1028 1029 mov dx, msg.move_int_error 1030 mov ax, 0290h 1031 test bp, bp 1032 jnz .specificerror 1033 pop bx 1034 1035 call bootgetmemorysize 1036 int 12h 1037 mov cl, 6 1038 shl ax, cl 1039 cmp ax, dx 1040 %if _LINK_COMPAT 1041 je @F 1042 jmp .error_rpl 1043 @@: 1044 %else 1045 jne .error_rpl 1046 %endif 1047 mov cx, ss 1048 cmp cx, dx 1049 je @F 1050 xor ax, ax 1051 mov ds, ax ; ! ah = 0 1052 cmp word [40Eh], dx 1053 jne .error_nottop 1054 mov ds, dx 1055 mov al, byte [0] ; EBDA size in KiB 1056 mov cl, 6 1057 shl ax, cl 1058 mov cx, ax ; cx = EBDA size in paras 1059 add ax, dx 1060 jc .error_oom 1061 push cx 1062 push dx 1063 mov dx, ss 1064 cmp ax, dx 1065 jne .error_nottop 1066 mov dx, 60h 1067 stc ; cx = EBDA size to account for, source (CY) 1068 call .mov 1069 pop dx 1070 pop cx 1071 mov ax, dx ; => EBDA 1072 add dx, [liiAmountParagraphs] 1073 call movp 1074 xor ax, ax 1075 mov ds, ax 1076 mov word [40Eh], dx 1077 mov cl, 6 1078 shr dx, cl 1079 mov word [413h], dx 1080 mov dx, msg.isnow 1081 call .statusplus 1082 retn 1083 1084 @@: 1085 mov dx, 60h 1086 call .mov_zero 1087 mov dx, word [liiAmountParagraphs] 1088 mov cl, 6 1089 shr dx, cl 1090 xor ax, ax 1091 mov ds, ax 1092 add word [413h], dx 1093 mov dx, msg.isnow 1094 call .statusplus 1095 retn 1096 1097 .bottom_to_top: 1098 call bootgetmemorysize 1099 sub dx, word [liiAmountParagraphs] 1100 call .mov_zero 1101 mov dx, msg.isnow 1102 call .statusplus 1103 retn 1104 1105 .error_rpl: 1106 mov dx, msg.move_rpl 1107 mov ax, 0281h 1108 jmp .specificerror 1109 1110 .error_nottop: 1111 mov dx, msg.move_nottop 1112 mov ax, 0282h 1113 jmp .specificerror 1114 1115 .error_oom: 1116 mov dx, msg.move_oom 1117 mov ax, 0283h 1118 jmp .specificerror 1119 1120 .error_ebdanottop: 1121 mov dx, msg.move_ebdanottop 1122 mov ax, 0284h 1123 jmp .specificerror 1124 1125 .error_toolargeebda: 1126 mov dx, msg.move_toolargeebda 1127 mov ax, 0285h 1128 jmp .specificerror 1129 1130 .hidden_to_top: 1131 .top_to_hidden: 1132 mov dx, msg.unsupportedmove 1133 mov ax, 0280h 1134 .specificerror: 1135 push ss 1136 pop ds 1137 call setrc 1138 call putsz_error 1139 jmp cmd3 1140 1141 .bottom_to_hidden: 1142 call bootgetmemorysize 1143 int 12h 1144 mov cl, 6 1145 shl ax, cl 1146 cmp ax, dx 1147 %if _LINK_COMPAT 1148 je @F 1149 jmp .error_rpl 1150 @@: 1151 %else 1152 jne .error_rpl 1153 %endif 1154 xor ax, ax 1155 mov ds, ax 1156 cmp word [40Eh], 400h ; have an EBDA ? 1157 jb @F 1158 cmp word [40Eh], dx 1159 ja @F 1160 ; MEMDISK can allocate memory *below* the EBDA. 1161 ; just pretend we don't see any EBDA. 1162 jne .error_ebdanottop 1163 mov ds, dx 1164 mov al, byte [0] ; EBDA size in KiB 1165 mov cl, 6 1166 shl ax, cl 1167 mov cx, ax ; cx = EBDA size in paras 1168 add ax, dx ; => behind EBDA 1169 jc .error_toolargeebda 1170 sub ax, [ss:liiAmountParagraphs] 1171 ; => NLDR destination 1172 jc .error_oom 1173 push ax 1174 push cx 1175 push dx 1176 xchg dx, ax 1177 clc ; cx = EBDA size to account for, destination (NC) 1178 call moveloader_check_dx_destination 1179 pop dx 1180 pop cx 1181 mov ax, dx ; => EBDA source 1182 sub dx, [ss:liiAmountParagraphs] 1183 ; => EBDA destination 1184 jc .error_oom 1185 call movp ; move EBDA 1186 push cx 1187 xor ax, ax 1188 mov ds, ax 1189 mov word [40Eh], dx ; relocate EBDA segment pointer 1190 mov cl, 6 1191 shr dx, cl 1192 pop cx 1193 mov word [413h], dx ; relocate memory size in KiB 1194 pop dx 1195 mov word [ss:moveloader_undo], moveloader_undo_ebda_move 1196 clc ; cx = EBDA size to account for, destination (NC) 1197 call .mov ; relocate us 1198 mov dx, msg.isnow 1199 call .statusplus 1200 retn 1201 1202 @@: 1203 sub dx, [ss:liiAmountParagraphs] 1204 ; => NLDR destination 1205 jc .error_oom 1206 push dx 1207 call .mov_zero 1208 pop dx 1209 xor ax, ax 1210 mov ds, ax 1211 mov cl, 6 1212 shr dx, cl 1213 mov word [413h], dx ; relocate memory size in KiB 1214 mov dx, msg.isnow 1215 call .statusplus 1216 retn 1217 %endif 1218 1219 1220 ; M command - move from place to place. 1221 ; 1222 ; First check for machine-related M commands. 1223 ; Those are: M, MNC, M?, MC, MC2, MC3, M [one expression] 1224 ; Move M command has more than one expression. 1225 mm: 1226 %if _LOADER 1227 dec si 1228 dec si 1229 mov dx, msg.move 1230 call isstring? 1231 je moveloader 1232 inc si 1233 lodsb 1234 %endif 0 00007A9D 89F1 mov cx, si ; - 1 -> input 0 00007A9F 56 push si 0 00007AA0 E8[0000] call iseol? 0 00007AA3 7503E9F600 je mc ; no argument, CPU-related M command 0 00007AA8 8A24 mov ah, byte [ si ] 0 00007AAA 50 push ax 0 00007AAB 25DFDF and ax, ~(2020h) 0 00007AAE 3D4E43 cmp ax, "NC" 0 00007AB1 58 pop ax 0 00007AB2 7506 jne @F 0 00007AB4 B9[0100] mov cx, msg.c0 + 1 ; - 1 -> C0 string 0 00007AB7 46 inc si ; skip 'N' 0 00007AB8 EB07 jmp .checkend 1248 1249 @@: 0 00007ABA 3C3F cmp al, '?' 0 00007ABC 7514 jne @F 0 00007ABE B9[0100] mov cx, msg.cr + 1 ; - 1 -> empty string 1253 .checkend: 0 00007AC1 E8[0000] call skipwhite ; skip '?' or 'C' (in "NC") 0 00007AC4 E8[0000] call iseol? 0 00007AC7 7503E9D200 je mc 0 00007ACC 5E pop si 0 00007ACD 56 push si 0 00007ACE 4E dec si 0 00007ACF E8[0000] call skipwhite 1261 @@: 0 00007AD2 56 push si 0 00007AD3 E8[0000] call prephack 0 00007AD6 8B1E[0000] mov bx, word [reg_ds] ; get source range 0 00007ADA E8[0000]EB02[0000] nearcall getaddrX ; just parse an address first 1266 ; Note that valid MC commands allow at most C3h 1267 ; in the expression read here. This must be 1268 ; allowed by this getaddrX call regardless the 1269 ; D/B bit and limit of the ds segment. 1270 ; By using getaddrX here instead of getexpression 1271 ; as previously, we get support for all special 1272 ; cases of address parameters for free. This now 1273 ; includes the single or double dollar sign prefix 1274 ; and also the taken keywords (not previously 1275 ; allowed here). 0 00007AE1 59 pop cx ; - 1 -> input 0 00007AE2 E8[0000] call iseol? 0 00007AE5 7503E9B400 je mc ; one argument, CPU-related 1279 1280 ; bx:(e)dx, si, al are already initialised here. 1281 .mm: 0 00007AEA 5F pop di ; discard si on stack 1283 1284 ; It is a normal M command (Move) 1285 %if _PM 0 00007AEB BF[0000] mov di, getaddr ; second parameter must be writable 1287 %endif 0 00007AEE E8[0000] call parsecm_have_address 1289 ; parse arguments (DS:ESI, ES:EDI, ECX) 0 00007AF1 51 push cx 1291 %if _PM 0 00007AF2 E8[0000] call ispm 0 00007AF5 7543 jnz .rm 0 00007AF7 8CD8 mov ax, ds 0 00007AF9 8CC1 mov cx, es 0 00007AFB 39C8 cmp ax, cx 0 00007AFD 7470 je .pmsimple ; same selector, simple --> 1298 0 00007AFF B80600 mov ax, 0006h 0 00007B02 8CDB mov bx, ds 0 00007B04 CD31 int 31h ; get selector's base 0 00007B06 7303E9[0000] jc error 0 00007B0B 51 push cx 0 00007B0C 52 push dx 0 00007B0D B80600 mov ax, 0006h 0 00007B10 8CC3 mov bx, es 0 00007B12 CD31 int 31h ; get selector's base 0 00007B14 7303E9[0000] jc error ; throw 0 00007B19 36803E[0000]00 cmp byte [ss:bAddr32], 0 0 00007B1F 7430 je .pm16 1311 [cpu 386] 0 00007B21 6658 pop eax 0 00007B23 51 push cx 0 00007B24 52 push dx 0 00007B25 665A pop edx ; mov edx, cxdx 0 00007B27 6601F0 add eax, esi ; add offset to source selector's base 0 00007B2A 0F82[0000] jc error 0 00007B2E 6601FA add edx, edi ; add offset to destination selector's base 0 00007B31 0F82[0000] jc error ; if overflow (> 4 GiB) --> 0 00007B35 6639D0 cmp eax, edx ; compare linear source to linear destination 0 00007B38 EB38 jmp short m3 ; and decide whether to move up or down --> 1322 __CPU__ 1323 1324 .rm: 0 00007B3A 8CD8 mov ax, ds 0 00007B3C 8CDB mov bx, ds 0 00007B3E 8CC2 mov dx, es 0 00007B40 B10C mov cl, 12 0 00007B42 D3EB shr bx, cl 0 00007B44 D3EA shr dx, cl 0 00007B46 52 push dx 0 00007B47 8CC2 mov dx, es 0 00007B49 B104 mov cl, 4 0 00007B4B D3E0 shl ax, cl 0 00007B4D D3E2 shl dx, cl 0 00007B4F 59 pop cx 0 00007B50 A9 db __TEST_IMM16 ; (skip 2 pop instructions) 1338 1339 .pm16: 0 00007B51 58 pop ax 0 00007B52 5B pop bx 0 00007B53 01F0 add ax, si 0 00007B55 83D300 adc bx, byte 0 ; add offset to source selector's base 0 00007B58 7303E9[0000] jc error 0 00007B5D 01FA add dx, di 0 00007B5F 83D100 adc cx, byte 0 ; add offset to destination selector's base 0 00007B62 7303E9[0000] jc error ; if overflow (> 4 GiB) --> 0 00007B67 39CB cmp bx, cx ; compare linear source to linear destination 0 00007B69 7507 jne m3 0 00007B6B 39D0 cmp ax, dx 0 00007B6D EB03 jmp short m3 ; and decide whether to move up or down --> 1352 1353 .pmsimple: 0 00007B6F 66 _386_o32 ; cmp esi, edi 0 00007B70 39FE cmp si, di 1356 %else 1357 mov dx, di 1358 mov bx, es 1359 mov cl, 4 1360 shr dx, cl 1361 add dx, bx ; upper 16 bits of destination 1362 mov ax, si 1363 shr ax, cl 1364 mov bx, ds 1365 add ax, bx 1366 cmp ax, dx 1367 jne m3 ; if we know which is larger 1368 mov ax, si 1369 and al, 0Fh 1370 mov bx, di 1371 and bl, 0Fh 1372 cmp al, bl 1373 %endif 0 00007B72 59 m3: pop cx 0 00007B73 9F lahf 0 00007B74 1E push ds 0 00007B75 06 push es 0 00007B76 16 push ss ; ds := cs 0 00007B77 1F pop ds 0 00007B78 E8[0000] call dohack ; do the interrupt pointer hack 0 00007B7B 07 pop es 0 00007B7C 1F pop ds 0 00007B7D 9E sahf 0 00007B7E 7315 jae .forward ; if forward copy is OK 0 00007B80 66 _386_PM_o32 0 00007B81 01CE add si, cx 0 00007B83 66 _386_PM_o32 0 00007B84 01CF add di, cx ; point both behind data 0 00007B86 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 1390 1391 1392 numdef AMD_ERRATUM_109_WORKAROUND, 1 1393 ; Refer to comment in init.asm init_movp. 1394 1395 %if _AMD_ERRATUM_109_WORKAROUND 0 00007B87 67 _386_PM_a32 0 00007B88 E30B jcxz @FF 0 00007B8A 66 _386_PM_o32 0 00007B8B 83F914 cmp cx, strict byte 20 0 00007B8E 7705 ja @FF 1401 @@: 0 00007B90 67 _386_PM_a32 0 00007B91 A4 movsb 0 00007B92 67 _386_PM_a32 0 00007B93 E2FB loop @B 1406 @@: 1407 %endif 1408 .forward: 0 00007B95 67 _386_PM_a32 0 00007B96 F3A4 rep movsb ; do the move 0 00007B98 67 _386_PM_a32 0 00007B99 A4 movsb ; one more byte (length of zero means 64 KiB. or 4 GiB..) 1413 .was32: 0 00007B9A FC cld ; restore flag 0 00007B9B E9[0000] jmp ee0a ; restore segments and undo the interrupt pointer hack 1416 1417 1418 ; Other M command: set machine type. 1419 ; 1420 ; INP: cx -> numeric input (expression 0..6, C, C0, C2, C3) 1421 ; or cx -> EOL 1422 ; word [ss:sp] = to discard 1423 mc: 0 00007B9E 89CE mov si, cx 0 00007BA0 5A pop dx ; discard 0 00007BA1 4E dec si 0 00007BA2 E8[0000] call skipwhite ; reload 0 00007BA5 E8[0000] call iseol? 0 00007BA8 7464 je mquery ; if just an M or M? (query machine type) --> 0 00007BAA E8[0000]EB02[0000] nearcall getbyte ; get numeric input 0 00007BB1 E8[0000] call chkeol ; insure valid 0 00007BB4 92 xchg ax, dx 0 00007BB5 3C06 cmp al, 6 0 00007BB7 7725 ja mc_fpu 1435 1436 mc_cpu: 0 00007BB9 A2[0000] mov byte [machine], al ; set machine type 0 00007BBC A2[0000] mov byte [mach_87], al ; coprocessor type, too 1439 1440 mc_encode: 0 00007BBF 803E[0000]00 cmp byte [has_87], 0 0 00007BC4 B0C0 mov al, 0C0h 0 00007BC6 7412 je .done 0 00007BC8 803E[0000]03 cmp byte [machine], 3 0 00007BCD B00C mov al, 0Ch 0 00007BCF 7509 jne .done 0 00007BD1 803E[0000]02 cmp byte [mach_87], 2 0 00007BD6 7502 jne .done 0 00007BD8 B0C2 mov al, 0C2h 1450 .done: 0 00007BDA A2[0000] mov byte [encodedmach87], al 0 00007BDD C3 retn 1453 1454 mc_fpu: 0 00007BDE 8A26[0000] mov ah, byte [machine] 0 00007BE2 3C0C cmp al, 0Ch ; MC command ? 0 00007BE4 741D je mcc_ah 0 00007BE6 3CC0 cmp al, 0C0h ; MC0 command or MNC command ? 0 00007BE8 7410 je mnc 0 00007BEA 80FC03 cmp ah, 3 ; MC2 or MC3 only valid for machine 386 0 00007BED 7508 jne .error 0 00007BEF 3CC2 cmp al, 0C2h ; MC2 command ? 0 00007BF1 740E je mcc_2 0 00007BF3 3CC3 cmp al, 0C3h ; MC3 command ? 0 00007BF5 740C je mcc_3 ; (ah = 3) 1466 .error: ; invalid input 0 00007BF7 E9[0000] jmp error 1468 1469 mnc: 0 00007BFA C606[0000]00 mov byte [has_87], 0 ; clear coprocessor flag 0 00007BFF EBBE jmp mc_encode ; done 1472 1473 mcc_2: 0 00007C01 B402 mov ah, 2 ; set type to 287 1475 mcc_3: ; (if jumping here ah = 3) set type to 387 1476 mcc_ah: 0 00007C03 C606[0000]01 mov byte [has_87], 1 ; set coprocessor flag 0 00007C08 8826[0000] mov byte [mach_87], ah ; set coprocessor type 0 00007C0C EBB1 jmp mc_encode ; done 1480 1481 1482 ; Display machine type. 1483 mquery: 0 00007C0E BE[0000] mov si, msg8088 0 00007C11 A0[0000] mov al, byte [machine] 0 00007C14 3C00 cmp al, 0 0 00007C16 7407 je .88or86 ; if 8088 0 00007C18 BE[0000] mov si, msgx86 0 00007C1B 0430 add al, '0' 0 00007C1D 8804 mov byte [si], al 1491 .88or86: 0 00007C1F E8[0000] call showstring 0 00007C22 BE[0000] mov si, no_copr 0 00007C25 803E[0000]00 cmp byte [has_87], 0 0 00007C2A 740F je .m12 ; if no coprocessor 0 00007C2C BE[0000] mov si, has_copr 0 00007C2F A0[0000] mov al, byte [mach_87] 0 00007C32 3A06[0000] cmp al, byte [machine] 0 00007C36 7403 je .m12 ; if has coprocessor same as processor 0 00007C38 BE[0000] mov si, has_287 1501 .m12: 0 00007C3B E8[0000] call showstring ; show string 0 00007C3E E9[0000] jmp putsline_crlf ; call puts and quit === Trace listing source: ../lst/csx.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 VERSIONMAC 1 <1> %define _VERSION " (2026-09-22)" 19 %include REVISIONMAC 1 <1> %define _REVISIONID 'hg b682c54d515e+ (6933 ancestors)' 2 <1> %define _REVISIONID_LMACROS 'Uses lmacros: Revision ID hg d97d2f18336a (169 ancestors)',13,10 3 <1> %define _REVISIONID_INSTSECT '' 4 <1> %define _REVISIONID_SYMSNIP 'Uses symsnip: Revision ID hg bdde2ad965fc (424 ancestors)',13,10 5 <1> %define _REVISIONID_SCANPTAB 'Uses scanptab: Revision ID hg 575fa89fd671 (31 ancestors)',13,10 6 <1> %define _REVISIONID_INICOMP 'Uses inicomp: Revision ID hg 8cf6e1fdb4a3 (786 ancestors)',13,10 7 <1> %define _REVISIONID_INICHECK 'Uses inicheck: Revision ID hg 99649f7ba4e5 (56 ancestors)',13,10 8 <1> %define _REVISIONID_LDOSBOOT 'Uses ldosboot: Revision ID hg 29cd20bfd32e (1026 ancestors)',13,10 20 %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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00002844 ???????? eldhSignature: resb 4 ; "ELD1" 0 00002848 ?????? resb 3 ; reserved 0 0000284B ?? resb 1 ; 26 (Ctrl-Z) 0 0000284C ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00002850 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00002852 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00002854 ???????? eldhDataOffset: resd 1 0 00002858 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 0000285A ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 0000285C ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000285E ???????? eldhReserved: resb 4 ; reserved 0 00002862 ???? 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 00002864 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00002868 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 0000286C ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00002870 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00002844 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 0000284C ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00002850 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00002852 ???? 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 00002844 ???? 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 00002846 ???? eldltAmount: resw 1 0 00002848 ???????? 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 00002844 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00002846 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00002848 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 0000284A ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 0000284C ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00002854 ???? 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 00002844 ???? eldlSignature: resw 1 ; 0E1D1h 0 00002846 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00002848 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 0000284A ???? eldlUseLinkHash: resw 1 0 0000284C ???? eldlDataAmount: resw 1 0 0000284E ???? eldlDataPrefixes: resw 1 0 00002850 ???? eldlDataEntries: resw 1 0 00002852 ???? eldlDataAddresses: resw 1 0 00002854 ???? eldlCodeAmount: resw 1 0 00002856 ???? eldlCodePrefixes: resw 1 0 00002858 ???? eldlCodeEntries: resw 1 0 0000285A ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 0000285C ???? eldlDualAmount: resw 1 0 0000285E ???? eldlDualPrefixes: resw 1 0 00002860 ???? eldlDualEntries: resw 1 0 00002862 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00002844 ???? ifKeyword: resw 1 0 00002846 ???? ifDescription: resw 1 0 00002848 ???? ifOptions: resw 1 0 0000284A ???? ifValue: resw 1 0 0000284C ???? ifTrying: resw 1 0 0000284E ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00002844 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00002848 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 0000284C ???? smName1: resw 1 ; -> first string part 0 0000284E ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00002850 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00002852 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00002854 ???? smBaseNext: resw 1 0 00002856 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00002858 ???? smSpecialNext: resw 1 0 0000285A ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00002844 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00002845 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00002846 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00002844 ???? shHash: resw 1 ; hash value 0 00002846 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00002844 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00002848 ???? xmsmSourceHandle: resw 1 0 0000284A ???????? xmsmSourceAddress: resd 1 0 0000284E ???? xmsmDestHandle: resw 1 0 00002850 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 21 %endif 22 23 24 numdef LZEXEDAT, 0 25 26 %if _MESSAGESEGMENT 27 %define usemessagesegment hiddenusesection MESSAGESEGMENT 28 %else 29 %define usemessagesegment hiddenusesection lDEBUG_DATA_ENTRY 30 %endif 31 32 %define MESSAGE_INLINE 1 33 34 %if _HELP_EXTERNAL && _HELP_COMPRESSED 35 %imacro helppage 1-2 36 %defstr %%basename %1 37 %if _LZEXEDAT 38 %strcat %%includename %%basename, ".hlz" 39 %else 40 %strcat %%includename %%basename, ".hhs" 41 %endif 42 align 2, db 0 43 %00: 44 dw %%end - %%start 45 %%start: 46 incbin %%includename 47 %%end: 48 %endmacro 49 %elif _HELP_EXTERNAL 50 %imacro helppage 1-2 0 51 %defstr %%basename %1 52 %strcat %%includename %%basename, ".txt" 53 %00: 54 incbin %%includename 55 %ifn %2 56 asciz 57 %endif 58 %endmacro 59 %else 60 %imacro helppage 1-2 0 61 %defstr %%basename %1 62 %strcat %%includename "help/", %%basename, ".asm" 63 %00: 64 %include %%includename 65 %ifn %2 66 asciz 67 %endif 68 %endmacro 69 %endif 70 71 72 %if _ELDLINKINFO 73 usemessagesegment === Switch to base=009D80h -> "MESSAGESEGMENT" 73 ------------------ note: usesection MESSAGESEGMENT 74 %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> %define LINKINFO_DUALCODE_PREFIXES "" 143 <1> %define LINKINFO_DUALCODE_ENTRIES "" 144 <1> %define LINKINFO_DUALCODE_ADDRESSES "" 145 <1> %assign LINKINFO_DUALCODE_AMOUNT 0 146 <1> 147 <1> %imacro linkinfo_dualcode 1-*.nolist 148 <1> %rep %0 149 <1> linkinfo_dualcode_as %1, %1 150 <1> %rotate 1 151 <1> %endrep 152 <1> %endmacro 153 <1> 154 <1> %imacro linkinfo_dualcode_as 2.nolist 155 <1> %push 156 <1> %if LINKINFO_CODE_SEGMENT == 0 157 <1> %define %$section lDEBUG_CODE 158 <1> %elif LINKINFO_CODE_SEGMENT == 1 159 <1> %define %$section lDEBUG_CODE2 160 <1> %elif LINKINFO_CODE_SEGMENT == 2 161 <1> %define %$section lDEBUG_DATA_ENTRY 162 <1> %else 163 <1> %fatal Unknown link info code section 164 <1> %endif 165 <1> %ifndef SECTION_OF_%2 166 <1> %error No section specified for link symbol %1 167 <1> %elifnidni SECTION_OF_%2, %$section 168 <1> %error Wrong section for link symbol %1: section_of=SECTION_OF_%1, current=%$section 169 <1> %endif 170 <1> %ifstr %1 171 <1> %xdefine %$string %1 172 <1> %define %$token %%token 173 <1> %else 174 <1> %defstr %$string %1 175 <1> %xdefine %$token %1 176 <1> %endif 177 <1> %ifn _LINKHASH 178 <1> %substr %$prefix %$string 1, 2 179 <1> %substr %$suffix %$string 3, -1 180 <1> %strlen %$length %$string 181 <1> %if %$length < 2 182 <1> %fatal Too short link info code name 183 <1> %endif 184 <1> %if %$length > 63 + 2 185 <1> %fatal Too long link info code name 186 <1> %endif 187 <1> %xdefine LINKINFO_DUALCODE_PREFIXES LINKINFO_DUALCODE_PREFIXES, %$prefix 188 <1> %xdefine LINKINFO_DUALCODE_ENTRIES LINKINFO_DUALCODE_ENTRIES, %%message_%[%$token] 189 <1> %xdefine LINKINFO_DUALCODE_ADDRESSES LINKINFO_DUALCODE_ADDRESSES, %2, LINKINFO_CODE_SEGMENT + 10h 190 <1> %xdefine LINKINFO_CODE_MESSAGES LINKINFO_CODE_MESSAGES, %%message_%[%$token]:, {counted %$suffix} 191 <1> %else 192 <1> %xdefine %$suffix %$string 193 <1> hashdef HASH, %$string 194 <1> %strlen %$length %$string 195 <1> %if %$length > 63 + 2 196 <1> %fatal Too long link info code name 197 <1> %endif 198 <1> %xdefine LINKINFO_DUALCODE_PREFIXES LINKINFO_DUALCODE_PREFIXES, _HASH 199 <1> %xdefine LINKINFO_DUALCODE_ENTRIES LINKINFO_DUALCODE_ENTRIES, %%message_%[%$token] 200 <1> %xdefine LINKINFO_DUALCODE_ADDRESSES LINKINFO_DUALCODE_ADDRESSES, %2, LINKINFO_CODE_SEGMENT + 10h 201 <1> %xdefine LINKINFO_CODE_MESSAGES LINKINFO_CODE_MESSAGES, %%message_%[%$token]:, {counted %$suffix} 202 <1> %endif 203 <1> %assign LINKINFO_DUALCODE_AMOUNT LINKINFO_DUALCODE_AMOUNT + 1 204 <1> %pop 205 <1> %endmacro 206 <1> 207 <1> 208 <1> %imacro dump_linkinfo_messages 1-*.nolist 209 <1> %rep %0 210 <1> %1 211 <1> %rotate 1 212 <1> %endrep 213 <1> %endmacro 214 <1> 215 <1> 216 <1> %if _MESSAGESEGMENT 217 <1> %if _PM 218 <1> linksel equ messagesel 219 <1> %else 220 <1> linksel equ linkseg 221 <1> %endif 222 <1> linkseg equ messageseg 223 <1> %else 224 <1> %if _PM 225 <1> linksel equ dssel 226 <1> %else 227 <1> linksel equ linkseg 228 <1> %endif 229 <1> linkseg equ pspdbg 230 <1> %endif 231 <1> 232 <1> linkinfo_data linksel 233 <1> linkinfo_data linkseg 234 <1> linkinfo_data linkinfoaddress 235 <1> linkinfo_data linkcall_table 236 <1> linkinfo_data extseg, extcssel, extdssel, extseg_size, extseg_used 237 <1> linkinfo_data extdata, extdata_size, extdata_used 238 <1> linkinfo_data pspdbg 239 <1> %if !_LOADER 240 <1> linkinfo_data pspdbe 241 <1> %endif 242 <1> %ifn _LINK 243 <1> %ifn _PM 244 <1> dssel equ pspdbg 245 <1> %endif 246 <1> %endif 247 <1> linkinfo_data dssel 248 <1> %if _PM 249 <1> linkinfo_data cssel 250 <1> %if !_LOADER 251 <1> linkinfo_data code_sel 252 <1> %if _DUALCODE 253 <1> linkinfo_data code2_sel 254 <1> %endif 255 <1> %else 256 <1> linkinfo_data_as code_movable_sel, code_sel 257 <1> %if _DUALCODE 258 <1> linkinfo_data_as code2_movable_sel, code2_sel 259 <1> %endif 260 <1> %endif 261 <1> %if _MESSAGESEGMENT 262 <1> linkinfo_data messagesel 263 <1> %endif 264 <1> %endif 265 <1> linkinfo_data internalflags 266 <1> linkinfo_data internalflags2 267 <1> linkinfo_data internalflags3 268 <1> linkinfo_data internalflags4 269 <1> linkinfo_data internalflags5 270 <1> linkinfo_data internalflags6 271 <1> linkinfo_data internalflags7 272 <1> linkinfo_data options 273 <1> linkinfo_data options2 274 <1> linkinfo_data options3 275 <1> linkinfo_data options4 276 <1> linkinfo_data options5 277 <1> linkinfo_data options6 278 <1> linkinfo_data options7 279 <1> linkinfo_data lastcmd 280 <1> linkinfo_data line_in, line_in.end, line_out, line_out_end 281 <1> %if !_LOADER 282 <1> linkinfo_data auxbuff_segorsel 283 <1> linkinfo_data auxbuff_current_size, auxbuff_current_size_minus_24 284 <1> %else 285 <1> linkinfo_data_as auxbuff_movable_segorsel, auxbuff_segorsel 286 <1> linkinfo_data_as auxbuff_movable_current_size, auxbuff_current_size 287 <1> linkinfo_data_as auxbuff_movable_current_size_minus_24, auxbuff_current_size_minus_24 288 <1> %endif 289 <1> %if !_LOADER 290 <1> linkinfo_data firstmcb, firstumcb 291 <1> %endif 292 <1> linkinfo_data msg.install, msg.uninstall, msg.run 293 <1> linkinfo_data entryseg_size 294 <1> %if _MESSAGESEGMENT 295 <1> linkinfo_data messageseg, messageseg_size 296 <1> %endif 297 <1> %if !_LOADER 298 <1> linkinfo_data code_seg, code_size 299 <1> %if _DUALCODE 300 <1> linkinfo_data code2_seg, code2_size 301 <1> %endif 302 <1> %else 303 <1> linkinfo_data_as code_movable_seg, code_seg 304 <1> linkinfo_data_as code_movable_size, code_size 305 <1> %if _DUALCODE 306 <1> linkinfo_data_as code2_movable_seg, code2_seg 307 <1> linkinfo_data_as code2_movable_size, code2_size 308 <1> %endif 309 <1> %endif 310 <1> %if !_LOADER 311 <1> linkinfo_data auxbuff_segment, auxbuff_current_size 312 <1> %else 313 <1> linkinfo_data_as auxbuff_movable_segment, auxbuff_segment 314 <1> linkinfo_data_as auxbuff_movable_current_size, auxbuff_current_size 315 <1> %endif 316 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 317 <1> linkinfo_data history_segment, historyseg_size 318 <1> %endif 319 <1> %if _PM 320 <1> auxbuff_segment equ auxbuff_segorsel + soaSegment 321 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 322 <1> history_segment equ history.segorsel + soaSegment 323 <1> %endif 324 <1> %else 325 <1> auxbuff_segment equ auxbuff_segorsel 326 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 327 <1> history_segment equ history.segorsel 328 <1> %endif 329 <1> %endif 330 <1> %if _APP_ENV_SIZE || _DEV_ENV_SIZE || _BOOT_ENV_SIZE 331 <1> linkinfo_data envseg, env_size 332 <1> %endif 333 <1> linkinfo_data alloc_seg, alloc_size 334 <1> %if !_LOADER 335 <1> linkinfo_data next_reserved_segment, alloc_size_not_reserved, reserved_address 336 <1> %endif 337 <1> %if _HISTORY 338 <1> %if _HISTORY_SEPARATE_FIXED 339 <1> historyformat equ 2 340 <1> linkinfo_data history.segorsel 341 <1> %else 342 <1> historyformat equ 1 343 <1> linkinfo_data historybuffer 344 <1> linkinfo_data historybuffer.end 345 <1> %endif 346 <1> linkinfo_data history.first 347 <1> linkinfo_data history.last 348 <1> %else 349 <1> historyformat equ 0 350 <1> %endif 351 <1> linkinfo_data historyformat 352 <1> linkinfo_data stack, stack_end 353 <1> linkinfo_data ext_command_handler, ext_inject_handler, savesp, throwsp 354 <1> linkinfo_data ext_preprocess_handler, ext_puts_handler 355 <1> linkinfo_data ext_puts_copyoutput_handler 356 <1> %if _EXT_PUTS_GETLINE 357 <1> linkinfo_data ext_puts_getline_handler 358 <1> %endif 359 <1> %if !_LOADER 360 <1> linkinfo_data ext_aa_before_getline_handler 361 <1> linkinfo_data ext_aa_inject_handler 362 <1> linkinfo_data ext_aa_after_getline_handler 363 <1> %endif 364 <1> %if _CATCHINT2D 365 <1> linkinfo_data ext_amis_handler 366 <1> linkinfo_data amis_multiplex_number 367 <1> %endif 368 <1> linkinfo_data try_debugger_amis_multiplex_number 369 <1> linkinfo_data msg.in, lastcmd 370 <1> %if !_LOADER 371 <1> linkinfo_data firstmcb, firstumcb 372 <1> %endif 373 <1> linkinfo_data dpmi32 374 <1> linkinfo_data lastcmd_transfer_ext_address 375 <1> linkinfo_data lastcmd_transfer_ext_entry ; (not actually data but need it) 376 <1> linkinfo_data dmycmd ; (not actually data but need it) 377 <1> linkinfo_data has_87 378 <1> %if _MMXSUPP 379 <1> linkinfo_data has_mmx 380 <1> %endif 381 <1> linkinfo_data installflags, installformat 382 <1> linkinfo_data reg_eax, reg_ecx, reg_edx, reg_ebx, reg_esp, reg_ebp 383 <1> linkinfo_data reg_esi, reg_edi, reg_efl, reg_eip, reg_cs, reg_ds 384 <1> linkinfo_data reg_ss, reg_es, reg_fs, reg_gs 385 <1> linkinfo_data msg.not, msg.then 386 <1> %if _EXTENSIONS && _EXT_VARIABLES 387 <1> linkinfo_data ext_var, ext_var_amount, ext_var_format, ext_var_size 388 <1> linkinfo_data isvariable_morebyte_nameheaders.ext 389 <1> linkinfo_data var_ext_setup ; (not actually data) 390 <1> %endif 391 <1> linkinfo_data ext_handle 392 <1> linkinfo_data near_transfer_ext_entry ; not actually data 393 <1> linkinfo_data near_transfer_ext_address 394 <1> %if _BOOTLDR 395 <1> linkinfo_data load_data_lowest, load_data 396 <1> linkinfo_data load_yyname_input 397 <1> linkinfo_data handle_scan_dir_entry, handle_scan_dir_not_found 398 <1> linkinfo_data ..@boot_scan_dir_return_filenotfound ; not actually data 399 <1> linkinfo_data ..@boot_scan_dir_return_subdir_or_fat32_entry ; not actually data 400 <1> linkinfo_data ..@boot_scan_dir_return_fat16_root_entry ; not actually data 401 <1> linkinfo_data scan_dir_entry ; not actually data 402 <1> linkinfo_data load_check_dir_attr 403 <1> linkinfo_data load_yyname_next 404 <1> linkinfo_data load_yy_direntry 405 <1> linkinfo_data load_kernel_name 406 <1> linkinfo_data load_adr_dirbuf_segment 407 <1> %endif 408 <1> %if !_LOADER 409 <1> linkinfo_data execblk.cmdline 410 <1> %endif 411 <1> %if _CONFIG 412 <1> linkinfo_data configpath, configpath.dir_end 413 <1> linkinfo_data scriptspath, scriptspath.dir_end 414 <1> %endif 415 <1> build_option_PM equ !!_PM 416 <1> linkinfo_data build_option_PM 417 <1> linkinfo_data cmd3, cmd3_not_ext, puts_ext_done, puts_ext_next 418 <1> linkinfo_data puts_copyoutput_ext_done 419 <1> %if _EXT_PUTS_GETLINE 420 <1> linkinfo_data puts_getline_ext_done 421 <1> linkinfo_data in_getinput 422 <1> %endif 423 <1> linkinfo_data cmd3_preprocessed, cmd3_not_inject, cmd3_injected 424 <1> %if !_LOADER 425 <1> linkinfo_data aa_not_inject, aa_injected 426 <1> linkinfo_data aa_before_getline, aa_after_getline 427 <1> %endif 428 <1> linkinfo_data while_buffer, while_buffer.end, swch1 429 <1> linkinfo_data_as internalflags_with_tt_while, internalflags 430 <1> linkinfo_data yy_is_script 431 <1> linkinfo_data terminator_in_line_in.offset 432 <1> linkinfo_data terminator_in_line_in.value 433 <1> linkinfo_data ext_finish.bp_is_set 434 <1> linkinfo_data vregs, vregs.amount 435 <1> %if _DT 436 <1> linkinfo_data asciitablenames 437 <1> %endif 438 <1> linkinfo_data pm_2_86m_0 439 <1> %if _BOOTLDR 440 <1> linkinfo_data load_unit_flags 441 <1> %endif 442 <1> %if !_LOADER 443 <1> linkinfo_data sss_silent_count_used, sss_silent_count, search_results, sscounter 444 <1> linkinfo_data search_results_amount 445 <1> %endif 446 <1> linkinfo_data patcharea_run, patcharea_run.size, patcharea_run.segment 447 <1> %if !_LOADER 448 <1> linkinfo_data patcharea_intrtn, patcharea_intrtn.size, patcharea_intrtn.segment 449 <1> %endif 450 <1> %if _PM 451 <1> linkinfo_data patcharea_pm_exc, patcharea_pm_exc.size, patcharea_pm_exc.segment 452 <1> %endif 453 <1> linkinfo_data promptlen 454 <1> linkinfo_data indirect_array_errfix 455 <1> linkinfo_data priorrc, rc 456 <1> %if _BOOTLDR 457 <1> linkinfo_data boot_init_foundname 458 <1> %endif 459 <1> %if _DEVICE 460 <1> linkinfo_data device_quittable_regs, device_header_address 461 <1> %endif 462 <1> %if _EXECUTABLE 463 <1> linkinfo_data init_executable_pathname, init_executable_pathname.end 464 <1> %endif 465 <1> %if _COMLEVELS 466 <1> linkinfo_data ext_comlevels_handler 467 <1> %endif 468 <1> linkinfo_data near_transfer_ext_return 469 <1> linkinfo_data msg.sof, msg.eof, msg.goto_not_found.1, msg.goto_not_found.2 470 <1> linkinfo_data msg.goto_empty 471 <1> linkinfo_data getrange_lines 472 <1> ;linkinfo_data 473 <1> 474 <1> 475 <1> %assign LINKINFO_CODE_SEGMENT 0 ; CODE1 476 <1> linkinfo_code puts, putsz, putc, putsline, putsline_crlf, trimputs 477 <1> linkinfo_code skipcomma, skipcomm0, skipwhite, skipwh0 478 <1> linkinfo_code isstring?, capitalise, chkeol, iseol?, iseol?.notsemicolon 479 <1> linkinfo_code_as "uppercase", capitalise 480 <1> linkinfo_code guard_auxbuff, guard_re, prephack, dohack, unhack 481 <1> linkinfo_code handle_serial_flags_ctrl_c 482 <1> linkinfo_code hexnyb, hexbyte, hexword, hexword_high, decword, decdword 483 <1> linkinfo_code dec_dword_minwidth 484 <1> linkinfo_code ispm, setes2dx, call_int2D 485 <1> linkinfo_code copy_single_counted_string 486 <1> linkinfo_code intchk 487 <1> linkinfo_code IsIISPEntry? 488 <1> linkinfo_code disp_dxax_times_cx_width_bx_size.store 489 <1> linkinfo_code cmd3, cmd3_not_ext, puts_ext_done, puts_ext_next 490 <1> linkinfo_code puts_copyoutput_ext_done 491 <1> %if _EXT_PUTS_GETLINE 492 <1> linkinfo_code puts_getline_ext_done 493 <1> %endif 494 <1> linkinfo_code cmd3_preprocessed, cmd3_not_inject, cmd3_injected 495 <1> linkinfo_code error 496 <1> linkinfo_code setds2si, setds2bx 497 <1> %if _PM 498 <1> linkinfo_code intcall_ext_return_es 499 <1> %endif 500 <1> linkinfo_code dd_store 501 <1> linkinfo_code InDOS, _doscall 502 <1> %if !_LOADER 503 <1> linkinfo_code yy_dos_parse_name 504 <1> %endif 505 <1> linkinfo_code yy_open_file, yy_check_lfn 506 <1> linkinfo_code yy_common_parse_name 507 <1> linkinfo_code yy_common_parse_name_bx_buffer 508 <1> linkinfo_code retry_open_scriptspath 509 <1> linkinfo_code near_transfer_ext_return 510 <1> %if _BOOTLDR 511 <1> linkinfo_code yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 512 <1> linkinfo_code_as yy_boot_parse_name2, yy_boot_parse_name 513 <1> linkinfo_code yy_boot_parse_name_bx_buffer 514 <1> linkinfo_code_as yy_boot_open_file2, yy_boot_open_file 515 <1> linkinfo_code scan_dir_aux, read_sector 516 <1> linkinfo_code_as yy_boot_init_dir2, yy_boot_init_dir 517 <1> linkinfo_code got_yyentry, scan_dir_entry 518 <1> linkinfo_code ..@yy_filename_empty 519 <1> linkinfo_code boot_parse_fn 520 <1> linkinfo_code init_bootcmd 521 <1> %endif 522 <1> linkinfo_code close_ext 523 <1> linkinfo_code yy_reset_buf 524 <1> %if !_LOADER 525 <1> linkinfo_code aa_not_inject, aa_injected 526 <1> linkinfo_code aa_before_getline, aa_after_getline 527 <1> %endif 528 <1> linkinfo_code doscall_extseg 529 <1> linkinfo_code test_d_b_bit, test_high_limit 530 <1> linkinfo_code setrc 531 <1> linkinfo_code skipequals 532 <1> %if !_LOADER 533 <1> %if _COUNT || _SCOUNT 534 <1> linkinfo_code count_store 535 <1> %endif 536 <1> %endif 537 <1> linkinfo_code hexdword 538 <1> %if _LOADER 539 <1> linkinfo_code loader_get_resident_address, loader_prepare_resident 540 <1> %endif 541 <1> linkinfo_code verifysegm_or_error, verifysegm 542 <1> linkinfo_code disp_al, disp_ax_hex, disp_al_hex, disp_al_nybble_hex 543 <1> linkinfo_code disp_ax_dec 544 <1> %if _COMLEVELS 545 <1> linkinfo_code call_comlevel_bx_ax 546 <1> %endif 547 <1> linkinfo_code resetrc 548 <1> %if _EXTENSIONS || _PM 549 <1> linkinfo_dualcode push_if, pop_if 550 <1> %endif 551 <1> %if _PM 552 <1> linkinfo_dualcode intcall_return_parameter_es_parameter_ds, intcall 553 <1> %endif 554 <1> %ifidni dual2distance, dualdistance 555 <1> linkinfo_dualcode _doscall_return_es, _doscall_return_es_parameter_es_ds 556 <1> %endif 557 <1> ;linkinfo_code 558 <1> 559 <1> %if _DUALCODE && _EXPRDUALCODE 560 <1> %assign LINKINFO_CODE_SEGMENT 1 ; CODE2 561 <1> %else 562 <1> %assign LINKINFO_CODE_SEGMENT 0 ; CODE1 563 <1> %endif 564 <1> linkinfo_code isvariable?, isseparator?, get_value_range 565 <1> linkinfo_code getexpression, getdword, getword, getbyte 566 <1> linkinfo_code getaddr, getaddrX, getrange, getrangeX 567 <1> linkinfo_code get_length_keyword, getnyb 568 <1> linkinfo_code isoperator?, ..@call_operator_dispatchers 569 <1> %if _EXTENSIONS && _EXT_VARIABLES 570 <1> linkinfo_code var_ext_setup_done 571 <1> %endif 572 <1> linkinfo_code getstr 573 <1> linkinfo_code get_length 574 <1> linkinfo_code get_length.lines 575 <1> linkinfo_code stack_check.internal 576 <1> %if _EXTENSIONS || _PM 577 <1> linkinfo_dualcode save_scratchsel, restore_scratchsel 578 <1> %endif 579 <1> ;linkinfo_code 580 <1> 581 <1> %if _SYMBOLIC 582 <1> %if _DUALCODE && _SYMBOLSASMDUALCODE 583 <1> %assign LINKINFO_CODE_SEGMENT 1 ; CODE2 584 <1> %else 585 <1> %assign LINKINFO_CODE_SEGMENT 0 ; CODE1 586 <1> %endif 587 <1> 588 <1> linkinfo_code binsearchhash, binsearchmain 589 <1> %if _SECOND_SLICE && (_XMS_SYMBOL_TABLE || _BUFFER_86MM_SLICE) 590 <1> linkinfo_code check_second_slice 591 <1> %endif 592 <1> linkinfo_code disp_size_hash, disp_size_main, disp_size_str 593 <1> linkinfo_code getstring1, getstring2 594 <1> linkinfo_code increment_ss_ref_count 595 <1> linkinfo_code list_sym_storage_usage, str_index_to_pointer 596 <1> linkinfo_code zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 597 <1> linkinfo_code zz_compact_expand_check_xms 598 <1> linkinfo_code zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 599 <1> linkinfo_code zz_delete_string, zz_expand, zz_expand_common 600 <1> linkinfo_code zz_get_symstr_length_bytes 601 <1> linkinfo_code zz_get_symstr_length_bytes.ssLength_in_cx 602 <1> linkinfo_code zz_get_symstr_length_indices 603 <1> linkinfo_code zz_get_symstr_length_indices.ssLength_in_cx 604 <1> linkinfo_code zz_hash, zz_hash.bx_init 605 <1> linkinfo_code zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 606 <1> linkinfo_code zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 607 <1> linkinfo_code zz_unlink_main_next 608 <1> %endif 609 <1> 610 <1> %assign LINKINFO_CODE_SEGMENT 2 ; ENTRY 611 <1> linkinfo_code entry_retn 612 <1> ;linkinfo_code 613 <1> 614 <1> 615 <1> %assign LINKINFO_CODE_SEGMENT 1 ; CODE2 616 <1> %if _DUALCODE 617 <1> linkinfo_dualcode bu_relocated 618 <1> %endif 619 <1> 620 <1> %assign LINKINFO_CODE_SEGMENT 0 ; CODE1 621 <1> %if _DUALCODE 622 <1> linkinfo_dualcode code2_to_code_ret_to_ext 623 <1> %endif 624 <1> %if _PM 625 <1> %ifn _SYMBOLIC 626 <1> linkinfo_dualcode selector_to_segment 627 <1> %endif 628 <1> linkinfo_dualcode push_cxdx_or_edx 629 <1> %endif 630 <1> %if _DUALCODE && _EXPRDUALCODE 631 <1> linkinfo_dualcode ..@hh_readmem 632 <1> %endif 633 <1> 634 <1> %assign LINKINFO_CODE_SEGMENT 1 ; CODE2 635 <1> %if _RN 636 <1> linkinfo_dualcode FloatToStr 637 <1> %endif 638 <1> 639 <1> %if _IMMASM && _DUALCODE 640 <1> linkinfo_dualcode immasm_relocated 641 <1> %endif 642 <1> 643 <1> %if _SYMBOLIC 644 <1> %if _DUALCODE && _SYMBOLSASMDUALCODE 645 <1> %assign LINKINFO_CODE_SEGMENT 1 ; CODE2 646 <1> %else 647 <1> %assign LINKINFO_CODE_SEGMENT 0 ; CODE1 648 <1> %endif 649 <1> %if _PM 650 <1> linkinfo_dualcode selector_to_segment 651 <1> %endif 652 <1> linkinfo_dualcode zz_list_symbol 653 <1> 654 <1> linkinfo_dualcode anti_normalise_pointer_with_displacement_bxcx, displaystring 655 <1> linkinfo_dualcode getfarpointer.hash, getfarpointer.main, getfarpointer.str 656 <1> linkinfo_dualcode move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 657 <1> linkinfo_dualcode move_delete_farpointer.main, move_delete_farpointer.str.sidi 658 <1> linkinfo_dualcode move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 659 <1> linkinfo_dualcode move_insert_farpointer.main, move_insert_farpointer.main.sidi 660 <1> linkinfo_dualcode move_insert_farpointer.str.sidi 661 <1> linkinfo_dualcode normalise_pointer, normalise_pointer_with_displacement_bxcx 662 <1> linkinfo_dualcode pointer_to_linear 663 <1> linkinfo_dualcode save_slice_farpointer.hash, save_slice_farpointer.main 664 <1> linkinfo_dualcode save_slice_farpointer.str 665 <1> %if _PM 666 <1> linkinfo_dualcode segment_to_selector 667 <1> %endif 668 <1> linkinfo_dualcode zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 669 <1> 670 <1> linkinfo_dualcode getfarpointer.main.xms 671 <1> linkinfo_dualcode getfarpointer.hash.xms 672 <1> linkinfo_dualcode getfarpointer.str.xms 673 <1> linkinfo_dualcode move_insert_farpointer.str 674 <1> linkinfo_dualcode move_insert_farpointer.main.xms.sidi 675 <1> linkinfo_dualcode move_insert_farpointer.hash.xms.sidi 676 <1> linkinfo_dualcode move_insert_farpointer.str.xms.sidi 677 <1> linkinfo_dualcode save_slice_farpointer.main.xms 678 <1> linkinfo_dualcode save_slice_farpointer.hash.xms 679 <1> linkinfo_dualcode save_slice_farpointer.str.xms 680 <1> linkinfo_dualcode move_delete_farpointer.main.sidi 681 <1> linkinfo_dualcode move_delete_farpointer.main.xms.sidi 682 <1> linkinfo_dualcode move_delete_farpointer.hash.xms.sidi 683 <1> linkinfo_dualcode move_delete_farpointer.str.xms.sidi 684 <1> linkinfo_dualcode zz_list_symbol 685 <1> ;linkinfo_dualcode 686 <1> %endif 687 <1> 688 <1> 689 <1> align 4, db 0 690 <1> linkinfo: 691 <1> istruc ELD_LINKINFO 0 00000000 D1E1 at eldlSignature, dw 0E1D1h 0 00000002 2000 at eldlEndOfTable, dw eldlNewDual 0 00000004 0000 at eldlReserved, dw 0 0 00000006 0100 at eldlUseLinkHash, dw !!_LINKHASH 0 00000008 C900 at eldlDataAmount, dw LINKINFO_DATA_AMOUNT 0 0000000A [2000] at eldlDataPrefixes, dw linkinfo_data_table_prefixes 0 0000000C [B201] at eldlDataEntries, dw linkinfo_data_table_entries 0 0000000E [4403] at eldlDataAddresses, dw linkinfo_data_table_addresses 0 00000010 9500 at eldlCodeAmount, dw LINKINFO_CODE_AMOUNT 0 00000012 [D604] at eldlCodePrefixes, dw linkinfo_code_table_prefixes 0 00000014 [0006] at eldlCodeEntries, dw linkinfo_code_table_entries 0 00000016 [2A07] at eldlCodeAddresses, dw linkinfo_code_table_addresses 0 00000018 3700 at eldlDualAmount, dw LINKINFO_DUALCODE_AMOUNT 0 0000001A [7E09] at eldlDualPrefixes, dw linkinfo_dualcode_table_prefixes 0 0000001C [EC09] at eldlDualEntries, dw linkinfo_dualcode_table_entries 0 0000001E [5A0A] at eldlDualAddresses, dw linkinfo_dualcode_table_addresses 708 <1> iend 709 <1> 710 <1> 711 <1> align 2, db 0 712 <1> linkinfo_data_table_prefixes: 0 00000020 FF7EFA7E2B856844D5 .: repeatdw LINKINFO_DATA_PREFIXES 0 00000029 2D6A2BEB422BC8E7D3 0 00000032 2AAEF634B240FDFCFB 0 0000003B FC0A0A89F2094A1FF2 0 00000044 B49D899FC951CA51CB 0 0000004D 51CC51CD51CE517DB3 0 00000056 55BC56BC57BC58BC59 0 0000005F BC5ABCC30B2F7A9C3C 0 00000068 84E3A0398B00B0B220 0 00000071 71DD03C6408D715440 0 0000007A 7DCFBC89AF9D913004 0 00000083 4A32081AF2DC62EAE5 0 0000008C B0B267341E38892B14 0 00000095 0B6A5D8C61879FE77A 0 0000009E DE037D4275AE31AA2A 0 000000A7 E7279BC36797B63B26 0 000000B0 DB9FA2C09648AE24DD 0 000000B9 30B9E195559C6CF235 0 000000C2 C001688CF09EF391C3 0 000000CB 0BDD03C640C83E7EC0 0 000000D4 7CC76B5D05D692B84D 0 000000DD 18F10610324E326D32 0 000000E6 2F32363427322F345E 0 000000EF 329F3200333C3B5B3B 0 000000F8 2C3D7A3B993BB83BC5 0 00000101 BF6BD7E8B48FC32E6B 0 0000010A F8B4C4E26651C71CD6 0 00000113 ED58B80F0882740EB5 0 0000011C 94C038D274B9384B9F 0 00000125 213F8592AA2F756C52 0 0000012E 75DD227F4F71282963 0 00000137 BF8C8EC7805503BABD 0 00000140 30CD1AB78B1ECF3F6F 0 00000149 9D6DB1702A2258D5DA 0 00000152 9BF78E04A81B09B98F 0 0000015B 03FC152700D569A225 0 00000164 F466F03E2229740812 0 0000016D 432A285265E47A8AF2 0 00000176 5235A08ABBCCD78EC0 0 0000017F CD6FE305BDC88C6749 0 00000188 0DF479A556F7BECB50 0 00000191 8F26EB5A63F211EA53 0 0000019A 67A7EA1BD73B44EA3C 0 000001A3 884C047CD2EE9DCB7A 0 000001AC CC7A3F6AA852 714 <1> .amount equ ($ - .) / 2 715 <1> %if .amount != LINKINFO_DATA_AMOUNT 716 <1> %error Unexpected table size 717 <1> %endif 718 <1> 719 <1> align 2, db 0 720 <1> linkinfo_data_table_entries: 0 000001B2 [360B][3E0B][460B] .: repeatdw LINKINFO_DATA_ENTRIES 0 000001B8 [560B][650B][6C0B] 0 000001BE [750B][7E0B][8A0B] 0 000001C4 [960B][9E0B][AB0B] 0 000001CA [B80B][BF0B][C60B] 0 000001D0 [CC0B][D20B][DB0B] 0 000001D6 [E50B][F00B][FE0B] 0 000001DC [0D0C][1C0C][2B0C] 0 000001E2 [3A0C][490C][580C] 0 000001E8 [600C][690C][720C] 0 000001EE [7B0C][840C][8D0C] 0 000001F4 [960C][9E0C][A60C] 0 000001FA [B20C][BB0C][C80C] 0 00000200 [D90C][EE0C][0C0D] 0 00000206 [150D][1F0D][2B0D] 0 0000020C [390D][410D][4F0D] 0 00000212 [5A0D][6A0D][730D] 0 00000218 [7D0D][870D][920D] 0 0000021E [A20D][B70D][C70D] 0 00000224 [D70D][DE0D][E70D] 0 0000022A [F10D][FC0D][120E] 0 00000230 [2A0E][3B0E][4C0E] 0 00000236 [5A0E][670E][750E] 0 0000023C [7B0E][850E][990E] 0 00000242 [AC0E][B30E][BB0E] 0 00000248 [D20E][E30E][FF0E] 0 0000024E [180F][360F][4C0F] 0 00000254 [690F][7A0F][900F] 0 0000025A [B30F][BA0F][C20F] 0 00000260 [CB0F][D50F][DC0F] 0 00000266 [F90F][1410][1B10] 0 0000026C [2210][2A10][3710] 0 00000272 [4510][4D10][5510] 0 00000278 [5D10][6510][6D10] 0 0000027E [7510][7D10][8510] 0 00000284 [8D10][9510][9C10] 0 0000028A [A310][AA10][B110] 0 00000290 [B810][BF10][C710] 0 00000296 [D010][D810][E710] 0 0000029C [F610][0311][2711] 0 000002A2 [3511][4011][5811] 0 000002A8 [7211][8311][8D11] 0 000002AE [9F11][B511][CF11] 0 000002B4 [F411][2212][4B12] 0 000002BA [5A12][6E12][7F12] 0 000002C0 [9012][A112][B912] 0 000002C6 [C912][D412][E712] 0 000002CC [F312][0713][1713] 0 000002D2 [1C13][2913][3713] 0 000002D8 [4513][5E13][7413] 0 000002DE [8013][9213][A213] 0 000002E4 [B013][BE13][CA13] 0 000002EA [DC13][ED13][FA13] 0 000002F0 [0B14][1114][2D14] 0 000002F6 [3A14][5714][7314] 0 000002FC [8814][8E14][9B14] 0 00000302 [AB14][B614][C614] 0 00000308 [DC14][ED14][FC14] 0 0000030E [0615][1C15][2A15] 0 00000314 [3D15][5315][6415] 0 0000031A [7A15][9315][A415] 0 00000320 [BA15][D315][DD15] 0 00000326 [F315][FB15][FE15] 0 0000032C [1216][2816][3E16] 0 00000332 [5716][7416][8A16] 0 00000338 [A316][AB16][B316] 0 0000033E [C816][DD16][EC16] 722 <1> .amount equ ($ - .) / 2 723 <1> %if .amount != LINKINFO_DATA_AMOUNT 724 <1> %error Unexpected table size 725 <1> %endif 726 <1> 727 <1> align 2, db 0 728 <1> linkinfo_data_table_addresses: 0 00000344 [0000][0000][0000] .: repeatdw LINKINFO_DATA_ADDRESSES 0 0000034A [0000][0000][0000] 0 00000350 [0000][0000][0000] 0 00000356 [0000][0000][0000] 0 0000035C [0000][0000][0000] 0 00000362 [0000][0000][0000] 0 00000368 [0000][0000][0000] 0 0000036E [0000][0000][0000] 0 00000374 [0000][0000][0000] 0 0000037A [0000][0000][0000] 0 00000380 [0000][0000][0000] 0 00000386 [0000][0000][0000] 0 0000038C [0000][0000][0000] 0 00000392 [0000][0000][0000] 0 00000398 [0000][4B09][4909] 0 0000039E [1000][0000][0000] 0 000003A4 [0000][0000][0000] 0 000003AA [0000][0000][0200] 0 000003B0 [0000][0200][0000] 0 000003B6 [0000][0000][0000] 0 000003BC [0000][0000][0000] 0 000003C2 [0000][0000][0000] 0 000003C8 [0000]0200[0000] 0 000003CE [0000][0000][0000] 0 000003D4 [0000][0000][0000] 0 000003DA [0000][0000][0000] 0 000003E0 [0000][0000][0000] 0 000003E6 [0000][0000][0000] 0 000003EC [9311][0000][0000] 0 000003F2 [0000][0000][0000] 0 000003F8 [0000][0000][0000] 0 000003FE [0000][802D]0100 0 00000404 [0000][0000][0000] 0 0000040A [0000][0000][0000] 0 00000410 [0000][0000][0000] 0 00000416 [0000][0000][0000] 0 0000041C [0000][0000][0000] 0 00000422 [0000][1F0B][1A0B] 0 00000428 [0000][0000][0000] 0 0000042E [0000][0000][0000] 0 00000434 [0000][0000][0000] 0 0000043A [0000][0000][0000] 0 00000440 [0000][0000][0000] 0 00000446 [0000][0000][0000] 0 0000044C [0000][0000][0000] 0 00000452 [0000][0000][0000] 0 00000458 [0000][0000][0000] 0 0000045E [0000]0100[0000] 0 00000464 [0000][0000][0000] 0 0000046A [0000][0000][0000] 0 00000470 [0000][0000][0000] 0 00000476 [0000][0000][0000] 0 0000047C [0000][0000][0000] 0 00000482 [0000][0000][0000] 0 00000488 [0000][0000][0000] 0 0000048E [0000][0000][0000] 0 00000494 [0000][0000][0000] 0 0000049A [0000][0000][0000] 0 000004A0 1000[0000][0000] 0 000004A6 [0000][0000][0000] 0 000004AC [0000][0000][0000] 0 000004B2 [0000][0000][0000] 0 000004B8 [0000][0000][0000] 0 000004BE [0000][0000][0000] 0 000004C4 [0000][0000][0000] 0 000004CA [370D][3B0D][A70D] 0 000004D0 [C70D][7E0D][0000] 730 <1> .amount equ ($ - .) / 2 731 <1> %if .amount != LINKINFO_DATA_AMOUNT 732 <1> %error Unexpected table size 733 <1> %endif 734 <1> 735 <1> 736 <1> align 2, db 0 737 <1> linkinfo_code_table_prefixes: 0 000004D6 C5C65512B5C6398C6F .: repeatdw LINKINFO_CODE_PREFIXES 0 000004DF A267B1D555A45529EF 0 000004E8 7FAE03C3D430DDB9E8 0 000004F1 3A8490F1231CE30E05 0 000004FA CFF16DC97B14DCF83D 0 00000503 BA821B84817D67EBA6 0 0000050C AD1103AA2890B77421 0 00000515 30D0BB98693567ABFF 0 0000051E BABD30CD1AB78B1ECF 0 00000527 3F6F9D702A2258D5DA 0 00000530 A7AAF85EF85C2C9A63 0 00000539 77629668310C21738E 0 00000542 9F9A8D9117D8B0CC4C 0 0000054B 04FF8BDA8663E44C4E 0 00000554 F001109AD1C68ECB25 0 0000055D D7FEFD3F8515272066 0 00000566 5A0B794CA5339BF78E 0 0000056F 04A81B09B98EF7E973 0 00000578 8A0AB212BFBC100B34 0 00000581 8AD9187225C714AF35 0 0000058A A31BD8A89626847E9F 0 00000593 40B84425A1650F0D38 0 0000059C D9FA3FE83D8226BDF2 0 000005A5 E7A83EB0965AA32210 0 000005AE 90B3D354BB7A5C22B0 0 000005B7 8E4106FB3C9CFC4741 0 000005C0 70C21B078F08EBF8EC 0 000005C9 F855C7454BD5BF032A 0 000005D2 E56373971CA6E4BE8F 0 000005DB 035DCA674098957296 0 000005E4 40E824E93C52A8C78C 0 000005ED 1FF73AA59F89566113 0 000005F6 79D4ADD5E6550B045B 0 000005FF 36 739 <1> .amount equ ($ - .) / 2 740 <1> %if .amount != LINKINFO_CODE_AMOUNT 741 <1> %error Unexpected table size 742 <1> %endif 743 <1> 744 <1> align 2, db 0 745 <1> linkinfo_code_table_entries: 0 00000600 [FB16][0017][0617] .: repeatdw LINKINFO_CODE_ENTRIES 0 00000606 [0B17][1417][2217] 0 0000060C [2B17][3517][3F17] 0 00000612 [4917][5117][5B17] 0 00000618 [6617][6D17][7417] 0 0000061E [8817][9217][A017] 0 00000624 [A917][B217][B917] 0 0000062A [C017][DB17][E217] 0 00000630 [EA17][F217][FF17] 0 00000636 [0718][1018][2318] 0 0000063C [2818][3118][3C18] 0 00000642 [5718][5E18][6B18] 0 00000648 [9218][9718][A418] 0 0000064E [B218][C018][D918] 0 00000654 [EF18][0119][1119] 0 0000065A [1F19][2519][2E19] 0 00000660 [3719][4D19][5619] 0 00000666 [5C19][6519][7719] 0 0000066C [8419][9119][A619] 0 00000672 [C519][DC19][F519] 0 00000678 [051A][1B1A][331A] 0 0000067E [471A][641A][771A] 0 00000684 [841A][901A][A21A] 0 0000068A [AE1A][BD1A][D21A] 0 00000690 [E01A][ED1A][F71A] 0 00000696 [041B][121B][1E1B] 0 0000069C [301B][411B][501B] 0 000006A2 [5D1B][6D1B][731B] 0 000006A8 [7E1B][8A1B][931B] 0 000006AE [A71B][B21B][BA1B] 0 000006B4 [C61B][D21B][E51B] 0 000006BA [F11B][051C][831C] 0 000006C0 [8F1C][9C1C][AC1C] 0 000006C6 [BA1C][C31C][CB1C] 0 000006CC [D31C][DB1C][E41C] 0 000006D2 [ED1C][F71C][0A1D] 0 000006D8 [111D][1D1D][3A1D] 0 000006DE [4D1D][541D][5F1D] 0 000006E4 [701D][A81D][B61D] 0 000006EA [C41D][D31D][E21D] 0 000006F0 [F01D][FB1D][061E] 0 000006F6 [1D1E][341E][491E] 0 000006FC [5A1E][651E][841E] 0 00000702 [A01E][AF1E][BE1E] 0 00000708 [DA1E][EB1E][F51E] 0 0000070E [061F][211F][4B1F] 0 00000714 [681F][941F][9C1F] 0 0000071A [AC1F][C41F][D21F] 0 00000720 [DF1F][F01F][0020] 0 00000726 [1820][2C20] 747 <1> .amount equ ($ - .) / 2 748 <1> %if .amount != LINKINFO_CODE_AMOUNT 749 <1> %error Unexpected table size 750 <1> %endif 751 <1> 752 <1> align 2, db 0 753 <1> linkinfo_code_table_addresses: 0 0000072A [0000]0000[0000]00 .: repeatdw LINKINFO_CODE_ADDRESSES 0 00000731 00[0000]0000[0000] 0 00000738 0000[0000]0000 0 0000073E [0000]0000[0000]00 0 00000745 00[0000]0000[0000] 0 0000074C 0000[0000]0000 0 00000752 [0000]0000[0000]00 0 00000759 00[0000]0000[0000] 0 00000760 0000[0000]0000 0 00000766 [0000]0000[0000]00 0 0000076D 00[0000]0000[0000] 0 00000774 0000[0000]0000 0 0000077A [0000]0000[0000]00 0 00000781 00[0000]0000[0000] 0 00000788 0000[0000]0000 0 0000078E [0000]0000[0000]00 0 00000795 00[0000]0000[0000] 0 0000079C 0000[0000]0000 0 000007A2 [0000]0000[0000]00 0 000007A9 00[0000]0000[0000] 0 000007B0 0000[0000]0000 0 000007B6 [0000]0000[0000]00 0 000007BD 00[0000]0000[0000] 0 000007C4 0000[0000]0000 0 000007CA [0000]0000[0000]00 0 000007D1 00[0000]0000[0000] 0 000007D8 0000[0000]0000 0 000007DE [0000]0000[0000]00 0 000007E5 00[0000]0000[0000] 0 000007EC 0000[0000]0000 0 000007F2 [0000]0000[0000]00 0 000007F9 00[0000]0000[0000] 0 00000800 0000[0000]0000 0 00000806 [0000]0000[0000]00 0 0000080D 00[0000]0000[0000] 0 00000814 0000[0000]0000 0 0000081A [0000]0000[0000]00 0 00000821 00[0000]0000[0000] 0 00000828 0000[0000]0000 0 0000082E [0000]0000[0000]00 0 00000835 00[0000]0000[0000] 0 0000083C 0000[0000]0000 0 00000842 [0000]0000[0000]00 0 00000849 00[0000]0000[0000] 0 00000850 0000[0000]0000 0 00000856 [0000]0000[0000]00 0 0000085D 00[0000]0000[0000] 0 00000864 0000[0000]0000 0 0000086A [0000]0000[0000]00 0 00000871 00[0000]0000[0000] 0 00000878 0000[0000]0000 0 0000087E [0000]0000[0000]00 0 00000885 00[0000]0000[0000] 0 0000088C 0000[0000]0000 0 00000892 [0000]0000[0000]00 0 00000899 00[0000]0000[0000] 0 000008A0 0000[0000]0000 0 000008A6 [0000]0100[0000]01 0 000008AD 00[0000]0100[0000] 0 000008B4 0100[0000]0100 0 000008BA [0000]0100[0000]01 0 000008C1 00[0000]0100[0000] 0 000008C8 0100[0000]0100 0 000008CE [0000]0100[0000]01 0 000008D5 00[0000]0100[0000] 0 000008DC 0100[0000]0100 0 000008E2 [0000]0100[0000]01 0 000008E9 00[0000]0100[0000] 0 000008F0 0100[0000]0100 0 000008F6 [0000]0100[0000]01 0 000008FD 00[0000]0100[0000] 0 00000904 0100[0000]0100 0 0000090A [0000]0100[0000]01 0 00000911 00[0000]0100[0000] 0 00000918 0100[0000]0100 0 0000091E [0000]0100[0000]01 0 00000925 00[0000]0100[0000] 0 0000092C 0100[0000]0100 0 00000932 [0000]0100[0000]01 0 00000939 00[0000]0100[0000] 0 00000940 0100[0000]0100 0 00000946 [0000]0100[0000]01 0 0000094D 00[0000]0100[0000] 0 00000954 0100[0000]0100 0 0000095A [0000]0100[0000]01 0 00000961 00[0000]0100[0000] 0 00000968 0100[0000]0100 0 0000096E [0000]0100[0000]01 0 00000975 00[0000]0100[0000] 0 0000097C 0200 755 <1> .amount equ ($ - .) / 4 756 <1> %if .amount != LINKINFO_CODE_AMOUNT 757 <1> %error Unexpected table size 758 <1> %endif 759 <1> 760 <1> 761 <1> align 2, db 0 762 <1> linkinfo_dualcode_table_prefixes: 0 0000097E 41610C8D24E4ACAF06 .: repeatdw LINKINFO_DUALCODE_PREFIXES 0 00000987 7071EB010132CF54FF 0 00000990 2427EFB85FECD3C92E 0 00000999 101B6CC33EF2286136 0 000009A2 0C7B7ED2AFCF3ABC5A 0 000009AB 141965BD30ECD36875 0 000009B4 21C2278F51B1E8F306 0 000009BD 8088113356777676D0 0 000009C6 B779D0010527C35A3C 0 000009CF CE11D7AE1CA21CF1BA 0 000009D8 3CEFF794E3BDB8C627 0 000009E1 1C6FAA3FCC8A00E921 0 000009EA 1B6C 764 <1> .amount equ ($ - .) / 2 765 <1> %if .amount != LINKINFO_DUALCODE_AMOUNT 766 <1> %error Unexpected table size 767 <1> %endif 768 <1> 769 <1> align 2, db 0 770 <1> linkinfo_dualcode_table_entries: 0 000009EC [0D1C][151C][1C1C] .: repeatdw LINKINFO_DUALCODE_ENTRIES 0 000009F2 [451C][4D1C][601C] 0 000009F8 [851D][951D][3720] 0 000009FE [4420][5D20][6E20] 0 00000A04 [7C20][8D20][A120] 0 00000A0A [B020][DE20][EC20] 0 00000A10 [FF20][1221][2421] 0 00000A16 [4021][6121][7D21] 0 00000A1C [9D21][B921][DA21] 0 00000A22 [F621][1722][3722] 0 00000A28 [4922][7222][8422] 0 00000A2E [9F22][BA22][D422] 0 00000A34 [E822][F222][0223] 0 00000A3A [1B23][2723][3E23] 0 00000A40 [5523][6B23][8623] 0 00000A46 [AB23][D023][F423] 0 00000A4C [1324][3224][5024] 0 00000A52 [7124][9624][BB24] 0 00000A58 [DF24] 772 <1> .amount equ ($ - .) / 2 773 <1> %if .amount != LINKINFO_DUALCODE_AMOUNT 774 <1> %error Unexpected table size 775 <1> %endif 776 <1> 777 <1> align 2, db 0 778 <1> linkinfo_dualcode_table_addresses: 0 00000A5A [0000]1000[0000]10 .: repeatdw LINKINFO_DUALCODE_ADDRESSES 0 00000A61 00[0000]1000[0000] 0 00000A68 1000[0000]1000 0 00000A6E [0000]1000[0000]11 0 00000A75 00[0000]1100[0000] 0 00000A7C 1100[0000]1000 0 00000A82 [0000]1000[0000]10 0 00000A89 00[0000]1100[0000] 0 00000A90 1100[0000]1100 0 00000A96 [0000]1100[0000]11 0 00000A9D 00[0000]1100[0000] 0 00000AA4 1100[0000]1100 0 00000AAA [0000]1100[0000]11 0 00000AB1 00[0000]1100[0000] 0 00000AB8 1100[0000]1100 0 00000ABE [0000]1100[0000]11 0 00000AC5 00[0000]1100[0000] 0 00000ACC 1100[0000]1100 0 00000AD2 [0000]1100[0000]11 0 00000AD9 00[0000]1100[0000] 0 00000AE0 1100[0000]1100 0 00000AE6 [0000]1100[0000]11 0 00000AED 00[0000]1100[0000] 0 00000AF4 1100[0000]1100 0 00000AFA [0000]1100[0000]11 0 00000B01 00[0000]1100[0000] 0 00000B08 1100[0000]1100 0 00000B0E [0000]1100[0000]11 0 00000B15 00[0000]1100[0000] 0 00000B1C 1100[0000]1100 0 00000B22 [0000]1100[0000]11 0 00000B29 00[0000]1100[0000] 0 00000B30 1100[0000]1100 780 <1> .amount equ ($ - .) / 4 781 <1> %if .amount != LINKINFO_DUALCODE_AMOUNT 782 <1> %error Unexpected table size 783 <1> %endif 784 <1> 785 <1> 0 00000B36 076C696E6B73656C07 dump_linkinfo_messages LINKINFO_DATA_MESSAGES, LINKINFO_CODE_MESSAGES 0 00000B3F 6C696E6B7365670F6C 0 00000B48 696E6B696E666F6164 0 00000B51 64726573730E6C696E 0 00000B5A 6B63616C6C5F746162 0 00000B63 6C6506657874736567 0 00000B6C 08657874637373656C 0 00000B75 08657874647373656C 0 00000B7E 0B6578747365675F73 0 00000B87 697A650B6578747365 0 00000B90 675F75736564076578 0 00000B99 74646174610C657874 0 00000BA2 646174615F73697A65 0 00000BAB 0C657874646174615F 0 00000BB4 757365640670737064 0 00000BBD 626706707370646265 0 00000BC6 05647373656C056373 0 00000BCF 73656C08636F64655F 0 00000BD8 73656C09636F646532 0 00000BE1 5F73656C0A6D657373 0 00000BEA 61676573656C0D696E 0 00000BF3 7465726E616C666C61 0 00000BFC 67730E696E7465726E 0 00000C05 616C666C616773320E 0 00000C0E 696E7465726E616C66 0 00000C17 6C616773330E696E74 0 00000C20 65726E616C666C6167 0 00000C29 73340E696E7465726E 0 00000C32 616C666C616773350E 0 00000C3B 696E7465726E616C66 0 00000C44 6C616773360E696E74 0 00000C4D 65726E616C666C6167 0 00000C56 7337076F7074696F6E 0 00000C5F 73086F7074696F6E73 0 00000C68 32086F7074696F6E73 0 00000C71 33086F7074696F6E73 0 00000C7A 34086F7074696F6E73 0 00000C83 35086F7074696F6E73 0 00000C8C 36086F7074696F6E73 0 00000C95 37076C617374636D64 0 00000C9E 076C696E655F696E0B 0 00000CA7 6C696E655F696E2E65 0 00000CB0 6E64086C696E655F6F 0 00000CB9 75740C6C696E655F6F 0 00000CC2 75745F656E64106175 0 00000CCB 78627566665F736567 0 00000CD4 6F7273656C14617578 0 00000CDD 627566665F63757272 0 00000CE6 656E745F73697A651D 0 00000CEF 617578627566665F63 0 00000CF8 757272656E745F7369 0 00000D01 7A655F6D696E75735F 0 00000D0A 32340866697273746D 0 00000D13 636209666972737475 0 00000D1C 6D63620B6D73672E69 0 00000D25 6E7374616C6C0D6D73 0 00000D2E 672E756E696E737461 0 00000D37 6C6C076D73672E7275 0 00000D40 6E0D656E7472797365 0 00000D49 675F73697A650A6D65 0 00000D52 73736167657365670F 0 00000D5B 6D6573736167657365 0 00000D64 675F73697A6508636F 0 00000D6D 64655F73656709636F 0 00000D76 64655F73697A650963 0 00000D7F 6F6465325F7365670A 0 00000D88 636F6465325F73697A 0 00000D91 650F61757862756666 0 00000D9A 5F7365676D656E7414 0 00000DA3 617578627566665F63 0 00000DAC 757272656E745F7369 0 00000DB5 7A650F686973746F72 0 00000DBE 795F7365676D656E74 0 00000DC7 0F686973746F727973 0 00000DD0 65675F73697A650665 0 00000DD9 6E7673656708656E76 0 00000DE2 5F73697A6509616C6C 0 00000DEB 6F635F7365670A616C 0 00000DF4 6C6F635F73697A6515 0 00000DFD 6E6578745F72657365 0 00000E06 727665645F7365676D 0 00000E0F 656E7417616C6C6F63 0 00000E18 5F73697A655F6E6F74 0 00000E21 5F7265736572766564 0 00000E2A 107265736572766564 0 00000E33 5F6164647265737310 0 00000E3C 686973746F72792E73 0 00000E45 65676F7273656C0D68 0 00000E4E 6973746F72792E6669 0 00000E57 7273740C686973746F 0 00000E60 72792E6C6173740D68 0 00000E69 6973746F7279666F72 0 00000E72 6D617405737461636B 0 00000E7B 09737461636B5F656E 0 00000E84 64136578745F636F6D 0 00000E8D 6D616E645F68616E64 0 00000E96 6C6572126578745F69 0 00000E9F 6E6A6563745F68616E 0 00000EA8 646C65720673617665 0 00000EB1 7370077468726F7773 0 00000EBA 70166578745F707265 0 00000EC3 70726F636573735F68 0 00000ECC 616E646C6572106578 0 00000ED5 745F707574735F6861 0 00000EDE 6E646C65721B657874 0 00000EE7 5F707574735F636F70 0 00000EF0 796F75747075745F68 0 00000EF9 616E646C6572186578 0 00000F02 745F707574735F6765 0 00000F0B 746C696E655F68616E 0 00000F14 646C65721D6578745F 0 00000F1D 61615F6265666F7265 0 00000F26 5F6765746C696E655F 0 00000F2F 68616E646C65721565 0 00000F38 78745F61615F696E6A 0 00000F41 6563745F68616E646C 0 00000F4A 65721C6578745F6161 0 00000F53 5F61667465725F6765 0 00000F5C 746C696E655F68616E 0 00000F65 646C6572106578745F 0 00000F6E 616D69735F68616E64 0 00000F77 6C657215616D69735F 0 00000F80 6D756C7469706C6578 0 00000F89 5F6E756D6265722274 0 00000F92 72795F646562756767 0 00000F9B 65725F616D69735F6D 0 00000FA4 756C7469706C65785F 0 00000FAD 6E756D626572066D73 0 00000FB6 672E696E076C617374 0 00000FBF 636D64086669727374 0 00000FC8 6D6362096669727374 0 00000FD1 756D63620664706D69 0 00000FDA 33321C6C617374636D 0 00000FE3 645F7472616E736665 0 00000FEC 725F6578745F616464 0 00000FF5 726573731A6C617374 0 00000FFE 636D645F7472616E73 0 00001007 6665725F6578745F65 0 00001010 6E74727906646D7963 0 00001019 6D64066861735F3837 0 00001022 076861735F6D6D780C 0 0000102B 696E7374616C6C666C 0 00001034 6167730D696E737461 0 0000103D 6C6C666F726D617407 0 00001046 7265675F6561780772 0 0000104F 65675F656378077265 0 00001058 675F65647807726567 0 00001061 5F656278077265675F 0 0000106A 657370077265675F65 0 00001073 6270077265675F6573 0 0000107C 69077265675F656469 0 00001085 077265675F65666C07 0 0000108E 7265675F6569700672 0 00001097 65675F637306726567 0 000010A0 5F6473067265675F73 0 000010A9 73067265675F657306 0 000010B2 7265675F6673067265 0 000010BB 675F6773076D73672E 0 000010C4 6E6F74086D73672E74 0 000010CD 68656E076578745F76 0 000010D6 61720E6578745F7661 0 000010DF 725F616D6F756E740E 0 000010E8 6578745F7661725F66 0 000010F1 6F726D61740C657874 0 000010FA 5F7661725F73697A65 0 00001103 236973766172696162 0 0000110C 6C655F6D6F72656279 0 00001115 74655F6E616D656865 0 0000111E 61646572732E657874 0 00001127 0D7661725F6578745F 0 00001130 73657475700A657874 0 00001139 5F68616E646C65176E 0 00001142 6561725F7472616E73 0 0000114B 6665725F6578745F65 0 00001154 6E747279196E656172 0 0000115D 5F7472616E73666572 0 00001166 5F6578745F61646472 0 0000116F 657373106C6F61645F 0 00001178 646174615F6C6F7765 0 00001181 7374096C6F61645F64 0 0000118A 617461116C6F61645F 0 00001193 79796E616D655F696E 0 0000119C 7075741568616E646C 0 000011A5 655F7363616E5F6469 0 000011AE 725F656E7472791968 0 000011B7 616E646C655F736361 0 000011C0 6E5F6469725F6E6F74 0 000011C9 5F666F756E64242E2E 0 000011D2 40626F6F745F736361 0 000011DB 6E5F6469725F726574 0 000011E4 75726E5F66696C656E 0 000011ED 6F74666F756E642D2E 0 000011F6 2E40626F6F745F7363 0 000011FF 616E5F6469725F7265 0 00001208 7475726E5F73756264 0 00001211 69725F6F725F666174 0 0000121A 33325F656E74727928 0 00001223 2E2E40626F6F745F73 0 0000122C 63616E5F6469725F72 0 00001235 657475726E5F666174 0 0000123E 31365F726F6F745F65 0 00001247 6E7472790E7363616E 0 00001250 5F6469725F656E7472 0 00001259 79136C6F61645F6368 0 00001262 65636B5F6469725F61 0 0000126B 747472106C6F61645F 0 00001274 79796E616D655F6E65 0 0000127D 7874106C6F61645F79 0 00001286 795F646972656E7472 0 0000128F 79106C6F61645F6B65 0 00001298 726E656C5F6E616D65 0 000012A1 176C6F61645F616472 0 000012AA 5F6469726275665F73 0 000012B3 65676D656E740F6578 0 000012BC 6563626C6B2E636D64 0 000012C5 6C696E650A636F6E66 0 000012CE 69677061746812636F 0 000012D7 6E666967706174682E 0 000012E0 6469725F656E640B73 0 000012E9 637269707473706174 0 000012F2 681373637269707473 0 000012FB 706174682E6469725F 0 00001304 656E640F6275696C64 0 0000130D 5F6F7074696F6E5F50 0 00001316 4D04636D64330C636D 0 0000131F 64335F6E6F745F6578 0 00001328 740D707574735F6578 0 00001331 745F646F6E650D7075 0 0000133A 74735F6578745F6E65 0 00001343 787418707574735F63 0 0000134C 6F70796F7574707574 0 00001355 5F6578745F646F6E65 0 0000135E 15707574735F676574 0 00001367 6C696E655F6578745F 0 00001370 646F6E650B696E5F67 0 00001379 6574696E7075741163 0 00001382 6D64335F7072657072 0 0000138B 6F6365737365640F63 0 00001394 6D64335F6E6F745F69 0 0000139D 6E6A6563740D636D64 0 000013A6 335F696E6A65637465 0 000013AF 640D61615F6E6F745F 0 000013B8 696E6A6563740B6161 0 000013C1 5F696E6A6563746564 0 000013CA 1161615F6265666F72 0 000013D3 655F6765746C696E65 0 000013DC 1061615F6166746572 0 000013E5 5F6765746C696E650C 0 000013EE 7768696C655F627566 0 000013F7 666572107768696C65 0 00001400 5F6275666665722E65 0 00001409 6E640573776368311B 0 00001412 696E7465726E616C66 0 0000141B 6C6167735F77697468 0 00001424 5F74745F7768696C65 0 0000142D 0C79795F69735F7363 0 00001436 726970741C7465726D 0 0000143F 696E61746F725F696E 0 00001448 5F6C696E655F696E2E 0 00001451 6F66667365741B7465 0 0000145A 726D696E61746F725F 0 00001463 696E5F6C696E655F69 0 0000146C 6E2E76616C75651465 0 00001475 78745F66696E697368 0 0000147E 2E62705F69735F7365 0 00001487 740576726567730C76 0 00001490 726567732E616D6F75 0 00001499 6E740F617363696974 0 000014A2 61626C656E616D6573 0 000014AB 0A706D5F325F38366D 0 000014B4 5F300F6C6F61645F75 0 000014BD 6E69745F666C616773 0 000014C6 157373735F73696C65 0 000014CF 6E745F636F756E745F 0 000014D8 75736564107373735F 0 000014E1 73696C656E745F636F 0 000014EA 756E740E7365617263 0 000014F3 685F726573756C7473 0 000014FC 097373636F756E7465 0 00001505 72157365617263685F 0 0000150E 726573756C74735F61 0 00001517 6D6F756E740D706174 0 00001520 6368617265615F7275 0 00001529 6E1270617463686172 0 00001532 65615F72756E2E7369 0 0000153B 7A6515706174636861 0 00001544 7265615F72756E2E73 0 0000154D 65676D656E74107061 0 00001556 746368617265615F69 0 0000155F 6E7472746E15706174 0 00001568 6368617265615F696E 0 00001571 7472746E2E73697A65 0 0000157A 187061746368617265 0 00001583 615F696E7472746E2E 0 0000158C 7365676D656E741070 0 00001595 61746368617265615F 0 0000159E 706D5F657863157061 0 000015A7 746368617265615F70 0 000015B0 6D5F6578632E73697A 0 000015B9 651870617463686172 0 000015C2 65615F706D5F657863 0 000015CB 2E7365676D656E7409 0 000015D4 70726F6D70746C656E 0 000015DD 15696E646972656374 0 000015E6 5F61727261795F6572 0 000015EF 72666978077072696F 0 000015F8 72726302726313626F 0 00001601 6F745F696E69745F66 0 0000160A 6F756E646E616D6515 0 00001613 6465766963655F7175 0 0000161C 69747461626C655F72 0 00001625 656773156465766963 0 0000162E 655F6865616465725F 0 00001637 616464726573731869 0 00001640 6E69745F6578656375 0 00001649 7461626C655F706174 0 00001652 686E616D651C696E69 0 0000165B 745F65786563757461 0 00001664 626C655F706174686E 0 0000166D 616D652E656E641565 0 00001676 78745F636F6D6C6576 0 0000167F 656C735F68616E646C 0 00001688 6572186E6561725F74 0 00001691 72616E736665725F65 0 0000169A 78745F72657475726E 0 000016A3 076D73672E736F6607 0 000016AC 6D73672E656F66146D 0 000016B5 73672E676F746F5F6E 0 000016BE 6F745F666F756E642E 0 000016C7 31146D73672E676F74 0 000016D0 6F5F6E6F745F666F75 0 000016D9 6E642E320E6D73672E 0 000016E2 676F746F5F656D7074 0 000016EB 790E67657472616E67 0 000016F4 655F6C696E65730470 0 000016FD 75747305707574737A 0 00001706 047075746308707574 0 0000170F 736C696E650D707574 0 00001718 736C696E655F63726C 0 00001721 66087472696D707574 0 0000172A 7309736B6970636F6D 0 00001733 6D6109736B6970636F 0 0000173C 6D6D3009736B697077 0 00001745 6869746507736B6970 0 0000174E 776830096973737472 0 00001757 696E673F0A63617069 0 00001760 74616C697365066368 0 00001769 6B656F6C066973656F 0 00001772 6C3F136973656F6C3F 0 0000177B 2E6E6F7473656D6963 0 00001784 6F6C6F6E0975707065 0 0000178D 72636173650D677561 0 00001796 72645F617578627566 0 0000179F 660867756172645F72 0 000017A8 650870726570686163 0 000017B1 6B06646F6861636B06 0 000017BA 756E6861636B1A6861 0 000017C3 6E646C655F73657269 0 000017CC 616C5F666C6167735F 0 000017D5 6374726C5F63066865 0 000017DE 786E79620768657862 0 000017E7 79746507686578776F 0 000017F0 72640C686578776F72 0 000017F9 645F68696768076465 0 00001802 63776F726408646563 0 0000180B 64776F726412646563 0 00001814 5F64776F72645F6D69 0 0000181D 6E7769647468046973 0 00001826 706D08736574657332 0 0000182F 64780A63616C6C5F69 0 00001838 6E7432441A636F7079 0 00001841 5F73696E676C655F63 0 0000184A 6F756E7465645F7374 0 00001853 72696E6706696E7463 0 0000185C 686B0C497349495350 0 00001865 456E7472793F266469 0 0000186E 73705F647861785F74 0 00001877 696D65735F63785F77 0 00001880 696474685F62785F73 0 00001889 697A652E73746F7265 0 00001892 04636D64330C636D64 0 0000189B 335F6E6F745F657874 0 000018A4 0D707574735F657874 0 000018AD 5F646F6E650D707574 0 000018B6 735F6578745F6E6578 0 000018BF 7418707574735F636F 0 000018C8 70796F75747075745F 0 000018D1 6578745F646F6E6515 0 000018DA 707574735F6765746C 0 000018E3 696E655F6578745F64 0 000018EC 6F6E6511636D64335F 0 000018F5 70726570726F636573 0 000018FE 7365640F636D64335F 0 00001907 6E6F745F696E6A6563 0 00001910 740D636D64335F696E 0 00001919 6A6563746564056572 0 00001922 726F72087365746473 0 0000192B 327369087365746473 0 00001934 32627815696E746361 0 0000193D 6C6C5F6578745F7265 0 00001946 7475726E5F65730864 0 0000194F 645F73746F72650549 0 00001958 6E444F53085F646F73 0 00001961 63616C6C1179795F64 0 0000196A 6F735F70617273655F 0 00001973 6E616D650C79795F6F 0 0000197C 70656E5F66696C650C 0 00001985 79795F636865636B5F 0 0000198E 6C666E1479795F636F 0 00001997 6D6D6F6E5F70617273 0 000019A0 655F6E616D651E7979 0 000019A9 5F636F6D6D6F6E5F70 0 000019B2 617273655F6E616D65 0 000019BB 5F62785F6275666665 0 000019C4 721672657472795F6F 0 000019CD 70656E5F7363726970 0 000019D6 747370617468186E65 0 000019DF 61725F7472616E7366 0 000019E8 65725F6578745F7265 0 000019F1 7475726E0F79795F62 0 000019FA 6F6F745F726561642E 0 00001A03 62781579795F626F6F 0 00001A0C 745F7365656B5F7374 0 00001A15 6172742E6278177979 0 00001A1E 5F626F6F745F736565 0 00001A27 6B5F63757272656E74 0 00001A30 2E62781379795F626F 0 00001A39 6F745F70617273655F 0 00001A42 6E616D65321C79795F 0 00001A4B 626F6F745F70617273 0 00001A54 655F6E616D655F6278 0 00001A5D 5F6275666665721279 0 00001A66 795F626F6F745F6F70 0 00001A6F 656E5F66696C65320C 0 00001A78 7363616E5F6469725F 0 00001A81 6175780B726561645F 0 00001A8A 736563746F72117979 0 00001A93 5F626F6F745F696E69 0 00001A9C 745F646972320B676F 0 00001AA5 745F7979656E747279 0 00001AAE 0E7363616E5F646972 0 00001AB7 5F656E747279142E2E 0 00001AC0 4079795F66696C656E 0 00001AC9 616D655F656D707479 0 00001AD2 0D626F6F745F706172 0 00001ADB 73655F666E0C696E69 0 00001AE4 745F626F6F74636D64 0 00001AED 09636C6F73655F6578 0 00001AF6 740C79795F72657365 0 00001AFF 745F6275660D61615F 0 00001B08 6E6F745F696E6A6563 0 00001B11 740B61615F696E6A65 0 00001B1A 637465641161615F62 0 00001B23 65666F72655F676574 0 00001B2C 6C696E651061615F61 0 00001B35 667465725F6765746C 0 00001B3E 696E650E646F736361 0 00001B47 6C6C5F657874736567 0 00001B50 0C746573745F645F62 0 00001B59 5F6269740F74657374 0 00001B62 5F686967685F6C696D 0 00001B6B 69740573657472630A 0 00001B74 736B6970657175616C 0 00001B7D 730B636F756E745F73 0 00001B86 746F72650868657864 0 00001B8F 776F72641376657269 0 00001B98 66797365676D5F6F72 0 00001BA1 5F6572726F720A7665 0 00001BAA 726966797365676D07 0 00001BB3 646973705F616C0B64 0 00001BBC 6973705F61785F6865 0 00001BC5 780B646973705F616C 0 00001BCE 5F6865781264697370 0 00001BD7 5F616C5F6E7962626C 0 00001BE0 655F6865780B646973 0 00001BE9 705F61785F64656313 0 00001BF2 63616C6C5F636F6D6C 0 00001BFB 6576656C5F62785F61 0 00001C04 780772657365747263 0 00001C0D 07707573685F696606 0 00001C16 706F705F696628696E 0 00001C1F 7463616C6C5F726574 0 00001C28 75726E5F706172616D 0 00001C31 657465725F65735F70 0 00001C3A 6172616D657465725F 0 00001C43 647307696E7463616C 0 00001C4C 6C125F646F7363616C 0 00001C55 6C5F72657475726E5F 0 00001C5E 6573225F646F736361 0 00001C67 6C6C5F72657475726E 0 00001C70 5F65735F706172616D 0 00001C79 657465725F65735F64 0 00001C82 730B69737661726961 0 00001C8B 626C653F0C69737365 0 00001C94 70617261746F723F0F 0 00001C9D 6765745F76616C7565 0 00001CA6 5F72616E67650D6765 0 00001CAF 746578707265737369 0 00001CB8 6F6E0867657464776F 0 00001CC1 726407676574776F72 0 00001CCA 640767657462797465 0 00001CD3 076765746164647208 0 00001CDC 676574616464725808 0 00001CE5 67657472616E676509 0 00001CEE 67657472616E676558 0 00001CF7 126765745F6C656E67 0 00001D00 74685F6B6579776F72 0 00001D09 64066765746E79620B 0 00001D12 69736F70657261746F 0 00001D1B 723F1C2E2E4063616C 0 00001D24 6C5F6F70657261746F 0 00001D2D 725F64697370617463 0 00001D36 68657273127661725F 0 00001D3F 6578745F7365747570 0 00001D48 5F646F6E6506676574 0 00001D51 7374720A6765745F6C 0 00001D5A 656E67746810676574 0 00001D63 5F6C656E6774682E6C 0 00001D6C 696E65731473746163 0 00001D75 6B5F636865636B2E69 0 00001D7E 6E7465726E616C0F73 0 00001D87 6176655F7363726174 0 00001D90 636873656C12726573 0 00001D99 746F72655F73637261 0 00001DA2 74636873656C0D6269 0 00001DAB 6E7365617263686861 0 00001DB4 73680D62696E736561 0 00001DBD 7263686D61696E0E64 0 00001DC6 6973705F73697A655F 0 00001DCF 686173680E64697370 0 00001DD8 5F73697A655F6D6169 0 00001DE1 6E0D646973705F7369 0 00001DEA 7A655F7374720A6765 0 00001DF3 74737472696E67310A 0 00001DFC 676574737472696E67 0 00001E05 3216696E6372656D65 0 00001E0E 6E745F73735F726566 0 00001E17 5F636F756E74166C69 0 00001E20 73745F73796D5F7374 0 00001E29 6F726167655F757361 0 00001E32 6765147374725F696E 0 00001E3B 6465785F746F5F706F 0 00001E44 696E746572107A7A5F 0 00001E4D 636F6D6D69745F696E 0 00001E56 736572740A7A7A5F63 0 00001E5F 6F6D706163741E7A7A 0 00001E68 5F636F6D706163745F 0 00001E71 657870616E645F6368 0 00001E7A 65636B5F6E6F6E786D 0 00001E83 731B7A7A5F636F6D70 0 00001E8C 6163745F657870616E 0 00001E95 645F636865636B5F78 0 00001E9E 6D730E7A7A5F64656C 0 00001EA7 6574655F686173680E 0 00001EB0 7A7A5F64656C657465 0 00001EB9 5F6D61696E1B7A7A5F 0 00001EC2 64656C6574655F6D61 0 00001ECB 696E5F616E645F6974 0 00001ED4 735F68617368107A7A 0 00001EDD 5F64656C6574655F73 0 00001EE6 7472696E67097A7A5F 0 00001EEF 657870616E64107A7A 0 00001EF8 5F657870616E645F63 0 00001F01 6F6D6D6F6E1A7A7A5F 0 00001F0A 6765745F73796D7374 0 00001F13 725F6C656E6774685F 0 00001F1C 6279746573297A7A5F 0 00001F25 6765745F73796D7374 0 00001F2E 725F6C656E6774685F 0 00001F37 62797465732E73734C 0 00001F40 656E6774685F696E5F 0 00001F49 63781C7A7A5F676574 0 00001F52 5F73796D7374725F6C 0 00001F5B 656E6774685F696E64 0 00001F64 696365732B7A7A5F67 0 00001F6D 65745F73796D737472 0 00001F76 5F6C656E6774685F69 0 00001F7F 6E64696365732E7373 0 00001F88 4C656E6774685F696E 0 00001F91 5F6378077A7A5F6861 0 00001F9A 73680F7A7A5F686173 0 00001FA3 682E62785F696E6974 0 00001FAC 177A7A5F696E736572 0 00001FB5 745F6D61696E2E6C69 0 00001FBE 6E6B6C6973740D7A7A 0 00001FC7 5F72656C6F635F6D61 0 00001FD0 696E0C7A7A5F72656C 0 00001FD9 6F635F737472107A7A 0 00001FE2 5F73746F72655F7072 0 00001FEB 655F7374720F7A7A5F 0 00001FF4 73746F72655F737472 0 00001FFD 696E67177A7A5F7374 0 00002006 6F72655F737472696E 0 0000200F 672E686173685F6278 0 00002018 137A7A5F756E6C696E 0 00002021 6B5F6D61696E5F6E65 0 0000202A 78740A656E7472795F 0 00002033 7265746E0C62755F72 0 0000203C 656C6F636174656418 0 00002045 636F6465325F746F5F 0 0000204E 636F64655F7265745F 0 00002057 746F5F657874107075 0 00002060 73685F637864785F6F 0 00002069 725F6564780D2E2E40 0 00002072 68685F726561646D65 0 0000207B 6D10696D6D61736D5F 0 00002084 72656C6F6361746564 0 0000208D 1373656C6563746F72 0 00002096 5F746F5F7365676D65 0 0000209F 6E740E7A7A5F6C6973 0 000020A8 745F73796D626F6C2D 0 000020B1 616E74695F6E6F726D 0 000020BA 616C6973655F706F69 0 000020C3 6E7465725F77697468 0 000020CC 5F646973706C616365 0 000020D5 6D656E745F62786378 0 000020DE 0D646973706C617973 0 000020E7 7472696E6712676574 0 000020F0 666172706F696E7465 0 000020F9 722E68617368126765 0 00002102 74666172706F696E74 0 0000210B 65722E6D61696E1167 0 00002114 6574666172706F696E 0 0000211D 7465722E7374721B6D 0 00002126 6F76655F64656C6574 0 0000212F 655F666172706F696E 0 00002138 7465722E6861736820 0 00002141 6D6F76655F64656C65 0 0000214A 74655F666172706F69 0 00002153 6E7465722E68617368 0 0000215C 2E736964691B6D6F76 0 00002165 655F64656C6574655F 0 0000216E 666172706F696E7465 0 00002177 722E6D61696E1F6D6F 0 00002180 76655F64656C657465 0 00002189 5F666172706F696E74 0 00002192 65722E7374722E7369 0 0000219B 64691B6D6F76655F69 0 000021A4 6E736572745F666172 0 000021AD 706F696E7465722E68 0 000021B6 617368206D6F76655F 0 000021BF 696E736572745F6661 0 000021C8 72706F696E7465722E 0 000021D1 686173682E73696469 0 000021DA 1B6D6F76655F696E73 0 000021E3 6572745F666172706F 0 000021EC 696E7465722E6D6169 0 000021F5 6E206D6F76655F696E 0 000021FE 736572745F66617270 0 00002207 6F696E7465722E6D61 0 00002210 696E2E736964691F6D 0 00002219 6F76655F696E736572 0 00002222 745F666172706F696E 0 0000222B 7465722E7374722E73 0 00002234 696469116E6F726D61 0 0000223D 6C6973655F706F696E 0 00002246 746572286E6F726D61 0 0000224F 6C6973655F706F696E 0 00002258 7465725F776974685F 0 00002261 646973706C6163656D 0 0000226A 656E745F6278637811 0 00002273 706F696E7465725F74 0 0000227C 6F5F6C696E6561721A 0 00002285 736176655F736C6963 0 0000228E 655F666172706F696E 0 00002297 7465722E686173681A 0 000022A0 736176655F736C6963 0 000022A9 655F666172706F696E 0 000022B2 7465722E6D61696E19 0 000022BB 736176655F736C6963 0 000022C4 655F666172706F696E 0 000022CD 7465722E7374721373 0 000022D6 65676D656E745F746F 0 000022DF 5F73656C6563746F72 0 000022E8 097A7A5F696E736572 0 000022F1 740F7A7A5F6D617463 0 000022FA 685F73796D626F6C18 0 00002303 7A7A5F6D617463685F 0 0000230C 73796D626F6C2E636F 0 00002315 6E74696E75650B7A7A 0 0000231E 5F72656C6F63617465 0 00002327 16676574666172706F 0 00002330 696E7465722E6D6169 0 00002339 6E2E786D7316676574 0 00002342 666172706F696E7465 0 0000234B 722E686173682E786D 0 00002354 731567657466617270 0 0000235D 6F696E7465722E7374 0 00002366 722E786D731A6D6F76 0 0000236F 655F696E736572745F 0 00002378 666172706F696E7465 0 00002381 722E737472246D6F76 0 0000238A 655F696E736572745F 0 00002393 666172706F696E7465 0 0000239C 722E6D61696E2E786D 0 000023A5 732E73696469246D6F 0 000023AE 76655F696E73657274 0 000023B7 5F666172706F696E74 0 000023C0 65722E686173682E78 0 000023C9 6D732E73696469236D 0 000023D2 6F76655F696E736572 0 000023DB 745F666172706F696E 0 000023E4 7465722E7374722E78 0 000023ED 6D732E736964691E73 0 000023F6 6176655F736C696365 0 000023FF 5F666172706F696E74 0 00002408 65722E6D61696E2E78 0 00002411 6D731E736176655F73 0 0000241A 6C6963655F66617270 0 00002423 6F696E7465722E6861 0 0000242C 73682E786D731D7361 0 00002435 76655F736C6963655F 0 0000243E 666172706F696E7465 0 00002447 722E7374722E786D73 0 00002450 206D6F76655F64656C 0 00002459 6574655F666172706F 0 00002462 696E7465722E6D6169 0 0000246B 6E2E73696469246D6F 0 00002474 76655F64656C657465 0 0000247D 5F666172706F696E74 0 00002486 65722E6D61696E2E78 0 0000248F 6D732E73696469246D 0 00002498 6F76655F64656C6574 0 000024A1 655F666172706F696E 0 000024AA 7465722E686173682E 0 000024B3 786D732E7369646923 0 000024BC 6D6F76655F64656C65 0 000024C5 74655F666172706F69 0 000024CE 6E7465722E7374722E 0 000024D7 786D732E736964690E 0 000024E0 7A7A5F6C6973745F73 0 000024E9 796D626F6C 75 %endif 76 77 78 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 78 ------------------ note: usesection lDEBUG_DATA_ENTRY 79 %if _LINK_COMPAT 80 align 4, db 0 81 %endif 82 83 msg: 84 85 align 2, db 0 86 .help_array: 0 00002844 [F531] dw .build_nameversion + NONCOMPRESSEDFLAG 0 00002846 [EF24] dw .help_header + NONCOMPRESSEDFLAG 0 00002848 [FE24] dw .help_contents 90 .help_array_amount: equ ($ - .help_array) / 2 91 92 usemessagesegment === Switch to base=009D80h -> "MESSAGESEGMENT" 92 ------------------ note: usesection MESSAGESEGMENT 93 align 2, db 0 94 .help_header: 0 000024EE 2068656C7020736372 asciz " help screen",13,10 0 000024F7 65656E0D0A00 96 .help_contents: helppage main 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 0 000024FD 00 align 2, db 0 43 <1> %00: 0 000024FE A605 dw %%end - %%start 45 <1> %%start: 46 00002500 <1> incbin %%includename 47 <1> %%end: 97 98 %if _EXTHELP 99 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 99 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 0000284A 534F5552434500 .source:asciz "SOURCE" 101 102 usemessagesegment === Switch to base=009D80h -> "MESSAGESEGMENT" 102 ------------------ note: usesection MESSAGESEGMENT 103 .help_source: helppage source 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 42 <1> align 2, db 0 43 <1> %00: 0 00002AA6 FB00 dw %%end - %%start 45 <1> %%start: 46 00002AA8 <1> incbin %%includename 47 <1> %%end: 104 %endif 105 106 %if !_LOADER 107 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 107 ------------------ note: usesection lDEBUG_DATA_ENTRY 108 .re: 0 00002851 524500 asciz "RE" 110 111 usemessagesegment === Switch to base=009D80h -> "MESSAGESEGMENT" 111 ------------------ note: usesection MESSAGESEGMENT 112 .help_re: helppage re 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 0 00002BA3 00 align 2, db 0 43 <1> %00: 0 00002BA4 3403 dw %%end - %%start 45 <1> %%start: 46 00002BA6 <1> incbin %%includename 47 <1> %%end: 113 %endif 114 115 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 115 ------------------ note: usesection lDEBUG_DATA_ENTRY 116 .run: 0 00002854 52554E00 asciz "RUN" 118 119 %if !_LOADER 120 usemessagesegment === Switch to base=009D80h -> "MESSAGESEGMENT" 120 ------------------ note: usesection MESSAGESEGMENT 121 .help_run: helppage run 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 42 <1> align 2, db 0 43 <1> %00: 0 00002EDA 5C02 dw %%end - %%start 45 <1> %%start: 46 00002EDC <1> incbin %%includename 47 <1> %%end: 122 %endif 123 124 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 124 ------------------ note: usesection lDEBUG_DATA_ENTRY 125 126 align 2, db 0 127 .build_array: 0 00002858 [F531] dw .build_nameversion + NONCOMPRESSEDFLAG 0 0000285A [1F32] dw .build_linebreak + NONCOMPRESSEDFLAG 130 .build_version_amount: equ ($ - .build_array) / 2 0 0000285C [4532] dw .build_ldebug + NONCOMPRESSEDFLAG 0 0000285E [8532] dw .build_lmacros + NONCOMPRESSEDFLAG 133 %if _SYMBOLIC 0 00002860 [C532] dw .build_symsnip + NONCOMPRESSEDFLAG 135 %endif 136 %if _BOOTLDR 0 00002862 [0533] dw .build_scanptab + NONCOMPRESSEDFLAG 138 %endif 0 00002864 [4533] dw .build_inicomp + NONCOMPRESSEDFLAG 140 %if (_BOOTLDR && _CHECKSUM) || _CHECKSUM_NEW 141 dw .build_inicheck + NONCOMPRESSEDFLAG 142 %endif 143 %if _BOOTLDR 0 00002866 [8533] dw .build_ldosboot + NONCOMPRESSEDFLAG 145 %endif 146 .build_short_amount: equ ($ - .build_array) / 2 147 %if _EXTHELP 0 00002868 [C433] dw .build_long 149 %endif 150 .build_long_amount: equ ($ - .build_array) / 2 151 152 %if _OPTIONS && _EXTHELP 153 align 2, db 0 154 .options_array: 0 0000286A [E041] dw .options_1 0 0000286C [EC44] dw .options_2 0 0000286E [F446] dw .options_3 0 00002870 [7049] dw .options_4 0 00002872 [684A] dw .options_5 0 00002874 [704A] dw .options_6 161 .options_array_option_amount: equ ($ - .options_array) / 2 0 00002876 [E44C] dw .flags_1 0 00002878 [5A4F] dw .asmoptions_1 164 .options_array_amount: equ ($ - .options_array) / 2 165 166 .options_scan: 0 0000287A 313233343536 db "123456" 168 .options_scan_amount: equ ($ - .options_scan) 169 %if .options_array_option_amount != .options_scan_amount 170 %error Array size mismatch 171 %endif 172 173 .string_options: 0 00002880 4F5054494F4E5300 asciz "OPTIONS" 175 176 usemessagesegment === Switch to base=009D80h -> "MESSAGESEGMENT" 176 ------------------ note: usesection MESSAGESEGMENT 177 .options_pages: helppage options 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 42 <1> align 2, db 0 43 <1> %00: 0 00003138 B900 dw %%end - %%start 45 <1> %%start: 46 0000313A <1> incbin %%includename 47 <1> %%end: 178 %endif 179 180 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 180 ------------------ note: usesection lDEBUG_DATA_ENTRY 181 .string_build: 0 00002888 4255494C4400 asciz "BUILD" 183 .string_version: 0 0000288E 56455253494F4E00 asciz "VERSION" 185 186 usemessagesegment === Switch to base=009D80h -> "MESSAGESEGMENT" 186 ------------------ note: usesection MESSAGESEGMENT 0 000031F3 00 align 2, db 0 188 .build_nameversion: 0 000031F4 436F6E64746E6C2E20 asciz _PROGNAME,_VERSION 0 000031FD 44656275676761626C 0 00003206 65206C446562756758 0 0000320F 2028323032362D3039 0 00003218 2D32322900 190 0 0000321D 00 align 2, db 0 192 .build_linebreak: 0 0000321E 0D0A00 asciz 13,10 0 00003221 00 _fill_at_least 80, 0, .build_nameversion 195 196 align 2, db 0 197 .build_ldebug: 198 %ifnidn _REVISIONID,"" 0 00003244 536F7572636520436F db "Source Control Revision ID: ",_REVISIONID,13,10 0 0000324D 6E74726F6C20526576 0 00003256 6973696F6E2049443A 0 0000325F 206867206236383263 0 00003268 353464353135652B20 0 00003271 283639333320616E63 0 0000327A 6573746F7273290D0A 200 %endif 0 00003283 00 asciz 202 _fill_at_least 64, 0, .build_ldebug 203 204 align 2, db 0 205 .build_lmacros: 0 00003284 55736573206C6D6163 fill_at_least 64, 0, asciz _REVISIONID_LMACROS 0 0000328D 726F733A2020526576 0 00003296 6973696F6E20494420 0 0000329F 686720643937643266 0 000032A8 313833333661202831 0 000032B1 363920616E63657374 0 000032BA 6F7273290D0A0000 0 000032BA 207 208 %if _SYMBOLIC 209 align 2, db 0 210 .build_symsnip: 0 000032C4 557365732073796D73 fill_at_least 64, 0, asciz _REVISIONID_SYMSNIP 0 000032CD 6E69703A2020526576 0 000032D6 6973696F6E20494420 0 000032DF 686720626464653261 0 000032E8 643936356663202834 0 000032F1 323420616E63657374 0 000032FA 6F7273290D0A0000 0 000032FA 212 %endif 213 214 %if _BOOTLDR 215 align 2, db 0 216 .build_scanptab: 0 00003304 55736573207363616E fill_at_least 64, 0, asciz _REVISIONID_SCANPTAB 0 0000330D 707461623A20526576 0 00003316 6973696F6E20494420 0 0000331F 686720353735666138 0 00003328 396664363731202833 0 00003331 3120616E636573746F 0 0000333A 7273290D0A0000 0 0000333A 218 %endif 219 220 align 2, db 0 221 .build_inicomp: 0 00003344 5573657320696E6963 fill_at_least 64, 0, asciz _REVISIONID_INICOMP 0 0000334D 6F6D703A2020526576 0 00003356 6973696F6E20494420 0 0000335F 686720386366366531 0 00003368 666462346133202837 0 00003371 383620616E63657374 0 0000337A 6F7273290D0A0000 0 0000337A 223 224 %if (_BOOTLDR && _CHECKSUM) || _CHECKSUM_NEW 225 align 2, db 0 226 .build_inicheck: 227 fill_at_least 64, 0, asciz _REVISIONID_INICHECK 228 %endif 229 230 %if _BOOTLDR 231 align 2, db 0 232 .build_ldosboot: 0 00003384 55736573206C646F73 fill_at_least 64, 0, asciz _REVISIONID_LDOSBOOT 0 0000338D 626F6F743A20526576 0 00003396 6973696F6E20494420 0 0000339F 686720323963643230 0 000033A8 626664333265202831 0 000033B1 30323620616E636573 0 000033BA 746F7273290D0A0000 0 000033BA 234 %endif 235 236 %if _EXTHELP 237 .build_long: helppage build 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 42 <1> align 2, db 0 43 <1> %00: 0 000033C4 2602 dw %%end - %%start 45 <1> %%start: 46 000033C6 <1> incbin %%includename 47 <1> %%end: 238 %endif 239 %if ! _EXTHELP || _HELP_COMPRESSED 240 %if _BOOTLDR 0 000035EC 00 asciz 242 ; This message is used by mak.sh to detect that we 243 ; are building with boot load support. 0 000035ED 0D0A426F6F74206C6F db 13,10,"Boot loader",13,10 0 000035F6 616465720D0A 0 000035FC 00 asciz 246 %endif 247 %endif 248 249 %if _EXTHELP 250 usemessagesegment 250 ------------------ note: usesection MESSAGESEGMENT 251 .license: helppage license 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 0 000035FD 00 align 2, db 0 43 <1> %00: 0 000035FE EE01 dw %%end - %%start 45 <1> %%start: 46 00003600 <1> incbin %%includename 47 <1> %%end: 252 253 usemessagesegment 253 ------------------ note: usesection MESSAGESEGMENT 254 .reghelp: helppage regs 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 42 <1> align 2, db 0 43 <1> %00: 0 000037EE 2601 dw %%end - %%start 45 <1> %%start: 46 000037F0 <1> incbin %%includename 47 <1> %%end: 255 256 usemessagesegment 256 ------------------ note: usesection MESSAGESEGMENT 257 .flaghelp: helppage flags 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 42 <1> align 2, db 0 43 <1> %00: 0 00003916 B801 dw %%end - %%start 45 <1> %%start: 46 00003918 <1> incbin %%includename 47 <1> %%end: 258 259 %if _COND 260 usemessagesegment 260 ------------------ note: usesection MESSAGESEGMENT 261 .condhelp: helppage cond 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 42 <1> align 2, db 0 43 <1> %00: 0 00003AD0 C801 dw %%end - %%start 45 <1> %%start: 46 00003AD2 <1> incbin %%includename 47 <1> %%end: 262 %endif 263 264 %if _EXPRESSIONS 265 usemessagesegment 265 ------------------ note: usesection MESSAGESEGMENT 266 .expressionhelp: helppage expr 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 42 <1> align 2, db 0 43 <1> %00: 0 00003C9A 4305 dw %%end - %%start 45 <1> %%start: 46 00003C9C <1> incbin %%includename 47 <1> %%end: 267 %endif 268 269 %if _OPTIONS 270 usemessagesegment 270 ------------------ note: usesection MESSAGESEGMENT 271 .options_1: helppage options1 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 0 000041DF 00 align 2, db 0 43 <1> %00: 0 000041E0 0903 dw %%end - %%start 45 <1> %%start: 46 000041E2 <1> incbin %%includename 47 <1> %%end: 272 273 usemessagesegment 273 ------------------ note: usesection MESSAGESEGMENT 274 .options_2: helppage options2 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 0 000044EB 00 align 2, db 0 43 <1> %00: 0 000044EC 0502 dw %%end - %%start 45 <1> %%start: 46 000044EE <1> incbin %%includename 47 <1> %%end: 275 276 usemessagesegment 276 ------------------ note: usesection MESSAGESEGMENT 277 .options_3: helppage options3 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 0 000046F3 00 align 2, db 0 43 <1> %00: 0 000046F4 7902 dw %%end - %%start 45 <1> %%start: 46 000046F6 <1> incbin %%includename 47 <1> %%end: 278 279 usemessagesegment 279 ------------------ note: usesection MESSAGESEGMENT 280 .options_4: helppage options4, 1 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 0 0000496F 00 align 2, db 0 43 <1> %00: 0 00004970 F600 dw %%end - %%start 45 <1> %%start: 46 00004972 <1> incbin %%includename 47 <1> %%end: 281 ; terminator is in .options_5 282 283 usemessagesegment 283 ------------------ note: usesection MESSAGESEGMENT 284 align 2, db 0 285 .options_5: 286 %if _HELP_COMPRESSED 287 %if _LZEXEDAT ; lzexedat: 0 00004A68 05000200000000 countedw 2, 0, 0, 0, 0 289 ; tag 0002h 290 ; combined 0000h 291 ; escaped 00h 292 %else ; heatshrink: 293 dw 2 ; length of compressed data (excluding itself) 294 db 10, 4 ; parameters expected by depack, -w then -l 295 %endif 296 %else 297 asciz 298 %endif 299 300 usemessagesegment 300 ------------------ note: usesection MESSAGESEGMENT 301 .options_6: helppage options6 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 0 00004A6F 00 align 2, db 0 43 <1> %00: 0 00004A70 7202 dw %%end - %%start 45 <1> %%start: 46 00004A72 <1> incbin %%includename 47 <1> %%end: 302 303 usemessagesegment 303 ------------------ note: usesection MESSAGESEGMENT 304 .flags_1: helppage optionsi 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 42 <1> align 2, db 0 43 <1> %00: 0 00004CE4 7302 dw %%end - %%start 45 <1> %%start: 46 00004CE6 <1> incbin %%includename 47 <1> %%end: 305 306 usemessagesegment 306 ------------------ note: usesection MESSAGESEGMENT 307 .asmoptions_1: helppage optionsa 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 0 00004F59 00 align 2, db 0 43 <1> %00: 0 00004F5A 2802 dw %%end - %%start 45 <1> %%start: 46 00004F5C <1> incbin %%includename 47 <1> %%end: 308 %endif 309 310 %if _VARIABLES || _OPTIONS || _PSPVARIABLES 311 usemessagesegment 311 ------------------ note: usesection MESSAGESEGMENT 312 .varhelp: helppage vars 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 42 <1> align 2, db 0 43 <1> %00: 0 00005184 6801 dw %%end - %%start 45 <1> %%start: 46 00005186 <1> incbin %%includename 47 <1> %%end: 313 %endif 314 %endif 315 316 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 316 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 00002896 54686973206C446562 .readonly: asciz "This lDebug variable cannot be written to. See ?V.",13,10 0 0000289F 756720766172696162 0 000028A8 6C652063616E6E6F74 0 000028B1 206265207772697474 0 000028BA 656E20746F2E205365 0 000028C3 65203F562E0D0A00 0 000028CB 54686973206D656D6F .readonly_mem: asciz "This memory variable cannot be written to.",13,10 0 000028D4 727920766172696162 0 000028DD 6C652063616E6E6F74 0 000028E6 206265207772697474 0 000028EF 656E20746F2E0D0A00 319 %if _MMXSUPP 320 .internal_error_no_mmx: 0 000028F8 496E7465726E616C20 asciz "Internal error, MMX variables not supported.",13,10 0 00002901 6572726F722C204D4D 0 0000290A 58207661726961626C 0 00002913 6573206E6F74207375 0 0000291C 70706F727465642E0D 0 00002925 0A00 322 %endif 323 %if _PM 324 .readonly_verifysegm: 0 00002927 4D656D6F7279207573 db "Memory using selector " 0 00002930 696E672073656C6563 0 00002939 746F7220 326 .readonly_verifysegm.selector: 0 0000293D 2D2D2D2D2069732069 asciz "---- is inaccessible for writing.",13,10 0 00002946 6E6163636573736962 0 0000294F 6C6520666F72207772 0 00002958 6974696E672E0D0A00 328 %endif 0 00002961 5B6D6F72655D .more: db "[more]" 330 .more_size equ $-.more 0 00002967 0D .more_over: db 13 0 00002968 20 times .more_size db 32 0 0000296E 0D db 13 ; to overwrite previous prompt 334 .more_over_size equ $-.more_over 0 0000296F 5E430D0A .ctrlc: db "^C",13,10 336 .ctrlc_size equ $-.ctrlc 0 00002973 00 asciz 338 .freedos_ctrlc_workaround: 0 00002974 20284F6C6420467265 asciz " (Old FreeDOS kernel Ctrl-C work around happened)",13,10 0 0000297D 65444F53206B65726E 0 00002986 656C204374726C2D43 0 0000298F 20776F726B2061726F 0 00002998 756E64206861707065 0 000029A1 6E6564290D0A00 340 .not_while_indos: 0 000029A8 436F6D6D616E64206E asciz "Command not supported while in InDOS mode.",13,10 0 000029B1 6F7420737570706F72 0 000029BA 746564207768696C65 0 000029C3 20696E20496E444F53 0 000029CC 206D6F64652E0D0A00 0 000029D5 43757272656E74206D .rv_mode.before: asciz "Current mode: " 0 000029DE 6F64653A2000 343 %if _PM 0 000029E4 44504D492031362D62 .rv_mode_dpmi_16: asciz "DPMI 16-bit CS",13,10 0 000029ED 69742043530D0A00 0 000029F5 44504D492033322D62 .rv_mode_dpmi_32: asciz "DPMI 32-bit CS",13,10 0 000029FE 69742043530D0A00 346 %endif 0 00002A06 5265616C203836204D .rv_mode_r86m: asciz "Real 86 Mode",13,10 0 00002A0F 6F64650D0A00 0 00002A15 5669727475616C2038 .rv_mode_v86m: asciz "Virtual 86 Mode",13,10 0 00002A1E 36204D6F64650D0A00 349 0 00002A27 333836207265676973 .regs386: asciz "386 registers are " 0 00002A30 746572732061726520 0 00002A39 00 0 00002A3A 6E6F7420 .regs386_off:db "not " 0 00002A3E 646973706C61796564 .regs386_on: asciz "displayed",13,10 0 00002A47 0D0A00 353 354 %if _EMS 355 usemessagesegment 356 .xhelp: helppage ems 357 %endif 358 359 %if _PM 360 usesection lDEBUG_DATA_ENTRY 360 ------------------ note: usesection lDEBUG_DATA_ENTRY 0 00002A4A 4445534300 .desc: asciz "DESC" 362 usemessagesegment === Switch to base=009D80h -> "MESSAGESEGMENT" 362 ------------------ note: usesection MESSAGESEGMENT 363 .deschelp: helppage desc 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 42 <1> align 2, db 0 43 <1> %00: 0 000052EE 9200 dw %%end - %%start 45 <1> %%start: 46 000052F0 <1> incbin %%includename 47 <1> %%end: 364 %endif 365 366 %ifn _MESSAGESEGMENT 367 messagesegment_truncated_size equ 0 368 endarea messagesegment_truncated, 1 369 messagesegment_nobits_truncated_size equ 0 370 endarea messagesegment_nobits_truncated, 1 371 %endif 372 373 %ifn _LINK 374 %if !_BOOTLDR_DISCARD_HELP && _MESSAGESEGMENT 375 messagesegment_truncated_size equ messagesegment_size 376 endarea messagesegment_truncated, 1 377 messagesegment_nobits_truncated_size equ messagesegment_nobits_size 378 endarea messagesegment_nobits_truncated, 1 379 %endif 380 %if _EXTHELPBOOT 381 %if _BOOTLDR 382 usemessagesegment 383 %if _BOOTLDR_DISCARD_HELP 384 align 2, db 0 385 messagesegment_truncated_size equ fromparas(paras($ - messagesegment_start + fromwords(imsg.boothelp_replacement_size_w))) 386 endarea messagesegment_truncated, 1 387 %endif 388 .boothelp: helppage boot 389 %if _BOOTLDR_DISCARD_HELP 390 391 truncated_message_last equ .boothelp + fromwords(imsg.boothelp_replacement_size_w) 392 absolute truncated_message_last 393 %if _HELP_COMPRESSED 394 alignb 16 395 truncated_hshrink_message_buffer: equ $ 396 resb hshrink_message_buffer_size 397 %endif 398 399 alignb 16 400 messagesegment_nobits_truncated_size equ $ - $$ 401 endarea messagesegment_nobits_truncated, 1 402 %endif 403 %endif 404 %endif 405 406 %else ; _LINK 407 408 global behind_messagesegment_truncated 409 410 %if !_BOOTLDR_DISCARD_HELP && _MESSAGESEGMENT 411 behind_messagesegment_truncated equ behind_messagesegment 412 behind_messagesegment_nobits_truncated equ behind_messagesegment_nobits 413 %endif 414 %if _EXTHELPBOOT 415 %if _BOOTLDR 416 usemessagesegment 416 ------------------ note: usesection MESSAGESEGMENT 417 %if _BOOTLDR_DISCARD_HELP 418 align 2, db 0 419 %push 420 %define GET_MESSAGE_LENGTH 421 %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 422 %undef GET_MESSAGE_LENGTH 423 bootldr_discard_help_page_length equ fromwords(words(%$len)) 424 %pop 425 absolute $ 426 alignb 2 427 00005382 resb bootldr_discard_help_page_length 0 000053BA ???????????? alignb 16 429 behind_messagesegment_truncated: equ $ 430 usemessagesegment 430 ------------------ note: usesection MESSAGESEGMENT 431 %endif 432 .boothelp: helppage boot 36 <1> %defstr %%basename %1 37 <1> %if _LZEXEDAT 38 <1> %strcat %%includename %%basename, ".hlz" 39 <1> %else 40 <1> %strcat %%includename %%basename, ".hhs" 41 <1> %endif 42 <1> align 2, db 0 43 <1> %00: 0 00005382 CC05 dw %%end - %%start 45 <1> %%start: 46 00005384 <1> incbin %%includename 47 <1> %%end: 433 %if _BOOTLDR_DISCARD_HELP 434 435 truncated_message_last equ .boothelp + bootldr_discard_help_page_length 436 absolute truncated_message_last 437 %if _HELP_COMPRESSED 0 000053BA ???????????? alignb 16 439 truncated_hshrink_message_buffer: equ $ 440 000053C0 resb hshrink_message_buffer_size 441 %endif 442 0 00005ECA ???????????? alignb 16 444 behind_messagesegment_nobits_truncated: equ $ 445 %endif 446 %endif 447 %endif 448 449 usesection MESSAGESEGMENT 449 ------------------ note: usesection MESSAGESEGMENT 450 align 16, db 0 451 behind_messagesegment: equ $ 452 absolute $ 453 %if _HELP_COMPRESSED 454 alignb 16 455 nontruncated_hshrink_message_buffer: equ $ 456 hshrink_message_buffer: equ $ 457 00005950 resb hshrink_message_buffer_size 458 %endif 0 0000645A ???????????? alignb 16 460 behind_messagesegment_nobits: equ $ 461 %endif ; _LINK 462 463 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 463 ------------------ note: usesection lDEBUG_DATA_ENTRY 464 %if _TSR 0 00002A4F 43616E6E6F7420676F .pspnotfound: asciz "Cannot go resident, child PSP not found.",13,10 0 00002A58 207265736964656E74 0 00002A61 2C206368696C642050 0 00002A6A 5350206E6F7420666F 0 00002A73 756E642E0D0A00 0 00002A7A 43616E6E6F7420676F .psphooked: asciz "Cannot go resident, child PSP parent return address hooked.",13,10 0 00002A83 207265736964656E74 0 00002A8C 2C206368696C642050 0 00002A95 535020706172656E74 0 00002A9E 2072657475726E2061 0 00002AA7 64647265737320686F 0 00002AB0 6F6B65642E0D0A00 0 00002AB8 506174636865642050 .nowtsr1: asciz "Patched PSP at " 0 00002AC1 53502061742000 0 00002AC8 2C206E6F7720726573 .nowtsr2: asciz ", now resident.",13,10 0 00002AD1 6964656E742E0D0A00 0 00002ADA 416C72656164792072 .alreadytsr: asciz "Already resident.",13,10 0 00002AE3 65736964656E742E0D 0 00002AEC 0A00 470 .tsr_cannot_terminate_attached: 0 00002AEE 43616E6E6F74207465 asciz "Cannot terminate attached while resident.",13,10 0 00002AF7 726D696E6174652061 0 00002B00 747461636865642077 0 00002B09 68696C652072657369 0 00002B12 64656E742E0D0A00 472 .tsr_cannot_ll: 0 00002B1A 43616E6E6F74206C6F asciz "Cannot load process while resident. Use R DCO7 CLR= ",_4digitshex(opt7_no_tsr_ll)," to override.",13,10 0 00002B23 61642070726F636573 0 00002B2C 73207768696C652072 0 00002B35 65736964656E742E20 0 00002B3E 55736520522044434F 0 00002B47 3720434C523D203230 0 00002B50 303020746F206F7665 0 00002B59 72726964652E0D0A00 474 %endif 475 %if _ATTACH 0 00002B62 4E6F74207965742072 .notyettsr: asciz "Not yet resident. Cannot attach.",13,10 0 00002B6B 65736964656E742E20 0 00002B74 43616E6E6F74206174 0 00002B7D 746163682E0D0A00 0 00002B85 496E76616C69642050 .invalidpsp: asciz "Invalid PSP specified. Cannot attach.",13,10 0 00002B8E 535020737065636966 0 00002B97 6965642E2043616E6E 0 00002BA0 6F7420617474616368 0 00002BA9 2E0D0A00 0 00002BAD 53656C662D6F776E65 .selfownedpsp: asciz "Self-owned PSP specified. Cannot attach.",13,10 0 00002BB6 642050535020737065 0 00002BBF 6369666965642E2043 0 00002BC8 616E6E6F7420617474 0 00002BD1 6163682E0D0A00 0 00002BD8 506174636865642050 .nowattached: asciz "Patched PSP, now attached.",13,10 0 00002BE1 53502C206E6F772061 0 00002BEA 747461636865642E0D 0 00002BF3 0A00 0 00002BF5 41545441434800 .attach: asciz "ATTACH" 481 %endif 482 %if _PM && (_TSR || _BOOTLDR) 0 00002BFC 43616E6E6F74207175 .cannotpmquit: asciz "Cannot quit, still in protected mode.",13,10 0 00002C05 69742C207374696C6C 0 00002C0E 20696E2070726F7465 0 00002C17 63746564206D6F6465 0 00002C20 2E0D0A00 484 %endif 485 %if _PM 0 00002C24 50726F63657373206C .cannotpmload: asciz "Process loading aborted: Still in protected mode.",13,10 0 00002C2D 6F6164696E67206162 0 00002C36 6F727465643A205374 0 00002C3F 696C6C20696E207072 0 00002C48 6F746563746564206D 0 00002C51 6F64652E0D0A00 487 %endif 488 %if _BOOTLDR 0 00002C58 436F6D6D616E64206E .nobootsupp: asciz "Command not supported in boot loaded mode.",13,10 0 00002C61 6F7420737570706F72 0 00002C6A 74656420696E20626F 0 00002C73 6F74206C6F61646564 0 00002C7C 206D6F64652E0D0A00 0 00002C85 53687574646F776E20 .boot_quit_fail:asciz "Shutdown not supported.",13,10 0 00002C8E 6E6F7420737570706F 0 00002C97 727465642E0D0A00 0 00002C9F 426F6F74206661696C .bootfail: asciz "Boot failure: " 0 00002CA8 7572653A2000 0 00002CAE 52656164696E672073 .bootfail_read: db "Reading sector failed (error " 0 00002CB7 6563746F7220666169 0 00002CC0 6C656420286572726F 0 00002CC9 7220 0 00002CCB 5F5F68292E0D0A00 .bootfail_read_errorcode: asciz "__h).",13,10 0 00002CD3 426F6F742073656374 .bootfail_sig: asciz "Boot sector signature missing (is not AA55h).",13,10 0 00002CDC 6F72207369676E6174 0 00002CE5 757265206D69737369 0 00002CEE 6E6720286973206E6F 0 00002CF7 74204141353568292E 0 00002D00 0D0A00 0 00002D03 506172746974696F6E .bootfail_sig_parttable: ascii "Partition table signature missing" 0 00002D0C 207461626C65207369 0 00002D15 676E6174757265206D 0 00002D1E 697373696E67 0 00002D24 20286973206E6F7420 asciz " (is not AA55h).",13,10 0 00002D2D 4141353568292E0D0A 0 00002D36 00 0 00002D37 426F6F742073656374 .bootfail_code: asciz "Boot sector code invalid (is 0000h).",13,10 0 00002D40 6F7220636F64652069 0 00002D49 6E76616C6964202869 0 00002D52 73203030303068292E 0 00002D5B 0D0A00 498 .bootfail_secsizediffer: 0 00002D5E 425042204270532064 asciz "BPB BpS differs from actual sector size.",13,10 0 00002D67 696666657273206672 0 00002D70 6F6D2061637475616C 0 00002D79 20736563746F722073 0 00002D82 697A652E0D0A00 500 .bootfail_stack_underflow: 0 00002D89 426F6F742073746163 asciz "Boot stack underflowed.",13,10 0 00002D92 6B20756E646572666C 0 00002D9B 6F7765642E0D0A00 502 .bootfail_check_mismatch: 0 00002DA3 436865636B206D6973 db "Check mismatch, expected " 0 00002DAC 6D617463682C206578 0 00002DB5 70656374656420 504 .bootfail_check_mismatch.check_value: 0 00002DBC 5F5F5F5F6820617420 db "____h at offset " 0 00002DC5 6F666673657420 506 .bootfail_check_mismatch.check_offset: 0 00002DCC 5F5F5F5F6820627574 db "____h but has " 0 00002DD5 2068617320 508 .bootfail_check_mismatch.check_got: 0 00002DDA 5F5F5F5F682E0D0A00 asciz "____h.",13,10 0 00002DE3 4F7574206F66206D65 .boot_out_of_memory_error: asciz "Out of memory.", 13,10 0 00002DEC 6D6F72792E0D0A00 0 00002DF4 546F6F206D616E7920 .boot_too_many_partitions_error:asciz "Too many partitions (or a loop).",13,10 0 00002DFD 706172746974696F6E 0 00002E06 7320286F722061206C 0 00002E0F 6F6F70292E0D0A00 0 00002E17 506172746974696F6E .boot_partition_cycle_error: asciz "Partition table cycle detected.",13,10 0 00002E20 207461626C65206379 0 00002E29 636C65206465746563 0 00002E32 7465642E0D0A00 0 00002E39 506172746974696F6E .boot_partition_not_found: asciz "Partition not found.",13,10 0 00002E42 206E6F7420666F756E 0 00002E4B 642E0D0A00 0 00002E50 52656164206572726F .boot_access_error: asciz "Read error.", 13,10 0 00002E59 722E0D0A00 0 00002E5E 536563746F72207369 .boot_sector_too_large: asciz "Sector size too small (< 32 bytes).", 13,10 0 00002E67 7A6520746F6F20736D 0 00002E70 616C6C20283C203332 0 00002E79 206279746573292E0D 0 00002E82 0A00 0 00002E84 536563746F72207369 .boot_sector_too_small: asciz "Sector size too large (> 8192 bytes).", 13,10 0 00002E8D 7A6520746F6F206C61 0 00002E96 72676520283E203831 0 00002E9F 393220627974657329 0 00002EA8 2E0D0A00 0 00002EAC 536563746F72207369 .boot_sector_not_power: asciz "Sector size not a power of two.", 13,10 0 00002EB5 7A65206E6F74206120 0 00002EBE 706F776572206F6620 0 00002EC7 74776F2E0D0A00 0 00002ECE 496E76616C69642067 .boot_invalid_sectors: asciz "Invalid geometry sectors.", 13,10 0 00002ED7 656F6D657472792073 0 00002EE0 6563746F72732E0D0A 0 00002EE9 00 0 00002EEA 496E76616C69642067 .boot_invalid_heads: asciz "Invalid geometry heads.", 13,10 0 00002EF3 656F6D657472792068 0 00002EFC 656164732E0D0A00 0 00002F04 46696C65206E6F7420 .boot_file_not_found: asciz "File not found.",13,10 0 00002F0D 666F756E642E0D0A00 0 00002F16 46696C6520746F6F20 .boot_file_too_big_error: asciz "File too big.",13,10 0 00002F1F 6269672E0D0A00 0 00002F26 46696C6520746F6F20 .boot_file_too_small_error: asciz "File too small.",13,10 0 00002F2F 736D616C6C2E0D0A00 0 00002F38 42616420616D6F756E .boot_badclusters: asciz "Bad amount of clusters.",13,10 0 00002F41 74206F6620636C7573 0 00002F4A 746572732E0D0A00 0 00002F52 42616420636C757374 .boot_badchain: asciz "Bad cluster chain.",13,10 0 00002F5B 657220636861696E2E 0 00002F64 0D0A00 0 00002F67 4261642046696C6520 .boot_badfat: asciz "Bad File Allocation Table.",13,10 0 00002F70 416C6C6F636174696F 0 00002F79 6E205461626C652E0D 0 00002F82 0A00 0 00002F84 496E76616C69642066 .boot_invalid_filename: asciz "Invalid filename.",13,10 0 00002F8D 696C656E616D652E0D 0 00002F96 0A00 0 00002F98 43616E6E6F74207365 .boot_cannot_set_both: asciz "Cannot set both " 0 00002FA1 7420626F74682000 0 00002FA9 20616E642000 .boot_and: asciz " and " 0 00002FAF 2E0D0A00 .boot_dot_crlf: asciz ".",13,10 0 00002FB3 2120496E7465726E61 .boot_internal_error: asciz "! Internal error !",13,10 0 00002FBC 6C206572726F722021 0 00002FC5 0D0A00 0 00002FC8 42504220616E64206C .boot_bpb_load_overlap: asciz "BPB and load area overlap.",13,10 0 00002FD1 6F6164206172656120 0 00002FDA 6F7665726C61702E0D 0 00002FE3 0A00 0 00002FE5 5365676D656E742074 .boot_segment_too_low: asciz "Segment too low.",13,10 0 00002FEE 6F6F206C6F772E0D0A 0 00002FF7 00 0 00002FF8 42504220746F6F206C .boot_bpb_too_low: asciz "BPB too low.",13,10 0 00003001 6F772E0D0A00 0 00003007 2120496E7465726E61 .boot_auxbuff_crossing: db "! Internal error !, " 0 00003010 6C206572726F722021 0 00003019 2C20 0 0000301B 617578627566662063 asciz "auxbuff crosses 64 KiB boundary.",13,10 0 00003024 726F73736573203634 0 0000302D 204B694220626F756E 0 00003036 646172792E0D0A00 0 0000303E 5245414400 .read: asciz "READ" 0 00003043 575249544500 .write: asciz "WRITE" 0 00003049 48494444454E00 .hidden: asciz "HIDDEN" 0 00003050 48494444454E414444 .hiddenadd: asciz "HIDDENADD" 0 00003059 00 0 0000305A 44495200 .dir: asciz "DIR" 0 0000305E 082020205B4449525D .dirinsteadsize:countedb " [DIR]" 0 00003067 2F00 .emptydirname: asciz "/" 0 00003069 424F4F5400 .boot: asciz "BOOT" 0 0000306E 5155495400 .quit: asciz "QUIT" 0 00003073 50524F544F434F4C00 .protocol: asciz "PROTOCOL" 0 0000307C 5345474D454E5400 .segment: asciz "SEGMENT" 0 00003084 454E54525900 .entry: asciz "ENTRY" 0 0000308A 434F5059 .copybpb: db "COPY" 0 0000308E 42504200 .bpb: asciz "BPB" 0 00003092 4D494E5041524100 .minpara: asciz "MINPARA" 0 0000309A 4D41585041524100 .maxpara: asciz "MAXPARA" 0 000030A2 434845434B4F464653 .checkoffset: asciz "CHECKOFFSET" 0 000030AB 455400 0 000030AE 434845434B56414C55 .checkvalue: asciz "CHECKVALUE" 0 000030B7 4500 0 000030B9 534543544F5200 .sector: asciz "SECTOR" 0 000030C0 534543544F52414C54 .sector_alt: asciz "SECTORALT" 0 000030C9 00 0 000030CA 4B45524E454C2E5359 .freedos_kernel_name: asciz "KERNEL.SYS" 0 000030D3 5300 0 000030D5 49504C2E53595300 .dosc_kernel_name: asciz "IPL.SYS" 0 000030DD 445242494F2E535953 .edrdos_kernel_name: asciz "DRBIO.SYS" 0 000030E6 00 0 000030E7 445242494F532E5359 .drdos9_kernel_name: asciz "DRBIOS.SYS" 0 000030F0 5300 0 000030F2 4C444F532E434F4D00 .ldos_kernel_name: asciz "LDOS.COM" 561 .msdos7_kernel_name: 0 000030FB 494F2E53595300 .msdos6_kernel_name: asciz "IO.SYS" 0 00003102 4D53444F532E535953 .msdos6_add_name: asciz "MSDOS.SYS" 0 0000310B 00 0 0000310C 49424D42494F2E434F .ibmdos_kernel_name: asciz "IBMBIO.COM" 0 00003115 4D00 0 00003117 49424D444F532E434F .ibmdos_add_name: asciz "IBMDOS.COM" 0 00003120 4D00 0 00003122 4E544C445200 .ntldr_kernel_name: asciz "NTLDR" 0 00003128 424F4F544D475200 .bootmgr_kernel_name: asciz "BOOTMGR" 0 00003130 424F4F54534543542E .chain_kernel_name: asciz "BOOTSECT.DOS" 0 00003139 444F5300 0 0000313D 5258444F5342494F2E .rxdos.0_kernel_name: asciz "RXDOSBIO.SYS" 0 00003146 53595300 0 0000314A 525842494F2E535953 .rxdos.1_kernel_name: asciz "RXBIO.SYS" 0 00003153 00 571 .rxdos.0_add_name: 0 00003154 5258444F532E535953 .rxdos.1_add_name: asciz "RXDOS.SYS" 0 0000315D 00 0 0000315E 5258444F532E434F4D .rxdos.2_kernel_name: asciz "RXDOS.COM" 0 00003167 00 0 00003168 00 .addname_empty: asciz 0 00003169 43616E6E6F74207175 .cannotbootquit_memsizes: asciz "Cannot quit, memory size changed.",13,10 0 00003172 69742C206D656D6F72 0 0000317B 792073697A65206368 0 00003184 616E6765642E0D0A00 576 %endif 0 0000318D 554E .uninstall: db "UN" 0 0000318F 494E5354414C4C00 .install: asciz "INSTALL" 0 00003197 544F47474C4500 .toggle: asciz "TOGGLE" 0 0000319E 20697320616C726561 .alreadyenabled:asciz " is already enabled.",13,10 0 000031A7 647920656E61626C65 0 000031B0 642E0D0A00 0 000031B5 20697320616C726561 .alreadydisabled:asciz " is already disabled.",13,10 0 000031BE 64792064697361626C 0 000031C7 65642E0D0A00 0 000031CD 3A20547279696E6720 .tryenable: asciz ": Trying to enable.",13,10 0 000031D6 746F20656E61626C65 0 000031DF 2E0D0A00 0 000031E3 3A20547279696E6720 .trydisable: asciz ": Trying to disable.",13,10 0 000031EC 746F2064697361626C 0 000031F5 652E0D0A00 584 %if _LOADER 585 .move: asciz "MOVE" 586 .bottom: asciz "BOTTOM" 587 .isnow: asciz "Now i" 588 .isalready: asciz "Already i" 589 .isbottom: asciz "Is resident at bottom.",13,10 590 .istop: asciz "Is resident at top.",13,10 591 .ishidden: asciz "Is resident beyond top (hidden).",13,10 592 .move_empty: asciz "Error: Empty N extension query!",13,10 593 .move_must_be_bottom: asciz "Error: Must be at bottom to install N extension!",13,10 594 .move_rpl: asciz "Error: RPL present!",13,10 595 .move_nottop: asciz "Error: NLDR not hidden at top!",13,10 596 .move_oom: asciz "Error: Out of memory!",13,10 597 global msg.move_overlap 598 .move_overlap: asciz "Error: Memory overlap detected!",13,10 599 .move_ebdanottop: asciz "Error: EBDA not at top of memory!",13,10 600 .move_toolargeebda: asciz "Error: EBDA too large!",13,10 601 .unsupportedmove: asciz "Error: This movement is not supported!",13,10 602 .move_auxbuff_error: asciz "Error: Auxiliary buffer cannot be placed!",13,10 603 .move_auxup: asciz "Auxiliary buffer moved up.",13,10 604 .move_auxdown: asciz "Auxiliary buffer moved down.",13,10 605 .move_int_panic: db "Critical " 606 .move_int_error: asciz "Error: An interrupt hook cannot be unhooked!",13,10 607 .loader_bottom_not_allowed: 608 asciz "Error: Boot sector load disallowed while resident at bottom!",13,10 609 .loader_too_low_load: 610 asciz "Error: Load segment intersects loader resident at bottom!",13,10 611 .loader_error: 612 asciz "Error: Debugger load invariant broken, not supported!",13,10 613 .godebug: asciz "GODEBUG" 614 .loader_must_be_hidden: 615 asciz "Error: Go Debug command must be run from hidden.",13,10 616 .loader_extra: 617 asciz "Error: Extended lsvExtra entry not found.",13,10 618 .loader_stack: 619 asciz "Error: Load Stack Variables allocation too small!",13,10 620 .loader_loadseg_low: 621 asciz "Error: Load end segment in LSV too low.",13,10 622 .loader_sign: 623 asciz "Error: Loader support signature not found.",13,10 624 .loader_flag: 625 asciz "Error: Loader support unknown flag set.",13,10 626 align 4, db 0 627 dw 0 ; make sure this is word-aligned but not para-aligned 628 .loadsupportsignature: 629 db "LOAD","ERSU","PPOR","T00" ; signature and version 630 .loadsupportsignature.size equ $ - .loadsupportsignature 631 %endif 632 %if _AREAS_HOOK_SERVER || (_AREAS && _AREAS_HOOK_CLIENT) 633 .qqlate_areas_error: 0 000031FA 496E7465726E616C20 asciz "Internal error in Q command uninstalling areas.",13,10 0 00003203 6572726F7220696E20 0 0000320C 5120636F6D6D616E64 0 00003215 20756E696E7374616C 0 0000321E 6C696E672061726561 0 00003227 732E0D0A00 635 %endif 636 %if _AREAS && _AREAS_HOOK_CLIENT 0 0000322C 417265617320696E73 .areasinstalled: asciz "Areas installed.",13,10 0 00003235 74616C6C65642E0D0A 0 0000323E 00 0 0000323F 417265617320616C72 .areasalreadyinstalled: asciz "Areas already installed.",13,10 0 00003248 6561647920696E7374 0 00003251 616C6C65642E0D0A00 0 0000325A 4172656173206E6F74 .areasnodebuggerfound: asciz "Areas not installed, no debugger AMIS interface found!",13,10 0 00003263 20696E7374616C6C65 0 0000326C 642C206E6F20646562 0 00003275 756767657220414D49 0 0000327E 5320696E7465726661 0 00003287 636520666F756E6421 0 00003290 0D0A00 0 00003293 4172656173206E6F74 .areasnotsupported: asciz "Areas not installed, debugger AMIS interface does not support function!",13,10 0 0000329C 20696E7374616C6C65 0 000032A5 642C20646562756767 0 000032AE 657220414D49532069 0 000032B7 6E7465726661636520 0 000032C0 646F6573206E6F7420 0 000032C9 737570706F72742066 0 000032D2 756E6374696F6E210D 0 000032DB 0A00 0 000032DD 4172656173206E6F74 .areasnotinstalled: db "Areas not installed, debugger returned code " 0 000032E6 20696E7374616C6C65 0 000032EF 642C20646562756767 0 000032F8 65722072657475726E 0 00003301 656420636F646520 0 00003309 2D2D682E0D0A00 .areasnotinstalled.code:asciz "--h.",13,10 0 00003310 417265617320616C72 .areasalreadyuninstalled: asciz "Areas already uninstalled.",13,10 0 00003319 6561647920756E696E 0 00003322 7374616C6C65642E0D 0 0000332B 0A00 0 0000332D 417265617320756E69 .areasuninstalled: db "Areas uninstalled, debugger returned code " 0 00003336 6E7374616C6C65642C 0 0000333F 206465627567676572 0 00003348 2072657475726E6564 0 00003351 20636F646520 0 00003357 2D2D682E0D0A00 .areasuninstalled.code: asciz "--h.",13,10 646 %endif 0 0000335E 5448454E00 .then: asciz "THEN" 0 00003363 4E4F5400 .not: asciz "NOT" 0 00003367 52565600 .rvv: asciz "RVV" 0 0000336B 52564D00 .rvm: asciz "RVM" 0 0000336F 52565000 .rvp: asciz "RVP" 0 00003373 52564400 .rvd: asciz "RVD" 653 %if _MMXSUPP && _RM 654 .rm: asciz "RM" 655 %endif 656 %if _BOOTLDR 0 00003377 4D6F64653A20426F6F .rvp_boot: ascizline "Mode: Boot loaded" 0 00003380 74206C6F616465640D 0 00003389 0A00 658 %endif 659 %if _DEVICE 660 %if _ATTACH 0 0000338B 4D6F64653A20446576 .rvp_device_attached: ascizline "Mode: Device driver attached" 0 00003394 696365206472697665 0 0000339D 722061747461636865 0 000033A6 640D0A00 662 %endif 0 000033AA 4D6F64653A20446576 .rvp_device: ascizline "Mode: Device driver" 0 000033B3 696365206472697665 0 000033BC 720D0A00 664 %endif 665 %if _APPLICATION 666 %if _TSR 0 000033C0 4D6F64653A20417070 .rvp_tsr: ascizline "Mode: Application installed as TSR" 0 000033C9 6C69636174696F6E20 0 000033D2 696E7374616C6C6564 0 000033DB 206173205453520D0A 0 000033E4 00 668 %endif 0 000033E5 4D6F64653A20417070 .rvp_application: ascizline "Mode: Application" 0 000033EE 6C69636174696F6E0D 0 000033F7 0A00 670 %endif 0 000033F9 0D436F646520736567 .vm_codeseg: counted "Code segment=" 0 00003402 6D656E743D 672 %if _DUALCODE 0 00003407 0E436F646532207365 .vm_code2seg: counted "Code2 segment=" 0 00003410 676D656E743D 674 %endif 0 00003416 0D4461746120736567 .vm_dataseg: counted "Data segment=" 0 0000341F 6D656E743D 0 00003424 0E456E747279207365 .vm_entryseg: counted "Entry segment=" 0 0000342D 676D656E743D 677 %if _MESSAGESEGMENT 0 00003433 104D65737361676520 .vm_messageseg: counted "Message segment=" 0 0000343C 7365676D656E743D 679 %endif 0 00003444 104175786275666620 .vm_auxseg: counted "Auxbuff segment=" 0 0000344D 7365676D656E743D 681 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00003455 10486973746F727920 .vm_hisseg: counted "History segment=" 0 0000345E 7365676D656E743D 683 %endif 684 %if _PM 0 00003466 0A2073656C6563746F .vm_selector: counted " selector=" 0 0000346F 723D 686 %endif 0 00003471 0D436C69656E742020 .vp_pspsegment: counted "Client PSP=" 0 0000347A 205053503D 0 0000347F 0D4465627567676572 .vp_dpspsegment: counted "Debugger PSP=" 0 00003488 205053503D 689 .vp_dparent: 0 0000348D 0820506172656E743D .vp_parent: counted " Parent=" 691 .vp_dpra: 0 00003496 1720506172656E7420 .vp_pra: counted " Parent Return Address=" 0 0000349F 52657475726E204164 0 000034A8 64726573733D 693 %if _PM 694 .vp_dpspsel: 0 000034AE 0E205053502053656C .vp_pspsel: counted " PSP Selector=" 0 000034B7 6563746F723D 696 %endif 0 000034BD 4E6F74206C6F616465 .rvd_not_device: asciz "Not loaded in device mode.",13,10 0 000034C6 6420696E2064657669 0 000034CF 6365206D6F64652E0D 0 000034D8 0A00 698 %if _DEVICE 0 000034DA 114465766963652068 .rvd_deviceheader: counted "Device header at " 0 000034E3 656164657220617420 0 000034EC 212E20416D6F756E74 .rvd_size: counted ". Amount paragraphs allocated is " 0 000034F5 207061726167726170 0 000034FE 687320616C6C6F6361 0 00003507 74656420697320 701 %endif 0 0000350E 546F6F206C6F6E6720 .n_toolongtail: asciz "Too long N command tail!",13,10 0 00003517 4E20636F6D6D616E64 0 00003520 207461696C210D0A00 0 00003529 546F6F206C6F6E6720 .n_toolongname: asciz "Too long N command name!",13,10 0 00003532 4E20636F6D6D616E64 0 0000353B 206E616D65210D0A00 0 00003544 4E554D42455200 .number: asciz "NUMBER" 0 0000354B 434F554E54455200 .counter: asciz "COUNTER" 0 00003553 494400 .id: asciz "ID" 0 00003556 5748454E00 .when: asciz "WHEN" 0 0000355B 4F464653455400 .offset: asciz "OFFSET" 0 00003562 3F00 .questionmark: asciz "?" 0 00003564 4F .or: db "O" 0 00003565 5200 .r: asciz "R" 0 00003567 4E4400 .nd: asciz "ND" 0 0000356A 4C5200 .lr: asciz "LR" 0 0000356D 52454D454D42455200 .remember: asciz "REMEMBER" 0 00003576 474F544F00 .goto: asciz "GOTO" 0 0000357B 534F4600 .sof: asciz "SOF" 0 0000357F 454F4600 .eof: asciz "EOF" 0 00003583 4572726F723A20474F .goto_not_file: asciz "Error: GOTO command not supported when not reading a script.",13,10 0 0000358C 544F20636F6D6D616E 0 00003595 64206E6F7420737570 0 0000359E 706F72746564207768 0 000035A7 656E206E6F74207265 0 000035B0 6164696E6720612073 0 000035B9 63726970742E0D0A00 0 000035C2 4572726F723A20474F .goto_empty: asciz "Error: GOTO needs a destination label.",13,10 0 000035CB 544F206E6565647320 0 000035D4 612064657374696E61 0 000035DD 74696F6E206C616265 0 000035E6 6C2E0D0A00 0 000035EB 4572726F723A20474F .goto_not_found.1: asciz "Error: GOTO destination label ",'"' 0 000035F4 544F2064657374696E 0 000035FD 6174696F6E206C6162 0 00003606 656C202200 0 0000360B 22206E6F7420666F75 .goto_not_found.2: asciz '"'," not found.",13,10 0 00003614 6E642E0D0A00 0 0000361A 4572726F723A206175 .guard_auxbuff_error: asciz "Error: auxbuff already guarded!",13,10 0 00003623 786275666620616C72 0 0000362C 656164792067756172 0 00003635 646564210D0A00 0 0000363C 4572726F723A20436F .guard_re_error: asciz "Error: Command not supported while reading from RE buffer.",13,10 0 00003645 6D6D616E64206E6F74 0 0000364E 20737570706F727465 0 00003657 64207768696C652072 0 00003660 656164696E67206672 0 00003669 6F6D20524520627566 0 00003672 6665722E0D0A00 0 00003679 4572726F723A20436F .guard_rc_error: asciz "Error: Command not supported while reading from RC buffer.",13,10 0 00003682 6D6D616E64206E6F74 0 0000368B 20737570706F727465 0 00003694 64207768696C652072 0 0000369D 656164696E67206672 0 000036A6 6F6D20524320627566 0 000036AF 6665722E0D0A00 0 000036B6 4572726F723A20556E .unexpected_auxbuff_guard: asciz "Error: Unexpected auxbuff guard!",13,10 0 000036BF 657870656374656420 0 000036C8 617578627566662067 0 000036D1 75617264210D0A00 726 %if _SYMBOLIC 0 000036D9 4572726F723A20556E .unexpected_nosymbols: asciz "Error: Unexpected no symbols flag!",13,10 0 000036E2 657870656374656420 0 000036EB 6E6F2073796D626F6C 0 000036F4 7320666C6167210D0A 0 000036FD 00 728 %endif 0 000036FE 4572726F723A20556E .unexpected_noneol_re: asciz "Error: Unexpected non-EOL in RE processing!",13,10 0 00003707 657870656374656420 0 00003710 6E6F6E2D454F4C2069 0 00003719 6E2052452070726F63 0 00003722 657373696E67210D0A 0 0000372B 00 0 0000372C 4572726F723A20556E .unexpected_noneol_rc: asciz "Error: Unexpected non-EOL in RC processing!",13,10 0 00003735 657870656374656420 0 0000373E 6E6F6E2D454F4C2069 0 00003747 6E2052432070726F63 0 00003750 657373696E67210D0A 0 00003759 00 0 0000375A 5245504C41434500 .replace: asciz "REPLACE" 0 00003762 415050454E4400 .append: asciz "APPEND" 0 00003769 44 .dword: db "D" 0 0000376A 574F524400 .word: asciz "WORD" 0 0000376F 33 .3byte: db "3" 0 00003770 4259544500 .byte: asciz "BYTE" 0 00003775 4C494E455300 .lines: asciz "LINES" 738 %if _RH 0 0000377B 524800 .rh: asciz "RH" 0 0000377E 526567697374657220 .rh_enabled: asciz "Register dump history enabled.",13,10 0 00003787 64756D702068697374 0 00003790 6F727920656E61626C 0 00003799 65642E0D0A00 0 0000379F 526567697374657220 .rh_disabled: asciz "Register dump history disabled.",13,10 0 000037A8 64756D702068697374 0 000037B1 6F7279206469736162 0 000037BA 6C65642E0D0A00 0 000037C1 0A2020524820737465 .rh_step.1: counted " RH step=" 0 000037CA 703D 0 000037CC 0B2020646563696D61 .rh_step.2: counted " decimal: " 0 000037D5 6C3A20 744 %endif 745 %if _HELP_COMPRESSED 0 000037D8 496E7465726E616C20 .hshrink_error: asciz "Internal error: Depack failure!",13,10 0 000037E1 6572726F723A204465 0 000037EA 7061636B206661696C 0 000037F3 757265210D0A00 747 %endif 748 %if _TEST_HELP_FILE 749 .testhelp: asciz "TESTHELP" 750 %endif 751 %if 1 || _STRNUM 0 000037FA 415300 .as: asciz "AS" 753 %endif 754 %if _DTOP || _LOADER 0 000037FD 544F5000 .top: asciz "TOP" 756 %endif 757 %if _COUNT || _RH 0 00003801 434F554E5400 .count: asciz "COUNT" 759 %endif 760 %if _CLEAR 0 00003807 434C45415200 .clear: asciz "CLEAR" 0 0000380D 1B631B5B324A0D0A00 .clear_sequence:asciz 27,"c",27,"[2J",13,10 763 ; Note that the first sequence will not have an effect 764 ; when writing to int 10h in non-dumb mode. Therefore, 765 ; it will advance the cursor to a nonzero column. 766 ; This is required by the dumb mode detection code. 767 %endif 768 %if _HHDIVREMAIN 769 .hh_div_remainder: 0 00003816 0D72656D61696E6465 counted "remainder is " 0 0000381F 7220697320 771 %endif 772 %if _CONFIG 0 00003824 3A3A434F4E4649473A .configkeyword: asciz "::CONFIG:" 0 0000382D 00 0 0000382E 3A3A53435249505453 .scriptskeyword:asciz "::SCRIPTS:" 0 00003837 3A00 0 00003839 3A3A454D5054593A00 .emptykeyword: asciz "::EMPTY:" 776 %endif 777 %if _EXECUTABLE 0 00003842 3A3A45584543555441 .executablekeyword: asciz "::EXECUTABLE:" 0 0000384B 424C453A00 779 %endif 780 %if _EXTENSIONS 0 00003850 496E7465726E616C20 .ext_error_internal: asciz "Internal error in EXT command.",13,10 0 00003859 6572726F7220696E20 0 00003862 45585420636F6D6D61 0 0000386B 6E642E0D0A00 0 00003871 45585420636F6D6D61 .ext_error_io: asciz "EXT command got I/O error.",13,10 0 0000387A 6E6420676F7420492F 0 00003883 4F206572726F722E0D 0 0000388C 0A00 0 0000388E 4E6F206F7220696E76 .ext_error_invalid: asciz "No or invalid Extension for lDebug header.",13,10 0 00003897 616C69642045787465 0 000038A0 6E73696F6E20666F72 0 000038A9 206C44656275672068 0 000038B2 65616465722E0D0A00 0 000038BB 4F7574206F66206D65 .ext_error_oom: asciz "Out of memory in EXT command.",13,10 0 000038C4 6D6F727920696E2045 0 000038CD 585420636F6D6D616E 0 000038D6 642E0D0A00 0 000038DB 45585400 .ext: asciz "EXT" 0 000038DF 457874656E73696F6E .eld_load_error:db "Extension for lDebug had an error during loading. Code: " 0 000038E8 20666F72206C446562 0 000038F1 75672068616420616E 0 000038FA 206572726F72206475 0 00003903 72696E67206C6F6164 0 0000390C 696E672E20436F6465 0 00003915 3A20 0 00003917 2D2D2D2D2E0D0A00 .eld_error_code:asciz "----.",13,10 788 %ifn _DUALCODE 789 .duallink_return_error: asciz "! Internal error in dual call link return !",13,10 790 %endif 791 %endif 0 0000391F 47494200 .gib: asciz "GIB" 0 00003923 4D494200 .mib: asciz "MIB" 0 00003927 4B494200 .kib: asciz "KIB" 0 0000392B 504147455300 .pages: asciz "PAGES" 0 00003931 504152414752415048 .paragraphs: asciz "PARAGRAPHS" 0 0000393A 5300 0 0000393C 504152415300 .paras: asciz "PARAS" 0 00003942 51574F52445300 .qwords: asciz "QWORDS" 0 00003949 44 .dwords: db "D" 0 0000394A 574F52445300 .words: asciz "WORDS" 0 00003950 425954455300 .bytes: asciz "BYTES" 0 00003956 4C454E47544800 .length: asciz "LENGTH" 0 0000395D 454E4400 .end: asciz "END" 0 00003961 52414E474500 .range: asciz "RANGE" 805 %if _VXCHG 0 00003967 4F4E00 .on: asciz "ON" 0 0000396A 4F464600 .off: asciz "OFF" 808 .vv_enable_failure: 0 0000396E 556E61626C6520746F asciz "Unable to enable video swapping.",13,10 0 00003977 20656E61626C652076 0 00003980 6964656F2073776170 0 00003989 70696E672E0D0A00 0 00003991 566964656F20737761 .vv_disabled: asciz "Video swapping is disabled, use V ON to switch it on.",13,10 0 0000399A 7070696E6720697320 0 000039A3 64697361626C65642C 0 000039AC 207573652056204F4E 0 000039B5 20746F207377697463 0 000039BE 68206974206F6E2E0D 0 000039C7 0A00 811 %endif 0 000039C9 5245564552534500 .reverse: asciz "REVERSE" 0 000039D1 56414C554500 .value: asciz "VALUE" 0 000039D7 494E00 .in: asciz "IN" 0 000039DA 4558495354494E4700 .existing: asciz "EXISTING" 0 000039E3 46524F4D00 .from: asciz "FROM" 0 000039E8 544F00 .to: asciz "TO" 0 000039EB 455845435554494E47 .executing: asciz "EXECUTING" 0 000039F4 00 0 000039F5 46524F4D204C494E45 .executing_value_range: asciz "FROM LINEAR cs:cip LENGTH abo - cip" 0 000039FE 41522063733A636970 0 00003A07 204C454E4754482061 0 00003A10 626F202D2063697000 0 00003A19 4C494E45415200 .linear: asciz "LINEAR" 821 %if _IMMASM 822 .immasm_error_eip: 0 00003A20 4572726F722C206272 asciz "Error, branch targets EIP beyond 64 KiB.",13,10 0 00003A29 616E63682074617267 0 00003A32 657473204549502062 0 00003A3B 65796F6E6420363420 0 00003A44 4B69422E0D0A00 824 %endif 825 %if _PM 0 00003A4B 444553435459504500 .desctype: asciz "DESCTYPE" 827 %endif 0 00003A54 4E4F54 .nottaken: db "NOT" 0 00003A57 54414B454E00 .taken: asciz "TAKEN" 0 00003A5D 4E .nt: db "N" 0 00003A5E 5400 .t: asciz "T" 0 00003A60 4241534500 .base: asciz "BASE" 0 00003A65 47524F555000 .group: asciz "GROUP" 0 00003A6B 574944544800 .width: asciz "WIDTH" 835 %if _HISTORY 836 .history_internal_error: 0 00003A71 0D0A496E7465726E61 asciz 13,10,"Internal error in history handling!",13,10 0 00003A7A 6C206572726F722069 0 00003A83 6E20686973746F7279 0 00003A8C 2068616E646C696E67 0 00003A95 210D0A00 838 %endif 839 %if _INT 840 %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 00003A99 07204572726F7221 .di_error: counted " Error!" 0 00003AA1 0768696464656E20 .di_hidden: counted "hidden " 0 00003AA9 0720284949535029 .di_iisp: counted " (IISP)" 0 00003AB1 1320286E6F6E737461 .di_nonstd_iisp:counted " (nonstandard IISP)" 0 00003ABA 6E6461726420494953 0 00003AC3 5029 0 00003AC5 132028756E696E7374 .di_uninst_iisp:counted " (uninstalled IISP)" 0 00003ACE 616C6C656420494953 0 00003AD7 5029 21 <1> .di_freedos_reloc: 0 00003AD9 1220284644206B6572 counted " (FD kernel reloc)" 0 00003AE2 6E656C2072656C6F63 0 00003AEB 29 0 00003AEC 0E2028666172206A6D .di_jmpfar: counted " (far jmp imm)" 0 00003AF5 7020696D6D29 24 <1> .di_jmpfarindirect: 0 00003AFB 132028666172206A6D counted " (far jmp indirect)" 0 00003B04 7020696E6469726563 0 00003B0D 7429 0 00003B0F 0C2028746573742068 .di_testhook: counted " (test hook)" 0 00003B18 6F6F6B29 0 00003B1C 1C2028746F6F206D61 .di_toomany: counted " (too many chained handlers)" 0 00003B25 6E7920636861696E65 0 00003B2E 642068616E646C6572 0 00003B37 7329 0 00003B39 0F20656D707479204D .di_empty: counted " empty MCB name" 0 00003B42 4342206E616D65 0 00003B49 0B2073797374656D20 .di_system_mcb: counted " system MCB" 0 00003B52 4D4342 30 <1> .di_system_upper: 0 00003B55 0E2073797374656D20 counted " system in UMA" 0 00003B5E 696E20554D41 0 00003B64 0E2073797374656D20 .di_system_low: counted " system in LMA" 0 00003B6D 696E204C4D41 0 00003B73 112068696768206D65 .di_hma: counted " high memory area" 0 00003B7C 6D6F72792061726561 0 00003B85 06205B6D70783A .di_multiplex.1:counted " [mpx:" 0 00003B8C 0768206C6973743A .di_multiplex.2:counted "h list:" 0 00003B94 02685D .di_multiplex.3:counted "h]" 37 <1> 38 <1> %if _PM 39 <1> gatewrong: equ $ 0 00003B97 67617465206E6F7420 asciz "gate not accessible",13,10 0 00003BA0 61636365737369626C 0 00003BA9 650D0A00 41 <1> %endif 841 %endif 0 00003BAD 68656164657200 .header: asciz "header" 843 .header.length: equ $ - 1 - .header 0 00003BB4 747261696C657200 .trailer: asciz "trailer" 845 .trailer.length:equ $ - 1 - .trailer 0 00003BBC 415400 .at: asciz "AT" 0 00003BBF 5748494C4500 .while: asciz "WHILE" 0 00003BC5 53494C454E5400 .silent: asciz "SILENT" 0 00003BCC 534C45455000 .sleep: asciz "SLEEP" 0 00003BD2 5345434F4E445300 .seconds: asciz "SECONDS" 0 00003BDA 5449434B5300 .ticks: asciz "TICKS" 0 00003BE0 52452070726F636573 .re_limit_reached: asciz "RE processing reached RELIMIT, aborting.",13,10 0 00003BE9 73696E672072656163 0 00003BF2 6865642052454C494D 0 00003BFB 49542C2061626F7274 0 00003C04 696E672E0D0A00 0 00003C0B 52432070726F636573 .rc_limit_reached: asciz "RC processing reached RCLIMIT, aborting.",13,10 0 00003C14 73696E672072656163 0 00003C1D 6865642052434C494D 0 00003C26 49542C2061626F7274 0 00003C2F 696E672E0D0A00 0 00003C36 2120496E7465726E61 .silent_error: asciz "! Internal error during silent buffer handling !",13,10 0 00003C3F 6C206572726F722064 0 00003C48 7572696E672073696C 0 00003C51 656E74206275666665 0 00003C5A 722068616E646C696E 0 00003C63 6720210D0A00 0 00003C69 5768696C6520636F6E .while_not_true:asciz "While condition not true, returning.",13,10 0 00003C72 646974696F6E206E6F 0 00003C7B 7420747275652C2072 0 00003C84 657475726E696E672E 0 00003C8D 0D0A00 0 00003C90 5768696C6520636F6E .while_terminated_before: asciz "While condition ",'"' 0 00003C99 646974696F6E202200 0 00003CA2 22206E6F206C6F6E67 .while_terminated_after: asciz '"'," no longer true.",13,10 0 00003CAB 657220747275652E0D 0 00003CB4 0A00 0 00003CB6 4E6F2073657269616C .no_progress: asciz "No serial comm progress after 5 seconds, giving up. (Keyboard enabled.)",13,10 0 00003CBF 20636F6D6D2070726F 0 00003CC8 677265737320616674 0 00003CD1 65722035207365636F 0 00003CDA 6E64732C2067697669 0 00003CE3 6E672075702E20284B 0 00003CEC 6579626F6172642065 0 00003CF5 6E61626C65642E290D 0 00003CFE 0A00 0 00003D00 0D0A436F6E64746E6C .serial_request_keep: asciz 13,10,_PROGNAME," connected to serial port. Enter KEEP to confirm.",13,10 0 00003D09 2E2044656275676761 0 00003D12 626C65206C44656275 0 00003D1B 675820636F6E6E6563 0 00003D24 74656420746F207365 0 00003D2D 7269616C20706F7274 0 00003D36 2E20456E746572204B 0 00003D3F 45455020746F20636F 0 00003D48 6E6669726D2E0D0A00 0 00003D51 4E6F204B454550206B .serial_no_keep_timer: asciz "No KEEP keyword confirmation after timeout, giving up. (Keyboard enabled.)",13,10 0 00003D5A 6579776F726420636F 0 00003D63 6E6669726D6174696F 0 00003D6C 6E2061667465722074 0 00003D75 696D656F75742C2067 0 00003D7E 6976696E672075702E 0 00003D87 20284B6579626F6172 0 00003D90 6420656E61626C6564 0 00003D99 2E290D0A00 0 00003D9E 4E6F204B454550206B .serial_no_keep_enter: asciz "No KEEP keyword confirmation, enabling keyboard.",13,10 0 00003DA7 6579776F726420636F 0 00003DB0 6E6669726D6174696F 0 00003DB9 6E2C20656E61626C69 0 00003DC2 6E67206B6579626F61 0 00003DCB 72642E0D0A00 862 %if _VXCHG 0 00003DD1 4E4F .nokeep: db "NO" 864 %endif 0 00003DD3 4B45455000 .keep: asciz "KEEP" 0 00003DD8 4572726F723A20556E .cannot_hook_2D.invalid: asciz "Error: Unable to hook interrupt 2Dh due to invalid handler.",13,10 0 00003DE1 61626C6520746F2068 0 00003DEA 6F6F6B20696E746572 0 00003DF3 727570742032446820 0 00003DFC 64756520746F20696E 0 00003E05 76616C69642068616E 0 00003E0E 646C65722E0D0A00 0 00003E16 4572726F723A20556E .cannot_hook_2D.nofree: asciz "Error: Unable to hook interrupt 2Dh, no free multiplex number.",13,10 0 00003E1F 61626C6520746F2068 0 00003E28 6F6F6B20696E746572 0 00003E31 72757074203244682C 0 00003E3A 206E6F206672656520 0 00003E43 6D756C7469706C6578 0 00003E4C 206E756D6265722E0D 0 00003E55 0A00 0 00003E57 5761726E696E673A20 .serial_cannot_unhook: db "Warning: " 0 00003E60 556E61626C6520746F .serial_cannot_unhook.nowarn: db "Unable to unhook interrupt " 0 00003E69 20756E686F6F6B2069 0 00003E72 6E7465727275707420 0 00003E7B 2D2D682E0D0A00 .serial_cannot_unhook.int: asciz "--h.",13,10 0 00003E82 4572726F723A20556E .serial_cannot_hook: db "Error: Unable to hook interrupt " 0 00003E8B 61626C6520746F2068 0 00003E94 6F6F6B20696E746572 0 00003E9D 7275707420 0 00003EA2 2D2D68206265636175 .serial_cannot_hook.new_int: db "--h because interrupt " 0 00003EAB 736520696E74657272 0 00003EB4 75707420 0 00003EB8 2D2D68207374696C6C .serial_cannot_hook.old_int: asciz "--h still hooked.",13,10 0 00003EC1 20686F6F6B65642E0D 0 00003ECA 0A00 0 00003ECC 537563636565646564 .serial_late_unhook: db "Succeeded in unhooking interrupt " 0 00003ED5 20696E20756E686F6F 0 00003EDE 6B696E6720696E7465 0 00003EE7 727275707420 0 00003EED 2D2D682E0D0A00 .serial_late_unhook.int: asciz "--h.",13,10 0 00003EF4 496E7465726E616C20 .line_out_overflow: asciz "Internal error, line_out buffer overflowed!",13,10 0 00003EFD 6572726F722C206C69 0 00003F06 6E655F6F7574206275 0 00003F0F 66666572206F766572 0 00003F18 666C6F776564210D0A 0 00003F21 00 877 %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00003F22 041B5B376D .highlight: counted 27,"[7m" 879 %if _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00003F27 00 db 0 881 %endif 0 00003F28 031B5B6D .unhighlight: counted 27,"[m" 883 %if _GETLINEHIGHLIGHT || _DHIGHLIGHT 0 00003F2C 00 db 0 885 %endif 886 %endif 0 00003F2D 206B4D475400 .prefixes: asciz " kMGT" 0 00003F33 50726F63657373206C .ll_unterm: ascizline "Process loading aborted: Attached process didn't terminate!" 0 00003F3C 6F6164696E67206162 0 00003F45 6F727465643A204174 0 00003F4E 746163686564207072 0 00003F57 6F6365737320646964 0 00003F60 6E2774207465726D69 0 00003F69 6E617465210D0A00 0 00003F71 43616E6E6F74207175 .qq_unterm: ascizline "Cannot quit, attached process didn't terminate!" 0 00003F7A 69742C206174746163 0 00003F83 6865642070726F6365 0 00003F8C 7373206469646E2774 0 00003F95 207465726D696E6174 0 00003F9E 65210D0A00 890 %if _PM 0 00003FA3 43616E6E6F74207175 .qq_still_pm: ascizline "Cannot quit, still in PM after attached process terminated!" 0 00003FAC 69742C207374696C6C 0 00003FB5 20696E20504D206166 0 00003FBE 746572206174746163 0 00003FC7 6865642070726F6365 0 00003FD0 7373207465726D696E 0 00003FD9 61746564210D0A00 892 %endif 0 00003FE1 417474616368656420 .qq_a_unterminated: ascizline "Attached process didn't terminate." 0 00003FEA 70726F636573732064 0 00003FF3 69646E277420746572 0 00003FFC 6D696E6174652E0D0A 0 00004005 00 0 00004006 417474616368656420 .qq_a_terminated: ascizline "Attached process did terminate." 0 0000400F 70726F636573732064 0 00004018 6964207465726D696E 0 00004021 6174652E0D0A00 0 00004028 43616E6E6F74206372 .ensure_no_memory: ascizline "Cannot create empty attached process, out of memory!" 0 00004031 6561746520656D7074 0 0000403A 792061747461636865 0 00004043 642070726F63657373 0 0000404C 2C206F7574206F6620 0 00004055 6D656D6F7279210D0A 0 0000405E 00 896 %if _DEVICE 897 .qq_device_none_selected: 0 0000405F 43616E6E6F74207175 ascizline "Cannot quit normally when loaded as device driver! Try QC or QD command." 0 00004068 6974206E6F726D616C 0 00004071 6C79207768656E206C 0 0000407A 6F6164656420617320 0 00004083 646576696365206472 0 0000408C 697665722120547279 0 00004095 205143206F72205144 0 0000409E 20636F6D6D616E642E 0 000040A7 0D0A00 899 .qq_device_no_d: 0 000040AA 43616E6E6F74207175 ascizline "Cannot quit to device driver initialisation, state modified!" 0 000040B3 697420746F20646576 0 000040BC 696365206472697665 0 000040C5 7220696E697469616C 0 000040CE 69736174696F6E2C20 0 000040D7 7374617465206D6F64 0 000040E0 6966696564210D0A00 901 .qq_device_no_c: 0 000040E9 43616E6E6F74207175 ascizline "Cannot quit from device driver container, not found!" 0 000040F2 69742066726F6D2064 0 000040FB 657669636520647269 0 00004104 76657220636F6E7461 0 0000410D 696E65722C206E6F74 0 00004116 20666F756E64210D0A 0 0000411F 00 903 %if _PM 0 00004120 43616E6E6F74207175 .qq_device_pm: ascizline "Cannot quit device driver in PM!" 0 00004129 697420646576696365 0 00004132 206472697665722069 0 0000413B 6E20504D210D0A00 905 %endif 0 00004143 00 align 2, db 0 0 00004144 4E554C20 .NULblank: fill 8, 32, db "NUL" 908 %endif 0 0000414C 4330 .c0: db "C0" 0 0000414E 0D .cr: db 13 911 0 0000414F 41424F525400 .abort: asciz "ABORT" 913 %if _EXTENSIONS || _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 0 00004155 45584953545300 .exists: asciz "EXISTS" 0 0000415C 5900 .y: asciz "Y" 0 0000415E 20636F6D6D616E6420 .yy_requires_filename: asciz " command requires a filename.",13,10 0 00004167 726571756972657320 0 00004170 612066696C656E616D 0 00004179 652E0D0A00 0 0000417E 20636F6D6D616E6420 .yy_filename_empty: asciz " command filename is empty.",13,10 0 00004187 66696C656E616D6520 0 00004190 697320656D7074792E 0 00004199 0D0A00 0 0000419C 20636F6D6D616E6420 .yy_too_many_handles: asciz " command has too many open files.",13,10 0 000041A5 68617320746F6F206D 0 000041AE 616E79206F70656E20 0 000041B7 66696C65732E0D0A00 0 000041C0 20636F6D6D616E6420 .yy_error_file_open: asciz " command failed to open file.",13,10 0 000041C9 6661696C656420746F 0 000041D2 206F70656E2066696C 0 000041DB 652E0D0A00 0 000041E0 20636F6D6D616E6420 .yy_no_file: asciz " command limited to label only valid in script file.",13,10 0 000041E9 6C696D697465642074 0 000041F2 6F206C6162656C206F 0 000041FB 6E6C792076616C6964 0 00004204 20696E207363726970 0 0000420D 742066696C652E0D0A 0 00004216 00 921 %endif 922 %if _INPUT_FILE_HANDLES || _EXTENSIONS 0 00004217 20636F6D6D616E6420 .yy_no_dos: asciz " command requires DOS to be available.",13,10 0 00004220 726571756972657320 0 00004229 444F5320746F206265 0 00004232 20617661696C61626C 0 0000423B 652E0D0A00 924 .yy_filename_missing_unquote: 0 00004240 20636F6D6D616E6420 asciz " command filename missing ending quote.",13,10 0 00004249 66696C656E616D6520 0 00004252 6D697373696E672065 0 0000425B 6E64696E672071756F 0 00004264 74652E0D0A00 926 %endif 927 %if _INPUT_FILE_BOOT || _EXTENSIONS 0 0000426A 20636F6D6D616E6420 .yy_too_large: asciz " command file too large.",13,10 0 00004273 66696C6520746F6F20 0 0000427C 6C617267652E0D0A00 0 00004285 20636F6D6D616E6420 .yy_empty: asciz " command file empty.",13,10 0 0000428E 66696C6520656D7074 0 00004297 792E0D0A00 930 %endif 931 932 %if _SYMBOLIC 0 0000429C 416C6C6F636174696E .zz_switch_s_received: asciz "Allocating symbol table buffer of " 0 000042A5 672073796D626F6C20 0 000042AE 7461626C6520627566 0 000042B7 666572206F662000 934 .zz_switch_s_received_xms: 0 000042BF 416C6C6F636174696E asciz "Allocating XMS symbol table buffer (including transfer buffer) of " 0 000042C8 6720584D532073796D 0 000042D1 626F6C207461626C65 0 000042DA 206275666665722028 0 000042E3 696E636C7564696E67 0 000042EC 207472616E73666572 0 000042F5 206275666665722920 0 000042FE 6F662000 0 00004302 46726565696E672073 .zz_switch_s_freeing: asciz "Freeing symbol table buffer.",13,10 0 0000430B 796D626F6C20746162 0 00004314 6C6520627566666572 0 0000431D 2E0D0A00 0 00004321 43616E277420636861 .zz_switch_s_indos: db "Can't change symbol table buffer allocation" 0 0000432A 6E67652073796D626F 0 00004333 6C207461626C652062 0 0000433C 756666657220616C6C 0 00004345 6F636174696F6E 0 0000434C 207768696C6520696E asciz " while in DOS!",13,10 0 00004355 20444F53210D0A00 939 %if _BOOTLDR 940 .zz_switch_s_internal_error: 0 0000435D 496E7465726E616C20 asciz "Internal error in Z /S switch handling!",13,10 0 00004366 6572726F7220696E20 0 0000436F 5A202F532073776974 0 00004378 63682068616E646C69 0 00004381 6E67210D0A00 942 .zz_switch_s_boot_memsize_differ: 0 00004387 43616E6E6F74206368 asciz "Cannot change symbol table buffer allocation, memory size changed!",13,10 0 00004390 616E67652073796D62 0 00004399 6F6C207461626C6520 0 000043A2 62756666657220616C 0 000043AB 6C6F636174696F6E2C 0 000043B4 206D656D6F72792073 0 000043BD 697A65206368616E67 0 000043C6 6564210D0A00 944 .zz_switch_s_boot_transfer_too_low: 0 000043CC 43616E6E6F7420656E asciz "Cannot enlarge symbol table buffer that much, transfer buffer too low!",13,10 0 000043D5 6C617267652073796D 0 000043DE 626F6C207461626C65 0 000043E7 206275666665722074 0 000043F0 686174206D7563682C 0 000043F9 207472616E73666572 0 00004402 206275666665722074 0 0000440B 6F6F206C6F77210D0A 0 00004414 00 946 .zz_switch_s_boot_loaded_kernel: 0 00004415 43616E6E6F74206368 asciz "Cannot change symbol table buffer allocation, kernel has been loaded!",13,10 0 0000441E 616E67652073796D62 0 00004427 6F6C207461626C6520 0 00004430 62756666657220616C 0 00004439 6C6F636174696F6E2C 0 00004442 206B65726E656C2068 0 0000444B 6173206265656E206C 0 00004454 6F61646564210D0A00 948 .zz_switch_s_boot_rpl: 0 0000445D 43616E6E6F74206368 asciz "Cannot change symbol table buffer allocation, RPL has been loaded!",13,10 0 00004466 616E67652073796D62 0 0000446F 6F6C207461626C6520 0 00004478 62756666657220616C 0 00004481 6C6F636174696F6E2C 0 0000448A 2052504C2068617320 0 00004493 6265656E206C6F6164 0 0000449C 6564210D0A00 950 %endif 0 000044A2 43616E6E6F7420616C .zz_s_cannot_alloc_transfer: asciz "Cannot allocate transfer buffer!",13,10 0 000044AB 6C6F63617465207472 0 000044B4 616E73666572206275 0 000044BD 66666572210D0A00 0 000044C5 43616E6E6F7420616C .zz_s_cannot_alloc_target: asciz "Cannot allocate target buffer!",13,10 0 000044CE 6C6F63617465207461 0 000044D7 726765742062756666 0 000044E0 6572210D0A00 0 000044E6 53796D626F6C207461 .zz_too_full: asciz "Symbol tables are too full for this reallocation.",13,10 0 000044EF 626C65732061726520 0 000044F8 746F6F2066756C6C20 0 00004501 666F72207468697320 0 0000450A 7265616C6C6F636174 0 00004513 696F6E2E0D0A00 0 0000451A 556E61626C6520746F .zz_xms_not_freed_1: asciz "Unable to free symbol table XMS handle = " 0 00004523 20667265652073796D 0 0000452C 626F6C207461626C65 0 00004535 20584D532068616E64 0 0000453E 6C65203D2000 0 00004544 682E0D0A00 .zz_xms_not_freed_2: asciz "h.",13,10 0 00004549 496E76616C69642073 .invaliddata: asciz "Invalid symbol table data!",13,10 0 00004552 796D626F6C20746162 0 0000455B 6C652064617461210D 0 00004564 0A00 957 %if _SECOND_SLICE && (_XMS_SYMBOL_TABLE || _BUFFER_86MM_SLICE) 958 .error_second_slice: asciz "Invalid symbol table access slice usage!",13,10 959 %endif 0 00004566 53796D626F6C206D61 .main_too_full: asciz "Symbol main array is too full!",13,10 0 0000456F 696E20617272617920 0 00004578 697320746F6F206675 0 00004581 6C6C210D0A00 0 00004587 53796D626F6C206D61 .main_too_full_crit1: asciz "Symbol main array is too full! Critical error. (Earlier check succeeded.)",13,10 0 00004590 696E20617272617920 0 00004599 697320746F6F206675 0 000045A2 6C6C21204372697469 0 000045AB 63616C206572726F72 0 000045B4 2E20284561726C6965 0 000045BD 7220636865636B2073 0 000045C6 75636365656465642E 0 000045CF 290D0A00 0 000045D3 53796D626F6C206861 .hash_too_full_crit1: asciz "Symbol hash array is too full! Critical error. (Earlier check succeeded.)",13,10 0 000045DC 736820617272617920 0 000045E5 697320746F6F206675 0 000045EE 6C6C21204372697469 0 000045F7 63616C206572726F72 0 00004600 2E20284561726C6965 0 00004609 7220636865636B2073 0 00004612 75636365656465642E 0 0000461B 290D0A00 0 0000461F 53796D626F6C206861 .hash_too_full_crit2: asciz "Symbol hash array is too full! Critical error. (Main has space.)",13,10 0 00004628 736820617272617920 0 00004631 697320746F6F206675 0 0000463A 6C6C21204372697469 0 00004643 63616C206572726F72 0 0000464C 2E20284D61696E2068 0 00004655 61732073706163652E 0 0000465E 290D0A00 0 00004662 53796D626F6C207374 .str_too_full: asciz "Symbol string heap is too full!",13,10 0 0000466B 72696E672068656170 0 00004674 20697320746F6F2066 0 0000467D 756C6C210D0A00 0 00004684 53796D626F6C207374 .str_too_long: asciz "Symbol string is too long!",13,10 0 0000468D 72696E672069732074 0 00004696 6F6F206C6F6E67210D 0 0000469F 0A00 0 000046A1 0D0A4D61696E20746F .liststore.main.end.first: asciz 13,10,"Main total:",9 0 000046AA 74616C3A0900 0 000046B0 4D61696E2066726565 .liststore.main.free.first: asciz "Main free:",9 0 000046B9 3A0900 0 000046BC 4D61696E2075736564 .liststore.main.used.first: asciz "Main used:",9 0 000046C5 3A0900 0 000046C8 0D0A4861736820746F .liststore.hash.end.first: asciz 13,10,"Hash total:",9 0 000046D1 74616C3A0900 0 000046D7 486173682066726565 .liststore.hash.free.first: asciz "Hash free:",9 0 000046E0 3A0900 0 000046E3 486173682075736564 .liststore.hash.used.first: asciz "Hash used:",9 0 000046EC 3A0900 0 000046EF 0D0A537472696E6720 .liststore.str.end.first: asciz 13,10,"String total:",9 0 000046F8 746F74616C3A0900 0 00004700 537472696E67206672 .liststore.str.free.first: asciz "String free:",9 0 00004709 65653A0900 0 0000470E 537472696E67207573 .liststore.str.used.first: asciz "String used:",9 0 00004717 65643A0900 0 0000471C 20696E2000 .liststore.second: asciz " in " 0 00004721 20756E69740D0A00 .liststore.third.singular: asciz " unit",13,10 0 00004729 20756E6974730D0A00 .liststore.third.plural: asciz " units",13,10 0 00004732 537472696E67732073 .liststore.str.first: asciz "Strings size is " 0 0000473B 697A652069732000 0 00004743 556E7265666572656E .liststore.str.unref.first: asciz "Unreferenced strings size is " 0 0000474C 63656420737472696E 0 00004755 67732073697A652069 0 0000475E 732000 980 .liststore.str.unref.second: 0 00004761 20696E2000 .liststore.str.second: asciz " in " 982 .liststore.str.unref.third.singular: 0 00004766 20737472696E672E0D .liststore.str.third.singular: asciz " string.",13,10 0 0000476F 0A00 984 .liststore.str.unref.third.plural: 0 00004771 20737472696E67732E .liststore.str.third.plural: asciz " strings.",13,10 0 0000477A 0D0A00 0 0000477D 417665726167652073 .liststore.str.fourth: asciz "Average string structure length is <= " 0 00004786 7472696E6720737472 0 0000478F 756374757265206C65 0 00004798 6E677468206973203C 0 000047A1 3D2000 0 000047A4 4572726F723A204176 .liststore.str.invalid: asciz "Error: Average string structure length too large" 0 000047AD 657261676520737472 0 000047B6 696E67207374727563 0 000047BF 74757265206C656E67 0 000047C8 746820746F6F206C61 0 000047D1 72676500 0 000047D5 43616E6E6F74206361 .liststore.str.nofourth:asciz "Cannot calculate average string structure length, number of strings is zero" 0 000047DE 6C63756C6174652061 0 000047E7 766572616765207374 0 000047F0 72696E672073747275 0 000047F9 6374757265206C656E 0 00004802 6774682C206E756D62 0 0000480B 6572206F6620737472 0 00004814 696E6773206973207A 0 0000481D 65726F00 0 00004821 2E0D0A00 .liststore.str.last: asciz ".",13,10 990 .symhint: 0 00004825 2E2E4073796D68696E .symhint_store_string: db "..@symhint_" 0 0000482E 745F 992 .symhint_size: equ $ - .symhint 0 00004830 73746F72655F737472 db "store_string_" 0 00004839 696E675F 994 .symhint_store_string_size equ $ - .symhint_store_string 0 0000483D 74726163655F63616C .trace_caller: db "trace_caller" 0 00004846 6C6572 996 .trace_caller_size: equ $ - .trace_caller 0 00004849 74726163655F686572 .trace_here: db "trace_here" 0 00004852 65 998 .trace_here_size: equ $ - .trace_here 0 00004853 736B69705F63616C6C .skip_caller: db "skip_caller_" 0 0000485C 65725F 1000 .skip_caller_size: equ $ - .skip_caller 0 0000485F 736B69705F68657265 .skip_here: db "skip_here_" 0 00004868 5F 1002 .skip_here_size: equ $ - .skip_here 0 00004869 415343495A00 .asciz: asciz "ASCIZ" 0 0000486F 52616E67653A2000 .zz_list_range_first: asciz "Range: " 0 00004877 682D2D00 .zz_list_range_second: asciz "h--" 0 0000487B 6800 .zz_list_range_third: asciz "h" 1007 .zz_list_add_none: db "" 0 0000487D 204E6F2073796D626F .zz_list_none: asciz " No symbols found",13,10 0 00004886 6C7320666F756E640D 0 0000488F 0A00 0 00004891 0D0A00 .zz_list_start: asciz 13,10 0 00004894 00 .zz_list_between: asciz 0 00004895 204C696E6561723D00 .zz_list_first: asciz " Linear=" 0 0000489E 204F66667365743D00 .zz_list_second: asciz " Offset=" 0 000048A7 6820466C6167733D00 .zz_list_flags: asciz "h Flags=" 0 000048B0 68203D202200 .zz_list_middle: asciz "h = ",'"' 0 000048B6 220D0A00 .zz_list_last: asciz '"',13,10 0 000048BA 00 .zz_list_end: asciz 0 000048BB 3B2000 .zz_list_add_range: asciz "; " 0 000048BE 7A20616464206C696E .zz_list_add_first: asciz "z add linear=(" 0 000048C7 6561723D2800 0 000048CD 202B20763100 .zz_list_base: asciz " + v1" 0 000048D3 202B20736C2E00 .zz_list_base_symbol: asciz " + sl." 0 000048DA 29206F66667365743D .zz_list_add_second: asciz ") offset=" 0 000048E3 00 0 000048E4 2073796D626F6C3D27 .zz_list_add_middle: asciz " symbol='" 0 000048ED 00 0 000048EE 20666C6167733D00 .zz_list_add_flags: asciz " flags=" 0 000048F6 270D0A00 .zz_list_add_last: asciz "'",13,10 0 000048FA 3B .zz_match_add_none: db ";" 0 000048FB 204E6F2073796D626F .zz_match_none: asciz " No symbols found",13,10 0 00004904 6C7320666F756E640D 0 0000490D 0A00 0 0000490F 53796D626F6C20616C .existing_block: asciz "Symbol already exists and is being blocked.",13,10 0 00004918 726561647920657869 0 00004921 73747320616E642069 0 0000492A 73206265696E672062 0 00004933 6C6F636B65642E0D0A 0 0000493C 00 0 0000493D 53796D626F6C206465 .poison_block: asciz "Symbol definition is poisoned and is being blocked.",13,10 0 00004946 66696E6974696F6E20 0 0000494F 697320706F69736F6E 0 00004958 656420616E64206973 0 00004961 206265696E6720626C 0 0000496A 6F636B65642E0D0A00 0 00004973 5354415400 .stat: asciz "STAT" 0 00004978 4D4154434800 .match: asciz "MATCH" 0 0000497E 41444400 .add: asciz "ADD" 0 00004982 434F4D4D495400 .commit: asciz "COMMIT" 0 00004989 44454C00 .del: asciz "DEL" 0 0000498D 44454C45544500 .delete: asciz "DELETE" 0 00004994 554E52454653545249 .unrefstring: asciz "UNREFSTRING" 0 0000499D 4E4700 0 000049A0 52454C4F4300 .reloc: asciz "RELOC" 0 000049A6 52454C4F4341544500 .relocate: asciz "RELOCATE" 0 000049AF 53594D424F4C00 .symbol: asciz "SYMBOL" 0 000049B6 464C41475300 .flags: asciz "FLAGS" 0 000049BC 534C00 .sl: asciz "SL" 0 000049BF 4D415800 .max: asciz "MAX" 1042 %if _XMS_SYMBOL_TABLE 0 000049C3 4E6F20584D53206472 .zz_no_xms: asciz "No XMS driver detected!",13,10 0 000049CC 697665722064657465 0 000049D5 63746564210D0A00 0 000049DD 4661696C656420746F .zz_fail_xms_alloc: asciz "Failed to allocate XMS block!",13,10 0 000049E6 20616C6C6F63617465 0 000049EF 20584D5320626C6F63 0 000049F8 6B210D0A00 0 000049FD 4661696C656420746F .zz_fail_xms_access: asciz "Failed to access XMS block!",13,10 0 00004A06 206163636573732058 0 00004A0F 4D5320626C6F636B21 0 00004A18 0D0A00 1046 %endif 0 00004A1B 436F6D70616374696F .zz_main_hash_mismatch: asciz "Compaction/expansion failed, differing amounts of hash and main entries.",13,10 0 00004A24 6E2F657870616E7369 0 00004A2D 6F6E206661696C6564 0 00004A36 2C2064696666657269 0 00004A3F 6E6720616D6F756E74 0 00004A48 73206F662068617368 0 00004A51 20616E64206D61696E 0 00004A5A 20656E74726965732E 0 00004A63 0D0A00 0 00004A66 436F6D70616374696F .zz_main_not_first: asciz "Compaction/expansion failed, main array is not first.",13,10 0 00004A6F 6E2F657870616E7369 0 00004A78 6F6E206661696C6564 0 00004A81 2C206D61696E206172 0 00004A8A 726179206973206E6F 0 00004A93 742066697273742E0D 0 00004A9C 0A00 0 00004A9E 436F6D70616374696F .zz_hash_not_second: asciz "Compaction/expansion failed, hash array is not second.",13,10 0 00004AA7 6E2F657870616E7369 0 00004AB0 6F6E206661696C6564 0 00004AB9 2C2068617368206172 0 00004AC2 726179206973206E6F 0 00004ACB 74207365636F6E642E 0 00004AD4 0D0A00 0 00004AD7 436F6D70616374696F .zz_str_not_third: asciz "Compaction/expansion failed, string heap is not third.",13,10 0 00004AE0 6E2F657870616E7369 0 00004AE9 6F6E206661696C6564 0 00004AF2 2C20737472696E6720 0 00004AFB 68656170206973206E 0 00004B04 6F742074686972642E 0 00004B0D 0D0A00 0 00004B10 436F6D70616374696F .zz_table_not_full: asciz "Compaction/expansion failed, table is not full.",13,10 0 00004B19 6E2F657870616E7369 0 00004B22 6F6E206661696C6564 0 00004B2B 2C207461626C652069 0 00004B34 73206E6F742066756C 0 00004B3D 6C2E0D0A00 0 00004B42 53796D626F6C207461 .zz_too_much: asciz "Symbol table size is too large. Internal error!",13,10 0 00004B4B 626C652073697A6520 0 00004B54 697320746F6F206C61 0 00004B5D 7267652E20496E7465 0 00004B66 726E616C206572726F 0 00004B6F 72210D0A00 0 00004B74 53796D626F6C207461 .zz_too_short: asciz "Symbol table size is too short. Internal error!",13,10 0 00004B7D 626C652073697A6520 0 00004B86 697320746F6F207368 0 00004B8F 6F72742E20496E7465 0 00004B98 726E616C206572726F 0 00004BA1 72210D0A00 0 00004BA6 537472696E67207379 .zz_str_overflow: asciz "String symbol table got too large. Internal error!",13,10 0 00004BAF 6D626F6C207461626C 0 00004BB8 6520676F7420746F6F 0 00004BC1 206C617267652E2049 0 00004BCA 6E7465726E616C2065 0 00004BD3 72726F72210D0A00 0 00004BDB 53796D626F6C207461 .zz_length_mismatch: asciz "Symbol table table size mismatch. Internal error!",13,10 0 00004BE4 626C65207461626C65 0 00004BED 2073697A65206D6973 0 00004BF6 6D617463682E20496E 0 00004BFF 7465726E616C206572 0 00004C08 726F72210D0A00 0 00004C0F 537472696E67207379 .zz_too_small_str: asciz "String symbol table target is too small.",13,10 0 00004C18 6D626F6C207461626C 0 00004C21 652074617267657420 0 00004C2A 697320746F6F20736D 0 00004C33 616C6C2E0D0A00 1057 .zz_too_small_hash: 0 00004C3A 4D61696E2F68617368 .zz_too_small_mainhash: asciz "Main/hash symbol table target is too small.",13,10 0 00004C43 2073796D626F6C2074 0 00004C4C 61626C652074617267 0 00004C55 657420697320746F6F 0 00004C5E 20736D616C6C2E0D0A 0 00004C67 00 1059 .zz_internal_error_expand: 0 00004C68 496E7465726E616C20 asciz "Internal error during symbol table expansion!",13,10 0 00004C71 6572726F7220647572 0 00004C7A 696E672073796D626F 0 00004C83 6C207461626C652065 0 00004C8C 7870616E73696F6E21 0 00004C95 0D0A00 0 00004C98 4E6F2073796D626F6C .zz_reloc_amount_none: asciz "No symbols found in given source range.",13,10 0 00004CA1 7320666F756E642069 0 00004CAA 6E20676976656E2073 0 00004CB3 6F757263652072616E 0 00004CBC 67652E0D0A00 0 00004CC2 53796D626F6C206E6F .zz_del_amount_none: asciz "Symbol not found!",13,10 0 00004CCB 7420666F756E64210D 0 00004CD4 0A00 0 00004CD6 52656C6F6361746564 .zz_reloc_amount_1: asciz "Relocated " 0 00004CDF 2000 0 00004CE1 44656C657465642000 .zz_del_amount_1: asciz "Deleted " 1065 .zz_reloc_amount_2.plural: 0 00004CEA 2073796D626F6C732E .zz_del_amount_2.plural: asciz " symbols.",13,10 0 00004CF3 0D0A00 1067 .zz_reloc_amount_2.singular: 0 00004CF6 2073796D626F6C2E0D .zz_del_amount_2.singular: asciz " symbol.",13,10 0 00004CFF 0A00 0 00004D01 43616E6E6F74207265 .zz_reloc_overflow: asciz "Cannot relocate, length of source range overflows!",13,10 0 00004D0A 6C6F636174652C206C 0 00004D13 656E677468206F6620 0 00004D1C 736F75726365207261 0 00004D25 6E6765206F76657266 0 00004D2E 6C6F7773210D0A00 0 00004D36 546F6F206D616E7920 .bb_sym_too_many: asciz "Too many symbol breakpoints!",13,10 0 00004D3F 73796D626F6C206272 0 00004D48 65616B706F696E7473 0 00004D51 210D0A00 0 00004D55 53796D626F6C206272 .bb_sym_beyond_linear: asciz "Symbol breakpoint linear is beyond reach!",13,10 0 00004D5E 65616B706F696E7420 0 00004D67 6C696E656172206973 0 00004D70 206265796F6E642072 0 00004D79 65616368210D0A00 0 00004D81 53796D626F6C206272 .bb_sym_beyond_offset: asciz "Symbol breakpoint offset is beyond reach!",13,10 0 00004D8A 65616B706F696E7420 0 00004D93 6F6666736574206973 0 00004D9C 206265796F6E642072 0 00004DA5 65616368210D0A00 1073 %endif 1074 1075 %if _BREAKPOINTS 0 00004DAD 414C4C00 .all: asciz "ALL" 0 00004DB1 4E455700 .new: asciz "NEW" 0 00004DB5 4E6F20756E75736564 .bb_no_new: asciz "No unused breakpoint left!",13,10 0 00004DBE 20627265616B706F69 0 00004DC7 6E74206C656674210D 0 00004DD0 0A00 0 00004DD2 19486974207065726D .bb_hit.1: counted "Hit permanent breakpoint " 0 00004DDB 616E656E7420627265 0 00004DE4 616B706F696E7420 1080 .bb_hit.2.nocounter: 0 00004DEC 020D0A counted 13,10 1082 %if _SYMBOLIC 0 00004DEF 164869742073796D62 .bb_sym_hit.1: counted "Hit symbol breakpoint " 0 00004DF8 6F6C20627265616B70 0 00004E01 6F696E7420 1084 .bb_sym_hit.2.nocounter: 0 00004E06 020D0A counted 13,10 1086 %endif 0 00004E09 1C5061737365642070 .bb_pass.1: counted "Passed permanent breakpoint " 0 00004E12 65726D616E656E7420 0 00004E1B 627265616B706F696E 0 00004E24 7420 1088 .bb_hit.2.counter: 0 00004E26 0A2C20636F756E7465 .bb_pass.2: counted ", counter=" 0 00004E2F 723D 1090 .bb_hit.3.counter.no_id: 1091 .bb_pass.3.no_id: 1092 .bb_hitpass_id.after: 0 00004E31 020D0A counted 13,10 1094 .bb_hitpass_id.long: 0 00004E34 070D0A2049443A20 counted 13,10," ID: " 1096 .bb_hitpass_id.short: 0 00004E3C 062C2049443A20 counted ", ID: " 0 00004E43 205748454E2000 .bb_when: asciz " WHEN " 1099 0 00004E4A 42502000 .bp: asciz "BP " 0 00004E4E 202B00 .bpenabled: asciz " +" 0 00004E51 202D00 .bpdisabled: asciz " -" 0 00004E54 20556E7573656400 .bpunused: asciz " Unused" 0 00004E5C 204C696E3D00 .bpaddress: asciz " Lin=" 0 00004E62 202800 .bpcontent: asciz " (" 0 00004E65 2920436F756E746572 .bpcounter: asciz ") Counter=" 0 00004E6E 3D00 1107 %if 0 1108 BP 00 Unused 1109 BP 00 + Lin=12345678 (CC) Counter=8000 1110 1234567890123456789012345678901234567890 1111 %endif 0 00004E70 4E6F20627265616B70 .bpnone: asciz "No breakpoints set currently.",13,10 0 00004E79 6F696E747320736574 0 00004E82 2063757272656E746C 0 00004E8B 792E0D0A00 0 00004E90 4E6F20627265616B70 .bpnone_at: asciz "No breakpoint set at given address currently.",13,10 0 00004E99 6F696E742073657420 0 00004EA2 617420676976656E20 0 00004EAB 616464726573732063 0 00004EB4 757272656E746C792E 0 00004EBD 0D0A00 1114 %endif 0 00004EC0 5468652000 .cant_bp_the: asciz "The " 0 00004EC5 70726F636565642062 .cant_bp_type_proceed: asciz "proceed breakpoint" 0 00004ECE 7265616B706F696E74 0 00004ED7 00 0 00004ED8 7065726D616E656E74 .cant_bp_type_permanent: db "permanent breakpoint " 0 00004EE1 20627265616B706F69 0 00004EEA 6E7420 0 00004EED 5F5F00 .cant_bp_type_permanent.index: asciz "__" 1119 %if _SYMBOLIC 0 00004EF0 73796D626F6C206272 .cant_bp_type_symbol: db "symbol breakpoint " 0 00004EF9 65616B706F696E7420 0 00004F02 5F5F00 .cant_bp_type_symbol.index: asciz "__" 1122 %endif 0 00004F05 204720627265616B70 .cant_bp_type_gg: asciz " G breakpoint" 0 00004F0E 6F696E7400 0 00004F13 20286C696E65617220 .cant_bp_linear: db " (linear " 0 00004F1C 2D2D2D2D5F .cant_bp_linear.address1: db "----_" 0 00004F21 2D2D2D2D292000 .cant_bp_linear.address2: asciz "----) " 0 00004F28 63616E6E6F74206265 .cant_bp_write: asciz "cannot be written." 0 00004F31 207772697474656E2E 0 00004F3A 00 0 00004F3B 63616E6E6F74206265 .cant_bp_restore: db "cannot be restored to " 0 00004F44 20726573746F726564 0 00004F4D 20746F20 0 00004F51 5F5F2E00 .cant_bp_restore.value: asciz "__." 1130 %if 0 1131 The 15th G breakpoint (linear 0010_FFFF) cannot be written. 1132 The proceed breakpoint (linear 0010_FFFF) cannot be written. 1133 The permanent breakpoint 0F (linear 0010_FFFF) cannot be written. 1134 The permanent breakpoint 0F (linear 0010_FFFF) cannot be restored to __. 1135 12345678901234567890123456789012345678901234567890123456789012345678901234567890 1136 %endif 0 00004F55 0D0A20526561736F6E .cant_bp_reason: asciz 13,10," Reason: " 0 00004F5E 3A2000 0 00004F61 4E6F206572726F722E .cant_bp_reason0: asciz "No error. (Internal error, report!)",13,10 0 00004F6A 2028496E7465726E61 0 00004F73 6C206572726F722C20 0 00004F7C 7265706F727421290D 0 00004F85 0A00 0 00004F87 497420697320726561 .cant_bp_reason1: asciz "It is read-only.",13,10 0 00004F90 642D6F6E6C792E0D0A 0 00004F99 00 0 00004F9A 497420697320756E72 .cant_bp_reason2: asciz "It is unreachable.",13,10 0 00004FA3 6561636861626C652E 0 00004FAC 0D0A00 0 00004FAF 497420686173206265 .cant_bp_reason3: db "It has been overwritten with " 0 00004FB8 656E206F7665727772 0 00004FC1 697474656E20776974 0 00004FCA 6820 0 00004FCC 5F5F2E0D0A00 .cant_bp_reason3.value: asciz "__.",13,10 0 00004FD2 556E6B6E6F776E2065 .cant_bp_reasonu: asciz "Unknown error. (Internal error, report!)",13,10 0 00004FDB 72726F722E2028496E 0 00004FE4 7465726E616C206572 0 00004FED 726F722C207265706F 0 00004FF6 727421290D0A00 1144 0 00004FFD 20202000 .list_bp.first: asciz " " 0 00005001 204720627265616B70 .list_bp.second:db " G breakpoint, linear " 0 0000500A 6F696E742C206C696E 0 00005013 65617220 1147 .list_bp.address1: 0 00005017 2D2D2D2D5F db "----_" 1149 .list_bp.address2: 0 0000501C 2D2D2D2D00 asciz "----" 0 00005021 2C20636F6E74656E74 .list_bp.third: db ", content " 0 0000502A 20 1152 .list_bp.value: 0 0000502B 5F5F00 asciz "__" 1154 .list_bp_not_cseip: equ crlf 1155 %if _PM 1156 .list_bp_cseip_32: 0 0000502E 202869732061742043 asciz " (is at CS:EIP)",13,10 0 00005037 533A454950290D0A00 1158 %endif 1159 .list_bp_csip_16: 0 00005040 202869732061742043 asciz " (is at CS:IP)",13,10 0 00005049 533A4950290D0A00 1161 .list_bp_none: 0 00005051 546865204720627265 asciz "The G breakpoint list is empty.",13,10 0 0000505A 616B706F696E74206C 0 00005063 69737420697320656D 0 0000506C 7074792E0D0A00 1163 %if 0 1164 2nd G breakpoint, linear 0003_28D3 $3600:12345678, content CC (is at CS:EIP) 1165 12345678901234567890123456789012345678901234567890123456789012345678901234567890 1166 %endif 0 00005073 00 .empty_message: asciz 0 00005074 4C49535400 .list: asciz "LIST" 0 00005079 414741494E00 .again: asciz "AGAIN" 1170 %if _SYMBOLIC 0 0000507F 57525400 .wrt: asciz "WRT" 1172 %endif 0 00005083 52656163686564206C .uu_too_many_repeat: asciz "Reached limit of repeating disassembly.",13,10 0 0000508C 696D6974206F662072 0 00005095 6570656174696E6720 0 0000509E 646973617373656D62 0 000050A7 6C792E0D0A00 0 000050AD 496E7465726E616C20 .uu_internal_error: asciz "Internal error in disassembler!",13,10 0 000050B6 6572726F7220696E20 0 000050BF 646973617373656D62 0 000050C8 6C6572210D0A00 0 000050CF 496E7465726E616C20 .aa_internal_error: asciz "Internal error in assembler!",13,10 0 000050D8 6572726F7220696E20 0 000050E1 617373656D626C6572 0 000050EA 210D0A00 0 000050EE 537461636B206F7665 .stack_overflow: db "Stack overflow occurred, IP=" 0 000050F7 72666C6F77206F6363 0 00005100 75727265642C204950 0 00005109 3D 0 0000510A 5F5F5F5F682C206475 .stack_overflow.caller: asciz "____h, due to " 0 00005113 6520746F2000 0 00005119 65787072657373696F .stack_overflow.indirection: asciz "expression indirection.",13,10 0 00005122 6E20696E6469726563 0 0000512B 74696F6E2E0D0A00 0 00005133 65787072657373696F .stack_overflow.parens: asciz "expression parentheses.",13,10 0 0000513C 6E20706172656E7468 0 00005145 657365732E0D0A00 0 0000514D 65787072657373696F .stack_overflow.precedence: asciz "expression precedence.",13,10 0 00005156 6E2070726563656465 0 0000515F 6E63652E0D0A00 0 00005166 65787072657373696F .stack_overflow.value_in: asciz "expression VALUE x IN y.",13,10 0 0000516F 6E2056414C55452078 0 00005178 20494E20792E0D0A00 0 00005181 65787072657373696F .stack_overflow.linear: asciz "expression LINEAR.",13,10 0 0000518A 6E204C494E4541522E 0 00005193 0D0A00 1183 %if _PM 0 00005196 65787072657373696F .stack_overflow.desctype: asciz "expression DESCTYPE.",13,10 0 0000519F 6E2044455343545950 0 000051A8 452E0D0A00 1185 %endif 0 000051AD 65787072657373696F .stack_overflow.cond: asciz "expression conditional ?? x :: y.",13,10 0 000051B6 6E20636F6E64697469 0 000051BF 6F6E616C203F3F2078 0 000051C8 203A3A20792E0D0A00 1187 %if _SYMBOLIC 1188 .dd_after_symbol.non_wrt: 0 000051D1 3A .uu_after_symbol.non_wrt: db ":" 1190 .dd_after_symbol.2_wrt: 1191 .memref_after_symbol.non_wrt: 1192 .uu_after_symbol.wrt: 0 000051D2 0D0A00 .memref_after_symbol.wrt: asciz 13,10 1194 .dd_after_symbol.1_wrt: 1195 .uu_after_symbol_between_1.wrt: 0 000051D5 3A .uu_between_symbol.wrt: db ":" 0 000051D6 207772742000 .memref_between_symbol.wrt: asciz " wrt " 0 000051DC 3A .uu_after_symbol_between_1.non_wrt: db ":" 0 000051DD 202B2000 .uu_after_symbol_between_2.wrt: asciz " + " 0 000051E1 0D0A00 .uu_after_symbol_between_3: asciz 13,10 1201 %endif 1202 %if _MEMREF_AMOUNT 1203 %if _DEBUG2 || _SYMBOLIC 0 000051E4 096469726563742062 .memrefs_branchdirect: asciz 9, "direct branch target = " 0 000051ED 72616E636820746172 0 000051F6 676574203D2000 0 000051FD 09737472696E672073 .memrefs_stringsource: asciz 9, "string source = " 0 00005206 6F7572636520202020 0 0000520F 202020203D2000 0 00005216 09737472696E672064 .memrefs_stringdest: asciz 9, "string destination = " 0 0000521F 657374696E6174696F 0 00005228 6E2020203D2000 0 0000522F 096D656D6F72792073 .memrefs_memsource: asciz 9, "memory source = " 0 00005238 6F7572636520202020 0 00005241 202020203D2000 0 00005248 096D656D6F72792064 .memrefs_memdest: asciz 9, "memory destination = " 0 00005251 657374696E6174696F 0 0000525A 6E2020203D2000 0 00005261 096D656D6F72792073 .memrefs_memsourcedest: asciz 9, "memory source/dest = " 0 0000526A 6F757263652F646573 0 00005273 742020203D2000 0 0000527A 096D656D6F72792028 .memrefs_mem_unknown: asciz 9, "memory (unknown) = " 0 00005283 756E6B6E6F776E2920 0 0000528C 202020203D2000 0 00005293 09756E6B6E6F776E20 .memrefs_unknown: asciz 9, "unknown mem ref type = " 0 0000529C 6D656D207265662074 0 000052A5 797065203D2000 0 000052AC 08206C656E6774683D .memrefs_length: counted " length=" 1213 %endif 1214 .memrefs_invalid_internal: 0 000052B5 496E7465726E616C20 asciz "Internal error, invalid use of too many memrefs!",13,10 0 000052BE 6572726F722C20696E 0 000052C7 76616C696420757365 0 000052D0 206F6620746F6F206D 0 000052D9 616E79206D656D7265 0 000052E2 6673210D0A00 1216 %endif 1217 1218 %if 0 1219 align 2, db 0 1220 .optiontable: dw dispregs32, .r32off, .r32on 1221 dw traceints, .traceoff, .traceon 1222 dw cpdepchars, .cpoff, .cpon 1223 dw fakeindos, .dosoff, .doson 1224 dw nonpagingdevice, .nonpageoff, .nonpageon 1225 dw pagingdevice, .pageoff, .pageon 1226 dw hexrn, .readrnoff, .readrnon 1227 dw 0 1228 1229 .r32off: asciz "Dump 16-bit register set" 1230 .r32on: asciz "Dump 32-bit register set" 1231 .traceoff: asciz "Interrupts are traced" 1232 .traceon: asciz "Interrupts are processed" 1233 .cpoff: asciz "Extended ASCII characters replaced" 1234 .cpon: asciz "Extended ASCII characters displayed" 1235 .dosoff: asciz "InDOS is checked" 1236 .doson: asciz "InDOS assumed on" 1237 ;asciz "InDOS assumed off" 1238 .nonpageoff: asciz 1239 .nonpageon: asciz "Paging disabled" 1240 .pageoff: asciz 1241 .pageon: asciz "Paging enabled" 1242 .readrnoff: asciz "Readable RN enabled" 1243 .readrnon: asciz "Readable RN disabled" 1244 %endif 1245 0 000052E8 5761726E696E673A20 .warnprefix: asciz "Warning: Prefixes in excess of 14, using trace flag.",13,10 0 000052F1 507265666978657320 0 000052FA 696E20657863657373 0 00005303 206F662031342C2075 0 0000530C 73696E672074726163 0 00005315 6520666C61672E0D0A 0 0000531E 00 1247 1248 %if _DEBUG || _LOADER 0 0000531F 427265616B696E6720 .bu: asciz "Breaking to next instance.",13,10 0 00005328 746F206E6578742069 0 00005331 6E7374616E63652E0D 0 0000533A 0A00 1250 %if _DEBUG_COND 0 0000533C 44656275676761626C .bu_disabled: db "Debuggable mode is disabled.",13,10 0 00005345 65206D6F6465206973 0 0000534E 2064697361626C6564 0 00005357 2E0D0A 0 0000535A 456E61626C65207769 asciz "Enable with this command: r DCO6 or= ",_4digitshex(opt6_debug_mode),13,10 0 00005363 746820746869732063 0 0000536C 6F6D6D616E643A2072 0 00005375 2044434F36206F723D 0 0000537E 20303130300D0A00 1253 %endif 1254 %else 1255 .notbu: asciz "Already in topmost instance. (This is no debugging build of lDebug.)",13,10 1256 %endif 1257 %if _DUALCODE 0 00005386 496E7465722D736567 .bu_relocated: db "Inter-segment calls work. Sign=" 0 0000538F 6D656E742063616C6C 0 00005398 7320776F726B2E2053 0 000053A1 69676E3D 1259 .bu_relocated.sign: 0 000053A5 2D2D2D2D682E0D0A00 asciz "----h.",13,10 1261 %endif 1262 %if _DT 0 000053AE 4E .tableheader: db .tableheader.end - .tableheader.start 1264 .tableheader.start: 1265 %assign ITERATION 0 1266 %rep 8 1267 %if ITERATION == 0 1268 %elif ITERATION == 1 || ITERATION == 2 1269 times 4 db 32 1270 %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1271 times 2 db 32 1272 %else 1273 times 3 db 32 1274 %endif 1275 db "Dec Hex" 1276 %assign ITERATION ITERATION + 1 1277 %endrep 1267 <1> %if ITERATION == 0 1268 <1> %elif ITERATION == 1 || ITERATION == 2 1269 <1> times 4 db 32 1270 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1271 <1> times 2 db 32 1272 <1> %else 1273 <1> times 3 db 32 1274 <1> %endif 0 000053AF 44656320486578 db "Dec Hex" 1276 <1> %assign ITERATION ITERATION + 1 1267 <1> %if ITERATION == 0 1268 <1> %elif ITERATION == 1 || ITERATION == 2 0 000053B6 20 times 4 db 32 1270 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1271 <1> times 2 db 32 1272 <1> %else 1273 <1> times 3 db 32 1274 <1> %endif 0 000053BA 44656320486578 db "Dec Hex" 1276 <1> %assign ITERATION ITERATION + 1 1267 <1> %if ITERATION == 0 1268 <1> %elif ITERATION == 1 || ITERATION == 2 0 000053C1 20 times 4 db 32 1270 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1271 <1> times 2 db 32 1272 <1> %else 1273 <1> times 3 db 32 1274 <1> %endif 0 000053C5 44656320486578 db "Dec Hex" 1276 <1> %assign ITERATION ITERATION + 1 1267 <1> %if ITERATION == 0 1268 <1> %elif ITERATION == 1 || ITERATION == 2 1269 <1> times 4 db 32 1270 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 0 000053CC 20 times 2 db 32 1272 <1> %else 1273 <1> times 3 db 32 1274 <1> %endif 0 000053CE 44656320486578 db "Dec Hex" 1276 <1> %assign ITERATION ITERATION + 1 1267 <1> %if ITERATION == 0 1268 <1> %elif ITERATION == 1 || ITERATION == 2 1269 <1> times 4 db 32 1270 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 0 000053D5 20 times 2 db 32 1272 <1> %else 1273 <1> times 3 db 32 1274 <1> %endif 0 000053D7 44656320486578 db "Dec Hex" 1276 <1> %assign ITERATION ITERATION + 1 1267 <1> %if ITERATION == 0 1268 <1> %elif ITERATION == 1 || ITERATION == 2 1269 <1> times 4 db 32 1270 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 0 000053DE 20 times 2 db 32 1272 <1> %else 1273 <1> times 3 db 32 1274 <1> %endif 0 000053E0 44656320486578 db "Dec Hex" 1276 <1> %assign ITERATION ITERATION + 1 1267 <1> %if ITERATION == 0 1268 <1> %elif ITERATION == 1 || ITERATION == 2 1269 <1> times 4 db 32 1270 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1271 <1> times 2 db 32 1272 <1> %else 0 000053E7 20 times 3 db 32 1274 <1> %endif 0 000053EA 44656320486578 db "Dec Hex" 1276 <1> %assign ITERATION ITERATION + 1 1267 <1> %if ITERATION == 0 1268 <1> %elif ITERATION == 1 || ITERATION == 2 1269 <1> times 4 db 32 1270 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1271 <1> times 2 db 32 1272 <1> %else 0 000053F1 20 times 3 db 32 1274 <1> %endif 0 000053F4 44656320486578 db "Dec Hex" 1276 <1> %assign ITERATION ITERATION + 1 0 000053FB 0D0A db 13,10 1279 .tableheader.end: 0 000053FD 4F .tableheadertop:db .tableheadertop.end - .tableheadertop.start 1281 .tableheadertop.start: 1282 %assign ITERATION 0 1283 %rep 8 1284 %if ITERATION == 0 1285 %else 1286 times 3 db 32 1287 %endif 1288 db "Dec Hex" 1289 %assign ITERATION ITERATION + 1 1290 %endrep 1284 <1> %if ITERATION == 0 1285 <1> %else 1286 <1> times 3 db 32 1287 <1> %endif 0 000053FE 44656320486578 db "Dec Hex" 1289 <1> %assign ITERATION ITERATION + 1 1284 <1> %if ITERATION == 0 1285 <1> %else 0 00005405 20 times 3 db 32 1287 <1> %endif 0 00005408 44656320486578 db "Dec Hex" 1289 <1> %assign ITERATION ITERATION + 1 1284 <1> %if ITERATION == 0 1285 <1> %else 0 0000540F 20 times 3 db 32 1287 <1> %endif 0 00005412 44656320486578 db "Dec Hex" 1289 <1> %assign ITERATION ITERATION + 1 1284 <1> %if ITERATION == 0 1285 <1> %else 0 00005419 20 times 3 db 32 1287 <1> %endif 0 0000541C 44656320486578 db "Dec Hex" 1289 <1> %assign ITERATION ITERATION + 1 1284 <1> %if ITERATION == 0 1285 <1> %else 0 00005423 20 times 3 db 32 1287 <1> %endif 0 00005426 44656320486578 db "Dec Hex" 1289 <1> %assign ITERATION ITERATION + 1 1284 <1> %if ITERATION == 0 1285 <1> %else 0 0000542D 20 times 3 db 32 1287 <1> %endif 0 00005430 44656320486578 db "Dec Hex" 1289 <1> %assign ITERATION ITERATION + 1 1284 <1> %if ITERATION == 0 1285 <1> %else 0 00005437 20 times 3 db 32 1287 <1> %endif 0 0000543A 44656320486578 db "Dec Hex" 1289 <1> %assign ITERATION ITERATION + 1 1284 <1> %if ITERATION == 0 1285 <1> %else 0 00005441 20 times 3 db 32 1287 <1> %endif 0 00005444 44656320486578 db "Dec Hex" 1289 <1> %assign ITERATION ITERATION + 1 0 0000544B 0D0A db 13,10 1292 .tableheadertop.end: 1293 %endif 1294 %if _PM 0 0000544D 43616E6E6F74206163 .ofs32: asciz "Cannot access 16-bit segment with 32-bit offset.",13,10 0 00005456 636573732031362D62 0 0000545F 6974207365676D656E 0 00005468 742077697468203332 0 00005471 2D626974206F666673 0 0000547A 65742E0D0A00 0 00005480 416C6C6F6361746564 .d.a_success: db "Allocated descriptor with selector " 0 00005489 206465736372697074 0 00005492 6F7220776974682073 0 0000549B 656C6563746F7220 1297 .d.a_success_sel: 0 000054A3 2D2D2D2D0D0A00 asciz "----",13,10 0 000054AA 4465616C6C6F636174 .d.d_success: asciz "Deallocated descriptor",13,10 0 000054B3 656420646573637269 0 000054BC 70746F720D0A00 0 000054C3 536574206465736372 .d.b_success: asciz "Set descriptor base",13,10 0 000054CC 6970746F7220626173 0 000054D5 650D0A00 0 000054D9 536574206465736372 .d.l_success: asciz "Set descriptor limit",13,10 0 000054E2 6970746F72206C696D 0 000054EB 69740D0A00 0 000054F0 536574206465736372 .d.t_success: asciz "Set descriptor type",13,10 0 000054F9 6970746F7220747970 0 00005502 650D0A00 0 00005506 4572726F7220 .d.a_error: db "Error " 1304 .d.a_error_code: 0 0000550C 2D2D2D2D0D0A00 asciz "----",13,10 1306 .d.d_error equ .d.a_error 1307 .d.d_error_code equ .d.a_error_code 1308 .d.b_error equ .d.a_error 1309 .d.b_error_code equ .d.a_error_code 1310 .d.l_error equ .d.a_error 1311 .d.l_error_code equ .d.a_error_code 1312 .d.t_error equ .d.a_error 1313 .d.t_error_code equ .d.a_error_code 1314 %endif 1315 1316 %if _MCB 1317 %if _MCBPOSITION 1318 .keyword_position: asciz "POSITION" 1319 %endif 1320 %if _MCBLIMIT 1321 .keyword_limit: asciz "LIMIT" 1322 %endif 1323 %if _SDSUB 1324 .keyword_skipsd: asciz "SKIPSD" 1325 %endif 1326 %assign ELD 0 1327 %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 00005513 456E64206F66206368 .invmcbadr: asciz "End of chain: invalid MCB address.",13,10 0 0000551C 61696E3A20696E7661 0 00005525 6C6964204D43422061 0 0000552E 6464726573732E0D0A 0 00005537 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> 39 <1> align 4, db 0 40 <1> smcbtypes: 0 00005538 0000[C433] smcbtype S_OTHER, 00h 0 0000553C 0100[CC33] smcbtype S_DOSENTRY, 01h 0 00005540 0200[D733] smcbtype S_DOSCODE, 02h 0 00005544 0300[E133] smcbtype S_DOSDATA, 03h 0 00005548 0400[EB33] smcbtype S_IRQSCODE, 04h 0 0000554C 0500[F633] smcbtype S_IRQSDATA, 05h 0 00005550 0600[0134] smcbtype S_CDS, 06h 0 00005554 0700[0734] smcbtype S_LFNCDS, 07h 0 00005558 0800[1034] smcbtype S_DPB, 08h 0 0000555C 0900[1634] smcbtype S_UPB, 09h 0 00005560 0A00[1C34] smcbtype S_SFT, 0Ah 0 00005564 0B00[2234] smcbtype S_FCBSFT, 0Bh 0 00005568 0C00[2B34] smcbtype S_CCB, 0Ch 0 0000556C 0D00[3134] smcbtype S_IRT, 0Dh 0 00005570 0E00[3734] smcbtype S_SECTOR, 0Eh 0 00005574 0F00[4034] smcbtype S_NLS, 0Fh 0 00005578 1000[4634] smcbtype S_EBDA, 10h 0 0000557C 1600[4D34] smcbtype S_INITFCBSFT, 16h 0 00005580 1700[5A34] smcbtype S_INITSTACK, 17h 0 00005584 1800[6634] smcbtype S_INITCDS, 18h 0 00005588 1900[7034] smcbtype S_INITCONFIG, 19h 0 0000558C 1A00[7D34] smcbtype S_INITFATSEG, 1Ah 0 00005590 1B00[8A34] smcbtype S_INITSECTORSEG, 1Bh 0 00005594 1C00[9A34] smcbtype S_INITSTACKBPB,1Ch 0 00005598 1D00[A934] smcbtype S_INITPSP, 1Dh 0 0000559C 1E00[B334] smcbtype S_ENVIRONMENT, 1Eh 0 000055A0 1F00[C134] smcbtype S_INITIALISE, 1Fh 0 000055A4 2000[CE34] smcbtype S_DEVICE, 20h ; Device 0 000055A8 2100[D734] smcbtype S_DEVICEMEMORY,21h ; Allocated by device 0 000055AC 3000[E634] smcbtype S_EXCLDUMA, 30h ; Excluded UMA 0 000055B0 3100[F134] smcbtype S_EXCLDUMASUB, 31h ; Excluded UMA with sub-chain of used MCBs 0 000055B4 3200[FF34] smcbtype S_EXCLDLH, 32h ; Excluded by LH 0 000055B8 3300[0935] smcbtype S_EXCLDDOS, 33h 0 000055BC 3400[1435] smcbtype S_EXCLDALTAH, 34h 0 000055C0 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 1328 %endif 1329 1330 1331 %define INSTALLMESSAGES db "" 1332 1333 %imacro installflag 6-*.nolist 1334 %xdefine %%one %1 1335 %xdefine %%two %2 1336 %xdefine %%three %3 1337 %ifempty %3 1338 %define %%three install_trying 1339 %endif 1340 %xdefine %%four %4 1341 %ifempty %4 1342 %define %%four 0 1343 %endif 1344 %xdefine %%five %5 1345 %ifnidn %%one, 0 1346 %if ((%%two - 1) & %%two) == 0 1347 %if %%two > 0FFFFh 1348 %if %%two & 0FFFFh 1349 %error Flag set in both upper and lower word 1350 %endif 1351 %assign %%two %%two >> 16 1352 %xdefine %%one %%one + 2 1353 %endif 1354 %else 1355 %if (%%two & 0FFFF_0000h) != 0FFFF_0000h 1356 %if (%%two & 0FFFFh) != 0FFFFh 1357 %error Flag clear in both upper and lower word 1358 %endif 1359 %assign %%two (%%two >> 16) & 0FFFFh 1360 %xdefine %%one %%one + 2 1361 %endif 1362 %endif 1363 %endif 1364 %xdefine INSTALLMESSAGES INSTALLMESSAGES, %%message_five:, {asciz %%five} 1365 %assign %%step 0 1366 %rep %0 - 5 1367 %xdefine INSTALLMESSAGES INSTALLMESSAGES, %%message_%[%%step]:, {asciz %6} 1368 dw %%message_%[%%step] 1369 dw %%message_five 1370 dw %%one, %%two, %%three, %%four 1371 %rotate 1 1372 %assign %%step %%step + 1 1373 %endrep 1374 %endmacro 1375 1376 %imacro installmessages 0-*.nolist 1377 %rep %0 1378 %1 1379 %rotate 1 1380 %endrep 1381 %endmacro 1382 1383 installformat equ 1 1384 1385 1386 align 4, db 0 1387 installflags: 1388 %if _PM 0 000055C4 [0030][E82F][0000] installflag options4, opt4_int_2F_hook,,, "Interrupt 2Fh DPMI hook", "INT2F", "DPMIHOOK" 0 000055CA 0200[0000]0000 0 000055D0 [0630][E82F][0000] 0 000055D6 0200[0000]0000 1391 %endif 1392 %if _CATCHINTFAULTCOND && (_CATCHINT0D || _CATCHINT0C) 0 000055DC [2A30][0F30][0000] installflag options4, opt4_int_fault_hook,,, "R86M fault interrupts hook", "FAULTS", "FAULT", "INTFAULTS", "INTFAULT" 0 000055E2 1000[0000]0000 0 000055E8 [3130][0F30][0000] 0 000055EE 1000[0000]0000 0 000055F4 [3730][0F30][0000] 0 000055FA 1000[0000]0000 0 00005600 [4130][0F30][0000] 0 00005606 1000[0000]0000 1395 %endif 1396 %if _CATCHINT08 0 0000560C [6130][4A30][0000] installflag options4, opt4_int_08_hook,,, "Interrupt 8 timer hook", "INT08", "INT8", "TIMER" 0 00005612 0400[0000]0000 0 00005618 [6730][4A30][0000] 0 0000561E 0400[0000]0000 0 00005624 [6C30][4A30][0000] 0 0000562A 0400[0000]0000 1399 %endif 1400 %if _CATCHINT2D 0 00005630 [8A30][7230][0000] installflag options4, opt4_int_2D_hook,,, "Interrupt 2Dh AMIS hook", "INT2D", "AMIS" 0 00005636 0800[0000]0000 0 0000563C [9030][7230][0000] 0 00005642 0800[0000]0000 1403 %endif 1404 %if _AREAS && _AREAS_HOOK_CLIENT 0 00005648 [9B30][9530]0000 installflag 0, install_areas,,, "Areas", "AREAS" 0 0000564E [0000][0000]0000 1407 %endif 0 00005654 [AC30][A130][0000] installflag options, enable_serial, dmycmd,, "Serial I/O", "SERIAL" 0 0000565A 0040[0000]0000 0 00005660 [C430][B330][0000] installflag options, fakeindos, dmycmd,, "Force InDOS mode", "INDOS" 0 00005666 0800[0000]0000 0 0000566C [E030][CA30][0000] installflag options, opt_usegetinput, dmycmd,, "Use DOS getinput mode", "GETINPUT" 0 00005672 0008[0000]0000 0 00005678 [0831][E930][0200] installflag options3, opt3_r_highlight_full, dmycmd,, "R register change highlighting", "RHIGHLIGHT" 0 0000567E 0400[0000]0000 0 00005684 [1E31][1331][0200] installflag options3, ~ opt3_disable_autorepeat, dmycmd,, "Autorepeat", "AUTOREPEAT" 0 0000568A FFEF[0000]0000 0 00005690 [3031][2931][0000] installflag options, ~ nonpagingdevice, dmycmd,, "Paging", "PAGING" 0 00005696 EFFF[0000]0000 0 0000569C [4731][3731][0000] installflag options6, opt6_bios_output, dmycmd,, "ROM-BIOS output", "BIOSOUT", "BIOSOUTPUT", "INT10OUT", "INT10OUTPUT" 0 000056A2 0002[0000]0000 0 000056A8 [4F31][3731][0000] 0 000056AE 0002[0000]0000 0 000056B4 [5A31][3731][0000] 0 000056BA 0002[0000]0000 0 000056C0 [6331][3731][0000] 0 000056C6 0002[0000]0000 0 000056CC [8531][6F31][0000] installflag options6, opt6_flat_binary, dmycmd,, "Flat binary read mode", "FLAT", "FLATBIN", "FLATBINARY", "FSWITCH" 0 000056D2 0004[0000]0000 0 000056D8 [8A31][6F31][0000] 0 000056DE 0004[0000]0000 0 000056E4 [9231][6F31][0000] 0 000056EA 0004[0000]0000 0 000056F0 [9D31][6F31][0000] 0 000056F6 0004[0000]0000 0 000056FC [BB31][A531][0000] installflag options6, opt6_big_stack, dmycmd,, ".BIG style stack mode", "BIG", "BIGSTACK", "ESWITCH" 0 00005702 0008[0000]0000 0 00005708 [BF31][A531][0000] 0 0000570E 0008[0000]0000 0 00005714 [C831][A531][0000] 0 0000571A 0008[0000]0000 1427 %if _RH 0 00005720 [E631][D031][0200] installflag options6, opt6_rh_mode, dmycmd,, "Register dump history", "RH", "RHISTORY", "REGHISTORY" 0 00005726 1000[0000]0000 0 0000572C [E931][D031][0200] 0 00005732 1000[0000]0000 0 00005738 [F231][D031][0200] 0 0000573E 1000[0000]0000 1430 %endif 1431 %if _DEBUG && _DEBUG_COND 0 00005744 [0D32][FD31][0000] installflag options6, opt6_debug_mode,,, "Debuggable mode", "DEBUG" 0 0000574A 0001[0000]0000 1434 %endif 0 00005750 [2B32][1332][0000] installflag options3, opt3_paging_rc, dmycmd,, "Paging RC commands mode", "PAGINGRC" 0 00005756 0010[0000]0000 0 0000575C [4C32][3432][0000] installflag options3, opt3_paging_re, dmycmd,, "Paging RE commands mode", "PAGINGRE" 0 00005762 0040[0000]0000 0 00005768 [7332][5532][0000] installflag options3, opt3_paging_yy, dmycmd,, "Paging Script for lDebug mode", "PAGINGY", "PAGINGYY", "PAGINGSCRIPT" 0 0000576E 0020[0000]0000 0 00005774 [7B32][5532][0000] 0 0000577A 0020[0000]0000 0 00005780 [8432][5532][0000] 0 00005786 0020[0000]0000 1441 %ifn _ONLYNON386 0 0000578C [A832][9132][0000] installflag options, dispregs32, dmycmd,, "386 register dump mode", "RX", "REGS386", "REGS32" 0 00005792 0100[0000]0000 0 00005798 [AB32][9132][0000] 0 0000579E 0100[0000]0000 0 000057A4 [B332][9132][0000] 0 000057AA 0100[0000]0000 1444 %endif 0 000057B0 [D032][BA32][0000] installflag options, traceints, dmycmd,, "Trace interrupts Mode", "TM", "TRACEINTS", "TRACEINTERRUPTS" 0 000057B6 0200[0000]0000 0 000057BC [D332][BA32][0000] 0 000057C2 0200[0000]0000 0 000057C8 [DD32][BA32][0000] 0 000057CE 0200[0000]0000 0 000057D4 [FA32][ED32][0000] installflag options7, opt7_houdini, dmycmd,, "Houdini Mode", "HOUDINI" 0 000057DA 0001[0000]0000 0 000057E0 [1C33][0233][0000] installflag options7, opt7_no_free_oneshot_eld, dmycmd,, "No free oneshot ELDs mode", "NOFREEONESHOT" 0 000057E6 0100[0000]0000 0 000057EC [3C33][2A33][0000] installflag options7, opt7_quiet_install, dmycmd,, "Quiet ELD install", "QUIETINSTALL" 0 000057F2 0400[0000]0000 0 000057F8 [6633][4933][0000] installflag options7, opt7_debug_optional_link, dmycmd,, "Debug ELD optional link mode", "DEBUGOPTLINK" 0 000057FE 0200[0000]0000 0 00005804 [8133][7333][0000] installflag options7, opt7_quick_run, dmycmd,, "Quick ELD run", "QUICKRUN" 0 0000580A 0800[0000]0000 0 00005810 [9833][8A33][0000] installflag options7, opt7_debug_run, dmycmd,, "Debug ELD run", "DEBUGRUN" 0 00005816 0002[0000]0000 0 0000581C [BB33][A133][0000] installflag options7, opt7_no_ensure, dmycmd,, "No ensure debuggee loaded", "NOENSURE" 0 00005822 0010[0000]0000 0 00005828 00000000 dw 0, 0 1462 0 0000582C 496E74657272757074 installmessages INSTALLMESSAGES 0 00005835 203246682044504D49 0 0000583E 20686F6F6B00494E54 0 00005847 32460044504D49484F 0 00005850 4F4B005238364D2066 0 00005859 61756C7420696E7465 0 00005862 72727570747320686F 0 0000586B 6F6B004641554C5453 0 00005874 004641554C5400494E 0 0000587D 544641554C54530049 0 00005886 4E544641554C540049 0 0000588F 6E7465727275707420 0 00005898 382074696D65722068 0 000058A1 6F6F6B00494E543038 0 000058AA 00494E54380054494D 0 000058B3 455200496E74657272 0 000058BC 757074203244682041 0 000058C5 4D495320686F6F6B00 0 000058CE 494E54324400414D49 0 000058D7 530041726561730041 0 000058E0 524541530053657269 0 000058E9 616C20492F4F005345 0 000058F2 5249414C00466F7263 0 000058FB 6520496E444F53206D 0 00005904 6F646500494E444F53 0 0000590D 0055736520444F5320 0 00005916 676574696E70757420 0 0000591F 6D6F64650047455449 0 00005928 4E5055540052207265 0 00005931 676973746572206368 0 0000593A 616E67652068696768 0 00005943 6C69676874696E6700 0 0000594C 52484947484C494748 0 00005955 54004175746F726570 0 0000595E 656174004155544F52 0 00005967 455045415400506167 0 00005970 696E6700504147494E 0 00005979 4700524F4D2D42494F 0 00005982 53206F757470757400 0 0000598B 42494F534F55540042 0 00005994 494F534F5554505554 0 0000599D 00494E5431304F5554 0 000059A6 00494E5431304F5554 0 000059AF 50555400466C617420 0 000059B8 62696E617279207265 0 000059C1 6164206D6F64650046 0 000059CA 4C415400464C415442 0 000059D3 494E00464C41544249 0 000059DC 4E4152590046535749 0 000059E5 544348002E42494720 0 000059EE 7374796C6520737461 0 000059F7 636B206D6F64650042 0 00005A00 494700424947535441 0 00005A09 434B00455357495443 0 00005A12 480052656769737465 0 00005A1B 722064756D70206869 0 00005A24 73746F727900524800 0 00005A2D 52484953544F525900 0 00005A36 524547484953544F52 0 00005A3F 590044656275676761 0 00005A48 626C65206D6F646500 0 00005A51 444542554700506167 0 00005A5A 696E6720524320636F 0 00005A63 6D6D616E6473206D6F 0 00005A6C 646500504147494E47 0 00005A75 524300506167696E67 0 00005A7E 20524520636F6D6D61 0 00005A87 6E6473206D6F646500 0 00005A90 504147494E47524500 0 00005A99 506167696E67205363 0 00005AA2 7269707420666F7220 0 00005AAB 6C4465627567206D6F 0 00005AB4 646500504147494E47 0 00005ABD 5900504147494E4759 0 00005AC6 5900504147494E4753 0 00005ACF 435249505400333836 0 00005AD8 207265676973746572 0 00005AE1 2064756D70206D6F64 0 00005AEA 650052580052454753 0 00005AF3 333836005245475333 0 00005AFC 320054726163652069 0 00005B05 6E7465727275707473 0 00005B0E 204D6F646500544D00 0 00005B17 5452414345494E5453 0 00005B20 005452414345494E54 0 00005B29 455252555054530048 0 00005B32 6F7564696E69204D6F 0 00005B3B 646500484F5544494E 0 00005B44 49004E6F2066726565 0 00005B4D 206F6E6573686F7420 0 00005B56 454C4473206D6F6465 0 00005B5F 004E4F465245454F4E 0 00005B68 4553484F5400517569 0 00005B71 657420454C4420696E 0 00005B7A 7374616C6C00515549 0 00005B83 4554494E5354414C4C 0 00005B8C 00446562756720454C 0 00005B95 44206F7074696F6E61 0 00005B9E 6C206C696E6B206D6F 0 00005BA7 64650044454255474F 0 00005BB0 50544C494E4B005175 0 00005BB9 69636B20454C442072 0 00005BC2 756E00515549434B52 0 00005BCB 554E00446562756720 0 00005BD4 454C442072756E0044 0 00005BDD 4542554752554E004E 0 00005BE6 6F20656E7375726520 0 00005BEF 646562756767656520 0 00005BF8 6C6F61646564004E4F 0 00005C01 454E5355524500 1464 1465 1466 %if _MCB 0 00005C08 535F4F544845520053 smcbmsg smcb_messages 0 00005C11 5F444F53454E545259 0 00005C1A 00535F444F53434F44 0 00005C23 4500535F444F534441 0 00005C2C 544100535F49525153 0 00005C35 434F444500535F4952 0 00005C3E 51534441544100535F 0 00005C47 43445300535F4C464E 0 00005C50 43445300535F445042 0 00005C59 00535F55504200535F 0 00005C62 53465400535F464342 0 00005C6B 53465400535F434342 0 00005C74 00535F49525400535F 0 00005C7D 534543544F5200535F 0 00005C86 4E4C5300535F454244 0 00005C8F 4100535F494E495446 0 00005C98 434253465400535F49 0 00005CA1 4E4954535441434B00 0 00005CAA 535F494E4954434453 0 00005CB3 00535F494E4954434F 0 00005CBC 4E46494700535F494E 0 00005CC5 495446415453454700 0 00005CCE 535F494E4954534543 0 00005CD7 544F5253454700535F 0 00005CE0 494E4954535441434B 0 00005CE9 42504200535F494E49 0 00005CF2 5450535000535F454E 0 00005CFB 5649524F4E4D454E54 0 00005D04 00535F494E49544941 0 00005D0D 4C49534500535F4445 0 00005D16 5649434500535F4445 0 00005D1F 564943454D454D4F52 0 00005D28 5900535F4558434C44 0 00005D31 554D4100535F455843 0 00005D3A 4C44554D4153554200 0 00005D43 535F4558434C444C48 0 00005D4C 00535F4558434C4444 0 00005D55 4F5300535F4558434C 0 00005D5E 44414C54414800 1468 0 00005D65 756E6B6E6F776E00 smcbmsg_unknown: asciz "unknown" 1470 1471 %undef smcb_messages 1472 %unimacro smcbtype 2.nolist 1473 %unimacro smcbmsg 2-*.nolist 1474 %endif 1475 1476 0 00005D6D 5E204572726F7207 errcarat: db "^ Error",7 0 00005D75 0D0A00 crlf: asciz 13,10 1479 1480 %if _SYMBOLIC 1481 pre_str_list: 0 00005D78 FF00 db -1, "", 0 1483 .end: 1484 %endif 1485 1486 0 00005D7A 00 align 4, db 0 1488 msgtable_value_range: 0 00005D7C [A711][B111] dw msg.executing, msg.executing_value_range 1490 %if _ACCESS_VARIABLES_AMOUNT 0 00005D80 [4E35][5635] dw .reading, .reading_range 0 00005D84 [D135][D935] dw .writing, .writing_range 0 00005D88 [5436][5F36] dw .memoperand, .memoperand_range 0 00005D8C [7036][7A36] dw .accessing, .accessing_range 1495 %endif 0 00005D90 0000 dw 0 1497 1498 %if _ACCESS_VARIABLES_AMOUNT 0 00005D92 52454144494E4700 .reading: asciz "READING" 1500 .reading_range: 1501 %assign iicounter 0 1502 %define iiprefix "" 1503 %rep _ACCESS_VARIABLES_AMOUNT 1504 _autohexitsstrdef IIDEF, iicounter 1505 db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 1506 %assign iicounter iicounter + 1 1507 %define iiprefix ", " 1508 %endrep 1504 <1> _autohexitsstrdef IIDEF, iicounter 0 00005D9A 46524F4D2072656164 db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 0 00005DA3 61647230204C454E47 0 00005DAC 544820726561646C65 0 00005DB5 6E30 1506 <1> %assign iicounter iicounter + 1 1507 <1> %define iiprefix ", " 1504 <1> _autohexitsstrdef IIDEF, iicounter 0 00005DB7 2C2046524F4D207265 db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 0 00005DC0 616461647231204C45 0 00005DC9 4E4754482072656164 0 00005DD2 6C656E31 1506 <1> %assign iicounter iicounter + 1 1507 <1> %define iiprefix ", " 1504 <1> _autohexitsstrdef IIDEF, iicounter 0 00005DD6 2C2046524F4D207265 db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 0 00005DDF 616461647232204C45 0 00005DE8 4E4754482072656164 0 00005DF1 6C656E32 1506 <1> %assign iicounter iicounter + 1 1507 <1> %define iiprefix ", " 1504 <1> _autohexitsstrdef IIDEF, iicounter 0 00005DF5 2C2046524F4D207265 db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 0 00005DFE 616461647233204C45 0 00005E07 4E4754482072656164 0 00005E10 6C656E33 1506 <1> %assign iicounter iicounter + 1 1507 <1> %define iiprefix ", " 0 00005E14 00 asciz 0 00005E15 57524954494E4700 .writing: asciz "WRITING" 1511 .writing_range: 1512 %assign iicounter 0 1513 %define iiprefix "" 1514 %rep _ACCESS_VARIABLES_AMOUNT 1515 _autohexitsstrdef IIDEF, iicounter 1516 db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 1517 %assign iicounter iicounter + 1 1518 %define iiprefix ", " 1519 %endrep 1515 <1> _autohexitsstrdef IIDEF, iicounter 0 00005E1D 46524F4D2077726974 db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 0 00005E26 61647230204C454E47 0 00005E2F 544820777269746C65 0 00005E38 6E30 1517 <1> %assign iicounter iicounter + 1 1518 <1> %define iiprefix ", " 1515 <1> _autohexitsstrdef IIDEF, iicounter 0 00005E3A 2C2046524F4D207772 db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 0 00005E43 697461647231204C45 0 00005E4C 4E4754482077726974 0 00005E55 6C656E31 1517 <1> %assign iicounter iicounter + 1 1518 <1> %define iiprefix ", " 1515 <1> _autohexitsstrdef IIDEF, iicounter 0 00005E59 2C2046524F4D207772 db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 0 00005E62 697461647232204C45 0 00005E6B 4E4754482077726974 0 00005E74 6C656E32 1517 <1> %assign iicounter iicounter + 1 1518 <1> %define iiprefix ", " 1515 <1> _autohexitsstrdef IIDEF, iicounter 0 00005E78 2C2046524F4D207772 db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 0 00005E81 697461647233204C45 0 00005E8A 4E4754482077726974 0 00005E93 6C656E33 1517 <1> %assign iicounter iicounter + 1 1518 <1> %define iiprefix ", " 0 00005E97 00 asciz 1521 0 00005E98 4D454D4F504552414E .memoperand: asciz "MEMOPERAND" 0 00005EA1 4400 0 00005EA3 52454144494E472C20 .memoperand_range: asciz "READING, WRITING" 0 00005EAC 57524954494E4700 0 00005EB4 414343455353494E47 .accessing: asciz "ACCESSING" 0 00005EBD 00 0 00005EBE 52454144494E472C20 .accessing_range: asciz "READING, WRITING, EXECUTING" 0 00005EC7 57524954494E472C20 0 00005ED0 455845435554494E47 0 00005ED9 00 1526 %endif 1527 1528 1529 %if _BOOTLDR 1530 %define lot_list 1531 %define lot_comma 1532 %macro lot_entry 2.nolist 1533 %ifn _LINK 1534 LOAD_%2 equ %1 1535 %endif 1536 dw LOAD_%2, .%2 1537 %defstr %%string %2 1538 %xdefine lot_list lot_list lot_comma .%2:, db %%string, db 0 1539 %define lot_comma , 1540 %endmacro 1541 1542 %macro lot_messages 0-*.nolist 1543 %rep (%0 / 3) 1544 %1 1545 %2 1546 %3 1547 %rotate 3 1548 %endrep 1549 %endmacro 1550 0 00005EDA 00 align 4, db 0 1552 loadoptiontable: 0 00005EDC 0100[0437] lot_entry 1, SET_DL_UNIT 0 00005EE0 0200[1037] lot_entry 2, SET_BL_UNIT 0 00005EE4 0400[1C37] lot_entry 4, SET_SIDI_CLUSTER 0 00005EE8 1000[2D37] lot_entry 10h, SET_DSSI_DPT 0 00005EEC 2000[3A37] lot_entry 20h, PUSH_DPT 0 00005EF0 4000[4337] lot_entry 40h, DATASTART_HIDDEN 0 00005EF4 8000[5437] lot_entry 80h, SET_AXBX_DATASTART 0 00005EF8 0001[6737] lot_entry 100h, SET_DSBP_BPB 0 00005EFC 0002[7437] lot_entry 200h, LBA_SET_TYPE 0 00005F00 0004[8137] lot_entry 400h, MESSAGE_TABLE 0 00005F04 0008[8F37] lot_entry 800h, SET_AXBX_ROOT_HIDDEN 0 00005F08 0010[A437] lot_entry 1000h, CMDLINE 0 00005F0C 0020[AC37] lot_entry 2000h, NO_BPB 0 00005F10 0040[B337] lot_entry 4000h, SET_DSSI_PARTINFO 0 00005F14 00000000 dw 0, 0 1568 1569 .incompatible: 0 00005F18 02008000 dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_DATASTART 0 00005F1C 02000008 dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_ROOT_HIDDEN 0 00005F20 80000008 dw LOAD_SET_AXBX_DATASTART, LOAD_SET_AXBX_ROOT_HIDDEN 0 00005F24 04001000 dw LOAD_SET_SIDI_CLUSTER, LOAD_SET_DSSI_DPT 0 00005F28 00011000 dw LOAD_SET_DSBP_BPB, LOAD_SET_DSSI_DPT 0 00005F2C 00200001 dw LOAD_NO_BPB, LOAD_SET_DSBP_BPB 0 00005F30 00200002 dw LOAD_NO_BPB, LOAD_LBA_SET_TYPE 0 00005F34 00200004 dw LOAD_NO_BPB, LOAD_MESSAGE_TABLE 0 00005F38 00400400 dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_SIDI_CLUSTER 0 00005F3C 00401000 dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSSI_DPT 0 00005F40 00400001 dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSBP_BPB 0 00005F44 00000000 dw 0, 0 1582 0 00005F48 5345545F444C5F554E lot_messages lot_list 0 00005F51 4954005345545F424C 0 00005F5A 5F554E495400534554 0 00005F63 5F534944495F434C55 0 00005F6C 53544552005345545F 0 00005F75 445353495F44505400 0 00005F7E 505553485F44505400 0 00005F87 444154415354415254 0 00005F90 5F48494444454E0053 0 00005F99 45545F415842585F44 0 00005FA2 415441535441525400 0 00005FAB 5345545F445342505F 0 00005FB4 425042004C42415F53 0 00005FBD 45545F54595045004D 0 00005FC6 4553534147455F5441 0 00005FCF 424C45005345545F41 0 00005FD8 5842585F524F4F545F 0 00005FE1 48494444454E00434D 0 00005FEA 444C494E45004E4F5F 0 00005FF3 425042005345545F44 0 00005FFC 5353495F5041525449 0 00006005 4E464F00 1584 1585 %unmacro lot_entry 2.nolist 1586 %unmacro lot_messages 0-*.nolist 1587 1588 1589 msdos7_message_table: 1590 ; the first four bytes give displacements to the various 1591 ; messages. an ASCIZ message indicates that this was the 1592 ; last message. a message terminated by 0FFh indicates 1593 ; that the last message (displacement at table + 3) is 1594 ; to follow after this message. 1595 ; the maximum allowed displacement is 7Fh. the minimum 1596 ; allowed displacement is 1, to avoid a zero displacement. 1597 ; only the last message is terminated by a zero byte, 1598 ; as that zero byte indicates the end of the message table. 1599 ; (the entire table is treated as one ASCIZ string.) 1600 ; MS-DOS 7.10 from MSW 98 SE seems to have at least 167h (359) 1601 ; bytes allocated to its buffer for these. 1602 ; 1603 ; this message table was discussed in a dosemu2 repo at 1604 ; https://github.com/stsp/dosemu2/issues/681 0 00006009 03 .: db .msg_invalid_system - ($ + 1) 0 0000600A 13 db .msg_io_error - ($ + 1) 0 0000600B 01 db .msg_invalid_system - ($ + 1) 0 0000600C 1D db .msg_press_any_key - ($ + 1) 1609 1610 .msg_invalid_system: 0 0000600D 0D0A496E76616C6964 db 13,10,"Invalid system", -1 0 00006016 2073797374656DFF 1612 1613 .msg_io_error: 0 0000601E 0D0A492F4F20657272 db 13,10,"I/O error", -1 0 00006027 6F72FF 1615 1616 .msg_press_any_key: 0 0000602A 0D0A4368616E676520 db 13,10,"Change disk and press any key",13,10,0 0 00006033 6469736B20616E6420 0 0000603C 707265737320616E79 0 00006045 206B65790D0A00 1618 .end: 1619 .size: equ .end - . 1620 1621 %if .size > 150h 1622 %error Message table too large! 1623 %endif 1624 1625 1626 1627 align 4, db 0 1628 loadsettings: 1629 istruc LOADSETTINGS 0 0000604C [AE08] at lsKernelName, dw msg.ldos_kernel_name 0 0000604E [2409] at lsAddName, dw msg.addname_empty 0 00006050 6000 at lsMinPara, dw 60h 0 00006052 0000 at lsMaxPara, dw 0 0 00006054 0010 at lsOptions, dw LOAD_CMDLINE 0 00006056 0002 at lsSegment, dw 200h 0 00006058 00040000 at lsEntry, dd 400h 0 0000605C 007CFFFF at lsBPB, dw 7C00h, -1 0 00006060 00FC03 at lsCheckOffset, dw 1020 0 00006066 6C44 at lsCheckValue, db "lD" 0 00006068 4C444F5300 at lsName, asciz "LDOS" 0 0000606D 00 iend 1642 istruc LOADSETTINGS 0 00006070 [8608] at lsKernelName, dw msg.freedos_kernel_name 0 00006072 [2409] at lsAddName, dw msg.addname_empty 0 00006074 2000 at lsMinPara, dw 20h 0 00006076 FFFF at lsMaxPara, dw -1 0 00006078 0300 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 0 0000607A 6000 at lsSegment, dw 60h 0 0000607C 00000000 at lsEntry, dd 0 0 00006080 007CFFFF at lsBPB, dw 7C00h, -1 0 00006084 0046524545 at lsName, asciz "FREEDOS" 0 00006090 444F5300 1652 iend 1653 istruc LOADSETTINGS 0 00006094 [9108] at lsKernelName, dw msg.dosc_kernel_name 0 00006096 [2409] at lsAddName, dw msg.addname_empty 0 00006098 2000 at lsMinPara, dw 20h 0 0000609A FFFF at lsMaxPara, dw -1 0 0000609C 0300 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 0 0000609E 0020 at lsSegment, dw 2000h 0 000060A0 00000000 at lsEntry, dd 0 0 000060A4 007C0000 at lsBPB, dw 7C00h, 0 0 000060A8 00444F5343 at lsName, asciz "DOSC" 0 000060B4 00 0 000060B5 00 iend 1664 istruc LOADSETTINGS 0 000060B8 [9908] at lsKernelName, dw msg.edrdos_kernel_name 0 000060BA [2409] at lsAddName, dw msg.addname_empty 0 000060BC 2000 at lsMinPara, dw 20h 0 000060BE FFFF at lsMaxPara, dw -1 0 000060C0 0301 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT | LOAD_SET_DSBP_BPB 0 000060C2 7000 at lsSegment, dw 70h 0 000060C4 00000000 at lsEntry, dd 0 0 000060C8 007CFFFF at lsBPB, dw 7C00h, -1 0 000060CC 0045445244 at lsName, asciz "EDRDOS" 0 000060D8 4F5300 0 000060DB 00 iend 1676 istruc LOADSETTINGS 0 000060DC [A308] at lsKernelName, dw msg.drdos9_kernel_name 0 000060DE [2409] at lsAddName, dw msg.addname_empty 0 000060E0 4000 at lsMinPara, dw paras(2 * 512) 0 000060E2 0002 at lsMaxPara, dw paras(16 * 512) 0 000060E4 0301 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT | LOAD_SET_DSBP_BPB 0 000060E6 7000 at lsSegment, dw 70h 0 000060E8 00000000 at lsEntry, dd 0 0 000060EC 007C0000 at lsBPB, dw 7C00h, 0 0 000060F0 00050000 at lsCopyBPB, dw 500h, 0 0 000060F4 004452444F at lsName, asciz "DRDOS9" 0 000060FC 533900 0 000060FF 00 iend 1689 istruc LOADSETTINGS 0 00006100 [B708] at lsKernelName, dw msg.msdos6_kernel_name 0 00006102 [BE08] at lsAddName, dw msg.msdos6_add_name 0 00006104 2000 at lsMinPara, dw 20h 0 00006106 6000 at lsMaxPara, dw 60h 0 00006108 F100 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 0 0000610A 7000 at lsSegment, dw 70h 0 0000610C 00000000 at lsEntry, dd 0 0 00006110 007C0000 at lsBPB, dw 7C00h, 0 0 00006114 004D53444F at lsName, asciz "MSDOS6" 0 00006120 533600 0 00006123 00 iend 1702 istruc LOADSETTINGS 0 00006124 [F908] at lsKernelName, dw msg.rxdos.0_kernel_name 0 00006126 [1009] at lsAddName, dw msg.rxdos.0_add_name 0 00006128 2000 at lsMinPara, dw 20h 0 0000612A 6000 at lsMaxPara, dw 60h 0 0000612C 3108 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 0 0000612E 7000 at lsSegment, dw 70h 0 00006130 00000000 at lsEntry, dd 0 0 00006134 007C0000 at lsBPB, dw 7C00h, 0 0 00006138 005258444F at lsName, asciz "RXDOS.0" 0 00006144 532E3000 1713 iend 1714 istruc LOADSETTINGS 0 00006148 [0609] at lsKernelName, dw msg.rxdos.1_kernel_name 0 0000614A [1009] at lsAddName, dw msg.rxdos.1_add_name 0 0000614C 2000 at lsMinPara, dw 20h 0 0000614E 6000 at lsMaxPara, dw 60h 0 00006150 3108 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 0 00006152 7000 at lsSegment, dw 70h 0 00006154 00000000 at lsEntry, dd 0 0 00006158 007C0000 at lsBPB, dw 7C00h, 0 0 0000615C 005258444F at lsName, asciz "RXDOS.1" 0 00006168 532E3100 1725 iend 1726 istruc LOADSETTINGS 0 0000616C [1A09] at lsKernelName, dw msg.rxdos.2_kernel_name 0 0000616E [2409] at lsAddName, dw msg.addname_empty 0 00006170 6000 at lsMinPara, dw 60h 0 00006172 0000 at lsMaxPara, dw 0 0 00006174 0010 at lsOptions, dw LOAD_CMDLINE 0 00006176 7000 at lsSegment, dw 70h 0 00006178 00040000 at lsEntry, dd 400h 0 0000617C 007CFFFF at lsBPB, dw 7C00h, -1 0 00006180 005258444F at lsName, asciz "RXDOS.2" 0 0000618C 532E3200 1736 iend 1737 istruc LOADSETTINGS 0 00006190 [1A09] at lsKernelName, dw msg.rxdos.2_kernel_name 0 00006192 [2409] at lsAddName, dw msg.addname_empty 0 00006194 6000 at lsMinPara, dw 60h 0 00006196 0000 at lsMaxPara, dw 0 0 00006198 0010 at lsOptions, dw LOAD_CMDLINE 0 0000619A 0002 at lsSegment, dw 200h 0 0000619C 00040000 at lsEntry, dd 400h 0 000061A0 007CFFFF at lsBPB, dw 7C00h, -1 0 000061A4 00FC03 at lsCheckOffset, dw 1020 0 000061AA 6C44 at lsCheckValue, db "lD" 0 000061AC 5258444F532E3300 at lsName, asciz "RXDOS.3" 1749 iend 1750 istruc LOADSETTINGS 0 000061B4 [C808] at lsKernelName, dw msg.ibmdos_kernel_name 0 000061B6 [D308] at lsAddName, dw msg.ibmdos_add_name 0 000061B8 2000 at lsMinPara, dw 20h 0 000061BA 8000 at lsMaxPara, dw 80h 0 000061BC F100 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 0 000061BE 7000 at lsSegment, dw 70h 0 000061C0 00000000 at lsEntry, dd 0 0 000061C4 007C0000 at lsBPB, dw 7C00h, 0 0 000061C8 0049424D44 at lsName, asciz "IBMDOS" 0 000061D4 4F5300 0 000061D7 00 iend 1763 istruc LOADSETTINGS 0 000061D8 [C808] at lsKernelName, dw msg.ibmdos_kernel_name 0 000061DA [D308] at lsAddName, dw msg.ibmdos_add_name 0 000061DC 2000 at lsMinPara, dw 20h 0 000061DE FFFF at lsMaxPara, dw -1 0 000061E0 F100 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 0 000061E2 7000 at lsSegment, dw 70h 0 000061E4 00000000 at lsEntry, dd 0 0 000061E8 007C0000 at lsBPB, dw 7C00h, 0 0 000061EC 004452444F at lsName, asciz "DRDOS" 0 000061F8 5300 0 000061FA 00 iend 1776 istruc LOADSETTINGS 0 000061FC [B708] at lsKernelName, dw msg.msdos7_kernel_name 0 000061FE [2409] at lsAddName, dw msg.addname_empty 0 00006200 4000 at lsMinPara, dw 40h 0 00006202 8000 at lsMaxPara, dw 80h 0 00006204 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 00006206 7000 at lsSegment, dw 70h 0 00006208 00020000 at lsEntry, dd 200h 0 0000620C 007CFFFF at lsBPB, dw 7C00h, -1 0 00006210 000002 at lsCheckOffset, dw 200h 0 00006216 424A at lsCheckValue, db "BJ" 0 00006218 4D53444F533700 at lsName, asciz "MSDOS7" 0 0000621F 00 iend 1791 istruc LOADSETTINGS 0 00006220 [DE08] at lsKernelName, dw msg.ntldr_kernel_name 0 00006222 [2409] at lsAddName, dw msg.addname_empty 0 00006224 2000 at lsMinPara, dw 20h 0 00006226 FFFF at lsMaxPara, dw -1 0 00006228 4100 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 0 0000622A 0020 at lsSegment, dw 2000h 0 0000622C 00000000 at lsEntry, dd 0 0 00006230 007C0000 at lsBPB, dw 7C00h, 0 0 00006234 004E544C44 at lsName, asciz "NTLDR" 0 00006240 5200 0 00006242 00 iend 1803 istruc LOADSETTINGS 0 00006244 [E408] at lsKernelName, dw msg.bootmgr_kernel_name 0 00006246 [2409] at lsAddName, dw msg.addname_empty 0 00006248 2000 at lsMinPara, dw 20h 0 0000624A FFFF at lsMaxPara, dw -1 0 0000624C 4100 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 0 0000624E 0020 at lsSegment, dw 2000h 0 00006250 00000000 at lsEntry, dd 0 0 00006254 007C0000 at lsBPB, dw 7C00h, 0 0 00006258 00424F4F54 at lsName, asciz "BOOTMGR" 0 00006264 4D475200 1814 iend 1815 istruc LOADSETTINGS 0 00006268 [EC08] at lsKernelName, dw msg.chain_kernel_name 0 0000626A [2409] at lsAddName, dw msg.addname_empty 0 0000626C 2000 at lsMinPara, dw paras(512) 0 0000626E 0002 at lsMaxPara, dw paras(8192) 0 00006270 0160 at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_DSSI_PARTINFO | LOAD_NO_BPB 0 00006272 C007 at lsSegment, dw 7C0h 0 00006274 007C40F8 at lsEntry, dw 7C00h, -7C0h 0 00006278 007C0000 at lsBPB, dw 7C00h, 0 0 0000627C 00FE01 at lsCheckOffset, dw 510 0 00006282 55AA at lsCheckValue, dw 0AA55h 0 00006284 434841494E00 at lsName, asciz "CHAIN" 0 0000628A 00 iend 0 0000628C 0000 dw 0 1830 %endif 1831 1832 1833 %if _APPLICATION || _DEVICE 0 0000628E 0D21 dskerrs: db dskerr0-dskerrs,dskerr1-dskerrs 0 00006290 3444 db dskerr2-dskerrs,dskerr3-dskerrs 0 00006292 5494 db dskerr4-dskerrs,dskerr9-dskerrs 0 00006294 6570 db dskerr6-dskerrs,dskerr7-dskerrs 0 00006296 8394 db dskerr8-dskerrs,dskerr9-dskerrs 0 00006298 A2AE db dskerra-dskerrs,dskerrb-dskerrs 0 0000629A B9 db dskerrc-dskerrs 0 0000629B 57726974652070726F dskerr0: asciz "Write protect error" 0 000062A4 74656374206572726F 0 000062AD 7200 0 000062AF 556E6B6E6F776E2075 dskerr1: asciz "Unknown unit error" 0 000062B8 6E6974206572726F72 0 000062C1 00 0 000062C2 4472697665206E6F74 dskerr2: asciz "Drive not ready" 0 000062CB 20726561647900 0 000062D2 556E6B6E6F776E2063 dskerr3: asciz "Unknown command" 0 000062DB 6F6D6D616E6400 0 000062E2 44617461206572726F dskerr4: asciz "Data error (CRC)" 0 000062EB 7220284352432900 0 000062F3 5365656B206572726F dskerr6: asciz "Seek error" 0 000062FC 7200 0 000062FE 556E6B6E6F776E206D dskerr7: asciz "Unknown media type" 0 00006307 656469612074797065 0 00006310 00 0 00006311 536563746F72206E6F dskerr8: asciz "Sector not found" 0 0000631A 7420666F756E6400 0 00006322 556E6B6E6F776E2065 dskerr9: asciz "Unknown error" 0 0000632B 72726F7200 0 00006330 577269746520666175 dskerra: asciz "Write fault" 0 00006339 6C7400 0 0000633C 52656164206661756C dskerrb: asciz "Read fault" 0 00006345 7400 0 00006347 47656E6572616C2066 dskerrc: asciz "General failure" 0 00006350 61696C75726500 0 00006357 207265616400 reading: asciz " read" 0 0000635D 207772697400 writing: asciz " writ" 0 00006363 696E67206472697665 drive: db "ing drive " 0 0000636C 20 0 0000636D 5F00 driveno: asciz "_" 1857 %endif 0 0000636F 383038362F383800 msg8088: asciz "8086/88" 0 00006377 78383600 msgx86: asciz "x86" 0 0000637B 20776974686F757420 no_copr: asciz " without coprocessor" 0 00006384 636F70726F63657373 0 0000638D 6F7200 0 00006390 207769746820636F70 has_copr: asciz " with coprocessor" 0 00006399 726F636573736F7200 0 000063A2 207769746820323837 has_287: asciz " with 287" 0 000063AB 00 0 000063AC 7472616365206D6F64 tmodes: db "trace mode is " 0 000063B5 6520697320 0 000063BA 5F202D20696E746572 tmodev: asciz "_ - interrupts are " 0 000063C3 727570747320617265 0 000063CC 2000 0 000063CE 74726163656400 tmode1: asciz "traced" 0 000063D5 70726F636573736564 tmode0: asciz "processed" 0 000063DE 00 0 000063DF 2028756E7573656429 unused: asciz " (unused)" 0 000063E8 00 1868 needsmsg: 0 000063E9 5B6E6565647320 .: db "[needs " 1870 .digit_x_ofs: equ $ - . 0 000063F0 7838 db "x8" 1872 .digit_6_ofs: equ $ - . 0 000063F2 365D db "6]" 1874 needsmsg_L: equ $-needsmsg 0 000063F4 5B6E65656473206D61 needsmath: db "[needs math coprocessor]" 0 000063FD 746820636F70726F63 0 00006406 6573736F725D 1876 needsmath_L: equ $-needsmath 0 0000640C 5B6F62736F6C657465 obsolete: db "[obsolete]" 0 00006415 5D 1878 obsolete_L: equ $-obsolete 0 00006416 446976696465206572 int0msg: asciz "Divide error",13,10 0 0000641F 726F720D0A00 0 00006425 556E65787065637465 int1msg: asciz "Unexpected single-step interrupt",13,10 0 0000642E 642073696E676C652D 0 00006437 7374657020696E7465 0 00006440 72727570740D0A00 0 00006448 556E65787065637465 int3msg: asciz "Unexpected breakpoint interrupt",13,10 0 00006451 6420627265616B706F 0 0000645A 696E7420696E746572 0 00006463 727570740D0A00 1882 %if _CATCHINT06 0 0000646A 496E76616C6964206F int6msg: asciz "Invalid opcode",13,10 0 00006473 70636F64650D0A00 1884 %endif 1885 %if _CATCHINT08 0 0000647B 446574656374656420 int8msg: asciz "Detected Control pressed for a while",13,10 0 00006484 436F6E74726F6C2070 0 0000648D 72657373656420666F 0 00006496 722061207768696C65 0 0000649F 0D0A00 0 000064A2 446574656374656420 int8_kbd_msg: asciz "Detected Control pressed for a while (Keyboard enabled)",13,10 0 000064AB 436F6E74726F6C2070 0 000064B4 72657373656420666F 0 000064BD 722061207768696C65 0 000064C6 20284B6579626F6172 0 000064CF 6420656E61626C6564 0 000064D8 290D0A00 1888 runint_ctrlc_msg: 0 000064DC 446574656374656420 asciz "Detected double Control-C via serial",13,10 0 000064E5 646F75626C6520436F 0 000064EE 6E74726F6C2D432076 0 000064F7 69612073657269616C 0 00006500 0D0A00 1890 %endif 1891 %if _CATCHINT07 1892 int7msg: asciz "No x87 present",13,10 1893 %endif 1894 %if _CATCHINT0C 0 00006503 537461636B20666175 int0Cmsg: asciz "Stack fault (in R86M)",13,10 0 0000650C 6C742028696E205238 0 00006515 364D290D0A00 1896 %endif 1897 %if _CATCHINT0D 0 0000651B 47656E6572616C2070 int0Dmsg: asciz "General protection fault (in R86M)",13,10 0 00006524 726F74656374696F6E 0 0000652D 206661756C74202869 0 00006536 6E205238364D290D0A 0 0000653F 00 1899 %endif 1900 %if _CATCHINT18 || _LOADER 0 00006540 4469736B6C65737320 int18msg: asciz "Diskless boot hook called",13,10 0 00006549 626F6F7420686F6F6B 0 00006552 2063616C6C65640D0A 0 0000655B 00 1902 %endif 1903 %if _CATCHINT19 || _LOADER 0 0000655C 426F6F74206C6F6164 int19msg: asciz "Boot load called",13,10 0 00006565 2063616C6C65640D0A 0 0000656E 00 1905 %endif 1906 %if _CATCHSYSREQ 1907 sysreqmsg: asciz "SysReq detected",13,10 1908 %endif 1909 %if _PM 1910 %if _CATCHEXC06 0 0000656F 496E76616C6964206F exc6msg: asciz "Invalid opcode fault",13,10 0 00006578 70636F646520666175 0 00006581 6C740D0A00 1912 %endif 1913 %if _CATCHEXC0C 0 00006586 537461636B20666175 excCmsg: asciz "Stack fault",13,10 0 0000658F 6C740D0A00 1915 %endif 0 00006594 47656E6572616C2070 excDmsg: asciz "General protection fault",13,10 0 0000659D 726F74656374696F6E 0 000065A6 206661756C740D0A00 1917 %endif 1918 %if _PM || _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 1919 %if _EXCCSIP 0 000065AF 43533A49503D excloc: db "CS:IP=" 0 000065B5 202020203A20202020 exccsip: asciz " : ",13,10 0 000065BE 0D0A00 1922 %endif 1923 %if _AREAS 1924 msg.area_hh_indirection_memory_access: 0 000065C1 45787072657373696F asciz "Expression indirection fault: " 0 000065CA 6E20696E6469726563 0 000065D3 74696F6E206661756C 0 000065DC 743A2000 1926 msg.area_rr_variable_read_access: 0 000065E0 4D656D6F7279207661 asciz "Memory variable read access fault: " 0 000065E9 726961626C65207265 0 000065F2 616420616363657373 0 000065FB 206661756C743A2000 1928 msg.area_rr_variable_write_access: 0 00006604 4D656D6F7279207661 asciz "Memory variable write access fault: " 0 0000660D 726961626C65207772 0 00006616 697465206163636573 0 0000661F 73206661756C743A20 0 00006628 00 1930 msg.area_uu_referenced_memory_access: 0 00006629 0D0A44697361737365 asciz 13,10,"Disassembly referenced memory fault: " 0 00006632 6D626C792072656665 0 0000663B 72656E636564206D65 0 00006644 6D6F7279206661756C 0 0000664D 743A2000 1932 msg.area_uu_simulate_scas: 0 00006651 446973617373656D62 asciz "Disassembly SCAS simulation fault: " 0 0000665A 6C7920534341532073 0 00006663 696D756C6174696F6E 0 0000666C 206661756C743A2000 1934 msg.area_uu_simulate_cmps: 0 00006675 446973617373656D62 asciz "Disassembly CMPS simulation fault: " 0 0000667E 6C7920434D50532073 0 00006687 696D756C6174696F6E 0 00006690 206661756C743A2000 1936 msg.area_aa_access: 0 00006699 417373656D626C7920 asciz "Assembly fault: " 0 000066A2 6661756C743A2000 1938 msg.area_dd_access: 0 000066AA 44756D702064617461 asciz "Dump data fault: " 0 000066B3 206661756C743A2000 1940 msg.area_ee_interactive_access: 0 000066BC 0D0A db 13,10 1942 msg.area_ee_access: 0 000066BE 456E74657220646174 asciz "Enter data fault: " 0 000066C7 61206661756C743A20 0 000066D0 00 1944 msg.area_rr_access: 0 000066D1 526567697374657220 asciz "Register command fault: " 0 000066DA 636F6D6D616E642066 0 000066E3 61756C743A2000 1946 msg.area_sss_access: 0 000066EA 53656172636820636F asciz "Search command fault: " 0 000066F3 6D6D616E6420666175 0 000066FC 6C743A2000 1948 msg.area_run_access: 0 00006701 52756E20636F6D6D61 asciz "Run command fault: " 0 0000670A 6E64206661756C743A 0 00006713 2000 1950 msg.area_uu_access: 0 00006715 446973617373656D62 asciz "Disassembly fault: " 0 0000671E 6C79206661756C743A 0 00006727 2000 1952 %endif 1953 %endif 1954 %if _PM 0 00006729 50616765206661756C excEmsg: asciz "Page fault",13,10 0 00006732 740D0A00 1956 %if _BREAK_INSTALLDPMI 0 00006736 456E74657265642050 installdpmimsg: asciz "Entered Protected Mode",13,10 0 0000673F 726F74656374656420 0 00006748 4D6F64650D0A00 1958 %endif 0 0000674F 436F6D6D616E64206E nodosext: asciz "Command not supported in protected mode without a DOS extender",13,10 0 00006758 6F7420737570706F72 0 00006761 74656420696E207072 0 0000676A 6F746563746564206D 0 00006773 6F646520776974686F 0 0000677C 7574206120444F5320 0 00006785 657874656E6465720D 0 0000678E 0A00 0 00006790 436F6D6D616E64206E nopmsupp: asciz "Command not supported in protected mode",13,10 0 00006799 6F7420737570706F72 0 000067A2 74656420696E207072 0 000067AB 6F746563746564206D 0 000067B4 6F64650D0A00 1961 %if _DISPHOOK 0 000067BA 44504D4920656E7472 dpmihook: db "DPMI entry hooked, new entry=" 0 000067C3 7920686F6F6B65642C 0 000067CC 206E657720656E7472 0 000067D5 793D 0 000067D7 5F5F5F5F3A dpmihookcs: db "____:" 1964 %ifn _LINK 1965 db _4digitshex(mydpmientry+DATASECTIONFIXUP) 1966 %else 1967 wlcalc dword_itoa_2_00_10h 0 000067DC [00000000] dd mydpmientry 1969 %endif 0 000067E0 0D0A00 asciz 13,10 1971 %if _DEBUG 0 000067E3 44504D4920656E7472 dpmihookamis: asciz "DPMI entry hooked by other debugger with AMIS callout",13,10 0 000067EC 7920686F6F6B656420 0 000067F5 6279206F7468657220 0 000067FE 646562756767657220 0 00006807 7769746820414D4953 0 00006810 2063616C6C6F75740D 0 00006819 0A00 1973 %endif 1974 %endif 0 0000681B 44504D4920656E7472 msg.dpmi_no_hook: asciz "DPMI entry cannot be hooked!",13,10 0 00006824 792063616E6E6F7420 0 0000682D 626520686F6F6B6564 0 00006836 210D0A00 0 0000683A 7265736F7572636520 nodesc: asciz "resource not accessible in real mode",13,10 0 00006843 6E6F74206163636573 0 0000684C 7369626C6520696E20 0 00006855 7265616C206D6F6465 0 0000685E 0D0A00 1977 ;descwrong: asciz "descriptor not accessible",13,10 0 00006861 4D532D444F5300 msg.msdos: asciz "MS-DOS" 0 00006868 2D2D2D2D2062617365 descriptor: db "---- base=" 0 00006871 3D 0 00006872 2D2D2D2D2D2D2D2D20 .base: db "-------- limit=" 0 0000687B 6C696D69743D 0 00006881 2D2D2D2D2D2D2D2D20 .limit: db "-------- attr=" 0 0000688A 617474723D 0 0000688F 2D2D2D2D0D0A .attrib: db "----",13,10 0 00006895 00 asciz 1984 %endif ; _PM 0 00006896 4572726F7220696E20 ph_msg: asciz "Error in sequence of calls to hack.",13,10 0 0000689F 73657175656E636520 0 000068A8 6F662063616C6C7320 0 000068B1 746F206861636B2E0D 0 000068BA 0A00 1986 0 000068BC 0D0A50726F6772616D progtrm: db 13,10,"Program terminated normally (" 0 000068C5 207465726D696E6174 0 000068CE 6564206E6F726D616C 0 000068D7 6C792028 0 000068DB 5F5F5F5F290D0A00 progexit: asciz "____)",13,10 1989 %if _APPLICATION || _DEVICE 0 000068E3 45584520616E642048 nowhexe: asciz "EXE and HEX files cannot be written",13,10 0 000068EC 45582066696C657320 0 000068F5 63616E6E6F74206265 0 000068FE 207772697474656E0D 0 00006907 0A00 0 00006909 43616E6E6F74207772 nownull: asciz "Cannot write: no file name given",13,10 0 00006912 6974653A206E6F2066 0 0000691B 696C65206E616D6520 0 00006924 676976656E0D0A00 0 0000692C 4572726F7220696E20 msg.hexerror: asciz "Error in HEX file",13,10 0 00006935 4845582066696C650D 0 0000693E 0A00 0 00006940 57726974696E672000 wwmsg1: asciz "Writing " 0 00006949 2062797465730D0A00 wwmsg2: asciz " bytes",13,10 0 00006952 4469736B2066756C6C diskful: asciz "Disk full",13,10 0 0000695B 0D0A00 0 0000695E 4572726F7220 openerr: db "Error " 0 00006964 5F5F5F5F206F70656E openerr1: asciz "____ opening file",13,10 0 0000696D 696E672066696C650D 0 00006976 0A00 0 00006978 46696C65206E6F7420 doserr2: asciz "File not found",13,10 0 00006981 666F756E640D0A00 0 00006989 50617468206E6F7420 doserr3: asciz "Path not found",13,10 0 00006992 666F756E640D0A00 0 0000699A 416363657373206465 doserr5: asciz "Access denied",13,10 0 000069A3 6E6965640D0A00 0 000069AA 496E73756666696369 doserr8: asciz "Insufficient memory",13,10 0 000069B3 656E74206D656D6F72 0 000069BC 790D0A00 0 000069C0 496E76616C69642066 doserr11: asciz "Invalid format",13,10 0 000069C9 6F726D61740D0A00 2003 %endif 2004 2005 %if _EMS 2006 %define dw_emserr dw 2007 %include "xxmsg.asm" 2008 %endif 2009 0 000069D1 00 align 4, db 0 2011 flagbits: 0 000069D4 000800040002800040 .: dw 800h,400h,200h, 80h,040h,010h,004h,001h 0 000069DD 00100004000100 2013 .amount: equ ($ - .) / 2 0 000069E4 4F56444E45494E475A flagson: dw "OV","DN","EI","NG","ZR","AC","PE","CY" 0 000069ED 52414350454359 0 000069F4 4E5655504449504C4E flagsoff: dw "NV","UP","DI","PL","NZ","NA","PO","NC" 0 000069FD 5A4E41504F4E43 0 00006A04 4F464446494653465A flagnames: dw "OF","DF","IF","SF","ZF","AF","PF","CF" 0 00006A0D 46414650464346 2017 %if _REGSREADABLEFLAGS 0 00006A14 4F314431493153315A flagson_style23:dw "O1","D1","I1","S1","Z1","A1","P1","C1" 0 00006A1D 31413150314331 0 00006A24 4F304430493053305A flagsoff_style2:dw "O0","D0","I0","S0","Z0","A0","P0","C0" 0 00006A2D 30413050304330 0 00006A34 4F5F445F495F535F5A flagsoff_style3:dw "O_","D_","I_","S_","Z_","A_","P_","C_" 0 00006A3D 5F415F505F435F 2021 %endif 2022 %if _40COLUMNS 2023 flagbits_for_40: equ 1____0____0____1____1____0____0____1b 2024 flagbits_for_80: equ 1____1____1____1____1____1____1____1b 2025 flagbits_for_shl: equ 16 - flagbits.amount 2026 2027 align 2, db 0 2028 shortflagbits: 0 00006A44 00040002 .: dw 400h, 200h 2030 .amount: equ ($ - .) / 2 0 00006A48 44204520 shortflagson: dw "D ", "E " 0 00006A4C 55204420 shortflagsoff: dw "U ", "D " 2033 %endif 2034 2035 align 4, db 0 2036 table_length_keywords: 0 00006A50 1E00[DB10] dw 30, msg.gib 0 00006A54 1400[DF10] dw 20, msg.mib 0 00006A58 0A00[E310] dw 10, msg.kib 0 00006A5C 0900[E710] dw 9, msg.pages 0 00006A60 0400[ED10] dw 4, msg.paragraphs 0 00006A64 0400[F810] dw 4, msg.paras 0 00006A68 0300[FE10] dw 3, msg.qwords 0 00006A6C 0200[0511] dw 2, msg.dwords 0 00006A70 0100[0611] dw 1, msg.words 0 00006A74 0000[0C11] dw 0, msg.bytes ; end of table, shift count zero 2047 0 00006A78 01 flagvaron: db 1 0 00006A79 00 flagvaroff: db 0 ; must be directly behind flagvaron 2050 2051 %if _COND 0 00006A7A 6E6F7420 msg.condnotjump:db "not " 0 00006A7E 6A756D70696E6700 msg.condjump: asciz "jumping" 2054 %endif 2055 0 00006A86 206D6174636865730D msg.matches: asciz " matches",13,10 0 00006A8F 0A00 2057 0 00006A91 00 align 4, db 0 0 00006A94 414C4148424C424843 reg8names: dw "AL","AH","BL","BH","CL","CH","DL","DH" 0 00006A9D 4C4348444C4448 2060 ; Even entries are xL registers, odd ones the xH ones. 2061 ; Order matches that of the first four regs entries. 2062 0 00006AA4 415842584358445853 reg16names: dw "AX","BX","CX","DX","SP","BP","SI","DI" 0 00006AAD 50425053494449 0 00006AB4 445345535353435346 dw "DS","ES","SS","CS","FS","GS","IP","FL" 0 00006ABD 5347534950464C 2065 ; 32-bit registers are the first eight and last two entries of 2066 ; reg16names with 'E', which are all non-segment registers. 2067 ; Segment registers can be detected by the 'S' as second letter. 2068 ; FS and GS are the fourth- and third-to-last entries. 2069 ; Order matches that of the sixteen regs entries. 2070 2071 %if _LOADER 2072 ; struc MOVETABLEENTRY moved to debug.mac 2073 2074 align 2, db 0 2075 movetable: ; used both as a table and as an array 2076 .bottom: 2077 dw msg.bottom 2078 dw 0 2079 dw msg.isbottom 2080 dw moveloader.already 2081 dw moveloader.top_to_bottom 2082 dw moveloader.hidden_to_bottom 2083 2084 dw msg.top 2085 dw 1 2086 dw msg.istop 2087 dw moveloader.bottom_to_top 2088 dw moveloader.already 2089 dw moveloader.hidden_to_top 2090 2091 dw msg.hidden 2092 dw 2 2093 dw msg.ishidden 2094 dw moveloader.bottom_to_hidden 2095 dw moveloader.top_to_hidden 2096 dw moveloader.already 2097 2098 dw 0 2099 2100 align 2, db 0 2101 movesegrefstable: 2102 dw code_seg 2103 %if _MESSAGESEGMENT 2104 dw messageseg 2105 %endif 2106 %if _EXTENSIONS 2107 dw extseg 2108 %endif 2109 %if _APP_ENV_SIZE || _DEV_ENV_SIZE || _BOOT_ENV_SIZE 2110 dw envseg 2111 %endif 2112 dw alloc_seg 2113 dw auxbuff_segorsel 2114 dw pspdbg 2115 %if _HISTORY && _HISTORY_SEPARATE_FIXED 2116 dw history.segorsel 2117 %endif 2118 %if _HELP_COMPRESSED && ! _PM && _MESSAGESEGMENT 2119 dw hshrink_memory_source.segment 2120 %endif 2121 dw 0 2122 %endif ; !_LOADER 2123 2124 2125 ; Table of recognised default (unsigned) types. 2126 ; 2127 ; If any number of characters match, use the type. 2128 ; If an additional "S" is found in front of a valid 2129 ; type, the type is set to signed. (Word and byte 2130 ; types are sign-extended to a dword value.) 2131 ; 2132 ; Each odd entry is an alternative name for the even 2133 ; entry preceding it. 2134 types: 0 00006AC4 0442595445 countedb "BYTE" ; ("B" is hexadecimal) 0 00006AC9 0443484152 countedb "CHAR" ; ("C" is hexadecimal, "CH" is a register) 0 00006ACE 04574F5244 countedb "WORD" 0 00006AD3 0553484F5254 countedb "SHORT" ; (signed "SS" is a register) 0 00006AD9 053342595445 countedb "3BYTE" ; ("3" and "3B" are numeric) 0 00006ADF 053342595445 countedb "3BYTE" 0 00006AE5 0544574F5244 countedb "DWORD" ; ("D" is hexadecimal) 0 00006AEB 044C4F4E47 countedb "LONG" 2143 .addresses: 0 00006AF0 07504F494E544552 countedb "POINTER" 0 00006AF8 03505452 countedb "PTR" 0 00006AFC 064F4646534554 countedb "OFFSET" 0 00006B03 034F4653 countedb "OFS" 0 00006B07 075345474D454E54 countedb "SEGMENT" 2149 .end: 2150 .addresses_minus_end equ (.addresses - .end) & 0FFFFh 2151 2152 ;maxtypesize equ 7 ; size of "SEGMENT" and "POINTER" 2153 ; moved to debug.mac === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00006B10 ???????? eldhSignature: resb 4 ; "ELD1" 0 00006B14 ?????? resb 3 ; reserved 0 00006B17 ?? resb 1 ; 26 (Ctrl-Z) 0 00006B18 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00006B1C ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00006B1E ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00006B20 ???????? eldhDataOffset: resd 1 0 00006B24 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00006B26 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00006B28 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00006B2A ???????? eldhReserved: resb 4 ; reserved 0 00006B2E ???? 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 00006B30 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00006B34 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00006B38 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00006B3C ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00006B10 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00006B18 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00006B1C ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00006B1E ???? 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 00006B10 ???? 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 00006B12 ???? eldltAmount: resw 1 0 00006B14 ???????? 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 00006B10 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00006B12 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00006B14 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00006B16 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00006B18 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00006B20 ???? 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 00006B10 ???? eldlSignature: resw 1 ; 0E1D1h 0 00006B12 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00006B14 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00006B16 ???? eldlUseLinkHash: resw 1 0 00006B18 ???? eldlDataAmount: resw 1 0 00006B1A ???? eldlDataPrefixes: resw 1 0 00006B1C ???? eldlDataEntries: resw 1 0 00006B1E ???? eldlDataAddresses: resw 1 0 00006B20 ???? eldlCodeAmount: resw 1 0 00006B22 ???? eldlCodePrefixes: resw 1 0 00006B24 ???? eldlCodeEntries: resw 1 0 00006B26 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00006B28 ???? eldlDualAmount: resw 1 0 00006B2A ???? eldlDualPrefixes: resw 1 0 00006B2C ???? eldlDualEntries: resw 1 0 00006B2E ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00006B10 ???? ifKeyword: resw 1 0 00006B12 ???? ifDescription: resw 1 0 00006B14 ???? ifOptions: resw 1 0 00006B16 ???? ifValue: resw 1 0 00006B18 ???? ifTrying: resw 1 0 00006B1A ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00006B10 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00006B14 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00006B18 ???? smName1: resw 1 ; -> first string part 0 00006B1A ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00006B1C ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00006B1E ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00006B20 ???? smBaseNext: resw 1 0 00006B22 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00006B24 ???? smSpecialNext: resw 1 0 00006B26 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00006B10 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00006B11 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00006B12 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00006B10 ???? shHash: resw 1 ; hash value 0 00006B12 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00006B10 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00006B14 ???? xmsmSourceHandle: resw 1 0 00006B16 ???????? xmsmSourceAddress: resd 1 0 00006B1A ???? xmsmDestHandle: resw 1 0 00006B1C ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 %if !_LINK || _PM 24 usesection lDEBUG_DATA_ENTRY 24 ------------------ note: usesection lDEBUG_DATA_ENTRY 25 %if _LINK_COMPAT 26 align 16, db 0 27 %endif 28 29 align 4, db 0 0 00006B10 00000000 dpmientry: dd 0 ; DPMI entry point returned by DPMI host 0 00006B14 00000000 dpmiwatch: dd 0 0 00006B18 00000000 dpmi_rm2pm: dd 0 0 00006B1C 00000000 dpmi_rmsav: dd 0 0 00006B20 000000000000 dpmi_pm2rm: dw 0,0,0 0 00006B26 000000000000 dpmi_pmsav: dw 0,0,0 36 align 2, db 0 0 00006B2C 0000 dssel: dw 0 ; debugger's (16-bit RW) data selector 0 00006B2E 0000 cssel: dw 0 ; debugger's (16-bit RE) code selector 0 00006B30 0000 scratchsel: dw 0 ; scratch selector used for various purposes, limit -1 40 %if _SYMBOLIC 0 00006B32 0000 symsel1: dw 0 ; selector used to access symbol table access slices 0 00006B34 0000 symsel2: dw 0 ; another selector used to access symbol table 43 %endif 44 %if _IMMASM 0 00006B36 0000 immsel: dw 0 ; selector for immasm 46 %endif 0 00006B38 00 dpmi32: db 0 ; 32-bit client if true 0 00006B39 00 bCSAttr: db 0 ; current code attribute (D bit) 49 align 2, db 0 0 00006B3A 00 bAddr32: db 0 ; Address attribute. if 1, hiword(edx) is valid 0 00006B3B 00 db 0 ; read/written when bAddr32 is pushed/popped 52 53 54 align 2, db 0 55 convsegs: 56 .: 0 00006B3C [0200] dw pInDOS + so16aSegSel 58 %if _USESDA 0 00006B3E [0200] dw pSDA + so16aSegSel 60 %endif 0 00006B40 [0000] dw auxbuff_segorsel + soaSegSel 62 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00006B42 [0000] dw history.segorsel + soaSegSel 64 %endif 65 .end_fixed: 66 .amount_fixed: equ (.end_fixed - .) / 2 0 00006B44 [0400] dw a_addr + saSegSel 0 00006B46 [0400] dw d_addr + saSegSel 0 00006B48 [0400] dw e_addr + saSegSel 70 .end: 71 .amount: equ (.end - .) / 2 72 73 exctab: 74 %if _CATCHEXC00 0 00006B4A 00 db 00h 76 %endif 77 %if _CATCHEXC01 0 00006B4B 01 db 01h 79 %endif 80 %if _CATCHEXC03 0 00006B4C 03 db 03h 82 %endif 83 %if _CATCHEXC06 0 00006B4D 06 db 06h 85 %endif 86 %if _CATCHEXC0C 0 00006B4E 0C db 0Ch 88 %endif 89 %if _CATCHEXC0D 0 00006B4F 0D db 0Dh 91 %endif 92 %if _CATCHEXC0E 0 00006B50 0E db 0Eh 94 %endif 95 endexctab: 96 97 %if _CATCHPMINT214C || _DEBUG || _TSR || _DEVICE 0 00006B51 00 align 8, db 0 99 excsave: 100 .: 101 %if _CATCHEXC00 0 00006B58 FFFFFFFFFFFF0000 dw -1,-1,-1,0 ; 0 103 %endif 104 %if _CATCHEXC01 0 00006B60 FFFFFFFFFFFF0000 dw -1,-1,-1,0 ; 1 106 %endif 107 %if _CATCHEXC03 0 00006B68 FFFFFFFFFFFF0000 dw -1,-1,-1,0 ; 3 109 %endif 110 %if _CATCHEXC06 0 00006B70 FFFFFFFFFFFF0000 dw -1,-1,-1,0 ; 6 112 %endif 113 %if _CATCHEXC0C 0 00006B78 FFFFFFFFFFFF0000 dw -1,-1,-1,0 ; 0C 115 %endif 116 %if _CATCHEXC0D 0 00006B80 FFFFFFFFFFFF0000 dw -1,-1,-1,0 ; 0D 118 %endif 119 %if _CATCHEXC0E 0 00006B88 FFFFFFFFFFFF0000 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 0 00006B90 21 db 21h 0 00006B91 [0000] dw pmint21 136 %endif 137 %if _CATCHPMINT41 138 db 41h 139 dw pmint41 140 %endif 141 .end: 142 .amount: equ (.end - .) / 3 143 0 00006B93 00 align 8, db 0 145 pmintsave: 146 .: 147 %if _CATCHPMINT214C 0 00006B98 FFFFFFFFFFFF0000 .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/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00006BA0 ???????? eldhSignature: resb 4 ; "ELD1" 0 00006BA4 ?????? resb 3 ; reserved 0 00006BA7 ?? resb 1 ; 26 (Ctrl-Z) 0 00006BA8 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00006BAC ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00006BAE ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00006BB0 ???????? eldhDataOffset: resd 1 0 00006BB4 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00006BB6 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00006BB8 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00006BBA ???????? eldhReserved: resb 4 ; reserved 0 00006BBE ???? 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 00006BC0 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00006BC4 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00006BC8 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00006BCC ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00006BA0 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00006BA8 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00006BAC ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00006BAE ???? 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 00006BA0 ???? 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 00006BA2 ???? eldltAmount: resw 1 0 00006BA4 ???????? 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 00006BA0 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00006BA2 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00006BA4 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00006BA6 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00006BA8 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00006BB0 ???? 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 00006BA0 ???? eldlSignature: resw 1 ; 0E1D1h 0 00006BA2 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00006BA4 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00006BA6 ???? eldlUseLinkHash: resw 1 0 00006BA8 ???? eldlDataAmount: resw 1 0 00006BAA ???? eldlDataPrefixes: resw 1 0 00006BAC ???? eldlDataEntries: resw 1 0 00006BAE ???? eldlDataAddresses: resw 1 0 00006BB0 ???? eldlCodeAmount: resw 1 0 00006BB2 ???? eldlCodePrefixes: resw 1 0 00006BB4 ???? eldlCodeEntries: resw 1 0 00006BB6 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00006BB8 ???? eldlDualAmount: resw 1 0 00006BBA ???? eldlDualPrefixes: resw 1 0 00006BBC ???? eldlDualEntries: resw 1 0 00006BBE ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00006BA0 ???? ifKeyword: resw 1 0 00006BA2 ???? ifDescription: resw 1 0 00006BA4 ???? ifOptions: resw 1 0 00006BA6 ???? ifValue: resw 1 0 00006BA8 ???? ifTrying: resw 1 0 00006BAA ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00006BA0 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00006BA4 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00006BA8 ???? smName1: resw 1 ; -> first string part 0 00006BAA ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00006BAC ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00006BAE ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00006BB0 ???? smBaseNext: resw 1 0 00006BB2 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00006BB4 ???? smSpecialNext: resw 1 0 00006BB6 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00006BA0 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00006BA1 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00006BA2 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00006BA0 ???? shHash: resw 1 ; hash value 0 00006BA2 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00006BA0 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00006BA4 ???? xmsmSourceHandle: resw 1 0 00006BA6 ???????? xmsmSourceAddress: resd 1 0 00006BAA ???? xmsmDestHandle: resw 1 0 00006BAC ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 %if !_LINK || _PM 24 usesection lDEBUG_DATA_ENTRY 24 ------------------ note: 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: 0 00006BA0 80FC4C cmp ah, 4Ch 0 00006BA3 7531 jne .next 0 00006BA5 1E push ds 0 00006BA6 2E8E1E[0000] mov ds, word [cs:dssel] 37 0 00006BAB 66 _386_o32 0 00006BAC 60 pusha 0 00006BAD 06 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. 0 00006BAE 8CDA mov dx, ds ; dx = ds = debugger data selector 0 00006BB0 8CD0 mov ax, ss 0 00006BB2 66 _386_o32 ; mov ebx, esp 0 00006BB3 89E3 mov bx, sp ; ax:(e)bx = stack to restore 49 0 00006BB5 39C2 cmp dx, ax ; special case: already on our stack ? 0 00006BB7 740A je @F ; yes, avoid stack switch --> 52 0 00006BB9 66 _386_o32 ; mov ecx, dword [run_sp] 0 00006BBA 8B0E[0000] mov cx, word [run_sp] ; dx:(e)cx = our stack 0 00006BBE 8ED2 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) 0 00006BC0 66 o32 ; mov esp, ecx 60 %endif 0 00006BC1 89CC mov sp, cx ; switch to our stack 62 63 @@: 0 00006BC3 50 push ax 0 00006BC4 66 _386_o32 ; push ebx 0 00006BC5 53 push bx ; save original stack, far pointer 67 0 00006BC6 0E push cs 0 00006BC7 E81200 call .transfer ; ! this function assumes a 16-bit stack 70 71 .back: 0 00006BCA 66 _386_o32 0 00006BCB 5B pop bx 0 00006BCC 58 pop ax ; ax:(e)bx = original stack 0 00006BCD 8ED0 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) 0 00006BCF 66 o32 ; mov esp, ebx 80 %endif 0 00006BD0 89DC mov sp, bx ; return to user stack 82 0 00006BD2 07 pop es 0 00006BD3 66 _386_o32 0 00006BD4 61 popa 86 0 00006BD5 1F pop ds 88 .next: 0 00006BD6 66 _386_o32 0 00006BD7 2EFF2E[0000] jmp far [cs:pmintsave.int21] 91 92 .transfer: 0 00006BDC E8[0000] call entry_to_code_sel ; ! this function assumes a 16-bit stack 0 00006BDF [0000] dw pmint21_4C_code 95 96 97 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 97 ------------------ note: usesection lDEBUG_CODE 98 99 code_insure_low_byte_not_0CCh 100 pmint21_4C_code: 0 00007C41 C606[0000]02 mov byte [pm_2_86m_0], 2 0 00007C46 800E[0100]08 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) 0 00007C4B 8026[0200]D3 clropt [internalflags], canswitchmode | switchbuffer | modeswitched 108 0 00007C50 8B0E[0000] mov cx, word [auxbuff_switchbuffer_size] 0 00007C54 E30A jcxz .no_switchbuffer_size_change 0 00007C56 8E06[0400] mov es, word [auxbuff_segorsel + soaSelector] 0 00007C5A 31FF xor di, di ; es:di -> auxbuff switchbuffer 0 00007C5C B020 mov al, 32 0 00007C5E F3AA 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: 0 00007C60 8326[0000]00 and word [auxbuff_switchbuffer_size], 0 119 0 00007C65 16 push ss 0 00007C66 07 pop es 122 0 00007C67 E8[0000] call pm_reset_handlers 124 0 00007C6A CB retf ; jump to cssel:pmint21.next 126 %endif 127 128 129 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 129 ------------------ note: 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 00000000 resw 8 ; pusha 0 00006BB0 ???? fr16_ds: resw 1 ; push ds 0 00006BB2 ???????? resw 2 ; 16-bit return address to DPMI host 0 00006BB6 ???? resw 1 ; error code 0 00006BB8 ???? fr16_ip: resw 1 0 00006BBA ???? fr16_cs: resw 1 0 00006BBC ???? fr16_fl: resw 1 0 00006BBE ???? fr16_sp: resw 1 0 00006BC0 ???? fr16_ss: resw 1 158 endstruc 159 160 struc exceptionframe32 161 00000000 resd 8 ; pushad 0 00006BC0 ???? resw 1 ; stack alignment 0 00006BC2 ???? fr32_ds: resw 1 ; push ds 0 00006BC4 ???????????????? resd 2 ; 32-bit return address to DPMI host 0 00006BCC ???????? resd 1 ; error code 0 00006BD0 ???????? fr32_eip: resd 1 0 00006BD4 ???????? fr32_cs: resd 1 0 00006BD8 ???????? fr32_efl: resd 1 0 00006BDC ???????? fr32_esp: resd 1 0 00006BE0 ???????? 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 0 00006BE1 00 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 0 00006BE2 1E68[0000] exc_entry 00, int0msg 198 %endif 199 %if _CATCHEXC01 0 00006BE6 EB221E68[0000] exc_entry 01, int1msg 201 %endif 202 %if _CATCHEXC03 0 00006BEC EB1C1E68[0000] exc_entry 03, int3msg 204 %endif 205 %if _CATCHEXC06 0 00006BF2 EB161E68[0000] exc_entry 06, exc6msg 207 %endif 208 %if _CATCHEXC0C 0 00006BF8 EB101E68[0000] exc_entry 0C, excCmsg 210 %endif 211 %if _CATCHEXC0D 0 00006BFE EB0A1E68[0000] exc_entry 0D, excDmsg 213 %endif 214 %if _CATCHEXC0E 0 00006C04 EB041E68[0000] exc_entry 0E, excEmsg 216 %endif 217 exc: 0 00006C0A 2E8E1E[0000] mov ds, word [cs:dssel] 219 0 00006C0F 90 align 4, nop 221 patcharea_pm_exc: 0 00006C10 90 .: times 32 nop 223 .end: 224 .size equ .end - . 225 .segment equ pspdbg 226 0 00006C30 8F06[0000] 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 0 00006C34 803E[0000]00 cmp byte [dpmi32], 0 0 00006C39 7503E9A900 jz exc16 250 251 [cpu 386] 252 exc32: 0 00006C3E 50 push ax ; stack alignment 0 00006C3F 6660 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 0 00006C41 6689E5 mov ebp, esp 0 00006C44 67668B4530 mov eax, dword [ ebp + fr32_eip ] 0 00006C49 678B5D34 mov bx, word [ ebp + fr32_cs ] 0 00006C4D 67668B4D38 mov ecx, dword [ ebp + fr32_efl ] 0 00006C52 67668B553C mov edx, dword [ ebp + fr32_esp ] 0 00006C57 678B7540 mov si, word [ ebp + fr32_ss ] 279 %if _PM_ENTRY_SECTION 0 00006C5B FF36[0000] push word [code_sel] 0 00006C5F 678F4534 pop word [ ebp + fr32_cs ] 282 %else 283 mov word [ ebp + fr32_cs ], cs 284 %endif 0 00006C63 678C5D40 mov word [ ebp + fr32_ss ], ds 0 00006C67 803E[0000]00 cmp byte [ bInDbg ], 0 ; did the exception occur inside DEBUG? 0 00006C6C 7431 je @F ; no --> 288 289 ; inside debugger 290 %if _EXCCSIP || _AREAS 0 00006C6E A3[0000] mov word [exception_csip], ax 0 00006C71 891E[0200] mov word [exception_csip + 2], bx 293 ; render CS:IP if internal GPF 294 %if _AREAS 0 00006C75 06 push es 0 00006C76 1E push ds 0 00006C77 07 pop es 0 00006C78 FC cld 0 00006C79 87F2 xchg si, dx ; si -> stack 0 00006C7B BF[0000] mov di, exception_stack 0 00006C7E B90800 mov cx, 8 0 00006C81 F3A4 rep movsb ; preserve 4 words 0 00006C83 07 pop es 304 %endif 305 %endif 0 00006C84 6766C74530 mov dword [ ebp + fr32_eip ], debuggerexception 0 00006C89 [00000000] 0 00006C8D 660FB706[0000] movzx eax, word [ savesp ] 0 00006C93 676689453C mov dword [ ebp + fr32_esp ], eax 0 00006C98 67806539FE clropt [ ebp + fr32_efl ], 100h ; reset TF 0 00006C9D EB42 jmp short @FF 311 312 @@: ; inside debuggee 0 00006C9F C606[0000]02 mov byte [pm_2_86m_0], 2 0 00006CA4 800E[0100]08 setopt [internalflags], protectedmode 315 %if _PM_ENTRY_SECTION && _RUN_ENTRY_SECTION 0 00006CA9 6766C74530 mov dword [ ebp + fr32_eip ], intrtn2_entry 0 00006CAE [00000000] 0 00006CB2 678C4D34 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 0 00006CB6 67806539FC clropt [ ebp + fr32_efl ], 300h ; reset IF + TF 0 00006CBB 6766C7453C mov dword [ ebp + fr32_esp ], reg_ss 0 00006CC0 [00000000] 0 00006CC4 66A3[0000] mov dword [ reg_eip ], eax 0 00006CC8 891E[0000] mov word [ reg_cs ], bx 332 ; mov dword [ reg_efl ], ecx ; (eflh is saved in intrtn2_code) 0 00006CCC 890E[0000] mov word [ reg_efl ], cx 0 00006CD0 668916[0000] mov dword [ reg_esp ], edx 0 00006CD5 8936[0000] mov word [ reg_ss ], si 0 00006CD9 67FF7522 push word [ ebp + fr32_ds ] 0 00006CDD 8F06[0000] pop word [ reg_ds ] 338 339 @@: 0 00006CE1 6661 popad 0 00006CE3 58 pop ax ; stack alignment 0 00006CE4 1F pop ds 0 00006CE5 66CB o32 retf 344 345 __CPU__ 346 exc16: 0 00006CE7 60 pusha 0 00006CE8 89E5 mov bp, sp 0 00006CEA 8B4618 mov ax, word [ bp + fr16_ip ] 0 00006CED 8B5E1A mov bx, word [ bp + fr16_cs ] 0 00006CF0 8B4E1C mov cx, word [ bp + fr16_fl ] 0 00006CF3 8B561E mov dx, word [ bp + fr16_sp ] 0 00006CF6 8B7620 mov si, word [ bp + fr16_ss ] 354 %if _PM_ENTRY_SECTION 0 00006CF9 FF36[0000] push word [code_sel] 0 00006CFD 8F461A pop word [ bp + fr16_cs ] 357 %else 358 mov word [ bp + fr16_cs ], cs 359 %endif 0 00006D00 8C5E20 mov word [ bp + fr16_ss ], ds 0 00006D03 803E[0000]00 cmp byte [ bInDbg ], 0 ; did the exception occur inside DEBUG? 0 00006D08 7427 je isdebuggee16 363 %if _EXCCSIP || _AREAS 0 00006D0A A3[0000] mov word [exception_csip], ax 0 00006D0D 891E[0200] mov word [exception_csip + 2], bx 366 ; render CS:IP if internal GPF 367 %if _AREAS 0 00006D11 06 push es 0 00006D12 1E push ds 0 00006D13 07 pop es 0 00006D14 FC cld 0 00006D15 87F2 xchg si, dx ; si -> stack 0 00006D17 BF[0000] mov di, exception_stack 0 00006D1A B90800 mov cx, 8 0 00006D1D F3A4 rep movsb ; preserve 4 words 0 00006D1F 07 pop es 377 %endif 378 %endif 0 00006D20 C74618[0000] mov word [ bp + fr16_ip ], debuggerexception 0 00006D25 A1[0000] mov ax, word [ savesp ] 0 00006D28 89461E mov word [ bp + fr16_sp ], ax 0 00006D2B 80661DFE clropt [ bp + fr16_fl ], 100h ; reset TF 0 00006D2F EB35 jmp short isdebugger16 384 isdebuggee16: 0 00006D31 C606[0000]02 mov byte [pm_2_86m_0], 2 0 00006D36 800E[0100]08 setopt [internalflags], protectedmode 387 %if _PM_ENTRY_SECTION && _RUN_ENTRY_SECTION 0 00006D3B C74618[0000] mov word [ bp + fr16_ip ], intrtn2_entry 0 00006D40 8C4E1A 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 0 00006D43 80661DFC clropt [ bp + fr16_fl ], 300h ; reset IF + TF 0 00006D47 C7461E[0000] mov word [ bp + fr16_sp ], reg_ss 0 00006D4C A3[0000] mov word [ reg_eip ], ax 0 00006D4F 891E[0000] mov word [ reg_cs ], bx 0 00006D53 890E[0000] mov word [ reg_efl ], cx 0 00006D57 8916[0000] mov word [ reg_esp ], dx 0 00006D5B 8936[0000] mov word [ reg_ss ], si 0 00006D5F FF7610 push word [ bp + fr16_ds ] 0 00006D62 8F06[0000] pop word [ reg_ds ] 408 isdebugger16: 0 00006D66 61 popa 0 00006D67 1F pop ds 0 00006D68 CB retf 412 413 414 usesection lDEBUG_DATA_ENTRY 414 ------------------ note: usesection lDEBUG_DATA_ENTRY 415 416 i23pm: 417 %if 1 0 00006D69 1E push ds 0 00006D6A 2E8E1E[0000] mov ds, word [cs:dssel] 0 00006D6F 800E[0000]02 setopt [serial_flags], sf_ctrl_c 0 00006D74 1F pop ds 422 %endif 0 00006D75 2E803E[0000]00 cmp byte [ cs:dpmi32 ], 0 ; ! always NC 0 00006D7B 7404 je .retfw_2 425 [cpu 386] 0 00006D7D 66CA0400 retfd 4 ; (NC) 427 __CPU__ 428 .retfw_2: 0 00006D81 CA0200 retfw 2 ; (NC) 430 431 i24pm: 0 00006D84 B003 mov al, 03h ; fail 0 00006D86 2E803E[0000]00 cmp byte [ cs:dpmi32 ], 0 0 00006D8C 7401 je .iret16 0 00006D8E 66 o32 ; iretd 436 .iret16: 0 00006D8F CF iret 438 439 subcpureset 440 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00006D90 ???????? eldhSignature: resb 4 ; "ELD1" 0 00006D94 ?????? resb 3 ; reserved 0 00006D97 ?? resb 1 ; 26 (Ctrl-Z) 0 00006D98 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00006D9C ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00006D9E ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00006DA0 ???????? eldhDataOffset: resd 1 0 00006DA4 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00006DA6 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00006DA8 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00006DAA ???????? eldhReserved: resb 4 ; reserved 0 00006DAE ???? 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 00006DB0 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00006DB4 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00006DB8 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00006DBC ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00006D90 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00006D98 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00006D9C ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00006D9E ???? 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 00006D90 ???? 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 00006D92 ???? eldltAmount: resw 1 0 00006D94 ???????? 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 00006D90 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00006D92 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00006D94 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00006D96 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00006D98 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00006DA0 ???? 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 00006D90 ???? eldlSignature: resw 1 ; 0E1D1h 0 00006D92 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00006D94 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00006D96 ???? eldlUseLinkHash: resw 1 0 00006D98 ???? eldlDataAmount: resw 1 0 00006D9A ???? eldlDataPrefixes: resw 1 0 00006D9C ???? eldlDataEntries: resw 1 0 00006D9E ???? eldlDataAddresses: resw 1 0 00006DA0 ???? eldlCodeAmount: resw 1 0 00006DA2 ???? eldlCodePrefixes: resw 1 0 00006DA4 ???? eldlCodeEntries: resw 1 0 00006DA6 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00006DA8 ???? eldlDualAmount: resw 1 0 00006DAA ???? eldlDualPrefixes: resw 1 0 00006DAC ???? eldlDualEntries: resw 1 0 00006DAE ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00006D90 ???? ifKeyword: resw 1 0 00006D92 ???? ifDescription: resw 1 0 00006D94 ???? ifOptions: resw 1 0 00006D96 ???? ifValue: resw 1 0 00006D98 ???? ifTrying: resw 1 0 00006D9A ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00006D90 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00006D94 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00006D98 ???? smName1: resw 1 ; -> first string part 0 00006D9A ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00006D9C ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00006D9E ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00006DA0 ???? smBaseNext: resw 1 0 00006DA2 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00006DA4 ???? smSpecialNext: resw 1 0 00006DA6 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00006D90 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00006D91 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00006D92 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00006D90 ???? shHash: resw 1 ; hash value 0 00006D92 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00006D90 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00006D94 ???? xmsmSourceHandle: resw 1 0 00006D96 ???????? xmsmSourceAddress: resd 1 0 00006D9A ???? xmsmDestHandle: resw 1 0 00006D9C ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 %if !_LINK || _PM 24 usesection lDEBUG_DATA_ENTRY 24 ------------------ note: usesection lDEBUG_DATA_ENTRY 25 26 ; Int2F handler. Starts with an IISP header. 27 align 2, db 0 0 00006D90 EB10FFFFFFFF4B4200 iispentry debug2F, 0, debug2F 0 00006D99 EB4100 29 oldi2F: equ debug2F.next 0 00006DA2 9C pushf 0 00006DA3 3D8716 cmp ax, 1687h 32 dpmidisable: ; set this byte to __TEST_IMM8 to disable new DPMI entry 0 00006DA6 7406 je short dpmiquery 0 00006DA8 9D popf 35 jumpoldi2F: 0 00006DA9 2EFF2E[0200] jmp far [ cs:oldi2F ] 37 38 dpmiquery: 0 00006DAE 0E push cs 0 00006DAF E8F7FF call jumpoldi2F 0 00006DB2 85C0 test ax, ax 0 00006DB4 750F jnz .nohost 43 0 00006DB6 2E893E[0000] mov word [ cs:dpmientry+0 ], di 0 00006DBB 2E8C06[0200] mov word [ cs:dpmientry+2 ], es 0 00006DC0 BF[3600] mov di, mydpmientry 0 00006DC3 0E push cs 0 00006DC4 07 pop es 49 .nohost: 0 00006DC5 CF iret 51 52 mydpmientry: 0 00006DC6 2EC606[0000]00 mov byte [ cs:dpmi32 ], 0 0 00006DCC A801 test al, 1 0 00006DCE 7405 jz .16 0 00006DD0 2EFE06[0000] inc byte [ cs:dpmi32 ] 57 .16: 0 00006DD5 2EFF1E[0000] call far [ cs:dpmientry ] 0 00006DDA 7301 jnc installdpmi 60 debug2F.hwreset: 0 00006DDC CB retf 62 63 64 subcpu 286 65 installdpmi: 0 00006DDD 60 pusha 0 00006DDE 89E5 mov bp, sp ; [bp+16]=ip, [bp+18]=cs 0 00006DE0 9C pushf 0 00006DE1 1E push ds 0 00006DE2 06 push es 71 0 00006DE3 8CCB mov bx, cs 0 00006DE5 B80600 mov ax, 0006h 0 00006DE8 CD31 int 31h 0 00006DEA 7303E91D01 jc .fataldpmierr ; get base address of cs 0 00006DEF F6C20F test dl, 15 0 00006DF2 7403E91501 jnz .fataldpmierr 0 00006DF7 F7C1F0FF test cx, 0FFF0h 0 00006DFB 7403E90C01 jnz .fataldpmierr 0 00006E00 C1EA04 shr dx, 4 0 00006E03 C1E10C shl cx, 12 0 00006E06 09CA or dx, cx 0 00006E08 2E3916[0000] cmp word [cs:pspdbg], dx 0 00006E0D 7403E9FA00 jne .fataldpmierr 85 0 00006E12 8CCB mov bx, cs 0 00006E14 B80A00 mov ax, 000Ah ; get a data descriptor for DEBUG's segment 0 00006E17 CD31 int 31h 0 00006E19 7303E9EE00 jc .fataldpmierr 0 00006E1E 8ED8 mov ds, ax 0 00006E20 8C0E[0000] mov word [ cssel ], cs 0 00006E24 A3[0000] mov word [ dssel ], ax 93 0 00006E27 8026[0200]EF clropt [internalflags3], dif3_ss_b_bit_set 0 00006E2C 89C3 mov bx, ax ; bx = debugger ss/ds selector 0 00006E2E 0F02CB lar cx, bx ; ch = access rights 0 00006E31 7403E9D600 jnz .fataldpmierr 0 00006E36 C1E908 shr cx, 8 ; get format for 31.0009 call 0 00006E39 F606[0200]10 testopt [options3], opt3_ss_b_bit_set 0 00006E3E 7407 jz @F 0 00006E40 800E[0200]10 setopt [internalflags3], dif3_ss_b_bit_set 0 00006E45 B540 mov ch, 40h ; set B bit if requested 103 @@: 0 00006E47 B80900 mov ax, 0009h 0 00006E4A CD31 int 31h ; set or clear B bit 0 00006E4C 7303E9BB00 jc .fataldpmierr 107 0 00006E51 B90100 mov cx, 1 ; allocate code_sel selector 0 00006E54 31C0 xor ax, ax 0 00006E56 CD31 int 31h 0 00006E58 7303E9AF00 jc .fataldpmierr 0 00006E5D A3[0000] mov word [ code_sel ], ax 0 00006E60 89C3 mov bx, ax 0 00006E62 31C9 xor cx, cx 0 00006E64 83CAFF or dx, -1 ; cx:dx = 0FFFFh 0 00006E67 B80800 mov ax, 0008h 0 00006E6A CD31 int 31h ; set limit 64 KiB 0 00006E6C 7303E99B00 jc .fataldpmierr 0 00006E71 0F020E[0000] lar cx, word [ cssel ] ; get access rights/type of cs 0 00006E76 7403E99100 jnz .fataldpmierr 0 00006E7B C1E908 shr cx, 8 ; proper format for 31.0009 122 ; high byte zero (16-bit and byte-granular selector) 0 00006E7E B80900 mov ax, 0009h 0 00006E81 CD31 int 31h ; set descriptor access rights/type 0 00006E83 7303E98400 jc .fataldpmierr 126 0 00006E88 8B16[0000] mov dx, word [ code_seg ] 0 00006E8C 89D1 mov cx, dx 0 00006E8E C1E204 shl dx, 4 0 00006E91 C1E90C shr cx, 12 0 00006E94 B80700 mov ax, 0007h 0 00006E97 CD31 int 31h ; set selector base to code segment's base 133 134 %if _EXTENSIONS 0 00006E99 B90100 mov cx, 1 ; allocate extcssel selector 0 00006E9C 31C0 xor ax, ax 0 00006E9E CD31 int 31h 0 00006EA0 726A jc .fataldpmierr 0 00006EA2 A3[0000] mov word [ extcssel ], ax 0 00006EA5 89C3 mov bx, ax 0 00006EA7 31C9 xor cx, cx 0 00006EA9 83CAFF or dx, -1 ; cx:dx = 0FFFFh 0 00006EAC B80800 mov ax, 0008h 0 00006EAF CD31 int 31h ; set limit 64 KiB 0 00006EB1 7259 jc .fataldpmierr 0 00006EB3 0F020E[0000] lar cx, word [ cssel ] ; get access rights/type of cs 0 00006EB8 7552 jnz .fataldpmierr 0 00006EBA C1E908 shr cx, 8 ; proper format for 31.0009 149 ; high byte zero (16-bit and byte-granular selector) 0 00006EBD B80900 mov ax, 0009h 0 00006EC0 CD31 int 31h ; set descriptor access rights/type 0 00006EC2 7248 jc .fataldpmierr 153 0 00006EC4 8B16[0000] mov dx, word [ extseg ] 0 00006EC8 89D1 mov cx, dx 0 00006ECA C1E204 shl dx, 4 0 00006ECD C1E90C shr cx, 12 0 00006ED0 B80700 mov ax, 0007h 0 00006ED3 CD31 int 31h ; set selector base to ext segment's base 160 0 00006ED5 51 push cx 0 00006ED6 52 push dx 163 0 00006ED7 B90100 mov cx, 1 ; allocate extdssel selector 0 00006EDA 31C0 xor ax, ax 0 00006EDC CD31 int 31h 0 00006EDE 722C jc .fataldpmierr 0 00006EE0 A3[0000] mov word [ extdssel ], ax 0 00006EE3 89C3 mov bx, ax 0 00006EE5 31C9 xor cx, cx 0 00006EE7 83CAFF or dx, -1 ; cx:dx = 0FFFFh 0 00006EEA B80800 mov ax, 0008h 0 00006EED CD31 int 31h ; set limit 64 KiB 0 00006EEF 721B jc .fataldpmierr 175 0 00006EF1 5A pop dx 0 00006EF2 59 pop cx 0 00006EF3 B80700 mov ax, 0007h 0 00006EF6 CD31 int 31h ; set selector base to ext segment's base 180 0 00006EF8 8CD8 mov ax, ds ; bx = debugger ss/ds selector 0 00006EFA 0F02C8 lar cx, ax ; ch = access rights 0 00006EFD 750D jnz .fataldpmierr 0 00006EFF C1E908 shr cx, 8 ; get format for 31.0009 call 0 00006F02 B80900 mov ax, 0009h 0 00006F05 CD31 int 31h ; clear B bit 187 %endif 188 0 00006F07 E8[0000] call entry_to_code_sel 0 00006F0A [0000] dw installdpmi_code 191 192 .fataldpmierr: 0 00006F0C B8FF4C mov ax, 4CFFh 0 00006F0F CD21 int 21h 195 196 197 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 197 ------------------ note: usesection lDEBUG_CODE 198 199 code_insure_low_byte_not_0CCh 200 installdpmi_code: 0 00007C6B 6653 _386 push ebx 0 00007C6D 6652 _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. 0 00007C6F 8CDA mov dx, ds ; dx = ds = debugger data selector 0 00007C71 8CD0 mov ax, ss 0 00007C73 66 _386_o32 ; mov ebx, esp 0 00007C74 89E3 mov bx, sp ; ax:bx = stack to restore 0 00007C76 8ED2 mov ss, dx 211 %ifn _ONLYNON386 212 ..@patch_no386_ds_4: ; (insure to set sp directly after ss) 0 00007C78 66 o32 ; mov esp, dword [run_sp] 214 %endif 0 00007C79 8B26[0000] mov sp, [run_sp] ; switch to our stack 216 0 00007C7D 50 push ax 0 00007C7E 66 _386_o32 ; push ebx 0 00007C7F 53 push bx ; save original stack, far pointer 220 0 00007C80 C606[0000]02 mov byte [pm_2_86m_0], 2 0 00007C85 800E[0100]08 setopt [internalflags], protectedmode 223 224 d4 call d4message 225 d4 asciz "In installdpmi_code",13,10 226 0 00007C8A B90700 mov cx, 2 + !!_DUALCODE + !!_IMMASM + 2 * !!_SYMBOLIC + !!_MESSAGESEGMENT 228 ; allocate some descriptors 0 00007C8D 31C0 xor ax, ax 0 00007C8F CD31 int 31h 0 00007C91 7303E9C702 jc .fataldpmierr 232 233 d4 call d4message 234 d4 asciz "In installdpmi_code, allocated some descriptors",13,10 235 0 00007C96 A3[0000] mov word [ scratchsel ], ax ; the first is used as scratch descriptor 0 00007C99 89C3 mov bx, ax 0 00007C9B 31C9 xor cx, cx 239 %if 1 0 00007C9D 49 _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 0 00007C9E 83CAFF or dx, byte -1 0 00007CA1 B80800 mov ax, 0008h 0 00007CA4 CD31 int 31h 0 00007CA6 B80300 mov ax, 0003h 0 00007CA9 CD31 int 31h ; get selector increment 252 %if 0 253 jnc .03sup 254 mov ax, 8 255 .03sup: 256 %endif 0 00007CAB 31C9 xor cx, cx ; cx:dx = 0FFFFh 258 %if _SYMBOLIC 0 00007CAD 01C3 add bx, ax ; the second selector is used as symbol selector 0 00007CAF 891E[0000] mov word [symsel1], bx 0 00007CB3 50 push ax 0 00007CB4 B80800 mov ax, 0008h 0 00007CB7 CD31 int 31h ; set limit 0FFFFh (only used with di anyway) 0 00007CB9 58 pop ax 0 00007CBA 01C3 add bx, ax ; the third selector is used as another symbol selector 0 00007CBC 891E[0000] mov word [symsel2], bx 0 00007CC0 50 push ax 0 00007CC1 B80800 mov ax, 0008h 0 00007CC4 CD31 int 31h ; set limit 0FFFFh (only used with di anyway) 0 00007CC6 58 pop ax 271 %endif 272 %if _MESSAGESEGMENT 0 00007CC7 01C3 add bx, ax ; this is used as message selector 0 00007CC9 52 push dx 0 00007CCA 8B16[0000] mov dx, word [messageseg] 0 00007CCE E8[0000] call setrmaddr 0 00007CD1 5A pop dx 0 00007CD2 891E[0000] mov word [messagesel], bx 0 00007CD6 50 push ax 0 00007CD7 B80800 mov ax, 0008h 0 00007CDA CD31 int 31h ; set limit 0FFFFh 0 00007CDC 58 pop ax 283 %endif 284 %if _DUALCODE 0 00007CDD 01C3 add bx, ax ; this selector is used as code2 sel 0 00007CDF 891E[0000] mov word [ code2_sel ], bx 0 00007CE3 50 push ax 0 00007CE4 B80800 mov ax, 0008h 0 00007CE7 CD31 int 31h ; set limit 64 KiB 0 00007CE9 7303E96F02 jc .fataldpmierr 0 00007CEE 51 push cx 0 00007CEF 52 push dx ; preserve limit = 0FFFFh 0 00007CF0 0F020E[0000] lar cx, word [ cssel ] ; get access rights/type of cs 0 00007CF5 7403E96302 jnz .fataldpmierr 0 00007CFA C1E908 shr cx, 8 ; proper format for 31.0009 296 ; high byte zero (16-bit and byte-granular selector) 0 00007CFD B80900 mov ax, 0009h 0 00007D00 CD31 int 31h ; set descriptor access rights/type 0 00007D02 7303E95602 jc .fataldpmierr 300 0 00007D07 8B16[0000] mov dx, word [ code2_seg ] 0 00007D0B 89D1 mov cx, dx 0 00007D0D C1E204 shl dx, 4 0 00007D10 C1E90C shr cx, 12 0 00007D13 B80700 mov ax, 0007h 0 00007D16 CD31 int 31h ; set selector base to code segment's base 0 00007D18 5A pop dx 0 00007D19 59 pop cx ; restore limit 0 00007D1A 58 pop ax 310 %endif 311 %if _IMMASM 0 00007D1B 01C3 add bx, ax 0 00007D1D 50 push ax 0 00007D1E 51 push cx 0 00007D1F 52 push dx 316 0 00007D20 31C9 xor cx, cx 0 00007D22 BA[0000] mov dx, immasm_length 0 00007D25 B80800 mov ax, 0008h 0 00007D28 CD31 int 31h 0 00007D2A 0F020E[0000] lar cx, word [ cssel ] 0 00007D2F 7403E92902 jnz .fataldpmierr 0 00007D34 C1E908 shr cx, 8 0 00007D37 B80900 mov ax, 0009h 0 00007D3A CD31 int 31h 326 0 00007D3C 8B16[0000] mov dx, word [immseg] 0 00007D40 E8[0000] call setrmaddr 0 00007D43 891E[0000] mov word [immsel], bx 330 0 00007D47 5A pop dx 0 00007D48 59 pop cx 0 00007D49 58 pop ax 334 %endif 0 00007D4A 01C3 add bx, ax ; the last selector is client's CS 336 ; (this limit is FFFFh even for 32-bits) 0 00007D4C B80800 mov ax, 0008h 0 00007D4F CD31 int 31h 339 0 00007D51 66 _386_o32 0 00007D52 5A pop dx ; pop preserved (e)sp 0 00007D53 58 pop ax ; get client ss 0 00007D54 8EC0 mov es, ax 0 00007D56 50 push ax ; preserve ss again 0 00007D57 66 _386_o32 0 00007D58 52 push dx ; preserve (e)sp again 347 0 00007D59 268B5612 mov dx, word [ es:bp+18 ] 349 ; get client's CS 0 00007D5D E8[0000] call setrmaddr ; set base 0 00007D60 0F020E[0000] lar cx, word [ cssel ] 0 00007D65 7403E9F301 jnz .fataldpmierr 0 00007D6A C1E908 shr cx, 8 ; CS remains 16-bit 0 00007D6D B80900 mov ax, 0009h 0 00007D70 CD31 int 31h 0 00007D72 26895E12 mov word [ es:bp+18 ], bx 357 0 00007D76 FC cld 359 0 00007D77 BE[0000] mov si, convsegs 0 00007D7A B9[0000] mov cx, convsegs.amount_fixed 362 .loopseg: 363 d4 call d4message 364 d4 asciz "In installdpmi_code.loopseg",13,10 365 0 00007D7D AD lodsw 0 00007D7E 89C7 mov di, ax 0 00007D80 8B5D02 mov bx, word [di + soaSegment] 0 00007D83 B80200 mov ax, 0002h 0 00007D86 CD31 int 31h 0 00007D88 7303E9D001 jc .fataldpmierr 0 00007D8D 894504 mov word [di + soaSelector], ax 0 00007D90 E2EB loop .loopseg 374 375 d4 call d4message 376 d4 asciz "In installdpmi_code after .loopseg",13,10 377 0 00007D92 6657 _386 push edi 0 00007D94 6631FF _386 xor edi, edi ; clear edih 0 00007D97 8026[0200]DB clropt [internalflags], canswitchmode|switchbuffer 0 00007D9C 31ED xor bp, bp 0 00007D9E 45 _386 inc bp 0 00007D9F 45 _386 inc bp 384 .save16: 0 00007DA0 B80503 mov ax, 0305h ; get raw mode-switch save state addresses 0 00007DA3 CD31 int 31h 0 00007DA5 7303E9A100 jc .cannotswitch 388 %if _AUXBUFFSIZE == _AUXBUFFMAXSIZE 389 cmp ax, _AUXBUFFSIZE ; fits into auxbuff ? 390 %else 0 00007DAA 3B06[0000] cmp ax, word [auxbuff_current_size] 392 %endif 0 00007DAE 7603E99800 ja .cannotswitch ; no --> 0 00007DB3 85C0 test ax, ax 0 00007DB5 7473 jz .nobuffer 396 397 .switchbuffer_init: 0 00007DB7 50 push ax ; ax = target switchbuffer size 0 00007DB8 53 push bx 0 00007DB9 51 push cx 0 00007DBA 56 push si 0 00007DBB 57 push di ; preserve regs returned by fn 0305h 403 0 00007DBC 8B3E[0000] mov di, word [auxbuff_switchbuffer_size] 0 00007DC0 89F9 mov cx, di 0 00007DC2 29C1 sub cx, ax 0 00007DC4 7441 je .no_switchbuffer_size_change 0 00007DC6 8E06[0400] mov es, word [auxbuff_segorsel + soaSelector] 0 00007DCA 7737 ja .fillblanks 410 0 00007DCC F7D9 neg cx ; = amount of bytes to move 412 413 .try_again: 0 00007DCE 8B36[0000] 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 0 00007DD2 A1[0000] mov ax, word [auxbuff_current_size] 420 %endif 0 00007DD5 29F0 sub ax, si ; number of bytes left free 0 00007DD7 39C8 cmp ax, cx ; fits ? 0 00007DD9 7307 jae .simple ; yes --> 424 425 .delete: 0 00007DDB E8[0000] call silence_delete_one_string.internal 0 00007DDE 7228 jc .switchbuffer_error 0 00007DE0 EBEC jmp .try_again 429 430 .simple: 0 00007DE2 1E push ds 0 00007DE3 56 push si 433 ; -> behind used data minus start of auxbuff (0) 434 ; = how much to copy 0 00007DE4 4E dec si ; -> last used byte 0 00007DE5 89F7 mov di, si ; -> last used source byte 0 00007DE7 01CF add di, cx ; -> destination of last byte 0 00007DE9 010E[0000] add word [auxbuff_behind_last_silent], cx 439 ; update silent pointer 440 %if _RH 0 00007DED 010E[0000] add word [auxbuff_start_silent], cx 442 %endif 0 00007DF1 59 pop cx ; = how much to copy 0 00007DF2 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 0 00007DF3 06 push es 0 00007DF4 1F 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 0 00007DF5 E308 jcxz @FF 0 00007DF7 83F914 cmp cx, 20 0 00007DFA 7703 ja @FF 455 @@: 0 00007DFC A4 movsb 0 00007DFD E2FD loop @B 458 @@: 459 %endif 0 00007DFF F3A4 rep movsb ; copy up silent buffer 0 00007E01 FC cld 462 0 00007E02 1F 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. 0 00007E03 B020 mov al, 32 0 00007E05 F3AA rep stosb 478 479 .no_switchbuffer_size_change: 0 00007E07 A8 db __TEST_IMM8 ; (skip stc, NC) 481 .switchbuffer_error: 0 00007E08 F9 stc 0 00007E09 5F pop di 0 00007E0A 5E pop si 0 00007E0B 59 pop cx 0 00007E0C 5B pop bx ; restore returned registers 0 00007E0D 58 pop ax ; ax = target switchbuffer size 0 00007E0E 723B jc .cannotswitch 0 00007E10 A3[0000] mov word [auxbuff_switchbuffer_size], ax 0 00007E13 800E[0200]20 setopt [internalflags], switchbuffer 0 00007E18 890E[0000] mov word [dpmi_rmsav+0], cx 0 00007E1C 891E[0200] mov word [dpmi_rmsav+2], bx 0 00007E20 66 _386_o32 ; mov dword [dpmi_pmsav], edi 0 00007E21 893E[0000] mov word [dpmi_pmsav], di 0 00007E25 3E89B6[0200] mov word [ds:bp+dpmi_pmsav+2], si 496 .nobuffer: 0 00007E2A 6631FF _386 xor edi, edi ; clear edih 0 00007E2D B80603 mov ax, 0306h ; get raw mode-switch addresses 0 00007E30 CD31 int 31h 0 00007E32 7217 jc .cannotswitch 0 00007E34 800E[0200]04 setopt [internalflags], canswitchmode 0 00007E39 890E[0000] mov word [dpmi_rm2pm+0], cx 0 00007E3D 891E[0200] mov word [dpmi_rm2pm+2], bx 0 00007E41 66 _386_o32 ; mov dword [dpmi_pm2rm], edi 0 00007E42 893E[0000] mov word [dpmi_pm2rm], di 0 00007E46 3E89B6[0200] mov word [ds:bp+dpmi_pm2rm+2], si 507 .cannotswitch: 0 00007E4B 665F _386 pop edi 509 0 00007E4D 6650 _386 push eax 511 %if (_CATCHPMINT214C || _DEBUG) || 1 0 00007E4F 06 push es 0 00007E50 1E push ds 0 00007E51 07 pop es 515 %endif 516 517 %if CATCHEXCAMOUNT 0 00007E52 BE[0000] mov si, exctab ; hook several exceptions 519 %if _CATCHPMINT214C || _DEBUG || _TSR || _DEVICE 0 00007E55 BF[0000] mov di, excsave 521 %endif 0 00007E58 6631D2 _386 xor edx, edx ; clear edxh 0 00007E5B BA[0000] mov dx, exc_first 524 .loopexc: 0 00007E5E AC 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 0 00007E5F 88C3 mov bl, al 534 %if _CATCHPMINT214C || _DEBUG || _TSR || _DEVICE 0 00007E61 66 _386_o32 ; push edx 0 00007E62 52 push dx ; preserve excXX pointer 0 00007E63 B80202 mov ax, 0202h 538 ; (edxh is zero) 0 00007E66 CD31 int 31h ; cx:(e)dx -> prior handler 0 00007E68 66 _386_o32 ; xchg eax, edx 0 00007E69 92 xchg ax, dx 0 00007E6A 66 _386_o32 ; stosd 0 00007E6B AB stosw ; store offset (dword on 386+, else word) 0 00007E6C 91 xchg ax, cx 0 00007E6D AB stosw ; store selector 0 00007E6E B80400 mov ax, 4 0 00007E71 29E8 sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 0 00007E73 01C7 add di, ax ; -> next entry of excsave 0 00007E75 66 _386_o32 ; pop edx 0 00007E76 5A pop dx 551 %endif 0 00007E77 8B0E[0000] mov cx, word [cssel] ; -> our handler for this exception 0 00007E7B B80302 mov ax, 0203h 0 00007E7E CD31 int 31h ; set our handler 555 %ifn _LINK 556 add dx, byte exc_second - exc_first 557 %else 0 00007E80 83C200 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 0 00007E83 81FE[0000] cmp si, endexctab ; if another to go --> 0 00007E87 72D5 jb .loopexc 565 %endif 566 567 %if CATCHPMINTAMOUNT 0 00007E89 BE[0000] mov si, pminttab ; ds:si -> pminttab 0 00007E8C BF[0000] mov di, pmintsave ; es:di -> pmintsave 570 .loopint: 0 00007E8F AC lodsb ; get interrupt number 0 00007E90 88C3 mov bl, al ; bl = interrupt number 0 00007E92 6631D2 _386 xor edx, edx ; clear edxh 0 00007E95 B80402 mov ax, 0204h 0 00007E98 CD31 int 31h ; cx:(e)dx -> prior handler 0 00007E9A 66 _386_o32 ; xchg eax, edx 0 00007E9B 92 xchg ax, dx ; (e)ax = offset 0 00007E9C 66 _386_o32 ; stosd 0 00007E9D AB stosw ; store offset (dword on 386+, else word) 0 00007E9E 91 xchg ax, cx 0 00007E9F AB stosw ; store selector 0 00007EA0 B80400 mov ax, 4 0 00007EA3 29E8 sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 0 00007EA5 01C7 add di, ax ; -> next entry of pmintsave 0 00007EA7 AD lodsw ; ax -> our handler 0 00007EA8 6631D2 _386 xor edx, edx 0 00007EAB 92 xchg ax, dx ; (e)dx -> our handler 0 00007EAC 8B0E[0000] mov cx, word [cssel] ; cx:(e)dx -> our handler 0 00007EB0 B80502 mov ax, 0205h 0 00007EB3 CD31 int 31h 0 00007EB5 81FE[0000] cmp si, pminttab.end 0 00007EB9 72D4 jb .loopint 593 %endif 594 595 %if (_CATCHPMINT214C || _DEBUG) || 1 0 00007EBB 07 pop es 597 %endif 0 00007EBC 6658 _386 pop eax 599 0 00007EBE BE[0000] mov si, convsegs 601 @@: 0 00007EC1 AD lodsw 0 00007EC2 97 xchg ax, di 0 00007EC3 FF7504 push word [di + soaSelector] 0 00007EC6 8F05 pop word [di + soaSegSel] 0 00007EC8 81FE[0000] cmp si, convsegs.end_fixed 0 00007ECC 72F3 jb @B 608 0 00007ECE F606[0100]01 testopt [internalflags], hooked2F 0 00007ED3 7431 jz .notours ; not currently hooked --> 611 0 00007ED5 B02F mov al, 2Fh ; interrupt number 0 00007ED7 BE[0000] mov si, debug2F ; -> IISP entry header 0 00007EDA BA0200 mov dx, opt4_int_2F_force >> 16 0 00007EDD E8[0000] call UnhookInterruptForce 616 ; try unhooking it 0 00007EE0 730B jnc .got2F 618 619 .not2F: 0 00007EE2 C706[0000]3246 mov word [msg.serial_cannot_unhook.int], "2F" 0 00007EE8 BA[0000] mov dx, msg.serial_cannot_unhook 0 00007EEB EB16 jmp @F 623 624 .got2F: 0 00007EED 8026[0100]FE clropt [internalflags], hooked2F 0 00007EF2 8026[0000]FD clropt [internalflags4], dif4_int_2F_hooked 0 00007EF7 E8[0000] call update_inttab_optional 0 00007EFA C706[0000]3246 mov word [msg.serial_late_unhook.int], "2F" 0 00007F00 BA[0000] mov dx, msg.serial_late_unhook 630 @@: 0 00007F03 E8[0000] 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. 0 00007F06 BE[0000] mov si, convsegs 644 @@: 0 00007F09 AD lodsw 0 00007F0A 97 xchg ax, di 0 00007F0B FF7502 push word [di + soaSegment] 0 00007F0E 8F05 pop word [di + soaSegSel] 0 00007F10 81FE[0000] cmp si, convsegs.end_fixed 0 00007F14 72F3 jb @B 651 652 d4 call d4message 653 d4 asciz "In installdpmi_code end",13,10 654 0 00007F16 66 _386_o32 ; pop ebx 0 00007F17 5B pop bx 0 00007F18 58 pop ax 0 00007F19 8ED0 mov ss, ax 659 %ifn _ONLYNON386 660 ..@patch_no386_ds_5: ; (insure to set sp directly after ss) 0 00007F1B 66 o32 ; mov esp, ebx 662 %endif 0 00007F1C 89DC mov sp, bx ; return to user stack 664 0 00007F1E 665A _386 pop edx 0 00007F20 665B _386 pop ebx 0 00007F22 07 pop es 668 %if _BREAK_INSTALLDPMI 0 00007F23 F606[0200]20 testopt [options3], opt3_break_installdpmi 0 00007F28 7504 jnz .break 671 %endif 0 00007F2A 1F pop ds 0 00007F2B 9D popf 0 00007F2C 61 popa 0 00007F2D CB retf 676 677 %if _BREAK_INSTALLDPMI 678 .break: 0 00007F2E FA cli 0 00007F2F 8F06[0000] pop word [reg_ds] ; set client ds 0 00007F33 8F06[0000] pop word [reg_efl] ; set client fl 0 00007F37 61 popa ; restore client GPRs 0 00007F38 A3[0000] mov word [reg_eax], ax ; set client ax 0 00007F3B 8CD8 mov ax, ds ; ax = entry/data selector 0 00007F3D 8F06[0000] pop word [reg_eip] ; set client ip (intrtn_code clears eiph) 0 00007F41 8F06[0000] pop word [reg_cs] ; set client cs 0 00007F45 C706[0000][0000] mov word [run_int], installdpmimsg ; remember interrupt type 0 00007F4B C606[0000]02 mov byte [pm_2_86m_0], 2 0 00007F50 800E[0100]08 setopt [internalflags], protectedmode 690 %if _RUN_ENTRY_SECTION 0 00007F55 FF36[0000] push word [cssel] 0 00007F59 68[0000] push word intrtn_entry.from_installdpmi 0 00007F5C CB 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 0 00007F5D B8FF4C mov ax, 4CFFh 0 00007F60 CD21 int 21h 705 706 subcpureset 707 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00006F14 ???????? eldhSignature: resb 4 ; "ELD1" 0 00006F18 ?????? resb 3 ; reserved 0 00006F1B ?? resb 1 ; 26 (Ctrl-Z) 0 00006F1C ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00006F20 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00006F22 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00006F24 ???????? eldhDataOffset: resd 1 0 00006F28 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00006F2A ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00006F2C ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00006F2E ???????? eldhReserved: resb 4 ; reserved 0 00006F32 ???? 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 00006F34 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00006F38 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00006F3C ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00006F40 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00006F14 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00006F1C ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00006F20 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00006F22 ???? 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 00006F14 ???? 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 00006F16 ???? eldltAmount: resw 1 0 00006F18 ???????? 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 00006F14 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00006F16 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00006F18 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00006F1A ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00006F1C ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00006F24 ???? 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 00006F14 ???? eldlSignature: resw 1 ; 0E1D1h 0 00006F16 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00006F18 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00006F1A ???? eldlUseLinkHash: resw 1 0 00006F1C ???? eldlDataAmount: resw 1 0 00006F1E ???? eldlDataPrefixes: resw 1 0 00006F20 ???? eldlDataEntries: resw 1 0 00006F22 ???? eldlDataAddresses: resw 1 0 00006F24 ???? eldlCodeAmount: resw 1 0 00006F26 ???? eldlCodePrefixes: resw 1 0 00006F28 ???? eldlCodeEntries: resw 1 0 00006F2A ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00006F2C ???? eldlDualAmount: resw 1 0 00006F2E ???? eldlDualPrefixes: resw 1 0 00006F30 ???? eldlDualEntries: resw 1 0 00006F32 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00006F14 ???? ifKeyword: resw 1 0 00006F16 ???? ifDescription: resw 1 0 00006F18 ???? ifOptions: resw 1 0 00006F1A ???? ifValue: resw 1 0 00006F1C ???? ifTrying: resw 1 0 00006F1E ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00006F14 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00006F18 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00006F1C ???? smName1: resw 1 ; -> first string part 0 00006F1E ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00006F20 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00006F22 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00006F24 ???? smBaseNext: resw 1 0 00006F26 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00006F28 ???? smSpecialNext: resw 1 0 00006F2A ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00006F14 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00006F15 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00006F16 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00006F14 ???? shHash: resw 1 ; hash value 0 00006F16 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00006F14 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00006F18 ???? xmsmSourceHandle: resw 1 0 00006F1A ???????? xmsmSourceAddress: resd 1 0 00006F1E ???? xmsmDestHandle: resw 1 0 00006F20 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <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 00006F14 ?? OPPREC_INVALID: resb 1 0 00006F15 ?? OPPREC_COND: resb 1 0 00006F16 ?? OPPREC_BOOL_OR: resb 1 0 00006F17 ?? OPPREC_BOOL_XOR:resb 1 0 00006F18 ?? OPPREC_BOOL_AND:resb 1 0 00006F19 ?? OPPREC_COMPARE: resb 1 0 00006F1A ?? OPPREC_BIT_OR: resb 1 0 00006F1B ?? OPPREC_BIT_XOR: resb 1 0 00006F1C ?? OPPREC_BIT_AND: resb 1 0 00006F1D ?? OPPREC_BIT_CLR: resb 1 0 00006F1E ?? OPPREC_SHIFT: resb 1 0 00006F1F ?? OPPREC_ADDSUB: resb 1 0 00006F20 ?? OPPREC_MULDIV: resb 1 0 00006F21 ?? 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 00006F14 ?? OPERATOR_INVALID: resb 1 ; 0 - invalid 0 00006F15 ?? OPERATOR_PLUS: resb 1 ; + 0 00006F16 ?? OPERATOR_MINUS: resb 1 ; - 0 00006F17 ?? OPERATOR_MULTIPLY: resb 1 ; * 0 00006F18 ?? OPERATOR_DIVIDE: resb 1 ; / 0 00006F19 ?? OPERATOR_MODULO: resb 1 ; % 0 00006F1A ?? OPERATOR_POWER: resb 1 ; ** 0 00006F1B ?? OPERATOR_CMP_BELOW: resb 1 ; < 0 00006F1C ?? OPERATOR_CMP_BELOW_EQUAL: resb 1 ; <= 0 00006F1D ?? OPERATOR_CMP_ABOVE: resb 1 ; > 0 00006F1E ?? OPERATOR_CMP_ABOVE_EQUAL: resb 1 ; >= 0 00006F1F ?? OPERATOR_CMP_EQUAL: resb 1 ; == 0 00006F20 ?? OPERATOR_CMP_NOT_EQUAL: resb 1 ; != 0 00006F21 ?? OPERATOR_SHIFT_LEFT: resb 1 ; << 0 00006F22 ?? OPERATOR_SHIFT_RIGHT: resb 1 ; >> 0 00006F23 ?? OPERATOR_SHIFT_RIGHT_SIGNED: resb 1 ; >>> 0 00006F24 ?? OPERATOR_BIT_MIRROR: resb 1 ; >< 0 00006F25 ?? OPERATOR_BIT_CLR: resb 1 ; clr (bitwise AND with bitwise NOT) 0 00006F26 ?? OPERATOR_BIT_OR: resb 1 ; | 0 00006F27 ?? OPERATOR_BIT_XOR: resb 1 ; ^ 0 00006F28 ?? OPERATOR_BIT_AND: resb 1 ; & 0 00006F29 ?? OPERATOR_BOOL_OR: resb 1 ; || 0 00006F2A ?? OPERATOR_BOOL_XOR: resb 1 ; ^^ 0 00006F2B ?? OPERATOR_BOOL_AND: resb 1 ; && 0 00006F2C ?? OPERATOR_COND: resb 1 ; ?? :: construct (special) 0 00006F2D ?? 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=00F6D0h -> "LDEBUG_CODE" 24 ------------------ note: usesection lDEBUG_CODE 25 26 ..@rr_access_start: 27 ; R command - dump and manipulate registers. 28 rr: 0 00007F62 E8[0000] call iseol? 30 %if _RH && !_LOADER 0 00007F65 750D jne @F 32 .r_and_terminate: 0 00007F67 E86C09 call dumpregs 0 00007F6A D006[0000] rol byte [in_re], 1 0 00007F6E 7203E9[0000] jnc terminate_silent_dump 0 00007F73 C3 retn 37 @@: 38 %else 39 je dumpregs ; if no parameters --> 40 %endif 0 00007F74 E8[0000] call capitalise 42 %if !_LOADER 0 00007F77 3C45 cmp al, 'E' 0 00007F79 7514 jne @F 45 0 00007F7B 50 push ax 0 00007F7C 56 push si 0 00007F7D AC lodsb 0 00007F7E 3C2E cmp al, '.' 0 00007F80 7503E9DA06 je re_cmd 0 00007F85 E8[0000] call iseol? 0 00007F88 5E pop si 0 00007F89 58 pop ax 0 00007F8A 7503E94908 je dumpregs_extended 55 @@: 56 %endif 57 0 00007F8F 3C43 cmp al, 'C' 0 00007F91 7514 jne @F 60 0 00007F93 50 push ax 0 00007F94 56 push si 0 00007F95 AC lodsb 0 00007F96 3C2E cmp al, '.' 0 00007F98 7503E9BA06 je rc_cmd 0 00007F9D E8[0000] call iseol? 0 00007FA0 5E pop si 0 00007FA1 58 pop ax 0 00007FA2 7503E90208 je rc_run 70 @@: 71 72 %if !_ONLYNON386 || (_OPTIONS || _VARIABLES) || (_MMXSUPP && _RM) || _RN 0 00007FA7 4E dec si 0 00007FA8 4E dec si 0 00007FA9 BA[0000] mov dx, msg.rvv 0 00007FAC E8[0000] call isstring? 0 00007FAF 7503E9950D je dumpallvars 0 00007FB4 BA[0000] mov dx, msg.rvm 0 00007FB7 E8[0000] call isstring? 0 00007FBA 7503E9D20D je dumpmemory 0 00007FBF BA[0000] mov dx, msg.rvp 0 00007FC2 E8[0000] call isstring? 0 00007FC5 7503E93C0E je dumpprocess 0 00007FCA BA[0000] mov dx, msg.rvd 0 00007FCD E8[0000] call isstring? 0 00007FD0 7503E9E50E je dumpdevice 87 %if _RH 0 00007FD5 BA[0000] mov dx, msg.rh 0 00007FD8 E8[0000] call isstring? 0 00007FDB 7503E9100F 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 00007FE0 46 inc si 0 00007FE1 AC lodsb 0 00007FE2 E8[0000] call capitalise 105 0 00007FE5 50 push ax 0 00007FE6 56 push si 0 00007FE7 E8[0000] call skipwhite 0 00007FEA E8[0000] call iseol? ; line ends after single character ? 0 00007FED 5E pop si 0 00007FEE 58 pop ax 0 00007FEF 7534 jne short rr1 ; no, not other kinds of dumps --> 113 0 00007FF1 3C46 cmp al, 'F' ; only valid input to a later check 0 00007FF3 7503E98E04 je rr2.writeprompt ; so go there --> 116 ; (note that byte [si-1] must != '.') 117 %if _OPTIONS || _VARIABLES 0 00007FF8 3C56 cmp al, 'V' 0 00007FFA 7503E95A0C je dumpvars 120 %endif 0 00007FFF 3C58 _386 cmp al, 'X' 0 00008001 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 00008003 E9[0000] jmp error ; all other single characters are invalid 132 %endif 133 134 %ifn _ONLYNON386 135 rrx: 0 00008006 AC lodsb 0 00008007 E8[0000] call chkeol 0 0000800A 8036[0000]01 xoropt [options], dispregs32 0 0000800F BA[0000] mov dx, msg.regs386 0 00008012 E8[0000] call putsz 0 00008015 BA[0000] mov dx, msg.regs386_on 0 00008018 F606[0000]01 testopt [options], dispregs32 0 0000801D 7503 jnz .on 0 0000801F BA[0000] mov dx, msg.regs386_off 145 .on: 0 00008022 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 00008025 5589E58D66DE lenter 170 %if _MMXSUPP 0 0000802B 8366EE00 and word [bp + ?mmx_isvar_type], 0 172 %endif 0 0000802F 89E7 mov di, sp ; -> ?namebuffer 0 00008031 E8[0000]EB02[0000] nearcall isvariable?.return_name 0 00008038 7203E94A01 jnc rr1_variable 176 0 0000803D 4E dec si 0 0000803E BA[0000] mov dx, msg.byte 0 00008041 BB0101 mov bx, 101h 0 00008044 52 push dx 0 00008045 E8[0000] call isstring? 0 00008048 7428 je rr1_memory 0 0000804A 5A pop dx 0 0000804B BA[0000] mov dx, msg.word 0 0000804E 43 inc bx ; = 102h 0 0000804F 52 push dx 0 00008050 E8[0000] call isstring? 0 00008053 741D je rr1_memory 0 00008055 5A pop dx 0 00008056 BA[0000] mov dx, msg.3byte 0 00008059 43 inc bx ; = 103h 0 0000805A 52 push dx 0 0000805B E8[0000] call isstring? 0 0000805E 7412 je rr1_memory 0 00008060 5A pop dx 0 00008061 BA[0000] mov dx, msg.dword 0 00008064 43 inc bx ; = 104h 0 00008065 52 push dx 0 00008066 E8[0000] call isstring? 0 00008069 7407 je rr1_memory 201 ; pop dx 0 0000806B 89EC5D lleave code 0 0000806E AC lodsb 0 0000806F E9EE03 jmp rr2 205 206 rr1_memory: 0 00008072 8F46F8 pop word [bp + ?memsizestring] 0 00008075 895EF6 mov word [bp + ?ismem_high_size_low], bx 209 0 00008078 31C0 xor ax, ax 0 0000807A 88D8 mov al, bl 0 0000807C F7D8 neg ax 0 0000807E 05[0400] add ax, masks + 4 ; 4 - size = offset into masks 0 00008081 8946F2 mov word [rrmask], ax ; -> mask 0 00008084 E8[0000] call skipcomma 0 00008087 3C5B cmp al, '[' 0 00008089 7403E9[0000] jne error 0 0000808E AC lodsb 0 0000808F 8B1E[0000] mov bx, word [reg_ds] 0 00008093 E8[0000]EB02[0000] nearcall getaddrX 0 0000809A 895EFA mov word [bp + ?segsel], bx 0 0000809D 66 _386_PM_o32 0 0000809E 8956FC mov word [bp + ?offset], dx 0 000080A1 E8[0000] call skipcomm0 0 000080A4 3C5D cmp al, ']' 0 000080A6 7403E9[0000] jne error 227 0 000080AB E8[0000] call skipcomma 0 000080AE 3C2E cmp al, '.' ; special ? 0 000080B0 7405 je short .writeprompt ; yes --> 0 000080B2 E8[0000] call iseol? 0 000080B5 7568 jne short .noprompt 233 .writeprompt: 234 ; si -> behind dot if any 0 000080B7 BF[0000] mov di, line_out 0 000080BA 56 push si 0 000080BB 8B76F8 mov si, word [bp + ?memsizestring] 238 ; si -> size string (ASCIZ) 0 000080BE A8 db __TEST_IMM8 ; (skip stosb) 240 @@: 0 000080BF AA stosb ; store next byte 0 000080C0 AC lodsb ; load next byte 0 000080C1 84C0 test al, al ; is zero ? 0 000080C3 75FA jnz @B ; not yet, loop --> 0 000080C5 5E pop si ; (preserve si) 0 000080C6 B8205B mov ax, " [" 0 000080C9 AB stosw 0 000080CA 8B46FA mov ax, word [bp + ?segsel] 0 000080CD 89C3 mov bx, ax 0 000080CF E8[0000] call hexword 0 000080D2 B03A mov al, ':' 0 000080D4 AA stosb 0 000080D5 66 _386_PM_o32 0 000080D6 8B46FC mov ax, word [bp + ?offset] 255 %if _PM 0 000080D9 E8[0000] call test_high_limit ; 32-bit segment ? 0 000080DC 7403 jz .16 0 000080DE E8[0000] call hexword_high 259 .16: 260 %endif 0 000080E1 E8[0000] call hexword 0 000080E4 B85D20 mov ax, "] " 0 000080E7 AB stosw 264 0 000080E8 E84800 call rr1_read_mem_dxax 266 0 000080EB 80F904 cmp cl, 4 0 000080EE 7207 jb .pnohigh 0 000080F0 92 xchg ax, dx 0 000080F1 E8[0000] call hexword ; display high word 0 000080F4 92 xchg ax, dx 0 000080F5 EB0C jmp @F 273 .pnohigh: 0 000080F7 80F903 cmp cl, 3 0 000080FA 720A jb @FF 0 000080FC 86C2 xchg al, dl 0 000080FE E8[0000] call hexbyte 0 00008101 86C2 xchg al, dl 279 @@: 280 %if _RSEPARATE 0 00008103 E82100 call rseparate 282 %endif 283 @@: 0 00008106 80F902 cmp cl, 2 0 00008109 7207 jb .pnobyte 0 0000810B 86C4 xchg al, ah 0 0000810D E8[0000] call hexbyte ; display high byte 0 00008110 86C4 xchg al, ah 289 .pnobyte: 0 00008112 E8[0000] call hexbyte ; display low byte 291 292 %if _MS_PROMPT_COMPAT 0 00008115 B000 mov al, 0 294 %endif 0 00008117 E8F204 call dot_prompt 0 0000811A 7503E90702 je .return 297 .noprompt: 0 0000811F 31C9 xor cx, cx 0 00008121 8A4EF6 mov cl, byte [bp + ?size] 0 00008124 E9D000 jmp rr1_common 301 302 303 %if _RSEPARATE 304 rseparate: 0 00008127 F606[0200]20 testopt [options2], opt2_r_separate 0 0000812C 7404 jz @F 0 0000812E C6055F mov byte [di], '_' 0 00008131 47 inc di 309 @@: 0 00008132 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 00008133 E8[0000] call prephack 0 00008136 E8[0000] call dohack 0 00008139 31C0 xor ax, ax 0 0000813B 31D2 xor dx, dx 0 0000813D 8A4EF6 mov cl, byte [bp + ?size] 324 %if _PM 0 00008140 8B5EFA mov bx, word [bp + ?segsel] 0 00008143 E8[0000] call test_high_limit ; 32-bit segment ? 0 00008146 8EDB mov ds, bx 328 %else 329 mov ds, word [bp + ?segsel] 330 %endif 0 00008148 66 _386_PM_o32 0 00008149 8B5EFC mov bx, word [bp + ?offset] 333 %if _PM 0 0000814C 741D jz .16 335 336 [cpu 386] 337 .32: 0 0000814E 80F902 cmp cl, 2 0 00008151 7213 jb .32_1 0 00008153 740D je .32_2 0 00008155 80F904 cmp cl, 4 0 00008158 7204 jb .32_3 343 .32_4: 0 0000815A 678A7303 mov dh, byte [ebx + 3] 345 .32_3: 0 0000815E 678A5302 mov dl, byte [ebx + 2] 347 .32_2: 0 00008162 678A6301 mov ah, byte [ebx + 1] 349 .32_1: 0 00008166 678A03 mov al, byte [ebx] 0 00008169 EB17 jmp .ret 352 __CPU__ 353 %endif 354 355 .16: 0 0000816B 80F902 cmp cl, 2 0 0000816E 7210 jb .16_1 0 00008170 740B je .16_2 0 00008172 80F904 cmp cl, 4 0 00008175 7203 jb .16_3 361 .16_4: 0 00008177 8A7703 mov dh, byte [bx + 3] 363 .16_3: 0 0000817A 8A5702 mov dl, byte [bx + 2] 365 .16_2: 0 0000817D 8A6701 mov ah, byte [bx + 1] 367 .16_1: 0 00008180 8A07 mov al, byte [bx] 369 .ret: 0 00008182 16 push ss 0 00008183 1F pop ds 0 00008184 E9[0000] jmp unhack 373 ..@rr_variable_read_access_end: 374 375 376 rr1_variable: 0 00008187 897EF2 mov word [rrmask], di ; -> mask of read-only bits 0 0000818A 88C8 mov al, cl 0 0000818C B100 mov cl, 0 0 0000818E 4E dec si ; (to reload al) 0 0000818F 50 push ax ; h = variable's field type, l = its size 0 00008190 B400 mov ah, 0 0 00008192 8946F6 mov word [bp + ?ismem_high_size_low], ax 0 00008195 86CD xchg cl, ch ; cx = variable's name's length 385 0 00008197 E8[0000] call skipcomma 0 0000819A 3C2E cmp al, '.' ; special ? 0 0000819C 7405 je short .writeprompt ; yes --> 0 0000819E E8[0000] call iseol? 0 000081A1 7547 jne short .noprompt 391 .writeprompt: 0 000081A3 56 push si ; -> behind dot if any 0 000081A4 8D76DE lea si, [bp + ?namebuffer] 394 ; -> name 0 000081A7 BF[0000] mov di, line_out 0 000081AA F3A4 rep movsb 0 000081AC 5E pop si ; -> behind dot if any 0 000081AD B020 mov al, 32 0 000081AF AA stosb 0 000081B0 59 pop cx ; h = variable's field type, l = its size 0 000081B1 87DA xchg bx, dx 0 000081B3 8B07 mov ax, word [bx] 0 000081B5 87DA xchg bx, dx 0 000081B7 51 push cx 0 000081B8 80F904 cmp cl, 4 0 000081BB 7205 jb .pnohigh 0 000081BD E8[0000] call hexword ; display high word 0 000081C0 EB08 jmp @F 409 .pnohigh: 0 000081C2 80F903 cmp cl, 3 0 000081C5 7206 jb @FF 0 000081C7 E8[0000] call hexbyte 413 @@: 414 %if _RSEPARATE 0 000081CA E85AFF call rseparate 416 %endif 417 @@: 0 000081CD 8B07 mov ax, word [bx] 0 000081CF 80F902 cmp cl, 2 0 000081D2 7207 jb .pnobyte 0 000081D4 86C4 xchg al, ah 0 000081D6 E8[0000] call hexbyte ; display high byte 0 000081D9 86C4 xchg al, ah 424 .pnobyte: 0 000081DB E8[0000] call hexbyte ; display low byte 426 %if _MS_PROMPT_COMPAT 0 000081DE B002 mov al, 2 428 %endif 0 000081E0 E82904 call dot_prompt 0 000081E3 59 pop cx ; h = variable's field type, l = its size 0 000081E4 7503E93D01 je .return 0 000081E9 A8 db __TEST_IMM8 ; (skip pop) 433 .noprompt: 0 000081EA 59 pop cx ; h = variable's field type, l = its size 435 %if _MMXSUPP 0 000081EB 894EEE mov word [bp + ?mmx_isvar_type], cx 437 %endif 0 000081EE 84ED test ch, ch 0 000081F0 7403E93501 jnz rr1_readonly_or_mmx 440 rr1_common_do_mmx: 0 000081F5 53 push bx 0 000081F6 52 push dx 443 rr1_common: 0 000081F7 884EF4 mov byte [rrtype], cl 0 000081FA 51 push cx 0 000081FB 50 push ax 0 000081FC 56 push si 0 000081FD E8[0000]EB02[0000] nearcall isoperator? 0 00008204 7511 jne .nooperator 0 00008206 89CB mov bx, cx 0 00008208 01DB add bx, bx ; bh = 0 ! 0 0000820A 50 push ax 0 0000820B E8[0000]EB02[0000] nearcall ..@call_operator_dispatchers 0 00008212 58 pop ax 0 00008213 85DB test bx, bx 0 00008215 7504 jnz .gotoperator 457 .nooperator: 0 00008217 BB1900 mov bx, OPERATOR_RIGHTOP; set default computation function 0 0000821A A8 db __TEST_IMM8 460 .gotoperator: 0 0000821B AC lodsb 462 0 0000821C E82104 call isassignmentoperator? 0 0000821F 731B jnc .assign_op_done ; found an assignment operator --> 0 00008221 83FB19 cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 0 00008224 7416 je .assign_op_done ; yes, assignment operator not required --> 0 00008226 59 pop cx 0 00008227 58 pop ax ; restore al, si in front of operator 0 00008228 50 push ax 0 00008229 51 push cx 0 0000822A 87F1 xchg si, cx 0 0000822C 51 push cx 0 0000822D E8[0000]EB02[0000] nearcall isunaryoperator?; is this a valid unary operator too ? 0 00008234 59 pop cx 0 00008235 74E0 je .nooperator ; yes --> 0 00008237 87F1 xchg si, cx 477 errorj9: equ $ 0 00008239 E9[0000] jmp error ; error where the assignment operator needs to be 479 .assign_op_done: 0 0000823C 59 pop cx 0 0000823D 59 pop cx 0 0000823E 59 pop cx 0 0000823F 53 push bx 0 00008240 80FB18 cmp bl, OPERATOR_COND 0 00008243 7503E9[0000] je error 0 00008248 E8[0000] call skipcomm0 487 0 0000824B E8[0000]EB02[0000] nearcall getexpression ; bx:dx = expression result 0 00008252 8866F5 mov byte [bp + ?hhtype], ah 0 00008255 8976F0 mov word [bp + ?hhoffset], si 0 00008258 E8[0000] call chkeol 0 0000825B 59 pop cx ; operator computation function 493 0 0000825C 807EF700 cmp byte [bp + ?ismem], 0 0 00008260 7419 je .var_hhvar 496 497 .mem_hhvar: 0 00008262 89C7 mov di, ax 0 00008264 89D6 mov si, dx 0 00008266 53 push bx 0 00008267 51 push cx 0 00008268 E8C8FE call rr1_read_mem_dxax 0 0000826B 59 pop cx 0 0000826C 5B pop bx 0 0000826D 52 push dx 0 0000826E 50 push ax 0 0000826F 89F8 mov ax, di 0 00008271 89F2 mov dx, si 0 00008273 BF[0000] mov di, mask_4byte ; di -> zero 0 00008276 BE[0200] mov si, mask_4byte + 2 ; si -> zero 511 0 00008279 EB06 jmp .common_hhvar 513 514 .var_hhvar: 0 0000827B 5E pop si ; si-> high word 0 0000827C 5F pop di ; di-> low word 0 0000827D FF34 push word [si] 0 0000827F FF35 push word [di] 519 520 .common_hhvar: 0 00008281 8F06[0000] pop word [hhvar] 0 00008285 8F06[0200] pop word [hhvar+2] ; save variable's current value (as left operand) 523 0 00008289 C606[0000]00 mov byte [hhtype], 0 ; type info signed=0 pointer=0 0 0000828E 807EF404 cmp byte [rrtype], 4 0 00008292 7317 jae .cleardword 0 00008294 807EF402 cmp byte [rrtype], 2 0 00008298 770C ja .clearthreebyte 0 0000829A 7405 je .clearword 530 .clearbyte: 0 0000829C C606[0100]00 mov byte [hhvar + 1], 0 ; clear second byte 532 .clearword: 0 000082A1 C606[0200]00 mov byte [hhvar + 2], 0 ; clear third byte 534 .clearthreebyte: 0 000082A6 C606[0300]00 mov byte [hhvar + 3], 0 ; clear fourth byte 536 .cleardword: 0 000082AB 87CB xchg cx, bx 0 000082AD 01DB add bx, bx 0 000082AF 8B9F[0000] mov bx, word [bx + operatorfunctions] 0 000082B3 87CB xchg cx, bx ; cx = operator function 0 000082B5 8A66F5 mov ah, byte [bp + ?hhtype] 542 %if _DUALCODE && _EXPRDUALCODE 0 000082B8 E8[0000]EB02[0400] nearcall ..@rr_operatorfunctions 544 %else 545 call cx ; compute 546 %endif 0 000082BF E8[0000]EB02[0000] nearcall getexpression.countsignificantbits 0 000082C6 53 push bx 0 000082C7 56 push si 0 000082C8 31DB xor bx, bx 0 000082CA 8A5EF4 mov bl, byte [rrtype] 0 000082CD 01DB add bx, bx 0 000082CF 8B76F0 mov si, word [bp + ?hhoffset] 554 %if _DUALCODE && _EXPRDUALCODE 0 000082D2 E8[0000]EB02[0000] nearcall ..@rr_checksignificantbits 556 557 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 557 ------------------ note: usesection lDEBUG_CODE2 558 ..@rr_checksignificantbits: section_of_function 0 0000235F FFA7[0000] jmp near word [checksignificantbits_table + bx] 560 561 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 561 ------------------ note: usesection lDEBUG_CODE 562 %else 563 call near word [checksignificantbits_table + bx] 564 %endif 0 000082D9 5E pop si 0 000082DA 5B pop bx 567 0 000082DB 97 xchg ax, di ; ax -> low word of variable 0 000082DC 8B7EF2 mov di, word [rrmask] ; di -> mask dword 0 000082DF 53 push bx ; use bx as a scratch space 0 000082E0 8B0D mov cx, word [di] ; = low word of mask 0 000082E2 51 push cx ; preserve low word of mask 0 000082E3 97 xchg ax, di ; di -> low word of variable 0 000082E4 230D and cx, word [di] ; cx = low word value to preserve 0 000082E6 5B pop bx ; = low word of mask 0 000082E7 F7D3 not bx ; = bitmask of bits to use from result 0 000082E9 21DA and dx, bx ; dx = bits to use from result low word 0 000082EB 09CA or dx, cx ; dx = low word compound 0 000082ED 5B pop bx ; restore high word after scratch use 0 000082EE 97 xchg ax, di ; di -> mask dword 0 000082EF 52 push dx ; use dx as a scratch space 0 000082F0 8B4D02 mov cx, word [di + 2] ; = high word of mask 0 000082F3 51 push cx ; preserve high word of mask 0 000082F4 230C and cx, word [si] ; cx = high word value to preserve 0 000082F6 5A pop dx ; = high word of mask 0 000082F7 F7D2 not dx ; = bitmask of bits to use from result 0 000082F9 21D3 and bx, dx ; bx = bits to use from result high word 0 000082FB 09CB or bx, cx 0 000082FD 5A pop dx ; restore low word after scratch use 0 000082FE 97 xchg ax, di ; di -> low word of variable 591 592 %if _MMXSUPP 0 000082FF 807EEF00 cmp byte [bp + ?mmx_isvar_type + 1], 0 0 00008303 7403E9FA00 jne rr1_mmx_set 595 %endif 0 00008308 807EF700 cmp byte [bp + ?ismem], 0 0 0000830C 7544 jne rr1_mem_set 598 599 .var_set: 0 0000830E 807EF402 cmp byte [rrtype], 2 0 00008312 7210 jb .setbyte 0 00008314 740B je .setword 0 00008316 807EF404 cmp byte [rrtype], 4 0 0000831A 7203 jb .setthreebyte 605 .setdword: 0 0000831C 887C01 mov byte [si + 1], bh ; set fourth byte 607 .setthreebyte: 0 0000831F 881C mov byte [si], bl ; set third byte 609 .setword: 0 00008321 887501 mov byte [di + 1], dh ; set second byte 611 .setbyte: 0 00008324 8815 mov byte [di], dl ; set first byte 613 .return: 614 rr1_memory.return: 615 rr1_variable.return: 0 00008326 89EC5D lleave code 617 rr1b: 0 00008329 C3 retn 619 620 621 rr1_readonly_or_mmx: 622 %if _MMXSUPP 0 0000832A 80FD01 cmp ch, 1 0 0000832D 7415 je rr1_readonly 0 0000832F 803E[0000]00 cmp byte [has_mmx], 0 0 00008334 7403E9BCFE jne rr1_common_do_mmx 0 00008339 BA[0000] mov dx, msg.internal_error_no_mmx 0 0000833C B80C01 mov ax, 010Ch 0 0000833F E8[0000] call setrc 0 00008342 EB03 jmp rr1_readonly.error 631 %endif 632 633 rr1_readonly: 0 00008344 BA[0000] mov dx, msg.readonly 635 .error: 0 00008347 E8[0000] call putsz_error 0 0000834A B80A01 mov ax, 010Ah 0 0000834D E8[0000] call setrc 0 00008350 EBD4 jmp rr1_variable.return 640 641 642 ..@rr_variable_write_access_start: 643 rr1_mem_set: 0 00008352 89D0 mov ax, dx 0 00008354 89DA mov dx, bx 646 0 00008356 E8[0000] call prephack 0 00008359 E8[0000] call dohack 0 0000835C 8A4EF6 mov cl, byte [bp + ?size] 650 %if _PM 0 0000835F 8B5EFA mov bx, word [bp + ?segsel] 0 00008362 E8[0000] call verifysegm 0 00008365 7303E98700 jc .ro 0 0000836A E8[0000] call test_high_limit ; 32-bit segment ? 0 0000836D 8EDB mov ds, bx 656 %else 657 mov ds, word [bp + ?segsel] 658 %endif 0 0000836F 66 _386_PM_o32 0 00008370 8B5EFC mov bx, word [bp + ?offset] 661 %if _PM 0 00008373 7440 jz .16 663 664 [cpu 386] 665 .32: 0 00008375 80F902 cmp cl, 2 0 00008378 7213 jb .32_1 0 0000837A 740D je .32_2 0 0000837C 80F904 cmp cl, 4 0 0000837F 7204 jb .32_3 671 .32_4: 0 00008381 67887303 mov byte [ebx + 3], dh 673 .32_3: 0 00008385 67885302 mov byte [ebx + 2], dl 675 .32_2: 0 00008389 67886301 mov byte [ebx + 1], ah 677 .32_1: 0 0000838D 678803 mov byte [ebx], al 679 680 .32_check: 0 00008390 80F902 cmp cl, 2 0 00008393 7219 jb .32_check_1 0 00008395 7411 je .32_check_2 0 00008397 80F904 cmp cl, 4 0 0000839A 7206 jb .32_check_3 686 .32_check_4: 0 0000839C 673A7303 cmp dh, byte [ebx + 3] 0 000083A0 754F jne .ro 689 .32_check_3: 0 000083A2 673A5302 cmp dl, byte [ebx + 2] 0 000083A6 7549 jne .ro 692 .32_check_2: 0 000083A8 673A6301 cmp ah, byte [ebx + 1] 0 000083AC 7543 jne .ro 695 .32_check_1: 0 000083AE 673A03 cmp al, byte [ebx] 0 000083B1 753E jne .ro 0 000083B3 EB36 jmp .ret 699 __CPU__ 700 %endif 701 702 .16: 0 000083B5 80F902 cmp cl, 2 0 000083B8 7210 jb .16_1 0 000083BA 740B je .16_2 0 000083BC 80F904 cmp cl, 4 0 000083BF 7203 jb .16_3 708 .16_4: 0 000083C1 887703 mov byte [bx + 3], dh 710 .16_3: 0 000083C4 885702 mov byte [bx + 2], dl 712 .16_2: 0 000083C7 886701 mov byte [bx + 1], ah 714 .16_1: 0 000083CA 8807 mov byte [bx], al 716 717 .16_check: 0 000083CC 80F902 cmp cl, 2 0 000083CF 7216 jb .16_check_1 0 000083D1 740F je .16_check_2 0 000083D3 80F904 cmp cl, 4 0 000083D6 7205 jb .16_check_3 723 .16_check_4: 0 000083D8 3A7703 cmp dh, byte [bx + 3] 0 000083DB 7514 jne .ro 726 .16_check_3: 0 000083DD 3A5702 cmp dl, byte [bx + 2] 0 000083E0 750F jne .ro 729 .16_check_2: 0 000083E2 3A6701 cmp ah, byte [bx + 1] 0 000083E5 750A jne .ro 732 .16_check_1: 0 000083E7 3A07 cmp al, byte [bx] 0 000083E9 7506 jne .ro 735 .ret: 0 000083EB E8[0000] call ee0a ; calls unhack 737 rr1_memory.return_j1: equ $ 0 000083EE E935FF jmp rr1_memory.return 739 740 .ro: 0 000083F1 E8[0000] call ee0a 0 000083F4 BA[0000] mov dx, msg.readonly_mem 0 000083F7 E8[0000] call putsz_error 0 000083FA B80B01 mov ax, 010Bh 0 000083FD E8[0000] call setrc 0 00008400 EBEC jmp short rr1_memory.return_j1 747 ..@rr_variable_write_access_end: 748 749 %if _MMXSUPP 750 ; INP: bx:dx = number 751 ; byte [bp + ?mmx_isvar_type] = type/register 752 rr1_mmx_set: 753 subcpu 586 0 00008402 8A46EF mov al, byte [bp + ?mmx_isvar_type + 1] 0 00008405 48 dec ax 0 00008406 48 dec ax ; undo encoding for isvar type return 0 00008407 89D9 mov cx, bx ; cx:dx = number 0 00008409 88C3 mov bl, al 0 0000840B 80E307 and bl, 7 ; = register number 0 0000840E 83E018 and ax, 11_000b ; = type of write 0 00008411 C1E802 shr ax, 2 ; = index into table 762 763 %if _PM 0 00008414 52 push dx 0 00008415 8B16[0000] mov dx, word [code_seg] 0 00008419 E8[0000] call setes2dx ; es => lDEBUG_CODE (writable) 0 0000841C 5A pop dx 768 %else 769 mov es, word [code_seg] ; es => lDEBUG_CODE 770 %endif 0 0000841D C0E303 shl bl, 3 ; shift into reg field 0 00008420 80CB07 or bl, 07h ; code to get our ModR/M byte (r/m = [bx]) 0 00008423 26881E[D604] mov byte [es:.getmmx_modrm], bl 774 ; SMC in section lDEBUG_CODE 0 00008428 26881E[E004] mov byte [es:.setmmx_modrm], bl 776 ; SMC in section lDEBUG_CODE 0 0000842D EB00 jmp @F ; try to invalidate prefetch 778 @@: 0 0000842F 16 push ss 0 00008430 07 pop es 0 00008431 83EC08 sub sp, 8 0 00008434 89E3 mov bx, sp 783 .getmmx_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 0 00008436 0F7F07 movq qword [bx], mm0 785 0 00008439 97 xchg ax, di 0 0000843A 31C0 xor ax, ax ; = 0 0 0000843C FF95[0A00] call near [mmx_set_table + di] 789 790 .setmmx_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 0 00008440 0F6F07 movq mm0, qword [bx] 0 00008443 83C408 add sp, 8 0 00008446 EBA6 jmp short rr1_memory.return_j1 794 795 .signextend: 0 00008448 85C9 test cx, cx 0 0000844A 7901 jns .zeroextend 0 0000844C 48 dec ax ; = -1 799 800 .zeroextend: 0 0000844D 894704 mov word [bx + 4], ax 0 00008450 894706 mov word [bx + 6], ax 803 ;; jmp short .lowonly 804 ; fall through 805 806 .lowonly: 0 00008453 8917 mov word [bx], dx 0 00008455 894F02 mov word [bx + 2], cx 0 00008458 C3 retn 810 811 .highonly: 0 00008459 895704 mov word [bx + 4], dx 0 0000845C 894F06 mov word [bx + 6], cx 0 0000845F 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 00006F14 [0000] dw error_expr 0 00006F16 [0000] dw getbyte.checksignificantbits 0 00006F18 [0000] dw getword.checksignificantbits 0 00006F1A [0000] dw get3byte.checksignificantbits 0 00006F1C [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 00006F1E [EB04] dw rr1_mmx_set.zeroextend 0 00006F20 [E604] dw rr1_mmx_set.signextend 0 00006F22 [F104] dw rr1_mmx_set.lowonly 0 00006F24 [F704] dw rr1_mmx_set.highonly 847 %endif 848 849 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 849 ------------------ note: usesection lDEBUG_CODE 850 851 852 ; Change flag register with mnemonics - F 853 rr2: 0 00008460 E8[0000] call capitalise 0 00008463 3C46 cmp al, 'F' 0 00008465 7403E9AE00 jne rr3 ; if not 'F' --> 0 0000846A 50 push ax 0 0000846B 8A04 mov al, byte [si] 0 0000846D E8[0000]EB02[0000] nearcall isseparator? ; valid separator ? 0 00008474 58 pop ax 0 00008475 7403E99E00 jne rr3 ; no --> 862 .ef: 0 0000847A E8[0000] call skipcomma 0 0000847D 3C2E cmp al, '.' ; special ? 0 0000847F 7405 je .writeprompt ; yes --> 0 00008481 E8[0000] call iseol? ; end of line ? 0 00008484 7517 jne .noprompt ; no --> 868 .writeprompt: 0 00008486 BF[0000] mov di, line_out 870 %if _REGSHIGHLIGHT 0 00008489 800E[0200]02 setopt [internalflags3], dif3_do_not_highlight 872 %endif 0 0000848E 56 push si 0 0000848F E81507 call dmpflags 0 00008492 5E pop si ; -> behind dot if any 876 %if _MS_PROMPT_COMPAT 0 00008493 B004 mov al, 4 878 %endif 0 00008495 E87401 call dot_prompt 0 00008498 7503E98CFE je rr1b ; if no change 881 .noprompt: 882 0 0000849D E8A001 call isassignmentoperator? 0 000084A0 56 push si 0 000084A1 7308 jnc .noteol ; at least one value is required --> 886 .check_loop: 0 000084A3 E8[0000] call skipcomm0 0 000084A6 E8[0000] call iseol? 0 000084A9 7424 je .really ; return if done 890 .noteol: 0 000084AB E8[0000] call capitalise 0 000084AE 86C4 xchg al, ah 0 000084B0 AC lodsb 0 000084B1 E8[0000] call capitalise 0 000084B4 86C4 xchg al, ah ; ax = mnemonic 0 000084B6 BF[0000] mov di, flagson 0 000084B9 B91000 mov cx, 16 0 000084BC F2AF repne scasw 0 000084BE 750B jne short .errordec ; if no match 0 000084C0 AC lodsb 0 000084C1 E8[0000]EB02[0000] nearcall isseparator? 0 000084C8 74D9 je .check_loop 903 .errordec2: 0 000084CA 4E dec si 905 .errordec: 906 errordec: equ $ 0 000084CB 4E dec si ; back up one before flagging an error 0 000084CC E9[0000] jmp error 909 910 .really: 0 000084CF 5E pop si 0 000084D0 4E dec si 0 000084D1 AC lodsb 914 .loop: 0 000084D2 E8[0000] call iseol? 0 000084D5 7503E94FFE je rr1b ; return if done 917 0 000084DA E8[0000] call capitalise 0 000084DD 86C4 xchg al, ah 0 000084DF AC lodsb 0 000084E0 E8[0000] call capitalise 0 000084E3 86C4 xchg al, ah ; ax = mnemonic 923 0 000084E5 BF[0000] mov di, flagson 0 000084E8 B91000 mov cx, 16 0 000084EB F2AF repne scasw 0 000084ED 75DC jne short .errordec ; if no match 0 000084EF 81FF[0000] cmp di, flagsoff 0 000084F3 770A ja .clear ; if we're clearing 930 %if _LINK 0 000084F5 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 000084F9 0906[0000] or word [reg_efl], ax ; set the bit 0 000084FD EB0A jmp short .common 940 .clear: 941 %if _LINK 0 000084FF 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 00008503 F7D0 not ax 0 00008505 2106[0000] and word [reg_efl], ax ; clear the bit 951 .common: 0 00008509 AC lodsb 0 0000850A E8[0000]EB02[0000] nearcall isseparator? 0 00008511 75B7 jne short .errordec2 0 00008513 E8[0000] call skipcomm0 0 00008516 EBBA jmp short .loop 957 958 ; Change flag register with mnemonics - EF 959 rr3: 0 00008518 86C4 xchg al, ah 0 0000851A AC lodsb 0 0000851B E8[0000] call capitalise 0 0000851E 86C4 xchg al, ah ; ax = next two characters 0 00008520 3D4546 _386 cmp ax, "EF" 0 00008523 750F _386 jne rr4 ; if not "EF" --> 0 00008525 50 _386 push ax 0 00008526 8A04 _386 mov al, byte [si] 0 00008528 E8[0000]EB02[0000] _386 nearcall isseparator? ; valid separator ? 0 0000852F 58 _386 pop ax 0 00008530 0F8446FF _386 je rr2.ef 971 972 ; Change a single flag with mnemonic 973 rr4: 0 00008534 BF[0000] mov di, flagnames 0 00008537 B90800 mov cx, 8 0 0000853A F2AF repne scasw 0 0000853C 758D jne short rr2.errordec 0 0000853E 89C2 mov dx, ax 0 00008540 AC lodsb 0 00008541 E8[0000]EB02[0000] nearcall isseparator? 0 00008548 7580 jne rr2.errordec2 982 %if _LINK 0 0000854A 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 0000854E E8[0000] call skipcomm0 0 00008551 3C2E cmp al, '.' ; special ? 0 00008553 7405 je .writeprompt ; yes --> 0 00008555 E8[0000] call iseol? 0 00008558 751B jne .noprompt 995 .writeprompt: 0 0000855A BF[0000] mov di, line_out 0 0000855D 89D0 mov ax, dx 0 0000855F AB stosw 0 00008560 58 pop ax 0 00008561 50 push ax 0 00008562 8506[0000] test word [reg_efl], ax ; is it off ? 0 00008566 B82030 mov ax, " 0" ; assume so 0 00008569 7402 jz .off ; it is off --> 0 0000856B FEC4 inc ah ; is on, set to '1' 1005 .off: 0 0000856D AB stosw 1007 %if _MS_PROMPT_COMPAT 0 0000856E B000 mov al, 0 1009 %endif 0 00008570 E89900 call dot_prompt 0 00008573 7403 je .ret_pop_j_ZR ; if no change --> 1012 .noprompt: 0 00008575 E8[0000] call iseol? ; end of line ? 1014 .ret_pop_j_ZR: 0 00008578 7503E98D00 je .ret_pop ; yes, no change requested --> 0 0000857D 51 push cx 0 0000857E 50 push ax 0 0000857F 56 push si 0 00008580 E8[0000]EB02[0000] nearcall isoperator? 0 00008587 7523 jne .nooperator 0 00008589 89CB mov bx, cx 0 0000858B 01DB add bx, bx ; bh = 0 ! 0 0000858D 50 push ax 0 0000858E E8[0000]EB02[0000] nearcall ..@call_operator_dispatchers 0 00008595 58 pop ax 0 00008596 85DB test bx, bx 0 00008598 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 0000859A 80FB17 cmp bl, OPERATOR_BOOL_AND 0 0000859D 770D ja .nooperator 0 0000859F 80FB15 cmp bl, OPERATOR_BOOL_OR 0 000085A2 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 000085A4 80C303 add bl, OPERATOR_BOOL_OR - OPERATOR_BIT_OR 0 000085A7 80FB15 cmp bl, OPERATOR_BOOL_OR 0 000085AA 7304 jae .gotoperator 1056 .nooperator: 0 000085AC BB1900 mov bx, OPERATOR_RIGHTOP; set default computation function 0 000085AF A8 db __TEST_IMM8 1059 .gotoperator: 0 000085B0 AC lodsb 1061 0 000085B1 E88C00 call isassignmentoperator? 0 000085B4 7308 jnc .assign_op_done ; found an assignment operator --> 0 000085B6 83FB19 cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 1065 %if 1 ; since | ^ & are never unary operators 0 000085B9 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 000085BE 59 pop cx 0 000085BF 59 pop cx 0 000085C0 59 pop cx 0 000085C1 53 push bx 0 000085C2 E8[0000]EB02[0000] nearcall getexpression 0 000085C9 E8[0000] call chkeol 0 000085CC E8[0000]EB02[0000] nearcall toboolean 0 000085D3 59 pop cx ; operator index 0 000085D4 31C0 xor ax, ax 0 000085D6 A2[0000] mov byte [hhtype], al 0 000085D9 A3[0200] mov word [hhvar+2], ax 0 000085DC 5E pop si 0 000085DD 56 push si ; flag 0 000085DE 8536[0000] test word [reg_efl], si 0 000085E2 7401 jz .notset 0 000085E4 40 inc ax 1098 .notset: 0 000085E5 A3[0000] mov word [hhvar], ax 0 000085E8 87CB xchg cx, bx 0 000085EA 01DB add bx, bx 0 000085EC 8B9F[0000] mov bx, word [bx+operatorfunctions] 0 000085F0 87CB xchg cx, bx ; cx = operator function 1104 %if _DUALCODE && _EXPRDUALCODE 0 000085F2 E8[0000]EB02[0400] nearcall ..@rr_operatorfunctions 1106 1107 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 1107 ------------------ note: usesection lDEBUG_CODE2 1108 ..@rr_operatorfunctions: section_of_function 0 00002363 FFE1 jmp cx 1110 1111 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 1111 ------------------ note: usesection lDEBUG_CODE 1112 %else 1113 call cx ; compute 1114 %endif 0 000085F9 58 pop ax 0 000085FA 85D2 test dx, dx 0 000085FC 7405 jz .clear 0 000085FE 0906[0000] or word [reg_efl], ax ; set the bit 0 00008602 C3 retn 1120 .clear: 0 00008603 F7D0 not ax 0 00008605 2106[0000] and word [reg_efl], ax ; clear the bit 0 00008609 C3 retn 1124 1125 .ret_pop: 0 0000860A 58 pop ax 0 0000860B 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 0000860C 807CFF2E cmp byte [si-1], '.' ; syntax for display without prompt ? 0 00008610 7425 je .onlydisplay ; yes --> 0 00008612 53 push bx 0 00008613 52 push dx 1146 %if _MS_PROMPT_COMPAT 0 00008614 98 cbw ; ax = expand offset to word 0 00008615 93 xchg bx, ax ; bx = offset 0 00008616 BE[0000] mov si, table_getline_prepare_ms_debug 0 00008619 F606[0200]10 testopt [options2], opt2_r_prompt_compat 0 0000861E 7503 jnz @F 0 00008620 BE[0000] mov si, table_getline_prepare_ldebug 1153 @@: 0 00008623 FF10 call near [si + bx] ; call prefix/preparation function 0 00008625 E8[0000] call getline00 1156 %else 1157 call getline0 1158 %endif 0 00008628 5A pop dx 0 00008629 5B pop bx 0 0000862A E8[0000] call iseol? ; no change requested ? 0 0000862D 7410 je .ret ; yes --> (ZR) 0 0000862F 3C2E cmp al, '.' ; other syntax for no change ? 0 00008631 750C jne .ret ; no --> (NZ) 1165 .chkeol1: 0 00008633 AC lodsb 0 00008634 E9[0000] jmp chkeol ; (ZR) 1168 1169 .onlydisplay: 0 00008637 E8F9FF call .chkeol1 0 0000863A E8[0000] call putsline_crlf 0 0000863D 38C0 cmp al, al ; ZR 1173 .ret: 0 0000863F 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 00008640 3C3A cmp al, ':' 0 00008642 750A jne .checksingleequality 0 00008644 AC lodsb 0 00008645 3C3D cmp al, '=' 0 00008647 7409 je .skip ; long form assignment operator --> 1189 ; A single colon. Report "no assignment operator" here. 0 00008649 4E dec si 0 0000864A B03A mov al, ':' ; restore si, al 1192 .return_cy: 0 0000864C F9 stc 0 0000864D C3 retn 1195 1196 .checksingleequality: 0 0000864E 3C3D cmp al, '=' 0 00008650 75FA jne .return_cy ; no assignment operator --> 1199 .skip: 0 00008652 E8[0000] call skipcomma 0 00008655 F8 clc 0 00008656 C3 retn 1203 1204 1205 rc_cmd: 0 00008657 BF[0000] mov di, cmdline_buffer 0 0000865A BD[0000] mov bp, cmdline_buffer.end 1208 %if !_LOADER 0 0000865D EB06 jmp @F 1210 1211 ; INP: al = '.' 1212 ; si -> next character 1213 re_cmd: 0 0000865F BF[0000] mov di, re_buffer 0 00008662 BD[0000] mov bp, re_buffer.end 1216 %else 1217 re_cmd: 1218 %endif 1219 @@: 0 00008665 5A pop dx 0 00008666 5A pop dx ; discard si and ax on stack 0 00008667 BA[0000] mov dx, msg.list 0 0000866A E8[0000] call isstring? 0 0000866D 7503E9C500 je .list 1225 1226 %if !_LOADER 0 00008672 81FF[0000] cmp di, re_buffer 0 00008676 742C je .not_rc 1229 %endif 1230 0 00008678 BA[0000] mov dx, msg.abort 0 0000867B E8[0000] call isstring? 0 0000867E 751F jne .guard_rc 1234 .abort_rc: 0 00008680 E8[0000] call yy_reset_buf 0 00008683 8026[0100]FE clropt [internalflags3], dif3_input_cmdline 0 00008688 800E[0100]02 setopt [internalflags3], dif3_input_cmdline_closed 0 0000868D E8[0000] call getline_reset_notatty 1239 %if _EXTENSIONS && _COMLEVELS 0 00008690 BB8402 mov bx, COMLEVEL_EXIT_RC_ABORT 0 00008693 89D8 mov ax, bx 0 00008695 8B0E[0000] mov cx, [ext_comlevels_handler] 0 00008699 E303 jcxz @F 1244 ; INP: cx destroyed 1245 ; bx = function, 1246 ; COMLEVEL_EXIT_RC_ABORT 1247 ; OUT: cx don't care 1248 ; jump to downlink or extcall near_transfer_ext_return 0 0000869B E8[0000] call transfer_ext_cx_NC_push_ax 1250 @@: 1251 %endif 0 0000869E C3 retn 1253 1254 .guard_rc: 0 0000869F E8[0000] call guard_rc 1256 %if !_LOADER 0 000086A2 EB03 jmp @F 1258 1259 .not_rc: 0 000086A4 E8[0000] call guard_re 1261 @@: 1262 %endif 1263 0 000086A7 BA[0000] mov dx, msg.append 0 000086AA E8[0000] call isstring? 0 000086AD 740D je .append 0 000086AF BA[0000] mov dx, msg.replace 0 000086B2 E8[0000] call isstring? 0 000086B5 740D je .common ; di -> at first byte (where to append) 0 000086B7 B84501 mov ax, 0145h 0 000086BA EB75 jmp .error_common 1272 1273 .append: 0 000086BC 30C0 xor al, al 0 000086BE B9FFFF mov cx, -1 0 000086C1 F2AE repne scasb ; di -> after zero byte 0 000086C3 4F dec di ; -> at zero byte 1278 1279 .common: 0 000086C4 E8[0000] call skipwhite 1281 1282 %if _RECMDWHILEBUFFER 1283 %if _WHILEBUFFSIZE < 256 1284 %error WHILE buffer not large enough for re_cmd 1285 %endif 0 000086C7 BB[0000] mov bx, while_buffer 0 000086CA F606[0300]04 testopt [internalflags], tt_while 0 000086CF 7409 jz .use_whilebuffer 1289 1290 .use_auxbuff: 1291 %endif 0 000086D1 E8[0000] call guard_auxbuff 0 000086D4 8E06[0000] mov es, word [auxbuff_segorsel] 0 000086D8 31DB xor bx, bx ; es:bx -> buffer 1295 1296 .use_whilebuffer: 1297 %if _RECMDWHILEBUFFER 0 000086DA 89DA mov dx, bx ; es:dx -> start of buffer 1299 %endif 1300 0 000086DC 50 push ax 0 000086DD B00D mov al, 13 0 000086DF 3845FF cmp byte [di - 1], al ; is there an EOL in front of us? 0 000086E2 87DF xchg bx, di ; es:di -> auxbuff, bx -> at zero byte 0 000086E4 7401 je @F ; yes --> 1306 0 000086E6 AA stosb ; first store a CR 1308 @@: 0 000086E7 58 pop ax 1310 .loop: 0 000086E8 3C5C cmp al, '\' 0 000086EA 750A jne .literal 1313 0 000086EC AC lodsb ; load escaped character 0 000086ED E8[0000] call iseol?.notsemicolon; EOL ? 0 000086F0 7437 je .error_escaped_cr ; yes, error --> 0 000086F2 AA stosb ; store escaped literal 0 000086F3 AC lodsb ; load next 0 000086F4 EBF2 jmp .loop 1320 1321 .literal: 0 000086F6 E8[0000] call iseol?.notsemicolon; EOL ? 0 000086F9 7410 je .end ; got all --> 0 000086FB 3C3B cmp al, ';' ; semicolon ? 0 000086FD 7508 jne @F 0 000086FF B00D mov al, 13 0 00008701 AA stosb ; store linebreak 0 00008702 E8[0000] call skipwhite ; skip leading blanks 0 00008705 EBE1 jmp .loop 1330 1331 @@: 0 00008707 AA stosb ; store character 0 00008708 AC lodsb 0 00008709 EBDD jmp .loop 1335 1336 .end: 1337 ; di -> behind last character 0 0000870B 31C0 xor ax, ax 0 0000870D AA stosb 0 0000870E 89D8 mov ax, bx 1341 %if _RECMDWHILEBUFFER 0 00008710 29D7 sub di, dx 1343 %endif 0 00008712 01F8 add ax, di 0 00008714 7218 jc .error_too_much 0 00008716 39E8 cmp ax, bp 0 00008718 7714 ja .error_too_much 1348 %if _RECMDWHILEBUFFER 0 0000871A 89D6 mov si, dx 1350 %else 1351 xor si, si 1352 %endif 0 0000871C 06 push es 0 0000871D 1F pop ds 0 0000871E 16 push ss 0 0000871F 07 pop es 0 00008720 89F9 mov cx, di 0 00008722 89DF mov di, bx 0 00008724 F3A4 rep movsb 0 00008726 16 push ss 0 00008727 1F pop ds 0 00008728 C3 retn 1363 1364 .error_escaped_cr: 0 00008729 B84601 mov ax, 0146h 0 0000872C EB03 jmp .error_common 1367 1368 .error_too_much: 0 0000872E B80601 mov ax, 0106h 1370 1371 .error_common: 0 00008731 E8[0000] call setrc 0 00008734 E9[0000] jmp error 1374 1375 re_cmd.list: 0 00008737 AC lodsb 0 00008738 E8[0000] call chkeol 1378 0 0000873B 89FE mov si, di 0 0000873D 31C0 xor ax, ax ; ah = 0 (flag to escape blanks) 1381 %if _40COLUMNS 1382 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 1382 ------------------ note: usesection lDEBUG_DATA_ENTRY 1383 align 2, db 0 1384 .lastfragmentlength: 0 00006F26 0000 dw 0 1386 1387 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 1387 ------------------ note: usesection lDEBUG_CODE 0 0000873F A3[1200] mov word [.lastfragmentlength], ax 1389 ; init to zero 1390 %endif 0 00008742 BF[0000] mov di, line_out ; write to line_out 1392 ; Note that we cannot depend on line_out being 1393 ; large enough for every command because we 1394 ; want to escape initial blanks and all quote 1395 ; marks as well as backslashes. However, the 1396 ; quote marks can be entered without escapes 1397 ; in Rx.APPEND/.REPLACE so line_out may not be 1398 ; large enough to hold a whole command. 1399 ; Previously we called putsline in the .cr branch 1400 ; but this is not needed if several short commands 1401 ; are displayed. The necessary check in .put does 1402 ; suffice to handle a filled buffer. 1403 .loop: 0 00008745 AC lodsb 0 00008746 84C0 test al, al 0 00008748 7453 jz .end 0 0000874A 3C0D cmp al, 13 ; (intentionally not iseol?) 0 0000874C 7441 je .cr 0 0000874E 3C20 cmp al, 32 0 00008750 7430 je .escapeif 0 00008752 3C09 cmp al, 9 0 00008754 742C je .escapeif 0 00008756 B401 mov ah, 1 ; ah = 1 0 00008758 3C3B cmp al, ';' 0 0000875A 742C je .escape 0 0000875C 3C22 cmp al, '"' 0 0000875E 7428 je .escape 0 00008760 3C27 cmp al, "'" 0 00008762 7424 je .escape 0 00008764 3C5C cmp al, '\' 0 00008766 7420 je .escape 1422 .put: 1423 ; Check that we are within available buffer space. 1424 ; Is it enough for 1 more codepoint plus an escape 1425 ; backslash for the .escape branch? 1426 ; Is it also enough for 1 more codepoint plus the 1427 ; semicolon for the .cr branch? 1428 ; The 4 is an exaggeration. 0 00008768 81FF[FCFF] cmp di, line_out_end - 4 0 0000876C 7211 jb @F ; yes --> 1431 %if _40COLUMNS 0 0000876E 50 push ax 0 0000876F A1[1200] mov ax, word [.lastfragmentlength] 0 00008772 E8[0000] call putsline_break_line 0 00008775 A3[1200] mov word [.lastfragmentlength], ax 1436 ; We cheat: At this point we know that we always 1437 ; want to display more so we can call the _more 1438 ; function unconditionally here. 0 00008778 E8[0000] call puts_break_line_more 0 0000877B 58 pop ax 1441 %else 1442 call putsline 1443 %endif 0 0000877C BF[0000] mov di, line_out 1445 @@: 0 0000877F AA stosb 0 00008780 EBC3 jmp .loop 1448 1449 .escapeif: 0 00008782 84E4 test ah, ah 0 00008784 75E2 jnz .put 0 00008786 B401 mov ah, 1 ; ah = 1 1453 .escape: 0 00008788 50 push ax 0 00008789 B05C mov al, '\' 0 0000878B AA stosb ; (always have space) 0 0000878C 58 pop ax 0 0000878D EBD9 jmp .put ; checks for buffer space 1459 1460 .cr: 0 0000878F AC lodsb 0 00008790 84C0 test al, al 0 00008792 7409 jz .end 0 00008794 4E dec si 0 00008795 B03B mov al, ';' 0 00008797 AA stosb ; (always have space) 0 00008798 B82000 mov ax, 32 ; ah = 0 0 0000879B EBCB jmp .put ; checks for buffer space 1469 1470 .end: 1471 %if _40COLUMNS 0 0000879D A1[1200] mov ax, word [.lastfragmentlength] 0 000087A0 E8[0000] call putsline_break_line 1474 %else 1475 call putsline 1476 %endif 0 000087A3 BA[0000] mov dx, crlf 0 000087A6 E9[0000] jmp putsz 1479 1480 1481 rc_run: 0 000087A9 E8[0000] call guard_rc 1483 %if !_LOADER 0 000087AC E8[0000] call guard_re ; do not allow RE command to run RC 1485 ; (the RE buffer would drain first) 1486 %endif 1487 0 000087AF E8[0000] call yy_reset_buf 1489 0 000087B2 C706[0000][0000] mov word [cmdline_buffer.position], cmdline_buffer 0 000087B8 8326[0000]00 and word [rc_count], 0 0 000087BD 8326[0200]00 and word [rc_count + 2], 0 1493 0 000087C2 800E[0100]01 setopt [internalflags3], dif3_input_cmdline 1495 1496 %if _EXTENSIONS && _COMLEVELS 0 000087C7 51 push cx 0 000087C8 31C0 xor ax, ax 0 000087CA BB0002 mov bx, COMLEVEL_INIT_RC 0 000087CD 8B0E[0000] mov cx, [ext_comlevels_handler] 0 000087D1 E303 jcxz @F 1502 ; INP: ax = 0 1503 ; cx destroyed 1504 ; bx = function, 1505 ; COMLEVEL_INIT_RC 1506 ; COMLEVEL_INIT_YY 1507 ; COMLEVEL_INIT_YY_BOOT 1508 ; COMLEVEL_INIT_RE 1509 ; OUT: cx don't care 1510 ; jump to downlink or extcall near_transfer_ext_return 1511 ; REM: the initialisation of RC buffer execution set up by 1512 ; the debugger's init doesn't call out this way. 1513 ; RE buffer execution only calls out if the entire RE 1514 ; buffer does not equal "@R", else dumpregs is called 1515 ; internally without setup of reading the RE buffer. 0 000087D3 E8[0000] call transfer_ext_cx_NC_push_ax 1517 @@: 0 000087D6 59 pop cx 1519 %endif 0 000087D7 C3 retn 1521 1522 1523 %if !_LOADER 1524 dumpregs_extended: 0 000087D8 E8[0000] call guard_re 0 000087DB 813E[0000]4052 cmp word [re_buffer], "@R" 0 000087E1 7408 je @F 0 000087E3 813E[0000]4072 cmp word [re_buffer], "@r" 0 000087E9 750A jne .complex 1530 @@: 0 000087EB 803E[0200]00 cmp byte [re_buffer + 2], 0 0 000087F0 7503E9DE00 je .just_dumpregs 1533 1534 .complex: 1535 %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER || _EXTENSIONS 0 000087F5 C606[0000]FF mov byte [in_re], -1 1537 %endif 1538 %if _RH 0 000087FA E8AB02 call enable_rh_2 1540 %endif 1541 0 000087FD F606[0300]20 testopt [internalflags3], dif3_auxbuff_guarded_2 0 00008802 740C jz @F 1544 0 00008804 B80301 mov ax, 0103h 0 00008807 E8[0000] call setrc 0 0000880A BA[0000] mov dx, msg.unexpected_auxbuff_guard 0 0000880D E9[0000] jmp putsz 1549 1550 @@: 1551 %if _SYMBOLIC 0 00008810 F606[0200]08 testopt [internalflags3], dif3_nosymbols_2 0 00008815 740C jz @F 1554 0 00008817 B80301 mov ax, 0103h 0 0000881A E8[0000] call setrc 0 0000881D BA[0000] mov dx, msg.unexpected_nosymbols 0 00008820 E9[0000] jmp putsz 1559 1560 @@: 1561 %endif 0 00008823 E8[0000] call yy_reset_buf 1563 0 00008826 C706[0000][0000] mov word [re_buffer.position], re_buffer 0 0000882C 8326[0000]00 and word [re_count], 0 0 00008831 8326[0200]00 and word [re_count + 2], 0 1567 0 00008836 FF36[0000] push word [rc] 0 0000883A FF36[0000] push word [savesp] 0 0000883E FF36[0000] push word [throwsp] 0 00008842 FF36[0000] push word [lastcmd] 0 00008846 55 push bp 0 00008847 8926[0000] mov word [savesp], sp 0 0000884B 8926[0000] mov word [throwsp], sp 0 0000884F 8926[0000] mov word [re_sp], sp 1576 0 00008853 800E[0300]01 setopt [internalflags3], dif3_input_re 1578 0 00008858 F606[0300]10 testopt [internalflags3], dif3_auxbuff_guarded_1 0 0000885D 7405 jz @F 0 0000885F 8036[0300]30 xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 1582 @@: 1583 %if _SYMBOLIC 0 00008864 F606[0200]04 testopt [internalflags3], dif3_nosymbols_1 0 00008869 7405 jz @F 0 0000886B 8036[0200]0C xoropt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 1587 @@: 1588 %endif 1589 1590 %if _EXTENSIONS && _COMLEVELS 0 00008870 51 push cx 0 00008871 31C0 xor ax, ax 0 00008873 BB0008 mov bx, COMLEVEL_INIT_RE 0 00008876 8B0E[0000] mov cx, [ext_comlevels_handler] 0 0000887A E303 jcxz @F 1596 ; INP: ax = 0 1597 ; cx destroyed 1598 ; bx = function, 1599 ; COMLEVEL_INIT_RC 1600 ; COMLEVEL_INIT_YY 1601 ; COMLEVEL_INIT_YY_BOOT 1602 ; COMLEVEL_INIT_RE 1603 ; OUT: cx don't care 1604 ; jump to downlink or extcall near_transfer_ext_return 1605 ; REM: the initialisation of RC buffer execution set up by 1606 ; the debugger's init doesn't call out this way. 1607 ; RE buffer execution only calls out if the entire RE 1608 ; buffer does not equal "@R", else dumpregs is called 1609 ; internally without setup of reading the RE buffer. 0 0000887C E8[0000] call transfer_ext_cx_NC_push_ax 1611 @@: 0 0000887F 59 pop cx 1613 %endif 1614 1615 .cmd3: 0 00008880 E9[0000] jmp cmd3 1617 1618 .exit: 0 00008883 8B26[0000] mov sp, word [re_sp] 0 00008887 5D pop bp 0 00008888 8F06[0000] pop word [lastcmd] 0 0000888C 8F06[0000] pop word [throwsp] 0 00008890 8F06[0000] pop word [savesp] 0 00008894 58 pop ax 0 00008895 85C0 test ax, ax 0 00008897 7403 jz @F 0 00008899 A3[0000] mov word [rc], ax 1628 @@: 0 0000889C 8026[0300]FE clropt [internalflags3], dif3_input_re 1630 0 000088A1 F606[0300]20 testopt [internalflags3], dif3_auxbuff_guarded_2 0 000088A6 7405 jz @F 0 000088A8 8036[0300]30 xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 1634 @@: 1635 %if _SYMBOLIC 0 000088AD F606[0200]08 testopt [internalflags3], dif3_nosymbols_2 0 000088B2 7405 jz @F 0 000088B4 8036[0200]0C xoropt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 1639 @@: 1640 %endif 1641 %if _RH 0 000088B9 8026[0200]DF clropt [internalflags6], dif6_rh_mode_2 0 000088BE E8DA01 call enable_rh 1644 0 000088C1 E8[0000] call terminate_silent_dump.if_nonnull 1646 %endif 1647 %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER || _EXTENSIONS 0 000088C4 C606[0000]00 mov byte [in_re], 0 1649 %endif 1650 0 000088C9 F606[0100]80 testopt [options2], opt2_re_cancel_tpg 0 000088CE 7501 jnz @F 1653 0 000088D0 C3 retn 1655 1656 @@: 1657 %ifn _RH 1658 call terminate_silent_dump.if_nonnull 1659 %endif 0 000088D1 EBAD jmp .cmd3 1661 1662 1663 .just_dumpregs: 1664 %if _RH 0 000088D3 E991F6 jmp rr.r_and_terminate 1666 %endif 1667 %endif 1668 1669 ; DUMPREGS - Dump registers. 1670 ; 1671 ; 16 bit: 8 regs, line break, first 4 segment regs, 1672 ; IP, flags 1673 ; 32 bit: 6 regs, line break, 2 regs, flags, line break, 1674 ; 6 segment regs, EIP 1675 ; 16 bit / 40-column mode: 5 regs, line break, 4 segment regs, 1676 ; SP, line break, IP, SI, DI, shorter flags display 1677 ; CHG: ax, bx, cx, dx, di, si 1678 dumpregs: 1679 %if _RH 0 000088D6 E8C201 call enable_rh 1681 %endif 1682 1683 %if _IMMASM 0 000088D9 E80300 call dumpregs_no_disasm 0 000088DC E9EC00 jmp dumpregs_disasm 1686 1687 1688 dumpregs_no_disasm: section_of_function 1689 %endif 1690 %if _REGSLINEBREAK 0 000088DF F606[0200]40 testopt [options2], opt2_r_linebreak_always 0 000088E4 7521 jnz @F 0 000088E6 F606[0300]80 testopt [options6], opt6_r_linebreak_conditional 0 000088EB 7420 jz @FF 0 000088ED F606[0000]10 testopt [serial_flags], sf_use_serial 1696 ; serial ? 0 000088F2 7519 jnz @FF ; yes --> 0 000088F4 E8[0000] call InDOS_or_BIOS_output 0 000088F7 7414 jz @FF 0 000088F9 B403 mov ah, 3 0 000088FB 8A3E[0000] mov bh, byte [vpage] 0 000088FF 31D2 xor dx, dx ; pre-initialise to zero 0 00008901 CD10 int 10h ; dl = column, dh = row 0 00008903 84D2 test dl, dl 0 00008905 7406 jz @FF 1706 @@: 0 00008907 BA[0000] mov dx, crlf 0 0000890A E8[0000] call putsz 1709 @@: 1710 %endif 1711 %if _REGSHIGHLIGHT 0 0000890D F606[0200]08 testopt [options3], opt3_r_highlight_eip 0 00008912 750C jnz @F 0 00008914 A1[0000] mov ax, word [reg_eip] 1715 %if _LINK 0 00008917 A3[0000] mov word [reg_eip], ax 1717 wlcalc word_minusext_regs, equ $ - 2 1718 wlcalc word_ext_regs_prior, equ $ - 2 1719 %if _PM 0 0000891A A1[0200] mov ax, word [reg_eip + 2] 0 0000891D A3[0200] mov word [reg_eip + 2], ax 1722 wlcalc word_minusext_regs, equ $ - 2 1723 wlcalc word_ext_regs_prior, equ $ - 2 1724 %endif 1725 %else 1726 mov word [reg_eip - regs + regs_prior], ax 1727 %if _PM 1728 mov ax, word [reg_eip + 2] 1729 mov word [reg_eip + 2 - regs + regs_prior], ax 1730 %endif 1731 %endif 1732 @@: 1733 %endif 1734 0 00008920 BE[0000] mov si, reg16names 0 00008923 BF[0000] mov di, line_out 0 00008926 B90800 mov cx, 8 ; display all 8 standard regs (16-bit) 0 00008929 F606[0000]01 testopt [options], dispregs32 0 0000892E 7404 jz .firstrow16 0 00008930 B106 mov cl, 6 ; room for 6 standard regs (32-bit) only 1741 %if _40COLUMNS 0 00008932 EB4D jmp .firstrow_not40 1743 %endif 1744 .firstrow16: 1745 %if _40COLUMNS 0 00008934 F606[0100]10 testopt [options6], opt6_40_columns 0 00008939 7446 jz .firstrow_not40 0 0000893B B104 mov cl, 4 0 0000893D 57 push di 0 0000893E E87201 call dmpr1 ; ax, bx, cx, dx 0 00008941 46 inc si 0 00008942 46 inc si ; skip sp 0 00008943 41 inc cx ; = 1 0 00008944 E86C01 call dmpr1 ; bp 0 00008947 E8[0000] call trimputs 0 0000894A 5F pop di 0 0000894B 57 push di 0 0000894C BE[1600] mov si, reg16names + 11 * 2 ; cs 0 0000894F B90100 mov cx, 1 0 00008952 E85E01 call dmpr1 0 00008955 BE[1000] mov si, reg16names + 8 * 2 ; ds, es, ss 0 00008958 B103 mov cl, 3 0 0000895A E85601 call dmpr1 0 0000895D BE[0800] mov si, reg16names + 4 * 2 ; sp 0 00008960 41 inc cx 0 00008961 E84F01 call dmpr1 0 00008964 E8[0000] call trimputs 0 00008967 5F pop di 0 00008968 BE[1C00] mov si, reg16names + 14 * 2 ; ip 0 0000896B B90100 mov cx, 1 0 0000896E E84201 call dmpr1 0 00008971 BE[0C00] mov si, reg16names + 6 * 2 ; si, di 0 00008974 B102 mov cl, 2 0 00008976 E83A01 call dmpr1 0 00008979 E89B02 call dmpshortflags 0 0000897C E82E02 call dmpflags.40 0 0000897F EB3B jmp .lastrowdone 1778 1779 %endif 1780 .firstrow_not40: 0 00008981 9C pushf 0 00008982 57 push di 0 00008983 E82D01 call dmpr1 ; display first row 0 00008986 E8[0000] call trimputs 0 00008989 5F pop di ; (reset di) 0 0000898A 9D popf ; (reset ZF) 0 0000898B 7515 jnz .secondrow32 0 0000898D B90400 mov cx, 4 ; display 4 segment regs 0 00008990 E82001 call dmpr1 0 00008993 83C604 add si, byte 2*2 ; skip FS+GS 0 00008996 41 inc cx ; (= 1) 0 00008997 E81901 call dmpr1 ; display IP 0 0000899A E88501 call stosb_if_rr_compat ; third blank if MS Debug compat 0 0000899D E80702 call dmpflags ; display flags in 16-bit display 0 000089A0 EB1A jmp short .lastrowdone 1796 .secondrow32: 0 000089A2 57 push di 0 000089A3 B90200 mov cx, 2 ; display rest of 32-bit standard regs 0 000089A6 E80A01 call dmpr1 0 000089A9 56 push si 0 000089AA E8FA01 call dmpflags ; display flags in 32-bit display 0 000089AD E8[0000] call putsline_crlf 0 000089B0 5E pop si 0 000089B1 5F pop di ; (reset di) 0 000089B2 B90600 mov cx, 6 ; display all segment registers 0 000089B5 E8FB00 call dmpr1 0 000089B8 41 inc cx ; (= 1) 0 000089B9 E8F700 call dmpr1 ; display EIP 1809 .lastrowdone: 0 000089BC E8[0000] call trimputs 1811 1812 %if _REGSHIGHLIGHT 0 000089BF BE[0000] mov si, regs 0 000089C2 BF[0000] mov di, regs_prior 0 000089C5 B9[0000] mov cx, regs_prior.size_w 0 000089C8 F3A5 rep movsw ; update prior regs save area 1817 %endif 1818 %if _IMMASM 0 000089CA C3 retn 1820 1821 1822 dumpregs_disasm: 1823 %endif 1824 %if !_LOADER 1825 ; Set U address to CS:(E)IP. 0 000089CB BE[0000] mov si, reg_eip 0 000089CE BF[0000] mov di, u_addr 0 000089D1 A5 movsw ; first word of saOffset 1829 %if saSegSel == 4 0 000089D2 A5 movsw ; second word of saOffset 1831 %endif 0 000089D3 A1[0000] mov ax, word [reg_cs] 0 000089D6 AB stosw ; saSegSel 1834 %if _PM 0 000089D7 E8[0000] call ispm 0 000089DA 7501 jnz .86m 1837 .pm: 0 000089DC AF scasw ; skip saSegment, sto to saSelector 1839 .86m: 0 000089DD AB stosw ; (if jumped to .86m) saSegment 1841 @@: 1842 %endif 1843 0 000089DE B80300 mov ax, DIS_F_REPT | DIS_F_SHOW 0 000089E1 F606[0300]10 testopt [options], rr_disasm_no_rept 0 000089E6 7402 jz @F 0 000089E8 24FE and al, ~ DIS_F_REPT 1848 @@: 0 000089EA F606[0300]20 testopt [options], rr_disasm_no_show 0 000089EF 7402 jz @F 0 000089F1 24FD and al, ~ DIS_F_SHOW 1852 @@: 0 000089F3 A3[0000] mov word [disflags], ax 0 000089F6 E8[0000] call disasm 1855 1856 ; Set ABO to address after the dumpregs disassembly. 0 000089F9 BF[0000] mov di, behind_r_u_addr 0 000089FC BE[0000] mov si, u_addr 0 000089FF A5 movsw ; first word of saOffset 1860 %if saSegSel == 4 0 00008A00 A5 movsw ; second word of saOffset 1862 %endif 0 00008A01 A5 movsw ; saSegSel 1864 %if _PM 0 00008A02 A5 movsw ; saSegment 0 00008A03 A5 movsw ; saSelector 1867 %endif 1868 %ifn _LINK 1869 %if (behind_r_u_addr + SEGADR_size) != u_addr 1870 %error Expected u_addr behind behind_r_u_addr 1871 ; mov di, u_addr 1872 %endif 1873 %endif 1874 ; Reset U offset to (E)IP. 0 00008A04 BE[0000] mov si, reg_eip 0 00008A07 A5 movsw ; first word of saOffset 0 00008A08 A5 _386_PM movsw ; second word of saOffset 1878 1879 1880 %if _ACCESS_VARIABLES_AMOUNT 1881 dumpregs_set_access_variables: 0 00008A09 31C0 xor ax, ax 0 00008A0B BF[1400] mov di, reading_access_variables 0 00008A0E B92000 mov cx, words(_ACCESS_VARIABLES_AMOUNT * 8 * 2) 0 00008A11 F3AB rep stosw 1886 0 00008A13 8B0E[0000] mov cx, [memrefs.free] 0 00008A17 E349 jcxz .none 0 00008A19 31F6 xor si, si 1890 .loop: 0 00008A1B 89F3 mov bx, si 0 00008A1D E8[0000] call get_memref_index_bx 0 00008A20 8B87[0A00] mov ax, word [memrefs + bx + mrFlags] 0 00008A24 A801 test al, mrfBranchDirect 0 00008A26 7537 jnz .next 0 00008A28 31D2 xor dx, dx ; 0 = reading 0 00008A2A A840 test al, mrfStringSource 0 00008A2C 751C jnz .gotmsg 0 00008A2E 42 inc dx ; 1 = writing 0 00008A2F A880 test al, mrfStringDest 0 00008A31 7517 jnz .gotmsg 0 00008A33 88C2 mov dl, al 0 00008A35 80E20C and dl, mrfMemSource | mrfMemDest 0 00008A38 80FA0C cmp dl, mrfMemSource | mrfMemDest 0 00008A3B B202 mov dl, 2 ; 2 = r/w 0 00008A3D 740B je .gotmsg 0 00008A3F 31D2 xor dx, dx ; 0 = reading 0 00008A41 A804 test al, mrfMemSource 0 00008A43 7505 jnz .gotmsg 0 00008A45 42 inc dx ; 1 = writing 0 00008A46 A808 test al, mrfMemDest 1912 ; jnz .gotmsg 0 00008A48 7415 jz .next 1914 .gotmsg: 1915 0 00008A4A 84D2 test dl, dl 0 00008A4C 740B jz .read 1918 1919 .write: 0 00008A4E BF[3400] mov di, writing_access_variables 0 00008A51 E80F00 call add_access_variable 0 00008A54 80FA01 cmp dl, 1 0 00008A57 7406 je .next 1924 1925 .read: 0 00008A59 BF[1400] mov di, reading_access_variables 0 00008A5C E80400 call add_access_variable 1928 1929 .next: 0 00008A5F 46 inc si 0 00008A60 E2B9 loop .loop 1932 .none: 1933 %endif 1934 %endif 0 00008A62 C3 retn 1936 1937 1938 %if _ACCESS_VARIABLES_AMOUNT 1939 add_access_variable: 0 00008A63 93 xchg ax, bx 0 00008A64 31DB xor bx, bx 1942 .loop: 0 00008A66 83790400 cmp word [di + bx + 4], 0 0 00008A6A 7525 jne .next 0 00008A6C 83790600 cmp word [di + bx + 4 + 2], 0 0 00008A70 751F jne .next 0 00008A72 93 xchg ax, bx 0 00008A73 FFB7[0200] push word [memrefs + bx + mrLinear + 2] 0 00008A77 FFB7[0000] push word [memrefs + bx + mrLinear] 0 00008A7B FFB7[0E00] push word [memrefs + bx + mrLength + 2] 0 00008A7F FFB7[0C00] push word [memrefs + bx + mrLength] 0 00008A83 93 xchg ax, bx 0 00008A84 8F4104 pop word [di + bx + 4] 0 00008A87 8F4106 pop word [di + bx + 4 + 2] 0 00008A8A 8F01 pop word [di + bx] 0 00008A8C 8F4102 pop word [di + bx + 2] 0 00008A8F 93 xchg ax, bx 0 00008A90 C3 retn 1959 1960 .next: 0 00008A91 83C308 add bx, 8 0 00008A94 83FB20 cmp bx, _ACCESS_VARIABLES_AMOUNT * 8 0 00008A97 72CD jb .loop 0 00008A99 93 xchg ax, bx 0 00008A9A C3 retn 1966 1967 1968 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 1968 ------------------ note: usesection lDEBUG_DATA_ENTRY 1969 align 4, db 0 1970 reading_access_variables: 0 00006F28 00 times _ACCESS_VARIABLES_AMOUNT * 8 db 0 1972 1973 writing_access_variables: 0 00006F48 00 times _ACCESS_VARIABLES_AMOUNT * 8 db 0 1975 1976 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 1976 ------------------ note: usesection lDEBUG_CODE 1977 %endif 1978 1979 1980 %if _RH 1981 enable_rh: 0 00008A9B F606[0200]10 testopt [options6], opt6_rh_mode 0 00008AA0 7405 jz @F 0 00008AA2 800E[0200]10 setopt [internalflags6], dif6_rh_mode ; NZ 1985 @@: 0 00008AA7 C3 retn 1987 1988 enable_rh_2: 0 00008AA8 E8F0FF call enable_rh 0 00008AAB 74FA jz @B 0 00008AAD 800E[0200]20 setopt [internalflags6], dif6_rh_mode_2 0 00008AB2 C3 retn 1993 %endif 1994 1995 1996 ; Function to display multiple register entries. 1997 ; 1998 ; INP: [options]&dispregs32 = whether to display 32-bit registers, 1999 ; except segment registers which are always 16-bit 2000 ; si-> 2-byte register name in table 2001 ; cx = number of registers to display 2002 ; OUT: si-> register name in table after the last one displayed 2003 ; cx = 0 2004 ; al = 32 2005 ; CHG: bx, ah, dx 2006 dmpr1: 2007 .: 2008 %if _LINK 0 00008AB3 8D9C[0000] lea bx, [word si + reg16names] 2010 wlcalc word_subr_0, equ $ - 2 2011 %else 2012 lea bx, [si-(reg16names+DATASECTIONFIXUP)] 2013 %endif 0 00008AB7 01DB add bx, bx ; index * 4 0 00008AB9 807C0153 cmp byte [si+1], 'S' ; segment register ? 0 00008ABD 740A je .no_e ; always 16-bit --> (ZR) 0 00008ABF F606[0000]01 testopt [options], dispregs32 ; display 32-bit register ? 0 00008AC4 7403 jz .no_e ; no --> (ZR) 0 00008AC6 B045 mov al, 'E' 0 00008AC8 AA stosb ; store E for Exx register name 2021 .no_e: 0 00008AC9 A5 movsw ; store register name, increase pointer 0 00008ACA B03D mov al, '=' 0 00008ACC AA stosb ; store equality sign 0 00008ACD 742E jz .no_high ; (ZF left from before) 2026 2027 %if _REGSHIGHLIGHT 0 00008ACF 8026[0200]FE clropt [internalflags3], dif3_highlighting 0 00008AD4 8B87[0200] mov ax, word [regs + bx + 2] 0 00008AD8 8B97[0200] mov dx, word [regs_prior + bx + 2] 0 00008ADC F606[0200]04 testopt [options3], opt3_r_highlight_full 0 00008AE1 7417 jz @F 0 00008AE3 39C2 cmp dx, ax 0 00008AE5 7510 jne .highlighthigh 0 00008AE7 52 push dx 0 00008AE8 50 push ax 0 00008AE9 8B87[0000] mov ax, word [regs + bx] 0 00008AED 8B97[0000] mov dx, word [regs_prior + bx] 0 00008AF1 39C2 cmp dx, ax 0 00008AF3 58 pop ax 0 00008AF4 5A pop dx 0 00008AF5 7403 je @F 2043 .highlighthigh: 0 00008AF7 E83F00 call highlight 2045 @@: 0 00008AFA E86A00 call hexword_diff ; store high word (only if 32-bit register) 2047 .no_high: 0 00008AFD 8B87[0000] mov ax, word [regs + bx] 0 00008B01 8B97[0000] mov dx, word [regs_prior + bx] 0 00008B05 F606[0200]04 testopt [options3], opt3_r_highlight_full 0 00008B0A 7407 jz @F 0 00008B0C 39C2 cmp dx, ax 0 00008B0E 7403 je @F 0 00008B10 E82600 call highlight 2055 @@: 0 00008B13 E85100 call hexword_diff ; store low word 2057 0 00008B16 E83700 call unhighlight 2059 %else 2060 mov ax, word [regs + bx + 2] 2061 call hexword ; store high word (only if 32-bit register) 2062 .no_high: 2063 mov ax, word [regs + bx] 2064 call hexword ; store low word 2065 %endif 2066 0 00008B19 B020 mov al, 32 0 00008B1B AA stosb ; store space 0 00008B1C E80300 call stosb_if_rr_compat ; another blank if MS Debug compat 0 00008B1F E292 loop . 0 00008B21 C3 retn 2072 ; Note: This code doesn't use 386+ registers to display our internal 2073 ; variables for these. Currently, setting the RX bit of options 2074 ; will display the 32-bit variables even on non-386 machines. 2075 ; Changing this code to require EAX would require changes to our 2076 ; check too. 2077 ; 32-bit code probably wouldn't be much shorter than the current 2078 ; implementation as well. 2079 2080 2081 ; INP: al = what to store (32) 2082 ; option flags for R compat, RX, and 40-column mode 2083 ; es:di -> where to store 2084 ; OUT: stored if the flags are right 2085 ; di updated if stored 2086 ; CHG: - 2087 ; STT: ds = ss 2088 ; UP 2089 stosb_if_rr_compat: 0 00008B22 F606[0200]08 testopt [options2], opt2_rr16_compat 0 00008B27 740F jz .ret 0 00008B29 F606[0000]01 testopt [options], dispregs32 0 00008B2E 7508 jnz .ret 2094 %if _40COLUMNS 0 00008B30 F606[0100]10 testopt [options6], opt6_40_columns 0 00008B35 7501 jnz .ret 2097 %endif 0 00008B37 AA stosb 2099 .ret: 0 00008B38 C3 retn 2101 2102 2103 %if _REGSHIGHLIGHT 2104 highlight: 0 00008B39 F606[0200]01 testopt [internalflags3], dif3_highlighting 0 00008B3E 750F jnz @F 0 00008B40 800E[0200]01 setopt [internalflags3], dif3_highlighting 0 00008B45 56 push si 0 00008B46 51 push cx 0 00008B47 BE[0000] mov si, msg.highlight 0 00008B4A E8[0000] call copy_single_counted_string 0 00008B4D 59 pop cx 0 00008B4E 5E pop si 2114 @@: 0 00008B4F C3 retn 2116 2117 unhighlight: 0 00008B50 F606[0200]01 testopt [internalflags3], dif3_highlighting 0 00008B55 740F jz @F 0 00008B57 8026[0200]FE clropt [internalflags3], dif3_highlighting 0 00008B5C 56 push si 0 00008B5D 51 push cx 0 00008B5E BE[0000] mov si, msg.unhighlight 0 00008B61 E8[0000] call copy_single_counted_string 0 00008B64 59 pop cx 0 00008B65 5E pop si 2127 @@: 0 00008B66 C3 retn 2129 2130 hexword_diff: 0 00008B67 F606[0200]01 testopt [options3], opt3_r_highlight_diff 0 00008B6C 7407 jz @F 0 00008B6E F606[0200]04 testopt [options3], opt3_r_highlight_full 0 00008B73 7403 jz @FF 2135 @@: 0 00008B75 E9[0000] jmp hexword 2137 2138 @@: 2139 .hexword: 0 00008B78 86C4 xchg al, ah 0 00008B7A 86D6 xchg dl, dh 0 00008B7C E80400 call .hexbyte 0 00008B7F 86C4 xchg al, ah 0 00008B81 86D6 xchg dl, dh 2145 2146 .hexbyte: 0 00008B83 51 push cx 0 00008B84 B104 mov cl, 4 0 00008B86 D2C0 rol al, cl 0 00008B88 D2C2 rol dl, cl 0 00008B8A E80500 call .hexnyb 0 00008B8D D2C0 rol al, cl 0 00008B8F D2C2 rol dl, cl 0 00008B91 59 pop cx 2155 2156 .hexnyb: 0 00008B92 50 push ax 0 00008B93 88D4 mov ah, dl 0 00008B95 250F0F and ax, 0F0Fh 0 00008B98 38E0 cmp al, ah 0 00008B9A 7405 je .unhighlight 2162 .highlight: 0 00008B9C E89AFF call highlight 0 00008B9F EB03 jmp .common 2165 2166 .unhighlight: 0 00008BA1 E8ACFF call unhighlight 2168 .common: 2169 ; INP: original ax on stack, then return near address 2170 ; al = nybble value to display, 0..15 2171 ; es:di -> where to store 2172 ; OUT: es:di incremented 2173 ; ax restored 2174 ; return to near address that was on stack 0 00008BA4 E9[0000] jmp hexnyb.common 2176 %endif 2177 2178 2179 %define extcall nearcall 2180 %define extcallcall nearcall 2181 %imacro internalcoderelocation 0-*.nolist 2182 %endmacro 2183 %imacro internaldatarelocation 0-*.nolist 2184 %endmacro 2185 %imacro linkdatarelocation 0-*.nolist 2186 %endmacro 2187 %define relocated(address) address 2188 %assign ELD 0 2189 2190 %if _RN 2191 %include "rnshared.asm" 2192 %endif 2193 2194 %if _MMXSUPP && _RM 2195 %include "rmshared.asm" 2196 %endif 2197 2198 %undef extcall 2199 %undef extcallcall 2200 %unimacro internalcoderelocation 0-*.nolist 2201 %unimacro internaldatarelocation 0-*.nolist 2202 %unimacro linkdatarelocation 0-*.nolist 2203 %undef relocated 2204 2205 2206 ; DMPFLAGS - Dump flags output. 2207 dmpflags: 2208 %if _40COLUMNS 2209 .80: 2210 %if _LINK 0 00008BA7 55 push bp 0 00008BA8 BD[0000] mov bp, flagbits_for_80 2213 wlcalc word_opext_shl_flagbits_for_shl, equ $ - 2 0 00008BAB EB04 jmp @F 2215 .40: 0 00008BAD 55 push bp 0 00008BAE BD[0000] mov bp, flagbits_for_40 2218 wlcalc word_opext_shl_flagbits_for_shl, equ $ - 2 2219 %else 2220 push bp 2221 mov bp, flagbits_for_80 << flagbits_for_shl 2222 jmp @F 2223 .40: 2224 push bp 2225 mov bp, flagbits_for_40 << flagbits_for_shl 2226 %endif 2227 @@: 2228 %endif 2229 %if _REGSHIGHLIGHT || _REGSREADABLEFLAGS 0 00008BB1 52 push dx 0 00008BB2 53 push bx 2232 %endif 0 00008BB3 BE[0000] mov si, flagbits 0 00008BB6 B9[0000] mov cx, flagbits.amount 0 00008BB9 AD .loop: lodsw 2236 %if _40COLUMNS 0 00008BBA D1E5 shl bp, 1 0 00008BBC 7352 jnc .next 2239 %endif 2240 %if _REGSHIGHLIGHT 2241 %if _LINK 0 00008BBE 8B16[0000] mov dx, word [reg_efl] 2243 wlcalc word_minusext_regs, equ $ - 2 2244 wlcalc word_ext_regs_prior, equ $ - 2 2245 %else 2246 mov dx, word [reg_efl - regs + regs_prior] 2247 %endif 0 00008BC2 21C2 and dx, ax 0 00008BC4 8B1E[0000] mov bx, word [reg_efl] 0 00008BC8 21C3 and bx, ax 0 00008BCA 39DA cmp dx, bx 0 00008BCC 7411 je @F 0 00008BCE F606[0200]05 testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full 0 00008BD3 740A jz @F 0 00008BD5 F606[0200]02 testopt [internalflags3], dif3_do_not_highlight 0 00008BDA 7503 jnz @F 0 00008BDC E85AFF call highlight 2258 @@: 0 00008BDF 85DB test bx, bx 2260 %else 2261 test ax, word [reg_efl] 2262 %endif 2263 2264 2265 %if _LINK 0 00008BE1 8B84[FEFF] mov ax, word [word si+(flagsoff)-2] 2267 wlcalc word_minusext_flagbits, equ $ - 2 2268 %if _REGSREADABLEFLAGS 0 00008BE5 8B9C[FEFF] mov bx, word [word si+(flagsoff_style2)-2] 2270 wlcalc word_minusext_flagbits, equ $ - 2 0 00008BE9 8B94[FEFF] mov dx, word [word si+(flagsoff_style3)-2] 2272 wlcalc word_minusext_flagbits, equ $ - 2 2273 %endif 0 00008BED 740A jz .off ; if not set 0 00008BEF 8B84[FEFF] mov ax, word [word si+(flagson)-2] 2276 wlcalc word_minusext_flagbits, equ $ - 2 2277 %if _REGSREADABLEFLAGS 0 00008BF3 8B9C[FEFF] mov bx, word [word si+(flagson_style23)-2] 2279 wlcalc word_minusext_flagbits, equ $ - 2 0 00008BF7 89DA mov dx, bx 2281 %endif 2282 .off: 2283 %else 2284 %if _LINK_COMPAT 2285 %define FORCEWORD word 2286 %else 2287 %define FORCEWORD 2288 %endif 2289 mov ax, word [FORCEWORD si+(flagsoff-flagbits)-2] 2290 %if _REGSREADABLEFLAGS 2291 mov bx, word [FORCEWORD si+(flagsoff_style2-flagbits)-2] 2292 mov dx, word [FORCEWORD si+(flagsoff_style3-flagbits)-2] 2293 %endif 2294 jz .off ; if not set 2295 mov ax, word [FORCEWORD si+(flagson-flagbits)-2] 2296 %if _REGSREADABLEFLAGS 2297 mov bx, word [FORCEWORD si+(flagson_style23-flagbits)-2] 2298 mov dx, bx 2299 %endif 2300 .off: 2301 %endif 2302 %if _REGSREADABLEFLAGS 0 00008BF9 F606[0300]20 testopt [options6], opt6_r_flags_style2 0 00008BFE 7401 jz @F 0 00008C00 93 xchg ax, bx 2306 @@: 0 00008C01 F606[0300]40 testopt [options6], opt6_r_flags_style3 0 00008C06 7401 jz @F 0 00008C08 92 xchg ax, dx 2310 @@: 2311 %endif 0 00008C09 AB stosw 2313 %if _REGSHIGHLIGHT 0 00008C0A E843FF call unhighlight 2315 %endif 0 00008C0D B020 mov al, 32 0 00008C0F AA stosb 2318 .next: 0 00008C10 E2A7 loop .loop 0 00008C12 4F dec di ; -> last (unnecessary) blank 2321 %if _REGSHIGHLIGHT || _REGSREADABLEFLAGS 0 00008C13 5B pop bx 0 00008C14 5A pop dx 2324 %endif 2325 %if _40COLUMNS 0 00008C15 5D pop bp 2327 %endif 0 00008C16 C3 retn 2329 2330 2331 %if _40COLUMNS 2332 dmpshortflags: 2333 %if _REGSHIGHLIGHT 0 00008C17 52 push dx 0 00008C18 53 push bx 2336 %endif 0 00008C19 BE[0000] mov si, shortflagbits 0 00008C1C B9[0000] mov cx, shortflagbits.amount 0 00008C1F AD .loop: lodsw 2340 %if _REGSHIGHLIGHT 2341 %if _LINK 0 00008C20 8B16[0000] mov dx, word [reg_efl] 2343 wlcalc word_minusext_regs, equ $ - 2 2344 wlcalc word_ext_regs_prior, equ $ - 2 2345 %else 2346 mov dx, word [reg_efl - regs + regs_prior] 2347 %endif 0 00008C24 21C2 and dx, ax 0 00008C26 8B1E[0000] mov bx, word [reg_efl] 0 00008C2A 21C3 and bx, ax 0 00008C2C 39DA cmp dx, bx 0 00008C2E 7411 je @F 0 00008C30 F606[0200]05 testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full 0 00008C35 740A jz @F 0 00008C37 F606[0200]02 testopt [internalflags3], dif3_do_not_highlight 0 00008C3C 7503 jnz @F 0 00008C3E E8F8FE call highlight 2358 @@: 0 00008C41 85DB test bx, bx 2360 %else 2361 test ax, word [reg_efl] 2362 %endif 2363 %if _LINK 0 00008C43 8B84[FEFF] mov ax, word [word si+(shortflagsoff)-2] 2365 wlcalc word_minusext_shortflagbits, equ $ - 2 0 00008C47 7404 jz .off ; if not set 0 00008C49 8B84[FEFF] mov ax, word [word si+(shortflagson)-2] 2368 wlcalc word_minusext_shortflagbits, equ $ - 2 2369 %else 2370 mov ax, word [FORCEWORD si+(shortflagsoff-shortflagbits)-2] 2371 jz .off ; if not set 2372 mov ax, word [FORCEWORD si+(shortflagson-shortflagbits)-2] 2373 %endif 0 00008C4D AA .off: stosb 2375 %if _REGSHIGHLIGHT 0 00008C4E E8FFFE call unhighlight 2377 %endif 0 00008C51 B020 mov al, 32 0 00008C53 AA stosb 2380 .next: 0 00008C54 E2C9 loop .loop 2382 %if _REGSHIGHLIGHT 0 00008C56 5B pop bx 0 00008C57 5A pop dx 2385 %endif 0 00008C58 C3 retn 2387 %endif 2388 2389 2390 %if _OPTIONS || _VARIABLES 2391 dumpvars: 2392 %if _VARIABLES 0 00008C59 BE[0000] mov si, vregs 2394 %endif 0 00008C5C 31DB xor bx, bx 2396 .loop: 0 00008C5E BF[0000] mov di, line_out 0 00008C61 31D2 xor dx, dx 2399 %if _VARIABLES 0 00008C63 B90400 mov cx, 4 0 00008C66 E8B100 call .dump ; display four variables 0 00008C69 43 inc bx ; (would be one off here) 0 00008C6A 56 push si 2404 %else 2405 add bx, byte 4 ; (no motivation to optimize that) 2406 %endif 2407 %if _OPTIONS 2408 %if _VARIABLES 0 00008C6B B020 mov al, 32 0 00008C6D AA stosb ; more blanks inbetween 2411 %endif 0 00008C6E 80FB10 cmp bl, 16 0 00008C71 7439 je .3 0 00008C73 80FB08 cmp bl, 8 0 00008C76 7721 ja .2 0 00008C78 7411 je .1 2417 2418 ; First line, display DCO and DCS 2419 .0: 0 00008C7A B8434F mov ax, "CO" 0 00008C7D BE[0000] mov si, options 0 00008C80 E88600 call .dump_option 0 00008C83 B84353 mov ax, "CS" 0 00008C86 BE[0000] mov si, startoptions 0 00008C89 EB44 jmp short .next 2426 2427 ; Second line, DAO and DAS 2428 .1: 2429 %if !_LOADER 0 00008C8B B8414F mov ax, "AO" 0 00008C8E BE[0000] mov si, asm_options 0 00008C91 E87500 call .dump_option 0 00008C94 B84153 mov ax, "AS" 2434 ; asm_startoptions follows directly behind asm_options 0 00008C97 EB36 jmp short .next 2436 %else 2437 jmp short .nextskip 2438 %endif 2439 2440 ; Third line, DIF and DPI 2441 .2: 0 00008C99 B84946 mov ax, "IF" 0 00008C9C BE[0000] mov si, internalflags 0 00008C9F E86700 call .dump_option 0 00008CA2 B85049 mov ax, "PI" 2446 %if !_LOADER 0 00008CA5 BE[0000] mov si, psp22 0 00008CA8 42 inc dx 0 00008CA9 42 inc dx 0 00008CAA EB23 jmp short .next 2451 %else 2452 inc dx 2453 inc dx 2454 jmp short .nextskip 2455 %endif 2456 2457 ; Fourth line, DPR, DPS (if _PM) and DPP 2458 .3: 0 00008CAC 42 inc dx 0 00008CAD B85052 mov ax, "PR" 0 00008CB0 BE[0000] mov si, pspdbg 0 00008CB3 E85300 call .dump_option 2463 %if _PM 0 00008CB6 31C0 xor ax, ax 0 00008CB8 E8[0000] call ispm 0 00008CBB 7502 jnz .3_rm 0 00008CBD 1E push ds 0 00008CBE A8 db __TEST_IMM8 ; (skip push) 2469 .3_rm: 0 00008CBF 50 push ax 0 00008CC0 B85053 mov ax, "PS" 0 00008CC3 89E6 mov si, sp 0 00008CC5 E84100 call .dump_options 0 00008CC8 58 pop ax 2475 %else 2476 mov ax, 32<<8|32 2477 stosw 2478 stosw 2479 %endif 2480 %if !_LOADER 0 00008CC9 B85050 mov ax, "PP" 0 00008CCC BE[0000] mov si, parent 2483 %else 2484 jmp short .nextskip 2485 %endif 2486 2487 .next: 0 00008CCF E83700 call .dump_options 2489 .nextskip: 2490 %endif 0 00008CD2 53 push bx 0 00008CD3 E8[0000] call putsline_crlf ; display line 0 00008CD6 5B pop bx ; (retain counter) 2494 %if _VARIABLES 0 00008CD7 5E pop si ; (retain pointer to next variable) 2496 %endif 0 00008CD8 80FB10 cmp bl, 16 ; was end ? 0 00008CDB 7581 jne .loop ; no, loop --> 2499 2500 ; done 2501 .mode: 0 00008CDD BA[0000] mov dx, msg.rv_mode.before 0 00008CE0 E8[0000] call putsz 2504 %if _PM 0 00008CE3 E8[0000] call ispm 0 00008CE6 7511 jnz .mode_86m 0 00008CE8 BA[0000] mov dx, msg.rv_mode_dpmi_16 0 00008CEB 8B1E[0000] mov bx, word [reg_cs] 0 00008CEF E8[0000] call test_d_b_bit 0 00008CF2 7412 jz @F 0 00008CF4 BA[0000] mov dx, msg.rv_mode_dpmi_32 0 00008CF7 EB0D jmp @F 2513 2514 .mode_86m: 2515 %endif 0 00008CF9 BA[0000] mov dx, msg.rv_mode_r86m 2517 ; (only 386+ has the V86M so even though smsw ax is a 2518 ; 286 level instruction, so could be used without a 386, 2519 ; we only really need it on a 386+.) 0 00008CFC 0F01E0 _386 smsw ax 0 00008CFF A801 _386 test al, 1 0 00008D01 7403 _386 jz @F 0 00008D03 BA[0000] _386 mov dx, msg.rv_mode_v86m 2524 @@: 0 00008D06 E9[0000] jmp putsz 2526 2527 2528 ; INP: ax = 2-byte option name ('N' will precede this) 2529 ; d[si] = value 2530 ; OUT: si-> behind value 2531 ; cx = 0 2532 ; CHG: ax 2533 .dump_options: 2534 %if _VARIABLES 2535 .dump_option: 0 00008D09 C7052044 mov word [di], " D" 0 00008D0D AF scasw 2538 %else 2539 mov byte [di], ' ' 2540 inc di 2541 .dump_option: 2542 mov byte [di], 'D' 2543 inc di 2544 %endif 0 00008D0E AB stosw 2546 %if _VARIABLES ; falls through otherwise, always count 1 0 00008D0F B90100 mov cx, 1 2548 %if _RSEPARATE 0 00008D12 B600 mov dh, 0 2550 %endif 0 00008D14 EB0E jmp short .dump_one 2552 %endif 2553 2554 %if 0 2555 PM && OPTIONS && VARIABLES 2556 V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 2557 V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 2558 V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 2559 VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPS=0000 DPP=0616 2560 2561 !PM && OPTIONS && VARIABLES 2562 V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 2563 V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 2564 V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 2565 VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPP=0616 2566 2567 !OPTIONS && VARIABLES 2568 V0=00000000 V1=00000000 V2=00000000 V3=00000000 2569 V4=00000000 V5=00000000 V6=00000000 V7=00000000 2570 V8=00000000 V9=00000000 VA=00000000 VB=00000000 2571 VC=00000000 VD=00000000 VE=00000000 VF=00000000 2572 2573 !PM && OPTIONS && !VARIABLES 2574 DCO=00000000 DCS=00000000 2575 DAO=00000000 DAS=00000000 2576 DIF=0000840D DPI=0616:01DE 2577 DPR=0984 DPP=0616 2578 2579 PM && OPTIONS && !VARIABLES 2580 DCO=00000000 DCS=00000000 2581 DAO=00000000 DAS=00000000 2582 DIF=0000840D DPI=0616:01DE 2583 DPR=0984 DPS=0000 DPP=0616 2584 2585 !OPTIONS && !VARIABLES 2586 %endif 2587 %if 0 2588 DCO Debugger Common Options 2589 DCS Debugger Common Startup options 2590 DIF Debugger Internal Flags 2591 DPR Debugger Process (Real-mode segment) 2592 DPS Debugger Process Selector, or zero 2593 DPP Debugger Parent Process 2594 DPI Debugger Parent Interrupt 22h 2595 DAO Debugger Assembler/disassembler Options 2596 DAS Debugger Assembler/disassembler Startup options 2597 %endif 2598 2599 %if _VARIABLES 2600 .dump_loop: 0 00008D16 43 inc bx 0 00008D17 B020 mov al, 32 0 00008D19 AA stosb 2604 .dump: 0 00008D1A B056 mov al, 'V' 0 00008D1C AA stosb 0 00008D1D 88D8 mov al, bl 0 00008D1F E8[0000] call hexnyb 2609 %if _RSEPARATE 0 00008D22 B6FF mov dh, -1 2611 %endif 2612 %endif 2613 .dump_one: 0 00008D24 B03D mov al, '=' 0 00008D26 AA stosb 0 00008D27 AD lodsw 0 00008D28 80FA01 cmp dl, 1 0 00008D2B 7416 je .dumpw 0 00008D2D 50 push ax 0 00008D2E AD lodsw 0 00008D2F 9C pushf 0 00008D30 E8[0000] call hexword 0 00008D33 9D popf ; CF 0 00008D34 7205 jb .nocolon 0 00008D36 B03A mov al, ':' 0 00008D38 AA stosb 2627 %if _RSEPARATE 0 00008D39 EB07 jmp @F 2629 .nocolon: 0 00008D3B 84F6 test dh, dh 0 00008D3D 7903 jns @F 0 00008D3F E8E5F3 call rseparate 2633 @@: 2634 %else 2635 .nocolon: 2636 %endif 0 00008D42 58 pop ax 2638 .dumpw: 0 00008D43 E8[0000] call hexword 2640 %if _VARIABLES 0 00008D46 E2CE loop .dump_loop 2642 %endif 0 00008D48 C3 retn 2644 %endif 2645 2646 2647 dumpallvars: 0 00008D49 AC lodsb 0 00008D4A E8[0000] call chkeol 0 00008D4D BE[0000] mov si, vregs 0 00008D50 31DB xor bx, bx 2652 .loop: 0 00008D52 BF[0000] mov di, line_out 0 00008D55 B90400 mov cx, 4 0 00008D58 31D2 xor dx, dx 0 00008D5A E81500 call .dump ; display four variables 0 00008D5D 43 inc bx ; (would be one off here) 0 00008D5E 85D2 test dx, dx 0 00008D60 7407 jz @F 0 00008D62 56 push si 0 00008D63 53 push bx 0 00008D64 E8[0000] call putsline_crlf ; display line 0 00008D67 5B pop bx ; (retain counter) 0 00008D68 5E pop si ; (retain pointer to next variable) 2665 @@: 0 00008D69 84DB test bl, bl ; was end ? 0 00008D6B 75E5 jnz .loop ; no, loop --> 0 00008D6D C3 retn 2669 2670 .dump_loop: 0 00008D6E 43 inc bx 0 00008D6F B020 mov al, 32 0 00008D71 AA stosb 2674 .dump: 0 00008D72 B056 mov al, 'V' 0 00008D74 AA stosb 0 00008D75 88D8 mov al, bl 0 00008D77 E8[0000] call hexbyte 2679 .dump_one: 0 00008D7A B03D mov al, '=' 0 00008D7C AA stosb 0 00008D7D AD lodsw 0 00008D7E 09C2 or dx, ax 0 00008D80 50 push ax 0 00008D81 AD lodsw 0 00008D82 09C2 or dx, ax 0 00008D84 E8[0000] call hexword 2688 %if _RSEPARATE 0 00008D87 E89DF3 call rseparate 2690 %endif 0 00008D8A 58 pop ax 0 00008D8B E8[0000] call hexword 0 00008D8E E2DE loop .dump_loop 0 00008D90 C3 retn 2695 2696 2697 dumpmemory: 0 00008D91 AC lodsb 0 00008D92 E8[0000] call chkeol 2700 0 00008D95 A1[0000] mov ax, word [code_seg] 2702 %if _PM 0 00008D98 8B16[0000] mov dx, word [code_sel] 2704 %endif 0 00008D9C BE[0000] mov si, msg.vm_codeseg 0 00008D9F E84900 call .line 2707 2708 %if _DUALCODE 0 00008DA2 A1[0000] mov ax, word [code2_seg] 2710 %if _PM 0 00008DA5 8B16[0000] mov dx, word [code2_sel] 2712 %endif 0 00008DA9 BE[0000] mov si, msg.vm_code2seg 0 00008DAC E83C00 call .line 2715 %endif 2716 2717 %if _PM 0 00008DAF A1[0000] mov ax, word [pspdbg] 0 00008DB2 8CD2 mov dx, ss 2720 %else 2721 mov ax, ss 2722 %endif 0 00008DB4 BE[0000] mov si, msg.vm_dataseg 0 00008DB7 E83100 call .line 2725 2726 %if _PM 0 00008DBA A1[0000] mov ax, word [pspdbg] 0 00008DBD 8B16[0000] mov dx, word [cssel] 2729 %else 2730 mov ax, ss 2731 %endif 0 00008DC1 BE[0000] mov si, msg.vm_entryseg 0 00008DC4 E82400 call .line 2734 2735 %if _MESSAGESEGMENT 0 00008DC7 A1[0000] mov ax, word [messageseg] 2737 %if _PM 0 00008DCA 8B16[0000] mov dx, word [messagesel] 2739 %endif 0 00008DCE BE[0000] mov si, msg.vm_messageseg 0 00008DD1 E81700 call .line 2742 %endif 2743 2744 %if _PM 0 00008DD4 A1[0200] mov ax, word [auxbuff_segorsel + soaSegment] 0 00008DD7 8B16[0400] mov dx, word [auxbuff_segorsel + soaSelector] 2747 %else 2748 mov ax, word [auxbuff_segorsel] 2749 %endif 0 00008DDB BE[0000] mov si, msg.vm_auxseg 2751 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00008DDE E80A00 call .line 2753 2754 %if _PM 0 00008DE1 A1[0200] mov ax, word [history.segorsel + soaSegment] 0 00008DE4 8B16[0400] mov dx, word [history.segorsel + soaSelector] 2757 %else 2758 mov ax, word [history.segorsel] 2759 %endif 0 00008DE8 BE[0000] mov si, msg.vm_hisseg 2761 %endif 2762 2763 .line: 0 00008DEB BF[0000] mov di, line_out 0 00008DEE E8[0000] call copy_single_counted_string 0 00008DF1 E8[0000] call hexword 2767 %if _PM 0 00008DF4 E8[0000] call ispm 0 00008DF7 750A jnz @F 0 00008DF9 BE[0000] mov si, msg.vm_selector 0 00008DFC E8[0000] call copy_single_counted_string 0 00008DFF 92 xchg ax, dx 0 00008E00 E8[0000] call hexword 2774 @@: 2775 %endif 0 00008E03 E9[0000] jmp putsline_crlf 2777 2778 2779 dumpprocess: 0 00008E06 AC lodsb 0 00008E07 E8[0000] call chkeol 2782 2783 %if !_LOADER 2784 %if _PM 0 00008E0A E8[0000]EB02[0000] nearcall var_psps_setup 2786 %endif 0 00008E11 E8[0000]EB02[0000] nearcall var_ppr_setup 0 00008E18 E8[0000]EB02[0000] nearcall var_ppi_setup 2789 %endif 2790 2791 %if _BOOTLDR 0 00008E1F BA[0000] mov dx, msg.rvp_boot 2793 %if _APPLICATION || _DEVICE 0 00008E22 F606[0100]40 testopt [internalflags], nodosloaded 0 00008E27 7523 jnz @F 2796 %else 2797 jmp @F 2798 %endif 2799 %endif 2800 2801 %if _DEVICE 2802 %if _APPLICATION 0 00008E29 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00008E2E 740F jz .notdevice 2805 %endif 2806 2807 %if _ATTACH 0 00008E30 BA[0000] mov dx, msg.rvp_device_attached 0 00008E33 F606[0200]40 testopt [internalflags], tsrmode 0 00008E38 7412 jz @F 2811 %endif 0 00008E3A BA[0000] mov dx, msg.rvp_device 2813 %if _APPLICATION 0 00008E3D EB0D jmp @F 2815 %endif 2816 %endif 2817 2818 %if _APPLICATION 2819 .notdevice: 2820 %if _TSR 0 00008E3F BA[0000] mov dx, msg.rvp_tsr 0 00008E42 F606[0200]40 testopt [internalflags], tsrmode 0 00008E47 7503 jnz @F 2824 %endif 0 00008E49 BA[0000] mov dx, msg.rvp_application 2826 %endif 2827 @@: 0 00008E4C E8[0000] call putsz 2829 0 00008E4F BF[0000] mov di, line_out 2831 2832 %if !_LOADER 0 00008E52 A1[0000] mov ax, word [pspdbe] 0 00008E55 BE[0000] mov si, msg.vp_pspsegment 0 00008E58 E85900 call .line 2836 0 00008E5B A1[0000] mov ax, word [psp_parent] 0 00008E5E BE[0000] mov si, msg.vp_parent 0 00008E61 E85000 call .line 2840 0 00008E64 A1[0200] mov ax, word [psp_pra + 2] 0 00008E67 BE[0000] mov si, msg.vp_pra 0 00008E6A E84700 call .line 0 00008E6D B03A mov al, ':' 0 00008E6F AA stosb 0 00008E70 A1[0000] mov ax, word [psp_pra] 0 00008E73 E8[0000] call hexword 2848 2849 %if _PM 0 00008E76 A1[0000] mov ax, word [psp_selector] 0 00008E79 BE[0000] mov si, msg.vp_pspsel 0 00008E7C E83500 call .line 2853 %endif 0 00008E7F E8[0000] call putsline_crlf 2855 %endif 2856 0 00008E82 BF[0000] mov di, line_out 2858 0 00008E85 A1[0000] mov ax, word [pspdbg] 0 00008E88 BE[0000] mov si, msg.vp_dpspsegment 0 00008E8B E82600 call .line 2862 2863 %if !_LOADER 0 00008E8E A1[0000] mov ax, word [parent] 0 00008E91 BE[0000] mov si, msg.vp_dparent 0 00008E94 E81D00 call .line 2867 0 00008E97 A1[0200] mov ax, word [psp22 + 2] 0 00008E9A BE[0000] mov si, msg.vp_dpra 0 00008E9D E81400 call .line 0 00008EA0 B03A mov al, ':' 0 00008EA2 AA stosb 0 00008EA3 A1[0000] mov ax, word [psp22] 0 00008EA6 E8[0000] call hexword 2875 %endif 2876 2877 %if _PM 0 00008EA9 8CD0 mov ax, ss 0 00008EAB BE[0000] mov si, msg.vp_dpspsel 0 00008EAE E80300 call .line 2881 %endif 0 00008EB1 E9[0000] jmp putsline_crlf 2883 2884 .line: 0 00008EB4 E8[0000] call copy_single_counted_string 0 00008EB7 E9[0000] jmp hexword 2887 2888 2889 dumpdevice: 0 00008EBA AC lodsb 0 00008EBB E8[0000] call chkeol 2892 2893 %if _APPLICATION || _BOOTLDR 2894 %if _DEVICE 0 00008EBE F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00008EC3 7507 jnz @F 2897 %endif 0 00008EC5 BA[0000] mov dx, msg.rvd_not_device 0 00008EC8 E8[0000] call putsz 0 00008ECB C3 retn 2901 %endif 2902 2903 %if _DEVICE 2904 @@: 0 00008ECC A1[0200] mov ax, word [device_header_address + 2] 0 00008ECF BE[0000] mov si, msg.rvd_deviceheader 0 00008ED2 E81500 call .line 0 00008ED5 B03A mov al, ':' 0 00008ED7 AA stosb 0 00008ED8 A1[0000] mov ax, word [device_header_address] 0 00008EDB E8[0000] call hexword 2912 0 00008EDE A1[0000] mov ax, word [device_mcb_paragraphs] 0 00008EE1 BE[0000] mov si, msg.rvd_size 0 00008EE4 E80300 call .line 0 00008EE7 E9[0000] jmp putsline_crlf 2917 2918 .line: 0 00008EEA E8[0000] call copy_single_counted_string 0 00008EED E9[0000] jmp hexword 2921 %endif 2922 2923 2924 %if _RH 2925 dumphistory: 0 00008EF0 E8[0000] call guard_re 2927 %if _PM 0 00008EF3 A1[0000] mov ax, word [auxbuff_switchbuffer_size] 2929 %else 2930 xor ax, ax 2931 %endif 0 00008EF6 A3[0000] mov word [auxbuff_start_silent], ax 0 00008EF9 E8[0000] call skipcomma 2934 0 00008EFC C606[0000]00 mov byte [rh_display_with_count], 0 0 00008F01 4E dec si 0 00008F02 BA[0000] mov dx, msg.count 0 00008F05 E8[0000] call isstring? 0 00008F08 7508 jne .not_count 2940 0 00008F0A F616[0000] not byte [rh_display_with_count] 0 00008F0E E8[0000] call skipcomma 0 00008F11 4E dec si 2944 2945 .not_count: 0 00008F12 BA[0000] mov dx, msg.in 0 00008F15 E8[0000] call isstring? 0 00008F18 7557 jne .not_in 2949 0 00008F1A E8[0000] call skipcomma 0 00008F1D 4E dec si 0 00008F1E 56 push si 2953 2954 .in.loop: 0 00008F1F E8[0000] call skipwhite 0 00008F22 4E dec si 2957 0 00008F23 E8[0000]EB02[0000] nearcall get_value_range; OUT: cx:di = from, bx:dx = to 0 00008F2A 7307 jnc @F 0 00008F2C 7502 jnz .error 0 00008F2E E30B jcxz .in.next 2962 .error: 0 00008F30 E9[0000] jmp error 2964 2965 @@: 0 00008F33 E302 jcxz @F 0 00008F35 EBF9 jmp .error 2968 2969 @@: 0 00008F37 85DB test bx, bx 0 00008F39 75F5 jnz .error 2972 2973 .in.next: 2974 @@: 0 00008F3B E8[0000] call skipwh0 0 00008F3E 3C2C cmp al, ',' 0 00008F40 74DD je .in.loop 0 00008F42 E8[0000] call chkeol 0 00008F45 5E pop si 2980 2981 .indo.loop: 0 00008F46 E8[0000] call skipwhite 0 00008F49 4E dec si 2984 0 00008F4A E8[0000]EB02[0000] nearcall get_value_range; OUT: cx:di = from, bx:dx = to 0 00008F51 7213 jc .indo.next 2987 0 00008F53 89D3 mov bx, dx 0 00008F55 89FA mov dx, di 0 00008F57 A8 db __TEST_IMM8 ; (skip dec) 2991 @@: 0 00008F58 4B dec bx 0 00008F59 52 push dx 0 00008F5A 53 push bx 0 00008F5B 56 push si 0 00008F5C E84F00 call .do 0 00008F5F 5E pop si 0 00008F60 5B pop bx 0 00008F61 5A pop dx 0 00008F62 39D3 cmp bx, dx 0 00008F64 77F2 ja @B 3002 3003 .indo.next: 0 00008F66 4E dec si 0 00008F67 E8[0000] call skipwhite 0 00008F6A 3C2C cmp al, ',' 0 00008F6C 74D8 je .indo.loop 3008 .ret: 0 00008F6E C3 retn 3010 3011 .ret_pop: 0 00008F6F 58 pop ax 0 00008F70 C3 retn 3014 3015 3016 .not_in: 0 00008F71 AC lodsb 0 00008F72 E8[0000] call iseol? 0 00008F75 7453 je .simple 0 00008F77 E8[0000]EB02[0000] nearcall getword 0 00008F7E 89D3 mov bx, dx 0 00008F80 E8[0000] call iseol? 0 00008F83 7429 je .one 0 00008F85 E8[0000]EB02[0000] nearcall getword 0 00008F8C E8[0000] call chkeol 0 00008F8F 53 push bx 0 00008F90 E8[0000]EB02[0000] nearcall var_rhcount_setup 3028 ; mov ax, [bx] 0 00008F97 5B pop bx 0 00008F98 53 push bx 0 00008F99 29C3 sub bx, ax ; cmp bx, ax 0 00008F9B 720D jb .several_below ; if bx below amount --> 0 00008F9D 85D2 test dx, dx ; special: zero ? 0 00008F9F 7405 jz .several_first_ax 0 00008FA1 43 inc bx ; how many to hide 3036 ; Can overflow if given FFFFh and 0 in buffer. 3037 ; However, if 0 in buffer then nothing will 3038 ; be displayed regardless where we branch. 0 00008FA2 29DA sub dx, bx ; = how many remain 0 00008FA4 76C9 jbe .ret_pop ; <= 0 remain, do nothing 3041 ; if > 0 remain 3042 .several_first_ax: 0 00008FA6 5B pop bx 0 00008FA7 93 xchg bx, ax 0 00008FA8 4B dec bx 0 00008FA9 A8 db __TEST_IMM8 ; (skip pop) 3047 3048 .several_below: 0 00008FAA 5B pop bx 0 00008FAB 92 xchg ax, dx 0 00008FAC EB10 jmp .several 3052 3053 .do: 3054 .one: 0 00008FAE 53 push bx 0 00008FAF E8[0000]EB02[0000] nearcall var_rhcount_setup 3057 ; mov ax, [bx] 0 00008FB6 5B pop bx 0 00008FB7 39C3 cmp bx, ax 0 00008FB9 73B3 jae .ret 3061 0 00008FBB B80100 mov ax, 1 3063 .several: 0 00008FBE 891E[0000] mov word [rh_count_number], bx 0 00008FC2 43 inc bx 0 00008FC3 891E[0000] mov word [tt_silent_mode_number], bx 0 00008FC7 E9[0000] jmp silence_dump.rh 3068 3069 .simple: 0 00008FCA E8[0000]EB02[0000] nearcall var_rhcount_setup 3071 ; mov ax, [bx] 0 00008FD1 48 dec ax 0 00008FD2 A3[0000] mov word [rh_count_number], ax 0 00008FD5 8326[0000]00 and word [tt_silent_mode_number], 0 0 00008FDA E9[0000] jmp silence_dump.rh.all 3076 %endif 3077 ..@rr_access_end: === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00006F70 ???????? eldhSignature: resb 4 ; "ELD1" 0 00006F74 ?????? resb 3 ; reserved 0 00006F77 ?? resb 1 ; 26 (Ctrl-Z) 0 00006F78 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00006F7C ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00006F7E ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00006F80 ???????? eldhDataOffset: resd 1 0 00006F84 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00006F86 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00006F88 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00006F8A ???????? eldhReserved: resb 4 ; reserved 0 00006F8E ???? 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 00006F90 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00006F94 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00006F98 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00006F9C ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00006F70 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00006F78 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00006F7C ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00006F7E ???? 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 00006F70 ???? 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 00006F72 ???? eldltAmount: resw 1 0 00006F74 ???????? 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 00006F70 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00006F72 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00006F74 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00006F76 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00006F78 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00006F80 ???? 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 00006F70 ???? eldlSignature: resw 1 ; 0E1D1h 0 00006F72 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00006F74 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00006F76 ???? eldlUseLinkHash: resw 1 0 00006F78 ???? eldlDataAmount: resw 1 0 00006F7A ???? eldlDataPrefixes: resw 1 0 00006F7C ???? eldlDataEntries: resw 1 0 00006F7E ???? eldlDataAddresses: resw 1 0 00006F80 ???? eldlCodeAmount: resw 1 0 00006F82 ???? eldlCodePrefixes: resw 1 0 00006F84 ???? eldlCodeEntries: resw 1 0 00006F86 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00006F88 ???? eldlDualAmount: resw 1 0 00006F8A ???? eldlDualPrefixes: resw 1 0 00006F8C ???? eldlDualEntries: resw 1 0 00006F8E ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00006F70 ???? ifKeyword: resw 1 0 00006F72 ???? ifDescription: resw 1 0 00006F74 ???? ifOptions: resw 1 0 00006F76 ???? ifValue: resw 1 0 00006F78 ???? ifTrying: resw 1 0 00006F7A ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00006F70 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00006F74 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00006F78 ???? smName1: resw 1 ; -> first string part 0 00006F7A ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00006F7C ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00006F7E ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00006F80 ???? smBaseNext: resw 1 0 00006F82 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00006F84 ???? smSpecialNext: resw 1 0 00006F86 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00006F70 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00006F71 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00006F72 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00006F70 ???? shHash: resw 1 ; hash value 0 00006F72 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00006F70 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00006F74 ???? xmsmSourceHandle: resw 1 0 00006F76 ???????? xmsmSourceAddress: resd 1 0 00006F7A ???? xmsmDestHandle: resw 1 0 00006F7C ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <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=00F6D0h -> "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 00008FDD E8[0000] call guard_re 0 00008FE0 800E[0000]20 setopt [internalflags2], dif2_gg_again 0 00008FE5 EB17 jmp @F 228 229 ; G command - go. 230 gg: 0 00008FE7 4E dec si 0 00008FE8 4E dec si 0 00008FE9 BA[0000] mov dx, msg.goto 0 00008FEC E8[0000] call isstring? 0 00008FEF 7503E9[0000] je cmd_goto 0 00008FF4 46 inc si 0 00008FF5 AC lodsb 238 0 00008FF6 E8[0000] call guard_re 240 0 00008FF9 8026[0000]DF clropt [internalflags2], dif2_gg_again 242 @@: 0 00008FFE C706[0000][0000] mov word [gg_deferred_message], msg.empty_message 0 00009004 8326[0000]00 and word [bb_deferred_message_in_lineout_behind], 0 245 0 00009009 BB[0000] mov bx, dmycmd 0 0000900C F606[0200]02 testopt [options], gg_no_autorepeat 0 00009011 7503 jnz @F 0 00009013 BB[0000] mov bx, gg_repeat 250 @@: 0 00009016 891E[0000] mov word [lastcmd], bx 252 0 0000901A 800E[0000]08 setopt [internalflags2], dif2_gg_is_gg 0 0000901F 8026[0000]E8 clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 257 0 00009024 FF36[0000] push word [reg_cs] ; save original CS 0 00009028 8F06[0400] pop word [eqladdr+4] 0 0000902C E8691F call parseql ; process =addr 261 0 0000902F F606[0200]01 testopt [options], gg_do_not_skip_bp 0 00009034 752C jnz .do_not_skip_cseip 0 00009036 800E[0000]01 setopt [internalflags2], dif2_gg_is_first 265 0 0000903B 803E[0000]00 cmp byte [eqflag], 0 0 00009040 7508 jne .cseip_take_eql 268 0 00009042 66 _386_PM_o32 ; xor ecx, ecx 0 00009043 31C9 xor cx, cx 0 00009045 E8FF08 call get_cseip_ecx_linear 0 00009048 EB0C jmp .got_cseip 273 274 .cseip_take_eql: 0 0000904A 8B1E[0400] mov bx, word [eqladdr + 4] 0 0000904E 66 _386_PM_o32 ; mov edx, dword [eqladdr] 0 0000904F 8B16[0000] mov dx, word [eqladdr] 0 00009053 E8FD08 call getlinear_d_b 279 .got_cseip: 0 00009056 7303E9[0000] jc error 0 0000905B A3[0000] mov word [gg_first_cseip_linear], ax 0 0000905E 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 00009062 4E dec si 0 00009063 E8[0000] call skipcomma 0 00009066 4E dec si 0 00009067 BA[0000] mov dx, msg.again 0 0000906A E8[0000] call isstring? 0 0000906D 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 0000906F 56 push si 0 00009070 BE[0000] mov si, g_bplist.used_count 0 00009073 31C0 xor ax, ax 0 00009075 AC lodsb ; ax = number of breakpoints set yet 0 00009076 4E dec si ; -> gg breakpoint list 0 00009077 89C1 mov cx, ax 0 00009079 01C9 add cx, cx 0 0000907B 01C9 add cx, cx ; * 4 320 %if BPSIZE == 4 321 %elif BPSIZE == 5 322 add cx, ax ; * 5 323 %elif BPSIZE == 6 324 add cx, ax ; * 5 325 add cx, ax ; * 6 326 %elif BPSIZE == 9 0 0000907D 01C9 add cx, cx ; * 8 0 0000907F 01C1 add cx, ax ; * 9 329 %else 330 %error Unexpected breakpoint size 331 %endif 0 00009081 41 inc cx ; include the count 0 00009082 BF[0000] mov di, while_buffer ; es:di -> WHILE buffer 0 00009085 F3A4 rep movsb ; initialise WHILE buffer list 335 0 00009087 5E pop si ; si -> separator after "AGAIN" keyword 0 00009088 BF[0100] mov di, while_buffer + 1 ; -> first point 0 0000908B 89C1 mov cx, ax 0 0000908D B0CC mov al, 0CCh 0 0000908F E306 jcxz .end 341 .loop: 0 00009091 83C708 add di, BPSIZE - 1 ; -> point content 0 00009094 AA stosb ; initialise breakpoint content 0 00009095 E2FA loop .loop 345 .end: 346 ; es:di -> after last breakpoint in array 0 00009097 E9AC00 jmp gg3 ; parse additional points (do not dec si!) 348 349 @@: 0 0000909A F606[0000]20 testopt [internalflags2], dif2_gg_again 0 0000909F 75CE jnz gg_again 352 353 354 gg_list: 0 000090A1 BA[0000] mov dx, msg.list 0 000090A4 E8[0000] call isstring? 0 000090A7 7403E99400 jne .not 358 0 000090AC AC lodsb 0 000090AD E8[0000] call chkeol 361 0 000090B0 800E[0000]05 setopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip 363 0 000090B5 BE[0000] mov si, g_bplist.bp 0 000090B8 31C9 xor cx, cx 0 000090BA 8A4CFF mov cl, byte [si - 1] 0 000090BD 31DB xor bx, bx 0 000090BF E379 jcxz .none 369 .loop: 0 000090C1 43 inc bx 0 000090C2 51 push cx 0 000090C3 53 push bx 373 0 000090C4 89D8 mov ax, bx ; 1-based index 0 000090C6 BF[0000] mov di, line_out 0 000090C9 E8E407 call ordinalbyte 377 0 000090CC 57 push di 0 000090CD 81EF[0300] sub di, line_out + 1 + 2 380 ; 1 = a digit, 2 = ordinal suffix, 381 ; result = how many additional digits are used 0 000090D1 BA[0000] mov dx, msg.list_bp.first 0 000090D4 01FA add dx, di 0 000090D6 E8[0000] call putsz ; show blanks first 0 000090D9 5F pop di 0 000090DA E8[0000] call putsline 387 0 000090DD E8C604 call gg_bb_lods_bp_linear 389 ; BPSIZE implied 390 0 000090E0 BF[0000] mov di, msg.list_bp.address1 0 000090E3 92 xchg ax, dx 0 000090E4 E8[0000] call hexword 0 000090E7 47 inc di 395 ; mov di, msg.list_bp.address2 0 000090E8 92 xchg ax, dx 0 000090E9 E8[0000] call hexword 398 0 000090EC E88707 call gg_bb_check_is_first 400 ; we set up the dif2_gg_skip_cseip flag, 0 000090EF B9[0000] mov cx, msg.list_bp_not_cseip 402 ; so if CY (do not skip), initialise this 0 000090F2 721C jc .not_cseip 404 ; if NC (do skip), use other string 405 %if _PM 0 000090F4 53 push bx 0 000090F5 8B1E[0000] mov bx, word [reg_cs] 0 000090F9 803E[0000]00 cmp byte [eqflag], 0 0 000090FE 7404 je @F 0 00009100 8B1E[0400] mov bx, word [eqladdr + 4] 411 @@: 0 00009104 E8[0000] call test_d_b_bit 0 00009107 5B pop bx 0 00009108 B9[0000] mov cx, msg.list_bp_cseip_32 0 0000910B 7503 jnz @F ; if 32-bit cs --> 416 %endif 0 0000910D 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 00009110 51 push cx 0 00009111 BF[0000] mov di, line_out 0 00009114 E8[0000] call bp_display_offset ; BPSIZE implied 0 00009117 57 push di 432 %endif 0 00009118 BF[0000] mov di, msg.list_bp.value 0 0000911B AC lodsb ; BPSIZE implied 0 0000911C E8[0000] call hexbyte 436 0 0000911F BA[0000] mov dx, msg.list_bp.second 0 00009122 E8[0000] call putsz 439 440 %if BPSIZE == 6 || BPSIZE == 9 0 00009125 5F pop di 0 00009126 E8[0000] call putsline 0 00009129 59 pop cx 444 %endif 445 0 0000912A BA[0000] mov dx, msg.list_bp.third 0 0000912D E8[0000] call putsz 448 0 00009130 89CA mov dx, cx 0 00009132 E8[0000] call putsz 451 0 00009135 5B pop bx 0 00009136 59 pop cx 0 00009137 E288 loop .loop 455 .end: 456 ; mov dx, msg.list_bp_first_detected 457 ; testopt [internalflags2], dif2_gg_first_detected 458 ; jnz .putsz 0 00009139 C3 retn 460 461 .none: 0 0000913A BA[0000] mov dx, msg.list_bp_none 463 .putsz: 0 0000913D 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 00009140 BF[0000] mov di, while_buffer ; es:di -> WHILE buffer 0 00009143 31C0 xor ax, ax 0 00009145 AA stosb ; counter of saved breakpoints 484 gg3: 485 ; dec si ; don't use skipcomm0 instead - need to restore al 0 00009146 E8[0000] call skipcomma 0 00009149 E8[0000] call iseol? 0 0000914C 7446 je gg4 ; if done --> 489 0 0000914E 4E dec si 0 0000914F BA[0000] mov dx, msg.remember 0 00009152 E8[0000] call isstring? 0 00009155 AC lodsb 0 00009156 7510 jne @F 495 0 00009158 E8[0000] call chkeol 0 0000915B 89F9 mov cx, di ; -> after last point 0 0000915D BE[0000] mov si, while_buffer ; ds:si -> WHILE buffer 0 00009160 29F1 sub cx, si ; = size of list 0 00009162 BF[0000] mov di, g_bplist.used_count 501 ; es:di -> gg breakpoint list 0 00009165 F3A4 rep movsb ; copy list over 0 00009167 C3 retn 504 505 @@: 0 00009168 8B1E[0400] mov bx, word [eqladdr+4]; default segment 0 0000916C E85908 call getlinearaddr ; get linear address into bx:dx (CHG edx) 0 0000916F 7303E9[0000] jc error 0 00009174 803E[0000]10 cmp byte [while_buffer], _NUM_G_BP 0 00009179 7203E9[0000] jae error ; can't store another breakpoint, g_bplist is full --> 0 0000917E 92 xchg ax, dx ; ax = low word 0 0000917F AB stosw 0 00009180 93 xchg ax, bx ; to store high byte/word 514 %if _PM 0 00009181 AB stosw 516 %else 517 stosb ; bits 24-31 (dh) always zero in 21-bit addresses 518 %endif 519 ; BPSIZE implied 520 %if BPSIZE == 6 521 mov ax, word [bp_offset] 522 stosw ; write offset (R86M-only 16-bit) 523 %elif BPSIZE == 9 0 00009182 A1[0000] mov ax, word [bp_offset] 0 00009185 AB stosw 0 00009186 A1[0200] mov ax, word [bp_offset + 2] 0 00009189 AB stosw ; write offset (PM 32-bit) 528 %endif 0 0000918A B0CC mov al, 0CCh 0 0000918C AA stosb ; later filled with the byte read from this address 0 0000918D FE06[0000] inc byte [while_buffer] ; increment count 0 00009191 4E dec si 0 00009192 EBB2 jmp short gg3 534 535 gg4: 0 00009194 89F9 mov cx, di ; -> after last point 0 00009196 BE[0000] mov si, while_buffer ; ds:si -> WHILE buffer 0 00009199 29F1 sub cx, si ; = size of list 0 0000919B BF[0000] mov di, g_bplist.used_count 540 ; es:di -> gg breakpoint list 0 0000919E F3A4 rep movsb ; copy list over 542 543 %if _RH 0 000091A0 E8[0000] call enable_rh 545 %endif 546 0 000091A3 F606[0000]08 testopt [options3], opt3_gg_no_paging 0 000091A8 7405 jz @F 0 000091AA 8026[0000]F7 clropt [internalflags], pagedcommand 550 @@: 551 552 gg5: 0 000091AF E8CE1D call tpg_initialise_empty_auxbuff 554 %if _BREAKPOINTS 0 000091B2 E87104 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 000091B5 BE[0000] mov si, g_bplist.used_count 0 000091B8 31C0 xor ax, ax 0 000091BA AC lodsb ; si-> first point 0 000091BB 89C1 mov cx, ax ; cx = number of saved breakpoints 0 000091BD 51 push cx 0 000091BE E85806 call gg_writepoints ; Store breakpoint bytes in the given locations. 0 000091C1 5A pop dx 570 ; dx = number of points tried to write 571 ; cx = number of points not written 0 000091C2 7342 jnc .points_set ; successful --> 573 574 575 ; Failure to write to a gg breakpoint. Now the fun starts! 0 000091C4 29CA sub dx, cx ; = number of points written 0 000091C6 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 000091C8 83EC40 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 586 ; reserve space for bb error info 587 %endif 0 000091CB 89E5 mov bp, sp ; -> behind gg error info, -> bb error info 0 000091CD 01D2 add dx, dx 0 000091CF 29D4 sub sp, dx ; reserve space for gg error info 0 000091D1 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 000091D2 E84B05 call gg_restorepoints_and_init_error_info 595 %if _BREAKPOINTS 0 000091D5 51 push cx 597 ; Next, restore the bb points. 0 000091D6 B92000 mov cx, _NUM_B_BP + _NUM_SYM_BP 599 ; = index above last one to restore 0 000091D9 E89405 call bb_restorepoints_and_init_error_info 0 000091DC 59 pop cx ; (preserve index of failed gg point) 602 %endif 0 000091DD 58 pop ax 604 0 000091DE E8B301 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 000091E1 89CE mov si, cx 0 000091E3 01F6 add si, si 0 000091E5 01F6 add si, si ; *4 614 %if BPSIZE == 4 615 %elif BPSIZE == 5 616 add si, cx ; * 5 617 %elif BPSIZE == 6 618 add si, cx ; * 5 619 add si, cx ; * 6 620 %elif BPSIZE == 9 0 000091E7 01F6 add si, si ; * 8 0 000091E9 01CE add si, cx ; * 9 623 %else 624 %error Unexpected breakpoint size 625 %endif 0 000091EB 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 000091EF 51 push cx 0 000091F0 FF7402 push word [si + 2] 0 000091F3 FF34 push word [si] ; stack: linear address 0 000091F5 BB0080 mov bx, 8000h ; bh = 80h (gg), 635 ; bl = what we tried to restore (n/a) 0 000091F8 E8A215 call display_breakpoint_failure 0 000091FB 59 pop cx 0 000091FC E80B07 call gg_handlefailedrestore 639 %if _BREAKPOINTS 0 000091FF E8D606 call bb_handlefailedrestore 0 00009202 8D6640 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 00009205 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 00009206 F606[0000]10 testopt [internalflags2], dif2_gg_first_detected 0 0000920B 7503E92501 jz .only_run ; easy case, no cseip point detected --> 663 664 665 ; Enter special mode: Restore cseip breakpoint content. 0 00009210 800E[0000]02 setopt [internalflags2], dif2_gg_skip_non_cseip 667 0 00009215 89D1 mov cx, dx ; = number of points set 669 %if _BREAKPOINTS 0 00009217 83EC40 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 671 %endif 0 0000921A 89E5 mov bp, sp ; -> behind error info 673 %if _NUM_G_BP 0 0000921C 89CA mov dx, cx 0 0000921E 01D2 add dx, dx 0 00009220 29D4 sub sp, dx 0 00009222 E8FB04 call gg_restorepoints_and_init_error_info 678 0 00009225 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 00009227 8026[0000]FD clropt [internalflags2], dif2_gg_skip_non_cseip 686 687 ; Enter special mode: Skip cseip breakpoints. 0 0000922C 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 00009231 E8EF04 call gg_restorepoints 693 694 ; Exit special mode: No longer skip cseip breakpoints. 0 00009234 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 00009239 51 push cx 0 0000923A B92000 mov cx, _NUM_B_BP + _NUM_SYM_BP 0 0000923D E83005 call bb_restorepoints_and_init_error_info 0 00009240 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 00009241 E8C606 call gg_handlefailedrestore 712 %endif 713 %if _BREAKPOINTS 0 00009244 E89106 call bb_handlefailedrestore 715 %endif 716 %if _NUM_G_BP 717 %if _BREAKPOINTS 0 00009247 8D6640 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 0000924A E9[0000] jmp cmd3 726 727 .gg_restore_cseip_success: 728 %if _BREAKPOINTS 0 0000924D B92000 mov cx, (_NUM_B_BP + _NUM_SYM_BP) 730 ; = index above last one to restore 0 00009250 E81D05 call bb_restorepoints_and_init_error_info 0 00009253 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 00009255 8026[0000]FD clropt [internalflags2], dif2_gg_skip_non_cseip 738 739 ; Enter special mode: Skip cseip breakpoints. 0 0000925A 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 0000925F 31C9 xor cx, cx 0 00009261 8A0E[0000] mov cl, byte [g_bplist.used_count] 0 00009265 E8BB04 call gg_restorepoints 0 00009268 51 push cx 749 %endif 0 00009269 B92000 mov cx, _NUM_B_BP + _NUM_SYM_BP 0 0000926C E80405 call bb_restorepoints 752 %if _NUM_G_BP 0 0000926F 59 pop cx 754 %endif 755 756 ; Exit special mode: No longer skip cseip breakpoints. 0 00009270 8026[0000]FB clropt [internalflags2], dif2_gg_skip_cseip 758 0 00009275 EBCA jmp .gg_bb_cseip_fail_common 760 761 @@: 762 ; Success! Now discard the reserved error info. 0 00009277 8D6640 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 0 0000927A E82A08 call resetmode 772 %endif 0 0000927D E83D1D call seteq ; make the = operand take effect 0 00009280 BA0F00 mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 0 00009283 8B1E[0000] mov bx, word [reg_cs] 0 00009287 66 _386_PM_o32 ; mov esi, dword [reg_eip] 0 00009288 8B36[0000] mov si, word [reg_eip] 778 .pp2: 0 0000928C E87B16 call pp16 ; get next instruction byte into AL 0 0000928F BF[0000] mov di, ppbytes 0 00009292 B9[0000] mov cx, PPLEN_ONLY_STRING 782 %if _SYMBOLIC 0 00009295 A2[0000] mov byte [pp_instruction], al 784 %endif 0 00009298 F2AE repne scasb 0 0000929A 7533 jne .not_p ; if not one of these --> 787 %if _LINK_COMPAT 0 0000929C 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 000092A0 A880 test al, PP_PREFIX ; prefix ? 0 000092A2 740E jz .pp3 ; no --> 0 000092A4 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 000092A6 FECA dec dl 0 000092A8 75E2 jnz .pp2 ; if not out of bytes --> 0 000092AA C706[0000][0000] mov word [gg_deferred_message], msg.warnprefix 0 000092B0 EB1D 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: 0 000092B2 E84810 _386_PM call pp_fix32bitflags 0 000092B5 A847 test al, PP_VARSIZ | PP_SIZ_MASK 0 000092B7 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 0 000092BC E8DD11 call pp3_check_symhints 0 000092BF 720E jc .not_p ; trace --> 826 %endif 827 ; jmp short pp11 ; we have a skippable instruction here 828 ; pp11: 0 000092C1 E8[0000] _386_PM call test_d_b_bit 0 000092C4 7504 _386_PM jnz .32 ; full 32-bit offset valid --> 0 000092C6 660FB7F6 _386_PM movzx esi, si ; clear high word here 832 .32: 0 000092CA E8A715 call proceedbreakpoint ; run until the breakpoint is hit 834 ; This call might return modeswitched. 0 000092CD EB03 jmp short @F 836 837 .not_p: 0 000092CF E80B0E call traceone ; call common code 839 @@: 0 000092D2 9C pushf 841 842 ; Exit special mode, do not skip non-cseip breakpoints anymore. 0 000092D3 8026[0000]FD clropt [internalflags2], dif2_gg_skip_non_cseip 844 845 ; Enter special mode: Skip matching/restoring cseip breakpoint. 0 000092D8 800E[0000]04 setopt [internalflags2], dif2_gg_skip_cseip 847 0 000092DD F6C47F test ah, 7Fh ; error happened during proceedbreakpoint ? 0 000092E0 7440 jz @F ; no --> 850 0 000092E2 59 pop cx ; (discard flags on stack) 852 853 %if _NUM_G_BP 0 000092E3 31C9 xor cx, cx 0 000092E5 8A0E[0000] mov cl, byte [g_bplist.used_count] 856 %endif 857 858 %if _BREAKPOINTS 0 000092E9 83EC40 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 860 ; reserve space for bb error info 861 %endif 0 000092EC 89E5 mov bp, sp ; -> behind gg error info, -> bb error info 863 %if _NUM_G_BP 0 000092EE 89CA mov dx, cx 0 000092F0 01D2 add dx, dx 0 000092F2 29D4 sub sp, dx ; reserve space for gg error info 867 %endif 0 000092F4 50 push ax 869 %if _NUM_G_BP 0 000092F5 E82804 call gg_restorepoints_and_init_error_info 871 %endif 872 %if _BREAKPOINTS 0 000092F8 51 push cx 0 000092F9 B92000 mov cx, _NUM_B_BP + _NUM_SYM_BP 0 000092FC E87104 call bb_restorepoints_and_init_error_info 0 000092FF 59 pop cx 877 %endif 878 ; Exit special mode: No longer skip cseip breakpoints. 0 00009300 8026[0000]FB clropt [internalflags2], dif2_gg_skip_cseip 0 00009305 58 pop ax 0 00009306 51 push cx 882 883 %if _PM 0 00009307 E89D07 call resetmode 885 %endif 0 0000930A E88700 call put_deferred_message_silent 887 0 0000930D FF36[0200] push word [tpg_proceed_bp + 2] 0 00009311 FF36[0000] push word [tpg_proceed_bp] 0 00009315 8A1E[0800] mov bl, [tpg_proceed_bp + BPSIZE - 1] 0 00009319 B700 mov bh, 0 ; proceed breakpoint 0 0000931B E87F14 call display_breakpoint_failure 0 0000931E 59 pop cx 0 0000931F E91FFF jmp .gg_bb_cseip_fail_common 895 896 897 @@: 0 00009322 9D popf ; CF 899 0 00009323 7218 jc .after_run ; an unexpected interrupt occured --> 901 0 00009325 E84000 call .after_run_restore ; restore stuff 0 00009328 E88002 call gg_bb_check_hit ; expected interrupt matches our gg or bb ? 0 0000932B 7321 jnc .expectedinterrupt ; yes, handle expected interrupt --> 905 906 907 ; Clear all special modes. Stop specialcasing cseip breakpoint. 0 0000932D 8026[0000]E8 clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 0 00009332 E97AFE 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 00009335 8026[0000]E8 clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 919 0 0000933A E86316 call run ; Now run the program. 921 .after_run: 922 %if _NUM_G_BP || _BREAKPOINTS 0 0000933D E82800 call .after_run_restore 924 0 00009340 E86802 call gg_bb_check_hit 926 .after_gg_bb_check_hit: 0 00009343 7309 jnc .expectedinterrupt 928 %endif ; _NUM_G_BP || _BREAKPOINTS 929 .unexpectedinterrupt: 930 %if _PM 0 00009345 E85F07 call resetmode 932 %endif 0 00009348 E84900 call put_deferred_message_silent 0 0000934B E9500D jmp unexpectedinterrupt ; print messages for unexpected breakpoint and quit. 935 936 %if _NUM_G_BP || _BREAKPOINTS 937 .expectedinterrupt: 0 0000934E E86500 call adjust_cseip_after_breakpoint 939 ; it's one of our breakpoints, adjust (e)ip 940 0 00009351 89C1 mov cx, ax ; handle_bb_* expects flags in cx 0 00009353 50 push ax 0 00009354 50 push ax ; handle_bb_* expects dword counter on stack 0 00009355 E8E109 call handle_bb_hit_pass_match 0 00009358 58 pop ax 0 00009359 58 pop ax ; discard 0 0000935A 7203E950FE 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 0 0000935F E84507 call resetmode 958 %endif 0 00009362 E82F00 call put_deferred_message_silent 960 ; (put bb message after gg_bb_check_hit call) 0 00009365 E91A13 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 00009368 83EC40 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 969 ; reserve space for bb error info 0 0000936B 89E5 mov bp, sp ; -> behind gg error info, -> bb error info 971 %if _NUM_G_BP 0 0000936D 31C9 xor cx, cx 0 0000936F 8A0E[0000] mov cl, byte [g_bplist.used_count] 0 00009373 89CA mov dx, cx 0 00009375 01D2 add dx, dx 0 00009377 29D4 sub sp, dx ; reserve space for gg error info 0 00009379 E8A403 call gg_restorepoints_and_init_error_info 978 ; try restoring gg points, and fill error info 979 %endif 980 %if _BREAKPOINTS 0 0000937C 51 push cx 0 0000937D B92000 mov cx, _NUM_B_BP + _NUM_SYM_BP 983 ; = index above last one to restore 0 00009380 E8ED03 call bb_restorepoints_and_init_error_info 985 ; try restoring bb points, and fill error info 0 00009383 59 pop cx 987 %endif 988 989 %if _PM 0 00009384 E82007 call resetmode 991 %endif 0 00009387 E80A00 call put_deferred_message_silent 993 994 %if _NUM_G_BP 0 0000938A E87D05 call gg_handlefailedrestore 996 ; handle gg point restore failures 997 %endif 998 %if _BREAKPOINTS 0 0000938D E84805 call bb_handlefailedrestore 1000 ; handle bb point restore failures 1001 %endif 1002 %if _NUM_G_BP 1003 %if _BREAKPOINTS 0 00009390 8D6640 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 00009393 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 00009394 BA[0000] mov dx, msg.empty_message 0 00009397 8716[0000] xchg dx, word [gg_deferred_message] 0 0000939B E83B0B call putsz_silent 0 0000939E BA[1C0F] 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 000093A1 57 push di 0 000093A2 31FF xor di, di 0 000093A4 873E[0000] xchg di, word [bb_deferred_message_in_lineout_behind] 0 000093A8 85FF test di, di 0 000093AA 7408 jz @F 0 000093AC 50 push ax 0 000093AD 53 push bx 0 000093AE 51 push cx 0 000093AF FFD2 call dx 0 000093B1 59 pop cx 0 000093B2 5B pop bx 0 000093B3 58 pop ax 1047 @@: 0 000093B4 5F pop di 0 000093B5 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 000093B6 F606[0100]06 testopt [internalflags2], dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust 0 000093BB 7513 jnz .retn 0 000093BD 800E[0100]02 setopt [internalflags2], dif2_tpg_adjusted_cseip 0 000093C2 8B1E[0000] _386_PM mov bx, word [reg_cs] 0 000093C6 E8[0000] _386_PM call resetmode_and_test_d_b_bit 0 000093C9 7401 _386_PM jz .16 ; 16-bit cs --> 0 000093CB 66 _386_PM o32 ; dec dword [reg_eip] 1074 .16: 0 000093CC FF0E[0000] dec word [reg_eip] ; re-execute (restored) opcode one byte in front of this 1076 .retn: 0 000093D0 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 000093D1 5589E5 lenter 0 000093D4 31C0 xor ax, ax 1110 lequ 1, flag_trigger 1111 lequ 2, flag_pass 1112 lequ 4, flag_match 1113 lvar word, flags 0 000093D6 50 push ax 1115 1116 ; Finish up. Check if it was one of _our_ breakpoints. 0 000093D7 813E[0000][0000] cmp word [run_int], int3msg 0 000093DD 7505 jne @F ; if not interrupt 03h --> 1119 1120 ; Get previous cs:eip (where breakpoint was executed if any at all). 0 000093DF E84606 call get_cseip_of_possible_breakpoint 1122 ; dx:ax = linear address of previous cs:eip 1123 ; bx = reg_cs 0 000093E2 EB16 jmp .check 1125 1126 @@: 1127 ; For T/TP/P: if trace interrupt fired just while 1128 ; pointing at a bb point, do match. 0 000093E4 813E[0000][0000] cmp word [run_int], int1msg 0 000093EA 7403E98501 jne .gg9 1131 0 000093EF 800E[0100]04 setopt [internalflags2], dif2_tpg_do_not_adjust 1133 ; remember that we should not adjust 0 000093F4 66 _386_PM_o32 0 000093F5 31C9 xor cx, cx 0 000093F7 E84D05 call get_cseip_ecx_linear 1137 ; get linear of this cs:(e)ip 1138 .check: 0 000093FA 7303E97501 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 000093FF A3[0000] mov word [gg_next_cseip_linear], ax 0 00009402 8916[0200] mov word [gg_next_cseip_linear + 2], dx 1145 0 00009406 87DA xchg bx, dx 0 00009408 91 xchg cx, ax ; bx:cx = linear address of previous cs:eip 0 00009409 31C0 xor ax, ax 1149 .loop: 0 0000940B 53 push bx 0 0000940C 50 push ax 0 0000940D E8[0000] call calcpointbit ; bx = index, ah = value 0 00009410 84A7[0000] test byte [b_bplist.used_mask+bx], ah 1154 ; (NC) 0 00009414 7503E94901 jz .next 0 00009419 84A7[0000] test byte [b_bplist.disabled_mask+bx], ah 1157 ; (NC) 0 0000941D 7403E94001 jnz .next 0 00009422 58 pop ax 0 00009423 5B pop bx 0 00009424 53 push bx 0 00009425 50 push ax 0 00009426 89C6 mov si, ax 0 00009428 01F6 add si, si 0 0000942A 01F6 add si, si 1166 %if BPSIZE == 4 1167 %elif BPSIZE == 5 1168 add si, ax 1169 %elif BPSIZE == 6 1170 add si, ax ; * 5 1171 add si, ax ; * 6 1172 %elif BPSIZE == 9 0 0000942C 01F6 add si, si ; * 8 0 0000942E 01C6 add si, ax ; * 9 1175 %else 1176 %error Unexpected breakpoint size 1177 %endif 0 00009430 81C6[0000] add si, b_bplist.bp ; -> point 1179 0 00009434 E86F01 call gg_bb_lods_bp_linear 1181 0 00009437 E83C04 call gg_bb_check_is_first 0 0000943A 7203E92301 jnc .next 1184 0 0000943F 39C8 cmp ax, cx 0 00009441 7403E91C01 jne .next 0 00009446 39DA cmp dx, bx 0 00009448 7403E91501 jne .next 1189 1190 .hit: 0 0000944D 58 pop ax 0 0000944E 50 push ax 1193 0 0000944F 804EFE04 or byte [bp + ?flags], ?flag_match 1195 1196 %if _SYMBOLIC 0 00009453 83F810 cmp ax, _NUM_B_BP ; is it a symbol breakpoint ? 0 00009456 7209 jb @F ; no --> 1199 1200 ; skip WHEN and counter handling for symbol breakpoints 0 00009458 F646FE01 test byte [bp + ?flags], ?flag_trigger 1202 ; triggered yet ? 0 0000945C 7457 jz .setup_trigger ; no, trigger now --> 0 0000945E E90101 jmp .next ; yes, ignore --> 1205 1206 @@: 1207 %endif 0 00009461 89C7 mov di, ax 0 00009463 01FF add di, di 1210 0 00009465 8BB5[0000] mov si, [b_bplist.when + di] 1212 ; si -> condition 0 00009469 85F6 test si, si ; any ? 0 0000946B 7426 jz @F ; no --> 1215 %if _PM 0 0000946D E83706 call resetmode 1217 %endif 0 00009470 FF36[0000] push word [rc] 0 00009474 8F06[0000] pop word [priorrc] 0 00009478 AC lodsb 0 00009479 E8[0000]EB02[0000] nearcall getexpression ; parse stored expression 0 00009480 E8[0000] call chkeol 0 00009483 E8[0000]EB02[0000] nearcall toboolean ; get boolean 0 0000948A 85D2 test dx, dx ; true ? 0 0000948C 7503E9D100 jz .next ; no, skip --> 0 00009491 58 pop ax 0 00009492 50 push ax 1228 @@: 1229 0 00009493 8D9D[0000] lea bx, [b_bplist.counter + di] 1231 ; word [bx] = this matched point's counter 1232 0 00009497 F646FE03 test byte [bp + ?flags], ?flag_trigger | ?flag_pass 0 0000949B 7413 jz @F ; none set yet ? --> 0 0000949D E8DB00 call step_pass_counter ; step counter even if already matched 0 000094A0 7203E9BD00 jnc .next ; (either is already set, so additional 1237 ; setting of ?flag_pass is skipped) 0 000094A5 F646FE01 test byte [bp + ?flags], ?flag_trigger 0 000094A9 7403E9B400 jnz .next ; (trigger is already set, so skip triggering) 0 000094AE EB05 jmp .setup_trigger ; triggered (after previous pass match) 1241 1242 @@: 0 000094B0 E8C800 call step_pass_counter ; step counter of matched point, no flag yet 0 000094B3 7355 jnc .check_pass ; not triggered, check for pass match --> 1245 1246 .setup_trigger: 1247 ; Trigger! (And the first detected triggering point.) 0 000094B5 804EFE01 or byte [bp + ?flags], ?flag_trigger 1249 0 000094B9 51 push cx 0 000094BA BF[0000] mov di, line_out 0 000094BD BE[0000] mov si, msg.bb_hit.1 1253 %if _SYMBOLIC 0 000094C0 83F810 cmp ax, _NUM_B_BP 0 000094C3 7203 jb @F 0 000094C5 BE[0000] mov si, msg.bb_sym_hit.1 1257 @@: 1258 %endif 0 000094C8 E8D300 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 000094CB 89C2 mov dx, ax 1266 %if _SYMBOLIC 0 000094CD 83F810 cmp ax, _NUM_B_BP 0 000094D0 7208 jb @F 0 000094D2 83E810 sub ax, _NUM_B_BP 0 000094D5 E8[0000] call hexbyte ; store index of this point 0 000094D8 EB13 jmp @FF ; skip counter dump --> 1272 1273 @@: 1274 %endif 1275 ; Store breakpoint index in message. 0 000094DA E8[0000] call hexbyte ; store index of this point 1277 1278 ; Get counter of this breakpoint. 0 000094DD 8B07 mov ax, word [bx] 1280 1281 ; Is it equal to default ? 0 000094DF 3D0080 cmp ax, 8000h 0 000094E2 7409 je @F ; yes, skip --> 1284 0 000094E4 BE[0000] mov si, msg.bb_hit.2.counter 0 000094E7 E8B400 call copy_single_counted_string 1287 ; Now si -> msg.bb_hit.3.counter.no_id 1288 1289 ; Store counter in message. 0 000094EA E8[0000] call hexword 1291 1292 @@: 0 000094ED F606[0000]08 testopt [internalflags2], dif2_gg_is_gg 0 000094F2 7407 jz @F 0 000094F4 F606[0200]08 testopt [options], gg_bb_hit_no_repeat 0 000094F9 EB05 jmp @FF 1297 @@: 0 000094FB F606[0200]10 testopt [options], tp_bb_hit_no_repeat 1299 @@: 0 00009500 7406 jz @F 0 00009502 C706[0000][0000] mov word [lastcmd], dmycmd 1302 @@: 0 00009508 EB1D jmp .trigger_common 1304 1305 1306 .check_pass: 0 0000950A 7456 jz .next ; no pass match ? --> 1308 0 0000950C 804EFE02 or byte [bp + ?flags], ?flag_pass 1310 0 00009510 51 push cx 0 00009511 BF[0000] mov di, line_out 0 00009514 BE[0000] mov si, msg.bb_pass.1 0 00009517 E88400 call copy_single_counted_string 1315 ; Now si -> msg.bb_pass.2 1316 0 0000951A 89C2 mov dx, ax 1318 ; Store breakpoint index in message. 0 0000951C E8[0000] call hexbyte ; store index of this point 1320 0 0000951F E87C00 call copy_single_counted_string 1322 ; Now si -> msg.bb_pass.3.no_id 1323 1324 ; Get counter of this breakpoint. 0 00009522 8B07 mov ax, word [bx] 1326 ; Store counter in message. 0 00009524 E8[0000] call hexword 1328 1329 .trigger_common: 0 00009527 53 push bx 1331 %if _SYMBOLIC 0 00009528 83FA10 cmp dx, _NUM_B_BP ; symbol breakpoint ? 0 0000952B 732C jae @F ; yes, no ID --> 1334 %endif 0 0000952D BBFFFF mov bx, -1 0 00009530 E8[0000] call get_set_id_offset_length 0 00009533 F6C7FC test bh, 63 << 2 ; length nonzero ? 0 00009536 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 00009538 BE[0000] mov si, msg.bb_hitpass_id.short 0 0000953B 80FF74 cmp bh, 29 << 2 ; long ? 0 0000953E 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 00009540 BE[0000] mov si, msg.bb_hitpass_id.long 1350 .trigger_short_id: 1351 0 00009543 E85800 call copy_single_counted_string 0 00009546 88F9 mov cl, bh 0 00009548 D0E9 shr cl, 1 0 0000954A D0E9 shr cl, 1 ; cx = length 0 0000954C 81E3FF03 and bx, 1023 ; bx = offset 0 00009550 8DB7[0000] lea si, [b_bplist.idbuffer + bx] 0 00009554 F3A4 rep movsb 1359 0 00009556 BE[0000] mov si, msg.bb_hitpass_id.after 1361 1362 @@: 0 00009559 5B pop bx 0 0000955A E84100 call copy_single_counted_string 1365 0 0000955D 893E[0000] mov word [bb_deferred_message_in_lineout_behind], di 0 00009561 59 pop cx 1368 1369 .next: 0 00009562 58 pop ax 0 00009563 5B pop bx 1372 0 00009564 40 inc ax 0 00009565 83F820 cmp ax, _NUM_B_BP + _NUM_SYM_BP 0 00009568 7303E99EFE jb .loop 1376 0 0000956D 8B46FE mov ax, word [bp + ?flags] 0 00009570 A807 test al, ?flag_pass | ?flag_trigger | ?flag_match 0 00009572 7503 jnz .return ; (NC) 1380 1381 .gg9: 0 00009574 31C0 xor ax, ax 0 00009576 F9 stc 1384 .return: 0 00009577 89EC5D lleave 0 0000957A 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 0000957B F707FF3F test word [bx], 3FFFh ; is it already at a terminal state ? 0 0000957F 740A jz .no_decrement ; yes, do not further decrement --> 0 00009581 FF0F dec word [bx] ; decrement (to 0/4000h/8000h/C000h) 0 00009583 7417 jz .trigger ; case for decrementing 1 to 0 --> 0 00009585 813F0040 cmp word [bx], 4000h 0 00009589 7411 je .trigger ; case for decrementing 4001h to 4000h 1401 .no_decrement: 0 0000958B 813F0080 cmp word [bx], 8000h ; decrement resulted in 8000h 0 0000958F 740B je .trigger ; or was already in that state? --> 0 00009591 813F00C0 cmp word [bx], 0_C000h 0 00009595 7405 je .trigger ; or C000h --> 1406 .proceed: 0 00009597 F6470140 test byte [bx + 1], 40h ; (NC) ZR if no pass message 0 0000959B C3 retn 1409 1410 .trigger: 0 0000959C F9 stc 0 0000959D 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 0000959E 91 xchg ax, cx 0 0000959F 31C0 xor ax, ax 0 000095A1 AC lodsb 0 000095A2 91 xchg ax, cx 0 000095A3 F3A4 rep movsb 0 000095A5 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 000095A6 AD lodsw 0 000095A7 92 xchg ax, dx 1443 %if _PM 0 000095A8 AD lodsw 1445 %else 1446 xor ax, ax 1447 lodsb 1448 %endif 0 000095A9 92 xchg ax, dx 0 000095AA 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 000095AB E823FE call bb_check_hit 0 000095AE 720D jc .gg_check_hit 1477 0 000095B0 A801 test al, 1 ; actual bb hit ? 0 000095B2 7507 jnz .ret_NC ; yes, return as hit 1480 0 000095B4 50 push ax ; bb is pass match or any other match, 0 000095B5 E80500 call gg_check_hit ; is gg a match ? 0 000095B8 58 pop ax 0 000095B9 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 000095BB F8 clc 0 000095BC 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 000095BD 813E[0000][0000] cmp word [run_int], int3msg 0 000095C3 752D jne .gg9 ; if not interrupt 03h --> 1516 1517 ; Get previous cs:eip (where breakpoint was executed if any at all). 0 000095C5 E86004 call get_cseip_of_possible_breakpoint 1519 ; dx:ax = linear address of previous cs:eip 0 000095C8 7228 jc .gg9 0 000095CA BE[0000] mov si, g_bplist.bp 0 000095CD 31C9 xor cx, cx 0 000095CF 8A4CFF mov cl, byte [si-1] ; number of saved breakpoints 0 000095D2 E31E jcxz .gg9 ; none, so always unexpected --> 1525 0 000095D4 89C7 mov di, ax 0 000095D6 89D3 mov bx, dx ; bx:di = linear address of previous cs:(e)ip 1528 1529 .loop_gg6: 0 000095D8 E8CBFF call gg_bb_lods_bp_linear 1531 0 000095DB E89802 call gg_bb_check_is_first 0 000095DE 730D jnc .next 1534 0 000095E0 39DA cmp dx, bx 0 000095E2 7509 jne .next 0 000095E4 39F8 cmp ax, di 0 000095E6 7505 jne .next 1539 1540 .hit: 0 000095E8 B80700 mov ax, 7 0 000095EB F8 clc 0 000095EC C3 retn 1544 1545 .next: 1546 1547 %if BPSIZE == 4 || BPSIZE == 5 1548 inc si ; skip saved (actually CCh) byte 1549 %elif BPSIZE == 6 1550 add si, 3 ; skip word offset and byte content 1551 %elif BPSIZE == 9 0 000095ED 83C605 add si, 5 ; skip dword offset and byte content 1553 %endif 1554 ; BPSIZE implied 0 000095F0 E2E6 loop .loop_gg6 ; try next if there's any 1556 1557 .gg9: 0 000095F2 31C0 xor ax, ax 0 000095F4 F9 stc 0 000095F5 C3 retn 1561 %endif 1562 1563 1564 %if _DELAY_BEFORE_BP 1565 delay_before_bp: 0 000095F6 F606[0300]04 testopt [options3], opt3_delay_before_bp 0 000095FB 7428 jz .ret 0 000095FD F606[0200]80 testopt [internalflags3], dif3_delayed 0 00009602 7521 jnz .ret 0 00009604 800E[0200]80 setopt [internalflags3], dif3_delayed 0 00009609 06 push es 0 0000960A 57 push di 0 0000960B 50 push ax 0 0000960C BF4000 mov di, 40h ; dual mode segment/selector 0 0000960F 8EC7 mov es, di 0 00009611 268B3E6C00 mov di, word [es:6Ch] 1577 @@: 0 00009616 263B3E6C00 cmp di, word [es:6Ch] 0 0000961B 7505 jne @F 0 0000961D E8[0000] call idle 0 00009620 EBF4 jmp @B 1582 @@: 0 00009622 58 pop ax 0 00009623 5F pop di 0 00009624 07 pop es 1586 .ret: 0 00009625 C3 retn 1588 %endif 1589 1590 1591 %if _BREAKPOINTS 1592 bb_writepoints_init_reset: 0 00009626 BF[0000] mov di, b_bplist.bp 0 00009629 B0CC mov al, 0CCh 0 0000962B B92000 mov cx, _NUM_B_BP + _NUM_SYM_BP 1596 .loop: 0 0000962E 83C708 add di, BPSIZE - 1 0 00009631 AA stosb 0 00009632 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 0 00009634 E8[0000] nearcall zz_detect_xms ; re-detect XMS if used after run 1619 0 00009637 8B16[0000] mov dx, word [sym_storage.main.bb.first] 0 0000963B BB[9000] mov bx, b_bplist.bp + _NUM_B_BP * BPSIZE 0 0000963E B91000 mov cx, _NUM_B_BP 0 00009641 EB55 jmp .sym_condition 1624 1625 .sym_loop: 0 00009643 83F920 cmp cx, _NUM_B_BP + _NUM_SYM_BP 0 00009646 7215 jb .sym_enough 0 00009648 BA[0000] mov dx, msg.bb_sym_too_many 1629 .sym_error_putsz: 0 0000964B E8[0000] call putsz_error 0 0000964E B92000 mov cx, (_NUM_B_BP + _NUM_SYM_BP) 0 00009651 31C0 xor ax, ax 1633 @@: 0 00009653 50 push ax 0 00009654 E2FD loop @B ; dummy bb error info 0 00009656 89E5 mov bp, sp 0 00009658 49 dec cx ; no bb write/restore failure 0 00009659 51 push cx 0 0000965A 51 push cx 0 0000965B EB62 jmp .sym_error_done ; handle error (including pp restore) --> 1641 1642 .sym_enough: 0 0000965D 52 push dx 0 0000965E 50 push ax 0 0000965F E8[0000]EB02[0000] dualcall getfarpointer.main 0 00009666 5F pop di 0 00009667 07 pop es 1648 0 00009668 268B05 mov ax, word [es:di + smLinear] 0 0000966B 8907 mov word [bx], ax ; store low word of linear 0 0000966D 43 inc bx 0 0000966E 43 inc bx 0 0000966F 268B4502 mov ax, word [es:di + smLinear + 2] 1654 %if BPSIZE == 5 || BPSIZE == 9 0 00009673 8907 mov word [bx], ax ; store high word of linear 0 00009675 43 inc bx 0 00009676 43 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 0 00009677 268B4504 mov ax, word [es:di + smOffset] 0 0000967B 8907 mov word [bx], ax ; store low word of offset 0 0000967D 43 inc bx 0 0000967E 43 inc bx 0 0000967F 268B4506 mov ax, word [es:di + smOffset + 2] 1671 %if BPSIZE == 9 0 00009683 8907 mov word [bx], ax ; store high word of offset 0 00009685 43 inc bx 0 00009686 43 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 0 00009687 43 inc bx ; skip content byte 0 00009688 89C8 mov ax, cx 0 0000968A 53 push bx 0 0000968B E8[0000] call calcpointbit 0 0000968E 08A7[0000] or byte [b_bplist.used_mask + bx], ah 0 00009692 5B pop bx 0 00009693 41 inc cx 0 00009694 268B5514 mov dx, word [es:di + smSpecialNext] 1689 1690 .sym_condition: 0 00009698 83FAFF cmp dx, -1 0 0000969B 75A6 jne .sym_loop 1693 0 0000969D EB0C jmp @FF 1695 @@: 0 0000969F 89C8 mov ax, cx 0 000096A1 E8[0000] call calcpointbit 0 000096A4 F6D4 not ah 0 000096A6 20A7[0000] and byte [b_bplist.used_mask + bx], ah 0 000096AA 41 inc cx 1701 @@: 0 000096AB 83F920 cmp cx, _NUM_B_BP + _NUM_SYM_BP 0 000096AE 72EF jb @BB 1704 %endif 1705 0 000096B0 E8D500 call bb_writepoints 0 000096B3 735B jnc .retn 1708 0 000096B5 83EC40 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 1710 ; reserve space for bb error info 0 000096B8 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 000096BA 50 push ax 0 000096BB 51 push cx 0 000096BC 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 000096BF E87210 call proceed_writepoint_restore 1724 ; This call might return modeswitched. 0 000096C2 BB0000 mov bx, 0 ; (preserve CF) 0 000096C5 7305 jnc @F 0 000096C7 80CC80 or ah, 80h ; mark error during restoration 0 000096CA 89C3 mov bx, ax ; bx & 80h set: error restoring pp 1729 @@: 1730 0 000096CC 59 pop cx 0 000096CD 58 pop ax ; error info + index of failed point 1733 0 000096CE 89CE mov si, cx 0 000096D0 01F6 add si, si 0 000096D2 01F6 add si, si ; * 4 1737 %if BPSIZE == 4 1738 %elif BPSIZE == 5 1739 add si, cx ; * 5 1740 %elif BPSIZE == 6 1741 add si, cx ; * 5 1742 add si, cx ; * 6 1743 %elif BPSIZE == 9 0 000096D4 01F6 add si, si ; * 8 0 000096D6 01CE add si, cx ; * 9 1746 %else 1747 %error Unexpected breakpoint size 1748 %endif 0 000096D8 81C6[0000] add si, b_bplist.bp ; -> point 1750 0 000096DC 53 push bx 1752 0 000096DD E8B4FC call put_deferred_message_silent 1754 ; CHG: dx 1755 0 000096E0 83F9FF cmp cx, -1 0 000096E3 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 000096E5 FF7402 push word [si + 2] 0 000096E8 FF34 push word [si] ; stack: linear address 0 000096EA BB0040 mov bx, 4000h ; bh = 40h (bb), 1765 ; bl = what we tried to restore (n/a) 0 000096ED E8AD10 call display_breakpoint_failure 1767 ; This function calls resetmode. 1768 1769 @@: 0 000096F0 E8E501 call bb_handlefailedrestore 1771 ; This function calls resetmode. 1772 0 000096F3 58 pop ax 0 000096F4 F6C480 test ah, 80h ; pp failed to restore ? 0 000096F7 7411 jz @F 1776 0 000096F9 FF36[0200] push word [tpg_proceed_bp + 2] 0 000096FD FF36[0000] push word [tpg_proceed_bp] 0 00009701 8A1E[0800] mov bl, [tpg_proceed_bp + BPSIZE - 1] 0 00009705 B700 mov bh, 0 ; proceed breakpoint 0 00009707 E89310 call display_breakpoint_failure 1782 @@: 0 0000970A 83C440 add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 1784 ; discard bb error info 0 0000970D E9[0000] jmp cmd3 1786 1787 .retn: 0 00009710 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 00009711 16 push ss 0 00009712 07 pop es 0 00009713 89EF mov di, bp ; es:di -> behind error info 0 00009715 51 push cx 0 00009716 4F dec di 0 00009717 4F dec di 0 00009718 31C0 xor ax, ax 0 0000971A FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 0 0000971B F3AB rep stosw ; initialize error info 0 0000971D FC cld 0 0000971E 59 pop cx 0 0000971F C3 retn 1811 1812 1813 gg_restorepoints_and_init_error_info: 0 00009720 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 00009723 89CE mov si, cx 0 00009725 01F6 add si, si 0 00009727 01F6 add si, si ; * 4 1840 %if BPSIZE == 4 1841 %elif BPSIZE == 5 1842 add si, cx ; * 5 1843 %elif BPSIZE == 6 1844 add si, cx ; * 5 1845 add si, cx ; * 6 1846 %elif BPSIZE == 9 0 00009729 01F6 add si, si ; * 8 0 0000972B 01CE add si, cx ; * 9 1849 %else 1850 %error Unexpected breakpoint size 1851 %endif 0 0000972D 81C6[F7FF] add si, g_bplist.bp - BPSIZE ; -> last point in list (first to restore) 1853 0 00009731 F8 clc ; assume success 0 00009732 51 push cx 0 00009733 9C pushf 0 00009734 E329 jcxz .done ; nothing to do --> 1858 .loop: 0 00009736 E8E400 call gg_writepoints_restore ; Restore breakpoint bytes. 0 00009739 7324 jnc .done ; successful --> 0 0000973B 5A pop dx ; discard flags 0 0000973C 5B pop bx 0 0000973D 53 push bx 0 0000973E 9C pushf ; store (CY) flags 1865 0 0000973F 50 push ax 0 00009740 89F7 mov di, si 0 00009742 81EF[0900] sub di, BPSIZE+g_bplist.bp 1869 %if BPSIZE == 5 || BPSIZE == 6 || BPSIZE == 9 0 00009746 89F8 mov ax, di 0 00009748 31D2 xor dx, dx 0 0000974A BF0900 mov di, BPSIZE 0 0000974D F7F7 div di 0 0000974F 89C7 mov di, ax ; di = 0-based point index 0 00009751 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 00009753 29DF sub di, bx 0 00009755 29DF sub di, bx 0 00009757 8F03 pop word [bp+di] ; store error info 0 00009759 49 dec cx ; exclude the failed point 0 0000975A 83EE12 sub si, 2*BPSIZE ; -> the point _before_ failed one 0 0000975D EBD7 jmp short .loop 1887 .done: 0 0000975F 9D popf ; get flags. CY if any couldn't be restored 0 00009760 59 pop cx ; restore cx 0 00009761 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 00009762 16 push ss 0 00009763 07 pop es 0 00009764 89EF mov di, bp 0 00009766 31C0 xor ax, ax 0 00009768 51 push cx 0 00009769 B92000 mov cx, _NUM_B_BP + _NUM_SYM_BP 0 0000976C F3AB rep stosw 0 0000976E 59 pop cx 0 0000976F C3 retn 1913 1914 1915 bb_restorepoints_and_init_error_info: 0 00009770 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 00009773 F8 clc ; assume success 0 00009774 9C pushf 0 00009775 E30F jcxz .done 1942 .loop: 0 00009777 E81400 call bb_writepoints_restore 0 0000977A 730A jnc .done 0 0000977C 5A pop dx ; (discard flags) 0 0000977D 9C pushf ; store (CY) flags 1947 ; cx = index of point that failed to write 1948 ; ah = reason, al = new byte value (reason 3) 0 0000977E 89CF mov di, cx 0 00009780 01FF add di, di 0 00009782 8903 mov word [bp + di], ax ; store error info 0 00009784 EBF1 jmp .loop 1953 1954 .done: 0 00009786 9D popf ; CF 0 00009787 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 00009788 31C9 xor cx, cx 0 0000978A BF0100 mov di, 1 0 0000978D 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 0000978E 31FF xor di, di ; (NC) 1993 bb_wp: 1994 lframe near 0 00009790 5589E5 lenter 1996 lvar word, is_write 0 00009793 57 push di 1998 0 00009794 F646FE01 test byte [bp + ?is_write], 1 2000 ; (NC) is it writing ? 0 00009798 7459 jz .next ; no, is restoring, first decrement cx --> 2002 2003 .loop: 0 0000979A 89C8 mov ax, cx 0 0000979C E8[0000] call calcpointbit ; bx = index, ah = value 0 0000979F 84A7[0000] test byte [b_bplist.used_mask+bx], ah 2007 ; (NC) 0 000097A3 744E jz .next 0 000097A5 84A7[0000] test byte [b_bplist.disabled_mask+bx], ah 2010 ; (NC) 0 000097A9 7548 jnz .next 2012 0 000097AB 89CE mov si, cx 0 000097AD 01F6 add si, si 0 000097AF 01F6 add si, si ; * 4 2016 %if BPSIZE == 4 2017 %elif BPSIZE == 5 2018 add si, cx ; * 5 2019 %elif BPSIZE == 6 2020 add si, cx ; * 5 2021 add si, cx ; * 6 2022 %elif BPSIZE == 9 0 000097B1 01F6 add si, si ; * 8 0 000097B3 01CE add si, cx ; * 9 2025 %else 2026 %error Unexpected breakpoint size 2027 %endif 0 000097B5 81C6[0000] add si, b_bplist.bp ; -> point 2029 0 000097B9 E8EAFD call gg_bb_lods_bp_linear 2031 ; dx:ax = linear address 2032 0 000097BC E8B700 call gg_bb_check_is_first 0 000097BF 7332 jnc .next ; (NC) 2035 0 000097C1 E80803 call getsegmented ; bx:(e)dx = segmented address 2037 %if BPSIZE == 6 2038 lodsw ; skip word offset 2039 %elif BPSIZE == 9 0 000097C4 AD lodsw 0 000097C5 AD lodsw ; skip dword offset 2042 %endif 0 000097C6 AC lodsb ; get byte to write 0 000097C7 B402 mov ah, 2 0 000097C9 723E jc .return ; not in PM anymore/address not available --> (CY) 0 000097CB F646FE01 test byte [bp + ?is_write], 1 2047 ; writing? 0 000097CF 7517 jnz .forward_nocheck ; yes --> 2049 2050 .backward_check: 0 000097D1 50 push ax 0 000097D2 E8[0000] call readmem ; read current byte 0 000097D5 3CCC cmp al, 0CCh ; is this still what we wrote? 0 000097D7 B483 mov ah, 83h ; (80h = error occurred while restoring) 0 000097D9 F9 stc 0 000097DA 752D jne .return_discard ; nope --> (CY) 0 000097DC 58 pop ax 0 000097DD E8[0000] call writemem ; return the byte to its original value 0 000097E0 7211 jc .next ; failed --> (CY, handled there) 0 000097E2 C644FFCC mov byte [si-1], 0CCh ; reset stored point 0 000097E6 EB0B jmp short .next 2062 2063 .forward_nocheck: 2064 %if _DELAY_BEFORE_BP 0 000097E8 E80BFE call delay_before_bp 2066 %endif 0 000097EB E8[0000] call writemem 0 000097EE 7203 jc .next 0 000097F0 8844FF mov byte [si-1], al ; save the previous byte there 2070 .next: 0 000097F3 B401 mov ah, 1 ; (in case of error) 0 000097F5 7212 jc .return ; failed to write --> (CY) 2073 0 000097F7 F646FE01 test byte [bp + ?is_write], 1 0 000097FB 7505 jnz .is_write_next 0 000097FD 49 dec cx ; restore: decrement index 0 000097FE 799A jns .loop ; decremented to 0FFFFh ? no, loop --> 0 00009800 EB06 jmp .return_NC 2079 2080 .is_write_next: 0 00009802 41 inc cx ; write: increment index 0 00009803 83F920 cmp cx, _NUM_B_BP + _NUM_SYM_BP 2083 ; above last ? 0 00009806 7292 jb .loop ; no, loop --> 2085 .return_NC: 0 00009808 F8 clc 2087 .return: 2088 .return_discard: 0 00009809 730A jnc .ret 2090 0 0000980B F646FE01 test byte [bp + ?is_write], 1 2092 ; restoring ? 0 0000980F 7503 jnz .ret_CY ; no --> 0 00009811 80CC80 or ah, 80h ; error occurred while restoring 2095 .ret_CY: 0 00009814 F9 stc 2097 .ret: 0 00009815 89EC5D lleave 0 00009818 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 00009819 BF0100 mov di, 1 0 0000981C 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 0000981D 31FF xor di, di ; (NC) 2131 gg_wp: 0 0000981F E348 jcxz .return ;if nothing to do --> (still NC from xor/test) 2133 .loop: 0 00009821 E882FD call gg_bb_lods_bp_linear 2135 ; dx:ax = linear address 2136 0 00009824 E84F00 call gg_bb_check_is_first 0 00009827 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 2144 add si, 3 ; skip word offset and byte content 2145 %elif BPSIZE == 9 0 00009829 83C605 add si, 5 ; skip dword offset and byte content 2147 %endif 2148 ; BPSIZE implied 2149 0 0000982C 85FF test di, di ; (NC) 0 0000982E 7533 jnz .next ; going forward --> 0 00009830 EB23 jmp .next_lea_si ; (NC) 2153 2154 ; Handle this breakpoint. 2155 @@: 0 00009832 E89702 call getsegmented ; bx:(e)dx = segmented address 2157 %if BPSIZE == 6 2158 lodsw ; skip word offset 2159 %elif BPSIZE == 9 0 00009835 AD lodsw 0 00009836 AD lodsw ; skip dword offset 2162 %endif 0 00009837 AC lodsb ; get byte to write 0 00009838 B402 mov ah, 2 0 0000983A 722D jc .return ; not in PM anymore/address not available --> (CY) 0 0000983C 85FF test di, di ; writing? 0 0000983E 751A jnz .forward_nocheck ; yes --> 2168 2169 .backward_check: 0 00009840 50 push ax 0 00009841 E8[0000] call readmem ; read current byte 0 00009844 3CCC cmp al, 0CCh ; is this still what we wrote? 0 00009846 B483 mov ah, 83h ; (80h = error occurred while restoring) 0 00009848 F9 stc 0 00009849 7529 jne .return_discard ; nope --> (CY) 0 0000984B 58 pop ax 0 0000984C E8[0000] call writemem ; return the byte to its original value 0 0000984F 7212 jc .next ; failed --> (CY, handled there) 0 00009851 C644FFCC mov byte [si-1], 0CCh ; reset stored point 2180 .next_lea_si: 0 00009855 8D74EE lea si, [si-2*BPSIZE] ; adjust (for reverse writing) 0 00009858 EB09 jmp short .next 2183 2184 .forward_nocheck: 2185 %if _DELAY_BEFORE_BP 0 0000985A E899FD call delay_before_bp 2187 %endif 0 0000985D E8[0000] call writemem 0 00009860 8844FF mov byte [si-1], al ; save the previous byte there 2190 .next: 0 00009863 B401 mov ah, 1 ; (in case of error) 0 00009865 7202 jc .return ; failed to write --> (CY) 0 00009867 E2B8 loop .loop 2194 .return: ; (NC) 0 00009869 730A jnc .ret 2196 0 0000986B 85FF test di, di ; restoring ? 0 0000986D 7503 jnz .ret_CY ; no --> 0 0000986F 80CC80 or ah, 80h ; error occurred while restoring 2200 .ret_CY: 0 00009872 F9 stc 0 00009873 52 push dx ; (counteract effect of pop) 2203 .return_discard: 0 00009874 5A pop dx 2205 .ret: 0 00009875 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 00009876 F606[0000]07 testopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 0 0000987B 7418 jz .continue 2228 0 0000987D 3906[0000] cmp [gg_first_cseip_linear], ax 0 00009881 7514 jne .is_not_first 0 00009883 3916[0200] cmp [gg_first_cseip_linear + 2], dx 0 00009887 750E jne .is_not_first 2233 2234 .is_first: 0 00009889 800E[0000]10 setopt [internalflags2], dif2_gg_first_detected 0 0000988E F606[0000]04 testopt [internalflags2], dif2_gg_skip_cseip 0 00009893 7509 jnz .skip 2238 .continue: 0 00009895 F9 stc 0 00009896 C3 retn 2241 2242 .is_not_first: 0 00009897 F606[0000]02 testopt [internalflags2], dif2_gg_skip_non_cseip 0 0000989C 74F7 jz .continue 2245 .skip: 0 0000989E F8 clc 0 0000989F 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 000098A0 53 push bx 0 000098A1 51 push cx 0 000098A2 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 000098A3 BF[0000] mov di, line_out 0 000098A6 E80700 call ordinalbyte 0 000098A9 E8[0000] call putsline 0 000098AC 5A pop dx 0 000098AD 59 pop cx 0 000098AE 5B pop bx 0 000098AF C3 retn 2269 2270 2271 ordinalbyte: 0 000098B0 E8[0000] call decbyte 0 000098B3 8B45FE mov ax, [di - 2] ; al = lower address, higher decimal digit 2274 ; ah = higher address, lower decimal digit 0 000098B6 3C31 cmp al, '1' 0 000098B8 7417 je .gotsuf_th ; 11th, 12th, 13th or other teen --> 0 000098BA BA7374 mov dx, "st" 0 000098BD 80FC31 cmp ah, '1' 0 000098C0 7412 je .gotsuf ; if low digit was one --> 0 000098C2 BA6E64 mov dx, "nd" 0 000098C5 80FC32 cmp ah, '2' 0 000098C8 740A je .gotsuf ; if low digit was two --> 0 000098CA B272 mov dl, 'r' 0 000098CC 80FC33 cmp ah, '3' 0 000098CF 7403 je .gotsuf ; if low digit was three --> 2286 .gotsuf_th: 0 000098D1 BA7468 mov dx, "th" 2288 .gotsuf: 0 000098D4 89D0 mov ax, dx 0 000098D6 AB stosw 0 000098D7 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 0 000098D8 E8CC01 call resetmode 2307 %endif 0 000098DB 31FF xor di, di 0 000098DD 31C9 xor cx, cx 0 000098DF 16 push ss 0 000098E0 07 pop es 0 000098E1 BE[0000] mov si, b_bplist.bp 2313 .loop: 0 000098E4 8B03 mov ax, word [bp + di] 0 000098E6 F6C47F test ah, 7Fh ; failed ? 0 000098E9 7414 jz .next 0 000098EB 51 push cx 0 000098EC 57 push di 2319 ; cx = 0-based index 0 000098ED FF7402 push word [si + 2] 0 000098F0 FF34 push word [si] ; stack: linear address 0 000098F2 8A5C08 mov bl, byte [si + BPSIZE - 1] 2323 ; bl = what we tried to restore 0 000098F5 B740 mov bh, 40h ; bh = 40h (bb) 0 000098F7 80CC80 or ah, 80h ; ah & 80h = set (is restore) 0 000098FA E8A00E call display_breakpoint_failure 0 000098FD 5F pop di 0 000098FE 59 pop cx 2329 .next: 0 000098FF 83C609 add si, BPSIZE 0 00009902 AF scasw ; di += 2 0 00009903 41 inc cx 0 00009904 83F920 cmp cx, _NUM_B_BP + _NUM_SYM_BP 0 00009907 72DB jb .loop 2335 .end: 0 00009909 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 0 0000990A E89A01 call resetmode 2352 %endif 0 0000990D 89CF mov di, cx 0 0000990F 01FF add di, di 0 00009911 F7DF neg di 0 00009913 16 push ss 0 00009914 07 pop es 0 00009915 BB0000 mov bx, 0 0 00009918 BE[0000] mov si, g_bplist.bp 0 0000991B E325 jcxz .end 2361 .loop: 0 0000991D 8B03 mov ax, word [bp+di] 0 0000991F F6C47F test ah, 7Fh ; failed? 0 00009922 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 00009924 53 push bx 0 00009925 57 push di 0 00009926 89D9 mov cx, bx ; cx = 0-based index 0 00009928 FF7402 push word [si + 2] 0 0000992B FF34 push word [si] ; stack: linear address 0 0000992D 8A5C08 mov bl, byte [si + BPSIZE - 1] 2376 ; bl = what we tried to restore 0 00009930 B780 mov bh, 80h ; bh = 80h (gg) 0 00009932 80CC80 or ah, 80h ; ah & 80h = set (is restore) 0 00009935 E8650E call display_breakpoint_failure 0 00009938 5F pop di 0 00009939 5B pop bx 2382 .next: 0 0000993A 43 inc bx ; increment counter 0 0000993B 83C609 add si, BPSIZE ; -> next point 0 0000993E 47 inc di 0 0000993F 47 inc di ; di+bp-> next error info 0 00009940 75DB jnz .loop ; not yet at end --> 2388 .end: 0 00009942 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: 0 00009943 66 _386_PM_o32 ; or ecx, byte -1 0 00009944 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 00009947 8B1E[0000] mov bx, [reg_cs] ; bx = cs 0 0000994B 66 _386_PM_o32 0 0000994C 8B16[0000] mov dx, [reg_eip] ; (e)dx = (e)ip 0 00009950 66 _386_PM_o32 0 00009951 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 0 00009953 57 push di 0 00009954 BF[0000] mov di, test_d_b_bit 0 00009957 E82300 call getlinear_common 0 0000995A 5F pop di 0 0000995B C3 retn 2444 2445 getlinear_high_limit: section_of_function 0 0000995C 57 push di 0 0000995D BF[0000] mov di, test_high_limit 0 00009960 E81A00 call getlinear_common 0 00009963 5F pop di 0 00009964 C3 retn 2451 2452 getlinear_32bit: section_of_function 0 00009965 57 push di 0 00009966 BF[9109] mov di, .always_NZ 0 00009969 E81100 call getlinear_common 0 0000996C 5F pop di 0 0000996D C3 retn 2458 2459 .always_NZ: 0 0000996E 85FF test di, di 0 00009970 C3 retn 2462 2463 section_of getlinear_16bit 2464 getlinear_16bit: section_of_function 0 00009971 57 push di 0 00009972 BF[9D09] mov di, .always_ZR 0 00009975 E80500 call getlinear_common 0 00009978 5F pop di 0 00009979 C3 retn 2470 2471 .always_ZR: 0 0000997A 39FF cmp di, di 0 0000997C C3 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 0 0000997D E82701 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 00009980 53 push bx 2526 %if _PM 0 00009981 E8[0000] call ispm 0 00009984 7520 jnz .rm 0 00009986 B80600 mov ax, 0006h 0 00009989 51 push cx 0 0000998A 52 push dx 0 0000998B CD31 int 31h ; get selector base address into cx:dx 0 0000998D 58 pop ax ; (edxh:)ax = offset, cx:dx = base 0 0000998E 7213 jc .return_cx_bx 2535 0 00009990 FFD7 _386 call di 0 00009992 7406 _386 jz .16 0 00009994 6652 _386 push edx 0 00009996 5B _386 pop bx 0 00009997 5B _386 pop bx ; bx = high word edx (in 32-bit PM segment) 0 00009998 EB02 _386 jmp .32 2542 .16: ; bx:ax = offset 0 0000999A 31DB xor bx, bx ; 16-bit PM segment, clear offset high word 2544 .32: 0 0000999C 01D0 add ax, dx 0 0000999E 11CB adc bx, cx ; add the base 0 000099A0 87DA xchg bx, dx ; dx:ax = 32-bit linear address 0 000099A2 F8 clc 2549 2550 .return_cx_bx: 0 000099A3 59 pop cx 0 000099A4 5B pop bx 0 000099A5 C3 retn 2554 .rm: 2555 %endif 0 000099A6 89D8 mov ax, bx 0 000099A8 51 push cx 0 000099A9 B104 mov cl, 4 0 000099AB D3C0 rol ax, cl 0 000099AD 59 pop cx 0 000099AE BBF0FF mov bx, 0FFF0h 0 000099B1 21C3 and bx, ax ; bx = low word adjustment 0 000099B3 83E00F and ax, byte 0Fh ; ax = higher bits which don't fit in the low word 0 000099B6 01DA add dx, bx 0 000099B8 83D000 adc ax, byte 0 0 000099BB 92 xchg ax, dx ; dx:ax = 21-bit linear address 0 000099BC F606[0100]10 testopt [internalflags], debuggeeA20 0 000099C1 7503 jnz .return_bx ; A20 line enabled, no need to adjust (NC) 0 000099C3 80E2EF and dl, ~10h ; clear corresponding bit of the address if it was set (NC) 2570 .return_bx: 0 000099C6 5B pop bx 0 000099C7 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 0 000099C8 E8DC00 call resetmode 2589 %endif 2590 %if !_LOADER 0 000099CB 66 _386_PM_o32 ; or dword 0 000099CC 830E[0000]FF or word [bp_offset], strict byte -1 2593 %endif 0 000099D1 E8[0000] call skipcomm0 0 000099D4 3C40 cmp al, '@' 0 000099D6 7534 jne .at_not 0 000099D8 AC lodsb ; insure we have a blank or opening parens 0 000099D9 3C28 cmp al, '(' 0 000099DB 740A je .at 0 000099DD 3C09 cmp al, 9 0 000099DF 7406 je .at 0 000099E1 3C20 cmp al, 32 0 000099E3 7402 je .at 0 000099E5 EB22 jmp .at_not_reload ; assume the @ is part of a symbol 2605 2606 .at: 0 000099E7 E8[0000] call skipwh0 0 000099EA 3C28 cmp al, '(' 0 000099EC 7512 jne .at_not_paren 2610 0 000099EE AC lodsb 0 000099EF E8[0000]EB02[0000] nearcall getdword 0 000099F6 E8[0000] call skipwh0 0 000099F9 3C29 cmp al, ')' 0 000099FB 7529 jne .error 0 000099FD AC lodsb 2617 0 000099FE EB07 jmp .at_got 2619 2620 .at_not_paren: 0 00009A00 E8[0000]EB02[0000] nearcall getdword 2622 .at_got: 2623 %ifn _PM 2624 ; test bh, bh 2625 ; jnz .error 2626 cmp bx, 11h 2627 jae .error 2628 %endif 0 00009A07 F8 clc 0 00009A08 C3 retn 2631 2632 .at_not_reload: 0 00009A09 4E dec si 0 00009A0A 4E dec si 0 00009A0B AC lodsb 2636 .at_not: 0 00009A0C E8[0000]EB02[0000] nearcall getaddrX 2638 %if _PM 0 00009A13 8326[0200]00 _no386 and word [bp_offset + 2], 0 2640 %endif 2641 %if !_LOADER 0 00009A18 66 _386_PM_o32 ; mov dword [bp_offset], edx 0 00009A19 8916[0000] mov word [bp_offset], dx 2644 %endif 0 00009A1D 50 push ax 0 00009A1E E83BFF call getlinear_high_limit 0 00009A21 93 xchg bx, ax ; dx:bx = linear 0 00009A22 87D3 xchg dx, bx ; bx:dx = linear 0 00009A24 58 pop ax ; al = next character 0 00009A25 C3 retn 2651 2652 .error: 0 00009A26 F9 stc 0 00009A27 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 00009A28 A1[0000] mov ax, [tpg_possible_breakpoint] 0 00009A2B 8B16[0200] mov dx, [tpg_possible_breakpoint + 2] 2670 ; dx:ax = stored possible breakpoint address 0 00009A2F F606[0100]01 testopt [internalflags2], dif2_tpg_have_bp 0 00009A34 7511 jnz .retn ; (NC) if already stored --> 0 00009A36 E80AFF call get_cseip_minus_1_linear 2674 ; dx:ax = linear address at cs:(e)ip - 1 0 00009A39 720C jc .retn ; (CY) if getlinear failed --> 0 00009A3B A3[0000] mov [tpg_possible_breakpoint], ax 0 00009A3E 8916[0200] mov [tpg_possible_breakpoint + 2], dx 2678 ; store for later use 0 00009A42 800E[0100]01 setopt [internalflags2], dif2_tpg_have_bp 2680 ; (NC) 2681 .retn: 0 00009A47 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 0 00009A48 6631DB _386 xor ebx, ebx ; clear ebxh 0 00009A4B 89E3 mov bx, sp 0 00009A4D 6631FF _386 xor edi, edi ; clear edih 0 00009A50 BF[9A0A] mov di, .back_after_switch 0 00009A53 E8[0000] call ispm 0 00009A56 740F jz .pm 2714 .r86m: 2715 d4 call d4message 2716 d4 asciz "In switchmode.r86m",13,10 0 00009A58 A1[0000] mov ax, [dssel] ; switch rm -> pm 0 00009A5B 8B36[0000] mov si, [code_sel] 0 00009A5F 89C2 mov dx, ax 0 00009A61 89C1 mov cx, ax 0 00009A63 FF2E[0000] jmp far [dpmi_rm2pm] 2722 .pm: 2723 d4 call d4message 2724 d4 asciz "In switchmode.pm",13,10 0 00009A67 A1[0000] mov ax, [pspdbg] ; switch pm -> rm 0 00009A6A 8B36[0000] mov si, [code_seg] 0 00009A6E 89C2 mov dx, ax 0 00009A70 89C1 mov cx, ax 0 00009A72 66 _386_o32 ; jmp far dword [dpmi_pm2rm] 0 00009A73 FF2E[0000] jmp far [dpmi_pm2rm] 2731 2732 .back_after_switch: 0 00009A77 8036[0000]02 xor byte [pm_2_86m_0], 2 0 00009A7C 8036[0100]08 xoropt [internalflags], protectedmode 2735 d4 call d4message 2736 d4 asciz "In switchmode.back_after_switch",13,10 0 00009A81 C3 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: 0 00009A82 F606[0200]20 testopt [internalflags], switchbuffer 0 00009A87 741B jz .return ; no need to call --> 0 00009A89 66 _386_o32 ; xor edi, edi 0 00009A8A 31FF xor di, di 0 00009A8C E8[0000] call ispm 0 00009A8F 740A jz .pm 2751 .r86m: 2752 d4 call d4message 2753 d4 asciz "In sr_state.r86m",13,10 0 00009A91 8E06[0200] mov es, word [auxbuff_segorsel + soaSegment] 0 00009A95 FF1E[0000] call far [dpmi_rmsav] 0 00009A99 EB09 jmp .return 2757 2758 .pm: 2759 d4 call d4message 2760 d4 asciz "In sr_state.pm",13,10 0 00009A9B 8E06[0400] mov es, word [auxbuff_segorsel + soaSelector] 0 00009A9F 66 _386_o32 ; call far dword [dpmi_pmsav] 0 00009AA0 FF1E[0000] call far [dpmi_pmsav] 2764 .return: 0 00009AA4 16 push ss 0 00009AA5 07 pop es 0 00009AA6 C3 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 0 00009AA7 9C pushf 0 00009AA8 F606[0200]08 testopt [internalflags], modeswitched ; switched mode previously ? 0 00009AAD 741A jz .return ; no --> 2782 d4 call d4message 2783 d4 asciz "In resetmode (actually resetting)",13,10 2784 subcpu 286 0 00009AAF 66 _386_o32 0 00009AB0 60 pusha 0 00009AB1 E894FF call switchmode ; switch back to the mode we were entered in (RM) 0 00009AB4 B001 mov al, 1 0 00009AB6 E8C9FF call sr_state ; restore state 0 00009AB9 E81411 call handle_mode_changed ; ! called with flag set 0 00009ABC 8026[0200]F7 clropt [internalflags], modeswitched ; reset the flag 0 00009AC1 16 _386 push ss 0 00009AC2 0FA9 _386 pop gs 0 00009AC4 16 _386 push ss 0 00009AC5 0FA1 _386 pop fs 0 00009AC7 66 _386_o32 0 00009AC8 61 popa 2798 subcpureset 2799 .return: 0 00009AC9 9D popf 0 00009ACA FB sti 0 00009ACB C3 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 0 00009ACC E8[0000] call ispm 0 00009ACF 7520 jnz .rm 2849 .pm: 0 00009AD1 51 push cx 0 00009AD2 8B1E[0000] mov bx, word [scratchsel] 0 00009AD6 92 xchg ax, dx 0 00009AD7 91 xchg ax, cx ; cx:dx = linear address 0 00009AD8 B80700 mov ax, 0007h 0 00009ADB CD31 int 31h ; set base to the address 0 00009ADD 59 pop cx 0 00009ADE 7248 jc .invalid 2858 %if 1 0 00009AE0 51 push cx 0 00009AE1 B80800 mov ax, 0008h 0 00009AE4 31C9 xor cx, cx 0 00009AE6 31D2 xor dx, dx 0 00009AE8 CD31 int 31h ; set limit to zero (access to one byte only) 0 00009AEA 59 pop cx 0 00009AEB 723B jc .invalid 2866 %endif 0 00009AED 66 _386_o32 ; xor edx, edx 0 00009AEE 31D2 xor dx, dx ; bx:(e)dx = selector:offset (using scratchsel with the address as base) 0 00009AF0 C3 retn ; (NC) 2870 %endif 2871 .rm: 0 00009AF1 83FA10 cmp dx, byte 10h ; check for address space 0 00009AF4 7249 jb .nothma ; below HMA, normal access --> 0 00009AF6 7432 je .checkhma ; possibly in HMA --> 2875 .nonrmspace: ; above HMA 2876 %if _PM 2877 ; It's a PM address but we are in RM. 0 00009AF8 F606[0200]04 testopt [internalflags], canswitchmode 0 00009AFD 7429 jz .invalid ; can't switch to PM --> 2880 .switchmodes: 0 00009AFF 66 _386_o32 0 00009B00 56 push si 0 00009B01 66 _386_o32 0 00009B02 57 push di 0 00009B03 66 _386_o32 0 00009B04 51 push cx 0 00009B05 66 _386_o32 0 00009B06 55 push bp 0 00009B07 52 push dx 0 00009B08 50 push ax 2891 d4 call d4message 2892 d4 asciz "In getsegmented.switchmodes (switching to access memory beyond 1088 KiB)",13,10 0 00009B09 E89E11 call remember_mode 0 00009B0C 800E[0200]08 setopt [internalflags], modeswitched ; set flag for resetmode 0 00009B11 B000 mov al, 0 0 00009B13 E86CFF call sr_state ; save state 0 00009B16 E82FFF call switchmode ; switch to PM 0 00009B19 E8B410 call handle_mode_changed ; ! called with flag set 0 00009B1C 58 pop ax 0 00009B1D 5A pop dx 0 00009B1E 66 _386_o32 0 00009B1F 5D pop bp 0 00009B20 66 _386_o32 0 00009B21 59 pop cx 0 00009B22 66 _386_o32 0 00009B23 5F pop di 0 00009B24 66 _386_o32 0 00009B25 5E pop si 0 00009B26 EBA9 jmp .pm 2910 2911 .invalid: ; the address is inaccessible 2912 %endif 0 00009B28 F9 stc 0 00009B29 C3 retn 2915 2916 .checkhma: 0 00009B2A 83F8F0 cmp ax, -10h ; valid offset for HMA ? 0 00009B2D 73C9 jae .nonrmspace ; no, above HMA --> 0 00009B2F F606[0100]20 testopt [internalflags], debuggerA20 ; A20 on, HMA accessible ? 0 00009B34 74C2 jz .nonrmspace ; no, treat as above HMA (DEBUGX) --> 0 00009B36 BBFFFF mov bx, 0FFFFh ; the HMA must always be addressed by segment FFFFh 0 00009B39 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 00009B3C 92 xchg ax, dx ; bx:dx = segment:offset 0 00009B3D EB11 jmp .zero_edxh 2926 2927 .nothma: 0 00009B3F 51 push cx 0 00009B40 B104 mov cl, 4 0 00009B42 D3CA ror dx, cl ; dx (high 4 bits) = high 4 bits of segment 0 00009B44 89C3 mov bx, ax 0 00009B46 D3EB shr bx, cl ; bx = low 12 bits of segment 0 00009B48 09DA or dx, bx ; dx = segment 0 00009B4A 83E00F and ax, byte 0Fh ; ax = low 4 bits of linear, used as offset (NC) 0 00009B4D 92 xchg ax, dx 0 00009B4E 93 xchg ax, bx ; bx:dx = segment:offset 0 00009B4F 59 pop cx 2938 .zero_edxh: 0 00009B50 660FB7D2 _386_PM movzx edx, dx 0 00009B54 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 00009B55 8A64FE mov ah, byte [si - 2] 0 00009B58 80E4DF and ah, TOUPPER 0 00009B5B 80FC54 cmp ah, 'T' 0 00009B5E 7508 jne @F 0 00009B60 88C4 mov ah, al 0 00009B62 80E4DF and ah, TOUPPER 0 00009B65 80FC4D cmp ah, 'M' 2963 @@: 0 00009B68 7546 jne isnotmodeset 0 00009B6A E8[0000] call skipcomma 0 00009B6D E8[0000] call iseol? 0 00009B70 741A je ismodeget 0 00009B72 E8[0000]EB02[0000] nearcall getexpression 0 00009B79 E8[0000] call chkeol ; expect end of line here 0 00009B7C 09DA or dx, bx 0 00009B7E 7507 jnz .set ; selected nonzero --> 2972 .clear: ; selected zero 0 00009B80 8026[0000]FD clropt [options], traceints 0 00009B85 EB05 jmp short .get 2975 .set: 0 00009B87 800E[0000]02 setopt [options], traceints 2977 .get: 2978 ismodeget: 0 00009B8C B030 mov al, '0' 0 00009B8E BE[0000] mov si, tmode0 0 00009B91 F606[0000]02 testopt [options], traceints 0 00009B96 7404 jz .zero 0 00009B98 40 inc ax 0 00009B99 BE[0000] mov si, tmode1 2985 .zero: 0 00009B9C A2[0000] mov byte [tmodev], al 0 00009B9F BF[0000] mov di, line_out 0 00009BA2 56 push si 0 00009BA3 BE[0000] mov si, tmodes 0 00009BA6 E8[0000] call showstring 0 00009BA9 5E pop si 0 00009BAA E8[0000] call showstring 0 00009BAD E9[0000] jmp putsline_crlf 2994 2995 isnotmodeset: 2996 %if _TSR && (_APPLICATION || _DEVICE) 0 00009BB0 80FC53 cmp ah, 'S' 0 00009BB3 750D jne @F 0 00009BB5 50 push ax 0 00009BB6 8A04 mov al, byte [si] 0 00009BB8 24DF and al, TOUPPER 0 00009BBA 3C52 cmp al, 'R' 0 00009BBC 58 pop ax 0 00009BBD 7503E96802 je tsr 3005 @@: 3006 %endif 3007 3008 %if _RH 0 00009BC2 E8[0000] call enable_rh 3010 %endif 3011 3012 %if _TTEST 0 00009BC5 50 push ax 0 00009BC6 80FC54 cmp ah, 'T' 0 00009BC9 7516 jne @F 0 00009BCB 8B04 mov ax, word [si] 0 00009BCD 25DFDF and ax, TOUPPER_W 0 00009BD0 3D4553 cmp ax, "ES" 0 00009BD3 750C jne @F 0 00009BD5 8A4402 mov al, byte [si + 2] 0 00009BD8 24DF and al, TOUPPER 0 00009BDA 3C54 cmp al, 'T' 0 00009BDC 7503E9C800 je ttestcmd 3024 @@: 0 00009BE1 58 pop ax 3026 %endif 3027 0 00009BE2 8026[0300]F7 clropt [internalflags], tt_p 0 00009BE7 80FC50 cmp ah, 'P' 0 00009BEA 7506 jne @F 0 00009BEC AC lodsb 0 00009BED 800E[0300]08 setopt [internalflags], tt_p 3033 @@: 3034 tt0: 3035 %if _RH 0 00009BF2 E8[0000] call enable_rh 3037 %endif 0 00009BF5 C706[0000][150C] mov word [lastcmd], tt0 0 00009BFB 8026[0100]EF clropt [internalflags2], dif2_is_pp 0 00009C00 E8EE11 call parse_pt ; process arguments 3041 3042 ; Do it times. 3043 tt1: 0 00009C03 53 push bx 0 00009C04 51 push cx 3046 0 00009C05 F606[0300]08 testopt [internalflags], tt_p 0 00009C0A 7452 jz .not_p 3049 3050 %if _PM 0 00009C0C E898FE call resetmode 3052 %endif 0 00009C0F BA0F00 mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 0 00009C12 8B1E[0000] mov bx, word [reg_cs] 0 00009C16 66 _386_PM_o32 ; mov esi, dword [reg_eip] 0 00009C17 8B36[0000] mov si, word [reg_eip] 3057 .pp2: 0 00009C1B E8EC0C call pp16 ; get next instruction byte into AL 0 00009C1E BF[0000] mov di, ppbytes 0 00009C21 B9[0000] mov cx, PPLEN_ONLY_STRING 3061 %if _SYMBOLIC 0 00009C24 A2[0000] mov byte [pp_instruction], al 3063 %endif 0 00009C27 F2AE repne scasb 0 00009C29 7533 jne .not_p ; if not one of these --> 3066 %if _LINK_COMPAT 0 00009C2B 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 00009C2F A880 test al, PP_PREFIX ; prefix ? 0 00009C31 740E jz .pp3 ; no --> 0 00009C33 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 00009C35 FECA dec dl 0 00009C37 75E2 jnz .pp2 ; if not out of bytes --> 0 00009C39 BA[0000] mov dx, msg.warnprefix 0 00009C3C E8[0000] call putsz 0 00009C3F EB1D 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: 0 00009C41 E8B906 _386_PM call pp_fix32bitflags 0 00009C44 A847 test al, PP_VARSIZ | PP_SIZ_MASK 0 00009C46 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 0 00009C4B E84E08 call pp3_check_symhints 0 00009C4E 720E jc .not_p ; trace --> 3106 %endif 3107 ; jmp short pp11 ; we have a skippable instruction here 3108 ; pp11: 0 00009C50 E8[0000] _386_PM call resetmode_and_test_d_b_bit 0 00009C53 7504 _386_PM jnz .32 ; full 32-bit offset valid --> 0 00009C55 660FB7F6 _386_PM movzx esi, si ; clear high word here 3112 .32: 0 00009C59 E8180C call proceedbreakpoint ; run until the breakpoint is hit 3114 ; This call might return modeswitched. 0 00009C5C EB03 jmp short @F 3116 3117 .not_p: 0 00009C5E E87C04 call traceone ; call common code 3119 @@: 0 00009C61 7303E93804 jc unexpectedinterrupt ; an unexpected interrupt occured --> 3121 %if _BREAKPOINTS 0 00009C66 BA0000 mov dx, 0 ; do not skip WHILE 0 00009C69 7416 jz @F ; (breakpoint after instruction was hit) 3124 3125 ; bb breakpoint was hit. dumpregs, then return 0 00009C6B E8CB00 call handle_bb_hit_pass_match 0 00009C6E 7204 jc .actual_hit ; actual match ? --> 0 00009C70 741A jz tt2.nodump ; non-silent mode ? --> 0 00009C72 EB0D jmp tt2 ; silent mode --> 3130 3131 .actual_hit: 3132 %if _PM 0 00009C74 E830FE call resetmode 3134 %endif 0 00009C77 E81AF7 call put_deferred_message_silent 0 00009C7A E8050A call dumpregs_extended_silent 0 00009C7D 59 pop cx 0 00009C7E 5B pop bx ; (discard counter) 0 00009C7F EB1E jmp @FF 3140 @@: 3141 %endif 3142 tt2: 0 00009C81 52 push dx 3144 %if _PM 0 00009C82 E822FE call resetmode 3146 %endif 0 00009C85 E80CF7 call put_deferred_message_silent 0 00009C88 E8F709 call dumpregs_extended_silent 3149 ; dump registers 0 00009C8B 5A pop dx ; preserve skip WHILE flag 3151 .nodump: 3152 0 00009C8C E85800 call tt_handle_while 0 00009C8F 59 pop cx 0 00009C90 5B pop bx 3156 0 00009C91 83E901 sub cx, 1 0 00009C94 83DB00 sbb bx, 0 ; decrement loop counter 3159 0 00009C97 85DB test bx, bx 0 00009C99 750B jnz tt1_jmp ; loop --> 0 00009C9B 85C9 test cx, cx 0 00009C9D 7507 jnz tt1_jmp ; loop --> 3164 3165 @@: 3166 %if _PM 0 00009C9F E805FE call resetmode 3168 %endif 0 00009CA2 E8[0000] call silence_dump 3170 0 00009CA5 C3 retn 3172 3173 tt1_jmp: 0 00009CA6 E95AFF jmp tt1 3175 3176 3177 %if _TTEST 3178 ttestcmd: 0 00009CA9 58 pop ax 0 00009CAA 46 inc si 0 00009CAB 46 inc si 0 00009CAC 46 inc si 0 00009CAD E8[0000] call skipwhite 3184 3185 .tt0: 0 00009CB0 C706[0000][D30C] mov word [lastcmd], .tt0 0 00009CB6 8026[0100]EF clropt [internalflags2], dif2_is_pp 0 00009CBB E83311 call parse_pt ; process arguments 3189 3190 ; Do it times. 3191 .tt1: 0 00009CBE 53 push bx 0 00009CBF 51 push cx 3194 3195 .tt2: 3196 %if _PM 0 00009CC0 E8E4FD call resetmode 3198 %endif 0 00009CC3 E8CEF6 call put_deferred_message_silent 0 00009CC6 E8B909 call dumpregs_extended_silent 3201 ; dump registers 3202 .nodump: 3203 0 00009CC9 31D2 xor dx, dx 0 00009CCB E81900 call tt_handle_while 0 00009CCE 59 pop cx 0 00009CCF 5B pop bx 3208 0 00009CD0 83E901 sub cx, 1 0 00009CD3 83DB00 sbb bx, 0 ; decrement loop counter 3211 0 00009CD6 85DB test bx, bx 0 00009CD8 750B jnz .tt1_jmp ; loop --> 0 00009CDA 85C9 test cx, cx 0 00009CDC 7507 jnz .tt1_jmp ; loop --> 3216 3217 @@: 3218 %if _PM 0 00009CDE E8C6FD call resetmode 3220 %endif 0 00009CE1 E8[0000] call silence_dump 3222 0 00009CE4 C3 retn 3224 3225 .tt1_jmp: 0 00009CE5 EBD7 jmp .tt1 3227 %endif 3228 3229 3230 ; INP: dx = nonzero if to bypass while condition 3231 tt_handle_while: 0 00009CE7 85D2 test dx, dx 0 00009CE9 7543 jnz @F 0 00009CEB F606[0300]04 testopt [internalflags], tt_while 0 00009CF0 743C jz @F 3236 3237 %if _PM 0 00009CF2 E8B2FD call resetmode 3239 %endif 0 00009CF5 E83700 call .point_to_condition 3241 ; dx = si -> line_out with condition 0 00009CF8 FF36[0000] push word [rc] 0 00009CFC 8F06[0000] pop word [priorrc] 0 00009D00 AC lodsb 0 00009D01 E8[0000]EB02[0000] nearcall getexpression ; parse stored expression 0 00009D08 E8[0000] call chkeol 0 00009D0B E8[0000]EB02[0000] nearcall toboolean ; get boolean 0 00009D12 85D2 test dx, dx ; true ? 0 00009D14 7518 jnz @F ; yes, continue --> 3250 0 00009D16 E8[0000] call silence_dump 3252 0 00009D19 BA[0000] mov dx, msg.while_terminated_before 0 00009D1C E8[0000] call putsz 0 00009D1F E80D00 call .point_to_condition 0 00009D22 E8[0000] call putsz ; display condition 0 00009D25 BA[0000] mov dx, msg.while_terminated_after 0 00009D28 E8[0000] call putsz 0 00009D2B E9[0000] jmp cmd3 3260 3261 @@: 0 00009D2E C3 retn 3263 3264 3265 .point_to_condition: 0 00009D2F 16 push ss 0 00009D30 07 pop es 0 00009D31 16 push ss 0 00009D32 1F pop ds 0 00009D33 BE[0000] mov si, while_buffer 0 00009D36 89F2 mov dx, si 0 00009D38 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 00009D39 91 xchg ax, cx 3302 0 00009D3A F606[0100]08 testopt [internalflags2], dif2_bp_failure 0 00009D3F 756C jnz .actual_hit ; after failure, handle as actual hit 3305 0 00009D41 A801 test al, 1 ; actual hit ? else: non-hit, pass or non-pass 0 00009D43 7568 jnz .actual_hit ; yes --> 3308 0 00009D45 A802 test al, 2 ; at least pass match ? 0 00009D47 7418 jz .nonpassnonhit ; no --> 3311 3312 .passnonhit: 3313 3314 d5 call d5message 3315 d5 asciz "bb pass non-hit",13,10 3316 3317 %if _PM 0 00009D49 E85BFD call resetmode 3319 %endif 3320 ; call put_deferred_message_loud 0 00009D4C BA[0000] mov dx, msg.empty_message 0 00009D4F 8716[0000] xchg dx, word [gg_deferred_message] 0 00009D53 E8[0000] call putsz 0 00009D56 BA[0000] mov dx, putsline 0 00009D59 E845F6 call put_bb_deferred_message_calling_dx 3326 0 00009D5C 50 push ax 3328 ; call dumpregs_extended_loud 3329 ; (includes handle_serial_flags_ctrl_c) 0 00009D5D E8[0000] call dumpregs_extended 0 00009D60 58 pop ax ; (preserve so the test al, 8 can use it) 3332 .nonpassnonhit: 0 00009D61 E82A09 call handle_serial_flags_ctrl_c 3334 3335 ; al & 4 always set 3336 0 00009D64 8026[0000]E9 clropt [internalflags2], dif2_gg_skip_non_cseip | dif2_gg_skip_cseip | dif2_gg_first_detected 0 00009D69 800E[0000]01 setopt [internalflags2], dif2_gg_is_first 3340 0 00009D6E FF36[0200] push word [gg_next_cseip_linear + 2] 0 00009D72 FF36[0000] push word [gg_next_cseip_linear] 0 00009D76 8F06[0000] pop word [gg_first_cseip_linear] 0 00009D7A 8F06[0200] pop word [gg_first_cseip_linear + 2] 3345 0 00009D7E A808 test al, 8 ; not bb hit, is tt/pp hit ? 0 00009D80 751C jnz @FF ; yes --> 3348 0 00009D82 F706[0000]8010 testopt [internalflags2], dif2_is_pp | dif2_tpg_keep_proceed_bp, 1 0 00009D88 7502 jnz @F 0 00009D8A EB12 jmp @FF 3352 3353 @@: 3354 lframe near 3355 lpar dword, counter 3356 lpar_return 0 00009D8C 5589E5 lenter 0 00009D8F 83460401 add word [bp + ?counter], 1 0 00009D93 83560600 adc word [bp + ?counter + 2], 0 0 00009D97 5D lleave 0 00009D98 BA0100 mov dx, 1 ; skip WHILE 0 00009D9B 38C0 cmp al, al ; (NC, ZR) 0 00009D9D C3 retn 3364 3365 @@: 0 00009D9E 31D2 xor dx, dx ; no skip WHILE 0 00009DA0 A802 test al, 2 ; displayed pass point ? 0 00009DA2 7503 jnz @F ; yes --> 0 00009DA4 A8FF test al, -1 ; NC, NZ (do not skip dump) 3370 ; al & 0Ch is set so this test is NZ 0 00009DA6 C3 retn 3372 3373 @@: 0 00009DA7 F606[0300]10 testopt [internalflags], tt_silent_mode 3375 ; (NC, ZF is ZR if to skip dump) 0 00009DAC C3 retn 3377 3378 .actual_hit: 3379 d5 call d5message 3380 d5 asciz "bb hit",13,10 3381 0 00009DAD 31D2 xor dx, dx ; no skip WHILE 0 00009DAF F9 stc 0 00009DB0 C3 retn 3385 3386 3387 %if _ATTACH 3388 attach: 3389 %if _BOOTLDR 0 00009DB1 F606[0100]40 testopt [internalflags], nodosloaded 0 00009DB6 7403E9[0000] jnz error 3392 %endif 0 00009DBB E8[0000] call skipwh0 0 00009DBE E8[0000]EB02[0000] nearcall getword 0 00009DC5 E8[0000] call chkeol 0 00009DC8 F606[0200]40 testopt [internalflags], tsrmode 0 00009DCD 750C jnz @F ; resident --> 0 00009DCF BA[0000] mov dx, msg.notyettsr 0 00009DD2 B81101 mov ax, 0111h 3400 .specificerror: 0 00009DD5 E8[0000] call setrc 0 00009DD8 E9[0000] jmp putsz_error 3403 3404 @@: 3405 %if _PM 0 00009DDB E8[0000] call setes2dx 3407 %else 3408 mov es, dx 3409 %endif 0 00009DDE 26813E0000CD20 cmp word [es:0], 20CDh 0 00009DE5 7408 je @F 0 00009DE7 BA[0000] mov dx, msg.invalidpsp 0 00009DEA B81201 mov ax, 0112h 0 00009DED EBE6 jmp .specificerror 3415 3416 @@: 0 00009DEF 2639161600 cmp word [es:16h], dx 0 00009DF4 7508 jne @F 0 00009DF6 BA[0000] mov dx, msg.selfownedpsp 0 00009DF9 B81301 mov ax, 0113h 0 00009DFC EBD7 jmp .specificerror 3422 3423 @@: 0 00009DFE 06 push es 0 00009DFF 1F pop ds 0 00009E00 16 push ss 0 00009E01 07 pop es 0 00009E02 BE0A00 mov si, TPIV 0 00009E05 BF[0000] mov di, psp22 0 00009E08 A5 movsw 0 00009E09 A5 movsw ; save Int22 3432 %if _PM 0 00009E0A 36A1[0000] mov ax, word [ss:pspdbg] 3434 %else 3435 mov ax, ss ; => our process 3436 %endif 0 00009E0E C744FC[3C02] mov word [ si-4 ], int22 0 00009E13 8944FE mov word [ si-2 ], ax ; set pspInt22 (required) 0 00009E16 BE1600 mov si, 16h 0 00009E19 A5 movsw ; save parent 0 00009E1A 8944FE mov word [ si-2 ], ax ; set pspParent 0 00009E1D 16 push ss 0 00009E1E 1F pop ds 0 00009E1F 8026[0200]BF clropt [internalflags], tsrmode 0 00009E24 BA[0000] mov dx, msg.nowattached 0 00009E27 E9[0000] jmp putsz 3447 %endif 3448 3449 3450 %if _TSR && (_APPLICATION || _DEVICE) 3451 tsr: 3452 %if _BOOTLDR 0 00009E2A F606[0100]40 testopt [internalflags], nodosloaded 0 00009E2F 7403E9[0000] jnz error 3455 %endif 0 00009E34 E8[0000] call guard_re 0 00009E37 46 inc si 0 00009E38 AC lodsb 0 00009E39 E8[0000] call chkeol 0 00009E3C F606[0200]40 testopt [internalflags], tsrmode 0 00009E41 7408 jz .try ; not yet resident --> 0 00009E43 BA[0000] mov dx, msg.alreadytsr 0 00009E46 B81401 mov ax, 0114h 0 00009E49 EB5A jmp .specificerror_es 3465 .try: 0 00009E4B 8B16[0000] mov dx, word [pspdbe] 0 00009E4F 8B1E[0000] mov bx, word [pspdbg] 0 00009E53 BF0A00 mov di, 0Ah 3469 .loop: 3470 %if _PM 0 00009E56 89D1 mov cx, dx ; = original segment address 0 00009E58 E8[0000] call ispm 0 00009E5B 7517 jnz .rm 0 00009E5D 53 push bx 0 00009E5E 89D0 mov ax, dx 3476 [cpu 286] 0 00009E60 C1EA0C shr dx, 12 0 00009E63 C1E004 shl ax, 4 ; shift to get a 32-bit linear address 3479 __CPU__ 0 00009E66 E868FC 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. 0 00009E69 E8[0000] call setrmlimit 0 00009E6C 89D7 mov di, dx ; -> PSP 0 00009E6E 89DA mov dx, bx 0 00009E70 5B pop bx 0 00009E71 83C70A add di, byte 0Ah ; -> PSP termination vector 3491 .rm: 3492 %endif 0 00009E74 8EC2 mov es, dx 0 00009E76 268B450C mov ax, word [es:(di-0Ah)+16h] 0 00009E7A 40 inc ax 0 00009E7B 7422 jz .pspnotfound 0 00009E7D 48 dec ax 0 00009E7E 741F jz .pspnotfound ; parent is invalid --> 3499 %if _PM 0 00009E80 39C8 cmp ax, cx 3501 %else 3502 cmp ax, dx 3503 %endif 0 00009E82 741B je .pspnotfound ; parent is the process itself --> 0 00009E84 89C2 mov dx, ax 0 00009E86 39D8 cmp ax, bx 0 00009E88 75CC jne .loop ; parent is not us --> 0 00009E8A 26813D[3C02] cmp word [es:di], int22 0 00009E8F 7506 jne .psphooked 0 00009E91 26395D02 cmp word [es:di+2], bx 0 00009E95 7416 je .found ; correct vector --> (otherwise: hooked) 3512 .psphooked: 0 00009E97 BA[0000] mov dx, msg.psphooked 0 00009E9A B80F01 mov ax, 010Fh 0 00009E9D EB06 jmp short .specificerror_es 3516 .pspnotfound: 0 00009E9F BA[0000] mov dx, msg.pspnotfound 0 00009EA2 B81001 mov ax, 0110h 3519 .specificerror_es: 0 00009EA5 E8[0000] call setrc 3521 .putsz_es: 0 00009EA8 16 push ss 0 00009EA9 07 pop es 3524 .putsz: 0 00009EAA E9[0000] jmp putsz 3526 3527 .found: 0 00009EAD BE[0000] mov si, psp22 0 00009EB0 A5 movsw 0 00009EB1 A5 movsw ; write our parent's vector 0 00009EB2 83C708 add di, 16h-(0Ah+4) 0 00009EB5 A5 movsw ; write our parent 0 00009EB6 800E[0200]40 setopt [internalflags], tsrmode ; note that we are resident 3534 %if _PM 0 00009EBB 51 push cx 3536 %else 3537 push es 3538 %endif 0 00009EBC BA[0000] mov dx, msg.nowtsr1 0 00009EBF E8E6FF call .putsz_es 0 00009EC2 58 pop ax 0 00009EC3 BF[0000] mov di, line_out 0 00009EC6 E8[0000] call hexword 0 00009EC9 E8[0000] call putsline 0 00009ECC BF[0000] mov di, psp22 0 00009ECF 31C0 xor ax, ax 0 00009ED1 AB stosw 0 00009ED2 AB stosw 0 00009ED3 AB stosw ; clear our parent/int22 fields 0 00009ED4 BA[0000] mov dx, msg.nowtsr2 0 00009ED7 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 00009ED9 E81000 call silence_init 0 00009EDC E8[0000] call putsz ; print string 3562 3563 silence_exit: 0 00009EDF F606[0300]10 testopt [internalflags], tt_silent_mode 0 00009EE4 7405 jz @F 0 00009EE6 8026[0300]DF clropt [internalflags], tt_silence 3567 @@: 0 00009EEB C3 retn 3569 3570 3571 silence_init: 0 00009EEC F606[0300]10 testopt [internalflags], tt_silent_mode 0 00009EF1 7405 jz @F 0 00009EF3 800E[0300]20 setopt [internalflags], tt_silence 3575 @@: 0 00009EF8 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 00009EF9 E8F0FF call silence_init 0 00009EFC E8[0000] call putsline 0 00009EFF 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 0 00009F01 F606[0200]80 testopt [options6], opt6_debug_putrunint 0 00009F06 7414 jz @F 0 00009F08 F606[0100]01 testopt [internalflags6], dif6_debug_mode 0 00009F0D 750D jnz @F 0 00009F0F E8950B call reset_interrupts 0 00009F12 800E[0100]01 setopt [internalflags6], dif6_debug_mode 0 00009F17 800E[0100]01 setopt [options6], opt6_debug_mode 3604 @@: 3605 %endif 3606 3607 %if _DEBUG 3608 %if _DEBUG_COND 0 00009F1C F606[0100]01 testopt [internalflags6], dif6_debug_mode 0 00009F21 7409 jz @F 3611 %endif 0 00009F23 F606[0200]40 testopt [options6], opt6_debug_putrunint_early 0 00009F28 7402 jz @F 0 00009F2A CC int3 0 00009F2B 90 nop 3616 @@: 3617 %endif 3618 3619 %if _AREAS_HOOK_SERVER 0 00009F2C 66 _386_PM_o32 ; push ecx 0 00009F2D 51 push cx 0 00009F2E 53 push bx 0 00009F2F 66 _386_PM_o32 ; push esi 0 00009F30 56 push si 3625 0 00009F31 A1[0000] mov ax, word [run_int] 0 00009F34 3D[0000] cmp ax, int1msg 0 00009F37 740F je .end_j 0 00009F39 3D[0000] cmp ax, int3msg 0 00009F3C 740A je .end_j 3631 %if _CATCHINT19 0 00009F3E 3D[0000] cmp ax, int19msg 0 00009F41 7405 je .end_j 3634 %endif 0 00009F43 3D[0000] cmp ax, progtrm 0 00009F46 7503 jne @F 3637 .end_j: 0 00009F48 E92A01 jmp .end 3639 3640 @@: 0 00009F4B 66 _386_PM_o32 ; xor ecx, ecx 0 00009F4C 31C9 xor cx, cx 0 00009F4E E8F6F9 call get_cseip_ecx_linear 0 00009F51 89D3 mov bx, dx ; bx:ax = linear cs:eip 0 00009F53 16 push ss 0 00009F54 07 pop es 0 00009F55 BF[0000] mov di, ddebugareas 0 00009F58 31C9 xor cx, cx 3649 3650 .loop: 3651 %if _PM 0 00009F5A 268B551A mov dx, word [es:di + areastrucNext + 2] 0 00009F5E 268B7D18 mov di, word [es:di + areastrucNext] 0 00009F62 E8[0000] call setes2dx 3655 %else 3656 les di, [es:di + areastrucNext] 3657 mov dx, es 3658 %endif 0 00009F65 3B16[0000] cmp dx, word [pspdbg] 0 00009F69 7503E90701 je .end 3661 0 00009F6E 52 push dx 0 00009F6F 57 push di 0 00009F70 51 push cx 0 00009F71 53 push bx 0 00009F72 50 push ax 3667 0 00009F73 57 push di 0 00009F74 268B4D24 mov cx, word [es:di + areastrucFunAmount] 0 00009F78 268B7D26 mov di, word [es:di + areastrucFunOffset] 0 00009F7C E36E jcxz .noareafun 3672 .loopareafun: 0 00009F7E 263B5D02 cmp bx, word [es:di + areastrucfunLinear + 2] 0 00009F82 7503 jne @F 0 00009F84 263B05 cmp ax, word [es:di + areastrucfunLinear] 3676 @@: 0 00009F87 725E jb .nextareafun 3678 0 00009F89 263B5D06 cmp bx, word [es:di + areastrucfunLinearEnd + 2] 0 00009F8D 7504 jne @F 0 00009F8F 263B4504 cmp ax, word [es:di + areastrucfunLinearEnd] 3682 @@: 0 00009F93 7352 jae .nextareafun 3684 0 00009F95 53 push bx 0 00009F96 50 push ax 0 00009F97 51 push cx 0 00009F98 57 push di 3689 0 00009F99 262B05 sub ax, word [es:di + areastrucfunLinear] 0 00009F9C 261B5D02 sbb bx, word [es:di + areastrucfunLinear + 2] 0 00009FA0 7541 jnz .nextareafun_pop 3693 0 00009FA2 268B4D0A mov cx, word [es:di + areastrucfunListAmount] 0 00009FA6 51 push cx 0 00009FA7 268B7D08 mov di, word [es:di + areastrucfunListOffset] 0 00009FAB F2AF repne scasw 0 00009FAD 59 pop cx 0 00009FAE 7533 jne .nextareafun_pop 0 00009FB0 01C9 add cx, cx 0 00009FB2 4F dec di 0 00009FB3 4F dec di 0 00009FB4 01CF add di, cx 0 00009FB6 6631C9 _386_PM xor ecx, ecx 0 00009FB9 268B0D mov cx, word [es:di] 0 00009FBC 66 _386_PM_o32 0 00009FBD 8B36[0000] mov si, word [reg_esp] 0 00009FC1 66 _386_PM_o32 0 00009FC2 01CE add si, cx 0 00009FC4 1E push ds 3711 %if _PM 0 00009FC5 8B1E[0000] mov bx, word [reg_ss] 0 00009FC9 E8[0000] call test_d_b_bit 0 00009FCC 8EDB mov ds, bx 0 00009FCE 7401 jz .16 3716 .32: 0 00009FD0 67 _386_PM_a32 3718 %else 3719 mov ds, word [reg_ss] 3720 %endif 3721 .16: 0 00009FD1 AD lodsw 0 00009FD2 1F pop ds 3724 .gotfunction: 0 00009FD3 5F pop di 0 00009FD4 59 pop cx 0 00009FD5 5B pop bx ; (discard) 0 00009FD6 5B pop bx 3729 0 00009FD7 92 xchg dx, ax 0 00009FD8 8B1E[0000] mov bx, word [reg_cs] ; bx:dx = cs:ip 0 00009FDC E892F9 call getlinear_16bit ; dx:ax = linear 0 00009FDF 89D3 mov bx, dx ; bx:ax = linear 0 00009FE1 EB09 jmp .noareafun 3735 3736 .nextareafun_pop: 0 00009FE3 5F pop di 0 00009FE4 59 pop cx 0 00009FE5 58 pop ax 0 00009FE6 5B pop bx 3741 .nextareafun: 0 00009FE7 83C70C add di, AREASTRUCFUN_size 0 00009FEA E292 loop .loopareafun 3744 .noareafun: 0 00009FEC 5F pop di 3746 0 00009FED 268B4D20 mov cx, word [es:di + areastrucSubAmount] 0 00009FF1 268B7D22 mov di, word [es:di + areastrucSubOffset] 0 00009FF5 E36F jcxz .noareasub 3750 .loopareasub: 0 00009FF7 263B5D02 cmp bx, word [es:di + areastrucsubLinear + 2] 0 00009FFB 7503 jne @F 0 00009FFD 263B05 cmp ax, word [es:di + areastrucsubLinear] 3754 @@: 0 0000A000 725F jb .nextareasub 3756 0 0000A002 263B5D06 cmp bx, word [es:di + areastrucsubLinearEnd + 2] 0 0000A006 7504 jne @F 0 0000A008 263B4504 cmp ax, word [es:di + areastrucsubLinearEnd] 3760 @@: 0 0000A00C 7353 jae .nextareasub 3762 0 0000A00E 53 push bx 0 0000A00F 50 push ax 0 0000A010 51 push cx 0 0000A011 57 push di 3767 0 0000A012 262B05 sub ax, word [es:di + areastrucsubLinear] 0 0000A015 261B5D02 sbb bx, word [es:di + areastrucsubLinear + 2] 0 0000A019 7542 jnz .nextareasub_pop 3771 0 0000A01B 89C2 mov dx, ax ; = ip 0 0000A01D 268B7508 mov si, word [es:di + areastrucsubListOffset] 0 0000A021 268B4D0A mov cx, word [es:di + areastrucsubListAmount] 3775 .looparea: 0 0000A025 26AD es lodsw 0 0000A027 39C2 cmp dx, ax 0 0000A029 26AD es lodsw 0 0000A02B 722B jb .nextarea 0 0000A02D 39C2 cmp dx, ax 0 0000A02F 7327 jae .nextarea 0 0000A031 26AD es lodsw 0 0000A033 89C3 mov bx, ax ; es:bx -> area message 0 0000A035 92 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. 0 0000A036 26813F0D0A cmp word [es:bx], 13 | (10 << 8) 3796 ; is it with an initial linebreak ? 0 0000A03B 7509 jne @F ; no --> 0 0000A03D F606[0000]10 testopt [serial_flags], sf_use_serial 0 0000A042 7402 jz @F ; if not serial --> 0 0000A044 42 inc dx 0 0000A045 42 inc dx ; skip the linebreak 3802 @@: 0 0000A046 06 push es 0 0000A047 1F pop ds ; => our area hook client's data selector 0 0000A048 E8[0000] call putsz ; display ds:dx -> ASCIZ message 0 0000A04B 16 push ss 0 0000A04C 1F pop ds ; reset ds 0 0000A04D 5F pop di 0 0000A04E 59 pop cx 0 0000A04F 58 pop ax 0 0000A050 5B pop bx 3812 0 0000A051 58 pop ax 0 0000A052 5B pop bx 0 0000A053 59 pop cx 0 0000A054 5F pop di 0 0000A055 5A pop dx 3818 0 0000A056 EB1D jmp .end 3820 3821 .nextarea: 0 0000A058 83C604 add si, 4 0 0000A05B E2C8 loop .looparea 3824 3825 .nextareasub_pop: 0 0000A05D 5F pop di 0 0000A05E 59 pop cx 0 0000A05F 58 pop ax 0 0000A060 5B pop bx 3830 .nextareasub: 0 0000A061 83C70C add di, AREASTRUCSUB_size 0 0000A064 E291 loop .loopareasub 3833 .noareasub: 3834 3835 .next: 0 0000A066 58 pop ax 0 0000A067 5B pop bx 0 0000A068 59 pop cx 0 0000A069 5F pop di 3840 %if _PM 0 0000A06A 5A pop dx 0 0000A06B E8[0000] call setes2dx 3843 %else 3844 pop es 3845 %endif 0 0000A06E E202 loop .loop_j 0 0000A070 EB03 jmp .end 3848 3849 .loop_j: 0 0000A072 E9E5FE jmp .loop 3851 3852 .end: 0 0000A075 66 _386_PM_o32 ; pop esi 0 0000A076 5E pop si 0 0000A077 5B pop bx 0 0000A078 66 _386_PM_o32 ; pop ecx 0 0000A079 59 pop cx 3858 %endif 0 0000A07A 16 push ss 0 0000A07B 07 pop es 3861 3862 .noarea: 0 0000A07C 8B16[0000] mov dx, word [run_int] 0 0000A080 81FA[0000] cmp dx, progtrm 0 0000A084 7515 jne .done 3866 0 0000A086 B8FFFF mov ax, -1 0 0000A089 E8[0000] call InDOS 0 0000A08C 7504 jnz .no_int21_4D 3870 0 0000A08E B44D mov ah, 4Dh 0 0000A090 CD21 int 21h 3873 .no_int21_4D: 0 0000A092 A3[0000] mov word [usertermcode], ax 0 0000A095 BF[0000] mov di, progexit 0 0000A098 E8[0000] call hexword 3877 .done: 0 0000A09B 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 00006F70 0000 usertermcode: dw 0 3888 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 0 0000A09E E806FA call resetmode 3896 %endif 0 0000A0A1 E848FE call silence_init 0 0000A0A4 E85AFE call putrunint 0 0000A0A7 E835FE call silence_exit 3900 %if _CATCHINT19 0 0000A0AA 81FA[0000] cmp dx, int19msg 0 0000A0AE 7409 je .noregs ; if it terminated, skip the registers 3903 %endif 0 0000A0B0 81FA[0000] cmp dx, progtrm 0 0000A0B4 7403 je .noregs ; if it terminated, skip the registers 0 0000A0B6 E8C905 call dumpregs_extended_silent 3907 .noregs: 0 0000A0B9 E87B05 call terminate_silent_dump.if_nonnull 0 0000A0BC E8[0000] call silence_dump 3910 0 0000A0BF F606[0000]08 testopt [internalflags2], dif2_gg_is_gg 0 0000A0C4 7407 jz @F 0 0000A0C6 F606[0200]20 testopt [options], gg_unexpected_no_repeat 0 0000A0CB EB05 jmp @FF 3915 @@: 0 0000A0CD F606[0200]40 testopt [options], tp_unexpected_no_repeat 3917 @@: 0 0000A0D2 7406 jz @F 0 0000A0D4 C706[0000][0000] mov word [lastcmd], dmycmd 3920 @@: 3921 0 0000A0DA 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 0000A0DD F606[0000]80 testopt [internalflags2], dif2_tpg_keep_proceed_bp 0 0000A0E2 7403E9A400 jnz .proceedbreakpoint 3963 3964 %if _PM 0 0000A0E7 E8BDF9 call resetmode 3966 %endif 0 0000A0EA 31C9 xor cx, cx 0 0000A0EC E8[0000] call getcseipbyte 0 0000A0EF 3CCD cmp al, 0CDh ; int opcode? 0 0000A0F1 7403E99800 jne .isstdtrace ; no --> 0 0000A0F6 41 inc cx 0 0000A0F7 E8[0000] call getcseipbyte 0 0000A0FA 3C03 cmp al, 3 0 0000A0FC 7503E98D00 je .isstdtrace ; int 3 opcode --> 0 0000A101 F606[0000]02 testopt [options], traceints ; TM=1? 0 0000A106 7503E9F200 jz isstdtraceX 3977 %if _IMMASM 0 0000A10B F606[0300]02 testopt [internalflags6], dif6_immasm 0 0000A110 7403E9E800 jnz isstdtraceX 3980 %endif 0 0000A115 3C01 cmp al, 1 0 0000A117 7475 je .isstdtrace ; int 1 opcode --> 3983 3984 ; TM==1, single-step into the INT 0 0000A119 88C3 mov bl, al 3986 %if _PM 0 0000A11B E8[0000] call ispm 0 0000A11E 745C jz .singlestep_into_interrupt_pm 3989 %endif 0 0000A120 B700 mov bh, 0 0 0000A122 1E push ds 0 0000A123 31C0 xor ax, ax 0 0000A125 8ED8 mov ds, ax 0 0000A127 D1E3 shl bx, 1 0 0000A129 D1E3 shl bx, 1 0 0000A12B C537 lds si, [bx] 0 0000A12D FA cli 0 0000A12E 8A04 mov al, byte [si] 0 0000A130 FE04 inc byte [si] 0 0000A132 3804 cmp byte [si], al 0 0000A134 8804 mov byte [si], al 0 0000A136 FB sti 0 0000A137 8CDB mov bx, ds ; bx:si-> interrupt handler (RM, 16 bit) 0 0000A139 89D8 mov ax, bx 0 0000A13B 1F pop ds 0 0000A13C 754D jne .singlestep_into_interrupt_setbp 4007 4008 ; The interrupt handler is in a ROM. 4009 %if 0 4010 jmp short isstdtraceX 4011 %else 0 0000A13E 8736[0000] xchg si, word [reg_eip] 0 0000A142 8706[0000] xchg ax, word [reg_cs] ; get cs:ip, set interrupt handler address 0 0000A146 8B0E[0000] mov cx, word [reg_efl] ; get flags 0 0000A14A 1E push ds 0 0000A14B 8B1E[0000] mov bx, word [reg_esp] 0 0000A14F 8E1E[0000] mov ds, word [reg_ss] ; ds:bx-> debuggee stack 0 0000A153 83EB06 sub bx, byte 6 ; reserve enough space for flags, cs, ip 0 0000A156 46 inc si 0 0000A157 46 inc si ; skip CDh xxh opcode 0 0000A158 894F04 mov word [bx+4], cx 0 0000A15B 894702 mov word [bx+2], ax 0 0000A15E 8937 mov word [bx+0], si ; save flags, cs, ip on stack 0 0000A160 1F pop ds 0 0000A161 891E[0000] mov word [reg_esp], bx ; update sp 0 0000A165 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 0000A16A C706[0000][0000] mov word [run_int], int1msg 0 0000A170 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 0000A176 B90800 mov cx, 8 0 0000A179 31C0 xor ax, ax ; NC, ZR 0 0000A17B C3 retn 4039 4040 %endif 4041 %if _PM 4042 .singlestep_into_interrupt_pm: 0 0000A17C B80402 mov ax, 0204h 0 0000A17F CD31 int 31h 0 0000A181 89CB mov bx, cx 0 0000A183 66 _386_o32 ; mov esi, edx 0 0000A184 89D6 mov si, dx ; bx:(e)si-> interrupt handler 0 0000A186 F6C304 test bl, 4 ; is it a LDT selector? (NC) 0 0000A189 7472 jz isstdtraceX ; no --> 4050 %endif 4051 .singlestep_into_interrupt_setbp: 4052 .proceedbreakpoint: 0 0000A18B E9E606 jmp proceedbreakpoint 4054 4055 .isstdtrace: 4056 %if _PM 0 0000A18E E8[0000] call ispm 0 0000A191 7415 jz .notdpmientry ; already in PM --> 0 0000A193 A1[0000] mov ax, w[reg_eip] ; is this a switch to protected mode ? 0 0000A196 3B06[0000] cmp ax, w[dpmiwatch+0] 0 0000A19A 750C jne .notdpmientry 0 0000A19C A1[0000] mov ax, w[reg_cs] 0 0000A19F 3B06[0200] cmp ax, w[dpmiwatch+2] 0 0000A1A3 7503E9AC06 je isdpmientry ; yes, catch it --> (this means really "go") 4065 .notdpmientry: 4066 %endif 0 0000A1A8 800E[0100]01 or byte [reg_efl+1], 1 ; set single-step mode (cleared when returning into DEBUG) 0 0000A1AD 31C9 xor cx, cx 0 0000A1AF E86300 call skipprefixes 0 0000A1B2 3C9C cmp al, 9Ch ; opcode "PUSHF"? 0 0000A1B4 7527 jnz .notpushf 4072 %if _BREAKPOINTS 0 0000A1B6 E85D07 call run_with_bb 0 0000A1B9 B400 mov ah, 0 0 0000A1BB 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 0000A1BC 06 push es 4084 %if _PM 0 0000A1BD 8B1E[0000] mov bx, word [reg_ss] ; get ss selector into bx 0 0000A1C1 8EC3 mov es, bx 0 0000A1C3 E8[0000] _386 call test_d_b_bit ; check whether a 32-bit ss 4088 %else 4089 mov es, word [reg_ss] 4090 %endif 0 0000A1C6 66 _386_PM_o32 ; mov ebx, dword [reg_esp] 0 0000A1C7 8B1E[0000] mov bx, word [reg_esp] ; es:(e)bx-> debuggee's stack 0 0000A1CB 7408 _386_PM jz .pushf_16 0 0000A1CD 2667806301FE _386_PM and byte [es:ebx+1], ~1 ; clear TF 0 0000A1D3 EB05 _386_PM jmp short .pushf_common 4096 .pushf_16: 0 0000A1D5 26806701FE and byte [es:bx+1], ~1 ; clear TF 4098 .pushf_common: 0 0000A1DA 07 pop es 0 0000A1DB EB06 jmp short .checkreturn 4101 .notpushf: 4102 %if _BREAKPOINTS 0 0000A1DD E83607 call run_with_bb 0 0000A1E0 B400 mov ah, 0 0 0000A1E2 9C pushf 4106 %else 4107 call run 4108 xor cx, cx 4109 xor ax, ax 4110 %endif 4111 .checkreturn: 0 0000A1E3 813E[0000][0000] cmp word [run_int], int1msg 0 0000A1E9 7509 jne .nomatch 0 0000A1EB 80C908 or cl, 8 4115 %if _BREAKPOINTS 0 0000A1EE 9D popf ; CF 0 0000A1EF 7308 jnc .ret_NZ_NC 4118 %endif 0 0000A1F1 38C0 cmp al, al ; if correct interrupt (ZR, NC) 0 0000A1F3 C3 retn 4121 4122 .nomatch: 4123 %if _BREAKPOINTS 0 0000A1F4 9D popf ; CF 0 0000A1F5 7302 jnc .ret_NZ_NC 4126 %endif 0 0000A1F7 F9 stc 0 0000A1F8 C3 retn 4129 4130 %if _BREAKPOINTS 4131 .ret_NZ_NC: 0 0000A1F9 80C904 or cl, 4 ; (NZ, NC) 0 0000A1FC 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 0000A1FD B90200 mov cx, 2 0 0000A200 E84800 call iswriteablecseip ; is it ROM ? 0 0000A203 7289 jc traceone.isstdtrace ; is read-only --> 0 0000A205 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. 0 0000A209 66 _386_PM_o32 ; mov esi, dword [reg_eip] 0 0000A20A 8B36[0000] mov si, word [reg_eip] 0 0000A20E 66 _386_PM_o32 ; add esi, byte 2 0 0000A20F 83C602 add si, byte 2 ; ! do not remove the byte override, else o32 won't work 0 0000A212 E95F06 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 0000A215 E8[0000] call getcseipbyte 0 0000A218 3C26 cmp al, 26h 0 0000A21A 742A je .prefix ; ES 0 0000A21C 3C2E cmp al, 2Eh 0 0000A21E 7426 je .prefix ; CS 0 0000A220 3C36 cmp al, 36h 0 0000A222 7422 je .prefix ; SS 0 0000A224 3C3E cmp al, 3Eh 0 0000A226 741E je .prefix ; DS 0 0000A228 3CF0 cmp al, 0F0h 0 0000A22A 741A je .prefix ; LOCK 0 0000A22C 3CF3 cmp al, 0F3h 0 0000A22E 7416 je .prefix ; REPZ 0 0000A230 3CF2 cmp al, 0F2h 0 0000A232 7412 je .prefix ; REPNZ 0 0000A234 EB14 _no386_jmps .noprefix ; no 386, following aren't prefixes (invalid opcodes on 186+) --> 0 0000A236 3C64 cmp al, 64h 0 0000A238 740C je .prefix ; FS 0 0000A23A 3C65 cmp al, 65h 0 0000A23C 7408 je .prefix ; GS 0 0000A23E 3C66 cmp al, 66h 0 0000A240 7404 je .prefix ; o32/o16 0 0000A242 3C67 cmp al, 67h 0 0000A244 7504 jne .noprefix ; not a32/a16 4188 .prefix: 0 0000A246 41 inc cx 4190 ; jmp short . 0 0000A247 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 0000A249 49 dec cx ; back to 07FFFh 4194 .noprefix: 0 0000A24A 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 0000A24B E8[0000] call getcseipbyte ; get byte at CS:EIP+CX 0 0000A24E 88C4 mov ah, al 0 0000A250 34FF xor al, 0FFh 0 0000A252 E8[0000] call setcseipbyte 0 0000A255 720E jc .return 0 0000A257 E8[0000] call getcseipbyte 0 0000A25A 38C4 cmp ah, al ; is it ROM? 0 0000A25C F9 stc 0 0000A25D 7406 jz .return 0 0000A25F 88E0 mov al, ah 0 0000A261 E8[0000] call setcseipbyte 0 0000A264 F8 clc 4214 .return: 0 0000A265 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 00006F72 FA cli 0 00006F73 8CC8 mov ax, cs 0 00006F75 8ED8 mov ds, ax ; => debugger data segment 0 00006F77 8F06[0000] pop word [exception_csip] ; ip 0 00006F7B 8F06[0200] pop word [exception_csip + 2] ; cs 0 00006F7F 5A pop dx ; get rid of flags 4228 %if _AREAS 0 00006F80 FC cld 0 00006F81 8EC0 mov es, ax 0 00006F83 89E6 mov si, sp 0 00006F85 BF[0000] mov di, exception_stack 0 00006F88 B90800 mov cx, 8 0 00006F8B F3A4 rep movsb 4235 %endif 0 00006F8D 8ED0 mov ss, ax 4237 %ifn _ONLY386 4238 ..@patch_no386_ds_6_DATA_ENTRY: 0 00006F8F 66 o32 ; mov esp, dword [savesp] 4240 %endif 0 00006F90 8B26[0000] mov sp, word [savesp] 0 00006F94 90 times 1 - (($ - $$) & 1) nop ; align in-code parameter 0 00006F95 E8[0000] call entry_to_code_seg 0 00006F98 [8912] dw .code 4245 4246 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 4246 ------------------ note: usesection lDEBUG_CODE 4247 .code: 0 0000A266 FB sti 4249 %endif 4250 %if _PM || _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 4251 debuggerexception: 0 0000A267 FC cld 0 0000A268 16 push ss 0 0000A269 1F pop ds 4255 %if _DEBUG && _DEBUG_COND 0 0000A26A F606[0000]80 testopt [options6], opt6_debug_exception 0 0000A26F 7414 jz @F 0 0000A271 F606[0100]01 testopt [internalflags6], dif6_debug_mode 0 0000A276 750D jnz @F 0 0000A278 E82C08 call reset_interrupts 0 0000A27B 800E[0100]01 setopt [internalflags6], dif6_debug_mode 0 0000A280 800E[0100]01 setopt [options6], opt6_debug_mode 4263 @@: 4264 %endif 4265 4266 %if _DEBUG 4267 %if _DEBUG_COND 0 0000A285 F606[0100]01 testopt [internalflags6], dif6_debug_mode 0 0000A28A 7409 jz @F 4270 %endif 0 0000A28C F606[0000]40 testopt [options6], opt6_debug_exception_early 0 0000A291 7402 jz @F 0 0000A293 CC int3 0 0000A294 90 nop 4275 @@: 4276 %endif 0 0000A295 E8[0000] call unhack ; sets es to ss 4278 4279 %if _AREAS 0 0000A298 8CCB mov bx, cs 0 0000A29A 3B1E[0200] cmp bx, word [exception_csip + 2] 0 0000A29E 7532 jne .unknownarea 0 0000A2A0 A1[0000] mov ax, word [exception_csip] 0 0000A2A3 BF[A800] mov di, areafunctions 0 0000A2A6 B90A00 mov cx, areafunctions.amount 0 0000A2A9 F2AF repne scasw 0 0000A2AB 7508 jne .unknownfunction 0 0000A2AD BB[0000] mov bx, exception_stack 0 0000A2B0 035D12 add bx, word [di - areafunctions - 2 + areafunctions.skip] 0 0000A2B3 8B07 mov ax, [bx] 4291 .gotfunction: 4292 4293 .unknownfunction: 0 0000A2B5 89C2 mov dx, ax ; = ip 0 0000A2B7 BE[3000] mov si, areas 0 0000A2BA B90E00 mov cx, areas.amount 4297 .looparea: 0 0000A2BD AD lodsw 0 0000A2BE 39C2 cmp dx, ax 0 0000A2C0 AD lodsw 0 0000A2C1 720B jb .nextarea 0 0000A2C3 39C2 cmp dx, ax 0 0000A2C5 7307 jae .nextarea 0 0000A2C7 AD lodsw 0 0000A2C8 92 xchg ax, dx 0 0000A2C9 E8[0000] call putsz 0 0000A2CC EB04 jmp .donearea 4308 .nextarea: 0 0000A2CE AD lodsw 0 0000A2CF AD lodsw 0 0000A2D0 E2EB loop .looparea 4312 4313 .donearea: 4314 .unknownarea: 4315 %endif 0 0000A2D2 E8A7FD call putrunint.noarea 4317 %if _EXCCSIP 0 0000A2D5 BF[0000] mov di, exccsip 0 0000A2D8 A1[0200] mov ax, word [exception_csip + 2] 0 0000A2DB E8[0000] call hexword 0 0000A2DE 47 inc di 0 0000A2DF A1[0000] mov ax, word [exception_csip] 0 0000A2E2 E8[0000] call hexword 4324 0 0000A2E5 BA[0000] mov dx, excloc 0 0000A2E8 E8[0000] call putsz 4327 %endif 4328 %if _DEBUG 4329 %if _DEBUG_COND 0 0000A2EB F606[0100]01 testopt [internalflags6], dif6_debug_mode 0 0000A2F0 7408 jz @F 4332 %endif 0 0000A2F2 F606[0000]20 testopt [options6], opt6_debug_exception_late 0 0000A2F7 7401 jz @F 0 0000A2F9 CC int3 4336 @@: 4337 %endif 0 0000A2FA 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 00006F9A 00 align 8, db 0 4364 areas: 4365 .: 4366 ; More specific areas first! 4367 ; (The first range match wins.) 0 00006FA0 [0000][0000][0000] areadefine ee_interactive_access 0 00006FA6 0000 4369 %ifn _DUALCODE && _EXPRDUALCODE 4370 areadefine hh_indirection_memory_access 4371 %else 0 00006FA8 [0000][0000][0000] areadefine hh_code1_indirection_memory_access, hh_indirection_memory_access 0 00006FAE 0000 4373 %endif 0 00006FB0 [0000][0000][0000] areadefine rr_variable_read_access 0 00006FB6 0000 0 00006FB8 [0000][0000][0000] areadefine rr_variable_write_access 0 00006FBE 0000 0 00006FC0 [0000][0000][0000] areadefine uu_referenced_memory_access 0 00006FC6 0000 0 00006FC8 [0000][0000][0000] areadefine uu_simulate_scas 0 00006FCE 0000 0 00006FD0 [0000][0000][0000] areadefine uu_simulate_cmps 0 00006FD6 0000 0 00006FD8 [0000][0000][0000] areadefine aa_access 0 00006FDE 0000 0 00006FE0 [0000][0000][0000] areadefine dd_access 0 00006FE6 0000 0 00006FE8 [0000][0000][0000] areadefine ee_access 0 00006FEE 0000 0 00006FF0 [0000][0000][0000] areadefine rr_access 0 00006FF6 0000 0 00006FF8 [0000][0000][0000] areadefine sss_access 0 00006FFE 0000 0 00007000 [0000][FF1F][0000] areadefine run_access 0 00007006 0000 0 00007008 [0000][0000][0000] areadefine uu_access 0 0000700E 0000 4386 .end: 4387 .amount: equ (.end - .) / 8 4388 4389 %if _DUALCODE && _EXPRDUALCODE 4390 areas2: 4391 .: 0 00007010 [0000][0000][0000] areadefine hh_indirection_memory_access 0 00007016 0000 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 00007018 [0000][0000][0000] repeatdw AREAFUNCTIONS 0 0000701E [0000][0000][0000] 0 00007024 [0000][0000][0000] 0 0000702A [0000] 4415 .end: 4416 .amount: equ (.end - .) / 2 4417 .skip: 0 0000702C 040004000400020002 repeatdw AREAFUNCTIONSSKIP 0 00007035 000200020002000600 0 0000703E 0600 4419 4420 4421 %if _AREAS_HOOK_CLIENT 4422 areas_struc: 4423 istruc AREASTRUC 4424 at areastrucEntry 0 00007040 F9 stc 0 00007041 CB retf 0 00007042 00FFFFFF at areastrucNext, dd -1 0 0000705B FF 0 0000705C FFFFFFFF at areastrucPrev, dd -1 0 00007060 0200 at areastrucSubAmount, dw areas_sub_amount 0 00007062 [F800] at areastrucSubOffset, dw areas_sub 0 00007064 0100 at areastrucFunAmount, dw 1 0 00007066 [1001] at areastrucFunOffset, dw areas_fun 4433 iend 4434 4435 areas_sub: 4436 istruc AREASTRUCSUB 0 00007068 00000000 at areastrucsubLinear, dd 0 4438 at areastrucsubLinearEnd 4439 %ifn _LINK 4440 dd ldebug_code_size 4441 %else 0 0000706C [0000] dw behind_code wrt lDEBUG_CODE 4443 %endif 0 0000706E 00[3000] at areastrucsubListOffset, dw areas 0 00007072 0E00 at areastrucsubListAmount, dw areas.amount 4446 iend 4447 %if _DUALCODE && _EXPRDUALCODE 4448 istruc AREASTRUCSUB 0 00007074 00000000 at areastrucsubLinear, dd 0 4450 at areastrucsubLinearEnd 4451 %ifn _LINK 4452 dd ldebug_code2_size 4453 %else 0 00007078 [0000] dw behind_code2 wrt lDEBUG_CODE2 4455 %endif 0 0000707A 00[A000] at areastrucsubListOffset, dw areas2 0 0000707E 0100 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 0 00007080 00000000 at areastrucfunLinear, dd 0 4465 at areastrucfunLinearEnd 4466 %ifn _LINK 4467 dd ldebug_code_size 4468 %else 0 00007084 [0000] dw behind_code wrt lDEBUG_CODE 4470 %endif 0 00007086 00[A800] at areastrucfunListOffset, dw areafunctions 0 0000708A 0A00 at areastrucfunListAmount, dw areafunctions.amount 4473 iend 4474 %endif 4475 4476 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 0 0000A2FD E8[0000] call test_d_b_bit 0 0000A300 7403 jz .16 0 0000A302 80F603 xor dh, 1|2 ; toggle OSIZE and ASIZE (once) 4488 .16: 0 0000A305 C3 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 0000A306 E8[0000] call enable_rh 4497 %endif 0 0000A309 C706[0000][2913] mov word [lastcmd], pp 0 0000A30F 800E[0100]10 setopt [internalflags2], dif2_is_pp 0 0000A314 E8DA0A call parse_pt ; process arguments 4501 4502 ; Do it times. First check the type of instruction. 4503 pp1: 0 0000A317 53 push bx 0 0000A318 51 push cx ; save bx:cx 4506 %if _PM 0 0000A319 E88BF7 call resetmode 4508 %endif 0 0000A31C BA0F00 mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 0 0000A31F 8B1E[0000] mov bx, word [reg_cs] 0 0000A323 66 _386_PM_o32 ; mov esi, dword [reg_eip] 0 0000A324 8B36[0000] mov si, word [reg_eip] 4513 pp2: 0 0000A328 E8DF05 call pp16 ; get next instruction byte into AL 0 0000A32B BF[0000] mov di, ppbytes 0 0000A32E B9[0000] mov cx, PPLEN 0 0000A331 A2[0000] mov byte [pp_instruction], al 0 0000A334 F2AE repne scasb 0 0000A336 7534 jne pp5 ; if not one of these --> 4520 %if _LINK_COMPAT 0 0000A338 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 0000A33C A880 test al, PP_PREFIX ; prefix ? 0 0000A33E 740F jz pp3 ; no --> 0 0000A340 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 0000A342 FECA dec dl 0 0000A344 75E2 jnz pp2 ; if not out of bytes --> 0 0000A346 BA[0000] mov dx, msg.warnprefix 0 0000A349 E8[0000] call putsz 0 0000A34C E9F300 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: 0 0000A34F E8ABFF _386_PM call pp_fix32bitflags 0 0000A352 66 _386_PM_o32 0 0000A353 8936[0000] mov word [pp_operand], si 0 0000A357 A840 test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 0 0000A359 7405 jz .ignoreosize ; no --> 0 0000A35B 80E602 and dh, 2 0 0000A35E 00F0 add al, dh 4549 .ignoreosize: 0 0000A360 83E007 and ax, PP_SIZ_MASK 0 0000A363 660FB7C0 _386_PM movzx eax, ax ; clear high word (in case it counts) 0 0000A367 66 _386_PM_o32 ; add esi, eax 0 0000A368 01C6 add si, ax 0 0000A36A EB5C jmp pp10 4555 4556 4557 pp5: 0 0000A36C E88EFF _386_PM call pp_fix32bitflags 0 0000A36F 3CFF cmp al, 0FFh ; FF/2 or FF/3 indirect NEAR or FAR call ? 0 0000A371 7403E9CC00 jne pp12 ; no, just an ordinary instruction --> 0 0000A376 E89105 call pp16 ; get MOD REG R/M byte 0 0000A379 24F7 and al, ~ (1 << 3) ; clear lowest bit of REG field (/3 to /2) 0 0000A37B 3410 xor al, 2 << 3 ; /3 or /2 to /0 0 0000A37D A838 test al, 7 << 3 0 0000A37F 7403E9BE00 jnz pp12 ; if not FF/2 or FF/3 --> 0 0000A384 3CC0 cmp al, 0C0h ; mod = 3 ? 0 0000A386 7340 jae .adjust0 ; if just a register --> 0 0000A388 F6C601 test dh, 1 0 0000A38B 750E jnz .a32 ; if 32-bit addressing --> 0 0000A38D 3C06 cmp al, 6 ; mod = 0 r/m = 6 would encode bp ? 0 0000A38F 7433 je .adjust2 ; if just plain disp16 --> 0 0000A391 3C40 cmp al, 40h 0 0000A393 7233 jb .adjust0 ; if indirect register --> 0 0000A395 3C80 cmp al, 80h 0 0000A397 722D jb .adjust1 ; if disp8[reg(s)] 0 0000A399 EB29 jmp short .adjust2 ; it's disp16[reg(s)] 4577 4578 ; Handle 32-bit addressing (A32 ModR/M referencing memory) 4579 .a32: 0 0000A39B 3C05 cmp al, 5 ; mod = 0 and r/m = 5 (would encode ebp) ? 0 0000A39D 7421 je .adjust4 ; if just plain disp32 --> 0 0000A39F 3404 xor al, 4 ; 4 to 0 (r/m 4 would encode esp) 0 0000A3A1 A807 test al, 7 ; 0 if r/m would encode esp 0 0000A3A3 7513 jnz .a32_nosib ; if no SIB byte --> 0 0000A3A5 86C4 xchg al, ah 0 0000A3A7 E86005 call pp16 0 0000A3AA 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 0000A3AC A8C0 test al, 0C0h ; is it mod = 0 ? 0 0000A3AE 7508 jnz @F ; no, not a special case --> 0 0000A3B0 80E407 and ah, 7 0 0000A3B3 80FC05 cmp ah, 5 ; is it base = 5 ? 0 0000A3B6 7408 je .adjust4 ; yes, special case encoding of disp32 --> 4598 @@: 4599 .a32_nosib: 0 0000A3B8 3C40 cmp al, 40h 0 0000A3BA 720C jb .adjust0 ; if indirect register --> 0 0000A3BC 3C80 cmp al, 80h 0 0000A3BE 7206 jb .adjust1 ; if disp8[reg(s)] --> 4604 ; otherwise, it's disp32[reg(s)] 4605 .adjust4: 0 0000A3C0 66 _386_PM_o32 ; inc esi 0 0000A3C1 46 inc si ; skip an instruction byte 0 0000A3C2 66 _386_PM_o32 ; inc esi 0 0000A3C3 46 inc si ; skip an instruction byte 4610 .adjust2: 0 0000A3C4 66 _386_PM_o32 ; inc esi 0 0000A3C5 46 inc si ; skip an instruction byte 4613 .adjust1: 0 0000A3C6 66 _386_PM_o32 ; inc esi 0 0000A3C7 46 inc si ; skip an instruction byte 4616 .adjust0: 4617 4618 pp10: 0 0000A3C8 66 _386_PM_o32 0 0000A3C9 56 push si 4621 0 0000A3CA 803E[0000]E8 cmp byte [pp_instruction], 0E8h 0 0000A3CF 7552 jne .done 4624 0 0000A3D1 66 _386_PM_o32 0 0000A3D2 8B36[0000] mov si, word [pp_operand] 4627 0 0000A3D6 6631C0 _386_PM xor eax, eax 0 0000A3D9 E82E05 call pp16 0 0000A3DC 86C4 xchg al, ah 0 0000A3DE E82905 call pp16 0 0000A3E1 86C4 xchg al, ah 0 0000A3E3 EB05 _386_PM jmp @F 0 0000A3E5 F6C602 test dh, 2 0 0000A3E8 7539 jnz .notcallrel16 4636 @@: 0 0000A3EA F6C602 _386_PM test dh, 2 0 0000A3ED 7412 _386_PM jz @F 4639 0 0000A3EF 66C1C010 _386_PM rol eax, 16 0 0000A3F3 E81405 _386_PM call pp16 0 0000A3F6 86C4 _386_PM xchg al, ah 0 0000A3F8 E80F05 _386_PM call pp16 0 0000A3FB 86C4 _386_PM xchg al, ah 0 0000A3FD 66C1C010 _386_PM rol eax, 16 4646 @@: 0 0000A401 66 _386_PM_o32 0 0000A402 01C6 add si, ax 0 0000A404 B20F mov dl, 15 ; number of bytes to go 4650 .loop: 0 0000A406 E80105 call pp16 0 0000A409 3CCB cmp al, 0CBh ; retf ? 0 0000A40B 7417 je .trace 0 0000A40D 3CCA cmp al, 0CAh ; retf imm16 ? 0 0000A40F 7413 je .trace 0 0000A411 3CCF cmp al, 0CFh ; iret ? 0 0000A413 740F je .trace 0 0000A415 BF[0000] mov di, ppbytes 0 0000A418 B9[0000] mov cx, PPLEN_ONLY_PREFIXES 0 0000A41B F2AE repne scasb 0 0000A41D 7504 jne .done 4662 ; if one of the prefixes 0 0000A41F FECA dec dl 0 0000A421 75E3 jnz .loop ; if not out of bytes --> 4665 4666 ; fall through: do not trace 4667 .notcallrel16: 4668 .done: 0 0000A423 A8 db __TEST_IMM8 ; (skip stc, NC) 4670 .trace: 0 0000A424 F9 stc ; trace 0 0000A425 66 _386_PM_o32 0 0000A426 5E pop si 4674 0 0000A427 7219 jc pp12 ; trace --> 4676 %if _SYMBOLIC 0 0000A429 E87000 call pp3_check_symhints 0 0000A42C 7214 jc pp12 ; trace --> 4679 %endif 4680 ; jmp pp11 ; we have a skippable instruction here 4681 pp11: 0 0000A42E E8[0000] _386_PM call test_d_b_bit 0 0000A431 7504 _386_PM jnz .32 ; full 32-bit offset valid --> 0 0000A433 660FB7F6 _386_PM movzx esi, si ; clear high word here 4685 .32: 4686 @@: 0 0000A437 E83A04 call proceedbreakpoint ; run until the breakpoint is hit 0 0000A43A 725D jc pp15 ; unexpected --> 4689 %if _BREAKPOINTS 0 0000A43C 7515 jnz pp12.bb_hit 4691 %endif 0 0000A43E 31D2 xor dx, dx ; do not skip WHILE 0 0000A440 EB2F jmp short pp13 4694 4695 pp12: 0 0000A442 F606[0000]80 testopt [internalflags2], dif2_tpg_keep_proceed_bp 0 0000A447 75EE jnz @B 4698 0 0000A449 E891FC call traceone 0 0000A44C 724B jc pp15 4701 ; jc unexpectedinterrupt 4702 4703 %if _BREAKPOINTS 0 0000A44E BA0000 mov dx, 0 ; do not skip WHILE 0 0000A451 7416 jz @F 4706 4707 .bb_hit: 0 0000A453 E8E3F8 call handle_bb_hit_pass_match 0 0000A456 7204 jc .actual_hit 4710 d5 call d5message 4711 d5 asciz "in pp12.bb_hit after non-hit",13,10 0 0000A458 7422 jz pp13.nodump 0 0000A45A EB15 jmp pp13 4714 4715 4716 .actual_hit: 4717 %if _PM 0 0000A45C E848F6 call resetmode 4719 %endif 0 0000A45F E832EF call put_deferred_message_silent 0 0000A462 E81D02 call dumpregs_extended_silent 0 0000A465 59 pop cx 0 0000A466 5B pop bx ; (discard counter) 0 0000A467 EB26 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 0000A469 813E[0000][0000] cmp word [run_int], int1msg 0 0000A46F 7528 jne pp15 ; if some other interrupt (unexpected) --> 4739 4740 pp13: 0 0000A471 52 push dx 4742 %if _PM 0 0000A472 E832F6 call resetmode 4744 %endif 4745 ; An expected breakpoint. Dump registers, then loop. 0 0000A475 E81CEF call put_deferred_message_silent 0 0000A478 E80702 call dumpregs_extended_silent 0 0000A47B 5A pop dx ; preserve skip WHILE flag 4749 4750 .nodump: 0 0000A47C E868F8 call tt_handle_while 0 0000A47F 59 pop cx 0 0000A480 5B pop bx 4754 0 0000A481 83E901 sub cx, 1 0 0000A484 83DB00 sbb bx, 0 4757 0 0000A487 85DB test bx, bx 0 0000A489 750B jnz pp14 0 0000A48B 85C9 test cx, cx 0 0000A48D 7507 jnz pp14 ; back for more --> 4762 4763 @@: 4764 %if _PM 0 0000A48F E815F6 call resetmode 4766 %endif 0 0000A492 E8[0000] call silence_dump 4768 0 0000A495 C3 retn 4770 4771 %if ($ - pp1 - 1) < 128 4772 pp14: equ pp1 4773 %else 0 0000A496 E97EFE pp14: jmp pp1 4775 %endif 4776 4777 pp15: 0 0000A499 E902FC 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: 0 0000A49C E8[0000] 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: 0 0000A49F 31C0 xor ax, ax 4797 lframe 0 0000A4A1 5589E5 lenter 4799 lvar word, segment 0 0000A4A4 53 push bx 4801 lvar dword, offset 4802 %ifn _PM 4803 push ax 4804 %else 0 0000A4A5 50 _no386 push ax 4806 %endif 0 0000A4A6 66 _386_PM_o32 0 0000A4A7 56 push si 4809 lvar word, skip 0 0000A4A8 50 push ax 4811 0 0000A4A9 A0[0000] mov al, byte [pp_instruction] 0 0000A4AC 3CE8 cmp al, 0E8h 0 0000A4AE 7403E98300 jne .notcallrel16 0 0000A4B3 66 _386_PM_o32 0 0000A4B4 8B36[0000] mov si, word [pp_operand] 4817 0 0000A4B8 660FB7C0 _386_PM movzx eax, ax 0 0000A4BC E84B04 call pp16 0 0000A4BF 86C4 xchg al, ah 0 0000A4C1 E84604 call pp16 0 0000A4C4 86C4 xchg al, ah 0 0000A4C6 EB05 _386_PM jmp @F 0 0000A4C8 F6C602 test dh, 2 0 0000A4CB 7569 jnz .notcallrel16 4826 @@: 0 0000A4CD F6C602 _386_PM test dh, 2 0 0000A4D0 7412 _386_PM jz @F 4829 0 0000A4D2 66C1C010 _386_PM rol eax, 16 0 0000A4D6 E83104 _386_PM call pp16 0 0000A4D9 86C4 _386_PM xchg al, ah 0 0000A4DB E82C04 _386_PM call pp16 0 0000A4DE 86C4 _386_PM xchg al, ah 0 0000A4E0 66C1C010 _386_PM rol eax, 16 4836 @@: 0 0000A4E4 66 _386_PM_o32 0 0000A4E5 01C6 add si, ax 0 0000A4E7 66 _386_PM_o32 0 0000A4E8 89F2 mov dx, si 0 0000A4EA E866F4 call getlinear_d_b 0 0000A4ED 7247 jc @F 0 0000A4EF 89D1 mov cx, dx 0 0000A4F1 89C3 mov bx, ax 0 0000A4F3 E8[0000]EB02[0000] nearcall binsearchmain ; search for matching symbol 0 0000A4FA E33A jcxz @F 4847 .loop_symbol: 0 0000A4FC 53 push bx ; main index 0 0000A4FD 50 push ax ; (reserve space, uninitialised) 0 0000A4FE E8[0000]EB02[0000] dualcall getfarpointer.main 0 0000A505 5F pop di 0 0000A506 07 pop es 4853 0 0000A507 26F6450D04 test byte [es:di + smFlags + 1], smfSymHint >> 8 0 0000A50C 7425 jz .next_symbol 4856 0 0000A50E E8DF00 nearcall zz_copy_strings_to_str_buffer 4858 0 0000A511 51 push cx 0 0000A512 16 push ss 0 0000A513 07 pop es 4862 %if _LINK 0 0000A514 BF[0000] mov di, str_buffer 4864 wlcalc word_ext_msg.symhint_size, equ $ - 2 4865 %else 4866 mov di, str_buffer + msg.symhint_size 4867 %endif 0 0000A517 BE[0000] mov si, msg.trace_caller 0 0000A51A B9[0000] mov cx, msg.trace_caller_size 0 0000A51D 57 push di 0 0000A51E F3A6 repe cmpsb 0 0000A520 5F pop di 0 0000A521 59 pop cx 0 0000A522 7468 je pp3_trace 4875 0 0000A524 51 push cx 0 0000A525 BE[0000] mov si, msg.skip_caller 0 0000A528 B9[0000] mov cx, msg.skip_caller_size 0 0000A52B F3A6 repe cmpsb 0 0000A52D 59 pop cx 0 0000A52E 7503 jne .next_symbol 4882 0 0000A530 E87600 call pp3_handle_skip_di 4884 4885 .next_symbol: 0 0000A533 43 inc bx 0 0000A534 E2C6 loop .loop_symbol 4888 4889 @@: 4890 .notcallrel16: 4891 4892 4893 ; Check for ..@symhint_trace|skip_here_* hint at cs:eip address. 4894 pp3_check_trace_here_or_skip_here: 0 0000A536 8B1E[0000] mov bx, word [reg_cs] 0 0000A53A 66 _386_PM_o32 0 0000A53B 8B16[0000] mov dx, word [reg_eip] 0 0000A53F E811F4 call getlinear_d_b 0 0000A542 7247 jc @F 0 0000A544 89D1 mov cx, dx 0 0000A546 89C3 mov bx, ax 0 0000A548 E8[0000]EB02[0000] nearcall binsearchmain ; search for matching symbol 0 0000A54F E33A jcxz @F 4904 .loop_symbol: 0 0000A551 53 push bx ; main index 0 0000A552 50 push ax ; (reserve space, uninitialised) 0 0000A553 E8[0000]EB02[0000] dualcall getfarpointer.main 0 0000A55A 5F pop di 0 0000A55B 07 pop es 4910 0 0000A55C 26F6450D04 test byte [es:di + smFlags + 1], smfSymHint >> 8 0 0000A561 7425 jz .next_symbol 4913 0 0000A563 E88A00 nearcall zz_copy_strings_to_str_buffer 4915 0 0000A566 51 push cx 0 0000A567 16 push ss 0 0000A568 07 pop es 4919 %if _LINK 0 0000A569 BF[0000] mov di, str_buffer 4921 wlcalc word_ext_msg.symhint_size, equ $ - 2 4922 %else 4923 mov di, str_buffer + msg.symhint_size 4924 %endif 0 0000A56C BE[0000] mov si, msg.trace_here 0 0000A56F B9[0000] mov cx, msg.trace_here_size 0 0000A572 57 push di 0 0000A573 F3A6 repe cmpsb 0 0000A575 5F pop di 0 0000A576 59 pop cx 0 0000A577 7413 je pp3_trace 4932 0 0000A579 51 push cx 0 0000A57A BE[0000] mov si, msg.skip_here 0 0000A57D B9[0000] mov cx, msg.skip_here_size 0 0000A580 F3A6 repe cmpsb 0 0000A582 59 pop cx 0 0000A583 7503 jne .next_symbol 4939 0 0000A585 E82100 call pp3_handle_skip_di 4941 4942 .next_symbol: 0 0000A588 43 inc bx 0 0000A589 E2C6 loop .loop_symbol 4945 4946 @@: 0 0000A58B A8 db __TEST_IMM8 ; skip stc, NC 4948 pp3_trace: 0 0000A58C F9 stc 4950 0 0000A58D 16 push ss 0 0000A58E 07 pop es 0 0000A58F 16 push ss 0 0000A590 1F pop ds 4955 0 0000A591 C706[0000][0000] mov word [stack_low_address], str_buffer 4957 0 0000A597 5A pop dx ; ?skip 0 0000A598 66 _386_PM_o32 0 0000A599 5E pop si ; ?offset 4961 %ifn _PM 4962 pop ax ; ?offset high word 4963 %else 0 0000A59A 58 _no386 pop ax ; ?offset high word (if it was not pop esi) 4965 %endif 0 0000A59B 5B pop bx ; ?segment 4967 ; restore bx:(e)si if proceeding, else discard 0 0000A59C 89EC5D lleave code 0 0000A59F 9F lahf 0 0000A5A0 660FB7D2 _386_PM movzx edx, dx 0 0000A5A4 66 _386_PM_o32 0 0000A5A5 01D6 add si, dx 0 0000A5A7 9E sahf 0 0000A5A8 C3 retn 4975 4976 4977 ; INP: ds:di -> symbol with ASCIZ keyword or expression 4978 ; word [bp + ?segment] = segment/selector of breakpoint 4979 ; (d)word [bp + ?offset] = offset of breakpoint 4980 ; OUT: word [bp + ?skip] = how far to skip 4981 ; CHG: esi, dx, ax 4982 ; STT: es = ds = ss 4983 pp3_handle_skip_di: 0 0000A5A9 53 push bx 0 0000A5AA 51 push cx 4986 0 0000A5AB 89FE mov si, di 4988 @@: 0 0000A5AD AC lodsb 0 0000A5AE 3C00 cmp al, 0 0 0000A5B0 7408 je .expr_have 0 0000A5B2 3C5F cmp al, '_' 0 0000A5B4 75F7 jne @B 0 0000A5B6 C644FF00 mov byte [si - 1], 0 4995 .expr_have: 0 0000A5BA 89FE mov si, di 0 0000A5BC BA[0000] mov dx, msg.asciz 0 0000A5BF E8[0000] call isstring? 0 0000A5C2 751E jne .expr_num 0 0000A5C4 31C9 xor cx, cx 0 0000A5C6 8B5EFE mov bx, word [bp + ?segment] 0 0000A5C9 66 _386_PM_o32 0 0000A5CA 8B76FA mov si, word [bp + ?offset] 5004 .expr_asciz_loop: 0 0000A5CD E83A03 call pp16 0 0000A5D0 84C0 test al, al 0 0000A5D2 E0F9 loopnz .expr_asciz_loop 0 0000A5D4 E306 jcxz .error 0 0000A5D6 F7D9 neg cx 0 0000A5D8 89CA mov dx, cx 0 0000A5DA EB0E jmp .expr_got 5012 5013 .error: 0 0000A5DC BE[0200] mov si, line_in + 2 0 0000A5DF E9[0000] jmp error 5016 5017 .expr_num: 0 0000A5E2 AC lodsb 0 0000A5E3 E8[0000]EB02[0000] nearcall getword 5020 .expr_got: 0 0000A5EA 8956F8 mov word [bp + ?skip], dx 5022 0 0000A5ED 59 pop cx 0 0000A5EE 5B pop bx 0 0000A5EF C3 retn 5026 5027 lleave ctx 5028 5029 5030 ; INP: bx = SYMMAIN index 5031 ; CHG: es, di, si, dx, ax 5032 ; STT: ss = ds 5033 ; 5034 ; Note: This invalidates the access slice. 5035 zz_copy_strings_to_str_buffer: section_of_function 0 0000A5F0 C706[0000][0000] mov word [stack_low_address], stack 5037 0 0000A5F6 51 push cx 5039 0 0000A5F7 53 push bx ; main index 0 0000A5F8 50 push ax ; (reserve space, uninitialised) 0 0000A5F9 E8[0000]EB02[0000] dualcall getfarpointer.main 0 0000A600 5F pop di 0 0000A601 07 pop es 0 0000A602 1E push ds 5046 ; Here we depend on str_buffer being 512-bytes long, 5047 ; to allow storing both smName1 and smName2 contents 5048 ; one after another in str_buffer. 0 0000A603 E8[0000]EB02[0000] nearcall getstring1 0 0000A60A 16 push ss 0 0000A60B 07 pop es 0 0000A60C 89D6 mov si, dx 0 0000A60E BF[0000] mov di, str_buffer 0 0000A611 F3A4 rep movsb 0 0000A613 89FE mov si, di 0 0000A615 1F pop ds 0 0000A616 53 push bx ; main index 0 0000A617 50 push ax ; (reserve space, uninitialised) 0 0000A618 E8[0000]EB02[0000] dualcall getfarpointer.main 0 0000A61F 5F pop di 0 0000A620 07 pop es 0 0000A621 1E push ds 0 0000A622 E8[0000]EB02[0000] nearcall getstring2 0 0000A629 16 push ss 0 0000A62A 07 pop es 0 0000A62B 89F7 mov di, si 0 0000A62D 89D6 mov si, dx 0 0000A62F F3A4 rep movsb 0 0000A631 B000 mov al, 0 0 0000A633 AA stosb 0 0000A634 1F pop ds 5072 0 0000A635 59 pop cx 0 0000A636 C3 retn 5075 %endif 5076 5077 5078 terminate_silent_dump.if_nonnull: 5079 %if _RH 0 0000A637 F606[0200]10 testopt [options6], opt6_rh_mode 0 0000A63C 7507 jnz @F 5082 %endif 0 0000A63E F606[0300]10 testopt [internalflags], tt_silent_mode 0 0000A643 743C jz terminate_silent_dump.ret 5085 @@: 0 0000A645 06 push es 0 0000A646 57 push di 0 0000A647 50 push ax 0 0000A648 8E06[0000] mov es, word [auxbuff_segorsel] 0 0000A64C 8B3E[0000] mov di, word [auxbuff_behind_last_silent] 5091 %if _PM 0 0000A650 3B3E[0000] cmp di, word [auxbuff_switchbuffer_size] 0 0000A654 7428 je terminate_silent_dump.done 5094 %else 5095 test di, di 5096 jz terminate_silent_dump.done 5097 %endif 0 0000A656 4F dec di 0 0000A657 B000 mov al, 0 0 0000A659 AE scasb 0 0000A65A 7422 je terminate_silent_dump.done 0 0000A65C EB1B jmp @FF 5103 5104 terminate_silent_dump: 5105 %if _RH 0 0000A65E F606[0200]10 testopt [options6], opt6_rh_mode 0 0000A663 7507 jnz @F 5108 %endif 0 0000A665 F606[0300]10 testopt [internalflags], tt_silent_mode 0 0000A66A 7415 jz .ret 5111 @@: 5112 .is_silent: 0 0000A66C 06 push es 0 0000A66D 57 push di 0 0000A66E 50 push ax 0 0000A66F 8E06[0000] mov es, word [auxbuff_segorsel] 0 0000A673 8B3E[0000] mov di, word [auxbuff_behind_last_silent] 0 0000A677 B000 mov al, 0 5119 @@: 0 0000A679 AA stosb 0 0000A67A FF06[0000] inc word [auxbuff_behind_last_silent] 5122 ; -> point past the NUL 5123 .done: 0 0000A67E 58 pop ax 0 0000A67F 5F pop di 0 0000A680 07 pop es 5127 .ret: 0 0000A681 C3 retn 5129 5130 5131 dumpregs_extended_silent: 5132 %if _PM 0 0000A682 E822F4 call resetmode 5134 %endif 0 0000A685 E864F8 call silence_init 5136 ; Call dumpregs (trimputs, puts, putsline, disasm) with 5137 ; "silence" flag (writes to auxbuff instead of terminal). 0 0000A688 E8[0000] call dumpregs_extended 5139 5140 %ifn _RH 5141 ; Terminate the last dump's output with a NUL byte. 5142 call terminate_silent_dump.if_nonnull 5143 %endif 0 0000A68B E851F8 call silence_exit 5145 %endif ; !_LOADER 5146 5147 5148 handle_serial_flags_ctrl_c: section_of_function 0 0000A68E 1E push ds 0 0000A68F 50 push ax 0 0000A690 16 push ss 0 0000A691 1F pop ds 0 0000A692 F606[0300]40 testopt [options3], opt3_check_ctrlc_0bh 0 0000A697 740A jz @FF 5155 ; The following DOS call originated in sleepcmd. 5156 ; However, it is useful for all callers of this 5157 ; function so put it here. 0 0000A699 E8[0000] call InDOS 0 0000A69C 7505 jnz @F 0 0000A69E B40B mov ah, 0Bh 5161 doscall ; allow to break with Ctrl-C 0 0000A6A0 E8[0000] nearcall _doscall 5162 @@: 5163 @@: 0 0000A6A3 F606[0000]02 testopt [serial_flags], sf_ctrl_c 0 0000A6A8 755B jnz handle_ctrl_c 0 0000A6AA F606[0000]10 testopt [serial_flags], sf_use_serial 0 0000A6AF 7551 jnz .ret 0 0000A6B1 E8[0000] call InDOS_or_BIOS_IO 0 0000A6B4 744C jz .ret 0 0000A6B6 F606[0300]20 testopt [options3], opt3_check_ctrlc_keyb 0 0000A6BB 7445 jz .ret 5172 5173 .check_rombios_buffer: 0 0000A6BD 53 push bx 0 0000A6BE 52 push dx 0 0000A6BF B84000 mov ax, 40h ; dual mode segment/selector 0 0000A6C2 50 push ax 0 0000A6C3 A1[0000] mov ax, word [io_end_buffer] 0 0000A6C6 8B16[0000] mov dx, word [io_start_buffer] 0 0000A6CA 1F pop ds 0 0000A6CB 85C0 test ax, ax 0 0000A6CD 7503 jnz @F 0 0000A6CF A18200 mov ax, word [82h] ; end of circular keypress buffer 5184 @@: 0 0000A6D2 85D2 test dx, dx 0 0000A6D4 7504 jnz @F 0 0000A6D6 8B168000 mov dx, word [80h] ; start of circular buffer 5188 @@: 0 0000A6DA 89C3 mov bx, ax 0 0000A6DC 29D3 sub bx, dx ; cmp end, start 0 0000A6DE 7620 jbe .ret_dx_bx ; invalid --> 0 0000A6E0 F6C301 test bl, 1 ; even amount of bytes ? 0 0000A6E3 751B jnz .ret_dx_bx ; invalid --> 0 0000A6E5 8B1E1A00 mov bx, word [1Ah] ; current head of circular buffer 5195 .loop: 0 0000A6E9 3B1E1C00 cmp bx, word [1Ch] ; equal to current tail ? 0 0000A6ED 7411 je .ret_dx_bx ; yes, all entries checked --> 0 0000A6EF 803F03 cmp byte [bx], 3 ; is it Ctrl-C ? 0 0000A6F2 7411 je handle_ctrl_c ; yes, handle --> 0 0000A6F4 43 inc bx 0 0000A6F5 43 inc bx ; -> next entry 0 0000A6F6 39C3 cmp bx, ax ; at end of buffer ? 0 0000A6F8 72EF jb .loop ; no, loop --> 0 0000A6FA 7704 ja .ret_dx_bx ; invalid --> 0 0000A6FC 89D3 mov bx, dx ; reset to start of buffer 0 0000A6FE EBE9 jmp .loop ; then loop --> 5207 5208 .ret_dx_bx: 0 0000A700 5A pop dx 0 0000A701 5B pop bx 5211 5212 .ret: 0 0000A702 58 pop ax 0 0000A703 1F pop ds 0 0000A704 C3 retn 5216 5217 5218 handle_ctrl_c: 0 0000A705 16 push ss 0 0000A706 1F pop ds 0 0000A707 16 push ss 0 0000A708 07 pop es 5223 %if _EXTENSIONS && _EXT_PUTS_GETLINE 0 0000A709 C606[0000]00 mov byte [in_getinput], 0 5225 %endif 0 0000A70E 8026[0000]F9 clropt [serial_flags], sf_ctrl_c | sf_double_ctrl_c 5227 %if _PM 0 0000A713 E891F3 call resetmode 5229 %endif 5230 %if !_LOADER 0 0000A716 E81EFF call terminate_silent_dump.if_nonnull 0 0000A719 E8[0000] call silence_dump 5233 %endif 0 0000A71C BA[0000] mov dx, msg.ctrlc 0 0000A71F E8[0000] call putsz 5236 0 0000A722 800E[0000]10 setopt [internalflags3], dif3_input_terminal_override 5238 ; make sure we drain terminal input 5239 @@: 0 0000A727 E8[0000] call getc_if_any ; drain the buffer 0 0000A72A 75FB jnz @B ; if any was available --> 5242 0 0000A72C 8026[0000]EF clropt [internalflags3], dif3_input_terminal_override 0 0000A731 E9[0000] jmp cmd2_reset_re 5245 5246 5247 %if !_LOADER 5248 ; INP: bp [tpg_proceed_bp], 5249 ; linear address and point content to write 5250 ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5251 ; set if a breakpoint was written 5252 ; OUT: CY if error, 5253 ; bp [tpg_proceed_bp] = has point content to restore 5254 ; ah = reason = 0 = no error (never), 5255 ; 1 = couldn't write, 5256 ; 2 = unreachable, 5257 ; 3 = overwritten, al = new byte value 5258 ; NC if no error, 5259 ; ah = 0 5260 ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5261 ; cleared 5262 ; CHG: di, (e)dx, ax, bx 5263 ; STT: might switch modes due to getsegmented call 5264 proceed_writepoint_restore: 0 0000A734 B400 mov ah, 0 0 0000A736 F606[0000]40 testopt [internalflags2], dif2_tpg_proceed_bp_set 0 0000A73B 745F jz proceed_wp.retn ; (NC) 0 0000A73D BF0100 mov di, 1 0 0000A740 EB05 jmp proceed_wp 5270 5271 ; INP: bp [tpg_proceed_bp], 5272 ; linear address and point content to write (0CCh) 5273 ; OUT: CY if error, 5274 ; bp [tpg_proceed_bp] = has point content 0CCh 5275 ; ah = reason = 0 = no error (never), 5276 ; 1 = couldn't write, 5277 ; 2 = unreachable, 5278 ; 3 = overwritten (never) 5279 ; NC if no error (either flag not set or point restored), 5280 ; ah = 0 5281 ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5282 ; set 5283 ; CHG: di, (e)dx, ax, bx 5284 ; STT: might switch modes due to getsegmented call 5285 proceed_writepoint: 5286 %if _DELAY_BEFORE_BP 0 0000A742 E8B1EE call delay_before_bp 5288 %endif 0 0000A745 31FF xor di, di 5290 proceed_wp: 5291 lframe near 0 0000A747 5589E5 lenter 0 0000A74A 83F701 xor di, 1 5294 lvar word, is_write 0 0000A74D 57 push di 5296 0 0000A74E A1[0000] mov ax, word [tpg_proceed_bp] 5298 %if _PM 0 0000A751 8B16[0200] mov dx, word [tpg_proceed_bp + 2] 5300 %else 5301 xor dx, dx 5302 mov dl, byte [tpg_proceed_bp + 2] 5303 %endif 0 0000A755 E874F3 call getsegmented 0 0000A758 A0[0800] mov al, byte [tpg_proceed_bp + BPSIZE - 1] 5306 ; al = byte to restore 0 0000A75B B402 mov ah, 2 ; error reason: unreachable 0 0000A75D 723A jc .return 5309 0 0000A75F F646FE01 test byte [bp + ?is_write], 1 5311 ; (NC) is it writing ? 0 0000A763 7518 jnz .write 5313 .restore: 0 0000A765 50 push ax 0 0000A766 E8[0000] call readmem ; read current byte 0 0000A769 3CCC cmp al, 0CCh ; is this still what we wrote? 0 0000A76B B403 mov ah, 3 ; error reason: overwritten, al = new value 0 0000A76D F9 stc 0 0000A76E 7529 jne .return_discard ; nope --> (CY) 0 0000A770 58 pop ax 0 0000A771 E8[0000] call writemem ; return the byte to its original value 0 0000A774 720D jc .next ; failed --> (CY, handled there) 0 0000A776 C606[0800]CC mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 5324 ; reset stored point 0 0000A77B EB06 jmp short .next 5326 5327 .write: 0 0000A77D E8[0000] call writemem 0 0000A780 A2[0800] mov byte [tpg_proceed_bp + BPSIZE - 1], al 5330 ; save the previous byte there 5331 .next: 0 0000A783 B401 mov ah, 1 ; (in case of error) error reason: cannot write 0 0000A785 7212 jc .return ; failed to write --> (CY) 0 0000A787 B400 mov ah, 0 ; (no error) 5335 0 0000A789 800E[0000]40 setopt [internalflags2], dif2_tpg_proceed_bp_set 5337 ; set flag in case of successful writing 0 0000A78E F646FE01 test byte [bp + ?is_write], 1 5339 ; (NC) is it writing ? 0 0000A792 7505 jnz .return ; yes, leave flag set --> 0 0000A794 8026[0000]BF clropt [internalflags2], dif2_tpg_proceed_bp_set 5342 ; (NC) clear flag in case of successful restoring 5343 .return: 5344 .return_discard: 0 0000A799 89EC5D lleave 5346 .retn: 0 0000A79C C3 retn 5348 5349 5350 ; INP: ah & 7Fh = status = 0 = no error, 5351 ; 1 = couldn't write, 5352 ; 2 = unreachable, 5353 ; 3 = overwritten, al = new value 5354 ; ah & 80h = set if error restoring point, 5355 ; else error writing point 5356 ; bh & 80h = set if gg breakpoint, 5357 ; cx = index (0-based) 5358 ; bh & 40h = set if bb breakpoint, 5359 ; cx = index (0-based) 5360 ; bh & C0h = clear if proceed breakpoint 5361 ; bl = what we tried to restore, only set if ah & 80h set 5362 ; dword [ss:sp] = linear address (24 bit if non-_PM) 5363 ; CHG: ax, bx, cx, dx, di 5364 ; STT: ds = es = ss = debugger data selector 5365 display_breakpoint_failure: 5366 %if _PM 0 0000A79D E807F3 call resetmode 5368 %endif 5369 0 0000A7A0 50 push ax 0 0000A7A1 53 push bx 0 0000A7A2 51 push cx 0 0000A7A3 56 push si 0 0000A7A4 E8[0000] call silence_dump ; do away with silent mode 0 0000A7A7 5E pop si 0 0000A7A8 59 pop cx 0 0000A7A9 5B pop bx 0 0000A7AA 58 pop ax 5379 0 0000A7AB 800E[0100]08 setopt [internalflags2], dif2_bp_failure 5381 5382 lframe near 5383 lpar dword, linear 0 0000A7B0 5589E5 lenter 5385 lvar word, input_ax 0 0000A7B3 50 push ax 5387 0 0000A7B4 BA[0000] mov dx, msg.cant_bp_the 0 0000A7B7 E8[0000] call putsz 0 0000A7BA F6C780 test bh, 80h 0 0000A7BD 740B jz @F 5392 0 0000A7BF 89C8 mov ax, cx 0 0000A7C1 40 inc ax ; make it 1-based 0 0000A7C2 E8DBF0 call putordinalbyte 5396 0 0000A7C5 BA[0000] mov dx, msg.cant_bp_type_gg 0 0000A7C8 EB23 jmp .got_type 5399 5400 @@: 0 0000A7CA F6C740 test bh, 40h 0 0000A7CD 741B jz @F 5403 0 0000A7CF 89C8 mov ax, cx 0 0000A7D1 BF[0000] mov di, msg.cant_bp_type_permanent.index 0 0000A7D4 E8[0000] call hexbyte ; (0-based index) 5407 0 0000A7D7 BA[0000] mov dx, msg.cant_bp_type_permanent 5409 %if _SYMBOLIC 0 0000A7DA 83E810 sub ax, _NUM_B_BP 0 0000A7DD 720E jb .got_type 5412 0 0000A7DF BF[0000] mov di, msg.cant_bp_type_symbol.index 0 0000A7E2 E8[0000] call hexbyte ; (0-based index) 5415 0 0000A7E5 BA[0000] mov dx, msg.cant_bp_type_symbol 5417 %endif 0 0000A7E8 EB03 jmp .got_type 5419 5420 @@: 0 0000A7EA BA[0000] mov dx, msg.cant_bp_type_proceed 5422 5423 .got_type: 0 0000A7ED E8[0000] call putsz 5425 0 0000A7F0 BF[0000] mov di, msg.cant_bp_linear.address1 0 0000A7F3 8B4606 mov ax, word [bp + ?linear + 2] 5428 %ifn _PM 5429 mov ah, 0 5430 %endif 0 0000A7F6 E8[0000] call hexword 0 0000A7F9 47 inc di 5433 ; mov di, msg.cant_bp_linear.address2 0 0000A7FA 8B4604 mov ax, word [bp + ?linear] 0 0000A7FD E8[0000] call hexword 5436 0 0000A800 BA[0000] mov dx, msg.cant_bp_linear 0 0000A803 E8[0000] call putsz 5439 0 0000A806 BF[0000] mov di, msg.cant_bp_restore.value 0 0000A809 89D8 mov ax, bx 0 0000A80B E8[0000] call hexbyte 5443 0 0000A80E BA[0000] mov dx, msg.cant_bp_write 0 0000A811 8B46FE mov ax, word [bp + ?input_ax] 0 0000A814 F6C480 test ah, 80h 0 0000A817 7406 jz @F 0 0000A819 80E47F and ah, ~80h 0 0000A81C BA[0000] mov dx, msg.cant_bp_restore 5450 @@: 0 0000A81F E8[0000] call putsz 5452 0 0000A822 BF[0000] mov di, msg.cant_bp_reason3.value 0 0000A825 E8[0000] call hexbyte 5455 0 0000A828 BA[0000] mov dx, msg.cant_bp_reason 0 0000A82B E8[0000] call putsz 5458 0 0000A82E BA[0000] mov dx, msg.cant_bp_reason0 0 0000A831 80FC01 cmp ah, 1 0 0000A834 7215 jb @F 0 0000A836 BA[0000] mov dx, msg.cant_bp_reason1 0 0000A839 7410 je @F 0 0000A83B BA[0000] mov dx, msg.cant_bp_reason2 0 0000A83E 80FC03 cmp ah, 3 0 0000A841 7208 jb @F 0 0000A843 BA[0000] mov dx, msg.cant_bp_reason3 0 0000A846 7403 je @F 0 0000A848 BA[0000] mov dx, msg.cant_bp_reasonu 5470 @@: 0 0000A84B E8[0000] call putsz 5472 0 0000A84E 89EC5D lleave 0 0000A851 C20400 lret 5475 5476 5477 %if _PM 5478 isdpmientry: 0 0000A854 F606[0000]02 testopt [internalflags4], dif4_int_2F_hooked 0 0000A859 750A jnz .stdhook 0 0000A85B C706[0000][0000] mov word [reg_eip], mydpmientry 0 0000A861 8C1E[0000] mov word [reg_cs], ds ; if Int2F not hooked, point to the hook here 5483 ; ds => lDEBUG_DATA_ENTRY 5484 .stdhook: 5485 ; Run code until it returned far. 0 0000A865 8B1E[0000] mov bx, word [reg_esp] 0 0000A869 1E push ds 0 0000A86A 8E1E[0000] mov ds, word [reg_ss] ; ds:bx-> (16-bit) stack 0 0000A86E 8B37 mov si, word [bx+0] 0 0000A870 8B5F02 mov bx, word [bx+2] ; get (16-bit) far return address 0 0000A873 1F pop ds 5492 %endif 5493 ; Proceed over an instruction 5494 ; INP: bx:(e)si-> where to write the breakpoint 5495 ; OUT: NC if the breakpoint was hit, 5496 ; ah = 0 5497 ; ch = 0 5498 ; d[reg_eip] adjusted 5499 ; cx & 8 set if proceed point hit 5500 ; (ZF only set if _BREAKPOINTS) 5501 ; ZR if breakpoint after instruction was hit, 5502 ; cx & 7 = 0 5503 ; NZ if another breakpoint (bb) was hit (or both), 5504 ; cx & 1 set if non-pass match (actual hit), 5505 ; else cx & 2 set if pass match (consider as hit first, 5506 ; but dump registers next (not to silent buffer) 5507 ; and then continue execution) 5508 ; else cx & 4 always set, indicates any match 5509 ; (including matches that should merely continue) 5510 ; all pass points' counters stepped 5511 ; CY if the breakpoint was not hit, 5512 ; cx = 0 5513 ; If [internalflags2] & dif2_gg_is_gg is set: 5514 ; ah & 7Fh = status = 0 = no error, 5515 ; 1 = couldn't write, 5516 ; 2 = unreachable, 5517 ; 3 = overwritten, al = new value 5518 ; ah & 80h = set if error restoring point, 5519 ; else error writing point to begin with 5520 ; If that flag is clear: 5521 ; Does not return if a breakpoint cannot be written 5522 ; or cannot be restored, jumps to cmd3 instead. 5523 ; CHG: all 5524 ; STT: ds = es = ss 5525 ; might return modeswitched (if dif2_gg_is_gg) 5526 ; might be called while modeswitched 5527 proceedbreakpoint: section_of_function 0 0000A874 F606[0000]80 testopt [internalflags2], dif2_tpg_keep_proceed_bp 0 0000A879 750D jnz @F 5530 0 0000A87B 66 _386_PM_o32 ; mov edx, esi 0 0000A87C 89F2 mov dx, si ; bx:(e)dx = segmented 0 0000A87E E8D2F0 call getlinear_d_b ; dx:ax = linear 5534 0 0000A881 A3[0000] mov word [tpg_proceed_bp], ax 5536 ; The following two instructions must be in this order. 5537 ; For the non-_PM build, writing to the second word 5538 ; of the breakpoint also writes to the content byte. 0 0000A884 8916[0200] mov word [tpg_proceed_bp + 2], dx 5540 ; store in point 5541 @@: 0 0000A888 C606[0800]CC mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 5543 ; initialise content 0 0000A88D E8B2FE call proceed_writepoint 5545 ; This call might return modeswitched. 0 0000A890 7308 jnc @F 5547 0 0000A892 80E47F and ah, ~80h ; mark error during writing 5549 0 0000A895 31C9 xor cx, cx ; cx = 0 in case of branching 0 0000A897 51 push cx ; put the zero on the stack 5552 0 0000A898 EB0E jmp .failure 5554 5555 @@: 5556 ; The run functions call resetmode. 5557 %if _BREAKPOINTS 0 0000A89A E87900 call run_with_bb 0 0000A89D 89C8 mov ax, cx 5560 %else 5561 call run 5562 xor ax, ax 5563 %endif 0 0000A89F 50 push ax 5565 5566 ; It's important to keep the linear address saved inbetween, 5567 ; even though we save by value (as opposed to DEBUG/X G's saving 5568 ; of the reference) because the selector that we used for the 5569 ; access might now be invalid or (worse) point elsewhere, or 5570 ; a mode change might have occured. (The latter is sometimes 5571 ; handled by a specific kludge in DEBUG/X, but not always.) 5572 0 0000A8A0 E891FE call proceed_writepoint_restore 5574 ; This call might return modeswitched. 0 0000A8A3 7329 jnc @F 5576 0 0000A8A5 80CC80 or ah, 80h ; mark error during restoration 5578 5579 .failure: 5580 ; Here we may be modeswitched. 0 0000A8A8 F606[0000]08 testopt [internalflags2], dif2_gg_is_gg 5582 ; is it from gg ? 0 0000A8AD 7558 jnz .return_CY_pop_cx ; (CY) yes, return to gg 5584 ; This branch may be taken while modeswitched. 5585 5586 %if _PM 0 0000A8AF E8F5F1 call resetmode 5588 %endif 5589 0 0000A8B2 E8DFEA call put_deferred_message_silent 5591 0 0000A8B5 50 push ax 0 0000A8B6 E8[0000] call silence_dump 0 0000A8B9 58 pop ax 5595 0 0000A8BA FF36[0200] push word [tpg_proceed_bp + 2] 0 0000A8BE FF36[0000] push word [tpg_proceed_bp] 0 0000A8C2 8A1E[0800] mov bl, [tpg_proceed_bp + BPSIZE - 1] 0 0000A8C6 B700 mov bh, 0 0 0000A8C8 E8D2FE call display_breakpoint_failure 5601 ; This function calls resetmode. 0 0000A8CB E9[0000] jmp cmd3 5603 5604 @@: 0 0000A8CE E857F1 call get_cseip_of_possible_breakpoint 5606 ; dx:ax = linear address 1 before cs:(e)ip 0 0000A8D1 7232 jc .return_CY_pop_cx_ax_zero 5608 0 0000A8D3 59 pop cx 5610 %if _PM 0 0000A8D4 3916[0200] cmp word [tpg_proceed_bp + 2], dx 5612 %else 5613 test dh, dh ; (bits 24 to 31 set. shouldn't happen) 5614 jnz .not_pp 5615 cmp byte [tpg_proceed_bp + 2], dl 5616 %endif 0 0000A8D8 7511 jne .not_pp 0 0000A8DA 3906[0000] cmp word [tpg_proceed_bp], ax 0 0000A8DE 750B jne .not_pp ; is unexpected (not behind the breakpoint) --> 5620 5621 ; Need to check this here, because we have to 5622 ; decrement (e)ip if the breakpoint was hit. 0 0000A8E0 813E[0000][0000] cmp word [run_int], int3msg 0 0000A8E6 7503 jne .not_pp ; is unexpected (not returned by interrupt 03h) --> 0 0000A8E8 80C908 or cl, 8 ; set flag: pp hit 5626 5627 .not_pp: 0 0000A8EB B400 mov ah, 0 ; set error to "no error" 5629 0 0000A8ED E319 jcxz .return_CY ; bb hit/pass/nonpass or pp hit ? if no --> 5631 0 0000A8EF E8C4EA call adjust_cseip_after_breakpoint 5633 ; decrement (e)ip to point at the instruction 5634 0 0000A8F2 F6C101 test cl, 1 ; bb hit ? 0 0000A8F5 750A jnz .return ; yes, return (NC, NZ) --> 5637 0 0000A8F7 F6C108 test cl, 8 ; proceed point matched ? 0 0000A8FA 7506 jnz @F ; yes --> 5640 0 0000A8FC 800E[0000]80 setopt [internalflags2], dif2_tpg_keep_proceed_bp 5642 ; flag that we should keep this proceed point 5643 ; (NC, NZ) 5644 .return: 0 0000A901 C3 retn 5646 5647 @@: 5648 ; return with ax = 0, NC, ZR 5649 ; 5650 ; (hit proceed point, no hit bb (possibly pass/non-pass bb) 0 0000A902 31C0 xor ax, ax ; ah = 0 (NC, ZR) 0 0000A904 C3 retn 5653 5654 ; set ax = 0, pop cx, CY 5655 .return_CY_pop_cx_ax_zero: 0 0000A905 31C0 xor ax, ax 5657 5658 ; pop cx, CY (preserve ax) 5659 .return_CY_pop_cx: 0 0000A907 59 pop cx 5661 .return_CY: 0 0000A908 F9 stc 0 0000A909 C3 retn 5664 5665 5666 ; PPX - Get next byte in instruction stream. 5667 ; INP: bx:(e)si-> next byte 5668 ; OUT: al = next byte 5669 ; (e)si incremented 5670 pp16: section_of_function 5671 %if _PM 0 0000A90A E8[0000] call resetmode_and_test_d_b_bit 5673 %endif 0 0000A90D 1E push ds 0 0000A90E 8EDB mov ds, bx 5676 %if _PM 0 0000A910 7401 jz .16 0 0000A912 67 a32 ; use esi for lodsb 5679 .16: 5680 %endif 0 0000A913 AC lodsb 0 0000A914 1F pop ds 0 0000A915 C3 retn 5684 ; begin loop over instruction bytes. 5685 5686 5687 %if _BREAKPOINTS 5688 ; Run with bb breakpoints 5689 ; 5690 ; OUT: CY if another breakpoint (not a bb one) or trace hit, 5691 ; cx = 0 5692 ; NC if a bb breakpoint hit, 5693 ; cx & 1 set if it is an actual hit 5694 ; else cx & 2 set if it is a pass match, 5695 ; else it is a non-pass non-match 5696 ; (cx & 4 always set) 5697 ; STT: might return modeswitched 5698 run_with_bb: 0 0000A916 F606[0000]08 testopt [internalflags2], dif2_gg_is_gg 0 0000A91B 750C jnz .no_bb 5701 0 0000A91D F606[0300]C0 testopt [internalflags], tt_no_bb | tt_no_bb_first 0 0000A922 740C jz @F 5704 0 0000A924 8026[0300]7F clropt [internalflags], tt_no_bb_first 5706 5707 .no_bb: 0 0000A929 E87400 call run 0 0000A92C 31C9 xor cx, cx 0 0000A92E F9 stc 0 0000A92F C3 retn 5712 5713 @@: 5714 .gg5: 5715 %if _BREAKPOINTS 0 0000A930 E8F3EC call bb_writepoints_init_reset 5717 %endif 5718 0 0000A933 F606[0000]10 testopt [internalflags2], dif2_gg_first_detected 0 0000A938 7436 jz .only_run ; easy case, no cseip point detected --> 5721 5722 5723 ; Enter special mode: Restore cseip breakpoint content. 0 0000A93A 800E[0000]02 setopt [internalflags2], dif2_gg_skip_non_cseip 5725 0 0000A93F 83EC40 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 0 0000A942 89E5 mov bp, sp ; -> error info 5728 0 0000A944 B92000 mov cx, _NUM_B_BP + _NUM_SYM_BP 5730 ; = index above last one to restore 0 0000A947 E826EE call bb_restorepoints_and_init_error_info 0 0000A94A 7317 jnc @F ; no error ? --> 5733 5734 ; Error in bb_restorepoints. Try to restore other bb. 5735 5736 ; Exit special mode: Handle non-cseip breakpoints again. 0 0000A94C 8026[0000]FD clropt [internalflags2], dif2_gg_skip_non_cseip 5738 5739 ; Enter special mode: Skip cseip breakpoints. 0 0000A951 800E[0000]04 setopt [internalflags2], dif2_gg_skip_cseip 5741 5742 ; As we already tried to restore all cseip bb points, 5743 ; here we skip these in the bb_restorepoints call. 0 0000A956 B92000 mov cx, _NUM_B_BP + _NUM_SYM_BP 0 0000A959 E817EE call bb_restorepoints 5746 5747 ; Exit special mode: No longer skip cseip breakpoints. 0 0000A95C 8026[0000]FB clropt [internalflags2], dif2_gg_skip_cseip 5749 5750 ; The failure that led us here is already noted in the info. 0 0000A961 EB1D jmp .bb_exit 5752 5753 5754 @@: 5755 ; Success! Now discard the reserved error info. 0 0000A963 83C440 add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 5757 5758 ; Exit special mode, do not skip non-cseip breakpoints anymore. 0 0000A966 8026[0000]FD clropt [internalflags2], dif2_gg_skip_non_cseip 5760 5761 ; Enter special mode: Skip matching/restoring cseip breakpoint. 0 0000A96B 800E[0000]04 setopt [internalflags2], dif2_gg_skip_cseip 5763 5764 .only_run: 0 0000A970 E82D00 call run 5766 .after_run: 5767 5768 %if _BREAKPOINTS 0 0000A973 83EC40 sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 0 0000A976 89E5 mov bp, sp 5771 0 0000A978 B92000 mov cx, _NUM_B_BP + _NUM_SYM_BP 5773 ; = index above last one to restore 0 0000A97B E8F2ED call bb_restorepoints_and_init_error_info 0 0000A97E 7308 jnc @F 5776 5777 .bb_exit: 0 0000A980 B8FFFF mov ax, -1 0 0000A983 50 push ax ; (unused: ax error info) 0 0000A984 50 push ax ; cx error point index, -1 = invalid 5781 0 0000A985 E937ED jmp bb_restorepoints_exit 5783 5784 5785 @@: 0 0000A988 83C440 add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 5787 0 0000A98B E843EA call bb_check_hit 0 0000A98E 89C1 mov cx, ax 0 0000A990 9C pushf 5791 ; Clear all special modes. Stop specialcasing cseip breakpoint. 5792 ; 5793 ; This resets all the special flags for subsequent calls. 0 0000A991 8026[0000]E8 clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 0 0000A996 9D popf ; CF 0 0000A997 7302 jnc @F 5799 0 0000A999 F9 stc 5801 ; cx = flags as returned by bb_check_hit 0 0000A99A C3 retn 5803 5804 @@: 0 0000A99B E818EA call adjust_cseip_after_breakpoint 5806 ; re-execute (restored) opcode one byte in front of this 0 0000A99E F8 clc ; (NC) 5808 ; cx = flags as returned by bb_check_hit 0 0000A99F C3 retn 5810 %endif 5811 %endif 5812 %endif ; !_LOADER 5813 5814 5815 ; Run - Start up the running program. 5816 ; 5817 ; INP: b[eqflag], a[eqladdr] = address given behind '=' for command 5818 ; w[pspdbe] = process of debuggee 5819 ; [run2324] = interrupt handlers 23h and 24h to set 5820 ; values for registers in d[reg_eax] etc 5821 ; OUT: (_DEBUG && _DEBUGUPDATESAVE) 5822 ; interrupt handlers' ieNext fields updated 5823 ; d[reg_eax] etc updated 5824 ; w[run_int]-> message of how execution returned 5825 ; UP, EI, high word efl = 0, es = ds = ss 5826 ; CHG: all 5827 ; STT: ds = ss 5828 ; UP 5829 ; (INP:es ignored) 5830 run: 0 0000A9A0 16 push ss 0 0000A9A1 07 pop es 5833 %if _PM 0 0000A9A2 E802F1 call resetmode 0 0000A9A5 E80203 call remember_mode 5836 %endif 5837 %if _DELAY_BEFORE_BP 0 0000A9A8 8026[0200]7F clropt [internalflags3], dif3_delayed 5839 %endif 5840 %if !_LOADER 0 0000A9AD 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 0000A9B3 E80706 call seteq ; set CS:IP to '=' address 5846 %endif 5847 5848 %if _VXCHG 0 0000A9B6 B000 mov al, 0 ; restore debuggee screen 0 0000A9B8 E8[0000] call swapscreen 5851 %endif 5852 5853 %if _ALTVID 0 0000A9BB E8C801 call setscreen 5855 %endif 5856 5857 ; For DDebugX: Do this before we install our 5858 ; exception handlers. So if an exception 5859 ; is raised then it is handled by the outer 5860 ; instance instead of our handler. 5861 ; (The actual problem may be that we don't 5862 ; restore the handlers in the entrypoint 5863 ; that leads to debuggerexception.) 5864 ; Also, for non-_DEBUG DebugX too, check the 5865 ; validity before setting debuggee PSP and 5866 ; int 23h, 24h so they needn't be reset. 5867 %if _PM 5868 ; Load segreg values into es to make sure 5869 ; they're valid. (Previously done with 5870 ; the stack pointing into the reg array. 5871 ; Better to do it now with a valid stack.) 5872 ; Only done if we may be in Protected Mode. 5873 ; 86 Mode allows any value to be loaded. 0 0000A9BE 8E06[0000] mov es, word [reg_ds] 0 0000A9C2 8E06[0000] mov es, word [reg_ss] 0 0000A9C6 8E06[0000] _386 mov es, word [reg_fs] 0 0000A9CA 8E06[0000] _386 mov es, word [reg_gs] 5878 %endif 0 0000A9CE 8E06[0000] mov es, word [reg_es] ; last one: actual es value 5880 5881 %if !_LOADER 0 0000A9D2 8B1E[0000] mov bx, word [pspdbe] 0 0000A9D6 E8[0000] call setpsp ; set debuggee's PSP 0 0000A9D9 E8[0000] call setint2324 ; set debuggee's int 23/24 5885 %endif 5886 5887 %if _DEBUG ; set this copy's divide/trace/breakpoint ints 5888 %if _TSR || _BOOTLDR || _DEVICE 5889 ..@patch_tsr_quit_run: 0 0000A9DC A9 db __TEST_IMM16 0 0000A9DD A600 dw __REL16__(.skipints) 5892 %endif 5893 %if _DEBUG_COND 0 0000A9DF F606[0100]01 testopt [internalflags6], dif6_debug_mode 0 0000A9E4 7503E99C00 jz .skipints 0 0000A9E9 E80300 call set_interrupts 0 0000A9EC E99600 jmp .skipints 5898 5899 set_interrupts: equ $ 5900 %endif 0 0000A9EF 51 push cx 0 0000A9F0 56 push si 0 0000A9F1 50 push ax 0 0000A9F2 52 push dx 0 0000A9F3 06 push es 0 0000A9F4 53 push bx 0 0000A9F5 55 push bp 0 0000A9F6 57 push di 5909 5910 %if _PM 0 0000A9F7 E8[0000] call ispm 0 0000A9FA 7414 jz @F ; in PM --> 0 0000A9FC F606[0200]04 testopt [internalflags], canswitchmode 0 0000AA01 7410 jz @FF ; in 86 Mode and cannot switch to PM --> 5915 5916 d4 call d4message 5917 d4 asciz "In run (switch mode before calling pm_set_handlers)",13,10 0 0000AA03 800E[0200]08 setopt [internalflags], modeswitched ; set flag for resetmode 0 0000AA08 B000 mov al, 0 0 0000AA0A E875F0 call sr_state ; save state 0 0000AA0D E838F0 call switchmode ; switch to PM 5922 ; ! handle_mode_changed not called here ! 5923 ; do not call InDOS or other functions using seg/sels 5924 @@: 0 0000AA10 E82103 call pm_set_handlers 5926 ; ! this calls resetmode 5927 @@: 5928 %endif 5929 5930 %if _CATCHINT06 && _DETECT95LX 0 0000AA13 8B0E[0000] mov cx, word [inttab_number_variable] 5932 %else 5933 mov cx, inttab_number 5934 %endif 0 0000AA17 E363 jcxz .intend 0 0000AA19 BE[0000] mov si, inttab 5937 .intloop: 0 0000AA1C AC lodsb 0 0000AA1D 92 xchg ax, dx 0 0000AA1E AD lodsw ; get address 0 0000AA1F 92 xchg ax, dx 5942 %if _DEBUGUPDATESAVE 0 0000AA20 89D7 mov di, dx ; -> IISP header 5944 %endif 5945 0 0000AA22 E8[0000] call InDOS 0 0000AA25 7432 jz .int21_25 5948 0 0000AA27 31DB xor bx, bx 5950 %if _PM 0 0000AA29 E8[0000] call ispm 0 0000AA2C 7507 jnz @F 0 0000AA2E 52 push dx 0 0000AA2F 89DA mov dx, bx ; set segment to access (= 0) 0 0000AA31 E8[0000] call setrmsegm ; get bx = selector configured to this 0 0000AA34 5A pop dx 5957 @@: 5958 %endif 0 0000AA35 8EC3 mov es, bx ; => 86 Mode IVT (segment or selector) 5960 %if _PM 0 0000AA37 31DB xor bx, bx ; bh = 0 5962 %endif 0 0000AA39 88C3 mov bl, al 0 0000AA3B 01DB add bx, bx 0 0000AA3D 01DB add bx, bx 5966 5967 %if _DEBUGUPDATESAVE 0 0000AA3F 26FF7702 push word [ es:bx + 2 ] 0 0000AA43 26FF37 push word [ es:bx ] ; get vector 0 0000AA46 8F4502 pop word [ di + ieNext ] 0 0000AA49 8F4504 pop word [ di + ieNext + 2] 5972 %endif 5973 0 0000AA4C 268917 mov word [ es:bx ], dx 5975 %if _PM 0 0000AA4F FF36[0000] push word [ pspdbg ] ; => lDEBUG_DATA_ENTRY (86 Mode seg) 0 0000AA53 268F4702 pop word [ es:bx + 2 ] 5978 %else 5979 mov word [ es:bx + 2 ], ds ; => lDEBUG_DATA_ENTRY 5980 %endif 0 0000AA57 EB21 jmp short .intset 5982 5983 .int21_25: 5984 5985 %if _PM 5986 %if _DEBUGUPDATESAVE 0 0000AA59 B435 mov ah, 35h ; get interrupt vector 0 0000AA5B FF36[0000] push word [pspdbg] ; => lDEBUG_DATA_ENTRY 0 0000AA5F E8[0000]EB02[0000] dual2call _doscall_return_es_parameter_es_ds 0 0000AA66 895D02 mov word [ di + ieNext ], bx 0 0000AA69 8F4504 pop word [ di + ieNext + 2 ] 5992 %endif 0 0000AA6C B425 mov ah, 25h ; set interrupt vector 0 0000AA6E FF36[0000] push word [pspdbg] ; => lDEBUG_DATA_ENTRY 0 0000AA72 E8[0000]EB02[0000] dual2call _doscall_return_es_parameter_es_ds 0 0000AA79 58 pop ax ; (discard returned parameter) 5997 %else 5998 %if _DEBUGUPDATESAVE 5999 mov ah, 35h 6000 int 21h ; get vector 6001 mov word [ di + ieNext ], bx 6002 mov word [ di + ieNext + 2 ], es 6003 %endif 6004 mov ah, 25h ; set interrupt vector 6005 int 21h ; ds => lDEBUG_DATA_ENTRY 6006 %endif 6007 .intset: 0 0000AA7A E2A0 loop .intloop 6009 6010 .intend: 0 0000AA7C 5F pop di 0 0000AA7D 5D pop bp 0 0000AA7E 5B pop bx 0 0000AA7F 07 pop es 0 0000AA80 5A pop dx 0 0000AA81 58 pop ax 0 0000AA82 5E pop si 0 0000AA83 59 pop cx 6019 %if _DEBUG_COND 0 0000AA84 C3 retn 6021 %endif 6022 .skipints: 6023 %endif 6024 6025 .2: 6026 %if _RUN2_ENTRY_SECTION 6027 %if _PM 0 0000AA85 E8[0000] call ispm 0 0000AA88 7505 jnz @F 0 0000AA8A FF36[0000] push word [cssel] 0 0000AA8E A8 db __TEST_IMM8 ; (skip push) 6032 @@: 6033 %endif 0 0000AA8F 16 push ss 0 0000AA90 B8[1C01] mov ax, .entry 0 0000AA93 50 push ax 0 0000AA94 CB retf 6038 6039 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 6039 ------------------ note: usesection lDEBUG_DATA_ENTRY 6040 .entry: 6041 %endif 0 0000708C 2B26[0000] sub sp, word [run_sp_reserve] 0 00007090 8926[0000] mov word [run_sp], sp ; save stack position 6044 6045 ; Disable this for now. The debugger uses its ss 6046 ; for 86 Mode and Protected Mode at the same area 6047 ; so it should always be valid to adjust SPSAV with 6048 ; the current run_sp, regardless of current mode. 6049 ; Update: SPSAV should always hold a 86 Mode address. 6050 ; So check for our segment, not the current ss. (But 6051 ; for _PM=0 ss is always equal to word [pspdbg].) 6052 ; I assume that the original fix was intended for cases 6053 ; where the segment doesn't match our 86 Mode ss, that 6054 ; is the word [pspdbg]. 6055 %if !_LOADER 6056 %if 1 6057 ; 16.2.2021: check if saved SS is debugger's SS. If no, don't adjust saved SP. 6058 ; SS may be != saved SS if debugger is stopped in protected-mode - then the 6059 ; current DPMI real-mode stack may be stored in SPSAV. 6060 %if _PM 0 00007094 A1[0000] mov ax, word [pspdbg] 6062 %else 6063 mov ax, ss 6064 %endif 0 00007097 3B063000 cmp ax, word [SPSAV + 2] 0 0000709B 7508 jne @F 6067 %endif 0 0000709D 2B26[0000] sub sp, word [spadjust] 0 000070A1 89262E00 mov word [SPSAV], sp 6070 @@: 6071 %endif 0 000070A5 FA cli 6073 0 000070A6 BC[0000] mov sp, regs 6075 %ifn _ONLY386 0 000070A9 EB11 _386_jmps .386 ; --> 0 000070AB 58 pop ax 0 000070AC 58 pop ax ; discard all high words 0 000070AD 5B pop bx 0 000070AE 58 pop ax 0 000070AF 59 pop cx 0 000070B0 58 pop ax 0 000070B1 5A pop dx 0 000070B2 58 pop ax 0 000070B3 58 pop ax ; we'll get esp later 0 000070B4 58 pop ax 0 000070B5 5D pop bp 0 000070B6 58 pop ax 0 000070B7 5E pop si 0 000070B8 58 pop ax 0 000070B9 5F pop di 6092 ; ds, ss, cs loaded later 6093 ; es already loaded 6094 %endif 6095 %ifn _ONLYNON386 6096 %ifn _ONLY386 0 000070BA EB18 jmp short .common 6098 %endif 6099 6100 .386: 6101 [cpu 386] 0 000070BC 6658 pop eax 0 000070BE 665B pop ebx 0 000070C0 6659 pop ecx 0 000070C2 665A pop edx 0 000070C4 58 pop ax 0 000070C5 58 pop ax ; we'll get esp later 0 000070C6 665D pop ebp 0 000070C8 665E pop esi 0 000070CA 665F pop edi 6111 ; pop ax ; get ds later 6112 ; pop ax ; discard high words of segment registers 6113 ; pop ax ; es already loaded 6114 ; pop ax 6115 ; pop ax ; get ss later 6116 ; pop ax 6117 ; pop ax ; get cs later 6118 ; pop ax 0 000070CC 83C410 add sp, byte 8 * 2 0 000070CF 0FA1 pop fs 0 000070D1 58 pop ax 0 000070D2 0FA9 pop gs 6123 __CPU__ 6124 .common: 6125 %endif 0 000070D4 A1[0000] mov ax, word [reg_eax] ; restore ax (used to discard words) 0 000070D7 8E16[0000] mov ss, word [reg_ss] 6128 %if _ONLYNON386 6129 mov sp, word [reg_esp] 6130 %else 6131 ..@patch_no386_ds_code_or_entry: 0 000070DB 66 o32 ; mov esp, dword [reg_esp] 0 000070DC 8B26[0000] mov sp, word [reg_esp] ; restore program stack 6134 %endif 0 000070E0 C606[0000]00 mov byte [bInDbg], 0 6136 0 000070E5 90 align 4, nop 6138 patcharea_run: 0 000070E8 90 .: times 32 nop 6140 .end: 6141 .size equ .end - . 6142 %if _RUN2_ENTRY_SECTION 6143 .segment equ pspdbg 6144 %else 6145 .segment equ code_seg 6146 %endif 6147 0 00007108 66 _386_o32 ; push dword [reg_efl] 0 00007109 FF36[0000] push word [reg_efl] 0 0000710D 66 _386_o32 ; push dword [reg_cs] ; high word is zero 0 0000710E FF36[0000] push word [reg_cs] 0 00007112 66 _386_o32 ; push dword [reg_eip] 0 00007113 FF36[0000] push word [reg_eip] 0 00007117 F606[0100]02 test byte [reg_efl+1], 2 ; IF set? 0 0000711C 8E1E[0000] mov ds, word [reg_ds] ; restore ds 0 00007120 7401 jz .di 0 00007122 FB sti ; required for ring3 protected mode if IOPL==0 6158 .di: 6159 %if _ONLYNON386 6160 iret 6161 %else 6162 ..@patch_no386_iret_code_or_entry: 0 00007123 66 o32 ; iretd 0 00007124 CF iret ; jump to program 6165 %endif 6166 6167 ; The byte at ..@patch_no386_ds will be adjusted to a ds prefix on non-386 processors. 6168 ; This does not change the following instruction's behaviour (aside from changing it 6169 ; to a 16-bit instruction as intended) and insures that sp is set in the instruction 6170 ; right behind the instruction that sets ss. 6171 6172 ; The byte at ..@patch_no386_iret will be adjusted to an iret instruction on non-386 processors. 6173 ; This avoids the NOP that would be written there if _386_o32 was used, because the iret 6174 ; should follow right behind the sti instruction. 6175 6176 6177 usesection lDEBUG_DATA_ENTRY 6177 ------------------ note: usesection lDEBUG_DATA_ENTRY 6178 6179 6180 %if _CATCHSYSREQ 6181 @@: 6182 jmp far [cs:intr_sysreq.next] 6183 6184 iispentry intr_sysreq, 0 6185 cmp byte [cs:bInDbg], 0 6186 jne @B 6187 %if _SYSREQINT == 15h 6188 cmp ax, 8501h ; sysreq released? 6189 jne @B 6190 %else 6191 pushf 6192 push cs 6193 call @B 6194 push ds 6195 push ax 6196 mov ax, 40h 6197 mov ds, ax 6198 test byte [18h], 4 6199 pop ax 6200 pop ds 6201 jnz @F 6202 iret 6203 6204 @@: 6205 %endif 6206 %if _PM && _SYSREQ_DISABLE_INT2F_HOOK 6207 clropt [options4], opt4_int_2F_hook ; disable hooking 6208 %endif 6209 mov word [cs:run_int], sysreqmsg ; remember interrupt type 6210 jmp intrtn ; jump to register saving routine 6211 %endif 6212 6213 6214 %if _CATCHINT08 0 00007125 CBEB10FFFFFFFF4B42 iispentry intr8, 0 0 0000712E 00EBF400 6216 intr8_original: equ intr8.next 0 00007138 9C pushf 0 00007139 2EFF1E[B801] call far [cs:intr8_original] 0 0000713E 9C pushf 0 0000713F 53 push bx 0 00007140 1E push ds 6222 0 00007141 0E push cs 0 00007142 1F pop ds 6225 0 00007143 803E[0000]00 cmp byte [bInDbg], 0 ; in debugger ? 0 00007148 7559 jne .reset ; yes --> 6228 0 0000714A F606[0000]04 testopt [serial_flags], sf_double_ctrl_c 0 0000714F 7408 jz @F 6231 0 00007151 C706[0000][0000] mov word [run_int], runint_ctrlc_msg 0 00007157 EB44 jmp @FF 6234 6235 @@: 0 00007159 BB4000 mov bx, 40h 0 0000715C 8EDB mov ds, bx 0 0000715E F606170004 test byte [17h], 4 ; CTRL currently pressed ? 0 00007163 0E push cs 0 00007164 1F pop ds 0 00007165 743C jz .reset ; no --> 6242 0 00007167 8B1E[0000] mov bx, word [intr8_limit] 0 0000716B 85DB test bx, bx ; enabled ? 0 0000716D 7439 jz .return ; no --> 0 0000716F FF06[0000] inc word [intr8_counter] 0 00007173 391E[0000] cmp word [intr8_counter], bx ; default is ca 5 seconds 0 00007177 722F jb .return 6249 0 00007179 C706[0000][0000] mov word [run_int], int8msg 0 0000717F F606[0100]80 testopt [options], int8_disable_serial 0 00007184 7417 jz @F 0 00007186 F606[0000]10 testopt [serial_flags], sf_use_serial 0 0000718B 7410 jz @F 6255 6256 ; Immediately disable use of serial I/O. 0 0000718D 8026[0000]EF clropt [serial_flags], sf_use_serial 0 00007192 8026[0100]BF clropt [options], enable_serial 0 00007197 C706[0000][0000] mov word [run_int], int8_kbd_msg 6260 6261 @@: 0 0000719D 1F pop ds 0 0000719E 5B pop bx 0 0000719F 9D popf ; (in 86 Mode) 0 000071A0 E98D01 jmp intrtn 6266 6267 .reset: 0 000071A3 8326[0000]00 and word [intr8_counter], 0 6269 .return: 0 000071A8 1F pop ds 0 000071A9 5B pop bx 0 000071AA 9D popf ; (in 86 Mode) 0 000071AB CF iret 6274 %endif 6275 6276 6277 %if !_LOADER 6278 ; Interrupt 22h (program termination) handler. 6279 int22: 0 000071AC FA cli 6281 .cleartraceflag: 0 000071AD 0E push cs 0 000071AE 1F pop ds 0 000071AF 0E push cs 0 000071B0 17 pop ss 0 000071B1 8B26[0000] mov sp, word [run_sp] ; restore running stack 0 000071B5 0326[0000] add sp, word [run_sp_reserve] 0 000071B9 C706[0000][0000] mov word [run_int], progtrm ; set interrupt message 0 000071BF C706[0000][0000] mov word [lastcmd], dmycmd ; disable T/P/G auto-repeat 6290 %if _PM 0 000071C5 C606[0000]00 mov byte [pm_2_86m_0], 0 0 000071CA 8026[0100]F7 clropt [internalflags], protectedmode ; reset PM flag 6293 %endif 6294 %ifn _RUN_ENTRY_SECTION 6295 times 1 - (($ - $$) & 1) nop ; align in-code parameter 6296 call entry_to_code_seg 6297 dw intrtn1_code 6298 ; jump to register saving routine 6299 %else 0 000071CF E91D02 jmp intrtn1_entry 6301 %endif 6302 %endif ; !_LOADER 6303 6304 sharedentry1.hwreset: 0 000071D2 CB retf 6306 6307 6308 %if !_LOADER 0 000071D3 90 align 2 0 000071D4 4A50 db "JP" ; signature for MS-DOS v7 6311 ; This signature should be immediately before the int 1 interrupt handler 6312 ; to preserve int 1 and int 3. It was discovered by Japheth who wrote 6313 ; about it in https://bttr-software.de/forum/forum_entry.php?id=22502 6314 ; Interrupt 01h (single-step interrupt) handler. 0 000071D6 EB10FFFFFFFF4B4200 iispentry intr1, 0, sharedentry1 0 000071DF EBF100 6316 lframe int 0 000071E8 5589E5 lenter 0 000071EB 50 push ax 6319 6320 %ifn _PASSTF 0 000071EC 806607FE clropt [bp + ?frame_fl], 100h ; clear TF (always) 6322 %endif 6323 0 000071F0 8CC8 mov ax, cs 0 000071F2 394604 cmp word [bp + ?frame_cs], ax ; entry segment ? 0 000071F5 7521 jne .if_ZR ; no --> (NZ) 6327 6328 ; On the NEC V20 if we trace an int3 instruction 6329 ; or a div instruction that faults, we will 6330 ; enter our Trace Interrupt entry with the 6331 ; interrupt stack frame pointing at the first 6332 ; instruction of the int 3 or int 0 handler. 6333 ; If this happens, clear the Trace Flag and 6334 ; continue running our handler. 0 000071F7 817E02[B802] cmp word [bp + ?frame_ip], intr0 0 000071FC 741A je .if_ZR ; that one --> (ZR) 0 000071FE 817E02[D402] cmp word [bp + ?frame_ip], intr3 0 00007203 7413 je .if_ZR ; that one --> (ZR) 6339 6340 ; If the DOS doesn't clear the Trace Flag when 6341 ; it uses a PRA to return to, its iret will 6342 ; enable tracing and invoke our Trace Interrupt 6343 ; with the stack frame pointing to *the second* 6344 ; instruction in the PRA handler. 6345 ; Like above, clear TF then run the PRA handler. 6346 %if _PM 0 00007205 817E02[0000] cmp word [bp + ?frame_ip], getline_extra_int22.cleartraceflag 0 0000720A 740C je .if_ZR ; that one --> (ZR) 6349 %endif 0 0000720C 817E02[3D02] cmp word [bp + ?frame_ip], int22.cleartraceflag 0 00007211 7405 je .if_ZR ; that one --> (ZR) 0 00007213 817E02[0000] cmp word [bp + ?frame_ip], debug22.cleartraceflag 6353 .if_ZR: 0 00007218 58 pop ax 6355 6356 %if _PASSTF 6357 jnz @F ; handle trace entry --> 6358 clropt [bp + ?frame_fl], 100h ; clear TF (only if we continue) 6359 lleave code, optimiserestoresp ; restore bp 6360 iret ; continue run if matched 6361 6362 @@: 6363 lleave , optimiserestoresp ; restore bp 6364 %else 0 00007219 5D lleave , optimiserestoresp ; restore bp (common before branch) 0 0000721A 7501 jnz @F ; handle trace entry --> 0 0000721C CF iret ; continue run if matched 6368 6369 @@: 6370 %endif 6371 0 0000721D 2EC706[0000][0000] mov word [cs:run_int], int1msg ; remember interrupt type 0 00007224 E90901 jmp intrtn ; jump to register saving routine 6374 6375 6376 ; Interrupt 00h (divide error) handler. 0 00007227 90EB10FFFFFFFF4B42 iispentry intr0, 0, sharedentry1 0 00007230 00EB9F00 0 0000723A 2EC706[0000][0000] mov word [cs:run_int], int0msg ; remember interrupt type 0 00007241 E9EC00 jmp intrtn ; jump to register saving routine 6380 6381 6382 6383 ; Interrupt 03h (breakpoint interrupt) handler. 0 00007244 EB10FFFFFFFF4B4200 iispentry intr3, 0, sharedentry1 0 0000724D EB8300 0 00007256 2EC706[0000][0000] mov word [cs:run_int], int3msg ; remember interrupt type 6386 %if _CATCHINT06 0 0000725D E9D000 jmp intrtn ; jump to register saving routine 6388 6389 6390 ; Interrupt 06h (invalid opcode) handler. 0 00007260 EB10FFFFFFFF4B4200 iispentry intr6, 0, sharedentry2 0 00007269 EB1100 0 00007272 2EC706[0000][0000] mov word [cs:run_int], int6msg ; remember interrupt type 6393 %endif 0 00007279 E9B400 jmp intrtn ; jump to register saving routine 6395 %endif ; !_LOADER 6396 6397 6398 sharedentry2.hwreset: 0 0000727C CB retf 6400 6401 6402 %if _CATCHINT07 6403 ; Interrupt 07h (no x87 present on 286+) handler. 6404 iispentry intr7, 0, sharedentry2 6405 mov word [cs:run_int], int7msg ; remember interrupt type 6406 cmp byte [cs:bInDbg], 0 6407 jne r86m_debugger_exception 6408 jmp intrtn ; jump to register saving routine 6409 %endif 6410 6411 %if _CATCHINT0C 6412 ; Interrupt 0Ch (stack fault in R86M, or IRQ) handler. 0 0000727D 90EB10FFFFFFFF4B42 iispentry intr0C, 0, sharedentry2 0 00007286 00EBF300 6414 %if _MCLOPT 6415 cmp byte [cs:master_pic_base], 20h 6416 jae @F 6417 %endif 0 00007290 50 push ax 0 00007291 B00B mov al, 0Bh ; request In-Service Register (ISR) 0 00007293 E620 out 20h, al ; from primary PIC 0 00007295 E420 in al, 20h ; read the ISR 0 00007297 A810 test al, 1_0000b ; IRQ #4 occurred ? 0 00007299 58 pop ax 0 0000729A 7515 jnz .notours ; yes, (likely) not a stack fault --> 6425 @@: 0 0000729C 2EC706[0000][0000] mov word [cs:run_int], int0Cmsg ; remember interrupt type 0 000072A3 2E803E[0000]00 cmp byte [cs:bInDbg], 0 0 000072A9 7403E9C4FC jne r86m_debugger_exception 0 000072AE E97F00 jmp intrtn ; jump to register saving routine 6430 6431 .notours: 0 000072B1 2EFF2E[1003] jmp far [cs:.next] 6433 %endif 6434 %if _CATCHINT0D 6435 6436 6437 ; Interrupt 0Dh (general protection fault in R86M, or IRQ) handler. 0 000072B6 EB10FFFFFFFF4B4200 iispentry intr0D, 0, sharedentry2 0 000072BF EBBB00 6439 %if _MCLOPT 6440 cmp byte [cs:master_pic_base], 20h 6441 jae @F 6442 %endif 0 000072C8 50 push ax 0 000072C9 B00B mov al, 0Bh ; request In-Service Register (ISR) 0 000072CB E620 out 20h, al ; from primary PIC 0 000072CD E420 in al, 20h ; read the ISR 0 000072CF A820 test al, 10_0000b ; IRQ #5 occurred ? 0 000072D1 58 pop ax 0 000072D2 7514 jnz .notours ; yes, (likely) not a GPF --> 6450 @@: 0 000072D4 2EC706[0000][0000] mov word [cs:run_int], int0Dmsg ; remember interrupt type 0 000072DB 2E803E[0000]00 cmp byte [cs:bInDbg], 0 0 000072E1 7403E98CFC jne r86m_debugger_exception 0 000072E6 EB48 jmp intrtn ; jump to register saving routine 6455 6456 .notours: 0 000072E8 2EFF2E[4803] jmp far [cs:.next] 6458 %endif 6459 %if _CATCHINT18 6460 ; Interrupt 18h (diskless boot hook) handler. 0 000072ED 90EB10FFFFFFFF4B42 iispentry intr18, 0, sharedentry3 0 000072F6 00EB7900 0 00007300 2EC706[0000][0000] mov word [cs:run_int], int18msg ; remember interrupt type 6463 %endif 6464 %if _CATCHINT19 0 00007307 EB27 jmp intrtn ; jump to register saving routine 6466 6467 6468 ; Interrupt 19h (boot load) handler. 0 00007309 90EB10FFFFFFFF4B42 iispentry intr19, 0, sharedentry3 0 00007312 00EB5D00 0 0000731C 2EC706[0000][0000] mov word [cs:run_int], int19msg ; remember interrupt type 0 00007323 2EC706[0000][0000] mov word [cs:lastcmd], dmycmd ; disable T/P/G auto-repeat 0 0000732A 2E8026[0300]FE clropt [cs:internalflags2], dif2_boot_loaded_kernel 6473 %endif 6474 6475 ; Common interrupt routine. 6476 6477 %if !_LOADER 6478 ; Housekeeping. 6479 intrtn: 0 00007330 FA cli ; just in case 0 00007331 2E8F06[0000] pop word [cs:reg_eip] ; recover things from stack 0 00007336 2E8F06[0000] pop word [cs:reg_cs] 0 0000733B 2E8F06[0000] pop word [cs:reg_efl] 0 00007340 2E8C1E[0000] mov word [cs:reg_ds], ds ; ! word-aligned (AC flag) 0 00007345 2EA3[0000] mov word [cs:reg_eax], ax ; ! word-aligned (AC flag) 0 00007349 8CC8 mov ax, cs 0 0000734B 8ED8 mov ds, ax ; => lDEBUG_DATA_ENTRY 6488 0 0000734D 90 align 4, nop 6490 patcharea_intrtn: 0 00007350 90 .: times 32 nop 6492 .end: 6493 .size equ .end - . 6494 .segment equ pspdbg 6495 6496 %ifn _RUN_ENTRY_SECTION 6497 times 1 - (($ - $$) & 1) nop ; align in-code parameter 6498 call entry_to_code_seg 6499 dw intrtn_code 6500 ; To avoid delaying the code segment switch, we use the client's 6501 ; stack here to call (jump) via entry_to_code_seg. 6502 %else 0 00007370 EB01 jmp intrtn_entry 6504 %endif 6505 6506 sharedentry3.hwreset: 0 00007372 CB retf 6508 6509 6510 %ifn _RUN_ENTRY_SECTION 6511 usesection lDEBUG_CODE 6512 6513 code_insure_low_byte_not_0CCh 6514 intrtn_code: 6515 %else 6516 usesection lDEBUG_DATA_ENTRY 6516 ------------------ note: usesection lDEBUG_DATA_ENTRY 6517 intrtn_entry: 6518 %endif 6519 6520 %if _PM 0 00007373 C606[0000]00 mov byte [pm_2_86m_0], 0 0 00007378 8026[0100]F7 clropt [internalflags], protectedmode ; reset PM flag 6523 .from_installdpmi: 6524 %endif 0 0000737D 8C16[0000] mov word [reg_ss], ss ; save stack position 0 00007381 8326[0200]00 _386 and word [reg_eip+2], byte 0 ; we're from real mode 0 00007386 66 _386_o32 ; mov dword [reg_esp], esp 0 00007387 8926[0000] mov word [reg_esp], sp 0 0000738B 8ED0 mov ss, ax ; mov ss, cs ; (don't use the stack here) 6530 6531 %if _PM 0 0000738D EB0D jmp @F 6533 6534 %ifn _RUN_ENTRY_SECTION 6535 intrtn2_code: ; <--- entry protected mode 6536 %else 6537 intrtn2_entry: ; <--- entry protected mode 6538 %endif 0 0000738F 368C1E[0000] mov word [ss:reg_ds], ds ; ! word-aligned (AC flag) 0 00007394 36A3[0000] mov word [ss:reg_eax], ax ; ! word-aligned (AC flag) 0 00007398 8CD0 mov ax, ss 0 0000739A 8ED8 mov ds, ax ; mov ds, ss 6543 @@: 6544 %endif 0 0000739C B80200 mov ax, 2 6546 %ifn _ONLY386 0 0000739F EB1A _386_jmps .386 ; --> 0 000073A1 BC[0200] mov sp, reg_es+2 0 000073A4 06 push es 6550 ; sub sp, ax 6551 ; sub sp, ax ; ds already saved 6552 ; sub sp, ax ; don't overwrite high word of di 0 000073A5 83EC06 sub sp, byte 3*2 0 000073A8 57 push di 0 000073A9 29C4 sub sp, ax 0 000073AB 56 push si 0 000073AC 29C4 sub sp, ax 0 000073AE 55 push bp 6559 ; sub sp, ax 6560 ; sub sp, ax ; sp already saved 6561 ; sub sp, ax 0 000073AF 83EC06 sub sp, byte 3*2 0 000073B2 52 push dx 0 000073B3 29C4 sub sp, ax 0 000073B5 51 push cx 0 000073B6 29C4 sub sp, ax 0 000073B8 53 push bx 6568 %endif 6569 %ifn _ONLYNON386 6570 %ifn _ONLY386 0 000073B9 EB34 jmp short .common 6572 %endif 6573 6574 .386: 6575 [cpu 386] 0 000073BB 66BC[02000000] mov esp, reg_gs+2 0 000073C1 0FA8 push gs 0 000073C3 29C4 sub sp, ax ; don't overwrite high words of segments 0 000073C5 0FA0 push fs 6580 ; sub sp, ax 6581 ; sub sp, ax ; cs already saved 6582 ; sub sp, ax 6583 ; sub sp, ax ; ss already saved 6584 ; sub sp, ax 0 000073C7 83EC0A sub sp, byte 5*2 0 000073CA 06 push es 6587 ; sub sp, ax 6588 ; sub sp, ax ; ds already saved 0 000073CB 83EC04 sub sp, byte 2*2 0 000073CE 6657 push edi 0 000073D0 6656 push esi 0 000073D2 6655 push ebp 6593 ; sub sp, ax 6594 ; sub sp, ax ; sp already saved 0 000073D4 83EC04 sub sp, byte 2*2 0 000073D7 6652 push edx 0 000073D9 6651 push ecx 0 000073DB 669C pushfd ; (this overwrites reg_ebx) 0 000073DD 01C4 add sp, ax ; discard low word of efl 0 000073DF 8F06[0200] pop word [reg_efl+2] 0 000073E3 6A00 push 0 0 000073E5 9C pushf ; (this also overwrites reg_ebx) 0 000073E6 669D popfd ; clear high word of efl inside debugger (resets AC flag) 0 000073E8 6653 push ebx 0 000073EA A1[0000] mov ax, word [reg_eax] ; restore ax 0 000073ED 6650 push eax ; so we don't overwrite it with 2 here 6607 __CPU__ 6608 .common: 6609 %endif 6610 6611 %ifn _RUN_ENTRY_SECTION 6612 code_insure_low_byte_not_0CCh 6613 ; Clean up. 6614 intrtn1_code: 6615 %else 6616 intrtn1_entry: 6617 %endif 0 000073EF 66 _386_o32 ; mov esp, dword [run_sp] 0 000073F0 8B26[0000] mov sp, word [run_sp] ; restore running stack 0 000073F4 0326[0000] add sp, word [run_sp_reserve] 0 000073F8 FC cld ; clear direction flag 0 000073F9 FB sti ; interrupts back on 6623 6624 %if _SYMBOLIC 0 000073FA 8026[0200]FD clropt [internalflags2], dif2_xms_detection_done 6626 ; Re-detect XMS after running. 6627 ; 6628 ; The actual detection is done in symbol access functions, 6629 ; which are only called once all breakpoints are restored. 6630 %endif 6631 6632 %if _RUN_ENTRY_SECTION 0 000073FF E8[0000] call entry_to_code_segsel 0 00007402 [B81A] dw .code 6635 6636 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 6636 ------------------ note: usesection lDEBUG_CODE 6637 .code: 6638 %endif 6639 6640 %if _PM 0 0000AA95 E83801 call handle_mode_changed 6642 %endif 6643 0 0000AA98 E88DEF call get_cseip_of_possible_breakpoint 6645 ; Initialise this here. This means we do not need to call 6646 ; resetmode between proceed_wp and bb_wp and gg_wp. If 6647 ; more than one point needs to switch modes this avoids 6648 ; repeated modeswitching back and forth. 6649 6650 %if _DEBUG ; reset to next copy's divide/trace/breakpoint ints 6651 %if _DEBUG_COND 0 0000AA9B F606[0100]01 testopt [internalflags6], dif6_debug_mode 0 0000AAA0 7448 jz .skipints 0 0000AAA2 E80200 call reset_interrupts 0 0000AAA5 EB43 jmp .skipints 6656 6657 reset_interrupts: equ $ 6658 %endif 0 0000AAA7 51 push cx 0 0000AAA8 56 push si 0 0000AAA9 57 push di 0 0000AAAA 50 push ax 0 0000AAAB 53 push bx 0 0000AAAC 52 push dx 0 0000AAAD 55 push bp 6666 6667 %if _PM 0 0000AAAE E8[0000] call ispm 0 0000AAB1 7414 jz @F ; in PM --> 0 0000AAB3 F606[0200]04 testopt [internalflags], canswitchmode 0 0000AAB8 7410 jz @FF ; in 86 Mode and cannot switch to PM --> 6672 6673 d4 call d4message 6674 d4 asciz "In intrtn1_code (switch mode before calling pm_reset_handlers)",13,10 0 0000AABA 800E[0200]08 setopt [internalflags], modeswitched ; set flag for resetmode 0 0000AABF B000 mov al, 0 0 0000AAC1 E8BEEF call sr_state ; save state 0 0000AAC4 E881EF call switchmode ; switch to PM 6679 ; ! handle_mode_changed not called here ! 6680 ; do not call InDOS or other functions using seg/sels 6681 @@: 0 0000AAC7 E8DC02 call pm_reset_handlers 6683 ; ! this calls resetmode 6684 @@: 6685 6686 numdef OVERRIDE_BUILD_PM_DEBUG, 0 6687 %if ! _CATCHPMINT214C && ! _OVERRIDE_BUILD_PM_DEBUG 6688 %fatal Cannot build DDEBUGX: handler switching without Int21.4C hook untested 6689 %endif 6690 %endif 6691 6692 %if CATCHINTAMOUNT 6693 %if _CATCHINT06 && _DETECT95LX 0 0000AACA 8B0E[0000] mov cx, word [inttab_number_variable] 6695 %else 6696 mov cx, inttab_number 6697 %endif 0 0000AACE E312 jcxz .intend 0 0000AAD0 BE[0000] mov si, inttab 0 0000AAD3 BAFFFF mov dx, -1 ; always force 6701 .nextint: 0 0000AAD6 AC lodsb 0 0000AAD7 93 xchg ax, bx ; bl = number 0 0000AAD8 AD lodsw ; si -> list 0 0000AAD9 96 xchg ax, si ; si -> entry, ax -> list 0 0000AADA 93 xchg ax, bx ; al = number, bx -> list 0 0000AADB E8[0000] call UnhookInterruptForce 0 0000AADE 87DE xchg bx, si ; si -> list 0 0000AAE0 E2F4 loop .nextint 6710 6711 .intend: 6712 %endif 6713 0 0000AAE2 5D pop bp 0 0000AAE3 5A pop dx 0 0000AAE4 5B pop bx 0 0000AAE5 58 pop ax 0 0000AAE6 5F pop di 0 0000AAE7 5E pop si 0 0000AAE8 59 pop cx 6721 %if _DEBUG_COND 0 0000AAE9 C3 retn 6723 %endif 6724 .skipints: 6725 %endif 6726 0 0000AAEA 8026[0100]FE clropt [reg_efl], 100h ; clear TF 6728 0 0000AAEF E8[0000] call getpsp 0 0000AAF2 891E[0000] mov word [pspdbe], bx 6731 0 0000AAF6 E8[0000] call getint2324 ; save debuggee's int 23/24, set debugger's int 23/24 6733 0 0000AAF9 16 push ss 0 0000AAFA 07 pop es 0 0000AAFB E8[0000] call setpspdbg ; set PSP of debugger 6737 0 0000AAFE 800E[0100]30 setopt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is on 6739 %if _PM 0 0000AB03 E8[0000] call ispm 0 0000AB06 7420 jz .a20done ; assume A20 on. (is this the right thing to do?) 6742 %endif 0 0000AB08 06 push es 0 0000AB09 1E push ds 0 0000AB0A 57 push di 0 0000AB0B 56 push si 0 0000AB0C 51 push cx 0 0000AB0D 31F6 xor si, si 0 0000AB0F 8EDE mov ds, si ; ds = 0000h 0 0000AB11 4E dec si 0 0000AB12 8EC6 mov es, si ; es = FFFFh 0 0000AB14 46 inc si ; ds:si = 0000h:0000h = 00000h 0 0000AB15 BF1000 mov di, 0010h ; es:di = FFFFh:0010h = 100000h (same address if it overflows) 0 0000AB18 89F9 mov cx, di ; 32 byte (16 = 10h word) 0 0000AB1A F3A7 repe cmpsw ; compare them and assume A20 line switched off if same 0 0000AB1C 59 pop cx 0 0000AB1D 5E pop si 0 0000AB1E 5F pop di 0 0000AB1F 1F pop ds 0 0000AB20 07 pop es 0 0000AB21 7505 jne .a20done ; not equal, A20 line is switched on --> 6762 ; if equal, the A20 line is probably switched off 0 0000AB23 8026[0100]CF clropt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is off 6764 6765 %if 0 ;_LOCALENABLEA20 6766 ; This doesn't serve any particular reason if we have no business accessing the HMA. 6767 ; What's more important is that the dump, assemble, and disassemble commands *should* 6768 ; use a disabled A20 if it is disabled to the debuggee. Thus, enabling A20 belongs, if 6769 ; at all, into getsegmented (similar to the switch to PM) as there may be breakpoints in 6770 ; the HMA that we need to reset. 6771 %if _GUARD_86M_INT2F 6772 push es 6773 xor ax, ax 6774 mov es, ax ; (only used in 86 Mode) 6775 mov ax, [es:2Fh * 4] 6776 cmp ax, -1 6777 je @F ; --> (ZR) 6778 or ax, [es:2Fh * 4 + 2] 6779 @@: 6780 pop es 6781 jz @F 6782 %endif 6783 mov ax, 4300h 6784 int 2Fh ; XMS v2 installation check 6785 cmp al, 80h ; installed ? 6786 jne .a20done ; no --> 6787 mov ax, 4310h 6788 int 2Fh ; get entry 6789 mov ah, 05h 6790 push cs 6791 call callfaresbx ; local enable A20 6792 push ds 6793 pop es 6794 dec ax 6795 jnz .a20done ; not able to enable A20 --> 6796 ; actually check here to insure it is on? 6797 setopt [internalflags], debuggerA20 ; our A20 is on 6798 @@: 6799 %endif 6800 .a20done: 6801 0 0000AB28 C606[0000]01 mov byte [bInDbg], 1 6803 %if _CATCHINT19 0 0000AB2D 813E[0000][0000] cmp word [run_int], int19msg 0 0000AB33 7505 jne @F 0 0000AB35 800E[0200]20 setopt [internalflags3], dif3_gotint19 6807 %endif 6808 @@: 0 0000AB3A 813E[0000][0000] cmp word [run_int], progtrm 0 0000AB40 7505 jnz @F 0 0000AB42 800E[0200]80 setopt [internalflags], attachedterm 6812 @@: 6813 6814 %if _FORCETEXT 6815 call checkgfx ; see if current mode is gfx, set to text if yes 6816 %endif 6817 6818 %if _VXCHG 0 0000AB47 B001 mov al, 1 ; restore debugger screen 0 0000AB49 E8[0000] call swapscreen 6821 %ifn _VXCHGBIOS 0 0000AB4C 06 push es 0 0000AB4D B84000 mov ax, 0040h 0 0000AB50 8EC0 mov es, ax 0 0000AB52 26A08400 mov al, [es:84h] ; did the number of screen rows change? 0 0000AB56 268A3E6200 mov bh, [es:62h] 0 0000AB5B 883E[0000] mov [vpage], bh 0 0000AB5F 3A06[0000] cmp al, [vrows] 0 0000AB63 A2[0000] mov [vrows], al 0 0000AB66 7419 jz @F 6831 0 0000AB68 F606[0000]01 testopt [internalflags6], dif6_vv_mode 0 0000AB6D 7412 jz @F 6834 0 0000AB6F 88C6 mov dh, al ; yes. we cannot fully restore, but at least 0 0000AB71 B200 mov dl, 0 ; clear bottom line to ensure the debugger displays 6837 ; will be seen 0 0000AB73 B402 mov ah, 2 ; set cursor position 0 0000AB75 CD10 int 10h 0 0000AB77 B307 mov bl, 7 ; BH=video page, BL=attribute 0 0000AB79 B95000 mov cx, 80 ; CX=columns 0 0000AB7C B82009 mov ax, 0920h ; AL=char to display 0 0000AB7F CD10 int 10h 6844 @@: 0 0000AB81 07 pop es 6846 %else 6847 ;--- with page flips, there are problems with many BIOSes: 6848 ;--- the debugger displays may get the color of the debuggee! 6849 ;--- if there's any trick to convince the BIOS not to do this, 6850 ;--- implement it here! 6851 mov byte [vpage], 1 6852 %endif 6853 %endif 6854 6855 %if _ALTVID 0 0000AB82 E80100 call setscreen 6857 %endif 6858 0 0000AB85 C3 retn 6860 6861 %if 0 ;_LOCALENABLEA20 6862 callfaresbx: 6863 push es 6864 push bx 6865 retf 6866 %endif 6867 %endif ; !_LOADER 6868 6869 6870 %if _ALTVID 6871 6872 ;--- switch to debugger/debuggee screen with option /2. 6873 ;--- since DOS/BIOS is used for output, there's no guarantee that it will work. 6874 6875 setscreen: 0 0000AB86 C3 retn ; will be patched to "push ds" if "/2" cmdline switch and second adapter exists 6877 ; (SMC in section lDEBUG_CODE) 0 0000AB87 8B16[0000] mov dx, [oldcrtp] 0 0000AB8B 8B1E[0000] mov bx, [oldcols] 0 0000AB8F A1[0000] mov ax, [oldmr] 0 0000AB92 B94000 mov cx, 0040h ; 0040h is supposed to work in both rm/pm 0 0000AB95 8ED9 mov ds, cx 0 0000AB97 368B0E[0000] mov cx, [ss:oldcsrpos] 0 0000AB9C 80261000CF and byte [10h], ~ 30h 0 0000ABA1 80FAB4 cmp dl, 0B4h 0 0000ABA4 7505 jnz @F 0 0000ABA6 800E100030 or byte [10h], 30h 6888 @@: 0 0000ABAB 871E4A00 xchg bx, [4Ah] 0 0000ABAF 870E5000 xchg cx, [50h] 0 0000ABB3 87166300 xchg dx, [63h] 0 0000ABB7 86064900 xchg al, [49h] 0 0000ABBB 86268400 xchg ah, [84h] 0 0000ABBF 1F pop ds 0 0000ABC0 8916[0000] mov [oldcrtp], dx 0 0000ABC4 890E[0000] mov [oldcsrpos], cx 0 0000ABC8 891E[0000] mov [oldcols], bx 0 0000ABCC A3[0000] mov [oldmr], ax 0 0000ABCF C3 retn 6900 %endif 6901 6902 6903 %if _FORCETEXT 6904 checkgfx: 6905 mov dx, 3CEh ; see if in graphics mode 6906 in al, dx 6907 mov bl, al 6908 mov al, 6 6909 out dx, al 6910 inc dx 6911 in al, dx 6912 xchg bl, al 6913 dec dx 6914 out dx, al 6915 test bl, 1 6916 jz @F 6917 mov ax, 0003h 6918 int 10h 6919 @@: 6920 retn 6921 %endif 6922 6923 6924 %if _PM 6925 ; INP: flag for PM 6926 ; flag for prior PM (from remember_mode) 6927 ; flag for modeswitched (set if in modeswitching) 6928 ; OUT: seg/sels initialised for new mode, if changed 6929 handle_mode_changed: 0 0000ABD0 BE[0000] mov si, convsegs 0 0000ABD3 B9[0000] mov cx, convsegs.amount 6932 0 0000ABD6 E8[0000] call ispm 0 0000ABD9 7503E98600 jz .now_pm 6935 [cpu 286] 6936 .now_86m: 0 0000ABDE F606[0200]40 testopt [internalflags3], dif3_prior_pm 0 0000ABE3 7503E9C200 jz .from_no_change 6939 %if _MMXSUPP && _MMX_REDETECT 0 0000ABE8 E8CF00 call mmx_redetect 6941 %endif 6942 .from_pm_now_86m: 6943 .from_pm_now_86m.loop: 0 0000ABEB AD lodsw 0 0000ABEC 97 xchg ax, di 0 0000ABED 81FE[0000] cmp si, convsegs.end_fixed 0 0000ABF1 770A ja @F 0 0000ABF3 8B5502 mov dx, word [di + soaSegment] 0 0000ABF6 8915 mov word [di + soaSegSel], dx 0 0000ABF8 E2F1 loop .from_pm_now_86m.loop 0 0000ABFA E9AD00 jmp .from_done_change 6952 6953 @@: 6954 ; We want to switch modes to get the segment bases. 6955 ; First check we aren't already modeswitched. 0 0000ABFD F606[0200]08 testopt [internalflags], modeswitched 0 0000AC02 7403E9A300 jnz .from_done_change ; cancel this --> 6958 0 0000AC07 F606[0200]04 testopt [internalflags], canswitchmode 0 0000AC0C 7510 jnz @FF 0 0000AC0E EB02 jmp @F 6962 6963 numdef OVERRIDE_BUILD_PM_HANDLE_SWITCH, 0 6964 %if ! _CATCHPMINT214C && ! _OVERRIDE_BUILD_PM_HANDLE_SWITCH 6965 %fatal Cannot build DEBUGX: handle mode changed without Int21.4C will fail 6966 %endif 6967 6968 6969 .from_pm_now_86m.loop.nonfixed.nomodeswitch: 0 0000AC10 AD lodsw 0 0000AC11 97 xchg ax, di 6972 @@: 0 0000AC12 31D2 xor dx, dx 0 0000AC14 895502 mov word [di + soaSegment], dx 0 0000AC17 8915 mov word [di + soaSegSel], dx 0 0000AC19 E2F5 loop .from_pm_now_86m.loop.nonfixed.nomodeswitch 0 0000AC1B E98C00 jmp .from_done_change 6978 6979 @@: 0 0000AC1E 51 push cx 0 0000AC1F 57 push di 0 0000AC20 56 push si 6983 d4 call d4message 6984 d4 asciz "In intrtn1_code.from_pm_now_86m (switching modes to access selectors)",13,10 0 0000AC21 800E[0200]08 setopt [internalflags], modeswitched ; set flag for resetmode 0 0000AC26 B000 mov al, 0 0 0000AC28 E857EE call sr_state ; save state 0 0000AC2B E81AEE call switchmode ; switch to PM 6989 ; ! handle_mode_changed not called here ! 6990 ; do not call InDOS or other functions using seg/sels 0 0000AC2E 5E pop si 0 0000AC2F 5F pop di 0 0000AC30 EB03 jmp @F 6994 6995 .from_pm_now_86m.loop.nonfixed: 0 0000AC32 AD lodsw 0 0000AC33 97 xchg ax, di 0 0000AC34 51 push cx 6999 @@: 0 0000AC35 31DB xor bx, bx 0 0000AC37 875D04 xchg bx, word [di + soaSelector] 0 0000AC3A B80600 mov ax, 0006h 0 0000AC3D CD31 int 31h 0 0000AC3F 7214 jc @F ; fail --> 0 0000AC41 F6C20F test dl, 15 0 0000AC44 750F jnz @F ; not on a segment boundary --> 0 0000AC46 F7C1F0FF test cx, 0FFF0h 0 0000AC4A 7509 jnz @F ; >= 1024 KiB --> 0 0000AC4C C1EA04 shr dx, 4 0 0000AC4F C1E10C shl cx, 12 0 0000AC52 09CA or dx, cx 0 0000AC54 A9 db __TEST_IMM16 ; (skip xor) 7013 @@: 0 0000AC55 31D2 xor dx, dx ; if no valid segment 0 0000AC57 895502 mov word [di + soaSegment], dx 0 0000AC5A 59 pop cx 0 0000AC5B 8915 mov word [di + soaSegSel], dx 0 0000AC5D E2D3 loop .from_pm_now_86m.loop.nonfixed 0 0000AC5F E845EE call resetmode ; ! only if we did the switch 7020 ; Note: This recursively calls this function, 7021 ; handle_mode_changed. Because the modeswitched 7022 ; flag is set during this call, this only re- 7023 ; initialises the fixed seg/sels with the segment 7024 ; values. That is redundant but does no harm. 0 0000AC62 EB46 jmp .from_done_change 7026 __CPU__ 7027 7028 .now_pm: 0 0000AC64 F606[0200]40 testopt [internalflags3], dif3_prior_pm 0 0000AC69 753F jnz .from_no_change 7031 %if _MMXSUPP && _MMX_REDETECT 0 0000AC6B E84C00 call mmx_redetect 7033 %endif 7034 .from_86m_now_pm: 7035 .from_86m_now_pm.loop: 0 0000AC6E AD lodsw 0 0000AC6F 97 xchg ax, di 0 0000AC70 81FE[0000] cmp si, convsegs.end_fixed 0 0000AC74 7716 ja @F 7040 0 0000AC76 8B4504 mov ax, word [di + soaSelector] 0 0000AC79 85C0 test ax, ax 0 0000AC7B 750B jnz .no_dosdata_change 0 0000AC7D 8B5D02 mov bx, word [di + soaSegment] 0 0000AC80 B80200 mov ax, 0002h 0 0000AC83 CD31 int 31h 0 0000AC85 894504 mov word [di + soaSelector], ax 7048 7049 .no_dosdata_change: 0 0000AC88 8905 mov word [di + soaSegSel], ax 0 0000AC8A EB1C jmp @FFF 7052 7053 @@: 7054 ; Magic: Do not modify if called during modeswitching. 0 0000AC8C F606[0200]08 testopt [internalflags], modeswitched 0 0000AC91 7517 jnz .from_done_change ; cancel this --> 7057 0 0000AC93 8B5D02 mov bx, word [di + soaSegment] 0 0000AC96 B80200 mov ax, 0002h 0 0000AC99 CD31 int 31h 0 0000AC9B 7302 jnc @F 0 0000AC9D 31C0 xor ax, ax 7063 @@: 0 0000AC9F 8905 mov word [di + soaSegSel], ax 0 0000ACA1 894504 mov word [di + soaSelector], ax 0 0000ACA4 83650200 and word [di + soaSegment], 0 7067 @@: 7068 %if $ - .from_86m_now_pm.loop > 126 7069 loop .from_86m_now_pm.loop_j 7070 jmp .from_done_change 7071 7072 .from_86m_now_pm.loop_j: 7073 jmp .from_86m_now_pm.loop 7074 %else 0 0000ACA8 E2C4 loop .from_86m_now_pm.loop 7076 %endif 7077 .from_done_change: 7078 .from_no_change: 7079 7080 7081 remember_mode: 0 0000ACAA 8026[0200]BF clropt [internalflags3], dif3_prior_pm 0 0000ACAF E8[0000] call ispm 0 0000ACB2 7505 jnz .from_86m 7085 .from_pm: 0 0000ACB4 800E[0200]40 setopt [internalflags3], dif3_prior_pm 7087 .from_86m: 0 0000ACB9 C3 retn 7089 %endif 7090 7091 7092 %if _MMXSUPP && _MMX_REDETECT && _PM 7093 mmx_redetect: 0 0000ACBA C3 _no386 retn 7095 %ifn _ONLYNON386 7096 subcpu 386 0 0000ACBB 6650 push eax 0 0000ACBD 6653 push ebx 0 0000ACBF 6651 push ecx 0 0000ACC1 6652 push edx 7101 0 0000ACC3 C606[0000]00 mov byte [has_mmx], 0 ; if no 486 or no cpuid, reset 7103 7104 ; Copied from init.asm, debugging messages 7105 ; and machine variable access removed. 0 0000ACC8 89E3 mov bx, sp ; save current stack pointer to align 0 0000ACCA 83E4FC and sp, ~3 ; align stack to avoid AC fault 0 0000ACCD 669C pushfd ; push original EFLAGS 0 0000ACCF 6658 pop eax ; get original EFLAGS 0 0000ACD1 6689C1 mov ecx, eax ; save original EFLAGS in ECX (including IF) 7111 0 0000ACD4 663500000400 xor eax, 40000h ; flip AC bit in EFLAGS 0 0000ACDA 25FFFD and ax, ~0200h ; clear IF 0 0000ACDD 6650 push eax ; put new EFLAGS value on stack 0 0000ACDF 669D popfd ; replace EFLAGS value; DI 0 0000ACE1 669C pushfd ; get new EFLAGS 0 0000ACE3 6658 pop eax ; store new EFLAGS value in EAX 0 0000ACE5 89C8 mov ax, cx ; ignore low bits (including IF) 0 0000ACE7 6639C8 cmp eax, ecx 0 0000ACEA 7416 je .cpudone_stack_eax_equals_ecx ; if 80386 --> 7121 7122 ; Intel486 DX CPU, Intel487 SX NDP, and Intel486 SX CPU check. 7123 ; Checking for ability to set/clear ID flag (bit 21) in EFLAGS 7124 ; which indicates the presence of a processor with the ability 7125 ; to use the CPUID instruction. 0 0000ACEC 6689C8 mov eax, ecx ; get original EFLAGS 0 0000ACEF 663500002000 xor eax, 200000h ; flip ID bit in EFLAGS 0 0000ACF5 25FFFD and ax, ~0200h ; clear IF 0 0000ACF8 6650 push eax ; save new EFLAGS value on stack 0 0000ACFA 669D popfd ; replace current EFLAGS value; DI 0 0000ACFC 669C pushfd ; get new EFLAGS 0 0000ACFE 6658 pop eax ; store new EFLAGS in EAX 0 0000AD00 89C8 mov ax, cx ; ignore low bits (including IF) 7134 7135 .cpudone_stack_eax_equals_ecx: 0 0000AD02 6651 push ecx 0 0000AD04 669D popfd ; restore AC,ID bits and IF in EFLAGS (86 Mode) 0 0000AD06 89DC mov sp, bx ; restore sp 7139 0 0000AD08 6639C8 cmp eax, ecx ; check if it's changed 0 0000AD0B 741E je .cpudone ; if it's a 486 (can't toggle ID bit) --> 7142 7143 ; Execute CPUID instruction. 7144 subcpu 486 ; NASM (at least 2.10rc1) handles cpuid itself as a 7145 ; 586+ instruction, but we know better. So this 7146 ; part is declared for 486 compatibility, and only 7147 ; the cpuid instructions are emitted with 586 7148 ; compatibility to appease NASM. 0 0000AD0D 6631C0 xor eax, eax ; set up input for CPUID instruction 7150 [cpu 586] 0 0000AD10 0FA2 cpuid 7152 __CPU__ 0 0000AD12 6683F801 cmp eax, byte 1 0 0000AD16 7213 jb .cpudone ; if 1 is not a valid input value for CPUID 0 0000AD18 6631C0 xor eax, eax ; otherwise, run CPUID with eax = 1 0 0000AD1B 6640 inc eax 7157 [cpu 586] 0 0000AD1D 0FA2 cpuid 7159 __CPU__ 0 0000AD1F 66F7C200008000 test edx, 80_0000h 0 0000AD26 0F9506[0000] setnz byte [has_mmx] 7162 .cpudone: 0 0000AD2B 665A pop edx 0 0000AD2D 6659 pop ecx 0 0000AD2F 665B pop ebx 0 0000AD31 6658 pop eax 0 0000AD33 C3 retn 7168 7169 subcpureset 7170 subcpureset 7171 %endif 7172 %endif 7173 7174 7175 %if _PM && _DEBUG 7176 ; INP: - 7177 ; OUT: es = ds 7178 ; CHG: eax, edx, bx, cx, bp, si, di 7179 ; STT: in PM 7180 ; do not call InDOS or other functions using seg/sels 7181 pm_set_handlers: 0 0000AD34 31ED xor bp, bp ; = 0 if no 386 0 0000AD36 45 _386 inc bp 0 0000AD37 45 _386 inc bp ; = 2 if 386 7185 0 0000AD38 1E push ds 0 0000AD39 07 pop es 7188 0 0000AD3A BE[0000] mov si, exctab ; hook several exceptions 7190 %if _DEBUGUPDATESAVE 0 0000AD3D BF[0000] mov di, excsave 7192 %endif 0 0000AD40 6631D2 _386 xor edx, edx ; clear edxh 0 0000AD43 BA[0000] mov dx, exc_first 7195 .loopexc: 0 0000AD46 AC lodsb 0 0000AD47 88C3 mov bl, al 7198 7199 %if _DEBUGUPDATESAVE 0 0000AD49 66 _386_o32 ; push edx 0 0000AD4A 52 push dx ; preserve excXX pointer 0 0000AD4B B80202 mov ax, 0202h 7203 ; (edxh is zero) 0 0000AD4E CD31 int 31h ; cx:(e)dx -> prior handler 0 0000AD50 66 _386_o32 ; xchg eax, edx 0 0000AD51 92 xchg ax, dx 0 0000AD52 66 _386_o32 ; stosd 0 0000AD53 AB stosw ; store offset (dword on 386+, else word) 0 0000AD54 91 xchg ax, cx 0 0000AD55 AB stosw ; store selector 0 0000AD56 B80400 mov ax, 4 0 0000AD59 29E8 sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 0 0000AD5B 01C7 add di, ax ; -> next entry of excsave 0 0000AD5D 66 _386_o32 ; pop edx 0 0000AD5E 5A pop dx 7216 %endif 7217 0 0000AD5F 8B0E[0000] mov cx, word [cssel] ; -> our handler for this exception 0 0000AD63 B80302 mov ax, 0203h 0 0000AD66 CD31 int 31h ; set our handler 7221 %ifn _LINK 7222 add dx, byte exc_second - exc_first 7223 %else 0 0000AD68 83C200 add dx, strict byte 0 7225 wlcalc byte_ext_exc_second, equ $ - 1 7226 wlcalc byte_minusext_exc_first, equ $ - 1 7227 %endif 7228 ; -> next handler 0 0000AD6B 81FE[0000] cmp si, endexctab ; if another to go --> 0 0000AD6F 72D5 jb .loopexc 7231 7232 %if _CATCHPMINT214C 0 0000AD71 BE[0000] mov si, pminttab ; ds:si -> pminttab 7234 %if _DEBUGUPDATESAVE 0 0000AD74 BF[0000] mov di, pmintsave ; es:di -> pmintsave 7236 %endif 7237 .loopint: 0 0000AD77 AC lodsb ; get interrupt number 0 0000AD78 88C3 mov bl, al ; bl = interrupt number 7240 7241 %if _DEBUGUPDATESAVE 0 0000AD7A 6631D2 _386 xor edx, edx ; clear edxh 0 0000AD7D B80402 mov ax, 0204h 0 0000AD80 CD31 int 31h ; cx:(e)dx -> prior handler 0 0000AD82 66 _386_o32 ; xchg eax, edx 0 0000AD83 92 xchg ax, dx ; (e)ax = offset 0 0000AD84 66 _386_o32 ; stosd 0 0000AD85 AB stosw ; store offset (dword on 386+, else word) 0 0000AD86 91 xchg ax, cx 0 0000AD87 AB stosw ; store selector 0 0000AD88 B80400 mov ax, 4 0 0000AD8B 29E8 sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 0 0000AD8D 01C7 add di, ax ; -> next entry of pmintsave 7254 %endif 7255 0 0000AD8F AD lodsw ; ax -> our handler 0 0000AD90 6631D2 _386 xor edx, edx 0 0000AD93 92 xchg ax, dx ; (e)dx -> our handler 0 0000AD94 8B0E[0000] mov cx, word [cssel] ; cx:(e)dx -> our handler 0 0000AD98 B80502 mov ax, 0205h 0 0000AD9B CD31 int 31h 0 0000AD9D 81FE[0000] cmp si, pminttab.end 0 0000ADA1 72D4 jb .loopint 7264 %endif 7265 0 0000ADA3 E901ED jmp resetmode 7267 %endif 7268 7269 7270 %if _PM && (_CATCHPMINT214C || _DEBUG || _TSR || _DEVICE) 7271 ; INP: - 7272 ; OUT: - 7273 ; CHG: eax, edx, bx, cx, bp, si, di 7274 ; STT: in PM 7275 ; do not call InDOS or other functions using seg/sels 7276 pm_reset_handlers: 0 0000ADA6 31ED xor bp, bp ; = 0 if no 386 0 0000ADA8 45 _386 inc bp 0 0000ADA9 45 _386 inc bp ; = 2 if 386 7280 7281 7282 %if CATCHEXCAMOUNT 7283 ; unhook exceptions 0 0000ADAA BF[0000] mov di, exctab 0 0000ADAD BE[0000] mov si, excsave 7286 .loopexc: 0 0000ADB0 8A1D mov bl, [di] ; bl = exception number 0 0000ADB2 47 inc di 0 0000ADB3 66 _386_o32 ; lodsd 0 0000ADB4 AD lodsw ; load offset (dword on 386+, else word) 0 0000ADB5 66 _386_o32 ; xchg eax, edx 0 0000ADB6 92 xchg ax, dx 0 0000ADB7 AD lodsw ; load selector 0 0000ADB8 91 xchg ax, cx ; cx:(e)dx -> prior handler 0 0000ADB9 B80400 mov ax, 4 0 0000ADBC 29E8 sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 0 0000ADBE 01C6 add si, ax ; -> next entry of excsave 0 0000ADC0 B80302 mov ax, 0203h 0 0000ADC3 CD31 int 31h ; set previous handler 0 0000ADC5 81FF[0000] cmp di, endexctab ; if another to go --> 0 0000ADC9 72E5 jb .loopexc 7302 %endif 7303 7304 7305 %if CATCHPMINTAMOUNT 7306 ; unhook interrupts 0 0000ADCB BF[0000] mov di, pminttab ; ds:di -> pminttab 0 0000ADCE BE[0000] mov si, pmintsave ; ds:si -> pmintsave 7309 .loopint: 0 0000ADD1 8A1D mov bl, [di] ; bl = interrupt number 0 0000ADD3 83C703 add di, 3 ; -> after this pminttab entry 0 0000ADD6 66 _386_o32 ; lodsd 0 0000ADD7 AD lodsw ; load offset (dword on 386+, else word) 0 0000ADD8 66 _386_o32 ; xchg eax, edx 0 0000ADD9 92 xchg ax, dx 0 0000ADDA AD lodsw ; load selector 0 0000ADDB 91 xchg ax, cx ; cx:(e)dx -> prior handler 0 0000ADDC B80400 mov ax, 4 0 0000ADDF 29E8 sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 0 0000ADE1 01C6 add si, ax ; -> next entry of pmintsave 0 0000ADE3 B80502 mov ax, 0205h 0 0000ADE6 CD31 int 31h ; set previous handler 0 0000ADE8 81FF[0000] cmp di, pminttab.end ; if another to go --> 0 0000ADEC 72E3 jb .loopint 7325 %endif 7326 0 0000ADEE E9B6EC jmp resetmode 7328 %endif 7329 7330 7331 %if _DEBUG1 7332 ; INP: bx -> dword address, word counter 7333 ; dx:ax = linear address to check 7334 ; OUT: NC if to proceed as usual 7335 ; CY if address matched and counter indicates trigger 7336 ; (ie, this should cause the caller to fail) 7337 ; If the address matched, the counter has been stepped. 7338 ; (The result of that step indicates whether to trigger.) 7339 ; STT: ds = ss = debugger data selector 7340 handle_test_case: 7341 cmp word [bx], ax 7342 jne .proceed 7343 cmp word [bx + 2], dx 7344 jne .proceed 7345 7346 test word [bx + 4], 7FFFh ; is it already at a terminal state ? 7347 jz .no_decrement ; yes, do not further decrement --> 7348 dec word [bx + 4] ; decrement (towards 0 or 8000h) 7349 jz .trigger ; case for decrementing 1 to 0 --> 7350 .no_decrement: 7351 cmp word [bx + 4], 8000h ; decrement resulted in 8000h 7352 je .trigger ; or was already in that state? --> 7353 .proceed: 7354 clc 7355 retn 7356 7357 .trigger: 7358 stc 7359 retn 7360 7361 7362 ; INP: bx -> first test record (dword address, word counter) 7363 ; dx:ax = linear address to check 7364 ; cx = number of consecutive test records to check 7365 ; OUT: NC if to proceed as usual 7366 ; CY if address matched and counter indicates trigger 7367 ; (ie, this should cause the caller to fail) 7368 ; CHG: bx, cx 7369 ; STT: ds = ss = debugger data selector 7370 ; 7371 ; Note that all test cases are tried and, if the address 7372 ; matches, their counters are stepped. In particular, 7373 ; a trigger no longer causes us to skip all further 7374 ; test cases that may have the same address. 7375 ; If at least one of the matching test cases indicates a 7376 ; trigger condition after its stepping, the return is CY. 7377 handle_test_case_multiple_16: 7378 mov cx, 16 7379 handle_test_case_multiple: 7380 clc 7381 pushf ; initialise flags on stack with NC 7382 jcxz .end 7383 .loop: 7384 call handle_test_case 7385 jnc .next 7386 popf ; (discard) 7387 stc 7388 pushf ; new flags on stack with CY 7389 .next: 7390 add bx, 6 7391 loop .loop 7392 .end: 7393 popf ; CF 7394 retn 7395 %endif 7396 7397 7398 %if !_LOADER 7399 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 7399 ------------------ note: usesection lDEBUG_DATA_ENTRY 7400 align 4, db 0 0 00007404 01000000 default_pp_count: dd 1 0 00007408 01000000 default_tp_count: dd 1 0 0000740C 01000000 default_tt_count: dd 1 7404 7405 7406 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 7406 ------------------ note: usesection lDEBUG_CODE 7407 ; PARSE_PT - Parse 'p' or 't' command. Also resets pagedcommand flag. 7408 ; Entry AL First character of command 7409 ; SI Address of next character 7410 ; [internalflags2] & dif2_is_pp = set if P 7411 ; [internalflags] & tt_p = set if TP 7412 ; both clear if T 7413 ; Exit BX:CX Number of times to repeat 7414 ; Uses AH,BX,CX,DX. 7415 7416 parse_pt: 0 0000ADF1 E8[0000] call guard_re 0 0000ADF4 C706[0000][0000] mov word [gg_deferred_message], msg.empty_message 0 0000ADFA 8326[0000]00 and word [bb_deferred_message_in_lineout_behind], 0 0 0000ADFF 8026[0000]F7 clropt [internalflags2], dif2_gg_is_gg 0 0000AE04 8026[0300]2B clropt [internalflags], tt_while | tt_silent_mode | tt_no_bb | tt_no_bb_first 0 0000AE09 8326[0000]00 and word [tt_silent_mode_number], 0 7424 7425 ; TP.NB, T.NB, P.NB: trace/proceed without bb breakpoints 7426 ; 7427 ; Note that when such a command is repeated through lastcmd, 7428 ; it gets an empty line, thus tt_no_bb remains clear, and 7429 ; the corresponding command without .NB is run. 0 0000AE0E 3C2E cmp al, '.' 0 0000AE10 7520 jne .no_dot 7432 0 0000AE12 AD lodsw 0 0000AE13 25DFDF and ax, TOUPPER_W 0 0000AE16 3D4E42 cmp ax, "NB" 0 0000AE19 7411 je .dot_nb 7437 ; TP.SB, T.SB, P.SB: trace/proceed without bb for first step 0 0000AE1B 3D5342 cmp ax, "SB" 0 0000AE1E 7405 je .dot_sb 0 0000AE20 4E dec si 0 0000AE21 4E dec si 0 0000AE22 E9[0000] jmp error 7443 7444 .dot_sb: 0 0000AE25 800E[0300]80 setopt [internalflags], tt_no_bb_first 0 0000AE2A EB05 jmp .dot_common 7447 7448 .dot_nb: 0 0000AE2C 800E[0300]40 setopt [internalflags], tt_no_bb 7450 .dot_common: 0 0000AE31 AC lodsb 7452 .no_dot: 0 0000AE32 E86301 call parseql ; process =addr 0 0000AE35 E8[0000] call skipcomm0 ; skip any white space 7455 0 0000AE38 BA0400 mov dx, opt3_pp_no_paging 0 0000AE3B 8B1E[9604] mov bx, word [default_pp_count + 2] 0 0000AE3F 8B0E[9404] mov cx, word [default_pp_count] 0 0000AE43 F606[0100]10 testopt [internalflags2], dif2_is_pp 0 0000AE48 751D jnz @F 0 0000AE4A BA0200 mov dx, opt3_tp_no_paging 0 0000AE4D 8B1E[9A04] mov bx, word [default_tp_count + 2] 0 0000AE51 8B0E[9804] mov cx, word [default_tp_count] 0 0000AE55 F606[0300]08 testopt [internalflags], tt_p 0 0000AE5A 750B jnz @F 0 0000AE5C BA0100 mov dx, opt3_tt_no_paging 0 0000AE5F 8B1E[9E04] mov bx, word [default_tt_count + 2] 0 0000AE63 8B0E[9C04] mov cx, word [default_tt_count] 7469 @@: ; bx:cx = default count 7470 0 0000AE67 8516[0000] test word [options3], dx 0 0000AE6B 7405 jz @F 0 0000AE6D 8026[0000]F7 clropt [internalflags], pagedcommand 7474 @@: 7475 7476 ; Initialise auxbuff pointers. 0 0000AE72 E80B01 call tpg_initialise_empty_auxbuff 7478 0 0000AE75 E8[0000] call iseol? 7480 %if _LINK_COMPAT 0 0000AE78 7503 jne @F 0 0000AE7A E98A00 jmp strict near .ppt1 ; if no count given --> (uses bx:cx = default) 7483 @@: 7484 %else 7485 je .ppt1 ; if no count given --> (uses bx:cx = default) 7486 %endif 0 0000AE7D E8[0000]EB02[0000] nearcall getdword ; bx:dx = given count 7488 0 0000AE84 53 push bx 0 0000AE85 52 push dx ; push count 0 0000AE86 E8[0000] call skipcomm0 0 0000AE89 E8[0000] call iseol? 0 0000AE8C 7477 je .no_while 0 0000AE8E 4E dec si 0 0000AE8F BA[0000] mov dx, msg.while 0 0000AE92 E8[0000] call isstring? 0 0000AE95 7405 je .found_while 7498 0 0000AE97 E8B800 call .handle_silent ; (error if no SILENT keyword) 7500 0 0000AE9A EB69 jmp .no_while 7502 7503 7504 .found_while: 0 0000AE9C E8[0000] call skipcomma 0 0000AE9F 4E dec si 0 0000AEA0 89F1 mov cx, si 0 0000AEA2 AC lodsb 0 0000AEA3 E8[0000]EB02[0000] nearcall getexpression 0 0000AEAA E8[0000]EB02[0000] nearcall toboolean 0 0000AEB1 E8[0000] call skipcomm0 0 0000AEB4 52 push dx 0 0000AEB5 56 push si 0 0000AEB6 E8[0000] call iseol? ; expect end of line here 0 0000AEB9 7404 je .no_while_silent 7516 0 0000AEBB 4E dec si 0 0000AEBC E89300 call .handle_silent 7519 7520 .no_while_silent: 0 0000AEBF 5E pop si 0 0000AEC0 5A pop dx 0 0000AEC1 85D2 test dx, dx ; condition true now ? 0 0000AEC3 750F jnz @F 7525 0 0000AEC5 BA[0000] mov dx, msg.while_not_true 0 0000AEC8 E8[0000] call putsz 0 0000AECB B83601 mov ax, 0136h 0 0000AECE E8[0000] call setrc 0 0000AED1 E9[0000] jmp cmd3 7531 7532 @@: 7533 ; (si + 1) -> line terminator (13, ';', 0) or next keyword 7534 @@: 0 0000AED4 4E dec si ; -> terminator, or blank 0 0000AED5 807CFF20 cmp byte [si - 1], 32 ; another blank at end ? 0 0000AED9 74F9 je @B ; yes --> 0 0000AEDB 807CFF09 cmp byte [si - 1], 9 0 0000AEDF 74F3 je @B ; yes --> 0 0000AEE1 807CFF2C cmp byte [si - 1], ',' ; comma at end ? 0 0000AEE5 74ED je @B ; yes --> 0 0000AEE7 89F0 mov ax, si 0 0000AEE9 29C8 sub ax, cx ; ax = length of expression 0 0000AEEB 3D[FFFF] cmp ax, while_buffer.length - 1 0 0000AEEE 7603E9[0000] ja error 0 0000AEF3 57 push di 0 0000AEF4 BF[0000] mov di, while_buffer 0 0000AEF7 89CE mov si, cx ; -> expression start 0 0000AEF9 91 xchg cx, ax ; cx = length of expression 0 0000AEFA F3A4 rep movsb ; store expression 0 0000AEFC B000 mov al, 0 0 0000AEFE AA stosb ; terminate string 0 0000AEFF 5F pop di 7554 0 0000AF00 800E[0300]04 setopt [internalflags], tt_while 7556 .no_while: 0 0000AF05 59 pop cx 0 0000AF06 5B pop bx ; bx:cx = given count 7559 7560 .ppt1: 0 0000AF07 85DB test bx, bx 0 0000AF09 7507 jnz @F 0 0000AF0B 85C9 test cx, cx 0 0000AF0D 7503E9[0000] jz error ; must be at least 1, else error --> 7565 @@: 0 0000AF12 53 push bx 0 0000AF13 51 push cx 7568 0 0000AF14 8026[0000]E8 clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 7572 0 0000AF19 F606[0200]04 testopt [options], tp_do_not_skip_bp 0 0000AF1E 752C jnz .do_not_skip_cseip 0 0000AF20 800E[0000]01 setopt [internalflags2], dif2_gg_is_first 7576 0 0000AF25 803E[0000]00 cmp byte [eqflag], 0 0 0000AF2A 7508 jne .cseip_take_eql 7579 0 0000AF2C 66 _386_PM_o32 ; xor ecx, ecx 0 0000AF2D 31C9 xor cx, cx 0 0000AF2F E815EA call get_cseip_ecx_linear 0 0000AF32 EB0C jmp .got_cseip 7584 7585 .cseip_take_eql: 0 0000AF34 8B1E[0400] mov bx, word [eqladdr + 4] 0 0000AF38 66 _386_PM_o32 ; mov edx, dword [eqladdr] 0 0000AF39 8B16[0000] mov dx, word [eqladdr] 0 0000AF3D E813EA call getlinear_d_b 7590 .got_cseip: 0 0000AF40 7303E9[0000] jc error 0 0000AF45 A3[0000] mov word [gg_first_cseip_linear], ax 0 0000AF48 8916[0200] mov word [gg_first_cseip_linear + 2], dx 7594 .do_not_skip_cseip: 7595 0 0000AF4C 59 pop cx 0 0000AF4D 5B pop bx 7598 0 0000AF4E E86C00 call seteq ; make the = operand take effect 0 0000AF51 C3 retn 7601 7602 7603 .handle_silent: 0 0000AF52 BA[0000] mov dx, msg.silent 0 0000AF55 E8[0000] call isstring? 0 0000AF58 7403E9[0000] jne error 0 0000AF5D E8[0000] call skipcomma 0 0000AF60 4E dec si 0 0000AF61 E8[0000] call skipequals 0 0000AF64 E8[0000] call iseol? 0 0000AF67 740E je .no_silent_mode_number 7612 0 0000AF69 E8[0000]EB02[0000] nearcall getword 0 0000AF70 8916[0000] mov word [tt_silent_mode_number], dx 0 0000AF74 E8[0000] call chkeol 7616 7617 .no_silent_mode_number: 0 0000AF77 E8[0000] call guard_auxbuff.1_or_2 0 0000AF7A 800E[0300]10 setopt [internalflags], tt_silent_mode 0 0000AF7F C3 retn 7621 7622 7623 ; INP: (_PM) word [auxbuff_switchbuffer_size] 7624 ; word [auxbuff_behind_last_silent] 7625 ; [options6] & opt6_rh_mode 7626 ; OUT: word [auxbuff_behind_last_silent] 7627 ; word [auxbuff_start_silent] 7628 ; CHG: dx 7629 tpg_initialise_empty_auxbuff: 7630 %if _RH 0 0000AF80 8B16[0000] mov dx, word [auxbuff_behind_last_silent] 0 0000AF84 F606[0200]10 testopt [options6], opt6_rh_mode 0 0000AF89 7508 jnz .last 7634 %endif 7635 .reset: 7636 %if _PM 0 0000AF8B 8B16[0000] mov dx, word [auxbuff_switchbuffer_size] 7638 %else 7639 xor dx, dx 7640 %endif 0 0000AF8F 8916[0000] mov word [auxbuff_behind_last_silent], dx 7642 .last: 7643 %if _RH 0 0000AF93 8916[0000] mov word [auxbuff_start_silent], dx 7645 %endif 0 0000AF97 C3 retn 7647 7648 7649 ; PARSEQL - Parse `=' operand for `g', 'p' and `t' commands. 7650 ; Entry AL First character of command 7651 ; SI Address of next character 7652 ; Exit AL First character beyond range 7653 ; SI Address of the character after that 7654 ; eqflag Nonzero if an `=' operand was present 7655 ; eqladdr Address, if one was given 7656 ; Uses AH,BX,CX,DX. 7657 7658 parseql: 0 0000AF98 C606[0000]00 mov byte [eqflag], 0 ; mark '=' as absent 0 0000AF9D 3C3D cmp al, '=' 0 0000AF9F 751B jne peq1 ; if no '=' operand 0 0000AFA1 E8[0000] call skipwhite 0 0000AFA4 8B1E[0000] mov bx, word [reg_cs] ; default segment 0 0000AFA8 E8[0000]EB02[0000] nearcall getaddrX ; get the address into bx:(e)dx 0 0000AFAF 66 _386_PM_o32 ; mov dword [eqladdr], edx 0 0000AFB0 8916[0000] mov word [eqladdr+0], dx 0 0000AFB4 891E[0400] mov word [eqladdr+4], bx 0 0000AFB8 FE06[0000] inc byte [eqflag] 7669 peq1: 0 0000AFBC C3 retn 7671 7672 7673 ; SETEQ - Copy the = arguments to their place, if appropriate. 7674 ; (This is not done immediately, because the command may have 7675 ; a syntax error.) 7676 ; Uses AX. 7677 seteq: 0 0000AFBD 803E[0000]00 cmp byte [eqflag], 0 0 0000AFC2 7417 je .return ; if no `=' operand 0 0000AFC4 A1[0000] mov ax, word [eqladdr+0] 0 0000AFC7 A3[0000] mov word [reg_eip], ax 7682 %if _PM 0 0000AFCA A1[0200] mov ax, word [eqladdr+2] 0 0000AFCD A3[0200] mov word [reg_eip+2], ax 7685 %endif 0 0000AFD0 A1[0400] mov ax, word [eqladdr+4] 0 0000AFD3 A3[0000] mov word [reg_cs], ax 0 0000AFD6 C606[0000]00 mov byte [eqflag], 0 ; clear the flag 7689 .return: 0 0000AFDB C3 retn 7691 %endif ; !_LOADER 7692 7693 usesection lDEBUG_CODE 7693 ------------------ note: usesection lDEBUG_CODE 7694 7695 ..@run_access_end: === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00007410 ???????? eldhSignature: resb 4 ; "ELD1" 0 00007414 ?????? resb 3 ; reserved 0 00007417 ?? resb 1 ; 26 (Ctrl-Z) 0 00007418 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000741C ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 0000741E ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00007420 ???????? eldhDataOffset: resd 1 0 00007424 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00007426 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00007428 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000742A ???????? eldhReserved: resb 4 ; reserved 0 0000742E ???? 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 00007430 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00007434 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00007438 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000743C ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00007410 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00007418 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000741C ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 0000741E ???? 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 00007410 ???? 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 00007412 ???? eldltAmount: resw 1 0 00007414 ???????? 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 00007410 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00007412 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00007414 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00007416 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00007418 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00007420 ???? 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 00007410 ???? eldlSignature: resw 1 ; 0E1D1h 0 00007412 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00007414 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00007416 ???? eldlUseLinkHash: resw 1 0 00007418 ???? eldlDataAmount: resw 1 0 0000741A ???? eldlDataPrefixes: resw 1 0 0000741C ???? eldlDataEntries: resw 1 0 0000741E ???? eldlDataAddresses: resw 1 0 00007420 ???? eldlCodeAmount: resw 1 0 00007422 ???? eldlCodePrefixes: resw 1 0 00007424 ???? eldlCodeEntries: resw 1 0 00007426 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00007428 ???? eldlDualAmount: resw 1 0 0000742A ???? eldlDualPrefixes: resw 1 0 0000742C ???? eldlDualEntries: resw 1 0 0000742E ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00007410 ???? ifKeyword: resw 1 0 00007412 ???? ifDescription: resw 1 0 00007414 ???? ifOptions: resw 1 0 00007416 ???? ifValue: resw 1 0 00007418 ???? ifTrying: resw 1 0 0000741A ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00007410 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00007414 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00007418 ???? smName1: resw 1 ; -> first string part 0 0000741A ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 0000741C ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 0000741E ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00007420 ???? smBaseNext: resw 1 0 00007422 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00007424 ???? smSpecialNext: resw 1 0 00007426 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00007410 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00007411 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00007412 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00007410 ???? shHash: resw 1 ; hash value 0 00007412 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00007410 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00007414 ???? xmsmSourceHandle: resw 1 0 00007416 ???????? xmsmSourceAddress: resd 1 0 0000741A ???? xmsmDestHandle: resw 1 0 0000741C ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <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 00007410 CB iisphwreset serial_interrupt_handler 29 0 00007411 00 align 2, db 0 0 00007412 EB10FFFFFFFF4B4280 iispentry serial_interrupt_handler, 80h, serial_interrupt_handler 0 0000741B EBF300 0 00007424 2EF606[0000]01 testopt [cs:serial_flags], sf_init_done 0 0000742A 7505 jnz @F 34 .notours: 0 0000742C 2EFF2E[0400] jmp far [cs:.next] 36 @@: 0 00007431 50 push ax 0 00007432 1E push ds 39 0 00007433 0E push cs 0 00007434 1F pop ds 0 00007435 B020 mov al, 20h ; acknowledge interrupt 0 00007437 803E[0100]00 cmp byte [serial_use_irqmask + 1], 0 0 0000743C 740B je @F 0 0000743E E87900 call serial_next_is_iret 0 00007441 751F jne @FF ; not our job to issue EOI --> 0 00007443 E6A0 out 0A0h, al ; to secondary PIC 0 00007445 E620 out 20h, al ; to primary PIC 0 00007447 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 00007449 B00B mov al, 0Bh ; request In-Service Register (ISR) 0 0000744B E620 out 20h, al ; from primary PIC 0 0000744D E420 in al, 20h ; read the ISR 0 0000744F 8406[0000] test al, byte [serial_use_irqmask] 0 00007453 7504 jnz .ours 0 00007455 1F pop ds 0 00007456 58 pop ax 0 00007457 EBD3 jmp .notours 64 65 .ours: 0 00007459 E85E00 call serial_next_is_iret 0 0000745C 7504 jne @F ; not our job to issue EOI --> 0 0000745E B020 mov al, 20h ; acknowledge interrupt 0 00007460 E620 out 20h, al ; to primary PIC 70 @@: 0 00007462 51 push cx 0 00007463 52 push dx 0 00007464 56 push si 74 0 00007465 FC cld 76 ih_continue: 0 00007466 8B16[0000] mov dx, [baseport] 0 0000746A 42 inc dx 0 0000746B 42 inc dx ; (base + 2) write FCR, read IIR 80 %if _USE_TX_FIFO 0 0000746C A0[0000] mov al, byte [serial_fcr_setting] 0 0000746F 24F9 and al, ~ 0000_0110b 0 00007471 EE out dx, al ; (write FCR) configure FIFOs 0 00007472 31C0 xor ax, ax 85 %else 86 xor ax, ax 87 out dx, al ; (write FCR) configure FIFOs 88 nop 89 %endif 0 00007474 EC in al, dx ; (read IIR) get interrupt cause 0 00007475 A801 test al, 1 ; did the UART generate the int? 0 00007477 750C jnz ih_sep ; no, then it's somebody else's problem 0 00007479 2406 and al, 6 ; mask bits not needed 0 0000747B 89C6 mov si, ax ; make a pointer out of it 0 0000747D 4A dec dx 0 0000747E 4A dec dx ; = base 0 0000747F FF94[BE00] call near word [serial_interrupt_table + si] ; serve this int 0 00007483 EBE1 jmp ih_continue ; and look for more things to be done 99 ih_sep: 0 00007485 5E pop si 0 00007486 5A pop dx ; restore regs 0 00007487 59 pop cx 0 00007488 F606[0200]01 testopt [options6], opt6_share_serial_irq 0 0000748D 7423 jz .ret 0 0000748F 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 00007494 741F jz .chain 0 00007496 E82100 call serial_next_is_iret 0 00007499 741A je .chain ; already issued EOI --> 0 0000749B 1F pop ds 0 0000749C 58 pop ax 0 0000749D 9C pushf 0 0000749E 0E push cs 0 0000749F E88AFF call serial_interrupt_handler.notours 0 000074A2 50 push ax 0 000074A3 1E push ds 0 000074A4 B020 mov al, 20h ; acknowledge interrupt 0 000074A6 2E803E[0100]00 cmp byte [cs:serial_use_irqmask + 1], 0 0 000074AC 7402 je @F 0 000074AE E6A0 out 0A0h, al ; to secondary PIC 124 @@: 0 000074B0 E620 out 20h, al ; to primary PIC 126 .ret: 0 000074B2 1F pop ds 0 000074B3 58 pop ax 0 000074B4 CF iret 130 131 .chain: 0 000074B5 1F pop ds 0 000074B6 58 pop ax 0 000074B7 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 000074BA 53 push bx 0 000074BB 1E push ds 0 000074BC F606[0200]01 testopt [options6], opt6_share_serial_irq 0 000074C1 7407 jz @F ; if not sharing --> (ZR) 0 000074C3 C51E[0400] lds bx, [serial_interrupt_handler.next] 0 000074C7 803FCF cmp byte [bx], 0CFh ; iret ? 150 @@: 0 000074CA 1F pop ds 0 000074CB 5B pop bx 153 entry_retn: section_of_function 0 000074CC C3 retn 155 0 000074CD 00 align 2, db 0 0 000074CE [C600][CB00][1301] serial_interrupt_table: dw int_modem,int_tx,int_rx,int_status 0 000074D4 [6601] 158 159 160 int_modem: 161 ; just clear modem status, we are not interested in it 0 000074D6 83C206 add dx, 6 0 000074D9 EC in al, dx ; read MSR 0 000074DA C3 retn 165 166 167 int_tx: 0 000074DB 8B16[0000] mov dx, [baseport] 0 000074DF 8B36[0000] mov si, word [txtail] 170 0 000074E3 52 push dx 0 000074E4 83C205 add dx, 5 0 000074E7 EC in al, dx ; (base + 5) read LSR 0 000074E8 5A pop dx 0 000074E9 A820 test al, 20h ; Transmitter Holding Register Empty ? 0 000074EB 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 000074ED B90100 mov cx, 1 0 000074F0 F606[0000]08 test byte [serial_flags], sf_built_in_fifo 0 000074F5 7404 jz @F 0 000074F7 8A0E[0000] mov cl, byte [serial_fifo_size] 190 @@: 191 %endif 192 itx_more: 0 000074FB 3B36[0000] cmp si, word [txhead] 0 000074FF 7419 je itx_nothing 0 00007501 AC lodsb 0 00007502 EE out dx, al ; write it to the THR 197 ; check for wrap-around in our fifo 198 tx_checkwrap 0 00007503 81FE[8000] cmp si, txfifo+_TXFIFOSIZE 0 00007507 7203 jb %%tx_nowrap 0 00007509 BE[0000] mov si, txfifo 248 <1> %%tx_nowrap: 199 %if _USE_TX_FIFO 200 ; send as much bytes as the chip can take when available 0 0000750C E2ED loop itx_more 202 %endif 203 itx_setup_int: 0 0000750E 3B36[0000] cmp si, word [txhead] 0 00007512 7406 je itx_nothing 0 00007514 42 inc dx 0 00007515 B003 mov al, 0000_0011b 0 00007517 EE out dx, al ; write to IER 0 00007518 EB04 jmp itx_dontstop 210 itx_nothing: 211 ; no more data in the fifo, so inhibit TX interrupts 0 0000751A 42 inc dx 0 0000751B B001 mov al, 0000_0001b 0 0000751D EE out dx, al ; write to IER 215 itx_dontstop: 0 0000751E 8936[0000] mov word [txtail], si 0 00007522 C3 retn 218 219 220 int_rx: 0 00007523 8B36[0000] mov si, word [rxhead] 222 irx_more: 0 00007527 8B16[0000] mov dx, [baseport] 0 0000752B EC in al, dx ; read from RBR 0 0000752C 3C03 cmp al, 3 0 0000752E 7511 jne @FF 0 00007530 F606[0000]02 testopt [serial_flags], sf_ctrl_c 0 00007535 7405 jz @F 0 00007537 800E[0000]04 setopt [serial_flags], sf_double_ctrl_c 230 @@: 0 0000753C 800E[0000]02 setopt [serial_flags], sf_ctrl_c 232 @@: 0 00007541 8804 mov byte [si], al 0 00007543 89F0 mov ax, si 0 00007545 46 inc si 236 ; check for wrap-around 237 rx_checkwrap 0 00007546 81FE[8000] cmp si, rxfifo+_RXFIFOSIZE 0 0000754A 7203 jb %%rx_nowrap 0 0000754C BE[0000] mov si, rxfifo 241 <1> %%rx_nowrap: 0 0000754F 3936[0000] cmp word [rxtail], si 0 00007553 7415 je @FF 240 ; see if there are more bytes to be read 0 00007555 83C205 add dx, 5 0 00007558 EC in al, dx ; read LSR 0 00007559 A801 test al, 1 ; Data Available ? 0 0000755B 75CA jnz irx_more 245 .end: 0 0000755D 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 00007561 E977FF jmp int_tx ; (this checks for THRE) 253 254 @@: 0 00007564 8B16[0000] mov dx, [baseport] 0 00007568 EC in al, dx ; read RBR (discard) 0 00007569 A9 db __TEST_IMM16 ; (skip mov) 258 @@: 0 0000756A 89C6 mov si, ax 0 0000756C 83C205 add dx, 5 0 0000756F EC in al, dx ; read LSR 0 00007570 A801 test al, 1 ; Data Available ? 0 00007572 75F0 jnz @BB 0 00007574 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 00007576 83C205 add dx, 5 0 00007579 EC in al, dx ; read LSR 0 0000757A C3 retn 273 274 275 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 0000AFDC 56 push si 286 ; see if there are bytes to be read from the fifo 0 0000AFDD 8B36[0000] mov si, word [rxtail] 288 0 0000AFE1 3B36[0000] cmp si, word [rxhead] 0 0000AFE5 7412 je .nodata 0 0000AFE7 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 0000AFE8 81FE[8000] cmp si, rxfifo+_RXFIFOSIZE 0 0000AFEC 7203 jb %%rx_nowrap 0 0000AFEE BE[0000] mov si, rxfifo 241 <1> %%rx_nowrap: 0 0000AFF1 8936[0000] mov word [rxtail], si 0 0000AFF5 85F6 test si, si ; (NZ) 0 0000AFF7 EB02 jmp .return 304 305 .nodata: 0 0000AFF9 31C0 xor ax, ax ; (ZR) 307 .return: 0 0000AFFB 5E pop si 0 0000AFFC 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 0000AFFD 56 push si 318 ; see if there are bytes to be read from the fifo 0 0000AFFE 8B36[0000] mov si, word [rxtail] 320 0 0000B002 3B36[0000] cmp si, word [rxhead] 0 0000B006 7405 je .nodata 0 0000B008 AC lodsb 0 0000B009 85F6 test si, si ; (NZ) 0 0000B00B EB02 jmp .return 326 327 .nodata: 0 0000B00D 31C0 xor ax, ax ; (ZR) 329 .return: 0 0000B00F 5E pop si 0 0000B010 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 0000B011 A0[0000] mov al, byte [serial_use_intnum] 0 0000B014 F606[0000]01 testopt [internalflags4], dif4_int_serial_hooked 0 0000B019 740D jz @F 0 0000B01B 3A06[0000] cmp al, byte [serial_installed_intnum] 0 0000B01F 7418 je .ret ; --> (NC) 0 0000B021 50 push ax 0 0000B022 E84A01 call serial_uninstall_interrupt_handler 0 0000B025 58 pop ax 0 0000B026 7211 jc .ret ; --> (CY) 348 @@: 0 0000B028 A2[0000] mov byte [serial_installed_intnum], al 0 0000B02B BE[0200] mov si, serial_interrupt_handler 0 0000B02E E8[0000] call install_86m_interrupt_handler 0 0000B031 800E[0000]01 setopt [internalflags4], dif4_int_serial_hooked 0 0000B036 E8[0000] call update_inttab_optional 354 ; (NC) 355 .ret: 0 0000B039 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 0000B03A B020 mov al, 20h ; acknowledge interrupt 0 0000B03C 803E[0100]00 cmp byte [serial_use_irqmask + 1], 0 0 0000B041 7402 je @F 0 0000B043 E6A0 out 0A0h, al ; to secondary PIC 384 @@: 0 0000B045 E620 out 20h, al ; to primary PIC 0 0000B047 C3 retn 387 388 389 serial_clear_fifos: 390 ; clear fifos (not those in the 16550A, but ours) 0 0000B048 B8[0000] mov ax, rxfifo 0 0000B04B A3[0000] mov word [rxhead], ax 0 0000B04E A3[0000] mov word [rxtail], ax 0 0000B051 B8[0000] mov ax, txfifo 0 0000B054 A3[0000] mov word [txhead], ax 0 0000B057 A3[0000] mov word [txtail], ax 0 0000B05A C3 retn 398 399 400 numdef SERIAL_DL_WORD, 0 401 402 serial_init_UART: 0 0000B05B E8DCFF call serial_eoi 404 ; initialize the UART 0 0000B05E 8B16[0000] mov dx, [baseport] 0 0000B062 83C203 add dx, 3 ; (base + 3) read/write LCR 0 0000B065 EC in al, dx ; read LCR 0 0000B066 A2[0000] mov byte [serial_save_lcr], al 0 0000B069 B080 mov al, 80h ; DLAB = 1 0 0000B06B EE out dx, al ; write LCR, make DL register accessible 0 0000B06C 52 push dx 0 0000B06D 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 0000B071 EC in al, dx ; read bps rate divisor low byte (DL) 0 0000B072 42 inc dx 0 0000B073 A2[0000] mov byte [serial_save_dl], al 0 0000B076 EC in al, dx ; read bps rate divisor high byte (DL) 0 0000B077 A2[0100] mov byte [serial_save_dl + 1], al 0 0000B07A A0[0100] mov al, byte [serial_use_dl + 1] 0 0000B07D EE out dx, al ; write bps rate divisor high byte (DL) 0 0000B07E 4A dec dx 0 0000B07F A0[0000] mov al, byte [serial_use_dl] 0 0000B082 EE out dx, al ; write bps rate divisor low byte (DL) 429 %endif 0 0000B083 5A pop dx ; (base + 3) write LCR 0 0000B084 A0[0000] mov al, byte [serial_use_params] 432 ; DLAB = 0 and control parameters 0 0000B087 EE out dx, al ; write parameters 434 435 ; is it a 16550A? 0 0000B088 4A dec dx ; (base + 2) write FCR, read IIR 437 %if _USE_TX_FIFO 0 0000B089 B007 mov al, 0000_0111b 0 0000B08B 0A06[0000] or al, byte [serial_use_fifo] 0 0000B08F A2[0000] mov byte [serial_fcr_setting], al 0 0000B092 EE out dx, al ; (write FCR) try to clear and enable FIFOs 0 0000B093 90 nop 0 0000B094 EC in al, dx ; read IIR 0 0000B095 800E[0000]08 or byte [serial_flags], sf_built_in_fifo 445 ; in case of built-in tx FIFO 0 0000B09A 24C0 and al, 1100_0000b ; mask of FIFO functional bits 0 0000B09C 3CC0 cmp al, 1100_0000b ; both bits set ? 0 0000B09E 740B je @F ; yes --> 0 0000B0A0 8026[0000]F7 and byte [serial_flags], ~ sf_built_in_fifo 450 ; no built-in tx FIFO 0 0000B0A5 31C0 xor ax, ax 0 0000B0A7 A2[0000] mov byte [serial_fcr_setting], al 0 0000B0AA 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 0000B0AB 4A dec dx ; (base + 1) 0 0000B0AC EC in al, dx ; read IER 0 0000B0AD A2[0000] mov byte [serial_save_ier], al 0 0000B0B0 B001 mov al, 0000_0001b ; allow RX interrupts 0 0000B0B2 EE out dx, al ; write to IER 0 0000B0B3 4A dec dx ; (base + 0) read RBR 0 0000B0B4 EC in al, dx ; clear receiver 0 0000B0B5 83C205 add dx, 5 ; (base + 5) read LSR 0 0000B0B8 EC in al, dx ; clear line status 0 0000B0B9 42 inc dx ; (base + 6) read MSR 0 0000B0BA EC in al, dx ; clear modem status 470 ; free interrupt in the ICU 0 0000B0BB 8B0E[0000] mov cx, word [serial_use_irqmask] 0 0000B0BF F7D1 not cx ; negated mask of bits to change 0 0000B0C1 31DB xor bx, bx ; all bits clear (= IRQ ON) 0 0000B0C3 E81200 call set_irq 0 0000B0C6 891E[0000] mov word [serial_save_irq_off], bx 0 0000B0CA 890E[0000] mov word [serial_save_irq_mask], cx 477 ; and enable ints from the UART 0 0000B0CE 4A dec dx 0 0000B0CF 4A dec dx ; (base + 4) 0 0000B0D0 EC in al, dx ; read MCR 0 0000B0D1 A2[0000] mov byte [serial_save_mcr], al 0 0000B0D4 B008 mov al, 0000_1000b 0 0000B0D6 EE out dx, al ; write MCR 0 0000B0D7 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 0000B0D8 52 push dx 0 0000B0D9 BA0100 mov dx, 1 494 .loop: 0 0000B0DC 85CA test dx, cx 0 0000B0DE 753E jnz .next 0 0000B0E0 84D2 test dl, dl 0 0000B0E2 741E jz .high 499 500 .low: 0 0000B0E4 E421 in al, 21h ; get PIC configuration 0 0000B0E6 50 push ax 0 0000B0E7 F7D2 not dx ; dx = mask of bits to keep 0 0000B0E9 20D0 and al, dl ; mask to 0 the bit to set 0 0000B0EB 53 push bx 0 0000B0EC F7D2 not dx ; dx = mask of bits to change 0 0000B0EE 20D3 and bl, dl ; get bit state to change to 0 0000B0F0 08D8 or al, bl ; set this bit state 0 0000B0F2 E621 out 21h, al ; configure the PIC 0 0000B0F4 5B pop bx ; = saved states / still to set states 0 0000B0F5 F7D2 not dx ; dx = mask of bits to keep 0 0000B0F7 58 pop ax ; = prior config 0 0000B0F8 20D3 and bl, dl ; clear bits to change 0 0000B0FA F7D2 not dx ; dx = mask of bits to change 0 0000B0FC 20D0 and al, dl ; separate out only bits to change 0 0000B0FE 08C3 or bl, al ; set in bx 0 0000B100 EB1C jmp .next 518 519 .high: 0 0000B102 E4A1 in al, 0A1h ; get PIC configuration 0 0000B104 50 push ax 0 0000B105 F7D2 not dx ; dx = mask of bits to keep 0 0000B107 20F0 and al, dh ; mask to 0 the bit to set 0 0000B109 53 push bx 0 0000B10A F7D2 not dx ; dx = mask of bits to change 0 0000B10C 20F7 and bh, dh ; get bit state to change to 0 0000B10E 08F8 or al, bh ; set this bit state 0 0000B110 E6A1 out 0A1h, al ; configure the PIC 0 0000B112 5B pop bx ; = saved states / still to set states 0 0000B113 F7D2 not dx ; dx = mask of bits to keep 0 0000B115 58 pop ax ; = prior config 0 0000B116 20F7 and bh, dh ; clear bits to change 0 0000B118 F7D2 not dx ; dx = mask of bits to change 0 0000B11A 20F0 and al, dh ; separate out only bits to change 0 0000B11C 08C7 or bh, al ; set in bx 536 537 .next: 0 0000B11E 01D2 add dx, dx 0 0000B120 75BA jnz .loop 0 0000B122 5A pop dx 0 0000B123 C3 retn 542 543 544 ; OUT: NC if successful 545 ; CY if couldn't unhook 546 serial_clean_up: 0 0000B124 E813FF call serial_eoi 0 0000B127 31C0 xor ax, ax 0 0000B129 8B16[0000] mov dx, [baseport] 0 0000B12D 83C204 add dx, 4 ; (base + 4) 551 ; disconnect the UART from the int line 0 0000B130 EE out dx, al ; write MCR 0 0000B131 4A dec dx 0 0000B132 4A dec dx 0 0000B133 4A dec dx ; (base + 1) disable UART ints 0 0000B134 EE out dx, al ; write IER 0 0000B135 42 inc dx ; (base + 2) 558 ; disable the FIFOs (old software relies on it) 0 0000B136 EE out dx, al ; write FCR 560 561 ; reset the UART 0 0000B137 8B16[0000] mov dx, [baseport] 0 0000B13B 83C203 add dx, 3 ; (base + 3) read/write LCR 0 0000B13E B080 mov al, 80h ; DLAB = 1 0 0000B140 EE out dx, al ; write LCR, make DL register accessible 0 0000B141 52 push dx 0 0000B142 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 0000B146 A0[0000] mov al, byte [serial_save_dl] 0 0000B149 EE out dx, al ; write bps rate divisor low byte (DL) 0 0000B14A 42 inc dx 0 0000B14B A0[0100] mov al, byte [serial_save_dl + 1] 0 0000B14E EE out dx, al ; write bps rate divisor high byte (DL) 577 %endif 0 0000B14F 5A pop dx ; (base + 3) write LCR 0 0000B150 A0[0000] mov al, byte [serial_save_lcr] 0 0000B153 EE out dx, al ; write parameters 581 0 0000B154 4A dec dx ; (base + 2) write FCR, read IIR 0 0000B155 31C0 xor ax, ax 0 0000B157 EE out dx, al ; (write FCR) disable the FIFOs 0 0000B158 4A dec dx ; (base + 1) 0 0000B159 A0[0000] mov al, byte [serial_save_ier] 0 0000B15C EE out dx, al ; write to IER 0 0000B15D 8B1E[0000] mov bx, [serial_save_irq_off] 589 ; bits clear for IRQ ON 0 0000B161 8B0E[0000] mov cx, [serial_save_irq_mask] 591 ; negated mask of bits to change 0 0000B165 E870FF call set_irq 0 0000B168 42 inc dx 0 0000B169 42 inc dx 0 0000B16A 42 inc dx ; (base + 4) 0 0000B16B A0[0000] mov al, byte [serial_save_mcr] 0 0000B16E 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 0000B16F BE[0200] mov si, serial_interrupt_handler 0 0000B172 A0[0000] mov al, byte [serial_installed_intnum] 0 0000B175 BA0100 mov dx, opt4_int_serial_force >> 16 0 0000B178 E8[0000] call UnhookInterruptForce 0 0000B17B 7208 jc @F 0 0000B17D 8026[0000]FE clropt [internalflags4], dif4_int_serial_hooked 0 0000B182 E8[0000] call update_inttab_optional 610 ; (NC) 611 @@: 0 0000B185 C3 retn 613 614 615 serial_send_char_add_lf: 0 0000B186 50 push ax 617 .loop: 0 0000B187 E80800 call serial_send_char 0 0000B18A 3C0D cmp al, 13 ; add LF after CR; change it if you don't like it 0 0000B18C B00A mov al, 10 0 0000B18E 74F7 je .loop 0 0000B190 58 pop ax 0 0000B191 C3 retn 624 625 serial_send_char: 0 0000B192 56 push si 0 0000B193 51 push cx 0 0000B194 52 push dx 0 0000B195 06 push es 630 0 0000B196 8B36[0000] mov si, word [txhead] 0 0000B19A 8804 mov byte [si],al 0 0000B19C 46 inc si 634 ; check for wrap-around 635 tx_checkwrap 0 0000B19D 81FE[8000] cmp si, txfifo+_TXFIFOSIZE 0 0000B1A1 7203 jb %%tx_nowrap 0 0000B1A3 BE[0000] mov si, txfifo 248 <1> %%tx_nowrap: 636 0 0000B1A6 50 push ax 638 %if _PM 0 0000B1A7 50 push ax 0 0000B1A8 E8[0000]EB02[5402] dualcall push_if 641 %else 642 pushf 643 %endif 0 0000B1AF 3936[0000] cmp word [txtail], si 0 0000B1B3 7565 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 0000B1B5 31C9 xor cx, cx 0 0000B1B7 BA4000 mov dx, 40h ; 0040h is a bimodal segment/selector 0 0000B1BA 8EC2 mov es, dx 657 .wait_reset_dx: 0 0000B1BC 268B166C00 mov dx, word [es:6Ch] 659 660 .wait: 0 0000B1C1 E8[0000] call idle 662 %if _PM 0 0000B1C4 E8[0000]EB02[7A02] dualcall pop_if 0 0000B1CB 50 push ax 0 0000B1CC E8[0000]EB02[5402] dualcall push_if 666 %else 667 popf 668 pushf 669 %endif 670 0 0000B1D3 3B36[0000] cmp si, word [txtail] 0 0000B1D7 7541 jne .no_wait 673 674 %if _SLEEP_NEW 0 0000B1D9 26A16C00 mov ax, word [es:6Ch] 0 0000B1DD 39C2 cmp dx, ax 0 0000B1DF 74E0 je .wait 0 0000B1E1 F7DA neg dx ; minus prior tick 0 0000B1E3 01C2 add dx, ax ; new tick - prior tick 680 0 0000B1E5 3B16[0000] cmp dx, word [sleep_delta_limit] 0 0000B1E9 7609 jbe @F 0 0000B1EB 8B16[0000] mov dx, word [sleep_delta_limit] 0 0000B1EF 85D2 test dx, dx 0 0000B1F1 7501 jnz @F 0 0000B1F3 42 inc dx ; limit 0 would lead to stagnant sleep 687 @@: 0 0000B1F4 3B16[0000] cmp dx, word [sleep_highest_delta] 0 0000B1F8 7604 jbe @F 0 0000B1FA 8916[0000] mov word [sleep_highest_delta], dx 691 @@: 0 0000B1FE 01D1 add cx, dx 0 0000B200 7205 jc @F 694 %else 695 cmp dx, word [es:6Ch] 696 je .wait 697 inc cx 698 %endif 0 0000B202 83F95A cmp cx, 5 * 18 0 0000B205 72B5 jb .wait_reset_dx 701 @@: 702 703 ; Immediately disable use of serial I/O. 0 0000B207 8026[0000]EF clropt [serial_flags], sf_use_serial 0 0000B20C 8026[0100]BF clropt [options], enable_serial 0 0000B211 BA[0000] mov dx, msg.no_progress 0 0000B214 E8[0000] call putsz 0 0000B217 E9[0000] jmp cmd3 709 710 .no_wait: 0 0000B21A 8936[0000] mov word [txhead], si 0 0000B21E 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 0000B21F 0E push cs 0 0000B220 E85600 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 0 0000B223 E8[0000]EB02[7A02] dualcall pop_if 738 %else 739 popf 740 %endif 0 0000B22A 58 pop ax 0 0000B22B 07 pop es 0 0000B22C 5A pop dx 0 0000B22D 59 pop cx 0 0000B22E 5E pop si 0 0000B22F C3 retn 747 748 %if _PM 749 dualfunction 750 push_if: section_of_function 751 lframe dualdistance 752 lpar word, flags 753 lpar_return 0 0000B230 5589E5 lenter 0 0000B233 E8[0000] call ispm 0 0000B236 7515 jnz .86m 757 .pm: 0 0000B238 50 push ax 0 0000B239 B80209 mov ax, 0902h 0 0000B23C CD31 int 31h 0 0000B23E 84C0 test al, al ; 0 = disabled ? 0 0000B240 B80000 mov ax, 0 ; initialise to IF=0 0 0000B243 7402 jz @F 0 0000B245 B402 mov ah, 2 ; else, IF=1 765 @@: 0 0000B247 894606 mov word [bp + ?flags], ax 0 0000B24A 58 pop ax 0 0000B24B EB04 jmp .end 769 .86m: 0 0000B24D 9C pushf 0 0000B24E 8F4606 pop word [bp + ?flags] 772 .end: 0 0000B251 5D lleave 0 0000B252 E8[0000] dualreturn 0 0000B255 CB lret 776 777 dualfunction 778 pop_if: section_of_function 779 lframe dualdistance 780 lpar word, flags 0 0000B256 5589E5 lenter 0 0000B259 E8[0000] call ispm 0 0000B25C 7510 jnz .86m 0 0000B25E 50 push ax 0 0000B25F B80009 mov ax, 0900h ; initialise to disable VIF = 0900h 0 0000B262 F6460702 test byte [bp + ?flags + 1], 2 0 0000B266 7401 jz @F ; if to disable --> 0 0000B268 40 inc ax ; else enable VIF = 0901h 789 @@: 0 0000B269 CD31 int 31h 0 0000B26B 58 pop ax 0 0000B26C EB04 jmp .end 793 .86m: 0 0000B26E FF7606 push word [bp + ?flags] 0 0000B271 9D popf 796 .end: 0 0000B272 5D lleave 0 0000B273 E8[0000] dualreturn 0 0000B276 CA0200 lret 800 %elif _EXTENSIONS 801 ; shim functions to allow calling from ELDs 802 ; in _PM=0 builds of the debugger. 803 dualfunction 804 push_if: section_of_function 805 lframe dualdistance 806 lpar word, flags 807 lpar_return 808 lenter 809 .86m: 810 pushf 811 pop word [bp + ?flags] 812 .end: 813 lleave 814 dualreturn 815 lret 816 817 dualfunction 818 pop_if: section_of_function 819 lframe dualdistance 820 lpar word, flags 821 lenter 822 .86m: 823 push word [bp + ?flags] 824 popf 825 .end: 826 lleave 827 dualreturn 828 lret 829 %endif 830 831 code_to_int_tx: 0 0000B279 2EFF36[B602] push word [cs:.entry_retf_word] 833 %if _PM 834 ; near return address 0 0000B27E E8[0000] call ispm 0 0000B281 7506 jnz .rm 837 0 0000B283 FF36[0000] push word [cssel] 0 0000B287 EB01 jmp @F 840 841 %endif 842 .rm: 0 0000B289 16 push ss 844 @@: 0 0000B28A 2EFF36[B402] push word [cs:.int_tx_word] 0 0000B28F CB retf ; jump to lDEBUG_DATA_ENTRY:int_tx 847 848 align 2, db 0 849 .int_tx_word: 0 0000B290 [CB00] dw int_tx 851 .entry_retf_word: 0 0000B292 [6C01] dw entry_retf 853 854 855 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 855 ------------------ note: usesection lDEBUG_DATA_ENTRY 856 857 entry_int3_retf: 0 0000757B CC int3 859 entry_retf: 0 0000757C CB retf === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 0000757E ???????? eldhSignature: resb 4 ; "ELD1" 0 00007582 ?????? resb 3 ; reserved 0 00007585 ?? resb 1 ; 26 (Ctrl-Z) 0 00007586 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000758A ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 0000758C ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 0000758E ???????? eldhDataOffset: resd 1 0 00007592 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00007594 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00007596 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00007598 ???????? eldhReserved: resb 4 ; reserved 0 0000759C ???? 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 0000759E ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000075A2 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000075A6 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000075AA ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 0000757E ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00007586 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000758A ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 0000758C ???? 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 0000757E ???? 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 00007580 ???? eldltAmount: resw 1 0 00007582 ???????? 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 0000757E ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00007580 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00007582 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00007584 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00007586 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 0000758E ???? 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 0000757E ???? eldlSignature: resw 1 ; 0E1D1h 0 00007580 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00007582 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00007584 ???? eldlUseLinkHash: resw 1 0 00007586 ???? eldlDataAmount: resw 1 0 00007588 ???? eldlDataPrefixes: resw 1 0 0000758A ???? eldlDataEntries: resw 1 0 0000758C ???? eldlDataAddresses: resw 1 0 0000758E ???? eldlCodeAmount: resw 1 0 00007590 ???? eldlCodePrefixes: resw 1 0 00007592 ???? eldlCodeEntries: resw 1 0 00007594 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00007596 ???? eldlDualAmount: resw 1 0 00007598 ???? eldlDualPrefixes: resw 1 0 0000759A ???? eldlDualEntries: resw 1 0 0000759C ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 0000757E ???? ifKeyword: resw 1 0 00007580 ???? ifDescription: resw 1 0 00007582 ???? ifOptions: resw 1 0 00007584 ???? ifValue: resw 1 0 00007586 ???? ifTrying: resw 1 0 00007588 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 0000757E ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00007582 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00007586 ???? smName1: resw 1 ; -> first string part 0 00007588 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 0000758A ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 0000758C ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 0000758E ???? smBaseNext: resw 1 0 00007590 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00007592 ???? smSpecialNext: resw 1 0 00007594 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 0000757E ?? ssLength: resb 1 ; how long this string is (only ssString) 0 0000757F ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00007580 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 0000757E ???? shHash: resw 1 ; hash value 0 00007580 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 0000757E ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00007582 ???? xmsmSourceHandle: resw 1 0 00007584 ???????? xmsmSourceAddress: resd 1 0 00007588 ???? xmsmDestHandle: resw 1 0 0000758A ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 23 ------------------ note: usesection lDEBUG_CODE 24 25 sleepcmd: 0 0000B294 E8[0000] call skipcomma 0 0000B297 E8[0000]EB02[0000] nearcall getdword 0 0000B29E 53 push bx 0 0000B29F 52 push dx 0 0000B2A0 E8[0000] call skipwh0 0 0000B2A3 E8[0000] call iseol? 0 0000B2A6 7421 je .seconds 0 0000B2A8 4E dec si 0 0000B2A9 BA[0000] mov dx, msg.seconds 0 0000B2AC E8[0000] call isstring? 0 0000B2AF 7414 je .seconds_check_eol 0 0000B2B1 BA[0000] mov dx, msg.ticks 0 0000B2B4 E8[0000] call isstring? 39 .error_NZ: 0 0000B2B7 7403E9[0000] jne error 41 .ticks_check_eol: 0 0000B2BC AC lodsb 0 0000B2BD E8[0000] call chkeol 44 0 0000B2C0 B80100 mov ax, 1 0 0000B2C3 EB07 jmp .common 47 48 .seconds_check_eol: 0 0000B2C5 AC lodsb 0 0000B2C6 E8[0000] call chkeol 51 .seconds: 0 0000B2C9 B81200 mov ax, 18 53 .common: 0 0000B2CC 5A pop dx 0 0000B2CD 50 push ax 0 0000B2CE F7E2 mul dx ; dx:ax = low word times multiplier 0 0000B2D0 89D3 mov bx, dx 0 0000B2D2 89C1 mov cx, ax ; bx:cx = low word times multiplier 0 0000B2D4 58 pop ax 0 0000B2D5 5A pop dx 0 0000B2D6 F7E2 mul dx ; dx:ax = high word times multiplier 0 0000B2D8 01C3 add bx, ax 0 0000B2DA 83D200 adc dx, 0 ; dx:bx:cx = entire result 0 0000B2DD 75D8 jnz .error_NZ 65 0 0000B2DF 85C9 test cx, cx 0 0000B2E1 7504 jnz @F 0 0000B2E3 85DB test bx, bx 0 0000B2E5 745F jz .end 70 @@: 71 0 0000B2E7 B84000 mov ax, 40h ; bimodal segment/selector 0 0000B2EA 8EC0 mov es, ax 74 .loop_reset: 0 0000B2EC 268B166C00 mov dx, word [es:6Ch] 76 .loop: 0 0000B2F1 263B166C00 cmp dx, word [es:6Ch] 0 0000B2F6 7521 jne .next 0 0000B2F8 E8[0000] call handle_serial_flags_ctrl_c 0 0000B2FB F606[0300]40 testopt [options3], opt3_check_ctrlc_0bh 0 0000B300 750A jnz @F ; already called function 0Bh --> 0 0000B302 E8[0000] call InDOS 0 0000B305 7505 jnz @F 0 0000B307 B40B mov ah, 0Bh 85 doscall ; allow to break with Ctrl-C 0 0000B309 E8[0000] nearcall _doscall 86 @@: 87 %if _SLEEP_NEW 0 0000B30C 8B3E[0000] mov di, word [sleep_repeat_idle] 0 0000B310 47 inc di 90 @@: 0 0000B311 E8[0000] call idle 0 0000B314 4F dec di 0 0000B315 75FA jnz @B 94 %else 95 call idle 96 %endif 0 0000B317 EBD8 jmp .loop 98 99 .next: 100 %if _SLEEP_NEW 0 0000B319 F7DA neg dx ; minus prior tick 0 0000B31B 2603166C00 add dx, word [es:6Ch] ; new tick - prior tick 103 0 0000B320 3B16[0000] cmp dx, word [sleep_delta_limit] 0 0000B324 7609 jbe @F 0 0000B326 8B16[0000] mov dx, word [sleep_delta_limit] 0 0000B32A 85D2 test dx, dx 0 0000B32C 7501 jnz @F 0 0000B32E 42 inc dx ; limit 0 would lead to stagnant sleep 110 @@: 0 0000B32F 3B16[0000] cmp dx, word [sleep_highest_delta] 0 0000B333 7604 jbe @F 0 0000B335 8916[0000] mov word [sleep_highest_delta], dx 114 @@: 0 0000B339 29D1 sub cx, dx 0 0000B33B 83DB00 sbb bx, 0 0 0000B33E 7206 jc .end 118 %else 119 sub cx, 1 120 sbb bx, 0 121 %endif 0 0000B340 75AA jnz .loop_reset 0 0000B342 E302 jcxz .end 0 0000B344 EBA6 jmp .loop_reset 125 126 .end: 0 0000B346 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 0000B347 4E dec si 0 0000B348 4E dec si ; -> at 'S' 0 0000B349 BA[0000] mov dx, msg.sleep 0 0000B34C E8[0000] call isstring? ; check for "SLEEP" 0 0000B34F 7503E940FF je sleepcmd 0 0000B354 46 inc si ; skip 'S' 0 0000B355 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 0000B356 8026[0300]7F reloc clropt [relocated(internalflags3)], dif3_sss_is_reverse 39 <1> linkdatarelocation internalflags3, -3 40 <1> %endif 41 <1> 0 0000B35B 8B1E[0000] reloc mov bx, word [relocated(reg_ds)] ; get search range 43 <1> linkdatarelocation reg_ds 0 0000B35F 66 _386_PM_o32 ; xor ecx, ecx 0 0000B360 31C9 xor cx, cx 0 0000B362 E8[0000]EB02[0000] extcallcall getrangeX ; get address range into BX:(E)DX..BX:(E)CX 0 0000B369 E8[0000] extcallcall skipcomm0 0 0000B36C 66 _386_PM_o32 ; push edx 0 0000B36D 52 push dx 0 0000B36E 66 _386_PM_o32 ; push ecx 0 0000B36F 51 push cx 0 0000B370 53 push bx 53 <1> 0 0000B371 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 0000B376 BA[0000] reloc mov dx, msg.reverse 68 <1> internaldatarelocation 0 0000B379 4E dec si 0 0000B37A E8[0000] extcallcall isstring? 0 0000B37D 7509 jne @F 72 <1> 0 0000B37F 800E[0300]80 reloc setopt [relocated(internalflags3)], dif3_sss_is_reverse 74 <1> linkdatarelocation internalflags3, -3 0 0000B384 E8[0000] extcallcall skipcomma 0 0000B387 4E dec si 77 <1> @@: 78 <1> %else 79 <1> dec si 80 <1> %endif 81 <1> 0 0000B388 BA[0000] reloc mov dx, msg.silent 83 <1> internaldatarelocation 0 0000B38B E8[0000] extcallcall isstring? 0 0000B38E 751A jne @F 0 0000B390 E8[0000] extcallcall skipequals 0 0000B393 E8[0000]EB02[0000] extcallcall getdword 0 0000B39A 8916[0000] reloc mov word [relocated(sss_silent_count)], dx 89 <1> linkdatarelocation sss_silent_count 0 0000B39E 891E[0200] reloc mov word [relocated(sss_silent_count) + 2], bx 91 <1> linkdatarelocation sss_silent_count 0 0000B3A2 F616[0000] reloc not byte [relocated(sss_silent_count_used)] 93 <1> linkdatarelocation sss_silent_count_used 0 0000B3A6 E8[0000] extcallcall skipcomm0 0 0000B3A9 4E dec si 96 <1> @@: 97 <1> 0 0000B3AA BA[0000] reloc mov dx, msg.range 99 <1> internaldatarelocation 0 0000B3AD E8[0000] extcallcall isstring? 0 0000B3B0 AC lodsb 0 0000B3B1 7519 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 0000B3B3 8B1E[0000] reloc mov bx, word [relocated(reg_ds)] ; get search range 123 <1> linkdatarelocation reg_ds 0 0000B3B7 31C9 xor cx, cx 0 0000B3B9 E8[0000]EB02[0000] extcallcall getrangeX ; try to get second range 0 0000B3C0 56 push si 0 0000B3C1 E8[0000] extcallcall chkeol ; and insure end-of-line 128 <1> ; successful if it returned 0 0000B3C4 66 _386_PM_o32 ; mov esi, edx 0 0000B3C5 89D6 mov si, dx ; bx:esi-> source string 0 0000B3C7 66 _386_PM_o32 ; sub ecx, edx 0 0000B3C8 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 0000B3CA EB41 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 0000B3CC E8[0000]EB02[0000] nearcall getstr 144 <1> %endif 0 0000B3D3 56 push si 0 0000B3D4 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 0000B3D8 7503E9[0000] jz error 0 0000B3DD 89F9 mov cx, di 0 0000B3DF 4F dec di ; minus one 0 0000B3E0 BE[0000] reloc mov si, relocated(line_out) 153 <1> linkdatarelocation line_out 0 0000B3E3 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 0000B3E4 F606[0300]04 testopt [internalflags], tt_while 0 0000B3E9 750D jnz .use_auxbuff 0 0000B3EB BF[0000] mov di, while_buffer 0 0000B3EE 57 push di 0 0000B3EF F3A4 rep movsb 0 0000B3F1 5E pop si 0 0000B3F2 660FB7F6 _386_PM movzx esi, si 0 0000B3F6 EB0E 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 0000B3F8 E8[0000] extcallcall guard_auxbuff 0 0000B3FB 8E06[0000] reloc mov es, word [relocated(auxbuff_segorsel)] 184 <1> linkdatarelocation auxbuff_segorsel 0 0000B3FF 31FF xor di, di 0 0000B401 F3A4 rep movsb ; move to auxbuff 0 0000B403 66 _386_PM_o32 ; xor esi, esi 0 0000B404 31F6 xor si, si 189 <1> %endif 190 <1> .use_whilebuffer: 0 0000B406 8CC3 mov bx, es ; bx:esi -> auxbuff 0 0000B408 59 pop cx 0 0000B409 660FB7C9 _386_PM movzx ecx, cx ; ecx = count - 1 194 <1> .setesedi: 195 <1> %if _SCOUNT || ELD 0 0000B40D 53 push bx 0 0000B40E E8[0000] extcall count_store, optional 0 0000B411 5B pop bx 199 <1> %endif 0 0000B412 16 push ss 0 0000B413 07 pop es 0 0000B414 BF[0000] reloc mov di, relocated(search_results) 203 <1> linkdatarelocation search_results 0 0000B417 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 0 0000B418 B93000 mov cx, (6 * search_results_amount) >> 1 219 <1> %else 220 <1> mov cx, (4 * search_results_amount) >> 1 221 <1> %endif 0 0000B41B 31C0 xor ax, ax 0 0000B41D A3[0000] reloc mov word [relocated(sscounter)], ax 224 <1> linkdatarelocation sscounter 0 0000B420 A3[0200] reloc mov word [relocated(sscounter) + 2], ax 226 <1> linkdatarelocation sscounter 0 0000B423 F3AB rep stosw 0 0000B425 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 0000B426 E8[0000] extcall prephack ; set up for the interrupt vector hack 0 0000B429 E8[0000] extcallcall dohack 0 0000B42C 8EDB mov ds, bx 0 0000B42E 5F pop di ; original si 0 0000B42F 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 0 0000B430 E95401 _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 0000B433 5B pop bx 0 0000B434 5A pop dx 299 <1> %endif 300 <1> .init_popped: 0 0000B435 29D3 sub bx, dx ; bx = number of bytes in search range minus one 0 0000B437 29CB sub bx, cx ; = number of possible positions of string minus 1 0 0000B439 7303E93F01 jb .error_unhack_di 0 0000B43E 89D7 mov di, dx 0 0000B440 89CA mov dx, cx 0 0000B442 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 0000B444 36F606[0300]80 reloc testopt [ss:relocated(internalflags3)], dif3_sss_is_reverse 312 <1> linkdatarelocation internalflags3, -3 0 0000B44A 7516 jnz .reverse 314 <1> %endif 315 <1> .loop: 0 0000B44C 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 0 0000B44E 56 push si 0 0000B44F 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 0000B450 F2AE repne scasb ; look for first byte 325 <1> %endif 0 0000B452 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 0000B454 AE scasb ; count in cx was cnt-1 333 <1> %endif 0 0000B455 7536 jne .done 335 <1> .found_last_byte: 0 0000B457 E85600 call .handle_found_byte 0 0000B45A EB31 jmp .done 338 <1> 339 <1> .foundbyte: 0 0000B45C E85100 call .handle_found_byte 0 0000B45F 5E pop si 0 0000B460 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 0000B462 01CF add di, cx ; -> last position to check 348 <1> .reverseloop: 0 0000B464 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 0 0000B466 56 push si 0 0000B467 AC lodsb ; first character in al 0 0000B468 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 0000B469 F2AE repne scasb ; look for first byte 359 <1> %endif 0 0000B46B 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 0000B46D AE scasb ; count in cx was cnt-1 367 <1> %endif 0 0000B46E 751D jne .done 369 <1> .reversefound_last_byte: 0 0000B470 FC cld 0 0000B471 83C702 add di, 2 0 0000B474 38C0 cmp al, al ; ZR for case if dx = 0 0 0000B476 E83700 call .handle_found_byte 0 0000B479 83EF02 sub di, 2 0 0000B47C EB0F jmp .done 376 <1> 377 <1> .reversefoundbyte: 0 0000B47E FC cld 0 0000B47F 83C702 add di, 2 0 0000B482 38C0 cmp al, al ; ZR for case if dx = 0 0 0000B484 E82900 call .handle_found_byte 0 0000B487 83EF02 sub di, 2 0 0000B48A 5E pop si 0 0000B48B 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 0000B48D 5E pop si ; discard 390 <1> .commondone: 0 0000B48E FC cld 0 0000B48F 16 push ss 0 0000B490 1F pop ds 0 0000B491 E8[0000] extcallcall unhack 0 0000B494 BF[0000] reloc mov di, relocated(line_out) 396 <1> linkdatarelocation line_out 397 <1> 0 0000B497 A1[0200] reloc mov ax, word [relocated(sscounter) + 2] 399 <1> linkdatarelocation sscounter 0 0000B49A 85C0 test ax, ax 0 0000B49C 7403 jz .nohighcounter 0 0000B49E E8[0000] extcallcall hexword 403 <1> .nohighcounter: 404 <1> 0 0000B4A1 A1[0000] reloc mov ax, word [relocated(sscounter)] 406 <1> linkdatarelocation sscounter 0 0000B4A4 E8[0000] extcallcall hexword 0 0000B4A7 E8[0000] extcallcall putsline 0 0000B4AA 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 0000B4AD E9[0000] jmp putsz 416 <1> %endif 417 <1> 418 <1> 419 <1> ; INP: ZR 420 <1> .handle_found_byte: 0 0000B4B0 51 push cx 0 0000B4B1 57 push di 0 0000B4B2 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 0000B4B4 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 0000B4B6 5F pop di 0 0000B4B7 7402 je .display ; if equal 438 <1> .next: 0 0000B4B9 59 pop cx 0 0000B4BA C3 retn 441 <1> 442 <1> .display: 0 0000B4BB 8CC3 mov bx, es 0 0000B4BD 57 push di 0 0000B4BE 1E push ds 0 0000B4BF 06 push es 0 0000B4C0 16 push ss 0 0000B4C1 1F pop ds 0 0000B4C2 E8[0000] extcallcall unhack ; undo the interrupt vector hack and restore es 0 0000B4C5 57 push di 0 0000B4C6 833E[0200]00 reloc cmp word [relocated(sscounter) + 2], strict byte 0 452 <1> linkdatarelocation sscounter, -3 0 0000B4CB 7520 jne @F 0 0000B4CD 8B3E[0000] reloc mov di, word [relocated(sscounter)] 455 <1> linkdatarelocation sscounter 0 0000B4D1 81FF1000 reloc cmp di, strict word relocated(search_results_amount) 457 <1> linkdatarelocation search_results_amount 0 0000B4D5 7316 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 0 0000B4D7 01FF add di, di ; times 2 0 0000B4D9 89F8 mov ax, di ; = times 2 0 0000B4DB 01FF add di, di ; times 4 0 0000B4DD 01C7 add di, ax ; times 4 + times 2 = times 6 474 <1> %else 475 <1> add di, di ; times 2 476 <1> add di, di ; times 4 477 <1> %endif 0 0000B4DF 81C7[0000] reloc add di, strict word relocated(search_results) 479 <1> linkdatarelocation search_results 480 <1> 0 0000B4E3 58 pop ax 0 0000B4E4 50 push ax 0 0000B4E5 48 dec ax 0 0000B4E6 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 0 0000B4E7 31C0 xor ax, ax 0 0000B4E9 AB stosw 494 <1> .storenotpm: 495 <1> %endif 0 0000B4EA 89D8 mov ax, bx 0 0000B4EC AB stosw 498 <1> 499 <1> @@: 0 0000B4ED 8306[0000]01 reloc add word [relocated(sscounter)], strict byte 1 501 <1> linkdatarelocation sscounter, -3 0 0000B4F2 8316[0200]00 reloc adc word [relocated(sscounter) + 2], strict byte 0 503 <1> linkdatarelocation sscounter, -3 0 0000B4F7 D006[0000] reloc rol byte [relocated(sss_silent_count_used)], 1 505 <1> linkdatarelocation sss_silent_count_used 0 0000B4FB 7317 jnc @F 0 0000B4FD A1[0000] reloc mov ax, word [relocated(sss_silent_count)] 508 <1> linkdatarelocation sss_silent_count 0 0000B500 0B06[0200] reloc or ax, word [relocated(sss_silent_count) + 2] 510 <1> linkdatarelocation sss_silent_count 0 0000B504 58 pop ax 0 0000B505 52 push dx 0 0000B506 746B jz .nodisplay 0 0000B508 5A pop dx 0 0000B509 50 push ax 0 0000B50A 832E[0000]01 reloc sub word [relocated(sss_silent_count)], strict byte 1 517 <1> linkdatarelocation sss_silent_count, -3 0 0000B50F 831E[0200]00 reloc sbb word [relocated(sss_silent_count) + 2], strict byte 0 519 <1> linkdatarelocation sss_silent_count, -3 520 <1> @@: 0 0000B514 89D8 mov ax, bx 0 0000B516 BF[0000] reloc mov di, relocated(line_out) 523 <1> linkdatarelocation line_out 0 0000B519 E8[0000] extcallcall hexword ; 4 (segment) 0 0000B51C B03A mov al, ':' 0 0000B51E AA stosb ; +1=5 0 0000B51F 58 pop ax 0 0000B520 48 dec ax 0 0000B521 E8[0000] extcallcall hexword 530 <1> %if _SDUMP 0 0000B524 F606[0200]80 reloc testopt [relocated(options)], ss_no_dump 532 <1> linkdatarelocation options, -3 0 0000B529 7544 jnz .no_dump 0 0000B52B F9 stc 0 0000B52C 11D0 adc ax, dx ; -> behind result 0 0000B52E 763F jbe .noresult ; end of segment 0 0000B530 89C6 mov si, ax ; cannot be zero 538 <1> 539 <1> %if _SDUMPDISPLACEMENT 0 0000B532 660FB7D2 _386_PM movzx edx, dx 0 0000B536 E8BA01 call sss_calculate_displacement 542 <1> 0 0000B539 89FB mov bx, di 0 0000B53B 01C3 add bx, ax 0 0000B53D 01C3 add bx, ax 0 0000B53F 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 0000B541 89F1 mov cx, si ; cannot be zero 0 0000B543 F7D9 neg cx ; cannot be zero 555 <1> %if _SDUMPDISPLACEMENT 0 0000B545 39C1 cmp cx, ax 557 <1> %else 558 <1> cmp cx, byte 16 559 <1> %endif 0 0000B547 7602 jbe .cxdone 561 <1> %if _SDUMPDISPLACEMENT 0 0000B549 89C1 mov cx, ax 563 <1> %else 564 <1> mov cx, 16 565 <1> %endif 566 <1> .cxdone: ; cx cannot be zero 0 0000B54B 1F pop ds 0 0000B54C 1E push ds ; restore search's segment 569 <1> %if _SDUMPDISPLACEMENT 0 0000B54D 50 push ax 571 <1> %endif 0 0000B54E 51 push cx 573 <1> .disploop: 0 0000B54F AC lodsb 0 0000B550 E8[0000] extcallcall dd_store 0 0000B553 B020 mov al, 32 0 0000B555 AA stosb 0 0000B556 E2F7 loop .disploop 0 0000B558 59 pop cx 580 <1> %if _SDUMPDISPLACEMENT 0 0000B559 58 pop ax 582 <1> %endif 0 0000B55A 16 push ss 0 0000B55B 1F pop ds 0 0000B55C F7D9 neg cx 586 <1> %if _SDUMPDISPLACEMENT 0 0000B55E 01C1 add cx, ax 588 <1> %else 589 <1> add cx, byte 16 590 <1> %endif 0 0000B560 7407 jz .noblanks 592 <1> .loopblanks: 0 0000B562 B82020 mov ax, 32<<8|32 0 0000B565 AB stosw 0 0000B566 AA stosb 0 0000B567 E2F9 loop .loopblanks 597 <1> .noblanks: 0 0000B569 C645E72D mov byte [di-(1+(8*3))], '-' 0 0000B56D 89DF mov di, bx 600 <1> .noresult: 601 <1> .no_dump: 602 <1> %endif ; _SDUMP 0 0000B56F 52 push dx 0 0000B570 E8[0000] extcallcall putsline_crlf 605 <1> .nodisplay: 0 0000B573 E8[0000] extcallcall dohack 0 0000B576 5A pop dx 0 0000B577 07 pop es 0 0000B578 1F pop ds 0 0000B579 5F pop di 0 0000B57A E93CFF jmp .next 612 <1> 613 <1> 614 <1> .error_unhack_di: 0 0000B57D 16 push ss 0 0000B57E 1F pop ds 0 0000B57F E8[0000] extcallcall unhack 0 0000B582 89FE mov si, di 0 0000B584 E9[0000] jmp error 620 <1> 621 <1> 622 <1> %if _PM 623 <1> subcpu 386 624 <1> 625 <1> .386init: 0 0000B587 665B pop ebx 0 0000B589 665A pop edx 0 0000B58B E8[0000] extcallcall ispm 0 0000B58E 0F85A3FE jnz .init_popped ; not PM --> 0 0000B592 6629D3 sub ebx, edx ; ebx = number of bytes in search range minus one 0 0000B595 6629CB sub ebx, ecx ; = number of possible positions of string minus 1 0 0000B598 72E3 jb .error_unhack_di 0 0000B59A 6689D7 mov edi, edx 0 0000B59D 6689CA mov edx, ecx 0 0000B5A0 6689D9 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 0 0000B5A3 36F606[0300]80 reloc testopt [ss:relocated(internalflags3)], dif3_sss_is_reverse 646 <1> linkdatarelocation internalflags3, -3 0 0000B5A9 751B jnz .386reverse 648 <1> %endif 649 <1> .386loop: 0 0000B5AB 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 0 0000B5AD 6656 push esi 0 0000B5AF 67AC 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 0 0000B5B1 67F2AE a32 repne scasb ; look for first byte 659 <1> %endif 0 0000B5B4 7409 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 0 0000B5B6 67AE a32 scasb ; count in ecx was cnt-1 667 <1> %endif 0 0000B5B8 7541 jne .386done 669 <1> .386found_last_byte: 0 0000B5BA E84300 call .386handle_found_byte 0 0000B5BD EB3C jmp .386done 672 <1> 673 <1> .386foundbyte: 0 0000B5BF E83E00 call .386handle_found_byte 0 0000B5C2 665E pop esi 0 0000B5C4 EBE5 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: 0 0000B5C6 6601CF add edi, ecx ; -> last position to check 682 <1> .386reverseloop: 0 0000B5C9 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 0 0000B5CB 6656 push esi 0 0000B5CD 67AC a32 lodsb ; first character in al 0 0000B5CF FD 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 0 0000B5D0 67F2AE a32 repne scasb ; look for first byte 693 <1> %endif 0 0000B5D3 7414 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 0 0000B5D5 67AE a32 scasb ; count in ecx was cnt-1 701 <1> %endif 0 0000B5D7 7522 jne .386done 703 <1> .386reversefound_last_byte: 0 0000B5D9 FC cld 0 0000B5DA 6683C702 add edi, 2 0 0000B5DE 38C0 cmp al, al ; ZR for case if edx = 0 0 0000B5E0 E81D00 call .386handle_found_byte 0 0000B5E3 6683EF02 sub edi, 2 0 0000B5E7 EB12 jmp .386done 710 <1> 711 <1> .386reversefoundbyte: 0 0000B5E9 FC cld 0 0000B5EA 6683C702 add edi, 2 0 0000B5EE 38C0 cmp al, al ; ZR for case if edx = 0 0 0000B5F0 E80D00 call .386handle_found_byte 0 0000B5F3 6683EF02 sub edi, 2 0 0000B5F7 665E pop esi 0 0000B5F9 EBCE 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: 0 0000B5FB 665E pop esi ; discard 0 0000B5FD E98EFE jmp .commondone 725 <1> 726 <1> 727 <1> ; INP: ZR 728 <1> .386handle_found_byte: 0 0000B600 6651 push ecx 0 0000B602 6657 push edi 0 0000B604 6689D1 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 0 0000B607 67F3A6 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). 0 0000B60A 665F pop edi 0 0000B60C 7403 je .386display ; if equal 746 <1> .386next: 0 0000B60E 6659 pop ecx 0 0000B610 C3 retn 749 <1> 750 <1> .386display: 0 0000B611 8CC3 mov bx, es 0 0000B613 6657 push edi 0 0000B615 1E push ds 0 0000B616 06 push es 0 0000B617 16 push ss 0 0000B618 1F pop ds 0 0000B619 E8[0000] extcallcall unhack ; undo the interrupt vector hack and restore es 0 0000B61C 6657 push edi 0 0000B61E 668B3E[0000] reloc mov edi, dword [relocated(sscounter)] 760 <1> linkdatarelocation sscounter 0 0000B623 6681FF10000000 reloc cmp edi, strict dword relocated(search_results_amount) 762 <1> linkdatarelocation search_results_amount, -4 ; low word of the dword ! 0 0000B62A 7317 jae @F 0 0000B62C 01FF add di, di ; * 2 0 0000B62E 89F8 mov ax, di 0 0000B630 01FF add di, di ; * 4 0 0000B632 01C7 add di, ax ; * 4 + * 2 = * 6 0 0000B634 81C7[0000] reloc add di, relocated(search_results) 769 <1> linkdatarelocation search_results 0 0000B638 6658 pop eax 0 0000B63A 6650 push eax 0 0000B63C 6648 dec eax 0 0000B63E 66AB stosd 0 0000B640 89D8 mov ax, bx 0 0000B642 AB stosw 776 <1> 777 <1> @@: 0 0000B643 66FF06[0000] reloc inc dword [relocated(sscounter)] 779 <1> linkdatarelocation sscounter 0 0000B648 D006[0000] reloc rol byte [relocated(sss_silent_count_used)], 1 781 <1> linkdatarelocation sss_silent_count_used 0 0000B64C 731A jnc @F 0 0000B64E 66833E[0000]00 reloc cmp dword [relocated(sss_silent_count)], strict byte 0 784 <1> linkdatarelocation sss_silent_count, -3 0 0000B654 6658 pop eax 0 0000B656 52 push dx 0 0000B657 0F848D00 je .386nodisplay 0 0000B65B 5A pop dx 0 0000B65C 6650 push eax 0 0000B65E 832E[0000]01 reloc sub word [relocated(sss_silent_count)], strict byte 1 791 <1> linkdatarelocation sss_silent_count, -3 0 0000B663 831E[0200]00 reloc sbb word [relocated(sss_silent_count) + 2], strict byte 0 793 <1> linkdatarelocation sss_silent_count, -3 794 <1> @@: 0 0000B668 89D8 mov ax, bx 0 0000B66A BF[0000] reloc mov di, relocated(line_out) 797 <1> linkdatarelocation line_out 0 0000B66D E8[0000] extcallcall hexword ; 4 (segment) 0 0000B670 B03A mov al, ':' 0 0000B672 AA stosb ; +1=5 0 0000B673 6658 pop eax 0 0000B675 6648 dec eax 0 0000B677 E8[0000] extcallcall test_high_limit 0 0000B67A 7403 jz .noa32 0 0000B67C E8[0000] extcall hexword_high, PM required 806 <1> .noa32: 0 0000B67F E8[0000] extcallcall hexword 808 <1> %if _SDUMP 0 0000B682 F606[0200]80 reloc testopt [relocated(options)], ss_no_dump 810 <1> linkdatarelocation options, -3 0 0000B687 755B jnz .386_no_dump 0 0000B689 F9 stc 0 0000B68A 6611D0 adc eax, edx ; -> behind result 0 0000B68D 7655 jbe .386noresult ; end of segment 0 0000B68F 6689C6 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 0 0000B692 E85E00 call sss_calculate_displacement 823 <1> %else 824 <1> mov ax, 32<<8|32 825 <1> stosw 826 <1> %endif 827 <1> 0 0000B695 5B pop bx ; get search selector 0 0000B696 53 push bx 0 0000B697 E8[0000] extcallcall test_high_limit 0 0000B69A 7508 jnz .386_high_limit 832 <1> 833 <1> .386_low_limit: 0 0000B69C 89F1 mov cx, si ; 0 if at end of 64 KiB limit, else nonzero 0 0000B69E F7D9 neg cx ; 0 if at end of 64 KiB limit, else nonzero 836 <1> %if _SDUMPDISPLACEMENT 0 0000B6A0 39C1 cmp cx, ax 838 <1> %else 839 <1> cmp cx, byte 16 ; below or equal maximum dump length ? 840 <1> %endif 0 0000B6A2 EB0D jmp @F 842 <1> 843 <1> .386_high_limit: 0 0000B6A4 6689F1 mov ecx, esi ; cannot be 0 0 0000B6A7 66F7D9 neg ecx ; cannot be 0 846 <1> %if _SDUMPDISPLACEMENT 0 0000B6AA 660FB7C0 movzx eax, ax 0 0000B6AE 6639C1 cmp ecx, eax 849 <1> %else 850 <1> cmp ecx, byte 16 ; below or equal maximum dump length ? 851 <1> %endif 852 <1> @@: 0 0000B6B1 7602 jbe .386cxdone ; (e)cx <= maximum dump length, use cx 854 <1> %if _SDUMPDISPLACEMENT 0 0000B6B3 89C1 mov cx, ax 856 <1> %else 857 <1> mov cx, 16 ; reset cx (ecxh is not used) 858 <1> %endif 859 <1> .386cxdone: 0 0000B6B5 E32D jcxz .386noresult ; if at end of 64 KiB limit --> 861 <1> ; (The displacement is already written here. Oh well.) 862 <1> %if _SDUMPDISPLACEMENT 0 0000B6B7 89FB mov bx, di 0 0000B6B9 01C3 add bx, ax 0 0000B6BB 01C3 add bx, ax 0 0000B6BD 01C3 add bx, ax 867 <1> %else 868 <1> lea bx, [di+3*16] 869 <1> %endif 0 0000B6BF 1F pop ds 0 0000B6C0 1E push ds ; restore search's segment 872 <1> %if _SDUMPDISPLACEMENT 0 0000B6C1 50 push ax 874 <1> %endif 0 0000B6C2 51 push cx 876 <1> .386disploop: 0 0000B6C3 67AC a32 lodsb 0 0000B6C5 E8[0000] extcallcall dd_store 0 0000B6C8 B020 mov al, 32 0 0000B6CA AA stosb 0 0000B6CB E2F6 loop .386disploop 0 0000B6CD 59 pop cx 883 <1> %if _SDUMPDISPLACEMENT 0 0000B6CE 58 pop ax 885 <1> %endif 0 0000B6CF 16 push ss 0 0000B6D0 1F pop ds 0 0000B6D1 F7D9 neg cx 889 <1> %if _SDUMPDISPLACEMENT 0 0000B6D3 01C1 add cx, ax 891 <1> %else 892 <1> add cx, byte 16 893 <1> %endif 0 0000B6D5 7407 jz .386noblanks 895 <1> .386loopblanks: 0 0000B6D7 B82020 mov ax, 32<<8|32 0 0000B6DA AB stosw 0 0000B6DB AA stosb 0 0000B6DC E2F9 loop .386loopblanks 900 <1> .386noblanks: 0 0000B6DE C645E72D mov byte [di-(1+(8*3))], '-' 0 0000B6E2 89DF mov di, bx 903 <1> .386noresult: 904 <1> .386_no_dump: 905 <1> %endif ; _SDUMP 0 0000B6E4 52 push dx 0 0000B6E5 E8[0000] extcallcall putsline_crlf 908 <1> .386nodisplay: 0 0000B6E8 E8[0000] extcallcall dohack 0 0000B6EB 5A pop dx 0 0000B6EC 07 pop es 0 0000B6ED 1F pop ds 0 0000B6EE 665F pop edi 0 0000B6F0 E91BFF 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 0000B6F3 31DB xor bx, bx 0 0000B6F5 66 _386_PM_o32 0 0000B6F6 42 inc dx ; = pattern length (can overflow) 0 0000B6F7 B306 _386_PM mov bl, 6 ; dword needed 0 0000B6F9 66F7C2000000FF _386_PM test edx, 0FF00_0000h 0 0000B700 7513 _386_PM jnz @F 0 0000B702 B304 _386_PM mov bl, 4 ; 3byte needed 0 0000B704 66F7C20000FF00 _386_PM test edx, 0FF_0000h 0 0000B70B 7508 _386_PM jnz @F 0 0000B70D B302 mov bl, 2 ; word needed 0 0000B70F 84F6 test dh, dh 0 0000B711 7502 jnz @F 0 0000B713 B300 mov bl, 0 ; byte needed 944 <1> @@: 945 <1> 0 0000B715 B8202B mov ax, " +" 0 0000B718 AB stosw ; common prefix 0 0000B719 66 _386_PM_o32 0 0000B71A 89D0 mov ax, dx 0 0000B71C FF97[0000] reloc call near [word sss_displacement_write_table + bx] 951 <1> internaldatarelocation 952 <1> ; write displacement number 0 0000B720 66 _386_PM_o32 0 0000B721 4A dec dx ; restore 955 <1> 0 0000B722 B82020 mov ax, 32 | 32 << 8 0 0000B725 AB stosw ; write blanks 0 0000B726 89F8 mov ax, di 0 0000B728 2D[0000] reloc sub ax, strict word relocated(line_out) 960 <1> linkdatarelocation line_out ; = length written so far (<= 25, >= 15) 0 0000B72B F7D8 neg ax ; minus length written so far (>= -25, <= -15) 0 0000B72D 83C04F add ax, 79 ; 79 minus length written so far 963 <1> ; = how many columns remaining (>= 54, <= 64) 0 0000B730 D1E8 shr ax, 1 0 0000B732 D1E8 shr ax, 1 ; divide by 4 (>= 13, <= 16) 966 <1> ; = how many bytes can be dumped 0 0000B734 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 0000757E [0000] reloc dw .byte 974 <1> internalcoderelocation 0 00007580 [0000] reloc dw .word 976 <1> internalcoderelocation 977 <1> %if _PM && ! _ONLYNON386 0 00007582 [A104] reloc dw .3byte 979 <1> internalcoderelocation 0 00007584 [0000] reloc dw .dword 981 <1> internalcoderelocation 982 <1> %endif 983 <1> 984 <1> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 0 0000B735 66C1C810 ror eax, 16 0 0000B739 E8[0000] call hexbyte 0 0000B73C 66C1C010 rol eax, 16 1014 <1> subcpureset 0 0000B740 E9[0000] 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/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00007590 ???????? eldhSignature: resb 4 ; "ELD1" 0 00007594 ?????? resb 3 ; reserved 0 00007597 ?? resb 1 ; 26 (Ctrl-Z) 0 00007598 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000759C ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 0000759E ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 000075A0 ???????? eldhDataOffset: resd 1 0 000075A4 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 000075A6 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 000075A8 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 000075AA ???????? eldhReserved: resb 4 ; reserved 0 000075AE ???? 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 000075B0 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 000075B4 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 000075B8 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 000075BC ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00007590 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00007598 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000759C ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 0000759E ???? 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 00007590 ???? 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 00007592 ???? eldltAmount: resw 1 0 00007594 ???????? 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 00007590 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00007592 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00007594 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00007596 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00007598 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 000075A0 ???? 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 00007590 ???? eldlSignature: resw 1 ; 0E1D1h 0 00007592 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00007594 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00007596 ???? eldlUseLinkHash: resw 1 0 00007598 ???? eldlDataAmount: resw 1 0 0000759A ???? eldlDataPrefixes: resw 1 0 0000759C ???? eldlDataEntries: resw 1 0 0000759E ???? eldlDataAddresses: resw 1 0 000075A0 ???? eldlCodeAmount: resw 1 0 000075A2 ???? eldlCodePrefixes: resw 1 0 000075A4 ???? eldlCodeEntries: resw 1 0 000075A6 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 000075A8 ???? eldlDualAmount: resw 1 0 000075AA ???? eldlDualPrefixes: resw 1 0 000075AC ???? eldlDualEntries: resw 1 0 000075AE ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00007590 ???? ifKeyword: resw 1 0 00007592 ???? ifDescription: resw 1 0 00007594 ???? ifOptions: resw 1 0 00007596 ???? ifValue: resw 1 0 00007598 ???? ifTrying: resw 1 0 0000759A ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00007590 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00007594 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00007598 ???? smName1: resw 1 ; -> first string part 0 0000759A ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 0000759C ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 0000759E ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 000075A0 ???? smBaseNext: resw 1 0 000075A2 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 000075A4 ???? smSpecialNext: resw 1 0 000075A6 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00007590 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00007591 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00007592 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00007590 ???? shHash: resw 1 ; hash value 0 00007592 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00007590 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00007594 ???? xmsmSourceHandle: resw 1 0 00007596 ???????? xmsmSourceAddress: resd 1 0 0000759A ???? xmsmDestHandle: resw 1 0 0000759C ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 19 %endif 20 21 22 %if !_LINK || _SYMBOLIC 23 %if _LINK_COMPAT 24 usesection lDEBUG_DATA_ENTRY 24 ------------------ note: usesection lDEBUG_DATA_ENTRY 25 align 16, db 0 26 27 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 27 ------------------ note: usesection lDEBUG_CODE 28 %if _DUALCODE && _SYMBOLICDUALCODE 29 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 29 ------------------ note: usesection lDEBUG_CODE2 30 %endif 31 align 2, db 0 32 %endif 33 34 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 34 ------------------ note: usesection lDEBUG_DATA_ENTRY 35 36 align 4, db 0 37 sym_storage: 38 .clear_on_free.first: 0 00007590 00000000 .start: dd 0 40 %if _XMS_SYMBOL_TABLE 0 00007594 00000000 .main.xms.start:dd 0 0 00007598 00000000 .hash.xms.start:dd 0 0 0000759C 00000000 .str.xms.start: dd 0 0 000075A0 00000000 .xms.free: dd 0 0 000075A4 00000000 .xms.end: dd 0 46 %endif 47 48 .first_start: 0 000075A8 00000000 .main.start: dd 0 ; -> SYMMAIN array 0 000075AC 00000000 .hash.start: dd 0 ; -> SYMHASH array 0 000075B0 00000000 .str.start: dd 0 ; -> SYMSTR heap 0 000075B4 00000000 .free: dd 0 ; -> free table space 0 000075B8 00000000 .end: dd 0 ; -> after end of allocated table space 54 .after_start: 55 56 ; The following are SYMMAIN array indices. 0 000075BC 0000 .main.end: dw 0 0 000075BE 0000 .main.free: dw 0 59 .minus1_on_free.first: 0 000075C0 FFFF .main.based.base: dw -1 0 000075C2 FFFF .main.base.first: dw -1 0 000075C4 FFFF .main.base.last: dw -1 0 000075C6 FFFF .main.bb.first: dw -1 0 000075C8 FFFF .main.bb.last: dw -1 0 000075CA FFFF .main.nonbased.first: dw -1 0 000075CC FFFF .main.nonbased.last: dw -1 0 000075CE FFFF .main.reloc.first: dw -1 0 000075D0 FFFF .main.reloc.last: dw -1 69 70 %if _ZZ_INSERT_TEMP 71 ; This is a SYMMAIN array index. However, it 72 ; should NOT participate in relocation. Must 73 ; be >= .main.free at all times. 0 000075D2 FFFF .main.temp.first: dw -1 75 %endif 76 .minus1_on_free.after: 77 %if _ZZ_INSERT_TEMP 78 ; Amount of in-use temporary SYMMAIN entries. 0 000075D4 0000 .main.temp.amount: dw 0 80 %endif 81 82 ; The following are SYMHASH array dword indices. 0 000075D6 0000 .hash.end: dw 0 0 000075D8 0000 .hash.free: dw 0 85 86 ; The following are SYMSTR heap dword indices. 0 000075DA 0000 .str.end: dw 0 0 000075DC 0000 .str.free: dw 0 89 .clear_on_free.after: 90 91 %if _BOOTLDR 0 000075DE 00 align 16, db 0 93 ; Image identification 94 ; First dword: signature 95 ; Next word: version, two ASCII digits 96 ; Next word: checksum. adding up all words of the paragraph gives zero 97 ; Next word: size of image (including this paragraph) 98 ; Three words reserved, zero. 99 zz_imageident: 0 000075E0 4E53594D3030 db "NSYM00" 0 000075E6 0000 .check: dw 0 0 000075E8 0000 .size: dw 0 0 000075EA 0000 times 3 dw 0 104 %endif 105 106 %if _XMS_SYMBOL_TABLE 107 align 16, db 0 108 zz_xms: 0 000075F0 00 .16_zeros: times 16 db 0 110 align 2, db 0 0 00007600 00 .movestruc: times XMSMOVE_size db 0 112 align 4, db 0 113 %if _PM 0 00007610 0000000000000000 .pm32entry: dq 0 0 00007618 00000000 .pm16entry: dd 0 116 %endif 0 0000761C 0000000000000000 .86mentry: dq 0 0 00007624 00000000 .transfer_address: dd 0 0 00007628 F0FF0000 .transfer_size: dd XMSTRANSFER_default_size 0 0000762C FFFF .handle: dw -1 121 %endif ; _XMS_SYMBOL_TABLE 122 123 align 2, db 0 0 0000762E 0000 zz_saved_strategy: dw 0 0 00007630 0000 zz_saved_umblink: dw 0 126 zz_flag_existing_default: 0 00007632 40 .symbol: db insertfExistingBlockDiffering 0 00007633 C0 .start: db insertfExistingKeep 129 130 131 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 131 ------------------ note: usesection lDEBUG_CODE 132 133 %if _DUALCODE && _SYMBOLICDUALCODE 134 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 134 ------------------ note: usesection lDEBUG_CODE2 135 %endif 136 137 overridedef STANDALONE, 0 138 overridedef INCLUDECOMMON, 0 139 overridedef DEBUG0, 0 140 overridedef DEBUG1, 0 141 overridedef SYMMAINLARGE, 1 142 %include "insert.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> Symbol insert implementation 5 <1> by C. Masloch, 2019 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> %include "lmacros3.mac" 1 <2> [list -] 16 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 25 <2> smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 32 <2> smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 37 <2> smName1: resw 1 ; -> first string part 38 <2> smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 40 <2> smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 48 <2> resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 57 <2> smBaseNext: resw 1 58 <2> smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 65 <2> smSpecialNext: resw 1 66 <2> smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 95 <2> ssLength: resb 1 ; how long this string is (only ssString) 96 <2> ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 110 <2> ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 135 <2> shHash: resw 1 ; hash value 136 <2> shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 142 <2> xmsmCount: resd 1 143 <2> ; The count must be even. 144 <2> xmsmSourceHandle: resw 1 145 <2> xmsmSourceAddress: resd 1 146 <2> xmsmDestHandle: resw 1 147 <2> xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 17 <1> 18 <1> defaulting 19 <1> numdef DEBUG0 20 <1> numdef DEBUG1 21 <1> numdef DEBUG2 22 <1> numdef USE_DELETE, 1 23 <1> numdef USE_DELETE_UNREF_STRING, 1 24 <1> numdef USE_COMPACT, 1 25 <1> numdef USE_EXPAND, 1 26 <1> numdef USE_RELOCATE, 1 27 <1> numdef STANDALONE, 1 28 <1> %assign _DWORD_LINEAR 1 29 <1> numdef INSERT_HASH_AFTER, 1 30 <1> numdef BUFFER_86MM_SLICE, 0 31 <1> numdef SECOND_SLICE, 1 32 <1> numdef ZZ_INSERT_TEMP, 1 33 <1> numdef XMS_SYMBOL_TABLE, 1 34 <1> numdef XMS_USE, 1 35 <1> numdef XMS_ONLY, 0 36 <1> excdef ! _XMS_SYMBOL_TABLE, XMS_ONLY 37 <1> %if _STANDALONE 38 <1> %assign _PM 0 39 <1> %assign _LINK 0 40 <1> 41 <1> %idefine dualfunction comment 42 <1> %idefine dualreturn 43 <1> %idefine dualdistance near 44 <1> %imacro dualcall 1.nolist 45 <1> call %1 46 <1> %endmacro 47 <1> %imacro nearcall 1.nolist 48 <1> call %1 49 <1> %endmacro 50 <1> %imacro section_of_function 0-1.nolist 51 <1> %endmacro 52 <1> 53 <1> numdef AMOUNT_SYMBOLS, 128 54 <1> strdef INCLUDELIST, "" 55 <1> numdef LINEARBASE, 1_0100h 56 <1> numdef LIST_SYMBOLS, 1 57 <1> numdef LIST_SYMBOLS_NEXT, 1 58 <1> numdef LIST_HASH, 1 59 <1> numdef LIST_STR, 1 60 <1> strdef INCLUDELIST0, "" 61 <1> numdef ADDSIZE, 2048 62 <1> 63 <1> 64 <1> %ifdef _MAP 65 <1> [map all _MAP] 66 <1> %endif 67 <1> 68 <1> cpu 8086 69 <1> org 256 70 <1> %define SECTIONFIXUP -$$ +256 71 <1> 72 <1> addsection PROGRAM, start=256 align=16 73 <1> start: 74 <1> 75 <1> init: 76 <1> %ifn _XMS_ONLY 77 <1> mov ax, ds 78 <1> add word [sym_storage.main.start + 2], ax 79 <1> add word [sym_storage.hash.start + 2], ax 80 <1> add word [sym_storage.str.start + 2], ax 81 <1> add word [sym_storage.start + 2], ax 82 <1> add word [sym_storage.free + 2], ax 83 <1> add word [sym_storage.end + 2], ax 84 <1> %endif 85 <1> %if _XMS_SYMBOL_TABLE 86 <1> %if _XMS_USE 87 <1> clc 88 <1> %else 89 <1> stc 90 <1> %endif 91 <1> int3 92 <1> jc store_pre_str 93 <1> 94 <1> mov ax, 352Fh 95 <1> int 21h 96 <1> mov ax, es 97 <1> test ax, ax 98 <1> jz .no_xms 99 <1> cmp bx, -1 100 <1> je .no_xms 101 <1> mov ax, 4300h 102 <1> int 2Fh 103 <1> cmp al, 80h 104 <1> je .got_xms 105 <1> .no_xms: 106 <1> mov dx, msg.zz_no_xms 107 <1> jmp exit_error_msg 108 <1> 109 <1> .got_xms: 110 <1> mov ax, 4310h 111 <1> int 2Fh 112 <1> mov word [zz_xms.entry], bx 113 <1> mov word [zz_xms.entry + 2], es 114 <1> 115 <1> XMSTABLE_TABLE_SIZE equ _AMOUNT_SYMBOLS * (SYMMAIN_size + SYMHASH_size + SYMSTR_typical_size) + _ADDSIZE 118 <1> XMSTABLE_TABLE_PLUS_SIZE equ (fromkib(kib(XMSTABLE_TABLE_SIZE + fromparas(paras(ssString + 255)) + XMSTRANSFER_default_size))) 121 <1> 122 <1> mov ah, 09h 123 <1> mov dx, kib(XMSTABLE_TABLE_PLUS_SIZE) 124 <1> nearcall zz_call_xms 125 <1> dec ax 126 <1> jz @F 127 <1> 128 <1> mov dx, msg.zz_fail_xms_alloc 129 <1> jmp exit_error_msg 130 <1> 131 <1> @@: 132 <1> mov word [zz_xms.handle], dx 133 <1> 134 <1> mov si, zz_xms.movestruc 135 <1> 136 <1> xms_init: 137 <1> xor ax, ax 138 <1> mov bx, (XMSTABLE_TABLE_PLUS_SIZE) >> 16 139 <1> mov cx, (XMSTABLE_TABLE_PLUS_SIZE) & 0FFFFh 140 <1> 141 <1> mov word [si + xmsmDestHandle], dx ; our handle 142 <1> mov word [si + xmsmDestAddress], ax 143 <1> mov word [si + xmsmDestAddress + 2], ax 144 <1> mov word [si + xmsmSourceHandle], ax ; 86M memory 145 <1> mov word [si + xmsmSourceAddress + 2], ds 146 <1> mov word [si + xmsmSourceAddress], zz_xms.16_zeros 147 <1> mov word [si + xmsmCount], 16 148 <1> mov word [si + xmsmCount + 2], ax 149 <1> 150 <1> .loop: 151 <1> sub cx, 16 152 <1> sbb bx, 0 153 <1> jc .last 154 <1> 155 <1> nearcall call_xms_move 156 <1> 157 <1> add word [si + xmsmDestAddress], 16 158 <1> adc word [si + xmsmDestAddress + 2], 0 159 <1> 160 <1> jmp .loop 161 <1> 162 <1> .last: 163 <1> add cx, 16 164 <1> adc bx, 0 165 <1> 166 <1> jcxz @F 167 <1> mov word [si + xmsmCount], cx 168 <1> 169 <1> nearcall call_xms_move 170 <1> @@: 171 <1> 172 <1> jmp store_pre_str 173 <1> 174 <1> 175 <1> zz_call_xms: 176 <1> call far [zz_xms.entry] 177 <1> retn 178 <1> 179 <1> fail_xms_access: 180 <1> mov dx, msg.zz_fail_xms_access 181 <1> jmp exit_error_msg 182 <1> 183 <1> call_xms_move: 184 <1> push ax 185 <1> push bx 186 <1> push si 187 <1> mov si, zz_xms.movestruc 188 <1> mov ah, 0Bh 189 <1> nearcall zz_call_xms 190 <1> dec ax 191 <1> jnz fail_xms_access 192 <1> pop si 193 <1> pop bx 194 <1> pop ax 195 <1> retn 196 <1> %endif 197 <1> 198 <1> store_pre_str: 199 <1> nearcall zz_store_pre_str 200 <1> 201 <1> 202 <1> do_insert_list: 203 <1> mov si, list 204 <1> .loop: 205 <1> 206 <1> push ds 207 <1> pop es 208 <1> mov di, si 209 <1> mov bx, si 210 <1> mov al, 0 211 <1> mov cx, -1 212 <1> repne scasb 213 <1> add di, 3 ; round up 214 <1> and di, ~3 ; and mask off low bits 215 <1> mov si, di ; -> next list entry 216 <1> not cx ; length of string with terminator 217 <1> dec cx ; length of string 218 <1> 219 <1> push ds 220 <1> push si 221 <1> 222 <1> lodsw 223 <1> xchg ax, dx 224 <1> lodsw 225 <1> xchg ax, dx 226 <1> 227 <1> push dx 228 <1> push ax ; linear 229 <1> 230 <1> lodsw 231 <1> xchg ax, dx 232 <1> lodsw 233 <1> xchg ax, dx 234 <1> 235 <1> push dx 236 <1> push ax ; offset 237 <1> 238 <1> lodsw 239 <1> inc si 240 <1> inc si 241 <1> push ax ; flags 242 <1> 243 <1> mov dx, bx ; ds:dx -> string 244 <1> push ds 245 <1> pop es ; es:dx -> string 246 <1> or word [sym_storage.main.based.base], -1 247 <1> ; set base to none 248 <1> 249 <1> dualcall zz_insert 250 <1> 251 <1> pop si 252 <1> pop ds ; -> next list entry 253 <1> add si, 12 254 <1> 255 <1> cmp si, list.end 256 <1> jb .loop 257 <1> 258 <1> nearcall zz_commit_insert 259 <1> 260 <1> 261 <1> %if _USE_DELETE 262 <1> do_delete_list: 263 <1> mov dx, list_to_delete 264 <1> .loop_list: 265 <1> push ds 266 <1> pop es 267 <1> mov di, dx 268 <1> mov cx, -1 269 <1> mov al, 0 270 <1> repne scasb 271 <1> not cx 272 <1> dec cx 273 <1> mov si, dx 274 <1> push cx 275 <1> nearcall zz_hash 276 <1> pop cx 277 <1> 278 <1> push si 279 <1> lframe 280 <1> lenter 281 <1> lvar dword, string_pointer 282 <1> push ds 283 <1> push dx 284 <1> lvar word, string_length 285 <1> push cx 286 <1> lvar word, main_index 287 <1> push ax ; (reserve space, used for parameter return) 288 <1> 289 <1> .loop: 290 <1> push word [bp + ?string_pointer + 2] 291 <1> push word [bp + ?string_pointer] 292 <1> push word [bp + ?string_length] 293 <1> 294 <1> dualcall zz_match_symbol 295 <1> jc .none ; es:di -> SYMMAIN entry (access slice) 296 <1> 297 <1> push bx ; (preserve hash) 298 <1> push dx 299 <1> mov bx, word [bp + ?main_index] 300 <1> nearcall zz_delete_main 301 <1> pop bx 302 <1> nearcall zz_delete_hash 303 <1> pop bx ; (preserve hash) 304 <1> 305 <1> jmp .loop ; look for more of the same name 306 <1> ; (do NOT use zz_match_symbol.continue, 307 <1> ; because we modified the arrays) 308 <1> 309 <1> .none: 310 <1> lleave 311 <1> pop dx 312 <1> inc dx 313 <1> cmp dx, list_to_delete.end 314 <1> jb .loop_list 315 <1> %endif 316 <1> 317 <1> 318 <1> %if _USE_DELETE_UNREF_STRING 319 <1> delete_unref_str: 320 <1> xor si, si 321 <1> jmp .condition 322 <1> 323 <1> .loop: 324 <1> push si ; string index 325 <1> push ax ; (reserve space, uninitialised) 326 <1> dualcall getfarpointer.str 327 <1> pop di 328 <1> pop es 329 <1> 330 <1> mov cx, word [es:di + ssLength] 331 <1> cmp ch, 0 332 <1> mov ch, 0 333 <1> jne .next 334 <1> 335 <1> push si 336 <1> mov bx, si 337 <1> nearcall zz_delete_string 338 <1> pop si 339 <1> jmp .condition 340 <1> 341 <1> .next: 342 <1> ; Refer to comment after .compare_prefix_next. 343 <1> nearcall zz_get_symstr_length_indices.ssLength_in_cx 344 <1> 345 <1> ; Refer to comment before .compare_prefix_condition. 346 <1> add si, cx ; keep count of what index we're at 347 <1> .condition: 348 <1> cmp si, word [sym_storage.str.free] 349 <1> jb .loop ; if not yet at free space --> 350 <1> %endif 351 <1> 352 <1> 353 <1> d2 call function_list_hash 354 <1> %if _USE_COMPACT 355 <1> nearcall zz_compact 356 <1> %endif 357 <1> 358 <1> d2 call function_list_hash 359 <1> 360 <1> %if _USE_EXPAND 361 <1> nearcall zz_expand 362 <1> %endif 363 <1> d2 call function_list_hash 364 <1> 365 <1> %if _USE_RELOCATE 366 <1> do_relocate: 367 <1> mov si, relocatelist 368 <1> .loop: 369 <1> lodsw 370 <1> xchg dx, ax ; dx = low word 371 <1> lodsw 372 <1> xchg dx, ax ; dx:ax = start source 373 <1> 374 <1> xchg ax, cx 375 <1> lodsw 376 <1> xchg ax, cx 377 <1> xchg ax, bx 378 <1> lodsw 379 <1> xchg ax, bx ; bx:cx = start dest 380 <1> 381 <1> push si 382 <1> xchg ax, di ; dx:di = start source 383 <1> xor ax, ax 384 <1> push ax ; zero high word 385 <1> lodsw 386 <1> push ax ; stack dword = length 387 <1> xchg ax, di ; dx:ax = start source 388 <1> 389 <1> dualcall zz_relocate 390 <1> pop si 391 <1> inc si 392 <1> inc si 393 <1> cmp si, relocatelist.end 394 <1> jb .loop 395 <1> %endif 396 <1> d2 call function_list_hash 397 <1> 398 <1> 399 <1> %if _LIST_SYMBOLS 400 <1> list_symbols: 401 <1> xor si, si 402 <1> xor bx, bx ; (NC) 403 <1> lframe 404 <1> lenter 405 <1> lvar dword, prior 406 <1> push bx 407 <1> push bx 408 <1> mov cx, word [sym_storage.main.free] 409 <1> lvar word, flags 410 <1> pushf ; (NC) 411 <1> jcxz .end 412 <1> .loop: 413 <1> push bx ; (index) 414 <1> push ax ; (reserve space, uninitialised) 415 <1> dualcall getfarpointer.main 416 <1> pop di 417 <1> pop es 418 <1> mov dx, msg.list_first 419 <1> nearcall disp_message 420 <1> %if _DWORD_LINEAR 421 <1> mov dx, word [es:di + smLinear + 2] 422 <1> mov ax, dx 423 <1> nearcall disp_ax_hex 424 <1> %else 425 <1> xor dx, dx 426 <1> %endif 427 <1> mov ax, word [es:di + smLinear] 428 <1> nearcall disp_ax_hex 429 <1> 430 <1> push dx 431 <1> push ax 432 <1> mov dx, msg.list_second 433 <1> nearcall disp_message 434 <1> %if _DWORD_LINEAR 435 <1> mov ax, word [es:di + smOffset + 2] 436 <1> test ax, ax 437 <1> jz @F 438 <1> nearcall disp_ax_hex 439 <1> @@: 440 <1> %endif 441 <1> mov ax, word [es:di + smOffset] 442 <1> nearcall disp_ax_hex 443 <1> pop ax 444 <1> pop dx 445 <1> 446 <1> cmp dx, word [bp + ?prior + 2] 447 <1> mov dx, msg.list_last_success 448 <1> jb .error 449 <1> ja .success 450 <1> cmp ax, word [bp + ?prior] 451 <1> jae .success 452 <1> .error: 453 <1> popf ; (accesses ?flags) 454 <1> stc 455 <1> pushf 456 <1> mov dx, msg.list_last_error 457 <1> .success: 458 <1> %if _DWORD_LINEAR 459 <1> push word [es:di + smLinear + 2] 460 <1> pop word [bp + ?prior + 2] 461 <1> %endif 462 <1> push word [es:di + smLinear] 463 <1> pop word [bp + ?prior] 464 <1> push dx 465 <1> mov dx, msg.list_middle 466 <1> nearcall disp_message 467 <1> push bx 468 <1> dualcall displaystring 469 <1> pop dx 470 <1> nearcall disp_message 471 <1> 472 <1> inc si 473 <1> inc bx ; increment index 474 <1> loop .loop 475 <1> .end: 476 <1> popf ; (accesses ?flags) 477 <1> jc invaliddata 478 <1> 479 <1> mov dx, msg.list_end_1 480 <1> nearcall disp_message 481 <1> mov ax, si 482 <1> nearcall disp_ax_dec 483 <1> mov dx, msg.list_end_2.singular 484 <1> cmp ax, 1 485 <1> je @F 486 <1> mov dx, msg.list_end_2.plural 487 <1> @@: 488 <1> nearcall disp_message 489 <1> 490 <1> lleave 491 <1> %endif 492 <1> 493 <1> 494 <1> %if _LIST_SYMBOLS_NEXT && ! _SYMMAINLARGE 495 <1> list_symbols_next: 496 <1> xor si, si 497 <1> mov bx, word [sym_storage.main.first] 498 <1> cmp bx, -1 499 <1> je .end 500 <1> .loop: 501 <1> push bx ; (index) 502 <1> push ax ; (reserve space, uninitialised) 503 <1> dualcall getfarpointer.main 504 <1> pop di 505 <1> pop es 506 <1> mov dx, msg.list_first 507 <1> nearcall disp_message 508 <1> %if _DWORD_LINEAR 509 <1> mov ax, word [es:di + smLinear + 2] 510 <1> nearcall disp_ax_hex 511 <1> %endif 512 <1> mov ax, word [es:di + smLinear] 513 <1> nearcall disp_ax_hex 514 <1> 515 <1> mov dx, msg.list_second 516 <1> nearcall disp_message 517 <1> %if _DWORD_LINEAR 518 <1> mov ax, word [es:di + smOffset + 2] 519 <1> test ax, ax 520 <1> jz @F 521 <1> nearcall disp_ax_hex 522 <1> @@: 523 <1> %endif 524 <1> mov ax, word [es:di + smOffset] 525 <1> nearcall disp_ax_hex 526 <1> 527 <1> mov dx, msg.list_middle 528 <1> nearcall disp_message 529 <1> push bx 530 <1> dualcall displaystring 531 <1> mov dx, msg.list_last_success 532 <1> nearcall disp_message 533 <1> 534 <1> push bx ; (index) 535 <1> push ax ; (reserve space, uninitialised) 536 <1> dualcall getfarpointer.main 537 <1> pop di 538 <1> pop es 539 <1> mov bx, word [es:di + smNext] 540 <1> inc si 541 <1> cmp bx, -1 542 <1> jne .loop 543 <1> .end: 544 <1> 545 <1> mov dx, msg.list_end_1 546 <1> nearcall disp_message 547 <1> mov ax, si 548 <1> nearcall disp_ax_dec 549 <1> mov dx, msg.list_end_2.singular 550 <1> cmp ax, 1 551 <1> je @F 552 <1> mov dx, msg.list_end_2.plural 553 <1> @@: 554 <1> nearcall disp_message 555 <1> %endif 556 <1> 557 <1> 558 <1> %if _LIST_HASH 559 <1> list_hash: 560 <1> ; mov dx, msg.linebreak 561 <1> ; call disp_message 562 <1> 563 <1> mov cx, word [sym_storage.hash.free] 564 <1> xor bx, bx 565 <1> jcxz .end 566 <1> .loop: 567 <1> push bx ; hash index 568 <1> push ax ; (reserve space, uninitialised) 569 <1> dualcall getfarpointer.hash 570 <1> pop di 571 <1> pop es ; -> SYMHASH entry (access slice) 572 <1> 573 <1> mov dx, msg.list_hash_first 574 <1> nearcall disp_message 575 <1> mov ax, word [es:di + shHash] 576 <1> nearcall disp_ax_hex 577 <1> mov dx, msg.list_hash_second 578 <1> nearcall disp_message 579 <1> 580 <1> push cx 581 <1> mov cx, word [es:di + shMain] 582 <1> push cx 583 <1> dualcall displaystring 584 <1> pop cx 585 <1> mov dx, msg.list_hash_third 586 <1> nearcall disp_message 587 <1> .next: 588 <1> inc bx 589 <1> loop .loop 590 <1> .end: 591 <1> %endif 592 <1> 593 <1> 594 <1> %if _LIST_STR 595 <1> list_str: 596 <1> mov dx, msg.linebreak 597 <1> nearcall disp_message 598 <1> 599 <1> xor si, si 600 <1> jmp .condition 601 <1> 602 <1> .loop: 603 <1> 604 <1> mov dx, msg.string_first 605 <1> nearcall disp_message 606 <1> 607 <1> mov ax, si 608 <1> nearcall disp_ax_hex 609 <1> 610 <1> mov dx, msg.string_second 611 <1> nearcall disp_message 612 <1> 613 <1> push si ; string index 614 <1> push ax ; (reserve space, uninitialised) 615 <1> dualcall getfarpointer.str 616 <1> pop di 617 <1> pop es 618 <1> 619 <1> mov cx, word [es:di + ssLength] 620 <1> mov al, cl 621 <1> nearcall disp_al_hex 622 <1> 623 <1> mov dx, msg.string_third 624 <1> nearcall disp_message 625 <1> 626 <1> mov al, ch 627 <1> nearcall disp_al_hex 628 <1> mov ch, 0 629 <1> 630 <1> mov dx, msg.string_fourth 631 <1> nearcall disp_message 632 <1> 633 <1> mov ax, word [es:di + ssHash] 634 <1> nearcall disp_ax_hex 635 <1> 636 <1> mov dx, msg.string_fifth 637 <1> nearcall disp_message 638 <1> 639 <1> lea dx, [di + ssString] 640 <1> push ds 641 <1> push es 642 <1> pop ds 643 <1> nearcall disp_message_length_cx 644 <1> pop ds 645 <1> 646 <1> mov dx, msg.string_sixth 647 <1> nearcall disp_message 648 <1> 649 <1> ; Refer to comment after .compare_prefix_next. 650 <1> nearcall zz_get_symstr_length_indices.ssLength_in_cx 651 <1> 652 <1> ; Refer to comment before .compare_prefix_condition. 653 <1> add si, cx ; keep count of what index we're at 654 <1> .condition: 655 <1> cmp si, word [sym_storage.str.free] 656 <1> jb .loop ; if not yet at free space --> 657 <1> %endif 658 <1> 659 <1> 660 <1> nearcall list_sym_storage_usage 661 <1> 662 <1> 663 <1> exit_normal: 664 <1> mov al, 0 665 <1> exit: 666 <1> int3 667 <1> push ss 668 <1> pop ds 669 <1> push ss 670 <1> pop es 671 <1> %if _XMS_SYMBOL_TABLE 672 <1> push ax 673 <1> cmp word [zz_xms.entry + 4], 0 674 <1> jne @F 675 <1> cmp word [zz_xms.entry + 6], 0 676 <1> jne @F 677 <1> cmp word [zz_xms.entry + 2], 0 678 <1> je @FF 679 <1> @@: 680 <1> mov dx, word [zz_xms.handle] 681 <1> cmp dx, -1 682 <1> je @F 683 <1> mov ah, 0Ah 684 <1> nearcall zz_call_xms 685 <1> @@: 686 <1> pop ax 687 <1> %endif 688 <1> mov ah, 4Ch 689 <1> int 21h 690 <1> 691 <1> 692 <1> disp_al: 693 <1> push dx 694 <1> push ax 695 <1> mov dl, al 696 <1> mov ah, 2 697 <1> int 21h 698 <1> pop ax 699 <1> pop dx 700 <1> retn 701 <1> 702 <1> 703 <1> ; Display number in ax decimal 704 <1> ; 705 <1> ; INP: ax = number 706 <1> ; OUT: displayed using Int21.02 707 <1> ; CHG: none 708 <1> disp_ax_dec: ; ax (no leading zeros) 709 <1> push bx 710 <1> xor bx, bx 711 <1> .pushax: 712 <1> push dx 713 <1> push ax 714 <1> or bl, bl 715 <1> jz .nobl 716 <1> sub bl, 5 717 <1> neg bl 718 <1> .nobl: 719 <1> push cx 720 <1> mov cx, 10000 721 <1> call .divide_out 722 <1> mov cx, 1000 723 <1> call .divide_out 724 <1> mov cx, 100 725 <1> call .divide_out 726 <1> mov cl, 10 727 <1> call .divide_out 728 <1> ; (Divisor 1 is useless) 729 <1> add al, '0' 730 <1> xchg dl, al 731 <1> mov ah, 02h 732 <1> int 21h 733 <1> pop cx 734 <1> pop ax 735 <1> pop dx 736 <1> pop bx ; Caller's register 737 <1> retn 738 <1> 739 <1> 740 <1> ; INP: ax = number 741 <1> ; cx = divisor 742 <1> ; OUT: ax = remainder of operation 743 <1> ; result displayed 744 <1> .divide_out: 745 <1> push dx 746 <1> xor dx, dx 747 <1> div cx ; 0:ax / cx 748 <1> push dx ; remainder 749 <1> dec bl 750 <1> jnz .nobl2 751 <1> or bh, 1 752 <1> .nobl2: 753 <1> or bh, al 754 <1> jz .leadingzero 755 <1> add al, '0' 756 <1> xchg dl, al 757 <1> mov ah, 02h 758 <1> int 21h ; display result 759 <1> .leadingzero: 760 <1> pop ax ; remainder 761 <1> pop dx 762 <1> retn 763 <1> 764 <1> 765 <1> ; INP: dx:ax = numerator 766 <1> ; cx = multiplier 767 <1> ; bx = field width 768 <1> ; STT: UP 769 <1> ; OUT: displayed 770 <1> disp_dxax_times_cx_width_bx_size: 771 <1> lframe near 772 <1> lvar 4 + 4 + 2, buffer 773 <1> lvar 6, dividend 774 <1> lenter 775 <1> lvar word, width 776 <1> push bx 777 <1> push si 778 <1> push ds 779 <1> push cx 780 <1> push ax 781 <1> push dx 782 <1> push es 783 <1> push di 784 <1> 785 <1> push ss ; push cs 786 <1> pop ds 787 <1> push ss 788 <1> pop es 789 <1> 790 <1> push dx 791 <1> mul cx 792 <1> xchg ax, di 793 <1> xchg dx, si ; si:di = first mul 794 <1> 795 <1> pop ax 796 <1> mul cx 797 <1> add ax, si 798 <1> adc dx, 0 ; dx:ax = second mul + adj, dx:ax:di = mul 799 <1> 800 <1> mov cx, di ; dx:ax:cx = mul 801 <1> 802 <1> mov word [bp + ?dividend], cx 803 <1> mov word [bp + ?dividend + 2], ax 804 <1> mov word [bp + ?dividend + 4], dx 805 <1> 806 <1> mov si, msg.prefixes 807 <1> .loop: 808 <1> cmp word [bp + ?dividend + 4], 0 809 <1> jnz .divide 810 <1> cmp word [bp + ?dividend + 2], 0 811 <1> jnz .divide 812 <1> cmp word [bp + ?dividend], 2048 813 <1> jbe .end 814 <1> .divide: 815 <1> inc si 816 <1> mov cx, 1024 ; 1000 here if SI units 817 <1> ; testopt [options], use_si_units ; SI units ? 818 <1> ; jz @F ; no --> 819 <1> ; mov cx, 1000 ; yes, use 1000 820 <1> @@: 821 <1> 822 <1> xor dx, dx 823 <1> mov di, 6 824 <1> .loop_divide: 825 <1> mov ax, [bp + ?dividend - 2 + di] 826 <1> div cx 827 <1> mov word [bp + ?dividend - 2 + di], ax 828 <1> dec di 829 <1> dec di 830 <1> jnz .loop_divide 831 <1> ; dx = last remainder 832 <1> jmp .loop 833 <1> 834 <1> .end: 835 <1> lea di, [bp + ?buffer + 4 + 4 + 1] 836 <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 837 <1> mov al, "B" 838 <1> stosb 839 <1> mov al, [si] 840 <1> cmp al, 32 841 <1> je @FF 842 <1> 843 <1> ; testopt [options], use_si_units | use_jedec_units ; SI / JEDEC units ? 844 <1> ; jnz @F ; yes --> 845 <1> and al, ~20h ; uppercase, don't do this if SI units 846 <1> push ax 847 <1> mov al, "i" 848 <1> stosb ; don't store this if SI units 849 <1> pop ax 850 <1> @@: 851 <1> stosb 852 <1> @@: 853 <1> mov al, 32 854 <1> stosb 855 <1> 856 <1> mov ax, word [bp + ?dividend] 857 <1> mov cx, 10 858 <1> .loop_write: 859 <1> xor dx, dx 860 <1> div cx 861 <1> xchg ax, dx 862 <1> ; ax = remainder (next digit) 863 <1> ; dx = result of div 864 <1> add al, '0' 865 <1> stosb 866 <1> xchg ax, dx ; ax = result of div 867 <1> test ax, ax ; any more ? 868 <1> jnz .loop_write ; loop --> 869 <1> 870 <1> cld 871 <1> 872 <1> lea bx, [bp + ?buffer + 4 + 4 + 1] 873 <1> sub bx, di 874 <1> mov si, di 875 <1> 876 <1> pop di 877 <1> pop es 878 <1> 879 <1> mov cx, [bp + ?width] 880 <1> sub cx, bx 881 <1> jbe .none_blank 882 <1> .loop_blank: 883 <1> mov al, 32 884 <1> nearcall disp_al 885 <1> loop .loop_blank 886 <1> .none_blank: 887 <1> 888 <1> mov cx, bx 889 <1> inc si 890 <1> mov dx, si 891 <1> nearcall disp_message_length_cx 892 <1> 893 <1> pop dx 894 <1> pop ax 895 <1> pop cx 896 <1> pop ds 897 <1> pop si 898 <1> pop bx 899 <1> lleave 900 <1> lret 901 <1> 902 <1> 903 <1> %endif ; _STANDALONE 904 <1> 905 <1> 906 <1> ; INP: ds:pre_str_list -> pre-string list 907 <1> ; STT: ds = data segment 908 <1> ; sets es to ds 909 <1> zz_store_pre_str: 0 00002366 BE[0000] mov si, pre_str_list 911 <1> .loop: 0 00002369 1E push ds 0 0000236A 07 pop es 0 0000236B AC lodsb 0 0000236C 88C4 mov ah, al ; ah = what to initialise ssRefCount to 0 0000236E 89F7 mov di, si ; es:di -> string 0 00002370 B000 mov al, 0 0 00002372 B9FFFF mov cx, -1 0 00002375 57 push di 0 00002376 F2AE repne scasb 0 00002378 5F pop di 0 00002379 F7D1 not cx ; = length including terminator 0 0000237B 01CE add si, cx 0 0000237D 56 push si 0 0000237E 49 dec cx ; cx = length 0 0000237F E8EF0C nearcall zz_store_string 0 00002382 5E pop si 0 00002383 81FE[0000] cmp si, pre_str_list.end 0 00002387 72E0 jb .loop 0 00002389 C3 retn 931 <1> 932 <1> 933 <1> ; Note: This invalidates the access slice. 934 <1> list_sym_storage_usage: 0 0000238A A1[2C00] mov ax, word [sym_storage.main.end] 0 0000238D 8B36[2E00] mov si, word [sym_storage.main.free] 937 <1> 0 00002391 BA[0000] mov dx, msg.liststore.main.end.first 0 00002394 E86C01 nearcall disp_size_main 940 <1> 0 00002397 29F0 sub ax, si 0 00002399 96 xchg ax, si 0 0000239A BA[0000] mov dx, msg.liststore.main.used.first 0 0000239D E86301 nearcall disp_size_main 945 <1> 0 000023A0 96 xchg ax, si 0 000023A1 BA[0000] mov dx, msg.liststore.main.free.first 0 000023A4 E85C01 nearcall disp_size_main 949 <1> 950 <1> 0 000023A7 A1[4600] mov ax, word [sym_storage.hash.end] 0 000023AA 8B36[4800] mov si, word [sym_storage.hash.free] 953 <1> 0 000023AE BA[0000] mov dx, msg.liststore.hash.end.first 0 000023B1 E85401 nearcall disp_size_hash 956 <1> 0 000023B4 29F0 sub ax, si 0 000023B6 96 xchg ax, si 0 000023B7 BA[0000] mov dx, msg.liststore.hash.used.first 0 000023BA E84B01 nearcall disp_size_hash 961 <1> 0 000023BD 96 xchg ax, si 0 000023BE BA[0000] mov dx, msg.liststore.hash.free.first 0 000023C1 E84401 nearcall disp_size_hash 965 <1> 966 <1> 0 000023C4 A1[4A00] mov ax, word [sym_storage.str.end] 0 000023C7 8B36[4C00] mov si, word [sym_storage.str.free] 969 <1> 0 000023CB BA[0000] mov dx, msg.liststore.str.end.first 0 000023CE E83C01 nearcall disp_size_str 972 <1> 0 000023D1 29F0 sub ax, si 0 000023D3 96 xchg ax, si 0 000023D4 BA[0000] mov dx, msg.liststore.str.used.first 0 000023D7 E83301 nearcall disp_size_str 977 <1> 0 000023DA 96 xchg ax, si 0 000023DB BA[0000] mov dx, msg.liststore.str.free.first 0 000023DE E82C01 nearcall disp_size_str 981 <1> 982 <1> 0 000023E1 31C0 xor ax, ax 0 000023E3 31D2 xor dx, dx ; dx:ax = byte counter 0 000023E5 31DB xor bx, bx ; bx = SYMSTR counter 986 <1> lframe 0 000023E7 5589E5 lenter 988 <1> lvar dword, unref_bytes 0 000023EA 50 push ax 0 000023EB 50 push ax 991 <1> lvar word, unref_count 0 000023EC 50 push ax 0 000023ED 31F6 xor si, si 0 000023EF EB30 jmp .string_condition 995 <1> 996 <1> .string_loop: 0 000023F1 56 push si ; string index 0 000023F2 50 push ax ; (reserve space, uninitialised) 0 000023F3 E8[0000]EB02[CD0D] dualcall getfarpointer.str 0 000023FA 5F pop di 0 000023FB 07 pop es 1002 <1> 0 000023FC 268B0D mov cx, word [es:di + ssLength] 0 000023FF B500 mov ch, 0 1005 <1> 1006 <1> ; Refer to comment after .compare_prefix_next. 0 00002401 E86911 nearcall zz_get_symstr_length_bytes.ssLength_in_cx 1008 <1> 0 00002404 01C8 add ax, cx 0 00002406 83D200 adc dx, 0 0 00002409 43 inc bx 1012 <1> 0 0000240A 26807D0100 cmp byte [es:di + ssRefCount], 0 0 0000240F 750A jne @F 0 00002411 014EFC add word [bp + ?unref_bytes], cx 0 00002414 8356FE00 adc word [bp + ?unref_bytes + 2], 0 0 00002418 FF46FA inc word [bp + ?unref_count] 1018 <1> @@: 1019 <1> 1020 <1> ; Refer to comment before .compare_prefix_condition. 1021 <1> %if SYMSTR_index_size == 4 0 0000241B D1E9 shr cx, 1 0 0000241D D1E9 shr cx, 1 ; to SYMSTR index 1024 <1> %else 1025 <1> %error Unexpected SYMSTR index size 1026 <1> %endif 0 0000241F 01CE add si, cx ; keep count of what index we're at 1028 <1> .string_condition: 0 00002421 3B36[4C00] cmp si, word [sym_storage.str.free] 0 00002425 72CA jb .string_loop ; if not yet at free space --> 1031 <1> 1032 <1> 0 00002427 89D6 mov si, dx 1034 <1> 0 00002429 BA[0000] mov dx, msg.liststore.str.first 0 0000242C E8[0000]EB02[0000] nearcall disp_message 1037 <1> 0 00002433 53 push bx 0 00002434 B90100 mov cx, 1 0 00002437 BB0800 mov bx, 4 + 4 0 0000243A 89F2 mov dx, si 0 0000243C E8[0000]EB02[0000] nearcall disp_dxax_times_cx_width_bx_size 0 00002443 5B pop bx 1044 <1> 0 00002444 BA[0000] mov dx, msg.liststore.str.second 0 00002447 E8[0000]EB02[0000] nearcall disp_message 1047 <1> 0 0000244E 93 xchg ax, bx 0 0000244F E8[0000]EB02[0000] nearcall disp_ax_dec 1050 <1> 0 00002456 BA[0000] mov dx, msg.liststore.str.third.singular 0 00002459 83F801 cmp ax, 1 0 0000245C 7403 je @F 0 0000245E BA[0000] mov dx, msg.liststore.str.third.plural 1055 <1> @@: 0 00002461 E8[0000]EB02[0000] nearcall disp_message 1057 <1> 0 00002468 53 push bx 0 00002469 50 push ax 1060 <1> 1061 <1> 0 0000246A BA[0000] mov dx, msg.liststore.str.unref.first 0 0000246D E8[0000]EB02[0000] nearcall disp_message 1064 <1> 0 00002474 B90100 mov cx, 1 0 00002477 BB0800 mov bx, 4 + 4 0 0000247A 8B56FE mov dx, word [bp + ?unref_bytes + 2] 0 0000247D 8B46FC mov ax, word [bp + ?unref_bytes] 0 00002480 E8[0000]EB02[0000] nearcall disp_dxax_times_cx_width_bx_size 1070 <1> 0 00002487 BA[0000] mov dx, msg.liststore.str.unref.second 0 0000248A E8[0000]EB02[0000] nearcall disp_message 1073 <1> 0 00002491 8B46FA mov ax, word [bp + ?unref_count] 0 00002494 E8[0000]EB02[0000] nearcall disp_ax_dec 1076 <1> 0 0000249B BA[0000] mov dx, msg.liststore.str.unref.third.singular 0 0000249E 83F801 cmp ax, 1 0 000024A1 7403 je @F 0 000024A3 BA[0000] mov dx, msg.liststore.str.unref.third.plural 1081 <1> @@: 0 000024A6 E8[0000]EB02[0000] nearcall disp_message 1083 <1> 1084 <1> 0 000024AD 5B pop bx 0 000024AE 58 pop ax ; (swapped as from where they were pushed) 1087 <1> 0 000024AF 85DB test bx, bx 0 000024B1 750C jnz @F 1090 <1> 0 000024B3 BA[0000] mov dx, msg.liststore.str.nofourth 0 000024B6 E8[0000]EB02[0000] nearcall disp_message 0 000024BD EB36 jmp .last 1094 <1> 1095 <1> @@: 0 000024BF 96 xchg si, ax 0 000024C0 31D2 xor dx, dx ; dx:ax = high word of dividend 0 000024C2 F7F3 div bx 0 000024C4 50 push ax 0 000024C5 89F0 mov ax, si ; ax = low word of dividend, dx = remainder 0 000024C7 F7F3 div bx 0 000024C9 85D2 test dx, dx 0 000024CB 5A pop dx ; dx:ax = result 0 000024CC 7406 jz @F 0 000024CE 83C001 add ax, 1 0 000024D1 83D200 adc dx, 0 1107 <1> @@: 1108 <1> 0 000024D4 85D2 test dx, dx 0 000024D6 740C jz @F 1111 <1> 0 000024D8 BA[0000] mov dx, msg.liststore.str.invalid 0 000024DB E8[0000]EB02[0000] nearcall disp_message 1114 <1> 0 000024E2 EB11 jmp @FF 1116 <1> @@: 0 000024E4 BA[0000] mov dx, msg.liststore.str.fourth 0 000024E7 E8[0000]EB02[0000] nearcall disp_message 1119 <1> 0 000024EE E8[0000]EB02[0000] nearcall disp_ax_dec 1121 <1> @@: 1122 <1> 1123 <1> .last: 0 000024F5 BA[0000] mov dx, msg.liststore.str.last 0 000024F8 E8[0000]EB02[0000] nearcall disp_message 1126 <1> 0 000024FF 89EC5D lleave 0 00002502 C3 retn 1129 <1> 1130 <1> 1131 <1> disp_size_main: 0 00002503 B91800 mov cx, SYMMAIN_index_size 0 00002506 EB08 jmp @F 1134 <1> 1135 <1> disp_size_hash: 0 00002508 B90400 mov cx, SYMHASH_index_size 0 0000250B EB03 jmp @F 1138 <1> 1139 <1> disp_size_str: 0 0000250D B90400 mov cx, SYMSTR_index_size 1141 <1> @@: 0 00002510 E8[0000]EB02[0000] nearcall disp_message 0 00002517 31D2 xor dx, dx 0 00002519 BB0800 mov bx, 4 + 4 0 0000251C E8[0000]EB02[0000] nearcall disp_dxax_times_cx_width_bx_size 0 00002523 BA[0000] mov dx, msg.liststore.second 0 00002526 E8[0000]EB02[0000] nearcall disp_message 0 0000252D E8[0000]EB02[0000] nearcall disp_ax_dec 0 00002534 BA[0000] mov dx, msg.liststore.third.singular 0 00002537 83F801 cmp ax, 1 0 0000253A 7403 je @F 0 0000253C BA[0000] mov dx, msg.liststore.third.plural 1153 <1> @@: 0 0000253F E8[0000]EB02[0000] nearcall disp_message 0 00002546 C3 retn 1156 <1> 1157 <1> 1158 <1> ; INP: dword [ss:sp + 6] = linear value to insert at 1159 <1> ; dword [ss:sp + 2] = offset value to insert 1160 <1> ; word [ss:sp] = flags to insert 1161 <1> ; low byte = insertion flags to control operation 1162 <1> ; high byte = symbol flags to store in SYMMAIN 1163 <1> ; es:dx -> string to insert 1164 <1> ; cx = string length 1165 <1> ; word [sym_storage.main.based.base] = SYMMAIN index of base 1166 <1> ; STT: ds = data segment (with sym_storage table) 1167 <1> ; OUT: inserted 1168 <1> ; 1169 <1> ; Note: This invalidates the access slice. 1170 <1> dualfunction 1171 <1> zz_insert: section_of_function 1172 <1> lframe dualdistance 1173 <1> lpar dword, linear 1174 <1> lpar dword, offset 1175 <1> lpar word, insertflags 1176 <1> lvar word, main_index 1177 <1> lvar word, string_hash 1178 <1> lvar word, string_prefix_index 1179 <1> lvar word, string_prefix_length 1180 <1> lvar word, string_suffix_length 1181 <1> lequ ?string_prefix_index, string1index 1182 <1> lvar word, string2index 0 00002547 5589E58D66F4 lenter 1184 <1> 1185 <1> lvar word, length 0 0000254D 51 push cx 1187 <1> lvar dword, string_pointer 0 0000254E 06 push es 0 0000254F 52 push dx 0 00002550 31FF xor di, di 1191 <1> lvar word, existing_found 0 00002552 57 push di 1193 <1> 1194 <1> 1195 <1> zz_check_symhint: 0 00002553 89C8 mov ax, cx 0 00002555 89D7 mov di, dx 0 00002557 51 push cx 0 00002558 BE[0000] mov si, msg.symhint 0 0000255B B9[0000] mov cx, msg.symhint_size 0 0000255E 39C8 cmp ax, cx 0 00002560 7202 jb @F ; (NZ if jumping) 0 00002562 F3A6 repe cmpsb 1204 <1> @@: 0 00002564 59 pop cx 0 00002565 7403E98900 jne .not_symhint 0 0000256A 804E0704 or byte [bp + ?insertflags + 1], smfSymHint >> 8 1208 <1> 1209 <1> 1210 <1> zz_insert_store_string: 0 0000256E 89C8 mov ax, cx 0 00002570 89D7 mov di, dx 0 00002572 51 push cx 0 00002573 BE[0000] mov si, msg.symhint_store_string 0 00002576 B9[0000] mov cx, msg.symhint_store_string_size 0 00002579 39C8 cmp ax, cx 0 0000257B 7202 jb @F ; (NZ if jumping) 0 0000257D F3A6 repe cmpsb 1219 <1> @@: 0 0000257F 59 pop cx 0 00002580 7571 jne .not_symhint_store_string 1222 <1> ; es:di -> after symhint prefix 0 00002582 89FE mov si, di ; es:si -> string to add 0 00002584 29D7 sub di, dx 0 00002586 29F9 sub cx, di ; cx = length of string after symhint prefix 0 00002588 745C jz .empty 1227 <1> 1228 <1> lframe 0, inner 1229 <1> lenter 1230 <1> lvar word, store_string_length 0 0000258A 51 push cx 0 0000258B 1E push ds 0 0000258C 56 push si 0 0000258D 06 push es 0 0000258E 1F pop ds ; ds:si -> string to add 0 0000258F E8D911 nearcall zz_hash 0 00002592 5E pop si 0 00002593 1F pop ds 1239 <1> 1240 <1> lvar dword, store_string_pointer 0 00002594 06 push es 0 00002595 56 push si 1243 <1> 0 00002596 31D2 xor dx, dx 0 00002598 EB38 jmp .compare_suffix_condition 1246 <1> 1247 <1> .compare_suffix_loop: 0 0000259A 52 push dx 0 0000259B 50 push ax ; (reserve space, uninitialised) 0 0000259C E8[0000]EB02[CD0D] dualcall getfarpointer.str 0 000025A3 5F pop di 0 000025A4 07 pop es 1253 <1> 0 000025A5 268B0D mov cx, word [es:di + ssLength] 1255 <1> ; cl = ssLength, ch = ssRefCount 0 000025A8 80FDFE cmp ch, -2 ; already at max amount refs ? 0 000025AB B500 mov ch, 0 0 000025AD 57 push di 0 000025AE 741C je .compare_suffix_next 1260 <1> 0 000025B0 3B4EEA cmp cx, word [bp + ?store_string_length] 0 000025B3 7517 jne .compare_suffix_next 1263 <1> 0 000025B5 26395D02 cmp word [es:di + ssHash], bx 0 000025B9 7511 jne .compare_suffix_next 1266 <1> 0 000025BB 83C704 add di, ssString 0 000025BE 1E push ds 0 000025BF C576E6 lds si, [bp + ?store_string_pointer] 0 000025C2 51 push cx 0 000025C3 F3A6 repe cmpsb 0 000025C5 59 pop cx 0 000025C6 1F pop ds 0 000025C7 7503 jne .compare_suffix_next 1275 <1> 0 000025C9 5F pop di 1277 <1> 1278 <1> ; do not call increment_ss_ref_count here! 0 000025CA EB17 jmp .all_first_str 1280 <1> 1281 <1> .compare_suffix_next: 0 000025CC 5F pop di 1283 <1> 1284 <1> ; Refer to comment after .compare_prefix_next. 0 000025CD E8900F nearcall zz_get_symstr_length_indices.ssLength_in_cx 1286 <1> 1287 <1> ; Refer to comment before .compare_prefix_condition. 0 000025D0 01CA add dx, cx ; keep count of what index we're at 1289 <1> .compare_suffix_condition: 0 000025D2 3B16[4C00] cmp dx, word [sym_storage.str.free] 0 000025D6 72C2 jb .compare_suffix_loop ; if not yet at free space --> 1292 <1> 1293 <1> 0 000025D8 8B4EEA mov cx, word [bp + ?store_string_length] 0 000025DB C47EE6 les di, [bp + ?store_string_pointer] 0 000025DE B400 mov ah, 0 ; unreferenced yet ! 0 000025E0 E89B0A nearcall zz_store_string.hash_bx 1298 <1> 1299 <1> .all_first_str: 0 000025E3 8D66EC lleave 1301 <1> 1302 <1> .empty: 0 000025E6 804E0708 or byte [bp + ?insertflags + 1], smfSymHintStoreString >> 8 0 000025EA F6460601 test byte [bp + ?insertflags], insertfDropSymHintStoreString 0 000025EE 7403 jz @F 0 000025F0 E9F305 jmp zz_insert.return 1307 <1> 1308 <1> @@: 1309 <1> .not_symhint_store_string: 1310 <1> zz_check_symhint.not_symhint: 1311 <1> 1312 <1> 1313 <1> zz_check_duplicate: 0 000025F3 1E push ds 0 000025F4 C576EE lds si, [bp + ?string_pointer] 0 000025F7 8B4EF2 mov cx, word [bp + ?length] 0 000025FA E86E11 nearcall zz_hash 0 000025FD 895EFC mov word [bp + ?string_hash], bx 0 00002600 1F pop ds 1320 <1> 1321 <1> lframe 0, inner 1322 <1> lenter 1323 <1> lvar word, inner_main_index 0 00002601 50 push ax 1325 <1> 0 00002602 BAFFFF mov dx, -1 1327 <1> %if _ZZ_INSERT_TEMP 1328 <1> ; ?inner_main_index used as parameter 0 00002605 FF76F0 push word [bp + ?string_pointer + 2] 0 00002608 FF76EE push word [bp + ?string_pointer] 0 0000260B FF76F2 push word [bp + ?length] 1332 <1> 0 0000260E E8[0000]EB02[410C] dualcall zz_match_symbol.continue 0 00002615 7303E9BD00 jc .none ; es:di -> SYMMAIN entry (access slice) 1335 <1> 0 0000261A E8D205 nearcall zz_commit_insert ; now commit 1337 <1> 0 0000261D BAFFFF mov dx, -1 ; search for first match again 1339 <1> ; (it may have moved) 1340 <1> ; ?inner_main_index used as parameter 0 00002620 FF76F0 push word [bp + ?string_pointer + 2] 0 00002623 FF76EE push word [bp + ?string_pointer] 0 00002626 FF76F2 push word [bp + ?length] 1344 <1> 0 00002629 E8[0000]EB02[410C] dualcall zz_match_symbol.continue 0 00002630 7318 jnc .first 0 00002632 E9FD20 jmp invaliddata 1348 <1> %endif 1349 <1> 1350 <1> 1351 <1> .loop: 1352 <1> ; ?inner_main_index used as parameter 0 00002635 FF76F0 push word [bp + ?string_pointer + 2] 0 00002638 FF76EE push word [bp + ?string_pointer] 0 0000263B FF76F2 push word [bp + ?length] 1356 <1> 0 0000263E E8[0000]EB02[410C] dualcall zz_match_symbol.continue 0 00002645 7303E98D00 jc .none ; es:di -> SYMMAIN entry (access slice) 1359 <1> 1360 <1> .first: 1361 <1> ; Here, dx and bx need to be preserved until 1362 <1> ; the next call to zz_match_symbol. 0 0000264A 52 push dx 0 0000264B 53 push bx 1365 <1> 1366 <1> %if 0 1367 <1> int3 1368 <1> mov al, 7 1369 <1> nearcall disp_al 1370 <1> %endif 1371 <1> 0 0000264C 8A5E06 mov bl, byte [bp + ?insertflags] 0 0000264F 80E3E0 and bl, insertfExistingMask 1374 <1> 0 00002652 80FB00 cmp bl, insertfExistingDefaultSymbol 0 00002655 7504 jne @F 0 00002657 8A1E[A200] mov bl, byte [zz_flag_existing_default.symbol] 1378 <1> @@: 0 0000265B 80FB20 cmp bl, insertfExistingDefaultStart 0 0000265E 7504 jne @F 0 00002660 8A1E[A300] mov bl, byte [zz_flag_existing_default.start] 1382 <1> @@: 0 00002664 80FB20 cmp bl, insertfExistingDefaultStart ; depends on the order! 0 00002667 7703E9C620 jbe invaliddata 1385 <1> 0 0000266C 80FB60 cmp bl, insertfExistingBlockAll ; handle BlockAll 0 0000266F 7435 je .block 0 00002671 80FBC0 cmp bl, insertfExistingKeep ; handle Keep 0 00002674 7503E96D05 je zz_insert.return ; (note: this skips the inner lleave) 1390 <1> 0 00002679 8B460C mov ax, word [bp + ?linear] 0 0000267C 263905 cmp word [es:di + smLinear], ax 0 0000267F 7532 jne .match_differing 0 00002681 8B460E mov ax, word [bp + ?linear + 2] 0 00002684 26394502 cmp word [es:di + smLinear + 2], ax 0 00002688 7529 jne .match_differing 0 0000268A 8B4608 mov ax, word [bp + ?offset] 0 0000268D 26394504 cmp word [es:di + smOffset], ax 0 00002691 7520 jne .match_differing 0 00002693 8B460A mov ax, word [bp + ?offset + 2] 0 00002696 26394506 cmp word [es:di + smOffset + 2], ax 0 0000269A 7517 jne .match_differing 1403 <1> 1404 <1> .match_same: 0 0000269C 80FB40 cmp bl, insertfExistingBlockDiffering 0 0000269F 7503E94205 je zz_insert.return ; (note: this skips the inner lleave) 1407 <1> ; cmp bl, insertfExistingDuplicate 1408 <1> ; je .delete 1409 <1> ; If the match is the same, we want to update 1410 <1> ; the flags and also link the symbol into 1411 <1> ; the smNext linked-list anew. 1412 <1> ; cmp bl, insertfExistingUpdate 1413 <1> ; je .delete 0 000026A4 EB17 jmp .delete 1415 <1> 1416 <1> .block: 0 000026A6 BA[0000] mov dx, msg.existing_block 0 000026A9 E8[0000]EB02[0000] nearcall disp_message 0 000026B0 E93305 jmp zz_insert.return ; (note: this skips the inner lleave) 1420 <1> 1421 <1> .match_differing: 0 000026B3 80FB40 cmp bl, insertfExistingBlockDiffering 0 000026B6 74EE je .block 1424 <1> ; cmp bl, insertfExistingDuplicate 1425 <1> ; je .next 0 000026B8 80FB80 cmp bl, insertfExistingUpdate 0 000026BB 7515 jne .next ; Duplicate --> 1428 <1> 1429 <1> .delete: 0 000026BD 5B pop bx 0 000026BE 5A pop dx 1432 <1> 0 000026BF 52 push dx 0 000026C0 53 push bx 1435 <1> 0 000026C1 52 push dx 0 000026C2 8B5EEA mov bx, word [bp + ?inner_main_index] 0 000026C5 E83D12 nearcall zz_delete_main 0 000026C8 5B pop bx 0 000026C9 E89111 nearcall zz_delete_hash 1441 <1> 0 000026CC 5B pop bx 0 000026CD 5A pop dx 0 000026CE 4A dec dx 1445 <1> ; if it was 1..0FFFEh: 1446 <1> ; search at newly moved SYMHASH entry 1447 <1> ; if it was 0: 1448 <1> ; search anew (not really what we want but works anyway) 0 000026CF E963FF jmp .loop 1450 <1> 1451 <1> 1452 <1> .next: 0 000026D2 5B pop bx 0 000026D3 5A pop dx 0 000026D4 E95EFF jmp .loop 1456 <1> 1457 <1> 1458 <1> .none: 0 000026D7 8D66EC lleave 1460 <1> 1461 <1> 1462 <1> zz_insert_check: 1463 <1> .main: 0 000026DA A1[2E00] mov ax, word [sym_storage.main.free] 1465 <1> %if _ZZ_INSERT_TEMP 0 000026DD 0306[4400] add ax, word [sym_storage.main.temp.amount] 0 000026E1 7303E94C20 jc invaliddata 1468 <1> %endif 0 000026E6 3906[2C00] cmp word [sym_storage.main.end], ax 0 000026EA 7721 ja @F 1471 <1> 0 000026EC E80005 nearcall zz_commit_insert 0 000026EF E8BA16 nearcall zz_compact 0 000026F2 E89019 nearcall zz_expand 1475 <1> 0 000026F5 A1[2E00] mov ax, word [sym_storage.main.free] 1477 <1> %if _ZZ_INSERT_TEMP 0 000026F8 0306[4400] add ax, word [sym_storage.main.temp.amount] 0 000026FC 7303E93120 jc invaliddata 1480 <1> %endif 0 00002701 3906[2C00] cmp word [sym_storage.main.end], ax 0 00002705 7706 ja @F 1483 <1> 0 00002707 BA[0000] mov dx, msg.main_too_full 0 0000270A E93220 jmp exit_error_msg 1486 <1> @@: 1487 <1> 1488 <1> 1489 <1> .hash: 0 0000270D A1[4800] mov ax, word [sym_storage.hash.free] 1491 <1> %if _ZZ_INSERT_TEMP 0 00002710 0306[4400] add ax, word [sym_storage.main.temp.amount] 0 00002714 7303E91920 jc invaliddata 1494 <1> %endif 0 00002719 3906[4600] cmp word [sym_storage.hash.end], ax 0 0000271D 7706 ja @F 1497 <1> 0 0000271F BA[0000] mov dx, msg.hash_too_full_crit2 0 00002722 E91A20 jmp exit_error_msg 1500 <1> @@: 1501 <1> 1502 <1> 1503 <1> zz_insert_str: 1504 <1> lequ 32, prefix_hash_buckets 1505 <1> lequ ?prefix_hash_buckets * 2, prefix_hash_size 1506 <1> 0 00002725 8B4EF2 mov cx, word [bp + ?length] 0 00002728 83F920 cmp cx, ?prefix_hash_buckets 0 0000272B 7603 jbe @F 0 0000272D B92000 mov cx, ?prefix_hash_buckets 1511 <1> @@: 0 00002730 49 dec cx 0 00002731 7903E9FC1F js invaliddata 0 00002736 89CB mov bx, cx 0 00002738 01DB add bx, bx 1516 <1> lvar ?prefix_hash_size, string_prefix_hashes 0 0000273A 83EC40 sub sp, ?prefix_hash_size 1518 <1> 0 0000273D 1E push ds 0 0000273E 89DF mov di, bx 1521 <1> .init_loop: 0 00002740 89F9 mov cx, di 0 00002742 D1E9 shr cx, 1 0 00002744 41 inc cx 1525 <1> 0 00002745 C576EE lds si, [bp + ?string_pointer] 0 00002748 53 push bx 0 00002749 E81F10 nearcall zz_hash 0 0000274C 895BAC mov word [bp + ?string_prefix_hashes + di], bx 0 0000274F 5B pop bx 0 00002750 4F dec di 0 00002751 4F dec di 0 00002752 79EC jns .init_loop 0 00002754 1F pop ds 1535 <1> 1536 <1> 0 00002755 31D2 xor dx, dx 0 00002757 8956FA mov word [bp + ?string_prefix_index], dx 1539 <1> ; init ?string1index 0 0000275A 8956F4 mov word [bp + ?string2index], dx 1541 <1> ; init 0 0000275D 8956F8 mov word [bp + ?string_prefix_length], dx 1543 <1> ; Note that SYMSTR index 0 points at the 1544 <1> ; fixed entry of the empty string! 0 00002760 EB57 jmp .compare_prefix_condition 1546 <1> 1547 <1> .compare_prefix_loop: 1548 <1> 0 00002762 52 push dx 0 00002763 50 push ax ; (reserve space, uninitialised) 0 00002764 E8[0000]EB02[CD0D] dualcall getfarpointer.str 0 0000276B 5F pop di 0 0000276C 07 pop es 1554 <1> 0 0000276D 268B0D mov cx, word [es:di + ssLength] 1556 <1> ; cl = ssLength, ch = ssRefCount 0 00002770 80FDFE cmp ch, -2 ; already at max amount refs ? 0 00002773 B500 mov ch, 0 0 00002775 57 push di 0 00002776 743B je .compare_prefix_next 1561 <1> 0 00002778 83F904 cmp cx, 4 0 0000277B 7636 jbe .compare_prefix_next 1564 <1> 0 0000277D 3B4EF8 cmp cx, word [bp + ?string_prefix_length] 0 00002780 7631 jbe .compare_prefix_next 1567 <1> 0 00002782 89D8 mov ax, bx 0 00002784 D1E8 shr ax, 1 0 00002786 40 inc ax 0 00002787 39C1 cmp cx, ax 0 00002789 7728 ja .compare_prefix_next 1573 <1> 0 0000278B 89C8 mov ax, cx 0 0000278D 48 dec ax 0 0000278E D1E0 shl ax, 1 0 00002790 50 push ax 0 00002791 57 push di 0 00002792 89C7 mov di, ax 0 00002794 8B43AC mov ax, word [bp + ?string_prefix_hashes + di] 0 00002797 5F pop di 0 00002798 26394502 cmp word [es:di + ssHash], ax 0 0000279C 58 pop ax 0 0000279D 7514 jne .compare_prefix_next 1585 <1> 0 0000279F 83C704 add di, ssString 0 000027A2 1E push ds 0 000027A3 C576EE lds si, [bp + ?string_pointer] 0 000027A6 51 push cx 0 000027A7 F3A6 repe cmpsb 0 000027A9 59 pop cx 0 000027AA 1F pop ds 0 000027AB 7506 jne .compare_prefix_next 1594 <1> 0 000027AD 8956FA mov word [bp + ?string_prefix_index], dx 0 000027B0 894EF8 mov word [bp + ?string_prefix_length], cx 1597 <1> 1598 <1> .compare_prefix_next: 0 000027B3 5F pop di 1600 <1> 1601 <1> ; The maximum length of a SYMSTR is 255 + SYMSTR_size + 3. 0 000027B4 E8A90D nearcall zz_get_symstr_length_indices.ssLength_in_cx 1603 <1> 1604 <1> ; Due to the maximum length, both the byte index and the 1605 <1> ; SYMSTR_index_size index delta fit into a word each. 0 000027B7 01CA add dx, cx ; keep count of what index we're at 1607 <1> .compare_prefix_condition: 0 000027B9 3B16[4C00] cmp dx, word [sym_storage.str.free] 0 000027BD 72A3 jb .compare_prefix_loop ; if not yet at free space --> 1610 <1> 0 000027BF 83C440 add sp, ?prefix_hash_size 1612 <1> ; discard ?string_prefix_hashes 1613 <1> 1614 <1> 0 000027C2 8B4EF2 mov cx, word [bp + ?length] 0 000027C5 8B46F8 mov ax, word [bp + ?string_prefix_length] 0 000027C8 29C1 sub cx, ax ; = length remaining string 0 000027CA 7470 jz .all_first_str ; (?string2index already initialised to zero) 0 000027CC 894EF6 mov word [bp + ?string_suffix_length], cx 1620 <1> 0 000027CF 1E push ds 0 000027D0 C576EE lds si, [bp + ?string_pointer] 0 000027D3 01C6 add si, ax ; -> remaining string 0 000027D5 7303E9581F jc invaliddata 0 000027DA E88E0F nearcall zz_hash 0 000027DD 1F pop ds 1627 <1> 0 000027DE 31D2 xor dx, dx 0 000027E0 EB3E jmp .compare_suffix_condition 1630 <1> 1631 <1> .compare_suffix_loop: 1632 <1> 0 000027E2 52 push dx 0 000027E3 50 push ax ; (reserve space, uninitialised) 0 000027E4 E8[0000]EB02[CD0D] dualcall getfarpointer.str 0 000027EB 5F pop di 0 000027EC 07 pop es 1638 <1> 0 000027ED 268B0D mov cx, word [es:di + ssLength] 1640 <1> ; cl = ssLength, ch = ssRefCount 0 000027F0 80FDFE cmp ch, -2 ; already at max amount refs ? 0 000027F3 B500 mov ch, 0 0 000027F5 57 push di 0 000027F6 7422 je .compare_suffix_next 1645 <1> 0 000027F8 3B4EF6 cmp cx, word [bp + ?string_suffix_length] 0 000027FB 751D jne .compare_suffix_next 1648 <1> 0 000027FD 26395D02 cmp word [es:di + ssHash], bx 0 00002801 7517 jne .compare_suffix_next 1651 <1> 0 00002803 83C704 add di, ssString 0 00002806 1E push ds 0 00002807 C576EE lds si, [bp + ?string_pointer] 0 0000280A 0376F8 add si, [bp + ?string_prefix_length] 0 0000280D 51 push cx 0 0000280E F3A6 repe cmpsb 0 00002810 59 pop cx 0 00002811 1F pop ds 0 00002812 7506 jne .compare_suffix_next 0 00002814 8956F4 mov word [bp + ?string2index], dx 1662 <1> 0 00002817 5F pop di 0 00002818 EB22 jmp .all_first_str 1665 <1> 1666 <1> .compare_suffix_next: 0 0000281A 5F pop di 1668 <1> 1669 <1> ; Refer to comment after .compare_prefix_next. 0 0000281B E8420D nearcall zz_get_symstr_length_indices.ssLength_in_cx 1671 <1> 1672 <1> ; Refer to comment before .compare_prefix_condition. 0 0000281E 01CA add dx, cx ; keep count of what index we're at 1674 <1> .compare_suffix_condition: 0 00002820 3B16[4C00] cmp dx, word [sym_storage.str.free] 0 00002824 72BC jb .compare_suffix_loop ; if not yet at free space --> 1677 <1> 1678 <1> 0 00002826 8B4EF6 mov cx, word [bp + ?string_suffix_length] 0 00002829 C47EEE les di, [bp + ?string_pointer] 0 0000282C 037EF8 add di, [bp + ?string_prefix_length] 0 0000282F 7303E9FE1E jc invaliddata 0 00002834 B400 mov ah, 0 ; initialise to ssRefCount = 0 0 00002836 E84508 nearcall zz_store_string.hash_bx 0 00002839 8946F4 mov word [bp + ?string2index], ax 1686 <1> 1687 <1> .all_first_str: 1688 <1> 1689 <1> 1690 <1> %if _ZZ_INSERT_TEMP 1691 <1> zz_insert_main_temp: 0 0000283C F6460701 testopt [bp + ?insertflags], smfBase 0 00002840 7403E90B01 jnz zz_insert_main 1694 <1> 0 00002845 8B0E[4400] mov cx, word [sym_storage.main.temp.amount] 0 00002849 89C8 mov ax, cx 0 0000284B E314 jcxz .zero 0 0000284D 0306[4200] add ax, word [sym_storage.main.temp.first] 0 00002851 7208 jc .invaliddata 0 00002853 3B06[2C00] cmp ax, word [sym_storage.main.end] 0 00002857 7231 jb .add 0 00002859 7403 je .commit_first 1703 <1> .invaliddata: 0 0000285B E9D41E jmp invaliddata 1705 <1> 1706 <1> .commit_first: 0 0000285E E88E03 nearcall zz_commit_insert 1708 <1> 1709 <1> .zero: 0 00002861 A1[2C00] mov ax, word [sym_storage.main.end] 0 00002864 89C3 mov bx, ax ; = end index (at most FFFFh) 0 00002866 8B16[2E00] mov dx, word [sym_storage.main.free] 0 0000286A 29D3 sub bx, dx ; = amount of free indexes (at most FFFFh) 0 0000286C 7503E9DF00 jz zz_insert_main 1715 <1> 1716 <1> ; The rcr is like shr unless the add before it carries. 1717 <1> ; In case of carry we want bx = 8000h. Otherwise, increment 1718 <1> ; bx by one and then divide it by two. Ultimately we want 1719 <1> ; to have an index that's half into the available space. 0 00002871 83C301 add bx, 1 ; (CY if it carries) round up 0 00002874 D1DB rcr bx, 1 ; divide amount free by 2 0 00002876 01D3 add bx, dx ; point into middle of the free indexes 0 00002878 7303E9D300 jc zz_insert_main ; (don't think this can happen) 0 0000287D 891E[4200] mov word [sym_storage.main.temp.first], bx 0 00002881 3B1E[2C00] cmp bx, word [sym_storage.main.end] 0 00002885 7203E9C600 jae zz_insert_main ; (don't think this can happen) 1727 <1> 1728 <1> .add: 0 0000288A 8B1E[4200] mov bx, word [sym_storage.main.temp.first] 0 0000288E 8B0E[4400] mov cx, word [sym_storage.main.temp.amount] 0 00002892 E320 jcxz .do 0 00002894 01CB add bx, cx 0 00002896 4B dec bx 0 00002897 53 push bx 0 00002898 50 push ax 0 00002899 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 000028A0 5F pop di 0 000028A1 07 pop es 1739 <1> 0 000028A2 8B560E mov dx, word [bp + ?linear + 2] 0 000028A5 8B460C mov ax, word [bp + ?linear] 0 000028A8 263B5502 cmp dx, word [es:di + smLinear + 2] 0 000028AC 7503 jne @F 0 000028AE 263B05 cmp ax, word [es:di + smLinear] 1745 <1> @@: 0 000028B1 72AB jb .commit_first 1747 <1> 0 000028B3 43 inc bx 1749 <1> 1750 <1> .do: 0 000028B4 FF06[4400] inc word [sym_storage.main.temp.amount] 1752 <1> 0 000028B8 3B1E[2E00] cmp bx, word [sym_storage.main.free] 0 000028BC 729D jb .invaliddata 0 000028BE 3B1E[2C00] cmp bx, word [sym_storage.main.end] 0 000028C2 7397 jae .invaliddata 0 000028C4 3B1E[4800] cmp bx, word [sym_storage.hash.free] 0 000028C8 7291 jb .invaliddata 0 000028CA 3B1E[4600] cmp bx, word [sym_storage.hash.end] 0 000028CE 738B jae .invaliddata 1761 <1> 0 000028D0 53 push bx 0 000028D1 50 push ax ; (reserve space, uninitialised) 0 000028D2 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 000028D9 5F pop di 0 000028DA 07 pop es 0 000028DB 57 push di 0 000028DC 31C0 xor ax, ax 1769 <1> %if _SYMMAINLARGE 0 000028DE B90700 mov cx, smBase >> 1 0 000028E1 F3AB rep stosw ; initialise these to zeros 0 000028E3 48 dec ax 0 000028E4 B105 mov cl, (SYMMAIN_size - smBase) >> 1 0 000028E6 F3AB rep stosw ; and these to all ones 1775 <1> %else 1776 <1> mov cx, SYMMAIN_size >> 1 1777 <1> rep stosw ; initialise SYMMAIN entry to all zeros 1778 <1> %endif 0 000028E8 5F pop di 1780 <1> 0 000028E9 FF760E push word [bp + ?linear + 2] 0 000028EC FF760C push word [bp + ?linear] 0 000028EF 268F05 pop word [es:di + smLinear] 0 000028F2 268F4502 pop word [es:di + smLinear + 2] 0 000028F6 FF760A push word [bp + ?offset + 2] 0 000028F9 FF7608 push word [bp + ?offset] 0 000028FC 268F4504 pop word [es:di + smOffset] 0 00002900 268F4506 pop word [es:di + smOffset + 2] 1789 <1> 0 00002904 8A6607 mov ah, byte [bp + ?insertflags + 1] 0 00002907 8A46FC mov al, byte [bp + ?string_hash] 0 0000290A 2689450C mov word [es:di + smFlags], ax 1793 <1> ; set smFlags and smHashByte 1794 <1> 1795 <1> %if _SYMMAINLARGE 0 0000290E A1[3000] mov ax, word [sym_storage.main.based.base] 0 00002911 2689450E mov word [es:di + smBase], ax 1798 <1> %else 1799 <1> or word [es:di + smNext], -1 1800 <1> %endif 1801 <1> 0 00002915 8B4EFA mov cx, word [bp + ?string1index] 0 00002918 26894D08 mov word [es:di + smName1], cx 0 0000291C 8B56F4 mov dx, word [bp + ?string2index] 0 0000291F 2689550A mov word [es:di + smName2], dx 1806 <1> 0 00002923 06 push es 0 00002924 57 push di 0 00002925 53 push bx 0 00002926 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 1811 <1> 0 0000292D 53 push bx 0 0000292E 50 push ax 0 0000292F E8[0000]EB02[B50D] dualcall getfarpointer.hash 0 00002936 5F pop di 0 00002937 07 pop es 1817 <1> 0 00002938 8B56FC mov dx, [bp + ?string_hash] 0 0000293B 268915 mov word [es:di + shHash], dx 0 0000293E 26834D02FF or word [es:di + shMain], -1 1821 <1> 0 00002943 06 push es 0 00002944 57 push di 0 00002945 53 push bx 0 00002946 E8[0000]EB02[3E11] dualcall save_slice_farpointer.hash 1826 <1> 0 0000294D E99602 jmp zz_insert.return 1828 <1> %endif 1829 <1> 1830 <1> zz_insert_main: 1831 <1> d1 call function_list_symbols 1832 <1> 0 00002950 E89C02 nearcall zz_commit_insert 1834 <1> 0 00002953 8B7E0E mov di, word [bp + ?linear + 2] 0 00002956 8B460C mov ax, word [bp + ?linear] 1837 <1> ; di:ax = linear address 1838 <1> 0 00002959 40 inc ax 1840 <1> %if _DWORD_LINEAR 0 0000295A 7516 jnz @F 0 0000295C 47 inc di 1843 <1> %endif 0 0000295D 7513 jnz @F 1845 <1> 0 0000295F 8B1E[2E00] mov bx, word [sym_storage.main.free] 0 00002963 53 push bx ; main index 0 00002964 50 push ax ; (reserve space, uninitialised) 0 00002965 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 0000296C 5F pop di 0 0000296D 07 pop es ; -> after last SYMMAIN entry 0 0000296E 31C9 xor cx, cx 0 00002970 EB09 jmp @FF 1854 <1> 1855 <1> @@: 1856 <1> %if _DWORD_LINEAR 0 00002972 89FA mov dx, di 0 00002974 89D1 mov cx, dx 1859 <1> %endif 0 00002976 89C3 mov bx, ax 0 00002978 E8330D nearcall binsearchmain 1862 <1> @@: 1863 <1> ; es:di -> where to insert to 1864 <1> ; bx = index of this SYMMAIN entry 0 0000297B 895EFE mov word [bp + ?main_index], bx 1866 <1> 0 0000297E A1[2E00] mov ax, word [sym_storage.main.free] 0 00002981 3906[2C00] cmp word [sym_storage.main.end], ax 0 00002985 7706 ja @F 1870 <1> 0 00002987 BA[0000] mov dx, msg.main_too_full_crit1 0 0000298A E9B21D jmp exit_error_msg 1873 <1> 1874 <1> @@: 1875 <1> 0 0000298D 53 push bx 0 0000298E 29D8 sub ax, bx ; ax = number of SYMMAIN entries after this 0 00002990 50 push ax 1879 <1> 1880 <1> 1881 <1> ; Relocate the references to the SYMMAIN 1882 <1> ; entries that are about to be moved. 1883 <1> ; 1884 <1> ; bx = first entry that is about to be moved 1885 <1> ; ax = how far to move 0 00002991 B80100 mov ax, 1 0 00002994 E85505 nearcall zz_reloc_main 1888 <1> 0 00002997 FF06[2E00] inc word [sym_storage.main.free] 1890 <1> ; indicate one more entry in use 0 0000299B 59 pop cx 1892 <1> ; cx = number of SYMMAIN entries after this 1893 <1> 0 0000299C 58 pop ax 0 0000299D 50 push ax 0 0000299E E8[0000]EB02[AE0E] dualcall move_insert_farpointer.main 1897 <1> 0 000029A5 FF76FE push word [bp + ?main_index] 0 000029A8 50 push ax ; (reserve space, uninitialised) 0 000029A9 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 000029B0 5F pop di 0 000029B1 07 pop es 0 000029B2 57 push di 0 000029B3 31C0 xor ax, ax 1905 <1> %if _SYMMAINLARGE 0 000029B5 B90700 mov cx, smBase >> 1 0 000029B8 F3AB rep stosw ; initialise these to zeros 0 000029BA 48 dec ax 0 000029BB B105 mov cl, (SYMMAIN_size - smBase) >> 1 0 000029BD F3AB rep stosw ; and these to all ones 1911 <1> %else 1912 <1> mov cx, SYMMAIN_size >> 1 1913 <1> rep stosw ; initialise SYMMAIN entry to all zeros 1914 <1> %endif 0 000029BF 5F pop di 1916 <1> 0 000029C0 FF760E push word [bp + ?linear + 2] 0 000029C3 FF760C push word [bp + ?linear] 0 000029C6 268F05 pop word [es:di + smLinear] 0 000029C9 268F4502 pop word [es:di + smLinear + 2] 0 000029CD FF760A push word [bp + ?offset + 2] 0 000029D0 FF7608 push word [bp + ?offset] 0 000029D3 268F4504 pop word [es:di + smOffset] 0 000029D7 268F4506 pop word [es:di + smOffset + 2] 1925 <1> 1926 <1> %if _SYMMAINLARGE 0 000029DB 8A6607 mov ah, byte [bp + ?insertflags + 1] 0 000029DE 8A46FC mov al, byte [bp + ?string_hash] 0 000029E1 2689450C mov word [es:di + smFlags], ax 1930 <1> ; set smFlags and smHashByte 1931 <1> 0 000029E5 A1[3000] mov ax, word [sym_storage.main.based.base] 0 000029E8 2689450E mov word [es:di + smBase], ax 1934 <1> 0 000029EC 8B5EFE mov bx, word [bp + ?main_index] 0 000029EF 06 push es 0 000029F0 57 push di 0 000029F1 53 push bx 0 000029F2 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 1940 <1> 0 000029F9 89DE mov si, bx 0 000029FB 26F6450D01 testopt [es:di + smFlags], smfBase 0 00002A00 7403E9C600 jnz .base 1944 <1> 1945 <1> .notbase: 0 00002A05 50 push ax 0 00002A06 26F6450D20 testopt [es:di + smFlags], smfBreakpoint 0 00002A0B 7433 jz .notbb 1949 <1> 0 00002A0D BB1400 mov bx, smSpecialNext 0 00002A10 8B0E[3600] mov cx, word [sym_storage.main.bb.first] 0 00002A14 8B16[3800] mov dx, word [sym_storage.main.bb.last] 1953 <1> 0 00002A18 83F9FF cmp cx, -1 0 00002A1B 7513 jne @F 0 00002A1D 83FAFF cmp dx, -1 0 00002A20 7403E90D1D jne invaliddata 0 00002A25 8936[3600] mov word [sym_storage.main.bb.first], si 0 00002A29 8936[3800] mov word [sym_storage.main.bb.last], si 0 00002A2D F9 stc 0 00002A2E EB0D jmp @FF 1962 <1> 1963 <1> @@: 0 00002A30 83FAFF cmp dx, -1 0 00002A33 7503E9FA1C je invaliddata 0 00002A38 8936[3800] mov word [sym_storage.main.bb.last], si 0 00002A3C F8 clc 1968 <1> @@: 0 00002A3D E8C000 call .linklist 1970 <1> 1971 <1> .notbb: 0 00002A40 58 pop ax 0 00002A41 BB1000 mov bx, smBaseNext 1974 <1> 0 00002A44 83F8FF cmp ax, -1 0 00002A47 7533 jne .notbase_with_base 1977 <1> 1978 <1> .notbase_without_base: 0 00002A49 8B0E[3A00] mov cx, word [sym_storage.main.nonbased.first] 0 00002A4D 8B16[3C00] mov dx, word [sym_storage.main.nonbased.last] 1981 <1> 0 00002A51 83F9FF cmp cx, -1 0 00002A54 7513 jne @F 0 00002A56 83FAFF cmp dx, -1 0 00002A59 7403E9D41C jne invaliddata 0 00002A5E 8936[3A00] mov word [sym_storage.main.nonbased.first], si 0 00002A62 8936[3C00] mov word [sym_storage.main.nonbased.last], si 0 00002A66 F9 stc 0 00002A67 EB0D jmp @FF 1990 <1> 1991 <1> @@: 0 00002A69 83FAFF cmp dx, -1 0 00002A6C 7503E9C11C je invaliddata 0 00002A71 8936[3C00] mov word [sym_storage.main.nonbased.last], si 0 00002A75 F8 clc 1996 <1> @@: 0 00002A76 E88700 call .linklist 0 00002A79 E9C500 jmp .linked 1999 <1> 2000 <1> 2001 <1> .notbase_with_base: 0 00002A7C 50 push ax 0 00002A7D 50 push ax 0 00002A7E E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002A85 5F pop di 0 00002A86 07 pop es 0 00002A87 268B09 mov cx, word [es:di + bx] 0 00002A8A 268B5102 mov dx, word [es:di + bx + 2] 2009 <1> 0 00002A8E 83F9FF cmp cx, -1 0 00002A91 751C jne @F 0 00002A93 83FAFF cmp dx, -1 0 00002A96 7403E9971C jne invaliddata 0 00002A9B 268931 mov word [es:di + bx], si 0 00002A9E 26897102 mov word [es:di + bx + 2], si 0 00002AA2 06 push es 0 00002AA3 57 push di 0 00002AA4 50 push ax 0 00002AA5 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 0 00002AAC F9 stc 0 00002AAD EB17 jmp @FF 2022 <1> 2023 <1> @@: 0 00002AAF 83FAFF cmp dx, -1 0 00002AB2 7503E97B1C je invaliddata 0 00002AB7 26897102 mov word [es:di + bx + 2], si 0 00002ABB 06 push es 0 00002ABC 57 push di 0 00002ABD 50 push ax 0 00002ABE E8[0000]EB02[3511] dualcall save_slice_farpointer.main 2031 <1> 0 00002AC5 F8 clc 2033 <1> @@: 0 00002AC6 E83700 call .linklist 0 00002AC9 EB76 jmp .linked 2036 <1> 2037 <1> 2038 <1> .base: 0 00002ACB BB1400 mov bx, smSpecialNext 0 00002ACE 8B0E[3200] mov cx, word [sym_storage.main.base.first] 0 00002AD2 8B16[3400] mov dx, word [sym_storage.main.base.last] 2042 <1> 0 00002AD6 83F9FF cmp cx, -1 0 00002AD9 7513 jne @F 0 00002ADB 83FAFF cmp dx, -1 0 00002ADE 7403E94F1C jne invaliddata 0 00002AE3 8936[3200] mov word [sym_storage.main.base.first], si 0 00002AE7 8936[3400] mov word [sym_storage.main.base.last], si 0 00002AEB F9 stc 0 00002AEC EB0D jmp @FF 2051 <1> 2052 <1> @@: 0 00002AEE 83FAFF cmp dx, -1 0 00002AF1 7503E93C1C je invaliddata 0 00002AF6 8936[3400] mov word [sym_storage.main.base.last], si 0 00002AFA F8 clc 2057 <1> @@: 0 00002AFB E80200 call .linklist 0 00002AFE EB41 jmp .linked 2060 <1> 2061 <1> 2062 <1> .linklist: 0 00002B00 7221 jc @F 0 00002B02 52 push dx 0 00002B03 50 push ax 0 00002B04 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002B0B 5F pop di 0 00002B0C 07 pop es 0 00002B0D 268339FF cmp word [es:di + bx], -1 0 00002B11 7403E91C1C jne invaliddata 0 00002B16 268931 mov word [es:di + bx], si 0 00002B19 06 push es 0 00002B1A 57 push di 0 00002B1B 52 push dx 0 00002B1C E8[0000]EB02[3511] dualcall save_slice_farpointer.main 2076 <1> 2077 <1> @@: 0 00002B23 56 push si 0 00002B24 50 push ax 0 00002B25 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002B2C 5F pop di 0 00002B2D 07 pop es 0 00002B2E 26895102 mov word [es:di + bx + 2], dx 0 00002B32 268309FF or word [es:di + bx], -1 0 00002B36 06 push es 0 00002B37 57 push di 0 00002B38 56 push si 0 00002B39 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 0 00002B40 C3 retn 2090 <1> 2091 <1> 2092 <1> .linked: 2093 <1> %else 2094 <1> mov ah, byte [bp + ?insertflags + 1] 2095 <1> mov byte [es:di + smFlags + 1], ah 2096 <1> 2097 <1> or word [es:di + smNext], -1 2098 <1> mov ax, word [bp + ?main_index] 2099 <1> mov bx, ax 2100 <1> xchg ax, word [sym_storage.main.last] 2101 <1> cmp ax, -1 2102 <1> jne @F 2103 <1> mov word [sym_storage.main.first], bx 2104 <1> jmp @FF 2105 <1> @@: 2106 <1> push es 2107 <1> push di 2108 <1> push bx 2109 <1> dualcall save_slice_farpointer.main 2110 <1> 2111 <1> push ax ; main index 2112 <1> push ax ; (reserve space, uninitialised) 2113 <1> dualcall getfarpointer.main 2114 <1> pop di 2115 <1> pop es 2116 <1> mov word [es:di + smNext], bx 2117 <1> 2118 <1> push es 2119 <1> push di 2120 <1> push ax 2121 <1> dualcall save_slice_farpointer.main 2122 <1> 2123 <1> push bx ; main index 2124 <1> push ax ; (reserve space, uninitialised) 2125 <1> dualcall getfarpointer.main 2126 <1> pop di 2127 <1> pop es 2128 <1> @@: 2129 <1> mov ax, bx 2130 <1> mov bx, [bp + ?string_hash] 2131 <1> mov byte [es:di + smHashByte], bl 2132 <1> 2133 <1> push es 2134 <1> push di 2135 <1> push ax 2136 <1> dualcall save_slice_farpointer.main 2137 <1> %endif 2138 <1> 2139 <1> 2140 <1> zz_insert_hash: 0 00002B41 8B5EFC mov bx, [bp + ?string_hash] 2142 <1> 2143 <1> d0 call function_list_hash 2144 <1> 0 00002B44 53 push bx 2146 <1> 2147 <1> %if _INSERT_HASH_AFTER 0 00002B45 43 inc bx 0 00002B46 7511 jnz @F 2150 <1> 0 00002B48 8B1E[4800] mov bx, word [sym_storage.hash.free] 0 00002B4C 53 push bx ; hash index 0 00002B4D 50 push ax ; (reserve space, uninitialised) 0 00002B4E E8[0000]EB02[B50D] dualcall getfarpointer.hash 0 00002B55 5F pop di 0 00002B56 07 pop es ; -> after last SYMHASH entry 0 00002B57 EB03 jmp @FF 2158 <1> 2159 <1> @@: 2160 <1> %endif 0 00002B59 E8EB0A nearcall binsearchhash 2162 <1> @@: 2163 <1> ; es:di -> where to insert to 2164 <1> ; bx = index at where to insert to 0 00002B5C A1[4800] mov ax, word [sym_storage.hash.free] 0 00002B5F 3906[4600] cmp word [sym_storage.hash.end], ax 0 00002B63 7706 ja @F 2168 <1> 0 00002B65 BA[0000] mov dx, msg.hash_too_full_crit1 0 00002B68 E9D41B jmp exit_error_msg 2171 <1> 2172 <1> @@: 0 00002B6B FF06[4800] inc word [sym_storage.hash.free] 2174 <1> ; indicate one more entry in use 2175 <1> 0 00002B6F 53 push bx 0 00002B70 29D8 sub ax, bx ; ax = number of SYMHASH entries after this 2178 <1> 0 00002B72 89C1 mov cx, ax ; cx = number of SYMHASH entries after this 2180 <1> 0 00002B74 58 pop ax 0 00002B75 50 push ax ; hash index 0 00002B76 50 push ax ; (reserve space, uninitialised) 2184 <1> 0 00002B77 50 push ax 0 00002B78 E8[0000]EB02[CF0E] dualcall move_insert_farpointer.hash 2187 <1> 0 00002B7F E8[0000]EB02[B50D] dualcall getfarpointer.hash 0 00002B86 5F pop di 0 00002B87 07 pop es 0 00002B88 5B pop bx 2192 <1> 0 00002B89 26891D mov word [es:di + shHash], bx 0 00002B8C FF76FE push word [bp + ?main_index] 0 00002B8F 268F4502 pop word [es:di + shMain] 2196 <1> 0 00002B93 06 push es 0 00002B94 57 push di 0 00002B95 50 push ax 0 00002B96 E8[0000]EB02[3E11] dualcall save_slice_farpointer.hash 2201 <1> 2202 <1> 2203 <1> zz_enter_string: 0 00002B9D FF76FE push word [bp + ?main_index] 0 00002BA0 50 push ax ; (reserve space, uninitialised) 0 00002BA1 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002BA8 5F pop di 0 00002BA9 07 pop es 2209 <1> 0 00002BAA 8B4EFA mov cx, word [bp + ?string1index] 0 00002BAD 26894D08 mov word [es:di + smName1], cx 0 00002BB1 8B56F4 mov dx, word [bp + ?string2index] 0 00002BB4 2689550A mov word [es:di + smName2], dx 2214 <1> 0 00002BB8 06 push es 0 00002BB9 57 push di 0 00002BBA FF76FE push word [bp + ?main_index] 0 00002BBD E8[0000]EB02[3511] dualcall save_slice_farpointer.main 2219 <1> 0 00002BC4 E82505 nearcall str_index_to_pointer 0 00002BC7 E82E05 nearcall increment_ss_ref_count 0 00002BCA 06 push es 0 00002BCB 57 push di 0 00002BCC 51 push cx 0 00002BCD E8[0000]EB02[4711] dualcall save_slice_farpointer.str 2226 <1> 0 00002BD4 89D1 mov cx, dx 0 00002BD6 E81305 nearcall str_index_to_pointer 0 00002BD9 E81C05 nearcall increment_ss_ref_count 0 00002BDC 06 push es 0 00002BDD 57 push di 0 00002BDE 51 push cx 0 00002BDF E8[0000]EB02[4711] dualcall save_slice_farpointer.str 2234 <1> 2235 <1> zz_insert.return: 0 00002BE6 89EC5D lleave 0 00002BE9 E8[0000] dualreturn 0 00002BEC CA0A00 lret 2239 <1> 2240 <1> 2241 <1> ; INP: - 2242 <1> ; CHG: - 2243 <1> zz_commit_insert: 2244 <1> %ifn _ZZ_INSERT_TEMP 2245 <1> retn 2246 <1> %else 0 00002BEF 51 push cx 2248 <1> .repeat: 0 00002BF0 8B0E[4400] mov cx, word [sym_storage.main.temp.amount] 0 00002BF4 E302 jcxz @F 0 00002BF6 EB02 jmp @FF 2252 <1> 2253 <1> @@: 0 00002BF8 59 pop cx 0 00002BF9 C3 retn 2256 <1> 2257 <1> @@: 0 00002BFA 06 push es 0 00002BFB 57 push di 0 00002BFC 56 push si 0 00002BFD 50 push ax 0 00002BFE 53 push bx 0 00002BFF 52 push dx 2264 <1> lframe 2265 <1> lvar word, main_index 2266 <1> lvar word, string_hash 2267 <1> lvar dword, linear 2268 <1> lvar dword, linearnext 0 00002C00 5589E58D66F4 lenter 0 00002C06 B80100 mov ax, 1 2271 <1> lvar word, amount 0 00002C09 50 push ax 0 00002C0A 49 dec cx 2274 <1> lvar word, tocheckamount 0 00002C0B 51 push cx 2276 <1> 0 00002C0C 8B1E[4200] mov bx, word [sym_storage.main.temp.first] 0 00002C10 53 push bx 0 00002C11 50 push ax 0 00002C12 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002C19 5F pop di 0 00002C1A 07 pop es 2283 <1> 0 00002C1B 26FF7502 push word [es:di + smLinear + 2] 0 00002C1F 26FF35 push word [es:di + smLinear] 0 00002C22 8F46F8 pop word [bp + ?linear] 0 00002C25 8F46FA pop word [bp + ?linear + 2] 2288 <1> 0 00002C28 8B7EFA mov di, word [bp + ?linear + 2] 0 00002C2B 8B46F8 mov ax, word [bp + ?linear] 2291 <1> ; di:ax = linear address 2292 <1> 0 00002C2E 40 inc ax 2294 <1> %if _DWORD_LINEAR 0 00002C2F 7516 jnz @F 0 00002C31 47 inc di 2297 <1> %endif 0 00002C32 7513 jnz @F 2299 <1> 0 00002C34 8B1E[2E00] mov bx, word [sym_storage.main.free] 0 00002C38 53 push bx ; main index 0 00002C39 50 push ax ; (reserve space, uninitialised) 0 00002C3A E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002C41 5F pop di 0 00002C42 07 pop es ; -> after last SYMMAIN entry 0 00002C43 31C9 xor cx, cx 0 00002C45 EB09 jmp @FF 2308 <1> 2309 <1> @@: 2310 <1> %if _DWORD_LINEAR 0 00002C47 89FA mov dx, di 0 00002C49 89D1 mov cx, dx 2313 <1> %endif 0 00002C4B 89C3 mov bx, ax 0 00002C4D E85E0A nearcall binsearchmain 2316 <1> @@: 2317 <1> ; es:di -> where to insert to 2318 <1> ; bx = index of this SYMMAIN entry 0 00002C50 895EFE mov word [bp + ?main_index], bx 2320 <1> 0 00002C53 3B1E[2E00] cmp bx, word [sym_storage.main.free] 0 00002C57 7208 jb .check 2323 <1> 0 00002C59 8B46F0 mov ax, [bp + ?tocheckamount] 0 00002C5C 0146F2 add word [bp + ?amount], ax 0 00002C5F EB3E jmp .do 2327 <1> 2328 <1> .check: 0 00002C61 26FF7502 push word [es:di + smLinear + 2] 0 00002C65 26FF35 push word [es:di + smLinear] 0 00002C68 8F46F4 pop word [bp + ?linearnext] 0 00002C6B 8F46F6 pop word [bp + ?linearnext + 2] 2333 <1> 0 00002C6E 837EF000 cmp word [bp + ?tocheckamount], 0 0 00002C72 742B je .do 2336 <1> 2337 <1> .loop: 2338 <1> 0 00002C74 8B16[4200] mov dx, word [sym_storage.main.temp.first] 0 00002C78 0356F2 add dx, word [bp + ?amount] 2341 <1> 0 00002C7B 52 push dx 0 00002C7C 50 push ax 0 00002C7D E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002C84 5F pop di 0 00002C85 07 pop es 2347 <1> 0 00002C86 8B56F6 mov dx, word [bp + ?linearnext + 2] 0 00002C89 8B46F4 mov ax, word [bp + ?linearnext] 0 00002C8C 263B5502 cmp dx, word [es:di + smLinear + 2] 0 00002C90 7503 jne @F 0 00002C92 263B05 cmp ax, word [es:di + smLinear] 2353 <1> @@: 0 00002C95 7608 jbe .do 2355 <1> 2356 <1> .next: 0 00002C97 FF46F2 inc word [bp + ?amount] 0 00002C9A FF4EF0 dec word [bp + ?tocheckamount] 0 00002C9D 75D5 jnz .loop 2360 <1> 2361 <1> .do: 0 00002C9F A1[2E00] mov ax, word [sym_storage.main.free] 0 00002CA2 50 push ax 0 00002CA3 0346F2 add ax, word [bp + ?amount] 0 00002CA6 7303E9871A jc invaliddata 0 00002CAB 3906[2C00] cmp word [sym_storage.main.end], ax 0 00002CAF 7303E97E1A jb invaliddata 0 00002CB4 3906[4200] cmp word [sym_storage.main.temp.first], ax 0 00002CB8 7303E9751A jb invaliddata 0 00002CBD 58 pop ax 2371 <1> 0 00002CBE 53 push bx 0 00002CBF 29D8 sub ax, bx ; ax = number of SYMMAIN entries after this 0 00002CC1 50 push ax 2375 <1> 2376 <1> 2377 <1> ; Relocate the references to the SYMMAIN 2378 <1> ; entries that are about to be moved. 2379 <1> ; 2380 <1> ; bx = first entry that is about to be moved 2381 <1> ; ax = how far to move 0 00002CC2 8B46F2 mov ax, word [bp + ?amount] 0 00002CC5 E82402 nearcall zz_reloc_main 2384 <1> 2385 <1> %if _SYMMAINLARGE 2386 <1> ; small loop for temporary smBase fields 0 00002CC8 8B46F2 mov ax, word [bp + ?amount] 0 00002CCB 8B5EFE mov bx, word [bp + ?main_index] 0 00002CCE 8B0E[4400] mov cx, word [sym_storage.main.temp.amount] 0 00002CD2 8B16[4200] mov dx, word [sym_storage.main.temp.first] 2391 <1> @@: 0 00002CD6 52 push dx 0 00002CD7 50 push ax 0 00002CD8 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002CDF 5F pop di 0 00002CE0 07 pop es 0 00002CE1 26837D0EFF cmp word [es:di + smBase], -1 0 00002CE6 7414 je @F 0 00002CE8 263B5D0E cmp bx, word [es:di + smBase] 0 00002CEC 770E ja @F 0 00002CEE 2601450E add word [es:di + smBase], ax 0 00002CF2 06 push es 0 00002CF3 57 push di 0 00002CF4 52 push dx 0 00002CF5 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 2406 <1> @@: 0 00002CFC 42 inc dx 0 00002CFD E2D7 loop @BB 2409 <1> %endif 2410 <1> 0 00002CFF 8B46F2 mov ax, word [bp + ?amount] 0 00002D02 0106[2E00] add word [sym_storage.main.free], ax 2413 <1> ; indicate more entries in use 0 00002D06 BF1800 mov di, SYMMAIN_index_size 0 00002D09 F7E7 mul di 0 00002D0B 97 xchg di, ax 0 00002D0C 87F2 xchg si, dx ; si:di = how far to move, in bytes 0 00002D0E 59 pop cx 2419 <1> ; cx = number of SYMMAIN entries after this 2420 <1> 0 00002D0F 58 pop ax 0 00002D10 50 push ax 0 00002D11 E8[0000]EB02[B30E] dualcall move_insert_farpointer.main.sidi 2424 <1> 0 00002D18 8B1E[4200] mov bx, word [sym_storage.main.temp.first] 0 00002D1C 53 push bx 0 00002D1D 8B4EF2 mov cx, word [bp + ?amount] 2428 <1> 0 00002D20 2B5EFE sub bx, word [bp + ?main_index] 0 00002D23 B81800 mov ax, SYMMAIN_index_size 0 00002D26 F7E3 mul bx 2432 <1> 0 00002D28 F7DA neg dx 0 00002D2A F7D8 neg ax 0 00002D2C 83DA00 sbb dx, byte 0 ; neg dx:ax 2436 <1> 0 00002D2F 97 xchg di, ax 0 00002D30 87F2 xchg si, dx ; si:di = how far to move, in bytes 0 00002D32 E8[0000]EB02[B30E] dualcall move_insert_farpointer.main.sidi 2440 <1> 2441 <1> 2442 <1> .finish_loop: 0 00002D39 8B5EFE mov bx, word [bp + ?main_index] 0 00002D3C 53 push bx 0 00002D3D 50 push ax ; (reserve space, uninitialised) 0 00002D3E E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002D45 5F pop di 0 00002D46 07 pop es 2449 <1> 2450 <1> %if _SYMMAINLARGE 0 00002D47 268B450E mov ax, word [es:di + smBase] 2452 <1> 0 00002D4B 89DE mov si, bx 0 00002D4D 26F6450D01 testopt [es:di + smFlags], smfBase 0 00002D52 7403E9DB19 jnz invaliddata 2456 <1> 2457 <1> .notbase: 0 00002D57 50 push ax 0 00002D58 26F6450D20 testopt [es:di + smFlags], smfBreakpoint 0 00002D5D 7433 jz .notbb 2461 <1> 0 00002D5F BB1400 mov bx, smSpecialNext 0 00002D62 8B0E[3600] mov cx, word [sym_storage.main.bb.first] 0 00002D66 8B16[3800] mov dx, word [sym_storage.main.bb.last] 2465 <1> 0 00002D6A 83F9FF cmp cx, -1 0 00002D6D 7513 jne @F 0 00002D6F 83FAFF cmp dx, -1 0 00002D72 7403E9BB19 jne invaliddata 0 00002D77 8936[3600] mov word [sym_storage.main.bb.first], si 0 00002D7B 8936[3800] mov word [sym_storage.main.bb.last], si 0 00002D7F F9 stc 0 00002D80 EB0D jmp @FF 2474 <1> 2475 <1> @@: 0 00002D82 83FAFF cmp dx, -1 0 00002D85 7503E9A819 je invaliddata 0 00002D8A 8936[3800] mov word [sym_storage.main.bb.last], si 0 00002D8E F8 clc 2480 <1> @@: 0 00002D8F E86EFD call .linklist 2482 <1> 2483 <1> .notbb: 0 00002D92 58 pop ax 0 00002D93 BB1000 mov bx, smBaseNext 2486 <1> 0 00002D96 83F8FF cmp ax, -1 0 00002D99 7532 jne .notbase_with_base 2489 <1> 2490 <1> .notbase_without_base: 0 00002D9B 8B0E[3A00] mov cx, word [sym_storage.main.nonbased.first] 0 00002D9F 8B16[3C00] mov dx, word [sym_storage.main.nonbased.last] 2493 <1> 0 00002DA3 83F9FF cmp cx, -1 0 00002DA6 7513 jne @F 0 00002DA8 83FAFF cmp dx, -1 0 00002DAB 7403E98219 jne invaliddata 0 00002DB0 8936[3A00] mov word [sym_storage.main.nonbased.first], si 0 00002DB4 8936[3C00] mov word [sym_storage.main.nonbased.last], si 0 00002DB8 F9 stc 0 00002DB9 EB0D jmp @FF 2502 <1> 2503 <1> @@: 0 00002DBB 83FAFF cmp dx, -1 0 00002DBE 7503E96F19 je invaliddata 0 00002DC3 8936[3C00] mov word [sym_storage.main.nonbased.last], si 0 00002DC7 F8 clc 2508 <1> @@: 0 00002DC8 E835FD call .linklist 0 00002DCB EB4F jmp .linked 2511 <1> 2512 <1> 2513 <1> .notbase_with_base: 0 00002DCD 50 push ax 0 00002DCE 50 push ax 0 00002DCF E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002DD6 5F pop di 0 00002DD7 07 pop es 0 00002DD8 268B09 mov cx, word [es:di + bx] 0 00002DDB 268B5102 mov dx, word [es:di + bx + 2] 2521 <1> 0 00002DDF 83F9FF cmp cx, -1 0 00002DE2 751C jne @F 0 00002DE4 83FAFF cmp dx, -1 0 00002DE7 7403E94619 jne invaliddata 0 00002DEC 268931 mov word [es:di + bx], si 0 00002DEF 26897102 mov word [es:di + bx + 2], si 0 00002DF3 06 push es 0 00002DF4 57 push di 0 00002DF5 50 push ax 0 00002DF6 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 0 00002DFD F9 stc 0 00002DFE EB17 jmp @FF 2534 <1> 2535 <1> @@: 0 00002E00 83FAFF cmp dx, -1 0 00002E03 7503E92A19 je invaliddata 0 00002E08 26897102 mov word [es:di + bx + 2], si 0 00002E0C 06 push es 0 00002E0D 57 push di 0 00002E0E 50 push ax 0 00002E0F E8[0000]EB02[3511] dualcall save_slice_farpointer.main 2543 <1> 0 00002E16 F8 clc 2545 <1> @@: 0 00002E17 E8E6FC call .linklist 0 00002E1A EB00 jmp .linked 2548 <1> 2549 <1> 2550 <1> .linklist: equ zz_insert_main.linklist 2551 <1> 2552 <1> 2553 <1> .linked: 2554 <1> %else 2555 <1> mov ax, word [bp + ?main_index] 2556 <1> mov bx, ax 2557 <1> xchg ax, word [sym_storage.main.last] 2558 <1> cmp ax, -1 2559 <1> jne @F 2560 <1> mov word [sym_storage.main.first], bx 2561 <1> jmp @FF 2562 <1> @@: 2563 <1> push ax ; main index 2564 <1> push ax ; (reserve space, uninitialised) 2565 <1> dualcall getfarpointer.main 2566 <1> pop di 2567 <1> pop es 2568 <1> mov word [es:di + smNext], bx 2569 <1> 2570 <1> push es 2571 <1> push di 2572 <1> push ax 2573 <1> dualcall save_slice_farpointer.main 2574 <1> 2575 <1> push bx ; main index 2576 <1> push ax ; (reserve space, uninitialised) 2577 <1> dualcall getfarpointer.main 2578 <1> pop di 2579 <1> pop es 2580 <1> @@: 2581 <1> %endif 2582 <1> 0 00002E1C 8B16[4200] mov dx, word [sym_storage.main.temp.first] 0 00002E20 52 push dx 0 00002E21 50 push ax 0 00002E22 E8[0000]EB02[B50D] dualcall getfarpointer.hash 0 00002E29 5F pop di 0 00002E2A 07 pop es 2589 <1> 0 00002E2B 268B1D mov bx, word [es:di + shHash] 0 00002E2E 895EFC mov word [bp + ?string_hash], bx 2592 <1> 0 00002E31 53 push bx 2594 <1> 2595 <1> %if _INSERT_HASH_AFTER 0 00002E32 43 inc bx 0 00002E33 7511 jnz @F 2598 <1> 0 00002E35 8B1E[4800] mov bx, word [sym_storage.hash.free] 0 00002E39 53 push bx ; hash index 0 00002E3A 50 push ax ; (reserve space, uninitialised) 0 00002E3B E8[0000]EB02[B50D] dualcall getfarpointer.hash 0 00002E42 5F pop di 0 00002E43 07 pop es ; -> after last SYMHASH entry 0 00002E44 EB03 jmp @FF 2606 <1> 2607 <1> @@: 2608 <1> %endif 0 00002E46 E8FE07 nearcall binsearchhash 2610 <1> @@: 2611 <1> ; es:di -> where to insert to 2612 <1> ; bx = index at where to insert to 0 00002E49 A1[4800] mov ax, word [sym_storage.hash.free] 0 00002E4C 3906[4600] cmp word [sym_storage.hash.end], ax 0 00002E50 7706 ja @F 2616 <1> 0 00002E52 BA[0000] mov dx, msg.hash_too_full_crit1 0 00002E55 E9E718 jmp exit_error_msg 2619 <1> 2620 <1> @@: 0 00002E58 FF06[4800] inc word [sym_storage.hash.free] 2622 <1> ; indicate one more entry in use 2623 <1> 0 00002E5C 53 push bx 0 00002E5D 29D8 sub ax, bx ; ax = number of SYMHASH entries after this 2626 <1> 0 00002E5F 89C1 mov cx, ax ; cx = number of SYMHASH entries after this 2628 <1> 0 00002E61 58 pop ax 0 00002E62 50 push ax ; hash index 0 00002E63 50 push ax ; (reserve space, uninitialised) 2632 <1> 0 00002E64 50 push ax 0 00002E65 E8[0000]EB02[CF0E] dualcall move_insert_farpointer.hash 2635 <1> 0 00002E6C E8[0000]EB02[B50D] dualcall getfarpointer.hash 0 00002E73 5F pop di 0 00002E74 07 pop es 0 00002E75 5B pop bx 2640 <1> 0 00002E76 26891D mov word [es:di + shHash], bx 0 00002E79 FF76FE push word [bp + ?main_index] 0 00002E7C 268F4502 pop word [es:di + shMain] 2644 <1> 0 00002E80 06 push es 0 00002E81 57 push di 0 00002E82 50 push ax 0 00002E83 E8[0000]EB02[3E11] dualcall save_slice_farpointer.hash 2649 <1> 2650 <1> 0 00002E8A FF76FE push word [bp + ?main_index] 0 00002E8D 50 push ax ; (reserve space, uninitialised) 0 00002E8E E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002E95 5F pop di 0 00002E96 07 pop es 2656 <1> 0 00002E97 268B4D08 mov cx, word [es:di + smName1] 0 00002E9B 268B550A mov dx, word [es:di + smName2] 2659 <1> 0 00002E9F 06 push es 0 00002EA0 57 push di 0 00002EA1 FF76FE push word [bp + ?main_index] 0 00002EA4 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 2664 <1> 0 00002EAB E83E02 nearcall str_index_to_pointer 0 00002EAE E84702 nearcall increment_ss_ref_count 0 00002EB1 06 push es 0 00002EB2 57 push di 0 00002EB3 51 push cx 0 00002EB4 E8[0000]EB02[4711] dualcall save_slice_farpointer.str 2671 <1> 0 00002EBB 89D1 mov cx, dx 0 00002EBD E82C02 nearcall str_index_to_pointer 0 00002EC0 E83502 nearcall increment_ss_ref_count 0 00002EC3 06 push es 0 00002EC4 57 push di 0 00002EC5 51 push cx 0 00002EC6 E8[0000]EB02[4711] dualcall save_slice_farpointer.str 2679 <1> 0 00002ECD FF46FE inc word [bp + ?main_index] 0 00002ED0 FF06[4200] inc word [sym_storage.main.temp.first] 0 00002ED4 FF0E[4400] dec word [sym_storage.main.temp.amount] 0 00002ED8 FF4EF2 dec word [bp + ?amount] 0 00002EDB 7403E959FE jnz .finish_loop 2685 <1> 0 00002EE0 89EC5D lleave 0 00002EE3 5A pop dx 0 00002EE4 5B pop bx 0 00002EE5 58 pop ax 0 00002EE6 5E pop si 0 00002EE7 5F pop di 0 00002EE8 07 pop es 0 00002EE9 E904FD jmp .repeat 2694 <1> %endif 2695 <1> 2696 <1> 2697 <1> ; Relocate references to SYMMAIN entries that are 2698 <1> ; about to be moved. (Insertion or deletion.) 2699 <1> ; 2700 <1> ; INP: bx = first moved entry (SYMMAIN array index) 2701 <1> ; ax = how far to move 2702 <1> ; (1 if inserting one, -1 if deleting one) 2703 <1> zz_reloc_main: 0 00002EEC 3B1E[2E00] cmp bx, word [sym_storage.main.free] 0 00002EF0 7203E99100 jae .retn 2706 <1> %if _SYMMAINLARGE 0 00002EF5 BE[2C0C] mov si, .symstoragefieldstable 0 00002EF8 87D3 xchg dx, bx 2709 <1> .loop_symstorage: 0 00002EFA 2E8B1C mov bx, word [cs:si] 0 00002EFD 833FFF cmp word [bx], -1 0 00002F00 7406 je @F 0 00002F02 3B17 cmp dx, word [bx] 0 00002F04 7702 ja @F 0 00002F06 0107 add word [bx], ax 2716 <1> @@: 0 00002F08 46 inc si 0 00002F09 46 inc si 0 00002F0A 81FE[3E0C] cmp si, .symstoragefieldstable.end 0 00002F0E 72EA jb .loop_symstorage 0 00002F10 87D3 xchg dx, bx 2722 <1> %else 2723 <1> ; First, references in .main.first and .main.last. 2724 <1> cmp word [sym_storage.main.first], -1 2725 <1> je @F 2726 <1> cmp bx, word [sym_storage.main.first] 2727 <1> ja @F 2728 <1> add word [sym_storage.main.first], ax 2729 <1> @@: 2730 <1> 2731 <1> cmp word [sym_storage.main.last], -1 2732 <1> je @F 2733 <1> cmp bx, word [sym_storage.main.last] 2734 <1> ja @F 2735 <1> add word [sym_storage.main.last], ax 2736 <1> @@: 2737 <1> 2738 <1> 2739 <1> ; Next, references in .main.relocate. 2740 <1> cmp word [sym_storage.main.relocate], -1 2741 <1> je @F 2742 <1> cmp bx, word [sym_storage.main.relocate] 2743 <1> ja @F 2744 <1> add word [sym_storage.main.relocate], ax 2745 <1> @@: 2746 <1> %endif 2747 <1> 2748 <1> 2749 <1> ; Next, references in smNext fields. 0 00002F12 31D2 xor dx, dx 0 00002F14 8B0E[2E00] mov cx, word [sym_storage.main.free] 0 00002F18 E342 jcxz .smnext_end 2753 <1> .smnext_loop: 0 00002F1A 52 push dx ; main index 0 00002F1B 50 push ax ; (reserve space, uninitialised) 0 00002F1C E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002F23 5F pop di 0 00002F24 07 pop es 2759 <1> %if _SYMMAINLARGE 0 00002F25 F8 clc 0 00002F26 87D3 xchg dx, bx 0 00002F28 53 push bx 0 00002F29 9C pushf 0 00002F2A BE[220C] mov si, .symmainfieldstable 2765 <1> .smnext_loop_inner: 0 00002F2D 2E8B1C mov bx, word [cs:si] 0 00002F30 268339FF cmp word [es:di + bx], -1 0 00002F34 740B je @F 0 00002F36 263B11 cmp dx, word [es:di + bx] 0 00002F39 7706 ja @F 0 00002F3B 260101 add word [es:di + bx], ax 0 00002F3E 9D popf 0 00002F3F F9 stc 0 00002F40 9C pushf 2775 <1> @@: 0 00002F41 46 inc si 0 00002F42 46 inc si 0 00002F43 81FE[2C0C] cmp si, .symmainfieldstable.end 0 00002F47 72E4 jb .smnext_loop_inner 0 00002F49 9D popf 0 00002F4A 5B pop bx 0 00002F4B 87D3 xchg dx, bx 0 00002F4D 730A jnc @F 2784 <1> %else 2785 <1> cmp word [es:di + smNext], -1 2786 <1> je @F 2787 <1> cmp bx, word [es:di + smNext] 2788 <1> ja @F 2789 <1> add word [es:di + smNext], ax 2790 <1> %endif 2791 <1> 0 00002F4F 06 push es 0 00002F50 57 push di 0 00002F51 52 push dx 0 00002F52 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 2796 <1> 2797 <1> @@: 0 00002F59 42 inc dx 0 00002F5A E2BE loop .smnext_loop 2800 <1> .smnext_end: 2801 <1> 2802 <1> 2803 <1> ; Next, references in shMain SYMHASH fields. 0 00002F5C 31F6 xor si, si 0 00002F5E 8B0E[4800] mov cx, word [sym_storage.hash.free] 0 00002F62 E322 jcxz .shmain_end 2807 <1> .shmain_loop: 0 00002F64 56 push si ; str index 0 00002F65 50 push ax ; (reserve space, uninitialised) 0 00002F66 E8[0000]EB02[B50D] dualcall getfarpointer.hash 0 00002F6D 5F pop di 0 00002F6E 07 pop es 0 00002F6F 263B5D02 cmp bx, word [es:di + shMain] 0 00002F73 770E ja @F 0 00002F75 26014502 add word [es:di + shMain], ax 2816 <1> 0 00002F79 06 push es 0 00002F7A 57 push di 0 00002F7B 56 push si 0 00002F7C E8[0000]EB02[3E11] dualcall save_slice_farpointer.hash 2821 <1> 2822 <1> @@: 0 00002F83 46 inc si 0 00002F84 E2DE loop .shmain_loop 2825 <1> .shmain_end: 2826 <1> .retn: 0 00002F86 C3 retn 2828 <1> 2829 <1> %if _SYMMAINLARGE 0 00002F87 90 align 2, nop 2831 <1> .symmainfieldstable: 0 00002F88 0E00 dw smBase 0 00002F8A 1000 dw smBaseNext 0 00002F8C 1200 dw smBasePrev 0 00002F8E 1400 dw smSpecialNext 0 00002F90 1600 dw smSpecialPrev 2837 <1> .symmainfieldstable.end: 2838 <1> 2839 <1> align 2, nop 2840 <1> .symstoragefieldstable: 0 00002F92 [3000] dw sym_storage.main.based.base 0 00002F94 [3200] dw sym_storage.main.base.first 0 00002F96 [3400] dw sym_storage.main.base.last 0 00002F98 [3600] dw sym_storage.main.bb.first 0 00002F9A [3800] dw sym_storage.main.bb.last 0 00002F9C [3A00] dw sym_storage.main.nonbased.first 0 00002F9E [3C00] dw sym_storage.main.nonbased.last 0 00002FA0 [3E00] dw sym_storage.main.reloc.first 0 00002FA2 [4000] dw sym_storage.main.reloc.last 2850 <1> .symstoragefieldstable.end: 2851 <1> %endif 2852 <1> 2853 <1> 2854 <1> ; INP: word [ss:sp + 6] = ?main_index (returned) 2855 <1> ; dword [ss:sp + 2] -> string 2856 <1> ; word [ss:sp] = length of string 2857 <1> ; bx = hash value 2858 <1> ; OUT: ax = bx = hash value 2859 <1> ; NC if a match found, 2860 <1> ; dx = SYMHASH index of match 2861 <1> ; es:di -> associated SYMMAIN entry that matched 2862 <1> ; ?main_index = SYMMAIN entry's index 2863 <1> ; CY if no more match found 2864 <1> ; 2865 <1> ; Note: This invalidates the access slice. 2866 <1> dualfunction 2867 <1> zz_match_symbol: section_of_function 0 00002FA4 BAFFFF mov dx, -1 2869 <1> 2870 <1> ; INP: word [ss:sp + 6] = ?main_index (returned) 2871 <1> ; dword [ss:sp + 2] -> string 2872 <1> ; word [ss:sp] = length of string 2873 <1> ; bx = hash value 2874 <1> ; dx = -1 if to start search 2875 <1> ; If dx != -1, 2876 <1> ; dx + 1 = next SYMHASH index to check 2877 <1> ; OUT: ax = bx = hash value 2878 <1> ; NC if another match found, 2879 <1> ; dx = SYMHASH index of match 2880 <1> ; es:di -> associated SYMMAIN entry that matched 2881 <1> ; ?main_index = SYMMAIN entry's index 2882 <1> ; CY if no more match found 2883 <1> ; 2884 <1> ; Note: This invalidates the access slice. 2885 <1> dualfunction 2886 <1> .continue: section_of_function zz_match_symbol 2887 <1> lframe dualdistance 2888 <1> lpar word, main_index 2889 <1> lpar_return 2890 <1> lpar dword, string_pointer 2891 <1> lpar word, length 0 00002FA7 5589E5 lenter 2893 <1> lvar word, string_hash 0 00002FAA 53 push bx 2895 <1> 0 00002FAB 89D8 mov ax, bx 0 00002FAD 83FAFF cmp dx, -1 0 00002FB0 7403E9AC00 jne .next_no_pop 2899 <1> 0 00002FB5 53 push bx 0 00002FB6 E88E06 nearcall binsearchhash ; es:di -> match (where to insert), bx = index 0 00002FB9 58 pop ax ; ax = hash value 0 00002FBA 89DA mov dx, bx ; dx = current index 2904 <1> .loop: 0 00002FBC 50 push ax 2906 <1> 0 00002FBD 3B16[4800] cmp dx, word [sym_storage.hash.free] 0 00002FC1 7203E99F00 jae .none ; if above-or-equal .free --> 2909 <1> 0 00002FC6 52 push dx ; hash index 0 00002FC7 50 push ax ; (reserve space, uninitialised) 0 00002FC8 E8[0000]EB02[B50D] dualcall getfarpointer.hash 0 00002FCF 5F pop di 0 00002FD0 07 pop es ; -> SYMHASH entry 2915 <1> 0 00002FD1 263905 cmp word [es:di + shHash], ax 2917 <1> ; does the hash match ? 0 00002FD4 7403E98C00 jne .none ; no. because the array is sorted, 2919 <1> ; there are no more matches --> 2920 <1> 0 00002FD9 268B4D02 mov cx, word [es:di + shMain] 0 00002FDD 894E0C mov word [bp + ?main_index], cx 0 00002FE0 51 push cx ; main index 0 00002FE1 50 push ax ; (reserve space, uninitialised) 0 00002FE2 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00002FE9 5F pop di 0 00002FEA 07 pop es ; -> SYMMAIN entry 2928 <1> 0 00002FEB 268B4D08 mov cx, word [es:di + smName1] 0 00002FEF E8FA00 nearcall str_index_to_pointer 2931 <1> ; es:di -> SYMSTR entry 2932 <1> 0 00002FF2 31C9 xor cx, cx 0 00002FF4 268A0D mov cl, byte [es:di + ssLength] 2935 <1> 0 00002FF7 3B4E06 cmp cx, word [bp + ?length] 0 00002FFA 7764 ja .next 2938 <1> 0 00002FFC 1E push ds 0 00002FFD C57608 lds si, [bp + ?string_pointer] 0 00003000 83C704 add di, ssString 0 00003003 38C0 cmp al, al ; (ZR, in case of cx = zero) 0 00003005 89C8 mov ax, cx 0 00003007 F3A6 repe cmpsb 0 00003009 1F pop ds 0 0000300A 7554 jne .next 2947 <1> 0 0000300C FF760C push word [bp + ?main_index] 0 0000300F 50 push ax ; (reserve space, uninitialised) 0 00003010 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00003017 5F pop di 0 00003018 07 pop es 0 00003019 268B4D0A mov cx, word [es:di + smName2] 0 0000301D E8CC00 nearcall str_index_to_pointer 2955 <1> ; es:di -> SYMSTR entry 2956 <1> 0 00003020 89C6 mov si, ax ; = length of smName1 0 00003022 F7D8 neg ax ; - length of smName1 0 00003024 034606 add ax, word [bp + ?length] 2960 <1> ; total length - length of smName1 0 00003027 7504 jnz @F 2962 <1> ; ax = 0 0 00003029 39C1 cmp cx, ax 0 0000302B 7422 je .match ; if remaining length of string is 0 2965 <1> ; and there is an empty smName2, match 2966 <1> @@: 2967 <1> ; ax = length of remaining string 0 0000302D 84E4 test ah, ah 0 0000302F 752F jnz .next 0 00003031 263A05 cmp al, byte [es:di + ssLength] 0 00003034 752A jne .next 2972 <1> 0 00003036 1E push ds 0 00003037 89F1 mov cx, si ; = length of smName1 0 00003039 C57608 lds si, [bp + ?string_pointer] 0 0000303C 01CE add si, cx ; -> smName2 part 0 0000303E 7303E9EF16 jc invaliddata 0 00003043 89C1 mov cx, ax ; = length of smName2 part 0 00003045 83C704 add di, ssString 0 00003048 38C0 cmp al, al ; (ZR, in case of cx = zero) 0 0000304A F3A6 repe cmpsb 0 0000304C 1F pop ds 0 0000304D 7511 jne .next 2984 <1> 2985 <1> .match: 2986 <1> ; Here we have a matching name. 0 0000304F 58 pop ax 0 00003050 FF760C push word [bp + ?main_index] 0 00003053 50 push ax ; (reserve space, uninitialised) 0 00003054 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 0000305B 5F pop di 0 0000305C 07 pop es 0 0000305D F8 clc 0 0000305E EB06 jmp .return 2995 <1> 2996 <1> .next: 0 00003060 58 pop ax 2998 <1> 2999 <1> .next_no_pop: 0 00003061 42 inc dx ; = next entry's index 0 00003062 E957FF jmp .loop 3002 <1> 3003 <1> .none: 0 00003065 F9 stc 3005 <1> .return: 0 00003066 89C3 mov bx, ax 0 00003068 89EC5D lleave 0 0000306B E8[0000] dualreturn 0 0000306E CA0600 lret 3010 <1> 3011 <1> 3012 <1> ; INP: es:di -> string to store 3013 <1> ; cx = string length (must be < 256) 3014 <1> ; ah = what to initialise ssRefCount to 3015 <1> ; OUT: ax = SYMSTR heap dword index of stored string 3016 <1> ; CHG: es, di, cx, ax, bx, dx, si 3017 <1> ; 3018 <1> ; Note: This invalidates the access slice. 3019 <1> zz_store_string: 0 00003071 1E push ds 0 00003072 06 push es 0 00003073 1F pop ds 0 00003074 89FE mov si, di 0 00003076 51 push cx 0 00003077 50 push ax 0 00003078 E8F006 nearcall zz_hash 0 0000307B 58 pop ax 0 0000307C 59 pop cx 0 0000307D 1F pop ds 3030 <1> 3031 <1> ; INP: es:di -> string to store 3032 <1> ; cx = string length (must be < 256) 3033 <1> ; ah = what to initialise ssRefCount to 3034 <1> ; bx = hash of string 3035 <1> ; OUT: ax = SYMSTR heap dword index of stored string 3036 <1> ; CHG: es, di, cx, ax, bx, dx, si 3037 <1> ; 3038 <1> ; Note: This invalidates the access slice. 3039 <1> .hash_bx: 3040 <1> lframe near 0 0000307E 5589E5 lenter 3042 <1> lvar dword, string_pointer 0 00003081 06 push es 0 00003082 57 push di 3045 <1> lvar word, string_length 0 00003083 51 push cx 3047 <1> 0 00003084 81F9FF00 cmp cx, 255 0 00003088 7606 jbe @F 3050 <1> 0 0000308A BA[0000] mov dx, msg.str_too_long 0 0000308D E9AF16 jmp exit_error_msg 3053 <1> 3054 <1> @@: 0 00003090 8B16[4A00] mov dx, word [sym_storage.str.end] 0 00003094 2B16[4C00] sub dx, word [sym_storage.str.free] 3057 <1> ; dx = number of free heap dwords 0 00003098 83C107 add cx, SYMSTR_size + 3 ; add header size and padding 3059 <1> %if SYMSTR_index_size == 4 0 0000309B D1E9 shr cx, 1 0 0000309D D1E9 shr cx, 1 ; to index 3062 <1> %else 3063 <1> %error Unexpected SYMSTR index size 3064 <1> %endif 0 0000309F 39D1 cmp cx, dx 0 000030A1 7606 jbe @F 3067 <1> 0 000030A3 BA[0000] mov dx, msg.str_too_full 0 000030A6 E99616 jmp exit_error_msg 3070 <1> 3071 <1> @@: 0 000030A9 FF36[4C00] push word [sym_storage.str.free] 3073 <1> ; = index where to insert 0 000030AD 010E[4C00] add word [sym_storage.str.free], cx 3075 <1> ; increment in-use space 0 000030B1 59 pop cx 3077 <1> lvar word, str_index 0 000030B2 51 push cx 0 000030B3 53 push bx 0 000030B4 E83500 nearcall str_index_to_pointer 0 000030B7 5B pop bx 3082 <1> 0 000030B8 57 push di 3084 <1> 0 000030B9 8B4EFA mov cx, word [bp + ?string_length] 3086 <1> 0 000030BC 51 push cx 0 000030BD 88E5 mov ch, ah ; set up ssRefCount 0 000030BF 26890D mov word [es:di + ssLength], cx 0 000030C2 59 pop cx 0 000030C3 26895D02 mov word [es:di + ssHash], bx 0 000030C7 83C704 add di, ssString 0 000030CA 1E push ds 0 000030CB C576FC lds si, [bp + ?string_pointer] 0 000030CE F3A4 rep movsb 0 000030D0 1F pop ds 3097 <1> 0 000030D1 B000 mov al, 0 3099 <1> @@: 0 000030D3 F7C70300 test di, 3 0 000030D7 7403 jz @F 0 000030D9 AA stosb 0 000030DA EBF7 jmp @B 3104 <1> @@: 3105 <1> 0 000030DC 5F pop di 0 000030DD 58 pop ax ; pop from ?str_index 3108 <1> 0 000030DE 06 push es 0 000030DF 57 push di 0 000030E0 50 push ax 0 000030E1 E8[0000]EB02[4711] dualcall save_slice_farpointer.str 3113 <1> 0 000030E8 89EC5D lleave 0 000030EB C3 retn 3116 <1> 3117 <1> 3118 <1> ; Note: This invalidates the access slice. 3119 <1> str_index_to_pointer: 0 000030EC 51 push cx ; string index 0 000030ED 50 push ax ; (reserve space, uninitialised) 0 000030EE E8[0000]EB02[CD0D] dualcall getfarpointer.str 0 000030F5 5F pop di 0 000030F6 07 pop es 0 000030F7 C3 retn 3126 <1> 3127 <1> 3128 <1> increment_ss_ref_count: 0 000030F8 26FE4501 inc byte [es:di + ssRefCount] 0 000030FC 7504 jnz @F ; if it was not -1 --> 0 000030FE 26FE4D01 dec byte [es:di + ssRefCount] 3132 <1> ; stay at -1 3133 <1> @@: 0 00003102 C3 retn 3135 <1> 3136 <1> 3137 <1> overridedef STANDALONE, 0 3138 <1> %include "binsrch.asm" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Binary search implementation 5 <2> by 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> %include "lmacros2.mac" 1 <3> [list -] 16 <2> %include "symbols.mac" 1 <3> 2 <3> %if 0 3 <3> 4 <3> Symbolic debugging macros 5 <3> by C. Masloch, 2019 6 <3> 7 <3> Usage of the works is permitted provided that this 8 <3> instrument is retained with the works, so that any entity 9 <3> that uses the works is notified of this instrument. 10 <3> 11 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 12 <3> 13 <3> %endif 14 <3> 15 <3> %ifndef __SYMBOLS_MAC__ 16 <3> %assign __SYMBOLS_MAC__ 1 17 <3> 18 <3> numdef SYMMAINLARGE, 1 19 <3> 20 <3> 21 <3> ; Note: SYMMAINs are stored as an array, which is sorted 22 <3> ; on the smLinear value. Therefore, binary search can 23 <3> ; be used to find an entry in the entire array. 24 <3> struc SYMMAIN 25 <3> smLinear: resd 1 ; linear address of symbol 26 <3> ; Currently all symbols are fully filled, with a 32-bit 27 <3> ; linear value and a 32-bit offset value. (It is of course 28 <3> ; valid to use an offset that fits in 16 bits.) 29 <3> ; Symbols without either a linear or an offset value 30 <3> ; may be supported later, in which case there would be 31 <3> ; a flag to indicate this. 32 <3> smOffset: resd 1 ; offset of symbol 33 <3> ; The following two fields are SYMSTR heap dword indices. 34 <3> ; The value 0 is special, it refers to the empty string. 35 <3> ; To simplify handling of this, the SYMSTR heap contains 36 <3> ; an actual entry with an empty string at index 0. 37 <3> smName1: resw 1 ; -> first string part 38 <3> smName2: resw 1 ; -> second string part 39 <3> smHashByte: ; (low byte of flags is truncated hash value) 40 <3> smFlags: resw 1 ; flags 41 <3> ; The following field is a SYMMAIN paragraph index. 42 <3> ; The value -1 indicates none. 43 <3> %if _SYMMAINLARGE 44 <3> smBase: ; SYMMAIN entry this one is based from 45 <3> %else 46 <3> smNext: ; SYMMAIN entry which was loaded next 47 <3> %endif 48 <3> resw 1 49 <3> alignb 16 50 <3> %if _SYMMAINLARGE 51 <3> ; smBaseNext and smBasePrev form a doubly-linked list 52 <3> ; of the entries belonging to a particular base SYMMAIN. 53 <3> ; -1 indicates no next or no previous entry. 54 <3> ; If smfBase is set then the smBaseNext contains a link 55 <3> ; to the first entry belonging to this SYMMAIN as a base, 56 <3> ; and smBasePrev links to the last entry. -1 if none. 57 <3> smBaseNext: resw 1 58 <3> smBasePrev: resw 1 59 <3> ; If smfBase is set these fields form a doubly-linked list 60 <3> ; of all SYMMAIN entries with smfBase set. 61 <3> ; If smfBreakpoint is set these fields form a doubly-linked 62 <3> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <3> ; These fields are also used by zz_relocate to remember 64 <3> ; which entries to relocate. 65 <3> smSpecialNext: resw 1 66 <3> smSpecialPrev: resw 1 67 <3> %endif 68 <3> endstruc 69 <3> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <3> %error Unexpected SYMMAIN_size 71 <3> %endif 72 <3> SYMMAIN_index_size equ SYMMAIN_size 73 <3> 74 <3> insertfDropSymHintStoreString: equ 1 75 <3> insertfExistingMask equ 0E0h 76 <3> insertfExistingDefaultSymbol equ 00h 77 <3> insertfExistingDefaultStart equ 20h 78 <3> insertfExistingBlockDiffering equ 40h 79 <3> insertfExistingBlockAll equ 60h 80 <3> insertfExistingUpdate equ 80h 81 <3> insertfExistingDuplicate equ 0A0h 82 <3> insertfExistingKeep equ 0C0h 83 <3> ; insertfExisting equ 0E0h 84 <3> smfSectionStartEnd: equ 100h 85 <3> smfBase: equ 100h 86 <3> smfAnonLabel: equ 200h 87 <3> smfSymHint: equ 400h 88 <3> smfSymHintStoreString: equ 800h 89 <3> smfPoison: equ 1000h 90 <3> smfBreakpoint: equ 2000h 91 <3> 92 <3> struc SYMSTR 93 <3> ; The following two fields are expected to be consecutive, they 94 <3> ; are accessed together as a word. (Refer to ssLength usages.) 95 <3> ssLength: resb 1 ; how long this string is (only ssString) 96 <3> ssRefCount: resb 1 ; how often this string is referenced 97 <3> ; The ssRefCount value can be: 98 <3> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <3> ; A reference may be added, incrementing the count. 100 <3> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <3> ; If all references are freed, it is expected that 102 <3> ; the count decreases to zero. 103 <3> ; A reference may be added, incrementing the count. 104 <3> ; 254 = Referenced SYMSTR, with that many references. 105 <3> ; No reference may be added, as 254 is the maximum 106 <3> ; reference count that indicates a referenced SYMSTR. 107 <3> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <3> ; times. May not be deleted unless all tables are freed. 109 <3> ; This is used by the empty string SYMSTR at index 0. 110 <3> ssHash: resw 1 ; hash value of this string 111 <3> ssString: ; actual string content 112 <3> ; Note that if the string is not dword-aligned, NUL bytes are 113 <3> ; appended to insure that the SYMSTR structure is padded to a 114 <3> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <3> ; Therefore, the size of a SYMSTR record is obtained by 116 <3> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <3> ; (Note: A terminating NUL byte is not included if the string 118 <3> ; length is dword-aligned already. The length must be used 119 <3> ; directly, not implied by a terminator.) 120 <3> endstruc 121 <3> SYMSTR_typical_size equ 28 122 <3> SYMSTR_index_size equ 4 123 <3> 124 <3> ; Note: SYMHASHs are stored as an array, which is sorted 125 <3> ; on the shHash value. Therefore, binary search can 126 <3> ; be used to find an entry in the entire array. 127 <3> ; 128 <3> ; The hash value is computed by hashing the entire name 129 <3> ; string (ie, both smName1 and smName2 string contents) 130 <3> ; with the algorithm as such: 131 <3> ; 132 <3> ; for (hash = 1, index = 0; index < length; index += 1) 133 <3> ; hash = hash * 31 + name[index]; 134 <3> struc SYMHASH 135 <3> shHash: resw 1 ; hash value 136 <3> shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <3> endstruc 138 <3> SYMHASH_index_size equ SYMHASH_size 139 <3> 140 <3> 141 <3> struc XMSMOVE 142 <3> xmsmCount: resd 1 143 <3> ; The count must be even. 144 <3> xmsmSourceHandle: resw 1 145 <3> xmsmSourceAddress: resd 1 146 <3> xmsmDestHandle: resw 1 147 <3> xmsmDestAddress: resd 1 148 <3> ; The destination and source may overlap only if a 149 <3> ; forward move would suffice to implement the 150 <3> ; operation without corrupting the data. (That is, 151 <3> ; the source starts above the destination. The XMS 152 <3> ; specification gets this detail wrong.) 153 <3> ; There is an error code for invalid overlap, but 154 <3> ; it is unclear whether this condition is detected 155 <3> ; properly by all implementations. 156 <3> endstruc 157 <3> 158 <3> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <3> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <3> 161 <3> 162 <3> %endif 17 <2> %include "nasmhash.mac" 1 <3> 2 <3> %if 0 3 <3> 4 <3> Hashing macros 5 <3> by E. C. Masloch, 2019 6 <3> 7 <3> Usage of the works is permitted provided that this 8 <3> instrument is retained with the works, so that any entity 9 <3> that uses the works is notified of this instrument. 10 <3> 11 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 12 <3> 13 <3> %endif 14 <3> 15 <3> %ifndef __NASMHASH_MAC__ 16 <3> %assign __NASMHASH_MAC__ 1 17 <3> 18 <3> 19 <3> %macro hashdef 2+.nolist 20 <3> %ifempty %2 21 <3> %assign _%1 1 22 <3> %else 23 <3> %ifstr %2 24 <3> %define %%string %2 25 <3> %elifid %2 26 <3> %defstr %%string %2 27 <3> %elifnum %2 28 <3> %defstr %%string %2 29 <3> %eliftok %2 30 <3> %defstr %%string %2 31 <3> %else 32 <3> %error Unknown input 33 <3> %endif 34 <3> %strlen %%length %%string 35 <3> %assign %%hash 1 36 <3> %assign %%index 1 37 <3> %rep %%length 38 <3> %substr %%char %%string %%index 39 <3> %assign %%hash (%%hash * 31 + %%char) & 0FFFFh 40 <3> %assign %%index %%index + 1 41 <3> %endrep 42 <3> %assign _%1 %%hash 43 <3> %endif 44 <3> %endmacro 45 <3> 46 <3> 47 <3> %endif 18 <2> 19 <2> defaulting 20 <2> numdef STANDALONE, 1 21 <2> numdef INCLUDECOMMON, 1 22 <2> numdef BUFFER_86MM_SLICE, 0 23 <2> numdef SECOND_SLICE, 1 24 <2> numdef XMS_SYMBOL_TABLE, 1 25 <2> numdef XMS_USE, 1 26 <2> numdef XMS_ONLY, 0 27 <2> excdef ! _XMS_SYMBOL_TABLE, XMS_ONLY 28 <2> numdef DEBUG1 29 <2> 30 <2> %if _STANDALONE 31 <2> %assign _PM 0 32 <2> %assign _LINK 0 33 <2> 34 <2> %idefine dualfunction comment 35 <2> %idefine dualreturn 36 <2> %idefine dualdistance near 37 <2> %imacro dualcall 1.nolist 38 <2> call %1 39 <2> %endmacro 40 <2> %imacro nearcall 1.nolist 41 <2> call %1 42 <2> %endmacro 43 <2> %imacro section_of_function 0-1.nolist 44 <2> %endmacro 45 <2> 46 <2> numdef DWORD_LINEAR, 0 47 <2> numdef WRONG_ORDERED, 0 48 <2> numdef DUPLICATE, 0 49 <2> numdef COLLISION, 0 50 <2> numdef INSERT_HASH_AFTER, 1 51 <2> 52 <2> 53 <2> %if _DWORD_LINEAR 54 <2> %define dlinear dd 55 <2> %else 56 <2> %define dlinear dw 57 <2> %endif 58 <2> 59 <2> %imacro symmainentry 2.nolist 60 <2> istruc SYMMAIN 61 <2> at smLinear, dlinear %1 62 <2> at smName1, dw (%2 - strstart) / SYMSTR_index_size 63 <2> at smName2, dw 0 64 <2> %if _SYMMAINLARGE 65 <2> at smBaseNext, times 4 dw -1 66 <2> %endif 67 <2> iend 68 <2> %endmacro 69 <2> 70 <2> %imacro symstrentry 2.nolist 71 <2> align SYMSTR_index_size 72 <2> %strlen %%length %2 73 <2> hashdef HASH, %2 74 <2> %1: 75 <2> istruc SYMSTR 76 <2> at ssLength, db %%length 77 <2> at ssRefCount, db 1 78 <2> at ssHash, dw _HASH 79 <2> at ssString, db %2 80 <2> align SYMSTR_index_size 81 <2> %pop 82 <2> %endmacro 83 <2> 84 <2> 85 <2> cpu 8086 86 <2> org 256 87 <2> %define SECTIONFIXUP -$$ +256 88 <2> 89 <2> start: 90 <2> jmp actualstart 91 <2> 92 <2> align 16, db 0 93 <2> tabstart: 94 <2> strstart: 95 <2> symstrentry empty, "" 96 <2> symstrentry alpha, "Alpha" 97 <2> symstrentry beta, "Beta" 98 <2> symstrentry gamma, "Gamma" 99 <2> symstrentry delta, "Delta" 100 <2> symstrentry epsilon, "Epsilon" 101 <2> symstrentry zeta, "Zeta" 102 <2> symstrentry eta, "Eta" 103 <2> %if _DWORD_LINEAR 104 <2> symstrentry theta, "Theta" 105 <2> %endif 106 <2> %if _WRONG_ORDERED 107 <2> symstrentry lambda, "Lambda" 108 <2> %endif 109 <2> %if _COLLISION 110 <2> symstrentry aa30, "aa30" 111 <2> symstrentry dstring.loop, "dstring.loop" 112 <2> %endif 113 <2> symstrentry omega, "Omega" 114 <2> strend: 115 <2> 116 <2> align 16, db 0 117 <2> mainstart: 118 <2> symmainentry 100h, alpha 119 <2> symmainentry 108h, beta 120 <2> %if _DUPLICATE 121 <2> symmainentry 10Ah, alpha 122 <2> %endif 123 <2> %if _COLLISION 124 <2> symmainentry 10Bh, aa30 125 <2> symmainentry 10Dh, dstring.loop 126 <2> %endif 127 <2> symmainentry 110h, gamma 128 <2> symmainentry 110h, delta 129 <2> symmainentry 120h, epsilon 130 <2> symmainentry 121h, zeta 131 <2> %if _WRONG_ORDERED 132 <2> symmainentry 0, lambda 133 <2> %endif 134 <2> %if _DWORD_LINEAR 135 <2> symmainentry 10_00ABh, eta 136 <2> symmainentry -1, theta 137 <2> %else 138 <2> symmainentry 1ABh, eta 139 <2> %endif 140 <2> mainend: 141 <2> symmainentry -1, omega 142 <2> 143 <2> align 16, db 0 144 <2> hashstart: 145 <2> times ((mainend - mainstart) / 16 * SYMHASH_size) db 0 146 <2> hashend: 147 <2> tabend: 148 <2> 149 <2> 150 <2> %if _XMS_SYMBOL_TABLE 151 <2> align 16, db 0 152 <2> zz_xms: 153 <2> .16_zeros: times 16 db 0 154 <2> align 2, db 0 155 <2> .movestruc: times XMSMOVE_size db 0 156 <2> align 4, db 0 157 <2> .entry: dq 0 158 <2> .handle: dw -1 159 <2> .transfer_address: dd XMSTABLE_TABLE_PLUS_SIZE - XMSTRANSFER_default_size 160 <2> .transfer_size: dd XMSTRANSFER_default_size 161 <2> %endif 162 <2> 163 <2> 164 <2> align 2, db 0 165 <2> sym_storage: 166 <2> %if _XMS_SYMBOL_TABLE 167 <2> .main.xms.start:dd mainstart - tabstart 168 <2> .hash.xms.start:dd hashstart - tabstart 169 <2> .str.xms.start: dd strstart - tabstart 170 <2> %endif 171 <2> %ifn _XMS_ONLY 172 <2> .main.start: dw 0, (mainstart + SECTIONFIXUP) / 16 173 <2> .hash.start: dw 0, (hashstart + SECTIONFIXUP) / 16 174 <2> .str.start: dw 0, (strstart + SECTIONFIXUP) / 16 175 <2> %endif 176 <2> .main.end: dw (mainend - mainstart) / SYMMAIN_index_size 177 <2> .main.free: dw (mainend - mainstart) / SYMMAIN_index_size 178 <2> .hash.end: dw (hashend - hashstart) / SYMHASH_index_size 179 <2> .hash.free: dw 0 180 <2> .str.end: dw (strend - strstart) / SYMSTR_index_size 181 <2> .str.free: dw (strend - strstart) / SYMSTR_index_size 182 <2> 183 <2> 184 <2> align 4, db 0 185 <2> test_range_before: 186 <2> dlinear 100h, 101h 187 <2> dlinear 100h, 108h 188 <2> dlinear 100h, 109h 189 <2> dlinear 108h, 108h 190 <2> dlinear 108h, 109h 191 <2> dlinear 109h, 109h 192 <2> dlinear 0, 1 193 <2> dlinear 0, 0 194 <2> dlinear -1, -1 195 <2> dlinear 109h, 100h 196 <2> dlinear 0, 200h 197 <2> dlinear 100h, -1 198 <2> dlinear 120h, 120h 199 <2> dlinear 120h, 121h 200 <2> dlinear 121h, 120h 201 <2> dlinear 110h, 111h 202 <2> dlinear 110h, 110h 203 <2> %if _DWORD_LINEAR 204 <2> dlinear 10_0000h, 10_0100h 205 <2> %endif 206 <2> dlinear -2, -2 207 <2> dlinear -2, -1 208 <2> .end: 209 <2> 210 <2> align 4, db 0 211 <2> test_single_after: 212 <2> dlinear 100h 213 <2> dlinear 101h 214 <2> dlinear 107h 215 <2> dlinear 108h 216 <2> dlinear 109h 217 <2> dlinear 10Fh 218 <2> dlinear 120h 219 <2> dlinear -2 220 <2> dlinear -1 221 <2> .end: 222 <2> 223 <2> %if _BUFFER_86MM_SLICE || _XMS_SYMBOL_TABLE 224 <2> align 16, db 0 225 <2> access_slice_buffer: 226 <2> .: 227 <2> times ssString + 255 db 0 228 <2> align 2, db 0 229 <2> .size: equ $ - . 230 <2> %if _SECOND_SLICE 231 <2> align 16, db 0 232 <2> second_access_slice_buffer: 233 <2> .: 234 <2> times ssString + 255 db 0 235 <2> align 2, db 0 236 <2> .size: equ $ - . 237 <2> %endif 238 <2> %endif 239 <2> 240 <2> 241 <2> actualstart: 242 <2> %ifn _XMS_ONLY 243 <2> mov ax, cs 244 <2> add word [sym_storage.main.start + 2], ax 245 <2> add word [sym_storage.hash.start + 2], ax 246 <2> add word [sym_storage.str.start + 2], ax 247 <2> %endif 248 <2> %if _XMS_SYMBOL_TABLE 249 <2> %if _XMS_USE 250 <2> clc 251 <2> %else 252 <2> stc 253 <2> %endif 254 <2> int3 255 <2> jc list_symbols 256 <2> 257 <2> mov ax, 352Fh 258 <2> int 21h 259 <2> mov ax, es 260 <2> test ax, ax 261 <2> jz .no_xms 262 <2> cmp bx, -1 263 <2> je .no_xms 264 <2> mov ax, 4300h 265 <2> int 2Fh 266 <2> cmp al, 80h 267 <2> je .got_xms 268 <2> .no_xms: 269 <2> mov dx, msg.zz_no_xms 270 <2> jmp exit_error_msg 271 <2> 272 <2> .got_xms: 273 <2> mov ax, 4310h 274 <2> int 2Fh 275 <2> mov word [zz_xms.entry], bx 276 <2> mov word [zz_xms.entry + 2], es 277 <2> 278 <2> XMSTABLE_TABLE_SIZE equ (tabend - tabstart) 279 <2> XMSTABLE_TABLE_PLUS_SIZE equ (fromkib(kib(XMSTABLE_TABLE_SIZE + fromparas(paras(ssString + 255)) + XMSTRANSFER_default_size))) 282 <2> 283 <2> mov ah, 09h 284 <2> mov dx, kib(XMSTABLE_TABLE_PLUS_SIZE) 285 <2> nearcall zz_call_xms 286 <2> dec ax 287 <2> jz @F 288 <2> 289 <2> mov dx, msg.zz_fail_xms_alloc 290 <2> jmp exit_error_msg 291 <2> 292 <2> @@: 293 <2> mov word [zz_xms.handle], dx 294 <2> 295 <2> mov si, zz_xms.movestruc 296 <2> xms_init: 297 <2> xor ax, ax 298 <2> mov bx, (XMSTABLE_TABLE_PLUS_SIZE) >> 16 299 <2> mov cx, (XMSTABLE_TABLE_PLUS_SIZE) & 0FFFFh 300 <2> 301 <2> mov word [si + xmsmDestHandle], dx ; our handle 302 <2> mov word [si + xmsmDestAddress], ax 303 <2> mov word [si + xmsmDestAddress + 2], ax 304 <2> mov word [si + xmsmSourceHandle], ax ; 86M memory 305 <2> mov word [si + xmsmSourceAddress + 2], ds 306 <2> mov word [si + xmsmSourceAddress], zz_xms.16_zeros 307 <2> mov word [si + xmsmCount], 16 308 <2> mov word [si + xmsmCount + 2], ax 309 <2> 310 <2> .loop: 311 <2> sub cx, 16 312 <2> sbb bx, 0 313 <2> jc .last 314 <2> 315 <2> nearcall call_xms_move 316 <2> 317 <2> add word [si + xmsmDestAddress], 16 318 <2> adc word [si + xmsmDestAddress + 2], 0 319 <2> 320 <2> jmp .loop 321 <2> 322 <2> .last: 323 <2> add cx, 16 324 <2> adc bx, 0 325 <2> 326 <2> jcxz @F 327 <2> mov word [si + xmsmCount], cx 328 <2> 329 <2> nearcall call_xms_move 330 <2> @@: 331 <2> 332 <2> xor ax, ax 333 <2> mov word [si + xmsmCount], (tabend - tabstart) & 0FFFFh 334 <2> %if (tabend - tabstart) >> 16 335 <2> mov word [si + xmsmCount + 2], (tabend - tabstart) >> 16 336 <2> %else 337 <2> mov word [si + xmsmCount + 2], ax 338 <2> %endif 339 <2> mov word [si + xmsmSourceHandle], ax ; 86M memory 340 <2> mov word [si + xmsmSourceAddress + 2], ds 341 <2> mov word [si + xmsmSourceAddress], tabstart ; -> tabstart 342 <2> mov word [si + xmsmDestHandle], dx ; our handle 343 <2> mov word [si + xmsmDestAddress + 2], ax 344 <2> mov word [si + xmsmDestAddress], ax ; = 0 345 <2> 346 <2> nearcall call_xms_move 347 <2> 348 <2> jmp list_symbols 349 <2> 350 <2> 351 <2> zz_call_xms: 352 <2> call far [zz_xms.entry] 353 <2> retn 354 <2> 355 <2> fail_xms_access: 356 <2> mov dx, msg.zz_fail_xms_access 357 <2> jmp exit_error_msg 358 <2> 359 <2> call_xms_move: 360 <2> push ax 361 <2> push bx 362 <2> push si 363 <2> mov si, zz_xms.movestruc 364 <2> mov ah, 0Bh 365 <2> nearcall zz_call_xms 366 <2> dec ax 367 <2> jnz fail_xms_access 368 <2> pop si 369 <2> pop bx 370 <2> pop ax 371 <2> retn 372 <2> %endif 373 <2> 374 <2> 375 <2> list_symbols: 376 <2> xor bx, bx ; (NC) 377 <2> lframe 378 <2> lenter 379 <2> lvar dword, prior 380 <2> push bx 381 <2> push bx 382 <2> mov cx, word [sym_storage.main.free] 383 <2> lvar word, flags 384 <2> pushf ; (NC) 385 <2> jcxz .done 386 <2> .loop: 387 <2> push bx ; (index) 388 <2> push ax ; (reserve space, uninitialised) 389 <2> dualcall getfarpointer.main 390 <2> pop di 391 <2> pop es 392 <2> mov dx, msg.list_first 393 <2> nearcall disp_message 394 <2> %if _DWORD_LINEAR 395 <2> mov dx, word [es:di + smLinear + 2] 396 <2> mov ax, dx 397 <2> nearcall disp_ax_hex 398 <2> %else 399 <2> xor dx, dx 400 <2> %endif 401 <2> mov ax, word [es:di + smLinear] 402 <2> nearcall disp_ax_hex 403 <2> 404 <2> cmp dx, word [bp + ?prior + 2] 405 <2> mov dx, msg.list_last_success 406 <2> jne @F 407 <2> cmp ax, word [bp + ?prior] 408 <2> @@: 409 <2> jae .success 410 <2> .error: 411 <2> popf ; (accesses ?flags) 412 <2> stc 413 <2> pushf 414 <2> mov dx, msg.list_last_error 415 <2> .success: 416 <2> %if _DWORD_LINEAR 417 <2> push word [es:di + smLinear + 2] 418 <2> pop word [bp + ?prior + 2] 419 <2> %endif 420 <2> push word [es:di + smLinear] 421 <2> pop word [bp + ?prior] 422 <2> push dx 423 <2> mov dx, msg.list_middle 424 <2> nearcall disp_message 425 <2> push bx 426 <2> dualcall displaystring 427 <2> pop dx 428 <2> nearcall disp_message 429 <2> 430 <2> inc bx ; increment index 431 <2> loop .loop 432 <2> .done: 433 <2> popf ; (accesses ?flags) 434 <2> jc invaliddata 435 <2> 436 <2> mov dx, msg.list_end 437 <2> nearcall disp_message 438 <2> 439 <2> lleave 440 <2> 441 <2> 442 <2> do_test_range_before: 443 <2> mov si, test_range_before 444 <2> .loop: 445 <2> mov dx, msg.test_first 446 <2> nearcall disp_message 447 <2> lodsw 448 <2> %if _DWORD_LINEAR 449 <2> xchg ax, di 450 <2> lodsw 451 <2> nearcall disp_ax_hex 452 <2> xchg ax, di 453 <2> %endif 454 <2> nearcall disp_ax_hex 455 <2> mov dx, msg.test_second 456 <2> nearcall disp_message 457 <2> xchg ax, bx 458 <2> lodsw 459 <2> %if _DWORD_LINEAR 460 <2> xchg ax, bx 461 <2> xchg ax, cx 462 <2> lodsw 463 <2> nearcall disp_ax_hex 464 <2> xchg ax, cx 465 <2> xchg ax, bx 466 <2> %endif 467 <2> nearcall disp_ax_hex 468 <2> xchg ax, bx 469 <2> mov dx, msg.test_third 470 <2> nearcall disp_message 471 <2> push si 472 <2> %if _DWORD_LINEAR 473 <2> mov dx, di 474 <2> %endif 475 <2> nearcall binsearchmain 476 <2> nearcall displayresult 477 <2> pop si 478 <2> cmp si, test_range_before.end 479 <2> jb .loop 480 <2> 481 <2> 482 <2> do_test_single_after: 483 <2> mov dx, msg.linebreak 484 <2> nearcall disp_message 485 <2> mov si, test_single_after 486 <2> .loop: 487 <2> mov dx, msg.test_single_after_first 488 <2> nearcall disp_message 489 <2> lodsw 490 <2> %if _DWORD_LINEAR 491 <2> xchg ax, di 492 <2> lodsw 493 <2> nearcall disp_ax_hex 494 <2> xchg ax, di 495 <2> %endif 496 <2> nearcall disp_ax_hex 497 <2> mov dx, msg.test_single_after_second 498 <2> nearcall disp_message 499 <2> 500 <2> push si 501 <2> inc ax 502 <2> %if _DWORD_LINEAR 503 <2> jnz @F 504 <2> inc di 505 <2> %endif 506 <2> jnz @F 507 <2> 508 <2> mov bx, word [sym_storage.main.free] 509 <2> push bx ; main index 510 <2> push ax ; (reserve space, uninitialised) 511 <2> dualcall getfarpointer.main 512 <2> pop di 513 <2> pop es ; -> after last SYMMAIN entry (at omega entry) 514 <2> xor cx, cx 515 <2> jmp @FF 516 <2> 517 <2> @@: 518 <2> 519 <2> %if _DWORD_LINEAR 520 <2> mov dx, di 521 <2> mov cx, dx 522 <2> %endif 523 <2> mov bx, ax 524 <2> nearcall binsearchmain 525 <2> @@: 526 <2> nearcall displayresult 527 <2> pop si 528 <2> cmp si, test_single_after.end 529 <2> jb .loop 530 <2> 531 <2> 532 <2> do_hash: 533 <2> mov dx, msg.linebreak 534 <2> nearcall disp_message 535 <2> 536 <2> xor dx, dx 537 <2> mov cx, word [sym_storage.main.free] 538 <2> test cx, cx 539 <2> jz .end 540 <2> .loop: 541 <2> push cx 542 <2> push dx 543 <2> push dx 544 <2> push ax ; (reserve space, uninitialised) 545 <2> dualcall getfarpointer.main ; set up access slice to SYMMAIN entry 546 <2> pop di 547 <2> pop es 548 <2> push ds 549 <2> nearcall getstring1 550 <2> mov si, dx 551 <2> nearcall zz_hash 552 <2> pop ds 553 <2> pop dx 554 <2> push dx 555 <2> push ax ; (reserve space, uninitialised) 556 <2> dualcall getfarpointer.main ; set up access slice to SYMMAIN entry 557 <2> pop di 558 <2> pop es 559 <2> push dx 560 <2> push ds 561 <2> nearcall getstring2 562 <2> mov si, dx 563 <2> nearcall zz_hash.bx_init 564 <2> pop ds 565 <2> 566 <2> mov dx, msg.hash_first 567 <2> nearcall disp_message 568 <2> mov ax, bx 569 <2> nearcall disp_ax_hex 570 <2> mov dx, msg.hash_second 571 <2> nearcall disp_message 572 <2> 573 <2> pop dx 574 <2> push bx 575 <2> 576 <2> push dx 577 <2> dualcall displaystring 578 <2> push dx 579 <2> mov dx, msg.hash_third 580 <2> nearcall disp_message 581 <2> pop dx 582 <2> 583 <2> pop bx 584 <2> push bx 585 <2> 586 <2> push dx 587 <2> %if _INSERT_HASH_AFTER 588 <2> inc bx 589 <2> jnz @F 590 <2> 591 <2> mov bx, word [sym_storage.hash.free] 592 <2> push bx ; hash index 593 <2> push ax ; (reserve space, uninitialised) 594 <2> dualcall getfarpointer.hash 595 <2> pop di 596 <2> pop es ; -> after last SYMHASH entry 597 <2> jmp @FF 598 <2> 599 <2> @@: 600 <2> %endif 601 <2> nearcall binsearchhash 602 <2> @@: 603 <2> pop dx 604 <2> ; es:di -> where to insert to 605 <2> ; bx = index of where to insert to 606 <2> mov ax, word [sym_storage.hash.free] 607 <2> cmp word [sym_storage.hash.end], ax 608 <2> ja @F 609 <2> 610 <2> mov dx, msg.hash_too_full 611 <2> jmp exit_error_msg 612 <2> 613 <2> @@: 614 <2> inc word [sym_storage.hash.free] 615 <2> ; indicate one more entry in use 616 <2> 617 <2> push bx 618 <2> sub ax, bx ; ax = number of SYMHASH entries after this 619 <2> 620 <2> mov cx, ax ; cx = number of SYMHASH entries after this 621 <2> 622 <2> pop ax 623 <2> push ax ; hash index 624 <2> push ax ; (reserve space, uninitialised) 625 <2> 626 <2> push ax 627 <2> dualcall move_insert_farpointer.hash 628 <2> 629 <2> dualcall getfarpointer.hash 630 <2> pop di 631 <2> pop es 632 <2> pop bx 633 <2> 634 <2> pop cx 635 <2> 636 <2> mov word [es:di + shHash], bx 637 <2> mov word [es:di + shMain], dx 638 <2> 639 <2> push es 640 <2> push di 641 <2> push ax 642 <2> dualcall save_slice_farpointer.hash 643 <2> 644 <2> inc dx 645 <2> loop .loop_jmp 646 <2> jmp .end 647 <2> 648 <2> .loop_jmp: 649 <2> jmp .loop 650 <2> 651 <2> .end: 652 <2> 653 <2> 654 <2> list_hash: 655 <2> mov dx, msg.linebreak 656 <2> nearcall disp_message 657 <2> 658 <2> mov cx, word [sym_storage.hash.free] 659 <2> xor bx, bx 660 <2> jcxz .end 661 <2> .loop: 662 <2> push bx ; hash index 663 <2> push ax ; (reserve space, uninitialised) 664 <2> dualcall getfarpointer.hash 665 <2> pop di 666 <2> pop es ; -> SYMHASH entry (access slice) 667 <2> 668 <2> mov dx, msg.list_hash_first 669 <2> nearcall disp_message 670 <2> mov ax, word [es:di + shHash] 671 <2> nearcall disp_ax_hex 672 <2> mov dx, msg.list_hash_second 673 <2> nearcall disp_message 674 <2> 675 <2> push cx 676 <2> mov cx, word [es:di + shMain] 677 <2> push cx 678 <2> dualcall displaystring 679 <2> pop cx 680 <2> mov dx, msg.list_hash_third 681 <2> nearcall disp_message 682 <2> .next: 683 <2> inc bx 684 <2> loop .loop 685 <2> .end: 686 <2> 687 <2> 688 <2> exit_normal: 689 <2> mov al, 0 690 <2> exit: 691 <2> push ss 692 <2> pop ds 693 <2> push ss 694 <2> pop es 695 <2> %if _XMS_SYMBOL_TABLE 696 <2> push ax 697 <2> cmp word [zz_xms.entry + 4], 0 698 <2> jne @F 699 <2> cmp word [zz_xms.entry + 6], 0 700 <2> jne @F 701 <2> cmp word [zz_xms.entry + 2], 0 702 <2> je @FF 703 <2> @@: 704 <2> mov dx, word [zz_xms.handle] 705 <2> cmp dx, -1 706 <2> je @F 707 <2> mov ah, 0Ah 708 <2> nearcall zz_call_xms 709 <2> @@: 710 <2> pop ax 711 <2> %endif 712 <2> mov ah, 4Ch 713 <2> int 21h 714 <2> 715 <2> 716 <2> ; INP: bx = SYMMAIN index 717 <2> ; cx = number of matching entries 718 <2> displayresult: 719 <2> jcxz .empty 720 <2> mov dx, msg.display_first 721 <2> nearcall disp_message 722 <2> jmp .first 723 <2> .loop: 724 <2> mov dx, msg.display_between 725 <2> nearcall disp_message 726 <2> .first: 727 <2> push bx 728 <2> dualcall displaystring 729 <2> .next: 730 <2> inc bx 731 <2> loop .loop 732 <2> mov dx, msg.display_last 733 <2> nearcall disp_message 734 <2> retn 735 <2> 736 <2> .empty: 737 <2> mov dx, msg.display_empty_before 738 <2> nearcall disp_message 739 <2> push bx 740 <2> dualcall displaystring 741 <2> mov dx, msg.display_empty_after 742 <2> nearcall disp_message 743 <2> retn 744 <2> 745 <2> 746 <2> %endif ; _STANDALONE 747 <2> 748 <2> 749 <2> getfarpointer: 750 <2> 751 <2> ; INP: word [ss:sp + 2] = index to access 752 <2> ; word [ss:sp] = space for returned parameter 753 <2> ; OUT: word [ss:sp + 2] = segment for access slice 754 <2> ; word [ss:sp] = offset for access slice 755 <2> ; 756 <2> ; Note: The access slice is by default read-only, and thus 757 <2> ; may point into a buffer that's re-used upon calling 758 <2> ; another farpointer function. It may also use the 759 <2> ; special symsel selector when in DPMI PM, which also 760 <2> ; is re-used upon calling another farpointer function. 761 <2> ; 762 <2> ; The function save_slice_farpointer needs to be called 763 <2> ; in order to make changes to the access slice take 764 <2> ; effect in the symbol tables. 765 <2> ; 766 <2> ; Note: This invalidates the access slice. 767 <2> dualfunction 768 <2> .main: section_of_function getfarpointer 769 <2> %if _XMS_SYMBOL_TABLE 0 00003103 833E[9C00]FF cmp word [zz_xms.handle], -1 0 00003108 7578 jne .main.xms 772 <2> %endif 773 <2> %ifn _XMS_ONLY 774 <2> lframe dualdistance 775 <2> lpar word, inp_index_out_segment 776 <2> lpar word, out_offset 777 <2> lpar_return 0 0000310A 5589E5 lenter 779 <2> lvar dword, start_pointer 0 0000310D FF36[1A00] push word [sym_storage.main.start + 2] 0 00003111 FF36[1800] push word [sym_storage.main.start] 782 <2> lvar word, orig_cx 0 00003115 51 push cx 0 00003116 B91800 mov cx, SYMMAIN_index_size 785 <2> %endif 0 00003119 EB2E jmp .common 787 <2> 788 <2> dualfunction 789 <2> .hash: section_of_function getfarpointer 790 <2> %if _XMS_SYMBOL_TABLE 0 0000311B 833E[9C00]FF cmp word [zz_xms.handle], -1 0 00003120 7571 jne .hash.xms 793 <2> %endif 794 <2> %ifn _XMS_ONLY 795 <2> lframe dualdistance, nested 796 <2> lpar word, inp_index_out_segment 797 <2> lpar word, out_offset 798 <2> lpar_return 0 00003122 5589E5 lenter 800 <2> lvar dword, start_pointer 0 00003125 FF36[1E00] push word [sym_storage.hash.start + 2] 0 00003129 FF36[1C00] push word [sym_storage.hash.start] 803 <2> lvar word, orig_cx 0 0000312D 51 push cx 0 0000312E B90400 mov cx, SYMHASH_index_size 0 00003131 EB16 jmp .common 807 <2> 808 <2> ldup 809 <2> %else 810 <2> jmp .common 811 <2> %endif 812 <2> 813 <2> dualfunction 814 <2> .str: section_of_function getfarpointer 815 <2> %if _XMS_SYMBOL_TABLE 0 00003133 833E[9C00]FF cmp word [zz_xms.handle], -1 0 00003138 756A jne .str.xms 818 <2> %endif 819 <2> %ifn _XMS_ONLY 820 <2> lframe dualdistance, nested 821 <2> lpar word, inp_index_out_segment 822 <2> lpar word, out_offset 823 <2> lpar_return 0 0000313A 5589E5 lenter 825 <2> lvar dword, start_pointer 0 0000313D FF36[2200] push word [sym_storage.str.start + 2] 0 00003141 FF36[2000] push word [sym_storage.str.start] 828 <2> lvar word, orig_cx 0 00003145 51 push cx 0 00003146 B90400 mov cx, SYMSTR_index_size 831 <2> 832 <2> ldup 833 <2> 834 <2> lleave ctx 835 <2> lleave ctx 836 <2> 837 <2> ; INP: ?inp_index_out_segment = index 838 <2> ; ?start_pointer = start far pointer of this area 839 <2> ; ?orig_cx = what to return cx to 840 <2> ; cx = index size 841 <2> .common: 0 00003149 06 push es 0 0000314A 57 push di 0 0000314B 52 push dx 0 0000314C 53 push bx 0 0000314D 50 push ax 847 <2> %if _BUFFER_86MM_SLICE 848 <2> push si 849 <2> push ds 850 <2> %if _SECOND_SLICE 851 <2> nearcall check_second_slice 852 <2> %endif 853 <2> %endif 0 0000314E 8B4608 mov ax, word [bp + ?inp_index_out_segment] 0 00003151 F7E1 mul cx ; dx:ax = byte offset 856 <2> 0 00003153 89D3 mov bx, dx 0 00003155 89C1 mov cx, ax 0 00003157 FF76FE push word [bp + ?start_pointer + 2] 0 0000315A FF76FC push word [bp + ?start_pointer] 0 0000315D E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 862 <2> %if _BUFFER_86MM_SLICE 863 <2> pop si 864 <2> %if _PM 865 <2> push word [symsel1] 866 <2> dualcall segment_to_selector 867 <2> %endif 868 <2> pop ds 869 <2> pop es ; = ds value (our data segment/selector) 870 <2> push es 871 <2> mov di, access_slice_buffer 872 <2> %if _LINK 873 <2> mov cx, access_slice_buffer.size 874 <2> wlcalc word_shr_1, equ $ - 2 875 <2> %else 876 <2> mov cx, access_slice_buffer.size >> 1 877 <2> %endif 878 <2> mov word [bp + ?out_offset], di 879 <2> mov word [bp + ?inp_index_out_segment], es 880 <2> %if _SECOND_SLICE 881 <2> push di 882 <2> rep movsw 883 <2> pop si 884 <2> pop ds 885 <2> push ds 886 <2> mov di, second_access_slice_buffer 887 <2> %if _LINK 888 <2> mov cx, second_access_slice_buffer.size 889 <2> wlcalc word_shr_1, equ $ - 2 890 <2> %else 891 <2> mov cx, second_access_slice_buffer.size >> 1 892 <2> %endif 893 <2> %endif 894 <2> rep movsw 895 <2> %else 0 00003164 8F4606 pop word [bp + ?out_offset] 897 <2> %if _PM 0 00003167 FF36[0000] push word [symsel1] 0 0000316B E8[0000]EB02[0E12] dualcall segment_to_selector 900 <2> %endif 0 00003172 8F4608 pop word [bp + ?inp_index_out_segment] 902 <2> %endif 903 <2> %if _BUFFER_86MM_SLICE 904 <2> pop ds 905 <2> pop si 906 <2> %endif 0 00003175 58 pop ax 0 00003176 5B pop bx 0 00003177 5A pop dx 0 00003178 5F pop di 0 00003179 07 pop es 0 0000317A 59 pop cx ; (pop ?orig_cx) 0 0000317B 89EC5D lleave 0 0000317E E8[0000] dualreturn 0 00003181 CB lret 916 <2> %else 917 <2> .common: 918 <2> exit_no_xms: equ $ 919 <2> mov dx, msg.zz_no_xms 920 <2> jmp exit_error_msg 921 <2> %endif 922 <2> 923 <2> %if _XMS_SYMBOL_TABLE 924 <2> ; INP: word [ss:sp + 2] = index to access 925 <2> ; word [ss:sp] = space for returned parameter 926 <2> ; OUT: word [ss:sp + 2] = segment for access slice 927 <2> ; word [ss:sp] = offset for access slice 928 <2> ; 929 <2> ; Note: The access slice is by default read-only, and thus 930 <2> ; may point into a buffer that's re-used upon calling 931 <2> ; another farpointer function. It may also use the 932 <2> ; special symsel selector when in DPMI PM, which also 933 <2> ; is re-used upon calling another farpointer function. 934 <2> ; 935 <2> ; The function save_slice_farpointer needs to be called 936 <2> ; in order to make changes to the access slice take 937 <2> ; effect in the symbol tables. 938 <2> ; 939 <2> ; Note: This invalidates the access slice. 940 <2> dualfunction 941 <2> .main.xms: section_of_function getfarpointer 942 <2> lframe dualdistance 943 <2> lpar word, inp_index_out_segment 944 <2> lpar word, out_offset 945 <2> lpar_return 0 00003182 5589E5 lenter 947 <2> lvar dword, start_pointer 0 00003185 FF36[0600] push word [sym_storage.main.xms.start + 2] 0 00003189 FF36[0400] push word [sym_storage.main.xms.start] 950 <2> lvar word, orig_cx 0 0000318D 51 push cx 0 0000318E B91800 mov cx, SYMMAIN_index_size 0 00003191 EB20 jmp .common.xms 954 <2> 955 <2> dualfunction 956 <2> .hash.xms: section_of_function getfarpointer 957 <2> lframe dualdistance, nested 958 <2> lpar word, inp_index_out_segment 959 <2> lpar word, out_offset 960 <2> lpar_return 0 00003193 5589E5 lenter 962 <2> lvar dword, start_pointer 0 00003196 FF36[0A00] push word [sym_storage.hash.xms.start + 2] 0 0000319A FF36[0800] push word [sym_storage.hash.xms.start] 965 <2> lvar word, orig_cx 0 0000319E 51 push cx 0 0000319F B90400 mov cx, SYMHASH_index_size 0 000031A2 EB0F jmp .common.xms 969 <2> 970 <2> ldup 971 <2> 972 <2> dualfunction 973 <2> .str.xms: section_of_function getfarpointer 974 <2> lframe dualdistance, nested 975 <2> lpar word, inp_index_out_segment 976 <2> lpar word, out_offset 977 <2> lpar_return 0 000031A4 5589E5 lenter 979 <2> lvar dword, start_pointer 0 000031A7 FF36[0E00] push word [sym_storage.str.xms.start + 2] 0 000031AB FF36[0C00] push word [sym_storage.str.xms.start] 982 <2> lvar word, orig_cx 0 000031AF 51 push cx 0 000031B0 B90400 mov cx, SYMSTR_index_size 985 <2> 986 <2> ldup 987 <2> 988 <2> lleave ctx 989 <2> lleave ctx 990 <2> 991 <2> ; INP: ?inp_index_out_segment = index 992 <2> ; ?start_pointer = start address of this area (in XMS block) 993 <2> ; ?orig_cx = what to return cx to 994 <2> ; cx = index size 995 <2> .common.xms: 0 000031B3 06 push es 0 000031B4 57 push di 0 000031B5 52 push dx 0 000031B6 53 push bx 0 000031B7 50 push ax 0 000031B8 56 push si 0 000031B9 1E push ds 1003 <2> %if _SECOND_SLICE 1004 <2> nearcall check_second_slice 1005 <2> %endif 1006 <2> 0 000031BA 8B4608 mov ax, word [bp + ?inp_index_out_segment] 0 000031BD F7E1 mul cx ; dx:ax = byte offset 0 000031BF 0346FC add ax, [bp + ?start_pointer] 0 000031C2 1356FE adc dx, [bp + ?start_pointer + 2] 1011 <2> 0 000031C5 FF36[9C00] push word [zz_xms.handle] 0 000031C9 8F06[7400] pop word [zz_xms.movestruc + xmsmSourceHandle] 0 000031CD A3[7600] mov word [zz_xms.movestruc + xmsmSourceAddress], ax 0 000031D0 8916[7800] mov word [zz_xms.movestruc + xmsmSourceAddress + 2], dx 0 000031D4 8326[7A00]00 and word [zz_xms.movestruc + xmsmDestHandle], 0 0 000031D9 1E push ds 1018 <2> %if _PM 0 000031DA E8[0000]EB02[3F12] dualcall selector_to_segment 1020 <2> %endif 0 000031E1 8F06[7E00] pop word [zz_xms.movestruc + xmsmDestAddress + 2] 0 000031E5 C706[7C00][0000] mov word [zz_xms.movestruc + xmsmDestAddress], access_slice_buffer 0 000031EB 8326[7200]00 and word [zz_xms.movestruc + xmsmCount + 2], 0 0 000031F0 C706[7000][0000] mov word [zz_xms.movestruc + xmsmCount], access_slice_buffer.size 1025 <2> 0 000031F6 E8[0000]EB02[4502] nearcall call_xms_move 1027 <2> 0 000031FD C74606[0000] mov word [bp + ?out_offset], access_slice_buffer 0 00003202 8C5E08 mov word [bp + ?inp_index_out_segment], ds 1030 <2> %if _SECOND_SLICE 1031 <2> mov si, access_slice_buffer 1032 <2> push ds 1033 <2> pop es 1034 <2> mov di, second_access_slice_buffer 1035 <2> %if _LINK 1036 <2> mov cx, second_access_slice_buffer.size 1037 <2> wlcalc word_shr_1, equ $ - 2 1038 <2> %else 1039 <2> mov cx, second_access_slice_buffer.size >> 1 1040 <2> %endif 1041 <2> rep movsw 1042 <2> %endif 0 00003205 1F pop ds 0 00003206 5E pop si 0 00003207 58 pop ax 0 00003208 5B pop bx 0 00003209 5A pop dx 0 0000320A 5F pop di 0 0000320B 07 pop es 0 0000320C 59 pop cx ; (pop ?orig_cx) 0 0000320D 89EC5D lleave 0 00003210 E8[0000] dualreturn 0 00003213 CB lret 1054 <2> %endif ; _XMS_SYMBOL_TABLE 1055 <2> 1056 <2> 1057 <2> %if _SECOND_SLICE && (_XMS_SYMBOL_TABLE || _BUFFER_86MM_SLICE) 1058 <2> check_second_slice: 1059 <2> push si 1060 <2> push es 1061 <2> push di 1062 <2> push cx 1063 <2> mov si, access_slice_buffer 1064 <2> push ds 1065 <2> pop es 1066 <2> mov di, second_access_slice_buffer 1067 <2> %if _LINK 1068 <2> mov cx, second_access_slice_buffer.size 1069 <2> wlcalc word_shr_1, equ $ - 2 1070 <2> %else 1071 <2> mov cx, second_access_slice_buffer.size >> 1 1072 <2> %endif 1073 <2> repe cmpsw 1074 <2> jne .error 1075 <2> pop cx 1076 <2> pop di 1077 <2> pop es 1078 <2> pop si 1079 <2> retn 1080 <2> 1081 <2> .error: 1082 <2> mov dx, msg.error_second_slice 1083 <2> jmp exit_error_msg 1084 <2> %endif 1085 <2> 1086 <2> ; INP: word [ss:sp] = start index of move (source) 1087 <2> ; cx = how much to move, in indices 1088 <2> ; si:di = how far to move, in bytes 1089 <2> ; CHG: di, es, bx, si, cx 1090 <2> ; STT: ds = data selector/segment 1091 <2> ; (used to access zz_xms.*, sym_storage.*, symsel*) 1092 <2> ; ss don't care 1093 <2> ; 1094 <2> ; Note: This moves back the content starting at the indicated 1095 <2> ; index, with the specified size, and thus frees up the 1096 <2> ; position of the start index for a new insertion. 1097 <2> ; Note: This invalidates the access slice. 1098 <2> move_insert_farpointer: 1099 <2> 1100 <2> dualfunction 1101 <2> .main: section_of_function move_insert_farpointer 0 00003214 BF1800 mov di, SYMMAIN_index_size 0 00003217 31F6 xor si, si 1104 <2> 1105 <2> dualfunction 1106 <2> .main.sidi: section_of_function move_insert_farpointer 1107 <2> %if _XMS_SYMBOL_TABLE 0 00003219 833E[9C00]FF cmp word [zz_xms.handle], -1 0 0000321E 7403E98101 jne .main.xms.sidi 1110 <2> %endif 1111 <2> %ifn _XMS_ONLY 1112 <2> lframe dualdistance 1113 <2> lpar word, index_start_move 0 00003223 5589E5 lenter 1115 <2> lvar word, orig_ax 0 00003226 50 push ax 0 00003227 B81800 mov ax, SYMMAIN_size 1118 <2> lvar word, index_size 0 0000322A 50 push ax 1120 <2> lvar dword, start_pointer 0 0000322B FF36[1A00] push word [sym_storage.main.start + 2] 0 0000322F FF36[1800] push word [sym_storage.main.start] 1123 <2> %endif 0 00003233 EB40 jmp .common 1125 <2> 1126 <2> dualfunction 1127 <2> .hash: section_of_function move_insert_farpointer 0 00003235 BF0400 mov di, SYMHASH_index_size 0 00003238 31F6 xor si, si 1130 <2> dualfunction 1131 <2> .hash.sidi: section_of_function move_insert_farpointer 1132 <2> %if _XMS_SYMBOL_TABLE 0 0000323A 833E[9C00]FF cmp word [zz_xms.handle], -1 0 0000323F 7403E97201 jne .hash.xms.sidi 1135 <2> %endif 1136 <2> %ifn _XMS_ONLY 1137 <2> lframe dualdistance, nested 1138 <2> lpar word, index_start_move 0 00003244 5589E5 lenter 1140 <2> lvar word, orig_ax 0 00003247 50 push ax 0 00003248 B80400 mov ax, SYMHASH_size 1143 <2> lvar word, index_size 0 0000324B 50 push ax 1145 <2> lvar dword, start_pointer 0 0000324C FF36[1E00] push word [sym_storage.hash.start + 2] 0 00003250 FF36[1C00] push word [sym_storage.hash.start] 0 00003254 EB1F jmp .common 1149 <2> 1150 <2> ldup 1151 <2> %else 1152 <2> jmp .common 1153 <2> %endif 1154 <2> 1155 <2> dualfunction 1156 <2> .str: section_of_function move_insert_farpointer 0 00003256 BF0400 mov di, SYMSTR_index_size 0 00003259 31F6 xor si, si 1159 <2> dualfunction 1160 <2> .str.sidi: section_of_function move_insert_farpointer 1161 <2> %if _XMS_SYMBOL_TABLE 0 0000325B 833E[9C00]FF cmp word [zz_xms.handle], -1 0 00003260 7403E96301 jne .str.xms.sidi 1164 <2> %endif 1165 <2> %ifn _XMS_ONLY 1166 <2> lframe dualdistance, nested 1167 <2> lpar word, index_start_move 0 00003265 5589E5 lenter 1169 <2> lvar word, orig_ax 0 00003268 50 push ax 0 00003269 B80400 mov ax, SYMSTR_index_size 1172 <2> lvar word, index_size 0 0000326C 50 push ax 1174 <2> lvar dword, start_pointer 0 0000326D FF36[2200] push word [sym_storage.str.start + 2] 0 00003271 FF36[2000] push word [sym_storage.str.start] 1177 <2> 1178 <2> ldup 1179 <2> 1180 <2> lleave ctx 1181 <2> lleave ctx 1182 <2> 1183 <2> .common: 1184 <2> lvar dword, how_far 0 00003275 56 push si 0 00003276 57 push di 0 00003277 1E push ds 0 00003278 52 push dx 0 00003279 50 push ax 0 0000327A F7E1 mul cx ; dx:ax = how much to move, in bytes 0 0000327C 89D3 mov bx, dx 0 0000327E 89C1 mov cx, ax ; bx:cx = how much to move 0 00003280 58 pop ax 1194 <2> 0 00003281 F76606 mul word [bp + ?index_start_move] 1196 <2> ; dx:ax = where to start moving 1197 <2> 0 00003284 91 xchg ax, cx 0 00003285 87DA xchg bx, dx 0 00003287 FF76FA push word [bp + ?start_pointer + 2] 0 0000328A FF76F8 push word [bp + ?start_pointer] 0 0000328D E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 00003294 5F pop di 1204 <2> %if _PM 0 00003295 FF36[0000] push word [symsel1] 0 00003299 E8[0000]EB02[0E12] dualcall segment_to_selector 1207 <2> %endif 0 000032A0 07 pop es ; es:di -> ?start_pointer + where to start 1209 <2> ; (source entry) 0 000032A1 91 xchg ax, cx 0 000032A2 87DA xchg bx, dx 1212 <2> 0 000032A4 8B56F6 mov dx, word [bp + ?how_far + 2] 0 000032A7 8B46F4 mov ax, word [bp + ?how_far] 0 000032AA 85D2 test dx, dx 0 000032AC 7507 jnz @F 0 000032AE 85C0 test ax, ax 0 000032B0 7503E9E100 jz .none 1219 <2> @@: 1220 <2> ; dx:ax = how far, in bytes 1221 <2> 0 000032B5 85DB test bx, bx 0 000032B7 7507 jnz @F 0 000032B9 85C9 test cx, cx 0 000032BB 7503E9D600 jz .none 1226 <2> @@: 1227 <2> 0 000032C0 53 push bx 0 000032C1 51 push cx 0 000032C2 2B4EFC sub cx, word [bp + ?index_size] 0 000032C5 83DB00 sbb bx, 0 1232 <2> 0 000032C8 06 push es 1234 <2> %if _PM 0 000032C9 E8[0000]EB02[3F12] dualcall selector_to_segment 1236 <2> %endif 0 000032D0 57 push di 0 000032D1 E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 000032D8 5F pop di 1240 <2> %if _PM 0 000032D9 FF36[0000] push word [symsel1] 0 000032DD E8[0000]EB02[0E12] dualcall segment_to_selector 1243 <2> %endif 0 000032E4 07 pop es ; start + where + length - 1 index 1245 <2> ; -> last entry of source 0 000032E5 59 pop cx 0 000032E6 5B pop bx 1248 <2> 0 000032E7 06 push es 1250 <2> %if _PM 0 000032E8 E8[0000]EB02[3F12] dualcall selector_to_segment 1252 <2> %endif 0 000032EF 57 push di 0 000032F0 87DA xchg bx, dx 0 000032F2 91 xchg cx, ax ; dx:ax = length, bx:cx = how far 0 000032F3 E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 1257 <2> ; at last source entry + how far 1258 <2> ; -> last dest entry 1259 <2> 0 000032FA 06 push es 1261 <2> %if _PM 0 000032FB E8[0000]EB02[3F12] dualcall selector_to_segment 1263 <2> %endif 0 00003302 57 push di 0 00003303 87DA xchg bx, dx 0 00003305 91 xchg cx, ax ; dx:ax = how far, bx:cx = length 0 00003306 E8[0000]EB02[1A14] dualcall normalise_pointer 0 0000330D 5E pop si 1269 <2> %if _PM 0 0000330E A1[0000] mov ax, word [symsel1] 0 00003311 8B16[0000] mov dx, word [symsel2] 0 00003315 52 push dx 0 00003316 E8[0000]EB02[0E12] dualcall segment_to_selector 1274 <2> %endif 0 0000331D 1F pop ds ; -> last source entry 1276 <2> 0 0000331E 5F pop di 1278 <2> %if _PM 0 0000331F 50 push ax 0 00003320 E8[0000]EB02[0E12] dualcall segment_to_selector 1281 <2> %endif 0 00003327 07 pop es ; -> last dest entry 1283 <2> 0 00003328 51 push cx 0 00003329 8B4EFC mov cx, word [bp + ?index_size] 0 0000332C 49 dec cx 0 0000332D 49 dec cx 0 0000332E 01CF add di, cx ; es:di -> at last word of destination 0 00003330 01CE add si, cx ; ds:si -> at last word of source 0 00003332 59 pop cx 1291 <2> 0 00003333 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 1293 <2> 1294 <2> .move_loop: 0 00003334 53 push bx 0 00003335 51 push cx 0 00003336 31DB xor bx, bx 0 00003338 31C9 xor cx, cx 0 0000333A 1E push ds 1300 <2> %if _PM 0 0000333B E8[0000]EB02[3F12] dualcall selector_to_segment 1302 <2> %endif 0 00003342 56 push si 0 00003343 E8[0000]EB02[8614] dualcall anti_normalise_pointer_with_displacement_bxcx 0 0000334A 5E pop si 1306 <2> %if _PM 0 0000334B 52 push dx 0 0000334C E8[0000]EB02[0E12] dualcall segment_to_selector 1309 <2> %endif 0 00003353 1F pop ds 0 00003354 06 push es 1312 <2> %if _PM 0 00003355 E8[0000]EB02[3F12] dualcall selector_to_segment 1314 <2> %endif 0 0000335C 57 push di 0 0000335D E8[0000]EB02[8614] dualcall anti_normalise_pointer_with_displacement_bxcx 0 00003364 5F pop di 1318 <2> %if _PM 0 00003365 50 push ax 0 00003366 E8[0000]EB02[0E12] dualcall segment_to_selector 1321 <2> %endif 0 0000336D 07 pop es 0 0000336E 59 pop cx 0 0000336F 5B pop bx 1325 <2> 0 00003370 83E9F0 sub cx, SEGTRANSFER_size 0 00003373 83DB00 sbb bx, 0 0 00003376 7209 jc .move_last 1329 <2> 0 00003378 51 push cx 0 00003379 B9F87F mov cx, SEGTRANSFER_size / 2 0 0000337C F3A5 rep movsw 0 0000337E 59 pop cx 1334 <2> 0 0000337F EBB3 jmp .move_loop 1336 <2> 1337 <2> .move_last: 0 00003381 83C1F0 add cx, SEGTRANSFER_size 0 00003384 83D300 adc bx, 0 1340 <2> 1341 <2> 1342 <2> numdef AMD_ERRATUM_109_WORKAROUND, 1 1343 <2> %if 0 1344 <2> 1345 <2> Jack R. Ellis pointed out this erratum: 1346 <2> 1347 <2> Quoting from https://www.amd.com/system/files/TechDocs/25759.pdf page 69: 1348 <2> 1349 <2> 109 Certain Reverse REP MOVS May Produce Unpredictable Behavior 1350 <2> 1351 <2> Description 1352 <2> 1353 <2> In certain situations a REP MOVS instruction may lead to 1354 <2> incorrect results. An incorrect address size, data size 1355 <2> or source operand segment may be used or a succeeding 1356 <2> instruction may be skipped. This may occur under the 1357 <2> following conditions: 1358 <2> 1359 <2> * EFLAGS.DF=1 (the string is being moved in the reverse direction). 1360 <2> 1361 <2> * The number of items being moved (RCX) is between 1 and 20. 1362 <2> 1363 <2> * The REP MOVS instruction is preceded by some microcoded instruction 1364 <2> that has not completely retired by the time the REP MOVS begins 1365 <2> execution. The set of such instructions includes BOUND, CLI, LDS, 1366 <2> LES, LFS, LGS, LSS, IDIV, and most microcoded x87 instructions. 1367 <2> 1368 <2> Potential Effect on System 1369 <2> 1370 <2> Incorrect results may be produced or the system may hang. 1371 <2> 1372 <2> Suggested Workaround 1373 <2> 1374 <2> Contact your AMD representative for information on a BIOS update. 1375 <2> 1376 <2> %endif 1377 <2> 0 00003387 D1E9 shr cx, 1 1379 <2> %if _AMD_ERRATUM_109_WORKAROUND 0 00003389 7408 jz @FF 0 0000338B 83F914 cmp cx, 20 0 0000338E 7703 ja @FF 1383 <2> @@: 0 00003390 A5 movsw 0 00003391 E2FD loop @B 1386 <2> @@: 1387 <2> %endif 0 00003393 F3A5 rep movsw 1389 <2> 1390 <2> .move_end: 0 00003395 FC cld 1392 <2> 1393 <2> .none: ; bx:cx = 0, nothing to move 0 00003396 5A pop dx 0 00003397 1F pop ds 0 00003398 8B46FE mov ax, word [bp + ?orig_ax] 0 0000339B 89EC5D lleave 0 0000339E E8[0000] dualreturn 0 000033A1 CA0200 lret 1400 <2> %else 1401 <2> .common: 1402 <2> jmp exit_no_xms 1403 <2> %endif 1404 <2> 1405 <2> %if _XMS_SYMBOL_TABLE 1406 <2> ; INP: word [ss:sp] = start index of move 1407 <2> ; cx = how much to move, in indices 1408 <2> ; si:di = how far to move, in bytes (must be even) 1409 <2> ; CHG: di, es, bx, si, cx 1410 <2> ; 1411 <2> ; Note: This moves back the content starting at the indicated 1412 <2> ; index, with the specified size, and thus frees up the 1413 <2> ; position of the start index for a new insertion. 1414 <2> ; Note: This invalidates the access slice. 1415 <2> dualfunction 1416 <2> .main.xms.sidi: section_of_function move_insert_farpointer 1417 <2> lframe dualdistance 1418 <2> lpar word, index_start_move 0 000033A4 5589E5 lenter 1420 <2> lvar word, orig_ax 0 000033A7 50 push ax 0 000033A8 B81800 mov ax, SYMMAIN_size 1423 <2> lvar word, index_size 0 000033AB 50 push ax 1425 <2> lvar dword, start_pointer 0 000033AC FF36[0600] push word [sym_storage.main.xms.start + 2] 0 000033B0 FF36[0400] push word [sym_storage.main.xms.start] 0 000033B4 EB22 jmp .common.xms 1429 <2> 1430 <2> dualfunction 1431 <2> .hash.xms.sidi: section_of_function move_insert_farpointer 1432 <2> lframe dualdistance, nested 1433 <2> lpar word, index_start_move 0 000033B6 5589E5 lenter 1435 <2> lvar word, orig_ax 0 000033B9 50 push ax 0 000033BA B80400 mov ax, SYMHASH_size 1438 <2> lvar word, index_size 0 000033BD 50 push ax 1440 <2> lvar dword, start_pointer 0 000033BE FF36[0A00] push word [sym_storage.hash.xms.start + 2] 0 000033C2 FF36[0800] push word [sym_storage.hash.xms.start] 0 000033C6 EB10 jmp .common.xms 1444 <2> 1445 <2> ldup 1446 <2> 1447 <2> dualfunction 1448 <2> .str.xms.sidi: section_of_function move_insert_farpointer 1449 <2> lframe dualdistance, nested 1450 <2> lpar word, index_start_move 0 000033C8 5589E5 lenter 1452 <2> lvar word, orig_ax 0 000033CB 50 push ax 0 000033CC B80400 mov ax, SYMSTR_index_size 1455 <2> lvar word, index_size 0 000033CF 50 push ax 1457 <2> lvar dword, start_pointer 0 000033D0 FF36[0E00] push word [sym_storage.str.xms.start + 2] 0 000033D4 FF36[0C00] push word [sym_storage.str.xms.start] 1460 <2> 1461 <2> ldup 1462 <2> 1463 <2> lleave ctx 1464 <2> lleave ctx 1465 <2> 1466 <2> .common.xms: 1467 <2> lvar dword, how_far 0 000033D8 56 push si 0 000033D9 57 push di 0 000033DA 52 push dx 1471 <2> 0 000033DB 50 push ax 0 000033DC F7E1 mul cx 0 000033DE 89D3 mov bx, dx 0 000033E0 89C1 mov cx, ax 0 000033E2 58 pop ax 1477 <2> 0 000033E3 F76606 mul word [bp + ?index_start_move] 1479 <2> 0 000033E6 0346F8 add ax, [bp + ?start_pointer] 0 000033E9 1356FA adc dx, [bp + ?start_pointer + 2] 1482 <2> ; -> first source entry 1483 <2> 0 000033EC FF36[9C00] push word [zz_xms.handle] 0 000033F0 FF36[9C00] push word [zz_xms.handle] 0 000033F4 8F06[7400] pop word [zz_xms.movestruc + xmsmSourceHandle] 0 000033F8 8F06[7A00] pop word [zz_xms.movestruc + xmsmDestHandle] 1488 <2> 1489 <2> 0 000033FC 85DB test bx, bx 0 000033FE 7504 jnz @F 0 00003400 85C9 test cx, cx 0 00003402 743C jz .none.xms 1494 <2> @@: 1495 <2> 0 00003404 01C8 add ax, cx 0 00003406 11DA adc dx, bx ; -> after last source entry 1498 <2> 0 00003408 89D6 mov si, dx 0 0000340A 89C7 mov di, ax ; si:di -> after last source entry 1501 <2> 0 0000340C 0346F4 add ax, word [bp + ?how_far] 0 0000340F 1356F6 adc dx, word [bp + ?how_far + 2] 1504 <2> ; dx:ax -> after last destination entry 1505 <2> 0 00003412 39D6 cmp si, dx 0 00003414 7504 jne @F 0 00003416 39C7 cmp di, ax 0 00003418 7426 je .none.xms 1510 <2> @@: 1511 <2> 1512 <2> .xms.move_loop: 0 0000341A 2B0E[9800] sub cx, word [zz_xms.transfer_size] 0 0000341E 1B1E[9A00] sbb bx, word [zz_xms.transfer_size + 2] 0 00003422 7211 jc .xms.move_last 1516 <2> 0 00003424 53 push bx 0 00003425 51 push cx 0 00003426 8B0E[9800] mov cx, word [zz_xms.transfer_size] 0 0000342A 8B1E[9A00] mov bx, word [zz_xms.transfer_size + 2] 0 0000342E E81C00 call .move_source_to_transfer_to_dest 0 00003431 59 pop cx 0 00003432 5B pop bx 0 00003433 EBE5 jmp .xms.move_loop 1525 <2> 1526 <2> .xms.move_last: 0 00003435 030E[9800] add cx, word [zz_xms.transfer_size] 0 00003439 131E[9A00] adc bx, word [zz_xms.transfer_size + 2] 1529 <2> 0 0000343D E80D00 call .move_source_to_transfer_to_dest 1531 <2> 1532 <2> .none.xms: ; bx:cx = 0, nothing to move 0 00003440 5A pop dx 0 00003441 8B46FE mov ax, word [bp + ?orig_ax] 0 00003444 89EC5D lleave 0 00003447 E8[0000] dualreturn 0 0000344A CA0200 lret 1538 <2> 1539 <2> 1540 <2> .move_source_to_transfer_to_dest: 0 0000344D 29C8 sub ax, cx 0 0000344F 19DA sbb dx, bx 0 00003451 29CF sub di, cx 0 00003453 19DE sbb si, bx 1545 <2> 0 00003455 893E[7600] mov word [zz_xms.movestruc + xmsmSourceAddress], di 0 00003459 8936[7800] mov word [zz_xms.movestruc + xmsmSourceAddress + 2], si 0 0000345D FF36[9600] push word [zz_xms.transfer_address + 2] 0 00003461 FF36[9400] push word [zz_xms.transfer_address] 0 00003465 8F06[7C00] pop word [zz_xms.movestruc + xmsmDestAddress] 0 00003469 8F06[7E00] pop word [zz_xms.movestruc + xmsmDestAddress + 2] 0 0000346D 891E[7200] mov word [zz_xms.movestruc + xmsmCount + 2], bx 0 00003471 890E[7000] mov word [zz_xms.movestruc + xmsmCount], cx 1554 <2> 0 00003475 E8[0000]EB02[4502] nearcall call_xms_move 1556 <2> 0 0000347C A3[7C00] mov word [zz_xms.movestruc + xmsmDestAddress], ax 0 0000347F 8916[7E00] mov word [zz_xms.movestruc + xmsmDestAddress + 2], dx 0 00003483 FF36[9600] push word [zz_xms.transfer_address + 2] 0 00003487 FF36[9400] push word [zz_xms.transfer_address] 0 0000348B 8F06[7600] pop word [zz_xms.movestruc + xmsmSourceAddress] 0 0000348F 8F06[7800] pop word [zz_xms.movestruc + xmsmSourceAddress + 2] 1563 <2> 0 00003493 E8[0000]EB02[4502] nearcall call_xms_move 0 0000349A C3 retn 1566 <2> %endif ; _XMS_SYMBOL_TABLE 1567 <2> 1568 <2> 1569 <2> ; INP: word [ss:sp + 4] = segment of access slice 1570 <2> ; word [ss:sp + 2] = offset of access slice 1571 <2> ; word [ss:sp] = index accessed by this access slice 1572 <2> ; 1573 <2> ; Note: This is used to write back from an access slice 1574 <2> ; into the symbol tables. If the access slice is 1575 <2> ; actually a far pointer directly into the tables, 1576 <2> ; this function is a no-op. This is not the case 1577 <2> ; for XMS-backed symbol tables however, which 1578 <2> ; require us to use this call to write back the entry. 1579 <2> save_slice_farpointer: 1580 <2> 1581 <2> %if _BUFFER_86MM_SLICE 1582 <2> dualfunction 1583 <2> .main: section_of_function save_slice_farpointer 1584 <2> %if _XMS_SYMBOL_TABLE 1585 <2> cmp word [zz_xms.handle], -1 1586 <2> jne .main.xms 1587 <2> %endif 1588 <2> %ifn _XMS_ONLY 1589 <2> lframe dualdistance 1590 <2> lpar word, segment 1591 <2> lpar word, offset 1592 <2> lpar word, index 1593 <2> lenter 1594 <2> lvar word, orig_cx 1595 <2> push cx 1596 <2> mov cx, SYMMAIN_index_size 1597 <2> lvar word, index_size 1598 <2> push cx 1599 <2> lvar dword, start_pointer 1600 <2> push word [sym_storage.main.start + 2] 1601 <2> push word [sym_storage.main.start] 1602 <2> push es 1603 <2> push di 1604 <2> ; mov cx, SYMMAIN_size 1605 <2> %endif 1606 <2> jmp .common 1607 <2> 1608 <2> dualfunction 1609 <2> .hash: section_of_function save_slice_farpointer 1610 <2> %if _XMS_SYMBOL_TABLE 1611 <2> cmp word [zz_xms.handle], -1 1612 <2> jne .hash.xms 1613 <2> %endif 1614 <2> %ifn _XMS_ONLY 1615 <2> lframe dualdistance, nested 1616 <2> lpar word, segment 1617 <2> lpar word, offset 1618 <2> lpar word, index 1619 <2> lenter 1620 <2> lvar word, orig_cx 1621 <2> push cx 1622 <2> mov cx, SYMHASH_index_size 1623 <2> lvar word, index_size 1624 <2> push cx 1625 <2> lvar dword, start_pointer 1626 <2> push word [sym_storage.hash.start + 2] 1627 <2> push word [sym_storage.hash.start] 1628 <2> push es 1629 <2> push di 1630 <2> ; mov cx, SYMHASH_size 1631 <2> jmp .common 1632 <2> 1633 <2> ldup 1634 <2> %else 1635 <2> jmp .common 1636 <2> %endif 1637 <2> 1638 <2> ; Note: This saves one SYMSTR entry. To save more, 1639 <2> ; the size to be saved would have to be passed. 1640 <2> dualfunction 1641 <2> .str: section_of_function save_slice_farpointer 1642 <2> %if _XMS_SYMBOL_TABLE 1643 <2> cmp word [zz_xms.handle], -1 1644 <2> jne .str.xms 1645 <2> %endif 1646 <2> %ifn _XMS_ONLY 1647 <2> lframe dualdistance, nested 1648 <2> lpar word, segment 1649 <2> lpar word, offset 1650 <2> lpar word, index 1651 <2> lenter 1652 <2> lvar word, orig_cx 1653 <2> push cx 1654 <2> mov cx, SYMSTR_index_size 1655 <2> lvar word, index_size 1656 <2> push cx 1657 <2> lvar dword, start_pointer 1658 <2> push word [sym_storage.str.start + 2] 1659 <2> push word [sym_storage.str.start] 1660 <2> push es 1661 <2> push di 1662 <2> les di, [bp + ?offset] 1663 <2> nearcall zz_get_symstr_length_bytes 1664 <2> 1665 <2> ldup 1666 <2> 1667 <2> lleave ctx 1668 <2> lleave ctx 1669 <2> 1670 <2> ; INP: ?segment = segment of access slice 1671 <2> ; ?offset = offset of access slice 1672 <2> ; ?index 1673 <2> ; ?index_size 1674 <2> ; ?start_pointer -> table 1675 <2> ; cx = how many bytes to save to table 1676 <2> .common: 1677 <2> push ds 1678 <2> push si 1679 <2> push dx 1680 <2> push bx 1681 <2> push ax 1682 <2> mov ax, word [bp + ?index] 1683 <2> mul word [bp + ?index_size] 1684 <2> ; dx:ax = byte offset 1685 <2> 1686 <2> push cx 1687 <2> mov bx, dx 1688 <2> mov cx, ax 1689 <2> push word [bp + ?start_pointer + 2] 1690 <2> push word [bp + ?start_pointer] 1691 <2> dualcall normalise_pointer_with_displacement_bxcx 1692 <2> pop di 1693 <2> %if _PM 1694 <2> push word [symsel1] 1695 <2> dualcall segment_to_selector 1696 <2> %endif 1697 <2> pop es ; es:di -> destination in table 1698 <2> pop cx ; cx = size to save 1699 <2> mov ds, [bp + ?segment] 1700 <2> mov si, [bp + ?offset] ; ds:si -> buffer 1701 <2> %if _SECOND_SLICE 1702 <2> push si 1703 <2> push cx 1704 <2> shr cx, 1 1705 <2> rep movsw 1706 <2> jnc @F 1707 <2> movsb 1708 <2> @@: 1709 <2> pop cx 1710 <2> pop si 1711 <2> push ds 1712 <2> pop es 1713 <2> mov di, second_access_slice_buffer 1714 <2> %endif 1715 <2> shr cx, 1 1716 <2> rep movsw 1717 <2> jnc @F 1718 <2> movsb 1719 <2> @@: 1720 <2> pop ax 1721 <2> pop bx 1722 <2> pop dx 1723 <2> pop si 1724 <2> pop ds 1725 <2> pop di 1726 <2> pop es 1727 <2> 1728 <2> mov cx, word [bp + ?orig_cx] 1729 <2> lleave 1730 <2> dualreturn 1731 <2> lret 1732 <2> %else 1733 <2> .common: 1734 <2> jmp exit_no_xms 1735 <2> %endif 1736 <2> 1737 <2> %else ; _BUFFER_86MM_SLICE 1738 <2> dualfunction 1739 <2> .main: section_of_function save_slice_farpointer 1740 <2> %if _XMS_SYMBOL_TABLE 0 0000349B 833E[9C00]FF cmp word [zz_xms.handle], -1 0 000034A0 751C jne .main.xms 0 000034A2 EB10 jmp .common.nop 1744 <2> %endif 1745 <2> dualfunction 1746 <2> .hash: section_of_function save_slice_farpointer 1747 <2> %if _XMS_SYMBOL_TABLE 0 000034A4 833E[9C00]FF cmp word [zz_xms.handle], -1 0 000034A9 7527 jne .hash.xms 0 000034AB EB07 jmp .common.nop 1751 <2> %endif 1752 <2> dualfunction 1753 <2> .str: section_of_function save_slice_farpointer 1754 <2> %if _XMS_SYMBOL_TABLE 0 000034AD 833E[9C00]FF cmp word [zz_xms.handle], -1 0 000034B2 7532 jne .str.xms 1757 <2> %endif 1758 <2> .common.nop: 1759 <2> %ifn _XMS_ONLY 1760 <2> lframe dualdistance 1761 <2> lpar word, segment 1762 <2> lpar word, offset 1763 <2> lpar word, index 0 000034B4 5589E5 lenter 0 000034B7 5D lleave 0 000034B8 E8[0000] dualreturn 0 000034BB CA0600 lret 1768 <2> %else 1769 <2> jmp exit_no_xms 1770 <2> %endif 1771 <2> %endif 1772 <2> 1773 <2> 1774 <2> %if _XMS_SYMBOL_TABLE 1775 <2> ; INP: word [ss:sp + 4] = segment of access slice 1776 <2> ; word [ss:sp + 2] = offset of access slice 1777 <2> ; word [ss:sp] = index accessed by this access slice 1778 <2> ; 1779 <2> ; Note: This is used to write back from an access slice 1780 <2> ; into the symbol tables. If the access slice is 1781 <2> ; actually a far pointer directly into the tables, 1782 <2> ; this function is a no-op. This is not the case 1783 <2> ; for XMS-backed symbol tables however, which 1784 <2> ; require us to use this call to write back the entry. 1785 <2> 1786 <2> dualfunction 1787 <2> .main.xms: section_of_function save_slice_farpointer 1788 <2> lframe dualdistance 1789 <2> lpar word, segment 1790 <2> lpar word, offset 1791 <2> lpar word, index 0 000034BE 5589E5 lenter 1793 <2> lvar word, orig_cx 0 000034C1 51 push cx 0 000034C2 B91800 mov cx, SYMMAIN_index_size 1796 <2> lvar word, index_size 0 000034C5 51 push cx 1798 <2> lvar dword, start_pointer 0 000034C6 FF36[0600] push word [sym_storage.main.xms.start + 2] 0 000034CA FF36[0400] push word [sym_storage.main.xms.start] 0 000034CE 06 push es 0 000034CF 57 push di 1803 <2> ; mov cx, SYMMAIN_size 0 000034D0 EB2C jmp .common.xms 1805 <2> 1806 <2> dualfunction 1807 <2> .hash.xms: section_of_function save_slice_farpointer 1808 <2> lframe dualdistance, nested 1809 <2> lpar word, segment 1810 <2> lpar word, offset 1811 <2> lpar word, index 0 000034D2 5589E5 lenter 1813 <2> lvar word, orig_cx 0 000034D5 51 push cx 0 000034D6 B90400 mov cx, SYMHASH_index_size 1816 <2> lvar word, index_size 0 000034D9 51 push cx 1818 <2> lvar dword, start_pointer 0 000034DA FF36[0A00] push word [sym_storage.hash.xms.start + 2] 0 000034DE FF36[0800] push word [sym_storage.hash.xms.start] 0 000034E2 06 push es 0 000034E3 57 push di 1823 <2> ; mov cx, SYMHASH_size 0 000034E4 EB18 jmp .common.xms 1825 <2> 1826 <2> ldup 1827 <2> 1828 <2> ; Note: This saves one SYMSTR entry. To save more, 1829 <2> ; the size to be saved would have to be passed. 1830 <2> dualfunction 1831 <2> .str.xms: section_of_function save_slice_farpointer 1832 <2> lframe dualdistance, nested 1833 <2> lpar word, segment 1834 <2> lpar word, offset 1835 <2> lpar word, index 0 000034E6 5589E5 lenter 1837 <2> lvar word, orig_cx 0 000034E9 51 push cx 0 000034EA B90400 mov cx, SYMSTR_index_size 1840 <2> lvar word, index_size 0 000034ED 51 push cx 1842 <2> lvar dword, start_pointer 0 000034EE FF36[0E00] push word [sym_storage.str.xms.start + 2] 0 000034F2 FF36[0C00] push word [sym_storage.str.xms.start] 0 000034F6 06 push es 0 000034F7 57 push di 0 000034F8 C47E08 les di, [bp + ?offset] 0 000034FB E86A00 nearcall zz_get_symstr_length_bytes 1849 <2> 1850 <2> ldup 1851 <2> 1852 <2> lleave ctx 1853 <2> lleave ctx 1854 <2> 1855 <2> ; INP: ?segment = segment of access slice 1856 <2> ; ?offset = offset of access slice 1857 <2> ; ?index 1858 <2> ; ?index_size 1859 <2> ; ?start_pointer -> table 1860 <2> ; cx = how many bytes to save to table 1861 <2> .common.xms: 0 000034FE 1E push ds 0 000034FF 56 push si 0 00003500 52 push dx 0 00003501 53 push bx 0 00003502 50 push ax 1867 <2> 0 00003503 8B4606 mov ax, word [bp + ?index] 0 00003506 F766FC mul word [bp + ?index_size] 0 00003509 0346F8 add ax, word [bp + ?start_pointer] 0 0000350C 1356FA adc dx, word [bp + ?start_pointer + 2] 1872 <2> ; dx:ax = byte offset 1873 <2> 0 0000350F FF760A push word [bp + ?segment] 1875 <2> %if _PM 0 00003512 E8[0000]EB02[3F12] dualcall selector_to_segment 1877 <2> %endif 0 00003519 FF7608 push word [bp + ?offset]; -> buffer 0 0000351C 8326[7400]00 and word [zz_xms.movestruc + xmsmSourceHandle], 0 0 00003521 8F06[7600] pop word [zz_xms.movestruc + xmsmSourceAddress] 0 00003525 8F06[7800] pop word [zz_xms.movestruc + xmsmSourceAddress + 2] 1882 <2> 0 00003529 FF36[9C00] push word [zz_xms.handle] 0 0000352D 8F06[7A00] pop word [zz_xms.movestruc + xmsmDestHandle] 0 00003531 A3[7C00] mov word [zz_xms.movestruc + xmsmDestAddress], ax 0 00003534 8916[7E00] mov word [zz_xms.movestruc + xmsmDestAddress + 2], dx 0 00003538 8326[7200]00 and word [zz_xms.movestruc + xmsmCount + 2], 0 0 0000353D 890E[7000] mov word [zz_xms.movestruc + xmsmCount], cx 1889 <2> 0 00003541 E8[0000]EB02[4502] nearcall call_xms_move 1891 <2> 1892 <2> %if _SECOND_SLICE 1893 <2> mov si, word [bp + ?offset] 1894 <2> mov ds, word [bp + ?segment] 1895 <2> push ds 1896 <2> pop es 1897 <2> mov di, second_access_slice_buffer 1898 <2> shr cx, 1 1899 <2> rep movsw 1900 <2> jnc @F 1901 <2> movsb 1902 <2> @@: 1903 <2> %endif 1904 <2> 0 00003548 58 pop ax 0 00003549 5B pop bx 0 0000354A 5A pop dx 0 0000354B 5E pop si 0 0000354C 1F pop ds 0 0000354D 5F pop di 0 0000354E 07 pop es 1912 <2> 0 0000354F 8B4EFE mov cx, word [bp + ?orig_cx] 0 00003552 89EC5D lleave 0 00003555 E8[0000] dualreturn 0 00003558 CA0600 lret 1917 <2> 1918 <2> 1919 <2> %endif ; _XMS_SYMBOL_TABLE 1920 <2> 1921 <2> 1922 <2> zz_get_symstr_length_indices: 0 0000355B 31C9 xor cx, cx 0 0000355D 268A0D mov cl, byte [es:di + ssLength] 1925 <2> .ssLength_in_cx: 0 00003560 E80A00 nearcall zz_get_symstr_length_bytes.ssLength_in_cx 0 00003563 D1E9 shr cx, 1 0 00003565 D1E9 shr cx, 1 ; to SYMSTR index 0 00003567 C3 retn 1930 <2> 1931 <2> 1932 <2> zz_get_symstr_length_bytes: 0 00003568 31C9 xor cx, cx 0 0000356A 268A0D mov cl, byte [es:di + ssLength] 1935 <2> .ssLength_in_cx: 0 0000356D 83C107 add cx, SYMSTR_size + (SYMSTR_index_size - 1) 1937 <2> ; add header size and round up 0 00003570 83E1FC and cx, ~ (SYMSTR_index_size - 1) 1939 <2> ; align to dword boundary 0 00003573 C3 retn 1941 <2> 1942 <2> 1943 <2> %if _PM 1944 <2> ; INP: word [ss:sp + 2] = segment value to access 1945 <2> ; word [ss:sp] = selector to use if in PM 1946 <2> ; OUT: one word popped from stack 1947 <2> ; word [ss:sp] = selector value to use for access 1948 <2> ; CHG: - 1949 <2> dualfunction 1950 <2> segment_to_selector: section_of_function 1951 <2> lframe dualdistance 1952 <2> lpar word, in_segment_out_selector 1953 <2> lpar_return 1954 <2> lpar word, selector_to_use 0 00003574 5589E5 lenter 1956 <2> 0 00003577 E8[0000]EB02[0000] nearcall ispm ; is it PM ? 0 0000357E 751E jnz .ret ; no, 86M --> (segment == selector) 1959 <2> 1960 <2> [cpu 286] 0 00003580 50 push ax 0 00003581 53 push bx 0 00003582 51 push cx 0 00003583 52 push dx 1965 <2> 0 00003584 8B5608 mov dx, word [bp + ?in_segment_out_selector] 0 00003587 89D1 mov cx, dx 0 00003589 C1E204 shl dx, 4 0 0000358C C1E90C shr cx, 12 0 0000358F B80700 mov ax, 7 0 00003592 8B5E06 mov bx, word [bp + ?selector_to_use] 1972 <2> ; = symsel1 or symsel2 0 00003595 CD31 int 31h ; set segment base to cx:dx 0 00003597 895E08 mov word [bp + ?in_segment_out_selector], bx 1975 <2> ; set selector 1976 <2> 0 0000359A 5A pop dx 0 0000359B 59 pop cx 0 0000359C 5B pop bx 0 0000359D 58 pop ax 1981 <2> __CPU__ 1982 <2> 1983 <2> .ret: 0 0000359E 5D lleave 0 0000359F E8[0000] dualreturn 0 000035A2 CA0200 lret 1987 <2> 1988 <2> ; INP: word [ss:sp] = selector to access 1989 <2> ; OUT: word [ss:sp] = segment value to use for access 1990 <2> ; CHG: - 1991 <2> dualfunction 1992 <2> selector_to_segment: section_of_function 1993 <2> lframe dualdistance 1994 <2> lpar word, in_selector_out_segment 1995 <2> lpar_return 0 000035A5 5589E5 lenter 1997 <2> 0 000035A8 E8[0000]EB02[0000] nearcall ispm ; is it PM ? 0 000035AF 751B jnz .ret ; no, 86M --> (selector == segment) 2000 <2> 2001 <2> subcpu 286 0 000035B1 50 push ax 0 000035B2 53 push bx 0 000035B3 51 push cx 0 000035B4 52 push dx 2006 <2> 0 000035B5 8B5E06 mov bx, word [bp + ?in_selector_out_segment] 0 000035B8 B80600 mov ax, 6 0 000035BB CD31 int 31h ; get segment base to cx:dx 0 000035BD C1EA04 shr dx, 4 0 000035C0 C1E10C shl cx, 12 0 000035C3 09CA or dx, cx 0 000035C5 895606 mov word [bp + ?in_selector_out_segment], dx 2014 <2> 0 000035C8 5A pop dx 0 000035C9 59 pop cx 0 000035CA 5B pop bx 0 000035CB 58 pop ax 2019 <2> subcpureset 2020 <2> 2021 <2> .ret: 0 000035CC 5D lleave 0 000035CD E8[0000] dualreturn 0 000035D0 CB lret 2025 <2> %endif 2026 <2> 2027 <2> 2028 <2> ; INP: word [ss:sp] = main index 2029 <2> ; CHG: ax 2030 <2> ; 2031 <2> ; Note: This invalidates the access slice. 2032 <2> dualfunction 2033 <2> displaystring: section_of_function 2034 <2> lframe dualdistance 2035 <2> lpar word, main_index 0 000035D1 5589E5 lenter 0 000035D4 52 push dx 0 000035D5 53 push bx 0 000035D6 51 push cx 0 000035D7 06 push es 0 000035D8 57 push di 0 000035D9 1E push ds 0 000035DA FF7606 push word [bp + ?main_index] 0 000035DD 50 push ax ; (reserve space, uninitialised) 0 000035DE E8[0000]EB02[9D0D] dualcall getfarpointer.main ; set up access slice to SYMMAIN entry 0 000035E5 5F pop di 0 000035E6 07 pop es 0 000035E7 E82D00 nearcall getstring1 ; set up access slice to SYMSTR entry 0 000035EA E8[0000]EB02[0000] nearcall disp_message_length_cx 0 000035F1 1F pop ds 0 000035F2 1E push ds 0 000035F3 FF7606 push word [bp + ?main_index] 0 000035F6 50 push ax ; (reserve space, uninitialised) 0 000035F7 E8[0000]EB02[9D0D] dualcall getfarpointer.main ; set up access slice to SYMMAIN entry 0 000035FE 5F pop di 0 000035FF 07 pop es 0 00003600 E82D00 nearcall getstring2 ; set up access slice to SYMSTR entry 0 00003603 E8[0000]EB02[0000] nearcall disp_message_length_cx 0 0000360A 1F pop ds 0 0000360B 5F pop di 0 0000360C 07 pop es 0 0000360D 59 pop cx 0 0000360E 5B pop bx 0 0000360F 5A pop dx 0 00003610 5D lleave 0 00003611 E8[0000] dualreturn 0 00003614 CA0200 lret 2068 <2> 2069 <2> 2070 <2> ; INP: es:di -> SYMMAIN entry (in access slice) 2071 <2> ; ds = data segment (to access sym_storage) 2072 <2> ; OUT: ds:dx -> string (in access slice) 2073 <2> ; cx = length of string 2074 <2> ; CHG: ax 2075 <2> ; 2076 <2> ; Note: This invalidates the access slice. 2077 <2> getstring1: 0 00003617 268B4508 mov ax, word [es:di + smName1] 2079 <2> @@: 0 0000361B 53 push bx 0 0000361C 50 push ax ; (SYMSTR index) 0 0000361D 50 push ax ; (reserve space, uninitialised) 0 0000361E E8[0000]EB02[CD0D] dualcall getfarpointer.str 0 00003625 5B pop bx 0 00003626 1F pop ds 0 00003627 8D5704 lea dx, [bx + ssString] 0 0000362A 31C9 xor cx, cx 0 0000362C 8A0F mov cl, [bx + ssLength] 0 0000362E 5B pop bx 0 0000362F C3 retn 2091 <2> 2092 <2> getstring2: 0 00003630 268B450A mov ax, word [es:di + smName2] 0 00003634 EBE5 jmp @B 2095 <2> 2096 <2> 2097 <2> shift_left_4_bxcx: 2098 <2> %rep 4 2099 <2> shl cx, 1 2100 <2> rcl bx, 1 2101 <2> %endrep 0 00003636 D1E1 shl cx, 1 0 00003638 D1D3 rcl bx, 1 0 0000363A D1E1 shl cx, 1 0 0000363C D1D3 rcl bx, 1 0 0000363E D1E1 shl cx, 1 0 00003640 D1D3 rcl bx, 1 0 00003642 D1E1 shl cx, 1 0 00003644 D1D3 rcl bx, 1 0 00003646 C3 retn 2103 <2> 2104 <2> 2105 <2> ; INP: bx = hash value to search 2106 <2> ; far [sym_storage.hash.start] -> SYMHASH array 2107 <2> ; word [sym_storage.hash.free] = how many SYMHASH entries 2108 <2> ; OUT: CY if not found, 2109 <2> ; bx = SYMHASH dword array index of where to insert 2110 <2> ; es:di -> where to insert new (-> next entry) 2111 <2> ; (may point at first entry to insert before) 2112 <2> ; (may point after last entry to insert after) 2113 <2> ; (Note: As this may point into the access slice, 2114 <2> ; it is basically useless.) 2115 <2> ; NC if found, 2116 <2> ; bx = SYMHASH dword array index of first matching entry 2117 <2> ; es:di -> first matching entry 2118 <2> ; (subsequent duplicates may occur) 2119 <2> ; (Note: This may point into the access slice.) 2120 <2> ; CHG: ax, bx, cx, dx, di, si, es 2121 <2> ; STT: ds = data segment 2122 <2> ; 2123 <2> ; Note: di may be non-zero on output, as SYMHASH arrays 2124 <2> ; are made up of dword-sized entries. 2125 <2> ; 2126 <2> ; Note: This invalidates the access slice. 2127 <2> binsearchhash: 0 00003647 8B0E[4800] mov cx, word [sym_storage.hash.free] 0 0000364B 89DA mov dx, bx 2130 <2> 0 0000364D 31C0 xor ax, ax 2132 <2> ; ax = first index into bucket (dword index) 2133 <2> ; cx = size of bucket (in amount of SYMHASH entries) 2134 <2> 2135 <2> 2136 <2> ; INP: cx = size of bucket (in dwords) 2137 <2> ; dx = value to search 2138 <2> ; ax = first SYMHASH dword array index to search 2139 <2> ; OUT: CY if not found, 2140 <2> ; bx = SYMHASH dword array index of where to insert 2141 <2> ; es:di -> where to insert new (-> next entry) 2142 <2> ; (may point at first entry to insert before) 2143 <2> ; (may point after last entry to insert after) 2144 <2> ; NC if found, 2145 <2> ; bx = SYMHASH dword array index of first matching entry 2146 <2> ; es:di -> first matching entry 0 0000364F 50 push ax 0 00003650 51 push cx 0 00003651 56 push si 2150 <2> .loop: 0 00003652 E33C jcxz .none 2152 <2> 2153 <2> ; The following always leaves si as at least one (non-zero). 2154 <2> ; This is due to cx being non-zero if the prior instruction 2155 <2> ; did not branch, and due to how the calculation is handled. 2156 <2> ; 2157 <2> ; cx = 1 leads to si = 1, cx = 0, si = 1 2158 <2> ; cx = 2 leads to si = 2, cx = 1, si = 1 2159 <2> ; cx = 3 leads to si = 3, cx = 1, si = 2 2160 <2> ; cx = 4 leads to si = 4, cx = 2, si = 2 2161 <2> ; etc 0 00003654 89CE mov si, cx 0 00003656 D1E9 shr cx, 1 ; cx = size of lower bucket 0 00003658 29CE sub si, cx ; si = size of upper bucket 2165 <2> 0 0000365A 89C3 mov bx, ax 0 0000365C 01CB add bx, cx ; +> first entry of upper bucket 2168 <2> 0 0000365E 53 push bx ; hash index 0 0000365F 50 push ax ; (reserve space, uninitialised) 0 00003660 E8[0000]EB02[B50D] dualcall getfarpointer.hash 0 00003667 5F pop di 0 00003668 07 pop es ; -> SYMHASH entry (access slice) 2174 <2> 0 00003669 263B15 cmp dx, word [es:di + shHash] 2176 <2> ; does it match ? 0 0000366C 7236 jb .uselowerbucket ; search in lower bucket 0 0000366E 7736 ja .useupperbucket ; search in upper bucket 2179 <2> ; (minus 1 for this mismatch entry) 2180 <2> 0 00003670 E31B jcxz .gotit ; lower bucket empty ? 2182 <2> .loop_prior: 0 00003672 4B dec bx 0 00003673 53 push bx ; hash index 0 00003674 50 push ax ; (reserve space, uninitialised) 0 00003675 E8[0000]EB02[B50D] dualcall getfarpointer.hash 0 0000367C 5F pop di 0 0000367D 07 pop es ; -> SYMHASH entry to test next (access slice) 0 0000367E 263B15 cmp dx, word [es:di + shHash] 0 00003681 7709 ja .gotit_esdi_plus_4 0 00003683 7403E9AA10 jne invaliddata 0 00003688 E2E8 loop .loop_prior 2193 <2> 0 0000368A EB01 jmp .gotit 2195 <2> 2196 <2> .gotit_esdi_plus_4: 0 0000368C 43 inc bx 2198 <2> .gotit: 0 0000368D F8 clc 0 0000368E EB03 jmp .ret 2201 <2> 2202 <2> .none: 0 00003690 89C3 mov bx, ax 0 00003692 F9 stc 2205 <2> .ret: 0 00003693 9C pushf 0 00003694 53 push bx ; hash index 0 00003695 50 push ax ; (reserve space, uninitialised) 0 00003696 E8[0000]EB02[B50D] dualcall getfarpointer.hash 0 0000369D 5F pop di 0 0000369E 07 pop es ; -> SYMHASH entry (access slice) 0 0000369F 9D popf 0 000036A0 5E pop si 0 000036A1 59 pop cx 0 000036A2 58 pop ax 0 000036A3 C3 retn 2217 <2> 2218 <2> .uselowerbucket: 2219 <2> ; ax = bucket start index 2220 <2> ; cx = bucket size 0 000036A4 EBAC jmp .loop 2222 <2> 2223 <2> .useupperbucket: 2224 <2> 2225 <2> ; Note that as noted in the comment at the .loop label, 2226 <2> ; si is always non-zero after that calculation. 2227 <2> ; Therefore, it is always valid here to skip the first 2228 <2> ; entry of the upper bucket, and point instead at the 2229 <2> ; second entry. 2230 <2> ; 2231 <2> ; If the upper bucket had exactly one entry, then 2232 <2> ; the following ends up with a zero-length bucket 2233 <2> ; pointing after the upper bucket's first entry. 0 000036A6 43 inc bx ; = index of second entry of upper bucket 0 000036A7 89D8 mov ax, bx 0 000036A9 4E dec si ; = size of upper bucket minus 1 0 000036AA 89F1 mov cx, si ; cx = bucket size 0 000036AC EBA4 jmp .loop 2239 <2> 2240 <2> 2241 <2> ; INP: (dx:)ax = start of range 2242 <2> ; (cx:)bx = end of range (= (dx:)ax for exact match) 2243 <2> ; far [sym_storage.main.start] -> SYMMAIN array 2244 <2> ; word [sym_storage.main.free] = how many SYMMAIN entries 2245 <2> ; OUT: CY if not found, 2246 <2> ; bx = SYMMAIN array index of where to insert 2247 <2> ; es:di -> where to insert new (-> next entry) 2248 <2> ; (may point at first entry to insert before) 2249 <2> ; (may point after last entry to insert after) 2250 <2> ; (Note: As this may point into the access slice, 2251 <2> ; it is basically useless.) 2252 <2> ; cx = 0 2253 <2> ; NC if found, 2254 <2> ; bx = SYMMAIN array index of first matching entry 2255 <2> ; es:di -> first matching entry 2256 <2> ; (subsequent duplicates may occur) 2257 <2> ; (Note: This may point into the access slice.) 2258 <2> ; cx = number of entries found 2259 <2> ; CHG: ax, bx, cx, di, si, es 2260 <2> ; STT: ds = data segment 2261 <2> ; 2262 <2> ; Note that di may be nonzero if the table is 2263 <2> ; located in the HMA, or if an access slice is used. 2264 <2> ; 2265 <2> ; Note: This invalidates the access slice. 2266 <2> binsearchmain: 2267 <2> lframe near 2268 <2> %if _DWORD_LINEAR 2269 <2> lvar word, high_word_match 2270 <2> %endif 0 000036AE 5589E550 lenter 2272 <2> %if _DWORD_LINEAR 2273 <2> lvar dword, start 0 000036B2 52 push dx 0 000036B3 50 push ax 2276 <2> lvar dword, end 0 000036B4 51 push cx 0 000036B5 53 push bx 2279 <2> %else 2280 <2> lvar word, start 2281 <2> push ax 2282 <2> lvar word, end 2283 <2> push bx 2284 <2> %endif 2285 <2> 0 000036B6 8B0E[2E00] mov cx, word [sym_storage.main.free] 0 000036BA 31C0 xor ax, ax 2288 <2> 2289 <2> ; ax = index start of bucket (SYMMAIN index into array) 2290 <2> ; cx = size of bucket 2291 <2> %if _DWORD_LINEAR 0 000036BC FF76FC push word [bp + ?start + 2] 0 000036BF 8F46FE pop word [bp + ?high_word_match] 2294 <2> %endif 0 000036C2 8B56FA mov dx, word [bp + ?start] 0 000036C5 E83B00 call .search 2297 <2> 2298 <2> ; bx + .start +> first match 0 000036C8 89DF mov di, bx 0 000036CA 89DE mov si, bx 0 000036CC 29C7 sub di, ax ; di = bx - ax = size to discard 0 000036CE 29F9 sub cx, di ; cx = bucket size - di = new bucket size 0 000036D0 89D8 mov ax, bx 2304 <2> 2305 <2> ; ax = start of bucket 2306 <2> ; cx = size of bucket 2307 <2> 0 000036D2 89C3 mov bx, ax 0 000036D4 01CB add bx, cx ; +> after end of bucket, 2310 <2> ; in case of high word match:dx 2311 <2> ; = 0(FFFF_)FFFFh 2312 <2> ; (note that es:di isn't used then) 2313 <2> %if _DWORD_LINEAR 0 000036D6 FF76F8 push word [bp + ?end + 2] 0 000036D9 8F46FE pop word [bp + ?high_word_match] 2316 <2> %endif 0 000036DC 8B56F6 mov dx, word [bp + ?end] 0 000036DF 42 inc dx 2319 <2> %if _DWORD_LINEAR 0 000036E0 7505 jnz @F ; if dx was not 0FFFFh --> 2321 <2> ; (ZR, dx = 0, should carry) 0 000036E2 FF46FE inc word [bp + ?high_word_match] 2323 <2> ; increment upper word 2324 <2> %endif 0 000036E5 7403 jz @FF ; if both are zero (was 0FFFF_FFFFh) --> 2326 <2> @@: 2327 <2> ; high word match:dx = after end of range 0 000036E7 E81900 call .search 2329 <2> @@: 0 000036EA 89D9 mov cx, bx 0 000036EC 29F1 sub cx, si ; cx = number of entries 0 000036EE 7401 jz .stc 0 000036F0 A8 db __TEST_IMM8 ; (skip stc, NC) 2334 <2> .stc: 0 000036F1 F9 stc 0 000036F2 89F3 mov bx, si ; bx = index of first entry (from .start) 2337 <2> 0 000036F4 53 push bx ; main index 0 000036F5 50 push ax ; (reserve space, uninitialised) 0 000036F6 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 000036FD 5F pop di 0 000036FE 07 pop es ; es:di -> SYMMAIN entry (access slice) 2343 <2> 0 000036FF 89EC5D lleave code 0 00003702 C3 lret 2346 <2> 2347 <2> 2348 <2> ; INP: ax + .start +> start of bucket (first entry) 2349 <2> ; cx = size of bucket (in SYMMAIN entries) 2350 <2> ; high word match:dx = value to search 2351 <2> ; OUT: CY if not found, 2352 <2> ; bx + .start +> where to insert new (+> next entry) 2353 <2> ; (may point at first entry to insert before) 2354 <2> ; (may point after last entry to insert after) 2355 <2> ; NC if found, 2356 <2> ; bx + .start +> first matching entry 2357 <2> ; CHG: es, di 2358 <2> .search: 0 00003703 50 push ax 0 00003704 51 push cx 0 00003705 56 push si 2362 <2> .loop: 0 00003706 E352 jcxz .none_ax 2364 <2> 2365 <2> ; Refer to the comment at the binsearchhash.loop label. 0 00003708 89CE mov si, cx 0 0000370A D1E9 shr cx, 1 ; cx = size of lower bucket 0 0000370C 29CE sub si, cx ; si = size of upper bucket 2369 <2> 0 0000370E 89C3 mov bx, ax 0 00003710 01CB add bx, cx ; +> first entry of upper bucket 2372 <2> 0 00003712 53 push bx ; main index 0 00003713 50 push ax ; (reserve space, uninitialised) 0 00003714 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 0000371B 5F pop di 0 0000371C 07 pop es ; es:di -> SYMMAIN entry (access slice) 2378 <2> 2379 <2> %if _DWORD_LINEAR 0 0000371D 50 push ax 0 0000371E 8B46FE mov ax, word [bp + ?high_word_match] 0 00003721 263B4502 cmp ax, word [es:di + smLinear + 2] 0 00003725 58 pop ax 0 00003726 7503 jne @F 2385 <2> ; (ZR) 2386 <2> %endif 0 00003728 263B15 cmp dx, word [es:di + smLinear] 2388 <2> ; does it match ? 2389 <2> @@: 0 0000372B 7234 jb .uselowerbucket ; search in lower bucket 0 0000372D 7734 ja .useupperbucket ; search in upper bucket 2392 <2> ; (minus 1 for this mismatch entry) 2393 <2> 0 0000372F E326 jcxz .gotit ; lower bucket empty ? 2395 <2> .loop_prior: 0 00003731 4B dec bx ; +> next entry to test 0 00003732 53 push bx ; main index 0 00003733 50 push ax ; (reserve space, uninitialised) 0 00003734 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 0000373B 5F pop di 0 0000373C 07 pop es ; es:di -> next entry to test 2402 <2> %if _DWORD_LINEAR 0 0000373D 50 push ax 0 0000373E 8B46FE mov ax, word [bp + ?high_word_match] 0 00003741 263B4502 cmp ax, word [es:di + smLinear + 2] 0 00003745 58 pop ax 0 00003746 7503 jne @F 2408 <2> ; (ZR) 2409 <2> %endif 0 00003748 263B15 cmp dx, word [es:di + smLinear] 2411 <2> @@: 0 0000374B 7709 ja .gotit_esdi_plus_4 0 0000374D 7403E9E00F jne invaliddata 0 00003752 E2DD loop .loop_prior 2415 <2> 0 00003754 EB01 jmp .gotit 2417 <2> 2418 <2> .gotit_esdi_plus_4: 0 00003756 43 inc bx ; increment index 2420 <2> %if 0 2421 <2> push bx ; main index 2422 <2> push ax ; (reserve space, uninitialised) 2423 <2> dualcall getfarpointer.main 2424 <2> pop di 2425 <2> pop es ; es:di -> SYMMAIN entry (access slice) 2426 <2> %endif 2427 <2> ; This is not needed because .search now only returns the 2428 <2> ; index in bx, not the pointer in es:di. 2429 <2> .gotit: 0 00003757 F8 clc 0 00003758 EB03 jmp .ret 2432 <2> 2433 <2> .none_ax: 2434 <2> ; es:di not set, refer to comment before .gotit. 0 0000375A 89C3 mov bx, ax 0 0000375C F9 stc 2437 <2> .ret: 0 0000375D 5E pop si 0 0000375E 59 pop cx 0 0000375F 58 pop ax 0 00003760 C3 retn 2442 <2> 2443 <2> .uselowerbucket: 2444 <2> ; ax = bucket start 2445 <2> ; cx = bucket size 0 00003761 EBA3 jmp .loop 2447 <2> 2448 <2> .useupperbucket: 2449 <2> ; Refer to the comments at the binsearchhash.loop label 2450 <2> ; and binsearchhash.useupperbucket label. 0 00003763 41 inc cx ; + ax +> second entry of upper bucket 0 00003764 4E dec si ; = size of upper bucket minus 1 0 00003765 01C8 add ax, cx ; ax = bucket start (+> first entry therein) 0 00003767 89F1 mov cx, si ; cx = bucket size 0 00003769 EB9B jmp .loop 2456 <2> 2457 <2> lleave ctx 2458 <2> 2459 <2> 2460 <2> %if _DEBUG1 2461 <2> function_list_symbols: 2462 <2> push ax 2463 <2> push bx 2464 <2> push cx 2465 <2> push dx 2466 <2> push ds 2467 <2> push es 2468 <2> push si 2469 <2> push di 2470 <2> push bp 2471 <2> pushf 2472 <2> 2473 <2> 2474 <2> xor bx, bx ; (NC) 2475 <2> lframe 2476 <2> lenter 2477 <2> lvar dword, prior 2478 <2> push bx 2479 <2> push bx 2480 <2> mov cx, word [sym_storage.main.free] 2481 <2> lvar word, flags 2482 <2> pushf ; (NC) 2483 <2> jcxz .done 2484 <2> .loop: 2485 <2> push bx ; (index) 2486 <2> push ax ; (reserve space, uninitialised) 2487 <2> dualcall getfarpointer.main 2488 <2> pop di 2489 <2> pop es 2490 <2> mov dx, msg.list_first 2491 <2> nearcall disp_message 2492 <2> %if _DWORD_LINEAR 2493 <2> mov dx, word [es:di + smLinear + 2] 2494 <2> mov ax, dx 2495 <2> nearcall disp_ax_hex 2496 <2> %else 2497 <2> xor dx, dx 2498 <2> %endif 2499 <2> mov ax, word [es:di + smLinear] 2500 <2> nearcall disp_ax_hex 2501 <2> 2502 <2> cmp dx, word [bp + ?prior + 2] 2503 <2> mov dx, msg.list_last_success 2504 <2> jne @F 2505 <2> cmp ax, word [bp + ?prior] 2506 <2> @@: 2507 <2> jae .success 2508 <2> .error: 2509 <2> popf ; (accesses ?flags) 2510 <2> stc 2511 <2> pushf 2512 <2> mov dx, msg.list_last_error 2513 <2> .success: 2514 <2> %if _DWORD_LINEAR 2515 <2> push word [es:di + smLinear + 2] 2516 <2> pop word [bp + ?prior + 2] 2517 <2> %endif 2518 <2> push word [es:di + smLinear] 2519 <2> pop word [bp + ?prior] 2520 <2> push dx 2521 <2> mov dx, msg.list_middle 2522 <2> nearcall disp_message 2523 <2> push bx 2524 <2> dualcall displaystring 2525 <2> pop dx 2526 <2> nearcall disp_message 2527 <2> 2528 <2> inc bx ; increment index 2529 <2> loop .loop 2530 <2> .done: 2531 <2> popf ; (accesses ?flags) 2532 <2> jc invaliddata 2533 <2> 2534 <2> mov dx, msg.list_end 2535 <2> nearcall disp_message 2536 <2> 2537 <2> lleave 2538 <2> 2539 <2> 2540 <2> popf 2541 <2> pop bp 2542 <2> pop di 2543 <2> pop si 2544 <2> pop es 2545 <2> pop ds 2546 <2> pop bx 2547 <2> pop cx 2548 <2> pop bx 2549 <2> pop ax 2550 <2> retn 2551 <2> %endif 2552 <2> 2553 <2> 2554 <2> %if _INCLUDECOMMON 2555 <2> invaliddata: 2556 <2> mov dx, msg.invaliddata 2557 <2> exit_error_msg: 2558 <2> nearcall disp_message 2559 <2> mov al, 1 2560 <2> jmp exit 2561 <2> 2562 <2> 2563 <2> ; INP: ds:dx -> message, ASCIZ 2564 <2> disp_message: 2565 <2> push cx 2566 <2> push ax 2567 <2> push es 2568 <2> push di 2569 <2> push ds 2570 <2> pop es 2571 <2> mov di, dx 2572 <2> mov cx, -1 2573 <2> mov al, 0 2574 <2> repne scasb 2575 <2> not cx 2576 <2> dec cx 2577 <2> nearcall disp_message_length_cx 2578 <2> pop di 2579 <2> pop es 2580 <2> pop ax 2581 <2> pop cx 2582 <2> retn 2583 <2> 2584 <2> ; INP: ds:dx -> message 2585 <2> ; cx = length 2586 <2> disp_message_length_cx: 2587 <2> push ax 2588 <2> push bx 2589 <2> mov ah, 40h 2590 <2> mov bx, 1 2591 <2> int 21h 2592 <2> pop bx 2593 <2> pop ax 2594 <2> retn 2595 <2> 2596 <2> 2597 <2> disp_ax_hex: 2598 <2> xchg al, ah 2599 <2> nearcall disp_al_hex 2600 <2> xchg al, ah 2601 <2> disp_al_hex: 2602 <2> push cx 2603 <2> mov cl, 4 2604 <2> rol al, cl 2605 <2> nearcall disp_al_nybble_hex 2606 <2> rol al, cl 2607 <2> pop cx 2608 <2> disp_al_nybble_hex: 2609 <2> push ax 2610 <2> push dx 2611 <2> and al, 0Fh 2612 <2> add al, '0' 2613 <2> cmp al, '9' 2614 <2> jbe @F 2615 <2> add al, -'9' -1 +'A' 2616 <2> @@: 2617 <2> mov dl, al 2618 <2> mov ah, 02h 2619 <2> int 21h 2620 <2> pop dx 2621 <2> pop ax 2622 <2> retn 2623 <2> %endif 2624 <2> 2625 <2> 2626 <2> ; INP: ds:si -> string to hash 2627 <2> ; cx = length of string (may be zero) 2628 <2> ; OUT: bx = hash value computed 2629 <2> ; CHG: ax, si, cx 2630 <2> ; STT: UP 2631 <2> zz_hash: 0 0000376B BB0100 mov bx, 1 2633 <2> 2634 <2> ; INP: ds:si -> string to hash 2635 <2> ; cx = length of string (may be zero) 2636 <2> ; bx = initial hash value 2637 <2> ; OUT: bx = hash value computed 2638 <2> ; CHG: ax, si, cx 2639 <2> ; STT: UP 2640 <2> .bx_init: 0 0000376E E30F jcxz .end 2642 <2> .loop: 0 00003770 31C0 xor ax, ax 0 00003772 AC lodsb 0 00003773 29D8 sub ax, bx 0 00003775 51 push cx 0 00003776 B105 mov cl, 5 0 00003778 D3E3 shl bx, cl 0 0000377A 59 pop cx 0 0000377B 01C3 add bx, ax 0 0000377D E2F1 loop .loop 2652 <2> .end: 0 0000377F C3 retn 2654 <2> 2655 <2> 2656 <2> ; Note: The following pointer arithmetic functions all 2657 <2> ; operate on segments, even if called in PM. 2658 <2> ; Therefore, callers must insure to use segments. 2659 <2> ; Note: The segment values are only used to do arithmetic, 2660 <2> ; they are not loaded into segment registers. 2661 <2> 2662 <2> ; INP: word [ss:sp + 2] = segment 2663 <2> ; word [ss:sp] = offset 2664 <2> dualfunction 2665 <2> normalise_pointer: section_of_function 2666 <2> lframe dualdistance 2667 <2> lpar word, segment 2668 <2> lpar word, offset 2669 <2> lpar_return 0 00003780 5589E5 lenter 0 00003783 53 push bx 0 00003784 51 push cx 2673 <2> 0 00003785 31DB xor bx, bx 0 00003787 31C9 xor cx, cx 0 00003789 FF7608 push word [bp + ?segment] 0 0000378C FF7606 push word [bp + ?offset] 0 0000378F E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 00003796 8F4606 pop word [bp + ?offset] 0 00003799 8F4608 pop word [bp + ?segment] 2681 <2> 0 0000379C 59 pop cx 0 0000379D 5B pop bx 0 0000379E 5D lleave 0 0000379F E8[0000] dualreturn 0 000037A2 CB lret 2687 <2> 2688 <2> 2689 <2> ; INP: word [ss:sp + 2] = segment 2690 <2> ; word [ss:sp] = offset 2691 <2> ; bx:cx = add/sub displacement 2692 <2> dualfunction 2693 <2> normalise_pointer_with_displacement_bxcx: section_of_function 2694 <2> lframe dualdistance 2695 <2> lpar word, segment 2696 <2> lpar word, offset 2697 <2> lpar_return 0 000037A3 5589E5 lenter 0 000037A6 50 push ax 0 000037A7 52 push dx 2701 <2> 0 000037A8 FF7608 push word [bp + ?segment] 0 000037AB FF7606 push word [bp + ?offset] 0 000037AE E8[0000]EB02[D214] dualcall pointer_to_linear 2705 <2> 2706 <2> ; push bx 2707 <2> ; ; sign-extend cx into bx:cx 2708 <2> ; cmp cx, 8000h ; CY if < 8000h (NC if negative) 2709 <2> ; cmc ; NC if positive 2710 <2> ; sbb bx, bx ; 0 if was NC, -1 if was CY 2711 <2> 0 000037B5 01C8 add ax, cx 0 000037B7 11DA adc dx, bx ; dx:ax += bx:cx 2714 <2> ; pop bx 2715 <2> 2716 <2> %if 1 2717 <2> ; Adds in HMA support for this function. 0 000037B9 83FA10 cmp dx, 10h ; dx:ax >= 10_0000h ? 0 000037BC 720C jb @F ; no, linear-to-pointer normally --> 2720 <2> ; ja .error 2721 <2> 0 000037BE 83C010 add ax, 10h 2723 <2> ; jc .error 0 000037C1 894606 mov word [bp + ?offset], ax 0 000037C4 834E08FF or word [bp + ?segment], -1 0 000037C8 EB1B jmp .return 2727 <2> @@: 2728 <2> %endif 2729 <2> 0 000037CA 50 push ax 0 000037CB 83E00F and ax, 15 0 000037CE 894606 mov word [bp + ?offset], ax 0 000037D1 58 pop ax 2734 <2> 2735 <2> %rep 4 2736 <2> shr dx, 1 2737 <2> rcr ax, 1 2738 <2> %endrep 0 000037D2 D1EA shr dx, 1 0 000037D4 D1D8 rcr ax, 1 0 000037D6 D1EA shr dx, 1 0 000037D8 D1D8 rcr ax, 1 0 000037DA D1EA shr dx, 1 0 000037DC D1D8 rcr ax, 1 0 000037DE D1EA shr dx, 1 0 000037E0 D1D8 rcr ax, 1 0 000037E2 894608 mov word [bp + ?segment], ax 2740 <2> 2741 <2> ; test dx, dx 2742 <2> ; jnz .error 2743 <2> 2744 <2> .return: 0 000037E5 5A pop dx 0 000037E6 58 pop ax 0 000037E7 5D lleave 0 000037E8 E8[0000] dualreturn 0 000037EB CB lret 2750 <2> 2751 <2> 2752 <2> ; INP: word [ss:sp + 2] = segment 2753 <2> ; word [ss:sp] = offset 2754 <2> ; bx:cx = add/sub displacement 2755 <2> ; OUT: dword [ss:sp] = anti-normalised address 2756 <2> ; 2757 <2> ; An anti-normalised pointer has an offset as high as possible, 2758 <2> ; which is in the range 0FFF0h to 0FFFFh unless the pointed-to 2759 <2> ; location is in the first 64 KiB of memory. 2760 <2> dualfunction 2761 <2> anti_normalise_pointer_with_displacement_bxcx: section_of_function 2762 <2> lframe dualdistance 2763 <2> lpar word, segment 2764 <2> lpar word, offset 2765 <2> lpar_return 0 000037EC 5589E5 lenter 0 000037EF 50 push ax 0 000037F0 52 push dx 2769 <2> 0 000037F1 FF7608 push word [bp + ?segment] 0 000037F4 FF7606 push word [bp + ?offset] 0 000037F7 E8[0000]EB02[D214] dualcall pointer_to_linear 2773 <2> 0 000037FE 01C8 add ax, cx 0 00003800 11DA adc dx, bx ; dx:ax += bx:cx 2776 <2> 0 00003802 83FA01 cmp dx, 1 0 00003805 7223 jb @F 2779 <2> 0 00003807 50 push ax 0 00003808 83C8F0 or ax, 0FFF0h 0 0000380B 894606 mov word [bp + ?offset], ax 0 0000380E 58 pop ax 2784 <2> 0 0000380F 83E8F0 sub ax, 0FFF0h 0 00003812 83DA00 sbb dx, 0 2787 <2> 2788 <2> %rep 4 2789 <2> shr dx, 1 2790 <2> rcr ax, 1 2791 <2> %endrep 0 00003815 D1EA shr dx, 1 0 00003817 D1D8 rcr ax, 1 0 00003819 D1EA shr dx, 1 0 0000381B D1D8 rcr ax, 1 0 0000381D D1EA shr dx, 1 0 0000381F D1D8 rcr ax, 1 0 00003821 D1EA shr dx, 1 0 00003823 D1D8 rcr ax, 1 0 00003825 894608 mov word [bp + ?segment], ax 2793 <2> 0 00003828 EB07 jmp .return 2795 <2> 2796 <2> ; dx:ax = 0000:offset 2797 <2> @@: 0 0000382A 894606 mov word [bp + ?offset], ax 0 0000382D 83660800 and word [bp + ?segment], 0 2800 <2> 2801 <2> .return: 0 00003831 5A pop dx 0 00003832 58 pop ax 0 00003833 5D lleave 0 00003834 E8[0000] dualreturn 0 00003837 CB lret 2807 <2> 2808 <2> 2809 <2> ; INP: word [ss:sp + 2] = segment 2810 <2> ; word [ss:sp] = offset 2811 <2> ; OUT: dx:ax = linear address 2812 <2> dualfunction 2813 <2> pointer_to_linear: section_of_function 2814 <2> lframe dualdistance 2815 <2> lpar word, segment 2816 <2> lpar word, offset 0 00003838 5589E5 lenter 2818 <2> 0 0000383B 8B4608 mov ax, word [bp + ?segment] 0 0000383E 31D2 xor dx, dx 2821 <2> %rep 4 2822 <2> shl ax, 1 2823 <2> rcl dx, 1 2824 <2> %endrep 0 00003840 D1E0 shl ax, 1 0 00003842 D1D2 rcl dx, 1 0 00003844 D1E0 shl ax, 1 0 00003846 D1D2 rcl dx, 1 0 00003848 D1E0 shl ax, 1 0 0000384A D1D2 rcl dx, 1 0 0000384C D1E0 shl ax, 1 0 0000384E D1D2 rcl dx, 1 2825 <2> 0 00003850 034606 add ax, word [bp + ?offset] 0 00003853 83D200 adc dx, 0 2828 <2> 0 00003856 5D lleave 0 00003857 E8[0000] dualreturn 0 0000385A CA0400 lret 2832 <2> 2833 <2> 2834 <2> %if _STANDALONE 2835 <2> msg: 2836 <2> .invaliddata: asciz "Invalid data!",13,10 2837 <2> %if _SECOND_SLICE && (_XMS_SYMBOL_TABLE || _BUFFER_86MM_SLICE) 2838 <2> .error_second_slice: asciz "Invalid access slice usage!",13,10 2839 <2> %endif 2840 <2> .hash_too_full: asciz "Hash array is too full!",13,10 2841 <2> .display_first: asciz "Result set: " 2842 <2> .display_between: asciz ", " 2843 <2> .linebreak: 2844 <2> .display_last: asciz 13,10 2845 <2> .display_empty_before: asciz "Result set is empty. Insertion before: " 2846 <2> .display_empty_after: asciz 13,10 2847 <2> .test_first: asciz "Range: " 2848 <2> .test_second: asciz "h--" 2849 <2> .test_third: asciz "h. " 2850 <2> .list_first: asciz "Symbol: " 2851 <2> .list_middle: asciz "h = ",'"' 2852 <2> .list_last_success: asciz '"',13,10 2853 <2> .list_last_error: asciz '"'," (symbol linear is below the prior)",13,10 2854 <2> .list_end: asciz 13,10 2855 <2> .test_single_after_first: 2856 <2> asciz "Value: " 2857 <2> .test_single_after_second: 2858 <2> asciz "h. " 2859 <2> .hash_first: asciz "Hash: " 2860 <2> .hash_second: asciz "h " 2861 <2> .hash_third: asciz 13,10 2862 <2> .list_hash_first: asciz "Hash: " 2863 <2> .list_hash_second: asciz "h " 2864 <2> .list_hash_third: asciz 13,10 2865 <2> %if _XMS_SYMBOL_TABLE 2866 <2> .zz_no_xms: asciz "No XMS driver detected!",13,10 2867 <2> .zz_fail_xms_alloc: asciz "Failed to allocate XMS block!",13,10 2868 <2> .zz_fail_xms_access: asciz "Failed to access XMS block!",13,10 2869 <2> %endif 2870 <2> %endif 3139 <1> resetdef STANDALONE 3140 <1> 3141 <1> %if _USE_DELETE 3142 <1> %include "delete.asm" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbol delete implementation 5 <2> by 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> %include "lmacros2.mac" 1 <3> [list -] 16 <2> %include "symbols.mac" 1 <3> 2 <3> %if 0 3 <3> 4 <3> Symbolic debugging macros 5 <3> by C. Masloch, 2019 6 <3> 7 <3> Usage of the works is permitted provided that this 8 <3> instrument is retained with the works, so that any entity 9 <3> that uses the works is notified of this instrument. 10 <3> 11 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 12 <3> 13 <3> %endif 14 <3> 15 <3> %ifndef __SYMBOLS_MAC__ 16 <3> %assign __SYMBOLS_MAC__ 1 17 <3> 18 <3> numdef SYMMAINLARGE, 1 19 <3> 20 <3> 21 <3> ; Note: SYMMAINs are stored as an array, which is sorted 22 <3> ; on the smLinear value. Therefore, binary search can 23 <3> ; be used to find an entry in the entire array. 24 <3> struc SYMMAIN 25 <3> smLinear: resd 1 ; linear address of symbol 26 <3> ; Currently all symbols are fully filled, with a 32-bit 27 <3> ; linear value and a 32-bit offset value. (It is of course 28 <3> ; valid to use an offset that fits in 16 bits.) 29 <3> ; Symbols without either a linear or an offset value 30 <3> ; may be supported later, in which case there would be 31 <3> ; a flag to indicate this. 32 <3> smOffset: resd 1 ; offset of symbol 33 <3> ; The following two fields are SYMSTR heap dword indices. 34 <3> ; The value 0 is special, it refers to the empty string. 35 <3> ; To simplify handling of this, the SYMSTR heap contains 36 <3> ; an actual entry with an empty string at index 0. 37 <3> smName1: resw 1 ; -> first string part 38 <3> smName2: resw 1 ; -> second string part 39 <3> smHashByte: ; (low byte of flags is truncated hash value) 40 <3> smFlags: resw 1 ; flags 41 <3> ; The following field is a SYMMAIN paragraph index. 42 <3> ; The value -1 indicates none. 43 <3> %if _SYMMAINLARGE 44 <3> smBase: ; SYMMAIN entry this one is based from 45 <3> %else 46 <3> smNext: ; SYMMAIN entry which was loaded next 47 <3> %endif 48 <3> resw 1 49 <3> alignb 16 50 <3> %if _SYMMAINLARGE 51 <3> ; smBaseNext and smBasePrev form a doubly-linked list 52 <3> ; of the entries belonging to a particular base SYMMAIN. 53 <3> ; -1 indicates no next or no previous entry. 54 <3> ; If smfBase is set then the smBaseNext contains a link 55 <3> ; to the first entry belonging to this SYMMAIN as a base, 56 <3> ; and smBasePrev links to the last entry. -1 if none. 57 <3> smBaseNext: resw 1 58 <3> smBasePrev: resw 1 59 <3> ; If smfBase is set these fields form a doubly-linked list 60 <3> ; of all SYMMAIN entries with smfBase set. 61 <3> ; If smfBreakpoint is set these fields form a doubly-linked 62 <3> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <3> ; These fields are also used by zz_relocate to remember 64 <3> ; which entries to relocate. 65 <3> smSpecialNext: resw 1 66 <3> smSpecialPrev: resw 1 67 <3> %endif 68 <3> endstruc 69 <3> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <3> %error Unexpected SYMMAIN_size 71 <3> %endif 72 <3> SYMMAIN_index_size equ SYMMAIN_size 73 <3> 74 <3> insertfDropSymHintStoreString: equ 1 75 <3> insertfExistingMask equ 0E0h 76 <3> insertfExistingDefaultSymbol equ 00h 77 <3> insertfExistingDefaultStart equ 20h 78 <3> insertfExistingBlockDiffering equ 40h 79 <3> insertfExistingBlockAll equ 60h 80 <3> insertfExistingUpdate equ 80h 81 <3> insertfExistingDuplicate equ 0A0h 82 <3> insertfExistingKeep equ 0C0h 83 <3> ; insertfExisting equ 0E0h 84 <3> smfSectionStartEnd: equ 100h 85 <3> smfBase: equ 100h 86 <3> smfAnonLabel: equ 200h 87 <3> smfSymHint: equ 400h 88 <3> smfSymHintStoreString: equ 800h 89 <3> smfPoison: equ 1000h 90 <3> smfBreakpoint: equ 2000h 91 <3> 92 <3> struc SYMSTR 93 <3> ; The following two fields are expected to be consecutive, they 94 <3> ; are accessed together as a word. (Refer to ssLength usages.) 95 <3> ssLength: resb 1 ; how long this string is (only ssString) 96 <3> ssRefCount: resb 1 ; how often this string is referenced 97 <3> ; The ssRefCount value can be: 98 <3> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <3> ; A reference may be added, incrementing the count. 100 <3> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <3> ; If all references are freed, it is expected that 102 <3> ; the count decreases to zero. 103 <3> ; A reference may be added, incrementing the count. 104 <3> ; 254 = Referenced SYMSTR, with that many references. 105 <3> ; No reference may be added, as 254 is the maximum 106 <3> ; reference count that indicates a referenced SYMSTR. 107 <3> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <3> ; times. May not be deleted unless all tables are freed. 109 <3> ; This is used by the empty string SYMSTR at index 0. 110 <3> ssHash: resw 1 ; hash value of this string 111 <3> ssString: ; actual string content 112 <3> ; Note that if the string is not dword-aligned, NUL bytes are 113 <3> ; appended to insure that the SYMSTR structure is padded to a 114 <3> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <3> ; Therefore, the size of a SYMSTR record is obtained by 116 <3> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <3> ; (Note: A terminating NUL byte is not included if the string 118 <3> ; length is dword-aligned already. The length must be used 119 <3> ; directly, not implied by a terminator.) 120 <3> endstruc 121 <3> SYMSTR_typical_size equ 28 122 <3> SYMSTR_index_size equ 4 123 <3> 124 <3> ; Note: SYMHASHs are stored as an array, which is sorted 125 <3> ; on the shHash value. Therefore, binary search can 126 <3> ; be used to find an entry in the entire array. 127 <3> ; 128 <3> ; The hash value is computed by hashing the entire name 129 <3> ; string (ie, both smName1 and smName2 string contents) 130 <3> ; with the algorithm as such: 131 <3> ; 132 <3> ; for (hash = 1, index = 0; index < length; index += 1) 133 <3> ; hash = hash * 31 + name[index]; 134 <3> struc SYMHASH 135 <3> shHash: resw 1 ; hash value 136 <3> shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <3> endstruc 138 <3> SYMHASH_index_size equ SYMHASH_size 139 <3> 140 <3> 141 <3> struc XMSMOVE 142 <3> xmsmCount: resd 1 143 <3> ; The count must be even. 144 <3> xmsmSourceHandle: resw 1 145 <3> xmsmSourceAddress: resd 1 146 <3> xmsmDestHandle: resw 1 147 <3> xmsmDestAddress: resd 1 148 <3> ; The destination and source may overlap only if a 149 <3> ; forward move would suffice to implement the 150 <3> ; operation without corrupting the data. (That is, 151 <3> ; the source starts above the destination. The XMS 152 <3> ; specification gets this detail wrong.) 153 <3> ; There is an error code for invalid overlap, but 154 <3> ; it is unclear whether this condition is detected 155 <3> ; properly by all implementations. 156 <3> endstruc 157 <3> 158 <3> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <3> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <3> 161 <3> 162 <3> %endif 17 <2> 18 <2> defaulting 19 <2> 20 <2> 21 <2> ; INP: bx = SYMHASH index to delete 22 <2> ; CHG: di, es, bx, si, cx 23 <2> ; 24 <2> ; Note: This invalidates the access slice. 25 <2> ; 26 <2> ; Note: There is no zz_reloc_hash function because 27 <2> ; there are no references to the SYMHASH indices 28 <2> ; from outside the SYMHASH table. 29 <2> zz_delete_hash: 0 0000385D 832E[4800]01 sub word [sym_storage.hash.free], 1 0 00003862 7303E9CB0E jc invaliddata 0 00003867 8B0E[4800] mov cx, word [sym_storage.hash.free] 0 0000386B 29D9 sub cx, bx ; = number of entries starting from this index 0 0000386D 7303E9C00E jc invaliddata 35 <2> ; dec cx ; = number of entries to move down 36 <2> ; (already did dec on the variable first) 0 00003872 53 push bx 0 00003873 E8[0000]EB02[9D18] dualcall move_delete_farpointer.hash 0 0000387A C3 retn 40 <2> 41 <2> 42 <2> ; INP: bx = SYMSTR index to delete 43 <2> ; CHG: di, es, bx, si, cx, dx, ax 44 <2> ; 45 <2> ; Note: This invalidates the access slice. 46 <2> zz_delete_string: 0 0000387B 53 push bx 0 0000387C 50 push ax 0 0000387D E8[0000]EB02[CD0D] dualcall getfarpointer.str 0 00003884 5F pop di 0 00003885 07 pop es 0 00003886 26807D0100 cmp byte [es:di + ssRefCount], 0 0 0000388B 7403E9A20E jne invaliddata 0 00003890 E8C8FC nearcall zz_get_symstr_length_indices 55 <2> ; cx = amount of indices to delete 0 00003893 290E[4C00] sub word [sym_storage.str.free], cx 0 00003897 7303E9960E jc invaliddata 0 0000389C A1[4C00] mov ax, word [sym_storage.str.free] 0 0000389F 29D8 sub ax, bx ; = number of entries to move down 0 000038A1 7303E98C0E jc invaliddata 0 000038A6 53 push bx ; (parameter to move_delete_farpointer) 0 000038A7 51 push cx ; = how far to move 0 000038A8 50 push ax ; = how much to move 0 000038A9 89C8 mov ax, cx 0 000038AB F7D8 neg ax ; ax = adjustment added to references 66 <2> ; bx = first moved entry 0 000038AD E81400 nearcall zz_reloc_str 0 000038B0 59 pop cx ; = how much to move 0 000038B1 5F pop di ; = how far to move 0 000038B2 31F6 xor si, si 71 <2> %if SYMSTR_index_size == 4 0 000038B4 01FF add di, di 0 000038B6 11F6 adc si, si 0 000038B8 01FF add di, di 0 000038BA 11F6 adc si, si ; * SYMSTR_index_size 76 <2> %else 77 <2> %error Unexpected SYMSTR index size 78 <2> %endif 0 000038BC E8[0000]EB02[BE18] dualcall move_delete_farpointer.str.sidi 0 000038C3 C3 retn 81 <2> 82 <2> 83 <2> ; Relocate references to SYMSTR entries that are 84 <2> ; about to be moved. (Insertion or deletion.) 85 <2> ; 86 <2> ; INP: bx = first moved entry (SYMSTR dword heap index) 87 <2> ; ax = how far to move 88 <2> ; (positive if inserting (should never happen), 89 <2> ; negative if deleting) 90 <2> ; CHG: es, di, dx, cx 91 <2> ; 92 <2> ; Note: This invalidates the access slice. 93 <2> zz_reloc_str: 94 <2> ; References in smName1 and smName2 fields. 0 000038C4 31D2 xor dx, dx 0 000038C6 8B0E[2E00] mov cx, word [sym_storage.main.free] 0 000038CA E338 jcxz .smname_end 98 <2> .smname_loop: 0 000038CC 52 push dx ; main index 0 000038CD 50 push ax ; (reserve space, uninitialised) 0 000038CE E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 000038D5 5F pop di 0 000038D6 07 pop es 0 000038D7 263B5D08 cmp bx, word [es:di + smName1] 0 000038DB 7710 ja @F ; smName1 not affected --> 0 000038DD 26014508 add word [es:di + smName1], ax 107 <2> ; modify smName1 108 <2> 0 000038E1 263B5D0A cmp bx, word [es:di + smName2] 0 000038E5 7710 ja .save ; smName2 not affected, save smName1 --> 0 000038E7 2601450A add word [es:di + smName2], ax 112 <2> ; modify smName2 0 000038EB EB0A jmp .save ; both affected, save both --> 114 <2> 115 <2> @@: 0 000038ED 263B5D0A cmp bx, word [es:di + smName2] 0 000038F1 770E ja @F ; smName2 and smName1 not affected --> 0 000038F3 2601450A add word [es:di + smName2], ax 119 <2> ; modify smName2 120 <2> ; smName2 affected, save 121 <2> .save: ; either or both affected, save 0 000038F7 06 push es 0 000038F8 57 push di 0 000038F9 52 push dx 0 000038FA E8[0000]EB02[3511] dualcall save_slice_farpointer.main 126 <2> @@: 127 <2> 0 00003901 42 inc dx 0 00003902 E2C8 loop .smname_loop 130 <2> .smname_end: 0 00003904 C3 retn 132 <2> 133 <2> 134 <2> ; INP: bx = SYMMAIN index to delete 135 <2> ; CHG: di, es, bx, si, cx, dx, ax 136 <2> ; 137 <2> ; Note: This invalidates the access slice. 138 <2> zz_delete_main: 0 00003905 53 push bx 0 00003906 50 push ax ; (reserve space, uninitialised) 0 00003907 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 0000390E 5F pop di 0 0000390F 07 pop es 0 00003910 268B4D08 mov cx, word [es:di + smName1] 0 00003914 268B550A mov dx, word [es:di + smName2] 0 00003918 51 push cx 0 00003919 50 push ax ; (reserve space, uninitialised) 0 0000391A E8[0000]EB02[CD0D] dualcall getfarpointer.str 0 00003921 5F pop di 0 00003922 07 pop es 0 00003923 26807D01FF cmp byte [es:di + ssRefCount], -1 0 00003928 7414 je @F ; if not reference-counted --> 0 0000392A 26806D0101 sub byte [es:di + ssRefCount], 1 0 0000392F 7303E9FE0D jc invaliddata ; if ssRefCount was zero --> 0 00003934 06 push es 0 00003935 57 push di 0 00003936 51 push cx 0 00003937 E8[0000]EB02[4711] dualcall save_slice_farpointer.str 159 <2> @@: 0 0000393E 52 push dx ; (smName2) 0 0000393F 50 push ax ; (reserve space, uninitialised) 0 00003940 E8[0000]EB02[CD0D] dualcall getfarpointer.str 0 00003947 5F pop di 0 00003948 07 pop es 0 00003949 26807D01FF cmp byte [es:di + ssRefCount], -1 0 0000394E 7414 je @F ; if not reference-counted --> 0 00003950 26806D0101 sub byte [es:di + ssRefCount], 1 0 00003955 7303E9D80D jc invaliddata ; if ssRefCount was zero --> 0 0000395A 06 push es 0 0000395B 57 push di 0 0000395C 52 push dx 0 0000395D E8[0000]EB02[4711] dualcall save_slice_farpointer.str 173 <2> @@: 174 <2> 0 00003964 A1[2E00] mov ax, word [sym_storage.main.free] 0 00003967 83E801 sub ax, 1 0 0000396A 7303E9C30D jc invaliddata 0 0000396F 29D8 sub ax, bx ; = number of entries to move down 0 00003971 7303E9BC0D jc invaliddata 0 00003976 53 push bx ; (parameter to move_delete_farpointer) 0 00003977 50 push ax ; = how much to move 182 <2> 0 00003978 E81900 nearcall zz_unlink_main_next 184 <2> 0 0000397B B8FFFF mov ax, -1 ; ax = adjustment added to references 186 <2> ; bx = first moved entry 0 0000397E E86BF5 nearcall zz_reloc_main 0 00003981 832E[2E00]01 sub word [sym_storage.main.free], 1 0 00003986 7303E9A70D jc invaliddata 0 0000398B 59 pop cx ; = how much to move 0 0000398C E8[0000]EB02[7C18] dualcall move_delete_farpointer.main 0 00003993 C3 retn 193 <2> 194 <2> 195 <2> ; INP: bx = SYMMAIN index of entry to unlink 196 <2> ; CHG: ax, dx, es, di 197 <2> ; OUT: sym_storage.main.first, .main.last, .main.relocate, 198 <2> ; all smNext fields: updated 199 <2> ; smNext field of the unlinked SYMMAIN entry = -1 200 <2> ; 201 <2> ; Note: This invalidates the access slice. 202 <2> zz_unlink_main_next: 203 <2> %if _SYMMAINLARGE 0 00003994 53 push bx 0 00003995 50 push ax 0 00003996 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 0000399D 5F pop di 0 0000399E 07 pop es 209 <2> 0 0000399F 56 push si 0 000039A0 BEFFFF mov si, -1 212 <2> 0 000039A3 268B5514 mov dx, word [es:di + smSpecialNext] 0 000039A7 268B4516 mov ax, word [es:di + smSpecialPrev] 215 <2> ; bx = to unlink 216 <2> ; dx = next (-1 if .last field to adjust else index) 217 <2> ; ax = prev (-1 if .first field to adjust else index) 0 000039AB 26897514 mov word [es:di + smSpecialNext], si 0 000039AF 26897516 mov word [es:di + smSpecialPrev], si 0 000039B3 06 push es 0 000039B4 57 push di 0 000039B5 53 push bx 0 000039B6 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 0 000039BD 39F0 cmp ax, si 0 000039BF 7526 jne .special_not_first 226 <2> .special_first: 0 000039C1 391E[3200] cmp word [sym_storage.main.base.first], bx 0 000039C5 740E je .special_first.first.base 0 000039C7 391E[3600] cmp word [sym_storage.main.bb.first], bx 0 000039CB 740E je .special_first.first.bb 0 000039CD 391E[3E00] cmp word [sym_storage.main.reloc.first], bx 0 000039D1 740E je .special_first.first.reloc 0 000039D3 EB34 jmp .special_common 234 <2> 235 <2> .special_first.first.base: 0 000039D5 8916[3200] mov word [sym_storage.main.base.first], dx 0 000039D9 EB2E jmp .special_common 238 <2> 239 <2> .special_first.first.bb: 0 000039DB 8916[3600] mov word [sym_storage.main.bb.first], dx 0 000039DF EB28 jmp .special_common 242 <2> 243 <2> .special_first.first.reloc: 0 000039E1 8916[3E00] mov word [sym_storage.main.reloc.first], dx 0 000039E5 EB22 jmp .special_common 246 <2> 247 <2> .special_not_first: 0 000039E7 50 push ax 0 000039E8 50 push ax 0 000039E9 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 000039F0 5F pop di 0 000039F1 07 pop es 0 000039F2 26395D14 cmp word [es:di + smSpecialNext], bx 0 000039F6 7403E9370D jne invaliddata 0 000039FB 26895514 mov word [es:di + smSpecialNext], dx 0 000039FF 06 push es 0 00003A00 57 push di 0 00003A01 50 push ax 0 00003A02 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 260 <2> 261 <2> .special_common: 0 00003A09 39F2 cmp dx, si 0 00003A0B 7523 jne .special.not_last 264 <2> .special.last: 0 00003A0D 391E[3400] cmp word [sym_storage.main.base.last], bx 0 00003A11 740E je .special.last.base 0 00003A13 391E[3800] cmp word [sym_storage.main.bb.last], bx 0 00003A17 740D je .special.last.bb 0 00003A19 391E[4000] cmp word [sym_storage.main.reloc.last], bx 0 00003A1D 740C je .special.last.reloc 0 00003A1F EB31 jmp .special_done 272 <2> 273 <2> .special.last.base: 0 00003A21 A3[3400] mov word [sym_storage.main.base.last], ax 0 00003A24 EB2C jmp .special_done 276 <2> 277 <2> .special.last.bb: 0 00003A26 A3[3800] mov word [sym_storage.main.bb.last], ax 0 00003A29 EB27 jmp .special_done 280 <2> 281 <2> .special.last.reloc: 0 00003A2B A3[4000] mov word [sym_storage.main.reloc.last], ax 0 00003A2E EB22 jmp .special_done 284 <2> 285 <2> .special.not_last: 0 00003A30 52 push dx 0 00003A31 50 push ax 0 00003A32 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00003A39 5F pop di 0 00003A3A 07 pop es 0 00003A3B 26395D16 cmp word [es:di + smSpecialPrev], bx 0 00003A3F 7403E9EE0C jne invaliddata 0 00003A44 26894516 mov word [es:di + smSpecialPrev], ax 0 00003A48 06 push es 0 00003A49 57 push di 0 00003A4A 52 push dx 0 00003A4B E8[0000]EB02[3511] dualcall save_slice_farpointer.main 298 <2> .special_done: 299 <2> 0 00003A52 53 push bx 0 00003A53 50 push ax 0 00003A54 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00003A5B 5F pop di 0 00003A5C 07 pop es 305 <2> 0 00003A5D 26F6450D01 testopt [es:di + smFlags], smfBase 0 00003A62 7503E9A000 jz .notbase 308 <2> .base: 309 <2> 0 00003A67 268B5510 mov dx, word [es:di + smBaseNext] 0 00003A6B 268B4512 mov ax, word [es:di + smBasePrev] 0 00003A6F 83FAFF cmp dx, -1 0 00003A72 750B jne @F 314 <2> .base_none_check: 0 00003A74 83F8FF cmp ax, -1 0 00003A77 7403E9B60C jne invaliddata 0 00003A7C E98500 jmp .return_j 318 <2> @@: 319 <2> 0 00003A7F 83F8FF cmp ax, -1 0 00003A82 7503E9AB0C je invaliddata 322 <2> 0 00003A87 56 push si 0 00003A88 BEFFFF mov si, -1 0 00003A8B 26897510 mov word [es:di + smBaseNext], si 0 00003A8F 26897512 mov word [es:di + smBasePrev], si 0 00003A93 06 push es 0 00003A94 57 push di 0 00003A95 53 push bx 0 00003A96 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 331 <2> 332 <2> .base_unlink_assoc: 0 00003A9D 52 push dx 0 00003A9E 50 push ax 0 00003A9F E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00003AA6 5F pop di 0 00003AA7 07 pop es 0 00003AA8 26397512 cmp word [es:di + smBasePrev], si 0 00003AAC 7403E9810C jne invaliddata 0 00003AB1 26834D0EFF or word [es:di + smBase], -1 0 00003AB6 89D6 mov si, dx 0 00003AB8 268B5510 mov dx, word [es:di + smBaseNext] 343 <2> 0 00003ABC 50 push ax 0 00003ABD 53 push bx 0 00003ABE 51 push cx 0 00003ABF 52 push dx 348 <2> 0 00003AC0 BB1000 mov bx, smBaseNext 0 00003AC3 8B0E[3A00] mov cx, word [sym_storage.main.nonbased.first] 0 00003AC7 8B16[3C00] mov dx, word [sym_storage.main.nonbased.last] 352 <2> 0 00003ACB 83F9FF cmp cx, -1 0 00003ACE 7513 jne @F 0 00003AD0 83FAFF cmp dx, -1 0 00003AD3 7403E95A0C jne invaliddata 0 00003AD8 8936[3A00] mov word [sym_storage.main.nonbased.first], si 0 00003ADC 8936[3C00] mov word [sym_storage.main.nonbased.last], si 0 00003AE0 F9 stc 0 00003AE1 EB0D jmp @FF 361 <2> 362 <2> @@: 0 00003AE3 83FAFF cmp dx, -1 0 00003AE6 7503E9470C je invaliddata 0 00003AEB 8936[3C00] mov word [sym_storage.main.nonbased.last], si 0 00003AEF F8 clc 367 <2> @@: 0 00003AF0 E80DF0 nearcall zz_insert_main.linklist 369 <2> 0 00003AF3 5A pop dx 0 00003AF4 59 pop cx 0 00003AF5 5B pop bx 0 00003AF6 58 pop ax 374 <2> 0 00003AF7 83FAFF cmp dx, -1 0 00003AFA 75A1 jne .base_unlink_assoc 0 00003AFC 39C6 cmp si, ax 0 00003AFE 7403E92F0C jne invaliddata 0 00003B03 5E pop si 380 <2> .return_j: 0 00003B04 E9D900 jmp .return 382 <2> 383 <2> 384 <2> .notbase: 0 00003B07 51 push cx 0 00003B08 268B4D0E mov cx, word [es:di + smBase] 0 00003B0C 268B5510 mov dx, word [es:di + smBaseNext] 0 00003B10 268B4512 mov ax, word [es:di + smBasePrev] 389 <2> ; bx = to unlink 390 <2> ; dx = next (-1 if .last field to adjust else index) 391 <2> ; ax = prev (-1 if .first field to adjust else index) 0 00003B14 26897510 mov word [es:di + smBaseNext], si 0 00003B18 26897512 mov word [es:di + smBasePrev], si 0 00003B1C 06 push es 0 00003B1D 57 push di 0 00003B1E 53 push bx 0 00003B1F E8[0000]EB02[3511] dualcall save_slice_farpointer.main 0 00003B26 39F0 cmp ax, si 0 00003B28 7537 jne .notbase_base_not_first 400 <2> .notbase_base_first: 401 <2> 0 00003B2A 83F9FF cmp cx, -1 0 00003B2D 7508 jne @F 0 00003B2F 391E[3A00] cmp word [sym_storage.main.nonbased.first], bx 0 00003B33 7426 je .notbase_base_first.first.nonbased 0 00003B35 EB4C jmp .notbase_base_common 407 <2> 408 <2> @@: 0 00003B37 51 push cx 0 00003B38 50 push ax 0 00003B39 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00003B40 5F pop di 0 00003B41 07 pop es 0 00003B42 26395D10 cmp word [es:di + smBaseNext], bx 0 00003B46 7403E9E70B jne invaliddata 0 00003B4B 26895510 mov word [es:di + smBaseNext], dx 0 00003B4F 06 push es 0 00003B50 57 push di 0 00003B51 51 push cx 0 00003B52 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 0 00003B59 EB28 jmp .notbase_base_common 422 <2> 423 <2> .notbase_base_first.first.nonbased: 0 00003B5B 8916[3A00] mov word [sym_storage.main.nonbased.first], dx 0 00003B5F EB22 jmp .notbase_base_common 426 <2> 427 <2> .notbase_base_not_first: 0 00003B61 50 push ax 0 00003B62 50 push ax 0 00003B63 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00003B6A 5F pop di 0 00003B6B 07 pop es 0 00003B6C 26395D10 cmp word [es:di + smBaseNext], bx 0 00003B70 7403E9BD0B jne invaliddata 0 00003B75 26895510 mov word [es:di + smBaseNext], dx 0 00003B79 06 push es 0 00003B7A 57 push di 0 00003B7B 50 push ax 0 00003B7C E8[0000]EB02[3511] dualcall save_slice_farpointer.main 440 <2> 441 <2> .notbase_base_common: 0 00003B83 39F2 cmp dx, si 0 00003B85 7536 jne .notbase_base.not_last 444 <2> .notbase_base.last: 445 <2> 0 00003B87 83F9FF cmp cx, -1 0 00003B8A 7508 jne @F 0 00003B8C 391E[3C00] cmp word [sym_storage.main.nonbased.last], bx 0 00003B90 7426 je .notbase_base.last.nonbased 0 00003B92 EB4B jmp .notbase_base_done 451 <2> 452 <2> @@: 0 00003B94 51 push cx 0 00003B95 50 push ax 0 00003B96 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00003B9D 5F pop di 0 00003B9E 07 pop es 0 00003B9F 26395D12 cmp word [es:di + smBasePrev], bx 0 00003BA3 7403E98A0B jne invaliddata 0 00003BA8 26894512 mov word [es:di + smBasePrev], ax 0 00003BAC 06 push es 0 00003BAD 57 push di 0 00003BAE 51 push cx 0 00003BAF E8[0000]EB02[3511] dualcall save_slice_farpointer.main 0 00003BB6 EB27 jmp .notbase_base_done 466 <2> 467 <2> .notbase_base.last.nonbased: 0 00003BB8 A3[3C00] mov word [sym_storage.main.nonbased.last], ax 0 00003BBB EB22 jmp .notbase_base_done 470 <2> 471 <2> .notbase_base.not_last: 0 00003BBD 52 push dx 0 00003BBE 50 push ax 0 00003BBF E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00003BC6 5F pop di 0 00003BC7 07 pop es 0 00003BC8 26395D12 cmp word [es:di + smBasePrev], bx 0 00003BCC 7403E9610B jne invaliddata 0 00003BD1 26894512 mov word [es:di + smBasePrev], ax 0 00003BD5 06 push es 0 00003BD6 57 push di 0 00003BD7 52 push dx 0 00003BD8 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 484 <2> .notbase_base_done: 0 00003BDF 59 pop cx 486 <2> 487 <2> .return: 0 00003BE0 5E pop si 0 00003BE1 C3 retn 490 <2> %else 491 <2> push bx 492 <2> push ax 493 <2> dualcall getfarpointer.main 494 <2> pop di 495 <2> pop es 496 <2> mov dx, -1 497 <2> xchg dx, word [es:di + smNext] 498 <2> 499 <2> cmp dx, -1 500 <2> je @F 501 <2> push es 502 <2> push di 503 <2> push bx 504 <2> dualcall save_slice_farpointer.main 505 <2> @@: 506 <2> 507 <2> mov ax, word [sym_storage.main.first] 508 <2> cmp ax, bx 509 <2> jne .notstart 510 <2> mov word [sym_storage.main.first], dx 511 <2> mov ax, -1 512 <2> jmp .updatelast 513 <2> 514 <2> .next: 515 <2> mov ax, word [es:di + smNext] 516 <2> 517 <2> .notstart: 518 <2> .loop: 519 <2> cmp ax, -1 520 <2> je .checkrelocate 521 <2> cmp ax, word [sym_storage.main.free] 522 <2> jae invaliddata 523 <2> 524 <2> push ax 525 <2> push ax 526 <2> dualcall getfarpointer.main 527 <2> pop di 528 <2> pop es 529 <2> cmp word [es:di + smNext], bx 530 <2> jne .next 531 <2> mov word [es:di + smNext], dx 532 <2> push es 533 <2> push di 534 <2> push ax 535 <2> dualcall save_slice_farpointer.main 536 <2> .updatelast: 537 <2> cmp word [sym_storage.main.last], bx 538 <2> jne .done 539 <2> mov word [sym_storage.main.last], ax 540 <2> jmp .done 541 <2> 542 <2> 543 <2> .checkrelocate: 544 <2> mov ax, word [sym_storage.main.relocate] 545 <2> cmp ax, bx 546 <2> jne .notrelocatestart 547 <2> mov word [sym_storage.main.relocate], dx 548 <2> jmp .done 549 <2> 550 <2> .relocatenext: 551 <2> mov ax, word [es:di + smNext] 552 <2> 553 <2> .notrelocatestart: 554 <2> .relocateloop: 555 <2> cmp ax, -1 556 <2> je .done 557 <2> cmp ax, word [sym_storage.main.free] 558 <2> jae invaliddata 559 <2> 560 <2> push ax 561 <2> push ax 562 <2> dualcall getfarpointer.main 563 <2> pop di 564 <2> pop es 565 <2> cmp word [es:di + smNext], bx 566 <2> jne .relocatenext 567 <2> mov word [es:di + smNext], dx 568 <2> push es 569 <2> push di 570 <2> push ax 571 <2> dualcall save_slice_farpointer.main 572 <2> 573 <2> .done: 574 <2> retn 575 <2> %endif 576 <2> 577 <2> 578 <2> ; INP: word [ss:sp] = start index of move (destination) 579 <2> ; cx = how much to move, in indices 580 <2> ; si:di = how far to move, in bytes 581 <2> ; CHG: di, es, bx, si, cx 582 <2> ; STT: ds = data selector/segment 583 <2> ; (used to access zz_xms.*, sym_storage.*, symsel*) 584 <2> ; ss don't care 585 <2> ; 586 <2> ; Note: This moves forwards the content starting at the 587 <2> ; indicated index, with the specified size, and thus 588 <2> ; shortens the array by as much as is overwritten. 589 <2> ; Note: This invalidates the access slice. 590 <2> move_delete_farpointer: 591 <2> 592 <2> dualfunction 593 <2> .main: section_of_function move_delete_farpointer 0 00003BE2 BF1800 mov di, SYMMAIN_index_size 0 00003BE5 31F6 xor si, si 596 <2> dualfunction 597 <2> .main.sidi: section_of_function move_delete_farpointer 598 <2> %if _XMS_SYMBOL_TABLE 0 00003BE7 833E[9C00]FF cmp word [zz_xms.handle], -1 0 00003BEC 7403E91601 jne .main.xms.sidi 601 <2> %endif 602 <2> %ifn _XMS_ONLY 603 <2> lframe dualdistance 604 <2> lpar word, index_start_move 0 00003BF1 5589E5 lenter 606 <2> lvar word, orig_ax 0 00003BF4 50 push ax 0 00003BF5 B81800 mov ax, SYMMAIN_size 609 <2> lvar word, index_size 0 00003BF8 50 push ax 611 <2> lvar dword, start_pointer 0 00003BF9 FF36[1A00] push word [sym_storage.main.start + 2] 0 00003BFD FF36[1800] push word [sym_storage.main.start] 614 <2> %endif 0 00003C01 EB3B jmp .common 616 <2> 617 <2> dualfunction 618 <2> .hash: section_of_function move_delete_farpointer 0 00003C03 BF0400 mov di, SYMHASH_index_size 0 00003C06 31F6 xor si, si 621 <2> dualfunction 622 <2> .hash.sidi: section_of_function move_delete_farpointer 623 <2> %if _XMS_SYMBOL_TABLE 0 00003C08 833E[9C00]FF cmp word [zz_xms.handle], -1 0 00003C0D 7403E90701 jne .hash.xms.sidi 626 <2> %endif 627 <2> %ifn _XMS_ONLY 628 <2> lframe dualdistance, nested 629 <2> lpar word, index_start_move 0 00003C12 5589E5 lenter 631 <2> lvar word, orig_ax 0 00003C15 50 push ax 0 00003C16 B80400 mov ax, SYMHASH_size 634 <2> lvar word, index_size 0 00003C19 50 push ax 636 <2> lvar dword, start_pointer 0 00003C1A FF36[1E00] push word [sym_storage.hash.start + 2] 0 00003C1E FF36[1C00] push word [sym_storage.hash.start] 0 00003C22 EB1A jmp .common 640 <2> 641 <2> ldup 642 <2> %else 643 <2> jmp .common 644 <2> %endif 645 <2> 646 <2> dualfunction 647 <2> .str.sidi: section_of_function move_delete_farpointer 648 <2> %if _XMS_SYMBOL_TABLE 0 00003C24 833E[9C00]FF cmp word [zz_xms.handle], -1 0 00003C29 7403E9FD00 jne .str.xms.sidi 651 <2> %endif 652 <2> %ifn _XMS_ONLY 653 <2> lframe dualdistance, nested 654 <2> lpar word, index_start_move 0 00003C2E 5589E5 lenter 656 <2> lvar word, orig_ax 0 00003C31 50 push ax 0 00003C32 B80400 mov ax, SYMSTR_size 659 <2> lvar word, index_size 0 00003C35 50 push ax 661 <2> lvar dword, start_pointer 0 00003C36 FF36[2200] push word [sym_storage.str.start + 2] 0 00003C3A FF36[2000] push word [sym_storage.str.start] 664 <2> 665 <2> ldup 666 <2> 667 <2> lleave ctx 668 <2> lleave ctx 669 <2> 670 <2> .common: 671 <2> lvar dword, how_far 0 00003C3E 56 push si 0 00003C3F 57 push di 0 00003C40 1E push ds 0 00003C41 52 push dx 0 00003C42 50 push ax 0 00003C43 F7E1 mul cx ; dx:ax = how much to move, in bytes 0 00003C45 89D3 mov bx, dx 0 00003C47 89C1 mov cx, ax ; bx:cx = how much to move 0 00003C49 58 pop ax 681 <2> 0 00003C4A F76606 mul word [bp + ?index_start_move] 683 <2> ; dx:ax = where to move to 684 <2> 0 00003C4D 91 xchg ax, cx 0 00003C4E 87DA xchg bx, dx 0 00003C50 FF76FA push word [bp + ?start_pointer + 2] 0 00003C53 FF76F8 push word [bp + ?start_pointer] 0 00003C56 E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 00003C5D 5F pop di 691 <2> %if _PM 0 00003C5E FF36[0000] push word [symsel1] 0 00003C62 E8[0000]EB02[0E12] dualcall segment_to_selector 694 <2> %endif 0 00003C69 07 pop es ; es:di -> ?start_pointer + where to move to 0 00003C6A 91 xchg ax, cx 0 00003C6B 87DA xchg bx, dx 698 <2> 0 00003C6D 8B56F6 mov dx, word [bp + ?how_far + 2] 0 00003C70 8B46F4 mov ax, word [bp + ?how_far] 0 00003C73 85D2 test dx, dx 0 00003C75 7504 jnz @F 0 00003C77 85C0 test ax, ax 0 00003C79 7406 jz .none_j1_NZ 705 <2> @@: 706 <2> ; dx:ax = how far, in bytes 707 <2> 0 00003C7B 85DB test bx, bx 0 00003C7D 7504 jnz @F 0 00003C7F 85C9 test cx, cx 711 <2> .none_j1_NZ: 0 00003C81 7476 jz .none 713 <2> @@: 714 <2> 0 00003C83 91 xchg ax, cx 0 00003C84 87D3 xchg dx, bx ; bx:cx = how far 0 00003C86 06 push es 718 <2> %if _PM 0 00003C87 E8[0000]EB02[3F12] dualcall selector_to_segment 720 <2> %endif 0 00003C8E 57 push di 0 00003C8F E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 00003C96 91 xchg ax, cx 0 00003C97 87D3 xchg dx, bx ; bx:cx = how much 0 00003C99 5E pop si 726 <2> %if _PM 0 00003C9A A1[0000] mov ax, word [symsel1] 0 00003C9D 8B16[0000] mov dx, word [symsel2] 0 00003CA1 52 push dx 0 00003CA2 E8[0000]EB02[0E12] dualcall segment_to_selector 731 <2> %endif 0 00003CA9 1F pop ds ; ds:si -> source 733 <2> 734 <2> .move_loop: 0 00003CAA 83E9F0 sub cx, SEGTRANSFER_size 0 00003CAD 83DB00 sbb bx, 0 0 00003CB0 723D jc .move_last 738 <2> 0 00003CB2 51 push cx 0 00003CB3 B9F87F mov cx, SEGTRANSFER_size / 2 0 00003CB6 F3A5 rep movsw 0 00003CB8 59 pop cx 743 <2> 0 00003CB9 1E push ds 745 <2> %if _PM 0 00003CBA E8[0000]EB02[3F12] dualcall selector_to_segment 747 <2> %endif 0 00003CC1 56 push si 0 00003CC2 E8[0000]EB02[1A14] dualcall normalise_pointer 0 00003CC9 5E pop si 751 <2> %if _PM 0 00003CCA 52 push dx 0 00003CCB E8[0000]EB02[0E12] dualcall segment_to_selector 754 <2> %endif 0 00003CD2 1F pop ds 0 00003CD3 06 push es 757 <2> %if _PM 0 00003CD4 E8[0000]EB02[3F12] dualcall selector_to_segment 759 <2> %endif 0 00003CDB 57 push di 0 00003CDC E8[0000]EB02[1A14] dualcall normalise_pointer 0 00003CE3 5F pop di 763 <2> %if _PM 0 00003CE4 50 push ax 0 00003CE5 E8[0000]EB02[0E12] dualcall segment_to_selector 766 <2> %endif 0 00003CEC 07 pop es 768 <2> 0 00003CED EBBB jmp .move_loop 770 <2> 771 <2> .move_last: 0 00003CEF 83C1F0 add cx, SEGTRANSFER_size 0 00003CF2 83D300 adc bx, 0 774 <2> 0 00003CF5 D1E9 shr cx, 1 0 00003CF7 F3A5 rep movsw 777 <2> 778 <2> .move_end: 779 <2> 780 <2> .none: ; bx:cx = 0, nothing to move 0 00003CF9 5A pop dx 0 00003CFA 1F pop ds 0 00003CFB 8B46FE mov ax, word [bp + ?orig_ax] 0 00003CFE 89EC5D lleave 0 00003D01 E8[0000] dualreturn 0 00003D04 CA0200 lret 787 <2> %else 788 <2> .common: 789 <2> jmp exit_no_xms 790 <2> %endif 791 <2> 792 <2> %if _XMS_SYMBOL_TABLE 793 <2> ; INP: word [ss:sp] = start index of move (destination) 794 <2> ; cx = how much to move, in indices 795 <2> ; si:di = how far to move, in bytes 796 <2> ; CHG: di, es, bx, si, cx 797 <2> ; STT: ds = data selector/segment 798 <2> ; (used to access zz_xms.*, sym_storage.*, symsel*) 799 <2> ; ss don't care 800 <2> ; 801 <2> ; Note: This moves forwards the content starting at the 802 <2> ; indicated index, with the specified size, and thus 803 <2> ; shortens the array by as much as is overwritten. 804 <2> ; Note: This invalidates the access slice. 805 <2> dualfunction 806 <2> .main.xms.sidi: section_of_function move_delete_farpointer 807 <2> lframe dualdistance 808 <2> lpar word, index_start_move 0 00003D07 5589E5 lenter 810 <2> lvar word, orig_ax 0 00003D0A 50 push ax 0 00003D0B B81800 mov ax, SYMMAIN_size 813 <2> lvar word, index_size 0 00003D0E 50 push ax 815 <2> lvar dword, start_pointer 0 00003D0F FF36[0600] push word [sym_storage.main.xms.start + 2] 0 00003D13 FF36[0400] push word [sym_storage.main.xms.start] 0 00003D17 EB22 jmp .common.xms 819 <2> 820 <2> dualfunction 821 <2> .hash.xms.sidi: section_of_function move_delete_farpointer 822 <2> lframe dualdistance, nested 823 <2> lpar word, index_start_move 0 00003D19 5589E5 lenter 825 <2> lvar word, orig_ax 0 00003D1C 50 push ax 0 00003D1D B80400 mov ax, SYMHASH_size 828 <2> lvar word, index_size 0 00003D20 50 push ax 830 <2> lvar dword, start_pointer 0 00003D21 FF36[0A00] push word [sym_storage.hash.xms.start + 2] 0 00003D25 FF36[0800] push word [sym_storage.hash.xms.start] 0 00003D29 EB10 jmp .common.xms 834 <2> 835 <2> ldup 836 <2> 837 <2> dualfunction 838 <2> .str.xms.sidi: section_of_function move_delete_farpointer 839 <2> lframe dualdistance, nested 840 <2> lpar word, index_start_move 0 00003D2B 5589E5 lenter 842 <2> lvar word, orig_ax 0 00003D2E 50 push ax 0 00003D2F B80400 mov ax, SYMSTR_size 845 <2> lvar word, index_size 0 00003D32 50 push ax 847 <2> lvar dword, start_pointer 0 00003D33 FF36[0E00] push word [sym_storage.str.xms.start + 2] 0 00003D37 FF36[0C00] push word [sym_storage.str.xms.start] 850 <2> 851 <2> ldup 852 <2> 853 <2> lleave ctx 854 <2> lleave ctx 855 <2> 856 <2> .common.xms: 857 <2> lvar dword, how_far 0 00003D3B 56 push si 0 00003D3C 57 push di 0 00003D3D 52 push dx 0 00003D3E 50 push ax 0 00003D3F F7E1 mul cx ; dx:ax = how much to move, in bytes 0 00003D41 89D3 mov bx, dx 0 00003D43 89C1 mov cx, ax ; bx:cx = how much to move 0 00003D45 58 pop ax 866 <2> 0 00003D46 F76606 mul word [bp + ?index_start_move] 868 <2> ; dx:ax = where to move to 869 <2> 0 00003D49 0146F8 add word [bp + ?start_pointer], ax 0 00003D4C 1156FA adc word [bp + ?start_pointer + 2], dx 872 <2> ; = ?start_pointer + where to move to 873 <2> 0 00003D4F 8B56F6 mov dx, word [bp + ?how_far + 2] 0 00003D52 8B46F4 mov ax, word [bp + ?how_far] 0 00003D55 85D2 test dx, dx 0 00003D57 7504 jnz @F 0 00003D59 85C0 test ax, ax 0 00003D5B 7442 jz .none.xms 880 <2> @@: 881 <2> ; dx:ax = how far, in bytes 882 <2> 0 00003D5D 85DB test bx, bx 0 00003D5F 7504 jnz @F 0 00003D61 85C9 test cx, cx 0 00003D63 743A jz .none.xms 887 <2> @@: 888 <2> 0 00003D65 FF76FA push word [bp + ?start_pointer + 2] 0 00003D68 FF76F8 push word [bp + ?start_pointer] 0 00003D6B 8F06[7C00] pop word [zz_xms.movestruc + xmsmDestAddress] 0 00003D6F 8F06[7E00] pop word [zz_xms.movestruc + xmsmDestAddress + 2] 893 <2> 0 00003D73 0346F8 add ax, [bp + ?start_pointer] 0 00003D76 1356FA adc dx, [bp + ?start_pointer + 2] 0 00003D79 A3[7600] mov word [zz_xms.movestruc + xmsmSourceAddress], ax 0 00003D7C 8916[7800] mov word [zz_xms.movestruc + xmsmSourceAddress + 2], dx 898 <2> 0 00003D80 FF36[9C00] push word [zz_xms.handle] 0 00003D84 FF36[9C00] push word [zz_xms.handle] 0 00003D88 8F06[7400] pop word [zz_xms.movestruc + xmsmSourceHandle] 0 00003D8C 8F06[7A00] pop word [zz_xms.movestruc + xmsmDestHandle] 903 <2> 0 00003D90 891E[7200] mov word [zz_xms.movestruc + xmsmCount + 2], bx 0 00003D94 890E[7000] mov word [zz_xms.movestruc + xmsmCount], cx 906 <2> 0 00003D98 E8[0000]EB02[4502] nearcall call_xms_move 908 <2> 909 <2> .none.xms: ; bx:cx = 0, nothing to move 0 00003D9F 5A pop dx 0 00003DA0 8B46FE mov ax, word [bp + ?orig_ax] 0 00003DA3 89EC5D lleave 0 00003DA6 E8[0000] dualreturn 0 00003DA9 CA0200 lret 915 <2> %endif ; _XMS_SYMBOL_TABLE 3143 <1> %endif 3144 <1> 3145 <1> %if _USE_COMPACT 3146 <1> %include "compact.asm" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbol table compaction implementation 5 <2> by 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> %include "lmacros2.mac" 1 <3> [list -] 16 <2> %include "symbols.mac" 1 <3> 2 <3> %if 0 3 <3> 4 <3> Symbolic debugging macros 5 <3> by C. Masloch, 2019 6 <3> 7 <3> Usage of the works is permitted provided that this 8 <3> instrument is retained with the works, so that any entity 9 <3> that uses the works is notified of this instrument. 10 <3> 11 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 12 <3> 13 <3> %endif 14 <3> 15 <3> %ifndef __SYMBOLS_MAC__ 16 <3> %assign __SYMBOLS_MAC__ 1 17 <3> 18 <3> numdef SYMMAINLARGE, 1 19 <3> 20 <3> 21 <3> ; Note: SYMMAINs are stored as an array, which is sorted 22 <3> ; on the smLinear value. Therefore, binary search can 23 <3> ; be used to find an entry in the entire array. 24 <3> struc SYMMAIN 25 <3> smLinear: resd 1 ; linear address of symbol 26 <3> ; Currently all symbols are fully filled, with a 32-bit 27 <3> ; linear value and a 32-bit offset value. (It is of course 28 <3> ; valid to use an offset that fits in 16 bits.) 29 <3> ; Symbols without either a linear or an offset value 30 <3> ; may be supported later, in which case there would be 31 <3> ; a flag to indicate this. 32 <3> smOffset: resd 1 ; offset of symbol 33 <3> ; The following two fields are SYMSTR heap dword indices. 34 <3> ; The value 0 is special, it refers to the empty string. 35 <3> ; To simplify handling of this, the SYMSTR heap contains 36 <3> ; an actual entry with an empty string at index 0. 37 <3> smName1: resw 1 ; -> first string part 38 <3> smName2: resw 1 ; -> second string part 39 <3> smHashByte: ; (low byte of flags is truncated hash value) 40 <3> smFlags: resw 1 ; flags 41 <3> ; The following field is a SYMMAIN paragraph index. 42 <3> ; The value -1 indicates none. 43 <3> %if _SYMMAINLARGE 44 <3> smBase: ; SYMMAIN entry this one is based from 45 <3> %else 46 <3> smNext: ; SYMMAIN entry which was loaded next 47 <3> %endif 48 <3> resw 1 49 <3> alignb 16 50 <3> %if _SYMMAINLARGE 51 <3> ; smBaseNext and smBasePrev form a doubly-linked list 52 <3> ; of the entries belonging to a particular base SYMMAIN. 53 <3> ; -1 indicates no next or no previous entry. 54 <3> ; If smfBase is set then the smBaseNext contains a link 55 <3> ; to the first entry belonging to this SYMMAIN as a base, 56 <3> ; and smBasePrev links to the last entry. -1 if none. 57 <3> smBaseNext: resw 1 58 <3> smBasePrev: resw 1 59 <3> ; If smfBase is set these fields form a doubly-linked list 60 <3> ; of all SYMMAIN entries with smfBase set. 61 <3> ; If smfBreakpoint is set these fields form a doubly-linked 62 <3> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <3> ; These fields are also used by zz_relocate to remember 64 <3> ; which entries to relocate. 65 <3> smSpecialNext: resw 1 66 <3> smSpecialPrev: resw 1 67 <3> %endif 68 <3> endstruc 69 <3> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <3> %error Unexpected SYMMAIN_size 71 <3> %endif 72 <3> SYMMAIN_index_size equ SYMMAIN_size 73 <3> 74 <3> insertfDropSymHintStoreString: equ 1 75 <3> insertfExistingMask equ 0E0h 76 <3> insertfExistingDefaultSymbol equ 00h 77 <3> insertfExistingDefaultStart equ 20h 78 <3> insertfExistingBlockDiffering equ 40h 79 <3> insertfExistingBlockAll equ 60h 80 <3> insertfExistingUpdate equ 80h 81 <3> insertfExistingDuplicate equ 0A0h 82 <3> insertfExistingKeep equ 0C0h 83 <3> ; insertfExisting equ 0E0h 84 <3> smfSectionStartEnd: equ 100h 85 <3> smfBase: equ 100h 86 <3> smfAnonLabel: equ 200h 87 <3> smfSymHint: equ 400h 88 <3> smfSymHintStoreString: equ 800h 89 <3> smfPoison: equ 1000h 90 <3> smfBreakpoint: equ 2000h 91 <3> 92 <3> struc SYMSTR 93 <3> ; The following two fields are expected to be consecutive, they 94 <3> ; are accessed together as a word. (Refer to ssLength usages.) 95 <3> ssLength: resb 1 ; how long this string is (only ssString) 96 <3> ssRefCount: resb 1 ; how often this string is referenced 97 <3> ; The ssRefCount value can be: 98 <3> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <3> ; A reference may be added, incrementing the count. 100 <3> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <3> ; If all references are freed, it is expected that 102 <3> ; the count decreases to zero. 103 <3> ; A reference may be added, incrementing the count. 104 <3> ; 254 = Referenced SYMSTR, with that many references. 105 <3> ; No reference may be added, as 254 is the maximum 106 <3> ; reference count that indicates a referenced SYMSTR. 107 <3> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <3> ; times. May not be deleted unless all tables are freed. 109 <3> ; This is used by the empty string SYMSTR at index 0. 110 <3> ssHash: resw 1 ; hash value of this string 111 <3> ssString: ; actual string content 112 <3> ; Note that if the string is not dword-aligned, NUL bytes are 113 <3> ; appended to insure that the SYMSTR structure is padded to a 114 <3> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <3> ; Therefore, the size of a SYMSTR record is obtained by 116 <3> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <3> ; (Note: A terminating NUL byte is not included if the string 118 <3> ; length is dword-aligned already. The length must be used 119 <3> ; directly, not implied by a terminator.) 120 <3> endstruc 121 <3> SYMSTR_typical_size equ 28 122 <3> SYMSTR_index_size equ 4 123 <3> 124 <3> ; Note: SYMHASHs are stored as an array, which is sorted 125 <3> ; on the shHash value. Therefore, binary search can 126 <3> ; be used to find an entry in the entire array. 127 <3> ; 128 <3> ; The hash value is computed by hashing the entire name 129 <3> ; string (ie, both smName1 and smName2 string contents) 130 <3> ; with the algorithm as such: 131 <3> ; 132 <3> ; for (hash = 1, index = 0; index < length; index += 1) 133 <3> ; hash = hash * 31 + name[index]; 134 <3> struc SYMHASH 135 <3> shHash: resw 1 ; hash value 136 <3> shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <3> endstruc 138 <3> SYMHASH_index_size equ SYMHASH_size 139 <3> 140 <3> 141 <3> struc XMSMOVE 142 <3> xmsmCount: resd 1 143 <3> ; The count must be even. 144 <3> xmsmSourceHandle: resw 1 145 <3> xmsmSourceAddress: resd 1 146 <3> xmsmDestHandle: resw 1 147 <3> xmsmDestAddress: resd 1 148 <3> ; The destination and source may overlap only if a 149 <3> ; forward move would suffice to implement the 150 <3> ; operation without corrupting the data. (That is, 151 <3> ; the source starts above the destination. The XMS 152 <3> ; specification gets this detail wrong.) 153 <3> ; There is an error code for invalid overlap, but 154 <3> ; it is unclear whether this condition is detected 155 <3> ; properly by all implementations. 156 <3> endstruc 157 <3> 158 <3> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <3> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <3> 161 <3> 162 <3> %endif 17 <2> 18 <2> defaulting 19 <2> 20 <2> 21 <2> zz_compact: 22 <2> %if _XMS_SYMBOL_TABLE 0 00003DAC 833E[9C00]FF cmp word [zz_xms.handle], -1 0 00003DB1 7403E91801 jne zz_compact_xms 25 <2> %endif 26 <2> 27 <2> %if _XMS_ONLY 28 <2> jmp exit_no_xms 29 <2> %else 0 00003DB6 E8B901 nearcall zz_compact_expand_check_nonxms 31 <2> 0 00003DB9 A1[2E00] mov ax, word [sym_storage.main.free] 0 00003DBC A3[2C00] mov word [sym_storage.main.end], ax 34 <2> ; ax = amount entries to take for SYMMAIN array 0 00003DBF 31D2 xor dx, dx ; dx:ax = SYMMAIN index 36 <2> %if SYMMAIN_size == 16 37 <2> mov cx, 4 38 <2> @@: 39 <2> shl ax, 1 40 <2> rcl dx, 1 41 <2> loop @B ; convert SYMMAIN index to byte index (* 16) 42 <2> 43 <2> mov bx, dx 44 <2> mov cx, ax ; bx:cx = byte index 45 <2> %elif SYMMAIN_size == 24 0 00003DC1 B90300 mov cx, 3 47 <2> @@: 0 00003DC4 D1E0 shl ax, 1 0 00003DC6 D1D2 rcl dx, 1 0 00003DC8 E2FA loop @B ; * 8 0 00003DCA 89D3 mov bx, dx 0 00003DCC 89C1 mov cx, ax ; bx:cx = SYMMAIN index times 8 0 00003DCE D1E0 shl ax, 1 0 00003DD0 D1D2 rcl dx, 1 ; * 16 0 00003DD2 01C1 add cx, ax 0 00003DD4 11D3 adc bx, dx ; * 24 57 <2> %else 58 <2> %error Unexpected SYMMAIN size 59 <2> %endif 0 00003DD6 FF36[1A00] push word [sym_storage.main.start + 2] 0 00003DDA FF36[1800] push word [sym_storage.main.start] 0 00003DDE E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = main.start linear 0 00003DE5 01C8 add ax, cx 0 00003DE7 11DA adc dx, bx 0 00003DE9 87D6 xchg dx, si 0 00003DEB 97 xchg ax, di ; si:di = main end linear 67 <2> 0 00003DEC FF36[1E00] push word [sym_storage.hash.start + 2] 0 00003DF0 FF36[1C00] push word [sym_storage.hash.start] 0 00003DF4 E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = hash.start linear 0 00003DFB 87D6 xchg dx, si 0 00003DFD 97 xchg ax, di ; si:di = hash.start linear, dx:ax = main end 73 <2> 0 00003DFE 29C7 sub di, ax 0 00003E00 19D6 sbb si, dx ; current hash.start - new hash.start 76 <2> ; = how far to relocate down (in bytes) 0 00003E02 89F9 mov cx, di 0 00003E04 89F3 mov bx, si 79 <2> 0 00003E06 F7DB neg bx 0 00003E08 F7D9 neg cx 0 00003E0A 83DB00 sbb bx, byte 0 ; neg bx:cx 83 <2> 0 00003E0D FF36[1E00] push word [sym_storage.hash.start + 2] 0 00003E11 FF36[1C00] push word [sym_storage.hash.start] 0 00003E15 E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 00003E1C 8F06[1C00] pop word [sym_storage.hash.start] 0 00003E20 8F06[1E00] pop word [sym_storage.hash.start + 2] 89 <2> ; adjust hash.start 90 <2> 0 00003E24 31C0 xor ax, ax 0 00003E26 50 push ax ; start index of move (destination) 0 00003E27 8B0E[4800] mov cx, word [sym_storage.hash.free] 94 <2> ; size of moved data, in indices (= all) 95 <2> ; si:di = how far to move down 0 00003E2B E8[0000]EB02[A218] dualcall move_delete_farpointer.hash.sidi 97 <2> 98 <2> 0 00003E32 A1[4800] mov ax, word [sym_storage.hash.free] 0 00003E35 A3[4600] mov word [sym_storage.hash.end], ax 101 <2> ; ax = amount indices to take for SYMHASH array 0 00003E38 31D2 xor dx, dx 103 <2> %if SYMHASH_size == 4 0 00003E3A 01C0 add ax, ax 0 00003E3C 11D2 adc dx, dx 0 00003E3E 01C0 add ax, ax 0 00003E40 11D2 adc dx, dx ; convert SYMHASH index to byte index 108 <2> %else 109 <2> %error Unexpected SYMHASH size 110 <2> %endif 111 <2> 0 00003E42 89D3 mov bx, dx 0 00003E44 89C1 mov cx, ax 114 <2> 0 00003E46 FF36[1E00] push word [sym_storage.hash.start + 2] 0 00003E4A FF36[1C00] push word [sym_storage.hash.start] 0 00003E4E E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = hash.start linear 0 00003E55 01C8 add ax, cx 0 00003E57 11DA adc dx, bx 0 00003E59 87D6 xchg dx, si 0 00003E5B 97 xchg ax, di ; si:di = hash end linear 122 <2> 0 00003E5C FF36[2200] push word [sym_storage.str.start + 2] 0 00003E60 FF36[2000] push word [sym_storage.str.start] 0 00003E64 E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = str.start linear 0 00003E6B 87D6 xchg dx, si 0 00003E6D 97 xchg ax, di ; si:di = str.start linear, dx:ax = hash end 128 <2> 0 00003E6E 29C7 sub di, ax 0 00003E70 19D6 sbb si, dx ; current str.start - new str.start 131 <2> ; = how far to relocate down (in bytes) 0 00003E72 89F9 mov cx, di 0 00003E74 89F3 mov bx, si 134 <2> 0 00003E76 F7DB neg bx 0 00003E78 F7D9 neg cx 0 00003E7A 83DB00 sbb bx, byte 0 ; neg bx:cx 138 <2> 0 00003E7D FF36[2200] push word [sym_storage.str.start + 2] 0 00003E81 FF36[2000] push word [sym_storage.str.start] 0 00003E85 E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 00003E8C 8F06[2000] pop word [sym_storage.str.start] 0 00003E90 8F06[2200] pop word [sym_storage.str.start + 2] 144 <2> ; adjust str.start 145 <2> 0 00003E94 31C0 xor ax, ax 0 00003E96 50 push ax ; start index of move (destination) 0 00003E97 8B0E[4C00] mov cx, word [sym_storage.str.free] 149 <2> ; size of moved data, in indices (= all) 150 <2> ; si:di = how far to move down 0 00003E9B E8[0000]EB02[BE18] dualcall move_delete_farpointer.str.sidi 152 <2> 153 <2> 0 00003EA2 A1[4C00] mov ax, word [sym_storage.str.free] 0 00003EA5 A3[4A00] mov word [sym_storage.str.end], ax 156 <2> ; ax = amount indices to take for SYMSTR heap 0 00003EA8 31D2 xor dx, dx 158 <2> %if SYMSTR_index_size == 4 0 00003EAA 01C0 add ax, ax 0 00003EAC 11D2 adc dx, dx 0 00003EAE 01C0 add ax, ax 0 00003EB0 11D2 adc dx, dx ; dx:ax = amount bytes to take for SYMSTR heap 163 <2> %else 164 <2> %error Unexpected SYMSTR index size 165 <2> %endif 166 <2> 0 00003EB2 89D3 mov bx, dx 0 00003EB4 89C1 mov cx, ax 169 <2> 0 00003EB6 FF36[2200] push word [sym_storage.str.start + 2] 0 00003EBA FF36[2000] push word [sym_storage.str.start] 0 00003EBE E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 00003EC5 8F06[2400] pop word [sym_storage.free] 0 00003EC9 8F06[2600] pop word [sym_storage.free + 2] 175 <2> ; -> behind SYMSTR heap 176 <2> 0 00003ECD C3 retn 178 <2> %endif 179 <2> 180 <2> 181 <2> %if _XMS_SYMBOL_TABLE 182 <2> zz_compact_xms: 0 00003ECE E84701 nearcall zz_compact_expand_check_xms 184 <2> 0 00003ED1 A1[2E00] mov ax, word [sym_storage.main.free] 0 00003ED4 A3[2C00] mov word [sym_storage.main.end], ax 187 <2> ; ax = amount entries to take for SYMMAIN array 0 00003ED7 31D2 xor dx, dx ; dx:ax = SYMMAIN index 189 <2> %if SYMMAIN_size == 16 190 <2> mov cx, 4 191 <2> @@: 192 <2> shl ax, 1 193 <2> rcl dx, 1 194 <2> loop @B ; convert SYMMAIN index to byte index (* 16) 195 <2> ; dx:ax = byte index 196 <2> %elif SYMMAIN_size == 24 0 00003ED9 B90300 mov cx, 3 198 <2> @@: 0 00003EDC D1E0 shl ax, 1 0 00003EDE D1D2 rcl dx, 1 0 00003EE0 E2FA loop @B ; * 8 0 00003EE2 89D3 mov bx, dx 0 00003EE4 89C1 mov cx, ax ; bx:cx = SYMMAIN index times 8 0 00003EE6 D1E0 shl ax, 1 0 00003EE8 D1D2 rcl dx, 1 ; * 16 0 00003EEA 01C8 add ax, cx 0 00003EEC 11DA adc dx, bx ; * 24 208 <2> ; dx:ax = byte index 209 <2> %else 210 <2> %error Unexpected SYMMAIN size 211 <2> %endif 0 00003EEE 0306[0400] add ax, word [sym_storage.main.xms.start] 0 00003EF2 1316[0600] adc dx, word [sym_storage.main.xms.start + 2] 214 <2> 0 00003EF6 8B36[0A00] mov si, word [sym_storage.hash.xms.start + 2] 0 00003EFA 8B3E[0800] mov di, word [sym_storage.hash.xms.start] 217 <2> 0 00003EFE 29C7 sub di, ax 0 00003F00 19D6 sbb si, dx ; current hash.start - new hash.start 220 <2> ; = how far to relocate down (in bytes) 0 00003F02 293E[0800] sub word [sym_storage.hash.xms.start], di 0 00003F06 1936[0A00] sbb word [sym_storage.hash.xms.start + 2], si 223 <2> ; adjust hash.start 224 <2> 0 00003F0A 31C0 xor ax, ax 0 00003F0C 50 push ax ; start index of move (destination) 0 00003F0D 8B0E[4800] mov cx, word [sym_storage.hash.free] 228 <2> ; size of moved data, in indices (= all) 229 <2> ; si:di = how far to move down 0 00003F11 E8[0000]EB02[A218] dualcall move_delete_farpointer.hash.sidi 231 <2> 232 <2> 0 00003F18 A1[4800] mov ax, word [sym_storage.hash.free] 0 00003F1B A3[4600] mov word [sym_storage.hash.end], ax 235 <2> ; ax = amount indices to take for SYMHASH array 0 00003F1E 31D2 xor dx, dx 237 <2> %if SYMHASH_size == 4 0 00003F20 01C0 add ax, ax 0 00003F22 11D2 adc dx, dx 0 00003F24 01C0 add ax, ax 0 00003F26 11D2 adc dx, dx ; convert SYMHASH index to byte index 242 <2> %else 243 <2> %error Unexpected SYMHASH size 244 <2> %endif 245 <2> 0 00003F28 0306[0800] add ax, word [sym_storage.hash.xms.start] 0 00003F2C 1316[0A00] adc dx, word [sym_storage.hash.xms.start + 2] 248 <2> 0 00003F30 8B36[0E00] mov si, word [sym_storage.str.xms.start + 2] 0 00003F34 8B3E[0C00] mov di, word [sym_storage.str.xms.start] 251 <2> 0 00003F38 29C7 sub di, ax 0 00003F3A 19D6 sbb si, dx ; current str.start - new str.start 254 <2> ; = how far to relocate down (in bytes) 0 00003F3C 293E[0C00] sub word [sym_storage.str.xms.start], di 0 00003F40 1936[0E00] sbb word [sym_storage.str.xms.start + 2], si 257 <2> ; adjust str.start 258 <2> 0 00003F44 31C0 xor ax, ax 0 00003F46 50 push ax ; start index of move (destination) 0 00003F47 8B0E[4C00] mov cx, word [sym_storage.str.free] 262 <2> ; size of moved data, in indices (= all) 263 <2> ; si:di = how far to move down 0 00003F4B E8[0000]EB02[BE18] dualcall move_delete_farpointer.str.sidi 265 <2> 266 <2> 0 00003F52 A1[4C00] mov ax, word [sym_storage.str.free] 0 00003F55 A3[4A00] mov word [sym_storage.str.end], ax 269 <2> ; ax = amount indices to take for SYMSTR heap 0 00003F58 31D2 xor dx, dx 271 <2> %if SYMSTR_index_size == 4 0 00003F5A 01C0 add ax, ax 0 00003F5C 11D2 adc dx, dx 0 00003F5E 01C0 add ax, ax 0 00003F60 11D2 adc dx, dx ; dx:ax = amount bytes to take for SYMSTR heap 276 <2> %else 277 <2> %error Unexpected SYMSTR index size 278 <2> %endif 279 <2> 0 00003F62 0306[0C00] add ax, word [sym_storage.str.xms.start] 0 00003F66 1316[0E00] adc dx, word [sym_storage.str.xms.start + 2] 282 <2> 0 00003F6A A3[1000] mov word [sym_storage.xms.free], ax 0 00003F6D 8916[1200] mov word [sym_storage.xms.free + 2], dx 285 <2> 0 00003F71 C3 retn 287 <2> %endif 288 <2> 289 <2> 290 <2> %ifn _XMS_ONLY 291 <2> zz_compact_expand_check_nonxms: 0 00003F72 A1[2E00] mov ax, word [sym_storage.main.free] 0 00003F75 3B06[4800] cmp ax, word [sym_storage.hash.free] 0 00003F79 7406 je @F 295 <2> 0 00003F7B BA[0000] mov dx, msg.zz_main_hash_mismatch 0 00003F7E E9BE07 jmp exit_error_msg 298 <2> 299 <2> @@: 0 00003F81 8B36[0200] mov si, word [sym_storage.start + 2] 0 00003F85 8B3E[0000] mov di, word [sym_storage.start] 0 00003F89 56 push si 0 00003F8A 57 push di 0 00003F8B E8[0000]EB02[D214] dualcall pointer_to_linear 0 00003F92 89D6 mov si, dx 0 00003F94 89C7 mov di, ax 307 <2> 0 00003F96 FF36[1A00] push word [sym_storage.main.start + 2] 0 00003F9A FF36[1800] push word [sym_storage.main.start] 0 00003F9E E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = main.start linear 311 <2> 0 00003FA5 39F2 cmp dx, si 0 00003FA7 7504 jne .main_not_first 0 00003FA9 39F8 cmp ax, di 0 00003FAB 7406 je @F 316 <2> 317 <2> .main_not_first: 0 00003FAD BA[0000] mov dx, msg.zz_main_not_first 0 00003FB0 E98C07 jmp exit_error_msg 320 <2> 321 <2> @@: 0 00003FB3 89D6 mov si, dx 0 00003FB5 89C7 mov di, ax ; si:di = main.start linear 324 <2> 0 00003FB7 FF36[1E00] push word [sym_storage.hash.start + 2] 0 00003FBB FF36[1C00] push word [sym_storage.hash.start] 0 00003FBF E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = hash.start linear 328 <2> 0 00003FC6 87D6 xchg dx, si 0 00003FC8 97 xchg ax, di ; si:di = hash.start linear 331 <2> 0 00003FC9 39F2 cmp dx, si ; cmp main.start, hash.start 0 00003FCB 77E0 ja .main_not_first 0 00003FCD 7204 jb @F 0 00003FCF 39F8 cmp ax, di 0 00003FD1 77DA ja .main_not_first 337 <2> @@: 338 <2> 0 00003FD3 FF36[2200] push word [sym_storage.str.start + 2] 0 00003FD7 FF36[2000] push word [sym_storage.str.start] 0 00003FDB E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = str.start linear 342 <2> 0 00003FE2 87D6 xchg dx, si 0 00003FE4 97 xchg ax, di ; si:di = str.start linear 345 <2> 0 00003FE5 39F2 cmp dx, si ; cmp hash.start, str.start 0 00003FE7 7706 ja .hash_not_second 0 00003FE9 720A jb @F 0 00003FEB 39F8 cmp ax, di 0 00003FED 7606 jbe @F 351 <2> 352 <2> .hash_not_second: 0 00003FEF BA[0000] mov dx, msg.zz_hash_not_second 0 00003FF2 E94A07 jmp exit_error_msg 355 <2> 356 <2> @@: 357 <2> 0 00003FF5 FF36[2600] push word [sym_storage.free + 2] 0 00003FF9 FF36[2400] push word [sym_storage.free] 0 00003FFD E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = free linear 361 <2> 0 00004004 87D6 xchg dx, si 0 00004006 97 xchg ax, di ; dx:ax = str.start linear 364 <2> 0 00004007 39F2 cmp dx, si ; cmp str.start, free 0 00004009 7706 ja .str_not_third 0 0000400B 720A jb @F 0 0000400D 39F8 cmp ax, di 0 0000400F 7606 jbe @F 370 <2> 371 <2> .str_not_third: 0 00004011 BA[0000] mov dx, msg.zz_str_not_third 0 00004014 E92807 jmp exit_error_msg 374 <2> 375 <2> @@: 0 00004017 C3 retn 377 <2> %endif 378 <2> 379 <2> 380 <2> %if _XMS_SYMBOL_TABLE 381 <2> zz_compact_expand_check_xms: 0 00004018 A1[2E00] mov ax, word [sym_storage.main.free] 0 0000401B 3B06[4800] cmp ax, word [sym_storage.hash.free] 0 0000401F 7406 je @F 385 <2> 0 00004021 BA[0000] mov dx, msg.zz_main_hash_mismatch 0 00004024 E91807 jmp exit_error_msg 388 <2> 389 <2> @@: 0 00004027 8B16[0600] mov dx, word [sym_storage.main.xms.start + 2] 0 0000402B A1[0400] mov ax, word [sym_storage.main.xms.start] 392 <2> 0 0000402E 85D2 test dx, dx 0 00004030 7504 jnz .main_not_first 0 00004032 85C0 test ax, ax 0 00004034 7406 jz @F 397 <2> 398 <2> .main_not_first: 0 00004036 BA[0000] mov dx, msg.zz_main_not_first 0 00004039 E90307 jmp exit_error_msg 401 <2> 402 <2> @@: 0 0000403C 8B36[0A00] mov si, word [sym_storage.hash.xms.start + 2] 0 00004040 8B3E[0800] mov di, word [sym_storage.hash.xms.start] 0 00004044 39F2 cmp dx, si 0 00004046 77EE ja .main_not_first 0 00004048 7204 jb @F 0 0000404A 39F8 cmp ax, di 0 0000404C 77E8 ja .main_not_first 410 <2> @@: 411 <2> 0 0000404E 87D6 xchg dx, si 0 00004050 97 xchg ax, di 0 00004051 8B36[0E00] mov si, word [sym_storage.str.xms.start + 2] 0 00004055 8B3E[0C00] mov di, word [sym_storage.str.xms.start] 416 <2> 0 00004059 39F2 cmp dx, si 0 0000405B 7706 ja .hash_not_second 0 0000405D 720A jb @F 0 0000405F 39F8 cmp ax, di 0 00004061 7606 jbe @F 422 <2> 423 <2> .hash_not_second: 0 00004063 BA[0000] mov dx, msg.zz_hash_not_second 0 00004066 E9D606 jmp exit_error_msg 426 <2> 427 <2> @@: 428 <2> 0 00004069 87D6 xchg dx, si 0 0000406B 97 xchg ax, di 0 0000406C 8B36[1200] mov si, word [sym_storage.xms.free + 2] 0 00004070 8B3E[1000] mov di, word [sym_storage.xms.free] 433 <2> 0 00004074 39F2 cmp dx, si 0 00004076 7706 ja .str_not_third 0 00004078 720A jb @F 0 0000407A 39F8 cmp ax, di 0 0000407C 7606 jbe @F 439 <2> 440 <2> .str_not_third: 0 0000407E BA[0000] mov dx, msg.zz_str_not_third 0 00004081 E9BB06 jmp exit_error_msg 443 <2> 444 <2> @@: 0 00004084 C3 retn 446 <2> %endif 3147 <1> %endif 3148 <1> 3149 <1> %if _USE_EXPAND 3150 <1> %include "expand.asm" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbol table expansion implementation 5 <2> by 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> %include "lmacros2.mac" 1 <3> [list -] 16 <2> %include "symbols.mac" 1 <3> 2 <3> %if 0 3 <3> 4 <3> Symbolic debugging macros 5 <3> by C. Masloch, 2019 6 <3> 7 <3> Usage of the works is permitted provided that this 8 <3> instrument is retained with the works, so that any entity 9 <3> that uses the works is notified of this instrument. 10 <3> 11 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 12 <3> 13 <3> %endif 14 <3> 15 <3> %ifndef __SYMBOLS_MAC__ 16 <3> %assign __SYMBOLS_MAC__ 1 17 <3> 18 <3> numdef SYMMAINLARGE, 1 19 <3> 20 <3> 21 <3> ; Note: SYMMAINs are stored as an array, which is sorted 22 <3> ; on the smLinear value. Therefore, binary search can 23 <3> ; be used to find an entry in the entire array. 24 <3> struc SYMMAIN 25 <3> smLinear: resd 1 ; linear address of symbol 26 <3> ; Currently all symbols are fully filled, with a 32-bit 27 <3> ; linear value and a 32-bit offset value. (It is of course 28 <3> ; valid to use an offset that fits in 16 bits.) 29 <3> ; Symbols without either a linear or an offset value 30 <3> ; may be supported later, in which case there would be 31 <3> ; a flag to indicate this. 32 <3> smOffset: resd 1 ; offset of symbol 33 <3> ; The following two fields are SYMSTR heap dword indices. 34 <3> ; The value 0 is special, it refers to the empty string. 35 <3> ; To simplify handling of this, the SYMSTR heap contains 36 <3> ; an actual entry with an empty string at index 0. 37 <3> smName1: resw 1 ; -> first string part 38 <3> smName2: resw 1 ; -> second string part 39 <3> smHashByte: ; (low byte of flags is truncated hash value) 40 <3> smFlags: resw 1 ; flags 41 <3> ; The following field is a SYMMAIN paragraph index. 42 <3> ; The value -1 indicates none. 43 <3> %if _SYMMAINLARGE 44 <3> smBase: ; SYMMAIN entry this one is based from 45 <3> %else 46 <3> smNext: ; SYMMAIN entry which was loaded next 47 <3> %endif 48 <3> resw 1 49 <3> alignb 16 50 <3> %if _SYMMAINLARGE 51 <3> ; smBaseNext and smBasePrev form a doubly-linked list 52 <3> ; of the entries belonging to a particular base SYMMAIN. 53 <3> ; -1 indicates no next or no previous entry. 54 <3> ; If smfBase is set then the smBaseNext contains a link 55 <3> ; to the first entry belonging to this SYMMAIN as a base, 56 <3> ; and smBasePrev links to the last entry. -1 if none. 57 <3> smBaseNext: resw 1 58 <3> smBasePrev: resw 1 59 <3> ; If smfBase is set these fields form a doubly-linked list 60 <3> ; of all SYMMAIN entries with smfBase set. 61 <3> ; If smfBreakpoint is set these fields form a doubly-linked 62 <3> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <3> ; These fields are also used by zz_relocate to remember 64 <3> ; which entries to relocate. 65 <3> smSpecialNext: resw 1 66 <3> smSpecialPrev: resw 1 67 <3> %endif 68 <3> endstruc 69 <3> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <3> %error Unexpected SYMMAIN_size 71 <3> %endif 72 <3> SYMMAIN_index_size equ SYMMAIN_size 73 <3> 74 <3> insertfDropSymHintStoreString: equ 1 75 <3> insertfExistingMask equ 0E0h 76 <3> insertfExistingDefaultSymbol equ 00h 77 <3> insertfExistingDefaultStart equ 20h 78 <3> insertfExistingBlockDiffering equ 40h 79 <3> insertfExistingBlockAll equ 60h 80 <3> insertfExistingUpdate equ 80h 81 <3> insertfExistingDuplicate equ 0A0h 82 <3> insertfExistingKeep equ 0C0h 83 <3> ; insertfExisting equ 0E0h 84 <3> smfSectionStartEnd: equ 100h 85 <3> smfBase: equ 100h 86 <3> smfAnonLabel: equ 200h 87 <3> smfSymHint: equ 400h 88 <3> smfSymHintStoreString: equ 800h 89 <3> smfPoison: equ 1000h 90 <3> smfBreakpoint: equ 2000h 91 <3> 92 <3> struc SYMSTR 93 <3> ; The following two fields are expected to be consecutive, they 94 <3> ; are accessed together as a word. (Refer to ssLength usages.) 95 <3> ssLength: resb 1 ; how long this string is (only ssString) 96 <3> ssRefCount: resb 1 ; how often this string is referenced 97 <3> ; The ssRefCount value can be: 98 <3> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <3> ; A reference may be added, incrementing the count. 100 <3> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <3> ; If all references are freed, it is expected that 102 <3> ; the count decreases to zero. 103 <3> ; A reference may be added, incrementing the count. 104 <3> ; 254 = Referenced SYMSTR, with that many references. 105 <3> ; No reference may be added, as 254 is the maximum 106 <3> ; reference count that indicates a referenced SYMSTR. 107 <3> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <3> ; times. May not be deleted unless all tables are freed. 109 <3> ; This is used by the empty string SYMSTR at index 0. 110 <3> ssHash: resw 1 ; hash value of this string 111 <3> ssString: ; actual string content 112 <3> ; Note that if the string is not dword-aligned, NUL bytes are 113 <3> ; appended to insure that the SYMSTR structure is padded to a 114 <3> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <3> ; Therefore, the size of a SYMSTR record is obtained by 116 <3> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <3> ; (Note: A terminating NUL byte is not included if the string 118 <3> ; length is dword-aligned already. The length must be used 119 <3> ; directly, not implied by a terminator.) 120 <3> endstruc 121 <3> SYMSTR_typical_size equ 28 122 <3> SYMSTR_index_size equ 4 123 <3> 124 <3> ; Note: SYMHASHs are stored as an array, which is sorted 125 <3> ; on the shHash value. Therefore, binary search can 126 <3> ; be used to find an entry in the entire array. 127 <3> ; 128 <3> ; The hash value is computed by hashing the entire name 129 <3> ; string (ie, both smName1 and smName2 string contents) 130 <3> ; with the algorithm as such: 131 <3> ; 132 <3> ; for (hash = 1, index = 0; index < length; index += 1) 133 <3> ; hash = hash * 31 + name[index]; 134 <3> struc SYMHASH 135 <3> shHash: resw 1 ; hash value 136 <3> shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <3> endstruc 138 <3> SYMHASH_index_size equ SYMHASH_size 139 <3> 140 <3> 141 <3> struc XMSMOVE 142 <3> xmsmCount: resd 1 143 <3> ; The count must be even. 144 <3> xmsmSourceHandle: resw 1 145 <3> xmsmSourceAddress: resd 1 146 <3> xmsmDestHandle: resw 1 147 <3> xmsmDestAddress: resd 1 148 <3> ; The destination and source may overlap only if a 149 <3> ; forward move would suffice to implement the 150 <3> ; operation without corrupting the data. (That is, 151 <3> ; the source starts above the destination. The XMS 152 <3> ; specification gets this detail wrong.) 153 <3> ; There is an error code for invalid overlap, but 154 <3> ; it is unclear whether this condition is detected 155 <3> ; properly by all implementations. 156 <3> endstruc 157 <3> 158 <3> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <3> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <3> 161 <3> 162 <3> %endif 17 <2> 18 <2> defaulting 19 <2> 20 <2> 21 <2> zz_expand: 22 <2> %if _XMS_SYMBOL_TABLE 0 00004085 833E[9C00]FF cmp word [zz_xms.handle], -1 0 0000408A 7403E92802 jne zz_expand_xms 25 <2> %endif 26 <2> %if _XMS_ONLY 27 <2> jmp exit_no_xms 28 <2> %else 0 0000408F E8E0FE nearcall zz_compact_expand_check_nonxms 30 <2> 31 <2> lframe near 32 <2> lvar word, strindex 33 <2> lvar word, mainhashindex 34 <2> lvar dword, hashstart 35 <2> lvar dword, strstart 36 <2> lvar dword, mainbyte 37 <2> lvar dword, hashbyte 38 <2> lvar dword, strbyte 39 <2> lvar dword, totalbyte 40 <2> lvar dword, totalbyteprior 0 00004092 5589E58D66E0 lenter 42 <2> 0 00004098 FF36[1A00] push word [sym_storage.main.start + 2] 0 0000409C FF36[1800] push word [sym_storage.main.start] 0 000040A0 E8[0000]EB02[D214] dualcall pointer_to_linear 0 000040A7 89C7 mov di, ax 0 000040A9 89D6 mov si, dx 48 <2> 0 000040AB FF36[1E00] push word [sym_storage.hash.start + 2] 0 000040AF FF36[1C00] push word [sym_storage.hash.start] 0 000040B3 E8[0000]EB02[D214] dualcall pointer_to_linear 0 000040BA 52 push dx 0 000040BB 50 push ax 0 000040BC 29F8 sub ax, di 0 000040BE 19F2 sbb dx, si 56 <2> 0 000040C0 8946F0 mov word [bp + ?mainbyte], ax 0 000040C3 8956F2 mov word [bp + ?mainbyte + 2], dx 59 <2> 0 000040C6 5F pop di 0 000040C7 5E pop si 62 <2> 0 000040C8 FF36[2200] push word [sym_storage.str.start + 2] 0 000040CC FF36[2000] push word [sym_storage.str.start] 0 000040D0 E8[0000]EB02[D214] dualcall pointer_to_linear 0 000040D7 52 push dx 0 000040D8 50 push ax 0 000040D9 29F8 sub ax, di 0 000040DB 19F2 sbb dx, si 70 <2> 0 000040DD 8946EC mov word [bp + ?hashbyte], ax 0 000040E0 8956EE mov word [bp + ?hashbyte + 2], dx 73 <2> 0 000040E3 5F pop di 0 000040E4 5E pop si 76 <2> 0 000040E5 FF36[2600] push word [sym_storage.free + 2] 0 000040E9 FF36[2400] push word [sym_storage.free] 0 000040ED E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = free linear 0 000040F4 52 push dx 0 000040F5 50 push ax 0 000040F6 29F8 sub ax, di 0 000040F8 19F2 sbb dx, si 84 <2> 0 000040FA 8946E8 mov word [bp + ?strbyte], ax 0 000040FD 8956EA mov word [bp + ?strbyte + 2], dx 87 <2> 0 00004100 5F pop di 0 00004101 5E pop si 90 <2> 0 00004102 FF36[1A00] push word [sym_storage.main.start + 2] 0 00004106 FF36[1800] push word [sym_storage.main.start] 0 0000410A E8[0000]EB02[D214] dualcall pointer_to_linear 0 00004111 29C7 sub di, ax 0 00004113 19D6 sbb si, dx ; free - main = length of used space 0 00004115 897EE0 mov word [bp + ?totalbyteprior], di 0 00004118 8976E2 mov word [bp + ?totalbyteprior + 2], si 98 <2> 0 0000411B FF36[2A00] push word [sym_storage.end + 2] 0 0000411F FF36[2800] push word [sym_storage.end] 0 00004123 E8[0000]EB02[D214] dualcall pointer_to_linear 0 0000412A 87D6 xchg dx, si 0 0000412C 97 xchg ax, di 104 <2> 0 0000412D FF36[1A00] push word [sym_storage.main.start + 2] 0 00004131 FF36[1800] push word [sym_storage.main.start] 0 00004135 E8[0000]EB02[D214] dualcall pointer_to_linear 0 0000413C 29C7 sub di, ax 0 0000413E 19D6 sbb si, dx ; end - main = length of table space 0 00004140 E8DC02 nearcall zz_expand_common 111 <2> 0 00004143 31F6 xor si, si 0 00004145 31FF xor di, di 0 00004147 8B5EF2 mov bx, word [bp + ?mainbyte + 2] 0 0000414A 8B4EF0 mov cx, word [bp + ?mainbyte] 116 <2> 0 0000414D 01CF add di, cx 0 0000414F 11DE adc si, bx 0 00004151 897EF8 mov word [bp + ?hashstart], di 0 00004154 8976FA mov word [bp + ?hashstart + 2], si 121 <2> 0 00004157 8B5EEE mov bx, word [bp + ?hashbyte + 2] 0 0000415A 8B4EEC mov cx, word [bp + ?hashbyte] 0 0000415D 01CF add di, cx 0 0000415F 11DE adc si, bx 0 00004161 897EF4 mov word [bp + ?strstart], di 0 00004164 8976F6 mov word [bp + ?strstart + 2], si 128 <2> 0 00004167 8B5EEA mov bx, word [bp + ?strbyte + 2] 0 0000416A 8B4EE8 mov cx, word [bp + ?strbyte] 0 0000416D 01CF add di, cx 0 0000416F 11DE adc si, bx 133 <2> 0 00004171 FF36[2A00] push word [sym_storage.end + 2] 0 00004175 FF36[2800] push word [sym_storage.end] 0 00004179 E8[0000]EB02[D214] dualcall pointer_to_linear 0 00004180 87D3 xchg dx, bx 0 00004182 91 xchg ax, cx 139 <2> 0 00004183 FF36[1A00] push word [sym_storage.main.start + 2] 0 00004187 FF36[1800] push word [sym_storage.main.start] 0 0000418B E8[0000]EB02[D214] dualcall pointer_to_linear 0 00004192 29C1 sub cx, ax 0 00004194 19D3 sbb bx, dx ; end - start = length to use 145 <2> 0 00004196 39DE cmp si, bx 0 00004198 7504 jne .table_length_mismatch 0 0000419A 39CF cmp di, cx 0 0000419C 7406 je @F 150 <2> .table_length_mismatch: 0 0000419E BA[0000] mov dx, msg.zz_length_mismatch 0 000041A1 E99B05 jmp exit_error_msg 153 <2> 154 <2> @@: 0 000041A4 FF36[2A00] push word [sym_storage.end + 2] 0 000041A8 FF36[2800] push word [sym_storage.end] 0 000041AC 8F06[2400] pop word [sym_storage.free] 0 000041B0 8F06[2600] pop word [sym_storage.free + 2] 159 <2> 160 <2> 0 000041B4 FF36[2200] push word [sym_storage.str.start + 2] 0 000041B8 FF36[2000] push word [sym_storage.str.start] 0 000041BC E8[0000]EB02[D214] dualcall pointer_to_linear 0 000041C3 87D3 xchg dx, bx 0 000041C5 91 xchg ax, cx ; bx:cx = str start 166 <2> 0 000041C6 FF36[1A00] push word [sym_storage.main.start + 2] 0 000041CA FF36[1800] push word [sym_storage.main.start] 0 000041CE E8[0000]EB02[D214] dualcall pointer_to_linear 0 000041D5 29C1 sub cx, ax 0 000041D7 19D3 sbb bx, dx ; str - main = offset for used str 172 <2> 0 000041D9 F7DB neg bx 0 000041DB F7D9 neg cx 0 000041DD 83DB00 sbb bx, byte 0 ; neg bx:cx 176 <2> 0 000041E0 750C jnz @F 0 000041E2 85C9 test cx, cx 0 000041E4 7508 jnz @F 180 <2> 0 000041E6 034EF4 add cx, word [bp + ?strstart] 0 000041E9 135EF6 adc bx, word [bp + ?strstart + 2] 0 000041EC EB0E jmp @FF 184 <2> 185 <2> @@: 0 000041EE 034EF4 add cx, word [bp + ?strstart] 0 000041F1 135EF6 adc bx, word [bp + ?strstart + 2] 188 <2> ; offset to use - offset for used str 189 <2> ; = how far to move back 190 <2> ; offset used: 10h 191 <2> ; offset to use: 20h 192 <2> ; bx:cx = -10h 193 <2> ; adding 20h 194 <2> ; = 10h (CY) 195 <2> 196 <2> ; offset used: 20h 197 <2> ; offset to use: 20h 198 <2> ; bx:cx = -20h 199 <2> ; adding 20h 200 <2> ; = 0 (CY) 201 <2> 202 <2> ; offset used: 30h 203 <2> ; offset to use: 20h 204 <2> ; bx:cx = -30h 205 <2> ; adding 20h 206 <2> ; = -10h (NC) 0 000041F4 7206 jc @F ; if strings can be moved up 208 <2> 0 000041F6 BA[0000] mov dx, msg.zz_too_small_str 0 000041F9 E94305 jmp exit_error_msg 211 <2> 212 <2> @@: 0 000041FC 89CF mov di, cx 0 000041FE 89DE mov si, bx ; si:di = how far to move, in bytes 0 00004200 53 push bx 0 00004201 51 push cx 0 00004202 31C0 xor ax, ax 0 00004204 50 push ax ; start from current index zero 0 00004205 8B0E[4C00] mov cx, word [sym_storage.str.free] 220 <2> ; entire in-use part of SYMSTR heap 0 00004209 E8[0000]EB02[F50E] dualcall move_insert_farpointer.str.sidi 222 <2> ; move back 0 00004210 59 pop cx 0 00004211 5B pop bx 0 00004212 FF36[2200] push word [sym_storage.str.start + 2] 0 00004216 FF36[2000] push word [sym_storage.str.start] 0 0000421A E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 00004221 8F06[2000] pop word [sym_storage.str.start] 0 00004225 8F06[2200] pop word [sym_storage.str.start + 2] 230 <2> ; adjust the pointer 231 <2> 0 00004229 FF76FE push word [bp + ?strindex] 0 0000422C 8F06[4A00] pop word [sym_storage.str.end] 234 <2> 235 <2> 0 00004230 FF36[1E00] push word [sym_storage.hash.start + 2] 0 00004234 FF36[1C00] push word [sym_storage.hash.start] 0 00004238 E8[0000]EB02[D214] dualcall pointer_to_linear 0 0000423F 87D3 xchg dx, bx 0 00004241 91 xchg ax, cx ; bx:cx = hash start 241 <2> 0 00004242 FF36[1A00] push word [sym_storage.main.start + 2] 0 00004246 FF36[1800] push word [sym_storage.main.start] 0 0000424A E8[0000]EB02[D214] dualcall pointer_to_linear 0 00004251 29C1 sub cx, ax 0 00004253 19D3 sbb bx, dx ; hash - main = offset for used hash 247 <2> 0 00004255 F7DB neg bx 0 00004257 F7D9 neg cx 0 00004259 83DB00 sbb bx, byte 0 ; neg bx:cx 251 <2> 0 0000425C 750C jnz @F 0 0000425E 85C9 test cx, cx 0 00004260 7508 jnz @F 255 <2> 0 00004262 034EF8 add cx, word [bp + ?hashstart] 0 00004265 135EFA adc bx, word [bp + ?hashstart + 2] 0 00004268 EB0E jmp @FF 259 <2> 260 <2> @@: 0 0000426A 034EF8 add cx, word [bp + ?hashstart] 0 0000426D 135EFA adc bx, word [bp + ?hashstart + 2] 263 <2> ; offset to use - offset for used hash 264 <2> ; = how far to move back 0 00004270 7206 jc @F ; if hashs can be moved up 266 <2> 0 00004272 BA[0000] mov dx, msg.zz_too_small_hash 0 00004275 E9C704 jmp exit_error_msg 269 <2> 270 <2> @@: 0 00004278 89CF mov di, cx 0 0000427A 89DE mov si, bx ; si:di = how far to move, in bytes 0 0000427C 53 push bx 0 0000427D 51 push cx 0 0000427E 31C0 xor ax, ax 0 00004280 50 push ax ; start from current index zero 0 00004281 8B0E[4800] mov cx, word [sym_storage.hash.free] 278 <2> ; entire in-use part of SYMHASH array 0 00004285 E8[0000]EB02[D40E] dualcall move_insert_farpointer.hash.sidi 280 <2> ; move back 0 0000428C 59 pop cx 0 0000428D 5B pop bx 0 0000428E FF36[1E00] push word [sym_storage.hash.start + 2] 0 00004292 FF36[1C00] push word [sym_storage.hash.start] 0 00004296 E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 0000429D 8F06[1C00] pop word [sym_storage.hash.start] 0 000042A1 8F06[1E00] pop word [sym_storage.hash.start + 2] 288 <2> ; adjust the pointer 289 <2> 0 000042A5 FF76FC push word [bp + ?mainhashindex] 0 000042A8 8F06[4600] pop word [sym_storage.hash.end] 292 <2> 293 <2> 294 <2> ; SYMMAIN array part that is in use stays where it is! 295 <2> 0 000042AC FF76FC push word [bp + ?mainhashindex] 0 000042AF 8F06[2C00] pop word [sym_storage.main.end] 298 <2> 299 <2> 0 000042B3 89EC5D lleave code 0 000042B6 C3 retn 302 <2> %endif 303 <2> 304 <2> %if _XMS_SYMBOL_TABLE 305 <2> zz_expand_xms: 0 000042B7 E85EFD nearcall zz_compact_expand_check_xms 307 <2> 308 <2> %if _XMS_ONLY 309 <2> lframe near 310 <2> %else 311 <2> lframe near, nested 312 <2> %endif 313 <2> lvar word, strindex 314 <2> lvar word, mainhashindex 315 <2> lvar dword, hashstart 316 <2> lvar dword, strstart 317 <2> lvar dword, mainbyte 318 <2> lvar dword, hashbyte 319 <2> lvar dword, strbyte 320 <2> lvar dword, totalbyte 321 <2> lvar dword, totalbyteprior 0 000042BA 5589E58D66E0 lenter 323 <2> 0 000042C0 8B16[0A00] mov dx, word [sym_storage.hash.xms.start + 2] 0 000042C4 A1[0800] mov ax, word [sym_storage.hash.xms.start] 0 000042C7 8946F0 mov word [bp + ?mainbyte], ax 0 000042CA 8956F2 mov word [bp + ?mainbyte + 2], dx 328 <2> 0 000042CD 8B36[0E00] mov si, word [sym_storage.str.xms.start + 2] 0 000042D1 8B3E[0C00] mov di, word [sym_storage.str.xms.start] 0 000042D5 29C7 sub di, ax 0 000042D7 19D6 sbb si, dx 0 000042D9 897EEC mov word [bp + ?hashbyte], di 0 000042DC 8976EE mov word [bp + ?hashbyte + 2], si 335 <2> 0 000042DF 8B16[0E00] mov dx, word [sym_storage.str.xms.start + 2] 0 000042E3 A1[0C00] mov ax, word [sym_storage.str.xms.start] 338 <2> 0 000042E6 8B36[1200] mov si, word [sym_storage.xms.free + 2] 0 000042EA 8B3E[1000] mov di, word [sym_storage.xms.free] 0 000042EE 56 push si 0 000042EF 57 push di 0 000042F0 29C7 sub di, ax 0 000042F2 19D6 sbb si, dx 0 000042F4 897EE8 mov word [bp + ?strbyte], di 0 000042F7 8976EA mov word [bp + ?strbyte + 2], si 347 <2> 0 000042FA 8F46E0 pop word [bp + ?totalbyteprior] 0 000042FD 8F46E2 pop word [bp + ?totalbyteprior + 2] 350 <2> 0 00004300 FF36[1600] push word [sym_storage.xms.end + 2] 0 00004304 FF36[1400] push word [sym_storage.xms.end] 0 00004308 58 pop ax 0 00004309 5A pop dx 355 <2> ; dualcall pointer_to_linear 0 0000430A 87D6 xchg dx, si 0 0000430C 97 xchg ax, di 358 <2> 359 <2> ; push word [sym_storage.main.start + 2] 360 <2> ; push word [sym_storage.main.start] 361 <2> ; dualcall pointer_to_linear 362 <2> ; sub di, ax 363 <2> ; sbb si, dx ; end - main = length of table space 0 0000430D F8 clc 0 0000430E E80E01 nearcall zz_expand_common 366 <2> 0 00004311 31F6 xor si, si 0 00004313 31FF xor di, di 0 00004315 8B5EF2 mov bx, word [bp + ?mainbyte + 2] 0 00004318 8B4EF0 mov cx, word [bp + ?mainbyte] 371 <2> 0 0000431B 01CF add di, cx 0 0000431D 11DE adc si, bx 0 0000431F 897EF8 mov word [bp + ?hashstart], di 0 00004322 8976FA mov word [bp + ?hashstart + 2], si 376 <2> 0 00004325 8B5EEE mov bx, word [bp + ?hashbyte + 2] 0 00004328 8B4EEC mov cx, word [bp + ?hashbyte] 0 0000432B 01CF add di, cx 0 0000432D 11DE adc si, bx 0 0000432F 897EF4 mov word [bp + ?strstart], di 0 00004332 8976F6 mov word [bp + ?strstart + 2], si 383 <2> 0 00004335 8B5EEA mov bx, word [bp + ?strbyte + 2] 0 00004338 8B4EE8 mov cx, word [bp + ?strbyte] 0 0000433B 01CF add di, cx 0 0000433D 11DE adc si, bx 388 <2> 0 0000433F FF36[1600] push word [sym_storage.xms.end + 2] 0 00004343 FF36[1400] push word [sym_storage.xms.end] 0 00004347 58 pop ax 0 00004348 5A pop dx 393 <2> ; dualcall pointer_to_linear 0 00004349 87D3 xchg dx, bx 0 0000434B 91 xchg ax, cx 396 <2> 397 <2> ; push word [sym_storage.main.start + 2] 398 <2> ; push word [sym_storage.main.start] 399 <2> ; dualcall pointer_to_linear 400 <2> ; sub cx, ax 401 <2> ; sbb bx, dx ; end - start = length to use 402 <2> 0 0000434C 39DE cmp si, bx 0 0000434E 7504 jne .table_length_mismatch 0 00004350 39CF cmp di, cx 0 00004352 7406 je @F 407 <2> .table_length_mismatch: 0 00004354 BA[0000] mov dx, msg.zz_length_mismatch 0 00004357 E9E503 jmp exit_error_msg 410 <2> 411 <2> @@: 0 0000435A FF36[1600] push word [sym_storage.xms.end + 2] 0 0000435E FF36[1400] push word [sym_storage.xms.end] 0 00004362 8F06[1000] pop word [sym_storage.xms.free] 0 00004366 8F06[1200] pop word [sym_storage.xms.free + 2] 416 <2> 417 <2> 0 0000436A FF36[0E00] push word [sym_storage.str.xms.start + 2] 0 0000436E FF36[0C00] push word [sym_storage.str.xms.start] 0 00004372 58 pop ax 0 00004373 5A pop dx 422 <2> ; dualcall pointer_to_linear 0 00004374 87D3 xchg dx, bx 0 00004376 91 xchg ax, cx ; bx:cx = str start 425 <2> 426 <2> ; push word [sym_storage.main.start + 2] 427 <2> ; push word [sym_storage.main.start] 428 <2> ; dualcall pointer_to_linear 429 <2> ; sub cx, ax 430 <2> ; sbb bx, dx ; str - main = offset for used str 431 <2> 0 00004377 F7DB neg bx 0 00004379 F7D9 neg cx 0 0000437B 83DB00 sbb bx, byte 0 ; neg bx:cx 435 <2> 0 0000437E 750C jnz @F 0 00004380 85C9 test cx, cx 0 00004382 7508 jnz @F 439 <2> 0 00004384 034EF4 add cx, word [bp + ?strstart] 0 00004387 135EF6 adc bx, word [bp + ?strstart + 2] 0 0000438A EB0E jmp @FF 443 <2> 444 <2> @@: 0 0000438C 034EF4 add cx, word [bp + ?strstart] 0 0000438F 135EF6 adc bx, word [bp + ?strstart + 2] 447 <2> ; offset to use - offset for used str 448 <2> ; = how far to move back 0 00004392 7206 jc @F ; if strings can be moved up 450 <2> 0 00004394 BA[0000] mov dx, msg.zz_too_small_str 0 00004397 E9A503 jmp exit_error_msg 453 <2> 454 <2> @@: 0 0000439A 89CF mov di, cx 0 0000439C 89DE mov si, bx ; si:di = how far to move, in bytes 0 0000439E 53 push bx 0 0000439F 51 push cx 0 000043A0 31C0 xor ax, ax 0 000043A2 50 push ax ; start from current index zero 0 000043A3 8B0E[4C00] mov cx, word [sym_storage.str.free] 462 <2> ; entire in-use part of SYMSTR heap 0 000043A7 E8[0000]EB02[F50E] dualcall move_insert_farpointer.str.sidi 464 <2> ; move back 0 000043AE 59 pop cx 0 000043AF 5B pop bx 0 000043B0 010E[0C00] add word [sym_storage.str.xms.start], cx 0 000043B4 111E[0E00] adc word [sym_storage.str.xms.start + 2], bx 469 <2> ; push word [sym_storage.str.start + 2] 470 <2> ; push word [sym_storage.str.start] 471 <2> ; dualcall normalise_pointer_with_displacement_bxcx 472 <2> ; pop word [sym_storage.str.start] 473 <2> ; pop word [sym_storage.str.start + 2] 474 <2> ; adjust the pointer 475 <2> 0 000043B8 FF76FE push word [bp + ?strindex] 0 000043BB 8F06[4A00] pop word [sym_storage.str.end] 478 <2> 479 <2> 0 000043BF FF36[0A00] push word [sym_storage.hash.xms.start + 2] 0 000043C3 FF36[0800] push word [sym_storage.hash.xms.start] 0 000043C7 58 pop ax 0 000043C8 5A pop dx 484 <2> ; dualcall pointer_to_linear 0 000043C9 87D3 xchg dx, bx 0 000043CB 91 xchg ax, cx ; bx:cx = hash start 487 <2> 488 <2> ; push word [sym_storage.main.start + 2] 489 <2> ; push word [sym_storage.main.start] 490 <2> ; dualcall pointer_to_linear 491 <2> ; sub cx, ax 492 <2> ; sbb bx, dx ; hash - main = offset for used hash 493 <2> 0 000043CC F7DB neg bx 0 000043CE F7D9 neg cx 0 000043D0 83DB00 sbb bx, byte 0 ; neg bx:cx 497 <2> 0 000043D3 750C jnz @F 0 000043D5 85C9 test cx, cx 0 000043D7 7508 jnz @F 501 <2> 0 000043D9 034EF8 add cx, word [bp + ?hashstart] 0 000043DC 135EFA adc bx, word [bp + ?hashstart + 2] 0 000043DF EB0E jmp @FF 505 <2> 506 <2> @@: 0 000043E1 034EF8 add cx, word [bp + ?hashstart] 0 000043E4 135EFA adc bx, word [bp + ?hashstart + 2] 509 <2> ; offset to use - offset for used hash 510 <2> ; = how far to move back 0 000043E7 7206 jc @F ; if hashs can be moved up 512 <2> 0 000043E9 BA[0000] mov dx, msg.zz_too_small_hash 0 000043EC E95003 jmp exit_error_msg 515 <2> 516 <2> @@: 0 000043EF 89CF mov di, cx 0 000043F1 89DE mov si, bx ; si:di = how far to move, in bytes 0 000043F3 53 push bx 0 000043F4 51 push cx 0 000043F5 31C0 xor ax, ax 0 000043F7 50 push ax ; start from current index zero 0 000043F8 8B0E[4800] mov cx, word [sym_storage.hash.free] 524 <2> ; entire in-use part of SYMHASH array 0 000043FC E8[0000]EB02[D40E] dualcall move_insert_farpointer.hash.sidi 526 <2> ; move back 0 00004403 59 pop cx 0 00004404 5B pop bx 0 00004405 010E[0800] add word [sym_storage.hash.xms.start], cx 0 00004409 111E[0A00] adc word [sym_storage.hash.xms.start + 2], bx 531 <2> ; push word [sym_storage.hash.start + 2] 532 <2> ; push word [sym_storage.hash.start] 533 <2> ; dualcall normalise_pointer_with_displacement_bxcx 534 <2> ; pop word [sym_storage.hash.start] 535 <2> ; pop word [sym_storage.hash.start + 2] 536 <2> ; adjust the pointer 537 <2> 0 0000440D FF76FC push word [bp + ?mainhashindex] 0 00004410 8F06[4600] pop word [sym_storage.hash.end] 540 <2> 541 <2> 542 <2> ; SYMMAIN array part that is in use stays where it is! 543 <2> 0 00004414 FF76FC push word [bp + ?mainhashindex] 0 00004417 8F06[2C00] pop word [sym_storage.main.end] 546 <2> 547 <2> 548 <2> %if _XMS_ONLY 549 <2> lleave code 550 <2> %else 551 <2> ldup 552 <2> 0 0000441B 89EC5D lleave 554 <2> %endif 0 0000441E C3 retn 556 <2> %endif 557 <2> 558 <2> 559 <2> zz_expand_common: 0 0000441F 7306 jnc @FF 561 <2> 562 <2> @@: 0 00004421 BA[0000] mov dx, msg.zz_too_short 0 00004424 E91803 jmp exit_error_msg 565 <2> 566 <2> @@: 0 00004427 85F6 test si, si 0 00004429 7504 jnz @F 0 0000442B 85FF test di, di 0 0000442D 74F2 jz @BB 571 <2> @@: 572 <2> 573 <2> ; This is at most (16 B + 4 B + 4 B) * 64 Ki = 1.5 MiB, 574 <2> ; if SYMMAIN_index_size == 16. 575 <2> ; Or (24 B + 4 B + 4 B) * 64 Ki = 2 MiB, 576 <2> ; if SYMMAIN_index_size == 24. 577 <2> TABLE_MAX_BYTE equ ((SYMMAIN_index_size + SYMHASH_index_size + SYMSTR_index_size) * 64 * 1024) 0 0000442F 83FE20 cmp si, TABLE_MAX_BYTE >> 16 0 00004432 7707 ja .too_much 0 00004434 720B jb @F 0 00004436 83FF00 cmp di, TABLE_MAX_BYTE & 0FFFFh 0 00004439 7606 jbe @F 583 <2> 584 <2> .too_much: 0 0000443B BA[0000] mov dx, msg.zz_too_much 0 0000443E E9FE02 jmp exit_error_msg 587 <2> 588 <2> @@: 0 00004441 8976E6 mov word [bp + ?totalbyte + 2], si 0 00004444 897EE4 mov word [bp + ?totalbyte], di 591 <2> 0 00004447 2B7EE0 sub di, word [bp + ?totalbyteprior] 0 0000444A 1B76E2 sbb si, word [bp + ?totalbyteprior + 2] 594 <2> 595 <2> TABLE_UNIT_OF_STORAGE equ (SYMMAIN_size + SYMHASH_size + SYMSTR_typical_size) / 4 596 <2> ; if SYMMAIN_size == 16: 597 <2> ; (16 + 4 + 28) / 4 598 <2> ; = 48 / 4 599 <2> ; = 12 600 <2> ; if SYMMAIN_size == 24: 601 <2> ; (24 + 4 + 28) / 4 602 <2> ; = 56 / 4 603 <2> ; = 14 604 <2> %if (SYMMAIN_size % 4) != 0 605 <2> %error Unexpected SYMMAIN size 606 <2> %endif 607 <2> %if SYMHASH_size != 4 608 <2> %error Unexpected SYMHASH size 609 <2> %endif 610 <2> %if SYMSTR_index_size != 4 611 <2> %error Unexpected SYMSTR index size 612 <2> %endif 613 <2> 0 0000444D 31D2 xor dx, dx 0 0000444F 89F0 mov ax, si 0 00004451 B90E00 mov cx, TABLE_UNIT_OF_STORAGE 0 00004454 F7F1 div cx ; / 12 = get unit of storage (1/12th) 618 <2> ; or /14 = 1/14th 0 00004456 97 xchg ax, di 0 00004457 F7F1 div cx 0 00004459 87FA xchg di, dx ; dx:ax = unit of storage 622 <2> 623 <2> ; This is at most 1.5 MiB / 12 = 128 KiB (if SYMMAIN_size == 16), 624 <2> ; or 2 MiB / 14 < 149797 B (if SYMMAIN_size == 24). 625 <2> 0 0000445B 89C1 mov cx, ax 0 0000445D 89D3 mov bx, dx 0 0000445F 01C9 add cx, cx 0 00004461 11DB adc bx, bx ; * 2 0 00004463 01C9 add cx, cx 0 00004465 11DB adc bx, bx ; * 4 0 00004467 01C1 add cx, ax 0 00004469 11D3 adc bx, dx ; * 5 0 0000446B 01C1 add cx, ax 0 0000446D 11D3 adc bx, dx ; * 6 0 0000446F 01C1 add cx, ax 0 00004471 11D3 adc bx, dx ; * 7 = 7/12th or 7/14th to SYMSTR heap 638 <2> ; This is at most 128 KiB * 7 = 896 KiB, 639 <2> ; or 149796 B * 7 = 1048572 (< 1 MiB). 640 <2> %if SYMSTR_typical_size != SYMSTR_index_size * 7 641 <2> %error Unexpected SYMSTR typical and index sizes 642 <2> %endif 643 <2> SYMSTR_MAX_BYTE equ SYMSTR_index_size * 64 * 1024 644 <2> ; = 256 Ki 645 <2> 0 00004473 034EE8 add cx, word [bp + ?strbyte] 0 00004476 135EEA adc bx, word [bp + ?strbyte + 2] 648 <2> 0 00004479 83FB04 cmp bx, SYMSTR_MAX_BYTE >> 16 0 0000447C 7503 jne @F 0 0000447E 83F900 cmp cx, SYMSTR_MAX_BYTE & 0FFFFh 652 <2> @@: 0 00004481 7211 jb @F 654 <2> ; NOTE: Does NOT jump for exact match, which requires us 655 <2> ; to use FFFFh for the ?strindex variable (not 1_0000h). 656 <2> .cutstr: 0 00004483 C746EA0400 mov word [bp + ?strbyte + 2], SYMSTR_MAX_BYTE >> 16 0 00004488 C746E80000 mov word [bp + ?strbyte], SYMSTR_MAX_BYTE & 0FFFFh 659 <2> ; = 256 KiB 0 0000448D C746FEFFFF mov word [bp + ?strindex], 0FFFFh 661 <2> ; for 256 KiB - SYMSTR_index_size 0 00004492 EB14 jmp .gotstrsize 663 <2> @@: 664 <2> ; bx:cx is at most 256 KiB - 1. 665 <2> ; Thus bx:cx >> 2 < 64 KiB. 0 00004494 80E1FC and cl, ~3 0 00004497 895EEA mov word [bp + ?strbyte + 2], bx 0 0000449A 894EE8 mov word [bp + ?strbyte], cx 669 <2> %rep 2 670 <2> shr bx, 1 671 <2> rcr cx, 1 ; B / SYMSTR_index_size (== / 4) 672 <2> %endrep 0 0000449D D1EB shr bx, 1 0 0000449F D1D9 rcr cx, 1 0 000044A1 D1EB shr bx, 1 0 000044A3 D1D9 rcr cx, 1 673 <2> %if SYMSTR_index_size != 4 674 <2> %error Unexpected SYMSTR index size 675 <2> %endif 0 000044A5 894EFE mov word [bp + ?strindex], cx 677 <2> .gotstrsize: 0 000044A8 8B56E6 mov dx, word [bp + ?totalbyte + 2] 0 000044AB 8B46E4 mov ax, word [bp + ?totalbyte] 680 <2> 0 000044AE 2B46E8 sub ax, word [bp + ?strbyte] 0 000044B1 1B56EA sbb dx, word [bp + ?strbyte + 2] 0 000044B4 7306 jnc @F 684 <2> 685 <2> .internalerror: 0 000044B6 BA[0000] mov dx, msg.zz_internal_error_expand 0 000044B9 E98302 jmp exit_error_msg 688 <2> 689 <2> @@: 0 000044BC 2B46EC sub ax, word [bp + ?hashbyte] 0 000044BF 1B56EE sbb dx, word [bp + ?hashbyte + 2] 0 000044C2 72F2 jc .internalerror 0 000044C4 2B46F0 sub ax, word [bp + ?mainbyte] 0 000044C7 1B56F2 sbb dx, word [bp + ?mainbyte + 2] 0 000044CA 72EA jc .internalerror 696 <2> 697 <2> ; This is at most 1536 KiB - 256 KiB = 1280 Ki (SYMMAIN_size == 16). 698 <2> ; Or 2048 KiB - 256 KiB = 1792 KiB (SYMMAIN_size == 24). 699 <2> 700 <2> TABLE_NEW_UNIT_OF_STORAGE equ TABLE_UNIT_OF_STORAGE - 7 701 <2> ; if SYMMAIN_size == 16: 702 <2> ; 12 - 7 = 5 703 <2> ; if SYMMAIN_size == 24: 704 <2> ; 14 - 7 = 7 0 000044CC 89C7 mov di, ax 0 000044CE 92 xchg ax, dx 0 000044CF 31D2 xor dx, dx 0 000044D1 B90700 mov cx, TABLE_NEW_UNIT_OF_STORAGE 0 000044D4 F7F1 div cx 0 000044D6 97 xchg ax, di 0 000044D7 F7F1 div cx 0 000044D9 87FA xchg di, dx ; dx:ax = new unit of storage 713 <2> ; This is at most 1280 KiB / 5 = 256 KiB. 714 <2> ; Or 1792 KiB / 7 = 256 KiB. 715 <2> 716 <2> ; Remainder is at most (4 or) 6 bytes. 717 <2> ; We discard it here. 718 <2> 719 <2> TABLE_MAX_SYMMAIN_ARRAY_INDEX equ 0FFFFh 720 <2> TABLE_MAX_SYMMAIN_ARRAY_BYTE equ (SYMMAIN_size * 64 * 1024) 721 <2> .calc_symmain: 722 <2> 0 000044DB 89D6 mov si, dx 0 000044DD 89C7 mov di, ax 725 <2> %if SYMMAIN_size == 16 726 <2> mov cx, ax 727 <2> mov bx, dx 728 <2> add cx, cx 729 <2> adc bx, bx 730 <2> add cx, cx 731 <2> adc bx, bx ; * 4, four times new unit of storage 732 <2> ; at most 1 MiB 733 <2> %elif SYMMAIN_size == 24 0 000044DF 89D3 mov bx, dx 0 000044E1 89C1 mov cx, ax 0 000044E3 01C9 add cx, cx 0 000044E5 11DB adc bx, bx ; * 2 0 000044E7 89C8 mov ax, cx 0 000044E9 89DA mov dx, bx ; dx:ax = unit * 2 0 000044EB 01C9 add cx, cx 0 000044ED 11DB adc bx, bx ; * 4 0 000044EF 01C1 add cx, ax 0 000044F1 11D3 adc bx, dx ; * 4 + * 2 = * 6, six times new unit 744 <2> ; at most 1.5 MiB 745 <2> %else 746 <2> %error Unexpected SYMMAIN size 747 <2> %endif 0 000044F3 034EF0 add cx, word [bp + ?mainbyte] 0 000044F6 135EF2 adc bx, word [bp + ?mainbyte + 2] 750 <2> 0 000044F9 83FB18 cmp bx, TABLE_MAX_SYMMAIN_ARRAY_BYTE >> 16 0 000044FC 7503 jne @F 0 000044FE 83F900 cmp cx, TABLE_MAX_SYMMAIN_ARRAY_BYTE & 0FFFFh 754 <2> @@: 0 00004501 720F jb @F ; if not maximum --> 756 <2> ; NOTE: Does NOT jump for exact match, which requires us 757 <2> ; to use FFFFh for the ?mainhashindex variable 758 <2> ; (not 1_0000h). 759 <2> .max_symmain: 760 <2> ; allocate maximum amount of paragraphs (and indices) 0 00004503 B9FFFF mov cx, TABLE_MAX_SYMMAIN_ARRAY_INDEX 762 <2> ; cx = amount indices 763 <2> ; allocate a full SYMMAIN array 0 00004506 C746F00000 mov word [bp + ?mainbyte], TABLE_MAX_SYMMAIN_ARRAY_BYTE & 0FFFFh 0 0000450B C746F21800 mov word [bp + ?mainbyte + 2], TABLE_MAX_SYMMAIN_ARRAY_BYTE >> 16 766 <2> ; allocate a full (1 MiB or) 1.5 MiB 0 00004510 EB19 jmp @FF 768 <2> @@: 769 <2> ; bx:cx = amount of paragraphs to allocate 770 <2> %if SYMMAIN_size == 16 771 <2> mov bx, dx 772 <2> mov cx, ax 773 <2> %rep 4 774 <2> shr bx, 1 775 <2> rcr cx, 1 776 <2> %endrep 777 <2> ; Amount of paragraphs matches amount of indices. 778 <2> ; (Except for the special case of 1_0000h paragraphs 779 <2> ; but 0FFFFh indices, taken care of by the prior part.) 780 <2> %elif SYMMAIN_size == 24 781 <2> ; Amount of paragraphs needs to be divided by 1.5 to get 782 <2> ; amount of indices. (Again, the special case of 96 Ki 783 <2> ; paragraphs is already taken care of. Therefore, the 784 <2> ; maximum amount of paragraphs in bx:cx here is 96 Ki - 1.) 785 <2> ; 786 <2> ; 24 * 2 = 48 787 <2> ; 48 / 3 = 16 788 <2> ; 24 / 1.5 = 16 0 00004512 89C8 mov ax, cx 0 00004514 89DA mov dx, bx 0 00004516 01C0 add ax, ax 0 00004518 11D2 adc dx, dx ; * 2 793 <2> ; at most (1536 KiB - 1 B) * 2 == 3072 KiB - 2 B 0 0000451A B93000 mov cx, 3 * 16 0 0000451D F7F1 div cx ; / 3 796 <2> ; at most (3072 KiB - 2 B) / (3 * 16) < 64 KiB 0 0000451F 91 xchg ax, cx ; cx = amount indices 798 <2> %else 799 <2> %error Unexpected SYMMAIN size 800 <2> %endif 0 00004520 B81800 mov ax, SYMMAIN_size 0 00004523 F7E1 mul cx 0 00004525 8946F0 mov word [bp + ?mainbyte], ax 0 00004528 8956F2 mov word [bp + ?mainbyte + 2], dx 805 <2> ; = amount paragraphs 806 <2> @@: 0 0000452B 894EFC mov word [bp + ?mainhashindex], cx 808 <2> 0 0000452E 83E7FC and di, ~3 810 <2> 0 00004531 0176EE add word [bp + ?hashbyte + 2], si 0 00004534 017EEC add word [bp + ?hashbyte], di ; one time new unit of storage 813 <2> ; at most 256 KiB 814 <2> ; ?mainhashindex already set 815 <2> 0 00004537 8B46FC mov ax, word [bp + ?mainhashindex] 0 0000453A 3B06[2E00] cmp ax, word [sym_storage.main.free] 0 0000453E 7206 jb .too_small_main 0 00004540 3B06[4800] cmp ax, word [sym_storage.hash.free] 0 00004544 7306 jae @F 821 <2> .too_small_hash: 822 <2> .too_small_main: 0 00004546 BA[0000] mov dx, msg.zz_too_small_mainhash 0 00004549 E9F301 jmp exit_error_msg 825 <2> 826 <2> @@: 0 0000454C 8B46FE mov ax, word [bp + ?strindex] 0 0000454F 3B06[4C00] cmp ax, word [sym_storage.str.free] 0 00004553 7306 jae @F 830 <2> .too_small_str: 0 00004555 BA[0000] mov dx, msg.zz_too_small_str 0 00004558 E9E401 jmp exit_error_msg 833 <2> 834 <2> @@: 835 <2> 0 0000455B 8B46E4 mov ax, word [bp + ?totalbyte] 0 0000455E 8B56E6 mov dx, word [bp + ?totalbyte + 2] 0 00004561 2B46F0 sub ax, word [bp + ?mainbyte] 0 00004564 1B56F2 sbb dx, word [bp + ?mainbyte + 2] 0 00004567 2B46E8 sub ax, word [bp + ?strbyte] 0 0000456A 1B56EA sbb dx, word [bp + ?strbyte + 2] 0 0000456D 2B46EC sub ax, word [bp + ?hashbyte] 0 00004570 1B56EE sbb dx, word [bp + ?hashbyte + 2] 0 00004573 85C0 test ax, ax 0 00004575 7504 jnz @F 0 00004577 85D2 test dx, dx 0 00004579 741E jz .retn 848 <2> @@: 0 0000457B 0146E8 add word [bp + ?strbyte], ax 0 0000457E 1156EA adc word [bp + ?strbyte + 2], dx 0 00004581 A803 test al, 3 0 00004583 7403E92EFF jnz .internalerror 0 00004588 D1EA shr dx, 1 0 0000458A D1D8 rcr ax, 1 0 0000458C D1EA shr dx, 1 0 0000458E D1D8 rcr ax, 1 0 00004590 0146FE add word [bp + ?strindex], ax 0 00004593 7304 jnc .retn 0 00004595 834EFEFF or word [bp + ?strindex], -1 860 <2> .retn: 0 00004599 C3 retn 862 <2> 863 <2> lleave ctx 3151 <1> %endif 3152 <1> 3153 <1> %if _USE_RELOCATE 3154 <1> %include "relocate.asm" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbol relocation implementation 5 <2> by 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> %include "lmacros2.mac" 1 <3> [list -] 16 <2> %include "symbols.mac" 1 <3> 2 <3> %if 0 3 <3> 4 <3> Symbolic debugging macros 5 <3> by C. Masloch, 2019 6 <3> 7 <3> Usage of the works is permitted provided that this 8 <3> instrument is retained with the works, so that any entity 9 <3> that uses the works is notified of this instrument. 10 <3> 11 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 12 <3> 13 <3> %endif 14 <3> 15 <3> %ifndef __SYMBOLS_MAC__ 16 <3> %assign __SYMBOLS_MAC__ 1 17 <3> 18 <3> numdef SYMMAINLARGE, 1 19 <3> 20 <3> 21 <3> ; Note: SYMMAINs are stored as an array, which is sorted 22 <3> ; on the smLinear value. Therefore, binary search can 23 <3> ; be used to find an entry in the entire array. 24 <3> struc SYMMAIN 25 <3> smLinear: resd 1 ; linear address of symbol 26 <3> ; Currently all symbols are fully filled, with a 32-bit 27 <3> ; linear value and a 32-bit offset value. (It is of course 28 <3> ; valid to use an offset that fits in 16 bits.) 29 <3> ; Symbols without either a linear or an offset value 30 <3> ; may be supported later, in which case there would be 31 <3> ; a flag to indicate this. 32 <3> smOffset: resd 1 ; offset of symbol 33 <3> ; The following two fields are SYMSTR heap dword indices. 34 <3> ; The value 0 is special, it refers to the empty string. 35 <3> ; To simplify handling of this, the SYMSTR heap contains 36 <3> ; an actual entry with an empty string at index 0. 37 <3> smName1: resw 1 ; -> first string part 38 <3> smName2: resw 1 ; -> second string part 39 <3> smHashByte: ; (low byte of flags is truncated hash value) 40 <3> smFlags: resw 1 ; flags 41 <3> ; The following field is a SYMMAIN paragraph index. 42 <3> ; The value -1 indicates none. 43 <3> %if _SYMMAINLARGE 44 <3> smBase: ; SYMMAIN entry this one is based from 45 <3> %else 46 <3> smNext: ; SYMMAIN entry which was loaded next 47 <3> %endif 48 <3> resw 1 49 <3> alignb 16 50 <3> %if _SYMMAINLARGE 51 <3> ; smBaseNext and smBasePrev form a doubly-linked list 52 <3> ; of the entries belonging to a particular base SYMMAIN. 53 <3> ; -1 indicates no next or no previous entry. 54 <3> ; If smfBase is set then the smBaseNext contains a link 55 <3> ; to the first entry belonging to this SYMMAIN as a base, 56 <3> ; and smBasePrev links to the last entry. -1 if none. 57 <3> smBaseNext: resw 1 58 <3> smBasePrev: resw 1 59 <3> ; If smfBase is set these fields form a doubly-linked list 60 <3> ; of all SYMMAIN entries with smfBase set. 61 <3> ; If smfBreakpoint is set these fields form a doubly-linked 62 <3> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <3> ; These fields are also used by zz_relocate to remember 64 <3> ; which entries to relocate. 65 <3> smSpecialNext: resw 1 66 <3> smSpecialPrev: resw 1 67 <3> %endif 68 <3> endstruc 69 <3> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <3> %error Unexpected SYMMAIN_size 71 <3> %endif 72 <3> SYMMAIN_index_size equ SYMMAIN_size 73 <3> 74 <3> insertfDropSymHintStoreString: equ 1 75 <3> insertfExistingMask equ 0E0h 76 <3> insertfExistingDefaultSymbol equ 00h 77 <3> insertfExistingDefaultStart equ 20h 78 <3> insertfExistingBlockDiffering equ 40h 79 <3> insertfExistingBlockAll equ 60h 80 <3> insertfExistingUpdate equ 80h 81 <3> insertfExistingDuplicate equ 0A0h 82 <3> insertfExistingKeep equ 0C0h 83 <3> ; insertfExisting equ 0E0h 84 <3> smfSectionStartEnd: equ 100h 85 <3> smfBase: equ 100h 86 <3> smfAnonLabel: equ 200h 87 <3> smfSymHint: equ 400h 88 <3> smfSymHintStoreString: equ 800h 89 <3> smfPoison: equ 1000h 90 <3> smfBreakpoint: equ 2000h 91 <3> 92 <3> struc SYMSTR 93 <3> ; The following two fields are expected to be consecutive, they 94 <3> ; are accessed together as a word. (Refer to ssLength usages.) 95 <3> ssLength: resb 1 ; how long this string is (only ssString) 96 <3> ssRefCount: resb 1 ; how often this string is referenced 97 <3> ; The ssRefCount value can be: 98 <3> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <3> ; A reference may be added, incrementing the count. 100 <3> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <3> ; If all references are freed, it is expected that 102 <3> ; the count decreases to zero. 103 <3> ; A reference may be added, incrementing the count. 104 <3> ; 254 = Referenced SYMSTR, with that many references. 105 <3> ; No reference may be added, as 254 is the maximum 106 <3> ; reference count that indicates a referenced SYMSTR. 107 <3> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <3> ; times. May not be deleted unless all tables are freed. 109 <3> ; This is used by the empty string SYMSTR at index 0. 110 <3> ssHash: resw 1 ; hash value of this string 111 <3> ssString: ; actual string content 112 <3> ; Note that if the string is not dword-aligned, NUL bytes are 113 <3> ; appended to insure that the SYMSTR structure is padded to a 114 <3> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <3> ; Therefore, the size of a SYMSTR record is obtained by 116 <3> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <3> ; (Note: A terminating NUL byte is not included if the string 118 <3> ; length is dword-aligned already. The length must be used 119 <3> ; directly, not implied by a terminator.) 120 <3> endstruc 121 <3> SYMSTR_typical_size equ 28 122 <3> SYMSTR_index_size equ 4 123 <3> 124 <3> ; Note: SYMHASHs are stored as an array, which is sorted 125 <3> ; on the shHash value. Therefore, binary search can 126 <3> ; be used to find an entry in the entire array. 127 <3> ; 128 <3> ; The hash value is computed by hashing the entire name 129 <3> ; string (ie, both smName1 and smName2 string contents) 130 <3> ; with the algorithm as such: 131 <3> ; 132 <3> ; for (hash = 1, index = 0; index < length; index += 1) 133 <3> ; hash = hash * 31 + name[index]; 134 <3> struc SYMHASH 135 <3> shHash: resw 1 ; hash value 136 <3> shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <3> endstruc 138 <3> SYMHASH_index_size equ SYMHASH_size 139 <3> 140 <3> 141 <3> struc XMSMOVE 142 <3> xmsmCount: resd 1 143 <3> ; The count must be even. 144 <3> xmsmSourceHandle: resw 1 145 <3> xmsmSourceAddress: resd 1 146 <3> xmsmDestHandle: resw 1 147 <3> xmsmDestAddress: resd 1 148 <3> ; The destination and source may overlap only if a 149 <3> ; forward move would suffice to implement the 150 <3> ; operation without corrupting the data. (That is, 151 <3> ; the source starts above the destination. The XMS 152 <3> ; specification gets this detail wrong.) 153 <3> ; There is an error code for invalid overlap, but 154 <3> ; it is unclear whether this condition is detected 155 <3> ; properly by all implementations. 156 <3> endstruc 157 <3> 158 <3> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <3> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <3> 161 <3> 162 <3> %endif 17 <2> 18 <2> defaulting 19 <2> 20 <2> 21 <2> ; INP: dx:ax = start of source 22 <2> ; bx:cx = start of destination 23 <2> ; dword [ss:sp] = length 24 <2> ; OUT: cx = number of symbols relocated 25 <2> dualfunction 26 <2> zz_relocate: section_of_function 27 <2> lframe dualdistance 28 <2> lpar dword, length 29 <2> lvar dword, delta 30 <2> lvar word, amount 31 <2> lvar word, main_index 0 0000459A 5589E58D66F8 lenter 33 <2> lvar dword, start_source 0 000045A0 52 push dx 0 000045A1 50 push ax 36 <2> lvar dword, start_dest 0 000045A2 53 push bx 0 000045A3 51 push cx 39 <2> 0 000045A4 89C3 mov bx, ax 0 000045A6 89D1 mov cx, dx ; cx:bx = start source 0 000045A8 035E06 add bx, word [bp + ?length] 0 000045AB 134E08 adc cx, word [bp + ?length + 2] 0 000045AE 7306 jnc @F 45 <2> 0 000045B0 BA[0000] mov dx, msg.zz_reloc_overflow 0 000045B3 E98901 jmp exit_error_msg 48 <2> 49 <2> @@: 50 <2> 0 000045B6 E8F5F0 nearcall binsearchmain 0 000045B9 894EFA mov word [bp + ?amount], cx 0 000045BC 85C9 test cx, cx 0 000045BE 7503E9D900 jz .return 55 <2> 56 <2> %if _SYMMAINLARGE 0 000045C3 833E[3E00]FF cmp word [sym_storage.main.reloc.first], -1 0 000045C8 7403E9DB00 jne .invaliddata 0 000045CD 833E[4000]FF cmp word [sym_storage.main.reloc.last], -1 0 000045D2 7403E9D100 jne .invaliddata 61 <2> 0 000045D7 E8BAF3 nearcall zz_unlink_main_next 0 000045DA 891E[3E00] mov word [sym_storage.main.reloc.first], bx 0 000045DE 891E[4000] mov word [sym_storage.main.reloc.last], bx 0 000045E2 EB46 jmp .done_link 66 <2> 67 <2> .loop_unlink: 0 000045E4 E8ADF3 nearcall zz_unlink_main_next 69 <2> 0 000045E7 A1[4000] mov ax, word [sym_storage.main.reloc.last] 0 000045EA 50 push ax 0 000045EB 50 push ax 0 000045EC E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 000045F3 5F pop di 0 000045F4 07 pop es 0 000045F5 26837D14FF cmp word [es:di + smSpecialNext], -1 0 000045FA 7403E93301 jne invaliddata 0 000045FF 26895D14 mov word [es:di + smSpecialNext], bx 0 00004603 06 push es 0 00004604 57 push di 0 00004605 50 push ax 0 00004606 E8[0000]EB02[3511] dualcall save_slice_farpointer.main 83 <2> 0 0000460D 53 push bx 0 0000460E 50 push ax 0 0000460F E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00004616 5F pop di 0 00004617 07 pop es 0 00004618 26894516 mov word [es:di + smSpecialPrev], ax 0 0000461C 06 push es 0 0000461D 57 push di 0 0000461E 53 push bx 0 0000461F E8[0000]EB02[3511] dualcall save_slice_farpointer.main 0 00004626 891E[4000] mov word [sym_storage.main.reloc.last], bx 95 <2> 96 <2> .done_link: 0 0000462A 43 inc bx 0 0000462B E2B7 loop .loop_unlink 99 <2> 0 0000462D 8B46F0 mov ax, word [bp + ?start_dest] 0 00004630 8B56F2 mov dx, word [bp + ?start_dest + 2] 102 <2> 0 00004633 2B46F4 sub ax, word [bp + ?start_source] 0 00004636 1B56F6 sbb dx, word [bp + ?start_source + 2] 105 <2> 0 00004639 8946FC mov word [bp + ?delta], ax 0 0000463C 8956FE mov word [bp + ?delta + 2], dx 108 <2> 0 0000463F 833E[3E00]FF cmp word [sym_storage.main.reloc.first], -1 0 00004644 7462 je .invaliddata 111 <2> .loop_reloc: 0 00004646 A1[3E00] mov ax, word [sym_storage.main.reloc.first] 0 00004649 83F8FF cmp ax, -1 0 0000464C 744E je .done_reloc 115 <2> 0 0000464E 8946F8 mov word [bp + ?main_index], ax 117 <2> %else 118 <2> 119 <2> 120 <2> cmp word [sym_storage.main.relocate], -1 121 <2> jne .invaliddata 122 <2> 123 <2> .loop_unlink: 124 <2> nearcall zz_unlink_main_next 125 <2> 126 <2> mov ax, word [sym_storage.main.relocate] 127 <2> cmp ax, -1 128 <2> jne @F 129 <2> 130 <2> mov word [sym_storage.main.relocate], bx 131 <2> jmp .done_link 132 <2> 133 <2> @@: 134 <2> .loop_link: 135 <2> ; cmp ax, -1 136 <2> ; je .invaliddata 137 <2> cmp ax, word [sym_storage.main.free] 138 <2> jae .invaliddata 139 <2> 140 <2> push ax 141 <2> push ax 142 <2> dualcall getfarpointer.main 143 <2> pop di 144 <2> pop es 145 <2> cmp word [es:di + smNext], -1 146 <2> jne .next_link 147 <2> mov word [es:di + smNext], bx 148 <2> push es 149 <2> push di 150 <2> push ax 151 <2> dualcall save_slice_farpointer.main 152 <2> jmp .done_link 153 <2> 154 <2> .next_link: 155 <2> mov ax, word [es:di + smNext] 156 <2> jmp .loop_link 157 <2> 158 <2> .done_link: 159 <2> inc bx 160 <2> loop .loop_unlink 161 <2> 162 <2> mov ax, word [bp + ?start_dest] 163 <2> mov dx, word [bp + ?start_dest + 2] 164 <2> 165 <2> sub ax, word [bp + ?start_source] 166 <2> sbb dx, word [bp + ?start_source + 2] 167 <2> 168 <2> mov word [bp + ?delta], ax 169 <2> mov word [bp + ?delta + 2], dx 170 <2> 171 <2> mov ax, word [sym_storage.main.relocate] 172 <2> cmp ax, -1 173 <2> je .invaliddata 174 <2> 175 <2> mov word [bp + ?main_index], ax 176 <2> .loop_reloc: 177 <2> %endif 0 00004651 FF76F8 push word [bp + ?main_index] 0 00004654 50 push ax 0 00004655 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 0000465C 5F pop di 0 0000465D 07 pop es 183 <2> 0 0000465E 268B450C mov ax, word [es:di + smFlags] 0 00004662 2500FF and ax, 0FF00h ; keep flags 0 00004665 0CA0 or al, insertfExistingDuplicate 187 <2> ; set insert flags 188 <2> 189 <2> %if ! _SYMMAINLARGE 190 <2> mov cx, -1 191 <2> xchg cx, word [es:di + smNext] 192 <2> mov word [sym_storage.main.relocate], cx 193 <2> %endif 194 <2> 0 00004667 268B0D mov cx, word [es:di + smLinear] 0 0000466A 268B5D02 mov bx, word [es:di + smLinear + 2] 197 <2> 0 0000466E 034EFC add cx, word [bp + ?delta] 0 00004671 135EFE adc bx, word [bp + ?delta + 2] 200 <2> ; relocate the linear value 201 <2> 202 <2> %if _SYMMAINLARGE 0 00004674 26FF750E push word [es:di + smBase] 0 00004678 8F06[3000] pop word [sym_storage.main.based.base] 205 <2> ; pass to zz_insert our base 206 <2> %endif 207 <2> 0 0000467C 53 push bx 0 0000467D 51 push cx ; parameter dword: linear 210 <2> 0 0000467E 26FF7506 push word [es:di + smOffset + 2] 0 00004682 26FF7504 push word [es:di + smOffset] 213 <2> ; parameter dword: offset 214 <2> 0 00004686 50 push ax ; parameter word: flags 216 <2> 0 00004687 8B46F8 mov ax, word [bp + ?main_index] 0 0000468A E81E00 nearcall zz_delete_main_and_its_hash 219 <2> 220 <2> ; on stack: dword linear, dword offset, word flags 0 0000468D E8[0000]EB02[E101] dualcall zz_insert 222 <2> 0 00004694 C706[0000][0000] mov word [stack_low_address], str_buffer 224 <2> 225 <2> %if _SYMMAINLARGE 0 0000469A EBAA jmp .loop_reloc 227 <2> 228 <2> .done_reloc: 229 <2> %else 230 <2> mov ax, word [sym_storage.main.relocate] 231 <2> ; smNext entry (next in .main.relocate list) 232 <2> mov word [bp + ?main_index], ax 233 <2> cmp ax, -1 234 <2> jne .loop_reloc 235 <2> %endif 236 <2> 237 <2> .return: 0 0000469C 8B4EFA mov cx, word [bp + ?amount] 0 0000469F 89EC5D lleave 0 000046A2 E8[0000] dualreturn 0 000046A5 CA0400 lret 242 <2> 243 <2> .invaliddata: 0 000046A8 E98700 jmp invaliddata 245 <2> 246 <2> 247 <2> ; INP: ax = main index to delete 248 <2> ; OUT: word [stack_low_address] = stack 249 <2> ; [str_buffer] = full name of deleted symbol 250 <2> ; cx = length of name 251 <2> ; es:dx -> str_buffer 252 <2> ; does not return if an error occurs 253 <2> ; CHG: di, ax, bx, si 254 <2> ; STT: ds = data segment 255 <2> ; (for sym_storage, stack_low_address, str_buffer) 256 <2> zz_delete_main_and_its_hash: 257 <2> lframe near 0 000046AB 5589E5 lenter 259 <2> lvar word, main_index 0 000046AE 50 push ax 261 <2> 0 000046AF C706[0000][0000] mov word [stack_low_address], stack 263 <2> 0 000046B5 1E push ds 0 000046B6 FF76FE push word [bp + ?main_index] 0 000046B9 50 push ax ; (reserve space, uninitialised) 0 000046BA E8[0000]EB02[9D0D] dualcall getfarpointer.main ; set up access slice to SYMMAIN entry 0 000046C1 5F pop di 0 000046C2 07 pop es 0 000046C3 E851EF nearcall getstring1 ; set up access slice to SYMSTR entry 0 000046C6 89D6 mov si, dx 0 000046C8 07 pop es ; => data segment (to access str_buffer) 273 <2> 0 000046C9 06 push es ; => data segment 0 000046CA BF[0000] mov di, str_buffer ; es:di -> str_buffer 0 000046CD F3A4 rep movsb 0 000046CF 1F pop ds ; => data segment (to access sym_storage) 0 000046D0 1E push ds 0 000046D1 57 push di ; -> after str_buffer + first string 0 000046D2 FF76FE push word [bp + ?main_index] 0 000046D5 50 push ax ; (reserve space, uninitialised) 0 000046D6 E8[0000]EB02[9D0D] dualcall getfarpointer.main ; set up access slice to SYMMAIN entry 0 000046DD 5F pop di 0 000046DE 07 pop es 0 000046DF E84EEF nearcall getstring2 ; set up access slice to SYMSTR entry 0 000046E2 89D6 mov si, dx 0 000046E4 5F pop di ; -> after str_buffer + first string 0 000046E5 07 pop es ; es:di -> that 0 000046E6 F3A4 rep movsb 290 <2> 0 000046E8 BE[0000] mov si, str_buffer ; es:si -> symbol name 0 000046EB 29F7 sub di, si 0 000046ED 89F9 mov cx, di ; = length of symbol name 294 <2> 0 000046EF 06 push es 0 000046F0 1F pop ds ; ds:si -> symbol name, ds => data segment 297 <2> 0 000046F1 56 push si 0 000046F2 51 push cx 0 000046F3 E875F0 nearcall zz_hash 301 <2> 0 000046F6 53 push bx 0 000046F7 E84DEF nearcall binsearchhash ; search for hash match 0 000046FA 5A pop dx ; dx = hash value 0 000046FB 7220 jc .invaliddata ; no match ? --> 306 <2> 0 000046FD 8B46FE mov ax, word [bp + ?main_index] 308 <2> 309 <2> .loop_hash: 0 00004700 26394502 cmp word [es:di + shMain], ax 311 <2> ; is it the corresponding symhash ? 0 00004704 7419 je .found_hash ; yes --> 0 00004706 43 inc bx ; try next symhash 0 00004707 3B1E[4800] cmp bx, word [sym_storage.hash.free] 315 <2> ; next is in use ? 0 0000470B 7310 jae .invaliddata ; no --> 317 <2> 0 0000470D 53 push bx 0 0000470E 50 push ax 0 0000470F E8[0000]EB02[B50D] dualcall getfarpointer.hash ; get the next symhash 0 00004716 5F pop di 0 00004717 07 pop es 0 00004718 263915 cmp word [es:di + shHash], dx 324 <2> ; still the same hash value ? 0 0000471B 74E3 je .loop_hash ; yes, check this one next --> 326 <2> ; no, corresponding symhash not found 327 <2> .invaliddata: 0 0000471D EB13 jmp invaliddata 329 <2> 330 <2> .found_hash: 0 0000471F 53 push bx ; symhash to delete 0 00004720 8B5EFE mov bx, word [bp + ?main_index] 0 00004723 E8DFF1 nearcall zz_delete_main ; delete symmain 0 00004726 5B pop bx 0 00004727 E833F1 nearcall zz_delete_hash ; delete symhash 336 <2> 0 0000472A 59 pop cx ; cx = symbol name length 0 0000472B 5A pop dx ; dx -> str_buffer holding full symbol name 339 <2> 0 0000472C 1E push ds 0 0000472D 07 pop es ; es:dx -> symbol name 0 0000472E 89EC5D lleave 0 00004731 C3 lret 3155 <1> %endif 3156 <1> 3157 <1> 3158 <1> %if _DEBUG0 || _DEBUG2 3159 <1> function_list_hash: 3160 <1> push ax 3161 <1> push bx 3162 <1> push cx 3163 <1> push dx 3164 <1> push ds 3165 <1> push es 3166 <1> push si 3167 <1> push di 3168 <1> push bp 3169 <1> pushf 3170 <1> 3171 <1> mov dx, msg.linebreak 3172 <1> nearcall disp_message 3173 <1> 3174 <1> mov cx, word [sym_storage.hash.free] 3175 <1> xor bx, bx 3176 <1> jcxz .end 3177 <1> .loop: 3178 <1> push bx ; hash index 3179 <1> push ax ; (reserve space, uninitialised) 3180 <1> dualcall getfarpointer.hash 3181 <1> pop di 3182 <1> pop es ; -> SYMHASH entry (access slice) 3183 <1> 3184 <1> mov dx, msg.list_hash_first 3185 <1> nearcall disp_message 3186 <1> mov ax, word [es:di + shHash] 3187 <1> nearcall disp_ax_hex 3188 <1> mov dx, msg.list_hash_second 3189 <1> nearcall disp_message 3190 <1> 3191 <1> push cx 3192 <1> mov cx, word [es:di + shMain] 3193 <1> push cx 3194 <1> dualcall displaystring 3195 <1> pop cx 3196 <1> mov dx, msg.list_hash_third 3197 <1> nearcall disp_message 3198 <1> .next: 3199 <1> inc bx 3200 <1> loop .loop 3201 <1> .end: 3202 <1> 3203 <1> popf 3204 <1> pop bp 3205 <1> pop di 3206 <1> pop si 3207 <1> pop es 3208 <1> pop ds 3209 <1> pop bx 3210 <1> pop cx 3211 <1> pop bx 3212 <1> pop ax 3213 <1> retn 3214 <1> %endif 3215 <1> 3216 <1> 3217 <1> %if _STANDALONE 3218 <1> msg: 3219 <1> .invaliddata: asciz "Invalid data!",13,10 3220 <1> %if _SECOND_SLICE && (_XMS_SYMBOL_TABLE || _BUFFER_86MM_SLICE) 3221 <1> .error_second_slice: asciz "Invalid access slice usage!",13,10 3222 <1> %endif 3223 <1> .main_too_full: asciz "Main array is too full!",13,10 3224 <1> .main_too_full_crit1: asciz "Main array is too full! Critical error. (Earlier check succeeded.)",13,10 3225 <1> .hash_too_full_crit1: asciz "Hash array is too full! Critical error. (Earlier check succeeded.)",13,10 3226 <1> .hash_too_full_crit2: asciz "Hash array is too full! Critical error. (Main has space.)",13,10 3227 <1> .str_too_full: asciz "String heap is too full!",13,10 3228 <1> .str_too_long: asciz "String is too long!",13,10 3229 <1> .linebreak: asciz 13,10 3230 <1> .list_first: asciz "Symbol: Linear=" 3231 <1> .list_second: asciz "h Offset=" 3232 <1> .list_middle: asciz "h = ",'"' 3233 <1> .list_last_success: asciz '"',13,10 3234 <1> .list_last_error: asciz '"'," (symbol linear is below the prior)",13,10 3235 <1> .list_end_1: asciz "Listed " 3236 <1> .list_end_2.singular: asciz " symbol",13,10,13,10 3237 <1> .list_end_2.plural: asciz " symbols",13,10,13,10 3238 <1> .list_hash_first: asciz "Hash: " 3239 <1> .list_hash_second: asciz "h " 3240 <1> .list_end: 3241 <1> .list_hash_third: asciz 13,10 3242 <1> .string_first: asciz "Index=" 3243 <1> .string_second: asciz " Length=" 3244 <1> .string_third: asciz " Ref=" 3245 <1> .string_fourth: asciz " Hash=" 3246 <1> .string_fifth: asciz ' "' 3247 <1> .string_sixth: asciz '"',13,10 3248 <1> .prefixes: db " kMGT" 3249 <1> .liststore.main.end.first: asciz 13,10,"Main total:",9 3250 <1> .liststore.main.free.first: asciz "Main free:",9 3251 <1> .liststore.main.used.first: asciz "Main used:",9 3252 <1> .liststore.hash.end.first: asciz 13,10,"Hash total:",9 3253 <1> .liststore.hash.free.first: asciz "Hash free:",9 3254 <1> .liststore.hash.used.first: asciz "Hash used:",9 3255 <1> .liststore.str.end.first: asciz 13,10,"String total:",9 3256 <1> .liststore.str.free.first: asciz "String free:",9 3257 <1> .liststore.str.used.first: asciz "String used:",9 3258 <1> .liststore.second: asciz " in " 3259 <1> .liststore.third.singular: asciz " unit",13,10 3260 <1> .liststore.third.plural: asciz " units",13,10 3261 <1> .liststore.str.first: asciz "Strings size is " 3262 <1> .liststore.str.unref.first: asciz "Unreferenced strings size is " 3263 <1> .liststore.str.unref.second: 3264 <1> .liststore.str.second: asciz " in " 3265 <1> .liststore.str.unref.third.singular: 3266 <1> .liststore.str.third.singular: asciz " string.",13,10 3267 <1> .liststore.str.unref.third.plural: 3268 <1> .liststore.str.third.plural: asciz " strings.",13,10 3269 <1> .liststore.str.fourth: asciz "Average string structure length is <= " 3270 <1> .liststore.str.invalid: asciz "Error: Average string structure length too large" 3271 <1> .liststore.str.nofourth:asciz "Cannot calculate average string structure length, number of strings is zero" 3272 <1> .liststore.str.last: asciz ".",13,10 3273 <1> .symhint: 3274 <1> .symhint_store_string: db "..@symhint_" 3275 <1> .symhint_size: equ $ - .symhint 3276 <1> db "store_string_" 3277 <1> .symhint_store_string_size equ $ - .symhint_store_string 3278 <1> .existing_block: asciz "Symbol already exists and is being blocked.",13,10 3279 <1> %if _XMS_SYMBOL_TABLE 3280 <1> .zz_no_xms: asciz "No XMS driver detected!",13,10 3281 <1> .zz_fail_xms_alloc: asciz "Failed to allocate XMS block!",13,10 3282 <1> .zz_fail_xms_access: asciz "Failed to access XMS block!",13,10 3283 <1> %endif 3284 <1> .zz_main_hash_mismatch: asciz "Compaction/expansion failed, differing amounts of hash and main entries.",13,10 3285 <1> .zz_main_not_first: asciz "Compaction/expansion failed, main array is not first.",13,10 3286 <1> .zz_hash_not_second: asciz "Compaction/expansion failed, hash array is not second.",13,10 3287 <1> .zz_str_not_third: asciz "Compaction/expansion failed, string heap is not third.",13,10 3288 <1> .zz_table_not_full: asciz "Compaction/expansion failed, table is not full.",13,10 3289 <1> .zz_too_much: asciz "Symbol table size is too large. Internal error!",13,10 3290 <1> .zz_too_short: asciz "Symbol table size is too short. Internal error!",13,10 3291 <1> .zz_length_mismatch: asciz "Symbol table table size mismatch. Internal error!",13,10 3292 <1> .zz_too_small_str: asciz "String symbol table target is too small.",13,10 3293 <1> .zz_too_small_hash: 3294 <1> .zz_too_small_mainhash: asciz "Main/hash symbol table target is too small.",13,10 3295 <1> .zz_internal_error_expand: 3296 <1> asciz "Internal error during symbol table expansion!",13,10 3297 <1> .zz_reloc_overflow: asciz "Cannot relocate, length of source range overflows!",13,10 3298 <1> 3299 <1> 3300 <1> align 2, db 0 3301 <1> sym_storage: 3302 <1> %if _XMS_SYMBOL_TABLE 3303 <1> .main.xms.start:dd 0 3304 <1> .hash.xms.start:dd SYMMAIN_size * _AMOUNT_SYMBOLS 3305 <1> .str.xms.start: dd (SYMMAIN_size + SYMHASH_size) * _AMOUNT_SYMBOLS 3306 <1> .xms.free: dd (SYMMAIN_size + SYMHASH_size + SYMSTR_typical_size) * _AMOUNT_SYMBOLS 3307 <1> .xms.end: dd (SYMMAIN_size + SYMHASH_size + SYMSTR_typical_size) * _AMOUNT_SYMBOLS + _ADDSIZE 3308 <1> %endif 3309 <1> %ifn _XMS_ONLY 3310 <1> .main.start: dw 0, (mainstart + SECTIONFIXUP) / 16 3311 <1> .hash.start: dw 0, (hashstart + SECTIONFIXUP) / 16 3312 <1> .str.start: dw 0, (strstart + SECTIONFIXUP) / 16 3313 <1> .start: dw 0, (tablestart + SECTIONFIXUP) / 16 3314 <1> .free: dw 0, (tableend + SECTIONFIXUP) / 16 3315 <1> .end: dw 0, (table_later_end + SECTIONFIXUP) / 16 3316 <1> %endif 3317 <1> .main.end: dw _AMOUNT_SYMBOLS 3318 <1> .main.free: dw 0 3319 <1> %if _SYMMAINLARGE 3320 <1> .main.based.base: dw -1 3321 <1> .main.base.first: dw -1 3322 <1> .main.base.last: dw -1 3323 <1> .main.bb.first: dw -1 3324 <1> .main.bb.last: dw -1 3325 <1> .main.nonbased.first: dw -1 3326 <1> .main.nonbased.last: dw -1 3327 <1> .main.reloc.first: dw -1 3328 <1> .main.reloc.last: dw -1 3329 <1> %else 3330 <1> .main.first: dw -1 3331 <1> .main.last: dw -1 3332 <1> .main.relocate: dw -1 3333 <1> %endif 3334 <1> %if _ZZ_INSERT_TEMP 3335 <1> ; This is a SYMMAIN array index. However, it 3336 <1> ; should NOT participate in relocation. Must 3337 <1> ; be >= .main.free at all times. 3338 <1> .main.temp.first: dw -1 3339 <1> ; Amount of in-use temporary SYMMAIN entries. 3340 <1> .main.temp.amount: dw 0 3341 <1> %endif 3342 <1> 3343 <1> .hash.end: dw _AMOUNT_SYMBOLS 3344 <1> .hash.free: dw 0 3345 <1> .str.end: dw (_AMOUNT_SYMBOLS * SYMSTR_typical_size) / SYMSTR_index_size 3346 <1> .str.free: dw 0 3347 <1> 3348 <1> zz_flag_existing_default: 3349 <1> .symbol: db insertfExistingBlockDiffering 3350 <1> .start: db insertfExistingKeep 3351 <1> 3352 <1> pre_str_list: 3353 <1> db -1, "", 0 3354 <1> .end: 3355 <1> 3356 <1> %if _BUFFER_86MM_SLICE || _XMS_SYMBOL_TABLE 3357 <1> align 16, db 0 3358 <1> access_slice_buffer: 3359 <1> .: 3360 <1> times ssString + 255 db 0 3361 <1> align 2, db 0 3362 <1> .size: equ $ - . 3363 <1> %if _SECOND_SLICE 3364 <1> align 16, db 0 3365 <1> second_access_slice_buffer: 3366 <1> .: 3367 <1> times ssString + 255 db 0 3368 <1> align 2, db 0 3369 <1> .size: equ $ - . 3370 <1> %endif 3371 <1> %endif 3372 <1> 3373 <1> 3374 <1> %imacro listentry 2-4.nolist 3375 <1> %if %0 == 4 3376 <1> db %4, 0 3377 <1> align 4, db 0 3378 <1> dd %1 3379 <1> dd %2 3380 <1> dd %3 3381 <1> %elif %0 == 3 3382 <1> db %3, 0 3383 <1> align 4, db 0 3384 <1> dd %1 3385 <1> dd %2 3386 <1> dd 0 3387 <1> %else 3388 <1> db %2, 0 3389 <1> align 4, db 0 3390 <1> dd %1 3391 <1> dd %1 3392 <1> dd 0 3393 <1> %endif 3394 <1> %endmacro 3395 <1> 3396 <1> align 4, db 0 3397 <1> list: 3398 <1> %ifnidn _INCLUDELIST0, "" 3399 <1> %include _INCLUDELIST0 3400 <1> %endif 3401 <1> %ifnidn _INCLUDELIST, "" 3402 <1> %include _INCLUDELIST 3403 <1> %else 3404 <1> listentry 0100h, "Alpha" 3405 <1> listentry 0102h, "Alpha.bet" 3406 <1> listentry 0104h, "Alpha.end" 3407 <1> listentry 0106h, 0106h, insertfExistingDuplicate, "Alpha.end" 3408 <1> listentry 0108h, "Beta" 3409 <1> listentry 010Ah, "Beta.loop" 3410 <1> listentry 010Eh, "Beta.end" 3411 <1> listentry 01ABh, "Eta" 3412 <1> listentry 0110h, "Gamma" 3413 <1> listentry 0110h, "Delta" 3414 <1> listentry 0112h, "Delta.next" 3415 <1> listentry 0113h, 0113h, insertfExistingDuplicate, "Delta.next" 3416 <1> listentry 0114h, 0114h, insertfExistingDuplicate, "Delta.next" 3417 <1> listentry 0114h, "Delta.end" 3418 <1> listentry 0120h, "Epsilon" 3419 <1> listentry 0121h, "Zeta" 3420 <1> listentry 010Ch, 010Ch, insertfExistingUpdate, "Beta.loop" 3421 <1> %endif 3422 <1> .end: 3423 <1> 3424 <1> %if _USE_DELETE 3425 <1> list_to_delete: 3426 <1> asciz "Delta.next" 3427 <1> asciz "Beta.end" 3428 <1> .end: 3429 <1> %endif 3430 <1> 3431 <1> %if _USE_RELOCATE 3432 <1> relocatelist: 3433 <1> dd 0120h ; source 3434 <1> dd 0200h ; dest 3435 <1> dw 2 ; length 3436 <1> .end: 3437 <1> %endif 3438 <1> 3439 <1> %if _XMS_SYMBOL_TABLE 3440 <1> align 16, db 0 3441 <1> zz_xms: 3442 <1> .16_zeros: times 16 db 0 3443 <1> align 2, db 0 3444 <1> .movestruc: times XMSMOVE_size db 0 3445 <1> align 4, db 0 3446 <1> .entry: dq 0 3447 <1> .handle: dw -1 3448 <1> .transfer_address: dd XMSTABLE_TABLE_PLUS_SIZE - XMSTRANSFER_default_size 3449 <1> .transfer_size: dd XMSTRANSFER_default_size 3450 <1> %endif ; _XMS_SYMBOL_TABLE 3451 <1> 3452 <1> 3453 <1> align 16, db 0 3454 <1> tablestart: 3455 <1> mainstart: 3456 <1> times _AMOUNT_SYMBOLS * SYMMAIN_size db 0 3457 <1> mainend: 3458 <1> 3459 <1> align 16, db 0 3460 <1> hashstart: 3461 <1> times _AMOUNT_SYMBOLS * SYMHASH_size db 0 3462 <1> hashend: 3463 <1> 3464 <1> align 16, db 0 3465 <1> strstart: 3466 <1> times _AMOUNT_SYMBOLS * SYMSTR_typical_size db 0 3467 <1> strend: 3468 <1> tableend: 3469 <1> times _ADDSIZE db 0 3470 <1> table_later_end: 3471 <1> 3472 <1> 3473 <1> stack_low_address: dw str_buffer 3474 <1> align 16, db 0 3475 <1> str_buffer: times 512 db 0 3476 <1> 3477 <1> stack: 3478 <1> %endif 143 resetdef 144 resetdef 145 resetdef 146 resetdef 147 resetdef 148 149 150 ; error handlers used by insert.asm 151 invaliddata: 0 00004732 B80005 mov ax, 0500h 0 00004735 E8[0000]EB02[0000] nearcall setrc 0 0000473C BA[0000] mov dx, msg.invaliddata 155 exit_error_msg: 156 157 %if _DUALCODE && _SYMBOLICDUALCODE 158 %define SECTION_OF_exit_error_msg_code_entry lDEBUG_CODE 0 0000473F E8[0000]EB02[0000] nearcall exit_error_msg_code_entry 160 161 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 161 ------------------ note: usesection lDEBUG_CODE 162 163 exit_error_msg_code_entry: 0 0000B743 83C406 add sp, 6 ; discard near + far return address 165 %endif 166 exit_error_msg_code: 0 0000B746 16 push ss 0 0000B747 1F pop ds 0 0000B748 16 push ss 0 0000B749 07 pop es 0 0000B74A E8[0000] call putsz_error 0 0000B74D E8[0000]EB02[6936] nearcall zz_restore_strat 0 0000B754 B8FF05 mov ax, 05FFh 0 0000B757 E8[0000] call setrc 0 0000B75A FF26[0000] jmp near [errret] 176 177 %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 178 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 178 ------------------ note: usesection lDEBUG_CODE2 179 180 %define SECTION_OF_error_entry lDEBUG_CODE 181 section_of symbolasm_error 182 symbolasm_error: section_of_function 0 00004746 E8[0000]EB02[1B00] nearcall error_entry 184 185 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 185 ------------------ note: usesection lDEBUG_CODE 186 187 error_entry: 0 0000B75E 83C406 add sp, 6 0 0000B761 E9[0000] jmp error 190 %endif 191 192 zz: 193 %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 194 %define SECTION_OF_zz_relocated lDEBUG_CODE2 0 0000B764 E8[0000]EB02[E723] nearcall zz_relocated 0 0000B76B C3 retn 197 198 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 198 ------------------ note: usesection lDEBUG_CODE2 199 %endif 200 201 zz_relocated: 0 0000474D A8 db __TEST_IMM8 203 .: 0 0000474E AC lodsb 0 0000474F E8[0000]EB02[0000] nearcall iseol? 0 00004756 744F je .end 0 00004758 3C20 cmp al, 32 0 0000475A 76F2 jbe . 0 0000475C 3C2D cmp al, '-' 0 0000475E 7448 je .switch 0 00004760 3C2F cmp al, '/' 0 00004762 7444 je .switch 213 0 00004764 4E dec si 0 00004765 BA[0000] mov dx, msg.add 0 00004768 E8[0000]EB02[0000] nearcall isstring? 0 0000476F 7503E9D706 je zz_add 218 0 00004774 BA[0000] mov dx, msg.abort 0 00004777 E8[0000]EB02[0000] nearcall isstring? 0 0000477E 7457 je zz_abort 222 0 00004780 E86CE4 nearcall zz_commit_insert 224 225 226 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 226 ------------------ note: usesection lDEBUG_DATA_ENTRY 227 228 align 4, db 0 229 .dispatch: 0 00007634 [6824] dw zz_commit 0 00007636 [0000] dw msg.commit 0 00007638 [4C25] dw zz_del 0 0000763A [0000] dw msg.del 0 0000763C [4C25] dw zz_del 0 0000763E [0000] dw msg.delete 0 00007640 [8424] dw zz_reloc 0 00007642 [0000] dw msg.reloc 0 00007644 [8424] dw zz_reloc 0 00007646 [0000] dw msg.relocate 0 00007648 [2027] dw zz_stat 0 0000764A [0000] dw msg.stat 0 0000764C [3428] dw zz_list 0 0000764E [0000] dw msg.list 0 00007650 [2C27] dw zz_match 0 00007652 [0000] dw msg.match 0 00007654 0000 dw 0 ; table end marker 247 248 249 %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 250 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 250 ------------------ note: usesection lDEBUG_CODE2 251 %else 252 usesection lDEBUG_CODE 253 %endif 254 0 00004783 BB[A400] mov bx, .dispatch 256 @@: 0 00004786 8B0F mov cx, [bx] 0 00004788 8B5702 mov dx, [bx + 2] 0 0000478B 83C304 add bx, 4 0 0000478E E30B jcxz @F 0 00004790 E8[0000]EB02[0000] nearcall isstring? 0 00004797 75ED jne @B 0 00004799 FFE1 jmp cx 264 265 @@: 0 0000479B B80105 mov ax, 0501h 0 0000479E E8[0000]EB02[0000] nearcall setrc 0 000047A5 EB9F jmp symbolasm_error 269 270 .end: 0 000047A7 C3 retn 272 273 .switch: 0 000047A8 E844E4 nearcall zz_commit_insert 275 0 000047AB AC lodsb 0 000047AC E8[0000]EB02[0000] nearcall capitalise 0 000047B3 3C53 cmp al, 'S' 0 000047B5 7505 jne .unknown_switch 0 000047B7 E81E08 nearcall zz_switch_s 0 000047BA EB91 jmp zz_relocated 282 283 .unknown_switch: 0 000047BC B80205 mov ax, 0502h 0 000047BF E8[0000]EB02[0000] nearcall setrc 286 0 000047C6 A8 db __TEST_IMM8 ; (skip dec) 288 @@: 0 000047C7 4E dec si 290 @@: 0 000047C8 E97BFF jmp symbolasm_error 292 293 zz_switch_s.error_pop_si: 0 000047CB 5E pop si 0 000047CC EBFA jmp @B 296 297 298 ; This is a no-op. In the dispatcher however, 299 ; if this command is matched then the function 300 ; zz_commit_insert was already called. 301 zz_commit: 0 000047CE AC lodsb 0 000047CF E8[0000]EB02[0000] nearcall chkeol 0 000047D6 C3 retn 305 306 307 ; This is the only command (other than Z ADD) that 308 ; is executed without first committing the temporary 309 ; inserts. It helps if the debugger gets confused, as 310 ; otherwise all commands will fail during their attempt 311 ; to commit and the debugger becomes unusable. 312 zz_abort: 0 000047D7 AC lodsb 0 000047D8 E8[0000]EB02[0000] nearcall chkeol 315 %if _ZZ_INSERT_TEMP 0 000047DF 8326[4400]00 and word [sym_storage.main.temp.amount], 0 0 000047E4 830E[4200]FF or word [sym_storage.main.temp.first], -1 318 %endif 0 000047E9 C3 retn 320 321 322 zz_reloc: 0 000047EA E8[0000]EB02[0000] nearcall skipwhite 324 325 lframe 0 000047F1 5589E5 lenter 327 0 000047F4 8B1E[0000] mov bx, word [reg_cs] ; default segment = cs 0 000047F8 E8[0000] nearcall getaddrX 330 0 000047FB 31C9 xor cx, cx 332 lvar dword, start_offset 333 %if _PM 0 000047FD 50 push ax 0 000047FE 50 push ax 0 000047FF E8[0000]EB02[0000] dualcall push_cxdx_or_edx 337 %else 338 push cx 339 push dx 340 %endif 341 0 00004806 50 push ax 0 00004807 E8[0000]EB02[0000] nearcall getlinear_32bit 0 0000480E 7303E933FF jc symbolasm_error 345 0 00004813 89C1 mov cx, ax 0 00004815 58 pop ax 348 lvar dword, start_source 0 00004816 52 push dx 0 00004817 51 push cx 351 0 00004818 E8[0000]EB02[0000] nearcall capitalise 0 0000481F 3C4C cmp al, 'L' 0 00004821 741B je .l 355 0 00004823 E8[0000] nearcall getdword 0 00004826 2B56FC sub dx, word [bp + ?start_offset] 0 00004829 1B5EFE sbb bx, word [bp + ?start_offset + 2] 0 0000482C 7303E915FF jc symbolasm_error 0 00004831 83C201 add dx, 1 0 00004834 83D300 adc bx, 0 0 00004837 7303E90AFF jc symbolasm_error 0 0000483C EB04 jmp @F 364 365 .l: 0 0000483E AC lodsb 0 0000483F E8[0000] nearcall getdword 368 @@: 369 lvar dword, length 0 00004842 53 push bx 0 00004843 52 push dx 372 0 00004844 8B1E[0000] mov bx, word [reg_cs] 0 00004848 E8[0000] nearcall getaddrX 0 0000484B E8[0000]EB02[0000] nearcall chkeol 0 00004852 E8[0000]EB02[0000] nearcall getlinear_32bit 0 00004859 7303E9E8FE jc symbolasm_error 378 0 0000485E 91 xchg ax, cx 0 0000485F 87D3 xchg dx, bx ; bx:cx = start of destination 381 0 00004861 8B46F8 mov ax, word [bp + ?start_source] 0 00004864 8B56FA mov dx, word [bp + ?start_source + 2] 384 ; dx:ax = start of source 385 0 00004867 FF76F6 push word [bp + ?length + 2] 0 0000486A FF76F4 push word [bp + ?length] 388 ; stack = length 389 0 0000486D E8[0000]EB02[3422] dualcall zz_relocate 391 0 00004874 89EC5D lleave 393 0 00004877 89C8 mov ax, cx 395 0 00004879 85C0 test ax, ax 0 0000487B 7505 jnz @F 398 0 0000487D BA[0000] mov dx, msg.zz_reloc_amount_none 0 00004880 EB28 jmp @FF 401 402 @@: 0 00004882 BA[0000] mov dx, msg.zz_reloc_amount_1 0 00004885 E8[0000]EB02[0000] nearcall disp_message 0 0000488C BF[0000] mov di, line_out 0 0000488F E8[0000]EB02[0000] nearcall decword 0 00004896 50 push ax 0 00004897 E8[0000]EB02[0000] nearcall putsline 0 0000489E 58 pop ax 0 0000489F BA[0000] mov dx, msg.zz_reloc_amount_2.plural 0 000048A2 83F801 cmp ax, 1 0 000048A5 7503 jne @F 0 000048A7 BA[0000] mov dx, msg.zz_reloc_amount_2.singular 414 @@: 0 000048AA E8[0000]EB02[0000] nearcall disp_message 0 000048B1 C3 retn 417 418 419 zz_del: 0 000048B2 E8[0000]EB02[0000] nearcall skipwhite 421 0 000048B9 4E dec si 0 000048BA BA[0000] mov dx, msg.unrefstring 0 000048BD E8[0000]EB02[0000] nearcall isstring? 0 000048C4 7411 je delete_unref_str 0 000048C6 BA[0000] mov dx, msg.range 0 000048C9 E8[0000]EB02[0000] nearcall isstring? 0 000048D0 7503E92301 je zz_del_range 0 000048D5 EB36 jmp zz_del_match 430 431 432 delete_unref_str: 0 000048D7 AC lodsb 0 000048D8 E8[0000]EB02[0000] nearcall chkeol 0 000048DF 31F6 xor si, si 0 000048E1 EB23 jmp .condition 437 438 .loop: 0 000048E3 56 push si ; string index 0 000048E4 50 push ax ; (reserve space, uninitialised) 0 000048E5 E8[0000]EB02[CD0D] dualcall getfarpointer.str 0 000048EC 5F pop di 0 000048ED 07 pop es 444 0 000048EE 268B0D mov cx, word [es:di + ssLength] 0 000048F1 80FD00 cmp ch, 0 0 000048F4 B500 mov ch, 0 0 000048F6 7509 jne .next 449 0 000048F8 56 push si 0 000048F9 89F3 mov bx, si 0 000048FB E87DEF nearcall zz_delete_string 0 000048FE 5E pop si 0 000048FF EB05 jmp .condition 455 456 .next: 457 ; The maximum length of a SYMSTR is 255 + SYMSTR_size + 3. 0 00004901 E85CEC nearcall zz_get_symstr_length_indices.ssLength_in_cx 459 460 ; Due to the maximum length, both the byte index and the 461 ; SYMSTR_index_size index delta fit into a word each. 0 00004904 01CE add si, cx ; keep count of what index we're at 463 .condition: 0 00004906 3B36[4C00] cmp si, word [sym_storage.str.free] 0 0000490A 72D7 jb .loop ; if not yet at free space --> 0 0000490C C3 retn 467 468 469 zz_del_match: 0 0000490D E8[0000]EB02[0000] nearcall skipwhite 471 0 00004914 A8 db __TEST_IMM8 ; skip stc, NC 473 474 ; INP: ss:bx -> symbol name 475 ; cx = length of name 476 .add_poison_entrypoint: 0 00004915 F9 stc 478 lframe 479 lvar word, string_hash 0 00004916 5589E550 lenter 481 lvar word, string_length 0 0000491A 51 push cx 483 lvar word, bit_0_is_poison 0 0000491B 9C pushf 485 lvar dword, string_pointer 0 0000491C 16 push ss 0 0000491D 53 push bx 488 0 0000491E B90000 mov cx, 0 490 491 lvar word, matched_amount 0 00004921 51 push cx 493 0 00004922 7257 jc .poison_skip_1 495 496 0 00004924 88C4 mov ah, al 0 00004926 3C27 cmp al, "'" 0 00004928 7407 je .symbol_quoted 0 0000492A 3C22 cmp al, '"' 0 0000492C 7403 je .symbol_quoted 0 0000492E 4E dec si 0 0000492F B400 mov ah, 0 504 .symbol_quoted: 0 00004931 8976F6 mov word [bp + ?string_pointer], si 506 .symbol_loop: 0 00004934 AC lodsb 0 00004935 80FC00 cmp ah, 0 0 00004938 750B jne @F 0 0000493A E8[0000]EB02[0000] nearcall ifsep 0 00004941 742A je .symbol_end 0 00004943 EB18 jmp .symbol_next 513 @@: 0 00004945 3C0D cmp al, 13 0 00004947 7417 je .error 0 00004949 84C0 test al, al 0 0000494B 7413 jz .error 0 0000494D 38E0 cmp al, ah 0 0000494F 750C jne @F 0 00004951 AC lodsb 0 00004952 E8[0000]EB02[0000] nearcall ifsep 0 00004959 7505 jne .error 0 0000495B EB10 jmp .symbol_end 524 @@: 525 .symbol_next: 0 0000495D 41 inc cx 0 0000495E EBD4 jmp .symbol_loop 528 529 .error: 0 00004960 B80305 mov ax, 0503h 0 00004963 E8[0000]EB02[0000] nearcall setrc 0 0000496A E9D9FD jmp symbolasm_error 533 534 .symbol_end: 0 0000496D 85C9 test cx, cx 0 0000496F 74EF jz .error 0 00004971 894EFC mov word [bp + ?string_length], cx 538 0 00004974 E8[0000]EB02[0000] nearcall chkeol 540 541 542 .poison_skip_1: 0 0000497B 1E push ds 0 0000497C C576F6 lds si, [bp + ?string_pointer] 0 0000497F 8B4EFC mov cx, word [bp + ?string_length] 0 00004982 E8E6ED nearcall zz_hash 0 00004985 895EFE mov word [bp + ?string_hash], bx 0 00004988 1F pop ds 549 550 lvar word, inner_main_index 0 00004989 50 push ax 552 553 .loop: 554 ; ?inner_main_index used as parameter 0 0000498A FF76F8 push word [bp + ?string_pointer + 2] 0 0000498D FF76F6 push word [bp + ?string_pointer] 0 00004990 FF76FC push word [bp + ?string_length] 0 00004993 8B5EFE mov bx, word [bp + ?string_hash] 559 0 00004996 E8[0000]EB02[3E0C] dualcall zz_match_symbol 0 0000499D 7210 jc .none 562 0 0000499F FF46F4 inc word [bp + ?matched_amount] 0 000049A2 52 push dx 0 000049A3 8B5EF2 mov bx, word [bp + ?inner_main_index] 0 000049A6 E85CEF nearcall zz_delete_main 0 000049A9 5B pop bx 0 000049AA E8B0EE nearcall zz_delete_hash 569 0 000049AD EBDB jmp .loop 571 572 .none: 0 000049AF 8B46F4 mov ax, word [bp + ?matched_amount] 0 000049B2 F646FA01 testopt [bp + ?bit_0_is_poison], 1 0 000049B6 89EC5D lleave 0 000049B9 7404 jz @F 0 000049BB 85C0 test ax, ax 0 000049BD 7438 jz .retn 579 @@: 580 581 zz_del_display_amount: 0 000049BF 85C0 test ax, ax 0 000049C1 7505 jnz @F 584 0 000049C3 BA[0000] mov dx, msg.zz_del_amount_none 0 000049C6 EB28 jmp @FF 587 588 @@: 0 000049C8 BA[0000] mov dx, msg.zz_del_amount_1 0 000049CB E8[0000]EB02[0000] nearcall disp_message 0 000049D2 BF[0000] mov di, line_out 0 000049D5 E8[0000]EB02[0000] nearcall decword 0 000049DC 50 push ax 0 000049DD E8[0000]EB02[0000] nearcall putsline 0 000049E4 58 pop ax 0 000049E5 BA[0000] mov dx, msg.zz_del_amount_2.plural 0 000049E8 83F801 cmp ax, 1 0 000049EB 7503 jne @F 0 000049ED BA[0000] mov dx, msg.zz_del_amount_2.singular 600 @@: 0 000049F0 E8[0000]EB02[0000] nearcall disp_message 602 zz_del_match.retn: 0 000049F7 C3 retn 604 605 606 zz_del_range: 0 000049F8 AC lodsb 608 609 lframe 0 000049F9 5589E5 lenter 611 0 000049FC 8B1E[0000] mov bx, word [reg_cs] ; default segment = cs 0 00004A00 E8[0000] nearcall getaddrX 614 0 00004A03 31C9 xor cx, cx 616 lvar dword, start_offset 617 %if _PM 0 00004A05 50 push ax 0 00004A06 50 push ax 0 00004A07 E8[0000]EB02[0000] dualcall push_cxdx_or_edx 621 %else 622 push cx 623 push dx 624 %endif 625 0 00004A0E 50 push ax 0 00004A0F E8[0000]EB02[0000] nearcall getlinear_32bit 0 00004A16 7303E92BFD jc symbolasm_error 629 0 00004A1B 89C1 mov cx, ax 0 00004A1D 58 pop ax 632 lvar dword, start_source 0 00004A1E 52 push dx 0 00004A1F 51 push cx 635 0 00004A20 E8[0000]EB02[0000] nearcall capitalise 0 00004A27 3C4C cmp al, 'L' 0 00004A29 741B je .l 639 0 00004A2B E8[0000] nearcall getdword 0 00004A2E 2B56FC sub dx, word [bp + ?start_offset] 0 00004A31 1B5EFE sbb bx, word [bp + ?start_offset + 2] 0 00004A34 7303E90DFD jc symbolasm_error 0 00004A39 83C201 add dx, 1 0 00004A3C 83D300 adc bx, 0 0 00004A3F 7303E902FD jc symbolasm_error 0 00004A44 EB04 jmp @F 648 649 .l: 0 00004A46 AC lodsb 0 00004A47 E8[0000] nearcall getdword 652 @@: 653 lvar dword, length 0 00004A4A 53 push bx 0 00004A4B 52 push dx 656 0 00004A4C E8[0000]EB02[0000] nearcall chkeol 658 0 00004A53 8B46F8 mov ax, word [bp + ?start_source] 0 00004A56 8B56FA mov dx, word [bp + ?start_source + 2] 661 ; dx:ax = start 662 0 00004A59 89C3 mov bx, ax 0 00004A5B 89D1 mov cx, dx 0 00004A5D 035EF4 add bx, word [bp + ?length] 0 00004A60 134EF6 adc cx, word [bp + ?length + 2] 0 00004A63 83EB01 sub bx, 1 0 00004A66 83D900 sbb cx, 0 ; cx:bx = end 0 00004A69 E842EC nearcall binsearchmain 0 00004A6C 51 push cx 0 00004A6D E310 jcxz .done 0 00004A6F 93 xchg ax, bx ; ax = main index to delete 673 674 .loop: 0 00004A70 50 push ax ; preserve main index 0 00004A71 51 push cx ; preserve number of entries 0 00004A72 E836FC nearcall zz_delete_main_and_its_hash 0 00004A75 59 pop cx 0 00004A76 58 pop ax 0 00004A77 E2F7 loop .loop ; do next deletion (same main index) --> 0 00004A79 C706[0000][0000] mov word [stack_low_address], str_buffer 682 .done: 0 00004A7F 58 pop ax 0 00004A80 89EC5D lleave 0 00004A83 E939FF jmp zz_del_display_amount 686 687 688 zz_stat: 0 00004A86 AC lodsb 0 00004A87 E8[0000]EB02[0000] nearcall chkeol 691 0 00004A8E E8F9D8 nearcall list_sym_storage_usage 0 00004A91 C3 retn 694 695 696 zz_match: 0 00004A92 E8[0000]EB02[0000] nearcall skipwhite 698 699 lframe 700 lvar word, string_length 701 lvar word, string_hash 0 00004A99 5589E55050 lenter 703 lequ 1, flag_is_add 704 lequ 2, flag_is_base 705 lequ 4, flag_is_single_line 0 00004A9E BB0400 mov bx, ?flag_is_single_line 707 lvar word, flags 0 00004AA1 53 push bx 709 lvar dword, string_pointer 0 00004AA2 16 push ss 0 00004AA3 53 push bx 712 0 00004AA4 4E dec si 0 00004AA5 BA[0000] mov dx, msg.add 0 00004AA8 E8[0000]EB02[0000] nearcall isstring? 0 00004AAF 7503 jne @F 717 0 00004AB1 FE46FA inc byte [bp + ?flags] ; set ?flag_is_add 719 720 @@: 0 00004AB4 E8[0000]EB02[0000] nearcall skipwhite 722 0 00004ABB 4E dec si 0 00004ABC BA[0000] mov dx, msg.base 0 00004ABF E8[0000]EB02[0000] nearcall isstring? 0 00004AC6 7504 jne @F 727 0 00004AC8 804EFA02 or byte [bp + ?flags], ?flag_is_base 729 730 @@: 0 00004ACC E8[0000]EB02[0000] nearcall skipwhite 732 0 00004AD3 31C9 xor cx, cx 0 00004AD5 88C4 mov ah, al 0 00004AD7 3C27 cmp al, "'" 0 00004AD9 7407 je .symbol_quoted 0 00004ADB 3C22 cmp al, '"' 0 00004ADD 7403 je .symbol_quoted 0 00004ADF 4E dec si 0 00004AE0 B400 mov ah, 0 741 .symbol_quoted: 0 00004AE2 8976F6 mov word [bp + ?string_pointer], si 743 .symbol_loop: 0 00004AE5 AC lodsb 0 00004AE6 80FC00 cmp ah, 0 0 00004AE9 750B jne @F 0 00004AEB E8[0000]EB02[0000] nearcall ifsep 0 00004AF2 742A je .symbol_end 0 00004AF4 EB18 jmp .symbol_next 750 @@: 0 00004AF6 3C0D cmp al, 13 0 00004AF8 7417 je .error 0 00004AFA 84C0 test al, al 0 00004AFC 7413 jz .error 0 00004AFE 38E0 cmp al, ah 0 00004B00 750C jne @F 0 00004B02 AC lodsb 0 00004B03 E8[0000]EB02[0000] nearcall ifsep 0 00004B0A 7505 jne .error 0 00004B0C EB10 jmp .symbol_end 761 @@: 762 .symbol_next: 0 00004B0E 41 inc cx 0 00004B0F EBD4 jmp .symbol_loop 765 766 .error: 0 00004B11 B80405 mov ax, 0504h 0 00004B14 E8[0000]EB02[0000] nearcall setrc 0 00004B1B E928FC jmp symbolasm_error 770 771 .symbol_end: 0 00004B1E 85C9 test cx, cx 0 00004B20 74EF jz .error 0 00004B22 894EFE mov word [bp + ?string_length], cx 775 0 00004B25 E8[0000]EB02[0000] nearcall chkeol 777 778 0 00004B2C 1E push ds 0 00004B2D C576F6 lds si, [bp + ?string_pointer] 0 00004B30 8B4EFE mov cx, word [bp + ?string_length] 0 00004B33 E835EC nearcall zz_hash 0 00004B36 895EFC mov word [bp + ?string_hash], bx 0 00004B39 1F pop ds 785 786 lvar word, inner_main_index 0 00004B3A 50 push ax 788 789 ; ?inner_main_index used as parameter 0 00004B3B FF76F8 push word [bp + ?string_pointer + 2] 0 00004B3E FF76F6 push word [bp + ?string_pointer] 0 00004B41 FF76FE push word [bp + ?string_length] 793 0 00004B44 E8[0000]EB02[3E0C] dualcall zz_match_symbol 0 00004B4B 7236 jc .none 796 ; Here, dx, and bx need to be preserved until 797 ; the next call to zz_match_symbol. 0 00004B4D 52 push dx 0 00004B4E 53 push bx 800 0 00004B4F FF76F4 push word [bp + ?inner_main_index] 0 00004B52 FF76FA push word [bp + ?flags] 0 00004B55 E8[0000]EB02[6229] dualcall zz_list_symbol.first 0 00004B5C EB21 jmp .next 805 806 807 .loop: 808 ; ?inner_main_index used as parameter 0 00004B5E FF76F8 push word [bp + ?string_pointer + 2] 0 00004B61 FF76F6 push word [bp + ?string_pointer] 0 00004B64 FF76FE push word [bp + ?string_length] 812 0 00004B67 E8[0000]EB02[410C] dualcall zz_match_symbol.continue 0 00004B6E 7226 jc .end 815 816 ; Here, dx, and bx need to be preserved until 817 ; the next call to zz_match_symbol. 0 00004B70 52 push dx 0 00004B71 53 push bx 820 0 00004B72 FF76F4 push word [bp + ?inner_main_index] 0 00004B75 FF76FA push word [bp + ?flags] 0 00004B78 E8[0000]EB02[6329] dualcall zz_list_symbol.subsequent 824 .next: 0 00004B7F 5B pop bx 0 00004B80 5A pop dx 0 00004B81 EBDB jmp .loop 828 829 830 .none: 0 00004B83 BA[0000] mov dx, msg.zz_match_none 0 00004B86 F646FA01 test byte [bp + ?flags], ?flag_is_add 0 00004B8A 7403 jz @F 0 00004B8C BA[0000] mov dx, msg.zz_match_add_none 835 @@: 0 00004B8F E8[0000]EB02[0000] nearcall disp_message 837 838 .end: 0 00004B96 89EC5D lleave 0 00004B99 C3 retn 841 842 843 zz_list: 844 lframe 0 00004B9A 5589E5 lenter 846 lequ 1, flag_is_add 847 lequ 2, flag_is_base 0 00004B9D 31C0 xor ax, ax 849 lvar word, flags 0 00004B9F 50 push ax 851 lvar dword, start 0 00004BA0 50 push ax 0 00004BA1 50 push ax 0 00004BA2 48 dec ax 855 lvar dword, end 0 00004BA3 50 push ax 0 00004BA4 50 push ax 858 0 00004BA5 E8[0000]EB02[0000] nearcall skipwhite 860 0 00004BAC 4E dec si 0 00004BAD BA[0000] mov dx, msg.add 0 00004BB0 E8[0000]EB02[0000] nearcall isstring? 0 00004BB7 7503 jne @F 865 0 00004BB9 FE46FE inc byte [bp + ?flags] ; set ?flag_is_add 867 868 @@: 0 00004BBC E8[0000]EB02[0000] nearcall skipwhite 870 0 00004BC3 4E dec si 0 00004BC4 BA[0000] mov dx, msg.base 0 00004BC7 E8[0000]EB02[0000] nearcall isstring? 0 00004BCE 7504 jne @F 875 0 00004BD0 804EFE02 or byte [bp + ?flags], ?flag_is_base 877 878 @@: 0 00004BD4 E8[0000]EB02[0000] nearcall skipwhite 880 0 00004BDB E8[0000]EB02[0000] nearcall iseol? 0 00004BE2 743F je .do 883 0 00004BE4 8B1E[0000] mov bx, word [reg_cs] 0 00004BE8 E8[0000]EB02[0000] nearcall getlinearaddr 0 00004BEF 8956FA mov word [bp + ?start], dx 0 00004BF2 895EFC mov word [bp + ?start + 2], bx 0 00004BF5 8956F6 mov word [bp + ?end], dx 0 00004BF8 895EF8 mov word [bp + ?end + 2], bx 890 0 00004BFB E8[0000]EB02[0000] nearcall skipwh0 0 00004C02 E8[0000]EB02[0000] nearcall iseol? 0 00004C09 7418 je .do 894 0 00004C0B 8B1E[0000] mov bx, word [reg_cs] 0 00004C0F E8[0000]EB02[0000] nearcall getlinearaddr 0 00004C16 8956F6 mov word [bp + ?end], dx 0 00004C19 895EF8 mov word [bp + ?end + 2], bx 0 00004C1C E8[0000]EB02[0000] nearcall chkeol 900 901 .do: 0 00004C23 F646FE01 test byte [bp + ?flags], ?flag_is_add 0 00004C27 740A jz @F 0 00004C29 BA[0000] mov dx, msg.zz_list_add_range 0 00004C2C E8[0000]EB02[0000] nearcall disp_message 906 @@: 0 00004C33 BA[0000] mov dx, msg.zz_list_range_first 0 00004C36 E8[0000]EB02[0000] nearcall disp_message 0 00004C3D 8B46FC mov ax, word [bp + ?start + 2] 0 00004C40 E8[0000]EB02[0000] nearcall disp_ax_hex 0 00004C47 8B46FA mov ax, word [bp + ?start] 0 00004C4A E8[0000]EB02[0000] nearcall disp_ax_hex 0 00004C51 BA[0000] mov dx, msg.zz_list_range_second 0 00004C54 E8[0000]EB02[0000] nearcall disp_message 0 00004C5B 8B46F8 mov ax, word [bp + ?end + 2] 0 00004C5E E8[0000]EB02[0000] nearcall disp_ax_hex 0 00004C65 8B46F6 mov ax, word [bp + ?end] 0 00004C68 E8[0000]EB02[0000] nearcall disp_ax_hex 0 00004C6F BA[0000] mov dx, msg.zz_list_range_third 0 00004C72 E8[0000]EB02[0000] nearcall disp_message 921 0 00004C79 8B56FC mov dx, word [bp + ?start + 2] 0 00004C7C 8B46FA mov ax, word [bp + ?start] 0 00004C7F 8B4EF8 mov cx, word [bp + ?end + 2] 0 00004C82 8B5EF6 mov bx, word [bp + ?end] 926 0 00004C85 E826EA nearcall binsearchmain 0 00004C88 E327 jcxz .none 929 0 00004C8A 53 push bx 0 00004C8B FF76FE push word [bp + ?flags] 0 00004C8E E8[0000]EB02[6229] dualcall zz_list_symbol.first 0 00004C95 EB0B jmp .next 934 935 .loop: 0 00004C97 53 push bx 0 00004C98 FF76FE push word [bp + ?flags] 0 00004C9B E8[0000]EB02[6329] dualcall zz_list_symbol.subsequent 939 .next: 0 00004CA2 43 inc bx 0 00004CA3 E2F2 loop .loop 942 .end: 0 00004CA5 BA[0000] mov dx, msg.zz_list_end 0 00004CA8 E8[0000]EB02[0000] nearcall disp_message 0 00004CAF EB13 jmp .ret 946 947 .none: 0 00004CB1 BA[0000] mov dx, msg.zz_list_none 0 00004CB4 F646FE01 test byte [bp + ?flags], ?flag_is_add 0 00004CB8 7403 jz @F 0 00004CBA BA[0000] mov dx, msg.zz_list_add_none 952 @@: 0 00004CBD E8[0000]EB02[0000] nearcall disp_message 954 955 .ret: 0 00004CC4 89EC5D lleave 0 00004CC7 C3 retn 958 959 960 ; INP: word [ss:sp + 2] = main index 961 ; word [ss:sp] = list flags 962 ; CHG: ax, dx, es, di 963 dualfunction 964 zz_list_symbol: section_of_function 965 .first: section_of_function zz_list_symbol 0 00004CC8 A8 db __TEST_IMM8 ; (skip stc, NC) 967 .subsequent: section_of_function zz_list_symbol 0 00004CC9 F9 stc 969 lframe dualdistance 970 lpar word, main_index 971 lequ 1, flag_is_add 972 lequ 2, flag_is_base 973 lequ 4, flag_is_single_line 974 lpar word, flags 0 00004CCA 5589E5 lenter 976 lvar word, bit_0_is_subsequent 0 00004CCD 9C pushf 0 00004CCE B8FFFF mov ax, -1 979 lvar word, base_index 0 00004CD1 50 push ax 0 00004CD2 53 push bx 982 0 00004CD3 FF7608 push word [bp + ?main_index] 0 00004CD6 50 push ax ; (reserve space, uninitialised) 0 00004CD7 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00004CDE 5F pop di 0 00004CDF 07 pop es 988 0 00004CE0 F646FE01 test byte [bp + ?bit_0_is_subsequent], 1 0 00004CE4 7512 jnz .loop 991 0 00004CE6 F6460604 test byte [bp + ?flags], ?flag_is_single_line 0 00004CEA 7516 jnz .loop_first 0 00004CEC BA[0000] mov dx, msg.zz_list_start 0 00004CEF E8[0000]EB02[0000] nearcall disp_message 0 00004CF6 EB0A jmp .loop_first 997 .loop: 0 00004CF8 BA[0000] mov dx, msg.zz_list_between 0 00004CFB E8[0000]EB02[0000] nearcall disp_message 1000 .loop_first: 0 00004D02 BA[0000] mov dx, msg.zz_list_first 0 00004D05 F6460601 test byte [bp + ?flags], ?flag_is_add 0 00004D09 7403 jz @F 0 00004D0B BA[0000] mov dx, msg.zz_list_add_first 1005 @@: 0 00004D0E E8[0000]EB02[0000] nearcall disp_message 0 00004D15 268B5502 mov dx, word [es:di + smLinear + 2] 0 00004D19 268B05 mov ax, word [es:di + smLinear] 1009 0 00004D1C F6460602 test byte [bp + ?flags], ?flag_is_base 0 00004D20 740A jz @F 0 00004D22 2B06[0400] sub ax, word [vregs + 1 * 4] 0 00004D26 1B16[0600] sbb dx, word [vregs + 1 * 4 + 2] 0 00004D2A EB2B jmp .have_base 1015 @@: 1016 0 00004D2C 268B5D0E mov bx, word [es:di + smBase] 0 00004D30 83FBFF cmp bx, -1 0 00004D33 7422 je .have_base 0 00004D35 895EFC mov word [bp + ?base_index], bx 1021 0 00004D38 53 push bx 0 00004D39 50 push ax 0 00004D3A E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00004D41 5F pop di 0 00004D42 07 pop es 1027 0 00004D43 262B05 sub ax, word [es:di + smLinear] 0 00004D46 261B5502 sbb dx, word [es:di + smLinear + 2] 1030 0 00004D4A FF7608 push word [bp + ?main_index] 0 00004D4D 50 push ax ; (reserve space, uninitialised) 0 00004D4E E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00004D55 5F pop di 0 00004D56 07 pop es 1036 .have_base: 1037 0 00004D57 50 push ax 0 00004D58 89D0 mov ax, dx 0 00004D5A 84E4 test ah, ah 0 00004D5C 740B jz @F 0 00004D5E 86C4 xchg al, ah 0 00004D60 E8[0000]EB02[0000] nearcall disp_al_hex 0 00004D67 86C4 xchg al, ah 1045 @@: 0 00004D69 E8[0000]EB02[0000] nearcall disp_al_hex 0 00004D70 58 pop ax 0 00004D71 E8[0000]EB02[0000] nearcall disp_ax_hex 1049 0 00004D78 B068 mov al, 'h' 0 00004D7A F6460601 test byte [bp + ?flags], ?flag_is_add 0 00004D7E 7507 jnz @F 0 00004D80 E8[0000]EB02[0000] nearcall putc 1054 @@: 1055 0 00004D87 F6460602 test byte [bp + ?flags], ?flag_is_base 0 00004D8B 740C jz @F 0 00004D8D BA[0000] mov dx, msg.zz_list_base 0 00004D90 E8[0000]EB02[0000] nearcall disp_message 0 00004D97 EB27 jmp .displayed_base 1061 @@: 0 00004D99 8B5EFC mov bx, word [bp + ?base_index] 0 00004D9C 83FBFF cmp bx, -1 0 00004D9F 741F je .displayed_base 1065 0 00004DA1 BA[0000] mov dx, msg.zz_list_base_symbol 0 00004DA4 E8[0000]EB02[0000] nearcall disp_message 1068 0 00004DAB 53 push bx 0 00004DAC E8[0000]EB02[6B12] dualcall displaystring 1071 0 00004DB3 FF7608 push word [bp + ?main_index] 0 00004DB6 50 push ax ; (reserve space, uninitialised) 0 00004DB7 E8[0000]EB02[9D0D] dualcall getfarpointer.main 0 00004DBE 5F pop di 0 00004DBF 07 pop es 1077 1078 .displayed_base: 1079 0 00004DC0 BA[0000] mov dx, msg.zz_list_second 0 00004DC3 F6460601 test byte [bp + ?flags], ?flag_is_add 0 00004DC7 7403 jz @F 0 00004DC9 BA[0000] mov dx, msg.zz_list_add_second 1084 @@: 0 00004DCC E8[0000]EB02[0000] nearcall disp_message 0 00004DD3 268B4506 mov ax, word [es:di + smOffset + 2] 0 00004DD7 85C0 test ax, ax 0 00004DD9 7407 jz @F 0 00004DDB E8[0000]EB02[0000] nearcall disp_ax_hex 1090 @@: 0 00004DE2 268B4504 mov ax, word [es:di + smOffset] 0 00004DE6 E8[0000]EB02[0000] nearcall disp_ax_hex 1093 0 00004DED 268A650D mov ah, byte [es:di + smFlags + 1] 0 00004DF1 84E4 test ah, ah 0 00004DF3 741C jz @FF 0 00004DF5 BA[0000] mov dx, msg.zz_list_flags 0 00004DF8 F6460601 test byte [bp + ?flags], ?flag_is_add 0 00004DFC 7403 jz @F 0 00004DFE BA[0000] mov dx, msg.zz_list_add_flags 1101 @@: 0 00004E01 E8[0000]EB02[0000] nearcall disp_message 0 00004E08 B000 mov al, 0 0 00004E0A E8[0000]EB02[0000] nearcall disp_ax_hex 1105 @@: 1106 0 00004E11 BA[0000] mov dx, msg.zz_list_middle 0 00004E14 F6460601 test byte [bp + ?flags], ?flag_is_add 0 00004E18 7403 jz @F 0 00004E1A BA[0000] mov dx, msg.zz_list_add_middle 1111 @@: 0 00004E1D E8[0000]EB02[0000] nearcall disp_message 0 00004E24 FF7608 push word [bp + ?main_index] 0 00004E27 E8[0000]EB02[6B12] dualcall displaystring 0 00004E2E BA[0000] mov dx, msg.zz_list_last 0 00004E31 F6460601 test byte [bp + ?flags], ?flag_is_add 0 00004E35 7403 jz @F 0 00004E37 BA[0000] mov dx, msg.zz_list_add_last 1119 @@: 0 00004E3A E8[0000]EB02[0000] nearcall disp_message 1121 0 00004E41 5B pop bx 0 00004E42 89EC5D lleave 0 00004E45 E8[0000] dualreturn 0 00004E48 CA0400 lret 1126 1127 1128 zz_add: 0 00004E4B E8[0000]EB02[0000] nearcall skipwhite 1130 0 00004E52 31DB xor bx, bx 1132 lframe 0 00004E54 5589E5 lenter 1134 lvar dword, string_pointer 0 00004E57 16 push ss 0 00004E58 53 push bx 1137 lvar word, string_length 0 00004E59 53 push bx 1139 lvar dword, linear 0 00004E5A 53 push bx 0 00004E5B 53 push bx 1142 lvar dword, offset 0 00004E5C 53 push bx 0 00004E5D 53 push bx 1145 lvar word, insertflags 0 00004E5E 53 push bx 1147 0 00004E5F 8026[0200]7F clropt [internalflags2], dif2_poison 0 00004E64 830E[3000]FF or word [sym_storage.main.based.base], -1 1150 ; set base to none 1151 ; base is set by expression evaluator if any is used 1152 1153 .loop: 0 00004E69 E8[0000]EB02[0000] nearcall iseol? 0 00004E70 753E jne @F 1156 1157 ; ?linear used as parameter to zz_insert 1158 ; ?offset used as parameter to zz_insert 1159 ; ?insertflags used as parameter to zz_insert 0 00004E72 C456FC les dx, [bp + ?string_pointer] 0 00004E75 8B4EFA mov cx, word [bp + ?string_length] 0 00004E78 85C9 test cx, cx 0 00004E7A 7503E94C01 jz .error 1164 0 00004E7F F606[0200]80 testopt [internalflags2], dif2_poison 0 00004E84 750B jnz .poisoned 1167 0 00004E86 E8[0000]EB02[E101] dualcall zz_insert 1169 1170 .ret: 0 00004E8D 89EC5D lleave code 0 00004E90 C3 retn 1173 1174 1175 ; cx = symbol name length 1176 .poisoned: 0 00004E91 E85BDD nearcall zz_commit_insert 1178 0 00004E94 B80D05 mov ax, 050Dh 0 00004E97 E8[0000]EB02[0000] nearcall setrc 0 00004E9E BA[0000] mov dx, msg.poison_block 0 00004EA1 E8[0000]EB02[0000] nearcall putsz_error 1183 0 00004EA8 8B5EFC mov bx, word [bp + ?string_pointer] 0 00004EAB E867FA nearcall zz_del_match.add_poison_entrypoint 0 00004EAE EBDD jmp .ret 1187 1188 1189 @@: 0 00004EB0 4E dec si 0 00004EB1 AD lodsw ; get single-letter type name, if any 0 00004EB2 E8[0000]EB02[0000] nearcall capitalise ; uppercase type name letter in al 0 00004EB9 80FC3A cmp ah, ':' 0 00004EBC 7502 jne @F 0 00004EBE B43D mov ah, '=' 1196 @@: 0 00004EC0 4E dec si ; -> at = or : 0 00004EC1 3D533D cmp ax, "S=" 0 00004EC4 7503E9AE00 je .symbol 0 00004EC9 3D4F3D cmp ax, "O=" 0 00004ECC 7503E98A00 je .offset 0 00004ED1 3D4C3D cmp ax, "L=" 0 00004ED4 7503E99000 je .linear 0 00004ED9 3D463D cmp ax, "F=" 0 00004EDC 7472 je .flags 0 00004EDE 4E dec si ; -> at first letter of type name 1207 0 00004EDF BA[0000] mov dx, msg.symbol 0 00004EE2 E8[0000]EB02[0000] nearcall isstring? 0 00004EE9 7503E98900 je .symbol 0 00004EEE BA[0000] mov dx, msg.offset 0 00004EF1 E8[0000]EB02[0000] nearcall isstring? 0 00004EF8 7461 je .offset 0 00004EFA BA[0000] mov dx, msg.linear 0 00004EFD E8[0000]EB02[0000] nearcall isstring? 0 00004F04 7463 je .linear 0 00004F06 BA[0000] mov dx, msg.flags 0 00004F09 E8[0000]EB02[0000] nearcall isstring? 0 00004F10 743E je .flags 1220 0 00004F12 AC lodsb 0 00004F13 8B1E[0000] mov bx, word [reg_cs] 0 00004F17 E8[0000] nearcall getaddrX 1224 0 00004F1A 31C9 xor cx, cx 1226 %if _PM 0 00004F1C 50 push ax 0 00004F1D 50 push ax 0 00004F1E E8[0000]EB02[0000] dualcall push_cxdx_or_edx 0 00004F25 8F46F2 pop word [bp + ?offset] 0 00004F28 8F46F4 pop word [bp + ?offset + 2] 1232 %else 1233 mov word [bp + ?offset + 2], cx 1234 mov word [bp + ?offset], dx 1235 %endif 0 00004F2B 50 push ax 0 00004F2C E8[0000]EB02[0000] nearcall getlinear_32bit 0 00004F33 7303E99300 jc .error 0 00004F38 8946F6 mov word [bp + ?linear], ax 0 00004F3B 8956F8 mov word [bp + ?linear + 2], dx 0 00004F3E 58 pop ax ; al = next character 0 00004F3F E97F00 jmp .next 1243 1244 .skip_equal: 0 00004F42 AC lodsb 0 00004F43 3C3D cmp al, '=' 0 00004F45 7407 je @F 0 00004F47 3C3A cmp al, ':' 0 00004F49 7403E97D00 jne .error 1250 @@: 0 00004F4E AC lodsb 0 00004F4F C3 retn 1253 1254 .flags: 0 00004F50 E8EFFF call .skip_equal 0 00004F53 E8[0000] nearcall getword 0 00004F56 8956F0 mov word [bp + ?insertflags], dx 0 00004F59 EB66 jmp .next 1259 1260 .offset: 0 00004F5B E8E4FF call .skip_equal 0 00004F5E E8[0000] nearcall getexpression ; bx:dx = expression 0 00004F61 8956F2 mov word [bp + ?offset], dx 0 00004F64 895EF4 mov word [bp + ?offset + 2], bx 0 00004F67 EB58 jmp .next 1266 1267 .linear: 0 00004F69 E8D6FF call .skip_equal 0 00004F6C E8[0000] nearcall getexpression ; bx:dx = expression 0 00004F6F 8956F6 mov word [bp + ?linear], dx 0 00004F72 895EF8 mov word [bp + ?linear + 2], bx 0 00004F75 EB4A jmp .next 1273 1274 .symbol: 0 00004F77 E8C8FF call .skip_equal 0 00004F7A 31C9 xor cx, cx 0 00004F7C 88C4 mov ah, al 0 00004F7E 3C27 cmp al, "'" 0 00004F80 7407 je .symbol_quoted 0 00004F82 3C22 cmp al, '"' 0 00004F84 7403 je .symbol_quoted 0 00004F86 4E dec si 0 00004F87 B400 mov ah, 0 1284 .symbol_quoted: 0 00004F89 8976FC mov word [bp + ?string_pointer], si 1286 .symbol_loop: 0 00004F8C AC lodsb 0 00004F8D 80FC00 cmp ah, 0 0 00004F90 750B jne @F 0 00004F92 E8[0000]EB02[0000] nearcall ifsep 0 00004F99 741D je .symbol_end 0 00004F9B EB18 jmp .symbol_next 1293 @@: 0 00004F9D 3C0D cmp al, 13 0 00004F9F 742A je .error 0 00004FA1 84C0 test al, al 0 00004FA3 7426 jz .error 0 00004FA5 38E0 cmp al, ah 0 00004FA7 750C jne @F 0 00004FA9 AC lodsb 0 00004FAA E8[0000]EB02[0000] nearcall ifsep 0 00004FB1 7518 jne .error 0 00004FB3 EB03 jmp .symbol_end 1304 @@: 1305 .symbol_next: 0 00004FB5 41 inc cx 0 00004FB6 EBD4 jmp .symbol_loop 1308 1309 .symbol_end: 0 00004FB8 E311 jcxz .error 0 00004FBA 874EFA xchg cx, word [bp + ?string_length] 0 00004FBD 85C9 test cx, cx 0 00004FBF 750A jnz .error 1314 .next: 0 00004FC1 E8[0000]EB02[0000] nearcall skipwh0 0 00004FC8 E99EFE jmp .loop 1317 1318 1319 .error: 0 00004FCB B80505 mov ax, 0505h 0 00004FCE E8[0000]EB02[0000] nearcall setrc 0 00004FD5 E96EF7 jmp symbolasm_error 1323 1324 lleave ctx 1325 1326 1327 ; INP: si -> first character after /S switch start 1328 ; OUT: al = first character after parsed switch end 1329 ; si -> next character 1330 zz_switch_s: section_of_function 0 00004FD8 AC lodsb 0 00004FD9 E8[0000]EB02[0000] nearcall capitalise 0 00004FE0 3C52 cmp al, 'R' 0 00004FE2 750C jne .notr 0 00004FE4 8026[0100]9F clropt [internalflags2], dif2_sym_req_mask 0 00004FE9 800E[0100]40 setopt [internalflags2], dif2_sym_req_86mm 0 00004FEE EB1E jmp @F 1338 .notr: 0 00004FF0 3C2A cmp al, '*' 0 00004FF2 750C jne .notasterisk 0 00004FF4 8026[0100]9F clropt [internalflags2], dif2_sym_req_mask 0 00004FF9 800E[0100]60 setopt [internalflags2], dif2_sym_req_86mm | dif2_sym_req_xms 0 00004FFE EB0E jmp @F 1344 .notasterisk: 0 00005000 3C58 cmp al, 'X' 0 00005002 7516 jne .notx 0 00005004 8026[0100]9F clropt [internalflags2], dif2_sym_req_mask 0 00005009 800E[0100]20 setopt [internalflags2], dif2_sym_req_xms 1349 @@: 0 0000500E AC lodsb 0 0000500F 3C20 cmp al, 32 0 00005011 50 push ax 0 00005012 56 push si 0 00005013 7703 ja .x_cont 0 00005015 E99305 jmp .end 1356 .x_cont: 0 00005018 5E pop si 0 00005019 58 pop ax 1359 .notx: 0 0000501A 3C3A cmp al, ':' 0 0000501C 7407 je .skip 0 0000501E 3C3D cmp al, '=' 0 00005020 7403E921F7 jne symbolasm_error 1364 .skip: 0 00005025 46 inc si 0 00005026 56 push si 0 00005027 4E dec si 0 00005028 BA[0000] mov dx, msg.max 0 0000502B E8[0000]EB02[0000] nearcall isstring? 0 00005032 7508 jne @F 0 00005034 AC lodsb 0 00005035 BAFFFF mov dx, -1 0 00005038 89D3 mov bx, dx 0 0000503A EB1F jmp .common 1375 1376 @@: 0 0000503C 58 pop ax 0 0000503D AC lodsb 0 0000503E 56 push si 0 0000503F 3C28 cmp al, '(' 0 00005041 7515 jne .not_expr 0 00005043 AC lodsb 0 00005044 E8[0000] nearcall getexpression 0 00005047 E8[0000]EB02[0000] nearcall skipwh0 0 0000504E 3C29 cmp al, ')' 0 00005050 AC lodsb 0 00005051 7403E9F0F6 jne symbolasm_error 0 00005056 EB03 jmp .common 1389 1390 .not_expr: 0 00005058 E82D0A nearcall zz_get_literal 1392 .common: 0 0000505B 83FBFF cmp bx, -1 0 0000505E 7505 jne @F 0 00005060 83FAFF cmp dx, -1 0 00005063 7429 je @FFF 1397 @@: 0 00005065 F606[0100]40 testopt [internalflags2], dif2_sym_req_86mm 0 0000506A 7512 jnz @F 0 0000506C 85DB test bx, bx 0 0000506E 7403E958F7 jnz .error_pop_si 0 00005073 81FA0008 cmp dx, kib((SYMMAIN_size + SYMHASH_size + SYMSTR_index_size) * 65535) 0 00005077 7603E94FF7 ja .error_pop_si 0 0000507C EB10 jmp @FF 1405 1406 @@: 0 0000507E 85DB test bx, bx 0 00005080 7403E946F7 jnz .error_pop_si 0 00005085 81FA0001 cmp dx, _86MM_SYMBOL_TABLE_MAX 0 00005089 7603E93DF7 ja .error_pop_si 1411 @@: 1412 0 0000508E 59 pop cx ; (discard si) 0 0000508F 50 push ax ; preserve next character 0 00005090 56 push si 0 00005091 92 xchg ax, dx ; ax = size 0 00005092 85C0 test ax, ax 0 00005094 7503E91905 jz .free 1419 0 00005099 50 push ax ; on stack: originally requested amount KiB 1421 %if _BOOTLDR 0 0000509A F606[0100]40 testopt [internalflags], nodosloaded 0 0000509F 756E jnz .notxms 1424 %endif 1425 1426 %if _APPLICATION || _DEVICE 0 000050A1 F606[0100]20 testopt [internalflags2], dif2_sym_req_xms 0 000050A6 7467 jz .notxms 1429 0 000050A8 F606[0200]04 testopt [internalflags2], dif2_xms_present 0 000050AD 743F jz .no_xms 1432 @@: 1433 0 000050AF 83F8FF cmp ax, -1 0 000050B2 7503 jne @F 1436 0 000050B4 B80008 mov ax, kib( (SYMHASH_index_size + SYMMAIN_index_size + SYMSTR_index_size) * 64 * 1024) ; ax = how many KiB 1440 @@: 0 000050B7 89C3 mov bx, ax 0 000050B9 31D2 xor dx, dx 0 000050BB B90600 mov cx, 6 1444 .loop_shl_6: 0 000050BE D1E0 shl ax, 1 0 000050C0 D1D2 rcl dx, 1 ; to paragraphs 0 000050C2 E2FA loop .loop_shl_6 1448 1449 @@: 0 000050C4 52 push dx 0 000050C5 50 push ax 0 000050C6 B409 mov ah, 09h 0 000050C8 83C341 add bx, kib(fromparas(paras(ssString + 255)) + XMSTRANSFER_default_size) 0 000050CB 7303E976F6 jc symbolasm_error 0 000050D0 89DA mov dx, bx 0 000050D2 53 push bx 0 000050D3 E8[0000]EB02[3301] nearcall zz_call_xms ; dx = allocated handle 0 000050DA 48 dec ax 0 000050DB 5B pop bx ; bx = how many KiB allocated 0 000050DC 58 pop ax 0 000050DD 59 pop cx ; cx:ax = how many paragraphs allocated 1462 ; (not including the XMS transfer buffer) 0 000050DE 7408 jz @F 0 000050E0 B80605 mov ax, 0506h 0 000050E3 BA[0000] mov dx, msg.zz_fail_xms_alloc 0 000050E6 EB0C jmp .no_xms.error 1467 1468 @@: 0 000050E8 83C402 add sp, 2 ; discard ax on stack 0 000050EB E95806 jmp xms_init 1471 1472 .no_xms: ; no XMS driver 0 000050EE B80705 mov ax, 0507h 0 000050F1 BA[0000] mov dx, msg.zz_no_xms 1475 .no_xms.error: 0 000050F4 E8[0000]EB02[0000] nearcall disp_message 0 000050FB F606[0100]40 testopt [internalflags2], dif2_sym_req_86mm 0 00005100 750D jnz .notxms 0 00005102 BA[0000] mov dx, msg.empty_message 0 00005105 E8[0000]EB02[0000] nearcall setrc 1481 %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 0 0000510C E930F6 jmp exit_error_msg 1483 %else 1484 jmp exit_error_msg_code 1485 %endif 1486 %endif 1487 1488 .notxms: 0 0000510F 58 pop ax ; restore KiB requested (-1 = max) 1490 0 00005110 83F8FF cmp ax, -1 ; max ? 0 00005113 7503 jne @F 0 00005115 B80001 mov ax, _86MM_SYMBOL_TABLE_MAX 1494 ; set maximum size 1495 @@: 1496 0 00005118 89C3 mov bx, ax 0 0000511A B106 mov cl, 6 0 0000511C D3E0 shl ax, cl ; to paragraphs 1500 1501 %if _BOOTLDR 1502 %if _APPLICATION || _DEVICE 0 0000511E F606[0100]40 testopt [internalflags], nodosloaded 0 00005123 7414 jz @FF 1505 %endif 0 00005125 85C0 test ax, ax 0 00005127 750F jnz @F 0 00005129 BA[0000] mov dx, msg.zz_switch_s_internal_error 0 0000512C B80905 mov ax, 0509h 0 0000512F E8[0000]EB02[0000] nearcall setrc 0 00005136 EB5E jmp .putsz_end 1512 1513 @@: 0 00005138 48 dec ax ; allow for image ident paragraph 1515 @@: 1516 %endif 1517 0 00005139 53 push bx 0 0000513A 89C1 mov cx, ax 0 0000513C 31DB xor bx, bx 0 0000513E E8F5E4 nearcall shift_left_4_bxcx 1522 0 00005141 833E[9C00]FF cmp word [zz_xms.handle], -1 0 00005146 752E jne @FF 1525 0 00005148 833E[0200]00 cmp word [sym_storage.start + 2], 0 0 0000514D 7507 jne @F 0 0000514F 833E[0000]00 cmp word [sym_storage.start], 0 0 00005154 7420 je @FF 1530 @@: 1531 0 00005156 FF36[0200] push word [sym_storage.start + 2] 0 0000515A FF36[0000] push word [sym_storage.start] 0 0000515E E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 00005165 59 pop cx 0 00005166 5B pop bx 1537 0 00005167 391E[2A00] cmp word [sym_storage.end + 2], bx 0 0000516B 7509 jne @F 0 0000516D 390E[2800] cmp word [sym_storage.end], cx 0 00005171 7503E98C00 je .no_size_change 1542 @@: 1543 0 00005176 E8[0000]EB02[0000] nearcall InDOS 0 0000517D 7421 jz @F 1546 1547 %if _BOOTLDR 1548 %if _APPLICATION || _DEVICE 0 0000517F F606[0100]40 testopt [internalflags], nodosloaded 0 00005184 740C jz .notboot1 1551 %endif 0 00005186 F606[0300]01 testopt [internalflags2], dif2_boot_loaded_kernel 0 0000518B 7413 jz @F 1554 0 0000518D BA[0000] mov dx, msg.zz_switch_s_boot_loaded_kernel 0 00005190 EB03 jmp .putsz_end_pop 1557 1558 .notboot1: 1559 %endif 1560 0 00005192 BA[0000] mov dx, msg.zz_switch_s_indos 1562 .putsz_end_pop: 0 00005195 5B pop bx 1564 .putsz_end: 0 00005196 E8[0000]EB02[0000] nearcall putsz_error 0 0000519D E90B04 jmp .end 1567 1568 @@: 1569 0 000051A0 89C7 mov di, ax 1571 1572 %if _BOOTLDR 0 000051A2 F606[0100]40 testopt [internalflags], nodosloaded 0 000051A7 7556 jnz @F 1575 %endif 1576 %if _APPLICATION || _DEVICE 0 000051A9 F606[0300]08 testopt [internalflags2], dif2_createdprocess 0 000051AE 744F jz @F 1579 0 000051B0 8B0E[0000] mov cx, word [created_psp] 0 000051B4 3B0E[0000] cmp cx, word [pspdbe] ; current PSP the created one ? 0 000051B8 7545 jne @F ; no --> 1583 0 000051BA 49 dec cx 1585 %if _PM 0 000051BB 89C8 mov ax, cx 0 000051BD E8[0000]EB02[5802] nearcall setes2ax 1588 %else 1589 mov es, cx ; => MCB 1590 %endif 0 000051C4 41 inc cx 0 000051C5 26390E0100 cmp word [es:1], cx ; right owner ? 0 000051CA 7533 jne @F ; no --> 0 000051CC 8B0E[0000] mov cx, word [created_size] 0 000051D0 263B0E0300 cmp cx, word [es:3] ; right size ? 0 000051D5 7528 jne @F ; no --> 1597 0 000051D7 8B0E[0000] mov cx, word [created_psp] 0 000051DB BB0010 mov bx, 1000h 0 000051DE 891E[0000] mov word [created_size], bx 0 000051E2 B44A mov ah, 4Ah 0 000051E4 51 push cx ; save segment value 0 000051E5 51 push cx ; = value for es 0 000051E6 E8[0000]EB02[0000] dual2call _doscall_return_es ; resize to 64 KiB 0 000051ED 59 pop cx ; (discard) 0 000051EE 59 pop cx ; = segment 0 000051EF 49 dec cx 1608 %if _PM 0 000051F0 89C8 mov ax, cx 0 000051F2 E8[0000]EB02[5802] nearcall setes2ax 1611 %else 1612 mov es, cx ; => MCB 1613 %endif 0 000051F9 41 inc cx 0 000051FA 26890E0100 mov word [es:1], cx ; restore owner to debuggee process 1616 %endif 1617 1618 @@: 0 000051FF 89F8 mov ax, di 0 00005201 5B pop bx 1621 1622 .no_size_change: 0 00005202 16 push ss 0 00005203 07 pop es 0 00005204 16 push ss 0 00005205 1F pop ds 0 00005206 50 push ax ; size in paragraphs 0 00005207 BA[0000] mov dx, msg.zz_switch_s_received 0 0000520A E8[0000]EB02[0000] nearcall putsz 0 00005211 BF[0000] mov di, line_out 0 00005214 89D8 mov ax, bx 0 00005216 E8[0000]EB02[0000] nearcall decword 0 0000521D B8204B mov ax, " K" 0 00005220 AB stosw 0 00005221 B86942 mov ax, "iB" 0 00005224 AB stosw 0 00005225 B02E mov al, '.' 0 00005227 AA stosb 0 00005228 E8[0000]EB02[0000] nearcall putsline_crlf 1640 0 0000522F E87AEB nearcall zz_compact 0 00005232 59 pop cx ; size in paragraphs 1643 1644 lframe 1645 lvar dword, common_size_bytes 0 00005233 5589E55050 lenter 1647 lvar word, req_size_para 0 00005238 51 push cx 1649 0 00005239 89CA mov dx, cx 0 0000523B 31DB xor bx, bx 0 0000523D E8F6E3 nearcall shift_left_4_bxcx ; new size in bytes 1653 1654 0 00005240 833E[9C00]FF cmp word [zz_xms.handle], -1 0 00005245 7416 je .fromnotxms1 1657 1658 .fromxms1: 0 00005247 3B1E[1200] cmp bx, word [sym_storage.xms.free + 2] 0 0000524B 7504 jne @F 0 0000524D 3B0E[1000] cmp cx, word [sym_storage.xms.free] 1662 @@: 0 00005251 7236 jb .new_smaller 0 00005253 8B1E[1200] mov bx, word [sym_storage.xms.free + 2] 0 00005257 8B0E[1000] mov cx, word [sym_storage.xms.free] 0 0000525B EB58 jmp .fromxms_old_smaller 1667 1668 .fromnotxms1: 0 0000525D FF36[0200] push word [sym_storage.start + 2] 0 00005261 FF36[0000] push word [sym_storage.start] 0 00005265 E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 0000526C 59 pop cx 0 0000526D 5B pop bx ; -> after allocated block, with new size 1674 0 0000526E 3B1E[2600] cmp bx, word [sym_storage.free + 2] 0 00005272 7504 jne @F 0 00005274 3B0E[2400] cmp cx, word [sym_storage.free] 1678 @@: 0 00005278 7503E92603 je .lframe_no_reallocation_needed 0 0000527D 720A jb .new_smaller 1681 .old_smaller: 0 0000527F 8B1E[2600] mov bx, word [sym_storage.free + 2] 0 00005283 8B0E[2400] mov cx, word [sym_storage.free] 0 00005287 EB0D jmp .got_smaller 1685 1686 .new_smaller: 1687 ..@new_smaller: 0 00005289 BA[0000] mov dx, msg.zz_too_full 0 0000528C E8[0000]EB02[0000] nearcall putsz_error 0 00005293 E90D03 jmp .lframe_end 1691 1692 .got_smaller: 0 00005296 53 push bx 0 00005297 51 push cx 0 00005298 E8[0000]EB02[D214] dualcall pointer_to_linear 0 0000529F 87D3 xchg dx, bx 0 000052A1 91 xchg ax, cx ; bx:cx = linear after end 0 000052A2 FF36[0200] push word [sym_storage.start + 2] 0 000052A6 FF36[0000] push word [sym_storage.start] 0 000052AA E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = linear start 0 000052B1 29C1 sub cx, ax 0 000052B3 19D3 sbb bx, dx ; end - start = size 1703 ; bx:cx = smaller of current size and requested 1704 ; (in bytes) 1705 .fromxms_old_smaller: 0 000052B5 894EFC mov word [bp + ?common_size_bytes], cx 0 000052B8 895EFE mov word [bp + ?common_size_bytes + 2], bx 1708 0 000052BB E8BA03 nearcall bxcx_to_cx_paragraphs 0 000052BE 89CA mov dx, cx ; dx = smaller in paragraphs 1711 1712 %if _BOOTLDR 1713 %if _APPLICATION || _DEVICE 0 000052C0 F606[0100]40 testopt [internalflags], nodosloaded 0 000052C5 7503E90901 jz .notboot2 1716 %endif 1717 0 000052CA 52 push dx 0 000052CB E8[0000]EB02[0000] nearcall bootgetmemorysize 0 000052D2 5B pop bx 0 000052D3 CD12 int 12h 0 000052D5 B106 mov cl, 10 - 4 0 000052D7 D3E0 shl ax, cl 0 000052D9 39D0 cmp ax, dx 0 000052DB 7406 je @F 1726 0 000052DD BA[0000] mov dx, msg.zz_switch_s_boot_rpl 0 000052E0 E93601 jmp .lframe_end_putsz_error 1729 1730 @@: 0 000052E3 8B16[0000] mov dx, [boot_new_memsizekib] 0 000052E7 D3E2 shl dx, cl 0 000052E9 39D0 cmp ax, dx 0 000052EB 7406 je @F 1735 0 000052ED BA[0000] mov dx, msg.zz_switch_s_boot_memsize_differ 0 000052F0 E92601 jmp .lframe_end_putsz_error 1738 1739 @@: 0 000052F3 833E[9C00]FF cmp word [zz_xms.handle], -1 0 000052F8 7521 jne .fromxms2 1742 0 000052FA 8B4EFA mov cx, [bp + ?req_size_para] 0 000052FD 41 inc cx 0 000052FE 29C8 sub ax, cx 1746 ; => transfer buffer 1747 %if 0 1748 new = how much to allocate (?req_size_para + 1 paragraph) 1749 ebda = how large is EBDA 1750 old = how much was allocated 1751 ?common_size_bytes = at most the smaller of new - 16B and old - 16B 1752 transfer area must hold ?common_size_bytes 1753 1754 transfer area may not overlap old source 1755 transfer area may not overlap ebda source 1756 transfer area may not overlap ebda target 1757 transfer area may not overlap new target 1758 1759 ebda source and ebda target may overlap 1760 old source and new target may overlap 1761 1762 1763 new=100 ebda=1 old=1 memsize=200 1764 98 => transfer 1765 198 => ebda 1766 199 => old 1767 100 => target new 1768 99 => target ebda 1769 1770 new=1 ebda=1 old=100 memsize=200 1771 98 => transfer 1772 99 => ebda 1773 100 => old 1774 199 => target new 1775 198 => target ebda 1776 1777 new=2 ebda=100 old=1 memsize=200 1778 97 => transfer 1779 99 => ebda 1780 199 => old 1781 198 => target new 1782 98 => target ebda 1783 1784 new=50 ebda=50 old=1 memsize=200 1785 99 => transfer 1786 149 => ebda 1787 199 => old 1788 150 => target new 1789 100 => target ebda 1790 1791 new=1 ebda=50 old=50 memsize=200 1792 99 => transfer 1793 100 => ebda 1794 150 => old 1795 199 => target new 1796 149 => target ebda 1797 1798 new=40 ebda=1 old=50 memsize=200 1799 109 => transfer 1800 149 => ebda 1801 150 => old 1802 160 => target new 1803 159 => target ebda 1804 %endif 0 00005300 7205 jc @F 0 00005302 3D0010 cmp ax, 1000h 0 00005305 7306 jae @FF 1808 @@: 0 00005307 BA[0000] mov dx, msg.zz_switch_s_boot_transfer_too_low 0 0000530A E90C01 jmp .lframe_end_putsz_error 1811 1812 @@: 0 0000530D 8B4EFC mov cx, word [bp + ?common_size_bytes] 0 00005310 8B5EFE mov bx, word [bp + ?common_size_bytes + 2] 0 00005313 50 push ax ; allocated transfer buffer 0 00005314 E8D406 nearcall zz_transfer_buffer ; transfer into transfer buffer 0 00005317 8F06[0200] pop word [sym_storage.start + 2] 1818 1819 .fromxms2: 0 0000531B 89D0 mov ax, dx ; => current EBDA 0 0000531D 8CD2 mov dx, ss 0 0000531F 4A dec dx ; => NDEB image ident paragraph 0 00005320 2B56FA sub dx, [bp + ?req_size_para] 0 00005323 52 push dx 0 00005324 4A dec dx ; => target symbol table image ident 0 00005325 31C9 xor cx, cx ; size of EBDA to move (if none) 0 00005327 1E push ds 0 00005328 8ED9 mov ds, cx 0 0000532A 8B1E0E04 mov bx, word [40Eh] ; new ref in word [0:40Eh] (if none) 0 0000532E 1F pop ds 0 0000532F 803E[0000]00 cmp byte [ boot_ebdaflag ], 0 ; any EBDA ? 0 00005334 7414 jz .noebda 1833 0 00005336 1E push ds 0 00005337 8ED8 mov ds, ax ; => EBDA 0 00005339 31DB xor bx, bx 0 0000533B 8A1E0000 mov bl, byte [ 0 ] ; EBDA size in KiB 0 0000533F B106 mov cl, 6 0 00005341 D3E3 shl bx, cl ; *64, to paragraphs 0 00005343 89D9 mov cx, bx ; = size of EBDA to move (in paragraphs) 0 00005345 29CA sub dx, cx ; => target EBDA 0 00005347 89D3 mov bx, dx ; = new EBDA reference to put in word [0:40Eh] 0 00005349 1F pop ds 1844 1845 .noebda: 1846 0 0000534A E8[0000]EB02[0000] nearcall movp ; move EBDA 0 00005351 B106 mov cl, 6 0 00005353 D3EA shr dx, cl ; to KiB 0 00005355 8916[0000] mov word [ boot_new_memsizekib ], dx 0 00005359 1E push ds 0 0000535A 31C9 xor cx, cx 0 0000535C 8ED9 mov ds, cx 0 0000535E 891E0E04 mov word [40Eh], bx ; = new ref in word [0:40Eh] 0 00005362 89161304 mov word [413h], dx 0 00005366 1F pop ds 1857 0 00005367 58 pop ax 0 00005368 8B4EFC mov cx, word [bp + ?common_size_bytes] 0 0000536B 8B5EFE mov bx, word [bp + ?common_size_bytes + 2] 1861 1862 0 0000536E 833E[9C00]FF cmp word [zz_xms.handle], -1 0 00005373 7408 je .fromnotxms3 1865 1866 .fromxms3: 0 00005375 E81703 nearcall zz_xms_to_86mm 0 00005378 E8EF05 nearcall zz_xms_try_free_handle 0 0000537B EB05 jmp .from3common 1870 1871 .fromnotxms3: 0 0000537D 50 push ax 0 0000537E E86A06 nearcall zz_transfer_buffer ; transfer into target 0 00005381 58 pop ax 1875 1876 .from3common: 0 00005382 50 push ax 0 00005383 48 dec ax 0 00005384 8B5EFA mov bx, word [bp + ?req_size_para] 0 00005387 43 inc bx ; = how many paragraphs used 0 00005388 8EC0 mov es, ax ; => paragraph for imageident 0 0000538A 31FF xor di, di ; -> imageident target 1883 0 0000538C 891E[5800] mov word [zz_imageident.size], bx 1885 ; set image ident size 0 00005390 893E[5600] mov word [zz_imageident.check], di 0 00005394 BE[5000] mov si, zz_imageident 0 00005397 56 push si 0 00005398 B90800 mov cx, 8 0 0000539B 31D2 xor dx, dx 1891 @@: 0 0000539D AD lodsw 0 0000539E 01C2 add dx, ax 0 000053A0 E2FB loop @B 0 000053A2 5E pop si 1896 0 000053A3 F7DA neg dx 0 000053A5 8916[5600] mov word [zz_imageident.check], dx 1899 ; set image ident checksum 0 000053A9 B108 mov cl, 8 0 000053AB F3A5 rep movsw ; write image ident paragraph 1902 0 000053AD 16 push ss 0 000053AE 07 pop es 1905 0 000053AF 8F06[0200] pop word [sym_storage.start + 2] 1907 0 000053B3 8B4EFC mov cx, word [bp + ?common_size_bytes] 0 000053B6 8B5EFE mov bx, word [bp + ?common_size_bytes + 2] 0 000053B9 FF36[0200] push word [sym_storage.start + 2] 0 000053BD FF36[0000] push word [sym_storage.start] 0 000053C1 E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 000053C8 8F06[2800] pop word [sym_storage.end] 0 000053CC 8F06[2A00] pop word [sym_storage.end + 2] 1915 ; size common part 1916 0 000053D0 E91001 jmp .init_tail 1918 1919 1920 .notboot2: 1921 %endif 1922 0 000053D3 833E[9C00]FF cmp word [zz_xms.handle], -1 0 000053D8 7403E97F00 jne .fromxms4 1925 1926 .fromnotxms4: 0 000053DD BB0100 mov bx, 1 ; enable UMB link 0 000053E0 B80358 mov ax, 5803h 1929 doscall 0 000053E3 E8[0000]EB02[0000] nearcall _doscall 0 000053EA BB8000 mov bx, 80h ; first fit, UMA then LMA 0 000053ED B80158 mov ax, 5801h 1932 doscall 0 000053F0 E8[0000]EB02[0000] nearcall _doscall 0 000053F7 730C jnc @F 0 000053F9 31DB xor bx, bx ; first fit (LMA then UMA) 0 000053FB B80158 mov ax, 5801h 1936 doscall 0 000053FE E8[0000]EB02[0000] nearcall _doscall 1937 @@: 1938 0 00005405 89D3 mov bx, dx 1940 0 00005407 85DB test bx, bx ; prior size was none ? 0 00005409 7451 jz .no_prefix ; no prefix --> 1943 0 0000540B B448 mov ah, 48h 1945 doscall 0 0000540D E8[0000]EB02[0000] nearcall _doscall 0 00005414 730D jnc @F 1947 0 00005416 BA[0000] mov dx, msg.zz_s_cannot_alloc_transfer 1949 .lframe_end_putsz_error: 0 00005419 E8[0000]EB02[0000] nearcall putsz_error 0 00005420 E97D01 jmp .lframe_end_restore_strat 1952 1953 @@: 0 00005423 8B4EFC mov cx, word [bp + ?common_size_bytes] 0 00005426 8B5EFE mov bx, word [bp + ?common_size_bytes + 2] 1956 0 00005429 50 push ax ; allocated transfer buffer 0 0000542A E8BE05 nearcall zz_transfer_buffer 0 0000542D FF36[0200] push word [sym_storage.start + 2] 0 00005431 B449 mov ah, 49h 0 00005433 E8[0000]EB02[0000] dual2call _doscall_return_es ; free prior buffer 0 0000543A 58 pop ax ; (discard) 0 0000543B 8F06[0200] pop word [sym_storage.start + 2] 1964 ; relocate 1965 0 0000543F 8B4EFC mov cx, word [bp + ?common_size_bytes] 0 00005442 8B5EFE mov bx, word [bp + ?common_size_bytes + 2] 0 00005445 FF36[0200] push word [sym_storage.start + 2] 0 00005449 FF36[0000] push word [sym_storage.start] 0 0000544D E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 00005454 8F06[2800] pop word [sym_storage.end] 0 00005458 8F06[2A00] pop word [sym_storage.end + 2] 1973 ; size common part 1974 1975 .no_prefix: 1976 .fromxms4: 0 0000545C BB0200 mov bx, 02h ; last fit 0 0000545F B80158 mov ax, 5801h 1979 doscall 0 00005462 E8[0000]EB02[0000] nearcall _doscall 0 00005469 BB0000 mov bx, 0 ; disable UMB link 0 0000546C B80358 mov ax, 5803h 1982 doscall 0 0000546F E8[0000]EB02[0000] nearcall _doscall 1983 0 00005476 8B5EFA mov bx, word [bp + ?req_size_para] 0 00005479 B448 mov ah, 48h 1986 doscall ; allocate target buffer 0 0000547B E8[0000]EB02[0000] nearcall _doscall 0 00005482 730D jnc @F 1988 0 00005484 BA[0000] mov dx, msg.zz_s_cannot_alloc_target 0 00005487 E8[0000]EB02[0000] nearcall putsz_error 0 0000548E E90F01 jmp .lframe_end_restore_strat 1992 1993 @@: 0 00005491 8B4EFC mov cx, word [bp + ?common_size_bytes] 0 00005494 8B5EFE mov bx, word [bp + ?common_size_bytes + 2] 1996 0 00005497 833E[9C00]FF cmp word [zz_xms.handle], -1 0 0000549C 742D je .fromnotxms5 1999 2000 .fromxms5: 0 0000549E E8EE01 nearcall zz_xms_to_86mm 0 000054A1 8326[0000]00 and word [sym_storage.start], 0 0 000054A6 A3[0200] mov word [sym_storage.start + 2], ax 2004 0 000054A9 8B4EFC mov cx, word [bp + ?common_size_bytes] 0 000054AC 8B5EFE mov bx, word [bp + ?common_size_bytes + 2] 0 000054AF FF36[0200] push word [sym_storage.start + 2] 0 000054B3 FF36[0000] push word [sym_storage.start] 0 000054B7 E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 000054BE 8F06[2800] pop word [sym_storage.end] 0 000054C2 8F06[2A00] pop word [sym_storage.end + 2] 2012 ; size common part 0 000054C6 E8A104 nearcall zz_xms_try_free_handle 0 000054C9 EB18 jmp .from5common 2015 2016 .fromnotxms5: 0 000054CB 50 push ax ; allocated memory block 0 000054CC E81C05 nearcall zz_transfer_buffer 0 000054CF 58 pop ax ; allocated memory block 0 000054D0 8706[0200] xchg word [sym_storage.start + 2], ax 0 000054D4 85C0 test ax, ax 0 000054D6 740B jz @F 0 000054D8 50 push ax ; value for es to int 21h call 0 000054D9 B449 mov ah, 49h 0 000054DB E8[0000]EB02[0000] dual2call _doscall_return_es ; free transfer buffer 0 000054E2 58 pop ax ; (discard) 2027 @@: 2028 .from5common: 2029 2030 .init_tail: 0 000054E3 8B4EFA mov cx, word [bp + ?req_size_para] 0 000054E6 31DB xor bx, bx ; bx:cx = number of paragraphs allocated 0 000054E8 E84BE1 nearcall shift_left_4_bxcx ; = number of bytes allocated 2034 0 000054EB 2B4EFC sub cx, word [bp + ?common_size_bytes] 0 000054EE 1B5EFE sbb bx, word [bp + ?common_size_bytes + 2] 2037 ; = number of bytes allocated after end 0 000054F1 FF36[2A00] push word [sym_storage.end + 2] 0 000054F5 FF36[2800] push word [sym_storage.end] 0 000054F9 5F pop di 2041 %if _PM 0 000054FA FF36[0000] push word [symsel1] 0 000054FE E8[0000]EB02[0E12] dualcall segment_to_selector 2044 %endif 0 00005505 07 pop es ; es:di -> after end of common part 0 00005506 31C0 xor ax, ax 2047 .init_loop: 0 00005508 06 push es 2049 %if _PM 0 00005509 E8[0000]EB02[3F12] dualcall selector_to_segment 2051 %endif 0 00005510 57 push di 0 00005511 E8[0000]EB02[1A14] dualcall normalise_pointer 0 00005518 5F pop di 2055 %if _PM 0 00005519 FF36[0000] push word [symsel1] 0 0000551D E8[0000]EB02[0E12] dualcall segment_to_selector 2058 %endif 0 00005524 07 pop es ; normalise pointer 0 00005525 83E9F0 sub cx, SEGTRANSFER_size 0 00005528 83DB00 sbb bx, 0 0 0000552B 7209 jc .init_last 2063 0 0000552D 51 push cx 0 0000552E B9F87F mov cx, SEGTRANSFER_size >> 1 0 00005531 F3AB rep stosw ; store zeros 0 00005533 59 pop cx 0 00005534 EBD2 jmp .init_loop 2069 2070 .init_last: 0 00005536 83C1F0 add cx, SEGTRANSFER_size 0 00005539 83D300 adc bx, 0 0 0000553C D1E9 shr cx, 1 0 0000553E F3AB rep stosw ; store zeros 2075 0 00005540 8B4EFA mov cx, word [bp + ?req_size_para] 0 00005543 31DB xor bx, bx 0 00005545 E8EEE0 nearcall shift_left_4_bxcx ; requested size bytes 0 00005548 FF36[0200] push word [sym_storage.start + 2] 0 0000554C FF36[0000] push word [sym_storage.start] 0 00005550 E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 00005557 8F06[2800] pop word [sym_storage.end] 0 0000555B 8F06[2A00] pop word [sym_storage.end + 2] 2084 ; update .end 2085 0 0000555F 837EFE00 cmp word [bp + ?common_size_bytes + 2], 0 0 00005563 7529 jne @F ; if it was an empty table 0 00005565 837EFC00 cmp word [bp + ?common_size_bytes], 0 0 00005569 7523 jne @F 2090 2091 ; initialise pointers 0 0000556B 8B16[0200] mov dx, word [sym_storage.start + 2] 0 0000556F A1[0000] mov ax, word [sym_storage.start] 0 00005572 8916[1A00] mov word [sym_storage.main.start + 2], dx 0 00005576 A3[1800] mov word [sym_storage.main.start], ax 0 00005579 8916[1E00] mov word [sym_storage.hash.start + 2], dx 0 0000557D A3[1C00] mov word [sym_storage.hash.start], ax 0 00005580 8916[2200] mov word [sym_storage.str.start + 2], dx 0 00005584 A3[2000] mov word [sym_storage.str.start], ax 0 00005587 8916[2600] mov word [sym_storage.free + 2], dx 0 0000558B A3[2400] mov word [sym_storage.free], ax 2102 @@: 2103 0 0000558E E8F4EA nearcall zz_expand 2105 0 00005591 837EFE00 cmp word [bp + ?common_size_bytes + 2], 0 0 00005595 7509 jne @F ; if it was an empty table ...- 0 00005597 837EFC00 cmp word [bp + ?common_size_bytes], 0 0 0000559B 7503 jne @F 0 0000559D E8C6CD nearcall zz_store_pre_str ; -... store the pre strings 2111 @@: 2112 2113 .lframe_end_restore_strat: 0 000055A0 E82C04 nearcall zz_restore_strat 2115 2116 .lframe_end: 2117 .lframe_no_reallocation_needed: 0 000055A3 89EC5D lleave 0 000055A6 EB03 jmp .end 2120 2121 .end_restore_strat: 0 000055A8 E82404 nearcall zz_restore_strat 2123 2124 .end: 0 000055AB 5E pop si 0 000055AC 58 pop ax ; al = next character 0 000055AD 16 push ss 0 000055AE 07 pop es 0 000055AF 16 push ss 0 000055B0 1F pop ds 0 000055B1 C3 retn 2132 2133 2134 .free: 0 000055B2 BA[0000] mov dx, msg.zz_switch_s_freeing 0 000055B5 E8[0000]EB02[0000] nearcall putsz 0 000055BC E80800 nearcall zz_free_nonxms 0 000055BF E8A803 nearcall zz_xms_try_free_handle 0 000055C2 E89D00 nearcall zz_free_reset 0 000055C5 EBE4 jmp .end 2141 2142 2143 zz_free_nonxms: section_of_function 2144 %if _BOOTLDR 2145 %if _APPLICATION || _DEVICE 0 000055C7 F606[0100]40 testopt [internalflags], nodosloaded 0 000055CC 747B jz .free_notboot 2148 %endif 2149 0 000055CE BA[0000] mov dx, msg.zz_switch_s_boot_loaded_kernel 0 000055D1 F606[0300]01 testopt [internalflags2], dif2_boot_loaded_kernel 0 000055D6 7523 jnz .free_putsz_error_end 2153 0 000055D8 E8[0000]EB02[0000] nearcall bootgetmemorysize 0 000055DF CD12 int 12h 0 000055E1 B106 mov cl, 10 - 4 0 000055E3 D3E0 shl ax, cl 0 000055E5 39D0 cmp ax, dx 0 000055E7 7405 je @F 2160 0 000055E9 BA[0000] mov dx, msg.zz_switch_s_boot_rpl 0 000055EC EB0D jmp .free_putsz_error_end 2163 2164 @@: 0 000055EE 8B16[0000] mov dx, [boot_new_memsizekib] 0 000055F2 D3E2 shl dx, cl 0 000055F4 39D0 cmp ax, dx 0 000055F6 740B je @F 2169 0 000055F8 BA[0000] mov dx, msg.zz_switch_s_boot_memsize_differ 2171 .free_putsz_error_end: 0 000055FB E8[0000]EB02[0000] nearcall putsz_error 0 00005602 C3 retn 2174 2175 @@: 2176 ; ax => current EBDA 0 00005603 8CD2 mov dx, ss 0 00005605 4A dec dx ; => NDEB image ident paragraph 0 00005606 31C9 xor cx, cx ; size of EBDA to move (if none) 0 00005608 1E push ds 0 00005609 8ED9 mov ds, cx 0 0000560B 8B1E0E04 mov bx, word [40Eh] ; new ref in word [0:40Eh] (if none) 0 0000560F 1F pop ds 0 00005610 803E[0000]00 cmp byte [ boot_ebdaflag ], 0 ; any EBDA ? 0 00005615 7414 jz .free_noebda 2186 0 00005617 1E push ds 0 00005618 8ED8 mov ds, ax ; => EBDA 0 0000561A 31DB xor bx, bx 0 0000561C 8A1E0000 mov bl, byte [ 0 ] ; EBDA size in KiB 0 00005620 B106 mov cl, 6 0 00005622 D3E3 shl bx, cl ; *64, to paragraphs 0 00005624 89D9 mov cx, bx ; = size of EBDA to move (in paragraphs) 0 00005626 29CA sub dx, cx ; => target EBDA 0 00005628 89D3 mov bx, dx ; = new EBDA reference to put in word [0:40Eh] 0 0000562A 1F pop ds 2197 2198 .free_noebda: 0 0000562B E8[0000]EB02[0000] nearcall movp ; move EBDA 0 00005632 B106 mov cl, 6 0 00005634 D3EA shr dx, cl ; to KiB 0 00005636 8916[0000] mov word [ boot_new_memsizekib ], dx 0 0000563A 1E push ds 0 0000563B 31C9 xor cx, cx 0 0000563D 8ED9 mov ds, cx 0 0000563F 891E0E04 mov word [40Eh], bx ; = new ref in word [0:40Eh] 0 00005643 89161304 mov word [413h], dx 0 00005647 1F pop ds 0 00005648 C3 retn 2210 2211 2212 .free_notboot: 2213 %endif 2214 2215 %if _APPLICATION || _DEVICE 2216 zz_free_dos: section_of_function 0 00005649 31C0 xor ax, ax 0 0000564B 8706[0200] xchg ax, word [sym_storage.start + 2] 2219 0 0000564F 85C0 test ax, ax 0 00005651 740E jz @F 0 00005653 48 dec ax 2223 %if _PM 0 00005654 E8[0000]EB02[5802] nearcall setes2ax 2225 %else 2226 mov es, ax 2227 %endif 0 0000565B 31C0 xor ax, ax ; ax = 0 0 0000565D 26A30100 mov word [es:1], ax ; free MCB 2230 @@: 0 00005661 C3 retn 2232 %endif 2233 2234 2235 zz_free_reset: section_of_function 0 00005662 16 push ss 0 00005663 07 pop es 2238 0 00005664 31C0 xor ax, ax 2240 0 00005666 BF[0000] mov di, sym_storage.clear_on_free.first 0 00005669 B92700 mov cx, (sym_storage.clear_on_free.after - sym_storage.clear_on_free.first) >> 1 0 0000566C F3AB rep stosw 2246 0 0000566E 48 dec ax ; = 0FFFFh 2248 0 0000566F BF[3000] mov di, sym_storage.minus1_on_free.first 0 00005672 B90A00 mov cx, (sym_storage.minus1_on_free.after - sym_storage.minus1_on_free.first) >> 1 0 00005675 F3AB rep stosw 0 00005677 C3 retn 2255 2256 2257 bxcx_to_cx_paragraphs: section_of_function 0 00005678 83C10F add cx, 15 0 0000567B 83D300 adc bx, 0 2260 shift_right_4_bxcx: 2261 %rep 4 2262 shr bx, 1 2263 rcr cx, 1 ; cx = paragraphs 2264 %endrep 0 0000567E D1EB shr bx, 1 0 00005680 D1D9 rcr cx, 1 0 00005682 D1EB shr bx, 1 0 00005684 D1D9 rcr cx, 1 0 00005686 D1EB shr bx, 1 0 00005688 D1D9 rcr cx, 1 0 0000568A D1EB shr bx, 1 0 0000568C D1D9 rcr cx, 1 0 0000568E C3 retn 2266 2267 2268 ; INP: ax => allocated memory 2269 ; bx:cx = size of compacted table in bytes 2270 ; CHG: bx, cx, dx, di, si 2271 zz_xms_to_86mm: section_of_function 0 0000568F 8B16[9C00] mov dx, word [zz_xms.handle] 0 00005693 BE[7000] mov si, zz_xms.movestruc 0 00005696 31FF xor di, di 2275 0 00005698 897C0A mov word [si + xmsmDestHandle], di ; 86M memory 0 0000569B 89440E mov word [si + xmsmDestAddress + 2], ax 0 0000569E 897C0C mov word [si + xmsmDestAddress], di ; ax:0 -> memory 0 000056A1 895404 mov word [si + xmsmSourceHandle], dx ; our handle 0 000056A4 897C06 mov word [si + xmsmSourceAddress], di 0 000056A7 897C08 mov word [si + xmsmSourceAddress + 2], di ; 0 = beginning 0 000056AA 890C mov word [si + xmsmCount], cx 0 000056AC 895C02 mov word [si + xmsmCount + 2], bx ; size of compacted tables 0 000056AF E8[0000]EB02[4502] nearcall call_xms_move 2285 0 000056B6 B90500 mov cx, .table.amount 0 000056B9 BB[C800] mov bx, .table 2288 @@: 0 000056BC 8B37 mov si, word [bx] ; -> source xms offset dword 0 000056BE 8B7F02 mov di, word [bx + 2] ; -> dest memory far pointer 0 000056C1 83C304 add bx, 4 ; -> next .table entry, if any 0 000056C4 51 push cx 0 000056C5 53 push bx 0 000056C6 31C9 xor cx, cx ; = 0 0 000056C8 50 push ax 0 000056C9 51 push cx ; -> far to start of memory 0 000056CA 8B0C mov cx, word [si] 0 000056CC 8B5C02 mov bx, word [si + 2] ; = xms block offset 0 000056CF E8[0000]EB02[3D14] dualcall normalise_pointer_with_displacement_bxcx 0 000056D6 8F05 pop word [di] 0 000056D8 8F4502 pop word [di + 2] ; write far pointer 0 000056DB 5B pop bx ; -> next .table entry 0 000056DC 59 pop cx ; = loop counter 0 000056DD E2DD loop @B 0 000056DF C3 retn 2306 2307 2308 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 2308 ------------------ note: usesection lDEBUG_DATA_ENTRY 2309 0 00007656 00 align 4, db 0 2311 .table: 0 00007658 [0400] dw sym_storage.main.xms.start 0 0000765A [1800] dw sym_storage.main.start 2314 0 0000765C [0800] dw sym_storage.hash.xms.start 0 0000765E [1C00] dw sym_storage.hash.start 2317 0 00007660 [0C00] dw sym_storage.str.xms.start 0 00007662 [2000] dw sym_storage.str.start 2320 0 00007664 [1000] dw sym_storage.xms.free 0 00007666 [2400] dw sym_storage.free 2323 0 00007668 [1400] dw sym_storage.xms.end 0 0000766A [2800] dw sym_storage.end 2326 .table.amount: equ ($ - .table) >> 2 2327 2328 2329 %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 2330 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 2330 ------------------ note: usesection lDEBUG_CODE2 2331 %else 2332 usesection lDEBUG_CODE 2333 %endif 2334 2335 2336 ; INP: word [sym_storage.start + 2] => allocated memory 2337 ; dx = handle of allocated block 2338 ; bx:cx = size of compacted table in bytes 2339 ; CHG: ax, bx, cx, dx, di, si 2340 zz_86mm_to_xms: section_of_function 0 000056E0 BE[7000] mov si, zz_xms.movestruc 0 000056E3 31FF xor di, di 2343 0 000056E5 897C04 mov word [si + xmsmSourceHandle], di ; 86M memory 0 000056E8 FF36[0200] push word [sym_storage.start + 2] 0 000056EC 8F4408 pop word [si + xmsmSourceAddress + 2] 0 000056EF 897C06 mov word [si + xmsmSourceAddress], di ; .start:0 -> memory 0 000056F2 89540A mov word [si + xmsmDestHandle], dx ; our handle 0 000056F5 897C0C mov word [si + xmsmDestAddress], di 0 000056F8 897C0E mov word [si + xmsmDestAddress + 2], di ; 0 = beginning 0 000056FB 890C mov word [si + xmsmCount], cx 0 000056FD 895C02 mov word [si + xmsmCount + 2], bx ; size of compacted tables 0 00005700 E8[0000]EB02[4502] nearcall call_xms_move 2354 0 00005707 FF36[0200] push word [sym_storage.start + 2] 0 0000570B FF36[0000] push word [sym_storage.start] 0 0000570F E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = linear start 2358 0 00005716 B90500 mov cx, zz_xms_to_86mm.table.amount 0 00005719 BB[C800] mov bx, zz_xms_to_86mm.table 2361 @@: 0 0000571C 8B3F mov di, word [bx] ; -> dest xms offset dword 0 0000571E 8B7702 mov si, word [bx + 2] ; -> source memory far pointer 0 00005721 83C304 add bx, 4 ; -> next .table entry, if any 0 00005724 51 push cx 0 00005725 53 push bx 2367 0 00005726 87D3 xchg dx, bx 0 00005728 91 xchg ax, cx ; bx:cx = linear start 2370 2371 0 00005729 FF7402 push word [si + 2] 0 0000572C FF34 push word [si] 0 0000572E E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = linear of pointer 0 00005735 29C8 sub ax, cx 0 00005737 19DA sbb dx, bx ; pointer - start = byte offset 0 00005739 8905 mov word [di], ax 0 0000573B 895502 mov word [di + 2], dx 0 0000573E 87D3 xchg dx, bx 0 00005740 91 xchg ax, cx ; dx:ax = linear start 2381 0 00005741 5B pop bx ; -> next .table entry 0 00005742 59 pop cx ; = loop counter 0 00005743 E2D7 loop @B 2385 0 00005745 C3 retn 2387 2388 2389 ; cx:ax = amount of paragraphs allocated (<= 1.5 MiB/ 2 MiB) 2390 ; (not including transfer buffer) 2391 ; bx = amount of KiB allocated 2392 ; (actual allocation, including transfer buffer) 2393 ; dx = XMS handle 2394 xms_init: 0 00005746 31FF xor di, di 2396 lframe near 0 00005748 5589E5 lenter 2398 lvar dword, common_size_bytes 0 0000574B 57 push di 0 0000574C 57 push di 2401 lvar dword, amountpara 0 0000574D 51 push cx 0 0000574E 50 push ax 2404 lvar word, amountkib 0 0000574F 53 push bx 2406 lvar word, newhandle 0 00005750 52 push dx 2408 0 00005751 50 push ax 0 00005752 53 push bx 0 00005753 51 push cx 0 00005754 52 push dx 2413 0 00005755 E854E6 nearcall zz_compact 2415 0 00005758 8B16[9C00] mov dx, word [zz_xms.handle] 0 0000575C 83FAFF cmp dx, -1 0 0000575F 7461 je .notfromxms 2419 2420 .fromxms: 0 00005761 8B5EFA mov bx, word [bp + ?amountpara + 2] 0 00005764 8B4EF8 mov cx, word [bp + ?amountpara] 0 00005767 E8CCDE nearcall shift_left_4_bxcx ; requested size bytes 2424 0 0000576A 3B1E[1200] cmp bx, word [sym_storage.xms.free + 2] 0 0000576E 7504 jne @F 0 00005770 3B0E[1000] cmp cx, word [sym_storage.xms.free] 2428 @@: 0 00005774 730C jae @F 2430 2431 .new_smaller: 0 00005776 8B56F4 mov dx, [bp + ?newhandle] 0 00005779 89EC5D lleave code 2434 0 0000577C E8F701 nearcall zz_xms_try_free 0 0000577F E907FB jmp ..@new_smaller 2437 2438 2439 @@: 0 00005782 8B1E[1200] mov bx, word [sym_storage.xms.free + 2] 0 00005786 8B0E[1000] mov cx, word [sym_storage.xms.free] 2442 0 0000578A BE[7000] mov si, zz_xms.movestruc 0 0000578D 31FF xor di, di 2445 0 0000578F FF76F4 push word [bp + ?newhandle] 0 00005792 8F440A pop word [si + xmsmDestHandle] ; new handle 0 00005795 897C0E mov word [si + xmsmDestAddress + 2], di 0 00005798 897C0C mov word [si + xmsmDestAddress], di ; 0 0 0000579B 895404 mov word [si + xmsmSourceHandle], dx ; old handle 0 0000579E 897C06 mov word [si + xmsmSourceAddress], di 0 000057A1 897C08 mov word [si + xmsmSourceAddress + 2], di ; 0 0 000057A4 890C mov word [si + xmsmCount], cx 0 000057A6 895C02 mov word [si + xmsmCount + 2], bx ; size of compacted tables 2455 0 000057A9 894EFC mov word [bp + ?common_size_bytes], cx 0 000057AC 895EFE mov word [bp + ?common_size_bytes + 2], bx 0 000057AF E8[0000]EB02[4502] nearcall call_xms_move 2459 0 000057B6 E8BD01 nearcall zz_xms_try_free 2461 0 000057B9 FF76F4 push word [bp + ?newhandle] 0 000057BC 8F06[9C00] pop word [zz_xms.handle] 2464 0 000057C0 EB5A jmp .fromxmscommon 2466 2467 2468 .notfromxms: 0 000057C2 833E[0200]00 cmp word [sym_storage.start + 2], 0 0 000057C7 7453 je .fromxmscommon 2471 0 000057C9 8B5EFA mov bx, word [bp + ?amountpara + 2] 0 000057CC 8B4EF8 mov cx, word [bp + ?amountpara] 0 000057CF E864DE nearcall shift_left_4_bxcx ; requested size bytes 2475 0 000057D2 53 push bx 0 000057D3 51 push cx 2478 0 000057D4 FF36[2600] push word [sym_storage.free + 2] 0 000057D8 FF36[2400] push word [sym_storage.free] 0 000057DC E8[0000]EB02[D214] dualcall pointer_to_linear 0 000057E3 87D3 xchg dx, bx 0 000057E5 91 xchg ax, cx ; bx:cx = linear after end 0 000057E6 FF36[0200] push word [sym_storage.start + 2] 0 000057EA FF36[0000] push word [sym_storage.start] 0 000057EE E8[0000]EB02[D214] dualcall pointer_to_linear ; dx:ax = linear start 0 000057F5 29C1 sub cx, ax 0 000057F7 19D3 sbb bx, dx ; end - start = size 2489 ; bx:cx = current size (in bytes) 0 000057F9 894EFC mov word [bp + ?common_size_bytes], cx 0 000057FC 895EFE mov word [bp + ?common_size_bytes + 2], bx 2492 0 000057FF 58 pop ax 0 00005800 5A pop dx ; = new size 0 00005801 39DA cmp dx, bx 0 00005803 7502 jne @F 0 00005805 39C8 cmp ax, cx 2498 @@: 0 00005807 7303E96AFF jb .new_smaller 2500 0 0000580C 8B56F4 mov dx, word [bp + ?newhandle] 0 0000580F E8CEFE nearcall zz_86mm_to_xms 2503 0 00005812 FF76F4 push word [bp + ?newhandle] 0 00005815 8F06[9C00] pop word [zz_xms.handle] 2506 0 00005819 E8ABFD nearcall zz_free_nonxms 2508 2509 .fromxmscommon: 0 0000581C BA[0000] mov dx, msg.zz_switch_s_received_xms 0 0000581F E8[0000]EB02[0000] nearcall putsz 0 00005826 BF[0000] mov di, line_out 0 00005829 8B46F6 mov ax, word [bp + ?amountkib] 0 0000582C E8[0000]EB02[0000] nearcall decword 0 00005833 B8204B mov ax, " K" 0 00005836 AB stosw 0 00005837 B86942 mov ax, "iB" 0 0000583A AB stosw 0 0000583B B02E mov al, '.' 0 0000583D AA stosb 0 0000583E E8[0000]EB02[0000] nearcall putsline_crlf 2522 0 00005845 5A pop dx 0 00005846 59 pop cx 0 00005847 5B pop bx 0 00005848 58 pop ax 2527 0 00005849 BE[7000] mov si, zz_xms.movestruc 2529 0 0000584C 89CB mov bx, cx 0 0000584E 89C1 mov cx, ax 0 00005850 E8E3DD nearcall shift_left_4_bxcx ; to bytes 2533 0 00005853 31C0 xor ax, ax 2535 0 00005855 3946FE cmp word [bp + ?common_size_bytes + 2], ax 0 00005858 7503 jne @F 0 0000585A 3946FC cmp word [bp + ?common_size_bytes], ax 2539 @@: 0 0000585D 7518 jne .no_init_start 2541 2542 ; Initialise 2543 0 0000585F A3[0400] mov word [sym_storage.main.xms.start], ax 0 00005862 A3[0600] mov word [sym_storage.main.xms.start + 2], ax 2546 0 00005865 A3[0800] mov word [sym_storage.hash.xms.start], ax 0 00005868 A3[0A00] mov word [sym_storage.hash.xms.start + 2], ax 2549 0 0000586B A3[0C00] mov word [sym_storage.str.xms.start], ax 0 0000586E A3[0E00] mov word [sym_storage.str.xms.start + 2], ax 2552 0 00005871 A3[1000] mov word [sym_storage.xms.free], ax 0 00005874 A3[1200] mov word [sym_storage.xms.free + 2], ax 2555 2556 .no_init_start: 0 00005877 890E[1400] mov word [sym_storage.xms.end], cx 0 0000587B 891E[1600] mov word [sym_storage.xms.end + 2], bx 2559 0 0000587F FF76F4 push word [bp + ?newhandle] 0 00005882 8F06[9C00] pop word [zz_xms.handle] 2562 2563 2564 2565 XMSTRAIL_SIZE equ fromkib(kib(fromparas(paras(ssString + 255)) + XMSTRANSFER_default_size)) 2566 XMSTRAIL_TRANSFER_OFFSET equ XMSTRAIL_SIZE - XMSTRANSFER_default_size 0 00005886 81C11004 add cx, XMSTRAIL_TRANSFER_OFFSET & 0FFFFh 0 0000588A 83D300 adc bx, XMSTRAIL_TRANSFER_OFFSET >> 16 ; -> transfer buffer 2569 0 0000588D 890E[9400] mov word [zz_xms.transfer_address], cx 0 00005891 891E[9600] mov word [zz_xms.transfer_address + 2], bx ; set address 2572 0 00005895 C706[9800]F0FF mov word [zz_xms.transfer_size], XMSTRANSFER_default_size & 0FFFFh 0 0000589B C706[9A00]0000 mov word [zz_xms.transfer_size + 2], XMSTRANSFER_default_size >> 16 2575 ; set size 2576 0 000058A1 83C1F0 add cx, XMSTRANSFER_default_size & 0FFFFh 0 000058A4 83D300 adc bx, XMSTRANSFER_default_size >> 16 ; initialise all memory 2579 0 000058A7 FF76F4 push word [bp + ?newhandle] 0 000058AA 8F440A pop word [si + xmsmDestHandle] ; our handle 0 000058AD 8B16[1200] mov dx, word [sym_storage.xms.free + 2] 0 000058B1 8B3E[1000] mov di, word [sym_storage.xms.free] 0 000058B5 897C0C mov word [si + xmsmDestAddress], di 0 000058B8 89540E mov word [si + xmsmDestAddress + 2], dx 0 000058BB 894404 mov word [si + xmsmSourceHandle], ax ; 86M memory 0 000058BE 1E push ds 2588 %if _PM 0 000058BF E8[0000]EB02[3F12] dualcall selector_to_segment 2590 %endif 0 000058C6 8F4408 pop word [si + xmsmSourceAddress + 2] 0 000058C9 C74406[6000] mov word [si + xmsmSourceAddress], zz_xms.16_zeros 2593 0 000058CE 29F9 sub cx, di 0 000058D0 19D3 sbb bx, dx 2596 0 000058D2 894402 mov word [si + xmsmCount + 2], ax 0 000058D5 89C8 mov ax, cx 0 000058D7 83E00F and ax, 15 0 000058DA 8904 mov word [si + xmsmCount], ax 0 000058DC 7413 jz @F 2602 0 000058DE E8[0000]EB02[4502] nearcall call_xms_move 0 000058E5 01440C add word [si + xmsmDestAddress], ax 0 000058E8 83540E00 adc word [si + xmsmDestAddress + 2], 0 0 000058EC 29C1 sub cx, ax 0 000058EE 83DB00 sbb bx, 0 2608 2609 @@: 0 000058F1 31D2 xor dx, dx 0 000058F3 B81000 mov ax, 16 ; initial step size 0 000058F6 8904 mov word [si + xmsmCount], ax 2613 0 000058F8 29C1 sub cx, ax 0 000058FA 19D3 sbb bx, dx ; current step size left ? 0 000058FC 723D jc .last 2617 0 000058FE E8[0000]EB02[4502] nearcall call_xms_move ; write first full 16 bytes (aligned) 2619 0 00005905 FF740E push word [si + xmsmDestAddress + 2] 0 00005908 FF740C push word [si + xmsmDestAddress] 0 0000590B 8F4406 pop word [si + xmsmSourceAddress] 0 0000590E 8F4408 pop word [si + xmsmSourceAddress + 2] 2624 ; source = initial dest 0 00005911 01440C add word [si + xmsmDestAddress], ax 0 00005914 11540E adc word [si + xmsmDestAddress + 2], dx 2627 ; -> next chunk 0 00005917 FF740A push word [si + xmsmDestHandle] 0 0000591A 8F4404 pop word [si + xmsmSourceHandle]; read from XMS block next 2630 2631 ; dx:ax = 16 2632 ; xmsmSource -> 16 NUL bytes 2633 ; xmsmDest -> next chunk destination 2634 .loop: 0 0000591D 29C1 sub cx, ax 0 0000591F 19D3 sbb bx, dx ; current step size left ? 0 00005921 7218 jc .last 2638 0 00005923 E8[0000]EB02[4502] nearcall call_xms_move ; write this chunk 2640 0 0000592A 01440C add word [si + xmsmDestAddress], ax 0 0000592D 11540E adc word [si + xmsmDestAddress + 2], dx 2643 ; -> next chunk 0 00005930 01C0 add ax, ax 0 00005932 11D2 adc dx, dx ; double the step size 0 00005934 8904 mov word [si + xmsmCount], ax 0 00005936 895402 mov word [si + xmsmCount + 2], dx 2648 ; store next step size 0 00005939 EBE2 jmp .loop 2650 2651 .last: 0 0000593B 01C1 add cx, ax 0 0000593D 11D3 adc bx, dx ; restore remaining count 0 0000593F 7502 jnz @F ; nonzero --> 0 00005941 E30C jcxz @FF ; all-zeroes --> 2656 @@: 0 00005943 890C mov word [si + xmsmCount], cx 0 00005945 895C02 mov word [si + xmsmCount + 2], bx 2659 ; store remaining count 0 00005948 E8[0000]EB02[4502] nearcall call_xms_move ; write remaining chunk 2661 @@: 2662 0 0000594F E833E7 nearcall zz_expand 2664 0 00005952 837EFE00 cmp word [bp + ?common_size_bytes + 2], 0 0 00005956 7509 jne @F ; if it was an empty table ...- 0 00005958 837EFC00 cmp word [bp + ?common_size_bytes], 0 0 0000595C 7503 jne @F 0 0000595E E805CA nearcall zz_store_pre_str ; -... store the pre strings 2670 2671 @@: 0 00005961 89EC5D lleave 2673 0 00005964 E941FC jmp zz_switch_s.end_restore_strat 2675 2676 2677 zz_free_xms: section_of_function 0 00005967 E8F8FC nearcall zz_free_reset 2679 2680 zz_xms_try_free_handle: section_of_function 0 0000596A BAFFFF mov dx, -1 0 0000596D 8716[9C00] xchg dx, word [zz_xms.handle] 0 00005971 83FAFF cmp dx, -1 0 00005974 742F je @F 2685 2686 zz_xms_try_free: section_of_function 0 00005976 E8[0000]EB02[2900] nearcall zz_detect_xms 2688 0 0000597D B40A mov ah, 0Ah 0 0000597F E8[0000]EB02[3301] nearcall zz_call_xms 0 00005986 48 dec ax 0 00005987 741C jz @F 0 00005989 92 xchg ax, dx 0 0000598A BA[0000] mov dx, msg.zz_xms_not_freed_1 0 0000598D E8[0000]EB02[0000] nearcall putsz_error 0 00005994 E8[0000]EB02[0000] nearcall disp_ax_hex 0 0000599B BA[0000] mov dx, msg.zz_xms_not_freed_2 0 0000599E E8[0000]EB02[0000] nearcall putsz_error 2699 @@: 0 000059A5 C3 retn 2701 2702 2703 ; CHG: ax, ds, es 2704 ; OUT: ss = es = ds 2705 zz_save_strat: section_of_function 0 000059A6 16 push ss 0 000059A7 1F pop ds 0 000059A8 E8[0000]EB02[0000] nearcall InDOS 0 000059AF 7512 jnz .indos 0 000059B1 B80058 mov ax, 5800h 0 000059B4 CD21 int 21h 0 000059B6 A3[9E00] mov word [zz_saved_strategy], ax 0 000059B9 B80258 mov ax, 5802h 0 000059BC CD21 int 21h 0 000059BE 30E4 xor ah, ah 0 000059C0 A3[A000] mov word [zz_saved_umblink], ax 2717 .indos: 0 000059C3 E8[0000]EB02[2900] nearcall zz_detect_xms 0 000059CA 16 push ss 0 000059CB 1F pop ds 0 000059CC 16 push ss 0 000059CD 07 pop es 0 000059CE C3 retn 2724 2725 2726 ; STT: ss = ds 2727 zz_restore_strat: section_of_function 0 000059CF E8[0000]EB02[0000] nearcall InDOS 0 000059D6 7512 jnz .ret 0 000059D8 8B1E[A000] mov bx, word [zz_saved_umblink] 0 000059DC B80358 mov ax, 5803h 0 000059DF CD21 int 21h 0 000059E1 8B1E[9E00] mov bx, word [zz_saved_strategy] 0 000059E5 B80158 mov ax, 5801h 0 000059E8 CD21 int 21h 2736 .ret: 0 000059EA C3 retn 2738 2739 2740 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 2740 ------------------ note: usesection lDEBUG_CODE 2741 2742 %if _XMS_SYMBOL_TABLE 2743 ; CHG: - 2744 ; STT: ss = ds 2745 zz_detect_xms: section_of_function 0 0000B76C F606[0200]02 testopt [internalflags2], dif2_xms_detection_done 0 0000B771 7537 jnz .retn 2748 0 0000B773 66 _386_o32 0 0000B774 50 push ax 0 0000B775 66 _386_o32 0 0000B776 53 push bx 0 0000B777 66 _386_o32 0 0000B778 51 push cx 0 0000B779 66 _386_o32 0 0000B77A 52 push dx 0 0000B77B 66 _386_o32 0 0000B77C 56 push si 0 0000B77D 66 _386_o32 0 0000B77E 57 push di 0 0000B77F 66 _386_o32 0 0000B780 55 push bp 2763 0 0000B781 E8[0000] nearcall InDOS 0 0000B784 7425 jz .notindos 0 0000B786 31C0 xor ax, ax 2767 %if _PM 0 0000B788 E81002 nearcall setes2ax 2769 %else 2770 mov es, ax 2771 %endif 0 0000B78B BBBC00 mov bx, 4 * 2Fh 0 0000B78E 268B4702 mov ax, word [es:bx + 2] 0 0000B792 268B1F mov bx, word [es:bx] 0 0000B795 E82700 call .checkxms 2776 .ret: 0 0000B798 66 _386_o32 0 0000B799 5D pop bp 0 0000B79A 66 _386_o32 0 0000B79B 5F pop di 0 0000B79C 66 _386_o32 0 0000B79D 5E pop si 0 0000B79E 66 _386_o32 0 0000B79F 5A pop dx 0 0000B7A0 66 _386_o32 0 0000B7A1 59 pop cx 0 0000B7A2 66 _386_o32 0 0000B7A3 5B pop bx 0 0000B7A4 66 _386_o32 0 0000B7A5 58 pop ax 2791 0 0000B7A6 16 push ss 0 0000B7A7 1F pop ds 0 0000B7A8 16 push ss 0 0000B7A9 07 pop es 2796 .retn: 0 0000B7AA C3 retn 2798 2799 .notindos: 0 0000B7AB B82F35 mov ax, 352Fh 0 0000B7AE FF36[0000] push word [pspdbg] 0 0000B7B2 E8[0000]EB02[0000] dual2call _doscall_return_es 0 0000B7B9 58 pop ax ; returned es 0 0000B7BA E80200 call .checkxms 0 0000B7BD EBD9 jmp .ret 2806 2807 .checkxms: 2808 %if _PM 0 0000B7BF E8[0000] nearcall ispm 0 0000B7C2 7507 jnz @F 0 0000B7C4 F606[0300]02 testopt [options], zz_no_pm_xms 0 0000B7C9 751C jnz .checkxms_via_86m_no_pm 2813 @@: 2814 %endif 0 0000B7CB 85C0 test ax, ax 0 0000B7CD 744F jz .no_xms 0 0000B7CF 83FBFF cmp bx, -1 0 0000B7D2 744A je .no_xms 2819 %if _PM 0 0000B7D4 8026[0200]FE clropt [internalflags2], dif2_no_pm_xms 2821 %endif 0 0000B7D9 B80043 mov ax, 4300h 0 0000B7DC CD2F int 2Fh 0 0000B7DE 3C80 cmp al, 80h 0 0000B7E0 7463 je .got_xms 2826 %if _PM 0 0000B7E2 E8[0000] nearcall ispm 0 0000B7E5 7537 jnz .no_xms 2829 .checkxms_via_86m_no_pm: 0 0000B7E7 800E[0200]01 setopt [internalflags2], dif2_no_pm_xms 2831 .checkxms_via_86m: 2832 [cpu 286] 0 0000B7EC B80043 mov ax, 4300h 0 0000B7EF 6A00 push byte 0 0 0000B7F1 6A2F push byte 2Fh 0 0000B7F3 E8[0000]EB02[0000] dualcall intcall 0 0000B7FA 3C80 cmp al, 80h 0 0000B7FC 7520 jne .no_xms 2839 0 0000B7FE B81043 mov ax, 4310h 0 0000B801 6A00 push byte 0 ; es value 0 0000B803 6A00 push byte 0 ; ds value 0 0000B805 6A2F push byte 2Fh 0 0000B807 55 push bp 0 0000B808 E8[0000]EB02[0000] dualcall intcall_return_parameter_es_parameter_ds 0 0000B80F 58 pop ax ; discard returned ds 0 0000B810 58 pop ax ; get returned es 0 0000B811 A3[8E00] mov word [zz_xms.86mentry + 2], ax 0 0000B814 891E[8C00] mov word [zz_xms.86mentry], bx 0 0000B818 800E[0200]06 setopt [internalflags2], dif2_xms_detection_done | dif2_xms_present 0 0000B81D C3 retn 2852 __CPU__ 2853 %endif 2854 2855 .no_xms: 0 0000B81E 800E[0200]02 setopt [internalflags2], dif2_xms_detection_done 0 0000B823 8026[0200]FB clropt [internalflags2], dif2_xms_present 0 0000B828 31C0 xor ax, ax 0 0000B82A A3[8C00] mov word [zz_xms.86mentry], ax 0 0000B82D A3[8E00] mov word [zz_xms.86mentry + 2], ax 2861 %if _PM 2862 .clearpm: 0 0000B830 31C0 xor ax, ax 0 0000B832 A3[8800] mov word [zz_xms.pm16entry], ax 0 0000B835 A3[8A00] mov word [zz_xms.pm16entry + 2], ax 0 0000B838 A3[8000] mov word [zz_xms.pm32entry], ax 0 0000B83B A3[8200] mov word [zz_xms.pm32entry + 2], ax 0 0000B83E A3[8400] mov word [zz_xms.pm32entry + 4], ax 0 0000B841 A3[8600] mov word [zz_xms.pm32entry + 6], ax 2870 %endif 0 0000B844 C3 retn 2872 2873 .got_xms: 0 0000B845 800E[0200]06 setopt [internalflags2], dif2_xms_detection_done | dif2_xms_present 0 0000B84A B81043 mov ax, 4310h 0 0000B84D CD2F int 2Fh 2877 %if _PM 0 0000B84F E8[0000] nearcall ispm 0 0000B852 7518 jnz .86m 0 0000B854 66891E[8000] _386 mov dword [zz_xms.pm32entry], ebx 0 0000B859 8326[8600]00 _386 and word [zz_xms.pm32entry + 6], 0 0 0000B85E 8C06[8400] _386 mov word [zz_xms.pm32entry + 4], es 0 0000B862 891E[8800] mov word [zz_xms.pm16entry], bx 0 0000B866 8C06[8A00] mov word [zz_xms.pm16entry + 2], es 0 0000B86A EB80 jmp .checkxms_via_86m ; allow fallback if 7B00h fails 2886 2887 .86m: 2888 %endif 0 0000B86C 891E[8C00] mov word [zz_xms.86mentry], bx 0 0000B870 8C06[8E00] mov word [zz_xms.86mentry + 2], es 2891 %if _PM 0 0000B874 EBBA jmp .clearpm 2893 %else 2894 retn 2895 %endif 2896 2897 2898 ; Note: In dosemu DPMI 2F.4310 returns a far pointer in 2899 ; es:bx or es:ebx, which must be called with a 2900 ; stack frame according to client bitness. 2901 zz_call_xms: section_of_function 0 0000B876 50 push ax 0 0000B877 B80001 mov ax, 256 0 0000B87A E8[0000]EB02[0000] nearcall stack_check.internal 0 0000B881 58 pop ax 0 0000B882 7303E9F000 jb .seterror ; no, error out --> 2907 2908 %if _PM 0 0000B887 E8[0000] call ispm 0 0000B88A 7403E9DC00 jnz .86m 2911 0 0000B88F F606[0200]01 testopt [internalflags2], dif2_no_pm_xms 0 0000B894 753F jnz .86m_via_pm 2914 2915 ; we have a problem: Protected Mode XMS may treat 2916 ; function 0Bh moves in different ways. dosemu2 2917 ; used to do what we want, treating addresses with 2918 ; handle 0 as 86 Mode seg16:ofs16. more recently, 2919 ; it doesn't do that any longer. so we suggested a 2920 ; new PM XMS function that explicitly selects what 2921 ; choice to use, and is expected to return error 2922 ; 80h if not supported at all. (AEh if supported 2923 ; but an unknown type specified in al.) 2924 ; Reference: https://github.com/dosemu2/dosemu2/issues/3101 0 0000B896 3D000B cmp ax, 0B00h 0 0000B899 7511 jne @F 0 0000B89B B8007B mov ax, 7B00h 2928 ; dosemu2 extension function 7Bh: 2929 ; al = 00h indicate move struc handle 0 means 86M seg:ofs 0 0000B89E E80B00 call @F ; call PM handler 0 0000B8A1 83F801 cmp ax, 1 ; success ? 0 0000B8A4 7405 je .retn ; yes, return to caller --> 0 0000B8A6 80FB80 cmp bl, 80h ; that error ? 0 0000B8A9 7427 je .86m_via_pm_0B00h ; yes, reset ax and call in 86M --> 2935 .retn: 0 0000B8AB C3 retn ; return success or a different error 2937 2938 @@: 0 0000B8AC 803E[0000]00 cmp byte [dpmi32], 0 0 0000B8B1 7410 je .pm16 2941 2942 .pm32: 2943 subcpu 386 0 0000B8B3 66833E[8400]00 cmp dword [zz_xms.pm32entry + 4], 0 0 0000B8B9 0F84BA00 je .seterror 0 0000B8BD 66FF1E[8000] call far dword [zz_xms.pm32entry] 0 0000B8C2 C3 retn 2948 subcpureset 2949 2950 .pm16: 0 0000B8C3 833E[8A00]00 cmp word [zz_xms.pm16entry + 2], 0 0 0000B8C8 7503E9AA00 je .seterror 0 0000B8CD FF1E[8800] call far word [zz_xms.pm16entry] 0 0000B8D1 C3 retn 2955 2956 .86m_via_pm_0B00h: 0 0000B8D2 B8000B mov ax, 0B00h 2958 .86m_via_pm: 2959 lframe 2960 lvar 32h, 86m_call_struc 0 0000B8D5 5589E58D66CE lenter 0 0000B8DB 06 push es 0 0000B8DC 66 _386_PM_o32 0 0000B8DD 897ECE mov word [bp + ?86m_call_struc +00h], di ; edi 0 0000B8E0 66 _386_PM_o32 0 0000B8E1 8976D2 mov word [bp + ?86m_call_struc +04h], si ; esi 0 0000B8E4 66 _386_PM_o32 0 0000B8E5 895EDE mov word [bp + ?86m_call_struc +10h], bx ; ebx 0 0000B8E8 66 _386_PM_o32 0 0000B8E9 8956E2 mov word [bp + ?86m_call_struc +14h], dx ; edx 0 0000B8EC 66 _386_PM_o32 0 0000B8ED 894EE6 mov word [bp + ?86m_call_struc +18h], cx ; ecx 0 0000B8F0 66 _386_PM_o32 0 0000B8F1 8946EA mov word [bp + ?86m_call_struc +1Ch], ax ; eax 0 0000B8F4 8B4600 mov ax, word [bp + ?frame_bp] 0 0000B8F7 8946D6 mov word [bp + ?86m_call_struc +08h], ax ; bp 0 0000B8FA 31C0 xor ax, ax 0 0000B8FC 8946EE mov word [bp + ?86m_call_struc +20h], ax ; flags 2979 ; Note: As noted in the RBIL61 Int31.0301 description, 2980 ; the DPMI host will provide a stack if the 2981 ; passed ss:sp fields are zero. However, this 2982 ; stack is documented to be small, 30 words. 2983 ; XMS specifies that a stack of 128 words should 2984 ; be available to it when calling its entrypoint. 2985 ; 2986 ; Here we re-use our (PM) stack with a heuristically 2987 ; chosen displacement in the hopes that the host will 2988 ; not use more than that of the stack itself. 2989 XMS_VIA_86M_CALLBACK_STACK_DISPLACEMENT equ 128 0 0000B8FF 89E0 mov ax, sp 0 0000B901 2D8000 sub ax, XMS_VIA_86M_CALLBACK_STACK_DISPLACEMENT 0 0000B904 8946FC mov word [bp + ?86m_call_struc +2Eh], ax ; sp 0 0000B907 B88001 mov ax, 256 + XMS_VIA_86M_CALLBACK_STACK_DISPLACEMENT 0 0000B90A E8[0000]EB02[0000] nearcall stack_check.internal ; enough for XMS ? 0 0000B911 7253 jb .stackoverflow 2996 0 0000B913 A1[0000] mov ax, word [pspdbg] 0 0000B916 8946FE mov word [bp + ?86m_call_struc +30h], ax ; ss 0 0000B919 8946F0 mov word [bp + ?86m_call_struc +22h], ax ; es 0 0000B91C 8946F2 mov word [bp + ?86m_call_struc +24h], ax ; ds 3001 ; (ds is used to point to zz_xms.movestruc) 0 0000B91F FF36[8E00] push word [zz_xms.86mentry + 2] 0 0000B923 FF36[8C00] push word [zz_xms.86mentry] 0 0000B927 8F46F8 pop word [bp + ?86m_call_struc +2Ah] ; ip 0 0000B92A 8F46FA pop word [bp + ?86m_call_struc +2Ch] ; cs 0 0000B92D 16 push ss 0 0000B92E 07 pop es ; => stack 0 0000B92F 8D7ECE lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 0 0000B932 660FB7FF _386 movzx edi, di ; (previously checked b[dpmi32] here) 0 0000B936 31C9 xor cx, cx ; copy that many words to 86M stack 0 0000B938 B80103 mov ax, 0301h ; far call 86M procedure 0 0000B93B 31DB xor bx, bx 0 0000B93D CD31 int 31h 0 0000B93F 8A66EE mov ah, byte [bp + ?86m_call_struc +20h] ; flags 0 0000B942 9E sahf 0 0000B943 8B46D6 mov ax, word [bp + ?86m_call_struc +08h] ; bp 0 0000B946 894600 mov word [bp + ?frame_bp], ax 0 0000B949 66 _386_PM_o32 0 0000B94A 8B7ECE mov di, word [bp + ?86m_call_struc +00h] ; edi 0 0000B94D 66 _386_PM_o32 0 0000B94E 8B76D2 mov si, word [bp + ?86m_call_struc +04h] ; esi 0 0000B951 66 _386_PM_o32 0 0000B952 8B5EDE mov bx, word [bp + ?86m_call_struc +10h] ; ebx 0 0000B955 66 _386_PM_o32 0 0000B956 8B56E2 mov dx, word [bp + ?86m_call_struc +14h] ; edx 0 0000B959 66 _386_PM_o32 0 0000B95A 8B4EE6 mov cx, word [bp + ?86m_call_struc +18h] ; ecx 0 0000B95D 66 _386_PM_o32 0 0000B95E 8B46EA mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 3030 @@: 0 0000B961 07 pop es 0 0000B962 89EC5D lleave 0 0000B965 C3 retn 3034 3035 .stackoverflow: 0 0000B966 E80E00 call .seterror 0 0000B969 EBF6 jmp @B 3038 %endif 3039 .86m: 0 0000B96B 833E[8E00]00 cmp word [zz_xms.86mentry + 2], 0 0 0000B970 7405 je .seterror 0 0000B972 FF1E[8C00] call far [zz_xms.86mentry] 0 0000B976 C3 retn 3044 3045 .seterror: 0 0000B977 31C0 xor ax, ax ; failure 0 0000B979 B380 mov bl, 80h ; function not implemented 0 0000B97B C3 retn 3049 3050 3051 fail_xms_access: 0 0000B97C BA[0000] mov dx, msg.zz_fail_xms_access 0 0000B97F B80B05 mov ax, 050Bh 0 0000B982 E8[0000] nearcall setrc 0 0000B985 E9BEFD jmp exit_error_msg_code 3056 3057 call_xms_move: section_of_function 0 0000B988 50 push ax 0 0000B989 53 push bx 0 0000B98A 56 push si 0 0000B98B BE[7000] mov si, zz_xms.movestruc 0 0000B98E B8000B mov ax, 0B00h ; will try 7B00h in PM XMS 0 0000B991 E8E2FE nearcall zz_call_xms 0 0000B994 48 dec ax 0 0000B995 75E5 jnz fail_xms_access 0 0000B997 5E pop si 0 0000B998 5B pop bx 0 0000B999 58 pop ax 0 0000B99A C3 retn 3070 %endif 3071 3072 3073 %if _PM 3074 setes2ax: section_of_function 0 0000B99B 89C3 mov bx, ax 3076 setes2bx: 0 0000B99D E8[0000] nearcall ispm 0 0000B9A0 7505 jnz @F 0 0000B9A2 89DA mov dx, bx 0 0000B9A4 E8[0000] nearcall setrmsegm 3081 @@: 0 0000B9A7 8EC3 mov es, bx 0 0000B9A9 C3 retn 3084 %endif ; _PM 3085 3086 3087 %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 3088 usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 3088 ------------------ note: usesection lDEBUG_CODE2 3089 %endif 3090 3091 ; INP: bx:cx = length in bytes 3092 ; word [sym_storage.start + 2] => source (or 0) 3093 ; ax => destination 3094 ; CHG: di, si, cx 3095 ; STT: ds = es = ss 3096 zz_transfer_buffer: section_of_function 0 000059EB 51 push cx 0 000059EC 89C7 mov di, ax 0 000059EE 8B0E[0200] mov cx, word [sym_storage.start + 2] 0 000059F2 BE[1800] mov si, sym_storage.first_start 3101 @@: 0 000059F5 AD lodsw 0 000059F6 AD lodsw 0 000059F7 29C8 sub ax, cx ; x.start - sym_storage.start = para index 0 000059F9 01F8 add ax, di ; para index + destination = new seg 0 000059FB 8944FE mov word [si - 2], ax 0 000059FE 81FE[2C00] cmp si, sym_storage.after_start 0 00005A02 72F1 jb @B 0 00005A04 89F8 mov ax, di 0 00005A06 59 pop cx 3111 0 00005A07 FF36[0200] push word [sym_storage.start + 2] 0 00005A0B FF36[0000] push word [sym_storage.start] 0 00005A0F 5E pop si 3115 %if _PM 0 00005A10 FF36[0000] push word [symsel2] 0 00005A14 E8[0000]EB02[0E12] dualcall segment_to_selector 3118 %endif 0 00005A1B 1F pop ds ; ds:si -> transfer source 3120 0 00005A1C 50 push ax 0 00005A1D 31FF xor di, di 3123 %if _PM 0 00005A1F 36FF36[0000] push word [ss:symsel1] 0 00005A24 E8[0000]EB02[0E12] dualcall segment_to_selector 3126 %endif 0 00005A2B 07 pop es ; es:di -> transfer destination 3128 3129 .transfer_loop: 0 00005A2C 06 push es 3131 %if _PM 0 00005A2D E8[0000]EB02[3F12] dualcall selector_to_segment 3133 %endif 0 00005A34 57 push di 0 00005A35 E8[0000]EB02[1A14] dualcall normalise_pointer 0 00005A3C 5F pop di 3137 %if _PM 0 00005A3D 36FF36[0000] push word [ss:symsel1] 0 00005A42 E8[0000]EB02[0E12] dualcall segment_to_selector 3140 %endif 0 00005A49 07 pop es ; normalise pointer 0 00005A4A 1E push ds 3143 %if _PM 0 00005A4B E8[0000]EB02[3F12] dualcall selector_to_segment 3145 %endif 0 00005A52 56 push si 0 00005A53 E8[0000]EB02[1A14] dualcall normalise_pointer 0 00005A5A 5E pop si 3149 %if _PM 0 00005A5B 36FF36[0000] push word [ss:symsel2] 0 00005A60 E8[0000]EB02[0E12] dualcall segment_to_selector 3152 %endif 0 00005A67 1F pop ds ; normalise pointer 0 00005A68 83E9F0 sub cx, SEGTRANSFER_size 0 00005A6B 83DB00 sbb bx, 0 0 00005A6E 7209 jc .transfer_last 3157 0 00005A70 51 push cx 0 00005A71 B9F87F mov cx, SEGTRANSFER_size >> 1 0 00005A74 F3A5 rep movsw 0 00005A76 59 pop cx 0 00005A77 EBB3 jmp .transfer_loop 3163 3164 .transfer_last: 0 00005A79 83C1F0 add cx, SEGTRANSFER_size 0 00005A7C 83D300 adc bx, 0 0 00005A7F D1E9 shr cx, 1 0 00005A81 F3A5 rep movsw 3169 0 00005A83 16 push ss 0 00005A84 1F pop ds 0 00005A85 16 push ss 0 00005A86 07 pop es 0 00005A87 C3 retn 3175 3176 3177 zz_get_literal: section_of_function 0 00005A88 B400 mov ah, 0 0 00005A8A 31DB xor bx, bx ; (in case of decimal base shortcut: 0 00005A8C BA0A00 mov dx, 10 ; set base: decimal) 0 00005A8F 3C23 cmp al, '#' ; shortcut change to decimal base? 0 00005A91 7443 je .lit_base ; yes --> 3183 3184 .lithex_common: 0 00005A93 E8BB00 call .lit_ishexdigit? ; the first character must be a digit then 0 00005A96 7303E9A900 jc .err2 0 00005A9B 30D2 xor dl, dl ; initialize value 3188 .lithex_loopdigit: 0 00005A9D 3C5F cmp al, '_' 0 00005A9F 7427 je .lithex_skip 0 00005AA1 E8AD00 call .lit_ishexdigit? ; was last character ? 0 00005AA4 7225 jc .lit_end ; yes --> 0 00005AA6 F6C7F0 test bh, 0F0h ; would shift bits out ? 0 00005AA9 7403E99600 jnz .err2 0 00005AAE E8[0000]EB02[0000] nearcall capitalise 0 00005AB5 2C30 sub al, '0' 0 00005AB7 3C09 cmp al, 9 ; was decimal digit ? 0 00005AB9 7602 jbe .lithex_decimaldigit; yes --> 0 00005ABB 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 3200 .lithex_decimaldigit: 0 00005ABD B90400 mov cx, 4 3202 .lithex_loopshift: 0 00005AC0 D1E2 shl dx, 1 0 00005AC2 D1D3 rcl bx, 1 0 00005AC4 E2FA loop .lithex_loopshift ; *16 0 00005AC6 08C2 or dl, al ; add in the new digit 3207 .lithex_skip: 0 00005AC8 AC lodsb 0 00005AC9 EBD2 jmp short .lithex_loopdigit 3210 3211 .lit_end: 0 00005ACB 3C23 cmp al, '#' ; base change specification? 0 00005ACD 7407 je .lit_base ; yes --> 0 00005ACF E8[0000] nearcall isseparator? ; after the number, there must be a separator 0 00005AD2 7570 jne .err2 ; none here --> 0 00005AD4 EB6D jmp .term_end ; okay --> 3217 .lit_base: 0 00005AD6 85DB test bx, bx ; insure base <= 36 0 00005AD8 756A jnz .err2 0 00005ADA 83FA24 cmp dx, byte 36 0 00005ADD 7765 ja .err2 0 00005ADF 83FA02 cmp dx, byte 2 ; and >= 2 0 00005AE2 7260 jb .err2 ; otherwise error --> 3224 0 00005AE4 AC lodsb 0 00005AE5 B400 mov ah, 0 ; (not sure why this) 0 00005AE7 80FA10 cmp dl, 16 ; hexadecimal ? 0 00005AEA 74A7 je .lithex_common ; yes, use specific handling --> 3229 0 00005AEC 89D7 mov di, dx ; di = base 0 00005AEE 88D1 mov cl, dl 0 00005AF0 80C12F add cl, '0'-1 0 00005AF3 80F939 cmp cl, '9' 0 00005AF6 7602 jbe .lit_basebelow11 0 00005AF8 B139 mov cl, '9' 3236 .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 0 00005AFA 88D5 mov ch, dl 0 00005AFC 80C536 add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 3239 0 00005AFF E85300 call .lit_isdigit? ; first character must be a digit 0 00005B02 7240 jc .err2 0 00005B04 31D2 xor dx, dx ; initialize value 3243 .lit_loopdigit: 0 00005B06 3C5F cmp al, '_' 0 00005B08 7436 je .lit_skip 0 00005B0A E84800 call .lit_isdigit? ; was last character ? 0 00005B0D 72BC jc .lit_end ; yes --> 0 00005B0F E8[0000]EB02[0000] nearcall capitalise 0 00005B16 2C30 sub al, '0' 0 00005B18 3C09 cmp al, 9 ; was decimal digit ? 0 00005B1A 7602 jbe .lit_decimaldigit ; yes --> 0 00005B1C 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 3253 .lit_decimaldigit: 0 00005B1E 50 push ax 0 00005B1F 89D0 mov ax, dx 0 00005B21 53 push bx 0 00005B22 F7E7 mul di ; multiply low word with base 0 00005B24 89D3 mov bx, dx 0 00005B26 89C2 mov dx, ax 0 00005B28 58 pop ax 0 00005B29 52 push dx 0 00005B2A F7E7 mul di ; multiply high word with base 0 00005B2C 85D2 test dx, dx 0 00005B2E 5A pop dx 0 00005B2F 7513 jnz .err2 ; overflow --> 0 00005B31 01C3 add bx, ax ; add them 0 00005B33 58 pop ax 0 00005B34 720E jc .err2 ; overflow --> 0 00005B36 00C2 add dl, al ; add in the new digit 0 00005B38 80D600 adc dh, 0 0 00005B3B 83D300 adc bx, byte 0 0 00005B3E 7204 jc .err2 ; overflow --> 3273 .lit_skip: 0 00005B40 AC lodsb 0 00005B41 EBC3 jmp short .lit_loopdigit 3276 3277 .term_end: 0 00005B43 C3 retn 3279 3280 .err2: 0 00005B44 B80C05 mov ax, 050Ch 0 00005B47 E8[0000]EB02[0000] nearcall setrc 0 00005B4E E9F5EB jmp symbolasm_error 3284 3285 .lit_ishexdigit?: 0 00005B51 E8[0000] nearcall getexpression.lit_ishexdigit? 0 00005B54 C3 retn 3288 3289 .lit_isdigit?: 0 00005B55 E8[0000] nearcall getexpression.lit_isdigit? 0 00005B58 C3 retn 3292 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00007670 ???????? eldhSignature: resb 4 ; "ELD1" 0 00007674 ?????? resb 3 ; reserved 0 00007677 ?? resb 1 ; 26 (Ctrl-Z) 0 00007678 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000767C ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 0000767E ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00007680 ???????? eldhDataOffset: resd 1 0 00007684 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00007686 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00007688 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000768A ???????? eldhReserved: resb 4 ; reserved 0 0000768E ???? 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 00007690 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00007694 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00007698 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000769C ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00007670 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00007678 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000767C ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 0000767E ???? 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 00007670 ???? 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 00007672 ???? eldltAmount: resw 1 0 00007674 ???????? 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 00007670 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00007672 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00007674 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00007676 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00007678 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00007680 ???? 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 00007670 ???? eldlSignature: resw 1 ; 0E1D1h 0 00007672 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00007674 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00007676 ???? eldlUseLinkHash: resw 1 0 00007678 ???? eldlDataAmount: resw 1 0 0000767A ???? eldlDataPrefixes: resw 1 0 0000767C ???? eldlDataEntries: resw 1 0 0000767E ???? eldlDataAddresses: resw 1 0 00007680 ???? eldlCodeAmount: resw 1 0 00007682 ???? eldlCodePrefixes: resw 1 0 00007684 ???? eldlCodeEntries: resw 1 0 00007686 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00007688 ???? eldlDualAmount: resw 1 0 0000768A ???? eldlDualPrefixes: resw 1 0 0000768C ???? eldlDualEntries: resw 1 0 0000768E ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00007670 ???? ifKeyword: resw 1 0 00007672 ???? ifDescription: resw 1 0 00007674 ???? ifOptions: resw 1 0 00007676 ???? ifValue: resw 1 0 00007678 ???? ifTrying: resw 1 0 0000767A ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00007670 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00007674 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00007678 ???? smName1: resw 1 ; -> first string part 0 0000767A ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 0000767C ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 0000767E ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00007680 ???? smBaseNext: resw 1 0 00007682 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00007684 ???? smSpecialNext: resw 1 0 00007686 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00007670 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00007671 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00007672 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00007670 ???? shHash: resw 1 ; hash value 0 00007672 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00007670 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00007674 ???? xmsmSourceHandle: resw 1 0 00007676 ???????? xmsmSourceAddress: resd 1 0 0000767A ???? xmsmDestHandle: resw 1 0 0000767C ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <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=00F6D0h -> "LDEBUG_CODE" 27 ------------------ note: usesection lDEBUG_CODE 28 29 ..@uu_access_start: 30 ; U command - disassemble. 31 uu: 0 0000B9AA 4E dec si 0 0000B9AB 4E dec si 0 0000B9AC BA[0000] mov dx, msg.uninstall 0 0000B9AF E8[0000] call isstring? 0 0000B9B2 AC lodsb 0 0000B9B3 7503E9[0000] je uninstall 38 %if _LOADER 39 jmp error 40 %else 0 0000B9B8 AC lodsb 42 0 0000B9B9 C706[0000][1A00] mov word [lastcmd], lastuu 0 0000B9BF E8[0000] call iseol? 0 0000B9C2 7537 jne uu1 ; if an address was given 46 47 lastuu: 0 0000B9C4 6631C0 _386_PM xor eax, eax 0 0000B9C7 A1[0000] mov ax, word [uu_default_lines] 50 ; default length in lines, if nonzero 0 0000B9CA 85C0 test ax, ax 0 0000B9CC 740C jz @F 0 0000B9CE 7807 js short .error 0 0000B9D0 A3[0000] mov word [getrange_lines], ax 0 0000B9D3 31C0 xor ax, ax 0 0000B9D5 EB11 jmp @FF 57 58 .error: 0 0000B9D7 E9[0000] jmp error 60 61 @@: 0 0000B9DA C706[0000]0080 mov word [getrange_lines], 8000h 0 0000B9E0 A1[0000] mov ax, word [uu_default_length] 0 0000B9E3 85C0 test ax, ax 0 0000B9E5 74F0 jz short .error 0 0000B9E7 48 dec ax 67 @@: 0 0000B9E8 66 _386_PM_o32 ; mov ecx, dword [u_addr] 0 0000B9E9 8B0E[0000] mov cx, word [u_addr] 0 0000B9ED 66 _386_PM_o32 ; mov edx, ecx 0 0000B9EE 89CA mov dx, cx 0 0000B9F0 66 _386_PM_o32 ; add ecx, byte 1Fh 0 0000B9F1 01C1 add cx, ax 0 0000B9F3 7304 jnc .no_overflow ; if no overflow --> 0 0000B9F5 66 _386_PM_o32 ; or ecx, byte -1 0 0000B9F6 83C9FF or cx, byte -1 ; til end of segment 77 .no_overflow: 0 0000B9F9 EB39 jmp short uu2 79 80 uu1: 0 0000B9FB 8B0E[0000] mov cx, word [uu_default_length] 82 ; default length 0 0000B9FF 8B3E[0000] mov di, word [uu_default_lines] 84 ; default length in lines, if nonzero 0 0000BA03 8B1E[0000] mov bx, word [reg_cs] 0 0000BA07 C706[0000]0080 mov word [getrange_lines], 8000h 87 %if _MS_0RANGE_COMPAT 0 0000BA0D C606[0000]FF mov byte [getrange_is_uu], -1 0 0000BA12 E8[0000]EB02[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 0000BA19 E8[0000] call chkeol ; expect end of line here 0 0000BA1C 891E[0400] mov word [u_addr + saSegSel], bx 95 %if _PM 0 0000BA20 E8[0000] call ispm 0 0000BA23 7506 jnz .86m 98 .pm: 0 0000BA25 891E[0800] mov word [u_addr + saSelector], bx 0 0000BA29 EB04 jmp @F 101 .86m: 0 0000BA2B 891E[0600] mov word [u_addr + saSegment], bx 103 @@: 104 %endif 0 0000BA2F 66 _386_PM_o32 ; mov dword [u_addr], edx 0 0000BA30 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: 0 0000BA34 66 _386_PM_o32 ; inc ecx 0 0000BA35 41 inc cx 115 uu3: 0 0000BA36 E8[0000] call handle_serial_flags_ctrl_c 0 0000BA39 66 _386_PM_o32 ; push ecx 0 0000BA3A 51 push cx 0 0000BA3B 66 _386_PM_o32 ; push edx 0 0000BA3C 52 push dx 0 0000BA3D 8326[0201]00 and word [disflags], 0 0 0000BA42 E82500 call disasm ; do it 0 0000BA45 66 _386_PM_o32 ; pop ebx 0 0000BA46 5B pop bx 0 0000BA47 66 _386_PM_o32 ; pop ecx 0 0000BA48 59 pop cx 0 0000BA49 66 _386_PM_o32 ; mov eax, dword [u_addr] 0 0000BA4A A1[0000] mov ax, word [u_addr] 0 0000BA4D 66 _386_PM_o32 ; mov edx, eax 0 0000BA4E 89C2 mov dx, ax 0 0000BA50 66 _386_PM_o32 ; sub eax, ecx 0 0000BA51 29C8 sub ax, cx ; current position - end 0 0000BA53 66 _386_PM_o32 ; sub ebx, ecx 0 0000BA54 29CB sub bx, cx ; previous position - end 135 0 0000BA56 F606[0100]80 testopt [getrange_lines], 8000h 0 0000BA5B 7406 jz @F 0 0000BA5D 66 _386_PM_o32 ; cmp eax, ebx 0 0000BA5E 39D8 cmp ax, bx 0 0000BA60 73D4 jnb uu3 ; if we haven't reached the goal 0 0000BA62 C3 retn 142 143 @@: 0 0000BA63 FF0E[0000] dec word [getrange_lines] 0 0000BA67 75CD jnz uu3 0 0000BA69 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 00007670 [F60B][BD0B][2A0C] dw DISJMP2_OPSIZEDITEMS 0 00007676 [F40E][010F][1B0C] 0 0000767C [0A0F][620F][670F] 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 00007682 [FE02] dw da_internal_error ; entry for OP_END 0 00007684 [6B0F][6F0F][800F] dw OPTAB_OPITEMS 0 0000768A [9D0F][B30F][C50F] 0 00007690 [FE02][7E10][BC10] 0 00007696 [8312][9312][A912] 0 0000769C [C912][D412][F312] 0 000076A2 [1B13][1B13][2D13] 0 000076A8 [4813][3313][4113] 0 000076AE [5313][5B13][6C13] 0 000076B4 [0215][0715][2C15] 0 000076BA [4715][5315][5A15] 0 000076C0 [0B15][1215][1915] 0 000076C6 [2515][2015][2B14] 0 000076CC [5F14][9E14][FB14] 0 000076D2 [440F]310033004458 0 000076DA 434C53544353445345 0 000076E3 53465347535353 167 168 169 align 2, db 0 170 disjmp_opx: 0 000076EA [0715][B113][DE13] dw DISJMP_OPXITEMS 0 000076F0 [0914][AA13][2214] 0 000076F6 [1B14][A113][7613] 0 000076FC [9713] 172 173 174 %if _MEMREF_AMOUNT 0 000076FE 00 align 16, db 0 0 00007700 00 memrefs: times MEMREF_size * _MEMREF_AMOUNT db 0 0 00007740 0000 .free: dw 0 178 0 00007742 00 align 4, db 0 180 string_memref_counter: 0 00007744 00000000 dd 0 182 %endif 183 184 185 ; DISASM - Disassemble. 186 187 %if _SYMBOLIC 188 align 4, db 0 0 00007748 00000000 u_lin_start: dd 0 190 %endif 191 align 2, db 0 192 %if _40COLUMNS 0 0000774C 0000 mnemonofs: dw 0 0 0000774E 0000 trailofs: dw 0 195 %endif 0 00007750 0000 dis_n: dw 0 ; number of bytes in instruction so far 0 00007752 0000 dw 0 0 00007754 00 preflags: db 0 ; flags for prefixes found so far (includes OSIZE,ASIZE) 0 00007755 00 preused: db 0 ; flags for prefixes used so far 200 %if _PM 0 00007756 00 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 00007757 00 instru: db 0 ; the main instruction byte 0 00007758 00 disp8: db 0 0 00007759 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 0000775A 00 moddone:db 0 ; whether MODRM keyword displayed yet 231 %endif 0 0000775B 00 align 2, db 0 0 0000775C 0000 index: dw 0 ; index of the instruction (unsqueezed) 0 0000775E [0000][0100][0400] obsinst:dw SFPGROUP3, SFPGROUP3+1, SFPGROUP3+4 0 00007764 [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 00007768 00 rmsize: db 0 ; <0 or 0 or >0 means mod r/m is 8 or 16 or 32 0 00007769 00 segmnt: db 0 ; segment determined by prefix (or otherwise) 0 0000776A 00 align 4, db 0 0 0000776C 00000000 addrr: dd 0 ; address in mod r/m byte 0 00007770 0000 savesp2:dw 0 ; save the stack pointer here (used in disasm) 248 249 align 2, db 0 0 00007772 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 00007774 00 disflags2: db 0 ; another copy of DIS_I_KNOWSIZ 0 00007775 00 disrepeatcount: db 0 276 277 align 2, db 0 0 00007776 0000 sizeloc: dw 0 ; address of size words in output line 279 uu_a32_size_byte_keyword: 0 00007778 0000 dw 0 281 uu_a32_size_dword_keyword: 0 0000777A 0000 dw 0 283 %if _COND 0 0000777C 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 0000777E [7A15] dw disbad ; illegal instruction 0 00007780 [0A02] dw da_twobyte ; two-byte instruction 0 00007782 [1602] dw da_insgrp ; instruction group 0 00007784 [1D02] dw da_fpuins ; coprocessor instruction 0 00007786 [3802] dw da_fpugrp ; coprocessor instruction group 0 00007788 [4102] 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 0000778A 0A09060502010408 rmtab: db 8+2, 8+1, 4+2, 4+1, 2, 1, 4, 8 305 306 307 align 2, db 0 0 00007792 [0000][0000][0000] reg32addr: dw reg_eax, reg_ecx, reg_edx, reg_ebx 0 00007798 [0000] 0 0000779A [0000][0000][0000] dw reg_esp, reg_ebp, reg_esi, reg_edi 0 000077A0 [0000] 310 311 align 2, db 0 0 000077A2 [0000][0000][0000] segrgaddr: dw reg_es,reg_cs,reg_ss,reg_ds,reg_fs,reg_gs 0 000077A8 [0000][0000][0000] 313 314 ; Tables for handling of named prefixes. 315 316 prefixlist: 0 000077AE 262E363E .segment: db 26h,2Eh,36h,3Eh 318 %ifdef MN_GS 0 000077B2 6465 db 64h,65h ; segment prefixes (in order) 320 %endif 321 .after_segment: 0 000077B4 9BF0F2F3 db 9Bh,0F0h,0F2h,0F3h ; WAIT,LOCK,REPNE,REPE 323 .size: 324 %ifdef MN_O32 0 000077B8 6667 db 066h,067h ; OSIZE, ASIZE 326 %endif 327 N_PREFIX: equ $ - prefixlist 328 329 align 2, db 0 0 000077BA [0000][0000][0000] prefixmnem: dw MN_WAIT,MN_LOCK,MN_REPNE,MN_REPE 0 000077C0 [0000] 331 %ifdef MN_O32 0 000077C2 [0000][0000] dw MN_O32,MN_A32 ; in 16-bit CS, OSIZE is O32 and ASIZE is A32 333 %if _PM 0 000077C6 [0000][0000] 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 000077CA 0008 dw 800h ; OF 0 000077CC 0100 dw 1 ; CF 0 000077CE 4000 dw 40h ; ZF 0 000077D0 4100 dw 41h ; CF | ZF 0 000077D2 8000 dw 80h ; SF 0 000077D4 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 000077D6 E6 db 0E6h ; out imm8, al 0 000077D7 E7 db 0E7h ; out imm8, (e)ax 0 000077D8 EE db 0EEh ; out dx, al 0 000077D9 EF db 0EFh ; out dx, (e)ax 0 000077DA 6E db 06Eh ; outsb 0 000077DB 6F db 06Fh ; outsw/outsd 0 000077DC E4 db 0E4h ; in al, imm8 0 000077DD E5 db 0E5h ; in (e)ax, imm8 0 000077DE EC db 0ECh ; in al, dx 0 000077DF ED db 0EDh ; in (e)ax, dx 0 000077E0 6C db 06Ch ; insb 0 000077E1 6D db 06Dh ; insw/insd 0 000077E2 F4 db 0F4h ; hlt 0 000077E3 FB db 0FBh ; sti 0 000077E4 17 db 17h ; pop ss 368 .length: equ $ - . 0 000077E5 1F db 1Fh ; pop ds 0 000077E6 07 db 07h ; pop es 371 .length_nec: equ $ - . 372 373 374 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 374 ------------------ note: usesection lDEBUG_CODE 375 376 disasm: section_of_function 0 0000BA6A C606[0501]00 mov byte [disrepeatcount], 0 ; number of repeated disassembly lines 378 379 %if _MEMREF_AMOUNT 0 0000BA6F B90400 mov cx, _MEMREF_AMOUNT 0 0000BA72 BF[9000] mov di, memrefs 382 @@: 0 0000BA75 E82211 call init_one_memref 0 0000BA78 E2FB loop @B 0 0000BA7A AB stosw ; memrefs.free 386 %endif 387 388 .preserve_disrepeatcount: 389 %if _COND 0 0000BA7B 8326[0C01]00 and word [condmsg], 0 ; initialize conditions message 391 %endif 392 .preserve_condmsg_and_disrepeatcount: 0 0000BA80 8926[0001] mov word [savesp2], sp 0 0000BA84 66 _386_PM_o32 ; xor eax, eax 0 0000BA85 31C0 xor ax, ax 0 0000BA87 66 _386_PM_o32 ; mov dword [dis_n], eax 0 0000BA88 A3[E000] mov word [dis_n], ax 0 0000BA8B A3[E800] mov word [disp8], ax ; clear disp8 and gotsib 0 0000BA8E A3[E400] mov word [preflags], ax ; clear preflags and preused 0 0000BA91 A3[0801] mov word [uu_a32_size_byte_keyword], ax 0 0000BA94 A3[0A01] mov word [uu_a32_size_dword_keyword], ax 402 %if 1 0 0000BA97 A2[EA00] mov byte [moddone], al 404 %endif 0 0000BA9A C706[F800]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 0000BAA0 A3[0000] mov word [dismach], ax ; no special machine needed, so far 0 0000BAA3 8B1E[0400] mov bx, word [u_addr + saSegSel] 412 %if _PM 0 0000BAA7 A2[0000] mov byte [bCSAttr], al 414 %if _DISASM_32BIT 0 0000BAAA E8[0000] call test_d_b_bit 0 0000BAAD 7405 jz .16 0 0000BAAF C606[0000]40 mov byte [bCSAttr], 40h 418 .16: 419 %endif 420 %endif 421 %if _40COLUMNS 0 0000BAB4 B81C00 mov ax, MNEMONOFS 0 0000BAB7 BA4F00 mov dx, 79 424 %if _MS_MNEMON_COMPAT 0 0000BABA F606[0100]04 testopt [asm_options], disasm_msdebug_mnemonofs 0 0000BABF 7403 jz .notms 0 0000BAC1 B81800 mov ax, MNEMONOFS_MS 428 .notms: 429 %endif 0 0000BAC4 F606[0100]01 testopt [asm_options], disasm_40_columns 0 0000BAC9 7406 jz .not40 0 0000BACB B81400 mov ax, MNEMONOFS_40 0 0000BACE BA2700 mov dx, 39 434 .not40: 0 0000BAD1 A3[DC00] mov word [mnemonofs], ax 0 0000BAD4 8916[DE00] mov word [trailofs], dx 437 %endif 438 439 %if _SYMBOLIC 0 0000BAD8 E8[0000] nearcall zz_detect_xms ; re-detect XMS if used after run 441 0 0000BADB F606[0200]0C testopt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 0 0000BAE0 7571 jnz .no_symbol 444 0 0000BAE2 66 _386_PM_o32 0 0000BAE3 8B16[0000] mov dx, word [u_addr] 0 0000BAE7 E8[0000] call getlinear_32bit 0 0000BAEA 7267 jc .no_symbol 449 0 0000BAEC A3[D800] mov word [u_lin_start], ax 0 0000BAEF 8916[DA00] mov word [u_lin_start + 2], dx 452 0 0000BAF3 89D1 mov cx, dx 0 0000BAF5 89C3 mov bx, ax 0 0000BAF7 E8[0000]EB02[0000] nearcall binsearchmain ; search for matching symbol 0 0000BAFE E353 jcxz .no_symbol 457 .loop_symbol: 0 0000BB00 53 push bx 0 0000BB01 E8[0000]EB02[0000] dualcall displaystring 0 0000BB08 53 push bx 0 0000BB09 50 push ax 0 0000BB0A E8[0000]EB02[0000] dualcall getfarpointer.main 0 0000BB11 5F pop di 0 0000BB12 07 pop es 0 0000BB13 31D2 xor dx, dx 0 0000BB15 F606[0000]40 _386_PM test byte [bCSAttr], 40h 0 0000BB1A 7404 _386_PM jz @F 0 0000BB1C 8B16[0200] _386_PM mov dx, word [u_addr + 2] 469 @@: 0 0000BB20 A1[0000] mov ax, word [u_addr] 0 0000BB23 263B5506 cmp dx, word [es:di + smOffset + 2] 0 0000BB27 BA[0000] mov dx, msg.uu_after_symbol.non_wrt 0 0000BB2A 7506 jne .wrt_symbol 0 0000BB2C 263B4504 cmp ax, word [es:di + smOffset] 0 0000BB30 741B je .non_wrt_symbol 476 .wrt_symbol: 0 0000BB32 BA[0000] mov dx, msg.uu_between_symbol.wrt 0 0000BB35 E8[0000] call disp_message 0 0000BB38 16 push ss 0 0000BB39 07 pop es 0 0000BB3A BF[0000] mov di, line_out 0 0000BB3D A1[0400] mov ax, word [u_addr + 4] 0 0000BB40 E8[0000] call hexword 0 0000BB43 53 push bx 0 0000BB44 51 push cx 0 0000BB45 E8[0000] call putsline 0 0000BB48 59 pop cx 0 0000BB49 5B pop bx 0 0000BB4A BA[0000] mov dx, msg.uu_after_symbol.wrt 490 .non_wrt_symbol: 0 0000BB4D E8[0000] call disp_message 492 .next_symbol: 0 0000BB50 43 inc bx 0 0000BB51 E2AD loop .loop_symbol 495 496 .no_symbol: 0 0000BB53 16 push ss 0 0000BB54 07 pop es 0 0000BB55 16 push ss 0 0000BB56 1F pop ds 501 %endif 502 0 0000BB57 E8D215 call disgetbyte ; get a byte of the instruction 0 0000BB5A 3C9B cmp al, 9Bh ; wait instruction (must be the first prefix) 0 0000BB5C 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 0000BB5E 800E[E400]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 0000BB63 E8C615 call disgetbyte 521 da2: 0 0000BB66 A2[E700] mov [instru],al ; save away the instruction 0 0000BB69 B400 mov ah,0 524 525 ; Now we have the sequence number of the instruction in AX. Look it up. 526 527 da3: 0 0000BB6B 89C3 mov bx,ax 0 0000BB6D A3[EC00] mov [index],ax ; save the compressed index 0 0000BB70 3D[0000] cmp ax,SPARSE_BASE 0 0000BB73 720A jb da4 ; if it's not from the squeezed part of the table 532 %if _LINK 0 0000BB75 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 0000BB79 B700 mov bh,0 0 0000BB7B 81C3[0000] add bx,SPARSE_BASE ; bx = compressed index 540 541 da4: 0 0000BB7F 8A8F[0000] mov cl, [optypes+bx]; cx = opcode type 0 0000BB83 B500 mov ch, 0 0 0000BB85 D1E3 shl bx, 1 0 0000BB87 8B9F[0000] mov bx, [opinfo+bx] ; bx = other info (usually the mnemonic) 0 0000BB8B 89CE mov si, cx 0 0000BB8D 89D8 mov ax, bx 0 0000BB8F B10C mov cl, 12 0 0000BB91 D3E8 shr ax, cl 0 0000BB93 3A06[0000] cmp al, [dismach] 0 0000BB97 7203 jb da5 ; if a higher machine is already required 0 0000BB99 A2[0000] mov [dismach], al ; set machine type 553 da5: 0 0000BB9C 80E70F and bh, 0Fh ; remove the machine field 555 %if _LINK_COMPAT 0 0000BB9F 81FE[0000] cmp si, strict word OPTYPES_BASE 557 %else 558 cmp si, OPTYPES_BASE 559 %endif 0 0000BBA3 7360 jae da13_unp ; if this is an actual instruction 0 0000BBA5 F7C60100 test si, 1 ; check whether valid displacement 0 0000BBA9 7403E9FA00 jnz da_internal_error ; if not --> 0 0000BBAE FF94[0E01] call [disjmp+si] ; otherwise, do more specific processing 0 0000BBB2 EBB7 jmp s da3 ; back for more 565 566 ; Two-byte instruction. 567 568 da_twobyte: 0 0000BBB4 E87515 call disgetbyte 0 0000BBB7 A2[E700] mov [instru],al 0 0000BBBA B400 mov ah,0 0 0000BBBC 05[0000] add ax,SPARSE_BASE 0 0000BBBF C3 ret 574 575 ; Instruction group. 576 577 da_insgrp: 0 0000BBC0 E8CB13 call getregmem_r ; get the middle 3 bits of the R/M byte 0 0000BBC3 98 cbw 0 0000BBC4 01D8 add ax,bx ; offset 0 0000BBC6 C3 ret 582 583 ; Coprocessor instruction. 584 585 da_fpuins: 0 0000BBC7 800E[0201]10 or byte [disflags],DIS_I_SHOWSIZ 0 0000BBCC 800E[0000]01 or byte [dmflags],DM_COPR 0 0000BBD1 E8C413 call getregmem 0 0000BBD4 3CC0 cmp al,0c0h 0 0000BBD6 72E8 jb da_insgrp ;range 00-bfh is same as an instruction group 0 0000BBD8 B103 mov cl,3 0 0000BBDA D2E8 shr al,cl ;C0h --> 18h 0 0000BBDC 2C10 sub al,18h-8 ;18h --> 8 0 0000BBDE 98 cbw 0 0000BBDF 01D8 add ax,bx ;offset 0 0000BBE1 C3 ret 597 598 ; Coprocessor instruction group. 599 600 da_fpugrp: 0 0000BBE2 A0[0000] mov al,[regmem] 0 0000BBE5 2407 and al,7 0 0000BBE7 98 cbw 0 0000BBE8 01D8 add ax,bx 0 0000BBEA C3 ret 606 607 ; Instruction prefix. At this point, bl = prefix bits; bh = segment 608 609 da_insprf: 0 0000BBEB 841E[E400] test bl,[preflags] 0 0000BBEF 7511 jnz da12 ; if there are duplicates 0 0000BBF1 081E[E400] or [preflags],bl 0 0000BBF5 F6C301 test bl,PRESEG 0 0000BBF8 7404 jz da11 ; if not a segment 0 0000BBFA 883E[F900] mov [segmnt],bh ; save the segment 616 da11: 0 0000BBFE 58 pop ax ; discard return address 0 0000BBFF E961FF jmp da1 619 620 da12: 0 0000BC02 E91F13 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 0000BC05 81EE[0000] sub si, strict word OPTYPES_BASE 627 %else 628 sub si, OPTYPES_BASE ; = offset into opindex 629 %endif 0 0000BC09 31C0 xor ax, ax 0 0000BC0B 8A84[0000] mov al, [si + opindex] ; ax = adjustment (from opindex) 0 0000BC0F 01F6 add si, si ; take offset twice 0 0000BC11 4E dec si ; subtract one 0 0000BC12 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 0 0000BC14 A0[E400] mov al, byte [preflags] 0 0000BC17 2430 and al, PREOSIZE | PREASIZE ; get OSIZE,ASIZE status (= O32,A32 in 16-bit cs) 645 %if _DISASM_32BIT 0 0000BC19 F606[0000]40 _386 test byte [bCSAttr], 40h ; in a 32-bit segment? 0 0000BC1E 7402 _386 jz .16 ; no --> 0 0000BC20 3430 _386 xor al, PRE32D | PRE32A ; OSIZE,ASIZE present means O16,A16 649 .16: 650 %endif 0 0000BC22 A2[E600] mov byte [presizeflags], al ; set O32,A32 status 652 %endif 0 0000BC25 56 push si 0 0000BC26 8DB7[0000] lea si,[mnlist+bx] ; offset of mnemonic 655 %ifdef MN_BSWAP 656 %if _LINK 0 0000BC2A 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 0000BC2E 7505 jne da13a ; if not BSWAP 0 0000BC30 E88914 call dischk32d 0 0000BC33 74CD jz da12 ; if no operand-size prefix --> 665 %endif 666 da13a: 0 0000BC35 E8A813 call showop ; print out the op code (at line_out+28) 0 0000BC38 8326[0601]00 and word [sizeloc], 0 ; clear out this flag 0 0000BC3D 5E pop si ; recover list of operands (offset in oplists) 0 0000BC3E 81C6[0000] add si, oplists ; -> actual oplist entry 671 672 da14_check_end: 0 0000BC42 803C00 cmp byte [si], OP_END 0 0000BC45 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 0000BC4A C606[0401]00 mov byte [disflags2], 0 ; clear out size-related flags 0 0000BC4F AC lodsb ; get the operand type 0 0000BC50 3C40 cmp al,OP_SIZE 0 0000BC52 7263 jb da18 ; if it's not size dependent 0 0000BC54 C606[0401]20 mov byte [disflags2],DIS_I_KNOWSIZ ;indicate variable size 0 0000BC59 3CB0 cmp al,OP_1632_DEFAULT_ASM 0 0000BC5B 7323 jae da15 0 0000BC5D 3CA0 cmp al,OP_1632_DEFAULT 0 0000BC5F 7313 jae da15_default 0 0000BC61 3C60 cmp al,OP_8 0 0000BC63 7329 jae da16 ; if the size is fixed (8, 16, 32, 64) 0 0000BC65 3C50 cmp al,OP_1632 0 0000BC67 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 0000BC69 B4FF mov ah,-1 0 0000BC6B F606[E700]01 test byte [instru],1 0 0000BC70 7424 jz da17 ; if byte --> 0 0000BC72 EB0C jmp da15 701 702 da15_default: 703 %if _DISASM_32BIT 0 0000BC74 F606[E400]10 test byte [preflags], PREOSIZE 0 0000BC79 7505 jnz da15 706 %endif 0 0000BC7B 800E[0301]01 setopt [disflags], DIS_I_NOSIZ 708 da15: 0 0000BC80 800E[E500]10 or byte [preused],PRE32D; mark this flag as used 710 .no_use_osize: 0 0000BC85 8A26[E600] mov ah,[presizeflags] 0 0000BC89 80E410 and ah,PRE32D ;this will be 10h for dword, 00h for word 0 0000BC8C EB08 jmp s da17 ;done 714 715 da16: 0 0000BC8E 88C4 mov ah,al ;OP_8, OP_16, OP_32 or OP_64 (we know which) 0 0000BC90 80E4F0 and ah,0f0h ;this converts ah to <0 for byte, =0 for word, 0 0000BC93 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 0000BC96 88C3 mov bl, al 0 0000BC98 83E30F and bx, 0Fh ; 8 entries (IMM, RM, M, R_MOD, M_OFFS, R, R_ADD, AX) 0 0000BC9B D1E3 shl bx, 1 0 0000BC9D 83FB12 cmp bx, disjmp2.end - disjmp2 0 0000BCA0 7306 jae @F 0 0000BCA2 FF97[0000] call [disjmp2 + bx] ; print out the operand 0 0000BCA6 EB2D jmp short da20 ; done with operand 730 731 @@: 732 da_internal_error: 0 0000BCA8 B80E01 mov ax, 010Eh 0 0000BCAB E8[0000] call setrc 0 0000BCAE BA[0000] mov dx, msg.uu_internal_error 0 0000BCB1 E8[0000] call putsz 0 0000BCB4 E9[0000] jmp cmd3 738 739 740 ; Sizeless operands. 741 742 da18: 0 0000BCB7 98 cbw 0 0000BCB8 93 xchg ax, bx ; bx = index 0 0000BCB9 D1E3 shl bx, 1 0 0000BCBB 8B87[1200] mov ax, [optab + bx] 0 0000BCBF 83FB52 cmp bx, OP_FIRST_STRING << 1 0 0000BCC2 720F jb da19 ; if it's not a string 0 0000BCC4 83FB68 cmp bx, OP_AFTER_LAST << 1 0 0000BCC7 73DF jae @B 0 0000BCC9 E87D13 call dis_stosw_lowercase 0 0000BCCC 84E4 test ah, ah 0 0000BCCE 7505 jnz da20 ; if it's two characters 0 0000BCD0 4F dec di 0 0000BCD1 EB02 jmp s da20 ; done with operand 756 757 da19: 0 0000BCD3 FFD0 call ax ; otherwise, do something else 759 760 ; Operand done, check if there's another one. 761 da20: 0 0000BCD5 803C00 cmp byte [si], OP_END 763 da_op_end_e: 0 0000BCD8 7410 je da_op_end ; if we're done --> 0 0000BCDA B02C mov al,',' 0 0000BCDC AA stosb 0 0000BCDD F606[0000]02 testopt [asm_options], disasm_commablank 0 0000BCE2 7403 jz .nospace 0 0000BCE4 B020 mov al, 32 0 0000BCE6 AA stosb 771 .nospace: 0 0000BCE7 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 0000BCEA B9[0000] mov cx, N_LTABO 0 0000BCED BB[0000] mov bx, ltabo1 784 %ifn _LINK 785 mov dx, 2*N_LTABO-2 786 %else 0 0000BCF0 BA[FEFF] mov dx, N_LTABO-2 788 wlcalc word_ext_N_LTABO, equ $ - 2 789 %endif 0 0000BCF3 B410 mov ah, PRE32D 0 0000BCF5 E8A600 call da23_osize_asize 792 0 0000BCF8 B9[0000] mov cx, N_LTABA 0 0000BCFB BB[0000] mov bx, ltaba1 795 %ifn _LINK 796 mov dx, 2*N_LTABA-2 797 %else 0 0000BCFE BA[FEFF] mov dx, N_LTABA-2 799 wlcalc word_ext_N_LTABA, equ $ - 2 800 %endif 0 0000BD01 B420 mov ah, PRE32A 0 0000BD03 E89800 call da23_osize_asize 803 %endif 804 805 ; Now check and loop for unused prefixes. 806 da21: 0 0000BD06 A0[E500] mov al, [preused] ; = flags that are used 0 0000BD09 F6D0 not al ; = flags that are not used 0 0000BD0B 2206[E400] and al, [preflags] ; = flags that are not used but present 0 0000BD0F 7503E96801 jz da28 ; if all present flags were used --> 811 0 0000BD14 B9[0000] mov cx, N_WTAB 0 0000BD17 BB[0000] mov bx, wtab1 814 %ifn _LINK 815 mov dx, 2*N_WTAB-2 816 %else 0 0000BD1A BA[FEFF] mov dx, N_WTAB-2 818 wlcalc word_ext_N_WTAB, equ $ - 2 819 %endif 0 0000BD1D B440 mov ah, PREWAIT 0 0000BD1F 84E0 test al, ah 0 0000BD21 740A jz @F 823 ; if there's a WAIT prefix hanging 0 0000BD23 E87400 call da23_wait 0 0000BD26 7403E99A00 jne disbad2 0 0000BD2B EBD9 jmp da21 827 828 @@: 829 %if _DISASM_32BIT 0 0000BD2D B420 mov ah, PREASIZE 0 0000BD2F 84E0 test al, ah 0 0000BD31 7518 jnz da21_asize ; if it is a 67h prefix --> 833 0 0000BD33 B410 mov ah, PREOSIZE 0 0000BD35 84E0 test al, ah 0 0000BD37 7503E98C00 jz da24 ; if not osize --> 837 da21_osize: 838 ; check whether OSIZE applies (segreg push/pop) 0 0000BD3C 57 push di 0 0000BD3D 50 push ax 0 0000BD3E A1[EC00] 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 0000BD41 BF[0000] mov di, o32prfxtab 0 0000BD44 B9[0000] mov cx, O32P_AMOUNT 0 0000BD47 F2AF repne scasw 0 0000BD49 EB16 jmp da21_a_o_common 861 862 da21_asize: 863 ; check whether ASIZE applies to an implicit operand 0 0000BD4B 57 push di 0 0000BD4C 50 push ax 0 0000BD4D A1[EC00] mov ax, [index] 0 0000BD50 84E4 test ah, ah 0 0000BD52 750D jnz da21_nota32prfx_nz 869 ; opcode index > FF, not in this list --> 0 0000BD54 BF[0000] mov di, a32prfxtab 0 0000BD57 AE scasb ; xlatb ? 0 0000BD58 7407 je @F ; yes --> (ZR) 0 0000BD5A 24FE and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 0 0000BD5C B9[FFFF] mov cx, A32P_LEN - 1 0 0000BD5F F2AE repne scasb ; scan table (low bit cleared) 876 @@: 877 da21_a_o_common: 878 da21_nota32prfx_nz: 0 0000BD61 58 pop ax 0 0000BD62 5F pop di 0 0000BD63 7560 jne da21_notprfx ; not in the list --> 882 0 0000BD65 0826[E500] or [preused], ah ; mark it as used 0 0000BD69 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 0000BD6B E81014 call moveover ; make space for "A32 " (or a16, osize) 0 0000BD6E 50 _386_PM push ax 0 0000BD6F 80FC10 cmp ah, PREOSIZE ; is it OSIZE ? 0 0000BD72 B84133 mov ax, "A3" ; start of "A32" 0 0000BD75 7502 jne @F ; no --> 0 0000BD77 B04F mov al, 'O' ; make it OSIZE (O32/O16) 896 @@: 0 0000BD79 E83912 call dis_lowercase ; al = "a"/"o" if lowercase option specified 898 %if _40COLUMNS 0 0000BD7C 8B36[DC00] mov si, word [mnemonofs] 0 0000BD80 8984[0000] mov word [line_out + si], ax 0 0000BD84 C784[0200]3220 mov word [line_out + si + 2], "2 " 902 ; trail of A32/O32 0 0000BD8A 58 _386_PM pop ax 0 0000BD8B 8426[E600] _386_PM test byte [presizeflags], ah 905 _386_PM ; do we have 32-bit ASIZE/OSIZE ? 0 0000BD8F 7506 _386_PM jnz da21_j0 ; yes, keep a32/o32 (in 16-bit cs) --> 0 0000BD91 C784[0100]3136 _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 0000BD97 E96CFF jmp da21 926 927 da21_notprfx: equ disbad2 928 929 930 da23_osize_asize: equ da23 931 932 da23_wait: 933 %if _PM 0 0000BD9A 0826[E600] 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 0000BD9E 57 push di 0 0000BD9F 89DF mov di, bx 0 0000BDA1 50 push ax 0 0000BDA2 0C01 or al, 1 ; NZ, in case cx == 0 0 0000BDA4 A1[EC00] mov ax, [index] 0 0000BDA7 F2AF repne scasw 0 0000BDA9 58 pop ax 0 0000BDAA 7517 jne .ret ; if not found in the list --> (NZ) 0 0000BDAC 0826[E500] or byte [preused], ah ; mark this (OSIZE, ASIZE or WAIT) prefix as used 0 0000BDB0 8426[E600] test byte [presizeflags], ah 977 ; is it O32, A32, or is WAIT present ? 0 0000BDB4 740D jz .ret ; no, do not modify mnemonic --> 0 0000BDB6 01D7 add di, dx ; replace the mnemonic with the modified name 0 0000BDB8 8B35 mov si, [di] 0 0000BDBA 81C6[0000] add si, mnlist 0 0000BDBE E81F12 call showop ; copy instruction mnemonic 0 0000BDC1 38C0 cmp al, al ; ZR 984 .ret: 0 0000BDC3 5F pop di 0 0000BDC4 C3 retn 987 988 989 da21_j1: equ da21_j0 990 991 disbad2: 0 0000BDC5 E95C11 jmp disbad 993 994 da24: 0 0000BDC8 A801 test al, PRESEG 0 0000BDCA 7438 jz da25 ; if not because of a segment prefix --> 0 0000BDCC A1[EC00] mov ax, [index] 0 0000BDCF 84E4 test ah, ah 0 0000BDD1 75F2 jnz disbad2 ; if index > 256, it's none of these --> 0 0000BDD3 57 push di 0 0000BDD4 B9[0000] mov cx, SEGP_LEN 0 0000BDD7 BF[0000] mov di, segprfxtab 0 0000BDDA F2AE repne scasb 0 0000BDDC 5F pop di 0 0000BDDD 75E6 jne disbad2 ; if it's not on the list --> 0 0000BDDF B90300 mov cx, 3 0 0000BDE2 E89913 call moveover 0 0000BDE5 57 push di 1009 %if _40COLUMNS 0 0000BDE6 BF[0000] mov di, line_out 0 0000BDE9 033E[DC00] add di, word [mnemonofs] 1012 %else 1013 mov di, line_out+MNEMONOFS 1014 %endif 0 0000BDED E85612 call showseg ; show segment register 0 0000BDF0 B03A mov al, ':' 0 0000BDF2 F606[0000]04 testopt [asm_options], disasm_nasm 0 0000BDF7 7402 jz .notnasm 0 0000BDF9 B020 mov al, 32 1020 .notnasm: 0 0000BDFB AA stosb 0 0000BDFC 5F pop di 0 0000BDFD 800E[E500]01 or byte [preused], PRESEG ; mark it as used 1024 da21_j2: 0 0000BE02 EB93 jmp s da21_j1 1026 1027 da25: 0 0000BE04 A802 test al, PREREP 0 0000BE06 7435 jz da26 ; if not a REP prefix 0 0000BE08 2406 and al, PREREP|PREREPZ 0 0000BE0A 0806[E500] or [preused], al 0 0000BE0E A1[EC00] mov ax, [index] 0 0000BE11 84E4 test ah, ah 0 0000BE13 7525 jnz disbad3 ; if not in the first 256 bytes 0 0000BE15 24FE and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 0 0000BE17 57 push di 0 0000BE18 BF[0000] mov di, replist 0 0000BE1B B9[0000] mov cx, REP_SAME_LEN; scan those for REP first 0 0000BE1E F2AE repne scasb 1040 %if _LINK 0 0000BE20 BE[0000] mov si, mnlist 1042 wlcalc word_ext_MN_REP, equ $ - 2 1043 %else 1044 mov si, mnlist+MN_REP 1045 %endif 0 0000BE23 7439 je da27 ; if one of the REP instructions --> 1047 %if _LINK 0 0000BE25 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 0000BE27 F2AE repne scasb 0 0000BE29 750F jne disbad3 ; if not one of the REPE/REPNE instructions 1055 %if _LINK 0 0000BE2B BE[0000] mov si, mnlist 1057 wlcalc word_ext_MN_REPE, equ $ - 2 1058 %else 1059 mov si, mnlist+MN_REPE 1060 %endif 0 0000BE2E F606[E500]04 test byte [preused], PREREPZ 0 0000BE33 7529 jnz da27 ; if REPE 1063 %if _LINK 0 0000BE35 BE[0000] mov si, mnlist 1065 wlcalc word_ext_MN_REPNE, equ $ - 2 1066 %else 1067 mov si, mnlist+MN_REPNE 1068 %endif 0 0000BE38 EB24 jmp s da27 ; it's REPNE 1070 1071 disbad3: 0 0000BE3A E9E710 jmp disbad 1073 1074 da26: 0 0000BE3D A808 test al, PRELOCK 0 0000BE3F 74F9 jz disbad3 ; if not a lock prefix, either --> 0 0000BE41 57 push di 0 0000BE42 A1[EC00] mov ax, [index] 0 0000BE45 BF[0000] mov di, locktab 0 0000BE48 B9[0000] mov cx, N_LOCK 0 0000BE4B F2AF repne scasw 0 0000BE4D 75EB jne disbad3 ; if not in the approved list --> 0 0000BE4F F606[E500]01 test byte [preused], PRESEG 0 0000BE54 74E4 jz disbad3 ; if memory was not accessed --> 1085 %if _LINK 0 0000BE56 BE[0000] mov si, mnlist 1087 wlcalc word_ext_MN_LOCK, equ $ - 2 1088 %else 1089 mov si, mnlist+MN_LOCK 1090 %endif 0 0000BE59 800E[E500]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 0000BE5E 5F pop di 0 0000BE5F 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 0000BE62 F606[0100]02 testopt [asm_options], disasm_no_indent 0 0000BE67 7407 jz @F 0 0000BE69 8B4CFE mov cx, word [si - 2] ; get mnemonic length in low 4 bits 0 0000BE6C 83E10F and cx, 15 ; extract the length 0 0000BE6F 41 inc cx ; allow for one blank 1111 @@: 1112 %endif 0 0000BE70 56 push si 0 0000BE71 E80A13 call moveover 0 0000BE74 5E pop si 0 0000BE75 57 push di 0 0000BE76 E86711 call showop 0 0000BE79 5F pop di 0 0000BE7A EB86 jmp da21_j2 1120 1121 ; Done with instruction. Erase the size indicator, if appropriate. 1122 1123 da28: 0 0000BE7C 8B0E[0601] mov cx, [sizeloc] ; -> size keyword, or zero if none 0 0000BE80 E324 jcxz da28b ; if there was no size given --> 0 0000BE82 A0[0201] mov al, [disflags] 0 0000BE85 A810 test al, DIS_I_SHOWSIZ 0 0000BE87 751D jnz da28b ; if we need to show the size --> 0 0000BE89 A820 test al, DIS_I_KNOWSIZ 0 0000BE8B 7419 jz da28b ; if the size is not known already --> 0 0000BE8D 87CF xchg cx, di ; di -> size keyword, cx -> behind disassembly 0 0000BE8F 89FE mov si,di ; si -> size keyword 0 0000BE91 B020 mov al, 32 ; scan for next blank 1134 da28a: 0 0000BE93 AE scasb ; skip size name 0 0000BE94 75FD jne da28a ; if not done yet --> 1137 ; (The above is the same as repne scasb, but 1138 ; has no effect on cx.) 0 0000BE96 F606[0000]04 testopt [asm_options], disasm_nasm 0 0000BE9B 7503 jnz .nasm 0 0000BE9D 83C704 add di, byte 4 ; skip 'PTR ' 1142 .nasm: 0 0000BEA0 87F7 xchg si, di ; di -> size keyword, si -> after size keyword 0 0000BEA2 29F1 sub cx, si ; behind disassembly - after size keyword 1145 ; = length of disassembly part after keyword 0 0000BEA4 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 0000BEA6 57 push di 0 0000BEA7 BF[0000] mov di, line_out ; print start of disassembly line 0 0000BEAA A1[0400] mov ax, [u_addr + saSegSel] 1156 ; print address 0 0000BEAD E8[0000] call hexword ; segment/selector 0 0000BEB0 B03A mov al, ':' 0 0000BEB2 AA stosb ; colon 0 0000BEB3 66 _386_PM_o32 ; mov eax, dword [u_addr] 0 0000BEB4 A1[0000] mov ax, word [u_addr] 1162 %if _PM && _DISASM_32BIT 0 0000BEB7 F606[0000]40 test byte [bCSAttr], 40h 0 0000BEBC 7403 jz .16 0 0000BEBE E8[0000] call hexword_high 1166 .16: 1167 %endif 0 0000BEC1 E8[0000] call hexword ; offset 0 0000BEC4 B020 mov al, 32 0 0000BEC6 AA stosb ; one blank 0 0000BEC7 8B1E[E000] mov bx, [dis_n] 1172 da28c: 1173 %if _40COLUMNS 0 0000BECB BE[FFFF] mov si, line_out - 1 0 0000BECE 0336[DC00] add si, word [mnemonofs] 1176 %else 1177 mov si,line_out+MNEMONOFS - 1 1178 %endif 0 0000BED2 29FE sub si, di ; how many columns available for machine code 0 0000BED4 D1EE shr si, 1 ; how many bytes can be dumped 0 0000BED6 39F3 cmp bx, si 0 0000BED8 7619 jbe da29 ; if it's a short instruction which fits in one line 0 0000BEDA 29F3 sub bx, si ; bx = how many bytes to defer to next line(s) 0 0000BEDC 53 push bx 0 0000BEDD 89F3 mov bx, si ; bx = how many bytes fit in this line 0 0000BEDF 57 push di 0 0000BEE0 E88212 call disshowbytes ; dump bytes on this line 0 0000BEE3 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 0000BEE6 59 pop cx ; -> at column after segmented address 0 0000BEE7 5B pop bx ; = how many bytes left for subsequent line(s) 0 0000BEE8 BF[0000] mov di, line_out ; reset di 0 0000BEEB 29F9 sub cx, di ; = how many columns to skip 0 0000BEED B020 mov al, 32 0 0000BEEF F3AA rep stosb ; fill with blanks 0 0000BEF1 EBD8 jmp short da28c ; loop for subsequent line(s) --> 1204 da29: 0 0000BEF3 E86F12 call disshowbytes ; dunp remaining bytes 1206 da30: 0 0000BEF6 B020 mov al, 32 ; pad to op code 1208 %if _40COLUMNS 0 0000BEF8 B9[0000] mov cx, line_out 0 0000BEFB 030E[DC00] add cx, word [mnemonofs] 1211 %else 1212 mov cx,line_out+MNEMONOFS 1213 %endif 0 0000BEFF 29F9 sub cx,di 0 0000BF01 7202 jc da30_1 ; (shouldn't happen) 0 0000BF03 F3AA rep stosb 1217 da30_1: 0 0000BF05 5F pop di ; -> behind disassembly 0 0000BF06 F606[0201]08 test byte [disflags],DIS_I_UNUSED 0 0000BF0B 740D jz da32 ; if we don't print ` (unused)' 0 0000BF0D BE[0000] mov si,unused 0 0000BF10 807DFF20 cmp byte [di-1], 32 0 0000BF14 7501 jne da31 ; if there's already a space here 0 0000BF16 46 inc si 1225 da31: 0 0000BF17 E8[0000] call showstring 1227 1228 ; Print info on minimal processor needed. 1229 1230 da32: 0 0000BF1A A0[0000] mov al, [dismach] 0 0000BF1D 3A06[0000] cmp al, [maxmachinetype] 0 0000BF21 7603 jbe @F 0 0000BF23 A2[0000] mov [maxmachinetype], al 1235 @@: 0 0000BF26 57 push di 0 0000BF27 BF[EE00] mov di, obsinst 0 0000BF2A 8B0E[EC00] mov cx, word [index] 0 0000BF2E E89611 call showmach ;show the machine type, if needed 0 0000BF31 5F pop di 0 0000BF32 E313 jcxz da32f_j1 ; if no message --> 1242 1243 ; Print a message on the far right. 1244 1245 da32_tabto: 1246 %if _40COLUMNS 0 0000BF34 B8[0000] mov ax, line_out 0 0000BF37 0306[DE00] add ax, word [trailofs] 1249 %else 1250 mov ax, line_out+79 1251 %endif 0 0000BF3B 29C8 sub ax, cx 0 0000BF3D 51 push cx 0 0000BF3E E8[0000] call tab_to ; tab out to the location 0 0000BF41 59 pop cx 0 0000BF42 F3A4 rep movsb ; copy the string 1257 da32z_j1: 0 0000BF44 E99202 jmp da32z ; done 1259 1260 da32f_j1: 0 0000BF47 EB72 jmp da32f 1262 1263 %if _COND 1264 ; Try dumping a condition status. 1265 da32_cond: 1266 %if _COND_RDUMP_ONLY 0 0000BF49 A802 test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 0 0000BF4B 75F7 jnz da32z_j1 ; not showing conditionals message --> 1269 %endif 0 0000BF4D 8B36[0C01] mov si, word [condmsg] 0 0000BF51 85F6 test si, si ; stored a message here ? 0 0000BF53 74EF jz da32z_j1 ; no --> 0 0000BF55 57 push di 0 0000BF56 89F7 mov di, si 0 0000BF58 B9FFFF mov cx, -1 0 0000BF5B 31C0 xor ax, ax 0 0000BF5D F2AE repne scasb 0 0000BF5F F7D1 not cx 0 0000BF61 49 dec cx ; get string length 0 0000BF62 5F pop di 0 0000BF63 EBCF jmp short da32_tabto 1282 %else 1283 da32_cond: equ da32z_j1 1284 %endif 1285 1286 da32_xlatb: 0 0000BF65 A802 test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 0 0000BF67 75E0 jnz da32_cond 0 0000BF69 803E[F900]03 _no386 cmp byte [segmnt], 3 0 0000BF6E 77D9 _no386 ja da32_cond ; if FS or GS on non-386 --> (invalid) 0 0000BF70 F606[E600]20 _no386 test byte [presizeflags], PRE32A 0 0000BF75 75D2 _no386 jnz da32_cond 0 0000BF77 803E[F900]05 cmp byte [segmnt], 5 0 0000BF7C 77CB ja da32_cond ; if invalid segment --> 0 0000BF7E 813E[EC00]D700 cmp word [index], 0D7h ; xlatb ? 0 0000BF84 75C3 jne da32_cond 0 0000BF86 A1[0000] mov ax, word [reg_ebx] 0 0000BF89 A3[FC00] mov word [addrr], ax 0 0000BF8C A1[0200] mov ax, word [reg_ebx + 2] 0 0000BF8F A3[FE00] mov word [addrr + 2], ax; get address in (e)bx 0 0000BF92 A0[0000] mov al, byte [reg_eax] 0 0000BF95 0006[FC00] add byte [addrr], al 0 0000BF99 8016[FD00]00 adc byte [addrr + 1], 0 0 0000BF9E 8316[FE00]00 adc word [addrr + 2], 0 ; add al 0 0000BFA3 C606[F800]80 mov byte [rmsize], 80h ; byte size 1306 %if _MEMREF_AMOUNT 0 0000BFA8 800E[0301]10 setopt [disflags], DIS_I_M_SRC 1308 %endif 1309 %if _DISASM_32BIT 0 0000BFAD F606[E600]20 test byte [presizeflags], PRE32A 0 0000BFB2 7425 jz @F 0 0000BFB4 800E[0301]08 setopt [disflags], DIS_I_SHOW_A32 1313 ; set flag if 32-bit 1314 %endif 0 0000BFB9 EB1E jmp @F 1316 1317 1318 ; Dump referenced memory location. 1319 1320 da32f: 0 0000BFBB A0[0201] mov al,[disflags] 0 0000BFBE 3406 xor al, DIS_F_SHOW | DIS_I_SHOW 0 0000BFC0 A886 test al, DIS_F_SHOW | DIS_I_SHOW | DIS_I_DONTSHOW 1324 ; (NZ if either _SHOW is clear, or _DONTSHOW is set) 0 0000BFC2 75A1 jnz da32_xlatb ; if there is no memory location to show --> 0 0000BFC4 803E[F900]03 _no386 cmp byte [segmnt], 3 0 0000BFC9 779A _no386 ja da32_xlatb ; if FS or GS on non-386 --> (invalid) 0 0000BFCB F606[0301]08 _no386 testopt [disflags], DIS_I_SHOW_A32 0 0000BFD0 7593 _no386 jnz da32_xlatb 0 0000BFD2 803E[F900]05 cmp byte [segmnt], 5 0 0000BFD7 778C ja da32_xlatb ; if invalid segment --> 1332 @@: 1333 %if _PM 0 0000BFD9 50 push ax 1335 %endif 0 0000BFDA A0[F900] mov al, [segmnt] ; segment number 0 0000BFDD 98 cbw 0 0000BFDE D1E0 shl ax, 1 0 0000BFE0 93 xchg ax, bx ; mov bx, ax 0 0000BFE1 8B9F[3201] mov bx, [segrgaddr + bx]; get address of value 1341 %if _PM 0 0000BFE5 58 pop ax 0 0000BFE6 E8[0000] call ispm 0 0000BFE9 7508 jnz @F ; if 86 Mode, all segments readable --> 1345 [cpu 286] 0 0000BFEB 0F0027 verr word [bx] 0 0000BFEE 7403E956FF jnz da32_cond ; (NOT to da32_xlatb) 1348 __CPU__ 1349 @@: 1350 %endif 0 0000BFF3 53 push bx 1352 %if _MEMREF_AMOUNT 0 0000BFF4 FF37 push word [bx] ; = segment/selector value 0 0000BFF6 E84C0B call get_free_memref ; memrefs + bx -> the memref structure 0 0000BFF9 8F87[9800] pop word [memrefs + bx + mrSegmentSelector] 0 0000BFFD 808F[9A00]02 or byte [memrefs + bx + mrFlags], mrfMem 0 0000C002 F606[0301]10 testopt [disflags], DIS_I_M_SRC 0 0000C007 7405 jz @F 0 0000C009 808F[9A00]04 or byte [memrefs + bx + mrFlags], mrfMemSource 1360 @@: 0 0000C00E F606[0301]20 testopt [disflags], DIS_I_M_DST 0 0000C013 7405 jz @F 0 0000C015 808F[9A00]08 or byte [memrefs + bx + mrFlags], mrfMemDest 1364 @@: 1365 %endif 1366 1367 %if _40COLUMNS 0 0000C01A B8[F8FF] mov ax, line_out - 8 0 0000C01D 0306[DE00] 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 0000C021 B90200 mov cx, 2 ; if byte then content uses 2 digits 1380 %if _MEMREF_AMOUNT 0 0000C024 C687[9C00]01 mov byte [memrefs + bx + mrLength], 1 1382 ; if byte then length = 1 1383 %endif 0 0000C029 803E[F800]00 cmp byte [rmsize],0 0 0000C02E 7C10 jl da32h ; if byte 0 0000C030 7408 jz da32g ; if word 1387 %if _MEMREF_AMOUNT 0 0000C032 8087[9C00]02 add byte [memrefs + bx + mrLength], 2 1389 ; add 2 bytes to length for high half of dword 1390 %endif 0 0000C037 83C104 add cx, byte 4 ; add 4 digits for high half of dword 1392 da32g: 1393 %if _MEMREF_AMOUNT 0 0000C03A FE87[9C00] inc byte [memrefs + bx + mrLength] 1395 ; add 1 byte to length for the high byte 1396 %endif 0 0000C03E 41 inc cx 0 0000C03F 41 inc cx ; add 2 digits for the high byte 1399 da32h: 0 0000C040 F606[0301]04 testopt [disflags], DIS_I_DOUBLE_M 0 0000C045 740B jz @F 1402 %if _MEMREF_AMOUNT 0 0000C047 8A97[9C00] mov dl, byte [memrefs + bx + mrLength] 0 0000C04B 0097[9C00] add byte [memrefs + bx + mrLength], dl 1405 ; double the amount of bytes 1406 %endif 0 0000C04F 01C9 add cx, cx ; double the amount of digits 0 0000C051 41 inc cx ; plus one slot for the comma 1409 @@: 0 0000C052 F606[0301]02 testopt [disflags], DIS_I_FAR_M 0 0000C057 7408 jz @F 1412 %if _MEMREF_AMOUNT 0 0000C059 8087[9C00]02 add byte [memrefs + bx + mrLength], 2 1414 ; add 2 bytes to the length for the segment 1415 %endif 0 0000C05E 83C105 add cx, 5 ; 4 digits for segment plus 1 colon 1417 @@: 1418 %if _MEMREF_AMOUNT 0 0000C061 FF36[FC00] push word [addrr] 0 0000C065 8F87[9400] pop word [memrefs + bx + mrOffset] 1421 %endif 1422 %if _DISASM_32BIT 0 0000C069 F606[0301]08 testopt [disflags], DIS_I_SHOW_A32 0 0000C06E 7410 jz @F 1425 %if _MEMREF_AMOUNT 0 0000C070 FF36[FE00] push word [addrr + 2] 0 0000C074 8F87[9600] pop word [memrefs + bx + mrOffset + 2] 0 0000C078 808F[9A00]10 or byte [memrefs + bx + mrFlags], mrfA32 1429 %endif 0 0000C07D 83C104 add cx, 4 ; add 4 digits for high word offset 1431 @@: 1432 %endif 1433 %if _MEMREF_AMOUNT 0 0000C080 E8E30A call calc_linear_memref_and_mark_nonfree 1435 %endif 0 0000C083 29C8 sub ax, cx 0 0000C085 E8[0000] call tab_to ; CHG: ax, bx, cx, dx, di 0 0000C088 E8AF0F call showseg_uppercase_ax 1439 ; ax = segment register name 0 0000C08B E8390F call dis_lowercase_refmem_w 0 0000C08E AB stosw 0 0000C08F B03A mov al, ':' 0 0000C091 AA stosb 1444 %if _DISASM_32BIT 0 0000C092 F606[0301]08 testopt [disflags], DIS_I_SHOW_A32 0 0000C097 7406 jz @F 0 0000C099 A1[FE00] mov ax, [addrr + 2] 0 0000C09C E8[0000] call hexword ; show high word of offset 1449 @@: 1450 %endif 0 0000C09F A1[FC00] mov ax, [addrr] 0 0000C0A2 E8[0000] call hexword ; show offset 1453 1454 %if _DISASM_32BIT 0 0000C0A5 F606[0301]08 testopt [disflags], DIS_I_SHOW_A32 0 0000C0AA 7407 jz .isa16option ; if 16-bit addressing --> 0 0000C0AC F606[0100]20 testopt [asm_options], disasm_a32_memref 0 0000C0B1 EB05 jmp .commonoption 1459 .isa16option: 1460 %endif 0 0000C0B3 F606[0100]10 testopt [asm_options], disasm_a16_memref 1462 .commonoption: 0 0000C0B8 7504 jnz @F 0 0000C0BA 5B pop bx 0 0000C0BB E91B01 jmp da32z 1466 @@: 1467 0 0000C0BE B03D mov al,'=' 0 0000C0C0 AA stosb 0 0000C0C1 E8[0000] call putsline 0 0000C0C4 BF[0000] mov di, line_out 1472 ..@uu_referenced_memory_access_start: 0 0000C0C7 5B pop bx 0 0000C0C8 06 push es 0 0000C0C9 8E07 mov es, [bx] 0 0000C0CB 66 _386_o32 0 0000C0CC 8B1E[FC00] mov bx, [addrr] 1478 0 0000C0D0 F606[0301]02 testopt [disflags], DIS_I_FAR_M 0 0000C0D5 743D jz .no_far_m 0 0000C0D7 BE0100 mov si, 1 0 0000C0DA 803E[F800]00 cmp byte [rmsize], 0 0 0000C0DF 7C08 jl @F 0 0000C0E1 BE0200 mov si, 2 0 0000C0E4 7403 jz @F 0 0000C0E6 BE0400 mov si, 4 1487 @@: 1488 %if _DISASM_32BIT 0 0000C0E9 F606[0301]08 testopt [disflags], DIS_I_SHOW_A32 0 0000C0EE 7411 jz @F 1491 [cpu 386] 0 0000C0F0 660FB7F6 movzx esi, si 0 0000C0F4 26678A0433 mov al, byte [es:ebx + esi] 0 0000C0F9 26678A643301 mov ah, byte [es:ebx + esi + 1] 1495 __CPU__ 0 0000C0FF EB07 jmp @FF 1497 @@: 1498 %endif 0 0000C101 268A00 mov al, byte [es:bx + si] 0 0000C104 268A6001 mov ah, byte [es:bx + si + 1] 1501 @@: 0 0000C108 8CC6 mov si, es 0 0000C10A 07 pop es 0 0000C10B 06 push es 0 0000C10C E8[0000] call hexword 0 0000C10F B03A mov al, ':' 0 0000C111 AA stosb 0 0000C112 8EC6 mov es, si 1509 .no_far_m: 1510 0 0000C114 8CC6 mov si, es 1512 %if _DISASM_32BIT 0 0000C116 F606[0301]08 testopt [disflags], DIS_I_SHOW_A32 0 0000C11B 741E jz @F 1515 [cpu 386] 0 0000C11D 26678A03 mov al, [es:ebx] ; avoid a "mov ax,[-1]" 0 0000C121 803E[F800]00 cmp byte [rmsize], 0 0 0000C126 7C38 jl .displaybyte ; if byte --> 0 0000C128 26678A6301 mov ah, [es:ebx + 1] 0 0000C12D 742B jz .displayword ; if word --> 0 0000C12F 26678A5302 mov dl, [es:ebx + 2] ; avoid a "mov dx,[-1]" 0 0000C134 26678A7303 mov dh, [es:ebx + 3] 1523 __CPU__ 0 0000C139 EB18 jmp .displaydword ; is dword --> 1525 @@: 1526 %endif 0 0000C13B 268A07 mov al, [es:bx] ; avoid a "mov ax,[-1]" 0 0000C13E 803E[F800]00 cmp byte [rmsize], 0 0 0000C143 7C1B jl .displaybyte ; if byte 0 0000C145 268A6701 mov ah, [es:bx + 1] 0 0000C149 740F jz .displayword ; if word 0 0000C14B 268A5702 mov dl, [es:bx + 2] ; avoid a "mov dx,[-1]" 0 0000C14F 268A7703 mov dh, [es:bx + 3] 1534 .displaydword: 0 0000C153 07 pop es 0 0000C154 92 xchg ax, dx 0 0000C155 E8[0000] call hexword 0 0000C158 92 xchg ax, dx 0 0000C159 A8 db __TEST_IMM8 ; (skip pop) 1540 .displayword: 0 0000C15A 07 pop es 0 0000C15B E8[0000] call hexword 0 0000C15E EB04 jmp short .displayed ; done 1544 .displaybyte: 0 0000C160 07 pop es 0 0000C161 E8[0000] call hexbyte ; display byte 1547 .displayed: 1548 0 0000C164 F606[0301]04 testopt [disflags], DIS_I_DOUBLE_M 0 0000C169 746E jz .no_double_m 1551 0 0000C16B B02C mov al, ',' 0 0000C16D AA stosb 1554 0 0000C16E 06 push es 0 0000C16F 8EC6 mov es, si 1557 0 0000C171 BE0100 mov si, 1 0 0000C174 803E[F800]00 cmp byte [rmsize], 0 0 0000C179 7C08 jl @F 0 0000C17B BE0200 mov si, 2 0 0000C17E 7403 jz @F 0 0000C180 BE0400 mov si, 4 1564 @@: 1565 %if _DISASM_32BIT 0 0000C183 F606[0301]08 testopt [disflags], DIS_I_SHOW_A32 0 0000C188 7426 jz @F 1568 [cpu 386] 0 0000C18A 660FB7F6 movzx esi, si 0 0000C18E 26678A0433 mov al, [es:ebx + esi] ; avoid a "mov ax,[-1]" 0 0000C193 803E[F800]00 cmp byte [rmsize], 0 0 0000C198 7C3B jl .double_displaybyte ; if byte --> 0 0000C19A 26678A643301 mov ah, [es:ebx + esi + 1] 0 0000C1A0 742D jz .double_displayword ; if word --> 0 0000C1A2 26678A543302 mov dl, [es:ebx + esi + 2] 1576 ; avoid a "mov dx,[-1]" 0 0000C1A8 26678A743303 mov dh, [es:ebx + esi + 3] 1578 __CPU__ 0 0000C1AE EB18 jmp .double_displaydword 1580 @@: 1581 %endif 0 0000C1B0 268A00 mov al, [es:bx + si] ; avoid a "mov ax,[-1]" 0 0000C1B3 803E[F800]00 cmp byte [rmsize], 0 0 0000C1B8 7C1B jl .double_displaybyte ; if byte --> 0 0000C1BA 268A6001 mov ah, [es:bx + si + 1] 0 0000C1BE 740F jz .double_displayword ; if word --> 0 0000C1C0 268A5002 mov dl, [es:bx + si + 2]; avoid a "mov dx,[-1]" 0 0000C1C4 268A7003 mov dh, [es:bx + si + 3] 1589 .double_displaydword: 0 0000C1C8 07 pop es 0 0000C1C9 92 xchg ax, dx 0 0000C1CA E8[0000] call hexword 0 0000C1CD 92 xchg ax, dx 0 0000C1CE A8 db __TEST_IMM8 ; (skip pop) 1595 .double_displayword: 0 0000C1CF 07 pop es 0 0000C1D0 E8[0000] call hexword 0 0000C1D3 EB04 jmp short .double_displayed 1599 .double_displaybyte: 0 0000C1D5 07 pop es 0 0000C1D6 E8[0000] call hexbyte ; display byte 1602 .double_displayed: 1603 .no_double_m: 1604 ..@uu_referenced_memory_access_end: 1605 1606 da32z: 0 0000C1D9 E8[0000] call trimputs ; done with operand list 1608 1609 %if _MEMREF_AMOUNT 1610 set_string_memref: 0 0000C1DC F606[0201]02 test byte [disflags], DIS_F_SHOW 0 0000C1E1 7503 jnz @F 1613 .none_j: 0 0000C1E3 E91E01 jmp .none 1615 @@: 1616 0 0000C1E6 A1[EC00] mov ax, [index] 0 0000C1E9 84E4 test ah, ah 0 0000C1EB 75F6 jnz .none_j 0 0000C1ED BF[0000] mov di, ppbytes.string ; list of string opcodes 0 0000C1F0 B9[0000] mov cx, ppbytes.string_amount 0 0000C1F3 F2AE repne scasb 0 0000C1F5 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 0000C1F7 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 0000C1FB 31D2 xor dx, dx 0 0000C1FD FF36[0000] push word [reg_ecx] 0 0000C201 8F06[D400] pop word [string_memref_counter] 1636 %if _DISASM_32BIT 0 0000C205 F606[E600]20 test byte [presizeflags], PRE32A 0 0000C20A 7404 jz @F ; if 16-bit addressing --> 0 0000C20C 8B16[0200] mov dx, [reg_ecx + 2] ; = ecxh value 1640 @@: 1641 %endif 0 0000C210 8916[D600] mov word [string_memref_counter + 2], dx 1643 0 0000C214 80F904 cmp cl, 4 ; repetition differs for memory content ? 0 0000C217 7203E9A000 jae @F ; no --> 0 0000C21C F606[E400]02 test byte [preflags], PREREP 0 0000C221 7503E99600 jz @F ; if not repeated --> 1648 1649 %if _DISASM_32BIT 0 0000C226 F606[E600]20 test byte [presizeflags], PRE32A 0 0000C22B 7407 jz .isa16option ; if 16-bit addressing --> 0 0000C22D F606[0100]80 testopt [asm_options], disasm_a32_string 0 0000C232 EB05 jmp .commonoption 1654 .isa16option: 1655 %endif 0 0000C234 F606[0100]40 testopt [asm_options], disasm_a16_string 1657 .commonoption: 0 0000C239 750D jnz .optiondone 0 0000C23B C706[D400]0100 mov word [string_memref_counter], 1 0 0000C241 8326[D600]00 and word [string_memref_counter + 2], 0 0 0000C246 EB74 jmp @F 1662 1663 .optiondone: 1664 0 0000C248 01C9 add cx, cx ; 0 = scasd, 2 = scasb, 4 = cmpsd, 6 = cmpsb 1666 %if _DISASM_32BIT 0 0000C24A F606[E600]10 test byte [presizeflags], PRE32D 0 0000C24F 7501 jnz .iso32 1669 %endif 0 0000C251 41 inc cx ; point to word entry, not dword 1671 .iso32: 1672 0 0000C252 01C9 add cx, cx ; table entries are words, so 0..14 1674 0 0000C254 F606[E400]04 test byte [preflags], PREREPZ 0 0000C259 7403 jz .isrepne 0 0000C25B 83C110 add cx, simulate_rep_sca_cmp.table_repe_offset 1678 ; from 0..14 to 16..30 1679 .isrepne: 1680 0 0000C25E 89CB mov bx, cx ; = index into table 0 0000C260 8B97[7801] mov dx, word [bx + simulate_rep_sca_cmp.table] 1683 ; function to call 1684 %if _DISASM_32BIT 0 0000C264 F606[E600]20 test byte [presizeflags], PRE32A 0 0000C269 7401 jz .isa16 ; if 16-bit addressing --> 0 0000C26B 4A dec dx ; a32 prefix is 1 byte lower than table entry 1688 .isa16: 1689 %endif 1690 0 0000C26C 66 _386_o32 0 0000C26D 8B36[0000] mov si, word [reg_esi] 0 0000C271 66 _386_o32 0 0000C272 8B3E[0000] mov di, word [reg_edi] 0 0000C276 66 _386_o32 0 0000C277 8B0E[0000] mov cx, word [reg_ecx] 0 0000C27B 8E06[0000] mov es, word [reg_es] 0 0000C27F 50 push ax 0 0000C280 A810 test al, PP_STRSRC ; cmps ? 0 0000C282 740D jz .issca ; no, no need to load ds --> 1701 0 0000C284 A0[F900] mov al, [segmnt] ; segment number 0 0000C287 98 cbw 0 0000C288 D1E0 shl ax, 1 0 0000C28A 93 xchg ax, bx ; mov bx, ax 0 0000C28B 8B9F[3201] mov bx, word [segrgaddr + bx] 1707 ; si = address of segment/selector reg 0 0000C28F 8E1F mov ds, [bx] 1709 1710 .issca: 0 0000C291 66 _386_o32 0 0000C292 36A1[0000] mov ax, word [ss:reg_eax] 1713 0 0000C296 36F606[0100]04 testopt [ss:reg_efl], 400h 1715 ; DF set ? 0 0000C29C 7401 jz .up 0 0000C29E FD std 1718 .up: 0 0000C29F FFD2 call dx ; simulate the repeated string op 0 0000C2A1 FC cld 0 0000C2A2 16 push ss 0 0000C2A3 1F pop ds 0 0000C2A4 16 push ss 0 0000C2A5 07 pop es 1725 0 0000C2A6 6651 _386 push ecx 0 0000C2A8 59 _386 pop cx 0 0000C2A9 5A _386 pop dx 1729 1730 %if _DISASM_32BIT 0 0000C2AA F606[E600]20 _386 test byte [presizeflags], PRE32A 0 0000C2AF 7502 _386 jnz .count32 ; if 32-bit addressing --> 1733 %endif 0 0000C2B1 31D2 xor dx, dx 1735 .count32: 0 0000C2B3 290E[D400] sub word [string_memref_counter], cx 0 0000C2B7 1916[D600] sbb word [string_memref_counter + 2], dx 1738 0 0000C2BB 58 pop ax 1740 @@: 1741 0 0000C2BC A810 test al, PP_STRSRC 0 0000C2BE 7429 jz .no_src 1744 0 0000C2C0 803E[F900]03 _no386 cmp byte [segmnt], 3 0 0000C2C5 7722 _no386 ja .no_src ; if FS or GS on non-386 --> (invalid) 0 0000C2C7 803E[F900]05 cmp byte [segmnt], 5 0 0000C2CC 771B ja .no_src ; if invalid segment --> 1749 0 0000C2CE 50 push ax 0 0000C2CF A0[F900] mov al, [segmnt] ; segment number 0 0000C2D2 98 cbw 0 0000C2D3 D1E0 shl ax, 1 0 0000C2D5 93 xchg ax, bx ; mov bx, ax 0 0000C2D6 58 pop ax 0 0000C2D7 8BB7[3201] mov si, word [segrgaddr + bx] 1757 ; si = address of segment/selector reg 0 0000C2DB BF[0000] mov di, reg_esi ; di = address of offset reg 0 0000C2DE E8C608 call init_string_memref 1760 @@: ; entry: set memref to string source and mark 1761 ; (jump to .none afterwards if al is zero) 0 0000C2E1 808F[9A00]60 or byte [memrefs + bx + mrFlags], mrfString | mrfStringSource 0 0000C2E6 E87D08 call calc_linear_memref_and_mark_nonfree 1764 1765 .no_src: 0 0000C2E9 A828 test al, PP_STRDEST | PP_STRSRC2 0 0000C2EB 7417 jz .none 0 0000C2ED BE[0000] mov si, reg_es ; si = address of segment/selector reg 0 0000C2F0 BF[0000] mov di, reg_edi ; di = address of offset reg 0 0000C2F3 E8B108 call init_string_memref 0 0000C2F6 A808 test al, PP_STRSRC2 ; alternative string source ? 0 0000C2F8 B000 mov al, 0 ; (cause conditional branch to jump) 0 0000C2FA 75E5 jnz @B ; yes, set as string source --> 0 0000C2FC 808F[9A00]A0 or byte [memrefs + bx + mrFlags], mrfString | mrfStringDest 0 0000C301 E86208 call calc_linear_memref_and_mark_nonfree 1776 1777 .none: 1778 1779 %if _SYMBOLIC 1780 display_symbol_memrefs: 0 0000C304 F606[0200]0C testopt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 0 0000C309 7403E9DB00 jnz .none_memref 1783 0 0000C30E 8B0E[D000] mov cx, [memrefs.free] 0 0000C312 85C9 test cx, cx 0 0000C314 7503E9D000 jz .none_memref 1787 0 0000C319 31F6 xor si, si 1789 .loop_memref: 0 0000C31B 51 push cx 0 0000C31C 56 push si 1792 0 0000C31D 89F3 mov bx, si 0 0000C31F E82708 call get_memref_index_bx 0 0000C322 8B87[9A00] mov ax, word [memrefs + bx + mrFlags] 0 0000C326 BA[0000] mov dx, msg.memrefs_branchdirect 0 0000C329 A801 test al, mrfBranchDirect 0 0000C32B 753D jnz .gotmsg 1799 0 0000C32D F606[0201]02 test byte [disflags], DIS_F_SHOW 0 0000C332 7503E9A800 jz .next_memref 1802 0 0000C337 BA[0000] mov dx, msg.memrefs_stringsource 0 0000C33A A840 test al, mrfStringSource 0 0000C33C 752C jnz .gotmsg 0 0000C33E BA[0000] mov dx, msg.memrefs_stringdest 0 0000C341 A880 test al, mrfStringDest 0 0000C343 7525 jnz .gotmsg 0 0000C345 88C2 mov dl, al 0 0000C347 80E20C and dl, mrfMemSource | mrfMemDest 0 0000C34A 80FA0C cmp dl, mrfMemSource | mrfMemDest 0 0000C34D BA[0000] mov dx, msg.memrefs_memsourcedest 0 0000C350 7418 je .gotmsg 0 0000C352 BA[0000] mov dx, msg.memrefs_memsource 0 0000C355 A804 test al, mrfMemSource 0 0000C357 7511 jnz .gotmsg 0 0000C359 BA[0000] mov dx, msg.memrefs_memdest 0 0000C35C A808 test al, mrfMemDest 0 0000C35E 750A jnz .gotmsg 0 0000C360 BA[0000] mov dx, msg.memrefs_mem_unknown 0 0000C363 A802 test al, mrfMem 0 0000C365 7503 jnz .gotmsg 0 0000C367 BA[0000] 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 0 0000C36A 52 push dx 0 0000C36B 8B87[9000] mov ax, [memrefs + bx + mrLinear] 0 0000C36F 8B97[9200] mov dx, [memrefs + bx + mrLinear + 2] 1833 0 0000C373 89D1 mov cx, dx 0 0000C375 89C3 mov bx, ax 0 0000C377 E8[0000]EB02[0000] nearcall binsearchmain ; search for matching symbol 0 0000C37E 5A pop dx 0 0000C37F E35A jcxz .no_symbol 1839 .loop_symbol: 0 0000C381 E8[0000] call putsz 0 0000C384 53 push bx 0 0000C385 E8[0000]EB02[0000] dualcall displaystring 0 0000C38C 53 push bx 0 0000C38D 50 push ax 0 0000C38E E8[0000]EB02[0000] dualcall getfarpointer.main 0 0000C395 5F pop di 0 0000C396 07 pop es 1848 0 0000C397 5E pop si 0 0000C398 56 push si 1851 0 0000C399 52 push dx 1853 0 0000C39A 53 push bx 0 0000C39B 89F3 mov bx, si 0 0000C39D E8A907 call get_memref_index_bx 0 0000C3A0 8B97[9600] mov dx, word [memrefs + bx + mrOffset + 2] 0 0000C3A4 8B87[9400] mov ax, word [memrefs + bx + mrOffset] 1859 0 0000C3A8 263B5506 cmp dx, word [es:di + smOffset + 2] 0 0000C3AC BA[0000] mov dx, msg.memref_after_symbol.non_wrt 0 0000C3AF 7506 jne .wrt_symbol 0 0000C3B1 263B4504 cmp ax, word [es:di + smOffset] 0 0000C3B5 741C je .non_wrt_symbol 1865 .wrt_symbol: 0 0000C3B7 BA[0000] mov dx, msg.memref_between_symbol.wrt 0 0000C3BA E8[0000] call disp_message 0 0000C3BD 16 push ss 0 0000C3BE 07 pop es 0 0000C3BF BF[0000] mov di, line_out 0 0000C3C2 8B87[9800] mov ax, word [memrefs + bx + mrSegmentSelector] 0 0000C3C6 E8[0000] call hexword 0 0000C3C9 53 push bx 0 0000C3CA 51 push cx 0 0000C3CB E8[0000] call putsline 0 0000C3CE 59 pop cx 0 0000C3CF 5B pop bx 0 0000C3D0 BA[0000] mov dx, msg.memref_after_symbol.wrt 1879 .non_wrt_symbol: 0 0000C3D3 E8[0000] call disp_message 1881 0 0000C3D6 5B pop bx 0 0000C3D7 5A pop dx 1884 .next_symbol: 0 0000C3D8 43 inc bx 0 0000C3D9 E2A6 loop .loop_symbol 1887 1888 .no_symbol: 0 0000C3DB 16 push ss 0 0000C3DC 07 pop es 0 0000C3DD 16 push ss 0 0000C3DE 1F pop ds 1893 1894 .next_memref: 0 0000C3DF 5E pop si 0 0000C3E0 59 pop cx 0 0000C3E1 46 inc si 0 0000C3E2 E202 loop .loop_memref_j 0 0000C3E4 EB03 jmp .none_memref 1900 1901 .loop_memref_j: 0 0000C3E6 E932FF 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 0 0000C3E9 F606[0200]0C testopt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 0 0000C3EE 7403E99F00 jnz .no_sym_between 1986 0 0000C3F3 8B1E[0400] mov bx, word [u_addr + 4] 0 0000C3F7 66 _386_PM_o32 0 0000C3F8 8B16[0000] mov dx, word [u_addr] 0 0000C3FC E8[0000] call getlinear_32bit 0 0000C3FF 7303E98E00 jc .no_sym_between 1992 1993 ; push dx 0 0000C404 50 push ax ; linear after instruction 1995 0 0000C405 87D1 xchg dx, cx 0 0000C407 93 xchg ax, bx 1998 0 0000C408 83EB01 sub bx, 1 0 0000C40B 83D900 sbb cx, 0 ; cx:bx = end of range 2001 0 0000C40E 8B16[DA00] mov dx, word [u_lin_start + 2] 0 0000C412 A1[D800] mov ax, word [u_lin_start] 0 0000C415 83C001 add ax, 1 0 0000C418 83D200 adc dx, 0 ; dx:ax = start of range 2006 0 0000C41B E8[0000]EB02[0000] nearcall binsearchmain 0 0000C422 58 pop ax 2009 ; pop dx ; dx:ax = linear after instruction 0 0000C423 E36D jcxz .no_sym_between 2011 2012 .loop_sym_between: 2013 ; push dx 0 0000C425 50 push ax 0 0000C426 53 push bx 0 0000C427 E8[0000]EB02[0000] dualcall displaystring 0 0000C42E 58 pop ax 2018 ; pop dx 2019 0 0000C42F 53 push bx 0 0000C430 50 push ax ; (reserve space, uninitialised) 0 0000C431 E8[0000]EB02[0000] dualcall getfarpointer.main 0 0000C438 5F pop di 0 0000C439 07 pop es 2025 2026 ; push dx 0 0000C43A 50 push ax 0 0000C43B 262B05 sub ax, word [es:di + smLinear] 2029 ; sbb dx, word [es:di + smLinear + 2] 2030 2031 ; push dx 0 0000C43E 50 push ax 0 0000C43F 31D2 xor dx, dx 0 0000C441 26034504 add ax, word [es:di + smOffset] 0 0000C445 26135506 adc dx, word [es:di + smOffset + 2] 0 0000C449 3916[0200] cmp word [u_addr + 2], dx 0 0000C44D BA[0000] mov dx, msg.uu_after_symbol_between_1.non_wrt 0 0000C450 7506 jne .sym_between.wrt 0 0000C452 3906[0000] cmp word [u_addr], ax 0 0000C456 741B je .sym_between.not_wrt 2041 .sym_between.wrt: 0 0000C458 BA[0000] mov dx, msg.uu_after_symbol_between_1.wrt 0 0000C45B E8[0000] call disp_message 2044 0 0000C45E 16 push ss 0 0000C45F 07 pop es 0 0000C460 BF[0000] mov di, line_out 0 0000C463 A1[0400] mov ax, word [u_addr + 4] 0 0000C466 E8[0000] call hexword 0 0000C469 53 push bx 0 0000C46A 51 push cx 0 0000C46B E8[0000] call putsline 0 0000C46E 59 pop cx 0 0000C46F 5B pop bx 2055 0 0000C470 BA[0000] mov dx, msg.uu_after_symbol_between_2.wrt 2057 .sym_between.not_wrt: 0 0000C473 E8[0000] call disp_message 0 0000C476 58 pop ax 2060 ; pop dx 2061 0 0000C477 16 push ss 0 0000C478 07 pop es 0 0000C479 57 push di 0 0000C47A 53 push bx 0 0000C47B 51 push cx 0 0000C47C BF[0000] mov di, line_out 0 0000C47F E8[0000] call decword 0 0000C482 E8[0000] call putsline 0 0000C485 59 pop cx 0 0000C486 5B pop bx 0 0000C487 5F pop di 0 0000C488 58 pop ax 2074 ; pop dx 2075 2076 ; push dx 0 0000C489 BA[0000] mov dx, msg.uu_after_symbol_between_3 0 0000C48C E8[0000] call disp_message 2079 ; pop dx 2080 0 0000C48F 43 inc bx 0 0000C490 E293 loop .loop_sym_between 2083 .no_sym_between: 0 0000C492 16 push ss 0 0000C493 07 pop es 2086 %endif 2087 0 0000C494 A0[0201] mov al, [disflags] 2089 %if _IMMASM 0 0000C497 F606[0300]02 testopt [internalflags6], dif6_immasm 0 0000C49C 7404 jz .notimmasm 0 0000C49E A808 test al, DIS_I_UNUSED 0 0000C4A0 753E jnz @F ; if " (unused)" was displayed --> 2094 .notimmasm: 2095 %endif 0 0000C4A2 A801 test al, DIS_F_REPT 0 0000C4A4 7453 jz @FF ; if not repeating --> 0 0000C4A6 A808 test al, DIS_I_UNUSED 0 0000C4A8 7536 jnz @F ; if " (unused)" was displayed --> 0 0000C4AA A840 test al, DIS_I_MOV_SS 0 0000C4AC A1[EC00] mov ax, [index] 0 0000C4AF 740C jz .not_mov_to_ss ; not mov to ss --> 2103 0 0000C4B1 F606[0000]80 testopt [asm_options], disasm_nec 0 0000C4B6 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 0000C4B8 3D8E00 cmp ax, 8Eh ; move to seg reg? 0 0000C4BB 7423 je @F ; yes, it is mov to ss --> 2110 .not_mov_to_ss: 2111 0 0000C4BD 3D[0000] cmp ax, SGROUP4 + 0 ; pop r/m ? 0 0000C4C0 7507 jne .not_pop_rm 0 0000C4C2 803E[0000]C0 cmp byte [regmem], 1100_0000b 2115 ; long-form pop reg ? 0 0000C4C7 7317 jae @F ; yes --> 2117 .not_pop_rm: 2118 0 0000C4C9 84E4 test ah, ah 0 0000C4CB 752D jnz .not_single_byte_opcode 2121 0 0000C4CD BF[6601] mov di, single_byte_opcodes_repeat_disassembly 0 0000C4D0 B90F00 mov cx, single_byte_opcodes_repeat_disassembly.length 0 0000C4D3 F606[0000]80 testopt [asm_options], disasm_nec 0 0000C4D8 7402 jz .not_nec 2126 %if single_byte_opcodes_repeat_disassembly.length_nec == single_byte_opcodes_repeat_disassembly.length + 2 0 0000C4DA 41 inc cx 0 0000C4DB 41 inc cx 2130 %else 2131 mov cx, single_byte_opcodes_repeat_disassembly.length_nec 2132 %endif 2133 .not_nec: 0 0000C4DC F2AE repne scasb 0 0000C4DE 751A jne @FFF 2136 @@: 0 0000C4E0 8326[0201]03 and word [disflags], DIS_F_REPT|DIS_F_SHOW 0 0000C4E5 FE06[0501] inc byte [disrepeatcount] 0 0000C4E9 803E[0501]10 cmp byte [disrepeatcount], 16 0 0000C4EE 7303E988F5 jb disasm.preserve_disrepeatcount 2141 0 0000C4F3 BA[0000] mov dx, msg.uu_too_many_repeat 0 0000C4F6 E8[0000] call putsz 2144 @@: 0 0000C4F9 C3 retn 2146 2147 @@: 2148 .not_single_byte_opcode: 2149 0 0000C4FA 8A3E[E800] mov bh, byte [disp8] 0 0000C4FE 3DEB00 cmp ax, 0EBh ; unconditional short jump ? 0 0000C501 74F6 je @BB ; yes, return --> 0 0000C503 66 _386_PM_o32 ; and dword [dis_n], byte 0 0 0000C504 8326[E000]00 and word [dis_n], byte 0 0 0000C509 E8200C call disgetbyte 0 0000C50C B302 mov bl, 2 ; displacement to skip a jmp short 0 0000C50E 3CEB cmp al, 0EBh ; jmp short ? 0 0000C510 740F je @F ; yes --> 0 0000C512 B303 mov bl, 3 ; displacement to skip a 16-bit jmp near 0 0000C514 3CE9 cmp al, 0E9h ; jmp near ? 0 0000C516 75E1 jne @BB ; no, return --> 2162 %if _PM 2163 %if _DISASM_32BIT 0 0000C518 F606[0000]40 test byte [bCSAttr], 40h ; 32-bit code segment ? 0 0000C51D 7402 jz @F ; no, 16-bit, use displacement 3 --> 0 0000C51F B305 mov bl, 5 ; displacement to skip a 32-bit jmp near 2167 %endif 2168 %endif 2169 @@: 0 0000C521 38DF cmp bh, bl ; right displacement ? 0 0000C523 75D4 jne @BBB ; no --> 2172 0 0000C525 8326[0201]03 and word [disflags], DIS_F_REPT|DIS_F_SHOW 2174 %if _LINK 0 0000C52A 8136[0C01][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 0000C530 E94DF5 jmp disasm.preserve_condmsg_and_disrepeatcount 2185 2186 2187 %if _MEMREF_AMOUNT 2188 simulate_rep_sca_cmp: 2189 2190 ..@uu_simulate_scas_start: 0 0000C533 67 _386_a32 2192 .repne_scasd: 0 0000C534 66 _386_o32 0 0000C535 F2 repne 0 0000C536 AF scasw 0 0000C537 C3 retn 2197 0 0000C538 67 _386_a32 2199 .repne_scasw: 0 0000C539 F2AF repne scasw 0 0000C53B C3 retn 2202 0 0000C53C 67 _386_a32 2204 .repne_scasb: 0 0000C53D F2AE repne scasb 0 0000C53F C3 retn 2207 0 0000C540 67 _386_a32 2209 .repe_scasd: 0 0000C541 66 _386_o32 0 0000C542 F3 repe 0 0000C543 AF scasw 0 0000C544 C3 retn 2214 0 0000C545 67 _386_a32 2216 .repe_scasw: 0 0000C546 F3AF repe scasw 0 0000C548 C3 retn 2219 0 0000C549 67 _386_a32 2221 .repe_scasb: 0 0000C54A F3AE repe scasb 0 0000C54C C3 retn 2224 ..@uu_simulate_scas_end: 2225 2226 ..@uu_simulate_cmps_start: 0 0000C54D 67 _386_a32 2228 .repne_cmpsd: 0 0000C54E 66 _386_o32 0 0000C54F F2 repne 0 0000C550 A7 cmpsw 0 0000C551 C3 retn 2233 0 0000C552 67 _386_a32 2235 .repne_cmpsw: 0 0000C553 F2A7 repne cmpsw 0 0000C555 C3 retn 2238 0 0000C556 67 _386_a32 2240 .repne_cmpsb: 0 0000C557 F2A6 repne cmpsb 0 0000C559 C3 retn 2243 0 0000C55A 67 _386_a32 2245 .repe_cmpsd: 0 0000C55B 66 _386_o32 0 0000C55C F3 repe 0 0000C55D A7 cmpsw 0 0000C55E C3 retn 2250 0 0000C55F 67 _386_a32 2252 .repe_cmpsw: 0 0000C560 F3A7 repe cmpsw 0 0000C562 C3 retn 2255 0 0000C563 67 _386_a32 2257 .repe_cmpsb: 0 0000C564 F3A6 repe cmpsb 0 0000C566 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 000077E7 00 align 2, db 0 2265 .table: 0 000077E8 [8A0B] dw .repne_scasd 0 000077EA [8F0B] dw .repne_scasw 0 000077EC [930B] dw .repne_scasb 0 000077EE [930B] dw .repne_scasb 0 000077F0 [A40B] dw .repne_cmpsd 0 000077F2 [A90B] dw .repne_cmpsw 0 000077F4 [AD0B] dw .repne_cmpsb 0 000077F6 [AD0B] dw .repne_cmpsb 2274 .table_repe_offset: equ $ - .table 0 000077F8 [970B] dw .repe_scasd 0 000077FA [9C0B] dw .repe_scasw 0 000077FC [A00B] dw .repe_scasb 0 000077FE [A00B] dw .repe_scasb 0 00007800 [B10B] dw .repe_cmpsd 0 00007802 [B60B] dw .repe_cmpsw 0 00007804 [BA0B] dw .repe_cmpsb 0 00007806 [BA0B] dw .repe_cmpsb 2283 2284 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 0000C567 F606[0201]10 test byte [disflags], DIS_I_SHOWSIZ 0 0000C56C 7532 jnz dop_imm 0 0000C56E 84E4 test ah, ah 0 0000C570 782E js dop_imm ; if byte --> 0 0000C572 91 xchg ax, cx ; ch = size 0 0000C573 741E je .16 2298 .32: 0 0000C575 E8D00B call disgetword ; ax = low word 0 0000C578 92 xchg ax, dx ; dx = low word 0 0000C579 E8CC0B call disgetword ; ax = high word 0 0000C57C 92 xchg ax, dx ; dx:ax = dword 2303 0 0000C57D 50 push ax ; stack -> low word 0 0000C57E E80B00 call .checkword 0 0000C581 7502 jne @F ; cannot be imms8 0 0000C583 39D0 cmp ax, dx 2308 @@: 0 0000C585 E8C60A call showsize_ch_flag_ZR; if can be imms8, show size keyword 0 0000C588 92 xchg ax, dx ; ax = high word 0 0000C589 E91A0B jmp disp32.stack 2312 2313 .checkword: 0 0000C58C B107 mov cl, 7 0 0000C58E D2F8 sar al, cl ; = -1 if negative imms8, 0 if positive 0 0000C590 38E0 cmp al, ah ; ZR if imms16 in imms8 range 0 0000C592 C3 retn 2318 2319 .16: 0 0000C593 E8B20B call disgetword ; ax = word 0 0000C596 50 push ax ; stack -> word 0 0000C597 E8F2FF call .checkword 0 0000C59A E8B10A call showsize_ch_flag_ZR; if can be imms8, show size keyword 0 0000C59D E9090B jmp disp32.low_stack 2325 2326 2327 dop_imm: 0 0000C5A0 80FC00 cmp ah, 0 0 0000C5A3 7C1A jl dop03 ; if just a byte --> 0 0000C5A5 9C pushf 0 0000C5A6 F606[0201]10 test byte [disflags], DIS_I_SHOWSIZ 0 0000C5AB 7403 jz .nosize ; if we don't need to show the size --> 0 0000C5AD E8A60A call showsize 2334 .nosize: 0 0000C5B0 E8950B call disgetword 2336 %if _IMMASM 0 0000C5B3 A3[0000] mov word [immasm_imm16], ax 2338 %endif 0 0000C5B6 9D popf ; ZF 0 0000C5B7 7503E9[0000] je hexword ; if just a word 0 0000C5BC E9E30A jmp disp32.ax 2342 2343 dop03: 0 0000C5BF E86A0B call disgetbyte ; print immediate byte 0 0000C5C2 E9[0000] jmp hexbyte 2346 2347 2348 ; Memory offset reference (OP_MOFFS) 2349 2350 dop_moffs: 0 0000C5C5 B005 mov al, 5 2352 %if _DISASM_32BIT 0 0000C5C7 F606[E600]20 test byte [presizeflags], PRE32A 0 0000C5CC 7501 jnz .32 ; if 32-bit addressing --> 2355 %endif 0 0000C5CE 40 inc ax 2357 .32: 0 0000C5CF A2[0000] mov [regmem], al 0 0000C5D2 EB13 jmp s dop05 2360 2361 2362 ; MOD R/M (OP_RM) 2363 2364 dop_rm: 0 0000C5D4 E8C109 call getregmem 0 0000C5D7 3CC0 cmp al,0c0h 0 0000C5D9 7203E9D902 jae dop33 ; if pure register reference --> 2368 0 0000C5DE F606[0301]40 testopt [disflags], DIS_I_M_ALWAYS_16 0 0000C5E3 7402 jz @F 0 0000C5E5 B400 mov ah, 0 ; word size (m16) 2372 @@: 2373 2374 dop05: ; <--- used by OP_M, OP_M64, OP_M80, OP_MOFFS 0 0000C5E7 8826[F800] mov byte [rmsize], ah ; save r/m size 0 0000C5EB F606[0301]01 testopt [disflags], DIS_I_NOSIZ 0 0000C5F0 7506 jnz @F 0 0000C5F2 E8610A call showsize ; print out size 0 0000C5F5 E8950A call showptr ; append "PTR " (if not NASM syntax) 2380 @@: 2381 dop06: ; <--- used by OP_MXX, OP_MFLOAT, OP_MDOUBLE 0 0000C5F8 800E[E500]01 or byte [preused],PRESEG ; needed even if there's no segment override 2383 ; because handling of LOCK prefix relies on it 0 0000C5FD B05B mov al, '[' 0 0000C5FF E89302 call stosb_nasm 2386 0 0000C602 F606[E400]01 test byte [preflags],PRESEG 0 0000C607 7406 jz dop07 ;if no segment override 0 0000C609 E83A0A call showseg ;print segment name 0 0000C60C B03A mov al,':' 0 0000C60E AA stosb 2392 dop07: 0 0000C60F A0[0000] mov al,[regmem] 0 0000C612 24C7 and al,0c7h 0 0000C614 800E[E500]20 or byte [preused],PREASIZE 2396 %if _DISASM_32BIT 0 0000C619 F606[E600]20 test byte [presizeflags],PRE32A 0 0000C61E 7403E9EA00 jnz dop18 ;if 32-bit addressing 2399 %endif 0 0000C623 800E[0201]04 or byte [disflags],DIS_I_SHOW ;we'd like to show this address 0 0000C628 8326[FC00]00 and word [addrr], 0 ; zero out the address initially 0 0000C62D 93 xchg ax,bx ;mov bx,ax 0 0000C62E E85702 call store_opensqubracket 0 0000C631 80FB06 cmp bl,6 0 0000C634 7503E9B200 je dop16 ;if [xxxx] 0 0000C639 83E307 and bx,7 0 0000C63C 8A9F[1A01] mov bl,[rmtab+bx] 0 0000C640 F6C308 test bl,8 0 0000C643 7525 jnz dop09 ;if BX 0 0000C645 F6C304 test bl,4 0 0000C648 7436 jz dop11 ;if not BP 0 0000C64A B84250 mov ax,'BP' 0 0000C64D 8B0E[0000] mov cx,[reg_ebp] 0 0000C651 E80A00 call da_set_default_ss 0 0000C654 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 0000C656 3C08 cmp al, 2 * 4 0 0000C658 7404 je @F 0 0000C65A 3C0A cmp al, 2 * 5 0 0000C65C 750B jne @FF 2431 @@: 2432 da_set_default_ss: 0 0000C65E F606[E400]01 test byte [preflags], PRESEG 0 0000C663 7504 jnz @F ; if segment override --> 0 0000C665 FE0E[F900] dec byte [segmnt] ; default is now SS 2436 @@: 0 0000C669 C3 retn 2438 2439 2440 dop09: 0 0000C66A B84258 mov ax,'BX' ;BX 0 0000C66D 8B0E[0000] mov cx,[reg_ebx] 2443 2444 dop10: 0 0000C671 890E[FC00] mov [addrr],cx ;print it out, etc. 0 0000C675 E8D109 call dis_stosw_lowercase 0 0000C678 F6C303 test bl,2+1 0 0000C67B 741C jz dop13 ;if done 0 0000C67D B02B mov al,'+' 0 0000C67F AA stosb 2451 dop11: 0 0000C680 B85349 mov ax,'SI' 0 0000C683 8B0E[0000] mov cx,[reg_esi] 0 0000C687 F6C301 test bl,1 0 0000C68A 7406 jz dop12 ;if SI 0 0000C68C B044 mov al,'D' ;DI 0 0000C68E 8B0E[0000] mov cx,[reg_edi] 2458 2459 dop12: 0 0000C692 010E[FC00] add [addrr], cx ; print it out, etc. 0 0000C696 E8B009 call dis_stosw_lowercase 2462 dop13: 0 0000C699 F606[0000]C0 test byte [regmem], 0C0h 0 0000C69E 7455 jz s dop17 ; if no displacement --> 0 0000C6A0 F606[0000]80 test byte [regmem], 80h 0 0000C6A5 752D jnz dop15 ; if word displacement --> 0 0000C6A7 E8820A call disgetbyte 0 0000C6AA 98 cbw 0 0000C6AB 0106[FC00] add [addrr], ax 2470 0 0000C6AF 80FB04 cmp bl, 4 ; BP only ? 0 0000C6B2 740E je @F ; yes, do not display "BYTE" size --> 0 0000C6B4 84C0 test al, al 0 0000C6B6 750A jnz @F 0 0000C6B8 B02B mov al, '+' 0 0000C6BA AA stosb 0 0000C6BB E8AC09 call showsize.byte 0 0000C6BE B000 mov al, 0 0 0000C6C0 EB0D jmp @FF 2480 @@: 2481 0 0000C6C2 3C00 cmp al, 0 0 0000C6C4 B42B mov ah, '+' 0 0000C6C6 7D04 jge dop14 ; if not negative --> 0 0000C6C8 B42D mov ah, '-' 0 0000C6CA F6D8 neg al 2487 dop14: 0 0000C6CC 8825 mov [di], ah 0 0000C6CE 47 inc di 2490 @@: 0 0000C6CF E8[0000] call hexbyte ; print the byte displacement 0 0000C6D2 EB21 jmp s dop17 ; done --> 2493 2494 dop15: 0 0000C6D4 B02B mov al, '+' 0 0000C6D6 AA stosb 2497 0 0000C6D7 E86E0A call disgetword 0 0000C6DA 83F87F cmp ax, 127 0 0000C6DD 7F0A jg @F 0 0000C6DF 83F880 cmp ax, -128 0 0000C6E2 7C05 jl @F 0 0000C6E4 50 push ax 0 0000C6E5 E89309 call showsize.word 0 0000C6E8 58 pop ax 2506 @@: 0 0000C6E9 EB03 jmp @F 2508 dop16: 0 0000C6EB E85A0A call disgetword 2510 @@: 0 0000C6EE 0106[FC00] add [addrr], ax 0 0000C6F2 E8[0000] call hexword ; print word displacement 2513 2514 dop17: 0 0000C6F5 B05D mov al, ']' 0 0000C6F7 AA stosb 0 0000C6F8 C3 retn 2518 2519 2520 getsibbyte: 0 0000C6F9 A0[0000] mov al, [sibbyte] ; init if we already read it 0 0000C6FC D006[E900] rol byte [gotsib], 1 ; have it already ? 0 0000C700 720A jc .ret ; yes --> 0 0000C702 F616[E900] not byte [gotsib] ; save that we have it 0 0000C706 E8230A call disgetbyte ; get SIB byte 0 0000C709 A2[0000] mov [sibbyte], al ; save it 2527 .ret: 0 0000C70C C3 retn 2529 2530 2531 %if _DISASM_32BIT 2532 ; 32-bit MOD REG R/M addressing. 2533 2534 dop18: 0 0000C70D 810E[0201]0408 or word [disflags], DIS_I_SHOW | DIS_I_SHOW_A32 0 0000C713 8326[FC00]00 and word [addrr], 0 0 0000C718 8326[FE00]00 and word [addrr + 2], 0 ; zero out the address initially 0 0000C71D 3C05 cmp al, 5 ; mod=0 and r/m=5 ? 0 0000C71F 7503E9AF00 je dop19 ; yes, just a disp32 address --> 0 0000C724 50 push ax 0 0000C725 2407 and al, 7 0 0000C727 3C04 cmp al, 4 0 0000C729 7503 jne dop20 ; if no SIB --> 0 0000C72B E8CBFF call getsibbyte 2545 dop20: 0 0000C72E 58 pop ax 0 0000C72F A880 test al, 80h 0 0000C731 754C jnz dop22 ; if disp32 --> 0 0000C733 A840 test al, 40h 0 0000C735 7467 jz dop23 ; if no disp8 --> 2551 0 0000C737 E8F209 call disgetbyte 0 0000C73A 84C0 test al, al 0 0000C73C 7509 jnz @F 0 0000C73E 50 push ax 0 0000C73F 893E[0801] mov word [uu_a32_size_byte_keyword], di 0 0000C743 E82409 call showsize.byte 0 0000C746 58 pop ax 2559 @@: 2560 0 0000C747 98 cbw 0 0000C748 99 cwd 0 0000C749 0106[FC00] add word [addrr], ax 0 0000C74D 1116[FE00] adc word [addrr + 2], dx 2565 0 0000C751 3C00 cmp al, 0 0 0000C753 7D06 jge dop21 ; if not negative --> 0 0000C755 F6D8 neg al 0 0000C757 C6052D mov byte [di], '-' 0 0000C75A 47 inc di 2571 dop21: 0 0000C75B E8[0000] call hexbyte 0 0000C75E EB3B jmp s dop22a ; done --> 2574 2575 2576 disp32_add_to_addrr_dword_size: 0 0000C760 893E[0A01] mov word [uu_a32_size_dword_keyword], di 0 0000C764 E80E09 call showsize.dword 2579 disp32_add_to_addrr: 0 0000C767 E8DE09 call disgetword 0 0000C76A 0106[FC00] add word [addrr], ax 0 0000C76E 50 push ax 0 0000C76F 9C pushf 0 0000C770 E8D509 call disgetword 0 0000C773 9D popf 0 0000C774 1106[FE00] adc word [addrr + 2], ax 0 0000C778 E8[0000] call hexword 0 0000C77B 58 pop ax 0 0000C77C E9[0000] jmp hexword 2590 2591 dop22: 0 0000C77F E8DEFF call disp32_add_to_addrr_dword_size 2593 ; print disp32 0 0000C782 83F87F cmp ax, 127 0 0000C785 7F14 jg @F 0 0000C787 83F880 cmp ax, -128 0 0000C78A 7C0F jl @F 0 0000C78C B10F mov cl, 15 0 0000C78E D3F8 sar ax, cl 0 0000C790 3906[FE00] cmp word [addrr + 2], ax 0 0000C794 7505 jne @F 0 0000C796 8326[0A01]00 and word [uu_a32_size_dword_keyword], 0 2603 @@: 2604 2605 dop22a: 0 0000C79B E8F500 call store_plus 2607 2608 dop23: 0 0000C79E A0[0000] mov al,[regmem] 0 0000C7A1 2407 and al,7 0 0000C7A3 3C04 cmp al,4 0 0000C7A5 7403E9CD00 jne dop28 ;if no SIB 0 0000C7AA A0[0000] mov al, [sibbyte] 0 0000C7AD 88C4 mov ah, al 0 0000C7AF 250738 and ax, 00_111_000_00_000_111b 2616 ; ah = index << 3, al = base 0 0000C7B2 80FC20 cmp ah, 4 << 3 ; index encodes esp ? 0 0000C7B5 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 0000C7B7 E80700 call dop_is_mod_0_and_base_5 0 0000C7BA 7559 jnz dop24 ; if not mod=0 base=5 --> 0 0000C7BC E8A8FF call disp32_add_to_addrr; show 32-bit displacement instead of [EBP] 0 0000C7BF 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 0000C7C1 3C05 cmp al, 5 0 0000C7C3 7505 jne @F ; NZ if not base=5 --> 0 0000C7C5 F606[0000]C0 test byte [regmem], 1100_0000b 2646 ; NZ if not mod=0 2647 @@: 0 0000C7CA 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 0000C7CB E8F3FF call dop_is_mod_0_and_base_5 0 0000C7CE 7403E9A400 jnz dop28 ; if not mod=0 base=5 --> 2671 ; fall through to dop19 2672 2673 dop19: 0 0000C7D3 E8B200 call store_opensqubracket 0 0000C7D6 E887FF call disp32_add_to_addrr_dword_size 2676 ; display 32-bit offset 0 0000C7D9 833E[FE00]01 cmp word [addrr + 2], 1 ; >= 64 KiB ? 0 0000C7DE 7305 jae @F ; yes, delete keyword --> 0 0000C7E0 8326[0A01]00 and word [uu_a32_size_dword_keyword], 0 2680 ; no, do not delete keyword 2681 @@: 0 0000C7E5 EB6E jmp dop27 2683 2684 dop_store_and_add_base_reg32: 0 0000C7E7 E89200 call store_opensqubracket_e 0 0000C7EA E8C008 call showreg16 0 0000C7ED E866FE call da_set_default_ss_if_esp_ebp 0 0000C7F0 3C0A cmp al, 5 * 2 ; ebp ? 0 0000C7F2 7405 je @F ; yes, delete BYTE --> 0 0000C7F4 8326[0801]00 and word [uu_a32_size_byte_keyword], 0 2691 ; do not delete BYTE 2692 @@: 2693 add_reg32_to_addrr: 0 0000C7F9 B90100 mov cx, 1 2695 add_reg32_times_cx_to_addrr: 0 0000C7FC 50 push ax 0 0000C7FD 53 push bx 0 0000C7FE 93 xchg ax, bx 0 0000C7FF 8B9F[2201] mov bx, word [reg32addr + bx] 2700 @@: 0 0000C803 8B07 mov ax, word [bx] 0 0000C805 0106[FC00] add word [addrr], ax 0 0000C809 8B4702 mov ax, word [bx + 2] 0 0000C80C 1106[FE00] adc word [addrr + 2], ax 0 0000C810 E2F1 loop @B 0 0000C812 5B pop bx 0 0000C813 58 pop ax 0 0000C814 C3 retn 2709 2710 dop24: 0 0000C815 E8CFFF call dop_store_and_add_base_reg32 0 0000C818 B05D mov al, ']' 0 0000C81A E86D00 call stosb_notnasm 2714 dop25: 0 0000C81D E87300 call store_plus 2716 0 0000C820 A0[0000] mov al, [sibbyte] 0 0000C823 E86B07 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 0000C826 E85300 call store_opensqubracket_e 2723 0 0000C829 8A26[0000] mov ah, [sibbyte] 0 0000C82D B90100 mov cx, 1 0 0000C830 F6C4C0 test ah, 0C0h 0 0000C833 740F jz @F 0 0000C835 41 inc cx 0 0000C836 F6C480 test ah, 80h 0 0000C839 7409 jz @F 0 0000C83B B104 mov cl, 4 0 0000C83D F6C440 test ah, 40h 0 0000C840 7402 jz @F 0 0000C842 B108 mov cl, 8 2735 @@: 2736 0 0000C844 E86608 call showreg16 0 0000C847 51 push cx 0 0000C848 E8B1FF call add_reg32_times_cx_to_addrr 0 0000C84B 59 pop cx 0 0000C84C 49 dec cx ; = 0-based scale 2742 ; jz dop27 ; if scale == 1 (S=00b) --> 0 0000C84D B02A mov al, '*' 0 0000C84F AA stosb 0 0000C850 88C8 mov al, cl 0 0000C852 0431 add al, '1' ; from 0-based to '1'-based 2747 dop26: 0 0000C854 AA stosb 2749 dop27: 0 0000C855 8B0E[0801] mov cx, word [uu_a32_size_byte_keyword] 2751 ; -> size keyword, or zero if none 0 0000C859 E302 jcxz @F ; if there was no size given --> 0 0000C85B EB06 jmp .delete 2754 @@: 0 0000C85D 8B0E[0A01] mov cx, word [uu_a32_size_dword_keyword] 2756 ; -> size keyword, or zero if none 0 0000C861 E311 jcxz @F ; if there was no size given --> 2758 .delete: 0 0000C863 56 push si 0 0000C864 87CF xchg cx, di ; di -> size keyword, cx -> behind disassembly 0 0000C866 89FE mov si, di ; si -> size keyword 0 0000C868 B020 mov al, 32 ; scan for next blank 2763 .da28a: 0 0000C86A AE scasb ; skip size name 0 0000C86B 75FD jne .da28a ; if not done yet --> 2766 ; (The above is the same as repne scasb, but 2767 ; has no effect on cx.) 0 0000C86D 87F7 xchg si, di ; di -> size keyword, si -> after size keyword 0 0000C86F 29F1 sub cx, si ; behind disassembly - after size keyword 2770 ; = length of disassembly part after keyword 0 0000C871 F3A4 rep movsb ; move the remainder of the line 2772 ; di -> behind disassembly (size keyword deleted) 0 0000C873 5E pop si 2774 @@: 2775 dop17_j2: 0 0000C874 E97EFE jmp dop17 2777 2778 ; 32-bit addressing without SIB 2779 2780 dop28: 0 0000C877 E86DFF call dop_store_and_add_base_reg32 0 0000C87A 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 0000C87C 50 push ax 0 0000C87D E80800 call store_opensqubracket 0 0000C880 B045 mov al, 'E' 0 0000C882 E83007 call dis_lowercase 0 0000C885 AA stosb 0 0000C886 58 pop ax 0 0000C887 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 0000C888 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 0000C88A F606[0000]04 testopt [asm_options], disasm_nasm 0 0000C88F 7501 jnz .ret 0 0000C891 AA stosb 0 0000C892 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 0000C893 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 0000C895 F606[0000]04 testopt [asm_options], disasm_nasm 0 0000C89A 7401 jz .ret 0 0000C89C AA stosb 0 0000C89D C3 .ret: retn 2835 2836 2837 ; Memory-only reference (OP_M) 2838 2839 dop_m: 0 0000C89E E8F706 call getregmem 0 0000C8A1 3CC0 cmp al, 0C0h 0 0000C8A3 7303E93FFD jb dop05 ; if it's what we expect --> 2843 2844 ; it's a register reference 0 0000C8A8 E97906 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 0000C8AB E8EA06 call getregmem 0 0000C8AE 3CC0 cmp al,0c0h 0 0000C8B0 72F6 jb disbad1 ;if it's a memory reference 0 0000C8B2 EB03 jmp s dop33 2854 2855 ; Pure register reference (OP_R) 2856 2857 dop_r: 0 0000C8B4 E8D706 call getregmem_r 2859 2860 dop33: ; <--- used by OP_RM, OP_R_MOD and OP_R_ADD 0 0000C8B7 2407 and al,7 ;entry point for regs from MOD R/M, and others 0 0000C8B9 8A0E[0401] mov cl,[disflags2] 0 0000C8BD 080E[0201] or [disflags],cl ;if it was variable size operand, the size 2864 ;should now be marked as known. 0 0000C8C1 80FC00 cmp ah,0 0 0000C8C4 7C11 jl dop35 ;if byte register 0 0000C8C6 740D jz dop34 ;if word register 2868 dop33a: 0 0000C8C8 80FC20 cmp ah, 20h ; qword register (MMX) ? 0 0000C8CB 7415 je dop35_1 ; --> 2871 dop33b: 0 0000C8CD 50 push ax 0 0000C8CE B045 mov al, 'E' 0 0000C8D0 E8E206 call dis_lowercase 0 0000C8D3 AA stosb 0 0000C8D4 58 pop ax 2877 ;mov byte [di],'E' ;enter here from OP_ECX 2878 ;inc di 2879 dop34: 0 0000C8D5 0408 add al,8 2881 dop35: 0 0000C8D7 98 cbw 0 0000C8D8 D1E0 shl ax,1 0 0000C8DA 93 xchg ax,bx ;mov bx,ax 0 0000C8DB 8B87[0000] mov ax,[rgnam816+bx];get the register name 0 0000C8DF E96707 jmp dis_stosw_lowercase 2887 2888 dop35_1: 0 0000C8E2 50 push ax 0 0000C8E3 B84D4D mov ax, "MM" 0 0000C8E6 E86007 call dis_stosw_lowercase 0 0000C8E9 58 pop ax 0 0000C8EA 0430 add al, '0' 0 0000C8EC AA stosb 0 0000C8ED C3 retn 2896 2897 2898 da_e_cx: 0 0000C8EE 800E[E500]20 or byte [preused], PREASIZE 0 0000C8F3 F606[E400]20 test byte [preflags], PREASIZE 0 0000C8F8 740B jz .deleteparameter 0 0000C8FA B001 mov al, 1 2903 %if _PM 0 0000C8FC F606[E600]20 test byte [presizeflags], PRE32A 0 0000C901 74D2 jz dop34 2906 %endif 0 0000C903 EBC8 jmp dop33b 2908 2909 .deleteparameter: 2910 @@: 0 0000C905 4F dec di 0 0000C906 803D2C cmp byte [di], ',' 0 0000C909 75FA jne @B 0 0000C90B C3 retn 2915 2916 2917 ; Register number embedded in the instruction (OP_R_ADD) 2918 2919 dop_r_add: 0 0000C90C A0[E700] mov al,[instru] 0 0000C90F EBA6 jmp s dop33 2922 2923 ; AL or AX or EAX (OP_AX) 2924 2925 dop_ax: 0 0000C911 B000 mov al,0 0 0000C913 EBA2 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 0000C915 B420 mov ah, 20h ; size QWORD 0 0000C917 EB35 jmp s dop40 2935 2936 ; FLOAT (=REAL4) mem (OP_MFLOAT) 2937 dop_mfloat: 0 0000C919 B8464C mov ax, "FL" 0 0000C91C E82A07 call dis_stosw_lowercase 0 0000C91F B84F41 mov ax, "OA" 0 0000C922 E82407 call dis_stosw_lowercase 0 0000C925 B85420 mov ax, "T " 0 0000C928 EB15 jmp short dop38c 2944 2945 ; DOUBLE (=REAL8) mem (OP_MDOUBLE). 2946 2947 dop_mdouble: 0 0000C92A B8444F mov ax, "DO" 0 0000C92D E81907 call dis_stosw_lowercase 0 0000C930 B85542 mov ax, "UB" 0 0000C933 E81307 call dis_stosw_lowercase 0 0000C936 B04C mov al, 'L' 0 0000C938 E87A06 call dis_lowercase 0 0000C93B AA stosb 0 0000C93C B84520 mov ax, "E " 2956 dop38c: 0 0000C93F E80707 call dis_stosw_lowercase 0 0000C942 E84807 call showptr 0 0000C945 EB1B jmp s dop42a 2960 2961 ; TBYTE (=REAL10) mem (OP_M80). 2962 2963 dop_m80: 0 0000C947 B854FF mov ax,0FF00h+'T' ;print 'T' + "BYTE" 0 0000C94A E86806 call dis_lowercase 0 0000C94D AA stosb 2967 dop40: 0 0000C94E E84706 call getregmem 0 0000C951 3CC0 cmp al,0c0h 0 0000C953 7317 jae disbad5 ; if it's a register reference 0 0000C955 800E[0201]80 or byte [disflags], DIS_I_DONTSHOW 2972 ; don't show this 0 0000C95A E98AFC 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 0000C95D 800E[0201]80 or byte [disflags], DIS_I_DONTSHOW 2993 ; don't show this 2994 dop42a: 0 0000C962 E83306 call getregmem 0 0000C965 3CC0 cmp al,0c0h 0 0000C967 7303E98CFC jb dop06 ; mem ref, don't show size --> 2998 disbad5: 0 0000C96C E9B505 jmp disbad 3000 3001 ; Far immediate (OP_FARP). Either FAR16 or FAR32. 3002 dop_farimm: 0 0000C96F E8D607 call disgetword 0 0000C972 50 push ax 3005 %if _DISASM_32BIT 0 0000C973 E84607 call dischk32d 0 0000C976 7410 jz dop44_word ; if not 32-bit address 3008 3009 dop44_dword: 3010 %if _PM 0 0000C978 F606[0000]40 test byte [bCSAttr],40h ; for 16-bit code segments 0 0000C97D 7503 jnz @F ; no need to display "WORD " 3013 %endif 0 0000C97F E8F306 call showdword 3015 @@: 3016 0 0000C982 E8C307 call disgetword 0 0000C985 50 push ax 0 0000C986 EB0A jmp dop44_common 3020 %endif 3021 3022 dop44_word: 3023 %if _PM 3024 %if _DISASM_32BIT 0 0000C988 F606[0000]40 test byte [bCSAttr],40h ; for 32-bit code segments 0 0000C98D 7403 jz @F ; no need to display "DWORD " 0 0000C98F E8E906 call showword 3028 @@: 3029 %endif 3030 %endif 3031 3032 dop44_common: 0 0000C992 E8B307 call disgetword 3034 %if _MEMREF_AMOUNT 0 0000C995 E8AD01 call get_free_memref 0 0000C998 8987[9800] mov word [memrefs + bx + mrSegmentSelector], ax 3037 %endif 0 0000C99C E8[0000] call hexword 3039 %if _IMMASM 0 0000C99F A3[0400] mov word [immasm_far_target + 4], ax 0 0000C9A2 31C0 xor ax, ax 0 0000C9A4 A3[0200] mov word [immasm_far_target + 2], ax 3043 %endif 0 0000C9A7 B03A mov al,':' 0 0000C9A9 AA stosb 3046 %if _DISASM_32BIT 0 0000C9AA E80F07 call dischk32d 0 0000C9AD 7410 jz dop45 ;if not 32-bit address 0 0000C9AF 58 pop ax 3050 %if _IMMASM 0 0000C9B0 A3[0200] mov word [immasm_far_target + 2], ax 3052 %endif 3053 %if _MEMREF_AMOUNT 0 0000C9B3 8987[9600] mov word [memrefs + bx + mrOffset + 2], ax 0 0000C9B7 808F[9A00]10 or byte [memrefs + bx + mrFlags], mrfA32 3056 %endif 0 0000C9BC E8[0000] call hexword 3058 dop45: 3059 %endif 0 0000C9BF 58 pop ax 3061 %if _IMMASM 0 0000C9C0 A3[0000] mov word [immasm_far_target], ax 3063 %endif 3064 %if _MEMREF_AMOUNT 0 0000C9C3 8987[9400] mov word [memrefs + bx + mrOffset], ax 0 0000C9C7 808F[9A00]01 or byte [memrefs + bx + mrFlags], mrfBranchDirect 0 0000C9CC E89701 call calc_linear_memref_and_mark_nonfree 3068 %endif 0 0000C9CF 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 0000C9D2 A1[0000] mov ax, word [reg_ecx] 3077 %if _DISASM_32BIT 0 0000C9D5 F606[E600]20 test byte [presizeflags], PRE32A ; A32 ? 0 0000C9DA 8B16[0200] mov dx, word [reg_ecx+2] 0 0000C9DE 7502 jnz .ecx 3081 %endif 0 0000C9E0 31D2 xor dx, dx 3083 .ecx: 0 0000C9E2 C3 retn 3085 3086 ; INP: ax = 0..15 condition code, else invalid 3087 ; OUT: w[condmsg] set as appropriate 3088 cond_handle: 0 0000C9E3 83F80F cmp ax, 15 0 0000C9E6 7738 ja .return 0 0000C9E8 8B0E[0000] mov cx, word [reg_efl] ; get flags 0 0000C9EC 89C3 mov bx, ax 0 0000C9EE 80E3FE and bl, ~1 ; make even 0 0000C9F1 2401 and al, 1 ; 1 if negated condition 0 0000C9F3 80FB0C cmp bl, 12 ; L/GE or LE/G? 0 0000C9F6 7306 jae .specific ; yes --> 3097 0 0000C9F8 858F[5A01] test cx, [cond_table+bx]; flag(s) set ? 0 0000C9FC EB14 jmp short .jump_ZF ; NZ if (normal) condition true --> 3100 3101 .specific: 0 0000C9FE 80FB0E cmp bl, 14 0 0000CA01 7205 jb .L_GE 3104 3105 ; Handle LE/NG and G/NLE conditions. 3106 ; The former says ZF | (OF ^ SF). 3107 .LE_G: 0 0000CA03 F6C140 test cl, 40h ; ZF | .. 0 0000CA06 750C jnz .jump_true 3110 3111 ; Handle L/NGE and GE/NL conditions. 3112 ; The former says OF ^ SF. 3113 .L_GE: 0 0000CA08 81E18008 and cx, 880h ; OF ^ SF 0 0000CA0C 7408 jz .jump_false ; both clear --> 0 0000CA0E 81F18008 xor cx, 880h 3117 .jump_ZF: 0 0000CA12 7402 jz .jump_false ; both set --> (or ZR: (normal) condition false) 3119 .jump_true: 0 0000CA14 3401 xor al, 1 ; (negating ^ raw truth) = cooked truth 3121 .jump_false: 0 0000CA16 84C0 test al, al ; true ? 0 0000CA18 7507 jnz .msg_jumping ; yes --> 3124 3125 .msg_notjumping: 0 0000CA1A C706[0C01][0000] mov word [condmsg], msg.condnotjump 3127 .return: 0 0000CA20 C3 retn 3129 3130 .msg_jumping: 0 0000CA21 C706[0C01][0000] mov word [condmsg], msg.condjump 0 0000CA27 C3 retn 3133 %endif 3134 3135 3136 ; 8-bit relative jump (OP_REL8) 3137 3138 dop_rel8: 3139 %if _COND 0 0000CA28 A1[EC00] mov ax, word [index] 0 0000CA2B 3DE300 cmp ax, 0E3h 0 0000CA2E 772C ja .cond_done ; no conditional jump --> 0 0000CA30 7211 jb .cond_noncx ; not jcxz, check for other --> 3144 0 0000CA32 E89DFF call cond_get_ecx 0 0000CA35 09D0 or ax, dx 0 0000CA37 7405 jz .cond_msg_jumping 3148 .cond_msg_notjumping: 0 0000CA39 E8DEFF call cond_handle.msg_notjumping 0 0000CA3C EB1E jmp short .cond_done 3151 3152 .cond_msg_jumping: 0 0000CA3E E8E0FF call cond_handle.msg_jumping 0 0000CA41 EB19 jmp short .cond_done 3155 3156 .cond_noncx: 0 0000CA43 3CE0 cmp al, 0E0h 0 0000CA45 7210 jb .cond_nonloop ; not loop, check for other --> 3159 0 0000CA47 50 push ax 0 0000CA48 E887FF call cond_get_ecx 0 0000CA4B 48 dec ax ; = 0 if cx is 1 0 0000CA4C 09D0 or ax, dx ; = 0 if cx is 1 and ecx is cx 0 0000CA4E 58 pop ax 0 0000CA4F 74E8 jz .cond_msg_notjumping ; if (e)cx is 1 --> 0 0000CA51 3CE2 cmp al, 0E2h 0 0000CA53 74E9 je .cond_msg_jumping ; loop without additional condition --> 0 0000CA55 3495 xor al, 0E0h^75h ; E0h (loopnz) to 75h (jnz), 3169 ; E1h (loopz) to 74h (jz) 3170 3171 .cond_nonloop: 0 0000CA57 2C70 sub al, 70h ; (ah = 0) 0 0000CA59 E887FF call cond_handle ; call common code (checks for ax < 16) 3174 .cond_done: 3175 %endif 0 0000CA5C E8CD06 call disgetbyte 0 0000CA5F 98 cbw 0 0000CA60 A2[E800] mov byte [disp8], al 0 0000CA63 E99E00 jmp dop48 3180 3181 ; 16/32-bit relative jump (OP_REL1632) 3182 3183 dop_rel1632: 3184 %if _COND 0 0000CA66 A1[EC00] mov ax, word [index] 0 0000CA69 2D[8000] sub ax, SPARSE_BASE+80h 0 0000CA6C E874FF call cond_handle 3188 %endif 0 0000CA6F E8D606 call disgetword 3190 %if _DISASM_32BIT 0 0000CA72 E84706 call dischk32d 0 0000CA75 7465 jz dop48_near ; if not 32-bit offset 0 0000CA77 92 xchg ax, dx ; mov dx, ax 0 0000CA78 E8CD06 call disgetword 3195 0 0000CA7B 813E[EC00]E800 cmp word [index], 00E8h 0 0000CA81 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 0000CA83 83F8FF cmp ax, -1 0 0000CA86 7410 je .checkminus 0 0000CA88 85C0 test ax, ax 0 0000CA8A 7520 jnz .not_show_keyword 3210 .checkplus: 0 0000CA8C 83FA7F cmp dx, byte 127 0 0000CA8F 7F1B jg .not_show_keyword 0 0000CA91 83FA00 cmp dx, 0 0 0000CA94 7C16 jl .not_show_keyword 0 0000CA96 EB0A jmp .show_keyword 3216 3217 .checkminus: 0 0000CA98 83FA80 cmp dx, byte -128 0 0000CA9B 7C0F jl .not_show_keyword 0 0000CA9D 83FA00 cmp dx, 0 0 0000CAA0 7D0A jge .not_show_keyword 3222 3223 .show_keyword: 0 0000CAA2 F606[0000]20 testopt [asm_options], disasm_show_near 0 0000CAA7 7503 jnz .not_show_keyword 0 0000CAA9 E86604 call dop_show_near 3227 .not_show_keyword: 3228 3229 %if _PM 0 0000CAAC F606[0000]40 test byte [bCSAttr],40h ; for 32-bit code segments 0 0000CAB1 7505 jnz @F ; no need to display "DWORD " 3232 %endif 0 0000CAB3 50 push ax 0 0000CAB4 E8BE05 call showdword 0 0000CAB7 58 pop ax 3236 @@: 3237 0 0000CAB8 8B1E[0000] mov bx,[u_addr+0] 0 0000CABC 031E[E000] add bx,[dis_n] 0 0000CAC0 1306[E200] adc ax,[dis_n + 2] 0 0000CAC4 01DA add dx,bx 3242 %if _PM 0 0000CAC6 1306[0200] adc ax,[u_addr+2] 3244 %else 3245 adc ax, 0 3246 %endif 3247 %if _MEMREF_AMOUNT 0 0000CACA E87800 call get_free_memref 0 0000CACD 8987[9600] mov word [memrefs + bx + mrOffset + 2], ax 0 0000CAD1 808F[9A00]10 or byte [memrefs + bx + mrFlags], mrfA32 3251 %endif 0 0000CAD6 E8[0000] call hexword 0 0000CAD9 92 xchg ax,dx 0 0000CADA EB4F jmp s dop_branch_word 3255 %endif 3256 3257 dop48_near: 0 0000CADC 813E[EC00]E800 cmp word [index], 00E8h 0 0000CAE2 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 0000CAE4 83F880 cmp ax, byte -128 0 0000CAE7 7C0F jl @F 0 0000CAE9 83F87F cmp ax, byte 127 0 0000CAEC 7F0A jg @F 0 0000CAEE F606[0000]20 testopt [asm_options], disasm_show_near 0 0000CAF3 7503 jnz @F 0 0000CAF5 E81A04 call dop_show_near 3275 @@: 3276 3277 %if _PM && _DISASM_32BIT 0 0000CAF8 F606[0000]40 test byte [bCSAttr],40h ; for 16-bit code segments 0 0000CAFD 7405 jz @F ; no need to display "WORD " 0 0000CAFF 50 push ax 0 0000CB00 E87805 call showword 0 0000CB03 58 pop ax 3283 @@: 3284 %endif 3285 3286 dop48: 0 0000CB04 99 cwd 0 0000CB05 0306[0000] add ax, word [u_addr] 3289 %if _PM 0 0000CB09 1316[0200] adc dx, word [u_addr + 2] 3291 %else 3292 adc dx, 0 3293 %endif 0 0000CB0D 0306[E000] add ax, word [dis_n] 0 0000CB11 1316[E200] adc dx, word [dis_n + 2] 3296 %if _DISASM_32BIT 0 0000CB15 E8A405 call dischk32d ; 32-bit opsize ? 0 0000CB18 7411 jz .16 ; no --> 0 0000CB1A 92 xchg ax, dx 0 0000CB1B E8[0000] call hexword ; yes, display high word 0 0000CB1E 92 xchg ax, dx 3302 %if _MEMREF_AMOUNT 0 0000CB1F E82300 call get_free_memref 0 0000CB22 8997[9600] mov word [memrefs + bx + mrOffset + 2], dx 0 0000CB26 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 0000CB2B E81700 call get_free_memref 0 0000CB2E 8987[9400] mov word [memrefs + bx + mrOffset], ax 0 0000CB32 FF36[0400] push word [u_addr + saSegSel] 0 0000CB36 8F87[9800] pop word [memrefs + bx + mrSegmentSelector] 0 0000CB3A 808F[9A00]01 or byte [memrefs + bx + mrFlags], mrfBranchDirect 0 0000CB3F E82400 call calc_linear_memref_and_mark_nonfree 3318 %endif 0 0000CB42 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 0000CB45 8B1E[D000] mov bx, [memrefs.free] 3329 get_memref_index_bx: 0 0000CB49 83FB04 cmp bx, _MEMREF_AMOUNT 0 0000CB4C 7309 jae @F 0 0000CB4E 01DB add bx, bx 0 0000CB50 01DB add bx, bx 0 0000CB52 01DB add bx, bx 0 0000CB54 01DB add bx, bx 3336 %if MEMREF_size != 16 3337 %error Adjust multiplication 3338 %endif 0 0000CB56 C3 retn 3340 3341 @@: 0 0000CB57 B83901 mov ax, 0139h 0 0000CB5A E8[0000] call setrc 0 0000CB5D BA[0000] mov dx, msg.memrefs_invalid_internal 0 0000CB60 E8[0000] call putsz 0 0000CB63 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 0000CB66 50 push ax 0 0000CB67 53 push bx 0 0000CB68 66 _386_PM_o32 0 0000CB69 52 push dx 0 0000CB6A E8D8FF call get_free_memref 0 0000CB6D 53 push bx 0 0000CB6E 66 _386_PM_o32 0 0000CB6F 8B97[9400] mov dx, word [memrefs + bx + mrOffset] 0 0000CB73 8B9F[9800] mov bx, word [memrefs + bx + mrSegmentSelector] 0 0000CB77 E8[0000] call getlinear_32bit 0 0000CB7A 5B pop bx 0 0000CB7B 7211 jc .error 3372 0 0000CB7D 8987[9000] mov word [memrefs + bx + mrLinear], ax 0 0000CB81 8997[9200] mov word [memrefs + bx + mrLinear + 2], dx 0 0000CB85 FF06[D000] inc word [memrefs.free] 3376 3377 ; clc 3378 .return: 0 0000CB89 66 _386_PM_o32 0 0000CB8A 5A pop dx 0 0000CB8B 5B pop bx 0 0000CB8C 58 pop ax 0 0000CB8D C3 retn 3384 3385 .error: 0 0000CB8E 57 push di 0 0000CB8F 8DBF[9000] lea di, [memrefs + bx] 0 0000CB93 E80400 call init_one_memref 0 0000CB96 5F pop di 0 0000CB97 F9 stc 0 0000CB98 EBEF 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 0000CB9A 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 0000CB9C AB stosw ; zero-initialise all memrefs 0 0000CB9D AB stosw ; mrLinear 0 0000CB9E AB stosw 0 0000CB9F AB stosw ; mrOffset 0 0000CBA0 AB stosw ; mrSegmentSelector 0 0000CBA1 AB stosw ; mrFlags 0 0000CBA2 40 inc ax 0 0000CBA3 AB stosw 0 0000CBA4 48 dec ax 0 0000CBA5 AB stosw ; mrLength = 1 0 0000CBA6 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 0000CBA7 E89BFF call get_free_memref 0 0000CBAA FF34 push word [si] ; get segment/selector 0 0000CBAC 8F87[9800] pop word [memrefs + bx + mrSegmentSelector] 3434 ; store segment/selector 0 0000CBB0 FF35 push word [di] 0 0000CBB2 8F87[9400] pop word [memrefs + bx + mrOffset] 3437 ; store low word of offset 0 0000CBB6 8B0E[D600] mov cx, word [string_memref_counter + 2] 0 0000CBBA 8B16[D400] mov dx, word [string_memref_counter] 3440 0 0000CBBE F606[E600]20 test byte [presizeflags], PRE32A 0 0000CBC3 740C jz @F ; if 16-bit addressing --> 0 0000CBC5 FF7502 push word [di + 2] 0 0000CBC8 8F87[9600] pop word [memrefs + bx + mrOffset + 2] 3445 ; store high word of offset 0 0000CBCC 808F[9A00]10 or byte [memrefs + bx + mrFlags], mrfA32 3447 ; remember that it is a32 3448 @@: 3449 0 0000CBD1 F606[E400]02 test byte [preflags], PREREP 0 0000CBD6 7505 jnz @F ; if to take (e)cx repetitions --> 0 0000CBD8 BA0100 mov dx, 1 0 0000CBDB 31C9 xor cx, cx ; cx:dx = 1, just one element 3454 @@: 3455 0 0000CBDD 50 push ax 0 0000CBDE B80100 mov ax, 1 0 0000CBE1 F606[EC00]01 test byte [index], 1 ; element size is byte ? 0 0000CBE6 740A jz @F ; yes, ax = 1 0 0000CBE8 40 inc ax ; = 2 3461 %if _DISASM_32BIT 0 0000CBE9 F606[E600]10 test byte [presizeflags], PRE32D 3463 ; element size is word ? 0 0000CBEE 7402 jz @F ; yes, ax = 2 0 0000CBF0 01C0 add ax, ax ; = 4 3466 %endif 3467 @@: 3468 0 0000CBF2 3C01 cmp al, 1 ; byte size ? 0 0000CBF4 7415 je @F ; yes, do not multiply --> 0 0000CBF6 01D2 add dx, dx 0 0000CBF8 11C9 adc cx, cx ; * 2, word to byte 0 0000CBFA 720A jc .carry_counter 0 0000CBFC 3C02 cmp al, 2 ; word size ? 0 0000CBFE 740B je @F ; yes, done multiplying --> 0 0000CC00 01D2 add dx, dx 0 0000CC02 11C9 adc cx, cx ; * 4, dword to byte 0 0000CC04 7305 jnc @F 3479 .carry_counter: 0 0000CC06 BAFFFF mov dx, -1 0 0000CC09 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 0000CC0B 8997[9C00] mov word [memrefs + bx + mrLength], dx 0 0000CC0F 898F[9E00] mov word [memrefs + bx + mrLength + 2], cx 3490 0 0000CC13 F606[0100]04 testopt [reg_efl], 400h ; DF set ? 0 0000CC18 7411 jz @F 3493 0 0000CC1A 0187[9400] add word [memrefs + bx + mrOffset], ax 0 0000CC1E 8397[9600]00 adc word [memrefs + bx + mrOffset + 2], 0 0 0000CC23 2997[9400] sub word [memrefs + bx + mrOffset], dx 0 0000CC27 198F[9600] sbb word [memrefs + bx + mrOffset + 2], cx 3498 3499 @@: 0 0000CC2B 58 pop ax 0 0000CC2C C3 retn 3502 %endif 3503 3504 3505 ; Check for ST(1) (OP_1CHK). 3506 3507 dop49: 0 0000CC2D 58 pop ax ;discard return address 0 0000CC2E A0[0000] mov al,[regmem] 0 0000CC31 2407 and al,7 0 0000CC33 3C01 cmp al,1 0 0000CC35 7403 je dop50 ;if it's ST(1) 0 0000CC37 E910F0 jmp da14 ;another operand (but no comma) 3514 3515 dop50: 0 0000CC3A E9ADF0 jmp da_op_end ; end of list --> 3517 3518 ; ST(I) (OP_STI). 3519 3520 dop_sti: 0 0000CC3D A0[0000] mov al, byte [regmem] 0 0000CC40 2407 and al, 7 0 0000CC42 93 xchg ax, bx ;mov bx,ax 0 0000CC43 B85354 mov ax, 'ST' 0 0000CC46 E80004 call dis_stosw_lowercase; store ST(bl) 0 0000CC49 B028 mov al, '(' 0 0000CC4B AA stosb 0 0000CC4C B83029 mov ax, '0)' 0 0000CC4F 08D8 or al, bl 0 0000CC51 AB stosw 0 0000CC52 C3 retn 3532 3533 ; CRx (OP_CR). 3534 3535 dop_cr: 0 0000CC53 BB4352 mov bx,'CR' 0 0000CC56 E83503 call getregmem_r 0 0000CC59 3C04 cmp al,4 0 0000CC5B 7713 ja disbad4 ;if too large 0 0000CC5D 7505 jne dop52a 0 0000CC5F C606[0000]05 mov byte [dismach],5 ;CR4 is new to the 586 3542 dop52a: 0 0000CC64 813E[EC00][2200] cmp word [index],SPARSE_BASE+22h 0 0000CC6A 7528 jne dop55 ;if not MOV CRx,xx 0 0000CC6C 3C01 cmp al,1 0 0000CC6E 7524 jne dop55 ;if not CR1 3547 0 0000CC70 E9B102 disbad4:jmp disbad ;can't MOV CR1,xx 3549 3550 ; DRx (OP_DR). 3551 3552 dop_dr: 0 0000CC73 E81803 call getregmem_r 0 0000CC76 BB4452 mov bx,'DR' 0 0000CC79 B9FFFF mov cx,-1 ;no max or illegal value 0 0000CC7C EB16 jmp s dop55 3557 3558 ; TRx (OP_TR). 3559 3560 dop_tr: 0 0000CC7E E80D03 call getregmem_r 0 0000CC81 3C03 cmp al,3 0 0000CC83 7303E99C02 jb disbad ;if too small 0 0000CC88 3C06 cmp al,6 0 0000CC8A 7305 jae dop54a ;if TR6-7 0 0000CC8C C606[0000]04 mov byte [dismach],4 ;TR3-5 are new to the 486 3567 dop54a: 0 0000CC91 BB5452 mov bx,'TR' 3569 3570 dop55: 0 0000CC94 93 xchg ax, bx 0 0000CC95 E8B103 call dis_stosw_lowercase; store XX 0 0000CC98 93 xchg ax, bx 0 0000CC99 0C30 or al, '0' 0 0000CC9B AA stosb 0 0000CC9C C3 retn 3577 3578 ; Segment register (OP_SEGREG). 3579 3580 dop_segreg: 0 0000CC9D E8EE02 call getregmem_r 0 0000CCA0 3C06 cmp al,6 0 0000CCA2 7203E97D02 jae disbad ; if not a segment register --> 0 0000CCA7 F606[0000]80 testopt [asm_options], disasm_nec 0 0000CCAC 7504 jnz .nec ; allow mov from or to any segreg 0 0000CCAE 3C02 cmp al,2 0 0000CCB0 7505 jne @F ; if not SS --> 3588 .nec: 0 0000CCB2 800E[0201]40 or byte [disflags], DIS_I_MOV_SS ; note this 3590 @@: 0 0000CCB7 3C04 cmp al,4 0 0000CCB9 7205 jb dop57a ;if not FS or GS 0 0000CCBB C606[0000]03 mov byte [dismach],3;(no new 486-686 instructions involve seg regs) 3594 dop57a: 0 0000CCC0 0410 add al,16 0 0000CCC2 E912FC jmp dop35 ;go print it out 3597 3598 ; Sign-extended immediate byte (OP_IMMS8). "push xx" 3599 3600 dop_imms8: 0 0000CCC5 E86404 call disgetbyte 0 0000CCC8 3C00 cmp al,0 0 0000CCCA 93 xchg ax,bx ;mov bl,al 0 0000CCCB B02B mov al,'+' 0 0000CCCD 7D04 jge dop58a ;if >= 0 0 0000CCCF F6DB neg bl 0 0000CCD1 B02D mov al,'-' 3608 dop58a: 0 0000CCD3 AA stosb 0 0000CCD4 93 xchg ax,bx ;mov al,bl 0 0000CCD5 EB03 jmp s dop59a ;call hexbyte and return 3612 3613 3614 ; Immediate byte (OP_IMM8). 3615 3616 dop_imm8: 0 0000CCD7 E85204 call disgetbyte 3618 dop59a: 0 0000CCDA E9[0000] jmp hexbyte ;call hexbyte and return 3620 3621 3622 dop_imm8_int: 0 0000CCDD E84C04 call disgetbyte 0 0000CCE0 3C03 cmp al, 3 3625 @@: 0 0000CCE2 75F6 jne dop59a 0 0000CCE4 50 push ax 0 0000CCE5 E88203 call showsize.byte 0 0000CCE8 58 pop ax 0 0000CCE9 EBEF jmp dop59a 3631 3632 dop_imm8_shiftrot: 0 0000CCEB E83E04 call disgetbyte 0 0000CCEE 3C01 cmp al, 1 0 0000CCF0 EBF0 jmp @B 3636 3637 dop_imm8_optional: 0 0000CCF2 E83704 call disgetbyte 0 0000CCF5 3C0A cmp al, 10 0 0000CCF7 75E1 jne dop59a 0 0000CCF9 58 pop ax 0 0000CCFA E9EDEF jmp da_op_end 3643 3644 3645 ; Show MMx reg (OP_MMX; previously was "Show ECX if 32-bit LOOPxx"). 3646 dop_mmx: 0 0000CCFD BB4D4D mov bx, "MM" 0 0000CD00 E88B02 call getregmem_r 3649 dop55_j: 0 0000CD03 EB8F jmp short dop55 3651 3652 ; MMX register (in ModR/M part) 3653 dop_mmx_mod: 0 0000CD05 BB4D4D mov bx, "MM" 0 0000CD08 E88D02 call getregmem 0 0000CD0B 3CC0 cmp al, 0C0h 0 0000CD0D 7303E91202 jb disbad ; needs to be encoded as register --> 0 0000CD12 2407 and al, 7 0 0000CD14 EBED jmp short dop55_j 3660 3661 3662 dop_x: 0 0000CD16 AC lodsb 0 0000CD17 B400 mov ah, 0 0 0000CD19 93 xchg bx, ax 0 0000CD1A 01DB add bx, bx 0 0000CD1C FFA7[7A00] jmp [disjmp_opx + bx] 3668 3669 3670 dop_loop_option: 0 0000CD20 F606[0200]02 testopt [asm_options], disasm_asize_loop_nasm 0 0000CD25 745E jz dop60a_3 0 0000CD27 58 pop ax 3674 %if _LINK 0 0000CD28 BE[0000] mov si, mnlist 3676 wlcalc word_ext_MN_LOOP, equ $ - 2 3677 %else 3678 mov si, mnlist+MN_LOOP 3679 %endif 0 0000CD2B 803E[E700]E1 cmp byte [instru], 0E1h 0 0000CD30 7708 ja @F 3682 %if _LINK 0 0000CD32 BE[0000] mov si, mnlist 3684 wlcalc word_ext_MN_LOOPZ, equ $ - 2 3685 %else 3686 mov si, mnlist+MN_LOOPZ 3687 %endif 0 0000CD35 7403 je @F 3689 %if _LINK 0 0000CD37 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 0000CD3A 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 0000CD3D 50 push ax 0 0000CD3E E9F4EE 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 0000CD41 E85402 call getregmem ; get our ModR/M 0 0000CD44 800E[0000]C0 or byte [regmem], 0C0h ; force it to look like a register (Mod = 3) 0 0000CD49 EB3A jmp dop60a_3 3712 3713 3714 dop_modalways_if_reg: 0 0000CD4B F606[0200]04 testopt [asm_options], disasm_modrm_always 0 0000CD50 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 0000CD52 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 0000CD54 F606[E700]01 test byte [instru], 1 ; byte size ? 0 0000CD59 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 0000CD5B E83A02 call getregmem ; get our ModR/M 0 0000CD5E 3CC0 cmp al, 0C0h ; is it a register? 0 0000CD60 7223 jb dop_no_mod ; no --> 3748 3749 dop_mod: 0 0000CD62 F606[0200]01 testopt [asm_options], disasm_hide_modrm 0 0000CD67 751C jnz dop_no_mod 3752 %if 1 0 0000CD69 D006[EA00] rol byte [moddone], 1 ; already displayed ? 0 0000CD6D 7216 jc dop_no_mod ; yes --> 0 0000CD6F F616[EA00] not byte [moddone] ; indicate we displayed it 3756 %endif 0 0000CD73 B84D4F mov ax, "MO" 0 0000CD76 E8D002 call dis_stosw_lowercase 0 0000CD79 B84452 mov ax, "DR" 0 0000CD7C E8CA02 call dis_stosw_lowercase 0 0000CD7F B84D20 mov ax, "M " 0 0000CD82 E8C402 call dis_stosw_lowercase 3763 dop_no_mod: 3764 dop60a_3: 0 0000CD85 E92901 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 0000CD88 E80D02 call getregmem ; get our ModR/M 0 0000CD8B A838 test al, 111b << 3 ; al/ax/eax ? 0 0000CD8D 75F6 jnz dop_no_mod ; no --> 0 0000CD8F 3C40 cmp al, 40h ; is it a register or mem with displacement ? 0 0000CD91 73F2 jae dop_no_mod ; yes --> 0 0000CD93 2407 and al, 7 0 0000CD95 F606[E600]20 test byte [presizeflags], PRE32A 0 0000CD9A 7506 jnz .a32 3778 .a16: 0 0000CD9C 3C06 cmp al, 6 ; [disp16] without address registers ? 3780 dop_mod_if_ZR: equ $ 0 0000CD9E 75E5 jne dop_no_mod ; no --> 0 0000CDA0 EBC0 jmp dop_mod ; yes --> 3783 3784 .a32: 0 0000CDA2 3C05 cmp al, 5 ; trivial [disp32] ? 0 0000CDA4 74F8 je dop_mod_if_ZR 0 0000CDA6 3C04 cmp al, 4 ; SIB byte present ? 0 0000CDA8 75F4 jne dop_mod_if_ZR 0 0000CDAA E84CF9 call getsibbyte 0 0000CDAD 243F and al, ~0C0h ; mask off the scale 0 0000CDAF 3C25 cmp al, 100_101b ; index=4 base=5 special case [disp32] ? 0 0000CDB1 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 0000CDB3 F606[E700]01 test byte [instru], 1 ; byte size ? 0 0000CDB8 74CB jz dop_no_mod ; yes, no MODRM keyword --> 0 0000CDBA E8DB01 call getregmem ; get our ModR/M 0 0000CDBD 3CC0 cmp al, 0C0h ; this a memory operand ? 0 0000CDBF 72C4 jb dop_no_mod ; yes, do not show MODRM --> 0 0000CDC1 A838 test al, 111b << 3 ; al/ax/eax ? 0 0000CDC3 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 0000CDC5 F606[E700]01 test byte [instru], 1 ; byte size ? 0 0000CDCA 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 0000CDCC E8C901 call getregmem ; get our ModR/M 0 0000CDCF 24C7 and al, 0C7h ; isolate mod and r/m 0 0000CDD1 3CC0 cmp al, 0C0h ; mod=11b and r/m=000b ? 0 0000CDD3 EBC9 jmp dop_mod_if_ZR 3818 3819 3820 %if _MEMREF_AMOUNT 3821 dop_stack_push: 0 0000CDD5 B80200 mov ax, 2 3823 .special: 3824 %if _DISASM_32BIT 0 0000CDD8 F606[E600]10 test byte [presizeflags], PRE32D 3826 .iso16_if_ZR: 0 0000CDDD 7402 jz .iso16 0 0000CDDF 01C0 add ax, ax 3829 %endif 3830 .iso16: 0 0000CDE1 E861FD call get_free_memref ; memrefs + bx -> the memref structure 3832 0 0000CDE4 8987[9C00] mov word [memrefs + bx + mrLength], ax 0 0000CDE8 8B0E[0200] mov cx, word [reg_esp + 2] 0 0000CDEC 8B16[0000] mov dx, word [reg_esp] 0 0000CDF0 29C2 sub dx, ax 0 0000CDF2 83D900 sbb cx, 0 3838 0 0000CDF5 8997[9400] mov word [memrefs + bx + mrOffset], dx 3840 0 0000CDF9 B20A mov dl, mrfMemDest | mrfMem 3842 0 0000CDFB EB2D jmp dop_stack_common 3844 3845 %if _PM && _DISASM_32BIT 3846 .special_int: 0 0000CDFD E8[0000] call ispm 0 0000CE00 75DF jnz .iso16 0 0000CE02 803E[0000]00 cmp byte [dpmi32], 0 0 0000CE07 EBD4 jmp .iso16_if_ZR 3851 %else 3852 .special_int: equ .iso16 3853 %endif 3854 3855 dop_stack_pop: 0 0000CE09 B80200 mov ax, 2 3857 .special: 0 0000CE0C 8B0E[0200] mov cx, word [reg_esp + 2] 0 0000CE10 8B16[0000] mov dx, word [reg_esp] 3860 .leave: 3861 %if _DISASM_32BIT 0 0000CE14 F606[E600]10 test byte [presizeflags], PRE32D 0 0000CE19 7402 jz .iso16 0 0000CE1B 01C0 add ax, ax 3865 .iso16: 3866 %endif 0 0000CE1D E825FD call get_free_memref ; memrefs + bx -> the memref structure 3868 0 0000CE20 8987[9C00] mov word [memrefs + bx + mrLength], ax 3870 0 0000CE24 8997[9400] mov word [memrefs + bx + mrOffset], dx 3872 0 0000CE28 B206 mov dl, mrfMemSource | mrfMem 3874 3875 dop_stack_common: 0 0000CE2A A1[0000] mov ax, word [reg_ss] ; get ss selector into ax 0 0000CE2D 8987[9800] mov word [memrefs + bx + mrSegmentSelector], ax 3878 3879 %if _DISASM_32BIT 0 0000CE31 93 _386_PM xchg ax, bx ; selector in bx 0 0000CE32 E8[0000] _386_PM call test_d_b_bit ; check whether a 32-bit ss 0 0000CE35 93 _386_PM xchg ax, bx 0 0000CE36 7407 _386_PM jz .isstack16 0 0000CE38 80CA10 _386_PM or dl, mrfA32 0 0000CE3B 898F[9600] _386_PM mov word [memrefs + bx + mrOffset + 2], cx 3886 .isstack16: 3887 %endif 3888 0 0000CE3F 0897[9A00] or byte [memrefs + bx + mrFlags], dl 0 0000CE43 E820FD call calc_linear_memref_and_mark_nonfree 0 0000CE46 EB59 jmp dop_continue_maybe_end 3892 3893 3894 dop_stack_special: 0 0000CE48 A1[EC00] mov ax, [index] 0 0000CE4B 3D[0300] cmp ax, GROUP7 + 3 ; call far [mem] ? 0 0000CE4E 7414 je .callfar 0 0000CE50 84E4 test ah, ah 0 0000CE52 754A jnz .error 0 0000CE54 57 push di 0 0000CE55 BF[9801] mov di, .bytes ; list of opcodes 0 0000CE58 B90B00 mov cx, .bytes_amount 0 0000CE5B F2AE repne scasb 0 0000CE5D 8A450A mov al, [di + .bytes_amount - 1] 0 0000CE60 5F pop di 0 0000CE61 753B jne .error ; if not one of these --> 3907 0 0000CE63 A9 db __TEST_IMM16 ; (skip mov) 3909 .callfar: 0 0000CE64 B044 mov al, 40h + 4 3911 3912 .haveinfo: 0 0000CE66 89C3 mov bx, ax 0 0000CE68 83E01F and ax, 1Fh 0 0000CE6B 80FB80 cmp bl, 80h 0 0000CE6E 739C jae dop_stack_pop.special 0 0000CE70 80FB40 cmp bl, 40h 0 0000CE73 7203E960FF jae dop_stack_push.special 0 0000CE78 80FB20 cmp bl, 20h 0 0000CE7B 7380 jae dop_stack_push.special_int 0 0000CE7D 84C0 test al, al 0 0000CE7F 740F jz .leave 0 0000CE81 3C01 cmp al, 1 0 0000CE83 7519 jne .error 3925 .into: 0 0000CE85 F606[0100]08 testopt [reg_efl], 800h 0 0000CE8A 7415 jz .none 0 0000CE8C B026 mov al, 20h + 6 0 0000CE8E EBD6 jmp .haveinfo 3930 3931 .leave: 0 0000CE90 B80200 mov ax, 2 ; pop size = 1 word or 1 dword 0 0000CE93 8B0E[0200] mov cx, word [reg_ebp + 2] 0 0000CE97 8B16[0000] mov dx, word [reg_ebp] ; pop from address in (e)bp, not (e)sp 0 0000CE9B E976FF jmp dop_stack_pop.leave 3936 3937 .error: 0 0000CE9E E907EE 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 00007808 CDCE db 0CDh, 0CEh ; int, into 0 0000780A CCF1 db 0CCh, 0F1h ; int3, int1 0 0000780C 9A db 9Ah ; call far imm:imm 0 0000780D CFCACB db 0CFh, 0CAh, 0CBh ; iret, retf imm, retf 0 00007810 60 db 60h ; pusha 0 00007811 61 db 61h ; popa 0 00007812 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 00007813 26 db 20h + 6 ; int 0 00007814 01 db 1 ; into 0 00007815 26 db 20h + 6 ; int3 0 00007816 26 db 20h + 6 ; int1 0 00007817 44 db 40h + 4 ; call far imm:imm 0 00007818 86 db 80h + 6 ; iret 0 00007819 84 db 80h + 4 ; retf imm 0 0000781A 84 db 80h + 4 ; retf 0 0000781B 50 db 40h + 16 ; pusha 0 0000781C 90 db 80h + 16 ; popa 0 0000781D 00 db 0 ; leave 3973 3974 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 0000CEA1 58 pop ax ; discard return address 0 0000CEA2 E99DED jmp da14_check_end ; next --> 3985 3986 3987 dop_m_always_16: 0 0000CEA5 800E[0301]41 setopt [disflags], DIS_I_M_ALWAYS_16 | DIS_I_NOSIZ 0 0000CEAA EBF5 jmp dop_continue_maybe_end 3990 3991 3992 ; Set flag to always show size (OP_SHOSIZ). 3993 dop_shosiz: 0 0000CEAC 800E[0201]10 or byte [disflags],DIS_I_SHOWSIZ 3995 dop60a: 0 0000CEB1 58 pop ax ; discard return address 0 0000CEB2 E995ED jmp da14 ; next... 3998 3999 dop_far_m: 0 0000CEB5 800E[0301]02 setopt [disflags], DIS_I_FAR_M 0 0000CEBA EBF5 jmp dop60a 4002 4003 dop_double_m: 0 0000CEBC 800E[0301]04 setopt [disflags], DIS_I_DOUBLE_M 0 0000CEC1 EBEE jmp dop60a 4006 4007 4008 %if _MEMREF_AMOUNT 4009 dop_m_src: 0 0000CEC3 800E[0301]10 setopt [disflags], DIS_I_M_SRC 0 0000CEC8 EBE7 jmp dop60a 4012 4013 dop_m_src_dst: 0 0000CECA 800E[0301]10 setopt [disflags], DIS_I_M_SRC 4015 dop_m_dst: 0 0000CECF 800E[0301]20 setopt [disflags], DIS_I_M_DST 0 0000CED4 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 0000CED6 F606[0000]10 testopt [asm_options], disasm_show_short 0 0000CEDB 74D4 jz dop60a 0 0000CEDD B85348 mov ax, "SH" 0 0000CEE0 E86601 call dis_stosw_lowercase 0 0000CEE3 B84F52 mov ax, "OR" 0 0000CEE6 E86001 call dis_stosw_lowercase 0 0000CEE9 B85420 mov ax, "T " 0 0000CEEC E85A01 call dis_stosw_lowercase 4034 dop60a_1: 0 0000CEEF EBC0 jmp dop60a 4036 4037 dop_near: 0 0000CEF1 F606[0000]20 testopt [asm_options], disasm_show_near 0 0000CEF6 74F7 jz dop60a_1 0 0000CEF8 E81700 call dop_show_near 4041 dop60a_2: 0 0000CEFB EBF2 jmp dop60a_1 4043 4044 dop_far: 0 0000CEFD F606[0000]40 testopt [asm_options], disasm_show_far 0 0000CF02 74F7 jz dop60a_2 4047 dop_far_required: 0 0000CF04 B84641 mov ax, "FA" ; store "FAR " 0 0000CF07 E83F01 call dis_stosw_lowercase 0 0000CF0A B85220 mov ax, "R " 0 0000CF0D E83901 call dis_stosw_lowercase 0 0000CF10 EBE9 jmp dop60a_2 4053 4054 dop_show_near: 0 0000CF12 50 push ax 0 0000CF13 B84E45 mov ax, "NE" 0 0000CF16 E83001 call dis_stosw_lowercase 0 0000CF19 B84152 mov ax, "AR" 0 0000CF1C E82A01 call dis_stosw_lowercase 0 0000CF1F B020 mov al, " " 0 0000CF21 AA stosb 0 0000CF22 58 pop ax 0 0000CF23 C3 retn 4064 4065 4066 disbad: 0 0000CF24 8B26[0001] mov sp,[savesp2] ;pop junk off stack 0 0000CF28 B8[6A02] mov ax, da13 0 0000CF2B 50 push ax 0 0000CF2C 66 _386_PM_o32 ; xor eax, eax 0 0000CF2D 31C0 xor ax, ax 0 0000CF2F 66 _386_PM_o32 ; mov dword [dis_n], eax 0 0000CF30 A3[E000] mov word [dis_n], ax 0 0000CF33 A3[E400] mov word [preflags], ax ; clear preflags and preused 4075 %if _COND 0 0000CF36 A3[0C01] mov word [condmsg], ax ; initialize conditions message 4077 %endif 0 0000CF39 C606[F800]80 mov byte [rmsize], 80h ; don't display any memory 0 0000CF3E A3[0000] mov word [dismach], ax ; forget about the machine type 0 0000CF41 8026[0201]FB and byte [disflags],~DIS_I_SHOW ;and flags 0 0000CF46 E8E301 call disgetbyte 0 0000CF49 BF[3E01] mov di,prefixlist 0 0000CF4C B90C00 mov cx,N_PREFIX 0 0000CF4F F2AE repne scasb 0 0000CF51 740C je .namedprefix ;if it's a named prefix 0 0000CF53 66 _386_PM_o32 ; dec dword [dis_n] 0 0000CF54 FF0E[E000] dec word [dis_n] 0 0000CF58 BB[0000] mov bx,MN_DB ;offset of 'DB' mnemonic 4089 %if _LINK 0 0000CF5B 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 0000CF5E C3 retn 4096 4097 .namedprefix: 0 0000CF5F 800E[0201]08 or byte [disflags],DIS_I_UNUSED ;print special flag 0 0000CF64 BB0B00 mov bx,N_PREFIX - 1 0 0000CF67 29CB sub bx,cx 0 0000CF69 D1E3 shl bx,1 0 0000CF6B 83FB0C cmp bx, byte (prefixlist.after_segment - prefixlist) *2 0 0000CF6E 7216 jb .segprefix ; if SEG directive --> 4104 %if _PM 0 0000CF70 83FB14 cmp bx, byte (prefixlist.size - prefixlist) *2 0 0000CF73 720A jb .non16prefix ; if not OSIZE or ASIZE --> 0 0000CF75 F606[0000]40 test byte [bCSAttr], 40h; 32-bit code segment ? 0 0000CF7A 7403 jz .non16prefix ; no, O32 or A32 --> 0 0000CF7C 83C304 add bx, byte 4 ; yes, change to O16 or A16 4110 .non16prefix: 4111 %endif 0 0000CF7F 8B9F[3E01] mov bx,[prefixmnem+bx-(prefixlist.after_segment - prefixlist) *2] 0 0000CF83 31F6 xor si, si ; no operand (empty oplist) 0 0000CF85 C3 retn 4115 4116 .segprefix: 4117 %if _LINK 0 0000CF86 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 0000CF8A BB[0000] mov bx,MN_SEG 0 0000CF8D C3 retn 4127 4128 4129 usesection ASMTABLE1 === Switch to base=000000h -> "ASMTABLE1" 4129 ------------------ note: usesection ASMTABLE1 4130 fake_oplist: 4131 .op_imm8: 0 000094B2 1200 db OP_IMM8, 0 4133 .op_segments: 0 000094B4 3000 db OP_ES, 0 0 000094B6 2E00 db OP_CS, 0 0 000094B8 3300 db OP_SS, 0 0 000094BA 2F00 db OP_DS, 0 4138 %ifdef MN_GS 0 000094BC 3100 db OP_FS, 0 0 000094BE 3200 db OP_GS, 0 4141 %endif 4142 .op_loop_nasm: 0 000094C0 1B082800 db OP_SHORT, OP_REL8, OP_E_CX, 0 4144 4145 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 0000CF8E 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 0000CF91 B103 mov cl,3 0 0000CF93 D2E8 shr al,cl 0 0000CF95 2407 and al,7 0 0000CF97 C3 ret 4162 4163 ; GETREGMEM - Get the reg/mem part of the instruction 4164 4165 getregmem: 0 0000CF98 F606[E500]80 test byte [preused],GOTREGM 0 0000CF9D 750B jnz grm1 ;if we have it already 0 0000CF9F 800E[E500]80 or byte [preused],GOTREGM 0 0000CFA4 E88501 call disgetbyte ;get the byte 0 0000CFA7 A2[0000] mov [regmem],al ;save it away 4171 0 0000CFAA A0[0000] grm1: mov al,[regmem] 0 0000CFAD C3 ret 4174 4175 dis_lowercase_w: 0 0000CFAE 86C4 xchg al, ah 0 0000CFB0 E80200 call dis_lowercase 0 0000CFB3 86C4 xchg al, ah 4179 dis_lowercase: 0 0000CFB5 3C41 cmp al, 'A' 0 0000CFB7 720D jb .not 0 0000CFB9 3C5A cmp al, 'Z' 0 0000CFBB 7709 ja .not 0 0000CFBD F606[0000]01 testopt [asm_options], disasm_lowercase 0 0000CFC2 7402 jz .not 0 0000CFC4 0C20 or al, 20h 4187 .not: 0 0000CFC6 C3 retn 4189 4190 4191 dis_lowercase_refmem_w: 0 0000CFC7 86C4 xchg al, ah 0 0000CFC9 E80200 call dis_lowercase_refmem 0 0000CFCC 86C4 xchg al, ah 4195 dis_lowercase_refmem: 0 0000CFCE 3C41 cmp al, 'A' 0 0000CFD0 720D jb .not 0 0000CFD2 3C5A cmp al, 'Z' 0 0000CFD4 7709 ja .not 0 0000CFD6 F606[0000]08 testopt [asm_options], disasm_lowercase_refmem 0 0000CFDB 7402 jz .not 0 0000CFDD 0C20 or al, 20h 4203 .not: 0 0000CFDF 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 0000CFE0 BF[0000] mov di, line_out 0 0000CFE3 033E[DC00] add di, word [mnemonofs] 4218 %else 4219 mov di, line_out+MNEMONOFS 4220 %endif 0 0000CFE7 56 push si 4222 0 0000CFE8 8B4CFE mov cx, [si-2] 0 0000CFEB 83E10F and cx, 0Fh 4225 .loop: 0 0000CFEE AC lodsb 0 0000CFEF E8C3FF call dis_lowercase 0 0000CFF2 AA stosb 0 0000CFF3 E2F9 loop .loop 4230 0 0000CFF5 58 pop ax ; ax-> mnemonic 0 0000CFF6 3D[0000] cmp ax, mnlist_a_suffix_allowed ; non-suffixed mnemonic ? 0 0000CFF9 7227 jb .nosuffix ; yes --> 0 0000CFFB 3D[0000] cmp ax, mnlist_o_suffix_allowed ; optional address size suffix ? 0 0000CFFE 7208 jb .a_suffix_allowed ; yes --> 0 0000D000 3D[0000] cmp ax, mnlist_o_suffix_required; optional operand size suffix ? 0 0000D003 B410 mov ah, PREOSIZE ; (OSIZE: check OSIZE/O32) 0 0000D005 7309 jae .suffix_decide ; no, it's required --> 0 0000D007 A9 db __TEST_IMM16 ; (skip mov) 4240 .a_suffix_allowed: 0 0000D008 B420 mov ah, PREASIZE ; optional ASIZE: check ASIZE/A32 4242 4243 .suffix_decide_optional: ; check whether the suffix is necessary 0 0000D00A 8426[E400] test byte [preflags], ah ; check if such a prefix occured (ZR if not) 0 0000D00E 740E jz .suffix_invisible ; no, is default form --> (hide suffix) 4246 4247 .suffix_decide: ; suffix will be displayed, now only decide which 0 0000D010 B057 mov al, 'W' 0 0000D012 8426[E600] test byte [presizeflags], ah ; 32-bit form ? 0 0000D016 7402 jz .got_suffix ; no --> 0 0000D018 B044 mov al, 'D' 4252 .got_suffix: 0 0000D01A E898FF call dis_lowercase 0 0000D01D AA stosb ; store suffix 4255 4256 .suffix_invisible: ; notional suffix either displayed or left hidden, 0 0000D01E 0826[E500] 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 0000D022 BE[0800] mov si, line_out + 8 0 0000D025 0336[DC00] add si, word [mnemonofs] 4265 %endif 0 0000D029 B020 mov al, 32 4267 4268 %if _40COLUMNS 0 0000D02B F606[0100]02 testopt [asm_options], disasm_no_indent 0 0000D030 7506 jnz @F 4271 %endif 4272 .pad: 0 0000D032 AA stosb ; store a blank 4274 %if _40COLUMNS 0 0000D033 39F7 cmp di, si ; past 8 columns already ? 4276 %else 4277 cmp di, line_out+MNEMONOFS+8 4278 %endif 0 0000D035 72FB jb .pad ; not yet, loop --> 4280 0 0000D037 C3 retn 4282 4283 %if _40COLUMNS 4284 @@: 0 0000D038 AA stosb ; store a single blank 0 0000D039 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 0000D03A A0[F900] mov al,[segmnt] ;segment number 0 0000D03D 98 cbw 0 0000D03E D1E0 shl ax,1 0 0000D040 93 xchg ax,bx ;mov bx,ax 0 0000D041 8B87[0000] mov ax,[segrgnam+bx] ;get register name 0 0000D045 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 0000D046 E8F1FF call showseg_uppercase_ax 4309 dis_stosw_lowercase: 0 0000D049 E862FF call dis_lowercase_w 0 0000D04C AB stosw 0 0000D04D 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 0000D04E 753C jnz showsize.retn 0 0000D050 800E[0201]10 or byte [disflags], DIS_I_SHOWSIZ 0 0000D055 91 xchg ax, cx 4336 showsize: 0 0000D056 8826[F800] mov [rmsize], ah ; save r/m size 0 0000D05A 893E[0601] mov [sizeloc], di ; save where we're putting this 0 0000D05E B051 mov al, 'Q' 0 0000D060 80FC20 cmp ah, 20h ; QWORD ? 0 0000D063 7412 je .qword ; yes --> 0 0000D065 80FC00 cmp ah, 0 0 0000D068 7D09 jge .notbyte ; if word or dword --> 4344 .byte: 0 0000D06A B85445 mov ax, "TE" 0 0000D06D 50 push ax 0 0000D06E B84259 mov ax, "BY" 0 0000D071 EB0F jmp s .common 4349 4350 .notbyte: 0 0000D073 7406 je .word ; if word 4352 .dword: 0 0000D075 B044 mov al, 'D' 4354 .qword: 0 0000D077 E83BFF call dis_lowercase 0 0000D07A AA stosb 4357 .word: 0 0000D07B B85244 mov ax, "RD" 0 0000D07E 50 push ax 0 0000D07F B8574F mov ax, "WO" 4361 .common: 0 0000D082 E8C4FF call dis_stosw_lowercase 0 0000D085 58 pop ax 0 0000D086 E8C0FF call dis_stosw_lowercase 0 0000D089 B020 mov al, 32 0 0000D08B AA stosb 4367 .retn: 4368 showptr.ret: 0 0000D08C 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 0000D08D F606[0000]04 testopt [asm_options], disasm_nasm 0 0000D092 75F8 jnz .ret 0 0000D094 B85054 mov ax, "PT" 0 0000D097 E8AFFF call dis_stosw_lowercase 0 0000D09A B85220 mov ax, "R " 0 0000D09D 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 0000D09F E8A600 call disgetword 4401 .ax: 0 0000D0A2 50 push ax 0 0000D0A3 E8A200 call disgetword 4404 ; INP: stack -> low word 4405 ; ax = high word 4406 .stack: 0 0000D0A6 E8[0000] call hexword 4408 .low_stack: 0 0000D0A9 58 pop ax 0 0000D0AA 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 0000D0AD 98 cbw 0 0000D0AE D1E0 shl ax,1 0 0000D0B0 93 xchg ax,bx 0 0000D0B1 50 push ax 0 0000D0B2 8B87[0000] mov ax,[rgnam16+bx] 0 0000D0B6 E890FF call dis_stosw_lowercase 0 0000D0B9 58 pop ax 0 0000D0BA 93 xchg ax,bx 0 0000D0BB C3 ret 4428 4429 4430 %if _DISASM_32BIT 4431 ; DISCHK32D - Check for O32 (32-bit operand size). 4432 dischk32d: 0 0000D0BC 800E[E500]10 or byte [preused], PREOSIZE 0 0000D0C1 F606[E600]10 test byte [presizeflags], PRE32D 0 0000D0C6 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 0000D0C7 BE[0000] mov si,needsmsg ; candidate message 0 0000D0CA F606[0000]01 test byte [dmflags],DM_COPR 0 0000D0CF 741F jz sm1 ; if not a coprocessor instruction 0 0000D0D1 C684[0000]37 mov byte [FORCEWORD si + needsmsg.digit_6_ofs], '7' 4456 ; change message text 0 0000D0D6 A0[0000] mov al,[mach_87] 0 0000D0D9 803E[0000]00 cmp byte [has_87],0 0 0000D0DE 751B jnz sm2 ; if it has a coprocessor 0 0000D0E0 A0[0000] mov al,[machine] 0 0000D0E3 3A06[0000] cmp al,[dismach] 0 0000D0E7 7218 jb sm3 ; if we display the message 0 0000D0E9 BE[0000] mov si,needsmath ; print this message instead 0 0000D0EC B9[0000] mov cx,needsmath_L 0 0000D0EF C3 retn 4466 4467 sm1: 0 0000D0F0 BE[0000] mov si,needsmsg ; candidate message 0 0000D0F3 C684[0000]36 mov byte [FORCEWORD si + needsmsg.digit_6_ofs], '6' 4470 ; reset message text 0 0000D0F8 A0[0000] mov al,[machine] 4472 sm2: 0 0000D0FB 3A06[0000] cmp al,[dismach] 0 0000D0FF 730D jae sm4 ; if no message (so far) 4475 sm3: 0 0000D101 A0[0000] mov al,[dismach] 0 0000D104 0430 add al,'0' 0 0000D106 8884[0000] mov byte [FORCEWORD si + needsmsg.digit_x_ofs], al 0 0000D10A B9[0000] mov cx,needsmsg_L ; length of the message 0 0000D10D C3 retn 4481 4482 ; Check for obsolete instruction. 4483 sm4: 0 0000D10E BE[0000] mov si, obsolete ; candidate message 0 0000D111 89C8 mov ax, cx ; get info on this instruction 0 0000D113 B90500 mov cx, 5 0 0000D116 F2AF repne scasw 0 0000D118 7511 jne sm6 ; if no matches 0 0000D11A BF[0400] mov di, obsmach + 5 - 1 0 0000D11D 29CF sub di, cx 0 0000D11F 31C9 xor cx, cx ; clear CX: no message 0 0000D121 A0[0000] mov al, byte [mach_87] 0 0000D124 3A05 cmp al, byte [di] 0 0000D126 7E03 jle sm5 ; if this machine is OK 0 0000D128 B9[0000] mov cx, obsolete_L 4496 sm5: 0 0000D12B 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 0000D12C 1E push ds 0 0000D12D 66 _386_PM_o32 ; push esi 0 0000D12E 56 push si ; save ds, (e)si 0 0000D12F 66 _386_PM_o32 ; mov esi, dword [u_addr] 0 0000D130 8B36[0000] mov si, word [u_addr] 0 0000D134 66 _386_PM_o32 ; add esi, dword [dis_n] 0 0000D135 0336[E000] add si, word [dis_n] ; index to the right byte 0 0000D139 8E1E[0400] mov ds, word [u_addr + saSegSel] 0 0000D13D 67 _386_PM_a32 0 0000D13E AC lodsb ; get the byte 0 0000D13F 66 _386_PM_o32 ; pop esi 0 0000D140 5E pop si 0 0000D141 1F pop ds ; restore regs 0 0000D142 66 _386_PM_o32 ; inc dword [dis_n] 0 0000D143 FF06[E000] inc word [dis_n] ; indicate that we've gotten this byte 0 0000D147 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 0000D148 1E push ds 0 0000D149 66 _386_PM_o32 ; push esi 0 0000D14A 56 push si ; save ds, (e)si 0 0000D14B 66 _386_PM_o32 ; mov esi, dword [u_addr] 0 0000D14C 8B36[0000] mov si, word [u_addr] 0 0000D150 66 _386_PM_o32 ; add esi, dword [dis_n] 0 0000D151 0336[E000] add si, word [dis_n] ; index to the right byte 0 0000D155 8E1E[0400] mov ds, word [u_addr + saSegSel] 0 0000D159 67 _386_PM_a32 0 0000D15A AD lodsw ; get the word 0 0000D15B 66 _386_PM_o32 ; pop esi 0 0000D15C 5E pop si 0 0000D15D 1F pop ds ; restore regs 0 0000D15E 66 _386_PM_o32 ; add dword [dis_n], byte 2 0 0000D15F 8306[E000]02 add word [dis_n], byte 2 ; indicate that we've gotten this word 0 0000D164 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: 0 0000D165 66 _386_PM_o32 ; mov esi, dword [u_addr] 0 0000D166 8B36[0000] mov si, word [u_addr] 0 0000D16A 8E1E[0400] mov ds, word [u_addr + saSegSel] 4560 .loop: 0 0000D16E 67 _386_PM_a32 0 0000D16F AC lodsb 0 0000D170 E8[0000] call hexbyte 0 0000D173 4B dec bx 0 0000D174 75F8 jnz .loop 0 0000D176 16 push ss 0 0000D177 1F pop ds 0 0000D178 66 _386_PM_o32 ; mov dword [u_addr], esi 0 0000D179 8936[0000] mov word [u_addr], si 0 0000D17D 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 0000D17E 833E[0601]00 cmp word [sizeloc], byte 0 0 0000D183 7404 je mo1 ; if sizeloc not saved 0 0000D185 010E[0601] add word [sizeloc], cx 4581 4582 mo1: 0 0000D189 89FE mov si, di 0 0000D18B 01CF add di, cx 0 0000D18D 89F9 mov cx, di 4586 %if _40COLUMNS 0 0000D18F 81E9[0000] sub cx, line_out 0 0000D193 2B0E[DC00] sub cx, word [mnemonofs] 4589 %else 4590 sub cx, line_out+MNEMONOFS 4591 %endif 0 0000D197 57 push di 0 0000D198 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 0 0000D199 4E dec si 0 0000D19A 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 0000D19B E308 jcxz @FF 0 0000D19D 83F914 cmp cx, 20 0 0000D1A0 7703 ja @FF 4605 @@: 0 0000D1A2 A4 movsb 0 0000D1A3 E2FD loop @B 4608 @@: 4609 %endif 0 0000D1A5 F3A4 rep movsb 0 0000D1A7 5F pop di 0 0000D1A8 FC cld 0 0000D1A9 C3 retn 4614 %endif ; _LOADER 4615 4616 ..@uu_access_end: === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 0000781E ???????? eldhSignature: resb 4 ; "ELD1" 0 00007822 ?????? resb 3 ; reserved 0 00007825 ?? resb 1 ; 26 (Ctrl-Z) 0 00007826 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000782A ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 0000782C ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 0000782E ???????? eldhDataOffset: resd 1 0 00007832 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00007834 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00007836 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00007838 ???????? eldhReserved: resb 4 ; reserved 0 0000783C ???? 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 0000783E ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00007842 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00007846 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000784A ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 0000781E ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00007826 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000782A ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 0000782C ???? 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 0000781E ???? 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 00007820 ???? eldltAmount: resw 1 0 00007822 ???????? 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 0000781E ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00007820 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00007822 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00007824 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00007826 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 0000782E ???? 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 0000781E ???? eldlSignature: resw 1 ; 0E1D1h 0 00007820 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00007822 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00007824 ???? eldlUseLinkHash: resw 1 0 00007826 ???? eldlDataAmount: resw 1 0 00007828 ???? eldlDataPrefixes: resw 1 0 0000782A ???? eldlDataEntries: resw 1 0 0000782C ???? eldlDataAddresses: resw 1 0 0000782E ???? eldlCodeAmount: resw 1 0 00007830 ???? eldlCodePrefixes: resw 1 0 00007832 ???? eldlCodeEntries: resw 1 0 00007834 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00007836 ???? eldlDualAmount: resw 1 0 00007838 ???? eldlDualPrefixes: resw 1 0 0000783A ???? eldlDualEntries: resw 1 0 0000783C ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 0000781E ???? ifKeyword: resw 1 0 00007820 ???? ifDescription: resw 1 0 00007822 ???? ifOptions: resw 1 0 00007824 ???? ifValue: resw 1 0 00007826 ???? ifTrying: resw 1 0 00007828 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 0000781E ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00007822 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00007826 ???? smName1: resw 1 ; -> first string part 0 00007828 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 0000782A ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 0000782C ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 0000782E ???? smBaseNext: resw 1 0 00007830 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00007832 ???? smSpecialNext: resw 1 0 00007834 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 0000781E ?? ssLength: resb 1 ; how long this string is (only ssString) 0 0000781F ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00007820 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 0000781E ???? shHash: resw 1 ; hash value 0 00007820 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 0000781E ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00007822 ???? xmsmSourceHandle: resw 1 0 00007824 ???????? xmsmSourceAddress: resd 1 0 00007828 ???? xmsmDestHandle: resw 1 0 0000782A ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 0000D1AA 4E dec si 0 0000D1AB BA[0000] mov dx, msg.on 0 0000D1AE E8[0000] call isstring? 0 0000D1B1 750A jne @F 34 vv_on: 0 0000D1B3 AC lodsb 0 0000D1B4 E8[0000] call chkeol 0 0000D1B7 800E[0000]01 setopt [options6], opt6_vv_mode 0 0000D1BC C3 retn 39 40 @@: 0 0000D1BD BA[0000] mov dx, msg.off 0 0000D1C0 E8[0000] call isstring? 0 0000D1C3 752C jne @F 44 vv_off: 0 0000D1C5 E8[0000] call skipwhite 0 0000D1C8 4E dec si 0 0000D1C9 BA[0000] mov dx, msg.keep 0 0000D1CC E8[0000] call isstring? 0 0000D1CF 7505 jne .notkeep 0 0000D1D1 800E[0000]02 setopt [options6], opt6_vv_keep 51 .notkeep: 0 0000D1D6 E8[0000] call skipwhite 0 0000D1D9 4E dec si 0 0000D1DA BA[0000] mov dx, msg.nokeep 0 0000D1DD E8[0000] call isstring? 0 0000D1E0 7505 jne .notnokeep 0 0000D1E2 8026[0000]FD clropt [options6], opt6_vv_keep 58 .notnokeep: 0 0000D1E7 AC lodsb 0 0000D1E8 E8[0000] call chkeol 0 0000D1EB 8026[0000]FE clropt [options6], opt6_vv_mode 0 0000D1F0 C3 retn 63 64 @@: 0 0000D1F1 AC lodsb 0 0000D1F2 E8[0000] call chkeol 67 0 0000D1F5 F606[0000]01 testopt [internalflags6], dif6_vv_mode 0 0000D1FA 750C jnz @F 0 0000D1FC B83001 mov ax, 0130h 0 0000D1FF E8[0000] call setrc 0 0000D202 BA[0000] mov dx, msg.vv_disabled 0 0000D205 E9[0000] jmp putsz 74 75 @@: 0 0000D208 B000 mov al, 0 0 0000D20A 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 0000D20D F606[0000]10 testopt [options6], opt6_vv_int16 0 0000D212 750F jnz .int16 93 .terminal: 0 0000D214 800E[0000]10 setopt [internalflags3], dif3_input_terminal_override 95 ; make sure we get terminal input 0 0000D219 E8[0000] call getc 0 0000D21C 8026[0000]EF clropt [internalflags3], dif3_input_terminal_override 0 0000D221 EB04 jmp @F 99 100 .int16: 101 ; mov ah, 10h 0 0000D223 31C0 xor ax, ax 0 0000D225 CD16 int 16h 104 @@: 105 0 0000D227 B001 mov al, 1 0 0000D229 E80100 call swapscreen 0 0000D22C 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 0000D22D F606[0000]01 testopt [internalflags6], dif6_vv_mode 0 0000D232 7450 jz .done 117 118 %ifn _VXCHGBIOS 0 0000D234 BE[0000] mov si, xmsmove 0 0000D237 837C0A00 cmp word [si + XMSM.dsthdl], 0 0 0000D23B 7447 jz .done 122 0 0000D23D B10E mov cl, 14 0 0000D23F D3E0 shl ax, cl ; 0 -> 0000, 1 -> 4000h 0 0000D241 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 0000D244 B84000 mov ax, 40h ; bimodal selector/segment 0 0000D247 8EC0 mov es, ax 0 0000D249 26A14C00 mov ax, [es:4Ch] 0 0000D24D 8904 mov word [si + XMSM.size_], ax 0 0000D24F 26A14E00 mov ax, [es:4Eh] 0 0000D253 894406 mov word [si + XMSM.srcadr + 0], ax 136 137 ;--- get/set cursor position manually for speed reasons. 0 0000D256 268A1E6200 mov bl, [es:62h] 0 0000D25B B700 mov bh, 0 0 0000D25D D1E3 shl bx, 1 0 0000D25F 268B5750 mov dx, [es:bx + 50h] ; get cursor position of current page 0 0000D263 8716[0000] xchg dx, [csrpos] 143 %if 0 144 mov [es:bx + 50h], dx 145 %else 0 0000D267 268A3E6200 mov bh, byte [es:62h] 0 0000D26C B402 mov ah, 2 0 0000D26E CD10 int 10h 149 %endif 150 0 0000D270 B40B mov ah, 0Bh ; save video screen to XMS 0 0000D272 E82C00 call runxms 0 0000D275 E80D00 call swapsrcdst 0 0000D278 80740740 xor byte [si + XMSM.srcadr + 1], 40h 0 0000D27C B40B mov ah, 0Bh ; restore video screen from XMS 0 0000D27E E82000 call runxms 0 0000D281 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 0000D284 C3 retn 165 166 %ifn _VXCHGBIOS 167 swapsrcdst: 0 0000D285 8B4404 mov ax, [si + XMSM.srchdl] 0 0000D288 8B4C06 mov cx, word [si + XMSM.srcadr + 0] 0 0000D28B 8B5408 mov dx, word [si + XMSM.srcadr + 2] 0 0000D28E 87440A xchg ax, [si + XMSM.dsthdl] 0 0000D291 874C0C xchg cx, word [si + XMSM.dstadr + 0] 0 0000D294 87540E xchg dx, word [si + XMSM.dstadr + 2] 0 0000D297 894404 mov [si + XMSM.srchdl], ax 0 0000D29A 894C06 mov word [si + XMSM.srcadr + 0], cx 0 0000D29D 895408 mov word [si + XMSM.srcadr + 2], dx 0 0000D2A0 C3 retn 178 runxms: 0 0000D2A1 1E push ds 0 0000D2A2 07 pop es 181 %if _PM 0 0000D2A3 E8[0000] call ispm 0 0000D2A6 7405 jz @F 184 %endif 0 0000D2A8 FF1E[0000] call far [xmsdrv] 0 0000D2AC C3 retn 187 %if _PM 188 @@: 189 %ifn _ONLYNON386 0 0000D2AD EB26 _no386 jmp .286 191 subcpu 386 0 0000D2AF 666A00 push dword 0 ; ss:sp 0 0000D2B2 66FF36[0000] push dword [xmsdrv] 194 ; cs:ip 0 0000D2B7 666A00 push dword 0 ; fs,gs 0 0000D2BA FF36[0000] push word [pspdbg] 197 ; ds 0 0000D2BE 6A00 push word 0 ; es 0 0000D2C0 9C pushf 0 0000D2C1 6660 pushad 0 0000D2C3 6689E7 mov edi, esp 0 0000D2C6 31C9 xor cx, cx 0 0000D2C8 B700 mov bh, 0 0 0000D2CA B80103 mov ax, 0301h 0 0000D2CD CD31 int 31h 0 0000D2CF 6661 popad 0 0000D2D1 83C412 add sp, 50 - 32 ; sizeof RMCS - 32 208 ; ie discard fl, segregs, cs:ip, ss:sp 0 0000D2D4 C3 retn 210 subcpureset 211 %endif 212 %ifn _ONLY386 213 .286: 214 subcpu 286 0 0000D2D5 6A00 push word 0 0 0000D2D7 6A00 push word 0 ; ss:sp 0 0000D2D9 FF36[0200] push word [xmsdrv + 2] 0 0000D2DD FF36[0000] push word [xmsdrv] 219 ; cs:ip 0 0000D2E1 6A00 push word 0 0 0000D2E3 6A00 push word 0 ; fs,gs 0 0000D2E5 FF36[0000] push word [pspdbg] 223 ; ds 0 0000D2E9 6A00 push word 0 ; es 0 0000D2EB 9C pushf 0 0000D2EC 6A00 push word 0 0 0000D2EE 50 push ax 0 0000D2EF 6A00 push word 0 0 0000D2F1 51 push cx 0 0000D2F2 6A00 push word 0 0 0000D2F4 52 push dx 0 0000D2F5 6A00 push word 0 0 0000D2F7 53 push bx 0 0000D2F8 6A00 push word 0 0 0000D2FA 6A00 push word 0 0 0000D2FC 6A00 push word 0 ; esp 0 0000D2FE 55 push bp 0 0000D2FF 6A00 push word 0 0 0000D301 56 push si 0 0000D302 6A00 push word 0 0 0000D304 57 push di 0 0000D305 89E7 mov di, sp 0 0000D307 31C9 xor cx, cx 0 0000D309 B700 mov bh, 0 0 0000D30B B80103 mov ax, 0301h 0 0000D30E CD31 int 31h 0 0000D310 5F pop di 0 0000D311 58 pop ax 0 0000D312 5E pop si 0 0000D313 58 pop ax 0 0000D314 5D pop bp 0 0000D315 58 pop ax 0 0000D316 58 pop ax ; esp 0 0000D317 58 pop ax 0 0000D318 5B pop bx 0 0000D319 58 pop ax 0 0000D31A 5A pop dx 0 0000D31B 58 pop ax 0 0000D31C 59 pop cx 0 0000D31D 58 pop ax 0 0000D31E 58 pop ax ; ax 0 0000D31F 83C414 add sp, 50 - 32 + 2 ; sizeof RMCS - 32 + 2 263 ; ie discard eaxh and fl, segregs, cs:ip, ss:sp 0 0000D322 C3 retn 265 subcpureset 266 %endif 267 %endif 268 %endif 269 270 vv_set: 0 0000D323 F606[0000]01 testopt [options6], opt6_vv_mode 0 0000D328 750B jnz .checkenable 273 274 .checkdisable: 0 0000D32A F606[0000]01 testopt [internalflags6], dif6_vv_mode 0 0000D32F 7403E9B600 jnz vv_disable 0 0000D334 C3 retn 278 279 .checkenable: 0 0000D335 F606[0000]01 testopt [internalflags6], dif6_vv_mode 0 0000D33A 7401 jz vv_enable 282 .ret: 0 0000D33C C3 retn 284 285 vv_enable: 0 0000D33D B02F mov al, 2Fh 0 0000D33F E8[0000] call intchk 0 0000D342 7472 jz .noxmm 289 290 %ifn _VXCHGBIOS 0 0000D344 B80043 mov ax, 4300h ; check if XMM is here 292 %if _PM 0 0000D347 E87F00 call .call2F 294 %else 295 int 2Fh 296 %endif 0 0000D34A 3C80 cmp al, 80h 0 0000D34C 7568 jnz .noxmm ; no - no screen flip 0 0000D34E B81043 mov ax, 4310h 300 %if _PM 0 0000D351 E87500 call .call2F 0 0000D354 891E[0000] mov word [xmsdrv + 0], bx 0 0000D358 8916[0200] mov word [xmsdrv + 2], dx 304 %else 305 int 2Fh 306 mov word [xmsdrv + 0], bx 307 mov word [xmsdrv + 2], es 308 %endif 309 0 0000D35C BA2000 mov dx, 32 ; alloc 32 KiB EMB 0 0000D35F B409 mov ah, 9 0 0000D361 E83DFF call runxms 0 0000D364 83F801 cmp ax, 1 0 0000D367 754D jnz .noxmm 0 0000D369 BE[0000] mov si, xmsmove 0 0000D36C 89540A mov [si + XMSM.dsthdl], dx ; save the handle in block move struct. 0 0000D36F 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 0000D373 B84000 mov ax, 40h ; bi-modal segment/selector 0 0000D376 8EC0 mov es, ax 0 0000D378 26A14C00 mov ax, [es:4Ch] ; current screen size, might change! 0 0000D37C 8904 mov word [si + XMSM.size_], ax 0 0000D37E 26A14E00 mov ax, [es:4Eh] ; page start in video memory 0 0000D382 894406 mov word [si + XMSM.srcadr + 0], ax 0 0000D385 B800B0 mov ax, 0B000h 0 0000D388 26803E6304B4 cmp byte [es:463h], 0B4h 0 0000D38E 7403 je @F 0 0000D390 80CC08 or ah, 8 331 @@: 0 0000D393 894408 mov word [si + XMSM.srcadr + 2], ax 333 0 0000D396 B40F mov ah, 0Fh ; get active video page in BH 0 0000D398 CD10 int 10h 0 0000D39A B403 mov ah, 03h ; get cursor pos in DX of active page 0 0000D39C CD10 int 10h 0 0000D39E 8916[0000] mov [csrpos], dx 0 0000D3A2 26A08400 mov al, [es:84h] 0 0000D3A6 A2[0000] mov [vrows], al 0 0000D3A9 B40B mov ah, 0Bh ; save current screen now 0 0000D3AB E8F3FE 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 0000D3AE 800E[0000]01 setopt [internalflags6], dif6_vv_mode 0 0000D3B3 1E push ds 0 0000D3B4 07 pop es 0 0000D3B5 C3 retn 372 373 .noxmm: 0 0000D3B6 8026[0000]FE clropt [options6], opt6_vv_mode 0 0000D3BB 1E push ds 0 0000D3BC 07 pop es 0 0000D3BD B83101 mov ax, 0131h 0 0000D3C0 E8[0000] call setrc 0 0000D3C3 BA[0000] mov dx, msg.vv_enable_failure 0 0000D3C6 E9[0000] jmp putsz 381 382 %if _PM 383 .call2F: 0 0000D3C9 E8[0000] call ispm 0 0000D3CC 7407 jz @F 0 0000D3CE 06 push es 0 0000D3CF CD2F int 2Fh 0 0000D3D1 8CC2 mov dx, es 0 0000D3D3 07 pop es 0 0000D3D4 C3 retn 391 392 @@: 393 subcpu 286 0 0000D3D5 FF36[0000] push word [pspdbg] 0 0000D3D9 FF36[0000] push word [pspdbg] 0 0000D3DD 6A2F push word 2Fh 0 0000D3DF 55 push bp 0 0000D3E0 E8[0000]EB02[0000] dualcall intcall_return_parameter_es_parameter_ds 0 0000D3E7 5A pop dx ; discard returned ds 0 0000D3E8 5A pop dx ; get es 401 subcpureset 0 0000D3E9 C3 retn 403 %endif 404 405 vv_disable: 0 0000D3EA F606[0000]01 testopt [internalflags6], dif6_vv_mode 0 0000D3EF 7428 jz .ret 408 %ifn _VXCHGBIOS 0 0000D3F1 8B16[0A00] mov dx, word [xmsmove + XMSM.dsthdl] 0 0000D3F5 85D2 test dx, dx 0 0000D3F7 741B jz @F 412 %endif 0 0000D3F9 F606[0000]02 testopt [options6], opt6_vv_keep 0 0000D3FE 7507 jnz .keep 0 0000D400 52 push dx 0 0000D401 B000 mov al, 0 ; restore debuggee screen 0 0000D403 E827FE call swapscreen 0 0000D406 5A pop dx 419 .keep: 420 %ifn _VXCHGBIOS 0 0000D407 B40A mov ah, 0Ah ; and free XMS handle 0 0000D409 E895FE call runxms 0 0000D40C 31C0 xor ax, ax 0 0000D40E A3[0A00] mov word [xmsmove + XMSM.dsthdl], ax 0 0000D411 A3[0400] mov word [xmsmove + XMSM.srchdl], ax 426 %endif 427 428 @@: 0 0000D414 8026[0000]FE clropt [internalflags6], dif6_vv_mode 430 .ret: 0 0000D419 C3 retn 432 %else 433 434 vv equ error 435 436 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 0000781E ???????? eldhSignature: resb 4 ; "ELD1" 0 00007822 ?????? resb 3 ; reserved 0 00007825 ?? resb 1 ; 26 (Ctrl-Z) 0 00007826 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000782A ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 0000782C ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 0000782E ???????? eldhDataOffset: resd 1 0 00007832 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00007834 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00007836 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00007838 ???????? eldhReserved: resb 4 ; reserved 0 0000783C ???? 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 0000783E ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00007842 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00007846 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000784A ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 0000781E ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00007826 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000782A ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 0000782C ???? 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 0000781E ???? 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 00007820 ???? eldltAmount: resw 1 0 00007822 ???????? 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 0000781E ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00007820 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00007822 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00007824 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00007826 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 0000782E ???? 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 0000781E ???? eldlSignature: resw 1 ; 0E1D1h 0 00007820 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00007822 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00007824 ???? eldlUseLinkHash: resw 1 0 00007826 ???? eldlDataAmount: resw 1 0 00007828 ???? eldlDataPrefixes: resw 1 0 0000782A ???? eldlDataEntries: resw 1 0 0000782C ???? eldlDataAddresses: resw 1 0 0000782E ???? eldlCodeAmount: resw 1 0 00007830 ???? eldlCodePrefixes: resw 1 0 00007832 ???? eldlCodeEntries: resw 1 0 00007834 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00007836 ???? eldlDualAmount: resw 1 0 00007838 ???? eldlDualPrefixes: resw 1 0 0000783A ???? eldlDualEntries: resw 1 0 0000783C ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 0000781E ???? ifKeyword: resw 1 0 00007820 ???? ifDescription: resw 1 0 00007822 ???? ifOptions: resw 1 0 00007824 ???? ifValue: resw 1 0 00007826 ???? ifTrying: resw 1 0 00007828 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 0000781E ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00007822 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00007826 ???? smName1: resw 1 ; -> first string part 0 00007828 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 0000782A ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 0000782C ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 0000782E ???? smBaseNext: resw 1 0 00007830 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00007832 ???? smSpecialNext: resw 1 0 00007834 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 0000781E ?? ssLength: resb 1 ; how long this string is (only ssString) 0 0000781F ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00007820 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 0000781E ???? shHash: resw 1 ; hash value 0 00007820 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 0000781E ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00007822 ???? xmsmSourceHandle: resw 1 0 00007824 ???????? xmsmSourceAddress: resd 1 0 00007828 ???? xmsmDestHandle: resw 1 0 0000782A ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 20 %endif 21 22 23 %if !_LINK || !_LOADER 24 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "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 0000D41A 50 push ax 0 0000D41B 53 push bx 0 0000D41C 51 push cx 0 0000D41D 52 push dx 0 0000D41E 368026[0100]FD clropt [ss:internalflags6], dif6_locked 0 0000D424 368A1E[0000] mov bl, byte [ss:drivenumber] 0 0000D429 FEC3 inc bl 0 0000D42B B700 mov bh, 0 0 0000D42D B94A08 mov cx, 084Ah 0 0000D430 BA0100 mov dx, 0001h 0 0000D433 B80D44 mov ax, 440Dh 0 0000D436 CD21 int 21h 0 0000D438 7206 jc @F 0 0000D43A 36800E[0100]02 setopt [ss:internalflags6], dif6_locked 46 ; NC 47 @@: 0 0000D440 5A pop dx 0 0000D441 59 pop cx 0 0000D442 5B pop bx 0 0000D443 58 pop ax 0 0000D444 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 0000D445 50 push ax 0 0000D446 53 push bx 0 0000D447 51 push cx 0 0000D448 52 push dx 0 0000D449 36800E[0100]02 setopt [ss:internalflags6], dif6_locked 0 0000D44F 741C jz @F ; --> (NC) 0 0000D451 368A1E[0000] mov bl, byte [ss:drivenumber] 0 0000D456 FEC3 inc bl 0 0000D458 B700 mov bh, 0 0 0000D45A B96A08 mov cx, 086Ah 0 0000D45D BA0100 mov dx, 0001h 0 0000D460 B80D44 mov ax, 440Dh 0 0000D463 CD21 int 21h 0 0000D465 7206 jc @F 0 0000D467 368026[0100]FD clropt [ss:internalflags6], dif6_locked 75 ; NC 76 @@: 0 0000D46D 5A pop dx 0 0000D46E 59 pop cx 0 0000D46F 5B pop bx 0 0000D470 58 pop ax 0 0000D471 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 0000D472 F606[0100]40 testopt [internalflags], nodosloaded 0 0000D477 740C jz @F 90 %endif 0 0000D479 BA[0000] mov dx, msg.nobootsupp 0 0000D47C B81A01 mov ax, 011Ah 0 0000D47F E8[0000] call setrc 0 0000D482 E9[0000] jmp putsz 95 @@: 96 %endif 97 98 %if _APPLICATION || _DEVICE 0 0000D485 E8[0000] call parselw ; parse L and W argument format 0 0000D488 7503E98400 jz ww4 ; if request to write program 101 %if _PM && _NOEXTENDER 0 0000D48D E8[0000] call ispm 0 0000D490 7508 jnz .rm 0 0000D492 E8[0000] call isextenderavailable 0 0000D495 7303E9[0000] jc nodosextinst 106 .rm: 107 %endif 0 0000D49A 36A2[0000] mov byte [ss:drivenumber], al 0 0000D49E E879FF call lockdrive 0 0000D4A1 36F606[0000]06 testopt [ss:internalflags], newpacket| ntpacket 0 0000D4A7 7427 jz .oldint 0 0000D4A9 88C2 mov dl, al ; A: = 0, ... 0 0000D4AB BE0160 mov si, 6001h ; write, assume "file data" 114 %if _VDD 0 0000D4AE F606[0000]04 testopt [internalflags], ntpacket 0 0000D4B3 750A jnz .vdd 117 %endif 0 0000D4B5 FEC2 inc dl ; A: = 1, ... 0 0000D4B7 B80573 mov ax, 7305h ; ds:(e)bx-> packet 0 0000D4BA F9 stc 0 0000D4BB CD21 int 21h ; use int 21h here, not doscall 0 0000D4BD EB13 jmp short .done 123 %if _VDD 124 .vdd: 0 0000D4BF A1[0000] mov ax, word [hVdd] 0 0000D4C2 B90500 mov cx, 5 127 %if _PM 0 0000D4C5 020E[0000] add cl, byte [dpmi32] 129 %endif 0 0000D4C9 C4C4580290 DispatchCall 0 0000D4CE EB02 jmp short .done 132 %endif 133 .oldint: 0 0000D4D0 CD26 int 26h 135 .done: 0 0000D4D2 9C pushf 0 0000D4D3 E86FFF call unlockdrive 0 0000D4D6 9D popf 0 0000D4D7 BA[0000] mov dx, writing 140 ww1: 0 0000D4DA 8CD3 mov bx, ss ; restore segment registers 0 0000D4DC 8EDB mov ds, bx 0 0000D4DE 8B26[0000] mov sp, word [savesp] 0 0000D4E2 8EC3 mov es, bx 0 0000D4E4 7328 jnc ww3 ; if no error 0 0000D4E6 B410 mov ah, 10h 0 0000D4E8 E8[0000] call setrc 0 0000D4EB 3C0C cmp al, 0Ch 0 0000D4ED 7602 jbe ww2 ; if in range 0 0000D4EF B00C mov al, 0Ch 151 ww2: 0 0000D4F1 98 cbw ; ah = 0 0 0000D4F2 BB[0000] mov bx, dskerrs ; -> byte table 0 0000D4F5 D7 xlatb ; get offset from dskerrs 0 0000D4F6 01D8 add ax, bx ; -> message 0 0000D4F8 BF[0000] mov di, line_out 0 0000D4FB 89C6 mov si, ax 0 0000D4FD E8[0000] call showstring 0 0000D500 89D6 mov si, dx 0 0000D502 E8[0000] call showstring 0 0000D505 BE[0000] mov si, drive 0 0000D508 E8[0000] call showstring 0 0000D50B E8[0000] call putsline_crlf 164 ww3: 0 0000D50E 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 0000D511 E8[0000] call InDOS 0 0000D514 7403E9[0000] jnz not_while_indos 174 0 0000D519 A0[0000] mov al, byte [fileext] ; get flags of file extension 0 0000D51C F606[0100]04 testopt [options6], opt6_flat_binary 0 0000D521 750C jnz ww5 0 0000D523 A80C test al, EXT_EXE + EXT_HEX 0 0000D525 7408 jz ww5 ; if not EXE or HEX 0 0000D527 B84101 mov ax, 0141h 0 0000D52A BA[0000] mov dx, nowhexe 0 0000D52D EB0A jmp short ww6_specificerror 183 184 ww5: 0 0000D52F 3C00 cmp al, 0 0 0000D531 750C jnz ww7 ; if extension exists 0 0000D533 B84201 mov ax, 0142h 0 0000D536 BA[0000] mov dx, nownull 189 ww6_specificerror: 0 0000D539 E8[0000] call setrc 0 0000D53C E9EF00 jmp ww16 192 193 ; File extension is OK; write it. First, create the file. 194 ww7: 195 %if _PM 0 0000D53F E8[0000] call ispm 0 0000D542 750C jnz ww7_1 0 0000D544 B84001 mov ax, 0140h 0 0000D547 E8[0000] call setrc 0 0000D54A BA[0000] mov dx, nopmsupp 0 0000D54D E9[0000] jmp putsz 202 ww7_1: 203 %endif 0 0000D550 BD[0000] mov bp, line_out 0 0000D553 80FEFE cmp dh, 0FEh 0 0000D556 7207 jb ww8 ; if (dx < 0xFE00) 0 0000D558 80EEFE sub dh, 0FEh ; dx -= 0xFE00; 0 0000D55B 81C3E00F add bx, 0FE0h 209 ww8: 0 0000D55F 89560A mov word [bp+10], dx ; save lower part of address in line_out+10 0 0000D562 89DE mov si, bx ; upper part goes into si 0 0000D564 B43C mov ah, 3Ch ; create file 0 0000D566 31C9 xor cx, cx ; no attributes 0 0000D568 BA8000 mov dx, DTA 215 doscall 0 0000D56B E8[0000] nearcall _doscall 0 0000D56E 7302 jnc @F 0 0000D570 EB7D jmp ww15 ; if error 218 @@: 0 0000D572 50 push ax ; save file handle 220 221 ; Print message about writing. 0 0000D573 BA[0000] mov dx, wwmsg1 0 0000D576 E8[0000] call putsz ; print string 0 0000D579 A1[0000] mov ax, word [reg_ebx] 0 0000D57C 83F810 cmp ax, 10h 0 0000D57F 7202 jb ww9 ; if not too large 0 0000D581 31C0 xor ax, ax ; too large: zero it out 228 ww9: 0 0000D583 894608 mov word [bp+8], ax 0 0000D586 85C0 test ax, ax 0 0000D588 7403 jz ww10 0 0000D58A E8[0000] call hexnyb 233 ww10: 0 0000D58D A1[0000] mov ax, word [reg_ecx] 0 0000D590 894606 mov word [bp+6], ax 0 0000D593 E8[0000] call hexword 0 0000D596 E8[0000] call putsline ; print size 0 0000D599 BA[0000] mov dx, wwmsg2 0 0000D59C E8[0000] call putsz ; print string 240 241 ; Now write the file. Size remaining is in line_out+6. 0 0000D59F 5B pop bx ; recover file handle 0 0000D5A0 8B560A mov dx, word [bp+10] ; address to write from is si:dx 244 ww11: 0 0000D5A3 B800FE mov ax, 0FE00h 0 0000D5A6 29D0 sub ax, dx 0 0000D5A8 807E0800 cmp byte [bp+8], 0 0 0000D5AC 7508 jnz ww12 ; if more than 0FE00h bytes remaining 0 0000D5AE 3B4606 cmp ax, word [bp+6] 0 0000D5B1 7203 jb ww12 ; ditto 0 0000D5B3 8B4606 mov ax, word [bp+6] 252 ww12: 0 0000D5B6 91 xchg ax, cx ; mov cx, ax 0 0000D5B7 8EDE mov ds, si 0 0000D5B9 B440 mov ah, 40h ; write to file 0 0000D5BB CD21 int 21h ; use INT, not doscall 0 0000D5BD 16 push ss ; restore DS 0 0000D5BE 1F pop ds 0 0000D5BF 39C8 cmp ax, cx 0 0000D5C1 7515 jne ww13 ; if disk full 0 0000D5C3 31D2 xor dx, dx ; next time write from xxxx:0 0 0000D5C5 81C6E00F add si, 0FE0h ; update segment pointer 0 0000D5C9 294E06 sub word [bp+6], cx 0 0000D5CC 9F lahf 0 0000D5CD 805E0800 sbb byte [bp+8], 0 0 0000D5D1 75D0 jnz ww11 ; if more to go 0 0000D5D3 9E sahf 0 0000D5D4 75CD jnz ww11 ; ditto 0 0000D5D6 EB12 jmp short ww14 ; done 270 271 ww13: 0 0000D5D8 BA[0000] mov dx, diskful 0 0000D5DB E8[0000] call putsz ; print string 0 0000D5DE E80900 call ww14 ; close file 275 0 0000D5E1 B441 mov ah, 41h ; unlink file 0 0000D5E3 BA8000 mov dx, DTA 278 doscall 0 0000D5E6 E8[0000] nearcall _doscall 0 0000D5E9 C3 retn 280 281 ; Close the file. 282 ww14: 0 0000D5EA B43E mov ah, 3Eh ; close file 0 0000D5EC CD21 int 21h 0 0000D5EE C3 retn 286 287 ; Error opening file. This is also called by the load command. 288 ww15: 0 0000D5EF 50 push ax 0 0000D5F0 3D0001 cmp ax, 100h 0 0000D5F3 B411 mov ah, 11h ; 1100h to 11FEh 0 0000D5F5 7202 jb @F 0 0000D5F7 B0FF mov al, 0FFh ; >= 00FFh sets to 11FFh 294 @@: 0 0000D5F9 E8[0000] call setrc 0 0000D5FC 58 pop ax 0 0000D5FD 83F802 cmp ax, byte 2 0 0000D600 BA[0000] mov dx, doserr2 ; File not found 0 0000D603 7429 je ww16 0 0000D605 83F803 cmp ax, byte 3 0 0000D608 BA[0000] mov dx, doserr3 ; Path not found 0 0000D60B 7421 je ww16 0 0000D60D 83F805 cmp ax, byte 5 0 0000D610 BA[0000] mov dx, doserr5 ; Access denied 0 0000D613 7419 je ww16 0 0000D615 83F808 cmp ax, byte 8 0 0000D618 BA[0000] mov dx, doserr8 ; Insufficient memory 0 0000D61B 7411 je ww16 0 0000D61D 83F80B cmp ax, byte 11 0 0000D620 BA[0000] mov dx, doserr11 ; Invalid format 0 0000D623 7409 je ww16 0 0000D625 BF[0000] mov di, openerr1 0 0000D628 E8[0000] call hexword 0 0000D62B BA[0000] mov dx, openerr ; Error ____ opening file 315 ww16: 0 0000D62E E9[0000] jmp putsz 317 %endif 318 %endif === Trace listing source: ../lst/csx.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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00007820 ???????? eldhSignature: resb 4 ; "ELD1" 0 00007824 ?????? resb 3 ; reserved 0 00007827 ?? resb 1 ; 26 (Ctrl-Z) 0 00007828 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 0000782C ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 0000782E ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00007830 ???????? eldhDataOffset: resd 1 0 00007834 ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00007836 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00007838 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 0000783A ???????? eldhReserved: resb 4 ; reserved 0 0000783E ???? 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 00007840 ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00007844 ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00007848 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 0000784C ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00007820 ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00007828 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 0000782C ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 0000782E ???? 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 00007820 ???? 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 00007822 ???? eldltAmount: resw 1 0 00007824 ???????? 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 00007820 ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00007822 ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00007824 ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00007826 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00007828 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00007830 ???? 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 00007820 ???? eldlSignature: resw 1 ; 0E1D1h 0 00007822 ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00007824 ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00007826 ???? eldlUseLinkHash: resw 1 0 00007828 ???? eldlDataAmount: resw 1 0 0000782A ???? eldlDataPrefixes: resw 1 0 0000782C ???? eldlDataEntries: resw 1 0 0000782E ???? eldlDataAddresses: resw 1 0 00007830 ???? eldlCodeAmount: resw 1 0 00007832 ???? eldlCodePrefixes: resw 1 0 00007834 ???? eldlCodeEntries: resw 1 0 00007836 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00007838 ???? eldlDualAmount: resw 1 0 0000783A ???? eldlDualPrefixes: resw 1 0 0000783C ???? eldlDualEntries: resw 1 0 0000783E ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00007820 ???? ifKeyword: resw 1 0 00007822 ???? ifDescription: resw 1 0 00007824 ???? ifOptions: resw 1 0 00007826 ???? ifValue: resw 1 0 00007828 ???? ifTrying: resw 1 0 0000782A ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00007820 ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00007824 ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00007828 ???? smName1: resw 1 ; -> first string part 0 0000782A ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 0000782C ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 0000782E ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00007830 ???? smBaseNext: resw 1 0 00007832 ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00007834 ???? smSpecialNext: resw 1 0 00007836 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00007820 ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00007821 ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00007822 ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00007820 ???? shHash: resw 1 ; hash value 0 00007822 ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00007820 ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00007824 ???? xmsmSourceHandle: resw 1 0 00007826 ???????? xmsmSourceAddress: resd 1 0 0000782A ???? xmsmDestHandle: resw 1 0 0000782C ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 19 %endif 20 21 22 %if !_LINK || _BOOTLDR 23 usesection lDEBUG_DATA_ENTRY 23 ------------------ note: usesection lDEBUG_DATA_ENTRY 24 25 align 16, db 0 26 load_unit_flags: 0 00007820 00 times 128 db _LUF_DEFAULT_DISKETTE 0 000078A0 00 times 128 db _LUF_DEFAULT_HARDDISK 29 30 align 16, db 0 0 00007920 00 load_partition_table: times 16 * 4 db 0 32 .end: 33 34 align 16, db 0 35 ; Data passed to us from loader (in case we booted) 36 loaddata_loadedfrom: 0 00007960 00 times (-LOADDATA + bsBPB + ebpbNew + BPBN_size) db 0 38 0 000079DA 00 align 16, db 0 40 load_data_lowest: 0 000079E0 00 times LOADDATA3_size db 0 42 ; data used to access storage 43 load_data: 0 000079F0 00 times (-LOADDATA2 + bsBPB + ebpbNew + BPBN_size) db 0 0 00007A7A 00 align 16, db 0 46 load_current_settings: 47 istruc LOADSETTINGS 0 00007A80 0000 at lsKernelName, load_kernelname_default: dw 0 0 00007A82 0000 at lsAddName, load_addname_default: dw 0 0 00007A84 0000 at lsMinPara, load_minpara: dw 0 0 00007A86 0000 at lsMaxPara, load_maxpara: dw 0 0 00007A88 0000 at lsOptions, load_options: dw 0 0 00007A8A 0000 at lsSegment, load_loadseg: dw 0 0 00007A8C 00000000 at lsEntry, load_entrypoint: dd 0 0 00007A90 00000000 at lsBPB, load_bpb: dd 0 0 00007A94 00000000 at lsCopyBPB, load_copy_bpb: dd 0 0 00007A98 0000 at lsCheckOffset, load_check_offset: dw 0 0 00007A9A 0000 at lsCheckValue, load_check_value: dw 0 59 at lsName 60 ; iend 61 %pop ; (pop off the istruc context) 62 63 %if _INPUT_FILE_BOOT || _EXTENSIONS 0 00007A9C 00 align 16, db 0 65 load_yy_direntry: 0 00007AA0 00 times DIRENTRY_size db 0 67 %endif 68 69 %if _INPUT_FILE_BOOT 70 align 16, db 0 71 load_input_file: 0 00007AC0 00 times _INPUT_FILE_BOOT * LOAD_INPUT_FILE_SIZE db 0 73 .active: 0 00007D40 0000 dw 0 75 .goto_offset: 0 00007D42 0000 dw 0 77 %endif 78 79 align 4, db 0 0 00007D44 00000000 load_bpb_dest: dd 0 81 load_sectors: equ load_data - LOADDATA2 + bsBPB + bpbCHSSectors 82 load_heads: equ load_data - LOADDATA2 + bsBPB + bpbCHSHeads 83 load_sectorsize: equ load_data - LOADDATA2 + bsBPB + bpbBytesPerSector 84 load_sectorsizepara: equ load_data - LOADDATA2 + ldParaPerSector 85 load_sectorseg: equ load_data - LOADDATA2 + ldSectorSeg 0 00007D48 00000000 load_partition_sector: dd 0 87 load_ldp_sector: equ loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 0 00007D4C 00000000 load_sdp_sector: dd 0 0 00007D50 0000 load_partition_cycle: dw 0 0 00007D52 0000 load_cmdline: dw 0 91 load_ldflags: equ load_data - LOADDATA2 + ldFlags 92 load_unit: equ load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 0 00007D54 00000000 load_partition_entry: dw 0, 0 ; far pointer 0 00007D58 00 load_partition: db 0 0 00007D59 00 load_current_partition: db 0 0 00007D5A 00 load_found_partition: db 0 0 00007D5B 00 load_check_dir_attr: db 0 0 00007D5C 00 load_sector_alt: db 0 0 00007D5D 00 load_sdp_unit: db 0 0 00007D5E 00 load_cmdline_first: db 0 101 0 00007D5F 00 align 4, db 0 0 00007D60 00 load_kernel_name: times 11 + 1 db 0 104 align 2, db 0 105 ; load_kernelname_default:dw 0 106 ; ASCIZ filename for if load_kernelname_input terminates in '/' 0 00007D6C 0000 load_kernelname_input: dw 0 108 ; input (ASCIZ '/'-terminated pathnames + optional filename) 0 00007D6E 0000 load_kernelname_next: dw 0 110 ; next element in ASCIZ load_kernelname_input, 111 ; empty string if pathname terminated in '/' 112 ; load_addname_default: dw 0 0 00007D70 0000 load_addname_input: dw 0 0 00007D72 0000 load_addname_next: dw 0 115 %if _INPUT_FILE_BOOT || _EXTENSIONS 0 00007D74 0000 load_yyname_input: dw 0 0 00007D76 0000 load_yyname_next: dw 0 118 %endif 119 120 align 2, db 0 0 00007D78 0000 load_adr_dirbuf_segment:dw 0 0 00007D7A 0000 boot_new_memsizekib: dw 0 0 00007D7C 0000 boot_old_memsizekib: dw 0 0 00007D7E 00 boot_ebdaflag: db 0 ; EBDA flag: non-zero if present 125 0 00007D7F 00 align 4, db 0 0 00007D80 00000000 load_readwrite_sector: dd 0 0 00007D84 0000 load_readwrite_buffer: dw 0 0 00007D86 0000 load_readwrite_count: dw 0 0 00007D88 0000 load_readwrite_function:dw 0 131 132 133 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 133 ------------------ note: usesection lDEBUG_CODE 134 %if _LINK_COMPAT 135 align 4, db 0 136 %endif 137 %if _LINK && _BOOTLDR_DISCARD 138 behind_code_truncated: 139 %endif 140 141 init_bootcmd: section_of_function 0 0000D634 E8[0000] call guard_re 0 0000D637 BD[0002] mov bp, load_data - LOADDATA2 144 0 0000D63A F606[0000]80 testopt [internalflags3], dif3_partition_changed 0 0000D63F 7429 jz @F 147 0 0000D641 FF761E push word [bp + bsBPB + bpbHiddenSectors + 2] 0 0000D644 FF761C push word [bp + bsBPB + bpbHiddenSectors] 0 0000D647 8F06[2805] pop word [load_partition_sector] 0 0000D64B 8F06[2A05] pop word [load_partition_sector + 2] 0 0000D64F 8A0E[4002] mov cl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 0 0000D653 880E[3D05] mov byte [load_sdp_unit], cl 0 0000D657 FF761E push word [bp + bsBPB + bpbHiddenSectors + 2] 0 0000D65A FF761C push word [bp + bsBPB + bpbHiddenSectors] 0 0000D65D 8F06[2C05] pop word [load_sdp_sector] 0 0000D661 8F06[2E05] pop word [load_sdp_sector + 2] 0 0000D665 8026[0000]7F clropt [internalflags3], dif3_partition_changed 160 @@: 161 0 0000D66A 31C9 xor cx, cx 0 0000D66C 894E1C mov [bp + bsBPB + bpbHiddenSectors + 0], cx 0 0000D66F 894E1E mov [bp + bsBPB + bpbHiddenSectors + 2], cx 0 0000D672 880E[3C05] mov byte [load_sector_alt], cl 166 %if _CONFIG 0 0000D676 890E[0000] mov word [yy_boot_attempt_open_pathname], cx 168 %endif 0 0000D67A C3 retn 170 171 172 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 172 ------------------ note: usesection lDEBUG_DATA_ENTRY 173 0 00007D8A 00 align 4, db 0 175 bootcmd_dispatch: 0 00007D8C [8705] dw bootcmd.list 0 00007D8E [0000] dw msg.list 0 00007D90 [7300] dw bootcmd.quit 0 00007D92 [0000] dw msg.quit 0 00007D94 [AC09] dw boot_read 0 00007D96 [0000] dw msg.read 0 00007D98 [B409] dw boot_write 0 00007D9A [0000] dw msg.write 0 00007D9C [8212] dw boot_dir 0 00007D9E [0000] dw msg.dir 0 00007DA0 [A900] dw bootcmd.protocol 0 00007DA2 [0000] dw msg.protocol 0 00007DA4 0000 dw 0 ; table end marker 189 190 191 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 191 ------------------ note: usesection lDEBUG_CODE 192 193 bootcmd: 194 %if _PM 0 0000D67B E8[0000] call ispm 0 0000D67E 750C jnz .rm 0 0000D680 BA[0000] mov dx, nopmsupp 0 0000D683 B80102 mov ax, 0201h 0 0000D686 E8[0000] call setrc 0 0000D689 E9[0000] jmp putsz_error 201 .rm: 202 %endif 203 d4 call d4message 204 d4 asciz "In bootcmd",13,10 205 0 0000D68C E8A5FF call init_bootcmd 207 0 0000D68F E8[0000] call skipcomma 0 0000D692 4E dec si 0 0000D693 BB[6C05] mov bx, bootcmd_dispatch 211 @@: 0 0000D696 8B0F mov cx, [bx] 0 0000D698 8B5702 mov dx, [bx + 2] 0 0000D69B 83C304 add bx, 4 0 0000D69E E370 jcxz .notproto 0 0000D6A0 E8[0000] call isstring? 0 0000D6A3 75F1 jne @B 0 0000D6A5 FFE1 jmp cx 219 220 221 .quit: 222 %if _DOSEMU 0 0000D6A7 F606[0300]01 testopt [internalflags], runningdosemu 0 0000D6AC 7407 jz .quit_not_dosemu 225 0 0000D6AE 31DB xor bx, bx 0 0000D6B0 B8FFFF mov ax, -1 0 0000D6B3 CDE6 int 0E6h ; dosemu quit 229 230 .quit_not_dosemu: 231 %endif 232 233 ; from https://stackoverflow.com/a/5240330/738287 0 0000D6B5 B80153 mov ax, 5301h 0 0000D6B8 31DB xor bx, bx 0 0000D6BA CD15 int 15h ; connect to APM API 237 0 0000D6BC B80E53 mov ax, 530Eh 0 0000D6BF 31DB xor bx, bx 0 0000D6C1 B90201 mov cx, 0102h 0 0000D6C4 CD15 int 15h ; set APM version to 1.02 242 0 0000D6C6 B80753 mov ax, 5307h 0 0000D6C9 BB0100 mov bx, 1 0 0000D6CC B90300 mov cx, 3 0 0000D6CF CD15 int 15h ; shut down system 247 0 0000D6D1 BA[0000] mov dx, msg.boot_quit_fail 0 0000D6D4 B80202 mov ax, 0202h 0 0000D6D7 E8[0000] call setrc 0 0000D6DA E9[0000] jmp putsz_error 252 253 254 .protocol: 0 0000D6DD E8[0000] call skipequals 0 0000D6E0 4E dec si 0 0000D6E1 BA[0000] mov dx, msg.sector 0 0000D6E4 E8[0000] call isstring? 0 0000D6E7 7423 je .proto_sector 260 0 0000D6E9 BA[0000] mov dx, msg.sector_alt 0 0000D6EC E8[0000] call isstring? 0 0000D6EF 7416 je .proto_sector_alt 264 0 0000D6F1 BB[0000] mov bx, loadsettings 266 .proto_settings_next: 0 0000D6F4 8D571C lea dx, [bx + lsName] 0 0000D6F7 E8[0000] call isstring? 0 0000D6FA 7421 je .proto_settings 0 0000D6FC 83C324 add bx, LOADSETTINGS_size 0 0000D6FF 833F00 cmp word [bx], 0 0 0000D702 75F0 jne .proto_settings_next 273 0 0000D704 E9[0000] jmp error 275 276 .proto_sector_alt: 0 0000D707 C606[3C05]01 mov byte [load_sector_alt], 1 278 .proto_sector: 0 0000D70C E8[0000] call skipcomma 0 0000D70F A8 db __TEST_IMM8 281 .notproto: 0 0000D710 AC lodsb 0 0000D711 E89F06 call parseloadunit_default_sdp 0 0000D714 E9A503 jmp .load 285 286 287 .errordec: 0 0000D717 4E dec si 289 .error: 0 0000D718 A8 db __TEST_IMM8 ; skip pop 291 .errorpop: 0 0000D719 5E pop si 0 0000D71A E9[0000] jmp error 294 295 296 .proto_settings: 0 0000D71D 56 push si 0 0000D71E 89DE mov si, bx 0 0000D720 BF[6002] mov di, load_current_settings 0 0000D723 B90E00 mov cx, lsName >> 1 0 0000D726 F3A5 rep movsw 302 %if lsName & 1 303 movsb 304 %endif 0 0000D728 FF75E4 push word [load_kernelname_default - (load_current_settings + lsName) + di] 0 0000D72B 8F85D002 pop word [load_kernelname_input - (load_current_settings + lsName) + di] 0 0000D72F FF75E6 push word [load_addname_default - (load_current_settings + lsName) + di] 0 0000D732 8F85D402 pop word [load_addname_input - (load_current_settings + lsName) + di] 309 0 0000D736 5E pop si 311 312 d4 call d4message 313 d4 asciz "In bootcmd.proto_settings",13,10 314 315 .proto_next: 0 0000D737 E8[0000] call skipcomma 0 0000D73A 4E dec si 0 0000D73B BA[0000] mov dx, msg.segment 0 0000D73E E8[0000] call isstring? 0 0000D741 7503E98B00 je .proto_segment 0 0000D746 BA[0000] mov dx, msg.entry 0 0000D749 E8[0000] call isstring? 0 0000D74C 7503E9A300 je .proto_entry 0 0000D751 BA[0000] mov dx, msg.bpb 0 0000D754 E8[0000] call isstring? 0 0000D757 7503E9BB00 je .proto_bpb 0 0000D75C BA[0000] mov dx, msg.copybpb 0 0000D75F E8[0000] call isstring? 0 0000D762 7503E9D300 je .proto_copybpb 0 0000D767 BA[0000] mov dx, msg.minpara 0 0000D76A E8[0000] call isstring? 0 0000D76D 7503E9EB00 je .proto_minpara 0 0000D772 BA[0000] mov dx, msg.maxpara 0 0000D775 E8[0000] call isstring? 0 0000D778 7503E9F200 je .proto_maxpara 0 0000D77D BA[0000] mov dx, msg.checkoffset 0 0000D780 E8[0000] call isstring? 0 0000D783 7503E9F900 je .proto_checkoffset 0 0000D788 BA[0000] mov dx, msg.checkvalue 0 0000D78B E8[0000] call isstring? 0 0000D78E 7503E90B01 je .proto_checkvalue 342 0 0000D793 BB[0000] mov bx, loadoptiontable 344 .proto_lot_next: 0 0000D796 8B0F mov cx, [bx] ; flag 0 0000D798 8B5702 mov dx, [bx + 2] ; -> ASCIZ message 0 0000D79B 85C9 test cx, cx 0 0000D79D 7503E90E01 jz .proto_done 0 0000D7A2 E8[0000] call isstring? 0 0000D7A5 7405 je .proto_lot 0 0000D7A7 83C304 add bx, 4 0 0000D7AA EBEA jmp .proto_lot_next 353 354 .proto_lot: 0 0000D7AC E8[0000] call skipequals 0 0000D7AF 89CA mov dx, cx 0 0000D7B1 F7D2 not dx 0 0000D7B3 2116[6802] and word [load_options], dx 0 0000D7B7 E8[0000]EB02[0000] nearcall getexpression 0 0000D7BE E8[0000]EB02[0000] nearcall toboolean 0 0000D7C5 85D2 test dx, dx 0 0000D7C7 7404 jz @F 0 0000D7C9 090E[6802] or word [load_options], cx 364 @@: 0 0000D7CD 4E dec si 0 0000D7CE E966FF jmp .proto_next 367 368 .proto_segment: 0 0000D7D1 E8[0000] call skipequals 0 0000D7D4 E8[0000]EB02[0000] nearcall getword ; dx = word 0 0000D7DB 83FA50 cmp dx, 50h 0 0000D7DE 7208 jb @F 0 0000D7E0 8916[6A02] mov word [load_loadseg], dx 0 0000D7E4 4E dec si 0 0000D7E5 E94FFF jmp .proto_next 376 377 @@: 0 0000D7E8 BA[0000] mov dx, msg.boot_segment_too_low 0 0000D7EB B81002 mov ax, 0210h 0 0000D7EE E8[0000] call setrc 0 0000D7F1 E9B003 jmp .fail 382 383 384 .proto_entry: 0 0000D7F4 E8[0000] call skipequals 0 0000D7F7 31DB xor bx, bx 0 0000D7F9 E8[0000]EB02[0000] nearcall getaddr ; bx:(e)dx = addr 0 0000D800 66F7C20000FFFF _386_PM test edx, 0_FFFF_0000h 0 0000D807 0F850DFF _386_PM jnz .error 0 0000D80B 8916[6C02] mov word [load_entrypoint], dx 0 0000D80F 891E[6E02] mov word [load_entrypoint + 2], bx 0 0000D813 4E dec si 0 0000D814 E920FF jmp .proto_next 394 395 .proto_bpb: 0 0000D817 E8[0000] call skipequals 0 0000D81A 31DB xor bx, bx 0 0000D81C E8[0000]EB02[0000] nearcall getaddr ; bx:(e)dx = addr 0 0000D823 66F7C20000FFFF _386_PM test edx, 0_FFFF_0000h 0 0000D82A 0F85EAFE _386_PM jnz .error 0 0000D82E 8916[7002] mov word [load_bpb], dx 0 0000D832 891E[7202] mov word [load_bpb + 2], bx 0 0000D836 4E dec si 0 0000D837 E9FDFE jmp .proto_next 405 406 .proto_copybpb: 0 0000D83A E8[0000] call skipequals 0 0000D83D 31DB xor bx, bx 0 0000D83F E8[0000]EB02[0000] nearcall getaddr ; bx:(e)dx = addr 0 0000D846 66F7C20000FFFF _386_PM test edx, 0_FFFF_0000h 0 0000D84D 0F85C7FE _386_PM jnz .error 0 0000D851 8916[7402] mov word [load_copy_bpb], dx 0 0000D855 891E[7602] mov word [load_copy_bpb + 2], bx 0 0000D859 4E dec si 0 0000D85A E9DAFE jmp .proto_next 416 417 .proto_minpara: 0 0000D85D E8[0000] call skipequals 0 0000D860 E8[0000]EB02[0000] nearcall getword ; dx = word 0 0000D867 8916[6402] mov word [load_minpara], dx 0 0000D86B 4E dec si 0 0000D86C E9C8FE jmp .proto_next 423 424 .proto_maxpara: 0 0000D86F E8[0000] call skipequals 0 0000D872 E8[0000]EB02[0000] nearcall getword ; dx = word 0 0000D879 8916[6602] mov word [load_maxpara], dx 0 0000D87D 4E dec si 0 0000D87E E9B6FE jmp .proto_next 430 431 .proto_checkoffset: 0 0000D881 E8[0000] call skipequals 0 0000D884 E8[0000]EB02[0000] nearcall getword ; dx = word 0 0000D88B 89D0 mov ax, dx 0 0000D88D 241F and al, 31 0 0000D88F 3C1F cmp al, 31 0 0000D891 7503E982FE je .error 438 ; Previously we rejected all odd values here. Now, 439 ; we only reject a subset of odd values, namely 440 ; those that may actually cross a sector boundary. 441 ; Note that sectors may be as small as 32 bytes. 442 ; This insures the checked word never crosses a sector 443 ; boundary. Thus, loading a single sector suffices. 0 0000D896 8916[7802] mov word [load_check_offset], dx 0 0000D89A 4E dec si 0 0000D89B E999FE jmp .proto_next 447 448 .proto_checkvalue: 0 0000D89E E8[0000] call skipequals 0 0000D8A1 E8[0000]EB02[0000] nearcall getword ; dx = word 0 0000D8A8 8916[7A02] mov word [load_check_value], dx 0 0000D8AC 4E dec si 0 0000D8AD E987FE jmp .proto_next 454 455 .proto_done: 0 0000D8B0 BB[0000] mov bx, loadoptiontable.incompatible 457 @@: 0 0000D8B3 8B0F mov cx, [bx] 0 0000D8B5 0B4F02 or cx, [bx + 2] 0 0000D8B8 746B jz .proto_compatible 0 0000D8BA 8B16[6802] mov dx, word [load_options] 0 0000D8BE 21CA and dx, cx 0 0000D8C0 39CA cmp dx, cx 0 0000D8C2 7405 je .proto_incompatible 0 0000D8C4 83C304 add bx, 4 0 0000D8C7 EBEA jmp @B 467 468 .proto_incompatible: 0 0000D8C9 16 push ss 0 0000D8CA 07 pop es 0 0000D8CB B80302 mov ax, 0203h 0 0000D8CE E8[0000] call setrc 0 0000D8D1 BA[0000] mov dx, msg.bootfail 0 0000D8D4 E8[0000] call putsz_error 0 0000D8D7 BA[0000] mov dx, msg.boot_cannot_set_both 0 0000D8DA E8[0000] call putsz_error 0 0000D8DD 8B07 mov ax, word [bx] 0 0000D8DF E82200 call .proto_incompatible_get_label 0 0000D8E2 E8[0000] call putsz_error 0 0000D8E5 BA[0000] mov dx, msg.boot_and 0 0000D8E8 E8[0000] call putsz_error 0 0000D8EB 8B4702 mov ax, word [bx + 2] 0 0000D8EE E81300 call .proto_incompatible_get_label 0 0000D8F1 E8[0000] call putsz_error 0 0000D8F4 BA[0000] mov dx, msg.boot_dot_crlf 486 .putsz_errret: 0 0000D8F7 B80402 mov ax, 0204h 0 0000D8FA E8[0000] call setrc 0 0000D8FD E8[0000] call putsz_error 0 0000D900 FF26[0000] jmp near word [errret] 491 492 .proto_incompatible_get_label: 0 0000D904 53 push bx 0 0000D905 BB[0000] mov bx, loadoptiontable 495 @@: 0 0000D908 8B0F mov cx, [bx] 0 0000D90A E30E jcxz .proto_internal_error 0 0000D90C 39C8 cmp ax, cx 0 0000D90E 8B5702 mov dx, word [bx + 2] 0 0000D911 7405 je @F 0 0000D913 83C304 add bx, 4 0 0000D916 EBF0 jmp @B 503 504 @@: 0 0000D918 5B pop bx 0 0000D919 C3 retn 507 508 .proto_internal_error: 0 0000D91A BA[0000] mov dx, msg.boot_internal_error 0 0000D91D B80502 mov ax, 0205h 0 0000D920 E8[0000] call setrc 0 0000D923 EBD2 jmp .putsz_errret 513 514 515 .proto_compatible: 0 0000D925 AC lodsb 0 0000D926 E88A04 call parseloadunit_default_sdp 0 0000D929 7503E98C00 jz .fn_done_eol ; no filename given, use defaults --> 519 ; al was = '/' or '\' or first pathname's first character 520 ; si-> next char 0 0000D92E BB[4C05] mov bx, load_kernelname_input 0 0000D931 E83900 call .pathname_parse_super 523 0 0000D934 56 push si 0 0000D935 50 push ax 0 0000D936 E8[0000] call skipwh0 0 0000D939 E8[0000] call iseol? 0 0000D93C 58 pop ax 0 0000D93D 5E pop si 0 0000D93E 747C je .fn_done 531 0 0000D940 BB[5005] mov bx, load_addname_input 533 0 0000D943 E8[0000] call skipwh0 0 0000D946 3C2F cmp al, '/' 0 0000D948 7404 je @F 0 0000D94A 3C5C cmp al, '\' 0 0000D94C 751A jne .proto_not_double_slash 539 @@: 0 0000D94E 803C2F cmp byte [si], '/' 0 0000D951 7405 je @F 0 0000D953 803C5C cmp byte [si], '\' 0 0000D956 7510 jne .proto_not_double_slash 544 @@: 0 0000D958 4E dec si 0 0000D959 8937 mov word [bx], si 0 0000D95B C7042F2F mov word [si], "//" 0 0000D95F 46 inc si 0 0000D960 46 inc si 0 0000D961 AC lodsb 0 0000D962 C644FF00 mov byte [si - 1], 0 0 0000D966 EB54 jmp .fn_done 553 554 .proto_not_double_slash: 0 0000D968 E80200 call .pathname_parse_super 0 0000D96B EB4F jmp .fn_done 557 558 559 ; INP: bx -> word variable to hold filename 560 ; OUT: word [bx] -> list of /-separated pathnames, zero-terminated 561 ; CHG: ax, cx, si, di, [es:load_kernel_name] 562 .pathname_parse_super: 563 d4 call d4message 564 d4 asciz "In bootcmd.pathname_parse_super",13,10 565 0 0000D96D E8[0000] call skipwh0 0 0000D970 3C2F cmp al, '/' 0 0000D972 7404 je @F 0 0000D974 3C5C cmp al, '\' 0 0000D976 7506 jne @FF 571 @@: 0 0000D978 4E dec si 0 0000D979 8937 mov word [bx], si 0 0000D97B 46 inc si 0 0000D97C EB13 jmp .pathname_check 576 577 @@: 0 0000D97E 4E dec si 0 0000D97F 8937 mov word [bx], si 580 581 .pathname_parse: 582 .pathname_next: 583 d4 call d4message 584 d4 asciz "In bootcmd.pathname_parse",13,10 0 0000D981 E87D07 call boot_parse_fn 0 0000D984 7303 jnc @F 0 0000D986 7401 je @F ; CY ZR (have slash, si already -> next) 0 0000D988 46 inc si ; increment si -> past separator 589 @@: 590 ; al = separator char 591 ; si -> next char after that (if any) 0 0000D989 3C2F cmp al, '/' ; path separator? 0 0000D98B 7404 je .pathname_check 0 0000D98D 3C5C cmp al, '\' 0 0000D98F 7517 jne .pathname_none ; no, this was the filename --> 596 .pathname_check: 597 d4 call d4message 598 d4 asciz "In bootcmd.pathname_parse_check",13,10 0 0000D991 C644FF2F mov byte [si - 1], '/' ; normalise path separator 0 0000D995 AC lodsb 0 0000D996 3C20 cmp al, 32 ; space ? 0 0000D998 740E je .pathname_gotfirst 0 0000D99A 3C09 cmp al, 9 0 0000D99C 740A je .pathname_gotfirst ; yes, allow for second name --> 0 0000D99E 4E dec si 0 0000D99F E8[0000] call iseol? ; EOL ? 0 0000D9A2 75DD jne .pathname_next ; no, next pathname element --> 0 0000D9A4 C60400 mov byte [si], 0 ; terminate after trailing path sep 0 0000D9A7 C3 retn 610 611 .pathname_gotfirst: 612 .pathname_none: 0 0000D9A8 B000 mov al, 0 0 0000D9AA 4E dec si 0 0000D9AB 8604 xchg al, byte [si] ; terminate after filename 0 0000D9AD 84C0 test al, al 0 0000D9AF 7407 jz @F 0 0000D9B1 8936[0000] mov word [terminator_in_line_in.offset], si 0 0000D9B5 A2[0000] mov byte [terminator_in_line_in.value], al 620 @@: 0 0000D9B8 46 inc si 0 0000D9B9 C3 retn 623 624 625 ; DPR:word [load_kernelname_input] -> ASCIZ pathname. 626 ; if it ends in '/', append DPR:word [load_kernelname_default] 627 ; DPR:word [load_addname_input] -> ASCIZ pathname. 628 ; if it ends in '/', append DPR:word [load_addname_default] 629 ; if it's empty (and no trailing '/' in front of the zero) 630 ; then no additional name is given. 631 .fn_done_eol: 0 0000D9BA B00D mov al, 13 633 .fn_done: 634 d4 call d4message 635 d4 asciz "In bootcmd.fn_done",13,10 636 0 0000D9BC 8326[3205]00 and word [load_cmdline], 0 638 0 0000D9C1 E8[0000] call skipwh0 0 0000D9C4 E8[0000] call iseol?.notsemicolon 0 0000D9C7 7450 je @F 642 0 0000D9C9 F606[6902]10 testopt [load_options], LOAD_CMDLINE 0 0000D9CE 7509 jnz .cmdline 0 0000D9D0 3C3B cmp al, ';' 0 0000D9D2 7403E9[0000] jne error 0 0000D9D7 EB40 jmp @F 648 .cmdline: 649 0 0000D9D9 B400 mov ah, 0 0 0000D9DB 8826[3E05] mov byte [load_cmdline_first], ah 0 0000D9DF 3C22 cmp al, '"' 0 0000D9E1 7404 je .cmdline_quote 0 0000D9E3 3C27 cmp al, "'" 0 0000D9E5 7504 jne .cmdline_no_quote 656 .cmdline_quote: 0 0000D9E7 88C4 mov ah, al 0 0000D9E9 EB0B jmp .cmdline_loop_1 659 .cmdline_no_quote: 0 0000D9EB 4E dec si 0 0000D9EC 8936[3205] mov word [load_cmdline], si 0 0000D9F0 46 inc si 0 0000D9F1 A2[3E05] mov byte [load_cmdline_first], al 0 0000D9F4 EB05 jmp .cmdline_loop_2 665 666 .cmdline_loop_1: 0 0000D9F6 8936[3205] mov word [load_cmdline], si 668 .cmdline_loop: 0 0000D9FA AC lodsb 670 .cmdline_loop_2: 0 0000D9FB E8[0000] call iseol?.notsemicolon 0 0000D9FE 740E je .cmdline_eol 0 0000DA00 38E0 cmp al, ah 0 0000DA02 75F6 jne .cmdline_loop 675 .cmdline_quote_eol: 0 0000DA04 C644FF00 mov byte [si - 1], 0 0 0000DA08 AC lodsb 0 0000DA09 E8[0000] call chkeol 0 0000DA0C EB0B jmp @F 680 681 .cmdline_eol: 0 0000DA0E 84E4 test ah, ah 0 0000DA10 7403E9[0000] jnz error 0 0000DA15 C644FF00 mov byte [si - 1], 0 685 686 @@: 0 0000DA19 F606[0000]07 testopt [internalflags3], dif3_load_is_dp 0 0000DA1E 7527 jnz .load_kernel_from_ldp 689 0 0000DA20 8A1E[3805] mov bl, [load_partition] 0 0000DA24 803E[4002]80 cmp byte [load_unit], 80h 0 0000DA29 7228 jb .p_f_is_diskette 0 0000DA2B 84DB test bl, bl ; partition specified ? 0 0000DA2D 7503E9E6FC jz .error ; no, error --> 695 0 0000DA32 E81816 call query_geometry 697 0 0000DA35 B9[D20B] mov cx, load_freedos_from_partition 0 0000DA38 E85E14 call scan_partitions 0 0000DA3B BA[0000] mov dx, msg.boot_partition_not_found 0 0000DA3E B81102 mov ax, 0211h 0 0000DA41 E8[0000] call setrc 0 0000DA44 E95D01 jmp .fail 704 705 706 .load_kernel_from_ldp: 0 0000DA47 E80316 call query_geometry 0 0000DA4A A1[2805] mov ax, word [load_partition_sector] 0 0000DA4D 8B16[2A05] mov dx, word [load_partition_sector + 2] 0 0000DA51 EB0E jmp @F 711 712 713 .p_f_is_diskette: 0 0000DA53 84DB test bl, bl ; partition specified ? 0 0000DA55 7403E9BEFC jnz .error ; yes, error --> 716 0 0000DA5A E8F015 call query_geometry 718 0 0000DA5D 31C0 xor ax, ax 0 0000DA5F 31D2 xor dx, dx 721 @@: 0 0000DA61 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000DA65 52 push dx 0 0000DA66 50 push ax 0 0000DA67 E8AF17 call read_ae_512_bytes 726 0 0000DA6A 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000DA71 7403E9851C jne boot_sigmismatch 0 0000DA76 58 pop ax 0 0000DA77 5A pop dx 731 732 %if _LOADER 733 mov bx, 60h 734 cmp byte [currentposition], 0 735 ja .notbottom 736 mov bx, ds 737 add bx, word [liiAmountParagraphs] 738 .notbottom: 739 mov [loader_lowest_free], bx 740 %endif 741 0 0000DA78 06 push es 0 0000DA79 F606[6902]40 testopt [load_options], LOAD_SET_DSSI_PARTINFO 0 0000DA7E 7438 jz @F 745 0 0000DA80 50 push ax 747 %if _LOADER 748 mov es, bx 749 xor di, di 750 cmp bx, 60h 751 ja .loader 752 %endif 0 0000DA81 31FF xor di, di 0 0000DA83 8EC7 mov es, di 0 0000DA85 BF0006 mov di, 600h 756 .loader: 0 0000DA88 B8CD19 mov ax, 19CDh 0 0000DA8B AB stosw ; fake boot sector loader 0 0000DA8C B9FE00 mov cx, 508 / 2 0 0000DA8F 31C0 xor ax, ax 0 0000DA91 F3AB rep stosw ; initialise pseudo MBR 0 0000DA93 B855AA mov ax, 0AA55h 0 0000DA96 AB stosw ; fake boot sector signature 0 0000DA97 58 pop ax 765 0 0000DA98 8D75BE lea si, [di - 2 - 64] ; -> first partition table entry 767 0 0000DA9B 26894408 mov word [es:si + 8], ax 0 0000DA9F 2689540A mov word [es:si + 8 + 2], dx ; store in partition table entry 0 0000DAA3 26C60480 mov byte [es:si + piBoot], 80h ; fake primary active 0 0000DAA7 26C64404FF mov byte [es:si + piType], 0FFh ; fake a type 0 0000DAAC 26FE440C inc byte [es:si + piLength] ; fake a size 773 0 0000DAB0 8C06[3605] mov word [load_partition_entry + 2], es 0 0000DAB4 8936[3405] mov word [load_partition_entry], si 776 @@: 0 0000DAB8 07 pop es 778 0 0000DAB9 E9C307 jmp load_freedos_common 780 781 782 .load: 0 0000DABC 7403E957FC jnz bootcmd.error 784 0 0000DAC1 F606[0000]07 testopt [internalflags3], dif3_load_is_dp 0 0000DAC6 751C jnz .load_sector_from_ldp 787 0 0000DAC8 803E[3805]00 cmp byte [load_partition], 0 0 0000DACD 7421 je .load_boot 790 0 0000DACF E87B15 call query_geometry 792 793 %if _LOADER 794 cmp byte [currentposition], 0 795 je ..@loader_bottom_not_allowed 796 %endif 797 798 d4 call d4message 799 d4 asciz "In bootcmd.load (before call to scan_partitions)",13,10 800 0 0000DAD2 B9[5F0B] mov cx, load_from_partition 0 0000DAD5 E8C113 call scan_partitions 0 0000DAD8 BA[0000] mov dx, msg.boot_partition_not_found 0 0000DADB B81202 mov ax, 0212h 0 0000DADE E8[0000] call setrc 0 0000DAE1 E9C000 jmp .fail 807 808 %if _LOADER 809 ..@loader_bottom_not_allowed: 810 mov dx, msg.loader_bottom_not_allowed 811 mov ax, 0288h 812 jmp @F 813 814 ..@loader_too_low_load: 815 mov dx, msg.loader_too_low_load 816 mov ax, 0289h 817 @@: 818 call setrc 819 call putsz_error 820 jmp cmd3 821 %endif 822 823 824 .load_sector_from_ldp: 0 0000DAE4 E86615 call query_geometry 0 0000DAE7 A1[2805] mov ax, word [load_partition_sector] 0 0000DAEA 8B16[2A05] mov dx, word [load_partition_sector + 2] 0 0000DAEE EB07 jmp @F 829 830 .load_boot: 0 0000DAF0 E85A15 call query_geometry 832 0 0000DAF3 31C0 xor ax, ax 0 0000DAF5 31D2 xor dx, dx 835 @@: 836 837 %if _LOADER 838 cmp byte [currentposition], 0 839 je ..@loader_bottom_not_allowed 840 %endif 841 0 0000DAF7 BBC007 mov bx, 7C0h 843 d4 call d4dumpregs 844 d4 call d4message 845 d4 asciz 13,10,"In bootcmd.load_boot (before call to read_sector)",13,10 0 0000DAFA 52 push dx 0 0000DAFB 50 push ax 0 0000DAFC E81A17 call read_ae_512_bytes 849 d4 call d4message 850 d4 asciz "In bootcmd.load_boot (after call to read_sector)",13,10 0 0000DAFF 31D2 xor dx, dx 0 0000DB01 8EC2 mov es, dx 853 0 0000DB03 A0[4002] mov al, byte [load_unit] ; al = boot unit 0 0000DB06 BB007C mov bx, 7C00h 856 0 0000DB09 26813EFE7D55AA cmp word [es:7C00h + 510], 0AA55h 0 0000DB10 7403E9E61B jne boot_sigmismatch 859 0 0000DB15 26833F00 cmp word [es:bx], 0 0 0000DB19 7503E9E91B je boot_codemismatch 862 0 0000DB1E 50 push ax 0 0000DB1F B9FF00 mov cx, 510 / 2 0 0000DB22 BF0006 mov di, 600h ; MBR location 0 0000DB25 31C0 xor ax, ax 0 0000DB27 F3AB rep stosw ; initialise (sector and all entries) 0 0000DB29 B855AA mov ax, 0AA55h 0 0000DB2C AB stosw ; initialise boot sector signature 0 0000DB2D 26C7060006CD19 mov word [es:600h], 019CDh ; initialise boot sector code 0 0000DB34 BFBE07 mov di, 600h + 510 - 4*16 ; -> first partition table entry 0 0000DB37 58 pop ax 0 0000DB38 268F4508 pop word [es:di + piStart] 0 0000DB3C 268F450A pop word [es:di + piStart + 2] ; = boot sector LBA 0 0000DB40 26C60580 mov byte [es:di + 0], 80h ; "bootable" flag set 0 0000DB44 26C64504FF mov byte [es:di + 4], 0FFh ; dummy value for FS type (nonzero) 0 0000DB49 26C6450C01 mov byte [es:di + 12], 1 ; dummy value for length (nonzero) 878 879 load_partition_common: equ $ 0 0000DB4E 8126[0000]FFF8 and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 0 0000DB54 893E[0000] mov word [reg_esi], di 0 0000DB58 893E[0000] mov word [reg_ebp], di 0 0000DB5C 890E[0000] mov word [reg_ds], cx ; ds:si -> 0:600h + offset to first entry 0 0000DB60 A2[0000] mov byte [reg_edx], al ; dl = boot unit 0 0000DB63 891E[0000] mov word [reg_eip], bx 0 0000DB67 890E[0200] mov word [reg_eip + 2], cx 0 0000DB6B 890E[0000] mov word [reg_cs], cx ; cs:eip = 0:7C00h 0 0000DB6F 803E[3C05]00 cmp byte [load_sector_alt], 0 0 0000DB74 740A je @F 0 0000DB76 890E[0000] mov word [reg_eip], cx 0 0000DB7A C706[0000]C007 mov word [reg_cs], 7C0h ; cs:eip = 07C0h:0 892 @@: 0 0000DB80 891E[0000] mov word [reg_esp], bx 0 0000DB84 890E[0200] mov word [reg_esp + 2], cx 0 0000DB88 890E[0000] mov word [reg_ss], cx ; ss:esp = 0:7C00h 0 0000DB8C 800E[0300]01 setopt [internalflags2], dif2_boot_loaded_kernel 0 0000DB91 C3 retn 898 899 900 .fail_read: 0 0000DB92 16 push ss 0 0000DB93 07 pop es 0 0000DB94 BF[0000] mov di, msg.bootfail_read_errorcode 0 0000DB97 88E0 mov al, ah 0 0000DB99 B404 mov ah, 04h 0 0000DB9B E8[0000] call setrc 0 0000DB9E E8[0000] call hexbyte 0 0000DBA1 BA[0000] mov dx, msg.bootfail_read 909 910 .fail: 0 0000DBA4 16 push ss 0 0000DBA5 07 pop es 0 0000DBA6 52 push dx 0 0000DBA7 BA[0000] mov dx, msg.bootfail 0 0000DBAA E8[0000] call putsz_error 0 0000DBAD 5A pop dx 0 0000DBAE E8[0000] call putsz_error 0 0000DBB1 B8FF02 mov ax, 02FFh 0 0000DBB4 E8[0000] call setrc 0 0000DBB7 FF26[0000] jmp near word [errret] 921 922 923 bootcmd.list: 0 0000DBBB E8[0000] call skipcomma 925 0 0000DBBE E8F201 call parseloadunit_default_sdp 0 0000DBC1 7403E952FB jnz bootcmd.error 928 0 0000DBC6 E88414 call query_geometry 930 0 0000DBC9 F606[0000]07 testopt [internalflags3], dif3_load_is_dp 0 0000DBCE 752B jnz .list_ldp 933 0 0000DBD0 803E[3805]00 cmp byte [load_partition], 0 0 0000DBD5 741E je .listall 936 0 0000DBD7 C606[3A05]00 mov byte [load_found_partition], 0 0 0000DBDC B9[0006] mov cx, list_single_partition 0 0000DBDF E8B712 call scan_partitions 0 0000DBE2 803E[3A05]00 cmp byte [load_found_partition], 0 0 0000DBE7 750B jne @F 0 0000DBE9 BA[0000] mov dx, msg.boot_partition_not_found 0 0000DBEC B81302 mov ax, 0213h 0 0000DBEF E8[0000] call setrc 0 0000DBF2 EBB0 jmp bootcmd.fail 946 @@: 0 0000DBF4 C3 retn 948 949 .listall: 0 0000DBF5 B9[0E06] mov cx, list_any_partition 0 0000DBF8 E99E12 jmp scan_partitions 952 953 .list_ldp: 0 0000DBFB C606[3A05]00 mov byte [load_found_partition], 0 0 0000DC00 B9[E505] mov cx, list_partition_if_ldp 0 0000DC03 E89312 call scan_partitions 0 0000DC06 803E[3A05]00 cmp byte [load_found_partition], 0 0 0000DC0B 750B jne @F 0 0000DC0D BA[0000] mov dx, msg.boot_partition_not_found 0 0000DC10 B81402 mov ax, 0214h 0 0000DC13 E8[0000] call setrc 0 0000DC16 EB8C jmp bootcmd.fail 963 @@: 0 0000DC18 C3 retn 965 966 967 list_partition_if_ldp: 968 d4 call d4message 969 d4 asciz "In list_partition_if_ldp",13,10 970 0 0000DC19 8B43F8 mov ax, word [bp + di - 8] 0 0000DC1C 8B53FA mov dx, word [bp + di - 6] ; root 0 0000DC1F 26034408 add ax, word [es:si + 8] 0 0000DC23 2613540A adc dx, word [es:si + 8 + 2] ; add partition offset 0 0000DC27 3906[2805] cmp word [load_partition_sector], ax 0 0000DC2B 7506 jne @F 0 0000DC2D 3916[2A05] cmp word [load_partition_sector + 2], dx 0 0000DC31 740B je list_single_partition.gotit 979 @@: 0 0000DC33 C3 retn 981 982 list_single_partition: 983 d4 call d4message 984 d4 asciz "In list_single_partition",13,10 985 0 0000DC34 A0[3905] mov al, byte [load_current_partition] 0 0000DC37 3A06[3805] cmp al, byte [load_partition] 0 0000DC3B 7401 je .gotit 0 0000DC3D C3 retn 990 991 .gotit: 0 0000DC3E FE06[3A05] inc byte [load_found_partition] 993 994 ; INP: es:si -> partition table entry, 995 ; si = load_partition_table .. load_partition_table+48, 996 ; es = ss 997 ; bp + di -> above part table metadata, 998 ; dwo [bp + di - 4] = root (outermost extended position) 999 ; dwo [bp + di - 8] = base (current table position) 1000 ; CHG: ax, bx, (cx), dx 1001 list_any_partition: 0 0000DC42 06 push es 0 0000DC43 51 push cx 0 0000DC44 56 push si 0 0000DC45 57 push di 1006 0 0000DC46 BF[0000] mov di, line_out ; reset di 0 0000DC49 B075 mov al, "u" 0 0000DC4B AA stosb 0 0000DC4C A0[4002] mov al, byte [load_unit] 0 0000DC4F E8[0000] call hexbyte 0 0000DC52 84C0 test al, al 0 0000DC54 B02E mov al, '.' 0 0000DC56 AA stosb 0 0000DC57 7806 js @F 0 0000DC59 B020 mov al, 32 0 0000DC5B AA stosb 0 0000DC5C AA stosb 0 0000DC5D EB0D jmp @FF 1020 1021 @@: 0 0000DC5F A0[3905] mov al, byte [load_current_partition] 0 0000DC62 E8[0000] call decbyte 0 0000DC65 3C0A cmp al, 10 0 0000DC67 B020 mov al, 32 0 0000DC69 7301 jae @F 0 0000DC6B AA stosb 1028 @@: 0 0000DC6C AA stosb 1030 0 0000DC6D A0[4002] mov al, byte [load_unit] 0 0000DC70 50 push ax 0 0000DC71 BB6664 mov bx, "fd" 0 0000DC74 3C80 cmp al, 80h 0 0000DC76 7202 jb @F 0 0000DC78 B368 mov bl, "h" 1037 @@: 0 0000DC7A 247F and al, ~80h 0 0000DC7C 0461 add al, 'a' 0 0000DC7E 3C7A cmp al, 'z' 0 0000DC80 760A jbe @F 0 0000DC82 58 pop ax 0 0000DC83 B020 mov al, 32 0 0000DC85 B90500 mov cx, 3 + 2 0 0000DC88 F3AA rep stosb 0 0000DC8A EB1C jmp .beyondZ 1047 1048 @@: 0 0000DC8C 93 xchg ax, bx 0 0000DC8D AB stosw 0 0000DC8E 93 xchg ax, bx 0 0000DC8F AA stosb 0 0000DC90 58 pop ax 0 0000DC91 84C0 test al, al 0 0000DC93 7806 js @F 0 0000DC95 B020 mov al, 32 0 0000DC97 AA stosb 0 0000DC98 AA stosb 0 0000DC99 EB0D jmp @FF 1060 1061 @@: 0 0000DC9B A0[3905] mov al, byte [load_current_partition] 0 0000DC9E E8[0000] call decbyte 0 0000DCA1 3C0A cmp al, 10 0 0000DCA3 B020 mov al, 32 0 0000DCA5 7301 jae @F 0 0000DCA7 AA stosb 1068 @@: 1069 .beyondZ: 0 0000DCA8 AA stosb 1071 0 0000DCA9 8A4404 mov al, byte [si + 4] 0 0000DCAC E8[0000] call hexbyte 1074 0 0000DCAF B020 mov al, 32 0 0000DCB1 AA stosb 1077 0 0000DCB2 89F9 mov cx, di ; (preserve di in line_out) 0 0000DCB4 5F pop di ; get di of scan_partitions 0 0000DCB5 57 push di 0 0000DCB6 8B43F8 mov ax, word [bp + di - 8] 0 0000DCB9 8B53FA mov dx, word [bp + di - 6] ; root 0 0000DCBC 89CF mov di, cx ; (preserve di in line_out) 0 0000DCBE 034408 add ax, word [si + 8] 0 0000DCC1 13540A adc dx, word [si + 8 + 2] ; add partition offset 0 0000DCC4 92 xchg ax, dx 0 0000DCC5 E8[0000] call hexword 0 0000DCC8 92 xchg ax, dx 0 0000DCC9 E8[0000] call hexword 1090 0 0000DCCC 50 push ax 0 0000DCCD B82028 mov ax, " (" 0 0000DCD0 AB stosw 0 0000DCD1 58 pop ax 0 0000DCD2 51 push cx 0 0000DCD3 53 push bx 0 0000DCD4 8B0E[0B02] mov cx, [load_sectorsize] 0 0000DCD8 BB0800 mov bx, 4+4 0 0000DCDB E8[0000] call disp_dxax_times_cx_width_bx_size.store 0 0000DCDE 50 push ax 0 0000DCDF B82920 mov ax, ") " 0 0000DCE2 AB stosw 0 0000DCE3 58 pop ax 1104 0 0000DCE4 52 push dx 0 0000DCE5 50 push ax 1107 0 0000DCE6 8B440C mov ax, word [si + 12] 0 0000DCE9 8B540E mov dx, word [si + 12 + 2] 0 0000DCEC 92 xchg ax, dx 0 0000DCED E8[0000] call hexword 0 0000DCF0 92 xchg ax, dx 0 0000DCF1 E8[0000] call hexword 1114 0 0000DCF4 50 push ax 0 0000DCF5 B82028 mov ax, " (" 0 0000DCF8 AB stosw 0 0000DCF9 58 pop ax 0 0000DCFA E8[0000] call disp_dxax_times_cx_width_bx_size.store 0 0000DCFD B029 mov al, ")" 0 0000DCFF AA stosb 1122 0 0000DD00 58 pop ax 0 0000DD01 5A pop dx 1125 0 0000DD02 5B pop bx 0 0000DD03 59 pop cx 1128 0 0000DD04 807C0483 cmp byte [si + piType], ptLinux 0 0000DD08 753D jne .notlinux 1131 0 0000DD0A 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000DD0E E8F714 call read_ae_1536_bytes 1134 0 0000DD11 26813E380453EF cmp word [es:1024 + 56], 0xEF53 ; s_magic == EXT2_SUPER_MAGIC ? 0 0000DD18 7510 jne .nolabel_j 1137 0 0000DD1A 26833E4E0400 cmp word [es:1024 + 76 + 2], 0 0 0000DD20 7508 jne .nolabel_j 0 0000DD22 26833E4C0401 cmp word [es:1024 + 76], 1 ; s_rev_level == EXT2_DYNAMIC_REV ? 0 0000DD28 7402 je @F 1142 .nolabel_j: 0 0000DD2A EB7D jmp .nolabel 1144 @@: 1145 0 0000DD2C 06 push es 0 0000DD2D 1F pop ds 0 0000DD2E BE7804 mov si, 1024 + 120 0 0000DD31 B91000 mov cx, 16 0 0000DD34 16 push ss 0 0000DD35 07 pop es 1152 0 0000DD36 B020 mov al, 32 0 0000DD38 AA stosb 1155 @@: 0 0000DD39 AC lodsb 0 0000DD3A 84C0 test al, al 0 0000DD3C 7403 jz @F 0 0000DD3E AA stosb 0 0000DD3F E2F8 loop @B 1161 @@: 1162 0 0000DD41 16 push ss 0 0000DD42 1F pop ds 1165 0 0000DD43 59 pop cx 0 0000DD44 5E pop si 0 0000DD45 56 push si ; get si of scan_partitions 0 0000DD46 51 push cx 1170 1171 .notlinux: 0 0000DD47 8A5C04 mov bl, byte [si + piType] 0 0000DD4A 80FB01 cmp bl, ptFAT12 0 0000DD4D 7419 je .isfat 0 0000DD4F 80FB04 cmp bl, ptFAT16_16BIT_CHS 0 0000DD52 7414 je .isfat 0 0000DD54 80FB06 cmp bl, ptFAT16_CHS 0 0000DD57 740F je .isfat 0 0000DD59 80FB0B cmp bl, ptFAT32_CHS 0 0000DD5C 740A je .isfat 0 0000DD5E 80FB0C cmp bl, ptFAT32 0 0000DD61 7405 je .isfat 0 0000DD63 80FB0E cmp bl, ptFAT16 0 0000DD66 7541 jne .notfat 1185 .isfat: 1186 0 0000DD68 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000DD6C E8AA14 call read_ae_512_bytes 1189 0 0000DD6F 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000DD76 7531 jne .nolabel 0 0000DD78 26833E0B0000 cmp word [es:bsBPB + bpbBytesPerSector], 0 0 0000DD7E 7429 je .nolabel 0 0000DD80 BE2B00 mov si, bsBPB + bpbNew + bpbnVolumeLabel 0 0000DD83 26833E160000 cmp word [es:bsBPB + bpbSectorsPerFAT], 0 0 0000DD89 7503 jne @F 0 0000DD8B BE4700 mov si, bsBPB + ebpbNew + bpbnVolumeLabel 1198 @@: 0 0000DD8E 26807CFB29 cmp byte [es:si - bpbnVolumeLabel + bpbnExtBPBSignature], 29h 0 0000DD93 7514 jne .nolabel 0 0000DD95 B90B00 mov cx, 11 1202 0 0000DD98 06 push es 0 0000DD99 1F pop ds 0 0000DD9A 16 push ss 0 0000DD9B 07 pop es 1207 0 0000DD9C B020 mov al, 32 0 0000DD9E AA stosb 1210 @@: 0 0000DD9F AC lodsb 0 0000DDA0 84C0 test al, al 0 0000DDA2 7403 jz @F 0 0000DDA4 AA stosb 0 0000DDA5 E2F8 loop @B 1216 @@: 1217 0 0000DDA7 16 push ss 0 0000DDA8 1F pop ds 1220 .notfat: 1221 .nolabel: 0 0000DDA9 16 push ss 0 0000DDAA 07 pop es 0 0000DDAB E8[0000] call putsline_crlf 1225 0 0000DDAE 5F pop di 0 0000DDAF 5E pop si 0 0000DDB0 59 pop cx 0 0000DDB1 07 pop es 0 0000DDB2 C3 retn 1231 1232 1233 ; INP: al = first character 1234 ; si -> next 1235 ; OUT: NC 1236 ; byte [load_unit] set 1237 ; byte [load_partition] set 1238 ; (zero if none specified, -1 if ldp or sdp) 1239 ; opt [internalflags3] & dif3_load_is_ldp 1240 ; opt [internalflags3] & dif3_load_is_sdp 1241 ; dword [load_partition_sector] set if ldp or sdp 1242 ; ZR if no filename specified (at end of input) 1243 ; NZ if presumably a filename specified, 1244 ; al = first character (slash or whatever non-blank) 1245 ; si -> next 1246 ; CHG: bx, cx, dx, ax, si, di 1247 ; STT: ds = es = ss 1248 parseloadunit_default_sdp: 0 0000DDB3 F8 clc 1250 .cf: 0 0000DDB4 E82C00 call parseloadunit 0 0000DDB7 7329 jnc @F 1253 0 0000DDB9 8A16[3D05] mov dl, byte [load_sdp_unit] 0 0000DDBD 8816[4002] mov byte [load_unit], dl 0 0000DDC1 FF36[2E05] push word [load_sdp_sector + 2] 0 0000DDC5 FF36[2C05] push word [load_sdp_sector] 0 0000DDC9 8F06[2805] pop word [load_partition_sector] 0 0000DDCD 8F06[2A05] pop word [load_partition_sector + 2] 0 0000DDD1 C606[3805]FF mov byte [load_partition], -1 0 0000DDD6 800E[0000]02 or byte [internalflags3], dif3_load_is_sdp 1262 0 0000DDDB E8[0000] call skipwh0 0 0000DDDE E8[0000] call iseol? 0 0000DDE1 F8 clc 1266 @@: 0 0000DDE2 C3 retn 1268 1269 1270 ; INP: al = first character 1271 ; si -> next 1272 ; CY if not to set sdp 1273 ; OUT: CY if no load unit 1274 ; (not "HD[A-Z]", "FD[A-Z]", "LD[P]", "SD[P]", "U[0-9A-F]") 1275 ; note: this is barely used! 1276 ; NC else, 1277 ; byte [load_unit] set 1278 ; byte [load_partition] set 1279 ; (zero if none specified, -1 if ldp or sdp) 1280 ; opt [internalflags3] & dif3_load_is_ldp 1281 ; opt [internalflags3] & dif3_load_is_sdp 1282 ; dword [load_partition_sector] set if ldp or sdp 1283 ; ZR if no filename specified (at end of input) 1284 ; NZ if presumably a filename specified, 1285 ; al = first character (slash or whatever non-blank) 1286 ; si -> next 1287 ; CHG: bx, cx, dx, ax, si, di 1288 ; STT: ds = es = ss 1289 parseloadunit: 1290 lframe near 1291 lvar word, unit_low_partition_high 1292 lequ ?unit_low_partition_high, unit 1293 lequ ?unit_low_partition_high + 1, partition 0 0000DDE3 5589E550 lenter 1295 lvar word, bit0_no_set_sdp 0 0000DDE7 9C pushf 0 0000DDE8 31DB xor bx, bx 1298 lvar word, dif3_set 0 0000DDEA 53 push bx 1300 lvar dword, load_partition_sector 0 0000DDEB FF36[2E05] push word [load_sdp_sector + 2] 0 0000DDEF FF36[2C05] push word [load_sdp_sector] 1303 0 0000DDF3 89F7 mov di, si 0 0000DDF5 8026[0000]F8 clropt [internalflags3], dif3_load_is_dp 0 0000DDFA E8[0000] call capitalise 0 0000DDFD 3C48 cmp al, 'H' 0 0000DDFF 7503E9F300 je .load_hd 0 0000DE04 3C46 cmp al, 'F' 0 0000DE06 7503E9E900 je .load_fd 0 0000DE0B B401 mov ah, dif3_load_is_ldp 0 0000DE0D 3C4C cmp al, 'L' 0 0000DE0F 7419 je .load_ld_sd 0 0000DE11 B402 mov ah, dif3_load_is_sdp 0 0000DE13 3C53 cmp al, 'S' 0 0000DE15 7413 je .load_ld_sd 1317 %if _INPUT_FILE_BOOT 0 0000DE17 B404 mov ah, dif3_load_is_ydp 0 0000DE19 3C59 cmp al, 'Y' 0 0000DE1B 740D je .load_ld_sd 1321 %endif 0 0000DE1D 3C55 cmp al, 'U' 0 0000DE1F 747C je .load_u 1324 .retc: 0 0000DE21 89FE mov si, di 0 0000DE23 4E dec si 0 0000DE24 AC lodsb 0 0000DE25 F9 stc 1329 .ret: 0 0000DE26 89EC5D lleave code 0 0000DE29 C3 lret 1332 1333 .load_ld_sd: 0 0000DE2A AC lodsb 0 0000DE2B E8[0000] call capitalise 0 0000DE2E 3C44 cmp al, 'D' 0 0000DE30 75EF jne .retc 1338 1339 d4 call d4message 1340 d4 asciz "In parseloadunit.load_ld_sd",13,10 1341 0 0000DE32 8A16[3D05] mov dl, byte [load_sdp_unit] 0 0000DE36 80FC02 cmp ah, dif3_load_is_sdp 0 0000DE39 741D je @F 0 0000DE3B 8A16[A001] mov dl, byte [loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit] 1347 %if _INPUT_FILE_BOOT 0 0000DE3F 80FC01 cmp ah, dif3_load_is_ldp 0 0000DE42 7414 je @F 0 0000DE44 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000DE49 74D6 jz .retc 1352 0 0000DE4B 93 xchg ax, bx 0 0000DE4C B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 0000DE4F F726[2005] mul word [load_input_file.active] 1356 1357 ; test dx, dx 1358 ; jnz .error 1359 0 0000DE53 93 xchg ax, bx 0 0000DE54 8A97[2003] mov dl, byte [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 1363 %endif 1364 @@: 0 0000DE58 AC lodsb 0 0000DE59 E8[0000] call capitalise 0 0000DE5C 3C50 cmp al, 'P' 0 0000DE5E 7403E9B100 jne .got_unit 1369 1370 d4 call d4message 1371 d4 asciz "In parseloadunit.load_ld_sd with ldp",13,10 1372 0 0000DE63 8856FE mov byte [bp + ?unit], dl 0 0000DE66 C646FFFF mov byte [bp + ?partition], -1 0 0000DE6A 0866FA or byte [bp + ?dif3_set], ah 1376 0 0000DE6D 80FC02 cmp ah, dif3_load_is_sdp 0 0000DE70 741D je @F 1379 %if _INPUT_FILE_BOOT 0 0000DE72 80FC01 cmp ah, dif3_load_is_ldp 0 0000DE75 740A je .is_ldp 0 0000DE77 FFB7[FE02] push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors + 2] 0 0000DE7B FFB7[FC02] push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 0 0000DE7F EB08 jmp .is_ldp_ydp 1387 1388 %endif 1389 .is_ldp: 0 0000DE81 FF36[7E01] push word [load_ldp_sector + 2] 0 0000DE85 FF36[7C01] push word [load_ldp_sector] 1392 .is_ldp_ydp: 0 0000DE89 8F46F6 pop word [bp + ?load_partition_sector] 0 0000DE8C 8F46F8 pop word [bp + ?load_partition_sector + 2] 1395 @@: 1396 0 0000DE8F E8[0000] call skipwhite 0 0000DE92 E8[0000] call iseol? 0 0000DE95 7403E90B01 jne .fn 0 0000DE9A E90401 jmp .ret_nc 1401 1402 .load_u: 0 0000DE9D AC lodsb 0 0000DE9E E8[0000] call capitalise 1405 0 0000DEA1 3C28 cmp al, '(' 0 0000DEA3 7419 je @F 0 0000DEA5 3C30 cmp al, '0' 0 0000DEA7 7303E975FF jb .retc 0 0000DEAC 3C39 cmp al, '9' 0 0000DEAE 760E jbe @F 0 0000DEB0 3C41 cmp al, 'A' 0 0000DEB2 7303E96AFF jb .retc 0 0000DEB7 3C46 cmp al, 'F' 0 0000DEB9 7603E963FF ja .retc 1416 @@: 1417 0 0000DEBE 3C28 cmp al, '(' 0 0000DEC0 7515 jne .u_not_expr 0 0000DEC2 AC lodsb 0 0000DEC3 E8[0000]EB02[0000] nearcall getexpression 0 0000DECA E8[0000] call skipwh0 0 0000DECD 3C29 cmp al, ')' 0 0000DECF AC lodsb 0 0000DED0 7403E942F8 jne bootcmd.errordec 0 0000DED5 EB03 jmp .u_check_dot 1427 1428 .u_not_expr: 0 0000DED7 E81211 call boot_get_hexadecimal_literal 1430 .u_check_dot: 0 0000DEDA 3C2E cmp al, '.' 0 0000DEDC 7403E937F8 jne bootcmd.error 0 0000DEE1 AC lodsb 0 0000DEE2 85DB test bx, bx 0 0000DEE4 7403E92FF8 jnz bootcmd.error 0 0000DEE9 81FA0001 cmp dx, 256 0 0000DEED 7203E926F8 jae bootcmd.error 0 0000DEF2 EB20 jmp .got_unit 1439 1440 .load_fd: 0 0000DEF4 B200 mov dl, 0 1442 1443 d4 call d4message 1444 d4 asciz "In parseloadunit.load_fd",13,10 1445 0 0000DEF6 A9 db __TEST_IMM16 ; skip mov 1447 .load_hd: 0 0000DEF7 B280 mov dl, 80h 1449 d4 call d4message 1450 d4 asciz "In parseloadunit.load_fd or .load_hd",13,10 1451 0 0000DEF9 AC lodsb 0 0000DEFA E8[0000] call capitalise 0 0000DEFD 3C44 cmp al, 'D' 0 0000DEFF 7403E91DFF jne .retc 0 0000DF04 AC lodsb 0 0000DF05 E8[0000] call capitalise 0 0000DF08 2C41 sub al, 'A' 0 0000DF0A 3C19 cmp al, 'Z' - 'A' 0 0000DF0C 7603E910FF ja .retc 0 0000DF11 08C2 or dl, al ; hdX: 80h + number, fdX: 0 + number 0 0000DF13 AC lodsb 1463 1464 .got_unit: 0 0000DF14 89D1 mov cx, dx 0 0000DF16 884EFE mov byte [bp + ?unit], cl 0 0000DF19 C646FF00 mov byte [bp + ?partition], 0 0 0000DF1D 3C2F cmp al, '/' ; slash ? 0 0000DF1F 7414 je .fn_j 0 0000DF21 3C5C cmp al, '\' 0 0000DF23 7410 je .fn_j ; got a filename --> 0 0000DF25 3C20 cmp al, 32 ; or blank ? 0 0000DF27 7404 je @F 0 0000DF29 3C09 cmp al, 9 0 0000DF2B 750A jne .checkeol ; check for EOL -- but no filename 1476 ; (hdd1name is invalid -- must be hdd1/name or hdd1 name) 1477 @@: ; was blank 0 0000DF2D E8[0000] call skipwh0 ; skip blanks 0 0000DF30 E8[0000] call iseol? ; EOL ? 0 0000DF33 7402 je .checkeol 1481 .fn_j: 0 0000DF35 EB6E jmp .fn ; no, is filename --> 1483 ; will jump after this 1484 .checkeol: 0 0000DF37 E8[0000] call iseol? ; EOL ? 0 0000DF3A 7465 je .ret_nc ; yes, no filename --> 1487 0 0000DF3C 3C28 cmp al, '(' 0 0000DF3E 740E je @F 0 0000DF40 3C30 cmp al, '0' 0 0000DF42 7303E9DAFE jb .retc 0 0000DF47 3C39 cmp al, '9' 0 0000DF49 7603E9D3FE ja .retc 1494 @@: 1495 1496 d4 call d4message 1497 d4 asciz "In parseloadunit (after no EOL found)",13,10 0 0000DF4E 51 push cx 0 0000DF4F 3C28 cmp al, '(' 0 0000DF51 751D jne .not_expr 0 0000DF53 AC lodsb ; skip opening paren 1502 1503 d4 call d4message 1504 d4 asciz "In parseloadunit (before call to getexpression)",13,10 1505 0 0000DF54 E8[0000]EB02[0000] nearcall getexpression 1507 1508 d4 call d4message 1509 d4 asciz "In parseloadunit (after call to getexpression)",13,10 0 0000DF5B E8[0000] call skipwh0 0 0000DF5E 3C29 cmp al, ')' 0 0000DF60 AC lodsb 0 0000DF61 7509 jne .errordec 0 0000DF63 89D1 mov cx, dx 0 0000DF65 09D9 or cx, bx 0 0000DF67 750A jnz .got_expr 0 0000DF69 5A pop dx 0 0000DF6A EBA8 jmp .got_unit 1519 1520 .errordec: 0 0000DF6C 4E dec si 1522 .error: 0 0000DF6D E9A8F7 jmp bootcmd.error 1524 1525 .not_expr: 1526 d4 call d4message 1527 d4 asciz "In parseloadunit (before call to boot_get_decimal_literal)",13,10 0 0000DF70 E87110 call boot_get_decimal_literal 1529 .got_expr: ; bx:dx = load partition number 1530 d4 call d4message 1531 d4 asciz "In parseloadunit.got_expr",13,10 0 0000DF73 59 pop cx ; cl = load unit 0 0000DF74 80F980 cmp cl, 80h 0 0000DF77 7303E99CF7 jb bootcmd.error ; diskettes aren't partitioned 0 0000DF7C 85DB test bx, bx 0 0000DF7E 7403E995F7 jnz bootcmd.error 0 0000DF83 81FAFF00 cmp dx, 255 0 0000DF87 7603E98CF7 ja bootcmd.error 0 0000DF8C 85D2 test dx, dx 0 0000DF8E 7503E985F7 jz bootcmd.error 0 0000DF93 E8[0000] call skipwh0 0 0000DF96 8856FF mov byte [bp + ?partition], dl 0 0000DF99 884EFE mov byte [bp + ?unit], cl 0 0000DF9C E8[0000] call iseol? 0 0000DF9F 7504 jne .fn 1546 .ret_nc: 0 0000DFA1 31DB xor bx, bx ; NC, ZR 0 0000DFA3 EB06 jmp @F 1549 1550 .fn: 0 0000DFA5 E8[0000] call skipwh0 0 0000DFA8 83CB01 or bx, 1 ; NC, NZ 1553 @@: 0 0000DFAB 9C pushf 0 0000DFAC 8B5EFE mov bx, word [bp + ?unit_low_partition_high] 0 0000DFAF 881E[4002] mov byte [load_unit], bl 0 0000DFB3 883E[3805] mov byte [load_partition], bh 0 0000DFB7 8A5EFA mov bl, byte [bp + ?dif3_set] 0 0000DFBA 081E[0000] or byte [internalflags3], bl 0 0000DFBE F646FC01 test byte [bp + ?bit0_no_set_sdp], 1 0 0000DFC2 750E jnz @F 0 0000DFC4 FF76F8 push word [bp + ?load_partition_sector + 2] 0 0000DFC7 FF76F6 push word [bp + ?load_partition_sector] 0 0000DFCA 8F06[2C05] pop word [load_sdp_sector] 0 0000DFCE 8F06[2E05] pop word [load_sdp_sector + 2] 1566 @@: 0 0000DFD2 9D popf ; ZF, CF 0 0000DFD3 8F06[2805] pop word [load_partition_sector] 0 0000DFD7 8F06[2A05] pop word [load_partition_sector + 2] 1570 ; pop from ?load_partition_sector 0 0000DFDB E948FE jmp .ret 1572 1573 lleave ctx 1574 1575 0 0000DFDE 00 align 4, db 0 1577 1578 boot_read: 0 0000DFE0 C706[6805][F71B] mov word [load_readwrite_function], read_sector 0 0000DFE6 EB06 jmp boot_readwrite 1581 1582 boot_write: 0 0000DFE8 C706[6805][F61B] mov word [load_readwrite_function], write_sector 1584 1585 boot_readwrite: 1586 1587 d4 call d4message 1588 d4 asciz "In boot_readwrite",13,10 1589 0 0000DFEE E8[0000] call skipequals 0 0000DFF1 E8BFFD call parseloadunit_default_sdp 0 0000DFF4 7503E90501 jz .error 1593 1594 %if 0 1595 call skipwh0 1596 mov bx, word [reg_ds] ; default segment 1597 nearcall getaddr ; get buffer address into bx:(e)dx 1598 1599 _386_PM test edx, 0FFFF_0000h 1600 _386_PM jnz .error 1601 1602 ; (variable must be a dword!) 1603 mov word [load_readwrite_buffer], dx 1604 mov word [load_readwrite_buffer + 2], bx 1605 %else 0 0000DFF9 E8[0000]EB02[0000] nearcall getword 1607 ; (variable is a word) 0 0000E000 8916[6405] mov word [load_readwrite_buffer], dx 1609 %endif 1610 0 0000E004 31DB xor bx, bx 0 0000E006 53 push bx ; hidden specified flag (0) 0 0000E007 53 push bx 0 0000E008 53 push bx ; hidden number 0 0000E009 E8[0000] call skipwh0 0 0000E00C E8[0000] call iseol? 0 0000E00F 750F jne @F 1618 1619 d4 call d4message 1620 d4 asciz "In boot_readwrite no sector given no count given",13,10 1621 0 0000E011 8326[6005]00 and word [load_readwrite_sector], 0 0 0000E016 8326[6205]00 and word [load_readwrite_sector + 2], 0 0 0000E01B BA0100 mov dx, 1 0 0000E01E EB56 jmp @FF 1626 1627 @@: 0 0000E020 BA[0000] mov dx, msg.hidden 0 0000E023 4E dec si 0 0000E024 E8[0000] call isstring? 0 0000E027 7518 jne .nothidden 1632 0 0000E029 83C406 add sp, 6 ; discard hidden number and specified flag 0 0000E02C BA0100 mov dx, 1 1635 1636 .hiddencommon: 0 0000E02F 52 push dx ; hidden specified flag (1 or 2) 1638 0 0000E030 E8[0000] call skipequals 1640 0 0000E033 E8[0000]EB02[0000] nearcall getdword 0 0000E03A 53 push bx 0 0000E03B 52 push dx ; hidden number 0 0000E03C E8[0000] call skipwh0 1645 0 0000E03F EB11 jmp .hiddendone 1647 .nothidden: 0 0000E041 BA[0000] mov dx, msg.hiddenadd 0 0000E044 E8[0000] call isstring? 0 0000E047 7508 jne .nothiddenadd 1651 0 0000E049 83C406 add sp, 6 ; discard hidden number and specified flag 0 0000E04C BA0200 mov dx, 2 0 0000E04F EBDE jmp .hiddencommon 1655 1656 .nothiddenadd: 0 0000E051 AC lodsb 1658 .hiddendone: 0 0000E052 E8[0000]EB02[0000] nearcall getexpression ; bx:dx = value 1660 0 0000E059 8916[6005] mov word [load_readwrite_sector], dx 0 0000E05D 891E[6205] mov word [load_readwrite_sector + 2], bx 1663 0 0000E061 E8[0000] call skipwh0 0 0000E064 BA0100 mov dx, 1 0 0000E067 E8[0000] call iseol? 0 0000E06A 740A je @F 0 0000E06C E8[0000]EB02[0000] nearcall getword 0 0000E073 E8[0000] call chkeol 1670 @@: 0 0000E076 8916[6605] mov word [load_readwrite_count], dx 1672 0 0000E07A E8D00F call query_geometry 1674 0 0000E07D F606[0000]07 testopt [internalflags3], dif3_load_is_dp 0 0000E082 753C jnz .ldp 1677 0 0000E084 803E[3805]00 cmp byte [load_partition], 0 0 0000E089 7447 je .whole_unit 1680 0 0000E08B C606[3A05]00 mov byte [load_found_partition], 0 0 0000E090 B9[6E0A] mov cx, .single_partition 0 0000E093 E8030E call scan_partitions 1684 ; cmp byte [load_found_partition], 0 1685 ; jne @F 0 0000E096 BA[0000] mov dx, msg.boot_partition_not_found 0 0000E099 B81502 mov ax, 0215h 0 0000E09C E8[0000] call setrc 0 0000E09F E902FB jmp bootcmd.fail 1690 ;@@: 1691 ; retn 1692 1693 1694 .single_partition: 1695 ; INP: es:si -> partition table entry, 1696 ; si = load_partition_table .. load_partition_table+48, 1697 ; es = ss 1698 ; bp + di -> above part table metadata, 1699 ; dwo [bp + di - 4] = root (outermost extended position) 1700 ; dwo [bp + di - 8] = base (current table position) 1701 ;; CHG: ax, bx, (cx), dx 1702 ; CHG: all 1703 1704 d4 call d4message 1705 d4 asciz "In boot_readwrite.single_partition",13,10 1706 0 0000E0A2 A0[3905] mov al, byte [load_current_partition] 0 0000E0A5 3A06[3805] cmp al, byte [load_partition] 0 0000E0A9 7401 je .gotit 0 0000E0AB C3 retn 1711 1712 .gotit: 1713 d4 call d4message 1714 d4 asciz "In boot_readwrite.gotit",13,10 1715 1716 ; inc byte [load_found_partition] 1717 0 0000E0AC 8B43F8 mov ax, [bp + di - 8] 0 0000E0AF 8B53FA mov dx, [bp + di - 6] ; base (current table position) 1720 0 0000E0B2 26034408 add ax, [es:si + 8] 0 0000E0B6 2613540A adc dx, [es:si + 8 + 2] ; add offset to logical partition 1723 0 0000E0BA 89EC mov sp, bp 0 0000E0BC 5D pop bp ; restore bp (scan_partitions) 0 0000E0BD 5B pop bx ; discard ret address (scan_partitions) 0 0000E0BE EB07 jmp .gotbase_dxax 1728 1729 1730 .ldp: 0 0000E0C0 A1[2805] mov ax, word [load_partition_sector] 0 0000E0C3 8B16[2A05] mov dx, word [load_partition_sector + 2] 1733 1734 .gotbase_dxax: 0 0000E0C7 89461C mov word [bp + bsBPB + bpbHiddenSectors + 0], ax 0 0000E0CA 89561E mov word [bp + bsBPB + bpbHiddenSectors + 2], dx 0 0000E0CD 800E[0000]80 setopt [internalflags3], dif3_partition_changed 1738 1739 .whole_unit: 0 0000E0D2 5A pop dx 0 0000E0D3 5B pop bx ; hidden number (or zero) 0 0000E0D4 59 pop cx ; hidden specified flag 0 0000E0D5 E30F jcxz @FF ; if not specified --> 0 0000E0D7 49 dec cx ; hidden flag is 1 ? 0 0000E0D8 7406 jz @F ; yes, replacce --> 0 0000E0DA 03561C add dx, word [bp + bsBPB + bpbHiddenSectors + 0] 0 0000E0DD 135E1E adc bx, word [bp + bsBPB + bpbHiddenSectors + 2] 1748 ; add to hidden (HIDDENADD=) 1749 1750 @@: 0 0000E0E0 89561C mov word [bp + bsBPB + bpbHiddenSectors + 0], dx 0 0000E0E3 895E1E mov word [bp + bsBPB + bpbHiddenSectors + 2], bx 1753 ; overwrite hidden number with this 1754 @@: 1755 0 0000E0E6 A1[6005] mov ax, word [load_readwrite_sector] 0 0000E0E9 8B16[6205] mov dx, word [load_readwrite_sector + 2] 0 0000E0ED 8B0E[6605] mov cx, word [load_readwrite_count] 0 0000E0F1 8B1E[6405] mov bx, word [load_readwrite_buffer] 1760 0 0000E0F5 E306 jcxz @FF 1762 @@: 0 0000E0F7 FF16[6805] call near word [load_readwrite_function] 0 0000E0FB E2FA loop @B 1765 @@: 0 0000E0FD C3 retn 1767 1768 .error: 0 0000E0FE E9[0000] jmp error 1770 1771 1772 ; INP: ds:si-> first letter of name 1773 ; es:load_kernel_name-> 12-byte buffer (for fn + 0) 1774 ; CHG: ax, cx, di 1775 ; OUT: CY if dot EOL, dot blank, or dot/ 1776 ; al = first text byte after dot (EOL, blank, or slash) 1777 ; ZR if dot/, 1778 ; si -> next text byte after slash 1779 ; NZ if dot EOL or dot blank, 1780 ; si -> first text byte after dot (*NOT* next) 1781 ; (load_kernel_name rese to empty) 1782 ; NC if not a single dot component, 1783 ; al = first text byte after name (EOL, blank, or slash) 1784 ; si -> next text byte after name, if any 1785 ; load_kernel_name filled with FCB formatted name 1786 ; branches to bootcmd.fail on syntax errors 1787 boot_parse_fn: section_of_function 0 0000E101 B020 mov al, 32 0 0000E103 BF[4005] mov di, load_kernel_name 0 0000E106 B90B00 mov cx, 11 0 0000E109 F3AA rep stosb ; initialise to empty 1792 0 0000E10B BF[4005] mov di, load_kernel_name 0 0000E10E B90900 mov cx, 9 0 0000E111 AC lodsb 0 0000E112 3C2E cmp al, '.' 0 0000E114 7514 jne @F 0 0000E116 AC lodsb 0 0000E117 E86500 call .separator_or_slash 0 0000E11A 751D jne .invalid 0 0000E11C 3C2F cmp al, '/' 0 0000E11E 7407 je .dotret ; --> ZR 0 0000E120 3C5C cmp al, '\' 0 0000E122 7403 je .dotret ; --> ZR 0 0000E124 8D74FF lea si, [si - 1] ; NZ, -> at separator (first text after dot) 1806 .dotret: 0 0000E127 F9 stc ; CY return 0 0000E128 C3 retn 1809 1810 1811 .loop_name: 0 0000E129 AC lodsb 1813 @@: 0 0000E12A E8[0000] call capitalise 0 0000E12D E84F00 call .separator_or_slash 0 0000E130 7435 je .loop_name_done 0 0000E132 3C2E cmp al, '.' 0 0000E134 740F je .loop_name_ext 0 0000E136 AA stosb 0 0000E137 E2F0 loop .loop_name 1821 .invalid: 0 0000E139 BA[0000] mov dx, msg.boot_invalid_filename 0 0000E13C B81602 mov ax, 0216h 0 0000E13F E8[0000] call setrc 0 0000E142 E95FFA jmp bootcmd.fail 1826 1827 .loop_name_ext: 0 0000E145 83F909 cmp cx, 9 0 0000E148 74EF je .invalid 0 0000E14A B90400 mov cx, 4 0 0000E14D BF[4805] mov di, load_kernel_name + 8 1832 .loop_ext: 0 0000E150 AC lodsb 0 0000E151 E8[0000] call capitalise 0 0000E154 E82800 call .separator_or_slash 0 0000E157 7409 je .loop_ext_done 0 0000E159 3C2E cmp al, '.' 0 0000E15B 74DC je .invalid 0 0000E15D AA stosb 0 0000E15E E2F0 loop .loop_ext 0 0000E160 EBD7 jmp .invalid 1842 1843 .loop_ext_done: 0 0000E162 83F904 cmp cx, 4 0 0000E165 74D2 je .invalid 1846 .loop_name_done: 0 0000E167 83F909 cmp cx, 9 0 0000E16A 74CD je .invalid 0 0000E16C C606[4B05]00 mov byte [load_kernel_name + 11], 0 0 0000E171 803E[4005]E5 cmp byte [load_kernel_name], 0E5h 0 0000E176 7505 jne @F 0 0000E178 C606[4005]05 mov byte [load_kernel_name], 05h 1853 @@: 0 0000E17D F8 clc ; NC return 0 0000E17E C3 retn 1856 1857 .separator_or_slash: 0 0000E17F E8[0000] call iseol? 0 0000E182 740E je @F 0 0000E184 3C20 cmp al, 32 0 0000E186 740A je @F 0 0000E188 3C09 cmp al, 9 0 0000E18A 7406 je @F 0 0000E18C 3C2F cmp al, '/' 0 0000E18E 7402 je @F 0 0000E190 3C5C cmp al, '\' 1867 @@: 0 0000E192 C3 retn 1869 1870 1871 ; INP: es:si -> partition table entry, 1872 ; si = load_partition_table .. load_partition_table+48, 1873 ; es = ss 1874 ; bp + di -> above part table metadata, 1875 ; dwo [bp + di - 4] = root (outermost extended position) 1876 ; dwo [bp + di - 8] = base (current table position) 1877 ; CHG: ax, bx, (cx), dx 1878 load_from_partition: 1879 d4 call d4message 1880 d4 asciz "In load_from_partition",13,10 1881 0 0000E193 A0[3905] mov al, byte [load_current_partition] 0 0000E196 3A06[3805] cmp al, byte [load_partition] 0 0000E19A 7401 je .gotit 0 0000E19C C3 retn 1886 1887 .gotit: 1888 d4 call d4message 1889 d4 asciz "In load_from_partition.gotit",13,10 1890 0 0000E19D 8B43F8 mov ax, [bp + di - 8] 0 0000E1A0 8B53FA mov dx, [bp + di - 6] ; base (current table position) 1893 0 0000E1A3 52 push dx 0 0000E1A4 50 push ax 0 0000E1A5 06 push es 0 0000E1A6 BB6000 mov bx, 60h 0 0000E1A9 E86D10 call read_ae_512_bytes ; load partition table to 0:600h 0 0000E1AC 07 pop es 0 0000E1AD 58 pop ax 0 0000E1AE 5A pop dx 1902 0 0000E1AF 26034408 add ax, [es:si + 8] 0 0000E1B3 2613540A adc dx, [es:si + 8 + 2] ; add offset to logical partition 1905 0 0000E1B7 26894408 mov word [es:si + 8], ax 0 0000E1BB 2689540A mov word [es:si + 8 + 2], dx ; store in partition table entry 1908 0 0000E1BF 31C9 xor cx, cx 0 0000E1C1 8EC1 mov es, cx ; es = 0 1911 %if _LINK_COMPAT 0 0000E1C3 8DB4BE07 lea si, [si + 600h + (510 - 64)] 0 0000E1C7 81EE[0001] sub si, load_partition_table 1914 %else 1915 lea si, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 1916 %endif 1917 ; si = 600h + 510-64 .. 600h + 510-16 0 0000E1CB 26894408 mov word [es:si + 8], ax 0 0000E1CF 2689540A mov word [es:si + 8 + 2], dx ; store in partition table entry 1920 1921 ; dx:ax = absolute sector number 0 0000E1D3 BBC007 mov bx, 7C0h ; bx:0 = 7C0h:0 -> boot sector area 0 0000E1D6 E84010 call read_ae_512_bytes ; load partition boot sector to 0:7C00h 1924 0 0000E1D9 89EC mov sp, bp 0 0000E1DB 5D pop bp ; restore bp (scan_partitions) 0 0000E1DC 58 pop ax ; discard ret address (scan_partitions) 1928 0 0000E1DD 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000E1E4 7403E91215 jne boot_sigmismatch 1931 0 0000E1E9 31C9 xor cx, cx 0 0000E1EB 26390E0000 cmp word [es:0], cx 0 0000E1F0 7503E91215 je boot_codemismatch 1935 0 0000E1F5 8EC1 mov es, cx ; cx = 0, es = 0 0 0000E1F7 89F7 mov di, si ; di -> partition table entry (seg 0) 0 0000E1F9 26800D80 or byte [es:di + 0], 80h ; set bootable flag 0 0000E1FD A0[4002] mov al, byte [load_unit] ; al = unit 0 0000E200 BB007C mov bx, 7C00h ; bx = 7C00h 0 0000E203 E948F9 jmp load_partition_common 1942 1943 1944 ; INP: es:si -> partition table entry, 1945 ; si = load_partition_table .. load_partition_table+48, 1946 ; es = ss 1947 ; bp + di -> above part table metadata, 1948 ; dwo [bp + di - 4] = root (outermost extended position) 1949 ; dwo [bp + di - 8] = base (current table position) 1950 ; CHG: ax, bx, (cx), dx 1951 load_freedos_from_partition: 1952 d4 call d4message 1953 d4 asciz "In load_freedos_from_partition",13,10 1954 0 0000E206 A0[3905] mov al, byte [load_current_partition] 0 0000E209 3A06[3805] cmp al, byte [load_partition] 0 0000E20D 7401 je .gotit 0 0000E20F C3 retn 1959 1960 .gotit: 1961 d4 call d4message 1962 d4 asciz "In load_freedos_from_partition.gotit",13,10 1963 0 0000E210 8B43F8 mov ax, [bp + di - 8] 0 0000E213 8B53FA mov dx, [bp + di - 6] ; base (current table position) 1966 0 0000E216 26034408 add ax, [es:si + 8] 0 0000E21A 2613540A adc dx, [es:si + 8 + 2] ; add offset to logical partition 1969 0 0000E21E 26894408 mov word [es:si + 8], ax 0 0000E222 2689540A mov word [es:si + 8 + 2], dx ; store in partition table entry 0 0000E226 26800C80 or byte [es:si + 0], 80h ; set bootable flag 1973 1974 %if _LOADER 1975 mov bx, 60h 1976 cmp byte [currentposition], 0 1977 ja .notbottom 1978 mov bx, ds 1979 add bx, word [liiAmountParagraphs] 1980 .notbottom: 1981 mov [loader_lowest_free], bx 1982 %endif 1983 0 0000E22A F606[6902]40 testopt [load_options], LOAD_SET_DSSI_PARTINFO 0 0000E22F 7431 jz @F 1986 0 0000E231 52 push dx 0 0000E232 50 push ax 1989 0 0000E233 8B43F8 mov ax, [bp + di - 8] 0 0000E236 8B53FA mov dx, [bp + di - 6] ; base (current table position) 1992 0 0000E239 52 push dx 0 0000E23A 50 push ax 0 0000E23B 06 push es 1996 %if _LOADER 1997 mov bx, [loader_lowest_free] 1998 push bx 1999 %else 0 0000E23C BB6000 mov bx, 60h 2001 %endif 0 0000E23F E8D70F call read_ae_512_bytes ; load partition table to 0:600h 2003 %if _LOADER 2004 pop cx 2005 mov [loader_lowest_free], bx 2006 %endif 0 0000E242 07 pop es 0 0000E243 58 pop ax 0 0000E244 5A pop dx 2010 2011 %if _LOADER 2012 mov es, cx 2013 %if _LINK_COMPAT 2014 lea di, [si + (510 - 64)] 2015 sub di, load_partition_table 2016 %else 2017 lea di, [si - (load_partition_table + DATASECTIONFIXUP) + (510 - 64)] 2018 %endif 2019 ; si = 510-64 .. 600h + 510-16 2020 cmp byte [currentposition], 0 2021 jbe .loader 2022 %endif 0 0000E245 31C9 xor cx, cx 0 0000E247 8EC1 mov es, cx ; es = 0 2025 %if _LINK_COMPAT 0 0000E249 8DBCBE07 lea di, [si + 600h + (510 - 64)] 0 0000E24D 81EF[0001] sub di, load_partition_table 2028 %else 2029 lea di, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 2030 %endif 2031 ; si = 600h + 510-64 .. 600h + 510-16 2032 .loader: 0 0000E251 B90800 mov cx, 16 / 2 0 0000E254 06 push es 0 0000E255 57 push di 0 0000E256 F3A5 rep movsw 0 0000E258 8F06[3405] pop word [load_partition_entry] 0 0000E25C 8F06[3605] pop word [load_partition_entry + 2] 2039 0 0000E260 58 pop ax 0 0000E261 5A pop dx 2042 @@: 2043 2044 0 0000E262 89EC mov sp, bp 0 0000E264 5D pop bp ; restore bp (scan_partitions) 0 0000E265 5B pop bx ; discard ret address (scan_partitions) 2048 2049 ; dx:ax = absolute sector number 0 0000E266 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000E26A 50 push ax 0 0000E26B 52 push dx 0 0000E26C E8AA0F call read_ae_512_bytes ; load partition boot sector 2054 0 0000E26F 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000E276 7403E98014 jne boot_sigmismatch 2057 0 0000E27B 31C9 xor cx, cx 2059 ; cmp word [es:0], cx 2060 ; je boot_codemismatch 2061 0 0000E27D 5A pop dx 0 0000E27E 58 pop ax 2064 2065 ; dx:ax = boot sector 2066 ; byte [load_unit] = unit 2067 ; es:0-> read sector 2068 load_freedos_common: 0 0000E27F 26A31C00 mov word [es:bsBPB + bpbHiddenSectors], ax 0 0000E283 2689161E00 mov word [es:bsBPB + bpbHiddenSectors + 2], dx 2071 0 0000E288 8B5E0B mov bx, [bp + bsBPB + bpbBytesPerSector] 0 0000E28B 263B1E0B00 cmp bx, [es:bsBPB + bpbBytesPerSector] 0 0000E290 7403E97A14 jne boot_secsizemismatch 2075 2076 ; preserve some variables from our pseudo BPB 0 0000E295 31C0 xor ax, ax 0 0000E297 FF7618 push word [bp + bsBPB + bpbCHSSectors] 0 0000E29A 268F061800 pop word [es:bsBPB + bpbCHSSectors] 0 0000E29F FF761A push word [bp + bsBPB + bpbCHSHeads] 0 0000E2A2 268F061A00 pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 2082 0 0000E2A7 8B5EEA mov bx, word [bp + ldParaPerSector] 0 0000E2AA D1EB shr bx, 1 0 0000E2AC 895ED4 mov word [bp + ldEntriesPerSector], bx 2086 0 0000E2AF 2639061600 cmp word [es:bsBPB + bpbSectorsPerFAT], ax 0 0000E2B4 8A5E40 mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 0 0000E2B7 7407 je .is_fat32 0 0000E2B9 26881E2400 mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 0 0000E2BE EB05 jmp short .was_fat1612 2092 .is_fat32: 0 0000E2C0 26881E4000 mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 2094 .was_fat1612: 2095 0 0000E2C5 06 push es 0 0000E2C6 1E push ds 0 0000E2C7 06 push es 0 0000E2C8 1F pop ds 0 0000E2C9 31F6 xor si, si ; -> BPB from boot partition 0 0000E2CB 16 push ss 0 0000E2CC 07 pop es 0 0000E2CD BF[0002] mov di, load_data - LOADDATA2 ; -> our copy of a BPB 0 0000E2D0 B95A00 mov cx, (bsBPB + ebpbNew + BPBN_size) 0 0000E2D3 F3A4 rep movsb ; get the BPB 2106 0 0000E2D5 1F pop ds 0 0000E2D6 800E[0000]80 setopt [internalflags3], dif3_partition_changed 2109 0 0000E2DB 394616 cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 0 0000E2DE 740B je @F ; is FAT32 --> 0 0000E2E0 BE[2402] mov si, load_data - LOADDATA2 + bsBPB + bpbNew 0 0000E2E3 BF[4002] mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 0 0000E2E6 B91A00 mov cx, BPBN_size 0 0000E2E9 F3A4 rep movsb ; clone the FAT16 / FAT12 BPBN 2116 ; to where the FAT32 BPBN lives 2117 @@: 0 0000E2EB 07 pop es 2119 0 0000E2EC E8[0000] call bootgetmemorysize 0 0000E2EF 8956E0 mov word [bp + ldMemoryTop], dx 0 0000E2F2 81EA0005 sub dx, (20 * 1024) >> 4 2123 ; leave 20 KiB free at the top, to 2124 ; allow loading with the lDOS protocol (needs BPB and FAT seg 2125 ; to live below its destination buffers for these) 0 0000E2F6 7303 jnc @F 2127 .outofmem: 0 0000E2F8 E9D30E jmp query_geometry.out_of_memory_error 2129 @@: 2130 2131 %if _LOADER 2132 cmp byte [currentposition], 1 2133 jne @F 2134 mov ax, ss 2135 cmp dx, ax 2136 jbe @F 2137 xchg dx, ax 2138 @@: 2139 %endif 2140 0 0000E2FB 81EA0002 sub dx, 8192 >> 4 0 0000E2FF 72F7 jc .outofmem 0 0000E301 8956F8 mov word [bp + lsvFATSeg], dx 0 0000E304 B8FFFF mov ax, -1 0 0000E307 8946F4 mov word [bp + lsvFATSector], ax 0 0000E30A 8946F6 mov word [bp + lsvFATSector + 2], ax 2147 0 0000E30D A1[6A02] mov ax, word [load_loadseg] 0 0000E310 8946FA mov word [bp + lsvLoadSeg], ax 2150 %if _LOADER 2151 cmp ax, [loader_lowest_free] 2152 jb ..@loader_too_low_load 2153 %endif 0 0000E313 31DB xor bx, bx 0 0000E315 B98000 mov cx, ((256 + 15) & ~15) >> 1 0 0000E318 F606[6902]20 testopt [load_options], LOAD_NO_BPB 0 0000E31D 7506 jnz @F 0 0000E31F BB0002 mov bx, 512 0 0000E322 B98001 mov cx, ((512 + 256 + 15) & ~15) >> 1 2160 @@: 0 0000E325 F606[6902]10 testopt [load_options], LOAD_CMDLINE 0 0000E32A 7404 jz @F 0 0000E32C 81C18000 add cx, (256) >> 1 2164 @@: 2165 0 0000E330 833E[7202]FF cmp word [load_bpb + 2], -1 0 0000E335 7475 je .auto_bpb 2168 0 0000E337 A1[7002] mov ax, [load_bpb] 0 0000E33A D1E8 shr ax, 1 0 0000E33C D1E8 shr ax, 1 0 0000E33E D1E8 shr ax, 1 0 0000E340 D1E8 shr ax, 1 ; round down: start of BPB 0 0000E342 0306[7202] add ax, [load_bpb + 2] ; start of BPB 0 0000E346 83E810 sub ax, (256) >> 4 ; start of stack area 0 0000E349 720A jc @F 0 0000E34B F606[6902]10 testopt [load_options], LOAD_CMDLINE 0 0000E350 7403 jz @F 0 0000E352 83E810 sub ax, (256) >> 4 2180 @@: 0 0000E355 50 push ax 0 0000E356 7235 jc .bpb_too_low 2183 0 0000E358 3B46FA cmp ax, word [bp + lsvLoadSeg] 0 0000E35B 773B ja .loads_below_bpb 2186 2187 %if _LOADER 2188 cmp ax, [loader_lowest_free] 2189 %else 0 0000E35D 83F860 cmp ax, 60h 2191 %endif 0 0000E360 722B jb .bpb_too_low 2193 0 0000E362 A1[7002] mov ax, [load_bpb] 0 0000E365 01D8 add ax, bx 0 0000E367 83C00F add ax, 15 0 0000E36A D1E8 shr ax, 1 0 0000E36C D1E8 shr ax, 1 0 0000E36E D1E8 shr ax, 1 0 0000E370 D1E8 shr ax, 1 0 0000E372 0306[7202] add ax, [load_bpb + 2] ; end of BPB / pseudo-boot-sector 2202 0 0000E376 3B46FA cmp ax, word [bp + lsvLoadSeg] 0 0000E379 761F jbe .loads_above_bpb 2205 0 0000E37B BA[0000] mov dx, msg.boot_bpb_load_overlap 0 0000E37E B81702 mov ax, 0217h 0 0000E381 E8[0000] call setrc 2209 .fail: 0 0000E384 B81802 mov ax, 0218h 0 0000E387 E8[0000] call setrc 0 0000E38A E917F8 jmp bootcmd.fail 2213 2214 .bpb_too_low: 0 0000E38D BA[0000] mov dx, msg.boot_bpb_too_low 0 0000E390 B81902 mov ax, 0219h 0 0000E393 E8[0000] call setrc 0 0000E396 EBEC jmp .fail 2219 2220 2221 2222 .loads_below_bpb: 0 0000E398 89C2 mov dx, ax ; set load top to before BPB/lsv/stack 2224 2225 .loads_above_bpb: ; dx = word [bp + ldLoadTop] = word [bp + lsvFATSeg] 0 0000E39A FF36[7202] push word [load_bpb + 2] 0 0000E39E 8F06[2605] pop word [load_bpb_dest + 2] 0 0000E3A2 FF36[7002] push word [load_bpb] 0 0000E3A6 8F06[2405] pop word [load_bpb_dest] 0 0000E3AA EB50 jmp .got_bpb_set_load_top 2231 2232 2233 ; auto-BPB: allocate BPB at top and load below that 2234 .auto_bpb: 0 0000E3AC 83EA10 sub dx, (256 + 15) >> 4 0 0000E3AF 7303E944FF jc .outofmem 0 0000E3B4 F606[6902]10 testopt [load_options], LOAD_CMDLINE 0 0000E3B9 7408 jz @F 0 0000E3BB 83EA10 sub dx, (256) >> 4 0 0000E3BE 7303E935FF jc .outofmem 2241 @@: 0 0000E3C3 85DB test bx, bx 0 0000E3C5 7408 jz @F 0 0000E3C7 83EA20 sub dx, 512 >> 4 0 0000E3CA 7303E929FF jc .outofmem 2246 @@: 2247 0 0000E3CF 52 push dx 0 0000E3D0 89D0 mov ax, dx 2250 ; eg dx = 800h 2251 ; want (((800h<<4) + 4096 - LOADSTACKVARS) - 7C00h) >> 4 2252 ; which is 143h 2253 ; which :7C00h = 903h:0 2254 ; dx + ( 4096 - LOADSTACKVARS - 7C00h) / 16 2255 ; dx - (-4096 + LOADSTACKVARS + 7C00h) / 16 0 0000E3D2 BB00FF mov bx, (- 256) 0 0000E3D5 F606[6902]10 testopt [load_options], LOAD_CMDLINE 0 0000E3DA 7404 jz @F 0 0000E3DC 81EB0001 sub bx, (256) 2260 @@: 0 0000E3E0 031E[7002] add bx, word [load_bpb] 0 0000E3E4 51 push cx 0 0000E3E5 B104 mov cl, 4 0 0000E3E7 D3EB shr bx, cl 0 0000E3E9 59 pop cx 0 0000E3EA 29D8 sub ax, bx 2267 ; sub ax, (-256 + 7C00h) / 16 0 0000E3EC 7303E907FF jc .outofmem 2269 ; mov word [load_bpb_dest], 7C00h 0 0000E3F1 FF36[7002] push word [load_bpb] 0 0000E3F5 8F06[2405] pop word [load_bpb_dest] 0 0000E3F9 A3[2605] mov word [load_bpb_dest + 2], ax 2273 .got_bpb_set_load_top: 0 0000E3FC 8956E2 mov word [bp + ldLoadTop], dx 2275 2276 .got_bpb: ; cx = how many words are used for stack/lsv/BPB 0 0000E3FF 58 pop ax ; -> stack area 0 0000E400 06 push es 0 0000E401 8EC0 mov es, ax 0 0000E403 31FF xor di, di 0 0000E405 31C0 xor ax, ax 0 0000E407 F3AB rep stosw 0 0000E409 07 pop es 2284 0 0000E40A E8E918 call initialise_fs 2286 0 0000E40D C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000E412 8B36[4C05] mov si, word [load_kernelname_input] 0 0000E416 803C2F cmp byte [si], '/' 0 0000E419 7501 jne @F 0 0000E41B 46 inc si 2292 @@: 2293 .dotcomponent: 0 0000E41C 803C00 cmp byte [si], 0 0 0000E41F 7504 jne @F 0 0000E421 8B36[6002] mov si, word [load_kernelname_default] 2297 @@: 0 0000E425 16 push ss 0 0000E426 07 pop es 0 0000E427 E8D7FC call boot_parse_fn ; get next pathname 0 0000E42A 72F0 jc .dotcomponent 0 0000E42C 3C2F cmp al, '/' 0 0000E42E 7509 jne @F 0 0000E430 C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000E435 8936[4E05] mov word [load_kernelname_next], si 2306 @@: 2307 0 0000E439 BFFFFF mov di, -1 0 0000E43C 89FE mov si, di 0 0000E43E 897EF4 mov [bp + lsvFATSector], di 0 0000E441 8976F6 mov [bp + lsvFATSector + 2], si 2312 0 0000E444 31C0 xor ax, ax 0 0000E446 31D2 xor dx, dx 2315 2316 scan_dir_kernelname_loop: 0 0000E448 8946EC mov word [bp + ldDirCluster], ax 0 0000E44B 8956EE mov word [bp + ldDirCluster + 2], dx 2319 0 0000E44E 31DB xor bx, bx 0 0000E450 8EC3 mov es, bx 0 0000E452 BB0005 mov bx, 500h 0 0000E455 E8FA07 call scan_dir_aux_for_file 2324 0 0000E458 803E[3B05]10 cmp byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000E45D 753E jne got_kernelentry 2327 0 0000E45F 56 push si 0 0000E460 57 push di 0 0000E461 C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000E466 8B36[4E05] mov si, word [load_kernelname_next] 2332 .dotcomponent_next: 0 0000E46A 803C00 cmp byte [si], 0 0 0000E46D 7504 jne @F 0 0000E46F 8B36[6002] mov si, word [load_kernelname_default] 2336 @@: 0 0000E473 06 push es 0 0000E474 16 push ss 0 0000E475 07 pop es 0 0000E476 E888FC call boot_parse_fn ; get next pathname 0 0000E479 07 pop es 0 0000E47A 72EE jc .dotcomponent_next 0 0000E47C 3C2F cmp al, '/' 0 0000E47E 7509 jne @F 0 0000E480 C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000E485 8936[4E05] mov word [load_kernelname_next], si 2347 @@: 0 0000E489 5F pop di 0 0000E48A 5E pop si 2350 0 0000E48B 31D2 xor dx, dx 0 0000E48D 268B471A mov ax, [es:bx + deClusterLow] 2353 ; = first cluster (not FAT32) 0 0000E491 807EE620 cmp byte [bp + ldFATType], 32 0 0000E495 7504 jne @F 0 0000E497 268B5714 mov dx, [es:bx + deClusterHigh] 2357 ; dx:ax = first cluster (FAT32) 2358 @@: 2359 0 0000E49B EBAB jmp scan_dir_kernelname_loop 2361 2362 2363 got_kernelentry: 0 0000E49D 56 push si 0 0000E49E 57 push di 2366 0 0000E49F C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000E4A4 8B36[5005] mov si, word [load_addname_input] 0 0000E4A8 803C2F cmp byte [si], '/' 0 0000E4AB 7511 jne @F 0 0000E4AD 46 inc si 0 0000E4AE 803C2F cmp byte [si], '/' 0 0000E4B1 7503E9A800 je got_no_addentry.no_dxax_on_stack 2374 0 0000E4B6 31C0 xor ax, ax 0 0000E4B8 8946EC mov word [bp + ldDirCluster], ax 0 0000E4BB 8946EE mov word [bp + ldDirCluster + 2], ax 2378 ; search from root directory 2379 @@: 2380 .dotcomponent_next: 0 0000E4BE 803C00 cmp byte [si], 0 0 0000E4C1 750C jne @F 0 0000E4C3 8B36[6202] mov si, word [load_addname_default] 0 0000E4C7 803C00 cmp byte [si], 0 0 0000E4CA 7503E98F00 je got_no_addentry.no_dxax_on_stack 2386 @@: 0 0000E4CF 16 push ss 0 0000E4D0 07 pop es 0 0000E4D1 E82DFC call boot_parse_fn ; get next pathname 0 0000E4D4 72E8 jc .dotcomponent_next 0 0000E4D6 3C2F cmp al, '/' 0 0000E4D8 7509 jne @F 0 0000E4DA C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000E4DF 8936[5205] mov word [load_addname_next], si 2395 @@: 0 0000E4E3 5F pop di 0 0000E4E4 5E pop si 0 0000E4E5 EB06 jmp @F 2399 2400 2401 scan_dir_addname_loop: 0 0000E4E7 8946EC mov word [bp + ldDirCluster], ax 0 0000E4EA 8956EE mov word [bp + ldDirCluster + 2], dx 2404 2405 @@: 0 0000E4ED 31DB xor bx, bx 0 0000E4EF 8EC3 mov es, bx 0 0000E4F1 BB2005 mov bx, 520h ; 0:bx -> space for second directory entry 0 0000E4F4 E85B07 call scan_dir_aux_for_file 2410 0 0000E4F7 803E[3B05]10 cmp byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000E4FC 756E jne got_addentry 2413 0 0000E4FE 56 push si 0 0000E4FF 57 push di 0 0000E500 52 push dx 0 0000E501 50 push ax 0 0000E502 C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000E507 8B36[5205] mov si, word [load_addname_next] 2420 .dotcomponent_next: 0 0000E50B 803C00 cmp byte [si], 0 0 0000E50E 7509 jne @F 0 0000E510 8B36[6202] mov si, word [load_addname_default] 0 0000E514 803C00 cmp byte [si], 0 0 0000E517 7443 je got_no_addentry 2426 @@: 0 0000E519 06 push es 0 0000E51A 16 push ss 0 0000E51B 07 pop es 0 0000E51C E8E2FB call boot_parse_fn ; get next pathname 0 0000E51F 07 pop es 0 0000E520 72E9 jc .dotcomponent_next 0 0000E522 3C2F cmp al, '/' 0 0000E524 7509 jne @F 0 0000E526 C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000E52B 8936[5205] mov word [load_addname_next], si 2437 @@: 0 0000E52F 58 pop ax 0 0000E530 5A pop dx 0 0000E531 5F pop di 0 0000E532 5E pop si 2442 0 0000E533 31D2 xor dx, dx 0 0000E535 268B471A mov ax, [es:bx + deClusterLow] 2445 ; = first cluster (not FAT32) 0 0000E539 807EE620 cmp byte [bp + ldFATType], 32 0 0000E53D 7504 jne @F 0 0000E53F 268B5714 mov dx, [es:bx + deClusterHigh] 2449 ; dx:ax = first cluster (FAT32) 2450 @@: 2451 0 0000E543 EBA2 jmp scan_dir_addname_loop 2453 2454 2455 ; INP: dl:ax:bx = 40-bit size 2456 ; OUT: If input <= 0FFFF0h, 2457 ; dx = size in paragraphs, rounded down 2458 ; Else, 2459 ; dx = 0FFFFh 2460 ; cx = 0 2461 ; CHG: ax, bx 2462 helper_shift_down_and_clamp: 0 0000E545 B90400 mov cx, 4 2464 @@: 0 0000E548 D0EA shr dl, 1 0 0000E54A D1D8 rcr ax, 1 0 0000E54C D1DB rcr bx, 1 0 0000E54E E2F8 loop @B ; cx = 0 2469 0 0000E550 08D0 or al, dl 0 0000E552 89DA mov dx, bx ; size in paragraphs 0 0000E554 85C0 test ax, ax ; > 0FFFFh ? 0 0000E556 7403 jz @F ; no, take actual size --> 0 0000E558 BAFFFF mov dx, 0FFFFh ; clamp to 0FFFFh 2475 @@: 0 0000E55B C3 retn 2477 2478 2479 got_no_addentry: 0 0000E55C 58 pop ax 0 0000E55D 5A pop dx 2482 .no_dxax_on_stack: 2483 ; push ax 0 0000E55E B91000 mov cx, 16 0 0000E561 31C0 xor ax, ax 0 0000E563 8EC0 mov es, ax 0 0000E565 BF2005 mov di, 520h ; es:di -> space for second directory entry 0 0000E568 F3AB rep stosw ; store zeros 2489 ; pop ax 2490 0 0000E56A 5F pop di 0 0000E56B 5E pop si 2493 2494 got_addentry: 0 0000E56C 31C0 xor ax, ax 0 0000E56E 8EC0 mov es, ax 2497 2498 2499 ; (boot32.asm code starts here) 2500 0 0000E570 8B46E2 mov ax, word [bp + ldLoadTop] 0 0000E573 2B46EA sub ax, word [bp + ldParaPerSector] 0 0000E576 7303E97DFD jc load_freedos_common.outofmem 0 0000E57B 8946D6 mov [bp + ldLastAvailableSector], ax 2505 0 0000E57E 268B1E1C05 mov bx, [es:500h + deSize] 0 0000E583 26A11E05 mov ax, [es:500h + deSize + 2] ; ax:bx = file size 0 0000E587 268A160C05 mov dl, [es:500h + 12] ; dl = FAT+ size bits 0 0000E58C 88D6 mov dh, dl 0 0000E58E 81E207E0 and dx, 0E007h ; obtain bits 7-5 and 2-0 0 0000E592 D0EE shr dh, 1 0 0000E594 D0EE shr dh, 1 0 0000E596 08F2 or dl, dh ; dl:ax:bx = file size 0 0000E598 52 push dx 0 0000E599 50 push ax 0 0000E59A 53 push bx 2517 0 0000E59B E8A7FF call helper_shift_down_and_clamp 2519 ; round down to next paragraph boundary 0 0000E59E 3916[6402] cmp word [load_minpara], dx 2521 ; compare size (rounded down) to minpara 0 0000E5A2 7603E9A200 ja error_filetoosmall ; too small --> 2523 0 0000E5A7 5B pop bx 0 0000E5A8 58 pop ax 0 0000E5A9 5A pop dx 0 0000E5AA 8B4E0B mov cx, [bp + bsBPB + bpbBytesPerSector] 0 0000E5AD 49 dec cx ; BpS - 1 0 0000E5AE 01CB add bx, cx 0 0000E5B0 83D000 adc ax, 0 0 0000E5B3 80D200 adc dl, 0 ; round up to next sector 0 0000E5B6 F7D1 not cx ; ~ (BpS - 1) 0 0000E5B8 21CB and bx, cx ; mask to limit to rounded-up sector 0 0000E5BA E888FF call helper_shift_down_and_clamp 2535 2536 ; dx = size in paragraphs, rounded up to sector 0 0000E5BD A1[6602] mov ax, word [load_maxpara] 0 0000E5C0 39C2 cmp dx, ax ; actual size below maximum ? 0 0000E5C2 7602 jbe @F ; yes, use actual size --> 0 0000E5C4 89C2 mov dx, ax ; use maximum size (or 0) 2541 @@: 0 0000E5C6 8956D8 mov word [bp + ldParasLeft], dx 0 0000E5C9 894EDA mov word [bp + ldParasDone], cx 2544 ; = 0 2545 2546 ; get starting cluster of file 0 0000E5CC 31D2 xor dx, dx 0 0000E5CE 26A11A05 mov ax, [es:500h + deClusterLow] 2549 ; = first cluster (not FAT32) 2550 0 0000E5D2 807EE620 cmp byte [bp + ldFATType], 32 0 0000E5D6 7505 jne @F 0 0000E5D8 268B161405 mov dx, [es:500h + deClusterHigh] 2554 ; dx:ax = first cluster (FAT32) 2555 @@: 2556 0 0000E5DD 8946F0 mov word [bp + lsvFirstCluster], ax 0 0000E5E0 8956F2 mov word [bp + lsvFirstCluster + 2], dx 2559 0 0000E5E3 E88108 call check_clust 0 0000E5E6 7303E94817 jc error_badchain 2562 2563 next_load_cluster: 0 0000E5EB E84E07 call clust_to_first_sector 2565 ; dx:ax = first sector of cluster 2566 ; cx:bx = cluster value 0 0000E5EE 51 push cx 0 0000E5EF 53 push bx ; preserve cluster number for later 2569 0 0000E5F0 8B4EE8 mov cx, [bp + ldClusterSize] 2571 0 0000E5F3 8B5EFA mov bx, [bp + lsvLoadSeg] 2573 ; xxx - this will always load an entire cluster (e.g. 64 sectors), 2574 ; even if the file is shorter than this 2575 @@: 0 0000E5F6 3B5ED6 cmp bx, [bp + ldLastAvailableSector] 0 0000E5F9 7613 jbe @F 0 0000E5FB 833E[6602]00 cmp word [load_maxpara], 0 0 0000E600 743D je @FF ; if to allow partial load --> 0 0000E602 BA[0000] mov dx, msg.boot_file_too_big_error 0 0000E605 B81A02 mov ax, 021Ah 0 0000E608 E8[0000] call setrc 0 0000E60B E996F5 jmp bootcmd.fail 2584 2585 @@: 0 0000E60E 06 push es ; (must preserve ADR_FATBUF reference) 0 0000E60F E8190C call read_sector 0 0000E612 07 pop es 0 0000E613 895EFA mov [bp + lsvLoadSeg], bx ; => after last read data 2590 0 0000E616 50 push ax 0 0000E617 8B46EA mov ax, [bp + ldParaPerSector] 0 0000E61A 0146DA add word [bp + ldParasDone], ax 0 0000E61D 833E[6602]00 cmp word [load_maxpara], 0 0 0000E622 7407 je .donotuseleft 0 0000E624 2946D8 sub word [bp + ldParasLeft], ax 0 0000E627 58 pop ax 0 0000E628 7615 jbe @F ; read enough --> 0 0000E62A A8 db __TEST_IMM8 ; (skip pop) 2600 .donotuseleft: 0 0000E62B 58 pop ax 2602 0 0000E62C E2C8 loop @BB 0 0000E62E 5B pop bx 0 0000E62F 59 pop cx 2606 0 0000E630 E83207 call clust_next 0 0000E633 73B6 jnc next_load_cluster 0 0000E635 40 inc ax 0 0000E636 40 inc ax 0 0000E637 A808 test al, 8 ; set in 0FFF_FFF8h--0FFF_FFFFh, 2612 ; clear in 0, 1, and 0FFF_FFF7h 0 0000E639 7503E9F516 jz error_badchain 0 0000E63E A9 db __TEST_IMM16 2615 @@: 0 0000E63F 5B pop bx 0 0000E640 59 pop cx 2618 0 0000E641 A1[6402] mov ax, word [load_minpara] 0 0000E644 3B46DA cmp ax, word [bp + ldParasDone] 0 0000E647 760C jbe @F 2622 error_filetoosmall: 0 0000E649 BA[0000] mov dx, msg.boot_file_too_small_error 0 0000E64C B81B02 mov ax, 021Bh 0 0000E64F E8[0000] call setrc 0 0000E652 E94FF5 jmp bootcmd.fail 2627 @@: 2628 2629 0 0000E655 8E06[6A02] mov es, word [load_loadseg] 0 0000E659 8B3E[7802] mov di, word [load_check_offset] 0 0000E65D A1[7A02] mov ax, word [load_check_value] 0 0000E660 85C0 test ax, ax 0 0000E662 7406 jz @F 0 0000E664 AF scasw 0 0000E665 7403E91902 jne .error_check_mismatch 2637 @@: 2638 2639 ; turn off floppy motor 0 0000E66A BAF203 mov dx,3F2h 0 0000E66D B000 mov al,0 0 0000E66F EE out dx,al 2643 2644 ; Set-up registers for and jump to loaded file 2645 0 0000E670 8A5640 mov dl, [bp + bsBPB + ebpbNew + bpbnBootUnit] 2647 ; testopt [load_options], LOAD_SET_DL_UNIT 2648 ; jz @F 2649 ; (always set dl) 0 0000E673 8816[0000] mov byte [reg_edx], dl 2651 @@: 2652 2653 ; testopt [load_options], LOAD_SET_BL_UNIT 2654 ; jz @F 2655 ; (always set bl -- overwritten later if LOAD_SET_AXBX_DATASTART) 0 0000E677 8816[0000] mov byte [reg_ebx], dl 2657 @@: 2658 0 0000E67B 8A6E15 mov ch, byte [bp + bsBPB + bpbMediaID] 0 0000E67E 882E[0100] mov byte [reg_ecx + 1], ch 2661 0 0000E682 F606[6802]40 testopt [load_options], LOAD_DATASTART_HIDDEN 0 0000E687 740C jz @F 0 0000E689 8B5E1C mov bx, [bp + bsBPB + bpbHiddenSectors] 0 0000E68C 8B461E mov ax, [bp + bsBPB + bpbHiddenSectors + 2] 0 0000E68F 015EFC add word [bp + lsvDataStart], bx 0 0000E692 1146FE adc word [bp + lsvDataStart + 2], ax 2668 @@: 2669 0 0000E695 F606[6802]80 testopt [load_options], LOAD_SET_AXBX_DATASTART 0 0000E69A 740D jz @F 0 0000E69C 8B5EFC mov bx, word [bp + lsvDataStart] 0 0000E69F 8B46FE mov ax, word [bp + lsvDataStart + 2] 0 0000E6A2 891E[0000] mov word [reg_ebx], bx 0 0000E6A6 A3[0000] mov word [reg_eax], ax 2676 @@: 2677 0 0000E6A9 F606[6902]08 testopt [load_options], LOAD_SET_AXBX_ROOT_HIDDEN 0 0000E6AE 7413 jz @F 0 0000E6B0 8B5ED0 mov bx, word [bp + ldRootSector] 0 0000E6B3 8B46D2 mov ax, word [bp + ldRootSector + 2] 0 0000E6B6 035E1C add bx, word [bp + bsBPB + bpbHiddenSectors] 0 0000E6B9 13461E adc ax, word [bp + bsBPB + bpbHiddenSectors + 2] 0 0000E6BC 891E[0000] mov word [reg_ebx], bx 0 0000E6C0 A3[0000] mov word [reg_eax], ax 2686 @@: 2687 0 0000E6C3 F606[6802]04 testopt [load_options], LOAD_SET_SIDI_CLUSTER 0 0000E6C8 740D jz @F 0 0000E6CA 8B56F2 mov dx, word [bp + lsvFirstCluster + 2] 0 0000E6CD 8B46F0 mov ax, word [bp + lsvFirstCluster] 0 0000E6D0 8916[0000] mov word [reg_esi], dx 0 0000E6D4 A3[0000] mov word [reg_edi], ax 2694 @@: 2695 2696 ; (boot.asm code ends here) 2697 2698 0 0000E6D7 C43E[2405] les di, [load_bpb_dest] 0 0000E6DB 57 push di 0 0000E6DC 83EF10 sub di, -LOADSTACKVARS 0 0000E6DF BE[F001] mov si, load_data - LOADDATA2 + LOADSTACKVARS 0 0000E6E2 B91000 mov cx, -LOADSTACKVARS 0 0000E6E5 F606[6902]20 testopt [load_options], LOAD_NO_BPB 0 0000E6EA 7568 jnz .no_bpb_movsb 0 0000E6EC B93400 mov cx, -LOADSTACKVARS + bsBPB + bpbNew 0 0000E6EF F3A4 rep movsb ; move common BPB part 2708 0 0000E6F1 394E16 cmp word [bp + bsBPB + bpbSectorsPerFAT], cx 0 0000E6F4 B93600 mov cx, ebpbNew - bpbNew + BPBN_size ; move FAT32 EBPB part + BPBN 0 0000E6F7 7406 je @F 0 0000E6F9 83C61C add si, ebpbNew - bpbNew; -> BPBN 0 0000E6FC B91A00 mov cx, BPBN_size ; move only BPBN 2714 @@: 0 0000E6FF F3A4 rep movsb 2716 0 0000E701 89F8 mov ax, di 0 0000E703 5F pop di 0 0000E704 29F8 sub ax, di 0 0000E706 48 dec ax 0 0000E707 48 dec ax 0 0000E708 86C4 xchg al, ah 0 0000E70A B0EB mov al, 0EBh 0 0000E70C 268905 mov word [es:di], ax 0 0000E70F 26C6450290 mov byte [es:di + 2], 90h 2726 0 0000E714 F606[6902]02 testopt [load_options], LOAD_LBA_SET_TYPE 0 0000E719 7416 jz @F 0 0000E71B F646E701 test byte [bp + ldFlags], ldfHasLBA 0 0000E71F 7410 jz @F 2731 0 0000E721 26C645020E mov byte [es:di + 2], 0Eh ; (LBA-enabled) FAT16 FS partition type 0 0000E726 807EE620 cmp byte [bp + ldFATType], 32 0 0000E72A 7205 jb @F 0 0000E72C 26C645020C mov byte [es:di + 2], 0Ch ; (LBA-enabled) FAT32 FS partition type 2736 @@: 2737 0 0000E731 26C785FE0155AA mov word [es:di + 510], 0AA55h 0 0000E738 1E push ds 0 0000E739 31C9 xor cx, cx 0 0000E73B 8ED9 mov ds, cx 0 0000E73D BE0005 mov si, 500h 0 0000E740 57 push di 0 0000E741 81C7D601 add di, 512 - 2 - 2 - 14 - 12 - 12 2745 ; 2: AA55 sig, 2: null word, 14: MS-DOS 7 protocol 2746 ; message table pointer lives here, 2747 ; 12: add name, 12: kernel name 0 0000E745 B10B mov cl, 11 0 0000E747 F3A4 rep movsb ; put kernel filename into the pseudo boot sector 0 0000E749 47 inc di 0 0000E74A BE2005 mov si, 520h 0 0000E74D B10B mov cl, 11 0 0000E74F F3A4 rep movsb ; put additional filename (if any), cx = 0 0 0000E751 5F pop di 0 0000E752 1F pop ds 2756 2757 ; cx = 0 0 0000E753 A8 db __TEST_IMM8 ; (skip pop) 2759 .no_bpb_movsb: 0 0000E754 58 pop ax ; discard word on stack 0 0000E755 F3A4 rep movsb 2762 0 0000E757 8126[0000]FFF8 and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 2764 0 0000E75D 890E[0200] mov word [reg_eip + 2], cx 0 0000E761 FF36[6C02] push word [load_entrypoint] 0 0000E765 8F06[0000] pop word [reg_eip] 0 0000E769 A1[6E02] mov ax, word [load_entrypoint + 2] 0 0000E76C 0306[6A02] add ax, word [load_loadseg] 0 0000E770 A3[0000] mov word [reg_cs], ax 2771 0 0000E773 A1[2605] mov ax, word [load_bpb_dest + 2] 0 0000E776 A3[0000] mov word [reg_ss], ax 2774 ; testopt [load_options], LOAD_SET_DSBP_BPB 2775 ; jz @F 2776 ; (always set ds -- overwritten later if LOAD_SET_DSSI_DPT) 0 0000E779 A3[0000] mov word [reg_ds], ax 2778 @@: 0 0000E77C 8B1E[2405] mov bx, word [load_bpb_dest] 0 0000E780 890E[0200] mov word [reg_ebp + 2], cx 0 0000E784 891E[0000] mov word [reg_ebp], bx 0 0000E788 89D8 mov ax, bx 0 0000E78A 83EB10 sub bx, -LOADSTACKVARS ; (subtracts --10h) 0 0000E78D 890E[0200] mov word [reg_esp + 2], cx 0 0000E791 891E[0000] mov word [reg_esp], bx 2786 0 0000E795 F606[6902]20 testopt [load_options], LOAD_NO_BPB 0 0000E79A 751B jnz @F 2789 0 0000E79C F606[6902]04 testopt [load_options], LOAD_MESSAGE_TABLE 0 0000E7A1 7414 jz @F 0 0000E7A3 B96000 mov cx, (bsBPB + ebpbNew + BPBN_size + 2 + 15) & ~15 0 0000E7A6 01C8 add ax, cx 0 0000E7A8 268985EE01 mov word [es:di + 1EEh], ax 2795 ; this pointer points to the MS-DOS 7 message table. 2796 ; 2797 ; note that in actual MS-DOS 7 boot sectors, this value is 2798 ; eg 17Fh, which is incorrectly used with the boot sector's 2799 ; ss to load the table into the initial loader. 2800 ; 2801 ; refer to comments in msg.asm about msdos7_message_table. 0 0000E7AD BE[0000] mov si, msdos7_message_table 0 0000E7B0 01CF add di, cx 0 0000E7B2 B9[0000] mov cx, msdos7_message_table.size 0 0000E7B5 F3A4 rep movsb 2806 @@: 2807 0 0000E7B7 F606[6902]10 testopt [load_options], LOAD_CMDLINE 0 0000E7BC 7450 jz .no_cmdline 2810 0 0000E7BE 8B36[3205] mov si, word [load_cmdline] 0 0000E7C2 85F6 test si, si 0 0000E7C4 7508 jnz @F 0 0000E7C6 C606[3E05]00 mov byte [load_cmdline_first], 0 0 0000E7CB BE[3205] mov si, load_cmdline 2816 @@: 2817 2818 ; due to the size of our line_in buffer, 2819 ; the command line is never too long for 2820 ; the lsv command line buffer (256 bytes). 0 0000E7CE B98000 mov cx, lsvclBufferLength / 2 0 0000E7D1 812E[0000]0401 sub word [reg_esp], - lsvCommandLine.start + LOADSTACKVARS 2823 ; hazard: if sp is too low, this underflows! 0 0000E7D7 7303E9CE00 jc .error_stack_underflow 0 0000E7DC 8E06[0000] mov es, [reg_ss] 0 0000E7E0 8B3E[0000] mov di, [reg_esp] ; es:di -> stack area for the pointers 0 0000E7E4 81FF0001 cmp di, 256 0 0000E7E8 7303E9BD00 jb .error_stack_underflow 0 0000E7ED 57 push di 0 0000E7EE A0[3E05] mov al, byte [load_cmdline_first] 0 0000E7F1 84C0 test al, al ; have another first byte ? 0 0000E7F3 7404 jz @F ; no --> 0 0000E7F5 AA stosb ; store it 0 0000E7F6 46 inc si ; skip source 0 0000E7F7 A4 movsb ; make it even (1st word done) 0 0000E7F8 49 dec cx ; one word less 2837 @@: 0 0000E7F9 F3A5 rep movsw 0 0000E7FB 26884DFF mov byte [es:di - 1], cl; truncate command line if too long 0 0000E7FF B8434C mov ax, lsvclSignature 0 0000E802 AB stosw ; write lsvCommandLine.signature 0 0000E803 31C0 xor ax, ax 0 0000E805 AB stosw ; write lsvExtra 0 0000E806 5F pop di 0 0000E807 B90001 mov cx, lsvclBufferLength 0 0000E80A F2AE repne scasb ; search terminator 0 0000E80C F3AA rep stosb ; zero buffer behind terminator 2848 .no_cmdline: 2849 0 0000E80E 31C0 xor ax, ax 0 0000E810 8EC0 mov es, ax 0 0000E812 BF7800 mov di, 1Eh * 4 0 0000E815 268B5502 mov dx, word [es:di + 2] 0 0000E819 268B1D mov bx, word [es:di] 2855 0 0000E81C F606[6802]10 testopt [load_options], LOAD_SET_DSSI_DPT 0 0000E821 7408 jz @F 0 0000E823 8916[0000] mov word [reg_ds], dx 0 0000E827 891E[0000] mov word [reg_esi], bx 2860 @@: 0 0000E82B F606[6802]20 testopt [load_options], LOAD_PUSH_DPT 0 0000E830 7419 jz @F 2863 0 0000E832 06 push es 0 0000E833 57 push di 0 0000E834 832E[0000]08 sub word [reg_esp], 4 * 2 ; push four words 0 0000E839 8E06[0000] mov es, [reg_ss] 0 0000E83D 8B3E[0000] mov di, [reg_esp] ; es:di -> stack area for the pointers 0 0000E841 58 pop ax ; di (1Eh * 4) 0 0000E842 AB stosw 0 0000E843 58 pop ax ; es (0) 0 0000E844 AB stosw 0 0000E845 89D8 mov ax, bx 0 0000E847 AB stosw ; si (Int1E offset) 0 0000E848 89D0 mov ax, dx 0 0000E84A AB stosw ; ds (Int1E segment) 2877 @@: 2878 0 0000E84B F606[6902]40 testopt [load_options], LOAD_SET_DSSI_PARTINFO 0 0000E850 7416 jz @F 0 0000E852 A1[3605] mov ax, word [load_partition_entry + 2] 0 0000E855 A3[0000] mov word [reg_ds], ax 0 0000E858 A1[3405] mov ax, word [load_partition_entry] 0 0000E85B A3[0000] mov word [reg_esi], ax 0 0000E85E F606[6902]20 testopt [load_options], LOAD_NO_BPB 0 0000E863 7403 jz @F 0 0000E865 A3[0000] mov word [reg_ebp], ax 2888 @@: 0 0000E868 C43E[7402] les di, [load_copy_bpb] 0 0000E86C 8CC0 mov ax, es 0 0000E86E 09F8 or ax, di 0 0000E870 740B jz @F 0 0000E872 C536[2405] lds si, [load_bpb_dest] 0 0000E876 B90001 mov cx, words(512) 0 0000E879 F3A5 rep movsw 0 0000E87B 16 push ss 0 0000E87C 1F pop ds 2898 @@: 2899 0 0000E87D 800E[0300]01 setopt [internalflags2], dif2_boot_loaded_kernel 0 0000E882 C3 retn 2902 2903 2904 .error_check_mismatch: 0 0000E883 4F dec di 0 0000E884 4F dec di ; = offset into file 0 0000E885 26FF35 push word [es:di] ; = value we got in file 0 0000E888 57 push di ; = offset 0 0000E889 16 push ss 0 0000E88A 07 pop es ; set STT 0 0000E88B BF[0000] mov di, msg.bootfail_check_mismatch.check_value 0 0000E88E E8[0000] call hexword ; write expected value 0 0000E891 58 pop ax 0 0000E892 BF[0000] mov di, msg.bootfail_check_mismatch.check_offset 0 0000E895 E8[0000] call hexword ; write offset 0 0000E898 58 pop ax 0 0000E899 BF[0000] mov di, msg.bootfail_check_mismatch.check_got 0 0000E89C E8[0000] call hexword ; write what we got in file 2919 0 0000E89F BA[0000] mov dx, msg.bootfail_check_mismatch 0 0000E8A2 B81C02 mov ax, 021Ch 0 0000E8A5 E8[0000] call setrc 0 0000E8A8 EB09 jmp @F ; fail with error message 2924 2925 .error_stack_underflow: 0 0000E8AA BA[0000] mov dx, msg.bootfail_stack_underflow 0 0000E8AD B81D02 mov ax, 021Dh 0 0000E8B0 E8[0000] call setrc 2929 @@: 0 0000E8B3 E9EEF2 jmp bootcmd.fail 2931 2932 2933 boot_dir: 0 0000E8B6 8026[0000]F7 clropt [internalflags3], dif3_load_dir_dir 0 0000E8BB E8[0000] call skipwhite 0 0000E8BE 4E dec si 0 0000E8BF BA[0000] mov dx, msg.dir 0 0000E8C2 E8[0000] call isstring? 0 0000E8C5 7505 jne @F 0 0000E8C7 800E[0000]08 setopt [internalflags3], dif3_load_dir_dir 2941 @@: 0 0000E8CC C706[4C05][0000] mov word [load_kernelname_input], msg.emptydirname 0 0000E8D2 AC lodsb 0 0000E8D3 E8[0000] call yy_common_parse_name 0 0000E8D6 E8[0000] call chkeol 0 0000E8D9 89DE mov si, bx 0 0000E8DB AC lodsb 0 0000E8DC E8D4F4 call parseloadunit_default_sdp 0 0000E8DF 7406 jz .fn_done_eol ; no filename given, use defaults --> 2950 ; al was = '/' or '\' or first pathname's first character 2951 ; si-> next char 0 0000E8E1 BB[4C05] mov bx, load_kernelname_input 0 0000E8E4 E886F0 call bootcmd.pathname_parse_super 2954 2955 .fn_done_eol: 0 0000E8E7 F606[0000]07 testopt [internalflags3], dif3_load_is_dp 0 0000E8EC 7527 jnz .boot_dir_from_ldp 2958 0 0000E8EE 8A1E[3805] mov bl, [load_partition] 0 0000E8F2 803E[4002]80 cmp byte [load_unit], 80h 0 0000E8F7 7228 jb .boot_dir_is_diskette 0 0000E8F9 84DB test bl, bl ; partition specified ? 0 0000E8FB 7503E918EE jz bootcmd.error ; no, error --> 2964 0 0000E900 E84A07 call query_geometry 2966 0 0000E903 B9[1413] mov cx, boot_dir_from_partition 0 0000E906 E89005 call scan_partitions 0 0000E909 BA[0000] mov dx, msg.boot_partition_not_found 0 0000E90C B81102 mov ax, 0211h 0 0000E90F E8[0000] call setrc 0 0000E912 E98FF2 jmp bootcmd.fail 2973 2974 2975 .boot_dir_from_ldp: 0 0000E915 E83507 call query_geometry 0 0000E918 A1[2805] mov ax, word [load_partition_sector] 0 0000E91B 8B16[2A05] mov dx, word [load_partition_sector + 2] 0 0000E91F EB0E jmp @F 2980 2981 2982 .boot_dir_is_diskette: 0 0000E921 84DB test bl, bl ; partition specified ? 0 0000E923 7403E9F0ED jnz bootcmd.error ; yes, error --> 2985 0 0000E928 E82207 call query_geometry 2987 0 0000E92B 31C0 xor ax, ax 0 0000E92D 31D2 xor dx, dx 2990 @@: 0 0000E92F 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000E933 52 push dx 0 0000E934 50 push ax 0 0000E935 E8E108 call read_ae_512_bytes 2995 0 0000E938 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000E93F 7403E9B70D jne boot_sigmismatch 0 0000E944 58 pop ax 0 0000E945 5A pop dx 3000 0 0000E946 EB41 jmp boot_dir_common 3002 3003 3004 ; INP: es:si -> partition table entry, 3005 ; si = load_partition_table .. load_partition_table+48, 3006 ; es = ss 3007 ; bp + di -> above part table metadata, 3008 ; dwo [bp + di - 4] = root (outermost extended position) 3009 ; dwo [bp + di - 8] = base (current table position) 3010 ; CHG: ax, bx, (cx), dx 3011 boot_dir_from_partition: 3012 d4 call d4message 3013 d4 asciz "In boot_dir_from_partition",13,10 3014 0 0000E948 A0[3905] mov al, byte [load_current_partition] 0 0000E94B 3A06[3805] cmp al, byte [load_partition] 0 0000E94F 7401 je .gotit 0 0000E951 C3 retn 3019 3020 .gotit: 3021 d4 call d4message 3022 d4 asciz "In boot_dir_from_partition.gotit",13,10 3023 0 0000E952 8B43F8 mov ax, [bp + di - 8] 0 0000E955 8B53FA mov dx, [bp + di - 6] ; base (current table position) 3026 0 0000E958 26034408 add ax, [es:si + 8] 0 0000E95C 2613540A adc dx, [es:si + 8 + 2] ; add offset to logical partition 3029 0 0000E960 26894408 mov word [es:si + 8], ax 0 0000E964 2689540A mov word [es:si + 8 + 2], dx ; store in partition table entry 0 0000E968 26800C80 or byte [es:si + 0], 80h ; set bootable flag 3033 0 0000E96C 89EC mov sp, bp 0 0000E96E 5D pop bp ; restore bp (scan_partitions) 0 0000E96F 5B pop bx ; discard ret address (scan_partitions) 3037 3038 ; dx:ax = absolute sector number 0 0000E970 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000E974 50 push ax 0 0000E975 52 push dx 0 0000E976 E8A008 call read_ae_512_bytes ; load partition boot sector 3043 0 0000E979 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000E980 7403E9760D jne boot_sigmismatch 3046 0 0000E985 31C9 xor cx, cx 3048 ; cmp word [es:0], cx 3049 ; je boot_codemismatch 3050 0 0000E987 5A pop dx 0 0000E988 58 pop ax 3053 3054 ; dx:ax = boot sector 3055 ; byte [load_unit] = unit 3056 ; es:0-> read sector 3057 boot_dir_common: 0 0000E989 26A31C00 mov word [es:bsBPB + bpbHiddenSectors], ax 0 0000E98D 2689161E00 mov word [es:bsBPB + bpbHiddenSectors + 2], dx 3060 0 0000E992 8B5E0B mov bx, [bp + bsBPB + bpbBytesPerSector] 0 0000E995 263B1E0B00 cmp bx, [es:bsBPB + bpbBytesPerSector] 0 0000E99A 7403E9700D jne boot_secsizemismatch 3064 3065 ; preserve some variables from our pseudo BPB 0 0000E99F 31C0 xor ax, ax 0 0000E9A1 FF7618 push word [bp + bsBPB + bpbCHSSectors] 0 0000E9A4 268F061800 pop word [es:bsBPB + bpbCHSSectors] 0 0000E9A9 FF761A push word [bp + bsBPB + bpbCHSHeads] 0 0000E9AC 268F061A00 pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 3071 0 0000E9B1 8B5EEA mov bx, word [bp + ldParaPerSector] 0 0000E9B4 D1EB shr bx, 1 0 0000E9B6 895ED4 mov word [bp + ldEntriesPerSector], bx 3075 0 0000E9B9 2639061600 cmp word [es:bsBPB + bpbSectorsPerFAT], ax 0 0000E9BE 8A5E40 mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 0 0000E9C1 7407 je .is_fat32 0 0000E9C3 26881E2400 mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 0 0000E9C8 EB05 jmp short .was_fat1612 3081 .is_fat32: 0 0000E9CA 26881E4000 mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 3083 .was_fat1612: 3084 0 0000E9CF 06 push es 0 0000E9D0 1E push ds 0 0000E9D1 06 push es 0 0000E9D2 1F pop ds 0 0000E9D3 31F6 xor si, si ; -> BPB from boot partition 0 0000E9D5 16 push ss 0 0000E9D6 07 pop es 0 0000E9D7 BF[0002] mov di, load_data - LOADDATA2 ; -> our copy of a BPB 0 0000E9DA B95A00 mov cx, (bsBPB + ebpbNew + BPBN_size) 0 0000E9DD F3A4 rep movsb ; get the BPB 3095 0 0000E9DF 1F pop ds 0 0000E9E0 800E[0000]80 setopt [internalflags3], dif3_partition_changed 3098 0 0000E9E5 394616 cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 0 0000E9E8 740B je @F ; is FAT32 --> 0 0000E9EA BE[2402] mov si, load_data - LOADDATA2 + bsBPB + bpbNew 0 0000E9ED BF[4002] mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 0 0000E9F0 B91A00 mov cx, BPBN_size 0 0000E9F3 F3A4 rep movsb ; clone the FAT16 / FAT12 BPBN 3105 ; to where the FAT32 BPBN lives 3106 @@: 0 0000E9F5 07 pop es 3108 0 0000E9F6 FF36[0000] push word [auxbuff_segorsel] 0 0000E9FA 8F46F8 pop word [bp + lsvFATSeg] 0 0000E9FD 804EE702 or byte [bp + ldFlags], ldfFATInvalid 0 0000EA01 B8FFFF mov ax, -1 0 0000EA04 8946F4 mov word [bp + lsvFATSector], ax 0 0000EA07 8946F6 mov word [bp + lsvFATSector + 2], ax 3115 0 0000EA0A E8E912 call initialise_fs 3117 0 0000EA0D C706[8605][EF15] mov word [handle_scan_dir_entry], scan_dir_entry 3119 0 0000EA13 C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000EA18 8B36[4C05] mov si, word [load_kernelname_input] 0 0000EA1C 803C2F cmp byte [si], '/' 0 0000EA1F 7501 jne @F 0 0000EA21 46 inc si 3125 @@: 3126 .dotcomponent: 0 0000EA22 803C00 cmp byte [si], 0 0 0000EA25 7503E99F00 je .root 0 0000EA2A 16 push ss 0 0000EA2B 07 pop es 0 0000EA2C E8D2F6 call boot_parse_fn ; get next pathname 0 0000EA2F 72F1 jc .dotcomponent 0 0000EA31 3C2F cmp al, '/' 0 0000EA33 7509 jne @F 0 0000EA35 C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000EA3A 8936[4E05] mov word [load_kernelname_next], si 3137 @@: 0 0000EA3E 84C0 test al, al 0 0000EA40 7506 jnz @F 0 0000EA42 C706[8605][EC15] mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 3141 @@: 3142 0 0000EA48 BFFFFF mov di, -1 0 0000EA4B 89FE mov si, di 0 0000EA4D 897EF4 mov [bp + lsvFATSector], di 0 0000EA50 8976F6 mov [bp + lsvFATSector + 2], si 3147 0 0000EA53 31C0 xor ax, ax 0 0000EA55 31D2 xor dx, dx 3150 0 0000EA57 83EC20 sub sp, 32 3152 3153 .scan_dir_dirname_loop: 0 0000EA5A 8946EC mov word [bp + ldDirCluster], ax 0 0000EA5D 8956EE mov word [bp + ldDirCluster + 2], dx 3156 0 0000EA60 16 push ss 0 0000EA61 07 pop es 0 0000EA62 89E3 mov bx, sp 0 0000EA64 E8F101 call scan_dir_aux_with_error 3161 0 0000EA67 803E[3B05]10 cmp byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000EA6C 7544 jne .got_direntry 3164 0 0000EA6E 56 push si 0 0000EA6F 57 push di 0 0000EA70 C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000EA75 8B36[4E05] mov si, word [load_kernelname_next] 3169 .dotcomponent2_next: 0 0000EA79 803C00 cmp byte [si], 0 0 0000EA7C 7451 je .sub 3172 0 0000EA7E 06 push es 0 0000EA7F 16 push ss 0 0000EA80 07 pop es 0 0000EA81 E87DF6 call boot_parse_fn ; get next pathname 0 0000EA84 07 pop es 0 0000EA85 72F2 jc .dotcomponent2_next 0 0000EA87 3C2F cmp al, '/' 0 0000EA89 7509 jne @F 0 0000EA8B C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000EA90 8936[4E05] mov word [load_kernelname_next], si 3183 @@: 0 0000EA94 84C0 test al, al 0 0000EA96 7506 jnz @F 0 0000EA98 C706[8605][EC15] mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 3187 @@: 3188 0 0000EA9E 5F pop di 0 0000EA9F 5E pop si 3191 0 0000EAA0 31D2 xor dx, dx 0 0000EAA2 268B471A mov ax, [es:bx + deClusterLow] 3194 ; = first cluster (not FAT32) 0 0000EAA6 807EE620 cmp byte [bp + ldFATType], 32 0 0000EAAA 7504 jne @F 0 0000EAAC 268B5714 mov dx, [es:bx + deClusterHigh] 3198 ; dx:ax = first cluster (FAT32) 3199 @@: 3200 0 0000EAB0 EBA8 jmp .scan_dir_dirname_loop 3202 3203 3204 .got_direntry: 0 0000EAB2 F606[0000]08 testopt [internalflags3], dif3_load_dir_dir 0 0000EAB7 7507 jnz @F 0 0000EAB9 26F6470B10 test byte [es:bx + deAttrib], ATTR_DIRECTORY 0 0000EABE 7511 jnz @FF 3209 @@: 0 0000EAC0 89DF mov di, bx 0 0000EAC2 E83400 call list_dir_entry 0 0000EAC5 83C420 add sp, 32 0 0000EAC8 C3 retn 3214 3215 .root: 0 0000EAC9 31C0 xor ax, ax 0 0000EACB 31D2 xor dx, dx 0 0000EACD EB15 jmp .scan 3219 3220 .sub: 0 0000EACF 5F pop di 0 0000EAD0 5E pop si 3223 3224 @@: 0 0000EAD1 83C420 add sp, 32 3226 0 0000EAD4 31D2 xor dx, dx 0 0000EAD6 268B471A mov ax, [es:bx + deClusterLow] 3229 ; = first cluster (not FAT32) 0 0000EADA 807EE620 cmp byte [bp + ldFATType], 32 0 0000EADE 7504 jne @F 0 0000EAE0 268B5714 mov dx, [es:bx + deClusterHigh] 3233 ; dx:ax = first cluster (FAT32) 3234 @@: 3235 .scan: 0 0000EAE4 8946EC mov word [bp + ldDirCluster], ax 0 0000EAE7 8956EE mov word [bp + ldDirCluster + 2], dx 3238 0 0000EAEA C706[8605][C514] mov word [handle_scan_dir_entry], list_dir_entry 0 0000EAF0 C706[8805][0000] mov word [handle_scan_dir_not_found], dmycmd 3241 0 0000EAF6 E96501 jmp scan_dir_aux 3243 3244 3245 list_dir_entry: 0 0000EAF9 26803D00 cmp byte [es:di], 0 0 0000EAFD 7503E91D01 je .ret ; (NC, ZR) 0 0000EB02 26803DE5 cmp byte [es:di], 0E5h 0 0000EB06 7504 jne @F 0 0000EB08 80CB01 or bl, 1 ; (NC, NZ) 0 0000EB0B C3 retn 3252 3253 @@: 0 0000EB0C 268A5D0B mov bl, byte [es:di + deAttrib] 0 0000EB10 F6C308 test bl, ATTR_VOLLABEL 0 0000EB13 7403E90401 jnz .ret_NC_NZ ; skip volume labels (and LFNs) --> (NZ) 3257 0 0000EB18 26803D2E cmp byte [es:di], '.' ; dot or dotdot entry ? 0 0000EB1C 7503E9FB00 je .ret_NC_NZ ; yes, skip --> 3260 0 0000EB21 50 push ax 0 0000EB22 53 push bx 0 0000EB23 51 push cx 0 0000EB24 52 push dx 0 0000EB25 56 push si 0 0000EB26 57 push di 0 0000EB27 06 push es 0 0000EB28 1E push ds 0 0000EB29 06 push es 0 0000EB2A 1F pop ds 0 0000EB2B 89FE mov si, di 3272 0 0000EB2D 16 push ss 0 0000EB2E 07 pop es 0 0000EB2F BF[0000] mov di, line_out 0 0000EB32 B90800 mov cx, 8 0 0000EB35 F3A4 rep movsb 0 0000EB37 B82020 mov ax, 2020h 0 0000EB3A AA stosb 0 0000EB3B B103 mov cl, 3 0 0000EB3D F3A4 rep movsb 0 0000EB3F AB stosw 3283 0 0000EB40 1F pop ds 0 0000EB41 B02D mov al, '-' 0 0000EB43 F6C320 test bl, ATTR_ARCHIVE 0 0000EB46 7402 jz @F 0 0000EB48 B041 mov al, 'A' 3289 @@: 0 0000EB4A AA stosb 0 0000EB4B B02D mov al, '-' 0 0000EB4D F6C302 test bl, ATTR_HIDDEN 0 0000EB50 7402 jz @F 0 0000EB52 B048 mov al, 'H' 3295 @@: 0 0000EB54 AA stosb 0 0000EB55 B02D mov al, '-' 0 0000EB57 F6C301 test bl, ATTR_READONLY 0 0000EB5A 7402 jz @F 0 0000EB5C B052 mov al, 'R' 3301 @@: 0 0000EB5E AA stosb 0 0000EB5F B02D mov al, '-' 0 0000EB61 F6C304 test bl, ATTR_SYSTEM 0 0000EB64 7402 jz @F 0 0000EB66 B053 mov al, 'S' 3307 @@: 0 0000EB68 AA stosb 0 0000EB69 B82020 mov ax, 2020h 0 0000EB6C AB stosw 3311 0 0000EB6D F6C310 test bl, ATTR_DIRECTORY 0 0000EB70 7408 jz @F 0 0000EB72 BE[0000] mov si, msg.dirinsteadsize 0 0000EB75 E8[0000] call copy_single_counted_string 0 0000EB78 EB2D jmp @FF 3317 3318 @@: 0 0000EB7A 07 pop es 0 0000EB7B 5E pop si 0 0000EB7C 56 push si 0 0000EB7D 06 push es 0 0000EB7E 268A440C mov al, byte [es:si + dePlusSize] 0 0000EB82 88C4 mov ah, al 0 0000EB84 2507E0 and ax, 0E007h 0 0000EB87 88E2 mov dl, ah 0 0000EB89 B400 mov ah, 0 0 0000EB8B B600 mov dh, 0 0 0000EB8D D1EA shr dx, 1 0 0000EB8F D1EA shr dx, 1 0 0000EB91 09D0 or ax, dx 0 0000EB93 50 push ax 0 0000EB94 268B541E mov dx, word [es:si + deSize + 2] 0 0000EB98 268B441C mov ax, word [es:si + deSize] 0 0000EB9C 5E pop si 0 0000EB9D 16 push ss 0 0000EB9E 07 pop es 0 0000EB9F 31C9 xor cx, cx 0 0000EBA1 BB0800 mov bx, 4+4 0 0000EBA4 E8[0000] call disp_dxax_times_cx_width_bx_size.store 3341 3342 @@: 0 0000EBA7 B82020 mov ax, 2020h 0 0000EBAA AB stosw 0 0000EBAB 07 pop es 0 0000EBAC 5E pop si 0 0000EBAD 56 push si 0 0000EBAE 06 push es 0 0000EBAF 268B5C18 mov bx, word [es:si + deDate] 0 0000EBB3 268B7416 mov si, word [es:si + deTime] 0 0000EBB7 16 push ss 0 0000EBB8 07 pop es 0 0000EBB9 89D8 mov ax, bx 0 0000EBBB B90900 mov cx, 9 0 0000EBBE D3E8 shr ax, cl 0 0000EBC0 05BC07 add ax, 1980 0 0000EBC3 31D2 xor dx, dx 0 0000EBC5 B104 mov cl, 4 0 0000EBC7 E8[0000] call dec_dword_minwidth 0 0000EBCA B02D mov al, '-' 0 0000EBCC AA stosb 0 0000EBCD 89D8 mov ax, bx 0 0000EBCF B105 mov cl, 5 0 0000EBD1 D3E8 shr ax, cl 0 0000EBD3 83E00F and ax, 15 0 0000EBD6 B102 mov cl, 2 0 0000EBD8 E8[0000] call dec_dword_minwidth 0 0000EBDB B02D mov al, '-' 0 0000EBDD AA stosb 0 0000EBDE 89D8 mov ax, bx 0 0000EBE0 83E01F and ax, 31 0 0000EBE3 E8[0000] call dec_dword_minwidth 0 0000EBE6 B020 mov al, 32 0 0000EBE8 AA stosb 0 0000EBE9 89F0 mov ax, si 0 0000EBEB B10B mov cl, 11 0 0000EBED D3E8 shr ax, cl 0 0000EBEF B102 mov cl, 2 0 0000EBF1 E8[0000] call dec_dword_minwidth 0 0000EBF4 B03A mov al, ':' 0 0000EBF6 AA stosb 0 0000EBF7 89F0 mov ax, si 0 0000EBF9 B105 mov cl, 5 0 0000EBFB D3E8 shr ax, cl 0 0000EBFD 83E03F and ax, 63 0 0000EC00 B102 mov cl, 2 0 0000EC02 E8[0000] call dec_dword_minwidth 0 0000EC05 B03A mov al, ':' 0 0000EC07 AA stosb 0 0000EC08 89F0 mov ax, si 0 0000EC0A 83E01F and ax, 31 0 0000EC0D D1E0 shl ax, 1 0 0000EC0F E8[0000] call dec_dword_minwidth 3394 0 0000EC12 E8[0000] call putsline_crlf 3396 0 0000EC15 07 pop es 0 0000EC16 5F pop di 0 0000EC17 5E pop si 0 0000EC18 5A pop dx 0 0000EC19 59 pop cx 0 0000EC1A 5B pop bx 0 0000EC1B 58 pop ax 3404 3405 .ret_NC_NZ: 0 0000EC1C 80CB01 or bl, 1 ; (NC, NZ) 3407 .ret: 0 0000EC1F C3 retn 3409 3410 3411 usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 3411 ------------------ note: usesection lDEBUG_DATA_ENTRY 3412 3413 align 2, db 0 3414 %if _LOADER 3415 loader_lowest_free: 3416 dw 0 3417 %endif 3418 handle_scan_dir_entry: 0 00007DA6 [0000] dw error 3420 handle_scan_dir_not_found: 0 00007DA8 [0000] dw error 3422 3423 usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 3423 ------------------ note: usesection lDEBUG_CODE 3424 3425 scan_dir_entry_dir_or_file: 0 0000EC20 B701 mov bh, 1 0 0000EC22 A9 db __TEST_IMM16 ; (skip mov) 3428 3429 scan_dir_entry: 0 0000EC23 B700 mov bh, 0 0 0000EC25 26803D00 cmp byte [es:di], 0 0 0000EC29 F9 stc 0 0000EC2A 7425 je .ret 0 0000EC2C 268A5D0B mov bl, byte [es:di + deAttrib] 0 0000EC30 F6C308 test bl, ATTR_VOLLABEL 0 0000EC33 751B jnz @F ; skip volume labels (and LFNs) --> (NZ) 0 0000EC35 84FF test bh, bh 0 0000EC37 7509 jnz .no_check_dir 0 0000EC39 80E310 and bl, ATTR_DIRECTORY ; isolate directory bit 0 0000EC3C 3A1E[3B05] cmp bl, byte [load_check_dir_attr] ; is it what we're searching? 0 0000EC40 750E jne @F ; no --> 3442 .no_check_dir: 0 0000EC42 56 push si 0 0000EC43 57 push di 0 0000EC44 51 push cx 0 0000EC45 BE[4005] mov si, load_kernel_name ; ds:si-> name to match 0 0000EC48 B90B00 mov cx, 11 ; length of padded 8.3 FAT filename 0 0000EC4B F3A6 repe cmpsb ; check entry 0 0000EC4D 59 pop cx 0 0000EC4E 5F pop di 0 0000EC4F 5E pop si 3452 @@: 0 0000EC50 F8 clc 3454 .ret: 0 0000EC51 C3 retn 3456 3457 3458 ; INP: es:bx -> where to place directory entry 3459 ; si:di = loaded FAT sector (0 = first FAT sector) 3460 ; dword [bp + ldDirCluster] = directory cluster to scan, 3461 ; 0 for root dir 3462 ; byte [bp + ldFATType] = size of FAT entry in bits 3463 ; OUT: es:bx -> directory entry (es:bx unchanged) 3464 ; si:di = loaded FAT sector 3465 ; CHG: dx, ax, si, di, cx 3466 scan_dir_aux_for_file: 0 0000EC52 C706[8605][EF15] mov word [handle_scan_dir_entry], scan_dir_entry 3468 3469 scan_dir_aux_with_error: 0 0000EC58 C706[8805][8216] mov word [handle_scan_dir_not_found], error_filenotfound 3471 3472 scan_dir_aux: section_of_function 0 0000EC5E FF36[0000] push word [auxbuff_segorsel] 0 0000EC62 8F06[5805] pop word [load_adr_dirbuf_segment] 3475 3476 scan_dir: 0 0000EC66 8B46EC mov ax, word [bp + ldDirCluster] 0 0000EC69 8B56EE mov dx, word [bp + ldDirCluster + 2] 3479 0 0000EC6C 85C0 test ax, ax 0 0000EC6E 7572 jnz fat32_scan_root.dir_clust_dxax 0 0000EC70 85D2 test dx, dx 0 0000EC72 756E jnz fat32_scan_root.dir_clust_dxax 3484 3485 ; got to scan root directory. use FAT12/FAT16 walker if so, 3486 ; else use FAT32 walker 3487 0 0000EC74 807EE610 cmp byte [bp + ldFATType], 16 0 0000EC78 7762 ja fat32_scan_root 3490 0 0000EC7A 56 push si 0 0000EC7B 57 push di 0 0000EC7C 06 push es 0 0000EC7D 53 push bx 3495 0 0000EC7E 8B7611 mov si, word [bp + bsBPB + bpbNumRootDirEnts] 3497 3498 3499 ; (boot.asm code starts here) 3500 3501 fat16_scan_root: 0 0000EC81 85F6 test si, si 0 0000EC83 7424 jz handle_filenotfound_fat16 3504 0 0000EC85 8B46D0 mov ax, [bp + ldRootSector] 0 0000EC88 8B56D2 mov dx, [bp + ldRootSector + 2] 3507 3508 ; Scan root directory for file. We don't bother to check for deleted 3509 ; entries (E5h) or entries that mark the end of the directory (00h). 3510 ; number of root entries in si here 3511 fat16_next_sect: 0 0000EC8B 8B1E[5805] mov bx, [load_adr_dirbuf_segment] 0 0000EC8F E89905 call read_sector 3514 0 0000EC92 8B4ED4 mov cx, [bp + ldEntriesPerSector] ; entries per sector as loop counter 0 0000EC95 31FF xor di, di ; es:di-> first entry in this sector 3517 fat16_next_ent: 0 0000EC97 FF16[8605] call near word [handle_scan_dir_entry] 3519 ..@boot_scan_dir_return_fat16_root_entry: 0 0000EC9B 720C jc handle_filenotfound_fat16 0 0000EC9D 8D7D20 lea di, [di + DIRENTRY_size] ; bytes/dirent 0 0000ECA0 7423 je fat16_found_it ; found entry --> 3523 0 0000ECA2 4E dec si ; count down entire root's entries 0 0000ECA3 E0F2 loopnz fat16_next_ent ; count down sector's entries (jumps iff si >0 && cx >0) 0 0000ECA5 85F6 test si, si ; work around qemu bug 0 0000ECA7 75E2 jnz fat16_next_sect ; (jumps iff si >0 && cx ==0) 3528 ; ends up here iff si ==0 3529 ; ie all root entries checked unsuccessfully 3530 %if 0 3531 3532 qemu prior to 2020-08 has a bug which affects the above 3533 conditionals. The bug is that if NZ is set (like when the 3534 branch to fat16_found_it is not taken) and then another 3535 instruction sets ZR (like the dec si at the end of the root 3536 directory) and then loopnz is used which sets cx to zero 3537 then after the loopnz FL will be NZ leading to the jnz branch 3538 to be taken. Eventually the entire load unit is traversed and 3539 qemu returns error 01h when trying to read past the end of 3540 the unit (at least for 1440 KiB diskettes). 3541 3542 The bug is now worked around by the comparison with zero at 3543 the fat16_next_ent label. The test si, si serves as another 3544 workaround to forcibly set the flag correctly after loopnz. 3545 It is only really needed when the entire root is filled with 3546 non-zero directory entries and an older qemu is used. 3547 3548 Reference: https://bugs.launchpad.net/qemu/+bug/1888165 3549 3550 %endif 3551 3552 handle_filenotfound_fat16: 0 0000ECA9 5B pop bx 0 0000ECAA 07 pop es 0 0000ECAB 5F pop di 0 0000ECAC 5E pop si 3557 0 0000ECAD A9 db __TEST_IMM16 ; (skip pop and pop) 3559 handle_filenotfound_fat32: 0 0000ECAE 5B pop bx 0 0000ECAF 07 pop es 3562 3563 handle_filenotfound: 0 0000ECB0 FF16[8805] call near word [handle_scan_dir_not_found] 3565 ..@boot_scan_dir_return_filenotfound: 0 0000ECB4 F9 stc 0 0000ECB5 C3 retn 3568 3569 error_filenotfound: 3570 %if _INPUT_FILE_BOOT 0 0000ECB6 E89E09 call yy_boot_file_not_found 3572 %endif 0 0000ECB9 BA[0000] mov dx, msg.boot_file_not_found 0 0000ECBC B81E02 mov ax, 021Eh 0 0000ECBF E8[0000] call setrc 0 0000ECC2 E9DFEE jmp bootcmd.fail 3577 3578 fat16_found_it: 0 0000ECC5 5B pop bx 0 0000ECC6 58 pop ax 0 0000ECC7 B92000 mov cx, 32 0 0000ECCA 29CF sub di, cx 0 0000ECCC 1E push ds 0 0000ECCD 06 push es 0 0000ECCE 1F pop ds 0 0000ECCF 89FE mov si, di ; ds:si -> entry in directory buffer 0 0000ECD1 89DF mov di, bx 0 0000ECD3 8EC0 mov es, ax ; es:di -> destination for entry 0 0000ECD5 F3A4 rep movsb 0 0000ECD7 1F pop ds 0 0000ECD8 5F pop di 0 0000ECD9 5E pop si 0 0000ECDA F8 clc 0 0000ECDB C3 retn 3595 3596 3597 ; (boot32.asm code starts here) 3598 3599 fat32_scan_root: 0 0000ECDC 8B462C mov ax, [bp + bsBPB + ebpbRootCluster] 0 0000ECDF 8B562E mov dx, [bp + bsBPB + ebpbRootCluster + 2] 3602 3603 .dir_clust_dxax: 0 0000ECE2 06 push es 0 0000ECE3 53 push bx 3606 0 0000ECE4 E88001 call check_clust 0 0000ECE7 72C5 jc handle_filenotfound_fat32 3609 3610 fat32_next_root_clust: 0 0000ECE9 E85000 call clust_to_first_sector 0 0000ECEC 51 push cx 0 0000ECED 53 push bx 0 0000ECEE 8B4EE8 mov cx, [bp + ldClusterSize] 3615 fat32_next_root_sect: 0 0000ECF1 51 push cx 0 0000ECF2 8B4ED4 mov cx, [bp + ldEntriesPerSector] 3618 3619 ; Scan root directory for file. We don't bother to check for deleted 3620 ; entries (E5h) or entries that mark the end of the directory (00h). 0 0000ECF5 8B1E[5805] mov bx, [load_adr_dirbuf_segment] 0 0000ECF9 E82F05 call read_sector 3623 0 0000ECFC 57 push di 0 0000ECFD 31FF xor di, di ; es:di-> first entry in this sector 3626 fat32_next_ent: 0 0000ECFF FF16[8605] call near word [handle_scan_dir_entry] 3628 ..@boot_scan_dir_return_subdir_or_fat32_entry: 0 0000ED03 7214 jc handle_filenotfound_fat32_pop 0 0000ED05 8D7D20 lea di, [di + DIRENTRY_size] ; bytes/dirent 0 0000ED08 7415 je fat32_found_it ; found entry --> 3632 0 0000ED0A E2F3 loop fat32_next_ent ; count down sector's entries (jumps iff cx >0) 0 0000ED0C 5F pop di 0 0000ED0D 59 pop cx 0 0000ED0E E2E1 loop fat32_next_root_sect 0 0000ED10 5B pop bx 0 0000ED11 59 pop cx 0 0000ED12 E85000 call clust_next 0 0000ED15 73D2 jnc fat32_next_root_clust 0 0000ED17 EB04 jmp @F 3642 3643 handle_filenotfound_fat32_pop: 0 0000ED19 5F pop di 0 0000ED1A 59 pop cx 0 0000ED1B 5B pop bx 0 0000ED1C 59 pop cx 3648 @@: 0 0000ED1D EB8F jmp handle_filenotfound_fat32 3650 3651 3652 fat32_found_it: 0 0000ED1F 5A pop dx ; value for di 0 0000ED20 83C406 add sp, 6 ; discard sector-in-cluster counter and cluster 0 0000ED23 5B pop bx 0 0000ED24 58 pop ax 0 0000ED25 B92000 mov cx, 32 0 0000ED28 29CF sub di, cx 0 0000ED2A 1E push ds 0 0000ED2B 06 push es 0 0000ED2C 1F pop ds 0 0000ED2D 56 push si 0 0000ED2E 89FE mov si, di ; ds:si -> entry in directory buffer 0 0000ED30 89DF mov di, bx 0 0000ED32 8EC0 mov es, ax ; es:di -> destination for entry 0 0000ED34 F3A4 rep movsb 0 0000ED36 5E pop si 0 0000ED37 1F pop ds 0 0000ED38 89D7 mov di, dx ; restore si:di = loaded FAT sector 0 0000ED3A F8 clc 0 0000ED3B C3 retn 3672 3673 3674 ; (iniload.asm code continues here) 3675 3676 ; INP: dx:ax = cluster - 2 (0-based cluster) 3677 ; OUT: cx:bx = input dx:ax 3678 ; dx:ax = first sector of that cluster 3679 ; CHG: - 3680 clust_to_first_sector: 0 0000ED3C 52 push dx 0 0000ED3D 50 push ax 0 0000ED3E 52 push dx 0 0000ED3F F726[E801] mul word [load_data - LOADDATA2 + ldClusterSize] 0 0000ED43 93 xchg bx, ax 0 0000ED44 87CA xchg cx, dx 0 0000ED46 58 pop ax 0 0000ED47 F726[E801] mul word [load_data - LOADDATA2 + ldClusterSize] 0 0000ED4B 85D2 test dx, dx 0 0000ED4D 7513 jnz .error_badchain 0 0000ED4F 92 xchg dx, ax 0 0000ED50 01CA add dx, cx 0 0000ED52 720E jc .error_badchain 0 0000ED54 93 xchg ax, bx 3695 0 0000ED55 0306[FC01] add ax, [load_data - LOADDATA2 + lsvDataStart] 0 0000ED59 1316[FE01] adc dx, [load_data - LOADDATA2 + lsvDataStart + 2] 0 0000ED5D 7203 jc .error_badchain 3699 ; dx:ax = first sector in cluster 0 0000ED5F 5B pop bx 0 0000ED60 59 pop cx ; cx:bx = cluster 0 0000ED61 C3 retn 3703 3704 .error_badchain: 0 0000ED62 E9CE0F jmp error_badchain 3706 3707 3708 ; INP: cx:bx = cluster (0-based) 3709 ; si:di = loaded FAT sector, -1 if none 3710 ; OUT: CY if no next cluster 3711 ; NC if next cluster found, 3712 ; dx:ax = next cluster value (0-based) 3713 ; si:di = loaded FAT sector 3714 ; CHG: cx, bx 3715 clust_next: 0 0000ED65 89D8 mov ax, bx 0 0000ED67 89CA mov dx, cx 3718 .dxax: 0 0000ED69 83C002 add ax, 2 0 0000ED6C 83D200 adc dx, 0 3721 0 0000ED6F 06 push es 0 0000ED70 803E[E601]10 cmp byte [load_data - LOADDATA2 + ldFATType], 16 0 0000ED75 7503 jne @F 0 0000ED77 E98800 jmp strict near .fat16 3726 @@: 0 0000ED7A 7603 jna @F 0 0000ED7C E97F00 jmp strict near .fat32 3729 @@: 3730 3731 .fat12: 3732 ; FAT12 entries are 12 bits, bytes are 8 bits. Ratio is 3 / 2, 3733 ; so multiply cluster number by 3 first, then divide by 2. 3734 ; ax = cluster number (up to 12 bits set) 0 0000ED7F 89C2 mov dx, ax 0 0000ED81 D1E0 shl ax, 1 ; = 2n (up to 13 bits set) 0 0000ED83 01D0 add ax, dx ; = 2n+n = 3n (up to 14 bits set) 0 0000ED85 D1E8 shr ax, 1 ; ax = byte offset into FAT (0..6129) 3739 ; CF = whether to use high 12 bits 0 0000ED87 19C9 sbb cx, cx ; = -1 iff CY, else 0 3741 3742 ; Use the calculated byte offset as an offset into the FAT 3743 ; buffer, which holds all of the FAT's relevant data. 0 0000ED89 8E06[F801] mov es, [load_data - LOADDATA2 + lsvFATSeg] 0 0000ED8D 89C3 mov bx, ax ; -> 16-bit word in FAT to load 3746 0 0000ED8F F606[E701]02 test byte [load_ldflags], ldfFATInvalid 0 0000ED94 7459 jz .fat12_have_fat ; already have it --> 0 0000ED96 51 push cx 0 0000ED97 31D2 xor dx, dx 0 0000ED99 F736[0B02] div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3752 ; dx = remainder, byte offset 3753 ; ax = sector to read 0 0000ED9D 52 push dx 0 0000ED9E 31D2 xor dx, dx 0 0000EDA0 8B1E[F801] mov bx, [load_data - LOADDATA2 + lsvFATSeg] 3757 0 0000EDA4 F606[E701]04 testopt [load_ldflags], ldfFATBuffered 0 0000EDA9 742A jz .12_notbuffered 0 0000EDAB 8B36[F601] mov si, word [load_data - LOADDATA2 + lsvFATSector + 2] 0 0000EDAF 8B3E[F401] mov di, word [load_data - LOADDATA2 + lsvFATSector + 0] 3762 ; jmp .12_compare 3763 .12_compare: 0 0000EDB3 39F2 cmp dx, si 0 0000EDB5 7513 jne @F ; read sector 0 0000EDB7 39F8 cmp ax, di 0 0000EDB9 750F jne @F ; read sector 3768 ; sector is already buffered 0 0000EDBB 8EC3 mov es, bx ; => FAT buffer 0 0000EDBD F9 stc 0 0000EDBE 1306[0E02] adc ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 0 0000EDC2 11D2 adc dx, dx ; prepare for reading straddling entry sector 0 0000EDC4 031E[EA01] add bx, word [load_sectorsizepara] 3774 ; prepare for straddling sector 0 0000EDC8 EB14 jmp @FF 3776 @@: 0 0000EDCA 89D6 mov si, dx 0 0000EDCC 89C7 mov di, ax 0 0000EDCE 8916[F601] mov word [load_data - LOADDATA2 + lsvFATSector + 2], dx 0 0000EDD2 A3[F401] mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 3781 3782 .12_notbuffered: 0 0000EDD5 0306[0E02] add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 0 0000EDD9 11D2 adc dx, dx 0 0000EDDB E84D04 call read_sector 3786 @@: 0 0000EDDE 59 pop cx 0 0000EDDF 41 inc cx 0 0000EDE0 3B0E[0B02] cmp cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000EDE4 7505 jne .fat12_have_fat_cx_dec 0 0000EDE6 06 push es 0 0000EDE7 E84104 call read_sector ; read second sector for straddling entry 0 0000EDEA 07 pop es 3794 3795 .fat12_have_fat_cx_dec: 0 0000EDEB 49 dec cx 0 0000EDEC 89CB mov bx, cx 0 0000EDEE 59 pop cx 3799 3800 .fat12_have_fat: 3801 3802 ; get 16 bits from FAT 0 0000EDEF 268B07 mov ax, [es:bx] 3804 0 0000EDF2 80E104 and cl, 4 ; = 4 iff CY after shift, else 0 0 0000EDF5 D3E8 shr ax, cl ; shift down iff odd entry, else unchanged 0 0000EDF7 25FF0F and ax, 0FFFh ; insure it's only 12 bits 0 0000EDFA 31D2 xor dx, dx 0 0000EDFC EB68 jmp short .gotvalue 3810 3811 .fat32: 3812 ; * 4 = byte offset into FAT (0--4000_0000h) 0 0000EDFE 01C0 add ax, ax 0 0000EE00 11D2 adc dx, dx 3815 .fat16: 3816 ; * 2 = byte offset into FAT (0--2_0000h) 0 0000EE02 01C0 add ax, ax 0 0000EE04 11D2 adc dx, dx 3819 0 0000EE06 50 push ax 0 0000EE07 92 xchg ax, dx 0 0000EE08 31D2 xor dx, dx ; dx:ax = high word 0 0000EE0A F736[0B02] div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000EE0E 89C3 mov bx, ax 0 0000EE10 58 pop ax ; dx = remainder, ax = low word 0 0000EE11 F736[0B02] div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000EE15 87D3 xchg dx, bx ; dx:ax = result, bx = remainder 3828 ; dx:ax = sector offset into FAT (0--200_0000h) 3829 ; bx = byte offset into FAT sector (0--8190) 0 0000EE17 F606[E701]04 testopt [load_ldflags], ldfFATBuffered 0 0000EE1C 740A jz .1632_notbuffered 0 0000EE1E 8B36[F601] mov si, word [load_data - LOADDATA2 + lsvFATSector + 2] 0 0000EE22 8B3E[F401] mov di, word [load_data - LOADDATA2 + lsvFATSector + 0] 0 0000EE26 EB07 jmp .1632_compare 3835 3836 .1632_notbuffered: 0 0000EE28 F606[E701]02 test byte [load_ldflags], ldfFATInvalid 0 0000EE2D 7513 jnz .read_no_store ; always read --> 3839 3840 .1632_compare: 0 0000EE2F 39F2 cmp dx, si 0 0000EE31 7504 jne @F ; read sector 0 0000EE33 39F8 cmp ax, di 0 0000EE35 741B je @FF ; sector is already buffered 3845 @@: 0 0000EE37 89D6 mov si, dx 0 0000EE39 89C7 mov di, ax 0 0000EE3B 8916[F601] mov word [load_data - LOADDATA2 + lsvFATSector + 2], dx 0 0000EE3F A3[F401] mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 3850 3851 .read_no_store: 0 0000EE42 53 push bx 0 0000EE43 0306[0E02] add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 0 0000EE47 83D200 adc dx, 0 0 0000EE4A 8B1E[F801] mov bx, [load_data - LOADDATA2 + lsvFATSeg] 0 0000EE4E E8DA03 call read_sector 0 0000EE51 5B pop bx 3858 @@: 0 0000EE52 8E06[F801] mov es, [load_data - LOADDATA2 + lsvFATSeg] 0 0000EE56 31D2 xor dx, dx 0 0000EE58 268B07 mov ax, [es:bx] 3862 0 0000EE5B 803E[E601]10 cmp byte [load_data - LOADDATA2 + ldFATType], 16 0 0000EE60 7404 je @F 0 0000EE62 268B5702 mov dx, [es:bx + 2] 3866 @@: 3867 .gotvalue: 0 0000EE66 07 pop es 3869 3870 ; INP: dx:ax = cluster value, 2-based 3871 ; OUT: dx:ax -= 2 (makes it 0-based) 3872 ; CY iff invalid cluster 3873 check_clust: 0 0000EE67 80E60F and dh, 0Fh 0 0000EE6A 83E802 sub ax, 2 0 0000EE6D 83DA00 sbb dx, 0 3877 0 0000EE70 803E[E601]10 cmp byte [load_data - LOADDATA2 + ldFATType], 16 0 0000EE75 7707 ja .fat32 0 0000EE77 740B je .fat16 3881 3882 .fat12: 0 0000EE79 3DF50F cmp ax, 0FF7h - 2 0 0000EE7C EB09 jmp short .common 3885 3886 .fat32: 0 0000EE7E 81FAFF0F cmp dx, 0FFFh 0 0000EE82 7203 jb @F ; CY here means valid ...- 3889 3890 .fat16: 0 0000EE84 83F8F5 cmp ax, 0FFF7h - 2 3892 @@: ; -... or if NC first, CY here also 3893 .common: 0 0000EE87 F5 cmc ; NC if valid 0 0000EE88 720E jc .ret 0 0000EE8A 3B16[C201] cmp dx, word [load_data - LOADDATA2 + ldMaxCluster + 2] 0 0000EE8E 7504 jne @F 0 0000EE90 3B06[C001] cmp ax, word [load_data - LOADDATA2 + ldMaxCluster] 3899 @@: 0 0000EE94 7701 ja .ret_CY 0 0000EE96 A8 db __TEST_IMM8 ; (skip stc, NC) 3902 .ret_CY: 0 0000EE97 F9 stc 3904 .ret: 0 0000EE98 C3 retn 3906 3907 3908 partition_table equ load_partition_table 3909 partition_table.end equ load_partition_table.end 3910 %define _SCANPTAB_PREFIX 3911 %define _SCANPTAB_DEBUG4_PREFIX 3912 %assign _PARTITION_TABLE_IN_CS 0 3913 %define _BASE bp 3914 %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 0000EE99 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 0000EE9E 55 push bp 91 <1> %ifidn _BASE, ss:bx 92 <1> mov bx, sp 93 <1> %elifidn _BASE, bp 0 0000EE9F 89E5 mov bp, sp 95 <1> %endif 0 0000EEA1 31FF xor di, di 0 0000EEA3 57 push di ; [_BASE+di-2] 0 0000EEA4 57 push di ; [_BASE+di-4] 0 0000EEA5 57 push di ; [_BASE+di-6] 0 0000EEA6 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 0000EEA7 803E[4002]80 sptrel cmp byte [ %[_SCANPTAB_PREFIX]load_unit], 80h 107 <1> sptinternal -3 0 0000EEAC 7325 jae @F 109 <1> 0 0000EEAE 57 push di 0 0000EEAF 51 push cx 112 <1> %if _PARTITION_TABLE_IN_CS 113 <1> push cs 114 <1> %else 0 0000EEB0 16 push ss 116 <1> %endif 0 0000EEB1 07 pop es 0 0000EEB2 BF[0001] sptrel mov di, %[_SCANPTAB_PREFIX]partition_table 119 <1> sptinternal 0 0000EEB5 31C0 xor ax, ax 0 0000EEB7 B92000 mov cx, (4 * 16) >> 1 0 0000EEBA F3AB rep stosw ; initialise fake partition table 0 0000EEBC 59 pop cx 0 0000EEBD 5F pop di 0 0000EEBE BE[0001] sptrel mov si, %[_SCANPTAB_PREFIX]partition_table 126 <1> sptinternal 127 <1> ; -> fake PARTINFO 0 0000EEC1 26C60480 mov byte [es:si + piBoot], 80h ; fake primary active 0 0000EEC5 26C64404FF mov byte [es:si + piType], 0FFh ; fake a type 0 0000EECA C606[3905]00 sptrel mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 0 ; special: 0 = diskette 131 <1> sptinternal -3 ; piLength is 0, too 0 0000EECF FFD1 call cx 133 <1> 0 0000EED1 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 0000EED3 31C0 xor ax, ax 0 0000EED5 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 0000EED7 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 0000EEDA BE[0001] sptrel mov si, %[_SCANPTAB_PREFIX]partition_table 152 <1> sptinternal 0 0000EEDD 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 0000EEE1 FE06[3905] sptrel inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 292 <1> sptinternal 0 0000EEE5 26807C0400 cmp byte [es:si + piType], 0 0 0000EEEA 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 0000EEEC FFD1 call cx ; es:si -> partition table entry 319 <1> ; byte [load_current_partition] = which 320 <1> .ignoreprimary: 321 <1> .loop_primary_skip: 0 0000EEEE 83C610 add si, 16 0 0000EEF1 81FE[4001] sptrel cmp si, strict word %[_SCANPTAB_PREFIX]partition_table.end 324 <1> sptinternal 0 0000EEF5 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 0000EEF7 BE[0001] sptrel mov si, %[_SCANPTAB_PREFIX]partition_table 442 <1> sptinternal 443 <1> .loop: 0 0000EEFA FF06[3005] sptrel inc word [ %[_SCANPTAB_PREFIX]load_partition_cycle] 445 <1> sptinternal 0 0000EEFE 7503E9A500 jz .got_partition_cycle 447 <1> 0 0000EF03 268A4404 mov al, [es:si + piType] 449 <1> 450 <1> %ifidn _BASE, bp 0 0000EF07 31DB xor bx, bx 452 <1> %endif 0 0000EF09 84C0 test al, al 0 0000EF0B 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 0000EF0D 3C0F cmp al, 0Fh ; extended partition (LBA aware) ? 0 0000EF0F 742C je .push ; yes --> 0 0000EF11 247F and al, ~80h ; extended partition Linux (85h) ? 0 0000EF13 3C05 cmp al, 05h ; or extended partition DOS (05h) ? 0 0000EF15 7426 je .push ; yes --> 522 <1> .notextended: 523 <1> 524 <1> %ifidn _BASE, bp 0 0000EF17 395BFE cmp word [_BASE+di-2], bx 0 0000EF1A 7505 jne .logical 0 0000EF1C 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 0000EF1F 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 0000EF21 FE06[3905] sptrel inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 548 <1> sptinternal 0 0000EF25 7503E98400 jz .error_too_many_partitions 0 0000EF2A 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 0000EF2C 83C610 add si, 16 ; -> next partition table entry 0 0000EF2F 81FE[4001] sptrel cmp si, strict word %[_SCANPTAB_PREFIX]partition_table.end 558 <1> sptinternal ; was last? 0 0000EF33 72C5 jb .loop ; no, loop --> 0 0000EF35 85FF test di, di ; still some on stack? 0 0000EF37 7546 jnz .pop ; yes, pop 562 <1> .end: 563 <1> %ifidn _BASE, bp 0 0000EF39 89EC mov sp, bp ; restore sp 0 0000EF3B 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 0000EF3C 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 0000EF3D 56 push si 617 <1> .push_check_empty_next: 0 0000EF3E 83C610 add si, 16 ; -> next 0 0000EF41 81FE[4001] sptrel cmp si, strict word %[_SCANPTAB_PREFIX]partition_table.end 620 <1> sptinternal ; at end? 0 0000EF45 734A jae .replace ; yes, no other partitions found, replace --> 0 0000EF47 26807C0400 cmp byte [es:si + piType], 0 ; is this a partition? 0 0000EF4C 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 0000EF4E 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 0000EF4F 56 push si ; stored at word [_BASE+di-10] 0 0000EF50 83EF0A sub di, 10 0 0000EF53 FF7308 push word [_BASE+di+10-2] 0 0000EF56 FF7306 push word [_BASE+di+10-4] ; copy root 660 <1> %ifn _MODE 0 0000EF59 268B4408 mov ax, word [es:si + piStart] 0 0000EF5D 268B540A mov dx, word [es:si + piStart + 2] ; get extended partition offset 663 <1> %endif 0 0000EF61 0343FC add ax, word [_BASE+di-4] 0 0000EF64 1353FE adc dx, word [_BASE+di-2] ; add in root to get absolute sector number 666 <1> 0 0000EF67 52 push dx 0 0000EF68 50 push ax ; new base 669 <1> 670 <1> .replace_common: 671 <1> %ifidn _BASE, bp 0 0000EF69 395BFE cmp word [_BASE+di-2], bx ; have a (nonzero) root? 0 0000EF6C 750B jne .have_root 0 0000EF6E 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 0000EF71 7506 jne .have_root ; yes --> 681 <1> 0 0000EF73 8953FE mov word [_BASE+di-2], dx 0 0000EF76 8943FC mov word [_BASE+di-4], ax ; set root 684 <1> .have_root: 685 <1> 0 0000EF79 E83800 call %[_SCANPTAB_PREFIX]read_partition_table.first 0 0000EF7C 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 0000EF7F 83C70A add di, 10 0 0000EF82 83C408 add sp, 8 0 0000EF85 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 0000EF86 8B43F8 mov ax, word [_BASE+di-8] 0 0000EF89 8B53FA mov dx, word [_BASE+di-6] 0 0000EF8C E82500 call %[_SCANPTAB_PREFIX]read_partition_table.reload 0 0000EF8F 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 0000EF91 5E pop si ; (discard) 728 <1> .replace_no_pop: 0 0000EF92 268B4408 mov ax, word [es:si + piStart] 0 0000EF96 268B540A mov dx, word [es:si + piStart + 2] ; get extended partition offset 0 0000EF9A 0343FC add ax, word [_BASE+di - 4] 0 0000EF9D 1353FE adc dx, word [_BASE+di - 2] ; add in root 0 0000EFA0 8943F8 mov word [_BASE+di - 8], ax 0 0000EFA3 8953FA mov word [_BASE+di - 6], dx ; set base 735 <1> 0 0000EFA6 EBC1 jmp .replace_common 737 <1> 738 <1> 739 <1> %if _BOOTCMD_FAIL_ERROR 740 <1> .got_partition_cycle: 0 0000EFA8 BA[0000] sptrel mov dx, msg.boot_partition_cycle_error 742 <1> sptinternal 0 0000EFAB E9F6EB jmp bootcmd.fail 744 <1> 745 <1> .error_too_many_partitions: 0 0000EFAE BA[0000] sptrel mov dx, msg.boot_too_many_partitions_error 747 <1> sptinternal 0 0000EFB1 E9F0EB 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 0000EFB4 53 push bx 932 <1> %if _SPT_ELD 933 <1> sptrel mov bx, word [buffersegment] 934 <1> sptinternal 935 <1> %elifidn _BASE, bp 0 0000EFB5 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 937 <1> %else 938 <1> mov bx, word [bp + ldSectorSeg] 939 <1> %endif 0 0000EFB9 E85D02 call %[_SCANPTAB_PREFIX]read_ae_512_bytes 0 0000EFBC 5B pop bx 0 0000EFBD 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000EFC4 7518 jne .signature_fail 0 0000EFC6 1E push ds 0 0000EFC7 57 push di 0 0000EFC8 56 push si 0 0000EFC9 51 push cx 0 0000EFCA 06 push es 0 0000EFCB 1F pop ds 0 0000EFCC 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 0000EFCF 16 push ss 955 <1> %endif 0 0000EFD0 07 pop es 0 0000EFD1 BF[0001] sptrel mov di, %[_SCANPTAB_PREFIX]partition_table 958 <1> sptinternal ; es:di -> cs:%[_SCANPTAB_PREFIX]partition_table 0 0000EFD4 B92000 mov cx, 4*16 / 2 0 0000EFD7 F3A5 rep movsw 0 0000EFD9 59 pop cx 0 0000EFDA 5E pop si 0 0000EFDB 5F pop di 0 0000EFDC 1F pop ds 0 0000EFDD C3 retn 966 <1> 967 <1> 968 <1> %if _BOOTCMD_FAIL_ERROR 969 <1> .signature_fail: 0 0000EFDE BA[0000] sptrel mov dx, msg.bootfail_sig_parttable 971 <1> sptinternal 0 0000EFE1 E9C0EB jmp bootcmd.fail 973 <1> %endif 3915 3916 3917 ; INP: al = first character 3918 ; si -> next 3919 ; OUT: doesn't return if error 3920 ; bx:dx = number read 3921 ; al = character after the number 3922 ; si -> next 3923 ; CHG: cx, ax, di 3924 boot_get_decimal_literal: 0 0000EFE4 BA0A00 mov dx, 10 ; set base: decimal 3926 %if 1 0 0000EFE7 B93940 mov cx, '9' | (('A'-10-1 + 10) << 8) 3928 %else 3929 mov cl, dl 3930 add cl, '0'-1 3931 cmp cl, '9' 3932 jbe .lit_basebelow11 3933 mov cl, '9' 3934 .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 3935 mov ch, dl 3936 add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 3937 %endif 0 0000EFEA EB06 jmp @F 3939 3940 3941 boot_get_hexadecimal_literal: 0 0000EFEC BA1000 mov dx, 16 ; set base: hexadecimal 3943 %if 1 0 0000EFEF B93946 mov cx, '9' | (('A'-10-1 + 16) << 8) 3945 %else 3946 mov cl, dl 3947 add cl, '0'-1 3948 cmp cl, '9' 3949 jbe .lit_basebelow11 3950 mov cl, '9' 3951 .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 3952 mov ch, dl 3953 add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 3954 %endif 3955 3956 @@: 0 0000EFF2 B400 mov ah, 0 0 0000EFF4 31DB xor bx, bx 0 0000EFF6 89D7 mov di, dx ; di = base 3960 0 0000EFF8 E8[0000]EB02[0000] nearcall getexpression.lit_isdigit? ; first character must be a digit 0 0000EFFF 7249 jc .err2 0 0000F001 31D2 xor dx, dx ; initialize value 3964 .lit_loopdigit: 0 0000F003 3C5F cmp al, '_' 0 0000F005 7436 je .lit_skip 0 0000F007 E8[0000]EB02[0000] nearcall getexpression.lit_isdigit? ; was last character ? 0 0000F00E 7230 jc .lit_end ; yes --> 0 0000F010 E8[0000] call capitalise 0 0000F013 2C30 sub al, '0' 0 0000F015 3C09 cmp al, 9 ; was decimal digit ? 0 0000F017 7602 jbe .lit_decimaldigit ; yes --> 0 0000F019 2C07 sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 3974 .lit_decimaldigit: 0 0000F01B 50 push ax 0 0000F01C 89D0 mov ax, dx 0 0000F01E 53 push bx 0 0000F01F F7E7 mul di ; multiply low word with base 0 0000F021 89D3 mov bx, dx 0 0000F023 89C2 mov dx, ax 0 0000F025 58 pop ax 0 0000F026 52 push dx 0 0000F027 F7E7 mul di ; multiply high word with base 0 0000F029 85D2 test dx, dx 0 0000F02B 5A pop dx 0 0000F02C 751C jnz .err2 ; overflow --> 0 0000F02E 01C3 add bx, ax ; add them 0 0000F030 58 pop ax 0 0000F031 7217 jc .err2 ; overflow --> 0 0000F033 00C2 add dl, al ; add in the new digit 0 0000F035 80D600 adc dh, 0 0 0000F038 83D300 adc bx, byte 0 0 0000F03B 720D jc .err2 ; overflow --> 3994 3995 .lit_skip: 0 0000F03D AC lodsb 0 0000F03E EBC3 jmp short .lit_loopdigit 3998 3999 .lit_end: 0 0000F040 E8[0000]EB02[0000] nearcall isseparator? ; after the number, there must be a separator 0 0000F047 7501 jne .err2 ; none here --> 0 0000F049 C3 retn 4003 4004 .err2: 0 0000F04A E9[0000] jmp error 4006 4007 4008 query_geometry: 0 0000F04D E8[0000] call guard_auxbuff 0 0000F050 8A16[4002] mov dl, [load_unit] 4011 ; test dl, dl ; floppy? 4012 ; jns @F ; don't attempt query, might fail --> 4013 ; Note that while the original PC BIOS doesn't support this function 4014 ; (for its diskettes), it does properly return the error code 01h. 4015 ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 0 0000F054 B408 mov ah, 08h 0 0000F056 31C9 xor cx, cx ; initialise cl to 0 0 0000F058 890E[1A02] mov [load_heads], cx 0 0000F05C 890E[1802] mov [load_sectors], cx 0 0000F060 31DB xor bx, bx 0 0000F062 88D3 mov bl, dl 0 0000F064 F687[0000]04 testopt [load_unit_flags + bx], lufForceGeometry 0 0000F069 7512 jnz .try_bootsector 4024 ; Note: The int 13h function 08h call may change or 4025 ; set ax, bx, cx, dx, es, di. es is left as 4026 ; indeterminate afterwards, until the code at 4027 ; .try_bootsector runs, or bootcmd.fail, or 4028 ; the "mov es" in .got_sectors_heads. 0 0000F06B F9 stc ; initialise to CY 0 0000F06C E84901 call .int13_retry ; query drive geometry 0 0000F06F 720C jc .try_bootsector ; apparently failed --> 0 0000F071 88F2 mov dl, dh 0 0000F073 B600 mov dh, 0 ; dx = maximum head number 0 0000F075 42 inc dx ; dx = number of heads (H is 0-based) 0 0000F076 89C8 mov ax, cx ; ax & 3Fh = maximum sector number 0 0000F078 83E03F and ax, 3Fh ; get sectors (number of sectors, S is 1-based) 0 0000F07B 7523 jnz .got_sectors_heads ; valid (S is 1-based), use these --> 4038 ; zero = invalid 4039 .try_bootsector: 0 0000F07D 8E06[0000] mov es, word [auxbuff_segorsel] ; es => auxbuff 0 0000F081 31DB xor bx, bx ; es:bx -> auxbuff 0 0000F083 B80102 mov ax, 0201h ; read sector, 1 sector 0 0000F086 B90100 mov cx, 1 ; sector 1 (1-based!), cylinder 0 (0-based) 0 0000F089 B600 mov dh, 0 ; head 0 (0-based) 0 0000F08B 8A16[4002] mov dl, [load_unit] 0 0000F08F F9 stc 0 0000F090 E82501 call .int13_retry 0 0000F093 7303E93D01 jc .access_error 4049 4050 ; note: the smallest supported sector size, 32 bytes, 4051 ; does contain these entries (offset 18h and 1Ah in sector) 4052 ; within the first BPB sector. 0 0000F098 268B4718 mov ax, word [es:bx + bsBPB + bpbCHSSectors] 0 0000F09C 268B571A mov dx, word [es:bx + bsBPB + bpbCHSHeads] 4055 4056 .got_sectors_heads: 0 0000F0A0 A3[1802] mov word [load_sectors], ax 0 0000F0A3 8916[1A02] mov word [load_heads], dx 4059 0 0000F0A7 85C0 test ax, ax 0 0000F0A9 7503E94601 jz .invalid_sectors 0 0000F0AE 83F83F cmp ax, 63 0 0000F0B1 7603E93E01 ja .invalid_sectors 0 0000F0B6 85D2 test dx, dx 0 0000F0B8 7503E93E01 jz .invalid_heads 0 0000F0BD 81FA0001 cmp dx, 100h 0 0000F0C1 7603E93501 ja .invalid_heads 4068 0 0000F0C6 8E06[0000] mov es, word [auxbuff_segorsel] ; es => auxbuff 0 0000F0CA 31DB xor bx, bx ; es:bx -> auxbuff 0 0000F0CC 31C0 xor ax, ax 4072 4073 %if _AUXBUFFSIZE < 8192+2 4074 %error Expecting to use auxbuff as sector size detection buffer 4075 %endif 4076 4077 d5 call d5dumpregs 4078 d5 call d5message 4079 d5 asciz 13,10,"In query_geometry 0",13,10 4080 0 0000F0CE 89DF mov di, bx 0 0000F0D0 B90110 mov cx, (8192 + 2) >> 1 4083 ; es:bx -> auxbuff, es:di = same 0 0000F0D3 F3AB rep stosw ; fill buffer, di -> behind (auxbuff+8192+2) 0 0000F0D5 B80102 mov ax, 0201h ; read sector, 1 sector 0 0000F0D8 41 inc cx ; sector 1 (1-based!), cylinder 0 (0-based) 0 0000F0D9 B600 mov dh, 0 ; head 0 (0-based) 0 0000F0DB 8A16[4002] mov dl, [load_unit] 0 0000F0DF F9 stc 0 0000F0E0 E8D500 call .int13_retry 0 0000F0E3 7303E9ED00 jc .access_error 4092 0 0000F0E8 FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 0 0000F0E9 AF scasw ; -> auxbuff+8192 (at last word to sca) 4095 d5 call d5dumpregs 4096 d5 call d5message 4097 d5 asciz 13,10,"In query_geometry 1",13,10 0 0000F0EA B90110 mov cx, (8192 + 2) >> 1 0 0000F0ED 31C0 xor ax, ax 0 0000F0EF F3AF repe scasw 0 0000F0F1 83C704 add di, 4 ; di -> first differing byte (from top) 0 0000F0F4 FC cld 0 0000F0F5 57 push di 4104 0 0000F0F6 89DF mov di, bx 0 0000F0F8 B90110 mov cx, (8192 + 2) >> 1 0 0000F0FB 48 dec ax ; = FFFFh 0 0000F0FC F3AB rep stosw 4109 0 0000F0FE B80102 mov ax, 0201h 0 0000F101 41 inc cx 0 0000F102 B600 mov dh, 0 0 0000F104 8A16[4002] mov dl, [load_unit] 0 0000F108 F9 stc 0 0000F109 E8AC00 call .int13_retry 0 0000F10C 7303E9C400 jc .access_error 4117 0 0000F111 FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 0 0000F112 AF scasw ; di -> auxbuff+8192 (last word to sca) 4120 d5 call d5dumpregs 4121 d5 call d5message 4122 d5 asciz 13,10,"In query_geometry 2",13,10 0 0000F113 5A pop dx 0 0000F114 B8FFFF mov ax, -1 0 0000F117 B90110 mov cx, (8192 + 2) >> 1 0 0000F11A F3AF repe scasw 4127 %if 0 4128 AAAB 4129 ^ 4130 sca B, match 4131 ^ 4132 sca B, mismatch 4133 ^ 4134 stop 4135 %endif 0 0000F11C 83C704 add di, 4 ; di -> first differing byte (from top) 0 0000F11F FC cld 4138 4139 %if 0 4140 0000000000000 4141 AAAAAAAA00000 4142 ^ 4143 FFFFFFFFFFFFF 4144 AAAAAAAA00FFF 4145 ^ 4146 %endif 0 0000F120 39FA cmp dx, di ; choose the higher one 0 0000F122 7302 jae @F 0 0000F124 89FA mov dx, di 4150 @@: 0 0000F126 29DA sub dx, bx ; dx = sector size 4152 4153 d5 call d5dumpregs 4154 d5 call d5message 4155 d5 asciz 13,10,"In query_geometry 3",13,10 4156 0 0000F128 81FA0220 cmp dx, 8192 + 2 0 0000F12C 7203E9AE00 jae .sector_too_large 0 0000F131 B82000 mov ax, 32 0 0000F134 39C2 cmp dx, ax 0 0000F136 7303E9AB00 jb .sector_too_small 4162 @@: 0 0000F13B 39C2 cmp dx, ax 0 0000F13D 740C je .got_match 0 0000F13F 3D0020 cmp ax, 8192 0 0000F142 7203E9A600 jae .sector_not_power 0 0000F147 D1E0 shl ax, 1 0 0000F149 EBF0 jmp @B 4169 4170 .got_match: 0 0000F14B A3[0B02] mov word [load_sectorsize], ax 0 0000F14E B104 mov cl, 4 0 0000F150 D3E8 shr ax, cl 0 0000F152 A3[EA01] mov word [load_sectorsizepara], ax 4175 0 0000F155 C606[E701]00 mov byte [load_ldflags], 0 0 0000F15A 8A16[4002] mov dl, [load_unit] 0 0000F15E 31DB xor bx, bx 0 0000F160 88D3 mov bl, dl 0 0000F162 F687[0000]01 testopt [load_unit_flags + bx], lufForceCHS 0 0000F167 752B jnz .no_lba 0 0000F169 F687[0000]02 testopt [load_unit_flags + bx], lufForceLBA 0 0000F16E 7520 jnz .yes_lba 4184 0 0000F170 1E push ds 0 0000F171 BB4000 mov bx, 40h ; bx = 40h 0 0000F174 8EDB mov ds, bx ; ds = 40h 4188 ; Setting ds = 40h is a Book8088 bugfix, refer to 4189 ; http://www.bttr-software.de/forum/forum_entry.php?id=21061 4190 0 0000F176 B80041 mov ax, 4100h 0 0000F179 BBAA55 mov bx, 55AAh 0 0000F17C 31C9 xor cx, cx 0 0000F17E 30F6 xor dh, dh 0 0000F180 F9 stc 0 0000F181 CD13 int 13h ; 13.41.bx=55AA extensions installation check 0 0000F183 1F pop ds 0 0000F184 720E jc .no_lba 0 0000F186 81FB55AA cmp bx, 0AA55h 0 0000F18A 7508 jne .no_lba 0 0000F18C D0E9 shr cl, 1 ; support bitmap bit 0 0 0000F18E 7304 jnc .no_lba 4203 4204 .yes_lba: 4205 %if ldfHasLBA != 1 4206 %error Assuming ldfHasLBA is 1 4207 %endif 0 0000F190 FE06[E701] inc byte [load_ldflags] 4209 .no_lba: 4210 0 0000F194 A1[0000] mov ax, word [auxbuff_segorsel] ; ax => auxbuff 0 0000F197 89C2 mov dx, ax 0 0000F199 81C2FF01 add dx, (8192 - 16) >> 4 0 0000F19D 89C3 mov bx, ax 0 0000F19F 89D1 mov cx, dx 0 0000F1A1 81E300F0 and bx, 0F000h 0 0000F1A5 81E100F0 and cx, 0F000h 0 0000F1A9 39D9 cmp cx, bx 0 0000F1AB 7504 jne @F 0 0000F1AD A3[E401] mov word [load_sectorseg], ax 0 0000F1B0 C3 retn 4222 4223 @@: 0 0000F1B1 BA[0000] mov dx, msg.boot_auxbuff_crossing 0 0000F1B4 B020 mov al, 20h 0 0000F1B6 EB48 jmp .error_common_j 4227 4228 4229 .int13_retry: 0 0000F1B8 9C pushf 0 0000F1B9 50 push ax 0 0000F1BA CD13 int 13h ; first try 0 0000F1BC 730B jnc @F ; NC, success on first attempt --> 4234 4235 ; reset drive 0 0000F1BE 31C0 xor ax, ax 0 0000F1C0 CD13 int 13h 0 0000F1C2 7205 jc @F ; CY, reset failed, error in ah --> 4239 4240 ; try read again 0 0000F1C4 58 pop ax ; restore function number 0 0000F1C5 9D popf ; CF 0 0000F1C6 CD13 int 13h ; retry, CF error status, ah error number 0 0000F1C8 C3 retn 4245 4246 @@: ; NC or CY, stack has function number 0 0000F1C9 44 inc sp 0 0000F1CA 44 inc sp 0 0000F1CB 44 inc sp 0 0000F1CC 44 inc sp ; discard two words on stack, preserve CF 0 0000F1CD C3 retn 4252 4253 4254 .out_of_memory_error: 0 0000F1CE BA[0000] mov dx, msg.boot_out_of_memory_error 0 0000F1D1 B021 mov al, 21h 0 0000F1D3 EB2B jmp .error_common_j 4258 .access_error: 4259 %if _INPUT_FILE_BOOT 0 0000F1D5 E89A04 call yy_boot_file_not_found.if 4261 ; harden not to do scriptspath attempt 4262 ; if some later access errors out 4263 %endif 0 0000F1D8 BA[0000] mov dx, msg.boot_access_error 0 0000F1DB B022 mov al, 22h 0 0000F1DD EB21 jmp .error_common_j 4267 .sector_too_large: 0 0000F1DF BA[0000] mov dx, msg.boot_sector_too_large 0 0000F1E2 B023 mov al, 23h 0 0000F1E4 EB1A jmp .error_common_j 4271 .sector_too_small: 0 0000F1E6 BA[0000] mov dx, msg.boot_sector_too_small 0 0000F1E9 B024 mov al, 24h 0 0000F1EB EB13 jmp .error_common_j 4275 .sector_not_power: 0 0000F1ED BA[0000] mov dx, msg.boot_sector_not_power 0 0000F1F0 B025 mov al, 25h 0 0000F1F2 EB0C jmp .error_common_j 4279 .invalid_sectors: 0 0000F1F4 BA[0000] mov dx, msg.boot_invalid_sectors 0 0000F1F7 B026 mov al, 26h 0 0000F1F9 EB05 jmp .error_common_j 4283 .invalid_heads: 0 0000F1FB BA[0000] mov dx, msg.boot_invalid_heads 0 0000F1FE B027 mov al, 27h 4286 .error_common_j: 0 0000F200 B402 mov ah, 02h 0 0000F202 E8[0000] call setrc 0 0000F205 E99CE9 jmp bootcmd.fail 4290 4291 4292 ; INP: dx:ax = first sector 4293 ; bx:0 -> buffer 4294 ; OUT: dx:ax = sector number after last read 4295 ; es = input bx 4296 ; bx:0 -> buffer after last written 4297 ; CHG: - 4298 ; STT: ds = ss 4299 read_ae_1536_bytes: 0 0000F208 51 push cx 0 0000F209 53 push bx 0 0000F20A B90006 mov cx, 1536 4303 .loop: 0 0000F20D E81B00 call read_sector 0 0000F210 2B0E[0B02] sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000F214 77F7 ja .loop 0 0000F216 07 pop es 0 0000F217 59 pop cx 0 0000F218 C3 retn 4310 4311 ; INP: dx:ax = first sector 4312 ; bx:0 -> buffer 4313 ; OUT: dx:ax = sector number after last read 4314 ; es = input bx 4315 ; bx:0 -> buffer after last written 4316 ; CHG: - 4317 ; STT: ds = ss 4318 read_ae_512_bytes: 0 0000F219 51 push cx 0 0000F21A 53 push bx 0 0000F21B B90002 mov cx, 512 4322 .loop: 0 0000F21E E80A00 call read_sector 0 0000F221 2B0E[0B02] sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000F225 77F7 ja .loop 0 0000F227 07 pop es 0 0000F228 59 pop cx 0 0000F229 C3 retn 4329 4330 4331 ; Write a sector using Int13.03 or Int13.4300 4332 ; 4333 ; Protocol as for read_sector 4334 write_sector: 0 0000F22A A8 db __TEST_IMM8 ; (skip stc, NC) 4336 4337 ; Read a sector using Int13.02 or Int13.42 4338 ; 4339 ; INP: dx:ax = sector number (within partition) 4340 ; bx:0-> buffer 4341 ; (_LBA) ds = ss 4342 ; dword[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors] 4343 ; = base sector number (dx:ax is added to this to get 4344 ; the absolute sector number in the selected unit.) 4345 ; OUT: If unable to read, 4346 ; ! jumps to error instead of returning 4347 ; If sector has been read, 4348 ; dx:ax = next sector number (has been incremented) 4349 ; bx:0-> next buffer (bx = es+word[load_sectorsizepara]) 4350 ; es = input bx 4351 ; CHG: - 4352 ; 4353 ; Note: If error 09h (data boundary error) is returned, 4354 ; the read is done into the load_sectorseg buffer, 4355 ; then copied into the user buffer. 4356 read_sector: section_of_function 0 0000F22B F9 stc 4358 4359 read_sector_CY_or_write_sector_NC: 4360 lframe near 0 0000F22C 5589E5 lenter 4362 lvar word, is_read_bit0 0 0000F22F 9C pushf 4364 4365 .err: equ bootcmd.fail_read 4366 d5 call d5dumpregs 4367 d5 call d5message 4368 d5 asciz 13,10,"In read_sector",13,10 4369 0 0000F230 52 push dx 0 0000F231 51 push cx 0 0000F232 50 push ax 0 0000F233 56 push si 4374 0 0000F234 8EC3 mov es, bx 4376 4377 ; DX:AX==LBA sector number 4378 ; add partition start (= number of hidden sectors) 0 0000F236 0306[1C02] add ax,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 0] 0 0000F23A 1316[1E02] adc dx,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2] 4381 0 0000F23E 19F6 sbb si, si ; -1 if was CY, 0 else 0 0000F240 F7DE neg si ; 1 if was CY, 0 else 0 0000F242 31C9 xor cx, cx 0 0000F244 51 push cx 0 0000F245 56 push si ; bit 32 = 1 if operating in 33-bit space 0 0000F246 52 push dx 0 0000F247 50 push ax ; qword sector number (lpSector) 0 0000F248 53 push bx 0 0000F249 51 push cx ; bx:0 -> buffer (lpBuffer) 0 0000F24A 41 inc cx 0 0000F24B 51 push cx ; word number of sectors to read (lpCount) 0 0000F24C B110 mov cl, 10h 0 0000F24E 51 push cx ; word size of disk address packet (lpSize) 0 0000F24F 89E6 mov si, sp ; ds:si -> disk address packet (on stack) 4396 0 0000F251 F606[E701]01 test byte [load_data - LOADDATA2 + ldFlags], ldfHasLBA 0 0000F256 7503E9BA00 jz .no_lba 4399 4400 d5 call d5message 4401 d5 asciz "In read_sector.lba",13,10 4402 0 0000F25B 8A16[4002] mov dl, byte [load_unit] 0 0000F25F E89001 call .set_ah_function_42_or_43 0 0000F262 CD13 int 13h ; 13.42 extensions read 0 0000F264 7203E9A600 jnc .lba_done 4407 0 0000F269 31C0 xor ax, ax 0 0000F26B CD13 int 13h 0 0000F26D 7303E920E9 jc .lba_error 4411 4412 ; have to reset the LBAPACKET's lpCount, as the handler may 4413 ; set it to "the number of blocks successfully transferred". 4414 ; (in any case, the high byte is still zero.) 0 0000F272 C6440201 mov byte [si + lpCount], 1 4416 0 0000F276 E87901 call .set_ah_function_42_or_43 0 0000F279 CD13 int 13h 0 0000F27B 7203E98F00 jnc .lba_done 4420 0 0000F280 80FC09 cmp ah, 9 ; data boundary error? 0 0000F283 7403E90AE9 jne .lba_error 4423 4424 .lba_sectorseg: 4425 d4 call d4dumpregs 4426 d4 call d4message 4427 d4 asciz 13,10,"In read_sector.lba_sectorseg",13,10 4428 0 0000F288 F646FE01 test byte [bp + ?is_read_bit0], 1 0 0000F28C 7544 jnz .lba_sectorseg_read 4431 4432 .lba_sectorseg_write: 0 0000F28E 06 push es 4434 0 0000F28F 1E push ds 0 0000F290 56 push si 0 0000F291 57 push di 0 0000F292 8B0E[0B02] mov cx, word [load_sectorsize] 0 0000F296 8E06[E401] mov es, word [load_sectorseg] ; => sectorseg 4440 ; lds si, [si + lpBuffer + 0] 0 0000F29A 8E5C06 mov ds, word [si + lpBuffer + 2]; => user buffer 0 0000F29D 31F6 xor si, si 0 0000F29F 31FF xor di, di 0 0000F2A1 F3A4 rep movsb ; copy data into sectorseg 0 0000F2A3 5F pop di 0 0000F2A4 5E pop si 0 0000F2A5 1F pop ds 4448 0 0000F2A6 8E06[E401] mov es, word [load_sectorseg] 0 0000F2AA 8C4406 mov word [si + lpBuffer + 2], es 4451 ; => sectorseg 4452 ; and word [si + lpBuffer + 0], byte 0 4453 0 0000F2AD C6440201 mov byte [si + lpCount], 1 0 0000F2B1 B80043 mov ax, 4300h 0 0000F2B4 CD13 int 13h 0 0000F2B6 7317 jnc @F 4458 0 0000F2B8 31C0 xor ax, ax 0 0000F2BA CD13 int 13h 0 0000F2BC 7303E9D1E8 jc .lba_error 4462 0 0000F2C1 C6440201 mov byte [si + lpCount], 1 0 0000F2C5 B80043 mov ax, 4300h 0 0000F2C8 CD13 int 13h 0 0000F2CA 7303E9C3E8 jc .lba_error 4467 @@: 4468 0 0000F2CF 07 pop es 0 0000F2D0 EB3D jmp .lba_done 4471 4472 4473 .lba_sectorseg_read: 4474 ; the offset part of the pointer is already zero! 4475 ; push word [si + lpBuffer + 0] 0 0000F2D2 06 push es ; => user buffer 0 0000F2D3 8E06[E401] mov es, word [load_sectorseg] 0 0000F2D7 8C4406 mov word [si + lpBuffer + 2], es 4479 ; and word [si + lpBuffer + 0], byte 0 4480 0 0000F2DA C6440201 mov byte [si + lpCount], 1 0 0000F2DE E81101 call .set_ah_function_42_or_43 0 0000F2E1 CD13 int 13h 0 0000F2E3 7317 jnc .lba_sectorseg_done 4485 0 0000F2E5 31C0 xor ax, ax 0 0000F2E7 CD13 int 13h 0 0000F2E9 7303E9A4E8 jc .lba_error 4489 0 0000F2EE C6440201 mov byte [si + lpCount], 1 0 0000F2F2 E8FD00 call .set_ah_function_42_or_43 0 0000F2F5 CD13 int 13h 0 0000F2F7 7303E996E8 jc .lba_error 4494 .lba_sectorseg_done: 4495 0 0000F2FC 31F6 xor si, si 0 0000F2FE 07 pop es 4498 ; pop cx 0 0000F2FF 57 push di 4500 ; mov di, cx 0 0000F300 31FF xor di, di 0 0000F302 8B0E[0B02] mov cx, word [load_sectorsize] 0 0000F306 8E1E[E401] mov ds, word [load_sectorseg] 0 0000F30A F3A4 rep movsb 0 0000F30C 5F pop di 4506 0 0000F30D 16 push ss 0 0000F30E 1F pop ds 4509 .lba_done: 0 0000F30F 83C410 add sp, 10h 0 0000F312 E9CB00 jmp .done 4512 4513 .lba_error: equ .err 4514 4515 .no_lba: 0 0000F315 83C408 add sp, 8 0 0000F318 58 pop ax 0 0000F319 5A pop dx 0 0000F31A 5E pop si 0 0000F31B 59 pop cx 0 0000F31C 85F6 test si, si 0 0000F31E 7532 jnz .err_4_NZ 4523 4524 ; DX:AX=LBA sector number 4525 ; divide by number of sectors per track to get sector number 4526 ; Use 32:16 DIV instead of 64:32 DIV for 8088 compatability 4527 ; Use two-step 32:16 divide to avoid overflow 0 0000F320 89C1 mov cx,ax 0 0000F322 89D0 mov ax,dx 0 0000F324 31D2 xor dx,dx 0 0000F326 F736[1802] div word [load_sectors] 0 0000F32A 91 xchg cx,ax 0 0000F32B F736[1802] div word [load_sectors] 0 0000F32F 87CA xchg cx,dx 4535 4536 ; DX:AX=quotient, CX=remainder=sector (S) - 1 4537 ; divide quotient by number of heads 0 0000F331 89C3 mov bx, ax 0 0000F333 92 xchg ax, dx 0 0000F334 31D2 xor dx, dx 0 0000F336 F736[1A02] div word [load_heads] 0 0000F33A 93 xchg bx, ax 0 0000F33B F736[1A02] div word [load_heads] 4544 4545 ; bx:ax=quotient=cylinder (C), dx=remainder=head (H) 4546 ; move variables into registers for INT 13h AH=02h 0 0000F33F 88D6 mov dh, dl ; dh = head 0 0000F341 41 inc cx ; cl5:0 = sector 0 0000F342 86E8 xchg ch, al ; ch = cylinder 7:0, al = 0 0 0000F344 D1E8 shr ax, 1 0 0000F346 D1E8 shr ax, 1 ; al7:6 = cylinder 9:8 4552 ; bx has bits set iff it's > 0, indicating a cylinder >= 65536. 0 0000F348 08FB or bl, bh ; collect set bits from bh 0 0000F34A 08C1 or cl, al ; cl7:6 = cylinder 9:8 4555 ; ah has bits set iff it was >= 4, indicating a cylinder >= 1024. 0 0000F34C 08E3 or bl, ah ; collect set bits from ah 0 0000F34E 8A16[4002] mov dl, [load_unit] 4558 ; dl = drive 4559 .err_4_NZ: 0 0000F352 B404 mov ah, 04h ; error number: sector not found 0 0000F354 7403E939E8 jnz .err ; error if cylinder >= 1024 --> 4562 ; ! bx = 0 (for 13.02 call) 4563 4564 ; we call INT 13h AH=02h once for each sector. Multi-sector reads 4565 ; may fail if we cross a track or 64K boundary 0 0000F359 BE1100 mov si, 16 + 1 4567 .loop_chs_retry_repeat: 0 0000F35C E89F00 call .set_ax_function_0201_or_0301 0 0000F35F CD13 int 13h ; read one sector 0 0000F361 7349 jnc .done_j 0 0000F363 50 push ax 0 0000F364 31C0 xor ax, ax 0 0000F366 CD13 int 13h ; reset disk 0 0000F368 58 pop ax 0 0000F369 4E dec si ; another attempt ? 0 0000F36A 75F0 jnz .loop_chs_retry_repeat ; yes --> 4577 0 0000F36C 80FC09 cmp ah, 9 ; data boundary error? 0 0000F36F 7403E91EE8 jne .err 4580 4581 .chs_sectorseg: 4582 d4 call d4dumpregs 4583 d4 call d4message 4584 d4 asciz 13,10,"In read_sector.chs_sectorseg",13,10 4585 0 0000F374 F646FE01 test byte [bp + ?is_read_bit0], 1 0 0000F378 7534 jnz .chs_sectorseg_read 4588 4589 .chs_sectorseg_write: 0 0000F37A 06 push es 4591 0 0000F37B 1E push ds 0 0000F37C 57 push di 0 0000F37D 51 push cx 0 0000F37E 8B0E[0B02] mov cx, word [load_sectorsize] 0 0000F382 06 push es 0 0000F383 8E06[E401] mov es, word [load_sectorseg] ; => sectorseg 0 0000F387 1F pop ds ; => user buffer 0 0000F388 31F6 xor si, si 0 0000F38A 31FF xor di, di 0 0000F38C F3A4 rep movsb ; copy data into sectorseg 0 0000F38E 59 pop cx 0 0000F38F 5F pop di 0 0000F390 1F pop ds 4605 0 0000F391 B80103 mov ax, 0301h 0 0000F394 CD13 int 13h 0 0000F396 7313 jnc @F 4609 0 0000F398 31C0 xor ax, ax 0 0000F39A CD13 int 13h 0 0000F39C 7303E9F1E7 jc .err 4613 0 0000F3A1 B80103 mov ax, 0301h 0 0000F3A4 CD13 int 13h 0 0000F3A6 7303E9E7E7 jc .err 4617 @@: 0 0000F3AB 07 pop es 4619 .done_j: 0 0000F3AC EB32 jmp .done 4621 4622 4623 .chs_sectorseg_read: 4624 0 0000F3AE 06 push es ; user buffer 0 0000F3AF 8E06[E401] mov es, word [load_sectorseg] 4627 0 0000F3B3 E84800 call .set_ax_function_0201_or_0301 0 0000F3B6 CD13 int 13h 0 0000F3B8 7313 jnc .chs_sectorseg_done 4631 0 0000F3BA 31C0 xor ax, ax 0 0000F3BC CD13 int 13h 0 0000F3BE 7303E9CFE7 jc .err 4635 0 0000F3C3 E83800 call .set_ax_function_0201_or_0301 0 0000F3C6 CD13 int 13h 0 0000F3C8 7303E9C5E7 jc .err 4639 .chs_sectorseg_done: 4640 0 0000F3CD 31F6 xor si, si 0 0000F3CF 07 pop es 0 0000F3D0 57 push di 0 0000F3D1 31FF xor di, di 0 0000F3D3 8B0E[0B02] mov cx, word [load_sectorsize] 0 0000F3D7 8E1E[E401] mov ds, word [load_sectorseg] 0 0000F3DB F3A4 rep movsb 0 0000F3DD 5F pop di 4649 0 0000F3DE 16 push ss 0 0000F3DF 1F pop ds 4652 .done: 4653 ; increment segment 0 0000F3E0 8CC3 mov bx, es 0 0000F3E2 031E[EA01] add bx, word [load_sectorsizepara] 4656 0 0000F3E6 5E pop si 0 0000F3E7 58 pop ax 0 0000F3E8 59 pop cx 0 0000F3E9 5A pop dx 4661 ; increment LBA sector number 0 0000F3EA 40 inc ax 0 0000F3EB 7501 jne @F 0 0000F3ED 42 inc dx 4665 @@: 0 0000F3EE 89EC5D lleave code 0 0000F3F1 C3 retn 4668 4669 .set_ah_function_42_or_43: 0 0000F3F2 B442 mov ah, 42h 0 0000F3F4 F646FE01 test byte [bp + ?is_read_bit0], 1 0 0000F3F8 7503 jnz @F 0 0000F3FA B80043 mov ax, 4300h 4674 @@: 0 0000F3FD C3 retn 4676 4677 .set_ax_function_0201_or_0301: 0 0000F3FE B001 mov al, 1 4679 .set_ah_function_02_or_03: 0 0000F400 B402 mov ah, 02h 0 0000F402 F646FE01 test byte [bp + ?is_read_bit0], 1 0 0000F406 7502 jnz @F 0 0000F408 B403 mov ah, 03h 4684 @@: 0 0000F40A C3 retn 4686 4687 lleave ctx 4688 4689 4690 %if _INPUT_FILE_BOOT || _EXTENSIONS 4691 yy_boot_error: 0 0000F40B 52 push dx 0 0000F40C BA[0000] mov dx, msg.bootfail 0 0000F40F E8[0000] call putsz_error 0 0000F412 5A pop dx 0 0000F413 EB03 jmp @F 4697 4698 yy_boot_disp_error_1: 0 0000F415 B80002 mov ax, 0200h 4700 @@: 0 0000F418 E8[0000] call setrc 0 0000F41B E8[0000] call display_y_or_ext 0 0000F41E E8[0000] call putsz_error 0 0000F421 FF26[0000] jmp near word [errret] 4705 4706 yy_boot_parse_name: section_of_function 0 0000F425 8D5CFF lea bx, [si - 1] ; -> start of name 4708 yy_boot_parse_name_bx_buffer: section_of_function 0 0000F428 E809E2 call init_bootcmd 0 0000F42B E9[0000] jmp yy_common_parse_name_bx_buffer 4711 4712 yy_boot: 4713 %if _EXTENSIONS 4714 %if _INPUT_FILE_BOOT 0 0000F42E D006[0000] rol byte [yy_is_script], 1 0 0000F432 7203E9FF00 jnc ext_boot 4717 %endif 4718 %endif 4719 4720 %if _INPUT_FILE_BOOT 4721 yy_script_boot: 0 0000F437 E8EBFF call yy_boot_parse_name 4723 0 0000F43A F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000F43F 740C jz @F 0 0000F441 833E[2005]03 cmp word [load_input_file.active], _INPUT_FILE_BOOT - 1 0 0000F446 7205 jb @F 4728 0 0000F448 BA[0000] mov dx, msg.yy_too_many_handles 0 0000F44B EBC8 jmp yy_boot_disp_error_1 4731 @@: 4732 0 0000F44D 803F3A cmp byte [bx], ':' 0 0000F450 753F jne .not_yy_goto_subfunction 4735 4736 %if _EXTENSIONS && _COMLEVELS 0 0000F452 51 push cx 0 0000F453 53 push bx 0 0000F454 89D8 mov ax, bx 0 0000F456 BB9006 mov bx, COMLEVEL_DO_YY_BOOT_GOTO 0 0000F459 8B0E[0000] mov cx, [ext_comlevels_handler] 0 0000F45D E303 jcxz @F 4743 ; INP: ax -> yy goto subfunction 4744 ; cx destroyed 4745 ; bx = function, 4746 ; COMLEVEL_DO_YY_GOTO 4747 ; COMLEVEL_DO_YY_BOOT_GOTO 4748 ; OUT: cx don't care 4749 ; jump to downlink or extcall near_transfer_ext_return 4750 ; extcall cmd3 to skip remaining code 0 0000F45F E8[0000] call transfer_ext_cx_NC_push_ax 4752 @@: 0 0000F462 5B pop bx 0 0000F463 59 pop cx 4755 %endif 4756 0 0000F464 F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000F469 7421 jz @F 4759 0 0000F46B 8B3E[0000] mov di, word [terminator_in_line_in.offset] 0 0000F46F A0[0000] mov al, byte [terminator_in_line_in.value] 0 0000F472 8805 mov byte [di], al 4763 0 0000F474 43 inc bx 0 0000F475 89DE mov si, bx 0 0000F477 E8[0000] call skipwhite 0 0000F47A 4E dec si 0 0000F47B 8936[2205] mov word [load_input_file.goto_offset], si 4769 0 0000F47F E8A303 call yy_calculate_structure 0 0000F482 E88003 call yy_boot_get.bx 0 0000F485 800E[0000]80 setopt [internalflags3], dif3_partition_changed 0 0000F48A EB44 jmp .finish 4774 4775 @@: 0 0000F48C BA[0000] mov dx, msg.yy_no_file 0 0000F48F EB84 jmp yy_boot_disp_error_1 4778 4779 .not_yy_goto_subfunction: 0 0000F491 8326[2205]00 and word [load_input_file.goto_offset], 0 0 0000F496 E8[0000] call skipcomm0 0 0000F499 8936[0000] mov word [if_exists_then_address], si 0 0000F49D E8[0000] call iseol?_or_then 0 0000F4A0 742B je .not_yy_goto 4785 0 0000F4A2 3C3A cmp al, ':' 0 0000F4A4 7403E9[0000] jne error 4788 0 0000F4A9 E8[0000] call skipwhite 0 0000F4AC 4E dec si 0 0000F4AD 8936[2205] mov word [load_input_file.goto_offset], si 4792 4793 @@: 0 0000F4B1 AC lodsb 0 0000F4B2 3C20 cmp al, 32 0 0000F4B4 740D je @F 0 0000F4B6 3C09 cmp al, 9 0 0000F4B8 7409 je @F 0 0000F4BA 3C2C cmp al, ',' 0 0000F4BC 7405 je @F 0 0000F4BE E8[0000] call iseol? 0 0000F4C1 75EE jne @B 4803 @@: 0 0000F4C3 E8[0000] call skipcomm0 0 0000F4C6 8936[0000] mov word [if_exists_then_address], si 0 0000F4CA E8[0000] call chkeol_or_then 4807 4808 .not_yy_goto: 0 0000F4CD E88500 call yy_boot_open_file 4810 4811 .finish: 0 0000F4D0 31ED xor bp, bp 0 0000F4D2 31DB xor bx, bx 0 0000F4D4 BE[C001] mov si, load_data_lowest 0 0000F4D7 B95000 mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 4816 0 0000F4DA BF[A002] mov di, load_input_file 0 0000F4DD F606[0300]02 testopt [internalflags2], dif2_input_file_boot 0 0000F4E2 7415 jz @F 0 0000F4E4 8B1E[2005] mov bx, word [load_input_file.active] 0 0000F4E8 43 inc bx 0 0000F4E9 B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 0000F4EC F7E3 mul bx 4824 ; test dx, dx 4825 ; jnz error 0 0000F4EE 01C7 add di, ax 0 0000F4F0 8B5586 mov dx, word [di - LOAD_INPUT_FILE_SIZE - LOADDATA3 + ldFATType] 0 0000F4F3 81E200F0 and dx, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 0 0000F4F7 09D5 or bp, dx 4831 4832 @@: 4833 0 0000F4F9 092E[E601] or word [load_data - LOADDATA2 + ldFATType], bp 0 0000F4FD 16 push ss 0 0000F4FE 07 pop es 0 0000F4FF F3A5 rep movsw 4838 4839 ; hazard: this uses load_input_file and 4840 ; load_data_lowest if we are already in 4841 ; a yy_boot script. 0 0000F501 8026[0300]EF clropt [internalflags3], dif3_auxbuff_guarded_1 0 0000F506 E8[0000] call yy_reset_buf 4844 0 0000F509 891E[2005] mov word [load_input_file.active], bx 0 0000F50D 800E[0300]02 setopt [internalflags2], dif2_input_file_boot 4847 4848 %if _EXTENSIONS && _COMLEVELS 0 0000F512 31C0 xor ax, ax 0 0000F514 BB0006 mov bx, COMLEVEL_INIT_YY_BOOT 0 0000F517 8B0E[0000] mov cx, [ext_comlevels_handler] 0 0000F51B E303 jcxz @F 4853 ; INP: ax = 0 4854 ; cx destroyed 4855 ; bx = function, 4856 ; COMLEVEL_INIT_RC 4857 ; COMLEVEL_INIT_YY 4858 ; COMLEVEL_INIT_YY_BOOT 4859 ; COMLEVEL_INIT_RE 4860 ; OUT: cx don't care 4861 ; jump to downlink or extcall near_transfer_ext_return 4862 ; REM: the initialisation of RC buffer execution set up by 4863 ; the debugger's init doesn't call out this way. 4864 ; RE buffer execution only calls out if the entire RE 4865 ; buffer does not equal "@R", else dumpregs is called 4866 ; internally without setup of reading the RE buffer. 0 0000F51D E8[0000] call transfer_ext_cx_NC_push_ax 4868 @@: 4869 %endif 4870 0 0000F520 8B36[2205] mov si, word [load_input_file.goto_offset] 0 0000F524 85F6 test si, si 0 0000F526 7403E9[0000] jnz cmd_goto.yy_entry 4874 0 0000F52B F606[0300]08 testopt [internalflags3], dif3_in_if 0 0000F530 7403E9[0000] jnz if_exists_found_open 0 0000F535 C3 retn 4878 %endif 4879 4880 4881 %if _EXTENSIONS 4882 ext_boot: 0 0000F536 E8ECFE call yy_boot_parse_name 0 0000F539 8D54FF lea dx, [si - 1] 0 0000F53C 8916[0000] mov word [ext_cmdline], dx 0 0000F540 E8[0000] call skipcomm0 0 0000F543 8936[0000] mov word [if_exists_then_address], si 0 0000F547 E80B00 call yy_boot_open_file 0 0000F54A BB[C001] mov bx, load_data_lowest ; make yy_boot_get and yy_boot_update no-ops 0 0000F54D 8026[0300]EF clropt [internalflags3], dif3_auxbuff_guarded_1 0 0000F552 E9[0000] jmp ext_finish.boot 4892 %endif 4893 4894 4895 yy_boot_open_file: section_of_function 4896 %if _CONFIG 0 0000F555 8926[0000] mov word [yy_boot_attempt_open_stack], sp 0 0000F559 891E[0000] mov word [yy_boot_attempt_open_pathname], bx 4899 %endif 0 0000F55D E81D01 call yy_boot_init_dir 0 0000F560 C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000F565 8B36[5405] mov si, word [load_yyname_input] 0 0000F569 803C2F cmp byte [si], '/' 0 0000F56C 7501 jne @F 0 0000F56E 46 inc si 4906 @@: 4907 .dotcomponent: 0 0000F56F 803C00 cmp byte [si], 0 0 0000F572 7509 jne @F 4910 ..@yy_filename_empty: section_of_function 0 0000F574 BA[0000] mov dx, msg.yy_filename_empty 0 0000F577 B80A02 mov ax, 020Ah 0 0000F57A E98EFE jmp yy_boot_error 4914 @@: 0 0000F57D 16 push ss 0 0000F57E 07 pop es 0 0000F57F E87FEB call boot_parse_fn ; get next pathname 0 0000F582 72EB jc .dotcomponent 0 0000F584 3C2F cmp al, '/' 0 0000F586 7509 jne @F 0 0000F588 C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000F58D 8936[5605] mov word [load_yyname_next], si 4923 @@: 4924 0 0000F591 BFFFFF mov di, -1 0 0000F594 89FE mov si, di 0 0000F596 897EF4 mov [bp + lsvFATSector], di 0 0000F599 8976F6 mov [bp + lsvFATSector + 2], si 4929 0 0000F59C 31C0 xor ax, ax 0 0000F59E 31D2 xor dx, dx 4932 4933 scan_dir_yyname_loop: 0 0000F5A0 8946EC mov word [bp + ldDirCluster], ax 0 0000F5A3 8956EE mov word [bp + ldDirCluster + 2], dx 4936 0 0000F5A6 16 push ss 0 0000F5A7 07 pop es 0 0000F5A8 BB[8002] mov bx, load_yy_direntry 4940 0 0000F5AB E8A4F6 call scan_dir_aux_for_file 4942 0 0000F5AE 803E[3B05]10 cmp byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000F5B3 753C jne got_yyentry 4945 0 0000F5B5 56 push si 0 0000F5B6 57 push di 0 0000F5B7 C606[3B05]00 mov byte [load_check_dir_attr], 0 0 0000F5BC 8B36[5605] mov si, word [load_yyname_next] 4950 .dotcomponent_next: 0 0000F5C0 803C00 cmp byte [si], 0 0 0000F5C3 7502 jne @F 0 0000F5C5 EBAD jmp ..@yy_filename_empty 4954 @@: 0 0000F5C7 06 push es 0 0000F5C8 16 push ss 0 0000F5C9 07 pop es 0 0000F5CA E834EB call boot_parse_fn ; get next pathname 0 0000F5CD 07 pop es 0 0000F5CE 72F0 jc .dotcomponent_next 0 0000F5D0 3C2F cmp al, '/' 0 0000F5D2 7509 jne @F 0 0000F5D4 C606[3B05]10 mov byte [load_check_dir_attr], ATTR_DIRECTORY 0 0000F5D9 8936[5605] mov word [load_yyname_next], si 4965 @@: 0 0000F5DD 5F pop di 0 0000F5DE 5E pop si 4968 0 0000F5DF 31D2 xor dx, dx 0 0000F5E1 268B471A mov ax, [es:bx + deClusterLow] 4971 ; = first cluster (not FAT32) 0 0000F5E5 807EE620 cmp byte [bp + ldFATType], 32 0 0000F5E9 7504 jne @F 0 0000F5EB 268B5714 mov dx, [es:bx + deClusterHigh] 4975 ; dx:ax = first cluster (FAT32) 4976 @@: 4977 0 0000F5EF EBAF jmp scan_dir_yyname_loop 4979 4980 4981 got_yyentry: section_of_function 4982 4983 4984 ; (boot32.asm code starts here) 4985 0 0000F5F1 8B1E[9C02] mov bx, [load_yy_direntry + deSize] 0 0000F5F5 A1[9E02] mov ax, [load_yy_direntry + deSize + 2] 4988 ; ax:bx = file size 0 0000F5F8 8A16[8C02] mov dl, [load_yy_direntry + 12] 4990 ; dl = FAT+ size bits 0 0000F5FC 88D6 mov dh, dl 0 0000F5FE 81E207E0 and dx, 0E007h ; obtain bits 7-5 and 2-0 0 0000F602 7409 jz @F 0 0000F604 BA[0000] mov dx, msg.yy_too_large 0 0000F607 B80B02 mov ax, 020Bh 0 0000F60A E9FEFD jmp yy_boot_error 4997 @@: 0 0000F60D 895EC4 mov word [bp + ldFileSize], bx 0 0000F610 8946C6 mov word [bp + ldFileSize + 2], ax 5000 0 0000F613 09D8 or ax, bx 0 0000F615 750C jnz @F 5003 0 0000F617 E83D00 call yy_boot_file_not_found 0 0000F61A BA[0000] mov dx, msg.yy_empty 0 0000F61D B80C02 mov ax, 020Ch 0 0000F620 E9E8FD jmp yy_boot_error 5008 @@: 5009 5010 ; get starting cluster of file 0 0000F623 31D2 xor dx, dx 0 0000F625 A1[9A02] mov ax, [load_yy_direntry + deClusterLow] 5013 ; = first cluster (not FAT32) 5014 0 0000F628 807EE620 cmp byte [bp + ldFATType], 32 0 0000F62C 7504 jne @F 0 0000F62E 8B16[9402] mov dx, [load_yy_direntry + deClusterHigh] 5018 ; dx:ax = first cluster (FAT32) 5019 @@: 5020 0 0000F632 80E60F and dh, 0Fh 0 0000F635 8946F0 mov word [bp + lsvFirstCluster], ax 0 0000F638 8956F2 mov word [bp + lsvFirstCluster + 2], dx 5024 0 0000F63B 8946C8 mov word [bp + ldCurrentCluster], ax 0 0000F63E 8956CA mov word [bp + ldCurrentCluster + 2], dx 0 0000F641 31DB xor bx, bx 0 0000F643 895ECC mov word [bp + ldCurrentSeek], bx 0 0000F646 895ECE mov word [bp + ldCurrentSeek + 2], bx 0 0000F649 E81BF8 call check_clust 0 0000F64C 7303E9E206 jc error_badchain 5032 0 0000F651 800E[0000]80 setopt [internalflags3], dif3_partition_changed 5034 0 0000F656 C3 retn 5036 5037 5038 yy_boot_file_not_found: 5039 %if _CONFIG 0 0000F657 8B3E[0000] mov di, word [yy_boot_attempt_open_pathname] 0 0000F65B 85FF test di, di 0 0000F65D 7413 jz @F 0 0000F65F 16 push ss 0 0000F660 07 pop es 0 0000F661 E8[0000] call retry_open_scriptspath 0 0000F664 750C jnz @F 0 0000F666 8B26[0000] mov sp, word [yy_boot_attempt_open_stack] 0 0000F66A 8026[0300]EF clropt [internalflags3], dif3_auxbuff_guarded_1 0 0000F66F E9E3FE jmp yy_boot_open_file 5050 %endif 5051 @@: 5052 .if: 0 0000F672 F606[0300]08 testopt [internalflags3], dif3_in_if 0 0000F677 7403E9[0000] jnz if_exists_not_found 0 0000F67C C3 retn 5056 5057 5058 yy_boot_init_dir: section_of_function 0 0000F67D 31C0 xor ax, ax 0 0000F67F 89461C mov [bp + bsBPB + bpbHiddenSectors + 0], ax 0 0000F682 89461E mov [bp + bsBPB + bpbHiddenSectors + 2], ax 0 0000F685 F9 stc 0 0000F686 89DE mov si, bx 0 0000F688 AC lodsb 0 0000F689 E828E7 call parseloadunit_default_sdp.cf 0 0000F68C 7506 jnz .have_filename 5067 0 0000F68E BA[0000] mov dx, msg.yy_requires_filename 0 0000F691 E981FD jmp yy_boot_disp_error_1 5070 5071 .have_filename: 0 0000F694 BB[5405] mov bx, load_yyname_input 0 0000F697 E8D3E2 call bootcmd.pathname_parse_super 5074 0 0000F69A F606[0000]07 testopt [internalflags3], dif3_load_is_dp 0 0000F69F 754E jnz .load_yy_from_ldp 5077 0 0000F6A1 8A1E[3805] mov bl, [load_partition] 0 0000F6A5 803E[4002]80 cmp byte [load_unit], 80h 0 0000F6AA 721F jb .p_f_is_diskette 0 0000F6AC 84DB test bl, bl ; partition specified ? 0 0000F6AE 7503E9[0000] jz error ; no, error --> 5083 0 0000F6B3 E897F9 call query_geometry 5085 0 0000F6B6 B9[E320] mov cx, load_yy_from_partition 0 0000F6B9 E8DDF7 call scan_partitions 0 0000F6BC E898FF call yy_boot_file_not_found 0 0000F6BF BA[0000] mov dx, msg.boot_partition_not_found 0 0000F6C2 B80602 mov ax, 0206h 0 0000F6C5 E8[0000] call setrc 0 0000F6C8 E9D9E4 jmp bootcmd.fail 5093 5094 5095 .p_f_is_diskette: 0 0000F6CB 84DB test bl, bl ; partition specified ? 0 0000F6CD 7403E9[0000] jnz error ; yes, error --> 5098 0 0000F6D2 E878F9 call query_geometry 5100 0 0000F6D5 31C0 xor ax, ax 0 0000F6D7 31D2 xor dx, dx 5103 @@: 0 0000F6D9 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000F6DD 52 push dx 0 0000F6DE 50 push ax 0 0000F6DF E837FB call read_ae_512_bytes 5108 0 0000F6E2 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000F6E9 7510 jne boot_sigmismatch 0 0000F6EB 58 pop ax 0 0000F6EC 5A pop dx 5113 0 0000F6ED EB62 jmp load_yy_common 5115 5116 5117 .load_yy_from_ldp: 0 0000F6EF E85BF9 call query_geometry 0 0000F6F2 A1[2805] mov ax, word [load_partition_sector] 0 0000F6F5 8B16[2A05] mov dx, word [load_partition_sector + 2] 0 0000F6F9 EBDE jmp @B 5122 %endif 5123 5124 5125 boot_sigmismatch: 0 0000F6FB BA[0000] mov dx, msg.bootfail_sig 0 0000F6FE B80702 mov ax, 0207h 5128 @@: 0 0000F701 E8[0000] call setrc 0 0000F704 E99DE4 jmp bootcmd.fail 5131 5132 boot_codemismatch: 0 0000F707 BA[0000] mov dx, msg.bootfail_code 0 0000F70A B80802 mov ax, 0208h 0 0000F70D EBF2 jmp @B 5136 5137 boot_secsizemismatch: 0 0000F70F BA[0000] mov dx, msg.bootfail_secsizediffer 0 0000F712 B80902 mov ax, 0209h 0 0000F715 EBEA jmp @B 5141 5142 5143 %if _INPUT_FILE_BOOT || _EXTENSIONS 5144 ; INP: es:si -> partition table entry, 5145 ; si = load_partition_table .. load_partition_table+48, 5146 ; es = ss 5147 ; bp + di -> above part table metadata, 5148 ; dwo [bp + di - 4] = root (outermost extended position) 5149 ; dwo [bp + di - 8] = base (current table position) 5150 ; CHG: ax, bx, (cx), dx 5151 load_yy_from_partition: 5152 d4 call d4message 5153 d4 asciz "In load_yy_from_partition",13,10 5154 0 0000F717 A0[3905] mov al, byte [load_current_partition] 0 0000F71A 3A06[3805] cmp al, byte [load_partition] 0 0000F71E 7401 je .gotit 0 0000F720 C3 retn 5159 5160 .gotit: 5161 d4 call d4message 5162 d4 asciz "In load_yy_from_partition.gotit",13,10 5163 0 0000F721 8B43F8 mov ax, [bp + di - 8] 0 0000F724 8B53FA mov dx, [bp + di - 6] ; base (current table position) 5166 0 0000F727 26034408 add ax, [es:si + 8] 0 0000F72B 2613540A adc dx, [es:si + 8 + 2] ; add offset to logical partition 5169 0 0000F72F 26894408 mov word [es:si + 8], ax 0 0000F733 2689540A mov word [es:si + 8 + 2], dx ; store in partition table entry 5172 0 0000F737 89EC mov sp, bp 0 0000F739 5D pop bp ; restore bp (scan_partitions) 0 0000F73A 5B pop bx ; discard ret address (scan_partitions) 5176 5177 ; dx:ax = absolute sector number 0 0000F73B 8B1E[0000] mov bx, word [auxbuff_segorsel] ; bx => auxbuff 0 0000F73F 50 push ax 0 0000F740 52 push dx 0 0000F741 E8D5FA call read_ae_512_bytes ; load partition boot sector 5182 0 0000F744 26813EFE0155AA cmp word [es:510], 0AA55h 0 0000F74B 75AE jne boot_sigmismatch 5185 0 0000F74D 31C9 xor cx, cx 5187 ; cmp word [es:0], cx 5188 ; je boot_codemismatch 5189 0 0000F74F 5A pop dx 0 0000F750 58 pop ax 5192 5193 ; dx:ax = boot sector 5194 ; byte [load_unit] = unit 5195 ; es:0-> read sector 5196 load_yy_common: 0 0000F751 26A31C00 mov word [es:bsBPB + bpbHiddenSectors], ax 0 0000F755 2689161E00 mov word [es:bsBPB + bpbHiddenSectors + 2], dx 5199 0 0000F75A 8B5E0B mov bx, [bp + bsBPB + bpbBytesPerSector] 0 0000F75D 263B1E0B00 cmp bx, [es:bsBPB + bpbBytesPerSector] 0 0000F762 75AB jne boot_secsizemismatch 5203 5204 ; preserve some variables from our pseudo BPB 0 0000F764 31C0 xor ax, ax 0 0000F766 FF7618 push word [bp + bsBPB + bpbCHSSectors] 0 0000F769 268F061800 pop word [es:bsBPB + bpbCHSSectors] 0 0000F76E FF761A push word [bp + bsBPB + bpbCHSHeads] 0 0000F771 268F061A00 pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 5210 0 0000F776 8B5EEA mov bx, word [bp + ldParaPerSector] 0 0000F779 D1EB shr bx, 1 0 0000F77B 895ED4 mov word [bp + ldEntriesPerSector], bx 5214 0 0000F77E 2639061600 cmp word [es:bsBPB + bpbSectorsPerFAT], ax 0 0000F783 8A5E40 mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 0 0000F786 7407 je .is_fat32 0 0000F788 26881E2400 mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 0 0000F78D EB05 jmp short .was_fat1612 5220 .is_fat32: 0 0000F78F 26881E4000 mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 5222 .was_fat1612: 5223 0 0000F794 06 push es 0 0000F795 1E push ds 0 0000F796 06 push es 0 0000F797 1F pop ds 0 0000F798 31F6 xor si, si ; -> BPB from boot partition 0 0000F79A 16 push ss 0 0000F79B 07 pop es 0 0000F79C BF[0002] mov di, load_data - LOADDATA2 ; -> our copy of a BPB 0 0000F79F B95A00 mov cx, (bsBPB + ebpbNew + BPBN_size) 0 0000F7A2 F3A4 rep movsb ; get the BPB 5234 0 0000F7A4 1F pop ds 5236 0 0000F7A5 394616 cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 0 0000F7A8 740B je @F ; is FAT32 --> 0 0000F7AA BE[2402] mov si, load_data - LOADDATA2 + bsBPB + bpbNew 0 0000F7AD BF[4002] mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 0 0000F7B0 B91A00 mov cx, BPBN_size 0 0000F7B3 F3A4 rep movsb ; clone the FAT16 / FAT12 BPBN 5243 ; to where the FAT32 BPBN lives 5244 @@: 0 0000F7B5 07 pop es 5246 5247 .outofmem: equ query_geometry.out_of_memory_error 5248 0 0000F7B6 FF36[0000] push word [auxbuff_segorsel] 0 0000F7BA 8F46F8 pop word [bp + lsvFATSeg] 0 0000F7BD 804EE702 or byte [bp + ldFlags], ldfFATInvalid 0 0000F7C1 B8FFFF mov ax, -1 0 0000F7C4 8946F4 mov word [bp + lsvFATSector], ax 0 0000F7C7 8946F6 mov word [bp + lsvFATSector + 2], ax 5255 0 0000F7CA E82905 call initialise_fs 0 0000F7CD C3 retn 5258 5259 5260 %if _INPUT_FILE_BOOT 5261 ; INP: [load_input_file], dif2_input_file_boot 5262 ; OUT: most recent file closed, flag cleared if no longer file 5263 ; CHG: di, bx, ax 5264 yy_boot_close_file: 0 0000F7CE A1[2005] mov ax, word [load_input_file.active] 0 0000F7D1 48 dec ax 0 0000F7D2 791C jns .next 0 0000F7D4 8026[0300]FD clropt [internalflags2], dif2_input_file_boot 0 0000F7D9 800E[0300]04 setopt [internalflags2], dif2_closed_input_file_boot 5270 %if _EXTENSIONS && _COMLEVELS 0 0000F7DE 51 push cx 0 0000F7DF BB8006 mov bx, COMLEVEL_EXIT_YY_BOOT 0 0000F7E2 89D8 mov ax, bx 0 0000F7E4 8B0E[0000] mov cx, [ext_comlevels_handler] 0 0000F7E8 E303 jcxz @F 5276 ; INP: ax = nonzero from debugger, 5277 ; a handler may modify this to pass along zero 5278 ; (note that al is always nonzero by itself) 5279 ; cx destroyed 5280 ; bx = function, 5281 ; COMLEVEL_EXIT_RC 5282 ; COMLEVEL_EXIT_YY 5283 ; COMLEVEL_EXIT_YY_SUB 5284 ; COMLEVEL_EXIT_YY_BOOT 5285 ; COMLEVEL_EXIT_YY_BOOT_SUB 5286 ; COMLEVEL_EXIT_RE 5287 ; OUT: cx don't care 5288 ; jump to downlink or extcall near_transfer_ext_return 5289 ; ax == 0 to loop back to getline caller 0 0000F7EA E8[0000] call transfer_ext_cx_NC_push_ax 5291 @@: 0 0000F7ED 93 xchg bx, ax 0 0000F7EE 59 pop cx 5294 %else 5295 xor bx, bx 5296 %endif 0 0000F7EF C3 retn 5298 .next: 0 0000F7F0 A3[2005] mov word [load_input_file.active], ax 5300 %if _EXTENSIONS && _COMLEVELS 0 0000F7F3 51 push cx 0 0000F7F4 BB8806 mov bx, COMLEVEL_EXIT_YY_BOOT_SUB 0 0000F7F7 89D8 mov ax, bx 0 0000F7F9 8B0E[0000] mov cx, [ext_comlevels_handler] 0 0000F7FD E303 jcxz @F 5306 ; INP: ax = nonzero from debugger, 5307 ; a handler may modify this to pass along zero 5308 ; (note that al is always nonzero by itself) 5309 ; cx destroyed 5310 ; bx = function, 5311 ; COMLEVEL_EXIT_RC 5312 ; COMLEVEL_EXIT_YY 5313 ; COMLEVEL_EXIT_YY_SUB 5314 ; COMLEVEL_EXIT_YY_BOOT 5315 ; COMLEVEL_EXIT_YY_BOOT_SUB 5316 ; COMLEVEL_EXIT_RE 5317 ; OUT: cx don't care 5318 ; jump to downlink or extcall near_transfer_ext_return 5319 ; ax == 0 to loop back to getline caller 0 0000F7FF E8[0000] call transfer_ext_cx_NC_push_ax 5321 @@: 0 0000F802 93 xchg bx, ax 0 0000F803 59 pop cx 5324 %else 5325 xor bx, bx 5326 %endif 0 0000F804 C3 retn 5328 %endif 5329 5330 5331 ; INP: bx -> load data to get 5332 ; OUT: [load_data_lowest] = LOADDATA[123], lsv, BPB 5333 ; CHG: es, ax, di, si 5334 yy_boot_get.bx: 0 0000F805 16 push ss 0 0000F806 07 pop es 5337 5338 %if _INPUT_FILE_BOOT 0 0000F807 51 push cx 0 0000F808 BF[C001] mov di, load_data_lowest 0 0000F80B B95000 mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 0 0000F80E 89DE mov si, bx 0 0000F810 F3A5 rep movsw 0 0000F812 59 pop cx 5345 %endif 0 0000F813 C3 retn 5347 5348 5349 ; INP: [load_data_lowest] = LOADDATA3 5350 ; bx -> load data to set 5351 ; CHG: es, ax, di, si 5352 ; Note: Preserves flags (ZF, CF) 5353 yy_boot_update.bx: 0 0000F814 9C pushf 5355 0 0000F815 16 push ss 0 0000F816 07 pop es 5358 5359 %if _INPUT_FILE_BOOT 0 0000F817 51 push cx 0 0000F818 BE[C001] mov si, load_data_lowest 0 0000F81B B90800 mov cx, LOADDATA3_size >> 1 0 0000F81E 89DF mov di, bx 0 0000F820 F3A5 rep movsw 0 0000F822 59 pop cx 5366 %endif 0 0000F823 9D popf ; ZF, CF 0 0000F824 C3 retn 5369 5370 5371 %if _INPUT_FILE_BOOT 5372 ; INP: word [load_input_file.active] 5373 ; OUT: bx -> load input data structure 5374 ; CHG: ax 5375 yy_calculate_structure: 0 0000F825 52 push dx 0 0000F826 B8A000 mov ax, LOAD_INPUT_FILE_SIZE 0 0000F829 F726[2005] mul word [load_input_file.active] 5379 5380 ; test dx, dx 5381 ; jnz .error 0 0000F82D 5A pop dx 5383 0 0000F82E 93 xchg bx, ax 0 0000F82F 81C3[A002] add bx, load_input_file 0 0000F833 C3 retn 5387 %endif 5388 5389 5390 guard_auxbuff_return: 0 0000F834 F606[0300]70 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 | dif3_auxbuff_guarded_3 0 0000F839 7506 jnz @F 0 0000F83B 800E[0300]10 setopt [internalflags3], dif3_auxbuff_guarded_1 5396 ; (NC) 0 0000F840 C3 retn 5398 5399 @@: 0 0000F841 BA[0000] mov dx, msg.guard_auxbuff_error 0 0000F844 E8[0000] call putsz 0 0000F847 F9 stc ; (CY) 0 0000F848 C3 retn 5404 5405 5406 ; INP: [load_input_file] = active file 5407 ; cx = how many bytes to read 5408 ; es:dx -> buffer 5409 ; OUT: CY if error reading 5410 ; NC if success 5411 ; ax = how many bytes read 5412 ; CHG: bx 5413 ; STT: ds = ss 5414 %if _INPUT_FILE_BOOT 5415 yy_boot_read: 0 0000F849 E8D9FF call yy_calculate_structure 5417 5418 .bx: section_of_function yy_boot_read 5419 %else 5420 yy_boot_read.bx: section_of_function 5421 %endif 5422 lframe near 5423 lvar word, length 5424 lvar word, length_this_cluster 5425 lvar dword, bytes_per_cluster 5426 lvar dword, how_far_in_cluster 0 0000F84C 5589E58D66F4 lenter 5428 lvar dword, pointer 0 0000F852 06 push es 0 0000F853 52 push dx 5431 lvar word, load_input_file_structure 0 0000F854 53 push bx 0 0000F855 31C0 xor ax, ax 5434 lvar word, did_guard_auxbuff 0 0000F857 50 push ax 5436 lvar word, read_how_many 0 0000F858 50 push ax 0 0000F859 52 push dx 0 0000F85A 56 push si 0 0000F85B 57 push di 0 0000F85C 51 push cx 5442 0 0000F85D FF36[0000] push word [errret] 0 0000F861 FF36[0000] push word [throwret] 0 0000F865 FF36[0000] push word [throwsp] 5446 0 0000F869 55 push bp 5448 0 0000F86A C706[0000][2B24] mov word [errret], .err_ret 0 0000F870 C706[0000][2B24] mov word [throwret], .err_ret 0 0000F876 8926[0000] mov word [throwsp], sp 5452 5453 ; bx -> load_input_file structure 0 0000F87A E888FF call yy_boot_get.bx 5455 0 0000F87D E8B4FF call guard_auxbuff_return 0 0000F880 7303E9A801 jc .error 0 0000F885 FF46EC inc word [bp + ?did_guard_auxbuff] 5459 0 0000F888 B8FFFF mov ax, -1 0 0000F88B A3[F601] mov word [load_data - LOADDATA2 + lsvFATSector + 2], ax 0 0000F88E A3[F401] mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 0 0000F891 800E[E701]04 setopt [load_ldflags], ldfFATBuffered 5464 0 0000F896 8B16[C601] mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 0 0000F89A A1[C401] mov ax, word [load_data - LOADDATA2 + ldFileSize] 5467 0 0000F89D 2B06[CC01] sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000F8A1 1B16[CE01] sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5470 ; dx:ax = read at most this many bytes 0 0000F8A5 7304 jnc @F 5472 ; file size below current seek 0 0000F8A7 31C0 xor ax, ax 0 0000F8A9 31D2 xor dx, dx ; = read at most zero bytes 5475 @@: 0 0000F8AB 85D2 test dx, dx 0 0000F8AD 7506 jnz .use_count 0 0000F8AF 39C8 cmp ax, cx ; dx:ax >= cx ? 0 0000F8B1 7302 jae .use_count ; yes, use cx as count to read 0 0000F8B3 89C1 mov cx, ax ; no, use (dx:)ax as count to read 5481 .use_count: 0 0000F8B5 85C9 test cx, cx ; any more to read ? 0 0000F8B7 7503E97001 jz .success ; no, reached the end --> 0 0000F8BC 894EFE mov word [bp + ?length], cx 5485 5486 .next_cluster: 0 0000F8BF 8B36[CE01] mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 0 0000F8C3 8B3E[CC01] mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000F8C7 A1[0B02] mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000F8CA F726[E801] mul word [load_data - LOADDATA2 + ldClusterSize] 5491 0 0000F8CE 8946F8 mov word [bp + ?bytes_per_cluster], ax 0 0000F8D1 8956FA mov word [bp + ?bytes_per_cluster + 2], dx 0 0000F8D4 83E801 sub ax, 1 0 0000F8D7 83DA00 sbb dx, 0 0 0000F8DA 21D6 and si, dx 0 0000F8DC 21C7 and di, ax ; how far are we into cluster 5498 0 0000F8DE 897EF4 mov word [bp + ?how_far_in_cluster], di 0 0000F8E1 8976F6 mov word [bp + ?how_far_in_cluster + 2], si 5501 0 0000F8E4 F7DE neg si 0 0000F8E6 F7DF neg di 0 0000F8E8 83DE00 sbb si, byte 0 ; neg si:di 5505 0 0000F8EB 037EF8 add di, word [bp + ?bytes_per_cluster] 0 0000F8EE 1376FA adc si, word [bp + ?bytes_per_cluster + 2] 5508 ; cluster size - how far we are 5509 ; = how much to read from this cluster 0 0000F8F1 85F6 test si, si 0 0000F8F3 7506 jnz .use_count_2 0 0000F8F5 39CF cmp di, cx 0 0000F8F7 7302 jae .use_count_2 0 0000F8F9 89F9 mov cx, di 5515 .use_count_2: 0 0000F8FB 894EFC mov word [bp + ?length_this_cluster], cx 5517 5518 .next_sector: 0 0000F8FE A1[C801] mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 0 0000F901 8B16[CA01] mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 0 0000F905 E85FF5 call check_clust 0 0000F908 7303E92001 jc .error 0 0000F90D E82CF4 call clust_to_first_sector 0 0000F910 8B1E[0B02] mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000F914 8B7EF4 mov di, word [bp + ?how_far_in_cluster] 0 0000F917 8B76F6 mov si, word [bp + ?how_far_in_cluster + 2] 0 0000F91A 87D6 xchg dx, si 0 0000F91C 97 xchg ax, di 0 0000F91D F7F3 div bx 5530 ; dx = byte offset into sector 5531 ; ax = sector offset into cluster's data 0 0000F91F 01C7 add di, ax 0 0000F921 83D600 adc si, 0 0 0000F924 87D6 xchg dx, si 0 0000F926 97 xchg ax, di 5536 ; dx:ax = sector in fs 5537 ; si = byte offset 5538 0 0000F927 89F1 mov cx, si ; = byte offset 0 0000F929 F7D9 neg cx ; - byte offset 0 0000F92B 01D9 add cx, bx ; sector size - byte offset 5542 ; = length this sector 0 0000F92D 3B4EFC cmp cx, word [bp + ?length_this_cluster] 0 0000F930 7603 jbe @F ; sector has less than requested --> 0 0000F932 8B4EFC mov cx, word [bp + ?length_this_cluster] 5546 ; fill entire remaining request 5547 @@: 0 0000F935 8B1E[0000] mov bx, word [auxbuff_segorsel] 0 0000F939 813E[0B02]0010 cmp word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector], 4096 0 0000F93F 7706 ja .invalidatefat 0 0000F941 81C30001 add bx, paras(4096) ; => use upper buffer for file data 5552 ; Note that the FAT12 straddling entry's second sector 5553 ; is reloaded even if the entry's first sector is still 5554 ; buffered. That means we do not have to invalidate the 5555 ; second sector here, so even with a 4 KiB sector size 5556 ; the upper buffer is free for file data use here. 0 0000F945 EB0A jmp @F 5558 .invalidatefat: 5559 ; need to invalidate FAT buffer 0 0000F947 830E[F601]FF or word [load_data - LOADDATA2 + lsvFATSector + 2], -1 0 0000F94C 830E[F401]FF or word [load_data - LOADDATA2 + lsvFATSector + 0], -1 5562 @@: 5563 0 0000F951 813E[0B02]0002 cmp word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector], 512 0 0000F957 7745 ja .nodatabuffer ; data buffer is only 512 bytes. too small --> 0 0000F959 F606[E701]08 testopt [load_ldflags], ldfDataBuffered 0 0000F95E 743E jz .nodatabuffer ; data buffer not used --> 0 0000F960 3916[DA01] cmp word [load_data - LOADDATA2 + ldDataSector + 2], dx 0 0000F964 7512 jne .filldatabuffer 0 0000F966 3906[D801] cmp word [load_data - LOADDATA2 + ldDataSector], ax 0 0000F96A 750C jne .filldatabuffer 5572 .havedatabuffer: 0 0000F96C 8EC3 mov es, bx ; es => sector buffer to read into 0 0000F96E 06 push es 0 0000F96F 1E push ds 0 0000F970 56 push si 0 0000F971 51 push cx ; must match stack frame for .copydatabuffer 0 0000F972 8E1E[D601] mov ds, word [load_data - LOADDATA2 + ldDataSegment] 5579 ; ds => data buffer 0 0000F976 EB15 jmp .copydatabuffer 5581 5582 .filldatabuffer: 0 0000F978 8916[DA01] mov word [load_data - LOADDATA2 + ldDataSector + 2], dx 0 0000F97C A3[D801] mov word [load_data - LOADDATA2 + ldDataSector], ax 5585 ; update buffered data sector 0 0000F97F E8A9F8 call read_sector ; actually read data from disk 0 0000F982 06 push es 0 0000F983 1E push ds 0 0000F984 56 push si 0 0000F985 51 push cx 0 0000F986 06 push es 0 0000F987 1F pop ds ; ds => sector buffer to read from 0 0000F988 368E06[D601] mov es, word [ss:load_data - LOADDATA2 + ldDataSegment] 5594 ; es => data buffer 5595 .copydatabuffer: 0 0000F98D 31FF xor di, di ; es:di -> sector buffer to read into 0 0000F98F 31F6 xor si, si ; ds:si -> data buffer 0 0000F991 368B0E[0B02] mov cx, word [ss:load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5599 ; cx = sector size 0 0000F996 F3A4 rep movsb ; get/set buffered data 0 0000F998 59 pop cx 0 0000F999 5E pop si 0 0000F99A 1F pop ds 0 0000F99B 07 pop es 0 0000F99C EB03 jmp .databufferdone 5606 5607 .nodatabuffer: 0 0000F99E E88AF8 call read_sector 5609 .databufferdone: 0 0000F9A1 1E push ds 5611 0 0000F9A2 06 push es 5613 ; es:si -> data in sector buffer 0 0000F9A3 C47EF0 les di, [bp + ?pointer] 5615 ; es:di -> buffer 0 0000F9A6 014EEA add word [bp + ?read_how_many], cx 0 0000F9A9 294EFC sub word [bp + ?length_this_cluster], cx 0 0000F9AC 294EFE sub word [bp + ?length], cx 0 0000F9AF 010E[CC01] add word [load_data - LOADDATA2 + ldCurrentSeek], cx 0 0000F9B3 8316[CE01]00 adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 0 0000F9B8 014EF4 add word [bp + ?how_far_in_cluster], cx 0 0000F9BB 8356F600 adc word [bp + ?how_far_in_cluster + 2], 0 0 0000F9BF 1F pop ds ; ds:si -> data in sector buffer 0 0000F9C0 F3A4 rep movsb ; copy 0 0000F9C2 897EF0 mov word [bp + ?pointer], di 5626 ; update pointer 0 0000F9C5 1F pop ds 5628 0 0000F9C6 837EFC00 cmp word [bp + ?length_this_cluster], 0 0 0000F9CA 7403E92FFF jne .next_sector 5631 0 0000F9CF 8B7EF8 mov di, word [bp + ?bytes_per_cluster] 0 0000F9D2 8B76FA mov si, word [bp + ?bytes_per_cluster + 2] 0 0000F9D5 397EF4 cmp word [bp + ?how_far_in_cluster], di 0 0000F9D8 7505 jne @F 0 0000F9DA 3976F6 cmp word [bp + ?how_far_in_cluster + 2], si 0 0000F9DD 7408 je @FF 5638 @@: 0 0000F9DF 837EFE00 cmp word [bp + ?length], 0 0 0000F9E3 7548 jne .error 0 0000F9E5 EB45 jmp .success 5642 5643 @@: 0 0000F9E7 A1[C801] mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 0 0000F9EA 8B16[CA01] mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 0 0000F9EE E876F4 call check_clust 0 0000F9F1 723A jc .error 0 0000F9F3 E873F3 call clust_next.dxax 0 0000F9F6 731B jnc @F ; (NC) --> 0 0000F9F8 B8F6FF mov ax, 0FFF8h - 2 0 0000F9FB BAFF0F mov dx, 0FFFh 0 0000F9FE 8B3E[CC01] mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000FA02 8B36[CE01] mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 0 0000FA06 3B36[C601] cmp si, word [load_data - LOADDATA2 + ldFileSize + 2] 0 0000FA0A 7506 jne .set_error 0 0000FA0C 3B3E[C401] cmp di, word [load_data - LOADDATA2 + ldFileSize] 0 0000FA10 7401 je .do_not_set_error ; if same then NC --> 5658 .set_error: 0 0000FA12 F9 stc 5660 .do_not_set_error: 5661 @@: 0 0000FA13 9C pushf 0 0000FA14 83C002 add ax, 2 0 0000FA17 83D200 adc dx, 0 0 0000FA1A A3[C801] mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 0 0000FA1D 8916[CA01] mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 0 0000FA21 9D popf ; CF 0 0000FA22 7209 jc .error 0 0000FA24 8B4EFE mov cx, word [bp + ?length] 0 0000FA27 E303 jcxz .success 0 0000FA29 E993FE jmp .next_cluster 5672 5673 .success: 0 0000FA2C A8 db __TEST_IMM8 ; (skip stc, NC) 5675 .error: 0 0000FA2D F9 stc 5677 0 0000FA2E 5D pop bp 5679 0 0000FA2F 8F06[0000] pop word [throwsp] 0 0000FA33 8F06[0000] pop word [throwret] ; restore throw destination 0 0000FA37 8F06[0000] pop word [errret] 5683 0 0000FA3B 9C pushf 0 0000FA3C F646EC01 testopt [bp + ?did_guard_auxbuff], 1 0 0000FA40 7405 jz @F 0 0000FA42 8026[0300]EF clropt [internalflags3], dif3_auxbuff_guarded_1 5688 @@: 0 0000FA47 8026[E701]FB clropt [load_ldflags], ldfFATBuffered 0 0000FA4C 9D popf ; CF 5691 0 0000FA4D 8B5EEE mov bx, word [bp + ?load_input_file_structure] 5693 ; bx -> load_input_file structure 0 0000FA50 E8C1FD call yy_boot_update.bx 5695 0 0000FA53 59 pop cx 0 0000FA54 5F pop di 0 0000FA55 5E pop si 0 0000FA56 5A pop dx 0 0000FA57 58 pop ax ; pop from ?read_how_many 0 0000FA58 8E46F2 mov es, word [bp + ?pointer + 2] 0 0000FA5B 89EC5D lleave 0 0000FA5E C3 retn 5704 5705 .err_ret: 0 0000FA5F 8B26[0000] mov sp, word [throwsp] ; restore stack 5707 ; (needed here if returned to errret) 0 0000FA63 EBC8 jmp .error 5709 5710 5711 ; INP: [load_input_file] = active file 5712 ; cx:dx = signed seek distance from current 5713 ; OUT: - 5714 ; CHG: ax, bx, cx, dx 5715 ; STT: ds = es = ss 5716 ; REM: negative seek must not seek to before SOF 5717 %if _INPUT_FILE_BOOT 5718 yy_boot_seek_current: 0 0000FA65 E8BDFD call yy_calculate_structure 5720 5721 .bx: section_of_function yy_boot_seek_current 5722 %else 5723 yy_boot_seek_current.bx: section_of_function 5724 %endif 5725 lframe near 5726 lvar dword, length 5727 lvar dword, length_this_cluster 5728 lvar dword, bytes_per_cluster 5729 lvar dword, how_far_in_cluster 0 0000FA68 5589E58D66F0 lenter 5731 lvar dword, seek_distance 0 0000FA6E 51 push cx 0 0000FA6F 52 push dx 5734 lvar word, load_input_file_structure 0 0000FA70 53 push bx 0 0000FA71 31C0 xor ax, ax 5737 lvar word, did_guard_auxbuff 0 0000FA73 50 push ax 0 0000FA74 56 push si 0 0000FA75 57 push di 5741 0 0000FA76 FF36[0000] push word [errret] 0 0000FA7A FF36[0000] push word [throwret] 0 0000FA7E FF36[0000] push word [throwsp] 5745 0 0000FA82 55 push bp 5747 0 0000FA83 C706[0000][9426] mov word [errret], .err_ret 0 0000FA89 C706[0000][9426] mov word [throwret], .err_ret 0 0000FA8F 8926[0000] mov word [throwsp], sp 5751 5752 ; bx -> load_input_file structure 0 0000FA93 E86FFD call yy_boot_get.bx 5754 0 0000FA96 E89BFD call guard_auxbuff_return 0 0000FA99 7303E9FF01 jc .error 0 0000FA9E FF46E8 inc word [bp + ?did_guard_auxbuff] 5758 0 0000FAA1 B8FFFF mov ax, -1 0 0000FAA4 A3[F601] mov word [load_data - LOADDATA2 + lsvFATSector + 2], ax 0 0000FAA7 A3[F401] mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 0 0000FAAA 800E[E701]04 setopt [load_ldflags], ldfFATBuffered 5763 0 0000FAAF 85C9 test cx, cx 0 0000FAB1 7975 jns .plus 5766 0 0000FAB3 8B36[CE01] mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 0 0000FAB7 8B3E[CC01] mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000FABB A1[0B02] mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000FABE F726[E801] mul word [load_data - LOADDATA2 + ldClusterSize] 5771 0 0000FAC2 8946F4 mov word [bp + ?bytes_per_cluster], ax 0 0000FAC5 8956F6 mov word [bp + ?bytes_per_cluster + 2], dx 0 0000FAC8 83E801 sub ax, 1 0 0000FACB 83DA00 sbb dx, 0 0 0000FACE F7D0 not ax 0 0000FAD0 F7D2 not dx 5778 0 0000FAD2 56 push si 0 0000FAD3 57 push di 5781 0 0000FAD4 21D6 and si, dx 0 0000FAD6 21C7 and di, ax ; start seek of current cluster 5784 0 0000FAD8 58 pop ax 0 0000FAD9 5A pop dx ; current seek 5787 0 0000FADA 0346EC add ax, word [bp + ?seek_distance] 0 0000FADD 1356EE adc dx, word [bp + ?seek_distance + 2] 0 0000FAE0 7203E9B801 jnc .error ; target seek 5791 5792 ; if the cluster is invalid, need to reset 0 0000FAE5 813E[CA01]FF0F cmp word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 0 0000FAEB 7207 jb @F 0 0000FAED 833E[C801]F8 cmp word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 0 0000FAF2 7308 jae .minus_reset 5797 @@: 5798 0 0000FAF4 39F2 cmp dx, si ; is target seek 5800 ; >= start seek of current cluster? 0 0000FAF6 7502 jne @F 0 0000FAF8 39F8 cmp ax, di 5803 @@: 0 0000FAFA 7322 jae .minus_simple ; yes, simple --> 5805 5806 .minus_reset: 5807 ; reset current cluster to first, seek to 0 0 0000FAFC FF36[F201] push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 0 0000FB00 FF36[F001] push word [load_data - LOADDATA2 + lsvFirstCluster] 0 0000FB04 8F06[C801] pop word [load_data - LOADDATA2 + ldCurrentCluster] 0 0000FB08 8F06[CA01] pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 0 0000FB0C 8326[CC01]00 and word [load_data - LOADDATA2 + ldCurrentSeek], 0 0 0000FB11 8326[CE01]00 and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 5814 5815 ; set distance 0 0000FB16 8946EC mov word [bp + ?seek_distance], ax 0 0000FB19 8956EE mov word [bp + ?seek_distance + 2], dx 5818 ; use positive seek code 0 0000FB1C EB0A jmp .plus 5820 5821 .minus_simple: 5822 ; just set seek, current cluster still valid 0 0000FB1E A3[CC01] mov word [load_data - LOADDATA2 + ldCurrentSeek], ax 0 0000FB21 8916[CE01] mov word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 0 0000FB25 E97501 jmp .return 5826 5827 .plus: 0 0000FB28 8B16[C601] mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 0 0000FB2C A1[C401] mov ax, word [load_data - LOADDATA2 + ldFileSize] 5830 0 0000FB2F 2B06[CC01] sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000FB33 1B16[CE01] sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5833 0 0000FB37 720A jc .eof 5835 ; dx:ax = how far we can seek within file 0 0000FB39 3B56EE cmp dx, word [bp + ?seek_distance + 2] 0 0000FB3C 7503 jne @F 0 0000FB3E 3B46EC cmp ax, word [bp + ?seek_distance] 5839 @@: 0 0000FB41 771D ja .not_eof 5841 .eof: 0 0000FB43 8B46EC mov ax, word [bp + ?seek_distance] 0 0000FB46 8B56EE mov dx, word [bp + ?seek_distance + 2] 0 0000FB49 0106[CC01] add word [load_data - LOADDATA2 + ldCurrentSeek], ax 0 0000FB4D 1116[CE01] adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 0 0000FB51 C706[C801]F8FF mov word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 0 0000FB57 C706[CA01]FF0F mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 0 0000FB5D E93D01 jmp .return 5849 5850 .not_eof: 0 0000FB60 8B4EEC mov cx, word [bp + ?seek_distance] 0 0000FB63 8B5EEE mov bx, word [bp + ?seek_distance + 2] 0 0000FB66 85DB test bx, bx 0 0000FB68 7507 jnz @F 0 0000FB6A 85C9 test cx, cx 0 0000FB6C 7503E92C01 jz .return 5857 @@: 0 0000FB71 894EFC mov word [bp + ?length], cx 0 0000FB74 895EFE mov word [bp + ?length + 2], bx 5860 5861 ; bx:cx = length 5862 .next_cluster: 0 0000FB77 8B36[CE01] mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 0 0000FB7B 8B3E[CC01] mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000FB7F A1[0B02] mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000FB82 F726[E801] mul word [load_data - LOADDATA2 + ldClusterSize] 5867 0 0000FB86 8946F4 mov word [bp + ?bytes_per_cluster], ax 0 0000FB89 8956F6 mov word [bp + ?bytes_per_cluster + 2], dx 0 0000FB8C 83E801 sub ax, 1 0 0000FB8F 83DA00 sbb dx, 0 0 0000FB92 21D6 and si, dx 0 0000FB94 21C7 and di, ax ; how far are we into cluster 5874 0 0000FB96 897EF0 mov word [bp + ?how_far_in_cluster], di 0 0000FB99 8976F2 mov word [bp + ?how_far_in_cluster + 2], si 5877 0 0000FB9C F7DE neg si 0 0000FB9E F7DF neg di 0 0000FBA0 83DE00 sbb si, byte 0 ; neg si:di 5881 0 0000FBA3 037EF4 add di, word [bp + ?bytes_per_cluster] 0 0000FBA6 1376F6 adc si, word [bp + ?bytes_per_cluster + 2] 5884 ; cluster size - how far we are 5885 ; = how much to read from this cluster 0 0000FBA9 39DE cmp si, bx 0 0000FBAB 7502 jne @F 0 0000FBAD 39CF cmp di, cx 5889 @@: 0 0000FBAF 7304 jae .use_count_2 0 0000FBB1 89F9 mov cx, di 0 0000FBB3 89F3 mov bx, si 5893 .use_count_2: 5894 ; bx:cx = how far to seek in this cluster 0 0000FBB5 894EF8 mov word [bp + ?length_this_cluster], cx 0 0000FBB8 895EFA mov word [bp + ?length_this_cluster + 2], bx 5897 5898 .next_sector: 0 0000FBBB A1[C801] mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 0 0000FBBE 8B16[CA01] mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 0 0000FBC2 E8A2F2 call check_clust 0 0000FBC5 7303E9D300 jc .error 0 0000FBCA 8B1E[0B02] mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 0 0000FBCE 8B7EF0 mov di, word [bp + ?how_far_in_cluster] 0 0000FBD1 8B76F2 mov si, word [bp + ?how_far_in_cluster + 2] 5906 0 0000FBD4 87D6 xchg dx, si 0 0000FBD6 97 xchg ax, di 0 0000FBD7 F7F3 div bx 5910 ; dx = byte offset into sector 5911 ; ax = sector offset into cluster's data 0 0000FBD9 87D6 xchg dx, si 0 0000FBDB 97 xchg ax, di 5914 ; si = byte offset 5915 0 0000FBDC 89F1 mov cx, si ; = byte offset 0 0000FBDE F7D9 neg cx ; - byte offset 0 0000FBE0 01D9 add cx, bx ; sector size - byte offset 5919 ; = length this sector 0 0000FBE2 837EFA00 cmp word [bp + ?length_this_cluster + 2], 0 0 0000FBE6 7508 jne @F ; fill remaining sector size 0 0000FBE8 3B4EF8 cmp cx, word [bp + ?length_this_cluster] 0 0000FBEB 7603 jbe @F ; sector has less than requested --> 0 0000FBED 8B4EF8 mov cx, word [bp + ?length_this_cluster] 5925 ; fill entire remaining request 5926 @@: 0 0000FBF0 294EF8 sub word [bp + ?length_this_cluster], cx 0 0000FBF3 835EFA00 sbb word [bp + ?length_this_cluster + 2], 0 0 0000FBF7 294EFC sub word [bp + ?length], cx 0 0000FBFA 835EFE00 sbb word [bp + ?length + 2], 0 0 0000FBFE 010E[CC01] add word [load_data - LOADDATA2 + ldCurrentSeek], cx 0 0000FC02 8316[CE01]00 adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 0 0000FC07 014EF0 add word [bp + ?how_far_in_cluster], cx 0 0000FC0A 8356F200 adc word [bp + ?how_far_in_cluster + 2], 0 5935 0 0000FC0E 837EFA00 cmp word [bp + ?length_this_cluster + 2], 0 0 0000FC12 75A7 jne .next_sector 0 0000FC14 837EF800 cmp word [bp + ?length_this_cluster], 0 0 0000FC18 75A1 jne .next_sector 5940 0 0000FC1A 8B7EF4 mov di, word [bp + ?bytes_per_cluster] 0 0000FC1D 8B76F6 mov si, word [bp + ?bytes_per_cluster + 2] 0 0000FC20 397EF0 cmp word [bp + ?how_far_in_cluster], di 0 0000FC23 7505 jne @F 0 0000FC25 3976F2 cmp word [bp + ?how_far_in_cluster + 2], si 0 0000FC28 740E je @FF 5947 @@: 0 0000FC2A 837EFE00 cmp word [bp + ?length + 2], 0 0 0000FC2E 756D jne .error 0 0000FC30 837EFC00 cmp word [bp + ?length], 0 0 0000FC34 7567 jne .error 0 0000FC36 EB65 jmp .return 5953 5954 @@: 0 0000FC38 A1[C801] mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 0 0000FC3B 8B16[CA01] mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 0 0000FC3F E825F2 call check_clust 0 0000FC42 7259 jc .error 0 0000FC44 E822F1 call clust_next.dxax 0 0000FC47 732F jnc @F ; (NC) --> 0 0000FC49 B8F6FF mov ax, 0FFF8h - 2 0 0000FC4C BAFF0F mov dx, 0FFFh 0 0000FC4F 8B3E[CC01] mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 0 0000FC53 8B36[CE01] mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 0 0000FC57 3B36[C601] cmp si, word [load_data - LOADDATA2 + ldFileSize + 2] 0 0000FC5B 7506 jne .set_error 0 0000FC5D 3B3E[C401] cmp di, word [load_data - LOADDATA2 + ldFileSize] 0 0000FC61 7401 je .do_not_set_error ; if same then NC --> 5969 .set_error: 0 0000FC63 F9 stc 5971 .do_not_set_error: 0 0000FC64 9C pushf 0 0000FC65 31C9 xor cx, cx 0 0000FC67 31DB xor bx, bx 0 0000FC69 874EFC xchg cx, word [bp + ?length] 0 0000FC6C 875EFE xchg bx, word [bp + ?length + 2] 0 0000FC6F 010E[CC01] add word [load_data - LOADDATA2 + ldCurrentSeek], cx 0 0000FC73 111E[CE01] adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], bx 0 0000FC77 A8 db __TEST_IMM8 ; (skip pushf) 5980 @@: 0 0000FC78 9C pushf 0 0000FC79 83C002 add ax, 2 0 0000FC7C 83D200 adc dx, 0 0 0000FC7F A3[C801] mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 0 0000FC82 8916[CA01] mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 0 0000FC86 9D popf ; CF 0 0000FC87 7214 jc .error 0 0000FC89 8B4EFC mov cx, word [bp + ?length] 0 0000FC8C 8B5EFE mov bx, word [bp + ?length + 2] 0 0000FC8F 85DB test bx, bx 0 0000FC91 7403E9E1FE jnz .next_cluster 0 0000FC96 85C9 test cx, cx 0 0000FC98 7403E9DAFE jnz .next_cluster 5994 .return: 5995 .error: 5996 0 0000FC9D 5D pop bp 5998 0 0000FC9E 8F06[0000] pop word [throwsp] 0 0000FCA2 8F06[0000] pop word [throwret] ; restore throw destination 0 0000FCA6 8F06[0000] pop word [errret] 6002 0 0000FCAA 9C pushf 0 0000FCAB F646E801 testopt [bp + ?did_guard_auxbuff], 1 0 0000FCAF 7405 jz @F 0 0000FCB1 8026[0300]EF clropt [internalflags3], dif3_auxbuff_guarded_1 6007 @@: 0 0000FCB6 8026[E701]FB clropt [load_ldflags], ldfFATBuffered 0 0000FCBB 9D popf ; CF 6010 0 0000FCBC 8B5EEA mov bx, word [bp + ?load_input_file_structure] 6012 ; bx -> load_input_file structure 0 0000FCBF E852FB call yy_boot_update.bx 6014 0 0000FCC2 5F pop di 0 0000FCC3 5E pop si 0 0000FCC4 89EC5D lleave 0 0000FCC7 C3 retn 6019 6020 .err_ret: 0 0000FCC8 8B26[0000] mov sp, word [throwsp] ; restore stack 6022 ; (needed here if returned to errret) 0 0000FCCC EBCF jmp .error 6024 6025 6026 ; INP: [load_input_file] = active file 6027 ; cx:dx = 0 6028 ; OUT: - 6029 ; CHG: ax, bx, cx, dx 6030 ; STT: ds = es = ss 6031 %if _INPUT_FILE_BOOT 6032 yy_boot_seek_start: 0 0000FCCE E854FB call yy_calculate_structure 6034 6035 ; INP: bx -> data 6036 ; CHG: ax 6037 .bx: section_of_function yy_boot_seek_start 6038 %else 6039 yy_boot_seek_start.bx: section_of_function 6040 %endif 0 0000FCD1 56 push si 0 0000FCD2 57 push di 6043 6044 ; bx -> load_input_file structure 0 0000FCD3 E82FFB call yy_boot_get.bx 6046 6047 .reset: 6048 ; reset current cluster to first, seek to 0 0 0000FCD6 FF36[F201] push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 0 0000FCDA FF36[F001] push word [load_data - LOADDATA2 + lsvFirstCluster] 0 0000FCDE 8F06[C801] pop word [load_data - LOADDATA2 + ldCurrentCluster] 0 0000FCE2 8F06[CA01] pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 0 0000FCE6 8326[CC01]00 and word [load_data - LOADDATA2 + ldCurrentSeek], 0 0 0000FCEB 8326[CE01]00 and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 6055 6056 ; bx -> load_input_file structure 0 0000FCF0 E821FB call yy_boot_update.bx 6058 0 0000FCF3 5F pop di 0 0000FCF4 5E pop si 0 0000FCF5 C3 retn 6062 %endif 6063 6064 6065 ; INP: bp = load_data - LOADDATA2 6066 initialise_fs: 6067 ; (boot.asm code starts here) 6068 0 0000FCF6 31C0 xor ax, ax 6070 ; calculate some values that we need: 6071 ; adjusted sectors per cluster (store in a word, 6072 ; and decode EDR-DOS's special value 0 meaning 256) 0 0000FCF8 8A460D mov al, [bp + bsBPB + bpbSectorsPerCluster] 0 0000FCFB FEC8 dec al 0 0000FCFD 40 inc ax 0 0000FCFE 8946E8 mov [bp + ldClusterSize], ax 6077 0 0000FD01 8B46D4 mov ax, [bp + ldEntriesPerSector] 6079 6080 ; number of sectors used for root directory (store in CX) 0 0000FD04 31D2 xor dx, dx 0 0000FD06 89C3 mov bx, ax 0 0000FD08 48 dec ax ; rounding up 0 0000FD09 034611 add ax, [bp + bsBPB + bpbNumRootDirEnts] ; (0 iff FAT32) 0 0000FD0C 11D2 adc dx, dx ; account for overflow (dx was zero) 0 0000FD0E F7F3 div bx ; get number of root sectors 0 0000FD10 91 xchg ax, cx ; cx = number of root secs 6088 6089 6090 ; (iniload.asm code starts here) 6091 0 0000FD11 51 push cx ; number of root secs 0 0000FD12 31C0 xor ax, ax 6094 ; first sector of root directory 0 0000FD14 8A4610 mov al, [bp + bsBPB + bpbNumFATs] ; ! ah = 0, hence ax = number of FATs 0 0000FD17 8B4E16 mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 0 0000FD1A 31FF xor di, di ; di:cx = sectors per FAT 6098 ; iff FAT12, FAT16 0 0000FD1C 85C9 test cx, cx ; is FAT32 ? 0 0000FD1E 7506 jnz @F ; no --> 0 0000FD20 8B4E24 mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 0 0000FD23 8B7E26 mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 6103 @@: 0 0000FD26 50 push ax 0 0000FD27 F7E1 mul cx 6106 ; ax = low word SpF*nF 6107 ; dx = high word 0 0000FD29 93 xchg bx, ax 0 0000FD2A 87CA xchg cx, dx 6110 ; cx:bx = first mul 0 0000FD2C 58 pop ax 0 0000FD2D F7E7 mul di 6113 ; ax = high word adjust 6114 ; dx = third word 0 0000FD2F 85D2 test dx, dx 0 0000FD31 740C jz @F 6117 .error_badchain: 6118 error_badchain: equ $ 0 0000FD33 BA[0000] mov dx, msg.boot_badchain 0 0000FD36 B80D02 mov ax, 020Dh 0 0000FD39 E8[0000] call setrc 0 0000FD3C E965DE jmp bootcmd.fail 6123 6124 @@: 0 0000FD3F 92 xchg dx, ax 6126 ; dx = high word adjust 0 0000FD40 01CA add dx, cx 6128 ; dx:bx = result 0 0000FD42 93 xchg ax, bx 6130 ; dx:ax = result 0 0000FD43 72EE jc .error_badchain 6132 0 0000FD45 03460E add ax, [bp + bsBPB + bpbReservedSectors] 0 0000FD48 83D200 adc dx, byte 0 0 0000FD4B 72E6 jc .error_badchain 6136 0 0000FD4D 59 pop cx ; number of root sectors 0 0000FD4E 31FF xor di, di 6139 6140 ; first sector of disk data area: 0 0000FD50 01C1 add cx, ax 0 0000FD52 11D7 adc di, dx 0 0000FD54 72DD jc .error_badchain 0 0000FD56 894EFC mov [bp + lsvDataStart], cx 0 0000FD59 897EFE mov [bp + lsvDataStart + 2], di 6146 0 0000FD5C 8946D0 mov [bp + ldRootSector], ax 0 0000FD5F 8956D2 mov [bp + ldRootSector + 2], dx 6149 6150 ; total sectors 0 0000FD62 31D2 xor dx, dx 0 0000FD64 8B4613 mov ax, [bp + bsBPB + bpbTotalSectors] 0 0000FD67 85C0 test ax, ax 0 0000FD69 7506 jnz @F 0 0000FD6B 8B5622 mov dx, [bp + bsBPB + bpbTotalSectorsLarge + 2] 0 0000FD6E 8B4620 mov ax, [bp + bsBPB + bpbTotalSectorsLarge] 6157 6158 ; fall through and let it overwrite the field with the 6159 ; already current contents. saves a jump. 6160 @@: 0 0000FD71 895622 mov [bp + bsBPB + bpbTotalSectorsLarge + 2], dx 0 0000FD74 894620 mov [bp + bsBPB + bpbTotalSectorsLarge], ax 6163 6164 ; dx:ax = total sectors 6165 0 0000FD77 8B5E16 mov bx, [bp + bsBPB + bpbSectorsPerFAT] 0 0000FD7A C646E620 mov byte [bp + ldFATType], 32 0 0000FD7E 85DB test bx, bx 0 0000FD80 740B jz @F 6170 0 0000FD82 31C9 xor cx, cx 6172 0 0000FD84 895E24 mov word [bp + bsBPB + ebpbSectorsPerFATLarge], bx 0 0000FD87 894E26 mov word [bp + bsBPB + ebpbSectorsPerFATLarge + 2], cx 0 0000FD8A 894E28 mov word [bp + bsBPB + ebpbFSFlags], cx 6176 ; FSVersion, RootCluster, FSINFOSector, BackupSector, Reserved: 6177 ; uninitialised here (initialised by loaded_all later) 6178 6179 @@: 6180 ; dx:ax = total amount of sectors 0 0000FD8D 2B46FC sub ax, word [bp + lsvDataStart] 0 0000FD90 1B56FE sbb dx, word [bp + lsvDataStart + 2] 6183 6184 ; dx:ax = total amount of data sectors 0 0000FD93 89C3 mov bx, ax 0 0000FD95 92 xchg ax, dx 0 0000FD96 31D2 xor dx, dx 0 0000FD98 F776E8 div word [bp + ldClusterSize] 0 0000FD9B 93 xchg bx, ax 0 0000FD9C F776E8 div word [bp + ldClusterSize] 6191 ; bx:ax = quotient, dx = remainder 6192 ; bx:ax = number of clusters 0 0000FD9F 85DB test bx, bx 0 0000FDA1 741F jz @FF 6195 ; >= 1_0000h clusters, should be FAT32 0 0000FDA3 81FBFF0F cmp bx, 0FFFh 0 0000FDA7 770D ja .badclusters 0 0000FDA9 7505 jne @F 0 0000FDAB 83F8F5 cmp ax, 0FFF7h - 2 0 0000FDAE 7706 ja .badclusters 6201 @@: 6202 ; check it is really FAT32 0 0000FDB0 837E1600 cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 0 0000FDB4 7447 je .gotfattype 6205 6206 .badclusters: 0 0000FDB6 BA[0000] mov dx, msg.boot_badclusters 0 0000FDB9 B80E02 mov ax, 020Eh 0 0000FDBC E8[0000] call setrc 0 0000FDBF E9E2DD jmp bootcmd.fail 6211 6212 @@: 6213 ; <= FFFFh clusters, may be FAT12 or FAT16 (or small FAT32) 6214 ; check if it is small FAT32 0 0000FDC2 837E1600 cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 0 0000FDC6 7435 je .gotfattype 6217 0 0000FDC8 83F8F5 cmp ax, 0FFF7h - 2 ; too much for FAT16 ? 0 0000FDCB 77E9 ja .badclusters 0 0000FDCD C646E610 mov byte [bp + ldFATType], 16 0 0000FDD1 3DF50F cmp ax, 0FF7h - 2 ; is it FAT12 ? 0 0000FDD4 7727 ja .gotfattype ; no, is FAT16 --> 6223 0 0000FDD6 C646E60C mov byte [bp + ldFATType], 12 6225 0 0000FDDA F606[E701]02 testopt [load_ldflags], ldfFATInvalid 0 0000FDDF 751C jnz .gotfattype 6228 0 0000FDE1 53 push bx 0 0000FDE2 50 push ax 6231 ; (boot.asm code continues here) 6232 6233 ; Load the entire FAT into memory. This is easily feasible for FAT12, 6234 ; as the FAT can only contain at most 4096 entries. 6235 ; (The exact condition should be "at most 4087 entries", or with a 6236 ; specific FF7h semantic, "at most 4088 entries"; the more reliable 6237 ; and portable alternative would be "at most 4080 entries".) 6238 ; Thus, no more than 6 KiB need to be read, even though the FAT size 6239 ; as indicated by word[sectors_per_fat] could be much higher. The 6240 ; first loop condition below is to correctly handle the latter case. 6241 ; (Sector size is assumed to be a power of two between 32 and 8192 6242 ; bytes, inclusive. An 8 KiB buffer is necessary if the sector size 6243 ; is 4 or 8 KiB, because reading the FAT can or will write to 8 KiB 6244 ; of memory instead of only the relevant 6 KiB. This is always true 6245 ; if the sector size is 8 KiB, and with 4 KiB sector size it is true 6246 ; iff word[sectors_per_fat] is higher than one.) 0 0000FDE3 BF0018 mov di, 6 << 10 ; maximum size of FAT12 to load 0 0000FDE6 8B4E16 mov cx, [bp + bsBPB + bpbSectorsPerFAT] 6249 ; maximum size of this FS's FAT 0 0000FDE9 31D2 xor dx, dx 0 0000FDEB 8B460E mov ax, [bp + bsBPB + bpbReservedSectors]; = first FAT sector 0 0000FDEE 8B5EF8 mov bx, [bp + lsvFATSeg] 6253 @@: 0 0000FDF1 E837F4 call read_sector ; read next FAT sector 0 0000FDF4 2B7E0B sub di, [bp + bsBPB + bpbBytesPerSector] 6256 ; di = bytes still left to read 0 0000FDF7 7602 jbe @F ; if none --> 6258 ; (jbe means jump if CF || ZF) 0 0000FDF9 E2F6 loop @B ; if any FAT sector still remains --> 6260 @@: ; one of the limits reached; FAT read 0 0000FDFB 58 pop ax 0 0000FDFC 5B pop bx 6263 6264 .gotfattype: 6265 6266 ; if bx:ax = 1, then entries 0, 1, 2 are valid 0 0000FDFD 83C001 add ax, 1 0 0000FE00 83D300 adc bx, 0 6269 ; max entry is x+1 (2 if x=1) 6270 0 0000FE03 8946C0 mov word [bp + ldMaxCluster], ax 0 0000FE06 895EC2 mov word [bp + ldMaxCluster + 2], bx 6273 6274 ; if bx:ax was = 1, then entries below 3 have to exist 0 0000FE09 83C001 add ax, 1 0 0000FE0C 83D300 adc bx, 0 6277 ; if bx:ax was 1, bx:ax now = 3 6278 0 0000FE0F 89DA mov dx, bx 6280 0 0000FE11 807EE610 cmp byte [bp + ldFATType], 16 0 0000FE15 720C jb .check_fat_limit_12 0 0000FE17 7404 je .check_fat_limit_16 6284 .check_fat_limit_32: 0 0000FE19 01C0 add ax, ax 0 0000FE1B 11D2 adc dx, dx 6287 .check_fat_limit_16: 0 0000FE1D 01C0 add ax, ax 0 0000FE1F 11D2 adc dx, dx 0 0000FE21 EB0D jmp @F 6291 6292 .check_fat_limit_12: 0 0000FE23 89C2 mov dx, ax 0 0000FE25 01C0 add ax, ax 0 0000FE27 01D0 add ax, dx ; * 3 0 0000FE29 D1E8 shr ax, 1 ; * 3 / 2 = * 1.5 0 0000FE2B 83D000 adc ax, 0 ; if the last nybble is needed 0 0000FE2E 31D2 xor dx, dx 6299 6300 @@: 0 0000FE30 8B5E0B mov bx, word [bp + bsBPB + bpbBytesPerSector] 0 0000FE33 4B dec bx 0 0000FE34 01D8 add ax, bx 0 0000FE36 83D200 adc dx, 0 0 0000FE39 43 inc bx 6306 0 0000FE3A 91 xchg cx, ax 0 0000FE3B 89D0 mov ax, dx 0 0000FE3D 31D2 xor dx, dx 0 0000FE3F F7F3 div bx 0 0000FE41 91 xchg cx, ax 0 0000FE42 F7F3 div bx 0 0000FE44 87CA xchg cx, dx 6314 ; cx = remainder, dx:ax = number of sectors needed 6315 0 0000FE46 8B4E16 mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 0 0000FE49 31FF xor di, di ; di:cx = sectors per FAT 6318 ; iff FAT12, FAT16 0 0000FE4B 85C9 test cx, cx ; is FAT32 ? 0 0000FE4D 7506 jnz @F ; no --> 0 0000FE4F 8B4E24 mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 0 0000FE52 8B7E26 mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 6323 @@: 6324 0 0000FE55 39D7 cmp di, dx 0 0000FE57 7502 jne @F 0 0000FE59 39C1 cmp cx, ax 6328 @@: 0 0000FE5B 730C jae @F 6330 .badfat: 0 0000FE5D BA[0000] mov dx, msg.boot_badfat 0 0000FE60 B80F02 mov ax, 020Fh 0 0000FE63 E8[0000] call setrc 0 0000FE66 E93BDD jmp bootcmd.fail 6335 6336 @@: 0 0000FE69 C3 retn 6338 6339 6340 %if _INPUT_FILE_BOOT 6341 yy_boot_clear_remember_seek: 0 0000FE6A 50 push ax 0 0000FE6B A1[2005] mov ax, word [load_input_file.active] 0 0000FE6E 3906[0000] cmp word [boot_remember_seek_handle], ax 0 0000FE72 750F jne .ret_pop_ax 6346 .clear: 0 0000FE74 830E[0000]FF or word [boot_remember_seek_handle], -1 0 0000FE79 8326[0200]00 and word [boot_remember_seek_offset + 2], 0 0 0000FE7E 8326[0000]00 and word [boot_remember_seek_offset], 0 6350 .ret_pop_ax: 0 0000FE83 58 pop ax 0 0000FE84 C3 retn 6353 6354 6355 yy_boot_remember_seek: 0 0000FE85 50 push ax 0 0000FE86 A1[2005] mov ax, word [load_input_file.active] 0 0000FE89 3906[0000] cmp word [boot_remember_seek_handle], ax 0 0000FE8D 75F4 jne yy_boot_clear_remember_seek.ret_pop_ax 6360 0 0000FE8F 53 push bx 0 0000FE90 51 push cx 0 0000FE91 52 push dx 0 0000FE92 8B0E[0200] mov cx, word [boot_remember_seek_offset + 2] 0 0000FE96 8B16[0000] mov dx, word [boot_remember_seek_offset] 0 0000FE9A E8C8FB call yy_boot_seek_current 0 0000FE9D 5A pop dx 0 0000FE9E 59 pop cx 0 0000FE9F 5B pop bx 0 0000FEA0 EBD2 jmp yy_boot_clear_remember_seek.clear 6371 %endif 6372 6373 %if _LINK && !_BOOTLDR_DISCARD 6374 behind_code_truncated: 6375 %endif 6376 6377 %endif === Trace listing source: ../lst/csx.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 VERSIONMAC 1 <1> %define _VERSION " (2026-09-22)" 20 %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=009D80h -> "MESSAGESEGMENT" 86 ------------------ <1> note: usesection MESSAGESEGMENT === Switch to base=00F6D0h -> "LDEBUG_CODE" 86 ------------------ <1> note: usesection lDEBUG_CODE === Switch to base=01F580h -> "LDEBUG_CODE2" 86 ------------------ <1> note: usesection lDEBUG_CODE2 === Switch to base=0250E0h -> "INIT" 86 ------------------ <1> note: usesection INIT === Switch to base=0250E0h -> "WLEMITALIGNINITEND" 86 ------------------ <1> note: usesection WLEMITALIGNINITEND === Switch to base=029330h -> "DEVICESHIM" 86 ------------------ <1> note: usesection DEVICESHIM === Switch to base=029360h -> "WLEMITALIGNRELOCZERO" 86 ------------------ <1> note: usesection WLEMITALIGNRELOCZERO 68 <2> %endif 69 <2> 70 <2> 71 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 71 ------------------ <2> note: usesection lDEBUG_CODE 72 <2> section_of puts, trimputs, puts_ext_done, puts_ext_next 73 <2> section_of putsz_exthelp, code_retf 74 <2> section_of puts_getline_ext_done 75 <2> section_of puts_copyoutput_ext_done 76 <2> section_of guard_auxbuff, guard_re 77 <2> section_of handle_serial_flags_ctrl_c 78 <2> section_of hexword_high 79 <2> section_of call_int2D 80 <2> section_of copy_single_counted_string 81 <2> section_of intchk 82 <2> section_of IsIISPEntry? 83 <2> section_of dd_store 84 <2> section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 85 <2> section_of peekc, getc, prephack, readmem, setds2si, setds2bx, setes2dx 86 <2> section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 87 <2> section_of setrmlimit, skipcomm0, unhack 88 <2> section_of skipequals 89 <2> section_of to_errret_pop 90 <2> section_of cmd3.have_cx_convenience 91 <2> section_of verifysegm, verifysegm_or_error 92 <2> section_of pp16, resetmode, resetmode_and_test_d_b_bit 93 <2> section_of pp_fix32bitflags, proceedbreakpoint 94 <2> section_of putsz, hexword, skipcomma, cmd3, cmd3_not_ext, cmd3_preprocessed 95 <2> section_of hexdword 96 <2> section_of cmd3_not_inject, cmd3_injected 97 <2> section_of aa_not_inject, aa_injected, aa_before_getline, aa_after_getline 98 <2> section_of transfer_ext_cx_nearcall_from_code2 99 <2> section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 100 <2> section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 101 <2> section_of ia_restore_ds 102 <2> %ifn _SYMBOLIC 103 <2> section_of selector_to_segment 104 <2> %endif 105 <2> section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 106 <2> section_of disp_dxax_times_cx_width_bx_size 107 <2> section_of disp_dxax_times_cx_width_bx_size.store 108 <2> section_of disp_message, disp_message_length_cx 109 <2> section_of ispm 110 <2> section_of setrc, error 111 <2> section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 112 <2> section_of intcall_ext_return_es, close_ext, doscall_extseg 113 <2> section_of yy_reset_buf 114 <2> section_of init_bootcmd 115 <2> 116 <2> section_of InDOS, bootgetmemorysize 117 <2> section_of chkeol, decword, decdword 118 <2> section_of dec_dword_minwidth 119 <2> section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 120 <2> section_of getlinearaddr 121 <2> section_of getlinear_d_b 122 <2> section_of getlinear_high_limit 123 <2> section_of getlinear_32bit 124 <2> section_of getlinear_high_limit.do_not_use_test 125 <2> section_of getlinear_common 126 <2> section_of ifsep, iseol?, isseparator?, isstring?, movp 127 <2> section_of putc, putsline, putsline_crlf, putsz_error 128 <2> section_of setrmsegm 129 <2> section_of skipwh0, skipwhite 130 <2> section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 131 <2> section_of capitalise 132 <2> section_of setes2ax 133 <2> section_of zz_copy_strings_to_str_buffer 134 <2> section_of call_xms_move, zz_call_xms, zz_detect_xms 135 <2> section_of code2_to_code_ret_to_ext 136 <2> section_of yy_dos_parse_name, yy_open_file, yy_check_lfn 137 <2> section_of yy_common_parse_name 138 <2> section_of yy_common_parse_name_bx_buffer 139 <2> section_of retry_open_scriptspath 140 <2> section_of yy_boot_read.bx, yy_boot_seek_start.bx, yy_boot_seek_current.bx 141 <2> section_of yy_boot_parse_name, yy_boot_open_file 142 <2> section_of yy_boot_parse_name_bx_buffer 143 <2> section_of near_transfer_ext_return, scan_dir_aux, read_sector 144 <2> section_of yy_boot_init_dir, got_yyentry, scan_dir_entry 145 <2> section_of ..@yy_filename_empty, boot_parse_fn 146 <2> section_of count_store, count_store.maybe_0 147 <2> section_of loader_get_resident_address, loader_prepare_resident 148 <2> section_of call_comlevel_bx_ax 149 <2> section_of resetrc 150 <2> section_of push_if, pop_if 151 <2> section_of intcall_return_parameter_es_parameter_ds, intcall 152 <2> 153 <2> %if _SYMBOLIC && _DUALCODE && _SYMBOLSASMDUALCODE 154 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 154 ------------------ <2> note: usesection lDEBUG_CODE2 155 <2> %else 156 <2> usesection lDEBUG_CODE 157 <2> %endif 158 <2> section_of bxcx_to_cx_paragraphs 159 <2> section_of zz_list_symbol.first, zz_list_symbol.subsequent 160 <2> section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 161 <2> section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 162 <2> section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 163 <2> section_of zz_get_literal, zz_restore_strat, zz_save_strat 164 <2> section_of zz_switch_s, zz_transfer_buffer 165 <2> 166 <2> 167 <2> %if _SYMBOLIC 168 <2> %if _DUALCODE && _SYMBOLICDUALCODE 169 <2> usesection lDEBUG_CODE2 169 ------------------ <2> note: usesection lDEBUG_CODE2 170 <2> %else 171 <2> usesection lDEBUG_CODE 172 <2> %endif 173 <2> section_of shift_left_4_bxcx 174 <2> section_of selector_to_segment 175 <2> 176 <2> section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 177 <2> section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 178 <2> section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 179 <2> section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 180 <2> section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 181 <2> section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 182 <2> section_of move_insert_farpointer.str.sidi 183 <2> section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 184 <2> section_of pointer_to_linear 185 <2> section_of save_slice_farpointer.hash, save_slice_farpointer.main 186 <2> section_of save_slice_farpointer.str 187 <2> section_of segment_to_selector 188 <2> section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 189 <2> 190 <2> section_of getfarpointer.main.xms 191 <2> section_of getfarpointer.hash.xms 192 <2> section_of getfarpointer.str.xms 193 <2> section_of move_insert_farpointer.str 194 <2> section_of move_insert_farpointer.main.xms.sidi 195 <2> section_of move_insert_farpointer.hash.xms.sidi 196 <2> section_of move_insert_farpointer.str.xms.sidi 197 <2> section_of save_slice_farpointer.main.xms 198 <2> section_of save_slice_farpointer.hash.xms 199 <2> section_of save_slice_farpointer.str.xms 200 <2> section_of move_delete_farpointer.main.sidi 201 <2> section_of move_delete_farpointer.main.xms.sidi 202 <2> section_of move_delete_farpointer.hash.xms.sidi 203 <2> section_of move_delete_farpointer.str.xms.sidi 204 <2> section_of zz_list_symbol 205 <2> 206 <2> section_of binsearchhash, binsearchmain 207 <2> section_of check_second_slice 208 <2> section_of disp_size_hash, disp_size_main, disp_size_str 209 <2> section_of displayresult, getstring1, getstring2 210 <2> section_of increment_ss_ref_count 211 <2> section_of list_sym_storage_usage, str_index_to_pointer 212 <2> section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 213 <2> section_of zz_compact_expand_check_xms 214 <2> section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 215 <2> section_of zz_delete_string, zz_expand, zz_expand_common 216 <2> section_of zz_get_symstr_length_bytes 217 <2> section_of zz_get_symstr_length_bytes.ssLength_in_cx 218 <2> section_of zz_get_symstr_length_indices 219 <2> section_of zz_get_symstr_length_indices.ssLength_in_cx 220 <2> section_of zz_hash, zz_hash.bx_init 221 <2> section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 222 <2> section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 223 <2> section_of zz_unlink_main_next 224 <2> %endif 225 <2> 226 <2> %if _DUALCODE 227 <2> usesection lDEBUG_CODE2 227 ------------------ <2> note: usesection lDEBUG_CODE2 228 <2> %else 229 <2> usesection lDEBUG_CODE 230 <2> %endif 231 <2> section_of FloatToStr 232 <2> 233 <2> usesection lDEBUG_CODE === Switch to base=00F6D0h -> "LDEBUG_CODE" 233 ------------------ <2> note: usesection lDEBUG_CODE 234 <2> section_of ..@hh_readmem 235 <2> 236 <2> usesection lDEBUG_CODE2 === Switch to base=01F580h -> "LDEBUG_CODE2" 236 ------------------ <2> note: usesection lDEBUG_CODE2 237 <2> section_of bu_relocated, immasm_relocated 238 <2> 239 <2> %if _DUALCODE && _EXPRDUALCODE 240 <2> usesection lDEBUG_CODE2 240 ------------------ <2> note: usesection lDEBUG_CODE2 241 <2> %else 242 <2> usesection lDEBUG_CODE 243 <2> %endif 244 <2> 245 <2> section_of getofsforbx, checkpointer, getrangeX 246 <2> section_of getrangeX_have_address_need_length 247 <2> section_of getrange, getaddr, getofsforbx_remember_bitness 248 <2> section_of remember_bitness, getaddr_taken 249 <2> section_of getstr, get_length, get_length_keyword 250 <2> section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 251 <2> section_of ..@call_operator_dispatchers 252 <2> section_of isseparator?, istype?, isunsignedtype? 253 <2> section_of handlesegment, handle3byte, handlebyte, handleword 254 <2> section_of handledword, handlepointer 255 <2> section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 256 <2> section_of uoh_not_bitwise, uoh_not_boolean 257 <2> section_of od_minus, od_plus, od_multiply, od_divide, od_modulo, od_retn 258 <2> section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 259 <2> section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 260 <2> section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 261 <2> section_of set_hhtype, of_divide, of_power 262 <2> section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 263 <2> section_of of_compare_equal, of_compare_above_equal, of_compare_above 264 <2> section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 265 <2> section_of of_shift_right, of_shift_right_signed, of_shift_left 266 <2> section_of of_helper_getshiftdata, of_bit_mirror 267 <2> section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 268 <2> section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 269 <2> section_of of_helper_retbool, of_helper_getbool 270 <2> 271 <2> section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 272 <2> section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 273 <2> section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 274 <2> section_of var_iok_setup, var_rhcount_setup 275 <2> section_of var_get_psp_segment, var_get_psp_selector 276 <2> section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 277 <2> section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 278 <2> section_of var_bootunitflags_setup 279 <2> 280 <2> section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 281 <2> section_of default_variable_setup 282 <2> section_of var_ext_setup 283 <2> section_of var_ext_setup_done 284 <2> 285 <2> section_of getstmmxdigit 286 <2> section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 287 <2> section_of of_cond, count_unary_operators, count_unary_operators_restrict 288 <2> section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 289 <2> section_of getnyb, get_value_range 290 <2> 291 <2> section_of getaddrX, getword, getdword, getexpression 292 <2> 293 <2> section_of getrangeX.lines, getrangeX.ecx_and_0_valid 294 <2> section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 295 <2> section_of getrangeX.lines_and_uu, getrange.lines_and_uu 296 <2> section_of isseparator?.except_L_or_dot, isvariable?.return_name 297 <2> section_of getword.checksignificantbits, getbyte.checksignificantbits 298 <2> 299 <2> section_of seg_bx_to_sel 300 <2> section_of getexpression.countsignificantbits 301 <2> section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 302 <2> section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 303 <2> section_of stack_check.internal 304 <2> section_of save_scratchsel, restore_scratchsel 305 <2> 306 <2> usesection INIT === Switch to base=0250E0h -> "INIT" 306 ------------------ <2> note: usesection INIT 307 <2> section_of init_capitalise 308 <2> section_of init_skipwhite, init_skipwh0 309 <2> section_of init_skipcomma, init_skipcomm0 310 <2> section_of init_skipequals 311 <2> 312 <2> 313 <2> usesection lDEBUG_DATA_ENTRY === Switch to base=000000h -> "LDEBUG_DATA_ENTRY" 313 ------------------ <2> note: usesection lDEBUG_DATA_ENTRY 314 <2> section_of entry_retn 315 <2> 316 <2> 317 <2> %if _LINK 318 <2> %include "extern.mac" 1 <3> [list -] 319 <2> %endif 714 <1> %endif 715 <1> [list -] 718 <1> 719 <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 00007DAA ???????? eldhSignature: resb 4 ; "ELD1" 0 00007DAE ?????? resb 3 ; reserved 0 00007DB1 ?? resb 1 ; 26 (Ctrl-Z) 0 00007DB2 ???????? eldhCodeOffset: resd 1 ; position displacement from eldhSignature 0 00007DB6 ???? eldhCodeImageLength: resw 1 ; amount bytes, at least 32 0 00007DB8 ???? eldhCodeAllocLength: resw 1 ; amount bytes, added to prior. sum < 64 KiB 0 00007DBA ???????? eldhDataOffset: resd 1 0 00007DBE ???? eldhDataImageLength: resw 1 ; (zero allowed) 0 00007DC0 ???? eldhDataAllocLength: resw 1 ; (zero allowed) 0 00007DC2 ???? eldhCodeEntrypoint: resw 1 ; within code section, used as displacement 0 00007DC4 ???????? eldhReserved: resb 4 ; reserved 0 00007DC8 ???? 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 00007DCA ???????? eldhxDescriptionOffset: resd 1 ; zero if none, from eldhxHeader. <= 128 Bytes 0 00007DCE ???????? eldhxHelpOffset: resd 1 ; zero if none, from eldhxHeader 0 00007DD2 ???????? eldhxLibTable: resd 1 ; zero if none, from eldhxHeader 0 00007DD6 ???????? eldhxDateTimeOffset: resd 1 ; zero if none, from eldhxHeader 43 <2> alignb 16 44 <2> endstruc 45 <2> 46 <2> struc ELD_TRAILER_HEADER 0 00007DAA ???????????????? eldthSignature: resb 8 ; "ELD1TAIL" 0 00007DB2 ???????? eldthHeaderOffset: resd 1 ; negative displacement from eldthSignature, 49 <2> ; add this dword to the seek offset 0 00007DB6 ???? eldthReserved: resw 1 ; reserved, must be initialised to zero 0 00007DB8 ???? 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 00007DAA ???? 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 00007DAC ???? eldltAmount: resw 1 0 00007DAE ???????? 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 00007DAA ???? eldiStartCode: resw 1 ; -> this structure itself (para aligned) 0 00007DAC ???? eldiEndCode: resw 1 ; -> behind memory used by instance (para aligned) 0 00007DAE ???? eldiStartData: resw 1 ; -> data in data entry section (para aligned), or 0 0 00007DB0 ???? eldiEndData: resw 1 ; -> behind data (para aligned), or 0 0 00007DB2 ???????????????? eldiIdentifier: resb 8 ; blank-filled text 0 00007DBA ???? 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 00007DAA ???? eldlSignature: resw 1 ; 0E1D1h 0 00007DAC ???? eldlEndOfTable: resw 1 ; previously reserved and all-zeroes, 86 <2> ; now holds eldlOld or eldlNewDual (or ...) 0 00007DAE ???? eldlReserved: resw 1 ; reserved and all-zeroes 0 00007DB0 ???? eldlUseLinkHash: resw 1 0 00007DB2 ???? eldlDataAmount: resw 1 0 00007DB4 ???? eldlDataPrefixes: resw 1 0 00007DB6 ???? eldlDataEntries: resw 1 0 00007DB8 ???? eldlDataAddresses: resw 1 0 00007DBA ???? eldlCodeAmount: resw 1 0 00007DBC ???? eldlCodePrefixes: resw 1 0 00007DBE ???? eldlCodeEntries: resw 1 0 00007DC0 ???? eldlCodeAddresses: resw 1 97 <2> eldlOld: 98 <2> 0 00007DC2 ???? eldlDualAmount: resw 1 0 00007DC4 ???? eldlDualPrefixes: resw 1 0 00007DC6 ???? eldlDualEntries: resw 1 0 00007DC8 ???? eldlDualAddresses: resw 1 103 <2> eldlNewDual: 104 <2> endstruc 105 <2> 106 <2> numdef ELD_CODE_VSTART, 9001h 107 <2> numdef ELD_DATA_VSTART, 8000h 108 <2> numdef ELD_RELOC_VSTART, 8000h 109 <2> 110 <2> numdef ELD_RECLAIM_HINT, 0 111 <2> strdef ELD_LISTING, "" 112 <2> numdef ELD_DATETIME, 0 113 <2> 114 <2> %if _ELD_DATETIME 115 <2> %define PUT_ELDHX_DATETIME_OFFSET at eldhxDateTimeOffset, dd DATAOFFSET + datetime - datastart 116 <2> %macro PUT_ELD_DATETIME 0.nolist 117 <2> datetime: asciz __UTC_DATE__,'T',__UTC_TIME__,'Z' 118 <2> asciz ; for future extension 119 <2> %endmacro 120 <2> %else 121 <2> %define PUT_ELDHX_DATETIME_OFFSET 122 <2> %define PUT_ELD_DATETIME 123 <2> %endif 124 <2> 125 <2> %endif 720 <1> 721 <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 00007DAA ???? ifKeyword: resw 1 0 00007DAC ???? ifDescription: resw 1 0 00007DAE ???? ifOptions: resw 1 0 00007DB0 ???? ifValue: resw 1 0 00007DB2 ???? ifTrying: resw 1 0 00007DB4 ???? ifReserved: resw 1 23 <2> endstruc 24 <2> 722 <1> 723 <1> %if _SYMBOLIC 724 <1> defaulting 0 ; disable defaulting 725 <1> %include "symbols.mac" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Symbolic debugging macros 5 <2> by 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 __SYMBOLS_MAC__ 16 <2> %assign __SYMBOLS_MAC__ 1 17 <2> 18 <2> numdef SYMMAINLARGE, 1 19 <2> 20 <2> 21 <2> ; Note: SYMMAINs are stored as an array, which is sorted 22 <2> ; on the smLinear value. Therefore, binary search can 23 <2> ; be used to find an entry in the entire array. 24 <2> struc SYMMAIN 0 00007DAA ???????? smLinear: resd 1 ; linear address of symbol 26 <2> ; Currently all symbols are fully filled, with a 32-bit 27 <2> ; linear value and a 32-bit offset value. (It is of course 28 <2> ; valid to use an offset that fits in 16 bits.) 29 <2> ; Symbols without either a linear or an offset value 30 <2> ; may be supported later, in which case there would be 31 <2> ; a flag to indicate this. 0 00007DAE ???????? smOffset: resd 1 ; offset of symbol 33 <2> ; The following two fields are SYMSTR heap dword indices. 34 <2> ; The value 0 is special, it refers to the empty string. 35 <2> ; To simplify handling of this, the SYMSTR heap contains 36 <2> ; an actual entry with an empty string at index 0. 0 00007DB2 ???? smName1: resw 1 ; -> first string part 0 00007DB4 ???? smName2: resw 1 ; -> second string part 39 <2> smHashByte: ; (low byte of flags is truncated hash value) 0 00007DB6 ???? smFlags: resw 1 ; flags 41 <2> ; The following field is a SYMMAIN paragraph index. 42 <2> ; The value -1 indicates none. 43 <2> %if _SYMMAINLARGE 44 <2> smBase: ; SYMMAIN entry this one is based from 45 <2> %else 46 <2> smNext: ; SYMMAIN entry which was loaded next 47 <2> %endif 0 00007DB8 ???? resw 1 49 <2> alignb 16 50 <2> %if _SYMMAINLARGE 51 <2> ; smBaseNext and smBasePrev form a doubly-linked list 52 <2> ; of the entries belonging to a particular base SYMMAIN. 53 <2> ; -1 indicates no next or no previous entry. 54 <2> ; If smfBase is set then the smBaseNext contains a link 55 <2> ; to the first entry belonging to this SYMMAIN as a base, 56 <2> ; and smBasePrev links to the last entry. -1 if none. 0 00007DBA ???? smBaseNext: resw 1 0 00007DBC ???? smBasePrev: resw 1 59 <2> ; If smfBase is set these fields form a doubly-linked list 60 <2> ; of all SYMMAIN entries with smfBase set. 61 <2> ; If smfBreakpoint is set these fields form a doubly-linked 62 <2> ; list of all SYMMAIN entries with smfBreakpoint set. 63 <2> ; These fields are also used by zz_relocate to remember 64 <2> ; which entries to relocate. 0 00007DBE ???? smSpecialNext: resw 1 0 00007DC0 ???? smSpecialPrev: resw 1 67 <2> %endif 68 <2> endstruc 69 <2> %if SYMMAIN_size != 16 && SYMMAIN_size != 24 70 <2> %error Unexpected SYMMAIN_size 71 <2> %endif 72 <2> SYMMAIN_index_size equ SYMMAIN_size 73 <2> 74 <2> insertfDropSymHintStoreString: equ 1 75 <2> insertfExistingMask equ 0E0h 76 <2> insertfExistingDefaultSymbol equ 00h 77 <2> insertfExistingDefaultStart equ 20h 78 <2> insertfExistingBlockDiffering equ 40h 79 <2> insertfExistingBlockAll equ 60h 80 <2> insertfExistingUpdate equ 80h 81 <2> insertfExistingDuplicate equ 0A0h 82 <2> insertfExistingKeep equ 0C0h 83 <2> ; insertfExisting equ 0E0h 84 <2> smfSectionStartEnd: equ 100h 85 <2> smfBase: equ 100h 86 <2> smfAnonLabel: equ 200h 87 <2> smfSymHint: equ 400h 88 <2> smfSymHintStoreString: equ 800h 89 <2> smfPoison: equ 1000h 90 <2> smfBreakpoint: equ 2000h 91 <2> 92 <2> struc SYMSTR 93 <2> ; The following two fields are expected to be consecutive, they 94 <2> ; are accessed together as a word. (Refer to ssLength usages.) 0 00007DAA ?? ssLength: resb 1 ; how long this string is (only ssString) 0 00007DAB ?? ssRefCount: resb 1 ; how often this string is referenced 97 <2> ; The ssRefCount value can be: 98 <2> ; 0 = Unreferenced SYMSTR, which may be reclaimed. 99 <2> ; A reference may be added, incrementing the count. 100 <2> ; 1 to 253 = Referenced SYMSTR, with that many references. 101 <2> ; If all references are freed, it is expected that 102 <2> ; the count decreases to zero. 103 <2> ; A reference may be added, incrementing the count. 104 <2> ; 254 = Referenced SYMSTR, with that many references. 105 <2> ; No reference may be added, as 254 is the maximum 106 <2> ; reference count that indicates a referenced SYMSTR. 107 <2> ; 255 = Immutable SYMSTR, referenced an arbitrary amount of 108 <2> ; times. May not be deleted unless all tables are freed. 109 <2> ; This is used by the empty string SYMSTR at index 0. 0 00007DAC ???? ssHash: resw 1 ; hash value of this string 111 <2> ssString: ; actual string content 112 <2> ; Note that if the string is not dword-aligned, NUL bytes are 113 <2> ; appended to insure that the SYMSTR structure is padded to a 114 <2> ; dword boundary, as SYMSTRs are referred to by dword indices. 115 <2> ; Therefore, the size of a SYMSTR record is obtained by 116 <2> ; calculating (byte [ssLength] + ssString + 3) & ~3. 117 <2> ; (Note: A terminating NUL byte is not included if the string 118 <2> ; length is dword-aligned already. The length must be used 119 <2> ; directly, not implied by a terminator.) 120 <2> endstruc 121 <2> SYMSTR_typical_size equ 28 122 <2> SYMSTR_index_size equ 4 123 <2> 124 <2> ; Note: SYMHASHs are stored as an array, which is sorted 125 <2> ; on the shHash value. Therefore, binary search can 126 <2> ; be used to find an entry in the entire array. 127 <2> ; 128 <2> ; The hash value is computed by hashing the entire name 129 <2> ; string (ie, both smName1 and smName2 string contents) 130 <2> ; with the algorithm as such: 131 <2> ; 132 <2> ; for (hash = 1, index = 0; index < length; index += 1) 133 <2> ; hash = hash * 31 + name[index]; 134 <2> struc SYMHASH 0 00007DAA ???? shHash: resw 1 ; hash value 0 00007DAC ???? shMain: resw 1 ; SYMMAIN paragraph index of associated SYMMAIN 137 <2> endstruc 138 <2> SYMHASH_index_size equ SYMHASH_size 139 <2> 140 <2> 141 <2> struc XMSMOVE 0 00007DAA ???????? xmsmCount: resd 1 143 <2> ; The count must be even. 0 00007DAE ???? xmsmSourceHandle: resw 1 0 00007DB0 ???????? xmsmSourceAddress: resd 1 0 00007DB4 ???? xmsmDestHandle: resw 1 0 00007DB6 ???????? xmsmDestAddress: resd 1 148 <2> ; The destination and source may overlap only if a 149 <2> ; forward move would suffice to implement the 150 <2> ; operation without corrupting the data. (That is, 151 <2> ; the source starts above the destination. The XMS 152 <2> ; specification gets this detail wrong.) 153 <2> ; There is an error code for invalid overlap, but 154 <2> ; it is unclear whether this condition is detected 155 <2> ; properly by all implementations. 156 <2> endstruc 157 <2> 158 <2> SEGTRANSFER_size equ (64 * 1024 - 16) 159 <2> XMSTRANSFER_default_size equ SEGTRANSFER_size 160 <2> 161 <2> 162 <2> %endif 726 <1> [list -] 1543 <1> 1544 <1> %if _LINK 1545 <1> %if _ONLY386 1546 <1> cpu 386 1547 <1> %else 1548 <1> cpu 8086 1549 <1> %endif 1550 <1> 1551 <1> auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 1552 <1> endarea auxbuff, 1 1553 <1> 1554 <1> auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1555 <1> endarea auxbuff_max, 1 1556 <1> 1557 <1> %if _INIT_MAX 1558 <1> auxbuff_init_size: equ (_AUXBUFFMAXSIZE+15) & ~15 1559 <1> %else 1560 <1> auxbuff_init_size: equ (_AUXBUFFSIZE+15) & ~15 1561 <1> %endif 1562 <1> endarea auxbuff_init, 1 1563 <1> 1564 <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> dd_no_blanks_sym: equ 100_0000h 44 <2> zz_no_pm_xms: equ 200_0000h 45 <2> rr_disasm_no_rept: equ 1000_0000h 46 <2> rr_disasm_no_show: equ 2000_0000h 47 <2> opt_cmdline_quiet_input:equ 4000_0000h 48 <2> opt_cmdline_quiet_output:equ 8000_0000h 49 <2> DEFAULTOPTIONS equ zz_no_pm_xms 50 <2> 51 <2> 52 <2> opt2_db_header: equ 1 53 <2> opt2_db_trailer: equ 2 54 <2> opt2_dw_header: equ 10h 55 <2> opt2_dw_trailer: equ 20h 56 <2> opt2_dd_header: equ 100h 57 <2> opt2_dd_trailer: equ 200h 58 <2> opt2_getinput_dpmi: equ 800h 59 <2> opt2_hh_compat: equ 1000h 60 <2> opt2_getc_idle: equ 2000h 61 <2> opt2_getc_idle_dpmi: equ 4000h 62 <2> opt2_re_cancel_tpg: equ 8000h 63 <2> opt2_nn_compat: equ 1_0000h 64 <2> opt2_nn_capitalise: equ 2_0000h 65 <2> %if _MS_0RANGE_COMPAT 66 <2> opt2_0range_compat: equ 4_0000h 67 <2> %endif 68 <2> opt2_rr16_compat: equ 8_0000h 69 <2> opt2_r_prompt_compat: equ 10_0000h 70 <2> opt2_r_separate: equ 20_0000h 71 <2> opt2_r_linebreak_always:equ 40_0000h 72 <2> opt2_dpminohlt: equ 8000_0000h ; DPMI doesn't like hlt 73 <2> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi | opt2_dpminohlt 74 <2> 75 <2> 76 <2> opt3_tt_no_paging: equ 1 77 <2> opt3_tp_no_paging: equ 2 78 <2> opt3_pp_no_paging: equ 4 79 <2> opt3_gg_no_paging: equ 8 80 <2> opt3_silence_paging_set:equ 100h 81 <2> opt3_silence_paging_on: equ 200h 82 <2> opt3_paging_rc: equ 1000h 83 <2> opt3_paging_yy: equ 2000h 84 <2> opt3_paging_re: equ 4000h 85 <2> opt3_r_highlight_diff: equ 10000h 86 <2> opt3_r_highlight_dumb: equ 20000h 87 <2> opt3_r_highlight_full: equ 40000h 88 <2> opt3_r_highlight_eip: equ 80000h 89 <2> %if _PM 90 <2> opt3_ss_b_bit_set: equ 10_0000h 91 <2> %if _BREAK_INSTALLDPMI 92 <2> opt3_break_installdpmi: equ 20_0000h 93 <2> %endif 94 <2> %endif 95 <2> %if _DHIGHLIGHT 96 <2> opt3_d_highlight: equ 80_0000h 97 <2> %endif 98 <2> %if _GETLINEHIGHLIGHT 99 <2> opt3_getline_highlight: equ 100_0000h 100 <2> %endif 101 <2> opt3_no_idle_2F: equ 200_0000h 102 <2> %if _DELAY_BEFORE_BP 103 <2> opt3_delay_before_bp: equ 400_0000h 104 <2> %endif 105 <2> opt3_no_call_amis: equ 800_0000h 106 <2> opt3_disable_autorepeat:equ 1000_0000h 107 <2> opt3_check_ctrlc_keyb: equ 2000_0000h 108 <2> opt3_check_ctrlc_0bh: equ 4000_0000h 109 <2> opt3_tsr_quit_leave_tf: equ 8000_0000h 110 <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 113 <2> 114 <2> 115 <2> opt4_int_2F_hook: equ 2 116 <2> opt4_int_08_hook: equ 4 117 <2> opt4_int_2D_hook: equ 8 118 <2> %if _CATCHINTFAULTCOND 119 <2> opt4_int_fault_hook: equ 10h 120 <2> %endif 121 <2> opt4_int_serial_force: equ 1_0000h 122 <2> opt4_int_2F_force: equ 2_0000h 123 <2> opt4_int_08_force: equ 4_0000h 124 <2> opt4_int_2D_force: equ 8_0000h 125 <2> %if _CATCHINT0D 126 <2> opt4_int_0D_force: equ 10_0000h 127 <2> %endif 128 <2> %if _CATCHINT0C 129 <2> opt4_int_0C_force: equ 20_0000h 130 <2> %endif 131 <2> opt4_int_00_force: equ 100_0000h 132 <2> opt4_int_01_force: equ 200_0000h 133 <2> opt4_int_03_force: equ 400_0000h 134 <2> opt4_int_06_force: equ 800_0000h 135 <2> opt4_int_18_force: equ 1000_0000h 136 <2> opt4_int_19_force: equ 2000_0000h 137 <2> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 138 <2> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 139 <2> opt4_int_07_force: equ 8000_0000h 140 <2> DEFAULTOPTIONS4 equ opt4_int_2F_hook 141 <2> 142 <2> 143 <2> %if _VXCHG 144 <2> opt6_vv_mode: equ 1 145 <2> opt6_vv_keep: equ 2 146 <2> opt6_vv_int16: equ 10h 147 <2> %if _VXCHG_DEFAULT_ON 148 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 149 <2> %else 150 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 151 <2> %endif 152 <2> %else 153 <2> DEFAULTOPTIONS6 equ opt6_share_serial_irq 154 <2> %endif 155 <2> %if _DEBUG 156 <2> opt6_debug_exception_late: equ 20h 157 <2> opt6_debug_exception_early: equ 40h 158 <2> %if _DEBUG_COND 159 <2> opt6_debug_exception: equ 80h 160 <2> opt6_debug_mode: equ 100h 161 <2> %endif 162 <2> %endif 163 <2> opt6_bios_output: equ 200h 164 <2> opt6_flat_binary: equ 400h 165 <2> opt6_big_stack: equ 800h 166 <2> opt6_40_columns: equ 1000h 167 <2> opt6_40_indent_odd: equ 2000h 168 <2> opt6_40_dash: equ 4000h 169 <2> opt6_share_serial_irq: equ 1_0000h 170 <2> opt6_serial_EOI_call: equ 2_0000h 171 <2> %if _RH 172 <2> opt6_rh_mode: equ 10_0000h 173 <2> %endif 174 <2> %if _DEBUG 175 <2> opt6_debug_putrunint_early: equ 40_0000h 176 <2> %if _DEBUG_COND 177 <2> opt6_debug_putrunint: equ 80_0000h 178 <2> %endif 179 <2> %endif 180 <2> opt6_bios_io: equ 100_0000h 181 <2> opt6_immasm_display_uu: equ 200_0000h 182 <2> opt6_immasm_debug: equ 400_0000h 183 <2> opt6_immasm_flag: equ 800_0000h 184 <2> opt6_immasm_nobranch: equ 1000_0000h 185 <2> opt6_r_flags_style2: equ 2000_0000h 186 <2> opt6_r_flags_style3: equ 4000_0000h 187 <2> opt6_r_linebreak_conditional: equ 8000_0000h 188 <2> 189 <2> 190 <2> DEFAULTOPTIONS7 equ opt7_no_tsr_ll 191 <2> opt7_no_free_oneshot_eld: equ 1 192 <2> opt7_debug_optional_link: equ 2 193 <2> opt7_quiet_install: equ 4 194 <2> opt7_quick_run: equ 8 195 <2> opt7_houdini: equ 100h 196 <2> opt7_debug_run: equ 200h 197 <2> opt7_no_ensure: equ 1000h 198 <2> opt7_no_tsr_ll: equ 2000h 199 <2> 200 <2> 201 <2> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 202 <2> newpacket equ 2 ; Int21.7305 packet method available (L, W) 203 <2> ntpacket equ 4 ; VDD registered and usable (L, W) 204 <2> pagedcommand equ 8 ; allows paging in puts 205 <2> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 206 <2> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 207 <2> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 208 <2> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 209 <2> hooked2F equ 100h ; Int2F hooked 210 <2> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 211 <2> unused_dif1_dpminohlt equ 400h ; DPMI doesn't like hlt 212 <2> protectedmode equ 800h ; in (DPMI) protected mode 213 <2> debuggeeA20 equ 1000h ; state of debuggee's A20 214 <2> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 215 <2> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 216 <2> has386 equ 8000h ; CPU is a 386 217 <2> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 218 <2> runningnt equ 2_0000h ; running in NTVDM 219 <2> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 220 <2> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 221 <2> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 222 <2> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 223 <2> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 224 <2> attachedterm equ 80_0000h ; the attached process terminated 225 <2> runningdosemu equ 100_0000h ; running in dosemu 226 <2> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 227 <2> tt_while: equ 400_0000h ; tt: while condition specified 228 <2> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 229 <2> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 230 <2> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 231 <2> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 232 <2> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 233 <2> 234 <2> 235 <2> dif2_gg_is_first: equ 1 236 <2> dif2_gg_skip_non_cseip: equ 2 237 <2> dif2_gg_skip_cseip: equ 4 238 <2> dif2_gg_is_gg: equ 8 239 <2> dif2_gg_first_detected: equ 10h 240 <2> dif2_gg_again: equ 20h 241 <2> dif2_tpg_proceed_bp_set:equ 40h 242 <2> dif2_tpg_keep_proceed_bp: equ 80h 243 <2> dif2_tpg_have_bp: equ 100h 244 <2> dif2_tpg_adjusted_cseip:equ 200h 245 <2> dif2_tpg_do_not_adjust: equ 400h 246 <2> dif2_bp_failure: equ 800h 247 <2> dif2_is_pp: equ 1000h 248 <2> %if _SYMBOLIC 249 <2> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 250 <2> dif2_sym_req_xms: equ 2000h 251 <2> dif2_sym_req_86mm: equ 4000h 252 <2> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 253 <2> dif2_no_pm_xms: equ 1_0000h 254 <2> dif2_xms_detection_done:equ 2_0000h 255 <2> dif2_xms_present: equ 4_0000h 256 <2> %endif 257 <2> %if _INPUT_FILE_HANDLES 258 <2> dif2_input_file: equ 10_0000h 259 <2> dif2_closed_input_file: equ 20_0000h 260 <2> %endif 261 <2> dif2_did_getline_file: equ 40_0000h 262 <2> %if _SYMBOLIC 263 <2> dif2_poison: equ 80_0000h 264 <2> %endif 265 <2> dif2_boot_loaded_kernel:equ 100_0000h 266 <2> %if _INPUT_FILE_BOOT 267 <2> dif2_input_file_boot: equ 200_0000h 268 <2> dif2_closed_input_file_boot: equ 400_0000h 269 <2> %endif 270 <2> dif2_in_silence_dump: equ 1000_0000h 271 <2> dif2_int31_segment: equ 2000_0000h 272 <2> dif2_nn_compat: equ 4000_0000h 273 <2> dif2_nn_capitalise: equ 8000_0000h 274 <2> 275 <2> 276 <2> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 277 <2> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 278 <2> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 279 <2> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 282 <2> dif3_load_dir_dir: equ 8 283 <2> dif3_input_terminal_override: equ 10h 284 <2> dif3_input_serial_override: equ 20h 285 <2> dif3_if_not: equ 40h 286 <2> dif3_partition_changed: equ 80h 287 <2> ; 288 <2> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 289 <2> dif3_input_cmdline_closed: equ 200h 290 <2> dif3_at_line_end: equ 400h 291 <2> dif3_quiet_input_single:equ 800h 292 <2> dif3_quiet_output: equ 1000h 293 <2> dif3_unquiet_error: equ 2000h 294 <2> dif3_unquiet_prompt: equ 4000h 295 <2> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 296 <2> dif3_return_eof: equ 8000h 297 <2> dif3_highlighting: equ 1_0000h 298 <2> dif3_do_not_highlight: equ 2_0000h 299 <2> dif3_int10_highlight: equ 2_0000h 300 <2> dif3_nosymbols_1: equ 4_0000h 301 <2> dif3_nosymbols_2: equ 8_0000h 302 <2> %if _PM 303 <2> dif3_ss_b_bit_set: equ 10_0000h 304 <2> %endif 305 <2> dif3_gotint19: equ 20_0000h 306 <2> dif3_prior_pm: equ 40_0000h 307 <2> %if _DELAY_BEFORE_BP 308 <2> dif3_delayed equ 80_0000h 309 <2> %endif 310 <2> dif3_input_re: equ 100_0000h ; input reading from re_buffer 311 <2> dif3_input_re_closed: equ 200_0000h 312 <2> dif3_accept_getrange_0: equ 400_0000h 313 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 314 <2> dif3_in_if: equ 800_0000h 315 <2> %endif 316 <2> dif3_auxbuff_guarded_1: equ 1000_0000h 317 <2> dif3_auxbuff_guarded_2: equ 2000_0000h 318 <2> dif3_auxbuff_guarded_3: equ 4000_0000h 319 <2> dif3_sss_is_reverse: equ 8000_0000h 320 <2> 321 <2> 322 <2> dif4_int_serial_hooked: equ 1 323 <2> dif4_int_2F_hooked: equ 2 324 <2> dif4_int_08_hooked: equ 4 325 <2> dif4_int_2D_hooked: equ 8 326 <2> %if _CATCHINTFAULTCOND && _CATCHINT0D 327 <2> dif4_int_0D_hooked: equ 10h 328 <2> %endif 329 <2> %if _CATCHINTFAULTCOND && _CATCHINT0C 330 <2> dif4_int_0C_hooked: equ 20h 331 <2> %endif 332 <2> %if _LOADER 333 <2> dif4_int_18_hooked: equ 1000h 334 <2> dif4_int_19_hooked: equ 2000h 335 <2> %endif 336 <2> 337 <2> 338 <2> %if _VXCHG 339 <2> dif6_vv_mode: equ 1 340 <2> %endif 341 <2> dif6_in_hook2F: equ 2 342 <2> dif6_in_amis_hook2F: equ 4 343 <2> dif6_debug_mode: equ 100h 344 <2> dif6_locked: equ 200h 345 <2> dif6_mcp: equ 400h 346 <2> %if _RH 347 <2> dif6_rh_mode_was: equ 8_0000h 348 <2> dif6_rh_mode: equ 10_0000h 349 <2> dif6_rh_mode_2: equ 20_0000h 350 <2> %endif 351 <2> dif6_device_mode: equ 40_0000h 352 <2> dif6_cpdepchars: equ 80_0000h 353 <2> %if _IMMASM 354 <2> dif6_immasm_no_output: equ 100_0000h 355 <2> dif6_immasm: equ 200_0000h 356 <2> dif6_immasm_rel8: equ 400_0000h 357 <2> dif6_immasm_faroffset: equ 800_0000h 358 <2> %endif 359 <2> 360 <2> 361 <2> disasm_lowercase equ 1 362 <2> disasm_commablank equ 2 363 <2> disasm_nasm equ 4 364 <2> disasm_lowercase_refmem:equ 8 365 <2> disasm_show_short: equ 10h 366 <2> disasm_show_near: equ 20h 367 <2> disasm_show_far: equ 40h 368 <2> disasm_nec: equ 80h 369 <2> disasm_40_columns: equ 100h 370 <2> disasm_no_indent: equ 200h 371 <2> disasm_msdebug_mnemonofs: equ 400h 372 <2> disasm_a16_memref: equ 1000h 373 <2> disasm_a32_memref: equ 2000h 374 <2> disasm_a16_string: equ 4000h 375 <2> disasm_a32_string: equ 8000h 376 <2> disasm_hide_modrm: equ 10000h 377 <2> disasm_asize_loop_nasm: equ 20000h 378 <2> disasm_modrm_always: equ 40000h 379 <2> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 382 <2> 383 <2> ; serial_flags values 384 <2> sf_init_done: equ 1 385 <2> sf_ctrl_c: equ 2 386 <2> sf_double_ctrl_c: equ 4 387 <2> sf_built_in_fifo: equ 8 388 <2> sf_use_serial: equ 10h 1565 <1> %endif 21 %endif 22 23 %if _LINK_COMPAT 24 %define FORCEWORD word 25 %define FORCESTRICTWORD strict word 26 %else 27 %define FORCEWORD 28 %define FORCESTRICTWORD 29 %endif 30 31 32 %if _LINK 33 34 %if !(_ONLY386 || _ONLYNON386) || _DUALCODE && _PM 35 wllist G_GINITGROUP_SINIT 36 %endif 37 38 %ifn _ONLY386 || _ONLYNON386 39 wllist N_SINIT_Lpatch_386_table 40 wllist N_SINIT_Lpatch_no386_table 41 %if _DUALCODE 42 wllist N_SINIT_Lpatch_386_table2 43 wllist N_SINIT_Lpatch_no386_table2 44 %endif 45 wllist N_SINIT_Lpatch_386_tableentry 46 wllist N_SINIT_Lpatch_no386_tableentry 47 %endif 48 49 %if _DUALCODE && ! _PM 50 wllist N_SINIT_Lrelocate_from_code 51 wllist N_SINIT_Lrelocate_from_code2 52 53 extern relocate_from_code 54 extern relocate_from_code.end 55 extern relocate_from_code2 56 extern relocate_from_code2.end 57 %endif 58 59 %endif 60 usesection INIT === Switch to base=0250E0h -> "INIT" 60 ------------------ note: usesection INIT 61 62 %ifn _LINK 63 CODETARGET1_equate equ CODETARGET1 64 CODETARGET2_equate equ CODETARGET2 65 AUXTARGET1_equate equ AUXTARGET1 66 AUXTARGET2_equate equ AUXTARGET2 67 BOOTCODETARGET1_equate equ BOOTCODETARGET1 68 BOOTCODETARGET2_equate equ BOOTCODETARGET2 69 BOOTAUXTARGET1_equate equ BOOTAUXTARGET1 70 BOOTAUXTARGET2_equate equ BOOTAUXTARGET2 71 ldebug_codes_size_equate equ ldebug_code_size + ldebug_code2_size 72 ldebug_codes_truncated_size_equate equ ldebug_code_bootldr_truncated_size + ldebug_code2_size 73 auxbuff_size_equate equ auxbuff_size 74 initsectionoffset_p_equate equ paras(INITSECTIONOFFSET) 75 %endif 76 77 initcode: 78 %if ($ - $$) != 0 79 %fatal initcode expected at start of section 80 %endif 81 %ifn _APPLICATION 82 push cs 83 pop ds 84 mov dx, imsg.not_an_application 85 mov ah, 09h 86 int 21h 87 mov ax, 4CFFh 88 int 21h 89 90 ; magic sequence for tellsize 91 %if _LINK 92 mov bx, 1 93 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 94 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 95 wlcalc word_segrel_INIT, equ $ - 2 96 %else 97 mov bx, paras(INITSECTIONOFFSET + init_size + deviceshim_size + 16) 98 %endif 99 mov ah, 4Ah 100 int 21h 101 ; end of magic sequence for tellsize 102 103 ; The +16 is to avoid entering a zero value 104 ; for exeMinAlloc and exeMaxAlloc, which 105 ; seems to be handled in a special way by 106 ; DOS. (This special handling occurs for 107 ; the uncompressed bootable build, eg 108 ; ldebugu.com, and the nonbootable MZ shim 109 ; build, eg debug.com.) 110 %endif 111 112 %if _APPLICATION 0 00000000 8CD0 mov ax, ss 0 00000002 8CDA mov dx, ds 0 00000004 29D0 sub ax, dx 116 0 00000006 50 push ax ; (if sp was zero) 118 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 125 126 %ifn _LINK 127 cmp ax, strict word paras(APPINITSTACK_END) 128 %else 129 130 %if 0 131 %define APPINITTARGET (INITSECTIONOFFSET + datastack_size + ext_data_nonboot_add_size + auxbuff_size + auxbuff_init_size + historysegment_size + app_env_size + extsegment_size) 138 ; The early stack goes behind the init target. 139 %define APPINITSTACK_START (APPINITTARGET+init_size) 140 APPINITSTACK_SIZE equ 512 ; must be even 141 ; This is the size of the application mode 142 ; process memory block required while still 143 ; using the init stack behind init target. 144 %define APPINITSTACK_END (APPINITSTACK_START+APPINITSTACK_SIZE) 145 %endif 146 0 00000014 3D[A208] cmp ax, strict word relocatedzero + paras( + 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_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 155 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 156 %endif 0 00000017 7314 jae .stackdownfirst 158 .memupfirst: 159 ; magic sequence for tellsize 160 %ifn _LINK 161 mov bx, paras(APPINITSTACK_END) 162 %else 0 00000019 BB[A208] mov bx, relocatedzero + paras( + 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_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 171 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 172 %endif 0 0000001C B44A mov ah, 4Ah 0 0000001E CD21 int 21h 175 ; end of magic sequence for tellsize 0 00000020 730B jnc @F 177 .memfail: 0 00000022 BA[DA0F] mov dx, imsg.early_mem_fail 179 .earlyfail: 0 00000025 E82F1C call init_putsz_cs 0 00000028 B8FF4C mov ax, 4CFFh 0 0000002B CD21 int 21h 183 184 @@: 185 .stackdownfirst: 0 0000002D 8CD8 mov ax, ds 187 %ifn _LINK 188 add ax, paras(APPINITSTACK_START) 189 %else 0 0000002F 05[8208] add ax, strict word relocatedzero + paras( + auxbuff_size + auxbuff_init_size + historysegment_size + app_env_size + extsegment_size) 195 wlcalc word_segrel_INIT, equ $ - 2 196 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 197 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 198 %endif 0 00000032 FA cli 0 00000033 8ED0 mov ss, ax 0 00000035 BC0002 mov sp, APPINITSTACK_SIZE 0 00000038 FB sti 203 204 ; if jumped to .stackdownfirst: now, shrink our memory block 205 ; else: no-op (already grew or shrunk block) 206 %ifn _LINK 207 mov bx, paras(APPINITSTACK_END) 208 %else 0 00000039 BB[A208] mov bx, relocatedzero + paras( + 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_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 217 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 218 %endif 0 0000003C B44A mov ah, 4Ah 0 0000003E CD21 int 21h 0 00000040 72E0 jc .memfail 222 223 0 00000042 8CD8 mov ax, ds 225 %ifn _LINK 226 add ax, paras(INITSECTIONOFFSET) 227 %else 0 00000044 05[0000] add ax, strict word relocatedzero + 0 229 wlcalc word_segrel_INIT, equ $ - 2 230 %endif 0 00000047 8CDA mov dx, ds 232 %ifn _LINK 233 add dx, paras(APPINITTARGET) 234 mov cx, init_size_p 235 call init_movp 236 init_size_p_equate equ init_size_p 237 appinittarget_p_equate equ paras(APPINITTARGET) 238 %if initsectionoffset_p_equate + init_size_p_equate > appinittarget_p_equate 239 %error Overlap detected 240 %endif 241 %else 0 00000049 81C2[8208] add dx, strict word relocatedzero + paras( + auxbuff_size + auxbuff_init_size + historysegment_size + app_env_size + extsegment_size) 247 wlcalc word_segrel_INIT, equ $ - 2 248 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 0 0000004D B9[0000] mov cx, relocatedzero + 0 250 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 0 00000050 E8731B call init_movp 252 %endif 253 0 00000053 52 push dx 0 00000054 E8D701 call init_retf 256 257 %ifn _LINK 258 %if 0 259 cmp ax, strict word paras(CODETARGET2) 260 cmp ax, strict word paras(ldebug_code_bootldr_truncated_size) 261 cmp ax, strict word paras(ldebug_code2_size) 262 cmp ax, strict word paras(historysegment_size) 263 cmp ax, strict word paras(app_env_size) 264 cmp ax, strict word paras(extsegment_size) 265 %endif 266 %if _APP_ENV_SIZE 267 mov word [cs:memsize], paras(CODETARGET2 + ldebug_code_bootldr_truncated_size + ldebug_code2_size + historysegment_size + app_env_size + extsegment_size) 273 %endif 274 275 mov bx, ds 276 mov dx, bx 277 add bx, paras(AUXTARGET1) 278 add dx, paras(CODETARGET1) 279 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 280 mov ax, bx 281 add ax, paras(auxbuff_size) 282 %if AUXTARGET1_equate <= CODETARGET1_equate 283 %assign nn AUXTARGET1_equate 284 %assign mm CODETARGET1_equate 285 %error Unexpected layout aux = nn code = mm 286 %endif 287 %endif 288 mov cx, dx 289 mov word [cs:init_layout], init_app_layout_1 290 call init_check_auxbuff 291 jz @F 292 293 mov bx, ds 294 mov dx, bx 295 add bx, paras(AUXTARGET2) 296 add dx, paras(CODETARGET2) 297 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 298 %if (paras(AUXTARGET1_equate) + paras(auxbuff_size_equate)) != (paras(CODETARGET2_equate) + paras(ldebug_codes_truncated_size_equate)) 300 ldebug_code2_size_equate equ ldebug_code2_size 301 ldebug_code_size_equate equ ldebug_code_size 302 ldebug_code_bootldr_truncated_size_equate equ ldebug_code_bootldr_truncated_size 303 %assign vv (paras(ldebug_code2_size_equate)) 304 %assign uu (paras(ldebug_code_size_equate)) 305 %assign tt (paras(ldebug_code_bootldr_truncated_size_equate)) 306 %assign sss (paras(CODETARGET1_equate)) 307 %assign rr (paras(AUXTARGET1_equate)) 308 %assign qq (paras(CODETARGET2_equate)) 309 %assign pp (paras(auxbuff_size_equate)) 310 %assign oo (paras(ldebug_codes_truncated_size_equate)) 311 %assign nn (paras(AUXTARGET1_equate) + paras(auxbuff_size_equate)) 312 %assign mm (paras(CODETARGET2_equate) + paras(ldebug_codes_truncated_size_equate)) 313 %error Unexpected layout aux1+auxb != code2+trunc 314 %error code2+trunc = mm aux1+auxb = nn trunc = oo auxb = pp code2 = qq aux1 = rr 315 %error code1 = sss codeseg1trunc = tt codeseg1 = uu codeseg2 = vv 316 %endif 317 %endif 318 319 %else ; _LINK 320 %if 0 321 cmp ax, strict word relocatedzero + paras(auxbuff_size) 322 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 323 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 324 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 325 cmp ax, strict word relocatedzero ; code 326 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 327 cmp ax, strict word relocatedzero ; code2 328 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 329 cmp ax, strict word paras(historysegment_size) 330 cmp ax, strict word paras(app_env_size) 331 cmp ax, strict word paras(extsegment_size) 332 %endif 333 %if _APP_ENV_SIZE 334 %if 0 335 %define CODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_truncated_size + datastack_size) 336 %define CODETARGET2 (CODETARGET1+auxbuff_size) 337 %define AUXTARGET1 (CODETARGET1+ldebug_code_bootldr_truncated_size+ldebug_code2_size) 338 %define AUXTARGET2 CODETARGET1 339 %define AUXTARGET3 (AUXTARGET1+auxbuff_size) 340 %endif 0 00000057 2EC706[360E][8106] mov word [cs:memsize], relocatedzero + paras(auxbuff_size + historysegment_size + app_env_size + extsegment_size) 345 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 346 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 347 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 348 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 349 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 350 %endif 351 0 0000005E 8CDB mov bx, ds 0 00000060 89DA mov dx, bx 354 ; add bx, paras(AUXTARGET1) 0 00000062 81C3[0000] add bx, strict word relocatedzero + 0 356 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 357 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 358 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 359 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 360 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 361 ; add dx, paras(CODETARGET1) 0 00000066 81C2[0000] add dx, strict word relocatedzero + 0 363 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 364 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 365 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 366 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 0 0000006A 89D8 mov ax, bx 0 0000006C 050102 add ax, paras(auxbuff_size) 369 %endif 0 0000006F 89D1 mov cx, dx 0 00000071 2EC706[3C0E][B835] mov word [cs:init_layout], init_app_layout_1 0 00000078 E8B401 call init_check_auxbuff 0 0000007B 743E jz @F 374 0 0000007D 8CDB mov bx, ds 0 0000007F 89DA mov dx, bx 377 ; add bx, paras(AUXTARGET2) 0 00000081 81C3[0000] add bx, strict word relocatedzero + 0 379 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 380 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 381 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 382 ; add dx, paras(CODETARGET2) 0 00000085 81C2[0102] add dx, strict word relocatedzero + paras(auxbuff_size) 384 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 385 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 386 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 387 %endif 0 00000089 2EC706[3C0E][0636] mov word [cs:init_layout], init_app_layout_2 0 00000090 E89C01 call init_check_auxbuff 0 00000093 7426 jz @F 391 392 ; If both prior attempts failed, we allocate 393 ; an additional 8 KiB and move the buffer to 394 ; that. This should always succeed. 395 %ifn _LINK 396 mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size + app_env_size + extsegment_size) 401 ; enlarge the final memory block size 402 403 mov bx, ds 404 add bx, paras(AUXTARGET3) 405 %else ; _LINK 406 %if 0 407 %define CODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_truncated_size + datastack_size) 408 %define CODETARGET2 (CODETARGET1+auxbuff_size) 409 %define AUXTARGET1 (CODETARGET1+ldebug_code_bootldr_truncated_size+ldebug_code2_size) 410 %define AUXTARGET2 CODETARGET1 411 %define AUXTARGET3 (AUXTARGET1+auxbuff_size) 412 %endif 0 00000095 2EC706[360E][8208] mov word [cs:memsize], relocatedzero + paras(auxbuff_size + auxbuff_size + historysegment_size + app_env_size + extsegment_size) 418 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 419 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 420 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 421 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 422 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 423 ; enlarge the final memory block size 424 0 0000009C 8CDB mov bx, ds 0 0000009E 81C3[0102] add bx, strict word relocatedzero + paras(auxbuff_size) 427 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 428 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 429 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 430 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 431 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 432 %endif ; _LINK 0 000000A2 89CA mov dx, cx 434 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 0 000000A4 89D8 mov ax, bx 0 000000A6 050102 add ax, paras(auxbuff_size) 437 %endif 0 000000A9 2EC706[3C0E][B835] mov word [cs:init_layout], init_app_layout_3 0 000000B0 E87C01 call init_check_auxbuff 0 000000B3 7406 jz @F 441 442 ; Because this shouldn't happen, this is 443 ; considered an internal error. 0 000000B5 BA[9310] mov dx, imsg.early_reloc_fail 0 000000B8 E96AFF jmp .earlyfail 446 447 @@: 448 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 0 000000BB 50 push ax 450 %endif 0 000000BC E83801 call place_code_segments 452 453 %if _MESSAGESEGMENT 0 000000BF 8CD8 mov ax, ds 455 %ifn _LINK 456 add ax, paras(MESSAGESECTIONOFFSET) 457 mov dx, ds 458 add dx, paras(100h + DATAENTRYTABLESIZE + datastack_size) 459 mov cx, paras(messagesegment_truncated_size) 460 %else ; _LINK 0 000000C1 05[0000] add ax, strict word relocatedzero + 0 462 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 0 000000C4 8CDA mov dx, ds 0 000000C6 81C2[0000] add dx, strict word relocatedzero + 0 465 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_end_of_datastack, equ $ - 2 0 000000CA B9[0000] mov cx, relocatedzero + 0 467 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_truncated, equ $ - 2 468 %endif ; _LINK 0 000000CD E8F61A call init_movp 0 000000D0 8916[0000] mov word [messageseg], dx 471 %if _HELP_COMPRESSED && ! _PM 472 mov [hshrink_memory_source.segment], dx 473 %endif 474 %if _BOOTLDR_DISCARD_HELP 475 %ifn _LINK 476 mov word [messageseg_size], messagesegment_nobits_truncated_size 477 %else 0 000000D4 C706[0000][0000] mov word [messageseg_size], behind_messagesegment_nobits_truncated wrt MESSAGESEGMENT 479 %endif 480 %if _HELP_COMPRESSED 0 000000DA C706[0000][0000] mov word [indirect_hshrink_message_buffer], truncated_hshrink_message_buffer 482 %if _LINK || _LINK_COMPAT 0 000000E0 8E06[0000] mov es, [code_seg] 0 000000E4 26800E[0000]01 setopt [es:patch_boothelp_uncompressed], NONCOMPRESSEDFLAG 485 %endif 486 %endif 0 000000EA 1E push ds 0 000000EB 0E push cs 0 000000EC 1F pop ds 0 000000ED BE[0A17] mov si, imsg.boothelp_replacement 0 000000F0 8EC2 mov es, dx 0 000000F2 BF[0000] mov di, msg.boothelp 0 000000F5 B91C00 mov cx, imsg.boothelp_replacement_size_w 0 000000F8 F3A5 rep movsw 0 000000FA 31C0 xor ax, ax 496 %ifn _LINK 497 mov cx, words(messagesegment_nobits_truncated_size - (msg.boothelp - messagesegment_start + fromwords(imsg.boothelp_replacement_size_w))) 500 %else 0 000000FC B9[3800] mov cx, relocatedzero + fromwords(imsg.boothelp_replacement_size_w) 502 wlcalc word_ext_msg.boothelp, equ $ - 2 ; length + start 503 wlcalc word_subr_0, equ $ - 2 ; - (length + start) 504 wlcalc word_wrt_MESSAGESEGMENT_ext_behind_messagesegment_nobits_truncated, equ $ - 2 505 ; behind - (length + start) 506 wlcalc word_shr_1, equ $ - 2 ; above >> 1 507 %endif 0 000000FF F3AB rep stosw 0 00000101 1F pop ds 510 %endif 511 %endif 512 513 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 0 00000102 58 pop ax 515 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000103 A3[0000] mov word [history.segorsel + soaSegSel], ax 517 %if _PM 0 00000106 A3[0200] mov word [history.segorsel + soaSegment], ax 519 %endif 0 00000109 8EC0 mov es, ax 0 0000010B 31FF xor di, di 0 0000010D B90010 mov cx, historysegment_size >> 1 0 00000110 31C0 xor ax, ax 0 00000112 F3AB rep stosw 525 %endif 526 527 %if _APP_ENV_SIZE 528 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000114 8CC0 mov ax, es 0 00000116 050002 add ax, paras(historysegment_size) 531 %endif 0 00000119 A3[0000] mov word [envseg], ax 0 0000011C 8EC0 mov es, ax 0 0000011E 31FF xor di, di 0 00000120 B90004 mov cx, app_env_size >> 1 0 00000123 C706[0000]0008 mov word [env_size], app_env_size 0 00000129 31C0 xor ax, ax 0 0000012B F3AB rep stosw 0 0000012D 26C70603007F00 mov word [es:3], paras(app_env_size - 16) 540 %endif 541 542 %if _EXTENSIONS 543 %if _HISTORY_SEPARATE_FIXED && _HISTORY || _APP_ENV_SIZE 0 00000134 8CC0 mov ax, es 545 %if _APP_ENV_SIZE 0 00000136 058000 add ax, paras(app_env_size) 547 %else 548 add ax, paras(historysegment_size) 549 %endif 550 %endif 0 00000139 A3[0000] mov word [extseg], ax 0 0000013C 8EC0 mov es, ax 0 0000013E 31FF xor di, di 0 00000140 B90010 mov cx, extsegment_size >> 1 0 00000143 31C0 xor ax, ax 0 00000145 F3AB rep stosw 557 %endif 558 %endif 559 0 00000147 89D8 mov ax, bx 561 0 00000149 A3[0000] mov word [auxbuff_segorsel + soaSegSel], ax 563 %if _PM 0 0000014C A3[0200] mov word [auxbuff_segorsel + soaSegment], ax 565 ; initialise auxbuff references 566 %endif 567 %if _IMMASM && _IMMASM_AUXBUFF 568 mov word [immseg], ax 569 %endif 570 0 0000014F 8EC0 mov es, ax 0 00000151 31FF xor di, di 0 00000153 B90810 mov cx, _AUXBUFFSIZE >> 1 0 00000156 31C0 xor ax, ax 0 00000158 F3AB rep stosw ; initialise auxbuff 576 0 0000015A FA cli 0 0000015B 8CD8 mov ax, ds 0 0000015D 8EC0 mov es, ax 0 0000015F 8ED0 mov ss, ax 0 00000161 BC[0000] mov sp, stack_end ; application mode stack switch 0 00000164 FB sti 583 0 00000165 B44A mov ah, 4Ah 585 %ifn _LINK 586 mov bx, paras(APPINITSTACK_START) 587 %else 0 00000167 BB[8208] mov bx, strict word relocatedzero + paras( + auxbuff_size + auxbuff_init_size + historysegment_size + app_env_size + extsegment_size) 593 wlcalc word_segrel_INIT, equ $ - 2 594 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 595 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 596 %endif 0 0000016A 2E891E[520E] mov word [cs:init_target_size], bx 0 0000016F 2E891E[500E] mov word [cs:init_base_size], bx 0 00000174 CD21 int 21h ; shrink to drop init stack 600 601 %if _CONFIG 602 find_config_application: 0 00000176 C606[0000]00 mov byte [configpath], 0 0 0000017B A12C00 mov ax, [2Ch] 0 0000017E BF[740F] mov di, imsg.varconfig 0 00000181 B90D00 mov cx, imsg.varconfig.length 0 00000184 BA[0000] mov dx, configpath 0 00000187 E86433 call init_copyvar 0 0000018A 7303 jnc .done 0 0000018C E82200 call find_executable_application 611 .done: 612 613 614 find_scripts_application: 0 0000018F 36C606[0000]00 mov byte [ss:scriptspath], 0 0 00000195 36A12C00 mov ax, [ss:2Ch] 0 00000199 BF[810F] mov di, imsg.varscripts 0 0000019C B90E00 mov cx, imsg.varscripts.length 0 0000019F BA[0000] mov dx, scriptspath 0 000001A2 E84933 call init_copyvar 0 000001A5 7303 jnc .done 0 000001A7 E80700 call find_executable_application 623 .done: 624 0 000001AA 16 push ss 0 000001AB 1F pop ds 0 000001AC 16 push ss 0 000001AD 07 pop es 629 %endif 630 0 000001AE E9201B jmp old_initcode 632 633 634 %if _CONFIG 635 ; INP: dx -> buffer 636 ; ds => PSP 637 find_executable_application: 0 000001B1 A12C00 mov ax, [2Ch] 0 000001B4 85C0 test ax, ax 0 000001B6 743E jz .noexec 0 000001B8 8ED8 mov ds, ax 0 000001BA 31F6 xor si, si 643 @@: 0 000001BC E8CB32 call init_nextvar 0 000001BF 75FB jne @B 0 000001C1 46 inc si 0 000001C2 AD lodsw 0 000001C3 83F801 cmp ax, 1 0 000001C6 752E jne .noexec 0 000001C8 1E push ds 0 000001C9 07 pop es 0 000001CA 89F7 mov di, si 0 000001CC B97F00 mov cx, 127 0 000001CF B000 mov al, 0 0 000001D1 F2AE repne scasb 0 000001D3 7521 jne .noexec 0 000001D5 4F dec di 658 0 000001D6 B90000 mov cx, 0 660 @@: 0 000001D9 39F7 cmp di, si 0 000001DB 7610 jbe @F 0 000001DD 4F dec di 0 000001DE 803D2F cmp byte [di], '/' 0 000001E1 7405 je .slash 0 000001E3 803D5C cmp byte [di], '\' 0 000001E6 75F1 jne @B 668 .slash: 0 000001E8 89F9 mov cx, di 0 000001EA 41 inc cx 0 000001EB 29F1 sub cx, si 672 @@: 673 0 000001ED 16 push ss 0 000001EE 07 pop es 0 000001EF 89D7 mov di, dx 0 000001F1 F3A4 rep movsb 0 000001F3 B000 mov al, 0 0 000001F5 AA stosb 680 681 .noexec: 682 .done: 0 000001F6 C3 retn 684 %endif 685 686 %endif 687 688 689 %if _APPLICATION || _DEVICE 690 ; INP: ds => (pseudo) PSP, data/entry segment 691 ; OUT: word [code_seg] set 692 ; code segments placed 693 ; CHG: ax, cx, dx 694 ; STT: UP 695 place_code_segments: 0 000001F7 8CD8 mov ax, ds 697 %ifn _LINK 698 add ax, paras(CODESECTIONOFFSET) 699 %else 0 000001F9 05[0000] add ax, strict word relocatedzero + 0 701 wlcalc word_segrel_lDEBUG_CODE, equ $ - 2 702 %endif 703 ; => code1 image, then code2 image 704 %if _BOOTLDR_DISCARD 705 %ifn _LINK 706 mov word [code_size], ldebug_code_bootldr_truncated_size 707 mov cx, ldebug_code_bootldr_truncated_size_p 708 %else 0 000001FC C706[0000][0F00] mov word [code_size], behind_code_truncated + 15 wrt lDEBUG_CODE 710 wlcalc word_clr_15, equ $ - 2 0 00000202 B9[0000] mov cx, relocatedzero + 0 712 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 713 %endif 714 ; prepare for code1 segment move 715 %if _DUALCODE 0 00000205 39D0 cmp ax, dx ; source above destination ? 0 00000207 7308 jae @F ; yes --> 0 00000209 E81000 call .place_code2 ; source is below, move "backward" (high first) 719 %endif 0 0000020C E8B719 call init_movp ; low last 721 %if _DUALCODE 0 0000020F EB06 jmp @FF 723 724 @@: 0 00000211 E8B219 call init_movp ; source is above, move "forward" (low first) 0 00000214 E80500 call .place_code2 ; high last 727 @@: 728 %endif 729 %else 730 %ifn _LINK 731 mov cx, ldebug_code_size_p + ldebug_code2_size_p ; untruncated 732 %else 733 mov cx, 0 734 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code2, equ $ - 2 735 %endif 736 call init_movp 737 %endif 0 00000217 8916[0000] mov word [code_seg], dx ; initialise code segment reference 0 0000021B C3 retn 740 741 %if _BOOTLDR_DISCARD && _DUALCODE 742 .place_code2: 0 0000021C 50 push ax 0 0000021D 51 push cx 0 0000021E 52 push dx 0 0000021F 01CA add dx, cx ; => behind truncated code1 segment 747 %ifn _LINK 748 add ax, ldebug_code_size_p ; untruncated 749 ; => at code2 image 750 mov cx, ldebug_code2_size_p 751 ; = size of code2 segment 752 %else 0 00000221 05[0000] add ax, strict word relocatedzero + 0 754 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 0 00000224 B9[0000] mov cx, relocatedzero + 0 756 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 757 %endif 0 00000227 E89C19 call init_movp 0 0000022A 5A pop dx 0 0000022B 59 pop cx 0 0000022C 58 pop ax 0 0000022D C3 retn 763 %endif 764 %endif 765 766 767 init_retf: 0 0000022E CB retf 769 770 771 ; INP: bx => destination for auxbuff 772 ; (The following are not actually used by this function, 773 ; they're just what is passed in and preserved to 774 ; be used by the caller after returning.) 775 ; dx => destination for code image 776 ; (if boot-loaded:) cx => destination for pseudo-PSP 777 ; (implies cx+10h => destination for data_entry) 778 ; ax => segment for history buffer 779 ; OUT: ZR if this destination for auxbuff doesn't cross 780 ; a 64 KiB boundary 781 ; NZ else 782 ; CHG: si, di 783 init_check_auxbuff: 0 0000022F 89DE mov si, bx ; => auxbuff 785 %if _AUXBUFFSIZE < 8192 786 %error Expected full sector length auxbuff 787 %endif 0 00000231 8DBC0002 lea di, [si + (8192 >> 4)]; => behind auxbuff (at additional paragraph) 0 00000235 81E600F0 and si, 0F000h ; => 64 KiB chunk of first paragraph of auxbuff 0 00000239 81E700F0 and di, 0F000h ; => 64 KiB chunk of additional paragraph 0 0000023D 39F7 cmp di, si ; same ? 792 ; ZR if they are the same 0 0000023F C3 retn 794 795 796 %if _BOOTLDR 797 ; Our loader transfers control to us with these registers: 798 ; INP: ss:bp -> BPB 799 ; ss:bp - 16 -> loadstackvars 800 ; ss:bp - 32 -> loaddata 801 ; (loader enters at) cs:0 -> loaded payload 802 ; (loader enters at) cs:32 -> entry point 803 ; (entrypoint sets up) ds:100h -> loaded payload 804 ; STT: EI, UP 805 ; all interrupts left from BIOS 806 boot_initcode: 0 00000240 FC cld 808 809 d4 call init_d4message 810 d4 asciz "In boot_initcode",13,10 811 0 00000241 8B56E0 mov dx, word [bp + ldMemoryTop] 813 814 ; initialise sdp 0 00000244 8B461E mov ax, word [bp + bsBPB + bpbHiddenSectors + 2] 0 00000247 A3[4E00] mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2], ax 0 0000024A 8B461C mov ax, word [bp + bsBPB + bpbHiddenSectors] 0 0000024D A3[4C00] mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors], ax 819 0 00000250 31DB xor bx, bx 0 00000252 8A4640 mov al, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 0 00000255 A2[7000] mov byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit], al 0 00000258 88C3 mov bl, al ; bx = LD unit 0 0000025A 84C0 test al, al ; hdd or diskette ? 0 0000025C 8B46EC mov ax, word [bp + ldQueryPatchValue] 0 0000025F 7902 jns @F ; diskette --> 0 00000261 86C4 xchg al, ah ; get high word of query patch value 828 @@: 0 00000263 84C0 test al, al ; use for our access to this unit ? 0 00000265 7906 jns @F ; no --> 0 00000267 2407 and al, luf_mask_writable ; clear unused bits 0 00000269 8887[0000] mov byte [load_unit_flags + bx], al 833 ; save here 834 @@: 835 836 0 0000026D 8CDB mov bx, ds 0 0000026F 8EC3 mov es, bx ; => data entry image 0 00000271 BF[0000] mov di, loaddata_loadedfrom ; -> loaded from data (ldp) 840 841 ; initialise LOADDATA, LOADSTACKVARS, and BPB 0 00000274 16 push ss 0 00000275 1F pop ds 0 00000276 8D76E0 lea si, [bp + LOADDATA] ; -> LOADDATA on stack 0 00000279 B97A00 mov cx, (-LOADDATA + bsBPB + ebpbNew + BPBN_size) 0 0000027C F3A4 rep movsb 847 848 ; initialise cmdline_buffer from below LOADDATA 0 0000027E 8DB6E0FE lea si, [bp + ldCommandLine.start] 0 00000282 BF[0000] mov di, cmdline_buffer ; -> our buffer in data entry 851 0 00000285 813C00FF cmp word [si], 0FF00h 0 00000289 7505 jne @F 854 0 0000028B 0E push cs 0 0000028C 1F pop ds 0 0000028D BE[8218] mov si, imsg.default_cmdline.boot 858 859 @@: 0 00000290 AC lodsb 0 00000291 84C0 test al, al 0 00000293 7423 jz @FF 863 0 00000295 26800E[0100]01 setopt [es:internalflags3], dif3_input_cmdline 0 0000029B A9 db __TEST_IMM16 866 .switch_c_loop: 0 0000029C AA stosb 0 0000029D AC lodsb 869 .switch_c_loop_after_semicolon: 0 0000029E 3C00 cmp al, 0 0 000002A0 7415 je @F 0 000002A2 3C3B cmp al, ';' 0 000002A4 7508 jne .switch_c_not_semicolon 0 000002A6 B00D mov al, 13 0 000002A8 AA stosb 0 000002A9 E80133 call init_skipwhite 0 000002AC EBF0 jmp .switch_c_loop_after_semicolon 878 879 .switch_c_not_semicolon: 0 000002AE 3C5C cmp al, '\' 0 000002B0 75EA jne .switch_c_loop 0 000002B2 AC lodsb 0 000002B3 3C00 cmp al, 0 0 000002B5 75E5 jne .switch_c_loop 885 886 @@: 0 000002B7 AA stosb 888 @@: 889 890 ; es => data entry image 0 000002B8 16 push ss 0 000002B9 1F pop ds 0 000002BA 8D765A lea si, [bp + bsBPB + ebpbNew + BPBN_size] ; -> tail (FAT32 style) 894 ; ds:si -> tail. this is the same for FAT12/FAT16 as FAT32 0 000002BD B9C201 mov cx, 512 - (bsBPB + bpbNew + BPBN_size) ; tail size FAT12/FAT16 0 000002C0 837E1600 cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 0 000002C4 7503 jne @F 0 000002C6 B9A601 mov cx, 512 - (bsBPB + ebpbNew + BPBN_size) ; tail size FAT32 899 @@: 0 000002C9 E8CB04 call findname 901 902 %if _EXECUTABLE 0 000002CC 53 push bx 0 000002CD 06 push es 0 000002CE 1F pop ds 0 000002CF BE[0000] mov si, boot_init_foundname 0 000002D2 BF[0000] mov di, init_executable_pathname 0 000002D5 803C00 cmp byte [si], 0 0 000002D8 7415 je .unable 910 0 000002DA 31C9 xor cx, cx 0 000002DC 89F3 mov bx, si 913 @@: 0 000002DE AC lodsb 0 000002DF 41 inc cx 0 000002E0 84C0 test al, al 0 000002E2 75FA jnz @B 918 0 000002E4 BE[D018] mov si, imsg.ldpslash 920 0 000002E7 2EA5 cs movsw 0 000002E9 2EA5 cs movsw 923 0 000002EB 89DE mov si, bx 0 000002ED F3A4 rep movsb 926 927 .unable: 0 000002EF BF[0000] mov di, init_executable_pathname 0 000002F2 31C0 xor ax, ax 0 000002F4 B98000 mov cx, 128 0 000002F7 F2AE repne scasb 0 000002F9 4F dec di 0 000002FA 893E[0000] mov word [init_executable_pathname.end], di 0 000002FE 5B pop bx 935 %endif 936 0 000002FF 89D0 mov ax, dx 938 %ifn _LINK 939 sub ax, paras(BOOTDELTA) 940 %else 941 %if 0 942 %define BOOTDELTA (fromkib(kib(auxbuff_size * 2 + historysegment_boot_size + boot_env_size + extsegment_boot_size + datastack_size + INITSECTIONOFFSET + 16))) 948 %endif 0 00000301 2D[830A] sub ax, strict word relocatedzero + paras( + auxbuff_size * 2 + historysegment_boot_size + boot_env_size + extsegment_boot_size + 16) 955 wlcalc word_segrel_INIT, equ $ - 2 956 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 957 wlcalc word_add_63, equ $ - 2 ; 1023 >> 4 958 wlcalc word_clr_63, equ $ - 2 ; 1023 >> 4 959 %endif 0 00000304 7303E96101 jc .error_out_of_memory 961 ; We exaggerate the target size (BOOTDELTA) for the 962 ; worst case, thus we do not need to check for narrower 963 ; fits later on. BOOTDELTA includes the pseudo-PSP size, 964 ; data_entry size, asmtable1_size, asmtable2_size, 965 ; datastack_size, code_size, 2 times auxbuff_size, 966 ; historysegment_boot_size, boot_env_size, 967 ; extsegment_boot_size, 968 ; plus 16 bytes for the image ident prefix paragraph, 969 ; and all of that rounded to a kibibyte boundary. 970 0 00000309 8CC9 mov cx, cs 972 %ifn _LINK 973 add cx, paras(init_size + BOOTINITSTACK_SIZE) 974 %else 0 0000030B 81C1[2000] add cx, strict word relocatedzero + paras(BOOTINITSTACK_SIZE) 976 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 977 %endif 0 0000030F 7303E95601 jc .error_out_of_memory 0 00000314 39D1 cmp cx, dx 0 00000316 7603E94F01 ja .error_out_of_memory 981 ; This requires that above the image (including init) 982 ; there is some 512 bytes free. That could be a problem 983 ; except we've already exhausted the iniload-internally 984 ; used buffers + stack, and do not need to preserve any 985 ; of those. Recall that dx holds MemoryTop, *not* the 986 ; lower LoadTop which could be right behind the image. 987 ; The sector buffer alone is documented as being 8 KiB 988 ; sized, not to mention the FAT buffer and stack and 989 ; LOADDATA/LOADSTACKVARS/BPB/boot sector. 990 0 0000031B F646E704 testopt [bp + ldHasLBA], ldhlfPreserveLoader 992 ; set NZ if loader resident 993 0 0000031F 8CCF mov di, cs 0 00000321 FA cli 0 00000322 8ED7 mov ss, di 997 %ifn _LINK 998 mov sp, init_size + BOOTINITSTACK_SIZE 999 %else 0 00000324 BC[0002] mov sp, BOOTINITSTACK_SIZE + behind_init wrt INIT 1001 %endif 0 00000327 FB sti 1003 1004 d4 call init_d4message 1005 d4 asciz "Switched to init stack",13,10 1006 1007 lframe none 1008 lvar word, target 0 00000328 5589E550 lenter 1010 lvar word, targetstart 0 0000032C 50 push ax 1012 lvar word, memtop 0 0000032D 52 push dx 0 0000032E 8D7F10 lea di, [bx + 10h] 1015 lvar word, data 0 00000331 57 push di 1017 lvar word, lowestused 0 00000332 57 push di 1019 %ifn _LINK 1020 lea di, [bx + paras(CODESECTIONOFFSET)] 1021 %else 0 00000333 8DBF[0000] lea di, [word relocatedzero + bx + 0] 1023 wlcalc word_segrel_lDEBUG_CODE, equ $ - 2 1024 %endif 1025 lvar word, code 0 00000337 57 push di 1027 lvar dword, loaderentry 0 00000338 50 push ax 0 00000339 50 push ax 0 0000033A BF6000 mov di, 60h 1031 lvar word, lowlimit 0 0000033D 57 push di 1033 1034 %if !_LOADER 0 0000033E 51 push cx 0 0000033F 50 push ax 1037 1038 ; had set NZ if loader resident 0 00000340 745B jz .no_loader 0 00000342 E80B05 call get_size_and_ebda 0 00000345 8B5EFA mov bx, word [bp + ?memtop] 0 00000348 2E031E[640E] add bx, [cs:init_boot_ebdasize] 0 0000034D 8EC3 mov es, bx 0 0000034F 31FF xor di, di 0 00000351 0E push cs 0 00000352 1F pop ds 0 00000353 BE[300E] mov si, loader_imageident 0 00000356 B90300 mov cx, words(loader_imageident.size) 0 00000359 BA[FA19] mov dx, imsg.boot_warn_no_loader 0 0000035C F3A7 repe cmpsw 0 0000035E 7532 jne .loaderwarning 0 00000360 31F6 xor si, si 0 00000362 31D2 xor dx, dx 0 00000364 B90800 mov cx, 8 1055 @@: 0 00000367 26AD es lodsw 0 00000369 01C2 add dx, ax 0 0000036B E2FA loop @B 0 0000036D BA[171A] mov dx, imsg.boot_warn_invalid_loader 0 00000370 7520 jnz .loaderwarning 1061 0 00000372 895EF2 mov word [bp + ?loaderentry + 2], bx 0 00000375 2EF616[6B0E] not byte [cs:init_preserveloader] 0 0000037A BA[351A] mov dx, imsg.boot_warn_lazy_loader 0 0000037D 268B0E1000 mov cx, word [es:liiEntryQuerySize] 0 00000382 E30E jcxz .loaderwarning 0 00000384 894EF0 mov word [bp + ?loaderentry], cx 0 00000387 B86000 mov ax, 60h 0 0000038A FF5EF0 call far [bp + ?loaderentry] 0 0000038D 8946EE mov word [bp + ?lowlimit], ax 0 00000390 EB0B jmp @F 1072 1073 .loaderwarning: 0 00000392 52 push dx 0 00000393 BA[D219] mov dx, imsg.bootwarn 0 00000396 E8E018 call init_putsz_cs_bootldr 0 00000399 5A pop dx 0 0000039A E8DC18 call init_putsz_cs_bootldr 1079 @@: 1080 1081 .no_loader: 0 0000039D 58 pop ax 0 0000039E 59 pop cx 1084 %endif 1085 0 0000039F 39C1 cmp cx, ax ; does init end below-or-equal target ? 0 000003A1 7703E9DF00 jbe .no_relocation ; yes, no relocation needed --> 1088 1089 d4 call init_d4message 1090 d4 asciz "Needs relocation of init segment",13,10 1091 0 000003A6 8B46F8 mov ax, word [bp + ?data] 1093 %ifn _LINK 1094 sub ax, strict word paras(init_size + BOOTINITSTACK_SIZE) 1095 %else 0 000003A9 2D[2000] sub ax, strict word relocatedzero + paras(BOOTINITSTACK_SIZE) 1097 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 1098 %endif 0 000003AC 7303E9B900 jc .error_out_of_memory ; already at start of memory --> 0 000003B1 3B46EE cmp ax, [bp + ?lowlimit] 0 000003B4 7303E9B100 jb .error_out_of_memory ; already at start of memory --> 1102 1103 ; The relocation never overlaps, as we move init 1104 ; and its stack to the space before the image. 1105 ; Therefore we can move UP. And only a single 1106 ; rep movsw instruction is needed as init and 1107 ; its stack always fit in a single segment. 0 000003B9 0E push cs 0 000003BA 1F pop ds 0 000003BB 31F6 xor si, si ; -> init source 0 000003BD 8EC0 mov es, ax 0 000003BF 8946F6 mov word [bp + ?lowestused], ax 0 000003C2 31FF xor di, di ; -> init destination 1114 %ifn _LINK 1115 mov cx, words(init_size + BOOTINITSTACK_SIZE) 1116 %else 0 000003C4 B9[0102] mov cx, BOOTINITSTACK_SIZE + 1 + behind_init wrt INIT 1118 wlcalc word_shr_1, equ $ - 2 1119 %endif 0 000003C7 F3A5 rep movsw ; relocate only init 1121 ; Must not modify the data already on the stack here, 1122 ; until after either .done_relocation or 1123 ; .entire_relocation_done (which both relocate ss). 1124 0 000003C9 50 push ax 0 000003CA E861FE call init_retf ; jump to new init 1127 1128 ; mov ss, ax 1129 ; Logic error: The entire load image relocation would 1130 ; make it so that the stack would corrupt part of the 1131 ; load image that had been relocated the first time 1132 ; already here. We want to keep using the high stack 1133 ; here until both relocations are done, at which point 1134 ; we *must* relocate ss so as to get the stack out of 1135 ; the way of installing the final image components. 1136 ; Avoid modifying the stack frame variables until after 1137 ; we have relocated the stack. However, temporary use 1138 ; of the stack is okay before relocating it. (It must 1139 ; be because IRQs and debugger tracing will use it.) 0 000003CD 8B4EF4 mov cx, word [bp + ?code] 1141 %ifn _LINK 1142 add cx, paras(ldebug_code_size + ldebug_code2_size) ; untruncated 1143 %else 0 000003D0 81C1[0000] add cx, strict word relocatedzero + 0 1145 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code2, equ $ - 2 1146 %endif 0 000003D4 3B4EFC cmp cx, word [bp + ?targetstart] 1148 ; does code end below-or-equal target ? 0 000003D7 7703E99C00 jbe .done_relocation ; yes, relocated enough --> 1150 1151 .entire_relocation_needed: 1152 d4 call init_d4message 1153 d4 asciz "Needs relocation of entire load image",13,10 1154 0 000003DC 8B56EE mov dx, [bp + ?lowlimit] 0 000003DF 8EC2 mov es, dx 0 000003E1 8CC8 mov ax, cs 0 000003E3 39C2 cmp dx, ax ; already at start of memory ? 0 000003E5 7203E98000 jae .error_out_of_memory ; then error --> 1160 ; This move is always downwards, that is, we can 1161 ; move UP. Multiple instructions operating on 1162 ; different segments may be needed as the image 1163 ; can be larger than 64 KiB. 1164 ; However, init was already moved to before the 1165 ; remainder of the image, so the first 64 KiB 1166 ; move will always leave init finished and 1167 ; ready to use. So only move the first chunk 1168 ; in the special relocator, then jump into the 1169 ; final relocated init to do the remainder. 1170 0 000003EA 42 inc dx 1172 ; cmp dx, ax 1173 ; ja .error_out_of_memory 0 000003EB B9[2404] mov cx, .relocated 0 000003EE 52 push dx 0 000003EF 51 push cx ; on stack: far address of .relocated 1177 0 000003F0 89C1 mov cx, ax ; source 0 000003F2 29D1 sub cx, dx ; source - target = how far to relocate 1180 0 000003F4 31FF xor di, di ; es:di -> where to put relocator 0 000003F6 06 push es 0 000003F7 57 push di ; on stack: relocator destination 0 000003F8 51 push cx ; on stack: how far to relocate 0 000003F9 0E push cs 0 000003FA 1F pop ds 0 000003FB BE[2104] mov si, .relocator ; -> relocator source 0 000003FE B90800 mov cx, 8 0 00000401 F3A5 rep movsw ; put relocator stub 1190 0 00000403 8EC2 mov es, dx 0 00000405 5A pop dx ; dx = how far to relocate 1193 0 00000406 31FF xor di, di ; -> where to relocate to 0 00000408 31F6 xor si, si ; -> relocate start 1196 1197 %ifn _LINK 1198 BOOTRELOC1 equ paras( init_size + BOOTINITSTACK_SIZE + DATAENTRYTABLESIZE + messagesegment_size + ldebug_code_size + ldebug_code2_size) ; untruncated 1202 %endif 1203 1204 %if _LINK_COMPAT || _LINK 1205 %ifn _LINK 1206 mov cx, BOOTRELOC1 ; how much to relocate 1207 %else 0 0000040A B9[1000] mov cx, relocatedzero + paras(BOOTINITSTACK_SIZE - 256) 1209 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 1210 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_behind_progbits_dataentry, equ $ - 2 1211 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment, equ $ - 2 1212 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code2, equ $ - 2 1213 %endif 0 0000040D BB0010 mov bx, 1000h 0 00000410 89C8 mov ax, cx 0 00000412 39D8 cmp ax, bx ; > 64 KiB? 0 00000414 7602 jbe @F 0 00000416 89D9 mov cx, bx ; first relocate the first 64 KiB 1219 @@: 0 00000418 29C8 sub ax, cx ; how much to relocate later 0 0000041A D1E1 shl cx, 1 0 0000041C D1E1 shl cx, 1 0 0000041E D1E1 shl cx, 1 ; how much to relocate first, 1224 ; << 3 == convert paragraphs to words 1225 %else 1226 mov bx, 1000h 1227 %if BOOTRELOC1 > 1000h 1228 mov cx, 8000h 1229 mov ax, BOOTRELOC1 - 1000h 1230 %else 1231 mov cx, BOOTRELOC1 << 3 1232 xor ax, ax 1233 %endif 1234 %endif 0 00000420 CB retf ; jump to relocator 1236 1237 ; ds:si -> first chunk of to be relocated data 1238 ; es:di -> first chunk of relocation destination 1239 ; (si = di = 0, and es always <= ds) 1240 ; cx = number of words in first chunk 1241 ; ax = how many paragraphs remain after first chunk is done 1242 ; dx = how far to relocate in paragraphs 1243 ; bx = 1000h 1244 ; ss:sp -> far return address into relocated init section 1245 ; (this always points into the first chunk) 1246 .relocator: 0 00000421 F3A5 rep movsw 0 00000423 CB retf ; jump to relocated cs : .relocated 1249 .relocator_size equ $ - .relocator 1250 %if .relocator_size > 16 1251 %error Unexpected large relocator 1252 %endif 1253 1254 .relocated: 1255 ; ds => prior chunk of relocation source (may be corrupted) 1256 ; es => prior chunk of relocation destination 1257 ; cx = 0 1258 ; ax = how many paragraphs remain 1259 ; dx = how far to relocate in paragraphs 1260 ; bx = 1000h 1261 @@: 0 00000424 8CC1 mov cx, es 0 00000426 01D9 add cx, bx 0 00000428 8EC1 mov es, cx ; => next segment 1265 0 0000042A 8CD9 mov cx, ds 0 0000042C 01D9 add cx, bx 0 0000042E 8ED9 mov ds, cx ; => next segment 1269 0 00000430 29D8 sub ax, bx ; = how much to relocate after this round 0 00000432 B90080 mov cx, 1000h << 3 ; in case another full 64 KiB to relocate 0 00000435 730B jae @F ; another full 64 KiB to relocate this round --> 0 00000437 01D8 add ax, bx ; restore (possibly zero) 0 00000439 D1E0 shl ax, 1 0 0000043B D1E0 shl ax, 1 0 0000043D D1E0 shl ax, 1 ; convert paragraphs to words 0 0000043F 91 xchg cx, ax ; cx = that many words (possibly zero) 0 00000440 31C0 xor ax, ax ; no more to relocate after this round 1279 1280 @@: 1281 ; ds:0 -> next chunk of source 1282 ; es:0 -> next chunk of destination 1283 ; cx = how many words in this chunk, may be zero 1284 ; ax = how many paragraphs remain for next round 1285 ; (if ax is nonzero then cx is 8000h for a full 64 KiB) 1286 ; dx = how far to relocate in paragraphs 1287 ; bx = 1000h 0 00000442 31F6 xor si, si ; -> source 0 00000444 31FF xor di, di ; -> destination 0 00000446 F3A5 rep movsw ; relocate next chunk 0 00000448 85C0 test ax, ax ; another round needed? 0 0000044A 75D8 jnz @BB ; yes --> 1293 1294 .entire_relocation_done: 0 0000044C 8CC8 mov ax, cs 0 0000044E 8ED0 mov ss, ax ; relocate the stack 0 00000450 90 nop 1298 ; The stack frame variables have been relocated here 1299 ; along with the INIT segment data. 1300 1301 ; Now okay to modify relocated stack frame variables. 0 00000451 8946F6 mov word [bp + ?lowestused], ax 0 00000454 2956F8 sub word [bp + ?data], dx 0 00000457 721A jc .error_internal 0 00000459 2956F4 sub word [bp + ?code], dx 0 0000045C 7215 jc .error_internal 1307 0 0000045E 8B4EF4 mov cx, word [bp + ?code] 1309 %ifn _LINK 1310 add cx, paras(ldebug_code_size + ldebug_code2_size) ; untruncated 1311 %else 0 00000461 81C1[0000] add cx, strict word relocatedzero + 0 1313 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code2, equ $ - 2 1314 %endif 0 00000465 3B4EFC cmp cx, word [bp + ?targetstart] 1316 ; does code end below-or-equal target ? 0 00000468 760E jbe .done_relocation ; yes --> 1318 1319 .error_out_of_memory: 0 0000046A BA[4E19] mov dx, imsg.boot_error_out_of_memory 1321 .putsz_error: 0 0000046D E80918 call init_putsz_cs_bootldr 0 00000470 E95E04 jmp init_booterror.soft 1324 1325 .error_internal: 0 00000473 BA[5F19] mov dx, imsg.boot_error_internal 0 00000476 EBF5 jmp .putsz_error 1328 1329 1330 .done_relocation: 0 00000478 8CC8 mov ax, cs 0 0000047A 8ED0 mov ss, ax ; relocate the stack 0 0000047C 90 nop 1334 ; Not needed if we got here after having executed 1335 ; .entire_relocation_done or by branching to this 1336 ; place through the .no_relocation label, but 1337 ; doesn't hurt in those cases either. 1338 ; The stack frame variables have been relocated here 1339 ; along with the INIT segment data. 0 0000047D 8B46F6 mov ax, word [bp + ?lowestused] 0 00000480 3B46EE cmp ax, word [bp + ?lowlimit] 0 00000483 72E5 jb .error_out_of_memory 1343 1344 .no_relocation: 0 00000485 2EC606[D608]A8 mov byte [cs:init_booterror.patch_switch_stack], __TEST_IMM8 1346 ; SMC in section INIT 1347 1348 ; Due to the prior check in .done_relocation, 1349 ; we only go to .relocatehigh if the init is 1350 ; still at its initial position (*above* the 1351 ; data and code images). We depend on this 1352 ; in order to relocate init first, then do 1353 ; the remaining (image) relocation from init. 0 0000048B 8B46F6 mov ax, word [bp + ?lowestused] 0 0000048E 2B46EE sub ax, word [bp + ?lowlimit] 0 00000491 735E jae .highenough 1357 .relocatehigh: 0 00000493 F7D8 neg ax ; how much to relocate higher 0 00000495 8CC9 mov cx, cs 1360 %ifn _LINK 1361 add cx, paras(init_size + BOOTINITSTACK_SIZE + 256) 1362 %else 0 00000497 81C1[3000] add cx, strict word relocatedzero + paras(BOOTINITSTACK_SIZE + 256) 1364 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 1365 %endif 0 0000049B 72CD jc .error_out_of_memory 0 0000049D 01C1 add cx, ax ; => past wanted init 0 0000049F 72C9 jc .error_out_of_memory 0 000004A1 3B4EFC cmp cx, word [bp + ?targetstart] 0 000004A4 73C4 jae .error_out_of_memory ; if too little left --> 1371 0 000004A6 8CCA mov dx, cs 0 000004A8 01C2 add dx, ax ; => destination init 0 000004AA 89E3 mov bx, sp ; preserve sp 0 000004AC FA cli 0 000004AD 8ED2 mov ss, dx 1377 %ifn _LINK 1378 mov sp, fromwords(words(init_size + BOOTINITSTACK_SIZE + 256 - 1)) 1379 %else 0 000004AF BC[0003] mov sp, behind_init + BOOTINITSTACK_SIZE + 256 wrt INIT 1381 wlcalc word_clr_1, equ $ - 2 1382 %endif 1383 ; go to temporary stack 0 000004B2 FB sti 0 000004B3 BF[D504] mov di, .relocatedhigh 0 000004B6 52 push dx 0 000004B7 57 push di ; -> relocated .relocatedhigh (temp stack) 0 000004B8 41 inc cx 0 000004B9 8EC1 mov es, cx ; => relocator destination 0 000004BB 31FF xor di, di 0 000004BD 06 push es 0 000004BE 57 push di ; -> relocator destination (temp stack) 0 000004BF 0E push cs 0 000004C0 1F pop ds 0 000004C1 BE[2104] mov si, .relocator ; -> relocator source 0 000004C4 B90800 mov cx, 8 0 000004C7 F3A5 rep movsw ; put relocator stub 0 000004C9 8EC2 mov es, dx 1399 %ifn _LINK 1400 mov cx, words(init_size + BOOTINITSTACK_SIZE) 1401 mov si, fromwords(words(init_size + BOOTINITSTACK_SIZE)) - 2 1402 %else 0 000004CB B9[0102] mov cx, behind_init + BOOTINITSTACK_SIZE + 1 wrt INIT 1404 wlcalc word_shr_1, equ $ - 2 0 000004CE BE[FF01] mov si, behind_init + BOOTINITSTACK_SIZE + 1 - 2 wrt INIT 1406 wlcalc word_clr_1, equ $ - 2 1407 %endif 0 000004D1 89F7 mov di, si ; -> last word 0 000004D3 FD std 0 000004D4 CB retf ; (uses temp stack) 1411 1412 .relocatedhigh: 0 000004D5 FC cld 1414 %if 0 ; ss already == dx 1415 cli 1416 mov ss, dx 1417 mov sp, bx 1418 sti 1419 %else 0 000004D6 89DC mov sp, bx ; restore original stack 1421 %endif 0 000004D8 8B56F8 mov dx, word [bp + ?data] ; => data source 0 000004DB 0146F8 add word [bp + ?data], ax 0 000004DE 7293 jc .error_internal 0 000004E0 0146F4 add word [bp + ?code], ax 0 000004E3 728E jc .error_internal 1427 0 000004E5 52 push dx 0 000004E6 01C2 add dx, ax ; => data destination 0 000004E8 7289 jc .error_internal 0 000004EA 58 pop ax ; => data source 1432 %ifn _LINK 1433 mov cx, paras(CODESECTIONOFFSET + ldebug_code_size + ldebug_code2_size) ; untruncated 1435 %else 0 000004EB B9[0000] mov cx, relocatedzero + 0 1437 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_behind_code2, equ $ - 2 1438 %endif 1439 ; = data + code size 0 000004EE E8D516 call init_movp 1441 1442 .highenough: 1443 1444 1445 d4 call init_d4message 1446 d4 asciz "Relocated enough",13,10 1447 1448 1449 %if !_LOADER 0 000004F1 2ED006[6B0E] rol byte [cs:init_preserveloader], 1 0 000004F6 7326 jnc @F 1452 0 000004F8 BA[661A] mov dx, imsg.boot_warn_loader_no_reloc 0 000004FB 8E46F2 mov es, word [bp + ?loaderentry + 2] 0 000004FE 268B0E1200 mov cx, word [es:liiEntryRelocate] 0 00000503 E30E jcxz .reloc_loaderwarning 0 00000505 894EF0 mov word [bp + ?loaderentry], cx 0 00000508 B86000 mov ax, 60h 0 0000050B FF5EF0 call far [bp + ?loaderentry] 0 0000050E 8946F2 mov word [bp + ?loaderentry + 2], ax 1461 ; update our reference 0 00000511 EB0B jmp @F 1463 1464 .reloc_loaderwarning: 0 00000513 52 push dx 0 00000514 BA[D219] mov dx, imsg.bootwarn 0 00000517 E85F17 call init_putsz_cs_bootldr 0 0000051A 5A pop dx 0 0000051B E85B17 call init_putsz_cs_bootldr 1470 @@: 1471 %endif 1472 0 0000051E E82F03 call get_size_and_ebda 1474 0 00000521 8B4EFA mov cx, word [bp + ?memtop] 0 00000524 2E030E[640E] add cx, [cs:init_boot_ebdasize] 1477 %ifn _LINK 1478 sub cx, paras(INITSECTIONOFFSET - messagesegment_size + messagesegment_nobits_size + datastack_size + auxbuff_size + historysegment_boot_size + boot_env_size + extsegment_boot_size) 1479 %else 0 00000529 81E9[8108] sub cx, relocatedzero + paras( + auxbuff_size + historysegment_boot_size + boot_env_size + extsegment_boot_size) 1485 wlcalc word_segrel_INIT, equ $ - 2 1486 wlcalc word_wrt_MESSAGESEGMENT_minusextpara_behind_messagesegment, equ $ - 2 1487 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1488 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1489 %endif 1490 1491 ; cx = paragraph of pseudo-PSP if here 1492 %if !_LOADER 0 0000052D 49 dec cx ; => paragraph of image ident 0 0000052E 83E1C0 and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 0 00000531 41 inc cx ; => paragraph of pseudo-PSP if here 1496 %else 1497 and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 1498 %endif 1499 0 00000532 89CB mov bx, cx 0 00000534 89DA mov dx, bx 1502 %ifn _LINK 1503 add bx, paras(BOOTAUXTARGET1) ; => auxbuff target if here 1504 add dx, paras(BOOTCODETARGET1) ; => code target if here 1505 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 1506 mov ax, bx 1507 add ax, paras(auxbuff_size) 1508 %if BOOTAUXTARGET1_equate <= BOOTCODETARGET1_equate 1509 %error Unexpected layout 1510 %endif 1511 %endif 1512 %else ; _LINK 1513 %if 0 1514 %define BOOTCODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_size + datastack_size) 1515 %define BOOTCODETARGET2 (BOOTCODETARGET1+auxbuff_size) 1516 %define BOOTAUXTARGET1 (BOOTCODETARGET1+ldebug_code_size+ldebug_code2_size) 1517 %define BOOTAUXTARGET2 BOOTCODETARGET1 1518 %define BOOTAUXTARGET3 (BOOTAUXTARGET1+auxbuff_size) 1519 %endif 1520 ; add bx, paras(BOOTAUXTARGET1) 0 00000536 81C3[0000] add bx, strict word relocatedzero + 0 1522 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 1523 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1524 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1525 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 1526 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 1527 ; add dx, paras(BOOTCODETARGET1) 0 0000053A 81C2[0000] add dx, strict word relocatedzero + 0 1529 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 1530 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1531 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1532 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 0 0000053E 89D8 mov ax, bx 0 00000540 050102 add ax, paras(auxbuff_size) 1535 %endif 1536 %endif ; _LINK 0 00000543 E8E9FC call init_check_auxbuff 0 00000546 743E jz @F 1539 1540 d4 call init_d4message 1541 d4 asciz "First layout rejected",13,10 1542 0 00000548 89CB mov bx, cx ; attempt same target again 0 0000054A 89DA mov dx, bx 1545 %ifn _LINK 1546 add bx, paras(BOOTAUXTARGET2) ; => auxbuff target if here 1547 add dx, paras(BOOTCODETARGET2) ; => code target if here 1548 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 1549 %if (paras(BOOTAUXTARGET1_equate) + paras(auxbuff_size_equate)) != (paras(BOOTCODETARGET2_equate) + paras(ldebug_codes_size_equate)) 1551 %error Unexpected layout 1552 %endif 1553 %endif 1554 %else ; _LINK 1555 %if 0 1556 %define BOOTCODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_size + datastack_size) 1557 %define BOOTCODETARGET2 (BOOTCODETARGET1+auxbuff_size) 1558 %define BOOTAUXTARGET1 (BOOTCODETARGET1+ldebug_code_size+ldebug_code2_size) 1559 %define BOOTAUXTARGET2 BOOTCODETARGET1 1560 %define BOOTAUXTARGET3 (BOOTAUXTARGET1+auxbuff_size) 1561 %endif 1562 ; add bx, paras(BOOTAUXTARGET2) 0 0000054C 81C3[0000] add bx, strict word relocatedzero + 0 1564 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 1565 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1566 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1567 ; add dx, paras(BOOTCODETARGET2) 0 00000550 81C2[0102] add dx, strict word relocatedzero + paras(auxbuff_size) 1569 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 1570 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1571 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1572 %endif ; _LINK 0 00000554 E8D8FC call init_check_auxbuff 0 00000557 742D jz @F 1575 1576 d4 call init_d4message 1577 d4 asciz "Second layout rejected",13,10 1578 1579 ; If both prior attempts failed, we allocate 1580 ; an additional 8 KiB and move the buffer to 1581 ; that. This should always succeed. 0 00000559 8B4EFA mov cx, word [bp + ?memtop] 0 0000055C 2E030E[640E] add cx, [cs:init_boot_ebdasize] 1584 %ifn _LINK 1585 sub cx, paras(INITSECTIONOFFSET - messagesegment_size + messagesegment_nobits_size + datastack_size + auxbuff_size*2 + historysegment_boot_size + boot_env_size + extsegment_boot_size) 1586 %else ; _LINK 0 00000561 81E9[820A] sub cx, relocatedzero + paras( + auxbuff_size * 2 + historysegment_boot_size + boot_env_size + extsegment_boot_size) 1592 wlcalc word_segrel_INIT, equ $ - 2 1593 wlcalc word_wrt_MESSAGESEGMENT_minusextpara_behind_messagesegment, equ $ - 2 1594 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1595 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1596 %endif ; _LINK 1597 ; cx = paragraph of pseudo-PSP if here 1598 %if !_LOADER 0 00000565 49 dec cx ; => paragraph of image ident 0 00000566 83E1C0 and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 0 00000569 41 inc cx ; => paragraph of pseudo-PSP if here 1602 %else 1603 and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 1604 %endif 0 0000056A 89CB mov bx, cx 0 0000056C 89DA mov dx, bx 1607 %ifn _LINK 1608 add bx, paras(BOOTAUXTARGET1) ; => auxbuff target if here 1609 ; Note that we use BOOTAUXTARGET1 here, not BOOTAUXTARGET3, because 1610 ; we move where the debugger starts rather than where it ends. 1611 add dx, paras(BOOTCODETARGET1) ; => code target if here 1612 %else ; _LINK 1613 %if 0 1614 %define BOOTCODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_size + datastack_size) 1615 %define BOOTCODETARGET2 (BOOTCODETARGET1+auxbuff_size) 1616 %define BOOTAUXTARGET1 (BOOTCODETARGET1+ldebug_code_size+ldebug_code2_size) 1617 %define BOOTAUXTARGET2 BOOTCODETARGET1 1618 %define BOOTAUXTARGET3 (BOOTAUXTARGET1+auxbuff_size) 1619 %endif 1620 ; add bx, paras(BOOTAUXTARGET1) 0 0000056E 81C3[0000] add bx, strict word relocatedzero + 0 1622 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 1623 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1624 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1625 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 1626 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 1627 ; Note that we use BOOTAUXTARGET1 here, not BOOTAUXTARGET3, because 1628 ; we move where the debugger starts rather than where it ends. 1629 ; add dx, paras(BOOTCODETARGET1) 0 00000572 81C2[0000] add dx, strict word relocatedzero + 0 1631 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 1632 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits, equ $ - 2 1633 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 1634 %endif ; _LINK 1635 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 0 00000576 89D8 mov ax, bx 0 00000578 050102 add ax, paras(auxbuff_size) 1638 %endif 0 0000057B E8B1FC call init_check_auxbuff 0 0000057E 7406 jz @F 1641 1642 ; Because this shouldn't happen, this is 1643 ; considered an internal error. 0 00000580 BA[9310] mov dx, imsg.early_reloc_fail 0 00000583 E9E7FE jmp .putsz_error 1646 1647 1648 ; cx => data_entry target 1649 ; dx => code target 1650 ; bx => auxbuff target 1651 ; ax => history segment 1652 @@: 1653 d4 call init_d4message 1654 d4 asciz "Layout found" 1655 d4 call init_d4dumpregs 1656 d4 call init_d4message 1657 d4 asciz 13,10 1658 1659 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 0 00000586 50 push ax 1661 %endif 0 00000587 894EFE mov word [bp + ?target], cx 0 0000058A 52 push dx 0 0000058B 2E803E[6A0E]00 cmp byte [cs:init_boot_ebdaflag], 0 0 00000591 742F jz .reloc_memtop_no_ebda 1666 %if !_LOADER 0 00000593 49 dec cx 1668 %endif 0 00000594 2E2B0E[640E] sub cx, word [cs:init_boot_ebdasize] 0 00000599 2EA1[660E] mov ax, word [cs:init_boot_ebdasource] 0 0000059D 89CA mov dx, cx 0 0000059F 2E890E[680E] mov word [cs:init_boot_ebdadest], cx 0 000005A4 2E8B0E[640E] mov cx, word [cs:init_boot_ebdasize] 0 000005A9 FA cli 0 000005AA E81916 call init_movp 0 000005AD 014EFA add word [bp + ?memtop], cx 0 000005B0 2E800E[6A0E]02 or byte [cs:init_boot_ebdaflag], 2 0 000005B6 B84000 mov ax, 40h 0 000005B9 8EC0 mov es, ax 0 000005BB 2689160E00 mov word [es:0Eh], dx ; relocate EBDA 1681 1682 d4 call init_d4message 1683 d4 asciz "EBDA relocated",13,10 1684 0 000005C0 EB02 jmp @F 1686 1687 .reloc_memtop_no_ebda: 0 000005C2 89CA mov dx, cx 1689 @@: 0 000005C4 B106 mov cl, 6 0 000005C6 D3EA shr dx, cl 0 000005C8 B84000 mov ax, 40h 0 000005CB 8EC0 mov es, ax 0 000005CD 2E8916[600E] mov word [ cs:init_boot_new_memsizekib ], dx 0 000005D2 2687161300 xchg word [es:13h], dx 0 000005D7 2E8916[620E] mov word [ cs:init_boot_old_memsizekib ], dx 0 000005DC 5A pop dx 0 000005DD FB sti 1699 d4 call init_d4message 1700 d4 asciz "Memory top relocated",13,10 1701 0 000005DE 8B4EFE mov cx, word [bp + ?target] 0 000005E1 8ED9 mov ds, cx 0 000005E3 8B7EFA mov di, word [bp + ?memtop] ; => memory top 0 000005E6 81EF4002 sub di, paras(1024+8192) 0 000005EA 8EC7 mov es, di 0 000005EC 39CF cmp di, cx ; max padding starts below target PSP ? 0 000005EE 7209 jb @F ; yes, do not initialise padding 0 000005F0 31FF xor di, di ; -> padding 0 000005F2 B90012 mov cx, words(1024+8192) 0 000005F5 31C0 xor ax, ax 0 000005F7 F3AB rep stosw ; initialise padding 1713 @@: 1714 0 000005F9 8B46F4 mov ax, word [bp + ?code] ; => code source 1716 ; dx => code target 1717 %ifn _LINK 1718 mov cx, ldebug_code_size_p + ldebug_code2_size_p ; untruncated 1719 ; = size 1720 %else 0 000005FC B9[0000] mov cx, relocatedzero + 0 1722 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code2, equ $ - 2 1723 %endif 0 000005FF E8C415 call init_movp ; relocate code to target 1725 d4 call init_d4message 1726 d4 asciz "Code segment relocated",13,10 1727 0 00000602 52 push dx ; (code segment) 0 00000603 8B46F8 mov ax, word [bp + ?data] ; => data_entry source 0 00000606 8CDA mov dx, ds 0 00000608 83C210 add dx, paras(100h) ; => data_entry target 1732 %ifn _LINK 1733 mov cx, paras(DATAENTRYTABLESIZE) 1734 %else 0 0000060B B9[F0FF] mov cx, relocatedzero + - paras(256) 1736 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_behind_progbits_dataentry, equ $ - 2 1737 %endif 0 0000060E E8B515 call init_movp ; relocate data_entry to target 0 00000611 8F06[0000] pop word [code_seg] ; initialise code reference 1740 d4 call init_d4message 1741 d4 asciz "Data segment relocated",13,10 1742 1743 %if _MESSAGESEGMENT 0 00000615 8B46F8 mov ax, word [bp + ?data] ; => data_entry source 1745 %ifn _LINK 1746 add ax, paras(MESSAGESECTIONOFFSET - 100h) 1747 mov dx, ds 1748 add dx, paras(100h + DATAENTRYTABLESIZE + datastack_size) 1749 mov cx, paras(messagesegment_size) 1750 %else 0 00000618 05[F0FF] add ax, strict word relocatedzero + - paras(100h) 1752 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 0 0000061B 8CDA mov dx, ds 0 0000061D 81C2[0000] add dx, strict word relocatedzero + 0 1755 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_end_of_datastack, equ $ - 2 0 00000621 B9[0000] mov cx, relocatedzero + 0 1757 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment, equ $ - 2 1758 %endif 0 00000624 E89F15 call init_movp 0 00000627 8916[0000] mov word [messageseg], dx 1761 %if _HELP_COMPRESSED && ! _PM 1762 mov [hshrink_memory_source.segment], dx 1763 %endif 0 0000062B 8EC2 mov es, dx 1765 %ifn _LINK 1766 mov di, messagesegment_size 1767 xor ax, ax 1768 mov cx, words(messagesegment_nobits_size - messagesegment_size) 1769 %else 0 0000062D BF[0000] mov di, relocatedzero + 0 1771 wlcalc word_wrt_MESSAGESEGMENT_ext_behind_messagesegment, equ $ - 2 0 00000630 31C0 xor ax, ax 0 00000632 B9[0100] mov cx, behind_messagesegment_nobits + 1 wrt MESSAGESEGMENT 1774 wlcalc word_wrt_MESSAGESEGMENT_minusext_behind_messagesegment, equ $ - 2 1775 wlcalc word_shr_1, equ $ - 2 1776 %endif 0 00000635 F3AB rep stosw 1778 %endif 1779 1780 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 0 00000637 58 pop ax 1782 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000638 A3[0000] mov word [history.segorsel + soaSegSel], ax 1784 %if _PM 0 0000063B A3[0200] mov word [history.segorsel + soaSegment], ax 1786 %endif 0 0000063E 8EC0 mov es, ax 0 00000640 31FF xor di, di 0 00000642 B90010 mov cx, historysegment_boot_size >> 1 0 00000645 31C0 xor ax, ax 0 00000647 F3AB rep stosw 1792 %endif 1793 1794 %if _BOOT_ENV_SIZE 1795 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000649 8CC0 mov ax, es 0 0000064B 050002 add ax, paras(historysegment_boot_size) 1798 %endif 0 0000064E A3[0000] mov word [envseg], ax 0 00000651 8EC0 mov es, ax 0 00000653 89C2 mov dx, ax 0 00000655 42 inc dx 0 00000656 31FF xor di, di 0 00000658 B90004 mov cx, boot_env_size >> 1 0 0000065B C706[0000]0008 mov word [env_size], boot_env_size 0 00000661 31C0 xor ax, ax 0 00000663 F3AB rep stosw 0 00000665 26C70603007F00 mov word [es:3], paras(boot_env_size - 16) 1809 %endif 1810 1811 %if _EXTENSIONS 1812 %if _HISTORY_SEPARATE_FIXED && _HISTORY || _BOOT_ENV_SIZE 0 0000066C 8CC0 mov ax, es 1814 %if _BOOT_ENV_SIZE 0 0000066E 058000 add ax, paras(boot_env_size) 1816 %else 1817 add ax, paras(historysegment_boot_size) 1818 %endif 1819 %endif 0 00000671 A3[0000] mov word [extseg], ax 0 00000674 8EC0 mov es, ax 0 00000676 31FF xor di, di 0 00000678 B90020 mov cx, extsegment_boot_size >> 1 0 0000067B C706[0000]0040 mov word [extseg_size], extsegment_boot_size 0 00000681 31C0 xor ax, ax 0 00000683 F3AB rep stosw 1827 %endif 1828 %endif 1829 0 00000685 89D8 mov ax, bx 0 00000687 A3[0000] mov word [auxbuff_segorsel + soaSegSel], ax 1832 %if _PM 0 0000068A A3[0200] mov word [auxbuff_segorsel + soaSegment], ax 1834 ; initialise auxbuff references 1835 %endif 1836 %if _IMMASM && _IMMASM_AUXBUFF 1837 mov word [immseg], ax 1838 %endif 1839 0 0000068D 8EC0 mov es, ax 0 0000068F 31FF xor di, di 0 00000691 B90810 mov cx, _AUXBUFFSIZE >> 1 0 00000694 31C0 xor ax, ax 0 00000696 F3AB rep stosw ; initialise auxbuff 1845 d4 call init_d4message 1846 d4 asciz "auxbuff initialised",13,10 1847 0 00000698 1E push ds 0 00000699 07 pop es 0 0000069A 31FF xor di, di 0 0000069C B98000 mov cx, words(100h) 0 0000069F F3AB rep stosw ; initialise pseudo-PSP 1853 %if _BOOT_ENV_SIZE 0 000006A1 89162C00 mov word [2Ch], dx 1855 %endif 1856 %if _EXTENSIONS 0 000006A5 8B0E[0000] mov cx, word [extdata_size] 0 000006A9 BF[0000] mov di, ext_data_area 0 000006AC B000 mov al, 0 0 000006AE F3AA rep stosb ; init ext data area 1861 %endif 1862 1863 init_boot_imageident: 0 000006B0 8CD8 mov ax, ds 1865 %if !_LOADER 0 000006B2 48 dec ax 1867 %endif 0 000006B3 8EC0 mov es, ax ; => paragraph for imageident 0 000006B5 31FF xor di, di ; -> imageident target 0 000006B7 8B5EFA mov bx, word [bp + ?memtop] 0 000006BA 29C3 sub bx, ax ; = how many paragraphs do we use ? 1872 0 000006BC 891E[0000] mov word [alloc_size], bx 0 000006C0 A3[0000] mov word [alloc_seg], ax 1875 0 000006C3 0E push cs 0 000006C4 1F pop ds 0 000006C5 891E[980D] mov word [imageident.size], bx ; set image ident size 1879 0 000006C9 BE[900D] mov si, imageident 0 000006CC 56 push si 0 000006CD B90800 mov cx, 8 0 000006D0 31D2 xor dx, dx 1884 .loop: 0 000006D2 AD lodsw 0 000006D3 01C2 add dx, ax 0 000006D5 E2FB loop .loop 0 000006D7 5E pop si 1889 0 000006D8 F7DA neg dx 0 000006DA 8916[960D] mov word [imageident.check], dx ; set image ident checksum 1892 1893 %if !_LOADER 0 000006DE B108 mov cl, 8 1895 %else 1896 mov cl, words(2Ch) 1897 %endif 0 000006E0 F3A5 rep movsw ; write image ident paragraph 1899 ; cx = 0 1900 1901 %if !_LOADER 0 000006E2 2ED006[6B0E] rol byte [cs:init_preserveloader], 1 0 000006E7 730F jnc @F 0 000006E9 8B56F2 mov dx, word [bp + ?loaderentry + 2] 0 000006EC 8EC2 mov es, dx 0 000006EE 268B0E1400 mov cx, word [es:liiEntryDebug] ; cx nonzero if it has an entry 0 000006F3 268B1E1600 mov bx, word [es:liiStackPointer] 1908 ; fallback as zero if not supported 1909 @@: 1910 %endif 1911 0 000006F8 8B46FE mov ax, word [bp + ?target] 1913 1914 ; lleave ctx ; dropping this frame for stack switch 1915 ; Frame context still used by get_size_and_ebda 1916 0 000006FB FA cli 0 000006FC 8ED8 mov ds, ax 0 000006FE 8EC0 mov es, ax 0 00000700 8ED0 mov ss, ax 0 00000702 BC[0000] mov sp, stack_end ; boot mode stack switch 0 00000705 FB sti 1923 1924 %if !_LOADER 0 00000706 E339 jcxz init_boot_noloader 0 00000708 890E[0000] mov word [reg_eip], cx 0 0000070C 891E[0000] mov word [reg_esp], bx 1928 0 00000710 31C0 xor ax, ax ; initialise ax = 0 and FL = ZR NC etc 0 00000712 9C pushf 0 00000713 8F06[0000] pop word [reg_efl] ; set to FL 1932 0 00000717 92 xchg ax, dx 0 00000718 BF[0000] mov di, reg_ds 0 0000071B AB stosw 0 0000071C AF scasw ; (skip dummy high word) 0 0000071D AB stosw 0 0000071E AF scasw 0 0000071F AB stosw 0 00000720 AF scasw 0 00000721 AB stosw 1942 1943 ; Set up initial addresses for 'a', 'd', and 'u' commands. 1944 init_loader_adusetup: 0 00000722 A1[0000] mov ax, word [reg_eip] 0 00000725 8B0E[0200] mov cx, word [reg_eip+2] 0 00000729 8B1E[0000] mov bx, word [reg_cs] 0 0000072D BA[0000] mov dx, var_addr_entries.amount 0 00000730 BF[0000] mov di, var_addr_entries 1950 1951 .loop: 0 00000733 AB stosw ; IP 1953 %if saSegSel == 4 0 00000734 890D mov word [di], cx 0 00000736 AF scasw ; skip this word 1956 %endif 0 00000737 93 xchg ax, bx 0 00000738 AB stosw ; CS 1959 %if _PM 1960 %if SEGADR_size != 10 1961 %error Unexpected SEGADR size 1962 %endif 1963 .86m: 0 00000739 AB stosw ; store saSegment 0 0000073A AF scasw ; skip saSelector 1966 %else 1967 %if SEGADR_size == 10 1968 %error Unexpected SEGADR size 1969 %endif 1970 %endif 0 0000073B 93 xchg ax, bx ; d_addr 1972 0 0000073C 4A dec dx 0 0000073D 75F4 jnz .loop 0 0000073F EB05 jmp @F 1976 %endif 1977 1978 init_boot_noloader: 0 00000741 800E[0200]20 setopt [internalflags3], dif3_gotint19 1980 @@: 1981 0 00000746 2EFF36[620E] push word [cs:init_boot_old_memsizekib] 0 0000074B 8F06[0000] pop word [boot_old_memsizekib] 0 0000074F 2EFF36[600E] push word [cs:init_boot_new_memsizekib] 0 00000754 8F06[0000] pop word [boot_new_memsizekib] 0 00000758 2EA0[6A0E] mov al, byte [cs:init_boot_ebdaflag] 0 0000075C 2401 and al, 1 0 0000075E A2[0000] mov byte [boot_ebdaflag], al 1989 0 00000761 800E[0100]40 setopt [internalflags], nodosloaded 0 00000766 8026[0000]0F clropt [internalflags], notstdinput|inputfile|notstdoutput|outputfile 0 0000076B C606[0000]00 mov byte [notatty], 0 ; it _is_ a tty 1993 0 00000770 BA[1110] mov dx, imsg.crlf 0 00000773 E8E114 call init_putsz_cs 1996 1997 d4 call init_d4message 1998 d4 asciz "New boot_initcode done",13,10 1999 2000 %if _CONFIG 2001 write_config_boot: 0 00000776 BF[0000] mov di, configpath 0 00000779 B86C64 mov ax, "ld" 0 0000077C AB stosw 0 0000077D B8702F mov ax, "p/" 0 00000780 AB stosw 0 00000781 893E[0000] mov word [configpath.dir_end], di 0 00000785 BF[0000] mov di, scriptspath 0 00000788 B86C64 mov ax, "ld" 0 0000078B AB stosw 0 0000078C B8702F mov ax, "p/" 0 0000078F AB stosw 0 00000790 893E[0000] mov word [scriptspath.dir_end], di 2014 %endif 2015 0 00000794 E92915 jmp boot_old_initcode 2017 2018 2019 ; INP: ds:si -> first byte to check for name 2020 ; cx = number of bytes left 2021 ; OUT: (8+1+3+1)bytes[es:boot_init_foundname] = found name, 2022 ; converted to 8.3 ASCIZ format, 2023 ; not written if none 2024 ; CY if no filename found, 2025 ; si = INP:si + INP:cx 2026 ; cx = 0 2027 ; NC if filename found, 2028 ; ds:si -> byte behind the name, thus ds:(si-11)-> name 2029 ; cx = number of bytes left 2030 ; CHG: di, ax 2031 findname: 2032 .: 0 00000797 83F90B cmp cx, 11 ; enough for another name ? 0 0000079A 7275 jb .none ; no --> 2035 ; (cx == 0 jumps here too) 2036 .check: 0 0000079C 51 push cx 0 0000079D 56 push si 0 0000079E B90B00 mov cx, 11 0 000007A1 AC lodsb 0 000007A2 88C4 mov ah, al ; check for same char in all 11 places 0 000007A4 3C20 cmp al, 32 ; first character must not be blank 0 000007A6 740D je .check_fail ; if it is --> 2044 ; cmp al, 5 ; first character may be 05h to indicate 0E5h 2045 ; je .check_pass 0 000007A8 A8 db __TEST_IMM8 ; (skip lodsb) 2047 .check_loop_same: 0 000007A9 AC lodsb 0 000007AA 38C4 cmp ah, al 0 000007AC 752E jne .check_loop_differs 0 000007AE E80A00 call .check_character 0 000007B1 7202 jc .check_fail 0 000007B3 E2F4 loop .check_loop_same 2054 ; if we arrive here, all characters (while valid) are the 2055 ; same character repeated 11 times. we disallow this in case 2056 ; that the padding character is an allowed one (eg '&' 26h). 2057 .check_fail: 0 000007B5 5E pop si 0 000007B6 59 pop cx 0 000007B7 49 dec cx ; lessen the counter 0 000007B8 46 inc si ; -> next position to check 0 000007B9 EBDC jmp . 2063 2064 .check_character: 0 000007BB 3C20 cmp al, 32 0 000007BD 7218 jb .check_character_fail 0 000007BF 3C7F cmp al, 127 2068 ; je .check_character_fail 0 000007C1 7314 jae .check_character_fail 2070 ; note: with all characters >= 128 allowed, 2071 ; we get false positives in our sectors. 0 000007C3 3C2E cmp al, '.' 0 000007C5 7410 je .check_character_fail 0 000007C7 3C2F cmp al, '/' 0 000007C9 740C je .check_character_fail 0 000007CB 3C5C cmp al, '\' 0 000007CD 7408 je .check_character_fail 0 000007CF 3C61 cmp al, 'a' 0 000007D1 7206 jb .check_character_pass 0 000007D3 3C7A cmp al, 'z' 0 000007D5 7702 ja .check_character_pass 2082 .check_character_fail: 0 000007D7 F9 stc 0 000007D8 C3 retn 2085 2086 .check_character_pass: 0 000007D9 F8 clc 0 000007DA C3 retn 2089 2090 .check_loop: 0 000007DB AC lodsb 2092 .check_loop_differs: 0 000007DC E8DCFF call .check_character 0 000007DF 72D4 jc .check_fail 0 000007E1 3C20 cmp al, 32 0 000007E3 740F je .check_loop_is_blank 2097 .check_pass: 0 000007E5 E2F4 loop .check_loop 2099 0 000007E7 58 pop ax ; (discard si) 0 000007E8 83EE0B sub si, 11 ; -> at name 2102 0 000007EB E82900 call convert_name_to_asciz 2104 ; si -> behind name 0 000007EE 59 pop cx 0 000007EF 83E90B sub cx, 11 ; lessen the counter 0 000007F2 F8 clc 0 000007F3 C3 retn 2109 2110 .check_loop_is_blank: 0 000007F4 88CC mov ah, cl ; = how many remaining in ext (1 to 3) 2112 ; or name+ext (1 to 10, cannot be 11) 0 000007F6 80FC03 cmp ah, 3 ; in ext ? 0 000007F9 7605 jbe @F ; yes --> 0 000007FB 80EC03 sub ah, 3 ; 1 to 7 name field remaining 0 000007FE A8 db __TEST_IMM8 ; (skip lodsb) 2117 .check_loop_blank: 0 000007FF AC lodsb 2119 @@: 0 00000800 E8B8FF call .check_character ; general check 0 00000803 72B0 jc .check_fail 0 00000805 3C20 cmp al, 32 ; non-blank ? 0 00000807 75AC jne .check_fail ; yes, fails --> 0 00000809 FECC dec ah ; at end of field ? 0 0000080B 74D8 jz .check_pass ; yes --> 2126 ; no, still in field after blank. 2127 ; check that next trail is all blanks too. 0 0000080D E2F0 loop .check_loop_blank 0 0000080F EBA4 jmp .check_fail ; (never reached) 2130 2131 .none: 0 00000811 01CE add si, cx 0 00000813 31C9 xor cx, cx 0 00000815 F9 stc 0 00000816 C3 retn 2136 2137 2138 ; INP: ds:si -> 11-byte blank-padded name 2139 ; es:boot_init_foundname -> (8+1+3+1)-byte buffer 2140 ; OUT: ds:si -> behind 11-byte blank-padded name 2141 ; es:boot_init_foundname filled 2142 ; CHG: cx, di, ax 2143 convert_name_to_asciz: 0 00000817 BF[0000] mov di, boot_init_foundname 0 0000081A B90800 mov cx, 8 0 0000081D F3A4 rep movsb ; copy over base name, si -> extension 0 0000081F 26807DF805 cmp byte [es:di - 8], 05h ; is it 05h ? 0 00000824 7505 jne @F ; no --> 0 00000826 26C645F8E5 mov byte [es:di - 8], 0E5h ; yes, convert to 0E5h 2150 @@: 2151 0 0000082B A8 db __TEST_IMM8 ; (skip dec) 2153 @@: 0 0000082C 4F dec di ; decrement -> at previous trailing blank 0 0000082D 26807DFF20 cmp byte [es:di - 1], 32 ; trailing blank ? 0 00000832 74F8 je @B ; yes --> 2157 0 00000834 B02E mov al, '.' 0 00000836 AA stosb ; store dot (if needed) 0 00000837 B103 mov cl, 3 0 00000839 F3A4 rep movsb ; copy over extension, si -> behind name 2162 0 0000083B A8 db __TEST_IMM8 ; (skip dec) 2164 @@: 0 0000083C 4F dec di ; decrement -> at previous trailing blank 0 0000083D 26807DFF20 cmp byte [es:di - 1], 32 ; trailing blank ? 0 00000842 74F8 je @B ; yes --> 2168 0 00000844 26807DFF2E cmp byte [es:di - 1], '.' ; trailing dot ? (only occurs if all-blank ext) 0 00000849 7501 jne @F ; no --> 0 0000084B 4F dec di ; -> at the dot 2172 @@: 0 0000084C B000 mov al, 0 0 0000084E AA stosb ; store filename terminator 0 0000084F C3 retn 2176 2177 2178 get_size_and_ebda: 0 00000850 CD12 int 12h 0 00000852 B106 mov cl, 6 0 00000854 D3E0 shl ax, cl 2182 0 00000856 50 push ax 0 00000857 1E push ds 0 00000858 31F6 xor si, si 0 0000085A 92 xchg dx, ax 0 0000085B 8EDE mov ds, si 0 0000085D C536BC00 lds si, [4 * 2Fh] 0 00000861 83C603 add si, 3 0 00000864 AC lodsb 0 00000865 3C52 cmp al, 'R' 0 00000867 750F jne .no_rpl 0 00000869 AC lodsb 0 0000086A 3C50 cmp al, 'P' 0 0000086C 750A jne .no_rpl 0 0000086E AC lodsb 0 0000086F 3C4C cmp al, 'L' 0 00000871 7505 jne .no_rpl 0 00000873 B8064A mov ax, 4A06h 0 00000876 CD2F int 2Fh 2201 .no_rpl: 0 00000878 92 xchg ax, dx 0 00000879 1F pop ds 0 0000087A 5A pop dx 2205 0 0000087B 39D0 cmp ax, dx 0 0000087D 7406 je .no_error_rpl 2208 ; in case RPL is present, error out (for now) 2209 2210 ; notes for +RPL installation: 2211 ; 1. Allocate enough memory for our MCB + an PSP + our image + the last and the RPL MCB 2212 ; 2. Create the RPL's MCB + a last MCB 2213 ; 3. Relocate, initialise PSP 2214 ; 4. Hook Int2F as RPLOADER to report DOS our new size 2215 0 0000087F BA[D418] mov dx, imsg.rpl_detected 0 00000882 E9E8FB jmp .putsz_error 2218 2219 .no_error_rpl: 2220 d4 call init_d4message 2221 d4 asciz "Loader past RPL detection",13,10 2222 0 00000885 8B5EFA mov bx, word [bp + ?memtop] 0 00000888 39C3 cmp bx, ax 0 0000088A 740D je @F 2226 2227 ; Special debugging support: If memtop is below 2228 ; what we detected using int 12h then update 2229 ; memtop and continue with the changed memtop. 2230 ; The relocations done will suffice in any case. 0 0000088C 8946FA mov word [bp + ?memtop], ax 0 0000088F 89C3 mov bx, ax 0 00000891 7206 jb @F 2234 0 00000893 BA[FB18] mov dx, imsg.mismatch_detected 0 00000896 E9D4FB jmp .putsz_error 2237 2238 @@: ; bx => behind usable memory 2239 %if 0 2240 mov ah, 0C1h 2241 stc 2242 int 15h ; BIOS, do you have an EBDA? 2243 mov ax, es 2244 jnc .ebda ; segment in ax --> 2245 ; I don't believe you, let's check 2246 %endif ; Enabling this would enable the BIOS to return an EBDA even if it isn't 2247 ; noted at 40h:0Eh, which would be useless because we have to relocate it. 2248 0 00000899 31D2 xor dx, dx ; initialise dx to zero if no EBDA 0 0000089B B84000 mov ax, 40h 0 0000089E 8EC0 mov es, ax 0 000008A0 26A10E00 mov ax, word [ es:0Eh ] ; EBDA segment (unless zero) or LPT4 base I/O address (200h..3FCh) 0 000008A4 3D0004 cmp ax, 400h 0 000008A7 7227 jb .noebda ; --> 2255 .ebda: 2256 d4 call init_d4message 2257 d4 asciz "EBDA detected",13,10 2258 0 000008A9 39D8 cmp ax, bx 2260 ;jb init_booterror.soft ; uhh, the EBDA is inside our memory? 2261 ;ja init_booterror.soft ; EBDA higher than top of memory. This is just as unexpected. 0 000008AB 7723 ja .noebda 2263 ; MEMDISK can allocate memory *below* the EBDA. 2264 ; just pretend we don't see any EBDA. 0 000008AD 7406 je @F 0 000008AF BA[2F19] mov dx, imsg.boot_ebda_unexpected 0 000008B2 E9B8FB jmp .putsz_error 2268 2269 @@: 0 000008B5 2E800E[6A0E]01 or byte [cs:init_boot_ebdaflag], 1 2271 0 000008BB 8ED8 mov ds, ax 0 000008BD 31D2 xor dx, dx 0 000008BF 8A160000 mov dl, byte [ 0 ] ; EBDA size in KiB 0 000008C3 B106 mov cl, 6 0 000008C5 D3E2 shl dx, cl ; *64, to paragraphs 0 000008C7 2E8916[640E] mov word [cs:init_boot_ebdasize], dx 0 000008CC 2EA3[660E] mov word [cs:init_boot_ebdasource], ax 2279 d4 jmp @F 2280 .noebda: 2281 d4 call init_d4message 2282 d4 asciz "No EBDA detected",13,10 2283 @@: 0 000008D0 C3 retn 2285 2286 .putsz_error: equ boot_initcode.putsz_error 2287 2288 lleave ctx ; dropping early boot_initcode frame 2289 2290 2291 init_booterror: 2292 .soft: 0 000008D1 31C0 xor ax, ax 0 000008D3 A9 db __TEST_IMM16 ; (skip mov) 2295 .hard: 0 000008D4 B001 mov al, 1 2297 2298 ;d4 call init_d4pocketdosmemdump 2299 d4 call init_d4dumpregs 2300 2301 .patch_switch_stack: 0 000008D6 EB09 jmp strict short .no_switch_stack 2303 0 000008D8 8CCB mov bx, cs 0 000008DA FA cli 0 000008DB 8ED3 mov ss, bx 2307 %ifn _LINK 2308 mov sp, init_size + BOOTINITSTACK_SIZE 2309 %else 0 000008DD BC[0002] mov sp, BOOTINITSTACK_SIZE + behind_init wrt INIT 2311 %endif 0 000008E0 FB sti 2313 2314 .no_switch_stack: 0 000008E1 50 push ax 2316 0 000008E2 B84000 mov ax, 40h 0 000008E5 8EC0 mov es, ax 2319 0 000008E7 2EF606[6A0E]02 test byte [cs:init_boot_ebdaflag], 2 0 000008ED 7417 jz @F 2322 0 000008EF FA cli 0 000008F0 2E8B16[660E] mov dx, [cs:init_boot_ebdasource] 0 000008F5 2EA1[680E] mov ax, [cs:init_boot_ebdadest] 0 000008F9 2E8B0E[640E] mov cx, [cs:init_boot_ebdasize] 0 000008FE E8C512 call init_movp 2328 0 00000901 2689160E00 mov word [es:0Eh], dx 2330 @@: 2331 0 00000906 2E8B16[620E] mov dx, [cs:init_boot_old_memsizekib] 0 0000090B 85D2 test dx, dx 0 0000090D 7405 jz @F 0 0000090F 2689161300 mov word [es:13h], dx 2336 @@: 0 00000914 FB sti 2338 0 00000915 BA[8D19] mov dx, imsg.booterror 0 00000918 E85E13 call init_putsz_cs_bootldr 0 0000091B E83413 call init_getc_bootldr 0 0000091E 58 pop ax 0 0000091F 85C0 test ax, ax 0 00000921 7502 jnz @F 0 00000923 CD19 int 19h 2346 @@: 0 00000925 EA0000FFFF jmp 0FFFFh:0 2348 %endif ; _BOOTLDR 2349 2350 %if _DEVICE 2351 ; Our entrypoint transfers control to us with these registers: 2352 ; INP: ss:sp -> bx, fl, ds, ax, far return address to DOS 2353 ; ds:100h -> loaded payload 2354 device_initcode: 0 0000092A FC cld 2356 0 0000092B 830E[0000]FF or word [device_header.next], -1 2358 ; ! this uses offset 100h in the adjusted ds 2359 0 00000930 5B pop bx 0 00000931 06 push es 0 00000932 53 push bx 0 00000933 51 push cx 0 00000934 52 push dx 0 00000935 56 push si 0 00000936 57 push di 2367 0 00000937 268B470E mov ax, word [es:bx + 0Eh] ; ax = amount bytes in last segment 0 0000093B B104 mov cl, 4 0 0000093D D3E8 shr ax, cl ; = paragraphs, rounding down 0 0000093F 26034710 add ax, word [es:bx + 0Eh + 2] ; => behind available memory 0 00000943 7212 jc .memorybad 0 00000945 2EA3[3E0E] mov word [cs:dev_memory_end], ax 0 00000949 8CDA mov dx, ds 0 0000094B 83C210 add dx, 10h ; => our memory 0 0000094E 29D0 sub ax, dx ; ax = amount available paragraphs 0 00000950 7205 jc .memorybad 2378 2379 %ifn _LINK 2380 cmp ax, (DEVICEINITSIZE + 15) >> 4 2381 %else 2382 %if 0 2383 %define DEVICEADJUST (deviceshim_size + 110h) 2384 %define DEVICEINITTARGET (INITSECTIONOFFSET + DEVICEADJUST + datastack_size + ext_data_nonboot_add_size + auxbuff_size + auxbuff_init_size + historysegment_size + dev_env_size + extsegment_size + 10h) 2393 %define DEVICEINITSIZE (DEVICEINITTARGET - 100h + init_size + deviceshim_size) 2396 %endif 0 00000952 3D[8408] cmp ax, strict word relocatedzero + paras( + auxbuff_size + auxbuff_init_size + historysegment_size + dev_env_size + extsegment_size + 20h) 2404 wlcalc word_segrel_INIT, equ $ - 2 2405 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2406 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2407 ; wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_minusextpara_end_of_datastack, equ $ - 2 2408 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 2409 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2410 %endif 0 00000955 7333 jae .memorygood 2412 2413 .memorybad: 0 00000957 BA[DA0F] mov dx, imsg.early_mem_fail 0 0000095A E8FA12 call init_putsz_cs 2416 0 0000095D B80030 mov ax, 3000h 0 00000960 CD21 int 21h 0 00000962 3C05 cmp al, 5 0 00000964 7306 jae @F 0 00000966 BA[D610] mov dx, imsg.dos_below_5 2422 .earlyfail: 0 00000969 E8EB12 call init_putsz_cs 2424 @@: 2425 0 0000096C 5F pop di 0 0000096D 5E pop si 0 0000096E 5A pop dx 0 0000096F 59 pop cx 0 00000970 5B pop bx 0 00000971 07 pop es 2432 0 00000972 8CD8 mov ax, ds 0 00000974 83C010 add ax, paras(100h) 0 00000977 26C747030581 mov word [es:bx + 3], 8105h ; error, done, code: bad structure length 0 0000097D 2683670E00 and word [es:bx + 0Eh], 0 0 00000982 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 2438 0 00000986 9D popf 0 00000987 1F pop ds 0 00000988 58 pop ax 0 00000989 CB retf 2443 2444 .memorygood: 0 0000098A 8CD8 mov ax, ds 2446 %ifn _LINK 2447 add ax, paras(INITSECTIONOFFSET) 2448 %else 0 0000098C 05[0000] add ax, strict word relocatedzero + 0 2450 wlcalc word_segrel_INIT, equ $ - 2 2451 %endif 0 0000098F 8CDA mov dx, ds 2453 %ifn _LINK 2454 add dx, paras(DEVICEINITTARGET) 2455 mov cx, init_size_p + deviceshim_size_p 2456 %else 2457 %if 0 2458 %define DEVICEADJUST (deviceshim_size + 110h) 2459 %define DEVICEINITTARGET (INITSECTIONOFFSET + DEVICEADJUST + datastack_size + ext_data_nonboot_add_size + auxbuff_size + auxbuff_init_size + historysegment_size + dev_env_size + extsegment_size + 10h) 2468 %define DEVICEINITSIZE (DEVICEINITTARGET - 100h + init_size + deviceshim_size) 2471 %endif 0 00000991 81C2[9408] add dx, strict word relocatedzero + paras( + auxbuff_size + auxbuff_init_size + historysegment_size + dev_env_size + extsegment_size + 120h) 2479 wlcalc word_segrel_INIT, equ $ - 2 2480 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2481 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2482 ; wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_minusextpara_end_of_datastack, equ $ - 2 0 00000995 B9[0000] mov cx, relocatedzero + 0 2484 wlcalc word_wrt_INIT_extpara_behind_deviceshim, equ $ - 2 2485 %endif 0 00000998 E82B12 call init_movp 2487 %ifn _LINK 2488 init_plus_deviceshim_size_p_equate equ init_size_p + deviceshim_size_p 2489 deviceinittarget_p_equate equ paras(DEVICEINITTARGET) 2490 %if initsectionoffset_p_equate + init_plus_deviceshim_size_p_equate > deviceinittarget_p_equate 2492 %error Overlap detected 2493 %endif 2494 %endif 2495 0 0000099B 52 push dx 0 0000099C E88FF8 call init_retf 2498 2499 %if _DEV_ENV_SIZE 2500 %ifn _LINK 2501 mov word [cs:memsize], paras(CODETARGET2 + ldebug_code_bootldr_truncated_size + ldebug_code2_size + historysegment_size + dev_env_size + extsegment_size) 2507 %else 2508 %if 0 2509 %define CODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_truncated_size + datastack_size) 2510 %define CODETARGET2 (CODETARGET1+auxbuff_size) 2511 %define AUXTARGET1 (CODETARGET1+ldebug_code_bootldr_truncated_size+ldebug_code2_size) 2512 %define AUXTARGET2 CODETARGET1 2513 %define AUXTARGET3 (AUXTARGET1+auxbuff_size) 2514 %endif 0 0000099F 2EC706[360E][8106] mov word [cs:memsize], relocatedzero + paras(auxbuff_size + historysegment_size + dev_env_size + extsegment_size) 2519 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2520 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2521 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2522 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 2523 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 2524 %endif 0 000009A6 2EC706[380E]8000 mov word [cs:mem_envsize], paras(dev_env_size) 2526 %endif 2527 0 000009AD 8CDB mov bx, ds 2529 %ifn _LINK 2530 add bx, FORCESTRICTWORD paras(DEVICEADJUST) 2531 %else 2532 ;%define DEVICEADJUST (deviceshim_size + 110h) 0 000009AF 81C3[1100] add bx, strict word relocatedzero + paras(110h) 2534 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2535 %endif 0 000009B3 89DA mov dx, bx 2537 %ifn _LINK 2538 add bx, paras(AUXTARGET1) 2539 add dx, paras(CODETARGET1) 2540 %else 2541 ; add bx, paras(AUXTARGET1) 0 000009B5 81C3[0000] add bx, strict word relocatedzero + 0 2543 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2544 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2545 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2546 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 2547 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 2548 ; add dx, paras(CODETARGET1) 0 000009B9 81C2[0000] add dx, 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 %endif 2554 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _DEV_ENV_SIZE 0 000009BD 89D8 mov ax, bx 0 000009BF 050102 add ax, paras(auxbuff_size) 2557 %endif 0 000009C2 89D1 mov cx, dx 0 000009C4 2EC706[3C0E][3836] mov word [cs:init_layout], init_dev_layout_1 0 000009CB E861F8 call init_check_auxbuff 0 000009CE 7446 jz @F 2562 0 000009D0 8CDB mov bx, ds 2564 %ifn _LINK 2565 add bx, FORCESTRICTWORD paras(DEVICEADJUST) 2566 %else 2567 ;%define DEVICEADJUST (deviceshim_size + 110h) 0 000009D2 81C3[1100] add bx, strict word relocatedzero + paras(110h) 2569 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2570 %endif 0 000009D6 89DA mov dx, bx 2572 %ifn _LINK 2573 add bx, paras(AUXTARGET2) 2574 add dx, paras(CODETARGET2) 2575 %else 2576 ; add bx, paras(AUXTARGET2) 0 000009D8 81C3[0000] add bx, strict word relocatedzero + 0 2578 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2579 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2580 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2581 ; add dx, paras(CODETARGET2) 0 000009DC 81C2[0102] add dx, strict word relocatedzero + paras(auxbuff_size) 2583 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2584 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2585 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2586 %endif 0 000009E0 2EC706[3C0E][3D36] mov word [cs:init_layout], init_dev_layout_2 0 000009E7 E845F8 call init_check_auxbuff 0 000009EA 742A jz @F 2590 2591 ; If both prior attempts failed, we allocate 2592 ; an additional 8 KiB and move the buffer to 2593 ; that. This should always succeed. 2594 %ifn _LINK 2595 mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size + dev_env_size + extsegment_size) 2600 ; enlarge the final memory block size 2601 %else 0 000009EC 2EC706[360E][8208] mov word [cs:memsize], relocatedzero + paras(auxbuff_size + auxbuff_size + historysegment_size + dev_env_size + extsegment_size) 2607 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2608 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2609 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2610 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 2611 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 2612 %endif 2613 0 000009F3 8CDB mov bx, ds 2615 %ifn _LINK 2616 add bx, FORCESTRICTWORD paras(DEVICEADJUST) 2617 %else 2618 ;%define DEVICEADJUST (deviceshim_size + 110h) 0 000009F5 81C3[1100] add bx, strict word relocatedzero + paras(110h) 2620 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2621 %endif 2622 %ifn _LINK 2623 add bx, paras(AUXTARGET3) 2624 %else 0 000009F9 81C3[0102] add bx, strict word relocatedzero + paras(auxbuff_size) 2626 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2627 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 2628 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 2629 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 2630 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 2631 %endif ; _LINK 0 000009FD 89CA mov dx, cx 2633 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _DEV_ENV_SIZE 0 000009FF 89D8 mov ax, bx 0 00000A01 050102 add ax, paras(auxbuff_size) 2636 %endif 0 00000A04 2EC706[3C0E][4236] mov word [cs:init_layout], init_dev_layout_3 0 00000A0B E821F8 call init_check_auxbuff 0 00000A0E 7406 jz @F 2640 2641 ; Because this shouldn't happen, this is 2642 ; considered an internal error. 0 00000A10 BA[9310] mov dx, imsg.early_reloc_fail 0 00000A13 E953FF jmp .earlyfail 2645 2646 @@: 2647 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _DEV_ENV_SIZE 0 00000A16 50 push ax 2649 %endif 0 00000A17 E8DDF7 call place_code_segments 2651 2652 %if _MESSAGESEGMENT 0 00000A1A 8CD8 mov ax, ds 2654 %ifn _LINK 2655 add ax, paras(MESSAGESECTIONOFFSET) 2656 %else 0 00000A1C 05[0000] add ax, strict word relocatedzero + 0 2658 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 2659 %endif 0 00000A1F 8CDA mov dx, ds 2661 %ifn _LINK 2662 add dx, 10h + paras(deviceshim_size + 110h + DATAENTRYTABLESIZE + datastack_size) 2665 mov cx, paras(messagesegment_truncated_size) 2666 %else 0 00000A21 81C2[1100] add dx, strict word relocatedzero + 10h + paras(110h - 100h) 2668 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2669 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_end_of_datastack, equ $ - 2 0 00000A25 B9[0000] mov cx, relocatedzero + 0 2671 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_truncated, equ $ - 2 2672 %endif 0 00000A28 E89B11 call init_movp 2674 %if _BOOTLDR_DISCARD_HELP 2675 %ifn _LINK 2676 mov word [messageseg_size], messagesegment_nobits_truncated_size 2677 %else 0 00000A2B C706[0000][0000] mov word [messageseg_size], behind_messagesegment_nobits_truncated wrt MESSAGESEGMENT 2679 %endif 2680 %if _HELP_COMPRESSED 0 00000A31 C706[0000][0000] mov word [indirect_hshrink_message_buffer], truncated_hshrink_message_buffer 2682 %if _LINK || _LINK_COMPAT 0 00000A37 8E06[0000] mov es, [code_seg] 0 00000A3B 26800E[0000]01 setopt [es:patch_boothelp_uncompressed], NONCOMPRESSEDFLAG 2685 %endif 2686 %endif 0 00000A41 1E push ds 0 00000A42 0E push cs 0 00000A43 1F pop ds 0 00000A44 BE[0A17] mov si, imsg.boothelp_replacement 0 00000A47 8EC2 mov es, dx 0 00000A49 BF[0000] mov di, msg.boothelp 0 00000A4C B91C00 mov cx, imsg.boothelp_replacement_size_w 0 00000A4F F3A5 rep movsw 0 00000A51 31C0 xor ax, ax 2696 %ifn _LINK 2697 mov cx, words(messagesegment_nobits_truncated_size - (msg.boothelp - messagesegment_start + fromwords(imsg.boothelp_replacement_size_w))) 2700 %else 0 00000A53 B9[3800] mov cx, relocatedzero + fromwords(imsg.boothelp_replacement_size_w) 2702 wlcalc word_ext_msg.boothelp, equ $ - 2 ; length + start 2703 wlcalc word_subr_0, equ $ - 2 ; - (length + start) 2704 wlcalc word_wrt_MESSAGESEGMENT_ext_behind_messagesegment_nobits_truncated, equ $ - 2 2705 ; behind - (length + start) 2706 wlcalc word_shr_1, equ $ - 2 ; above >> 1 2707 %endif 0 00000A56 F3AB rep stosw 0 00000A58 1F pop ds 2710 %endif 0 00000A59 52 push dx 2712 %endif 2713 0 00000A5A 8CD8 mov ax, ds 0 00000A5C 83C010 add ax, 10h 0 00000A5F 89C2 mov dx, ax 2717 %ifn _LINK 2718 add dx, FORCESTRICTWORD paras(deviceshim_size + 110h) 2719 %else 0 00000A61 81C2[1100] add dx, strict word relocatedzero + paras(110h) 2721 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2722 %endif 2723 %ifn _LINK 2724 mov cx, paras(DATAENTRYTABLESIZE) 2725 %else 0 00000A65 B9[F0FF] mov cx, relocatedzero + - paras(256) 2727 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_behind_progbits_dataentry, equ $ - 2 2728 %endif 0 00000A68 E85B11 call init_movp 2730 0 00000A6B 8CC8 mov ax, cs 2732 %ifn _LINK 2733 add ax, init_size_p 2734 %else 0 00000A6D 05[0000] add ax, strict word relocatedzero + 0 2736 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 2737 %endif 0 00000A70 8CDA mov dx, ds 0 00000A72 83C210 add dx, paras(100h) 2740 %ifn _LINK 2741 mov cx, deviceshim_size_p 2742 %else 0 00000A75 B9[0000] mov cx, relocatedzero + 0 2744 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2745 %endif 0 00000A78 E84B11 call init_movp 2747 0 00000A7B 8CDA mov dx, ds 2749 %ifn _LINK 2750 add dx, FORCESTRICTWORD paras(100h) + deviceshim_size_p 2751 %else 0 00000A7D 81C2[1000] add dx, strict word relocatedzero + paras(100h) 2753 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2754 %endif 0 00000A81 8EC2 mov es, dx 0 00000A83 1E push ds 2757 %ifn _LINK 2758 sub dx, FORCESTRICTWORD deviceshim_size_p + 1 2759 %else 0 00000A84 81EA[0100] sub dx, strict word relocatedzero + 1 2761 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2762 %endif 0 00000A88 8EDA mov ds, dx 0 00000A8A 31C0 xor ax, ax 0 00000A8C 31FF xor di, di 0 00000A8E B90400 mov cx, 4 0 00000A91 F3AB rep stosw 0 00000A93 BE0800 mov si, 8 0 00000A96 B104 mov cl, 4 0 00000A98 F3A5 rep movsw 0 00000A9A 1F pop ds 2772 0 00000A9B 8CDA mov dx, ds 2774 %ifn _LINK 2775 add dx, FORCESTRICTWORD paras(DEVICEADJUST) 2776 %else 2777 ;%define DEVICEADJUST (deviceshim_size + 110h) 0 00000A9D 81C2[1100] add dx, strict word relocatedzero + paras(110h) 2779 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2780 %endif 0 00000AA1 8EDA mov ds, dx 2782 2783 %if _MESSAGESEGMENT 2784 %if _HELP_COMPRESSED && ! _PM 2785 pop ax 2786 mov [hshrink_memory_source.segment], ax 2787 mov [messageseg], ax 2788 %else 0 00000AA3 8F06[0000] pop word [messageseg] 2790 %endif 2791 %endif 2792 0 00000AA7 53 push bx 0 00000AA8 B451 mov ah, 51h 0 00000AAA CD21 int 21h 0 00000AAC 891E[0000] mov word [pspdbe], bx 0 00000AB0 5B pop bx 2798 0 00000AB1 8EC2 mov es, dx 0 00000AB3 B98000 mov cx, words(256) 0 00000AB6 31FF xor di, di 0 00000AB8 31C0 xor ax, ax 0 00000ABA F3AB rep stosw ; clear buffer for PSP + command line tail 2804 2805 ; PSP creation moved to later, after command line parsing 2806 2807 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _DEV_ENV_SIZE 0 00000ABC 58 pop ax 2809 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000ABD A3[0000] mov word [history.segorsel + soaSegSel], ax 2811 %if _PM 0 00000AC0 A3[0200] mov word [history.segorsel + soaSegment], ax 2813 %endif 0 00000AC3 8EC0 mov es, ax 0 00000AC5 31FF xor di, di 0 00000AC7 B90010 mov cx, historysegment_size >> 1 0 00000ACA 31C0 xor ax, ax 0 00000ACC F3AB rep stosw 2819 %endif 2820 2821 %if _DEV_ENV_SIZE 2822 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000ACE 8CC0 mov ax, es 0 00000AD0 050002 add ax, paras(historysegment_size) 2825 %endif 0 00000AD3 A3[0000] mov word [envseg], ax 0 00000AD6 8EC0 mov es, ax 0 00000AD8 89C2 mov dx, ax 0 00000ADA 42 inc dx 0 00000ADB 31FF xor di, di 0 00000ADD B90004 mov cx, dev_env_size >> 1 0 00000AE0 C706[0000]0008 mov word [env_size], dev_env_size 0 00000AE6 31C0 xor ax, ax 0 00000AE8 F3AB rep stosw 0 00000AEA 26C70603007F00 mov word [es:3], paras(dev_env_size - 16) 2836 %endif 2837 2838 %if _EXTENSIONS 2839 %if _HISTORY_SEPARATE_FIXED && _HISTORY || _DEV_ENV_SIZE 0 00000AF1 8CC0 mov ax, es 2841 %if _DEV_ENV_SIZE 0 00000AF3 058000 add ax, paras(dev_env_size) 2843 %else 2844 add ax, paras(historysegment_size) 2845 %endif 2846 %endif 0 00000AF6 A3[0000] mov word [extseg], ax 0 00000AF9 8EC0 mov es, ax 0 00000AFB 31FF xor di, di 0 00000AFD B90010 mov cx, extsegment_size >> 1 0 00000B00 31C0 xor ax, ax 0 00000B02 F3AB rep stosw 2853 %endif 2854 %endif 2855 0 00000B04 89D8 mov ax, bx 2857 0 00000B06 A3[0000] mov word [auxbuff_segorsel + soaSegSel], ax 2859 %if _PM 0 00000B09 A3[0200] mov word [auxbuff_segorsel + soaSegment], ax 2861 ; initialise auxbuff references 2862 %endif 2863 %if _IMMASM && _IMMASM_AUXBUFF 2864 mov word [immseg], ax 2865 %endif 2866 0 00000B0C 8EC0 mov es, ax 0 00000B0E 31FF xor di, di 0 00000B10 B90810 mov cx, _AUXBUFFSIZE >> 1 0 00000B13 31C0 xor ax, ax 0 00000B15 F3AB rep stosw ; initialise auxbuff 2872 2873 %if _DEV_ENV_SIZE 0 00000B17 89162C00 mov word [2Ch], dx 0 00000B1B 1E push ds 0 00000B1C E87701 call init_device_get_environment 0 00000B1F 85C0 test ax, ax 0 00000B21 7425 jz @F 0 00000B23 8ED8 mov ds, ax 0 00000B25 8EC2 mov es, dx 0 00000B27 31FF xor di, di 0 00000B29 31F6 xor si, si 2883 .loop_env: 0 00000B2B E85C29 call init_nextvar 0 00000B2E 75FB jne .loop_env 0 00000B30 46 inc si 0 00000B31 81FEEE07 cmp si, dev_env_size - 16 - 2 0 00000B35 7608 jbe .copy_env 0 00000B37 BA[8F0F] mov dx, imsg.dev_env_too_large 0 00000B3A E81A11 call init_putsz_cs 0 00000B3D EB09 jmp @F 2892 2893 .copy_env: 0 00000B3F 89F1 mov cx, si 0 00000B41 31F6 xor si, si 0 00000B43 F3A4 rep movsb 0 00000B45 31C0 xor ax, ax 0 00000B47 AB stosw 2899 @@: 0 00000B48 1F pop ds 2901 %endif 2902 0 00000B49 8CD8 mov ax, ds ; => PSP 2904 %ifn _LINK 2905 sub ax, strict word deviceshim_size_p + paras(10h) 2906 %else 0 00000B4B 2D[0100] sub ax, strict word relocatedzero + paras(10h) 2908 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2909 %endif 0 00000B4E A3[0200] mov word [device_header_address + 2], ax 0 00000B51 A3[0000] mov word [alloc_seg], ax 2912 0 00000B54 8CD8 mov ax, ds ; => PSP 0 00000B56 2E8B1E[360E] mov bx, word [cs:memsize] 2915 ; = amount paragraphs for PSP + DATA ENTRY + TABLE 2916 ; + DATA STACK + CODE + AUXBUFF + HISTORY + dev ENV + EXT 0 00000B5B 01D8 add ax, bx ; => placeholder for trailing container 2918 %ifn _LINK 2919 add bx, FORCESTRICTWORD deviceshim_size_p + paras(10h) + paras(10h) 2920 %else 0 00000B5D 81C3[0200] add bx, strict word relocatedzero + paras(10h + 10h) 2922 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 2923 %endif 2924 ; (layout is deviceshim, MCB placeholder, debugger segments, 2925 ; placeholder for trailing container MCB) 2926 ; = amount paragraphs expected in MCB 0 00000B61 891E[0000] mov word [device_mcb_paragraphs], bx 0 00000B65 891E[0000] mov word [alloc_size], bx 2929 2930 ; ax => where to place container sig 0 00000B69 E80200 call init_dev_place_container_signature 2932 ; ax => behind memory used for device 0 00000B6C EB12 jmp @F 2934 2935 ; INP: ax => where to place container signature 2936 ; OUT: ax => behind memory used for device 2937 ; ax = INP:ax + 1 2938 ; CHG: es, di, cx, si 2939 init_dev_place_container_signature: 0 00000B6E 8EC0 mov es, ax 0 00000B70 31FF xor di, di ; -> buffer for trailing container MCB 0 00000B72 B90800 mov cx, words(10h) ; = amount words 0 00000B75 1E push ds 0 00000B76 0E push cs 0 00000B77 1F pop ds 0 00000B78 BE[A00D] mov si, init_container_signature ; -> init string 0 00000B7B F3A5 rep movsw 0 00000B7D 1F pop ds 0 00000B7E 40 inc ax ; => behind memory used for device 0 00000B7F C3 retn 2951 2952 2953 @@: 0 00000B80 8F06[0000] pop word [reg_edi] 0 00000B84 8F06[0000] pop word [reg_esi] 0 00000B88 8F06[0000] pop word [reg_edx] 0 00000B8C 8F06[0000] pop word [reg_ecx] 0 00000B90 892E[0000] mov word [reg_ebp], bp 0 00000B94 5B pop bx 0 00000B95 07 pop es 0 00000B96 891E[0000] mov word [reg_ebx], bx 0 00000B9A 8C06[0000] mov word [reg_es], es 2963 0 00000B9E 26C747030001 mov word [es:bx + 3], 100h ; no error, done 0 00000BA4 2683670E00 and word [es:bx + 0Eh], 0 0 00000BA9 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 2967 0 00000BAD 8F06[0000] pop word [reg_efl] 0 00000BB1 8F06[0000] pop word [reg_ds] 0 00000BB5 8F06[0000] pop word [reg_eax] 0 00000BB9 8C16[0000] mov word [reg_ss], ss 0 00000BBD 8926[0000] mov word [reg_esp], sp 2973 0 00000BC1 8C1E[0000] mov word [reg_cs], ds 0 00000BC5 C706[0000][0000] mov word [reg_eip], entry_retf 2976 2977 .cmdline: 0 00000BCB 1E push ds 0 00000BCC 26C57712 lds si, [es:bx + 12h] ; ds:si -> device command line 0 00000BD0 07 pop es 2981 %if _CONFIG 0 00000BD1 1E push ds 0 00000BD2 56 push si 2984 %endif 0 00000BD3 BF8100 mov di, 81h ; es:di -> PSP command line tail 2986 2987 ; Writing MS-DOS Device Drivers, second edition, page 349 2988 ; specifies the following as to the command line termination: 2989 ; "Note that the DEVICE= command string is terminated by an 2990 ; Ah when there are no arguments. When there are arguments, 2991 ; the string is terminated with the following sequence: 2992 ; 0h, Dh, Ah." 2993 2994 ; First skip past name. 2995 @@: 0 00000BD6 AC lodsb 0 00000BD7 3C20 cmp al, 32 ; blank ? 0 00000BD9 7412 je @F 0 00000BDB 3C09 cmp al, 9 0 00000BDD 740E je @F ; yes, got past executable filename --> 0 00000BDF 3C00 cmp al, 0 0 00000BE1 7448 je .cmdline_end 0 00000BE3 3C0D cmp al, 13 0 00000BE5 7444 je .cmdline_end 0 00000BE7 3C0A cmp al, 10 0 00000BE9 7440 je .cmdline_end ; if empty tail --> 0 00000BEB EBE9 jmp @B 3008 @@: 0 00000BED 81FFFF00 cmp di, 0FFh ; can store and still have space for CR ? 0 00000BF1 7430 je .cmdline_end_truncate ; no --> 0 00000BF3 AA stosb ; store it 0 00000BF4 3C00 cmp al, 0 ; EOL ? 0 00000BF6 7432 je .cmdline_end_dec 0 00000BF8 3C0D cmp al, 13 0 00000BFA 742E je .cmdline_end_dec 0 00000BFC 3C0A cmp al, 10 0 00000BFE 742A je .cmdline_end_dec ; yes --> 0 00000C00 AC lodsb 0 00000C01 3C21 cmp al, '!' ; escape for small letters ? 0 00000C03 75E8 jne @B ; no --> 0 00000C05 AC lodsb 0 00000C06 3C00 cmp al, 0 0 00000C08 7414 je .cmdline_end_escaped 0 00000C0A 3C0D cmp al, 13 0 00000C0C 7410 je .cmdline_end_escaped 0 00000C0E 3C0A cmp al, 10 0 00000C10 740C je .cmdline_end_escaped 3028 ; cmp al, '!' ; (automatically supported) 0 00000C12 3C41 cmp al, 'A' ; is it a capital letter ? 0 00000C14 72D7 jb @B 0 00000C16 3C5A cmp al, 'Z' 0 00000C18 77D3 ja @B 0 00000C1A 3420 xor al, 'a' ^ 'A' ; get the small letter 0 00000C1C EBCF jmp @B 3035 3036 .cmdline_end_escaped: 0 00000C1E BA[FF10] mov dx, imsg.device_end_escaped 0 00000C21 EB03 jmp @F 3039 3040 .cmdline_end_truncate: 0 00000C23 BA[4311] mov dx, imsg.device_end_truncate 3042 @@: 0 00000C26 E82E10 call init_putsz_cs 0 00000C29 A8 db __TEST_IMM8 ; skip dec 3045 .cmdline_end_dec: 0 00000C2A 4F dec di 3047 .cmdline_end: 0 00000C2B B00D mov al, 13 0 00000C2D AA stosb ; store CR 0 00000C2E 97 xchg ax, di 0 00000C2F 8CC3 mov bx, es 0 00000C31 8EDB mov ds, bx 0 00000C33 2C82 sub al, 82h ; if -> 82h (CR at 81h). get 0 0 00000C35 A28000 mov byte [80h], al ; store length 3055 3056 %if _CONFIG 0 00000C38 5E pop si 0 00000C39 5A pop dx 3059 %endif 3060 0 00000C3A FA cli 0 00000C3B 8ED3 mov ss, bx 0 00000C3D BC[0000] mov sp, stack_end ; device mode stack switch 0 00000C40 FB sti 3065 0 00000C41 800E[0200]40 setopt [internalflags], tsrmode 0 00000C46 8026[0200]7F clropt [internalflags], attachedterm 0 00000C4B 800E[0200]40 setopt [internalflags6], dif6_device_mode 3069 3070 %if _CONFIG 3071 find_config_device: 0 00000C50 E84300 call init_device_get_environment 3073 0 00000C53 36C606[0000]00 mov byte [ss:configpath], 0 0 00000C59 50 push ax 0 00000C5A 52 push dx 0 00000C5B 56 push si 0 00000C5C BF[740F] mov di, imsg.varconfig 0 00000C5F B90D00 mov cx, imsg.varconfig.length 0 00000C62 BA[0000] mov dx, configpath 0 00000C65 E88628 call init_copyvar 0 00000C68 5E pop si 0 00000C69 1F pop ds ; -> command line 0 00000C6A 1E push ds 0 00000C6B 56 push si 0 00000C6C 7303 jnc .done 0 00000C6E E84A00 call find_executable_device 3088 .done: 0 00000C71 5E pop si 0 00000C72 1F pop ds ; -> command line 0 00000C73 58 pop ax 3092 3093 find_scripts_device: 0 00000C74 36C606[0000]00 mov byte [ss:scriptspath], 0 0 00000C7A 1E push ds 0 00000C7B 56 push si 0 00000C7C BF[810F] mov di, imsg.varscripts 0 00000C7F B90E00 mov cx, imsg.varscripts.length 0 00000C82 BA[0000] mov dx, scriptspath 0 00000C85 E86628 call init_copyvar 0 00000C88 5E pop si 0 00000C89 1F pop ds ; -> command line 0 00000C8A 7303 jnc .done 0 00000C8C E82C00 call find_executable_device 3105 .done: 3106 0 00000C8F 16 push ss 0 00000C90 1F pop ds 0 00000C91 16 push ss 0 00000C92 07 pop es 3111 %endif 3112 0 00000C93 E93B10 jmp old_initcode 3114 3115 3116 init_device_get_environment: 0 00000C96 B451 mov ah, 51h 0 00000C98 CD21 int 21h 0 00000C9A 8EDB mov ds, bx 0 00000C9C A12C00 mov ax, [2Ch] 0 00000C9F 85C0 test ax, ax 0 00000CA1 7517 jnz @F 0 00000CA3 A11600 mov ax, [16h] 0 00000CA6 85C0 test ax, ax 0 00000CA8 740E jz .zero 0 00000CAA 83F8FF cmp ax, -1 0 00000CAD 7409 je .zero 0 00000CAF 39D8 cmp ax, bx 0 00000CB1 8ED8 mov ds, ax 0 00000CB3 A12C00 mov ax, [2Ch] 0 00000CB6 7502 jne @F 3132 .zero: 0 00000CB8 31C0 xor ax, ax 3134 @@: 0 00000CBA C3 retn 3136 3137 3138 %if _CONFIG 3139 ; INP: ss:dx -> buffer 3140 ; ds:si -> device driver command line 3141 find_executable_device: 3142 @@: 0 00000CBB AC lodsb 0 00000CBC 3C20 cmp al, 32 0 00000CBE 74FB je @B 0 00000CC0 3C09 cmp al, 9 0 00000CC2 74F7 je @B 0 00000CC4 4E dec si 0 00000CC5 89F7 mov di, si 3150 @@: 0 00000CC7 AC lodsb 0 00000CC8 3C09 cmp al, 9 0 00000CCA 7410 je @F 0 00000CCC 3C20 cmp al, 32 0 00000CCE 740C je @F 0 00000CD0 3C0D cmp al, 13 0 00000CD2 7408 je @F 0 00000CD4 3C0A cmp al, 10 0 00000CD6 7404 je @F 0 00000CD8 84C0 test al, al 0 00000CDA 75EB jnz @B 3162 @@: 0 00000CDC 4E dec si 0 00000CDD 1E push ds 0 00000CDE 07 pop es 0 00000CDF 89F1 mov cx, si 0 00000CE1 29F9 sub cx, di 0 00000CE3 83F97F cmp cx, 127 0 00000CE6 7722 ja .nodevice 0 00000CE8 87FE xchg di, si 3171 0 00000CEA B90000 mov cx, 0 3173 @@: 0 00000CED 39F7 cmp di, si 0 00000CEF 7610 jbe @F 0 00000CF1 4F dec di 0 00000CF2 803D2F cmp byte [di], '/' 0 00000CF5 7405 je .slash 0 00000CF7 803D5C cmp byte [di], '\' 0 00000CFA 75F1 jne @B 3181 .slash: 0 00000CFC 89F9 mov cx, di 0 00000CFE 41 inc cx 0 00000CFF 29F1 sub cx, si 3185 @@: 3186 0 00000D01 16 push ss 0 00000D02 07 pop es 0 00000D03 89D7 mov di, dx 0 00000D05 F3A4 rep movsb 0 00000D07 B000 mov al, 0 0 00000D09 AA stosb 3193 3194 .nodevice: 3195 .done: 0 00000D0A C3 retn 3197 %endif 3198 3199 3200 init_device_error_late: 0 00000D0B F606[0100]80 testopt [internalflags], has386 0 00000D10 7431 jz .16 3203 3204 subcpu 386 0 00000D12 66A1[0000] mov eax, [reg_eax] 0 00000D16 668B1E[0000] mov ebx, [reg_ebx] 0 00000D1B 668B0E[0000] mov ecx, [reg_ecx] 0 00000D20 668B16[0000] mov edx, [reg_edx] 0 00000D25 668B36[0000] mov esi, [reg_esi] 0 00000D2A 668B3E[0000] mov edi, [reg_edi] 0 00000D2F 668B2E[0000] mov ebp, [reg_ebp] 0 00000D34 66FF36[0000] push dword [reg_efl] 0 00000D39 669D popfd 0 00000D3B 8E26[0000] mov fs, [reg_fs] 0 00000D3F 8E2E[0000] mov gs, [reg_gs] 3216 subcpureset 3217 3218 .16: 3219 ; ax done last 0 00000D43 8B1E[0000] mov bx, [reg_ebx] 0 00000D47 8B0E[0000] mov cx, [reg_ecx] 0 00000D4B 8B16[0000] mov dx, [reg_edx] 0 00000D4F 8B36[0000] mov si, [reg_esi] 0 00000D53 8B3E[0000] mov di, [reg_edi] 0 00000D57 8B2E[0000] mov bp, [reg_ebp] 0 00000D5B FF36[0000] push word [reg_efl] 0 00000D5F 9D popf 0 00000D60 8E06[0000] mov es, [reg_es] 0 00000D64 8E16[0000] mov ss, [reg_ss] 0 00000D68 8B26[0000] mov sp, [reg_esp] 0 00000D6C FF36[0000] push word [reg_eax] 0 00000D70 8CD8 mov ax, ds 0 00000D72 8E1E[0000] mov ds, [reg_ds] 3234 3235 %ifn _LINK 3236 sub ax, strict word paras(deviceshim_size + 10h) 3237 %else 0 00000D76 2D[0100] sub ax, strict word relocatedzero + paras(10h) 3239 wlcalc word_wrt_DEVICESHIM_extpara_behind_deviceshim, equ $ - 2 3240 %endif 0 00000D79 26C747030381 mov word [es:bx + 3], 8103h ; error, done, code: unknown command 0 00000D7F 2683670E00 and word [es:bx + 0Eh], 0 0 00000D84 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 0 00000D88 58 pop ax 0 00000D89 CB retf 3246 %endif 3247 3248 3249 %if _DEBUG4 || _DEBUG5 3250 %define _DEB_ASM_PREFIX init_ 3251 %include "deb.asm" 3252 %endif 3253 3254 3255 %if ! _LINK && ! _LINK_COMPAT 3256 align 2, db 0 ; align on word boundary 3257 ; Table of patches that are to be set NOP if not running on a 386. 3258 writepatchtable patch_no386_table, PATCH_NO386_TABLE 3259 %undef PATCH_NO386_TABLE 3260 3261 align 2, db 0 3262 ; Table of patches that are to be set NOP if running on a 386. 3263 writepatchtable patch_386_table, PATCH_386_TABLE 3264 %undef PATCH_386_TABLE 3265 3266 %if _DUALCODE 3267 align 2, db 0 ; align on word boundary 3268 ; Table of patches that are to be set NOP if not running on a 386. 3269 writepatchtable patch_no386_table2, PATCH_NO386_TABLE2 3270 %undef PATCH_NO386_TABLE2 3271 3272 align 2, db 0 3273 ; Table of patches that are to be set NOP if running on a 386. 3274 writepatchtable patch_386_table2, PATCH_386_TABLE2 3275 %undef PATCH_386_TABLE2 3276 %else 3277 %assign __patch_no386_table2_method 0 3278 %assign __patch_386_table2_method 0 3279 %endif 3280 3281 align 2, db 0 ; align on word boundary 3282 ; Table of patches that are to be set NOP if not running on a 386. 3283 writepatchtable patch_no386_tableentry, PATCH_NO386_TABLEENTRY 3284 %undef PATCH_NO386_TABLEENTRY 3285 3286 align 2, db 0 3287 ; Table of patches that are to be set NOP if running on a 386. 3288 writepatchtable patch_386_tableentry, PATCH_386_TABLEENTRY 3289 %undef PATCH_386_TABLEENTRY 3290 %elif _LINK 3291 %ifn _ONLY386 || _ONLYNON386 3292 extern patch_no386_table 3293 extern patch_no386_table.amount 3294 %assign __patch_no386_table_method 1 3295 extern patch_386_table 3296 extern patch_386_table.amount 3297 %assign __patch_386_table_method 1 3298 %if _DUALCODE 3299 extern patch_no386_table2 3300 extern patch_no386_table2.amount 3301 %assign __patch_no386_table2_method 1 3302 extern patch_386_table2 3303 extern patch_386_table2.amount 3304 %assign __patch_386_table2_method 1 3305 %else 3306 %assign __patch_no386_table2_method 0 3307 %assign __patch_386_table2_method 0 3308 %endif 3309 extern patch_no386_tableentry 3310 extern patch_no386_tableentry.amount 3311 %assign __patch_no386_tableentry_method 1 3312 extern patch_386_tableentry 3313 extern patch_386_tableentry.amount 3314 %assign __patch_386_tableentry_method 1 3315 %assign patch_386_tableentry_size 1 ; placeholder 3316 %assign patch_no386_tableentry_size 1 ; placeholder 3317 %endif 3318 %endif 3319 3320 %if !_LINK && _LINK_COMPAT 3321 %assign _patch_no386_table_FORCE_METHOD 1 3322 %assign _patch_386_table_FORCE_METHOD 1 3323 %assign _patch_no386_table2_FORCE_METHOD 1 3324 %assign _patch_386_table2_FORCE_METHOD 1 3325 %assign _patch_no386_tableentry_FORCE_METHOD 1 3326 %assign _patch_386_tableentry_FORCE_METHOD 1 3327 3328 %ifn _ONLY386 || _ONLYNON386 3329 %assign __patch_no386_table_method 1 3330 %assign __patch_386_table_method 1 3331 %if _DUALCODE 3332 %assign __patch_no386_table2_method 1 3333 %assign __patch_386_table2_method 1 3334 %else 3335 %assign __patch_no386_table2_method 0 3336 %assign __patch_386_table2_method 0 3337 %endif 3338 %assign __patch_no386_tableentry_method 1 3339 %assign __patch_386_tableentry_method 1 3340 %endif 3341 %endif 3342 3343 3344 %ifn _LINK || _LINK_COMPAT 3345 %if _DUALCODE && ! _PM 3346 align 2, db 0 3347 relocate_from_code: 3348 dw PATCH_RELOCATE_FROM_lDEBUG_CODE 3349 .end: 3350 align 2, db 0 3351 relocate_from_code2: 3352 dw PATCH_RELOCATE_FROM_lDEBUG_CODE2 3353 .end: 3354 3355 %unimacro dualcall 1.nolist 3356 ; make sure we do not allow later uses 3357 %endif 3358 %endif 3359 3360 3361 %if _BOOTLDR 0 00000D8A 00 align 16, db 0 3363 ; Image identification 3364 ; First dword: signature 3365 ; Next word: version, two ASCII digits 3366 ; Next word: checksum. adding up all words of the paragraph gives zero 3367 ; Next word: size of image (including this paragraph) 3368 ; Three words reserved, zero. 3369 imageident: 3370 %if !_LOADER 0 00000D90 4E4445423030 db "NDEB00" 0 00000D96 0000 .check: dw 0 0 00000D98 0000 .size: dw 0 0 00000D9A 0000 times 3 dw 0 3375 %else 3376 istruc LOADERIMAGEIDENT 3377 at liiSignature 3378 db "NLDR00" 3379 at liiChecksum 3380 .check: dw 0 3381 at liiAmountParagraphs 3382 .size: dw 0 3383 at liiReserved 3384 times 3 dw 0 3385 at liiEntryQuerySize 3386 dw loader_query 3387 at liiEntryRelocate 3388 dw loader_transfer_relocate 3389 at liiEntryDebug 3390 dw loader_transfer_cmd3 3391 at liiStackPointer 3392 dw stack_end 3393 iend 3394 times (2Ch - ($ - imageident)) / 2 dw 0 3395 %endif 3396 %endif 3397 %if _DEVICE 3398 align 16, db 0 3399 init_container_signature: 0 00000DA0 464F525F53445F434F fill 16, 0, db "FOR_SD_CONTAINER" 0 00000DA9 4E5441494E4552 3401 %endif 3402 %if _EXTENSIONS 3403 align 16, db 0 3404 eld_linkcall: 3405 .: 3406 istruc ELD_INSTANCE 0 00000DB0 0000 at eldiStartCode, dw 0 0 00000DB2 8000 at eldiEndCode, dw .end - . 0 00000DB4 0000 at eldiStartData, dw 0 0 00000DB6 0000 at eldiEndData, dw 0 0 00000DB8 4C494E4B43414C4C at eldiIdentifier, fill 8, 32, db "LINKCALL" 0 00000DC0 0100 at eldiFlags, dw eldifResident 0 00000DC2 00 at eldiListing, db 0 3414 %pop ; discard istruc context 3415 ; iend 3416 %ifn _DUALCODE 3417 DUALLINK_UNUSED equ $ - eld_linkcall 3418 .call_duallink_return_error: 3419 call .to_code1 3420 jmp strict short $ 3421 dw duallink_return_error 3422 %endif 3423 3424 .to_entry: 0 00000DC3 53 push bx 0 00000DC4 B300 mov bl, 0 * (1 + !!_PM) 0 00000DC6 EB17 jmp @F 3428 .to_code1: 0 00000DC8 53 push bx 0 00000DC9 B304 mov bl, 2 * (1 + !!_PM) 3431 %if _DUALCODE 0 00000DCB EB12 jmp @F 3433 .to_code2: 0 00000DCD 53 push bx 0 00000DCE B308 mov bl, 4 * (1 + !!_PM) 3436 %endif 0 00000DD0 EB0D jmp @F 3438 .to_dualentry: 0 00000DD2 53 push bx 0 00000DD3 B30C mov bl, (!!_DUALCODE * 2 + 4) * (1 + !!_PM) 0 00000DD5 EB08 jmp @F 3442 .to_dualcode1: 0 00000DD7 53 push bx 0 00000DD8 B310 mov bl, (!!_DUALCODE * 2 + 6) * (1 + !!_PM) 3445 %if _DUALCODE 0 00000DDA EB03 jmp @F 3447 .to_dualcode2: 0 00000DDC 53 push bx 0 00000DDD B314 mov bl, (!!_DUALCODE * 2 + 8) * (1 + !!_PM) 3450 %endif 3451 @@: 3452 lframe 0 3453 lpar word, origret_farret_seg 3454 lpar word, origbx_farret_ofs 3455 lpar word, restore_back_nearret 0 00000DDF 50 push ax 3457 lpar dword, transfer 0 00000DE0 50 push ax 0 00000DE1 50 push ax 3460 lpar dword, transferthunk 0 00000DE2 50 push ax 0 00000DE3 50 push ax 0 00000DE4 5589E5 lenter 3464 lvar word, restorebx 0 00000DE7 FF760C push word [bp + ?origbx_farret_ofs] 3466 %if _PM 3467 lvar word, restoredi 0 00000DEA 57 push di 3469 %endif 0 00000DEB B700 mov bh, 0 0 00000DED 36FFB7[0000] push word [ss:extcall_table.ret + bx] 0 00000DF2 8F460A pop word [bp + ?restore_back_nearret] 3473 %if _PM 0 00000DF5 36FFB7[0200] push word [ss:extcall_table.ret + 2 + bx] 0 00000DFA 8F4602 pop word [bp + ?transferthunk] 0 00000DFD 368B3E[0000] mov di, [ss:pm_2_86m_0] 0 00000E02 36FFB5[0000] push word [ss:code_seg + di] 0 00000E07 8F4604 pop word [bp + ?transferthunk + 2] 3479 0 00000E0A 368B99[0000] mov bx, word [ss:extcall_table.segsel + bx + di] 3481 %else 3482 push word [ss:extcall_table.thunk + bx] 3483 pop word [bp + ?transferthunk] 3484 push word [ss:code_seg] 3485 pop word [bp + ?transferthunk + 2] 3486 mov bx, word [ss:extcall_table.segsel + bx] 3487 %endif 0 00000E0F 368B1F mov bx, word [ss:bx] 0 00000E12 895E08 mov word [bp + ?transfer + 2], bx 3490 0 00000E15 8B5E0E mov bx, word [bp + ?origret_farret_seg] 0 00000E18 2EFF7702 push word [cs:bx + 2] 0 00000E1C 8F4606 pop word [bp + ?transfer] 0 00000E1F 895E0C mov word [bp + ?origbx_farret_ofs], bx 3495 %ifn _PM 3496 mov word [bp + ?origret_farret_seg], cs 3497 %endif 3498 %if _PM 0 00000E22 5F pop di ; ?restoredi 3500 %endif 0 00000E23 5B pop bx ; ?restorebx 3502 lleave ctx 0 00000E24 5D pop bp ; ?frame_bp 0 00000E25 CB retf ; ?transfer 3505 ; still on stack: near return address, far return address 3506 0 00000E26 90 times 79h - ($ - .) nop 3508 .call_cmd3: 0 00000E29 E89CFF call .to_code1 0 00000E2C EBFE jmp strict short $ 0 00000E2E [0000] dw cmd3 3512 3513 align 16 3514 times 128 - ($ - .) nop 3515 .end: 3516 endarea eld_linkcall 3517 %endif 3518 3519 %if _BOOTLDR 3520 align 2, db 0 3521 loader_imageident: 3522 .: 0 00000E30 4E4C44523030 db "NLDR00" 3524 .size equ $ - . 3525 %endif 3526 3527 align 2, db 0 3528 memsize: 3529 %ifn _LINK 3530 dw paras(CODETARGET2 + ldebug_code_bootldr_truncated_size + ldebug_code2_size + historysegment_size + extsegment_size) 3535 ; same as paras(AUXTARGET1 3536 ; + auxbuff_size 3537 ; + historysegment_size 3538 ; + extsegment_size) 3539 %else 3540 %if 0 3541 %define CODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_nobits_truncated_size + datastack_size) 3542 %define CODETARGET2 (CODETARGET1+auxbuff_size) 3543 %define AUXTARGET1 (CODETARGET1+ldebug_code_bootldr_truncated_size+ldebug_code2_size) 3544 %define AUXTARGET2 CODETARGET1 3545 %define AUXTARGET3 (AUXTARGET1+auxbuff_size) 3546 %endif 0 00000E36 [0106] dw relocatedzero + paras(auxbuff_size + historysegment_size + extsegment_size) 3550 wlcalc word_segrel_MESSAGESEGMENT, equ $ - 2 3551 wlcalc word_wrt_MESSAGESEGMENT_extpara_behind_messagesegment_nobits_truncated, equ $ - 2 3552 wlcalc word_wrt_DATASTACKBASE_extpara_end_of_datastack, equ $ - 2 3553 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 3554 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 3555 %endif 3556 3557 %if _DEV_ENV_SIZE || _APP_ENV_SIZE 0 00000E38 0000 mem_envsize: dw 0 3559 %endif 3560 cmdline_buffer_start: 0 00000E3A [0000] dw cmdline_buffer 3562 init_layout: 0 00000E3C [6536] dw init_layout_none 3564 %if _DEVICE 0 00000E3E 0000 dev_memory_end: dw 0 3566 %endif 3567 init_auxbuff_want: 0 00000E40 1020 dw _AUXBUFFSIZE 3569 %if _EXTENSIONS 0 00000E42 0040 init_ext_want: dw _EXT_CODE_DEFAULT_SIZE 0 00000E44 0040 init_extdata_want: dw _EXT_DATA_DEFAULT_SIZE 3572 %endif 3573 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00000E46 0020 init_history_want: dw _HISTORY_WANT_SIZE 3575 %endif 3576 3577 init_switch_p_low_pathsearch_high_guessextension: 0 00000E48 00 init_switch_p_pathsearch: db 0 0 00000E49 00 init_switch_p_guessextension: db 0 0 00000E4A 0000 relocate_source: dw 0 0 00000E4C 0000 relocate_down: dw 0 0 00000E4E 0000 init_switch_r: dw 0 0 00000E50 0000 init_base_size: dw 0 0 00000E52 0000 init_target_size: dw 0 0 00000E54 0100 init_switch_t_umblink: dw 1 ; Add UMBs to memory chain 0 00000E56 FFFF dw -1 0 00000E58 FFFF dw -1 0 00000E5A 8200 init_switch_t_strategy: dw 82h ; Last fit, high then low 0 00000E5C 8200 dw 82h 0 00000E5E 8200 dw 82h 3591 %if _BOOTLDR 0 00000E60 0000 init_boot_new_memsizekib: dw 0 0 00000E62 0000 init_boot_old_memsizekib: dw 0 3594 0 00000E64 0000 init_boot_ebdasize: dw 0 0 00000E66 0000 init_boot_ebdasource: dw 0 0 00000E68 0000 init_boot_ebdadest: dw 0 0 00000E6A 00 init_boot_ebdaflag: db 0 0 00000E6B 00 init_preserveloader: db 0 3600 %endif 0 00000E6C FF init_switch_pw: db 0FFh 0 00000E6D 00 init_switch_t: db 0 0 00000E6E 00 init_switch_t_ignore: db 0 0 00000E6F 00 init_switch_t_break: db 0 0 00000E70 00 init_switch_t_variable: db 0 ; /TV: do not relocate environment 3606 %if _APP_ENV_SIZE || _DEV_ENV_SIZE 0 00000E71 00 app_env_allocation: db 0 ; set to 0FFh if app's environment 3608 ; *is* in its own separate memory block 3609 ; (like it used to be always) 3610 %endif 3611 3612 3613 imsg: 3614 3615 %if _APPLICATION || _DEVICE 3616 %assign ELD 0 3617 %assign INTERC3 0 3618 %assign PART1 0 3619 %assign PART2 0 3620 %assign PART3 1 3621 3622 %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 00000E72 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 00000E7A 2E434F4D .p_extensions: db ".COM" 0 00000E7E 2E455845 db ".EXE" 431 <1> %ifn INTERC3 0 00000E82 2E42494E db ".BIN" 433 <1> %endif 0 00000E86 00 asciz 435 <1> %if (($ - 1 - .p_extensions) % 4) != 0 436 <1> %error Wrong extensions length 437 <1> %endif 0 00000E87 504154483D .varpath: db "PATH=" 439 <1> .varpath.length equ $ - .varpath 440 <1> .extension_warning: 441 <1> %ifn ELD 0 00000E8C 436F6E64746E6C2E20 db _PROGNAME,": " 0 00000E95 44656275676761626C 0 00000E9E 65206C446562756758 0 00000EA7 3A20 443 <1> %endif 0 00000EA9 5761726E696E672C20 asciz "Warning, unknown filename extension specified!",13,10 0 00000EB2 756E6B6E6F776E2066 0 00000EBB 696C656E616D652065 0 00000EC4 7874656E73696F6E20 0 00000ECD 737065636966696564 0 00000ED6 210D0A00 445 <1> .kktoolong: 446 <1> %ifn ELD 0 00000EDA 436F6E64746E6C2E20 db _PROGNAME,": " 0 00000EE3 44656275676761626C 0 00000EEC 65206C446562756758 0 00000EF5 3A20 448 <1> %endif 0 00000EF7 4572726F722C20746F asciz "Error, too long command line tail!",13,10 0 00000F00 6F206C6F6E6720636F 0 00000F09 6D6D616E64206C696E 0 00000F12 65207461696C210D0A 0 00000F1B 00 450 <1> .pathtoolong: 451 <1> %ifn ELD 0 00000F1C 436F6E64746E6C2E20 db _PROGNAME,": " 0 00000F25 44656275676761626C 0 00000F2E 65206C446562756758 0 00000F37 3A20 453 <1> %endif 0 00000F39 4572726F722C20746F asciz "Error, too long %PATH% variable element!",13,10 0 00000F42 6F206C6F6E67202550 0 00000F4B 415448252076617269 0 00000F54 61626C6520656C656D 0 00000F5D 656E74210D0A00 455 <1> %endif 3623 %endif 3624 0 00000F64 4D415800 .max: asciz "MAX" 0 00000F68 4D494E00 .min: asciz "MIN" 3627 .default: 0 00000F6C 44454641554C5400 asciz "DEFAULT" 3629 %if _CONFIG 0 00000F74 4C4445425547434F4E .varconfig: db "LDEBUGCONFIG=" 0 00000F7D 4649473D 3631 .varconfig.length equ $ - .varconfig 0 00000F81 4C4445425547534352 .varscripts: db "LDEBUGSCRIPTS=" 0 00000F8A 495054533D 3633 .varscripts.length equ $ - .varscripts 3634 %endif 3635 %if _DEVICE && _DEV_ENV_SIZE || _APPLICATION && _APP_ENV_SIZE 3636 .app_env_too_large: 3637 .dev_env_too_large: 0 00000F8F 436F6E64746E6C2E20 asciz _PROGNAME,": Warning, too long environment! Not copying.",13,10 0 00000F98 44656275676761626C 0 00000FA1 65206C446562756758 0 00000FAA 3A205761726E696E67 0 00000FB3 2C20746F6F206C6F6E 0 00000FBC 6720656E7669726F6E 0 00000FC5 6D656E7421204E6F74 0 00000FCE 20636F7079696E672E 0 00000FD7 0D0A00 3639 %endif 3640 %if _APPLICATION || _DEVICE 3641 .early_mem_fail: 0 00000FDA 436F6E64746E6C2E20 db _PROGNAME,": Failed to allocate memory!" 0 00000FE3 44656275676761626C 0 00000FEC 65206C446562756758 0 00000FF5 3A204661696C656420 0 00000FFE 746F20616C6C6F6361 0 00001007 7465206D656D6F7279 0 00001010 21 3643 %endif 3644 .crlf: 0 00001011 0D0A00 asciz 13,10 3646 .relocate_failure: 0 00001014 436F6E64746E6C2E20 asciz _PROGNAME,": Relocation failed.",13,10 0 0000101D 44656275676761626C 0 00001026 65206C446562756758 0 0000102F 3A2052656C6F636174 0 00001038 696F6E206661696C65 0 00001041 642E0D0A00 3648 .init_relocate_failure: 0 00001046 436F6E64746E6C2E20 asciz _PROGNAME,": Second init relocation failed, out of memory.",13,10 0 0000104F 44656275676761626C 0 00001058 65206C446562756758 0 00001061 3A205365636F6E6420 0 0000106A 696E69742072656C6F 0 00001073 636174696F6E206661 0 0000107C 696C65642C206F7574 0 00001085 206F66206D656D6F72 0 0000108E 792E0D0A00 3650 .early_reloc_fail: 0 00001093 436F6E64746E6C2E20 asciz _PROGNAME,": Failed to relocate, internal error!",13,10 0 0000109C 44656275676761626C 0 000010A5 65206C446562756758 0 000010AE 3A204661696C656420 0 000010B7 746F2072656C6F6361 0 000010C0 74652C20696E746572 0 000010C9 6E616C206572726F72 0 000010D2 210D0A00 3652 %if _DEVICE 3653 .dos_below_5: 0 000010D6 204E6F74653A20444F asciz " Note: DOS must be at least version 5.",13,10 0 000010DF 53206D757374206265 0 000010E8 206174206C65617374 0 000010F1 2076657273696F6E20 0 000010FA 352E0D0A00 3655 .device_end_escaped: 0 000010FF 436F6E64746E6C2E20 asciz _PROGNAME,": Error, got escaped command line end!",13,10 0 00001108 44656275676761626C 0 00001111 65206C446562756758 0 0000111A 3A204572726F722C20 0 00001123 676F74206573636170 0 0000112C 656420636F6D6D616E 0 00001135 64206C696E6520656E 0 0000113E 64210D0A00 3657 .device_end_truncate: 0 00001143 436F6E64746E6C2E20 asciz _PROGNAME,": Error, truncating too long command line!",13,10 0 0000114C 44656275676761626C 0 00001155 65206C446562756758 0 0000115E 3A204572726F722C20 0 00001167 7472756E636174696E 0 00001170 6720746F6F206C6F6E 0 00001179 6720636F6D6D616E64 0 00001182 206C696E65210D0A00 3659 %endif 3660 %ifn _APPLICATION 3661 .not_an_application: 3662 ascic _PROGNAME,": Error, no application mode included!",13,10 3663 %endif 3664 %if _APPLICATION || _DEVICE 3665 %if _ALTVID 3666 .noaltvid: 0 0000118B 436F6E64746E6C2E20 asciz _PROGNAME,": Error, no alternative video adapter detected!",13,10 0 00001194 44656275676761626C 0 0000119D 65206C446562756758 0 000011A6 3A204572726F722C20 0 000011AF 6E6F20616C7465726E 0 000011B8 617469766520766964 0 000011C1 656F20616461707465 0 000011CA 722064657465637465 0 000011D3 64210D0A00 3668 %endif 3669 align 2, db 0 3670 .help.defaultfilename: 0 000011D8 43444542554758 db _FILENAME 3672 .help.defaultfilename.length equ $ - .help.defaultfilename 3673 0 000011DF 00 align 2, db 0 3675 .help.1: 0 000011E0 436F6E64746E6C2E20 fill_at_least 80, 0, asciz _PROGNAME,_VERSION,", debugger.",13,10 0 000011E9 44656275676761626C 0 000011F2 65206C446562756758 0 000011FB 2028323032362D3039 0 00001204 2D3232292C20646562 0 0000120D 75676765722E0D0A00 0 00001216 00 3677 3678 .help.1a: 0 00001230 0D0A db 13,10 0 00001232 55736167653A20 db "Usage: " 0 00001239 00 asciz 3682 .help.2: 0 0000123A 5B2E434F4D5D205B2F db "[.COM] [/C=commands] [[drive:][path]progname.ext [parameters]]",13,10 0 00001243 433D636F6D6D616E64 0 0000124C 735D205B5B64726976 0 00001255 653A5D5B706174685D 0 0000125E 70726F676E616D652E 0 00001267 657874205B70617261 0 00001270 6D65746572735D5D0D 0 00001279 0A 0 0000127A 0D0A db 13,10 0 0000127C 20202F433D636F6D6D db " /C=commands",9,9, "semicolon-separated list of commands (quote spaces)",13,10 0 00001285 616E6473090973656D 0 0000128E 69636F6C6F6E2D7365 0 00001297 70617261746564206C 0 000012A0 697374206F6620636F 0 000012A9 6D6D616E6473202871 0 000012B2 756F74652073706163 0 000012BB 6573290D0A 3686 %if _CONFIG 0 000012C0 20202F494E09090964 db " /IN",9,9,9, "discard command line buffer, do not run config",13,10 0 000012C9 69736361726420636F 0 000012D2 6D6D616E64206C696E 0 000012DB 65206275666665722C 0 000012E4 20646F206E6F742072 0 000012ED 756E20636F6E666967 0 000012F6 0D0A 3688 %endif 3689 %if _AUXBUFFSIZE != _AUXBUFFMAXSIZE 0 000012F8 20202F413D4D415809 db " /A=MAX",9,9, "expand auxiliary buffer to maximum, #" 0 00001301 09657870616E642061 0 0000130A 7578696C6961727920 0 00001313 62756666657220746F 0 0000131C 206D6178696D756D2C 0 00001325 2023 0 00001327 32345F353736 _autodigits _AUXBUFFMAXSIZE, 1, 1 0 0000132D 2042797465730D0A db " Bytes",13,10 0 00001335 20202F413D4D494E09 db " /A=MIN",9,9, "restrict auxiliary buffer to minimum, #" 0 0000133E 097265737472696374 0 00001347 20617578696C696172 0 00001350 792062756666657220 0 00001359 746F206D696E696D75 0 00001362 6D2C2023 0 00001366 385F323038 _autodigits _AUXBUFFSIZE, 1, 1 0 0000136B 2042797465730D0A db " Bytes",13,10 0 00001373 20202F413D6E756D62 db " /A=number",9,9, "set auxiliary buffer size to hex number of bytes",13,10 0 0000137C 657209097365742061 0 00001385 7578696C6961727920 0 0000138E 627566666572207369 0 00001397 7A6520746F20686578 0 000013A0 206E756D626572206F 0 000013A9 662062797465730D0A 0 000013B2 20202F413D236E756D db " /A=#number",9,9, "set auxiliary buffer size to decimal number of bytes",13,10 0 000013BB 626572090973657420 0 000013C4 617578696C69617279 0 000013CD 206275666665722073 0 000013D6 697A6520746F206465 0 000013DF 63696D616C206E756D 0 000013E8 626572206F66206279 0 000013F1 7465730D0A 0 000013F6 20202F41090909616C db " /A",9,9,9, "alias for /A=MAX",13,10 0 000013FF 69617320666F72202F 0 00001408 413D4D41580D0A 3699 %endif 3700 %if _EXTENSIONS 0 0000140F 20202F583D5B4D4158 db " /X=[MAX|MIN|number]",9, "change ELD code buffer size, 0 to #65_520 Bytes",13,10 0 00001418 7C4D494E7C6E756D62 0 00001421 65725D096368616E67 0 0000142A 6520454C4420636F64 0 00001433 652062756666657220 0 0000143C 73697A652C20302074 0 00001445 6F202336355F353230 0 0000144E 2042797465730D0A 0 00001456 20202F593D5B4D4158 db " /Y=[MAX|MIN|number]",9, "change ELD data buffer size, 0 to #" 0 0000145F 7C4D494E7C6E756D62 0 00001468 65725D096368616E67 0 00001471 6520454C4420646174 0 0000147A 612062756666657220 0 00001483 73697A652C20302074 0 0000148C 6F2023 3703 %ifn _LINK 3704 %assign NUMBER ext_data_max_size_equate_early 3705 _autodigits NUMBER, 5, 1 3706 db " Bytes",13,10 3707 %else 3708 wlcalc word_minusext_ext_data_area, equ $ 3709 wlcalc word_itoa_31_06_0Ah, equ $ 0 0000148F [F0FF] dw relocatedzero + 0FFF0h 0 00001491 00 times 4 db 0 0 00001495 2042797465730D0A db " Bytes",13,10 3713 %endif 3714 %endif 3715 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 0000149D 20202F483D5B4D4158 db " /H=[MAX|MIN|number]",9, "change history buffer size, #260 to #65_520 Bytes",13,10 0 000014A6 7C4D494E7C6E756D62 0 000014AF 65725D096368616E67 0 000014B8 6520686973746F7279 0 000014C1 206275666665722073 0 000014CA 697A652C2023323630 0 000014D3 20746F202336355F35 0 000014DC 32302042797465730D 0 000014E5 0A 3717 %endif 0 000014E6 20202F420909097275 db " /B",9,9,9, "run a breakpoint within initialisation",13,10 0 000014EF 6E206120627265616B 0 000014F8 706F696E7420776974 0 00001501 68696E20696E697469 0 0000150A 616C69736174696F6E 0 00001513 0D0A 0 00001515 20202F505B2B7C2D5D db " /P[+|-]",9,9, "append ext to initial filename and search path",13,10 0 0000151E 0909617070656E6420 0 00001527 65787420746F20696E 0 00001530 697469616C2066696C 0 00001539 656E616D6520616E64 0 00001542 207365617263682070 0 0000154B 6174680D0A 0 00001550 20202F465B2B7C2D5D db " /F[+|-]",9,9, "always treat executable file as a flat binary",13,10 0 00001559 0909616C7761797320 0 00001562 747265617420657865 0 0000156B 63757461626C652066 0 00001574 696C65206173206120 0 0000157D 666C61742062696E61 0 00001586 72790D0A 0 0000158A 20202F455B2B7C2D5D db " /E[+|-]",9,9, "for flat binaries set up Stack Segment != PSP",13,10 0 00001593 0909666F7220666C61 0 0000159C 742062696E61726965 0 000015A5 732073657420757020 0 000015AE 537461636B20536567 0 000015B7 6D656E7420213D2050 0 000015C0 53500D0A 3722 %if _VXCHG 0 000015C4 20202F565B2B7C2D5D db " /V[+|-]",9,9, "enable/disable video screen swapping",13,10 0 000015CD 0909656E61626C652F 0 000015D6 64697361626C652076 0 000015DF 6964656F2073637265 0 000015E8 656E20737761707069 0 000015F1 6E670D0A 3724 %endif 3725 %if _DEBUG && _DEBUG_COND 0 000015F5 20202F445B2B7C2D5D db " /D[+|-]",9,9, "enable/disable debuggable mode",13,10 0 000015FE 0909656E61626C652F 0 00001607 64697361626C652064 0 00001610 656275676761626C65 0 00001619 206D6F64650D0A 3727 %endif 3728 %if _ALTVID 0 00001620 20202F325B2B7C2D5D db " /2[+|-]",9,9, "enable/disable use alternate video adapter for output",13,10 0 00001629 0909656E61626C652F 0 00001632 64697361626C652075 0 0000163B 736520616C7465726E 0 00001644 61746520766964656F 0 0000164D 206164617074657220 0 00001656 666F72206F75747075 0 0000165F 740D0A 3730 %endif 0 00001662 202070726F676E616D db " progname.ext",9,9,"(executable) file to debug or examine",13,10 0 0000166B 652E65787409092865 0 00001674 786563757461626C65 0 0000167D 292066696C6520746F 0 00001686 206465627567206F72 0 0000168F 206578616D696E650D 0 00001698 0A 0 00001699 2020706172616D6574 db " parameters",9,9, "parameters given to program",13,10 0 000016A2 657273090970617261 0 000016AB 6D6574657273206769 0 000016B4 76656E20746F207072 0 000016BD 6F6772616D0D0A 0 000016C4 0D0A db 13,10 0 000016C6 466F722061206C6973 db "For a list of debugging commands, run " 0 000016CF 74206F662064656275 0 000016D8 6767696E6720636F6D 0 000016E1 6D616E64732C207275 0 000016EA 6E20 0 000016EC 00 asciz 3736 .help.3: 0 000016ED 20616E642074797065 db " and type ? at the prompt.",13,10 0 000016F6 203F20617420746865 0 000016FF 2070726F6D70742E0D 0 00001708 0A 0 00001709 00 asciz 3739 %endif 3740 %if _ONLY386 3741 .no386: ascizline "Error: This ",_PROGNAME," build requires a 386 CPU or higher." 3742 %elif _ONLYNON386 3743 .386: asciiline "Warning: This ",_PROGNAME," build is ignorant of 386 CPU specifics." 3744 ascizline 9," It does not allow access to the available 386-specific registers!" 3745 %endif 3746 3747 %if _BOOTLDR_DISCARD_HELP 3748 align 2, db 0 3749 %ifn _LINK || _LINK_COMPAT 3750 .boothelp_replacement: helppage bootdisc 3751 %else 3752 .boothelp_replacement: 3753 %define MESSAGE_INLINE 3754 %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 0000170A 546869732068656C70 db MESSAGE 0 00001713 207061676520697320 0 0000171C 6F6E6C792061766169 0 00001725 6C61626C6520696E20 0 0000172E 626F6F74206C6F6164 0 00001737 6564206D6F64652E0D 0 00001740 0A 24 <1> %else 25 <1> _strlen MESSAGE,0 26 <1> %endif 3755 %undef MESSAGE_INLINE 0 00001741 00 asciz 3757 %endif 3758 endarea .boothelp_replacement 3759 %endif 3760 3761 %if _APPLICATION || _DEVICE 3762 %if _SYMBOLIC 3763 .switch_s_garbage: 0 00001742 49676E6F72696E6720 asciz "Ignoring garbage at end of /S switch!",13,10 0 0000174B 676172626167652061 0 00001754 7420656E64206F6620 0 0000175D 2F5320737769746368 0 00001766 210D0A00 3765 .switch_s_error: 0 0000176A 537769746368202F53 asciz "Switch /S invalid content",13,10 0 00001773 20696E76616C696420 0 0000177C 636F6E74656E740D0A 0 00001785 00 3767 %endif 3768 .invalidswitch: 0 00001786 496E76616C69642073 db "Invalid switch - " 0 0000178F 7769746368202D20 3770 .invalidswitch_a: 0 00001797 780D0A00 asciz "x",13,10 3772 .switch_x_error: 0 0000179B 537769746368202F db "Switch /" 3774 .switch_x_error_a: 0 000017A3 7820696E76616C6964 asciz "x invalid content",13,10 0 000017AC 20636F6E74656E740D 0 000017B5 0A00 3776 %endif 3777 %if _CONFIG 3778 %if _APPLICATION 0 000017B7 00 align 2, db 0 3780 .default_cmdline.app: 3781 db _APPSCRIPTPREFIX 0 000017B8 406966206578697374 db "@if exists y ::CONFIG::",_APPSCRIPTNAME," :",_APPSCRIPTLABEL 0 000017C1 732079203A3A434F4E 0 000017CA 4649473A3A4C434445 0 000017D3 4255472E534C44203A 0 000017DC 6170706C6963617469 0 000017E5 6F6E73746172747570 0 000017EE 207468656E2079203A db " then y ::CONFIG::",_APPSCRIPTNAME," :",_APPSCRIPTLABEL 0 000017F7 3A434F4E4649473A3A 0 00001800 4C4344454255472E53 0 00001809 4C44203A6170706C69 0 00001812 636174696F6E737461 0 0000181B 72747570 0 0000181F 0D db 13 3785 .default_cmdline.app.length equ $ - .default_cmdline.app 0 00001820 00 db 0 3787 %if .default_cmdline.app.length + 128 + 8 > _RC_BUFFER_SIZE 3788 %error Too large default app cmdline 3789 %endif 3790 %endif 3791 %if _DEVICE 0 00001821 00 align 2, db 0 3793 .default_cmdline.dev: 3794 db _DEVSCRIPTPREFIX 0 00001822 406966206578697374 db "@if exists y ::CONFIG::",_DEVSCRIPTNAME," :",_DEVSCRIPTLABEL 0 0000182B 732079203A3A434F4E 0 00001834 4649473A3A4C434445 0 0000183D 4255472E534C44203A 0 00001846 646576696365737461 0 0000184F 72747570 0 00001853 207468656E2079203A db " then y ::CONFIG::",_DEVSCRIPTNAME," :",_DEVSCRIPTLABEL 0 0000185C 3A434F4E4649473A3A 0 00001865 4C4344454255472E53 0 0000186E 4C44203A6465766963 0 00001877 6573746172747570 0 0000187F 0D db 13 3798 .default_cmdline.dev.length equ $ - .default_cmdline.dev 0 00001880 00 db 0 3800 %if .default_cmdline.dev.length + 128 + 8 > _RC_BUFFER_SIZE 3801 %error Too large default dev cmdline 3802 %endif 3803 %endif 3804 %endif 3805 %if _BOOTLDR 0 00001881 00 align 2, db 0 3807 .default_cmdline.boot: 3808 db _BOOTSCRIPTPREFIX 0 00001882 406966206578697374 db "@if exists y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 0 0000188B 732079206C64702F4C 0 00001894 4344454255472E534C 0 0000189D 44203A626F6F747374 0 000018A6 6172747570 0 000018AB 207468656E2079206C db " then y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 0 000018B4 64702F4C4344454255 0 000018BD 472E534C44203A626F 0 000018C6 6F7473746172747570 0 000018CF 00 asciz 3812 .default_cmdline.boot.length equ $ - .default_cmdline.boot 3813 %if .default_cmdline.boot.length + 8 > _RC_BUFFER_SIZE 3814 %error Too large default boot cmdline 3815 %endif 3816 3817 %if _EXECUTABLE 3818 .ldpslash: 0 000018D0 6C64702F db "ldp/" 3820 %endif 3821 .rpl_detected: 0 000018D4 52504C206465746563 asciz "RPL detected! Currently unsupported.",13,10 0 000018DD 746564212043757272 0 000018E6 656E746C7920756E73 0 000018EF 7570706F727465642E 0 000018F8 0D0A00 3823 .mismatch_detected: 0 000018FB 4D69736D6174636820 asciz "Mismatch in memory size detected! Internal error!",13,10 0 00001904 696E206D656D6F7279 0 0000190D 2073697A6520646574 0 00001916 65637465642120496E 0 0000191F 7465726E616C206572 0 00001928 726F72210D0A00 3825 .boot_ebda_unexpected: 0 0000192F 454244412061742075 asciz "EBDA at unexpected position.",13,10 0 00001938 6E6578706563746564 0 00001941 20706F736974696F6E 0 0000194A 2E0D0A00 3827 .boot_error_out_of_memory: 0 0000194E 4F7574206F66206D65 asciz "Out of memory!",13,10 0 00001957 6D6F7279210D0A00 3829 .boot_error_internal: 0 0000195F 496E7465726E616C20 asciz "Internal error while relocating load image!",13,10 0 00001968 6572726F7220776869 0 00001971 6C652072656C6F6361 0 0000197A 74696E67206C6F6164 0 00001983 20696D616765210D0A 0 0000198C 00 3831 .booterror: 0 0000198D 0D0A436F6E64746E6C asciz 13,10,_PROGNAME," boot error. Press any key to reboot.",13,10 0 00001996 2E2044656275676761 0 0000199F 626C65206C44656275 0 000019A8 675820626F6F742065 0 000019B1 72726F722E20507265 0 000019BA 737320616E79206B65 0 000019C3 7920746F207265626F 0 000019CC 6F742E0D0A00 3833 .bootwarn: 0 000019D2 0D0A436F6E64746E6C asciz 13,10,_PROGNAME," warning: " 0 000019DB 2E2044656275676761 0 000019E4 626C65206C44656275 0 000019ED 6758207761726E696E 0 000019F6 673A2000 3835 .boot_warn_no_loader: 0 000019FA 457870656374656420 asciz "Expected loader not found!",13,10 0 00001A03 6C6F61646572206E6F 0 00001A0C 7420666F756E64210D 0 00001A15 0A00 3837 .boot_warn_invalid_loader: 0 00001A17 457870656374656420 asciz "Expected loader is invalid!",13,10 0 00001A20 6C6F61646572206973 0 00001A29 20696E76616C696421 0 00001A32 0D0A00 3839 .boot_warn_lazy_loader: 0 00001A35 457870656374656420 asciz "Expected loader doesn't have a query function!",13,10 0 00001A3E 6C6F6164657220646F 0 00001A47 65736E277420686176 0 00001A50 652061207175657279 0 00001A59 2066756E6374696F6E 0 00001A62 210D0A00 3841 .boot_warn_loader_no_reloc: 0 00001A66 4C6F6164657220646F asciz "Loader doesn't provide a relocation function!",13,10 0 00001A6F 65736E27742070726F 0 00001A78 766964652061207265 0 00001A81 6C6F636174696F6E20 0 00001A8A 66756E6374696F6E21 0 00001A93 0D0A00 3843 %endif 3844 %if _DOSEMU 0 00001A96 30322F32352F3933 .dosemudate: db "02/25/93" 3846 %endif 3847 %if _VDD && (_APPLICATION || _DEVICE) 0 00001A9E 44454258585644442E .vdd: asciz "DEBXXVDD.DLL" 0 00001AA7 444C4C00 0 00001AAB 446973706174636800 .dispatch: asciz "Dispatch" 0 00001AB4 496E697400 .init: asciz "Init" 0 00001AB9 4D4F555345202020 .mouse: db "MOUSE",32,32,32 ; Looks like a device name 0 00001AC1 416E64792057617473 .andy: db "Andy Watson" ; I don't know him and why he's inside the NTVDM mouse driver 0 00001ACA 6F6E 3853 endarea .andy 0 00001ACC 57696E646F7773204E .ntdos: db "Windows NT MS-DOS subsystem Mouse Driver" ; Int33.004D mouse driver copyright string (not ASCIZ) 0 00001AD5 54204D532D444F5320 0 00001ADE 73756273797374656D 0 00001AE7 204D6F757365204472 0 00001AF0 69766572 3855 endarea .ntdos 3856 3857 ; INP: - 3858 ; OUT: CY if not NTVDM 3859 ; NC if NTVDM 3860 ; ds = es = cs 3861 ; CHG: ax, bx, cx, dx, di, si, bp, es, ds 3862 isnt: 0 00001AF4 B80258 mov ax, 5802h ; Get UMB link state 0 00001AF7 CD21 int 21h 0 00001AF9 30E4 xor ah, ah 0 00001AFB 50 push ax ; Save UMB link state 0 00001AFC B80358 mov ax, 5803h ; Set UMB link state: 0 00001AFF BB0100 mov bx, 1 ; Add UMBs to memory chain 0 00001B02 CD21 int 21h 0 00001B04 B452 mov ah, 52h 0 00001B06 BBFFFF mov bx, -1 0 00001B09 CD21 int 21h ; Get list of lists 0 00001B0B 43 inc bx ; 0FFFFh ? 0 00001B0C 7503E98E00 jz .notnt ; invalid --> 0 00001B11 83FB02 cmp bx, 2 ; would access word at 0FFFFh ? 0 00001B14 7503E98600 je .notnt ; yes, invalid --> 0 00001B19 268B47FD mov ax, word [es:bx-3] ; First MCB 0 00001B1D 0E push cs 0 00001B1E 07 pop es ; reset es 3880 .loop: 0 00001B1F 8ED8 mov ds, ax ; ds = MCB 0 00001B21 40 inc ax ; Now segment of memory block itself 0 00001B22 31D2 xor dx, dx 0 00001B24 31DB xor bx, bx 0 00001B26 803F5A cmp byte [bx], 'Z' ; End of MCB chain? 0 00001B29 7503 jne .notlast 0 00001B2B 42 inc dx 0 00001B2C EB05 jmp short .notchain 3889 .notlast: 0 00001B2E 803F4D cmp byte [bx], 'M' ; Valid MCB chain? 0 00001B31 756C jne .error 3892 .notchain: 0 00001B33 8B4F03 mov cx, [bx+3] ; MCB size in paragraphs 3894 ; ax = current memory block 3895 ; cx = size of current memory block in paragraphs 3896 ; dx = flag whether this is the last MCB 3897 ; ds = current MCB (before memory block) 0 00001B36 837F0108 cmp word [bx+1], 8 ; MCB owner DOS? 0 00001B3A 755D jne .notfound_1 0 00001B3C 817F085344 cmp word [bx+8], "SD" ; MCB name "SD"? 0 00001B41 7556 jne .notfound_1 3902 .loopsub: 0 00001B43 8ED8 mov ds, ax ; SD sub-segment inside memory block 0 00001B45 40 inc ax 0 00001B46 49 dec cx 0 00001B47 8B6F03 mov bp, word [bx+3] ; Paragraphs 'til end of SD sub-segment 3907 ; ax = current SD sub-segment 3908 ; cx = paragraphs from SD sub-segment start (ax) to current memory block end 3909 ; ds = current SD sub-MCB (like MCB, but for SD sub-segment) 3910 ; bp = current SD sub-segment size in paragraphs 0 00001B4A 39E9 cmp cx, bp 0 00001B4C 724B jb .notfound_1 ; Goes beyond memory block, invalid --> 0 00001B4E 803F51 cmp byte [bx], 'Q' ; NTVDM type 51h sub-segment ? 0 00001B51 753C jne .notfound_2 ; no --> 0 00001B53 BE0800 mov si, 8 ; Offset of device name (if SD device driver sub-segment) 0 00001B56 BF[B91A] mov di, imsg.mouse 0 00001B59 51 push cx 0 00001B5A 89F1 mov cx, si ; length of name 0 00001B5C F3A6 repe cmpsb ; blank-padded device name "MOUSE" ? 0 00001B5E 59 pop cx 0 00001B5F 752E jne .notfound_2 ; Device name doesn't match, try next SD sub-segment 0 00001B61 8CD8 mov ax, ds 0 00001B63 40 inc ax 0 00001B64 8ED8 mov ds, ax ; Segment of SD sub-segment 3925 ; ds = current SD sub-segment 0 00001B66 89E8 mov ax, bp ; Leave paragraph value in bp 0 00001B68 A900F0 test ax, 0F000h ; Would *16 cause an overflow? 0 00001B6B 7520 jnz .notfound_3 ; Then too large --> 0 00001B6D 51 push cx 0 00001B6E B104 mov cl, 4 0 00001B70 D3E0 shl ax, cl ; *16 0 00001B72 59 pop cx 3933 ; ax = current SD sub-segment size in byte 3934 .andy: 0 00001B73 BF[C11A] mov di, imsg.andy 0 00001B76 51 push cx 0 00001B77 B90B00 mov cx, imsg.andy_size 0 00001B7A E82E00 call findstring ; String "Andy Watson"? 0 00001B7D 59 pop cx 0 00001B7E 720D jc .notfound_3 3941 .ntdos: 0 00001B80 BF[CC1A] mov di, imsg.ntdos 0 00001B83 51 push cx 0 00001B84 B92800 mov cx, imsg.ntdos_size 0 00001B87 E82100 call findstring ; String "Windows NT MS-DOS subsystem Mouse Driver"? 0 00001B8A 59 pop cx 0 00001B8B 7313 jnc .found ; (NC) 3948 .notfound_3: 0 00001B8D 8CD8 mov ax, ds 3950 .notfound_2: 0 00001B8F 39E9 cmp cx, bp 0 00001B91 7406 je .notfound_1 ; End of SD memory block, get next MCB 0 00001B93 01E8 add ax, bp ; Address next SD sub-MCB 0 00001B95 29E9 sub cx, bp 0 00001B97 EBAA jmp short .loopsub ; Try next SD sub-segment 3956 .notfound_1: 0 00001B99 01C8 add ax, cx ; Address next MCB 0 00001B9B 85D2 test dx, dx ; Non-zero if 'Z' MCB 0 00001B9D 7480 jz .loop ; If not at end of MCB chain, try next 3960 ; jmp short .notnt ; Otherwise, not found 3961 .error: 3962 .notnt: 0 00001B9F F9 stc 3964 .found: 0 00001BA0 0E push cs 0 00001BA1 1F pop ds ; restore ds 3967 0 00001BA2 5B pop bx ; saved UMB link state 0 00001BA3 B80358 mov ax, 5803h 0 00001BA6 9C pushf 0 00001BA7 CD21 int 21h ; Set UMB link state 0 00001BA9 9D popf 0 00001BAA C3 retn 3974 3975 findstring: 0 00001BAB 31F6 xor si, si 3977 .loop: 0 00001BAD 56 push si 0 00001BAE 01CE add si, cx 0 00001BB0 7203 jc .notfound_c 0 00001BB2 4E dec si ; The largest offset we need for this compare 0 00001BB3 39F0 cmp ax, si 3983 .notfound_c: 0 00001BB5 5E pop si 0 00001BB6 720D jb .return ; Not found if at top of memory block --> 0 00001BB8 57 push di 0 00001BB9 56 push si 0 00001BBA 51 push cx 0 00001BBB F3A6 repe cmpsb ; String somewhere inside program? 0 00001BBD 59 pop cx 0 00001BBE 5E pop si 0 00001BBF 5F pop di 0 00001BC0 7403 je .return ; Yes, proceed --> (if ZR, NC) 0 00001BC2 46 inc si ; Increase pointer by one 0 00001BC3 EBE8 jmp short .loop ; Try next address 3996 .return: 0 00001BC5 C3 retn 3998 %endif 3999 4000 4001 ; Move paragraphs 4002 ; 4003 ; INP: ax:0-> source 4004 ; dx:0-> destination 4005 ; cx = number of paragraphs 4006 ; CHG: - 4007 ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 4008 ; Do not provide a wrapped/HMA source or destination! 4009 init_movp: 0 00001BC6 51 push cx 0 00001BC7 1E push ds 0 00001BC8 56 push si 0 00001BC9 06 push es 0 00001BCA 57 push di 4015 0 00001BCB 39D0 cmp ax, dx ; source above destination ? 0 00001BCD 770A ja .up ; yes, move up (forwards) --> 0 00001BCF 747B je .return ; same, no need to move --> 0 00001BD1 50 push ax 0 00001BD2 01C8 add ax, cx ; (expected not to carry) 0 00001BD4 39D0 cmp ax, dx ; end of source is above destination ? 0 00001BD6 58 pop ax 0 00001BD7 7730 ja .down ; yes, move from top down --> 4024 ; Here, the end of source is below-or-equal the destination, 4025 ; so they do not overlap. In this case we prefer moving up. 4026 4027 .up: 0 00001BD9 50 push ax 0 00001BDA 52 push dx 4030 .uploop: 0 00001BDB 8ED8 mov ds, ax 0 00001BDD 8EC2 mov es, dx 0 00001BDF 31FF xor di, di 0 00001BE1 31F6 xor si, si ; -> start of segment 0 00001BE3 81E90010 sub cx, 1000h ; 64 KiB left ? 0 00001BE7 7610 jbe .uplast ; no --> 0 00001BE9 51 push cx 0 00001BEA B90080 mov cx, 10000h /2 0 00001BED F3A5 rep movsw ; move 64 KiB 0 00001BEF 59 pop cx 0 00001BF0 050010 add ax, 1000h 0 00001BF3 81C20010 add dx, 1000h ; -> next segment 0 00001BF7 EBE2 jmp short .uploop ; proceed for more --> 4044 .uplast: 0 00001BF9 81C10010 add cx, 1000h ; restore counter 0 00001BFD D1E1 shl cx, 1 0 00001BFF D1E1 shl cx, 1 0 00001C01 D1E1 shl cx, 1 ; *8, paragraphs to words 0 00001C03 F3A5 rep movsw ; move last part 0 00001C05 5A pop dx 0 00001C06 58 pop ax 0 00001C07 EB43 jmp short .return 4053 4054 .down: 0 00001C09 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 4056 .dnloop: 0 00001C0A 81E90010 sub cx, 1000h ; 64 KiB left ? 0 00001C0E 761A jbe .dnlast ; no --> 0 00001C10 50 push ax 0 00001C11 52 push dx 0 00001C12 01C8 add ax, cx 0 00001C14 01CA add dx, cx 0 00001C16 8ED8 mov ds, ax ; -> 64 KiB not yet moved 0 00001C18 8EC2 mov es, dx 0 00001C1A 5A pop dx 0 00001C1B 58 pop ax 0 00001C1C BFFEFF mov di, -2 0 00001C1F 89FE mov si, di ; moved from last word down 0 00001C21 51 push cx 0 00001C22 B90080 mov cx, 10000h /2 0 00001C25 F3A5 rep movsw ; move 64 KiB 0 00001C27 59 pop cx 0 00001C28 EBE0 jmp short .dnloop ; proceed for more --> 4074 .dnlast: 0 00001C2A 81C10010 add cx, 1000h ; restore counter 0 00001C2E D1E1 shl cx, 1 0 00001C30 D1E1 shl cx, 1 0 00001C32 D1E1 shl cx, 1 ; *8, paragraphs to words 0 00001C34 89CF mov di, cx 0 00001C36 4F dec di 0 00001C37 D1E7 shl di, 1 ; words to offset, -> last word 0 00001C39 89FE mov si, di 0 00001C3B 8ED8 mov ds, ax 0 00001C3D 8EC2 mov es, dx ; first segment correct 4085 4086 4087 numdef AMD_ERRATUM_109_WORKAROUND, 1 4088 %if 0 4089 4090 Jack R. Ellis pointed out this erratum: 4091 4092 Quoting from https://www.amd.com/system/files/TechDocs/25759.pdf page 69: 4093 4094 109 Certain Reverse REP MOVS May Produce Unpredictable Behavior 4095 4096 Description 4097 4098 In certain situations a REP MOVS instruction may lead to 4099 incorrect results. An incorrect address size, data size 4100 or source operand segment may be used or a succeeding 4101 instruction may be skipped. This may occur under the 4102 following conditions: 4103 4104 * EFLAGS.DF=1 (the string is being moved in the reverse direction). 4105 4106 * The number of items being moved (RCX) is between 1 and 20. 4107 4108 * The REP MOVS instruction is preceded by some microcoded instruction 4109 that has not completely retired by the time the REP MOVS begins 4110 execution. The set of such instructions includes BOUND, CLI, LDS, 4111 LES, LFS, LGS, LSS, IDIV, and most microcoded x87 instructions. 4112 4113 Potential Effect on System 4114 4115 Incorrect results may be produced or the system may hang. 4116 4117 Suggested Workaround 4118 4119 Contact your AMD representative for information on a BIOS update. 4120 4121 %endif 4122 4123 %if _AMD_ERRATUM_109_WORKAROUND 0 00001C3F E308 jcxz @FF 0 00001C41 83F914 cmp cx, 20 0 00001C44 7703 ja @FF 4127 @@: 0 00001C46 A5 movsw 0 00001C47 E2FD loop @B 4130 @@: 4131 %endif 0 00001C49 F3A5 rep movsw ; move first part 0 00001C4B FC cld 4134 .return: 0 00001C4C 5F pop di 0 00001C4D 07 pop es 0 00001C4E 5E pop si 0 00001C4F 1F pop ds 0 00001C50 59 pop cx 0 00001C51 C3 retn 4141 4142 4143 %if _BOOTLDR 4144 ; only called for boot-loaded mode 4145 init_getc_bootldr: 0 00001C52 31C0 xor ax, ax 0 00001C54 CD16 int 16h 0 00001C56 C3 retn 4149 %endif 4150 4151 init_putsz_cs: 0 00001C57 50 push ax 0 00001C58 53 push bx 0 00001C59 51 push cx 0 00001C5A 52 push dx 0 00001C5B 1E push ds 0 00001C5C 06 push es 0 00001C5D 57 push di 0 00001C5E 0E push cs 0 00001C5F 07 pop es 0 00001C60 0E push cs 0 00001C61 1F pop ds 0 00001C62 89D7 mov di, dx ; es:di-> string 0 00001C64 30C0 xor al, al 0 00001C66 B9FFFF mov cx, -1 0 00001C69 F2AE repne scasb ; search zero 0 00001C6B F7D1 not cx 0 00001C6D 49 dec cx ; cx = length of message 0 00001C6E 5F pop di 0 00001C6F E82900 call init_puts_ds 0 00001C72 07 pop es 0 00001C73 1F pop ds 0 00001C74 5A pop dx 0 00001C75 59 pop cx 0 00001C76 5B pop bx 0 00001C77 58 pop ax 0 00001C78 C3 retn 4178 4179 %if _BOOTLDR 4180 init_putsz_cs_bootldr: 0 00001C79 50 push ax 0 00001C7A 53 push bx 0 00001C7B 51 push cx 0 00001C7C 52 push dx 0 00001C7D 1E push ds 0 00001C7E 06 push es 0 00001C7F 57 push di 0 00001C80 0E push cs 0 00001C81 07 pop es 0 00001C82 0E push cs 0 00001C83 1F pop ds 0 00001C84 89D7 mov di, dx ; es:di-> string 0 00001C86 30C0 xor al, al 0 00001C88 B9FFFF mov cx, -1 0 00001C8B F2AE repne scasb ; search zero 0 00001C8D F7D1 not cx 0 00001C8F 49 dec cx ; cx = length of message 0 00001C90 5F pop di 0 00001C91 E80F00 call init_puts_ds_bootldr 0 00001C94 07 pop es 0 00001C95 1F pop ds 0 00001C96 5A pop dx 0 00001C97 59 pop cx 0 00001C98 5B pop bx 0 00001C99 58 pop ax 0 00001C9A C3 retn 4207 %endif 4208 4209 init_puts_ds: 4210 %if _BOOTLDR 4211 %if _APPLICATION || _DEVICE 0 00001C9B 36F606[0100]40 testopt [ss:internalflags], nodosloaded 0 00001CA1 7413 jz @F 4214 %endif 4215 4216 init_puts_ds_bootldr: 0 00001CA3 56 push si 0 00001CA4 55 push bp 0 00001CA5 89D6 mov si, dx 0 00001CA7 E30A jcxz .return 4221 .loop: 0 00001CA9 AC lodsb 0 00001CAA BB0700 mov bx, 0007 0 00001CAD B40E mov ah, 0Eh 0 00001CAF CD10 int 10h 0 00001CB1 E2F6 loop .loop 4227 .return: 0 00001CB3 5D pop bp 0 00001CB4 5E pop si 0 00001CB5 C3 retn 4231 4232 @@: 4233 %endif 4234 %if _APPLICATION || _DEVICE 0 00001CB6 BB0100 mov bx, 1 ; standard output 0 00001CB9 B440 mov ah, 40h ; write to file 0 00001CBB E302 jcxz @F 0 00001CBD CD21 int 21h 4239 @@: 0 00001CBF C3 retn 4241 %endif 4242 4243 4244 %if _BOOTLDR 4245 ; ds = ss = debugger data segment 4246 ; (ds - 1) = image ident prefix paragraph 4247 boot_old_initcode: 0 00001CC0 FC cld 4249 4250 d4 call init_d4message 4251 d4 asciz "In boot loader; press any key",13,10 4252 d4 call init_d4pauseforkey 4253 4254 %if !_LOADER 0 00001CC1 C706[0000]8000 mov word [execblk.cmdline], 80h 0 00001CC7 C60681000D mov byte [81h], 0Dh 0 00001CCC C606[0000]01 mov byte [fileext], EXT_OTHER ; empty file name and command line as per N 4258 %endif 4259 %endif ; _BOOTLDR 4260 4261 old_initcode: 0 00001CD1 FC cld 4263 d0bp 0 00001CD2 8CD8 mov ax, ds 4265 %if !_LOADER 0 00001CD4 A3[0200] mov word [execblk.cmdline + 2], ax 0 00001CD7 A3[0200] mov word [execblk.fcb1 + 2], ax 0 00001CDA A3[0200] mov word [execblk.fcb2 + 2], ax ; set up parameter block for exec command 4269 %endif 0 00001CDD A3[0000] mov word [pspdbg], ax 4271 4272 %if _IMMASM && !_IMMASM_AUXBUFF 4273 %ifn _LINK 4274 add ax, (immasm_buffer + DATASECTIONFIXUP) >> 4 4275 %else 0 00001CE0 05[0000] add ax, strict word immasm_buffer 4277 wlcalc word_shr_4, equ $ - 2 4278 %endif 0 00001CE3 A3[0000] mov word [immseg], ax 4280 %endif 4281 0 00001CE6 1E push ds 0 00001CE7 B84000 mov ax, 40h 0 00001CEA 8ED8 mov ds, ax 0 00001CEC A18200 mov ax, word [82h] ; end of circular keypress buffer 0 00001CEF 8B168000 mov dx, word [80h] ; start of circular buffer 0 00001CF3 85C0 test ax, ax 0 00001CF5 7431 jz .forcekeybuffer 0 00001CF7 85D2 test dx, dx 0 00001CF9 742D jz .forcekeybuffer 0 00001CFB 89C3 mov bx, ax 0 00001CFD 29D3 sub bx, dx ; cmp end, start 0 00001CFF 7627 jbe .forcekeybuffer ; below or equal is invalid --> 0 00001D01 F6C301 test bl, 1 ; even amount of bytes ? 0 00001D04 7522 jnz .forcekeybuffer ; no, invalid --> 0 00001D06 8B1E1A00 mov bx, word [1Ah] ; current head of circular buffer 0 00001D0A 39C3 cmp bx, ax 0 00001D0C 731A jae .forcekeybuffer 0 00001D0E 29D3 sub bx, dx 0 00001D10 7216 jb .forcekeybuffer 0 00001D12 F6C301 test bl, 1 0 00001D15 7511 jnz .forcekeybuffer ; invalid --> 0 00001D17 8B1E1C00 mov bx, word [1Ch] ; current tail of circular buffer 0 00001D1B 39C3 cmp bx, ax 0 00001D1D 7309 jae .forcekeybuffer 0 00001D1F 29D3 sub bx, dx 0 00001D21 7205 jb .forcekeybuffer 0 00001D23 F6C301 test bl, 1 0 00001D26 740E jz @F ; valid --> 4310 .forcekeybuffer: 0 00001D28 1F pop ds 0 00001D29 C706[0000]3E00 mov word [io_end_buffer], 3Eh 0 00001D2F C706[0000]1E00 mov word [io_start_buffer], 1Eh 0 00001D35 A8 db __TEST_IMM8 ; (skip pop) 4315 @@: 0 00001D36 1F pop ds 4317 4318 %if _BOOTLDR 4319 %if _APPLICATION || _DEVICE 0 00001D37 F606[0100]40 testopt [internalflags], nodosloaded 0 00001D3C 7403 jz .checkio 4322 %endif 4323 d4 call init_d4message 4324 d4 asciz "Common initialisation, determining processor type now",13,10 0 00001D3E E9BB00 jmp init_determineprocessor 4326 .checkio: 4327 %endif 4328 4329 %if _APPLICATION || _DEVICE 4330 ; Check for console input vs. input from a file or other device. 4331 ; This has to be done early because MS-DOS seems to switch CON 4332 ; to cooked I/O mode only then. 0 00001D41 B80044 mov ax, 4400h ; IOCTL get device information 0 00001D44 31DB xor bx, bx ; StdIn 0 00001D46 B283 mov dl, 83h ; default if 21.4400 fails 0 00001D48 CD21 int 21h 0 00001D4A F6C280 test dl, 80h 0 00001D4D 7414 jz .inputfile 0 00001D4F 8026[0000]DF clropt [internalflags], inputfile 0 00001D54 F6C203 test dl, 3 0 00001D57 740A jz .inputdevice ; if not the console input 0 00001D59 8026[0000]EF clropt [internalflags], notstdinput 0 00001D5E C606[0000]00 mov byte [notatty], 0 ; it _is_ a tty 4344 .inputdevice: 4345 .inputfile: 0 00001D63 B80044 mov ax, 4400h ; IOCTL get device information 0 00001D66 43 inc bx ; StdOut 0 00001D67 B283 mov dl, 83h ; default if 21.4400 fails 0 00001D69 CD21 int 21h 0 00001D6B F6C280 test dl, 80h 0 00001D6E 740F jz .outputfile 0 00001D70 8026[0000]7F clropt [internalflags], outputfile 0 00001D75 F6C203 test dl, 3 0 00001D78 7405 jz .outputdevice ; if not the console output 0 00001D7A 8026[0000]BF clropt [internalflags], notstdoutput 4356 .outputdevice: 4357 .outputfile: 4358 4359 ; Check DOS version 4360 %if _VDD 0 00001D7F 1E push ds 0 00001D80 0E push cs 0 00001D81 1F pop ds 0 00001D82 0E push cs 0 00001D83 07 pop es 0 00001D84 E86DFD call isnt ; NTVDM ? 0 00001D87 1F pop ds 0 00001D88 7205 jc .isnotnt ; no --> 0 00001D8A 800E[0200]02 setopt [internalflags], runningnt 4370 .isnotnt: 4371 %endif 4372 0 00001D8F B80030 mov ax, 3000h ; check DOS version 0 00001D92 CD21 int 21h 0 00001D94 86C4 xchg al, ah 0 00001D96 3D1F03 cmp ax, ver(3,31) ; MS-DOS version > 3.30 ? 0 00001D99 7205 jb .notoldpacket ; no --> 0 00001D9B 800E[0000]01 setopt [internalflags], oldpacket ; assume Int25/Int26 packet method available 4379 .notoldpacket: 0 00001DA0 50 push ax 0 00001DA1 31DB xor bx, bx ; preset to invalid value 0 00001DA3 B80633 mov ax, 3306h 0 00001DA6 CD21 int 21h 0 00001DA8 84C0 test al, al ; invalid, DOS 1.x error --> 0 00001DAA 7402 jz .213306invalid 0 00001DAC 3CFF cmp al, -1 ; invalid 4387 .213306invalid: 0 00001DAE 58 pop ax 0 00001DAF 7407 je .useoldver 0 00001DB1 85DB test bx, bx ; 0.0 ? 0 00001DB3 7403 jz .useoldver ; assume invalid --> 0 00001DB5 93 xchg ax, bx ; get version to ax 0 00001DB6 86C4 xchg al, ah ; strange Microsoft version format 4394 .useoldver: 0 00001DB8 3D0107 cmp ax, ver(7,01) ; MS-DOS version > 7.00 ? 0 00001DBB 7205 jb .notnewpacket ; no --> 0 00001DBD 800E[0000]03 setopt [internalflags], newpacket| oldpacket ; assume both packet methods available 4398 .notnewpacket: 4399 %if _VDD 0 00001DC2 F606[0200]02 testopt [internalflags], runningnt 0 00001DC7 741F jz .novdd 0 00001DC9 1E push ds 0 00001DCA 0E push cs 0 00001DCB 1F pop ds 0 00001DCC 0E push cs 0 00001DCD 07 pop es 0 00001DCE BE[9E1A] mov si, imsg.vdd ; ds:si-> ASCIZ VDD filename 0 00001DD1 BB[AB1A] mov bx, imsg.dispatch ; ds:bx-> ASCIZ dispatching entry 0 00001DD4 BF[B41A] mov di, imsg.init ; es:di-> ASCIZ init entry 0 00001DD7 F8 clc ; ! 0 00001DD8 C4C4580090 RegisterModule ; register VDD 0 00001DDD 1F pop ds 0 00001DDE 7208 jc .novdd ; error ? --> 0 00001DE0 A3[0000] mov word [hVdd], ax 0 00001DE3 800E[0000]05 setopt [internalflags], ntpacket| oldpacket ; assume old packet method also available 4416 .novdd: 4417 %endif 4418 %endif 4419 4420 4421 %if _CONFIG 4422 do_truename_config: 0 00001DE8 BA[0000] mov dx, configpath 0 00001DEB E8C118 call do_truename 0 00001DEE 893E[0000] mov word [configpath.dir_end], di 4426 do_truename_scripts: 0 00001DF2 BA[0000] mov dx, scriptspath 0 00001DF5 E8B718 call do_truename 0 00001DF8 893E[0000] mov word [scriptspath.dir_end], di 4430 %endif 4431 4432 4433 init_determineprocessor: 4434 d4 call init_d4message 4435 d4 asciz "Determining processor type",13,10 4436 0 00001DFC B92101 mov cx, 0121h 0 00001DFF D2E5 shl ch, cl 0 00001E01 7514 jnz .found_186_plus ; normal 186 masks shift count with 31 --> 4440 4441 ; To make it easier to trace past the long-form pop cx 4442 ; instruction, we now run it in a subfunction. 0 00001E03 E80500 call .detect_nec 0 00001E06 E30F jcxz .found_186_plus ; if it was a nop --> 0 00001E08 E9F700 jmp .cpudone ; is an actual 8088/8086 --> 4446 4447 4448 ; INP: - 4449 ; OUR: cx = 0 if NEC V20 or NEC V30 4450 ; cx = 1 else 4451 ; CHG: ax, cx 4452 .detect_nec: 4453 ; The NEC V20/V30 processors do support the 186 extensions 4454 ; to the instruction set but do not mask the shift count. 4455 ; Therefore, specifically detect them here. Based on the 4456 ; text in http://www.textfiles.com/hamradio/v20_bug.txt 0 00001E0B 89E0 mov ax, sp 0 00001E0D B90100 mov cx, 1 ; = 1 if on actual 8088/8086 0 00001E10 51 push cx 0 00001E11 49 dec cx ; = 0 if on NEC V20/V30 4461 4462 ; NB: Do *NOT* trace this instruction with Trace Flag = 1 and 4463 ; do *NOT* write a breakpoint at the mov sp instruction, 4464 ; that is the very next instruction after the pop cx. 4465 ; Doing either leads to locking up the HP 95LX, requiring to 4466 ; reset the system using Ctrl-Shift-On (which zeroes the 4467 ; system date and time). 0 00001E12 8FC1 db 8Fh, 0C1h ; pop r/m16 with cx as operand 4469 ; (reportedly a nop on the NECs) 0 00001E14 89C4 mov sp, ax ; reset stack to known state 0 00001E16 C3 retn 4472 4473 .found_186_plus: 4474 d4 call init_d4message 4475 d4 asciz "Found 186+ processor",13,10 0 00001E17 FE06[0000] inc byte [ machine ] ; 1 0 00001E1B 54 push sp 0 00001E1C 58 pop ax 0 00001E1D 39E0 cmp ax, sp 0 00001E1F 7403E9DE00 jne .cpudone ; 80186 pushes the adjusted value of sp --> 4481 4482 d4 call init_d4message 4483 d4 asciz "Found 286+ processor",13,10 4484 ; Determine the processor type. This is adapted from code in the 4485 ; Pentium Family User's Manual, Volume 3: Architecture and 4486 ; Programming Manual, Intel Corp., 1994, Chapter 5. That code contains 4487 ; the following comment: 4488 ; 4489 ; This program has been developed by Intel Corporation. 4490 ; Software developers have Intel's permission to incorporate 4491 ; this source code into your software royalty free. 4492 ; 4493 ; Intel 286 CPU check. 4494 ; Bits 12-15 of the flags register are always clear on the 4495 ; 286 processor in real-address mode. 4496 ; Bits 12-15 of the FLAGS register are always set on the 4497 ; 8086 and 186 processor. 0 00001E24 FE06[0000] inc byte [ machine ] ; 2 0 00001E28 9C pushf ; save IF 0 00001E29 9C pushf ; get original flags into ax 0 00001E2A 58 pop ax 0 00001E2B 0D00F0 or ax, 0F000h ; try to set bits 12-15 0 00001E2E 25FFFD and ax, ~0200h ; clear IF 0 00001E31 50 push ax ; save new flags value on stack 0 00001E32 9D popf ; replace current flags value; DI 0 00001E33 9C pushf ; get new flags 0 00001E34 58 pop ax ; store new flags in ax 0 00001E35 9D popf ; restore IF (in 86 Mode) 0 00001E36 A900F0 test ax, 0F000h ; if bits 12-15 clear, CPU = 80286 0 00001E39 7503E9C400 jz .cpudone ; if 80286 --> 4511 4512 d4 call init_d4message 4513 d4 asciz "Found 386+ processor",13,10 4514 ; Intel 386 CPU check. 4515 ; The AC bit, bit #18, is a new bit introduced in the EFLAGS 4516 ; register on the Intel486 DX cpu to generate alignment faults. 4517 ; This bit cannot be set on the Intel386 CPU. 4518 ; 4519 ; It is now safe to use 32-bit opcode/operands. 4520 subcpu 386 0 00001E3E 800E[0100]80 setopt [internalflags], has386 0 00001E43 FE06[0000] inc byte [ machine ] ; 3 4523 4524 %if _DEVICE 4525 %if _APPLICATION || _BOOTLDR 0 00001E47 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00001E4C 7440 jz @F 4528 %endif 4529 0 00001E4E 8C26[0000] mov word [reg_fs], fs 0 00001E52 8C2E[0000] mov word [reg_gs], gs 4532 %macro set_gpr_h 1 4533 push e %+ %1 4534 pop %1 4535 pop word [reg_e %+ %1 + 2] 4536 %endmacro 4537 set_gpr_h ax 0 00001E56 6650 push e %+ %1 0 00001E58 58 pop %1 0 00001E59 8F06[0200] pop word [reg_e %+ %1 + 2] 4538 set_gpr_h bx 0 00001E5D 6653 push e %+ %1 0 00001E5F 5B pop %1 0 00001E60 8F06[0200] pop word [reg_e %+ %1 + 2] 4539 set_gpr_h cx 0 00001E64 6651 push e %+ %1 0 00001E66 59 pop %1 0 00001E67 8F06[0200] pop word [reg_e %+ %1 + 2] 4540 set_gpr_h dx 0 00001E6B 6652 push e %+ %1 0 00001E6D 5A pop %1 0 00001E6E 8F06[0200] pop word [reg_e %+ %1 + 2] 4541 set_gpr_h bp 0 00001E72 6655 push e %+ %1 0 00001E74 5D pop %1 0 00001E75 8F06[0200] pop word [reg_e %+ %1 + 2] 4542 set_gpr_h si 0 00001E79 6656 push e %+ %1 0 00001E7B 5E pop %1 0 00001E7C 8F06[0200] pop word [reg_e %+ %1 + 2] 4543 set_gpr_h di 0 00001E80 6657 push e %+ %1 0 00001E82 5F pop %1 0 00001E83 8F06[0200] pop word [reg_e %+ %1 + 2] 4544 ; esph and eiph remain zero 0 00001E87 669C pushfd 0 00001E89 9D popfw 0 00001E8A 8F06[0200] pop word [reg_efl + 2] 4548 %endif 4549 @@: 4550 0 00001E8E 89E3 mov bx, sp ; save current stack pointer to align 0 00001E90 83E4FC and sp, ~3 ; align stack to avoid AC fault 0 00001E93 669C pushfd ; push original EFLAGS 0 00001E95 6658 pop eax ; get original EFLAGS 0 00001E97 6689C1 mov ecx, eax ; save original EFLAGS in ECX (including IF) 4556 0 00001E9A 663500000400 xor eax, 40000h ; flip AC bit in EFLAGS 0 00001EA0 25FFFD and ax, ~0200h ; clear IF 0 00001EA3 6650 push eax ; put new EFLAGS value on stack 0 00001EA5 669D popfd ; replace EFLAGS value; DI 0 00001EA7 669C pushfd ; get new EFLAGS 0 00001EA9 6658 pop eax ; store new EFLAGS value in EAX 0 00001EAB 89C8 mov ax, cx ; ignore low bits (including IF) 0 00001EAD 6639C8 cmp eax, ecx 0 00001EB0 741A je .cpudone_stack_eax_equals_ecx ; if 80386 --> 4566 4567 d4 call init_d4message 4568 d4 asciz "Found 486+ processor",13,10 4569 ; Intel486 DX CPU, Intel487 SX NDP, and Intel486 SX CPU check. 4570 ; Checking for ability to set/clear ID flag (bit 21) in EFLAGS 4571 ; which indicates the presence of a processor with the ability 4572 ; to use the CPUID instruction. 0 00001EB2 FE06[0000] inc byte [ machine ] ; 4 0 00001EB6 6689C8 mov eax, ecx ; get original EFLAGS 0 00001EB9 663500002000 xor eax, 200000h ; flip ID bit in EFLAGS 0 00001EBF 25FFFD and ax, ~0200h ; clear IF 0 00001EC2 6650 push eax ; save new EFLAGS value on stack 0 00001EC4 669D popfd ; replace current EFLAGS value; DI 0 00001EC6 669C pushfd ; get new EFLAGS 0 00001EC8 6658 pop eax ; store new EFLAGS in EAX 0 00001ECA 89C8 mov ax, cx ; ignore low bits (including IF) 4582 4583 .cpudone_stack_eax_equals_ecx: 0 00001ECC 6651 push ecx 0 00001ECE 669D popfd ; restore AC,ID bits and IF in EFLAGS (86 Mode) 0 00001ED0 89DC mov sp, bx ; restore sp 4587 0 00001ED2 6639C8 cmp eax, ecx ; check if it's changed 0 00001ED5 742B je .cpudone ; if it's a 486 (can't toggle ID bit) --> 4590 4591 d4 call init_d4message 4592 d4 asciz "Found processor with CPUID support",13,10 4593 ; Execute CPUID instruction. 4594 subcpu 486 ; NASM (at least 2.10rc1) handles cpuid itself as a 4595 ; 586+ instruction, but we know better. So this 4596 ; part is declared for 486 compatibility, and only 4597 ; the cpuid instructions are emitted with 586 4598 ; compatibility to appease NASM. 4599 %if 0 4600 d4 call init_d4message 4601 d4 asciz "CPUID will NOT be executed, to work around official DOSBox releases",13,10 4602 d4 jmp .cpudone 4603 %endif 0 00001ED7 6631C0 xor eax, eax ; set up input for CPUID instruction 4605 d4 call init_d4message 4606 d4 asciz "Executing CPUID 0",13,10 4607 [cpu 586] 0 00001EDA 0FA2 cpuid 4609 __CPU__ 4610 d4 call init_d4message 4611 d4 asciz "CPUID 0 executed",13,10 0 00001EDC 6683F801 cmp eax, byte 1 0 00001EE0 7220 jb .cpudone ; if 1 is not a valid input value for CPUID 0 00001EE2 6631C0 xor eax, eax ; otherwise, run CPUID with eax = 1 0 00001EE5 6640 inc eax 4616 d4 call init_d4message 4617 d4 asciz "Executing CPUID 1",13,10 4618 [cpu 586] 0 00001EE7 0FA2 cpuid 4620 __CPU__ 4621 d4 call init_d4message 4622 d4 asciz "CPUID 1 executed",13,10 4623 %if _MMXSUPP 0 00001EE9 66F7C200008000 test edx, 80_0000h 0 00001EF0 0F9506[0000] setnz byte [has_mmx] 4626 %endif 4627 0 00001EF5 88E0 mov al, ah 0 00001EF7 240F and al, 0Fh ; bits 8..11 are the model number 0 00001EF9 3C06 cmp al, 6 0 00001EFB 7202 jb .below686 ; if < 6 0 00001EFD B006 mov al, 6 ; if >= 6, set it to 6 4633 .below686: 0 00001EFF A2[0000] mov byte [ machine ], al; save machine type (486, 586, 686+) 4635 4636 .cpudone: 4637 subcpureset ; subcpu 486 4638 subcpureset ; subcpu 386 4639 d4 call init_d4message 4640 d4 asciz "Determining floating-point unit",13,10 4641 4642 ; Next determine the type of FPU in a system and set the mach_87 4643 ; variable with the appropriate value. All registers are used by 4644 ; this code; none are preserved. 4645 ; 4646 ; Coprocessor check. 4647 ; The algorithm is to determine whether the floating-point 4648 ; status and control words can be written to. If not, no 4649 ; coprocessor exists. If the status and control words can be 4650 ; written to, the correct coprocessor is then determined 4651 ; depending on the processor ID. The Intel 386 CPU can 4652 ; work with either an Intel 287 NDP or an Intel 387 NDP. 4653 ; The infinity of the coprocessor must be checked 4654 ; to determine the correct coprocessor ID. 0 00001F02 A0[0000] mov al, byte [ machine ] 0 00001F05 A2[0000] mov byte [ mach_87 ], al ; by default, set mach_87 to machine 0 00001F08 FE06[0000] inc byte [ has_87 ] 0 00001F0C C606[0000]0C mov byte [encodedmach87], 0Ch 0 00001F11 3C05 cmp al, 5 ; a Pentium or above always will have a FPU 0 00001F13 7350 jae .fpudone 0 00001F15 FE0E[0000] dec byte [ has_87 ] ; assume no FPU 0 00001F19 C606[0000]C0 mov byte [encodedmach87], 0C0h 4663 0 00001F1E DBE3 fninit ; reset FPU 0 00001F20 B0FF mov al, -1 ; initialise with a non-zero value 0 00001F22 50 push ax 0 00001F23 89E3 mov bx, sp 0 00001F25 36DD3F fnstsw word [ss:bx] ; save FP status word 0 00001F28 58 pop ax ; retrieve it 0 00001F29 84C0 test al, al 0 00001F2B 7538 jnz .fpudone ; if no FPU present 4672 4673 ; al = 0 here 0 00001F2D 50 push ax 0 00001F2E 36D93F fnstcw word [ss:bx] ; save FP control word 0 00001F31 58 pop ax ; retrieve it 0 00001F32 253F10 and ax, 103Fh ; see if selected parts look OK 0 00001F35 83F83F cmp ax, byte 3Fh 0 00001F38 752B jne .fpudone ; if no FPU present 0 00001F3A FE06[0000] inc byte [ has_87 ] ; there's an FPU 0 00001F3E C606[0000]0C mov byte [encodedmach87], 0Ch 4682 4683 ; If we're using a 386, check for 287 vs. 387 by checking whether 4684 ; +infinity = -infinity. 0 00001F43 803E[0000]03 cmp byte [ machine ], 3 0 00001F48 751B jne .fpudone ; if not a 386 4687 [cpu 386] 0 00001F4A D9E8 fld1 ; must use default control from FNINIT 0 00001F4C D9EE fldz ; form infinity 0 00001F4E DEF9 fdivp ST1 ; 1 / 0 = infinity 0 00001F50 D9C0 fld ST0 0 00001F52 D9E0 fchs ; form negative infinity 0 00001F54 DED9 fcompp ; see if they are the same and remove them 0 00001F56 9BDFE0 fstsw ax 0 00001F59 9E sahf ; look at status from FCOMPP 0 00001F5A 7509 jne .fpudone ; if they are different, then it's a 387 0 00001F5C FE0E[0000] dec byte [ mach_87 ] ; otherwise, it's a 287 0 00001F60 C606[0000]C2 mov byte [encodedmach87], 0C2h 4699 __CPU__ 4700 .fpudone: 4701 4702 apply_patches: 4703 %if _ONLY386 4704 testopt [internalflags], has386 4705 jnz @F ; okay --> 4706 4707 %if _BOOTLDR && (_APPLICATION || _DEVICE) 4708 testopt [internalflags], nodosloaded 4709 lahf ; remember status 4710 %endif 4711 mov dx, imsg.no386 4712 call init_putsz_cs ; display the error 4713 %if _BOOTLDR && (_APPLICATION || _DEVICE) 4714 sahf 4715 jnz init_booterror.soft ; abort for loader --> 4716 %elif _BOOTLDR 4717 jmp init_booterror.soft 4718 %endif 4719 %if _DEVICE && _APPLICATION 4720 testopt [internalflags6], dif6_device_mode 4721 jnz init_device_error_late 4722 %elif _DEVICE 4723 jmp init_device_error_late 4724 %endif 4725 %if _APPLICATION 4726 mov ax, 4C01h 4727 int 21h ; abort our process 4728 %endif 4729 4730 @@: 4731 %elif _ONLYNON386 4732 testopt [internalflags], has386 4733 jz @F ; okay --> 4734 mov dx, imsg.386 4735 call init_putsz_cs ; display the warning 4736 @@: 4737 %endif 4738 4739 ; Determine which patch table to use, then patch 4740 ; out either the 386+ or non-386 code as appropriate. 0 00001F65 8E06[0000] mov es, [code_seg] 0 00001F69 F606[0100]80 testopt [internalflags], has386 0 00001F6E 740B jz @F 0 00001F70 BE[0000] mov si, patch_386_table ; table of patches to set for 386+ 4745 %if __patch_386_table_method == 1 0 00001F73 B9[0000] mov cx, patch_386_table.amount 0 00001F76 E83200 call .patch1 4748 %else 4749 call .patch2 4750 %endif 0 00001F79 EB3C jmp .patch_code1_end 4752 4753 @@: 4754 %ifn _ONLYNON386 4755 4756 %if _RUN2_ENTRY_SECTION 0 00001F7B C606[0000]3E mov byte [..@patch_no386_ds_code_or_entry], 3Eh 4758 ; write a ds prefix 0 00001F80 C606[0000]CF mov byte [..@patch_no386_iret_code_or_entry], 0CFh 4760 ; write an iret instruction 4761 %else 4762 mov byte [es:..@patch_no386_ds_code_or_entry], 3Eh 4763 ; write a ds prefix 4764 mov byte [es:..@patch_no386_iret_code_or_entry], 0CFh 4765 ; write an iret instruction 4766 %endif 4767 %if _PM && _CATCHPMINT214C 0 00001F85 C606[0000]3E mov byte [..@patch_no386_ds_entry_pmint21_1], 3Eh 0 00001F8A C606[0000]3E mov byte [..@patch_no386_ds_entry_pmint21_2], 3Eh 4770 ; write ds prefixes (note the segment!) 4771 %endif 4772 %if _PM 0 00001F8F 26C606[0000]3E mov byte [es:..@patch_no386_ds_4], 3Eh 0 00001F95 26C606[0000]3E mov byte [es:..@patch_no386_ds_5], 3Eh ; write some more ds prefixes 4775 %endif 4776 %if _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 0 00001F9B C606[0000]3E mov byte [..@patch_no386_ds_6_DATA_ENTRY], 3Eh 4778 ; write a ds prefix (note the segment!) 4779 %endif 4780 %endif 0 00001FA0 BE[0000] mov si, patch_no386_table ; table of patches to set for 16-bit CPU 4782 %if __patch_no386_table_method == 1 0 00001FA3 B9[0000] mov cx, patch_no386_table.amount 0 00001FA6 E80200 call .patch1 4785 %else 4786 call .patch2 4787 %endif 0 00001FA9 EB0C jmp .patch_code1_end 4789 4790 ; Complicated table patch code. 4791 %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 4794 .patch2: 4795 mov di, code_start ; initialise offset 4796 xor ax, ax ; initialise ah 4797 .looppatch2: 4798 cs lodsb 4799 add di, ax ; skip number of bytes to skip 4800 cmp al, 255 ; really repositioning? 4801 jne .l2patch ; no --> 4802 xchg ax, di ; (to preserve ah) 4803 cs lodsw ; ax = new address 4804 xchg ax, di ; di = new address 4805 .l2patch: 4806 cs lodsb 4807 mov cx, ax ; cx = number of bytes to patch 4808 jcxz .patchesdone ; end of table --> 4809 mov al, 90h ; patch to NOP 4810 rep stosb ; patch as many bytes as specified 4811 jmp short .looppatch2 4812 %endif 4813 4814 ; Simple table patch code. 4815 %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 4818 .patch1: 0 00001FAB E309 jcxz .patchesdone 4820 .looppatch1: 0 00001FAD 2EAD cs lodsw ; load address of patch 0 00001FAF 93 xchg bx, ax ; (set bx = ax, CHG ax) 0 00001FB0 26C60790 mov byte [es:bx], 90h ; patch 0 00001FB4 E2F7 loop .looppatch1 4825 %endif 4826 .patchesdone: 0 00001FB6 C3 retn 4828 4829 .patch_code1_end: 4830 4831 %if _DUALCODE 0 00001FB7 8CC2 mov dx, es ; dx => code1 seg 4833 %endif 4834 %if _BOOTLDR_DISCARD 0 00001FB9 F606[0100]40 testopt [internalflags], nodosloaded 0 00001FBE 750F jnz @F 4837 4838 %if _AREAS && _AREAS_HOOK_CLIENT 4839 %ifn _LINK 4840 mov ax, ldebug_code_bootldr_truncated_size 4841 %else 0 00001FC0 B8[0000] mov ax, behind_code_truncated wrt lDEBUG_CODE 4843 wlcalc word_add_15, equ $ - 2 4844 wlcalc word_clr_15, equ $ - 2 4845 %endif 0 00001FC3 A3[0400] mov word [areas_sub + areastrucfunLinearEnd], ax 0 00001FC6 A3[0400] mov word [areas_fun + areastrucfunLinearEnd], ax 4848 %endif 4849 %endif 4850 %ifn _DUALCODE 4851 @@: ; if bootloaded 4852 %else 4853 %if _BOOTLDR_DISCARD 4854 %ifn _LINK 4855 add dx, ldebug_code_bootldr_truncated_size_p 4856 %else 0 00001FC9 81C2[0000] add dx, strict word relocatedzero + 0 4858 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 4859 %endif 4860 ; if not bootloaded, use truncated 0 00001FCD EB04 jmp @FF 4862 @@: ; if bootloaded 4863 %endif 4864 %ifn _LINK 4865 add dx, ldebug_code_size_p ; use untruncated 4866 %else 0 00001FCF 81C2[0000] add dx, strict word relocatedzero + 0 4868 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code, equ $ - 2 4869 %endif 4870 @@: 0 00001FD3 8916[0000] mov word [code2_seg], dx 4872 patch_relocate: 4873 4874 %if ! _PM 4875 mov si, relocate_from_code 4876 mov di, relocate_from_code.end 4877 call .patch 4878 mov si, relocate_from_code2 4879 mov di, relocate_from_code2.end 4880 %endif 0 00001FD7 06 push es 0 00001FD8 8EC2 mov es, dx 0 00001FDA 5A pop dx 4884 %if ! _PM 4885 call .patch 4886 jmp .done 4887 4888 .loop: 4889 cs lodsw 4890 xchg bx, ax 4891 mov word [es:bx], dx 4892 .patch: 4893 cmp si, di 4894 jb .loop 4895 retn 4896 4897 .done: 4898 %endif 4899 0 00001FDB F606[0100]80 testopt [internalflags], has386 0 00001FE0 740B jz @F 0 00001FE2 BE[0000] mov si, patch_386_table2 ; table of patches to set for 386+ 4903 %if __patch_386_table2_method == 1 0 00001FE5 B9[0000] mov cx, patch_386_table2.amount 0 00001FE8 E8C0FF call apply_patches.patch1 4906 %else 4907 call apply_patches.patch2 4908 %endif 0 00001FEB EB09 jmp .patch_code2_end 4910 4911 @@: 0 00001FED BE[0000] mov si, patch_no386_table2 ; table of patches to set for 16-bit CPU 4913 %if __patch_no386_table2_method == 1 0 00001FF0 B9[0000] mov cx, patch_no386_table2.amount 0 00001FF3 E8B5FF call apply_patches.patch1 4916 %else 4917 call apply_patches.patch2 4918 %endif 4919 .patch_code2_end: 4920 %endif 4921 4922 4923 patch_entry: 4924 numdef EMIT_ENTRY_PATCH, _LINK || _LINK_COMPAT 4925 %ifn _EMIT_ENTRY_PATCH 4926 %if patch_386_tableentry_size != 0 || patch_no386_tableentry_size != 0 4927 %assign _EMIT_ENTRY_PATCH 1 4928 %endif 4929 %endif 4930 %if _EMIT_ENTRY_PATCH 0 00001FF6 1E push ds 0 00001FF7 07 pop es 0 00001FF8 F606[0100]80 testopt [internalflags], has386 0 00001FFD 740B jz @F 0 00001FFF BE[0000] mov si, patch_386_tableentry ; table of patches to set for 386+ 4936 %if __patch_386_tableentry_method == 1 0 00002002 B9[0000] mov cx, patch_386_tableentry.amount 0 00002005 E8A3FF call apply_patches.patch1 4939 %else 4940 call apply_patches.patch2 4941 %endif 0 00002008 EB09 jmp .patch_entry_end 4943 4944 @@: 0 0000200A BE[0000] mov si, patch_no386_tableentry ; table of patches to set for 16-bit CPU 4946 %if __patch_no386_tableentry_method == 1 0 0000200D B9[0000] mov cx, patch_no386_tableentry.amount 0 00002010 E898FF call apply_patches.patch1 4949 %else 4950 call apply_patches.patch2 4951 %endif 4952 .patch_entry_end: 4953 %endif 4954 4955 4956 %if _DEVICE 4957 ; This must be done after CPU detection 4958 ; because we want to get the high parts 4959 ; of the registers only initialised here. 0 00002013 1E push ds 0 00002014 07 pop es 0 00002015 BE[0000] mov si, regs 0 00002018 BF[0000] mov di, device_quittable_regs 4964 %ifn _LINK 4965 mov cx, words(regs.size) 4966 %else 0 0000201B B9[0100] mov cx, regs.size + 1 4968 wlcalc word_shr_1, equ $ - 2 4969 %endif 0 0000201E F3A5 rep movsw 4971 %endif 4972 4973 4974 ; Check for dosemu. This is done for the boot loaded instance 4975 ; too, as we might be running as DOS inside dosemu. 4976 %if _DOSEMU 0 00002020 B800F0 mov ax, 0F000h 0 00002023 8EC0 mov es, ax 0 00002025 1E push ds 0 00002026 0E push cs 0 00002027 1F pop ds ; avoid "repe cs cmpsw" (8086 bug) 0 00002028 BFF5FF mov di, 0FFF5h 0 0000202B BE[961A] mov si, imsg.dosemudate 0 0000202E B90400 mov cx, 4 0 00002031 F3A7 repe cmpsw ; running in DosEmu? 0 00002033 1F pop ds 0 00002034 750A jne .dosemuchecked 0 00002036 800E[0300]01 setopt [internalflags], runningdosemu 4989 %if _DOSEMU_PRESTROKES_HELP 0 0000203B B80900 mov ax, 0009h 0 0000203E CDE6 int 0E6h ; run dosemu2 start_pre_strokes function 4992 ; dosemu2 recently gained a feature that tries to avoid 4993 ; a kernel from eating the first text byte of an -input 4994 ; string. However, this interferes with our use because 4995 ; the strokes are only enabled in dos_post_boot (int.c). 4996 ; There is a new int 0E6h helper function now to enable 4997 ; the strokes right away, which is made for lDebug to work 4998 ; when the debugger is booted and wants the input. This 4999 ; is called DOS_HELPER_PRESTROKES_START (also int.c). 5000 ; Reference: https://github.com/dosemu2/dosemu2/issues/2071 5001 %endif 5002 .dosemuchecked: 5003 %endif 5004 0 00002040 1E push ds 0 00002041 07 pop es ; => lDEBUG_DATA_ENTRY 5007 0 00002042 BF[0000] mov di, line_in 0 00002045 B0FF mov al, 255 0 00002047 AA stosb 0 00002048 B000 mov al, 0 0 0000204A AA stosb 0 0000204B B00D mov al, 13 0 0000204D AA stosb ; overwrite line_in beginning 5015 0 0000204E BC[0000] mov sp, stack_end ; stack pointer (paragraph aligned) 0 00002051 BF[0000] mov di, ..@init_first 5018 %ifn _LINK 5019 mov cx, ..@init_behind - ..@init_first 5020 %else 0 00002054 B9[0000] mov cx, ..@init_behind 5022 wlcalc word_minusext_..@init_first, equ $ - 2 5023 %endif 0 00002057 31C0 xor ax, ax 0 00002059 F3AA rep stosb ; initialise breakpoint lists, line_out 5026 %if 1 5027 %if _LINK_COMPAT 0 0000205B BF[0000] mov di, stack 5029 %else 5030 ..@init_behind_equate equ ..@init_behind 5031 stack_equate equ stack 5032 %if ..@init_behind_equate != stack_equate 5033 mov di, stack 5034 %endif 5035 %endif 5036 %ifn _LINK 5037 mov cx, stack_end - stack 5038 %else 0 0000205E B9[0000] mov cx, stack_end 5040 wlcalc word_minusext_stack, equ $ - 2 5041 %endif 0 00002061 B05E mov al, 5Eh 0 00002063 F3AA rep stosb ; initialise the stack 5044 %endif 5045 0 00002065 C606[0000]30 mov byte [ trim_overflow ], '0' ; initialise line_out so the trimputs loop doesn't overflow 0 0000206A C706[0000]4226 mov word [line_out_overflow], 2642h 5048 5049 5050 %if _AREAS_HOOK_SERVER 0 00002070 8CD8 mov ax, ds 0 00002072 A3[0200] mov word [ddebugareas.next + 2], ax 0 00002075 A3[0200] mov word [ddebugareas.prev + 2], ax 0 00002078 A3[0000] mov word [..@patch_entry_seg], ax 5055 %endif 5056 5057 %if _AREAS && _AREAS_HOOK_CLIENT 0 0000207B A1[0000] mov ax, word [code_seg] 0 0000207E E8E615 call add_to_areas_linear_code1 5060 5061 %if _DUALCODE && _EXPRDUALCODE 0 00002081 A1[0000] mov ax, word [code2_seg] 0 00002084 E80C16 call add_to_areas_linear_code2 5064 %endif 5065 %endif 5066 5067 5068 %if _DEBUG && _DEBUG_COND && _DEBUG_COND_DEFAULT_ON 0 00002087 800E[0100]01 setopt [internalflags6], dif6_debug_mode 0 0000208C 800E[0100]01 setopt [options6], opt6_debug_mode 0 00002091 800E[0100]01 setopt [startoptions6], opt6_debug_mode 5072 %endif 5073 5074 %if _CATCHINT06 && _DETECT95LX 0 00002096 B8D44D mov ax, 4DD4h 0 00002099 31DB xor bx, bx 0 0000209B CD15 int 15h ; HP 95LX/100LX/200LX detect 0 0000209D 81FB5048 cmp bx, 4850h ; "HP" reversed 0 000020A1 7516 jne @F 0 000020A3 81F90101 cmp cx, 0101h ; 95LX ? 0 000020A7 7510 jne @F ; no --> 5082 5083 %if _CATCHINT2D 0 000020A9 A1[0100] mov ax, word [inttab.i2D + 1] 0 000020AC A3[0100] mov word [inttab.i06 + 1], ax ; overwrite i06 entry with i2D 0 000020AF A0[0000] mov al, byte [inttab.i2D] 0 000020B2 A2[0000] mov byte [inttab.i06], al ; interrupt number too 5088 %endif 0 000020B5 FF0E[0000] dec word [inttab_number_variable] ; remember one less in use 5090 @@: 5091 %endif 5092 0 000020B9 B40F mov ah, 0Fh 0 000020BB CD10 int 10h 0 000020BD 883E[0000] mov byte [vpage], bh 5096 5097 5098 %if _BOOTLDR 5099 %if _APPLICATION || _DEVICE 0 000020C1 F606[0100]40 testopt [internalflags], nodosloaded 0 000020C6 7441 jz initdos 5102 %endif 5103 d4 call init_d4message 5104 d4 asciz "386-related patches applied, boot initialisation proceeding",13,10 5105 5106 5107 %if CATCHINTAMOUNT 5108 ; Set up interrupt vectors. 5109 5110 ; ds still => lDEBUG_DATA_ENTRY 5111 %if _CATCHINT06 && _DETECT95LX 0 000020C8 8B0E[0000] mov cx, word [inttab_number_variable] 5113 %else 5114 mov cx, inttab_number 5115 %endif 0 000020CC E32F jcxz .bootintend 0 000020CE BE[0000] mov si, inttab 5118 .bootintloop: 5119 5120 ; assumes ss = lDEBUG_DATA_ENTRY 0 000020D1 36AC ss lodsb 0 000020D3 31DB xor bx, bx 0 000020D5 8EDB mov ds, bx 0 000020D7 88C3 mov bl, al 0 000020D9 01DB add bx, bx 0 000020DB 01DB add bx, bx 0 000020DD 97 xchg ax, di 0 000020DE 36AD ss lodsw ; get address of IISP header 0 000020E0 97 xchg ax, di 5130 %if _DEBUG && !_DEBUG_COND 5131 ; vectors are set only when debuggee runs 5132 %else 5133 %if _DEBUG 0 000020E1 36F606[0100]01 testopt [ss:internalflags6], dif6_debug_mode 0 000020E7 7512 jnz @F 5136 %endif 0 000020E9 FF7702 push word [ bx+2 ] 0 000020EC FF37 push word [ bx ] ; get vector 0 000020EE 368F4502 pop word [ ss:di + ieNext ] 0 000020F2 368F4504 pop word [ ss:di + ieNext + 2 ] 5141 ; store it 0 000020F6 8C5702 mov word [ bx+2 ], ss 0 000020F9 893F mov word [ bx ], di ; set interrupt vector 5144 @@: 5145 %endif 0 000020FB E2D4 loop .bootintloop 5147 5148 .bootintend: 5149 %endif 5150 5151 %if _EXTENSIONS 5152 init_eld_boot: 0 000020FD E8E315 call init_eld 5154 %else 5155 push ss 5156 pop ds 5157 push ss 5158 pop es 5159 %endif 5160 5161 d4 call init_d4message 5162 d4 asciz "Jumping to final boot initialisation code",13,10 0 00002100 BE[0000] mov si, initcont.boot_entry 0 00002103 FF36[0000] push word [code_seg] 0 00002107 56 push si 0 00002108 CB retf 5167 %endif 5168 5169 %if _APPLICATION || _DEVICE 5170 initdos: 5171 %if _MCB || _INT || _EXTENSIONS 0 00002109 B80258 mov ax, 5802h 0 0000210C CD21 int 21h 0 0000210E 30E4 xor ah, ah ; some "DOS" only return al 0 00002110 50 push ax ; save UMB link 5176 5177 getfirstmcb: 0 00002111 B452 mov ah, 52h ; get list of lists 0 00002113 BBFFFF mov bx, -1 0 00002116 CD21 int 21h 0 00002118 83FBFF cmp bx, -1 0 0000211B 7503E98800 je mcb_not_found 0 00002120 83FB01 cmp bx, 1 0 00002123 7503E98000 je mcb_not_found 0 00002128 268B47FE mov ax, word [ es:bx-2 ]; start of MCBs 0 0000212C A3[0000] mov word [firstmcb], ax 5187 5188 getfirstumcb: 0 0000212F 1E push ds 5190 ; We try to get the first UMCB for gateout 5191 ; for now. To harden our code it should 5192 ; not be assumed that the address is of 5193 ; a valid MCB. However, it is fine to 5194 ; compare an actual MCB address with it. 5195 %if _GUARD_86M_INT2F 0 00002130 06 push es 0 00002131 31C0 xor ax, ax 0 00002133 8EC0 mov es, ax ; (only used in 86 Mode) 0 00002135 26A1BC00 mov ax, [es:2Fh * 4] 0 00002139 83F8FF cmp ax, -1 0 0000213C 7405 je @F ; --> (ZR) 0 0000213E 260B06BE00 or ax, [es:2Fh * 4 + 2] 5203 @@: 0 00002143 07 pop es 0 00002144 7414 jz .determine 5206 %endif 0 00002146 B86112 mov ax, 1261h ; PTS-DOS: Get first UMCB 0 00002149 F9 stc 0 0000214A CD2F int 2Fh 0 0000214C 720C jc .determine ; not supported --> 0 0000214E 40 inc ax 0 0000214F 83F802 cmp ax, byte 2 ; -1, 0, 1 ? 0 00002152 7606 jbe .determine ; not supported (or none) --> 0 00002154 48 dec ax 0 00002155 A3[0000] mov word [ firstumcb ], ax ; set UMB 0 00002158 EB4D jmp short .got ; got it --> 5217 5218 .determine: 0 0000215A B80358 mov ax, 5803h 0 0000215D 31DB xor bx, bx 0 0000215F CD21 int 21h ; disable UMB link, leave only LMA chain 0 00002161 7244 jc .none ; that isn't supported either --> 5223 0 00002163 A1[0000] mov ax, word [firstmcb] 0 00002166 89C2 mov dx, ax ; first MCB 0 00002168 31DB xor bx, bx ; use offsets from bx, not addresses 5227 .looplmb: 0 0000216A 8ED8 mov ds, ax 0 0000216C 40 inc ax 0 0000216D 034703 add ax, word [ bx + 3 ] ; next MCB's address 0 00002170 803F4D cmp byte [ bx ], 'M' 0 00002173 74F5 je .looplmb ; not last --> 0 00002175 803F5A cmp byte [ bx ], 'Z' 0 00002178 752D jne .none ; corrupted --> 0 0000217A 92 xchg ax, dx ; dx = what we assume to be the first UMA chain MCB 5236 ; ax = first MCB 5237 0 0000217B 50 push ax 0 0000217C 43 inc bx ; = 1 0 0000217D B80358 mov ax, 5803h 0 00002180 CD21 int 21h ; enable UMB link, include UMA chain 0 00002182 58 pop ax 0 00002183 7222 jc .none ; so we can disable it but not enable? --> 5244 0 00002185 4B dec bx ; = 0 0 00002186 31C9 xor cx, cx ; flag if assumed first UMCB found 5247 .loopumb: 0 00002188 39D0 cmp ax, dx 0 0000218A 7501 jne .notlastlmb 0 0000218C 41 inc cx ; there it is 5251 .notlastlmb: 0 0000218D 8ED8 mov ds, ax 0 0000218F 803F4D cmp byte [ bx ], 'M' 0 00002192 7506 jne .islastumb? ; last or corrupted --> 0 00002194 40 inc ax 0 00002195 034703 add ax, word [ bx + 3 ] 0 00002198 EBEE jmp short .loopumb ; process next --> 5258 .islastumb?: 0 0000219A 803F5A cmp byte [ bx ], 'Z' 0 0000219D 7508 jne .none ; corrupted --> 0 0000219F E306 jcxz .none ; didn't find that UMCB --> 5262 ; The MCB at dx which was behind the one that contained the 'Z' 5263 ; signature when we disabled the UMB link is now a valid MCB in 5264 ; the MCB chain after we enabled the UMB link. All previous MCBs 5265 ; are now 'M'. 0 000021A1 1F pop ds 0 000021A2 8916[0000] mov word [ firstumcb ], dx 0 000021A6 A8 db __TEST_IMM8 ; (skip pop) 5269 .none: 5270 .got: 0 000021A7 1F pop ds 5272 mcb_not_found: 0 000021A8 5B pop bx 0 000021A9 B80358 mov ax, 5803h 0 000021AC CD21 int 21h ; restore UMB link 5276 %endif 5277 5278 getindosflag: 0 000021AE B434 mov ah, 34h 0 000021B0 CD21 int 21h 0 000021B2 891E[0000] mov word [pInDOS + so16aOffset], bx 0 000021B6 8C06[0200] mov word [pInDOS + so16aSegSel], es 5283 %if _PM 0 000021BA 8C06[0400] mov word [pInDOS + so16aSegment], es 5285 %endif 5286 5287 ; get address of DOS swappable DATA area 5288 ; to be used to get/set PSP and thus avoid DOS calls 5289 ; will not work for DOS < 3 5290 %if _USESDA 5291 getsda: 0 000021BE 1E push ds 0 000021BF B8065D mov ax, 5D06h 0 000021C2 F9 stc ; initialise to CY 0 000021C3 CD21 int 21h 0 000021C5 8CD8 mov ax, ds 0 000021C7 1F pop ds 0 000021C8 7218 jc .noSDA ; if CY returned, not supported --> 0 000021CA 8EC0 mov es, ax ; es:si -> SDA 5300 %if _DEVICE 0 000021CC 50 push ax 0 000021CD B451 mov ah, 51h 0 000021CF CD21 int 21h ; bx = current PSP 0 000021D1 58 pop ax 5305 %else 5306 mov bx, ds ; bx = our PSP (= current PSP in app mode) 5307 %endif 0 000021D2 26395C10 cmp word [es:si + 10h], bx ; does this seem like the current PSP field ? 0 000021D6 750A jne .noSDA ; no --> 0 000021D8 8936[0000] mov word [pSDA + so16aOffset], si 0 000021DC A3[0200] mov word [pSDA + so16aSegSel], ax 5312 %if _PM 0 000021DF A3[0400] mov word [pSDA + so16aSegment], ax 5314 %endif 5315 .noSDA: 5316 %endif 5317 0 000021E2 B83135 mov ax, 3531h 0 000021E5 CD21 int 21h 0 000021E7 8CC3 mov bx, es 5321 %if _USESDA 0 000021E9 3B1E[0200] cmp bx, word [pSDA + so16aSegSel] 0 000021ED 750B jne @F 5324 %endif 0 000021EF 3B1E[0200] cmp bx, word [pInDOS + so16aSegSel] 0 000021F3 7505 jne @F 5327 0 000021F5 800E[0300]20 setopt [internalflags2], dif2_int31_segment 5329 @@: 5330 5331 5332 commandline: 0 000021FA 16 push ss 0 000021FB 07 pop es 5335 5336 %if _CONFIG 5337 %if _APPLICATION 0 000021FC BE[B817] mov si, imsg.default_cmdline.app 0 000021FF B93400 mov cx, words(imsg.default_cmdline.app.length) 5340 %endif 5341 %if _DEVICE 5342 %if _APPLICATION 0 00002202 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002207 7406 jz @F 5345 %endif 0 00002209 BE[2218] mov si, imsg.default_cmdline.dev 0 0000220C B92F00 mov cx, words(imsg.default_cmdline.dev.length) 5348 %endif 5349 @@: 5350 0 0000220F 0E push cs 0 00002210 1F pop ds 0 00002211 BF[0000] mov di, cmdline_buffer 0 00002214 F3A5 rep movsw 0 00002216 26807DFF00 cmp byte [es:di - 1], 0 0 0000221B 7501 jne @F 0 0000221D 4F dec di 5358 @@: 0 0000221E 893E[3A0E] mov [cmdline_buffer_start], di 0 00002222 B000 mov al, 0 0 00002224 AA stosb 0 00002225 16 push ss 0 00002226 1F pop ds 0 00002227 800E[0100]01 setopt [internalflags3], dif3_input_cmdline 5365 %endif 5366 5367 ; Interpret switches and erase them from the command line. 0 0000222C B80037 mov ax, 3700h ; get switch character 0 0000222F B22F mov dl, '/' ; preset with default value 0 00002231 CD21 int 21h 0 00002233 8816[0000] mov byte [ switchar ], dl 0 00002237 80FA2F cmp dl, '/' 0 0000223A 7504 jne .notslash 0 0000223C 8816[0000] mov byte [ swch1 ], dl 5375 .notslash: 0 00002240 BE8100 mov si, DTA+1 5377 %if _MS_N_COMPAT 0 00002243 C644FF30 mov byte [si - 1], '0' ; avoid kk underflow before start of tail 5379 %endif 5380 .blankloop: 0 00002247 AC lodsb 0 00002248 3C20 cmp al, 32 0 0000224A 74FB je .blankloop 0 0000224C 3C09 cmp al, 9 0 0000224E 74F7 je .blankloop 5386 5387 ; Process the /? switch (or the [switchar]? switch). 5388 ; If switchar != / and /? occurs, make sure nothing follows. 0 00002250 3A06[0000] cmp al, byte [switchar] 0 00002254 7503E9DB00 je .switch ; if switch character --> 0 00002259 3C2F cmp al, '/' 0 0000225B 7403E9DA08 jne .noswitches ; if not the help switch --> 0 00002260 8A04 mov al, byte [ si ] 0 00002262 3C3F cmp al, '?' 0 00002264 7403E9D108 jne .noswitches ; if not /? 0 00002269 8A4401 mov al, byte [ si+1 ] 0 0000226C 3C20 cmp al, 32 0 0000226E 740B je .help ; if nothing after /? 0 00002270 3C09 cmp al, 9 0 00002272 7407 je .help ; ditto 0 00002274 3C0D cmp al, 13 0 00002276 7403E9BF08 jne .noswitches ; if something after /? --> 5403 5404 ; Print a help message 5405 .help: 0 0000227B 1E push ds 5407 %if _DEVICE 5408 %if _APPLICATION 0 0000227C F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002281 742A jz .help_not_device 5411 %endif 5412 5413 ; We modify the device command line here. 5414 ; Is that wise? Seems to work though. 0 00002283 8B36[0000] mov si, word [reg_ebx] 0 00002287 8E1E[0000] mov ds, word [reg_es] 0 0000228B C57412 lds si, [si + 12h] 0 0000228E 56 push si 5419 @@: 0 0000228F AC lodsb 0 00002290 3C20 cmp al, 32 0 00002292 7412 je @F 0 00002294 3C09 cmp al, 9 0 00002296 740E je @F 0 00002298 3C00 cmp al, 0 0 0000229A 740A je @F 0 0000229C 3C0D cmp al, 13 0 0000229E 7406 je @F 0 000022A0 3C0A cmp al, 10 0 000022A2 7402 je @F 0 000022A4 EBE9 jmp @B 5432 5433 @@: 0 000022A6 C644FF00 mov byte [si - 1], 0 0 000022AA 5E pop si 0 000022AB EB1B jmp .help_common 5437 5438 .help_not_device: 5439 %endif 5440 %if _APPLICATION 0 000022AD A12C00 mov ax, word [2Ch] ; => environment 0 000022B0 85C0 test ax, ax 0 000022B2 7476 jz .help.no_name 0 000022B4 8ED8 mov ds, ax 0 000022B6 31F6 xor si, si 5446 @@: 0 000022B8 AC lodsb 0 000022B9 84C0 test al, al 0 000022BB 75FB jnz @B 0 000022BD AC lodsb 0 000022BE 84C0 test al, al 0 000022C0 75F6 jnz @B 0 000022C2 AD lodsw 0 000022C3 83F801 cmp ax, 1 0 000022C6 7562 jne .help.no_name 5456 %endif 5457 .help_common: 5458 @@: 0 000022C8 89F3 mov bx, si 5460 @@: 0 000022CA AC lodsb 0 000022CB 3C61 cmp al, 'a' 0 000022CD 7208 jb @F 0 000022CF 3C7A cmp al, 'z' 0 000022D1 7704 ja @F 0 000022D3 806CFF20 sub byte [si - 1], 'a' - 'A' 5467 @@: 0 000022D7 3C5C cmp al, '\' 0 000022D9 74ED je @BBB 0 000022DB 3C2F cmp al, '/' 0 000022DD 74E9 je @BBB 0 000022DF 84C0 test al, al 0 000022E1 75E7 jnz @BB 5474 0 000022E3 89F1 mov cx, si 0 000022E5 49 dec cx 0 000022E6 29D9 sub cx, bx 5478 5479 @@: 0 000022E8 4E dec si 0 000022E9 39DE cmp si, bx 0 000022EB 7209 jb @F 0 000022ED 803C2E cmp byte [si], '.' 0 000022F0 75F6 jne @B 5485 0 000022F2 89F1 mov cx, si 0 000022F4 29D9 sub cx, bx 5488 @@: 0 000022F6 E332 jcxz .help.no_name 5490 @@: 0 000022F8 BA[E011] mov dx, imsg.help.1 ; command-line help message 0 000022FB E859F9 call init_putsz_cs 0 000022FE BA[3012] mov dx, imsg.help.1a 0 00002301 E853F9 call init_putsz_cs 0 00002304 53 push bx 0 00002305 89DA mov dx, bx 0 00002307 E891F9 call init_puts_ds 0 0000230A BA[3A12] mov dx, imsg.help.2 0 0000230D E847F9 call init_putsz_cs 0 00002310 5A pop dx 0 00002311 E887F9 call init_puts_ds 0 00002314 BA[ED16] mov dx, imsg.help.3 0 00002317 E83DF9 call init_putsz_cs 0 0000231A 1F pop ds 5505 .helpterminate: 5506 %if _DEVICE && _APPLICATION 0 0000231B F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002320 7403E9E6E9 jnz init_device_error_late 5509 %elif _DEVICE 5510 jmp init_device_error_late 5511 %endif 5512 %if _APPLICATION 0 00002325 B8004C mov ax, 4C00h 0 00002328 CD21 int 21h ; done 5515 %endif 5516 5517 .help.no_name: 0 0000232A 0E push cs 0 0000232B 1F pop ds 0 0000232C BB[D811] mov bx, imsg.help.defaultfilename 0 0000232F B90700 mov cx, imsg.help.defaultfilename.length 0 00002332 EBC4 jmp @B 5523 5524 5525 ; Do the (proper) switches. 0 00002334 AC .switch:lodsb 0 00002335 3C3F cmp al,'?' 0 00002337 7503E93FFF je .help ; if -? 0 0000233C E82912 call init_capitalise 5530 %if _EXTHELP 0 0000233F 3C55 cmp al, 'U' 0 00002341 7503E94D11 je switch_u 5533 %endif 5534 %if _CONFIG 0 00002346 3C49 cmp al, 'I' 0 00002348 7503E98B00 je .switch_i 5537 %endif 0 0000234D 3C43 cmp al, 'C' 0 0000234F 7503E9A500 je .switch_c 0 00002354 3C50 cmp al, 'P' 0 00002356 7503E91001 je .switch_p 0 0000235B 3C46 cmp al, 'F' 0 0000235D 7503E9A401 je .switch_f 0 00002362 3C45 cmp al, 'E' 0 00002364 7503E9CD01 je .switch_e 0 00002369 3C42 cmp al, 'B' 0 0000236B 7503E9F200 je .switch_b 0 00002370 3C41 cmp al, 'A' 0 00002372 7503E9A706 je .switch_a 0 00002377 3C54 cmp al, 'T' 0 00002379 7503E95303 je .switch_t 0 0000237E 3C52 cmp al, 'R' 0 00002380 7503E95707 je .switch_r 5554 %if _VXCHG 0 00002385 3C56 cmp al, 'V' 0 00002387 7503E9D701 je .switch_v 5557 %endif 5558 %if _ALTVID 0 0000238C 3C32 cmp al, '2' 0 0000238E 7503E93302 je .switch_2 5561 %endif 5562 %if _MCLOPT 5563 cmp al, 'M' 5564 je .switch_m 5565 %endif 5566 5567 %if _SYMBOLIC 0 00002393 3C53 cmp al, 'S' 0 00002395 7503E9B602 je .switch_s 5570 %endif 5571 5572 %if 1 || (_DEBUG && _DEBUG_COND) 0 0000239A 3C44 cmp al, 'D' 0 0000239C 7503E9EF01 je .switch_d 5575 %endif 5576 5577 %if _EXTENSIONS 0 000023A1 3C58 cmp al, 'X' 0 000023A3 7503E94704 je .switch_x 0 000023A8 3C59 cmp al, 'Y' 0 000023AA 7503E9F704 je .switch_y 5582 %endif 5583 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 000023AF 3C48 cmp al, 'H' 0 000023B1 7503E9A805 je .switch_h 5586 %endif 5587 5588 ; Other switches may go here. 0 000023B6 2EA2[9717] mov [ cs:imsg.invalidswitch_a ], al 0 000023BA BA[8617] mov dx, imsg.invalidswitch ; Invalid switch 5591 ..@init_cmdline_error: 0 000023BD E897F8 call init_putsz_cs ; print string 5593 %if _DEVICE && _APPLICATION 0 000023C0 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 000023C5 7403E941E9 jnz init_device_error_late 5596 %elif _DEVICE 5597 jmp init_device_error_late 5598 %endif 5599 %if _APPLICATION 0 000023CA B8014C mov ax, 4C01h ; Quit and return error status 0 000023CD CD21 int 21h 5602 %endif 5603 5604 ..@init_cmdline_switch_error: 0 000023CF 2EA2[A317] mov byte [cs:imsg.switch_x_error_a], al 0 000023D3 BA[9B17] mov dx, imsg.switch_x_error 0 000023D6 EBE5 jmp ..@init_cmdline_error 5608 5609 5610 %if _CONFIG 5611 .switch_i: 0 000023D8 AC lodsb 0 000023D9 3C4E cmp al, 'N' 0 000023DB 7408 je @F 0 000023DD 3C6E cmp al, 'n' 0 000023DF 7404 je @F 0 000023E1 B049 mov al, 'I' 0 000023E3 EBEA jmp ..@init_cmdline_switch_error 5619 5620 @@: 0 000023E5 8026[0100]FE clropt [internalflags3], dif3_input_cmdline 0 000023EA C606[0000]00 mov byte [cmdline_buffer], 0 0 000023EF 2EC706[3A0E][0000] mov word [cs:cmdline_buffer_start], cmdline_buffer 0 000023F6 E94EFE jmp .blankloop 5625 %endif 5626 5627 .switch_c: 5628 @@: 0 000023F9 AC lodsb 0 000023FA 3C3D cmp al, '=' 0 000023FC 74FB je @B 0 000023FE 3C3A cmp al, ':' 0 00002400 74F7 je @B 5634 0 00002402 2E8B3E[3A0E] mov di, [cs:cmdline_buffer_start] 0 00002407 B400 mov ah, 0 ; initialise to 0 = unquoted 0 00002409 A9 db __TEST_IMM16 5638 .switch_c_loop: 0 0000240A AA stosb 5640 .switch_c_quoted: 0 0000240B AC lodsb 5642 .switch_c_loop_after_semicolon: 5643 0 0000240C 3C0D cmp al, 13 0 0000240E 7442 je .switch_c_eol 0 00002410 38E0 cmp al, ah ; close quote mark ? 0 00002412 7508 jne @F ; no --> 0 00002414 3C00 cmp al, 0 0 00002416 743A je .switch_c_eol 0 00002418 B400 mov ah, 0 ; continue unquoted 0 0000241A EBEF jmp .switch_c_quoted ; and load next character --> 5652 5653 @@: 0 0000241C 84E4 test ah, ah ; currently quoted ? 0 0000241E 7514 jnz .switch_c_not_blank ; yes --> 5656 0 00002420 3C22 cmp al, '"' ; open quote mark ? 0 00002422 7404 je @F 0 00002424 3C27 cmp al, "'" 0 00002426 7504 jne @FF ; no --> 5661 @@: 0 00002428 88C4 mov ah, al ; remember quoted state 0 0000242A EBDF jmp .switch_c_quoted ; and load next character --> 5664 5665 @@: 0 0000242C 3C20 cmp al, 32 ; blank while unquoted ? 0 0000242E 7426 je .unquoted_blank 0 00002430 3C09 cmp al, 9 0 00002432 7422 je .unquoted_blank ; yes --> 5670 .switch_c_not_blank: 0 00002434 3C3B cmp al, ';' ; unescaped semicolon ? 0 00002436 750C jne .switch_c_not_semicolon 0 00002438 B00D mov al, 13 ; yes, replace by CR 0 0000243A AA stosb 0 0000243B 84E4 test ah, ah 0 0000243D 74CC jz .switch_c_quoted 0 0000243F E86B11 call init_skipwhite 0 00002442 EBC8 jmp .switch_c_loop_after_semicolon 5679 5680 .switch_c_not_semicolon: 0 00002444 3C5C cmp al, '\' ; escape ? 0 00002446 75C2 jne .switch_c_loop ; no, store literal --> 0 00002448 AC lodsb ; load escaped character 5684 ; (may be backslash, semicolon, quote) 0 00002449 3C0D cmp al, 13 ; guard against EOL 0 0000244B 75BD jne .switch_c_loop 5687 .switch_c_error: 0 0000244D B043 mov al, 'C' 0 0000244F E97DFF jmp ..@init_cmdline_switch_error 5690 5691 .switch_c_eol: 0 00002452 84E4 test ah, ah ; in quoted state ? 0 00002454 75F7 jnz .switch_c_error ; yes, error --> 5694 .unquoted_blank: 0 00002456 B000 mov al, 0 0 00002458 AA stosb ; terminate command line buffer 0 00002459 800E[0100]01 setopt [internalflags3], dif3_input_cmdline 0 0000245E 4E dec si 0 0000245F E9E5FD jmp .blankloop 5700 5701 5702 .switch_b: 0 00002462 2EC606[3A2B]CC mov byte [cs:.breakpoint], 0CCh ; SMC in section init, set point 0 00002468 E9DCFD jmp .blankloop 5705 5706 5707 .switch_p: 0 0000246B AC lodsb 0 0000246C E8F910 call init_capitalise 0 0000246F BBFFFF mov bx, 0FFFFh ; or 0FFFFh 0 00002472 89DA mov dx, bx ; and 0FFFFh 0 00002474 4E dec si 0 00002475 3C20 cmp al, 32 0 00002477 7478 je @F 0 00002479 3C09 cmp al, 9 0 0000247B 7474 je @F 0 0000247D 3C0D cmp al, 13 0 0000247F 7470 je @F 0 00002481 46 inc si 0 00002482 3C2B cmp al, '+' 0 00002484 746B je @F 0 00002486 42 inc dx ; and 0000h 0 00002487 3C2D cmp al, '-' 0 00002489 7466 je @F 5725 5726 .switch_p_not_plusminus: 0 0000248B 3C53 cmp al, 'S' 0 0000248D 751E jne .switch_p_not_s 0 0000248F B700 mov bh, 00h ; or 0FFh 0 00002491 4A dec dx ; and 0FFFFh 0 00002492 AC lodsb 0 00002493 4E dec si 0 00002494 3C20 cmp al, 32 0 00002496 7459 je @F 0 00002498 3C09 cmp al, 9 0 0000249A 7455 je @F 0 0000249C 3C0D cmp al, 13 0 0000249E 7451 je @F 0 000024A0 46 inc si 0 000024A1 3C2B cmp al, '+' 0 000024A3 744C je @F 0 000024A5 B200 mov dl, 00h ; and 0FF00h 0 000024A7 3C2D cmp al, '-' 0 000024A9 7446 je @F 0 000024AB EB3F jmp .switch_p_error 5746 5747 .switch_p_not_s: 0 000024AD 3C45 cmp al, 'E' 0 000024AF 751E jne .switch_p_not_e 0 000024B1 B300 mov bl, 00h ; or 0FF00h 0 000024B3 4A dec dx ; and 0FFFFh 0 000024B4 AC lodsb 0 000024B5 4E dec si 0 000024B6 3C20 cmp al, 32 0 000024B8 7437 je @F 0 000024BA 3C09 cmp al, 9 0 000024BC 7433 je @F 0 000024BE 3C0D cmp al, 13 0 000024C0 742F je @F 0 000024C2 46 inc si 0 000024C3 3C2B cmp al, '+' 0 000024C5 742A je @F 0 000024C7 B600 mov dh, 00h ; and 00FFh 0 000024C9 3C2D cmp al, '-' 0 000024CB 7424 je @F 0 000024CD EB1D jmp .switch_p_error 5767 5768 .switch_p_not_e: 0 000024CF 3C57 cmp al, 'W' 0 000024D1 7519 jne .switch_p_not_w 5771 ; bl = 0FFh 0 000024D3 AC lodsb 0 000024D4 4E dec si 0 000024D5 3C20 cmp al, 32 0 000024D7 7425 je @FF 0 000024D9 3C09 cmp al, 9 0 000024DB 7421 je @FF 0 000024DD 3C0D cmp al, 13 0 000024DF 741D je @FF 0 000024E1 46 inc si 0 000024E2 3C2B cmp al, '+' 0 000024E4 7418 je @FF 0 000024E6 B300 mov bl, 00h 0 000024E8 3C2D cmp al, '-' 0 000024EA 7412 je @FF 5786 ; jmp .switch_p_error 5787 5788 .switch_p_not_w: 5789 .switch_p_error: 0 000024EC B050 mov al, 'P' 0 000024EE E9DEFE jmp ..@init_cmdline_switch_error 5792 @@: 0 000024F1 2E091E[480E] or [cs:init_switch_p_low_pathsearch_high_guessextension], bx 0 000024F6 2E2116[480E] and [cs:init_switch_p_low_pathsearch_high_guessextension], dx 0 000024FB E949FD jmp .blankloop 5796 5797 @@: 0 000024FE 2E881E[6C0E] mov [cs:init_switch_pw], bl 0 00002503 E941FD jmp .blankloop 5800 5801 5802 .switch_f: 0 00002506 AC lodsb 0 00002507 BB000C mov bx, opt6_flat_binary + opt6_big_stack 0 0000250A 4E dec si 0 0000250B 3C20 cmp al, 32 0 0000250D 741B je @F 0 0000250F 3C09 cmp al, 9 0 00002511 7417 je @F 0 00002513 3C0D cmp al, 13 0 00002515 7413 je @F 0 00002517 BB0004 mov bx, opt6_flat_binary 0 0000251A 46 inc si 0 0000251B 3C2B cmp al, '+' 0 0000251D 740B je @F 0 0000251F 31DB xor bx, bx 0 00002521 3C2D cmp al, '-' 0 00002523 7405 je @F 5819 .switch_f_error: 0 00002525 B046 mov al, 'F' 0 00002527 E9A5FE jmp ..@init_cmdline_switch_error 5822 @@: 0 0000252A 8026[0100]FB clropt [options6], opt6_flat_binary 0 0000252F 091E[0000] or word [options6], bx 0 00002533 E911FD jmp .blankloop 5826 5827 .switch_e: 0 00002536 AC lodsb 0 00002537 BB0008 mov bx, opt6_big_stack 0 0000253A 4E dec si 0 0000253B 3C20 cmp al, 32 0 0000253D 7418 je @F 0 0000253F 3C09 cmp al, 9 0 00002541 7414 je @F 0 00002543 3C0D cmp al, 13 0 00002545 7410 je @F 0 00002547 46 inc si 0 00002548 3C2B cmp al, '+' 0 0000254A 740B je @F 0 0000254C 31DB xor bx, bx 0 0000254E 3C2D cmp al, '-' 0 00002550 7405 je @F 5843 .switch_e_error: 0 00002552 B045 mov al, 'E' 0 00002554 E978FE jmp ..@init_cmdline_switch_error 5846 @@: 0 00002557 8026[0100]F7 clropt [options6], opt6_big_stack 0 0000255C 091E[0000] or word [options6], bx 0 00002560 E9E4FC jmp .blankloop 5850 5851 %if _MCLOPT 5852 .switch_m: 5853 lodsb 5854 mov bl, 20h 5855 dec si 5856 cmp al, 32 5857 je @F 5858 cmp al, 9 5859 je @F 5860 cmp al, 13 5861 je @F 5862 inc si 5863 cmp al, '+' 5864 je @F 5865 mov bl, 8 5866 cmp al, '-' 5867 je @F 5868 .switch_m_error: 5869 mov al, 'M' 5870 jmp ..@init_cmdline_switch_error 5871 @@: 5872 mov byte [master_pic_base], bl 5873 jmp .blankloop 5874 %endif 5875 5876 %if _VXCHG 5877 .switch_v: 0 00002563 AC lodsb 0 00002564 BB0100 mov bx, opt6_vv_mode 0 00002567 4E dec si 0 00002568 3C20 cmp al, 32 0 0000256A 7418 je @F 0 0000256C 3C09 cmp al, 9 0 0000256E 7414 je @F 0 00002570 3C0D cmp al, 13 0 00002572 7410 je @F 0 00002574 46 inc si 0 00002575 3C2B cmp al, '+' 0 00002577 740B je @F 0 00002579 31DB xor bx, bx 0 0000257B 3C2D cmp al, '-' 0 0000257D 7405 je @F 5893 .switch_v_error: 0 0000257F B056 mov al, 'V' 0 00002581 E94BFE jmp ..@init_cmdline_switch_error 5896 @@: 0 00002584 8026[0000]FE clropt [options6], opt6_vv_mode 0 00002589 091E[0000] or word [options6], bx 0 0000258D E9B7FC jmp .blankloop 5900 %endif 5901 5902 %if _DEBUG && _DEBUG_COND 5903 .switch_d: 0 00002590 AC lodsb 0 00002591 BB0001 mov bx, dif6_debug_mode 0 00002594 4E dec si 0 00002595 3C20 cmp al, 32 0 00002597 7418 je @F 0 00002599 3C09 cmp al, 9 0 0000259B 7414 je @F 0 0000259D 3C0D cmp al, 13 0 0000259F 7410 je @F 0 000025A1 46 inc si 0 000025A2 3C2B cmp al, '+' 0 000025A4 740B je @F 0 000025A6 31DB xor bx, bx 0 000025A8 3C2D cmp al, '-' 0 000025AA 7405 je @F 5919 .switch_d_error: 0 000025AC B044 mov al, 'D' 0 000025AE E91EFE jmp ..@init_cmdline_switch_error 5922 @@: 0 000025B1 8026[0100]FE clropt [internalflags6], dif6_debug_mode 0 000025B6 8026[0100]FE clropt [options6], opt6_debug_mode 0 000025BB 091E[0000] or word [internalflags6], bx 0 000025BF 091E[0000] or word [options6], bx 5927 %if dif6_debug_mode != opt6_debug_mode 5928 %error Mismatch of flag and option 5929 %endif 0 000025C3 E981FC jmp .blankloop 5931 %else 5932 .switch_d: 5933 lodsb 5934 %if _DEBUG 5935 dec si 5936 cmp al, 32 5937 je @F 5938 cmp al, 9 5939 je @F 5940 cmp al, 13 5941 je @F 5942 inc si 5943 cmp al, '+' 5944 @@: 5945 %else 5946 cmp al, '-' 5947 %endif 5948 je .blankloop 5949 mov al, 'D' 5950 jmp ..@init_cmdline_switch_error 5951 %endif 5952 5953 5954 %if _ALTVID 5955 .switch_2: 0 000025C6 AC lodsb 0 000025C7 B31E mov bl, 1Eh ; "push ds" 0 000025C9 4E dec si 0 000025CA 3C20 cmp al, 32 0 000025CC 7418 je @F 0 000025CE 3C09 cmp al, 9 0 000025D0 7414 je @F 0 000025D2 3C0D cmp al, 13 0 000025D4 7410 je @F 0 000025D6 46 inc si 0 000025D7 3C2B cmp al, '+' 0 000025D9 740B je @F 0 000025DB B3C3 mov bl, 0C3h ; "retn" 0 000025DD 3C2D cmp al, '-' 0 000025DF 7405 je @F 5971 .switch_2_error: 0 000025E1 B032 mov al, '2' 0 000025E3 E9E9FD jmp ..@init_cmdline_switch_error 5974 @@: 0 000025E6 8E06[0000] mov es, [code_seg] 0 000025EA 26881E[0000] mov byte [es:setscreen], bl 0 000025EF 16 push ss 0 000025F0 07 pop es 0 000025F1 80FBC3 cmp bl, 0C3h 0 000025F4 7445 je .noaltvid 0 000025F6 B8001A mov ax, 1A00h 0 000025F9 CD10 int 10h 0 000025FB 3C1A cmp al, 1Ah 0 000025FD 753C jnz .noaltvid 0 000025FF 80FF00 cmp bh, 0 0 00002602 7437 jz .noaltvid 5987 0 00002604 1E push ds 0 00002605 B84000 mov ax, 40h 0 00002608 8ED8 mov ds, ax 0 0000260A 8B166300 mov dx, [63h] 0 0000260E 1F pop ds 0 0000260F 80F260 xor dl, 60h 0 00002612 8916[0000] mov [oldcrtp], dx 0 00002616 B007 mov al, 7 0 00002618 80FAB4 cmp dl, 0B4h 0 0000261B 7402 jz @F 0 0000261D B003 mov al, 3 5999 @@: 0 0000261F A2[0000] mov [oldmode], al 0 00002622 B00E mov al, 0Eh 0 00002624 EE out dx, al 0 00002625 42 inc dx 0 00002626 EC in al, dx 0 00002627 88C4 mov ah, al 0 00002629 4A dec dx 0 0000262A B00F mov al, 0Fh 0 0000262C EE out dx, al 0 0000262D 42 inc dx 0 0000262E EC in al, dx 0 0000262F B350 mov bl, 80 0 00002631 F6F3 div bl 0 00002633 86C4 xchg al, ah 0 00002635 A3[0000] mov [oldcsrpos], ax 0 00002638 E90CFC jmp .blankloop 6016 6017 .noaltvid: 0 0000263B BA[8B11] mov dx, imsg.noaltvid 0 0000263E E816F6 call init_putsz_cs 0 00002641 8E06[0000] mov es, [code_seg] 0 00002645 26C606[0000]C3 mov byte [es:setscreen], 0C3h 0 0000264B 16 push ss 0 0000264C 07 pop es 0 0000264D E9F7FB jmp .blankloop 6025 %endif 6026 6027 6028 %if _SYMBOLIC 6029 .switch_s: 0 00002650 89F2 mov dx, si 0 00002652 AC lodsb 0 00002653 B400 mov ah, 0 ; flag for not quoted 0 00002655 3C22 cmp al, '"' 0 00002657 7404 je .s_quoted 0 00002659 3C27 cmp al, "'" 0 0000265B 7514 jne .s_unquoted 6037 .s_quoted: 0 0000265D 88C4 mov ah, al ; save away our quote mark 0 0000265F 42 inc dx ; -> behind the quote mark 6040 @@: 0 00002660 AC lodsb 0 00002661 3C0D cmp al, 13 0 00002663 744E je .switch_s_error 0 00002665 3C00 cmp al, 0 0 00002667 744A je .switch_s_error 0 00002669 38E0 cmp al, ah ; closing quote mark ? 0 0000266B 75F3 jne @B ; not yet --> 0 0000266D EB06 jmp .s_end 6049 0 0000266F A8 db __TEST_IMM8 ; (skip lodsb) 6051 @@: 0 00002670 AC lodsb 6053 .s_unquoted: 0 00002671 3C20 cmp al, 32 0 00002673 77FB ja @B 6056 6057 .s_end: 0 00002675 4E dec si ; -> blank or terminator or closing quote 0 00002676 50 push ax 0 00002677 56 push si 0 00002678 C6040D mov byte [si], 13 ; put in a CR for good measure 0 0000267B 89D6 mov si, dx 6063 0 0000267D FF36[0000] push word [errret] 0 00002681 FF36[0000] push word [throwret] 0 00002685 FF36[0000] push word [throwsp] 6067 0 00002689 0E push cs 0 0000268A E82B00 call .jump 6070 0 0000268D 8F06[0000] pop word [throwsp] 0 00002691 8F06[0000] pop word [throwret] ; restore throw destination 0 00002695 8F06[0000] pop word [errret] 0 00002699 5E pop si 0 0000269A 58 pop ax 0 0000269B 8804 mov byte [si], al ; restore if it wasn't CR 6077 ; si -> next character to process 0 0000269D 85D2 test dx, dx 0 0000269F 740A jz @F 6080 0 000026A1 39F2 cmp dx, si 0 000026A3 7406 je @F 6083 0 000026A5 BA[4217] mov dx, imsg.switch_s_garbage 0 000026A8 E8ACF5 call init_putsz_cs 6086 6087 @@: 0 000026AB 84E4 test ah, ah ; was quoted ? 0 000026AD 7401 jz @F ; no --> 0 000026AF 46 inc si ; skip closing quote mark 6091 @@: 0 000026B0 E994FB jmp .blankloop 6093 6094 .switch_s_error: 0 000026B3 B053 mov al, 'S' 0 000026B5 E917FD jmp ..@init_cmdline_switch_error 6097 6098 .jump: 0 000026B8 C706[0000][0000] mov word [errret], ..@switch_s_catch 0 000026BE C706[0000][0000] mov word [throwret], ..@switch_s_catch 0 000026C4 8926[0000] mov word [throwsp], sp 6102 0 000026C8 B8[0000] mov ax, ..@switch_s_cont 0 000026CB FF36[0000] push word [code_seg] 0 000026CF 50 push ax 0 000026D0 CB retf 6107 %endif 6108 6109 6110 usesection INIT 6110 ------------------ note: usesection INIT 6111 6112 .switch_t: 0 000026D1 B3FF mov bl, 0FFh 0 000026D3 31FF xor di, di 6115 .switch_t_loop: 6116 @@: 0 000026D5 AC lodsb 0 000026D6 3C3D cmp al, '=' 0 000026D8 74FB je @B 0 000026DA 3C3A cmp al, ':' 0 000026DC 74F7 je @B 0 000026DE 3C2C cmp al, ',' 0 000026E0 74F3 je @B 0 000026E2 4E dec si 0 000026E3 3C20 cmp al, 32 0 000026E5 7503E9A800 je @F 0 000026EA 3C09 cmp al, 9 0 000026EC 7503E9A100 je @F 0 000026F1 3C0D cmp al, 13 0 000026F3 7503E99A00 je @F 0 000026F8 46 inc si 0 000026F9 3C2B cmp al, '+' 0 000026FB 7503E98C00 je .switch_t_set 0 00002700 3C2D cmp al, '-' 0 00002702 7503E98900 je .switch_t_clear 6136 0 00002707 2E8A1E[6D0E] mov bl, byte [cs:init_switch_t] 0 0000270C E8590E call init_capitalise 0 0000270F 3C49 cmp al, 'I' ; ignore ? 0 00002711 7508 jne .t_notignore 0 00002713 2EC606[6E0E]FF mov byte [cs:init_switch_t_ignore], 0FFh 0 00002719 EBBA jmp @B 6143 6144 .t_notignore: 0 0000271B 3C4F cmp al, 'O' ; only ? 0 0000271D 7508 jne .t_notonly 0 0000271F 2EC606[6E0E]00 mov byte [cs:init_switch_t_ignore], 0 0 00002725 EBAE jmp @B 6149 6150 .t_notonly: 0 00002727 3C50 cmp al, 'P' ; point ? 0 00002729 7508 jne .t_notpoint 0 0000272B 2EC606[6F0E]FF mov byte [cs:init_switch_t_break], 0FFh 0 00002731 EBA2 jmp @B 6155 6156 .t_notpoint: 0 00002733 3C56 cmp al, 'V' ; variable ? 0 00002735 7508 jne .t_notvar 0 00002737 2EC606[700E]FF mov byte [cs:init_switch_t_variable], 0FFh 0 0000273D EB96 jmp @B 6161 6162 .t_notvar: 0 0000273F 3C55 cmp al, 'U' ; enable UMA ? 0 00002741 7509 jne .t_notupper 0 00002743 2EC785[540E]0100 mov word [cs:init_switch_t_umblink + di], 1 0 0000274A EB89 jmp @B 6167 6168 .t_notupper: 0 0000274C 3C4C cmp al, 'L' ; restrict to LMA ? 0 0000274E 750A jne .t_notlower 0 00002750 2EC785[540E]0000 mov word [cs:init_switch_t_umblink + di], 0 0 00002757 E97BFF jmp @B 6173 6174 .t_notlower: 0 0000275A 3C58 cmp al, 'X' 0 0000275C 7505 jne .t_not_x 0 0000275E 31FF xor di, di 0 00002760 E972FF jmp @B 6179 6180 .t_not_x: 0 00002763 3C59 cmp al, 'Y' 0 00002765 7506 jne .t_not_y 0 00002767 BF0200 mov di, 2 0 0000276A E968FF jmp @B 6185 6186 .t_not_y: 0 0000276D 3C5A cmp al, 'Z' 0 0000276F 7506 jne .t_not_z 0 00002771 BF0400 mov di, 4 0 00002774 E95EFF jmp @B 6191 6192 .t_not_z: 0 00002777 3C30 cmp al, '0' 0 00002779 720C jb .switch_t_error 0 0000277B 3C39 cmp al, '9' 0 0000277D 7626 jbe .switch_t_numeric 0 0000277F 3C41 cmp al, 'A' 0 00002781 7204 jb .switch_t_error 0 00002783 3C46 cmp al, 'F' 0 00002785 761E jbe .switch_t_numeric 6201 .switch_t_error: 0 00002787 B054 mov al, 'T' 0 00002789 E943FC jmp ..@init_cmdline_switch_error 6204 6205 .switch_t_set: 0 0000278C B3FF mov bl, 0FFh 0 0000278E EB02 jmp @F 6208 6209 .switch_t_clear: 0 00002790 31DB xor bx, bx 6211 6212 @@: 6213 %if _DEVICE 0 00002792 84DB test bl, bl 0 00002794 7407 jz @F 0 00002796 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 0000279B 75EA jnz .switch_t_error 6218 @@: 6219 %endif 0 0000279D 2E881E[6D0E] mov byte [cs:init_switch_t], bl 0 000027A2 E9A2FA jmp .blankloop 6222 6223 .switch_t_numeric: 0 000027A5 31D2 xor dx, dx 0 000027A7 A8 db __TEST_IMM8 ; (skip lodsb) 6226 @@: 0 000027A8 AC lodsb 0 000027A9 3C2C cmp al, ',' 0 000027AB 7439 je @F 0 000027AD 3C20 cmp al, 32 0 000027AF 7435 je @F 0 000027B1 3C09 cmp al, 9 0 000027B3 7431 je @F 0 000027B5 3C0D cmp al, 13 0 000027B7 742D je @F 0 000027B9 E8AC0D call init_capitalise 0 000027BC B400 mov ah, 0 0 000027BE 3C30 cmp al, '0' ; decimal digit ? 0 000027C0 72C5 jb .switch_t_error 0 000027C2 3C39 cmp al, '9' 0 000027C4 7714 ja .switch_t_notdec 0 000027C6 2C30 sub al, '0' ; ax = digit 6243 .switch_t_gotdigit: 0 000027C8 81FA0010 cmp dx, 1000h 0 000027CC 73B9 jae .switch_t_error 0 000027CE 01D2 add dx, dx 0 000027D0 01D2 add dx, dx 0 000027D2 01D2 add dx, dx 0 000027D4 01D2 add dx, dx ; * 16 0 000027D6 01C2 add dx, ax 0 000027D8 EBCE jmp @B 6252 6253 .switch_t_notdec: 0 000027DA 3C41 cmp al, 'A' ; alphabetic ? 0 000027DC 72A9 jb .switch_t_error 0 000027DE 3C46 cmp al, 'F' 0 000027E0 77A5 ja .switch_t_error 0 000027E2 04C9 add al, 10 - 'A' ; ax = digit 0 000027E4 EBE2 jmp .switch_t_gotdigit 6260 6261 @@: 0 000027E6 2E8995[5A0E] mov word [cs:init_switch_t_strategy + di], dx 0 000027EB 4E dec si 0 000027EC E9E6FE jmp .switch_t_loop 6265 6266 %if _EXTENSIONS 6267 .switch_x: 0 000027EF BBF0FF mov bx, _EXT_CODE_SIZE 0 000027F2 AC lodsb 0 000027F3 3C09 cmp al, 9 0 000027F5 7503E9A100 je .switch_x_got 0 000027FA 3C20 cmp al, 32 0 000027FC 7503E99A00 je .switch_x_got 0 00002801 3C0D cmp al, 13 0 00002803 7503E99300 je .switch_x_got 0 00002808 3C3A cmp al, ':' 0 0000280A 7404 je @F 0 0000280C 3C3D cmp al, '=' 0 0000280E 7501 jne @FF 6280 @@: 0 00002810 AC lodsb 6282 @@: 0 00002811 4E dec si 0 00002812 0E push cs 0 00002813 07 pop es 0 00002814 BA[640F] mov dx, imsg.max 0 00002817 E8F80C call init_isstring? 0 0000281A 747E je .switch_x_got.lodsb 0 0000281C BB0000 mov bx, 0 0 0000281F BA[680F] mov dx, imsg.min 0 00002822 E8ED0C call init_isstring? 0 00002825 7473 je .switch_x_got.lodsb 0 00002827 BB0040 mov bx, _EXT_CODE_DEFAULT_SIZE 0 0000282A BA[6C0F] mov dx, imsg.default 0 0000282D E8E20C call init_isstring? 0 00002830 7468 je .switch_x_got.lodsb 6297 0 00002832 BA1000 mov dx, 16 0 00002835 803C23 cmp byte [si], '#' 0 00002838 7503 jne .switch_x_zero 0 0000283A 46 inc si 0 0000283B B20A mov dl, 10 6303 .switch_x_zero: 0 0000283D 31DB xor bx, bx 6305 .switch_x_num: 0 0000283F AC lodsb 0 00002840 3C20 cmp al, 32 ; end of number ? 0 00002842 7450 je .switch_x_check 0 00002844 3C09 cmp al, 9 0 00002846 744C je .switch_x_check 0 00002848 3C0D cmp al, 13 0 0000284A 7448 je .switch_x_check ; yes --> 0 0000284C 3C5F cmp al, '_' ; separator ? 0 0000284E 74EF je .switch_x_num 0 00002850 3C23 cmp al, '#' ; base change ? 0 00002852 7432 je .switch_x_base 0 00002854 E8110D call init_capitalise 0 00002857 B400 mov ah, 0 0 00002859 3C30 cmp al, '0' ; decimal digit ? 0 0000285B 7224 jb .switch_x_error 0 0000285D 3C39 cmp al, '9' 0 0000285F 7712 ja .switch_x_notdec 0 00002861 2C30 sub al, '0' ; ax = digit 6324 .switch_x_gotdigit: 0 00002863 93 xchg ax, bx ; ax = prior 0 00002864 52 push dx 0 00002865 F7E2 mul dx ; dx:ax = prior * base 0 00002867 85D2 test dx, dx ; >= 64 KiB ? 0 00002869 7516 jnz .switch_x_error ; error --> 0 0000286B 5A pop dx 0 0000286C 93 xchg bx, ax ; return bx = prior 0 0000286D 01C3 add bx, ax ; prior += next 0 0000286F 7210 jc .switch_x_error 0 00002871 EBCC jmp .switch_x_num 6335 6336 .switch_x_notdec: 0 00002873 3C41 cmp al, 'A' ; alphabetic ? 0 00002875 720A jb .switch_x_error 0 00002877 3C5A cmp al, 'Z' 0 00002879 7706 ja .switch_x_error 0 0000287B 04C9 add al, 10 - 'A' ; ax = digit 0 0000287D 39D0 cmp ax, dx 0 0000287F 72E2 jb .switch_x_gotdigit 6344 ; jae .switch_x_error 6345 .switch_x_error: 6346 ..@init_cmdline_switch_x_error: 0 00002881 B058 mov al, 'X' 0 00002883 E949FB jmp ..@init_cmdline_switch_error 6349 6350 .switch_x_base: 0 00002886 83FB02 cmp bx, 2 0 00002889 72F6 jb .switch_x_error 0 0000288B 83FB24 cmp bx, 36 0 0000288E 77F1 ja .switch_x_error 0 00002890 89DA mov dx, bx 0 00002892 EBA9 jmp .switch_x_zero 6357 6358 .switch_x_check: 0 00002894 83FBF0 cmp bx, _EXT_CODE_SIZE 0 00002897 77E8 ja .switch_x_error 6361 0 00002899 A8 db __TEST_IMM8 ; (skip lodsb) 6363 .switch_x_got.lodsb: 0 0000289A AC lodsb 6365 .switch_x_got: 0 0000289B 1E push ds 0 0000289C 07 pop es 0 0000289D 2E891E[420E] mov word [cs:init_ext_want], bx 0 000028A2 4E dec si 0 000028A3 E9A1F9 jmp .blankloop 6371 6372 6373 .switch_y: 6374 %ifn _LINK 6375 mov bx, ext_data_max_size_equate 6376 %else 0 000028A6 BB[F0FF] mov bx, relocatedzero + 0FFF0h 6378 wlcalc word_minusext_ext_data_area, equ $ - 2 6379 %endif 0 000028A9 AC lodsb 0 000028AA 3C09 cmp al, 9 0 000028AC 7503E9A200 je .switch_y_got 0 000028B1 3C20 cmp al, 32 0 000028B3 7503E99B00 je .switch_y_got 0 000028B8 3C0D cmp al, 13 0 000028BA 7503E99400 je .switch_y_got 0 000028BF 3C3A cmp al, ':' 0 000028C1 7404 je @F 0 000028C3 3C3D cmp al, '=' 0 000028C5 7501 jne @FF 6391 @@: 0 000028C7 AC lodsb 6393 @@: 0 000028C8 4E dec si 0 000028C9 0E push cs 0 000028CA 07 pop es 0 000028CB BA[640F] mov dx, imsg.max 0 000028CE E8410C call init_isstring? 0 000028D1 747F je .switch_y_got.lodsb 0 000028D3 BB0000 mov bx, 0 0 000028D6 BA[680F] mov dx, imsg.min 0 000028D9 E8360C call init_isstring? 0 000028DC 7474 je .switch_y_got.lodsb 0 000028DE BB0040 mov bx, _EXT_DATA_DEFAULT_SIZE 0 000028E1 BA[6C0F] mov dx, imsg.default 0 000028E4 E82B0C call init_isstring? 0 000028E7 7469 je .switch_y_got.lodsb 6408 0 000028E9 BA1000 mov dx, 16 0 000028EC 803C23 cmp byte [si], '#' 0 000028EF 7503 jne .switch_y_zero 0 000028F1 46 inc si 0 000028F2 B20A mov dl, 10 6414 .switch_y_zero: 0 000028F4 31DB xor bx, bx 6416 .switch_y_num: 0 000028F6 AC lodsb 0 000028F7 3C20 cmp al, 32 ; end of number ? 0 000028F9 7450 je .switch_y_check 0 000028FB 3C09 cmp al, 9 0 000028FD 744C je .switch_y_check 0 000028FF 3C0D cmp al, 13 0 00002901 7448 je .switch_y_check ; yes --> 0 00002903 3C5F cmp al, '_' ; separator ? 0 00002905 74EF je .switch_y_num 0 00002907 3C23 cmp al, '#' ; base change ? 0 00002909 7432 je .switch_y_base 0 0000290B E85A0C call init_capitalise 0 0000290E B400 mov ah, 0 0 00002910 3C30 cmp al, '0' ; decimal digit ? 0 00002912 7224 jb .switch_y_error 0 00002914 3C39 cmp al, '9' 0 00002916 7712 ja .switch_y_notdec 0 00002918 2C30 sub al, '0' ; ax = digit 6435 .switch_y_gotdigit: 0 0000291A 93 xchg ax, bx ; ax = prior 0 0000291B 52 push dx 0 0000291C F7E2 mul dx ; dx:ax = prior * base 0 0000291E 85D2 test dx, dx ; >= 64 KiB ? 0 00002920 7516 jnz .switch_y_error ; error --> 0 00002922 5A pop dx 0 00002923 93 xchg bx, ax ; return bx = prior 0 00002924 01C3 add bx, ax ; prior += next 0 00002926 7210 jc .switch_y_error 0 00002928 EBCC jmp .switch_y_num 6446 6447 .switch_y_notdec: 0 0000292A 3C41 cmp al, 'A' ; alphabetic ? 0 0000292C 720A jb .switch_y_error 0 0000292E 3C5A cmp al, 'Z' 0 00002930 7706 ja .switch_y_error 0 00002932 04C9 add al, 10 - 'A' ; ax = digit 0 00002934 39D0 cmp ax, dx 0 00002936 72E2 jb .switch_y_gotdigit 6455 ; jae .switch_y_error 6456 .switch_y_error: 6457 ..@init_cmdline_switch_y_error: 0 00002938 B059 mov al, 'Y' 0 0000293A E992FA jmp ..@init_cmdline_switch_error 6460 6461 .switch_y_base: 0 0000293D 83FB02 cmp bx, 2 0 00002940 72F6 jb .switch_y_error 0 00002942 83FB24 cmp bx, 36 0 00002945 77F1 ja .switch_y_error 0 00002947 89DA mov dx, bx 0 00002949 EBA9 jmp .switch_y_zero 6468 6469 .switch_y_check: 6470 %ifn _LINK 6471 cmp bx, ext_data_max_size_equate 6472 %else 0 0000294B 81FB[F0FF] cmp bx, strict word relocatedzero + 0FFF0h 6474 wlcalc word_minusext_ext_data_area, equ $ - 2 6475 %endif 0 0000294F 77E7 ja .switch_y_error 6477 0 00002951 A8 db __TEST_IMM8 ; (skip lodsb) 6479 .switch_y_got.lodsb: 0 00002952 AC lodsb 6481 .switch_y_got: 0 00002953 1E push ds 0 00002954 07 pop es 0 00002955 2E891E[440E] mov word [cs:init_extdata_want], bx 0 0000295A 4E dec si 0 0000295B E9E9F8 jmp .blankloop 6487 %endif 6488 6489 6490 %if _HISTORY_SEPARATE_FIXED && _HISTORY 6491 .switch_h: 0 0000295E BBF0FF mov bx, 0FFF0h 0 00002961 AC lodsb 0 00002962 3C09 cmp al, 9 0 00002964 7503E9AA00 je .switch_h_got 0 00002969 3C20 cmp al, 32 0 0000296B 7503E9A300 je .switch_h_got 0 00002970 3C0D cmp al, 13 0 00002972 7503E99C00 je .switch_h_got 0 00002977 3C3A cmp al, ':' 0 00002979 7404 je @F 0 0000297B 3C3D cmp al, '=' 0 0000297D 7501 jne @FF 6504 @@: 0 0000297F AC lodsb 6506 @@: 0 00002980 4E dec si 0 00002981 0E push cs 0 00002982 07 pop es 0 00002983 BA[640F] mov dx, imsg.max 0 00002986 E8890B call init_isstring? 0 00002989 7503E98400 je .switch_h_got.lodsb 0 0000298E BB0401 mov bx, 260 0 00002991 BA[680F] mov dx, imsg.min 0 00002994 E87B0B call init_isstring? 0 00002997 7479 je .switch_h_got.lodsb 0 00002999 BB0020 mov bx, _HISTORY_WANT_SIZE 0 0000299C BA[6C0F] mov dx, imsg.default 0 0000299F E8700B call init_isstring? 0 000029A2 746E je .switch_h_got.lodsb 6521 0 000029A4 BA1000 mov dx, 16 0 000029A7 803C23 cmp byte [si], '#' 0 000029AA 7503 jne .switch_h_zero 0 000029AC 46 inc si 0 000029AD B20A mov dl, 10 6527 .switch_h_zero: 0 000029AF 31DB xor bx, bx 6529 .switch_h_num: 0 000029B1 AC lodsb 0 000029B2 3C20 cmp al, 32 ; end of number ? 0 000029B4 7450 je .switch_h_check 0 000029B6 3C09 cmp al, 9 0 000029B8 744C je .switch_h_check 0 000029BA 3C0D cmp al, 13 0 000029BC 7448 je .switch_h_check ; yes --> 0 000029BE 3C5F cmp al, '_' ; separator ? 0 000029C0 74EF je .switch_h_num 0 000029C2 3C23 cmp al, '#' ; base change ? 0 000029C4 7432 je .switch_h_base 0 000029C6 E89F0B call init_capitalise 0 000029C9 B400 mov ah, 0 0 000029CB 3C30 cmp al, '0' ; decimal digit ? 0 000029CD 7224 jb .switch_h_error 0 000029CF 3C39 cmp al, '9' 0 000029D1 7712 ja .switch_h_notdec 0 000029D3 2C30 sub al, '0' ; ax = digit 6548 .switch_h_gotdigit: 0 000029D5 93 xchg ax, bx ; ax = prior 0 000029D6 52 push dx 0 000029D7 F7E2 mul dx ; dx:ax = prior * base 0 000029D9 85D2 test dx, dx ; >= 64 KiB ? 0 000029DB 7516 jnz .switch_h_error ; error --> 0 000029DD 5A pop dx 0 000029DE 93 xchg bx, ax ; return bx = prior 0 000029DF 01C3 add bx, ax ; prior += next 0 000029E1 7210 jc .switch_h_error 0 000029E3 EBCC jmp .switch_h_num 6559 6560 .switch_h_notdec: 0 000029E5 3C41 cmp al, 'A' ; alphabetic ? 0 000029E7 720A jb .switch_h_error 0 000029E9 3C5A cmp al, 'Z' 0 000029EB 7706 ja .switch_h_error 0 000029ED 04C9 add al, 10 - 'A' ; ax = digit 0 000029EF 39D0 cmp ax, dx 0 000029F1 72E2 jb .switch_h_gotdigit 6568 ; jae .switch_h_error 6569 .switch_h_error: 6570 ..@init_cmdline_switch_h_error: 0 000029F3 B048 mov al, 'H' 0 000029F5 E9D7F9 jmp ..@init_cmdline_switch_error 6573 6574 .switch_h_base: 0 000029F8 83FB02 cmp bx, 2 0 000029FB 72F6 jb .switch_h_error 0 000029FD 83FB24 cmp bx, 36 0 00002A00 77F1 ja .switch_h_error 0 00002A02 89DA mov dx, bx 0 00002A04 EBA9 jmp .switch_h_zero 6581 6582 .switch_h_check: 0 00002A06 83FBF0 cmp bx, 0FFF0h 0 00002A09 77E8 ja .switch_h_error 0 00002A0B 81FB0401 cmp bx, 260 0 00002A0F 72E2 jb .switch_h_error 6587 0 00002A11 A8 db __TEST_IMM8 ; (skip lodsb) 6589 .switch_h_got.lodsb: 0 00002A12 AC lodsb 6591 .switch_h_got: 0 00002A13 1E push ds 0 00002A14 07 pop es 0 00002A15 2E891E[460E] mov word [cs:init_history_want], bx 0 00002A1A 4E dec si 0 00002A1B E929F8 jmp .blankloop 6597 %endif 6598 6599 6600 .switch_a: 0 00002A1E BB0060 mov bx, _AUXBUFFMAXSIZE 0 00002A21 AC lodsb 0 00002A22 3C09 cmp al, 9 0 00002A24 7503E9A800 je .switch_a_got 0 00002A29 3C20 cmp al, 32 0 00002A2B 7503E9A100 je .switch_a_got 0 00002A30 3C0D cmp al, 13 0 00002A32 7503E99A00 je .switch_a_got 0 00002A37 3C3A cmp al, ':' 0 00002A39 7404 je @F 0 00002A3B 3C3D cmp al, '=' 0 00002A3D 7501 jne @FF 6613 @@: 0 00002A3F AC lodsb 6615 @@: 0 00002A40 4E dec si 0 00002A41 0E push cs 0 00002A42 07 pop es 0 00002A43 BA[640F] mov dx, imsg.max 0 00002A46 E8C90A call init_isstring? 0 00002A49 7503E98200 je .switch_a_got.lodsb 0 00002A4E BB1020 mov bx, _AUXBUFFSIZE 0 00002A51 BA[680F] mov dx, imsg.min 0 00002A54 E8BB0A call init_isstring? 0 00002A57 7477 je .switch_a_got.lodsb 6626 ; default == minimum 0 00002A59 BA[6C0F] mov dx, imsg.default 0 00002A5C E8B30A call init_isstring? 0 00002A5F 746F je .switch_a_got.lodsb 6630 0 00002A61 BA1000 mov dx, 16 0 00002A64 803C23 cmp byte [si], '#' 0 00002A67 7503 jne .switch_a_zero 0 00002A69 46 inc si 0 00002A6A B20A mov dl, 10 6636 .switch_a_zero: 0 00002A6C 31DB xor bx, bx 6638 .switch_a_num: 0 00002A6E AC lodsb 0 00002A6F 3C20 cmp al, 32 ; end of number ? 0 00002A71 7450 je .switch_a_check 0 00002A73 3C09 cmp al, 9 0 00002A75 744C je .switch_a_check 0 00002A77 3C0D cmp al, 13 0 00002A79 7448 je .switch_a_check ; yes --> 0 00002A7B 3C5F cmp al, '_' ; separator ? 0 00002A7D 74EF je .switch_a_num 0 00002A7F 3C23 cmp al, '#' ; base change ? 0 00002A81 7432 je .switch_a_base 0 00002A83 E8E20A call init_capitalise 0 00002A86 B400 mov ah, 0 0 00002A88 3C30 cmp al, '0' ; decimal digit ? 0 00002A8A 7224 jb .switch_a_error 0 00002A8C 3C39 cmp al, '9' 0 00002A8E 7712 ja .switch_a_notdec 0 00002A90 2C30 sub al, '0' ; ax = digit 6657 .switch_a_gotdigit: 0 00002A92 93 xchg ax, bx ; ax = prior 0 00002A93 52 push dx 0 00002A94 F7E2 mul dx ; dx:ax = prior * base 0 00002A96 85D2 test dx, dx ; >= 64 KiB ? 0 00002A98 7516 jnz .switch_a_error ; error --> 0 00002A9A 5A pop dx 0 00002A9B 93 xchg bx, ax ; return bx = prior 0 00002A9C 01C3 add bx, ax ; prior += next 0 00002A9E 7210 jc .switch_a_error 0 00002AA0 EBCC jmp .switch_a_num 6668 6669 .switch_a_notdec: 0 00002AA2 3C41 cmp al, 'A' ; alphabetic ? 0 00002AA4 720A jb .switch_a_error 0 00002AA6 3C5A cmp al, 'Z' 0 00002AA8 7706 ja .switch_a_error 0 00002AAA 04C9 add al, 10 - 'A' ; ax = digit 0 00002AAC 39D0 cmp ax, dx 0 00002AAE 72E2 jb .switch_a_gotdigit 6677 ; jae .switch_a_error 6678 .switch_a_error: 6679 ..@init_cmdline_switch_a_error: 0 00002AB0 B041 mov al, 'A' 0 00002AB2 E91AF9 jmp ..@init_cmdline_switch_error 6682 6683 .switch_a_base: 0 00002AB5 83FB02 cmp bx, 2 0 00002AB8 72F6 jb .switch_a_error 0 00002ABA 83FB24 cmp bx, 36 0 00002ABD 77F1 ja .switch_a_error 0 00002ABF 89DA mov dx, bx 0 00002AC1 EBA9 jmp .switch_a_zero 6690 6691 .switch_a_check: 0 00002AC3 81FB1020 cmp bx, _AUXBUFFSIZE 0 00002AC7 72E7 jb .switch_a_error 0 00002AC9 81FB0060 cmp bx, _AUXBUFFMAXSIZE 0 00002ACD 77E1 ja .switch_a_error 6696 0 00002ACF A8 db __TEST_IMM8 ; (skip lodsb) 6698 .switch_a_got.lodsb: 0 00002AD0 AC lodsb 6700 .switch_a_got: 0 00002AD1 1E push ds 0 00002AD2 07 pop es 0 00002AD3 2E891E[400E] mov word [cs:init_auxbuff_want], bx 0 00002AD8 4E dec si 0 00002AD9 E96BF7 jmp .blankloop 6706 6707 6708 .switch_r: 0 00002ADC AC lodsb 0 00002ADD 3C3A cmp al, ':' 0 00002ADF 7404 je @F 0 00002AE1 3C3D cmp al, '=' 0 00002AE3 7501 jne @FF 6714 @@: 0 00002AE5 A8 db __TEST_IMM8 ; skip dec 6716 @@: 0 00002AE6 4E dec si 0 00002AE7 BA1000 mov dx, 16 0 00002AEA 31DB xor bx, bx 6720 .switch_r_num: 0 00002AEC AC lodsb 0 00002AED 3C20 cmp al, 32 ; end of number ? 0 00002AEF 743E je .switch_r_check 0 00002AF1 3C09 cmp al, 9 0 00002AF3 743A je .switch_r_check 0 00002AF5 3C0D cmp al, 13 0 00002AF7 7436 je .switch_r_check ; yes --> 0 00002AF9 3C5F cmp al, '_' ; separator ? 0 00002AFB 74EF je .switch_r_num 0 00002AFD E8680A call init_capitalise 0 00002B00 B400 mov ah, 0 0 00002B02 3C30 cmp al, '0' ; decimal digit ? 0 00002B04 7224 jb .switch_r_error 0 00002B06 3C39 cmp al, '9' 0 00002B08 7712 ja .switch_r_notdec 0 00002B0A 2C30 sub al, '0' ; ax = digit 6737 .switch_r_gotdigit: 0 00002B0C 93 xchg ax, bx ; ax = prior 0 00002B0D 52 push dx 0 00002B0E F7E2 mul dx ; dx:ax = prior * base 0 00002B10 85D2 test dx, dx ; >= 64 KiB ? 0 00002B12 7516 jnz .switch_r_error ; error --> 0 00002B14 5A pop dx 0 00002B15 93 xchg bx, ax ; return bx = prior 0 00002B16 01C3 add bx, ax ; prior += next 0 00002B18 7210 jc .switch_r_error 0 00002B1A EBD0 jmp .switch_r_num 6748 6749 .switch_r_notdec: 0 00002B1C 3C41 cmp al, 'A' ; alphabetic ? 0 00002B1E 720A jb .switch_r_error 0 00002B20 3C5A cmp al, 'Z' 0 00002B22 7706 ja .switch_r_error 0 00002B24 04C9 add al, 10 - 'A' ; ax = digit 0 00002B26 39D0 cmp ax, dx 0 00002B28 72E2 jb .switch_r_gotdigit 6757 ; jae .switch_r_error 6758 .switch_r_error: 6759 ..@init_cmdline_switch_r_error: 0 00002B2A B052 mov al, 'R' 0 00002B2C E9A0F8 jmp ..@init_cmdline_switch_error 6762 6763 .switch_r_check: 6764 .switch_r_got: 0 00002B2F 1E push ds 0 00002B30 07 pop es 0 00002B31 2E891E[4E0E] mov word [cs:init_switch_r], bx 0 00002B36 4E dec si 0 00002B37 E90DF7 jmp .blankloop 6770 6771 6772 .noswitches: 6773 .breakpoint: 0 00002B3A 90 nop ; SMC in section init 6775 ; Feed the remaining command line to the 'n' command. 0 00002B3B 4E dec si 0 00002B3C E83F0A call init_skipcomma 0 00002B3F 4E dec si 0 00002B40 56 push si 6780 6781 6782 %assign ELD 0 6783 %assign INTERC3 0 6784 %assign PART1 1 6785 %assign PART2 0 6786 %assign PART3 0 6787 %define init_data_segment cs 6788 6789 %imacro internalcoderelocation 0-*.nolist 6790 %endmacro 6791 %imacro internaldatarelocation 0-*.nolist 6792 %endmacro 6793 %imacro linkdatarelocation 0-*.nolist 6794 %endmacro 6795 %define relocated(address) address 6796 6797 %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 00002B41 89F3 mov bx, si 0 00002B43 31D2 xor dx, dx 0 00002B45 B000 mov al, 0 33 <1> @@: 0 00002B47 3C2F cmp al, '/' 0 00002B49 7410 je .slash 0 00002B4B 3C5C cmp al, '\' 0 00002B4D 740C je .slash 0 00002B4F 3C3A cmp al, ':' 0 00002B51 7408 je .colon 0 00002B53 3C2E cmp al, '.' 0 00002B55 7507 jne .next 42 <1> .dot: 0 00002B57 B201 mov dl, 1 ; set dl (fn with dot) 0 00002B59 EB03 jmp .next 45 <1> 46 <1> .slash: 47 <1> .colon: 0 00002B5B BA0001 mov dx, 100h ; set dh (is a pathname), reset dl (fn with dot) 49 <1> .next: 0 00002B5E AC lodsb 0 00002B5F E8A108 call init_ifsep 0 00002B62 75E3 jne @B 0 00002B64 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 00002B65 16 push ss 0 00002B66 07 pop es 0 00002B67 89F1 mov cx, si 0 00002B69 29D9 sub cx, bx ; es:bx -> name, cx = length 60 <1> 61 <1> 62 <1> init_check_warn_extension: 0 00002B6B 52 push dx 0 00002B6C 06 push es 65 <1> 0 00002B6D 84D2 test dl, dl ; last component has a dot ? 0 00002B6F 7433 jz .done ; no, do not warn --> 68 <1> 0 00002B71 2ED006[6C0E] rol byte [init_data_segment:init_switch_pw], 1 70 <1> internaldatarelocation 0 00002B76 732C jnc .done ; warning disabled --> 72 <1> 0 00002B78 83F904 cmp cx, 4 ; can fit an expected extension ? 0 00002B7B 7221 jb .warn ; no, warn --> 75 <1> 0 00002B7D 83EE04 sub si, 4 ; -> possible extension 0 00002B80 0E push init_data_segment 0 00002B81 07 pop es 0 00002B82 BF[720E] mov di, imsg.no_warn_extensions 80 <1> internaldatarelocation ; es:di -> allowed extensions 81 <1> .loop: 0 00002B85 B000 mov al, 0 0 00002B87 2E864504 xchg byte [init_data_segment:di+4], al 84 <1> ; NUL-terminate the candidate extension 0 00002B8B 50 push ax 0 00002B8C 89FA mov dx, di 0 00002B8E E88109 call init_isstring? ; is it this one ? 0 00002B91 58 pop ax 0 00002B92 2E884504 mov byte [init_data_segment:di+4], al 90 <1> ; restore next extension text 0 00002B96 740C je .done ; yes, do not warn --> 0 00002B98 AF scasw 0 00002B99 AF scasw ; di += 4 0 00002B9A 84C0 test al, al ; was last ? 0 00002B9C 75E7 jnz .loop 96 <1> .warn: 0 00002B9E BA[8C0E] mov dx, imsg.extension_warning 98 <1> internaldatarelocation 0 00002BA1 E8B3F0 call init_putsz_cs 100 <1> 101 <1> .done: 0 00002BA4 07 pop es 0 00002BA5 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 00002BA6 2E833E[480E]00 cmp word [init_data_segment: init_switch_p_low_pathsearch_high_guessextension], strict byte 0 116 <1> internaldatarelocation -3 0 00002BAC 740E je .done_j 118 <1> 0 00002BAE E30C jcxz .done_j ; if no filename given --> 120 <1> 121 <1> ; es:bx -> name, cx = length 0 00002BB0 BF[0000] mov di, relocated(while_buffer) 123 <1> linkdatarelocation while_buffer ; ss:while_buffer -> prefix, ss:di -> after end 124 <1> 0 00002BB3 E86F08 call init_check_filename 0 00002BB6 736C jnc .found 127 <1> 0 00002BB8 84F6 test dh, dh 0 00002BBA 7403 jz @F 130 <1> .done_j: 0 00002BBC E99800 jmp .done 132 <1> @@: 0 00002BBF 2ED006[480E] rol byte [init_data_segment:init_switch_p_pathsearch], 1 134 <1> internaldatarelocation 0 00002BC4 73F6 jnc .done_j 136 <1> 137 <1> %if _DEVICE && _APPLICATION && ! ELD && ! INTERC3 0 00002BC6 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002BCB 7505 jnz .device 140 <1> %endif 141 <1> %if _APPLICATION || ELD || INTERC3 0 00002BCD A12C00 mov ax, [2Ch] 143 <1> %if _DEVICE && ! ELD && ! INTERC3 0 00002BD0 EB03 jmp @F 145 <1> %endif 146 <1> %endif 147 <1> 148 <1> %if _DEVICE && ! ELD && ! INTERC3 149 <1> .device: 0 00002BD2 E8C1E0 call init_device_get_environment 151 <1> @@: 152 <1> %endif 153 <1> 0 00002BD5 51 push cx 0 00002BD6 BF[870E] mov di, imsg.varpath 156 <1> internaldatarelocation 0 00002BD9 B90500 mov cx, imsg.varpath.length 0 00002BDC E88C08 call init_findvar 0 00002BDF 7275 jc .done_pop 160 <1> 161 <1> .pathloop: 0 00002BE1 56 push si 0 00002BE2 B98000 mov cx, 128 ; put a limit 164 <1> @@: 0 00002BE5 AC lodsb ; get next text 0 00002BE6 3C3B cmp al, ';' ; separator ? 0 00002BE8 7408 je @F ; yes --> 0 00002BEA 3C00 cmp al, 0 ; separator ? 0 00002BEC 7404 je @F ; yes --> 0 00002BEE E2F5 loop @B ; loop up to limit 0 00002BF0 EB5D jmp .pathtoolong ; error --> 172 <1> @@: 0 00002BF2 89F1 mov cx, si 0 00002BF4 49 dec cx ; -> terminator 0 00002BF5 5E pop si ; -> content text 0 00002BF6 29F1 sub cx, si ; = length excluding terminator 0 00002BF8 16 push ss 0 00002BF9 07 pop es 0 00002BFA BF[0000] mov di, relocated(while_buffer) 180 <1> linkdatarelocation while_buffer ; es:di -> buffer 181 <1> 0 00002BFD B000 mov al, 0 ; no backslash if empty 0 00002BFF E30A jcxz @FFF ; skip loop if empty --> 184 <1> @@: 0 00002C01 AC lodsb ; load from variable 0 00002C02 3C2F cmp al, '/' ; forward slash ? 0 00002C04 7502 jne @F ; no --> 0 00002C06 B05C mov al, '\' ; replace by backslash 189 <1> @@: 0 00002C08 AA stosb ; store 0 00002C09 E2F6 loop @BB ; loop for cx = count 192 <1> @@: 0 00002C0B 3C5C cmp al, '\' ; trailing backslash ? 0 00002C0D 7403 je @F ; yes --> 0 00002C0F B05C mov al, '\' 0 00002C11 AA stosb ; append it 197 <1> @@: 0 00002C12 59 pop cx 199 <1> 0 00002C13 1E push ds 0 00002C14 56 push si 202 <1> ; ss = es, es:bx -> name, cx = length 203 <1> ; ss:while_buffer -> prefix, ss:di -> after end 0 00002C15 E80D08 call init_check_filename 0 00002C18 5E pop si 0 00002C19 1F pop ds ; ds:si -> terminator of path element 0 00002C1A 7308 jnc .found 208 <1> 0 00002C1C AC lodsb ; get terminator 0 00002C1D 3C3B cmp al, ';' ; semicolon ? 0 00002C1F 7536 jne .done ; no --> 0 00002C21 51 push cx 0 00002C22 EBBD jmp .pathloop ; try next --> 214 <1> 215 <1> 216 <1> .found: 0 00002C24 16 push ss 0 00002C25 1F pop ds ; ds => PSP 0 00002C26 5E pop si 0 00002C27 01CE add si, cx ; ds:si -> behind original name 0 00002C29 16 push ss 0 00002C2A 07 pop es 0 00002C2B 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 00002C2C EB07 jmp @FF ; skip store on first iteration 230 <1> 231 <1> @@: 0 00002C2E 81FF[FEFF] cmp di, relocated(while_buffer.end) - 2 233 <1> linkdatarelocation while_buffer.end 0 00002C32 7713 ja .toolong 0 00002C34 AA stosb 236 <1> @@: 0 00002C35 AC lodsb 0 00002C36 3C00 cmp al, 0 0 00002C38 7404 je @F 0 00002C3A 3C0D cmp al, 13 0 00002C3C 75F0 jne @BB 242 <1> @@: ; (targeted from both directions) 0 00002C3E B00D mov al, 13 0 00002C40 AA stosb 0 00002C41 BE[0000] mov si, relocated(while_buffer) 246 <1> linkdatarelocation while_buffer 0 00002C44 56 push si ; offset for N/K command (kk) 0 00002C45 EB10 jmp .done 249 <1> 250 <1> .toolong: 0 00002C47 BA[DA0E] mov dx, imsg.kktoolong 252 <1> internaldatarelocation 0 00002C4A E80AF0 call init_putsz_cs 0 00002C4D EBEF jmp @B 255 <1> 256 <1> .pathtoolong: 257 <1> %if ELD 258 <1> push ss 259 <1> pop ds 260 <1> %endif 0 00002C4F BA[1C0F] mov dx, imsg.pathtoolong 262 <1> internaldatarelocation 0 00002C52 E802F0 call init_putsz_cs 264 <1> 0 00002C55 58 pop ax ; (discard si) 266 <1> .done_pop: 0 00002C56 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 6798 6799 %undef extcall 6800 %undef extcallcall 6801 %unimacro internalcoderelocation 0-*.nolist 6802 %unimacro internaldatarelocation 0-*.nolist 6803 %unimacro linkdatarelocation 0-*.nolist 6804 %undef relocated 6805 6806 6807 %if _APP_ENV_SIZE 6808 init_copy_app_env: 0 00002C57 16 push ss 0 00002C58 1F pop ds 6811 %if _DEVICE 0 00002C59 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002C5E 755F jnz .skip 6814 %endif 0 00002C60 2EC706[380E]8000 mov word [cs:mem_envsize], paras(app_env_size) 0 00002C67 8B16[0000] mov dx, word [envseg] ; => pseudo MCB 0 00002C6B 42 inc dx ; => space for environment 0 00002C6C A12C00 mov ax, word [2Ch] 0 00002C6F 1E push ds 0 00002C70 85C0 test ax, ax 0 00002C72 7446 jz @F 0 00002C74 8ED8 mov ds, ax 0 00002C76 8EC2 mov es, dx 0 00002C78 31FF xor di, di 0 00002C7A 31F6 xor si, si 6826 .loop_env: 0 00002C7C E80B08 call init_nextvar 0 00002C7F 75FB jne .loop_env 0 00002C81 46 inc si 0 00002C82 AD lodsw 0 00002C83 83F801 cmp ax, 1 0 00002C86 7504 jne .notrail 0 00002C88 E8FF07 call init_nextvar 0 00002C8B A9 db __TEST_IMM16 6835 .notrail: 0 00002C8C 4E dec si 0 00002C8D 4E dec si 0 00002C8E 81FEEE07 cmp si, app_env_size - 16 - 2 0 00002C92 7610 jbe .copy_env 0 00002C94 BA[8F0F] mov dx, imsg.app_env_too_large 0 00002C97 E8BDEF call init_putsz_cs 6842 .no_reloc: 0 00002C9A 2EC606[710E]FF mov byte [cs:app_env_allocation], 0FFh 0 00002CA0 8CDA mov dx, ds 0 00002CA2 EB16 jmp @F 6846 6847 .copy_env: 0 00002CA4 2ED006[700E] rol byte [cs:init_switch_t_variable], 1 0 00002CA9 72EF jc .no_reloc 0 00002CAB 89F1 mov cx, si 0 00002CAD 31F6 xor si, si 0 00002CAF F3A4 rep movsb 0 00002CB1 31C0 xor ax, ax 0 00002CB3 AB stosw 0 00002CB4 1E push ds 0 00002CB5 07 pop es 0 00002CB6 B449 mov ah, 49h 0 00002CB8 CD21 int 21h 6859 @@: 0 00002CBA 1F pop ds 0 00002CBB 89162C00 mov word [2Ch], dx 6862 6863 .skip: 6864 %endif 6865 6866 6867 init_relocate_init: 0 00002CBF 16 push ss 0 00002CC0 1F pop ds 0 00002CC1 16 push ss 0 00002CC2 07 pop es 6872 %if _AUXBUFFSIZE != _AUXBUFFMAXSIZE 0 00002CC3 2EA1[400E] mov ax, word [cs:init_auxbuff_want] 0 00002CC7 83C00F add ax, 15 ; cannot carry, ax <= _AUXBUFFMAXSIZE 0 00002CCA 24F0 and al, 0F0h 0 00002CCC B104 mov cl, 4 0 00002CCE 89C3 mov bx, ax 0 00002CD0 D3EB shr bx, cl 0 00002CD2 BEFFFD mov si, - paras(_AUXBUFFSIZE) 0 00002CD5 01DE add si, bx ; want size - init size = how much to add 0 00002CD7 31D2 xor dx, dx ; always positive 6882 %else 6883 xor si, si ; = 0 6884 xor dx, dx 6885 %endif 6886 6887 %if _EXTENSIONS 0 00002CD9 2EA1[440E] mov ax, word [cs:init_extdata_want] 0 00002CDD 83C00F add ax, 15 0 00002CE0 24F0 and al, 0F0h 6891 0 00002CE2 B104 mov cl, 4 0 00002CE4 89C3 mov bx, ax 0 00002CE6 D3EB shr bx, cl 0 00002CE8 BF00FC mov di, - paras(_EXT_DATA_BOOT_SIZE) 0 00002CEB 01DF add di, bx ; want size - init size = how much to add 6897 ; negative if to subtract 0 00002CED 19DB sbb bx, bx ; -1 if >= 0 to add 0 00002CEF F7D3 not bx ; -1 if negative 0 00002CF1 01FE add si, di 0 00002CF3 11DA adc dx, bx ; add positive or negative dword 6902 6903 0 00002CF5 2EA1[420E] mov ax, word [cs:init_ext_want] 0 00002CF9 83C00F add ax, 15 0 00002CFC 24F0 and al, 0F0h 6907 0 00002CFE B104 mov cl, 4 0 00002D00 89C3 mov bx, ax 0 00002D02 D3EB shr bx, cl 0 00002D04 BF00FE mov di, - paras(_EXT_CODE_INIT_SIZE) 0 00002D07 01DF add di, bx ; want size - init size = how much to add 6913 ; negative if to subtract 0 00002D09 19DB sbb bx, bx ; -1 if >= 0 to add 0 00002D0B F7D3 not bx 0 00002D0D 01FE add si, di 0 00002D0F 11DA adc dx, bx ; add positive or negative dword 6918 %endif 6919 6920 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 00002D11 2EA1[460E] mov ax, word [cs:init_history_want] 0 00002D15 83C00F add ax, 15 0 00002D18 24F0 and al, 0F0h 6924 0 00002D1A B104 mov cl, 4 0 00002D1C 89C3 mov bx, ax 0 00002D1E D3EB shr bx, cl 0 00002D20 BF00FE mov di, - paras(historysegment_size) 0 00002D23 01DF add di, bx ; want size - init size = how much to add 6930 ; negative if to subtract 0 00002D25 19DB sbb bx, bx ; -1 if >= 0 to add 0 00002D27 F7D3 not bx ; -1 if negative 0 00002D29 01FE add si, di 0 00002D2B 11DA adc dx, bx ; add positive or negative dword 6935 %endif 6936 0 00002D2D 85D2 test dx, dx ; add paras is negative ? 0 00002D2F 7567 jnz .done ; yes --> 0 00002D31 85F6 test si, si 0 00002D33 7463 jz .done ; if to add == 0 --> 6941 6942 .reloc: 0 00002D35 2E0336[360E] add si, word [cs:memsize] ; = new memsize 0 00002D3A 7256 jc .error 0 00002D3C 8CD8 mov ax, ds 0 00002D3E 01C6 add si, ax ; => past want alloc 0 00002D40 7250 jc .error 6948 %if _DEVICE 0 00002D42 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002D47 7403 jz @F 0 00002D49 46 inc si ; account for container paragraph 0 00002D4A 7446 jz .error 6953 @@: 6954 %endif 0 00002D4C 8CCB mov bx, cs 0 00002D4E 39DE cmp si, bx ; below-or-equal cs ? 0 00002D50 7646 jbe .done ; yes, no need to relocate --> 6958 6959 %ifn _LINK 6960 mov cx, init_size_p ; size of init 6961 %else 0 00002D52 B9[0000] mov cx, relocatedzero + 0 6963 wlcalc word_wrt_INIT_extpara_behind_init, equ $ - 2 6964 %endif 0 00002D55 01CB add bx, cx ; => minimum init reloc target 0 00002D57 39DE cmp si, bx 0 00002D59 7602 jbe .havetarget 0 00002D5B 89F3 mov bx, si ; => needed init reloc target 6969 6970 .havetarget: 0 00002D5D 89DA mov dx, bx ; dx => target 0 00002D5F 01CB add bx, cx ; bx => behind target 0 00002D61 722F jc .error 6974 %if _DEVICE 0 00002D63 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002D68 7409 jz @F 0 00002D6A 2E3B1E[3E0E] cmp bx, word [cs:dev_memory_end]; enough space ? 0 00002D6F 7721 ja .error ; no --> 0 00002D71 EB14 jmp .movp 6980 6981 @@: 6982 %endif 0 00002D73 8CD8 mov ax, ds 0 00002D75 29C3 sub bx, ax ; = amount paragraphs needed 0 00002D77 2E891E[520E] mov word [cs:init_target_size], bx 0 00002D7C 2E891E[500E] mov word [cs:init_base_size], bx 0 00002D81 B44A mov ah, 4Ah 0 00002D83 CD21 int 21h ; resize memory block = es 0 00002D85 720B jc .error ; if error --> 6990 6991 .movp: 0 00002D87 8CC8 mov ax, cs 0 00002D89 E83AEE call init_movp ; move init 0 00002D8C 52 push dx ; => relocated init 0 00002D8D E89ED4 call init_retf ; ttansfer control 0 00002D90 EB06 jmp .done ; done 6997 6998 .error: 0 00002D92 BA[4610] mov dx, imsg.init_relocate_failure 0 00002D95 E925F6 jmp ..@init_cmdline_error 7001 7002 .done: 7003 7004 7005 init_change_auxbuff_size: 0 00002D98 16 push ss 0 00002D99 1F pop ds 0 00002D9A 16 push ss 0 00002D9B 07 pop es 7010 %if _AUXBUFFSIZE != _AUXBUFFMAXSIZE 0 00002D9C 2EA1[400E] mov ax, word [cs:init_auxbuff_want] 0 00002DA0 83C00F add ax, 15 ; cannot carry, ax <= _AUXBUFFMAXSIZE 0 00002DA3 24F0 and al, 0F0h 7014 0 00002DA5 89C7 mov di, ax 0 00002DA7 83EF18 sub di, 8 * 3 0 00002DAA A3[0000] mov word [auxbuff_current_size], ax 0 00002DAD 893E[0000] mov word [auxbuff_current_size_minus_24], di 7019 0 00002DB1 B104 mov cl, 4 0 00002DB3 89C3 mov bx, ax 0 00002DB5 D3EB shr bx, cl 0 00002DB7 BEFFFD mov si, - paras(_AUXBUFFSIZE) 0 00002DBA 01DE add si, bx 0 00002DBC 740E jz @F ; if to keep minimum size 7026 7027 ; INP: ax = wanted size (rounded to paragraph boundary) 7028 ; bx = wanted size paragraphs 7029 ; si = bx - paragraphs of minimum size = how much to enlarge 7030 ; ip -> function depending on layout 7031 ; STT: ss = ds = es 7032 ; OUT: NC if success 7033 ; CY if error, branch to command line error 0 00002DBE 2EFF16[3C0E] call near [cs:init_layout] 0 00002DC3 16 push ss 0 00002DC4 1F pop ds 0 00002DC5 16 push ss 0 00002DC6 07 pop es 0 00002DC7 7303E9E4FC jc ..@init_cmdline_switch_a_error 7040 @@: 7041 %endif 7042 7043 7044 %if _EXTENSIONS 7045 init_change_extdata_size_and_init: 0 00002DCC 2EA1[440E] mov ax, word [cs:init_extdata_want] 0 00002DD0 83C00F add ax, 15 0 00002DD3 24F0 and al, 0F0h 0 00002DD5 A3[0000] mov word [extdata_size], ax 7050 0 00002DD8 89C1 mov cx, ax 0 00002DDA 81E90040 sub cx, fromparas(paras(_EXT_DATA_BOOT_SIZE)) 0 00002DDE 010E[0000] add word [entryseg_size], cx 7054 0 00002DE2 B104 mov cl, 4 0 00002DE4 89C3 mov bx, ax 0 00002DE6 D3EB shr bx, cl 0 00002DE8 BE0004 mov si, paras(_EXT_DATA_BOOT_SIZE) 0 00002DEB 29DE sub si, bx ; init size - want 7060 ; negative if larger want than init 0 00002DED 7503E9A700 jz .keep ; if to keep init size 0 00002DF2 19FF sbb di, di ; -1 if negative 0 00002DF4 F7D7 not di ; -1 if positive (smaller want than init) 0 00002DF6 2E893E[4C0E] mov word [cs:relocate_down], di ; relocating down if smaller want 7065 0 00002DFB 2E8B0E[360E] mov cx, word [cs:memsize] ; how many paragraphs do we have 7067 %if _DEVICE 0 00002E00 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002E05 7401 jz @F 0 00002E07 41 inc cx ; account for container paragraph 7071 @@: 7072 %endif 0 00002E08 2E2936[360E] sub word [cs:memsize], si 7074 0 00002E0D 8CD8 mov ax, ds 7076 %ifn _LINK 7077 add ax, paras(100h + DATAENTRYTABLESIZE + datastack_size) 7078 mov dx, ax 7079 sub dx, si 7080 sub cx, paras(100h + DATAENTRYTABLESIZE + datastack_size) 7081 %else 0 00002E0F 05[0000] add ax, strict word relocatedzero + 0 7083 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_end_of_datastack, equ $ - 2 0 00002E12 89C2 mov dx, ax 0 00002E14 29F2 sub dx, si 0 00002E16 81E9[0000] sub cx, strict word relocatedzero + 0 7087 wlcalc word_wrt_@@lDEBUG_DATA_ENTRY@_extpara_end_of_datastack, equ $ - 2 7088 %endif 0 00002E1A E8A9ED call init_movp 7090 7091 %if _DEVICE 0 00002E1D F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002E22 7416 jz @F 7094 0 00002E24 2936[0000] sub word [device_mcb_paragraphs], si 7096 ; fix our variable 0 00002E28 2936[0000] sub word [alloc_size], si ; this one too 0 00002E2C 8E06[0000] mov es, word [reg_es] 0 00002E30 8B1E[0000] mov bx, word [reg_ebx] ; -> device request header 0 00002E34 26297710 sub word [es:bx + 0Eh + 2], si ; -> behind memory in use 0 00002E38 16 push ss 0 00002E39 07 pop es 7103 %endif 7104 @@: 7105 0 00002E3A F7DE neg si 7107 7108 %if _HISTORY_SEPARATE_FIXED && _HISTORY 7109 .relocate_history: 0 00002E3C 0136[0000] add word [history.segorsel + soaSegSel], si 7111 %if _PM 0 00002E40 0136[0200] add word [history.segorsel + soaSegment], si 7113 %endif 7114 %endif 7115 7116 %if _APP_ENV_SIZE || _DEV_ENV_SIZE 7117 .relocate_env: 0 00002E44 2ED006[710E] rol byte [cs:app_env_allocation], 1 0 00002E49 7204 jc @F 0 00002E4B 01362C00 add word [2Ch], si 7121 @@: 0 00002E4F 833E[0000]00 cmp word [envseg], 0 0 00002E54 7404 je @F 0 00002E56 0136[0000] add word [envseg], si 7125 @@: 7126 %endif 7127 7128 %if _EXTENSIONS 7129 .relocate_ext: 0 00002E5A 0136[0000] add word [extseg], si 7131 %endif 7132 7133 .relocate_code: 0 00002E5E A1[0000] mov ax, word [code_seg] 0 00002E61 89C2 mov dx, ax 0 00002E63 01F2 add dx, si 7137 0 00002E65 8EC2 mov es, dx 0 00002E67 0136[0000] add word [code_seg], si 7140 %if _DUALCODE 0 00002E6B 0136[0000] add word [code2_seg], si 0 00002E6F 8B16[0000] mov dx, word [code2_seg] 0 00002E73 56 push si 7144 %if ! _PM 7145 mov si, relocate_from_code 7146 mov di, relocate_from_code.end 7147 call .relocate_code_patch 7148 mov si, relocate_from_code2 7149 mov di, relocate_from_code2.end 7150 %endif 0 00002E74 06 push es 0 00002E75 8EC2 mov es, dx 0 00002E77 5A pop dx 7154 %if ! _PM 7155 call .relocate_code_patch 7156 jmp .relocate_code_done 7157 7158 .relocate_code_loop: 7159 cs lodsw 7160 xchg bx, ax 7161 mov word [es:bx], dx 7162 .relocate_code_patch: 7163 cmp si, di 7164 jb .relocate_code_loop 7165 retn 7166 7167 .relocate_code_done: 7168 %endif 0 00002E78 5E pop si 7170 %endif 7171 7172 %if _AREAS && _AREAS_HOOK_CLIENT 0 00002E79 89F0 mov ax, si 0 00002E7B 2E8B16[4C0E] mov dx, word [cs:relocate_down] 0 00002E80 E8E607 call add_to_areas_linear_code1.dxax 7176 %if _DUALCODE && _EXPRDUALCODE 0 00002E83 89F0 mov ax, si 0 00002E85 2E8B16[4C0E] mov dx, word [cs:relocate_down] 0 00002E8A E80808 call add_to_areas_linear_code2.dxax 7180 %endif 7181 %endif 7182 7183 7184 .relocate_auxbuff: 0 00002E8D 0136[0000] add word [auxbuff_segorsel + soaSegSel], si 7186 %if _PM 0 00002E91 0136[0200] add word [auxbuff_segorsel + soaSegment], si 7188 ; initialise auxbuff references 7189 %endif 7190 %if _IMMASM && _IMMASM_AUXBUFF 7191 add word [immseg], si 7192 %endif 7193 7194 7195 %if _MESSAGESEGMENT 7196 .relocate_messagesegment: 0 00002E95 0136[0000] add word [messageseg], si 7198 %if _HELP_COMPRESSED && ! _PM 7199 add word [hshrink_memory_source.segment], si 7200 %endif 7201 %endif 7202 7203 .keep: 0 00002E99 8B0E[0000] mov cx, word [extdata_size] 0 00002E9D 16 push ss 0 00002E9E 07 pop es 0 00002E9F BF[0000] mov di, ext_data_area 0 00002EA2 B000 mov al, 0 0 00002EA4 F3AA rep stosb ; init ext data area 7210 %endif 7211 7212 7213 %if _EXTENSIONS 7214 init_change_ext_size: 0 00002EA6 2EA1[420E] mov ax, word [cs:init_ext_want] 0 00002EAA 83C00F add ax, 15 0 00002EAD 24F0 and al, 0F0h 0 00002EAF A3[0000] mov word [extseg_size], ax 7219 0 00002EB2 B104 mov cl, 4 0 00002EB4 89C3 mov bx, ax 0 00002EB6 D3EB shr bx, cl 0 00002EB8 BE0002 mov si, paras(_EXT_CODE_INIT_SIZE) 0 00002EBB 29DE sub si, bx ; init size - want 7225 ; negative if larger want than init 0 00002EBD 7441 jz @F ; if to keep init size 7227 0 00002EBF 2E2936[360E] sub word [cs:memsize], si 7229 0 00002EC4 85F6 test si, si 0 00002EC6 7911 jns .smaller 0 00002EC8 BF0020 mov di, _EXT_CODE_INIT_SIZE 0 00002ECB 8E06[0000] mov es, word [extseg] 0 00002ECF 8B0E[0000] mov cx, word [extseg_size] 0 00002ED3 29F9 sub cx, di 0 00002ED5 B000 mov al, 0 0 00002ED7 F3AA rep stosb ; init trailer 7238 .smaller: 7239 7240 %if _DEVICE 0 00002ED9 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002EDE 7420 jz @F 7243 0 00002EE0 2936[0000] sub word [device_mcb_paragraphs], si 7245 ; fix our variable 0 00002EE4 2936[0000] sub word [alloc_size], si ; this one too 0 00002EE8 8CD8 mov ax, ds ; => PSP 0 00002EEA 2E0306[360E] add ax, word [cs:memsize] ; => where to place container sig 0 00002EEF E87CDC call init_dev_place_container_signature 7250 ; CHG: es, di, cx, si 7251 ; ax => behind memory used for device 0 00002EF2 8E06[0000] mov es, word [reg_es] 0 00002EF6 8B1E[0000] mov bx, word [reg_ebx] ; -> device request header 0 00002EFA 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 0 00002EFE 16 push ss 0 00002EFF 07 pop es 7257 %endif 7258 @@: 7259 %endif 7260 7261 7262 %if _HISTORY_SEPARATE_FIXED && _HISTORY 7263 init_change_history_size: 0 00002F00 2EA1[460E] mov ax, word [cs:init_history_want] 0 00002F04 83C00F add ax, 15 0 00002F07 24F0 and al, 0F0h 0 00002F09 A3[0000] mov word [historyseg_size], ax 0 00002F0C 89C3 mov bx, ax 7269 0 00002F0E 48 dec ax 0 00002F0F 48 dec ax 0 00002F10 A3[0000] mov word [history.first], ax 0 00002F13 A3[0000] mov word [history.last], ax 7274 0 00002F16 B104 mov cl, 4 0 00002F18 D3EB shr bx, cl 0 00002F1A BE0002 mov si, paras(historysegment_size) 0 00002F1D 29DE sub si, bx ; init size - want 7279 ; negative if larger want than init 0 00002F1F 7467 jz .keep ; if to keep init size 0 00002F21 19FF sbb di, di ; -1 if negative 0 00002F23 F7D7 not di ; -1 if positive (smaller want than init) 0 00002F25 2E893E[4C0E] mov word [cs:relocate_down], di ; relocating down if smaller want 7284 0 00002F2A 2E8B0E[360E] mov cx, word [cs:memsize] ; how many paragraphs do we have 7286 %if _DEVICE 0 00002F2F F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002F34 7401 jz @F 0 00002F36 41 inc cx ; account for container paragraph 7290 @@: 7291 %endif 0 00002F37 2E2936[360E] sub word [cs:memsize], si 7293 0 00002F3C 8CD8 mov ax, ds 0 00002F3E 01C1 add cx, ax 0 00002F40 A1[0000] mov ax, word [history.segorsel + soaSegSel] 0 00002F43 89C2 mov dx, ax 0 00002F45 050002 add ax, paras(historysegment_size) 7299 ; => source 0 00002F48 01DA add dx, bx ; => destination 0 00002F4A 29C1 sub cx, ax 0 00002F4C E877EC call init_movp 7303 7304 %if _DEVICE 0 00002F4F F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002F54 7416 jz @F 7307 0 00002F56 2936[0000] sub word [device_mcb_paragraphs], si 7309 ; fix our variable 0 00002F5A 2936[0000] sub word [alloc_size], si ; this one too 0 00002F5E 8E06[0000] mov es, word [reg_es] 0 00002F62 8B1E[0000] mov bx, word [reg_ebx] ; -> device request header 0 00002F66 26297710 sub word [es:bx + 0Eh + 2], si ; -> behind memory in use 0 00002F6A 16 push ss 0 00002F6B 07 pop es 7316 %endif 7317 @@: 7318 0 00002F6C F7DE neg si 7320 7321 %if _APP_ENV_SIZE || _DEV_ENV_SIZE 7322 .relocate_env: 0 00002F6E 2ED006[710E] rol byte [cs:app_env_allocation], 1 0 00002F73 7204 jc @F 0 00002F75 01362C00 add word [2Ch], si 7326 @@: 0 00002F79 833E[0000]00 cmp word [envseg], 0 0 00002F7E 7404 je @F 0 00002F80 0136[0000] add word [envseg], si 7330 @@: 7331 %endif 7332 7333 %if _EXTENSIONS 7334 .relocate_ext: 0 00002F84 0136[0000] add word [extseg], si 7336 %endif 7337 7338 .keep: 0 00002F88 8B0E[0000] mov cx, word [historyseg_size] 0 00002F8C 8E06[0000] mov es, word [history.segorsel + soaSegSel] 0 00002F90 31FF xor di, di 0 00002F92 B000 mov al, 0 0 00002F94 F3AA rep stosb ; init history buffer 7344 %endif 7345 7346 7347 init_relocate: 0 00002F96 2ED006[6D0E] rol byte [cs:init_switch_t], 1 0 00002F9B 7203E9FA01 jnc .done_outer 7350 %if _DEVICE 0 00002FA0 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00002FA5 7403E9EA01 jnz .error_outer 7353 %endif 7354 0 00002FAA 2ED006[6F0E] rol byte [cs:init_switch_t_break], 1 0 00002FAF 7301 jnc @F 0 00002FB1 CC int3 7358 @@: 7359 0 00002FB2 B80258 mov ax, 5802h ; Get UMB link state 0 00002FB5 CD21 int 21h 0 00002FB7 30E4 xor ah, ah 0 00002FB9 50 push ax ; Save UMB link state 0 00002FBA B80058 mov ax, 5800h ; Get allocation strategy 0 00002FBD CD21 int 21h 0 00002FBF 50 push ax ; Save allocation strategy 7367 0 00002FC0 31FF xor di, di ; first set 7369 .retry_alloc: 0 00002FC2 B80358 mov ax, 5803h ; Set UMB link state: 0 00002FC5 2E8B9D[540E] mov bx, [cs:init_switch_t_umblink + di] 0 00002FCA 83FBFF cmp bx, -1 ; not set ? 0 00002FCD 7503E99E01 je .error_no_alloc_retry ; then error out --> 0 00002FD2 CD21 int 21h 0 00002FD4 B80158 mov ax, 5801h ; Set allocation strategy: 0 00002FD7 2E8B9D[5A0E] mov bx, [cs:init_switch_t_strategy + di] 0 00002FDC CD21 int 21h 7378 7379 ; allocate new memory block for process 0 00002FDE 2E8B1E[360E] mov bx, word [cs:memsize] 0 00002FE3 B448 mov ah, 48h 0 00002FE5 CD21 int 21h 0 00002FE7 7303E98401 jc .error_no_alloc_retry 7384 0 00002FEC 92 xchg dx, ax ; dx => new process block 7386 7387 ; allocate new memory block for environment 7388 %if _APP_ENV_SIZE 0 00002FED 2ED006[710E] rol byte [cs:app_env_allocation], 1 0 00002FF2 732D jnc @F 7391 %endif 0 00002FF4 A12C00 mov ax, word [2Ch] 0 00002FF7 85C0 test ax, ax ; zero ? 0 00002FF9 7426 jz .allocated ; yes, nothing to relocate --> 0 00002FFB 48 dec ax 0 00002FFC 8EC0 mov es, ax ; es => MCB 0 00002FFE 268B1E0300 mov bx, word [es:3] ; = MCB size 0 00003003 B448 mov ah, 48h 0 00003005 CD21 int 21h ; allocate 0 00003007 7303E95E01 jc .error_no_alloc_retry_free_dx 7401 7402 ; relocate environment 0 0000300C 52 push dx 0 0000300D 92 xchg dx, ax ; dx => target 0 0000300E A12C00 mov ax, word [2Ch] ; ax => source 0 00003011 89D9 mov cx, bx ; cx = amount paragraphs 0 00003013 E8B0EB call init_movp 0 00003016 89162C00 mov word [2Ch], dx ; relocate environment 0 0000301A 5A pop dx ; => process memory block target 0 0000301B 8EC0 mov es, ax 0 0000301D B449 mov ah, 49h 0 0000301F CD21 int 21h ; explicitly free old environment 7413 ; (not needed depending on method) 7414 @@: 7415 7416 .allocated: ; dx => new process block 0 00003021 8CD0 mov ax, ss ; => source process block 0 00003023 2E8B0E[360E] mov cx, word [cs:memsize] ; cx = amount paragraphs 0 00003028 2E890E[520E] mov word [cs:init_target_size], cx 0 0000302D E896EB call init_movp 7421 0 00003030 2EA3[4A0E] mov word [cs:relocate_source], ax 0 00003034 48 dec ax 0 00003035 1E push ds 0 00003036 8ED8 mov ds, ax ; ds => original block MCB 0 00003038 89160100 mov word [1], dx ; set original block owner to new 7427 0 0000303C 89D0 mov ax, dx 0 0000303E 48 dec ax 0 0000303F 8EC0 mov es, ax ; es => new block MCB 0 00003041 2689160100 mov word [es:1], dx ; set new block owner to new 7432 0 00003046 BF0800 mov di, 8 ; es:di-> MCB name field 0 00003049 89FE mov si, di 0 0000304B A5 movsw 0 0000304C A5 movsw 0 0000304D A5 movsw 0 0000304E A5 movsw ; Force MCB string 0 0000304F 1F pop ds ; restore => old block 7440 0 00003050 A12C00 mov ax, word [2Ch] ; => environment, or zero 0 00003053 85C0 test ax, ax 0 00003055 7408 jz @F 0 00003057 48 dec ax 0 00003058 8EC0 mov es, ax ; => environment MCB 0 0000305A 2689160100 mov word [es:1], dx ; set environment block owner to new 7447 @@: 7448 0 0000305F 8CD0 mov ax, ss ; ax => old PSP 0 00003061 8ED2 mov ss, dx ; relocate stack 0 00003063 90 nop 7452 ; ds still => old PSP 0 00003064 92 xchg ax, dx ; ax => new PSP, dx => old PSP 7454 7455 ; code from ecm TSR 0 00003065 8EC0 mov es, ax ; es = new PSP 0 00003067 BF1800 mov di, 18h 0 0000306A B91400 mov cx, 20 0 0000306D 26A33600 mov word [ es:34h+2 ], ax 0 00003071 26893E3400 mov word [ es:34h ], di ; fix the new PSP's PHT pointer 0 00003076 26890E3200 mov word [ es:32h ], cx ; and the count of PHT entries field 0 0000307B 50 push ax 0 0000307C B0FF mov al, -1 0 0000307E 57 push di 0 0000307F 89CB mov bx, cx ; = 20 0 00003081 F3AA rep stosb ; initialise new PHT with empty entries 0 00003083 5F pop di 0 00003084 8B0E3200 mov cx, word [ 32h ] ; cx = count of PHT entries 0 00003088 39D9 cmp cx, bx ; >= 20 ? 0 0000308A 7202 jb .shortertable ; no --> 0 0000308C 89D9 mov cx, bx ; limit to 20 7472 .shortertable: 0 0000308E C5363400 lds si, [ 34h ] ; ds:si-> old PHT 0 00003092 56 push si 0 00003093 51 push cx 0 00003094 F3A4 rep movsb ; get all entries 0 00003096 59 pop cx 0 00003097 5F pop di 0 00003098 1E push ds 0 00003099 07 pop es ; es:di-> old PHT 0 0000309A F3AA rep stosb ; fill moved entries with -1 (closed) 0 0000309C 58 pop ax 0 0000309D 8EDA mov ds, dx ; ds = old PSP 0 0000309F C7060A00[D430] mov word [ 0Ah ], .terminated 0 000030A5 8C0E0C00 mov word [ 0Ah+2 ], cs ; Parent Return Address -> us 7486 %if 0 ; (not used) 7487 mov word [ 0Eh ], i23 7488 mov word [ 0Eh+2 ], ax 7489 mov word [ 12h ], i24 7490 mov word [ 12h+2 ], ax ; set interrupt vectors to ours 7491 %endif 0 000030A9 A31600 mov word [ 16h ], ax ; set parent PSP to the relocated one 0 000030AC 36A33000 mov word [ ss:2Eh+2 ], ax 7494 ; set SS used by process termination 7495 0 000030B0 93 xchg ax, bx ; bx = new location, dx = old location 0 000030B1 B85D33 mov ax, 335Dh 0 000030B4 CD21 int 21h ; PSP relocated call-out 7499 7500 ; In order to set the correct stack address here, 7501 ; the last Int21 call to a usual function (such as 7502 ; Int21.48, .49) must've been made with the same stack 7503 ; pointer as the Int21.4C call below gets. 7504 ; 7505 ; Update: dosemu2 does weird things to the stack. 7506 ; In particular, it inserts an additional iret 7507 ; frame depending on some conditions. 7508 ; Only the interrupt 21h subfunctions 00h, 26h, 7509 ; 31h, 4Bh, and 4Ch are handled differently. 7510 ; As a workaround we can call service 4Bh as the 7511 ; last interrupt 21h function before terminating. 7512 ; Refer to https://github.com/dosemu2/dosemu2/blob/d7402eec84478c051d25e7b26dd8515514c186e2/src/base/core/int.c#L1633-L1639 7513 7514 ; rol byte [j_flags.invalidexec], 1 7515 ; jnc @F 7516 0 000030B6 0E push cs 0 000030B7 1F pop ds 0 000030B8 BA[CE30] mov dx, .nullbyte ; just in case, ds:dx -> zero value byte 0 000030BB B87F4B mov ax, 4B7Fh ; 21.4B with invalid subfunction in al 7521 ; (note that FreeDOS masks off 80h) 0 000030BE CD21 int 21h 7523 @@: 7524 0 000030C0 2E8E06[4A0E] mov es, word [cs:relocate_source] 0 000030C5 26FF362E00 push word [ es:2Eh ] 0 000030CA 368F062E00 pop word [ ss:2Eh ] ; set SP used by process termination 7528 .nullbyte: equ $ - 1 7529 0 000030CF B8004C mov ax, 4C00h 0 000030D2 CD21 int 21h ; terminate, and make the new PSP active 7532 ; also handles freeing all memory allocated to the old PSP 7533 ; also closes any handles >20 if PHT larger 7534 ; (not used) also relocates Int23, Int24 7535 ; also notifies resident software old PSP is no longer valid 7536 .terminated: ; (ax, bx, es might be changed) 0 000030D4 16 push ss 0 000030D5 1F pop ds 0 000030D6 16 push ss 0 000030D7 07 pop es 7541 ; end code from ecm TSR 7542 7543 7544 .relocate: 0 000030D8 2E8326[4C0E]00 and word [cs:relocate_down], 0 ; = 0 0 000030DE 8CD6 mov si, ss 0 000030E0 2E2B36[4A0E] sub si, word [cs:relocate_source] 0 000030E5 7305 jnc @F 0 000030E7 2EF716[4C0E] not word [cs:relocate_down] ; = 0FFFFh 7550 @@: 7551 ; target - source = delta 7552 ; delta + source = target 7553 ; because target - source + source = target 7554 7555 %if _HISTORY_SEPARATE_FIXED && _HISTORY 7556 .relocate_history: 0 000030EC 0136[0000] add word [history.segorsel + soaSegSel], si 7558 %if _PM 0 000030F0 0136[0200] add word [history.segorsel + soaSegment], si 7560 %endif 7561 %endif 7562 7563 %if _APP_ENV_SIZE 7564 .relocate_env: 0 000030F4 2ED006[710E] rol byte [cs:app_env_allocation], 1 0 000030F9 7204 jc @F 0 000030FB 01362C00 add word [2Ch], si 7568 @@: 0 000030FF 833E[0000]00 cmp word [envseg], 0 0 00003104 7404 je @F 0 00003106 0136[0000] add word [envseg], si 7572 @@: 7573 %endif 7574 7575 %if _EXTENSIONS 7576 .relocate_ext: 0 0000310A 0136[0000] add word [extseg], si 7578 %endif 7579 7580 .relocate_code: 0 0000310E A1[0000] mov ax, word [code_seg] 0 00003111 89C2 mov dx, ax 0 00003113 01F2 add dx, si 7584 0 00003115 8EC2 mov es, dx 0 00003117 0136[0000] add word [code_seg], si 7587 %if _DUALCODE 0 0000311B 0136[0000] add word [code2_seg], si 0 0000311F 8B16[0000] mov dx, word [code2_seg] 0 00003123 56 push si 7591 %if ! _PM 7592 mov si, relocate_from_code 7593 mov di, relocate_from_code.end 7594 call .relocate_code_patch 7595 mov si, relocate_from_code2 7596 mov di, relocate_from_code2.end 7597 %endif 0 00003124 06 push es 0 00003125 8EC2 mov es, dx 0 00003127 5A pop dx 7601 %if ! _PM 7602 call .relocate_code_patch 7603 jmp .relocate_code_done 7604 7605 .relocate_code_loop: 7606 cs lodsw 7607 xchg bx, ax 7608 mov word [es:bx], dx 7609 .relocate_code_patch: 7610 cmp si, di 7611 jb .relocate_code_loop 7612 retn 7613 7614 .relocate_code_done: 7615 %endif 0 00003128 5E pop si 7617 %endif 7618 7619 %if _AREAS && _AREAS_HOOK_CLIENT 0 00003129 89F0 mov ax, si 0 0000312B 2E8B16[4C0E] mov dx, word [cs:relocate_down] 0 00003130 E83605 call add_to_areas_linear_code1.dxax 7623 %if _DUALCODE && _EXPRDUALCODE 0 00003133 89F0 mov ax, si 0 00003135 2E8B16[4C0E] mov dx, word [cs:relocate_down] 0 0000313A E85805 call add_to_areas_linear_code2.dxax 7627 %endif 7628 %endif 7629 7630 7631 .relocate_auxbuff: 0 0000313D 0136[0000] add word [auxbuff_segorsel + soaSegSel], si 7633 %if _PM 0 00003141 0136[0200] add word [auxbuff_segorsel + soaSegment], si 7635 ; initialise auxbuff references 7636 %endif 7637 %if _IMMASM && _IMMASM_AUXBUFF 7638 add word [immseg], si 7639 %endif 7640 7641 7642 %if _MESSAGESEGMENT 7643 .relocate_messagesegment: 0 00003145 0136[0000] add word [messageseg], si 7645 %if _HELP_COMPRESSED && ! _PM 7646 add word [hshrink_memory_source.segment], si 7647 %endif 7648 %endif 7649 7650 7651 .relocate_old_initcode_variables: 0 00003149 8CD8 mov ax, ds 0 0000314B A3[0200] mov word [execblk.cmdline + 2], ax 0 0000314E A3[0200] mov word [execblk.fcb1 + 2], ax 0 00003151 A3[0200] mov word [execblk.fcb2 + 2], ax ; set up parameter block for exec command 0 00003154 A3[0000] mov word [pspdbg], ax 7657 7658 %if _IMMASM && !_IMMASM_AUXBUFF 7659 %ifn _LINK 7660 add ax, (immasm_buffer + DATASECTIONFIXUP) >> 4 7661 %else 0 00003157 05[0000] add ax, strict word immasm_buffer 7663 wlcalc word_shr_4, equ $ - 2 7664 %endif 0 0000315A A3[0000] mov word [immseg], ax 7666 %endif 7667 7668 7669 %if _AREAS_HOOK_SERVER 7670 .relocate_areas: 0 0000315D 8CD8 mov ax, ds 0 0000315F A3[0200] mov word [ddebugareas.next + 2], ax 0 00003162 A3[0200] mov word [ddebugareas.prev + 2], ax 0 00003165 A3[0000] mov word [..@patch_entry_seg], ax 7675 %endif 7676 7677 7678 .relocate_done: 0 00003168 EB16 jmp .done 7680 7681 7682 ; environment could not be allocated 7683 .error_no_alloc_retry_free_dx: 0 0000316A 8EC2 mov es, dx 0 0000316C B449 mov ah, 49h 0 0000316E CD21 int 21h ; free allocated block 7687 7688 ; some memory could not be allocated 7689 .error_no_alloc_retry: 0 00003170 AF scasw ; di += 2 0 00003171 83FF06 cmp di, 6 0 00003174 7303E949FE jb .retry_alloc 7693 7694 .error_no_retry: 0 00003179 2ED006[6E0E] rol byte [cs:init_switch_t_ignore], 1 0 0000317E 7301 jnc .error 7697 7698 .done: 0 00003180 A8 db __TEST_IMM8 ; (skip stc, NC) 7700 .error: 0 00003181 F9 stc ; CY 7702 .status: 0 00003182 19D2 sbb dx, dx ; 0 = NC, -1 = CY 0 00003184 5B pop bx ; saved allocation strategy 0 00003185 B80158 mov ax, 5801h 0 00003188 CD21 int 21h ; Set allocation strategy 0 0000318A 5B pop bx ; saved UMB link state 0 0000318B B80358 mov ax, 5803h 0 0000318E CD21 int 21h ; Set UMB link state 0 00003190 85D2 test dx, dx 0 00003192 7406 jz .done_outer 7712 .error_outer: 0 00003194 BA[1410] mov dx, imsg.relocate_failure 0 00003197 E923F2 jmp ..@init_cmdline_error 7715 7716 .done_outer: 7717 7718 7719 %if _EXECUTABLE 7720 init_executable: 0 0000319A 16 push ss 0 0000319B 1F pop ds 0 0000319C 16 push ss 0 0000319D 07 pop es 0 0000319E F606[0200]40 testopt [internalflags6], dif6_device_mode 0 000031A3 7539 jnz .device 7727 7728 .application: 0 000031A5 8B162C00 mov dx, word [2Ch] 0 000031A9 85D2 test dx, dx 0 000031AB 746B jz .unable 0 000031AD 8EC2 mov es, dx 0 000031AF B90080 mov cx, 8000h 0 000031B2 31F6 xor si, si 7735 @@: 0 000031B4 E81900 call .nextvar 0 000031B7 725F jc .unable 0 000031B9 75F9 jne @B 0 000031BB 46 inc si 0 000031BC 26AD es lodsw 0 000031BE 83F801 cmp ax, 1 0 000031C1 7555 jne .unable 7743 0 000031C3 06 push es 0 000031C4 1F pop ds ; => env 0 000031C5 16 push ss 0 000031C6 07 pop es ; => data entry 0 000031C7 BF[0000] mov di, init_executable_pathname 0 000031CA B460 mov ah, 60h 0 000031CC CD21 int 21h 0 000031CE EB48 jmp .done 7752 7753 .nextvar: 7754 @@: 0 000031D0 26AC es lodsb 0 000031D2 84C0 test al, al 0 000031D4 E0FA loopnz @B 0 000031D6 F9 stc 0 000031D7 7504 jnz @F 0 000031D9 26803C00 cmp byte [es:si], 0 7761 @@: 0 000031DD C3 retn 7763 7764 7765 .device: 0 000031DE 8B36[0000] mov si, word [reg_ebx] 0 000031E2 8E1E[0000] mov ds, word [reg_es] 0 000031E6 C57412 lds si, [si + 12h] 7769 0 000031E9 89F7 mov di, si 7771 @@: 0 000031EB AC lodsb 0 000031EC 3C20 cmp al, 32 0 000031EE 7412 je @F 0 000031F0 3C09 cmp al, 9 0 000031F2 740E je @F 0 000031F4 3C00 cmp al, 0 0 000031F6 740A je @F 0 000031F8 3C0D cmp al, 13 0 000031FA 7406 je @F 0 000031FC 3C0A cmp al, 10 0 000031FE 7402 je @F 0 00003200 EBE9 jmp @B 7784 7785 @@: 0 00003202 FF74FF push word [si - 1] 0 00003205 56 push si 0 00003206 C644FF00 mov byte [si - 1], 0 0 0000320A 89FE mov si, di 0 0000320C BF[0000] mov di, init_executable_pathname 0 0000320F B460 mov ah, 60h 0 00003211 CD21 int 21h 0 00003213 5E pop si 0 00003214 58 pop ax 0 00003215 8844FF mov byte [si - 1], al 7796 7797 .done: 7798 .unable: 0 00003218 16 push ss 0 00003219 1F pop ds 0 0000321A 16 push ss 0 0000321B 07 pop es 7803 0 0000321C BF[0000] mov di, init_executable_pathname 0 0000321F 31C0 xor ax, ax 0 00003221 B98000 mov cx, 128 0 00003224 F2AE repne scasb 0 00003226 4F dec di 0 00003227 893E[0000] mov word [init_executable_pathname.end], di 7810 %endif 7811 7812 7813 init_hook_interrupts: 7814 %if CATCHINTAMOUNT 7815 ; Set up interrupt vectors. 7816 %if _CATCHINT06 && _DETECT95LX 0 0000322B 8B0E[0000] mov cx, word [inttab_number_variable] 7818 %else 7819 mov cx, inttab_number 7820 %endif 0 0000322F E320 jcxz .intend 0 00003231 BE[0000] mov si, inttab 7823 .intloop: 0 00003234 AC lodsb 0 00003235 B435 mov ah, 35h 0 00003237 CD21 int 21h ; get vector 0 00003239 97 xchg ax, di 0 0000323A AD lodsw 0 0000323B 97 xchg ax, di 7830 %if _DEBUG && !_DEBUG_COND 7831 ; vectors are set only when debuggee runs 7832 %else 7833 %if _DEBUG 0 0000323C F606[0100]01 testopt [internalflags6], dif6_debug_mode 0 00003241 750C jnz @F 7836 %endif 0 00003243 895D02 mov word [ di + ieNext ], bx 0 00003246 8C4504 mov word [ di + ieNext + 2 ], es 7839 ; store it 0 00003249 89FA mov dx, di 0 0000324B B425 mov ah, 25h ; set interrupt vector 0 0000324D CD21 int 21h ; ds => lDEBUG_DATA_ENTRY 7843 @@: 7844 %endif 0 0000324F E2E3 loop .intloop 7846 7847 .intend: 7848 %endif 7849 7850 7851 ; Disabled this. hook2F (debug.asm) now detects this condition. 7852 %if _PM && 0 7853 ; Windows 9x and DosEmu are among those hosts which handle some 7854 ; V86 Ints internally without first calling the interrupt chain. 7855 ; This causes various sorts of troubles and incompatibilities; 7856 ; in our case, hooking interrupt 2Fh would not intercept calls 7857 ; made to the DPMI interface because the host sees them first. 7858 %if _WIN9XSUPP 7859 %if _GUARD_86M_INT2F 7860 push es 7861 xor ax, ax 7862 mov es, ax ; (only used in 86 Mode) 7863 mov ax, [es:2Fh * 4] 7864 cmp ax, -1 7865 je @F ; --> (ZR) 7866 or ax, [es:2Fh * 4 + 2] 7867 @@: 7868 pop es 7869 jz @F 7870 %endif 7871 mov ax, 1600h ; running in a Win9x DOS box? 7872 int 2Fh 7873 cmp al, 4 7874 jge .no2Fhook ; this is intentionally a signed comparison! 7875 @@: 7876 %endif 7877 %if _DOSEMU 7878 testopt [internalflags], runningdosemu 7879 jnz .no2Fhook 7880 %endif 7881 %if _WIN9XSUPP || _DOSEMU 7882 jmp short .dpmihostchecked 7883 .no2Fhook: 7884 clropt [options4], opt4_int_2F_hook 7885 .dpmihostchecked: 7886 %endif 7887 %endif 7888 7889 %if _EXTENSIONS 7890 init_eld_app_dev: 0 00003251 E88F04 call init_eld 7892 %else 7893 push ds 7894 pop es 7895 %endif 7896 7897 set_parent_pra: 7898 ; Save, then modify termination address and parent PSP. 7899 %if _DEVICE && _APPLICATION 0 00003254 F606[0200]40 testopt [internalflags6], dif6_device_mode 0 00003259 7403E94201 jnz final_device 7902 %elif _DEVICE 7903 jmp final_device 7904 %endif 7905 %if _APPLICATION 0 0000325E BE0A00 mov si, TPIV 0 00003261 BF[0000] mov di, psp22 0 00003264 A5 movsw 0 00003265 A5 movsw ; save Int22 0 00003266 BA[0000] mov dx, debug22 0 00003269 8954FC mov word [ si-4 ], dx 0 0000326C 8C5CFE mov word [ si-2 ], ds ; set pspInt22 (required) 0 0000326F BE1600 mov si, 16h 0 00003272 A5 movsw ; save parent 0 00003273 8C5CFE mov word [ si-2 ], ds ; set pspParent 0 00003276 B82225 mov ax, 2522h ; set Int22 0 00003279 CD21 int 21h ; (not really required) 7918 7919 init_app_allocate_reserved: 0 0000327B B80258 mov ax, 5802h ; Get UMB link state 0 0000327E CD21 int 21h 0 00003280 30E4 xor ah, ah 0 00003282 50 push ax ; Save UMB link state 0 00003283 B80058 mov ax, 5800h ; Get allocation strategy 0 00003286 CD21 int 21h 0 00003288 50 push ax ; Save allocation strategy 7927 0 00003289 B80358 mov ax, 5803h ; Set UMB link state: 0 0000328C BB0100 mov bx, 1 ; enabled 0 0000328F CD21 int 21h 0 00003291 B80158 mov ax, 5801h ; Set allocation strategy: 0 00003294 31DB xor bx, bx ; first fit, LMA then UMA 0 00003296 CD21 int 21h 7934 0 00003298 2E8B16[4E0E] mov dx, word [cs:init_switch_r] 7936 .loop: 0 0000329D 31DB xor bx, bx 0 0000329F B448 mov ah, 48h 0 000032A1 CD21 int 21h 0 000032A3 722D jc .done 0 000032A5 8EC0 mov es, ax 0 000032A7 39D0 cmp ax, dx 0 000032A9 7606 jbe .grow 7944 .free: 0 000032AB B449 mov ah, 49h 0 000032AD CD21 int 21h 0 000032AF EB21 jmp .done 7948 7949 .grow: 0 000032B1 50 push ax 0 000032B2 93 xchg bx, ax 0 000032B3 F7DB neg bx 0 000032B5 01D3 add bx, dx ; = dx - bx 0 000032B7 B44A mov ah, 4Ah 0 000032B9 CD21 int 21h ; grow up to desired segment 0 000032BB 58 pop ax ; (if not free grow less) 7957 0 000032BC 85DB test bx, bx 0 000032BE 7501 jnz .nonempty 0 000032C0 48 dec ax ; => MCB (hack into the name field) 7961 .nonempty: 0 000032C1 8EC0 mov es, ax 0 000032C3 26891E0C00 mov word [es:12], bx ; size (0 if in MCB) 0 000032C8 8706[0000] xchg ax, word [next_reserved_segment] ; :12 -> chain 0 000032CC 26A30E00 mov word [es:14], ax ; => next in chain 0 000032D0 EBCB jmp .loop 7967 7968 .done: 0 000032D2 5B pop bx ; saved allocation strategy 0 000032D3 B80158 mov ax, 5801h 0 000032D6 CD21 int 21h ; Set allocation strategy 0 000032D8 5B pop bx ; saved UMB link state 0 000032D9 B80358 mov ax, 5803h 0 000032DC CD21 int 21h ; Set UMB link state 7975 7976 init_app_resize: 7977 ; shrink to required resident size 0 000032DE 1E push ds 0 000032DF 07 pop es 0 000032E0 2EA1[360E] mov ax, word [cs:memsize] 0 000032E4 A3[0000] mov word [alloc_size_not_reserved], ax 0 000032E7 8CD8 mov ax, ds 0 000032E9 2E8B16[4E0E] mov dx, word [cs:init_switch_r] 0 000032EE 8916[0000] mov word [reserved_address], dx 0 000032F2 39D0 cmp ax, dx 0 000032F4 7325 jae @F 0 000032F6 2E8B1E[520E] mov bx, word [cs:init_target_size] 0 000032FB 01D8 add ax, bx 0 000032FD 39D0 cmp ax, dx 0 000032FF 7215 jb .fulltargetsize 0 00003301 8CD8 mov ax, ds 0 00003303 2E0306[360E] add ax, word [cs:memsize] 0 00003308 39D0 cmp ax, dx 0 0000330A 730F jae @F ; no action needed 0 0000330C 89D3 mov bx, dx 0 0000330E 8CD8 mov ax, ds 0 00003310 29C3 sub bx, ax ; grow it up to /R (or less) 0 00003312 B44A mov ah, 4Ah 0 00003314 CD21 int 21h ; get bx = actual size 8000 .fulltargetsize: 0 00003316 2E891E[360E] mov word [cs:memsize], bx 8002 @@: 0 0000331B B44A mov ah, 4Ah 0 0000331D 2E8B1E[360E] mov bx, word [cs:memsize] 0 00003322 891E[0000] mov word [alloc_size], bx 0 00003326 8C1E[0000] mov word [alloc_seg], ds 8007 8008 0 0000332A 2ED006[6D0E] rol byte [cs:init_switch_t], 1 0 0000332F 7209 jc .application_relocate 8011 8012 .application_no_relocate: 0 00003331 BE[0000] mov si, initcont 0 00003334 FF36[0000] push word [code_seg] 0 00003338 56 push si 0 00003339 CB retf 8017 8018 .application_relocate: 0 0000333A 83EC08 sub sp, .relocate_trampoline_size_w * 2 0 0000333D 89E7 mov di, sp ; es:di -> stack space 0 0000333F 0E push cs 0 00003340 1F pop ds 0 00003341 BE[9833] mov si, .relocate_trampoline ; ds:si -> trampoline code 0 00003344 B90400 mov cx, .relocate_trampoline_size_w 0 00003347 57 push di 0 00003348 F3A5 rep movsw ; place trampoline 0 0000334A 5F pop di 8028 0 0000334B BE[0000] mov si, initcont 0 0000334E 36FF36[0000] push word [ss:code_seg] 0 00003353 56 push si ; place our return address 8032 0 00003354 06 push es 0 00003355 53 push bx 0 00003356 50 push ax ; stack for trampoline 8036 0 00003357 B549 mov ch, 49h ; set up to free original block 0 00003359 A1[4A0E] mov ax, word [relocate_source] 0 0000335C 50 push ax ; => source block 0 0000335D 8B16[4E0E] mov dx, word [init_switch_r] 0 00003361 39D0 cmp ax, dx 0 00003363 732A jae @F 0 00003365 2E8B1E[500E] mov bx, word [cs:init_base_size] 0 0000336A 01D8 add ax, bx 0 0000336C 39D0 cmp ax, dx 0 0000336E 7206 jb .fullbasesize 0 00003370 89D3 mov bx, dx 0 00003372 58 pop ax 0 00003373 50 push ax 0 00003374 29C3 sub bx, ax 8051 .fullbasesize: 0 00003376 B54A mov ch, 4Ah ; resize instead 8053 0 00003378 58 pop ax 0 00003379 50 push ax 0 0000337A 85DB test bx, bx 0 0000337C 7501 jnz .nonempty 0 0000337E 48 dec ax ; => MCB (hack into the name field) 8059 .nonempty: 0 0000337F 8EC0 mov es, ax 0 00003381 26891E0C00 mov word [es:12], bx ; size (0 if in MCB) 0 00003386 368706[0000] xchg ax, word [ss:next_reserved_segment]; :12 -> chain 0 0000338B 26A30E00 mov word [es:14], ax ; => next in chain 8064 @@: 0 0000338F 58 pop ax 0 00003390 8EC0 mov es, ax ; => relocate source 0 00003392 91 xchg ax, cx ; ah = 49h or 4Ah 8068 0 00003393 16 push ss 0 00003394 1F pop ds ; reset ds 0 00003395 16 push ss 0 00003396 57 push di ; -> placed trampoline 0 00003397 CB retf ; jump to trampoline 8074 8075 8076 align 2, nop 8077 .relocate_trampoline: 0 00003398 CD21 int 21h ; free original process block 0 0000339A 58 pop ax ; ah = 4Ah 0 0000339B 5B pop bx ; bx = memory size 0 0000339C 07 pop es ; es => new block 8082 ; (we do not really need to resize the block here 8083 ; as it was already allocated the wanted size.) 0 0000339D CA0800 retf .relocate_trampoline_size_w * 2 8085 align 2, nop 8086 endarea .relocate_trampoline 8087 8088 %endif 8089 8090 8091 %if _DEVICE 8092 final_device: 0 000033A0 BE8000 mov si, 80h ; -> command line tail 0 000033A3 89F1 mov cx, si ; = 128 0 000033A5 29CC sub sp, cx ; -> buffer on stack 0 000033A7 89E7 mov di, sp 0 000033A9 F3A4 rep movsb ; preserve it 8098 8099 %if _DEV_ENV_SIZE 0 000033AB FF362C00 push word [2Ch] 8101 %endif 8102 0 000033AF 8CDA mov dx, ds 0 000033B1 B455 mov ah, 55h 0 000033B3 F8 clc 0 000033B4 CD21 int 21h ; create child PSP 8107 0 000033B6 BE0E00 mov si, TPIV + 4 0 000033B9 BA[0000] mov dx, debug22 0 000033BC 8954FC mov word [ si-4 ], dx 0 000033BF 8C5CFE mov word [ si-2 ], ds ; set pspInt22 (required) 8112 %if _DEVICE_SET_2324 0 000033C2 C704[0000] mov word [ si ], devint23 0 000033C6 8C5C02 mov word [ si + 2 ], ds ; set pspInt23 0 000033C9 C74404[0000] mov word [ si + 4 ], devint24 0 000033CE 8C5C06 mov word [ si + 6 ], ds ; set pspInt24 8117 %endif 0 000033D1 BE1800 mov si, 16h + 2 0 000033D4 8C5CFE mov word [ si-2 ], ds ; set pspParent 8120 ; mov ax, 2522h ; set Int22 8121 ; int 21h ; (not really required) 8122 8123 %if _DEV_ENV_SIZE 0 000033D7 8F062C00 pop word [2Ch] 8125 %else 8126 xor ax, ax 8127 mov word [2Ch], ax ; set environment to none 8128 %endif 8129 0 000033DB BB0500 mov bx, 5 ; close file handles past std (5) 0 000033DE 8B0E3200 mov cx, word [32h] ; = number of file handles 0 000033E2 29D9 sub cx, bx ; = number past std handles 0 000033E4 7607 jbe @FF ; if <= 0 handles to close --> 8134 @@: 0 000033E6 B43E mov ah, 3Eh 0 000033E8 CD21 int 21h ; close file handle 0 000033EA 43 inc bx ; next handle 0 000033EB E2F9 loop @B ; loop --> 8139 @@: 8140 0 000033ED 89E6 mov si, sp ; -> buffer on stack 0 000033EF BF8000 mov di, 80h ; -> command line tail buffer in PSP 0 000033F2 89F8 mov ax, di ; = 128 0 000033F4 89F9 mov cx, di ; = 128 0 000033F6 F3A4 rep movsb ; 0 000033F8 01C4 add sp, ax ; discard buffer 8147 0 000033FA BE[0000] mov si, initcont.device 0 000033FD FF36[0000] push word [code_seg] 0 00003401 56 push si 0 00003402 CB retf 8152 %endif 8153 %endif 8154 8155 8156 %assign ELD 0 8157 %assign INTERC3 0 8158 %assign PART1 0 8159 %assign PART2 1 8160 %assign PART3 0 8161 %define init_data_segment cs 8162 8163 %imacro internalcoderelocation 0-*.nolist 8164 %endmacro 8165 %imacro internaldatarelocation 0-*.nolist 8166 %endmacro 8167 %imacro linkdatarelocation 0-*.nolist 8168 %endmacro 8169 %define relocated(address) address 8170 8171 %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 00003403 3C00 cmp al, 0 0 00003405 741D je .return 0 00003407 3C0D cmp al, 13 0 00003409 7419 je .return 0 0000340B 3C3B cmp al, ';' 0 0000340D 7415 je .return 0 0000340F 3C20 cmp al, 32 0 00003411 7411 je .return 0 00003413 3C09 cmp al, 9 0 00003415 740D je .return 0 00003417 3C2C cmp al, ',' 0 00003419 7409 je .return 0 0000341B 3C3D cmp al, '=' 0 0000341D 7405 je .return 0 0000341F 363A06[0000] cmp al, byte [ss:relocated(swch1)] 296 <1> linkdatarelocation swch1 297 <1> .return: 0 00003424 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 00003425 06 push es 0 00003426 51 push cx 313 <1> 0 00003427 06 push es 0 00003428 1F pop ds 0 00003429 89DE mov si, bx ; ds:si -> name 0 0000342B 16 push ss 0 0000342C 07 pop es ; es:di -> where to append name 0 0000342D F3A4 rep movsb ; append the name 0 0000342F 57 push di ; on stack: at initial terminator 0 00003430 BE[7A0E] mov si, imsg.p_extensions 322 <1> internaldatarelocation 323 <1> ; cs:si -> extensions to try 324 <1> .loop: 0 00003433 B000 mov al, 0 0 00003435 AA stosb ; zero-terminate name 0 00003436 B80043 mov ax, 4300h ; get attributes 0 00003439 52 push dx 0 0000343A 16 push ss 0 0000343B 1F pop ds 0 0000343C BA[0000] mov dx, relocated(while_buffer) ; ds:dx -> pathname to try 332 <1> linkdatarelocation while_buffer 0 0000343F F9 stc 334 <1> %if ELD 335 <1> extcallcall _doscall 336 <1> %else 0 00003440 CD21 int 21h ; try to get attributes 338 <1> %endif 0 00003442 7206 jc @F ; not found --> CY 0 00003444 F6C110 test cl, 10h ; directory ? 0 00003447 7401 jz @F ; no --> NC 0 00003449 F9 stc ; yes, handle as not found: CY 343 <1> @@: 0 0000344A 5A pop dx 0 0000344B 731A jnc .ret ; --> (NC) 0 0000344D 84D2 test dl, dl ; had an extension originally ? 0 0000344F 7515 jnz .ret_CY ; yes, do not try to append one --> 0 00003451 2ED006[490E] rol byte [init_data_segment:init_switch_p_guessextension], 1 349 <1> internaldatarelocation 0 00003456 730E jnc .ret_CY ; if no guessing extension --> 0 00003458 5F pop di 0 00003459 57 push di 0 0000345A 2E803C00 cmp byte [init_data_segment:si], 0 354 <1> ; last attempt done ? 0 0000345E 7406 je .ret_CY ; yes --> 0 00003460 2EA5 init_data_segment movsw ; ".C" 0 00003462 2EA5 init_data_segment movsw ; "OM" 0 00003464 EBCD jmp .loop 359 <1> 360 <1> .ret_CY: 0 00003466 F9 stc ; CY 362 <1> .ret: 0 00003467 58 pop ax ; (discard) 0 00003468 59 pop cx 0 00003469 07 pop es 0 0000346A 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 0000346B 85C0 test ax, ax 0 0000346D 7415 jz .notvar 0 0000346F 8ED8 mov ds, ax 0 00003471 31F6 xor si, si 382 <1> 383 <1> @@: 0 00003473 0E push init_data_segment 0 00003474 07 pop es 0 00003475 51 push cx 0 00003476 57 push di 0 00003477 56 push si 0 00003478 F3A6 repe cmpsb 0 0000347A 740A je .foundvar ; --> (NC) 0 0000347C 5E pop si 0 0000347D 5F pop di 0 0000347E 59 pop cx 0 0000347F E80800 call init_nextvar 0 00003482 75EF jnz @B 396 <1> .notvar: 0 00003484 F9 stc 0 00003485 C3 retn 399 <1> 400 <1> .foundvar: 0 00003486 58 pop ax 0 00003487 58 pop ax 0 00003488 58 pop ax 0 00003489 C3 retn 405 <1> 406 <1> 407 <1> init_nextvar: 408 <1> @@: 0 0000348A AC lodsb 0 0000348B 84C0 test al, al 0 0000348D 75FB jnz @B 0 0000348F 803C00 cmp byte [si], 0 0 00003492 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 8172 8173 %undef extcall 8174 %undef extcallcall 8175 %unimacro internalcoderelocation 0-*.nolist 8176 %unimacro internaldatarelocation 0-*.nolist 8177 %unimacro linkdatarelocation 0-*.nolist 8178 %undef relocated 8179 8180 8181 %if _EXTHELP 8182 switch_u: 0 00003493 800E[0000]10 setopt [options], nonpagingdevice 8184 0 00003498 AC lodsb 0 00003499 E8CC00 call init_capitalise 0 0000349C 3C4C cmp al, 'L' 0 0000349E 741B je .license 0 000034A0 3C52 cmp al, 'R' 0 000034A2 7514 jne .both 8191 .revision: 0 000034A4 E80200 call .do_revision 0 000034A7 EB1E jmp .done 8194 8195 .do_revision: 0 000034A9 BB[0000] mov bx, msg.build_array 0 000034AC B9[0000] mov cx, msg.build_short_amount 0 000034AF E81800 call .putsz_spec_multi 0 000034B2 BA[1110] mov dx, imsg.crlf 0 000034B5 E99FE7 jmp init_putsz_cs 8201 8202 .both: 0 000034B8 E8EEFF call .do_revision 8204 .license: 0 000034BB BA[0000] mov dx, msg.license 0 000034BE E81300 call init_transfer_to_putsz_exthelp 0 000034C1 BA[1110] mov dx, imsg.crlf 0 000034C4 E890E7 call init_putsz_cs 8209 .done: 0 000034C7 E951EE jmp commandline.helpterminate 8211 8212 .putsz_spec_multi: 8213 @@: 0 000034CA 8B17 mov dx, word [bx] 0 000034CC E80500 call init_transfer_to_putsz_exthelp 0 000034CF 43 inc bx 0 000034D0 43 inc bx 0 000034D1 E2F7 loop @B 0 000034D3 C3 retn 8220 8221 8222 init_transfer_to_putsz_exthelp: 8223 lframe 0 8224 lpar word, in_ip_out_far_cs 8225 ; near call ip 8226 lpar word, in_ax_out_far_ip 0 000034D4 50 push ax ; push into ?in_ax_out_far_ip 8228 lpar word, out_near_ip 0 000034D5 B8[0000] mov ax, code_retf 0 000034D8 50 push ax ; push into ?out_near_ip 8231 lpar dword, destination 0 000034D9 FF36[0000] push word [code_seg] ; push into ?destination + 2 0 000034DD B8[0000] mov ax, putsz_exthelp 0 000034E0 50 push ax ; push into ?destination + 0 0 000034E1 5589E5 lenter 0 000034E4 8CC8 mov ax, cs ; = cs 0 000034E6 87460A xchg ax, word [bp + ?in_ip_out_far_cs] 8238 ; ax = ip, var = cs 0 000034E9 874608 xchg ax, word [bp + ?in_ax_out_far_ip] 8240 ; ax = ax, var = ip 0 000034EC 5D lleave 0 000034ED CB retf 8243 %endif 8244 8245 8246 %if _CONFIG 8247 ; INP: ax => environment, zero if none 8248 ; cs:di -> variable name, including '=' terminator 8249 ; cx = variable name length, including '=' terminator 8250 ; ss:dx -> buffer to write to, 256 bytes 8251 ; OUT: es = ds = ss 8252 ; CY if not found 8253 ; NC if found, 8254 ; buffer filled 8255 init_copyvar: 0 000034EE E87AFF call init_findvar 0 000034F1 721A jc .endvar 8258 8259 .foundvar: 0 000034F3 1E push ds 0 000034F4 07 pop es 0 000034F5 89F7 mov di, si 0 000034F7 B000 mov al, 0 0 000034F9 B9FF00 mov cx, 255 0 000034FC F2AE repne scasb 8266 0 000034FE 29F7 sub di, si 0 00003500 4F dec di 0 00003501 89F9 mov cx, di 8270 0 00003503 16 push ss 0 00003504 07 pop es 0 00003505 89D7 mov di, dx 0 00003507 F3A4 rep movsb 0 00003509 B000 mov al, 0 0 0000350B AA stosb 0 0000350C F8 clc 8278 8279 .endvar: 0 0000350D 16 push ss 0 0000350E 1F pop ds 0 0000350F 16 push ss 0 00003510 07 pop es 0 00003511 C3 retn 8285 %endif 8286 8287 8288 %assign ELD 0 8289 %define PREFIX init_ 8290 %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 00003512 56 push si 0 00003513 87D7 xchg dx, di 35 <1> .loop: 0 00003515 AC lodsb 0 00003516 E84F00 call %[PREFIX]capitalise 0 00003519 AE scasb 0 0000351A 7506 jne .mismatch 0 0000351C 84C0 test al, al ; NC 0 0000351E 75F5 jne .loop 42 <1> ; ZR 0 00003520 EB40 jmp .matched_zr_nc 44 <1> 45 <1> .mismatch: 0 00003522 E84E00 call %[PREFIX]iseol? 0 00003525 7434 je .checkend 0 00003527 3C20 cmp al, 32 0 00003529 7430 je .checkend 0 0000352B 3C09 cmp al, 9 0 0000352D 742C je .checkend 0 0000352F 3C2E cmp al, '.' 0 00003531 7428 je .checkend 0 00003533 3C2C cmp al, ',' 0 00003535 7424 je .checkend 0 00003537 3C3D cmp al, '=' 0 00003539 7420 je .checkend 0 0000353B 3C3A cmp al, ':' 0 0000353D 741C je .checkend 0 0000353F 3C5B cmp al, '[' 0 00003541 7418 je .checkend 0 00003543 3C5D cmp al, ']' 0 00003545 7414 je .checkend 0 00003547 3C28 cmp al, '(' 0 00003549 7410 je .checkend 0 0000354B 3C29 cmp al, ')' 0 0000354D 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 0000354F 363A06[0000] cmp al, byte [ss:swch1] 74 <1> %endif 0 00003554 7405 je .checkend 76 <1> %endif 77 <1> .ret_nz: ; NZ 0 00003556 5E pop si 0 00003557 F9 stc ; CY 80 <1> .ret: 0 00003558 87D7 xchg dx, di 0 0000355A C3 retn 83 <1> 84 <1> .checkend: 0 0000355B 26807DFF00 cmp byte [es:di - 1], 0 0 00003560 75F4 jne .ret_nz 87 <1> ; ZR, NC 88 <1> .matched_zr_nc: ; ZR, NC 0 00003562 5F pop di ; (discard) 0 00003563 8D74FF lea si, [si - 1] ; -> separator (preserve ZR) 0 00003566 EBF0 jmp .ret 92 <1> 93 <1> 94 <1> %[PREFIX]capitalise: section_of_function 0 00003568 3C61 cmp al, 'a' 0 0000356A 7206 jb .ret 0 0000356C 3C7A cmp al, 'z' 0 0000356E 7702 ja .ret 0 00003570 24DF and al, TOUPPER 100 <1> .ret: 0 00003572 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 00003573 3C3B cmp al, ';' 0 00003575 7406 je .ret 119 <1> .notsemicolon: 0 00003577 3C0D cmp al, 13 ; this *IS* iseol? 0 00003579 7402 je .ret 0 0000357B 3C00 cmp al, 0 123 <1> .ret: 0 0000357D 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 0000357E 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 0000357F E82C00 call %[PREFIX]skipwh0 0 00003582 3C2C cmp al, ',' 0 00003584 7510 jne .return ; if no comma 0 00003586 56 push si 0 00003587 E82300 call %[PREFIX]skipwhite 0 0000358A E8E6FF call %[PREFIX]iseol? 0 0000358D 7504 jne .noteol ; if not end of line 0 0000358F 5E pop si 0 00003590 B02C mov al, ',' 0 00003592 C3 retn 149 <1> .noteol: 0 00003593 83C402 add sp, byte 2 ; pop si into nowhere 151 <1> .return: 0 00003596 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 00003597 AC lodsb 158 <1> %[PREFIX]skipequ0: 0 00003598 E81300 call %[PREFIX]skipwh0 0 0000359B 3C3D cmp al, '=' 0 0000359D 7503 jne .return 0 0000359F E80B00 call %[PREFIX]skipwhite 163 <1> .return: 0 000035A2 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 000035A3 AC lodsb 0 000035A4 24DF and al, TOUPPER 0 000035A6 2C41 sub al, 'A' 0 000035A8 3C19 cmp al, 'Z'-'A' 0 000035AA 76F7 jbe . 0 000035AC 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 000035AD 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 000035AE 3C20 cmp al, 32 0 000035B0 74FB je %[PREFIX]skipwhite 0 000035B2 3C09 cmp al, 9 0 000035B4 74F7 je %[PREFIX]skipwhite 0 000035B6 F8 clc 0 000035B7 C3 retn 8291 8292 8293 ; INP: bx => destination for auxbuff 8294 ; (The following are not actually used by this function, 8295 ; they're just what is passed in and preserved to 8296 ; be used by the caller after returning.) 8297 ; dx => destination for code image 8298 ; (if boot-loaded:) cx => destination for pseudo-PSP 8299 ; (implies cx+10h => destination for data_entry) 8300 ; ax => segment for history buffer 8301 8302 init_app_layout_1: 8303 %if 0 8304 mov bx, ds 8305 mov dx, bx 8306 add bx, paras(AUXTARGET1) 8307 add dx, paras(CODETARGET1) 8308 %if _HISTORY_SEPARATE_FIXED && _HISTORY 8309 mov ax, bx 8310 add ax, paras(auxbuff_size) 8311 %if AUXTARGET1_equate <= CODETARGET1_equate 8312 ... 8313 %endif 8314 %endif 8315 mov cx, dx 8316 %endif 8317 8318 ; REM: Only history segment and extsegment are behind auxbuff. 8319 %if _EXTENSIONS || _HISTORY_SEPARATE_FIXED && _HISTORY || _DEV_ENV_SIZE || _APP_ENV_SIZE 8321 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 000035B8 A1[0000] mov ax, word [history.segorsel + soaSegSel] 8323 ; => history segment 8324 %elif (_DEV_ENV_SIZE || _APP_ENV_SIZE) && _EXTENSIONS 8325 mov ax, word [envseg] 8326 test ax, ax 8327 jnz @F 8328 mov ax, word [extseg] 8329 @@: 8330 %elif (_DEV_ENV_SIZE || _APP_ENV_SIZE) 8331 mov ax, word [envseg] 8332 ; if here then no history segment and no ext segment, 8333 ; so we do not want to copy anything if envseg unused. 8334 ; in this case hope that mem_envsize is 0 so the movp 8335 ; call below is a no-op. 8336 ; better fix: just include a check for zero here. 8337 test ax, ax 8338 jz .skip_env_reloc 8339 %elif _EXTENSIONS 8340 mov ax, word [extseg] 8341 %else 8342 %error Unexpected condition 8343 %endif 0 000035BB 89C2 mov dx, ax 0 000035BD 01F2 add dx, si 0 000035BF B90004 mov cx, paras(historysegment_size + extsegment_size) 8347 ; This runs before init_change_history_size 8348 ; and init_change_ext_size. 8349 %if (_DEV_ENV_SIZE || _APP_ENV_SIZE) 0 000035C2 2E030E[380E] add cx, word [cs:mem_envsize] 8351 %endif 0 000035C7 E8FCE5 call init_movp 8353 .skip_env_reloc: 8354 init_app_layout_common: 8355 %if _HISTORY_SEPARATE_FIXED && _HISTORY 0 000035CA 0136[0000] add word [history.segorsel + soaSegSel], si 8357 %if _PM 0 000035CE 0136[0200] add word [history.segorsel + soaSegment], si 8359 %endif 8360 %endif 8361 %if _EXTENSIONS 0 000035D2 0136[0000] add word [extseg], si 8363 %endif 8364 %if (_DEV_ENV_SIZE || _APP_ENV_SIZE) 0 000035D6 2ED006[710E] rol byte [cs:app_env_allocation], 1 0 000035DB 7204 jc @F 0 000035DD 01362C00 add word [2Ch], si 8368 @@: 0 000035E1 833E[0000]00 cmp word [envseg], 0 0 000035E6 7404 je @F 0 000035E8 0136[0000] add word [envseg], si 8372 @@: 8373 %endif 8374 %else 8375 init_app_layout_common: 8376 %endif 0 000035EC 2E0136[360E] add word [cs:memsize], si 0 000035F1 8E06[0000] mov es, word [auxbuff_segorsel + soaSegSel] 0 000035F5 BF1020 mov di, fromwords(words(_AUXBUFFSIZE)) 0 000035F8 89F1 mov cx, si ; = amount paragraphs added 0 000035FA D1E1 shl cx, 1 ; = amount qwords 0 000035FC D1E1 shl cx, 1 ; = amount dwords 0 000035FE D1E1 shl cx, 1 ; = amount words 0 00003600 31C0 xor ax, ax 0 00003602 F3AB rep stosw ; initialise auxbuff trail 0 00003604 F8 clc 0 00003605 C3 retn 8388 8389 8390 init_app_layout_2: 8391 %if 0 8392 mov bx, ds 8393 mov dx, bx 8394 add bx, paras(AUXTARGET2) 8395 add dx, paras(CODETARGET2) 8396 %if _HISTORY_SEPARATE_FIXED && _HISTORY 8397 %if (paras(AUXTARGET1_equate) + paras(auxbuff_size_equate)) != (paras(CODETARGET2_equate) + paras(ldebug_codes_truncated_size_equate)) 8399 ... 8400 %endif 8401 %endif 8402 %endif 8403 8404 ; REM: Code1/code2 and history segment are behind auxbuff. 0 00003606 A1[0000] mov ax, word [code_seg] 0 00003609 89C2 mov dx, ax 0 0000360B 01F2 add dx, si 8408 %ifn _LINK 8409 mov cx, ldebug_code_bootldr_truncated_size_p + ldebug_code2_size_p + paras(historysegment_size) + paras(extsegment_size) 8413 %else 0 0000360D B9[0004] mov cx, relocatedzero + 0 + paras(historysegment_size) + paras(extsegment_size) 8417 wlcalc word_wrt_@@lDEBUG_CODE@_extpara_behind_code_truncated, equ $ - 2 8418 wlcalc word_wrt_@@lDEBUG_CODE2@_extpara_behind_code2, equ $ - 2 8419 %endif 8420 8421 ; This runs before init_change_history_size 8422 ; and init_change_ext_size. 8423 %if (_DEV_ENV_SIZE || _APP_ENV_SIZE) 0 00003610 2E030E[380E] add cx, word [cs:mem_envsize] 8425 %endif 0 00003615 E8AEE5 call init_movp 8427 0 00003618 8EC2 mov es, dx 0 0000361A 0136[0000] add word [code_seg], si 8430 %if _DUALCODE 0 0000361E 0136[0000] add word [code2_seg], si 0 00003622 8B16[0000] mov dx, word [code2_seg] 8433 repatch_relocate: 0 00003626 56 push si 8435 %if ! _PM 8436 mov si, relocate_from_code 8437 mov di, relocate_from_code.end 8438 call .patch 8439 mov si, relocate_from_code2 8440 mov di, relocate_from_code2.end 8441 %endif 0 00003627 06 push es 0 00003628 8EC2 mov es, dx 0 0000362A 5A pop dx 8445 %if ! _PM 8446 call .patch 8447 jmp .done 8448 8449 .loop: 8450 cs lodsw 8451 xchg bx, ax 8452 mov word [es:bx], dx 8453 .patch: 8454 cmp si, di 8455 jb .loop 8456 retn 8457 8458 .done: 8459 %endif 0 0000362B 5E pop si 8461 %endif 8462 8463 %if _AREAS && _AREAS_HOOK_CLIENT 0 0000362C 89F0 mov ax, si 0 0000362E E83600 call add_to_areas_linear_code1 8466 %if _DUALCODE && _EXPRDUALCODE 0 00003631 89F0 mov ax, si 0 00003633 E85D00 call add_to_areas_linear_code2 8469 %endif 8470 %endif 8471 0 00003636 EB92 jmp init_app_layout_common 8473 8474 8475 ; REM: Only history segment is behind auxbuff. 8476 init_app_layout_3: equ init_app_layout_1 8477 %if 0 8478 ; If both prior attempts failed, we allocate 8479 ; an additional 8 KiB and move the buffer to 8480 ; that. This should always succeed. 8481 mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 8484 ; enlarge the final memory block size 8485 8486 mov bx, ds 8487 add bx, paras(AUXTARGET3) 8488 mov dx, cx 8489 %if _HISTORY_SEPARATE_FIXED && _HISTORY 8490 mov ax, bx 8491 add ax, paras(auxbuff_size) 8492 %endif 8493 %endif 8494 8495 8496 %if _DEVICE 8497 init_dev_layout_1: 8498 %if 0 8499 mov bx, ds 8500 add bx, paras(DEVICEADJUST) 8501 mov dx, bx 8502 add bx, paras(AUXTARGET1) 8503 add dx, paras(CODETARGET1) 8504 %if _HISTORY_SEPARATE_FIXED && _HISTORY 8505 mov ax, bx 8506 add ax, paras(auxbuff_size) 8507 %endif 8508 mov cx, dx 8509 %endif 0 00003638 E87DFF call init_app_layout_1 0 0000363B EB08 jmp init_dev_layout_common 8512 8513 8514 init_dev_layout_2: 8515 %if 0 8516 mov bx, ds 8517 add bx, paras(DEVICEADJUST) 8518 mov dx, bx 8519 add bx, paras(AUXTARGET2) 8520 add dx, paras(CODETARGET2) 8521 %endif 0 0000363D E8C6FF call init_app_layout_2 0 00003640 EB03 jmp init_dev_layout_common 8524 8525 8526 init_dev_layout_3: 8527 %if 0 8528 mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 8531 ; enlarge the final memory block size 8532 8533 mov bx, ds 8534 add bx, paras(DEVICEADJUST) 8535 add bx, paras(AUXTARGET3) 8536 mov dx, cx 8537 %if _HISTORY_SEPARATE_FIXED && _HISTORY 8538 mov ax, bx 8539 add ax, paras(auxbuff_size) 8540 %endif 8541 %endif 8542 0 00003642 E873FF call init_app_layout_3 8544 init_dev_layout_common: 0 00003645 0136[0000] add word [device_mcb_paragraphs], si 8546 ; fix our variable 0 00003649 0136[0000] add word [alloc_size], si ; this one too 0 0000364D 8CD8 mov ax, ds ; => PSP 0 0000364F 2E0306[360E] add ax, word [cs:memsize] ; => where to place container sig 0 00003654 E817D5 call init_dev_place_container_signature 8551 ; CHG: es, di, cx, si 8552 ; ax => behind memory used for device 0 00003657 8E06[0000] mov es, word [reg_es] 0 0000365B 8B1E[0000] mov bx, word [reg_ebx] ; -> device request header 0 0000365F 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 0 00003663 F8 clc 0 00003664 C3 retn 8558 %endif 8559 8560 8561 init_layout_none: 0 00003665 F9 stc 0 00003666 C3 retn 8564 8565 8566 %if _AREAS && _AREAS_HOOK_CLIENT 8567 add_to_areas_linear_code1: 0 00003667 31D2 xor dx, dx 8569 .dxax: 0 00003669 B90400 mov cx, 4 8571 @@: 0 0000366C D1E0 shl ax, 1 0 0000366E D1D2 rcl dx, 1 0 00003670 E2FA loop @B 8575 0 00003672 0106[0000] add word [areas_sub + areastrucsubLinear], ax 0 00003676 1116[0200] adc word [areas_sub + areastrucsubLinear + 2], dx 0 0000367A 0106[0400] add word [areas_sub + areastrucsubLinearEnd], ax 0 0000367E 1116[0600] adc word [areas_sub + areastrucsubLinearEnd + 2], dx 8580 0 00003682 0106[0000] add word [areas_fun + areastrucfunLinear], ax 0 00003686 1116[0200] adc word [areas_fun + areastrucfunLinear + 2], dx 0 0000368A 0106[0400] add word [areas_fun + areastrucfunLinearEnd], ax 0 0000368E 1116[0600] adc word [areas_fun + areastrucfunLinearEnd + 2], dx 0 00003692 C3 retn 8586 8587 %if _DUALCODE && _EXPRDUALCODE 8588 add_to_areas_linear_code2: 0 00003693 31D2 xor dx, dx 8590 .dxax: 0 00003695 B90400 mov cx, 4 8592 @@: 0 00003698 D1E0 shl ax, 1 0 0000369A D1D2 rcl dx, 1 0 0000369C E2FA loop @B 8596 0 0000369E 0106[0C00] add word [areas_sub + AREASTRUCSUB_size + areastrucsubLinear], ax 0 000036A2 1116[0E00] adc word [areas_sub + AREASTRUCSUB_size + areastrucsubLinear + 2], dx 0 000036A6 0106[1000] add word [areas_sub + AREASTRUCSUB_size + areastrucsubLinearEnd], ax 0 000036AA 1116[1200] adc word [areas_sub + AREASTRUCSUB_size + areastrucsubLinearEnd + 2], dx 0 000036AE C3 retn 8602 %endif 8603 %endif 8604 8605 8606 %if _CONFIG 8607 do_truename: 8608 .: 0 000036AF 16 push ss 0 000036B0 1F pop ds 0 000036B1 89D6 mov si, dx ; ds:si -> source 0 000036B3 16 push ss 0 000036B4 07 pop es 0 000036B5 89D7 mov di, dx ; es:di -> destination (same) 0 000036B7 B460 mov ah, 60h 0 000036B9 CD21 int 21h 0 000036BB 7309 jnc .done 0 000036BD 803C00 cmp byte [si], 0 ; empty ? (kernel rejects this) 0 000036C0 C7042E00 mov word [si], "." ; make a dot + NUL (current directory) 0 000036C4 74E9 je . ; if expected failure then repeat --> 8621 8622 .done: 0 000036C6 B000 mov al, 0 0 000036C8 B98000 mov cx, 128 0 000036CB F2AE repne scasb ; scan for NUL 0 000036CD 4F dec di ; -> at the NUL 8627 8628 @@: 0 000036CE 39F7 cmp di, si 0 000036D0 760C jbe @F 0 000036D2 807DFF2F cmp byte [di - 1], '/' 0 000036D6 740A je @FF 0 000036D8 807DFF5C cmp byte [di - 1], '\' 0 000036DC 7404 je @FF 8635 @@: 0 000036DE C6055C mov byte [di], '\' 0 000036E1 47 inc di 8638 @@: 0 000036E2 C3 retn 8640 %endif 8641 8642 8643 %if _EXTENSIONS 8644 init_eld: 0 000036E3 16 push ss 0 000036E4 1F pop ds 8647 8648 numdef ELD_DEBUG_LINKCALL_NONZERO, 0, 32 8649 %if _ELD_DEBUG_LINKCALL_NONZERO 8650 %if _ELD_DEBUG_LINKCALL_NONZERO & 15 8651 %error Invalid size 8652 %endif 8653 %if _ELD_DEBUG_LINKCALL_NONZERO < 32 8654 %error Invalid size 8655 %endif 8656 %if _ELD_DEBUG_LINKCALL_NONZERO > 65520 8657 %error Invalid size 8658 %endif 8659 mov ax, word [extseg_size] 8660 mov di, word [extseg_used] 8661 sub ax, di ; = amount free space 8662 jc @F 8663 mov cx, _ELD_DEBUG_LINKCALL_NONZERO 8664 cmp ax, cx 8665 jb @F 8666 mov es, word [extseg] ; es:di -> where to place ELD instance 8667 xor ax, ax 8668 push di 8669 shr cx, 1 ; = amount words 8670 rep stosw ; zero 8671 mov word [extseg_used], di ; -> behind ELD 8672 xchg ax, di ; ax -> behind ELD 8673 pop di 8674 mov word [es:di + eldiStartCode], di 8675 mov word [es:di + eldiEndCode], ax 8676 mov ax, "--" 8677 mov cl, 4 8678 add di, eldiIdentifier 8679 rep stosw 8680 8681 @@: 8682 %endif 8683 0 000036E5 A1[0000] mov ax, word [extseg_size] 0 000036E8 8B3E[0000] mov di, word [extseg_used] 0 000036EC 29F8 sub ax, di ; = amount free space 0 000036EE 724B jc .ret 0 000036F0 3D8000 cmp ax, eld_linkcall_size ; enough ? 0 000036F3 7246 jb .ret 0 000036F5 89F8 mov ax, di ; -> where to install this ELD 0 000036F7 8E06[0000] mov es, word [extseg] ; es:di -> where to place ELD instance 0 000036FB 0E push cs 0 000036FC 1F pop ds ; ! ds no longer equals ss 0 000036FD BE[B20D] mov si, eld_linkcall + 2 ; ds:si -> ELD source plus one word 0 00003700 B93E00 mov cx, eld_linkcall_size_w - 2 ; cx = length less two words 0 00003703 AB stosw ; init eldiStartCode 0 00003704 A5 movsw 0 00003705 260145FE add word [es:di - 2], ax ; init eldiEndCode 0 00003709 F3A5 rep movsw ; write our ELD 0 0000370B 16 push ss 0 0000370C 1F pop ds 0 0000370D 893E[0000] mov word [extseg_used], di ; -> behind ELD 0 00003711 83C018 add ax, eld_linkcall.to_code1 - eld_linkcall 0 00003714 A3[0000] mov word [linkcall_table.code1], ax 8705 %if _DUALCODE 0 00003717 83C005 add ax, eld_linkcall.to_code2 - eld_linkcall.to_code1 0 0000371A A3[0000] mov word [linkcall_table.code2], ax 0 0000371D 83C0F6 add ax, eld_linkcall.to_entry - eld_linkcall.to_code2 8709 %else 8710 add ax, eld_linkcall.to_entry - eld_linkcall.to_code1 8711 %endif 0 00003720 A3[0000] mov word [linkcall_table.entry], ax 0 00003723 83C014 add ax, eld_linkcall.to_dualcode1 - eld_linkcall.to_entry 0 00003726 A3[0000] mov word [linkcall_table.dualcode1], ax 8715 %if _DUALCODE 0 00003729 83C005 add ax, eld_linkcall.to_dualcode2 - eld_linkcall.to_dualcode1 0 0000372C A3[0000] mov word [linkcall_table.dualcode2], ax 0 0000372F 83C0F6 add ax, eld_linkcall.to_dualentry - eld_linkcall.to_dualcode2 8719 %else 8720 add ax, eld_linkcall.to_dualentry - eld_linkcall.to_dualcode1 8721 %endif 0 00003732 A3[0000] mov word [linkcall_table.dualentry], ax 0 00003735 C706[0000]0100 mov word [linkcall_table.init], 1 8724 .ret: 0 0000373B 16 push ss 0 0000373C 1F pop ds 0 0000373D 16 push ss 0 0000373E 07 pop es 0 0000373F C3 retn 8730 %endif 8731 8732 %if !_LINK && _LINK_COMPAT 8733 %ifn _ONLY386 || _ONLYNON386 8734 align 2, db 0 8735 ; Table of patches that are to be set NOP if running on a 386. 8736 writepatchtable patch_386_table, PATCH_386_TABLE 8737 %undef PATCH_386_TABLE 8738 8739 align 2, db 0 ; align on word boundary 8740 ; Table of patches that are to be set NOP if not running on a 386. 8741 writepatchtable patch_no386_table, PATCH_NO386_TABLE 8742 %undef PATCH_NO386_TABLE 8743 8744 %if _DUALCODE 8745 align 2, db 0 8746 ; Table of patches that are to be set NOP if running on a 386. 8747 writepatchtable patch_386_table2, PATCH_386_TABLE2 8748 %undef PATCH_386_TABLE2 8749 8750 align 2, db 0 ; align on word boundary 8751 ; Table of patches that are to be set NOP if not running on a 386. 8752 writepatchtable patch_no386_table2, PATCH_NO386_TABLE2 8753 %undef PATCH_NO386_TABLE2 8754 %else 8755 %assign __patch_no386_table2_method 0 8756 %assign __patch_386_table2_method 0 8757 %endif 8758 8759 align 2, db 0 8760 ; Table of patches that are to be set NOP if running on a 386. 8761 writepatchtable patch_386_tableentry, PATCH_386_TABLEENTRY 8762 %undef PATCH_386_TABLEENTRY 8763 8764 align 2, db 0 ; align on word boundary 8765 ; Table of patches that are to be set NOP if not running on a 386. 8766 writepatchtable patch_no386_tableentry, PATCH_NO386_TABLEENTRY 8767 %undef PATCH_NO386_TABLEENTRY 8768 %endif 8769 8770 %if _DUALCODE && ! _PM 8771 align 2, db 0 8772 relocate_from_code: 8773 dw PATCH_RELOCATE_FROM_lDEBUG_CODE 8774 .end: 8775 align 2, db 0 8776 relocate_from_code2: 8777 dw PATCH_RELOCATE_FROM_lDEBUG_CODE2 8778 .end: 8779 8780 %unimacro dualcall 1.nolist 8781 ; make sure we do not allow later uses 8782 %endif 8783 %endif