1 2 %if 0 3 4 lDebug - libre 86-DOS debugger 5 6 Copyright (C) 1995-2003 Paul Vojta 7 Copyright (C) 2008-2021 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 [list -] 14 <3> [list -] 14 <2> [list -] 26 <1> [list -] 28 <1> [list -] 101 [list +] 102 103 %ifndef _MAP 104 %elifempty _MAP 105 %else ; defined non-empty, str or non-str 106 [map all _MAP] 107 %endif 108 109 %if _ONLY386 110 cpu 386 111 %else 112 cpu 8086 113 %endif 114 org 100h 115 addsection lDEBUG_DATA_ENTRY, align=16 start=100h 116 data_entry_start: 117 %define DATASECTIONFIXUP -data_entry_start+100h 118 _CURRENT_SECTION %+ _start: 119 %xdefine %[_CURRENT_SECTION %+ FIXUP] - _CURRENT_SECTION %+ _start+100h 120 121 addsection ASMTABLE1, align=16 follows=lDEBUG_DATA_ENTRY 122 addsection ASMTABLE2, align=16 follows=ASMTABLE1 123 addsection MESSAGESEGMENT, align=16 follows=ASMTABLE2 vstart=0 124 messagesegment_start: 125 addsection lDEBUG_CODE, align=16 follows=MESSAGESEGMENT vstart=0 126 code_start: 127 %define CODESECTIONFIXUP -code_start+0 128 _CURRENT_SECTION %+ _start: 129 %xdefine %[_CURRENT_SECTION %+ FIXUP] - _CURRENT_SECTION %+ _start+0 130 addsection lDEBUG_CODE2, align=16 follows=lDEBUG_CODE vstart=0 131 code2_start: 132 %define CODE2SECTIONFIXUP -code2_start+0 133 _CURRENT_SECTION %+ _start: 134 %xdefine %[_CURRENT_SECTION %+ FIXUP] - _CURRENT_SECTION %+ _start+0 135 136 addsection DATASTACK, align=16 follows=ASMTABLE2 nobits 137 addsection INIT, align=16 follows=lDEBUG_CODE2 vstart=0 138 %if _DEVICE 139 addsection DEVICESHIM, align=16 follows=INIT vstart=0 140 %endif 141 addsection RELOCATEDZERO, vstart=0 nobits 142 relocatedzero: 143 144 145 usesection lDEBUG_CODE 146 section_of dohack, getsegmented, hexbyte, hexnyb, iseol?.notsemicolon 147 section_of peekc, getc, prephack, readmem, setds2si, setes2dx 148 section_of silence_get_start, silence_get_start.have_di, silence_count_zeroes 149 section_of setrmlimit, skipcomm0, unhack 150 section_of to_errret_pop 151 section_of cmd3.have_cx_convenience 152 section_of verifysegm, verifysegm_or_error 153 section_of pp16, resetmode, resetmode_and_test_d_b_bit 154 section_of pp_fix32bitflags, proceedbreakpoint 155 section_of putsz, hexword, skipcomma, cmd3 156 section_of traceone, unexpectedinterrupt, dumpregs_no_disasm 157 section_of aa_imm_entry, ia_restore_a_addr, ia_restore_u_addr, disasm 158 section_of ia_restore_ds 159 %ifn _SYMBOLIC 160 section_of selector_to_segment 161 %endif 162 section_of disp_al, disp_al_hex, disp_al_nybble_hex, disp_ax_dec, disp_ax_hex 163 section_of disp_dxax_times_cx_width_bx_size 164 section_of disp_message, disp_message_length_cx 165 section_of ispm 166 section_of setrc, error 167 section_of _doscall, _doscall_return_es, _doscall_return_es_parameter_es_ds 168 169 section_of InDOS, bootgetmemorysize 170 section_of chkeol, decword, decdword 171 section_of getexpression.lit_isdigit?, getexpression.lit_ishexdigit? 172 section_of getlinearaddr 173 section_of getlinear_d_b 174 section_of getlinear_high_limit 175 section_of getlinear_32bit 176 section_of getlinear_high_limit.do_not_use_test 177 section_of getlinear_common 178 section_of ifsep, iseol?, isseparator?, isstring?, movp 179 section_of putc, putsline, putsline_crlf, putsz_error 180 section_of setrmsegm 181 section_of skipwh0, skipwhite 182 section_of test_d_b_bit, test_high_limit, push_cxdx_or_edx 183 section_of uppercase 184 section_of setes2ax 185 section_of zz_copy_strings_to_str_buffer 186 section_of call_xms_move, zz_call_xms, zz_detect_xms 187 188 %if _SYMBOLIC && _DUALCODE && _SYMBOLASMDUALCODE 189 usesection lDEBUG_CODE2 190 %else 191 usesection lDEBUG_CODE 192 %endif 193 section_of bxcx_to_cx_paragraphs 194 section_of zz_list_symbol.first, zz_list_symbol.subsequent 195 section_of zz_xms_to_86mm, zz_xms_try_free, zz_xms_try_free_handle 196 section_of zz_86mm_to_xms, zz_del_match.add_poison_entrypoint 197 section_of zz_free_nonxms, zz_free_xms, zz_free_reset, zz_free_dos 198 section_of zz_get_literal, zz_restore_strat, zz_save_strat 199 section_of zz_switch_s, zz_transfer_buffer 200 201 202 %if _SYMBOLIC 203 %if _DUALCODE && _SYMBOLICDUALCODE 204 usesection lDEBUG_CODE2 205 %else 206 usesection lDEBUG_CODE 207 %endif 208 section_of shift_left_4_bxcx 209 section_of selector_to_segment 210 211 section_of anti_normalise_pointer_with_displacement_bxcx, displaystring 212 section_of getfarpointer.hash, getfarpointer.main, getfarpointer.str 213 section_of move_delete_farpointer.hash, move_delete_farpointer.hash.sidi 214 section_of move_delete_farpointer.main, move_delete_farpointer.str.sidi 215 section_of move_insert_farpointer.hash, move_insert_farpointer.hash.sidi 216 section_of move_insert_farpointer.main, move_insert_farpointer.main.sidi 217 section_of move_insert_farpointer.str.sidi 218 section_of normalise_pointer, normalise_pointer_with_displacement_bxcx 219 section_of pointer_to_linear 220 section_of save_slice_farpointer.hash, save_slice_farpointer.main 221 section_of save_slice_farpointer.str 222 section_of segment_to_selector 223 section_of zz_insert, zz_match_symbol, zz_match_symbol.continue, zz_relocate 224 225 section_of binsearchhash, binsearchmain 226 section_of check_second_slice 227 section_of disp_size_hash, disp_size_main, disp_size_str 228 section_of displayresult, getstring1, getstring2 229 section_of increment_ss_ref_count 230 section_of list_sym_storage_usage, str_index_to_pointer 231 section_of zz_commit_insert, zz_compact, zz_compact_expand_check_nonxms 232 section_of zz_compact_expand_check_xms 233 section_of zz_delete_hash, zz_delete_main, zz_delete_main_and_its_hash 234 section_of zz_delete_string, zz_expand, zz_expand_common 235 section_of zz_get_symstr_length_bytes 236 section_of zz_get_symstr_length_bytes.ssLength_in_cx 237 section_of zz_get_symstr_length_indices 238 section_of zz_get_symstr_length_indices.ssLength_in_cx 239 section_of zz_hash, zz_hash.bx_init 240 section_of zz_insert_main.linklist, zz_reloc_main, zz_reloc_str 241 section_of zz_store_pre_str, zz_store_string, zz_store_string.hash_bx 242 section_of zz_unlink_main_next 243 %endif 244 245 %if _DUALCODE 246 usesection lDEBUG_CODE2 247 %else 248 usesection lDEBUG_CODE 249 %endif 250 section_of FloatToStr 251 252 253 %if _DUALCODE && _EXPRDUALCODE 254 usesection lDEBUG_CODE2 255 %else 256 usesection lDEBUG_CODE 257 %endif 258 259 section_of getofsforbx, checkpointer, getrangeX 260 section_of getrangeX_have_address_need_length 261 section_of getrange, getaddr, getofsforbx_remember_bitness 262 section_of remember_bitness, ga_nottaken, ga_taken 263 section_of getstr, get_length, get_length_keyword 264 section_of isbracketorunaryoperator?, isunaryoperator?, isoperator? 265 section_of isseparator?, istype?, isunsignedtype? 266 section_of handlesegment, handle3byte, handlebyte, handleword 267 section_of handledword, handlepointer 268 section_of uoh_abs, uoh_minus, calculate_minus_bxdx, uoh_plus 269 section_of uoh_not_bitwise, uoh_not_boolean 270 section_of od_minus, od_plus, od_multiply, od_divide, od_modulo 271 section_of od_above, od_below, od_equal, od_not, od_or, od_and, od_xor 272 section_of od_cond, od_o, od_a, od_x, od_c, od_string_common 273 section_of of_modulo, of_minus, of_plus, or_hhtype, of_multiply 274 section_of set_hhtype, of_divide, of_power 275 section_of of_compare_below_equal, of_compare_below, of_compare_not_equal 276 section_of of_compare_equal, of_compare_above_equal, of_compare_above 277 section_of toboolean, of_helper_compare_true, of_rightop, of_helper_compare 278 section_of of_shift_right, of_shift_right_signed, of_shift_left 279 section_of of_helper_getshiftdata, of_bit_mirror 280 section_of of_or_bitwise, or_hhtype_1, of_or_boolean, of_clr_bitwise 281 section_of of_and_bitwise, of_and_boolean, of_xor_bitwise, of_xor_boolean 282 section_of of_helper_retbool, of_helper_getbool 283 284 section_of var_cip_setup, var_csp_setup, var_lfsr_setup, var_reverselfsr_setup 285 section_of var_dpspsel_setup, var_seldbg_setup, var_mt_setup 286 section_of var_ioi_setup, var_psps_setup, var_ppr_setup, var_ppi_setup 287 section_of var_iok_setup, var_rhcount_setup 288 section_of var_get_psp_segment, var_get_psp_selector 289 section_of var_bootldpunit_setup, var_bootsdpunit_setup, var_bootydpunit_setup 290 section_of var_bootldppart_setup, var_bootsdppart_setup, var_bootydppart_setup 291 section_of var_bootunitflags_setup 292 293 section_of issymbol?, isvariable?, var_mm_setup, var_ri_setup, var_ysf_setup 294 section_of getstmmxdigit 295 section_of getexpression.lit_ishexdigit?, getexpression.lit_isdigit? 296 section_of of_cond, count_unary_operators, count_unary_operators_restrict 297 section_of get3byte.checksignificantbits, getbyte, checksignificantbitscommon 298 section_of getnyb, get_value_range 299 300 section_of getaddrX, getword, getdword, getexpression 301 302 section_of getrangeX.lines, getrangeX.ecx_and_0_valid 303 section_of getrange.lines, getrange.ecx_and_0_valid, get_length.lines 304 section_of getrangeX.lines_and_uu, getrange.lines_and_uu 305 section_of isseparator?.except_L_or_dot, isvariable?.return_name 306 section_of getword.checksignificantbits, getbyte.checksignificantbits 307 308 section_of seg_bx_to_sel 309 section_of getexpression.countsignificantbits 310 section_of ..@rr_checksignificantbits, ..@rr_operatordispatchers 311 section_of ..@rr_operatorfunctions, ..@parsecm_getaddr 312 section_of stack_check.internal 313 314 315 usesection INIT 316 section_of init_uppercase 317 318 319 usesection lDEBUG_DATA_ENTRY 320 321 322 ; This is used to refer to the program image parts 323 ; that are always to be placed at a fixed position 324 ; directly behind the PSP. (These never need to be 325 ; relocated in application mode.) 326 %define DATAENTRYTABLESIZE (ldebug_data_entry_size + asmtable1_size + asmtable2_size) 329 330 ; The following are offsets from the PSP segment, 331 ; in application mode. They refer to the sources 332 ; of these section images in the program image. 333 ; Device driver and bootloaded mode early on will 334 ; set up ds so that ds:100h -> program image, 335 ; mimicking the application mode with a pseudo-PSP 336 ; segment address. 337 ; Device driver mode will relocate everything to end 338 ; up with device shim, pseudo MCB (16 bytes), PSP 339 ; (256 bytes), data/entry, asmtables, data/stack, 340 ; message. After that the auxbuff, history buff, 341 ; code1, and code2 can be placed. Finally a single 342 ; paragraph is reserved for an SD container MCB. 343 ; For application mode, data/entry and asmtables 344 ; are never relocated. The original PSP is used 345 ; as is too. Behind the asmtables, the setup is 346 ; similar to device mode. 347 ; Boot loaded mode will relocate everything to end 348 ; up at the top of the LMA, including the "NDEB" 349 ; image identification paragraph (always on a KiB 350 ; boundary), the pseudo PSP, and then all the 351 ; resident sections. 352 %define MESSAGESECTIONOFFSET (100h + DATAENTRYTABLESIZE) 353 %define CODESECTIONOFFSET (MESSAGESECTIONOFFSET + messagesegment_size) 354 %define INITSECTIONOFFSET (CODESECTIONOFFSET+ldebug_code_size+ldebug_code2_size) 355 356 ; These targets indicate where to place the code 357 ; code sections and auxbuff when boot loaded. 358 ; The use of CODESECTIONOFFSET implies a full 359 ; message segment (not truncated). Likewise, 360 ; this uses ldebug_code_size (not truncated). 361 %define BOOTCODETARGET1 (CODESECTIONOFFSET+datastack_size) 362 %define BOOTCODETARGET2 (BOOTCODETARGET1+auxbuff_size) 363 %define BOOTAUXTARGET1 (BOOTCODETARGET1+ldebug_code_size+ldebug_code2_size) 364 %define BOOTAUXTARGET2 BOOTCODETARGET1 365 %define BOOTAUXTARGET3 (BOOTAUXTARGET1+auxbuff_size) 366 367 %if _BOOTLDR_DISCARD || _BOOTLDR_DISCARD_HELP 368 ; If the message and/or code section is truncated 369 ; then non-boot-loaded modes have to calculate 370 ; their layouts with the truncated sizes. The 371 ; CODETARGET1 is based on MESSAGESECTIONOFFSET 372 ; because CODESECTIONOFFSET already implies the 373 ; use of the untruncated message segment. 374 %define CODETARGET1 (MESSAGESECTIONOFFSET + messagesegment_truncated_size + datastack_size) 375 %define CODETARGET2 (CODETARGET1+auxbuff_size) 376 %define AUXTARGET1 (CODETARGET1+ldebug_code_bootldr_truncated_size+ldebug_code2_size) 377 %define AUXTARGET2 CODETARGET1 378 %define AUXTARGET3 (AUXTARGET1+auxbuff_size) 379 %else 380 ; If no section is truncated we can just directly 381 ; re-use the layouts, same as things were before 382 ; the sections were made to be truncated. 383 %xdefine CODETARGET1 BOOTCODETARGET1 384 %xdefine CODETARGET2 BOOTCODETARGET2 385 %xdefine AUXTARGET1 BOOTAUXTARGET1 386 %xdefine AUXTARGET2 BOOTAUXTARGET2 387 %xdefine AUXTARGET3 BOOTAUXTARGET3 388 %endif 389 390 ; This calculation allows for all the sections 391 ; that are stored in the program image (the 392 ; first term) plus the data/stack section, 393 ; auxbuff twice (twice for if layout 3 needed), 394 ; and the separate history segment. After init 395 ; is relocated this high, all destinations for 396 ; the to-be resident sections can be written to. 397 ; This is based on the application PSP segment. 398 %define APPINITTARGET (INITSECTIONOFFSET + datastack_size + auxbuff_size + auxbuff_max_size + historysegment_size) 402 ; The early stack goes behind the init target. 403 %define APPINITSTACK_START (APPINITTARGET+init_size) 404 APPINITSTACK_SIZE equ 512 ; must be even 405 ; This is the size of the application mode 406 ; process memory block required while still 407 ; using the init stack behind init target. 408 %define APPINITSTACK_END (APPINITSTACK_START+APPINITSTACK_SIZE) 409 410 BOOTINITSTACK_SIZE equ 512 ; must be divisible by 16 411 ; Similar to APPINITTARGET this calculates 412 ; the size needed for the maximum size resident 413 ; image once installed. The auxbuff size twice, 414 ; history segment, data/stack section, and the 415 ; INITSECTIONOFFSET are the same here. The final 416 ; +16 is for the NDEB image identification 417 ; paragraph. The KiB macros are to round up the 418 ; size to the next kibi byte boundary as we will 419 ; install by modifying the int 12h return value, 420 ; which has kibi byte granularity. 421 %define BOOTDELTA (fromkib(kib(auxbuff_size * 2 + historysegment_size + datastack_size + INITSECTIONOFFSET + 16))) 425 426 %if _DEVICE 427 ; This is the size of the shim, the pseudo MCB, 428 ; as well as the process we will create. 429 %define DEVICEADJUST (deviceshim_size + 110h) 430 ; Like APPINITTARGET, except we need to add 431 ; in the device adjust for the additional things 432 ; to place before the resident image. 433 ; The final 10h is for the SD container MCB space 434 ; reserved at the end of our resident allocation. 435 ; Question: Is the PSP size included in the define 436 ; INITSECTIONOFFSET redundant with DEVICEADJUST? 437 ; Even if this is true it has very little negative 438 ; effects, we would simply need 256 more bytes 439 ; than would be required. 440 ; Answer: No, it isn't redundant. The first PSP size 441 ; is to translate from the entrypoint ds (where 442 ; ds:100h -> program image) to the device header. 443 ; The second PSP size is for the actual PSP that is 444 ; allocated eventually. 445 %define DEVICEINITTARGET (INITSECTIONOFFSET + DEVICEADJUST + datastack_size + auxbuff_size + auxbuff_max_size + historysegment_size + 10h) 451 ; The minus 100h is because the target calculates 452 ; from the pseudo PSP location on entry (cs - 10h). 453 ; To check the size we can subtract this term so as 454 ; to not use more than needed. 455 ; This adds the shim size as the shim exists in its 456 ; own section behind the init section. It will be 457 ; discarded at this spot after it was copied to the 458 ; resident position of the device header. 459 ; No temporary stack in or behind the init section is 460 ; used because the device installer provides a 461 ; perfectly valid stack for us to use. 462 %define DEVICEINITSIZE (DEVICEINITTARGET - 100h + init_size + deviceshim_size) 465 466 467 ; The final resident copy of this device header 468 ; is relocated from the shim to in front of our 469 ; PSP. Therefore, this space after the PSP can 470 ; be re-used for the newly expanded N buffer. 471 ; (Refer to N_BUFFER_END.) 472 473 ; The device header is of a fixed format. 474 ; For our purposes, the 4-byte code for 475 ; each the strategy entry and the 476 ; interrupt entry is part of this format. 477 ; (DOS may read the attributes or entrypoint 478 ; offsets before calling either, so the 479 ; inicomp stage needs to recreate in its 480 ; entrypoints part exactly what we have here.) 481 %macro writedeviceheader 3 482 usesection %1 483 %2: 484 .next: 485 %ifidni %1, DEVICESHIM 486 dd -1 487 %else 488 fill 2, -1, jmp strict short j_zero_entrypoint 489 dw -1 490 %endif 491 .attributes: 492 dw 8800h ; character device, open/close supported 493 ; Setting bit 800h means that opening the device 494 ; will already cause a critical error. This 495 ; discourages opening the character device. 496 ; As we never use it we want to avoid opens. 497 .strategy: 498 dw .strategy_entry %3 ; -> strategy entry 499 .interrupt: 500 dw .interrupt_entry %3 ; -> interrupt entry 501 .name: 502 fill 8, 32, db "LDEBUG$$" ; character device name 503 .strategy_entry: 504 fill 4, 90h, jmp %2 %+ .device_entrypoint 505 .interrupt_entry: 506 fill 4, 90h, retf 507 %endmacro 508 509 writedeviceheader lDEBUG_DATA_ENTRY, device_header, - 100h 482 <1> usesection %1 483 <1> %2: 484 <1> .next: 485 <1> %ifidni %1, DEVICESHIM 486 <1> dd -1 487 <1> %else 488 00000000 EB3E <1> fill 2, -1, jmp strict short j_zero_entrypoint 489 00000002 FFFF <1> dw -1 490 <1> %endif 491 <1> .attributes: 492 00000004 0088 <1> dw 8800h 493 <1> 494 <1> 495 <1> 496 <1> 497 <1> .strategy: 498 00000006 [12FF] <1> dw .strategy_entry %3 499 <1> .interrupt: 500 00000008 [16FF] <1> dw .interrupt_entry %3 501 <1> .name: 502 0000000A 4C44454255472424 <1> fill 8, 32, db "LDEBUG$$" 503 <1> .strategy_entry: 504 00000012 EB3690 <1> fill 4, 90h, jmp %2 %+ .device_entrypoint 505 <1> .interrupt_entry: 506 00000016 CB90 <1> fill 4, 90h, retf 510 %else 511 jmp initcode_j 512 %endif 513 514 ; Startup codes can be discarded after one of 515 ; them is used to enter the initialisation part. 516 ; Therefore the N buffer is now extended past 517 ; these codes, refer to N_BUFFER_END. 518 %if _BOOTLDR 519 0000001A 00 align 32, db 0 520 %if ($ - $$) != 32 521 %error Wrong kernel iniload entrypoint 522 %endif 523 00000020 BB[D701] mov bx, boot_initcode 524 %endif 525 526 %if _BOOTLDR || _DEVICE 527 ; INP: cs:0 => program image 528 ; INIT:bx -> init entrypoint 529 device_boot_common_entrypoint: 530 00000023 8CC8 mov ax, cs 531 00000025 83E810 sub ax, 10h 532 00000028 8ED8 mov ds, ax ; => would-be PSP before program image 533 0000002A EB18 jmp @F 534 %endif 535 0000002C 00 align 64, db 0 536 %if ($ - $$) != 64 537 %error Wrong application entrypoint 538 %endif 539 540 ; INP: cs = ds => PSP 541 j_zero_entrypoint: 542 initcode_j: 543 00000040 8CC8 mov ax, cs 544 00000042 31DB xor bx, bx 545 546 ; INP: ds:100h = ax:100h -> program image 547 ; INIT:bx -> init entrypoint 548 @@: 549 00000044 05D51A add ax, paras(INITSECTIONOFFSET) 550 ; => original INIT section in program image 551 00000047 50 push ax 552 00000048 53 push bx 553 00000049 CB retf ; dispatch to INIT code 554 555 556 %if _DEVICE 557 ; INP: es:bx -> device request header 558 ; ss:sp -> a DOS stack, far return address to DOS 559 ; cs:0 -> our start image 560 ; OUT: bx = offset of init function in INIT segment 561 ; ss:sp -> bx, fl, ds, ax, far return address 562 device_header.device_entrypoint: 563 0000004A 26807F0200 cmp byte [es:bx + 2], 0 ; command code 0 (init) ? 564 0000004F 7414 je @F 565 566 00000051 26C747030001 mov word [es:bx + 3], 0100h ; no error, done 567 00000057 26807F020E cmp byte [es:bx + 2], 0Eh ; command code 0Eh (close) ? 568 0000005C 7406 je .retf ; yes, accept it --> 569 0000005E 26C747030381 mov word [es:bx + 3], 8103h ; error, done, code: unknown command 570 00000064 CB .retf: retf 571 572 @@: 573 00000065 50 push ax 574 00000066 1E push ds 575 00000067 9C pushf 576 00000068 53 push bx 577 00000069 BB[E805] mov bx, device_initcode 578 0000006C EBB5 jmp device_boot_common_entrypoint 579 580 581 writedeviceheader DEVICESHIM, shim_device_header, - 0 482 <1> usesection %1 483 <1> %2: 484 <1> .next: 485 <1> %ifidni %1, DEVICESHIM 486 00000000 FFFFFFFF <1> dd -1 487 <1> %else 488 <1> fill 2, -1, jmp strict short j_zero_entrypoint 489 <1> dw -1 490 <1> %endif 491 <1> .attributes: 492 00000004 0088 <1> dw 8800h 493 <1> 494 <1> 495 <1> 496 <1> 497 <1> .strategy: 498 00000006 [1200] <1> dw .strategy_entry %3 499 <1> .interrupt: 500 00000008 [1600] <1> dw .interrupt_entry %3 501 <1> .name: 502 0000000A 4C44454255472424 <1> fill 8, 32, db "LDEBUG$$" 503 <1> .strategy_entry: 504 00000012 EB0690 <1> fill 4, 90h, jmp %2 %+ .device_entrypoint 505 <1> .interrupt_entry: 506 00000016 CB90 <1> fill 4, 90h, retf 582 shim_device_header.device_entrypoint: 583 0000001A 26C747030001 mov word [es:bx + 3], 0100h ; no error, done 584 00000020 26807F020E cmp byte [es:bx + 2], 0Eh ; command code 0Eh (close) ? 585 00000025 7406 je .retf ; yes, accept it --> 586 00000027 26C747030381 mov word [es:bx + 3], 8103h ; error, done, code: unknown command 587 0000002D CB .retf: retf 588 589 0000002E 90 align 16 590 deviceshim_size equ $ - section.DEVICESHIM.vstart 591 endarea deviceshim, 1 592 593 594 usesection lDEBUG_DATA_ENTRY 595 %else 596 deviceshim_size equ 0 597 %endif 598 599 600 align 2, db 0 601 N_BUFFER_END equ $ ; end of N buffer (starts in PSP at 80h) 602 603 0000006E [0207][5D5E][D35D]- cmdlist: dw aa,bb,cc,ddd,ee,ff,gg,hh,ii,error,kk,ll,mm,nn,oo 603 00000074 [4414][8967][2269]- 603 0000007A [8F33][AA69][4B6C]- 603 00000080 [5D82][1673][396E]- 603 00000086 [CB71][F772][B96B] 604 0000008C [D941][2A75][8321]- dw pp,qq,rr,sss,tt,uu,vv,ww,xx,yy 604 00000092 [697C][B23C][C849]- 604 00000098 [F382][D67E][4680]- 604 0000009E [F1AB] 605 %if _SYMBOLIC 606 dw zz 607 %endif 608 609 %include "options.mac" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug options and internal flags 5 <1> 6 <1> Copyright (C) 2008-2023 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> dispregs32 equ 1 ; RX: 32-bit register display (R, T/P/G) 18 <1> traceints equ 2 ; TM: trace into interrupts (T) 19 <1> cpdepchars equ 4 ; allow dumping of CP-dependent characters (D, DX) 20 <1> fakeindos equ 8 ; always assume InDOS flag non-zero (all) 21 <1> nonpagingdevice equ 10h ; disallow paged output with [more] prompt (all exc. P, T) 22 <1> pagingdevice equ 20h ; allow paged output with [more] prompt (all exc. P, T) 23 <1> ; paged output is by default on if the output device is StdOut, else off 24 <1> hexrn equ 40h ; display raw hexadecimal content of FPU registers (RN) 25 <1> ;novdd equ 80h ; don't use a registered NTVDM VDD (L, W) 26 <1> nondospaging equ 100h ; paging: don't use DOS for input when waiting for a key 27 <1> nohlt equ 200h ; HLT doesn't work, don't use it 28 <1> biosidles equ 400h ; don't idle with HLT or Int2F.1680, only call BIOS Int16.00 29 <1> opt_usegetinput equ 800h ; use getinput for int 21h interactive input 30 <1> use_si_units equ 1000h ; in disp_*_size use SI units (kB = 1000, etc) 31 <1> use_jedec_units equ 2000h ; in disp_*_size use JEDEC units (kB = 1024) 32 <1> enable_serial equ 4000h ; enable serial I/O (preferred over DOS or BIOS terminal) 33 <1> int8_disable_serial equ 8000h ; disable serial I/O when breaking due to intr8 34 <1> gg_do_not_skip_bp equ 1_0000h ; gg: do not skip a breakpoint (bb or gg) 35 <1> gg_no_autorepeat equ 2_0000h ; gg: do not auto-repeat 36 <1> tp_do_not_skip_bp equ 4_0000h ; T/TP/P: do not skip a (bb) breakpoint 37 <1> gg_bb_hit_no_repeat equ 8_0000h ; gg: do not auto-repeat after bb hit 38 <1> tp_bb_hit_no_repeat equ 10_0000h ; T/TP/P: do not auto-repeat after bb hit 39 <1> gg_unexpected_no_repeat equ 20_0000h ; gg: do not auto-repeat after unexpectedinterrupt 40 <1> tp_unexpected_no_repeat equ 40_0000h ; T/TP/P 41 <1> ss_no_dump: equ 80_0000h 42 <1> %if _SYMBOLIC 43 <1> dd_no_blanks_sym: equ 100_0000h 44 <1> zz_no_pm_xms: equ 200_0000h 45 <1> %endif 46 <1> rr_disasm_no_rept: equ 1000_0000h 47 <1> rr_disasm_no_show: equ 2000_0000h 48 <1> opt_cmdline_quiet_input:equ 4000_0000h 49 <1> opt_cmdline_quiet_output:equ 8000_0000h 50 <1> %if _SYMBOLIC 51 <1> DEFAULTOPTIONS equ zz_no_pm_xms 52 <1> %else 53 <1> DEFAULTOPTIONS equ 0 54 <1> %endif 55 <1> 56 <1> 57 <1> opt2_db_header: equ 1 58 <1> opt2_db_trailer: equ 2 59 <1> opt2_dw_header: equ 10h 60 <1> opt2_dw_trailer: equ 20h 61 <1> opt2_dd_header: equ 100h 62 <1> opt2_dd_trailer: equ 200h 63 <1> opt2_getinput_dpmi: equ 800h 64 <1> opt2_hh_compat: equ 1000h 65 <1> opt2_getc_idle: equ 2000h 66 <1> opt2_getc_idle_dpmi: equ 4000h 67 <1> opt2_re_cancel_tpg: equ 8000h 68 <1> opt2_nn_compat: equ 1_0000h 69 <1> opt2_nn_capitalise: equ 2_0000h 70 <1> %if _MS_0RANGE_COMPAT 71 <1> opt2_0range_compat: equ 4_0000h 72 <1> %endif 73 <1> opt2_rr16_compat: equ 8_0000h 74 <1> opt2_r_prompt_compat: equ 10_0000h 75 <1> opt2_r_separate: equ 20_0000h 76 <1> opt2_r_linebreak_always:equ 40_0000h 77 <1> DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi 78 <1> 79 <1> 80 <1> opt3_tt_no_paging: equ 1 81 <1> opt3_tp_no_paging: equ 2 82 <1> opt3_pp_no_paging: equ 4 83 <1> opt3_gg_no_paging: equ 8 84 <1> opt3_silence_paging_set:equ 100h 85 <1> opt3_silence_paging_on: equ 200h 86 <1> opt3_paging_rc: equ 1000h 87 <1> opt3_paging_yy: equ 2000h 88 <1> opt3_paging_re: equ 4000h 89 <1> opt3_r_highlight_diff: equ 10000h 90 <1> opt3_r_highlight_dumb: equ 20000h 91 <1> opt3_r_highlight_full: equ 40000h 92 <1> opt3_r_highlight_eip: equ 80000h 93 <1> %if _PM 94 <1> opt3_ss_b_bit_set: equ 10_0000h 95 <1> %if _BREAK_INSTALLDPMI 96 <1> opt3_break_installdpmi: equ 20_0000h 97 <1> %endif 98 <1> %endif 99 <1> %if _DHIGHLIGHT 100 <1> opt3_d_highlight: equ 80_0000h 101 <1> %endif 102 <1> %if _GETLINEHIGHLIGHT 103 <1> opt3_getline_highlight: equ 100_0000h 104 <1> %endif 105 <1> opt3_no_idle_2F: equ 200_0000h 106 <1> %if _DELAY_BEFORE_BP 107 <1> opt3_delay_before_bp: equ 400_0000h 108 <1> %endif 109 <1> opt3_no_call_update: equ 800_0000h 110 <1> opt3_disable_autorepeat:equ 1000_0000h 111 <1> opt3_check_ctrlc_keyb: equ 2000_0000h 112 <1> opt3_check_ctrlc_0bh: equ 4000_0000h 113 <1> opt3_tsr_quit_leave_tf: equ 8000_0000h 114 <1> 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 117 <1> 118 <1> 119 <1> opt4_int_2F_hook: equ 2 120 <1> opt4_int_08_hook: equ 4 121 <1> opt4_int_2D_hook: equ 8 122 <1> %if _CATCHINTFAULTCOND 123 <1> opt4_int_fault_hook: equ 10h 124 <1> %endif 125 <1> opt4_int_serial_force: equ 1_0000h 126 <1> opt4_int_2F_force: equ 2_0000h 127 <1> opt4_int_08_force: equ 4_0000h 128 <1> opt4_int_2D_force: equ 8_0000h 129 <1> %if _CATCHINT0D 130 <1> opt4_int_0D_force: equ 10_0000h 131 <1> %endif 132 <1> %if _CATCHINT0C 133 <1> opt4_int_0C_force: equ 20_0000h 134 <1> %endif 135 <1> opt4_int_00_force: equ 100_0000h 136 <1> opt4_int_01_force: equ 200_0000h 137 <1> opt4_int_03_force: equ 400_0000h 138 <1> opt4_int_06_force: equ 800_0000h 139 <1> opt4_int_18_force: equ 1000_0000h 140 <1> opt4_int_19_force: equ 2000_0000h 141 <1> opt4_int_09_force: equ 4000_0000h ; not used at the same time as 15h 142 <1> opt4_int_15_force: equ 4000_0000h ; not used at the same time as 09h 143 <1> opt4_int_07_force: equ 8000_0000h 144 <1> DEFAULTOPTIONS4 equ opt4_int_2F_hook 145 <1> 146 <1> 147 <1> %if _VXCHG 148 <1> opt6_vv_mode: equ 1 149 <1> opt6_vv_keep: equ 2 150 <1> opt6_vv_int16: equ 10h 151 <1> %if _VXCHG_DEFAULT_ON 152 <1> DEFAULTOPTIONS6 equ opt6_share_serial_irq | opt6_vv_mode 153 <1> %else 154 <1> DEFAULTOPTIONS6 equ opt6_share_serial_irq 155 <1> %endif 156 <1> %else 157 <1> DEFAULTOPTIONS6 equ opt6_share_serial_irq 158 <1> %endif 159 <1> %if _DEBUG 160 <1> opt6_debug_exception_late: equ 20h 161 <1> opt6_debug_exception_early: equ 40h 162 <1> %if _DEBUG_COND 163 <1> opt6_debug_exception: equ 80h 164 <1> opt6_debug_mode: equ 100h 165 <1> %endif 166 <1> %endif 167 <1> opt6_bios_output: equ 200h 168 <1> opt6_flat_binary: equ 400h 169 <1> opt6_big_stack: equ 800h 170 <1> opt6_40_columns: equ 1000h 171 <1> opt6_40_indent_odd: equ 2000h 172 <1> opt6_40_dash: equ 4000h 173 <1> opt6_share_serial_irq: equ 1_0000h 174 <1> opt6_serial_EOI_call: equ 2_0000h 175 <1> %if _RH 176 <1> opt6_rh_mode: equ 10_0000h 177 <1> %endif 178 <1> %if _DEBUG 179 <1> opt6_debug_putrunint_early: equ 40_0000h 180 <1> %if _DEBUG_COND 181 <1> opt6_debug_putrunint: equ 80_0000h 182 <1> %endif 183 <1> %endif 184 <1> opt6_bios_io: equ 100_0000h 185 <1> opt6_immasm_display_uu: equ 200_0000h 186 <1> opt6_immasm_debug: equ 400_0000h 187 <1> opt6_immasm_flag: equ 800_0000h 188 <1> opt6_immasm_nobranch: equ 1000_0000h 189 <1> opt6_r_flags_style2: equ 2000_0000h 190 <1> opt6_r_flags_style3: equ 4000_0000h 191 <1> opt6_r_linebreak_conditional: equ 8000_0000h 192 <1> 193 <1> 194 <1> oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 195 <1> newpacket equ 2 ; Int21.7305 packet method available (L, W) 196 <1> ntpacket equ 4 ; VDD registered and usable (L, W) 197 <1> pagedcommand equ 8 ; allows paging in puts 198 <1> notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 199 <1> inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 200 <1> notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 201 <1> outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 202 <1> hooked2F equ 100h ; Int2F hooked 203 <1> nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 204 <1> dpminohlt equ 400h ; DPMI doesn't like hlt 205 <1> protectedmode equ 800h ; in (DPMI) protected mode 206 <1> debuggeeA20 equ 1000h ; state of debuggee's A20 207 <1> debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 208 <1> nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 209 <1> has386 equ 8000h ; CPU is a 386 210 <1> usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 211 <1> runningnt equ 2_0000h ; running in NTVDM 212 <1> canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 213 <1> modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 214 <1> promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 215 <1> switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 216 <1> tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 217 <1> attachedterm equ 80_0000h ; the attached process terminated 218 <1> runningdosemu equ 100_0000h ; running in dosemu 219 <1> ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 220 <1> tt_while: equ 400_0000h ; tt: while condition specified 221 <1> tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 222 <1> tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 223 <1> tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 224 <1> tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 225 <1> tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 226 <1> 227 <1> 228 <1> dif2_gg_is_first: equ 1 229 <1> dif2_gg_skip_non_cseip: equ 2 230 <1> dif2_gg_skip_cseip: equ 4 231 <1> dif2_gg_is_gg: equ 8 232 <1> dif2_gg_first_detected: equ 10h 233 <1> dif2_gg_again: equ 20h 234 <1> dif2_tpg_proceed_bp_set:equ 40h 235 <1> dif2_tpg_keep_proceed_bp: equ 80h 236 <1> dif2_tpg_have_bp: equ 100h 237 <1> dif2_tpg_adjusted_cseip:equ 200h 238 <1> dif2_tpg_do_not_adjust: equ 400h 239 <1> dif2_bp_failure: equ 800h 240 <1> dif2_is_pp: equ 1000h 241 <1> %if _SYMBOLIC 242 <1> dif2_createdprocess: equ 800_0000h ; created empty debuggee process 243 <1> dif2_sym_req_xms: equ 2000h 244 <1> dif2_sym_req_86mm: equ 4000h 245 <1> dif2_sym_req_mask equ dif2_sym_req_86mm | dif2_sym_req_xms 246 <1> dif2_no_pm_xms: equ 1_0000h 247 <1> dif2_xms_detection_done:equ 2_0000h 248 <1> %endif 249 <1> %if _INPUT_FILE_HANDLES 250 <1> dif2_input_file: equ 10_0000h 251 <1> dif2_closed_input_file: equ 20_0000h 252 <1> %endif 253 <1> dif2_did_getline_file: equ 40_0000h 254 <1> %if _SYMBOLIC 255 <1> dif2_poison: equ 80_0000h 256 <1> %endif 257 <1> dif2_boot_loaded_kernel:equ 100_0000h 258 <1> %if _INPUT_FILE_BOOT 259 <1> dif2_input_file_boot: equ 200_0000h 260 <1> dif2_closed_input_file_boot: equ 400_0000h 261 <1> %endif 262 <1> dif2_in_silence_dump: equ 1000_0000h 263 <1> dif2_int31_segment: equ 2000_0000h 264 <1> dif2_nn_compat: equ 4000_0000h 265 <1> dif2_nn_capitalise: equ 8000_0000h 266 <1> 267 <1> 268 <1> dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 269 <1> dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 270 <1> dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 271 <1> dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 274 <1> dif3_load_dir_dir: equ 8 275 <1> dif3_input_terminal_override: equ 10h 276 <1> dif3_input_serial_override: equ 20h 277 <1> dif3_if_not: equ 40h 278 <1> dif3_partition_changed: equ 80h 279 <1> ; 280 <1> dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 281 <1> dif3_input_cmdline_closed: equ 200h 282 <1> dif3_at_line_end: equ 400h 283 <1> dif3_quiet_input_single:equ 800h 284 <1> dif3_quiet_output: equ 1000h 285 <1> dif3_unquiet_error: equ 2000h 286 <1> dif3_unquiet_prompt: equ 4000h 287 <1> dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 288 <1> dif3_return_eof: equ 8000h 289 <1> dif3_highlighting: equ 1_0000h 290 <1> dif3_do_not_highlight: equ 2_0000h 291 <1> dif3_int10_highlight: equ 2_0000h 292 <1> dif3_nosymbols_1: equ 4_0000h 293 <1> dif3_nosymbols_2: equ 8_0000h 294 <1> %if _PM 295 <1> dif3_ss_b_bit_set: equ 10_0000h 296 <1> %endif 297 <1> dif3_gotint19: equ 20_0000h 298 <1> dif3_prior_pm: equ 40_0000h 299 <1> %if _DELAY_BEFORE_BP 300 <1> dif3_delayed equ 80_0000h 301 <1> %endif 302 <1> dif3_input_re: equ 100_0000h ; input reading from re_buffer 303 <1> dif3_input_re_closed: equ 200_0000h 304 <1> dif3_accept_getrange_0: equ 400_0000h 305 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 306 <1> dif3_in_if: equ 800_0000h 307 <1> %endif 308 <1> dif3_auxbuff_guarded_1: equ 1000_0000h 309 <1> dif3_auxbuff_guarded_2: equ 2000_0000h 310 <1> dif3_auxbuff_guarded_3: equ 4000_0000h 311 <1> dif3_sss_is_reverse: equ 8000_0000h 312 <1> 313 <1> 314 <1> dif4_int_serial_hooked: equ 1 315 <1> dif4_int_2F_hooked: equ 2 316 <1> dif4_int_08_hooked: equ 4 317 <1> dif4_int_2D_hooked: equ 8 318 <1> %if _CATCHINTFAULTCOND && _CATCHINT0D 319 <1> dif4_int_0D_hooked: equ 10h 320 <1> %endif 321 <1> %if _CATCHINTFAULTCOND && _CATCHINT0C 322 <1> dif4_int_0C_hooked: equ 20h 323 <1> %endif 324 <1> 325 <1> 326 <1> %if _VXCHG 327 <1> dif6_vv_mode: equ 1 328 <1> %endif 329 <1> dif6_in_hook2F: equ 2 330 <1> dif6_in_amis_hook2F: equ 4 331 <1> %if _DEBUG && _DEBUG_COND 332 <1> dif6_debug_mode: equ 100h 333 <1> %endif 334 <1> %if _RH 335 <1> dif6_rh_mode_was: equ 8_0000h 336 <1> dif6_rh_mode: equ 10_0000h 337 <1> dif6_rh_mode_2: equ 20_0000h 338 <1> %endif 339 <1> dif6_device_mode: equ 40_0000h 340 <1> dif6_cpdepchars: equ 80_0000h 341 <1> %if _IMMASM 342 <1> dif6_immasm_no_output: equ 100_0000h 343 <1> dif6_immasm: equ 200_0000h 344 <1> dif6_immasm_rel8: equ 400_0000h 345 <1> %endif 346 <1> 347 <1> 348 <1> disasm_lowercase equ 1 349 <1> disasm_commablank equ 2 350 <1> disasm_nasm equ 4 351 <1> disasm_lowercase_refmem:equ 8 352 <1> disasm_show_short: equ 10h 353 <1> disasm_show_near: equ 20h 354 <1> disasm_show_far: equ 40h 355 <1> disasm_nec: equ 80h 356 <1> disasm_40_columns: equ 100h 357 <1> disasm_no_indent: equ 200h 358 <1> disasm_msdebug_mnemonofs: equ 400h 359 <1> disasm_a16_memref: equ 1000h 360 <1> disasm_a32_memref: equ 2000h 361 <1> disasm_a16_string: equ 4000h 362 <1> disasm_a32_string: equ 8000h 363 <1> DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm | disasm_a16_memref | disasm_a32_memref | disasm_a16_string | disasm_a32_string 610 611 align 4, db 0 612 ; options, startoptions and internalflags 613 ; have to be consecutive 614 000000A0 00000000 options: dd DEFAULTOPTIONS ; run-time options 615 000000A4 10410000 options2: dd DEFAULTOPTIONS2 616 000000A8 0F000060 options3: dd DEFAULTOPTIONS3 617 000000AC 02000000 options4: dd DEFAULTOPTIONS4 618 000000B0 00000000 options5: dd 0 619 000000B4 00000100 options6: dd DEFAULTOPTIONS6 620 621 ; options, options2, options3, options4, options5, options6 622 ; are each assumed to be dwords 623 ; and all consecutive in expr.asm isvariable? 624 625 000000B8 00000000 startoptions: dd DEFAULTOPTIONS ; options as determined during startup; read-only for user 626 000000BC 10410000 startoptions2: dd DEFAULTOPTIONS2 627 000000C0 0F000060 startoptions3: dd DEFAULTOPTIONS3 628 000000C4 02000000 startoptions4: dd DEFAULTOPTIONS4 629 000000C8 00000000 startoptions5: dd 0 630 000000CC 00000100 startoptions6: dd DEFAULTOPTIONS6 631 ; startoptions, startoptions2, startoptions3, startoptions4, 632 ; startoptions5, startoptions6 633 ; are each assumed 634 ; to be dwords and all consecutive in expr.asm isvariable? 635 636 000000D0 F8308000 internalflags: dd attachedterm|pagedcommand|notstdinput|inputfile|notstdoutput|outputfile|(!!_PM*dpminohlt)|debuggeeA20|debuggerA20 637 ; flags only modified by DEBUG itself 638 internalflags2: 639 %if _SYMBOLIC 640 dd dif2_sym_req_xms | dif2_sym_req_86mm 641 %else 642 000000D4 00000000 dd 0 643 %endif 644 000000D8 80040000 internalflags3: dd dif3_partition_changed | dif3_at_line_end 645 000000DC 00000000 internalflags4: dd 0 646 000000E0 00000000 internalflags5: dd 0 647 000000E4 00000000 internalflags6: dd 0 648 ; internalflags, internalflags2, internalflags3, internalflags4, 649 ; internalflags5, internalflags6 650 ; are each assumed 651 ; to be dwords and all consecutive in expr.asm isvariable? 652 653 000000E8 07F00000 asm_options: dd DEFAULTASMOPTIONS 654 asm_startoptions: 655 000000EC 07F00000 dd DEFAULTASMOPTIONS 656 657 000000F0 00000000 gg_first_cseip_linear: dd 0 658 000000F4 00000000 gg_next_cseip_linear: dd 0 659 000000F8 00000000 tpg_possible_breakpoint:dd 0 660 000000FC [122A] gg_deferred_message: dw msg.empty_message 661 bb_deferred_message_in_lineout_behind: 662 000000FE 0000 dw 0 663 align 4, db 0 664 00000100 00 tpg_proceed_bp: times BPSIZE db 0 665 %if _DEBUG1 666 align 2, db 0 667 test_records_Readmem: times 6 * 16 db 0 668 test_records_Writemem: times 6 * 16 db 0 669 test_records_getLinear: times 6 * 16 db 0 670 test_records_getSegmented: times 6 * 16 db 0 671 672 test_readmem_value: db 0 673 %endif 674 00000106 00 pp_instruction: db 0 675 %if _RH 676 00000107 00 skip_rh: db 0 677 %endif 678 %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER 679 00000108 00 in_re: db 0 680 %endif 681 00000109 00 align 4, db 0 682 0000010C 00000000 pp_operand: dd 0 683 align 2, db 0 684 00000110 0000 code_seg: dw 0 685 %if _PM 686 code_sel: dw 0 687 %endif 688 %if _DUALCODE 689 code2_seg: dw 0 690 %if _PM 691 code2_sel: dw 0 692 %endif 693 %endif 694 %if _IMMASM 695 immseg: dw 0 696 %endif 697 %if _MESSAGESEGMENT 698 00000112 0000 messageseg: dw 0 699 %if _PM 700 messagesel: dw 0 701 %endif 702 %endif 703 704 00000114 808B entryseg_size: dw pspsegment_size 705 00000116 B0DC code_size: dw ldebug_code_size ; may truncate 706 %if _DUALCODE 707 code2_size: dw ldebug_code2_size 708 %endif 709 %if _HISTORY_SEPARATE_FIXED && _HISTORY 710 00000118 0020 historyseg_size: dw historysegment_size 711 %endif 712 %if _MESSAGESEGMENT 713 0000011A 2055 messageseg_size: dw messagesegment_size ; may truncate 714 %endif 715 0000011C 0000 alloc_size: dw 0 716 0000011E 0000 alloc_seg: dw 0 717 718 00000120 0D db 13 719 00000121 0D align 16, db 13 ; insure the cmdline_buffer is prefixed by CR 720 cmdline_buffer: 721 .size: equ _RC_BUFFER_SIZE 722 00000130 00 times .size db 0 723 .end: 724 00000230 [3001] .position: dw cmdline_buffer 725 726 00000232 0D db 13 727 00000233 0D align 2, db 13 ; insure the re_buffer is prefixed by CR 728 re_buffer: 729 .size: equ _RE_BUFFER_SIZE 730 00000234 405200 fill .size,0,db "@R" 731 .end: 732 00000A34 [3402] .position: dw re_buffer 733 734 00000A36 00 align 4, db 0 735 00000A38 00000000 re_count: dd 0 736 00000A3C 00010000 re_limit: dd 256 737 00000A40 00000000 rc_count: dd 0 738 00000A44 00100000 rc_limit: dd 4096 739 740 align 2, db 0 741 00000A48 0000 cmd3_set_options: dw 0 742 %if _PM 743 auxbuff_switchbuffer_size: dw 0 744 %endif 745 00000A4A 00 auxbuff_segorsel:segonlyaddress 746 auxbuff_behind_last_silent: 747 00000A4C 0000 dw 0 ; -> behind last silent buffer entry 748 %if _RH 749 auxbuff_start_silent: 750 00000A4E 0000 dw 0 751 auxbuff_amount_silent: 752 00000A50 0000 dw 0 753 %endif 754 auxbuff_current_size: 755 00000A52 1020 dw auxbuff_size 756 %if _AUXBUFFSIZE != _AUXBUFFMAXSIZE 757 auxbuff_current_size_minus_24: 758 00000A54 F81F dw auxbuff_size - 24 759 %endif 760 761 tt_silent_mode_number: 762 00000A56 0000 dw 0 ; if non-zero: maximum amount of dumps 763 ; displayed after T/TP/P while silent 764 %if _SYMBOLIC 765 created_psp: dw 0 766 created_size: dw 0 767 %endif 768 769 %if _INPUT_FILE_HANDLES 770 align INPUTFILEHANDLE_size 771 input_file_handles: 772 00000A58 FF times _INPUT_FILE_HANDLES * INPUTFILEHANDLE_size db -1 773 00000AD8 0000 .active: dw 0 774 00000ADA 0000 .to_close: dw 0 775 %endif 776 align 2, db 0 777 00000ADC 0142 indos_remember_seek_function: dw 4201h 778 00000ADE FFFF indos_remember_seek_handle: dw -1 779 align 4, db 0 780 00000AE0 00000000 indos_remember_seek_offset: dd 0 781 %if _INPUT_FILE_BOOT 782 align 4, db 0 783 00000AE4 00000000 boot_remember_seek_offset: dd 0 784 align 2, db 0 785 00000AE8 FFFF boot_remember_seek_handle: dw -1 786 %endif 787 788 00000AEA 00 charcounter: db 0 ; used by raw output to handle tab 789 00000AEB 00 linecounter: db 0 ; used by paging in puts 790 align 4, db 0 791 00000AEC [0010] savesp: dw stack_end ; saved stack pointer 792 00000AEE 0000 dw 0 ; 0 to set high word of esp 793 00000AF0 0000 re_sp: dw 0 794 00000AF2 [0000] errret: dw cmd3 ; return here if error 795 00000AF4 [8182] throwret: dw errhandler ; return here if error - priority, no display 796 00000AF6 [0010] throwsp: dw stack_end ; stack pointer set before jumping to throwret 797 00000AF8 0000 run_sp: dw 0 ; stack pointer when running 798 00000AFA 0000 dw 0 ; (zero for esph) 799 00000AFC 0000 run_sp_reserve: dw 0 ; additional space to reserve between the 800 ; near return address of run and the run_sp 801 00000AFE 4000 spadjust: dw 40h ; adjust sp by this amount for save 802 %if _SYMBOLIC 803 stack_low_address: 804 dw str_buffer ; low end of stack, default = str_buffer 805 %endif 806 807 00000B00 0000 pspdbe: dw 0 ; debuggee's PSP (86M segment) 808 ; unless DIF&attachedterm or bootloaded 809 00000B02 0000 pspdbg: dw 0 ; debugger's PSP (86M segment) 810 align 4, db 0 811 00000B04 0000000000000000 run2324: dd 0,0 ; debuggee's interrupt vectors 23h and 24h (both modes) 812 %if _PM 813 dd 0 814 dbg2324: dw i23pm, i24pm 815 %endif 816 %if _VDD 817 00000B0C FFFF hVdd: dw -1 ; NTVDM VDD handle 818 %endif 819 00000B0E 00 align 4, db 0 820 00000B10 0000000000000000 sav2324: dd 0,0 ; debugger's interrupt vectors 23h and 24h (real-mode only) 821 00000B18 00 hakstat: db 0 ; whether we have hacked the vectors or not 822 %if _MS_0RANGE_COMPAT 823 00000B19 00 getrange_is_uu: db 0 824 %endif 825 00000B1A 00 align 4, db 0 826 00000B1C 00000000 psp22: dd 0 ; original terminate address from our PSP 827 00000B20 0000 parent: dw 0 ; original parent process from our PSP (must follow psp22) 828 %if _MCB || _INT 829 00000B22 FFFF firstmcb: dw -1 ; start of MCB chain (always segment) 830 00000B24 FFFF firstumcb: dw -1 831 %endif 832 00000B26 00 pInDOS: segofs16address ; far16 address of InDOS flag (bimodal) 833 %if _USESDA 834 00000B2A FFFFFFFF pSDA: segofs16address minusone 835 ; far16 address of SDA (bimodal) 836 %endif 837 00000B2E 00 machine: db 0 ; type of processor for assembler and disassembler (1..6) 838 00000B2F 00 has_87: db 0 ; if there is a math coprocessor present 839 00000B30 00 mach_87: db 0 ; type of coprocessor present 840 00000B31 00 encodedmach87: db 0 ; C0 = no coproceasor, C = coprocessor present, 841 ; C2 = 287 present on a 386 842 %if _MMXSUPP 843 00000B32 00 has_mmx: db 0 844 %endif 845 %if _VXCHG 846 %ifn _VXCHGBIOS 847 00000B33 00 align 4, db 0 848 00000B34 00000000 xmsdrv: dd 0 ; XMM driver address, obtained thru int 2F, ax=4310h 849 xmsmove:istruc XMSM ; XMS block move struct, used to save/restore screens 850 00000B38 00 iend 851 %endif 852 align 2, db 0 853 00000B48 0000 csrpos: dw 0 ; cursor position of currently inactive screen 854 00000B4A 00 vrows: db 0 ; current rows; to see if debuggee changed video mode 855 %endif 856 %if _ALTVID ; exchange some video BIOS data fields for option /2. 857 00000B4B 0000 oldcsrpos: dw 0 ; cursor position 858 00000B4D 0000 oldcrtp: dw 0 ; CRTC port 859 00000B4F 5000 oldcols: dw 80 ; columns 860 oldmr: ; label word 861 00000B51 00 oldmode: db 0 ; video mode 862 00000B52 18 oldrows: db 24 ; rows - 1 863 %endif 864 00000B53 01 bInDbg: db 1 ; 1=debugger is running 865 00000B54 0A notatty: db 10 ; if standard input is from a file 866 ; this is also used for a linebreak processing hack 867 00000B55 00 vpage: db 0 ; video page the debugger is to use for BIOS output 868 %if _MCLOPT 869 master_pic_base:db _MCLOPT_DEFAULT 870 %endif 871 00000B56 00 switchar: db 0 ; switch character 872 00000B57 20 swch1: db ' ' ; switch character if it's a slash 873 align 2, db 0 874 dd_default_length: 875 00000B58 8000 dw 80h 876 dd_default_lines: 877 00000B5A 0000 dw 0 878 uu_default_length: 879 00000B5C 2000 dw 20h 880 uu_default_lines: 881 00000B5E 0000 dw 0 882 00000B60 0000 promptlen: dw 0 ; length of prompt 883 00000B62 [0200] bufnext: dw line_in+2 ; address of next available character 884 00000B64 [0200] bufend: dw line_in+2 ; address + 1 of last valid character 885 00000B66 0000 rc: dw 0 886 00000B68 0000 priorrc: dw 0 887 00000B6A 0000 erc: dw 0 888 %if _HISTORY 889 history: 890 %if _HISTORY_SEPARATE_FIXED 891 00000B6C 00 .segorsel: segonlyaddress 892 00000B6E FE1F .first: dw _HISTORY_SIZE - 2 893 00000B70 FE1F .last: dw _HISTORY_SIZE - 2 894 %else 895 .first: dw historybuffer.end - 2 896 .last: dw historybuffer.end - 2 897 %endif 898 %endif 899 900 var_addr_entries: 901 00000B72 00 a_addr: segmentedaddress; address for next A command 902 00000B78 00 d_addr: segmentedaddress; address for next D command; must follow a_addr 903 00000B7E 00 behind_r_u_addr:segmentedaddress; address behind R's disassembly 904 00000B84 00 u_addr: segmentedaddress; address for next U command; must follow d_addr 905 00000B8A 00 e_addr: segmentedaddress; address for current/next E command 906 %if _DSTRINGS 907 00000B90 00 dz_addr: segmentedaddress; address for next ASCIZ string 908 00000B96 00 dcpm_addr: segmentedaddress; address for next $-terminated string 909 00000B9C 00 dcount_addr: segmentedaddress; address for next byte-counted string 910 00000BA2 00 dwcount_addr: segmentedaddress; address for next word-counted string 911 %endif 912 var_addr_entries.amount equ ($ - var_addr_entries) / SEGADR_size 913 %if _PM 914 x_addr: dd 0 ; (phys) address for next DX command 915 %endif 916 %if _DSTRINGS 917 00000BA8 00 dstringtype: db 0 ; FFh byte-counted, FEh word-counted, else terminator byte 918 00000BA9 00 align 2, db 0 919 00000BAA [900B] dstringaddr: dw dz_addr ; -> address of last string 920 %endif 921 %if _INT 922 align 4, db 0 923 00000BAC 00000000 intaddress: dd 0 924 lastint_is_86m_and_mcb: 925 00000BB0 0000 dw 0 926 00000BB2 00 lastint: db 0 927 %endif 928 00000BB3 00 align 4, db 0 929 search_results: 930 %if _PM 931 times 6 * 16 db 0 932 %else 933 00000BB4 00 times 4 * 16 db 0 934 %endif 935 align 4, db 0 936 00000BF4 00000000 sscounter: dd 0 937 00000BF8 00 eqflag: db 0 ; flag indicating presence of `=' operand 938 00000BF9 00 align 2, db 0 939 00000BFA 000000000000 eqladdr: dw 0,0,0 ; address of `=' operand in G, P and T command 940 align 2, db 0 941 00000C00 0000 run_int: dw 0 ; interrupt type that stopped the running 942 00000C02 [F504] lastcmd: dw dmycmd 943 00000C04 00 fileext: db 0 ; file extension (0 if no file name) 944 EXT_OTHER equ 1 945 EXT_COM equ 2 946 EXT_EXE equ 4 947 EXT_HEX equ 8 948 949 00000C05 00 align 4, db 0 950 00000C08 00000000 mmxbuff: dd 0 ; buffer with a (read-only) part of MMX register 951 ; for access from within expressions 952 %if _CATCHINT08 953 00000C0C 0000 intr8_counter: dw 0 954 00000C0E 5A00 intr8_limit: dw 18 * 5 ; ca 5 seconds 955 %endif 956 00000C10 00 maxmachinetype: db 0 957 serial_rows: 958 00000C11 18 db 24 959 serial_columns: 960 00000C12 50 db 80 961 serial_keep_timeout: 962 00000C13 0F db 15 963 %if _USE_TX_FIFO 964 serial_fifo_size: 965 00000C14 10 db _BI_TX_FIFO_SIZE 966 ; size of built-in TX fifo (1 is as if no FIFO) 967 %endif 968 serial_flags: 969 00000C15 00 db 0 970 sf_init_done: equ 1 971 sf_ctrl_c: equ 2 972 sf_double_ctrl_c: equ 4 973 sf_built_in_fifo: equ 8 974 sf_use_serial: equ 10h 975 976 00000C16 0B serial_var_intnum: db _INTNUM 977 00000C17 03 serial_var_params: db _UART_PARAMS 978 00000C18 00 serial_var_fifo: db _UART_FIFO 979 00000C19 00 align 2, db 0 980 00000C1A F802 serial_var_baseport: dw _UART_BASE 981 00000C1C 0C00 serial_var_dl: dw _UART_RATE 982 00000C1E 0800 serial_var_irqmask: dw _OFFMASK 983 984 00000C20 01 io_rows: db 1 985 00000C21 01 io_columns: db 1 986 align 2, db 0 987 %if _40COLUMNS 988 00000C22 0000 io_columns_getline: dw 0 ; byte variable zero-extended 989 %endif 990 00000C24 0000 io_start_buffer: dw 0 991 00000C26 0000 io_end_buffer: dw 0 992 00000C28 FF00 io_levels: dw 255 993 00000C2A 0300 io_flags: dw DEFAULTIOFLAGS 994 iof_extra_iol_for_tpg_re: equ 1 995 iof_extra_iol_for_rc: equ 2 996 DEFAULTIOFLAGS equ iof_extra_iol_for_tpg_re | iof_extra_iol_for_rc 997 998 align 2, db 0 999 00000C2C 0000 getline_timer_count: dw 0 1000 00000C2E 0000 getline_timer_last: dw 0 1001 00000C30 [F504] getline_timer_func: dw dmycmd 1002 1003 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1004 align 2, db 0 1005 00000C32 0000 if_exists_then_address: dw 0 1006 00000C34 0000 if_exists_si: dw 0 1007 00000C36 0000 if_exists_sp: dw 0 1008 00000C38 0000 if_exists_length: dw 0 1009 %endif 1010 1011 align 2, db 0 1012 terminator_in_line_in: 1013 00000C3A 0000 .offset: dw 0 1014 00000C3C 00 .value: db 0 1015 1016 00000C3D 00 qqtermcode: db 0 1017 align 2, db 0 1018 00000C3E 0000 device_mcb_paragraphs: dw 0 1019 00000C40 00000000 device_header_address: dd 0 1020 1021 align 2, db 0 1022 inttab_optional: 1023 .: 1024 serial_installed_intnum: equ $ 1025 00000C44 0000 dw 0 1026 00000C46 [1254] dw serial_interrupt_handler 1027 00000C48 0100 dw dif4_int_serial_hooked 1028 %if _PM 1029 dw 2Fh 1030 dw debug2F 1031 dw dif4_int_2F_hooked 1032 %endif 1033 %if _CATCHINT08 1034 00000C4A 0800 dw 8 1035 00000C4C [4A46] dw intr8 1036 00000C4E 0400 dw dif4_int_08_hooked 1037 %endif 1038 %if _CATCHINTFAULTCOND && _CATCHINT0D 1039 00000C50 0D00 dw 0Dh 1040 00000C52 [C647] dw intr0D 1041 00000C54 1000 dw dif4_int_0D_hooked 1042 %endif 1043 %if _CATCHINTFAULTCOND && _CATCHINT0C 1044 00000C56 0C00 dw 0Ch 1045 00000C58 [8E47] dw intr0C 1046 00000C5A 2000 dw dif4_int_0C_hooked 1047 %endif 1048 .amount: equ ($ - .) / 6 1049 00000C5C FFFF dw -1 1050 1051 1052 amisintr_offset: 1053 00000C5E [6C0C] dw inttab 1054 1055 inttab_pre: 1056 00000C60 00 times 3 * inttab_optional.amount db 0 1057 1058 inttab: 1059 %if _CATCHINT00 1060 00000C6C 00 db 0 1061 00000C6D [3847] dw intr0 ; table of interrupt initialization stuff 1062 %endif 1063 %if _CATCHINT01 1064 00000C6F 01 db 1 1065 00000C70 [EE46] dw intr1 1066 %endif 1067 %if _CATCHINT03 1068 00000C72 03 db 3 1069 00000C73 [5447] dw intr3 1070 %endif 1071 %if _CATCHINT07 1072 db 7 1073 dw intr7 1074 %endif 1075 %if ! _CATCHINTFAULTCOND && _CATCHINT0C 1076 db 0Ch 1077 dw intr0C 1078 %endif 1079 %if ! _CATCHINTFAULTCOND && _CATCHINT0D 1080 db 0Dh 1081 dw intr0D 1082 %endif 1083 %if _CATCHINT18 1084 00000C75 18 db 18h 1085 00000C76 [FE47] dw intr18 1086 %endif 1087 %if _CATCHINT19 1088 00000C78 19 db 19h 1089 00000C79 [1A48] dw intr19 1090 %endif 1091 %if _CATCHSYSREQ 1092 db _SYSREQINT 1093 dw intr_sysreq 1094 %endif 1095 %if _CATCHINT06 1096 00000C7B 06 .i06: db 6 1097 00000C7C [7047] dw intr6 1098 %endif 1099 endarea inttab 1100 inttab_number equ inttab_size / 3 1101 %if _CATCHINT2D 1102 00000C7E 2D .i2D: db 2Dh 1103 00000C7F [B040] dw int2D 1104 %endif 1105 1106 1107 intforcetab: 1108 %if _CATCHINT00 1109 00000C81 01 db opt4_int_00_force >> 24 1110 %endif 1111 %if _CATCHINT01 1112 00000C82 02 db opt4_int_01_force >> 24 1113 %endif 1114 %if _CATCHINT03 1115 00000C83 04 db opt4_int_03_force >> 24 1116 %endif 1117 %if _CATCHINT07 1118 db opt4_int_07_force >> 24 1119 %endif 1120 %if _CATCHINT0C 1121 00000C84 00 db opt4_int_0C_force >> 24 1122 %endif 1123 %if _CATCHINT0D 1124 00000C85 00 db opt4_int_0D_force >> 24 1125 %endif 1126 %if _CATCHINT18 1127 00000C86 10 db opt4_int_18_force >> 24 1128 %endif 1129 %if _CATCHINT19 1130 00000C87 20 db opt4_int_19_force >> 24 1131 %endif 1132 %if _CATCHSYSREQ 1133 %if _SYSREQINT == 09h 1134 db opt4_int_09_force >> 24 1135 %elif _SYSREQINT == 15h 1136 db opt4_int_15_force >> 24 1137 %else 1138 %error Unknown SysReq interrupt 1139 %endif 1140 %endif 1141 %if _CATCHINT06 1142 00000C88 08 db opt4_int_06_force >> 24 1143 %endif 1144 1145 %if _CATCHINT06 && _DETECT95LX 1146 00000C89 00 align 2, db 0 1147 inttab_number_variable: 1148 00000C8A 0600 dw inttab_number 1149 %endif 1150 1151 1152 align 2, db 0 1153 ; Parameter block for EXEC call 1154 execblk: 1155 00000C8C 0000 dw 0 ;(00) zero: copy the parent's environment 1156 00000C8E 00000000 .cmdline: dw 0,0 ;(02) address of command tail to copy 1157 00000C92 5C000000 .fcb1: dw 5Ch,0 ;(06) address of first FCB to copy 1158 00000C96 6C000000 .fcb2: dw 6Ch,0 ;(10) address of second FCB to copy 1159 00000C9A 00000000 .sssp: dw 0,0 ;(14) initial SS:SP 1160 00000C9E 00000000 .csip: dw 0,0 ;(18) initial CS:IP 1161 1162 1163 ; Register save area (32 words). 1164 ; must be DWORD aligned, used as stack 1165 00000CA2 00 align 4, db 0 1166 regs: 1167 00000CA4 00000000 reg_eax: dd 0 ;+00 eax 1168 00000CA8 00000000 reg_ebx: dd 0 ;+04 ebx 1169 00000CAC 00000000 reg_ecx: dd 0 ;+08 ecx 1170 00000CB0 00000000 reg_edx: dd 0 ;+12 edx 1171 00000CB4 00000000 reg_esp: dd 0 ;+16 esp 1172 00000CB8 00000000 reg_ebp: dd 0 ;+20 ebp 1173 00000CBC 00000000 reg_esi: dd 0 ;+24 esi 1174 00000CC0 00000000 reg_edi: dd 0 ;+28 edi 1175 00000CC4 00000000 reg_ds: dd 0 ;+32 ds (high word unused) 1176 00000CC8 00000000 reg_es: dd 0 ;+36 es (high word unused) 1177 00000CCC 00000000 reg_ss: dd 0 ;+40 ss (high word unused) 1178 00000CD0 00000000 reg_cs: dd 0 ;+44 cs (high word unused) 1179 00000CD4 00000000 reg_fs: dd 0 ;+48 fs (high word unused) 1180 00000CD8 00000000 reg_gs: dd 0 ;+52 gs (high word unused) 1181 00000CDC 00000000 reg_eip: dd 0 ;+56 eip 1182 00000CE0 00000000 reg_efl: dd 0 ;+60 efl(ags) 1183 regs.end: 1184 regs.size: equ regs.end - regs 1185 1186 %if _REGSHIGHLIGHT 1187 regs_prior: 1188 .: 1189 00000CE4 00000000 times 16 dd 0 1190 .end: 1191 .size: equ .end - . 1192 1193 %if .size != regs.size 1194 %error regs prior save area size mismatch 1195 %endif 1196 %endif 1197 1198 %if _DEVICE 1199 device_quittable_regs: 1200 .: 1201 00000D24 00000000 times 16 dd 0 1202 .end: 1203 .size: equ .end - . 1204 1205 %if .size != regs.size 1206 %error regs prior save area size mismatch 1207 %endif 1208 %endif 1209 1210 %if _VARIABLES 1211 00000D64 00000000 vregs: times 256 dd 0 ; internal v0..vff 1212 %endif 1213 1214 ; possible byte encoding of lDebug variables for dynamic computations: 1215 ; xxxxyyyy 1216 ; 10: register 1217 ; xx: size (0 = 1, 1 = 2, 2 = 4) 1218 ; yyyy: 0..15: register as stored in the register save area 1219 ; as SIL, DIL, BPL, SPL aren't supported these map to xH 1220 ; xSL, IPL and FLL are invalid, ExS are invalid 1221 ; 1011: variable 1222 ; yyyy: which variable. variables are always dword-sized 1223 ; 11000000: 32-bit compound, next byte stores: xxxxyyyy first, second 16-bit reg 1224 ; 11000001..11111111: available for encoding other compound regs, vars, indirection, 1225 ; symbols, types etc 1226 ; 0xxxxxxx: operators 1227 1228 1229 ; Instruction set information needed for the 'p' command. 1230 ; ppbytes and ppinfo needs to be consecutive. 1231 00001164 6667262E363E6465F2- ppbytes:db 66h,67h,26h,2Eh,36h,3Eh,64h,65h,0F2h,0F3h,0F0h ; prefixes 1231 0000116D F3F0 1232 PPLEN_ONLY_PREFIXES equ $-ppbytes 1233 .string: 1234 0000116F ACADAAABA4A5 db 0ACh,0ADh,0AAh,0ABh,0A4h,0A5h ; lods,stos,movs 1235 00001175 6C6D6E6F db 6Ch,6Dh,6Eh,6Fh ; ins,outs 1236 00001179 A6A7AEAF db 0A6h,0A7h,0AEh,0AFh ; cmps,scas 1237 PPLEN_ONLY_STRING equ $-ppbytes 1238 .string_amount: equ $ - .string 1239 0000117D CCCD db 0CCh,0CDh ; int instructions 1240 0000117F E0E1E2 db 0E0h,0E1h,0E2h ; loop instructions 1241 00001182 E8 db 0E8h ; call rel16/32 1242 00001183 9A db 09Ah ; call far seg16:16/32 1243 ; (This last one is done explicitly by the code.) 1244 ; db 0FFh ; FF/2 or FF/3: indirect call 1245 1246 PPLEN equ $-ppbytes ; size of the above table 1247 1248 ; Info for the above, respectively. This MUST follow 1249 ; immediately after ppbytes, as we add + PPLEN - 1 to 1250 ; di after repne scasb to index into this (ppinfo). 1251 ; 80h = prefix; 82h = operand size prefix; 81h = address size prefix. 1252 ; If the high bit is not set, the next highest bit (40h) indicates 1253 ; that the instruction size depends on whether there is an operand 1254 ; size prefix; if set, under o32 two bytes are added to the size. 1255 ; (This is only used for direct near and far call.) 1256 ; If both the two highest bits are clear, then PP_STRDEST, 1257 ; PP_STRSRC, or PP_STRSRC2 may be set. This only happens for 1258 ; string instructions, which always are neither prefixes nor 1259 ; use additional bytes. 1260 ; The remaining bits tell the number of additional bytes in the 1261 ; instruction. This is at most 4. It must be below-or-equal to 1262 ; 7, or if PP_VARSIZ is used, 5 (so the sum stays below 8). 1263 1264 PP_ADRSIZ equ 01h 1265 PP_OPSIZ equ 02h 1266 PP_PREFIX equ 80h 1267 PP_VARSIZ equ 40h 1268 PP_STRDEST equ 20h 1269 PP_STRSRC equ 10h 1270 PP_STRSRC2 equ 08h 1271 PP_SIZ_MASK equ 07h 1272 1273 00001184 8281 ppinfo: db PP_PREFIX | PP_OPSIZ, PP_PREFIX | PP_ADRSIZ 1274 00001186 80 times 9 db PP_PREFIX ; prefixes 1275 0000118F 1010 db PP_STRSRC, PP_STRSRC ; lods 1276 00001191 2020 db PP_STRDEST, PP_STRDEST ; stos 1277 00001193 3030 db PP_STRDEST | PP_STRSRC, PP_STRDEST | PP_STRSRC 1278 ; movs 1279 00001195 2020 db PP_STRDEST, PP_STRDEST ; ins 1280 00001197 1010 db PP_STRSRC, PP_STRSRC ; outs 1281 00001199 1818 db PP_STRSRC2 | PP_STRSRC, PP_STRSRC2 | PP_STRSRC 1282 ; cmps 1283 0000119B 0808 db PP_STRSRC2, PP_STRSRC2 ; scas 1284 0000119D 0001 db 0,1 ; int 1285 0000119F 010101 db 1,1,1 ; loop 1286 000011A2 42 db PP_VARSIZ | 2 ; call rel16/32 with displacement 1287 000011A3 44 db PP_VARSIZ | 4 ; call far 16:16 or 16:32 immediate 1288 1289 %if PPLEN != $-ppinfo 1290 %error "ppinfo table has wrong size" 1291 %endif 1292 1293 1294 ; Equates for instruction operands. 1295 ; First the sizes. 1296 1297 OP_ALL equ 40h ; byte/word/dword operand (could be 30h but ...) 1298 OP_1632 equ 50h ; word or dword operand 1299 OP_8 equ 60h ; byte operand 1300 OP_16 equ 70h ; word operand 1301 OP_32 equ 80h ; dword operand 1302 OP_64 equ 90h ; qword operand 1303 OP_1632_DEFAULT equ 0A0h ; word or dword or default opsize 1304 1305 OP_SIZE equ OP_ALL ; the lowest of these 1306 1307 ; These operand types need to be combined with a size. 1308 ; Bits 0 to 3 give one of these types (maximum 15), 1309 ; and bits 4 to 7 specify the size. Table entries 1310 ; for these are identified by detecting that they 1311 ; are above-or-equal OP_SIZE. 1312 ; The first parameter to the opsizeditem macro is the 1313 ; name of the item. It has to match the names used in 1314 ; the instr.key and debugtbl.inc files. 1315 ; The second parameter is the entry for bittab that 1316 ; is used by aa.asm (the assembler). 1317 ; The third parameter is the suffix used to create the 1318 ; entry for asmjmp (prefix aop_) and disjmp2 (dop_). 1319 1320 %macro opsizeditem 3.nolist 1321 %1 equ nextindex 1322 %xdefine BITTAB_OPSIZEDITEMS BITTAB_OPSIZEDITEMS,%2 1323 %xdefine ASMJMP_OPSIZEDITEMS ASMJMP_OPSIZEDITEMS,aop_%3 1324 %xdefine DISJMP2_OPSIZEDITEMS DISJMP2_OPSIZEDITEMS,dop_%3 1325 %assign nextindex nextindex + 1 1326 %endmacro 1327 %assign nextindex 0 1328 %define BITTAB_OPSIZEDITEMS "" 1329 %define ASMJMP_OPSIZEDITEMS "" 1330 %define DISJMP2_OPSIZEDITEMS "" 1331 opsizeditem OP_IMM, ARG_IMMED, imm ; immediate 1332 opsizeditem OP_RM,ARG_DEREF+ARG_JUSTREG,rm ; reg/mem 1333 opsizeditem OP_M, ARG_DEREF, m ; mem (but not reg) 1334 opsizeditem OP_R_MOD, ARG_JUSTREG, r_mod ; register, determined from MOD R/M part 1335 opsizeditem OP_MOFFS, ARG_DEREF, moffs ; memory offset; e.g., [1234] 1336 opsizeditem OP_R, ARG_JUSTREG, r ; reg part of reg/mem byte 1337 opsizeditem OP_R_ADD, ARG_JUSTREG, r_add ; register, determined from instruction byte 1338 opsizeditem OP_AX, ARG_JUSTREG, ax ; al or ax or eax 1339 %if nextindex > 16 1340 %error Too many op sized items 1341 %endif 1342 1343 ; These don't need a size. 1344 ; Because the size needs to be clear to indicate 1345 ; that one of these is to be used, the maximum 1346 ; value for these is 63 (as 64 is OP_SIZE). 1347 ; The minimum value for these is 1 because a 0 1348 ; without size means the end of an op list (OP_END). 1349 ; The first parameter to the opitem macro is the name 1350 ; of the item. It has to match the names used in the 1351 ; instr.key and debugtbl.inc files. 1352 ; The second parameter is the entry for bittab that 1353 ; is used by aa.asm (the assembler). The third 1354 ; parameter is the entry for asmjmp. 1355 ; The fourth parameter is the entry for optab as used 1356 ; by uu.asm (the disassembler). 1357 ; 1358 ; asm_siznum contains entries for OP_M64 to OP_MXX. 1359 ; (The order has to match their opitem order.) 1360 ; asm_regnum contains entries for OP_DX to OP_GS. 1361 ; (The order has to match their opitem order.) 1362 1363 %macro opitem 4.nolist 1364 %1 equ nextindex 1365 %xdefine BITTAB_OPITEMS BITTAB_OPITEMS,%2 1366 %xdefine ASMJMP_OPITEMS ASMJMP_OPITEMS,%3 1367 %xdefine OPTAB_OPITEMS OPTAB_OPITEMS,%4 1368 %assign nextindex nextindex + 1 1369 %endmacro 1370 OP_END equ 0 1371 %assign nextindex 1 1372 %define BITTAB_OPITEMS "" 1373 %define ASMJMP_OPITEMS "" 1374 %define OPTAB_OPITEMS "" 1375 ; order of the following (ao17 entries) must match asm_siznum in aa.asm 1376 OP_FIRST_ASM_SIZNUM equ nextindex ; corresponding to asm_siznum start 1377 opitem OP_M64, ARG_DEREF, ao17,dop_m64 ; qword memory (obsolete?) 1378 opitem OP_MFLOAT, ARG_DEREF, ao17,dop_mfloat ; float memory 1379 opitem OP_MDOUBLE, ARG_DEREF, ao17,dop_mdouble; double-precision floating memory 1380 opitem OP_M80, ARG_DEREF, ao17,dop_m80 ; tbyte memory 1381 opitem OP_MXX, ARG_DEREF, ao17,dop_mxx ; memory (size unknown) 1382 opitem OP_FARIMM, ARG_FARADDR, ao21,dop_farimm ; far16/far32 immediate 1383 opitem OP_REL8, ARG_IMMED, ao23,dop_rel8 ; byte address relative to IP 1384 opitem OP_REL1632, ARG_IMMED, ao25,dop_rel1632; word or dword address relative to IP 1385 opitem OP_1CHK, ARG_WEIRDREG, ao29,dop49 ; check for ST(1) 1386 opitem OP_STI, ARG_WEIRDREG, aop_sti,dop_sti ; ST(I) 1387 opitem OP_CR, ARG_WEIRDREG, aop_cr,dop_cr ; CRx 1388 opitem OP_DR, ARG_WEIRDREG, ao34,dop_dr ; DRx 1389 opitem OP_TR, ARG_WEIRDREG, ao35,dop_tr ; TRx 1390 opitem OP_SEGREG, ARG_WEIRDREG, ao39,dop_segreg ; segment register 1391 opitem OP_IMMS8, ARG_IMMED, ao41,dop_imms8 ; sign extended immediate byte 1392 opitem OP_IMMS8_EXTEND, ARG_IMMED, ao41_extend,dop_imms8 ; add etc word/dword r/m, imms8 1393 opitem OP_IMM8, ARG_IMMED, ao42,dop_imm8 ; immediate byte (other args may be (d)word) 1394 opitem OP_IMM8_OPTIONAL,ARG_IMMED, ao42,dop_imm8_optional 1395 opitem OP_IMM8_INT, ARG_IMMED, ao42,dop_imm8_int ; immediate byte for int 1396 opitem OP_MMX, ARG_WEIRDREG, aop_mmx,dop_mmx ; MMx 1397 opitem OP_MMX_MOD, ARG_WEIRDREG, aop_mmx_mod,dop_mmx_mod ; MMx, but in ModR/M part 1398 opitem OP_SHOSIZ, 0FFh, ao44, dop_shosiz ; set flag to always show the size 1399 opitem OP_SHORT, 0FFh, ao_short,dop_short ; allow short keyword 1400 opitem OP_NEAR, 0FFh, ao_near,dop_near ; allow near keyword 1401 opitem OP_FAR, 0FFh, ao_far, dop_far ; allow far keyword 1402 opitem OP_FAR_REQUIRED, 0FFh, ao_far_required,dop_far_required ; require far keyword 1403 opitem OP_FAR_M, 0FFh, ao_modifier_continue,dop_far_m ; les, lds, lss, lfs, lgs, or jmp/call far mem 1404 opitem OP_DOUBLE_M, 0FFh, ao_modifier_continue,dop_double_m ; bound 1405 opitem OP_M_SRC, 0FFh, ao_modifier_continue,dop_m_src 1406 opitem OP_M_DST, 0FFh, ao_modifier_continue,dop_m_dst 1407 opitem OP_M_SRC_DST, 0FFh, ao_modifier_continue,dop_m_src_dst 1408 opitem OP_STACK_PUSH, 0FFh, ac09_internal_error,dop_stack_push 1409 opitem OP_STACK_POP, 0FFh, ac09_internal_error,dop_stack_pop 1410 opitem OP_STACK_SPECIAL,0FFh, ac09_internal_error,dop_stack_special 1411 opitem OP_M_ALWAYS_16, 0FFh, ao_m_always_16,dop_m_always_16 1412 opitem OP_E_CX, ARG_JUSTREG, aop_e_cx, da_internal_error ; (E)CX 1413 OP_FIRST_STRING equ nextindex 1414 opitem OP_1, ARG_IMMED, ao46, "1" ; 1 (simple "string" ops from here on) 1415 opitem OP_3, ARG_IMMED, ao47, "3" ; 3 1416 ; order of the following (ao48 entries) must match asm_regnum in aa.asm 1417 OP_FIRST_ASM_REGNUM equ nextindex ; corresponding to asm_regnum start 1418 opitem OP_DX, ARG_JUSTREG, ao48, "DX" ; DX 1419 opitem OP_CL, ARG_JUSTREG, ao48, "CL" ; CL 1420 opitem OP_ST, ARG_WEIRDREG, ao48, "ST" ; ST (top of coprocessor stack) 1421 opitem OP_CS, ARG_WEIRDREG, ao48, "CS" ; CS 1422 opitem OP_DS, ARG_WEIRDREG, ao48, "DS" ; DS 1423 opitem OP_ES, ARG_WEIRDREG, ao48, "ES" ; ES 1424 opitem OP_FS, ARG_WEIRDREG, ao48, "FS" ; FS 1425 opitem OP_GS, ARG_WEIRDREG, ao48, "GS" ; GS 1426 opitem OP_SS, ARG_WEIRDREG, ao48, "SS" ; SS 1427 OP_AFTER_LAST equ nextindex 1428 %if nextindex > OP_SIZE 1429 %error Too many op items 1430 %endif 1431 OP_AMOUNT_TABLE equ nextindex + 16 - 1 1432 ; nextindex: amount sizeless types 1433 ; 16: OP_SIZE combined types 1434 ; -1: OP_END does not occur in tables 1435 1436 ; Instructions that have an implicit operand subject to a segment prefix. 1437 ; This means a prefixed segment is allowed by the strict assembler, and 1438 ; the disassembler treats a segment prefix as part of the instruction and 1439 ; displays it in front of the instruction's mnemonic. 1440 ; (outs, movs, cmps, lods, xlat). 1441 segprfxtab: 1442 000011A4 6E6FA4A5A6A7ACAD db 06Eh,06Fh,0A4h,0A5h,0A6h,0A7h,0ACh,0ADh 1443 a32prfxtab: 1444 000011AC D7 db 0D7h ; xlat, last in segprfxtab, first in a32prfxtab 1445 SEGP_LEN equ $-segprfxtab 1446 1447 ; Instructions that can be used with REPE/REPNE. 1448 ; (ins, outs, movs, stos, lods; cmps, scas) 1449 000011AD 6C6EA4AAAC replist:db 06Ch,06Eh,0A4h,0AAh,0ACh ; REP (no difference) 1450 REP_SAME_LEN equ $-replist ; number of indifferent replist entries 1451 000011B2 A6AE db 0A6h,0AEh ; REPE/REPNE 1452 REP_LEN equ $-replist 1453 REP_DIFF_LEN equ REP_LEN-REP_SAME_LEN ; number of replist entries with difference 1454 1455 A32P_LEN equ $-a32prfxtab 1456 1457 ; prfxtab P_LEN REP_LEN REPE_REPNE_LEN 1458 1459 ; All the instructions in replist also have an implicit operand 1460 ; subject to ASIZE (similar to segprfxtab). Additionally, the 1461 ; xlat instruction (0D7h) has such an implicit operand too. 1462 ; maskmovq too. 1463 1464 align 2, db 0 1465 o32prfxtab: 1466 000011B4 0E001E000600160080- dw 0Eh, 1Eh, 06h, 16h, SPARSE_BASE + 0A0h, SPARSE_BASE + 0A8h 1466 000011BD 028802 1467 ; push cs, push ds, push es, push ss, push fs, push gs 1468 000011C0 1F0007001700810289- dw 1Fh, 07h, 17h, SPARSE_BASE + 0A1h, SPARSE_BASE + 0A9h 1468 000011C9 02 1469 ; pop ds, pop es, pop ss, pop fs, pop gs 1470 O32P_AMOUNT equ ($ - o32prfxtab) / 2 1471 1472 1473 %include "asmtabs.asm" 1 <1> [list -] 356 <1> usesection ASMTABLE2 357 <1> asmtab: 358 <1> usesection ASMTABLE1 359 <1> 360 <1> strdef TABLENAME, "debugtbl.inc" 361 <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 10 00000000 00 <2> opl OP_END ; idx=0, ofs=Ch, used=99 11 00000001 474000 <2> opl OP_ALL+OP_AX, OP_ALL+OP_IMM, OP_END ; idx=1, ofs=Dh, used=18 12 00000004 1F414000 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=2, ofs=10h, used=7 13 00000008 1D414000 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=3, ofs=14h, used=3 14 0000000C 1E414000 <2> opl OP_M_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=4, ofs=18h, used=1 15 00000010 1F511000 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=5, ofs=1Ch, used=7 16 00000014 1D511000 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=6, ofs=20h, used=1 17 00000018 1F414500 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=7, ofs=24h, used=19 18 0000001C 1D414500 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=8, ofs=28h, used=4 19 00000020 1E414500 <2> opl OP_M_DST, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=9, ofs=2Ch, used=2 20 00000024 45 <2> opl OP_ALL+OP_R ; idx=10, ofs=30h, used=19 21 00000025 1D4100 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_END ; idx=11, ofs=31h, used=4 + 19 22 00000028 45 <2> opl OP_ALL+OP_R ; idx=12, ofs=34h, used=2 23 00000029 1F4100 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_END ; idx=13, ofs=35h, used=6 + 2 24 0000002C 1F717500 <2> opl OP_M_SRC_DST, OP_16+OP_RM, OP_16+OP_R, OP_END ; idx=14, ofs=38h, used=1 25 00000030 551D1B5200 <2> opl OP_1632+OP_R, OP_M_SRC, OP_FAR_M, OP_1632+OP_M, OP_END ; idx=15, ofs=3Ch, used=5 26 00000035 551D5100 <2> opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=16, ofs=41h, used=35 27 00000039 8600 <2> opl OP_32+OP_R_ADD, OP_END ; idx=17, ofs=45h, used=8 28 0000003B 1F515500 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=18, ofs=47h, used=3 29 0000003F 1D515500 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=19, ofs=4Bh, used=1 30 00000043 1F51 <2> opl OP_M_SRC_DST, OP_1632+OP_RM ; idx=20, ofs=4Fh, used=3 31 00000045 1100 <2> opl OP_IMM8, OP_END ; idx=21, ofs=51h, used=0 + 3 32 00000047 1D511100 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_IMM8, OP_END ; idx=22, ofs=53h, used=1 33 0000004B 20 <2> opl OP_STACK_PUSH ; idx=23, ofs=57h, used=1 34 0000004C 180800 <2> opl OP_NEAR, OP_REL1632, OP_END ; idx=24, ofs=58h, used=31 + 1 35 0000004F 22 <2> opl OP_STACK_SPECIAL ; idx=25, ofs=5Bh, used=1 36 00000050 190600 <2> opl OP_FAR, OP_FARIMM, OP_END ; idx=26, ofs=5Ch, used=1 + 1 37 00000053 22 <2> opl OP_STACK_SPECIAL ; idx=27, ofs=5Fh, used=1 38 00000054 1A1D1BA200 <2> opl OP_FAR_REQUIRED, OP_M_SRC, OP_FAR_M, OP_1632_DEFAULT+OP_M, OP_END ; idx=28, ofs=60h, used=1 + 1 39 00000059 1F0100 <2> opl OP_M_SRC_DST, OP_M64, OP_END ; idx=29, ofs=65h, used=1 40 0000005C 1D0100 <2> opl OP_M_SRC, OP_M64, OP_END ; idx=30, ofs=68h, used=1 41 0000005F 1E0100 <2> opl OP_M_DST, OP_M64, OP_END ; idx=31, ofs=6Bh, used=1 42 00000062 20 <2> opl OP_STACK_PUSH ; idx=32, ofs=6Eh, used=8 43 00000063 5600 <2> opl OP_1632+OP_R_ADD, OP_END ; idx=33, ofs=6Fh, used=16 + 8 44 00000065 215600 <2> opl OP_STACK_POP, OP_1632+OP_R_ADD, OP_END ; idx=34, ofs=71h, used=8 45 00000068 20701100 <2> opl OP_STACK_PUSH, OP_16+OP_IMM, OP_IMM8, OP_END ; idx=35, ofs=74h, used=1 46 0000006C 1D0200 <2> opl OP_M_SRC, OP_MFLOAT, OP_END ; idx=36, ofs=78h, used=9 47 0000006F 1E0200 <2> opl OP_M_DST, OP_MFLOAT, OP_END ; idx=37, ofs=7Bh, used=2 48 00000072 1D0300 <2> opl OP_M_SRC, OP_MDOUBLE, OP_END ; idx=38, ofs=7Eh, used=9 49 00000075 1E0300 <2> opl OP_M_DST, OP_MDOUBLE, OP_END ; idx=39, ofs=81h, used=2 50 00000078 29 <2> opl OP_ST ; idx=40, ofs=84h, used=20 51 00000079 0A00 <2> opl OP_STI, OP_END ; idx=41, ofs=85h, used=4 + 20 52 0000007B 09 <2> opl OP_1CHK ; idx=42, ofs=87h, used=6 53 0000007C 0A2900 <2> opl OP_STI, OP_ST, OP_END ; idx=43, ofs=88h, used=6 + 6 54 0000007F 1D8200 <2> opl OP_M_SRC, OP_32+OP_M, OP_END ; idx=44, ofs=8Bh, used=9 55 00000082 1E8200 <2> opl OP_M_DST, OP_32+OP_M, OP_END ; idx=45, ofs=8Eh, used=2 56 00000085 1D7200 <2> opl OP_M_SRC, OP_16+OP_M, OP_END ; idx=46, ofs=91h, used=10 57 00000088 1E7200 <2> opl OP_M_DST, OP_16+OP_M, OP_END ; idx=47, ofs=94h, used=4 58 0000008B 1D0400 <2> opl OP_M_SRC, OP_M80, OP_END ; idx=48, ofs=97h, used=2 59 0000008E 1E0400 <2> opl OP_M_DST, OP_M80, OP_END ; idx=49, ofs=9Ah, used=2 60 00000091 090A00 <2> opl OP_1CHK, OP_STI, OP_END ; idx=50, ofs=9Dh, used=9 61 00000094 1D <2> opl OP_M_SRC ; idx=51, ofs=A0h, used=4 62 00000095 0500 <2> opl OP_MXX, OP_END ; idx=52, ofs=A1h, used=1 + 4 63 00000097 1E0500 <2> opl OP_M_DST, OP_MXX, OP_END ; idx=53, ofs=A3h, used=4 64 0000009A 7700 <2> opl OP_16+OP_AX, OP_END ; idx=54, ofs=A6h, used=1 65 0000009C 551D510F00 <2> opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_IMMS8, OP_END ; idx=55, ofs=A8h, used=1 66 000000A1 53550F00 <2> opl OP_1632+OP_R_MOD, OP_1632+OP_R, OP_IMMS8, OP_END ; idx=56, ofs=ADh, used=1 67 000000A5 551D515000 <2> opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_1632+OP_IMM, OP_END ; idx=57, ofs=B1h, used=1 68 000000AA 53555000 <2> opl OP_1632+OP_R_MOD, OP_1632+OP_R, OP_1632+OP_IMM, OP_END ; idx=58, ofs=B6h, used=1 69 000000AE 471100 <2> opl OP_ALL+OP_AX, OP_IMM8, OP_END ; idx=59, ofs=BAh, used=2 70 000000B1 472700 <2> opl OP_ALL+OP_AX, OP_DX, OP_END ; idx=60, ofs=BDh, used=2 71 000000B4 222600 <2> opl OP_STACK_SPECIAL, OP_3, OP_END ; idx=61, ofs=C0h, used=1 72 000000B7 1200 <2> opl OP_IMM8_OPTIONAL, OP_END ; idx=62, ofs=C3h, used=2 73 000000B9 170700 <2> opl OP_SHORT, OP_REL8, OP_END ; idx=63, ofs=C5h, used=42 74 000000BC 201D5100 <2> opl OP_STACK_PUSH, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=64, ofs=C8h, used=1 75 000000C0 1E7100 <2> opl OP_M_DST, OP_16+OP_RM, OP_END ; idx=65, ofs=CCh, used=1 76 000000C3 231E510E00 <2> opl OP_M_ALWAYS_16, OP_M_DST, OP_1632+OP_RM, OP_SEGREG, OP_END ; idx=66, ofs=CFh, used=1 77 000000C8 230E1D5100 <2> opl OP_M_ALWAYS_16, OP_SEGREG, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=67, ofs=D4h, used=1 78 000000CD 471D4400 <2> opl OP_ALL+OP_AX, OP_M_SRC, OP_ALL+OP_MOFFS, OP_END ; idx=68, ofs=D9h, used=2 79 000000D1 1E444700 <2> opl OP_M_DST, OP_ALL+OP_MOFFS, OP_ALL+OP_AX, OP_END ; idx=69, ofs=DDh, used=2 80 000000D5 666000 <2> opl OP_8+OP_R_ADD, OP_8+OP_IMM, OP_END ; idx=70, ofs=E1h, used=8 81 000000D8 565000 <2> opl OP_1632+OP_R_ADD, OP_1632+OP_IMM, OP_END ; idx=71, ofs=E4h, used=8 82 000000DB 55161D6100 <2> opl OP_1632+OP_R, OP_SHOSIZ, OP_M_SRC, OP_8+OP_RM, OP_END ; idx=72, ofs=E7h, used=2 83 000000E0 5516 <2> opl OP_1632+OP_R, OP_SHOSIZ ; idx=73, ofs=ECh, used=2 84 000000E2 1D7100 <2> opl OP_M_SRC, OP_16+OP_RM, OP_END ; idx=74, ofs=EEh, used=5 + 2 85 000000E5 114700 <2> opl OP_IMM8, OP_ALL+OP_AX, OP_END ; idx=75, ofs=F1h, used=2 86 000000E8 274700 <2> opl OP_DX, OP_ALL+OP_AX, OP_END ; idx=76, ofs=F4h, used=2 87 000000EB 21 <2> opl OP_STACK_POP ; idx=77, ofs=F7h, used=1 88 000000EC 1E5100 <2> opl OP_M_DST, OP_1632+OP_RM, OP_END ; idx=78, ofs=F8h, used=2 + 1 89 000000EF 2016A000 <2> opl OP_STACK_PUSH, OP_SHOSIZ, OP_1632_DEFAULT+OP_IMM, OP_END ; idx=79, ofs=FBh, used=2 90 000000F3 20160F00 <2> opl OP_STACK_PUSH, OP_SHOSIZ, OP_IMMS8, OP_END ; idx=80, ofs=FFh, used=2 91 000000F7 1F412500 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_1, OP_END ; idx=81, ofs=103h, used=9 92 000000FB 1F412800 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_CL, OP_END ; idx=82, ofs=107h, used=9 93 000000FF 1F411100 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_IMM8, OP_END ; idx=83, ofs=10Bh, used=9 94 00000103 21 <2> opl OP_STACK_POP ; idx=84, ofs=10Fh, used=2 95 00000104 7000 <2> opl OP_16+OP_IMM, OP_END ; idx=85, ofs=110h, used=1 + 2 96 00000106 227000 <2> opl OP_STACK_SPECIAL, OP_16+OP_IMM, OP_END ; idx=86, ofs=112h, used=1 97 00000109 1E6100 <2> opl OP_M_DST, OP_8+OP_RM, OP_END ; idx=87, ofs=115h, used=30 98 0000010C 1F51551100 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_IMM8, OP_END ; idx=88, ofs=118h, used=2 99 00000111 1F51552800 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_CL, OP_END ; idx=89, ofs=11Dh, used=2 100 00000116 575600 <2> opl OP_1632+OP_AX, OP_1632+OP_R_ADD, OP_END ; idx=90, ofs=122h, used=7 101 00000119 565700 <2> opl OP_1632+OP_R_ADD, OP_1632+OP_AX, OP_END ; idx=91, ofs=125h, used=1 102 0000011C 20 <2> opl OP_STACK_PUSH ; idx=92, ofs=128h, used=1 103 0000011D 2C00 <2> opl OP_ES, OP_END ; idx=93, ofs=129h, used=1 + 1 104 0000011F 20 <2> opl OP_STACK_PUSH ; idx=94, ofs=12Bh, used=1 105 00000120 2A00 <2> opl OP_CS, OP_END ; idx=95, ofs=12Ch, used=1 + 1 106 00000122 20 <2> opl OP_STACK_PUSH ; idx=96, ofs=12Eh, used=1 107 00000123 2F00 <2> opl OP_SS, OP_END ; idx=97, ofs=12Fh, used=1 + 1 108 00000125 20 <2> opl OP_STACK_PUSH ; idx=98, ofs=131h, used=1 109 00000126 2B00 <2> opl OP_DS, OP_END ; idx=99, ofs=132h, used=1 + 1 110 00000128 20 <2> opl OP_STACK_PUSH ; idx=100, ofs=134h, used=1 111 00000129 2D00 <2> opl OP_FS, OP_END ; idx=101, ofs=135h, used=1 + 1 112 0000012B 20 <2> opl OP_STACK_PUSH ; idx=102, ofs=137h, used=1 113 0000012C 2E00 <2> opl OP_GS, OP_END ; idx=103, ofs=138h, used=1 + 1 114 0000012E 212C00 <2> opl OP_STACK_POP, OP_ES, OP_END ; idx=104, ofs=13Ah, used=1 115 00000131 212F00 <2> opl OP_STACK_POP, OP_SS, OP_END ; idx=105, ofs=13Dh, used=1 116 00000134 212B00 <2> opl OP_STACK_POP, OP_DS, OP_END ; idx=106, ofs=140h, used=1 117 00000137 212D00 <2> opl OP_STACK_POP, OP_FS, OP_END ; idx=107, ofs=143h, used=1 118 0000013A 212E00 <2> opl OP_STACK_POP, OP_GS, OP_END ; idx=108, ofs=146h, used=1 119 0000013D 830B00 <2> opl OP_32+OP_R_MOD, OP_CR, OP_END ; idx=109, ofs=149h, used=1 120 00000140 0B8300 <2> opl OP_CR, OP_32+OP_R_MOD, OP_END ; idx=110, ofs=14Ch, used=1 121 00000143 830C00 <2> opl OP_32+OP_R_MOD, OP_DR, OP_END ; idx=111, ofs=14Fh, used=1 122 00000146 0C8300 <2> opl OP_DR, OP_32+OP_R_MOD, OP_END ; idx=112, ofs=152h, used=1 123 00000149 830D00 <2> opl OP_32+OP_R_MOD, OP_TR, OP_END ; idx=113, ofs=155h, used=1 124 0000014C 0D8300 <2> opl OP_TR, OP_32+OP_R_MOD, OP_END ; idx=114, ofs=158h, used=1 125 0000014F 141D8100 <2> opl OP_MMX, OP_M_SRC, OP_32+OP_RM, OP_END ; idx=115, ofs=15Bh, used=1 126 00000153 1E811400 <2> opl OP_M_DST, OP_32+OP_RM, OP_MMX, OP_END ; idx=116, ofs=15Fh, used=1 127 00000157 141D9100 <2> opl OP_MMX, OP_M_SRC, OP_64+OP_RM, OP_END ; idx=117, ofs=163h, used=45 128 0000015B 1E911400 <2> opl OP_M_DST, OP_64+OP_RM, OP_MMX, OP_END ; idx=118, ofs=167h, used=1 129 0000015F 151100 <2> opl OP_MMX_MOD, OP_IMM8, OP_END ; idx=119, ofs=16Bh, used=8 130 00000162 550500 <2> opl OP_1632+OP_R, OP_MXX, OP_END ; idx=120, ofs=16Eh, used=1 131 00000165 20 <2> opl OP_STACK_PUSH ; idx=121, ofs=171h, used=1 132 00000166 181DA100 <2> opl OP_NEAR, OP_M_SRC, OP_1632_DEFAULT+OP_RM, OP_END ; idx=122, ofs=172h, used=1 + 1 133 0000016A 551D1C5200 <2> opl OP_1632+OP_R, OP_M_SRC, OP_DOUBLE_M, OP_1632+OP_M, OP_END ; idx=123, ofs=176h, used=1 134 0000016F 221300 <2> opl OP_STACK_SPECIAL, OP_IMM8_INT, OP_END ; idx=124, ofs=17Bh, used=1 135 00000172 17072400 <2> opl OP_SHORT, OP_REL8, OP_E_CX, OP_END ; idx=125, ofs=17Eh, used=5 136 00000176 2100 <2> opl OP_STACK_POP, OP_END ; idx=126, ofs=182h, used=3 137 00000178 2000 <2> opl OP_STACK_PUSH, OP_END ; idx=127, ofs=184h, used=1 138 0000017A 2200 <2> opl OP_STACK_SPECIAL, OP_END ; idx=128, ofs=186h, used=11 139 <2> 140 <2> ASMMOD EQU opidx 141 <2> 142 <2> ;--- Assembler: data on groups. 143 <2> ;--- If > 100h, it's a "0F-prefix" group. 144 <2> 145 <2> align 2, db 0 146 <2> agroups label word 147 0000017C FE00 <2> dw 0FEh ; 0 148 0000017E 8300 <2> dw 083h ; 1 149 00000180 8000 <2> dw 080h ; 2 150 00000182 BA01 <2> dw 1BAh ; 3 151 00000184 FF00 <2> dw 0FFh ; 4 152 00000186 C701 <2> dw 1C7h ; 5 153 00000188 F600 <2> dw 0F6h ; 6 154 0000018A 0101 <2> dw 101h ; 7 155 0000018C 0001 <2> dw 100h ; 8 156 0000018E C600 <2> dw 0C6h ; 9 157 00000190 7101 <2> dw 171h ; 10 158 00000192 7201 <2> dw 172h ; 11 159 00000194 7301 <2> dw 173h ; 12 160 00000196 8F00 <2> dw 08Fh ; 13 161 00000198 D000 <2> dw 0D0h ; 14 162 0000019A D200 <2> dw 0D2h ; 15 163 0000019C C000 <2> dw 0C0h ; 16 164 <2> 165 <2> ;--- List of assembler mnemonics and data. 166 <2> ;--- variant's 1. argument (=a): 167 <2> ;--- if a < 0x100: one byte opcode. 168 <2> ;--- if a >= 0x100 && a < 0x200: two byte "0F"-opcode. 169 <2> ;--- if a >= 0x200 && a < 0x240: fp instruction. 170 <2> ;--- if a >= 0x240: refers to agroups [macro AGRP() is used]. 171 <2> ;--- variant's 2. argument is index into array opindex. 172 <2> 173 <2> mnlist label near 174 <2> mnsuffix 175 <2> 176 <2> mne A32, ASM_SPECIAL ; ofs=0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000000 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000019E 0300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001A0 413332 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 177 <2> mne A16, ASM_SPECIAL ; ofs=2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000001 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001A3 1300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001A5 413136 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 178 <2> mne O32, ASM_SPECIAL ; ofs=4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000002 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001A8 2300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001AA 4F3332 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 179 <2> mne O16, ASM_SPECIAL ; ofs=6h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000003 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001AD 3300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001AF 4F3136 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 180 <2> mne BOXCB ; ofs=8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001B2 4500 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001B4 424F584342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 181 00000004 F4321C <2> variant AGRP(0,7), 85 182 00000007 FF <2> endvariant 183 <2> mne AAA ; ofs=Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001B9 8300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001BB 414141 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 184 00000008 1BB7 <2> variant 037h, 0 185 0000000A FF <2> endvariant 186 <2> mne AAD, ASM_SPECIAL ; ofs=Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000000B FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001BE B300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001C0 414144 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 187 0000000C 6B93 <2> variant 0D5h, 62 188 0000000E FF <2> endvariant 189 <2> mne AAM, ASM_SPECIAL ; ofs=13h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000000F FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001C3 F300 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001C5 41414D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 190 00000010 6B12 <2> variant 0D4h, 62 191 00000012 FF <2> endvariant 192 <2> mne AAS ; ofs=17h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001C8 3301 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001CA 414153 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 193 00000013 1FBF <2> variant 03Fh, 0 194 00000015 FF <2> endvariant 195 <2> mne ADC ; ofs=1Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001CD 6301 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001CF 414443 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 196 00000016 FBF4334F <2> variant AGRP(1,2), 5, ASM_LOCKABLE 197 0000001A 0A15 <2> variant 014h, 1 198 0000001C FBF43754 <2> variant AGRP(2,2), 2, ASM_LOCKABLE 199 00000020 FB0817 <2> variant 010h, 7, ASM_LOCKABLE 200 00000023 091C <2> variant 012h, 10 201 00000025 FF <2> endvariant 202 <2> mne ADD ; ofs=2Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001D2 6302 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001D4 414444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 203 00000026 FBF4324D <2> variant AGRP(1,0), 5, ASM_LOCKABLE 204 0000002A 0205 <2> variant 004h, 1 205 0000002C FBF43652 <2> variant AGRP(2,0), 2, ASM_LOCKABLE 206 00000030 FB0007 <2> variant 000h, 7, ASM_LOCKABLE 207 00000033 010C <2> variant 002h, 10 208 00000035 FF <2> endvariant 209 <2> mne AND ; ofs=3Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001D7 6303 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001D9 414E44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 210 00000036 FBF43451 <2> variant AGRP(1,4), 5, ASM_LOCKABLE 211 0000003A 1225 <2> variant 024h, 1 212 0000003C FBF43856 <2> variant AGRP(2,4), 2, ASM_LOCKABLE 213 00000040 FB1027 <2> variant 020h, 7, ASM_LOCKABLE 214 00000043 112C <2> variant 022h, 10 215 00000045 FF <2> endvariant 216 <2> mne ARPL ; ofs=4Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001DC 6404 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001DE 4152504C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 217 00000046 F631F1 <2> variant 063h, 14, ASM_MACH2 218 00000049 FF <2> endvariant 219 <2> mne BOUND ; ofs=4Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001E2 A504 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001E4 424F554E44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 220 0000004A F531DD <2> variant 062h, 123, ASM_MACH1 221 0000004D FF <2> endvariant 222 <2> mne BSF ; ofs=52h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001E9 E304 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001EB 425346 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 223 0000004E F7DFCC <2> variant 1BCh, 16, ASM_MACH3 224 00000051 FF <2> endvariant 225 <2> mne BSR ; ofs=56h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001EE 2305 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001F0 425352 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 226 00000052 F7E04D <2> variant 1BDh, 16, ASM_MACH3 227 00000055 FF <2> endvariant 228 <2> mne BSWAP, ASM_D32 ; ofs=5Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000056 FD <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001F3 6505 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001F5 4253574150 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 229 00000057 F8E5D9 <2> variant 1C8h, 17, ASM_MACH4 230 0000005A FF <2> endvariant 231 <2> mne BT ; ofs=5Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001FA B205 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000001FC 4254 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 232 0000005B F7D336 <2> variant 1A3h, 19, ASM_MACH3 233 0000005E F7F43C72 <2> variant AGRP(3,4), 22, ASM_MACH3 234 00000062 FF <2> endvariant 235 <2> mne BTC ; ofs=67h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000001FE 3306 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000200 425443 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 236 00000063 FBF7DF4D <2> variant 1BBh, 18, ASM_LOCKABLE, ASM_MACH3 237 00000067 FBF7F43DF3 <2> variant AGRP(3,7), 20, ASM_LOCKABLE, ASM_MACH3 238 0000006C FF <2> endvariant 239 <2> mne BTR ; ofs=71h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000203 D306 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000205 425452 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 240 0000006D FBF7DB45 <2> variant 1B3h, 18, ASM_LOCKABLE, ASM_MACH3 241 00000071 FBF7F43D72 <2> variant AGRP(3,6), 20, ASM_LOCKABLE, ASM_MACH3 242 00000076 FF <2> endvariant 243 <2> mne BTS ; ofs=7Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000208 7307 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000020A 425453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 244 00000077 FBF7D73D <2> variant 1ABh, 18, ASM_LOCKABLE, ASM_MACH3 245 0000007B FBF7F43CF1 <2> variant AGRP(3,5), 20, ASM_LOCKABLE, ASM_MACH3 246 00000080 FF <2> endvariant 247 <2> mne CALL ; ofs=85h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000020D 1408 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000020F 43414C4C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 248 00000081 74FF <2> variant 0E8h, 23 249 00000083 F43FDB <2> variant AGRP(4,2), 121 250 00000086 F43FFE <2> variant AGRP(4,3), 27 251 00000089 4DB3 <2> variant 09Ah, 25 252 0000008B FF <2> endvariant 253 <2> mne CBW, ASM_D16 ; ofs=90h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000008C FC <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000213 C308 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000215 434257 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 254 <2> mne CWDE, ASM_D32 ; ofs=91h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000008D FD <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000218 D408 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000021A 43574445 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 255 0000008E 4C98 <2> variant 098h, 0 256 00000090 FF <2> endvariant 257 <2> mne CLC ; ofs=95h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000021E 1309 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000220 434C43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 258 00000091 7CF8 <2> variant 0F8h, 0 259 00000093 FF <2> endvariant 260 <2> mne CLD ; ofs=98h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000223 4309 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000225 434C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 261 00000094 7EFC <2> variant 0FCh, 0 262 00000096 FF <2> endvariant 263 <2> mne CLI ; ofs=9Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000228 7309 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000022A 434C49 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 264 00000097 7DFA <2> variant 0FAh, 0 265 00000099 FF <2> endvariant 266 <2> mne CLTS ; ofs=9Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000022D A409 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000022F 434C5453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 267 0000009A F68406 <2> variant 106h, 0, ASM_MACH2 268 0000009D FF <2> endvariant 269 <2> mne CMC ; ofs=A2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000233 E309 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000235 434D43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 270 0000009E 7B75 <2> variant 0F5h, 0 271 000000A0 FF <2> endvariant 272 <2> mne CMOVA ; ofs=A5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000238 150A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000023A 434D4F5641 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 273 000000A1 FAA4D7 <2> variant 147h, 16, ASM_MACH6 274 000000A4 FF <2> endvariant 275 <2> mne CMOVAE ; ofs=A9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000023F 560A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000241 434D4F564145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 276 000000A5 FAA2D3 <2> variant 143h, 16, ASM_MACH6 277 000000A8 FF <2> endvariant 278 <2> mne CMOVB ; ofs=ADh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000247 950A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000249 434D4F5642 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 279 000000A9 FAA252 <2> variant 142h, 16, ASM_MACH6 280 000000AC FF <2> endvariant 281 <2> mne CMOVBE ; ofs=B1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000024E D60A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000250 434D4F564245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 282 000000AD FAA456 <2> variant 146h, 16, ASM_MACH6 283 000000B0 FF <2> endvariant 284 <2> mne CMOVC ; ofs=B5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000256 150B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000258 434D4F5643 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 285 000000B1 FAA252 <2> variant 142h, 16, ASM_MACH6 286 000000B4 FF <2> endvariant 287 <2> mne CMOVE ; ofs=B9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000025D 550B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000025F 434D4F5645 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 288 000000B5 FAA354 <2> variant 144h, 16, ASM_MACH6 289 000000B8 FF <2> endvariant 290 <2> mne CMOVG ; ofs=BDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000264 950B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000266 434D4F5647 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 291 000000B9 FAA8DF <2> variant 14Fh, 16, ASM_MACH6 292 000000BC FF <2> endvariant 293 <2> mne CMOVGE ; ofs=C1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000026B D60B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000026D 434D4F564745 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 294 000000BD FAA7DD <2> variant 14Dh, 16, ASM_MACH6 295 000000C0 FF <2> endvariant 296 <2> mne CMOVL ; ofs=C5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000273 150C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000275 434D4F564C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 297 000000C1 FAA75C <2> variant 14Ch, 16, ASM_MACH6 298 000000C4 FF <2> endvariant 299 <2> mne CMOVLE ; ofs=C9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000027A 560C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000027C 434D4F564C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 300 000000C5 FAA85E <2> variant 14Eh, 16, ASM_MACH6 301 000000C8 FF <2> endvariant 302 <2> mne CMOVNA ; ofs=CDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000282 960C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000284 434D4F564E41 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 303 000000C9 FAA456 <2> variant 146h, 16, ASM_MACH6 304 000000CC FF <2> endvariant 305 <2> mne CMOVNAE ; ofs=D1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000028A D70C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000028C 434D4F564E4145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 306 000000CD FAA252 <2> variant 142h, 16, ASM_MACH6 307 000000D0 FF <2> endvariant 308 <2> mne CMOVNB ; ofs=D5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000293 160D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000295 434D4F564E42 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 309 000000D1 FAA2D3 <2> variant 143h, 16, ASM_MACH6 310 000000D4 FF <2> endvariant 311 <2> mne CMOVNBE ; ofs=D9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000029B 570D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000029D 434D4F564E4245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 312 000000D5 FAA4D7 <2> variant 147h, 16, ASM_MACH6 313 000000D8 FF <2> endvariant 314 <2> mne CMOVNC ; ofs=DDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002A4 960D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002A6 434D4F564E43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 315 000000D9 FAA2D3 <2> variant 143h, 16, ASM_MACH6 316 000000DC FF <2> endvariant 317 <2> mne CMOVNE ; ofs=E1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002AC D60D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002AE 434D4F564E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 318 000000DD FAA3D5 <2> variant 145h, 16, ASM_MACH6 319 000000E0 FF <2> endvariant 320 <2> mne CMOVNG ; ofs=E5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002B4 160E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002B6 434D4F564E47 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 321 000000E1 FAA85E <2> variant 14Eh, 16, ASM_MACH6 322 000000E4 FF <2> endvariant 323 <2> mne CMOVNGE ; ofs=E9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002BC 570E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002BE 434D4F564E4745 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 324 000000E5 FAA75C <2> variant 14Ch, 16, ASM_MACH6 325 000000E8 FF <2> endvariant 326 <2> mne CMOVNL ; ofs=EDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002C5 960E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002C7 434D4F564E4C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 327 000000E9 FAA7DD <2> variant 14Dh, 16, ASM_MACH6 328 000000EC FF <2> endvariant 329 <2> mne CMOVNLE ; ofs=F1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002CD D70E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002CF 434D4F564E4C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 330 000000ED FAA8DF <2> variant 14Fh, 16, ASM_MACH6 331 000000F0 FF <2> endvariant 332 <2> mne CMOVNO ; ofs=F5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002D6 160F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002D8 434D4F564E4F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 333 000000F1 FAA1D1 <2> variant 141h, 16, ASM_MACH6 334 000000F4 FF <2> endvariant 335 <2> mne CMOVNP ; ofs=F9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002DE 560F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002E0 434D4F564E50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 336 000000F5 FAA6DB <2> variant 14Bh, 16, ASM_MACH6 337 000000F8 FF <2> endvariant 338 <2> mne CMOVNS ; ofs=FDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002E6 960F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002E8 434D4F564E53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 339 000000F9 FAA5D9 <2> variant 149h, 16, ASM_MACH6 340 000000FC FF <2> endvariant 341 <2> mne CMOVNZ ; ofs=101h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002EE D60F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002F0 434D4F564E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 342 000000FD FAA3D5 <2> variant 145h, 16, ASM_MACH6 343 00000100 FF <2> endvariant 344 <2> mne CMOVO ; ofs=105h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002F6 1510 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002F8 434D4F564F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 345 00000101 FAA150 <2> variant 140h, 16, ASM_MACH6 346 00000104 FF <2> endvariant 347 <2> mne CMOVP ; ofs=109h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000002FD 5510 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000002FF 434D4F5650 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 348 00000105 FAA65A <2> variant 14Ah, 16, ASM_MACH6 349 00000108 FF <2> endvariant 350 <2> mne CMOVPE ; ofs=10Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000304 9610 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000306 434D4F565045 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 351 00000109 FAA65A <2> variant 14Ah, 16, ASM_MACH6 352 0000010C FF <2> endvariant 353 <2> mne CMOVPO ; ofs=111h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000030C D610 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000030E 434D4F56504F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 354 0000010D FAA6DB <2> variant 14Bh, 16, ASM_MACH6 355 00000110 FF <2> endvariant 356 <2> mne CMOVS ; ofs=115h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000314 1511 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000316 434D4F5653 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 357 00000111 FAA558 <2> variant 148h, 16, ASM_MACH6 358 00000114 FF <2> endvariant 359 <2> mne CMOVZ ; ofs=119h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000031B 5511 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000031D 434D4F565A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 360 00000115 FAA354 <2> variant 144h, 16, ASM_MACH6 361 00000118 FF <2> endvariant 362 <2> mne CMP ; ofs=11Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000322 9311 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000324 434D50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 363 00000119 F435D5 <2> variant AGRP(1,7), 6 364 0000011C 1E3D <2> variant 03Ch, 1 365 0000011E F439DA <2> variant AGRP(2,7), 3 366 00000121 1C40 <2> variant 038h, 8 367 00000123 1D44 <2> variant 03Ah, 10 368 00000125 FF <2> endvariant 369 <2> mne CMPSB ; ofs=12Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000327 6512 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000329 434D505342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 370 00000126 53A6 <2> variant 0A6h, 0 371 00000128 FF <2> endvariant 372 <2> mne CMPXCHG ; ofs=130h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000032E 9712 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000330 434D5058434847 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 373 00000129 FBF8D9B7 <2> variant 1B0h, 7, ASM_LOCKABLE, ASM_MACH4 374 0000012D FF <2> endvariant 375 <2> mne CMPXCHG8B ; ofs=135h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000337 E912 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000339 434D50584348473842 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 376 0000012E F9F44306 <2> variant AGRP(5,1), 29, ASM_MACH5 377 00000132 FF <2> endvariant 378 <2> mne CPUID ; ofs=13Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000342 3513 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000344 4350554944 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 379 00000133 F9D2A2 <2> variant 1A2h, 0, ASM_MACH5 380 00000136 FF <2> endvariant 381 <2> mne CWD, ASM_D16 ; ofs=13Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000137 FC <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000349 7313 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000034B 435744 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 382 <2> mne CDQ, ASM_D32 ; ofs=13Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000138 FD <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000034E 8313 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000350 434451 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 383 00000139 4D19 <2> variant 099h, 0 384 0000013B FF <2> endvariant 385 <2> mne DAA ; ofs=143h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000353 C313 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000355 444141 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 386 0000013C 13A7 <2> variant 027h, 0 387 0000013E FF <2> endvariant 388 <2> mne DAS ; ofs=146h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000358 F313 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000035A 444153 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 389 0000013F 17AF <2> variant 02Fh, 0 390 00000141 FF <2> endvariant 391 <2> mne DB, ASM_SPECIAL ; ofs=149h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000142 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000035D 2214 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000035F 4442 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 392 <2> mne DD, ASM_SPECIAL ; ofs=14Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000143 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000361 3214 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000363 4444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 393 <2> mne DEC ; ofs=14Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000365 4314 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000367 444543 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 394 00000144 2469 <2> variant 048h, 33 395 00000146 FBF42ECE <2> variant AGRP(0,1), 13, ASM_LOCKABLE 396 0000014A FF <2> endvariant 397 <2> mne DIV ; ofs=154h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000036A B314 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000036C 444956 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 398 0000014B F44981 <2> variant AGRP(6,6), 11 399 0000014E FF <2> endvariant 400 <2> mne DW, ASM_SPECIAL ; ofs=158h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000014F FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000036F F214 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000371 4457 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 401 <2> mne EMMS ; ofs=15Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000373 0415 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000375 454D4D53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 402 00000150 F9BCF7 <2> variant 177h, 0, ASM_MACH5 403 00000153 FF <2> endvariant 404 <2> mne F2XM1 ; ofs=162h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000379 4515 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000037B 4632584D31 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 405 00000154 6D59F0 <2> fpvariant 0D9h, 0, 0F0h 406 00000157 FF <2> endvariant 407 <2> mne FABS ; ofs=166h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000380 8415 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000382 46414253 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 408 00000158 6D59E1 <2> fpvariant 0D9h, 0, 0E1h 409 0000015B FF <2> endvariant 410 <2> mne FADD ; ofs=16Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000386 C415 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000388 46414444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 411 0000015C F40E24 <2> variant 200h, 36 412 0000015F F4102A <2> variant 204h, 38 413 00000162 6D00C0 <2> fpvariant 0D8h, 40, 0C0h 414 00000165 6F07C0 <2> fpvariant 0DCh, 43, 0C0h 415 00000168 FF <2> endvariant 416 <2> mne FADDP ; ofs=177h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000038C 9516 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000038E 4641444450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 417 00000169 7008C0 <2> fpvariant 0DEh, 42, 0C0h 418 0000016C 6FDEC1 <2> fpvariant 0DEh, 0, 0C1h 419 0000016F FF <2> endvariant 420 <2> mne FIADD ; ofs=17Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000393 0517 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000395 4649414444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 421 00000170 F40F2E <2> variant 202h, 44 422 00000173 F41134 <2> variant 206h, 46 423 00000176 FF <2> endvariant 424 <2> mne FBLD ; ofs=185h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000039A 7417 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000039C 46424C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 425 00000177 F421D7 <2> variant 227h, 48 426 0000017A FF <2> endvariant 427 <2> mne FBSTP ; ofs=189h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003A0 B517 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003A2 4642535450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 428 0000017B F429E8 <2> variant 237h, 49 429 0000017E FF <2> endvariant 430 <2> mne FCHS ; ofs=18Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003A7 F417 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003A9 46434853 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 431 0000017F 6D59E0 <2> fpvariant 0D9h, 0, 0E0h 432 00000182 FF <2> endvariant 433 <2> mne FCLEX, ASM_WAIT ; ofs=191h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000183 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003AD 3518 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003AF 46434C4558 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 434 <2> mne FNCLEX ; ofs=192h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003B4 4618 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003B6 464E434C4558 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 435 00000184 6E5BE2 <2> fpvariant 0DBh, 0, 0E2h 436 00000187 FF <2> endvariant 437 <2> mne FCMOVA ; ofs=196h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003BC 8618 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003BE 46434D4F5641 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 438 00000188 FA6E83D0 <2> fpvariant 0DBh, 40, 0D0h, ASM_MACH6 439 0000018C FF <2> endvariant 440 <2> mne FCMOVAE ; ofs=19Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003C4 D718 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003C6 46434D4F564145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 441 0000018D FA6E83C0 <2> fpvariant 0DBh, 40, 0C0h, ASM_MACH6 442 00000191 FF <2> endvariant 443 <2> mne FCMOVB ; ofs=1A0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003CD 2619 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003CF 46434D4F5642 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 444 00000192 FA6E02C0 <2> fpvariant 0DAh, 40, 0C0h, ASM_MACH6 445 00000196 FF <2> endvariant 446 <2> mne FCMOVBE ; ofs=1A5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003D5 7719 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003D7 46434D4F564245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 447 00000197 FA6E02D0 <2> fpvariant 0DAh, 40, 0D0h, ASM_MACH6 448 0000019B FF <2> endvariant 449 <2> mne FCMOVE ; ofs=1AAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003DE C619 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003E0 46434D4F5645 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 450 0000019C FA6E02C8 <2> fpvariant 0DAh, 40, 0C8h, ASM_MACH6 451 000001A0 FF <2> endvariant 452 <2> mne FCMOVNA ; ofs=1AFh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003E6 171A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003E8 46434D4F564E41 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 453 000001A1 FA6E02D0 <2> fpvariant 0DAh, 40, 0D0h, ASM_MACH6 454 000001A5 FF <2> endvariant 455 <2> mne FCMOVNAE ; ofs=1B4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003EF 681A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003F1 46434D4F564E4145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 456 000001A6 FA6E02C0 <2> fpvariant 0DAh, 40, 0C0h, ASM_MACH6 457 000001AA FF <2> endvariant 458 <2> mne FCMOVNB ; ofs=1B9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000003F9 B71A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000003FB 46434D4F564E42 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 459 000001AB FA6E83C0 <2> fpvariant 0DBh, 40, 0C0h, ASM_MACH6 460 000001AF FF <2> endvariant 461 <2> mne FCMOVNBE ; ofs=1BEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000402 081B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000404 46434D4F564E4245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 462 000001B0 FA6E83D0 <2> fpvariant 0DBh, 40, 0D0h, ASM_MACH6 463 000001B4 FF <2> endvariant 464 <2> mne FCMOVNE ; ofs=1C3h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000040C 571B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000040E 46434D4F564E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 465 000001B5 FA6E83C8 <2> fpvariant 0DBh, 40, 0C8h, ASM_MACH6 466 000001B9 FF <2> endvariant 467 <2> mne FCMOVNU ; ofs=1C8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000415 A71B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000417 46434D4F564E55 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 468 000001BA FA6E83D8 <2> fpvariant 0DBh, 40, 0D8h, ASM_MACH6 469 000001BE FF <2> endvariant 470 <2> mne FCMOVNZ ; ofs=1CDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000041E F71B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000420 46434D4F564E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 471 000001BF FA6E83C8 <2> fpvariant 0DBh, 40, 0C8h, ASM_MACH6 472 000001C3 FF <2> endvariant 473 <2> mne FCMOVU ; ofs=1D2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000427 461C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000429 46434D4F5655 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 474 000001C4 FA6E02D8 <2> fpvariant 0DAh, 40, 0D8h, ASM_MACH6 475 000001C8 FF <2> endvariant 476 <2> mne FCMOVZ ; ofs=1D7h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000042F 961C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000431 46434D4F565A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 477 000001C9 FA6E02C8 <2> fpvariant 0DAh, 40, 0C8h, ASM_MACH6 478 000001CD FF <2> endvariant 479 <2> mne FCOM ; ofs=1DCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000437 E41C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000439 46434F4D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 480 000001CE F41634 <2> variant 210h, 36 481 000001D1 F4183A <2> variant 214h, 38 482 000001D4 6D0AD0 <2> fpvariant 0D8h, 50, 0D0h 483 000001D7 6CD8D1 <2> fpvariant 0D8h, 0, 0D1h 484 000001DA FF <2> endvariant 485 <2> mne FCOMI ; ofs=1E9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000043D B51D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000043F 46434F4D49 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 486 000001DB FA6E8DF0 <2> fpvariant 0DBh, 50, 0F0h, ASM_MACH6 487 000001DF FA6E5BF1 <2> fpvariant 0DBh, 0, 0F1h, ASM_MACH6 488 000001E3 FF <2> endvariant 489 <2> mne FCOMIP ; ofs=1F2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000444 461E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000446 46434F4D4950 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 490 000001E4 FA7091F0 <2> fpvariant 0DFh, 50, 0F0h, ASM_MACH6 491 000001E8 FA705FF1 <2> fpvariant 0DFh, 0, 0F1h, ASM_MACH6 492 000001EC FF <2> endvariant 493 <2> mne FCOMP ; ofs=1FBh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000044C D51E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000044E 46434F4D50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 494 000001ED F41A3C <2> variant 218h, 36 495 000001F0 F41C42 <2> variant 21Ch, 38 496 000001F3 6D0AD8 <2> fpvariant 0D8h, 50, 0D8h 497 000001F6 6CD8D9 <2> fpvariant 0D8h, 0, 0D9h 498 000001F9 FF <2> endvariant 499 <2> mne FCOMPP ; ofs=208h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000453 A61F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000455 46434F4D5050 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 500 000001FA 6FDED9 <2> fpvariant 0DEh, 0, 0D9h 501 000001FD FF <2> endvariant 502 <2> mne FCOS ; ofs=20Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000045B E41F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000045D 46434F53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 503 000001FE F76D59FF <2> fpvariant 0D9h, 0, 0FFh, ASM_MACH3 504 00000202 FF <2> endvariant 505 <2> mne FDECSTP ; ofs=211h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000461 3720 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000463 46444543535450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 506 00000203 6D59F6 <2> fpvariant 0D9h, 0, 0F6h 507 00000206 FF <2> endvariant 508 <2> mne FDISI, ASM_WAIT ; ofs=215h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000207 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000046A 7520 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000046C 4644495349 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 509 <2> mne FNDISI ; ofs=216h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000471 8620 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000473 464E44495349 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 510 00000208 6E5BE1 <2> fpvariant 0DBh, 0, 0E1h 511 0000020B FF <2> endvariant 512 <2> mne FDIV ; ofs=21Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000479 C420 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000047B 46444956 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 513 0000020C F42654 <2> variant 230h, 36 514 0000020F F4285A <2> variant 234h, 38 515 00000212 6D00F0 <2> fpvariant 0D8h, 40, 0F0h 516 00000215 6F07F8 <2> fpvariant 0DCh, 43, 0F8h 517 00000218 FF <2> endvariant 518 <2> mne FDIVP ; ofs=227h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000047F 9521 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000481 4644495650 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 519 00000219 7008F8 <2> fpvariant 0DEh, 42, 0F8h 520 0000021C 6FDEF9 <2> fpvariant 0DEh, 0, 0F9h 521 0000021F FF <2> endvariant 522 <2> mne FIDIV ; ofs=22Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000486 0522 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000488 4649444956 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 523 00000220 F4275E <2> variant 232h, 44 524 00000223 F42964 <2> variant 236h, 46 525 00000226 FF <2> endvariant 526 <2> mne FDIVR ; ofs=235h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000048D 7522 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000048F 4644495652 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 527 00000227 F42A5C <2> variant 238h, 36 528 0000022A F42C62 <2> variant 23Ch, 38 529 0000022D 6D00F8 <2> fpvariant 0D8h, 40, 0F8h 530 00000230 6F07F0 <2> fpvariant 0DCh, 43, 0F0h 531 00000233 FF <2> endvariant 532 <2> mne FDIVRP ; ofs=242h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000494 4623 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000496 464449565250 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 533 00000234 7008F0 <2> fpvariant 0DEh, 42, 0F0h 534 00000237 6FDEF1 <2> fpvariant 0DEh, 0, 0F1h 535 0000023A FF <2> endvariant 536 <2> mne FIDIVR ; ofs=249h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000049C B623 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000049E 464944495652 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 537 0000023B F42B66 <2> variant 23Ah, 44 538 0000023E F42D6C <2> variant 23Eh, 46 539 00000241 FF <2> endvariant 540 <2> mne FENI, ASM_WAIT ; ofs=250h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000242 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004A4 2424 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004A6 46454E49 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 541 <2> mne FNENI ; ofs=251h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004AA 3524 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004AC 464E454E49 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 542 00000243 6E5BE0 <2> fpvariant 0DBh, 0, 0E0h 543 00000246 FF <2> endvariant 544 <2> mne FFREE ; ofs=255h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004B1 7524 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004B3 4646524545 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 545 00000247 6F86C0 <2> fpvariant 0DDh, 41, 0C0h 546 0000024A FF <2> endvariant 547 <2> mne FICOM ; ofs=259h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004B8 B524 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004BA 4649434F4D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 548 0000024B F4173E <2> variant 212h, 44 549 0000024E F41944 <2> variant 216h, 46 550 00000251 FF <2> endvariant 551 <2> mne FICOMP ; ofs=260h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004BF 2625 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004C1 4649434F4D50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 552 00000252 F41B46 <2> variant 21Ah, 44 553 00000255 F41D4C <2> variant 21Eh, 46 554 00000258 FF <2> endvariant 555 <2> mne FILD ; ofs=267h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004C7 9425 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004C9 46494C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 556 00000259 F40FAF <2> variant 203h, 44 557 0000025C F411B5 <2> variant 207h, 46 558 0000025F F425CD <2> variant 22Fh, 30 559 00000262 FF <2> endvariant 560 <2> mne FINCSTP ; ofs=271h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004CD 3726 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004CF 46494E43535450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 561 00000263 6D59F7 <2> fpvariant 0D9h, 0, 0F7h 562 00000266 FF <2> endvariant 563 <2> mne FINIT, ASM_WAIT ; ofs=275h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000267 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004D6 7526 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004D8 46494E4954 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 564 <2> mne FNINIT ; ofs=276h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004DD 8626 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004DF 464E494E4954 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 565 00000268 6E5BE3 <2> fpvariant 0DBh, 0, 0E3h 566 0000026B FF <2> endvariant 567 <2> mne FIST ; ofs=27Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004E5 C426 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004E7 46495354 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 568 0000026C F417C0 <2> variant 213h, 45 569 0000026F F419C6 <2> variant 217h, 47 570 00000272 FF <2> endvariant 571 <2> mne FISTP ; ofs=281h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004EB 3527 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004ED 4649535450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 572 00000273 F41BC8 <2> variant 21Bh, 45 573 00000276 F41DCE <2> variant 21Fh, 47 574 00000279 F42DDE <2> variant 23Fh, 31 575 0000027C FF <2> endvariant 576 <2> mne FLD ; ofs=28Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004F2 D327 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004F4 464C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 577 0000027D F40EA5 <2> variant 201h, 36 578 00000280 F410AB <2> variant 205h, 38 579 00000283 F423DB <2> variant 22Bh, 48 580 00000286 6D82C0 <2> fpvariant 0D9h, 41, 0C0h 581 00000289 FF <2> endvariant 582 <2> mne FLD1 ; ofs=298h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004F7 A428 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004F9 464C4431 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 583 0000028A 6D59E8 <2> fpvariant 0D9h, 0, 0E8h 584 0000028D FF <2> endvariant 585 <2> mne FLDL2T ; ofs=29Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000004FD E628 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000004FF 464C444C3254 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 586 0000028E 6D59E9 <2> fpvariant 0D9h, 0, 0E9h 587 00000291 FF <2> endvariant 588 <2> mne FLDL2E ; ofs=2A0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000505 2629 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000507 464C444C3245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 589 00000292 6D59EA <2> fpvariant 0D9h, 0, 0EAh 590 00000295 FF <2> endvariant 591 <2> mne FLDPI ; ofs=2A4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000050D 6529 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000050F 464C445049 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 592 00000296 6D59EB <2> fpvariant 0D9h, 0, 0EBh 593 00000299 FF <2> endvariant 594 <2> mne FLDLG2 ; ofs=2A8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000514 A629 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000516 464C444C4732 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 595 0000029A 6D59EC <2> fpvariant 0D9h, 0, 0ECh 596 0000029D FF <2> endvariant 597 <2> mne FLDLN2 ; ofs=2ACh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000051C E629 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000051E 464C444C4E32 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 598 0000029E 6D59ED <2> fpvariant 0D9h, 0, 0EDh 599 000002A1 FF <2> endvariant 600 <2> mne FLDZ ; ofs=2B0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000524 242A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000526 464C445A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 601 000002A2 6D59EE <2> fpvariant 0D9h, 0, 0EEh 602 000002A5 FF <2> endvariant 603 <2> mne FLDCW, ASM_WAIT ; ofs=2B4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000002A6 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000052A 652A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000052C 464C444357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 604 <2> mne FNLDCW ; ofs=2B5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000531 762A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000533 464E4C444357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 605 000002A7 F422D7 <2> variant 229h, 46 606 000002AA FF <2> endvariant 607 <2> mne FMUL ; ofs=2BDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000539 B42A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000053B 464D554C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 608 000002AB F4122C <2> variant 208h, 36 609 000002AE F41432 <2> variant 20Ch, 38 610 000002B1 6D00C8 <2> fpvariant 0D8h, 40, 0C8h 611 000002B4 6F07C8 <2> fpvariant 0DCh, 43, 0C8h 612 000002B7 FF <2> endvariant 613 <2> mne FMULP ; ofs=2CAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000053F 852B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000541 464D554C50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 614 000002B8 7008C8 <2> fpvariant 0DEh, 42, 0C8h 615 000002BB 6FDEC9 <2> fpvariant 0DEh, 0, 0C9h 616 000002BE FF <2> endvariant 617 <2> mne FIMUL ; ofs=2D1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000546 F52B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000548 46494D554C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 618 000002BF F41336 <2> variant 20Ah, 44 619 000002C2 F4153C <2> variant 20Eh, 46 620 000002C5 FF <2> endvariant 621 <2> mne FNOP ; ofs=2D8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000054D 642C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000054F 464E4F50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 622 000002C6 6D59D0 <2> fpvariant 0D9h, 0, 0D0h 623 000002C9 FF <2> endvariant 624 <2> mne FPATAN ; ofs=2DCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000553 A62C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000555 46504154414E <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 625 000002CA 6D59F3 <2> fpvariant 0D9h, 0, 0F3h 626 000002CD FF <2> endvariant 627 <2> mne FPREM ; ofs=2E0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000055B E52C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000055D 465052454D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 628 000002CE 6D59F8 <2> fpvariant 0D9h, 0, 0F8h 629 000002D1 FF <2> endvariant 630 <2> mne FPREM1 ; ofs=2E4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000562 262D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000564 465052454D31 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 631 000002D2 F76D59F5 <2> fpvariant 0D9h, 0, 0F5h, ASM_MACH3 632 000002D6 FF <2> endvariant 633 <2> mne FPTAN ; ofs=2E9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000056A 752D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000056C 465054414E <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 634 000002D7 6D59F2 <2> fpvariant 0D9h, 0, 0F2h 635 000002DA FF <2> endvariant 636 <2> mne FRNDINT ; ofs=2EDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000571 B72D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000573 46524E44494E54 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 637 000002DB 6D59FC <2> fpvariant 0D9h, 0, 0FCh 638 000002DE FF <2> endvariant 639 <2> mne FSCALE ; ofs=2FAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000057A F62D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000057C 465343414C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 640 000002DF 6D59FD <2> fpvariant 0D9h, 0, 0FDh 641 000002E2 FF <2> endvariant 642 <2> mne FSETPM, ASM_WAIT ; ofs=2FEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000002E3 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000582 362E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000584 46534554504D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 643 <2> mne FNSETPM ; ofs=2FFh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000058A 472E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000058C 464E534554504D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 644 000002E4 F66E5BE4 <2> fpvariant 0DBh, 0, 0E4h, ASM_MACH2 645 000002E8 FF <2> endvariant 646 <2> mne FSIN ; ofs=304h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000593 942E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000595 4653494E <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 647 000002E9 F76D59FE <2> fpvariant 0D9h, 0, 0FEh, ASM_MACH3 648 000002ED FF <2> endvariant 649 <2> mne FSINCOS ; ofs=309h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000599 E72E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000059B 4653494E434F53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 650 000002EE F76D59FB <2> fpvariant 0D9h, 0, 0FBh, ASM_MACH3 651 000002F2 FF <2> endvariant 652 <2> mne FSQRT ; ofs=30Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005A2 352F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005A4 4653515254 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 653 000002F3 6D59FA <2> fpvariant 0D9h, 0, 0FAh 654 000002F6 FF <2> endvariant 655 <2> mne FST ; ofs=312h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005A9 732F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005AB 465354 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 656 000002F7 F416B6 <2> variant 211h, 37 657 000002FA F418BC <2> variant 215h, 39 658 000002FD 6F86D0 <2> fpvariant 0DDh, 41, 0D0h 659 00000300 FF <2> endvariant 660 <2> mne FSTP ; ofs=31Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005AE 1430 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005B0 46535450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 661 00000301 F41ABE <2> variant 219h, 37 662 00000304 F41CC4 <2> variant 21Dh, 39 663 00000307 F42BEC <2> variant 23Bh, 49 664 0000030A 6F86D8 <2> fpvariant 0DDh, 41, 0D8h 665 0000030D FF <2> endvariant 666 <2> mne FSTCW, ASM_WAIT ; ofs=329h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 0000030E FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005B4 E530 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005B6 4653544357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 667 <2> mne FNSTCW ; ofs=32Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005BB F630 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005BD 464E53544357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 668 0000030F F42AE8 <2> variant 239h, 47 669 00000312 FF <2> endvariant 670 <2> mne FSTSW, ASM_WAIT ; ofs=333h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000313 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005C3 3531 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005C5 4653545357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 671 <2> mne FNSTSW ; ofs=334h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005CA 4631 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005CC 464E53545357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 672 00000314 7095E0 <2> fpvariant 0DFh, 54, 0E0h 673 00000317 F42CEC <2> variant 23Dh, 47 674 0000031A FF <2> endvariant 675 <2> mne FSUB ; ofs=33Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005D2 B431 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005D4 46535542 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 676 0000031B F41E44 <2> variant 220h, 36 677 0000031E F4204A <2> variant 224h, 38 678 00000321 6D00E0 <2> fpvariant 0D8h, 40, 0E0h 679 00000324 6F07E8 <2> fpvariant 0DCh, 43, 0E8h 680 00000327 FF <2> endvariant 681 <2> mne FSUBP ; ofs=348h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005D8 8532 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005DA 4653554250 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 682 00000328 7008E8 <2> fpvariant 0DEh, 42, 0E8h 683 0000032B 6FDEE9 <2> fpvariant 0DEh, 0, 0E9h 684 0000032E FF <2> endvariant 685 <2> mne FISUB ; ofs=34Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005DF F532 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005E1 4649535542 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 686 0000032F F41F4E <2> variant 222h, 44 687 00000332 F42154 <2> variant 226h, 46 688 00000335 FF <2> endvariant 689 <2> mne FSUBR ; ofs=356h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005E6 6533 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005E8 4653554252 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 690 00000336 F4224C <2> variant 228h, 36 691 00000339 F42452 <2> variant 22Ch, 38 692 0000033C 6D00E8 <2> fpvariant 0D8h, 40, 0E8h 693 0000033F 6F07E0 <2> fpvariant 0DCh, 43, 0E0h 694 00000342 FF <2> endvariant 695 <2> mne FSUBRP ; ofs=363h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005ED 3634 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005EF 465355425250 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 696 00000343 7008E0 <2> fpvariant 0DEh, 42, 0E0h 697 00000346 6FDEE1 <2> fpvariant 0DEh, 0, 0E1h 698 00000349 FF <2> endvariant 699 <2> mne FISUBR ; ofs=36Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005F5 A634 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005F7 464953554252 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 700 0000034A F42356 <2> variant 22Ah, 44 701 0000034D F4255C <2> variant 22Eh, 46 702 00000350 FF <2> endvariant 703 <2> mne FTST ; ofs=371h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000005FD 1435 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000005FF 46545354 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 704 00000351 6D59E4 <2> fpvariant 0D9h, 0, 0E4h 705 00000354 FF <2> endvariant 706 <2> mne FUCOM ; ofs=375h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000603 5535 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000605 4655434F4D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 707 00000355 F76F8FE0 <2> fpvariant 0DDh, 50, 0E0h, ASM_MACH3 708 00000359 F76F5DE1 <2> fpvariant 0DDh, 0, 0E1h, ASM_MACH3 709 0000035D FF <2> endvariant 710 <2> mne FUCOMI ; ofs=37Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000060A E635 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000060C 4655434F4D49 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 711 0000035E FA6E8DE8 <2> fpvariant 0DBh, 50, 0E8h, ASM_MACH6 712 00000362 FA6E5BE9 <2> fpvariant 0DBh, 0, 0E9h, ASM_MACH6 713 00000366 FF <2> endvariant 714 <2> mne FUCOMIP ; ofs=387h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000612 7736 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000614 4655434F4D4950 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 715 00000367 FA7091E8 <2> fpvariant 0DFh, 50, 0E8h, ASM_MACH6 716 0000036B FA705FE9 <2> fpvariant 0DFh, 0, 0E9h, ASM_MACH6 717 0000036F FF <2> endvariant 718 <2> mne FUCOMP ; ofs=390h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000061B 0637 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000061D 4655434F4D50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 719 00000370 F76F8FE8 <2> fpvariant 0DDh, 50, 0E8h, ASM_MACH3 720 00000374 F76F5DE9 <2> fpvariant 0DDh, 0, 0E9h, ASM_MACH3 721 00000378 FF <2> endvariant 722 <2> mne FUCOMPP ; ofs=399h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000623 9737 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000625 4655434F4D5050 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 723 00000379 F76DDAE9 <2> fpvariant 0DAh, 0, 0E9h, ASM_MACH3 724 0000037D FF <2> endvariant 725 <2> mne FWAIT ; ofs=39Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000062C E537 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000062E 4657414954 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 726 0000037E 4E1B <2> variant 09Bh, 0 727 00000380 FF <2> endvariant 728 <2> mne FXAM ; ofs=3A1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000633 1438 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000635 4658414D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 729 00000381 6D59E5 <2> fpvariant 0D9h, 0, 0E5h 730 00000384 FF <2> endvariant 731 <2> mne FXCH ; ofs=3A5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000639 5438 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000063B 46584348 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 732 00000385 6D8BC8 <2> fpvariant 0D9h, 50, 0C8h 733 00000388 6D59C9 <2> fpvariant 0D9h, 0, 0C9h 734 0000038B FF <2> endvariant 735 <2> mne FXTRACT ; ofs=3ACh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000063F C738 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000641 46585452414354 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 736 0000038C 6D59F4 <2> fpvariant 0D9h, 0, 0F4h 737 0000038F FF <2> endvariant 738 <2> mne FYL2X ; ofs=3B0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000648 0539 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000064A 46594C3258 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 739 00000390 6D59F1 <2> fpvariant 0D9h, 0, 0F1h 740 00000393 FF <2> endvariant 741 <2> mne FYL2XP1 ; ofs=3B4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000064F 4739 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000651 46594C32585031 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 742 00000394 6D59F9 <2> fpvariant 0D9h, 0, 0F9h 743 00000397 FF <2> endvariant 744 <2> mne HLT ; ofs=3B8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000658 8339 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000065A 484C54 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 745 00000398 7AF4 <2> variant 0F4h, 0 746 0000039A FF <2> endvariant 747 <2> mne IDIV ; ofs=3BBh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000065D B439 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000065F 49444956 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 748 0000039B F44A02 <2> variant AGRP(6,7), 11 749 0000039E FF <2> endvariant 750 <2> mne IMUL ; ofs=3BFh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000663 F439 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000665 494D554C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 751 0000039F F44900 <2> variant AGRP(6,5), 11 752 000003A2 F7D93F <2> variant 1AFh, 16, ASM_MACH3 753 000003A5 F53622 <2> variant 06Bh, 55, ASM_MACH1 754 000003A8 F53623 <2> variant 06Bh, 56, ASM_MACH1 755 000003AB F53522 <2> variant 069h, 57, ASM_MACH1 756 000003AE F53523 <2> variant 069h, 58, ASM_MACH1 757 000003B1 FF <2> endvariant 758 <2> mne IN ; ofs=3D2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000669 223B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000066B 494E <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 759 000003B2 731F <2> variant 0E4h, 59 760 000003B4 7728 <2> variant 0ECh, 60 761 000003B6 FF <2> endvariant 762 <2> mne INC ; ofs=3D7h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000066D 733B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000066F 494E43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 763 000003B7 2061 <2> variant 040h, 33 764 000003B9 FBF42E4D <2> variant AGRP(0,0), 13, ASM_LOCKABLE 765 000003BD FF <2> endvariant 766 <2> mne INSB ; ofs=3DEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000672 E43B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000674 494E5342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 767 000003BE F5366C <2> variant 06Ch, 0, ASM_MACH1 768 000003C1 FF <2> endvariant 769 <2> mne INT ; ofs=3E6h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000678 233C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000067A 494E54 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 770 000003C2 6709 <2> variant 0CCh, 61 771 000003C4 67C9 <2> variant 0CDh, 124 772 000003C6 FF <2> endvariant 773 <2> mne INT1 ; ofs=3EBh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000067D 743C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000067F 494E5431 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 774 000003C7 FA79F1 <2> variant 0F1h, 128, ASM_MACH6 775 000003CA FF <2> endvariant 776 <2> mne INT01 ; ofs=3EFh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000683 B53C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000685 494E543031 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 777 000003CB FA79F1 <2> variant 0F1h, 128, ASM_MACH6 778 000003CE FF <2> endvariant 779 <2> mne ICEBP ; ofs=3F3h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000068A F53C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000068C 4943454250 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 780 000003CF FA79F1 <2> variant 0F1h, 128, ASM_MACH6 781 000003D2 FF <2> endvariant 782 <2> mne INT3 ; ofs=3F7h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000691 343D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000693 494E5433 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 783 000003D3 674C <2> variant 0CCh, 128 784 000003D5 FF <2> endvariant 785 <2> mne INT03 ; ofs=3FAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000697 653D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000699 494E543033 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 786 000003D6 674C <2> variant 0CCh, 128 787 000003D8 FF <2> endvariant 788 <2> mne INTO ; ofs=3FDh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000069E 943D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006A0 494E544F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 789 000003D9 684E <2> variant 0CEh, 128 790 000003DB FF <2> endvariant 791 <2> mne INVD ; ofs=400h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006A4 C43D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006A6 494E5644 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 792 000003DC F88508 <2> variant 108h, 0, ASM_MACH4 793 000003DF FF <2> endvariant 794 <2> mne INVLPG ; ofs=404h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006AA 063E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006AC 494E564C5047 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 795 000003E0 F8F44E33 <2> variant AGRP(7,7), 52, ASM_MACH4 796 000003E4 FF <2> endvariant 797 <2> mne JA ; ofs=40Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006B2 523E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006B4 4A41 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 798 000003E5 3C36 <2> variant 077h, 63 799 000003E7 F7C51F <2> variant 187h, 24, ASM_MACH3 800 000003EA FF <2> endvariant 801 <2> mne JAE ; ofs=412h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006B6 B33E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006B8 4A4145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 802 000003EB 3A32 <2> variant 073h, 63 803 000003ED F7C31B <2> variant 183h, 24, ASM_MACH3 804 000003F0 FF <2> endvariant 805 <2> mne JB ; ofs=418h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006BB 123F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006BD 4A42 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 806 000003F1 39B1 <2> variant 072h, 63 807 000003F3 F7C29A <2> variant 182h, 24, ASM_MACH3 808 000003F6 FF <2> endvariant 809 <2> mne JBE ; ofs=41Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006BF 733F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006C1 4A4245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 810 000003F7 3BB5 <2> variant 076h, 63 811 000003F9 F7C49E <2> variant 186h, 24, ASM_MACH3 812 000003FC FF <2> endvariant 813 <2> mne JC ; ofs=424h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006C4 D23F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006C6 4A43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 814 000003FD 39B1 <2> variant 072h, 63 815 000003FF F7C29A <2> variant 182h, 24, ASM_MACH3 816 00000402 FF <2> endvariant 817 <2> mne JCXZ, ASM_D16 ; ofs=42Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000403 FC <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006C8 3440 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006CA 4A43585A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 818 <2> mne JECXZ, ASM_D32 ; ofs=42Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000404 FD <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006CE 4540 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006D0 4A4543585A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 819 00000405 72A2 <2> variant 0E3h, 63 820 00000407 FF <2> endvariant 821 <2> mne JE ; ofs=42Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006D5 8240 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006D7 4A45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 822 00000408 3AB3 <2> variant 074h, 63 823 0000040A F7C39C <2> variant 184h, 24, ASM_MACH3 824 0000040D FF <2> endvariant 825 <2> mne JG ; ofs=435h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006D9 E240 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006DB 4A47 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 826 0000040E 403E <2> variant 07Fh, 63 827 00000410 F7C927 <2> variant 18Fh, 24, ASM_MACH3 828 00000413 FF <2> endvariant 829 <2> mne JGE ; ofs=43Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006DD 4341 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006DF 4A4745 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 830 00000414 3F3C <2> variant 07Dh, 63 831 00000416 F7C825 <2> variant 18Dh, 24, ASM_MACH3 832 00000419 FF <2> endvariant 833 <2> mne JL ; ofs=441h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006E2 A241 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006E4 4A4C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 834 0000041A 3EBB <2> variant 07Ch, 63 835 0000041C F7C7A4 <2> variant 18Ch, 24, ASM_MACH3 836 0000041F FF <2> endvariant 837 <2> mne JLE ; ofs=447h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006E6 0342 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006E8 4A4C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 838 00000420 3FBD <2> variant 07Eh, 63 839 00000422 F7C8A6 <2> variant 18Eh, 24, ASM_MACH3 840 00000425 FF <2> endvariant 841 <2> mne JNA ; ofs=44Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006EB 6342 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006ED 4A4E41 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 842 00000426 3BB5 <2> variant 076h, 63 843 00000428 F7C49E <2> variant 186h, 24, ASM_MACH3 844 0000042B FF <2> endvariant 845 <2> mne JNAE ; ofs=453h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006F0 C442 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006F2 4A4E4145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 846 0000042C 39B1 <2> variant 072h, 63 847 0000042E F7C29A <2> variant 182h, 24, ASM_MACH3 848 00000431 FF <2> endvariant 849 <2> mne JNB ; ofs=459h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006F6 2343 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006F8 4A4E42 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 850 00000432 3A32 <2> variant 073h, 63 851 00000434 F7C31B <2> variant 183h, 24, ASM_MACH3 852 00000437 FF <2> endvariant 853 <2> mne JNBE ; ofs=45Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000006FB 8443 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000006FD 4A4E4245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 854 00000438 3C36 <2> variant 077h, 63 855 0000043A F7C51F <2> variant 187h, 24, ASM_MACH3 856 0000043D FF <2> endvariant 857 <2> mne JNC ; ofs=465h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000701 E343 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000703 4A4E43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 858 0000043E 3A32 <2> variant 073h, 63 859 00000440 F7C31B <2> variant 183h, 24, ASM_MACH3 860 00000443 FF <2> endvariant 861 <2> mne JNE ; ofs=46Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000706 4344 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000708 4A4E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 862 00000444 3B34 <2> variant 075h, 63 863 00000446 F7C41D <2> variant 185h, 24, ASM_MACH3 864 00000449 FF <2> endvariant 865 <2> mne JNG ; ofs=471h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000070B A344 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000070D 4A4E47 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 866 0000044A 3FBD <2> variant 07Eh, 63 867 0000044C F7C8A6 <2> variant 18Eh, 24, ASM_MACH3 868 0000044F FF <2> endvariant 869 <2> mne JNGE ; ofs=477h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000710 0445 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000712 4A4E4745 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 870 00000450 3EBB <2> variant 07Ch, 63 871 00000452 F7C7A4 <2> variant 18Ch, 24, ASM_MACH3 872 00000455 FF <2> endvariant 873 <2> mne JNL ; ofs=47Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000716 6345 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000718 4A4E4C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 874 00000456 3F3C <2> variant 07Dh, 63 875 00000458 F7C825 <2> variant 18Dh, 24, ASM_MACH3 876 0000045B FF <2> endvariant 877 <2> mne JNLE ; ofs=483h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000071B C445 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000071D 4A4E4C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 878 0000045C 403E <2> variant 07Fh, 63 879 0000045E F7C927 <2> variant 18Fh, 24, ASM_MACH3 880 00000461 FF <2> endvariant 881 <2> mne JNO ; ofs=489h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000721 2346 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000723 4A4E4F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 882 00000462 3930 <2> variant 071h, 63 883 00000464 F7C219 <2> variant 181h, 24, ASM_MACH3 884 00000467 FF <2> endvariant 885 <2> mne JNP ; ofs=48Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000726 8346 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000728 4A4E50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 886 00000468 3E3A <2> variant 07Bh, 63 887 0000046A F7C723 <2> variant 18Bh, 24, ASM_MACH3 888 0000046D FF <2> endvariant 889 <2> mne JNS ; ofs=495h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000072B E346 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000072D 4A4E53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 890 0000046E 3D38 <2> variant 079h, 63 891 00000470 F7C621 <2> variant 189h, 24, ASM_MACH3 892 00000473 FF <2> endvariant 893 <2> mne JNZ ; ofs=49Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000730 4347 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000732 4A4E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 894 00000474 3B34 <2> variant 075h, 63 895 00000476 F7C41D <2> variant 185h, 24, ASM_MACH3 896 00000479 FF <2> endvariant 897 <2> mne JO ; ofs=4A1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000735 A247 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000737 4A4F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 898 0000047A 38AF <2> variant 070h, 63 899 0000047C F7C198 <2> variant 180h, 24, ASM_MACH3 900 0000047F FF <2> endvariant 901 <2> mne JP ; ofs=4A7h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000739 0248 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000073B 4A50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 902 00000480 3DB9 <2> variant 07Ah, 63 903 00000482 F7C6A2 <2> variant 18Ah, 24, ASM_MACH3 904 00000485 FF <2> endvariant 905 <2> mne JPE ; ofs=4ADh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000073D 6348 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000073F 4A5045 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 906 00000486 3DB9 <2> variant 07Ah, 63 907 00000488 F7C6A2 <2> variant 18Ah, 24, ASM_MACH3 908 0000048B FF <2> endvariant 909 <2> mne JPO ; ofs=4B3h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000742 C348 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000744 4A504F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 910 0000048C 3E3A <2> variant 07Bh, 63 911 0000048E F7C723 <2> variant 18Bh, 24, ASM_MACH3 912 00000491 FF <2> endvariant 913 <2> mne JS ; ofs=4B9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000747 2249 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000749 4A53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 914 00000492 3CB7 <2> variant 078h, 63 915 00000494 F7C5A0 <2> variant 188h, 24, ASM_MACH3 916 00000497 FF <2> endvariant 917 <2> mne JZ ; ofs=4BFh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000074B 8249 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000074D 4A5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 918 00000498 3AB3 <2> variant 074h, 63 919 0000049A F7C39C <2> variant 184h, 24, ASM_MACH3 920 0000049D FF <2> endvariant 921 <2> mne JMP ; ofs=4C5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000074F E349 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000751 4A4D50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 922 0000049E 76AA <2> variant 0EBh, 63 923 000004A0 7581 <2> variant 0E9h, 24 924 000004A2 F440DE <2> variant AGRP(4,4), 122 925 000004A5 F44101 <2> variant AGRP(4,5), 28 926 000004A8 7604 <2> variant 0EAh, 26 927 000004AA FF <2> endvariant 928 <2> mne LAHF ; ofs=4D2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000754 B44A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000756 4C414846 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 929 000004AB 501F <2> variant 09Fh, 0 930 000004AD FF <2> endvariant 931 <2> mne LAR ; ofs=4D5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000075A E34A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000075C 4C4152 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 932 000004AE F68212 <2> variant 102h, 16, ASM_MACH2 933 000004B1 FF <2> endvariant 934 <2> mne LDS ; ofs=4D9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000075F 234B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000761 4C4453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 935 000004B2 6354 <2> variant 0C5h, 15 936 000004B4 FF <2> endvariant 937 <2> mne LSS ; ofs=4DCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000764 534B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000766 4C5353 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 938 000004B5 F7DAC1 <2> variant 1B2h, 15, ASM_MACH3 939 000004B8 FF <2> endvariant 940 <2> mne LES ; ofs=4E0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000769 934B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000076B 4C4553 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 941 000004B9 62D3 <2> variant 0C4h, 15 942 000004BB FF <2> endvariant 943 <2> mne LFS ; ofs=4E3h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000076E C34B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000770 4C4653 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 944 000004BC F7DBC3 <2> variant 1B4h, 15, ASM_MACH3 945 000004BF FF <2> endvariant 946 <2> mne LGS ; ofs=4E7h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000773 034C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000775 4C4753 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 947 000004C0 F7DC44 <2> variant 1B5h, 15, ASM_MACH3 948 000004C3 FF <2> endvariant 949 <2> mne LEA ; ofs=4EBh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000778 434C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000077A 4C4541 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 950 000004C4 4785 <2> variant 08Dh, 120 951 000004C6 FF <2> endvariant 952 <2> mne LGDT ; ofs=4F2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000077D 744C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000077F 4C474454 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 953 000004C7 F6F44BAD <2> variant AGRP(7,2), 51, ASM_MACH2 954 000004CB FF <2> endvariant 955 <2> mne LIDT ; ofs=4F7h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000783 C44C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000785 4C494454 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 956 000004CC F6F44C2E <2> variant AGRP(7,3), 51, ASM_MACH2 957 000004D0 FF <2> endvariant 958 <2> mne LLDT ; ofs=4FCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000789 144D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000078B 4C4C4454 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 959 000004D1 F6F44FCC <2> variant AGRP(8,2), 74, ASM_MACH2 960 000004D5 FF <2> endvariant 961 <2> mne LMSW ; ofs=501h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000078F 644D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000791 4C4D5357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 962 000004D6 F6F44DC8 <2> variant AGRP(7,6), 74, ASM_MACH2 963 000004DA FF <2> endvariant 964 <2> mne LOCK, ASM_SPECIAL, 0F0h ; ofs=506h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000004DB FFF0 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000795 B44D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000797 4C4F434B <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 965 <2> mne LODSB ; ofs=508h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000079B D54D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000079D 4C4F445342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 966 000004DD 56AC <2> variant 0ACh, 0 967 000004DF FF <2> endvariant 968 <2> mne LOOP ; ofs=51Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007A2 044E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007A4 4C4F4F50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 969 000004E0 725F <2> variant 0E2h, 125 970 000004E2 7221 <2> variant 0E2h, 63 971 000004E4 FF <2> endvariant 972 <2> mne LOOPZ ; ofs=522h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007A8 554E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007AA 4C4F4F505A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 973 000004E5 71DE <2> variant 0E1h, 125 974 000004E7 71A0 <2> variant 0E1h, 63 975 000004E9 FF <2> endvariant 976 <2> mne LOOPE ; ofs=527h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007AF A54E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007B1 4C4F4F5045 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 977 000004EA 71DE <2> variant 0E1h, 125 978 000004EC 71A0 <2> variant 0E1h, 63 979 000004EE FF <2> endvariant 980 <2> mne LOOPNZ ; ofs=52Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007B6 F64E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007B8 4C4F4F504E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 981 000004EF 715D <2> variant 0E0h, 125 982 000004F1 711F <2> variant 0E0h, 63 983 000004F3 FF <2> endvariant 984 <2> mne LOOPNE ; ofs=531h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007BE 464F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007C0 4C4F4F504E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 985 000004F4 715D <2> variant 0E0h, 125 986 000004F6 711F <2> variant 0E0h, 63 987 000004F8 FF <2> endvariant 988 <2> mne LSL ; ofs=536h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007C6 934F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007C8 4C534C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 989 000004F9 F68293 <2> variant 103h, 16, ASM_MACH2 990 000004FC FF <2> endvariant 991 <2> mne LTR ; ofs=53Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007CB D34F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007CD 4C5452 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 992 000004FD F6F4504D <2> variant AGRP(8,3), 74, ASM_MACH2 993 00000501 FF <2> endvariant 994 <2> mne MOV ; ofs=53Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007D0 2350 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007D2 4D4F56 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 995 00000502 50E4 <2> variant 0A0h, 68 996 00000504 51E7 <2> variant 0A2h, 69 997 00000506 4491 <2> variant 088h, 9 998 00000508 4594 <2> variant 08Ah, 10 999 0000050A 46CE <2> variant 08Ch, 66 1000 0000050C 47D1 <2> variant 08Eh, 67 1001 0000050E 58F6 <2> variant 0B0h, 70 1002 00000510 5CFF <2> variant 0B8h, 71 1003 00000512 F4528C <2> variant AGRP(9,0), 4 1004 00000515 F7918D <2> variant 120h, 109, ASM_MACH3 1005 00000518 F79290 <2> variant 122h, 110, ASM_MACH3 1006 0000051B F79210 <2> variant 121h, 111, ASM_MACH3 1007 0000051E F79313 <2> variant 123h, 112, ASM_MACH3 1008 00000521 F79395 <2> variant 124h, 113, ASM_MACH3 1009 00000524 F79498 <2> variant 126h, 114, ASM_MACH3 1010 00000527 FF <2> endvariant 1011 <2> mne MOVD ; ofs=565h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007D5 8452 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007D7 4D4F5644 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1012 00000528 F9B8E1 <2> variant 16Eh, 115, ASM_MACH5 1013 0000052B F9C0F2 <2> variant 17Eh, 116, ASM_MACH5 1014 0000052E FF <2> endvariant 1015 <2> mne MOVQ ; ofs=56Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007DB F452 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007DD 4D4F5651 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1016 0000052F F9B964 <2> variant 16Fh, 117, ASM_MACH5 1017 00000532 F9C175 <2> variant 17Fh, 118, ASM_MACH5 1018 00000535 FF <2> endvariant 1019 <2> mne PACKSSDW ; ofs=573h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007E1 6853 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007E3 5041434B53534457 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1020 00000536 F9B760 <2> variant 16Bh, 117, ASM_MACH5 1021 00000539 FF <2> endvariant 1022 <2> mne PACKSSWB ; ofs=577h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007EB A853 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007ED 5041434B53535742 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1023 0000053A F9B358 <2> variant 163h, 117, ASM_MACH5 1024 0000053D FF <2> endvariant 1025 <2> mne PACKUSWB ; ofs=57Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007F5 E853 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000007F7 5041434B55535742 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1026 0000053E F9B55C <2> variant 167h, 117, ASM_MACH5 1027 00000541 FF <2> endvariant 1028 <2> mne PADDB ; ofs=57Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000007FF 2554 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000801 5041444442 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1029 00000542 F9F40C71 <2> variant 1FCh, 117, ASM_MACH5 1030 00000546 FF <2> endvariant 1031 <2> mne PADDW ; ofs=584h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000806 7554 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000808 5041444457 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1032 00000547 F9F40CF2 <2> variant 1FDh, 117, ASM_MACH5 1033 0000054B FF <2> endvariant 1034 <2> mne PADDD ; ofs=589h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000080D C554 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000080F 5041444444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1035 0000054C F9F40D73 <2> variant 1FEh, 117, ASM_MACH5 1036 00000550 FF <2> endvariant 1037 <2> mne PADDSB ; ofs=58Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000814 1655 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000816 504144445342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1038 00000551 F9F40461 <2> variant 1ECh, 117, ASM_MACH5 1039 00000555 FF <2> endvariant 1040 <2> mne PADDSW ; ofs=593h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000081C 6655 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000081E 504144445357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1041 00000556 F9F404E2 <2> variant 1EDh, 117, ASM_MACH5 1042 0000055A FF <2> endvariant 1043 <2> mne PADDUSB ; ofs=598h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000824 B755 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000826 50414444555342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1044 0000055B F9F051 <2> variant 1DCh, 117, ASM_MACH5 1045 0000055E FF <2> endvariant 1046 <2> mne PADDUSW ; ofs=59Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000082D F755 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000082F 50414444555357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1047 0000055F F9F0D2 <2> variant 1DDh, 117, ASM_MACH5 1048 00000562 FF <2> endvariant 1049 <2> mne PAND ; ofs=5A0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000836 3456 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000838 50414E44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1050 00000563 F9EFD0 <2> variant 1DBh, 117, ASM_MACH5 1051 00000566 FF <2> endvariant 1052 <2> mne PANDN ; ofs=5A4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000083C 7556 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000083E 50414E444E <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1053 00000567 F9F1D4 <2> variant 1DFh, 117, ASM_MACH5 1054 0000056A FF <2> endvariant 1055 <2> mne PCMPEQB ; ofs=5A8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000843 B756 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000845 50434D50455142 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1056 0000056B F9BBE9 <2> variant 174h, 117, ASM_MACH5 1057 0000056E FF <2> endvariant 1058 <2> mne PCMPEQW ; ofs=5ACh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000084C F756 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000084E 50434D50455157 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1059 0000056F F9BC6A <2> variant 175h, 117, ASM_MACH5 1060 00000572 FF <2> endvariant 1061 <2> mne PCMPEQD ; ofs=5B0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000855 3757 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000857 50434D50455144 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1062 00000573 F9BCEB <2> variant 176h, 117, ASM_MACH5 1063 00000576 FF <2> endvariant 1064 <2> mne PCMPGTB ; ofs=5B4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000085E 7757 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000860 50434D50475442 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1065 00000577 F9B3D9 <2> variant 164h, 117, ASM_MACH5 1066 0000057A FF <2> endvariant 1067 <2> mne PCMPGTW ; ofs=5B8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000867 B757 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000869 50434D50475457 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1068 0000057B F9B45A <2> variant 165h, 117, ASM_MACH5 1069 0000057E FF <2> endvariant 1070 <2> mne PCMPGTD ; ofs=5BCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000870 F757 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000872 50434D50475444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1071 0000057F F9B4DB <2> variant 166h, 117, ASM_MACH5 1072 00000582 FF <2> endvariant 1073 <2> mne PMADDWD ; ofs=5C0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000879 3758 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000087B 504D4144445744 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1074 00000583 F9F408EA <2> variant 1F5h, 117, ASM_MACH5 1075 00000587 FF <2> endvariant 1076 <2> mne PMULHW ; ofs=5C5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000882 8658 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000884 504D554C4857 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1077 00000588 F9F400DA <2> variant 1E5h, 117, ASM_MACH5 1078 0000058C FF <2> endvariant 1079 <2> mne PMULLW ; ofs=5CAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000088A D658 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000088C 504D554C4C57 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1080 0000058D F9ECCA <2> variant 1D5h, 117, ASM_MACH5 1081 00000590 FF <2> endvariant 1082 <2> mne POR ; ofs=5CEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000892 1359 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000894 504F52 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1083 00000591 F9F403E0 <2> variant 1EBh, 117, ASM_MACH5 1084 00000595 FF <2> endvariant 1085 <2> mne PSLLW ; ofs=5D3h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000897 6559 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000899 50534C4C57 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1086 00000596 F9F406E6 <2> variant 1F1h, 117, ASM_MACH5 1087 0000059A F9F45A0D <2> variant AGRP(10,6), 119, ASM_MACH5 1088 0000059E FF <2> endvariant 1089 <2> mne PSLLD ; ofs=5DCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000089E F559 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008A0 50534C4C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1090 0000059F F9F40767 <2> variant 1F2h, 117, ASM_MACH5 1091 000005A3 F9F45E15 <2> variant AGRP(11,6), 119, ASM_MACH5 1092 000005A7 FF <2> endvariant 1093 <2> mne PSLLQ ; ofs=5E5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008A5 855A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008A7 50534C4C51 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1094 000005A8 F9F407E8 <2> variant 1F3h, 117, ASM_MACH5 1095 000005AC F9F4621D <2> variant AGRP(12,6), 119, ASM_MACH5 1096 000005B0 FF <2> endvariant 1097 <2> mne PSRAW ; ofs=5EEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008AC 155B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008AE 5053524157 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1098 000005B1 F9F2D6 <2> variant 1E1h, 117, ASM_MACH5 1099 000005B4 F9F4590B <2> variant AGRP(10,4), 119, ASM_MACH5 1100 000005B8 FF <2> endvariant 1101 <2> mne PSRAD ; ofs=5F6h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008B3 955B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008B5 5053524144 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1102 000005B9 F9F357 <2> variant 1E2h, 117, ASM_MACH5 1103 000005BC F9F45D13 <2> variant AGRP(11,4), 119, ASM_MACH5 1104 000005C0 FF <2> endvariant 1105 <2> mne PSRLW ; ofs=5FEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008BA 155C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008BC 5053524C57 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1106 000005C1 F9EAC6 <2> variant 1D1h, 117, ASM_MACH5 1107 000005C4 F9F45809 <2> variant AGRP(10,2), 119, ASM_MACH5 1108 000005C8 FF <2> endvariant 1109 <2> mne PSRLD ; ofs=606h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008C1 955C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008C3 5053524C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1110 000005C9 F9EB47 <2> variant 1D2h, 117, ASM_MACH5 1111 000005CC F9F45C11 <2> variant AGRP(11,2), 119, ASM_MACH5 1112 000005D0 FF <2> endvariant 1113 <2> mne PSRLQ ; ofs=60Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008C8 155D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008CA 5053524C51 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1114 000005D1 F9EBC8 <2> variant 1D3h, 117, ASM_MACH5 1115 000005D4 F9F46019 <2> variant AGRP(12,2), 119, ASM_MACH5 1116 000005D8 FF <2> endvariant 1117 <2> mne PSUBB ; ofs=616h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008CF 955D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008D1 5053554242 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1118 000005D9 F9F40A6D <2> variant 1F8h, 117, ASM_MACH5 1119 000005DD FF <2> endvariant 1120 <2> mne PSUBW ; ofs=61Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008D6 E55D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008D8 5053554257 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1121 000005DE F9F40AEE <2> variant 1F9h, 117, ASM_MACH5 1122 000005E2 FF <2> endvariant 1123 <2> mne PSUBD ; ofs=620h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008DD 355E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008DF 5053554244 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1124 000005E3 F9F40B6F <2> variant 1FAh, 117, ASM_MACH5 1125 000005E7 FF <2> endvariant 1126 <2> mne PSUBSB ; ofs=625h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008E4 865E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008E6 505355425342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1127 000005E8 F9F4025D <2> variant 1E8h, 117, ASM_MACH5 1128 000005EC FF <2> endvariant 1129 <2> mne PSUBSW ; ofs=62Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008EC D65E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008EE 505355425357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1130 000005ED F9F402DE <2> variant 1E9h, 117, ASM_MACH5 1131 000005F1 FF <2> endvariant 1132 <2> mne PSUBUSB ; ofs=62Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008F4 275F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008F6 50535542555342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1133 000005F2 F9EE4D <2> variant 1D8h, 117, ASM_MACH5 1134 000005F5 FF <2> endvariant 1135 <2> mne PSUBUSW ; ofs=633h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000008FD 675F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000008FF 50535542555357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1136 000005F6 F9EECE <2> variant 1D9h, 117, ASM_MACH5 1137 000005F9 FF <2> endvariant 1138 <2> mne PUNPCKHBW ; ofs=637h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000906 A95F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000908 50554E50434B484257 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1139 000005FA F9B5DD <2> variant 168h, 117, ASM_MACH5 1140 000005FD FF <2> endvariant 1141 <2> mne PUNPCKHWD ; ofs=63Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000911 E95F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000913 50554E50434B485744 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1142 000005FE F9B65E <2> variant 169h, 117, ASM_MACH5 1143 00000601 FF <2> endvariant 1144 <2> mne PUNPCKHDQ ; ofs=63Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000091C 2960 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000091E 50554E50434B484451 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1145 00000602 F9B6DF <2> variant 16Ah, 117, ASM_MACH5 1146 00000605 FF <2> endvariant 1147 <2> mne PUNPCKLBW ; ofs=643h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000927 6960 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000929 50554E50434B4C4257 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1148 00000606 F9B1D5 <2> variant 160h, 117, ASM_MACH5 1149 00000609 FF <2> endvariant 1150 <2> mne PUNPCKLWD ; ofs=647h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000932 A960 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000934 50554E50434B4C5744 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1151 0000060A F9B256 <2> variant 161h, 117, ASM_MACH5 1152 0000060D FF <2> endvariant 1153 <2> mne PUNPCKLDQ ; ofs=64Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000093D E960 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000093F 50554E50434B4C4451 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1154 0000060E F9B2D7 <2> variant 162h, 117, ASM_MACH5 1155 00000611 FF <2> endvariant 1156 <2> mne PXOR ; ofs=64Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000948 2461 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000094A 50584F52 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1157 00000612 F9F405E4 <2> variant 1EFh, 117, ASM_MACH5 1158 00000616 FF <2> endvariant 1159 <2> mne MOVSB ; ofs=654h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000094E 7561 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000950 4D4F565342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1160 00000617 52A4 <2> variant 0A4h, 0 1161 00000619 FF <2> endvariant 1162 <2> mne MOVSX ; ofs=65Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000955 A561 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000957 4D4F565358 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1163 0000061A F7E106 <2> variant 1BEh, 72, ASM_MACH3 1164 0000061D F7E188 <2> variant 1BFh, 73, ASM_MACH3 1165 00000620 FF <2> endvariant 1166 <2> mne MOVZX ; ofs=661h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000095C 1562 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000095E 4D4F565A58 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1167 00000621 F7DCFE <2> variant 1B6h, 72, ASM_MACH3 1168 00000624 F7DD80 <2> variant 1B7h, 73, ASM_MACH3 1169 00000627 FF <2> endvariant 1170 <2> mne MUL ; ofs=668h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000963 8362 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000965 4D554C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1171 00000628 F4487F <2> variant AGRP(6,4), 11 1172 0000062B FF <2> endvariant 1173 <2> mne NEG ; ofs=66Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000968 C362 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000096A 4E4547 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1174 0000062C FBF44800 <2> variant AGRP(6,3), 13, ASM_LOCKABLE 1175 00000630 FF <2> endvariant 1176 <2> mne NOP ; ofs=671h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000096D 1363 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000096F 4E4F50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1177 00000631 4890 <2> variant 090h, 0 1178 00000633 FF <2> endvariant 1179 <2> mne NOT ; ofs=674h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000972 4363 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000974 4E4F54 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1180 00000634 FBF4477F <2> variant AGRP(6,2), 13, ASM_LOCKABLE 1181 00000638 FF <2> endvariant 1182 <2> mne OR ; ofs=679h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000977 9263 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000979 4F52 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1183 00000639 FBF432CE <2> variant AGRP(1,1), 5, ASM_LOCKABLE 1184 0000063D 060D <2> variant 00Ch, 1 1185 0000063F FBF436D3 <2> variant AGRP(2,1), 2, ASM_LOCKABLE 1186 00000643 FB040F <2> variant 008h, 7, ASM_LOCKABLE 1187 00000646 0514 <2> variant 00Ah, 10 1188 00000648 FF <2> endvariant 1189 <2> mne ORG, ASM_SPECIAL ; ofs=689h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000649 FF <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000097B 9364 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000097D 4F5247 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1190 <2> mne OUT ; ofs=68Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000980 A364 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000982 4F5554 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1191 0000064A 7431 <2> variant 0E6h, 75 1192 0000064C 783A <2> variant 0EEh, 76 1193 0000064E FF <2> endvariant 1194 <2> mne OUTSB ; ofs=690h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000985 F564 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000987 4F55545342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1195 0000064F F5376E <2> variant 06Eh, 0, ASM_MACH1 1196 00000652 FF <2> endvariant 1197 <2> mne POP ; ofs=698h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000098C 3365 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000098E 504F50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1198 00000653 2C7A <2> variant 058h, 34 1199 00000655 F462F5 <2> variant AGRP(13,0), 77 1200 00000658 1009 <2> variant 01Fh, 106 1201 0000065A 03EF <2> variant 007h, 104 1202 0000065C 0C00 <2> variant 017h, 105 1203 0000065E F7D28C <2> variant 1A1h, 107, ASM_MACH3 1204 00000661 F7D695 <2> variant 1A9h, 108, ASM_MACH3 1205 00000664 FF <2> endvariant 1206 <2> mne PUSH ; ofs=6B1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000991 5466 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000993 50555348 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1207 00000665 2870 <2> variant 050h, 32 1208 00000667 F441A6 <2> variant AGRP(4,6), 64 1209 0000066A F535BA <2> variant 06Ah, 80, ASM_MACH1 1210 0000066D F534B7 <2> variant 068h, 79, ASM_MACH1 1211 00000670 076C <2> variant 00Eh, 94 1212 00000672 0B76 <2> variant 016h, 96 1213 00000674 0F80 <2> variant 01Eh, 98 1214 00000676 0362 <2> variant 006h, 92 1215 00000678 F7D204 <2> variant 1A0h, 100, ASM_MACH3 1216 0000067B F7D60E <2> variant 1A8h, 102, ASM_MACH3 1217 0000067E FF <2> endvariant 1218 <2> mne RCL ; ofs=6D9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000997 F367 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000999 52434C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1219 0000067F F46803 <2> variant AGRP(14,2), 81 1220 00000682 F46C0C <2> variant AGRP(15,2), 82 1221 00000685 F5F47015 <2> variant AGRP(16,2), 83, ASM_MACH1 1222 00000689 FF <2> endvariant 1223 <2> mne RCR ; ofs=6E4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 0000099C A368 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 0000099E 524352 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1224 0000068A F46884 <2> variant AGRP(14,3), 81 1225 0000068D F46C8D <2> variant AGRP(15,3), 82 1226 00000690 F5F47096 <2> variant AGRP(16,3), 83, ASM_MACH1 1227 00000694 FF <2> endvariant 1228 <2> mne ROL ; ofs=6EFh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009A1 5369 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009A3 524F4C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1229 00000695 F46701 <2> variant AGRP(14,0), 81 1230 00000698 F46B0A <2> variant AGRP(15,0), 82 1231 0000069B F5F46F13 <2> variant AGRP(16,0), 83, ASM_MACH1 1232 0000069F FF <2> endvariant 1233 <2> mne ROR ; ofs=6FAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009A6 036A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009A8 524F52 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1234 000006A0 F46782 <2> variant AGRP(14,1), 81 1235 000006A3 F46B8B <2> variant AGRP(15,1), 82 1236 000006A6 F5F46F94 <2> variant AGRP(16,1), 83, ASM_MACH1 1237 000006AA FF <2> endvariant 1238 <2> mne RDMSR ; ofs=705h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009AB B56A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009AD 52444D5352 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1239 000006AB F99A32 <2> variant 132h, 0, ASM_MACH5 1240 000006AE FF <2> endvariant 1241 <2> mne RDTSC ; ofs=709h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009B2 F56A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009B4 5244545343 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1242 000006AF F999B1 <2> variant 131h, 0, ASM_MACH5 1243 000006B2 FF <2> endvariant 1244 <2> mne REP, ASM_SPECIAL, 0F3h ; ofs=70Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006B3 FFF3 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009B9 336B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009BB 524550 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1245 <2> mne REPZ, ASM_SPECIAL, 0F3h ; ofs=70Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006B5 FFF3 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009BE 546B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009C0 5245505A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1246 <2> mne REPNZ, ASM_SPECIAL, 0F2h ; ofs=711h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006B7 FFF2 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009C4 756B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009C6 5245504E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1247 <2> mne REPE, ASM_SPECIAL, 0F3h ; ofs=713h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006B9 FFF3 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009CB 946B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009CD 52455045 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1248 <2> mne REPNE, ASM_SPECIAL, 0F2h ; ofs=715h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006BB FFF2 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009D1 B56B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009D3 5245504E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1249 <2> mne RSM ; ofs=726h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009D8 D36B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009DA 52534D <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1250 000006BD F9D6AA <2> variant 1AAh, 0, ASM_MACH5 1251 000006C0 FF <2> endvariant 1252 <2> mne SAHF ; ofs=72Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009DD 146C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009DF 53414846 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1253 000006C1 4F9E <2> variant 09Eh, 0 1254 000006C3 FF <2> endvariant 1255 <2> mne SAL ; ofs=72Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009E3 436C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009E5 53414C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1256 000006C4 F46905 <2> variant AGRP(14,4), 81 1257 000006C7 F46D0E <2> variant AGRP(15,4), 82 1258 000006CA F5F47117 <2> variant AGRP(16,4), 83, ASM_MACH1 1259 000006CE FF <2> endvariant 1260 <2> mne SAR ; ofs=738h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009E8 F36C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009EA 534152 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1261 000006CF F46A88 <2> variant AGRP(14,7), 81 1262 000006D2 F46E91 <2> variant AGRP(15,7), 82 1263 000006D5 F5F4729A <2> variant AGRP(16,7), 83, ASM_MACH1 1264 000006D9 FF <2> endvariant 1265 <2> mne SEG ; ofs=743h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009ED A36D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009EF 534547 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1266 000006DA 1383 <2> variant 026h, 93 1267 000006DC 178D <2> variant 02Eh, 95 1268 000006DE 1B97 <2> variant 036h, 97 1269 000006E0 1FA1 <2> variant 03Eh, 99 1270 000006E2 F732C9 <2> variant 064h, 101, ASM_MACH3 1271 000006E5 F7334C <2> variant 065h, 103, ASM_MACH3 1272 000006E8 FF <2> endvariant 1273 <2> mne ES, ASM_SPECIAL, 026h ; ofs=752h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006E9 FF26 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009F2 926E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009F4 4553 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1274 <2> mne CS, ASM_SPECIAL, 02Eh ; ofs=754h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006EB FF2E <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009F6 B26E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009F8 4353 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1275 <2> mne SS, ASM_SPECIAL, 036h ; ofs=756h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006ED FF36 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009FA D26E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 000009FC 5353 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1276 <2> mne DS, ASM_SPECIAL, 03Eh ; ofs=758h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006EF FF3E <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 000009FE F26E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A00 4453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1277 <2> mne FS, ASM_SPECIAL, ASM_MACH3, 064h ; ofs=75Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006F1 FFF764 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A02 126F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A04 4653 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1278 <2> mne GS, ASM_SPECIAL, ASM_MACH3, 065h ; ofs=75Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 000006F4 FFF765 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A06 426F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A08 4753 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1279 <2> mne SHL ; ofs=760h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A0A 736F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A0C 53484C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1280 000006F7 F46905 <2> variant AGRP(14,4), 81 1281 000006FA F46D0E <2> variant AGRP(15,4), 82 1282 000006FD F5F47117 <2> variant AGRP(16,4), 83, ASM_MACH1 1283 00000701 FF <2> endvariant 1284 <2> mne SHR ; ofs=76Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A0F 2370 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A11 534852 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1285 00000702 F46986 <2> variant AGRP(14,5), 81 1286 00000705 F46D8F <2> variant AGRP(15,5), 82 1287 00000708 F5F47198 <2> variant AGRP(16,5), 83, ASM_MACH1 1288 0000070C FF <2> endvariant 1289 <2> mne SBB ; ofs=776h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A14 D370 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A16 534242 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1290 0000070D FBF433D0 <2> variant AGRP(1,3), 5, ASM_LOCKABLE 1291 00000711 0E1D <2> variant 01Ch, 1 1292 00000713 FBF437D5 <2> variant AGRP(2,3), 2, ASM_LOCKABLE 1293 00000717 FB0C1F <2> variant 018h, 7, ASM_LOCKABLE 1294 0000071A 0D24 <2> variant 01Ah, 10 1295 0000071C FF <2> endvariant 1296 <2> mne SCASB ; ofs=786h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A19 D571 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A1B 5343415342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1297 0000071D 57AE <2> variant 0AEh, 0 1298 0000071F FF <2> endvariant 1299 <2> mne SETA ; ofs=78Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A20 0472 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A22 53455441 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1300 00000720 F7CD6E <2> variant 197h, 87, ASM_MACH3 1301 00000723 FF <2> endvariant 1302 <2> mne SETAE ; ofs=790h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A26 4572 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A28 5345544145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1303 00000724 F7CB6A <2> variant 193h, 87, ASM_MACH3 1304 00000727 FF <2> endvariant 1305 <2> mne SETB ; ofs=794h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A2D 8472 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A2F 53455442 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1306 00000728 F7CAE9 <2> variant 192h, 87, ASM_MACH3 1307 0000072B FF <2> endvariant 1308 <2> mne SETBE ; ofs=798h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A33 C572 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A35 5345544245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1309 0000072C F7CCED <2> variant 196h, 87, ASM_MACH3 1310 0000072F FF <2> endvariant 1311 <2> mne SETC ; ofs=79Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A3A 0473 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A3C 53455443 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1312 00000730 F7CAE9 <2> variant 192h, 87, ASM_MACH3 1313 00000733 FF <2> endvariant 1314 <2> mne SETE ; ofs=7A0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A40 4473 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A42 53455445 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1315 00000734 F7CBEB <2> variant 194h, 87, ASM_MACH3 1316 00000737 FF <2> endvariant 1317 <2> mne SETG ; ofs=7A4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A46 8473 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A48 53455447 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1318 00000738 F7D176 <2> variant 19Fh, 87, ASM_MACH3 1319 0000073B FF <2> endvariant 1320 <2> mne SETGE ; ofs=7A8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A4C C573 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A4E 5345544745 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1321 0000073C F7D074 <2> variant 19Dh, 87, ASM_MACH3 1322 0000073F FF <2> endvariant 1323 <2> mne SETL ; ofs=7ACh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A53 0474 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A55 5345544C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1324 00000740 F7CFF3 <2> variant 19Ch, 87, ASM_MACH3 1325 00000743 FF <2> endvariant 1326 <2> mne SETLE ; ofs=7B0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A59 4574 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A5B 5345544C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1327 00000744 F7D0F5 <2> variant 19Eh, 87, ASM_MACH3 1328 00000747 FF <2> endvariant 1329 <2> mne SETNA ; ofs=7B4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A60 8574 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A62 5345544E41 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1330 00000748 F7CCED <2> variant 196h, 87, ASM_MACH3 1331 0000074B FF <2> endvariant 1332 <2> mne SETNAE ; ofs=7B8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A67 C674 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A69 5345544E4145 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1333 0000074C F7CAE9 <2> variant 192h, 87, ASM_MACH3 1334 0000074F FF <2> endvariant 1335 <2> mne SETNB ; ofs=7BCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A6F 0575 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A71 5345544E42 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1336 00000750 F7CB6A <2> variant 193h, 87, ASM_MACH3 1337 00000753 FF <2> endvariant 1338 <2> mne SETNBE ; ofs=7C0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A76 4675 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A78 5345544E4245 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1339 00000754 F7CD6E <2> variant 197h, 87, ASM_MACH3 1340 00000757 FF <2> endvariant 1341 <2> mne SETNC ; ofs=7C4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A7E 8575 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A80 5345544E43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1342 00000758 F7CB6A <2> variant 193h, 87, ASM_MACH3 1343 0000075B FF <2> endvariant 1344 <2> mne SETNE ; ofs=7C8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A85 C575 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A87 5345544E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1345 0000075C F7CC6C <2> variant 195h, 87, ASM_MACH3 1346 0000075F FF <2> endvariant 1347 <2> mne SETNG ; ofs=7CCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A8C 0576 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A8E 5345544E47 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1348 00000760 F7D0F5 <2> variant 19Eh, 87, ASM_MACH3 1349 00000763 FF <2> endvariant 1350 <2> mne SETNGE ; ofs=7D0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A93 4676 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A95 5345544E4745 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1351 00000764 F7CFF3 <2> variant 19Ch, 87, ASM_MACH3 1352 00000767 FF <2> endvariant 1353 <2> mne SETNL ; ofs=7D4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000A9B 8576 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000A9D 5345544E4C <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1354 00000768 F7D074 <2> variant 19Dh, 87, ASM_MACH3 1355 0000076B FF <2> endvariant 1356 <2> mne SETNLE ; ofs=7D8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AA2 C676 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AA4 5345544E4C45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1357 0000076C F7D176 <2> variant 19Fh, 87, ASM_MACH3 1358 0000076F FF <2> endvariant 1359 <2> mne SETNO ; ofs=7DCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AAA 0577 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AAC 5345544E4F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1360 00000770 F7CA68 <2> variant 191h, 87, ASM_MACH3 1361 00000773 FF <2> endvariant 1362 <2> mne SETNP ; ofs=7E0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AB1 4577 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AB3 5345544E50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1363 00000774 F7CF72 <2> variant 19Bh, 87, ASM_MACH3 1364 00000777 FF <2> endvariant 1365 <2> mne SETNS ; ofs=7E4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AB8 8577 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000ABA 5345544E53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1366 00000778 F7CE70 <2> variant 199h, 87, ASM_MACH3 1367 0000077B FF <2> endvariant 1368 <2> mne SETNZ ; ofs=7E8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000ABF C577 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AC1 5345544E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1369 0000077C F7CC6C <2> variant 195h, 87, ASM_MACH3 1370 0000077F FF <2> endvariant 1371 <2> mne SETO ; ofs=7ECh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AC6 0478 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AC8 5345544F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1372 00000780 F7C9E7 <2> variant 190h, 87, ASM_MACH3 1373 00000783 FF <2> endvariant 1374 <2> mne SETP ; ofs=7F0h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000ACC 4478 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000ACE 53455450 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1375 00000784 F7CEF1 <2> variant 19Ah, 87, ASM_MACH3 1376 00000787 FF <2> endvariant 1377 <2> mne SETPE ; ofs=7F4h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AD2 8578 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AD4 5345545045 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1378 00000788 F7CEF1 <2> variant 19Ah, 87, ASM_MACH3 1379 0000078B FF <2> endvariant 1380 <2> mne SETPO ; ofs=7F8h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AD9 C578 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000ADB 534554504F <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1381 0000078C F7CF72 <2> variant 19Bh, 87, ASM_MACH3 1382 0000078F FF <2> endvariant 1383 <2> mne SETS ; ofs=7FCh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AE0 0479 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AE2 53455453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1384 00000790 F7CDEF <2> variant 198h, 87, ASM_MACH3 1385 00000793 FF <2> endvariant 1386 <2> mne SETZ ; ofs=800h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AE6 4479 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AE8 5345545A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1387 00000794 F7CBEB <2> variant 194h, 87, ASM_MACH3 1388 00000797 FF <2> endvariant 1389 <2> mne SGDT ; ofs=804h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AEC 8479 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AEE 53474454 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1390 00000798 F6F44AAD <2> variant AGRP(7,0), 53, ASM_MACH2 1391 0000079C FF <2> endvariant 1392 <2> mne SIDT ; ofs=809h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AF2 D479 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AF4 53494454 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1393 0000079D F6F44B2E <2> variant AGRP(7,1), 53, ASM_MACH2 1394 000007A1 FF <2> endvariant 1395 <2> mne SHLD ; ofs=80Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AF8 247A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000AFA 53484C44 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1396 000007A2 F7D3FC <2> variant 1A4h, 88, ASM_MACH3 1397 000007A5 F7D47E <2> variant 1A5h, 89, ASM_MACH3 1398 000007A8 FF <2> endvariant 1399 <2> mne SHRD ; ofs=815h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000AFE 947A <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B00 53485244 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1400 000007A9 F7D804 <2> variant 1ACh, 88, ASM_MACH3 1401 000007AC F7D886 <2> variant 1ADh, 89, ASM_MACH3 1402 000007AF FF <2> endvariant 1403 <2> mne SLDT ; ofs=81Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B04 047B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B06 534C4454 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1404 000007B0 F6F44ECE <2> variant AGRP(8,0), 78, ASM_MACH2 1405 000007B4 FF <2> endvariant 1406 <2> mne SMSW ; ofs=821h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B0A 547B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B0C 534D5357 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1407 000007B5 F6F44CCA <2> variant AGRP(7,4), 78, ASM_MACH2 1408 000007B9 FF <2> endvariant 1409 <2> mne STC ; ofs=826h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B10 A37B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B12 535443 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1410 000007BA 7D79 <2> variant 0F9h, 0 1411 000007BC FF <2> endvariant 1412 <2> mne STD ; ofs=829h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B15 D37B <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B17 535444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1413 000007BD 7F7D <2> variant 0FDh, 0 1414 000007BF FF <2> endvariant 1415 <2> mne STI ; ofs=82Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B1A 037C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B1C 535449 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1416 000007C0 7E7B <2> variant 0FBh, 0 1417 000007C2 FF <2> endvariant 1418 <2> mne STOSB ; ofs=82Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B1F 357C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B21 53544F5342 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1419 000007C3 55AA <2> variant 0AAh, 0 1420 000007C5 FF <2> endvariant 1421 <2> mne STR ; ofs=835h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B26 637C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B28 535452 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1422 000007C6 F6F44F42 <2> variant AGRP(8,1), 65, ASM_MACH2 1423 000007CA FF <2> endvariant 1424 <2> mne SUB ; ofs=83Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B2B B37C <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B2D 535542 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1425 000007CB FBF434D2 <2> variant AGRP(1,5), 5, ASM_LOCKABLE 1426 000007CF 162D <2> variant 02Ch, 1 1427 000007D1 FBF438D7 <2> variant AGRP(2,5), 2, ASM_LOCKABLE 1428 000007D5 FB142F <2> variant 028h, 7, ASM_LOCKABLE 1429 000007D8 1534 <2> variant 02Ah, 10 1430 000007DA FF <2> endvariant 1431 <2> mne SALC ; ofs=84Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B30 B47D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B32 53414C43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1432 000007DB F66BD6 <2> variant 0D6h, 0, ASM_MACH2 1433 000007DE FF <2> endvariant 1434 <2> mne SETALC ; ofs=84Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B36 F67D <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B38 534554414C43 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1435 000007DF F66BD6 <2> variant 0D6h, 0, ASM_MACH2 1436 000007E2 FF <2> endvariant 1437 <2> mne TEST ; ofs=852h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B3E 347E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B40 54455354 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1438 000007E3 54A9 <2> variant 0A8h, 1 1439 000007E5 F44673 <2> variant AGRP(6,0), 3 1440 000007E8 428C <2> variant 084h, 8 1441 000007EA 428E <2> variant 084h, 10 1442 000007EC FF <2> endvariant 1443 <2> mne UD0 ; ofs=85Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B44 D37E <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B46 554430 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1444 000007ED F5F40D7F <2> variant 1FFh, 0, ASM_MACH1 1445 000007F1 FF <2> endvariant 1446 <2> mne UD1 ; ofs=861h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B49 237F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B4B 554431 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1447 000007F2 F5DE39 <2> variant 1B9h, 0, ASM_MACH1 1448 000007F5 FF <2> endvariant 1449 <2> mne UD2 ; ofs=865h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B4E 637F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B50 554432 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1450 000007F6 F5868B <2> variant 10Bh, 0, ASM_MACH1 1451 000007F9 FF <2> endvariant 1452 <2> mne VERR ; ofs=869h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B53 A47F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B55 56455252 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1453 000007FA F6F450CE <2> variant AGRP(8,4), 74, ASM_MACH2 1454 000007FE FF <2> endvariant 1455 <2> mne VERW ; ofs=86Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B59 F47F <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B5B 56455257 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1456 000007FF F6F4514F <2> variant AGRP(8,5), 74, ASM_MACH2 1457 00000803 FF <2> endvariant 1458 <2> mne WAIT ; ofs=873h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B5F 4480 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B61 57414954 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1459 00000804 4E1B <2> variant 09Bh, 0 1460 00000806 FF <2> endvariant 1461 <2> mne WBINVD ; ofs=876h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B65 7680 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B67 5742494E5644 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1462 00000807 F88589 <2> variant 109h, 0, ASM_MACH4 1463 0000080A FF <2> endvariant 1464 <2> mne WRMSR ; ofs=87Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B6D B580 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B6F 57524D5352 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1465 0000080B F99930 <2> variant 130h, 0, ASM_MACH5 1466 0000080E FF <2> endvariant 1467 <2> mne XADD ; ofs=87Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B74 F480 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B76 58414444 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1468 0000080F FBF8E1C7 <2> variant 1C0h, 7, ASM_LOCKABLE, ASM_MACH4 1469 00000813 FF <2> endvariant 1470 <2> mne XCHG ; ofs=883h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B7A 4481 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B7C 58434847 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1471 00000814 48EA <2> variant 090h, 90 1472 00000816 48EB <2> variant 090h, 91 1473 00000818 FB438D <2> variant 086h, 7, ASM_LOCKABLE 1474 0000081B FB4392 <2> variant 086h, 12, ASM_LOCKABLE 1475 0000081E FF <2> endvariant 1476 <2> mne XLAT ; ofs=88Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B80 F481 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B82 584C4154 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1477 0000081F 6C57 <2> variant 0D7h, 0 1478 00000821 FF <2> endvariant 1479 <2> mne XLATB ; ofs=891h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B86 2582 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B88 584C415442 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1480 00000822 6C57 <2> variant 0D7h, 0 1481 00000824 FF <2> endvariant 1482 <2> mne XOR ; ofs=894h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B8D 5382 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B8F 584F52 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1483 00000825 FBF43553 <2> variant AGRP(1,6), 5, ASM_LOCKABLE 1484 00000829 1A35 <2> variant 034h, 1 1485 0000082B FBF43958 <2> variant AGRP(2,6), 2, ASM_LOCKABLE 1486 0000082F FB1837 <2> variant 030h, 7, ASM_LOCKABLE 1487 00000832 193C <2> variant 032h, 10 1488 00000834 FF <2> endvariant 1489 <2> 1490 <2> ; The following mnemonics allow an address size suffix 1491 <2> ; but do not require it. 1492 <2> 1493 <2> mnlist_a_suffix_allowed label near 1494 <2> mnsuffix _ASA 1495 <2> 1496 <2> mne LOOP ; ofs=50Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B92 5483 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B94 4C4F4F50 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1497 00000835 7221 <2> variant 0E2h, 63 1498 00000837 FF <2> endvariant 1499 <2> mne LOOPZ ; ofs=511h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B98 8583 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000B9A 4C4F4F505A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1500 00000838 71A0 <2> variant 0E1h, 63 1501 0000083A FF <2> endvariant 1502 <2> mne LOOPE ; ofs=514h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000B9F B583 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BA1 4C4F4F5045 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1503 0000083B 71A0 <2> variant 0E1h, 63 1504 0000083D FF <2> endvariant 1505 <2> mne LOOPNZ ; ofs=517h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BA6 E683 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BA8 4C4F4F504E5A <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1506 0000083E 711F <2> variant 0E0h, 63 1507 00000840 FF <2> endvariant 1508 <2> mne LOOPNE ; ofs=51Ah 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BAE 1684 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BB0 4C4F4F504E45 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1509 00000841 711F <2> variant 0E0h, 63 1510 00000843 FF <2> endvariant 1511 <2> 1512 <2> ; The following mnemonics allow an operand size suffix 1513 <2> ; but do not require it. 1514 <2> 1515 <2> mnlist_o_suffix_allowed label near 1516 <2> mnsuffix _OSA 1517 <2> 1518 <2> mne ENTER ; ofs=15Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BB6 4584 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BB8 454E544552 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1519 00000844 F564EB <2> variant 0C8h, 35, ASM_MACH1 1520 00000847 FF <2> endvariant 1521 <2> mne FLDENV ; ofs=2B9h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BBD 8684 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BBF 464C44454E56 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1522 00000848 F41ED4 <2> variant 221h, 51 1523 0000084B FF <2> endvariant 1524 <2> mne FRSTOR ; ofs=2F1h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BC5 C684 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BC7 465253544F52 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1525 0000084C F420D8 <2> variant 225h, 51 1526 0000084F FF <2> endvariant 1527 <2> mne FSAVE, ASM_WAIT ; ofs=2F5h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000850 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BCD 0585 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BCF 4653415645 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1528 <2> mne FNSAVE ; ofs=2F6h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BD4 1685 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BD6 464E53415645 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1529 00000851 F428EA <2> variant 235h, 53 1530 00000854 FF <2> endvariant 1531 <2> mne FSTENV, ASM_WAIT ; ofs=32Eh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 00000855 FE <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BDC 5685 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BDE 465354454E56 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1532 <2> mne FNSTENV ; ofs=32Fh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BE4 6785 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BE6 464E5354454E56 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1533 00000856 F426E6 <2> variant 231h, 53 1534 00000859 FF <2> endvariant 1535 <2> mne IRET ; ofs=409h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BED A485 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BEF 49524554 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1536 0000085A 68CF <2> variant 0CFh, 128 1537 0000085C FF <2> endvariant 1538 <2> mne LEAVE ; ofs=4EEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BF3 D585 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BF5 4C45415645 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1539 0000085D F565C9 <2> variant 0C9h, 128, ASM_MACH1 1540 00000860 FF <2> endvariant 1541 <2> mne POPA ; ofs=6AAh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000BFA 1486 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000BFC 504F5041 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1542 00000861 F53161 <2> variant 061h, 128, ASM_MACH1 1543 00000864 FF <2> endvariant 1544 <2> mne POPF ; ofs=6AEh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C00 5486 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C02 504F5046 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1545 00000865 4F9B <2> variant 09Dh, 126 1546 00000867 FF <2> endvariant 1547 <2> mne PUSH ; ofs=6CBh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C06 8486 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C08 50555348 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1548 00000868 F535BA <2> variant 06Ah, 80, ASM_MACH1 1549 0000086B F534B7 <2> variant 068h, 79, ASM_MACH1 1550 0000086E FF <2> endvariant 1551 <2> mne PUSHA ; ofs=6D2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C0C F586 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C0E 5055534841 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1552 0000086F F530E0 <2> variant 060h, 128, ASM_MACH1 1553 00000872 FF <2> endvariant 1554 <2> mne PUSHF ; ofs=6D6h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C13 3587 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C15 5055534846 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1555 00000873 4F1B <2> variant 09Ch, 127 1556 00000875 FF <2> endvariant 1557 <2> mne RETN ; ofs=717h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C1A 6487 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C1C 5245544E <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1558 00000876 62C1 <2> variant 0C3h, 126 1559 00000878 6216 <2> variant 0C2h, 84 1560 0000087A FF <2> endvariant 1561 <2> mne RET ; ofs=71Ch 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C20 B387 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C22 524554 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1562 0000087B 62C1 <2> variant 0C3h, 126 1563 0000087D 6216 <2> variant 0C2h, 84 1564 0000087F FF <2> endvariant 1565 <2> mne RETF ; ofs=721h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C25 0488 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C27 52455446 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1566 00000880 66CB <2> variant 0CBh, 128 1567 00000882 6620 <2> variant 0CAh, 86 1568 00000884 FF <2> endvariant 1569 <2> 1570 <2> ; The following mnemonics require an operand size suffix. 1571 <2> 1572 <2> mnlist_o_suffix_required label near 1573 <2> mnsuffix _OSR 1574 <2> 1575 <2> mne CMPS ; ofs=12Dh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C2B 5488 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C2D 434D5053 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1576 00000885 5427 <2> variant 0A7h, 0 1577 00000887 FF <2> endvariant 1578 <2> mne INS ; ofs=3E2h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C31 8388 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C33 494E53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1579 00000888 F536ED <2> variant 06Dh, 0, ASM_MACH1 1580 0000088B FF <2> endvariant 1581 <2> mne LODS ; ofs=50Bh 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C36 C488 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C38 4C4F4453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1582 0000088C 572D <2> variant 0ADh, 0 1583 0000088E FF <2> endvariant 1584 <2> mne MOVS ; ofs=657h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C3C F488 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C3E 4D4F5653 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1585 0000088F 5325 <2> variant 0A5h, 0 1586 00000891 FF <2> endvariant 1587 <2> mne OUTS ; ofs=694h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C42 2489 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C44 4F555453 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1588 00000892 F537EF <2> variant 06Fh, 0, ASM_MACH1 1589 00000895 FF <2> endvariant 1590 <2> mne SCAS ; ofs=789h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C48 6489 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C4A 53434153 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1591 00000896 582F <2> variant 0AFh, 0 1592 00000898 FF <2> endvariant 1593 <2> mne STOS ; ofs=832h 86 <3> %push 87 <3> usesection ASMTABLE2, 1 88 <3> %assign %$currofs $ - asmtab 89 <3> %ifnempty %2 90 <3> db %2 91 <3> %endif 92 <3> __SECT__ 93 <3> %defstr %$string %1 94 <3> %strlen %$string_size %$string 95 <3> %if %$string_size > 15 96 <3> %error Mnemonic %1 is too long! 97 <3> %endif 98 00000C4E 9489 <3> dw (%$currofs)<<4|%$string_size 99 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 100 00000C50 53544F53 <3> db %$string 101 <3> %pop 102 <3> %define MNCURRENT %1%[MNSUFFIX] 1594 00000899 562B <2> variant 0ABh, 0 1595 0000089B FF <2> endvariant 1596 <2> 1597 <2> end_mnlist label near 1598 <2> 1599 <2> ;--- Disassembler: compressed table of the opcode types. 1600 <2> ;--- If the item has the format OT(xx), it refers to table 'oplists'. 1601 <2> ;--- Otherwise it's an offset for internal table 'disjmp'. 1602 <2> 1603 00000C54 00 <2> align 8, db 0 1604 <2> optypes label byte 1605 00000C58 131316160D0D6874 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5C),OT(68) ; 00 - 07 (main opcode part) 1606 00000C60 131316160D0D6A02 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5E), 002h ; 08 - 0F 1607 00000C68 131316160D0D6C75 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(60),OT(69) ; 10 - 17 1608 00000C70 131316160D0D6E76 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(62),OT(6A) ; 18 - 1F 1609 00000C78 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 20 - 27 1610 00000C80 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 28 - 2F 1611 00000C88 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 30 - 37 1612 00000C90 141416160D0D0A0C <2> db OT(08),OT(08),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 38 - 3F 1613 00000C98 2D2D2D2D2D2D2D2D <2> db OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21) ; 40 - 47 1614 00000CA0 2D2D2D2D2D2D2D2D <2> db OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21) ; 48 - 4F 1615 00000CA8 2C2C2C2C2C2C2C2C <2> db OT(20),OT(20),OT(20),OT(20),OT(20),OT(20),OT(20),OT(20) ; 50 - 57 1616 00000CB0 2E2E2E2E2E2E2E2E <2> db OT(22),OT(22),OT(22),OT(22),OT(22),OT(22),OT(22),OT(22) ; 58 - 5F 1617 00000CB8 8C8C871A0A0A0A0A <2> db OT(80),OT(80),OT(7B),OT(0E), 00Ah, 00Ah, 00Ah, 00Ah ; 60 - 67 1618 00000CC0 5B455C430C0C0C0C <2> db OT(4F),OT(39),OT(50),OT(37),OT(00),OT(00),OT(00),OT(00) ; 68 - 6F 1619 00000CC8 4B4B4B4B4B4B4B4B <2> db OT(3F),OT(3F),OT(3F),OT(3F),OT(3F),OT(3F),OT(3F),OT(3F) ; 70 - 77 1620 00000CD0 4B4B4B4B4B4B4B4B <2> db OT(3F),OT(3F),OT(3F),OT(3F),OT(3F),OT(3F),OT(3F),OT(3F) ; 78 - 7F 1621 00000CD8 0404040414141818 <2> db 004h, 004h, 004h, 004h,OT(08),OT(08),OT(0C),OT(0C) ; 80 - 87 1622 00000CE0 151516164E844F04 <2> db OT(09),OT(09),OT(0A),OT(0A),OT(42),OT(78),OT(43), 004h ; 88 - 8F 1623 00000CE8 0C66666666666666 <2> db OT(00),OT(5A),OT(5A),OT(5A),OT(5A),OT(5A),OT(5A),OT(5A) ; 90 - 97 1624 00000CF0 0C0C250C8B8A0C0C <2> db OT(00),OT(00),OT(19),OT(00),OT(7F),OT(7E),OT(00),OT(00) ; 98 - 9F 1625 00000CF8 505051510C0C0C0C <2> db OT(44),OT(44),OT(45),OT(45),OT(00),OT(00),OT(00),OT(00) ; A0 - A7 1626 00000D00 0D0D0C0C0C0C0C0C <2> db OT(01),OT(01),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; A8 - AF 1627 00000D08 5252525252525252 <2> db OT(46),OT(46),OT(46),OT(46),OT(46),OT(46),OT(46),OT(46) ; B0 - B7 1628 00000D10 5353535353535353 <2> db OT(47),OT(47),OT(47),OT(47),OT(47),OT(47),OT(47),OT(47) ; B8 - BF 1629 00000D18 0404608A1B1B0404 <2> db 004h, 004h,OT(54),OT(7E),OT(0F),OT(0F), 004h, 004h ; C0 - C7 1630 00000D20 2F8C628C8C888C8C <2> db OT(23),OT(80),OT(56),OT(80),OT(80),OT(7C),OT(80),OT(80) ; C8 - CF 1631 00000D28 040404044A4A0C0C <2> db 004h, 004h, 004h, 004h,OT(3E),OT(3E),OT(00),OT(00) ; D0 - D7 1632 00000D30 0606060606060606 <2> db 006h, 006h, 006h, 006h, 006h, 006h, 006h, 006h ; D8 - DF 1633 00000D38 4B4B4B4B47475757 <2> db OT(3F),OT(3F),OT(3F),OT(3F),OT(3B),OT(3B),OT(4B),OT(4B) ; E0 - E7 1634 00000D40 2324264B48485858 <2> db OT(17),OT(18),OT(1A),OT(3F),OT(3C),OT(3C),OT(4C),OT(4C) ; E8 - EF 1635 00000D48 0A8C0A0A0C0C0404 <2> db 00Ah,OT(80), 00Ah, 00Ah,OT(00),OT(00), 004h, 004h ; F0 - F7 1636 00000D50 0C0C0C0C0C0C0404 <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 004h, 004h ; F8 - FF 1637 00000D58 0E0E0E0E0E0E0E0F <2> db OT(02),OT(02),OT(02),OT(02),OT(02),OT(02),OT(02),OT(03) ; 100 - 107 (Intel group 1) 1638 00000D60 1111111111111112 <2> db OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(06) ; 108 - 10F 1639 00000D68 5D5D5D5D5D5D5D5D <2> db OT(51),OT(51),OT(51),OT(51),OT(51),OT(51),OT(51),OT(51) ; 110 - 117 (Intel group 2) 1640 00000D70 5E5E5E5E5E5E5E5E <2> db OT(52),OT(52),OT(52),OT(52),OT(52),OT(52),OT(52),OT(52) ; 118 - 11F 1641 00000D78 5F5F5F5F5F5F5F5F <2> db OT(53),OT(53),OT(53),OT(53),OT(53),OT(53),OT(53),OT(53) ; 120 - 127 (Intel group 2a) 1642 00000D80 0F0F191917171717 <2> db OT(03),OT(03),OT(0D),OT(0D),OT(0B),OT(0B),OT(0B),OT(0B) ; 128 - 12F (Intel group 3) 1643 00000D88 1919852786284C00 <2> db OT(0D),OT(0D),OT(79),OT(1B),OT(7A),OT(1C),OT(40), 000h ; 130 - 137 (Intel group 5) 1644 00000D90 5A4D565656560000 <2> db OT(4E),OT(41),OT(4A),OT(4A),OT(4A),OT(4A), 000h, 000h ; 138 - 13F (Intel group 6) 1645 00000D98 41413F3F5A005640 <2> db OT(35),OT(35),OT(33),OT(33),OT(4E), 000h,OT(4A),OT(34) ; 140 - 147 (Intel group 7) 1646 00000DA0 3030303030303030 <2> db OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24) ; 148 - 14F (Coprocessor d8) 1647 00000DA8 34343E3E34343434 <2> db OT(28),OT(28),OT(32),OT(32),OT(28),OT(28),OT(28),OT(28) ; 150 - 157 1648 00000DB0 300031313F3A413B <2> db OT(24), 000h,OT(25),OT(25),OT(33),OT(2E),OT(35),OT(2F) ; 158 - 15F (Coprocessor d9) 1649 00000DB8 353E080008080808 <2> db OT(29),OT(32), 008h, 000h, 008h, 008h, 008h, 008h ; 160 - 167 1650 00000DC0 3838383838383838 <2> db OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C) ; 168 - 16F (Coprocessor da) 1651 00000DC8 3434343400080000 <2> db OT(28),OT(28),OT(28),OT(28), 000h, 008h, 000h, 000h ; 170 - 177 1652 00000DD0 38003939003C003D <2> db OT(2C), 000h,OT(2D),OT(2D), 000h,OT(30), 000h,OT(31) ; 178 - 17F (Coprocessor db) 1653 00000DD8 34343434083E3E00 <2> db OT(28),OT(28),OT(28),OT(28), 008h,OT(32),OT(32), 000h ; 180 - 187 1654 00000DE0 3232323232323232 <2> db OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26) ; 188 - 18F (Coprocessor dc) 1655 00000DE8 3737000037373737 <2> db OT(2B),OT(2B), 000h, 000h,OT(2B),OT(2B),OT(2B),OT(2B) ; 190 - 197 1656 00000DF0 320033333F00413B <2> db OT(26), 000h,OT(27),OT(27),OT(33), 000h,OT(35),OT(2F) ; 198 - 19F (Coprocessor dd) 1657 00000DF8 350035353E3E0000 <2> db OT(29), 000h,OT(29),OT(29),OT(32),OT(32), 000h, 000h ; 1A0 - 1A7 1658 00000E00 3A3A3A3A3A3A3A3A <2> db OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E) ; 1A8 - 1AF (Coprocessor de) 1659 00000E08 3636000836363636 <2> db OT(2A),OT(2A), 000h, 008h,OT(2A),OT(2A),OT(2A),OT(2A) ; 1B0 - 1B7 1660 00000E10 3A003B3B3C2A3D2B <2> db OT(2E), 000h,OT(2F),OT(2F),OT(30),OT(1E),OT(31),OT(1F) ; 1B8 - 1BF (Coprocessor df) 1661 00000E18 00000000083E3E00 <2> db 000h, 000h, 000h, 000h, 008h,OT(32),OT(32), 000h ; 1C0 - 1C7 1662 00000E20 0C0C0C0C0C0C0C00 <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 000h ; 1C8 - 1CF (Coprocessor groups) 1663 00000E28 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D0 - 1D7 1664 00000E30 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D8 - 1DF 1665 <2> ;--- The rest of these are squeezed. 1666 00000E38 0004041C1C0C0C0C <2> db 0, 004h, 004h,OT(10),OT(10),OT(00),OT(00),OT(00) ; 00 1667 00000E40 0C797B7A7C7D7E0C <2> db OT(00),OT(6D),OT(6F),OT(6E),OT(70),OT(71),OT(72),OT(00) ; 08 1668 00000E48 0C0C1C1C1C1C1C1C <2> db OT(00),OT(00),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 10 1669 00000E50 1C1C1C1C1C1C1C1C <2> db OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 18 1670 00000E58 1C1C818181818181 <2> db OT(10),OT(10),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75) ; 20 1671 00000E60 8181818181817F81 <2> db OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(73),OT(75) ; 28 1672 00000E68 0404048181810C80 <2> db 004h, 004h, 004h,OT(75),OT(75),OT(75),OT(00),OT(74) ; 30 1673 00000E70 8224242424242424 <2> db OT(76),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18) ; 38 1674 00000E78 2424242424242424 <2> db OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18) ; 40 1675 00000E80 2463636363636363 <2> db OT(18),OT(57),OT(57),OT(57),OT(57),OT(57),OT(57),OT(57) ; 48 1676 00000E88 6363636363636363 <2> db OT(57),OT(57),OT(57),OT(57),OT(57),OT(57),OT(57),OT(57) ; 50 1677 00000E90 6370770C1F646572 <2> db OT(57),OT(64),OT(6B),OT(00),OT(13),OT(58),OT(59),OT(66) ; 58 1678 00000E98 780C1E64651C1313 <2> db OT(6C),OT(00),OT(12),OT(58),OT(59),OT(10),OT(07),OT(07) ; 60 1679 00000EA0 1B1E1B1B54550C04 <2> db OT(0F),OT(12),OT(0F),OT(0F),OT(48),OT(49),OT(00), 004h ; 68 1680 00000EA8 1E1C1C5455131304 <2> db OT(12),OT(10),OT(10),OT(48),OT(49),OT(07),OT(07), 004h ; 70 1681 00000EB0 1D1D1D1D1D1D1D1D <2> db OT(11),OT(11),OT(11),OT(11),OT(11),OT(11),OT(11),OT(11) ; 78 1682 00000EB8 8181818181818181 <2> db OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75) ; 80 1683 00000EC0 8181818181818181 <2> db OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75) ; 88 1684 00000EC8 8181818181818181 <2> db OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75),OT(75) ; 90 1685 00000ED0 81818181810C1919 <2> db OT(75),OT(75),OT(75),OT(75),OT(75),OT(00),OT(0D),OT(0D) ; 98 1686 00000ED8 6122202020295910 <2> db OT(55),OT(16),OT(14),OT(14),OT(14),OT(1D),OT(4D),OT(04) ; A0 1687 00000EE0 8383838383838383 <2> db OT(77),OT(77),OT(77),OT(77),OT(77),OT(77),OT(77),OT(77) ; A8 1688 00000EE8 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; B0 1689 00000EF0 0C0C0C0C42 <2> db OT(00),OT(00),OT(00),OT(00),OT(36) 1690 <2> 1691 <2> P186 equ 1000h 1692 <2> P286 equ 2000h 1693 <2> P386 equ 3000h 1694 <2> P486 equ 4000h 1695 <2> P586 equ 5000h 1696 <2> P686 equ 6000h 1697 <2> 1698 <2> ;--- Disassembler: compressed table of additional information. 1699 <2> ;--- Bits 0-11 usually are the offset of the mnemonics table. 1700 <2> ;--- Bits 12-15 are the CPU which introduced this opcode. 1701 <2> 1702 00000EF5 00 <2> align 2, db 0 1703 <2> opinfo label word 1704 00000EF6 3600360036003600 <2> dw MN_ADD, MN_ADD, MN_ADD, MN_ADD ; 00 1705 00000EFE 36003600F507F007 <2> dw MN_ADD, MN_ADD, MN_PUSH, MN_POP ; 04 1706 00000F06 DB07DB07DB07DB07 <2> dw MN_OR, MN_OR, MN_OR, MN_OR ; 08 1707 00000F0E DB07DB07F507E001 <2> dw MN_OR, MN_OR, MN_PUSH, 01E0h ; 0C 1708 00000F16 3100310031003100 <2> dw MN_ADC, MN_ADC, MN_ADC, MN_ADC ; 10 1709 00000F1E 31003100F507F007 <2> dw MN_ADC, MN_ADC, MN_PUSH, MN_POP ; 14 1710 00000F26 7808780878087808 <2> dw MN_SBB, MN_SBB, MN_SBB, MN_SBB ; 18 1711 00000F2E 78087808F507F007 <2> dw MN_SBB, MN_SBB, MN_PUSH, MN_POP ; 1C 1712 00000F36 3B003B003B003B00 <2> dw MN_AND, MN_AND, MN_AND, MN_AND ; 20 1713 00000F3E 3B003B000100B701 <2> dw MN_AND, MN_AND, 0001h, MN_DAA ; 24 1714 00000F46 8F098F098F098F09 <2> dw MN_SUB, MN_SUB, MN_SUB, MN_SUB ; 28 1715 00000F4E 8F098F090101BC01 <2> dw MN_SUB, MN_SUB, 0101h, MN_DAS ; 2C 1716 00000F56 F109F109F109F109 <2> dw MN_XOR, MN_XOR, MN_XOR, MN_XOR ; 30 1717 00000F5E F109F10901021D00 <2> dw MN_XOR, MN_XOR, 0201h, MN_AAA ; 34 1718 00000F66 8601860186018601 <2> dw MN_CMP, MN_CMP, MN_CMP, MN_CMP ; 38 1719 00000F6E 8601860101032C00 <2> dw MN_CMP, MN_CMP, 0301h, MN_AAS ; 3C 1720 00000F76 D104D104D104D104 <2> dw MN_INC, MN_INC, MN_INC, MN_INC ; 40 1721 00000F7E D104D104D104D104 <2> dw MN_INC, MN_INC, MN_INC, MN_INC ; 44 1722 00000F86 C901C901C901C901 <2> dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 48 1723 00000F8E C901C901C901C901 <2> dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 4C 1724 00000F96 F507F507F507F507 <2> dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 50 1725 00000F9E F507F507F507F507 <2> dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 54 1726 00000FA6 F007F007F007F007 <2> dw MN_POP, MN_POP, MN_POP, MN_POP ; 58 1727 00000FAE F007F007F007F007 <2> dw MN_POP, MN_POP, MN_POP, MN_POP ; 5C 1728 00000FB6 701A5E1A46104020 <2> dw P186 + MN_PUSHA_OSA, P186 + MN_POPA_OSA, P186 + MN_BOUND, P286 + MN_ARPL ; 60 1729 00000FBE 0134013510302030 <2> dw P386 + 0401h, P386 + 0501h, P386 + 0010h, P386 + 0020h ; 64 1730 00000FC6 6A1AC7146A1AC714 <2> dw P186 + MN_PUSH_OSA, P186 + MN_IMUL, P186 + MN_PUSH_OSA, P186 + MN_IMUL ; 68 1731 00000FCE D614951AE917A61A <2> dw P186 + MN_INSB, P186 + MN_INS_OSR, P186 + MN_OUTSB, P186 + MN_OUTS_OSR ; 6C 1732 00000FD6 990585051F051A05 <2> dw MN_JO, MN_JNO, MN_JB, MN_JAE ; 70 1733 00000FDE AF05940523051605 <2> dw MN_JZ, MN_JNZ, MN_JBE, MN_JA ; 74 1734 00000FE6 AB058F05A105A605 <2> dw MN_JS, MN_JNS, MN_JPE, MN_JPO ; 78 1735 00000FEE 460541054A053D05 <2> dw MN_JL, MN_JGE, MN_JLE, MN_JG ; 7C 1736 00000FF6 0001000100010801 <2> dw 0100h, 0100h, 0100h, 0108h ; 80 1737 00000FFE A209A209DE09DE09 <2> dw MN_TEST, MN_TEST, MN_XCHG, MN_XCHG ; 84 1738 00001006 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; 88 1739 0000100E 3406DC053406F802 <2> dw MN_MOV, MN_LEA, MN_MOV, 02F8h ; 8C 1740 00001016 D107DE09DE09DE09 <2> dw MN_NOP, MN_XCHG, MN_XCHG, MN_XCHG ; 90 1741 0000101E DE09DE09DE09DE09 <2> dw MN_XCHG, MN_XCHG, MN_XCHG, MN_XCHG ; 94 1742 00001026 7700AD017100C309 <2> dw MN_CBW, MN_CWD, MN_CALL, MN_WAIT ; 98 1743 0000102E 770A640A4108B805 <2> dw MN_PUSHF_OSA, MN_POPF_OSA, MN_SAHF, MN_LAHF ; 9C 1744 00001036 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; A0 1745 0000103E B207A00A8B018F0A <2> dw MN_MOVSB, MN_MOVS_OSR, MN_CMPSB, MN_CMPS_OSR ; A4 1746 00001046 A209A2098309B20A <2> dw MN_TEST, MN_TEST, MN_STOSB, MN_STOS_OSR ; A8 1747 0000104E FF059A0A7D08AC0A <2> dw MN_LODSB, MN_LODS_OSR, MN_SCASB, MN_SCAS_OSR ; AC 1748 00001056 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B0 1749 0000105E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B4 1750 00001066 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B8 1751 0000106E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; BC 1752 00001076 200120017E0A7E0A <2> dw 0120h, 0120h, MN_RETN_OSA, MN_RETN_OSA ; C0 1753 0000107E CD05C30500030003 <2> dw MN_LES, MN_LDS, 0300h, 0300h ; C4 1754 00001086 1A1A571A890A890A <2> dw P186 + MN_ENTER_OSA, P186 + MN_LEAVE_OSA, MN_RETF_OSA, MN_RETF_OSA ; C8 1755 0000108E F504DC040205510A <2> dw MN_INT3, MN_INT, MN_INTO, MN_IRET_OSA ; CC 1756 00001096 1001100118011801 <2> dw 0110h, 0110h, 0118h, 0118h ; D0 1757 0000109E 270022009A29EA09 <2> dw MN_AAM, MN_AAD, P286 + MN_SETALC, MN_XLATB ; D4 1758 000010A6 4801580168017801 <2> dw 0148h, 0158h, 0168h, 0178h ; D8 1759 000010AE 88019801A801B801 <2> dw 0188h, 0198h, 01A8h, 01B8h ; DC 1760 000010B6 0A0AFC09F6092C05 <2> dw MN_LOOPNZ_ASA, MN_LOOPZ_ASA, MN_LOOP_ASA, MN_JCXZ ; E0 1761 000010BE CD04CD04E407E407 <2> dw MN_IN, MN_IN, MN_OUT, MN_OUT ; E4 1762 000010C6 7100B305B305B305 <2> dw MN_CALL, MN_JMP, MN_JMP, MN_JMP ; E8 1763 000010CE CD04CD04E407E407 <2> dw MN_IN, MN_IN, MN_OUT, MN_OUT ; EC 1764 000010D6 0800E16402000600 <2> dw 0008h, P686 + MN_INT1, 0002h, 0006h ; F0 1765 000010DE BC04970028012801 <2> dw MN_HLT, MN_CMC, 0128h, 0128h ; F4 1766 000010E6 820074098C007E09 <2> dw MN_CLC, MN_STC, MN_CLI, MN_STI ; F8 1767 000010EE 87007909E0023001 <2> dw MN_CLD, MN_STD, 02E0h, 0130h ; FC 1768 000010F6 3600DB0731007808 <2> dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 100 1769 000010FE 3B008F09F1098601 <2> dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 104 1770 00001106 3600DB0731007808 <2> dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 108 1771 0000110E 3B008F09F1098601 <2> dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 10C 1772 00001116 05080A08FB070008 <2> dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 110 1773 0000111E 6E0873086E084C08 <2> dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 114 1774 00001126 05080A08FB070008 <2> dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 118 1775 0000112E 6E0873086E084C08 <2> dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 11C 1776 00001136 05180A18FB170018 <2> dw P186 + MN_ROL, P186 + MN_ROR, P186 + MN_RCL, P186 + MN_RCR ; 120 1777 0000113E 6E1873186E184C18 <2> dw P186 + MN_SHL, P186 + MN_SHR, P186 + MN_SHL, P186 + MN_SAR ; 124 1778 00001146 A209A209D607CC07 <2> dw MN_TEST, MN_TEST, MN_NOT, MN_NEG ; 128 1779 0000114E C707C704CE01C104 <2> dw MN_MUL, MN_IMUL, MN_DIV, MN_IDIV ; 12C 1780 00001156 D104C90171007100 <2> dw MN_INC, MN_DEC, MN_CALL, MN_CALL ; 130 1781 0000115E B305B305F5070000 <2> dw MN_JMP, MN_JMP, MN_PUSH, 0000h ; 134 1782 00001166 68298A29ED252F26 <2> dw P286 + MN_SLDT, P286 + MN_STR, P286 + MN_LLDT, P286 + MN_LTR ; 138 1783 0000116E B729BD2900000000 <2> dw P286 + MN_VERR, P286 + MN_VERW, 0000h, 0000h ; 13C 1784 00001176 50295629E125E725 <2> dw P286 + MN_SGDT, P286 + MN_SIDT, P286 + MN_LGDT, P286 + MN_LIDT ; 140 1785 0000117E 6E290000F3250E45 <2> dw P286 + MN_SMSW, 0000h, P286 + MN_LMSW, P486 + MN_INVLPG ; 144 1786 00001186 EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 148 1787 0000118E 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 14C 1788 00001196 EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 150 1789 0000119E 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 154 1790 000011A6 560300000D041204 <2> dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 158 1791 000011AE 210A9503480A1F04 <2> dw MN_FLDENV_OSA, MN_FNLDCW, MN_FNSTENV_OSA, MN_FNSTCW ; 15C 1792 000011B6 56039D0420030000 <2> dw MN_FLD, MN_FXCH, 0320h, 0000h ; 160 1793 000011BE 2803C801D001D801 <2> dw 0328h, 01C8h, 01D0h, 01D8h ; 164 1794 000011C6 F701AA031C032303 <2> dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 168 1795 000011CE 43045904EA020003 <2> dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 16C 1796 000011D6 3162426239628B62 <2> dw P686 + MN_FCMOVB, P686 + MN_FCMOVE, P686 + MN_FCMOVBE, P686 + MN_FCMOVU ; 170 1797 000011DE 0000300300000000 <2> dw 0000h, 0330h, 0000h, 0000h ; 174 1798 000011E6 2B03000049034F03 <2> dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 178 1799 000011EE 0000560300001204 <2> dw 0000h, MN_FLD, 0000h, MN_FSTP ; 17C 1800 000011F6 5D62706266627962 <2> dw P686 + MN_FCMOVNB, P686 + MN_FCMOVNE, P686 + MN_FCMOVNBE, P686 + MN_FCMOVNU ; 180 1801 000011FE 38036E64A1620000 <2> dw 0338h, P686 + MN_FUCOMI, P686 + MN_FCOMI, 0000h ; 184 1802 00001206 EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 188 1803 0000120E 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 18C 1804 00001216 EA019D0300000000 <2> dw MN_FADD, MN_FMUL, 0000h, 0000h ; 190 1805 0000121E 4A043604F102DD02 <2> dw MN_FSUBR, MN_FSUB, MN_FDIVR, MN_FDIV ; 194 1806 00001226 560300000D041204 <2> dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 198 1807 0000122E 290A0000380A2E04 <2> dw MN_FRSTOR_OSA, 0000h, MN_FNSAVE_OSA, MN_FNSTSW ; 19C 1808 00001236 150300000D041204 <2> dw MN_FFREE, 0000h, MN_FST, MN_FSTP ; 1A0 1809 0000123E 67347F3400000000 <2> dw P386 + MN_FUCOM, P386 + MN_FUCOMP, 0000h, 0000h ; 1A4 1810 00001246 F701AA031C032303 <2> dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 1A8 1811 0000124E 43045904EA020003 <2> dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 1AC 1812 00001256 F001A30300004003 <2> dw MN_FADDP, MN_FMULP, 0000h, 0340h ; 1B0 1813 0000125E 51043C04F802E302 <2> dw MN_FSUBRP, MN_FSUBP, MN_FDIVRP, MN_FDIVP ; 1B4 1814 00001266 2B03000049034F03 <2> dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 1B8 1815 0000126E FE012B0304024F03 <2> dw MN_FBLD, MN_FILD, MN_FBSTP, MN_FISTP ; 1BC 1816 00001276 0000000000000000 <2> dw 0000h, 0000h, 0000h, 0000h ; 1C0 1817 0000127E 48037664A8620000 <2> dw 0348h, P686 + MN_FUCOMIP, P686 + MN_FCOMIP, 0000h ; 1C4 1818 00001286 5B03610369037103 <2> dw MN_FLD1, MN_FLDL2T, MN_FLDL2E, MN_FLDPI ; 1C8 1819 0000128E 7803800388030000 <2> dw MN_FLDLG2, MN_FLDLN2, MN_FLDZ, 0000h ; 1CC 1820 00001296 DD01AC04CE03B703 <2> dw MN_F2XM1, MN_FYL2X, MN_FPTAN, MN_FPATAN ; 1D0 1821 0000129E A304C633C5023103 <2> dw MN_FXTRACT, P386 + MN_FPREM1, MN_FDECSTP, MN_FINCSTP ; 1D4 1822 000012A6 BF03B3040604FD33 <2> dw MN_FPREM, MN_FYL2XP1, MN_FSQRT, P386 + MN_FSINCOS ; 1D8 1823 000012AE D503DE03F733BF32 <2> dw MN_FRNDINT, MN_FSCALE, P386 + MN_FSIN, P386 + MN_FCOS ; 1DC 1824 <2> ;--- The rest of these are squeezed. 1825 000012B6 000038014001BE25 <2> dw 0, 0138h, 0140h, P286 + MN_LAR ; 00 1826 000012BE 2A2691200845C949 <2> dw P286 + MN_LSL, P286 + MN_CLTS, P486 + MN_INVD, P486 + MN_WBINVD ; 04 1827 000012C6 B219343634363436 <2> dw P186 + MN_UD2, P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV ; 08 1828 000012CE 343634363436D159 <2> dw P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV, P586 + MN_WRMSR ; 0C 1829 000012D6 16580F585A613A61 <2> dw P586 + MN_RDTSC, P586 + MN_RDMSR, P686 + MN_CMOVO, P686 + MN_CMOVNO ; 10 1830 000012DE AB60A3607F615261 <2> dw P686 + MN_CMOVB, P686 + MN_CMOVAE, P686 + MN_CMOVZ, P686 + MN_CMOVNZ ; 14 1831 000012E6 B2609C6078614A61 <2> dw P686 + MN_CMOVBE, P686 + MN_CMOVA, P686 + MN_CMOVS, P686 + MN_CMOVNS ; 18 1832 000012EE 68617061D760CF60 <2> dw P686 + MN_CMOVPE, P686 + MN_CMOVPO, P686 + MN_CMOVL, P686 + MN_CMOVGE ; 1C 1833 000012F6 DE60C8608B579657 <2> dw P686 + MN_CMOVLE, P686 + MN_CMOVG, P586 + MN_PUNPCKLBW, P586 + MN_PUNPCKLWD ; 20 1834 000012FE A1574F56C256CB56 <2> dw P586 + MN_PUNPCKLDQ, P586 + MN_PACKSSWB, P586 + MN_PCMPGTB, P586 + MN_PCMPGTW ; 24 1835 00001306 D45659566A577557 <2> dw P586 + MN_PCMPGTD, P586 + MN_PACKUSWB, P586 + MN_PUNPCKHBW, P586 + MN_PUNPCKHWD ; 28 1836 0000130E 8057455639563F56 <2> dw P586 + MN_PUNPCKHDQ, P586 + MN_PACKSSDW, P586 + MN_MOVD, P586 + MN_MOVQ ; 2C 1837 00001316 080310031803A756 <2> dw 0308h, 0310h, 0318h, P586 + MN_PCMPEQB ; 30 1838 0000131E B056B956D7513956 <2> dw P586 + MN_PCMPEQW, P586 + MN_PCMPEQD, P586 + MN_EMMS, P586 + MN_MOVD ; 34 1839 00001326 3F56993585351F35 <2> dw P586 + MN_MOVQ, P386 + MN_JO, P386 + MN_JNO, P386 + MN_JB ; 38 1840 0000132E 1A35AF3594352335 <2> dw P386 + MN_JAE, P386 + MN_JZ, P386 + MN_JNZ, P386 + MN_JBE ; 3C 1841 00001336 1635AB358F35A135 <2> dw P386 + MN_JA, P386 + MN_JS, P386 + MN_JNS, P386 + MN_JPE ; 40 1842 0000133E A635463541354A35 <2> dw P386 + MN_JPO, P386 + MN_JL, P386 + MN_JGE, P386 + MN_JLE ; 44 1843 00001346 3D352A390E399138 <2> dw P386 + MN_JG, P386 + MN_SETO, P386 + MN_SETNO, P386 + MN_SETB ; 48 1844 0000134E 8A384A3923399738 <2> dw P386 + MN_SETAE, P386 + MN_SETZ, P386 + MN_SETNZ, P386 + MN_SETBE ; 4C 1845 00001356 843844391C393639 <2> dw P386 + MN_SETA, P386 + MN_SETS, P386 + MN_SETNS, P386 + MN_SETPE ; 50 1846 0000135E 3D39B738B038BD38 <2> dw P386 + MN_SETPO, P386 + MN_SETL, P386 + MN_SETGE, P386 + MN_SETLE ; 54 1847 00001366 AA38F537F037A651 <2> dw P386 + MN_SETG, P386 + MN_PUSH, P386 + MN_POP, P586 + MN_CPUID ; 58 1848 0000136E 5E305C395C39F537 <2> dw P386 + MN_BT, P386 + MN_SHLD, P386 + MN_SHLD, P386 + MN_PUSH ; 5C 1849 00001376 F0373C586C306239 <2> dw P386 + MN_POP, P586 + MN_RSM, P386 + MN_BTS, P386 + MN_SHRD ; 60 1850 0000137E 6239C73492419241 <2> dw P386 + MN_SHRD, P386 + MN_IMUL, P486 + MN_CMPXCHG, P486 + MN_CMPXCHG ; 64 1851 00001386 C8356730D235D735 <2> dw P386 + MN_LSS, P386 + MN_BTR, P386 + MN_LFS, P386 + MN_LGS ; 68 1852 0000138E C037C037AD19E802 <2> dw P386 + MN_MOVZX, P386 + MN_MOVZX, P186 + MN_UD1, 02E8h ; 6C 1853 00001396 62304D305230B937 <2> dw P386 + MN_BTC, P386 + MN_BSF, P386 + MN_BSR, P386 + MN_MOVSX ; 70 1854 0000139E B937D849D849F002 <2> dw P386 + MN_MOVSX, P486 + MN_XADD, P486 + MN_XADD, 02F0h ; 74 1855 000013A6 5740574057405740 <2> dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 78 1856 000013AE 5740574057405740 <2> dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 7C 1857 000013B6 1E5725572C57EE56 <2> dw P586 + MN_PSRLW, P586 + MN_PSRLD, P586 + MN_PSRLQ, P586 + MN_PMULLW ; 80 1858 000013BE 585761579A568856 <2> dw P586 + MN_PSUBUSB, P586 + MN_PSUBUSW, P586 + MN_PAND, P586 + MN_PADDUSB ; 84 1859 000013C6 9156A05610571757 <2> dw P586 + MN_PADDUSW, P586 + MN_PANDN, P586 + MN_PSRAW, P586 + MN_PSRAD ; 88 1860 000013CE E65648575057F656 <2> dw P586 + MN_PMULHW, P586 + MN_PSUBSB, P586 + MN_PSUBSW, P586 + MN_POR ; 8C 1861 000013D6 78568056AC57FB56 <2> dw P586 + MN_PADDSB, P586 + MN_PADDSW, P586 + MN_PXOR, P586 + MN_PSLLW ; 90 1862 000013DE 02570957DD563357 <2> dw P586 + MN_PSLLD, P586 + MN_PSLLQ, P586 + MN_PMADDWD, P586 + MN_PSUBB ; 94 1863 000013E6 3A57415763566A56 <2> dw P586 + MN_PSUBW, P586 + MN_PSUBD, P586 + MN_PADDB, P586 + MN_PADDW ; 98 1864 000013EE 7156A819D104C901 <2> dw P586 + MN_PADDD, P186 + MN_UD0, MN_INC, MN_DEC ; 9C 1865 000013F6 16005E306C306730 <2> dw MN_BOXCB, P386 + MN_BT, P386 + MN_BTS, P386 + MN_BTR ; A0 1866 000013FE 62309B51F0073406 <2> dw P386 + MN_BTC, P586 + MN_CMPXCHG8B, MN_POP, MN_MOV ; A4 1867 00001406 1E571057FB562557 <2> dw P586 + MN_PSRLW, P586 + MN_PSRAW, P586 + MN_PSLLW, P586 + MN_PSRLD ; A8 1868 0000140E 175702572C570957 <2> dw P586 + MN_PSRAD, P586 + MN_PSLLD, P586 + MN_PSRLQ, P586 + MN_PSLLQ ; AC 1869 00001416 B1030B02E4016104 <2> dw MN_FNOP, MN_FCHS, MN_FABS, MN_FTST ; B0 1870 0000141E 970487340E03D502 <2> dw MN_FXAM, P386 + MN_FUCOMPP, MN_FNENI, MN_FNDISI ; B4 1871 00001426 18024103EE23B702 <2> dw MN_FNCLEX, MN_FNINIT, P286 + MN_FNSETPM, MN_FCOMPP ; B8 1872 0000142E 2E04 <2> dw MN_FNSTSW 1873 <2> 1874 <2> ;--- Disassembler: table converts unsqueezed numbers to squeezed. 1875 <2> 1876 <2> align 8, db 0 1877 <2> sqztab label byte 1878 00001430 0102030400000500 <2> db 1, 2, 3, 4, 0, 0, 5, 0 ; 1E0 1879 00001438 0607000800000000 <2> db 6, 7, 0, 8, 0, 0, 0, 0 ; 1E8 1880 00001440 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F0 1881 00001448 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F8 1882 00001450 090A0B0C0D000E00 <2> db 9, 10, 11, 12, 13, 0, 14, 0 ; 200 1883 00001458 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 208 1884 00001460 0F10110000000000 <2> db 15, 16, 17, 0, 0, 0, 0, 0 ; 210 1885 00001468 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 218 1886 00001470 1213141516171819 <2> db 18, 19, 20, 21, 22, 23, 24, 25 ; 220 1887 00001478 1A1B1C1D1E1F2021 <2> db 26, 27, 28, 29, 30, 31, 32, 33 ; 228 1888 00001480 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 230 1889 00001488 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 238 1890 00001490 2223242526272829 <2> db 34, 35, 36, 37, 38, 39, 40, 41 ; 240 1891 00001498 2A2B2C2D00002E2F <2> db 42, 43, 44, 45, 0, 0, 46, 47 ; 248 1892 000014A0 0030313233343536 <2> db 0, 48, 49, 50, 51, 52, 53, 54 ; 250 1893 000014A8 0000000000003738 <2> db 0, 0, 0, 0, 0, 0, 55, 56 ; 258 1894 000014B0 393A3B3C3D3E3F40 <2> db 57, 58, 59, 60, 61, 62, 63, 64 ; 260 1895 000014B8 4142434445464748 <2> db 65, 66, 67, 68, 69, 70, 71, 72 ; 268 1896 000014C0 494A4B4C4D4E4F50 <2> db 73, 74, 75, 76, 77, 78, 79, 80 ; 270 1897 000014C8 5152535455565758 <2> db 81, 82, 83, 84, 85, 86, 87, 88 ; 278 1898 000014D0 595A5B5C5D5E0000 <2> db 89, 90, 91, 92, 93, 94, 0, 0 ; 280 1899 000014D8 5F60616263640065 <2> db 95, 96, 97, 98, 99,100, 0,101 ; 288 1900 000014E0 666768696A6B6C6D <2> db 102,103,104,105,106,107,108,109 ; 290 1901 000014E8 006E6F7071727374 <2> db 0,110,111,112,113,114,115,116 ; 298 1902 000014F0 7576000000000077 <2> db 117,118, 0, 0, 0, 0, 0,119 ; 2A0 1903 000014F8 78797A7B7C7D7E7F <2> db 120,121,122,123,124,125,126,127 ; 2A8 1904 00001500 0080818200830000 <2> db 0,128,129,130, 0,131, 0, 0 ; 2B0 1905 00001508 8485008687880089 <2> db 132,133, 0,134,135,136, 0,137 ; 2B8 1906 00001510 008A8B00008C0000 <2> db 0,138,139, 0, 0,140, 0, 0 ; 2C0 1907 00001518 8D8E008F90910092 <2> db 141,142, 0,143,144,145, 0,146 ; 2C8 1908 00001520 0093949500960000 <2> db 0,147,148,149, 0,150, 0, 0 ; 2D0 1909 00001528 979899009A9B9C9D <2> db 151,152,153, 0,154,155,156,157 ; 2D8 1910 00001530 9E9F0000000000A0 <2> db 158,159, 0, 0, 0, 0, 0,160 ; 2E0 1911 00001538 00000000A1A2A3A4 <2> db 0, 0, 0, 0,161,162,163,164 ; 2E8 1912 00001540 00A5000000000000 <2> db 0,165, 0, 0, 0, 0, 0, 0 ; 2F0 1913 00001548 A600000000000000 <2> db 166, 0, 0, 0, 0, 0, 0, 0 ; 2F8 1914 00001550 A700000000000000 <2> db 167, 0, 0, 0, 0, 0, 0, 0 ; 300 1915 00001558 0000A800A900AA00 <2> db 0, 0,168, 0,169, 0,170, 0 ; 308 1916 00001560 0000AB00AC00AD00 <2> db 0, 0,171, 0,172, 0,173, 0 ; 310 1917 00001568 0000AE000000AF00 <2> db 0, 0,174, 0, 0, 0,175, 0 ; 318 1918 00001570 B000000000000000 <2> db 176, 0, 0, 0, 0, 0, 0, 0 ; 320 1919 00001578 B1B20000B3B40000 <2> db 177,178, 0, 0,179,180, 0, 0 ; 328 1920 00001580 00B5000000000000 <2> db 0,181, 0, 0, 0, 0, 0, 0 ; 330 1921 00001588 B6B7B8B9BA000000 <2> db 182,183,184,185,186, 0, 0, 0 ; 338 1922 00001590 00BB000000000000 <2> db 0,187, 0, 0, 0, 0, 0, 0 ; 340 1923 00001598 BC00000000000000 <2> db 188, 0, 0, 0, 0, 0, 0, 0 ; 348 1924 <2> 1925 <2> ;--- Disassembler: table of mnemonics that change in the presence of a WAIT 1926 <2> ;--- instruction. 1927 <2> 1928 <2> align 2, db 0 1929 <2> wtab1 label word 1930 000015A0 3A03390338033B035D- <2> dw 033Ah,0339h,0338h,033Bh,015Dh,019Eh,033Ch,015Fh 1930 000015A9 019E013C035F01 <2> 1931 000015B0 5E0148039F01 <2> dw 015Eh,0348h,019Fh 1932 <2> wtab2 label word 1933 000015B6 1102 <2> dw MN_FCLEX 1934 000015B8 CE02 <2> dw MN_FDISI 1935 000015BA 0803 <2> dw MN_FENI 1936 000015BC 3A03 <2> dw MN_FINIT 1937 000015BE 8E03 <2> dw MN_FLDCW 1938 000015C0 310A <2> dw MN_FSAVE_OSA 1939 000015C2 E603 <2> dw MN_FSETPM 1940 000015C4 1804 <2> dw MN_FSTCW 1941 000015C6 400A <2> dw MN_FSTENV_OSA 1942 000015C8 2704 <2> dw MN_FSTSW 1943 000015CA 2704 <2> dw MN_FSTSW 1944 <2> N_WTAB equ ($ - wtab2) / 2 1945 <2> 1946 <2> ;--- Disassembler: table for operands which have a different mnemonic for 1947 <2> ;--- their 32 bit versions (66h prefix). 1948 <2> 1949 <2> align 2, db 0 1950 <2> ltabo1 label word 1951 000015CC 98009900 <2> dw 098h,099h 1952 <2> ltabo2 label word 1953 000015D0 7C00 <2> dw MN_CWDE 1954 000015D2 B201 <2> dw MN_CDQ 1955 <2> N_LTABO equ ($ - ltabo2) / 2 1956 <2> 1957 <2> ;--- Disassembler: table for operands which have a different mnemonic for 1958 <2> ;--- their 32 bit versions (67h prefix). 1959 <2> 1960 <2> align 2, db 0 1961 <2> ltaba1 label word 1962 000015D4 E300 <2> dw 0E3h 1963 <2> ltaba2 label word 1964 000015D6 3205 <2> dw MN_JECXZ 1965 <2> N_LTABA equ ($ - ltaba2) / 2 1966 <2> 1967 <2> ;--- Disassembler: table of lockable instructions 1968 <2> 1969 <2> align 2, db 0 1970 <2> locktab label word 1971 000015D8 0A0102011000110008- <2> dw 010Ah,0102h,010h,011h,0108h,0100h,00h,01h 1971 000015E1 01000100000100 <2> 1972 000015E8 0C010401200021009B- <2> dw 010Ch,0104h,020h,021h,029Bh,02EFh,0293h,02EEh 1972 000015F1 02EF029302EE02 <2> 1973 000015F8 8B02ED0290029102E1- <2> dw 028Bh,02EDh,0290h,0291h,02E1h,0131h,02E0h,0130h 1973 00001601 023101E0023001 <2> 1974 00001608 2B012A010901010108- <2> dw 012Bh,012Ah,0109h,0101h,08h,09h,010Bh,0103h 1974 00001611 0009000B010301 <2> 1975 00001618 180019000D01050128- <2> dw 018h,019h,010Dh,0105h,028h,029h,02A0h,02A1h 1975 00001621 002900A002A102 <2> 1976 00001628 860087000E01060130- <2> dw 086h,087h,010Eh,0106h,030h,031h 1976 00001631 003100 <2> 1977 <2> N_LOCK equ ($ - locktab) / 2 1978 <2> 1979 <2> ;--- Equates used in the assembly-language code. 1980 <2> 1981 <2> SPARSE_BASE equ 01E0h 1982 <2> SFPGROUP3 equ 0338h 1983 <2> GROUP7 equ 0130h 1984 <2> SGROUP4 equ 02F8h 362 <1> [list +] 363 <1> opindex: 364 <1> [list -] 381 00001634 01 <2> db %$index 382 <2> [list -] 381 00001635 00 <2> db %$index 382 <2> [list -] 381 00001636 01 <2> db %$index 382 <2> [list -] 381 00001637 03 <2> db %$index 382 <2> [list -] 381 00001638 05 <2> db %$index 382 <2> [list -] 381 00001639 07 <2> db %$index 382 <2> [list -] 381 0000163A 09 <2> db %$index 382 <2> [list -] 381 0000163B 0B <2> db %$index 382 <2> [list -] 381 0000163C 0D <2> db %$index 382 <2> [list -] 381 0000163D 0F <2> db %$index 382 <2> [list -] 381 0000163E 11 <2> db %$index 382 <2> [list -] 381 0000163F 10 <2> db %$index 382 <2> [list -] 381 00001640 11 <2> db %$index 382 <2> [list -] 381 00001641 10 <2> db %$index 382 <2> [list -] 381 00001642 11 <2> db %$index 382 <2> [list -] 381 00001643 13 <2> db %$index 382 <2> [list -] 381 00001644 16 <2> db %$index 382 <2> [list -] 381 00001645 18 <2> db %$index 382 <2> [list -] 381 00001646 18 <2> db %$index 382 <2> [list -] 381 00001647 1A <2> db %$index 382 <2> [list -] 381 00001648 1C <2> db %$index 382 <2> [list -] 381 00001649 1C <2> db %$index 382 <2> [list -] 381 0000164A 1C <2> db %$index 382 <2> [list -] 381 0000164B 1E <2> db %$index 382 <2> [list -] 381 0000164C 1D <2> db %$index 382 <2> [list -] 381 0000164D 1E <2> db %$index 382 <2> [list -] 381 0000164E 1D <2> db %$index 382 <2> [list -] 381 0000164F 1E <2> db %$index 382 <2> [list -] 381 00001650 1D <2> db %$index 382 <2> [list -] 381 00001651 20 <2> db %$index 382 <2> [list -] 381 00001652 21 <2> db %$index 382 <2> [list -] 381 00001653 22 <2> db %$index 382 <2> [list -] 381 00001654 23 <2> db %$index 382 <2> [list -] 381 00001655 22 <2> db %$index 382 <2> [list -] 381 00001656 22 <2> db %$index 382 <2> [list -] 381 00001657 23 <2> db %$index 382 <2> [list -] 381 00001658 25 <2> db %$index 382 <2> [list -] 381 00001659 26 <2> db %$index 382 <2> [list -] 381 0000165A 27 <2> db %$index 382 <2> [list -] 381 0000165B 28 <2> db %$index 382 <2> [list -] 381 0000165C 29 <2> db %$index 382 <2> [list -] 381 0000165D 28 <2> db %$index 382 <2> [list -] 381 0000165E 28 <2> db %$index 382 <2> [list -] 381 0000165F 27 <2> db %$index 382 <2> [list -] 381 00001660 28 <2> db %$index 382 <2> [list -] 381 00001661 29 <2> db %$index 382 <2> [list -] 381 00001662 2A <2> db %$index 382 <2> [list -] 381 00001663 2B <2> db %$index 382 <2> [list -] 381 00001664 2C <2> db %$index 382 <2> [list -] 381 00001665 2D <2> db %$index 382 <2> [list -] 381 00001666 2E <2> db %$index 382 <2> [list -] 381 00001667 2F <2> db %$index 382 <2> [list -] 381 00001668 2E <2> db %$index 382 <2> [list -] 381 00001669 2E <2> db %$index 382 <2> [list -] 381 0000166A 2F <2> db %$index 382 <2> [list -] 381 0000166B 2F <2> db %$index 382 <2> [list -] 381 0000166C 32 <2> db %$index 382 <2> [list -] 381 0000166D 34 <2> db %$index 382 <2> [list -] 381 0000166E 37 <2> db %$index 382 <2> [list -] 381 0000166F 39 <2> db %$index 382 <2> [list -] 381 00001670 3A <2> db %$index 382 <2> [list -] 381 00001671 3B <2> db %$index 382 <2> [list -] 381 00001672 3C <2> db %$index 382 <2> [list -] 381 00001673 3C <2> db %$index 382 <2> [list -] 381 00001674 3D <2> db %$index 382 <2> [list -] 381 00001675 3F <2> db %$index 382 <2> [list -] 381 00001676 40 <2> db %$index 382 <2> [list -] 381 00001677 43 <2> db %$index 382 <2> [list -] 381 00001678 46 <2> db %$index 382 <2> [list -] 381 00001679 48 <2> db %$index 382 <2> [list -] 381 0000167A 4A <2> db %$index 382 <2> [list -] 381 0000167B 4B <2> db %$index 382 <2> [list -] 381 0000167C 4C <2> db %$index 382 <2> [list -] 381 0000167D 4F <2> db %$index 382 <2> [list -] 381 0000167E 4F <2> db %$index 382 <2> [list -] 381 0000167F 50 <2> db %$index 382 <2> [list -] 381 00001680 51 <2> db %$index 382 <2> [list -] 381 00001681 52 <2> db %$index 382 <2> [list -] 381 00001682 51 <2> db %$index 382 <2> [list -] 381 00001683 52 <2> db %$index 382 <2> [list -] 381 00001684 54 <2> db %$index 382 <2> [list -] 381 00001685 56 <2> db %$index 382 <2> [list -] 381 00001686 58 <2> db %$index 382 <2> [list -] 381 00001687 5A <2> db %$index 382 <2> [list -] 381 00001688 5C <2> db %$index 382 <2> [list -] 381 00001689 5B <2> db %$index 382 <2> [list -] 381 0000168A 5B <2> db %$index 382 <2> [list -] 381 0000168B 5C <2> db %$index 382 <2> [list -] 381 0000168C 5D <2> db %$index 382 <2> [list -] 381 0000168D 60 <2> db %$index 382 <2> [list -] 381 0000168E 63 <2> db %$index 382 <2> [list -] 381 0000168F 64 <2> db %$index 382 <2> [list -] 381 00001690 65 <2> db %$index 382 <2> [list -] 381 00001691 64 <2> db %$index 382 <2> [list -] 381 00001692 64 <2> db %$index 382 <2> [list -] 381 00001693 63 <2> db %$index 382 <2> [list -] 381 00001694 63 <2> db %$index 382 <2> [list -] 381 00001695 62 <2> db %$index 382 <2> [list -] 381 00001696 62 <2> db %$index 382 <2> [list -] 381 00001697 61 <2> db %$index 382 <2> [list -] 381 00001698 61 <2> db %$index 382 <2> [list -] 381 00001699 60 <2> db %$index 382 <2> [list -] 381 0000169A 60 <2> db %$index 382 <2> [list -] 381 0000169B 5F <2> db %$index 382 <2> [list -] 381 0000169C 5F <2> db %$index 382 <2> [list -] 381 0000169D 60 <2> db %$index 382 <2> [list -] 381 0000169E 61 <2> db %$index 382 <2> [list -] 381 0000169F 62 <2> db %$index 382 <2> [list -] 381 000016A0 63 <2> db %$index 382 <2> [list -] 381 000016A1 64 <2> db %$index 382 <2> [list -] 381 000016A2 65 <2> db %$index 382 <2> [list -] 381 000016A3 66 <2> db %$index 382 <2> [list -] 381 000016A4 67 <2> db %$index 382 <2> [list -] 381 000016A5 68 <2> db %$index 382 <2> [list -] 381 000016A6 69 <2> db %$index 382 <2> [list -] 381 000016A7 6A <2> db %$index 382 <2> [list -] 381 000016A8 6C <2> db %$index 382 <2> [list -] 381 000016A9 6E <2> db %$index 382 <2> [list -] 381 000016AA 70 <2> db %$index 382 <2> [list -] 381 000016AB 72 <2> db %$index 382 <2> [list -] 381 000016AC 73 <2> db %$index 382 <2> [list -] 381 000016AD 74 <2> db %$index 382 <2> [list -] 381 000016AE 73 <2> db %$index 382 <2> [list -] 381 000016AF 75 <2> db %$index 382 <2> [list -] 381 000016B0 78 <2> db %$index 382 <2> [list -] 381 000016B1 79 <2> db %$index 382 <2> [list -] 381 000016B2 7B <2> db %$index 382 <2> [list -] 381 000016B3 7B <2> db %$index 382 <2> [list -] 381 000016B4 7B <2> db %$index 382 <2> [list -] 382 ****************** <2> warning: Most assembler table prefix bytes: 1 (ofs 4h) mne BOXCB variant (240h + 0*8 + 7),85,, [-w+user] 446 <1> 447 <1> usesection lDEBUG_DATA_ENTRY 1474 1475 1476 usesection lDEBUG_DATA_ENTRY 1477 1478 msg_start: 1479 %include "msg.asm" 1 <1> %if 0 2 <1> 3 <1> lDebug messages 4 <1> 5 <1> Copyright (C) 1995-2003 Paul Vojta 6 <1> Copyright (C) 2008-2012 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 _MESSAGESEGMENT 17 <1> %define usemessagesegment usesection MESSAGESEGMENT 18 <1> %else 19 <1> %define usemessagesegment usesection lDEBUG_DATA_ENTRY 20 <1> %endif 21 <1> 22 <1> %define MESSAGE_INLINE 1 23 <1> 24 <1> %if _HELP_COMPRESSED 25 <1> %assign NONCOMPRESSEDFLAG 1 26 <1> %else 27 <1> %assign NONCOMPRESSEDFLAG 0 28 <1> %endif 29 <1> 30 <1> %if _HELP_EXTERNAL && _HELP_COMPRESSED 31 <1> %imacro helppage 1-2 32 <1> %defstr %%basename %1 33 <1> %strcat %%includename %%basename, ".hhs" 34 <1> align 2, db 0 35 <1> %00: 36 <1> dw %%end - %%start 37 <1> %%start: 38 <1> incbin %%includename 39 <1> %%end: 40 <1> %endmacro 41 <1> %elif _HELP_EXTERNAL 42 <1> %imacro helppage 1-2 0 43 <1> %defstr %%basename %1 44 <1> %strcat %%includename %%basename, ".txt" 45 <1> %00: 46 <1> incbin %%includename 47 <1> %ifn %2 48 <1> asciz 49 <1> %endif 50 <1> %endmacro 51 <1> %else 52 <1> %imacro helppage 1-2 0 53 <1> %defstr %%basename %1 54 <1> %strcat %%includename "help/", %%basename, ".asm" 55 <1> %00: 56 <1> %include %%includename 57 <1> %ifn %2 58 <1> asciz 59 <1> %endif 60 <1> %endmacro 61 <1> %endif 62 <1> 63 <1> usesection lDEBUG_DATA_ENTRY 64 <1> 65 <1> msg: 66 <1> 67 <1> align 2, db 0 68 <1> .help_array: 69 000011CA [8E15] <1> dw .build_nameversion + NONCOMPRESSEDFLAG 70 000011CC [0000] <1> dw .help_header + NONCOMPRESSEDFLAG 71 000011CE [0F00] <1> dw .help_contents 72 <1> .help_array_amount: equ ($ - .help_array) / 2 73 <1> 74 <1> usemessagesegment 75 <1> align 2, db 0 76 <1> .help_header: 77 00000000 2068656C7020736372- <1> asciz " help screen",13,10 77 00000009 65656E0D0A00 <1> 78 <1> .help_contents: helppage main 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 0000000F 617373656D626C6509- <3> db "assemble",9, "A [address]",13,10 20 00000018 41205B616464726573- <3> 20 00000021 735D0D0A <3> 21 <3> %if _ATTACH 22 00000025 617474616368207072- <3> db "attach process",9, "ATTACH psp",13,10 22 0000002E 6F6365737309415454- <3> 22 00000037 414348207073700D0A <3> 23 <3> %endif 24 <3> %if _BREAKPOINTS 25 00000040 73657420627265616B- <3> db "set breakpoint",9, "BP index|AT|NEW address [[NUMBER=]number] [WHEN=cond] [ID=id]",13,10 25 00000049 706F696E7409425020- <3> 25 00000052 696E6465787C41547C- <3> 25 0000005B 4E4557206164647265- <3> 25 00000064 7373205B5B4E554D42- <3> 25 0000006D 45523D5D6E756D6265- <3> 25 00000076 725D205B5748454E3D- <3> 25 0000007F 636F6E645D205B4944- <3> 25 00000088 3D69645D0D0A <3> 26 0000008E 207365742049440909- <3> db " set ID",9,9, "BI index|AT address [ID=]id",13,10 26 00000097 424920696E6465787C- <3> 26 000000A0 415420616464726573- <3> 26 000000A9 73205B49443D5D6964- <3> 26 000000B2 0D0A <3> 27 000000B4 2073657420636F6E64- <3> db " set condition",9, "BW index|AT address [WHEN=]cond",13,10 27 000000BD 6974696F6E09425720- <3> 27 000000C6 696E6465787C415420- <3> 27 000000CF 61646472657373205B- <3> 27 000000D8 5748454E3D5D636F6E- <3> 27 000000E1 640D0A <3> 28 000000E4 20736574206F666673- <3> db " set offset",9, "BO index|AT address [OFFSET=]number",13,10 28 000000ED 657409424F20696E64- <3> 28 000000F6 65787C415420616464- <3> 28 000000FF 72657373205B4F4646- <3> 28 00000108 5345543D5D6E756D62- <3> 28 00000111 65720D0A <3> 29 00000115 20736574206E756D62- <3> db " set number",9, "BN index|AT address|ALL number",13,10 29 0000011E 657209424E20696E64- <3> 29 00000127 65787C415420616464- <3> 29 00000130 726573737C414C4C20- <3> 29 00000139 6E756D6265720D0A <3> 30 00000141 20636C656172090942- <3> db " clear",9,9, "BC index|AT address|ALL",13,10 30 0000014A 4320696E6465787C41- <3> 30 00000153 542061646472657373- <3> 30 0000015C 7C414C4C0D0A <3> 31 00000162 2064697361626C6509- <3> db " disable",9, "BD index|AT address|ALL",13,10 31 0000016B 424420696E6465787C- <3> 31 00000174 415420616464726573- <3> 31 0000017D 737C414C4C0D0A <3> 32 00000184 20656E61626C650909- <3> db " enable",9,9, "BE index|AT address|ALL",13,10 32 0000018D 424520696E6465787C- <3> 32 00000196 415420616464726573- <3> 32 0000019F 737C414C4C0D0A <3> 33 000001A6 20746F67676C650909- <3> db " toggle",9,9, "BT index|AT address|ALL",13,10 33 000001AF 425420696E6465787C- <3> 33 000001B8 415420616464726573- <3> 33 000001C1 737C414C4C0D0A <3> 34 000001C8 207377617009094253- <3> db " swap",9,9, "BS index1 index2",13,10 34 000001D1 20696E646578312069- <3> 34 000001DA 6E646578320D0A <3> 35 000001E1 206C6973740909424C- <3> db " list",9,9, "BL [index|AT address|ALL]",13,10 35 000001EA 205B696E6465787C41- <3> 35 000001F3 542061646472657373- <3> 35 000001FC 7C414C4C5D0D0A <3> 36 <3> %endif 37 <3> %if _DEBUG 38 <3> db "break upwards",9, "BU",13,10 39 <3> %endif 40 00000203 636F6D706172650909- <3> db "compare",9,9, "C range address",13,10 40 0000020C 432072616E67652061- <3> 40 00000215 6464726573730D0A <3> 41 0000021D 64756D70090944205B- <3> db "dump",9,9, "D [range]",13,10 41 00000226 72616E67655D0D0A <3> 42 0000022E 64756D702062797465- <3> db "dump bytes",9, "DB [range]",13,10 42 00000237 73094442205B72616E- <3> 42 00000240 67655D0D0A <3> 43 00000245 64756D7020776F7264- <3> db "dump words",9, "DW [range]",13,10 43 0000024E 73094457205B72616E- <3> 43 00000257 67655D0D0A <3> 44 0000025C 64756D702064776F72- <3> db "dump dwords",9, "DD [range]",13,10 44 00000265 6473094444205B7261- <3> 44 0000026E 6E67655D0D0A <3> 45 <3> %if _INT 46 00000274 64756D7020696E7465- <3> db "dump interrupts",9, "DI[R][M][L] interrupt [count]",13,10 46 0000027D 727275707473094449- <3> 46 00000286 5B525D5B4D5D5B4C5D- <3> 46 0000028F 20696E746572727570- <3> 46 00000298 74205B636F756E745D- <3> 46 000002A1 0D0A <3> 47 <3> %endif 48 <3> %if _PM 49 <3> db "dump LDT",9, "DL selector [count]",13,10 50 <3> %endif 51 <3> %if _MCB 52 000002A3 64756D70204D434220- <3> db "dump MCB chain",9, "DM [segment]",13,10 52 000002AC 636861696E09444D20- <3> 52 000002B5 5B7365676D656E745D- <3> 52 000002BE 0D0A <3> 53 <3> ;db "dump S/SD MCBs",9, "DS",13,10 54 <3> %endif 55 <3> %if _DSTRINGS 56 000002C0 646973706C61792073- <3> db "display strings",9, "DZ/D$/D[W]# [address]",13,10 56 000002C9 7472696E677309445A- <3> 56 000002D2 2F44242F445B575D23- <3> 56 000002DB 205B61646472657373- <3> 56 000002E4 5D0D0A <3> 57 <3> %endif 58 <3> %if _PM 59 <3> db "dump ext memory",9, "DX physical_address",13,10 60 <3> db "descriptor mod",9, "D.A/D.D/D.B/D.L/D.T, D.? for help",13,10 61 <3> %endif 62 <3> %if _DT 63 000002E7 64756D702074657874- <3> db "dump text table",9, "DT [T] [number]",13,10 63 000002F0 207461626C65094454- <3> 63 000002F9 205B545D205B6E756D- <3> 63 00000302 6265725D0D0A <3> 64 <3> %endif 65 00000308 656E74657209094520- <3> db "enter",9,9, "E [address [list]]",13,10 65 00000311 5B6164647265737320- <3> 65 0000031A 5B6C6973745D5D0D0A <3> 66 00000323 66696C6C0909462072- <3> db "fill",9,9, "F range [RANGE range|list]",13,10 66 0000032C 616E6765205B52414E- <3> 66 00000335 47452072616E67657C- <3> 66 0000033E 6C6973745D0D0A <3> 67 00000345 676F090947205B3D61- <3> db "go",9,9, "G [=address] [breakpts]",13,10 67 0000034E 6464726573735D205B- <3> 67 00000357 627265616B7074735D- <3> 67 00000360 0D0A <3> 68 00000362 676F746F0909474F54- <3> db "goto",9,9, "GOTO :label",13,10 68 0000036B 4F203A6C6162656C0D- <3> 68 00000374 0A <3> 69 00000375 686578206164642F73- <3> db "hex add/sub",9, "H value1 [value2 [...]]",13,10 69 0000037E 756209482076616C75- <3> 69 00000387 6531205B76616C7565- <3> 69 00000390 32205B2E2E2E5D5D0D- <3> 69 00000399 0A <3> 70 0000039A 626173652064697370- <3> db "base display",9, "H BASE=number [GROUP=number] [WIDTH=number] value",13,10 70 000003A3 6C6179094820424153- <3> 70 000003AC 453D6E756D62657220- <3> 70 000003B5 5B47524F55503D6E75- <3> 70 000003BE 6D6265725D205B5749- <3> 70 000003C7 4454483D6E756D6265- <3> 70 000003D0 725D2076616C75650D- <3> 70 000003D9 0A <3> 71 000003DA 696E7075740909495B- <3> db "input",9,9, "I[W|D] port",13,10 71 000003E3 577C445D20706F7274- <3> 71 000003EC 0D0A <3> 72 000003EE 6966206E756D657269- <3> db "if numeric",9, "IF [NOT] (cond) THEN cmd",13,10 72 000003F7 63094946205B4E4F54- <3> 72 00000400 5D2028636F6E642920- <3> 72 00000409 5448454E20636D640D- <3> 72 00000412 0A <3> 73 00000413 696620736372697074- <3> db "if script file",9, "IF [NOT] EXISTS Y file [:label] THEN cmd",13,10 73 0000041C 2066696C6509494620- <3> 73 00000425 5B4E4F545D20455849- <3> 73 0000042E 53545320592066696C- <3> 73 00000437 65205B3A6C6162656C- <3> 73 00000440 5D205448454E20636D- <3> 73 00000449 640D0A <3> 74 0000044C 6C6F61642070726F67- <3> db "load program",9, "L [address]",13,10 74 00000455 72616D094C205B6164- <3> 74 0000045E 64726573735D0D0A <3> 75 00000466 6C6F61642073656374- <3> db "load sectors",9, "L address drive sector count",13,10 75 0000046F 6F7273094C20616464- <3> 75 00000478 726573732064726976- <3> 75 00000481 6520736563746F7220- <3> 75 0000048A 636F756E740D0A <3> 76 00000491 6D6F766509094D2072- <3> db "move",9,9, "M range address",13,10 76 0000049A 616E67652061646472- <3> 76 000004A3 6573730D0A <3> 77 000004A8 38307838362F783837- <3> db "80x86/x87 mode",9, "M [0..6|C|NC|C2|?]",13,10 77 000004B1 206D6F6465094D205B- <3> 77 000004BA 302E2E367C437C4E43- <3> 77 000004C3 7C43327C3F5D0D0A <3> 78 000004CB 736574206E616D6509- <3> db "set name",9, "N [[drive:][path]progname.ext [parameters]]",13,10 78 000004D4 4E205B5B6472697665- <3> 78 000004DD 3A5D5B706174685D70- <3> 78 000004E6 726F676E616D652E65- <3> 78 000004EF 7874205B706172616D- <3> 78 000004F8 65746572735D5D0D0A <3> 79 00000501 73657420636F6D6D61- <3> db "set command",9, "K [[drive:][path]progname.ext [parameters]]",13,10 79 0000050A 6E64094B205B5B6472- <3> 79 00000513 6976653A5D5B706174- <3> 79 0000051C 685D70726F676E616D- <3> 79 00000525 652E657874205B7061- <3> 79 0000052E 72616D65746572735D- <3> 79 00000537 5D0D0A <3> 80 0000053A 6F757470757409094F- <3> db "output",9,9, "O[W|D] port value",13,10 80 00000543 5B577C445D20706F72- <3> 80 0000054C 742076616C75650D0A <3> 81 00000555 70726F636565640909- <3> db "proceed",9,9, "P [=address] [count [WHILE cond] [SILENT [count]]]",13,10 81 0000055E 50205B3D6164647265- <3> 81 00000567 73735D205B636F756E- <3> 81 00000570 74205B5748494C4520- <3> 81 00000579 636F6E645D205B5349- <3> 81 00000582 4C454E54205B636F75- <3> 81 0000058B 6E745D5D5D0D0A <3> 82 00000592 717569740909510D0A <3> db "quit",9,9, "Q",13,10 83 0000059B 717569742070726F63- <3> db "quit process",9, "QA",13,10 83 000005A4 6573730951410D0A <3> 84 000005AC 7175697420616E6420- <3> db "quit and break",9, "QB",13,10 84 000005B5 627265616B0951420D- <3> 84 000005BE 0A <3> 85 000005BF 726567697374657209- <3> db "register",9, "R [register [value]]",13,10 85 000005C8 52205B726567697374- <3> 85 000005D1 6572205B76616C7565- <3> 85 000005DA 5D5D0D0A <3> 86 000005DE 52756E205220657874- <3> db "Run R extended",9, "RE",13,10 86 000005E7 656E6465640952450D- <3> 86 000005F0 0A <3> 87 000005F1 524520636F6D6D616E- <3> db "RE commands",9, "RE.LIST|APPEND|REPLACE [commands]",13,10 87 000005FA 64730952452E4C4953- <3> 87 00000603 547C415050454E447C- <3> 87 0000060C 5245504C414345205B- <3> 87 00000615 636F6D6D616E64735D- <3> 87 0000061E 0D0A <3> 88 00000620 52756E20436F6D6D61- <3> db "Run Commandline",9, "RC",13,10 88 00000629 6E646C696E65095243- <3> 88 00000632 0D0A <3> 89 00000634 524320636F6D6D616E- <3> db "RC commands",9, "RC.LIST|APPEND|REPLACE [commands]",13,10 89 0000063D 64730952432E4C4953- <3> 89 00000646 547C415050454E447C- <3> 89 0000064F 5245504C414345205B- <3> 89 00000658 636F6D6D616E64735D- <3> 89 00000661 0D0A <3> 90 <3> %if _MMXSUPP 91 00000663 4D4D58207265676973- <3> db "MMX register",9, "RM [BYTES|WORDS|DWORDS|QWORDS]",13,10 91 0000066C 74657209524D205B42- <3> 91 00000675 595445537C574F5244- <3> 91 0000067E 537C44574F5244537C- <3> 91 00000687 51574F5244535D0D0A <3> 92 <3> %endif 93 <3> %if _RN 94 00000690 465055207265676973- <3> db "FPU register",9, "RN",13,10 94 00000699 74657209524E0D0A <3> 95 <3> %endif 96 000006A1 746F67676C65203338- <3> db "toggle 386 regs",9, "RX",13,10 96 000006AA 362072656773095258- <3> 96 000006B3 0D0A <3> 97 000006B5 736561726368090953- <3> db "search",9,9, "S range [REVERSE] [SILENT number] [RANGE range|list]",13,10 97 000006BE 2072616E6765205B52- <3> 97 000006C7 4556455253455D205B- <3> 97 000006D0 53494C454E54206E75- <3> 97 000006D9 6D6265725D205B5241- <3> 97 000006E2 4E47452072616E6765- <3> 97 000006EB 7C6C6973745D0D0A <3> 98 000006F3 736C6565700909534C- <3> db "sleep",9,9, "SLEEP count [SECONDS|TICKS]",13,10 98 000006FC 45455020636F756E74- <3> 98 00000705 205B5345434F4E4453- <3> 98 0000070E 7C5449434B535D0D0A <3> 99 00000717 747261636509095420- <3> db "trace",9,9, "T [=address] [count [WHILE cond] [SILENT [count]]]",13,10 99 00000720 5B3D61646472657373- <3> 99 00000729 5D205B636F756E7420- <3> 99 00000732 5B5748494C4520636F- <3> 99 0000073B 6E645D205B53494C45- <3> 99 00000744 4E54205B636F756E74- <3> 99 0000074D 5D5D5D0D0A <3> 100 00000752 747261636520286578- <3> db "trace (exc str)",9 100 0000075B 63207374722909 <3> 101 00000762 5450205B3D61646472- <3> db "TP [=address] [count [WHILE cond] [SILENT [count]]]",13,10 101 0000076B 6573735D205B636F75- <3> 101 00000774 6E74205B5748494C45- <3> 101 0000077D 20636F6E645D205B53- <3> 101 00000786 494C454E54205B636F- <3> 101 0000078F 756E745D5D5D0D0A <3> 102 00000797 7472616365206D6F64- <3> db "trace mode",9, "TM [0|1]",13,10 102 000007A0 6509544D205B307C31- <3> 102 000007A9 5D0D0A <3> 103 <3> %if _TSR 104 000007AC 656E74657220545352- <3> db "enter TSR mode",9, "TSR",13,10 104 000007B5 206D6F646509545352- <3> 104 000007BE 0D0A <3> 105 <3> %endif 106 000007C0 756E617373656D626C- <3> db "unassemble",9, "U [range]",13,10 106 000007C9 650955205B72616E67- <3> 106 000007D2 655D0D0A <3> 107 <3> %if _VXCHG 108 000007D6 766965772073637265- <3> db "view screen",9, "V [ON|OFF [KEEP|NOKEEP]]",13,10 108 000007DF 656E0956205B4F4E7C- <3> 108 000007E8 4F4646205B4B454550- <3> 108 000007F1 7C4E4F4B4545505D5D- <3> 108 000007FA 0D0A <3> 109 <3> %endif 110 000007FC 77726974652070726F- <3> db "write program",9, "W [address]",13,10 110 00000805 6772616D0957205B61- <3> 110 0000080E 6464726573735D0D0A <3> 111 00000817 777269746520736563- <3> db "write sectors",9, "W address drive sector count",13,10 111 00000820 746F72730957206164- <3> 111 00000829 647265737320647269- <3> 111 00000832 766520736563746F72- <3> 111 0000083B 20636F756E740D0A <3> 112 <3> %if _EMS 113 00000843 657870616E64656420- <3> db "expanded mem",9, "XA/XD/XM/XR/XS, X? for help",13,10 113 0000084C 6D656D0958412F5844- <3> 113 00000855 2F584D2F58522F5853- <3> 113 0000085E 2C20583F20666F7220- <3> 113 00000867 68656C700D0A <3> 114 <3> %endif 115 0000086D 72756E207363726970- <3> db "run script",9, "Y [partition/][scriptfile] [:label]",13,10 115 00000876 740959205B70617274- <3> 115 0000087F 6974696F6E2F5D5B73- <3> 115 00000888 637269707466696C65- <3> 115 00000891 5D205B3A6C6162656C- <3> 115 0000089A 5D0D0A <3> 116 0000089D 0D0A <3> db 13,10 117 0000089F 4164646974696F6E61- <3> db "Additional help topics:",13,10 117 000008A8 6C2068656C7020746F- <3> 117 000008B1 706963733A0D0A <3> 118 <3> %if _EXTHELP 119 000008B8 205265676973746572- <3> db " Registers",9, "?R",13,10 119 000008C1 73093F520D0A <3> 120 000008C7 20466C61677309093F- <3> db " Flags",9,9, "?F",13,10 120 000008D0 460D0A <3> 121 <3> %if _COND 122 000008D3 20436F6E646974696F- <3> db " Conditionals",9, "?C",13,10 122 000008DC 6E616C73093F430D0A <3> 123 <3> %endif 124 <3> %if _EXPRESSIONS 125 000008E5 204578707265737369- <3> db " Expressions",9, "?E",13,10 125 000008EE 6F6E73093F450D0A <3> 126 <3> %endif 127 <3> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 128 000008F6 205661726961626C65- <3> db " Variables",9, "?V",13,10 128 000008FF 73093F560D0A <3> 129 <3> %endif 130 00000905 205220457874656E64- <3> db " R Extended",9, "?RE",13,10 130 0000090E 6564093F52450D0A <3> 131 00000916 2052756E206B657977- <3> db " Run keywords",9, "?RUN",13,10 131 0000091F 6F726473093F52554E- <3> 131 00000928 0D0A <3> 132 <3> %if _OPTIONS 133 0000092A 204F7074696F6E7320- <3> db " Options pages",9, "?OPTIONS",13,10 133 00000933 7061676573093F4F50- <3> 133 0000093C 54494F4E530D0A <3> 134 00000943 204F7074696F6E7309- <3> db " Options",9, "?O",13,10 134 0000094C 3F4F0D0A <3> 135 <3> %endif 136 <3> %if _BOOTLDR 137 00000950 20426F6F74206C6F61- <3> db " Boot loading",9, "?BOOT",13,10 137 00000959 64696E67093F424F4F- <3> 137 00000962 540D0A <3> 138 <3> %endif 139 <3> %endif 140 00000965 206C44656275672062- <3> db " lDebug build",9, "?BUILD",13,10 140 0000096E 75696C64093F425549- <3> 140 00000977 4C440D0A <3> 141 0000097B 206C44656275672062- <3> db " lDebug build",9, "?B",13,10 141 00000984 75696C64093F420D0A <3> 142 <3> %if _EXTHELP 143 0000098D 206C44656275672073- <3> db " lDebug sources",9, "?SOURCE",13,10 143 00000996 6F7572636573093F53- <3> 143 0000099F 4F555243450D0A <3> 144 000009A6 206C4465627567206C- <3> db " lDebug license",9, "?L",13,10 144 000009AF 6963656E7365093F4C- <3> 144 000009B8 0D0A <3> 145 <3> %endif 146 <3> %if _PM 147 <3> db 13,10 148 <3> db "Prompts: '-' = real or V86 mode; '#' = protected mode",13,10 149 <3> %endif 57 <2> %ifn %2 58 000009BA 00 <2> asciz 59 <2> %endif 79 <1> 80 <1> %if _EXTHELP 81 <1> usesection lDEBUG_DATA_ENTRY 82 000011D0 534F5552434500 <1> .source:asciz "SOURCE" 83 <1> 84 <1> usemessagesegment 85 <1> .help_source: helppage source 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 000009BB 546865206F72696769- <3> db "The original lDebug sources can be obtained from the repo located at",13,10 20 000009C4 6E616C206C44656275- <3> 20 000009CD 6720736F7572636573- <3> 20 000009D6 2063616E206265206F- <3> 20 000009DF 627461696E65642066- <3> 20 000009E8 726F6D207468652072- <3> 20 000009F1 65706F206C6F636174- <3> 20 000009FA 65642061740D0A <3> 21 00000A01 68747470733A2F2F68- <3> db "https://hg.pushbx.org/ecm/ldebug (E. C. Masloch's repo)",13,10 21 00000A0A 672E7075736862782E- <3> 21 00000A13 6F72672F65636D2F6C- <3> 21 00000A1C 64656275672028452E- <3> 21 00000A25 20432E204D61736C6F- <3> 21 00000A2E 63682773207265706F- <3> 21 00000A37 290D0A <3> 22 00000A3A 0D0A <3> db 13,10 23 00000A3C 52656C656173657320- <3> db "Releases of lDebug are available via the website at",13,10 23 00000A45 6F66206C4465627567- <3> 23 00000A4E 206172652061766169- <3> 23 00000A57 6C61626C6520766961- <3> 23 00000A60 207468652077656273- <3> 23 00000A69 6974652061740D0A <3> 24 00000A71 68747470733A2F2F70- <3> db "https://pushbx.org/ecm/web/#projects-ldebug",13,10 24 00000A7A 75736862782E6F7267- <3> 24 00000A83 2F65636D2F7765622F- <3> 24 00000A8C 2370726F6A65637473- <3> 24 00000A95 2D6C64656275670D0A <3> 25 00000A9E 0D0A <3> db 13,10 26 00000AA0 546865206D6F737420- <3> db "The most recent manual is hosted at https://pushbx.org/ecm/doc/ in the",13,10 26 00000AA9 726563656E74206D61- <3> 26 00000AB2 6E75616C2069732068- <3> 26 00000ABB 6F7374656420617420- <3> 26 00000AC4 68747470733A2F2F70- <3> 26 00000ACD 75736862782E6F7267- <3> 26 00000AD6 2F65636D2F646F632F- <3> 26 00000ADF 20696E207468650D0A <3> 27 00000AE8 66696C6573206C6465- <3> db "files ldebug.htm, ldebug.txt, and ldebug.pdf",13,10 27 00000AF1 6275672E68746D2C20- <3> 27 00000AFA 6C64656275672E7478- <3> 27 00000B03 742C20616E64206C64- <3> 27 00000B0C 656275672E7064660D- <3> 27 00000B15 0A <3> 57 <2> %ifn %2 58 00000B16 00 <2> asciz 59 <2> %endif 86 <1> %endif 87 <1> 88 <1> usesection lDEBUG_DATA_ENTRY 89 <1> .re: 90 000011D7 524500 <1> asciz "RE" 91 <1> 92 <1> usemessagesegment 93 <1> .help_re: helppage re 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 00000B17 5468652052554E2063- <3> db "The RUN commands (T, TP, P, G) and the RE command use the RE command",13,10 20 00000B20 6F6D6D616E64732028- <3> 20 00000B29 542C2054502C20502C- <3> 20 00000B32 20472920616E642074- <3> 20 00000B3B 686520524520636F6D- <3> 20 00000B44 6D616E642075736520- <3> 20 00000B4D 74686520524520636F- <3> 20 00000B56 6D6D616E640D0A <3> 21 00000B5D 62756666657220746F- <3> db "buffer to run commands. Most commands are allowed to be run from the",13,10 21 00000B66 2072756E20636F6D6D- <3> 21 00000B6F 616E64732E204D6F73- <3> 21 00000B78 7420636F6D6D616E64- <3> 21 00000B81 732061726520616C6C- <3> 21 00000B8A 6F77656420746F2062- <3> 21 00000B93 652072756E2066726F- <3> 21 00000B9C 6D207468650D0A <3> 22 00000BA3 524520627566666572- <3> db "RE buffer. Disallowed commands include program-loading L, A, E that",13,10 22 00000BAC 2E20446973616C6C6F- <3> 22 00000BB5 77656420636F6D6D61- <3> 22 00000BBE 6E647320696E636C75- <3> 22 00000BC7 64652070726F677261- <3> 22 00000BD0 6D2D6C6F6164696E67- <3> 22 00000BD9 204C2C20412C204520- <3> 22 00000BE2 746861740D0A <3> 23 00000BE8 737769746368657320- <3> db "switches the line input mode, TSR, Q, Y, RE, and further RUN commands.",13,10 23 00000BF1 746865206C696E6520- <3> 23 00000BFA 696E707574206D6F64- <3> 23 00000C03 652C205453522C2051- <3> 23 00000C0C 2C20592C2052452C20- <3> 23 00000C15 616E64206675727468- <3> 23 00000C1E 65722052554E20636F- <3> 23 00000C27 6D6D616E64732E0D0A <3> 24 00000C30 5768656E2074686520- <3> db "When the RE buffer is used as input during T, TP, or P with the",13,10 24 00000C39 524520627566666572- <3> 24 00000C42 206973207573656420- <3> 24 00000C4B 617320696E70757420- <3> 24 00000C54 647572696E6720542C- <3> 24 00000C5D 2054502C206F722050- <3> 24 00000C66 207769746820746865- <3> 24 00000C6F 0D0A <3> 25 00000C71 53494C454E54206B65- <3> db "SILENT keyword, commands that use the auxbuff are also disallowed and",13,10 25 00000C7A 79776F72642C20636F- <3> 25 00000C83 6D6D616E6473207468- <3> 25 00000C8C 617420757365207468- <3> 25 00000C95 652061757862756666- <3> 25 00000C9E 2061726520616C736F- <3> 25 00000CA7 20646973616C6C6F77- <3> 25 00000CB0 656420616E640D0A <3> 26 00000CB8 77696C6C20656D6974- <3> db "will emit an error noting the conflict.",13,10 26 00000CC1 20616E206572726F72- <3> 26 00000CCA 206E6F74696E672074- <3> 26 00000CD3 686520636F6E666C69- <3> 26 00000CDC 63742E0D0A <3> 27 00000CE1 0D0A <3> db 13,10 28 00000CE3 52452E4C4953542073- <3> db "RE.LIST shows the current RE buffer contents in a format usable by",13,10 28 00000CEC 686F77732074686520- <3> 28 00000CF5 63757272656E742052- <3> 28 00000CFE 452062756666657220- <3> 28 00000D07 636F6E74656E747320- <3> 28 00000D10 696E206120666F726D- <3> 28 00000D19 617420757361626C65- <3> 28 00000D22 2062790D0A <3> 29 00000D27 746865206F74686572- <3> db "the other RE commands. RE.APPEND appends the following commands to",13,10 29 00000D30 20524520636F6D6D61- <3> 29 00000D39 6E64732E2052452E41- <3> 29 00000D42 5050454E4420617070- <3> 29 00000D4B 656E64732074686520- <3> 29 00000D54 666F6C6C6F77696E67- <3> 29 00000D5D 20636F6D6D616E6473- <3> 29 00000D66 20746F0D0A <3> 30 00000D6B 746865206275666665- <3> db "the buffer, if they fit. RE.REPLACE appends to the start of the",13,10 30 00000D74 722C20696620746865- <3> 30 00000D7D 79206669742E205245- <3> 30 00000D86 2E5245504C41434520- <3> 30 00000D8F 617070656E64732074- <3> 30 00000D98 6F2074686520737461- <3> 30 00000DA1 7274206F6620746865- <3> 30 00000DAA 0D0A <3> 31 00000DAC 6275666665722E2057- <3> db "buffer. When specifying commands, an unescaped semicolon is parsed",13,10 31 00000DB5 68656E207370656369- <3> 31 00000DBE 6679696E6720636F6D- <3> 31 00000DC7 6D616E64732C20616E- <3> 31 00000DD0 20756E657363617065- <3> 31 00000DD9 642073656D69636F6C- <3> 31 00000DE2 6F6E20697320706172- <3> 31 00000DEB 7365640D0A <3> 32 00000DF0 61732061206C696E65- <3> db "as a linebreak to break apart individual commands. Backslashes can",13,10 32 00000DF9 627265616B20746F20- <3> 32 00000E02 627265616B20617061- <3> 32 00000E0B 727420696E64697669- <3> 32 00000E14 6475616C20636F6D6D- <3> 32 00000E1D 616E64732E20426163- <3> 32 00000E26 6B736C617368657320- <3> 32 00000E2F 63616E0D0A <3> 33 00000E34 626520757365642074- <3> db "be used to escape semicolons and backslashes themselves.",13,10 33 00000E3D 6F2065736361706520- <3> 33 00000E46 73656D69636F6C6F6E- <3> 33 00000E4F 7320616E6420626163- <3> 33 00000E58 6B736C617368657320- <3> 33 00000E61 7468656D73656C7665- <3> 33 00000E6A 732E0D0A <3> 34 00000E6E 0D0A <3> db 13,10 35 00000E70 507265666978696E67- <3> db "Prefixing a line with an @ (AT sign) causes the command not to be",13,10 35 00000E79 2061206C696E652077- <3> 35 00000E82 69746820616E204020- <3> 35 00000E8B 284154207369676E29- <3> 35 00000E94 206361757365732074- <3> 35 00000E9D 686520636F6D6D616E- <3> 35 00000EA6 64206E6F7420746F20- <3> 35 00000EAF 62650D0A <3> 36 00000EB3 73686F776E20746F20- <3> db "shown to the standard output of the debugger when run. Otherwise,",13,10 36 00000EBC 746865207374616E64- <3> 36 00000EC5 617264206F75747075- <3> 36 00000ECE 74206F662074686520- <3> 36 00000ED7 646562756767657220- <3> 36 00000EE0 7768656E2072756E2E- <3> 36 00000EE9 204F74686572776973- <3> 36 00000EF2 652C0D0A <3> 37 00000EF6 74686520636F6D6D61- <3> db "the command will be shown with a percent sign % or ~% prompt.",13,10 37 00000EFF 6E642077696C6C2062- <3> 37 00000F08 652073686F776E2077- <3> 37 00000F11 697468206120706572- <3> 37 00000F1A 63656E74207369676E- <3> 37 00000F23 2025206F72207E2520- <3> 37 00000F2C 70726F6D70742E0D0A <3> 38 00000F35 0D0A <3> db 13,10 39 00000F37 546865206465666175- <3> db "The default RE buffer content is @R. This content is also",13,10 39 00000F40 6C7420524520627566- <3> 39 00000F49 66657220636F6E7465- <3> 39 00000F52 6E742069732040522E- <3> 39 00000F5B 205468697320636F6E- <3> 39 00000F64 74656E742069732061- <3> 39 00000F6D 6C736F0D0A <3> 40 00000F72 646574656374656420- <3> db "detected and handled specifically; if found as the only command",13,10 40 00000F7B 616E642068616E646C- <3> 40 00000F84 656420737065636966- <3> 40 00000F8D 6963616C6C793B2069- <3> 40 00000F96 6620666F756E642061- <3> 40 00000F9F 7320746865206F6E6C- <3> 40 00000FA8 7920636F6D6D616E64- <3> 40 00000FB1 0D0A <3> 41 00000FB3 7468652068616E646C- <3> db "the handler directly calls the register dump implementation",13,10 41 00000FBC 657220646972656374- <3> 41 00000FC5 6C792063616C6C7320- <3> 41 00000FCE 746865207265676973- <3> 41 00000FD7 7465722064756D7020- <3> 41 00000FE0 696D706C656D656E74- <3> 41 00000FE9 6174696F6E0D0A <3> 42 00000FF0 776974686F75742073- <3> db "without setting up and tearing down the special execution",13,10 42 00000FF9 657474696E67207570- <3> 42 00001002 20616E642074656172- <3> 42 0000100B 696E6720646F776E20- <3> 42 00001014 746865207370656369- <3> 42 0000101D 616C20657865637574- <3> 42 00001026 696F6E0D0A <3> 43 0000102B 656E7669726F6E6D65- <3> db "environment used to run arbitrary commands from the RE buffer.",13,10 43 00001034 6E7420757365642074- <3> 43 0000103D 6F2072756E20617262- <3> 43 00001046 69747261727920636F- <3> 43 0000104F 6D6D616E6473206672- <3> 43 00001058 6F6D20746865205245- <3> 43 00001061 206275666665722E0D- <3> 43 0000106A 0A <3> 57 <2> %ifn %2 58 0000106B 00 <2> asciz 59 <2> %endif 94 <1> 95 <1> usesection lDEBUG_DATA_ENTRY 96 <1> .run: 97 000011DA 52554E00 <1> asciz "RUN" 98 <1> 99 <1> usemessagesegment 100 <1> .help_run: helppage run 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 0000106C 542028747261636529- <3> db "T (trace), TP (trace except proceed past string operations), and P (proceed)",13,10 20 00001075 2C2054502028747261- <3> 20 0000107E 636520657863657074- <3> 20 00001087 2070726F6365656420- <3> 20 00001090 706173742073747269- <3> 20 00001099 6E67206F7065726174- <3> 20 000010A2 696F6E73292C20616E- <3> 20 000010AB 642050202870726F63- <3> 20 000010B4 656564290D0A <3> 21 000010BA 63616E20626520666F- <3> db "can be followed by a number of repetitions and then the keyword WHILE,",13,10 21 000010C3 6C6C6F776564206279- <3> 21 000010CC 2061206E756D626572- <3> 21 000010D5 206F66207265706574- <3> 21 000010DE 6974696F6E7320616E- <3> 21 000010E7 64207468656E207468- <3> 21 000010F0 65206B6579776F7264- <3> 21 000010F9 205748494C452C0D0A <3> 22 00001102 7768696368206D7573- <3> db "which must be followed by a conditional expression.",13,10 22 0000110B 7420626520666F6C6C- <3> 22 00001114 6F7765642062792061- <3> 22 0000111D 20636F6E646974696F- <3> 22 00001126 6E616C206578707265- <3> 22 0000112F 7373696F6E2E0D0A <3> 23 00001137 0D0A <3> db 13,10 24 00001139 5468652073656C6563- <3> db "The selected run command is repeated as many times as specified by the",13,10 24 00001142 7465642072756E2063- <3> 24 0000114B 6F6D6D616E64206973- <3> 24 00001154 207265706561746564- <3> 24 0000115D 206173206D616E7920- <3> 24 00001166 74696D657320617320- <3> 24 0000116F 737065636966696564- <3> 24 00001178 206279207468650D0A <3> 25 00001181 6E756D6265722C206F- <3> db "number, or until the WHILE condition evaluates no longer to true.",13,10 25 0000118A 7220756E74696C2074- <3> 25 00001193 6865205748494C4520- <3> 25 0000119C 636F6E646974696F6E- <3> 25 000011A5 206576616C75617465- <3> 25 000011AE 73206E6F206C6F6E67- <3> 25 000011B7 657220746F20747275- <3> 25 000011C0 652E0D0A <3> 26 000011C4 0D0A <3> db 13,10 27 000011C6 416674657220746865- <3> db "After the number of repetitions or (if present) after the WHILE condition",13,10 27 000011CF 206E756D626572206F- <3> 27 000011D8 662072657065746974- <3> 27 000011E1 696F6E73206F722028- <3> 27 000011EA 69662070726573656E- <3> 27 000011F3 742920616674657220- <3> 27 000011FC 746865205748494C45- <3> 27 00001205 20636F6E646974696F- <3> 27 0000120E 6E0D0A <3> 28 00001211 746865206B6579776F- <3> db "the keyword SILENT may follow. If that is the case, all register dumps",13,10 28 0000121A 72642053494C454E54- <3> 28 00001223 206D617920666F6C6C- <3> 28 0000122C 6F772E204966207468- <3> 28 00001235 617420697320746865- <3> 28 0000123E 20636173652C20616C- <3> 28 00001247 6C2072656769737465- <3> 28 00001250 722064756D70730D0A <3> 29 00001259 646F6E652064757269- <3> db "done during the run are buffered by the debugger and the run remains",13,10 29 00001262 6E6720746865207275- <3> 29 0000126B 6E2061726520627566- <3> 29 00001274 666572656420627920- <3> 29 0000127D 746865206465627567- <3> 29 00001286 67657220616E642074- <3> 29 0000128F 68652072756E207265- <3> 29 00001298 6D61696E730D0A <3> 30 0000129F 73696C656E742E2041- <3> db "silent. After the run, the last dumps are replayed from the buffer",13,10 30 000012A8 667465722074686520- <3> 30 000012B1 72756E2C2074686520- <3> 30 000012BA 6C6173742064756D70- <3> 30 000012C3 732061726520726570- <3> 30 000012CC 6C617965642066726F- <3> 30 000012D5 6D2074686520627566- <3> 30 000012DE 6665720D0A <3> 31 000012E3 616E6420646973706C- <3> db "and displayed. At most as many dumps as fit into the buffer are",13,10 31 000012EC 617965642E20417420- <3> 31 000012F5 6D6F7374206173206D- <3> 31 000012FE 616E792064756D7073- <3> 31 00001307 206173206669742069- <3> 31 00001310 6E746F207468652062- <3> 31 00001319 756666657220617265- <3> 31 00001322 0D0A <3> 32 00001324 646973706C61796564- <3> db "displayed. (The buffer is currently 8 KiB sized by default, though the",13,10 32 0000132D 2E2028546865206275- <3> 32 00001336 666665722069732063- <3> 32 0000133F 757272656E746C7920- <3> 32 00001348 38204B69422073697A- <3> 32 00001351 656420627920646566- <3> 32 0000135A 61756C742C2074686F- <3> 32 00001363 756768207468650D0A <3> 33 0000136C 2F4120737769746368- <3> db "/A switch can be specified to init to grow it up to 24 KiB.)",13,10 33 00001375 2063616E2062652073- <3> 33 0000137E 706563696669656420- <3> 33 00001387 746F20696E69742074- <3> 33 00001390 6F2067726F77206974- <3> 33 00001399 20757020746F203234- <3> 33 000013A2 204B69422E290D0A <3> 34 000013AA 0D0A <3> db 13,10 35 000013AC 49662061206E756D62- <3> db "If a number follows behind the SILENT keyword, only at most that many",13,10 35 000013B5 657220666F6C6C6F77- <3> 35 000013BE 7320626568696E6420- <3> 35 000013C7 7468652053494C454E- <3> 35 000013D0 54206B6579776F7264- <3> 35 000013D9 2C206F6E6C79206174- <3> 35 000013E2 206D6F737420746861- <3> 35 000013EB 74206D616E790D0A <3> 36 000013F3 64756D707320617265- <3> db "dumps are displayed from the buffer. The dumps that are displayed",13,10 36 000013FC 20646973706C617965- <3> 36 00001405 642066726F6D207468- <3> 36 0000140E 65206275666665722E- <3> 36 00001417 205468652064756D70- <3> 36 00001420 732074686174206172- <3> 36 00001429 6520646973706C6179- <3> 36 00001432 65640D0A <3> 37 00001436 61726520616C776179- <3> db "are always those last written into the buffer, thus last occurred.",13,10 37 0000143F 732074686F7365206C- <3> 37 00001448 617374207772697474- <3> 37 00001451 656E20696E746F2074- <3> 37 0000145A 686520627566666572- <3> 37 00001463 2C2074687573206C61- <3> 37 0000146C 7374206F6363757272- <3> 37 00001475 65642E0D0A <3> 57 <2> %ifn %2 58 0000147A 00 <2> asciz 59 <2> %endif 101 <1> 102 <1> usesection lDEBUG_DATA_ENTRY 103 <1> 104 <1> align 2, db 0 105 <1> .build_array: 106 000011DE [8E15] <1> dw .build_nameversion + NONCOMPRESSEDFLAG 107 000011E0 [AC15] <1> dw .build_linebreak + NONCOMPRESSEDFLAG 108 <1> .build_version_amount: equ ($ - .build_array) / 2 109 000011E2 [DE15] <1> dw .build_ldebug + NONCOMPRESSEDFLAG 110 000011E4 [1E16] <1> dw .build_lmacros + NONCOMPRESSEDFLAG 111 <1> %if _SYMBOLIC 112 <1> dw .build_symsnip + NONCOMPRESSEDFLAG 113 <1> %endif 114 <1> %if _BOOTLDR 115 000011E6 [5E16] <1> dw .build_scanptab + NONCOMPRESSEDFLAG 116 <1> %endif 117 000011E8 [9E16] <1> dw .build_inicomp + NONCOMPRESSEDFLAG 118 <1> %if _BOOTLDR 119 <1> %if _CHECKSUM 120 <1> dw .build_inicheck + NONCOMPRESSEDFLAG 121 <1> %endif 122 000011EA [DE16] <1> dw .build_ldosboot + NONCOMPRESSEDFLAG 123 <1> %endif 124 <1> .build_short_amount: equ ($ - .build_array) / 2 125 000011EC [1E17] <1> dw .build_long 126 <1> .build_long_amount: equ ($ - .build_array) / 2 127 <1> 128 <1> %if _OPTIONS && _EXTHELP 129 <1> align 2, db 0 130 <1> .options_array: 131 000011EE [F82D] <1> dw .options_1 132 000011F0 [6933] <1> dw .options_2 133 000011F2 [AE36] <1> dw .options_3 134 000011F4 [6D3A] <1> dw .options_4 135 000011F6 [BE3C] <1> dw .options_5 136 000011F8 [BF3C] <1> dw .options_6 137 <1> .options_array_option_amount: equ ($ - .options_array) / 2 138 000011FA [0B40] <1> dw .flags_1 139 000011FC [B743] <1> dw .asmoptions_1 140 <1> .options_array_amount: equ ($ - .options_array) / 2 141 <1> 142 <1> .options_scan: 143 000011FE 313233343536 <1> db "123456" 144 <1> .options_scan_amount: equ ($ - .options_scan) 145 <1> %if .options_array_option_amount != .options_scan_amount 146 <1> %error Array size mismatch 147 <1> %endif 148 <1> 149 <1> .string_options: 150 00001204 4F5054494F4E5300 <1> asciz "OPTIONS" 151 <1> 152 <1> usemessagesegment 153 <1> .options_pages: helppage options 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 0000147B 456E746572206F6E65- <3> db "Enter one of the following commands to get a corresponding help page:",13,10 20 00001484 206F66207468652066- <3> 20 0000148D 6F6C6C6F77696E6720- <3> 20 00001496 636F6D6D616E647320- <3> 20 0000149F 746F20676574206120- <3> 20 000014A8 636F72726573706F6E- <3> 20 000014B1 64696E672068656C70- <3> 20 000014BA 20706167653A0D0A <3> 21 000014C2 0D0A <3> db 13,10 22 000014C4 3F4F310944434F3120- <3> db "?O1",9,"DCO1 - Options",13,10 22 000014CD 2D204F7074696F6E73- <3> 22 000014D6 0D0A <3> 23 000014D8 3F4F320944434F3220- <3> db "?O2",9,"DCO2 - More Options",13,10 23 000014E1 2D204D6F7265204F70- <3> 23 000014EA 74696F6E730D0A <3> 24 000014F1 3F4F330944434F3320- <3> db "?O3",9,"DCO3 - More Options",13,10 24 000014FA 2D204D6F7265204F70- <3> 24 00001503 74696F6E730D0A <3> 25 0000150A 3F4F340944434F3420- <3> db "?O4",9,"DCO4 - Interrupt Hooking Options",13,10 25 00001513 2D20496E7465727275- <3> 25 0000151C 707420486F6F6B696E- <3> 25 00001525 67204F7074696F6E73- <3> 25 0000152E 0D0A <3> 26 00001530 3F4F360944434F3620- <3> db "?O6",9,"DCO6 - More Options",13,10 26 00001539 2D204D6F7265204F70- <3> 26 00001542 74696F6E730D0A <3> 27 00001549 3F4F4909444946202D- <3> db "?OI",9,"DIF - Internal Flags",13,10 27 00001552 20496E7465726E616C- <3> 27 0000155B 20466C6167730D0A <3> 28 00001563 3F4F410944414F202D- <3> db "?OA",9,"DAO - Assembler/Disassembler Options",13,10 28 0000156C 20417373656D626C65- <3> 28 00001575 722F44697361737365- <3> 28 0000157E 6D626C6572204F7074- <3> 28 00001587 696F6E730D0A <3> 57 <2> %ifn %2 58 0000158D 00 <2> asciz 59 <2> %endif 154 <1> %endif 155 <1> 156 <1> usesection lDEBUG_DATA_ENTRY 157 <1> .string_build: 158 0000120C 4255494C4400 <1> asciz "BUILD" 159 <1> .string_version: 160 00001212 56455253494F4E00 <1> asciz "VERSION" 161 <1> 162 <1> usemessagesegment 163 <1> align 2, db 0 164 <1> .build_nameversion: 165 0000158E 6C4465627567207265- <1> asciz _PROGNAME,_VERSION 165 00001597 6C6561736520362028- <1> 165 000015A0 323032332D30382D32- <1> 165 000015A9 362900 <1> 166 <1> 167 <1> align 2, db 0 168 <1> .build_linebreak: 169 000015AC 0D0A00 <1> asciz 13,10 170 000015AF 00 <1> _fill 80, 0, .build_nameversion 171 <1> 172 <1> align 2, db 0 173 <1> .build_ldebug: 174 <1> %ifnidn _REVISIONID,"" 175 000015DE 536F7572636520436F- <1> db "Source Control Revision ID: ",_REVISIONID,13,10 175 000015E7 6E74726F6C20526576- <1> 175 000015F0 6973696F6E2049443A- <1> 175 000015F9 206867206466393330- <1> 175 00001602 333338383861612028- <1> 175 0000160B 3434343020616E6365- <1> 175 00001614 73746F7273290D0A <1> 176 <1> %endif 177 0000161C 00 <1> asciz 178 0000161D 00 <1> _fill 64, 0, .build_ldebug 179 <1> 180 <1> align 2, db 0 181 <1> .build_lmacros: 182 0000161E 55736573206C6D6163- <1> fill 64, 0, asciz _REVISIONID_LMACROS 182 00001627 726F733A2020526576- <1> 182 00001630 6973696F6E20494420- <1> 182 00001639 686720386635333966- <1> 182 00001642 643032633166202831- <1> 182 0000164B 353420616E63657374- <1> 182 00001654 6F7273290D0A0000- <1> 182 00001654 <1> 183 <1> 184 <1> %if _SYMBOLIC 185 <1> align 2, db 0 186 <1> .build_symsnip: 187 <1> fill 64, 0, asciz _REVISIONID_SYMSNIP 188 <1> %endif 189 <1> 190 <1> %if _BOOTLDR 191 <1> align 2, db 0 192 <1> .build_scanptab: 193 0000165E 55736573207363616E- <1> fill 64, 0, asciz _REVISIONID_SCANPTAB 193 00001667 707461623A20526576- <1> 193 00001670 6973696F6E20494420- <1> 193 00001679 686720306535333038- <1> 193 00001682 316331353331202831- <1> 193 0000168B 3020616E636573746F- <1> 193 00001694 7273290D0A0000- <1> 193 00001694 <1> 194 <1> %endif 195 <1> 196 <1> align 2, db 0 197 <1> .build_inicomp: 198 0000169E 5573657320696E6963- <1> fill 64, 0, asciz _REVISIONID_INICOMP 198 000016A7 6F6D703A2020526576- <1> 198 000016B0 6973696F6E20494420- <1> 198 000016B9 686720343138363064- <1> 198 000016C2 653164623065202835- <1> 198 000016CB 333920616E63657374- <1> 198 000016D4 6F7273290D0A0000- <1> 198 000016D4 <1> 199 <1> 200 <1> %if _BOOTLDR 201 <1> %if _CHECKSUM 202 <1> align 2, db 0 203 <1> .build_inicheck: 204 <1> fill 64, 0, asciz _REVISIONID_INICHECK 205 <1> %endif 206 <1> 207 <1> align 2, db 0 208 <1> .build_ldosboot: 209 000016DE 55736573206C646F73- <1> fill 64, 0, asciz _REVISIONID_LDOSBOOT 209 000016E7 626F6F743A20526576- <1> 209 000016F0 6973696F6E20494420- <1> 209 000016F9 686720396265626361- <1> 209 00001702 356636353866202837- <1> 209 0000170B 313820616E63657374- <1> 209 00001714 6F7273290D0A0000- <1> 209 00001714 <1> 210 <1> %endif 211 <1> 212 <1> %if _EXTHELP 213 <1> .build_long: helppage build 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 0000171E 0D0A <3> db 13,10 21 <3> %if _PM 22 <3> db "DPMI-capable",13,10 23 <3> %if _NOEXTENDER 24 <3> db " DPMI host without extender",13,10 25 <3> %endif 26 <3> %if 0 27 <3> %if _WIN9XSUPP 28 <3> db " No Windows 4 DPMI hook",13,10 29 <3> %endif 30 <3> %if _PM && _DOSEMU 31 <3> db " No DOSEMU DPMI hook",13,10 32 <3> %endif 33 <3> %else 34 <3> db " Automatic DPMI entrypoint hook detection",13,10 35 <3> %endif 36 <3> %if _EXCCSIP 37 <3> db " Display exception address",13,10 38 <3> %endif 39 <3> %if _DISPHOOK 40 <3> db " Display hooking DPMI entry",13,10 41 <3> %endif 42 <3> %endif 43 <3> %if _DEBUG 44 <3> db "Debuggable",13,10 45 <3> %if _DEBUG_COND 46 <3> db "Conditionally Debuggable",13,10 47 <3> %endif 48 <3> %endif 49 <3> %if _INT 50 00001720 444920636F6D6D616E- <3> db "DI command",13,10 50 00001729 640D0A <3> 51 <3> %endif 52 <3> %if _MCB 53 0000172C 444D20636F6D6D616E- <3> db "DM command",13,10 53 00001735 640D0A <3> 54 <3> %endif 55 <3> %if _DSTRINGS 56 00001738 4420737472696E6720- <3> db "D string commands",13,10 56 00001741 636F6D6D616E64730D- <3> 56 0000174A 0A <3> 57 <3> %endif 58 <3> %if _SDUMP 59 0000174B 53206D617463682064- <3> db "S match dumps line of following data",13,10 59 00001754 756D7073206C696E65- <3> 59 0000175D 206F6620666F6C6C6F- <3> 59 00001766 77696E672064617461- <3> 59 0000176F 0D0A <3> 60 <3> %endif 61 <3> %if _RN 62 00001771 524E20636F6D6D616E- <3> db "RN command",13,10 62 0000177A 640D0A <3> 63 <3> %endif 64 <3> %if _USESDA 65 0000177D 416363657373205344- <3> db "Access SDA current PSP field",13,10 65 00001786 412063757272656E74- <3> 65 0000178F 20505350206669656C- <3> 65 00001798 640D0A <3> 66 <3> %endif 67 <3> %if _VDD 68 0000179B 4C6F6164204E545644- <3> db "Load NTVDM VDD for sector access",13,10 68 000017A4 4D2056444420666F72- <3> 68 000017AD 20736563746F722061- <3> 68 000017B6 63636573730D0A <3> 69 <3> %endif 70 <3> %if _EMS 71 000017BD 5820636F6D6D616E64- <3> db "X commands for EMS access",13,10 71 000017C6 7320666F7220454D53- <3> 71 000017CF 206163636573730D0A <3> 72 <3> %endif 73 <3> %if _MMXSUPP 74 000017D8 524D20636F6D6D616E- <3> db "RM command and reading MMX registers as variables",13,10 74 000017E1 6420616E6420726561- <3> 74 000017EA 64696E67204D4D5820- <3> 74 000017F3 726567697374657273- <3> 74 000017FC 206173207661726961- <3> 74 00001805 626C65730D0A <3> 75 <3> %endif 76 <3> %if _EXPRESSIONS 77 0000180B 45787072657373696F- <3> db "Expression evaluator",13,10 77 00001814 6E206576616C756174- <3> 77 0000181D 6F720D0A <3> 78 <3> %endif 79 <3> %if _INDIRECTION 80 00001821 20496E646972656374- <3> db " Indirection in expressions",13,10 80 0000182A 696F6E20696E206578- <3> 80 00001833 7072657373696F6E73- <3> 80 0000183C 0D0A <3> 81 <3> %endif 82 <3> %if _VARIABLES 83 0000183E 5661726961626C6573- <3> db "Variables with user-defined purpose",13,10 83 00001847 207769746820757365- <3> 83 00001850 722D646566696E6564- <3> 83 00001859 20707572706F73650D- <3> 83 00001862 0A <3> 84 <3> %endif 85 <3> %if _OPTIONS 86 00001863 446562756767657220- <3> db "Debugger option and status variables",13,10 86 0000186C 6F7074696F6E20616E- <3> 86 00001875 642073746174757320- <3> 86 0000187E 7661726961626C6573- <3> 86 00001887 0D0A <3> 87 <3> %endif 88 <3> %if _PSPVARIABLES 89 00001889 505350207661726961- <3> db "PSP variables",13,10 89 00001892 626C65730D0A <3> 90 <3> %endif 91 <3> %if _COND 92 00001898 436F6E646974696F6E- <3> db "Conditional jump notice in register dump",13,10 92 000018A1 616C206A756D70206E- <3> 92 000018AA 6F7469636520696E20- <3> 92 000018B3 726567697374657220- <3> 92 000018BC 64756D700D0A <3> 93 <3> %endif 94 <3> %if _TSR 95 000018C2 545352206D6F646520- <3> db "TSR mode (Process detachment)",13,10 95 000018CB 2850726F6365737320- <3> 95 000018D4 6465746163686D656E- <3> 95 000018DD 74290D0A <3> 96 <3> %endif 97 <3> %if _DEVICE 98 000018E1 4C6F616461626C6520- <3> db "Loadable device driver",13,10 98 000018EA 646576696365206472- <3> 98 000018F3 697665720D0A <3> 99 <3> %endif 100 <3> %if _BOOTLDR 101 000018F9 426F6F74206C6F6164- <3> db "Boot loader",13,10 101 00001902 65720D0A <3> 102 <3> %endif 103 <3> %if _BREAKPOINTS 104 00001906 5065726D616E656E74- <3> db "Permanent breakpoints",13,10 104 0000190F 20627265616B706F69- <3> 104 00001918 6E74730D0A <3> 105 <3> %endif 106 <3> %push 107 0000191D 496E74657263657074- <3> db "Intercepted" 107 00001926 6564 <3> 108 <3> %if _PM 109 <3> db " 86M" 110 <3> %endif 111 00001928 20696E746572727570- <3> db " interrupts:" 111 00001931 74733A <3> 112 <3> %define %$pref " " 113 <3> %macro dispint 2.nolist 114 <3> %if %1 115 <3> db %$pref, %2 116 <3> %define %$pref ", " 117 <3> %endif 118 <3> %endmacro 119 00001934 203030 <3> dispint _CATCHINT00, "00" 120 00001937 2C203031 <3> dispint _CATCHINT01, "01" 121 0000193B 2C203033 <3> dispint _CATCHINT03, "03" 122 0000193F 2C203036 <3> dispint _CATCHINT06, "06" 123 <3> dispint _CATCHINT07, "07" 124 00001943 2C203043 <3> dispint _CATCHINT0C, "0C" 125 00001947 2C203044 <3> dispint _CATCHINT0D, "0D" 126 0000194B 2C203138 <3> dispint _CATCHINT18, "18" 127 0000194F 2C203139 <3> dispint _CATCHINT19, "19" 128 <3> %ifidn %$pref," " 129 <3> db " none" 130 <3> %endif 131 00001953 0D0A <3> db 13,10 132 <3> %if _PM || _CATCHINT08 133 00001955 50726F636573736564 <3> db "Processed" 134 <3> %if _PM 135 <3> db " 86M" 136 <3> %endif 137 0000195E 20696E746572727570- <3> db " interrupts:" 137 00001967 74733A <3> 138 <3> %define %$pref " " 139 0000196A 203038 <3> dispint _CATCHINT08, "08" 140 <3> dispint _PM, "2F.1687" 141 <3> %ifidn %$pref," " 142 <3> db " none" 143 <3> %endif 144 0000196D 0D0A <3> db 13,10 145 <3> %endif 146 <3> %if _PM 147 <3> db "Intercepted DPMI exceptions:" 148 <3> %define %$pref " " 149 <3> dispint _CATCHEXC00, "00" 150 <3> dispint _CATCHEXC01, "01" 151 <3> dispint _CATCHEXC03, "03" 152 <3> dispint _CATCHEXC06, "06" 153 <3> dispint _CATCHEXC0C, "0C" 154 <3> dispint _CATCHEXC0D, "0D" 155 <3> dispint _CATCHEXC0E, "0E" 156 <3> %ifidn %$pref," " 157 <3> db " none" 158 <3> %endif 159 <3> db 13,10 160 <3> %endif 161 <3> %if _PM && _CATCHPMINT41 162 <3> db "Intercepted DPMI interrupts:" 163 <3> %define %$pref " " 164 <3> dispint _CATCHPMINT41, "41.004F" 165 <3> %ifidn %$pref," " 166 <3> db " none" 167 <3> %endif 168 <3> db 13,10 169 <3> %endif 170 <3> %if _PM && _CATCHPMINT214C 171 <3> db "Processed DPMI interrupts:" 172 <3> %define %$pref " " 173 <3> dispint _CATCHPMINT214C, "21.4C" 174 <3> %ifidn %$pref," " 175 <3> db " none" 176 <3> %endif 177 <3> db 13,10 178 <3> %endif 179 <3> %unmacro dispint 2.nolist 180 <3> %pop 181 <3> %if _EXTHELP 182 0000196F 457874656E64656420- <3> db "Extended built-in help pages",13,10 182 00001978 6275696C742D696E20- <3> 182 00001981 68656C702070616765- <3> 182 0000198A 730D0A <3> 183 <3> %endif 184 <3> %if _ONLYNON386 185 <3> db "Only supports non-386 operation",13,10 186 <3> %endif 187 <3> %if _ONLY386 188 <3> db "Only supports 386+ operation",13,10 189 <3> %endif 57 <2> %ifn %2 58 0000198D 00 <2> asciz 59 <2> %endif 214 <1> %endif 215 <1> %if ! _EXTHELP || _HELP_COMPRESSED 216 <1> %if _BOOTLDR 217 <1> asciz 218 <1> ; This message is used by mak.sh to detect that we 219 <1> ; are building with boot load support. 220 <1> db 13,10,"Boot loader",13,10 221 <1> asciz 222 <1> %endif 223 <1> %endif 224 <1> 225 <1> %if _EXTHELP 226 <1> usemessagesegment 227 <1> .license: helppage license 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 0000198E 6C4465627567202D20- <3> db "lDebug - libre 86-DOS debugger",13,10 20 00001997 6C696272652038362D- <3> 20 000019A0 444F53206465627567- <3> 20 000019A9 6765720D0A <3> 21 000019AE 0D0A <3> db 13,10 22 000019B0 436F70797269676874- <3> db "Copyright (C) 1995-2003 Paul Vojta",13,10 22 000019B9 202843292031393935- <3> 22 000019C2 2D3230303320506175- <3> 22 000019CB 6C20566F6A74610D0A <3> 23 000019D4 436F70797269676874- <3> db "Copyright (C) 2008-2021 C. Masloch",13,10 23 000019DD 202843292032303038- <3> 23 000019E6 2D3230323120432E20- <3> 23 000019EF 4D61736C6F63680D0A <3> 24 000019F8 0D0A <3> db 13,10 25 000019FA 5573616765206F6620- <3> db "Usage of the works is permitted provided that this",13,10 25 00001A03 74686520776F726B73- <3> 25 00001A0C 206973207065726D69- <3> 25 00001A15 747465642070726F76- <3> 25 00001A1E 696465642074686174- <3> 25 00001A27 20746869730D0A <3> 26 00001A2E 696E737472756D656E- <3> db "instrument is retained with the works, so that any entity",13,10 26 00001A37 742069732072657461- <3> 26 00001A40 696E65642077697468- <3> 26 00001A49 2074686520776F726B- <3> 26 00001A52 732C20736F20746861- <3> 26 00001A5B 7420616E7920656E74- <3> 26 00001A64 6974790D0A <3> 27 00001A69 746861742075736573- <3> db "that uses the works is notified of this instrument.",13,10 27 00001A72 2074686520776F726B- <3> 27 00001A7B 73206973206E6F7469- <3> 27 00001A84 66696564206F662074- <3> 27 00001A8D 68697320696E737472- <3> 27 00001A96 756D656E742E0D0A <3> 28 00001A9E 0D0A <3> db 13,10 29 00001AA0 444953434C41494D45- <3> db "DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.",13,10 29 00001AA9 523A2054484520574F- <3> 29 00001AB2 524B53204152452057- <3> 29 00001ABB 4954484F5554205741- <3> 29 00001AC4 5252414E54592E0D0A <3> 30 00001ACD 0D0A <3> db 13,10 31 00001ACF 0D0A <3> db 13,10 32 00001AD1 416C6C20636F6E7472- <3> db "All contributions by Paul Vojta or C. Masloch to the debugger are available",13,10 32 00001ADA 69627574696F6E7320- <3> 32 00001AE3 6279205061756C2056- <3> 32 00001AEC 6F6A7461206F722043- <3> 32 00001AF5 2E204D61736C6F6368- <3> 32 00001AFE 20746F207468652064- <3> 32 00001B07 656275676765722061- <3> 32 00001B10 726520617661696C61- <3> 32 00001B19 626C650D0A <3> 33 00001B1E 756E64657220612063- <3> db "under a choice of three different licenses. These are the Fair License, the",13,10 33 00001B27 686F696365206F6620- <3> 33 00001B30 746872656520646966- <3> 33 00001B39 666572656E74206C69- <3> 33 00001B42 63656E7365732E2054- <3> 33 00001B4B 686573652061726520- <3> 33 00001B54 746865204661697220- <3> 33 00001B5D 4C6963656E73652C20- <3> 33 00001B66 7468650D0A <3> 34 00001B6B 53696D706C69666965- <3> db "Simplified 2-Clause BSD License, or the MIT License.",13,10 34 00001B74 6420322D436C617573- <3> 34 00001B7D 6520425344204C6963- <3> 34 00001B86 656E73652C206F7220- <3> 34 00001B8F 746865204D4954204C- <3> 34 00001B98 6963656E73652E0D0A <3> 35 00001BA1 0D0A <3> db 13,10 36 00001BA3 546869732069732074- <3> db "This is the license and copyright information that applies to lDebug; but note",13,10 36 00001BAC 6865206C6963656E73- <3> 36 00001BB5 6520616E6420636F70- <3> 36 00001BBE 79726967687420696E- <3> 36 00001BC7 666F726D6174696F6E- <3> 36 00001BD0 207468617420617070- <3> 36 00001BD9 6C69657320746F206C- <3> 36 00001BE2 44656275673B206275- <3> 36 00001BEB 74206E6F74650D0A <3> 37 00001BF3 746861742074686572- <3> db "that there have been substantial contributions to the code base that are not",13,10 37 00001BFC 652068617665206265- <3> 37 00001C05 656E20737562737461- <3> 37 00001C0E 6E7469616C20636F6E- <3> 37 00001C17 747269627574696F6E- <3> 37 00001C20 7320746F2074686520- <3> 37 00001C29 636F64652062617365- <3> 37 00001C32 207468617420617265- <3> 37 00001C3B 206E6F740D0A <3> 38 00001C41 636F70797269676874- <3> db "copyrighted (public domain).",13,10 38 00001C4A 656420287075626C69- <3> 38 00001C53 6320646F6D61696E29- <3> 38 00001C5C 2E0D0A <3> 57 <2> %ifn %2 58 00001C5F 00 <2> asciz 59 <2> %endif 228 <1> 229 <1> usemessagesegment 230 <1> .reghelp: helppage regs 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 00001C60 417661696C61626C65- <3> db "Available 16-bit registers:",9,9,"Available 32-bit registers: (386+)",13,10 20 00001C69 2031362D6269742072- <3> 20 00001C72 65676973746572733A- <3> 20 00001C7B 0909417661696C6162- <3> 20 00001C84 6C652033322D626974- <3> 20 00001C8D 207265676973746572- <3> 20 00001C96 733A20283338362B29- <3> 20 00001C9F 0D0A <3> 21 00001CA1 415809416363756D75- <3> db "AX",9,"Accumulator",9,9,9,"EAX",13,10 21 00001CAA 6C61746F7209090945- <3> 21 00001CB3 41580D0A <3> 22 00001CB7 425809426173652072- <3> db "BX",9,"Base register",9,9,9,"EBX",13,10 22 00001CC0 656769737465720909- <3> 22 00001CC9 094542580D0A <3> 23 00001CCF 435809436F756E7465- <3> db "CX",9,"Counter",9,9,9,9,"ECX",13,10 23 00001CD8 72090909094543580D- <3> 23 00001CE1 0A <3> 24 00001CE2 445809446174612072- <3> db "DX",9,"Data register",9,9,9,"EDX",13,10 24 00001CEB 656769737465720909- <3> 24 00001CF4 094544580D0A <3> 25 00001CFA 535009537461636B20- <3> db "SP",9,"Stack pointer",9,9,9,"ESP",13,10 25 00001D03 706F696E7465720909- <3> 25 00001D0C 094553500D0A <3> 26 00001D12 425009426173652070- <3> db "BP",9,"Base pointer",9,9,9,"EBP",13,10 26 00001D1B 6F696E746572090909- <3> 26 00001D24 4542500D0A <3> 27 00001D29 534909536F75726365- <3> db "SI",9,"Source index",9,9,9,"ESI",13,10 27 00001D32 20696E646578090909- <3> 27 00001D3B 4553490D0A <3> 28 00001D40 44490944657374696E- <3> db "DI",9,"Destination index",9,9,"EDI",13,10 28 00001D49 6174696F6E20696E64- <3> 28 00001D52 657809094544490D0A <3> 29 00001D5B 445309446174612073- <3> db "DS",9,"Data segment",13,10 29 00001D64 65676D656E740D0A <3> 30 00001D6C 455309457874726120- <3> db "ES",9,"Extra segment",13,10 30 00001D75 7365676D656E740D0A <3> 31 00001D7E 535309537461636B20- <3> db "SS",9,"Stack segment",13,10 31 00001D87 7365676D656E740D0A <3> 32 00001D90 435309436F64652073- <3> db "CS",9,"Code segment",13,10 32 00001D99 65676D656E740D0A <3> 33 00001DA1 465309457874726120- <3> db "FS",9,"Extra segment 2 (386+)",13,10 33 00001DAA 7365676D656E742032- <3> 33 00001DB3 20283338362B290D0A <3> 34 00001DBC 475309457874726120- <3> db "GS",9,"Extra segment 3 (386+)",13,10 34 00001DC5 7365676D656E742033- <3> 34 00001DCE 20283338362B290D0A <3> 35 00001DD7 495009496E73747275- <3> db "IP",9,"Instruction pointer",9,9,"EIP",13,10 35 00001DE0 6374696F6E20706F69- <3> 35 00001DE9 6E7465720909454950- <3> 35 00001DF2 0D0A <3> 36 00001DF4 464C09466C61677309- <3> db "FL",9,"Flags",9,9,9,9,"EFL",13,10 36 00001DFD 09090945464C0D0A <3> 37 00001E05 0D0A <3> db 13,10 38 <3> %if _MMXSUPP && 0 39 <3> db "Available 64-bit Matrix Math Extension (MMX) registers: (if supported)",13,10 40 <3> db "MMx",9,"MM(x)",9,"MMX register x, where x is 0 to 7",13,10 41 <3> db 13,10 42 <3> %endif 43 00001E07 456E746572203F4620- <3> db "Enter ?F to display the recognized flags.",13,10 43 00001E10 746F20646973706C61- <3> 43 00001E19 792074686520726563- <3> 43 00001E22 6F676E697A65642066- <3> 43 00001E2B 6C6167732E0D0A <3> 57 <2> %ifn %2 58 00001E32 00 <2> asciz 59 <2> %endif 231 <1> 232 <1> usemessagesegment 233 <1> .flaghelp: helppage flags 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 00001E33 5265636F676E697A65- <3> db "Recognized flags:",13,10 20 00001E3C 6420666C6167733A0D- <3> 20 00001E45 0A <3> 21 00001E46 56616C7565094E616D- <3> db "Value",9,"Name",9,9,9, " Set",9,9,9, " Clear",13,10 21 00001E4F 650909092020536574- <3> 21 00001E58 0909092020436C6561- <3> 21 00001E61 720D0A <3> 22 00001E64 3038303020204F4620- <3> db "0800 OF Overflow Flag",9,9,"OV Overflow",9,9, "NV No overflow",13,10 22 00001E6D 204F766572666C6F77- <3> 22 00001E76 20466C616709094F56- <3> 22 00001E7F 20204F766572666C6F- <3> 22 00001E88 7709094E5620204E6F- <3> 22 00001E91 206F766572666C6F77- <3> 22 00001E9A 0D0A <3> 23 00001E9C 303430302020444620- <3> db "0400 DF Direction Flag",9,"DN Down",9,9, "UP Up",13,10 23 00001EA5 20446972656374696F- <3> 23 00001EAE 6E20466C616709444E- <3> 23 00001EB7 2020446F776E090955- <3> 23 00001EC0 50202055700D0A <3> 24 00001EC7 303230302020494620- <3> db "0200 IF Interrupt Flag",9,"EI Enable interrupts",9,"DI Disable interrupts",13,10 24 00001ED0 20496E746572727570- <3> 24 00001ED9 7420466C6167094549- <3> 24 00001EE2 2020456E61626C6520- <3> 24 00001EEB 696E74657272757074- <3> 24 00001EF4 730944492020446973- <3> 24 00001EFD 61626C6520696E7465- <3> 24 00001F06 7272757074730D0A <3> 25 00001F0E 303038302020534620- <3> db "0080 SF Sign Flag",9,9, "NG Negative",9,9, "PL Plus",13,10 25 00001F17 205369676E20466C61- <3> 25 00001F20 6709094E4720204E65- <3> 25 00001F29 676174697665090950- <3> 25 00001F32 4C2020506C75730D0A <3> 26 00001F3B 3030343020205A4620- <3> db "0040 ZF Zero Flag",9,9, "ZR Zero",9,9, "NZ Not zero",13,10 26 00001F44 205A65726F20466C61- <3> 26 00001F4D 6709095A5220205A65- <3> 26 00001F56 726F09094E5A20204E- <3> 26 00001F5F 6F74207A65726F0D0A <3> 27 00001F68 303031302020414620- <3> db "0010 AF Auxiliary Flag",9,"AC Auxiliary carry",9,"NA No auxiliary carry",13,10 27 00001F71 20417578696C696172- <3> 27 00001F7A 7920466C6167094143- <3> 27 00001F83 2020417578696C6961- <3> 27 00001F8C 727920636172727909- <3> 27 00001F95 4E4120204E6F206175- <3> 27 00001F9E 78696C696172792063- <3> 27 00001FA7 617272790D0A <3> 28 00001FAD 303030342020504620- <3> db "0004 PF Parity Flag",9,9, "PE Parity even",9,9, "PO Parity odd",13,10 28 00001FB6 205061726974792046- <3> 28 00001FBF 6C6167090950452020- <3> 28 00001FC8 506172697479206576- <3> 28 00001FD1 656E0909504F202050- <3> 28 00001FDA 6172697479206F6464- <3> 28 00001FE3 0D0A <3> 29 00001FE5 303030312020434620- <3> db "0001 CF Carry Flag",9,9, "CY Carry",9,9, "NC No carry",13,10 29 00001FEE 20436172727920466C- <3> 29 00001FF7 616709094359202043- <3> 29 00002000 6172727909094E4320- <3> 29 00002009 204E6F206361727279- <3> 29 00002012 0D0A <3> 30 00002014 0D0A <3> db 13,10 31 00002016 5468652073686F7274- <3> db "The short names of the flag states are displayed when dumping registers",13,10 31 0000201F 206E616D6573206F66- <3> 31 00002028 2074686520666C6167- <3> 31 00002031 207374617465732061- <3> 31 0000203A 726520646973706C61- <3> 31 00002043 796564207768656E20- <3> 31 0000204C 64756D70696E672072- <3> 31 00002055 65676973746572730D- <3> 31 0000205E 0A <3> 32 0000205F 616E642063616E2062- <3> db "and can be entered to modify the symbolic F register with R. The short",13,10 32 00002068 6520656E7465726564- <3> 32 00002071 20746F206D6F646966- <3> 32 0000207A 79207468652073796D- <3> 32 00002083 626F6C696320462072- <3> 32 0000208C 656769737465722077- <3> 32 00002095 69746820522E205468- <3> 32 0000209E 652073686F72740D0A <3> 33 000020A7 6E616D6573206F6620- <3> db "names of the flags can be modified by R.",13,10 33 000020B0 74686520666C616773- <3> 33 000020B9 2063616E206265206D- <3> 33 000020C2 6F6469666965642062- <3> 33 000020CB 7920522E0D0A <3> 57 <2> %ifn %2 58 000020D1 00 <2> asciz 59 <2> %endif 234 <1> 235 <1> %if _COND 236 <1> usemessagesegment 237 <1> .condhelp: helppage cond 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 000020D2 496E20746865207265- <3> db "In the register dump displayed by the R, T, P and G commands, conditional",13,10 20 000020DB 676973746572206475- <3> 20 000020E4 6D7020646973706C61- <3> 20 000020ED 796564206279207468- <3> 20 000020F6 6520522C20542C2050- <3> 20 000020FF 20616E64204720636F- <3> 20 00002108 6D6D616E64732C2063- <3> 20 00002111 6F6E646974696F6E61- <3> 20 0000211A 6C0D0A <3> 21 0000211D 6A756D707320617265- <3> db "jumps are displayed with a notice that shows whether the instruction will",13,10 21 00002126 20646973706C617965- <3> 21 0000212F 642077697468206120- <3> 21 00002138 6E6F74696365207468- <3> 21 00002141 61742073686F777320- <3> 21 0000214A 776865746865722074- <3> 21 00002153 686520696E73747275- <3> 21 0000215C 6374696F6E2077696C- <3> 21 00002165 6C0D0A <3> 22 00002168 63617573652061206A- <3> db "cause a jump depending on its condition and the current register and flag",13,10 22 00002171 756D7020646570656E- <3> 22 0000217A 64696E67206F6E2069- <3> 22 00002183 747320636F6E646974- <3> 22 0000218C 696F6E20616E642074- <3> 22 00002195 68652063757272656E- <3> 22 0000219E 742072656769737465- <3> 22 000021A7 7220616E6420666C61- <3> 22 000021B0 670D0A <3> 23 000021B3 636F6E74656E74732E- <3> db 'contents. This notice shows either "jumping" or "not jumping" as appropriate.',13,10 23 000021BC 2054686973206E6F74- <3> 23 000021C5 6963652073686F7773- <3> 23 000021CE 206569746865722022- <3> 23 000021D7 6A756D70696E672220- <3> 23 000021E0 6F7220226E6F74206A- <3> 23 000021E9 756D70696E67222061- <3> 23 000021F2 7320617070726F7072- <3> 23 000021FB 696174652E0D0A <3> 24 00002202 0D0A <3> db 13,10 25 00002204 54686520636F6E6469- <3> db "The conditional jumps use these conditions: (second column negates)",13,10 25 0000220D 74696F6E616C206A75- <3> 25 00002216 6D7073207573652074- <3> 25 0000221F 6865736520636F6E64- <3> 25 00002228 6974696F6E733A2028- <3> 25 00002231 7365636F6E6420636F- <3> 25 0000223A 6C756D6E206E656761- <3> 25 00002243 746573290D0A <3> 26 00002249 206A6F09096A6E6F09- <3> db " jo",9,9,"jno",9,9,"OF",13,10 26 00002252 094F460D0A <3> 27 00002257 206A63206A62206A6E- <3> db " jc jb jnae",9,"jnc jnb jae",9,"CF",13,10 27 00002260 6165096A6E63206A6E- <3> 27 00002269 62206A61650943460D- <3> 27 00002272 0A <3> 28 00002273 206A7A206A6509096A- <3> db " jz je",9,9,"jnz jne",9,9,"ZF",13,10 28 0000227C 6E7A206A6E6509095A- <3> 28 00002285 460D0A <3> 29 00002288 206A6265206A6E6109- <3> db " jbe jna",9,"jnbe ja",9,9,"ZF||CF",13,10 29 00002291 6A6E6265206A610909- <3> 29 0000229A 5A467C7C43460D0A <3> 30 000022A2 206A7309096A6E7309- <3> db " js",9,9,"jns",9,9,"SF",13,10 30 000022AB 0953460D0A <3> 31 000022B0 206A70206A70650909- <3> db " jp jpe",9,9,"jnp jpo",9,9,"PF",13,10 31 000022B9 6A6E70206A706F0909- <3> 31 000022C2 50460D0A <3> 32 000022C6 206A6C206A6E676509- <3> db " jl jnge",9,"jnl jge",9,9,"OF^^SF",13,10 32 000022CF 6A6E6C206A67650909- <3> 32 000022D8 4F465E5E53460D0A <3> 33 000022E0 206A6C65206A6E6709- <3> db " jle jng",9,"jnle jg",9,9,"OF^^SF || ZF",13,10 33 000022E9 6A6E6C65206A670909- <3> 33 000022F2 4F465E5E5346207C7C- <3> 33 000022FB 205A460D0A <3> 34 00002300 206A28652963787A09- <3> db " j(e)cxz",9,9,9,"(e)cx==0",13,10 34 00002309 090928652963783D3D- <3> 34 00002312 300D0A <3> 35 00002315 206C6F6F7009090909- <3> db " loop",9,9,9,9,"(e)cx!=1",13,10 35 0000231E 2865296378213D310D- <3> 35 00002327 0A <3> 36 00002328 206C6F6F707A206C6F- <3> db " loopz loope",9,9,9,"(e)cx!=1 && ZF",13,10 36 00002331 6F7065090909286529- <3> 36 0000233A 6378213D3120262620- <3> 36 00002343 5A460D0A <3> 37 00002347 206C6F6F706E7A206C- <3> db " loopnz loopne",9,9,9,"(e)cx!=1 && !ZF",13,10 37 00002350 6F6F706E6509090928- <3> 37 00002359 65296378213D312026- <3> 37 00002362 2620215A460D0A <3> 38 00002369 0D0A <3> db 13,10 39 0000236B 456E746572203F4620- <3> db "Enter ?F to display a description of the flag names.",13,10 39 00002374 746F20646973706C61- <3> 39 0000237D 792061206465736372- <3> 39 00002386 697074696F6E206F66- <3> 39 0000238F 2074686520666C6167- <3> 39 00002398 206E616D65732E0D0A <3> 57 <2> %ifn %2 58 000023A1 00 <2> asciz 59 <2> %endif 238 <1> %endif 239 <1> 240 <1> %if _EXPRESSIONS 241 <1> usemessagesegment 242 <1> .expressionhelp: helppage expr 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 000023A2 5265636F676E697A65- <3> db "Recognized operators in expressions:",13,10 20 000023AB 64206F70657261746F- <3> 20 000023B4 727320696E20657870- <3> 20 000023BD 72657373696F6E733A- <3> 20 000023C6 0D0A <3> 21 000023C8 7C0962697477697365- <3> db "|",9, "bitwise OR",9,9, "||",9, "boolean OR",13,10 21 000023D1 204F5209097C7C0962- <3> 21 000023DA 6F6F6C65616E204F52- <3> 21 000023E3 0D0A <3> 22 000023E5 5E0962697477697365- <3> db "^",9, "bitwise XOR",9,9, "^^",9, "boolean XOR",13,10 22 000023EE 20584F5209095E5E09- <3> 22 000023F7 626F6F6C65616E2058- <3> 22 00002400 4F520D0A <3> 23 00002404 260962697477697365- <3> db "&",9, "bitwise AND",9,9, "&&",9, "boolean AND",13,10 23 0000240D 20414E440909262609- <3> 23 00002416 626F6F6C65616E2041- <3> 23 0000241F 4E440D0A <3> 24 00002423 3E3E096269742D7368- <3> db ">>",9, "bit-shift right",9,9, ">",9,"test if above",13,10 24 0000242C 696674207269676874- <3> 24 00002435 09093E097465737420- <3> 24 0000243E 69662061626F76650D- <3> 24 00002447 0A <3> 25 00002448 3E3E3E097369676E65- <3> db ">>>",9, "signed bit-shift right",9, "<",9,"test if below",13,10 25 00002451 64206269742D736869- <3> 25 0000245A 667420726967687409- <3> 25 00002463 3C0974657374206966- <3> 25 0000246C 2062656C6F770D0A <3> 26 00002474 3C3C096269742D7368- <3> db "<<",9, "bit-shift left",9,9, ">=",9,"test if above-or-equal",13,10 26 0000247D 696674206C65667409- <3> 26 00002486 093E3D097465737420- <3> 26 0000248F 69662061626F76652D- <3> 26 00002498 6F722D657175616C0D- <3> 26 000024A1 0A <3> 27 000024A2 3E3C096269742D6D69- <3> db "><",9, "bit-mirror",9,9, "<=",9,"test if below-or-equal",13,10 27 000024AB 72726F7209093C3D09- <3> 27 000024B4 746573742069662062- <3> 27 000024BD 656C6F772D6F722D65- <3> 27 000024C6 7175616C0D0A <3> 28 000024CC 2B096164646974696F- <3> db "+",9, "addition",9,9, "==",9,"test if equal",13,10 28 000024D5 6E09093D3D09746573- <3> 28 000024DE 742069662065717561- <3> 28 000024E7 6C0D0A <3> 29 000024EA 2D0973756274726163- <3> db "-",9, "subtraction",9,9, "!=",9,"test if not equal",13,10 29 000024F3 74696F6E0909213D09- <3> 29 000024FC 74657374206966206E- <3> 29 00002505 6F7420657175616C0D- <3> 29 0000250E 0A <3> 30 0000250F 2A096D756C7469706C- <3> db "*",9, "multiplication",9,9, "=>",9,"same as >=",13,10 30 00002518 69636174696F6E0909- <3> 30 00002521 3D3E0973616D652061- <3> 30 0000252A 73203E3D0D0A <3> 31 00002530 2F096469766973696F- <3> db "/",9, "division",9,9, "=<",9,"same as <=",13,10 31 00002539 6E09093D3C0973616D- <3> 31 00002542 65206173203C3D0D0A <3> 32 0000254B 25096D6F64756C6F20- <3> db "%",9, "modulo (A-(A/B*B))",9, "<>",9,"same as !=",13,10 32 00002554 28412D28412F422A42- <3> 32 0000255D 2929093C3E0973616D- <3> 32 00002566 6520617320213D0D0A <3> 33 0000256F 2A2A09706F7765720D- <3> db "**",9, "power",13,10 33 00002578 0A <3> 34 00002579 0D0A <3> db 13,10 35 0000257B 496D706C6963697420- <3> db "Implicit operater precedence is handled in the listed order, with increasing",13,10 35 00002584 6F7065726174657220- <3> 35 0000258D 707265636564656E63- <3> 35 00002596 652069732068616E64- <3> 35 0000259F 6C656420696E207468- <3> 35 000025A8 65206C697374656420- <3> 35 000025B1 6F726465722C207769- <3> 35 000025BA 746820696E63726561- <3> 35 000025C3 73696E670D0A <3> 36 000025C9 707265636564656E63- <3> db "precedence: (Brackets specify explicit precedence of an expression.)",13,10 36 000025D2 653A2028427261636B- <3> 36 000025DB 657473207370656369- <3> 36 000025E4 6679206578706C6963- <3> 36 000025ED 697420707265636564- <3> 36 000025F6 656E6365206F662061- <3> 36 000025FF 6E2065787072657373- <3> 36 00002608 696F6E2E290D0A <3> 37 0000260F 20626F6F6C65616E20- <3> db " boolean operators OR, XOR, AND (each has a different precedence)",13,10 37 00002618 6F70657261746F7273- <3> 37 00002621 204F522C20584F522C- <3> 37 0000262A 20414E442028656163- <3> 37 00002633 682068617320612064- <3> 37 0000263C 6966666572656E7420- <3> 37 00002645 707265636564656E63- <3> 37 0000264E 65290D0A <3> 38 00002652 20636F6D7061726973- <3> db " comparison operators",13,10 38 0000265B 6F6E206F7065726174- <3> 38 00002664 6F72730D0A <3> 39 00002669 206269747769736520- <3> db " bitwise operators OR, XOR, AND (each has a different precedence)",13,10 39 00002672 6F70657261746F7273- <3> 39 0000267B 204F522C20584F522C- <3> 39 00002684 20414E442028656163- <3> 39 0000268D 682068617320612064- <3> 39 00002696 6966666572656E7420- <3> 39 0000269F 707265636564656E63- <3> 39 000026A8 65290D0A <3> 40 000026AC 20736869667420616E- <3> db " shift and bit-mirror operators",13,10 40 000026B5 64206269742D6D6972- <3> 40 000026BE 726F72206F70657261- <3> 40 000026C7 746F72730D0A <3> 41 000026CD 206164646974696F6E- <3> db " addition and subtraction operators",13,10 41 000026D6 20616E642073756274- <3> 41 000026DF 72616374696F6E206F- <3> 41 000026E8 70657261746F72730D- <3> 41 000026F1 0A <3> 42 000026F2 206D756C7469706C69- <3> db " multiplication, division and modulo operators",13,10 42 000026FB 636174696F6E2C2064- <3> 42 00002704 69766973696F6E2061- <3> 42 0000270D 6E64206D6F64756C6F- <3> 42 00002716 206F70657261746F72- <3> 42 0000271F 730D0A <3> 43 00002722 20706F776572206F70- <3> db " power operator",13,10 43 0000272B 657261746F720D0A <3> 44 00002733 0D0A <3> db 13,10 45 00002735 5265636F676E697A65- <3> db "Recognized unary operators: (modifying the next number)",13,10 45 0000273E 6420756E617279206F- <3> 45 00002747 70657261746F72733A- <3> 45 00002750 20286D6F6469667969- <3> 45 00002759 6E6720746865206E65- <3> 45 00002762 7874206E756D626572- <3> 45 0000276B 290D0A <3> 46 0000276E 2B09706F7369746976- <3> db "+",9, "positive (does nothing)",13,10 46 00002777 652028646F6573206E- <3> 46 00002780 6F7468696E67290D0A <3> 47 00002789 2D096E656761746976- <3> db "-",9, "negative",13,10 47 00002792 650D0A <3> 48 00002795 7E0962697477697365- <3> db "~",9, "bitwise NOT",13,10 48 0000279E 204E4F540D0A <3> 49 000027A4 2109626F6F6C65616E- <3> db "!",9, "boolean NOT",13,10 49 000027AD 204E4F540D0A <3> 50 000027B3 3F096162736F6C7574- <3> db "?",9, "absolute value",13,10 50 000027BC 652076616C75650D0A <3> 51 000027C5 212109636F6E766572- <3> db "!!",9, "convert to boolean",13,10 51 000027CE 7420746F20626F6F6C- <3> 51 000027D7 65616E0D0A <3> 52 000027DC 0D0A <3> db 13,10 53 000027DE 4E6F74652074686174- <3> db "Note that the power operator does not affect unary operator handling.",13,10 53 000027E7 2074686520706F7765- <3> 53 000027F0 72206F70657261746F- <3> 53 000027F9 7220646F6573206E6F- <3> 53 00002802 742061666665637420- <3> 53 0000280B 756E617279206F7065- <3> 53 00002814 7261746F722068616E- <3> 53 0000281D 646C696E672E0D0A <3> 54 00002825 466F7220696E737461- <3> db 'For instance, "- 2 ** 2" is parsed as "(-2) ** 2" and evaluates to 4.',13,10 54 0000282E 6E63652C20222D2032- <3> 54 00002837 202A2A203222206973- <3> 54 00002840 207061727365642061- <3> 54 00002849 732022282D3229202A- <3> 54 00002852 2A20322220616E6420- <3> 54 0000285B 6576616C7561746573- <3> 54 00002864 20746F20342E0D0A <3> 55 0000286C 0D0A <3> db 13,10 56 0000286E 416C74686F75676820- <3> db "Although a negative unary and signed bit-shift right operator are provided",13,10 56 00002877 61206E656761746976- <3> 56 00002880 6520756E6172792061- <3> 56 00002889 6E64207369676E6564- <3> 56 00002892 206269742D73686966- <3> 56 0000289B 74207269676874206F- <3> 56 000028A4 70657261746F722061- <3> 56 000028AD 72652070726F766964- <3> 56 000028B6 65640D0A <3> 57 000028BA 746865206578707265- <3> db "the expression evaluator is intrinsically unsigned. Particularly the division,",13,10 57 000028C3 7373696F6E20657661- <3> 57 000028CC 6C7561746F72206973- <3> 57 000028D5 20696E7472696E7369- <3> 57 000028DE 63616C6C7920756E73- <3> 57 000028E7 69676E65642E205061- <3> 57 000028F0 72746963756C61726C- <3> 57 000028F9 792074686520646976- <3> 57 00002902 6973696F6E2C0D0A <3> 58 0000290A 6D756C7469706C6963- <3> db "multiplication, modulo and all comparison operators operate unsigned. Due to",13,10 58 00002913 6174696F6E2C206D6F- <3> 58 0000291C 64756C6F20616E6420- <3> 58 00002925 616C6C20636F6D7061- <3> 58 0000292E 7269736F6E206F7065- <3> 58 00002937 7261746F7273206F70- <3> 58 00002940 657261746520756E73- <3> 58 00002949 69676E65642E204475- <3> 58 00002952 6520746F0D0A <3> 59 00002958 746869732C20746865- <3> db 'this, the expression "-1 < 0" evaluates to zero.',13,10 59 00002961 206578707265737369- <3> 59 0000296A 6F6E20222D31203C20- <3> 59 00002973 3022206576616C7561- <3> 59 0000297C 74657320746F207A65- <3> 59 00002985 726F2E0D0A <3> 60 0000298A 0D0A <3> db 13,10 61 0000298C 5265636F676E697A65- <3> db "Recognized terms in an expression:",13,10 61 00002995 64207465726D732069- <3> 61 0000299E 6E20616E2065787072- <3> 61 000029A7 657373696F6E3A0D0A <3> 62 000029B0 2033322D6269742069- <3> db " 32-bit immediates",13,10 62 000029B9 6D6D65646961746573- <3> 62 000029C2 0D0A <3> 63 000029C4 20382D626974207265- <3> db " 8-bit registers",13,10 63 000029CD 676973746572730D0A <3> 64 000029D6 2031362D6269742072- <3> db " 16-bit registers including segment registers (except FS, GS)",13,10 64 000029DF 656769737465727320- <3> 64 000029E8 696E636C7564696E67- <3> 64 000029F1 207365676D656E7420- <3> 64 000029FA 726567697374657273- <3> 64 00002A03 202865786365707420- <3> 64 00002A0C 46532C204753290D0A <3> 65 00002A15 2033322D6269742063- <3> db " 32-bit compound registers made of two 16-bit registers (eg DXAX)",13,10 65 00002A1E 6F6D706F756E642072- <3> 65 00002A27 656769737465727320- <3> 65 00002A30 6D616465206F662074- <3> 65 00002A39 776F2031362D626974- <3> 65 00002A42 207265676973746572- <3> 65 00002A4B 732028656720445841- <3> 65 00002A54 58290D0A <3> 66 00002A58 2033322D6269742072- <3> db " 32-bit registers and FS, GS only if running on a 386+",13,10 66 00002A61 656769737465727320- <3> 66 00002A6A 616E642046532C2047- <3> 66 00002A73 53206F6E6C79206966- <3> 66 00002A7C 2072756E6E696E6720- <3> 66 00002A85 6F6E2061203338362B- <3> 66 00002A8E 0D0A <3> 67 <3> %if _MMXSUPP 68 00002A90 2036342D626974204D- <3> db " 64-bit MMX registers only if running on a CPU with MMX",13,10 68 00002A99 4D5820726567697374- <3> 68 00002AA2 657273206F6E6C7920- <3> 68 00002AAB 69662072756E6E696E- <3> 68 00002AB4 67206F6E2061204350- <3> 68 00002ABD 552077697468204D4D- <3> 68 00002AC6 580D0A <3> 69 00002AC9 20204D4D304C206163- <3> db " MM0L accesses the low 32 bits of the register",13,10 69 00002AD2 636573736573207468- <3> 69 00002ADB 65206C6F7720333220- <3> 69 00002AE4 62697473206F662074- <3> 69 00002AED 686520726567697374- <3> 69 00002AF6 65720D0A <3> 70 00002AFA 20204D4D3048206163- <3> db " MM0H accesses the high 32 bits of the register",13,10 70 00002B03 636573736573207468- <3> 70 00002B0C 652068696768203332- <3> 70 00002B15 2062697473206F6620- <3> 70 00002B1E 746865207265676973- <3> 70 00002B27 7465720D0A <3> 71 00002B2C 20204D4D305A207265- <3> db " MM0Z reads the low 32 bits; writes the full register (zero-extend)",13,10 71 00002B35 61647320746865206C- <3> 71 00002B3E 6F7720333220626974- <3> 71 00002B47 733B20777269746573- <3> 71 00002B50 207468652066756C6C- <3> 71 00002B59 207265676973746572- <3> 71 00002B62 20287A65726F2D6578- <3> 71 00002B6B 74656E64290D0A <3> 72 00002B72 20204D4D3053207265- <3> db " MM0S reads the low 32 bits; writes the full register (sign-extend)",13,10 72 00002B7B 61647320746865206C- <3> 72 00002B84 6F7720333220626974- <3> 72 00002B8D 733B20777269746573- <3> 72 00002B96 207468652066756C6C- <3> 72 00002B9F 207265676973746572- <3> 72 00002BA8 20287369676E2D6578- <3> 72 00002BB1 74656E64290D0A <3> 73 00002BB8 20204D4D3020697320- <3> db " MM0 is an alias for the MM0Z syntax",13,10 73 00002BC1 616E20616C69617320- <3> 73 00002BCA 666F7220746865204D- <3> 73 00002BD3 4D305A2073796E7461- <3> 73 00002BDC 780D0A <3> 74 <3> %endif 75 <3> %if _VARIABLES 76 00002BDF 2033322D6269742076- <3> db " 32-bit variables V00..VFF",13,10 76 00002BE8 61726961626C657320- <3> 76 00002BF1 5630302E2E5646460D- <3> 76 00002BFA 0A <3> 77 <3> %endif 78 <3> %if _OPTIONS || _PSPVARIABLES 79 00002BFB 2033322D6269742073- <3> db " 32-bit special variable" 79 00002C04 70656369616C207661- <3> 79 00002C0D 726961626C65 <3> 80 <3> %if _OPTIONS 81 00002C13 732044434F2C204443- <3> db "s DCO, DCS, DAO, DAS, DIF, DPI" 81 00002C1C 532C2044414F2C2044- <3> 81 00002C25 41532C204449462C20- <3> 81 00002C2E 445049 <3> 82 <3> %if _PSPVARIABLES 83 00002C31 2C <3> db "," 84 <3> %endif 85 <3> %endif 86 <3> %if _PSPVARIABLES 87 00002C32 20505049 <3> db " PPI" 88 <3> %endif 89 00002C36 0D0A <3> db 13,10 90 00002C38 2031362D6269742073- <3> db " 16-bit special variables" 90 00002C41 70656369616C207661- <3> 90 00002C4A 726961626C6573 <3> 91 <3> %if _OPTIONS 92 00002C51 204450522C20445050 <3> db " DPR, DPP" 93 <3> %if _PM 94 <3> db ", DPS" 95 <3> %endif 96 <3> %if _PSPVARIABLES 97 00002C5A 2C <3> db "," 98 <3> %endif 99 <3> %endif 100 <3> %if _PSPVARIABLES 101 00002C5B 205053502C20505052 <3> db " PSP, PPR" 102 <3> %endif 103 00002C64 0D0A <3> db 13,10 104 00002C66 20202866756C6C6572- <3> db " (fuller variable reference in the manual)",13,10 104 00002C6F 207661726961626C65- <3> 104 00002C78 207265666572656E63- <3> 104 00002C81 6520696E2074686520- <3> 104 00002C8A 6D616E75616C290D0A <3> 105 <3> %endif 106 <3> %if _INDIRECTION 107 00002C93 20627974652F776F72- <3> db " byte/word/3byte/dword memory content (eg byte [seg:ofs], where both the",13,10 107 00002C9C 642F33627974652F64- <3> 107 00002CA5 776F7264206D656D6F- <3> 107 00002CAE 727920636F6E74656E- <3> 107 00002CB7 742028656720627974- <3> 107 00002CC0 65205B7365673A6F66- <3> 107 00002CC9 735D2C207768657265- <3> 107 00002CD2 20626F746820746865- <3> 107 00002CDB 0D0A <3> 108 00002CDD 20206F7074696F6E61- <3> db " optional segment as well as the offset are expressions too)",13,10 108 00002CE6 6C207365676D656E74- <3> 108 00002CEF 2061732077656C6C20- <3> 108 00002CF8 617320746865206F66- <3> 108 00002D01 667365742061726520- <3> 108 00002D0A 65787072657373696F- <3> 108 00002D13 6E7320746F6F290D0A <3> 109 <3> %endif 110 00002D1C 546865206578707265- <3> db "The expression evaluator case-insensitively checks for names of variables",13,10 110 00002D25 7373696F6E20657661- <3> 110 00002D2E 6C7561746F72206361- <3> 110 00002D37 73652D696E73656E73- <3> 110 00002D40 69746976656C792063- <3> 110 00002D49 6865636B7320666F72- <3> 110 00002D52 206E616D6573206F66- <3> 110 00002D5B 207661726961626C65- <3> 110 00002D64 730D0A <3> 111 00002D67 616E64207265676973- <3> db "and registers" 111 00002D70 74657273 <3> 112 <3> %if _INDIRECTION 113 00002D74 2061732077656C6C20- <3> db " as well as size specifiers" 113 00002D7D 61732073697A652073- <3> 113 00002D86 706563696669657273 <3> 114 <3> %endif 115 00002D8F 2E0D0A <3> db '.',13,10 116 00002D92 0D0A <3> db 13,10 117 00002D94 456E746572203F5220- <3> db "Enter ?R to display the recognized register names.",13,10 117 00002D9D 746F20646973706C61- <3> 117 00002DA6 792074686520726563- <3> 117 00002DAF 6F676E697A65642072- <3> 117 00002DB8 65676973746572206E- <3> 117 00002DC1 616D65732E0D0A <3> 118 <3> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 119 00002DC8 456E746572203F5620- <3> db "Enter ?V to display the recognized variables.",13,10 119 00002DD1 746F20646973706C61- <3> 119 00002DDA 792074686520726563- <3> 119 00002DE3 6F676E697A65642076- <3> 119 00002DEC 61726961626C65732E- <3> 119 00002DF5 0D0A <3> 120 <3> %endif 57 <2> %ifn %2 58 00002DF7 00 <2> asciz 59 <2> %endif 243 <1> %endif 244 <1> 245 <1> %if _OPTIONS 246 <1> usemessagesegment 247 <1> .options_1: helppage options1 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %include "options.mac" 19 <3> %endif 20 <3> 21 00002DF8 417661696C61626C65- <3> db "Available options: (read/write DCO, read DCS)",13,10 21 00002E01 206F7074696F6E733A- <3> 21 00002E0A 2028726561642F7772- <3> 21 00002E13 6974652044434F2C20- <3> 21 00002E1C 726561642044435329- <3> 21 00002E25 0D0A <3> 22 00002E27 303030312052583A20- <3> db _4digitshex(dispregs32), " RX: 32-bit register display",13,10 22 00002E30 33322D626974207265- <3> 22 00002E39 676973746572206469- <3> 22 00002E42 73706C61790D0A <3> 23 00002E49 3030303220544D3A20- <3> db _4digitshex(traceints), " TM: trace into interrupts",13,10 23 00002E52 747261636520696E74- <3> 23 00002E5B 6F20696E7465727275- <3> 23 00002E64 7074730D0A <3> 24 00002E69 3030303420616C6C6F- <3> db _4digitshex(cpdepchars), " allow dumping of CP-dependent characters",13,10 24 00002E72 772064756D70696E67- <3> 24 00002E7B 206F662043502D6465- <3> 24 00002E84 70656E64656E742063- <3> 24 00002E8D 686172616374657273- <3> 24 00002E96 0D0A <3> 25 00002E98 3030303820616C7761- <3> db _4digitshex(fakeindos), " always assume InDOS flag non-zero, to debug DOS or TSRs",13,10 25 00002EA1 797320617373756D65- <3> 25 00002EAA 20496E444F5320666C- <3> 25 00002EB3 6167206E6F6E2D7A65- <3> 25 00002EBC 726F2C20746F206465- <3> 25 00002EC5 62756720444F53206F- <3> 25 00002ECE 7220545352730D0A <3> 26 00002ED6 303031302064697361- <3> db _4digitshex(nonpagingdevice)," disallow paged output to StdOut",13,10 26 00002EDF 6C6C6F772070616765- <3> 26 00002EE8 64206F757470757420- <3> 26 00002EF1 746F205374644F7574- <3> 26 00002EFA 0D0A <3> 27 00002EFC 3030323020616C6C6F- <3> db _4digitshex(pagingdevice), " allow paged output to non-StdOut",13,10 27 00002F05 77207061676564206F- <3> 27 00002F0E 757470757420746F20- <3> 27 00002F17 6E6F6E2D5374644F75- <3> 27 00002F20 740D0A <3> 28 00002F23 303034302064697370- <3> db _4digitshex(hexrn), " display raw hexadecimal content of FPU registers",13,10 28 00002F2C 6C6179207261772068- <3> 28 00002F35 657861646563696D61- <3> 28 00002F3E 6C20636F6E74656E74- <3> 28 00002F47 206F66204650552072- <3> 28 00002F50 65676973746572730D- <3> 28 00002F59 0A <3> 29 00002F5A 30313030207768656E- <3> db _4digitshex(nondospaging), " when prompting during paging, do not use DOS for input",13,10 29 00002F63 2070726F6D7074696E- <3> 29 00002F6C 6720647572696E6720- <3> 29 00002F75 706167696E672C2064- <3> 29 00002F7E 6F206E6F7420757365- <3> 29 00002F87 20444F5320666F7220- <3> 29 00002F90 696E7075740D0A <3> 30 00002F97 3032303020646F206E- <3> db _4digitshex(nohlt), " do not execute HLT instruction to idle",13,10 30 00002FA0 6F7420657865637574- <3> 30 00002FA9 6520484C5420696E73- <3> 30 00002FB2 7472756374696F6E20- <3> 30 00002FBB 746F2069646C650D0A <3> 31 00002FC4 3034303020646F206E- <3> db _4digitshex(biosidles), " do not idle, the keyboard BIOS idles itself",13,10 31 00002FCD 6F742069646C652C20- <3> 31 00002FD6 746865206B6579626F- <3> 31 00002FDF 6172642042494F5320- <3> 31 00002FE8 69646C657320697473- <3> 31 00002FF1 656C660D0A <3> 32 00002FF6 303830302075736520- <3> db _4digitshex(opt_usegetinput)," use getinput function for int 21h interactive input",13,10 32 00002FFF 676574696E70757420- <3> 32 00003008 66756E6374696F6E20- <3> 32 00003011 666F7220696E742032- <3> 32 0000301A 316820696E74657261- <3> 32 00003023 637469766520696E70- <3> 32 0000302C 75740D0A <3> 33 00003030 3130303020696E2064- <3> db _4digitshex(use_si_units), " in disp_*_size use SI units (kB = 1000, etc)." 33 00003039 6973705F2A5F73697A- <3> 33 00003042 652075736520534920- <3> 33 0000304B 756E69747320286B42- <3> 33 00003054 203D20313030302C20- <3> 33 0000305D 657463292E <3> 34 00003062 206F76657272696465- <3> db " overrides ",_4digitshex(use_jedec_units),"!",13,10 34 0000306B 732032303030210D0A <3> 35 00003074 3230303020696E2064- <3> db _4digitshex(use_jedec_units)," in disp_*_size use JEDEC units (KB = 1024)",13,10 35 0000307D 6973705F2A5F73697A- <3> 35 00003086 6520757365204A4544- <3> 35 0000308F 454320756E69747320- <3> 35 00003098 284B42203D20313032- <3> 35 000030A1 34290D0A <3> 36 000030A5 3430303020656E6162- <3> db _4digitshex(enable_serial), " enable serial I/O (port ",_4digitshex(_UART_BASE),"h interrupt ",_2digitshex(_INTNUM),"h)",13,10 36 000030AE 6C652073657269616C- <3> 36 000030B7 20492F4F2028706F72- <3> 36 000030C0 742030324638682069- <3> 36 000030C9 6E7465727275707420- <3> 36 000030D2 304268290D0A <3> 37 000030D8 383030302064697361- <3> db _4digitshex(int8_disable_serial), " disable serial I/O when breaking after Ctrl pressed for a while",13,10 37 000030E1 626C65207365726961- <3> 37 000030EA 6C20492F4F20776865- <3> 37 000030F3 6E20627265616B696E- <3> 37 000030FC 672061667465722043- <3> 37 00003105 74726C207072657373- <3> 37 0000310E 656420666F72206120- <3> 37 00003117 7768696C650D0A <3> 38 0000311E 303030315F30303030- <3> db _8digitssephex(gg_do_not_skip_bp), " gg: do not skip a breakpoint (bb or gg)",13,10 38 00003127 2067673A20646F206E- <3> 38 00003130 6F7420736B69702061- <3> 38 00003139 20627265616B706F69- <3> 38 00003142 6E7420286262206F72- <3> 38 0000314B 206767290D0A <3> 39 00003151 303030325F30303030- <3> db _8digitssephex(gg_no_autorepeat), " gg: do not auto-repeat",13,10 39 0000315A 2067673A20646F206E- <3> 39 00003163 6F74206175746F2D72- <3> 39 0000316C 65706561740D0A <3> 40 00003173 303030345F30303030- <3> db _8digitssephex(tp_do_not_skip_bp), " T/TP/P: do not skip a (bb) breakpoint",13,10 40 0000317C 20542F54502F503A20- <3> 40 00003185 646F206E6F7420736B- <3> 40 0000318E 697020612028626229- <3> 40 00003197 20627265616B706F69- <3> 40 000031A0 6E740D0A <3> 41 000031A4 303030385F30303030- <3> db _8digitssephex(gg_bb_hit_no_repeat), " gg: do not auto-repeat after bb hit",13,10 41 000031AD 2067673A20646F206E- <3> 41 000031B6 6F74206175746F2D72- <3> 41 000031BF 657065617420616674- <3> 41 000031C8 657220626220686974- <3> 41 000031D1 0D0A <3> 42 000031D3 303031305F30303030- <3> db _8digitssephex(tp_bb_hit_no_repeat), " T/TP/P: do not auto-repeat after bb hit",13,10 42 000031DC 20542F54502F503A20- <3> 42 000031E5 646F206E6F74206175- <3> 42 000031EE 746F2D726570656174- <3> 42 000031F7 206166746572206262- <3> 42 00003200 206869740D0A <3> 43 00003206 303032305F30303030- <3> db _8digitssephex(gg_unexpected_no_repeat)," gg: do not auto-repeat after unexpectedinterrupt",13,10 43 0000320F 2067673A20646F206E- <3> 43 00003218 6F74206175746F2D72- <3> 43 00003221 657065617420616674- <3> 43 0000322A 657220756E65787065- <3> 43 00003233 63746564696E746572- <3> 43 0000323C 727570740D0A <3> 44 00003242 303034305F30303030- <3> db _8digitssephex(tp_unexpected_no_repeat)," T/TP/P: do not auto-repeat after unexpectedinterrupt",13,10 44 0000324B 20542F54502F503A20- <3> 44 00003254 646F206E6F74206175- <3> 44 0000325D 746F2D726570656174- <3> 44 00003266 20616674657220756E- <3> 44 0000326F 657870656374656469- <3> 44 00003278 6E746572727570740D- <3> 44 00003281 0A <3> 45 00003282 303038305F30303030- <3> db _8digitssephex(ss_no_dump), " S: do not dump data after matches",13,10 45 0000328B 20533A20646F206E6F- <3> 45 00003294 742064756D70206461- <3> 45 0000329D 746120616674657220- <3> 45 000032A6 6D6174636865730D0A <3> 46 000032AF 313030305F30303030- <3> db _8digitssephex(rr_disasm_no_rept), " R: do not repeat disassembly",13,10 46 000032B8 20523A20646F206E6F- <3> 46 000032C1 742072657065617420- <3> 46 000032CA 646973617373656D62- <3> 46 000032D3 6C790D0A <3> 47 000032D7 323030305F30303030- <3> db _8digitssephex(rr_disasm_no_show), " R: do not show memory reference in disassembly",13,10 47 000032E0 20523A20646F206E6F- <3> 47 000032E9 742073686F77206D65- <3> 47 000032F2 6D6F72792072656665- <3> 47 000032FB 72656E636520696E20- <3> 47 00003304 646973617373656D62- <3> 47 0000330D 6C790D0A <3> 48 00003311 343030305F30303030- <3> db _8digitssephex(opt_cmdline_quiet_input)," quiet command line buffer input",13,10 48 0000331A 20717569657420636F- <3> 48 00003323 6D6D616E64206C696E- <3> 48 0000332C 652062756666657220- <3> 48 00003335 696E7075740D0A <3> 49 0000333C 383030305F30303030- <3> db _8digitssephex(opt_cmdline_quiet_output)," quiet command line buffer output",13,10 49 00003345 20717569657420636F- <3> 49 0000334E 6D6D616E64206C696E- <3> 49 00003357 652062756666657220- <3> 49 00003360 6F75747075740D0A <3> 57 <2> %ifn %2 58 00003368 00 <2> asciz 59 <2> %endif 248 <1> 249 <1> usemessagesegment 250 <1> .options_2: helppage options2 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %include "options.mac" 19 <3> %endif 20 <3> 21 00003369 4D6F7265206F707469- <3> db "More options: (read/write DCO2, read DCS2)",13,10 21 00003372 6F6E733A2028726561- <3> 21 0000337B 642F77726974652044- <3> 21 00003384 434F322C2072656164- <3> 21 0000338D 2044435332290D0A <3> 22 00003395 303030312044423A20- <3> db _4digitshex(opt2_db_header), " DB: show header",13,10 22 0000339E 73686F772068656164- <3> 22 000033A7 65720D0A <3> 23 000033AB 303030322044423A20- <3> db _4digitshex(opt2_db_trailer)," DB: show trailer",13,10 23 000033B4 73686F772074726169- <3> 23 000033BD 6C65720D0A <3> 24 000033C2 303031302044573A20- <3> db _4digitshex(opt2_dw_header), " DW: show header",13,10 24 000033CB 73686F772068656164- <3> 24 000033D4 65720D0A <3> 25 000033D8 303032302044573A20- <3> db _4digitshex(opt2_dw_trailer)," DW: show trailer",13,10 25 000033E1 73686F772074726169- <3> 25 000033EA 6C65720D0A <3> 26 000033EF 303130302044443A20- <3> db _4digitshex(opt2_dd_header), " DD: show header",13,10 26 000033F8 73686F772068656164- <3> 26 00003401 65720D0A <3> 27 00003405 303230302044443A20- <3> db _4digitshex(opt2_dd_trailer)," DD: show trailer",13,10 27 0000340E 73686F772074726169- <3> 27 00003417 6C65720D0A <3> 28 0000341C 303830302075736520- <3> db _4digitshex(opt2_getinput_dpmi)," use getinput function for int 21h interactive input in DPMI",13,10 28 00003425 676574696E70757420- <3> 28 0000342E 66756E6374696F6E20- <3> 28 00003437 666F7220696E742032- <3> 28 00003440 316820696E74657261- <3> 28 00003449 637469766520696E70- <3> 28 00003452 757420696E2044504D- <3> 28 0000345B 490D0A <3> 29 0000345E 3130303020483A2073- <3> db _4digitshex(opt2_hh_compat), " H: stay compatible to MS-DOS Debug",13,10 29 00003467 74617920636F6D7061- <3> 29 00003470 7469626C6520746F20- <3> 29 00003479 4D532D444F53204465- <3> 29 00003482 6275670D0A <3> 30 00003487 323030302069646C65- <3> db _4digitshex(opt2_getc_idle), " idle and check for Ctrl-C in getc",13,10 30 00003490 20616E642063686563- <3> 30 00003499 6B20666F7220437472- <3> 30 000034A2 6C2D4320696E206765- <3> 30 000034AB 74630D0A <3> 31 000034AF 343030302069646C65- <3> db _4digitshex(opt2_getc_idle_dpmi)," idle and check for Ctrl-C in getc in DPMI",13,10 31 000034B8 20616E642063686563- <3> 31 000034C1 6B20666F7220437472- <3> 31 000034CA 6C2D4320696E206765- <3> 31 000034D3 746320696E2044504D- <3> 31 000034DC 490D0A <3> 32 000034DF 3830303020542F5450- <3> db _4digitshex(opt2_re_cancel_tpg)," T/TP/P/G: cancel run after RE command buffer execution",13,10 32 000034E8 2F502F473A2063616E- <3> 32 000034F1 63656C2072756E2061- <3> 32 000034FA 667465722052452063- <3> 32 00003503 6F6D6D616E64206275- <3> 32 0000350C 666665722065786563- <3> 32 00003515 7574696F6E0D0A <3> 33 <3> %if _MS_N_COMPAT 34 0000351C 30315F30303030204E- <3> db _6digitssephex(opt2_nn_compat)," N: operate in MS Debug style instead of K command alike",13,10 34 00003525 3A206F706572617465- <3> 34 0000352E 20696E204D53204465- <3> 34 00003537 627567207374796C65- <3> 34 00003540 20696E737465616420- <3> 34 00003549 6F66204B20636F6D6D- <3> 34 00003552 616E6420616C696B65- <3> 34 0000355B 0D0A <3> 35 <3> %endif 36 0000355D 30325F30303030204E- <3> db _6digitssephex(opt2_nn_capitalise)," N: capitalise command line tail",13,10 36 00003566 3A206361706974616C- <3> 36 0000356F 69736520636F6D6D61- <3> 36 00003578 6E64206C696E652074- <3> 36 00003581 61696C0D0A <3> 37 <3> %if _MS_0RANGE_COMPAT 38 00003586 30345F303030302065- <3> db _6digitssephex(opt2_0range_compat)," explicit 0-length ranges operate in partial MS Debug style",13,10 38 0000358F 78706C696369742030- <3> 38 00003598 2D6C656E6774682072- <3> 38 000035A1 616E676573206F7065- <3> 38 000035AA 7261746520696E2070- <3> 38 000035B3 61727469616C204D53- <3> 38 000035BC 204465627567207374- <3> 38 000035C5 796C650D0A <3> 39 <3> %endif 40 000035CA 30385F303030302052- <3> db _6digitssephex(opt2_rr16_compat)," R: 16-bit 80-column register dump in MS Debug style",13,10 40 000035D3 3A2031362D62697420- <3> 40 000035DC 38302D636F6C756D6E- <3> 40 000035E5 207265676973746572- <3> 40 000035EE 2064756D7020696E20- <3> 40 000035F7 4D5320446562756720- <3> 40 00003600 7374796C650D0A <3> 41 <3> %if _MS_PROMPT_COMPAT 42 00003607 31305F303030302052- <3> db _6digitssephex(opt2_r_prompt_compat)," R: do variable prompts in MS Debug style",13,10 42 00003610 3A20646F2076617269- <3> 42 00003619 61626C652070726F6D- <3> 42 00003622 70747320696E204D53- <3> 42 0000362B 204465627567207374- <3> 42 00003634 796C650D0A <3> 43 <3> %endif 44 <3> %if _RSEPARATE 45 00003639 32305F303030302052- <3> db _6digitssephex(opt2_r_separate)," R: do variable prompts with underscore separator",13,10 45 00003642 3A20646F2076617269- <3> 45 0000364B 61626C652070726F6D- <3> 45 00003654 707473207769746820- <3> 45 0000365D 756E64657273636F72- <3> 45 00003666 652073657061726174- <3> 45 0000366F 6F720D0A <3> 46 <3> %endif 47 <3> %if _REGSLINEBREAK 48 00003673 34305F303030302064- <3> db _6digitssephex(opt2_r_linebreak_always)," display linebreak before R command register dump",13,10 48 0000367C 6973706C6179206C69- <3> 48 00003685 6E65627265616B2062- <3> 48 0000368E 65666F726520522063- <3> 48 00003697 6F6D6D616E64207265- <3> 48 000036A0 676973746572206475- <3> 48 000036A9 6D700D0A <3> 49 <3> %endif 57 <2> %ifn %2 58 000036AD 00 <2> asciz 59 <2> %endif 251 <1> 252 <1> usemessagesegment 253 <1> .options_3: helppage options3 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %include "options.mac" 19 <3> %endif 20 <3> 21 000036AE 4D6F7265206F707469- <3> db "More options: (read/write DCO3, read DCS3)",13,10 21 000036B7 6F6E733A2028726561- <3> 21 000036C0 642F77726974652044- <3> 21 000036C9 434F332C2072656164- <3> 21 000036D2 2044435333290D0A <3> 22 000036DA 3030303120543A2064- <3> db _4digitshex(opt3_tt_no_paging)," T: do not page output",13,10 22 000036E3 6F206E6F7420706167- <3> 22 000036EC 65206F75747075740D- <3> 22 000036F5 0A <3> 23 000036F6 303030322054503A20- <3> db _4digitshex(opt3_tp_no_paging)," TP: do not page output",13,10 23 000036FF 646F206E6F74207061- <3> 23 00003708 6765206F7574707574- <3> 23 00003711 0D0A <3> 24 00003713 3030303420503A2064- <3> db _4digitshex(opt3_pp_no_paging)," P: do not page output",13,10 24 0000371C 6F206E6F7420706167- <3> 24 00003725 65206F75747075740D- <3> 24 0000372E 0A <3> 25 0000372F 3030303820473A2064- <3> db _4digitshex(opt3_gg_no_paging)," G: do not page output",13,10 25 00003738 6F206E6F7420706167- <3> 25 00003741 65206F75747075740D- <3> 25 0000374A 0A <3> 26 0000374B 3031303020542F5450- <3> db _4digitshex(opt3_silence_paging_set), " T/TP/P: modify paging for silent dump",13,10 26 00003754 2F503A206D6F646966- <3> 26 0000375D 7920706167696E6720- <3> 26 00003766 666F722073696C656E- <3> 26 0000376F 742064756D700D0A <3> 27 00003777 3032303020542F5450- <3> db _4digitshex(opt3_silence_paging_on), " T/TP/P: if ",_4digitshex(opt3_silence_paging_set)," set: turn paging on, else off",13,10 27 00003780 2F503A206966203031- <3> 27 00003789 3030207365743A2074- <3> 27 00003792 75726E20706167696E- <3> 27 0000379B 67206F6E2C20656C73- <3> 27 000037A4 65206F66660D0A <3> 28 <3> %if _REGSHIGHLIGHT 29 000037AB 30315F303030302052- <3> db _6digitssephex(opt3_r_highlight_diff), " R: highlight changed digits (needs ANSI for DOS output)",13,10 29 000037B4 3A20686967686C6967- <3> 29 000037BD 6874206368616E6765- <3> 29 000037C6 642064696769747320- <3> 29 000037CF 286E6565647320414E- <3> 29 000037D8 534920666F7220444F- <3> 29 000037E1 53206F757470757429- <3> 29 000037EA 0D0A <3> 30 000037EC 30325F303030302052- <3> db _6digitssephex(opt3_r_highlight_dumb), " R: highlight escape sequences to int 10h, else video attributes",13,10 30 000037F5 3A20686967686C6967- <3> 30 000037FE 687420657363617065- <3> 30 00003807 2073657175656E6365- <3> 30 00003810 7320746F20696E7420- <3> 30 00003819 3130682C20656C7365- <3> 30 00003822 20766964656F206174- <3> 30 0000382B 74726962757465730D- <3> 30 00003834 0A <3> 31 00003835 30345F303030302052- <3> db _6digitssephex(opt3_r_highlight_full), " R: highlight changed registers (overrides ",_6digitssephex(opt3_r_highlight_diff),")",13,10 31 0000383E 3A20686967686C6967- <3> 31 00003847 6874206368616E6765- <3> 31 00003850 642072656769737465- <3> 31 00003859 727320286F76657272- <3> 31 00003862 696465732030315F30- <3> 31 0000386B 303030290D0A <3> 32 00003871 30385F303030302052- <3> db _6digitssephex(opt3_r_highlight_eip), " R: include highlighting of EIP",13,10 32 0000387A 3A20696E636C756465- <3> 32 00003883 20686967686C696768- <3> 32 0000388C 74696E67206F662045- <3> 32 00003895 49500D0A <3> 33 <3> %endif 34 <3> %if _PM 35 <3> db _6digitssephex(opt3_ss_b_bit_set), " set PM ss B bit",13,10 36 <3> %if _BREAK_INSTALLDPMI 37 <3> db _6digitssephex(opt3_break_installdpmi), " break on entering Protected Mode",13,10 38 <3> %endif 39 <3> %endif 40 <3> %if _GETLINEHIGHLIGHT 41 00003899 303130305F30303030- <3> db _8digitssephex(opt3_getline_highlight), " highlight prefix/suffix in getinput if text parts are not visible",13,10 41 000038A2 20686967686C696768- <3> 41 000038AB 74207072656669782F- <3> 41 000038B4 73756666697820696E- <3> 41 000038BD 20676574696E707574- <3> 41 000038C6 206966207465787420- <3> 41 000038CF 706172747320617265- <3> 41 000038D8 206E6F742076697369- <3> 41 000038E1 626C650D0A <3> 42 <3> %endif 43 <3> 44 000038E6 303230305F30303030- <3> db _8digitssephex(opt3_no_idle_2F), " do not call int 2F.1680 for idling",13,10 44 000038EF 20646F206E6F742063- <3> 44 000038F8 616C6C20696E742032- <3> 44 00003901 462E3136383020666F- <3> 44 0000390A 722069646C696E670D- <3> 44 00003913 0A <3> 45 <3> %if _DELAY_BEFORE_BP 46 00003914 303430305F30303030- <3> db _8digitssephex(opt3_delay_before_bp), " delay for a tick before writing breakpoints",13,10 46 0000391D 2064656C617920666F- <3> 46 00003926 722061207469636B20- <3> 46 0000392F 6265666F7265207772- <3> 46 00003938 6974696E6720627265- <3> 46 00003941 616B706F696E74730D- <3> 46 0000394A 0A <3> 47 <3> %endif 48 0000394B 303830305F30303030- <3> db _8digitssephex(opt3_no_call_update), " do not call other lDebug instance's Update IISP Header call",13,10 48 00003954 20646F206E6F742063- <3> 48 0000395D 616C6C206F74686572- <3> 48 00003966 206C44656275672069- <3> 48 0000396F 6E7374616E63652773- <3> 48 00003978 205570646174652049- <3> 48 00003981 495350204865616465- <3> 48 0000398A 722063616C6C0D0A <3> 49 00003992 313030305F30303030- <3> db _8digitssephex(opt3_disable_autorepeat), " disable auto-repeat",13,10 49 0000399B 2064697361626C6520- <3> 49 000039A4 6175746F2D72657065- <3> 49 000039AD 61740D0A <3> 50 000039B1 323030305F30303030- <3> db _8digitssephex(opt3_check_ctrlc_keyb), " check int 16h buffer for Control-C if inputting from int 16h",13,10 50 000039BA 20636865636B20696E- <3> 50 000039C3 742031366820627566- <3> 50 000039CC 66657220666F722043- <3> 50 000039D5 6F6E74726F6C2D4320- <3> 50 000039DE 696620696E70757474- <3> 50 000039E7 696E672066726F6D20- <3> 50 000039F0 696E74203136680D0A <3> 51 000039F9 343030305F30303030- <3> db _8digitssephex(opt3_check_ctrlc_0bh), " call DOS service 0Bh to check for Control-C",13,10 51 00003A02 2063616C6C20444F53- <3> 51 00003A0B 207365727669636520- <3> 51 00003A14 30426820746F206368- <3> 51 00003A1D 65636B20666F722043- <3> 51 00003A26 6F6E74726F6C2D430D- <3> 51 00003A2F 0A <3> 52 00003A30 383030305F30303030- <3> db _8digitssephex(opt3_tsr_quit_leave_tf), " when Q command is used while TSR, leave TF as is",13,10 52 00003A39 207768656E20512063- <3> 52 00003A42 6F6D6D616E64206973- <3> 52 00003A4B 207573656420776869- <3> 52 00003A54 6C65205453522C206C- <3> 52 00003A5D 656176652054462061- <3> 52 00003A66 732069730D0A <3> 57 <2> %ifn %2 58 00003A6C 00 <2> asciz 59 <2> %endif 254 <1> 255 <1> usemessagesegment 256 <1> .options_4: helppage options4, 1 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %include "options.mac" 19 <3> %endif 20 <3> 21 00003A6D 4D6F7265206F707469- <3> db "More options: (read/write DCO4, read DCS4)",13,10 21 00003A76 6F6E733A2028726561- <3> 21 00003A7F 642F77726974652044- <3> 21 00003A88 434F342C2072656164- <3> 21 00003A91 2044435334290D0A <3> 22 <3> %if _PM 23 <3> db _4digitshex(opt4_int_2F_hook)," enable interrupt 2Fh hook while in 86 Mode",13,10 24 <3> %endif 25 <3> %if _CATCHINT08 26 00003A99 3030303420656E6162- <3> db _4digitshex(opt4_int_08_hook)," enable interrupt 8 hook",13,10 26 00003AA2 6C6520696E74657272- <3> 26 00003AAB 757074203820686F6F- <3> 26 00003AB4 6B0D0A <3> 27 <3> %endif 28 <3> %if _CATCHINT2D 29 00003AB7 3030303820656E6162- <3> db _4digitshex(opt4_int_2D_hook)," enable interrupt 2Dh hook",13,10 29 00003AC0 6C6520696E74657272- <3> 29 00003AC9 757074203244682068- <3> 29 00003AD2 6F6F6B0D0A <3> 30 <3> %endif 31 <3> %if _CATCHINTFAULTCOND && (_CATCHINT0D || _CATCHINT0C) 32 00003AD7 3030313020656E6162- <3> db _4digitshex(opt4_int_fault_hook)," enable 86 Mode fault interrupt hooks",13,10 32 00003AE0 6C65203836204D6F64- <3> 32 00003AE9 65206661756C742069- <3> 32 00003AF2 6E7465727275707420- <3> 32 00003AFB 686F6F6B730D0A <3> 33 <3> %endif 34 00003B02 303030315F30303030- <3> db _8digitssephex(opt4_int_serial_force)," force serial interrupt unhooking",13,10 34 00003B0B 20666F726365207365- <3> 34 00003B14 7269616C20696E7465- <3> 34 00003B1D 727275707420756E68- <3> 34 00003B26 6F6F6B696E670D0A <3> 35 <3> %if _PM 36 <3> db _8digitssephex(opt4_int_2F_force)," force interrupt 2Fh unhooking",13,10 37 <3> %endif 38 <3> %if _CATCHINT08 39 00003B2E 303030345F30303030- <3> db _8digitssephex(opt4_int_08_force)," force interrupt 8 unhooking",13,10 39 00003B37 20666F72636520696E- <3> 39 00003B40 746572727570742038- <3> 39 00003B49 20756E686F6F6B696E- <3> 39 00003B52 670D0A <3> 40 <3> %endif 41 <3> %if _CATCHINT2D 42 00003B55 303030385F30303030- <3> db _8digitssephex(opt4_int_2D_force)," force interrupt 2Dh unhooking",13,10 42 00003B5E 20666F72636520696E- <3> 42 00003B67 746572727570742032- <3> 42 00003B70 446820756E686F6F6B- <3> 42 00003B79 696E670D0A <3> 43 <3> %endif 44 <3> %if _CATCHINT0D 45 00003B7E 303031305F30303030- <3> db _8digitssephex(opt4_int_0D_force)," force interrupt 0Dh unhooking",13,10 45 00003B87 20666F72636520696E- <3> 45 00003B90 746572727570742030- <3> 45 00003B99 446820756E686F6F6B- <3> 45 00003BA2 696E670D0A <3> 46 <3> %endif 47 <3> %if _CATCHINT0C 48 00003BA7 303032305F30303030- <3> db _8digitssephex(opt4_int_0C_force)," force interrupt 0Ch unhooking",13,10 48 00003BB0 20666F72636520696E- <3> 48 00003BB9 746572727570742030- <3> 48 00003BC2 436820756E686F6F6B- <3> 48 00003BCB 696E670D0A <3> 49 <3> %endif 50 <3> %if _CATCHINT00 51 00003BD0 303130305F30303030- <3> db _8digitssephex(opt4_int_00_force)," force interrupt 0 unhooking",13,10 51 00003BD9 20666F72636520696E- <3> 51 00003BE2 746572727570742030- <3> 51 00003BEB 20756E686F6F6B696E- <3> 51 00003BF4 670D0A <3> 52 <3> %endif 53 <3> %if _CATCHINT01 54 00003BF7 303230305F30303030- <3> db _8digitssephex(opt4_int_01_force)," force interrupt 1 unhooking",13,10 54 00003C00 20666F72636520696E- <3> 54 00003C09 746572727570742031- <3> 54 00003C12 20756E686F6F6B696E- <3> 54 00003C1B 670D0A <3> 55 <3> %endif 56 <3> %if _CATCHINT03 57 00003C1E 303430305F30303030- <3> db _8digitssephex(opt4_int_03_force)," force interrupt 3 unhooking",13,10 57 00003C27 20666F72636520696E- <3> 57 00003C30 746572727570742033- <3> 57 00003C39 20756E686F6F6B696E- <3> 57 00003C42 670D0A <3> 58 <3> %endif 59 <3> %if _CATCHINT06 60 00003C45 303830305F30303030- <3> db _8digitssephex(opt4_int_06_force)," force interrupt 6 unhooking",13,10 60 00003C4E 20666F72636520696E- <3> 60 00003C57 746572727570742036- <3> 60 00003C60 20756E686F6F6B696E- <3> 60 00003C69 670D0A <3> 61 <3> %endif 62 <3> %if _CATCHINT18 63 00003C6C 313030305F30303030- <3> db _8digitssephex(opt4_int_18_force)," force interrupt 18h unhooking",13,10 63 00003C75 20666F72636520696E- <3> 63 00003C7E 746572727570742031- <3> 63 00003C87 386820756E686F6F6B- <3> 63 00003C90 696E670D0A <3> 64 <3> %endif 65 <3> %if _CATCHINT19 66 00003C95 323030305F30303030- <3> db _8digitssephex(opt4_int_19_force)," force interrupt 19h unhooking",13,10 66 00003C9E 20666F72636520696E- <3> 66 00003CA7 746572727570742031- <3> 66 00003CB0 396820756E686F6F6B- <3> 66 00003CB9 696E670D0A <3> 67 <3> %endif 68 <3> %if _CATCHSYSREQ 69 <3> %if _SYSREQINT == 09h 70 <3> db _8digitssephex(opt4_int_09_force)," force interrupt 9 unhooking",13,10 71 <3> %elif _SYSREQINT == 15h 72 <3> db _8digitssephex(opt4_int_15_force)," force interrupt 15h unhooking",13,10 73 <3> %else 74 <3> %error Unknown SysReq interrupt 75 <3> %endif 76 <3> %endif 77 <3> %if _CATCHINT07 78 <3> db _8digitssephex(opt4_int_07_force)," force interrupt 7 unhooking",13,10 79 <3> %endif 57 <2> %ifn %2 58 <2> asciz 59 <2> %endif 257 <1> ; terminator is in .options_5 258 <1> 259 <1> usemessagesegment 260 <1> align 2, db 0 261 <1> .options_5: 262 <1> %if _HELP_COMPRESSED 263 <1> dw 2 ; length of compressed data (excluding itself) 264 <1> db 10, 4 ; parameters expected by depack 265 <1> %else 266 00003CBE 00 <1> asciz 267 <1> %endif 268 <1> 269 <1> usemessagesegment 270 <1> .options_6: helppage options6 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %include "options.mac" 19 <3> %endif 20 <3> 21 00003CBF 4D6F7265206F707469- <3> db "More options: (read/write DCO6, read DCS6)",13,10 21 00003CC8 6F6E733A2028726561- <3> 21 00003CD1 642F77726974652044- <3> 21 00003CDA 434F362C2072656164- <3> 21 00003CE3 2044435336290D0A <3> 22 <3> %if _VXCHG 23 00003CEB 3030303120656E6162- <3> db _4digitshex(opt6_vv_mode)," enable video screen swapping",13,10 23 00003CF4 6C6520766964656F20- <3> 23 00003CFD 73637265656E207377- <3> 23 00003D06 617070696E670D0A <3> 24 00003D0E 30303032206B656570- <3> db _4digitshex(opt6_vv_keep)," keep video screen when disabling swapping",13,10 24 00003D17 20766964656F207363- <3> 24 00003D20 7265656E207768656E- <3> 24 00003D29 2064697361626C696E- <3> 24 00003D32 67207377617070696E- <3> 24 00003D3B 670D0A <3> 25 00003D3E 303031302072656164- <3> db _4digitshex(opt6_vv_int16)," read key from interrupt 16h when swapping (V command)",13,10 25 00003D47 206B65792066726F6D- <3> 25 00003D50 20696E746572727570- <3> 25 00003D59 742031366820776865- <3> 25 00003D62 6E207377617070696E- <3> 25 00003D6B 6720285620636F6D6D- <3> 25 00003D74 616E64290D0A <3> 26 <3> %endif 27 <3> %if _DEBUG 28 <3> db _4digitshex(opt6_debug_exception_late)," run breakpoint late in debugger exception",13,10 29 <3> db _4digitshex(opt6_debug_exception_early)," run breakpoint early in debugger exception",13,10 30 <3> %if _DEBUG_COND 31 <3> db _4digitshex(opt6_debug_exception)," enable debug mode when debugger exception occurs",13,10 32 <3> db _4digitshex(opt6_debug_mode)," enable debug mode (and BU command)",13,10 33 <3> %endif 34 <3> %endif 35 00003D7A 303230302075736520- <3> db _4digitshex(opt6_bios_output)," use ROM-BIOS output even when DOS available",13,10 35 00003D83 524F4D2D42494F5320- <3> 35 00003D8C 6F7574707574206576- <3> 35 00003D95 656E207768656E2044- <3> 35 00003D9E 4F5320617661696C61- <3> 35 00003DA7 626C650D0A <3> 36 00003DAC 30343030206C6F6164- <3> db _4digitshex(opt6_flat_binary)," load and write .EXE and .COM files like flat .BIN files (/F+)",13,10 36 00003DB5 20616E642077726974- <3> 36 00003DBE 65202E45584520616E- <3> 36 00003DC7 64202E434F4D206669- <3> 36 00003DD0 6C6573206C696B6520- <3> 36 00003DD9 666C6174202E42494E- <3> 36 00003DE2 2066696C657320282F- <3> 36 00003DEB 462B290D0A <3> 37 00003DF0 3038303020666F7220- <3> db _4digitshex(opt6_big_stack)," for loading flat .BIN files set up Stack Segment != PSP (/E+)",13,10 37 00003DF9 6C6F6164696E672066- <3> 37 00003E02 6C6174202E42494E20- <3> 37 00003E0B 66696C657320736574- <3> 37 00003E14 20757020537461636B- <3> 37 00003E1D 205365676D656E7420- <3> 37 00003E26 213D2050535020282F- <3> 37 00003E2F 452B290D0A <3> 38 <3> %if _40COLUMNS 39 00003E34 3130303020656E6162- <3> db _4digitshex(opt6_40_columns)," enable 40-column friendly mode",13,10 39 00003E3D 6C652034302D636F6C- <3> 39 00003E46 756D6E20667269656E- <3> 39 00003E4F 646C79206D6F64650D- <3> 39 00003E58 0A <3> 40 00003E59 3230303020696E2034- <3> db _4digitshex(opt6_40_indent_odd)," in 40-column mode indent odd D lines more",13,10 40 00003E62 302D636F6C756D6E20- <3> 40 00003E6B 6D6F646520696E6465- <3> 40 00003E74 6E74206F6464204420- <3> 40 00003E7D 6C696E6573206D6F72- <3> 40 00003E86 650D0A <3> 41 00003E89 3430303020696E2034- <3> db _4digitshex(opt6_40_dash)," in 40-column mode display dashes at half of D length",13,10 41 00003E92 302D636F6C756D6E20- <3> 41 00003E9B 6D6F64652064697370- <3> 41 00003EA4 6C6179206461736865- <3> 41 00003EAD 732061742068616C66- <3> 41 00003EB6 206F662044206C656E- <3> 41 00003EBF 6774680D0A <3> 42 <3> %endif 43 00003EC4 30315F303030302061- <3> db _6digitssephex(opt6_share_serial_irq)," allow to share serial IRQ handler",13,10 43 00003ECD 6C6C6F7720746F2073- <3> 43 00003ED6 686172652073657269- <3> 43 00003EDF 616C20495251206861- <3> 43 00003EE8 6E646C65720D0A <3> 44 <3> %if _DEBUG 45 <3> db _6digitssephex(opt6_debug_putrunint_early)," run breakpoint early in putrunint",13,10 46 <3> %if _DEBUG_COND 47 <3> db _6digitssephex(opt6_debug_putrunint)," enable debug mode when putrunint called",13,10 48 <3> %endif 49 <3> %endif 50 00003EEF 303130305F30303030- <3> db _8digitssephex(opt6_bios_io)," use ROM-BIOS I/O even when DOS available (disables script file read)",13,10 50 00003EF8 2075736520524F4D2D- <3> 50 00003F01 42494F5320492F4F20- <3> 50 00003F0A 6576656E207768656E- <3> 50 00003F13 20444F532061766169- <3> 50 00003F1C 6C61626C6520286469- <3> 50 00003F25 7361626C6573207363- <3> 50 00003F2E 726970742066696C65- <3> 50 00003F37 2072656164290D0A <3> 51 <3> %if _REGSREADABLEFLAGS 52 00003F3F 323030305F30303030- <3> db _8digitssephex(opt6_r_flags_style2)," display flags in style 2 for R command register dump",13,10 52 00003F48 20646973706C617920- <3> 52 00003F51 666C61677320696E20- <3> 52 00003F5A 7374796C6520322066- <3> 52 00003F63 6F72205220636F6D6D- <3> 52 00003F6C 616E64207265676973- <3> 52 00003F75 7465722064756D700D- <3> 52 00003F7E 0A <3> 53 00003F7F 343030305F30303030- <3> db _8digitssephex(opt6_r_flags_style3)," display flags in style 3 for R command register dump",13,10 53 00003F88 20646973706C617920- <3> 53 00003F91 666C61677320696E20- <3> 53 00003F9A 7374796C6520332066- <3> 53 00003FA3 6F72205220636F6D6D- <3> 53 00003FAC 616E64207265676973- <3> 53 00003FB5 7465722064756D700D- <3> 53 00003FBE 0A <3> 54 <3> %endif 55 <3> %if _REGSLINEBREAK 56 00003FBF 383030305F30303030- <3> db _8digitssephex(opt6_r_linebreak_conditional)," linebreak before R register dump if not column 0 (int 10h only)",13,10 56 00003FC8 206C696E6562726561- <3> 56 00003FD1 6B206265666F726520- <3> 56 00003FDA 522072656769737465- <3> 56 00003FE3 722064756D70206966- <3> 56 00003FEC 206E6F7420636F6C75- <3> 56 00003FF5 6D6E20302028696E74- <3> 56 00003FFE 20313068206F6E6C79- <3> 56 00004007 290D0A <3> 57 <3> %endif 57 <2> %ifn %2 58 0000400A 00 <2> asciz 59 <2> %endif 271 <1> 272 <1> usemessagesegment 273 <1> .flags_1: helppage optionsi 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %include "options.mac" 19 <3> %endif 20 <3> 21 0000400B 496E7465726E616C20- <3> db "Internal flags: (read DIF)",13,10 21 00004014 666C6167733A202872- <3> 21 0000401D 65616420444946290D- <3> 21 00004026 0A <3> 22 00004027 30305F303030312049- <3> db _6digitssephex(oldpacket), " Int25/Int26 packet method available",13,10 22 00004030 6E7432352F496E7432- <3> 22 00004039 36207061636B657420- <3> 22 00004042 6D6574686F64206176- <3> 22 0000404B 61696C61626C650D0A <3> 23 00004054 30305F303030322049- <3> db _6digitssephex(newpacket), " Int21.7305 packet method available",13,10 23 0000405D 6E7432312E37333035- <3> 23 00004066 207061636B6574206D- <3> 23 0000406F 6574686F6420617661- <3> 23 00004078 696C61626C650D0A <3> 24 <3> %if _VDD 25 00004080 30305F303030342056- <3> db _6digitssephex(ntpacket), " VDD registered and usable",13,10 25 00004089 444420726567697374- <3> 25 00004092 6572656420616E6420- <3> 25 0000409B 757361626C650D0A <3> 26 <3> %endif 27 000040A3 30305F303030382069- <3> db _6digitssephex(pagedcommand), " internal flag for paged output",13,10 27 000040AC 6E7465726E616C2066- <3> 27 000040B5 6C616720666F722070- <3> 27 000040BE 61676564206F757470- <3> 27 000040C7 75740D0A <3> 28 000040CB 30305F303031302044- <3> db _6digitssephex(notstdinput), " DEBUG's input isn't StdIn",13,10 28 000040D4 45425547277320696E- <3> 28 000040DD 7075742069736E2774- <3> 28 000040E6 20537464496E0D0A <3> 29 000040EE 30305F303032302044- <3> db _6digitssephex(inputfile), " DEBUG's input is a file",13,10 29 000040F7 45425547277320696E- <3> 29 00004100 707574206973206120- <3> 29 00004109 66696C650D0A <3> 30 0000410F 30305F303034302044- <3> db _6digitssephex(notstdoutput), " DEBUG's output isn't StdOut",13,10 30 00004118 454255472773206F75- <3> 30 00004121 747075742069736E27- <3> 30 0000412A 74205374644F75740D- <3> 30 00004133 0A <3> 31 00004134 30305F303038302044- <3> db _6digitssephex(outputfile), " DEBUG's output is a file",13,10 31 0000413D 454255472773206F75- <3> 31 00004146 747075742069732061- <3> 31 0000414F 2066696C650D0A <3> 32 <3> %if _PM 33 <3> db _6digitssephex(hooked2F), " Int2F.1687 hooked",13,10 34 <3> db _6digitssephex(nohook2F), " Int2F.1687 won't be hooked",13,10 35 <3> db _6digitssephex(dpminohlt), " do not execute HLT to idle in PM",13,10 36 <3> db _6digitssephex(protectedmode), " in protected mode",13,10 37 <3> %endif 38 00004156 30305F313030302073- <3> db _6digitssephex(debuggeeA20), " state of debuggee's A20",13,10 38 0000415F 74617465206F662064- <3> 38 00004168 656275676765652773- <3> 38 00004171 204132300D0A <3> 39 00004177 30305F323030302073- <3> db _6digitssephex(debuggerA20), " state of debugger's A20 (not implemented: same as previous)",13,10 39 00004180 74617465206F662064- <3> 39 00004189 656275676765722773- <3> 39 00004192 2041323020286E6F74- <3> 39 0000419B 20696D706C656D656E- <3> 39 000041A4 7465643A2073616D65- <3> 39 000041AD 206173207072657669- <3> 39 000041B6 6F7573290D0A <3> 40 <3> %if _BOOTLDR 41 000041BC 30305F343030302064- <3> db _6digitssephex(nodosloaded), " debugger booted independent of a DOS",13,10 41 000041C5 656275676765722062- <3> 41 000041CE 6F6F74656420696E64- <3> 41 000041D7 6570656E64656E7420- <3> 41 000041E0 6F66206120444F530D- <3> 41 000041E9 0A <3> 42 <3> %endif 43 000041EA 30305F383030302043- <3> db _6digitssephex(has386), " CPU is at least a 386 (32-bit CPU)",13,10 43 000041F3 505520697320617420- <3> 43 000041FC 6C6561737420612033- <3> 43 00004205 3836202833322D6269- <3> 43 0000420E 7420435055290D0A <3> 44 00004216 30315F303030302069- <3> db _6digitssephex(usecharcounter), " internal flag for tab output processing",13,10 44 0000421F 6E7465726E616C2066- <3> 44 00004228 6C616720666F722074- <3> 44 00004231 6162206F7574707574- <3> 44 0000423A 2070726F6365737369- <3> 44 00004243 6E670D0A <3> 45 <3> %if _VDD 46 00004247 30325F303030302072- <3> db _6digitssephex(runningnt), " running inside NTVDM",13,10 46 00004250 756E6E696E6720696E- <3> 46 00004259 73696465204E545644- <3> 46 00004262 4D0D0A <3> 47 <3> %endif 48 <3> %if _PM 49 <3> db _6digitssephex(canswitchmode), " DPMI raw mode switch usable to set breakpoints",13,10 50 <3> db _6digitssephex(modeswitched), " internal flag for mode switching",13,10 51 <3> %endif 52 00004265 31305F303030302069- <3> db _6digitssephex(promptwaiting), " internal flag for paged output",13,10 52 0000426E 6E7465726E616C2066- <3> 52 00004277 6C616720666F722070- <3> 52 00004280 61676564206F757470- <3> 52 00004289 75740D0A <3> 53 <3> %if _PM 54 <3> db _6digitssephex(switchbuffer), " internal flag for mode switching",13,10 55 <3> %endif 56 <3> %if _TSR 57 0000428D 34305F303030302069- <3> db _6digitssephex(tsrmode), " in TSR mode (detached debugger process)",13,10 57 00004296 6E20545352206D6F64- <3> 57 0000429F 652028646574616368- <3> 57 000042A8 656420646562756767- <3> 57 000042B1 65722070726F636573- <3> 57 000042BA 73290D0A <3> 58 <3> %endif 59 <3> %if _DOSEMU 60 000042BE 303130305F30303030- <3> db _8digitssephex(runningdosemu), " running inside dosemu",13,10 60 000042C7 2072756E6E696E6720- <3> 60 000042D0 696E7369646520646F- <3> 60 000042D9 73656D750D0A <3> 61 <3> %endif 62 000042DF 303430305F30303030 <3> db _8digitssephex(tt_while) 63 000042E8 20542F54502F503A20- <3> db " T/TP/P: while condition specified",13,10 63 000042F1 7768696C6520636F6E- <3> 63 000042FA 646974696F6E207370- <3> 63 00004303 656369666965640D0A <3> 64 0000430C 303830305F30303030 <3> db _8digitssephex(tt_p) 65 00004315 2054503A2050207370- <3> db " TP: P specified (proceed past string ops)",13,10 65 0000431E 656369666965642028- <3> 65 00004327 70726F636565642070- <3> 65 00004330 61737420737472696E- <3> 65 00004339 67206F7073290D0A <3> 66 00004341 313030305F30303030 <3> db _8digitssephex(tt_silent_mode) 67 0000434A 20542F54502F503A20- <3> db " T/TP/P: silent mode (SILENT specified)",13,10 67 00004353 73696C656E74206D6F- <3> 67 0000435C 6465202853494C454E- <3> 67 00004365 542073706563696669- <3> 67 0000436E 6564290D0A <3> 68 00004373 323030305F30303030 <3> db _8digitssephex(tt_silence) 69 0000437C 20542F54502F503A20- <3> db " T/TP/P: silent mode is active, writing to silent buffer",13,10 69 00004385 73696C656E74206D6F- <3> 69 0000438E 646520697320616374- <3> 69 00004397 6976652C2077726974- <3> 69 000043A0 696E6720746F207369- <3> 69 000043A9 6C656E742062756666- <3> 69 000043B2 65720D0A <3> 57 <2> %ifn %2 58 000043B6 00 <2> asciz 59 <2> %endif 274 <1> 275 <1> usemessagesegment 276 <1> .asmoptions_1: helppage optionsa 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %include "options.mac" 19 <3> %endif 20 <3> 21 000043B7 417661696C61626C65- <3> db "Available assembler/disassembler options: (read/write DAO, read DAS)",13,10 21 000043C0 20617373656D626C65- <3> 21 000043C9 722F64697361737365- <3> 21 000043D2 6D626C6572206F7074- <3> 21 000043DB 696F6E733A20287265- <3> 21 000043E4 61642F777269746520- <3> 21 000043ED 44414F2C2072656164- <3> 21 000043F6 20444153290D0A <3> 22 000043FD 303120446973617373- <3> db _2digitshex(disasm_lowercase), " Disassembler: lowercase output",13,10 22 00004406 656D626C65723A206C- <3> 22 0000440F 6F7765726361736520- <3> 22 00004418 6F75747075740D0A <3> 23 00004420 303220446973617373- <3> db _2digitshex(disasm_commablank)," Disassembler: output blank behind comma",13,10 23 00004429 656D626C65723A206F- <3> 23 00004432 757470757420626C61- <3> 23 0000443B 6E6B20626568696E64- <3> 23 00004444 20636F6D6D610D0A <3> 24 0000444C 303420446973617373- <3> db _2digitshex(disasm_nasm), " Disassembler: output addresses in NASM syntax",13,10 24 00004455 656D626C65723A206F- <3> 24 0000445E 757470757420616464- <3> 24 00004467 72657373657320696E- <3> 24 00004470 204E41534D2073796E- <3> 24 00004479 7461780D0A <3> 25 0000447E 3038 <3> db _2digitshex(disasm_lowercase_refmem) 26 00004480 20446973617373656D- <3> db " Disassembler: lowercase referenced memory location segreg",13,10 26 00004489 626C65723A206C6F77- <3> 26 00004492 657263617365207265- <3> 26 0000449B 666572656E63656420- <3> 26 000044A4 6D656D6F7279206C6F- <3> 26 000044AD 636174696F6E207365- <3> 26 000044B6 677265670D0A <3> 27 000044BC 313020446973617373- <3> db _2digitshex(disasm_show_short)," Disassembler: always show SHORT keyword",13,10 27 000044C5 656D626C65723A2061- <3> 27 000044CE 6C776179732073686F- <3> 27 000044D7 772053484F5254206B- <3> 27 000044E0 6579776F72640D0A <3> 28 000044E8 323020446973617373- <3> db _2digitshex(disasm_show_near), " Disassembler: always show NEAR keyword",13,10 28 000044F1 656D626C65723A2061- <3> 28 000044FA 6C776179732073686F- <3> 28 00004503 77204E454152206B65- <3> 28 0000450C 79776F72640D0A <3> 29 00004513 343020446973617373- <3> db _2digitshex(disasm_show_far), " Disassembler: always show FAR keyword",13,10 29 0000451C 656D626C65723A2061- <3> 29 00004525 6C776179732073686F- <3> 29 0000452E 7720464152206B6579- <3> 29 00004537 776F72640D0A <3> 30 0000453D 383020446973617373- <3> db _2digitshex(disasm_nec), " Disassembler: NEC V20 repeat rules (for segregs)",13,10 30 00004546 656D626C65723A204E- <3> 30 0000454F 454320563230207265- <3> 30 00004558 706561742072756C65- <3> 30 00004561 732028666F72207365- <3> 30 0000456A 6772656773290D0A <3> 31 <3> %if _40COLUMNS 32 00004572 303130302044697361- <3> db _4digitshex(disasm_40_columns)," Disassembler: 40-column friendly mode (only 4 bytes machine code per line)",13,10 32 0000457B 7373656D626C65723A- <3> 32 00004584 2034302D636F6C756D- <3> 32 0000458D 6E20667269656E646C- <3> 32 00004596 79206D6F646520286F- <3> 32 0000459F 6E6C79203420627974- <3> 32 000045A8 6573206D616368696E- <3> 32 000045B1 6520636F6465207065- <3> 32 000045BA 72206C696E65290D0A <3> 33 000045C3 303230302044697361- <3> db _4digitshex(disasm_no_indent), " Disassembler: do not indent disassembly operands",13,10 33 000045CC 7373656D626C65723A- <3> 33 000045D5 20646F206E6F742069- <3> 33 000045DE 6E64656E7420646973- <3> 33 000045E7 617373656D626C7920- <3> 33 000045F0 6F706572616E64730D- <3> 33 000045F9 0A <3> 34 <3> %if _MS_MNEMON_COMPAT 35 000045FA 303430302044697361- <3> db _4digitshex(disasm_msdebug_mnemonofs), " Disassembler: MS Debug style opcode field width",13,10 35 00004603 7373656D626C65723A- <3> 35 0000460C 204D53204465627567- <3> 35 00004615 207374796C65206F70- <3> 35 0000461E 636F6465206669656C- <3> 35 00004627 642077696474680D0A <3> 36 <3> %endif 37 <3> %endif 38 00004630 313030302044697361- <3> db _4digitshex(disasm_a16_memref)," Disassembler: access data in a16 referenced memory operand",13,10 38 00004639 7373656D626C65723A- <3> 38 00004642 206163636573732064- <3> 38 0000464B 61746120696E206131- <3> 38 00004654 36207265666572656E- <3> 38 0000465D 636564206D656D6F72- <3> 38 00004666 79206F706572616E64- <3> 38 0000466F 0D0A <3> 39 00004671 323030302044697361- <3> db _4digitshex(disasm_a32_memref)," Disassembler: access data in a32 referenced memory operand",13,10 39 0000467A 7373656D626C65723A- <3> 39 00004683 206163636573732064- <3> 39 0000468C 61746120696E206133- <3> 39 00004695 32207265666572656E- <3> 39 0000469E 636564206D656D6F72- <3> 39 000046A7 79206F706572616E64- <3> 39 000046B0 0D0A <3> 40 000046B2 343030302044697361- <3> db _4digitshex(disasm_a16_string)," Disassembler: simulate repeated a16 scas/cmps string operation",13,10 40 000046BB 7373656D626C65723A- <3> 40 000046C4 2073696D756C617465- <3> 40 000046CD 207265706561746564- <3> 40 000046D6 206131362073636173- <3> 40 000046DF 2F636D707320737472- <3> 40 000046E8 696E67206F70657261- <3> 40 000046F1 74696F6E0D0A <3> 41 000046F7 383030302044697361- <3> db _4digitshex(disasm_a32_string)," Disassembler: simulate repeated a32 scas/cmps string operation",13,10 41 00004700 7373656D626C65723A- <3> 41 00004709 2073696D756C617465- <3> 41 00004712 207265706561746564- <3> 41 0000471B 206133322073636173- <3> 41 00004724 2F636D707320737472- <3> 41 0000472D 696E67206F70657261- <3> 41 00004736 74696F6E0D0A <3> 57 <2> %ifn %2 58 0000473C 00 <2> asciz 59 <2> %endif 277 <1> %endif 278 <1> 279 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 280 <1> usemessagesegment 281 <1> .varhelp: helppage vars 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 0000473D 417661696C61626C65- <3> db "Available " 20 00004746 20 <3> 21 <3> %if _PSPVARIABLES && !(_VARIABLES || _OPTIONS) 22 <3> db "read-only " 23 <3> %endif 24 00004747 6C4465627567207661- <3> db "lDebug variables:",13,10 24 00004750 726961626C65733A0D- <3> 24 00004759 0A <3> 25 <3> %if _VARIABLES 26 0000475A 56302E2E5646095573- <3> db "V0..VF",9,"User-specified usage",13,10 26 00004763 65722D737065636966- <3> 26 0000476C 696564207573616765- <3> 26 00004775 0D0A <3> 27 <3> %endif 28 <3> %if _OPTIONS 29 00004777 44434F094465627567- <3> db "DCO",9,"Debugger Common Options",13,10 29 00004780 67657220436F6D6D6F- <3> 29 00004789 6E204F7074696F6E73- <3> 29 00004792 0D0A <3> 30 00004794 44414F094465627567- <3> db "DAO",9,"Debugger Assembler/disassembler Options",13,10 30 0000479D 67657220417373656D- <3> 30 000047A6 626C65722F64697361- <3> 30 000047AF 7373656D626C657220- <3> 30 000047B8 4F7074696F6E730D0A <3> 31 <3> %endif 32 <3> %if _OPTIONS || _PSPVARIABLES && (_OPTIONS || _VARIABLES) 33 000047C1 2054686520666F6C6C- <3> db " The following variables cannot be written:",13,10 33 000047CA 6F77696E6720766172- <3> 33 000047D3 6961626C6573206361- <3> 33 000047DC 6E6E6F742062652077- <3> 33 000047E5 72697474656E3A0D0A <3> 34 <3> %endif 35 <3> %if _PSPVARIABLES 36 000047EE 505350094465627567- <3> db "PSP",9,"Debuggee Process" 36 000047F7 6765652050726F6365- <3> 36 00004800 7373 <3> 37 <3> %if _PM 38 <3> db " (as real mode segment)" 39 <3> %endif 40 00004802 0D0A <3> db 13,10 41 00004804 505052094465627567- <3> db "PPR",9,"Debuggee's Parent Process",13,10 41 0000480D 676565277320506172- <3> 41 00004816 656E742050726F6365- <3> 41 0000481F 73730D0A <3> 42 00004823 505049094465627567- <3> db "PPI",9,"Debuggee's Parent Process Interrupt 22h",13,10 42 0000482C 676565277320506172- <3> 42 00004835 656E742050726F6365- <3> 42 0000483E 737320496E74657272- <3> 42 00004847 757074203232680D0A <3> 43 <3> %endif 44 <3> %if _OPTIONS 45 00004850 444946094465627567- <3> db "DIF",9,"Debugger Internal Flags",13,10 45 00004859 67657220496E746572- <3> 45 00004862 6E616C20466C616773- <3> 45 0000486B 0D0A <3> 46 0000486D 444353094465627567- <3> db "DCS",9,"Debugger Common Startup options",13,10 46 00004876 67657220436F6D6D6F- <3> 46 0000487F 6E2053746172747570- <3> 46 00004888 206F7074696F6E730D- <3> 46 00004891 0A <3> 47 00004892 444153094465627567- <3> db "DAS",9,"Debugger Assembler/disassembler Startup options",13,10 47 0000489B 67657220417373656D- <3> 47 000048A4 626C65722F64697361- <3> 47 000048AD 7373656D626C657220- <3> 47 000048B6 53746172747570206F- <3> 47 000048BF 7074696F6E730D0A <3> 48 000048C7 445052094465627567- <3> db "DPR",9,"Debugger Process" 48 000048D0 6765722050726F6365- <3> 48 000048D9 7373 <3> 49 <3> %if _PM 50 <3> db " (as Real mode segment)",13,10 51 <3> db "DPS",9,"Debugger Process Selector (zero in real mode)" 52 <3> %endif 53 000048DB 0D0A <3> db 13,10 54 000048DD 445050094465627567- <3> db "DPP",9,"Debugger's Parent Process" 54 000048E6 676572277320506172- <3> 54 000048EF 656E742050726F6365- <3> 54 000048F8 7373 <3> 55 <3> %if _TSR 56 000048FA 20287A65726F20696E- <3> db " (zero in TSR mode)" 56 00004903 20545352206D6F6465- <3> 56 0000490C 29 <3> 57 <3> %endif 58 0000490D 0D0A <3> db 13,10 59 0000490F 445049094465627567- <3> db "DPI",9,"Debugger's Parent process Interrupt 22h" 59 00004918 676572277320506172- <3> 59 00004921 656E742070726F6365- <3> 59 0000492A 737320496E74657272- <3> 59 00004933 75707420323268 <3> 60 <3> %if _TSR 61 0000493A 20287A65726F20696E- <3> db " (zero in TSR mode)" 61 00004943 20545352206D6F6465- <3> 61 0000494C 29 <3> 62 <3> %endif 63 0000494D 0D0A <3> db 13,10 64 0000494F 0D0A <3> db 13,10 65 00004951 456E746572203F4F20- <3> db "Enter ?O to display the options and internal flags.",13,10 65 0000495A 746F20646973706C61- <3> 65 00004963 7920746865206F7074- <3> 65 0000496C 696F6E7320616E6420- <3> 65 00004975 696E7465726E616C20- <3> 65 0000497E 666C6167732E0D0A <3> 66 <3> %endif 57 <2> %ifn %2 58 00004986 00 <2> asciz 59 <2> %endif 282 <1> %endif 283 <1> %endif 284 <1> 285 <1> usesection lDEBUG_DATA_ENTRY 286 0000121A 54686973206C446562- <1> .readonly: asciz "This lDebug variable cannot be written to. See ?V.",13,10 286 00001223 756720766172696162- <1> 286 0000122C 6C652063616E6E6F74- <1> 286 00001235 206265207772697474- <1> 286 0000123E 656E20746F2E205365- <1> 286 00001247 65203F562E0D0A00 <1> 287 0000124F 54686973206D656D6F- <1> .readonly_mem: asciz "This memory variable cannot be written to.",13,10 287 00001258 727920766172696162- <1> 287 00001261 6C652063616E6E6F74- <1> 287 0000126A 206265207772697474- <1> 287 00001273 656E20746F2E0D0A00 <1> 288 <1> %if _MMXSUPP 289 <1> .internal_error_no_mmx: 290 0000127C 496E7465726E616C20- <1> asciz "Internal error, MMX variables not supported.",13,10 290 00001285 6572726F722C204D4D- <1> 290 0000128E 58207661726961626C- <1> 290 00001297 6573206E6F74207375- <1> 290 000012A0 70706F727465642E0D- <1> 290 000012A9 0A00 <1> 291 <1> %endif 292 <1> %if _PM 293 <1> .readonly_verifysegm: 294 <1> db "Memory using selector " 295 <1> .readonly_verifysegm.selector: 296 <1> asciz "---- is inaccessible for writing.",13,10 297 <1> %endif 298 000012AB 5B6D6F72655D <1> .more: db "[more]" 299 <1> .more_size equ $-.more 300 000012B1 0D <1> .more_over: db 13 301 000012B2 20 <1> times .more_size db 32 302 000012B8 0D <1> db 13 ; to overwrite previous prompt 303 <1> .more_over_size equ $-.more_over 304 000012B9 5E430D0A <1> .ctrlc: db "^C",13,10 305 <1> .ctrlc_size equ $-.ctrlc 306 000012BD 00 <1> asciz 307 <1> .freedos_ctrlc_workaround: 308 000012BE 20284F6C6420467265- <1> asciz " (Old FreeDOS kernel Ctrl-C work around happened)",13,10 308 000012C7 65444F53206B65726E- <1> 308 000012D0 656C204374726C2D43- <1> 308 000012D9 20776F726B2061726F- <1> 308 000012E2 756E64206861707065- <1> 308 000012EB 6E6564290D0A00 <1> 309 <1> .not_while_indos: 310 000012F2 436F6D6D616E64206E- <1> asciz "Command not supported while in InDOS mode.",13,10 310 000012FB 6F7420737570706F72- <1> 310 00001304 746564207768696C65- <1> 310 0000130D 20696E20496E444F53- <1> 310 00001316 206D6F64652E0D0A00 <1> 311 0000131F 43757272656E74206D- <1> .rv_mode.before: asciz "Current mode: " 311 00001328 6F64653A2000 <1> 312 <1> %if _PM 313 <1> .rv_mode_dpmi_16: asciz "DPMI 16-bit CS",13,10 314 <1> .rv_mode_dpmi_32: asciz "DPMI 32-bit CS",13,10 315 <1> %endif 316 0000132E 5265616C203836204D- <1> .rv_mode_r86m: asciz "Real 86 Mode",13,10 316 00001337 6F64650D0A00 <1> 317 0000133D 5669727475616C2038- <1> .rv_mode_v86m: asciz "Virtual 86 Mode",13,10 317 00001346 36204D6F64650D0A00 <1> 318 <1> 319 0000134F 333836207265676973- <1> .regs386: asciz "386 registers are " 319 00001358 746572732061726520- <1> 319 00001361 00 <1> 320 00001362 6E6F7420 <1> .regs386_off:db "not " 321 00001366 646973706C61796564- <1> .regs386_on: asciz "displayed",13,10 321 0000136F 0D0A00 <1> 322 <1> 323 <1> %if _EMS 324 <1> usemessagesegment 325 <1> .xhelp: helppage ems 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 00004987 457870616E64656420- <3> db "Expanded memory (EMS) commands:",13,10 20 00004990 6D656D6F7279202845- <3> 20 00004999 4D532920636F6D6D61- <3> 20 000049A2 6E64733A0D0A <3> 21 000049A8 2020416C6C6F636174- <3> db " Allocate",9, "XA count",13,10 21 000049B1 6509584120636F756E- <3> 21 000049BA 740D0A <3> 22 000049BD 20204465616C6C6F63- <3> db " Deallocate",9, "XD handle",13,10 22 000049C6 617465095844206861- <3> 22 000049CF 6E646C650D0A <3> 23 000049D5 20204D6170206D656D- <3> db " Map memory",9, "XM logical-page physical-page handle",13,10 23 000049DE 6F727909584D206C6F- <3> 23 000049E7 676963616C2D706167- <3> 23 000049F0 652070687973696361- <3> 23 000049F9 6C2D70616765206861- <3> 23 00004A02 6E646C650D0A <3> 24 00004A08 20205265616C6C6F63- <3> db " Reallocate",9, "XR handle count",13,10 24 00004A11 617465095852206861- <3> 24 00004A1A 6E646C6520636F756E- <3> 24 00004A23 740D0A <3> 25 00004A26 202053686F77207374- <3> db " Show status",9, "XS",13,10 25 00004A2F 617475730958530D0A <3> 57 <2> %ifn %2 58 00004A38 00 <2> asciz 59 <2> %endif 326 <1> %endif 327 <1> 328 <1> %if _PM 329 <1> usesection lDEBUG_DATA_ENTRY 330 <1> .desc: asciz "DESC" 331 <1> usemessagesegment 332 <1> .deschelp: helppage desc 333 <1> %endif 334 <1> 335 <1> %if !_BOOTLDR_DISCARD_HELP && _MESSAGESEGMENT 336 <1> messagesegment_truncated_size equ messagesegment_size 337 <1> endarea messagesegment_truncated, 1 338 <1> %endif 339 <1> %if _EXTHELP 340 <1> %if _BOOTLDR 341 <1> usemessagesegment 342 <1> %if _BOOTLDR_DISCARD_HELP 343 00004A39 00 <1> align 2, db 0 344 <1> messagesegment_truncated_size equ fromparas(paras($ - messagesegment_start + fromwords(imsg.boothelp_replacement_size_w))) 345 <1> endarea messagesegment_truncated, 1 346 <1> %endif 347 <1> .boothelp: helppage boot 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 00004A3A 426F6F74206C6F6164- <3> db "Boot loading commands:",13,10 20 00004A43 696E6720636F6D6D61- <3> 20 00004A4C 6E64733A0D0A <3> 21 00004A52 424F4F54204C495354- <3> db "BOOT LIST HDA",13,10 21 00004A5B 204844410D0A <3> 22 00004A61 424F4F542044495220- <3> db "BOOT DIR [partition] [dirname]",13,10 22 00004A6A 5B706172746974696F- <3> 22 00004A73 6E5D205B6469726E61- <3> 22 00004A7C 6D655D0D0A <3> 23 00004A81 424F4F542052454144- <3> db "BOOT READ|WRITE [partition] segment [[HIDDEN=sector] sector] [count]",13,10 23 00004A8A 7C5752495445205B70- <3> 23 00004A93 6172746974696F6E5D- <3> 23 00004A9C 207365676D656E7420- <3> 23 00004AA5 5B5B48494444454E3D- <3> 23 00004AAE 736563746F725D2073- <3> 23 00004AB7 6563746F725D205B63- <3> 23 00004AC0 6F756E745D0D0A <3> 24 <3> %if _DOSEMU 25 00004AC7 424F4F542051554954- <3> db "BOOT QUIT",9,"[exits dosemu or shuts down using APM]",13,10 25 00004AD0 095B65786974732064- <3> 25 00004AD9 6F73656D75206F7220- <3> 25 00004AE2 736875747320646F77- <3> 25 00004AEB 6E207573696E672041- <3> 25 00004AF4 504D5D0D0A <3> 26 <3> %else 27 <3> db "BOOT QUIT",9,"[shuts down using APM]",13,10 28 <3> %endif 29 00004AF9 424F4F54205B50524F- <3> db "BOOT [PROTOCOL=SECTOR] partition",13,10 29 00004B02 544F434F4C3D534543- <3> 29 00004B0B 544F525D2070617274- <3> 29 00004B14 6974696F6E0D0A <3> 30 00004B1B 424F4F542050524F54- <3> db "BOOT PROTOCOL=proto [opt] [partition] [filename1] [filename2] [cmdline]",13,10 30 00004B24 4F434F4C3D70726F74- <3> 30 00004B2D 6F205B6F70745D205B- <3> 30 00004B36 706172746974696F6E- <3> 30 00004B3F 5D205B66696C656E61- <3> 30 00004B48 6D65315D205B66696C- <3> 30 00004B51 656E616D65325D205B- <3> 30 00004B5A 636D646C696E655D0D- <3> 30 00004B63 0A <3> 31 00004B64 0974686520666F6C6C- <3> db 9,"the following partitions may be specified:",13,10 31 00004B6D 6F77696E6720706172- <3> 31 00004B76 746974696F6E73206D- <3> 31 00004B7F 617920626520737065- <3> 31 00004B88 6369666965643A0D0A <3> 32 00004B91 09204844416E756D09- <3> db 9," HDAnum",9,"first hard disk, num = partition (1-4 primary, 5+ logical)",13,10 32 00004B9A 666972737420686172- <3> 32 00004BA3 64206469736B2C206E- <3> 32 00004BAC 756D203D2070617274- <3> 32 00004BB5 6974696F6E2028312D- <3> 32 00004BBE 34207072696D617279- <3> 32 00004BC7 2C20352B206C6F6769- <3> 32 00004BD0 63616C290D0A <3> 33 00004BD6 09204844426E756D09- <3> db 9," HDBnum",9,"second hard disk (etc), num = partition",13,10 33 00004BDF 7365636F6E64206861- <3> 33 00004BE8 7264206469736B2028- <3> 33 00004BF1 657463292C206E756D- <3> 33 00004BFA 203D20706172746974- <3> 33 00004C03 696F6E0D0A <3> 34 00004C08 092048444109666972- <3> db 9," HDA",9,"first hard disk (only valid for READ|WRITE|PROTOCOL=SECTOR)",13,10 34 00004C11 737420686172642064- <3> 34 00004C1A 69736B20286F6E6C79- <3> 34 00004C23 2076616C696420666F- <3> 34 00004C2C 7220524541447C5752- <3> 34 00004C35 4954457C50524F544F- <3> 34 00004C3E 434F4C3D534543544F- <3> 34 00004C47 52290D0A <3> 35 00004C4B 092046444109666972- <3> db 9," FDA",9,"first floppy disk",13,10 35 00004C54 737420666C6F707079- <3> 35 00004C5D 206469736B0D0A <3> 36 00004C64 092046444209736563- <3> db 9," FDB",9,"second floppy disk (etc)",13,10 36 00004C6D 6F6E6420666C6F7070- <3> 36 00004C76 79206469736B202865- <3> 36 00004C7F 7463290D0A <3> 37 00004C84 09204C445009706172- <3> db 9," LDP",9,"partition the debugger loaded from",13,10 37 00004C8D 746974696F6E207468- <3> 37 00004C96 652064656275676765- <3> 37 00004C9F 72206C6F6164656420- <3> 37 00004CA8 66726F6D0D0A <3> 38 00004CAE 092059445009706172- <3> db 9," YDP",9,"partition the most recent Y command loaded from",13,10 38 00004CB7 746974696F6E207468- <3> 38 00004CC0 65206D6F7374207265- <3> 38 00004CC9 63656E74205920636F- <3> 38 00004CD2 6D6D616E64206C6F61- <3> 38 00004CDB 6465642066726F6D0D- <3> 38 00004CE4 0A <3> 39 00004CE5 0920534450096C6173- <3> db 9," SDP",9,"last used partition (default if no partition specified)",13,10 39 00004CEE 742075736564207061- <3> 39 00004CF7 72746974696F6E2028- <3> 39 00004D00 64656661756C742069- <3> 39 00004D09 66206E6F2070617274- <3> 39 00004D12 6974696F6E20737065- <3> 39 00004D1B 636966696564290D0A <3> 40 00004D24 0966696C656E616D65- <3> db 9,"filename2 may be double-slash // for none",13,10 40 00004D2D 32206D617920626520- <3> 40 00004D36 646F75626C652D736C- <3> 40 00004D3F 617368202F2F20666F- <3> 40 00004D48 72206E6F6E650D0A <3> 41 00004D50 09636D646C696E6520- <3> db 9,"cmdline is only valid for lDOS, RxDOS.2, RxDOS.3 protocols",13,10 41 00004D59 6973206F6E6C792076- <3> 41 00004D62 616C696420666F7220- <3> 41 00004D6B 6C444F532C20527844- <3> 41 00004D74 4F532E322C20527844- <3> 41 00004D7D 4F532E332070726F74- <3> 41 00004D86 6F636F6C730D0A <3> 42 00004D8D 0966696C6573272064- <3> db 9,"files' directory entries are loaded to 500h and 520h",13,10 42 00004D96 69726563746F727920- <3> 42 00004D9F 656E74726965732061- <3> 42 00004DA8 7265206C6F61646564- <3> 42 00004DB1 20746F203530306820- <3> 42 00004DBA 616E6420353230680D- <3> 42 00004DC3 0A <3> 43 00004DC4 0D0A <3> db 13,10 44 00004DC6 417661696C61626C65- <3> db "Available protocols: (default filenames, load segment, then entrypoint)",13,10 44 00004DCF 2070726F746F636F6C- <3> 44 00004DD8 733A20286465666175- <3> 44 00004DE1 6C742066696C656E61- <3> 44 00004DEA 6D65732C206C6F6164- <3> 44 00004DF3 207365676D656E742C- <3> 44 00004DFC 207468656E20656E74- <3> 44 00004E05 7279706F696E74290D- <3> 44 00004E0E 0A <3> 45 00004E0F 204C444F5309094C44- <3> db " LDOS",9,9, "LDOS.COM or L[D]DEBUG.COM at 200h, 0:400h",13,10 45 00004E18 4F532E434F4D206F72- <3> 45 00004E21 204C5B445D44454255- <3> 45 00004E2A 472E434F4D20617420- <3> 45 00004E33 323030682C20303A34- <3> 45 00004E3C 3030680D0A <3> 46 00004E41 2046524545444F5309- <3> db " FREEDOS",9,"KERNEL.SYS or METAKERN.SYS at 60h, 0:0",13,10 46 00004E4A 4B45524E454C2E5359- <3> 46 00004E53 53206F72204D455441- <3> 46 00004E5C 4B45524E2E53595320- <3> 46 00004E65 6174203630682C2030- <3> 46 00004E6E 3A300D0A <3> 47 00004E72 20444F534309094950- <3> db " DOSC",9,9, "IPL.SYS at 2000h, 0:0",13,10 47 00004E7B 4C2E53595320617420- <3> 47 00004E84 32303030682C20303A- <3> 47 00004E8D 300D0A <3> 48 00004E90 20454452444F530909- <3> db " EDRDOS",9,9,"DRBIO.SYS at 70h, 0:0",13,10 48 00004E99 445242494F2E535953- <3> 48 00004EA2 206174203730682C20- <3> 48 00004EAB 303A300D0A <3> 49 00004EB0 204D53444F53360909- <3> db " MSDOS6",9,9, "IO.SYS + MSDOS.SYS at 70h, 0:0",13,10 49 00004EB9 494F2E535953202B20- <3> 49 00004EC2 4D53444F532E535953- <3> 49 00004ECB 206174203730682C20- <3> 49 00004ED4 303A300D0A <3> 50 00004ED9 204D53444F53370909- <3> db " MSDOS7",9,9, "IO.SYS at 70h, 0:200h",13,10 50 00004EE2 494F2E535953206174- <3> 50 00004EEB 203730682C20303A32- <3> 50 00004EF4 3030680D0A <3> 51 00004EF9 2049424D444F530909- <3> db " IBMDOS",9,9, "IBMBIO.COM + IBMDOS.COM at 70h, 0:0",13,10 51 00004F02 49424D42494F2E434F- <3> 51 00004F0B 4D202B2049424D444F- <3> 51 00004F14 532E434F4D20617420- <3> 51 00004F1D 3730682C20303A300D- <3> 51 00004F26 0A <3> 52 00004F27 204E544C445209094E- <3> db " NTLDR",9,9, "NTLDR at 2000h, 0:0",13,10 52 00004F30 544C44522061742032- <3> 52 00004F39 303030682C20303A30- <3> 52 00004F42 0D0A <3> 53 00004F44 20424F4F544D475209- <3> db " BOOTMGR",9, "BOOTMGR at 2000h, 0:0",13,10 53 00004F4D 424F4F544D47522061- <3> 53 00004F56 742032303030682C20- <3> 53 00004F5F 303A300D0A <3> 54 00004F64 205258444F532E3009- <3> db " RXDOS.0",9,"RXDOSBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 54 00004F6D 5258444F5342494F2E- <3> 54 00004F76 535953202B20525844- <3> 54 00004F7F 4F532E535953206174- <3> 54 00004F88 203730682C20303A30- <3> 54 00004F91 0D0A <3> 55 00004F93 205258444F532E3109- <3> db " RXDOS.1",9,"RXBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 55 00004F9C 525842494F2E535953- <3> 55 00004FA5 202B205258444F532E- <3> 55 00004FAE 535953206174203730- <3> 55 00004FB7 682C20303A300D0A <3> 56 00004FBF 205258444F532E3209- <3> db " RXDOS.2",9,"RXDOS.COM at 70h, 0:400h",13,10 56 00004FC8 5258444F532E434F4D- <3> 56 00004FD1 206174203730682C20- <3> 56 00004FDA 303A343030680D0A <3> 57 00004FE2 205258444F532E3309- <3> db " RXDOS.3",9,"RXDOS.COM at 200h, 0:400h",13,10 57 00004FEB 5258444F532E434F4D- <3> 57 00004FF4 20617420323030682C- <3> 57 00004FFD 20303A343030680D0A <3> 58 00005006 20434841494E090942- <3> db " CHAIN",9,9,"BOOTSECT.DOS at 7C0h, -7C0h:7C00h",13,10 58 0000500F 4F4F54534543542E44- <3> 58 00005018 4F5320617420374330- <3> 58 00005021 682C202D374330683A- <3> 58 0000502A 37433030680D0A <3> 59 00005031 20534543544F520909- <3> db " SECTOR",9,9,"(default) load partition boot sector or MBR",13,10 59 0000503A 2864656661756C7429- <3> 59 00005043 206C6F616420706172- <3> 59 0000504C 746974696F6E20626F- <3> 59 00005055 6F7420736563746F72- <3> 59 0000505E 206F72204D42520D0A <3> 60 00005067 20534543544F52414C- <3> db " SECTORALT",9,"as SECTOR, but entry at 07C0h:0",13,10 60 00005070 540961732053454354- <3> 60 00005079 4F522C206275742065- <3> 60 00005082 6E7472792061742030- <3> 60 0000508B 374330683A300D0A <3> 61 00005093 0D0A <3> db 13,10 62 00005095 417661696C61626C65- <3> db "Available options:",13,10 62 0000509E 206F7074696F6E733A- <3> 62 000050A7 0D0A <3> 63 000050A9 204D494E504152413D- <3> db " MINPARA=num",9,9, "load at least that many paragraphs",13,10 63 000050B2 6E756D09096C6F6164- <3> 63 000050BB 206174206C65617374- <3> 63 000050C4 2074686174206D616E- <3> 63 000050CD 792070617261677261- <3> 63 000050D6 7068730D0A <3> 64 000050DB 204D4158504152413D- <3> db " MAXPARA=num",9,9, "load at most that many paragraphs (0 = as many as fit)",13,10 64 000050E4 6E756D09096C6F6164- <3> 64 000050ED 206174206D6F737420- <3> 64 000050F6 74686174206D616E79- <3> 64 000050FF 207061726167726170- <3> 64 00005108 6873202830203D2061- <3> 64 00005111 73206D616E79206173- <3> 64 0000511A 20666974290D0A <3> 65 00005121 205345474D454E543D- <3> db " SEGMENT=num",9,9, "change segment at that the kernel loads",13,10 65 0000512A 6E756D09096368616E- <3> 65 00005133 6765207365676D656E- <3> 65 0000513C 742061742074686174- <3> 65 00005145 20746865206B65726E- <3> 65 0000514E 656C206C6F6164730D- <3> 65 00005157 0A <3> 66 00005158 20454E5452593D5B6E- <3> db " ENTRY=[num:]num",9,"change entrypoint (CS (relative) : IP)",13,10 66 00005161 756D3A5D6E756D0963- <3> 66 0000516A 68616E676520656E74- <3> 66 00005173 7279706F696E742028- <3> 66 0000517C 4353202872656C6174- <3> 66 00005185 69766529203A204950- <3> 66 0000518E 290D0A <3> 67 00005191 204250423D5B6E756D- <3> db " BPB=[num:]num",9,9, "change BPB load address (segment -1 = auto-BPB)",13,10 67 0000519A 3A5D6E756D09096368- <3> 67 000051A3 616E67652042504220- <3> 67 000051AC 6C6F61642061646472- <3> 67 000051B5 65737320287365676D- <3> 67 000051BE 656E74202D31203D20- <3> 67 000051C7 6175746F2D42504229- <3> 67 000051D0 0D0A <3> 69 000051D2 20434845434B4F4646- <3> db " CHECKOFFSET=num",9,"set address of word to check, must be even",13,10 69 000051DB 5345543D6E756D0973- <3> 69 000051E4 657420616464726573- <3> 69 000051ED 73206F6620776F7264- <3> 69 000051F6 20746F20636865636B- <3> 69 000051FF 2C206D757374206265- <3> 69 00005208 206576656E0D0A <3> 70 0000520F 20434845434B56414C- <3> db " CHECKVALUE=num",9,9,"set value of word to check (0 = no check)",13,10 70 00005218 55453D6E756D090973- <3> 70 00005221 65742076616C756520- <3> 70 0000522A 6F6620776F72642074- <3> 70 00005233 6F20636865636B2028- <3> 70 0000523C 30203D206E6F206368- <3> 70 00005245 65636B290D0A <3> 71 0000524B 426F6F6C65616E206F- <3> db "Boolean options: [opt=bool]",13,10 71 00005254 7074696F6E733A205B- <3> 71 0000525D 6F70743D626F6F6C5D- <3> 71 00005266 0D0A <3> 72 00005268 205345545F444C5F55- <3> db " SET_DL_UNIT",9,9,"set dl to load unit",13,10 72 00005271 4E4954090973657420- <3> 72 0000527A 646C20746F206C6F61- <3> 72 00005283 6420756E69740D0A <3> 73 0000528B 205345545F424C5F55- <3> db " SET_BL_UNIT",9,9,"set bl to load unit",13,10 73 00005294 4E4954090973657420- <3> 73 0000529D 626C20746F206C6F61- <3> 73 000052A6 6420756E69740D0A <3> 74 000052AE 205345545F53494449- <3> db " SET_SIDI_CLUSTER",9,"set si:di to first cluster",13,10 74 000052B7 5F434C555354455209- <3> 74 000052C0 7365742073693A6469- <3> 74 000052C9 20746F206669727374- <3> 74 000052D2 20636C75737465720D- <3> 74 000052DB 0A <3> 75 000052DC 205345545F44535349- <3> db " SET_DSSI_DPT",9,9,"set ds:si to DPT address",13,10 75 000052E5 5F4450540909736574- <3> 75 000052EE 2064733A736920746F- <3> 75 000052F7 204450542061646472- <3> 75 00005300 6573730D0A <3> 76 00005305 20505553485F445054- <3> db " PUSH_DPT",9,9,"push DPT address and DPT entry address",13,10 76 0000530E 090970757368204450- <3> 76 00005317 542061646472657373- <3> 76 00005320 20616E642044505420- <3> 76 00005329 656E74727920616464- <3> 76 00005332 726573730D0A <3> 77 00005338 204441544153544152- <3> db " DATASTART_HIDDEN",9,"add hidden sectors to datastart var",13,10 77 00005341 545F48494444454E09- <3> 77 0000534A 616464206869646465- <3> 77 00005353 6E20736563746F7273- <3> 77 0000535C 20746F206461746173- <3> 77 00005365 74617274207661720D- <3> 77 0000536E 0A <3> 78 0000536F 205345545F41584258- <3> db " SET_AXBX_DATASTART",9,"set ax:bx to datastart var",13,10 78 00005378 5F4441544153544152- <3> 78 00005381 54097365742061783A- <3> 78 0000538A 627820746F20646174- <3> 78 00005393 617374617274207661- <3> 78 0000539C 720D0A <3> 79 0000539F 205345545F44534250- <3> db " SET_DSBP_BPB",9,9,"set ds:bp to BPB address",13,10 79 000053A8 5F4250420909736574- <3> 79 000053B1 2064733A627020746F- <3> 79 000053BA 204250422061646472- <3> 79 000053C3 6573730D0A <3> 80 000053C8 204C42415F5345545F- <3> db " LBA_SET_TYPE",9,9,"set LBA partition type in BPB",13,10 80 000053D1 545950450909736574- <3> 80 000053DA 204C42412070617274- <3> 80 000053E3 6974696F6E20747970- <3> 80 000053EC 6520696E204250420D- <3> 80 000053F5 0A <3> 81 000053F6 204D4553534147455F- <3> db " MESSAGE_TABLE",9,9, "provide message table pointed to at 1EEh",13,10 81 000053FF 5441424C4509097072- <3> 81 00005408 6F76696465206D6573- <3> 81 00005411 73616765207461626C- <3> 81 0000541A 6520706F696E746564- <3> 81 00005423 20746F206174203145- <3> 81 0000542C 45680D0A <3> 83 00005430 205345545F41584258- <3> db " SET_AXBX_ROOT_HIDDEN",9, "set ax:bx to root start with hidden sectors",13,10 83 00005439 5F524F4F545F484944- <3> 83 00005442 44454E097365742061- <3> 83 0000544B 783A627820746F2072- <3> 83 00005454 6F6F74207374617274- <3> 83 0000545D 207769746820686964- <3> 83 00005466 64656E20736563746F- <3> 83 0000546F 72730D0A <3> 85 00005473 204E4F5F4250420909- <3> db " NO_BPB",9,9,9, "do not load BPB",13,10 85 0000547C 09646F206E6F74206C- <3> 85 00005485 6F6164204250420D0A <3> 86 0000548E 205345545F44535349- <3> db " SET_DSSI_PARTINFO",9, "load part table to 600h, point ds:si + ds:bp to it",13,10 86 00005497 5F50415254494E464F- <3> 86 000054A0 096C6F616420706172- <3> 86 000054A9 74207461626C652074- <3> 86 000054B2 6F20363030682C2070- <3> 86 000054BB 6F696E742064733A73- <3> 86 000054C4 69202B2064733A6270- <3> 86 000054CD 20746F2069740D0A <3> 87 000054D5 20434D444C494E4509- <3> db " CMDLINE",9,9, "pass a kernel command line (recent FreeDOS extension)",13,10 87 000054DE 09706173732061206B- <3> 87 000054E7 65726E656C20636F6D- <3> 87 000054F0 6D616E64206C696E65- <3> 87 000054F9 2028726563656E7420- <3> 87 00005502 46726565444F532065- <3> 87 0000550B 7874656E73696F6E29- <3> 87 00005514 0D0A <3> 57 <2> %ifn %2 58 00005516 00 <2> asciz 59 <2> %endif 348 <1> %endif 349 <1> %endif 350 <1> 351 <1> usesection lDEBUG_DATA_ENTRY 352 <1> %if _MCB 353 00001372 456E64206F66206368- <1> .invmcbadr: asciz "End of chain: invalid MCB address.",13,10 353 0000137B 61696E3A20696E7661- <1> 353 00001384 6C6964204D43422061- <1> 353 0000138D 6464726573732E0D0A- <1> 353 00001396 00 <1> 354 <1> %endif 355 <1> 356 <1> %if _TSR 357 00001397 43616E6E6F7420676F- <1> .pspnotfound: asciz "Cannot go resident, child PSP not found.",13,10 357 000013A0 207265736964656E74- <1> 357 000013A9 2C206368696C642050- <1> 357 000013B2 5350206E6F7420666F- <1> 357 000013BB 756E642E0D0A00 <1> 358 000013C2 43616E6E6F7420676F- <1> .psphooked: asciz "Cannot go resident, child PSP parent return address hooked.",13,10 358 000013CB 207265736964656E74- <1> 358 000013D4 2C206368696C642050- <1> 358 000013DD 535020706172656E74- <1> 358 000013E6 2072657475726E2061- <1> 358 000013EF 64647265737320686F- <1> 358 000013F8 6F6B65642E0D0A00 <1> 359 00001400 506174636865642050- <1> .nowtsr1: asciz "Patched PSP at " 359 00001409 53502061742000 <1> 360 00001410 2C206E6F7720726573- <1> .nowtsr2: asciz ", now resident.",13,10 360 00001419 6964656E742E0D0A00 <1> 361 00001422 416C72656164792072- <1> .alreadytsr: asciz "Already resident.",13,10 361 0000142B 65736964656E742E0D- <1> 361 00001434 0A00 <1> 362 <1> %endif 363 <1> %if _ATTACH 364 00001436 4E6F74207965742072- <1> .notyettsr: asciz "Not yet resident. Cannot attach.",13,10 364 0000143F 65736964656E742E20- <1> 364 00001448 43616E6E6F74206174- <1> 364 00001451 746163682E0D0A00 <1> 365 00001459 496E76616C69642050- <1> .invalidpsp: asciz "Invalid PSP specified. Cannot attach.",13,10 365 00001462 535020737065636966- <1> 365 0000146B 6965642E2043616E6E- <1> 365 00001474 6F7420617474616368- <1> 365 0000147D 2E0D0A00 <1> 366 00001481 53656C662D6F776E65- <1> .selfownedpsp: asciz "Self-owned PSP specified. Cannot attach.",13,10 366 0000148A 642050535020737065- <1> 366 00001493 6369666965642E2043- <1> 366 0000149C 616E6E6F7420617474- <1> 366 000014A5 6163682E0D0A00 <1> 367 000014AC 506174636865642050- <1> .nowattached: asciz "Patched PSP, now attached.",13,10 367 000014B5 53502C206E6F772061- <1> 367 000014BE 747461636865642E0D- <1> 367 000014C7 0A00 <1> 368 000014C9 41545441434800 <1> .attach: asciz "ATTACH" 369 <1> %endif 370 <1> %if _PM && (_TSR || _BOOTLDR) 371 <1> .cannotpmquit: asciz "Cannot quit, still in protected mode.",13,10 372 <1> %endif 373 <1> %if _PM 374 <1> .cannotpmload: asciz "Process loading aborted: Still in protected mode.",13,10 375 <1> %endif 376 <1> %if _BOOTLDR 377 000014D0 436F6D6D616E64206E- <1> .nobootsupp: asciz "Command not supported in boot loaded mode.",13,10 377 000014D9 6F7420737570706F72- <1> 377 000014E2 74656420696E20626F- <1> 377 000014EB 6F74206C6F61646564- <1> 377 000014F4 206D6F64652E0D0A00 <1> 378 000014FD 53687574646F776E20- <1> .boot_quit_fail:asciz "Shutdown not supported.",13,10 378 00001506 6E6F7420737570706F- <1> 378 0000150F 727465642E0D0A00 <1> 379 00001517 426F6F74206661696C- <1> .bootfail: asciz "Boot failure: " 379 00001520 7572653A2000 <1> 380 00001526 52656164696E672073- <1> .bootfail_read: db "Reading sector failed (error " 380 0000152F 6563746F7220666169- <1> 380 00001538 6C656420286572726F- <1> 380 00001541 7220 <1> 381 00001543 5F5F68292E0D0A00 <1> .bootfail_read_errorcode: asciz "__h).",13,10 382 0000154B 426F6F742073656374- <1> .bootfail_sig: asciz "Boot sector signature missing (is not AA55h).",13,10 382 00001554 6F72207369676E6174- <1> 382 0000155D 757265206D69737369- <1> 382 00001566 6E6720286973206E6F- <1> 382 0000156F 74204141353568292E- <1> 382 00001578 0D0A00 <1> 383 0000157B 506172746974696F6E- <1> .bootfail_sig_parttable: ascii "Partition table signature missing" 383 00001584 207461626C65207369- <1> 383 0000158D 676E6174757265206D- <1> 383 00001596 697373696E67 <1> 384 0000159C 20286973206E6F7420- <1> asciz " (is not AA55h).",13,10 384 000015A5 4141353568292E0D0A- <1> 384 000015AE 00 <1> 385 000015AF 426F6F742073656374- <1> .bootfail_code: asciz "Boot sector code invalid (is 0000h).",13,10 385 000015B8 6F7220636F64652069- <1> 385 000015C1 6E76616C6964202869- <1> 385 000015CA 73203030303068292E- <1> 385 000015D3 0D0A00 <1> 386 <1> .bootfail_secsizediffer: 387 000015D6 425042204270532064- <1> asciz "BPB BpS differs from actual sector size.",13,10 387 000015DF 696666657273206672- <1> 387 000015E8 6F6D2061637475616C- <1> 387 000015F1 20736563746F722073- <1> 387 000015FA 697A652E0D0A00 <1> 388 <1> .bootfail_stack_underflow: 389 00001601 426F6F742073746163- <1> asciz "Boot stack underflowed.",13,10 389 0000160A 6B20756E646572666C- <1> 389 00001613 6F7765642E0D0A00 <1> 390 <1> .bootfail_check_mismatch: 391 0000161B 436865636B206D6973- <1> db "Check mismatch, expected " 391 00001624 6D617463682C206578- <1> 391 0000162D 70656374656420 <1> 392 <1> .bootfail_check_mismatch.check_value: 393 00001634 5F5F5F5F6820617420- <1> db "____h at offset " 393 0000163D 6F666673657420 <1> 394 <1> .bootfail_check_mismatch.check_offset: 395 00001644 5F5F5F5F6820627574- <1> db "____h but has " 395 0000164D 2068617320 <1> 396 <1> .bootfail_check_mismatch.check_got: 397 00001652 5F5F5F5F682E0D0A00 <1> asciz "____h.",13,10 398 0000165B 4F7574206F66206D65- <1> .boot_out_of_memory_error: asciz "Out of memory.", 13,10 398 00001664 6D6F72792E0D0A00 <1> 399 0000166C 546F6F206D616E7920- <1> .boot_too_many_partitions_error:asciz "Too many partitions (or a loop).",13,10 399 00001675 706172746974696F6E- <1> 399 0000167E 7320286F722061206C- <1> 399 00001687 6F6F70292E0D0A00 <1> 400 0000168F 506172746974696F6E- <1> .boot_partition_cycle_error: asciz "Partition table cycle detected.",13,10 400 00001698 207461626C65206379- <1> 400 000016A1 636C65206465746563- <1> 400 000016AA 7465642E0D0A00 <1> 401 000016B1 506172746974696F6E- <1> .boot_partition_not_found: asciz "Partition not found.",13,10 401 000016BA 206E6F7420666F756E- <1> 401 000016C3 642E0D0A00 <1> 402 000016C8 52656164206572726F- <1> .boot_access_error: asciz "Read error.", 13,10 402 000016D1 722E0D0A00 <1> 403 000016D6 536563746F72207369- <1> .boot_sector_too_large: asciz "Sector size too small (< 32 bytes).", 13,10 403 000016DF 7A6520746F6F20736D- <1> 403 000016E8 616C6C20283C203332- <1> 403 000016F1 206279746573292E0D- <1> 403 000016FA 0A00 <1> 404 000016FC 536563746F72207369- <1> .boot_sector_too_small: asciz "Sector size too large (> 8192 bytes).", 13,10 404 00001705 7A6520746F6F206C61- <1> 404 0000170E 72676520283E203831- <1> 404 00001717 393220627974657329- <1> 404 00001720 2E0D0A00 <1> 405 00001724 536563746F72207369- <1> .boot_sector_not_power: asciz "Sector size not a power of two.", 13,10 405 0000172D 7A65206E6F74206120- <1> 405 00001736 706F776572206F6620- <1> 405 0000173F 74776F2E0D0A00 <1> 406 00001746 496E76616C69642067- <1> .boot_invalid_sectors: asciz "Invalid geometry sectors.", 13,10 406 0000174F 656F6D657472792073- <1> 406 00001758 6563746F72732E0D0A- <1> 406 00001761 00 <1> 407 00001762 496E76616C69642067- <1> .boot_invalid_heads: asciz "Invalid geometry heads.", 13,10 407 0000176B 656F6D657472792068- <1> 407 00001774 656164732E0D0A00 <1> 408 0000177C 46696C65206E6F7420- <1> .boot_file_not_found: asciz "File not found.",13,10 408 00001785 666F756E642E0D0A00 <1> 409 0000178E 46696C6520746F6F20- <1> .boot_file_too_big_error: asciz "File too big.",13,10 409 00001797 6269672E0D0A00 <1> 410 0000179E 46696C6520746F6F20- <1> .boot_file_too_small_error: asciz "File too small.",13,10 410 000017A7 736D616C6C2E0D0A00 <1> 411 000017B0 42616420616D6F756E- <1> .boot_badclusters: asciz "Bad amount of clusters.",13,10 411 000017B9 74206F6620636C7573- <1> 411 000017C2 746572732E0D0A00 <1> 412 000017CA 42616420636C757374- <1> .boot_badchain: asciz "Bad cluster chain.",13,10 412 000017D3 657220636861696E2E- <1> 412 000017DC 0D0A00 <1> 413 000017DF 4261642046696C6520- <1> .boot_badfat: asciz "Bad File Allocation Table.",13,10 413 000017E8 416C6C6F636174696F- <1> 413 000017F1 6E205461626C652E0D- <1> 413 000017FA 0A00 <1> 414 000017FC 496E76616C69642066- <1> .boot_invalid_filename: asciz "Invalid filename.",13,10 414 00001805 696C656E616D652E0D- <1> 414 0000180E 0A00 <1> 415 00001810 43616E6E6F74207365- <1> .boot_cannot_set_both: asciz "Cannot set both " 415 00001819 7420626F74682000 <1> 416 00001821 20616E642000 <1> .boot_and: asciz " and " 417 00001827 2E0D0A00 <1> .boot_dot_crlf: asciz ".",13,10 418 0000182B 2120496E7465726E61- <1> .boot_internal_error: asciz "! Internal error !",13,10 418 00001834 6C206572726F722021- <1> 418 0000183D 0D0A00 <1> 419 00001840 42504220616E64206C- <1> .boot_bpb_load_overlap: asciz "BPB and load area overlap.",13,10 419 00001849 6F6164206172656120- <1> 419 00001852 6F7665726C61702E0D- <1> 419 0000185B 0A00 <1> 420 0000185D 5365676D656E742074- <1> .boot_segment_too_low: asciz "Segment too low.",13,10 420 00001866 6F6F206C6F772E0D0A- <1> 420 0000186F 00 <1> 421 00001870 42504220746F6F206C- <1> .boot_bpb_too_low: asciz "BPB too low.",13,10 421 00001879 6F772E0D0A00 <1> 422 0000187F 2120496E7465726E61- <1> .boot_auxbuff_crossing: db "! Internal error !, " 422 00001888 6C206572726F722021- <1> 422 00001891 2C20 <1> 423 00001893 617578627566662063- <1> asciz "auxbuff crosses 64 KiB boundary.",13,10 423 0000189C 726F73736573203634- <1> 423 000018A5 204B694220626F756E- <1> 423 000018AE 646172792E0D0A00 <1> 424 000018B6 5245414400 <1> .read: asciz "READ" 425 000018BB 575249544500 <1> .write: asciz "WRITE" 426 000018C1 48494444454E00 <1> .hidden: asciz "HIDDEN" 427 000018C8 48494444454E414444- <1> .hiddenadd: asciz "HIDDENADD" 427 000018D1 00 <1> 428 000018D2 44495200 <1> .dir: asciz "DIR" 429 000018D6 082020205B4449525D <1> .dirinsteadsize:countedb " [DIR]" 430 000018DF 2F00 <1> .emptydirname: asciz "/" 431 000018E1 424F4F5400 <1> .boot: asciz "BOOT" 432 000018E6 5155495400 <1> .quit: asciz "QUIT" 433 000018EB 50524F544F434F4C00 <1> .protocol: asciz "PROTOCOL" 434 000018F4 5345474D454E5400 <1> .segment: asciz "SEGMENT" 435 000018FC 454E54525900 <1> .entry: asciz "ENTRY" 436 00001902 42504200 <1> .bpb: asciz "BPB" 437 00001906 4D494E5041524100 <1> .minpara: asciz "MINPARA" 438 0000190E 4D41585041524100 <1> .maxpara: asciz "MAXPARA" 439 00001916 434845434B4F464653- <1> .checkoffset: asciz "CHECKOFFSET" 439 0000191F 455400 <1> 440 00001922 434845434B56414C55- <1> .checkvalue: asciz "CHECKVALUE" 440 0000192B 4500 <1> 441 0000192D 534543544F5200 <1> .sector: asciz "SECTOR" 442 00001934 534543544F52414C54- <1> .sector_alt: asciz "SECTORALT" 442 0000193D 00 <1> 443 0000193E 4B45524E454C2E5359- <1> .freedos_kernel_name: asciz "KERNEL.SYS" 443 00001947 5300 <1> 444 00001949 49504C2E53595300 <1> .dosc_kernel_name: asciz "IPL.SYS" 445 00001951 445242494F2E535953- <1> .edrdos_kernel_name: asciz "DRBIO.SYS" 445 0000195A 00 <1> 446 0000195B 4C444F532E434F4D00 <1> .ldos_kernel_name: asciz "LDOS.COM" 447 <1> .msdos7_kernel_name: 448 00001964 494F2E53595300 <1> .msdos6_kernel_name: asciz "IO.SYS" 449 0000196B 4D53444F532E535953- <1> .msdos6_add_name: asciz "MSDOS.SYS" 449 00001974 00 <1> 450 00001975 49424D42494F2E434F- <1> .ibmdos_kernel_name: asciz "IBMBIO.COM" 450 0000197E 4D00 <1> 451 00001980 49424D444F532E434F- <1> .ibmdos_add_name: asciz "IBMDOS.COM" 451 00001989 4D00 <1> 452 0000198B 4E544C445200 <1> .ntldr_kernel_name: asciz "NTLDR" 453 00001991 424F4F544D475200 <1> .bootmgr_kernel_name: asciz "BOOTMGR" 454 00001999 424F4F54534543542E- <1> .chain_kernel_name: asciz "BOOTSECT.DOS" 454 000019A2 444F5300 <1> 455 000019A6 5258444F5342494F2E- <1> .rxdos.0_kernel_name: asciz "RXDOSBIO.SYS" 455 000019AF 53595300 <1> 456 000019B3 525842494F2E535953- <1> .rxdos.1_kernel_name: asciz "RXBIO.SYS" 456 000019BC 00 <1> 457 <1> .rxdos.0_add_name: 458 000019BD 5258444F532E535953- <1> .rxdos.1_add_name: asciz "RXDOS.SYS" 458 000019C6 00 <1> 459 000019C7 5258444F532E434F4D- <1> .rxdos.2_kernel_name: asciz "RXDOS.COM" 459 000019D0 00 <1> 460 000019D1 00 <1> .addname_empty: asciz 461 000019D2 43616E6E6F74207175- <1> .cannotbootquit_memsizes: asciz "Cannot quit, memory size changed.",13,10 461 000019DB 69742C206D656D6F72- <1> 461 000019E4 792073697A65206368- <1> 461 000019ED 616E6765642E0D0A00 <1> 462 <1> %endif 463 000019F6 554E <1> .uninstall: db "UN" 464 000019F8 494E5354414C4C00 <1> .install: asciz "INSTALL" 465 00001A00 20697320616C726561- <1> .alreadyenabled:asciz " is already enabled.",13,10 465 00001A09 647920656E61626C65- <1> 465 00001A12 642E0D0A00 <1> 466 00001A17 20697320616C726561- <1> .alreadydisabled:asciz " is already disabled.",13,10 466 00001A20 64792064697361626C- <1> 466 00001A29 65642E0D0A00 <1> 467 00001A2F 3A20547279696E6720- <1> .tryenable: asciz ": Trying to enable.",13,10 467 00001A38 746F20656E61626C65- <1> 467 00001A41 2E0D0A00 <1> 468 00001A45 3A20547279696E6720- <1> .trydisable: asciz ": Trying to disable.",13,10 468 00001A4E 746F2064697361626C- <1> 468 00001A57 652E0D0A00 <1> 469 <1> %if _AREAS_HOOK_SERVER 470 <1> .qqlate_areas_error: 471 <1> asciz "Internal error in Q command uninstalling areas.",13,10 472 <1> %endif 473 <1> %if _AREAS && _AREAS_HOOK_CLIENT 474 <1> .areasinstalled: asciz "Areas installed.",13,10 475 <1> .areasalreadyinstalled: asciz "Areas already installed.",13,10 476 <1> .areasnodebuggerfound: asciz "Areas not installed, no debugger AMIS interface found!",13,10 477 <1> .areasnotsupported: asciz "Areas not installed, debugger AMIS interface does not support function!",13,10 478 <1> .areasnotinstalled: db "Areas not installed, debugger returned code " 479 <1> .areasnotinstalled.code:asciz "--h.",13,10 480 <1> .areasalreadyuninstalled: asciz "Areas already uninstalled.",13,10 481 <1> .areasuninstalled: db "Areas uninstalled, debugger returned code " 482 <1> .areasuninstalled.code: asciz "--h.",13,10 483 <1> %endif 484 00001A5C 5448454E00 <1> .then: asciz "THEN" 485 00001A61 4E4F5400 <1> .not: asciz "NOT" 486 00001A65 52565600 <1> .rvv: asciz "RVV" 487 00001A69 52564D00 <1> .rvm: asciz "RVM" 488 00001A6D 52565000 <1> .rvp: asciz "RVP" 489 00001A71 52564400 <1> .rvd: asciz "RVD" 490 <1> %if _MMXSUPP 491 00001A75 524D00 <1> .rm: asciz "RM" 492 <1> %endif 493 <1> %if _BOOTLDR 494 00001A78 4D6F64653A20426F6F- <1> .rvp_boot: ascizline "Mode: Boot loaded" 494 00001A81 74206C6F616465640D- <1> 494 00001A8A 0A00 <1> 495 <1> %endif 496 <1> %if _DEVICE 497 <1> %if _ATTACH 498 00001A8C 4D6F64653A20446576- <1> .rvp_device_attached: ascizline "Mode: Device driver attached" 498 00001A95 696365206472697665- <1> 498 00001A9E 722061747461636865- <1> 498 00001AA7 640D0A00 <1> 499 <1> %endif 500 00001AAB 4D6F64653A20446576- <1> .rvp_device: ascizline "Mode: Device driver" 500 00001AB4 696365206472697665- <1> 500 00001ABD 720D0A00 <1> 501 <1> %endif 502 <1> %if _APPLICATION 503 <1> %if _TSR 504 00001AC1 4D6F64653A20417070- <1> .rvp_tsr: ascizline "Mode: Application installed as TSR" 504 00001ACA 6C69636174696F6E20- <1> 504 00001AD3 696E7374616C6C6564- <1> 504 00001ADC 206173205453520D0A- <1> 504 00001AE5 00 <1> 505 <1> %endif 506 00001AE6 4D6F64653A20417070- <1> .rvp_application: ascizline "Mode: Application" 506 00001AEF 6C69636174696F6E0D- <1> 506 00001AF8 0A00 <1> 507 <1> %endif 508 00001AFA 0D436F646520736567- <1> .vm_codeseg: counted "Code segment=" 508 00001B03 6D656E743D <1> 509 <1> %if _DUALCODE 510 <1> .vm_code2seg: counted "Code2 segment=" 511 <1> %endif 512 00001B08 0D4461746120736567- <1> .vm_dataseg: counted "Data segment=" 512 00001B11 6D656E743D <1> 513 00001B16 0E456E747279207365- <1> .vm_entryseg: counted "Entry segment=" 513 00001B1F 676D656E743D <1> 514 <1> %if _MESSAGESEGMENT 515 00001B25 104D65737361676520- <1> .vm_messageseg: counted "Message segment=" 515 00001B2E 7365676D656E743D <1> 516 <1> %endif 517 00001B36 104175786275666620- <1> .vm_auxseg: counted "Auxbuff segment=" 517 00001B3F 7365676D656E743D <1> 518 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 519 00001B47 10486973746F727920- <1> .vm_hisseg: counted "History segment=" 519 00001B50 7365676D656E743D <1> 520 <1> %endif 521 <1> %if _PM 522 <1> .vm_selector: counted " selector=" 523 <1> %endif 524 00001B58 0D436C69656E742020- <1> .vp_pspsegment: counted "Client PSP=" 524 00001B61 205053503D <1> 525 00001B66 0D4465627567676572- <1> .vp_dpspsegment: counted "Debugger PSP=" 525 00001B6F 205053503D <1> 526 <1> .vp_dparent: 527 00001B74 0820506172656E743D <1> .vp_parent: counted " Parent=" 528 <1> .vp_dpra: 529 00001B7D 1720506172656E7420- <1> .vp_pra: counted " Parent Return Address=" 529 00001B86 52657475726E204164- <1> 529 00001B8F 64726573733D <1> 530 <1> %if _PM 531 <1> .vp_dpspsel: 532 <1> .vp_pspsel: counted " PSP Selector=" 533 <1> %endif 534 00001B95 4E6F74206C6F616465- <1> .rvd_not_device: asciz "Not loaded in device mode.",13,10 534 00001B9E 6420696E2064657669- <1> 534 00001BA7 6365206D6F64652E0D- <1> 534 00001BB0 0A00 <1> 535 <1> %if _DEVICE 536 00001BB2 114465766963652068- <1> .rvd_deviceheader: counted "Device header at " 536 00001BBB 656164657220617420 <1> 537 00001BC4 212E20416D6F756E74- <1> .rvd_size: counted ". Amount paragraphs allocated is " 537 00001BCD 207061726167726170- <1> 537 00001BD6 687320616C6C6F6361- <1> 537 00001BDF 74656420697320 <1> 538 <1> %endif 539 00001BE6 546F6F206C6F6E6720- <1> .n_toolongtail: asciz "Too long N command tail!",13,10 539 00001BEF 4E20636F6D6D616E64- <1> 539 00001BF8 207461696C210D0A00 <1> 540 00001C01 546F6F206C6F6E6720- <1> .n_toolongname: asciz "Too long N command name!",13,10 540 00001C0A 4E20636F6D6D616E64- <1> 540 00001C13 206E616D65210D0A00 <1> 541 00001C1C 4E554D42455200 <1> .number: asciz "NUMBER" 542 00001C23 434F554E54455200 <1> .counter: asciz "COUNTER" 543 00001C2B 494400 <1> .id: asciz "ID" 544 00001C2E 5748454E00 <1> .when: asciz "WHEN" 545 00001C33 4F464653455400 <1> .offset: asciz "OFFSET" 546 00001C3A 3F00 <1> .questionmark: asciz "?" 547 00001C3C 4F <1> .or: db "O" 548 00001C3D 5200 <1> .r: asciz "R" 549 00001C3F 4E4400 <1> .nd: asciz "ND" 550 00001C42 4C5200 <1> .lr: asciz "LR" 551 00001C45 52454D454D42455200 <1> .remember: asciz "REMEMBER" 552 00001C4E 474F544F00 <1> .goto: asciz "GOTO" 553 00001C53 534F4600 <1> .sof: asciz "SOF" 554 00001C57 454F4600 <1> .eof: asciz "EOF" 555 00001C5B 4572726F723A20474F- <1> .goto_not_file: asciz "Error: GOTO command not supported when not reading a script.",13,10 555 00001C64 544F20636F6D6D616E- <1> 555 00001C6D 64206E6F7420737570- <1> 555 00001C76 706F72746564207768- <1> 555 00001C7F 656E206E6F74207265- <1> 555 00001C88 6164696E6720612073- <1> 555 00001C91 63726970742E0D0A00 <1> 556 00001C9A 4572726F723A20474F- <1> .goto_empty: asciz "Error: GOTO needs a destination label.",13,10 556 00001CA3 544F206E6565647320- <1> 556 00001CAC 612064657374696E61- <1> 556 00001CB5 74696F6E206C616265- <1> 556 00001CBE 6C2E0D0A00 <1> 557 00001CC3 4572726F723A20474F- <1> .goto_not_found.1: asciz "Error: GOTO destination label ",'"' 557 00001CCC 544F2064657374696E- <1> 557 00001CD5 6174696F6E206C6162- <1> 557 00001CDE 656C202200 <1> 558 00001CE3 22206E6F7420666F75- <1> .goto_not_found.2: asciz '"'," not found.",13,10 558 00001CEC 6E642E0D0A00 <1> 559 00001CF2 4572726F723A206175- <1> .guard_auxbuff_error: asciz "Error: auxbuff already guarded!",13,10 559 00001CFB 786275666620616C72- <1> 559 00001D04 656164792067756172- <1> 559 00001D0D 646564210D0A00 <1> 560 00001D14 4572726F723A20436F- <1> .guard_re_error: asciz "Error: Command not supported while reading from RE buffer.",13,10 560 00001D1D 6D6D616E64206E6F74- <1> 560 00001D26 20737570706F727465- <1> 560 00001D2F 64207768696C652072- <1> 560 00001D38 656164696E67206672- <1> 560 00001D41 6F6D20524520627566- <1> 560 00001D4A 6665722E0D0A00 <1> 561 00001D51 4572726F723A20436F- <1> .guard_rc_error: asciz "Error: Command not supported while reading from RC buffer.",13,10 561 00001D5A 6D6D616E64206E6F74- <1> 561 00001D63 20737570706F727465- <1> 561 00001D6C 64207768696C652072- <1> 561 00001D75 656164696E67206672- <1> 561 00001D7E 6F6D20524320627566- <1> 561 00001D87 6665722E0D0A00 <1> 562 00001D8E 4572726F723A20556E- <1> .unexpected_auxbuff_guard: asciz "Error: Unexpected auxbuff guard!",13,10 562 00001D97 657870656374656420- <1> 562 00001DA0 617578627566662067- <1> 562 00001DA9 75617264210D0A00 <1> 563 <1> %if _SYMBOLIC 564 <1> .unexpected_nosymbols: asciz "Error: Unexpected no symbols flag!",13,10 565 <1> %endif 566 00001DB1 4572726F723A20556E- <1> .unexpected_noneol_re: asciz "Error: Unexpected non-EOL in RE processing!",13,10 566 00001DBA 657870656374656420- <1> 566 00001DC3 6E6F6E2D454F4C2069- <1> 566 00001DCC 6E2052452070726F63- <1> 566 00001DD5 657373696E67210D0A- <1> 566 00001DDE 00 <1> 567 00001DDF 4572726F723A20556E- <1> .unexpected_noneol_rc: asciz "Error: Unexpected non-EOL in RC processing!",13,10 567 00001DE8 657870656374656420- <1> 567 00001DF1 6E6F6E2D454F4C2069- <1> 567 00001DFA 6E2052432070726F63- <1> 567 00001E03 657373696E67210D0A- <1> 567 00001E0C 00 <1> 568 00001E0D 5245504C41434500 <1> .replace: asciz "REPLACE" 569 00001E15 415050454E4400 <1> .append: asciz "APPEND" 570 00001E1C 44 <1> .dword: db "D" 571 00001E1D 574F524400 <1> .word: asciz "WORD" 572 00001E22 33 <1> .3byte: db "3" 573 00001E23 4259544500 <1> .byte: asciz "BYTE" 574 00001E28 4C494E455300 <1> .lines: asciz "LINES" 575 <1> %if _RH 576 00001E2E 524800 <1> .rh: asciz "RH" 577 00001E31 526567697374657220- <1> .rh_enabled: asciz "Register dump history enabled.",13,10 577 00001E3A 64756D702068697374- <1> 577 00001E43 6F727920656E61626C- <1> 577 00001E4C 65642E0D0A00 <1> 578 00001E52 526567697374657220- <1> .rh_disabled: asciz "Register dump history disabled.",13,10 578 00001E5B 64756D702068697374- <1> 578 00001E64 6F7279206469736162- <1> 578 00001E6D 6C65642E0D0A00 <1> 579 00001E74 08524820737465703D <1> .rh_step.1: counted "RH step=" 580 00001E7D 0B2020646563696D61- <1> .rh_step.2: counted " decimal: " 580 00001E86 6C3A20 <1> 581 <1> %endif 582 <1> %if _HELP_COMPRESSED 583 <1> .hshrink_error: asciz "Internal error: Depack failure!",13,10 584 <1> %endif 585 <1> %if _TEST_HELP_FILE 586 <1> .testhelp: asciz "TESTHELP" 587 <1> %endif 588 <1> %if 1 || _STRNUM 589 00001E89 415300 <1> .as: asciz "AS" 590 <1> %endif 591 <1> %if _DTOP 592 00001E8C 544F5000 <1> .top: asciz "TOP" 593 <1> %endif 594 <1> %if _COUNT || _RH 595 00001E90 434F554E5400 <1> .count: asciz "COUNT" 596 <1> %endif 597 <1> %if _CLEAR 598 00001E96 434C45415200 <1> .clear: asciz "CLEAR" 599 00001E9C 1B631B5B324A0D0A00 <1> .clear_sequence:asciz 27,"c",27,"[2J",13,10 600 <1> ; Note that the first sequence will not have an effect 601 <1> ; when writing to int 10h in non-dumb mode. Therefore, 602 <1> ; it will advance the cursor to a nonzero column. 603 <1> ; This is required by the dumb mode detection code. 604 <1> %endif 605 <1> %if _HHDIVREMAIN 606 <1> .hh_div_remainder: 607 00001EA5 0D72656D61696E6465- <1> counted "remainder is " 607 00001EAE 7220697320 <1> 608 <1> %endif 609 <1> %if _CONFIG 610 00001EB3 3A3A434F4E4649473A- <1> .configkeyword: asciz "::CONFIG:" 610 00001EBC 00 <1> 611 00001EBD 3A3A53435249505453- <1> .scriptskeyword:asciz "::SCRIPTS:" 611 00001EC6 3A00 <1> 612 <1> %endif 613 00001EC8 47494200 <1> .gib: asciz "GIB" 614 00001ECC 4D494200 <1> .mib: asciz "MIB" 615 00001ED0 4B494200 <1> .kib: asciz "KIB" 616 00001ED4 504147455300 <1> .pages: asciz "PAGES" 617 00001EDA 504152414752415048- <1> .paragraphs: asciz "PARAGRAPHS" 617 00001EE3 5300 <1> 618 00001EE5 504152415300 <1> .paras: asciz "PARAS" 619 00001EEB 51574F52445300 <1> .qwords: asciz "QWORDS" 620 00001EF2 44 <1> .dwords: db "D" 621 00001EF3 574F52445300 <1> .words: asciz "WORDS" 622 00001EF9 425954455300 <1> .bytes: asciz "BYTES" 623 00001EFF 4C454E47544800 <1> .length: asciz "LENGTH" 624 00001F06 454E4400 <1> .end: asciz "END" 625 00001F0A 52414E474500 <1> .range: asciz "RANGE" 626 <1> %if _VXCHG 627 00001F10 4F4E00 <1> .on: asciz "ON" 628 00001F13 4F464600 <1> .off: asciz "OFF" 629 <1> .vv_enable_failure: 630 00001F17 556E61626C6520746F- <1> asciz "Unable to enable video swapping.",13,10 630 00001F20 20656E61626C652076- <1> 630 00001F29 6964656F2073776170- <1> 630 00001F32 70696E672E0D0A00 <1> 631 00001F3A 566964656F20737761- <1> .vv_disabled: asciz "Video swapping is disabled, use V ON to switch it on.",13,10 631 00001F43 7070696E6720697320- <1> 631 00001F4C 64697361626C65642C- <1> 631 00001F55 207573652056204F4E- <1> 631 00001F5E 20746F207377697463- <1> 631 00001F67 68206974206F6E2E0D- <1> 631 00001F70 0A00 <1> 632 <1> %endif 633 00001F72 5245564552534500 <1> .reverse: asciz "REVERSE" 634 00001F7A 56414C554500 <1> .value: asciz "VALUE" 635 00001F80 494E00 <1> .in: asciz "IN" 636 00001F83 4558495354494E4700 <1> .existing: asciz "EXISTING" 637 00001F8C 46524F4D00 <1> .from: asciz "FROM" 638 00001F91 544F00 <1> .to: asciz "TO" 639 00001F94 455845435554494E47- <1> .executing: asciz "EXECUTING" 639 00001F9D 00 <1> 640 00001F9E 46524F4D204C494E45- <1> .executing_value_range: asciz "FROM LINEAR cs:cip LENGTH abo - cip" 640 00001FA7 41522063733A636970- <1> 640 00001FB0 204C454E4754482061- <1> 640 00001FB9 626F202D2063697000 <1> 641 00001FC2 4C494E45415200 <1> .linear: asciz "LINEAR" 642 <1> %if _IMMASM 643 <1> .immasm_error_eip: 644 <1> asciz "Error, branch targets EIP beyond 64 KiB.",13,10 645 <1> %endif 646 <1> %if _PM 647 <1> .desctype: asciz "DESCTYPE" 648 <1> %endif 649 00001FC9 4E4F54 <1> .nottaken: db "NOT" 650 00001FCC 54414B454E00 <1> .taken: asciz "TAKEN" 651 00001FD2 4E <1> .nt: db "N" 652 00001FD3 5400 <1> .t: asciz "T" 653 00001FD5 4241534500 <1> .base: asciz "BASE" 654 00001FDA 47524F555000 <1> .group: asciz "GROUP" 655 00001FE0 574944544800 <1> .width: asciz "WIDTH" 656 <1> %if _HISTORY 657 <1> .history_internal_error: 658 00001FE6 0D0A496E7465726E61- <1> asciz 13,10,"Internal error in history handling!",13,10 658 00001FEF 6C206572726F722069- <1> 658 00001FF8 6E20686973746F7279- <1> 658 00002001 2068616E646C696E67- <1> 658 0000200A 210D0A00 <1> 659 <1> %endif 660 0000200E 07204572726F7221 <1> .di_error: counted " Error!" 661 00002016 0768696464656E20 <1> .di_hidden: counted "hidden " 662 0000201E 0720284949535029 <1> .di_iisp: counted " (IISP)" 663 00002026 1320286E6F6E737461- <1> .di_nonstd_iisp:counted " (nonstandard IISP)" 663 0000202F 6E6461726420494953- <1> 663 00002038 5029 <1> 664 0000203A 132028756E696E7374- <1> .di_uninst_iisp:counted " (uninstalled IISP)" 664 00002043 616C6C656420494953- <1> 664 0000204C 5029 <1> 665 <1> .di_freedos_reloc: 666 0000204E 1220284644206B6572- <1> counted " (FD kernel reloc)" 666 00002057 6E656C2072656C6F63- <1> 666 00002060 29 <1> 667 00002061 0E2028666172206A6D- <1> .di_jmpfar: counted " (far jmp imm)" 667 0000206A 7020696D6D29 <1> 668 <1> .di_jmpfarindirect: 669 00002070 132028666172206A6D- <1> counted " (far jmp indirect)" 669 00002079 7020696E6469726563- <1> 669 00002082 7429 <1> 670 00002084 0C2028746573742068- <1> .di_testhook: counted " (test hook)" 670 0000208D 6F6F6B29 <1> 671 00002091 1C2028746F6F206D61- <1> .di_toomany: counted " (too many chained handlers)" 671 0000209A 6E7920636861696E65- <1> 671 000020A3 642068616E646C6572- <1> 671 000020AC 7329 <1> 672 000020AE 0F20656D707479204D- <1> .di_empty: counted " empty MCB name" 672 000020B7 4342206E616D65 <1> 673 000020BE 0B2073797374656D20- <1> .di_system_mcb: counted " system MCB" 673 000020C7 4D4342 <1> 674 <1> .di_system_upper: 675 000020CA 0E2073797374656D20- <1> counted " system in UMA" 675 000020D3 696E20554D41 <1> 676 000020D9 0E2073797374656D20- <1> .di_system_low: counted " system in LMA" 676 000020E2 696E204C4D41 <1> 677 000020E8 112068696768206D65- <1> .di_hma: counted " high memory area" 677 000020F1 6D6F72792061726561 <1> 678 000020FA 06205B6D70783A <1> .di_multiplex.1:counted " [mpx:" 679 00002101 0768206C6973743A <1> .di_multiplex.2:counted "h list:" 680 00002109 02685D <1> .di_multiplex.3:counted "h]" 681 0000210C 68656164657200 <1> .header: asciz "header" 682 <1> .header.length: equ $ - 1 - .header 683 00002113 747261696C657200 <1> .trailer: asciz "trailer" 684 <1> .trailer.length:equ $ - 1 - .trailer 685 0000211B 415400 <1> .at: asciz "AT" 686 0000211E 5748494C4500 <1> .while: asciz "WHILE" 687 00002124 53494C454E5400 <1> .silent: asciz "SILENT" 688 0000212B 534C45455000 <1> .sleep: asciz "SLEEP" 689 00002131 5345434F4E445300 <1> .seconds: asciz "SECONDS" 690 00002139 5449434B5300 <1> .ticks: asciz "TICKS" 691 0000213F 52452070726F636573- <1> .re_limit_reached: asciz "RE processing reached RELIMIT, aborting.",13,10 691 00002148 73696E672072656163- <1> 691 00002151 6865642052454C494D- <1> 691 0000215A 49542C2061626F7274- <1> 691 00002163 696E672E0D0A00 <1> 692 0000216A 52432070726F636573- <1> .rc_limit_reached: asciz "RC processing reached RCLIMIT, aborting.",13,10 692 00002173 73696E672072656163- <1> 692 0000217C 6865642052434C494D- <1> 692 00002185 49542C2061626F7274- <1> 692 0000218E 696E672E0D0A00 <1> 693 00002195 2120496E7465726E61- <1> .silent_error: asciz "! Internal error during silent buffer handling !",13,10 693 0000219E 6C206572726F722064- <1> 693 000021A7 7572696E672073696C- <1> 693 000021B0 656E74206275666665- <1> 693 000021B9 722068616E646C696E- <1> 693 000021C2 6720210D0A00 <1> 694 000021C8 5768696C6520636F6E- <1> .while_not_true:asciz "While condition not true, returning.",13,10 694 000021D1 646974696F6E206E6F- <1> 694 000021DA 7420747275652C2072- <1> 694 000021E3 657475726E696E672E- <1> 694 000021EC 0D0A00 <1> 695 000021EF 5768696C6520636F6E- <1> .while_terminated_before: asciz "While condition ",'"' 695 000021F8 646974696F6E202200 <1> 696 00002201 22206E6F206C6F6E67- <1> .while_terminated_after: asciz '"'," no longer true.",13,10 696 0000220A 657220747275652E0D- <1> 696 00002213 0A00 <1> 697 00002215 4E6F2073657269616C- <1> .no_progress: asciz "No serial comm progress after 5 seconds, giving up. (Keyboard enabled.)",13,10 697 0000221E 20636F6D6D2070726F- <1> 697 00002227 677265737320616674- <1> 697 00002230 65722035207365636F- <1> 697 00002239 6E64732C2067697669- <1> 697 00002242 6E672075702E20284B- <1> 697 0000224B 6579626F6172642065- <1> 697 00002254 6E61626C65642E290D- <1> 697 0000225D 0A00 <1> 698 0000225F 0D0A6C446562756720- <1> .serial_request_keep: asciz 13,10,_PROGNAME," connected to serial port. Enter KEEP to confirm.",13,10 698 00002268 636F6E6E6563746564- <1> 698 00002271 20746F207365726961- <1> 698 0000227A 6C20706F72742E2045- <1> 698 00002283 6E746572204B454550- <1> 698 0000228C 20746F20636F6E6669- <1> 698 00002295 726D2E0D0A00 <1> 699 0000229B 4E6F204B454550206B- <1> .serial_no_keep_timer: asciz "No KEEP keyword confirmation after timeout, giving up. (Keyboard enabled.)",13,10 699 000022A4 6579776F726420636F- <1> 699 000022AD 6E6669726D6174696F- <1> 699 000022B6 6E2061667465722074- <1> 699 000022BF 696D656F75742C2067- <1> 699 000022C8 6976696E672075702E- <1> 699 000022D1 20284B6579626F6172- <1> 699 000022DA 6420656E61626C6564- <1> 699 000022E3 2E290D0A00 <1> 700 000022E8 4E6F204B454550206B- <1> .serial_no_keep_enter: asciz "No KEEP keyword confirmation, enabling keyboard.",13,10 700 000022F1 6579776F726420636F- <1> 700 000022FA 6E6669726D6174696F- <1> 700 00002303 6E2C20656E61626C69- <1> 700 0000230C 6E67206B6579626F61- <1> 700 00002315 72642E0D0A00 <1> 701 <1> %if _VXCHG 702 0000231B 4E4F <1> .nokeep: db "NO" 703 <1> %endif 704 0000231D 4B45455000 <1> .keep: asciz "KEEP" 705 00002322 4572726F723A20556E- <1> .cannot_hook_2D.invalid: asciz "Error: Unable to hook interrupt 2Dh due to invalid handler.",13,10 705 0000232B 61626C6520746F2068- <1> 705 00002334 6F6F6B20696E746572- <1> 705 0000233D 727570742032446820- <1> 705 00002346 64756520746F20696E- <1> 705 0000234F 76616C69642068616E- <1> 705 00002358 646C65722E0D0A00 <1> 706 00002360 4572726F723A20556E- <1> .cannot_hook_2D.nofree: asciz "Error: Unable to hook interrupt 2Dh, no free multiplex number.",13,10 706 00002369 61626C6520746F2068- <1> 706 00002372 6F6F6B20696E746572- <1> 706 0000237B 72757074203244682C- <1> 706 00002384 206E6F206672656520- <1> 706 0000238D 6D756C7469706C6578- <1> 706 00002396 206E756D6265722E0D- <1> 706 0000239F 0A00 <1> 707 000023A1 5761726E696E673A20 <1> .serial_cannot_unhook: db "Warning: " 708 000023AA 556E61626C6520746F- <1> .serial_cannot_unhook.nowarn: db "Unable to unhook interrupt " 708 000023B3 20756E686F6F6B2069- <1> 708 000023BC 6E7465727275707420 <1> 709 000023C5 2D2D682E0D0A00 <1> .serial_cannot_unhook.int: asciz "--h.",13,10 710 000023CC 4572726F723A20556E- <1> .serial_cannot_hook: db "Error: Unable to hook interrupt " 710 000023D5 61626C6520746F2068- <1> 710 000023DE 6F6F6B20696E746572- <1> 710 000023E7 7275707420 <1> 711 000023EC 2D2D68206265636175- <1> .serial_cannot_hook.new_int: db "--h because interrupt " 711 000023F5 736520696E74657272- <1> 711 000023FE 75707420 <1> 712 00002402 2D2D68207374696C6C- <1> .serial_cannot_hook.old_int: asciz "--h still hooked.",13,10 712 0000240B 20686F6F6B65642E0D- <1> 712 00002414 0A00 <1> 713 00002416 537563636565646564- <1> .serial_late_unhook: db "Succeeded in unhooking interrupt " 713 0000241F 20696E20756E686F6F- <1> 713 00002428 6B696E6720696E7465- <1> 713 00002431 727275707420 <1> 714 00002437 2D2D682E0D0A00 <1> .serial_late_unhook.int: asciz "--h.",13,10 715 0000243E 496E7465726E616C20- <1> .line_out_overflow: asciz "Internal error, line_out buffer overflowed!",13,10 715 00002447 6572726F722C206C69- <1> 715 00002450 6E655F6F7574206275- <1> 715 00002459 66666572206F766572- <1> 715 00002462 666C6F776564210D0A- <1> 715 0000246B 00 <1> 716 <1> %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 717 0000246C 041B5B376D <1> .highlight: counted 27,"[7m" 718 <1> %if _GETLINEHIGHLIGHT || _DHIGHLIGHT 719 00002471 00 <1> db 0 720 <1> %endif 721 00002472 031B5B6D <1> .unhighlight: counted 27,"[m" 722 <1> %if _GETLINEHIGHLIGHT || _DHIGHLIGHT 723 00002476 00 <1> db 0 724 <1> %endif 725 <1> %endif 726 00002477 206B4D475400 <1> .prefixes: asciz " kMGT" 727 0000247D 50726F63657373206C- <1> .ll_unterm: ascizline "Process loading aborted: Attached process didn't terminate!" 727 00002486 6F6164696E67206162- <1> 727 0000248F 6F727465643A204174- <1> 727 00002498 746163686564207072- <1> 727 000024A1 6F6365737320646964- <1> 727 000024AA 6E2774207465726D69- <1> 727 000024B3 6E617465210D0A00 <1> 728 000024BB 43616E6E6F74207175- <1> .qq_unterm: ascizline "Cannot quit, attached process didn't terminate!" 728 000024C4 69742C206174746163- <1> 728 000024CD 6865642070726F6365- <1> 728 000024D6 7373206469646E2774- <1> 728 000024DF 207465726D696E6174- <1> 728 000024E8 65210D0A00 <1> 729 <1> %if _PM 730 <1> .qq_still_pm: ascizline "Cannot quit, still in PM after attached process terminated!" 731 <1> %endif 732 000024ED 417474616368656420- <1> .qq_a_unterminated: ascizline "Attached process didn't terminate." 732 000024F6 70726F636573732064- <1> 732 000024FF 69646E277420746572- <1> 732 00002508 6D696E6174652E0D0A- <1> 732 00002511 00 <1> 733 00002512 417474616368656420- <1> .qq_a_terminated: ascizline "Attached process did terminate." 733 0000251B 70726F636573732064- <1> 733 00002524 6964207465726D696E- <1> 733 0000252D 6174652E0D0A00 <1> 734 00002534 43616E6E6F74206372- <1> .ensure_no_memory: ascizline "Cannot create empty attached process, out of memory!" 734 0000253D 6561746520656D7074- <1> 734 00002546 792061747461636865- <1> 734 0000254F 642070726F63657373- <1> 734 00002558 2C206F7574206F6620- <1> 734 00002561 6D656D6F7279210D0A- <1> 734 0000256A 00 <1> 735 <1> %if _DEVICE 736 <1> .qq_device_none_selected: 737 0000256B 43616E6E6F74207175- <1> ascizline "Cannot quit normally when loaded as device driver! Try QC or QD command." 737 00002574 6974206E6F726D616C- <1> 737 0000257D 6C79207768656E206C- <1> 737 00002586 6F6164656420617320- <1> 737 0000258F 646576696365206472- <1> 737 00002598 697665722120547279- <1> 737 000025A1 205143206F72205144- <1> 737 000025AA 20636F6D6D616E642E- <1> 737 000025B3 0D0A00 <1> 738 <1> .qq_device_no_d: 739 000025B6 43616E6E6F74207175- <1> ascizline "Cannot quit to device driver initialisation, state modified!" 739 000025BF 697420746F20646576- <1> 739 000025C8 696365206472697665- <1> 739 000025D1 7220696E697469616C- <1> 739 000025DA 69736174696F6E2C20- <1> 739 000025E3 7374617465206D6F64- <1> 739 000025EC 6966696564210D0A00 <1> 740 <1> .qq_device_no_c: 741 000025F5 43616E6E6F74207175- <1> ascizline "Cannot quit from device driver container, not found!" 741 000025FE 69742066726F6D2064- <1> 741 00002607 657669636520647269- <1> 741 00002610 76657220636F6E7461- <1> 741 00002619 696E65722C206E6F74- <1> 741 00002622 20666F756E64210D0A- <1> 741 0000262B 00 <1> 742 <1> %if _PM 743 <1> .qq_device_pm: ascizline "Cannot quit device driver in PM!" 744 <1> %endif 745 <1> align 2, db 0 746 0000262C 4E554C20 <1> .NULblank: fill 8, 32, db "NUL" 747 <1> %endif 748 00002634 4330 <1> .c0: db "C0" 749 00002636 0D <1> .cr: db 13 750 <1> 751 00002637 41424F525400 <1> .abort: asciz "ABORT" 752 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 753 0000263D 45584953545300 <1> .exists: asciz "EXISTS" 754 00002644 5900 <1> .y: asciz "Y" 755 00002646 5920636F6D6D616E64- <1> .yy_requires_filename: asciz "Y command requires a filename.",13,10 755 0000264F 207265717569726573- <1> 755 00002658 20612066696C656E61- <1> 755 00002661 6D652E0D0A00 <1> 756 00002667 5920636F6D6D616E64- <1> .yy_filename_empty: asciz "Y command filename is empty.",13,10 756 00002670 2066696C656E616D65- <1> 756 00002679 20697320656D707479- <1> 756 00002682 2E0D0A00 <1> 757 00002686 5920636F6D6D616E64- <1> .yy_too_many_handles: asciz "Y command has too many open files.",13,10 757 0000268F 2068617320746F6F20- <1> 757 00002698 6D616E79206F70656E- <1> 757 000026A1 2066696C65732E0D0A- <1> 757 000026AA 00 <1> 758 000026AB 5920636F6D6D616E64- <1> .yy_error_file_open: asciz "Y command failed to open file.",13,10 758 000026B4 206661696C65642074- <1> 758 000026BD 6F206F70656E206669- <1> 758 000026C6 6C652E0D0A00 <1> 759 000026CC 5920636F6D6D616E64- <1> .yy_no_file: asciz "Y command limited to label only valid in script file.",13,10 759 000026D5 206C696D6974656420- <1> 759 000026DE 746F206C6162656C20- <1> 759 000026E7 6F6E6C792076616C69- <1> 759 000026F0 6420696E2073637269- <1> 759 000026F9 70742066696C652E0D- <1> 759 00002702 0A00 <1> 760 <1> %endif 761 <1> %if _INPUT_FILE_HANDLES 762 00002704 5920636F6D6D616E64- <1> .yy_no_dos: asciz "Y command requires DOS to be available.",13,10 762 0000270D 207265717569726573- <1> 762 00002716 20444F5320746F2062- <1> 762 0000271F 6520617661696C6162- <1> 762 00002728 6C652E0D0A00 <1> 763 <1> .yy_filename_missing_unquote: 764 0000272E 5920636F6D6D616E64- <1> asciz "Y command filename missing ending quote.",13,10 764 00002737 2066696C656E616D65- <1> 764 00002740 206D697373696E6720- <1> 764 00002749 656E64696E67207175- <1> 764 00002752 6F74652E0D0A00 <1> 765 <1> %endif 766 <1> %if _INPUT_FILE_BOOT 767 00002759 5920636F6D6D616E64- <1> .yy_too_large: asciz "Y command file too large.",13,10 767 00002762 2066696C6520746F6F- <1> 767 0000276B 206C617267652E0D0A- <1> 767 00002774 00 <1> 768 00002775 5920636F6D6D616E64- <1> .yy_empty: asciz "Y command file empty.",13,10 768 0000277E 2066696C6520656D70- <1> 768 00002787 74792E0D0A00 <1> 769 <1> %endif 770 <1> 771 <1> %if _SYMBOLIC 772 <1> .zz_switch_s_received: asciz "Allocating symbol table buffer of " 773 <1> .zz_switch_s_received_xms: 774 <1> asciz "Allocating XMS symbol table buffer (including transfer buffer) of " 775 <1> .zz_switch_s_freeing: asciz "Freeing symbol table buffer.",13,10 776 <1> .zz_switch_s_indos: db "Can't change symbol table buffer allocation" 777 <1> asciz " while in DOS!",13,10 778 <1> %if _BOOTLDR 779 <1> .zz_switch_s_internal_error: 780 <1> asciz "Internal error in Z /S switch handling!",13,10 781 <1> .zz_switch_s_boot_memsize_differ: 782 <1> asciz "Cannot change symbol table buffer allocation, memory size changed!",13,10 783 <1> .zz_switch_s_boot_transfer_too_low: 784 <1> asciz "Cannot enlarge symbol table buffer that much, transfer buffer too low!",13,10 785 <1> .zz_switch_s_boot_loaded_kernel: 786 <1> asciz "Cannot change symbol table buffer allocation, kernel has been loaded!",13,10 787 <1> .zz_switch_s_boot_rpl: 788 <1> asciz "Cannot change symbol table buffer allocation, RPL has been loaded!",13,10 789 <1> %endif 790 <1> .zz_s_cannot_alloc_transfer: asciz "Cannot allocate transfer buffer!",13,10 791 <1> .zz_s_cannot_alloc_target: asciz "Cannot allocate target buffer!",13,10 792 <1> .zz_too_full: asciz "Symbol tables are too full for this reallocation.",13,10 793 <1> .zz_xms_not_freed_1: asciz "Unable to free symbol table XMS handle = " 794 <1> .zz_xms_not_freed_2: asciz "h.",13,10 795 <1> .invaliddata: asciz "Invalid symbol table data!",13,10 796 <1> %if _SECOND_SLICE && (_XMS_SYMBOL_TABLE || _BUFFER_86MM_SLICE) 797 <1> .error_second_slice: asciz "Invalid symbol table access slice usage!",13,10 798 <1> %endif 799 <1> .main_too_full: asciz "Symbol main array is too full!",13,10 800 <1> .main_too_full_crit1: asciz "Symbol main array is too full! Critical error. (Earlier check succeeded.)",13,10 801 <1> .hash_too_full_crit1: asciz "Symbol hash array is too full! Critical error. (Earlier check succeeded.)",13,10 802 <1> .hash_too_full_crit2: asciz "Symbol hash array is too full! Critical error. (Main has space.)",13,10 803 <1> .str_too_full: asciz "Symbol string heap is too full!",13,10 804 <1> .str_too_long: asciz "Symbol string is too long!",13,10 805 <1> .liststore.main.end.first: asciz 13,10,"Main total:",9 806 <1> .liststore.main.free.first: asciz "Main free:",9 807 <1> .liststore.main.used.first: asciz "Main used:",9 808 <1> .liststore.hash.end.first: asciz 13,10,"Hash total:",9 809 <1> .liststore.hash.free.first: asciz "Hash free:",9 810 <1> .liststore.hash.used.first: asciz "Hash used:",9 811 <1> .liststore.str.end.first: asciz 13,10,"String total:",9 812 <1> .liststore.str.free.first: asciz "String free:",9 813 <1> .liststore.str.used.first: asciz "String used:",9 814 <1> .liststore.second: asciz " in " 815 <1> .liststore.third.singular: asciz " unit",13,10 816 <1> .liststore.third.plural: asciz " units",13,10 817 <1> .liststore.str.first: asciz "Strings size is " 818 <1> .liststore.str.unref.first: asciz "Unreferenced strings size is " 819 <1> .liststore.str.unref.second: 820 <1> .liststore.str.second: asciz " in " 821 <1> .liststore.str.unref.third.singular: 822 <1> .liststore.str.third.singular: asciz " string.",13,10 823 <1> .liststore.str.unref.third.plural: 824 <1> .liststore.str.third.plural: asciz " strings.",13,10 825 <1> .liststore.str.fourth: asciz "Average string structure length is <= " 826 <1> .liststore.str.invalid: asciz "Error: Average string structure length too large" 827 <1> .liststore.str.nofourth:asciz "Cannot calculate average string structure length, number of strings is zero" 828 <1> .liststore.str.last: asciz ".",13,10 829 <1> .symhint: 830 <1> .symhint_store_string: db "..@symhint_" 831 <1> .symhint_size: equ $ - .symhint 832 <1> db "store_string_" 833 <1> .symhint_store_string_size equ $ - .symhint_store_string 834 <1> .trace_caller: db "trace_caller" 835 <1> .trace_caller_size: equ $ - .trace_caller 836 <1> .trace_here: db "trace_here" 837 <1> .trace_here_size: equ $ - .trace_here 838 <1> .skip_caller: db "skip_caller_" 839 <1> .skip_caller_size: equ $ - .skip_caller 840 <1> .skip_here: db "skip_here_" 841 <1> .skip_here_size: equ $ - .skip_here 842 <1> .asciz: asciz "ASCIZ" 843 <1> .zz_list_range_first: asciz "Range: " 844 <1> .zz_list_range_second: asciz "h--" 845 <1> .zz_list_range_third: asciz "h" 846 <1> .zz_list_add_none: db "" 847 <1> .zz_list_none: asciz " No symbols found",13,10 848 <1> .zz_list_start: asciz 13,10 849 <1> .zz_list_between: asciz 850 <1> .zz_list_first: asciz " Linear=" 851 <1> .zz_list_second: asciz " Offset=" 852 <1> .zz_list_middle: asciz "h = ",'"' 853 <1> .zz_list_last: asciz '"',13,10 854 <1> .zz_list_end: asciz 855 <1> .zz_list_add_range: asciz "; " 856 <1> .zz_list_add_first: asciz "z add linear=(" 857 <1> .zz_list_base: asciz " + v1" 858 <1> .zz_list_base_symbol: asciz " + sl." 859 <1> .zz_list_add_second: asciz ") offset=" 860 <1> .zz_list_add_middle: asciz " symbol='" 861 <1> .zz_list_add_last: asciz "'",13,10 862 <1> .zz_match_add_none: db ";" 863 <1> .zz_match_none: asciz " No symbols found",13,10 864 <1> .existing_block: asciz "Symbol already exists and is being blocked.",13,10 865 <1> .poison_block: asciz "Symbol definition is poisoned and is being blocked.",13,10 866 <1> .stat: asciz "STAT" 867 <1> .match: asciz "MATCH" 868 <1> .add: asciz "ADD" 869 <1> .commit: asciz "COMMIT" 870 <1> .del: asciz "DEL" 871 <1> .delete: asciz "DELETE" 872 <1> .unrefstring: asciz "UNREFSTRING" 873 <1> .reloc: asciz "RELOC" 874 <1> .relocate: asciz "RELOCATE" 875 <1> .symbol: asciz "SYMBOL" 876 <1> .flags: asciz "FLAGS" 877 <1> .sl: asciz "SL" 878 <1> .max: asciz "MAX" 879 <1> %if _XMS_SYMBOL_TABLE 880 <1> .zz_no_xms: asciz "No XMS driver detected!",13,10 881 <1> .zz_fail_xms_alloc: asciz "Failed to allocate XMS block!",13,10 882 <1> .zz_fail_xms_access: asciz "Failed to access XMS block!",13,10 883 <1> %endif 884 <1> .zz_main_hash_mismatch: asciz "Compaction/expansion failed, differing amounts of hash and main entries.",13,10 885 <1> .zz_main_not_first: asciz "Compaction/expansion failed, main array is not first.",13,10 886 <1> .zz_hash_not_second: asciz "Compaction/expansion failed, hash array is not second.",13,10 887 <1> .zz_str_not_third: asciz "Compaction/expansion failed, string heap is not third.",13,10 888 <1> .zz_table_not_full: asciz "Compaction/expansion failed, table is not full.",13,10 889 <1> .zz_too_much: asciz "Symbol table size is too large. Internal error!",13,10 890 <1> .zz_too_short: asciz "Symbol table size is too short. Internal error!",13,10 891 <1> .zz_str_overflow: asciz "String symbol table got too large. Internal error!",13,10 892 <1> .zz_length_mismatch: asciz "Symbol table table size mismatch. Internal error!",13,10 893 <1> .zz_too_small_str: asciz "String symbol table target is too small.",13,10 894 <1> .zz_too_small_hash: 895 <1> .zz_too_small_mainhash: asciz "Main/hash symbol table target is too small.",13,10 896 <1> .zz_internal_error_expand: 897 <1> asciz "Internal error during symbol table expansion!",13,10 898 <1> .zz_reloc_amount_none: asciz "No symbols found in given source range.",13,10 899 <1> .zz_del_amount_none: asciz "Symbol not found!",13,10 900 <1> .zz_reloc_amount_1: asciz "Relocated " 901 <1> .zz_del_amount_1: asciz "Deleted " 902 <1> .zz_reloc_amount_2.plural: 903 <1> .zz_del_amount_2.plural: asciz " symbols.",13,10 904 <1> .zz_reloc_amount_2.singular: 905 <1> .zz_del_amount_2.singular: asciz " symbol.",13,10 906 <1> .zz_reloc_overflow: asciz "Cannot relocate, length of source range overflows!",13,10 907 <1> .bb_sym_too_many: asciz "Too many symbol breakpoints!",13,10 908 <1> .bb_sym_beyond_linear: asciz "Symbol breakpoint linear is beyond reach!",13,10 909 <1> .bb_sym_beyond_offset: asciz "Symbol breakpoint offset is beyond reach!",13,10 910 <1> %endif 911 <1> 912 <1> %if _BREAKPOINTS 913 0000278D 414C4C00 <1> .all: asciz "ALL" 914 00002791 4E455700 <1> .new: asciz "NEW" 915 00002795 4E6F20756E75736564- <1> .bb_no_new: asciz "No unused breakpoint left!",13,10 915 0000279E 20627265616B706F69- <1> 915 000027A7 6E74206C656674210D- <1> 915 000027B0 0A00 <1> 916 000027B2 19486974207065726D- <1> .bb_hit.1: counted "Hit permanent breakpoint " 916 000027BB 616E656E7420627265- <1> 916 000027C4 616B706F696E7420 <1> 917 <1> .bb_hit.2.nocounter: 918 000027CC 020D0A <1> counted 13,10 919 <1> %if _SYMBOLIC 920 <1> .bb_sym_hit.1: counted "Hit symbol breakpoint " 921 <1> .bb_sym_hit.2.nocounter: 922 <1> counted 13,10 923 <1> %endif 924 000027CF 1C5061737365642070- <1> .bb_pass.1: counted "Passed permanent breakpoint " 924 000027D8 65726D616E656E7420- <1> 924 000027E1 627265616B706F696E- <1> 924 000027EA 7420 <1> 925 <1> .bb_hit.2.counter: 926 000027EC 0A2C20636F756E7465- <1> .bb_pass.2: counted ", counter=" 926 000027F5 723D <1> 927 <1> .bb_hit.3.counter.no_id: 928 <1> .bb_pass.3.no_id: 929 <1> .bb_hitpass_id.after: 930 000027F7 020D0A <1> counted 13,10 931 <1> .bb_hitpass_id.long: 932 000027FA 070D0A2049443A20 <1> counted 13,10," ID: " 933 <1> .bb_hitpass_id.short: 934 00002802 062C2049443A20 <1> counted ", ID: " 935 00002809 205748454E2000 <1> .bb_when: asciz " WHEN " 936 <1> 937 00002810 42502000 <1> .bp: asciz "BP " 938 00002814 202B00 <1> .bpenabled: asciz " +" 939 00002817 202D00 <1> .bpdisabled: asciz " -" 940 0000281A 20556E7573656400 <1> .bpunused: asciz " Unused" 941 00002822 204C696E3D00 <1> .bpaddress: asciz " Lin=" 942 00002828 202800 <1> .bpcontent: asciz " (" 943 0000282B 2920436F756E746572- <1> .bpcounter: asciz ") Counter=" 943 00002834 3D00 <1> 944 <1> %if 0 945 <1> BP 00 Unused 946 <1> BP 00 + Lin=12345678 (CC) Counter=8000 947 <1> 1234567890123456789012345678901234567890 948 <1> %endif 949 00002836 4E6F20627265616B70- <1> .bpnone: asciz "No breakpoints set currently.",13,10 949 0000283F 6F696E747320736574- <1> 949 00002848 2063757272656E746C- <1> 949 00002851 792E0D0A00 <1> 950 00002856 4E6F20627265616B70- <1> .bpnone_at: asciz "No breakpoint set at given address currently.",13,10 950 0000285F 6F696E742073657420- <1> 950 00002868 617420676976656E20- <1> 950 00002871 616464726573732063- <1> 950 0000287A 757272656E746C792E- <1> 950 00002883 0D0A00 <1> 951 <1> %endif 952 00002886 5468652000 <1> .cant_bp_the: asciz "The " 953 0000288B 70726F636565642062- <1> .cant_bp_type_proceed: asciz "proceed breakpoint" 953 00002894 7265616B706F696E74- <1> 953 0000289D 00 <1> 954 0000289E 7065726D616E656E74- <1> .cant_bp_type_permanent: db "permanent breakpoint " 954 000028A7 20627265616B706F69- <1> 954 000028B0 6E7420 <1> 955 000028B3 5F5F00 <1> .cant_bp_type_permanent.index: asciz "__" 956 <1> %if _SYMBOLIC 957 <1> .cant_bp_type_symbol: db "symbol breakpoint " 958 <1> .cant_bp_type_symbol.index: asciz "__" 959 <1> %endif 960 000028B6 204720627265616B70- <1> .cant_bp_type_gg: asciz " G breakpoint" 960 000028BF 6F696E7400 <1> 961 000028C4 20286C696E65617220 <1> .cant_bp_linear: db " (linear " 962 000028CD 2D2D2D2D5F <1> .cant_bp_linear.address1: db "----_" 963 000028D2 2D2D2D2D292000 <1> .cant_bp_linear.address2: asciz "----) " 964 000028D9 63616E6E6F74206265- <1> .cant_bp_write: asciz "cannot be written." 964 000028E2 207772697474656E2E- <1> 964 000028EB 00 <1> 965 000028EC 63616E6E6F74206265- <1> .cant_bp_restore: db "cannot be restored to " 965 000028F5 20726573746F726564- <1> 965 000028FE 20746F20 <1> 966 00002902 5F5F2E00 <1> .cant_bp_restore.value: asciz "__." 967 <1> %if 0 968 <1> The 15th G breakpoint (linear 0010_FFFF) cannot be written. 969 <1> The proceed breakpoint (linear 0010_FFFF) cannot be written. 970 <1> The permanent breakpoint 0F (linear 0010_FFFF) cannot be written. 971 <1> The permanent breakpoint 0F (linear 0010_FFFF) cannot be restored to __. 972 <1> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 973 <1> %endif 974 00002906 0D0A20526561736F6E- <1> .cant_bp_reason: asciz 13,10," Reason: " 974 0000290F 3A2000 <1> 975 00002912 4E6F206572726F722E- <1> .cant_bp_reason0: asciz "No error. (Internal error, report!)",13,10 975 0000291B 2028496E7465726E61- <1> 975 00002924 6C206572726F722C20- <1> 975 0000292D 7265706F727421290D- <1> 975 00002936 0A00 <1> 976 00002938 497420697320726561- <1> .cant_bp_reason1: asciz "It is read-only.",13,10 976 00002941 642D6F6E6C792E0D0A- <1> 976 0000294A 00 <1> 977 0000294B 497420697320756E72- <1> .cant_bp_reason2: asciz "It is unreachable.",13,10 977 00002954 6561636861626C652E- <1> 977 0000295D 0D0A00 <1> 978 00002960 497420686173206265- <1> .cant_bp_reason3: db "It has been overwritten with " 978 00002969 656E206F7665727772- <1> 978 00002972 697474656E20776974- <1> 978 0000297B 6820 <1> 979 0000297D 5F5F2E0D0A00 <1> .cant_bp_reason3.value: asciz "__.",13,10 980 00002983 556E6B6E6F776E2065- <1> .cant_bp_reasonu: asciz "Unknown error. (Internal error, report!)",13,10 980 0000298C 72726F722E2028496E- <1> 980 00002995 7465726E616C206572- <1> 980 0000299E 726F722C207265706F- <1> 980 000029A7 727421290D0A00 <1> 981 <1> 982 000029AE 20202000 <1> .list_bp.first: asciz " " 983 000029B2 204720627265616B70- <1> .list_bp.second:db " G breakpoint, linear " 983 000029BB 6F696E742C206C696E- <1> 983 000029C4 65617220 <1> 984 <1> .list_bp.address1: 985 000029C8 2D2D2D2D5F <1> db "----_" 986 <1> .list_bp.address2: 987 000029CD 2D2D2D2D00 <1> asciz "----" 988 000029D2 2C20636F6E74656E74- <1> .list_bp.third: db ", content " 988 000029DB 20 <1> 989 <1> .list_bp.value: 990 000029DC 5F5F00 <1> asciz "__" 991 <1> .list_bp_not_cseip: equ crlf 992 <1> %if _PM 993 <1> .list_bp_cseip_32: 994 <1> asciz " (is at CS:EIP)",13,10 995 <1> %endif 996 <1> .list_bp_csip_16: 997 000029DF 202869732061742043- <1> asciz " (is at CS:IP)",13,10 997 000029E8 533A4950290D0A00 <1> 998 <1> .list_bp_none: 999 000029F0 546865204720627265- <1> asciz "The G breakpoint list is empty.",13,10 999 000029F9 616B706F696E74206C- <1> 999 00002A02 69737420697320656D- <1> 999 00002A0B 7074792E0D0A00 <1> 1000 <1> %if 0 1001 <1> 2nd G breakpoint, linear 0003_28D3 $3600:12345678, content CC (is at CS:EIP) 1002 <1> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 1003 <1> %endif 1004 00002A12 00 <1> .empty_message: asciz 1005 00002A13 4C49535400 <1> .list: asciz "LIST" 1006 00002A18 414741494E00 <1> .again: asciz "AGAIN" 1007 <1> %if _SYMBOLIC 1008 <1> .wrt: asciz "WRT" 1009 <1> %endif 1010 00002A1E 52656163686564206C- <1> .uu_too_many_repeat: asciz "Reached limit of repeating disassembly.",13,10 1010 00002A27 696D6974206F662072- <1> 1010 00002A30 6570656174696E6720- <1> 1010 00002A39 646973617373656D62- <1> 1010 00002A42 6C792E0D0A00 <1> 1011 00002A48 496E7465726E616C20- <1> .uu_internal_error: asciz "Internal error in disassembler!",13,10 1011 00002A51 6572726F7220696E20- <1> 1011 00002A5A 646973617373656D62- <1> 1011 00002A63 6C6572210D0A00 <1> 1012 00002A6A 496E7465726E616C20- <1> .aa_internal_error: asciz "Internal error in assembler!",13,10 1012 00002A73 6572726F7220696E20- <1> 1012 00002A7C 617373656D626C6572- <1> 1012 00002A85 210D0A00 <1> 1013 00002A89 537461636B206F7665- <1> .stack_overflow: db "Stack overflow occurred, IP=" 1013 00002A92 72666C6F77206F6363- <1> 1013 00002A9B 75727265642C204950- <1> 1013 00002AA4 3D <1> 1014 00002AA5 5F5F5F5F682C206475- <1> .stack_overflow.caller: asciz "____h, due to " 1014 00002AAE 6520746F2000 <1> 1015 00002AB4 65787072657373696F- <1> .stack_overflow.indirection: asciz "expression indirection.",13,10 1015 00002ABD 6E20696E6469726563- <1> 1015 00002AC6 74696F6E2E0D0A00 <1> 1016 00002ACE 65787072657373696F- <1> .stack_overflow.parens: asciz "expression parentheses.",13,10 1016 00002AD7 6E20706172656E7468- <1> 1016 00002AE0 657365732E0D0A00 <1> 1017 00002AE8 65787072657373696F- <1> .stack_overflow.precedence: asciz "expression precedence.",13,10 1017 00002AF1 6E2070726563656465- <1> 1017 00002AFA 6E63652E0D0A00 <1> 1018 00002B01 65787072657373696F- <1> .stack_overflow.value_in: asciz "expression VALUE x IN y.",13,10 1018 00002B0A 6E2056414C55452078- <1> 1018 00002B13 20494E20792E0D0A00 <1> 1019 00002B1C 65787072657373696F- <1> .stack_overflow.linear: asciz "expression LINEAR.",13,10 1019 00002B25 6E204C494E4541522E- <1> 1019 00002B2E 0D0A00 <1> 1020 <1> %if _PM 1021 <1> .stack_overflow.desctype: asciz "expression DESCTYPE.",13,10 1022 <1> %endif 1023 00002B31 65787072657373696F- <1> .stack_overflow.cond: asciz "expression conditional ?? x :: y.",13,10 1023 00002B3A 6E20636F6E64697469- <1> 1023 00002B43 6F6E616C203F3F2078- <1> 1023 00002B4C 203A3A20792E0D0A00 <1> 1024 <1> %if _SYMBOLIC 1025 <1> .dd_after_symbol.non_wrt: 1026 <1> .uu_after_symbol.non_wrt: db ":" 1027 <1> .dd_after_symbol.2_wrt: 1028 <1> .memref_after_symbol.non_wrt: 1029 <1> .uu_after_symbol.wrt: 1030 <1> .memref_after_symbol.wrt: asciz 13,10 1031 <1> .dd_after_symbol.1_wrt: 1032 <1> .uu_after_symbol_between_1.wrt: 1033 <1> .uu_between_symbol.wrt: db ":" 1034 <1> .memref_between_symbol.wrt: asciz " wrt " 1035 <1> .uu_after_symbol_between_1.non_wrt: db ":" 1036 <1> .uu_after_symbol_between_2.wrt: asciz " + " 1037 <1> .uu_after_symbol_between_3: asciz 13,10 1038 <1> %endif 1039 <1> %if _MEMREF_AMOUNT 1040 <1> %if _DEBUG2 || _SYMBOLIC 1041 <1> .memrefs_branchdirect: asciz 9, "direct branch target = " 1042 <1> .memrefs_stringsource: asciz 9, "string source = " 1043 <1> .memrefs_stringdest: asciz 9, "string destination = " 1044 <1> .memrefs_memsource: asciz 9, "memory source = " 1045 <1> .memrefs_memdest: asciz 9, "memory destination = " 1046 <1> .memrefs_memsourcedest: asciz 9, "memory source/dest = " 1047 <1> .memrefs_mem_unknown: asciz 9, "memory (unknown) = " 1048 <1> .memrefs_unknown: asciz 9, "unknown mem ref type = " 1049 <1> .memrefs_length: counted " length=" 1050 <1> %endif 1051 <1> .memrefs_invalid_internal: 1052 00002B55 496E7465726E616C20- <1> asciz "Internal error, invalid use of too many memrefs!",13,10 1052 00002B5E 6572726F722C20696E- <1> 1052 00002B67 76616C696420757365- <1> 1052 00002B70 206F6620746F6F206D- <1> 1052 00002B79 616E79206D656D7265- <1> 1052 00002B82 6673210D0A00 <1> 1053 <1> %endif 1054 <1> 1055 <1> %if 0 1056 <1> align 2, db 0 1057 <1> .optiontable: dw dispregs32, .r32off, .r32on 1058 <1> dw traceints, .traceoff, .traceon 1059 <1> dw cpdepchars, .cpoff, .cpon 1060 <1> dw fakeindos, .dosoff, .doson 1061 <1> dw nonpagingdevice, .nonpageoff, .nonpageon 1062 <1> dw pagingdevice, .pageoff, .pageon 1063 <1> dw hexrn, .readrnoff, .readrnon 1064 <1> dw 0 1065 <1> 1066 <1> .r32off: asciz "Dump 16-bit register set" 1067 <1> .r32on: asciz "Dump 32-bit register set" 1068 <1> .traceoff: asciz "Interrupts are traced" 1069 <1> .traceon: asciz "Interrupts are processed" 1070 <1> .cpoff: asciz "Extended ASCII characters replaced" 1071 <1> .cpon: asciz "Extended ASCII characters displayed" 1072 <1> .dosoff: asciz "InDOS is checked" 1073 <1> .doson: asciz "InDOS assumed on" 1074 <1> ;asciz "InDOS assumed off" 1075 <1> .nonpageoff: asciz 1076 <1> .nonpageon: asciz "Paging disabled" 1077 <1> .pageoff: asciz 1078 <1> .pageon: asciz "Paging enabled" 1079 <1> .readrnoff: asciz "Readable RN enabled" 1080 <1> .readrnon: asciz "Readable RN disabled" 1081 <1> %endif 1082 <1> 1083 00002B88 5761726E696E673A20- <1> .warnprefix: asciz "Warning: Prefixes in excess of 14, using trace flag.",13,10 1083 00002B91 507265666978657320- <1> 1083 00002B9A 696E20657863657373- <1> 1083 00002BA3 206F662031342C2075- <1> 1083 00002BAC 73696E672074726163- <1> 1083 00002BB5 6520666C61672E0D0A- <1> 1083 00002BBE 00 <1> 1084 <1> 1085 <1> %if _DEBUG 1086 <1> .bu: asciz "Breaking to next instance.",13,10 1087 <1> %if _DEBUG_COND 1088 <1> .bu_disabled: db "Debuggable mode is disabled.",13,10 1089 <1> asciz "Enable with this command: r DCO6 or= ",_4digitshex(opt6_debug_mode),13,10 1090 <1> %endif 1091 <1> %else 1092 00002BBF 416C72656164792069- <1> .notbu: asciz "Already in topmost instance. (This is no debugging build of lDebug.)",13,10 1092 00002BC8 6E20746F706D6F7374- <1> 1092 00002BD1 20696E7374616E6365- <1> 1092 00002BDA 2E2028546869732069- <1> 1092 00002BE3 73206E6F2064656275- <1> 1092 00002BEC 6767696E6720627569- <1> 1092 00002BF5 6C64206F66206C4465- <1> 1092 00002BFE 6275672E290D0A00 <1> 1093 <1> %endif 1094 <1> %if _DUALCODE 1095 <1> .bu_relocated: db "Inter-segment calls work. Sign=" 1096 <1> .bu_relocated.sign: 1097 <1> asciz "----h.",13,10 1098 <1> %endif 1099 <1> %if _DT 1100 00002C06 4E <1> .tableheader: db .tableheader.end - .tableheader.start 1101 <1> .tableheader.start: 1102 <1> %assign ITERATION 0 1103 <1> %rep 8 1104 <1> %if ITERATION == 0 1105 <1> %elif ITERATION == 1 || ITERATION == 2 1106 <1> times 4 db 32 1107 <1> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1108 <1> times 2 db 32 1109 <1> %else 1110 <1> times 3 db 32 1111 <1> %endif 1112 <1> db "Dec Hex" 1113 <1> %assign ITERATION ITERATION + 1 1114 <1> %endrep 1104 <2> %if ITERATION == 0 1105 <2> %elif ITERATION == 1 || ITERATION == 2 1106 <2> times 4 db 32 1107 <2> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1108 <2> times 2 db 32 1109 <2> %else 1110 <2> times 3 db 32 1111 <2> %endif 1112 00002C07 44656320486578 <2> db "Dec Hex" 1113 <2> %assign ITERATION ITERATION + 1 1104 <2> %if ITERATION == 0 1105 <2> %elif ITERATION == 1 || ITERATION == 2 1106 00002C0E 20 <2> times 4 db 32 1107 <2> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1108 <2> times 2 db 32 1109 <2> %else 1110 <2> times 3 db 32 1111 <2> %endif 1112 00002C12 44656320486578 <2> db "Dec Hex" 1113 <2> %assign ITERATION ITERATION + 1 1104 <2> %if ITERATION == 0 1105 <2> %elif ITERATION == 1 || ITERATION == 2 1106 00002C19 20 <2> times 4 db 32 1107 <2> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1108 <2> times 2 db 32 1109 <2> %else 1110 <2> times 3 db 32 1111 <2> %endif 1112 00002C1D 44656320486578 <2> db "Dec Hex" 1113 <2> %assign ITERATION ITERATION + 1 1104 <2> %if ITERATION == 0 1105 <2> %elif ITERATION == 1 || ITERATION == 2 1106 <2> times 4 db 32 1107 <2> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1108 00002C24 20 <2> times 2 db 32 1109 <2> %else 1110 <2> times 3 db 32 1111 <2> %endif 1112 00002C26 44656320486578 <2> db "Dec Hex" 1113 <2> %assign ITERATION ITERATION + 1 1104 <2> %if ITERATION == 0 1105 <2> %elif ITERATION == 1 || ITERATION == 2 1106 <2> times 4 db 32 1107 <2> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1108 00002C2D 20 <2> times 2 db 32 1109 <2> %else 1110 <2> times 3 db 32 1111 <2> %endif 1112 00002C2F 44656320486578 <2> db "Dec Hex" 1113 <2> %assign ITERATION ITERATION + 1 1104 <2> %if ITERATION == 0 1105 <2> %elif ITERATION == 1 || ITERATION == 2 1106 <2> times 4 db 32 1107 <2> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1108 00002C36 20 <2> times 2 db 32 1109 <2> %else 1110 <2> times 3 db 32 1111 <2> %endif 1112 00002C38 44656320486578 <2> db "Dec Hex" 1113 <2> %assign ITERATION ITERATION + 1 1104 <2> %if ITERATION == 0 1105 <2> %elif ITERATION == 1 || ITERATION == 2 1106 <2> times 4 db 32 1107 <2> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1108 <2> times 2 db 32 1109 <2> %else 1110 00002C3F 20 <2> times 3 db 32 1111 <2> %endif 1112 00002C42 44656320486578 <2> db "Dec Hex" 1113 <2> %assign ITERATION ITERATION + 1 1104 <2> %if ITERATION == 0 1105 <2> %elif ITERATION == 1 || ITERATION == 2 1106 <2> times 4 db 32 1107 <2> %elif ITERATION == 3 || ITERATION == 4 || ITERATION == 5 1108 <2> times 2 db 32 1109 <2> %else 1110 00002C49 20 <2> times 3 db 32 1111 <2> %endif 1112 00002C4C 44656320486578 <2> db "Dec Hex" 1113 <2> %assign ITERATION ITERATION + 1 1115 00002C53 0D0A <1> db 13,10 1116 <1> .tableheader.end: 1117 00002C55 4F <1> .tableheadertop:db .tableheadertop.end - .tableheadertop.start 1118 <1> .tableheadertop.start: 1119 <1> %assign ITERATION 0 1120 <1> %rep 8 1121 <1> %if ITERATION == 0 1122 <1> %else 1123 <1> times 3 db 32 1124 <1> %endif 1125 <1> db "Dec Hex" 1126 <1> %assign ITERATION ITERATION + 1 1127 <1> %endrep 1121 <2> %if ITERATION == 0 1122 <2> %else 1123 <2> times 3 db 32 1124 <2> %endif 1125 00002C56 44656320486578 <2> db "Dec Hex" 1126 <2> %assign ITERATION ITERATION + 1 1121 <2> %if ITERATION == 0 1122 <2> %else 1123 00002C5D 20 <2> times 3 db 32 1124 <2> %endif 1125 00002C60 44656320486578 <2> db "Dec Hex" 1126 <2> %assign ITERATION ITERATION + 1 1121 <2> %if ITERATION == 0 1122 <2> %else 1123 00002C67 20 <2> times 3 db 32 1124 <2> %endif 1125 00002C6A 44656320486578 <2> db "Dec Hex" 1126 <2> %assign ITERATION ITERATION + 1 1121 <2> %if ITERATION == 0 1122 <2> %else 1123 00002C71 20 <2> times 3 db 32 1124 <2> %endif 1125 00002C74 44656320486578 <2> db "Dec Hex" 1126 <2> %assign ITERATION ITERATION + 1 1121 <2> %if ITERATION == 0 1122 <2> %else 1123 00002C7B 20 <2> times 3 db 32 1124 <2> %endif 1125 00002C7E 44656320486578 <2> db "Dec Hex" 1126 <2> %assign ITERATION ITERATION + 1 1121 <2> %if ITERATION == 0 1122 <2> %else 1123 00002C85 20 <2> times 3 db 32 1124 <2> %endif 1125 00002C88 44656320486578 <2> db "Dec Hex" 1126 <2> %assign ITERATION ITERATION + 1 1121 <2> %if ITERATION == 0 1122 <2> %else 1123 00002C8F 20 <2> times 3 db 32 1124 <2> %endif 1125 00002C92 44656320486578 <2> db "Dec Hex" 1126 <2> %assign ITERATION ITERATION + 1 1121 <2> %if ITERATION == 0 1122 <2> %else 1123 00002C99 20 <2> times 3 db 32 1124 <2> %endif 1125 00002C9C 44656320486578 <2> db "Dec Hex" 1126 <2> %assign ITERATION ITERATION + 1 1128 00002CA3 0D0A <1> db 13,10 1129 <1> .tableheadertop.end: 1130 <1> %endif 1131 <1> %if _PM 1132 <1> .ofs32: asciz "Cannot access 16-bit segment with 32-bit offset.",13,10 1133 <1> .d.a_success: db "Allocated descriptor with selector " 1134 <1> .d.a_success_sel: 1135 <1> asciz "----",13,10 1136 <1> .d.d_success: asciz "Deallocated descriptor",13,10 1137 <1> .d.b_success: asciz "Set descriptor base",13,10 1138 <1> .d.l_success: asciz "Set descriptor limit",13,10 1139 <1> .d.t_success: asciz "Set descriptor type",13,10 1140 <1> .d.a_error: db "Error " 1141 <1> .d.a_error_code: 1142 <1> asciz "----",13,10 1143 <1> .d.d_error equ .d.a_error 1144 <1> .d.d_error_code equ .d.a_error_code 1145 <1> .d.b_error equ .d.a_error 1146 <1> .d.b_error_code equ .d.a_error_code 1147 <1> .d.l_error equ .d.a_error 1148 <1> .d.l_error_code equ .d.a_error_code 1149 <1> .d.t_error equ .d.a_error 1150 <1> .d.t_error_code equ .d.a_error_code 1151 <1> %endif 1152 <1> 1153 <1> 1154 <1> %define smcb_messages ..@notype,"" 1155 <1> 1156 <1> %imacro smcbtype 2.nolist 1157 <1> dw %2, %%label 1158 <1> %defstr %%str %1 1159 <1> %xdefine smcb_messages smcb_messages,%%label,%%str 1160 <1> %endmacro 1161 <1> 1162 <1> %imacro smcbmsg 2-*.nolist 1163 <1> %if %0 & 1 1164 <1> %error Expected even number of parameters 1165 <1> %endif 1166 <1> %rotate 2 1167 <1> %rep (%0 - 2) / 2 1168 <1> %1: asciz %2 1169 <1> %rotate 2 1170 <1> %endrep 1171 <1> %endmacro 1172 <1> 1173 00002CA5 00 <1> align 4, db 0 1174 <1> smcbtypes: 1175 00002CA8 0000[FC2E] <1> smcbtype S_OTHER, 00h 1176 00002CAC 0100[042F] <1> smcbtype S_DOSENTRY, 01h 1177 00002CB0 0200[0F2F] <1> smcbtype S_DOSCODE, 02h 1178 00002CB4 0300[192F] <1> smcbtype S_DOSDATA, 03h 1179 00002CB8 0400[232F] <1> smcbtype S_IRQSCODE, 04h 1180 00002CBC 0500[2E2F] <1> smcbtype S_IRQSDATA, 05h 1181 00002CC0 0600[392F] <1> smcbtype S_CDS, 06h 1182 00002CC4 0700[3F2F] <1> smcbtype S_LFNCDS, 07h 1183 00002CC8 0800[482F] <1> smcbtype S_DPB, 08h 1184 00002CCC 0900[4E2F] <1> smcbtype S_UPB, 09h 1185 00002CD0 0A00[542F] <1> smcbtype S_SFT, 0Ah 1186 00002CD4 0B00[5A2F] <1> smcbtype S_FCBSFT, 0Bh 1187 00002CD8 0C00[632F] <1> smcbtype S_CCB, 0Ch 1188 00002CDC 0D00[692F] <1> smcbtype S_IRT, 0Dh 1189 00002CE0 0E00[6F2F] <1> smcbtype S_SECTOR, 0Eh 1190 00002CE4 0F00[782F] <1> smcbtype S_NLS, 0Fh 1191 00002CE8 1000[7E2F] <1> smcbtype S_EBDA, 10h 1192 00002CEC 1900[852F] <1> smcbtype S_INITCONFIG, 19h 1193 00002CF0 1A00[922F] <1> smcbtype S_INITFATSEG, 1Ah 1194 00002CF4 1B00[9F2F] <1> smcbtype S_INITSECTORSEG, 1Bh 1195 00002CF8 1C00[AF2F] <1> smcbtype S_INITSTACKBPB,1Ch 1196 00002CFC 1D00[BE2F] <1> smcbtype S_INITPSP, 1Dh 1197 00002D00 1E00[C82F] <1> smcbtype S_ENVIRONMENT, 1Eh 1198 00002D04 1F00[D62F] <1> smcbtype S_INITIALIZE, 1Fh 1199 00002D08 2000[E32F] <1> smcbtype S_DEVICE, 20h ; Device 1200 00002D0C 2100[EC2F] <1> smcbtype S_DEVICEMEMORY,21h ; Allocated by device 1201 00002D10 3000[FB2F] <1> smcbtype S_EXCLDUMA, 30h ; Excluded UMA 1202 00002D14 3100[0630] <1> smcbtype S_EXCLDUMASUB, 31h ; Excluded UMA with sub-chain of used MCBs 1203 00002D18 3200[1430] <1> smcbtype S_EXCLDLH, 32h ; Excluded by LH 1204 00002D1C 3300[1E30] <1> smcbtype S_EXCLDDOS, 33h 1205 00002D20 FFFFFFFF <1> dw -1, -1 1206 <1> 1207 <1> 1208 <1> %define INSTALLMESSAGES db "" 1209 <1> 1210 <1> %imacro installflag 6-*.nolist 1211 <1> %xdefine %%one %1 1212 <1> %xdefine %%two %2 1213 <1> %xdefine %%three %3 1214 <1> %ifempty %3 1215 <1> %define %%three install_trying 1216 <1> %endif 1217 <1> %xdefine %%four %4 1218 <1> %ifempty %4 1219 <1> %define %%four 0 1220 <1> %endif 1221 <1> %xdefine %%five %5 1222 <1> %ifnidn %%one, 0 1223 <1> %if ((%%two - 1) & %%two) == 0 1224 <1> %if %%two > 0FFFFh 1225 <1> %if %%two & 0FFFFh 1226 <1> %error Flag set in both upper and lower word 1227 <1> %endif 1228 <1> %assign %%two %%two >> 16 1229 <1> %xdefine %%one %%one + 2 1230 <1> %endif 1231 <1> %else 1232 <1> %if (%%two & 0FFFF_0000h) != 0FFFF_0000h 1233 <1> %if (%%two & 0FFFFh) != 0FFFFh 1234 <1> %error Flag clear in both upper and lower word 1235 <1> %endif 1236 <1> %assign %%two (%%two >> 16) & 0FFFFh 1237 <1> %xdefine %%one %%one + 2 1238 <1> %endif 1239 <1> %endif 1240 <1> %endif 1241 <1> %xdefine INSTALLMESSAGES INSTALLMESSAGES, %%message_five:, {asciz %%five} 1242 <1> %assign %%step 0 1243 <1> %rep %0 - 5 1244 <1> %xdefine INSTALLMESSAGES INSTALLMESSAGES, %%message_%[%%step]:, {asciz %6} 1245 <1> dw %%message_%[%%step] 1246 <1> dw %%message_five 1247 <1> dw %%one, %%two, %%three, %%four 1248 <1> %rotate 1 1249 <1> %assign %%step %%step + 1 1250 <1> %endrep 1251 <1> %endmacro 1252 <1> 1253 <1> %imacro installmessages 0-*.nolist 1254 <1> %rep %0 1255 <1> %1 1256 <1> %rotate 1 1257 <1> %endrep 1258 <1> %endmacro 1259 <1> 1260 <1> align 4, db 0 1261 <1> installflags: 1262 <1> %if _PM 1263 <1> installflag options4, opt4_int_2F_hook,,, "Interrupt 2Fh DPMI hook", "INT2F", "DPMIHOOK" 1265 <1> %endif 1266 <1> %if _CATCHINTFAULTCOND && (_CATCHINT0D || _CATCHINT0C) 1267 00002D24 [4430][2930][AC00]- <1> installflag options4, opt4_int_fault_hook,,, "R86M fault interrupts hook", "FAULTS", "FAULT", "INTFAULTS", "INTFAULT" 1267 00002D2A 1000[9F49]0000- <1> 1267 00002D30 [4B30][2930][AC00]- <1> 1267 00002D36 1000[9F49]0000- <1> 1267 00002D3C [5130][2930][AC00]- <1> 1267 00002D42 1000[9F49]0000- <1> 1267 00002D48 [5B30][2930][AC00]- <1> 1267 00002D4E 1000[9F49]0000 <1> 1269 <1> %endif 1270 <1> %if _CATCHINT08 1271 00002D54 [7B30][6430][AC00]- <1> installflag options4, opt4_int_08_hook,,, "Interrupt 8 timer hook", "INT08", "INT8", "TIMER" 1271 00002D5A 0400[9F49]0000- <1> 1271 00002D60 [8130][6430][AC00]- <1> 1271 00002D66 0400[9F49]0000- <1> 1271 00002D6C [8630][6430][AC00]- <1> 1271 00002D72 0400[9F49]0000 <1> 1273 <1> %endif 1274 <1> %if _CATCHINT2D 1275 00002D78 [A430][8C30][AC00]- <1> installflag options4, opt4_int_2D_hook,,, "Interrupt 2Dh AMIS hook", "INT2D", "AMIS" 1275 00002D7E 0800[9F49]0000- <1> 1275 00002D84 [AA30][8C30][AC00]- <1> 1275 00002D8A 0800[9F49]0000 <1> 1277 <1> %endif 1278 <1> %if _AREAS && _AREAS_HOOK_CLIENT 1279 <1> installflag 0, install_areas,,, "Areas", "AREAS" 1281 <1> %endif 1282 00002D90 [BA30][AF30][A000]- <1> installflag options, enable_serial, dmycmd,, "Serial I/O", "SERIAL" 1282 00002D96 0040[F504]0000 <1> 1284 00002D9C [D230][C130][A000]- <1> installflag options, fakeindos, dmycmd,, "Force InDOS mode", "INDOS" 1284 00002DA2 0800[F504]0000 <1> 1286 00002DA8 [EE30][D830][A000]- <1> installflag options, opt_usegetinput, dmycmd,, "Use DOS getinput mode", "GETINPUT" 1286 00002DAE 0008[F504]0000 <1> 1288 00002DB4 [1631][F730][AA00]- <1> installflag options3, opt3_r_highlight_full, dmycmd,, "R register change highlighting", "RHIGHLIGHT" 1288 00002DBA 0400[F504]0000 <1> 1290 00002DC0 [2C31][2131][AA00]- <1> installflag options3, ~ opt3_disable_autorepeat, dmycmd,, "Autorepeat", "AUTOREPEAT" 1290 00002DC6 FFEF[F504]0000 <1> 1292 00002DCC [4731][3731][B400]- <1> installflag options6, opt6_bios_output, dmycmd,, "ROM-BIOS output", "BIOSOUT", "BIOSOUTPUT", "INT10OUT", "INT10OUTPUT" 1292 00002DD2 0002[F504]0000- <1> 1292 00002DD8 [4F31][3731][B400]- <1> 1292 00002DDE 0002[F504]0000- <1> 1292 00002DE4 [5A31][3731][B400]- <1> 1292 00002DEA 0002[F504]0000- <1> 1292 00002DF0 [6331][3731][B400]- <1> 1292 00002DF6 0002[F504]0000 <1> 1294 00002DFC [8531][6F31][B400]- <1> installflag options6, opt6_flat_binary, dmycmd,, "Flat binary read mode", "FLAT", "FLATBIN", "FLATBINARY", "FSWITCH" 1294 00002E02 0004[F504]0000- <1> 1294 00002E08 [8A31][6F31][B400]- <1> 1294 00002E0E 0004[F504]0000- <1> 1294 00002E14 [9231][6F31][B400]- <1> 1294 00002E1A 0004[F504]0000- <1> 1294 00002E20 [9D31][6F31][B400]- <1> 1294 00002E26 0004[F504]0000 <1> 1297 00002E2C [BB31][A531][B400]- <1> installflag options6, opt6_big_stack, dmycmd,, ".BIG style stack mode", "BIG", "BIGSTACK", "ESWITCH" 1297 00002E32 0008[F504]0000- <1> 1297 00002E38 [BF31][A531][B400]- <1> 1297 00002E3E 0008[F504]0000- <1> 1297 00002E44 [C831][A531][B400]- <1> 1297 00002E4A 0008[F504]0000 <1> 1299 <1> %if _RH 1300 00002E50 [E631][D031][B600]- <1> installflag options6, opt6_rh_mode, dmycmd,, "Register dump history", "RH", "RHISTORY", "REGHISTORY" 1300 00002E56 1000[F504]0000- <1> 1300 00002E5C [E931][D031][B600]- <1> 1300 00002E62 1000[F504]0000- <1> 1300 00002E68 [F231][D031][B600]- <1> 1300 00002E6E 1000[F504]0000 <1> 1302 <1> %endif 1303 <1> %if _DEBUG && _DEBUG_COND 1304 <1> installflag options6, opt6_debug_mode,,, "Debuggable mode", "DEBUG" 1306 <1> %endif 1307 00002E74 [1532][FD31][A800]- <1> installflag options3, opt3_paging_rc, dmycmd,, "Paging RC commands mode", "PAGINGRC" 1307 00002E7A 0010[F504]0000 <1> 1309 00002E80 [3632][1E32][A800]- <1> installflag options3, opt3_paging_re, dmycmd,, "Paging RE commands mode", "PAGINGRE" 1309 00002E86 0040[F504]0000 <1> 1311 00002E8C [5D32][3F32][A800]- <1> installflag options3, opt3_paging_yy, dmycmd,, "Paging Script for lDebug mode", "PAGINGY", "PAGINGYY", "PAGINGSCRIPT" 1311 00002E92 0020[F504]0000- <1> 1311 00002E98 [6532][3F32][A800]- <1> 1311 00002E9E 0020[F504]0000- <1> 1311 00002EA4 [6E32][3F32][A800]- <1> 1311 00002EAA 0020[F504]0000 <1> 1313 <1> %ifn _ONLYNON386 1314 00002EB0 [9232][7B32][A000]- <1> installflag options, dispregs32, dmycmd,, "386 register dump mode", "RX", "REGS386", "REGS32" 1314 00002EB6 0100[F504]0000- <1> 1314 00002EBC [9532][7B32][A000]- <1> 1314 00002EC2 0100[F504]0000- <1> 1314 00002EC8 [9D32][7B32][A000]- <1> 1314 00002ECE 0100[F504]0000 <1> 1316 <1> %endif 1317 00002ED4 [BA32][A432][A000]- <1> installflag options, traceints, dmycmd,, "Trace interrupts Mode", "TM", "TRACEINTS", "TRACEINTERRUPTS" 1317 00002EDA 0200[F504]0000- <1> 1317 00002EE0 [BD32][A432][A000]- <1> 1317 00002EE6 0200[F504]0000- <1> 1317 00002EEC [C732][A432][A000]- <1> 1317 00002EF2 0200[F504]0000 <1> 1319 00002EF8 00000000 <1> dw 0, 0 1320 <1> 1321 <1> 1322 00002EFC 535F4F544845520053- <1> smcbmsg smcb_messages 1322 00002F05 5F444F53454E545259- <1> 1322 00002F0E 00535F444F53434F44- <1> 1322 00002F17 4500535F444F534441- <1> 1322 00002F20 544100535F49525153- <1> 1322 00002F29 434F444500535F4952- <1> 1322 00002F32 51534441544100535F- <1> 1322 00002F3B 43445300535F4C464E- <1> 1322 00002F44 43445300535F445042- <1> 1322 00002F4D 00535F55504200535F- <1> 1322 00002F56 53465400535F464342- <1> 1322 00002F5F 53465400535F434342- <1> 1322 00002F68 00535F49525400535F- <1> 1322 00002F71 534543544F5200535F- <1> 1322 00002F7A 4E4C5300535F454244- <1> 1322 00002F83 4100535F494E495443- <1> 1322 00002F8C 4F4E46494700535F49- <1> 1322 00002F95 4E4954464154534547- <1> 1322 00002F9E 00535F494E49545345- <1> 1322 00002FA7 43544F525345470053- <1> 1322 00002FB0 5F494E495453544143- <1> 1322 00002FB9 4B42504200535F494E- <1> 1322 00002FC2 495450535000535F45- <1> 1322 00002FCB 4E5649524F4E4D454E- <1> 1322 00002FD4 5400535F494E495449- <1> 1322 00002FDD 414C495A4500535F44- <1> 1322 00002FE6 455649434500535F44- <1> 1322 00002FEF 45564943454D454D4F- <1> 1322 00002FF8 525900535F4558434C- <1> 1322 00003001 44554D4100535F4558- <1> 1322 0000300A 434C44554D41535542- <1> 1322 00003013 00535F4558434C444C- <1> 1322 0000301C 4800535F4558434C44- <1> 1322 00003025 444F5300 <1> 1323 <1> 1324 00003029 5238364D206661756C- <1> installmessages INSTALLMESSAGES 1324 00003032 7420696E7465727275- <1> 1324 0000303B 70747320686F6F6B00- <1> 1324 00003044 4641554C5453004641- <1> 1324 0000304D 554C5400494E544641- <1> 1324 00003056 554C545300494E5446- <1> 1324 0000305F 41554C5400496E7465- <1> 1324 00003068 727275707420382074- <1> 1324 00003071 696D657220686F6F6B- <1> 1324 0000307A 00494E54303800494E- <1> 1324 00003083 54380054494D455200- <1> 1324 0000308C 496E74657272757074- <1> 1324 00003095 2032446820414D4953- <1> 1324 0000309E 20686F6F6B00494E54- <1> 1324 000030A7 324400414D49530053- <1> 1324 000030B0 657269616C20492F4F- <1> 1324 000030B9 0053455249414C0046- <1> 1324 000030C2 6F72636520496E444F- <1> 1324 000030CB 53206D6F646500494E- <1> 1324 000030D4 444F53005573652044- <1> 1324 000030DD 4F5320676574696E70- <1> 1324 000030E6 7574206D6F64650047- <1> 1324 000030EF 4554494E5055540052- <1> 1324 000030F8 207265676973746572- <1> 1324 00003101 206368616E67652068- <1> 1324 0000310A 6967686C6967687469- <1> 1324 00003113 6E670052484947484C- <1> 1324 0000311C 49474854004175746F- <1> 1324 00003125 726570656174004155- <1> 1324 0000312E 544F52455045415400- <1> 1324 00003137 524F4D2D42494F5320- <1> 1324 00003140 6F7574707574004249- <1> 1324 00003149 4F534F55540042494F- <1> 1324 00003152 534F55545055540049- <1> 1324 0000315B 4E5431304F55540049- <1> 1324 00003164 4E5431304F55545055- <1> 1324 0000316D 5400466C6174206269- <1> 1324 00003176 6E6172792072656164- <1> 1324 0000317F 206D6F646500464C41- <1> 1324 00003188 5400464C415442494E- <1> 1324 00003191 00464C415442494E41- <1> 1324 0000319A 525900465357495443- <1> 1324 000031A3 48002E424947207374- <1> 1324 000031AC 796C6520737461636B- <1> 1324 000031B5 206D6F646500424947- <1> 1324 000031BE 00424947535441434B- <1> 1324 000031C7 004553574954434800- <1> 1324 000031D0 526567697374657220- <1> 1324 000031D9 64756D702068697374- <1> 1324 000031E2 6F7279005248005248- <1> 1324 000031EB 4953544F5259005245- <1> 1324 000031F4 47484953544F525900- <1> 1324 000031FD 506167696E67205243- <1> 1324 00003206 20636F6D6D616E6473- <1> 1324 0000320F 206D6F646500504147- <1> 1324 00003218 494E47524300506167- <1> 1324 00003221 696E6720524520636F- <1> 1324 0000322A 6D6D616E6473206D6F- <1> 1324 00003233 646500504147494E47- <1> 1324 0000323C 524500506167696E67- <1> 1324 00003245 205363726970742066- <1> 1324 0000324E 6F72206C4465627567- <1> 1324 00003257 206D6F646500504147- <1> 1324 00003260 494E47590050414749- <1> 1324 00003269 4E4759590050414749- <1> 1324 00003272 4E4753435249505400- <1> 1324 0000327B 333836207265676973- <1> 1324 00003284 7465722064756D7020- <1> 1324 0000328D 6D6F64650052580052- <1> 1324 00003296 454753333836005245- <1> 1324 0000329F 475333320054726163- <1> 1324 000032A8 6520696E7465727275- <1> 1324 000032B1 707473204D6F646500- <1> 1324 000032BA 544D00545241434549- <1> 1324 000032C3 4E5453005452414345- <1> 1324 000032CC 494E54455252555054- <1> 1324 000032D5 5300 <1> 1325 <1> 1326 000032D7 756E6B6E6F776E00 <1> smcbmsg_unknown: asciz "unknown" 1327 <1> 1328 <1> %undef smcb_messages 1329 <1> %unimacro smcbtype 2.nolist 1330 <1> %unimacro smcbmsg 2-*.nolist 1331 <1> 1332 000032DF 5E204572726F7207 <1> errcarat: db "^ Error",7 1333 000032E7 0D0A00 <1> crlf: asciz 13,10 1334 <1> 1335 <1> %if _SYMBOLIC 1336 <1> pre_str_list: 1337 <1> db -1, "", 0 1338 <1> .end: 1339 <1> %endif 1340 <1> 1341 <1> 1342 000032EA 00 <1> align 4, db 0 1343 <1> msgtable_value_range: 1344 000032EC [941F][9E1F] <1> dw msg.executing, msg.executing_value_range 1345 <1> %if _ACCESS_VARIABLES_AMOUNT 1346 000032F0 [0233][0A33] <1> dw .reading, .reading_range 1347 000032F4 [8533][8D33] <1> dw .writing, .writing_range 1348 000032F8 [0834][1334] <1> dw .memoperand, .memoperand_range 1349 000032FC [2434][2E34] <1> dw .accessing, .accessing_range 1350 <1> %endif 1351 00003300 0000 <1> dw 0 1352 <1> 1353 <1> %if _ACCESS_VARIABLES_AMOUNT 1354 00003302 52454144494E4700 <1> .reading: asciz "READING" 1355 <1> .reading_range: 1356 <1> %assign iicounter 0 1357 <1> %define iiprefix "" 1358 <1> %rep _ACCESS_VARIABLES_AMOUNT 1359 <1> _autohexitsstrdef IIDEF, iicounter 1360 <1> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 1361 <1> %assign iicounter iicounter + 1 1362 <1> %define iiprefix ", " 1363 <1> %endrep 1359 <2> _autohexitsstrdef IIDEF, iicounter 1360 0000330A 46524F4D2072656164- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 1360 00003313 61647230204C454E47- <2> 1360 0000331C 544820726561646C65- <2> 1360 00003325 6E30 <2> 1361 <2> %assign iicounter iicounter + 1 1362 <2> %define iiprefix ", " 1359 <2> _autohexitsstrdef IIDEF, iicounter 1360 00003327 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 1360 00003330 616461647231204C45- <2> 1360 00003339 4E4754482072656164- <2> 1360 00003342 6C656E31 <2> 1361 <2> %assign iicounter iicounter + 1 1362 <2> %define iiprefix ", " 1359 <2> _autohexitsstrdef IIDEF, iicounter 1360 00003346 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 1360 0000334F 616461647232204C45- <2> 1360 00003358 4E4754482072656164- <2> 1360 00003361 6C656E32 <2> 1361 <2> %assign iicounter iicounter + 1 1362 <2> %define iiprefix ", " 1359 <2> _autohexitsstrdef IIDEF, iicounter 1360 00003365 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 1360 0000336E 616461647233204C45- <2> 1360 00003377 4E4754482072656164- <2> 1360 00003380 6C656E33 <2> 1361 <2> %assign iicounter iicounter + 1 1362 <2> %define iiprefix ", " 1364 00003384 00 <1> asciz 1365 00003385 57524954494E4700 <1> .writing: asciz "WRITING" 1366 <1> .writing_range: 1367 <1> %assign iicounter 0 1368 <1> %define iiprefix "" 1369 <1> %rep _ACCESS_VARIABLES_AMOUNT 1370 <1> _autohexitsstrdef IIDEF, iicounter 1371 <1> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 1372 <1> %assign iicounter iicounter + 1 1373 <1> %define iiprefix ", " 1374 <1> %endrep 1370 <2> _autohexitsstrdef IIDEF, iicounter 1371 0000338D 46524F4D2077726974- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 1371 00003396 61647230204C454E47- <2> 1371 0000339F 544820777269746C65- <2> 1371 000033A8 6E30 <2> 1372 <2> %assign iicounter iicounter + 1 1373 <2> %define iiprefix ", " 1370 <2> _autohexitsstrdef IIDEF, iicounter 1371 000033AA 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 1371 000033B3 697461647231204C45- <2> 1371 000033BC 4E4754482077726974- <2> 1371 000033C5 6C656E31 <2> 1372 <2> %assign iicounter iicounter + 1 1373 <2> %define iiprefix ", " 1370 <2> _autohexitsstrdef IIDEF, iicounter 1371 000033C9 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 1371 000033D2 697461647232204C45- <2> 1371 000033DB 4E4754482077726974- <2> 1371 000033E4 6C656E32 <2> 1372 <2> %assign iicounter iicounter + 1 1373 <2> %define iiprefix ", " 1370 <2> _autohexitsstrdef IIDEF, iicounter 1371 000033E8 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 1371 000033F1 697461647233204C45- <2> 1371 000033FA 4E4754482077726974- <2> 1371 00003403 6C656E33 <2> 1372 <2> %assign iicounter iicounter + 1 1373 <2> %define iiprefix ", " 1375 00003407 00 <1> asciz 1376 <1> 1377 00003408 4D454D4F504552414E- <1> .memoperand: asciz "MEMOPERAND" 1377 00003411 4400 <1> 1378 00003413 52454144494E472C20- <1> .memoperand_range: asciz "READING, WRITING" 1378 0000341C 57524954494E4700 <1> 1379 00003424 414343455353494E47- <1> .accessing: asciz "ACCESSING" 1379 0000342D 00 <1> 1380 0000342E 52454144494E472C20- <1> .accessing_range: asciz "READING, WRITING, EXECUTING" 1380 00003437 57524954494E472C20- <1> 1380 00003440 455845435554494E47- <1> 1380 00003449 00 <1> 1381 <1> %endif 1382 <1> 1383 <1> 1384 <1> %if _BOOTLDR 1385 <1> %define lot_list 1386 <1> %define lot_comma 1387 <1> %macro lot_entry 2.nolist 1388 <1> LOAD_%2 equ %1 1389 <1> dw LOAD_%2, .%2 1390 <1> %defstr %%string %2 1391 <1> %xdefine lot_list lot_list lot_comma .%2:, db %%string, db 0 1392 <1> %define lot_comma , 1393 <1> %endmacro 1394 <1> 1395 <1> %macro lot_messages 0-*.nolist 1396 <1> %rep (%0 / 3) 1397 <1> %1 1398 <1> %2 1399 <1> %3 1400 <1> %rotate 3 1401 <1> %endrep 1402 <1> %endmacro 1403 <1> 1404 0000344A 00 <1> align 4, db 0 1405 <1> loadoptiontable: 1406 0000344C 0100[B834] <1> lot_entry 1, SET_DL_UNIT 1407 00003450 0200[C434] <1> lot_entry 2, SET_BL_UNIT 1408 00003454 0400[D034] <1> lot_entry 4, SET_SIDI_CLUSTER 1409 00003458 1000[E134] <1> lot_entry 10h, SET_DSSI_DPT 1410 0000345C 2000[EE34] <1> lot_entry 20h, PUSH_DPT 1411 00003460 4000[F734] <1> lot_entry 40h, DATASTART_HIDDEN 1412 00003464 8000[0835] <1> lot_entry 80h, SET_AXBX_DATASTART 1413 00003468 0001[1B35] <1> lot_entry 100h, SET_DSBP_BPB 1414 0000346C 0002[2835] <1> lot_entry 200h, LBA_SET_TYPE 1415 00003470 0004[3535] <1> lot_entry 400h, MESSAGE_TABLE 1416 00003474 0008[4335] <1> lot_entry 800h, SET_AXBX_ROOT_HIDDEN 1417 00003478 0010[5835] <1> lot_entry 1000h, CMDLINE 1418 0000347C 0020[6035] <1> lot_entry 2000h, NO_BPB 1419 00003480 0040[6735] <1> lot_entry 4000h, SET_DSSI_PARTINFO 1420 00003484 00000000 <1> dw 0, 0 1421 <1> 1422 <1> .incompatible: 1423 00003488 02008000 <1> dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_DATASTART 1424 0000348C 02000008 <1> dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_ROOT_HIDDEN 1425 00003490 80000008 <1> dw LOAD_SET_AXBX_DATASTART, LOAD_SET_AXBX_ROOT_HIDDEN 1426 00003494 04001000 <1> dw LOAD_SET_SIDI_CLUSTER, LOAD_SET_DSSI_DPT 1427 00003498 00011000 <1> dw LOAD_SET_DSBP_BPB, LOAD_SET_DSSI_DPT 1428 0000349C 00200001 <1> dw LOAD_NO_BPB, LOAD_SET_DSBP_BPB 1429 000034A0 00200002 <1> dw LOAD_NO_BPB, LOAD_LBA_SET_TYPE 1430 000034A4 00200004 <1> dw LOAD_NO_BPB, LOAD_MESSAGE_TABLE 1431 000034A8 00400400 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_SIDI_CLUSTER 1432 000034AC 00401000 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSSI_DPT 1433 000034B0 00400001 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSBP_BPB 1434 000034B4 00000000 <1> dw 0, 0 1435 <1> 1436 000034B8 5345545F444C5F554E- <1> lot_messages lot_list 1436 000034C1 4954005345545F424C- <1> 1436 000034CA 5F554E495400534554- <1> 1436 000034D3 5F534944495F434C55- <1> 1436 000034DC 53544552005345545F- <1> 1436 000034E5 445353495F44505400- <1> 1436 000034EE 505553485F44505400- <1> 1436 000034F7 444154415354415254- <1> 1436 00003500 5F48494444454E0053- <1> 1436 00003509 45545F415842585F44- <1> 1436 00003512 415441535441525400- <1> 1436 0000351B 5345545F445342505F- <1> 1436 00003524 425042004C42415F53- <1> 1436 0000352D 45545F54595045004D- <1> 1436 00003536 4553534147455F5441- <1> 1436 0000353F 424C45005345545F41- <1> 1436 00003548 5842585F524F4F545F- <1> 1436 00003551 48494444454E00434D- <1> 1436 0000355A 444C494E45004E4F5F- <1> 1436 00003563 425042005345545F44- <1> 1436 0000356C 5353495F5041525449- <1> 1436 00003575 4E464F00 <1> 1437 <1> 1438 <1> %unmacro lot_entry 2.nolist 1439 <1> %unmacro lot_messages 0-*.nolist 1440 <1> 1441 <1> 1442 <1> msdos7_message_table: 1443 <1> ; the first four bytes give displacements to the various 1444 <1> ; messages. an ASCIZ message indicates that this was the 1445 <1> ; last message. a message terminated by 0FFh indicates 1446 <1> ; that the last message (displacement at table + 3) is 1447 <1> ; to follow after this message. 1448 <1> ; the maximum allowed displacement is 7Fh. the minimum 1449 <1> ; allowed displacement is 1, to avoid a zero displacement. 1450 <1> ; only the last message is terminated by a zero byte, 1451 <1> ; as that zero byte indicates the end of the message table. 1452 <1> ; (the entire table is treated as one ASCIZ string.) 1453 <1> ; MS-DOS 7.10 from MSW 98 SE seems to have at least 167h (359) 1454 <1> ; bytes allocated to its buffer for these. 1455 <1> ; 1456 <1> ; this message table was discussed in a dosemu2 repo at 1457 <1> ; https://github.com/stsp/dosemu2/issues/681 1458 00003579 03 <1> .: db .msg_invalid_system - ($ + 1) 1459 0000357A 13 <1> db .msg_io_error - ($ + 1) 1460 0000357B 01 <1> db .msg_invalid_system - ($ + 1) 1461 0000357C 1D <1> db .msg_press_any_key - ($ + 1) 1462 <1> 1463 <1> .msg_invalid_system: 1464 0000357D 0D0A496E76616C6964- <1> db 13,10,"Invalid system", -1 1464 00003586 2073797374656DFF <1> 1465 <1> 1466 <1> .msg_io_error: 1467 0000358E 0D0A492F4F20657272- <1> db 13,10,"I/O error", -1 1467 00003597 6F72FF <1> 1468 <1> 1469 <1> .msg_press_any_key: 1470 0000359A 0D0A4368616E676520- <1> db 13,10,"Change disk and press any key",13,10,0 1470 000035A3 6469736B20616E6420- <1> 1470 000035AC 707265737320616E79- <1> 1470 000035B5 206B65790D0A00 <1> 1471 <1> .end: 1472 <1> .size: equ .end - . 1473 <1> 1474 <1> %if .size > 150h 1475 <1> %error Message table too large! 1476 <1> %endif 1477 <1> 1478 <1> 1479 <1> 1480 <1> align 4, db 0 1481 <1> loadsettings: 1482 <1> istruc LOADSETTINGS 1483 000035BC [5B19] <1> at lsKernelName, dw msg.ldos_kernel_name 1484 000035BE [D119] <1> at lsAddName, dw msg.addname_empty 1485 000035C0 6000 <1> at lsMinPara, dw 60h 1486 000035C2 0000 <1> at lsMaxPara, dw 0 1487 000035C4 0010 <1> at lsOptions, dw LOAD_CMDLINE 1488 000035C6 0002 <1> at lsSegment, dw 200h 1489 000035C8 00040000 <1> at lsEntry, dd 400h 1490 000035CC 007CFFFF <1> at lsBPB, dw 7C00h, -1 1491 000035D0 FC03 <1> at lsCheckOffset, dw 1020 1492 000035D2 6C44 <1> at lsCheckValue, db "lD" 1493 000035D4 4C444F5300 <1> at lsName, asciz "LDOS" 1494 000035D9 00 <1> iend 1495 <1> istruc LOADSETTINGS 1496 000035DC [3E19] <1> at lsKernelName, dw msg.freedos_kernel_name 1497 000035DE [D119] <1> at lsAddName, dw msg.addname_empty 1498 000035E0 2000 <1> at lsMinPara, dw 20h 1499 000035E2 FFFF <1> at lsMaxPara, dw -1 1500 000035E4 0300 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 1501 000035E6 6000 <1> at lsSegment, dw 60h 1502 000035E8 00000000 <1> at lsEntry, dd 0 1503 000035EC 007CFFFF <1> at lsBPB, dw 7C00h, -1 1504 000035F0 0046524545- <1> at lsName, asciz "FREEDOS" 1504 000035F8 444F5300 <1> 1505 <1> iend 1506 <1> istruc LOADSETTINGS 1507 000035FC [4919] <1> at lsKernelName, dw msg.dosc_kernel_name 1508 000035FE [D119] <1> at lsAddName, dw msg.addname_empty 1509 00003600 2000 <1> at lsMinPara, dw 20h 1510 00003602 FFFF <1> at lsMaxPara, dw -1 1511 00003604 0300 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 1512 00003606 0020 <1> at lsSegment, dw 2000h 1513 00003608 00000000 <1> at lsEntry, dd 0 1514 0000360C 007C0000 <1> at lsBPB, dw 7C00h, 0 1515 00003610 00444F5343- <1> at lsName, asciz "DOSC" 1515 00003618 00 <1> 1516 00003619 00 <1> iend 1517 <1> istruc LOADSETTINGS 1518 0000361C [5119] <1> at lsKernelName, dw msg.edrdos_kernel_name 1519 0000361E [D119] <1> at lsAddName, dw msg.addname_empty 1520 00003620 2000 <1> at lsMinPara, dw 20h 1521 00003622 FFFF <1> at lsMaxPara, dw -1 1522 00003624 0301 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT | LOAD_SET_DSBP_BPB 1524 00003626 7000 <1> at lsSegment, dw 70h 1525 00003628 00000000 <1> at lsEntry, dd 0 1526 0000362C 007CFFFF <1> at lsBPB, dw 7C00h, -1 1527 00003630 0045445244- <1> at lsName, asciz "EDRDOS" 1527 00003638 4F5300 <1> 1528 0000363B 00 <1> iend 1529 <1> istruc LOADSETTINGS 1530 0000363C [6419] <1> at lsKernelName, dw msg.msdos6_kernel_name 1531 0000363E [6B19] <1> at lsAddName, dw msg.msdos6_add_name 1532 00003640 2000 <1> at lsMinPara, dw 20h 1533 00003642 6000 <1> at lsMaxPara, dw 60h 1534 00003644 F100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 1537 00003646 7000 <1> at lsSegment, dw 70h 1538 00003648 00000000 <1> at lsEntry, dd 0 1539 0000364C 007C0000 <1> at lsBPB, dw 7C00h, 0 1540 00003650 004D53444F- <1> at lsName, asciz "MSDOS6" 1540 00003658 533600 <1> 1541 0000365B 00 <1> iend 1542 <1> istruc LOADSETTINGS 1543 0000365C [A619] <1> at lsKernelName, dw msg.rxdos.0_kernel_name 1544 0000365E [BD19] <1> at lsAddName, dw msg.rxdos.0_add_name 1545 00003660 2000 <1> at lsMinPara, dw 20h 1546 00003662 6000 <1> at lsMaxPara, dw 60h 1547 00003664 3108 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 1549 00003666 7000 <1> at lsSegment, dw 70h 1550 00003668 00000000 <1> at lsEntry, dd 0 1551 0000366C 007C0000 <1> at lsBPB, dw 7C00h, 0 1552 00003670 005258444F- <1> at lsName, asciz "RXDOS.0" 1552 00003678 532E3000 <1> 1553 <1> iend 1554 <1> istruc LOADSETTINGS 1555 0000367C [B319] <1> at lsKernelName, dw msg.rxdos.1_kernel_name 1556 0000367E [BD19] <1> at lsAddName, dw msg.rxdos.1_add_name 1557 00003680 2000 <1> at lsMinPara, dw 20h 1558 00003682 6000 <1> at lsMaxPara, dw 60h 1559 00003684 3108 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 1561 00003686 7000 <1> at lsSegment, dw 70h 1562 00003688 00000000 <1> at lsEntry, dd 0 1563 0000368C 007C0000 <1> at lsBPB, dw 7C00h, 0 1564 00003690 005258444F- <1> at lsName, asciz "RXDOS.1" 1564 00003698 532E3100 <1> 1565 <1> iend 1566 <1> istruc LOADSETTINGS 1567 0000369C [C719] <1> at lsKernelName, dw msg.rxdos.2_kernel_name 1568 0000369E [D119] <1> at lsAddName, dw msg.addname_empty 1569 000036A0 6000 <1> at lsMinPara, dw 60h 1570 000036A2 0000 <1> at lsMaxPara, dw 0 1571 000036A4 0010 <1> at lsOptions, dw LOAD_CMDLINE 1572 000036A6 7000 <1> at lsSegment, dw 70h 1573 000036A8 00040000 <1> at lsEntry, dd 400h 1574 000036AC 007CFFFF <1> at lsBPB, dw 7C00h, -1 1575 000036B0 005258444F- <1> at lsName, asciz "RXDOS.2" 1575 000036B8 532E3200 <1> 1576 <1> iend 1577 <1> istruc LOADSETTINGS 1578 000036BC [C719] <1> at lsKernelName, dw msg.rxdos.2_kernel_name 1579 000036BE [D119] <1> at lsAddName, dw msg.addname_empty 1580 000036C0 6000 <1> at lsMinPara, dw 60h 1581 000036C2 0000 <1> at lsMaxPara, dw 0 1582 000036C4 0010 <1> at lsOptions, dw LOAD_CMDLINE 1583 000036C6 0002 <1> at lsSegment, dw 200h 1584 000036C8 00040000 <1> at lsEntry, dd 400h 1585 000036CC 007CFFFF <1> at lsBPB, dw 7C00h, -1 1586 000036D0 FC03 <1> at lsCheckOffset, dw 1020 1587 000036D2 6C44 <1> at lsCheckValue, db "lD" 1588 000036D4 5258444F532E3300 <1> at lsName, asciz "RXDOS.3" 1589 <1> iend 1590 <1> istruc LOADSETTINGS 1591 000036DC [7519] <1> at lsKernelName, dw msg.ibmdos_kernel_name 1592 000036DE [8019] <1> at lsAddName, dw msg.ibmdos_add_name 1593 000036E0 2000 <1> at lsMinPara, dw 20h 1594 000036E2 8000 <1> at lsMaxPara, dw 80h 1595 000036E4 F100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 1598 000036E6 7000 <1> at lsSegment, dw 70h 1599 000036E8 00000000 <1> at lsEntry, dd 0 1600 000036EC 007C0000 <1> at lsBPB, dw 7C00h, 0 1601 000036F0 0049424D44- <1> at lsName, asciz "IBMDOS" 1601 000036F8 4F5300 <1> 1602 000036FB 00 <1> iend 1603 <1> istruc LOADSETTINGS 1604 000036FC [6419] <1> at lsKernelName, dw msg.msdos7_kernel_name 1605 000036FE [D119] <1> at lsAddName, dw msg.addname_empty 1606 00003700 4000 <1> at lsMinPara, dw 40h 1607 00003702 8000 <1> at lsMaxPara, dw 80h 1608 00003704 6506 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_SIDI_CLUSTER | LOAD_DATASTART_HIDDEN | LOAD_PUSH_DPT | LOAD_LBA_SET_TYPE | LOAD_MESSAGE_TABLE 1611 00003706 7000 <1> at lsSegment, dw 70h 1612 00003708 00020000 <1> at lsEntry, dd 200h 1613 0000370C 007CFFFF <1> at lsBPB, dw 7C00h, -1 1614 00003710 0002 <1> at lsCheckOffset, dw 200h 1615 00003712 424A <1> at lsCheckValue, db "BJ" 1616 00003714 4D53444F533700 <1> at lsName, asciz "MSDOS7" 1617 0000371B 00 <1> iend 1618 <1> istruc LOADSETTINGS 1619 0000371C [8B19] <1> at lsKernelName, dw msg.ntldr_kernel_name 1620 0000371E [D119] <1> at lsAddName, dw msg.addname_empty 1621 00003720 2000 <1> at lsMinPara, dw 20h 1622 00003722 FFFF <1> at lsMaxPara, dw -1 1623 00003724 4100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 1625 00003726 0020 <1> at lsSegment, dw 2000h 1626 00003728 00000000 <1> at lsEntry, dd 0 1627 0000372C 007C0000 <1> at lsBPB, dw 7C00h, 0 1628 00003730 004E544C44- <1> at lsName, asciz "NTLDR" 1628 00003738 5200 <1> 1629 0000373A 00 <1> iend 1630 <1> istruc LOADSETTINGS 1631 0000373C [9119] <1> at lsKernelName, dw msg.bootmgr_kernel_name 1632 0000373E [D119] <1> at lsAddName, dw msg.addname_empty 1633 00003740 2000 <1> at lsMinPara, dw 20h 1634 00003742 FFFF <1> at lsMaxPara, dw -1 1635 00003744 4100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 1637 00003746 0020 <1> at lsSegment, dw 2000h 1638 00003748 00000000 <1> at lsEntry, dd 0 1639 0000374C 007C0000 <1> at lsBPB, dw 7C00h, 0 1640 00003750 00424F4F54- <1> at lsName, asciz "BOOTMGR" 1640 00003758 4D475200 <1> 1641 <1> iend 1642 <1> istruc LOADSETTINGS 1643 0000375C [9919] <1> at lsKernelName, dw msg.chain_kernel_name 1644 0000375E [D119] <1> at lsAddName, dw msg.addname_empty 1645 00003760 2000 <1> at lsMinPara, dw paras(512) 1646 00003762 0002 <1> at lsMaxPara, dw paras(8192) 1647 00003764 0160 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_DSSI_PARTINFO | LOAD_NO_BPB 1649 00003766 C007 <1> at lsSegment, dw 7C0h 1650 00003768 007C40F8 <1> at lsEntry, dw 7C00h, -7C0h 1651 0000376C 007C0000 <1> at lsBPB, dw 7C00h, 0 1652 00003770 FE01 <1> at lsCheckOffset, dw 510 1653 00003772 55AA <1> at lsCheckValue, dw 0AA55h 1654 00003774 434841494E00 <1> at lsName, asciz "CHAIN" 1655 0000377A 00 <1> iend 1656 0000377C 0000 <1> dw 0 1657 <1> %endif 1658 <1> 1659 <1> 1660 <1> %if _APPLICATION || _DEVICE 1661 0000377E 0D21 <1> dskerrs: db dskerr0-dskerrs,dskerr1-dskerrs 1662 00003780 3444 <1> db dskerr2-dskerrs,dskerr3-dskerrs 1663 00003782 5494 <1> db dskerr4-dskerrs,dskerr9-dskerrs 1664 00003784 6570 <1> db dskerr6-dskerrs,dskerr7-dskerrs 1665 00003786 8394 <1> db dskerr8-dskerrs,dskerr9-dskerrs 1666 00003788 A2AE <1> db dskerra-dskerrs,dskerrb-dskerrs 1667 0000378A B9 <1> db dskerrc-dskerrs 1668 0000378B 57726974652070726F- <1> dskerr0: asciz "Write protect error" 1668 00003794 74656374206572726F- <1> 1668 0000379D 7200 <1> 1669 0000379F 556E6B6E6F776E2075- <1> dskerr1: asciz "Unknown unit error" 1669 000037A8 6E6974206572726F72- <1> 1669 000037B1 00 <1> 1670 000037B2 4472697665206E6F74- <1> dskerr2: asciz "Drive not ready" 1670 000037BB 20726561647900 <1> 1671 000037C2 556E6B6E6F776E2063- <1> dskerr3: asciz "Unknown command" 1671 000037CB 6F6D6D616E6400 <1> 1672 000037D2 44617461206572726F- <1> dskerr4: asciz "Data error (CRC)" 1672 000037DB 7220284352432900 <1> 1673 000037E3 5365656B206572726F- <1> dskerr6: asciz "Seek error" 1673 000037EC 7200 <1> 1674 000037EE 556E6B6E6F776E206D- <1> dskerr7: asciz "Unknown media type" 1674 000037F7 656469612074797065- <1> 1674 00003800 00 <1> 1675 00003801 536563746F72206E6F- <1> dskerr8: asciz "Sector not found" 1675 0000380A 7420666F756E6400 <1> 1676 00003812 556E6B6E6F776E2065- <1> dskerr9: asciz "Unknown error" 1676 0000381B 72726F7200 <1> 1677 00003820 577269746520666175- <1> dskerra: asciz "Write fault" 1677 00003829 6C7400 <1> 1678 0000382C 52656164206661756C- <1> dskerrb: asciz "Read fault" 1678 00003835 7400 <1> 1679 00003837 47656E6572616C2066- <1> dskerrc: asciz "General failure" 1679 00003840 61696C75726500 <1> 1680 00003847 207265616400 <1> reading: asciz " read" 1681 0000384D 207772697400 <1> writing: asciz " writ" 1682 00003853 696E67206472697665- <1> drive: db "ing drive " 1682 0000385C 20 <1> 1683 0000385D 5F00 <1> driveno: asciz "_" 1684 <1> %endif 1685 0000385F 383038362F383800 <1> msg8088: asciz "8086/88" 1686 00003867 78383600 <1> msgx86: asciz "x86" 1687 0000386B 20776974686F757420- <1> no_copr: asciz " without coprocessor" 1687 00003874 636F70726F63657373- <1> 1687 0000387D 6F7200 <1> 1688 00003880 207769746820636F70- <1> has_copr: asciz " with coprocessor" 1688 00003889 726F636573736F7200 <1> 1689 00003892 207769746820323837- <1> has_287: asciz " with 287" 1689 0000389B 00 <1> 1690 0000389C 7472616365206D6F64- <1> tmodes: db "trace mode is " 1690 000038A5 6520697320 <1> 1691 000038AA 5F202D20696E746572- <1> tmodev: asciz "_ - interrupts are " 1691 000038B3 727570747320617265- <1> 1691 000038BC 2000 <1> 1692 000038BE 74726163656400 <1> tmode1: asciz "traced" 1693 000038C5 70726F636573736564- <1> tmode0: asciz "processed" 1693 000038CE 00 <1> 1694 000038CF 2028756E7573656429- <1> unused: asciz " (unused)" 1694 000038D8 00 <1> 1695 <1> needsmsg: 1696 000038D9 5B6E6565647320 <1> .: db "[needs " 1697 <1> .digit_x_ofs: equ $ - . 1698 000038E0 7838 <1> db "x8" 1699 <1> .digit_6_ofs: equ $ - . 1700 000038E2 365D <1> db "6]" 1701 <1> needsmsg_L: equ $-needsmsg 1702 000038E4 5B6E65656473206D61- <1> needsmath: db "[needs math coprocessor]" 1702 000038ED 746820636F70726F63- <1> 1702 000038F6 6573736F725D <1> 1703 <1> needsmath_L: equ $-needsmath 1704 000038FC 5B6F62736F6C657465- <1> obsolete: db "[obsolete]" 1704 00003905 5D <1> 1705 <1> obsolete_L: equ $-obsolete 1706 00003906 446976696465206572- <1> int0msg: asciz "Divide error",13,10 1706 0000390F 726F720D0A00 <1> 1707 00003915 556E65787065637465- <1> int1msg: asciz "Unexpected single-step interrupt",13,10 1707 0000391E 642073696E676C652D- <1> 1707 00003927 7374657020696E7465- <1> 1707 00003930 72727570740D0A00 <1> 1708 00003938 556E65787065637465- <1> int3msg: asciz "Unexpected breakpoint interrupt",13,10 1708 00003941 6420627265616B706F- <1> 1708 0000394A 696E7420696E746572- <1> 1708 00003953 727570740D0A00 <1> 1709 <1> %if _CATCHINT06 1710 0000395A 496E76616C6964206F- <1> int6msg: asciz "Invalid opcode",13,10 1710 00003963 70636F64650D0A00 <1> 1711 <1> %endif 1712 <1> %if _CATCHINT08 1713 0000396B 446574656374656420- <1> int8msg: asciz "Detected Control pressed for a while",13,10 1713 00003974 436F6E74726F6C2070- <1> 1713 0000397D 72657373656420666F- <1> 1713 00003986 722061207768696C65- <1> 1713 0000398F 0D0A00 <1> 1714 00003992 446574656374656420- <1> int8_kbd_msg: asciz "Detected Control pressed for a while (Keyboard enabled)",13,10 1714 0000399B 436F6E74726F6C2070- <1> 1714 000039A4 72657373656420666F- <1> 1714 000039AD 722061207768696C65- <1> 1714 000039B6 20284B6579626F6172- <1> 1714 000039BF 6420656E61626C6564- <1> 1714 000039C8 290D0A00 <1> 1715 <1> runint_ctrlc_msg: 1716 000039CC 446574656374656420- <1> asciz "Detected double Control-C via serial",13,10 1716 000039D5 646F75626C6520436F- <1> 1716 000039DE 6E74726F6C2D432076- <1> 1716 000039E7 69612073657269616C- <1> 1716 000039F0 0D0A00 <1> 1717 <1> %endif 1718 <1> %if _CATCHINT07 1719 <1> int7msg: asciz "No x87 present",13,10 1720 <1> %endif 1721 <1> %if _CATCHINT0C 1722 000039F3 537461636B20666175- <1> int0Cmsg: asciz "Stack fault (in R86M)",13,10 1722 000039FC 6C742028696E205238- <1> 1722 00003A05 364D290D0A00 <1> 1723 <1> %endif 1724 <1> %if _CATCHINT0D 1725 00003A0B 47656E6572616C2070- <1> int0Dmsg: asciz "General protection fault (in R86M)",13,10 1725 00003A14 726F74656374696F6E- <1> 1725 00003A1D 206661756C74202869- <1> 1725 00003A26 6E205238364D290D0A- <1> 1725 00003A2F 00 <1> 1726 <1> %endif 1727 <1> %if _CATCHINT18 1728 00003A30 4469736B6C65737320- <1> int18msg: asciz "Diskless boot hook called",13,10 1728 00003A39 626F6F7420686F6F6B- <1> 1728 00003A42 2063616C6C65640D0A- <1> 1728 00003A4B 00 <1> 1729 <1> %endif 1730 <1> %if _CATCHINT19 1731 00003A4C 426F6F74206C6F6164- <1> int19msg: asciz "Boot load called",13,10 1731 00003A55 2063616C6C65640D0A- <1> 1731 00003A5E 00 <1> 1732 <1> %endif 1733 <1> %if _CATCHSYSREQ 1734 <1> sysreqmsg: asciz "SysReq detected",13,10 1735 <1> %endif 1736 <1> %if _PM 1737 <1> %if _CATCHEXC06 1738 <1> exc6msg: asciz "Invalid opcode fault",13,10 1739 <1> %endif 1740 <1> %if _CATCHEXC0C 1741 <1> excCmsg: asciz "Stack fault",13,10 1742 <1> %endif 1743 <1> excDmsg: asciz "General protection fault",13,10 1744 <1> %endif 1745 <1> %if _PM || _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 1746 <1> %if _EXCCSIP 1747 00003A5F 43533A49503D <1> excloc: db "CS:IP=" 1748 00003A65 202020203A20202020- <1> exccsip: asciz " : ",13,10 1748 00003A6E 0D0A00 <1> 1749 <1> %endif 1750 <1> %if _AREAS 1751 <1> msg.area_hh_indirection_memory_access: 1752 00003A71 45787072657373696F- <1> asciz "Expression indirection fault: " 1752 00003A7A 6E20696E6469726563- <1> 1752 00003A83 74696F6E206661756C- <1> 1752 00003A8C 743A2000 <1> 1753 <1> msg.area_rr_variable_read_access: 1754 00003A90 4D656D6F7279207661- <1> asciz "Memory variable read access fault: " 1754 00003A99 726961626C65207265- <1> 1754 00003AA2 616420616363657373- <1> 1754 00003AAB 206661756C743A2000 <1> 1755 <1> msg.area_rr_variable_write_access: 1756 00003AB4 4D656D6F7279207661- <1> asciz "Memory variable write access fault: " 1756 00003ABD 726961626C65207772- <1> 1756 00003AC6 697465206163636573- <1> 1756 00003ACF 73206661756C743A20- <1> 1756 00003AD8 00 <1> 1757 <1> msg.area_uu_referenced_memory_access: 1758 00003AD9 0D0A44697361737365- <1> asciz 13,10,"Disassembly referenced memory fault: " 1758 00003AE2 6D626C792072656665- <1> 1758 00003AEB 72656E636564206D65- <1> 1758 00003AF4 6D6F7279206661756C- <1> 1758 00003AFD 743A2000 <1> 1759 <1> msg.area_uu_simulate_scas: 1760 00003B01 446973617373656D62- <1> asciz "Disassembly SCAS simulation fault: " 1760 00003B0A 6C7920534341532073- <1> 1760 00003B13 696D756C6174696F6E- <1> 1760 00003B1C 206661756C743A2000 <1> 1761 <1> msg.area_uu_simulate_cmps: 1762 00003B25 446973617373656D62- <1> asciz "Disassembly CMPS simulation fault: " 1762 00003B2E 6C7920434D50532073- <1> 1762 00003B37 696D756C6174696F6E- <1> 1762 00003B40 206661756C743A2000 <1> 1763 <1> msg.area_aa_access: 1764 00003B49 417373656D626C7920- <1> asciz "Assembly fault: " 1764 00003B52 6661756C743A2000 <1> 1765 <1> msg.area_dd_access: 1766 00003B5A 44756D702064617461- <1> asciz "Dump data fault: " 1766 00003B63 206661756C743A2000 <1> 1767 <1> msg.area_ee_interactive_access: 1768 00003B6C 0D0A <1> db 13,10 1769 <1> msg.area_ee_access: 1770 00003B6E 456E74657220646174- <1> asciz "Enter data fault: " 1770 00003B77 61206661756C743A20- <1> 1770 00003B80 00 <1> 1771 <1> msg.area_rr_access: 1772 00003B81 526567697374657220- <1> asciz "Register command fault: " 1772 00003B8A 636F6D6D616E642066- <1> 1772 00003B93 61756C743A2000 <1> 1773 <1> msg.area_sss_access: 1774 00003B9A 53656172636820636F- <1> asciz "Search command fault: " 1774 00003BA3 6D6D616E6420666175- <1> 1774 00003BAC 6C743A2000 <1> 1775 <1> msg.area_run_access: 1776 00003BB1 52756E20636F6D6D61- <1> asciz "Run command fault: " 1776 00003BBA 6E64206661756C743A- <1> 1776 00003BC3 2000 <1> 1777 <1> msg.area_uu_access: 1778 00003BC5 446973617373656D62- <1> asciz "Disassembly fault: " 1778 00003BCE 6C79206661756C743A- <1> 1778 00003BD7 2000 <1> 1779 <1> %endif 1780 <1> %endif 1781 <1> %if _PM 1782 <1> excEmsg: asciz "Page fault",13,10 1783 <1> %if _BREAK_INSTALLDPMI 1784 <1> installdpmimsg: asciz "Entered Protected Mode",13,10 1785 <1> %endif 1786 <1> nodosext: asciz "Command not supported in protected mode without a DOS extender",13,10 1787 <1> nopmsupp: asciz "Command not supported in protected mode",13,10 1788 <1> %if _DISPHOOK 1789 <1> dpmihook: db "DPMI entry hooked, new entry=" 1790 <1> dpmihookcs: asciz "____:",_4digitshex(mydpmientry+DATASECTIONFIXUP),13,10 1791 <1> %if _DEBUG 1792 <1> dpmihookamis: asciz "DPMI entry hooked by other debugger with AMIS callout",13,10 1793 <1> %endif 1794 <1> %endif 1795 <1> msg.dpmi_no_hook: asciz "DPMI entry cannot be hooked!",13,10 1796 <1> nodesc: asciz "resource not accessible in real mode",13,10 1797 <1> ;descwrong: asciz "descriptor not accessible",13,10 1798 <1> gatewrong: asciz "gate not accessible",13,10 1799 <1> msg.msdos: asciz "MS-DOS" 1800 <1> descriptor: db "---- base=" 1801 <1> .base: db "-------- limit=" 1802 <1> .limit: db "-------- attr=" 1803 <1> .attrib: db "----",13,10 1804 <1> asciz 1805 <1> %endif ; _PM 1806 00003BD9 4572726F7220696E20- <1> ph_msg: asciz "Error in sequence of calls to hack.",13,10 1806 00003BE2 73657175656E636520- <1> 1806 00003BEB 6F662063616C6C7320- <1> 1806 00003BF4 746F206861636B2E0D- <1> 1806 00003BFD 0A00 <1> 1807 <1> 1808 00003BFF 0D0A50726F6772616D- <1> progtrm: db 13,10,"Program terminated normally (" 1808 00003C08 207465726D696E6174- <1> 1808 00003C11 6564206E6F726D616C- <1> 1808 00003C1A 6C792028 <1> 1809 00003C1E 5F5F5F5F290D0A00 <1> progexit: asciz "____)",13,10 1810 <1> %if _APPLICATION || _DEVICE 1811 00003C26 45584520616E642048- <1> nowhexe: asciz "EXE and HEX files cannot be written",13,10 1811 00003C2F 45582066696C657320- <1> 1811 00003C38 63616E6E6F74206265- <1> 1811 00003C41 207772697474656E0D- <1> 1811 00003C4A 0A00 <1> 1812 00003C4C 43616E6E6F74207772- <1> nownull: asciz "Cannot write: no file name given",13,10 1812 00003C55 6974653A206E6F2066- <1> 1812 00003C5E 696C65206E616D6520- <1> 1812 00003C67 676976656E0D0A00 <1> 1813 00003C6F 4572726F7220696E20- <1> msg.hexerror: asciz "Error in HEX file",13,10 1813 00003C78 4845582066696C650D- <1> 1813 00003C81 0A00 <1> 1814 00003C83 57726974696E672000 <1> wwmsg1: asciz "Writing " 1815 00003C8C 2062797465730D0A00 <1> wwmsg2: asciz " bytes",13,10 1816 00003C95 4469736B2066756C6C- <1> diskful: asciz "Disk full",13,10 1816 00003C9E 0D0A00 <1> 1817 00003CA1 4572726F7220 <1> openerr: db "Error " 1818 00003CA7 5F5F5F5F206F70656E- <1> openerr1: asciz "____ opening file",13,10 1818 00003CB0 696E672066696C650D- <1> 1818 00003CB9 0A00 <1> 1819 00003CBB 46696C65206E6F7420- <1> doserr2: asciz "File not found",13,10 1819 00003CC4 666F756E640D0A00 <1> 1820 00003CCC 50617468206E6F7420- <1> doserr3: asciz "Path not found",13,10 1820 00003CD5 666F756E640D0A00 <1> 1821 00003CDD 416363657373206465- <1> doserr5: asciz "Access denied",13,10 1821 00003CE6 6E6965640D0A00 <1> 1822 00003CED 496E73756666696369- <1> doserr8: asciz "Insufficient memory",13,10 1822 00003CF6 656E74206D656D6F72- <1> 1822 00003CFF 790D0A00 <1> 1823 00003D03 496E76616C69642066- <1> doserr11: asciz "Invalid format",13,10 1823 00003D0C 6F726D61740D0A00 <1> 1824 <1> %endif 1825 <1> 1826 <1> %if _EMS 1827 <1> ;emmname: db "EMMXXXX0" 1828 00003D14 454D53206E6F742069- <1> emsnot: asciz "EMS not installed",13,10 1828 00003D1D 6E7374616C6C65640D- <1> 1828 00003D26 0A00 <1> 1829 00003D28 454D5320696E746572- <1> emserr1: asciz "EMS internal error",13,10 1829 00003D31 6E616C206572726F72- <1> 1829 00003D3A 0D0A00 <1> 1830 00003D3D 48616E646C65206E6F- <1> emserr3: asciz "Handle not found",13,10 1830 00003D46 7420666F756E640D0A- <1> 1830 00003D4F 00 <1> 1831 00003D50 4E6F20667265652068- <1> emserr5: asciz "No free handles",13,10 1831 00003D59 616E646C65730D0A00 <1> 1832 00003D62 546F74616C20706167- <1> emserr7: asciz "Total pages exceeded",13,10 1832 00003D6B 657320657863656564- <1> 1832 00003D74 65640D0A00 <1> 1833 00003D79 467265652070616765- <1> emserr8: asciz "Free pages exceeded",13,10 1833 00003D82 732065786365656465- <1> 1833 00003D8B 640D0A00 <1> 1834 00003D8F 506172616D65746572- <1> emserr9: asciz "Parameter error",13,10 1834 00003D98 206572726F720D0A00 <1> 1835 00003DA1 4C6F676963616C2070- <1> emserra: asciz "Logical page out of range",13,10 1835 00003DAA 616765206F7574206F- <1> 1835 00003DB3 662072616E67650D0A- <1> 1835 00003DBC 00 <1> 1836 00003DBD 506879736963616C20- <1> emserrb: asciz "Physical page out of range",13,10 1836 00003DC6 70616765206F757420- <1> 1836 00003DCF 6F662072616E67650D- <1> 1836 00003DD8 0A00 <1> 1837 <1> align 2, db 0 1838 00003DDA [283D][283D]0000- <1> emserrs: dw emserr1,emserr1,0,emserr3,0,emserr5,0,emserr7 1838 00003DE0 [3D3D]0000[503D]00- <1> 1838 00003DE7 00[623D] <1> 1839 00003DEA [793D][8F3D][A13D]- <1> dw emserr8,emserr9,emserra,emserrb 1839 00003DF0 [BD3D] <1> 1840 00003DF2 454D53206572726F72- <1> emserrx: asciz "EMS error " 1840 00003DFB 2000 <1> 1841 00003DFD 48616E646C65206372- <1> xaans: db "Handle created = " 1841 00003E06 6561746564203D20 <1> 1842 00003E0E 5F5F5F5F0D0A00 <1> xaans1: asciz "____",13,10 1843 00003E15 48616E646C6520 <1> xdans: db "Handle " 1844 00003E1C 5F5F5F5F206465616C- <1> xdans1: asciz "____ deallocated",13,10 1844 00003E25 6C6F63617465640D0A- <1> 1844 00003E2E 00 <1> 1845 00003E2F 48616E646C65207265- <1> xrans: asciz "Handle reallocated",13,10 1845 00003E38 616C6C6F6361746564- <1> 1845 00003E41 0D0A00 <1> 1846 00003E44 4C6F676963616C2070- <1> xmans: db "Logical page " 1846 00003E4D 61676520 <1> 1847 00003E51 5F5F5F5F206D617070- <1> xmans1: db "____ mapped to physical page " 1847 00003E5A 656420746F20706879- <1> 1847 00003E63 736963616C20706167- <1> 1847 00003E6C 6520 <1> 1848 00003E6E 5F5F0D0A00 <1> xmans2: asciz "__",13,10 1849 00003E73 48616E646C6520 <1> xsstr1: db "Handle " 1850 00003E7A 5F5F5F5F2068617320 <1> xsstr1a: db "____ has " 1851 00003E83 5F5F5F5F2070616765- <1> xsstr1b: asciz "____ pages allocated",13,10 1851 00003E8C 7320616C6C6F636174- <1> 1851 00003E95 65640D0A00 <1> 1852 00003E9A 706879732E20706167- <1> xsstr2: db "phys. page " 1852 00003EA3 6520 <1> 1853 00003EA5 5F5F203D207365676D- <1> xsstr2a: db "__ = segment " 1853 00003EAE 656E7420 <1> 1854 00003EB2 5F5F5F5F202000 <1> xsstr2b: asciz "____ " 1855 00003EB9 5F5F5F5F206F662061- <1> xsstr3: db "____ of a total " 1855 00003EC2 20746F74616C20 <1> 1856 00003EC9 5F5F5F5F20454D5320- <1> xsstr3a: asciz "____ EMS " 1856 00003ED2 00 <1> 1857 00003ED3 657320686176652062- <1> xsstr4: asciz "es have been allocated",13,10 1857 00003EDC 65656E20616C6C6F63- <1> 1857 00003EE5 617465640D0A00 <1> 1858 00003EEC 70616700 <1> xsstrpg: asciz "pag" 1859 00003EF0 68616E646C00 <1> xsstrhd: asciz "handl" 1860 00003EF6 6E6F206D6170706162- <1> xsnopgs: asciz "no mappable pages",13,10,13,10 1860 00003EFF 6C652070616765730D- <1> 1860 00003F08 0A0D0A00 <1> 1861 <1> %endif 1862 <1> 1863 <1> align 4, db 0 1864 <1> flagbits: 1865 00003F0C 000800040002800040- <1> .: dw 800h,400h,200h, 80h,040h,010h,004h,001h 1865 00003F15 00100004000100 <1> 1866 <1> .amount: equ ($ - .) / 2 1867 00003F1C 4F56444E45494E475A- <1> flagson: dw "OV","DN","EI","NG","ZR","AC","PE","CY" 1867 00003F25 52414350454359 <1> 1868 00003F2C 4E5655504449504C4E- <1> flagsoff: dw "NV","UP","DI","PL","NZ","NA","PO","NC" 1868 00003F35 5A4E41504F4E43 <1> 1869 00003F3C 4F464446494653465A- <1> flagnames: dw "OF","DF","IF","SF","ZF","AF","PF","CF" 1869 00003F45 46414650464346 <1> 1870 <1> %if _REGSREADABLEFLAGS 1871 00003F4C 4F314431493153315A- <1> flagson_style23:dw "O1","D1","I1","S1","Z1","A1","P1","C1" 1871 00003F55 31413150314331 <1> 1872 00003F5C 4F304430493053305A- <1> flagsoff_style2:dw "O0","D0","I0","S0","Z0","A0","P0","C0" 1872 00003F65 30413050304330 <1> 1873 00003F6C 4F5F445F495F535F5A- <1> flagsoff_style3:dw "O_","D_","I_","S_","Z_","A_","P_","C_" 1873 00003F75 5F415F505F435F <1> 1874 <1> %endif 1875 <1> %if _40COLUMNS 1876 <1> flagbits_for_40: equ 1____0____0____1____1____0____0____1b 1877 <1> flagbits_for_80: equ 1____1____1____1____1____1____1____1b 1878 <1> flagbits_for_shl: equ 16 - flagbits.amount 1879 <1> 1880 <1> align 2, db 0 1881 <1> shortflagbits: 1882 00003F7C 00040002 <1> .: dw 400h, 200h 1883 <1> .amount: equ ($ - .) / 2 1884 00003F80 44204520 <1> shortflagson: dw "D ", "E " 1885 00003F84 55204420 <1> shortflagsoff: dw "U ", "D " 1886 <1> %endif 1887 <1> 1888 <1> align 4, db 0 1889 <1> table_length_keywords: 1890 00003F88 1E00[C81E] <1> dw 30, msg.gib 1891 00003F8C 1400[CC1E] <1> dw 20, msg.mib 1892 00003F90 0A00[D01E] <1> dw 10, msg.kib 1893 00003F94 0900[D41E] <1> dw 9, msg.pages 1894 00003F98 0400[DA1E] <1> dw 4, msg.paragraphs 1895 00003F9C 0400[E51E] <1> dw 4, msg.paras 1896 00003FA0 0300[EB1E] <1> dw 3, msg.qwords 1897 00003FA4 0200[F21E] <1> dw 2, msg.dwords 1898 00003FA8 0100[F31E] <1> dw 1, msg.words 1899 00003FAC 0000[F91E] <1> dw 0, msg.bytes ; end of table, shift count zero 1900 <1> 1901 00003FB0 01 <1> flagvaron: db 1 1902 00003FB1 00 <1> flagvaroff: db 0 ; must be directly behind flagvaron 1903 <1> 1904 <1> %if _COND 1905 00003FB2 6E6F7420 <1> msg.condnotjump:db "not " 1906 00003FB6 6A756D70696E6700 <1> msg.condjump: asciz "jumping" 1907 <1> %endif 1908 <1> 1909 00003FBE 206D6174636865730D- <1> msg.matches: asciz " matches",13,10 1909 00003FC7 0A00 <1> 1910 <1> 1911 00003FC9 00 <1> align 4, db 0 1912 00003FCC 414C4148424C424843- <1> reg8names: dw "AL","AH","BL","BH","CL","CH","DL","DH" 1912 00003FD5 4C4348444C4448 <1> 1913 <1> ; Even entries are xL registers, odd ones the xH ones. 1914 <1> ; Order matches that of the first four regs entries. 1915 <1> 1916 00003FDC 415842584358445853- <1> reg16names: dw "AX","BX","CX","DX","SP","BP","SI","DI" 1916 00003FE5 50425053494449 <1> 1917 00003FEC 445345535353435346- <1> dw "DS","ES","SS","CS","FS","GS","IP","FL" 1917 00003FF5 5347534950464C <1> 1918 <1> ; 32-bit registers are the first eight and last two entries of 1919 <1> ; reg16names with 'E', which are all non-segment registers. 1920 <1> ; Segment registers can be detected by the 'S' as second letter. 1921 <1> ; FS and GS are the fourth- and third-to-last entries. 1922 <1> ; Order matches that of the sixteen regs entries. 1923 <1> 1924 <1> 1925 <1> ; Table of recognised default (unsigned) types. 1926 <1> ; 1927 <1> ; If any number of characters match, use the type. 1928 <1> ; If an additional "S" is found in front of a valid 1929 <1> ; type, the type is set to signed. (Word and byte 1930 <1> ; types are sign-extended to a dword value.) 1931 <1> ; 1932 <1> ; Each odd entry is an alternative name for the even 1933 <1> ; entry preceding it. 1934 <1> types: 1935 00003FFC 0442595445 <1> countedb "BYTE" ; ("B" is hexadecimal) 1936 00004001 0443484152 <1> countedb "CHAR" ; ("C" is hexadecimal) 1937 00004006 04574F5244 <1> countedb "WORD" 1938 0000400B 0553484F5254 <1> countedb "SHORT" 1939 00004011 053342595445 <1> countedb "3BYTE" ; ("3" and "3B" are numeric) 1940 00004017 053342595445 <1> countedb "3BYTE" 1941 0000401D 0544574F5244 <1> countedb "DWORD" ; ("D" is hexadecimal) 1942 00004023 044C4F4E47 <1> countedb "LONG" 1943 <1> .addresses: 1944 00004028 07504F494E544552 <1> countedb "POINTER" 1945 00004030 03505452 <1> countedb "PTR" 1946 00004034 064F4646534554 <1> countedb "OFFSET" 1947 0000403B 034F4653 <1> countedb "OFS" 1948 0000403F 075345474D454E54 <1> countedb "SEGMENT" 1949 <1> .end: 1950 <1> 1951 <1> maxtypesize equ 7 ; size of "SEGMENT" and "POINTER" 1480 1481 msg_end: 1482 1483 numdef SHOWMSGSIZE, _DEFAULTSHOWSIZE 1484 %if _SHOWMSGSIZE 1485 %assign MSGSIZE msg_end - msg_start 1486 %warning msg holds MSGSIZE bytes 1487 %endif 1488 1489 1490 usesection lDEBUG_DATA_ENTRY 1491 ; INP: word [cs:ip] = near address to jump to in other segment 1492 ..@symhint_trace_caller_entry_to_code_seg: 1493 entry_to_code_seg: 1494 00004047 50 push ax ; word space for ?jumpaddress_ip, is ax 1495 00004048 2EA1[1001] mov ax, word [cs:code_seg] 1496 %if _PM 1497 jmp entry_to_code_common 1498 1499 ..@symhint_trace_caller_entry_to_code_sel: 1500 entry_to_code_sel: 1501 push ax 1502 mov ax, word [cs:code_sel] 1503 %endif 1504 1505 entry_to_code_common: 1506 lframe 0 1507 lpar word, jumpaddress_cs_and_orig_ip 1508 lpar word, jumpaddress_ip 1509 0000404C 5589E5 lenter 1510 1511 0000404F 56 push si 1512 00004050 9C pushf 1513 00004051 FC cld 1514 1515 00004052 874604 xchg word [bp + ?jumpaddress_cs_and_orig_ip], ax ; fill function segment 1516 00004055 89C6 mov si, ax 1517 00004057 2EAD cs lodsw 1518 %if _DEBUG 1519 cmp al, 0CCh ; debugger breakpoint ? 1520 jne @F ; no --> 1521 int3 ; break to make it remove the breakpoint 1522 dec si 1523 dec si 1524 cs lodsw ; reload the word 1525 cmp al, 0CCh 1526 jne @F 1527 1528 .l: 1529 int3 1530 jmp .l 1531 1532 @@: 1533 %endif 1534 00004059 874602 xchg word [bp + ?jumpaddress_ip], ax ; fill function offset 1535 ; (and restore ax) 1536 1537 0000405C 9D popf 1538 0000405D 5E pop si 1539 1540 0000405E 5D lleave 1541 0000405F CB retf ; jump to dword [bp + ?jumpaddress] 1542 1543 1544 1545 ; debug22 - Interrupt 22h handler 1546 ; 1547 ; This is for DEBUG itself: it's a catch-all for the various Int23 1548 ; and Int24 calls that may occur unpredictably at any time. What we 1549 ; do is pretend to be a command interpreter (which we are, in a sense, 1550 ; just with different sort of commands) by setting our parent PSP 1551 ; value equal to our own PSP so that DOS does not free our memory when 1552 ; we quit. Therefore control ends up here when DOS detects Control-C 1553 ; or an Abort in the critical error prompt is selected. 1554 debug22: 1555 00004060 FA cli 1556 .cleartraceflag: 1557 00004061 FC cld ; reestablish things 1558 00004062 8CC8 mov ax, cs 1559 00004064 8ED8 mov ds, ax 1560 00004066 8ED0 mov ss, ax 1561 00004068 8B26[EC0A] mov sp, word [ savesp ] ; restore stack 1562 %if _PM 1563 clropt [internalflags], protectedmode ; reset PM flag 1564 %endif 1565 0000406C 90 times 1 - (($ - $$) & 1) nop ; align in-code parameter 1566 0000406D E8D7FF call entry_to_code_seg 1567 00004070 [7A04] dw cmd2_reset_re_maybe_pm 1568 1569 1570 ; doscall is used by symbols.asm and run.asm and in 1571 ; cmd3_close_handle, so define it prior 1572 %if _PM && _NOEXTENDER 1573 %macro doscall 0 1574 nearcall _doscall 1575 %endmacro 1576 %else 1577 ; When we don't support non-extended DPMI all Int21 calls 1578 ; are either in Real Mode or extended (all are real Int21 1579 ; instructions). 1580 %macro doscall 0 1581 int 21h 1582 %endmacro 1583 %endif 1584 1585 1586 %if _DUALCODE 1587 usesection lDEBUG_CODE2 1588 %if $ - $$ 1589 %error cmd3_mirror is not at offset 0 in lDEBUG_CODE2 1590 %endif 1591 cmd3_mirror: 1592 db 0B9h ; mov cx, imm16 (cx = nonzero) 1593 xor cx, cx ; cx = 0 1594 dualcall cmd3.have_cx_convenience 1595 %endif 1596 1597 1598 usesection lDEBUG_CODE 1599 %if $ - $$ 1600 %error cmd3 is not at offset 0 in lDEBUG_CODE 1601 %endif 1602 1603 code_insure_low_byte_not_0CCh 1604 ; Begin main command loop. 1605 cmd3: 1606 ; A convenience entrypoint: Entering 1607 ; cmd3 at offset 1 instead of 0 will 1608 ; make the debugger additionally 1609 ; display a linebreak early on. 1610 00000000 B9 db 0B9h ; mov cx, imm16 (cx = nonzero) 1611 00000001 31C9 xor cx, cx ; cx = 0 1612 .have_cx_convenience: 1613 1614 00000003 16 push ss 1615 00000004 1F pop ds 1616 00000005 66 _386_o32 ; mov esp 1617 00000006 8B26[EC0A] mov sp, word [ savesp ] ; restore stack 1618 0000000A 83E4FC _386 and sp, ~3 ; align stack 1619 0000000D 66 _386_o32 1620 0000000E 31C0 xor ax, ax 1621 00000010 66 _386_o32 1622 00000011 50 push ax 1623 00000012 66 _386_o32 1624 00000013 9D popf 1625 00000014 8B26[EC0A] _386 mov sp, word [ savesp ] ; restore stack 1626 00000018 FC cld 1627 00000019 FB sti 1628 0000001A C706[F20A][0000] mov word [ errret ], cmd3 1629 00000020 C706[F40A][8182] mov word [ throwret ], errhandler 1630 00000026 8926[F60A] mov word [ throwsp ], sp 1631 %if _SYMBOLIC 1632 mov word [ stack_low_address ], str_buffer 1633 %endif 1634 0000002A 31C0 xor ax, ax 1635 0000002C 8706[480A] xchg ax, word [cmd3_set_options] 1636 00000030 0906[A000] or word [options], ax 1637 1638 00000034 1E push ds 1639 00000035 07 pop es 1640 00000036 E302 jcxz @F 1641 00000038 EB06 jmp @FF 1642 @@: 1643 0000003A BA[E732] mov dx, crlf 1644 0000003D E8739F call putsz 1645 @@: 1646 1647 %if _SYMBOLIC 1648 clropt [internalflags2], dif2_xms_detection_done 1649 nearcall zz_save_strat 1650 %endif 1651 1652 00000040 31FF xor di, di 1653 00000042 873E[3A0C] xchg di, word [terminator_in_line_in.offset] 1654 00000046 85FF test di, di 1655 00000048 7409 jz @F 1656 0000004A 803D00 cmp byte [di], 0 1657 0000004D 7504 jne @F 1658 0000004F A0[3C0C] mov al, byte [terminator_in_line_in.value] 1659 00000052 AA stosb 1660 @@: 1661 1662 00000053 8326[FC0A]00 and word [run_sp_reserve], 0 1663 %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER 1664 00000058 D006[0801] rol byte [in_re], 1 1665 0000005C 7205 jc @F 1666 0000005E 8026[D300]FB clropt [internalflags], tt_while 1667 @@: 1668 %endif 1669 %if _RH 1670 00000063 8026[E600]EF clropt [internalflags6], dif6_rh_mode 1671 00000068 C606[0701]00 mov byte [skip_rh], 0 1672 %endif 1673 %if _IMMASM 1674 clropt [internalflags6], dif6_immasm_no_output | dif6_immasm 1675 %endif 1676 0000006D 8026[D900]DF clropt [internalflags3], dif3_unquiet_error 1677 %if _REGSHIGHLIGHT 1678 00000072 8026[DA00]FD clropt [internalflags3], dif3_do_not_highlight 1679 %endif 1680 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1681 00000077 8026[DB00]E7 clropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_in_if 1682 %else 1683 clropt [internalflags3], dif3_auxbuff_guarded_1 1684 %endif 1685 0000007C 8026[D800]CF clropt [internalflags3], dif3_input_serial_override | dif3_input_terminal_override 1687 00000081 8026[D700]EF clropt [internalflags2], dif2_in_silence_dump 1688 %if _PM 1689 %if _DEBUG 1690 clropt [internalflags6], dif6_in_hook2F | dif6_in_amis_hook2F 1691 %else 1692 clropt [internalflags6], dif6_in_amis_hook2F 1693 %endif 1694 call resetmode 1695 %endif 1696 1697 %ifn _VXCHG 1698 mov ah, 0Fh 1699 int 10h 1700 mov byte [vpage], bh ; update page 1701 %endif 1702 1703 %if _TEST_HELP_FILE 1704 cmd3_close_handle: 1705 call InDOS 1706 jz @F 1707 mov ah, 3Eh 1708 mov bx, -1 1709 xchg bx, [handle] 1710 cmp bx, -1 1711 je @F 1712 doscall 1713 @@: 1714 %endif 1715 1716 %if _RH 1717 cmd3_rh_init: 1718 00000086 F606[B600]10 testopt [options6], opt6_rh_mode 1719 0000008B 7419 jz .check_disable 1720 .check_enable: 1721 0000008D F606[E600]08 testopt [internalflags6], dif6_rh_mode_was 1722 00000092 7529 jnz .done 1723 .enable: 1724 ; guarded_1 is always reset by cmd3 1725 ; guarded_2 is only set by RE indicating silent mode 1726 ; so we never want to not enable RH mode 1727 00000094 800E[DB00]40 setopt [internalflags3], dif3_auxbuff_guarded_3 1728 00000099 800E[E600]08 setopt [internalflags6], dif6_rh_mode_was 1729 1730 0000009E E83348 call tpg_initialise_empty_auxbuff.reset 1731 1732 000000A1 BA[311E] mov dx, msg.rh_enabled 1733 000000A4 EB14 jmp .done_putsz 1734 1735 .check_disable: 1736 000000A6 F606[E600]08 testopt [internalflags6], dif6_rh_mode_was 1737 000000AB 7410 jz .done 1738 .disable: 1739 000000AD 8026[DB00]BF clropt [internalflags3], dif3_auxbuff_guarded_3 1740 000000B2 8026[E600]F7 clropt [internalflags6], dif6_rh_mode_was 1741 000000B7 BA[521E] mov dx, msg.rh_disabled 1742 1743 .done_putsz: 1744 000000BA E8F69E call putsz 1745 .done: 1746 %endif 1747 1748 %if _DEBUG && _DEBUG_COND 1749 cmd3_debug_mode_init: 1750 testopt [options6], opt6_debug_mode 1751 jz .check_disable 1752 .check_enable: 1753 testopt [internalflags6], dif6_debug_mode 1754 jnz .done 1755 call reset_interrupts 1756 setopt [internalflags6], dif6_debug_mode 1757 jmp .done 1758 1759 .check_disable: 1760 testopt [internalflags6], dif6_debug_mode 1761 jz .done 1762 call set_interrupts 1763 clropt [internalflags6], dif6_debug_mode 1764 .done: 1765 %endif 1766 1767 1768 %if _PM 1769 cmd3_int2F_init: 1770 mov al, 2Fh ; interrupt number 1771 mov si, debug2F ; -> IISP entry header 1772 1773 testopt [options4], opt4_int_2F_hook 1774 jnz .done 1775 .check_disable: 1776 mov dx, opt4_int_2F_force >> 16 1777 %if (opt4_int_2F_force >> 16) == dif4_int_2F_hooked 1778 call cmd3_int_disable.set_bx_to_dx 1779 %else 1780 mov bx, dif4_int_2F_hooked 1781 call cmd3_int_disable 1782 %endif 1783 jc .done 1784 clropt [internalflags], hooked2F 1785 1786 .done: 1787 %endif 1788 1789 1790 %if _CATCHINTFAULTCOND && _CATCHINT0D 1791 cmd3_int0D_init: 1792 000000BD B00D mov al, 0Dh ; interrupt number 1793 000000BF BE[C647] mov si, intr0D ; -> IISP entry header 1794 000000C2 BA1000 mov dx, opt4_int_0D_force >> 16 1795 %if (opt4_int_0D_force >> 16) == dif4_int_0D_hooked 1796 000000C5 89D3 mov bx, dx 1797 %else 1798 mov bx, dif4_int_0D_hooked 1799 %endif 1800 1801 000000C7 F606[AC00]10 testopt [options4], opt4_int_fault_hook 1802 000000CC 7405 jz .check_disable 1803 .check_enable: 1804 000000CE E85805 call cmd3_int_enable 1805 000000D1 EB03 jmp .done 1806 1807 .check_disable: 1808 000000D3 E86805 call cmd3_int_disable 1809 1810 .done: 1811 %endif 1812 1813 1814 %if _CATCHINTFAULTCOND && _CATCHINT0C 1815 cmd3_int0C_init: 1816 000000D6 B00C mov al, 0Ch ; interrupt number 1817 000000D8 BE[8E47] mov si, intr0C ; -> IISP entry header 1818 000000DB BA2000 mov dx, opt4_int_0C_force >> 16 1819 %if (opt4_int_0C_force >> 16) == dif4_int_0C_hooked 1820 000000DE 89D3 mov bx, dx 1821 %else 1822 mov bx, dif4_int_0C_hooked 1823 %endif 1824 1825 000000E0 F606[AC00]10 testopt [options4], opt4_int_fault_hook 1826 000000E5 7405 jz .check_disable 1827 .check_enable: 1828 000000E7 E83F05 call cmd3_int_enable 1829 000000EA EB03 jmp .done 1830 1831 .check_disable: 1832 000000EC E84F05 call cmd3_int_disable 1833 1834 .done: 1835 %endif 1836 1837 1838 %if _CATCHINT08 1839 cmd3_int08_init: 1840 000000EF B008 mov al, 08h ; interrupt number 1841 000000F1 BE[4A46] mov si, intr8 ; -> IISP entry header 1842 000000F4 BA0400 mov dx, opt4_int_08_force >> 16 1843 %if (opt4_int_08_force >> 16) == dif4_int_08_hooked 1844 000000F7 89D3 mov bx, dx 1845 %else 1846 mov bx, dif4_int_08_hooked 1847 %endif 1848 1849 000000F9 F606[AC00]04 testopt [options4], opt4_int_08_hook 1850 000000FE 7405 jz .check_disable 1851 .check_enable: 1852 00000100 E82605 call cmd3_int_enable 1853 00000103 EB03 jmp .done 1854 1855 .check_disable: 1856 00000105 E83605 call cmd3_int_disable 1857 1858 .done: 1859 %endif 1860 1861 1862 %if _CATCHINT2D 1863 cmd3_int2D_init: 1864 00000108 B02D mov al, 2Dh ; interrupt number 1865 0000010A BE[B040] mov si, int2D ; -> IISP entry header 1866 0000010D BB0800 mov bx, dif4_int_2D_hooked 1867 00000110 BA0800 mov dx, opt4_int_2D_force >> 16 1868 1869 00000113 F606[AC00]08 testopt [options4], opt4_int_2D_hook 1870 00000118 7445 jz .check_disable 1871 .check_enable: 1872 0000011A 851E[DC00] test word [internalflags4], bx 1873 0000011E 7542 jnz .done 1874 1875 00000120 E84FB2 call intchk ; ZR if offset = -1 or segment = 0 1876 ; CHG: ax, dx, bx 1877 00000123 742D jz .fail 1878 1879 00000125 8A26[AD40] mov ah, byte [try_amis_multiplex_number] 1880 00000129 B000 mov al, 00h 1881 ; function 0 changes dx, di, cx, al 1882 %if _PM 1883 call call_int2D 1884 %else 1885 0000012B CD2D int 2Dh ; enquire whether there's anyone 1886 %endif 1887 0000012D 84C0 test al, al 1888 0000012F 7413 jz .got 1889 1890 00000131 31C0 xor ax, ax ; start with multiplex number 0 1891 .loopplex: 1892 00000133 B000 mov al, 00h ; AMIS installation check 1893 ; function 0 changes dx, di, cx, al 1894 %if _PM 1895 call call_int2D 1896 %else 1897 00000135 CD2D int 2Dh ; enquire whether there's anyone 1898 %endif 1899 00000137 84C0 test al, al ; free ? 1900 00000139 7409 jz .got ; yes, put it to use --> 1901 0000013B FEC4 inc ah 1902 0000013D 75F4 jnz .loopplex ; try next multiplexer --> 1903 1904 0000013F BA[6023] mov dx, msg.cannot_hook_2D.nofree 1905 00000142 EB11 jmp .fail_putsz 1906 1907 .got: 1908 00000144 8826[C440] mov byte [amis_multiplex_number], ah 1909 1910 00000148 B02D mov al, 2Dh ; interrupt number 1911 0000014A BB0800 mov bx, dif4_int_2D_hooked 1912 0000014D E8DF04 call cmd3_int_enable.need 1913 00000150 EB10 jmp .done 1914 1915 .fail: 1916 00000152 BA[2223] mov dx, msg.cannot_hook_2D.invalid 1917 .fail_putsz: 1918 00000155 E85B9E call putsz 1919 00000158 8026[AC00]F7 clropt [options4], opt4_int_2D_hook 1920 0000015D EB03 jmp .done 1921 1922 .check_disable: 1923 0000015F E8DC04 call cmd3_int_disable 1924 1925 .done: 1926 %endif 1927 1928 1929 00000162 F606[DB00]01 testopt [internalflags3], dif3_input_re 1930 00000167 7403E9AC01 jnz cmd3_continue_1_re 1931 0000016C 8026[A500]7F clropt [options2], opt2_re_cancel_tpg 1932 00000171 E8239D call silence_dump 1933 1934 1935 cmd3_serial_init: 1936 00000174 F606[A100]40 testopt [options], enable_serial 1937 00000179 7503E94D01 jz .check_disable_serial 1938 .check_enable_serial: 1939 0000017E F606[150C]01 testopt [serial_flags], sf_init_done 1940 00000183 7408 jz .enable_serial 1941 ; If we disabled the actual use flag prior somehow 1942 ; (sf_use_serial clear) but we get here with 1943 ; sf_init_done set then re-enable use of serial I/O. 1944 00000185 800E[150C]10 setopt [serial_flags], sf_use_serial 1945 0000018A E98501 jmp .done_serial 1946 1947 .enable_serial: 1948 1949 0000018D A0[160C] mov al, byte [serial_var_intnum] 1950 00000190 A2[D00B] mov byte [serial_use_intnum], al 1951 00000193 A0[170C] mov al, byte [serial_var_params] 1952 00000196 A2[D10B] mov byte [serial_use_params], al 1953 00000199 A0[180C] mov al, byte [serial_var_fifo] 1954 0000019C A2[D20B] mov byte [serial_use_fifo], al 1955 0000019F A1[1A0C] mov ax, word [serial_var_baseport] 1956 000001A2 A3[D60B] mov word [serial_use_baseport], ax 1957 000001A5 A1[1C0C] mov ax, word [serial_var_dl] 1958 000001A8 A3[D80B] mov word [serial_use_dl], ax 1959 000001AB A1[1E0C] mov ax, word [serial_var_irqmask] 1960 000001AE A3[DA0B] mov word [serial_use_irqmask], ax 1961 000001B1 E889AF call serial_clear_fifos 1962 000001B4 E84FAF call serial_install_interrupt_handler 1963 000001B7 7317 jnc @F 1964 000001B9 BF[0224] mov di, msg.serial_cannot_hook.old_int 1965 000001BC A0[440C] mov al, byte [serial_installed_intnum] 1966 000001BF E8CF98 call hexbyte 1967 000001C2 BF[EC23] mov di, msg.serial_cannot_hook.new_int 1968 000001C5 A0[D00B] mov al, byte [serial_use_intnum] 1969 000001C8 E8C698 call hexbyte 1970 000001CB BA[CC23] mov dx, msg.serial_cannot_hook 1971 000001CE EB52 jmp .no_keep 1972 1973 @@: 1974 000001D0 C606[1A54]80 mov byte [serial_interrupt_handler + ieEOI], 80h 1975 000001D5 E878AF call serial_init_UART 1976 1977 000001D8 800E[150C]11 setopt [serial_flags], sf_init_done | sf_use_serial 1978 1979 000001DD BA[5F22] mov dx, msg.serial_request_keep 1980 000001E0 E8D09D call putsz 1981 1982 000001E3 BF[B40A] mov di, line_out 1983 %if _DEBUG 1984 %if _DEBUG_COND 1985 testopt [internalflags6], dif6_debug_mode 1986 jz @F 1987 %endif 1988 mov al, '~' ; indicate instance is to be debugged 1989 stosb 1990 @@: 1991 %endif 1992 000001E6 B83D20 mov ax, "= " 1993 000001E9 AB stosw 1994 1995 000001EA 31C0 xor ax, ax 1996 000001EC A3[2C0C] mov word [getline_timer_count], ax 1997 000001EF 06 push es 1998 000001F0 B84000 mov ax, 40h 1999 000001F3 8EC0 mov es, ax 2000 000001F5 26A16C00 mov ax, word [es:6Ch] 2001 000001F9 A3[2E0C] mov word [getline_timer_last], ax 2002 000001FC 07 pop es 2003 000001FD C706[300C][3202] mov word [getline_timer_func], .timer 2004 2005 ; if we're executing from the command line 2006 ; buffer or a Y file then we want to 2007 ; override input to be from serial for the 2008 ; KEEP confirmation prompt. 2009 ; output is always to serial if we're here. 2010 00000203 800E[D800]20 setopt [internalflags3], dif3_input_serial_override 2011 00000208 E836A1 call getline00 2012 0000020B 8026[D800]DF clropt [internalflags3], dif3_input_serial_override 2013 2014 00000210 E89E97 call skipcomm0 2015 00000213 4E dec si 2016 00000214 BA[1D23] mov dx, msg.keep 2017 00000217 E80697 call isstring? 2018 0000021A 7503E9F300 je .done_serial 2019 2020 0000021F BA[E822] mov dx, msg.serial_no_keep_enter 2021 .no_keep: 2022 ; Immediately disable use of serial I/O. 2023 00000222 8026[150C]EF clropt [serial_flags], sf_use_serial 2024 ; Set the flag for next cmd3 loop to properly disable 2025 ; and de-initialise the serial port. 2026 00000227 8026[A100]BF clropt [options], enable_serial 2027 0000022C E8849D call putsz 2028 0000022F E9CEFD jmp cmd3 2029 2030 2031 .timer: 2032 00000232 50 push ax 2033 00000233 52 push dx 2034 00000234 51 push cx 2035 00000235 53 push bx 2036 00000236 06 push es 2037 2038 00000237 BA4000 mov dx, 40h 2039 0000023A 8EC2 mov es, dx 2040 2041 0000023C B00B mov al, 0Bh ; request In-Service Register (ISR) 2042 0000023E E6A0 out 0A0h, al ; from secondary PIC 2043 00000240 E4A0 in al, 0A0h ; read the ISR 2044 00000242 8406[DB0B] test al, byte [serial_use_irqmask + 1] 2045 00000246 756B jnz .timer_ours 2046 00000248 B00B mov al, 0Bh ; request In-Service Register (ISR) 2047 0000024A E620 out 20h, al ; from primary PIC 2048 0000024C E420 in al, 20h ; read the ISR 2049 0000024E 24FB and al, ~100b 2050 00000250 8406[DA0B] test al, byte [serial_use_irqmask] 2051 00000254 755D jnz .timer_ours 2052 .timer_ours_done: 2053 2054 00000256 8B0E[C60B] mov cx, word [serial_save_irq_mask] 2055 0000025A 31DB xor bx, bx ; all bits clear (= IRQ ON) 2056 0000025C E86EAF call set_irq ; enable IRQs and get prior status 2057 0000025F 85DB test bx, bx ; IRQs were still enabled ? 2058 00000261 7405 jz @F ; yes, fine --> 2059 00000263 8026[B600]FE clropt [options6], opt6_share_serial_irq 2060 ; no, make sure not to chain any longer 2061 @@: 2062 00000268 8B0E[2C0C] mov cx, word [getline_timer_count] 2063 0000026C 8B16[2E0C] mov dx, word [getline_timer_last] 2064 2065 %if _SLEEP_NEW 2066 00000270 26A16C00 mov ax, word [es:6Ch] 2067 00000274 39C2 cmp dx, ax 2068 00000276 7445 je .timer_next 2069 00000278 F7DA neg dx ; minus prior tick 2070 0000027A 01C2 add dx, ax ; new tick - prior tick 2071 2072 0000027C 3B16[5E4C] cmp dx, word [sleep_delta_limit] 2073 00000280 7609 jbe @F 2074 00000282 8B16[5E4C] mov dx, word [sleep_delta_limit] 2075 00000286 85D2 test dx, dx 2076 00000288 7501 jnz @F 2077 0000028A 42 inc dx ; limit 0 would lead to stagnant sleep 2078 @@: 2079 0000028B 3B16[5C4C] cmp dx, word [sleep_highest_delta] 2080 0000028F 7604 jbe @F 2081 00000291 8916[5C4C] mov word [sleep_highest_delta], dx 2082 @@: 2083 00000295 01D1 add cx, dx 2084 00000297 7303 jnc @F 2085 00000299 B9FFFF mov cx, -1 2086 @@: 2087 0000029C 89C2 mov dx, ax 2088 %else 2089 cmp dx, word [es:6Ch] 2090 je .timer_next 2091 mov dx, word [es:6Ch] 2092 inc cx 2093 %endif 2094 0000029E B012 mov al, 18 2095 000002A0 F626[130C] mul byte [serial_keep_timeout] 2096 000002A4 85C0 test ax, ax 2097 000002A6 7415 jz .timer_next 2098 000002A8 39C1 cmp cx, ax 2099 000002AA 7211 jb .timer_next 2100 2101 000002AC 07 pop es 2102 000002AD BA[9B22] mov dx, msg.serial_no_keep_timer 2103 000002B0 E96FFF jmp .no_keep 2104 2105 .timer_ours: 2106 000002B3 800E[B600]02 setopt [options6], opt6_serial_EOI_call 2107 000002B8 E874AE call serial_eoi 2108 000002BB EB99 jmp .timer_ours_done 2109 2110 .timer_next: 2111 000002BD 890E[2C0C] mov word [getline_timer_count], cx 2112 000002C1 8916[2E0C] mov word [getline_timer_last], dx 2113 000002C5 07 pop es 2114 000002C6 5B pop bx 2115 000002C7 59 pop cx 2116 000002C8 5A pop dx 2117 000002C9 58 pop ax 2118 000002CA C3 retn 2119 2120 2121 .check_disable_serial: 2122 ; If serial is initialised, uninstall it. 2123 000002CB F606[150C]01 testopt [serial_flags], sf_init_done 2124 000002D0 751D jnz .disable_serial 2125 ; Not initialised. Is the interrupt still hooked? 2126 000002D2 F606[DC00]01 testopt [internalflags4], dif4_int_serial_hooked 2127 000002D7 7439 jz .done_serial 2128 ; Try unhooking the interrupt handler. 2129 000002D9 E888AF call serial_uninstall_interrupt_handler 2130 000002DC 7234 jc .done_serial ; if it failed again --> 2131 000002DE BF[3724] mov di, msg.serial_late_unhook.int 2132 000002E1 A0[440C] mov al, byte [serial_installed_intnum] 2133 000002E4 E8AA97 call hexbyte 2134 000002E7 BA[1624] mov dx, msg.serial_late_unhook 2135 000002EA E8C69C call putsz 2136 000002ED EB23 jmp .done_serial 2137 2138 .disable_serial: 2139 2140 000002EF E827AF call serial_clean_up 2141 000002F2 7319 jnc @F 2142 ; Immediately disable use of serial I/O, 2143 ; so that our error message goes to the 2144 ; local terminal rather than to serial I/O. 2145 000002F4 8026[150C]EF clropt [serial_flags], sf_use_serial 2146 000002F9 BF[C523] mov di, msg.serial_cannot_unhook.int 2147 000002FC A0[440C] mov al, byte [serial_installed_intnum] 2148 000002FF E88F97 call hexbyte 2149 00000302 BA[A123] mov dx, msg.serial_cannot_unhook 2150 00000305 E8AB9C call putsz 2151 00000308 C606[1A54]00 mov byte [serial_interrupt_handler + ieEOI], 0 2152 ; we do not issue EOI any longer 2153 @@: 2154 0000030D 8026[150C]EE clropt [serial_flags], sf_init_done | sf_use_serial 2155 .done_serial: 2156 2157 2158 %if _VXCHG 2159 cmd3_vv_set: 2160 00000312 E8D680 call vv_set 2161 %endif 2162 2163 2164 %if _PM 2165 cmd3_ss_init: 2166 call ispm 2167 jnz .done 2168 2169 subcpu 286 2170 mov bx, ss 2171 lar cx, bx 2172 jnz .done 2173 shr cx, 8 2174 2175 testopt [options3], opt3_ss_b_bit_set 2176 jz .check_clear 2177 .check_set: 2178 testopt [internalflags3], dif3_ss_b_bit_set 2179 jnz .done 2180 2181 mov ch, 40h 2182 jmp @F 2183 2184 .check_clear: 2185 testopt [internalflags3], dif3_ss_b_bit_set 2186 jz .done 2187 2188 @@: 2189 mov ax, 0009h 2190 int 31h 2191 jc .done 2192 2193 xoropt [internalflags3], dif3_ss_b_bit_set 2194 subcpureset 2195 2196 .done: 2197 %endif 2198 2199 2200 %if _IMMASM 2201 call near [ ia_restore ] 2202 %endif 2203 2204 %if _PM 2205 call ispm 2206 jz @F 2207 %endif 2208 00000315 E87CB2 call ensuredebuggeeloaded ; if no task is active, create a dummy one 2209 %if _PM && 0 2210 jmp @FF 2211 @@: 2212 testopt [internalflags], attachedterm 2213 jz @F 2214 mov dx, .message 2215 call putsz 2216 2217 usesection lDEBUG_DATA_ENTRY 2218 .message: ascizline "Attached term is set in PM!" 2219 usesection lDEBUG_CODE 2220 %endif 2221 @@: 2222 2223 2224 cmd3_continue_1_re: 2225 00000318 BF[B40A] mov di, line_out ; build prompt 2226 %if _DEBUG 2227 %if _DEBUG_COND 2228 testopt [internalflags6], dif6_debug_mode 2229 jz @F 2230 %endif 2231 mov al, '~' ; indicate instance is to be debugged 2232 stosb 2233 @@: 2234 %endif 2235 %if _INDOS_PROMPT 2236 0000031B E85282 call InDOS 2237 0000031E 740F jz @F 2238 %if _BOOTLDR 2239 00000320 F606[D100]40 testopt [internalflags], nodosloaded 2240 ; boot mode ? 2241 %if _INDOS_PROMPT_NOBOOT 2242 00000325 7508 jnz @F ; yes, do not show special prompt --> 2243 %elif _INDOS_PROMPT_NOFLAG 2244 jnz .indos_prompt ; yes, show special prompt --> 2245 ; (do not call .real_indos check) 2246 %endif 2247 %endif 2248 %if _INDOS_PROMPT_NOFLAG 2249 %if _APPLICATION || _DEVICE 2250 ; Never branches to here if bootloaded, 2251 ; so no need to handle only bootloaded. 2252 00000327 E85482 call InDOS.real_indos ; real InDOS set ? 2253 0000032A 7403 jz @F ; no, do not show special prompt --> 2254 %endif 2255 %endif 2256 .indos_prompt: 2257 0000032C B021 mov al, '!' 2258 0000032E AA stosb 2259 @@: 2260 %endif 2261 0000032F B02D mov al, '-' ; main prompt 2262 %if _PM 2263 call ispm 2264 jnz .realmode 2265 mov al, '#' ; PM main prompt 2266 .realmode: 2267 %endif 2268 00000331 F606[D900]01 testopt [internalflags3], dif3_input_cmdline 2269 00000336 7402 jz @F 2270 00000338 B026 mov al, '&' 2271 @@: 2272 0000033A F606[DB00]01 testopt [internalflags3], dif3_input_re 2273 0000033F 7402 jz @F 2274 00000341 B025 mov al, '%' 2275 @@: 2276 00000343 AA stosb 2277 2278 00000344 C606[0054]00 mov byte [hhflag], 0 2279 00000349 8326[FC53]00 and word [hh_depth], 0 2280 0000034E 8326[FE53]00 and word [hh_depth_of_single_term], 0 2281 00000353 C706[300C][F504] mov word [getline_timer_func], dmycmd 2282 00000359 8026[D200]FE clropt [internalflags], usecharcounter ; reset this automatically 2283 2284 0000035E F606[DB00]01 testopt [internalflags3], dif3_input_re 2285 00000363 7515 jnz cmd3_continue_2_re 2286 2287 00000365 800E[D000]08 setopt [internalflags], pagedcommand ; 2009-02-21: default to page all commands 2288 0000036A 8026[D300]CF clropt [internalflags], tt_silence | tt_silent_mode 2289 ; reset, in case it's still set 2290 0000036F 8126[D400]3FF7 clropt [internalflags2], dif2_tpg_proceed_bp_set | dif2_bp_failure | dif2_tpg_keep_proceed_bp, 1 2292 %if _INPUT_FILE_HANDLES 2293 00000375 8026[D600]DF clropt [internalflags2], dif2_closed_input_file 2294 %endif 2295 2296 cmd3_continue_2_re: 2297 0000037A E8DB02 call determine_quiet_output 2298 2299 0000037D 31C9 xor cx, cx 2300 0000037F 870E[660B] xchg cx, word [rc] ; reset rc 2301 00000383 890E[680B] mov word [priorrc], cx ; make prior value available 2302 00000387 E304 jcxz @F 2303 00000389 890E[6A0B] mov word [erc], cx ; update to last non-zero value 2304 @@: 2305 2306 cmd3_check_relimit: 2307 0000038D F606[DB00]01 testopt [internalflags3], dif3_input_re 2308 00000392 7422 jz cmd3_continue_not_re 2309 2310 00000394 8306[380A]01 add word [re_count], 1 2311 00000399 8316[3A0A]00 adc word [re_count + 2], 0 2312 0000039E 8B16[3E0A] mov dx, word [re_limit + 2] 2313 000003A2 A1[3C0A] mov ax, word [re_limit] 2314 000003A5 3916[3A0A] cmp word [re_count + 2], dx 2315 000003A9 7504 jne @F 2316 000003AB 3906[380A] cmp word [re_count], ax 2317 @@: 2318 ; This branch bypasses cmd3_check_rclimit 2319 ; because RE buffer commands should not 2320 ; count towards the RC limit. 2321 000003AF 7653 jbe cmd3_continue_relimit_not_reached 2322 2323 000003B1 BA[3F21] mov dx, msg.re_limit_reached 2324 000003B4 EB3A jmp cmd3_check_common 2325 2326 cmd3_continue_not_re: 2327 2328 cmd3_check_rclimit: 2329 2330 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 2331 ; If executing from a script file then 2332 ; command doesn't count for RC limit. 2333 %if _INPUT_FILE_BOOT 2334 000003B6 F606[D700]02 testopt [internalflags2], dif2_input_file_boot 2335 000003BB 7547 jnz .file 2336 %endif 2337 %if _INPUT_FILE_HANDLES 2338 000003BD E8B081 call InDOS 2339 000003C0 7507 jnz .file_not 2340 000003C2 F606[D600]10 testopt [internalflags2], dif2_input_file 2341 000003C7 753B jnz .file 2342 %endif 2343 .file_not: 2344 2345 .file: equ cmd3_continue_rclimit_not_reached 2346 %endif 2347 2348 000003C9 F606[D900]01 testopt [internalflags3], dif3_input_cmdline 2349 000003CE 7434 jz cmd3_continue_not_rc 2350 2351 000003D0 8306[400A]01 add word [rc_count], 1 2352 000003D5 8316[420A]00 adc word [rc_count + 2], 0 2353 000003DA 8B16[460A] mov dx, word [rc_limit + 2] 2354 000003DE A1[440A] mov ax, word [rc_limit] 2355 000003E1 3916[420A] cmp word [rc_count + 2], dx 2356 000003E5 7504 jne @F 2357 000003E7 3906[400A] cmp word [rc_count], ax 2358 @@: 2359 000003EB 7617 jbe cmd3_continue_rclimit_not_reached 2360 2361 000003ED BA[6A21] mov dx, msg.rc_limit_reached 2362 cmd3_check_common: 2363 000003F0 E8BA9B call putsz_error 2364 000003F3 B80401 mov ax, 0104h 2365 000003F6 E8B07E call setrc 2366 000003F9 800E[D900]04 setopt [internalflags3], dif3_at_line_end 2367 000003FE E892A1 call getline_close_file 2368 00000401 E9FCFB jmp cmd3 2369 2370 cmd3_continue_not_rc: 2371 cmd3_continue_rclimit_not_reached: 2372 cmd3_continue_relimit_not_reached: 2373 2374 cmd3_check_line_out_overflow: 2375 00000404 813E[BC0B]4226 cmp word [line_out_overflow], 2642h 2376 0000040A 740C je @F 2377 0000040C C706[BC0B]4226 mov word [line_out_overflow], 2642h 2378 00000412 BA[3E24] mov dx, msg.line_out_overflow 2379 00000415 E8959B call putsz_error 2380 @@: 2381 2382 cmd3_getline: 2383 00000418 E8269F call getline00 ; prompted input, also resets linecounter 2384 2385 0000041B E87095 call iseol?.notsemicolon 2386 0000041E 7518 jne cmd3_notblank 2387 00000420 F606[AB00]10 testopt [options3], opt3_disable_autorepeat 2388 00000425 7508 jnz @F 2389 00000427 8B16[020C] mov dx, word [lastcmd] 2390 0000042B 8804 mov byte [si], al 2391 0000042D EB43 jmp short cmd4 2392 2393 @@: 2394 0000042F C706[020C][F504] mov word [lastcmd], dmycmd 2395 00000435 E9C8FB jmp cmd3 2396 2397 cmd3_notblank: 2398 %if _SYMBOLIC 2399 clropt [internalflags3], dif3_nosymbols_1 2400 %endif 2401 00000438 C706[020C][F504] mov word [lastcmd], dmycmd 2402 0000043E 3C3B cmp al, ';' 2403 00000440 7435 je cmd3_j1 ; if comment --> 2404 00000442 3C3A cmp al, ':' 2405 00000444 7431 je cmd3_j1 ; if jump label --> 2406 00000446 3C3F cmp al, '?' 2407 00000448 7503E9A900 je help ; if request for help --> 2408 0000044D 3C2E cmp al, '.' 2409 0000044F 7503E99758 je immasm ; if assembling/immediate execution --> 2410 00000454 3C2D cmp al, '-' 2411 00000456 7503 jne @F ; if not no symbol prefix --> 2412 %if _SYMBOLIC 2413 setopt [internalflags3], dif3_nosymbols_1 2414 %endif 2415 00000458 E88495 call skipwhite ; skip to next command letter 2416 ; Empty line (autorepeat) not valid. 2417 ; Comment not valid. Goto label not valid. 2418 ; Help request not valid. 2419 @@: 2420 0000045B E81095 call uppercase 2421 0000045E 2C41 sub al, 'A' 2422 %if _SYMBOLIC 2423 cmp al, 'Z' - 'A' 2424 ja error ; if not recognised --> 2425 je @F ; if Z, do not commit --> 2426 nearcall zz_commit_insert ; if not Z, commit now 2427 @@: 2428 %else 2429 00000460 3C18 cmp al, 'Y' - 'A' 2430 00000462 7603E9F67D ja error ; if not recognised --> 2431 %endif 2432 00000467 98 cbw 2433 00000468 93 xchg bx, ax 2434 00000469 E84495 call skipcomma 2435 0000046C D1E3 shl bx, 1 2436 0000046E 8B97[6E00] mov dx, word [ cmdlist+bx ] 2437 cmd4: 2438 00000472 BF[B40A] mov di, line_out 2439 %if _DEBUG 2440 db __TEST_IMM8 ; (skip int3) 2441 .int3: 2442 int3 ; used by BU command 2443 %endif 2444 00000475 FFD2 call dx 2445 cmd3_j1: 2446 00000477 E986FB jmp cmd3 ; back to the top 2447 2448 2449 code_insure_low_byte_not_0CCh 2450 cmd2_reset_re_maybe_pm: 2451 2452 0000047A 66 _386_o32 ; mov esp 2453 0000047B 8B26[EC0A] mov sp, word [ savesp ] ; restore stack 2454 0000047F 83E4FC _386 and sp, ~3 ; align stack 2455 00000482 66 _386_o32 2456 00000483 31C0 xor ax, ax 2457 00000485 66 _386_o32 2458 00000486 50 push ax 2459 00000487 66 _386_o32 2460 00000488 9D popf 2461 00000489 8B26[EC0A] _386 mov sp, word [ savesp ] ; restore stack 2462 0000048D FC cld 2463 0000048E FB sti 2464 2465 %if _PM 2466 call handle_mode_changed 2467 %endif 2468 2469 code_insure_low_byte_not_0CCh 2470 cmd2_reset_re: 2471 0000048F 8B1E[280C] mov bx, word [io_levels] 2472 .entry_bx_levels: 2473 00000493 31C9 xor cx, cx 2474 .entry_bx_levels_cx_cmdline: 2475 00000495 31D2 xor dx, dx 2476 %if _INPUT_FILE_HANDLES 2477 00000497 F606[D600]10 testopt [internalflags2], dif2_input_file 2478 0000049C 7405 jz @F 2479 0000049E 030E[D80A] add cx, word [input_file_handles.active] 2480 000004A2 41 inc cx 2481 @@: 2482 %endif 2483 %if _INPUT_FILE_BOOT 2484 000004A3 F606[D700]02 testopt [internalflags2], dif2_input_file_boot 2485 000004A8 7405 jz @F 2486 000004AA 030E[A05A] add cx, word [load_input_file.active] 2487 000004AE 41 inc cx 2488 @@: 2489 %endif 2490 000004AF F606[DB00]01 testopt [internalflags3], dif3_input_re 2491 000004B4 740D jz @F 2492 000004B6 41 inc cx 2493 000004B7 42 inc dx 2494 ; Flag: If we abort anything (effective IOL >= 1) 2495 ; then we need to cancel RE buffer execution. 2496 ; This is so because RE execution is always the 2497 ; topmost command source, taking precedence over 2498 ; yy as well as RC buffer execution. 2499 000004B8 F606[2A0C]01 testopt [io_flags], iof_extra_iol_for_tpg_re 2500 000004BD 7404 jz @F 2501 000004BF 43 inc bx 2502 000004C0 7501 jnz @F 2503 000004C2 4B dec bx 2504 @@: 2505 000004C3 F606[D900]01 testopt [internalflags3], dif3_input_cmdline 2506 000004C8 740C jz @F 2507 000004CA 41 inc cx 2508 000004CB F606[2A0C]02 testopt [io_flags], iof_extra_iol_for_rc 2509 000004D0 7404 jz @F 2510 000004D2 43 inc bx 2511 000004D3 7501 jnz @F 2512 000004D5 4B dec bx 2513 @@: 2514 000004D6 39D9 cmp cx, bx 2515 000004D8 7602 jbe @F 2516 000004DA 89D9 mov cx, bx 2517 @@: 2518 000004DC E399 jcxz cmd3_j1 ; IOL zero or nothing active --> 2519 000004DE 1E push ds 2520 000004DF 07 pop es 2521 @@: 2522 000004E0 51 push cx 2523 000004E1 52 push dx 2524 000004E2 E824A1 call getline_close_file.resetstuff 2525 000004E5 5A pop dx 2526 000004E6 59 pop cx 2527 000004E7 E2F7 loop @B 2528 000004E9 85D2 test dx, dx ; first cancelled was RE ? 2529 000004EB 748A jz cmd3_j1 ; no, just proceed now --> 2530 000004ED 800E[A500]80 setopt [options2], opt2_re_cancel_tpg 2531 ; set to cancel command 2532 000004F2 E99A24 jmp dumpregs_extended.exit ; clean up RE state 2533 2534 2535 dmycmd: 2536 000004F5 C3 retn 2537 2538 help: 2539 000004F6 E8B794 call skipcomma 2540 000004F9 E87294 call uppercase 2541 %if _EXTHELP 2542 %if _COND 2543 000004FC BA[D220] mov dx, msg.condhelp 2544 000004FF 3C43 cmp al, 'C' 2545 00000501 7503E98800 je .spec 2546 %endif 2547 %if _OPTIONS 2548 00000506 3C4F cmp al, 'O' 2549 00000508 7503E9A200 je .options ; option help --> 2550 %endif 2551 %if _EXPRESSIONS 2552 0000050D BA[A223] mov dx, msg.expressionhelp 2553 00000510 3C45 cmp al, 'E' 2554 00000512 747A je .spec 2555 %endif 2556 %endif 2557 %if _EMS 2558 00000514 BA[8749] mov dx, msg.xhelp 2559 00000517 3C58 cmp al, 'X' 2560 00000519 7473 je .spec 2561 %endif 2562 0000051B 4E dec si 2563 %if _BOOTLDR && _EXTHELP 2564 0000051C BA[E118] mov dx, msg.boot 2565 0000051F E8FE93 call isstring? 2566 00000522 BA[3A4A] mov dx, msg.boothelp 2567 00000525 7467 je .spec 2568 %endif 2569 %if _PM 2570 mov dx, msg.desc 2571 call isstring? 2572 mov dx, msg.deschelp 2573 je .spec 2574 %endif 2575 %if _EXTHELP 2576 00000527 BA[D011] mov dx, msg.source 2577 0000052A E8F393 call isstring? 2578 0000052D BA[BB09] mov dx, msg.help_source 2579 00000530 745C je .spec 2580 %endif 2581 00000532 BA[D711] mov dx, msg.re 2582 00000535 E8E893 call isstring? 2583 00000538 BA[170B] mov dx, msg.help_re 2584 0000053B 7451 je .spec 2585 0000053D BA[DA11] mov dx, msg.run 2586 00000540 E8DD93 call isstring? 2587 00000543 BA[6C10] mov dx, msg.help_run 2588 00000546 7446 je .spec 2589 00000548 BA[1212] mov dx, msg.string_version 2590 0000054B E8D293 call isstring? 2591 0000054E BB[DE11] mov bx, msg.build_array 2592 00000551 B90200 mov cx, msg.build_version_amount 2593 00000554 744A je .spec_multi 2594 00000556 BA[0C12] mov dx, msg.string_build 2595 00000559 E8C493 call isstring? 2596 0000055C B107 mov cl, msg.build_short_amount 2597 0000055E 7440 je .spec_multi 2598 00000560 AC lodsb 2599 00000561 E80A94 call uppercase 2600 00000564 B108 mov cl, msg.build_long_amount 2601 00000566 3C42 cmp al, 'B' 2602 00000568 7436 je .spec_multi ; build info --> 2603 %if _EXTHELP 2604 0000056A BA[8E19] mov dx, msg.license 2605 0000056D 3C4C cmp al, 'L' 2606 0000056F 741D je .spec ; licence --> 2607 00000571 BA[331E] mov dx, msg.flaghelp 2608 00000574 3C46 cmp al, 'F' 2609 00000576 7416 je .spec ; flag help --> 2610 00000578 BA[601C] mov dx, msg.reghelp 2611 0000057B 3C52 cmp al, 'R' 2612 0000057D 740F je .spec ; register help --> 2613 %if _VARIABLES || _OPTIONS || _PSPVARIABLES 2614 0000057F BA[3D47] mov dx, msg.varhelp 2615 00000582 3C56 cmp al, 'V' 2616 00000584 7408 je .spec ; variable help --> 2617 %endif 2618 %endif 2619 00000586 BB[CA11] mov bx, msg.help_array ; default help 2620 00000589 B103 mov cl, msg.help_array_amount 2621 0000058B 4E dec si 2622 0000058C EB12 jmp .spec_multi 2623 2624 .spec: 2625 0000058E AC lodsb 2626 0000058F E80D94 call chkeol 2627 %if _MESSAGESEGMENT || _HELP_COMPRESSED 2628 00000592 E8109A call putsz_exthelp 2629 00000595 EB03 jmp cmd3_j1a 2630 %endif 2631 2632 prnquit: 2633 00000597 E8199A call putsz ; print string 2634 cmd3_j1a: 2635 0000059A E9DAFE jmp cmd3_j1 ; done 2636 2637 0000059D E9BD7C errorj1:jmp error 2638 2639 help.spec_multi: 2640 000005A0 AC lodsb 2641 000005A1 E8FB93 call chkeol 2642 .loop: 2643 000005A4 8B17 mov dx, word [bx] 2644 000005A6 E8FC99 call putsz_exthelp 2645 000005A9 43 inc bx 2646 000005AA 43 inc bx 2647 000005AB E2F7 loop .loop 2648 000005AD EBEB jmp short cmd3_j1a 2649 2650 %if _EXTHELP && _OPTIONS 2651 help.options: 2652 000005AF 89F3 mov bx, si 2653 000005B1 E82B94 call skipwhite 2654 000005B4 E8D393 call iseol? 2655 000005B7 7445 je .all 2656 000005B9 E8B293 call uppercase 2657 000005BC 3C41 cmp al, 'A' 2658 000005BE BA[B743] mov dx, msg.asmoptions_1 2659 000005C1 7429 je .single 2660 000005C3 3C49 cmp al, 'I' 2661 000005C5 BA[0B40] mov dx, msg.flags_1 2662 000005C8 7422 je .single 2663 000005CA BF[FE11] mov di, msg.options_scan 2664 000005CD B90600 mov cx, msg.options_scan_amount 2665 000005D0 F2AE repne scasb 2666 000005D2 751A jne .pages 2667 000005D4 81EF[FF11] sub di, msg.options_scan + 1 2668 000005D8 D1E7 shl di, 1 2669 000005DA 8BBD[EE11] mov di, word [msg.options_array + di] 2670 000005DE 89FA mov dx, di 2671 %if _MESSAGESEGMENT 2672 000005E0 1E push ds 2673 %if _PM 2674 call get_messagesegsel 2675 %else 2676 000005E1 368E1E[1201] mov ds, word [ss:messageseg] 2677 %endif 2678 %if _HELP_COMPRESSED 2679 cmp word [di], 2 2680 %else 2681 000005E6 803D00 cmp byte [di], 0 2682 %endif 2683 000005E9 1F pop ds 2684 %else 2685 %if _HELP_COMPRESSED 2686 cmp word [di], 2 2687 %else 2688 cmp byte [di], 0 2689 %endif 2690 %endif 2691 000005EA 74B1 je errorj1 2692 .single: 2693 000005EC EBA0 jmp help.spec 2694 2695 .pages: 2696 000005EE 8D77FF lea si, [bx - 1] 2697 000005F1 BA[0412] mov dx, msg.string_options 2698 000005F4 E82993 call isstring? 2699 000005F7 75A4 jne errorj1 2700 000005F9 BA[7B14] mov dx, msg.options_pages 2701 000005FC EBEE jmp .single 2702 2703 .all: 2704 000005FE BB[EE11] mov bx, msg.options_array 2705 00000601 B90800 mov cx, msg.options_array_amount 2706 .loop: 2707 00000604 8B3F mov di, word [bx] 2708 00000606 8B17 mov dx, word [bx] 2709 00000608 E89A99 call putsz_exthelp 2710 0000060B 43 inc bx 2711 0000060C 43 inc bx 2712 %if _MESSAGESEGMENT 2713 0000060D 1E push ds 2714 %if _PM 2715 call get_messagesegsel 2716 %else 2717 0000060E 368E1E[1201] mov ds, word [ss:messageseg] 2718 %endif 2719 %if _HELP_COMPRESSED 2720 cmp word [di], 2 2721 %else 2722 00000613 803D00 cmp byte [di], 0 2723 %endif 2724 00000616 1F pop ds 2725 %else 2726 %if _HELP_COMPRESSED 2727 cmp word [di], 2 2728 %else 2729 cmp byte [di], 0 2730 %endif 2731 %endif 2732 00000617 740B je @F 2733 00000619 83F901 cmp cx, 1 2734 0000061C 7406 je @F 2735 0000061E BA[E732] mov dx, crlf 2736 00000621 E88F99 call putsz 2737 @@: 2738 00000624 E2DE loop .loop 2739 00000626 E9D7F9 jmp cmd3 2740 %endif 2741 2742 2743 %if (_CATCHINTFAULTCOND && _CATCHINT0D) || (_CATCHINTFAULTCOND && _CATCHINT0C) || _CATCHINT2D || _CATCHINT08 2746 ; INP: ds:si -> IISP entry header 2747 ; al = interrupt number 2748 ; bx = interrupt hooked status flag (dif4 low word) 2749 ; OUT: - 2750 ; CHG: ax, bx, cx, dx, di, si 2751 cmd3_int_enable: 2752 00000629 851E[DC00] test word [internalflags4], bx 2753 0000062D 750C jnz .ret 2754 2755 .need: 2756 0000062F 53 push bx 2757 00000630 E8E9AC call install_86m_interrupt_handler 2758 00000633 5B pop bx 2759 00000634 091E[DC00] or word [internalflags4], bx 2760 00000638 E8F3AE call update_inttab_optional 2761 .ret: 2762 0000063B C3 retn 2763 %endif 2764 2765 2766 %if (_CATCHINTFAULTCOND && _CATCHINT0D) || (_CATCHINTFAULTCOND && _CATCHINT0C) || _CATCHINT2D || _CATCHINT08 || _PM 2769 ; INP: ds:si -> IISP entry header 2770 ; al = interrupt number 2771 ; dx = interrupt unhook force flag (dif4 high word) 2772 ; bx = interrupt hooked status flag (dif4 low word) 2773 ; OUT: NC if successfully unhooked 2774 ; dif4 low word cleared 2775 ; CY if already unhooked or failed to unhook, 2776 ; ZR if already unhooked 2777 ; (dif4 low word is clear) 2778 ; NZ if failed to unhook 2779 ; (dif4 low word is still set) 2780 ; CHG: ax, bx, di, si 2781 cmd3_int_disable.set_bx_to_dx: 2782 0000063C 89D3 mov bx, dx 2783 2784 cmd3_int_disable: 2785 0000063E 851E[DC00] test word [internalflags4], bx 2786 00000642 7412 jz .ret_CY ; --> (ZR) 2787 2788 00000644 E8D9AD call UnhookInterruptForce 2789 00000647 720B jc .ret_CY_NZ 2790 2791 00000649 F7D3 not bx 2792 0000064B 211E[DC00] and word [internalflags4], bx 2793 0000064F E8DCAE call update_inttab_optional 2794 00000652 F8 clc ; (NC) 2795 00000653 C3 retn 2796 2797 .ret_CY_NZ: 2798 00000654 85E4 test sp, sp ; (NZ) 2799 .ret_CY: 2800 00000656 F9 stc ; (CY) 2801 00000657 C3 retn 2802 %endif 2803 2804 2805 determine_quiet_output: 2806 00000658 8026[D900]EF clropt [internalflags3], dif3_quiet_output 2807 2808 0000065D 57 push di 2809 0000065E 50 push ax 2810 0000065F F606[DB00]01 testopt [internalflags3], dif3_input_re 2811 00000664 7549 jnz .notquiet 2812 2813 %if _INPUT_FILE_BOOT 2814 00000666 F606[D700]02 testopt [internalflags2], dif2_input_file_boot 2815 0000066B 7412 jz @F 2816 0000066D B8A000 mov ax, LOAD_INPUT_FILE_SIZE 2817 00000670 52 push dx 2818 00000671 F726[A05A] mul word [load_input_file.active] 2819 00000675 5A pop dx 2820 00000676 89C7 mov di, ax 2821 00000678 F685[4758]80 testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietOutput 2822 0000067D EB29 jmp .quiet_if_nz 2823 2824 @@: 2825 %endif 2826 %if _INPUT_FILE_HANDLES 2827 0000067F E8EE7E call InDOS 2828 00000682 7518 jnz @F 2829 2830 00000684 F606[D600]10 testopt [internalflags2], dif2_input_file 2831 00000689 7411 jz @F 2832 0000068B 8B3E[D80A] mov di, word [input_file_handles.active] 2833 0000068F D1E7 shl di, 1 2834 00000691 D1E7 shl di, 1 2835 00000693 D1E7 shl di, 1 ; to qword array index 2836 %if INPUTFILEHANDLE_size != 8 2837 %error Unexpected structure size 2838 %endif 2839 00000695 F685[5B0A]80 testopt [input_file_handles + di + ifhFlags], ifhfQuietOutput 2840 0000069A EB0C jmp .quiet_if_nz 2841 2842 @@: 2843 %endif 2844 0000069C F606[D900]01 testopt [internalflags3], dif3_input_cmdline 2845 000006A1 740C jz @F 2846 000006A3 F606[A300]80 testopt [options], opt_cmdline_quiet_output 2847 ; jmp .quiet_if_nz 2848 2849 .quiet_if_nz: 2850 000006A8 7405 jz @F 2851 .quiet: 2852 000006AA 800E[D900]10 setopt [internalflags3], dif3_quiet_output 2853 .notquiet: 2854 @@: 2855 000006AF 58 pop ax 2856 000006B0 5F pop di 2857 000006B1 C3 retn 2858 2859 2860 guard_auxbuff.1_or_2: 2861 000006B2 F606[DB00]30 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 2863 000006B7 EB05 jmp @F 2864 2865 guard_auxbuff: 2866 000006B9 F606[DB00]70 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 | dif3_auxbuff_guarded_3 2869 @@: 2870 000006BE 7506 jnz @F 2871 000006C0 800E[DB00]10 setopt [internalflags3], dif3_auxbuff_guarded_1 2872 000006C5 C3 retn 2873 2874 @@: 2875 000006C6 B80101 mov ax, 0101h 2876 000006C9 E8DD7B call setrc 2877 000006CC BA[F21C] mov dx, msg.guard_auxbuff_error 2878 .putsz_error: 2879 000006CF E8E198 call putsz 2880 000006D2 E92BF9 jmp cmd3 2881 2882 2883 ; This is used to disallow commands 2884 ; while reading from the RE buffer. 2885 guard_re: 2886 000006D5 F606[DB00]01 testopt [internalflags3], dif3_input_re 2887 000006DA 7501 jnz @F 2888 000006DC C3 retn 2889 2890 @@: 2891 000006DD B80201 mov ax, 0102h 2892 000006E0 E8C67B call setrc 2893 000006E3 BA[141D] mov dx, msg.guard_re_error 2894 000006E6 EBE7 jmp guard_auxbuff.putsz_error 2895 2896 2897 ; This is used to disallow commands 2898 ; while reading from the RC buffer. 2899 guard_rc: 2900 000006E8 F606[D900]01 testopt [internalflags3], dif3_input_cmdline 2901 000006ED 7501 jnz @F 2902 000006EF C3 retn 2903 2904 @@: 2905 000006F0 B80201 mov ax, 0102h 2906 000006F3 E8B37B call setrc 2907 000006F6 BA[511D] mov dx, msg.guard_rc_error 2908 000006F9 EBD4 jmp guard_auxbuff.putsz_error 2909 2910 2911 %include "amis.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug AMIS interface 5 <1> 6 <1> Copyright (C) 2008-2022 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> usesection lDEBUG_DATA_ENTRY 18 <1> 19 <1> align 2, db 0 20 00004072 0000 <1> debuggerfunction: dw 0 21 <1> 22 <1> %if ! _CATCHINT2D 23 <1> align 2, db 0 24 <1> debuggeramissig: 25 <1> .ven: fill 8,32,db "ecm" ; vendor 26 <1> .prod: fill 8,32,db "lDebug" ; product 27 <1> db 0, 0 28 <1> 29 <1> try_debugger_amis_multiplex_number: 30 <1> db -1 31 <1> %else 32 <1> %if 0 33 <1> 34 <1> Supported Int2D functions: 35 <1> 36 <1> AMIS - Installation check 37 <1> INP: al = 00h 38 <1> OUT: al = 0FFh 39 <1> cx = Private version number (currently 0100h) 40 <1> dx:di-> signature: "ecm ", "lDebug " 41 <1> 42 <1> AMIS - Get private entry point - NOP: no private entry point 43 <1> INP: al = 01h 44 <1> OUT: al = 00h 45 <1> 46 <1> AMIS - Uninstall - NOP: can't uninstall 47 <1> INP: al = 02h 48 <1> OUT: al = 00h (not implemented) 49 <1> 50 <1> AMIS - Request pop-up - NOP: no pop-up 51 <1> INP: al = 03h 52 <1> OUT: al = 00h 53 <1> 54 <1> AMIS - Determine chained interrupts 55 <1> INP: al = 04h 56 <1> OUT: al = 04h 57 <1> dx:bx -> interrupt hook list (Int2D always.) 58 <1> 59 <1> AMIS - Get hotkeys - NOP: no hotkeys 60 <1> INP: al = 05h 61 <1> OUT: al = 00h 62 <1> 63 <1> AMIS - Get device driver information 64 <1> INP: al = 06h 65 <1> OUT: al = 00h if not device mode 66 <1> al = 01h to indicate one device, 67 <1> ah = device flags = 01h 68 <1> (01h set = installed from CONFIG.SYS, 69 <1> 02h clear = device is linked into DOS device chain, 70 <1> 04h clear = inreentrant device) 71 <1> dx:bx -> device header 72 <1> 73 <1> AMIS - Reserved for AMIS 74 <1> INP: al = 07h..0Fh 75 <1> OUT: al = 00h 76 <1> 77 <1> TSR - Reserved for TSR 78 <1> INP: al = 10h..2Fh 79 <1> OUT: al = 00h 80 <1> 81 <1> lDebug - Update IISP Header 82 <1> INP: al = 30h 83 <1> ds:si -> source IISP header (or pseudo header) 84 <1> es:di -> destination IISP header 85 <1> OUT: al = FFh to indicate suppported, 86 <1> si and di both incremented by 6 87 <1> destination's ieNext field updated from source 88 <1> al != FFh if not supported, 89 <1> si and di unchanged 90 <1> CHG: - 91 <1> REM: This function is intended to aid in debugging 92 <1> handler re-ordering, removal, or insertion. 93 <1> The 32-bit far pointer needs to be updated 94 <1> as atomically as possible to avoid using 95 <1> an incorrect pointer. 96 <1> Test case: Run a program such as our TSRs' 97 <1> uninstaller or SHUFHOOK and step through it 98 <1> with "tp fffff" when operating on something 99 <1> crucial such as interrupt 21h. Without this 100 <1> function the machine will crash! 101 <1> To enable this function to be called, first run 102 <1> the command "r dco4 or= 8", or "INSTALL AMIS" 103 <1> (install our AMIS multiplexer handler). 104 <1> Other workaround: Use SILENT for TP and disable 105 <1> DCO3 flag 4000_0000 (do not call int 21.0B to 106 <1> check for Ctrl-C status). 107 <1> Yet another workaround: Set flag DCO 8 (enable 108 <1> fake InDOS mode, avoid calling int 21h). 109 <1> REM: The source may be a pseudo IISP header. In this 110 <1> case the ieEntry field should hold 0FEEBh 111 <1> (jmp short $) and the ieSignature field 112 <1> should indicate the source, eg "VT" for the IVT 113 <1> or "NH" for inserting a New Handler. 114 <1> 115 <1> lDebugX - Install DPMI hook 116 <1> INP: al = 31h 117 <1> OUT: al = FFh if installed 118 <1> al = FEh..F0h if not installed but call is supported 119 <1> al = 00h if not supported 120 <1> CHG: - 121 <1> STT: not in DOS 122 <1> 123 <1> lDebugX - Reserved 124 <1> INP: al = 32h 125 <1> 126 <1> lDebugX - Install fault areas 127 <1> INP: al = 33h 128 <1> dx:bx -> fault area structure of client 129 <1> OUT: al = FFh if installed 130 <1> al = FEh..01h if not installed but call is supported 131 <1> al = 00h if not supported 132 <1> CHG: al, bx, cx, dx, si, di, es, ds 133 <1> REM: The area structure is defined in the lDebug sources' 134 <1> debug.mac file. The first 32 bytes of the structure 135 <1> start with a signature word, which is equal to the 136 <1> word value CBF9h (encoding the instruction sequence 137 <1> of stc \ retf) if the structure is not currently 138 <1> installed into any debugger. The remainder of the 139 <1> 32 bytes, as well as the details of how the first 140 <1> two bytes are used otherwise, are private to the 141 <1> debugger that provides this service (the server). 142 <1> The area structure may be far-called in 86 Mode. The 143 <1> only currently defined function (in al) for this call 144 <1> is function 00h, which attempts to uninstall the area 145 <1> structure which is being called. It is valid for 146 <1> either the server or the client to uninstall an 147 <1> area structure if they so wish. 148 <1> The fields of the structure behind the first 32 bytes 149 <1> point to a number of sub-structures and area function 150 <1> lists and area lists. All of these structures are 151 <1> to be accessed using the same segment as the main 152 <1> area structure. They contain linear start and linear 153 <1> end addresses, which the client sets up before it 154 <1> tries to install the areas. The linear start address 155 <1> is also assumed to point to the segment base address 156 <1> which is used as the reference for the area functions 157 <1> and areas. (They do not have to match the offset part 158 <1> actually used to run the code, but the lists must be 159 <1> based on the linear start address.) 160 <1> 161 <1> TSR - Reserved for TSR 162 <1> INP: al = 34h..FFh 163 <1> OUT: al = 00h 164 <1> 165 <1> %endif 166 <1> 167 <1> align 2, db 0 168 <1> debuggeramissig: 169 <1> amissig: 170 00004074 65636D20 <1> .ven: fill 8,32,db "ecm" ; vendor 171 0000407C 6C446562756720- <1> .prod: fill 8,32,db "lDebug" ; product 171 0000407C <1> 172 00004084 6C4465627567207265- <1> .desc: asciz _PROGNAME,_VERSION,", debugger." 172 0000408D 6C6561736520362028- <1> 172 00004096 323032332D30382D32- <1> 172 0000409F 36292C206465627567- <1> 172 000040A8 6765722E00 <1> 173 <1> ; description 174 <1> %if $ - .desc > 64 175 <1> %error AMIS description too long 176 <1> %endif 177 <1> 178 <1> try_amis_multiplex_number: 179 000040AD 00 <1> db 0 180 <1> try_debugger_amis_multiplex_number: 181 000040AE FF <1> db -1 182 <1> 183 <1> 184 000040AF CBEB10FFFFFFFF4B42- <1> iispentry int2D 184 000040B8 00EBF400 <1> 185 000040C2 80FC00 <1> cmp ah, 0 ; magic bytes, used by ecm RENUMBER 186 <1> amis_multiplex_number equ $-1 ; AMIS multiplex number (data for cmp opcode) 187 <1> ; SMC in section lDEBUG_DATA_ENTRY 188 000040C5 7405 <1> je .handle ; our multiplex number --> 189 000040C7 2EFF2E[B240] <1> jmp far [cs:.next] ; else go to next handler --> 190 <1> 191 <1> .handle: 192 000040CC 84C0 <1> test al, al 193 000040CE 740F <1> jz .installationcheck ; installation check --> 194 <1> ; cmp al, 02h 195 <1> ; je .uninstall ; uninstallation --> 196 000040D0 3C04 <1> cmp al, 04h 197 000040D2 7416 <1> je .determineinterrupts ; determine hooked interrupts --> 198 <1> %if _DEVICE 199 000040D4 3C06 <1> cmp al, 06h 200 000040D6 7419 <1> je .getdevice 201 <1> %endif 202 000040D8 3C30 <1> cmp al, 30h 203 000040DA 7428 <1> je .updateiispheader 204 <1> %if _PM 205 <1> cmp al, 31h 206 <1> je .installdpmihook 207 <1> %endif 208 <1> %if _AREAS_HOOK_SERVER 209 <1> cmp al, 33h 210 <1> je .installareas 211 <1> %endif 212 <1> ; all other functions are reserved or not supported by TSR 213 <1> .uninstall: 214 <1> .nop: 215 000040DC B000 <1> mov al, 0 ; show not implemented 216 000040DE CF <1> iret 217 <1> 218 <1> .installationcheck: 219 000040DF FEC8 <1> dec al ; (= FFh) show we're here 220 000040E1 B90001 <1> mov cx, 0100h ; = version 221 000040E4 BF[7440] <1> mov di, amissig ; dx:di -> AMIS signature strings of this program 222 <1> .iret_dx_cs: 223 000040E7 8CCA <1> mov dx, cs 224 <1> .iret: 225 000040E9 CF <1> iret 226 <1> 227 <1> .determineinterrupts: ; al = 04h, always returns list 228 000040EA 2E8B1E[5E0C] <1> mov bx, word [cs:amisintr_offset] 229 <1> ; dx:bx -> hooked interrupts list 230 000040EF EBF6 <1> jmp short .iret_dx_cs 231 <1> 232 <1> %if _DEVICE 233 <1> .getdevice: 234 <1> %if _APPLICATION || _BOOTLDR 235 000040F1 2EF606[E600]40 <1> testopt [cs:internalflags6], dif6_device_mode 236 000040F7 74E3 <1> jz .nop 237 <1> %endif 238 000040F9 B80101 <1> mov ax, 0101h ; CONFIG.SYS, one device 239 000040FC 31DB <1> xor bx, bx 240 000040FE 8CCA <1> mov dx, cs 241 00004100 83EA04 <1> sub dx, paras(deviceshim_size + 10h) 242 <1> ; -> device header 243 00004103 CF <1> iret 244 <1> %endif 245 <1> 246 <1> .updateiispheader: 247 00004104 B0FF <1> mov al, 0FFh ; show supported 248 00004106 FC <1> cld 249 00004107 FA <1> cli ; try to rest while updating chain 250 00004108 A7 <1> cmpsw ; skip over first word (entrypoint) 251 <1> ; (generally xxEBh or 0EA90h) 252 00004109 A5 <1> movsw 253 0000410A A5 <1> movsw ; transfer source ieNext to dest ieNext 254 0000410B CF <1> iret 255 <1> 256 <1> %if _PM 257 <1> .installdpmihook: 258 <1> push bx 259 <1> push ax 260 <1> push cx 261 <1> push dx 262 <1> push di 263 <1> push es 264 <1> push ds 265 <1> push cs 266 <1> pop ds 267 <1> setopt [internalflags6], dif6_in_amis_hook2F 268 <1> push cs 269 <1> call .installdpmitocode 270 <1> clropt [internalflags6], dif6_in_amis_hook2F 271 <1> pop ds 272 <1> pop es 273 <1> pop di 274 <1> pop dx 275 <1> pop cx 276 <1> pop bx 277 <1> mov ah, bh 278 <1> pop bx 279 <1> iret 280 <1> 281 <1> .installdpmitocode: 282 <1> call entry_to_code_seg 283 <1> dw .installdpmicode 284 <1> 285 <1> usesection lDEBUG_CODE 286 <1> .installdpmicode: 287 <1> %if _APPLICATION || _DEVICE 288 <1> call hook2F.not_in_dos 289 <1> %else 290 <1> mov al, 0F1h 291 <1> %endif 292 <1> ; CHG: bx, cx, dx, di, es 293 <1> ; STT: V86/RM 294 <1> ; ds = debugger data segment 295 <1> retf 296 <1> %endif 297 <1> 298 <1> 299 <1> %if _AREAS_HOOK_SERVER 300 <1> usesection lDEBUG_DATA_ENTRY 301 <1> .installareas: 302 <1> push ax 303 <1> push cs 304 <1> pop ds 305 <1> mov es, dx 306 <1> cmp word [es:bx + areastrucEntry], 0CBF9h 307 <1> mov cl, 1 308 <1> jne .areasend 309 <1> 310 <1> ; Set new prev = old last 311 <1> mov ax, word [ddebugareas.prev] 312 <1> mov word [es:bx + areastrucPrev], ax 313 <1> mov ax, word [ddebugareas.prev + 2] 314 <1> mov word [es:bx + areastrucPrev + 2], ax 315 <1> 316 <1> ; Set old last's next to new 317 <1> lds si, [ddebugareas.prev] 318 <1> mov word [si + areastrucNext], bx 319 <1> mov word [si + areastrucNext + 2], dx 320 <1> 321 <1> ; Set new's next to entry 322 <1> mov word [es:bx + areastrucNext], ddebugareas. 323 <1> mov word [es:bx + areastrucNext + 2], cs 324 <1> 325 <1> ; Set entry's prev to new 326 <1> push cs 327 <1> pop ds 328 <1> mov word [ddebugareas.prev], bx 329 <1> mov word [ddebugareas.prev + 2], dx 330 <1> 331 <1> mov di, bx 332 <1> mov si, .areascode 333 <1> mov cx, words(.areascodelength) 334 <1> cld 335 <1> rep movsw 336 <1> 337 <1> mov cl, 0FFh 338 <1> .areasend: 339 <1> pop ax 340 <1> mov al, cl 341 <1> iret 342 <1> 343 <1> 344 <1> align 2, db 0 345 <1> .areascode: 346 <1> call 0:areastruc_entry 347 <1> ..@patch_entry_seg: equ $ - 2 348 <1> .areasaftercall: 349 <1> nop 350 <1> 351 <1> align 2, nop 352 <1> .areascodelength: equ $ - .areascode 353 <1> 354 <1> align 2, db 0 355 <1> ddebugareas: 356 <1> istruc AREASTRUC 357 <1> .: 358 <1> at areastrucNext 359 <1> .next: dw ., 0 360 <1> at areastrucPrev 361 <1> .prev: dw ., 0 362 <1> iend 363 <1> 364 <1> 365 <1> ; INP; al = function number (up to 7Fh) 366 <1> ; dword [ss:sp] -> after far call 16:16 of areas struc 367 <1> ; dword [ss:sp + 4] = far return address to caller 368 <1> ; OUT: al = 0FFh if success 369 <1> ; al = 80h if function not supported 370 <1> ; al = 80h..0FEh if supported but error 371 <1> ; al = unchanged INP:al if not supported 372 <1> ; (probably area struc not installed) 373 <1> ; CHG: ax, bx, cx, dx, si, di, ds, es 374 <1> areastruc_entry: 375 <1> pop bx 376 <1> pop dx 377 <1> sub bx, int2D.areasaftercall - int2D.areascode 378 <1> .qq_entry: 379 <1> cmp al, 0 380 <1> je .uninstall 381 <1> stc 382 <1> mov al, 80h 383 <1> retf 384 <1> 385 <1> 386 <1> ; INP: al = 00h 387 <1> ; dx:bx -> areas struc 388 <1> ; OUT: al = 0FFh if success 389 <1> ; al = 80h if function not supported 390 <1> ; al = 81h if your area struc not found in our list 391 <1> ; al = 82h if your prev does not match our next to you 392 <1> ; al = 83h if your next's prev does not match you 393 <1> ; al = 84h if your area struc not found and malformed list 394 <1> ; al = 80h..0FEh if supported but error 395 <1> ; al = unchanged INP:al if not supported 396 <1> ; CHG: ax, bx, cx, dx, si, di, ds, es 397 <1> .uninstall: 398 <1> mov cx, cs 399 <1> mov ds, cx 400 <1> mov si, ddebugareas 401 <1> 402 <1> xor di, di 403 <1> .uninstall_loop: 404 <1> dec di 405 <1> mov al, 84h 406 <1> jz .uninstall_error 407 <1> cmp word [si + areastrucNext], bx 408 <1> jne .uninstall_next 409 <1> cmp word [si + areastrucNext + 2], dx 410 <1> je .uninstall_found 411 <1> .uninstall_next: 412 <1> lds si, [si + areastrucNext] 413 <1> mov ax, ds 414 <1> cmp ax, cx 415 <1> jne .uninstall_loop 416 <1> cmp si, ddebugareas 417 <1> jne .uninstall_loop 418 <1> mov al, 81h 419 <1> db __TEST_IMM16 420 <1> .uninstall_error_2: 421 <1> mov al, 82h 422 <1> .uninstall_error: 423 <1> stc 424 <1> retf 425 <1> 426 <1> .uninstall_found: 427 <1> mov es, dx 428 <1> cmp word [es:bx + areastrucPrev], si 429 <1> jne .uninstall_error_2 430 <1> mov ax, ds 431 <1> cmp word [es:bx + areastrucPrev + 2], ax 432 <1> jne .uninstall_error_2 433 <1> 434 <1> push ds 435 <1> push si 436 <1> lds si, [es:bx + areastrucNext] 437 <1> cmp word [si + areastrucPrev], bx 438 <1> jne @F 439 <1> cmp word [si + areastrucPrev + 2], dx 440 <1> pop si 441 <1> pop ds 442 <1> @@: 443 <1> mov al, 83h 444 <1> jne .uninstall_error 445 <1> 446 <1> mov ax, word [es:bx + areastrucNext] 447 <1> mov word [si + areastrucNext], ax 448 <1> mov ax, word [es:bx + areastrucNext + 2] 449 <1> mov word [si + areastrucNext + 2], ax 450 <1> 451 <1> lds si, [es:bx + areastrucNext] 452 <1> mov ax, word [es:bx + areastrucPrev] 453 <1> mov word [si + areastrucPrev], ax 454 <1> mov ax, word [es:bx + areastrucPrev + 2] 455 <1> mov word [si + areastrucPrev + 2], ax 456 <1> 457 <1> mov al, 0FFh 458 <1> clc 459 <1> mov word [es:bx + areastrucEntry], 0CBF9h 460 <1> retf 461 <1> %endif ; _AREAS_HOOK_SERVER 462 <1> 463 <1> %endif ; _CATCHINT2D 2912 2913 2914 usesection lDEBUG_CODE 2915 2916 %if _DEBUG4 || _DEBUG5 2917 %define _DEB_ASM_PREFIX 2918 %include "deb.asm" 2919 %endif 2920 2921 2922 %include "aa.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug A command - Assembler 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 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_DATA_ENTRY 19 <1> 20 <1> align 2, db 0 21 0000410C 0000 <1> aa13a_mnemposition: dw 0 ; -> mnemonic, to display error 22 0000410E 00 <1> aa_mnemsuffix: db 0 ; 0 = normal, 1 = 'W' suffix, 2 = 'D' suffix 23 <1> 24 0000410F 00 <1> asm_mn_flags: db 0 ; flags for the mnemonic 25 <1> AMF_D32 equ 1 ; 32-bit opcode/data operand 26 <1> AMF_WAIT equ 2 27 <1> AMF_A32 equ 4 ; address operand is 32-bit 28 <1> AMF_SIB equ 8 ; there's a SIB in the arguments 29 <1> AMF_MSEG equ 10h ; if a seg prefix was given before mnemonic 30 <1> AMF_FSGS equ 20h ; if FS or GS was encountered 31 <1> AMF_D16 equ 40h ; 16-bit opcode/data operand 32 <1> AMF_ADDR equ 80h ; address operand is given (write address size prefix) 33 <1> 34 00004110 00 <1> aa_saved_prefix:db 0 ; WAIT or REP... prefix 35 <1> ; aa_saved_prefix and aa_seg_pre must be consecutive. 36 00004111 00 <1> aa_seg_pre: db 0 ; segment prefix 37 <1> 38 <1> align 2, db 0 39 00004112 0000 <1> mneminfo: dw 0 ; address associated with the mnemonic 40 <1> 41 <1> ; The following 7 words (including alloweddist) must all be consecutive. 42 00004114 0000 <1> rmaddr: dw 0 ; address of operand giving the R/M byte 43 <1> ; regmem and sibbyte must be consecutive 44 00004116 00 <1> regmem: db 0 ; mod reg r/m part of instruction 45 00004117 00 <1> sibbyte: db 0 ; SIB byte 46 00004118 0000 <1> immaddr: dw 0 ; address of operand giving the immed stf 47 0000411A 0000 <1> xxaddr: dw 0 ; address of additional stuff 48 <1> ; dismach and dmflags must be consecutive 49 0000411C 00 <1> dismach: db 0 ; type of processor needed 50 0000411D 00 <1> dmflags: db 0 ; flags for extra processor features 51 <1> 52 <1> DM_COPR equ 1 ; math coprocessor 53 <1> DM_MMX equ 2 ; MMX extensions 54 <1> 55 0000411E 00 <1> opcode_or: db 0 ; extra bits in the op code 56 0000411F 00 <1> opsize: db 0 ; size of this operation (2 or 4) 57 00004120 00 <1> varflags: db 0 ; flags for this variant 58 <1> 59 <1> VAR_LOCKABLE equ 1 ; variant is lockable 60 <1> VAR_MODRM equ 2 ; if there's a MOD R/M here 61 <1> VAR_SIZ_GIVN equ 4 ; if a size was given 62 <1> VAR_SIZ_FORCD equ 8 ; if only one size is permitted 63 <1> VAR_SIZ_NEED equ 10h ; if we need the size 64 <1> VAR_D16 equ 20h ; if operand size is WORD 65 <1> VAR_D32 equ 40h ; if operand size is DWORD 66 <1> VAR_M_ALWAYS_16 equ 80h 67 00004121 00 <1> alloweddist: db 0 68 <1> 69 00004122 00 <1> a_reqsize: db 0 ; size that this arg should be 70 00004123 00 <1> align 2, db 0 71 00004124 0000 <1> a_opcode: dw 0 ; op code info for this variant 72 <1> 73 <1> align 2, db 0 74 00004126 0000 <1> a_opcode2: dw 0 ; copy of a_opcode for obs-instruction 75 00004128 E0DBE1DBE4DB240126- <1> a_obstab: dw 0DBE0h,0DBE1h,0DBE4h,124h,126h ; obs. instruction codes 75 00004131 01 <1> 76 00004132 0101020404 <1> obsmach: db 1,1,2,4,4 ; max permissible machine for the above 77 <1> ; This is used to search for obsolete instructions: 78 <1> ; DBE0h: feni 79 <1> ; DBE1h: fdisi 80 <1> ; DBE4h: fsetpm 81 <1> ; 124h: mov trX, reg 82 <1> ; 126h: mov reg, trX 83 <1> 84 00004137 00040201 <1> aadbsiz: db 0,4,2,1 ; table for max size of db operand 85 0000413B 00 <1> align 2, db 0 86 0000413C 0000[D309][D509]- <1> aadbsto: dw 0,aa28,aa29,aa30 ; table for routine to store a number 86 00004142 [D709] <1> 87 <1> 88 <1> align 2, db 0 ; (modrmtab really is an array of words) 89 00004144 0B000D00 <1> modrmtab: db REG_BX,0,REG_BP,0 ; [bx], [bp] 90 00004148 0F000E00 <1> db REG_DI,0,REG_SI,0 ; [di], [si] 91 0000414C 0F0D0E0D <1> db REG_DI,REG_BP,REG_SI,REG_BP ; [bp+di],[bp+si] 92 00004150 0F0B0E0B <1> db REG_DI,REG_BX,REG_SI,REG_BX ; [bx+di],[bx+si] 93 <1> 94 <1> %if _IMMASM 95 <1> aa_ret: dw aa01 ; used by immasm 96 <1> %endif 97 00004154 610D <1> aam_args: db 'a',13 98 <1> 99 <1> ; Equates for parsed arguments, stored in OPRND.flags 100 <1> ARG_DEREF equ 1 ; non-immediate memory reference 101 <1> ARG_MODRM equ 2 ; if we've computed the MOD R/M byte 102 <1> ARG_JUSTREG equ 4 ; a solo register 103 <1> ARG_WEIRDREG equ 8 ; if it's a segment register or CR, etc. 104 <1> ARG_IMMED equ 10h ; if it's just a number 105 <1> ARG_FARADDR equ 20h ; if it's of the form xxxx:yyyyyyyy 106 <1> ARG_ECX_SPECIAL equ 80h ; have to overflow loop displacement 107 <1> 108 <1> ; For each operand type in the following table, the value 109 <1> ; is the bits at least one of which must be present. 110 <1> ; For each entry in bittab, there's an entry in asmjmp. 111 <1> ; Entries are defined in the debug.asm opsizeditem list. 112 <1> bittab: 113 00004156 1005010401040404 <1> db BITTAB_OPSIZEDITEMS 114 0000415E 00 <1> times 16 - ($ - bittab) db 0 ; unused OP_SIZE combined types 115 <1> 116 <1> ; OP_END does not have a table entry. Subsequent 117 <1> ; entries are defined in the debug.asm opitem list. 118 00004166 010101010120101008- <1> db BITTAB_OPITEMS 118 0000416F 080808080810101010- <1> 118 00004178 100808FFFFFFFFFFFF- <1> 118 00004181 FFFFFFFFFFFFFFFF04- <1> 118 0000418A 101004040808080808- <1> 118 00004193 0808 <1> 119 <1> %if ($ - bittab) != OP_AMOUNT_TABLE 120 <1> %error bittab has wrong size 121 <1> %endif 122 <1> 123 <1> ; Jump table for operand types. 124 <1> ; Entries are defined in the debug.asm opsizeditem list. 125 00004195 00 <1> align 2, db 0 126 <1> asmjmp: 127 00004196 [E70F][C90F][C90F]- <1> dw ASMJMP_OPSIZEDITEMS 127 0000419C [C90F][ED0F][CE0F]- <1> 127 000041A2 [DD0F][F80F] <1> 128 000041A6 [E612] <1> times 16 - (($ - asmjmp) / 2) dw ao50 ; unused size-combined types (reject) 129 <1> 130 <1> ; OP_END does not have a table entry. Subsequent 131 <1> ; entries are defined in the debug.asm opitem list. 132 000041B6 [8910][8910][8910]- <1> dw ASMJMP_OPITEMS 132 000041BC [8910][8910][9210]- <1> 132 000041C2 [CD10][3411][8C11]- <1> 132 000041C8 [9011][A511][C111]- <1> 132 000041CE [C511][EF11][0612]- <1> 132 000041D4 [0B12][1412][1412]- <1> 132 000041DA [1412][9711][9B11]- <1> 132 000041E0 [7312][B212][BA12]- <1> 132 000041E6 [C412][BE12][A712]- <1> 132 000041EC [A712][A712][A712]- <1> 132 000041F2 [A712][0E0E][0E0E]- <1> 132 000041F8 [0E0E][AB12][3812]- <1> 132 000041FE [C812][CF12][DC12]- <1> 132 00004204 [DC12][DC12][DC12]- <1> 132 0000420A [DC12][DC12][DC12]- <1> 132 00004210 [DC12][DC12] <1> 133 <1> %if ($ - asmjmp) / 2 != OP_AMOUNT_TABLE 134 <1> %error asmjmp has wrong size 135 <1> %endif 136 <1> 137 <1> ; special ops DX, CL, ST, CS, DS, ES, FS, GS, SS 138 <1> ; entry required if ao48 is used in the opitem list 139 <1> ; order has to match opitem order 140 <1> ; refer to aagetreg comment for the number assignments 141 00004214 0A011E <1> asm_regnum: db REG_DX, REG_CL, REG_ST 142 00004217 191B181C1D1A <1> db REG_CS, REG_DS, REG_ES, REG_FS, REG_GS, REG_SS 143 <1> 144 <1> ; sizes for OP_M64, OP_MFLOAT, OP_MDOUBLE, OP_M80, OP_MXX 145 <1> ; entry required if ao17 is used in the opitem list 146 <1> ; order has to match opitem order 147 0000421D 05060708 <1> asm_siznum: db SIZ_QWORD, SIZ_FLOAT, SIZ_DOUBLE, SIZ_TBYTE 148 00004221 FF <1> db -1 ; none 149 <1> 150 <1> ; size qualifier 151 <1> ; 1 BY = BYTE 152 <1> ; 2 WO = WORD 153 <1> ; 3 unused 154 <1> ; 4 DW = DWORD 155 <1> ; 5 QW = QWORD 156 <1> ; 6 FL = FLOAT (REAL4) 157 <1> ; 7 DO = DOUBLE (REAL8) 158 <1> ; 8 TB = TBYTE (REAL10) 159 <1> 160 <1> SIZ_NONE equ 0 161 <1> SIZ_BYTE equ 1 162 <1> SIZ_WORD equ 2 163 <1> SIZ_DWORD equ 4 164 <1> SIZ_QWORD equ 5 165 <1> SIZ_FLOAT equ 6 166 <1> SIZ_DOUBLE equ 7 167 <1> SIZ_TBYTE equ 8 168 <1> 169 <1> align 2, db 0 170 00004222 4259574F574F445751- <1> sizetcnam: db "BY","WO","WO","DW","QW","FL","DO","TB" 170 0000422B 57464C444F5442 <1> 171 <1> endarea sizetcnam 172 <1> 173 <1> align 2, db 0 174 00004232 53484E454641 <1> distnam: db "SH","NE","FA" 175 <1> endarea distnam 176 <1> 177 <1> 178 <1> usesection lDEBUG_CODE 179 <1> 180 <1> ..@aa_access_start: 181 <1> 182 <1> aa_cmd3_check: 183 000006FB AC <1> lodsb 184 000006FC E8A092 <1> call chkeol 185 <1> aa_cmd3: 186 000006FF E9FEF8 <1> jmp cmd3 ; exit assembler mode --> 187 <1> 188 <1> 189 <1> aa: 190 00000702 E8D0FF <1> call guard_re 191 <1> %if _ATTACH 192 00000705 4E <1> dec si 193 00000706 4E <1> dec si 194 00000707 BA[C914] <1> mov dx, msg.attach 195 0000070A E81392 <1> call isstring? 196 0000070D AC <1> lodsb 197 0000070E 7503E9C137 <1> je attach 198 00000713 AC <1> lodsb 199 <1> %endif 200 00000714 8B1E[D00C] <1> mov bx, word [ reg_cs ] ; default segment to use 201 <1> aa00a: 202 00000718 E86F92 <1> call iseol? 203 0000071B 740E <1> je aa01 ; if end of line --> 204 0000071D E83080 <1> nearcall getaddrX ; get address into bx:(e)dx 205 <1> ; (no scratchsel) 206 00000720 E87C92 <1> call chkeol ; expect end of line here 207 <1> _386_PM_o32 ; mov dword [ a_addr ], edx 208 00000723 8916[720B] <1> mov word [ a_addr ], dx ; save the address 209 00000727 891E[760B] <1> mov word [a_addr + saSegSel], bx 210 <1> %if _PM 211 <1> call ispm 212 <1> jnz .86m 213 <1> .pm: 214 <1> mov word [a_addr + saSelector], bx 215 <1> jmp @F 216 <1> .86m: 217 <1> mov word [a_addr + saSegment], bx 218 <1> @@: 219 <1> %endif 220 <1> 221 <1> ; Begin loop over input lines. 222 <1> aa01: 223 <1> %if _IMMASM 224 <1> mov word [ aa_ret ], aa01 225 <1> %endif 226 0000072B C706[F20A][2B07] <1> mov word [ errret ], aa01 227 00000731 8B26[EC0A] <1> mov sp, word [ savesp ] ; restore the stack (this implies no "retn") 228 00000735 BF[B40A] <1> mov di, line_out 229 00000738 A1[760B] <1> mov ax, word [a_addr + saSegSel] 230 <1> %if _PM 231 <1> mov bx, ax ; this is the original selector, 232 <1> ; not the scratchsel 233 <1> %endif 234 0000073B E84C93 <1> call hexword 235 0000073E B03A <1> mov al, ':' 236 00000740 AA <1> stosb 237 <1> %if _PM 238 <1> mov byte [ bCSAttr ], 0 239 <1> call test_d_b_bit 240 <1> jz .16 241 <1> mov byte [ bCSAttr ], 40h ; set 32-bit attrib for later checks here 242 <1> mov ax, word [ a_addr+2 ] 243 <1> call hexword 244 <1> .16: 245 <1> %endif 246 00000741 A1[720B] <1> mov ax, word [ a_addr+0 ] 247 00000744 E84393 <1> call hexword 248 00000747 B020 <1> mov al, 32 249 00000749 AA <1> stosb 250 0000074A E8F49B <1> call getline00 251 0000074D 3C2E <1> cmp al, '.' 252 0000074F 74AA <1> je aa_cmd3_check 253 00000751 3C3B <1> cmp al, ';' 254 00000753 74D6 <1> je aa01 ; if comment 255 00000755 E83692 <1> call iseol?.notsemicolon 256 00000758 74A5 <1> je aa_cmd3 ; if done, return to command line --> 257 <1> aa_imm_entry: 258 0000075A C606[0F41]00 <1> mov byte [ asm_mn_flags ], 0 259 0000075F C706[1041]0000 <1> mov word [ aa_saved_prefix ], 0 ; clear aa_saved_prefix and aa_seg_pre 260 <1> 261 <1> ; Get mnemonic and look it up. 262 <1> ; (At this point, it has been determined that it is not empty.) 263 <1> ; 264 <1> ; INP: al = first character 265 <1> ; si-> remaining string (al isn't EOL) 266 <1> aa02: 267 00000765 BF[B40A] <1> mov di, line_out ; -> buffer 268 00000768 31C9 <1> xor cx, cx ; = 0 269 0000076A 8936[0C41] <1> mov [ aa13a_mnemposition ], si 270 <1> 271 0000076E A9 <1> db __TEST_IMM16 ; skip stosb,lodsb initially 272 <1> @@: 273 0000076F AA <1> stosb 274 00000770 AC <1> lodsb 275 00000771 41 <1> inc cx ; count length 276 00000772 E8F991 <1> call uppercase 277 00000775 E81292 <1> call iseol? ; end of mnemonic ? 278 00000778 740C <1> je @F 279 0000077A 3C3A <1> cmp al, ':' 280 0000077C 7408 <1> je @F ; (for prefixes, else will be an error later) 281 0000077E 3C20 <1> cmp al, 32 282 00000780 7404 <1> je @F 283 00000782 3C09 <1> cmp al, 9 284 00000784 75E9 <1> jne @B ; not yet --> 285 <1> @@: 286 <1> 287 00000786 49 <1> dec cx ; = length of input 288 00000787 E85692 <1> call skipwh0 ; skip to next field 289 0000078A 4E <1> dec si 290 <1> 291 0000078B 8A45FF <1> mov al, [di-1] ; get last stored character 292 0000078E 3C57 <1> cmp al, 'W' ; possible suffix? 293 00000790 7406 <1> je @F 294 00000792 3C44 <1> cmp al, 'D' 295 00000794 7402 <1> je @F ; yes --> 296 00000796 30C0 <1> xor al, al 297 <1> @@: 298 00000798 A2[0E41] <1> mov [aa_mnemsuffix], al ; store 'D', 'W', or 0 299 <1> 300 0000079B 56 <1> push si ; save position in input line 301 <1> 302 0000079C BE[9E01] <1> mov si, mnlist ; -> first area: no or optional suffix 303 0000079F BA[2B0C] <1> mov dx, mnlist_o_suffix_required; -> end of first area 304 <1> 305 <1> ; [line_out] = name to search 306 <1> ; cx = length of name to search 307 <1> ; si-> next mnlist entry 308 <1> ; dx-> behind last mnlist entry of this area 309 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 310 <1> aa_mnemlistloop: 311 000007A2 AD <1> lodsw ; load combined word, si-> name 312 000007A3 83E00F <1> and ax, 0Fh ; separate mnemonic length 313 000007A6 39C8 <1> cmp ax, cx ; length matches ? 314 000007A8 741D <1> je .length_match ; yes, check name --> 315 <1> .cmps_mismatch: 316 000007AA 01C6 <1> add si, ax ; -> behind entry 317 000007AC 39D6 <1> cmp si, dx ; at end of this list area ? 318 000007AE 72F2 <1> jb aa_mnemlistloop ; not yet, check next entry --> 319 <1> 320 000007B0 81FA[2B0C] <1> cmp dx, mnlist_o_suffix_required; was first or second area ? 321 000007B4 750D <1> jne .mnem_invalid ; second, not found --> 322 <1> 323 000007B6 BE[920B] <1> mov si, mnlist_a_suffix_allowed ; -> second area: optional or required suffix 324 000007B9 BA[540C] <1> mov dx, end_mnlist ; -> end of second area 325 <1> 326 000007BC 49 <1> dec cx ; prepare for second look-up 327 000007BD 3826[0E41] <1> cmp [aa_mnemsuffix], ah ; is there a valid suffix ? (ah still 0) 328 000007C1 75DF <1> jne aa_mnemlistloop ; yes, check for suffixed instruction --> 329 <1> 330 <1> .mnem_invalid: 331 000007C3 58 <1> pop ax ; (discard) 332 000007C4 E98701 <1> jmp aa13a ; complain --> 333 <1> 334 <1> .length_match: ; found a name of correct length 335 000007C7 BF[B40A] <1> mov di, line_out ; -> all-capitals input 336 000007CA 89F3 <1> mov bx, si ; -> name 337 000007CC F3A6 <1> repe cmpsb ; compare names 338 000007CE 89DE <1> mov si, bx 339 000007D0 89C1 <1> mov cx, ax ; restore length 340 000007D2 75D6 <1> jne .cmps_mismatch ; not this, continue --> 341 <1> 342 <1> ; We found the mnemonic. 343 <1> ; (bx=si)-> entry's mnemonic 344 <1> ; dx-> behind last mnlist entry of this area 345 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 346 000007D4 89F0 <1> mov ax, si ; -> mnemonic's name 347 <1> 348 000007D6 81FA[540C] <1> cmp dx, end_mnlist ; was first or second area ? 349 000007DA 7409 <1> je .handlesuffix ; second, there's a suffix to handle --> 350 <1> 351 000007DC 3D[920B] <1> cmp ax, mnlist_a_suffix_allowed ; optional suffix that was not specified? 352 000007DF 7232 <1> jb aa_mnemonic_found ; no, done with the suffixes already --> 353 <1> 354 <1> %if _PM 355 <1> mov dl, byte [ bCSAttr ] ; dl = whether a 32-bit CS 356 <1> %else 357 000007E1 30D2 <1> xor dl, dl ; 86 Mode is always 16-bit 358 <1> %endif 359 000007E3 EB09 <1> jmp sho .suffix_decide 360 <1> 361 <1> .handlesuffix: 362 <1> 363 000007E5 8A16[0E41] <1> mov dl, byte [ aa_mnemsuffix ] ; dl = 'W' or 'D'. 'W' is odd, 'D' is even 364 000007E9 F6D2 <1> not dl ; make 'W' an even value, 'D' an odd one 365 000007EB 80E201 <1> and dl, 1 ; 'W' results in 0, 'D' in 1 366 <1> 367 <1> .suffix_decide: 368 000007EE 3D[B60B] <1> cmp ax, mnlist_o_suffix_allowed ; address size suffix ? 369 000007F1 7212 <1> jb .a_suffix ; yes --> 370 <1> 371 <1> ; Operand size suffix. 372 000007F3 84D2 <1> test dl, dl ; which ? 373 000007F5 7407 <1> jz .o_suffix_w 374 000007F7 800E[0F41]01 <1> or byte [asm_mn_flags], AMF_D32 ; o32 375 000007FC EB15 <1> jmp sho aa_mnemonic_found 376 <1> 377 <1> .o_suffix_w: 378 000007FE 800E[0F41]40 <1> or byte [asm_mn_flags], AMF_D16 ; o16 379 00000803 EB0E <1> jmp sho aa_mnemonic_found 380 <1> 381 <1> ; Address size suffix. 382 <1> .a_suffix: 383 00000805 84D2 <1> test dl, dl ; which ? 384 00000807 7405 <1> jz .a_suffix_w 385 00000809 800E[0F41]84 <1> or byte [asm_mn_flags], AMF_ADDR|AMF_A32; a32 386 <1> .a_suffix_w: 387 0000080E 800E[0F41]80 <1> or byte [asm_mn_flags], AMF_ADDR ; a16 (AMF_A32 still clear) 388 <1> 389 <1> aa_mnemonic_found: 390 00000813 C606[1C41]00 <1> mov byte [dismach], 0 391 00000818 B104 <1> mov cl, 4 392 0000081A 8B74FE <1> mov si, [si-2] ; get the combined word 393 0000081D D3EE <1> shr si, cl ; extract offset into asmtab 394 0000081F 81C6[0000] <1> add si, asmtab ; -> asmtab sequence 395 <1> 396 <1> ; bx-> name of matching mnlist entry 397 <1> ; If this mnemonic is suffixable/suffixed, 398 <1> ; AMF_D32,AMF_D16,AMF_ADDR,AMF_A32 show suffix status 399 <1> ; si-> associated asmtab sequence 400 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 401 <1> 402 <1> %if 0 403 <1> 404 <1> Now si points to the spot in asmtab corresponding to this mnemonic. 405 <1> The format of the assembler table is as follows. 406 <1> First, there is optionally one of the following bytes: 407 <1> 408 <1> ASM_SPECIAL This is a special mnemonic (directive or AAx). 409 <1> ASM_WAIT The instruction is prefixed by a WAIT. 410 <1> ASM_D32 This is a 32-bit instruction variant. 411 <1> ASM_D16 This is a 16-bit instruction variant. 412 <1> 413 <1> Then, except for non-AAx ASM_SPECIAL, this is followed by one or 414 <1> more of the following sequences, indicating an instruction variant. 415 <1> 416 <1> ASM_LOCKABLE Indicates that this instruction can follow a LOCK prefix. 417 <1> ASM_MACHx Indicates the CPU this instruction requires, 1..6 (186..686). 418 <1> ASM_ESCAPE Escapes a large following word. The assembler table contains 419 <1> as many escapes as necessary; each escape means to add the 420 <1> value of ASM_ESCAPE to the following high byte of the info 421 <1> word. This will easily overflow the word, so a dword is 422 <1> required to process the info word. ASM_ESCAPE currently 423 <1> needs to be equal to ASM_FIRST (ie. the lowest assembler 424 <1> table prefix byte) because otherwise some values would have 425 <1> no valid encoding. _ASM_ESCAPE_USED is a preprocessor 426 <1> variable which will be 0 in case there are no ASM_ESCAPE 427 <1> bytes to be found in the table. 428 <1> [word] This is a 16-bit integer, most significant byte first, giving 429 <1> ASMMOD * a + b, where b is an index into the array opindex 430 <1> (indicating the operand list), and a is as follows (hex): 431 <1> 0..FF The (one-byte) instruction. 432 <1> 100..1FF The lower 8 bits give the second byte of 433 <1> a two-byte instruction beginning with 0Fh. 434 <1> 200..23F Bits 2-0 say which floating point instruction 435 <1> this is (D8h-DFh), and 5-3 give the /r field. 436 <1> 240..1247 (a-240h)/8 is the index in the array agroups 437 <1> (which gives the real value of a), and the 438 <1> low-order 3 bits gives the /r field. 439 <1> [byte] This gives the second byte of a floating point 440 <1> instruction if 0D8h <= a <= 0DFh. 441 <1> 442 <1> Following these is an ASM_END byte. (ASM_SPECIAL has the same value as 443 <1> ASM_END, but the context allows to decide which one is meant.) 444 <1> 445 <1> Exceptions: 446 <1> ASM_SPECIAL are not followed by this opcode information (except AAx). 447 <1> ASM_SPECIAL segment, LOCK and REP prefixes are followed by the literal 448 <1> prefix byte. 449 <1> ASM_SPECIAL for all mnemonics except AAx and the prefixes are not 450 <1> followed by anything at all. 451 <1> 452 <1> The ASM_ symbols are defined where debugtbl.inc is included in debug.asm. 453 <1> 454 <1> %endif 455 <1> 456 <1> ; To do: BITS, USE16, USE32, USEAUTO, CPU 457 00000823 AC <1> lodsb ; get a possible prefix 458 <1> .checkprefix: 459 <1> %if 1 460 00000824 3CFF <1> cmp al, ASM_SPECIAL ; a special mnemonic ? 461 00000826 7403E99A00 <1> jne .notspecial ; no --> 462 <1> 463 <1> ; Dispatch based on mnemonic. 464 <1> %ifdef MN_O32 465 0000082B 31C0 <1> xor ax, ax 466 0000082D 81FB[AF01] <1> cmp bx, mnlist+MN_O16 467 00000831 7503E9A600 <1> je aa_sizeprefix ; o16 (ax = 0) --> 468 00000836 40 <1> inc ax 469 00000837 81FB[A501] <1> cmp bx, mnlist+MN_A16 470 0000083B 7503E99C00 <1> je aa_sizeprefix ; a16 (ax = 1) --> 471 00000840 B402 <1> mov ah, 2 472 00000842 81FB[A001] <1> cmp bx, mnlist+MN_A32 473 00000846 7503E99100 <1> je aa_sizeprefix ; a32 (ax = 201h) --> 474 0000084B 48 <1> dec ax 475 0000084C 81FB[AA01] <1> cmp bx, mnlist+MN_O32 476 00000850 7503E98700 <1> je aa_sizeprefix ; o32 (ax = 200h) --> 477 <1> %endif 478 00000855 81FB[9707] <1> cmp bx, mnlist+MN_LOCK 479 00000859 7503E9E700 <1> je aa18 ; lock --> 480 0000085E 81FB[BB09] <1> cmp bx, mnlist+MN_REP 481 00000862 7209 <1> jb .notreplock 482 00000864 81FB[D309] <1> cmp bx, mnlist+MN_REPNE 483 00000868 7703E9D800 <1> jbe aa18 ; rep, repe, repne --> 484 <1> .notreplock: 485 0000086D 81FB[F409] <1> cmp bx, mnlist+MN_ES 486 00000871 7209 <1> jb .notseg 487 <1> %ifdef MN_GS 488 00000873 81FB[080A] <1> cmp bx, mnlist+MN_GS 489 00000877 7703E9B300 <1> jbe aa17 ; single segment prefix --> 490 <1> %else 491 <1> cmp bx, mnlist+MN_DS 492 <1> jbe aa17 ; single segment prefix --> 493 <1> %endif 494 <1> .notseg: 495 0000087C 81FB[C001] <1> cmp bx, mnlist+MN_AAD 496 00000880 7503E95401 <1> je aa_aax ; aad --> 497 00000885 81FB[C501] <1> cmp bx, mnlist+MN_AAM 498 00000889 7503E94B01 <1> je aa_aax ; aam --> 499 0000088E 833E[1041]00 <1> cmp word [ aa_saved_prefix ], byte 0 500 00000893 7403E9B600 <1> jne aa13a ; if there was a prefix or a segment, error --> 501 00000898 5E <1> pop si ; get position in input line 502 <1> ;cmp bx, mnlist+MN_SEG 503 <1> ;je aa_seg ; SEG mnemonic, process --> 504 00000899 81FB[7D09] <1> cmp bx, mnlist+MN_ORG 505 0000089D 7503E9B300 <1> je aa_org 506 000008A2 B80100 <1> mov ax, 1 507 000008A5 81FB[6303] <1> cmp bx, mnlist+MN_DD 508 000008A9 7503E9AF00 <1> je aa20m ; dd (ax = 1) --> 509 000008AE 40 <1> inc ax 510 000008AF 81FB[7103] <1> cmp bx, mnlist+MN_DW 511 000008B3 7503E9A500 <1> je aa20m ; dw (ax = 2) --> 512 000008B8 40 <1> inc ax 513 000008B9 81FB[5F03] <1> cmp bx, mnlist+MN_DB 514 000008BD 7503E99B00 <1> je aa20m ; db (ax = 3) --> 515 000008C2 E98900 <1> jmp aa13a ; unhandled special mnemonic --> 516 <1> 517 <1> .notspecial: 518 000008C5 2CFC <1> sub al, ASM_D16 ; mnemonic has a prefix ? 519 000008C7 7207 <1> jb .normal ; no --> 520 000008C9 7409 <1> je .d16 ; it is a 16-bit mnemonic form --> 521 <1> %else 522 <1> cmp al, ASM_O16PREF 523 <1> jb .normal ; no special mnemonic --> 524 <1> cmp al, ASM_A32PREF 525 <1> jbe aa_sizeprefix ; 386 address/operand size prefix --> 526 <1> 527 <1> sub al, ASM_LOCKREP ; check for mnemonic flag byte, 528 <1> ; and convert it to 0..9 if one 529 <1> jb .normal ; if none --> 530 <1> je aa18 ; if LOCK/REP --> 531 <1> cbw 532 <1> dec ax 533 <1> jz aa17 ; if segment prefix (ASM_SEG) --> 534 <1> dec ax 535 <1> jz aa_aax ; if aad or aam (ASM_AAX) --> 536 <1> dec ax 537 <1> jz .d16 ; if ASM_D16 --> 538 <1> cmp al, 3 539 <1> jae aa20 ; if ASM_ORG or ASM_DD or ASM_DW or ASM_DB --> 540 <1> %endif 541 000008CB 0806[0F41] <1> or [ asm_mn_flags ], al ; save AMF_D32 or AMF_WAIT (1 or 2) 542 000008CF A8 <1> db __TEST_IMM8 ; (skip dec) 543 <1> .normal: 544 000008D0 4E <1> dec si ; -> first byte of mnemonic info 545 <1> .ab01: 546 000008D1 E91501 <1> jmp ab01 ; now process the arguments 547 <1> .d16: 548 000008D4 800E[0F41]40 <1> or byte [ asm_mn_flags ], AMF_D16 549 000008D9 46 <1> inc si ; skip the ASM_D32 byte 550 000008DA EBF5 <1> jmp short .ab01 ; now process the arguments 551 <1> 552 <1> %ifdef MN_O32 553 <1> aa_sizeprefix: 554 <1> %if 0 555 <1> sub al, ASM_O16PREF ; 0 = o16, 1 = a16, 2 = o32, 3 = a32 556 <1> mov ah, al 557 <1> and ax, (2<<8)|1 ; ah = 2 if 32-bit prefix, al = 1 if ASIZE 558 <1> %endif 559 <1> %if _PM 560 <1> or ah, byte [ bCSAttr ] 561 <1> jz .nobyte ; 16-bit CS and 16-bit prefix, no output --> 562 <1> cmp ah, 40h| 2 563 <1> je .nobyte ; 32-bit CS and 32-bit prefix, no output --> 564 <1> %else 565 000008DC 84E4 <1> test ah, ah 566 000008DE 7409 <1> jz .nobyte ; 16-bit CS and 16-bit prefix --> 567 <1> %endif 568 <1> 569 <1> ; CS differs from the prefix's type. 570 <1> ; Output a prefix byte. 571 000008E0 0466 <1> add al, 66h ; 66h if OSIZE, 67h if ASIZE 572 000008E2 BF[B40A] <1> mov di, line_out 573 000008E5 AA <1> stosb 574 000008E6 E8D200 <1> call aa_copymem 575 <1> .nobyte: 576 <1> %endif 577 <1> aa_handleprefixes: 578 000008E9 5E <1> pop si 579 000008EA AC <1> lodsb ; get character 580 000008EB 3C3A <1> cmp al, ':' 581 000008ED 7503 <1> jne .nocolon 582 000008EF E8ED90 <1> call skipwhite ; skip a colon 583 <1> .nocolon: 584 000008F2 E89590 <1> call iseol? ; end of line? 585 000008F5 7403E96BFE <1> jne aa02 ; no, process instruction --> 586 <1> 587 <1> ; No instruction follows. 588 <1> ; Write out saved LOCK/REP and/or segment prefix. 589 000008FA A0[1141] <1> mov al, byte [ aa_seg_pre ] 590 000008FD 84C0 <1> test al, al 591 000008FF 7409 <1> jz .noseg 592 00000901 BF[B40A] <1> mov di, line_out 593 00000904 AA <1> stosb 594 00000905 56 <1> push si 595 00000906 E8B200 <1> call aa_copymem 596 00000909 5E <1> pop si 597 <1> .noseg: 598 0000090A A0[1041] <1> mov al, byte [ aa_saved_prefix ] 599 0000090D 84C0 <1> test al, al 600 0000090F 7409 <1> jz .noreplock 601 00000911 BF[B40A] <1> mov di, line_out 602 00000914 AA <1> stosb 603 00000915 56 <1> push si 604 00000916 E8A200 <1> call aa_copymem 605 00000919 5E <1> pop si 606 <1> .noreplock: 607 <1> 608 0000091A BF[2841] <1> mov di, a_obstab ; info on this instruction 609 0000091D 31C9 <1> xor cx, cx 610 0000091F E82053 <1> call sm1 ; get machine message into si, length into cx 611 00000922 E308 <1> jcxz .ac33 ; if no message 612 00000924 BF[B40A] <1> mov di, line_out 613 00000927 F3A4 <1> rep movsb ; copy the line to line_out 614 00000929 E89791 <1> call putsline_crlf 615 <1> .ac33: 616 <1> 617 <1> aa01_j1: 618 <1> %if _IMMASM 619 <1> jmp near [ aa_ret ] ; return to prompt 620 <1> %else 621 0000092C E9FCFD <1> jmp aa01 622 <1> %endif 623 <1> 624 <1> 625 <1> %if 0 626 <1> ; SEG directive (segment prefix follows) 627 <1> aa_seg: 628 <1> call skipwhite 629 <1> mov ah, byte [si] 630 <1> and ax, ~2020h 631 <1> mov di, segrgnam 632 <1> mov cx, 6 633 <1> repne scasw 634 <1> jne aa24 ; if not found 635 <1> push si ; save si in case there's no colon 636 <1> inc si ; skip "?s" 637 <1> call skipwhite 638 <1> pop si 639 <1> call chkeol 640 <1> mov bx, prefixlist + 5 641 <1> sub bx, cx 642 <1> mov al, byte [ bx ] ; look up the prefix byte 643 <1> mov di, line_out 644 <1> stosb 645 <1> push si 646 <1> call aa_copymem 647 <1> pop si 648 <1> jmp short aa01_j1 649 <1> %endif 650 <1> 651 <1> ; segment prefix 652 <1> aa17: 653 0000092F AC <1> lodsb ; get prefix value 654 00000930 3CF5 <1> cmp al, ASM_MACH1 655 00000932 7207 <1> jb @F 656 00000934 2CF5 <1> sub al, ASM_MACH1 657 00000936 40 <1> inc ax 658 00000937 A2[1C41] <1> mov byte [dismach], al ; save machine type 659 0000093A AC <1> lodsb 660 <1> @@: 661 0000093B A2[1141] <1> mov byte [ aa_seg_pre ], al 662 0000093E 800E[0F41]10 <1> or byte [ asm_mn_flags ], AMF_MSEG 663 00000943 EBA4 <1> jmp short aa_handleprefixes 664 <1> 665 <1> ; LOCK or REP prefix 666 <1> aa18: 667 00000945 AC <1> lodsb ; get prefix value 668 00000946 8606[1041] <1> xchg al, byte [ aa_saved_prefix ] 669 0000094A 84C0 <1> test al, al 670 0000094C 749B <1> jz aa_handleprefixes 671 <1> ; if there already was a saved prefix: 672 <1> aa13a: 673 0000094E 8B36[0C41] <1> mov si, [ aa13a_mnemposition ] 674 00000952 E90879 <1> jmp error 675 <1> 676 <1> %if 0 677 <1> ; Pseudo ops (org or db/dw/dd). 678 <1> aa20: 679 <1> cmp word [ aa_saved_prefix ], byte 0 680 <1> jne aa13a ; if there was a prefix or a segment, error --> 681 <1> pop si ; get position in input line 682 <1> sub al, 3 ; AX=0 if org, 1 if dd, 2 if dw, 3 if db. 683 <1> jne aa20m ; if not ORG 684 <1> %endif 685 <1> 686 <1> aa_org: 687 <1> ; Process ORG pseudo op. 688 00000955 AC <1> lodsb 689 00000956 8B1E[760B] <1> mov bx, word [a_addr + saSegSel]; default segment 690 0000095A E9BBFD <1> jmp aa00a ; go to top, set address if any given 691 <1> 692 <1> ; Data instructions (DB/DW/DD). 693 <1> aa20m: 694 <1> %if _IMMASM 695 <1> testopt [internalflags6], dif6_immasm 696 <1> jnz aa24 697 <1> %endif 698 0000095D BF[B40A] <1> mov di, line_out ; put the bytes here when we get them 699 00000960 93 <1> xchg ax, bx ; mov bx,ax 700 00000961 8A87[3741] <1> mov al, byte [ aadbsiz+bx ] ; move maximum size 701 00000965 A2[3741] <1> mov byte [ aadbsiz ], al 702 00000968 D1E3 <1> shl bx, 1 703 0000096A 8B87[3C41] <1> mov ax, word [ aadbsto+bx ] ; move address of storage routine 704 0000096E A3[3C41] <1> mov word [ aadbsto ],ax 705 00000971 E86B90 <1> call skipwhite 706 00000974 E81390 <1> call iseol? 707 00000977 743E <1> je aa27 ; if end of line 708 <1> 709 <1> aa21: 710 00000979 3C22 <1> cmp al, '"' 711 0000097B 741B <1> je aa22 ; if string 712 0000097D 3C27 <1> cmp al, "'" 713 0000097F 7417 <1> je aa22 ; if string 714 00000981 E8D009 <1> call aageti ; get a numerical value into dx:bx, size into cl 715 00000984 3A0E[3741] <1> cmp cl, byte [ aadbsiz ] 716 00000988 7721 <1> ja aa24 ; if overflow 717 0000098A 93 <1> xchg ax, bx 718 0000098B FF16[3C41] <1> call near [ aadbsto ] ; store the value 719 0000098F 81FF[BC0B] <1> cmp di, line_out_end 720 00000993 7716 <1> ja aa24 ; if output line overflow 721 00000995 93 <1> xchg ax, bx 722 00000996 EB17 <1> jmp short aa26 ; done with this one 723 <1> 724 <1> aa22: 725 00000998 88C4 <1> mov ah, al 726 <1> aa23: 727 0000099A AC <1> lodsb 728 0000099B E8F08F <1> call iseol?.notsemicolon 729 0000099E 740B <1> je aa24 ; if end of line (closing quote missing) --> 730 000009A0 38E0 <1> cmp al, ah 731 000009A2 740A <1> je aa25 ; if end of string 732 000009A4 AA <1> stosb 733 000009A5 81FF[BC0B] <1> cmp di, line_out_end 734 000009A9 76EF <1> jbe aa23 ; if output line not overflowing 735 <1> aa24: 736 000009AB E9AF78 <1> jmp error ; error 737 <1> aa25: 738 000009AE AC <1> lodsb 739 <1> aa26: 740 000009AF E8FF8F <1> call skipcomm0 741 000009B2 E8D58F <1> call iseol? 742 000009B5 75C2 <1> jne aa21 ; if not end of line 743 <1> 744 <1> ; End of line. Copy it to debuggee's memory. 745 <1> aa27: 746 <1> %if _IMMASM 747 <1> push word [ aa_ret ] 748 <1> %else 749 000009B7 B8[2B07] <1> mov ax, aa01 750 000009BA 50 <1> push ax 751 <1> %endif 752 <1> 753 <1> ; INP: di-> behind memory to copy (starts at line_out) 754 <1> ; [a_addr]-> destination 755 <1> ; word [ss:sp] -> in input line behind this prefix 756 <1> ; OUT: memory copied 757 <1> ; a_addr offset updated 758 <1> ; es set to ss 759 <1> ; CHG: (e)si, (e)cx, (e)di 760 <1> aa_copymem: 761 000009BB BE[B40A] <1> mov si, line_out ; ds:si-> data 762 000009BE 89F9 <1> mov cx, di ; -> behind data 763 000009C0 29F1 <1> sub cx, si ; = size of data 764 <1> %if _PM 765 <1> push bx 766 <1> mov bx, word [a_addr + saSegSel] 767 <1> call verifysegm_or_error 768 <1> mov es, bx 769 <1> pop bx 770 <1> %else 771 000009C2 8E06[760B] <1> mov es, word [a_addr + saSegSel] 772 <1> %endif 773 <1> _386_PM_o32 ; mov edi, dword [ a_addr+0 ] 774 000009C6 8B3E[720B] <1> mov di, word [ a_addr+0 ] ; es:(e)di-> destination 775 <1> _386_PM movzx ecx, cx 776 <1> _386_PM movzx esi, si ; fix high words 777 <1> _386_PM_a32 778 000009CA F3A4 <1> rep movsb ; copy it 779 <1> _386_PM_o32 ; mov dword [ a_addr+0 ], edi 780 000009CC 893E[720B] <1> mov word [ a_addr+0 ], di ; save new address 781 000009D0 16 <1> push ss 782 000009D1 07 <1> pop es 783 <1> %if _IMMASM && (!_IMMASM_AUXBUFF || _AUXBUFFSIZE < (128 + 16)) 784 <1> testopt [internalflags6], dif6_immasm 785 <1> jz @F 786 <1> cmp di, immasm_length - 16 787 <1> jbe @F 788 <1> pop si ; discard near return address 789 <1> pop si ; get offset in input line 790 <1> jmp error 791 <1> 792 <1> @@: 793 <1> %endif 794 000009D2 C3 <1> retn 795 <1> 796 <1> ; Routines to store a byte/word/dword, 797 <1> ; into a buffer in our memory. 798 <1> aa28: 799 000009D3 AB <1> stosw ; store a dword value 800 000009D4 92 <1> xchg ax, dx 801 <1> aa29: 802 000009D5 AB <1> stosw ; store a word value 803 000009D6 C3 <1> retn 804 <1> 805 <1> aa30: 806 000009D7 AA <1> stosb ; store a byte value 807 000009D8 C3 <1> retn 808 <1> 809 <1> %if _PM && 0 810 <1> aa_use16: 811 <1> cmp word [ aa_saved_prefix ], byte 0 812 <1> jne aa13a 813 <1> pop si 814 <1> lodsb 815 <1> call chkeol 816 <1> mov dl, 16 817 <1> jmp short aa_bits.parse 818 <1> 819 <1> aa_use32: 820 <1> cmp word [ aa_saved_prefix ], byte 0 821 <1> jne aa13a 822 <1> pop si 823 <1> lodsb 824 <1> call chkeol 825 <1> mov dl, 32 826 <1> jmp short aa_bits.parse 827 <1> 828 <1> aa_useauto: 829 <1> cmp word [ aa_saved_prefix ], byte 0 830 <1> jne aa13a 831 <1> pop si 832 <1> lodsb 833 <1> call chkeol 834 <1> jmp short aa_bits.auto 835 <1> 836 <1> aa_bits: 837 <1> cmp word [ aa_saved_prefix ], byte 0 838 <1> jne aa13a ; if there was a prefix or a segment, error --> 839 <1> pop si ; get position in input line 840 <1> 841 <1> ; Check whether "AUTO" requested. 842 <1> push si 843 <1> lodsw 844 <1> and ax, ~2020h 845 <1> cmp ax, "AU" 846 <1> jne .notauto 847 <1> lodsw 848 <1> and ax, ~2020h 849 <1> cmp ax, "TO" 850 <1> jne .notauto 851 <1> lodsb 852 <1> call iseol? 853 <1> jne .notauto 854 <1> pop ax 855 <1> .auto: 856 <1> xor ax, ax 857 <1> mov al, byte [ bCSAttr+1 ] 858 <1> test al, al ; any saved ? 859 <1> jz aa01_j1 ; no --> 860 <1> mov word [ bCSAttr ], ax ; restore 861 <1> jmp short aa01_j1 862 <1> 863 <1> .notauto: 864 <1> pop si 865 <1> lodsb 866 <1> push si 867 <1> nearcall getbyte 868 <1> call chkeol 869 <1> pop si 870 <1> .parse: 871 <1> mov ax, word [ bCSAttr ] 872 <1> or al, 1 873 <1> cmp dl, 16 874 <1> je .16 875 <1> cmp dl, 16h 876 <1> je .16 877 <1> cmp dl, 32 878 <1> je .32 879 <1> cmp dl, 32h 880 <1> jne aa24 881 <1> .32: 882 <1> _no386 jmp aa24 883 <1> test ah, ah 884 <1> mov ah, al 885 <1> mov al, 40h 886 <1> jmp short .save 887 <1> 888 <1> .16: 889 <1> test ah, ah 890 <1> mov ah, al 891 <1> mov al, 0 892 <1> .save: 893 <1> jnz .saved 894 <1> mov byte [ bCSAttr+1 ], ah 895 <1> .saved: 896 <1> mov byte [ bCSAttr ], al 897 <1> jmp short aa01_j1 898 <1> %endif 899 <1> 900 <1> ; Here we process the AAD and AAM instructions. They are special 901 <1> ; in that they may take a one-byte argument, or none (in which case 902 <1> ; the argument defaults to 0Ah = ten). 903 <1> aa_aax: 904 000009D9 8936[1241] <1> mov word [ mneminfo ], si ; save this address 905 000009DD 5E <1> pop si 906 000009DE AC <1> lodsb 907 000009DF E8A88F <1> call iseol? 908 000009E2 750B <1> jne ab01b ; if not end of line --> 909 000009E4 BE[5441] <1> mov si, aam_args ; fake a 0Ah argument if none given 910 000009E7 EB05 <1> jmp short ab01a 911 <1> 912 <1> 913 <1> ; Process normal instructions. 914 <1> 915 <1> ; First we parse each argument into the following structure, 916 <1> ; stored consecutively at line_out, line_out+OPRND_size, etc. 917 <1> ; 918 <1> ; For arguments of the form xxxx:yyyyyyyy, xxxx is stored in 919 <1> ; OPRND.num2, and yyyyyyyy in OPRND.num. The number of bytes 920 <1> ; in yyyyyyyy is stored in opaddr, 2 is stored in OPRND.numadd, 921 <1> ; and di is stored in xxaddr. 922 <1> struc OPRND 923 00000000 ?? <1> .flags: resb 1 ; 0 flags (ARG_DEREF, etc) 924 00000001 ?? <1> .distflags: resb 1 ; 1 distance flags 925 <1> ; (short = 1, near = 2, far = 4) 926 00000002 ?? <1> .sizearg: resb 1 ; 2 size argument, if any 927 <1> ; (1=byte, 2=word, 4=dword, 5=qword, 6=float, 7=double, 8=tbyte) 928 <1> ; (refer to SIZ_ equs, sizetcnam, and asm_siznum) 929 00000003 ?? <1> .sizedis: resb 1 ; 3 size of ModR/M displacement 930 <1> .reg1: ; 4 ModR/M byte or first register (byte) 931 00000004 ?? <1> .numadd: resb 1 ; 4 number of additional bytes at num2 (up to 4) 932 <1> .num2: ; 5 second number (word) 933 00000005 ?? <1> .reg2: resb 1 ; 5 index register, second register or SIB byte 934 <1> ; reg2 needs to follow reg1 immediately 935 00000006 ?? <1> .index: resb 1 ; 6 index factor 936 00000007 ?? <1> .orednum: resb 1 ; 7 sizes of numbers are ORed here 937 00000008 ???????? <1> .num: resd 1 ; 8 number 938 <1> endstruc 1 939 <1> 940 <1> odfShort: equ 1 941 <1> odfNear: equ 2 942 <1> odfFar: equ 4 943 <1> 944 <1> 945 <1> ab01: 946 000009E9 8936[1241] <1> mov word [ mneminfo ], si ; save this address 947 000009ED 5E <1> pop si ; get position in line 948 <1> ab01a: 949 000009EE AC <1> lodsb 950 <1> ab01b: 951 000009EF BF[B40A] <1> mov di, line_out 952 <1> 953 <1> ; Loop over operands. 954 <1> ab02: 955 000009F2 E8958F <1> call iseol? 956 000009F5 7503 <1> jne ab04 ; if not end of line 957 <1> ab99_j1: 958 000009F7 E93503 <1> jmp ab99 ; to next phase 959 <1> 960 <1> ab04: 961 000009FA 57 <1> push di ; clear out the next storage area 962 000009FB B90600 <1> mov cx, OPRND_size_w 963 000009FE 31C0 <1> xor ax, ax 964 00000A00 F3AB <1> rep stosw 965 00000A02 5F <1> pop di 966 <1> 967 <1> ; Small loop over "BYTE PTR" and segment prefixes. 968 <1> ab05: 969 00000A03 4E <1> dec si 970 00000A04 8B04 <1> mov ax, word [ si ] 971 00000A06 25DFDF <1> and ax, TOUPPER_W 972 <1> .checksize: 973 00000A09 807D0200 <1> cmp byte [ di+OPRND.sizearg ], SIZ_NONE 974 00000A0D 750C <1> jne .notsize ; if already have a size qualifier ("BYTE PTR",...) 975 00000A0F 57 <1> push di 976 00000A10 BF[2242] <1> mov di, sizetcnam 977 00000A13 B90800 <1> mov cx, sizetcnam_size_w 978 00000A16 F2AF <1> repne scasw 979 00000A18 5F <1> pop di 980 00000A19 742D <1> je .size ; if found --> 981 <1> .notsize: 982 <1> .checkdist: 983 00000A1B F64501FF <1> test byte [ di + OPRND.distflags ], -1 984 00000A1F 7541 <1> jnz .notdist 985 00000A21 57 <1> push di 986 00000A22 BF[3242] <1> mov di, distnam 987 00000A25 B90300 <1> mov cx, distnam_size_w 988 00000A28 F2AF <1> repne scasw 989 00000A2A 5F <1> pop di 990 00000A2B 7535 <1> jne .notdist 991 00000A2D 85C9 <1> test cx, cx 992 00000A2F 7509 <1> jnz .dist ; if not "FA" 993 00000A31 8A4402 <1> mov al, byte [ si+2 ] 994 00000A34 24DF <1> and al, TOUPPER 995 00000A36 3C52 <1> cmp al, 'R' 996 00000A38 7528 <1> jne .notdist ; if not "FAR" (could be hexadecimal) --> 997 <1> .dist: 998 <1> ; 0 = far, 1 = near, 2 = short 999 00000A3A 80E902 <1> sub cl, distnam_size_w - 1 1000 <1> ; -2 = far, -1 = near, -0 = short 1001 00000A3D F6D9 <1> neg cl 1002 <1> ; 2 = far, 1 = near, 0 = short 1003 00000A3F B501 <1> mov ch, 1 1004 00000A41 D2E5 <1> shl ch, cl 1005 <1> ; 4 = far, 2 = near, 1 = short 1006 <1> ; 1007 <1> ; This matches odfFar = 4, odfNear = 2, odfShort = 1 1008 00000A43 886D01 <1> mov byte [ di + OPRND.distflags ], ch 1009 00000A46 EB08 <1> jmp .skipptr 1010 <1> 1011 <1> .size: 1012 00000A48 80E908 <1> sub cl, sizetcnam_size_w 1013 00000A4B F6D9 <1> neg cl ; convert to 1..8 1014 00000A4D 884D02 <1> mov byte [ di+OPRND.sizearg ], cl 1015 <1> .skipptr: 1016 00000A50 E8828F <1> call skipalpha ; go to next token 1017 00000A53 8A24 <1> mov ah, byte [si] 1018 00000A55 25DFDF <1> and ax, TOUPPER_W 1019 00000A58 3D5054 <1> cmp ax, "PT" 1020 00000A5B 7503 <1> jne ab05_j1 ; if not "PTR" 1021 00000A5D E8758F <1> call skipalpha ; go to next token (ignore "PTR") 1022 <1> ab05_j1: equ $ 1023 00000A60 EBA1 <1> jmp ab05 1024 <1> 1025 <1> .notdist: 1026 <1> ab07: 1027 00000A62 E80400 <1> call ab08 1028 00000A65 7531 <1> jne ab09 ; not a segment prefix --> 1029 00000A67 EBF7 <1> jmp short ab05_j1 ; if it was a segment prefix --> 1030 <1> 1031 <1> ; Test for and process segment prefix 1032 <1> ; 1033 <1> ; INP: b[aa_seg_pre] 1034 <1> ; si-> string 1035 <1> ; ax = w[si] (uppercased) 1036 <1> ; OUT: NZ if no segment prefix, 1037 <1> ; si unchanged 1038 <1> ; ZR if segment prefix, 1039 <1> ; si-> behind prefix + 1 1040 <1> ; al = character behind prefix 1041 <1> ; CHG: ax, bx, cx 1042 <1> ab08: 1043 00000A69 803E[1141]00 <1> cmp byte [ aa_seg_pre ], 0 1044 00000A6E 7525 <1> jne .ret ; if we already have a segment prefix 1045 00000A70 57 <1> push di 1046 00000A71 BF[F649] <1> mov di, segrgnam 1047 <1> %ifdef MN_GS 1048 00000A74 B90600 <1> mov cx, N_SEGREGS 1049 <1> %else 1050 <1> mov cx, N_SEGREGS - 2 1051 <1> %endif 1052 00000A77 F2AF <1> repne scasw 1053 00000A79 5F <1> pop di 1054 00000A7A 7519 <1> jne .ret ; if not found 1055 00000A7C 56 <1> push si ; save si in case there's no colon 1056 00000A7D AD <1> lodsw ; skip "?s" 1057 00000A7E E85E8F <1> call skipwhite 1058 00000A81 3C3A <1> cmp al, ':' 1059 00000A83 7511 <1> jne .retpopsi ; if not followed by ':' 1060 00000A85 58 <1> pop ax ; discard saved si 1061 00000A86 E8568F <1> call skipwhite ; skip it 1062 00000A89 BB[2D4A] <1> mov bx, prefixlist.after_segment - 1 1063 00000A8C 29CB <1> sub bx, cx 1064 00000A8E 8A07 <1> mov al, byte [ bx ] ; look up the prefix byte 1065 00000A90 A2[1141] <1> mov byte [ aa_seg_pre ], al ; save it away 1066 00000A93 38C0 <1> cmp al, al ; ZR, valid segment prefix 1067 <1> .ret: 1068 00000A95 C3 <1> retn 1069 <1> 1070 <1> .retpopsi: 1071 00000A96 5E <1> pop si 1072 00000A97 C3 <1> retn 1073 <1> 1074 <1> ; Begin parsing main part of argument. 1075 <1> 1076 <1> ; First check registers. 1077 <1> ab09: 1078 00000A98 57 <1> push di ; check for solo registers 1079 00000A99 BF[D649] <1> mov di, rgnam816 1080 00000A9C B91B00 <1> mov cx, N_ALLREGS ; 27 1081 00000A9F E86009 <1> call aagetreg 1082 00000AA2 5F <1> pop di 1083 00000AA3 727F <1> jc ab14 ; if not a register 1084 00000AA5 800D04 <1> or byte [di+OPRND.flags], ARG_JUSTREG 1085 00000AA8 885D04 <1> mov byte [di+OPRND.reg1], bl ; save register number 1086 00000AAB 80FB18 <1> cmp bl, 24 ; 0..23 = AL..DH, AX..DI, EAX..EDI 1087 00000AAE 730B <1> jae ab09a ; if it's not a normal register 1088 00000AB0 93 <1> xchg ax, bx ; mov al, bl 1089 00000AB1 B103 <1> mov cl, 3 1090 00000AB3 D2E8 <1> shr al, cl ; al = size: 0 -> byte, 1 -> word, 2 -> dword 1091 00000AB5 04FE <1> add al, -2 1092 00000AB7 1403 <1> adc al, 3 ; convert to 1, 2, 4 (respectively) 1093 <1> ; matching SIZ_BYTE, SIZ_WORD, SIZ_DWORD 1094 00000AB9 EB5A <1> jmp short ab13 1095 <1> 1096 <1> ab09a: 1097 00000ABB 80350C <1> xor byte [di+OPRND.flags], ARG_JUSTREG|ARG_WEIRDREG 1098 00000ABE B002 <1> mov al, SIZ_WORD ; register size 1099 00000AC0 80FB1E <1> cmp bl, REG_ST ; 24..29 = segment registers 1100 00000AC3 7737 <1> ja ab11 ; if it's MM, CR, DR, or TR --> 1101 00000AC5 740C <1> je ab09b ; if it's ST --> 1102 00000AC7 80FB1C <1> cmp bl, 28 1103 00000ACA 7249 <1> jb ab13 ; if it's a non-386 segment register --> 1104 00000ACC 800E[0F41]20 <1> or byte [asm_mn_flags], AMF_FSGS ; else flag it 1105 00000AD1 EB42 <1> jmp short ab13 1106 <1> 1107 <1> ; ST registers 1108 <1> ab09b: 1109 00000AD3 AC <1> lodsb 1110 <1> ; Check for NASM FPU register notation: ST0..ST7 1111 00000AD4 3C30 <1> cmp al, '0' ; digit following ? 1112 00000AD6 720B <1> jb .par 1113 00000AD8 3C37 <1> cmp al, '7' 1114 00000ADA 7707 <1> ja .par ; no --> 1115 00000ADC 2C30 <1> sub al, '0' 1116 00000ADE 884505 <1> mov byte [di+OPRND.reg2], al ; save number 1117 00000AE1 EB30 <1> jmp short ab12 ; --> 1118 <1> 1119 <1> .par: 1120 <1> ; Check for MASM FPU register notation: ST(0)..ST(7) 1121 00000AE3 3C28 <1> cmp al, '(' ; parenthesis following ? 1122 00000AE5 7403 <1> je .ispar ; yes --> 1123 <1> ; Plain ST (= ST0) 1124 00000AE7 4E <1> dec si 1125 00000AE8 EB29 <1> jmp short ab12 1126 <1> 1127 <1> .ispar: 1128 00000AEA AC <1> lodsb ; get digit 1129 00000AEB 2C30 <1> sub al, '0' 1130 00000AED 3C07 <1> cmp al, 7 1131 00000AEF 7708 <1> ja ab10 ; if not 0..7 1132 00000AF1 884505 <1> mov byte [di+OPRND.reg2], al ; save the number 1133 00000AF4 AC <1> lodsb 1134 00000AF5 3C29 <1> cmp al, ')' ; validate that there's a closing parenthesis 1135 00000AF7 741A <1> je ab12 ; okay --> 1136 <1> ab10: 1137 <1> aa24_j2: 1138 00000AF9 E9AFFE <1> jmp aa24 ; error 1139 <1> 1140 <1> ; other registers: 31..34 (MM, CR, DR, TR) 1141 <1> ab11: 1142 00000AFC AC <1> lodsb 1143 00000AFD 2C30 <1> sub al, '0' ; get digit 1144 00000AFF 3C07 <1> cmp al, 7 1145 00000B01 77F6 <1> ja ab10 ; if error --> 1146 00000B03 884505 <1> mov byte [di+OPRND.reg2], al ; save the number 1147 00000B06 B004 <1> mov al, SIZ_DWORD ; register size 1148 00000B08 80FB1F <1> cmp bl, REG_MM 1149 00000B0B 7508 <1> jne ab13 ; if not MM register 1150 00000B0D 800D04 <1> or byte [di+OPRND.flags], ARG_JUSTREG 1151 00000B10 B005 <1> mov al, SIZ_QWORD 1152 00000B12 A9 <1> db __TEST_IMM16 ; (skip mov) 1153 <1> ab12: 1154 00000B13 B000 <1> mov al, 0 ; size for ST registers 1155 <1> ab13: 1156 00000B15 3A4502 <1> cmp al, byte [di+OPRND.sizearg] ; compare with stated size 1157 00000B18 7407 <1> je ab13a ; if same 1158 00000B1A 864502 <1> xchg al, byte [di+OPRND.sizearg] 1159 00000B1D 84C0 <1> test al, al ; SIZ_NONE ? 1160 00000B1F 75D8 <1> jnz ab10 ; if wrong size given, error --> 1161 <1> ab13a: 1162 00000B21 E9ED01 <1> jmp ab44 ; done with this operand 1163 <1> 1164 <1> ; It's not a register reference. Try for a number. 1165 <1> ab14: 1166 00000B24 AC <1> lodsb 1167 00000B25 E80808 <1> call aaifnum 1168 00000B28 7236 <1> jc ab17 ; it's not a number 1169 <1> ab14a: 1170 00000B2A E82708 <1> call aageti ; get the number 1171 00000B2D 884D07 <1> mov byte [di+OPRND.orednum], cl 1172 00000B30 895D08 <1> mov word [di+OPRND.num+0], bx 1173 00000B33 89550A <1> mov word [di+OPRND.num+2], dx 1174 00000B36 E8A78E <1> call skipwh0 1175 00000B39 80F902 <1> cmp cl, 2 1176 00000B3C 7F22 <1> jg ab17 ; if we can't have a colon here 1177 00000B3E 3C3A <1> cmp al, ':' 1178 00000B40 751E <1> jne ab17 ; if not xxxx:yyyy 1179 00000B42 E89A8E <1> call skipwhite 1180 00000B45 E80C08 <1> call aageti 1181 00000B48 8B4D08 <1> mov cx, word [di+OPRND.num+0] 1182 00000B4B 894D05 <1> mov word [di+OPRND.num2], cx 1183 00000B4E 895D08 <1> mov word [di+OPRND.num+0], bx 1184 00000B51 89550A <1> mov word [di+OPRND.num+2], dx 1185 00000B54 800D20 <1> or byte [di+OPRND.flags], ARG_FARADDR 1186 00000B57 E9B601 <1> jmp ab43 ; done with this operand 1187 <1> 1188 <1> ab15: 1189 00000B5A E9B300 <1> jmp ab30 ; do post-processing 1190 <1> 1191 <1> ; Check for [...]. 1192 <1> ab16: 1193 00000B5D E87F8E <1> call skipwhite 1194 <1> ab17: 1195 00000B60 3C5B <1> cmp al, '[' ; begin loop over sets of [] 1196 00000B62 75F6 <1> jne ab15 ; if not [ 1197 00000B64 800D01 <1> or byte [di+OPRND.flags], ARG_DEREF ; set the flag 1198 <1> 1199 <1> ; Process NASM segment prefix inside brackets if any 1200 00000B67 E8758E <1> call skipwhite 1201 00000B6A 8A24 <1> mov ah, byte [si] 1202 00000B6C 25DFDF <1> and ax, TOUPPER_W 1203 00000B6F 4E <1> dec si ; set up for ab08 1204 00000B70 E8F6FE <1> call ab08 1205 00000B73 7403 <1> jz ab19 ; if segment prefix (called skipwhite) 1206 <1> ab18: 1207 00000B75 E8678E <1> call skipwhite 1208 <1> ab19: 1209 00000B78 3C5D <1> cmp al, ']' ; begin loop within [] 1210 00000B7A 74E1 <1> je ab16 ; if done 1211 <1> 1212 <1> ; Check for a register (within []). 1213 00000B7C 4E <1> dec si 1214 00000B7D 57 <1> push di 1215 00000B7E BF[E649] <1> mov di, rgnam16 1216 00000B81 B90800 <1> mov cx, N_REGS16 1217 00000B84 E87B08 <1> call aagetreg 1218 00000B87 5F <1> pop di 1219 00000B88 7243 <1> jc ab25 ; if not a register 1220 00000B8A 80FB10 <1> cmp bl, 16 1221 00000B8D 7305 <1> jae ab20 ; if 32-bit register 1222 00000B8F 80C308 <1> add bl, 8 ; adjust 0..7 to 8..15 1223 00000B92 EB1D <1> jmp short ab21 1224 <1> ab20: 1225 00000B94 807D0500 <1> cmp byte [di+OPRND.reg2], 0 1226 00000B98 7517 <1> jnz ab21 ; if we already have an index 1227 00000B9A E8428E <1> call skipwhite 1228 00000B9D 4E <1> dec si 1229 00000B9E 3C2A <1> cmp al, '*' 1230 00000BA0 750F <1> jne ab21 ; if not followed by '*' 1231 00000BA2 46 <1> inc si 1232 00000BA3 885D05 <1> mov byte [di+OPRND.reg2], bl ; save index register 1233 00000BA6 E8368E <1> call skipwhite 1234 00000BA9 E8A807 <1> call aageti 1235 00000BAC E83108 <1> call aaconvindex 1236 00000BAF EB51 <1> jmp short ab28 ; ready for next part 1237 <1> 1238 <1> ab21: 1239 00000BB1 807D0400 <1> cmp byte [di+OPRND.reg1], 0 1240 00000BB5 7505 <1> jne ab22 ; if there's already a register 1241 00000BB7 885D04 <1> mov byte [di+OPRND.reg1], bl 1242 00000BBA EB09 <1> jmp ab23 1243 <1> ab22: 1244 00000BBC 807D0500 <1> cmp byte [di+OPRND.reg2], 0 1245 00000BC0 7508 <1> jne ab24 ; if too many registers 1246 00000BC2 885D05 <1> mov byte [di+OPRND.reg2], bl 1247 <1> ab23: 1248 00000BC5 E8178E <1> call skipwhite 1249 00000BC8 EB38 <1> jmp short ab28 ; ready for next part 1250 <1> 1251 <1> ab24: 1252 <1> aa24_j3: 1253 00000BCA E9DEFD <1> jmp aa24 ; error 1254 <1> 1255 <1> ; Try for a number (within []). 1256 <1> ab25: 1257 00000BCD AC <1> lodsb 1258 <1> ab26: 1259 00000BCE E88307 <1> call aageti ; get a number (or flag an error) 1260 00000BD1 E80C8E <1> call skipwh0 1261 00000BD4 3C2A <1> cmp al, '*' 1262 00000BD6 740B <1> je ab27 ; if it's an index factor 1263 00000BD8 084D07 <1> or byte [di+OPRND.orednum], cl 1264 00000BDB 015D08 <1> add word [di+OPRND.num+0], bx 1265 00000BDE 11550A <1> adc word [di+OPRND.num+2], dx 1266 00000BE1 EB1F <1> jmp short ab28 ; next part ... 1267 <1> 1268 <1> ab27: 1269 00000BE3 E8FA07 <1> call aaconvindex 1270 00000BE6 E8F68D <1> call skipwhite 1271 00000BE9 4E <1> dec si 1272 00000BEA 57 <1> push di 1273 00000BEB BF[E649] <1> mov di, rgnam16 1274 00000BEE 31C9 <1> xor cx, cx 1275 00000BF0 E80F08 <1> call aagetreg 1276 00000BF3 5F <1> pop di 1277 00000BF4 72D4 <1> jc ab24 ; if error 1278 00000BF6 807D0500 <1> cmp byte [di+OPRND.reg2], 0 1279 00000BFA 75CE <1> jne ab24 ; if there is already a register 1280 00000BFC 885D05 <1> mov byte [di+OPRND.reg2], bl 1281 00000BFF E8DD8D <1> call skipwhite 1282 <1> 1283 <1> ; Ready for the next term within []. 1284 <1> ab28: 1285 00000C02 3C2D <1> cmp al, '-' 1286 00000C04 74C8 <1> je ab26 ; if a (negative) number is next 1287 00000C06 3C2B <1> cmp al, '+' 1288 00000C08 7503 <1> jne ab29 ; if no next term (presumably) 1289 00000C0A E968FF <1> jmp ab18 1290 <1> ab29: 1291 00000C0D E968FF <1> jmp ab19 ; back for more 1292 <1> 1293 <1> ; Post-processing for complicated arguments. 1294 <1> ab30: 1295 00000C10 837D0400 <1> cmp word [di+OPRND.reg1], 0 1296 00000C14 752C <1> jne ab32 ; if registers were given ( ==> create MOD R/M) 1297 00000C16 807D0700 <1> cmp byte [di+OPRND.orednum], 0 1298 00000C1A 7424 <1> je ab31 ; if nothing was given ( ==> error) 1299 00000C1C 803D00 <1> cmp byte [di+OPRND.flags], 0 1300 00000C1F 7506 <1> jne ab30b ; if it was not immediate 1301 00000C21 800D10 <1> or byte [di+OPRND.flags], ARG_IMMED 1302 <1> ab30a: 1303 00000C24 E9E900 <1> jmp ab43 ; done with this argument 1304 <1> ab30b: 1305 00000C27 800E[0F41]80 <1> or byte [asm_mn_flags], AMF_ADDR 1306 00000C2C B002 <1> mov al, 2 ; size of the displacement 1307 00000C2E F6450704 <1> test byte [di+OPRND.orednum], 4 1308 00000C32 7407 <1> jz ab30c ; if no 32-bit displacement --> 1309 00000C34 40 <1> inc ax 1310 00000C35 40 <1> inc ax ; al = 4 1311 00000C36 800E[0F41]04 <1> or byte [asm_mn_flags], AMF_A32 ; 32-bit addressing 1312 <1> ab30c: 1313 00000C3B 884503 <1> mov byte [di+OPRND.sizedis], al ; save displacement size 1314 00000C3E EBE4 <1> jmp short ab30a ; done with this argument 1315 <1> ab31: 1316 00000C40 EB88 <1> jmp short aa24_j3 ; flag an error 1317 <1> 1318 <1> ; Create the MOD R/M byte. 1319 <1> ; (For disp-only or register, this will be done later as needed.) 1320 <1> ab32: 1321 00000C42 800D02 <1> or byte [di+OPRND.flags], ARG_MODRM 1322 00000C45 8A4504 <1> mov al, byte [di+OPRND.reg1] 1323 00000C48 0A4505 <1> or al, byte [di+OPRND.reg2] 1324 00000C4B A810 <1> test al, 10h 1325 00000C4D 7525 <1> jnz ab34 ; if 32-bit addressing 1326 00000C4F F6450704 <1> test byte [di+OPRND.orednum], 4 1327 00000C53 751F <1> jnz ab34 ; if 32-bit addressing 1328 00000C55 800E[0F41]80 <1> or byte [asm_mn_flags], AMF_ADDR 1329 00000C5A 8B4504 <1> mov ax, word [di+OPRND.reg1] ; get reg1 and reg2 1330 00000C5D 38E0 <1> cmp al, ah 1331 00000C5F 7702 <1> ja ab33 ; make sure al >= ah 1332 00000C61 86C4 <1> xchg al, ah 1333 <1> ab33: 1334 00000C63 57 <1> push di 1335 00000C64 BF[4441] <1> mov di, modrmtab 1336 00000C67 B90800 <1> mov cx, 8 1337 00000C6A F2AF <1> repne scasw 1338 00000C6C 5F <1> pop di 1339 00000C6D 75D1 <1> jne ab31 ; if not among the possibilities (error) 1340 00000C6F BB0602 <1> mov bx, 206h ; max disp = 2 bytes; 6 ==> (non-existent) [bp] 1341 00000C72 EB6A <1> jmp short ab39 ; done (just about) 1342 <1> 1343 <1> ; 32-bit addressing 1344 <1> ab34: 1345 00000C74 800E[0F41]84 <1> or byte [asm_mn_flags], AMF_A32 | AMF_ADDR ; 32-bit addressing 1346 00000C79 8A4504 <1> mov al, byte [di+OPRND.reg1] 1347 00000C7C 0A4506 <1> or al, byte [di+OPRND.index] 1348 00000C7F 7508 <1> jnz ab35 ; if we can't optimize [Exx*1] to [Exx] 1349 00000C81 8B4504 <1> mov ax, word [di+OPRND.reg1] 1350 00000C84 86C4 <1> xchg al, ah 1351 00000C86 894504 <1> mov word [di+OPRND.reg1], ax 1352 <1> ab35: 1353 00000C89 BB0504 <1> mov bx, 405h ; max disp = 4 bytes; 5 ==> (non-existent) [bp] 1354 00000C8C 807D0500 <1> cmp byte [di+OPRND.reg2], 0 1355 00000C90 7510 <1> jne ab36 ; if there's a SIB 1356 00000C92 8A4D04 <1> mov cl, byte [di+OPRND.reg1] 1357 00000C95 80F910 <1> cmp cl, 16 1358 00000C98 7CA6 <1> jl ab31 ; if wrong register type 1359 00000C9A 80E107 <1> and cl, 7 1360 00000C9D 80F904 <1> cmp cl, 4 ; check for ESP 1361 00000CA0 753C <1> jne ab39 ; if not, then we're done (otherwise do SIB) 1362 <1> 1363 <1> ab36: 1364 00000CA2 800E[0F41]08 <1> or byte [asm_mn_flags], AMF_SIB ; form SIB 1365 00000CA7 8A6D06 <1> mov ch, byte [di+OPRND.index] ; get SS bits 1366 00000CAA B103 <1> mov cl, 3 1367 00000CAC D2E5 <1> shl ch, cl ; shift them halfway into place 1368 00000CAE 8A4505 <1> mov al, byte [di+OPRND.reg2] ; index register 1369 00000CB1 3C14 <1> cmp al, 20 1370 00000CB3 748B <1> je ab31 ; if ESP ( ==> error) 1371 00000CB5 3C00 <1> cmp al, 0 1372 00000CB7 7502 <1> jne ab37 ; if not zero 1373 00000CB9 B014 <1> mov al, 20 ; set it for index byte 4 1374 <1> ab37: 1375 00000CBB 3C10 <1> cmp al, 16 1376 00000CBD 7C81 <1> jl ab31 ; if wrong register type 1377 00000CBF 2407 <1> and al, 7 1378 00000CC1 08C5 <1> or ch, al ; put it into the SIB 1379 00000CC3 D2E5 <1> shl ch, cl ; shift it into place 1380 00000CC5 41 <1> inc cx ; R/M for SIB = 4 1381 00000CC6 8A4504 <1> mov al, byte [di+OPRND.reg1] ; now get the low 3 bits 1382 00000CC9 84C0 <1> test al, al 1383 00000CCB 7505 <1> jnz ab38 ; if there was a first register 1384 00000CCD 80CD05 <1> or ch, 5 1385 00000CD0 EB38 <1> jmp short ab42 ; MOD = 0, disp is 4 bytes 1386 <1> 1387 <1> ab38: 1388 00000CD2 3C10 <1> cmp al, 16 1389 00000CD4 7C56 <1> jl ab45 ; if wrong register type 1390 00000CD6 2407 <1> and al, 7 ; first register 1391 00000CD8 08C5 <1> or ch, al ; put it into the SIB 1392 00000CDA 3C05 <1> cmp al, 5 1393 00000CDC 7406 <1> je ab40 ; if it's EBP, then we don't recognize disp=0 1394 <1> ; otherwise bl will be set to 0 1395 <1> 1396 <1> ; Find the size of the displacement. 1397 <1> ab39: 1398 00000CDE 38D9 <1> cmp cl, bl 1399 00000CE0 7402 <1> je ab40 ; if it's [(E)BP], then disp=0 is still 1 byte 1400 00000CE2 B300 <1> mov bl, 0 ; allow 0-byte disp 1401 <1> 1402 <1> ab40: 1403 00000CE4 51 <1> push cx 1404 00000CE5 8A4508 <1> mov al, byte [di+OPRND.num+0] 1405 00000CE8 B107 <1> mov cl, 7 1406 00000CEA D2F8 <1> sar al, cl 1407 00000CEC 59 <1> pop cx 1408 00000CED 8A6509 <1> mov ah, byte [di+OPRND.num+1] 1409 00000CF0 38E0 <1> cmp al, ah 1410 00000CF2 7513 <1> jne ab41 ; if it's bigger than 1 byte 1411 00000CF4 3B450A <1> cmp ax, word [di+OPRND.num+2] 1412 00000CF7 750E <1> jne ab41 ; ditto 1413 00000CF9 B700 <1> mov bh, 0 ; no displacement 1414 00000CFB 0A5D08 <1> or bl, byte [di+OPRND.num+0] 1415 00000CFE 740A <1> jz ab42 ; if disp = 0 and it's not (E)BP 1416 00000D00 FEC7 <1> inc bh ; disp = 1 byte 1417 00000D02 80C940 <1> or cl, 40h ; set MOD = 1 1418 00000D05 EB03 <1> jmp short ab42 ; done 1419 <1> 1420 <1> ab41: 1421 00000D07 80C980 <1> or cl, 80h ; set MOD = 2 1422 <1> 1423 <1> ab42: 1424 00000D0A 887D03 <1> mov byte [di+OPRND.sizedis], bh ; store displacement size 1425 00000D0D 894D04 <1> mov word [di+OPRND.reg1], cx ; store MOD R/M and maybe SIB 1426 <1> 1427 <1> ; Finish up with the operand. 1428 <1> ab43: 1429 00000D10 4E <1> dec si 1430 <1> ab44: 1431 00000D11 E8CB8C <1> call skipwhite 1432 00000D14 83C70C <1> add di, byte OPRND_size 1433 00000D17 E8708C <1> call iseol? 1434 00000D1A 7413 <1> je ab99 ; if end of line --> 1435 00000D1C 3C2C <1> cmp al, ',' 1436 00000D1E 750C <1> jne ab45 ; if not comma ( ==> error) 1437 00000D20 81FF[D80A] <1> cmp di, line_out+3*OPRND_size 1438 00000D24 7306 <1> jae ab45 ; if too many operands 1439 00000D26 E8B68C <1> call skipwhite 1440 00000D29 E9C6FC <1> jmp ab02 1441 <1> 1442 <1> ab45: 1443 00000D2C E97CFC <1> jmp aa24 ; error jump 1444 <1> 1445 <1> ab99: 1446 00000D2F C605FF <1> mov byte [di+OPRND.flags], -1 ; end of parsing phase 1447 <1> 1448 <1> %if 0 1449 <1> For the next phase, we match the parsed arguments with the set of 1450 <1> permissible argument lists for the opcode. The first match wins. 1451 <1> Therefore the argument lists should be ordered such that the 1452 <1> cheaper ones come first. 1453 <1> 1454 <1> There is a tricky issue regarding sizes of memory references. 1455 <1> Here are the rules: 1456 <1> 1. If a memory reference is given with a size, then it's OK. 1457 <1> 2. If a memory reference is given without a size, but some 1458 <1> other argument is a register (which implies a size), 1459 <1> then the memory reference inherits that size. 1460 <1> Exceptions: OP_CL does not imply a size (it's the shift counter) 1461 <1> OP_SHOSIZ 1462 <1> 3. If 1 and 2 do not apply, but this is the last possible argument 1463 <1> list, and if the argument list requires a particular size, then 1464 <1> that size is used. 1465 <1> 4. In all other cases, flag an error. 1466 <1> %endif 1467 <1> 1468 <1> ac01: 1469 00000D32 31C0 <1> xor ax, ax 1470 00000D34 BF[1441] <1> mov di, rmaddr 1471 00000D37 B90700 <1> mov cx, 7 1472 00000D3A F3AB <1> rep stosw ; clear variant-specific variables 1473 <1> ; cx = 0 1474 00000D3C 8B36[1241] <1> mov si, word [mneminfo] 1475 <1> ; -> the next argument variant 1476 <1> %if _ASM_ESCAPE_USED 1477 00000D40 31DB <1> xor bx, bx ; cx:bx = counter of ASM_ESCAPEs 1478 <1> %endif 1479 <1> ; Parse the variant's assembler table entry 1480 <1> ; si-> next argument variant 1481 <1> ; variant-specific variables cleared 1482 <1> ; cx:bx = 0 1483 <1> 1484 <1> ac02: 1485 00000D42 AC <1> lodsb 1486 <1> %if _ASM_ESCAPE_USED 1487 00000D43 3CF4 <1> cmp al, ASM_ESCAPE 1488 00000D45 750B <1> jne .notescape 1489 00000D47 81C300F4 <1> add bx, ASM_ESCAPE << 8 1490 00000D4B 83D100 <1> adc cx, byte 0 1491 00000D4E 7219 <1> jc ac04 ; if this branches, too many escapes --> 1492 00000D50 EBF0 <1> jmp short ac02 1493 <1> .notescape: 1494 <1> %endif 1495 00000D52 2CF5 <1> sub al, ASM_MACH1 1496 00000D54 7216 <1> jb ac05 ; if no more special bytes 1497 00000D56 3C06 <1> cmp al, ASM_LOCKABLE-ASM_MACH1 1498 00000D58 7408 <1> je ac03 ; if ASM_LOCKABLE 1499 00000D5A 770D <1> ja ac04 ; if ASM_END or another (--> error) 1500 00000D5C 40 <1> inc ax 1501 00000D5D A2[1C41] <1> mov byte [dismach], al ; save machine type 1502 00000D60 EBE0 <1> jmp short ac02 ; back for next byte 1503 <1> ac03: 1504 00000D62 800E[2041]01 <1> or byte [varflags], VAR_LOCKABLE 1505 00000D67 EBD9 <1> jmp short ac02 ; back for next byte 1506 <1> 1507 <1> ac04: 1508 00000D69 E9E2FB <1> jmp aa13a ; error 1509 <1> 1510 <1> ; Get and unpack the word. 1511 <1> ac05: 1512 00000D6C 4E <1> dec si 1513 00000D6D AD <1> lodsw 1514 00000D6E 86C4 <1> xchg al, ah ; put into little-endian order 1515 00000D70 31D2 <1> xor dx, dx 1516 <1> %if _ASM_ESCAPE_USED 1517 00000D72 01D8 <1> add ax, bx ; add in the ASM_ESCAPE adjustment 1518 00000D74 11CA <1> adc dx, cx ; account for overflow (cx = 0) 1519 <1> %endif 1520 00000D76 BB8100 <1> mov bx, ASMMOD 1521 00000D79 F7F3 <1> div bx ; ax = a_opcode; dx = index into opindex 1522 00000D7B A3[2441] <1> mov word [a_opcode], ax ; save ax 1523 00000D7E A3[2641] <1> mov word [a_opcode2], ax ; save the second copy 1524 00000D81 3DDF00 <1> cmp ax, 0DFh ; a coprocessor instruction ? 1525 00000D84 7717 <1> ja ac05a 1526 00000D86 3CD8 <1> cmp al, 0D8h 1527 00000D88 7213 <1> jb ac05a ; if no coprocessor instruction --> 1528 00000D8A 800E[1D41]01 <1> or byte [dmflags], DM_COPR ; flag it as an x87 instruction 1529 00000D8F 88C4 <1> mov ah, al ; ah = low order byte of opcode 1530 00000D91 AC <1> lodsb ; get extra byte 1531 00000D92 A2[1641] <1> mov byte [regmem], al ; save it in regmem 1532 00000D95 A3[2641] <1> mov word [a_opcode2], ax ; save this for obsolete-instruction detection 1533 00000D98 800E[2041]02 <1> or byte [varflags], VAR_MODRM ; flag its presence 1534 <1> ac05a: 1535 00000D9D 8936[1241] <1> mov [mneminfo], si ; save si back again 1536 00000DA1 89D6 <1> mov si, dx 1537 <1> %if ASMMOD > 0FFh 1538 <1> xor bx, bx 1539 <1> %endif 1540 00000DA3 8A9C[3416] <1> mov bl, byte [opindex+si] 1541 00000DA7 01D2 <1> add dx, dx 1542 00000DA9 4A <1> dec dx 1543 00000DAA 01D3 <1> add bx, dx ; adjust to get correct index into oplists 1544 00000DAC 8DB7[0000] <1> lea si, [oplists+bx] ; si = the address of our operand list 1545 00000DB0 BF[B40A] <1> mov di, line_out 1546 <1> 1547 <1> ; Begin loop over operands. 1548 <1> ; [a_opcode] etc set for opcode 1549 <1> ; si-> operand list 1550 <1> ; di-> next parsed operand 1551 <1> ; [mneminfo]-> mnemonic's next variant in assembler table 1552 <1> ac06: 1553 00000DB3 AC <1> lodsb ; get next operand byte 1554 00000DB4 3C00 <1> cmp al, OP_END 1555 00000DB6 745F <1> je ac10 ; if end of list 1556 <1> 1557 <1> ; The OP_STACK_* operand types don't really need another 1558 <1> ; operand structure. So handle them before checking for 1559 <1> ; a valid operand structure. This is required for the 1560 <1> ; cases with no regular operands following the stack hint. 1561 <1> ; Because they aren't needed by the assembler anyway we 1562 <1> ; just loop back to ac06 to load the next operand type. 1563 00000DB8 3C20 <1> cmp al, OP_STACK_PUSH 1564 00000DBA 74F7 <1> je ac06 1565 00000DBC 3C21 <1> cmp al, OP_STACK_POP 1566 00000DBE 74F3 <1> je ac06 1567 00000DC0 3C22 <1> cmp al, OP_STACK_SPECIAL 1568 00000DC2 74EF <1> je ac06 1569 <1> 1570 <1> ; Actual operand, or one of these always followed by one 1571 <1> ; or more actual operands (OP_M_*, OP_SHORT|NEAR|FAR), 1572 <1> ; so check for another valid operand structure. 1573 00000DC4 803DFF <1> cmp byte [di+OPRND.flags], -1 1574 00000DC7 744B <1> je ac01_j1 ; if too few operands were given 1575 00000DC9 3C40 <1> cmp al, OP_SIZE 1576 00000DCB 720E <1> jb ac07 ; if no size needed 1577 <1> %if 1 1578 00000DCD B400 <1> mov ah, 0 1579 00000DCF B104 <1> mov cl, 4 1580 00000DD1 D3E0 <1> shl ax, cl ; move bits 4..7 (size) to ah (OP_1632=5, OP_8=6, OP_16=7, ...) 1581 00000DD3 D2E8 <1> shr al, cl ; move bits 0..3 back 1582 <1> %else 1583 <1> aam 16 ; ax=00XY -> ax=0X0Y 1584 <1> %endif 1585 00000DD5 8826[2241] <1> mov byte [a_reqsize], ah ; save it away 1586 00000DD9 EB02 <1> jmp short ac08 1587 <1> 1588 <1> ac07: ; al = OP_M64.. 1589 <1> ; have al = 1..x 1590 <1> ; want al = 16..y 1591 00000DDB 040F <1> add al, 16-1 ; adjust for the 16 start entries in asmjmp 1592 <1> 1593 <1> ac08: 1594 00000DDD 98 <1> cbw ; al = 0..7 or 16..y, 1595 <1> ; al < 128, thus ax = al 1596 00000DDE 93 <1> xchg ax, bx ; now bx contains the index 1597 00000DDF 8A87[5641] <1> mov al, byte [bittab+bx] 1598 00000DE3 D1E3 <1> shl bx, 1 ; = offset into word array 1599 00000DE5 8B8F[9641] <1> mov cx, word [asmjmp + bx] 1600 <1> ; subroutine address 1601 00000DE9 D1EB <1> shr bx, 1 ; return to index 1602 00000DEB 83FB3F <1> cmp bx, OP_AMOUNT_TABLE 1603 00000DEE 731E <1> jae ac09_internal_error ; internal error 1604 00000DF0 8405 <1> test al, byte [di+OPRND.flags] 1605 00000DF2 7420 <1> jz ac09 ; if no required bits are present 1606 00000DF4 B400 <1> mov ah, 0 ; (insure ah = 0 for ao90) 1607 00000DF6 FFD1 <1> call cx ; call its specific routine 1608 00000DF8 A0[2141] <1> mov al, [alloweddist] 1609 00000DFB F6D0 <1> not al 1610 00000DFD 844501 <1> test byte [di + OPRND.distflags], al 1611 00000E00 7512 <1> jnz ac09 ; if invalid distance specified --> 1612 00000E02 817CFF5355 <1> cmp word [si-1], (OP_1632|OP_R)<<8|(OP_1632|OP_R_MOD) 1613 00000E07 7403 <1> je ac06_j1 ; (hack) for IMUL instruction 1614 00000E09 83C70C <1> add di, byte OPRND_size 1615 <1> ; -> next operand 1616 <1> ac06_j1: 1617 00000E0C EBA5 <1> jmp ac06 ; back for more 1618 <1> 1619 <1> ac09_internal_error: 1620 00000E0E BA[6A2A] <1> mov dx, msg.aa_internal_error 1621 00000E11 E89F91 <1> call putsz 1622 <1> ac09: 1623 <1> ac01_j1: 1624 00000E14 E91BFF <1> jmp ac01 ; back to next possibility 1625 <1> 1626 <1> ; End of operand list. 1627 <1> ac10: 1628 00000E17 803DFF <1> cmp byte [di+OPRND.flags], -1 1629 00000E1A 75F8 <1> jne ac09 ; if too many operands were given 1630 <1> 1631 00000E1C F606[2041]02 <1> test byte [varflags], VAR_MODRM 1632 00000E21 740C <1> jz @F ; if no ModR/M --> 1633 00000E23 803E[1641]C0 <1> cmp byte [regmem], 0C0h 1634 00000E28 7205 <1> jb @F ; if not both high bits set --> 1635 <1> ; both bits are set, ModR/M is for a register operand 1636 00000E2A 8026[2041]7F <1> clropt [varflags], VAR_M_ALWAYS_16 1637 <1> ; do not special case mov with segreg and a GPR 1638 <1> @@: 1639 <1> 1640 <1> ; Final check on sizes 1641 00000E2F A0[2041] <1> mov al, byte [varflags] 1642 00000E32 A810 <1> test al, VAR_SIZ_NEED 1643 00000E34 7414 <1> jz ac12 ; if no size needed 1644 00000E36 A804 <1> test al, VAR_SIZ_GIVN 1645 00000E38 7510 <1> jnz ac12 ; if a size was given 1646 00000E3A A808 <1> test al, VAR_SIZ_FORCD 1647 00000E3C 74D6 <1> jz ac09 ; if the size was not forced ( ==> reject) 1648 00000E3E 8B36[1241] <1> mov si, word [mneminfo] 1649 00000E42 803CFF <1> cmp byte [si], ASM_END 1650 00000E45 7403 <1> je ac12 ; if this is the last one 1651 <1> ac11: 1652 00000E47 E904FB <1> jmp aa13a ; it was not, error --> (not a retry) 1653 <1> 1654 <1> ac12: 1655 00000E4A A880 <1> test al, VAR_M_ALWAYS_16 1656 00000E4C 740E <1> jz @F 1657 00000E4E A0[1F41] <1> mov al, byte [opsize] 1658 00000E51 3C00 <1> cmp al, SIZ_NONE 1659 00000E53 7407 <1> je @F 1660 00000E55 3C02 <1> cmp al, SIZ_WORD 1661 00000E57 7403 <1> je @F 1662 00000E59 E9F2FA <1> jmp aa13a 1663 <1> @@: 1664 <1> 1665 <1> ; Check other prefixes. 1666 00000E5C A0[1041] <1> mov al, byte [aa_saved_prefix] 1667 00000E5F 3C00 <1> cmp al, 0 1668 00000E61 7421 <1> je ac14 ; if no saved prefixes to check 1669 00000E63 3CF0 <1> cmp al, 0F0h 1670 00000E65 7509 <1> jne ac13 ; if it's a rep prefix 1671 00000E67 F606[2041]01 <1> test byte [varflags], VAR_LOCKABLE 1672 00000E6C 74D9 <1> jz ac11 ; if this variant is not lockable, error --> 1673 00000E6E EB14 <1> jmp short ac14 ; done 1674 <1> 1675 <1> ac13: 1676 00000E70 A1[2441] <1> mov ax, word [a_opcode] ; check if opcode is OK for rep{,z,nz} 1677 00000E73 24FE <1> and al, ~1 ; clear low order bit (MOVSW -> MOVSB) 1678 <1> 1679 00000E75 3DFF00 <1> cmp ax, 0FFh 1680 00000E78 77CD <1> ja ac11 ; if it's not a 1-byte instruction, error --> 1681 00000E7A BF[AD11] <1> mov di, replist ; list of instructions that go with rep 1682 00000E7D B90700 <1> mov cx, REP_LEN ; scan all (REP + REPxx) 1683 00000E80 F2AE <1> repne scasb 1684 00000E82 75C3 <1> jne ac11 ; if it's not among them, error --> 1685 <1> 1686 <1> ac14: 1687 00000E84 F606[0F41]10 <1> test byte [asm_mn_flags], AMF_MSEG 1688 00000E89 7412 <1> jz ac15 ; if no segment prefix before mnemonic --> 1689 00000E8B A1[2441] <1> mov ax, word [a_opcode] ; check if opcode allows this 1690 00000E8E 3DFF00 <1> cmp ax, 0FFh 1691 00000E91 77B4 <1> ja ac11 ; if it's not a 1-byte instruction, error --> 1692 00000E93 BF[A411] <1> mov di, segprfxtab 1693 00000E96 B90900 <1> mov cx, SEGP_LEN 1694 00000E99 F2AE <1> repne scasb 1695 00000E9B 75AA <1> jne ac11 ; if it's not in the list, error --> 1696 <1> 1697 <1> ac15: 1698 00000E9D 8B1E[1841] <1> mov bx, word [immaddr] 1699 00000EA1 09DB <1> or bx, bx 1700 00000EA3 740C <1> jz ac16 ; if no immediate data 1701 00000EA5 A0[1F41] <1> mov al, byte [opsize] 1702 00000EA8 F6D8 <1> neg al 1703 00000EAA D0E0 <1> shl al, 1 1704 00000EAC 844707 <1> test al, byte [bx+7] 1705 00000EAF 7596 <1> jnz ac11 ; if the immediate data was too big, error --> 1706 <1> 1707 <1> ; Put the instruction together 1708 <1> ; (maybe is this why they call it an assembler) 1709 <1> 1710 <1> ; First, the prefixes (including preceding WAIT instruction) 1711 <1> ac16: 1712 <1> _386_PM_o32 ; mov edi, dword [a_addr] 1713 00000EB1 8B3E[720B] <1> mov di, word [a_addr] 1714 <1> %if _PM 1715 <1> mov bx, word [a_addr + saSegSel] 1716 <1> call verifysegm_or_error 1717 <1> mov es, bx 1718 <1> %else 1719 00000EB5 8E06[760B] <1> mov es, word [a_addr + saSegSel] 1720 <1> %endif 1721 00000EB9 F606[0F41]02 <1> test byte [asm_mn_flags], AMF_WAIT 1722 00000EBE 7403 <1> jz .nowaitprefix ; if no wait instruction beforehand 1723 00000EC0 B09B <1> mov al, 9Bh 1724 <1> _386_PM_a32 1725 00000EC2 AA <1> stosb 1726 <1> .nowaitprefix: 1727 <1> 1728 00000EC3 A0[1041] <1> mov al,[aa_saved_prefix] 1729 00000EC6 84C0 <1> test al, al 1730 00000EC8 7401 <1> jz .noprefix ; if no LOCK or REP prefix 1731 <1> _386_PM_a32 1732 00000ECA AA <1> stosb 1733 <1> .noprefix: 1734 <1> 1735 <1> ;--- a 67h address size prefix is needed 1736 <1> ;--- 1. for CS16: if AMF_ADDR=1 and AMF_A32=1 1737 <1> ;--- 2. for CS32: if AMF_ADDR=1 and AMF_A32=0 1738 <1> 1739 00000ECB A0[0F41] <1> mov al, byte [asm_mn_flags] 1740 00000ECE A880 <1> test al, AMF_ADDR 1741 00000ED0 7407 <1> jz .noaddressprefix 1742 00000ED2 2404 <1> and al, AMF_A32 1743 <1> %if _PM 1744 <1> or al, byte [bCSAttr] 1745 <1> jz .noaddressprefix ; if 16-bit CS and 16-bit addressing --> 1746 <1> cmp al, AMF_A32| 40h 1747 <1> jz .noaddressprefix ; if 32-bit CS and 32-bit addressing --> 1748 <1> %else 1749 00000ED4 7403 <1> jz .noaddressprefix ; 16-bit addressing in RM --> 1750 <1> %endif 1751 <1> ; Otherwise, the CS and addressing bitness mismatch. Write a prefix. 1752 00000ED6 B067 <1> mov al, 67h 1753 <1> _386_PM_a32 1754 00000ED8 AA <1> stosb ; store address size prefix 1755 <1> .noaddressprefix: 1756 <1> 1757 <1> ;--- a 66h data size prefix is needed 1758 <1> ;--- for CS16: if VAR_D32 == 1 or AMF_D32 == 1 1759 <1> ;--- for CS32: if VAR_D16 == 1 or AMF_D16 == 1 1760 <1> 1761 00000ED9 F606[2041]80 <1> testopt [varflags], VAR_M_ALWAYS_16 1762 00000EDE 750F <1> jnz .nodataprefix ; mov segreg never emits an osize --> 1763 00000EE0 8A26[0F41] <1> mov ah, byte [asm_mn_flags] 1764 00000EE4 A0[2041] <1> mov al, byte [varflags] 1765 <1> %if _PM 1766 <1> test byte [bCSAttr], 40h 1767 <1> jz .dataprefix_rm 1768 <1> test ax, VAR_D16|(AMF_D16<<8) 1769 <1> jnz .dataprefix 1770 <1> jmp short .nodataprefix 1771 <1> .dataprefix_rm: 1772 <1> %endif 1773 00000EE7 A94001 <1> test ax, VAR_D32|(AMF_D32<<8) 1774 00000EEA 7403 <1> jz .nodataprefix 1775 <1> .dataprefix: 1776 00000EEC B066 <1> mov al, 66h 1777 <1> _386_PM_a32 1778 00000EEE AA <1> stosb ; store operand size prefix 1779 <1> .nodataprefix: 1780 <1> 1781 00000EEF A0[1141] <1> mov al, [aa_seg_pre] 1782 00000EF2 3C00 <1> cmp al, 0 1783 00000EF4 740A <1> je ac22 ; if no segment prefix 1784 <1> _386_PM_a32 1785 00000EF6 AA <1> stosb 1786 00000EF7 3C64 <1> cmp al, 64h 1787 00000EF9 7205 <1> jb ac22 ; if not 64 or 65 (FS or GS) --> 1788 00000EFB 800E[0F41]20 <1> or byte [asm_mn_flags], AMF_FSGS ; flag it 1789 <1> ac22: 1790 <1> 1791 <1> ; Now emit the instruction itself. 1792 00000F00 A1[2441] <1> mov ax, word [a_opcode] 1793 00000F03 89C3 <1> mov bx, ax 1794 00000F05 81EB4002 <1> sub bx, 240h 1795 00000F09 7317 <1> jae ac23 ; if 576.. (AGRP) --> 1796 00000F0B 3D0002 <1> cmp ax, 200h 1797 00000F0E 7229 <1> jb ac24 ; if regular instruction --> 1798 00000F10 800E[1D41]01 <1> or byte [dmflags], DM_COPR ; flag it as an x87 instruction 1799 00000F15 2438 <1> and al, 38h ; get register part 1800 00000F17 0806[1641] <1> or byte [regmem], al 1801 00000F1B 93 <1> xchg ax, bx ; mov ax, bx (the low bits of bx are good) 1802 00000F1C 2407 <1> and al, 7 1803 00000F1E 0CD8 <1> or al, 0D8h 1804 00000F20 EB20 <1> jmp short ac25 ; on to decoding the instruction 1805 <1> 1806 <1> ac23: 1807 00000F22 800E[2041]02 <1> or byte [varflags], VAR_MODRM ; flag presence of ModR/M byte 1808 00000F27 B103 <1> mov cl, 3 ; one instruction of a group 1809 00000F29 D3EB <1> shr bx, cl ; separate AGRP()'s num part 1810 00000F2B 2407 <1> and al, 7 ; separate ModR/M register value 1811 00000F2D D2E0 <1> shl al, cl 1812 00000F2F 0806[1641] <1> or byte [regmem], al ; fix ModR/M byte 1813 00000F33 D1E3 <1> shl bx, 1 1814 00000F35 8B87[7C01] <1> mov ax, word [agroups+bx] ; get actual opcode 1815 <1> 1816 <1> ac24: 1817 00000F39 84E4 <1> test ah, ah 1818 00000F3B 7405 <1> jz ac25 ; if no 0Fh first --> 1819 00000F3D 50 <1> push ax ; store a 0Fh 1820 00000F3E B00F <1> mov al, 0Fh 1821 <1> _386_PM_a32 1822 00000F40 AA <1> stosb 1823 00000F41 58 <1> pop ax 1824 <1> ac25: 1825 00000F42 0A06[1E41] <1> or al, byte [opcode_or] ; put additional bits into the opcode 1826 <1> _386_PM_a32 1827 00000F46 AA <1> stosb ; store the op code itself 1828 <1> 1829 <1> ; Now store the extra stuff that comes with the instruction. 1830 00000F47 A1[1641] <1> mov ax, word [regmem] 1831 00000F4A F606[2041]02 <1> test byte [varflags], VAR_MODRM 1832 00000F4F 740B <1> jz ac26 ; if no ModR/M --> 1833 <1> _386_PM_a32 1834 00000F51 AA <1> stosb ; store the ModR/M byte 1835 00000F52 F606[0F41]08 <1> test byte [asm_mn_flags], AMF_SIB 1836 00000F57 7403 <1> jz ac26 ; if no SIB --> 1837 00000F59 88E0 <1> mov al, ah 1838 <1> _386_PM_a32 1839 00000F5B AA <1> stosb ; store the SIB byte, too 1840 <1> ac26: 1841 <1> 1842 00000F5C 8B1E[1441] <1> mov bx, word [rmaddr] 1843 00000F60 85DB <1> test bx, bx 1844 00000F62 740A <1> jz ac27 ; if no offset associated with the R/M --> 1845 <1> _386_PM_o32 ; xor ecx, ecx 1846 00000F64 31C9 <1> xor cx, cx 1847 00000F66 8A4F03 <1> mov cl, byte [bx+OPRND.sizedis] 1848 <1> _386_PM_o32 ; lea esi, [bx+OPRND.num] 1849 00000F69 8D7708 <1> lea si, [bx+OPRND.num] 1850 <1> _386_PM_a32 1851 00000F6C F3A4 <1> rep movsb ; store the R/M offset (or memory offset) 1852 <1> ac27: 1853 <1> 1854 <1> ; Now store immediate data 1855 00000F6E 8B1E[1841] <1> mov bx, word [immaddr] 1856 00000F72 85DB <1> test bx, bx 1857 00000F74 740B <1> jz ac28 ; if no immediate data --> 1858 <1> _386_PM_o32 ; xor ecx, ecx 1859 00000F76 31C9 <1> xor cx, cx 1860 00000F78 8A0E[1F41] <1> mov cl, byte [opsize] 1861 <1> _386_PM_o32 ; lea esi, [bx+OPRND.num] 1862 00000F7C 8D7708 <1> lea si, [bx+OPRND.num] 1863 <1> _386_PM_a32 1864 00000F7F F3A4 <1> rep movsb 1865 <1> ac28: 1866 <1> 1867 <1> ; Now store additional bytes (needed for, e.g., enter instruction 1868 <1> ; and far memory address) 1869 00000F81 8B1E[1A41] <1> mov bx, word [xxaddr] 1870 00000F85 85DB <1> test bx, bx 1871 00000F87 7409 <1> jz ac29 ; if no additional data --> 1872 <1> _386_PM_o32 ; lea esi, [bx+OPRND.numadd] 1873 00000F89 8D7704 <1> lea si, [bx+OPRND.numadd] 1874 <1> _386_PM_o32 ; xor eax, eax 1875 00000F8C 31C0 <1> xor ax, ax 1876 00000F8E AC <1> lodsb 1877 <1> _386_PM_o32 ; xchg eax, ecx 1878 00000F8F 91 <1> xchg ax, cx ; (mov cx, ax) 1879 <1> _386_PM_a32 1880 00000F90 F3A4 <1> rep movsb 1881 <1> ac29: 1882 <1> 1883 <1> ; Done emitting. Update assembler address offset. 1884 00000F92 16 <1> push ss 1885 00000F93 07 <1> pop es ; restore es 1886 <1> _386_PM_o32 ; mov dword [a_addr], edi 1887 00000F94 893E[720B] <1> mov word [a_addr], di 1888 <1> 1889 <1> ; Compute machine type. 1890 00000F98 803E[1C41]03 <1> cmp byte [dismach], 3 1891 00000F9D 7313 <1> jae ac31 ; if we already know a 386 is needed 1892 00000F9F F606[0F41]25 <1> test byte [asm_mn_flags], AMF_D32 | AMF_A32 | AMF_FSGS 1893 00000FA4 7507 <1> jnz ac30 ; if 386 --> 1894 00000FA6 F606[2041]40 <1> test byte [varflags], VAR_D32 1895 00000FAB 7405 <1> jz ac31 ; if not 386 --> 1896 <1> ac30: 1897 00000FAD C606[1C41]03 <1> mov byte [dismach], 3 1898 <1> ac31: 1899 00000FB2 BF[2841] <1> mov di, a_obstab ; info on this instruction 1900 00000FB5 8B0E[2641] <1> mov cx, word [a_opcode2] 1901 00000FB9 E85E4C <1> call showmach ; get machine message into si, length into cx 1902 00000FBC E308 <1> jcxz ac33 ; if no message 1903 <1> 1904 <1> ac32: 1905 00000FBE BF[B40A] <1> mov di, line_out 1906 00000FC1 F3A4 <1> rep movsb ; copy the line to line_out 1907 00000FC3 E8FD8A <1> call putsline_crlf 1908 <1> 1909 <1> ac33: 1910 <1> %if _IMMASM 1911 <1> jmp near [ aa_ret ] ; back for the next input line 1912 <1> %else 1913 00000FC6 E962F7 <1> jmp aa01 1914 <1> %endif 1915 <1> 1916 <1> 1917 <1> %if 0 1918 <1> ; This is debugging code. It assumes that the original value 1919 <1> ; of a_addr is on the top of the stack. 1920 <1> pop si ; get orig. a_addr 1921 <1> mov ax, word [a_addr + saSegSel] 1922 <1> mov word [u_addr], si 1923 <1> mov word [u_addr + saSegSel], ax ; (doesn't work with 32-bit CS) 1924 <1> %if _PM 1925 <1> mov ax, word [a_addr + saSegment] 1926 <1> mov word [u_addr + saSegment], ax 1927 <1> mov ax, word [a_addr + saSelector] 1928 <1> mov word [u_addr + saSelector], ax 1929 <1> %endif 1930 <1> mov bx, word [a_addr] 1931 <1> sub bx, si 1932 <1> mov di, line_out 1933 <1> mov cx, 10 1934 <1> mov al, ' ' 1935 <1> rep stosb 1936 <1> mov ds, word [a_addr + saSegSel] 1937 <1> 1938 <1> ax1: lodsb 1939 <1> call hexbyte ; display the generated bytes 1940 <1> dec bx 1941 <1> jnz ax1 1942 <1> push ss 1943 <1> pop ds 1944 <1> call putsline_crlf 1945 <1> and word [disflags], 0 1946 <1> call disasm ; disassemble the new instruction 1947 <1> %if _IMMASM 1948 <1> jmp near [ aa_ret ] ; back to next input line 1949 <1> %else 1950 <1> jmp aa01 1951 <1> %endif 1952 <1> %endif 1953 <1> 1954 <1> ; Routines to check for specific operand types. 1955 <1> ; Upon success, the routine returns. 1956 <1> ; Upon failure, it pops the return address and jumps to ac01. 1957 <1> ; The routines must preserve si and di. 1958 <1> 1959 <1> ; OP_RM, OP_M, OP_R_MOD: form MOD R/M byte. 1960 <1> aop_rm: 1961 <1> aop_m: 1962 <1> aop_r_mod: 1963 00000FC9 E82D03 <1> call ao90 ; form reg/mem byte 1964 00000FCC EB30 <1> jmp short ao07 ; go to the size check 1965 <1> 1966 <1> ; OP_R: register. 1967 <1> aop_r: 1968 00000FCE 8A4504 <1> mov al, byte [di+OPRND.reg1] ; register number 1969 00000FD1 2407 <1> and al, 7 1970 00000FD3 B103 <1> mov cl, 3 1971 00000FD5 D2E0 <1> shl al, cl ; shift it into place 1972 00000FD7 0806[1641] <1> or byte [regmem], al ; put it into the reg/mem byte 1973 00000FDB EB21 <1> jmp short ao07 ; go to the size check 1974 <1> 1975 <1> ; OP_R_ADD: register, added to the instruction. 1976 <1> aop_r_add: 1977 00000FDD 8A4504 <1> mov al, byte [di+OPRND.reg1] 1978 00000FE0 2407 <1> and al, 7 1979 00000FE2 A2[1E41] <1> mov byte [opcode_or], al ; put it there 1980 00000FE5 EB17 <1> jmp short ao07 ; go to the size check 1981 <1> 1982 <1> ; OP_IMM: immediate data. 1983 <1> aop_imm: 1984 00000FE7 893E[1841] <1> mov word [immaddr], di ; save the location of this 1985 00000FEB EB11 <1> jmp short ao07 ; go to the size check 1986 <1> 1987 <1> ; OP_MOFFS: just the memory offset 1988 <1> aop_moffs: 1989 00000FED F60502 <1> test byte [di+OPRND.flags], ARG_MODRM 1990 00000FF0 754F <1> jnz ao11 ; if MOD R/M byte ( ==> reject) 1991 00000FF2 893E[1441] <1> mov word [rmaddr], di ; save the operand pointer 1992 00000FF6 EB06 <1> jmp short ao07 ; go to the size check 1993 <1> 1994 <1> ; OP_AX: check for AL/AX/EAX 1995 <1> aop_ax: 1996 00000FF8 F6450407 <1> test byte [di+OPRND.reg1], 7 1997 00000FFC 7543 <1> jnz ao11 ; if wrong register, reject --> 1998 <1> ; jmp short ao07 ; go to the size check 1999 <1> 2000 <1> ; Size check 2001 <1> ao07: 2002 00000FFE 800E[2041]10 <1> or byte [varflags], VAR_SIZ_NEED 2003 00001003 A0[2241] <1> mov al, byte [a_reqsize] 2004 00001006 2C05 <1> sub al, 5 ; OP_1632 >> 4 2005 00001008 7C3A <1> jl ao12 ; if OP_ALL 2006 0000100A 745A <1> je ao13 ; if OP_1632 2007 0000100C 3C05 <1> cmp al, 5 ; OP_1632_DEFAULT ? 2008 0000100E 7444 <1> je ao_1632_default 2009 <1> ; OP_8 = 1, OP_16 = 2, OP_32 = 3, OP_64 = 4 2010 00001010 04FD <1> add al, -3 2011 00001012 1403 <1> adc al, 3 ; convert 3 --> 4 and 4 --> 5 2012 <1> ao08: 2013 00001014 800E[2041]18 <1> or byte [varflags], VAR_SIZ_FORCD| VAR_SIZ_NEED 2014 <1> ao08_1: 2015 00001019 8A5D02 <1> mov bl, byte [di+OPRND.sizearg] 2016 0000101C 84DB <1> test bl, bl ; SIZ_NONE ? 2017 0000101E 7409 <1> jz ao09 ; yes, if no size given --> 2018 00001020 800E[2041]04 <1> or byte [varflags], VAR_SIZ_GIVN 2019 00001025 38D8 <1> cmp al, bl 2020 00001027 7518 <1> jne ao11 ; if sizes conflict, reject --> 2021 <1> ao09: 2022 00001029 3A06[1F41] <1> cmp al, byte [opsize] 2023 0000102D 7411 <1> je ao10 ; if sizes agree --> 2024 0000102F 3CFF <1> cmp al, -1 ; is it OP_MXX (for lea) ? 2025 00001031 740D <1> je ao10 2026 00001033 8606[1F41] <1> xchg al, byte [opsize] 2027 00001037 3C00 <1> cmp al, SIZ_NONE 2028 00001039 7506 <1> jne ao11 ; if sizes disagree, reject --> 2029 0000103B 800E[2041]04 <1> or byte [varflags], VAR_SIZ_GIVN ; added in DEBUG/X 1.18 2030 <1> ao10: 2031 00001040 C3 <1> retn 2032 <1> 2033 <1> ao11: 2034 <1> ao50_j1: 2035 00001041 E9A202 <1> jmp ao50 ; reject 2036 <1> 2037 <1> ; OP_ALL - Allow all sizes. 2038 <1> ao12: 2039 00001044 8A4502 <1> mov al, byte [di+OPRND.sizearg] 2040 00001047 3C01 <1> cmp al, SIZ_BYTE 2041 00001049 7436 <1> je ao15 ; if byte 2042 0000104B 721C <1> jb ao14 ; if unknown (SIZ_NONE) --> 2043 0000104D 800E[1E41]01 <1> or byte [opcode_or], 1 ; set bit in instruction 2044 00001052 EB15 <1> jmp short ao14 ; if size is 16 or 32 2045 <1> 2046 <1> ; OP_1632_DEFAULT 2047 <1> ao_1632_default: 2048 00001054 8A4502 <1> mov al, byte [di+OPRND.sizearg] 2049 00001057 84C0 <1> test al, al ; SIZ_NONE ? 2050 00001059 7512 <1> jnz @F ; no --> 2051 0000105B A0[1F41] <1> mov al, byte [opsize] ; (for push imm16/32) 2052 0000105E 84C0 <1> test al, al ; SIZ_NONE ? 2053 00001060 750B <1> jnz @F ; no --> 2054 00001062 B002 <1> mov al, SIZ_WORD 2055 <1> %if _PM 2056 <1> test byte [bCSAttr], 40h 2057 <1> jz @F 2058 <1> mov al, SIZ_DWORD 2059 <1> %endif 2060 00001064 EB07 <1> jmp @F 2061 <1> 2062 <1> ; OP_1632 - word or dword. 2063 <1> ao13: 2064 00001066 8A4502 <1> mov al, byte [di+OPRND.sizearg] 2065 <1> ao14: 2066 00001069 84C0 <1> test al, al ; SIZ_NONE ? 2067 0000106B 741B <1> jz ao16 ; yes, if still unknown --> 2068 <1> @@: 2069 0000106D 3C02 <1> cmp al, SIZ_WORD 2070 0000106F 7507 <1> jne ao15_1 ; if word 2071 00001071 800E[2041]20 <1> or byte [varflags], VAR_D16 2072 00001076 EB09 <1> jmp short ao15 2073 <1> ao15_1: 2074 00001078 3C04 <1> cmp al, SIZ_DWORD 2075 0000107A 75C5 <1> jne ao11 ; if not dword 2076 0000107C 800E[2041]40 <1> or byte [varflags], VAR_D32 ; set flag 2077 <1> ao15: 2078 00001081 800E[2041]04 <1> or byte [varflags], VAR_SIZ_GIVN 2079 <1> ; hack for pushd/pushw imm: check for match 2080 00001086 EBA1 <1> jmp ao09 2081 <1> ao16: 2082 00001088 C3 <1> retn 2083 <1> 2084 <1> ; OP_M64 - 64-bit memory reference. 2085 <1> ; OP_MFLOAT - single-precision floating point memory reference. 2086 <1> ; OP_MDOUBLE - double-precision floating point memory reference. 2087 <1> ; OP_M80 - 80-bit memory reference. 2088 <1> ; OP_MXX - memory reference, size unknown. 2089 <1> ; INP: (from ac08 calling this:) 2090 <1> ; bx = index into bittab 2091 <1> ao17: 2092 00001089 E86D02 <1> call ao90 ; form reg/mem byte 2093 0000108C 8A87[0D42] <1> mov al, byte [asm_siznum + bx - (OP_FIRST_ASM_SIZNUM + 16 - 1)] 2094 00001090 EB82 <1> jmp ao08 ; check size 2095 <1> 2096 <1> ; OP_FARIMM - far address contained in instruction 2097 <1> ao21: 2098 00001092 8A4502 <1> mov al, byte [di+OPRND.sizearg] 2099 00001095 84C0 <1> test al, al ; have a size ? (check for not SIZ_NONE) 2100 00001097 7502 <1> jnz @F ; yes --> 2101 00001099 B002 <1> mov al, SIZ_WORD ; default to word, assuming 16-bit CS 2102 <1> %if _PM 2103 <1> test byte [bCSAttr], 40h; is it a 32-bit CS ? 2104 <1> jz @F ; no --> 2105 <1> mov al, SIZ_DWORD ; yes, default to dword 2106 <1> %endif 2107 <1> 2108 <1> @@: 2109 0000109B 3C02 <1> cmp al, SIZ_WORD ; is it word ? 2110 0000109D 750D <1> jne .o32_check ; no, check for dword size --> 2111 <1> .o16: 2112 0000109F 800E[2041]20 <1> or byte [varflags], VAR_D16 2113 <1> ; mark flag for o16 prefix if needed 2114 <1> 2115 000010A4 837D0A00 <1> cmp word [di+OPRND.num+2], byte 0 2116 000010A8 7504 <1> jne ..@ao50_j_NZ ; if not a 16-bit offset --> 2117 <1> 2118 000010AA EB0C <1> jmp short .common 2119 <1> 2120 <1> .o32_check: 2121 000010AC 3C04 <1> cmp al, SIZ_DWORD ; is it dword ? 2122 <1> ..@ao50_j_NZ: 2123 000010AE 7403E93302 <1> jne ao50 ; no, invalid --> 2124 <1> .o32: 2125 000010B3 800E[2041]40 <1> or byte [varflags], VAR_D32 2126 <1> ; mark flag for o32 prefix if needed 2127 <1> 2128 <1> .common: 2129 000010B8 800E[2041]04 <1> or byte [varflags], VAR_SIZ_GIVN 2130 <1> 2131 000010BD C6450402 <1> mov byte [di+OPRND.numadd], 2 ; 2 additional bytes (segment part) 2132 000010C1 893E[1841] <1> mov word [immaddr], di 2133 000010C5 A2[1F41] <1> mov byte [opsize], al ; size of offset, 2 or 4 2134 <1> ao22a: 2135 000010C8 893E[1A41] <1> mov word [xxaddr], di 2136 000010CC C3 <1> retn 2137 <1> 2138 <1> ; OP_REL8 - relative address 2139 <1> ao23: 2140 000010CD 807D0200 <1> cmp byte [di+OPRND.sizearg], SIZ_NONE 2141 000010D1 75DB <1> jne ..@ao50_j_NZ 2142 <1> 2143 <1> _386_PM_o32 2144 000010D3 A1[720B] <1> mov ax, word [a_addr] ; offset 2145 <1> _386_PM_o32 2146 000010D6 40 <1> inc ax 2147 <1> _386_PM_o32 2148 000010D7 40 <1> inc ax ; $ 2149 000010D8 8A0E[0F41] <1> mov cl, byte [asm_mn_flags] 2150 <1> 2151 000010DC F6C180 <1> test cl, AMF_ADDR 2152 000010DF 7517 <1> jnz ao23aa 2153 <1> ; JxCXZ, LOOPx, LOOPZx and LOOPNZx need a 67h, not a 66h prefix 2154 000010E1 F6C141 <1> test cl, AMF_D32 | AMF_D16 2155 000010E4 7418 <1> jz ao23b ; if not JxCXZ, LOOPx 2156 000010E6 F6C101 <1> test cl, AMF_D32 2157 000010E9 7403 <1> jz ao23a 2158 000010EB 80C904 <1> or cl, AMF_A32 2159 <1> ao23a: 2160 000010EE 80E1BE <1> and cl, ~(AMF_D32 | AMF_D16) 2161 000010F1 80C980 <1> or cl, AMF_ADDR 2162 000010F4 880E[0F41] <1> mov byte [asm_mn_flags], cl 2163 <1> ao23aa: 2164 000010F8 80E104 <1> and cl, AMF_A32 2165 <1> %if _PM 2166 <1> or cl, byte [bCSAttr] 2167 <1> jz ao23b ; 16-bit CS and addressing --> 2168 <1> cmp cl, AMF_A32| 40h 2169 <1> je ao23b ; 32-bit CS and addressing --> 2170 <1> %else 2171 000010FB 7401 <1> jz ao23b ; RM CS and 16-bit addressing --> 2172 <1> %endif 2173 <1> _386_PM_o32 2174 000010FD 40 <1> inc ax ; adjust $ for the prefix that will be used 2175 <1> ao23b: 2176 000010FE 89C3 <1> mov bx, ax 2177 00001100 31C9 <1> xor cx, cx 2178 <1> _386_PM push eax 2179 <1> _386_PM pop ax 2180 <1> _386_PM pop cx 2181 00001102 8B4508 <1> mov ax, word [di+OPRND.num+0] 2182 00001105 8B550A <1> mov dx, word [di+OPRND.num+2] 2183 <1> 2184 <1> %if _IMMASM 2185 <1> testopt [internalflags6], dif6_immasm 2186 <1> jz @F 2187 <1> 2188 <1> mov word [immasm_rel8_target+0], ax 2189 <1> mov word [immasm_rel8_target+2], dx 2190 <1> setopt [internalflags6], dif6_immasm_rel8 2191 <1> 2192 <1> mov ax, bx 2193 <1> mov dx, cx 2194 <1> @@: 2195 <1> %endif 2196 <1> 2197 00001108 29D8 <1> sub ax, bx 2198 0000110A 19CA <1> sbb dx, cx 2199 <1> 2200 0000110C 884505 <1> mov byte [di+OPRND.num2], al 2201 0000110F 3D8000 <1> cmp ax, 80h ; just one byte beyond range ? 2202 00001112 750E <1> jne @F 2203 00001114 85D2 <1> test dx, dx 2204 00001116 750A <1> jnz @F ; no --> 2205 00001118 803C24 <1> cmp byte [si], OP_E_CX ; we're trying for loop with (e)cx explicit ? 2206 0000111B 7505 <1> jne @F ; no --> 2207 0000111D 800D80 <1> setopt [di + OPRND.flags], ARG_ECX_SPECIAL 2208 <1> ; remember that we have to overflow 2209 00001120 EB0C <1> jmp @FF 2210 <1> @@: 2211 00001122 B107 <1> mov cl, 7 2212 00001124 D2F8 <1> sar al, cl 2213 00001126 38E0 <1> cmp al, ah 2214 00001128 755F <1> jne ao24 ; if too big, reject --> 2215 0000112A 39D0 <1> cmp ax, dx 2216 0000112C 755B <1> jne ao24 ; if too big, reject --> 2217 <1> @@: 2218 0000112E C6450401 <1> mov byte [di+OPRND.numadd], 1 ; save the length 2219 00001132 EB94 <1> jmp ao22a ; save it away 2220 <1> 2221 <1> 2222 <1> ; OP_REL1632: relative jump/call to a longer address. 2223 <1> ; 2224 <1> ; size of instruction is 2225 <1> ; a) CS 16-bit: 2226 <1> ; 3 (xx xxxx, near jmp/call E9/E8) or 2227 <1> ; 4 (0F xx xxxx, near jcc 0F 80+cc) 2228 <1> ; 6 (66 xx xxxxxxxx, near 32-bit jmp/call E9/E8) 2229 <1> ; 7 (66 0F xx xxxxxxxx, near 32-bit jcc 0F 80+cc) 2230 <1> ; 2231 <1> ; b) CS 32-bit: 2232 <1> ; 5 (xx xxxxxxxx, near jmp/call E9/E8) or 2233 <1> ; 6 (0F xx xxxxxxxx, near jcc 0F 80+cc) 2234 <1> ; 4 (66 xx xxxx, near 16-bit jmp/call E9/E8) 2235 <1> ; 5 (66 0F xx xxxx, near 16-bit jcc 0F 80+cc) 2236 <1> ao25: 2237 00001134 8B1E[720B] <1> mov bx, word [a_addr+0] 2238 <1> %if _PM 2239 <1> mov cx, word [a_addr+2] 2240 <1> %else 2241 00001138 31C9 <1> xor cx, cx 2242 <1> %endif 2243 <1> 2244 0000113A 31C0 <1> xor ax, ax 2245 0000113C 8A4502 <1> mov al, byte [di+OPRND.sizearg] 2246 0000113F 84C0 <1> test al, al ; SIZ_NONE ? 2247 00001141 7502 <1> jnz @F ; no --> 2248 00001143 B002 <1> mov al, SIZ_WORD ; in 16-bit CS default to word (2) 2249 <1> %if _PM 2250 <1> test byte [bCSAttr], 40h 2251 <1> jz @F 2252 <1> mov al, SIZ_DWORD ; in 32-bit CS default to dword (4) 2253 <1> %endif 2254 <1> @@: 2255 00001145 50 <1> push ax ; preserve size 2256 <1> 2257 <1> %if _PM 2258 <1> test byte [bCSAttr], 40h 2259 <1> jz .adjust_16bitcs 2260 <1> .adjust_32bitcs: 2261 <1> cmp al, SIZ_DWORD ; default size ? 2262 <1> jmp .adjust_common 2263 <1> %endif 2264 <1> 2265 <1> .adjust_16bitcs: 2266 00001146 3C02 <1> cmp al, SIZ_WORD ; default size ? 2267 <1> .adjust_common: 2268 00001148 7401 <1> je .adjust_done 2269 0000114A 40 <1> inc ax ; no, increment for 66h prefix (osize) 2270 <1> .adjust_done: 2271 <1> 2272 0000114B 40 <1> inc ax ; add size of opcode (E8h/E9h/80h+cc) 2273 <1> 2274 0000114C 813E[2441]0001 <1> cmp word [a_opcode], 100h 2275 <1> ; is it a 0Fh-prefixed opcode ? 2276 <1> ; (that is, a 0Fh 80h+cc conditional jump) 2277 00001152 7201 <1> jb @F 2278 00001154 40 <1> inc ax ; add size of 0Fh prefix opcode 2279 <1> @@: 2280 00001155 01C3 <1> add bx, ax 2281 00001157 83D100 <1> adc cx, byte 0 2282 0000115A 58 <1> pop ax ; restore size (2 or 4) 2283 0000115B 8B550A <1> mov dx, word [di+OPRND.num+2] 2284 <1> 2285 0000115E 3C04 <1> cmp al, SIZ_DWORD 2286 00001160 740B <1> je ao27_1 ; if the size given was "dword" --> 2287 <1> 2288 <1> ao27: 2289 00001162 85D2 <1> test dx, dx 2290 00001164 7523 <1> jnz ao24 ; if operand is too big, reject --> 2291 00001166 800E[2041]20 <1> or byte [varflags], VAR_D16 2292 0000116B EB05 <1> jmp short ao28 2293 <1> 2294 <1> ao27_1: 2295 0000116D 800E[2041]40 <1> or byte [varflags], VAR_D32 2296 <1> 2297 <1> ao28: 2298 00001172 884504 <1> mov byte [di+OPRND.numadd], al ; store the size 2299 00001175 8B4508 <1> mov ax, word [di+OPRND.num+0] 2300 <1> %if _IMMASM 2301 <1> mov word [immasm_rel1632_target+0], ax 2302 <1> mov word [immasm_rel1632_target+2], dx 2303 <1> %endif 2304 00001178 31C9 <1> xor cx, cx 2305 0000117A 29D8 <1> sub ax, bx 2306 0000117C 19CA <1> sbb dx, cx ; compute DX:AX - CX:BX 2307 0000117E 894505 <1> mov word [di+OPRND.num2+0], ax 2308 00001181 895507 <1> mov word [di+OPRND.num2+2], dx 2309 00001184 893E[1A41] <1> mov word [xxaddr], di 2310 00001188 C3 <1> retn 2311 <1> 2312 <1> ao24: 2313 <1> ao50_j2: 2314 00001189 E95A01 <1> jmp ao50 ; reject 2315 <1> 2316 <1> ; OP_1CHK - The assembler can ignore this one. 2317 <1> ao29: 2318 0000118C 58 <1> pop ax ; discard return address 2319 <1> ac06_j2: 2320 0000118D E97CFC <1> jmp ac06_j1 ; next operand 2321 <1> 2322 <1> ; OP_STI - ST(I). 2323 <1> aop_sti: 2324 00001190 B01E <1> mov al, REG_ST ; code for ST 2325 00001192 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 2326 00001195 EB47 <1> jmp short ao38 ; to common code --> 2327 <1> 2328 <1> ; OP_MMX (previously was OP_ECX (used for LOOPx)) 2329 <1> aop_mmx: 2330 00001197 B01F <1> mov al, REG_MM 2331 00001199 EB3C <1> jmp short ao37 ; to common code --> 2332 <1> 2333 <1> ; OP_MMX_MOD 2334 <1> aop_mmx_mod: 2335 0000119B B01F <1> mov al, REG_MM 2336 0000119D 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 2337 000011A0 80CBC0 <1> or bl, 0C0h 2338 000011A3 EB39 <1> jmp short ao38 2339 <1> 2340 <1> ; OP_CR 2341 <1> aop_cr: 2342 000011A5 8A4505 <1> mov al, byte [di+OPRND.reg2] ; get the index 2343 000011A8 3C04 <1> cmp al, 4 2344 000011AA 77DD <1> ja ao24 ; if too big, reject --> 2345 000011AC 7505 <1> jne ao32 ; if not CR4 2346 000011AE C606[1C41]05 <1> mov byte [dismach], 5 ; CR4 is new to the 586 2347 <1> ao32: 2348 000011B3 3C01 <1> cmp al, 1 2349 000011B5 7506 <1> jne ao33 2350 000011B7 807D0CFF <1> cmp byte [di+OPRND_size+OPRND.flags], -1 2351 000011BB 75CC <1> jne ao24 ; reject if no other arg (can't mov CR1,xx) 2352 <1> ao33: 2353 000011BD B020 <1> mov al, REG_CR ; code for CR 2354 000011BF EB16 <1> jmp short ao37 ; to common code 2355 <1> 2356 <1> ; OP_DR 2357 <1> ao34: 2358 000011C1 B021 <1> mov al, REG_DR ; code for DR 2359 000011C3 EB12 <1> jmp short ao37 ; to common code 2360 <1> 2361 <1> ; OP_TR 2362 <1> ao35: 2363 000011C5 8A4505 <1> mov al, byte [di+OPRND.reg2] ; get the index 2364 000011C8 3C03 <1> cmp al, 3 2365 000011CA 72BD <1> jb ao24 ; if too small, reject --> 2366 000011CC 3C06 <1> cmp al, 6 2367 000011CE 7305 <1> jae ao36 2368 000011D0 C606[1C41]04 <1> mov byte [dismach], 4 ; TR3-5 are new to the 486 2369 <1> ao36: 2370 000011D5 B022 <1> mov al, REG_TR ; code for TR 2371 <1> 2372 <1> ; Common code for these weird registers. 2373 <1> ao37: 2374 000011D7 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 2375 000011DA B103 <1> mov cl, 3 2376 000011DC D2E3 <1> shl bl, cl 2377 <1> ao38: 2378 000011DE 081E[1641] <1> or byte [regmem], bl 2379 000011E2 800E[2041]02 <1> or byte [varflags], VAR_MODRM 2380 000011E7 3A4504 <1> cmp al, byte [di+OPRND.reg1] ; check for the right numbered register 2381 000011EA 7419 <1> je ao40 ; if yes, then return 2382 <1> ao38a: 2383 000011EC E9F700 <1> jmp ao50 ; reject --> 2384 <1> 2385 <1> ; OP_SEGREG 2386 <1> ao39: 2387 000011EF 8A4504 <1> mov al, byte [di+OPRND.reg1] 2388 000011F2 2C18 <1> sub al, 24 2389 000011F4 3C06 <1> cmp al, 6 2390 000011F6 73F4 <1> jae ao38a ; if not a segment register, reject --> 2391 000011F8 B103 <1> mov cl, 3 2392 000011FA D2E0 <1> shl al, cl 2393 000011FC 0806[1641] <1> or byte [regmem], al 2394 <1> ;--- v1.26: don't force size for MOV sreg, mxx / MOV mxx, sreg 2395 00001200 800E[2041]04 <1> or byte [varflags], VAR_SIZ_GIVN 2396 <1> ao40: 2397 00001205 C3 <1> retn 2398 <1> 2399 <1> ; OP_IMMS8 - Sign-extended immediate byte (PUSH xx) 2400 <1> ao41: 2401 00001206 8026[2041]EF <1> and byte [varflags], ~VAR_SIZ_NEED ; added for v1.09. Ok? 2402 <1> ao41_extend: 2403 0000120B 8B4508 <1> mov ax, word [di+OPRND.num+0] 2404 0000120E B107 <1> mov cl, 7 2405 00001210 D2F8 <1> sar al, cl 2406 00001212 EB05 <1> jmp short ao43 ; common code 2407 <1> 2408 <1> ; OP_IMM8 - Immediate byte 2409 <1> ao42: 2410 00001214 8B4508 <1> mov ax, word [di+OPRND.num+0] 2411 00001217 B000 <1> mov al, 0 2412 <1> ao43: 2413 00001219 38E0 <1> cmp al, ah 2414 0000121B 7403E9C600 <1> jne ao50 ; if too big, reject --> 2415 00001220 3B450A <1> cmp ax, word [di+OPRND.num+2] 2416 00001223 7403E9BE00 <1> jne ao50 ; if too big, reject --> 2417 00001228 B001 <1> mov al, SIZ_BYTE 2418 0000122A E8BE00 <1> call aasizchk ; check that size == 0 or 1 2419 0000122D 8A6508 <1> mov ah, byte [di+OPRND.num+0] ; store the byte, length 1 2420 00001230 894504 <1> mov word [di+OPRND.numadd], ax ; store length (0/1) + the byte 2421 00001233 893E[1A41] <1> mov word [xxaddr], di 2422 <1> ao43r: 2423 00001237 C3 <1> retn 2424 <1> 2425 <1> 2426 <1> aop_e_cx: 2427 00001238 B980FB <1> mov cx, AMF_ADDR | 0 | (~AMF_A32 << 8) 2428 0000123B 837D0409 <1> cmp word [di + OPRND.reg1], REG_CX 2429 0000123F 740B <1> je .a16 2430 <1> .a32: 2431 00001241 B984FF <1> mov cx, AMF_ADDR | AMF_A32 | (~0 << 8) 2432 00001244 E80500 <1> call .common 2433 00001247 B011 <1> mov al, REG_CX + 8 2434 00001249 E99400 <1> jmp ao48a 2435 <1> 2436 <1> .a16: 2437 <1> .common: 2438 0000124C 202E[0F41] <1> and byte [asm_mn_flags], ch 2439 00001250 080E[0F41] <1> or byte [asm_mn_flags], cl 2440 <1> 2441 00001254 8B1E[1A41] <1> mov bx, word [xxaddr] 2442 00001258 8A0E[0F41] <1> mov cl, byte [asm_mn_flags] 2443 0000125C 80E104 <1> and cl, AMF_A32 2444 <1> %if _PM 2445 <1> or cl, byte [bCSAttr] 2446 <1> jz .noprefix ; 16-bit CS and addressing --> 2447 <1> cmp cl, AMF_A32| 40h 2448 <1> je .noprefix ; 32-bit CS and addressing --> 2449 <1> %else 2450 0000125F 740B <1> jz .noprefix ; 86 Mode CS and 16-bit addressing --> 2451 <1> %endif 2452 00001261 FE4F05 <1> dec byte [bx + OPRND.num2] 2453 00001264 7105 <1> jno .ret ; (no need to check special flag) 2454 <1> .prefix_overflow: 2455 00001266 F60780 <1> testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 2456 00001269 7406 <1> jz .ao50 ; not special, overflow -128 to +127 2457 <1> ; special, accept +128 to +127 2458 <1> .ret: 2459 0000126B C3 <1> retn 2460 <1> 2461 <1> .noprefix: 2462 0000126C F60780 <1> testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 2463 0000126F 74FA <1> jz .ret ; not special, no prefix 2464 <1> ; special and no prefix: reject 2465 <1> .ao50: 2466 00001271 EB73 <1> jmp ao50 2467 <1> 2468 <1> 2469 <1> ; OP_SHOSIZ - force the user to declare the size of the next operand 2470 <1> ao44: 2471 00001273 F606[2041]10 <1> test byte [varflags], VAR_SIZ_NEED 2472 00001278 7407 <1> jz ao45 ; if no testing needs to be done 2473 0000127A F606[2041]04 <1> test byte [varflags], VAR_SIZ_GIVN 2474 0000127F 7465 <1> jz ao50 ; if size was given ( ==> reject) 2475 <1> ao45: 2476 00001281 8026[2041]FB <1> and byte [varflags], ~VAR_SIZ_GIVN ; clear the flag 2477 00001286 803C11 <1> cmp byte [si], OP_IMM8 2478 00001289 7405 <1> je ao45a ; if OP_IMM8 is next, then don't set VAR_SIZ_NEED 2479 0000128B 800E[2041]10 <1> or byte [varflags], VAR_SIZ_NEED 2480 <1> ao45a: 2481 <1> 2482 <1> ; hack for pushd/pushw imm (the only OP_SHOSIZ with suffix), 2483 <1> ; set operand size to 2 for pushw, 4 for pushd. 2484 <1> ; this is checked by ao15 later so as to match. 2485 00001290 B002 <1> mov al, 2 2486 00001292 8A26[0E41] <1> mov ah, byte [aa_mnemsuffix] 2487 <1> ; 0 = normal, 'W' suffix, or 'D' suffix 2488 00001296 80FC44 <1> cmp ah, 'D' 2489 00001299 7407 <1> je @F ; if D, al = 2 --> 2490 0000129B 48 <1> dec ax ; al = 1 2491 0000129C 80FC57 <1> cmp ah, 'W' 2492 0000129F 7401 <1> je @F ; if W, al = 1 --> 2493 000012A1 48 <1> dec ax ; al = 0 2494 <1> @@: 2495 000012A2 00C0 <1> add al, al ; 0 = no suffix, 2 = 'W' suffix, 4 = 'D' suffix 2496 <1> ; as 0 = SIZ_NONE, 2 = SIZ_WORD, 4 = SIZ_DWORD 2497 000012A4 A2[1F41] <1> mov byte [opsize], al 2498 <1> ao_modifier_continue: 2499 000012A7 58 <1> pop ax ; discard return address 2500 000012A8 E9E2FE <1> jmp ac06_j2 ; next operand 2501 <1> 2502 <1> 2503 <1> ao_m_always_16: 2504 000012AB 800E[2041]80 <1> setopt [varflags], VAR_M_ALWAYS_16 2505 000012B0 EBF5 <1> jmp ao_modifier_continue 2506 <1> 2507 <1> 2508 <1> ao_short: 2509 000012B2 B001 <1> mov al, odfShort 2510 <1> ao_distance: 2511 000012B4 0806[2141] <1> or byte [alloweddist], al 2512 000012B8 EBED <1> jmp ao_modifier_continue 2513 <1> 2514 <1> ao_near: 2515 000012BA B002 <1> mov al, odfNear 2516 000012BC EBF6 <1> jmp ao_distance 2517 <1> 2518 <1> ao_far_required: 2519 000012BE F6450104 <1> test byte [di + OPRND.distflags], odfFar 2520 000012C2 7422 <1> jz ao50 ; if not far, reject --> 2521 <1> ao_far: 2522 000012C4 B004 <1> mov al, odfFar 2523 000012C6 EBEC <1> jmp ao_distance 2524 <1> 2525 <1> 2526 <1> ; OP_1 2527 <1> ao46: 2528 000012C8 817D070101 <1> cmp word [di+OPRND.orednum], 101h 2529 <1> ; check both size and value (OPRND.num) 2530 000012CD EB15 <1> jmp short ao49 ; test it later 2531 <1> 2532 <1> ; OP_3 2533 <1> ao47: 2534 000012CF 807D0200 <1> cmp byte [di + OPRND.sizearg], SIZ_NONE 2535 000012D3 7511 <1> jne ao50 ; if BYTE is specified, reject this --> 2536 000012D5 817D070103 <1> cmp word [di+OPRND.orednum], 301h 2537 <1> ; check both size and value (OPRND.num) 2538 000012DA EB08 <1> jmp short ao49 ; test it later 2539 <1> 2540 <1> ; OP_DX, OP_CL, OP_ST, OP_ES, ..., OP_GS 2541 <1> ; INP: (from ac08 calling this:) 2542 <1> ; bx = index into bittab 2543 <1> ao48: 2544 000012DC 8A87[DE41] <1> mov al, [asm_regnum + bx - (OP_FIRST_ASM_REGNUM + 16 - 1)] 2545 <1> ao48a: 2546 000012E0 98 <1> cbw 2547 000012E1 3B4504 <1> cmp ax, word [di+OPRND.reg1] 2548 <1> 2549 <1> ao49: 2550 000012E4 7404 <1> je ao51 2551 <1> 2552 <1> ; Reject this operand list. 2553 <1> ao50: 2554 000012E6 58 <1> pop ax ; discard return address 2555 000012E7 E948FA <1> jmp ac01 ; go back to try the next alternative 2556 <1> 2557 <1> ao51: 2558 000012EA C3 <1> retn 2559 <1> 2560 <1> ; AASIZCHK - Check that the size given is 0 or AL. 2561 <1> aasizchk: 2562 000012EB 807D0200 <1> cmp byte [di+OPRND.sizearg], SIZ_NONE 2563 000012EF 74F9 <1> je ao51 2564 000012F1 384502 <1> cmp byte [di+OPRND.sizearg], al 2565 000012F4 74F4 <1> je ao51 2566 000012F6 58 <1> pop ax ; discard return address 2567 000012F7 EBED <1> jmp short ao50 ; reject this list --> 2568 <1> 2569 <1> ; Do reg/mem processing. 2570 <1> ; 2571 <1> ; INP: di-> OPRND structure 2572 <1> ; CHG: ax 2573 <1> ao90: 2574 000012F9 F60504 <1> test byte [di+OPRND.flags], ARG_JUSTREG 2575 000012FC 7516 <1> jnz ao92 ; if just register 2576 000012FE F60502 <1> test byte [di+OPRND.flags], ARG_MODRM 2577 00001301 7405 <1> jz ao91 ; if no precomputed MOD R/M byte 2578 00001303 8B4504 <1> mov ax, word [di+OPRND.reg1] ; get the precomputed bytes 2579 00001306 EB1A <1> jmp short ao93 ; done 2580 <1> 2581 <1> ao91: 2582 00001308 B006 <1> mov al, 6 ; convert plain displacement to MOD R/M 2583 0000130A F606[0F41]04 <1> test byte [asm_mn_flags], AMF_A32 2584 0000130F 7411 <1> jz ao93 ; if 16-bit addressing 2585 00001311 48 <1> dec ax 2586 00001312 EB0E <1> jmp short ao93 ; done 2587 <1> 2588 <1> ao92: 2589 00001314 8A4504 <1> mov al, byte [di+OPRND.reg1] ; convert register to MOD R/M 2590 <1> %if 1 2591 00001317 3C1F <1> cmp al, REG_MM 2592 00001319 7503 <1> jne .notmm 2593 0000131B 8A4505 <1> mov al, byte [di+OPRND.reg2] 2594 <1> .notmm: 2595 <1> %endif 2596 0000131E 2407 <1> and al, 7 ; get low 3 bits 2597 00001320 0CC0 <1> or al, 0C0h 2598 <1> 2599 <1> ao93: 2600 00001322 0906[1641] <1> or word [regmem], ax ; store the MOD R/M and SIB 2601 00001326 800E[2041]02 <1> or byte [varflags], VAR_MODRM ; flag its presence 2602 0000132B 893E[1441] <1> mov word [rmaddr], di ; save a pointer 2603 0000132F C3 <1> retn ; done 2604 <1> 2605 <1> ; AAIFNUM - Determine if a number starts here 2606 <1> ; 2607 <1> ; INP: al = first character 2608 <1> ; si-> next character 2609 <1> ; OUT: CY if no number starts there 2610 <1> ; NC if a number starts there 2611 <1> ; CHG: - 2612 <1> ; 2613 <1> ; Note: Actually checks for a plus or minus sign that 2614 <1> ; is followed by a valid (hexadecimal) digit, 2615 <1> ; or just a digit without specified sign. 2616 <1> aaifnum: 2617 00001330 56 <1> push si 2618 00001331 50 <1> push ax 2619 00001332 3C2D <1> cmp al, '-' ; minus or plus sign ? 2620 00001334 7404 <1> je @F 2621 00001336 3C2B <1> cmp al, '+' 2622 00001338 7503 <1> jne @FF ; no --> 2623 <1> @@: 2624 0000133A E8A286 <1> call skipwhite ; skip sign, and (if any) blanks 2625 <1> @@: 2626 0000133D 3C28 <1> cmp al, '(' 2627 0000133F F9 <1> stc 2628 00001340 7404 <1> je @F 2629 00001342 2C30 <1> sub al, '0' 2630 00001344 3C0A <1> cmp al, 10 2631 <1> @@: 2632 00001346 58 <1> pop ax 2633 00001347 7208 <1> jb @F ; if a decimal digit --> 2634 <1> 2635 00001349 50 <1> push ax 2636 0000134A 24DF <1> and al, TOUPPER 2637 0000134C 2C41 <1> sub al, 'A' 2638 0000134E 3C06 <1> cmp al, 6 2639 00001350 58 <1> pop ax 2640 <1> @@: 2641 00001351 F5 <1> cmc ; carry clear <==> it's a number 2642 00001352 5E <1> pop si 2643 00001353 C3 <1> retn 2644 <1> 2645 <1> 2646 <1> ; AAGETI - Get a number from the input line. 2647 <1> ; 2648 <1> ; Entry AL First character of number 2649 <1> ; SI Address of next character of number 2650 <1> ; Exit DX:BX Resulting number 2651 <1> ; CL 1 if it's a byte, 2 if a word, 4 if a dword 2652 <1> ; AL Next character not in number 2653 <1> ; SI Address of next character after that 2654 <1> ; Uses AH, CH 2655 <1> aageti: 2656 <1> ; Incorporate expression evaluator here. 2657 00001354 3C2D <1> cmp al, '-' 2658 00001356 7416 <1> je aag1 ; if negative number --> 2659 00001358 3C2B <1> cmp al, '+' ; (unnecessary) plus sign ? 2660 0000135A 7503 <1> jne @F ; no --> 2661 0000135C E88086 <1> call skipwhite ; skip it, plus blanks 2662 <1> @@: 2663 0000135F E84100 <1> call aag4 ; get the bare number 2664 00001362 B90100 <1> mov cx, 1 ; set up cx 2665 00001365 09D2 <1> or dx, dx 2666 00001367 7536 <1> jnz aag2 ; if dword 2667 00001369 08FF <1> or bh, bh 2668 0000136B 7534 <1> jnz aag3 ; if word 2669 0000136D C3 <1> retn ; it's a byte 2670 <1> 2671 <1> aag1: 2672 0000136E E86E86 <1> call skipwhite 2673 00001371 E82F00 <1> call aag4 ; get the bare number 2674 00001374 89D9 <1> mov cx, bx 2675 00001376 09D1 <1> or cx, dx 2676 00001378 B90100 <1> mov cx, 1 2677 0000137B 7421 <1> jz aag1a ; if -0 2678 0000137D F7D2 <1> not dx ; negate the answer 2679 0000137F F7DB <1> neg bx 2680 00001381 F5 <1> cmc 2681 00001382 83D200 <1> adc dx, byte 0 2682 00001385 F6C680 <1> test dh, 80h 2683 00001388 7453 <1> jz aag7 ; if error 2684 0000138A 83FAFF <1> cmp dx, byte -1 2685 0000138D 7510 <1> jne aag2 ; if dword 2686 0000138F F6C780 <1> test bh, 80h 2687 00001392 740B <1> jz aag2 ; if dword 2688 00001394 80FFFF <1> cmp bh, -1 2689 00001397 7508 <1> jne aag3 ; if word 2690 00001399 F6C380 <1> test bl, 80h 2691 0000139C 7403 <1> jz aag3 ; if word 2692 <1> aag1a: 2693 <1> aag4.got_expr: 2694 0000139E C3 <1> retn ; it's a byte 2695 <1> 2696 <1> aag2: 2697 0000139F 41 <1> inc cx ;return: it's a dword 2698 000013A0 41 <1> inc cx 2699 <1> aag3: 2700 000013A1 41 <1> inc cx ;return: it's a word 2701 000013A2 C3 <1> retn 2702 <1> 2703 <1> aag4: 2704 000013A3 3C28 <1> cmp al, '(' 2705 000013A5 7511 <1> jne .not_expr 2706 000013A7 AC <1> lodsb ; skip opening paren 2707 000013A8 E8CC7F <1> nearcall getexpression ; returns bx:dx = numerical value 2708 000013AB 87DA <1> xchg bx, dx ; dx:bx = number 2709 000013AD E83086 <1> call skipwh0 2710 000013B0 3C29 <1> cmp al, ')' 2711 000013B2 AC <1> lodsb 2712 000013B3 74E9 <1> je .got_expr 2713 000013B5 4E <1> dec si 2714 000013B6 EB25 <1> jmp aag7 2715 <1> 2716 <1> .not_expr: 2717 000013B8 31DB <1> xor bx, bx ; get the basic integer 2718 000013BA 31D2 <1> xor dx, dx 2719 000013BC E8BF84 <1> nearcall getnyb 2720 000013BF 721C <1> jc aag7 ; if not a hex digit 2721 <1> aag5: 2722 000013C1 08C3 <1> or bl, al ; add it to the number 2723 <1> @@: 2724 000013C3 AC <1> lodsb 2725 000013C4 3C5F <1> cmp al, '_' 2726 000013C6 74FB <1> je @B 2727 000013C8 E8B384 <1> nearcall getnyb 2728 000013CB 72D1 <1> jc aag1a ; if done 2729 000013CD F6C6F0 <1> test dh, 0F0h 2730 000013D0 750B <1> jnz aag7 ; if overflow 2731 000013D2 B90400 <1> mov cx, 4 2732 <1> aag6: 2733 000013D5 D1E3 <1> shl bx, 1 ; shift it by 4 2734 000013D7 D1D2 <1> rcl dx, 1 2735 000013D9 E2FA <1> loop aag6 2736 000013DB EBE4 <1> jmp short aag5 2737 <1> 2738 <1> aag7: 2739 000013DD E97D6E <1> jmp error 2740 <1> 2741 <1> ; AACONVINDEX - Convert results from AAGETI and store index value 2742 <1> ; 2743 <1> ; Entry DX:BX,CL As in exit from AAGETI 2744 <1> ; DI Points to information record for this arg 2745 <1> ; Exit SS bits stored in [di+OPRND.index] 2746 <1> ; Uses DL 2747 <1> aaconvindex: 2748 000013E0 80F901 <1> cmp cl, 1 2749 000013E3 7517 <1> jne aacv1 ; if the number is too large 2750 000013E5 80FB01 <1> cmp bl, 1 2751 000013E8 7414 <1> je aacv2 ; if 1 2752 000013EA 42 <1> inc dx 2753 000013EB 80FB02 <1> cmp bl, 2 2754 000013EE 740E <1> je aacv2 ; if 2 2755 000013F0 42 <1> inc dx 2756 000013F1 80FB04 <1> cmp bl, 4 2757 000013F4 7408 <1> je aacv2 ; if 4 2758 000013F6 42 <1> inc dx 2759 000013F7 80FB08 <1> cmp bl, 8 2760 000013FA 7402 <1> je aacv2 ; if 8 2761 <1> aacv1: 2762 000013FC EBDF <1> jmp short aag7 ; error 2763 <1> 2764 <1> aacv2: 2765 000013FE 885506 <1> mov byte [di+OPRND.index], dl ; save the value 2766 00001401 C3 <1> retn 2767 <1> 2768 <1> ; AAGETREG - Get register for the assembler. 2769 <1> ; 2770 <1> ; Entry DI Start of register table 2771 <1> ; CX Length of register table (or 0) 2772 <1> ; SI Address of first character in register name 2773 <1> ; Exit NC if a register was found, 2774 <1> ; SI Updated if a register was found 2775 <1> ; BX Register number, defined as in the table below 2776 <1> ; Uses AX, CX, DI 2777 <1> ; 2778 <1> ; Exit value of BX: 2779 <1> ; DI = rgnam816, CX = 27 DI = rgnam16, CX = 8 2780 <1> ; ---------------------- -------------------- 2781 <1> ; 0 .. 7: AL .. BH 0 .. 7: AX .. DI 2782 <1> ; 8 .. 15: AX .. DI 2783 <1> ; 16 .. 23: EAX..EDI 16 .. 23: EAX..EDI 2784 <1> ; 24 .. 29: ES .. GS 2785 <1> ; 30 .. 34: ST .. TR 2786 <1> ; (This has to match the REG_ equs defined in uu.asm 2787 <1> ; around rgnam816 and following.) 2788 <1> aagetreg: 2789 00001402 8B04 <1> mov ax, word [si] 2790 00001404 25DFDF <1> and ax, TOUPPER_W ; convert to upper case 2791 00001407 3C45 <1> cmp al, 'E' ; check for EAX, etc. 2792 00001409 7522 <1> jne aagr1 ; if not 'E' --> (NZ) 2793 0000140B 50 <1> push ax 2794 0000140C 88E0 <1> mov al, ah 2795 0000140E 8A6402 <1> mov ah, byte [si+2] 2796 00001411 80E4DF <1> and ah, TOUPPER 2797 00001414 57 <1> push di 2798 00001415 BF[E649] <1> mov di, rgnam16 2799 00001418 51 <1> push cx 2800 00001419 B90800 <1> mov cx, N_REGS16 2801 0000141C F2AF <1> repne scasw 2802 0000141E 89CB <1> mov bx, cx 2803 00001420 59 <1> pop cx 2804 00001421 5F <1> pop di 2805 00001422 58 <1> pop ax 2806 00001423 7508 <1> jne aagr1 ; if no match --> (NZ) 2807 00001425 46 <1> inc si 2808 00001426 F7D3 <1> not bx 2809 00001428 80C318 <1> add bl, 8+16 ; adjust BX 2810 0000142B EB11 <1> jmp short aagr2 ; finish up 2811 <1> 2812 <1> aagr1: ; (entered with NZ) 2813 0000142D 89CB <1> mov bx, cx ; (if cx = 0, this is always reached with 2814 0000142F F2AF <1> repne scasw ; ZF clear, that is, NZ) 2815 00001431 750F <1> jne aagr3 ; if no match 2816 00001433 29CB <1> sub bx, cx 2817 00001435 4B <1> dec bx 2818 00001436 80FB10 <1> cmp bl, 16 2819 00001439 7203 <1> jb aagr2 ; if AL .. BH or AX .. DI 2820 0000143B 80C308 <1> add bl, 8 2821 <1> aagr2: 2822 0000143E 46 <1> inc si ; skip the register name 2823 0000143F 46 <1> inc si 2824 00001440 F8 <1> clc 2825 00001441 C3 <1> retn 2826 <1> aagr3: 2827 00001442 F9 <1> stc ; not found 2828 00001443 C3 <1> retn 2829 <1> 2830 <1> ..@aa_access_end: 2923 %include "dd.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug D commands - Dump data 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 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> %if _DHIGHLIGHT 19 <1> usesection lDEBUG_DATA_ENTRY 20 <1> align 2, db 0 21 <1> dd_h_number: dw 0 22 <1> dd_h_text: dw 0 23 <1> %endif 24 <1> 25 <1> %if _DNUM 26 <1> usesection lDEBUG_DATA_ENTRY 27 <1> align 4, db 0 28 00004238 0000 <1> ddoffset: dw 0 ; offset word for dd 29 <1> ; (number of skipped bytes at start of line) 30 <1> %if _PM 31 <1> dw 0 ; high word initialised to and fixed at zero 32 <1> %endif 33 0000423A 0000 <1> ddskipped: dw 0 34 <1> %if _PM 35 <1> dw 0 ; high word initialised to and fixed at zero 36 <1> %endif 37 0000423C 0100 <1> ddsize: dw 1 ; size of dd item 38 0000423E 00 <1> ddoffset2: db 0 39 <1> %endif 40 <1> 41 <1> usesection lDEBUG_DATA_ENTRY 42 0000423F FF <1> dd_text_and: db 0FFh 43 <1> 44 <1> 45 <1> usesection lDEBUG_CODE 46 <1> 47 <1> ..@dd_access_start: 48 <1> 49 <1> ; D command - hex/ASCII dump. 50 <1> ddd: 51 <1> %if _DTOP 52 00001444 8026[E600]7F <1> clropt [internalflags6], dif6_cpdepchars 53 <1> %endif 54 <1> %if _INT || _PM || _MCB || _DSTRINGS || 1 55 00001449 E82285 <1> call uppercase 56 <1> %endif 57 0000144C 86C4 <1> xchg al, ah 58 0000144E 8A44FE <1> mov al, byte [si - 2] 59 00001451 E81A85 <1> call uppercase 60 00001454 3C44 <1> cmp al, 'D' 61 00001456 86C4 <1> xchg al, ah 62 00001458 7403E99A00 <1> jne .not_d_suffix 63 <1> %if _DSTRINGS 64 0000145D 3C5A <1> cmp al, 'Z' ; DZ command ? 65 0000145F 7503E9DC03 <1> je dz ; yes --> 66 00001464 3C24 <1> cmp al, '$' ; D$ command ? 67 00001466 7503E9AE03 <1> je dcpm ; yes --> 68 0000146B 3C23 <1> cmp al, '#' ; D# command ? 69 0000146D 7503E9C103 <1> je dcounted ; yes --> 70 00001472 3C57 <1> cmp al, 'W' 71 00001474 750B <1> jne .notstring 72 00001476 50 <1> push ax 73 00001477 AC <1> lodsb 74 00001478 3C23 <1> cmp al, '#' ; DW# command ? 75 0000147A 58 <1> pop ax 76 0000147B 7503E9A603 <1> je dwcounted ; yes --> 77 00001480 4E <1> dec si 78 <1> .notstring: 79 <1> %endif 80 <1> %if _INT 81 00001481 3C49 <1> cmp al, 'I' ; DI command ? 82 00001483 750D <1> jne .notdi 83 <1> %if 1 84 00001485 50 <1> push ax 85 00001486 AC <1> lodsb 86 00001487 4E <1> dec si 87 00001488 24DF <1> and al, TOUPPER 88 0000148A 3C50 <1> cmp al, 'P' ; distinguish 'di ...' and 'd ip' 89 0000148C 58 <1> pop ax 90 0000148D 7403 <1> je .notdi 91 <1> %endif 92 0000148F E95904 <1> jmp gateout ; yes --> 93 <1> .notdi: 94 <1> %endif 95 <1> %if _PM 96 <1> cmp al, 'L' ; DL command ? 97 <1> jne .notdl 98 <1> jmp descout ; yes --> 99 <1> .notdl: 100 <1> cmp al, 'X' ; DX command ? 101 <1> _386 je extmem ; yes --> 102 <1> .notdx: 103 <1> cmp al, '.' 104 <1> je descsubcommand 105 <1> %endif 106 <1> %if _MCB 107 00001492 3C4D <1> cmp al, 'M' ; DM command ? 108 00001494 7503 <1> jne .notdm 109 00001496 E9160A <1> jmp mcbout ; yes --> 110 <1> .notdm: 111 <1> %endif 112 <1> %if _DT 113 00001499 3C54 <1> cmp al, 'T' 114 0000149B 7508 <1> jne @F 115 <1> %if _DTOP 116 0000149D E83F00 <1> call .handletop0 117 000014A0 7458 <1> je .d_top 118 <1> %endif 119 000014A2 E9020C <1> jmp dumptable 120 <1> @@: 121 <1> %endif 122 <1> %if _DNUM 123 000014A5 B90100 <1> mov cx, 1 124 000014A8 3C42 <1> cmp al, 'B' 125 000014AA 7424 <1> je .d_suffix_size 126 000014AC 41 <1> inc cx ; = 2 127 000014AD 3C57 <1> cmp al, 'W' 128 000014AF 741F <1> je .d_suffix_size 129 000014B1 41 <1> inc cx 130 000014B2 41 <1> inc cx ; = 4 131 000014B3 3C44 <1> cmp al, 'D' 132 000014B5 7540 <1> jne .not_d_suffix 133 <1> %if 1 134 000014B7 50 <1> push ax 135 000014B8 56 <1> push si 136 000014B9 AC <1> lodsb 137 000014BA 24DF <1> and al, TOUPPER 138 000014BC 3C49 <1> cmp al, 'I' ; possibly "D DI" ? 139 000014BE 7408 <1> je .check_dd_separator 140 000014C0 3C58 <1> cmp al, 'X' ; possibly "D DX" ? 141 000014C2 7404 <1> je .check_dd_separator 142 000014C4 3C53 <1> cmp al, 'S' ; possibly "D DS" ? 143 000014C6 7504 <1> jne .check_dd_no_if_ZR ; no, --> NZ 144 <1> .check_dd_separator: 145 000014C8 AC <1> lodsb ; load next text 146 000014C9 E86C74 <1> nearcall isseparator? ; if a separator then cannot be valid "DD" 147 <1> .check_dd_no_if_ZR: 148 000014CC 5E <1> pop si 149 000014CD 58 <1> pop ax 150 000014CE 7427 <1> je .not_d_suffix 151 <1> %endif 152 <1> .d_suffix_size: 153 000014D0 880E[3C42] <1> mov byte [ddsize], cl 154 <1> %if _DTOP 155 000014D4 E80700 <1> call .handletop 156 <1> %else 157 <1> call skipwhite 158 <1> %endif 159 000014D7 E8B084 <1> call iseol? 160 000014DA 755C <1> jne dd1 ; jump to getting range --> (with new size) 161 000014DC EB21 <1> jmp lastddd ; default range (ADS:ADO length 128), 162 <1> ; but with new size --> 163 <1> %endif 164 <1> 165 <1> %if _DTOP 166 <1> .handletop: 167 000014DE AC <1> lodsb 168 <1> .handletop0: 169 000014DF E8CF84 <1> call skipcomm0 170 000014E2 4E <1> dec si 171 000014E3 BA[8C1E] <1> mov dx, msg.top 172 000014E6 E83784 <1> call isstring? 173 000014E9 AC <1> lodsb 174 000014EA 750A <1> jne @F ; --> NZ 175 000014EC E8C284 <1> call skipcomm0 176 000014EF 800E[E600]80 <1> setopt [internalflags6], dif6_cpdepchars 177 <1> %if _DT 178 000014F4 38C0 <1> cmp al, al ; ZR 179 <1> %endif 180 <1> @@: 181 000014F6 C3 <1> retn 182 <1> %endif 183 <1> 184 <1> .not_d_suffix: 185 <1> %if _DTOP 186 000014F7 E8E5FF <1> call .handletop0 187 <1> %else 188 <1> call skipwh0 189 <1> %endif 190 <1> .d_top: 191 000014FA E88D84 <1> call iseol? 192 <1> %if _DNUM 193 000014FD 7534 <1> jne dd1_bytes ; if an address was given --> (set byte size) 194 <1> %else 195 <1> jne dd1 196 <1> %endif 197 <1> 198 <1> lastddd: 199 <1> _386_PM xor eax, eax 200 000014FF A1[5A0B] <1> mov ax, word [dd_default_lines] 201 <1> ; default length in lines, if nonzero 202 00001502 85C0 <1> test ax, ax 203 00001504 7409 <1> jz @F 204 00001506 7828 <1> js short .error 205 00001508 A3[C40B] <1> mov word [getrange_lines], ax 206 0000150B 31C0 <1> xor ax, ax 207 0000150D EB0E <1> jmp @FF 208 <1> 209 <1> @@: 210 0000150F C706[C40B]0080 <1> mov word [getrange_lines], 8000h 211 00001515 A1[580B] <1> mov ax, word [dd_default_length] 212 00001518 85C0 <1> test ax, ax 213 0000151A 7414 <1> jz short .error 214 0000151C 48 <1> dec ax 215 <1> @@: 216 <1> ; byte [ddsize] = size already set 217 <1> _386_PM_o32 ; mov edx, dword [d_addr] 218 0000151D 8B16[780B] <1> mov dx, word [d_addr] ; compute range of 80h or until end of segment 219 <1> _386_PM_o32 ; mov esi, edx 220 00001521 89D6 <1> mov si, dx 221 00001523 8B1E[7C0B] <1> mov bx, [d_addr + saSegSel] 222 <1> _386_PM call test_high_limit 223 <1> _386_PM jnz .32 224 00001527 01C2 <1> add dx, ax 225 00001529 732D <1> jnc dd2_0 226 0000152B 83CAFF <1> or dx, byte -1 227 0000152E EB28 <1> jmp short dd2_0 228 <1> 229 <1> .error: 230 00001530 E92A6D <1> jmp error 231 <1> 232 <1> %if _PM 233 <1> [cpu 386] 234 <1> .32: 235 <1> add edx, eax 236 <1> jnc dd2_0 ; if no overflow 237 <1> or edx, byte -1 238 <1> jmp short dd2_0 239 <1> __CPU__ 240 <1> %endif 241 <1> 242 <1> %if _DNUM 243 <1> dd1_bytes: 244 00001533 C606[3C42]01 <1> mov byte [ddsize], 1 245 <1> %endif 246 <1> dd1: 247 00001538 8B0E[580B] <1> mov cx, word [dd_default_length] 248 <1> ; default length (128 bytes) 249 0000153C 8B3E[5A0B] <1> mov di, word [dd_default_lines] 250 <1> ; default length in lines, if nonzero 251 00001540 8B1E[C40C] <1> mov bx, word [reg_ds] 252 00001544 C706[C40B]0080 <1> mov word [getrange_lines], 8000h 253 0000154A E85471 <1> nearcall getrangeX.lines ; get address range into bx:(e)dx 254 <1> 255 0000154D E84F84 <1> call chkeol ; expect end of line here 256 <1> 257 00001550 891E[7C0B] <1> mov word [d_addr + saSegSel], bx 258 <1> ; save segment (offset is saved later) 259 <1> %if _PM 260 <1> call ispm 261 <1> jnz .86m 262 <1> .pm: 263 <1> mov word [d_addr + saSelector], bx 264 <1> jmp @F 265 <1> .86m: 266 <1> mov word [d_addr + saSegment], bx 267 <1> @@: 268 <1> %endif 269 <1> _386_PM_o32 ; mov esi, edx 270 00001554 89D6 <1> mov si, dx ; bx:(e)si = start 271 <1> _386_PM_o32 ; mov edx, ecx 272 00001556 89CA <1> mov dx, cx ; bx:(e)dx = last 273 <1> %if _PM && 0 274 <1> jmp short dd2_1 275 <1> %endif 276 <1> 277 <1> ; Parsing is done. Print first line. 278 <1> dd2_0: 279 00001558 F606[C50B]80 <1> testopt [getrange_lines], 8000h 280 0000155D 7503 <1> jnz .notlines 281 0000155F E8D800 <1> call dd_get_one_line_range 282 <1> 283 <1> .notlines: 284 <1> %if _PM 285 <1> call ispm 286 <1> jnz dd2_1 287 <1> [cpu 286] 288 <1> verr bx ; readable ? 289 <1> __CPU__ 290 <1> jz dd2_1 291 <1> %if 1 292 <1> mov dx, .errmsg 293 <1> jmp putsz_error 294 <1> usesection lDEBUG_DATA_ENTRY 295 <1> .errmsg:asciz "Segment is not readable.",13,10 296 <1> usesection lDEBUG_CODE 297 <1> %else 298 <1> mov bx, word [reg_ds] 299 <1> mov word [d_addr + saSegSel], bx 300 <1> %if _PM 301 <1> call ispm 302 <1> jnz .86m 303 <1> .pm: 304 <1> mov word [d_addr + saSelector], bx 305 <1> jmp @F 306 <1> .86m: 307 <1> mov word [d_addr + saSegment], bx 308 <1> @@: 309 <1> %endif 310 <1> %endif 311 <1> dd2_1: 312 <1> %endif 313 <1> 314 <1> %if _DNUM 315 00001562 A1[3C42] <1> mov ax, word [ddsize] 316 00001565 48 <1> dec ax ; 0 = byte, 1 = word, 3 = dword 317 00001566 21F0 <1> and ax, si ; how many bytes to skip at the beginning 318 00001568 A2[3E42] <1> mov byte [ddoffset2], al 319 <1> %endif 320 <1> 321 0000156B B80100 <1> mov ax, opt2_db_header 322 <1> %if _DNUM 323 0000156E 803E[3C42]02 <1> cmp byte [ddsize], 2 324 00001573 7207 <1> jb @F 325 00001575 B010 <1> mov al, opt2_dw_header 326 00001577 7403 <1> je @F 327 00001579 B80001 <1> mov ax, opt2_dd_header 328 <1> @@: 329 <1> %endif 330 0000157C E82800 <1> call dd_header_or_trailer 331 <1> 332 <1> 333 <1> dd_loop_line: 334 <1> %if _SYMBOLIC 335 <1> dd_with_sym: 336 <1> lframe near 337 <1> lvar dword, startlinear 338 <1> lvar dword, endlinear 339 <1> lvar word, sym_index 340 <1> lvar word, sym_count 341 <1> lenter 342 <1> xor ax, ax 343 <1> lvar dword, offset 344 <1> push ax ; (zero-initialise high word) 345 <1> push ax 346 <1> lvar dword, adjust 347 <1> push ax ; (zero-initialise high word) 348 <1> push ax ; (zero-initialise offset (low) word) 349 <1> 350 <1> _386_PM_o32 351 <1> mov word [bp + ?offset], si 352 <1> 353 <1> push bx 354 <1> _386_PM_o32 355 <1> push si 356 <1> _386_PM_o32 357 <1> push dx 358 <1> 359 <1> testopt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 360 <1> jnz .justdisplay 361 <1> 362 <1> _386_PM_o32 363 <1> xchg dx, si ; bx:(e)dx = start address, bx:(e)si = end 364 <1> call getlinear_32bit ; dx:ax = start linear 365 <1> jc .justdisplay 366 <1> 367 <1> mov word [bp + ?startlinear + 2], dx 368 <1> mov word [bp + ?startlinear], ax 369 <1> push dx 370 <1> push ax 371 <1> 372 <1> _386_PM_o32 373 <1> xchg dx, si ; bx:(e)dx = end address 374 <1> call getlinear_32bit ; dx:ax = end linear 375 <1> 376 <1> mov word [bp + ?endlinear + 2], dx 377 <1> mov word [bp + ?endlinear], ax 378 <1> pop bx 379 <1> pop cx ; cx:bx = start linear 380 <1> jc .justdisplay 381 <1> 382 <1> xchg ax, bx 383 <1> xchg dx, cx ; cx:bx = end linear, dx:ax = start linear 384 <1> 385 <1> nearcall binsearchmain ; es:di -> first entry, cx = number, bx = index 386 <1> mov word [bp + ?sym_index], bx 387 <1> test cx, cx 388 <1> jz .justdisplay 389 <1> 390 <1> _386_PM_o32 391 <1> pop dx 392 <1> _386_PM_o32 393 <1> pop si 394 <1> pop bx 395 <1> 396 <1> .loop: 397 <1> mov word [bp + ?sym_count], cx 398 <1> 399 <1> .loop_no_cx: 400 <1> push word [bp + ?sym_index] 401 <1> push ax ; (reserve space, uninitialised) 402 <1> dualcall getfarpointer.main 403 <1> pop di 404 <1> pop es 405 <1> 406 <1> mov bx, word [bp + ?adjust + 2] 407 <1> mov cx, word [bp + ?adjust] 408 <1> ; bx:cx = adjust 409 <1> 410 <1> add cx, word [bp + ?startlinear] 411 <1> adc bx, word [bp + ?startlinear + 2] 412 <1> ; bx:cx = adjust + start linear (adjust linear) 413 <1> 414 <1> neg bx 415 <1> neg cx 416 <1> sbb bx, byte 0 ; neg bx:cx 417 <1> 418 <1> add cx, word [es:di + smLinear] 419 <1> adc bx, word [es:di + smLinear + 2] 420 <1> ; bx:cx = next linear - adjust linear 421 <1> ; bx:cx = how far from adjust linear to next 422 <1> 423 <1> test bx, bx ; is there a chunk of ddsize at least ? 424 <1> jnz .chunk 425 <1> %if _DNUM 426 <1> cmp cx, [ddsize] 427 <1> %else 428 <1> cmp cx, 1 429 <1> %endif 430 <1> jae .chunk ; yes, display a chunk --> 431 <1> 432 <1> _386_PM and ecx, 0FFFFh 433 <1> _386_PM_o32 434 <1> push si 435 <1> _386_PM_o32 436 <1> add si, cx 437 <1> push ss 438 <1> pop es 439 <1> mov di, line_out 440 <1> call dd_display_offset 441 <1> 442 <1> testopt [options], dd_no_blanks_sym 443 <1> jnz @FF 444 <1> 445 <1> pop ax ; ax = original si value 446 <1> push ax 447 <1> 448 <1> push si 449 <1> mov si, ax 450 <1> %if _DNUM 451 <1> mov cx, word [ddsize] 452 <1> %else 453 <1> mov cx, 1 454 <1> %endif 455 <1> mov ax, cx 456 <1> dec cx 457 <1> and cx, si ; how many bytes to skip at the beginning 458 <1> sub si, cx ; = offset after skipped to first displayed 459 <1> add cx, cx ; how many digits to skip at the beginning 460 <1> and si, 0Fh ; = offset in single line 461 <1> add ax, ax ; = 8 for dword, 4 for word, 2 for byte 462 <1> inc ax ; = 9 for dword, 5 for word, 3 for byte 463 <1> db __TEST_IMM16 ; (skip add in first iteration) 464 <1> @@: 465 <1> add cx, ax ; (in subsequent iterations:) add blanks 466 <1> %if _DNUM 467 <1> sub si, word [ddsize] ; still a whole unit to add ? (subtract it) 468 <1> %else 469 <1> sub si, 1 470 <1> %endif 471 <1> jae @B ; yes --> 472 <1> ; cx = number of blanks to skip 473 <1> mov al, 32 474 <1> rep stosb ; store blanks for each byte 475 <1> pop si 476 <1> @@: 477 <1> 478 <1> push dx 479 <1> call putsline ; puts offset + blanks 480 <1> 481 <1> push word [bp + ?sym_index] 482 <1> dualcall displaystring ; puts symbol label 483 <1> 484 <1> push word [bp + ?sym_index] 485 <1> push ax 486 <1> dualcall getfarpointer.main 487 <1> pop di 488 <1> pop es 489 <1> xor dx, dx 490 <1> _386_PM call test_high_limit ; 32-bit segment ? 491 <1> _386_PM jz .16 ; no --> (don't display zero high word) 492 <1> _386_PM push esi 493 <1> _386_PM pop si 494 <1> _386_PM pop dx 495 <1> .16: 496 <1> cmp dx, word [es:di + smOffset + 2] 497 <1> mov dx, msg.dd_after_symbol.non_wrt 498 <1> jne .wrt 499 <1> cmp si, word [es:di + smOffset] 500 <1> je .non_wrt 501 <1> .wrt: 502 <1> mov dx, msg.dd_after_symbol.1_wrt 503 <1> call disp_message 504 <1> 505 <1> mov ax, word [d_addr + 4] 506 <1> push ss 507 <1> pop es 508 <1> mov di, line_out 509 <1> call hexword 510 <1> push bx 511 <1> push cx 512 <1> call putsline 513 <1> pop cx 514 <1> pop bx 515 <1> 516 <1> mov dx, msg.dd_after_symbol.2_wrt 517 <1> .non_wrt: 518 <1> call disp_message ; puts after 519 <1> pop dx 520 <1> 521 <1> _386_PM_o32 522 <1> pop si 523 <1> 524 <1> inc word [bp + ?sym_index] 525 <1> ; point to next symbol's SYMMAIN (if any) 526 <1> mov cx, word [bp + ?sym_count] 527 <1> loop .j_loop ; loop if any more to go 528 <1> jmp .justdisplay_no_pop ; if none, just display remainder --> 529 <1> 530 <1> 531 <1> .j_loop: 532 <1> jmp .loop 533 <1> 534 <1> 535 <1> ; Display a chunk. 536 <1> ; 537 <1> ; INP: (e)si = start offset to display 538 <1> ; (e)dx = end offset to display 539 <1> ; bx:cx = how far from adjust linear to next 540 <1> ; (there is always a next symbol if we are here) 541 <1> .chunk: 542 <1> %if _DNUM 543 <1> mov ax, word [ddsize] 544 <1> dec ax 545 <1> not ax 546 <1> and cx, ax 547 <1> %endif 548 <1> 549 <1> add word [bp + ?adjust], cx 550 <1> adc word [bp + ?adjust + 2], bx 551 <1> 552 <1> _386_PM push word [bp + ?adjust + 2] 553 <1> _386_PM push ax 554 <1> _386_PM pop eax 555 <1> mov ax, word [bp + ?adjust] 556 <1> ; (e)ax = adjust 557 <1> _386_PM_o32 558 <1> dec ax ; (e)ax = adjust - 1 559 <1> 560 <1> ; have: (e)si = prior start offset, (e)dx = end offset 561 <1> ; want: (e)si = unchanged, (e)dx = intermediate end offset, 562 <1> ; preserve intermediate start offset, stack = end offset 563 <1> _386_PM_o32 564 <1> push dx ; stack := end offset 565 <1> _386_PM_o32 566 <1> mov dx, word [bp + ?offset] 567 <1> ; (e)dx := start offset 568 <1> _386_PM_o32 569 <1> add dx, ax ; (e)dx := intermediate end offset 570 <1> 571 <1> call dd_display ; display, (e)dx := intermediate start offset 572 <1> 573 <1> ; have: (e)si scrambled, (e)dx = intermediate start offset, 574 <1> ; stack = end offset 575 <1> ; want: (e)si = intermediate start offset, (e)dx = end offset 576 <1> _386_PM_o32 577 <1> mov si, dx ; (e)si := intermediate start offset 578 <1> _386_PM_o32 579 <1> pop dx ; (e)dx := end offset 580 <1> jmp .loop_no_cx 581 <1> 582 <1> .justdisplay: 583 <1> _386_PM_o32 584 <1> pop dx 585 <1> _386_PM_o32 586 <1> pop si 587 <1> pop bx 588 <1> 589 <1> .justdisplay_no_pop: 590 <1> lleave 591 <1> %endif 592 <1> 593 0000157F E8D500 <1> call dd_display 594 <1> 595 00001582 F606[C50B]80 <1> testopt [getrange_lines], 8000h 596 00001587 750D <1> jnz .notlines 597 00001589 FF0E[C40B] <1> dec word [getrange_lines] 598 0000158D 7407 <1> jz .linesdone 599 <1> _386_PM_o32 600 0000158F 89D6 <1> mov si, dx ; = new start offset 601 00001591 E8A600 <1> call dd_get_one_line_range 602 <1> ; get a new end offset 603 00001594 EBE9 <1> jmp dd_loop_line 604 <1> 605 <1> .linesdone: 606 <1> .notlines: 607 00001596 B80200 <1> mov ax, opt2_db_trailer 608 <1> %if _DNUM 609 00001599 803E[3C42]02 <1> cmp byte [ddsize], 2 610 0000159E 7207 <1> jb @F 611 000015A0 B020 <1> mov al, opt2_dw_trailer 612 000015A2 7403 <1> je @F 613 000015A4 B80002 <1> mov ax, opt2_dd_trailer 614 <1> %endif 615 <1> @@: 616 <1> ; fall through 617 <1> 618 <1> 619 <1> ; INP: ax = flag value to check 620 <1> ; (determines whether "header" or "trailer" is written, 621 <1> ; and which flag must be set in word [options2]) 622 <1> ; byte [ddoffset2] = how many bytes to skip at the start 623 <1> ; bx = segment/selector 624 <1> ; CHG: ax, cx, di 625 <1> ; STT: ds = es = ss 626 <1> dd_header_or_trailer: 627 000015A7 8506[A400] <1> test word [options2], ax 628 000015AB 7503E98900 <1> jz .ret 629 000015B0 53 <1> push bx 630 000015B1 56 <1> push si 631 000015B2 52 <1> push dx 632 <1> 633 000015B3 BF[B40A] <1> mov di, line_out 634 <1> %if _40COLUMNS 635 000015B6 F606[B500]10 <1> testopt [options6], opt6_40_columns 636 000015BB 740D <1> jz @F 637 000015BD 89D8 <1> mov ax, bx 638 000015BF E8C884 <1> call hexword 639 000015C2 B03A <1> mov al, ':' 640 000015C4 AA <1> stosb 641 <1> %if _PM 642 <1> mov cx, -5 643 <1> mov ax, 4 + 2 644 <1> call test_high_limit ; 32-bit segment ? 645 <1> jz .add ; no --> 646 <1> mov al, 8 + 2 647 <1> jmp .add 648 <1> %else 649 000015C5 B90100 <1> mov cx, 1 650 000015C8 EB1B <1> jmp .blank 651 <1> %endif 652 <1> @@: 653 <1> %endif 654 <1> 655 000015CA B90600 <1> mov cx, msg.header.length 656 000015CD BA[0C21] <1> mov dx, msg.header 657 000015D0 A91101 <1> test ax, opt2_db_header | opt2_dw_header | opt2_dd_header 658 000015D3 7506 <1> jnz @F 659 000015D5 B90700 <1> mov cx, msg.trailer.length 660 000015D8 BA[1321] <1> mov dx, msg.trailer 661 <1> @@: 662 000015DB E8D589 <1> call putsz ; put initial word 663 000015DE F7D9 <1> neg cx ; minus length of initial word 664 000015E0 B80B00 <1> mov ax, 4 + 1 + 4 + 2 ; length of address with 16-bit offset 665 <1> %if _PM 666 <1> ; mov bx, word [d_addr + saSegSel] 667 <1> call test_high_limit ; 32-bit segment ? 668 <1> jz .16 ; no --> 669 <1> mov al, 4 + 1 + 8 + 2 ; length of address with 32-bit offset 670 <1> .16: 671 <1> %endif 672 <1> .add: 673 000015E3 01C1 <1> add cx, ax ; length of address minus length of word 674 <1> ; = length to pad 675 <1> .blank: 676 000015E5 B020 <1> mov al, 32 677 000015E7 F3AA <1> rep stosb ; pad 678 <1> ; ch = 0 679 <1> 680 000015E9 B83020 <1> mov ax, '0 ' ; al = '0', ah = blank 681 <1> %if _DNUM 682 000015EC 8A0E[3E42] <1> mov cl, byte [ddoffset2]; cx = ddoffset2 683 000015F0 E304 <1> jcxz @FF ; if none to skip --> 684 <1> @@: 685 000015F2 AB <1> stosw 686 000015F3 40 <1> inc ax ; increment the number (up to '3') 687 000015F4 E2FC <1> loop @B ; loop for skipping --> 688 <1> @@: 689 <1> %endif 690 000015F6 2C30 <1> sub al, '0' ; = back to numerical (0 .. 3) 691 000015F8 89C2 <1> mov dx, ax ; dl = numerical offset 692 <1> 693 000015FA 52 <1> push dx 694 <1> %if _DNUM 695 000015FB 8B1E[3C42] <1> mov bx, [ddsize] ; ddsize 696 <1> %else 697 <1> mov bx, 1 698 <1> %endif 699 000015FF BE1000 <1> mov si, 16 ; loop counter 700 <1> %if _40COLUMNS 701 00001602 F606[B500]10 <1> testopt [options6], opt6_40_columns 702 00001607 7402 <1> jz @F 703 00001609 D1EE <1> shr si, 1 704 <1> %endif 705 <1> @@: 706 0000160B 88D0 <1> mov al, dl ; next numerical offset 707 0000160D E88C84 <1> call hexnyb ; display it 708 <1> %if _DNUM 709 00001610 89D9 <1> mov cx, bx 710 00001612 01C9 <1> add cx, cx ; cx = 2 * ddsize 711 00001614 B020 <1> mov al, 32 712 00001616 F3AA <1> rep stosb ; pad to next position 713 <1> %else 714 <1> mov al, 32 715 <1> stosb 716 <1> stosb 717 <1> %endif 718 00001618 01DA <1> add dx, bx ; increment dl by how many positions we use 719 0000161A 29DE <1> sub si, bx ; decrement loop counter 720 0000161C 77ED <1> ja @B ; don't jump if si was below-or-equal-to bx 721 0000161E 5A <1> pop dx 722 <1> 723 0000161F B91000 <1> mov cx, 16 ; loop counter 724 <1> %if _40COLUMNS 725 00001622 F606[B500]10 <1> testopt [options6], opt6_40_columns 726 00001627 7402 <1> jz @F 727 00001629 D1E9 <1> shr cx, 1 728 <1> %endif 729 <1> @@: 730 0000162B 88D0 <1> mov al, dl 731 0000162D E86C84 <1> call hexnyb ; display an offset 732 <1> ; Note that this will wrap around for the last 1, 2, or 3 733 <1> ; characters if byte [ddoffset2] is non-zero. 734 00001630 42 <1> inc dx ; increment offset 735 00001631 E2F8 <1> loop @B ; loop 736 <1> 737 00001633 E88D84 <1> call putsline_crlf 738 <1> 739 00001636 5A <1> pop dx 740 00001637 5E <1> pop si 741 00001638 5B <1> pop bx 742 <1> .ret: 743 00001639 C3 <1> retn 744 <1> 745 <1> 746 <1> ; INP: (e)si = start 747 <1> ; word [ddsize] = size of element, 1 or 2 or 4 748 <1> ; OUT: (e)dx = end 749 <1> dd_get_one_line_range: 750 <1> _386_PM_o32 751 0000163A 89F2 <1> mov dx, si 752 <1> %if _DNUM 753 <1> _386_PM xor eax, eax 754 0000163C A1[3C42] <1> mov ax, word [ddsize] 755 0000163F 48 <1> dec ax 756 00001640 21F0 <1> and ax, si 757 <1> %else 758 <1> _386_PM_o32 759 <1> xor ax, ax 760 <1> %endif 761 <1> %if _40COLUMNS 762 00001642 80CA07 <1> or dl, 7 763 00001645 F606[B500]10 <1> testopt [options6], opt6_40_columns 764 0000164A 7503 <1> jnz @F 765 <1> %endif 766 0000164C 80CA0F <1> or dl, 15 767 <1> @@: 768 <1> 769 <1> %if _PM 770 <1> push bx 771 <1> mov bx, word [d_addr + saSegSel] 772 <1> call test_high_limit ; 32-bit segment ? 773 <1> pop bx 774 <1> jz .16 ; no --> 775 <1> .32: 776 <1> _386_PM_o32 777 <1> add dx, ax 778 <1> jnc @F 779 <1> _386_PM_o32 780 <1> or dx, strict byte -1 781 <1> @@: 782 <1> retn 783 <1> .16: 784 <1> %endif 785 0000164F 01C2 <1> add dx, ax 786 00001651 7303 <1> jnc @F 787 00001653 83CAFF <1> or dx, strict byte -1 788 <1> @@: 789 00001656 C3 <1> retn 790 <1> 791 <1> 792 <1> ; INP: word [d_addr + saSegSel] = segment/selector to dump 793 <1> ; (e)si = start offset 794 <1> ; (e)dx = end offset 795 <1> ; if _DNUM: 796 <1> ; byte [ddsize] = 1, 2, or 4 (for byte, word, or dword) 797 <1> ; OUT: (d)word [d_addr] updated 798 <1> ; (e)dx = (d)word [d_addr] 799 <1> ; displayed 800 <1> dd_display: 801 00001657 16 <1> push ss 802 00001658 07 <1> pop es 803 <1> dd2_loop: 804 00001659 E8192D <1> call handle_serial_flags_ctrl_c 805 <1> 806 0000165C C706[020C][FF14] <1> mov word [lastcmd], lastddd 807 <1> 808 00001662 BF[B40A] <1> mov di, line_out ; reset di for next line 809 <1> %if _40COLUMNS 810 00001665 BBF0FF <1> mov bx, ~0Fh 811 00001668 F606[B500]10 <1> testopt [options6], opt6_40_columns 812 0000166D 7402 <1> jz @F 813 0000166F B3F8 <1> mov bl, ~7 814 <1> @@: 815 <1> %endif 816 00001671 E87201 <1> call dd_display_offset.masklownybble 817 <1> ; ax = offset & ~ 0Fh 818 <1> %if _40COLUMNS 819 00001674 89C3 <1> mov bx, ax 820 <1> %endif 821 <1> 822 <1> %if _DNUM 823 00001676 8B0E[3C42] <1> mov cx, word [ddsize] 824 0000167A 51 <1> push cx 825 0000167B 49 <1> dec cx ; 0 = byte, 1 = word, 3 = dword 826 0000167C 21F1 <1> and cx, si ; how many bytes to skip at the beginning 827 <1> ; eg: si = 101h, cx = 1, skip 1 byte, ax = 101h 828 <1> ; si = 102h, cx = 3, skip 2 bytes, ax = 102h 829 <1> ; si = 103h, cx = 3, skip 3 bytes, ax = 103h 830 <1> ; si = 103h, cx = 1, skip 1 byte, ax = 101h 831 <1> ; si = 10Fh, cx = 1, skip 1 byte, ax = 101h 832 <1> ; si = 10Fh, cx = 3, skip 3 bytes, ax = 103h 833 0000167E 01C8 <1> add ax, cx ; = where to start 834 00001680 890E[3842] <1> mov word [ddoffset], cx 835 <1> %endif 836 00001684 50 <1> push ax 837 00001685 B82020 <1> mov ax, 32 << 8 | 32 838 <1> %if _DNUM 839 00001688 F3AB <1> rep stosw 840 <1> %endif 841 <1> %if _40COLUMNS 842 0000168A F606[B500]10 <1> testopt [options6], opt6_40_columns 843 0000168F 740D <1> jz @F 844 00001691 F606[B500]20 <1> testopt [options6], opt6_40_indent_odd 845 00001696 7406 <1> jz @F 846 00001698 F6C308 <1> test bl, 8 847 0000169B 7401 <1> jz @F 848 0000169D AA <1> stosb 849 <1> @@: 850 <1> %endif 851 0000169E 58 <1> pop ax 852 <1> %if _DNUM 853 0000169F 59 <1> pop cx 854 <1> %else 855 <1> mov cx, 1 856 <1> %endif 857 <1> 858 000016A0 BB3000 <1> mov bx, (2+1)*16 ; 16 bytes (2 digits each) 859 <1> %if _DNUM 860 000016A3 80F902 <1> cmp cl, 2 861 000016A6 7206 <1> jb @F ; if it is 1 --> 862 000016A8 B328 <1> mov bl, (4+1)*8 ; 8 words (4 digits each) 863 000016AA 7402 <1> je @F ; if it is 2 --> 864 <1> ; it is 4 865 000016AC B324 <1> mov bl, (8+1)*4 ; 4 dwords (8 digits each) 866 <1> @@: 867 <1> %endif 868 <1> %if _40COLUMNS 869 000016AE F606[B500]10 <1> testopt [options6], opt6_40_columns 870 000016B3 7402 <1> jz @F 871 000016B5 D1EB <1> shr bx, 1 ; half as many items 872 <1> @@: 873 <1> %endif 874 000016B7 01FB <1> add bx, di 875 000016B9 E8466E <1> call prephack ; set up for faking int vectors 23 and 24 876 <1> 877 000016BC 50 <1> push ax 878 <1> ; blank the start of the line if offset isn't paragraph aligned 879 <1> dd3: 880 000016BD 39F0 <1> cmp ax, si ; skip to position in line 881 000016BF 7429 <1> je dd4 ; if we're there yet 882 000016C1 7718 <1> ja .error 883 <1> %if _DNUM 884 000016C3 50 <1> push ax 885 000016C4 B82020 <1> mov ax, 32 << 8| 32 886 000016C7 51 <1> push cx 887 000016C8 F3AB <1> rep stosw ; store two blanks (2 * 1) if byte, 888 <1> ; four blanks (2 * 2) if word, 889 <1> ; eight blanks (2 * 4) if dword 890 000016CA 59 <1> pop cx 891 000016CB AA <1> stosb ; store additional blank as separator 892 000016CC 51 <1> push cx 893 <1> @@: 894 000016CD 268807 <1> mov byte [es:bx], al 895 000016D0 43 <1> inc bx 896 000016D1 E2FA <1> loop @B ; store as many blanks in text dump as bytes 897 000016D3 59 <1> pop cx 898 000016D4 58 <1> pop ax 899 000016D5 0306[3C42] <1> add ax, word [ddsize] ; -> behind the byte/word/dword just written 900 <1> %else 901 <1> push ax 902 <1> mov ax, 32 << 8| 32 903 <1> stosw ; store two blanks 904 <1> stosb ; store additional blank as separator 905 <1> mov byte [es:bx], al ; store a blank in text dump 906 <1> inc bx 907 <1> pop ax 908 <1> inc ax ; -> behind the byte just written 909 <1> %endif 910 000016D9 EBE2 <1> jmp short dd3 911 <1> 912 <1> 913 <1> .error: 914 000016DB BA[4042] <1> mov dx, .msg_internal_error 915 000016DE E8CC88 <1> call putsz_error 916 000016E1 B80106 <1> mov ax, 0601h 917 000016E4 E8C26B <1> call setrc 918 000016E7 E916E9 <1> jmp cmd3 919 <1> 920 <1> usesection lDEBUG_DATA_ENTRY 921 <1> .msg_internal_error: 922 00004240 496E7465726E616C20- <1> asciz "Internal error in dd3.",13,10 922 00004249 6572726F7220696E20- <1> 922 00004252 6464332E0D0A00 <1> 923 <1> usesection lDEBUG_CODE 924 <1> 925 <1> 926 <1> ; Begin main loop over lines of output. 927 <1> dd4: 928 000016EA 58 <1> pop ax 929 <1> %if _40COLUMNS 930 <1> _386_PM_o32 ; xor ecx, ecx 931 000016EB 31C9 <1> xor cx, cx 932 000016ED B10F <1> mov cl, 0Fh 933 000016EF F606[B500]10 <1> testopt [options6], opt6_40_columns 934 000016F4 7402 <1> jz @F 935 000016F6 B107 <1> mov cl, 7 936 <1> @@: 937 <1> %if _PM 938 <1> push bx 939 <1> mov bx, word [d_addr + saSegSel] 940 <1> call test_high_limit ; 32-bit segment ? 941 <1> pop bx 942 <1> jz .16 ; no --> 943 <1> _386_PM_o32 ; add ecx, eax 944 <1> %endif 945 <1> .16: 946 000016F8 01C1 <1> add cx, ax 947 <1> %else 948 <1> _386_PM_o32 ; mov ecx, eax 949 <1> mov cx, ax 950 <1> %if _PM 951 <1> push bx 952 <1> mov bx, word [d_addr + saSegSel] 953 <1> call test_high_limit ; 32-bit segment ? 954 <1> pop bx 955 <1> jz .16 ; no --> 956 <1> _386_PM_o32 ; add ecx, strict byte 0Fh 957 <1> %endif 958 <1> .16: 959 <1> add cx, strict byte 0Fh 960 <1> %endif 961 000016FA 7204 <1> jc @F 962 <1> _386_PM_o32 ; cmp ecx, edx 963 000016FC 39D1 <1> cmp cx, dx ; compare with end address 964 000016FE 7202 <1> jb dd5 ; if we write to the end of the line --> 965 <1> @@: 966 <1> ;_386_PM_o32 ; mov ecx, edx 967 00001700 89D1 <1> mov cx, dx ; only write until (e)dx, inclusive 968 <1> dd5: 969 <1> ;_386_PM_o32 ; sub ecx, esi 970 00001702 29F1 <1> sub cx, si 971 <1> ;_386_PM_o32 ; inc ecx 972 00001704 41 <1> inc cx ; cx = number of bytes to print this line 973 <1> ; up to 16. no 32-bit register required 974 <1> %if _DNUM 975 00001705 8326[3A42]00 <1> and word [ddskipped], 0 976 <1> %endif 977 <1> 978 0000170A E81E6E <1> call dohack ; substitute interrupt vectors 979 <1> %if _DHIGHLIGHT 980 <1> mov word [dd_h_number], di 981 <1> mov word [dd_h_text], bx 982 <1> %endif 983 0000170D 8E1E[7C0B] <1> mov ds, word [d_addr + saSegSel] 984 <1> 985 <1> dd6: 986 <1> %if _DNUM 987 00001711 36A1[3C42] <1> mov ax, word [ss:ddsize] 988 00001715 39C8 <1> cmp ax, cx ; ddsize <= left bytes ? 989 00001717 7617 <1> jbe dd6_simple ; yes, display ddsize bytes --> 990 <1> 991 00001719 50 <1> push ax 992 0000171A 51 <1> push cx 993 0000171B 57 <1> push di 994 0000171C F7D9 <1> neg cx ; - left bytes 995 0000171E 01C1 <1> add cx, ax ; ddsize - left bytes = how many skipped 996 00001720 36890E[3A42] <1> mov word [ss:ddskipped], cx 997 <1> 998 00001725 89C1 <1> mov cx, ax ; 1 = bytes, 2 = words, 4 = dwords 999 00001727 49 <1> dec cx ; 0 = bytes, 1 = words, 3 = dwords 1000 00001728 B85858 <1> mov ax, 'XX' 1001 0000172B F3AB <1> rep stosw ; fill filler digits not to be written 1002 0000172D 5F <1> pop di 1003 0000172E 59 <1> pop cx 1004 0000172F 58 <1> pop ax 1005 <1> %endif 1006 <1> 1007 <1> dd6_simple: 1008 <1> %if _DNUM 1009 00001730 01C0 <1> add ax, ax ; 2 = bytes, 4 = words, 8 = dwords 1010 00001732 50 <1> push ax 1011 <1> @@: 1012 00001733 48 <1> dec ax 1013 00001734 48 <1> dec ax 1014 <1> ; first iteration: 0 = bytes, 2 = words, 6 = dwords 1015 <1> ; second iteration: 0 = words, 4 = dwords 1016 <1> ; third iteration: (0 = 3byte,) 2 = dwords 1017 <1> ; fourth iteration: 0 = dwords 1018 00001735 57 <1> push di 1019 00001736 01C7 <1> add di, ax ; -> where to write next 2 hex digits 1020 00001738 50 <1> push ax 1021 <1> %endif 1022 <1> _386_PM_a32 1023 00001739 AC <1> lodsb ; al = data 1024 0000173A E8B300 <1> call dd_store ; stores number at es:di->, char at es:bx-> 1025 <1> %if _DNUM 1026 0000173D 58 <1> pop ax 1027 0000173E 5F <1> pop di ; -> start of hex digits space 1028 0000173F 85C0 <1> test ax, ax ; did we write the left-most digits? 1029 00001741 E0F0 <1> loopnz @B ; not yet --> (or no more bytes to display) 1030 00001743 58 <1> pop ax ; = how many digits we wrote 1031 00001744 01C7 <1> add di, ax ; -> after right-most digit 1032 00001746 B020 <1> mov al, 32 1033 00001748 AA <1> stosb ; store a blank 1034 00001749 85C9 <1> test cx, cx 1035 0000174B 75C4 <1> jnz dd6 ; (16-bit. cx <= 16) 1036 <1> 1037 0000174D 16 <1> push ss ; restore ds 1038 0000174E 1F <1> pop ds 1039 <1> _386_PM_o32 1040 0000174F 2B36[3842] <1> sub si, word [ddoffset] 1041 <1> _386_PM_o32 1042 00001753 0336[3A42] <1> add si, word [ddskipped] 1043 <1> %else 1044 <1> mov al, 32 1045 <1> stosb ; store a blank 1046 <1> loop dd6 1047 <1> push ss ; restore ds 1048 <1> pop ds 1049 <1> %endif 1050 <1> 1051 <1> dd9: 1052 <1> %if _40COLUMNS 1053 00001757 B80F00 <1> mov ax, 0Fh 1054 0000175A F606[B500]10 <1> testopt [options6], opt6_40_columns 1055 0000175F 7402 <1> jz @F 1056 00001761 B007 <1> mov al, 7 1057 <1> @@: 1058 00001763 85C6 <1> test si, ax 1059 <1> %else 1060 <1> test si, 0Fh ; space out till end of line 1061 <1> %endif 1062 00001765 7417 <1> jz dd10 1063 <1> %if _DNUM 1064 <1> %if _40COLUMNS 1065 00001767 50 <1> push ax 1066 <1> %endif 1067 00001768 B82020 <1> mov ax, 32 << 8 | 32 1068 0000176B 8B0E[3C42] <1> mov cx, word [ddsize] 1069 0000176F 51 <1> push cx 1070 00001770 F3AB <1> rep stosw ; store blanks for the number 1071 00001772 AA <1> stosb ; store additional blank as separator 1072 00001773 59 <1> pop cx 1073 <1> %if _40COLUMNS 1074 00001774 58 <1> pop ax 1075 <1> %endif 1076 <1> @@: 1077 <1> _386_PM_o32 1078 00001775 46 <1> inc si ; skip as many bytes 1079 <1> %if _40COLUMNS 1080 00001776 85C6 <1> test si, ax 1081 <1> %else 1082 <1> test si, 0Fh 1083 <1> %endif 1084 00001778 7404 <1> jz dd10 1085 0000177A E2F9 <1> loop @B 1086 <1> %else 1087 <1> %if _40COLUMNS 1088 <1> push ax 1089 <1> %endif 1090 <1> mov ax, 32 << 8 | 32 1091 <1> stosw ; store blanks for the number 1092 <1> stosb ; store additional blank as separator 1093 <1> _386_PM_o32 1094 <1> inc si ; skip as many bytes 1095 <1> %if _40COLUMNS 1096 <1> pop ax 1097 <1> %endif 1098 <1> %endif 1099 0000177C EBD9 <1> jmp short dd9 1100 <1> 1101 <1> dd10: 1102 <1> %if _DNUM 1103 <1> _386_PM_o32 1104 0000177E 0336[3842] <1> add si, word [ddoffset] 1105 <1> _386_PM_o32 1106 00001782 2B36[3A42] <1> sub si, word [ddskipped] 1107 <1> %endif 1108 <1> 1109 00001786 B91900 <1> mov cx, (1 + 8 * (2 + 1)) ; go back 8 bytes (2 digits each) 1110 <1> %if _DNUM 1111 00001789 803E[3C42]02 <1> cmp byte [ddsize], 2 1112 0000178E 7206 <1> jb @F ; if it is 1 --> 1113 00001790 B115 <1> mov cl, (1 + 4 * (4 + 1)) ; go back 4 words (4 digits each) 1114 00001792 7402 <1> je @F ; if it is 2 --> 1115 <1> ; it is 4 1116 00001794 B113 <1> mov cl, (1 + 2 * (8 + 1)) ; go back 2 dwords (8 digits each) 1117 <1> %endif 1118 <1> @@: 1119 <1> %if _40COLUMNS 1120 00001796 F606[B500]10 <1> testopt [options6], opt6_40_columns 1121 0000179B 740B <1> jz @F 1122 0000179D F606[B500]40 <1> testopt [options6], opt6_40_dash 1123 000017A2 7409 <1> jz .nodash ; do not write a dash 1124 <1> %if 1 1125 <1> ; calculate dash position 1126 000017A4 49 <1> dec cx 1127 000017A5 D1E9 <1> shr cx, 1 1128 000017A7 41 <1> inc cx 1129 <1> %else 1130 <1> ; dispatch for dash position 1131 <1> mov cx, (1 + 4 * (2 + 1)) ; go back 4 bytes (2 digits each) 1132 <1> cmp byte [ddsize], 2 1133 <1> jb @F ; if it is 1 --> 1134 <1> mov cl, (1 + 2 * (4 + 1)) ; go back 2 words (4 digits each) 1135 <1> je @F ; if it is 2 --> 1136 <1> ; it is 4 1137 <1> mov cl, (1 + 1 * (8 + 1)) ; go back 1 dwords (8 digits each) 1138 <1> %endif 1139 <1> @@: 1140 <1> %endif 1141 000017A8 29CF <1> sub di, cx 1142 000017AA C6052D <1> mov byte [di], '-' 1143 <1> .nodash: 1144 000017AD E88F6D <1> call unhack 1145 000017B0 89DF <1> mov di, bx 1146 000017B2 52 <1> push dx 1147 <1> %if _DHIGHLIGHT 1148 <1> testopt [options3], opt3_d_highlight 1149 <1> jz .justputs 1150 <1> mov ax, 13 | 10 << 8 1151 <1> stosw 1152 <1> push si 1153 <1> %if 0 1154 <1> mov si, line_out 1155 <1> mov dx, si 1156 <1> @@: 1157 <1> lodsb 1158 <1> cmp al, 32 1159 <1> jne @B 1160 <1> @@: 1161 <1> lodsb 1162 <1> cmp al, 32 1163 <1> je @B 1164 <1> dec si 1165 <1> mov cx, si 1166 <1> sub cx, dx 1167 <1> call puts 1168 <1> %else 1169 <1> mov dx, line_out 1170 <1> mov si, word [dd_h_number] 1171 <1> mov cx, si 1172 <1> sub cx, dx 1173 <1> call puts 1174 <1> mov dx, si 1175 <1> .hl: 1176 <1> call emit_highlight 1177 <1> @@: 1178 <1> lodsb 1179 <1> cmp si, word [dd_h_text] 1180 <1> jae .text_dx 1181 <1> cmp al, 'X' 1182 <1> je @B 1183 <1> nearcall getnyb 1184 <1> jnc @B 1185 <1> mov cx, si 1186 <1> sub cx, dx 1187 <1> call puts 1188 <1> mov dx, si 1189 <1> cmp si, word [dd_h_text] 1190 <1> jae .text 1191 <1> @@: 1192 <1> lodsb 1193 <1> cmp si, word [dd_h_text] 1194 <1> jae .text_dx 1195 <1> cmp al, 32 1196 <1> je @B 1197 <1> cmp al, '-' 1198 <1> je @B 1199 <1> call emit_unhighlight 1200 <1> @@: 1201 <1> lodsb 1202 <1> cmp si, word [dd_h_text] 1203 <1> jae .text_dx 1204 <1> cmp al, 'X' 1205 <1> je @B 1206 <1> nearcall getnyb 1207 <1> jnc @B 1208 <1> mov cx, si 1209 <1> sub cx, dx 1210 <1> call puts 1211 <1> mov dx, si 1212 <1> cmp si, word [dd_h_text] 1213 <1> jae .text 1214 <1> @@: 1215 <1> lodsb 1216 <1> cmp si, word [dd_h_text] 1217 <1> jae .text_dx 1218 <1> cmp al, 32 1219 <1> je @B 1220 <1> cmp al, '-' 1221 <1> je @B 1222 <1> jmp .hl 1223 <1> 1224 <1> .text_dx: 1225 <1> mov cx, si 1226 <1> sub cx, dx 1227 <1> call puts 1228 <1> mov dx, si 1229 <1> .text: 1230 <1> call emit_highlight 1231 <1> lodsb 1232 <1> cmp al, 13 1233 <1> je .done_unhl 1234 <1> mov cx, 1 1235 <1> call puts 1236 <1> mov dx, si 1237 <1> call emit_unhighlight 1238 <1> lodsb 1239 <1> cmp al, 13 1240 <1> je .done 1241 <1> mov cx, 1 1242 <1> call puts 1243 <1> mov dx, si 1244 <1> jmp .text 1245 <1> 1246 <1> .done_unhl: 1247 <1> call emit_unhighlight 1248 <1> .done: 1249 <1> mov dx, si 1250 <1> dec dx 1251 <1> mov cx, 2 1252 <1> call puts 1253 <1> %endif 1254 <1> pop si 1255 <1> jmp @F 1256 <1> %endif 1257 <1> .justputs: 1258 000017B3 E80D83 <1> call putsline_crlf 1259 <1> @@: 1260 000017B6 5A <1> pop dx 1261 <1> _386_PM_o32 ; dec esi 1262 000017B7 4E <1> dec si 1263 <1> _386_PM_o32 ; cmp esi, edx 1264 000017B8 39D6 <1> cmp si, dx 1265 <1> _386_PM_o32 ; inc esi 1266 000017BA 46 <1> inc si 1267 000017BB 7303E999FE <1> jb dd2_loop ; display next line --> 1268 <1> dd11: 1269 <1> ; This check is necessary to wrap around at FFFFh (64 KiB) 1270 <1> ; for 16-bit segments instead of at FFFFFFFFh (4 GiB). 1271 000017C0 8B1E[7C0B] <1> mov bx, word [d_addr + saSegSel] 1272 <1> ; reset bx (also set segment for trailer) 1273 <1> _386_PM call test_high_limit ; 32-bit segment ? 1274 <1> _386_PM jz .16 ; no --> 1275 <1> _386_PM_o32 ; inc edx 1276 <1> .16: 1277 000017C4 42 <1> inc dx ; set up the address for the next 'D' command. 1278 <1> _386_PM_o32 ; mov dword [d_addr], edx 1279 000017C5 8916[780B] <1> mov word [d_addr], dx 1280 000017C9 C3 <1> retn 1281 <1> 1282 <1> 1283 <1> ; INP: (e)si = offset (to display) 1284 <1> ; (e)dx = end offset (for range check of 16-bit segment) 1285 <1> ; word [d_addr + saSegSel] = segment/selector 1286 <1> ; es:di -> where to write to 1287 <1> ; OUT: bx = segment/selector 1288 <1> dd_display_offset: 1289 <1> .: 1290 000017CA A1[7C0B] <1> mov ax, word [d_addr + saSegSel] 1291 000017CD 89C3 <1> mov bx, ax 1292 <1> %if _40COLUMNS 1293 000017CF F606[B500]10 <1> testopt [options6], opt6_40_columns 1294 000017D4 7506 <1> jnz @F 1295 <1> %endif 1296 000017D6 E8B182 <1> call hexword 1297 000017D9 B03A <1> mov al, ':' 1298 000017DB AA <1> stosb 1299 <1> @@: 1300 <1> _386_PM_o32 ; mov eax, esi 1301 000017DC 89F0 <1> mov ax, si 1302 <1> %if _PM 1303 <1> _386_PM call test_high_limit ; 32-bit segment ? 1304 <1> _386_PM jz .16 ; no --> (don't display zero high word) 1305 <1> _386_PM call hexword_high ; yes, display high word of address 1306 <1> _386_PM jmp short .common 1307 <1> 1308 <1> ; Insure that the high word is zero. 1309 <1> .16: 1310 <1> ;_386 test esi, ~0FFFFh 1311 <1> ;_386 jnz .error 1312 <1> _386 test edx, ~0FFFFh 1313 <1> _386 jz .common 1314 <1> ;.error: 1315 <1> _386 mov dx, msg.ofs32 1316 <1> _386 call putsz_error 1317 <1> _386 jmp cmd3 1318 <1> .common: 1319 <1> %endif 1320 000017DE E8A982 <1> call hexword 1321 000017E1 B82020 <1> mov ax, 32<<8|32 1322 000017E4 AB <1> stosw 1323 000017E5 C3 <1> retn 1324 <1> 1325 <1> ; INP: (e)si = offset (to display) 1326 <1> ; (e)dx = end offset (for range check of 16-bit segment) 1327 <1> ; word [d_addr + saSegSel] = segment/selector 1328 <1> ; es:di -> where to write to 1329 <1> ; if _40COLUMNS: 1330 <1> ; bx = mask to apply to si 1331 <1> ; OUT: bx = segment/selector 1332 <1> ; (e)ax = offset & ~0Fh (or offset & bx) 1333 <1> .masklownybble: 1334 000017E6 56 <1> push si 1335 <1> %if _40COLUMNS 1336 000017E7 21DE <1> and si, bx 1337 <1> %else 1338 <1> and si, ~0Fh 1339 <1> %endif 1340 <1> _386_PM_o32 1341 000017E9 56 <1> push si 1342 000017EA E8DDFF <1> call . 1343 <1> _386_PM_o32 1344 000017ED 58 <1> pop ax 1345 000017EE 5E <1> pop si 1346 000017EF C3 <1> retn 1347 <1> 1348 <1> 1349 <1> ; Store a character into the buffer. Characters that can't 1350 <1> ; be displayed are replaced by a dot. 1351 <1> ; 1352 <1> ; INP: al = character 1353 <1> ; es:bx-> buffer for displayed characters 1354 <1> ; es:di-> buffer for hexadecimal number 1355 <1> ; OUT: es:bx-> behind displayed character 1356 <1> ; es:di-> behind hexadecimal number and space 1357 <1> ; CHG: ax 1358 <1> ; STT: ds unknown 1359 <1> dd_store: 1360 000017F0 E89E82 <1> call hexbyte ; dump hexadecimal number 1361 000017F3 362206[3F42] <1> and al, byte [ss:dd_text_and] 1362 <1> ; for MSDebug compatibility 1363 000017F8 3C20 <1> cmp al, 32 ; below blank ? 1364 000017FA 7216 <1> jb .ctrl ; control char --> 1365 000017FC 3C7F <1> cmp al, 127 ; DEL ? 1366 000017FE 7412 <1> je .ctrl ; yes, control char --> 1367 00001800 7212 <1> jb .noctrl ; below, not a control char --> 1368 00001802 36F606[A000]04 <1> testopt [ss:options], cpdepchars 1369 <1> ; allow CP-dependent characters ? 1370 00001808 750A <1> jnz .noctrl ; yes --> 1371 <1> %if _DTOP 1372 0000180A 36F606[E600]80 <1> testopt [ss:internalflags6], dif6_cpdepchars 1373 <1> ; allow CP-dependent characters ? 1374 00001810 7502 <1> jnz .noctrl ; yes --> 1375 <1> %endif 1376 <1> .ctrl: 1377 00001812 B02E <1> mov al, '.' ; replace by dot 1378 <1> .noctrl: 1379 00001814 268807 <1> mov byte [es:bx], al ; store dot or printable text byte 1380 00001817 43 <1> inc bx 1381 00001818 C3 <1> retn 1382 <1> 1383 <1> 1384 <1> %if _PM 1385 <1> usesection lDEBUG_DATA_ENTRY 1386 <1> align 2, db 0 1387 <1> daresult: dw -1 1388 <1> 1389 <1> usesection lDEBUG_CODE 1390 <1> 1391 <1> descalloc: 1392 <1> call skipwhite 1393 <1> call chkeol 1394 <1> xor ax, ax 1395 <1> mov cx, 1 1396 <1> int 31h 1397 <1> jc .error 1398 <1> mov di, msg.d.a_success_sel 1399 <1> call hexword 1400 <1> mov dx, msg.d.a_success 1401 <1> .display: 1402 <1> call putsz 1403 <1> mov word [daresult], ax 1404 <1> retn 1405 <1> 1406 <1> .error: 1407 <1> mov di, msg.d.a_error_code 1408 <1> call hexword 1409 <1> mov dx, msg.d.a_error 1410 <1> cmp ax, 8000h 1411 <1> jae @F 1412 <1> mov ax, 0801h 1413 <1> @@: 1414 <1> call setrc 1415 <1> mov ax, -1 1416 <1> jmp .display 1417 <1> 1418 <1> 1419 <1> descdealloc: 1420 <1> call skipwhite 1421 <1> nearcall getword 1422 <1> call chkeol 1423 <1> mov ax, 1 1424 <1> mov bx, dx 1425 <1> int 31h 1426 <1> jc .error 1427 <1> mov dx, msg.d.d_success 1428 <1> .display: 1429 <1> jmp putsz 1430 <1> 1431 <1> .error: 1432 <1> mov di, msg.d.d_error_code 1433 <1> call hexword 1434 <1> mov dx, msg.d.d_error 1435 <1> cmp ax, 8000h 1436 <1> jae @F 1437 <1> mov ax, 0802h 1438 <1> @@: 1439 <1> call setrc 1440 <1> jmp .display 1441 <1> 1442 <1> 1443 <1> descbase: 1444 <1> call skipwhite 1445 <1> nearcall getword 1446 <1> mov cx, dx 1447 <1> nearcall getdword 1448 <1> call chkeol 1449 <1> xchg cx, bx ; cx:dx = base, bx = desc 1450 <1> mov ax, 7 1451 <1> int 31h 1452 <1> jc .error 1453 <1> mov dx, msg.d.b_success 1454 <1> .display: 1455 <1> jmp putsz 1456 <1> 1457 <1> .error: 1458 <1> mov di, msg.d.b_error_code 1459 <1> call hexword 1460 <1> mov dx, msg.d.b_error 1461 <1> cmp ax, 8000h 1462 <1> jae @F 1463 <1> mov ax, 0803h 1464 <1> @@: 1465 <1> call setrc 1466 <1> jmp .display 1467 <1> 1468 <1> 1469 <1> desclimit: 1470 <1> call skipwhite 1471 <1> nearcall getword 1472 <1> mov cx, dx 1473 <1> nearcall getdword 1474 <1> call chkeol 1475 <1> xchg cx, bx ; cx:dx = limit, bx = desc 1476 <1> mov ax, 8 1477 <1> int 31h 1478 <1> jc .error 1479 <1> mov dx, msg.d.l_success 1480 <1> .display: 1481 <1> jmp putsz 1482 <1> 1483 <1> .error: 1484 <1> mov di, msg.d.l_error_code 1485 <1> call hexword 1486 <1> mov dx, msg.d.l_error 1487 <1> cmp ax, 8000h 1488 <1> jae @F 1489 <1> mov ax, 0804h 1490 <1> @@: 1491 <1> call setrc 1492 <1> jmp .display 1493 <1> 1494 <1> 1495 <1> desctype: 1496 <1> call skipwhite 1497 <1> nearcall getword 1498 <1> mov bx, dx 1499 <1> nearcall getword 1500 <1> call chkeol 1501 <1> mov cx, dx ; cx = type, bx = desc 1502 <1> mov ax, 9 1503 <1> int 31h 1504 <1> jc .error 1505 <1> mov dx, msg.d.t_success 1506 <1> .display: 1507 <1> jmp putsz 1508 <1> 1509 <1> .error: 1510 <1> mov di, msg.d.t_error_code 1511 <1> call hexword 1512 <1> mov dx, msg.d.t_error 1513 <1> cmp ax, 8000h 1514 <1> jae @F 1515 <1> mov ax, 0805h 1516 <1> @@: 1517 <1> call setrc 1518 <1> jmp .display 1519 <1> 1520 <1> 1521 <1> descsubcommand: 1522 <1> lodsb 1523 <1> cmp al, '?' 1524 <1> je deschelp 1525 <1> call ispm 1526 <1> jne display_nodesc 1527 <1> call uppercase 1528 <1> cmp al, 'A' 1529 <1> je descalloc 1530 <1> cmp al, 'D' 1531 <1> je descdealloc 1532 <1> cmp al, 'B' 1533 <1> je descbase 1534 <1> cmp al, 'L' 1535 <1> je desclimit 1536 <1> cmp al, 'T' 1537 <1> je desctype 1538 <1> jmp error 1539 <1> 1540 <1> deschelp: 1541 <1> lodsb 1542 <1> call chkeol 1543 <1> mov dx, msg.deschelp 1544 <1> jmp putsz_exthelp ; print string and return 1545 <1> 1546 <1> 1547 <1> ; DL command 1548 <1> descout: 1549 <1> call skipwhite 1550 <1> nearcall getword; get word into DX 1551 <1> mov bx, dx 1552 <1> call skipcomm0 1553 <1> mov dx, 1 1554 <1> call iseol? 1555 <1> je .onlyone 1556 <1> call uppercase 1557 <1> cmp al, 'L' 1558 <1> jne .notlength 1559 <1> call skipcomma 1560 <1> .notlength: 1561 <1> nearcall getword 1562 <1> call chkeol 1563 <1> .onlyone: 1564 <1> inc dx ; (note js at nextdesc changed to jz) 1565 <1> mov si, dx ; save count 1566 <1> call ispm 1567 <1> je nextdesc 1568 <1> display_nodesc: 1569 <1> mov dx, nodesc 1570 <1> mov ax, 0800h 1571 <1> call setrc 1572 <1> jmp putsz 1573 <1> desc_done: 1574 <1> retn 1575 <1> subcpu 286 1576 <1> nextdesc: 1577 <1> dec si 1578 <1> jz desc_done 1579 <1> mov di, descriptor 1580 <1> mov ax, bx 1581 <1> call hexword 1582 <1> mov di, descriptor.base 1583 <1> push di 1584 <1> mov ax, "??" 1585 <1> stosw 1586 <1> stosw 1587 <1> stosw 1588 <1> stosw 1589 <1> add di, byte (descriptor.limit - (descriptor.base + 8)) 1590 <1> stosw 1591 <1> stosw 1592 <1> stosw 1593 <1> stosw 1594 <1> add di, byte (descriptor.attrib - (descriptor.limit + 8)) 1595 <1> stosw 1596 <1> stosw 1597 <1> pop di 1598 <1> ; lar ax, bx 1599 <1> ; jnz skipdesc ; tell that this descriptor is invalid 1600 <1> mov ax, 6 1601 <1> int 31h 1602 <1> jc desc_o1 1603 <1> mov ax, cx 1604 <1> call hexword 1605 <1> mov ax, dx 1606 <1> call hexword 1607 <1> desc_o1: 1608 <1> mov di, descriptor.limit 1609 <1> _no386_jmps use16desc 1610 <1> subcpu 386 1611 <1> lsl eax, ebx 1612 <1> jnz desc_out 1613 <1> push ax 1614 <1> shr eax, 16 1615 <1> call hexword 1616 <1> pop ax 1617 <1> call hexword 1618 <1> lar eax, ebx 1619 <1> shr eax, 8 1620 <1> desc_o2: 1621 <1> mov di, descriptor.attrib 1622 <1> call hexword 1623 <1> desc_out: 1624 <1> mov dx, descriptor 1625 <1> call putsz 1626 <1> add bx, byte 8 1627 <1> jmp short nextdesc 1628 <1> subcpureset ; subcpu 386 1629 <1> use16desc: 1630 <1> lsl ax, bx 1631 <1> jnz desc_out 1632 <1> call hexword 1633 <1> mov ax, 32<<8|32 1634 <1> stosw 1635 <1> stosw 1636 <1> lar ax, bx 1637 <1> shr ax, 8 1638 <1> jmp short desc_o2 1639 <1> subcpureset ; subcpu 286 1640 <1> %endif 1641 <1> 1642 <1> %if _DSTRINGS 1643 <1> ; D$ command 1644 <1> dcpm: 1645 00001819 C606[A80B]24 <1> mov byte [dstringtype], 36 1646 0000181E C706[AA0B][960B] <1> mov word [dstringaddr], dcpm_addr 1647 00001824 EB25 <1> jmp short dstring 1648 <1> 1649 <1> ; DW# command 1650 <1> dwcounted: 1651 00001826 C606[A80B]FE <1> mov byte [dstringtype], 0FEh 1652 0000182B C706[AA0B][A20B] <1> mov word [dstringaddr], dwcount_addr 1653 00001831 EB18 <1> jmp short dstring 1654 <1> 1655 <1> ; D# command 1656 <1> dcounted: 1657 00001833 C606[A80B]FF <1> mov byte [dstringtype], 0FFh 1658 00001838 C706[AA0B][9C0B] <1> mov word [dstringaddr], dcount_addr 1659 0000183E EB0B <1> jmp short dstring 1660 <1> 1661 <1> ; DZ command 1662 <1> dz: 1663 00001840 C606[A80B]00 <1> mov byte [dstringtype], 0 1664 00001845 C706[AA0B][900B] <1> mov word [dstringaddr], dz_addr 1665 <1> 1666 <1> ; common code for all string commands 1667 <1> dstring: 1668 0000184B E89181 <1> call skipwhite 1669 0000184E E83981 <1> call iseol? 1670 00001851 7508 <1> jne .getaddr ; if an address was given 1671 <1> .last: 1672 00001853 8B1E[AA0B] <1> mov bx, word [dstringaddr] 1673 <1> _386_PM_o32 ; mov edx, dword [bx] 1674 00001857 8B17 <1> mov dx, word [bx] 1675 00001859 EB12 <1> jmp short .haveaddr ; edx = offset, [bx + saSegSel] = segment 1676 <1> .getaddr: 1677 0000185B 8B1E[C40C] <1> mov bx, word [reg_ds] 1678 0000185F E8EE6E <1> nearcall getaddrX ; get address into bx:(e)dx 1679 00001862 E83A81 <1> call chkeol ; expect end of line here 1680 <1> %if _PM 1681 <1> push bx 1682 <1> %endif 1683 00001865 53 <1> push bx 1684 00001866 8B1E[AA0B] <1> mov bx, word [dstringaddr] 1685 0000186A 8F4704 <1> pop word [bx + saSegSel]; save segment (offset behind string is saved later) 1686 <1> %if _PM 1687 <1> call ispm 1688 <1> jnz .86m 1689 <1> .pm: 1690 <1> pop word [bx + saSelector] 1691 <1> jmp @F 1692 <1> .86m: 1693 <1> pop word [bx + saSegment] 1694 <1> @@: 1695 <1> %endif 1696 <1> .haveaddr: 1697 0000186D C706[020C][5318] <1> mov word [lastcmd], dstring.last 1698 00001873 E88C6C <1> call prephack 1699 <1> _386_PM_o32 ; mov esi, edx 1700 00001876 89D6 <1> mov si, dx 1701 00001878 800E[D200]01 <1> setopt [internalflags], usecharcounter 1702 0000187D C606[EA0A]01 <1> mov byte [ charcounter ], 1 1703 <1> ; initialize 1704 00001882 E8A66C <1> call dohack 1705 00001885 BF[B40A] <1> mov di, line_out ; es:di -> line_out 1706 00001888 8E5F04 <1> mov ds, word [bx + saSegSel] 1707 <1> ; ds:(e)si-> string 1708 0000188B 36803E[A80B]FE <1> cmp byte [ss:dstringtype], 0FEh 1709 00001891 723B <1> jb .terminated ; terminated string --> 1710 00001893 9F <1> lahf 1711 <1> _386_PM_a32 1712 00001894 AC <1> lodsb ; load first byte 1713 00001895 31C9 <1> xor cx, cx 1714 00001897 88C1 <1> mov cl, al ; low byte of count 1715 00001899 9E <1> sahf 1716 0000189A 7503 <1> jne .counted ; only byte count --> 1717 <1> _386_PM_a32 1718 0000189C AC <1> lodsb ; load second byte 1719 0000189D 88C5 <1> mov ch, al ; high byte of count 1720 <1> .counted: 1721 0000189F E33A <1> jcxz .done ; length zero --> 1722 <1> .loop: 1723 <1> _386_PM_a32 1724 000018A1 AC <1> lodsb ; get character 1725 000018A2 E80400 <1> call .char ; display 1726 000018A5 E2FA <1> loop .loop ; until done --> 1727 000018A7 EB32 <1> jmp short .done 1728 <1> 1729 <1> ; INP: al = text to display 1730 <1> ; di -> after last buffered text in line_out 1731 <1> ; OUT: di -> after text stored in buffer 1732 <1> ; (in range line_out + 1 .. line_out_end) 1733 <1> ; buffer content so far dumped if buffer was full 1734 <1> ; STT: es = ss 1735 <1> ; ds unknown 1736 <1> ; in hacked state (dohack called) 1737 <1> ; CHG: dx 1738 <1> .char: 1739 000018A9 81FF[BC0B] <1> cmp di, line_out_end ; end of buffer ? 1740 000018AD 720B <1> jb @F ; not yet, only store to buffer --> 1741 <1> 1742 000018AF 1E <1> push ds 1743 000018B0 E80900 <1> call .dump 1744 <1> ; go back to special state 1745 000018B3 E8756C <1> call dohack 1746 000018B6 1F <1> pop ds 1747 000018B7 BF[B40A] <1> mov di, line_out ; reset buffer to start 1748 <1> 1749 <1> @@: 1750 000018BA AA <1> stosb ; store the text byte to buffer 1751 000018BB C3 <1> retn 1752 <1> 1753 <1> ; INP: di -> after last stored text in line_out 1754 <1> ; OUT: ds set to ss 1755 <1> ; unhack called 1756 <1> ; putsline called 1757 <1> ; CHG: ds, dx 1758 <1> ; STT: es = ss 1759 <1> .dump: 1760 000018BC 50 <1> push ax 1761 000018BD 51 <1> push cx 1762 000018BE 53 <1> push bx 1763 000018BF 16 <1> push ss 1764 000018C0 1F <1> pop ds 1765 000018C1 E87B6C <1> call unhack ; restore state 1766 000018C4 E80082 <1> call putsline ; write buffered content 1767 000018C7 E8AB2A <1> call handle_serial_flags_ctrl_c 1768 <1> ; handle Control-C 1769 000018CA 5B <1> pop bx 1770 000018CB 59 <1> pop cx 1771 000018CC 58 <1> pop ax 1772 000018CD C3 <1> retn 1773 <1> 1774 <1> .terminated: 1775 <1> _386_PM_a32 1776 000018CE AC <1> lodsb ; load character 1777 000018CF 363A06[A80B] <1> cmp al, byte [ss:dstringtype] 1778 000018D4 7405 <1> je .done ; it's the terminator --> 1779 000018D6 E8D0FF <1> call .char ; display 1780 000018D9 EBF3 <1> jmp short .terminated ; and get next --> 1781 <1> 1782 <1> .done: 1783 <1> ; Finally dump the last chunk (may be empty). 1784 000018DB E8DEFF <1> call .dump ; this resets ds and calls unhack 1785 <1> _386_PM_o32 ; mov dword [bx], esi 1786 000018DE 8937 <1> mov word [bx], si 1787 000018E0 B00D <1> mov al, 13 1788 000018E2 E8F086 <1> call putc 1789 000018E5 B00A <1> mov al, 10 1790 000018E7 E8EB86 <1> call putc 1791 000018EA C3 <1> retn 1792 <1> %endif 1793 <1> 1794 <1> %if _INT 1795 <1> ; DI command 1796 <1> gateout: 1797 000018EB 31C9 <1> xor cx, cx 1798 000018ED AC <1> lodsb 1799 000018EE E87D80 <1> call uppercase 1800 000018F1 3C52 <1> cmp al, 'R' 1801 000018F3 7502 <1> jne @F 1802 000018F5 41 <1> inc cx ; always 86 Mode 1803 000018F6 AC <1> lodsb 1804 <1> @@: 1805 000018F7 E87480 <1> call uppercase 1806 000018FA 3C4D <1> cmp al, 'M' 1807 000018FC 7503 <1> jne @F 1808 000018FE FEC5 <1> inc ch ; show MCB names 1809 00001900 AC <1> lodsb 1810 <1> @@: 1811 00001901 E86A80 <1> call uppercase 1812 00001904 3C4C <1> cmp al, 'L' 1813 00001906 7504 <1> jne @F 1814 00001908 80CD02 <1> or ch, 2 ; follow AMIS interrupt lists 1815 0000190B AC <1> lodsb 1816 <1> @@: 1817 0000190C E8A280 <1> call skipcomm0 1818 <1> 1819 0000190F 4E <1> dec si 1820 00001910 BA[801F] <1> mov dx, msg.in 1821 00001913 E80A80 <1> call isstring? 1822 00001916 7560 <1> jne .not_in 1823 <1> 1824 00001918 E89580 <1> call skipcomma 1825 0000191B 4E <1> dec si 1826 0000191C 56 <1> push si 1827 0000191D 51 <1> push cx 1828 <1> .in.loop: 1829 0000191E E8BE80 <1> call skipwhite 1830 00001921 4E <1> dec si 1831 <1> 1832 00001922 E8747F <1> nearcall get_value_range; OUT: cx:di = from, bx:dx = to 1833 00001925 730D <1> jnc @F 1834 00001927 7508 <1> jnz .error 1835 00001929 81FFFF00 <1> cmp di, 255 1836 0000192D 7702 <1> ja .error 1837 0000192F E317 <1> jcxz .in.next 1838 <1> .error: 1839 00001931 E92969 <1> jmp error 1840 <1> 1841 <1> @@: 1842 00001934 81FFFF00 <1> cmp di, 255 1843 00001938 77F7 <1> ja .error 1844 0000193A E302 <1> jcxz @F 1845 0000193C EBF3 <1> jmp .error 1846 <1> 1847 <1> @@: 1848 0000193E 85DB <1> test bx, bx 1849 00001940 75EF <1> jnz .error 1850 00001942 81FAFF00 <1> cmp dx, 255 1851 00001946 77E9 <1> ja .error 1852 <1> 1853 <1> .in.next: 1854 <1> @@: 1855 00001948 E89580 <1> call skipwh0 1856 0000194B 3C2C <1> cmp al, ',' 1857 0000194D 74CF <1> je .in.loop 1858 0000194F E84D80 <1> call chkeol 1859 00001952 59 <1> pop cx 1860 00001953 E89300 <1> call .prepare 1861 00001956 5E <1> pop si 1862 <1> 1863 <1> .indo.loop: 1864 00001957 E88580 <1> call skipwhite 1865 0000195A 4E <1> dec si 1866 <1> 1867 0000195B 51 <1> push cx 1868 0000195C E83A7F <1> nearcall get_value_range; OUT: cx:di = from, bx:dx = to 1869 0000195F 59 <1> pop cx 1870 00001960 720D <1> jc .indo.next 1871 <1> 1872 00001962 89FB <1> mov bx, di 1873 00001964 A8 <1> db __TEST_IMM8 ; (skip inc) 1874 <1> @@: 1875 00001965 43 <1> inc bx 1876 00001966 52 <1> push dx 1877 00001967 E89400 <1> call .do 1878 0000196A 5A <1> pop dx 1879 0000196B 39D3 <1> cmp bx, dx 1880 0000196D 72F6 <1> jb @B 1881 <1> 1882 <1> .indo.next: 1883 0000196F 4E <1> dec si 1884 00001970 E86C80 <1> call skipwhite 1885 00001973 3C2C <1> cmp al, ',' 1886 00001975 74E0 <1> je .indo.loop 1887 00001977 C3 <1> retn 1888 <1> 1889 <1> 1890 <1> 1891 <1> .not_in: 1892 00001978 AC <1> lodsb 1893 00001979 E8EB7E <1> nearcall getbyte; get byte into DL 1894 0000197C 30F6 <1> xor dh, dh 1895 0000197E 89D3 <1> mov bx, dx 1896 00001980 E82E80 <1> call skipcomm0 1897 00001983 BA0100 <1> mov dx, 1 1898 00001986 E80180 <1> call iseol? 1899 00001989 7451 <1> je .onlyone 1900 0000198B E8E07F <1> call uppercase 1901 0000198E 3C4C <1> cmp al, 'L' 1902 00001990 753F <1> jne .notlength 1903 00001992 E81B80 <1> call skipcomma 1904 00001995 E8C17E <1> nearcall getword; get byte into DL 1905 00001998 85D2 <1> test dx, dx 1906 0000199A 741A <1> jz .err 1907 0000199C 81FA0001 <1> cmp dx, 100h 1908 000019A0 740A <1> je .checkrange 1909 000019A2 50 <1> push ax 1910 000019A3 80E41F <1> and ah, 1Fh 1911 000019A6 80FC08 <1> cmp ah, 8 1912 000019A9 58 <1> pop ax 1913 000019AA 770A <1> ja .err 1914 <1> .checkrange: 1915 000019AC 52 <1> push dx 1916 000019AD 01DA <1> add dx, bx 1917 000019AF 81FA0001 <1> cmp dx, 100h 1918 000019B3 5A <1> pop dx 1919 000019B4 7623 <1> jna .rangeok 1920 <1> .err: 1921 000019B6 E9A468 <1> jmp error 1922 <1> 1923 <1> .last: 1924 000019B9 31DB <1> xor bx, bx 1925 000019BB 8A1E[B20B] <1> mov bl, byte [lastint] 1926 000019BF 8B0E[B00B] <1> mov cx, word [lastint_is_86m_and_mcb] 1927 000019C3 BA0100 <1> mov dx, 1 1928 000019C6 FEC3 <1> inc bl 1929 000019C8 7512 <1> jnz .onlyone 1930 000019CA C706[020C][F504] <1> mov word [lastcmd], dmycmd 1931 000019D0 C3 <1> retn 1932 <1> 1933 <1> .notlength: 1934 000019D1 E8937E <1> nearcall getbyte 1935 000019D4 30F6 <1> xor dh, dh 1936 000019D6 28DA <1> sub dl, bl 1937 000019D8 42 <1> inc dx 1938 <1> .rangeok: 1939 000019D9 E8C37F <1> call chkeol 1940 <1> .onlyone: 1941 000019DC E80A00 <1> call .prepare 1942 000019DF 89D6 <1> mov si, dx ; save count 1943 <1> .next: 1944 000019E1 E81A00 <1> call .do 1945 000019E4 43 <1> inc bx 1946 000019E5 4E <1> dec si 1947 000019E6 75F9 <1> jnz .next 1948 000019E8 C3 <1> retn 1949 <1> 1950 <1> 1951 <1> .prepare: 1952 000019E9 F6C502 <1> test ch, 2 1953 000019EC 7403 <1> jz @F 1954 000019EE E8C8EC <1> call guard_auxbuff 1955 <1> @@: 1956 000019F1 C706[020C][B919] <1> mov word [lastcmd], .last 1957 000019F7 890E[B00B] <1> mov word [lastint_is_86m_and_mcb], cx 1958 000019FB E9046B <1> jmp prephack 1959 <1> 1960 <1> 1961 <1> ; INP: bx = interrupt number 1962 <1> ; cx = options 1963 <1> ; CHG: di, eax. edx, bp 1964 <1> ; STT: ds = es = ss 1965 <1> ; prephack called 1966 <1> .do: 1967 000019FE 881E[B20B] <1> mov byte [lastint], bl 1968 00001A02 E87029 <1> call handle_serial_flags_ctrl_c 1969 00001A05 E8236B <1> call dohack 1970 00001A08 BF[B40A] <1> mov di, line_out 1971 00001A0B B8696E <1> mov ax, "in" 1972 00001A0E AB <1> stosw 1973 00001A0F B87420 <1> mov ax, "t " 1974 00001A12 AB <1> stosw 1975 00001A13 88D8 <1> mov al, bl 1976 00001A15 E87980 <1> call hexbyte 1977 00001A18 B020 <1> mov al, 32 1978 00001A1A AA <1> stosb 1979 <1> %if _PM 1980 <1> test cl, cl 1981 <1> jnz .rm 1982 <1> call ispm 1983 <1> jnz .rm 1984 <1> 1985 <1> mov ax, 0204h 1986 <1> cmp bl, 20h 1987 <1> adc bh, 1 ; if below, bh = 2 1988 <1> .loopexception: 1989 <1> push cx 1990 <1> int 31h 1991 <1> mov ax, cx 1992 <1> pop cx 1993 <1> jc .failed 1994 <1> call hexword 1995 <1> mov al, ':' 1996 <1> stosb 1997 <1> _386_PM_o32 ; mov eax, edx 1998 <1> mov ax, dx 1999 <1> cmp byte [dpmi32], 0 2000 <1> jz .gate16 2001 <1> call hexword_high 2002 <1> .gate16: 2003 <1> call hexword 2004 <1> mov al, 32 2005 <1> stosb 2006 <1> mov ax, 0202h 2007 <1> dec bh 2008 <1> jnz .loopexception 2009 <1> dec di 2010 <1> call unhack 2011 <1> push bx 2012 <1> push cx 2013 <1> call putsline_crlf 2014 <1> pop cx 2015 <1> pop bx 2016 <1> retn 2017 <1> 2018 <1> .rm: 2019 <1> %endif 2020 00001A1B 53 <1> push bx 2021 00001A1C 51 <1> push cx 2022 00001A1D 56 <1> push si 2023 <1> 2024 00001A1E 53 <1> push bx 2025 00001A1F 31ED <1> xor bp, bp 2026 00001A21 D1E3 <1> shl bx, 1 2027 00001A23 D1E3 <1> shl bx, 1 2028 00001A25 31D2 <1> xor dx, dx 2029 <1> %if _PM 2030 <1> call setes2dx 2031 <1> %else 2032 00001A27 8EC2 <1> mov es, dx ; es => IVT 2033 <1> %endif 2034 00001A29 268B4702 <1> mov ax, word [es:bx + 2] ; ax = segment 2035 00001A2D 268B17 <1> mov dx, word [es:bx] 2036 00001A30 5B <1> pop bx 2037 <1> 2038 00001A31 F6C502 <1> test ch, 2 2039 00001A34 7574 <1> jnz int_list 2040 <1> 2041 <1> .loop_chain: 2042 00001A36 50 <1> push ax ; segment 2043 00001A37 52 <1> push dx 2044 <1> 2045 00001A38 16 <1> push ss 2046 00001A39 07 <1> pop es 2047 00001A3A E84D80 <1> call hexword 2048 00001A3D B03A <1> mov al, ':' 2049 00001A3F AA <1> stosb 2050 00001A40 89D0 <1> mov ax, dx 2051 00001A42 E84580 <1> call hexword 2052 <1> 2053 00001A45 5B <1> pop bx 2054 00001A46 5A <1> pop dx ; segment 2055 <1> 2056 00001A47 8916[AE0B] <1> mov word [intaddress + 2], dx 2057 00001A4B 891E[AC0B] <1> mov word [intaddress], bx 2058 <1> 2059 00001A4F 45 <1> inc bp 2060 00001A50 81FD0001 <1> cmp bp, 256 2061 00001A54 774C <1> ja .toomany 2062 <1> 2063 00001A56 E80703 <1> call check_int_chain 2064 00001A59 722C <1> jc .end_chain 2065 <1> 2066 00001A5B 52 <1> push dx ; segment 2067 00001A5C 50 <1> push ax 2068 00001A5D 16 <1> push ss 2069 00001A5E 07 <1> pop es 2070 00001A5F E8DD6A <1> call unhack 2071 00001A62 51 <1> push cx 2072 00001A63 E8381E <1> call copy_single_counted_string 2073 00001A66 59 <1> pop cx 2074 00001A67 E8A403 <1> call .mcbname 2075 00001A6A 51 <1> push cx 2076 00001A6B E85580 <1> call putsline_crlf 2077 00001A6E 59 <1> pop cx 2078 00001A6F E80329 <1> call handle_serial_flags_ctrl_c 2079 00001A72 E8B66A <1> call dohack 2080 00001A75 BF[B40A] <1> mov di, line_out 2081 00001A78 B8202D <1> mov ax, " -" 2082 00001A7B AB <1> stosw 2083 00001A7C B82D3E <1> mov ax, "->" 2084 00001A7F AB <1> stosw 2085 00001A80 B020 <1> mov al, 32 2086 00001A82 AA <1> stosb 2087 <1> 2088 00001A83 5A <1> pop dx 2089 00001A84 58 <1> pop ax ; (ax = segment) 2090 00001A85 EBAF <1> jmp .loop_chain 2091 <1> 2092 <1> .end_chain: 2093 00001A87 16 <1> push ss 2094 00001A88 07 <1> pop es 2095 00001A89 750A <1> jnz @F 2096 00001A8B E8B16A <1> call unhack 2097 00001A8E 51 <1> push cx 2098 00001A8F E80C1E <1> call copy_single_counted_string 2099 00001A92 59 <1> pop cx 2100 00001A93 EB03 <1> jmp @FF 2101 <1> @@: 2102 00001A95 E8A76A <1> call unhack 2103 <1> @@: 2104 00001A98 E87303 <1> call .mcbname 2105 00001A9B E82580 <1> call putsline_crlf 2106 <1> .86next: 2107 00001A9E 5E <1> pop si 2108 00001A9F 59 <1> pop cx 2109 00001AA0 5B <1> pop bx 2110 00001AA1 C3 <1> retn 2111 <1> 2112 <1> .toomany: 2113 00001AA2 BE[9120] <1> mov si, msg.di_toomany 2114 00001AA5 E8F61D <1> call copy_single_counted_string 2115 00001AA8 EBDD <1> jmp .end_chain 2116 <1> 2117 <1> %if _PM 2118 <1> .failed: 2119 <1> call unhack 2120 <1> pop dx ; discard a near return address 2121 <1> mov dx, gatewrong 2122 <1> jmp putsz 2123 <1> %endif 2124 <1> 2125 <1> 2126 <1> %if 0 2127 <1> 2128 <1> For the DIL command we fill the auxiliary buffer with entries 2129 <1> for each interrupt entrypoint. They are found by starting from 2130 <1> the IVT as well as the AMIS interrupt lists. Of course, any 2131 <1> entrypoint may be found from more than one point. 2132 <1> 2133 <1> The format is as follows: 2134 <1> 2135 <1> dword - vector 2136 <1> word - flags and AMIS multiplex number (low byte) 2137 <1> flag 200h = unclaimed, AMIS multiplex number not initialised 2138 <1> flag 100h = immediately from IVT (and is the very first entry in auxbuff) 2139 <1> if this word is -1 then it is not an entry, it is a terminator 2140 <1> word - which entry in an AMIS interrupt list 2141 <1> 2142 <1> A terminator is an entry with all ones (-1). 2143 <1> Two consecutive terminators indicate the last chain ended. 2144 <1> After a single terminator another chain follows. 2145 <1> Any chain after the very first is a hidden chain, 2146 <1> that is, its handlers are not reachable from the IVT 2147 <1> by walking the downlinks. 2148 <1> 2149 <1> A hidden chain may be found which eventually feeds into 2150 <1> another hidden chain found previously. In this case, the 2151 <1> new unique handlers (at least 1) are prepended to the 2152 <1> pre-existing hidden chain, and the downlinks past this 2153 <1> point are not walked further (as they're already known). 2154 <1> 2155 <1> If an AMIS interface points to a handler that we already 2156 <1> know (in the first IVT-based cnain or any hidden chain) 2157 <1> then its downlink will not be walked again. However, the 2158 <1> multiplex number and list index will be entered into the 2159 <1> entry for this interrupt handler. 2160 <1> 2161 <1> Finally, after the IVT and all interrupt lists of all AMIS 2162 <1> multiplexers have been processed, the auxbuff list is used 2163 <1> to display the found chains (one IVT, any amount hidden). 2164 <1> 2165 <1> %endif 2166 <1> 2167 <1> int_list: 2168 00001AAA 57 <1> push di 2169 00001AAB 51 <1> push cx 2170 00001AAC 53 <1> push bx 2171 00001AAD 92 <1> xchg ax, dx ; dx = segment 2172 <1> 2173 00001AAE 368E06[4A0A] <1> mov es, word [ss:auxbuff_segorsel] 2174 00001AB3 31FF <1> xor di, di ; -> auxbuff 2175 00001AB5 AB <1> stosw ; store offset 2176 00001AB6 92 <1> xchg ax, dx ; dx = offset 2177 00001AB7 AB <1> stosw ; store segment 2178 00001AB8 92 <1> xchg ax, dx ; dx = segment 2179 00001AB9 93 <1> xchg bx, ax ; bx = offset 2180 00001ABA B80003 <1> mov ax, 300h ; flag for IVT | unused 2181 00001ABD AB <1> stosw ; which multiplex number 2182 00001ABE 31C0 <1> xor ax, ax 2183 00001AC0 AB <1> stosw ; which int list entry = none = 0 2184 <1> 2185 <1> .loop_ivt_chain: 2186 00001AC1 E89C02 <1> call check_int_chain 2187 00001AC4 7219 <1> jc .end_ivt_chain 2188 <1> 2189 <1> %if _AUXBUFFSIZE == _AUXBUFFMAXSIZE 2190 <1> cmp di, _AUXBUFFSIZE - 8 * 3 ; enough for 1 entry + 2 terminators ? 2191 <1> %else 2192 00001AC6 3B3E[540A] <1> cmp di, word [auxbuff_current_size_minus_24] 2193 <1> %endif 2194 00001ACA 7734 <1> ja .error 2195 00001ACC 368E06[4A0A] <1> mov es, word [ss:auxbuff_segorsel] 2196 00001AD1 AB <1> stosw ; store offset 2197 00001AD2 92 <1> xchg ax, dx 2198 00001AD3 AB <1> stosw ; store segment 2199 00001AD4 92 <1> xchg ax, dx 2200 00001AD5 93 <1> xchg bx, ax 2201 00001AD6 B80002 <1> mov ax, 200h ; flag for unused 2202 00001AD9 AB <1> stosw ; found in chain = 200h 2203 00001ADA 31C0 <1> xor ax, ax 2204 00001ADC AB <1> stosw 2205 00001ADD EBE2 <1> jmp .loop_ivt_chain 2206 <1> 2207 <1> .end_ivt_chain: 2208 00001ADF B8FFFF <1> mov ax, -1 2209 00001AE2 368E06[4A0A] <1> mov es, word [ss:auxbuff_segorsel] 2210 00001AE7 B90800 <1> mov cx, 8 2211 00001AEA F3AB <1> rep stosw ; terminator is all-ones 2212 <1> ; (two terminators actually) 2213 <1> 2214 00001AEC 31C0 <1> xor ax, ax 2215 <1> .loopplex: 2216 00001AEE B000 <1> mov al, 00h ; AMIS installation check 2217 00001AF0 51 <1> push cx 2218 <1> ; function 0 changes dx, di, cx, al 2219 <1> %if _PM 2220 <1> call call_int2D 2221 <1> %else 2222 00001AF1 CD2D <1> int 2Dh ; enquire whether there's anyone 2223 <1> %endif 2224 00001AF3 59 <1> pop cx ; but we don't care who it might be 2225 00001AF4 FEC0 <1> inc al ; = FFh ? 2226 00001AF6 7503E90B01 <1> jz .search ; yes, it is in use --> 2227 <1> .nextplex: 2228 00001AFB FEC4 <1> inc ah 2229 00001AFD 75EF <1> jnz .loopplex ; try next multiplexer --> 2230 <1> 2231 <1> .done: 2232 00001AFF A8 <1> db __TEST_IMM8 ; (NC) 2233 <1> .error: 2234 00001B00 F9 <1> stc 2235 <1> 2236 00001B01 5B <1> pop bx 2237 00001B02 59 <1> pop cx 2238 00001B03 5F <1> pop di 2239 00001B04 16 <1> push ss 2240 00001B05 1F <1> pop ds 2241 00001B06 16 <1> push ss 2242 00001B07 07 <1> pop es 2243 <1> 2244 00001B08 BE[0E20] <1> mov si, msg.di_error 2245 00001B0B 7303E9B900 <1> jc .error_string 2246 <1> 2247 00001B10 31F6 <1> xor si, si 2248 <1> 2249 <1> .loop_chain: 2250 00001B12 8E1E[4A0A] <1> mov ds, word [auxbuff_segorsel] 2251 00001B16 AD <1> lodsw 2252 00001B17 92 <1> xchg ax, dx 2253 00001B18 AD <1> lodsw 2254 00001B19 833CFF <1> cmp word [si], -1 2255 00001B1C 8D7404 <1> lea si, [si + 4] 2256 00001B1F 747A <1> je .next_seq 2257 <1> 2258 <1> .next_chain: 2259 00001B21 16 <1> push ss 2260 00001B22 1F <1> pop ds 2261 <1> 2262 00001B23 50 <1> push ax ; segment 2263 00001B24 52 <1> push dx 2264 <1> 2265 00001B25 16 <1> push ss 2266 00001B26 07 <1> pop es 2267 00001B27 E8607F <1> call hexword 2268 00001B2A B03A <1> mov al, ':' 2269 00001B2C AA <1> stosb 2270 00001B2D 89D0 <1> mov ax, dx 2271 00001B2F E8587F <1> call hexword 2272 <1> 2273 00001B32 5B <1> pop bx 2274 00001B33 5A <1> pop dx ; segment 2275 <1> 2276 00001B34 8916[AE0B] <1> mov word [intaddress + 2], dx 2277 00001B38 891E[AC0B] <1> mov word [intaddress], bx 2278 <1> 2279 00001B3C 56 <1> push si 2280 00001B3D E82002 <1> call check_int_chain 2281 00001B40 722E <1> jc .end_chain 2282 <1> 2283 00001B42 16 <1> push ss 2284 00001B43 07 <1> pop es 2285 00001B44 E8F869 <1> call unhack 2286 00001B47 51 <1> push cx 2287 00001B48 E8531D <1> call copy_single_counted_string 2288 00001B4B 59 <1> pop cx 2289 00001B4C 5E <1> pop si 2290 00001B4D E88500 <1> call .mpx 2291 00001B50 56 <1> push si 2292 00001B51 E8BA02 <1> call gateout.mcbname 2293 00001B54 51 <1> push cx 2294 00001B55 E86B7F <1> call putsline_crlf 2295 00001B58 59 <1> pop cx 2296 00001B59 E81928 <1> call handle_serial_flags_ctrl_c 2297 00001B5C E8CC69 <1> call dohack 2298 00001B5F BF[B40A] <1> mov di, line_out 2299 00001B62 B8202D <1> mov ax, " -" 2300 00001B65 AB <1> stosw 2301 00001B66 B82D3E <1> mov ax, "->" 2302 00001B69 AB <1> stosw 2303 00001B6A B020 <1> mov al, 32 2304 00001B6C AA <1> stosb 2305 <1> 2306 00001B6D 5E <1> pop si 2307 00001B6E EBA2 <1> jmp .loop_chain 2308 <1> 2309 <1> .end_chain: 2310 00001B70 16 <1> push ss 2311 00001B71 07 <1> pop es 2312 00001B72 750A <1> jnz @F 2313 00001B74 E8C869 <1> call unhack 2314 00001B77 51 <1> push cx 2315 00001B78 E8231D <1> call copy_single_counted_string 2316 00001B7B 59 <1> pop cx 2317 00001B7C EB03 <1> jmp @FF 2318 <1> @@: 2319 00001B7E E8BE69 <1> call unhack 2320 <1> @@: 2321 00001B81 5E <1> pop si 2322 00001B82 E85000 <1> call .mpx 2323 00001B85 56 <1> push si 2324 00001B86 E88502 <1> call gateout.mcbname 2325 00001B89 51 <1> push cx 2326 00001B8A E8367F <1> call putsline_crlf 2327 00001B8D 59 <1> pop cx 2328 00001B8E BF[B40A] <1> mov di, line_out 2329 00001B91 E8E127 <1> call handle_serial_flags_ctrl_c 2330 00001B94 E89469 <1> call dohack 2331 00001B97 5E <1> pop si 2332 00001B98 E977FF <1> jmp .loop_chain 2333 <1> 2334 <1> .next_seq: 2335 00001B9B AD <1> lodsw 2336 00001B9C 92 <1> xchg ax, dx 2337 00001B9D AD <1> lodsw 2338 00001B9E 833CFF <1> cmp word [si], -1 2339 00001BA1 8D7404 <1> lea si, [si + 4] 2340 00001BA4 741A <1> je @F 2341 <1> 2342 00001BA6 16 <1> push ss 2343 00001BA7 1F <1> pop ds 2344 00001BA8 16 <1> push ss 2345 00001BA9 07 <1> pop es 2346 00001BAA E89269 <1> call unhack 2347 00001BAD 51 <1> push cx 2348 00001BAE 56 <1> push si 2349 00001BAF BE[1620] <1> mov si, msg.di_hidden 2350 00001BB2 E8E91C <1> call copy_single_counted_string 2351 00001BB5 5E <1> pop si 2352 00001BB6 59 <1> pop cx 2353 00001BB7 E8BB27 <1> call handle_serial_flags_ctrl_c 2354 00001BBA E86E69 <1> call dohack 2355 <1> 2356 00001BBD E961FF <1> jmp .next_chain 2357 <1> 2358 <1> @@: 2359 00001BC0 16 <1> push ss 2360 00001BC1 1F <1> pop ds 2361 00001BC2 16 <1> push ss 2362 00001BC3 07 <1> pop es 2363 00001BC4 E87869 <1> call unhack 2364 00001BC7 EB09 <1> jmp @F 2365 <1> 2366 <1> 2367 <1> .error_string: 2368 00001BC9 E8D21C <1> call copy_single_counted_string 2369 <1> 2370 00001BCC E87069 <1> call unhack 2371 00001BCF E8F17E <1> call putsline_crlf 2372 <1> @@: 2373 <1> %if 0 ; _DEBUG 2374 <1> mov es, word [auxbuff_segorsel] 2375 <1> int3 2376 <1> push ss 2377 <1> pop es 2378 <1> %endif 2379 00001BD2 E9C9FE <1> jmp gateout.86next 2380 <1> 2381 <1> 2382 <1> .mpx: 2383 00001BD5 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] 2384 00001BD9 268B44FC <1> mov ax, word [es:si - 4] 2385 00001BDD 268B54FE <1> mov dx, word [es:si - 2] 2386 00001BE1 16 <1> push ss 2387 00001BE2 07 <1> pop es 2388 00001BE3 F6C402 <1> test ah, 2 2389 00001BE6 751D <1> jnz @F 2390 00001BE8 56 <1> push si 2391 00001BE9 51 <1> push cx 2392 00001BEA BE[FA20] <1> mov si, msg.di_multiplex.1 2393 00001BED E8AE1C <1> call copy_single_counted_string 2394 00001BF0 E89E7E <1> call hexbyte 2395 00001BF3 BE[0121] <1> mov si, msg.di_multiplex.2 2396 00001BF6 E8A51C <1> call copy_single_counted_string 2397 00001BF9 92 <1> xchg ax, dx 2398 00001BFA E88D7E <1> call hexword 2399 00001BFD BE[0921] <1> mov si, msg.di_multiplex.3 2400 00001C00 E89B1C <1> call copy_single_counted_string 2401 00001C03 59 <1> pop cx 2402 00001C04 5E <1> pop si 2403 <1> @@: 2404 00001C05 C3 <1> retn 2405 <1> 2406 <1> 2407 <1> ; INP: ah = multiplex number of AMIS TSR to search through 2408 <1> ; ss:sp-> interrupt number (byte), must be preserved 2409 <1> ; CHG: es, di, dx, bx 2410 <1> .search: 2411 00001C06 B004 <1> mov al, 04h 2412 00001C08 5B <1> pop bx 2413 00001C09 53 <1> push bx ; low byte is the interrupt number 2414 <1> ; function 4 changes dx, bx, al 2415 <1> %if _PM 2416 <1> call call_int2D 2417 <1> %else 2418 00001C0A CD2D <1> int 2Dh 2419 <1> %endif 2420 00001C0C 3C03 <1> cmp al, 03h ; returned its interrupt entry ? 2421 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 2422 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 2423 <1> ; and SearchIISPChain checks the interrupt entry anyway. 2424 00001C0E 743C <1> je .search_dxbx 2425 00001C10 3C04 <1> cmp al, 04h ; returned list of hooked interrupts ? 2426 00001C12 7403E9E4FE <1> jne .nextplex ; no, try next multiplexer --> 2427 00001C17 89DF <1> mov di, bx 2428 00001C19 5B <1> pop bx 2429 00001C1A 53 <1> push bx ; bl = interrupt number 2430 00001C1B 31C9 <1> xor cx, cx ; = index into list 2431 00001C1D 88D8 <1> mov al, bl 2432 <1> .search_intlist_seg: 2433 <1> %if _PM 2434 <1> call setes2dx 2435 <1> %else 2436 00001C1F 8EC2 <1> mov es, dx ; es:di-> list 2437 <1> %endif 2438 <1> .search_intlist: ; Search the returned list for the required interrupt number. 2439 00001C21 AE <1> scasb ; our interrupt number ? 2440 00001C22 740E <1> je .search_found_intlist 2441 00001C24 26807DFF2D <1> cmp byte [es:di-1], 2Dh ; was last in list ? 2442 00001C29 7503E9CDFE <1> je .nextplex 2443 00001C2E AF <1> scasw ; skip pointer 2444 00001C2F 41 <1> inc cx 2445 00001C30 EBEF <1> jmp short .search_intlist ; try next entry --> 2446 <1> 2447 <1> .search_found_intlist: 2448 00001C32 268B1D <1> mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 2449 00001C35 AF <1> scasw ; skip pointer 2450 00001C36 52 <1> push dx ; preserve dx for .search_intlist_seg 2451 00001C37 57 <1> push di 2452 00001C38 E82100 <1> call .add 2453 00001C3B 5F <1> pop di 2454 00001C3C 5A <1> pop dx 2455 00001C3D 7303E9BEFE <1> jc .error 2456 <1> ; je .search_found ; found entry --> 2457 <1> ; This specific jump supports TSRs that hook the same 2458 <1> ; interrupt more than once; jumping to .nextplex instead 2459 <1> ; (as previously) aborts the search after the first match 2460 <1> ; in the interrupt list. This support might become useful. 2461 00001C42 3C2D <1> cmp al, 2Dh ; was last in list ? 2462 00001C44 7503E9B2FE <1> je .nextplex 2463 00001C49 41 <1> inc cx 2464 00001C4A EBD3 <1> jmp short .search_intlist_seg 2465 <1> 2466 <1> .search_dxbx: 2467 <1> %if _PM 2468 <1> call setes2dx 2469 <1> %else 2470 00001C4C 8EC2 <1> mov es, dx ; es:bx-> (IISP) interrupt entry 2471 <1> %endif 2472 <1> ; The entry we found now is possibly behind the non-IISP entry that 2473 <1> ; terminated our first SearchIISPChain call (at .hard). We then 2474 <1> ; possibly might find our entry in this hidden part of the chain. 2475 00001C4E B9FFFF <1> mov cx, -1 ; indicator for return = 3 (no list) 2476 00001C51 E80800 <1> call .add 2477 00001C54 7303E9A7FE <1> jc .error 2478 <1> ; jne .nextplex ; didn't find our entry in the chain --> 2479 00001C59 E99FFE <1> jmp .nextplex 2480 <1> 2481 <1> 2482 <1> int_list.add: 2483 00001C5C 31FF <1> xor di, di ; start at beginning of buffer 2484 00001C5E 368E1E[4A0A] <1> mov ds, word [ss:auxbuff_segorsel] 2485 <1> ; ds => auxbuff 2486 00001C63 BEFFFF <1> mov si, -1 ; check all 2487 00001C66 E8D400 <1> call .check ; check for match 2488 00001C69 7516 <1> jne @F ; not matched, di -> second terminator 2489 00001C6B F6450502 <1> testopt [di + 4], 200h ; not yet claimed by a multiplexer ? 2490 00001C6F 7503E9C700 <1> jz .error ; no, error --> 2491 00001C74 886504 <1> mov byte [di + 4], ah ; store the multiplex number 2492 00001C77 806505FD <1> clropt [di + 4], 200h ; indicate it is claimed 2493 00001C7B 894D06 <1> mov word [di + 6], cx ; = how many list entries before ours, 2494 <1> ; or = -1 if not from a list 2495 00001C7E E9B900 <1> jmp .done 2496 <1> 2497 <1> @@: 2498 <1> ; ds:di -> second terminator (will be overwritten) 2499 <1> %if _AUXBUFFSIZE == _AUXBUFFMAXSIZE 2500 <1> cmp di, _AUXBUFFSIZE - 8 * 3 ; enough for 1 entry + 2 terminators ? 2501 <1> %else 2502 00001C81 3B3E[540A] <1> cmp di, word [auxbuff_current_size_minus_24] 2503 <1> %endif 2504 00001C85 7603E9B100 <1> ja .error 2505 00001C8A 8D75F8 <1> lea si, [di - 8] ; check up to this point later 2506 <1> ; si -> first of two terminators 2507 <1> 2508 00001C8D 93 <1> xchg ax, bx 2509 00001C8E 368E06[4A0A] <1> mov es, word [ss:auxbuff_segorsel] 2510 <1> ; => auxbuff 2511 00001C93 AB <1> stosw ; store offset 2512 00001C94 92 <1> xchg ax, dx ; dx = offset 2513 00001C95 AB <1> stosw ; store segment 2514 00001C96 92 <1> xchg ax, dx ; dx = segment 2515 00001C97 93 <1> xchg ax, bx ; dx:bx = vector -> handler 2516 00001C98 50 <1> push ax 2517 00001C99 B000 <1> mov al, 0 ; flags = 0 (claimed, not IVT) 2518 00001C9B 86C4 <1> xchg al, ah 2519 00001C9D AB <1> stosw ; which multiplex number 2520 00001C9E 89C8 <1> mov ax, cx 2521 00001CA0 AB <1> stosw ; which int list entry 2522 00001CA1 58 <1> pop ax ; preserve multiplex number 2523 <1> 2524 <1> .loop_chain: 2525 00001CA2 50 <1> push ax 2526 00001CA3 56 <1> push si 2527 00001CA4 E8B900 <1> call check_int_chain ; does it go on ? 2528 00001CA7 5E <1> pop si 2529 00001CA8 5B <1> pop bx 2530 00001CA9 727E <1> jc .end_chain ; no --> 2531 <1> 2532 <1> %if _AUXBUFFSIZE == _AUXBUFFMAXSIZE 2533 <1> cmp di, _AUXBUFFSIZE - 8 * 3 ; enough for 1 entry + 2 terminators ? 2534 <1> %else 2535 00001CAB 3B3E[540A] <1> cmp di, word [auxbuff_current_size_minus_24] 2536 <1> %endif 2537 00001CAF 7603E98700 <1> ja .error 2538 00001CB4 368E06[4A0A] <1> mov es, word [ss:auxbuff_segorsel] 2539 00001CB9 AB <1> stosw ; store offset 2540 00001CBA 92 <1> xchg ax, dx 2541 00001CBB AB <1> stosw ; store segment 2542 00001CBC 92 <1> xchg ax, dx 2543 00001CBD 93 <1> xchg bx, ax ; ah = multiplex number, bx = offset 2544 00001CBE 50 <1> push ax 2545 00001CBF B80002 <1> mov ax, 200h 2546 00001CC2 AB <1> stosw ; found in chain = 200h (unclaimed) 2547 00001CC3 31C0 <1> xor ax, ax 2548 00001CC5 AB <1> stosw 2549 00001CC6 58 <1> pop ax 2550 00001CC7 57 <1> push di 2551 00001CC8 31FF <1> xor di, di ; start at beginning 2552 00001CCA E87000 <1> call .check ; already listed in another chain ? 2553 00001CCD 7403 <1> je @F 2554 00001CCF 5F <1> pop di 2555 00001CD0 EBD0 <1> jmp .loop_chain ; no, try to walk downlink --> 2556 <1> 2557 <1> @@: 2558 00001CD2 5B <1> pop bx 2559 <1> 2560 <1> ; The idea is that if the AMIS interrupt list 2561 <1> ; pointed to an entry not yet matched then 2562 <1> ; it is the start of a hidden chain. If a 2563 <1> ; subsequent handler in this hidden chain 2564 <1> ; points to another handler that does match 2565 <1> ; this can only be a valid case if this other 2566 <1> ; handler also was the start of a hidden chain. 2567 <1> ; If this is the case, prepend the unique new 2568 <1> ; handlers to that hidden chain in the buffer. 2569 00001CD3 F6450501 <1> testopt [di + 4], 100h ; is it from the IVT ? (very first entry) 2570 00001CD7 7562 <1> jnz .error ; yes, error --> 2571 00001CD9 837DFCFF <1> cmp word [di - 8 + 4], -1 ; is it the start of a hidden chain ? 2572 00001CDD 755C <1> jne .error ; no, error --> 2573 <1> ; di -> match (insert to move here) 2574 <1> ; bx -> after repeat 2575 <1> ; bx - 8 -> repeat 2576 <1> ; bx - 16 -> last entry to move (at least 1 to move) 2577 <1> ; si -> single terminator 2578 <1> ; si + 8 -> first entry to move (at least 1 to move) 2579 <1> 2580 00001CDF 83EB10 <1> sub bx, 16 ; -> last entry to move 2581 <1> 2582 <1> .insert: 2583 <1> ; di -> match (insert to move here) 2584 <1> ; bx + 8 -> repeat 2585 <1> ; bx -> last entry to move 2586 <1> ; si -> single terminator 2587 <1> ; si + 8 -> first entry to move 2588 <1> 2589 00001CE2 FF7706 <1> push word [bx + 6] 2590 00001CE5 FF7704 <1> push word [bx + 4] 2591 00001CE8 FF7702 <1> push word [bx + 2] 2592 00001CEB FF37 <1> push word [bx] ; get the last entry 2593 00001CED 57 <1> push di 2594 00001CEE 56 <1> push si 2595 00001CEF 51 <1> push cx ; preserve interrupt list index 2596 00001CF0 368E06[4A0A] <1> mov es, word [ss:auxbuff_segorsel] 2597 00001CF5 89F9 <1> mov cx, di ; = where to insert 2598 <1> ; -> first to displace 2599 00001CF7 F7D9 <1> neg cx 2600 00001CF9 89DE <1> mov si, bx ; -> after end of source 2601 00001CFB 8D7F08 <1> lea di, [bx + 8] ; -> after end of dest 2602 00001CFE 01F1 <1> add cx, si ; after end of source - first to displace 2603 <1> ; = how many bytes to displace 2604 00001D00 D1E9 <1> shr cx, 1 2605 00001D02 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 2606 00001D03 A7 <1> cmpsw ; si -= 2, di -= 2 2607 <1> 2608 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 2609 <1> ; Refer to comment in init.asm init_movp. 2610 <1> 2611 <1> %if _AMD_ERRATUM_109_WORKAROUND 2612 00001D04 E308 <1> jcxz @FF 2613 00001D06 83F914 <1> cmp cx, 20 2614 00001D09 7703 <1> ja @FF 2615 <1> @@: 2616 00001D0B A5 <1> movsw 2617 00001D0C E2FD <1> loop @B 2618 <1> @@: 2619 <1> %endif 2620 00001D0E F3A5 <1> rep movsw ; relocate up the following entries 2621 <1> ; by 8 bytes (size of 1 entry) 2622 00001D10 FC <1> cld 2623 00001D11 59 <1> pop cx 2624 00001D12 5E <1> pop si 2625 00001D13 5F <1> pop di 2626 00001D14 8F05 <1> pop word [di] 2627 00001D16 8F4502 <1> pop word [di + 2] 2628 00001D19 8F4504 <1> pop word [di + 4] 2629 00001D1C 8F4506 <1> pop word [di + 6] ; insert moved entry 2630 00001D1F 83C608 <1> add si, 8 ; -> at moved single terminator 2631 <1> 2632 <1> ; di -> match (inserted here, insert next here) 2633 <1> ; bx + 8 -> repeat 2634 <1> ; bx -> last entry to move (if any) 2635 <1> ; si -> single terminator 2636 <1> ; si + 8 -> first entry to move 2637 00001D22 39DE <1> cmp si, bx ; if last to move != terminator 2638 00001D24 75BC <1> jne .insert ; then move another -> 2639 00001D26 89F7 <1> mov di, si ; -> where to put double terminator 2640 <1> 2641 00001D28 93 <1> xchg ax, bx 2642 <1> .end_chain: 2643 00001D29 53 <1> push bx 2644 00001D2A 51 <1> push cx ; preserve interrupt list index 2645 00001D2B B8FFFF <1> mov ax, -1 2646 00001D2E 368E06[4A0A] <1> mov es, word [ss:auxbuff_segorsel] 2647 00001D33 B90800 <1> mov cx, 8 2648 00001D36 F3AB <1> rep stosw ; terminator is all-ones 2649 <1> ; (two terminators actually) 2650 00001D38 59 <1> pop cx 2651 00001D39 58 <1> pop ax ; preserve multiplex number 2652 <1> 2653 <1> .done: 2654 00001D3A A8 <1> db __TEST_IMM8 ; (NC) 2655 <1> .error: 2656 00001D3B F9 <1> stc 2657 <1> 2658 00001D3C C3 <1> retn 2659 <1> 2660 <1> 2661 <1> ; INP: dx:bx = 86 Mode far pointer to handler 2662 <1> ; di -> to check 2663 <1> ; si = end of area to check (-1 = check all) 2664 <1> ; OUT: ZR if match found, ds:di -> matching entry 2665 <1> ; NZ if no match found, 2666 <1> ; di -> at second consecutive terminator 2667 <1> ; or di >= si 2668 <1> ; CHG: - 2669 <1> ; STT: ds => auxbuff 2670 <1> ; REM: continues loop if di < si and the flags word 2671 <1> ; is not -1 in two consecutive entries. 2672 <1> ; an entry with a flags word -1 is skipped. 2673 <1> .check: 2674 00001D3D 391D <1> cmp word [di + 0], bx 2675 00001D3F 7506 <1> jne .mismatch 2676 00001D41 395502 <1> cmp word [di + 2], dx 2677 00001D44 7501 <1> jne .mismatch 2678 <1> .match: 2679 00001D46 C3 <1> retn ; (ZR) 2680 <1> 2681 <1> .mismatch: 2682 00001D47 83C708 <1> add di, 8 2683 <1> 2684 00001D4A 39F7 <1> cmp di, si 2685 00001D4C 730F <1> jae .checkret 2686 <1> 2687 00001D4E 837D04FF <1> cmp word [di + 4], -1 2688 00001D52 75E9 <1> jne .check 2689 <1> 2690 00001D54 83C708 <1> add di, 8 2691 00001D57 837D04FF <1> cmp word [di + 4], -1 2692 00001D5B 75E0 <1> jne .check 2693 <1> .checkret: 2694 00001D5D 85FF <1> test di, di ; (NZ) 2695 00001D5F C3 <1> retn 2696 <1> 2697 <1> 2698 <1> ; INP: dx:bx = 86 Mode far pointer to int handler 2699 <1> ; OUT: NC if chain found, 2700 <1> ; dx:ax = 86 Mode far pointer to next 2701 <1> ; ss:si -> type message (counted) 2702 <1> ; CY if chain not found, 2703 <1> ; NZ if no chain 2704 <1> ; ZR if chain but next is FFFFh:FFFFh, 2705 <1> ; ss:si -> type message 2706 <1> ; STT: es != ss, ds != ss 2707 <1> check_int_chain: 2708 <1> %if _PM 2709 <1> call setes2dx 2710 <1> %else 2711 00001D60 8EC2 <1> mov es, dx ; es:bx -> entrypoint 2712 <1> %endif 2713 00001D62 E89B97 <1> call IsIISPEntry? 2714 00001D65 7531 <1> jnz .not_iisp 2715 <1> 2716 00001D67 26FF7704 <1> push word [es:bx + ieNext + 2] 2717 00001D6B 26FF7702 <1> push word [es:bx + ieNext] 2718 <1> 2719 00001D6F BE[3A20] <1> mov si, msg.di_uninst_iisp 2720 00001D72 26813F90EA <1> cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 2721 00001D77 7414 <1> je @F 2722 00001D79 BE[1E20] <1> mov si, msg.di_iisp 2723 00001D7C 26807F09EB <1> cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ? 2724 00001D81 7507 <1> jne .nonstd 2725 00001D83 26813FEB10 <1> cmp word [ es:bx + ieEntry ], 010EBh ; jmp short $+18 ? 2726 00001D88 7403 <1> je @F 2727 <1> .nonstd: 2728 00001D8A BE[2620] <1> mov si, msg.di_nonstd_iisp 2729 <1> @@: 2730 00001D8D 58 <1> pop ax 2731 00001D8E 5A <1> pop dx ; segment 2732 <1> 2733 00001D8F 50 <1> push ax 2734 00001D90 21D0 <1> and ax, dx 2735 00001D92 40 <1> inc ax 2736 00001D93 58 <1> pop ax 2737 00001D94 7476 <1> jz .CY 2738 <1> 2739 00001D96 F8 <1> clc 2740 00001D97 C3 <1> retn 2741 <1> 2742 <1> 2743 <1> .not_iisp: 2744 00001D98 83FBF8 <1> cmp bx, -8 2745 00001D9B 771A <1> ja .not_fd 2746 00001D9D 26803FE8 <1> cmp byte [es:bx], 0E8h 2747 00001DA1 7514 <1> jne .not_fd 2748 00001DA3 26807F03EA <1> cmp byte [es:bx + 3], 0EAh 2749 00001DA8 750D <1> jne .not_fd 2750 00001DAA 26FF7706 <1> push word [es:bx + 4 + 2] 2751 00001DAE 26FF7704 <1> push word [es:bx + 4] 2752 00001DB2 BE[4E20] <1> mov si, msg.di_freedos_reloc 2753 00001DB5 EBD6 <1> jmp @B 2754 <1> 2755 <1> .not_fd: 2756 00001DB7 83FBFB <1> cmp bx, -5 2757 00001DBA 7713 <1> ja .not_jmpfar 2758 00001DBC BE[6120] <1> mov si, msg.di_jmpfar 2759 00001DBF 26803FEA <1> cmp byte [es:bx], 0EAh 2760 00001DC3 750A <1> jne .not_jmpfar 2761 00001DC5 26FF7703 <1> push word [es:bx + 1 + 2] 2762 00001DC9 26FF7701 <1> push word [es:bx + 1] 2763 00001DCD EBBE <1> jmp @B 2764 <1> 2765 <1> .not_jmpfar: 2766 00001DCF BE[7020] <1> mov si, msg.di_jmpfarindirect 2767 00001DD2 26803FEB <1> cmp byte [es:bx], 0EBh 2768 00001DD6 750D <1> jne .not_testhook_try_jmpfarindirect 2769 00001DD8 BE[8420] <1> mov si, msg.di_testhook 2770 00001DDB 268A4701 <1> mov al, byte [es:bx + 1] 2771 00001DDF 98 <1> cbw 2772 00001DE0 83C002 <1> add ax, 2 2773 00001DE3 01C3 <1> add bx, ax 2774 <1> .not_testhook_try_jmpfarindirect: 2775 00001DE5 83FBFA <1> cmp bx, -6 2776 00001DE8 7720 <1> ja .not_testhook_or_jmpfarindirect 2777 00001DEA 26813F2EFF <1> cmp word [es:bx], 0FF2Eh 2778 00001DEF 7519 <1> jne .not_testhook_or_jmpfarindirect 2779 00001DF1 26807F022E <1> cmp byte [es:bx + 2], 2Eh 2780 00001DF6 7512 <1> jne .not_testhook_or_jmpfarindirect 2781 00001DF8 268B5F03 <1> mov bx, word [es:bx + 3] 2782 00001DFC 83FBFC <1> cmp bx, -4 2783 00001DFF 7709 <1> ja .not_testhook_or_jmpfarindirect 2784 00001E01 26FF7702 <1> push word [es:bx + 2] 2785 00001E05 26FF37 <1> push word [es:bx] 2786 00001E08 EB83 <1> jmp @B 2787 <1> 2788 <1> .not_testhook_or_jmpfarindirect: 2789 00001E0A 85E4 <1> test sp, sp ; NZ 2790 <1> .CY: 2791 00001E0C F9 <1> stc 2792 00001E0D C3 <1> retn 2793 <1> 2794 <1> 2795 <1> gateout.mcbname: 2796 00001E0E F6C501 <1> test ch, 1 2797 00001E11 7503E99800 <1> jz .ret 2798 00001E16 8B16[220B] <1> mov dx, word [firstmcb] 2799 00001E1A 83FAFF <1> cmp dx, -1 2800 00001E1D 7503E98C00 <1> je .ret 2801 00001E22 51 <1> push cx 2802 00001E23 A1[AC0B] <1> mov ax, word [intaddress] 2803 00001E26 B104 <1> mov cl, 4 2804 00001E28 D3E8 <1> shr ax, cl 2805 00001E2A 0306[AE0B] <1> add ax, word [intaddress + 2] ; => segment of handler 2806 00001E2E 724F <1> jc .hma 2807 <1> .loop: 2808 <1> %if _PM 2809 <1> call setes2dx 2810 <1> %else 2811 00001E30 8EC2 <1> mov es, dx 2812 <1> %endif 2813 00001E32 89D1 <1> mov cx, dx 2814 00001E34 26030E0300 <1> add cx, word [es:3] 2815 00001E39 41 <1> inc cx 2816 00001E3A 39D0 <1> cmp ax, dx 2817 00001E3C 7246 <1> jb .next 2818 00001E3E 39C8 <1> cmp ax, cx 2819 00001E40 7342 <1> jae .next 2820 00001E42 268B160100 <1> mov dx, word [es:1] 2821 00001E47 BE[BE20] <1> mov si, msg.di_system_mcb 2822 00001E4A 83FA50 <1> cmp dx, 50h 2823 00001E4D 7259 <1> jb .copy 2824 00001E4F 4A <1> dec dx 2825 <1> %if _PM 2826 <1> call setes2dx 2827 <1> %else 2828 00001E50 8EC2 <1> mov es, dx 2829 <1> %endif 2830 00001E52 06 <1> push es 2831 00001E53 1F <1> pop ds 2832 00001E54 16 <1> push ss 2833 00001E55 07 <1> pop es 2834 00001E56 B020 <1> mov al, 32 2835 00001E58 AA <1> stosb 2836 00001E59 89F8 <1> mov ax, di 2837 00001E5B BE0800 <1> mov si, 8 2838 00001E5E 89F1 <1> mov cx, si 2839 00001E60 57 <1> push di 2840 00001E61 F3A4 <1> rep movsb 2841 00001E63 B000 <1> mov al, 0 2842 00001E65 AA <1> stosb ; append zero-value byte 2843 00001E66 5F <1> pop di ; -> name in buffer 2844 00001E67 16 <1> push ss 2845 00001E68 1F <1> pop ds 2846 <1> @@: 2847 00001E69 AE <1> scasb ; is it zero ? 2848 00001E6A 75FD <1> jne @B ; no, continue --> 2849 <1> ; first dec makes it -> at the zero 2850 <1> @@: 2851 00001E6C 4F <1> dec di 2852 00001E6D 39F8 <1> cmp ax, di 2853 00001E6F 7408 <1> je .empty 2854 00001E71 807DFF20 <1> cmp byte [di - 1], 32 2855 00001E75 74F5 <1> je @B 2856 00001E77 EB34 <1> jmp .ret_cx 2857 <1> 2858 <1> .empty: 2859 00001E79 4F <1> dec di 2860 00001E7A BE[AE20] <1> mov si, msg.di_empty 2861 00001E7D EB29 <1> jmp .copy 2862 <1> 2863 <1> .hma: 2864 00001E7F BE[E820] <1> mov si, msg.di_hma 2865 00001E82 EB24 <1> jmp .copy 2866 <1> 2867 <1> .next: 2868 00001E84 89CA <1> mov dx, cx 2869 00001E86 3B16[240B] <1> cmp dx, word [firstumcb]; is next one the first UMCB ? 2870 00001E8A 74A4 <1> je .loop ; yes, ignore the "Z" (if any) --> 2871 00001E8C 26803E00004D <1> cmp byte [es:0], "M" ; check current signature 2872 00001E92 749C <1> je .loop ; if "M" then loop to next --> 2873 <1> 2874 00001E94 8B36[240B] <1> mov si, word [firstumcb] 2875 00001E98 46 <1> inc si 2876 00001E99 7503 <1> jnz @F 2877 00001E9B BE00A0 <1> mov si, 0A000h 2878 <1> @@: 2879 00001E9E 39F0 <1> cmp ax, si 2880 00001EA0 BE[CA20] <1> mov si, msg.di_system_upper 2881 00001EA3 7303 <1> jae @F 2882 00001EA5 BE[D920] <1> mov si, msg.di_system_low 2883 <1> @@: 2884 <1> .copy: 2885 00001EA8 16 <1> push ss 2886 00001EA9 07 <1> pop es 2887 00001EAA E8F119 <1> call copy_single_counted_string 2888 <1> .ret_cx: 2889 00001EAD 59 <1> pop cx 2890 <1> .ret: 2891 00001EAE C3 <1> retn 2892 <1> 2893 <1> %endif 2894 <1> 2895 <1> %if _MCB 2896 <1> ; DM command 2897 <1> mcbout: 2898 00001EAF E82D7B <1> call skipwhite 2899 00001EB2 8B16[220B] <1> mov dx, word [firstmcb] 2900 00001EB6 E8D17A <1> call iseol? 2901 00001EB9 7406 <1> je .lolmcb 2902 00001EBB E89B79 <1> nearcall getword 2903 00001EBE E8DE7A <1> call chkeol 2904 <1> .lolmcb: 2905 00001EC1 89D6 <1> mov si, dx 2906 00001EC3 BF[B40A] <1> mov di, line_out 2907 00001EC6 B85053 <1> mov ax, "PS" 2908 00001EC9 AB <1> stosw 2909 00001ECA B8503A <1> mov ax, "P:" 2910 00001ECD AB <1> stosw 2911 00001ECE B020 <1> mov al, 32 2912 00001ED0 AA <1> stosb 2913 00001ED1 A1[000B] <1> mov ax, word [pspdbe] 2914 00001ED4 E8B37B <1> call hexword 2915 00001ED7 E8E97B <1> call putsline_crlf ; destroys cx,dx,bx 2916 00001EDA B14D <1> mov cl, 'M' 2917 <1> .next: 2918 00001EDC 83FEFF <1> cmp si, byte -1 2919 00001EDF 7405 <1> je .invmcb 2920 00001EE1 83FE50 <1> cmp si, byte 50h 2921 00001EE4 7306 <1> jae .valmcb 2922 <1> .invmcb: 2923 00001EE6 BA[7213] <1> mov dx, msg.invmcbadr 2924 00001EE9 E9C780 <1> jmp putsz 2925 <1> .valmcb: 2926 00001EEC BF[B40A] <1> mov di, line_out 2927 00001EEF 1E <1> push ds 2928 <1> %if _PM 2929 <1> call setds2si 2930 <1> %else 2931 00001EF0 8EDE <1> mov ds, si 2932 <1> %endif 2933 00001EF2 8A2E0000 <1> mov ch, byte [0000] 2934 00001EF6 8B1E0100 <1> mov bx, word [0001] 2935 00001EFA 8B160300 <1> mov dx, word [0003] 2936 <1> 2937 00001EFE 89F0 <1> mov ax, si 2938 00001F00 E8877B <1> call hexword ; segment address of MCB 2939 00001F03 B020 <1> mov al, 32 2940 00001F05 AA <1> stosb 2941 00001F06 88E8 <1> mov al, ch 2942 00001F08 E8867B <1> call hexbyte ; 'M' or 'Z' 2943 00001F0B B020 <1> mov al, 32 2944 00001F0D AA <1> stosb 2945 00001F0E 89D8 <1> mov ax, bx 2946 00001F10 E8777B <1> call hexword ; MCB owner 2947 00001F13 B020 <1> mov al, 32 2948 00001F15 AA <1> stosb 2949 00001F16 89D0 <1> mov ax, dx 2950 00001F18 E86F7B <1> call hexword ; MCB size in paragraphs 2951 <1> 2952 00001F1B B020 <1> mov al, 32 2953 00001F1D AA <1> stosb 2954 00001F1E 89D0 <1> mov ax, dx ; ax = size in paragraphs 2955 00001F20 53 <1> push bx 2956 00001F21 50 <1> push ax 2957 00001F22 52 <1> push dx 2958 00001F23 51 <1> push cx 2959 00001F24 31D2 <1> xor dx, dx ; dx:ax = size in paragraphs 2960 00001F26 B91000 <1> mov cx, 16 ; cx = 16, multiplier (get size in bytes) 2961 00001F29 BB0800 <1> mov bx, 4+4 ; bx = 4+4, width 2962 <1> 2963 00001F2C E89900 <1> call disp_dxax_times_cx_width_bx_size.store 2964 00001F2F 59 <1> pop cx 2965 00001F30 5A <1> pop dx 2966 00001F31 58 <1> pop ax 2967 00001F32 5B <1> pop bx 2968 <1> 2969 00001F33 85DB <1> test bx, bx 2970 00001F35 7471 <1> jz .freemcb ; free MCBs have no name --> 2971 00001F37 B020 <1> mov al, 32 2972 00001F39 AA <1> stosb 2973 00001F3A 56 <1> push si 2974 00001F3B 51 <1> push cx 2975 00001F3C 52 <1> push dx 2976 <1> 2977 00001F3D 1E <1> push ds 2978 00001F3E BE0800 <1> mov si, 8 2979 00001F41 B90200 <1> mov cx, 2 2980 00001F44 39F3 <1> cmp bx, si ; is it a "system" MCB? (owner 0008h or 0007h) 2981 00001F46 7707 <1> ja @F 2982 00001F48 803C53 <1> cmp byte [si], "S" ; "S", "SD", "SC" ? 2983 00001F4B 7407 <1> je .nextmcbchar ; yes, limit name to two characters --> 2984 00001F4D EB03 <1> jmp .nextmcbchar_cx_si ; no, assume full name given 2985 <1> @@: 2986 00001F4F 4B <1> dec bx ; => owner block's MCB 2987 <1> %if _PM 2988 <1> call setds2bx 2989 <1> %else 2990 00001F50 8EDB <1> mov ds, bx 2991 <1> %endif 2992 <1> .nextmcbchar_cx_si: 2993 00001F52 89F1 <1> mov cx, si ; = 8 2994 <1> .nextmcbchar: ; copy name of owner MCB 2995 00001F54 AC <1> lodsb 2996 00001F55 AA <1> stosb 2997 00001F56 84C0 <1> test al, al 2998 00001F58 E0FA <1> loopnz .nextmcbchar ; was not NUL and more bytes left ? 2999 00001F5A 84C0 <1> test al, al 3000 00001F5C 7501 <1> jnz @F 3001 00001F5E 4F <1> dec di 3002 <1> @@: 3003 00001F5F 1F <1> pop ds 3004 <1> 3005 00001F60 833E010008 <1> cmp word [1], 8 3006 00001F65 753E <1> jne .not_s_mcb 3007 00001F67 833E080053 <1> cmp word [8], "S" ; S MCB ? 3008 00001F6C 7537 <1> jne .not_s_mcb 3009 <1> 3010 00001F6E B82074 <1> mov ax, " t" 3011 00001F71 AB <1> stosw 3012 00001F72 B87970 <1> mov ax, "yp" 3013 00001F75 AB <1> stosw 3014 00001F76 B86520 <1> mov ax, "e " 3015 00001F79 AB <1> stosw 3016 <1> 3017 00001F7A 31C0 <1> xor ax, ax 3018 00001F7C A00A00 <1> mov al, [10] 3019 00001F7F E80F7B <1> call hexbyte 3020 <1> 3021 00001F82 16 <1> push ss 3022 00001F83 1F <1> pop ds 3023 00001F84 BE[A82C] <1> mov si, smcbtypes 3024 <1> .s_mcb_loop: 3025 00001F87 833CFF <1> cmp word [si], -1 3026 00001F8A 740E <1> je .s_mcb_unknown 3027 00001F8C 3904 <1> cmp word [si], ax 3028 00001F8E 7405 <1> je .s_mcb_known 3029 00001F90 83C604 <1> add si, 4 3030 00001F93 EBF2 <1> jmp .s_mcb_loop 3031 <1> 3032 <1> .s_mcb_known: 3033 00001F95 8B7402 <1> mov si, word [si + 2] 3034 00001F98 EB03 <1> jmp .s_mcb_common 3035 <1> 3036 <1> .s_mcb_unknown: 3037 00001F9A BE[D732] <1> mov si, smcbmsg_unknown 3038 <1> .s_mcb_common: 3039 00001F9D B020 <1> mov al, 32 3040 <1> @@: 3041 00001F9F AA <1> stosb 3042 00001FA0 AC <1> lodsb 3043 00001FA1 84C0 <1> test al, al 3044 00001FA3 75FA <1> jnz @B 3045 <1> 3046 <1> .not_s_mcb: 3047 00001FA5 5A <1> pop dx 3048 00001FA6 59 <1> pop cx 3049 00001FA7 5E <1> pop si 3050 <1> .freemcb: 3051 <1> 3052 00001FA8 1F <1> pop ds 3053 00001FA9 80FD4D <1> cmp ch, 'M' 3054 00001FAC 7406 <1> je .disp 3055 00001FAE 80FD5A <1> cmp ch, 'Z' 3056 00001FB1 7401 <1> je .disp 3057 <1> .ret: 3058 00001FB3 C3 <1> retn 3059 <1> 3060 <1> .disp: 3061 00001FB4 88E9 <1> mov cl, ch 3062 00001FB6 52 <1> push dx 3063 00001FB7 51 <1> push cx 3064 00001FB8 E8087B <1> call putsline_crlf ; destroys cx,dx,bx 3065 00001FBB 59 <1> pop cx 3066 00001FBC 5A <1> pop dx 3067 00001FBD 01D6 <1> add si, dx 3068 00001FBF 72F2 <1> jc .ret ; over FFFFh, must be end of chain --> (hmm) 3069 00001FC1 46 <1> inc si 3070 00001FC2 74EF <1> jz .ret 3071 00001FC4 E915FF <1> jmp .next 3072 <1> 3073 <1> %if _PM 3074 <1> setds2si: 3075 <1> mov bx, si 3076 <1> setds2bx: 3077 <1> call ispm 3078 <1> jnz sd2s_ex 3079 <1> mov dx, bx 3080 <1> call setrmsegm 3081 <1> sd2s_ex: 3082 <1> mov ds, bx 3083 <1> retn 3084 <1> %endif ; _PM 3085 <1> %endif ; _MCB 3086 <1> 3087 <1> ;--- DX command. Display extended memory 3088 <1> 3089 <1> %if _PM 3090 <1> [cpu 386] 3091 <1> extmem: 3092 <1> %if _DTOP 3093 <1> call ddd.handletop 3094 <1> %else 3095 <1> call skipwhite 3096 <1> %endif 3097 <1> mov dx, word [x_addr+0] 3098 <1> mov bx, word [x_addr+2] 3099 <1> call iseol? 3100 <1> je extmem_1 3101 <1> nearcall getdword ; get linear address into bx:dx 3102 <1> call chkeol ; expect end of line here 3103 <1> extmem_1: 3104 <1> mov word [lastcmd], extmem 3105 <1> push bx 3106 <1> push dx 3107 <1> pop ebp 3108 <1> 3109 <1> mov di, stack ; create a GDT for Int15.87 3110 <1> xor ax, ax 3111 <1> mov cx, 8 3112 <1> rep stosw 3113 <1> mov ax, 007Fh 3114 <1> stosw 3115 <1> mov ax, dx 3116 <1> stosw 3117 <1> mov al, bl 3118 <1> stosb 3119 <1> mov ax, 0093h 3120 <1> stosw 3121 <1> mov al, bh 3122 <1> stosb 3123 <1> mov ax, 007Fh 3124 <1> stosw 3125 <1> mov ax, line_out + 128 3126 <1> mov bx, word [pspdbg] 3127 <1> movzx ebx, bx 3128 <1> shl ebx, 4 3129 <1> movzx eax, ax 3130 <1> add eax, ebx ; eax = flat address of line_out + 128 3131 <1> stosw 3132 <1> shr eax, 16 3133 <1> stosb 3134 <1> mov bl, ah 3135 <1> mov ax, 0093h 3136 <1> stosw 3137 <1> mov al, bl 3138 <1> stosb 3139 <1> mov cx, 8 3140 <1> xor ax, ax 3141 <1> rep stosw 3142 <1> 3143 <1> call ispm 3144 <1> mov si, stack 3145 <1> mov cx, 0040h 3146 <1> mov ah, 87h 3147 <1> jnz extmem_rm 3148 <1> push word [pspdbg] 3149 <1> push 15h 3150 <1> call intcall 3151 <1> jmp short i15ok 3152 <1> extmem_rm: 3153 <1> int 15h 3154 <1> i15ok: 3155 <1> jc extmem_exit 3156 <1> mov si, line_out + 128 3157 <1> mov ch, 8h 3158 <1> nexti15l: 3159 <1> call handle_serial_flags_ctrl_c 3160 <1> mov di, line_out 3161 <1> mov eax, ebp 3162 <1> call hexword_high 3163 <1> call hexword 3164 <1> mov ax, 32<<8|32 3165 <1> stosw 3166 <1> mov bx, line_out+10+3*16 3167 <1> mov cl, 10h 3168 <1> nexti15b: 3169 <1> lodsb 3170 <1> call dd_store 3171 <1> mov al, 32 3172 <1> stosb 3173 <1> dec cl 3174 <1> jnz nexti15b 3175 <1> mov byte [di-(8*3+1)], '-' ; display a '-' after 8 bytes 3176 <1> add di, 16 3177 <1> push cx 3178 <1> call putsline_crlf 3179 <1> pop cx 3180 <1> add ebp, byte 10h 3181 <1> dec ch 3182 <1> jnz nexti15l 3183 <1> mov dword [x_addr], ebp 3184 <1> extmem_exit: 3185 <1> retn 3186 <1> __CPU__ 3187 <1> %endif 3188 <1> 3189 <1> ; INP: dx:ax = numerator 3190 <1> ; cx = multiplier (0 to take si:dx:ax as numerator) 3191 <1> ; bx = field width 3192 <1> ; es:di -> buffer where to store 3193 <1> ; STT: UP, ds = ss 3194 <1> ; OUT: written to buffer, es:di -> behind written string 3195 <1> disp_dxax_times_cx_width_bx_size: section_of_function 3196 00001FC7 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 3197 <1> .store: 3198 00001FC8 F9 <1> stc 3199 <1> 3200 <1> lframe near 3201 <1> lequ 4 + 4 + 2, buffer_size 3202 <1> ; 4: "2048" (maximum number) 3203 <1> ; 4: " ?iB" (IEC prefixed unit) 3204 <1> ; 2: ??? 3205 <1> lvar ?buffer_size, buffer 3206 <1> lvar 6, dividend 3207 00001FC9 5589E58D66F0 <1> lenter 3208 <1> lvar word, bit_0_is_store 3209 00001FCF 9C <1> pushf 3210 <1> lvar word, width 3211 00001FD0 53 <1> push bx 3212 00001FD1 56 <1> push si 3213 00001FD2 1E <1> push ds 3214 00001FD3 51 <1> push cx 3215 00001FD4 50 <1> push ax 3216 00001FD5 52 <1> push dx 3217 00001FD6 06 <1> push es 3218 00001FD7 57 <1> push di 3219 <1> 3220 00001FD8 16 <1> push ss ; push cs 3221 00001FD9 1F <1> pop ds 3222 00001FDA 16 <1> push ss 3223 00001FDB 07 <1> pop es 3224 <1> 3225 00001FDC E310 <1> jcxz .use_si 3226 <1> 3227 00001FDE 52 <1> push dx 3228 00001FDF F7E1 <1> mul cx 3229 00001FE1 97 <1> xchg ax, di 3230 00001FE2 87D6 <1> xchg dx, si ; si:di = first mul 3231 <1> 3232 00001FE4 58 <1> pop ax 3233 00001FE5 F7E1 <1> mul cx 3234 00001FE7 01F0 <1> add ax, si 3235 00001FE9 83D200 <1> adc dx, 0 ; dx:ax = second mul + adj, dx:ax:di = mul 3236 <1> 3237 00001FEC EB05 <1> jmp @F 3238 <1> 3239 <1> .use_si: 3240 00001FEE 89C7 <1> mov di, ax 3241 00001FF0 92 <1> xchg ax, dx 3242 00001FF1 89F2 <1> mov dx, si 3243 <1> 3244 <1> @@: 3245 00001FF3 897EF0 <1> mov word [bp + ?dividend], di 3246 00001FF6 8946F2 <1> mov word [bp + ?dividend + 2], ax 3247 00001FF9 8956F4 <1> mov word [bp + ?dividend + 4], dx 3248 <1> 3249 <1> ; set up divisor for the unit prefixes 3250 00001FFC B90004 <1> mov cx, 1024 ; 1000 here if SI units 3251 00001FFF F606[A100]10 <1> testopt [options], use_si_units ; SI units ? 3252 00002004 7403 <1> jz @F ; no --> 3253 00002006 B9E803 <1> mov cx, 1000 ; yes, use 1000 3254 <1> @@: 3255 <1> 3256 00002009 BE[7724] <1> mov si, msg.prefixes ; -> first prefix (blank) 3257 <1> .loop: 3258 0000200C 837EF400 <1> cmp word [bp + ?dividend + 4], 0 3259 00002010 750D <1> jnz .divide 3260 00002012 837EF200 <1> cmp word [bp + ?dividend + 2], 0 3261 00002016 7507 <1> jnz .divide 3262 00002018 817EF00008 <1> cmp word [bp + ?dividend], 2048 3263 0000201D 7614 <1> jbe .end 3264 <1> .divide: 3265 0000201F 46 <1> inc si ; -> next prefix 3266 <1> 3267 00002020 31D2 <1> xor dx, dx 3268 00002022 BF0600 <1> mov di, 6 3269 <1> .loop_divide: 3270 00002025 8B43EE <1> mov ax, [bp + ?dividend - 2 + di] 3271 00002028 F7F1 <1> div cx 3272 0000202A 8943EE <1> mov word [bp + ?dividend - 2 + di], ax 3273 0000202D 4F <1> dec di 3274 0000202E 4F <1> dec di 3275 0000202F 75F4 <1> jnz .loop_divide 3276 <1> ; dx = last remainder 3277 00002031 EBD9 <1> jmp .loop 3278 <1> 3279 <1> .end: 3280 00002033 8D7EFF <1> lea di, [bp + ?buffer + ?buffer_size - 1] 3281 00002036 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 3282 00002037 B042 <1> mov al, "B" 3283 00002039 AA <1> stosb 3284 0000203A 8A04 <1> mov al, [si] 3285 0000203C 3C20 <1> cmp al, 32 3286 0000203E 7416 <1> je @FF 3287 <1> 3288 00002040 F606[A100]10 <1> testopt [options], use_si_units 3289 <1> ; SI units ? 3290 00002045 750E <1> jnz @F ; yes --> 3291 00002047 24DF <1> and al, ~20h ; uppercase, don't do this if SI units 3292 00002049 F606[A100]20 <1> testopt [options], use_jedec_units 3293 <1> ; JEDEC units ? 3294 0000204E 7505 <1> jnz @F ; yes --> 3295 00002050 50 <1> push ax 3296 00002051 B069 <1> mov al, "i" 3297 00002053 AA <1> stosb ; don't store this if SI or JEDEC units 3298 00002054 58 <1> pop ax 3299 <1> @@: 3300 00002055 AA <1> stosb 3301 <1> @@: 3302 00002056 B020 <1> mov al, 32 3303 00002058 AA <1> stosb 3304 <1> 3305 00002059 8B46F0 <1> mov ax, word [bp + ?dividend] 3306 0000205C B90A00 <1> mov cx, 10 3307 <1> .loop_write: 3308 0000205F 31D2 <1> xor dx, dx 3309 00002061 F7F1 <1> div cx 3310 00002063 92 <1> xchg ax, dx 3311 <1> ; ax = remainder (next digit) 3312 <1> ; dx = result of div 3313 00002064 0430 <1> add al, '0' 3314 00002066 AA <1> stosb 3315 00002067 92 <1> xchg ax, dx ; ax = result of div 3316 00002068 85C0 <1> test ax, ax ; any more ? 3317 0000206A 75F3 <1> jnz .loop_write ; loop --> 3318 <1> 3319 0000206C FC <1> cld 3320 <1> 3321 0000206D 47 <1> inc di ; -> first digit 3322 0000206E 8D5E00 <1> lea bx, [bp + ?buffer + ?buffer_size] 3323 <1> ; -> behind 'B' 3324 00002071 29FB <1> sub bx, di ; = length of string 3325 00002073 89FE <1> mov si, di 3326 <1> 3327 00002075 5F <1> pop di 3328 00002076 07 <1> pop es ; restore es:di 3329 <1> ; -> where to store (if storing) 3330 <1> 3331 00002077 8B4EEC <1> mov cx, [bp + ?width] 3332 0000207A 29D9 <1> sub cx, bx 3333 0000207C 760F <1> jbe .none_blank 3334 0000207E B020 <1> mov al, 32 3335 00002080 F646EE01 <1> test byte [bp + ?bit_0_is_store], 1 3336 00002084 7505 <1> jnz @F 3337 <1> .loop_blank_disp: 3338 00002086 E84C7F <1> nearcall disp_al 3339 00002089 E2FB <1> loop .loop_blank_disp 3340 <1> ; now cx = 0 so the rep stosb is a nop 3341 <1> @@: 3342 0000208B F3AA <1> rep stosb 3343 <1> .none_blank: 3344 <1> 3345 <1> 3346 0000208D 89D9 <1> mov cx, bx 3347 0000208F F646EE01 <1> test byte [bp + ?bit_0_is_store], 1 3348 00002093 7506 <1> jnz @F 3349 <1> 3350 <1> ; ! note ss = ds 3351 00002095 89F2 <1> mov dx, si ; ds:dx -> string 3352 00002097 E8583C <1> call disp_message_length_cx 3353 0000209A A9 <1> db __TEST_IMM16 ; (skip rep movsb) 3354 <1> @@: 3355 <1> ; ! note ss = ds 3356 <1> ; ds:si -> string, cx = length 3357 0000209B F3A4 <1> rep movsb 3358 <1> 3359 0000209D 5A <1> pop dx 3360 0000209E 58 <1> pop ax 3361 0000209F 59 <1> pop cx 3362 000020A0 1F <1> pop ds 3363 000020A1 5E <1> pop si 3364 000020A2 5B <1> pop bx 3365 000020A3 89EC5D <1> lleave 3366 000020A6 C3 <1> lret 3367 <1> 3368 <1> %if _DT 3369 <1> ; DT command 3370 <1> dumptable: 3371 000020A7 E80679 <1> call skipcomma 3372 000020AA 31DB <1> xor bx, bx 3373 000020AC E8BF78 <1> call uppercase 3374 000020AF 3C54 <1> cmp al, 'T' 3375 000020B1 7504 <1> jne @F 3376 000020B3 E8FA78 <1> call skipcomma 3377 000020B6 43 <1> inc bx 3378 <1> @@: 3379 000020B7 53 <1> push bx 3380 000020B8 E8CF78 <1> call iseol? 3381 000020BB 7427 <1> je .table 3382 000020BD E8B772 <1> nearcall getdword 3383 000020C0 E8DC78 <1> call chkeol 3384 000020C3 5E <1> pop si 3385 <1> .loopsingle: 3386 000020C4 53 <1> push bx 3387 000020C5 52 <1> push dx 3388 000020C6 92 <1> xchg ax, dx 3389 000020C7 B4FF <1> mov ah, -1 3390 000020C9 E84700 <1> call .item 3391 000020CC 5A <1> pop dx 3392 000020CD 5B <1> pop bx 3393 000020CE E89D00 <1> call .blank 3394 000020D1 88F2 <1> mov dl, dh 3395 000020D3 88DE <1> mov dh, bl 3396 000020D5 88FB <1> mov bl, bh 3397 000020D7 B700 <1> mov bh, 0 3398 000020D9 84DB <1> test bl, bl 3399 000020DB 75E7 <1> jnz .loopsingle 3400 000020DD 85D2 <1> test dx, dx 3401 000020DF 75E3 <1> jnz .loopsingle 3402 000020E1 E9D779 <1> jmp trimputs 3403 <1> 3404 <1> 3405 <1> .table: 3406 000020E4 BE[062C] <1> mov si, msg.tableheader 3407 000020E7 85DB <1> test bx, bx 3408 000020E9 7403 <1> jz @F 3409 000020EB BE[552C] <1> mov si, msg.tableheadertop 3410 <1> @@: 3411 000020EE E8AD17 <1> call copy_single_counted_string 3412 000020F1 5E <1> pop si 3413 000020F2 B000 <1> mov al, 0 ; low nybble is base, high nybble column 3414 <1> 3415 <1> .line: 3416 000020F4 85F6 <1> test si, si 3417 000020F6 7402 <1> jz @F 3418 000020F8 0C80 <1> or al, 128 3419 <1> @@: 3420 000020FA B408 <1> mov ah, 8 ; reset items per row 3421 <1> .column: 3422 000020FC E81400 <1> call .item 3423 <1> 3424 000020FF 0410 <1> add al, 16 ; next column is 16 codepoints higher 3425 00002101 FECC <1> dec ah ; more columns to go ? 3426 00002103 75F7 <1> jnz .column ; yes --> 3427 <1> 3428 00002105 50 <1> push ax 3429 00002106 E8B279 <1> call trimputs ; display 3430 00002109 BF[B40A] <1> mov di, line_out 3431 0000210C 58 <1> pop ax 3432 <1> 3433 0000210D 40 <1> inc ax ; increment base (low nybble) 3434 0000210E 240F <1> and al, 15 ; test low nybble 3435 00002110 75E2 <1> jnz .line ; loop if not yet overflowed --> 3436 <1> 3437 00002112 C3 <1> retn 3438 <1> 3439 <1> 3440 <1> .item: 3441 00002113 B90300 <1> mov cx, 3 ; width = 3 columns 3442 00002116 31D2 <1> xor dx, dx 3443 00002118 50 <1> push ax 3444 00002119 B400 <1> mov ah, 0 ; dx:ax = number 3445 0000211B E80479 <1> call dec_dword_minwidth ; decimal 3446 0000211E 57 <1> push di 3447 0000211F 29CF <1> sub di, cx ; -> start of decimal number written 3448 00002121 49 <1> dec cx 3449 00002122 B030 <1> mov al, '0' ; ASCII zero 3450 <1> @@: 3451 00002124 AE <1> scasb ; a leading zero ? 3452 00002125 7506 <1> jne @F ; no --> 3453 00002127 C645FF20 <1> mov byte [di - 1], 32 ; replace by blank 3454 0000212B E2F7 <1> loop @B ; check for another leading zero --> 3455 <1> @@: 3456 0000212D 5F <1> pop di ; restore -> after decimal number written 3457 0000212E 58 <1> pop ax 3458 0000212F E83C00 <1> call .blank 3459 00002132 E85C79 <1> call hexbyte ; hexadecimal 3460 00002135 E83600 <1> call .blank 3461 00002138 88C3 <1> mov bl, al ; = index 3462 0000213A 3C20 <1> cmp al, 32 3463 0000213C 720E <1> jb .named 3464 <1> 3465 0000213E B320 <1> mov bl, (asciitablenames.del - asciitablenames.) / 3 3466 <1> ; point to DEL entry 3467 00002140 3C7F <1> cmp al, 127 3468 00002142 7408 <1> je .named 3469 00002144 B321 <1> mov bl, (asciitablenames.top - asciitablenames.) / 3 3470 <1> ; point to top entry 3471 00002146 7218 <1> jb .printable 3472 00002148 85F6 <1> test si, si 3473 0000214A 7514 <1> jnz .printable 3474 <1> .named: 3475 0000214C B700 <1> mov bh, 0 ; bx = index 3476 0000214E 89DA <1> mov dx, bx 3477 00002150 01DB <1> add bx, bx 3478 00002152 01D3 <1> add bx, dx ; times 3 3479 00002154 81C3[5942] <1> add bx, asciitablenames ; -> padded 3-byte text 3480 00002158 87F3 <1> xchg si, bx 3481 0000215A A5 <1> movsw 3482 0000215B A4 <1> movsb 3483 0000215C 87DE <1> xchg bx, si 3484 0000215E EB07 <1> jmp @F 3485 <1> .printable: 3486 00002160 E81000 <1> call .quote 3487 00002163 AA <1> stosb 3488 00002164 E80C00 <1> call .quote 3489 <1> @@: 3490 00002167 E80400 <1> call .blank 3491 0000216A 3C50 <1> cmp al, 80 3492 0000216C 7214 <1> jb @F 3493 <1> 3494 <1> .blank: 3495 0000216E 50 <1> push ax 3496 0000216F B020 <1> mov al, 32 3497 00002171 EB0D <1> jmp .retstosb 3498 <1> 3499 <1> .quote: 3500 00002173 85C0 <1> test ax, ax 3501 00002175 790B <1> jns @F 3502 00002177 50 <1> push ax 3503 00002178 3C27 <1> cmp al, "'" 3504 0000217A B027 <1> mov al, "'" 3505 0000217C 7502 <1> jne .retstosb 3506 0000217E B022 <1> mov al, '"' 3507 <1> .retstosb: 3508 00002180 AA <1> stosb 3509 00002181 58 <1> pop ax 3510 <1> @@: 3511 00002182 C3 <1> retn 3512 <1> 3513 <1> 3514 <1> usesection lDEBUG_DATA_ENTRY 3515 <1> 3516 <1> %imacro asciitableentry 1.nolist 3517 <1> %defstr %%string %1 3518 <1> fill 3, 32, db %%string 3519 <1> %endmacro 3520 <1> 3521 <1> asciitablenames: 3522 00004259 4E554C <1> .: asciitableentry NUL 3523 0000425C 534F48 <1> asciitableentry SOH 3524 0000425F 535458 <1> asciitableentry STX 3525 00004262 455458 <1> asciitableentry ETX 3526 00004265 454F54 <1> asciitableentry EOT 3527 00004268 454E51 <1> asciitableentry ENQ 3528 0000426B 41434B <1> asciitableentry ACK 3529 0000426E 42454C <1> asciitableentry BEL 3530 00004271 425320 <1> asciitableentry BS 3531 00004274 544142 <1> asciitableentry TAB 3532 00004277 4C4620 <1> asciitableentry LF 3533 0000427A 565420 <1> asciitableentry VT 3534 0000427D 464620 <1> asciitableentry FF 3535 00004280 435220 <1> asciitableentry CR 3536 00004283 534F20 <1> asciitableentry SO 3537 00004286 534920 <1> asciitableentry SI 3538 00004289 444C45 <1> asciitableentry DLE 3539 0000428C 444331 <1> asciitableentry DC1 3540 0000428F 444332 <1> asciitableentry DC2 3541 00004292 444333 <1> asciitableentry DC3 3542 00004295 444334 <1> asciitableentry DC4 3543 00004298 4E414B <1> asciitableentry NAK 3544 0000429B 53594E <1> asciitableentry SYN 3545 0000429E 455442 <1> asciitableentry ETB 3546 000042A1 43414E <1> asciitableentry CAN 3547 000042A4 454D20 <1> asciitableentry EM 3548 000042A7 535542 <1> asciitableentry SUB 3549 000042AA 455343 <1> asciitableentry ESC 3550 000042AD 465320 <1> asciitableentry FS 3551 000042B0 475320 <1> asciitableentry GS 3552 000042B3 525320 <1> asciitableentry RS 3553 000042B6 555320 <1> asciitableentry US 3554 000042B9 44454C <1> .del: asciitableentry DEL 3555 <1> %if (.del - .) / 3 != 32 3556 <1> %error Wrong table size 3557 <1> %endif 3558 000042BC 746F70 <1> .top: asciitableentry top 3559 <1> 3560 <1> usesection lDEBUG_CODE 3561 <1> 3562 <1> %endif 3563 <1> 3564 <1> ..@dd_access_end: 2924 %include "rr.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug R commands - Register access 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 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 19 <1> 20 <1> ..@rr_access_start: 21 <1> ; R command - dump and manipulate registers. 22 <1> rr: 23 00002183 E80478 <1> call iseol? 24 <1> %if _RH 25 00002186 750D <1> jne @F 26 <1> .r_and_terminate: 27 00002188 E84B08 <1> call dumpregs 28 0000218B D006[0801] <1> rol byte [in_re], 1 29 0000218F 7203E9B421 <1> jnc terminate_silent_dump 30 00002194 C3 <1> retn 31 <1> @@: 32 <1> %else 33 <1> je dumpregs ; if no parameters --> 34 <1> %endif 35 00002195 E8D677 <1> call uppercase 36 00002198 3C45 <1> cmp al, 'E' 37 0000219A 7514 <1> jne @F 38 <1> 39 0000219C 50 <1> push ax 40 0000219D 56 <1> push si 41 0000219E AC <1> lodsb 42 0000219F 3C2E <1> cmp al, '.' 43 000021A1 7503E91206 <1> je re_cmd 44 000021A6 E8E177 <1> call iseol? 45 000021A9 5E <1> pop si 46 000021AA 58 <1> pop ax 47 000021AB 7503E96307 <1> je dumpregs_extended 48 <1> @@: 49 <1> 50 000021B0 3C43 <1> cmp al, 'C' 51 000021B2 7514 <1> jne @F 52 <1> 53 000021B4 50 <1> push ax 54 000021B5 56 <1> push si 55 000021B6 AC <1> lodsb 56 000021B7 3C2E <1> cmp al, '.' 57 000021B9 7503E9F205 <1> je rc_cmd 58 000021BE E8C977 <1> call iseol? 59 000021C1 5E <1> pop si 60 000021C2 58 <1> pop ax 61 000021C3 7503E92C07 <1> je rc_run 62 <1> @@: 63 <1> 64 <1> %if !_ONLYNON386 || (_OPTIONS || _VARIABLES) || _MMXSUPP || _RN 65 000021C8 4E <1> dec si 66 000021C9 4E <1> dec si 67 000021CA BA[651A] <1> mov dx, msg.rvv 68 000021CD E85077 <1> call isstring? 69 000021D0 7503E9680D <1> je dumpallvars 70 000021D5 BA[691A] <1> mov dx, msg.rvm 71 000021D8 E84577 <1> call isstring? 72 000021DB 7503E9A50D <1> je dumpmemory 73 000021E0 BA[6D1A] <1> mov dx, msg.rvp 74 000021E3 E83A77 <1> call isstring? 75 000021E6 7503E9DB0D <1> je dumpprocess 76 000021EB BA[711A] <1> mov dx, msg.rvd 77 000021EE E82F77 <1> call isstring? 78 000021F1 7503E9640E <1> je dumpdevice 79 <1> %if _RH 80 000021F6 BA[2E1E] <1> mov dx, msg.rh 81 000021F9 E82477 <1> call isstring? 82 000021FC 7503E9240F <1> je dumphistory 83 <1> %endif 84 <1> %if _MMXSUPP 85 00002201 803E[320B]00 <1> cmp byte [has_mmx], 0 86 00002206 740E <1> je .notrm 87 00002208 BA[751A] <1> mov dx, msg.rm 88 0000220B E81277 <1> call isstring? 89 0000220E 7506 <1> jne .notrm 90 00002210 E89D77 <1> call skipcomma 91 00002213 E97A0E <1> jmp dumpregsMMX 92 <1> .notrm: 93 <1> %endif 94 00002216 46 <1> inc si 95 00002217 AC <1> lodsb 96 00002218 E85377 <1> call uppercase 97 <1> 98 0000221B 50 <1> push ax 99 0000221C 56 <1> push si 100 0000221D E8BF77 <1> call skipwhite 101 00002220 E86777 <1> call iseol? ; line ends after single character ? 102 00002223 5E <1> pop si 103 00002224 58 <1> pop ax 104 00002225 7542 <1> jne short rr1 ; no, not other kinds of dumps --> 105 <1> 106 00002227 3C46 <1> cmp al, 'F' ; only valid input to a later check 107 00002229 7503E9DB03 <1> je rr2.writeprompt ; so go there --> 108 <1> ; (note that byte [si-1] must != '.') 109 <1> %if _OPTIONS || _VARIABLES 110 0000222E 3C56 <1> cmp al, 'V' 111 00002230 7503E93C0C <1> je dumpvars 112 <1> %endif 113 00002235 3C58 <1> _386 cmp al, 'X' 114 00002237 7411 <1> _386 je short rrx 115 <1> %if _RN 116 00002239 3C4E <1> cmp al, 'N' 117 0000223B 750A <1> jne .notrn 118 0000223D 803E[2F0B]00 <1> cmp byte [has_87], 0 119 00002242 7403 <1> je .notrn 120 00002244 E9460A <1> jmp dumpregsFPU 121 <1> .notrn: 122 <1> %endif 123 00002247 E91360 <1> jmp error ; all other single characters are invalid 124 <1> %endif 125 <1> 126 <1> %ifn _ONLYNON386 127 <1> rrx: 128 0000224A AC <1> lodsb 129 0000224B E85177 <1> call chkeol 130 0000224E 8036[A000]01 <1> xoropt [options], dispregs32 131 00002253 BA[4F13] <1> mov dx, msg.regs386 132 00002256 E85A7D <1> call putsz 133 00002259 BA[6613] <1> mov dx, msg.regs386_on 134 0000225C F606[A000]01 <1> testopt [options], dispregs32 135 00002261 7503 <1> jnz .on 136 00002263 BA[6213] <1> mov dx, msg.regs386_off 137 <1> .on: 138 00002266 E94A7D <1> jmp putsz 139 <1> %endif 140 <1> 141 <1> rr1: 142 <1> lframe 143 <1> lvar dword, offset 144 <1> lvar word, segsel 145 <1> lvar word, memsizestring 146 <1> lvar word, ismem_high_size_low 147 <1> lequ ?ismem_high_size_low, size 148 <1> lequ ?ismem_high_size_low + 1, ismem 149 <1> lvar word, hhtype_high_rrtype_low 150 <1> lequ ?hhtype_high_rrtype_low, replace_rrtype 151 <1> %define rrtype bp + ?replace_rrtype 152 <1> lequ ?hhtype_high_rrtype_low + 1, hhtype 153 <1> lvar word, replace_rrmask 154 <1> %define rrmask bp + ?replace_rrmask 155 <1> lvar word, hhoffset 156 <1> %if _MMXSUPP 157 <1> lvar word, mmx_isvar_type 158 <1> %endif 159 <1> lequ 16, namebufferlength 160 <1> lvar ?namebufferlength, namebuffer 161 00002269 5589E58D66DE <1> lenter 162 <1> %if _MMXSUPP 163 0000226F 8366EE00 <1> and word [bp + ?mmx_isvar_type], 0 164 <1> %endif 165 00002273 89E7 <1> mov di, sp ; -> ?namebuffer 166 00002275 E8746C <1> nearcall isvariable?.return_name 167 00002278 7203E91701 <1> jnc rr1_variable 168 <1> 169 0000227D 4E <1> dec si 170 0000227E BA[231E] <1> mov dx, msg.byte 171 00002281 BB0101 <1> mov bx, 101h 172 00002284 52 <1> push dx 173 00002285 E89876 <1> call isstring? 174 00002288 7428 <1> je rr1_memory 175 0000228A 5A <1> pop dx 176 0000228B BA[1D1E] <1> mov dx, msg.word 177 0000228E 43 <1> inc bx ; = 102h 178 0000228F 52 <1> push dx 179 00002290 E88D76 <1> call isstring? 180 00002293 741D <1> je rr1_memory 181 00002295 5A <1> pop dx 182 00002296 BA[221E] <1> mov dx, msg.3byte 183 00002299 43 <1> inc bx ; = 103h 184 0000229A 52 <1> push dx 185 0000229B E88276 <1> call isstring? 186 0000229E 7412 <1> je rr1_memory 187 000022A0 5A <1> pop dx 188 000022A1 BA[1C1E] <1> mov dx, msg.dword 189 000022A4 43 <1> inc bx ; = 104h 190 000022A5 52 <1> push dx 191 000022A6 E87776 <1> call isstring? 192 000022A9 7407 <1> je rr1_memory 193 <1> ; pop dx 194 000022AB 89EC5D <1> lleave code 195 000022AE AC <1> lodsb 196 000022AF E93503 <1> jmp rr2 197 <1> 198 <1> rr1_memory: 199 000022B2 8F46F8 <1> pop word [bp + ?memsizestring] 200 000022B5 895EF6 <1> mov word [bp + ?ismem_high_size_low], bx 201 <1> 202 000022B8 31C0 <1> xor ax, ax 203 000022BA 88D8 <1> mov al, bl 204 000022BC F7D8 <1> neg ax 205 000022BE 05[CC53] <1> add ax, masks + 4 ; 4 - size = offset into masks 206 000022C1 8946F2 <1> mov word [rrmask], ax ; -> mask 207 000022C4 E8E976 <1> call skipcomma 208 000022C7 3C5B <1> cmp al, '[' 209 000022C9 7403E98F5F <1> jne error 210 000022CE AC <1> lodsb 211 000022CF 8B1E[C40C] <1> mov bx, word [reg_ds] 212 000022D3 E87A64 <1> nearcall getaddrX 213 000022D6 895EFA <1> mov word [bp + ?segsel], bx 214 <1> _386_PM_o32 215 000022D9 8956FC <1> mov word [bp + ?offset], dx 216 000022DC E8D276 <1> call skipcomm0 217 000022DF 3C5D <1> cmp al, ']' 218 000022E1 7403E9775F <1> jne error 219 <1> 220 000022E6 E8C776 <1> call skipcomma 221 000022E9 3C2E <1> cmp al, '.' ; special ? 222 000022EB 7405 <1> je short .writeprompt ; yes --> 223 000022ED E89A76 <1> call iseol? 224 000022F0 7562 <1> jne short .noprompt 225 <1> .writeprompt: 226 <1> ; si -> behind dot if any 227 000022F2 BF[B40A] <1> mov di, line_out 228 000022F5 56 <1> push si 229 000022F6 8B76F8 <1> mov si, word [bp + ?memsizestring] 230 <1> ; si -> size string (ASCIZ) 231 000022F9 A8 <1> db __TEST_IMM8 ; (skip stosb) 232 <1> @@: 233 000022FA AA <1> stosb ; store next byte 234 000022FB AC <1> lodsb ; load next byte 235 000022FC 84C0 <1> test al, al ; is zero ? 236 000022FE 75FA <1> jnz @B ; not yet, loop --> 237 00002300 5E <1> pop si ; (preserve si) 238 00002301 B8205B <1> mov ax, " [" 239 00002304 AB <1> stosw 240 00002305 8B46FA <1> mov ax, word [bp + ?segsel] 241 00002308 89C3 <1> mov bx, ax 242 0000230A E87D77 <1> call hexword 243 0000230D B03A <1> mov al, ':' 244 0000230F AA <1> stosb 245 <1> _386_PM_o32 246 00002310 8B46FC <1> mov ax, word [bp + ?offset] 247 <1> %if _PM 248 <1> call test_high_limit ; 32-bit segment ? 249 <1> jz .16 250 <1> call hexword_high 251 <1> .16: 252 <1> %endif 253 00002313 E87477 <1> call hexword 254 00002316 B85D20 <1> mov ax, "] " 255 00002319 AB <1> stosw 256 <1> 257 0000231A E8E561 <1> call prephack 258 0000231D E84800 <1> call rr1_read_mem_dxax 259 <1> 260 00002320 80F904 <1> cmp cl, 4 261 00002323 7207 <1> jb .pnohigh 262 00002325 92 <1> xchg ax, dx 263 00002326 E86177 <1> call hexword ; display high word 264 00002329 92 <1> xchg ax, dx 265 0000232A EB0C <1> jmp @F 266 <1> .pnohigh: 267 0000232C 80F903 <1> cmp cl, 3 268 0000232F 720A <1> jb @FF 269 00002331 86C2 <1> xchg al, dl 270 00002333 E85B77 <1> call hexbyte 271 00002336 86C2 <1> xchg al, dl 272 <1> @@: 273 <1> %if _RSEPARATE 274 00002338 E82100 <1> call rseparate 275 <1> %endif 276 <1> @@: 277 0000233B 80F902 <1> cmp cl, 2 278 0000233E 7207 <1> jb .pnobyte 279 00002340 86C4 <1> xchg al, ah 280 00002342 E84C77 <1> call hexbyte ; display high byte 281 00002345 86C4 <1> xchg al, ah 282 <1> .pnobyte: 283 00002347 E84777 <1> call hexbyte ; display low byte 284 <1> 285 <1> %if _MS_PROMPT_COMPAT 286 0000234A B000 <1> mov al, 0 287 <1> %endif 288 0000234C E81604 <1> call dot_prompt 289 0000234F 7503E9C401 <1> je .return 290 <1> .noprompt: 291 00002354 31C9 <1> xor cx, cx 292 00002356 8A4EF6 <1> mov cl, byte [bp + ?size] 293 00002359 E9A800 <1> jmp rr1_common 294 <1> 295 <1> 296 <1> %if _RSEPARATE 297 <1> rseparate: 298 0000235C F606[A600]20 <1> testopt [options2], opt2_r_separate 299 00002361 7404 <1> jz @F 300 00002363 C6055F <1> mov byte [di], '_' 301 00002366 47 <1> inc di 302 <1> @@: 303 00002367 C3 <1> retn 304 <1> %endif 305 <1> 306 <1> 307 <1> ..@rr_variable_read_access_start: 308 <1> ; OUT: cl = ?size 309 <1> ; dx:ax = value read from memory 310 <1> ; CHG: bx 311 <1> rr1_read_mem_dxax: 312 00002368 E8C061 <1> call dohack 313 0000236B 31C0 <1> xor ax, ax 314 0000236D 31D2 <1> xor dx, dx 315 0000236F 8A4EF6 <1> mov cl, byte [bp + ?size] 316 <1> %if _PM 317 <1> mov bx, word [bp + ?segsel] 318 <1> call test_high_limit ; 32-bit segment ? 319 <1> mov ds, bx 320 <1> %else 321 00002372 8E5EFA <1> mov ds, word [bp + ?segsel] 322 <1> %endif 323 <1> _386_PM_o32 324 00002375 8B5EFC <1> mov bx, word [bp + ?offset] 325 <1> %if _PM 326 <1> jz .16 327 <1> 328 <1> [cpu 386] 329 <1> .32: 330 <1> cmp cl, 2 331 <1> jb .32_1 332 <1> je .32_2 333 <1> cmp cl, 4 334 <1> jb .32_3 335 <1> .32_4: 336 <1> mov dh, byte [ebx + 3] 337 <1> .32_3: 338 <1> mov dl, byte [ebx + 2] 339 <1> .32_2: 340 <1> mov ah, byte [ebx + 1] 341 <1> .32_1: 342 <1> mov al, byte [ebx] 343 <1> jmp .ret 344 <1> __CPU__ 345 <1> %endif 346 <1> 347 <1> .16: 348 00002378 80F902 <1> cmp cl, 2 349 0000237B 7210 <1> jb .16_1 350 0000237D 740B <1> je .16_2 351 0000237F 80F904 <1> cmp cl, 4 352 00002382 7203 <1> jb .16_3 353 <1> .16_4: 354 00002384 8A7703 <1> mov dh, byte [bx + 3] 355 <1> .16_3: 356 00002387 8A5702 <1> mov dl, byte [bx + 2] 357 <1> .16_2: 358 0000238A 8A6701 <1> mov ah, byte [bx + 1] 359 <1> .16_1: 360 0000238D 8A07 <1> mov al, byte [bx] 361 <1> .ret: 362 0000238F 16 <1> push ss 363 00002390 1F <1> pop ds 364 00002391 E9AB61 <1> jmp unhack 365 <1> ..@rr_variable_read_access_end: 366 <1> 367 <1> 368 <1> rr1_variable: 369 00002394 897EF2 <1> mov word [rrmask], di ; -> mask of read-only bits 370 00002397 88C8 <1> mov al, cl 371 00002399 B100 <1> mov cl, 0 372 0000239B 4E <1> dec si ; (to reload al) 373 0000239C 50 <1> push ax ; h = variable's field type, l = its size 374 0000239D B400 <1> mov ah, 0 375 0000239F 8946F6 <1> mov word [bp + ?ismem_high_size_low], ax 376 000023A2 86CD <1> xchg cl, ch ; cx = variable's name's length 377 <1> 378 000023A4 E80976 <1> call skipcomma 379 000023A7 3C2E <1> cmp al, '.' ; special ? 380 000023A9 7405 <1> je short .writeprompt ; yes --> 381 000023AB E8DC75 <1> call iseol? 382 000023AE 7547 <1> jne short .noprompt 383 <1> .writeprompt: 384 000023B0 56 <1> push si ; -> behind dot if any 385 000023B1 8D76DE <1> lea si, [bp + ?namebuffer] 386 <1> ; -> name 387 000023B4 BF[B40A] <1> mov di, line_out 388 000023B7 F3A4 <1> rep movsb 389 000023B9 5E <1> pop si ; -> behind dot if any 390 000023BA B020 <1> mov al, 32 391 000023BC AA <1> stosb 392 000023BD 59 <1> pop cx ; h = variable's field type, l = its size 393 000023BE 87DA <1> xchg bx, dx 394 000023C0 8B07 <1> mov ax, word [bx] 395 000023C2 87DA <1> xchg bx, dx 396 000023C4 51 <1> push cx 397 000023C5 80F904 <1> cmp cl, 4 398 000023C8 7205 <1> jb .pnohigh 399 000023CA E8BD76 <1> call hexword ; display high word 400 000023CD EB08 <1> jmp @F 401 <1> .pnohigh: 402 000023CF 80F903 <1> cmp cl, 3 403 000023D2 7206 <1> jb @FF 404 000023D4 E8BA76 <1> call hexbyte 405 <1> @@: 406 <1> %if _RSEPARATE 407 000023D7 E882FF <1> call rseparate 408 <1> %endif 409 <1> @@: 410 000023DA 8B07 <1> mov ax, word [bx] 411 000023DC 80F902 <1> cmp cl, 2 412 000023DF 7207 <1> jb .pnobyte 413 000023E1 86C4 <1> xchg al, ah 414 000023E3 E8AB76 <1> call hexbyte ; display high byte 415 000023E6 86C4 <1> xchg al, ah 416 <1> .pnobyte: 417 000023E8 E8A676 <1> call hexbyte ; display low byte 418 <1> %if _MS_PROMPT_COMPAT 419 000023EB B002 <1> mov al, 2 420 <1> %endif 421 000023ED E87503 <1> call dot_prompt 422 000023F0 59 <1> pop cx ; h = variable's field type, l = its size 423 000023F1 7503E92201 <1> je .return 424 000023F6 A8 <1> db __TEST_IMM8 ; (skip pop) 425 <1> .noprompt: 426 000023F7 59 <1> pop cx ; h = variable's field type, l = its size 427 <1> %if _MMXSUPP 428 000023F8 894EEE <1> mov word [bp + ?mmx_isvar_type], cx 429 <1> %endif 430 000023FB 84ED <1> test ch, ch 431 000023FD 7403E91A01 <1> jnz rr1_readonly_or_mmx 432 <1> rr1_common_do_mmx: 433 00002402 53 <1> push bx 434 00002403 52 <1> push dx 435 <1> rr1_common: 436 00002404 884EF4 <1> mov byte [rrtype], cl 437 00002407 51 <1> push cx 438 00002408 50 <1> push ax 439 00002409 56 <1> push si 440 0000240A E81565 <1> nearcall isoperator? 441 0000240D 750E <1> jne .nooperator 442 0000240F 89CB <1> mov bx, cx 443 00002411 01DB <1> add bx, bx ; bh = 0 ! 444 00002413 50 <1> push ax 445 <1> %if _DUALCODE && _EXPRDUALCODE 446 <1> nearcall ..@rr_operatordispatchers 447 <1> %else 448 00002414 FF97[D04B] <1> call near [operatordispatchers+bx] 449 <1> %endif 450 00002418 58 <1> pop ax 451 00002419 85DB <1> test bx, bx 452 0000241B 7504 <1> jnz .gotoperator 453 <1> .nooperator: 454 0000241D BB1900 <1> mov bx, OPERATOR_RIGHTOP; set default computation function 455 00002420 A8 <1> db __TEST_IMM8 456 <1> .gotoperator: 457 00002421 AC <1> lodsb 458 <1> 459 00002422 E87403 <1> call isassignmentoperator? 460 00002425 7317 <1> jnc .assign_op_done ; found an assignment operator --> 461 00002427 83FB19 <1> cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 462 0000242A 7412 <1> je .assign_op_done ; yes, assignment operator not required --> 463 0000242C 59 <1> pop cx 464 0000242D 58 <1> pop ax ; restore al, si in front of operator 465 0000242E 50 <1> push ax 466 0000242F 51 <1> push cx 467 00002430 87F1 <1> xchg si, cx 468 00002432 51 <1> push cx 469 00002433 E8E664 <1> nearcall isunaryoperator?; is this a valid unary operator too ? 470 00002436 59 <1> pop cx 471 00002437 74E4 <1> je .nooperator ; yes --> 472 00002439 87F1 <1> xchg si, cx 473 <1> errorj9: equ $ 474 0000243B E91F5E <1> jmp error ; error where the assignment operator needs to be 475 <1> .assign_op_done: 476 0000243E 59 <1> pop cx 477 0000243F 59 <1> pop cx 478 00002440 59 <1> pop cx 479 00002441 53 <1> push bx 480 00002442 80FB18 <1> cmp bl, OPERATOR_COND 481 00002445 7503E9135E <1> je error 482 0000244A E86475 <1> call skipcomm0 483 <1> 484 0000244D E8276F <1> nearcall getexpression ; bx:dx = expression result 485 00002450 8866F5 <1> mov byte [bp + ?hhtype], ah 486 00002453 8976F0 <1> mov word [bp + ?hhoffset], si 487 00002456 E84675 <1> call chkeol 488 00002459 59 <1> pop cx ; operator computation function 489 <1> 490 0000245A 807EF700 <1> cmp byte [bp + ?ismem], 0 491 0000245E 7419 <1> je .var_hhvar 492 <1> 493 <1> .mem_hhvar: 494 00002460 89C7 <1> mov di, ax 495 00002462 89D6 <1> mov si, dx 496 00002464 53 <1> push bx 497 00002465 51 <1> push cx 498 00002466 E8FFFE <1> call rr1_read_mem_dxax 499 00002469 59 <1> pop cx 500 0000246A 5B <1> pop bx 501 0000246B 52 <1> push dx 502 0000246C 50 <1> push ax 503 0000246D 89F8 <1> mov ax, di 504 0000246F 89F2 <1> mov dx, si 505 00002471 BF[C853] <1> mov di, mask_4byte ; di -> zero 506 00002474 BE[CA53] <1> mov si, mask_4byte + 2 ; si -> zero 507 <1> 508 00002477 EB06 <1> jmp .common_hhvar 509 <1> 510 <1> .var_hhvar: 511 00002479 5E <1> pop si ; si-> high word 512 0000247A 5F <1> pop di ; di-> low word 513 0000247B FF34 <1> push word [si] 514 0000247D FF35 <1> push word [di] 515 <1> 516 <1> .common_hhvar: 517 0000247F 8F06[F053] <1> pop word [hhvar] 518 00002483 8F06[F253] <1> pop word [hhvar+2] ; save variable's current value (as left operand) 519 <1> 520 00002487 C606[0154]00 <1> mov byte [hhtype], 0 ; type info signed=0 pointer=0 521 0000248C 807EF404 <1> cmp byte [rrtype], 4 522 00002490 7317 <1> jae .cleardword 523 00002492 807EF402 <1> cmp byte [rrtype], 2 524 00002496 770C <1> ja .clearthreebyte 525 00002498 7405 <1> je .clearword 526 <1> .clearbyte: 527 0000249A C606[F153]00 <1> mov byte [hhvar + 1], 0 ; clear second byte 528 <1> .clearword: 529 0000249F C606[F253]00 <1> mov byte [hhvar + 2], 0 ; clear third byte 530 <1> .clearthreebyte: 531 000024A4 C606[F353]00 <1> mov byte [hhvar + 3], 0 ; clear fourth byte 532 <1> .cleardword: 533 000024A9 87CB <1> xchg cx, bx 534 000024AB 01DB <1> add bx, bx 535 000024AD 8B9F[144C] <1> mov bx, word [bx + operatorfunctions] 536 000024B1 87CB <1> xchg cx, bx ; cx = operator function 537 000024B3 8A66F5 <1> mov ah, byte [bp + ?hhtype] 538 <1> %if _DUALCODE && _EXPRDUALCODE 539 <1> nearcall ..@rr_operatorfunctions 540 <1> %else 541 000024B6 FFD1 <1> call cx ; compute 542 <1> %endif 543 000024B8 E8B972 <1> nearcall getexpression.countsignificantbits 544 000024BB 53 <1> push bx 545 000024BC 56 <1> push si 546 000024BD 31DB <1> xor bx, bx 547 000024BF 8A5EF4 <1> mov bl, byte [rrtype] 548 000024C2 01DB <1> add bx, bx 549 000024C4 8B76F0 <1> mov si, word [bp + ?hhoffset] 550 <1> %if _DUALCODE && _EXPRDUALCODE 551 <1> nearcall ..@rr_checksignificantbits 552 <1> 553 <1> usesection lDEBUG_CODE2 554 <1> ..@rr_checksignificantbits: section_of_function 555 <1> jmp near word [checksignificantbits_table + bx] 556 <1> 557 <1> usesection lDEBUG_CODE 558 <1> %else 559 000024C7 FF97[C042] <1> call near word [checksignificantbits_table + bx] 560 <1> %endif 561 000024CB 5E <1> pop si 562 000024CC 5B <1> pop bx 563 <1> 564 000024CD 97 <1> xchg ax, di ; ax -> low word of variable 565 000024CE 8B7EF2 <1> mov di, word [rrmask] ; di -> mask dword 566 000024D1 53 <1> push bx ; use bx as a scratch space 567 000024D2 8B0D <1> mov cx, word [di] ; = low word of mask 568 000024D4 51 <1> push cx ; preserve low word of mask 569 000024D5 97 <1> xchg ax, di ; di -> low word of variable 570 000024D6 230D <1> and cx, word [di] ; cx = low word value to preserve 571 000024D8 5B <1> pop bx ; = low word of mask 572 000024D9 F7D3 <1> not bx ; = bitmask of bits to use from result 573 000024DB 21DA <1> and dx, bx ; dx = bits to use from result low word 574 000024DD 09CA <1> or dx, cx ; dx = low word compound 575 000024DF 5B <1> pop bx ; restore high word after scratch use 576 000024E0 97 <1> xchg ax, di ; di -> mask dword 577 000024E1 52 <1> push dx ; use dx as a scratch space 578 000024E2 8B4D02 <1> mov cx, word [di + 2] ; = high word of mask 579 000024E5 51 <1> push cx ; preserve high word of mask 580 000024E6 230C <1> and cx, word [si] ; cx = high word value to preserve 581 000024E8 5A <1> pop dx ; = high word of mask 582 000024E9 F7D2 <1> not dx ; = bitmask of bits to use from result 583 000024EB 21D3 <1> and bx, dx ; bx = bits to use from result high word 584 000024ED 09CB <1> or bx, cx 585 000024EF 5A <1> pop dx ; restore low word after scratch use 586 000024F0 97 <1> xchg ax, di ; di -> low word of variable 587 <1> 588 <1> %if _MMXSUPP 589 000024F1 807EEF00 <1> cmp byte [bp + ?mmx_isvar_type + 1], 0 590 000024F5 7403E99400 <1> jne rr1_mmx_set 591 <1> %endif 592 000024FA 807EF700 <1> cmp byte [bp + ?ismem], 0 593 000024FE 7538 <1> jne rr1_mem_set 594 <1> 595 <1> .var_set: 596 00002500 807EF402 <1> cmp byte [rrtype], 2 597 00002504 7210 <1> jb .setbyte 598 00002506 740B <1> je .setword 599 00002508 807EF404 <1> cmp byte [rrtype], 4 600 0000250C 7203 <1> jb .setthreebyte 601 <1> .setdword: 602 0000250E 887C01 <1> mov byte [si + 1], bh ; set fourth byte 603 <1> .setthreebyte: 604 00002511 881C <1> mov byte [si], bl ; set third byte 605 <1> .setword: 606 00002513 887501 <1> mov byte [di + 1], dh ; set second byte 607 <1> .setbyte: 608 00002516 8815 <1> mov byte [di], dl ; set first byte 609 <1> .return: 610 <1> rr1_memory.return: 611 <1> rr1_variable.return: 612 00002518 89EC5D <1> lleave code 613 <1> rr1b: 614 0000251B C3 <1> retn 615 <1> 616 <1> 617 <1> rr1_readonly_or_mmx: 618 <1> %if _MMXSUPP 619 0000251C 80FD01 <1> cmp ch, 1 620 0000251F 740F <1> je rr1_readonly 621 00002521 803E[320B]00 <1> cmp byte [has_mmx], 0 622 00002526 7403E9D7FE <1> jne rr1_common_do_mmx 623 0000252B BA[7C12] <1> mov dx, msg.internal_error_no_mmx 624 0000252E EB03 <1> jmp rr1_readonly.error 625 <1> %endif 626 <1> 627 <1> rr1_readonly: 628 00002530 BA[1A12] <1> mov dx, msg.readonly 629 <1> .error: 630 00002533 E8777A <1> call putsz_error 631 00002536 EBE0 <1> jmp rr1_variable.return 632 <1> 633 <1> 634 <1> ..@rr_variable_write_access_start: 635 <1> rr1_mem_set: 636 00002538 89D0 <1> mov ax, dx 637 0000253A 89DA <1> mov dx, bx 638 <1> 639 0000253C E8EC5F <1> call dohack 640 0000253F 8A4EF6 <1> mov cl, byte [bp + ?size] 641 <1> %if _PM 642 <1> mov bx, word [bp + ?segsel] 643 <1> call verifysegm 644 <1> jc .ro 645 <1> call test_high_limit ; 32-bit segment ? 646 <1> mov ds, bx 647 <1> %else 648 00002542 8E5EFA <1> mov ds, word [bp + ?segsel] 649 <1> %endif 650 <1> _386_PM_o32 651 00002545 8B5EFC <1> mov bx, word [bp + ?offset] 652 <1> %if _PM 653 <1> jz .16 654 <1> 655 <1> [cpu 386] 656 <1> .32: 657 <1> cmp cl, 2 658 <1> jb .32_1 659 <1> je .32_2 660 <1> cmp cl, 4 661 <1> jb .32_3 662 <1> .32_4: 663 <1> mov byte [ebx + 3], dh 664 <1> .32_3: 665 <1> mov byte [ebx + 2], dl 666 <1> .32_2: 667 <1> mov byte [ebx + 1], ah 668 <1> .32_1: 669 <1> mov byte [ebx], al 670 <1> 671 <1> .32_check: 672 <1> cmp cl, 2 673 <1> jb .32_check_1 674 <1> je .32_check_2 675 <1> cmp cl, 4 676 <1> jb .32_check_3 677 <1> .32_check_4: 678 <1> cmp dh, byte [ebx + 3] 679 <1> jne .ro 680 <1> .32_check_3: 681 <1> cmp dl, byte [ebx + 2] 682 <1> jne .ro 683 <1> .32_check_2: 684 <1> cmp ah, byte [ebx + 1] 685 <1> jne .ro 686 <1> .32_check_1: 687 <1> cmp al, byte [ebx] 688 <1> jne .ro 689 <1> jmp .ret 690 <1> __CPU__ 691 <1> %endif 692 <1> 693 <1> .16: 694 00002548 80F902 <1> cmp cl, 2 695 0000254B 7210 <1> jb .16_1 696 0000254D 740B <1> je .16_2 697 0000254F 80F904 <1> cmp cl, 4 698 00002552 7203 <1> jb .16_3 699 <1> .16_4: 700 00002554 887703 <1> mov byte [bx + 3], dh 701 <1> .16_3: 702 00002557 885702 <1> mov byte [bx + 2], dl 703 <1> .16_2: 704 0000255A 886701 <1> mov byte [bx + 1], ah 705 <1> .16_1: 706 0000255D 8807 <1> mov byte [bx], al 707 <1> 708 <1> .16_check: 709 0000255F 80F902 <1> cmp cl, 2 710 00002562 7216 <1> jb .16_check_1 711 00002564 740F <1> je .16_check_2 712 00002566 80F904 <1> cmp cl, 4 713 00002569 7205 <1> jb .16_check_3 714 <1> .16_check_4: 715 0000256B 3A7703 <1> cmp dh, byte [bx + 3] 716 0000256E 7513 <1> jne .ro 717 <1> .16_check_3: 718 00002570 3A5702 <1> cmp dl, byte [bx + 2] 719 00002573 750E <1> jne .ro 720 <1> .16_check_2: 721 00002575 3A6701 <1> cmp ah, byte [bx + 1] 722 00002578 7509 <1> jne .ro 723 <1> .16_check_1: 724 0000257A 3A07 <1> cmp al, byte [bx] 725 0000257C 7505 <1> jne .ro 726 <1> .ret: 727 0000257E E85142 <1> call ee0a 728 <1> rr1_memory.return_j1: equ $ 729 00002581 EB95 <1> jmp rr1_memory.return 730 <1> 731 <1> .ro: 732 00002583 E84C42 <1> call ee0a 733 00002586 BA[4F12] <1> mov dx, msg.readonly_mem 734 00002589 E8217A <1> call putsz_error 735 0000258C EBF3 <1> jmp short rr1_memory.return_j1 736 <1> ..@rr_variable_write_access_end: 737 <1> 738 <1> %if _MMXSUPP 739 <1> ; INP: bx:dx = number 740 <1> ; byte [bp + ?mmx_isvar_type] = type/register 741 <1> rr1_mmx_set: 742 <1> subcpu 586 743 0000258E 8A46EF <1> mov al, byte [bp + ?mmx_isvar_type + 1] 744 00002591 48 <1> dec ax 745 00002592 48 <1> dec ax ; undo encoding for isvar type return 746 00002593 89D9 <1> mov cx, bx ; cx:dx = number 747 00002595 88C3 <1> mov bl, al 748 00002597 80E307 <1> and bl, 7 ; = register number 749 0000259A 83E018 <1> and ax, 11_000b ; = type of write 750 0000259D C1E802 <1> shr ax, 2 ; = index into table 751 <1> 752 <1> %if _PM 753 <1> push dx 754 <1> mov dx, word [code_seg] 755 <1> call setes2dx ; es => lDEBUG_CODE (writable) 756 <1> pop dx 757 <1> %else 758 000025A0 8E06[1001] <1> mov es, word [code_seg] ; es => lDEBUG_CODE 759 <1> %endif 760 000025A4 C0E303 <1> shl bl, 3 ; shift into reg field 761 000025A7 80CB07 <1> or bl, 07h ; code to get our ModR/M byte (r/m = [bx]) 762 000025AA 26881E[BF25] <1> mov byte [es:.getmmx_modrm], bl 763 <1> ; SMC in section lDEBUG_CODE 764 000025AF 26881E[C925] <1> mov byte [es:.setmmx_modrm], bl 765 <1> ; SMC in section lDEBUG_CODE 766 000025B4 EB00 <1> jmp @F ; try to invalidate prefetch 767 <1> @@: 768 000025B6 16 <1> push ss 769 000025B7 07 <1> pop es 770 000025B8 83EC08 <1> sub sp, 8 771 000025BB 89E3 <1> mov bx, sp 772 <1> .getmmx_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 773 000025BD 0F7F07 <1> movq qword [bx], mm0 774 <1> 775 000025C0 97 <1> xchg ax, di 776 000025C1 31C0 <1> xor ax, ax ; = 0 777 000025C3 FF95[CA42] <1> call near [mmx_set_table + di] 778 <1> 779 <1> .setmmx_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 780 000025C7 0F6F07 <1> movq mm0, qword [bx] 781 000025CA 83C408 <1> add sp, 8 782 000025CD EBB2 <1> jmp short rr1_memory.return_j1 783 <1> 784 <1> .signextend: 785 000025CF 85C9 <1> test cx, cx 786 000025D1 7901 <1> jns .zeroextend 787 000025D3 48 <1> dec ax ; = -1 788 <1> 789 <1> .zeroextend: 790 000025D4 894704 <1> mov word [bx + 4], ax 791 000025D7 894706 <1> mov word [bx + 6], ax 792 <1> ;; jmp short .lowonly 793 <1> ; fall through 794 <1> 795 <1> .lowonly: 796 000025DA 8917 <1> mov word [bx], dx 797 000025DC 894F02 <1> mov word [bx + 2], cx 798 000025DF C3 <1> retn 799 <1> 800 <1> .highonly: 801 000025E0 895704 <1> mov word [bx + 4], dx 802 000025E3 894F06 <1> mov word [bx + 6], cx 803 000025E6 C3 <1> retn 804 <1> 805 <1> subcpureset 806 <1> %endif 807 <1> 808 <1> 809 <1> lleave ctx 810 <1> 811 <1> 812 <1> usesection lDEBUG_DATA_ENTRY 813 000042BF 00 <1> align 2, db 0 814 <1> checksignificantbits_table: 815 000042C0 [5D82] <1> dw error_expr 816 000042C2 [7098] <1> dw getbyte.checksignificantbits 817 000042C4 [5E98] <1> dw getword.checksignificantbits 818 000042C6 [5098] <1> dw get3byte.checksignificantbits 819 000042C8 [8986] <1> dw retn_expr 820 <1> 821 <1> %if _MMXSUPP 822 <1> align 2, db 0 823 <1> mmx_set_table: 824 <1> ; 0 zero extension from 32 bits to write all 64 bits 825 <1> ; 1 sign extension from 32 bits to write all 64 bits 826 <1> ; 2 writes only low 32 bits 827 <1> ; 3 writes only high 32 bits 828 000042CA [D425] <1> dw rr1_mmx_set.zeroextend 829 000042CC [CF25] <1> dw rr1_mmx_set.signextend 830 000042CE [DA25] <1> dw rr1_mmx_set.lowonly 831 000042D0 [E025] <1> dw rr1_mmx_set.highonly 832 <1> %endif 833 <1> 834 <1> usesection lDEBUG_CODE 835 <1> 836 <1> 837 <1> ; Change flag register with mnemonics - F 838 <1> rr2: 839 000025E7 E88473 <1> call uppercase 840 000025EA 3C46 <1> cmp al, 'F' 841 000025EC 7403E9A000 <1> jne rr3 ; if not 'F' --> 842 000025F1 50 <1> push ax 843 000025F2 8A04 <1> mov al, byte [si] 844 000025F4 E84163 <1> nearcall isseparator? ; valid separator ? 845 000025F7 58 <1> pop ax 846 000025F8 7403E99400 <1> jne rr3 ; no --> 847 <1> .ef: 848 000025FD E8B073 <1> call skipcomma 849 00002600 3C2E <1> cmp al, '.' ; special ? 850 00002602 7405 <1> je .writeprompt ; yes --> 851 00002604 E88373 <1> call iseol? ; end of line ? 852 00002607 7517 <1> jne .noprompt ; no --> 853 <1> .writeprompt: 854 00002609 BF[B40A] <1> mov di, line_out 855 <1> %if _REGSHIGHLIGHT 856 0000260C 800E[DA00]02 <1> setopt [internalflags3], dif3_do_not_highlight 857 <1> %endif 858 00002611 56 <1> push si 859 00002612 E8B107 <1> call dmpflags 860 00002615 5E <1> pop si ; -> behind dot if any 861 <1> %if _MS_PROMPT_COMPAT 862 00002616 B004 <1> mov al, 4 863 <1> %endif 864 00002618 E84A01 <1> call dot_prompt 865 0000261B 7503E9FBFE <1> je rr1b ; if no change 866 <1> .noprompt: 867 <1> 868 00002620 E87601 <1> call isassignmentoperator? 869 00002623 56 <1> push si 870 00002624 7308 <1> jnc .noteol ; at least one value is required --> 871 <1> .check_loop: 872 00002626 E88873 <1> call skipcomm0 873 00002629 E85E73 <1> call iseol? 874 0000262C 7420 <1> je .really ; return if done 875 <1> .noteol: 876 0000262E E83D73 <1> call uppercase 877 00002631 86C4 <1> xchg al, ah 878 00002633 AC <1> lodsb 879 00002634 E83773 <1> call uppercase 880 00002637 86C4 <1> xchg al, ah ; ax = mnemonic 881 00002639 BF[1C3F] <1> mov di, flagson 882 0000263C B91000 <1> mov cx, 16 883 0000263F F2AF <1> repne scasw 884 00002641 7507 <1> jne short .errordec ; if no match 885 00002643 AC <1> lodsb 886 00002644 E8F162 <1> nearcall isseparator? 887 00002647 74DD <1> je .check_loop 888 <1> .errordec2: 889 00002649 4E <1> dec si 890 <1> .errordec: 891 <1> errordec: equ $ 892 0000264A 4E <1> dec si ; back up one before flagging an error 893 0000264B E90F5C <1> jmp error 894 <1> 895 <1> .really: 896 0000264E 5E <1> pop si 897 0000264F 4E <1> dec si 898 00002650 AC <1> lodsb 899 <1> .loop: 900 00002651 E83673 <1> call iseol? 901 00002654 7503E9C2FE <1> je rr1b ; return if done 902 <1> 903 00002659 E81273 <1> call uppercase 904 0000265C 86C4 <1> xchg al, ah 905 0000265E AC <1> lodsb 906 0000265F E80C73 <1> call uppercase 907 00002662 86C4 <1> xchg al, ah ; ax = mnemonic 908 <1> 909 00002664 BF[1C3F] <1> mov di, flagson 910 00002667 B91000 <1> mov cx, 16 911 0000266A F2AF <1> repne scasw 912 0000266C 75DC <1> jne short .errordec ; if no match 913 0000266E 81FF[2C3F] <1> cmp di, flagsoff 914 00002672 7709 <1> ja .clear ; if we're clearing 915 00002674 8B45EE <1> mov ax, word [di-(flagson-flagbits)-2] 916 00002677 0906[E00C] <1> or word [reg_efl], ax ; set the bit 917 0000267B EB09 <1> jmp short .common 918 <1> .clear: 919 0000267D 8B45DE <1> mov ax, word [di-(flagsoff-flagbits)-2] 920 00002680 F7D0 <1> not ax 921 00002682 2106[E00C] <1> and word [reg_efl], ax ; clear the bit 922 <1> .common: 923 00002686 AC <1> lodsb 924 00002687 E8AE62 <1> nearcall isseparator? 925 0000268A 75BD <1> jne short .errordec2 926 0000268C E82273 <1> call skipcomm0 927 0000268F EBC0 <1> jmp short .loop 928 <1> 929 <1> ; Change flag register with mnemonics - EF 930 <1> rr3: 931 00002691 86C4 <1> xchg al, ah 932 00002693 AC <1> lodsb 933 00002694 E8D772 <1> call uppercase 934 00002697 86C4 <1> xchg al, ah ; ax = next two characters 935 00002699 3D4546 <1> _386 cmp ax, "EF" 936 0000269C 750B <1> _386 jne rr4 ; if not "EF" --> 937 0000269E 50 <1> _386 push ax 938 0000269F 8A04 <1> _386 mov al, byte [si] 939 000026A1 E89462 <1> _386 nearcall isseparator? ; valid separator ? 940 000026A4 58 <1> _386 pop ax 941 000026A5 0F8454FF <1> _386 je rr2.ef 942 <1> 943 <1> ; Change a single flag with mnemonic 944 <1> rr4: 945 000026A9 BF[3C3F] <1> mov di, flagnames 946 000026AC B90800 <1> mov cx, 8 947 000026AF F2AF <1> repne scasw 948 000026B1 7597 <1> jne short rr2.errordec 949 000026B3 89C2 <1> mov dx, ax 950 000026B5 AC <1> lodsb 951 000026B6 E87F62 <1> nearcall isseparator? 952 000026B9 758E <1> jne short rr2.errordec2 953 000026BB FF75CE <1> push word [di-(flagnames-flagbits)-2] 954 000026BE E8F072 <1> call skipcomm0 955 000026C1 3C2E <1> cmp al, '.' ; special ? 956 000026C3 7405 <1> je .writeprompt ; yes --> 957 000026C5 E8C272 <1> call iseol? 958 000026C8 751B <1> jne .noprompt 959 <1> .writeprompt: 960 000026CA BF[B40A] <1> mov di, line_out 961 000026CD 89D0 <1> mov ax, dx 962 000026CF AB <1> stosw 963 000026D0 58 <1> pop ax 964 000026D1 50 <1> push ax 965 000026D2 8506[E00C] <1> test word [reg_efl], ax ; is it off ? 966 000026D6 B82030 <1> mov ax, " 0" ; assume so 967 000026D9 7402 <1> jz .off ; it is off --> 968 000026DB FEC4 <1> inc ah ; is on, set to '1' 969 <1> .off: 970 000026DD AB <1> stosw 971 <1> %if _MS_PROMPT_COMPAT 972 000026DE B000 <1> mov al, 0 973 <1> %endif 974 000026E0 E88200 <1> call dot_prompt 975 000026E3 747E <1> je .ret_pop ; if no change --> 976 <1> .noprompt: 977 000026E5 E8A272 <1> call iseol? ; end of line ? 978 000026E8 7479 <1> je .ret_pop ; yes, no change requested --> 979 000026EA 51 <1> push cx 980 000026EB 50 <1> push ax 981 000026EC 56 <1> push si 982 000026ED E83262 <1> nearcall isoperator? 983 000026F0 7520 <1> jne .nooperator 984 000026F2 89CB <1> mov bx, cx 985 000026F4 01DB <1> add bx, bx ; bh = 0 ! 986 000026F6 50 <1> push ax 987 <1> %if _DUALCODE && _EXPRDUALCODE 988 <1> nearcall ..@rr_operatordispatchers 989 <1> 990 <1> usesection lDEBUG_CODE2 991 <1> ..@rr_operatordispatchers: section_of_function 992 <1> jmp near [operatordispatchers+bx] 993 <1> 994 <1> usesection lDEBUG_CODE 995 <1> %else 996 000026F7 FF97[D04B] <1> call near [operatordispatchers+bx] 997 <1> %endif 998 000026FB 58 <1> pop ax 999 000026FC 85DB <1> test bx, bx 1000 000026FE 7412 <1> jz .nooperator 1001 00002700 80FB17 <1> cmp bl, OPERATOR_BOOL_AND 1002 00002703 770D <1> ja .nooperator 1003 00002705 80FB15 <1> cmp bl, OPERATOR_BOOL_OR 1004 00002708 730C <1> jae .gotoperator 1005 0000270A 80C303 <1> add bl, OPERATOR_BOOL_OR - OPERATOR_BIT_OR 1006 0000270D 80FB15 <1> cmp bl, OPERATOR_BOOL_OR 1007 00002710 7304 <1> jae .gotoperator 1008 <1> .nooperator: 1009 00002712 BB1900 <1> mov bx, OPERATOR_RIGHTOP; set default computation function 1010 00002715 A8 <1> db __TEST_IMM8 1011 <1> .gotoperator: 1012 00002716 AC <1> lodsb 1013 <1> 1014 00002717 E87F00 <1> call isassignmentoperator? 1015 0000271A 7308 <1> jnc .assign_op_done ; found an assignment operator --> 1016 0000271C 83FB19 <1> cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 1017 <1> %if 1 ; since | ^ & are never unary operators 1018 0000271F 7403E9395B <1> jne error 1019 <1> %else 1020 <1> je .assign_op_done ; yes, assignment operator not required --> 1021 <1> pop cx 1022 <1> pop ax ; restore al, si in front of operator 1023 <1> push ax 1024 <1> push cx 1025 <1> xchg si, cx 1026 <1> push cx 1027 <1> nearcall isunaryoperator?; is this a valid unary operator too ? 1028 <1> pop cx 1029 <1> je .nooperator ; yes --> 1030 <1> xchg si, cx 1031 <1> jmp error ; error where the assignment operator needs to be 1032 <1> %endif 1033 <1> .assign_op_done: 1034 00002724 59 <1> pop cx 1035 00002725 59 <1> pop cx 1036 00002726 59 <1> pop cx 1037 00002727 53 <1> push bx 1038 00002728 E84C6C <1> nearcall getexpression 1039 0000272B E87172 <1> call chkeol 1040 0000272E E86965 <1> nearcall toboolean 1041 00002731 59 <1> pop cx ; operator index 1042 00002732 31C0 <1> xor ax, ax 1043 00002734 A2[0154] <1> mov byte [hhtype], al 1044 00002737 A3[F253] <1> mov word [hhvar+2], ax 1045 0000273A 5E <1> pop si 1046 0000273B 56 <1> push si ; flag 1047 0000273C 8536[E00C] <1> test word [reg_efl], si 1048 00002740 7401 <1> jz .notset 1049 00002742 40 <1> inc ax 1050 <1> .notset: 1051 00002743 A3[F053] <1> mov word [hhvar], ax 1052 00002746 87CB <1> xchg cx, bx 1053 00002748 01DB <1> add bx, bx 1054 0000274A 8B9F[144C] <1> mov bx, word [bx+operatorfunctions] 1055 0000274E 87CB <1> xchg cx, bx ; cx = operator function 1056 <1> %if _DUALCODE && _EXPRDUALCODE 1057 <1> nearcall ..@rr_operatorfunctions 1058 <1> 1059 <1> usesection lDEBUG_CODE2 1060 <1> ..@rr_operatorfunctions: section_of_function 1061 <1> jmp cx 1062 <1> 1063 <1> usesection lDEBUG_CODE 1064 <1> %else 1065 00002750 FFD1 <1> call cx ; compute 1066 <1> %endif 1067 00002752 58 <1> pop ax 1068 00002753 85D2 <1> test dx, dx 1069 00002755 7405 <1> jz .clear 1070 00002757 0906[E00C] <1> or word [reg_efl], ax ; set the bit 1071 0000275B C3 <1> retn 1072 <1> .clear: 1073 0000275C F7D0 <1> not ax 1074 0000275E 2106[E00C] <1> and word [reg_efl], ax ; clear the bit 1075 00002762 C3 <1> retn 1076 <1> 1077 <1> .ret_pop: 1078 00002763 58 <1> pop ax 1079 00002764 C3 <1> retn 1080 <1> 1081 <1> 1082 <1> ; INP: di-> behind prompt to display (in line_out) 1083 <1> ; Iff byte[si-1] == '.', 1084 <1> ; only display without actual prompting 1085 <1> ; si-> line to check for EOL 1086 <1> ; if _MS_PROMPT_COMPAT: 1087 <1> ; al = offset into dispatch tables, 0 or 2 or 4 1088 <1> ; OUT: NZ iff actually prompted and got non-empty line, 1089 <1> ; al = first character 1090 <1> ; si-> next character 1091 <1> ; dx, bx preserved 1092 <1> ; CHG: ax, cx, si, di, dx, bx 1093 <1> dot_prompt: 1094 00002765 807CFF2E <1> cmp byte [si-1], '.' ; syntax for display without prompt ? 1095 00002769 7425 <1> je .onlydisplay ; yes --> 1096 0000276B 53 <1> push bx 1097 0000276C 52 <1> push dx 1098 <1> %if _MS_PROMPT_COMPAT 1099 0000276D 98 <1> cbw ; ax = expand offset to word 1100 0000276E 93 <1> xchg bx, ax ; bx = offset 1101 0000276F BE[0A54] <1> mov si, table_getline_prepare_ms_debug 1102 00002772 F606[A600]10 <1> testopt [options2], opt2_r_prompt_compat 1103 00002777 7503 <1> jnz @F 1104 00002779 BE[0454] <1> mov si, table_getline_prepare_ldebug 1105 <1> @@: 1106 0000277C FF10 <1> call near [si + bx] ; call prefix/preparation function 1107 0000277E E8C07B <1> call getline00 1108 <1> %else 1109 <1> call getline0 1110 <1> %endif 1111 00002781 5A <1> pop dx 1112 00002782 5B <1> pop bx 1113 00002783 E80472 <1> call iseol? ; no change requested ? 1114 00002786 7410 <1> je .ret ; yes --> (ZR) 1115 00002788 3C2E <1> cmp al, '.' ; other syntax for no change ? 1116 0000278A 750C <1> jne .ret ; no --> (NZ) 1117 <1> .chkeol1: 1118 0000278C AC <1> lodsb 1119 0000278D E90F72 <1> jmp chkeol ; (ZR) 1120 <1> 1121 <1> .onlydisplay: 1122 00002790 E8F9FF <1> call .chkeol1 1123 00002793 E82D73 <1> call putsline_crlf 1124 00002796 38C0 <1> cmp al, al ; ZR 1125 <1> .ret: 1126 00002798 C3 <1> retn 1127 <1> 1128 <1> 1129 <1> ; INP: al = first character 1130 <1> ; si-> remaining string 1131 <1> ; OUT: CY if no assignment operator was found 1132 <1> ; NC if an assignment operator was found, 1133 <1> ; al = first character behind it (skipcomma called) 1134 <1> ; si-> remaining string behind character al 1135 <1> isassignmentoperator?: 1136 00002799 3C3A <1> cmp al, ':' 1137 0000279B 750A <1> jne .checksingleequality 1138 0000279D AC <1> lodsb 1139 0000279E 3C3D <1> cmp al, '=' 1140 000027A0 7409 <1> je .skip ; long form assignment operator --> 1141 <1> ; A single colon. Report "no assignment operator" here. 1142 000027A2 4E <1> dec si 1143 000027A3 B03A <1> mov al, ':' ; restore si, al 1144 <1> .return_cy: 1145 000027A5 F9 <1> stc 1146 000027A6 C3 <1> retn 1147 <1> 1148 <1> .checksingleequality: 1149 000027A7 3C3D <1> cmp al, '=' 1150 000027A9 75FA <1> jne .return_cy ; no assignment operator --> 1151 <1> .skip: 1152 000027AB E80272 <1> call skipcomma 1153 000027AE F8 <1> clc 1154 000027AF C3 <1> retn 1155 <1> 1156 <1> 1157 <1> rc_cmd: 1158 000027B0 BF[3001] <1> mov di, cmdline_buffer 1159 000027B3 BD[3002] <1> mov bp, cmdline_buffer.end 1160 000027B6 EB06 <1> jmp @F 1161 <1> 1162 <1> ; INP: al = '.' 1163 <1> ; si -> next character 1164 <1> re_cmd: 1165 000027B8 BF[3402] <1> mov di, re_buffer 1166 000027BB BD[340A] <1> mov bp, re_buffer.end 1167 <1> @@: 1168 000027BE 5A <1> pop dx 1169 000027BF 5A <1> pop dx ; discard si and ax on stack 1170 000027C0 BA[132A] <1> mov dx, msg.list 1171 000027C3 E85A71 <1> call isstring? 1172 000027C6 7503E9B700 <1> je .list 1173 <1> 1174 000027CB 81FF[3402] <1> cmp di, re_buffer 1175 000027CF 741E <1> je @F 1176 <1> 1177 000027D1 BA[3726] <1> mov dx, msg.abort 1178 000027D4 E84971 <1> call isstring? 1179 000027D7 7511 <1> jne .guard_rc 1180 <1> .abort_rc: 1181 000027D9 E8AC86 <1> call yy_reset_buf 1182 000027DC 8026[D900]FE <1> clropt [internalflags3], dif3_input_cmdline 1183 000027E1 800E[D900]02 <1> setopt [internalflags3], dif3_input_cmdline_closed 1184 000027E6 E8CF82 <1> call getline_reset_notatty 1185 000027E9 C3 <1> retn 1186 <1> 1187 <1> .guard_rc: 1188 000027EA E8FBDE <1> call guard_rc 1189 000027ED EB03 <1> jmp @FF 1190 <1> 1191 <1> @@: 1192 000027EF E8E3DE <1> call guard_re 1193 <1> @@: 1194 <1> 1195 000027F2 BA[151E] <1> mov dx, msg.append 1196 000027F5 E82871 <1> call isstring? 1197 000027F8 740D <1> je .append 1198 000027FA BA[0D1E] <1> mov dx, msg.replace 1199 000027FD E82071 <1> call isstring? 1200 00002800 740D <1> je .common ; di -> at first byte (where to append) 1201 00002802 B80401 <1> mov ax, 0104h 1202 00002805 EB75 <1> jmp .error_common 1203 <1> 1204 <1> .append: 1205 00002807 30C0 <1> xor al, al 1206 00002809 B9FFFF <1> mov cx, -1 1207 0000280C F2AE <1> repne scasb ; di -> after zero byte 1208 0000280E 4F <1> dec di ; -> at zero byte 1209 <1> 1210 <1> .common: 1211 0000280F E8CD71 <1> call skipwhite 1212 <1> 1213 <1> %if _RECMDWHILEBUFFER 1214 <1> %if _WHILEBUFFSIZE < 256 1215 <1> %error WHILE buffer not large enough for re_cmd 1216 <1> %endif 1217 00002812 BB[F00C] <1> mov bx, while_buffer 1218 00002815 F606[D300]04 <1> testopt [internalflags], tt_while 1219 0000281A 7409 <1> jz .use_whilebuffer 1220 <1> 1221 <1> .use_auxbuff: 1222 <1> %endif 1223 0000281C E89ADE <1> call guard_auxbuff 1224 0000281F 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] 1225 00002823 31DB <1> xor bx, bx ; es:bx -> buffer 1226 <1> 1227 <1> .use_whilebuffer: 1228 <1> %if _RECMDWHILEBUFFER 1229 00002825 89DA <1> mov dx, bx ; es:dx -> start of buffer 1230 <1> %endif 1231 <1> 1232 00002827 50 <1> push ax 1233 00002828 B00D <1> mov al, 13 1234 0000282A 3845FF <1> cmp byte [di - 1], al ; is there an EOL in front of us? 1235 0000282D 87DF <1> xchg bx, di ; es:di -> auxbuff, bx -> at zero byte 1236 0000282F 7401 <1> je @F ; yes --> 1237 <1> 1238 00002831 AA <1> stosb ; first store a CR 1239 <1> @@: 1240 00002832 58 <1> pop ax 1241 <1> .loop: 1242 00002833 3C5C <1> cmp al, '\' 1243 00002835 750A <1> jne .literal 1244 <1> 1245 00002837 AC <1> lodsb ; load escaped character 1246 00002838 E85371 <1> call iseol?.notsemicolon; EOL ? 1247 0000283B 7437 <1> je .error_escaped_cr ; yes, error --> 1248 0000283D AA <1> stosb ; store escaped literal 1249 0000283E AC <1> lodsb ; load next 1250 0000283F EBF2 <1> jmp .loop 1251 <1> 1252 <1> .literal: 1253 00002841 E84A71 <1> call iseol?.notsemicolon; EOL ? 1254 00002844 7410 <1> je .end ; got all --> 1255 00002846 3C3B <1> cmp al, ';' ; semicolon ? 1256 00002848 7508 <1> jne @F 1257 0000284A B00D <1> mov al, 13 1258 0000284C AA <1> stosb ; store linebreak 1259 0000284D E88F71 <1> call skipwhite ; skip leading blanks 1260 00002850 EBE1 <1> jmp .loop 1261 <1> 1262 <1> @@: 1263 00002852 AA <1> stosb ; store character 1264 00002853 AC <1> lodsb 1265 00002854 EBDD <1> jmp .loop 1266 <1> 1267 <1> .end: 1268 <1> ; di -> behind last character 1269 00002856 31C0 <1> xor ax, ax 1270 00002858 AA <1> stosb 1271 00002859 89D8 <1> mov ax, bx 1272 <1> %if _RECMDWHILEBUFFER 1273 0000285B 29D7 <1> sub di, dx 1274 <1> %endif 1275 0000285D 01F8 <1> add ax, di 1276 0000285F 7218 <1> jc .error_too_much 1277 00002861 39E8 <1> cmp ax, bp 1278 00002863 7714 <1> ja .error_too_much 1279 <1> %if _RECMDWHILEBUFFER 1280 00002865 89D6 <1> mov si, dx 1281 <1> %else 1282 <1> xor si, si 1283 <1> %endif 1284 00002867 06 <1> push es 1285 00002868 1F <1> pop ds 1286 00002869 16 <1> push ss 1287 0000286A 07 <1> pop es 1288 0000286B 89F9 <1> mov cx, di 1289 0000286D 89DF <1> mov di, bx 1290 0000286F F3A4 <1> rep movsb 1291 00002871 16 <1> push ss 1292 00002872 1F <1> pop ds 1293 00002873 C3 <1> retn 1294 <1> 1295 <1> .error_escaped_cr: 1296 00002874 B80501 <1> mov ax, 0105h 1297 00002877 EB03 <1> jmp .error_common 1298 <1> 1299 <1> .error_too_much: 1300 00002879 B80601 <1> mov ax, 0106h 1301 <1> 1302 <1> .error_common: 1303 0000287C E82A5A <1> call setrc 1304 0000287F E9DB59 <1> jmp error 1305 <1> 1306 <1> re_cmd.list: 1307 00002882 AC <1> lodsb 1308 00002883 E81971 <1> call chkeol 1309 <1> 1310 00002886 89FE <1> mov si, di 1311 00002888 31C0 <1> xor ax, ax ; ah = 0 (flag to escape blanks) 1312 <1> %if _40COLUMNS 1313 <1> usesection lDEBUG_DATA_ENTRY 1314 <1> align 2, db 0 1315 <1> .lastfragmentlength: 1316 000042D2 0000 <1> dw 0 1317 <1> 1318 <1> usesection lDEBUG_CODE 1319 0000288A A3[D242] <1> mov word [.lastfragmentlength], ax 1320 <1> ; init to zero 1321 <1> %endif 1322 0000288D BF[B40A] <1> mov di, line_out ; write to line_out 1323 <1> ; Note that we cannot depend on line_out being 1324 <1> ; large enough for every command because we 1325 <1> ; want to escape initial blanks and all quote 1326 <1> ; marks as well as backslashes. However, the 1327 <1> ; quote marks can be entered without escapes 1328 <1> ; in Rx.APPEND/.REPLACE so line_out may not be 1329 <1> ; large enough to hold a whole command. 1330 <1> ; Previously we called putsline in the .cr branch 1331 <1> ; but this is not needed if several short commands 1332 <1> ; are displayed. The necessary check in .put does 1333 <1> ; suffice to handle a filled buffer. 1334 <1> .loop: 1335 00002890 AC <1> lodsb 1336 00002891 84C0 <1> test al, al 1337 00002893 7453 <1> jz .end 1338 00002895 3C0D <1> cmp al, 13 ; (intentionally not iseol?) 1339 00002897 7441 <1> je .cr 1340 00002899 3C20 <1> cmp al, 32 1341 0000289B 7430 <1> je .escapeif 1342 0000289D 3C09 <1> cmp al, 9 1343 0000289F 742C <1> je .escapeif 1344 000028A1 B401 <1> mov ah, 1 ; ah = 1 1345 000028A3 3C3B <1> cmp al, ';' 1346 000028A5 742C <1> je .escape 1347 000028A7 3C22 <1> cmp al, '"' 1348 000028A9 7428 <1> je .escape 1349 000028AB 3C27 <1> cmp al, "'" 1350 000028AD 7424 <1> je .escape 1351 000028AF 3C5C <1> cmp al, '\' 1352 000028B1 7420 <1> je .escape 1353 <1> .put: 1354 <1> ; Check that we are within available buffer space. 1355 <1> ; Is it enough for 1 more codepoint plus an escape 1356 <1> ; backslash for the .escape branch? 1357 <1> ; Is it also enough for 1 more codepoint plus the 1358 <1> ; semicolon for the .cr branch? 1359 <1> ; The 4 is an exaggeration. 1360 000028B3 81FF[B80B] <1> cmp di, line_out_end - 4 1361 000028B7 7211 <1> jb @F ; yes --> 1362 <1> %if _40COLUMNS 1363 000028B9 50 <1> push ax 1364 000028BA A1[D242] <1> mov ax, word [.lastfragmentlength] 1365 000028BD E8F974 <1> call putsline_break_line 1366 000028C0 A3[D242] <1> mov word [.lastfragmentlength], ax 1367 <1> ; We cheat: At this point we know that we always 1368 <1> ; want to display more so we can call the _more 1369 <1> ; function unconditionally here. 1370 000028C3 E81F75 <1> call puts_break_line_more 1371 000028C6 58 <1> pop ax 1372 <1> %else 1373 <1> call putsline 1374 <1> %endif 1375 000028C7 BF[B40A] <1> mov di, line_out 1376 <1> @@: 1377 000028CA AA <1> stosb 1378 000028CB EBC3 <1> jmp .loop 1379 <1> 1380 <1> .escapeif: 1381 000028CD 84E4 <1> test ah, ah 1382 000028CF 75E2 <1> jnz .put 1383 000028D1 B401 <1> mov ah, 1 ; ah = 1 1384 <1> .escape: 1385 000028D3 50 <1> push ax 1386 000028D4 B05C <1> mov al, '\' 1387 000028D6 AA <1> stosb ; (always have space) 1388 000028D7 58 <1> pop ax 1389 000028D8 EBD9 <1> jmp .put ; checks for buffer space 1390 <1> 1391 <1> .cr: 1392 000028DA AC <1> lodsb 1393 000028DB 84C0 <1> test al, al 1394 000028DD 7409 <1> jz .end 1395 000028DF 4E <1> dec si 1396 000028E0 B03B <1> mov al, ';' 1397 000028E2 AA <1> stosb ; (always have space) 1398 000028E3 B82000 <1> mov ax, 32 ; ah = 0 1399 000028E6 EBCB <1> jmp .put ; checks for buffer space 1400 <1> 1401 <1> .end: 1402 <1> %if _40COLUMNS 1403 000028E8 A1[D242] <1> mov ax, word [.lastfragmentlength] 1404 000028EB E8CB74 <1> call putsline_break_line 1405 <1> %else 1406 <1> call putsline 1407 <1> %endif 1408 000028EE BA[E732] <1> mov dx, crlf 1409 000028F1 E9BF76 <1> jmp putsz 1410 <1> 1411 <1> 1412 <1> rc_run: 1413 000028F4 E8F1DD <1> call guard_rc 1414 000028F7 E8DBDD <1> call guard_re ; do not allow RE command to run RC 1415 <1> ; (the RE buffer would drain first) 1416 <1> 1417 000028FA E88B85 <1> call yy_reset_buf 1418 <1> 1419 000028FD C706[3002][3001] <1> mov word [cmdline_buffer.position], cmdline_buffer 1420 00002903 8326[400A]00 <1> and word [rc_count], 0 1421 00002908 8326[420A]00 <1> and word [rc_count + 2], 0 1422 <1> 1423 0000290D 800E[D900]01 <1> setopt [internalflags3], dif3_input_cmdline 1424 <1> 1425 00002912 C3 <1> retn 1426 <1> 1427 <1> 1428 <1> dumpregs_extended: 1429 00002913 E8BFDD <1> call guard_re 1430 00002916 813E[3402]4052 <1> cmp word [re_buffer], "@R" 1431 0000291C 7408 <1> je @F 1432 0000291E 813E[3402]4072 <1> cmp word [re_buffer], "@r" 1433 00002924 750A <1> jne .complex 1434 <1> @@: 1435 00002926 803E[3602]00 <1> cmp byte [re_buffer + 2], 0 1436 0000292B 7503E9A300 <1> je .just_dumpregs 1437 <1> 1438 <1> .complex: 1439 <1> %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER 1440 00002930 C606[0801]FF <1> mov byte [in_re], -1 1441 <1> %endif 1442 <1> %if _RH 1443 00002935 E85602 <1> call enable_rh_2 1444 <1> %endif 1445 <1> 1446 00002938 F606[DB00]20 <1> testopt [internalflags3], dif3_auxbuff_guarded_2 1447 0000293D 740C <1> jz @F 1448 <1> 1449 0000293F B80301 <1> mov ax, 0103h 1450 00002942 E86459 <1> call setrc 1451 00002945 BA[8E1D] <1> mov dx, msg.unexpected_auxbuff_guard 1452 00002948 E96876 <1> jmp putsz 1453 <1> 1454 <1> @@: 1455 <1> %if _SYMBOLIC 1456 <1> testopt [internalflags3], dif3_nosymbols_2 1457 <1> jz @F 1458 <1> 1459 <1> mov ax, 0103h 1460 <1> call setrc 1461 <1> mov dx, msg.unexpected_nosymbols 1462 <1> jmp putsz 1463 <1> 1464 <1> @@: 1465 <1> %endif 1466 0000294B E83A85 <1> call yy_reset_buf 1467 <1> 1468 0000294E C706[340A][3402] <1> mov word [re_buffer.position], re_buffer 1469 00002954 8326[380A]00 <1> and word [re_count], 0 1470 00002959 8326[3A0A]00 <1> and word [re_count + 2], 0 1471 <1> 1472 0000295E FF36[660B] <1> push word [rc] 1473 00002962 FF36[EC0A] <1> push word [savesp] 1474 00002966 FF36[F60A] <1> push word [throwsp] 1475 0000296A FF36[020C] <1> push word [lastcmd] 1476 0000296E 55 <1> push bp 1477 0000296F 8926[EC0A] <1> mov word [savesp], sp 1478 00002973 8926[F60A] <1> mov word [throwsp], sp 1479 00002977 8926[F00A] <1> mov word [re_sp], sp 1480 <1> 1481 0000297B 800E[DB00]01 <1> setopt [internalflags3], dif3_input_re 1482 <1> 1483 00002980 F606[DB00]10 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 1484 00002985 7405 <1> jz @F 1485 00002987 8036[DB00]30 <1> xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 1486 <1> @@: 1487 <1> %if _SYMBOLIC 1488 <1> testopt [internalflags3], dif3_nosymbols_1 1489 <1> jz @F 1490 <1> xoropt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 1491 <1> @@: 1492 <1> %endif 1493 <1> .cmd3: 1494 0000298C E971D6 <1> jmp cmd3 1495 <1> 1496 <1> .exit: 1497 0000298F 8B26[F00A] <1> mov sp, word [re_sp] 1498 00002993 5D <1> pop bp 1499 00002994 8F06[020C] <1> pop word [lastcmd] 1500 00002998 8F06[F60A] <1> pop word [throwsp] 1501 0000299C 8F06[EC0A] <1> pop word [savesp] 1502 000029A0 58 <1> pop ax 1503 000029A1 85C0 <1> test ax, ax 1504 000029A3 7403 <1> jz @F 1505 000029A5 A3[660B] <1> mov word [rc], ax 1506 <1> @@: 1507 000029A8 8026[DB00]FE <1> clropt [internalflags3], dif3_input_re 1508 <1> 1509 000029AD F606[DB00]20 <1> testopt [internalflags3], dif3_auxbuff_guarded_2 1510 000029B2 7405 <1> jz @F 1511 000029B4 8036[DB00]30 <1> xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 1512 <1> @@: 1513 <1> %if _SYMBOLIC 1514 <1> testopt [internalflags3], dif3_nosymbols_2 1515 <1> jz @F 1516 <1> xoropt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 1517 <1> @@: 1518 <1> %endif 1519 <1> %if _RH 1520 000029B9 8026[E600]DF <1> clropt [internalflags6], dif6_rh_mode_2 1521 000029BE E8C001 <1> call enable_rh 1522 <1> 1523 000029C1 E85F19 <1> call terminate_silent_dump.if_nonnull 1524 <1> %endif 1525 <1> %if _RH || _SWHILEBUFFER || _RECMDWHILEBUFFER 1526 000029C4 C606[0801]00 <1> mov byte [in_re], 0 1527 <1> %endif 1528 <1> 1529 000029C9 F606[A500]80 <1> testopt [options2], opt2_re_cancel_tpg 1530 000029CE 7501 <1> jnz @F 1531 <1> 1532 000029D0 C3 <1> retn 1533 <1> 1534 <1> @@: 1535 <1> %ifn _RH 1536 <1> call terminate_silent_dump.if_nonnull 1537 <1> %endif 1538 000029D1 EBB9 <1> jmp .cmd3 1539 <1> 1540 <1> 1541 <1> .just_dumpregs: 1542 <1> %if _RH 1543 000029D3 E9B2F7 <1> jmp rr.r_and_terminate 1544 <1> %endif 1545 <1> 1546 <1> ; DUMPREGS - Dump registers. 1547 <1> ; 1548 <1> ; 16 bit: 8 regs, line break, first 4 segment regs, 1549 <1> ; IP, flags 1550 <1> ; 32 bit: 6 regs, line break, 2 regs, flags, line break, 1551 <1> ; 6 segment regs, EIP 1552 <1> ; 16 bit / 40-column mode: 5 regs, line break, 4 segment regs, 1553 <1> ; SP, line break, IP, SI, DI, shorter flags display 1554 <1> ; CHG: ax, bx, cx, dx, di, si 1555 <1> dumpregs: 1556 <1> %if _RH 1557 000029D6 E8A801 <1> call enable_rh 1558 <1> %endif 1559 <1> 1560 <1> %if _IMMASM 1561 <1> call dumpregs_no_disasm 1562 <1> jmp dumpregs_disasm 1563 <1> 1564 <1> 1565 <1> dumpregs_no_disasm: 1566 <1> %endif 1567 <1> %if _REGSLINEBREAK 1568 000029D9 F606[A600]40 <1> testopt [options2], opt2_r_linebreak_always 1569 000029DE 7521 <1> jnz @F 1570 000029E0 F606[B700]80 <1> testopt [options6], opt6_r_linebreak_conditional 1571 000029E5 7420 <1> jz @FF 1572 000029E7 F606[150C]10 <1> testopt [serial_flags], sf_use_serial 1573 <1> ; serial ? 1574 000029EC 7519 <1> jnz @FF ; yes --> 1575 000029EE E8715B <1> call InDOS_or_BIOS_output 1576 000029F1 7414 <1> jz @FF 1577 000029F3 B403 <1> mov ah, 3 1578 000029F5 8A3E[550B] <1> mov bh, byte [vpage] 1579 000029F9 31D2 <1> xor dx, dx ; pre-initialise to zero 1580 000029FB CD10 <1> int 10h ; dl = column, dh = row 1581 000029FD 84D2 <1> test dl, dl 1582 000029FF 7406 <1> jz @FF 1583 <1> @@: 1584 00002A01 BA[E732] <1> mov dx, crlf 1585 00002A04 E8AC75 <1> call putsz 1586 <1> @@: 1587 <1> %endif 1588 <1> %if _REGSHIGHLIGHT 1589 00002A07 F606[AA00]08 <1> testopt [options3], opt3_r_highlight_eip 1590 00002A0C 7506 <1> jnz @F 1591 00002A0E A1[DC0C] <1> mov ax, word [reg_eip] 1592 00002A11 A3[1C0D] <1> mov word [reg_eip - regs + regs_prior], ax 1593 <1> %if _PM 1594 <1> mov ax, word [reg_eip + 2] 1595 <1> mov word [reg_eip + 2 - regs + regs_prior], ax 1596 <1> %endif 1597 <1> @@: 1598 <1> %endif 1599 <1> 1600 00002A14 BE[DC3F] <1> mov si, reg16names 1601 00002A17 BF[B40A] <1> mov di, line_out 1602 00002A1A B90800 <1> mov cx, 8 ; display all 8 standard regs (16-bit) 1603 00002A1D F606[A000]01 <1> testopt [options], dispregs32 1604 00002A22 7404 <1> jz .firstrow16 1605 00002A24 B106 <1> mov cl, 6 ; room for 6 standard regs (32-bit) only 1606 <1> %if _40COLUMNS 1607 00002A26 EB4D <1> jmp .firstrow_not40 1608 <1> %endif 1609 <1> .firstrow16: 1610 <1> %if _40COLUMNS 1611 00002A28 F606[B500]10 <1> testopt [options6], opt6_40_columns 1612 00002A2D 7446 <1> jz .firstrow_not40 1613 00002A2F B104 <1> mov cl, 4 1614 00002A31 57 <1> push di 1615 00002A32 E86401 <1> call dmpr1 ; ax, bx, cx, dx 1616 00002A35 46 <1> inc si 1617 00002A36 46 <1> inc si ; skip sp 1618 00002A37 41 <1> inc cx ; = 1 1619 00002A38 E85E01 <1> call dmpr1 ; bp 1620 00002A3B E87D70 <1> call trimputs 1621 00002A3E 5F <1> pop di 1622 00002A3F 57 <1> push di 1623 00002A40 BE[F23F] <1> mov si, reg16names + 11 * 2 ; cs 1624 00002A43 B90100 <1> mov cx, 1 1625 00002A46 E85001 <1> call dmpr1 1626 00002A49 BE[EC3F] <1> mov si, reg16names + 8 * 2 ; ds, es, ss 1627 00002A4C B103 <1> mov cl, 3 1628 00002A4E E84801 <1> call dmpr1 1629 00002A51 BE[E43F] <1> mov si, reg16names + 4 * 2 ; sp 1630 00002A54 41 <1> inc cx 1631 00002A55 E84101 <1> call dmpr1 1632 00002A58 E86070 <1> call trimputs 1633 00002A5B 5F <1> pop di 1634 00002A5C BE[F83F] <1> mov si, reg16names + 14 * 2 ; ip 1635 00002A5F B90100 <1> mov cx, 1 1636 00002A62 E83401 <1> call dmpr1 1637 00002A65 BE[E83F] <1> mov si, reg16names + 6 * 2 ; si, di 1638 00002A68 B102 <1> mov cl, 2 1639 00002A6A E82C01 <1> call dmpr1 1640 00002A6D E8C103 <1> call dmpshortflags 1641 00002A70 E85903 <1> call dmpflags.40 1642 00002A73 EB38 <1> jmp .lastrowdone 1643 <1> 1644 <1> %endif 1645 <1> .firstrow_not40: 1646 00002A75 9C <1> pushf 1647 00002A76 57 <1> push di 1648 00002A77 E81F01 <1> call dmpr1 ; display first row 1649 00002A7A E83E70 <1> call trimputs 1650 00002A7D 5F <1> pop di ; (reset di) 1651 00002A7E 9D <1> popf ; (reset ZF) 1652 00002A7F 7514 <1> jnz .secondrow32 1653 00002A81 B104 <1> mov cl, 4 ; display 4 segment regs 1654 00002A83 E81301 <1> call dmpr1 1655 00002A86 83C604 <1> add si, byte 2*2 ; skip FS+GS 1656 00002A89 41 <1> inc cx ; (= 1) 1657 00002A8A E80C01 <1> call dmpr1 ; display IP 1658 00002A8D E87801 <1> call stosb_if_rr_compat ; third blank if MS Debug compat 1659 00002A90 E83303 <1> call dmpflags ; display flags in 16-bit display 1660 00002A93 EB18 <1> jmp short .lastrowdone 1661 <1> .secondrow32: 1662 00002A95 57 <1> push di 1663 00002A96 B102 <1> mov cl, 2 ; display rest of 32-bit standard regs 1664 00002A98 E8FE00 <1> call dmpr1 1665 00002A9B 56 <1> push si 1666 00002A9C E82703 <1> call dmpflags ; display flags in 32-bit display 1667 00002A9F E82170 <1> call putsline_crlf 1668 00002AA2 5E <1> pop si 1669 00002AA3 5F <1> pop di ; (reset di) 1670 00002AA4 B106 <1> mov cl, 6 ; display all segment registers 1671 00002AA6 E8F000 <1> call dmpr1 1672 00002AA9 41 <1> inc cx ; (= 1) 1673 00002AAA E8EC00 <1> call dmpr1 ; display EIP 1674 <1> .lastrowdone: 1675 00002AAD E80B70 <1> call trimputs 1676 <1> 1677 <1> %if _REGSHIGHLIGHT 1678 00002AB0 BE[A40C] <1> mov si, regs 1679 00002AB3 BF[E40C] <1> mov di, regs_prior 1680 00002AB6 B92000 <1> mov cx, words(regs_prior.size) 1681 00002AB9 F3A5 <1> rep movsw ; update prior regs save area 1682 <1> %endif 1683 <1> %if _IMMASM 1684 <1> retn 1685 <1> 1686 <1> 1687 <1> dumpregs_disasm: 1688 <1> %endif 1689 <1> ; Set U address to CS:(E)IP. 1690 00002ABB BE[DC0C] <1> mov si, reg_eip 1691 00002ABE BF[840B] <1> mov di, u_addr 1692 00002AC1 A5 <1> movsw ; first word of saOffset 1693 <1> %if saSegSel == 4 1694 00002AC2 A5 <1> movsw ; second word of saOffset 1695 <1> %endif 1696 00002AC3 A1[D00C] <1> mov ax, word [reg_cs] 1697 00002AC6 AB <1> stosw ; saSegSel 1698 <1> %if _PM 1699 <1> call ispm 1700 <1> jnz .86m 1701 <1> .pm: 1702 <1> scasw ; skip saSegment, sto to saSelector 1703 <1> .86m: 1704 <1> stosw ; (if jumped to .86m) saSegment 1705 <1> @@: 1706 <1> %endif 1707 <1> 1708 00002AC7 B80300 <1> mov ax, DIS_F_REPT | DIS_F_SHOW 1709 00002ACA F606[A300]10 <1> testopt [options], rr_disasm_no_rept 1710 00002ACF 7402 <1> jz @F 1711 00002AD1 24FE <1> and al, ~ DIS_F_REPT 1712 <1> @@: 1713 00002AD3 F606[A300]20 <1> testopt [options], rr_disasm_no_show 1714 00002AD8 7402 <1> jz @F 1715 00002ADA 24FD <1> and al, ~ DIS_F_SHOW 1716 <1> @@: 1717 00002ADC A3[BA49] <1> mov word [disflags], ax 1718 00002ADF E8811F <1> call disasm 1719 <1> 1720 <1> ; Set ABO to address after the dumpregs disassembly. 1721 00002AE2 BF[7E0B] <1> mov di, behind_r_u_addr 1722 00002AE5 BE[840B] <1> mov si, u_addr 1723 00002AE8 A5 <1> movsw ; first word of saOffset 1724 <1> %if saSegSel == 4 1725 00002AE9 A5 <1> movsw ; second word of saOffset 1726 <1> %endif 1727 00002AEA A5 <1> movsw ; saSegSel 1728 <1> %if _PM 1729 <1> movsw ; saSegment 1730 <1> movsw ; saSelector 1731 <1> %endif 1732 <1> %if (behind_r_u_addr + SEGADR_size) != u_addr 1733 <1> %error Expected u_addr behind behind_r_u_addr 1734 <1> ; mov di, u_addr 1735 <1> %endif 1736 <1> ; Reset U offset to (E)IP. 1737 00002AEB BE[DC0C] <1> mov si, reg_eip 1738 00002AEE A5 <1> movsw ; first word of saOffset 1739 <1> _386_PM movsw ; second word of saOffset 1740 <1> 1741 <1> 1742 <1> %if _ACCESS_VARIABLES_AMOUNT 1743 <1> dumpregs_set_access_variables: 1744 00002AEF 31C0 <1> xor ax, ax 1745 00002AF1 BF[D442] <1> mov di, reading_access_variables 1746 00002AF4 B92000 <1> mov cx, words(_ACCESS_VARIABLES_AMOUNT * 8 * 2) 1747 00002AF7 F3AB <1> rep stosw 1748 <1> 1749 00002AF9 8B0E[9049] <1> mov cx, [memrefs.free] 1750 00002AFD E349 <1> jcxz .none 1751 00002AFF 31F6 <1> xor si, si 1752 <1> .loop: 1753 00002B01 89F3 <1> mov bx, si 1754 00002B03 E8972C <1> call get_memref_index_bx 1755 00002B06 8B87[5A49] <1> mov ax, word [memrefs + bx + mrFlags] 1756 00002B0A A801 <1> test al, mrfBranchDirect 1757 00002B0C 7537 <1> jnz .next 1758 00002B0E 31D2 <1> xor dx, dx ; 0 = reading 1759 00002B10 A840 <1> test al, mrfStringSource 1760 00002B12 751C <1> jnz .gotmsg 1761 00002B14 42 <1> inc dx ; 1 = writing 1762 00002B15 A880 <1> test al, mrfStringDest 1763 00002B17 7517 <1> jnz .gotmsg 1764 00002B19 88C2 <1> mov dl, al 1765 00002B1B 80E20C <1> and dl, mrfMemSource | mrfMemDest 1766 00002B1E 80FA0C <1> cmp dl, mrfMemSource | mrfMemDest 1767 00002B21 B202 <1> mov dl, 2 ; 2 = r/w 1768 00002B23 740B <1> je .gotmsg 1769 00002B25 31D2 <1> xor dx, dx ; 0 = reading 1770 00002B27 A804 <1> test al, mrfMemSource 1771 00002B29 7505 <1> jnz .gotmsg 1772 00002B2B 42 <1> inc dx ; 1 = writing 1773 00002B2C A808 <1> test al, mrfMemDest 1774 <1> ; jnz .gotmsg 1775 00002B2E 7415 <1> jz .next 1776 <1> .gotmsg: 1777 <1> 1778 00002B30 84D2 <1> test dl, dl 1779 00002B32 740B <1> jz .read 1780 <1> 1781 <1> .write: 1782 00002B34 BF[F442] <1> mov di, writing_access_variables 1783 00002B37 E80F00 <1> call add_access_variable 1784 00002B3A 80FA01 <1> cmp dl, 1 1785 00002B3D 7406 <1> je .next 1786 <1> 1787 <1> .read: 1788 00002B3F BF[D442] <1> mov di, reading_access_variables 1789 00002B42 E80400 <1> call add_access_variable 1790 <1> 1791 <1> .next: 1792 00002B45 46 <1> inc si 1793 00002B46 E2B9 <1> loop .loop 1794 <1> .none: 1795 <1> %endif 1796 00002B48 C3 <1> retn 1797 <1> 1798 <1> 1799 <1> %if _ACCESS_VARIABLES_AMOUNT 1800 <1> add_access_variable: 1801 00002B49 93 <1> xchg ax, bx 1802 00002B4A 31DB <1> xor bx, bx 1803 <1> .loop: 1804 00002B4C 83790400 <1> cmp word [di + bx + 4], 0 1805 00002B50 7525 <1> jne .next 1806 00002B52 83790600 <1> cmp word [di + bx + 4 + 2], 0 1807 00002B56 751F <1> jne .next 1808 00002B58 93 <1> xchg ax, bx 1809 00002B59 FFB7[5249] <1> push word [memrefs + bx + mrLinear + 2] 1810 00002B5D FFB7[5049] <1> push word [memrefs + bx + mrLinear] 1811 00002B61 FFB7[5E49] <1> push word [memrefs + bx + mrLength + 2] 1812 00002B65 FFB7[5C49] <1> push word [memrefs + bx + mrLength] 1813 00002B69 93 <1> xchg ax, bx 1814 00002B6A 8F4104 <1> pop word [di + bx + 4] 1815 00002B6D 8F4106 <1> pop word [di + bx + 4 + 2] 1816 00002B70 8F01 <1> pop word [di + bx] 1817 00002B72 8F4102 <1> pop word [di + bx + 2] 1818 00002B75 93 <1> xchg ax, bx 1819 00002B76 C3 <1> retn 1820 <1> 1821 <1> .next: 1822 00002B77 83C308 <1> add bx, 8 1823 00002B7A 83FB20 <1> cmp bx, _ACCESS_VARIABLES_AMOUNT * 8 1824 00002B7D 72CD <1> jb .loop 1825 00002B7F 93 <1> xchg ax, bx 1826 00002B80 C3 <1> retn 1827 <1> 1828 <1> 1829 <1> usesection lDEBUG_DATA_ENTRY 1830 <1> align 4, db 0 1831 <1> reading_access_variables: 1832 000042D4 00 <1> times _ACCESS_VARIABLES_AMOUNT * 8 db 0 1833 <1> 1834 <1> writing_access_variables: 1835 000042F4 00 <1> times _ACCESS_VARIABLES_AMOUNT * 8 db 0 1836 <1> 1837 <1> usesection lDEBUG_CODE 1838 <1> %endif 1839 <1> 1840 <1> 1841 <1> %if _RH 1842 <1> enable_rh: 1843 00002B81 F606[B600]10 <1> testopt [options6], opt6_rh_mode 1844 00002B86 7405 <1> jz @F 1845 00002B88 800E[E600]10 <1> setopt [internalflags6], dif6_rh_mode ; NZ 1846 <1> @@: 1847 00002B8D C3 <1> retn 1848 <1> 1849 <1> enable_rh_2: 1850 00002B8E E8F0FF <1> call enable_rh 1851 00002B91 74FA <1> jz @B 1852 00002B93 800E[E600]20 <1> setopt [internalflags6], dif6_rh_mode_2 1853 00002B98 C3 <1> retn 1854 <1> %endif 1855 <1> 1856 <1> 1857 <1> ; Function to display multiple register entries. 1858 <1> ; 1859 <1> ; INP: [options]&dispregs32 = whether to display 32-bit registers, 1860 <1> ; except segment registers which are always 16-bit 1861 <1> ; si-> 2-byte register name in table 1862 <1> ; cx = number of registers to display 1863 <1> ; OUT: si-> register name in table after the last one displayed 1864 <1> ; cx = 0 1865 <1> ; al = 32 1866 <1> ; CHG: bx, ah, dx 1867 <1> dmpr1: 1868 <1> .: 1869 00002B99 8D9C24BF <1> lea bx, [si-(reg16names+DATASECTIONFIXUP)] 1870 00002B9D 01DB <1> add bx, bx ; index * 4 1871 00002B9F 807C0153 <1> cmp byte [si+1], 'S' ; segment register ? 1872 00002BA3 740A <1> je .no_e ; always 16-bit --> (ZR) 1873 00002BA5 F606[A000]01 <1> testopt [options], dispregs32 ; display 32-bit register ? 1874 00002BAA 7403 <1> jz .no_e ; no --> (ZR) 1875 00002BAC B045 <1> mov al, 'E' 1876 00002BAE AA <1> stosb ; store E for Exx register name 1877 <1> .no_e: 1878 00002BAF A5 <1> movsw ; store register name, increase pointer 1879 00002BB0 B03D <1> mov al, '=' 1880 00002BB2 AA <1> stosb ; store equality sign 1881 00002BB3 742E <1> jz .no_high ; (ZF left from before) 1882 <1> 1883 <1> %if _REGSHIGHLIGHT 1884 00002BB5 8026[DA00]FE <1> clropt [internalflags3], dif3_highlighting 1885 00002BBA 8B87[A60C] <1> mov ax, word [regs + bx + 2] 1886 00002BBE 8B97[E60C] <1> mov dx, word [regs_prior + bx + 2] 1887 00002BC2 F606[AA00]04 <1> testopt [options3], opt3_r_highlight_full 1888 00002BC7 7417 <1> jz @F 1889 00002BC9 39C2 <1> cmp dx, ax 1890 00002BCB 7510 <1> jne .highlighthigh 1891 00002BCD 52 <1> push dx 1892 00002BCE 50 <1> push ax 1893 00002BCF 8B87[A40C] <1> mov ax, word [regs + bx] 1894 00002BD3 8B97[E40C] <1> mov dx, word [regs_prior + bx] 1895 00002BD7 39C2 <1> cmp dx, ax 1896 00002BD9 58 <1> pop ax 1897 00002BDA 5A <1> pop dx 1898 00002BDB 7403 <1> je @F 1899 <1> .highlighthigh: 1900 00002BDD E83F00 <1> call highlight 1901 <1> @@: 1902 00002BE0 E86A00 <1> call hexword_diff ; store high word (only if 32-bit register) 1903 <1> .no_high: 1904 00002BE3 8B87[A40C] <1> mov ax, word [regs + bx] 1905 00002BE7 8B97[E40C] <1> mov dx, word [regs_prior + bx] 1906 00002BEB F606[AA00]04 <1> testopt [options3], opt3_r_highlight_full 1907 00002BF0 7407 <1> jz @F 1908 00002BF2 39C2 <1> cmp dx, ax 1909 00002BF4 7403 <1> je @F 1910 00002BF6 E82600 <1> call highlight 1911 <1> @@: 1912 00002BF9 E85100 <1> call hexword_diff ; store low word 1913 <1> 1914 00002BFC E83700 <1> call unhighlight 1915 <1> %else 1916 <1> mov ax, word [regs + bx + 2] 1917 <1> call hexword ; store high word (only if 32-bit register) 1918 <1> .no_high: 1919 <1> mov ax, word [regs + bx] 1920 <1> call hexword ; store low word 1921 <1> %endif 1922 <1> 1923 00002BFF B020 <1> mov al, 32 1924 00002C01 AA <1> stosb ; store space 1925 00002C02 E80300 <1> call stosb_if_rr_compat ; another blank if MS Debug compat 1926 00002C05 E292 <1> loop . 1927 00002C07 C3 <1> retn 1928 <1> ; Note: This code doesn't use 386+ registers to display our internal 1929 <1> ; variables for these. Currently, setting the RX bit of options 1930 <1> ; will display the 32-bit variables even on non-386 machines. 1931 <1> ; Changing this code to require EAX would require changes to our 1932 <1> ; check too. 1933 <1> ; 32-bit code probably wouldn't be much shorter than the current 1934 <1> ; implementation as well. 1935 <1> 1936 <1> 1937 <1> ; INP: al = what to store (32) 1938 <1> ; option flags for R compat, RX, and 40-column mode 1939 <1> ; es:di -> where to store 1940 <1> ; OUT: stored if the flags are right 1941 <1> ; di updated if stored 1942 <1> ; CHG: - 1943 <1> ; STT: ds = ss 1944 <1> ; UP 1945 <1> stosb_if_rr_compat: 1946 00002C08 F606[A600]08 <1> testopt [options2], opt2_rr16_compat 1947 00002C0D 740F <1> jz .ret 1948 00002C0F F606[A000]01 <1> testopt [options], dispregs32 1949 00002C14 7508 <1> jnz .ret 1950 <1> %if _40COLUMNS 1951 00002C16 F606[B500]10 <1> testopt [options6], opt6_40_columns 1952 00002C1B 7501 <1> jnz .ret 1953 <1> %endif 1954 00002C1D AA <1> stosb 1955 <1> .ret: 1956 00002C1E C3 <1> retn 1957 <1> 1958 <1> 1959 <1> %if _REGSHIGHLIGHT 1960 <1> highlight: 1961 00002C1F F606[DA00]01 <1> testopt [internalflags3], dif3_highlighting 1962 00002C24 750F <1> jnz @F 1963 00002C26 800E[DA00]01 <1> setopt [internalflags3], dif3_highlighting 1964 00002C2B 56 <1> push si 1965 00002C2C 51 <1> push cx 1966 00002C2D BE[6C24] <1> mov si, msg.highlight 1967 00002C30 E86B0C <1> call copy_single_counted_string 1968 00002C33 59 <1> pop cx 1969 00002C34 5E <1> pop si 1970 <1> @@: 1971 00002C35 C3 <1> retn 1972 <1> 1973 <1> unhighlight: 1974 00002C36 F606[DA00]01 <1> testopt [internalflags3], dif3_highlighting 1975 00002C3B 740F <1> jz @F 1976 00002C3D 8026[DA00]FE <1> clropt [internalflags3], dif3_highlighting 1977 00002C42 56 <1> push si 1978 00002C43 51 <1> push cx 1979 00002C44 BE[7224] <1> mov si, msg.unhighlight 1980 00002C47 E8540C <1> call copy_single_counted_string 1981 00002C4A 59 <1> pop cx 1982 00002C4B 5E <1> pop si 1983 <1> @@: 1984 00002C4C C3 <1> retn 1985 <1> 1986 <1> hexword_diff: 1987 00002C4D F606[AA00]01 <1> testopt [options3], opt3_r_highlight_diff 1988 00002C52 7407 <1> jz @F 1989 00002C54 F606[AA00]04 <1> testopt [options3], opt3_r_highlight_full 1990 00002C59 7403 <1> jz @FF 1991 <1> @@: 1992 00002C5B E92C6E <1> jmp hexword 1993 <1> 1994 <1> @@: 1995 <1> .hexword: 1996 00002C5E 86C4 <1> xchg al, ah 1997 00002C60 86D6 <1> xchg dl, dh 1998 00002C62 E80400 <1> call .hexbyte 1999 00002C65 86C4 <1> xchg al, ah 2000 00002C67 86D6 <1> xchg dl, dh 2001 <1> 2002 <1> .hexbyte: 2003 00002C69 51 <1> push cx 2004 00002C6A B104 <1> mov cl, 4 2005 00002C6C D2C0 <1> rol al, cl 2006 00002C6E D2C2 <1> rol dl, cl 2007 00002C70 E80500 <1> call .hexnyb 2008 00002C73 D2C0 <1> rol al, cl 2009 00002C75 D2C2 <1> rol dl, cl 2010 00002C77 59 <1> pop cx 2011 <1> 2012 <1> .hexnyb: 2013 00002C78 50 <1> push ax 2014 00002C79 88D4 <1> mov ah, dl 2015 00002C7B 250F0F <1> and ax, 0F0Fh 2016 00002C7E 38E0 <1> cmp al, ah 2017 00002C80 7405 <1> je .unhighlight 2018 <1> .highlight: 2019 00002C82 E89AFF <1> call highlight 2020 00002C85 EB03 <1> jmp .common 2021 <1> 2022 <1> .unhighlight: 2023 00002C87 E8ACFF <1> call unhighlight 2024 <1> .common: 2025 <1> ; INP: original ax on stack, then return near address 2026 <1> ; al = nybble value to display, 0..15 2027 <1> ; es:di -> where to store 2028 <1> ; OUT: es:di incremented 2029 <1> ; ax restored 2030 <1> ; return to near address that was on stack 2031 00002C8A E9126E <1> jmp hexnyb.common 2032 <1> %endif 2033 <1> 2034 <1> 2035 <1> %if _RN 2036 <1> ; The layout for FSAVE/FRSTOR depends on mode and 16-/32-bit. 2037 <1> 2038 <1> %if 0 2039 <1> struc FPENV16 2040 <1> .cw: resw 1 ; 00h 2041 <1> .sw: resw 1 ; 02h 2042 <1> .tw: resw 1 ; 04h 2043 <1> .fip: resw 1 ; 06h IP offset 2044 <1> .opc: ; 08h RM: opcode (0-10), IP 16-19 in high bits 2045 <1> .fcs: resw 1 ; 08h PM: IP selector 2046 <1> .fop: resw 1 ; 0Ah operand pointer offset 2047 <1> .foph: ; 0Ch RM: operand pointer 16-19 in high bits 2048 <1> .fos: resw 1 ; 0Ch PM: operand pointer selector 2049 <1> endstruc; 0Eh 2050 <1> 2051 <1> struc FPENV32 2052 <1> .cw: resd 1 ; 00h 2053 <1> .sw: resd 1 ; 04h 2054 <1> .tw: resd 1 ; 08h 2055 <1> .fip: resd 1 ; 0Ch ip offset (RM: bits 0-15 only) 2056 <1> .fopcr: ; 10h (dword) RM: opcode (0-10), ip (12-27) 2057 <1> .fcs: resw 1 ; 10h PM: ip selector 2058 <1> .fopcp: resw 1 ; 12h PM: opcode (bits 0-10) 2059 <1> .foo: resd 1 ; 14h operand pointer offset (RM: bits 0-15 only) 2060 <1> .fooh: ; 18h (dword) RM: operand pointer (12-27) 2061 <1> .fos: resw 1 ; 18h PM: operand pointer selector 2062 <1> resw 1 ; 1Ah PM: not used 2063 <1> endstruc; 1Ch 2064 <1> %endif 2065 <1> 2066 <1> 2067 <1> usesection lDEBUG_DATA_ENTRY 2068 <1> 2069 <1> ; dumpregsFPU - Dump Floating Point Registers 2070 <1> fregnames: 2071 00004314 435753575457 <1> db "CW", "SW", "TW" 2072 0000431A 4F50433D49503D4450- <1> db "OPC=", "IP=", "DP=" 2072 00004323 3D <1> 2073 00004324 656D707479 <1> msg.empty: db "empty" 2074 <1> endarea msg.empty 2075 00004329 4E614E <1> msg.nan: db "NaN" 2076 <1> endarea msg.nan 2077 <1> 2078 <1> 2079 <1> usesection lDEBUG_CODE 2080 <1> 2081 <1> dumpregsFPU: 2082 00002C8D E829DA <1> call guard_auxbuff 2083 00002C90 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] 2084 <1> ; => auxbuff 2085 00002C94 31FF <1> xor di, di ; -> auxbuff 2086 00002C96 B98000 <1> mov cx, 128 2087 00002C99 31C0 <1> xor ax, ax 2088 00002C9B F3AB <1> rep stosw ; initialise auxbuff 2089 <1> %if _AUXBUFFSIZE < (128 * 2) 2090 <1> %error auxbuff not large enough for dumpregsFPU 2091 <1> %endif 2092 00002C9D BF[B40A] <1> mov di, line_out 2093 00002CA0 BE[1443] <1> mov si, fregnames 2094 00002CA3 31DB <1> xor bx, bx ; es:bx -> auxbuff 2095 00002CA5 66 <1> _386_o32 2096 00002CA6 26DD37 <1> fnsave [es:bx] 2097 <1> 2098 <1> ; display CW, SW and TW 2099 00002CA9 16 <1> push ss 2100 00002CAA 07 <1> pop es ; es:di -> line_out 2101 00002CAB B90300 <1> mov cx, 3 2102 <1> .nextfpr: 2103 00002CAE A5 <1> movsw 2104 00002CAF B03D <1> mov al, '=' 2105 00002CB1 AA <1> stosb 2106 00002CB2 87F3 <1> xchg si, bx 2107 00002CB4 8E1E[4A0A] <1> mov ds, word [auxbuff_segorsel] 2108 <1> ; ds:si -> auxbuff entry 2109 00002CB8 66 <1> _386_o32 ; lodsd 2110 00002CB9 AD <1> lodsw 2111 00002CBA 16 <1> push ss 2112 00002CBB 1F <1> pop ds ; ds:si -> fregnames entry 2113 00002CBC 87F3 <1> xchg si, bx 2114 00002CBE 50 <1> push ax 2115 00002CBF E8C86D <1> call hexword 2116 00002CC2 B020 <1> mov al, 32 2117 00002CC4 AA <1> stosb 2118 00002CC5 E2E7 <1> loop .nextfpr 2119 <1> 2120 <1> ; display OPC 2121 <1> ; in 16-bit PM, there's no OPC 2122 <1> ; in 32-bit PM, there's one, but the location differs from RM 2123 00002CC7 53 <1> push bx 2124 <1> %if _PM 2125 <1> call ispm 2126 <1> jz .notpm_opc 2127 <1> add bx, byte 2 ; location of OPC in PM differs from RM 2128 <1> _no386 add si, byte 4 ; no OPC in 16-bit PM 2129 <1> _no386 jmp short .no_opc 2130 <1> .notpm_opc: 2131 <1> %endif 2132 00002CC8 A5 <1> movsw 2133 00002CC9 A5 <1> movsw 2134 00002CCA 87F3 <1> xchg si, bx 2135 00002CCC 8E1E[4A0A] <1> mov ds, word [auxbuff_segorsel] 2136 <1> ; ds:si -> auxbuff entry 2137 00002CD0 66 <1> _386_o32 ; lodsd 2138 00002CD1 AD <1> lodsw ; skip word/dword 2139 00002CD2 AD <1> lodsw 2140 00002CD3 16 <1> push ss 2141 00002CD4 1F <1> pop ds ; ds:si -> fregnames entry 2142 00002CD5 87F3 <1> xchg si, bx 2143 00002CD7 25FF07 <1> and ax, 07FFh ; bits 0-10 only 2144 00002CDA E8AD6D <1> call hexword 2145 00002CDD B020 <1> mov al, 32 2146 00002CDF AA <1> stosb 2147 <1> .no_opc: 2148 00002CE0 5B <1> pop bx 2149 <1> 2150 <1> ; display IP and DP 2151 00002CE1 B102 <1> mov cl, 2 2152 <1> .nextfp: 2153 00002CE3 51 <1> push cx 2154 00002CE4 16 <1> push ss 2155 00002CE5 1F <1> pop ds ; ds:si -> fregnames entry 2156 00002CE6 A5 <1> movsw 2157 00002CE7 A4 <1> movsb 2158 00002CE8 87F3 <1> xchg si, bx 2159 00002CEA 8E1E[4A0A] <1> mov ds, word [auxbuff_segorsel] 2160 <1> ; ds:si -> auxbuff entry 2161 00002CEE 66 <1> _386_o32 ; lodsd 2162 00002CEF AD <1> lodsw 2163 00002CF0 66 <1> _386_o32 ; mov edx, eax 2164 00002CF1 89C2 <1> mov dx, ax 2165 00002CF3 66 <1> _386_o32 ; lodsd 2166 00002CF4 AD <1> lodsw 2167 00002CF5 87F3 <1> xchg si, bx 2168 00002CF7 16 <1> push ss 2169 00002CF8 1F <1> pop ds ; ds:si -> fregnames entry 2170 <1> %if _PM 2171 <1> call ispm 2172 <1> jz .notpm_ipdp 2173 <1> call hexword 2174 <1> mov al, ':' 2175 <1> stosb 2176 <1> jmp short .fppm 2177 <1> .notpm_ipdp: 2178 <1> %endif 2179 00002CF9 B10C <1> mov cl, 12 2180 00002CFB 66 <1> _386_o32 ; shr eax, cl 2181 00002CFC D3E8 <1> shr ax, cl 2182 00002CFE E8896D <1> _386 call hexword 2183 00002D01 EB03 <1> _386 jmp short .fppm 2184 00002D03 E8966D <1> call hexnyb 2185 <1> .fppm: 2186 <1> _386_PM_o32 ; mov eax, edx 2187 00002D06 89D0 <1> mov ax, dx 2188 <1> _386_PM call ispm 2189 <1> _386_PM jz .notpm_fppm 2190 <1> _386_PM call hexword_high 2191 <1> .notpm_fppm: 2192 00002D08 E87F6D <1> call hexword 2193 00002D0B B020 <1> mov al, 32 2194 00002D0D AA <1> stosb 2195 00002D0E 59 <1> pop cx 2196 00002D0F E2D2 <1> loop .nextfp 2197 <1> 2198 00002D11 87F3 <1> xchg si, bx 2199 00002D13 16 <1> push ss 2200 00002D14 1F <1> pop ds ; ds = es = ss 2201 00002D15 E8A36D <1> call trimputs 2202 <1> 2203 <1> ; display ST0..7 2204 00002D18 5D <1> pop bp ; TW 2205 00002D19 58 <1> pop ax ; SW 2206 00002D1A 5A <1> pop dx ; CW (discarded here) 2207 <1> 2208 00002D1B B10A <1> mov cl, 10 2209 00002D1D D3E8 <1> shr ax, cl ; move TOP to bits 1..3 2210 00002D1F 240E <1> and al, 1110b ; separate TOP 2211 00002D21 88C1 <1> mov cl, al 2212 00002D23 D3CD <1> ror bp, cl ; adjust TW 2213 <1> 2214 00002D25 B130 <1> mov cl, '0' 2215 <1> .nextst: 2216 00002D27 BF[B40A] <1> mov di, line_out 2217 00002D2A 51 <1> push cx 2218 00002D2B B85354 <1> mov ax, "ST" 2219 00002D2E AB <1> stosw 2220 00002D2F 88C8 <1> mov al, cl 2221 00002D31 B43D <1> mov ah, '=' 2222 00002D33 AB <1> stosw 2223 00002D34 57 <1> push di 2224 00002D35 A801 <1> test al, 1 2225 00002D37 B020 <1> mov al, 32 2226 00002D39 B91600 <1> mov cx, 22 2227 00002D3C F3AA <1> rep stosb 2228 00002D3E 7404 <1> jz .oddst 2229 00002D40 B80D0A <1> mov ax, 10<<8|13 2230 00002D43 AB <1> stosw 2231 <1> .oddst: 2232 00002D44 B000 <1> mov al, 0 2233 00002D46 AA <1> stosb ; make it an ASCIZ string 2234 00002D47 5F <1> pop di 2235 <1> 2236 00002D48 89E8 <1> mov ax, bp 2237 00002D4A D1CD <1> ror bp, 1 2238 00002D4C D1CD <1> ror bp, 1 2239 00002D4E 2403 <1> and al, 3 ; 00b = valid, 01b = zero, 10b = NaN, 11b = empty 2240 00002D50 741F <1> jz .isvalid 2241 00002D52 56 <1> push si 2242 00002D53 16 <1> push ss 2243 00002D54 1F <1> pop ds ; ds = es = ss 2244 00002D55 BE[2443] <1> mov si, msg.empty 2245 00002D58 B105 <1> mov cl, msg.empty_size 2246 00002D5A 3C03 <1> cmp al, 3 2247 00002D5C 740E <1> je .gotst 2248 00002D5E BE[2943] <1> mov si, msg.nan 2249 00002D61 B103 <1> mov cl, msg.nan_size 2250 00002D63 3C02 <1> cmp al, 2 2251 00002D65 7405 <1> je .gotst 2252 00002D67 B030 <1> mov al, '0' 2253 00002D69 AA <1> stosb 2254 00002D6A 31C9 <1> xor cx, cx 2255 <1> .gotst: 2256 00002D6C F3A4 <1> rep movsb 2257 00002D6E 5E <1> pop si 2258 00002D6F EB34 <1> jmp short .regoutdone 2259 <1> 2260 <1> .isvalid: 2261 00002D71 8E1E[4A0A] <1> mov ds, word [auxbuff_segorsel] 2262 <1> ; ds:si -> auxbuff entry 2263 00002D75 36F606[A000]40 <1> testopt [ss:options], hexrn 2264 00002D7B 7508 <1> jnz .hex 2265 00002D7D 57 <1> push di ; -> buffer (first parameter; in es = ss) 2266 00002D7E 1E <1> push ds 2267 00002D7F 56 <1> push si ; -> auxbuff entry (second parameter) 2268 00002D80 E8EF04 <1> dualcall FloatToStr 2269 00002D83 EB20 <1> jmp short .regoutdone 2270 <1> 2271 <1> .hex: 2272 00002D85 8B4408 <1> mov ax, word [si+8] 2273 00002D88 E8FF6C <1> call hexword 2274 00002D8B B02E <1> mov al, '.' 2275 00002D8D AA <1> stosb 2276 00002D8E 8B4406 <1> mov ax, word [si+6] 2277 00002D91 E8F66C <1> call hexword 2278 00002D94 8B4404 <1> mov ax, word [si+4] 2279 00002D97 E8F06C <1> call hexword 2280 00002D9A 8B4402 <1> mov ax, word [si+2] 2281 00002D9D E8EA6C <1> call hexword 2282 00002DA0 8B04 <1> mov ax, word [si+0] 2283 00002DA2 E8E56C <1> call hexword 2284 <1> 2285 <1> .regoutdone: 2286 00002DA5 BA[B40A] <1> mov dx, line_out 2287 00002DA8 16 <1> push ss 2288 00002DA9 1F <1> pop ds ; ds = es = ss 2289 00002DAA E80672 <1> call putsz 2290 00002DAD 59 <1> pop cx 2291 <1> 2292 00002DAE 83C60A <1> add si, byte 10 ; -> next ST 2293 00002DB1 FEC1 <1> inc cl 2294 00002DB3 80F938 <1> cmp cl, '8' 2295 00002DB6 7403E96CFF <1> jne .nextst 2296 00002DBB 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] 2297 <1> ; es => auxbuff 2298 00002DBF 66 <1> _386_o32 2299 00002DC0 26DD260000 <1> frstor [es:0] 2300 00002DC5 C3 <1> retn 2301 <1> %endif 2302 <1> 2303 <1> 2304 <1> ; DMPFLAGS - Dump flags output. 2305 <1> dmpflags: 2306 <1> %if _40COLUMNS 2307 <1> .80: 2308 00002DC6 55 <1> push bp 2309 00002DC7 BD00FF <1> mov bp, flagbits_for_80 << flagbits_for_shl 2310 00002DCA EB04 <1> jmp @F 2311 <1> .40: 2312 00002DCC 55 <1> push bp 2313 00002DCD BD0099 <1> mov bp, flagbits_for_40 << flagbits_for_shl 2314 <1> @@: 2315 <1> %endif 2316 <1> %if _REGSHIGHLIGHT || _REGSREADABLEFLAGS 2317 00002DD0 52 <1> push dx 2318 00002DD1 53 <1> push bx 2319 <1> %endif 2320 00002DD2 BE[0C3F] <1> mov si, flagbits 2321 00002DD5 B90800 <1> mov cx, flagbits.amount 2322 00002DD8 AD <1> .loop: lodsw 2323 <1> %if _40COLUMNS 2324 00002DD9 D1E5 <1> shl bp, 1 2325 00002DDB 734D <1> jnc .next 2326 <1> %endif 2327 <1> %if _REGSHIGHLIGHT 2328 00002DDD 8B16[200D] <1> mov dx, word [reg_efl - regs + regs_prior] 2329 00002DE1 21C2 <1> and dx, ax 2330 00002DE3 8B1E[E00C] <1> mov bx, word [reg_efl] 2331 00002DE7 21C3 <1> and bx, ax 2332 00002DE9 39DA <1> cmp dx, bx 2333 00002DEB 7411 <1> je @F 2334 00002DED F606[AA00]05 <1> testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full 2335 00002DF2 740A <1> jz @F 2336 00002DF4 F606[DA00]02 <1> testopt [internalflags3], dif3_do_not_highlight 2337 00002DF9 7503 <1> jnz @F 2338 00002DFB E821FE <1> call highlight 2339 <1> @@: 2340 00002DFE 85DB <1> test bx, bx 2341 <1> %else 2342 <1> test ax, word [reg_efl] 2343 <1> %endif 2344 00002E00 8B441E <1> mov ax, word [si+(flagsoff-flagbits)-2] 2345 <1> %if _REGSREADABLEFLAGS 2346 00002E03 8B5C4E <1> mov bx, word [si+(flagsoff_style2-flagbits)-2] 2347 00002E06 8B545E <1> mov dx, word [si+(flagsoff_style3-flagbits)-2] 2348 <1> %endif 2349 00002E09 7408 <1> jz .off ; if not set 2350 00002E0B 8B440E <1> mov ax, word [si+(flagson-flagbits)-2] 2351 <1> %if _REGSREADABLEFLAGS 2352 00002E0E 8B5C3E <1> mov bx, word [si+(flagson_style23-flagbits)-2] 2353 00002E11 89DA <1> mov dx, bx 2354 <1> %endif 2355 <1> .off: 2356 <1> %if _REGSREADABLEFLAGS 2357 00002E13 F606[B700]20 <1> testopt [options6], opt6_r_flags_style2 2358 00002E18 7401 <1> jz @F 2359 00002E1A 93 <1> xchg ax, bx 2360 <1> @@: 2361 00002E1B F606[B700]40 <1> testopt [options6], opt6_r_flags_style3 2362 00002E20 7401 <1> jz @F 2363 00002E22 92 <1> xchg ax, dx 2364 <1> @@: 2365 <1> %endif 2366 00002E23 AB <1> stosw 2367 <1> %if _REGSHIGHLIGHT 2368 00002E24 E80FFE <1> call unhighlight 2369 <1> %endif 2370 00002E27 B020 <1> mov al, 32 2371 00002E29 AA <1> stosb 2372 <1> .next: 2373 00002E2A E2AC <1> loop .loop 2374 00002E2C 4F <1> dec di ; -> last (unnecessary) blank 2375 <1> %if _REGSHIGHLIGHT || _REGSREADABLEFLAGS 2376 00002E2D 5B <1> pop bx 2377 00002E2E 5A <1> pop dx 2378 <1> %endif 2379 <1> %if _40COLUMNS 2380 00002E2F 5D <1> pop bp 2381 <1> %endif 2382 00002E30 C3 <1> retn 2383 <1> 2384 <1> 2385 <1> %if _40COLUMNS 2386 <1> dmpshortflags: 2387 <1> %if _REGSHIGHLIGHT 2388 00002E31 52 <1> push dx 2389 00002E32 53 <1> push bx 2390 <1> %endif 2391 00002E33 BE[7C3F] <1> mov si, shortflagbits 2392 00002E36 B90200 <1> mov cx, shortflagbits.amount 2393 00002E39 AD <1> .loop: lodsw 2394 <1> %if _REGSHIGHLIGHT 2395 00002E3A 8B16[200D] <1> mov dx, word [reg_efl - regs + regs_prior] 2396 00002E3E 21C2 <1> and dx, ax 2397 00002E40 8B1E[E00C] <1> mov bx, word [reg_efl] 2398 00002E44 21C3 <1> and bx, ax 2399 00002E46 39DA <1> cmp dx, bx 2400 00002E48 7411 <1> je @F 2401 00002E4A F606[AA00]05 <1> testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full 2402 00002E4F 740A <1> jz @F 2403 00002E51 F606[DA00]02 <1> testopt [internalflags3], dif3_do_not_highlight 2404 00002E56 7503 <1> jnz @F 2405 00002E58 E8C4FD <1> call highlight 2406 <1> @@: 2407 00002E5B 85DB <1> test bx, bx 2408 <1> %else 2409 <1> test ax, word [reg_efl] 2410 <1> %endif 2411 00002E5D 8B4406 <1> mov ax, word [si+(shortflagsoff-shortflagbits)-2] 2412 00002E60 7403 <1> jz .off ; if not set 2413 00002E62 8B4402 <1> mov ax, word [si+(shortflagson-shortflagbits)-2] 2414 00002E65 AA <1> .off: stosb 2415 <1> %if _REGSHIGHLIGHT 2416 00002E66 E8CDFD <1> call unhighlight 2417 <1> %endif 2418 00002E69 B020 <1> mov al, 32 2419 00002E6B AA <1> stosb 2420 <1> .next: 2421 00002E6C E2CB <1> loop .loop 2422 <1> %if _REGSHIGHLIGHT 2423 00002E6E 5B <1> pop bx 2424 00002E6F 5A <1> pop dx 2425 <1> %endif 2426 00002E70 C3 <1> retn 2427 <1> %endif 2428 <1> 2429 <1> 2430 <1> %if _OPTIONS || _VARIABLES 2431 <1> dumpvars: 2432 <1> %if _VARIABLES 2433 00002E71 BE[640D] <1> mov si, vregs 2434 <1> %endif 2435 00002E74 31DB <1> xor bx, bx 2436 <1> .loop: 2437 00002E76 BF[B40A] <1> mov di, line_out 2438 00002E79 31D2 <1> xor dx, dx 2439 <1> %if _VARIABLES 2440 00002E7B B90400 <1> mov cx, 4 2441 00002E7E E88D00 <1> call .dump ; display four variables 2442 00002E81 43 <1> inc bx ; (would be one off here) 2443 00002E82 56 <1> push si 2444 <1> %else 2445 <1> add bx, byte 4 ; (no motivation to optimize that) 2446 <1> %endif 2447 <1> %if _OPTIONS 2448 <1> %if _VARIABLES 2449 00002E83 B020 <1> mov al, 32 2450 00002E85 AA <1> stosb ; more blanks inbetween 2451 <1> %endif 2452 00002E86 80FB10 <1> cmp bl, 16 2453 00002E89 7439 <1> je .3 2454 00002E8B 80FB08 <1> cmp bl, 8 2455 00002E8E 7721 <1> ja .2 2456 00002E90 7411 <1> je .1 2457 <1> 2458 <1> ; First line, display DCO and DCS 2459 <1> .0: 2460 00002E92 B8434F <1> mov ax, "CO" 2461 00002E95 BE[A000] <1> mov si, options 2462 00002E98 E86200 <1> call .dump_option 2463 00002E9B B84353 <1> mov ax, "CS" 2464 00002E9E BE[B800] <1> mov si, startoptions 2465 00002EA1 EB36 <1> jmp short .next 2466 <1> 2467 <1> ; Second line, DAO and DAS 2468 <1> .1: 2469 00002EA3 B8414F <1> mov ax, "AO" 2470 00002EA6 BE[E800] <1> mov si, asm_options 2471 00002EA9 E85100 <1> call .dump_option 2472 00002EAC B84153 <1> mov ax, "AS" 2473 <1> ; asm_startoptions follows directly behind asm_options 2474 00002EAF EB28 <1> jmp short .next 2475 <1> 2476 <1> ; Third line, DIF and DPI 2477 <1> .2: 2478 00002EB1 B84946 <1> mov ax, "IF" 2479 00002EB4 BE[D000] <1> mov si, internalflags 2480 00002EB7 E84300 <1> call .dump_option 2481 00002EBA B85049 <1> mov ax, "PI" 2482 00002EBD BE[1C0B] <1> mov si, psp22 2483 00002EC0 42 <1> inc dx 2484 00002EC1 42 <1> inc dx 2485 00002EC2 EB15 <1> jmp short .next 2486 <1> 2487 <1> ; Fourth line, DPR, DPS (if _PM) and DPP 2488 <1> .3: 2489 00002EC4 42 <1> inc dx 2490 00002EC5 B85052 <1> mov ax, "PR" 2491 00002EC8 BE[020B] <1> mov si, pspdbg 2492 00002ECB E82F00 <1> call .dump_option 2493 <1> %if _PM 2494 <1> xor ax, ax 2495 <1> call ispm 2496 <1> jnz .3_rm 2497 <1> push ds 2498 <1> db __TEST_IMM8 ; (skip push) 2499 <1> .3_rm: 2500 <1> push ax 2501 <1> mov ax, "PS" 2502 <1> mov si, sp 2503 <1> call .dump_options 2504 <1> pop ax 2505 <1> %else 2506 00002ECE B82020 <1> mov ax, 32<<8|32 2507 00002ED1 AB <1> stosw 2508 00002ED2 AB <1> stosw 2509 <1> %endif 2510 00002ED3 B85050 <1> mov ax, "PP" 2511 00002ED6 BE[200B] <1> mov si, parent 2512 <1> 2513 <1> .next: 2514 00002ED9 E82100 <1> call .dump_options 2515 <1> %endif 2516 00002EDC 53 <1> push bx 2517 00002EDD E8E36B <1> call putsline_crlf ; display line 2518 00002EE0 5B <1> pop bx ; (retain counter) 2519 <1> %if _VARIABLES 2520 00002EE1 5E <1> pop si ; (retain pointer to next variable) 2521 <1> %endif 2522 00002EE2 80FB10 <1> cmp bl, 16 ; was end ? 2523 00002EE5 758F <1> jne .loop ; no, loop --> 2524 <1> 2525 <1> ; done 2526 <1> .mode: 2527 00002EE7 BA[1F13] <1> mov dx, msg.rv_mode.before 2528 00002EEA E8C670 <1> call putsz 2529 <1> %if _PM 2530 <1> call ispm 2531 <1> jnz .mode_86m 2532 <1> mov dx, msg.rv_mode_dpmi_16 2533 <1> mov bx, word [reg_cs] 2534 <1> call test_d_b_bit 2535 <1> jz @F 2536 <1> mov dx, msg.rv_mode_dpmi_32 2537 <1> jmp @F 2538 <1> 2539 <1> .mode_86m: 2540 <1> %endif 2541 00002EED BA[2E13] <1> mov dx, msg.rv_mode_r86m 2542 <1> ; (only 386+ has the V86M so even though smsw ax is a 2543 <1> ; 286 level instruction, so could be used without a 386, 2544 <1> ; we only really need it on a 386+.) 2545 00002EF0 0F01E0 <1> _386 smsw ax 2546 00002EF3 A801 <1> _386 test al, 1 2547 00002EF5 7403 <1> _386 jz @F 2548 00002EF7 BA[3D13] <1> _386 mov dx, msg.rv_mode_v86m 2549 <1> @@: 2550 00002EFA E9B670 <1> jmp putsz 2551 <1> 2552 <1> 2553 <1> ; INP: ax = 2-byte option name ('N' will precede this) 2554 <1> ; d[si] = value 2555 <1> ; OUT: si-> behind value 2556 <1> ; cx = 0 2557 <1> ; CHG: ax 2558 <1> .dump_options: 2559 <1> %if _VARIABLES 2560 <1> .dump_option: 2561 00002EFD C7052044 <1> mov word [di], " D" 2562 00002F01 AF <1> scasw 2563 <1> %else 2564 <1> mov byte [di], ' ' 2565 <1> inc di 2566 <1> .dump_option: 2567 <1> mov byte [di], 'D' 2568 <1> inc di 2569 <1> %endif 2570 00002F02 AB <1> stosw 2571 <1> %if _VARIABLES ; falls through otherwise, always count 1 2572 00002F03 B90100 <1> mov cx, 1 2573 <1> %if _RSEPARATE 2574 00002F06 B600 <1> mov dh, 0 2575 <1> %endif 2576 00002F08 EB0E <1> jmp short .dump_one 2577 <1> %endif 2578 <1> 2579 <1> %if 0 2580 <1> PM && OPTIONS && VARIABLES 2581 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 2582 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 2583 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 2584 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPS=0000 DPP=0616 2585 <1> 2586 <1> !PM && OPTIONS && VARIABLES 2587 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 2588 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 2589 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 2590 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPP=0616 2591 <1> 2592 <1> !OPTIONS && VARIABLES 2593 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 2594 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 2595 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 2596 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 2597 <1> 2598 <1> !PM && OPTIONS && !VARIABLES 2599 <1> DCO=00000000 DCS=00000000 2600 <1> DAO=00000000 DAS=00000000 2601 <1> DIF=0000840D DPI=0616:01DE 2602 <1> DPR=0984 DPP=0616 2603 <1> 2604 <1> PM && OPTIONS && !VARIABLES 2605 <1> DCO=00000000 DCS=00000000 2606 <1> DAO=00000000 DAS=00000000 2607 <1> DIF=0000840D DPI=0616:01DE 2608 <1> DPR=0984 DPS=0000 DPP=0616 2609 <1> 2610 <1> !OPTIONS && !VARIABLES 2611 <1> %endif 2612 <1> %if 0 2613 <1> DCO Debugger Common Options 2614 <1> DCS Debugger Common Startup options 2615 <1> DIF Debugger Internal Flags 2616 <1> DPR Debugger Process (Real-mode segment) 2617 <1> DPS Debugger Process Selector, or zero 2618 <1> DPP Debugger Parent Process 2619 <1> DPI Debugger Parent Interrupt 22h 2620 <1> DAO Debugger Assembler/disassembler Options 2621 <1> DAS Debugger Assembler/disassembler Startup options 2622 <1> %endif 2623 <1> 2624 <1> %if _VARIABLES 2625 <1> .dump_loop: 2626 00002F0A 43 <1> inc bx 2627 00002F0B B020 <1> mov al, 32 2628 00002F0D AA <1> stosb 2629 <1> .dump: 2630 00002F0E B056 <1> mov al, 'V' 2631 00002F10 AA <1> stosb 2632 00002F11 88D8 <1> mov al, bl 2633 00002F13 E8866B <1> call hexnyb 2634 <1> %if _RSEPARATE 2635 00002F16 B6FF <1> mov dh, -1 2636 <1> %endif 2637 <1> %endif 2638 <1> .dump_one: 2639 00002F18 B03D <1> mov al, '=' 2640 00002F1A AA <1> stosb 2641 00002F1B AD <1> lodsw 2642 00002F1C 80FA01 <1> cmp dl, 1 2643 00002F1F 7416 <1> je .dumpw 2644 00002F21 50 <1> push ax 2645 00002F22 AD <1> lodsw 2646 00002F23 9C <1> pushf 2647 00002F24 E8636B <1> call hexword 2648 00002F27 9D <1> popf ; CF 2649 00002F28 7205 <1> jb .nocolon 2650 00002F2A B03A <1> mov al, ':' 2651 00002F2C AA <1> stosb 2652 <1> %if _RSEPARATE 2653 00002F2D EB07 <1> jmp @F 2654 <1> .nocolon: 2655 00002F2F 84F6 <1> test dh, dh 2656 00002F31 7903 <1> jns @F 2657 00002F33 E826F4 <1> call rseparate 2658 <1> @@: 2659 <1> %else 2660 <1> .nocolon: 2661 <1> %endif 2662 00002F36 58 <1> pop ax 2663 <1> .dumpw: 2664 00002F37 E8506B <1> call hexword 2665 <1> %if _VARIABLES 2666 00002F3A E2CE <1> loop .dump_loop 2667 <1> %endif 2668 00002F3C C3 <1> retn 2669 <1> %endif 2670 <1> 2671 <1> 2672 <1> dumpallvars: 2673 00002F3D AC <1> lodsb 2674 00002F3E E85E6A <1> call chkeol 2675 00002F41 BE[640D] <1> mov si, vregs 2676 00002F44 31DB <1> xor bx, bx 2677 <1> .loop: 2678 00002F46 BF[B40A] <1> mov di, line_out 2679 00002F49 B90400 <1> mov cx, 4 2680 00002F4C 31D2 <1> xor dx, dx 2681 00002F4E E81500 <1> call .dump ; display four variables 2682 00002F51 43 <1> inc bx ; (would be one off here) 2683 00002F52 85D2 <1> test dx, dx 2684 00002F54 7407 <1> jz @F 2685 00002F56 56 <1> push si 2686 00002F57 53 <1> push bx 2687 00002F58 E8686B <1> call putsline_crlf ; display line 2688 00002F5B 5B <1> pop bx ; (retain counter) 2689 00002F5C 5E <1> pop si ; (retain pointer to next variable) 2690 <1> @@: 2691 00002F5D 84DB <1> test bl, bl ; was end ? 2692 00002F5F 75E5 <1> jnz .loop ; no, loop --> 2693 00002F61 C3 <1> retn 2694 <1> 2695 <1> .dump_loop: 2696 00002F62 43 <1> inc bx 2697 00002F63 B020 <1> mov al, 32 2698 00002F65 AA <1> stosb 2699 <1> .dump: 2700 00002F66 B056 <1> mov al, 'V' 2701 00002F68 AA <1> stosb 2702 00002F69 88D8 <1> mov al, bl 2703 00002F6B E8236B <1> call hexbyte 2704 <1> .dump_one: 2705 00002F6E B03D <1> mov al, '=' 2706 00002F70 AA <1> stosb 2707 00002F71 AD <1> lodsw 2708 00002F72 09C2 <1> or dx, ax 2709 00002F74 50 <1> push ax 2710 00002F75 AD <1> lodsw 2711 00002F76 09C2 <1> or dx, ax 2712 00002F78 E80F6B <1> call hexword 2713 <1> %if _RSEPARATE 2714 00002F7B E8DEF3 <1> call rseparate 2715 <1> %endif 2716 00002F7E 58 <1> pop ax 2717 00002F7F E8086B <1> call hexword 2718 00002F82 E2DE <1> loop .dump_loop 2719 00002F84 C3 <1> retn 2720 <1> 2721 <1> 2722 <1> dumpmemory: 2723 00002F85 AC <1> lodsb 2724 00002F86 E8166A <1> call chkeol 2725 <1> 2726 00002F89 A1[1001] <1> mov ax, word [code_seg] 2727 <1> %if _PM 2728 <1> mov dx, word [code_sel] 2729 <1> %endif 2730 00002F8C BE[FA1A] <1> mov si, msg.vm_codeseg 2731 00002F8F E82800 <1> call .line 2732 <1> 2733 <1> %if _DUALCODE 2734 <1> mov ax, word [code2_seg] 2735 <1> %if _PM 2736 <1> mov dx, word [code2_sel] 2737 <1> %endif 2738 <1> mov si, msg.vm_code2seg 2739 <1> call .line 2740 <1> %endif 2741 <1> 2742 <1> %if _PM 2743 <1> mov ax, word [pspdbg] 2744 <1> mov dx, ss 2745 <1> %else 2746 00002F92 8CD0 <1> mov ax, ss 2747 <1> %endif 2748 00002F94 BE[081B] <1> mov si, msg.vm_dataseg 2749 00002F97 E82000 <1> call .line 2750 <1> 2751 <1> %if _PM 2752 <1> mov ax, word [pspdbg] 2753 <1> mov dx, word [cssel] 2754 <1> %else 2755 00002F9A 8CD0 <1> mov ax, ss 2756 <1> %endif 2757 00002F9C BE[161B] <1> mov si, msg.vm_entryseg 2758 00002F9F E81800 <1> call .line 2759 <1> 2760 <1> %if _MESSAGESEGMENT 2761 00002FA2 A1[1201] <1> mov ax, word [messageseg] 2762 <1> %if _PM 2763 <1> mov dx, word [messagesel] 2764 <1> %endif 2765 00002FA5 BE[251B] <1> mov si, msg.vm_messageseg 2766 00002FA8 E80F00 <1> call .line 2767 <1> %endif 2768 <1> 2769 <1> %if _PM 2770 <1> mov ax, word [auxbuff_segorsel + soaSegment] 2771 <1> mov dx, word [auxbuff_segorsel + soaSelector] 2772 <1> %else 2773 00002FAB A1[4A0A] <1> mov ax, word [auxbuff_segorsel] 2774 <1> %endif 2775 00002FAE BE[361B] <1> mov si, msg.vm_auxseg 2776 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2777 00002FB1 E80600 <1> call .line 2778 <1> 2779 <1> %if _PM 2780 <1> mov ax, word [history.segorsel + soaSegment] 2781 <1> mov dx, word [history.segorsel + soaSelector] 2782 <1> %else 2783 00002FB4 A1[6C0B] <1> mov ax, word [history.segorsel] 2784 <1> %endif 2785 00002FB7 BE[471B] <1> mov si, msg.vm_hisseg 2786 <1> %endif 2787 <1> 2788 <1> .line: 2789 00002FBA BF[B40A] <1> mov di, line_out 2790 00002FBD E8DE08 <1> call copy_single_counted_string 2791 00002FC0 E8C76A <1> call hexword 2792 <1> %if _PM 2793 <1> call ispm 2794 <1> jnz @F 2795 <1> mov si, msg.vm_selector 2796 <1> call copy_single_counted_string 2797 <1> xchg ax, dx 2798 <1> call hexword 2799 <1> @@: 2800 <1> %endif 2801 00002FC3 E9FD6A <1> jmp putsline_crlf 2802 <1> 2803 <1> 2804 <1> dumpprocess: 2805 00002FC6 AC <1> lodsb 2806 00002FC7 E8D569 <1> call chkeol 2807 <1> 2808 <1> %if _PM 2809 <1> nearcall var_psps_setup 2810 <1> %endif 2811 00002FCA E86F5E <1> nearcall var_ppr_setup 2812 00002FCD E8825E <1> nearcall var_ppi_setup 2813 <1> 2814 <1> %if _BOOTLDR 2815 00002FD0 BA[781A] <1> mov dx, msg.rvp_boot 2816 <1> %if _APPLICATION || _DEVICE 2817 00002FD3 F606[D100]40 <1> testopt [internalflags], nodosloaded 2818 00002FD8 7523 <1> jnz @F 2819 <1> %else 2820 <1> jmp @F 2821 <1> %endif 2822 <1> %endif 2823 <1> 2824 <1> %if _DEVICE 2825 <1> %if _APPLICATION 2826 00002FDA F606[E600]40 <1> testopt [internalflags6], dif6_device_mode 2827 00002FDF 740F <1> jz .notdevice 2828 <1> %endif 2829 <1> 2830 <1> %if _ATTACH 2831 00002FE1 BA[8C1A] <1> mov dx, msg.rvp_device_attached 2832 00002FE4 F606[D200]40 <1> testopt [internalflags], tsrmode 2833 00002FE9 7412 <1> jz @F 2834 <1> %endif 2835 00002FEB BA[AB1A] <1> mov dx, msg.rvp_device 2836 <1> %if _APPLICATION 2837 00002FEE EB0D <1> jmp @F 2838 <1> %endif 2839 <1> %endif 2840 <1> 2841 <1> %if _APPLICATION 2842 <1> .notdevice: 2843 <1> %if _TSR 2844 00002FF0 BA[C11A] <1> mov dx, msg.rvp_tsr 2845 00002FF3 F606[D200]40 <1> testopt [internalflags], tsrmode 2846 00002FF8 7503 <1> jnz @F 2847 <1> %endif 2848 00002FFA BA[E61A] <1> mov dx, msg.rvp_application 2849 <1> %endif 2850 <1> @@: 2851 00002FFD E8B36F <1> call putsz 2852 <1> 2853 00003000 BF[B40A] <1> mov di, line_out 2854 <1> 2855 00003003 A1[000B] <1> mov ax, word [pspdbe] 2856 00003006 BE[581B] <1> mov si, msg.vp_pspsegment 2857 00003009 E84800 <1> call .line 2858 <1> 2859 0000300C A1[B050] <1> mov ax, word [psp_parent] 2860 0000300F BE[741B] <1> mov si, msg.vp_parent 2861 00003012 E83F00 <1> call .line 2862 <1> 2863 00003015 A1[B450] <1> mov ax, word [psp_pra + 2] 2864 00003018 BE[7D1B] <1> mov si, msg.vp_pra 2865 0000301B E83600 <1> call .line 2866 0000301E B03A <1> mov al, ':' 2867 00003020 AA <1> stosb 2868 00003021 A1[B250] <1> mov ax, word [psp_pra] 2869 00003024 E8636A <1> call hexword 2870 <1> 2871 <1> %if _PM 2872 <1> mov ax, word [psp_selector] 2873 <1> mov si, msg.vp_pspsel 2874 <1> call .line 2875 <1> %endif 2876 00003027 E8996A <1> call putsline_crlf 2877 <1> 2878 0000302A BF[B40A] <1> mov di, line_out 2879 <1> 2880 0000302D A1[020B] <1> mov ax, word [pspdbg] 2881 00003030 BE[661B] <1> mov si, msg.vp_dpspsegment 2882 00003033 E81E00 <1> call .line 2883 <1> 2884 00003036 A1[200B] <1> mov ax, word [parent] 2885 00003039 BE[741B] <1> mov si, msg.vp_dparent 2886 0000303C E81500 <1> call .line 2887 <1> 2888 0000303F A1[1E0B] <1> mov ax, word [psp22 + 2] 2889 00003042 BE[7D1B] <1> mov si, msg.vp_dpra 2890 00003045 E80C00 <1> call .line 2891 00003048 B03A <1> mov al, ':' 2892 0000304A AA <1> stosb 2893 0000304B A1[1C0B] <1> mov ax, word [psp22] 2894 0000304E E8396A <1> call hexword 2895 <1> 2896 <1> %if _PM 2897 <1> mov ax, ss 2898 <1> mov si, msg.vp_dpspsel 2899 <1> call .line 2900 <1> %endif 2901 00003051 E96F6A <1> jmp putsline_crlf 2902 <1> 2903 <1> .line: 2904 00003054 E84708 <1> call copy_single_counted_string 2905 00003057 E9306A <1> jmp hexword 2906 <1> 2907 <1> 2908 <1> dumpdevice: 2909 0000305A AC <1> lodsb 2910 0000305B E84169 <1> call chkeol 2911 <1> 2912 <1> %if _APPLICATION || _BOOTLDR 2913 <1> %if _DEVICE 2914 0000305E F606[E600]40 <1> testopt [internalflags6], dif6_device_mode 2915 00003063 7507 <1> jnz @F 2916 <1> %endif 2917 00003065 BA[951B] <1> mov dx, msg.rvd_not_device 2918 00003068 E8486F <1> call putsz 2919 0000306B C3 <1> retn 2920 <1> %endif 2921 <1> 2922 <1> %if _DEVICE 2923 <1> @@: 2924 0000306C A1[420C] <1> mov ax, word [device_header_address + 2] 2925 0000306F BE[B21B] <1> mov si, msg.rvd_deviceheader 2926 00003072 E81500 <1> call .line 2927 00003075 B03A <1> mov al, ':' 2928 00003077 AA <1> stosb 2929 00003078 A1[400C] <1> mov ax, word [device_header_address] 2930 0000307B E80C6A <1> call hexword 2931 <1> 2932 0000307E A1[3E0C] <1> mov ax, word [device_mcb_paragraphs] 2933 00003081 BE[C41B] <1> mov si, msg.rvd_size 2934 00003084 E80300 <1> call .line 2935 00003087 E9396A <1> jmp putsline_crlf 2936 <1> 2937 <1> .line: 2938 0000308A E81108 <1> call copy_single_counted_string 2939 0000308D E9FA69 <1> jmp hexword 2940 <1> %endif 2941 <1> 2942 <1> 2943 <1> %if _MMXSUPP 2944 <1> subcpu 586 2945 <1> dumpregsMMX: 2946 00003090 4E <1> dec si 2947 00003091 E86558 <1> nearcall get_length_keyword 2948 00003094 AC <1> lodsb 2949 00003095 80F904 <1> cmp cl, 4 ; paras, pages, KiB/MiB/GiB ? 2950 00003098 0F83C151 <1> jae error ; all invalid, only up to qwords --> 2951 0000309C B601 <1> mov dh, 1 2952 0000309E D2E6 <1> shl dh, cl 2953 000030A0 E8FC68 <1> call chkeol 2954 <1> 2955 000030A3 E813D6 <1> call guard_auxbuff 2956 000030A6 8E1E[4A0A] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 2957 000030AA 66 <1> o32 2958 000030AB DD360000 <1> fnsave [0] 2959 000030AF BE1C00 <1> mov si, 7*4 2960 000030B2 B130 <1> mov cl, '0' 2961 000030B4 BF[B40A] <1> mov di, line_out 2962 <1> .nextreg: 2963 000030B7 368E1E[4A0A] <1> mov ds, word [ss:auxbuff_segorsel] 2964 <1> ; => auxbuff 2965 000030BC B84D4D <1> mov ax, "MM" 2966 000030BF AB <1> stosw 2967 000030C0 88C8 <1> mov al, cl 2968 000030C2 B43D <1> mov ah, '=' 2969 000030C4 AB <1> stosw 2970 000030C5 51 <1> push cx 2971 000030C6 B208 <1> mov dl, 8 2972 000030C8 B700 <1> mov bh, 0 2973 000030CA 88F3 <1> mov bl, dh ; = how many bytes per item 2974 <1> .nextitem: 2975 000030CC 01DE <1> add si, bx ; -> behind item of data 2976 000030CE A8 <1> db __TEST_IMM8 ; (skip dec dx) 2977 <1> .nextbyte: 2978 000030CF 4A <1> dec dx ; (if branched here) dl always nonzero after this 2979 000030D0 4E <1> dec si ; -> next byte (less significant than prior) 2980 000030D1 8A04 <1> mov al, byte [si] 2981 000030D3 E8BB69 <1> call hexbyte ; write this byte 2982 000030D6 80FB05 <1> cmp bl, 5 ; wrote 4 bytes of qword yet ? 2983 000030D9 B03A <1> mov al, ':' 2984 000030DB 740E <1> je .oddbyte ; yes, add a colon 2985 000030DD 80FB01 <1> cmp bl, 1 ; within item ? 2986 000030E0 770A <1> ja .initem ; yes, no more separators --> 2987 000030E2 B020 <1> mov al, 32 2988 000030E4 F6C201 <1> test dl, 1 2989 000030E7 7402 <1> jz .oddbyte 2990 000030E9 B02D <1> mov al, '-' 2991 <1> .oddbyte: 2992 000030EB AA <1> stosb 2993 <1> .initem: 2994 000030EC 4B <1> dec bx ; count down in item index 2995 000030ED 75E0 <1> jnz .nextbyte ; not yet done with item --> 2996 000030EF 88F3 <1> mov bl, dh ; reset bx = number of bytes per item 2997 000030F1 01DE <1> add si, bx ; -> behind item 2998 000030F3 FECA <1> dec dl ; qword done ? 2999 000030F5 75D5 <1> jnz .nextitem ; not yet --> 3000 <1> 3001 000030F7 4F <1> dec di ; -> at last separator 3002 000030F8 B82020 <1> mov ax, 32<<8|32 3003 000030FB AB <1> stosw 3004 000030FC 83C602 <1> add si, byte 2 3005 000030FF 59 <1> pop cx 3006 00003100 F6C101 <1> test cl, 1 3007 00003103 740C <1> jz .oddreg 3008 00003105 51 <1> push cx 3009 00003106 52 <1> push dx 3010 00003107 16 <1> push ss 3011 00003108 1F <1> pop ds ; ds = es = ss 3012 00003109 E8AF69 <1> call trimputs 3013 0000310C 5A <1> pop dx 3014 0000310D 59 <1> pop cx 3015 0000310E BF[B40A] <1> mov di, line_out 3016 <1> .oddreg: 3017 00003111 FEC1 <1> inc cl 3018 00003113 80F938 <1> cmp cl, '8' 3019 00003116 759F <1> jne .nextreg 3020 00003118 368E1E[4A0A] <1> mov ds, word [ss:auxbuff_segorsel] 3021 <1> ; => auxbuff 3022 0000311D 66 <1> o32 3023 0000311E D9260000 <1> fldenv [0] 3024 00003122 16 <1> push ss 3025 00003123 1F <1> pop ds ; ds = es = ss 3026 00003124 C3 <1> retn 3027 <1> subcpureset 3028 <1> %endif 3029 <1> 3030 <1> %if _RH 3031 <1> dumphistory: 3032 00003125 E8ADD5 <1> call guard_re 3033 <1> %if _PM 3034 <1> mov ax, word [auxbuff_switchbuffer_size] 3035 <1> %else 3036 00003128 31C0 <1> xor ax, ax 3037 <1> %endif 3038 0000312A A3[4E0A] <1> mov word [auxbuff_start_silent], ax 3039 0000312D E88068 <1> call skipcomma 3040 <1> 3041 00003130 C606[D30B]00 <1> mov byte [rh_display_with_count], 0 3042 00003135 4E <1> dec si 3043 00003136 BA[901E] <1> mov dx, msg.count 3044 00003139 E8E467 <1> call isstring? 3045 0000313C 7508 <1> jne .not_count 3046 <1> 3047 0000313E F616[D30B] <1> not byte [rh_display_with_count] 3048 00003142 E86B68 <1> call skipcomma 3049 00003145 4E <1> dec si 3050 <1> 3051 <1> .not_count: 3052 00003146 BA[801F] <1> mov dx, msg.in 3053 00003149 E8D467 <1> call isstring? 3054 0000314C 754F <1> jne .not_in 3055 <1> 3056 0000314E E85F68 <1> call skipcomma 3057 00003151 4E <1> dec si 3058 00003152 56 <1> push si 3059 <1> 3060 <1> .in.loop: 3061 00003153 E88968 <1> call skipwhite 3062 00003156 4E <1> dec si 3063 <1> 3064 00003157 E83F67 <1> nearcall get_value_range; OUT: cx:di = from, bx:dx = to 3065 0000315A 7307 <1> jnc @F 3066 0000315C 7502 <1> jnz .error 3067 0000315E E30B <1> jcxz .in.next 3068 <1> .error: 3069 00003160 E9FA50 <1> jmp error 3070 <1> 3071 <1> @@: 3072 00003163 E302 <1> jcxz @F 3073 00003165 EBF9 <1> jmp .error 3074 <1> 3075 <1> @@: 3076 00003167 85DB <1> test bx, bx 3077 00003169 75F5 <1> jnz .error 3078 <1> 3079 <1> .in.next: 3080 <1> @@: 3081 0000316B E87268 <1> call skipwh0 3082 0000316E 3C2C <1> cmp al, ',' 3083 00003170 74E1 <1> je .in.loop 3084 00003172 E82A68 <1> call chkeol 3085 00003175 5E <1> pop si 3086 <1> 3087 <1> .indo.loop: 3088 00003176 E86668 <1> call skipwhite 3089 00003179 4E <1> dec si 3090 <1> 3091 0000317A E81C67 <1> nearcall get_value_range; OUT: cx:di = from, bx:dx = to 3092 0000317D 7213 <1> jc .indo.next 3093 <1> 3094 0000317F 89D3 <1> mov bx, dx 3095 00003181 89FA <1> mov dx, di 3096 00003183 A8 <1> db __TEST_IMM8 ; (skip dec) 3097 <1> @@: 3098 00003184 4B <1> dec bx 3099 00003185 52 <1> push dx 3100 00003186 53 <1> push bx 3101 00003187 56 <1> push si 3102 00003188 E84300 <1> call .do 3103 0000318B 5E <1> pop si 3104 0000318C 5B <1> pop bx 3105 0000318D 5A <1> pop dx 3106 0000318E 39D3 <1> cmp bx, dx 3107 00003190 77F2 <1> ja @B 3108 <1> 3109 <1> .indo.next: 3110 00003192 4E <1> dec si 3111 00003193 E84968 <1> call skipwhite 3112 00003196 3C2C <1> cmp al, ',' 3113 00003198 74DC <1> je .indo.loop 3114 <1> .ret: 3115 0000319A C3 <1> retn 3116 <1> 3117 <1> .ret_pop: 3118 0000319B 58 <1> pop ax 3119 0000319C C3 <1> retn 3120 <1> 3121 <1> 3122 <1> .not_in: 3123 0000319D AC <1> lodsb 3124 0000319E E8E967 <1> call iseol? 3125 000031A1 7443 <1> je .simple 3126 000031A3 E8B366 <1> nearcall getword 3127 000031A6 89D3 <1> mov bx, dx 3128 000031A8 E8DF67 <1> call iseol? 3129 000031AB 7421 <1> je .one 3130 000031AD E8A966 <1> nearcall getword 3131 000031B0 E8EC67 <1> call chkeol 3132 000031B3 53 <1> push bx 3133 000031B4 E8485C <1> nearcall var_rhcount_setup 3134 <1> ; mov ax, [bx] 3135 000031B7 5B <1> pop bx 3136 000031B8 53 <1> push bx 3137 000031B9 29C3 <1> sub bx, ax ; cmp bx, ax 3138 000031BB 720D <1> jb .several_below ; if bx below amount --> 3139 000031BD 85D2 <1> test dx, dx ; special: zero ? 3140 000031BF 7405 <1> jz .several_first_ax 3141 000031C1 43 <1> inc bx ; how many to hide 3142 <1> ; Can overflow if given FFFFh and 0 in buffer. 3143 <1> ; However, if 0 in buffer then nothing will 3144 <1> ; be displayed regardless where we branch. 3145 000031C2 29DA <1> sub dx, bx ; = how many remain 3146 000031C4 76D5 <1> jbe .ret_pop ; <= 0 remain, do nothing 3147 <1> ; if > 0 remain 3148 <1> .several_first_ax: 3149 000031C6 5B <1> pop bx 3150 000031C7 93 <1> xchg bx, ax 3151 000031C8 4B <1> dec bx 3152 000031C9 A8 <1> db __TEST_IMM8 ; (skip pop) 3153 <1> 3154 <1> .several_below: 3155 000031CA 5B <1> pop bx 3156 000031CB 92 <1> xchg ax, dx 3157 000031CC EB0C <1> jmp .several 3158 <1> 3159 <1> .do: 3160 <1> .one: 3161 000031CE 53 <1> push bx 3162 000031CF E82D5C <1> nearcall var_rhcount_setup 3163 <1> ; mov ax, [bx] 3164 000031D2 5B <1> pop bx 3165 000031D3 39C3 <1> cmp bx, ax 3166 000031D5 73C3 <1> jae .ret 3167 <1> 3168 000031D7 B80100 <1> mov ax, 1 3169 <1> .several: 3170 000031DA 891E[D40B] <1> mov word [rh_count_number], bx 3171 000031DE 43 <1> inc bx 3172 000031DF 891E[560A] <1> mov word [tt_silent_mode_number], bx 3173 000031E3 E9C16C <1> jmp silence_dump.rh 3174 <1> 3175 <1> .simple: 3176 000031E6 E8165C <1> nearcall var_rhcount_setup 3177 <1> ; mov ax, [bx] 3178 000031E9 48 <1> dec ax 3179 000031EA A3[D40B] <1> mov word [rh_count_number], ax 3180 000031ED 8326[560A]00 <1> and word [tt_silent_mode_number], 0 3181 000031F2 E9AF6C <1> jmp silence_dump.rh.all 3182 <1> %endif 3183 <1> ..@rr_access_end: 2925 %if _RN 2926 %include "fptostr.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> Copyright (C) 2008-2012 C. Masloch 5 <1> 6 <1> Usage of the works is permitted provided that this 7 <1> instrument is retained with the works, so that any entity 8 <1> that uses the works is notified of this instrument. 9 <1> 10 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 11 <1> 12 <1> %endif 13 <1> 14 <1> 15 <1> usesection lDEBUG_DATA_ENTRY 16 <1> 17 <1> ;--- defines procedures 18 <1> ;--- PowerOf10 19 <1> ;--- FloatToBCD 20 <1> ;--- FloatToStr 21 <1> 22 <1> ; These are bits in the FP status word. 23 <1> 24 <1> FP_LESSTHAN equ 01h 25 <1> FP_EQUALTO equ 40h 26 <1> 27 0000432C 00 <1> align 8, db 0 28 00004330 0000000000002440 <1> ten: dq 10.0 29 00004338 0080E03779C34143 <1> ten16: dq 1.0e16 30 <1> ;rounder:dq 5.0e10 31 <1> 32 00004340 00000000000000A002- <1> ten_1: dt 1.0e1 ; 10.0 32 00004349 40 <1> 33 0000434A 00000000000000C805- <1> dt 1.0e2 ; 100.0 33 00004353 40 <1> 34 00004354 00000000000000FA08- <1> dt 1.0e3 ; 1,000.0 34 0000435D 40 <1> 35 0000435E 000000000000409C0C- <1> dt 1.0e4 ; 10,000.0 35 00004367 40 <1> 36 00004368 00000000000050C30F- <1> dt 1.0e5 ; 100,000.0 36 00004371 40 <1> 37 00004372 00000000000024F412- <1> dt 1.0e6 ; 1,000,000.0 37 0000437B 40 <1> 38 0000437C 000000000080969816- <1> dt 1.0e7 ; 10,000,000.0 38 00004385 40 <1> 39 00004386 000000000020BCBE19- <1> dt 1.0e8 ; 100,000,000.0 39 0000438F 40 <1> 40 00004390 0000000000286BEE1C- <1> dt 1.0e9 ; 1,000,000,000.0 40 00004399 40 <1> 41 0000439A 0000000000F9029520- <1> dt 1.0e10 ; 10,000,000,000.0 41 000043A3 40 <1> 42 000043A4 0000000040B743BA23- <1> dt 1.0e11 ; 100,000,000,000.0 42 000043AD 40 <1> 43 000043AE 0000000010A5D4E826- <1> dt 1.0e12 ; 1,000,000,000,000.0 43 000043B7 40 <1> 44 000043B8 000000002AE784912A- <1> dt 1.0e13 ; 10,000,000,000,000.0 44 000043C1 40 <1> 45 000043C2 00000080F420E6B52D- <1> dt 1.0e14 ; 100,000,000,000,000.0 45 000043CB 40 <1> 46 000043CC 000000A031A95FE330- <1> dt 1.0e15 ; 1,000,000,000,000,000.0 46 000043D5 40 <1> 47 <1> 48 000043D6 00000004BFC91B8E34- <1> ten_16: dt 1.0e16 48 000043DF 40 <1> 49 000043E0 9EB5702BA8ADC59D69- <1> dt 1.0e32 49 000043E9 40 <1> 50 000043EA D795430E058D29AF9E- <1> dt 1.0e48 50 000043F3 40 <1> 51 000043F4 D5A6CFFF491F78C2D3- <1> dt 1.0e64 51 000043FD 40 <1> 52 000043FE FCF7DA878F7AE7D708- <1> dt 1.0e80 52 00004407 41 <1> 53 00004408 A3149BC516ABB3EF3D- <1> dt 1.0e96 53 00004411 41 <1> 54 00004412 9E322399C0AD0F8573- <1> dt 1.0e112 54 0000441B 41 <1> 55 0000441C E08CE980C947BA93A8- <1> dt 1.0e128 55 00004425 41 <1> 56 00004426 E7A6D3A8C5B902A4DD- <1> dt 1.0e144 56 0000442F 41 <1> 57 00004430 AA17E67F2BA116B612- <1> dt 1.0e160 57 00004439 42 <1> 58 0000443A 93BF9B8591A228CA47- <1> dt 1.0e176 58 00004443 42 <1> 59 00004444 6B5527398DF770E07C- <1> dt 1.0e192 59 0000444D 42 <1> 60 0000444E 46618237350C2EF9B1- <1> dt 1.0e208 60 00004457 42 <1> 61 00004458 30C93CE3FF96528AE7- <1> dt 1.0e224 61 00004461 42 <1> 62 00004462 6617BFD6F3A691991C- <1> dt 1.0e240 62 0000446B 43 <1> 63 <1> 64 0000446C 8EDEF99DFBEB7EAA51- <1> ten_256:dt 1.0e256 64 00004475 43 <1> 65 <1> 66 <1> ; The remaining exponents are only necessary for 10-byte doubles. 67 <1> 68 00004476 C7910EA6AEA019E3A3- <1> dt 1.0e512 68 0000447F 46 <1> 69 00004480 8CA600CDA89C3F97F6- <1> dt 1.0e768 69 00004489 49 <1> 70 0000448A 170C7581867576C948- <1> dt 1.0e1024 70 00004493 4D <1> 71 00004494 CB6E85EB0E8C2C869B- <1> dt 1.0e1280 71 0000449D 50 <1> 72 0000449E E4A793393B35B8B2ED- <1> dt 1.0e1536 72 000044A7 53 <1> 73 000044A8 8CB84A9284DD0DEE3F- <1> dt 1.0e1792 73 000044B1 57 <1> 74 000044B2 E55D3DC55D3B8B9E92- <1> dt 1.0e2048 74 000044BB 5A <1> 75 000044BC 6F80F44132202ED3E4- <1> dt 1.0e2304 75 000044C5 5D <1> 76 000044C6 A6F0A120C054A58C37- <1> dt 1.0e2560 76 000044CF 61 <1> 77 000044D0 CC77D99B9A0A57BB89- <1> dt 1.0e2816 77 000044D9 64 <1> 78 000044DA 8B5A8BD8255D89F9DB- <1> dt 1.0e3072 78 000044E3 67 <1> 79 000044E4 45FE99567DEF30A62E- <1> dt 1.0e3328 79 000044ED 6B <1> 80 000044EE F8F327BFA2C85DDD80- <1> dt 1.0e3584 80 000044F7 6E <1> 81 000044F8 9B97208A025260C425- <1> dt 1.0e4096 81 00004501 75 <1> 82 00004502 B41CE17BE352C98278- <1> dt 1.0e4352 82 0000450B 78 <1> 83 0000450C F059D56E621135AECA- <1> dt 1.0e4608 83 00004515 7B <1> 84 00004516 6D6D14B97F380BE81C- <1> dt 1.0e4864 84 0000451F 7F <1> 85 <1> 86 <1> %if _DUALCODE 87 <1> usesection lDEBUG_CODE2 88 <1> %else 89 <1> usesection lDEBUG_CODE 90 <1> %endif 91 <1> 92 <1> ; Divide or multiply st0 to normalize it 93 <1> ; 94 <1> ; INP: ax = exponent word 95 <1> ; CHG: bx, dx, cl 96 <1> PowerOf10: 97 000031F5 56 <1> push si 98 000031F6 50 <1> push ax 99 000031F7 85C0 <1> test ax, ax 100 000031F9 7902 <1> jns .notnegative 101 000031FB F7D8 <1> neg ax 102 <1> .notnegative: 103 000031FD D9E8 <1> fld1 104 000031FF 88C3 <1> mov bl, al 105 00003201 80E30F <1> and bl, 0Fh ; bits 0..3 106 00003204 7406 <1> je .0..3zero 107 00003206 BE[4043] <1> mov si, ten_1 108 00003209 E82B00 <1> call mul10 109 <1> .0..3zero: 110 0000320C 88C3 <1> mov bl, al 111 0000320E B104 <1> mov cl, 4 112 00003210 D2EB <1> shr bl, cl 113 00003212 80E30F <1> and bl, 0Fh ; bits 4..7 114 00003215 7406 <1> je .4..7zero 115 00003217 BE[D643] <1> mov si, ten_16 116 0000321A E81A00 <1> call mul10 117 <1> .4..7zero: 118 0000321D 88E3 <1> mov bl, ah 119 0000321F 80E31F <1> and bl, 1Fh ; bits 8..12 120 00003222 7406 <1> jz .8..12zero 121 00003224 BE[6C44] <1> mov si, ten_256 122 00003227 E80D00 <1> call mul10 123 <1> .8..12zero: 124 0000322A 58 <1> pop ax 125 0000322B 85C0 <1> test ax, ax 126 0000322D 7904 <1> jns .notnegative2 127 0000322F DEF9 <1> fdivp st1 128 00003231 5E <1> pop si 129 00003232 C3 <1> retn 130 <1> 131 <1> .notnegative2: 132 00003233 DEC9 <1> fmulp st1 133 00003235 5E <1> pop si 134 00003236 C3 <1> retn 135 <1> 136 <1> mul10: 137 00003237 FECB <1> dec bl 138 00003239 B700 <1> mov bh, 0 139 0000323B 50 <1> push ax 140 0000323C 89D8 <1> mov ax, bx 141 0000323E 01C0 <1> add ax, ax 142 00003240 01C0 <1> add ax, ax ; *4 143 00003242 01C3 <1> add bx, ax ; *5 144 00003244 01DB <1> add bx, bx ; *10 145 00003246 58 <1> pop ax 146 00003247 DB28 <1> fld tword [bx + si] 147 00003249 DEC9 <1> fmulp st1 148 0000324B C3 <1> retn 149 <1> 150 <1> 151 <1> ; Convert a floating point register to ASCII. For internal use. 152 <1> ; The result always has exactly 18 digits, with zero padding 153 <1> ; on the left if required. 154 <1> ; 155 <1> ; INP: st0 = number to convert, 0 <= st0 < 1.0E19 156 <1> ; di-> 18-character output buffer 157 <1> ; CHG: si, di, cx, ax 158 <1> FloatToBCD: 159 0000324C 55 <1> push bp 160 0000324D 89E5 <1> mov bp, sp 161 0000324F 83EC0C <1> sub sp, 12 162 <1> 163 <1> ; The fbstp instruction converts the top of the stack to 164 <1> ; a packed BCD form in ten bytes, with two digits per 165 <1> ; byte. The top byte has the sign, which we ignore. 166 00003252 DF76F4 <1> fbstp [ bp-12 ] 167 <1> 168 <1> ; Now we need to unpack the BCD to ASCII. 169 00003255 8D76FC <1> lea si, [ bp-4 ] 170 00003258 B90900 <1> mov cx, 9 171 <1> .nextdigits: 172 0000325B 8A04 <1> mov al, byte [ si ] ; xxxx xxxx AAAA BBBB 173 0000325D 4E <1> dec si 174 <1> %if 1 175 0000325E B400 <1> mov ah, 0 ; 0000 0000 AAAA BBBB 176 00003260 51 <1> push cx 177 00003261 B104 <1> mov cl, 4 178 00003263 D3C8 <1> ror ax, cl ; BBBB xxxx xxxx AAAA 179 00003265 D2C4 <1> rol ah, cl ; xxxx BBBB xxxx AAAA 180 00003267 59 <1> pop cx 181 <1> ;and ax, 0F0Fh ; 0000 BBBB 0000 AAAA 182 <1> %else 183 <1> aam 16 ; 0000 AAAA 0000 BBBB 184 <1> xchg al, ah ; 0000 BBBB 0000 AAAA 185 <1> %endif 186 00003268 053030 <1> add ax, "00" 187 0000326B AB <1> stosw 188 0000326C E2ED <1> loop .nextdigits 189 0000326E 89EC <1> mov sp, bp 190 00003270 5D <1> pop bp 191 00003271 C3 <1> retn 192 <1> 193 <1> 194 <1> ; Convert a double precision number to a string. 195 <1> ; 196 <1> ; Entry: dword [far pfpin] -> 8-byte double to convert, non-zero 197 <1> ; es = ss : word [pszDbl] -> character buffer 198 <1> ; 199 <1> ; Exit: es = ss : word [pszDbl] -> converted value 200 <1> ; 201 <1> ; CHG: ax, bx, cx, dx 202 <1> ; 203 <1> ; The buffer at pszDbl should be at least 19 bytes long. 204 <1> ; The buffer needs to be initialized with blanks. 205 <1> 206 <1> ;FloatToStr PROC stdcall public USES si di pfpin: ptr TBYTE, pszDbl: PTR BYTE 207 <1> FloatToStr: section_of_function 208 <1> lframe dualdistance 209 <1> lpar word, ??pszDbl ; pszDbl: PTR BYTE, near 210 <1> lpar dword, ??pfpin ; pfpin: ptr TBYTE, but far 211 <1> lvar word, ??iExp ; LOCAL iExp: WORD 212 <1> lvar word, ??mystat ; LOCAL mystat: WORD 213 <1> lvar 10, ??fpin ; LOCAL fpin: TBYTE 214 <1> lvar 22, ??szTemp ; LOCAL szTemp[22]: BYTE 215 00003272 5589E58D66DC <1> lenter 216 <1> 217 <1> %define iExp bp+???%+%? 218 <1> %define mystat bp+???%+%? 219 <1> %define fpin bp+???%+%? 220 <1> %define szTemp bp+???%+%? 221 <1> %define pfpin bp+???%+%? 222 <1> %define pszDbl bp+???%+%? 223 <1> 224 00003278 1E <1> push ds 225 00003279 56 <1> push si ; USES si 226 0000327A 06 <1> push es 227 0000327B 57 <1> push di ; USES di 228 <1> 229 <1> ; Special case zero has been filtered already. (fxtract fails for zero.) 230 0000327C C57604 <1> lds si, [pfpin] 231 0000327F 16 <1> push ss 232 00003280 07 <1> pop es 233 00003281 8D7EF2 <1> lea di, [fpin] 234 00003284 B90500 <1> mov cx, 5 235 00003287 F3A5 <1> rep movsw ; store number in local buffer 236 00003289 16 <1> push ss 237 0000328A 1F <1> pop ds 238 <1> 239 0000328B 8B7E08 <1> mov di, [pszDbl] ; -> output buffer 240 <1> 241 <1> ; Check for a negative number. 242 0000328E F646FB80 <1> test byte [fpin+9], 80h 243 00003292 7407 <1> jz .ispositive 244 00003294 8066FB7F <1> and byte [fpin+9], ~80h ; change to positive 245 00003298 B02D <1> mov al, '-' ; store a minus sign 246 0000329A AA <1> stosb 247 <1> .ispositive: 248 <1> 249 <1> ; Load our value onto the stack two times. 250 0000329B DB6EF2 <1> fld tword [fpin] 251 0000329E D9C0 <1> fld st0 252 <1> 253 <1> ; Compute the closest power of 10 below the number. We can't get an 254 <1> ; exact value because of rounding. We could get close by adding in 255 <1> ; log10(mantissa), but it still wouldn't be exact. Since we'll have to 256 <1> ; check the result anyway, it's silly to waste cycles worrying about 257 <1> ; the mantissa. 258 <1> ; 259 <1> ; The exponent is basically log2(fpin). Those of you who remember 260 <1> ; algebra realize that log2(fpin) x log10(2) = log10(fpin), which is 261 <1> ; what we want. 262 <1> 263 000032A0 D9F4 <1> fxtract ; ST = mantissa, exponent, fpin 264 000032A2 DDD8 <1> fstp st0 ; discard the mantissa 265 000032A4 D9EC <1> fldlg2 ; push log10(2) 266 000032A6 DEC9 <1> fmulp st1, st0 ; ST = log10(fpin), fpin 267 000032A8 DF5EFE <1> fistp word [iExp] ; ST = fpin 268 <1> 269 <1> ; An 8-byte double can carry almost 16 digits of precision. Actually, it's 270 <1> ; 15.9 digits, so some numbers close to 1E17 will be wrong in the bottom 271 <1> ; digit. If this is a concern, change the 18 or 16 to a 15. 272 <1> ; 273 <1> ; A 10-byte double can carry almost 19 digits, but fbstp only stores the 274 <1> ; guaranteed 18. Since we're doing 10-byte doubles, we check for 18 instead of 16. 275 <1> 276 000032AB 837EFE12 <1> cmp word [iExp], 18 277 000032AF 7332 <1> jae .notbelow18 278 000032B1 D9C0 <1> fld st0 ; ST = fpin, fpin 279 000032B3 D9FC <1> frndint ; ST = int(fpin), fpin 280 000032B5 D8D9 <1> fcomp st1 ; ST = fpin, status set 281 000032B7 9BDD7EFC <1> fstsw word [mystat] 282 000032BB 8B46FC <1> mov ax, word [mystat] 283 000032BE 9E <1> sahf 284 000032BF 7522 <1> jne .notequal 285 <1> 286 <1> ; We have an integer! Lucky day. Go convert it into a temp buffer. 287 <1> 288 000032C1 57 <1> push di 289 000032C2 8D7EDC <1> lea di, [szTemp] 290 000032C5 E884FF <1> call FloatToBCD 291 000032C8 5F <1> pop di 292 <1> 293 000032C9 B81100 <1> mov ax, 16+1 294 000032CC 8B4EFE <1> mov cx, word [iExp] 295 000032CF 29C8 <1> sub ax, cx 296 000032D1 41 <1> inc cx 297 000032D2 8D76DC <1> lea si, [szTemp] 298 000032D5 01C6 <1> add si, ax 299 <1> 300 <1> ; The off-by-one order of magnitude problem below can hit us here. 301 <1> ; We just trim off the possible leading zero. 302 <1> 303 000032D7 803C30 <1> cmp byte [si], '0' 304 000032DA 7502 <1> jnz .not0digit 305 000032DC 46 <1> inc si 306 000032DD 49 <1> dec cx 307 <1> .not0digit: 308 <1> 309 <1> ; Copy the rest of the converted BCD value to our buffer. 310 <1> 311 000032DE F3A4 <1> rep movsb 312 000032E0 E99800 <1> jmp .ftsExit 313 <1> 314 <1> .notequal: 315 <1> .notbelow18: 316 <1> 317 <1> ; Have fbstp round to 17 places. 318 <1> 319 000032E3 B81000 <1> mov ax, 16 ; experiment 320 000032E6 2B46FE <1> sub ax, word [iExp] ; adjust exponent to 17 321 000032E9 E809FF <1> call PowerOf10 322 <1> 323 <1> ; Either we have exactly 17 digits, or we have exactly 16 digits. We can 324 <1> ; detect that condition and adjust now. 325 <1> 326 000032EC DC16[3843] <1> fcom qword [ten16] 327 <1> ; x0xxxx00 means top of stack > ten16 328 <1> ; x0xxxx01 means top of stack < ten16 329 <1> ; x1xxxx00 means top of stack = ten16 330 000032F0 9BDD7EFC <1> fstsw word [mystat] 331 000032F4 8B46FC <1> mov ax, word [mystat] 332 000032F7 F6C401 <1> test ah, 1 333 000032FA 7407 <1> jz .notset1 334 000032FC DC0E[3043] <1> fmul qword [ten] 335 00003300 FF4EFE <1> dec word [iExp] 336 <1> .notset1: 337 <1> 338 <1> ; Go convert to BCD. 339 <1> 340 00003303 57 <1> push di 341 00003304 8D7EDC <1> lea di, [szTemp] 342 00003307 E842FF <1> call FloatToBCD 343 0000330A 5F <1> pop di 344 <1> 345 0000330B 8D76DD <1> lea si, [szTemp+1] ; point to converted buffer 346 <1> 347 <1> ; If the exponent is between -15 and 16, we should express this as a number 348 <1> ; without scientific notation. 349 <1> 350 0000330E 8B4EFE <1> mov cx, word [iExp] 351 00003311 51 <1> push cx 352 00003312 83C10F <1> add cx, 15 353 00003315 83F91F <1> cmp cx, 15+16 354 00003318 59 <1> pop cx 355 00003319 7734 <1> ja .fts6 356 <1> 357 <1> ; If the exponent is less than zero, we insert '0.', then -cx 358 <1> ; leading zeros, then 16 digits of mantissa. If the exponent is 359 <1> ; positive, we copy cx+1 digits, then a decimal point (maybe), then 360 <1> ; the remaining 16-cx digits. 361 <1> 362 0000331B 41 <1> inc cx 363 0000331C 83F900 <1> cmp cx, byte 0 364 0000331F 7F0F <1> jg .ispos1 365 00003321 B8302E <1> mov ax, "0." 366 00003324 AB <1> stosw 367 00003325 F7D9 <1> neg cx 368 00003327 B030 <1> mov al, '0' 369 00003329 F3AA <1> rep stosb 370 0000332B B91000 <1> mov cx, 16 371 0000332E EB0B <1> jmp short .fts3 372 <1> .ispos1: 373 00003330 F3A4 <1> rep movsb 374 00003332 B02E <1> mov al, '.' 375 00003334 AA <1> stosb 376 00003335 B91000 <1> mov cx, 16 377 00003338 2B4EFE <1> sub cx, word [iExp] 378 <1> .fts3: 379 0000333B F3A4 <1> rep movsb 380 <1> 381 <1> ; Trim off trailing zeros. 382 <1> 383 <1> .nextitem2: 384 0000333D 807DFF30 <1> cmp byte [di-1], '0' 385 00003341 7503 <1> jne .fts1 386 00003343 4F <1> dec di 387 00003344 EBF7 <1> jmp short .nextitem2 388 <1> .fts1: 389 <1> 390 <1> ; If we cleared out all the decimal digits, kill the decimal point, too. 391 <1> 392 00003346 807DFF2E <1> cmp byte [di-1], '.' 393 0000334A 7501 <1> jnz .fts2 394 0000334C 4F <1> dec di 395 <1> .fts2: 396 <1> 397 <1> ; That's it. 398 <1> 399 0000334D EB2C <1> jmp short .ftsExit 400 <1> .fts6: 401 <1> 402 <1> ; Now convert this to a standard, usable format. If needed, a minus 403 <1> ; sign is already present in the outgoing buffer, and di already points 404 <1> ; past it. 405 <1> 406 0000334F A4 <1> movsb ; copy the first digit 407 00003350 B02E <1> mov al, '.' 408 00003352 AA <1> stosb ; plop in a decimal point 409 00003353 A5 <1> movsw 410 00003354 A5 <1> movsw 411 00003355 A5 <1> movsw ; copy six more digits 412 <1> 413 <1> %if 0 414 <1> 415 <1> ; The printf %g specified trims off trailing zeros here. I dislike 416 <1> ; this, so I've disabled it. Comment out the %if 0 and %endif if you 417 <1> ; want this. 418 <1> 419 <1> .fts61: 420 <1> cmp byte [di-1], '0' 421 <1> je .fts62 422 <1> dec di 423 <1> jmp short .fts61 424 <1> .fts62: 425 <1> %endif 426 <1> 427 <1> ; Shove in the exponent. If you support 10-byte reals, remember to 428 <1> ; allow 4 digits for the exponent. 429 <1> 430 00003356 B8652B <1> mov ax, "e+" 431 00003359 8B56FE <1> mov dx, word [iExp] 432 0000335C 85D2 <1> test dx, dx 433 0000335E 7904 <1> jns .fts7 434 00003360 F7DA <1> neg dx 435 00003362 B42D <1> mov ah, '-' 436 <1> .fts7: 437 00003364 AB <1> stosw 438 <1> 439 00003365 92 <1> xchg ax, dx 440 00003366 BE0A00 <1> mov si, 10 441 00003369 B90400 <1> mov cx, 4 442 <1> .fts8: 443 0000336C 31D2 <1> xor dx, dx 444 0000336E F7F6 <1> div si 445 00003370 52 <1> push dx 446 00003371 E2F9 <1> loop .fts8 447 00003373 B104 <1> mov cl, 4 448 <1> .fts9: 449 00003375 58 <1> pop ax 450 00003376 0430 <1> add al, '0' 451 00003378 AA <1> stosb 452 00003379 E2FA <1> loop .fts9 453 <1> 454 <1> %if 0 455 <1> add di, byte 4 ; -> terminator 456 <1> %endif 457 <1> 458 <1> ; Clean up and go home. 459 <1> 460 <1> .ftsExit: 461 <1> ; fldcw [stat] ; restore control word 462 <1> ; fwait 463 <1> %if 0 464 <1> mov ax, di 465 <1> sub ax, word [pszDbl] 466 <1> mov cx, 21 467 <1> sub cx, ax 468 <1> mov al, 32 469 <1> rep stosb 470 <1> %endif 471 0000337B 5F <1> pop di 472 0000337C 07 <1> pop es 473 0000337D 5E <1> pop si 474 0000337E 1F <1> pop ds 475 <1> 476 0000337F 89EC5D <1> lleave 477 <1> dualreturn 478 00003382 C20600 <1> lret 479 <1> 480 <1> %undef pfpin 481 <1> %undef pszDbl 482 <1> %undef iExp 483 <1> %undef mystat 484 <1> %undef fpin 485 <1> %undef szTemp 2927 %endif 2928 %include "run.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug code and commands (P, T, G) to run debuggee code 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 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 19 <1> 20 <1> ..@run_access_start: 21 <1> 22 <1> gg_repeat: 23 00003385 E84DD3 <1> call guard_re 24 00003388 800E[D400]20 <1> setopt [internalflags2], dif2_gg_again 25 0000338D EB17 <1> jmp @F 26 <1> 27 <1> ; G command - go. 28 <1> gg: 29 0000338F 4E <1> dec si 30 00003390 4E <1> dec si 31 00003391 BA[4E1C] <1> mov dx, msg.goto 32 00003394 E88965 <1> call isstring? 33 00003397 7503E91E7C <1> je cmd_goto 34 0000339C 46 <1> inc si 35 0000339D AC <1> lodsb 36 <1> 37 0000339E E834D3 <1> call guard_re 38 <1> 39 000033A1 8026[D400]DF <1> clropt [internalflags2], dif2_gg_again 40 <1> @@: 41 000033A6 C706[FC00][122A] <1> mov word [gg_deferred_message], msg.empty_message 42 000033AC 8326[FE00]00 <1> and word [bb_deferred_message_in_lineout_behind], 0 43 <1> 44 000033B1 BB[F504] <1> mov bx, dmycmd 45 000033B4 F606[A200]02 <1> testopt [options], gg_no_autorepeat 46 000033B9 7503 <1> jnz @F 47 000033BB BB[8533] <1> mov bx, gg_repeat 48 <1> @@: 49 000033BE 891E[020C] <1> mov word [lastcmd], bx 50 <1> 51 000033C2 800E[D400]08 <1> setopt [internalflags2], dif2_gg_is_gg 52 000033C7 8026[D400]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 55 <1> 56 000033CC FF36[D00C] <1> push word [reg_cs] ; save original CS 57 000033D0 8F06[FE0B] <1> pop word [eqladdr+4] 58 000033D4 E80815 <1> call parseql ; process =addr 59 <1> 60 000033D7 F606[A200]01 <1> testopt [options], gg_do_not_skip_bp 61 000033DC 752A <1> jnz .do_not_skip_cseip 62 000033DE 800E[D400]01 <1> setopt [internalflags2], dif2_gg_is_first 63 <1> 64 000033E3 803E[F80B]00 <1> cmp byte [eqflag], 0 65 000033E8 7507 <1> jne .cseip_take_eql 66 <1> 67 <1> _386_PM_o32 ; xor ecx, ecx 68 000033EA 31C9 <1> xor cx, cx 69 000033EC E8F807 <1> call get_cseip_ecx_linear 70 000033EF EB0B <1> jmp .got_cseip 71 <1> 72 <1> .cseip_take_eql: 73 000033F1 8B1E[FE0B] <1> mov bx, word [eqladdr + 4] 74 <1> _386_PM_o32 ; mov edx, dword [eqladdr] 75 000033F5 8B16[FA0B] <1> mov dx, word [eqladdr] 76 000033F9 E8F507 <1> call getlinear_d_b 77 <1> .got_cseip: 78 000033FC 7303E95C4E <1> jc error 79 00003401 A3[F000] <1> mov word [gg_first_cseip_linear], ax 80 00003404 8916[F200] <1> mov word [gg_first_cseip_linear + 2], dx 81 <1> .do_not_skip_cseip: 82 <1> 83 <1> %ifn _NUM_G_BP 84 <1> call chkeol 85 <1> 86 <1> testopt [options3], opt3_gg_no_paging 87 <1> jz @F 88 <1> clropt [internalflags], pagedcommand 89 <1> @@: 90 <1> call tpg_initialise_empty_auxbuff 91 <1> 92 <1> %if _BREAKPOINTS 93 <1> call bb_writepoints_init_reset 94 <1> %endif 95 <1> 96 <1> %else 97 00003408 4E <1> dec si 98 00003409 E8A465 <1> call skipcomma 99 0000340C 4E <1> dec si 100 0000340D BA[182A] <1> mov dx, msg.again 101 00003410 E80D65 <1> call isstring? 102 00003413 752B <1> jne @F ; (after this, do not dec si!) 103 <1> 104 <1> gg_again: 105 <1> 106 <1> %if _WHILEBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 107 <1> %error WHILE buffer not large enough for gg breakpoint list 108 <1> %endif 109 <1> 110 00003415 56 <1> push si 111 00003416 BE[510A] <1> mov si, g_bplist.used_count 112 00003419 31C0 <1> xor ax, ax 113 0000341B AC <1> lodsb ; ax = number of breakpoints set yet 114 0000341C 4E <1> dec si ; -> gg breakpoint list 115 0000341D 89C1 <1> mov cx, ax 116 0000341F 01C9 <1> add cx, cx 117 00003421 01C9 <1> add cx, cx ; * 4 118 <1> %if BPSIZE == 4 119 <1> %elif BPSIZE == 5 120 <1> add cx, ax ; * 5 121 <1> %elif BPSIZE == 6 122 00003423 01C1 <1> add cx, ax ; * 5 123 00003425 01C1 <1> add cx, ax ; * 6 124 <1> %elif BPSIZE == 9 125 <1> add cx, cx ; * 8 126 <1> add cx, ax ; * 9 127 <1> %else 128 <1> %error Unexpected breakpoint size 129 <1> %endif 130 00003427 41 <1> inc cx ; include the count 131 00003428 BF[F00C] <1> mov di, while_buffer ; es:di -> WHILE buffer 132 0000342B F3A4 <1> rep movsb ; initialise WHILE buffer list 133 <1> 134 0000342D 5E <1> pop si ; si -> separator after "AGAIN" keyword 135 0000342E BF[F10C] <1> mov di, while_buffer + 1 ; -> first point 136 00003431 89C1 <1> mov cx, ax 137 00003433 B0CC <1> mov al, 0CCh 138 00003435 E306 <1> jcxz .end 139 <1> .loop: 140 00003437 83C705 <1> add di, BPSIZE - 1 ; -> point content 141 0000343A AA <1> stosb ; initialise breakpoint content 142 0000343B E2FA <1> loop .loop 143 <1> .end: 144 <1> ; es:di -> after last breakpoint in array 145 0000343D E99000 <1> jmp gg3 ; parse additional points (do not dec si!) 146 <1> 147 <1> @@: 148 00003440 F606[D400]20 <1> testopt [internalflags2], dif2_gg_again 149 00003445 75CE <1> jnz gg_again 150 <1> 151 <1> 152 <1> gg_list: 153 00003447 BA[132A] <1> mov dx, msg.list 154 0000344A E8D364 <1> call isstring? 155 0000344D 757B <1> jne .not 156 <1> 157 0000344F AC <1> lodsb 158 00003450 E84C65 <1> call chkeol 159 <1> 160 00003453 800E[D400]05 <1> setopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip 161 <1> 162 00003458 BE[520A] <1> mov si, g_bplist.bp 163 0000345B 31C9 <1> xor cx, cx 164 0000345D 8A4CFF <1> mov cl, byte [si - 1] 165 00003460 31DB <1> xor bx, bx 166 00003462 E360 <1> jcxz .none 167 <1> .loop: 168 00003464 43 <1> inc bx 169 00003465 51 <1> push cx 170 00003466 53 <1> push bx 171 <1> 172 00003467 89D8 <1> mov ax, bx ; 1-based index 173 00003469 BF[B40A] <1> mov di, line_out 174 0000346C E8E806 <1> call ordinalbyte 175 <1> 176 0000346F 57 <1> push di 177 00003470 81EF[B70A] <1> sub di, line_out + 1 + 2 178 <1> ; 1 = a digit, 2 = ordinal suffix, 179 <1> ; result = how many additional digits are used 180 00003474 BA[AE29] <1> mov dx, msg.list_bp.first 181 00003477 01FA <1> add dx, di 182 00003479 E8376B <1> call putsz ; show blanks first 183 0000347C 5F <1> pop di 184 0000347D E84766 <1> call putsline 185 <1> 186 00003480 E84604 <1> call gg_bb_lods_bp_linear 187 <1> ; BPSIZE implied 188 <1> 189 00003483 BF[C829] <1> mov di, msg.list_bp.address1 190 00003486 92 <1> xchg ax, dx 191 00003487 E80066 <1> call hexword 192 0000348A 47 <1> inc di 193 <1> ; mov di, msg.list_bp.address2 194 0000348B 92 <1> xchg ax, dx 195 0000348C E8FB65 <1> call hexword 196 <1> 197 0000348F E88B06 <1> call gg_bb_check_is_first 198 <1> ; we set up the dif2_gg_skip_cseip flag, 199 00003492 B9[E732] <1> mov cx, msg.list_bp_not_cseip 200 <1> ; so if CY (do not skip), initialise this 201 00003495 7203 <1> jc .not_cseip 202 <1> ; if NC (do skip), use other string 203 <1> %if _PM 204 <1> push bx 205 <1> mov bx, word [reg_cs] 206 <1> cmp byte [eqflag], 0 207 <1> je @F 208 <1> mov bx, word [eqladdr + 4] 209 <1> @@: 210 <1> call test_d_b_bit 211 <1> pop bx 212 <1> mov cx, msg.list_bp_cseip_32 213 <1> jnz @F ; if 32-bit cs --> 214 <1> %endif 215 00003497 B9[DF29] <1> mov cx, msg.list_bp_csip_16 216 <1> @@: 217 <1> .not_cseip: 218 <1> %if BPSIZE == 6 || BPSIZE == 9 219 <1> ; INP: dx:ax = linear address 220 <1> ; si -> (d)word offset 221 <1> ; di -> where to store 222 <1> ; OUT: cx = length displayed 223 <1> ; si -> after offset 224 <1> ; di -> after stored string 225 <1> ; CHG: ax, dx 226 0000349A 51 <1> push cx 227 0000349B BF[B40A] <1> mov di, line_out 228 0000349E E8D431 <1> call bp_display_offset ; BPSIZE implied 229 000034A1 57 <1> push di 230 <1> %endif 231 000034A2 BF[DC29] <1> mov di, msg.list_bp.value 232 000034A5 AC <1> lodsb ; BPSIZE implied 233 000034A6 E8E865 <1> call hexbyte 234 <1> 235 000034A9 BA[B229] <1> mov dx, msg.list_bp.second 236 000034AC E8046B <1> call putsz 237 <1> 238 <1> %if BPSIZE == 6 || BPSIZE == 9 239 000034AF 5F <1> pop di 240 000034B0 E81466 <1> call putsline 241 000034B3 59 <1> pop cx 242 <1> %endif 243 <1> 244 000034B4 BA[D229] <1> mov dx, msg.list_bp.third 245 000034B7 E8F96A <1> call putsz 246 <1> 247 000034BA 89CA <1> mov dx, cx 248 000034BC E8F46A <1> call putsz 249 <1> 250 000034BF 5B <1> pop bx 251 000034C0 59 <1> pop cx 252 000034C1 E2A1 <1> loop .loop 253 <1> .end: 254 <1> ; mov dx, msg.list_bp_first_detected 255 <1> ; testopt [internalflags2], dif2_gg_first_detected 256 <1> ; jnz .putsz 257 000034C3 C3 <1> retn 258 <1> 259 <1> .none: 260 000034C4 BA[F029] <1> mov dx, msg.list_bp_none 261 <1> .putsz: 262 000034C7 E9E96A <1> jmp putsz 263 <1> 264 <1> .not: 265 <1> 266 <1> ; Store the address of each breakpoint into the buffer. We also 267 <1> ; make sure that there aren't too many breakpoints. (The user can 268 <1> ; specify them with 2 byte per breakpoints which gives about 128 269 <1> ; breakpoints with a full command line.) The breakpoints will only 270 <1> ; be set later when we have verified that the line contains no 271 <1> ; syntax errors and that there aren't too many breakpoints. 272 <1> ; 273 <1> ; Note: With "G AGAIN" (or the gg_repeat handler), the user 274 <1> ; can actually specify an arbitrary amount of 275 <1> ; breakpoints. However, we limit the amount. 276 <1> %if _WHILEBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 277 <1> %error WHILE buffer not large enough for gg breakpoint list 278 <1> %endif 279 000034CA BF[F00C] <1> mov di, while_buffer ; es:di -> WHILE buffer 280 000034CD 31C0 <1> xor ax, ax 281 000034CF AA <1> stosb ; counter of saved breakpoints 282 <1> gg3: 283 <1> ; dec si ; don't use skipcomm0 instead - need to restore al 284 000034D0 E8DD64 <1> call skipcomma 285 000034D3 E8B464 <1> call iseol? 286 000034D6 7442 <1> je gg4 ; if done --> 287 <1> 288 000034D8 4E <1> dec si 289 000034D9 BA[451C] <1> mov dx, msg.remember 290 000034DC E84164 <1> call isstring? 291 000034DF AC <1> lodsb 292 000034E0 7510 <1> jne @F 293 <1> 294 000034E2 E8BA64 <1> call chkeol 295 000034E5 89F9 <1> mov cx, di ; -> after last point 296 000034E7 BE[F00C] <1> mov si, while_buffer ; ds:si -> WHILE buffer 297 000034EA 29F1 <1> sub cx, si ; = size of list 298 000034EC BF[510A] <1> mov di, g_bplist.used_count 299 <1> ; es:di -> gg breakpoint list 300 000034EF F3A4 <1> rep movsb ; copy list over 301 000034F1 C3 <1> retn 302 <1> 303 <1> @@: 304 000034F2 8B1E[FE0B] <1> mov bx, word [eqladdr+4]; default segment 305 000034F6 E81B07 <1> call getlinearaddr ; get linear address into bx:dx (CHG edx) 306 000034F9 7303E95F4D <1> jc error 307 000034FE 803E[F00C]10 <1> cmp byte [while_buffer], _NUM_G_BP 308 00003503 7203E9554D <1> jae error ; can't store another breakpoint, g_bplist is full --> 309 00003508 92 <1> xchg ax, dx ; ax = low word 310 00003509 AB <1> stosw 311 0000350A 93 <1> xchg ax, bx ; to store high byte/word 312 <1> %if _PM 313 <1> stosw 314 <1> %else 315 0000350B AA <1> stosb ; bits 24-31 (dh) always zero in 21-bit addresses 316 <1> %endif 317 <1> ; BPSIZE implied 318 <1> %if BPSIZE == 6 319 0000350C A1[2045] <1> mov ax, word [bp_offset] 320 0000350F AB <1> stosw ; write offset (R86M-only 16-bit) 321 <1> %elif BPSIZE == 9 322 <1> mov ax, word [bp_offset] 323 <1> stosw 324 <1> mov ax, word [bp_offset + 2] 325 <1> stosw ; write offset (PM 32-bit) 326 <1> %endif 327 00003510 B0CC <1> mov al, 0CCh 328 00003512 AA <1> stosb ; later filled with the byte read from this address 329 00003513 FE06[F00C] <1> inc byte [while_buffer] ; increment count 330 00003517 4E <1> dec si 331 00003518 EBB6 <1> jmp short gg3 332 <1> 333 <1> gg4: 334 0000351A 89F9 <1> mov cx, di ; -> after last point 335 0000351C BE[F00C] <1> mov si, while_buffer ; ds:si -> WHILE buffer 336 0000351F 29F1 <1> sub cx, si ; = size of list 337 00003521 BF[510A] <1> mov di, g_bplist.used_count 338 <1> ; es:di -> gg breakpoint list 339 00003524 F3A4 <1> rep movsb ; copy list over 340 <1> 341 <1> %if _RH 342 00003526 E858F6 <1> call enable_rh 343 <1> %endif 344 <1> 345 00003529 F606[A800]08 <1> testopt [options3], opt3_gg_no_paging 346 0000352E 7405 <1> jz @F 347 00003530 8026[D000]F7 <1> clropt [internalflags], pagedcommand 348 <1> @@: 349 <1> 350 <1> gg5: 351 00003535 E89113 <1> call tpg_initialise_empty_auxbuff 352 <1> %if _BREAKPOINTS 353 00003538 E81004 <1> call bb_writepoints_init_reset 354 <1> ; try to write bb points 355 <1> ; (detect and write to cseip point too) 356 <1> ; If this fails, it handles the errors and tries to restore 357 <1> ; all its own points, then aborts the command. 358 <1> 359 <1> ; This call might return modeswitched. 360 <1> %endif 361 0000353B BE[510A] <1> mov si, g_bplist.used_count 362 0000353E 31C0 <1> xor ax, ax 363 00003540 AC <1> lodsb ; si-> first point 364 00003541 89C1 <1> mov cx, ax ; cx = number of saved breakpoints 365 00003543 51 <1> push cx 366 00003544 E87A05 <1> call gg_writepoints ; Store breakpoint bytes in the given locations. 367 00003547 5A <1> pop dx 368 <1> ; dx = number of points tried to write 369 <1> ; cx = number of points not written 370 00003548 7342 <1> jnc .points_set ; successful --> 371 <1> 372 <1> 373 <1> ; Failure to write to a gg breakpoint. Now the fun starts! 374 0000354A 29CA <1> sub dx, cx ; = number of points written 375 0000354C 89D1 <1> mov cx, dx 376 <1> ; We now first have to try restoring all the points we 377 <1> ; already set because they might be inside the DOS or 378 <1> ; BIOS handlers we would otherwise call. So instead of 379 <1> ; displaying errors as we detect them, all the intel is 380 <1> ; stored first until all points have been taken care of 381 <1> ; (if possible). We then display error messages. 382 <1> %if _BREAKPOINTS 383 0000354E 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 384 <1> ; reserve space for bb error info 385 <1> %endif 386 00003551 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 387 00003553 01D2 <1> add dx, dx 388 00003555 29D4 <1> sub sp, dx ; reserve space for gg error info 389 00003557 50 <1> push ax ; store error info on point that failed to be written 390 <1> 391 <1> ; The gg points were written last, so restore them first. 392 00003558 E86E04 <1> call gg_restorepoints_and_init_error_info 393 <1> %if _BREAKPOINTS 394 0000355B 51 <1> push cx 395 <1> ; Next, restore the bb points. 396 0000355C B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 397 <1> ; = index above last one to restore 398 0000355F E8B704 <1> call bb_restorepoints_and_init_error_info 399 00003562 59 <1> pop cx ; (preserve index of failed gg point) 400 <1> %endif 401 00003563 58 <1> pop ax 402 <1> 403 00003564 E88E01 <1> call put_deferred_message_silent 404 <1> ; CHG: dx 405 <1> 406 <1> ; ax = info on initially failed point 407 <1> ; cx = 0-based index of initially failed point 408 <1> ; = number of points tried to restore 409 00003567 89CE <1> mov si, cx 410 00003569 01F6 <1> add si, si 411 0000356B 01F6 <1> add si, si ; *4 412 <1> %if BPSIZE == 4 413 <1> %elif BPSIZE == 5 414 <1> add si, cx ; * 5 415 <1> %elif BPSIZE == 6 416 0000356D 01CE <1> add si, cx ; * 5 417 0000356F 01CE <1> add si, cx ; * 6 418 <1> %elif BPSIZE == 9 419 <1> add si, si ; * 8 420 <1> add si, cx ; * 9 421 <1> %else 422 <1> %error Unexpected breakpoint size 423 <1> %endif 424 00003571 81C6[520A] <1> add si, g_bplist.bp 425 <1> 426 <1> ; si-> point 427 <1> ; ax = info (ah = reason, al = new value if reason 3) 428 <1> ; cx = 0-based index of initially failed point 429 00003575 51 <1> push cx 430 00003576 FF7402 <1> push word [si + 2] 431 00003579 FF34 <1> push word [si] ; stack: linear address 432 0000357B BB0080 <1> mov bx, 8000h ; bh = 80h (gg), 433 <1> ; bl = what we tried to restore (n/a) 434 0000357E E8FC0E <1> call display_breakpoint_failure 435 00003581 59 <1> pop cx 436 00003582 E82906 <1> call gg_handlefailedrestore 437 <1> %if _BREAKPOINTS 438 00003585 E8F705 <1> call bb_handlefailedrestore 439 00003588 8D6620 <1> lea sp, [bp + (_NUM_B_BP + _NUM_SYM_BP) * 2] 440 <1> %else 441 <1> mov sp, bp 442 <1> %endif 443 <1> ; (discard bb + gg error info) 444 0000358B C3 <1> retn 445 <1> 446 <1> 447 <1> .points_set: 448 <1> ; All bb and gg points were successfully written. 449 <1> ; Next: Handle cseip case, if such a point has been detected. 450 <1> 451 <1> 452 <1> ; old cseip breakpoint handling comment: 453 <1> ; interrupt ? emuint : .isstdtrace (including DPMI hack, pushf handling) 454 <1> 455 <1> %endif ; _NUM_G_BP 456 <1> 457 <1> 458 <1> %if _NUM_G_BP || _BREAKPOINTS 459 0000358C F606[D400]10 <1> testopt [internalflags2], dif2_gg_first_detected 460 00003591 7503E90901 <1> jz .only_run ; easy case, no cseip point detected --> 461 <1> 462 <1> 463 <1> ; Enter special mode: Restore cseip breakpoint content. 464 00003596 800E[D400]02 <1> setopt [internalflags2], dif2_gg_skip_non_cseip 465 <1> 466 0000359B 89D1 <1> mov cx, dx ; = number of points set 467 <1> %if _BREAKPOINTS 468 0000359D 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 469 <1> %endif 470 000035A0 89E5 <1> mov bp, sp ; -> behind error info 471 <1> %if _NUM_G_BP 472 000035A2 89CA <1> mov dx, cx 473 000035A4 01D2 <1> add dx, dx 474 000035A6 29D4 <1> sub sp, dx 475 000035A8 E81E04 <1> call gg_restorepoints_and_init_error_info 476 <1> 477 000035AB 7326 <1> jnc .gg_restore_cseip_success 478 <1> 479 <1> 480 <1> ; Error in gg_restorepoints. Try to restore other gg, all bb. 481 <1> 482 <1> ; Exit special mode: Handle non-cseip breakpoints again. 483 000035AD 8026[D400]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 484 <1> 485 <1> ; Enter special mode: Skip cseip breakpoints. 486 000035B2 800E[D400]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 487 <1> 488 <1> ; As we already tried to restore all cseip gg points, 489 <1> ; here we skip these in the gg_restorepoints call. 490 000035B7 E81204 <1> call gg_restorepoints 491 <1> 492 <1> ; Exit special mode: No longer skip cseip breakpoints. 493 000035BA 8026[D400]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 494 <1> 495 <1> ; Any cseip bb points aren't yet restored, so do not skip them. 496 <1> %if _BREAKPOINTS 497 000035BF 51 <1> push cx 498 000035C0 B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 499 000035C3 E85304 <1> call bb_restorepoints_and_init_error_info 500 000035C6 59 <1> pop cx 501 <1> %endif 502 <1> %else 503 <1> jmp .gg_restore_cseip_success 504 <1> %endif 505 <1> 506 <1> .gg_bb_cseip_fail_common: 507 <1> ; The failure that led us here is already noted in the info. 508 <1> %if _NUM_G_BP 509 000035C7 E8E405 <1> call gg_handlefailedrestore 510 <1> %endif 511 <1> %if _BREAKPOINTS 512 000035CA E8B205 <1> call bb_handlefailedrestore 513 <1> %endif 514 <1> %if _NUM_G_BP 515 <1> %if _BREAKPOINTS 516 000035CD 8D6620 <1> lea sp, [bp + (_NUM_B_BP + _NUM_SYM_BP) * 2] 517 <1> %else 518 <1> mov sp, bp 519 <1> %endif 520 <1> %elif _BREAKPOINTS 521 <1> add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 522 <1> %endif 523 000035D0 E92DCA <1> jmp cmd3 524 <1> 525 <1> .gg_restore_cseip_success: 526 <1> %if _BREAKPOINTS 527 000035D3 B91000 <1> mov cx, (_NUM_B_BP + _NUM_SYM_BP) 528 <1> ; = index above last one to restore 529 000035D6 E84004 <1> call bb_restorepoints_and_init_error_info 530 000035D9 7322 <1> jnc @F ; no error ? --> 531 <1> 532 <1> ; Error in bb_restorepoints. Try to restore other gg, other bb. 533 <1> 534 <1> ; Exit special mode: Handle non-cseip breakpoints again. 535 000035DB 8026[D400]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 536 <1> 537 <1> ; Enter special mode: Skip cseip breakpoints. 538 000035E0 800E[D400]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 539 <1> 540 <1> ; As we already tried to restore all cseip gg and bb points, 541 <1> ; here we skip these in the bb_restorepoints call. 542 <1> %if _NUM_G_BP 543 000035E5 31C9 <1> xor cx, cx 544 000035E7 8A0E[510A] <1> mov cl, byte [g_bplist.used_count] 545 000035EB E8DE03 <1> call gg_restorepoints 546 000035EE 51 <1> push cx 547 <1> %endif 548 000035EF B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 549 000035F2 E82704 <1> call bb_restorepoints 550 <1> %if _NUM_G_BP 551 000035F5 59 <1> pop cx 552 <1> %endif 553 <1> 554 <1> ; Exit special mode: No longer skip cseip breakpoints. 555 000035F6 8026[D400]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 556 <1> 557 000035FB EBCA <1> jmp .gg_bb_cseip_fail_common 558 <1> 559 <1> @@: 560 <1> ; Success! Now discard the reserved error info. 561 000035FD 8D6620 <1> lea sp, [bp + (_NUM_B_BP + _NUM_SYM_BP) * 2] 562 <1> %else 563 <1> mov sp, bp 564 <1> %endif 565 <1> 566 <1> ; Special mode restoration handled. Now trace one instruction. 567 <1> ; (Proceed if repeated string op or interrupt.) 568 <1> %if _PM 569 <1> call resetmode 570 <1> %endif 571 00003600 E8FC12 <1> call seteq ; make the = operand take effect 572 00003603 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 573 00003606 8B1E[D00C] <1> mov bx, word [reg_cs] 574 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 575 0000360A 8B36[DC0C] <1> mov si, word [reg_eip] 576 <1> .pp2: 577 0000360E E8AA0F <1> call pp16 ; get next instruction byte into AL 578 00003611 BF[6411] <1> mov di, ppbytes 579 00003614 B91900 <1> mov cx, PPLEN_ONLY_STRING 580 <1> %if _SYMBOLIC 581 <1> mov byte [pp_instruction], al 582 <1> %endif 583 00003617 F2AE <1> repne scasb 584 00003619 7521 <1> jne .not_p ; if not one of these --> 585 0000361B 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 586 0000361E A880 <1> test al, PP_PREFIX ; prefix ? 587 00003620 740E <1> jz .pp3 ; no --> 588 00003622 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 589 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 590 <1> ; between decoding as O32 and O16, they're always 591 <1> ; decoded as O32. The same is true for A32, and 592 <1> ; in a 32-bit cs for O16 and A16. 593 00003624 FECA <1> dec dl 594 00003626 75E6 <1> jnz .pp2 ; if not out of bytes --> 595 00003628 C706[FC00][882B] <1> mov word [gg_deferred_message], msg.warnprefix 596 0000362E EB0C <1> jmp .not_p 597 <1> 598 <1> ; A repeatable string instruction is to be decoded. 599 <1> ; Finish the decoding and skip the appropriate number 600 <1> ; of opcode bytes. 601 <1> .pp3: 602 <1> _386_PM call pp_fix32bitflags 603 00003630 A847 <1> test al, PP_VARSIZ | PP_SIZ_MASK 604 00003632 7403E9264C <1> jnz error 605 <1> %if 0 606 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 607 <1> jz .ignoreosize ; no --> 608 <1> and dh, 2 609 <1> add al, dh 610 <1> .ignoreosize: 611 <1> and ax, PP_SIZ_MASK 612 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 613 <1> _386_PM_o32 ; add esi, eax 614 <1> add si, ax 615 <1> %endif 616 <1> ; pp10: 617 <1> %if _SYMBOLIC 618 <1> call pp3_check_symhints 619 <1> jc .not_p ; trace --> 620 <1> %endif 621 <1> ; jmp short pp11 ; we have a skippable instruction here 622 <1> ; pp11: 623 <1> _386_PM call test_d_b_bit 624 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 625 <1> _386_PM movzx esi, si ; clear high word here 626 <1> .32: 627 00003637 E8EB0E <1> call proceedbreakpoint ; run until the breakpoint is hit 628 <1> ; This call might return modeswitched. 629 0000363A EB03 <1> jmp short @F 630 <1> 631 <1> .not_p: 632 0000363C E8070A <1> call traceone ; call common code 633 <1> @@: 634 0000363F 9C <1> pushf 635 <1> 636 <1> ; Exit special mode, do not skip non-cseip breakpoints anymore. 637 00003640 8026[D400]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 638 <1> 639 <1> ; Enter special mode: Skip matching/restoring cseip breakpoint. 640 00003645 800E[D400]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 641 <1> 642 0000364A F6C47F <1> test ah, 7Fh ; error happened during proceedbreakpoint ? 643 0000364D 743D <1> jz @F ; no --> 644 <1> 645 0000364F 59 <1> pop cx ; (discard flags on stack) 646 <1> 647 <1> %if _NUM_G_BP 648 00003650 31C9 <1> xor cx, cx 649 00003652 8A0E[510A] <1> mov cl, byte [g_bplist.used_count] 650 <1> %endif 651 <1> 652 <1> %if _BREAKPOINTS 653 00003656 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 654 <1> ; reserve space for bb error info 655 <1> %endif 656 00003659 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 657 <1> %if _NUM_G_BP 658 0000365B 89CA <1> mov dx, cx 659 0000365D 01D2 <1> add dx, dx 660 0000365F 29D4 <1> sub sp, dx ; reserve space for gg error info 661 <1> %endif 662 00003661 50 <1> push ax 663 <1> %if _NUM_G_BP 664 00003662 E86403 <1> call gg_restorepoints_and_init_error_info 665 <1> %endif 666 <1> %if _BREAKPOINTS 667 00003665 51 <1> push cx 668 00003666 B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 669 00003669 E8AD03 <1> call bb_restorepoints_and_init_error_info 670 0000366C 59 <1> pop cx 671 <1> %endif 672 <1> ; Exit special mode: No longer skip cseip breakpoints. 673 0000366D 8026[D400]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 674 00003672 58 <1> pop ax 675 00003673 51 <1> push cx 676 <1> 677 <1> %if _PM 678 <1> call resetmode 679 <1> %endif 680 00003674 E87E00 <1> call put_deferred_message_silent 681 <1> 682 00003677 FF36[0201] <1> push word [tpg_proceed_bp + 2] 683 0000367B FF36[0001] <1> push word [tpg_proceed_bp] 684 0000367F 8A1E[0501] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 685 00003683 B700 <1> mov bh, 0 ; proceed breakpoint 686 00003685 E8F50D <1> call display_breakpoint_failure 687 00003688 59 <1> pop cx 688 00003689 E93BFF <1> jmp .gg_bb_cseip_fail_common 689 <1> 690 <1> 691 <1> @@: 692 0000368C 9D <1> popf ; CF 693 <1> 694 0000368D 7218 <1> jc .after_run ; an unexpected interrupt occured --> 695 <1> 696 0000368F E83A00 <1> call .after_run_restore ; restore stuff 697 00003692 E83B02 <1> call gg_bb_check_hit ; expected interrupt matches our gg or bb ? 698 00003695 731E <1> jnc .expectedinterrupt ; yes, handle expected interrupt --> 699 <1> 700 <1> 701 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 702 00003697 8026[D400]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 705 0000369C E996FE <1> jmp gg5 ; next write all points and run --> 706 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 707 <1> 708 <1> .only_run: 709 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 710 0000369F 8026[D400]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 713 <1> 714 000036A4 E8A40F <1> call run ; Now run the program. 715 <1> .after_run: 716 <1> %if _NUM_G_BP || _BREAKPOINTS 717 000036A7 E82200 <1> call .after_run_restore 718 <1> 719 000036AA E82302 <1> call gg_bb_check_hit 720 <1> .after_gg_bb_check_hit: 721 000036AD 7306 <1> jnc .expectedinterrupt 722 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 723 <1> .unexpectedinterrupt: 724 <1> %if _PM 725 <1> call resetmode 726 <1> %endif 727 000036AF E84300 <1> call put_deferred_message_silent 728 000036B2 E95509 <1> jmp unexpectedinterrupt ; print messages for unexpected breakpoint and quit. 729 <1> 730 <1> %if _NUM_G_BP || _BREAKPOINTS 731 <1> .expectedinterrupt: 732 000036B5 E85F00 <1> call adjust_cseip_after_breakpoint 733 <1> ; it's one of our breakpoints, adjust (e)ip 734 <1> 735 000036B8 89C1 <1> mov cx, ax ; handle_bb_* expects flags in cx 736 000036BA 50 <1> push ax 737 000036BB 50 <1> push ax ; handle_bb_* expects dword counter on stack 738 000036BC E8A007 <1> call handle_bb_hit_pass_match 739 000036BF 58 <1> pop ax 740 000036C0 58 <1> pop ax ; discard 741 000036C1 7203E96FFE <1> jnc gg5 ; if it was a pass non-hit or non-pass non-hit 742 <1> ; then jump back to do a subsequent G step 743 <1> ; If jumping, the function has set up gg_first_cseip_linear 744 <1> ; with the current CS:(E)IP so that the next step will start 745 <1> ; out with skipping past the breakpoint(s) on that address. 746 <1> ; Note that gg_bb_check_hit returns ax = 7 if a gg point is 747 <1> ; hit, so we always fall through to .actual_hit here. 748 <1> 749 <1> .actual_hit: 750 <1> %if _PM 751 <1> call resetmode 752 <1> %endif 753 000036C6 E82C00 <1> call put_deferred_message_silent 754 <1> ; (put bb message after gg_bb_check_hit call) 755 000036C9 E9A00C <1> jmp dumpregs_extended_silent 756 <1> ; (handles sf_(double_)ctrl_c) 757 <1> %endif 758 <1> 759 <1> 760 <1> .after_run_restore: 761 <1> %if _NUM_G_BP || _BREAKPOINTS 762 000036CC 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 763 <1> ; reserve space for bb error info 764 000036CF 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 765 <1> %if _NUM_G_BP 766 000036D1 31C9 <1> xor cx, cx 767 000036D3 8A0E[510A] <1> mov cl, byte [g_bplist.used_count] 768 000036D7 89CA <1> mov dx, cx 769 000036D9 01D2 <1> add dx, dx 770 000036DB 29D4 <1> sub sp, dx ; reserve space for gg error info 771 000036DD E8E902 <1> call gg_restorepoints_and_init_error_info 772 <1> ; try restoring gg points, and fill error info 773 <1> %endif 774 <1> %if _BREAKPOINTS 775 000036E0 51 <1> push cx 776 000036E1 B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 777 <1> ; = index above last one to restore 778 000036E4 E83203 <1> call bb_restorepoints_and_init_error_info 779 <1> ; try restoring bb points, and fill error info 780 000036E7 59 <1> pop cx 781 <1> %endif 782 <1> 783 <1> %if _PM 784 <1> call resetmode 785 <1> %endif 786 000036E8 E80A00 <1> call put_deferred_message_silent 787 <1> 788 <1> %if _NUM_G_BP 789 000036EB E8C004 <1> call gg_handlefailedrestore 790 <1> ; handle gg point restore failures 791 <1> %endif 792 <1> %if _BREAKPOINTS 793 000036EE E88E04 <1> call bb_handlefailedrestore 794 <1> ; handle bb point restore failures 795 <1> %endif 796 <1> %if _NUM_G_BP 797 <1> %if _BREAKPOINTS 798 000036F1 8D6620 <1> lea sp, [bp + (_NUM_B_BP + _NUM_SYM_BP) * 2] 799 <1> %else 800 <1> mov sp, bp ; remove the stack frame 801 <1> %endif 802 <1> %else 803 <1> add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 804 <1> %endif 805 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 806 000036F4 C3 <1> retn 807 <1> 808 <1> 809 <1> ; INP: word [gg_deferred_message] 810 <1> ; word [bb_deferred_message_in_lineout_behind] 811 <1> ; OUT: variables reset to msg.empty_message 812 <1> ; messages displayed; first the gg one then the bb one 813 <1> ; CHG: dx 814 <1> ; STT: ds = es = ss 815 <1> ; 816 <1> ; Note: Uses putsz_silent and putsline_silent, meaning 817 <1> ; if silent mode is enabled, the messages are 818 <1> ; written to the silent buffer instead of displayed. 819 <1> put_deferred_message_silent: 820 000036F5 BA[122A] <1> mov dx, msg.empty_message 821 000036F8 8716[FC00] <1> xchg dx, word [gg_deferred_message] 822 000036FC E8BF08 <1> call putsz_silent 823 000036FF BA[DE3F] <1> mov dx, putsline_silent 824 <1> 825 <1> ; INP: dx = puts function to call, CHG ax, bx, cx, dx, di 826 <1> ; CHG: dx 827 <1> ; STT: ds = es = ss 828 <1> put_bb_deferred_message_calling_dx: 829 00003702 57 <1> push di 830 00003703 31FF <1> xor di, di 831 00003705 873E[FE00] <1> xchg di, word [bb_deferred_message_in_lineout_behind] 832 00003709 85FF <1> test di, di 833 0000370B 7408 <1> jz @F 834 0000370D 50 <1> push ax 835 0000370E 53 <1> push bx 836 0000370F 51 <1> push cx 837 00003710 FFD2 <1> call dx 838 00003712 59 <1> pop cx 839 00003713 5B <1> pop bx 840 00003714 58 <1> pop ax 841 <1> @@: 842 00003715 5F <1> pop di 843 00003716 C3 <1> retn 844 <1> 845 <1> 846 <1> ; INP: [internalflags2] & dif2_tpg_adjusted_cseip 847 <1> ; [internalflags2] & dif2_tpg_do_not_adjust 848 <1> ; word [reg_cs] 849 <1> ; (d)word [reg_eip] 850 <1> ; OUT: If both flags clear on input, 851 <1> ; set [internalflags2] & dif2_tpg_adjusted_cseip 852 <1> ; cs:(e)ip adjusted by decrementing (e)ip 853 <1> ; (It is only decremented by the first call to this 854 <1> ; function, which sets the flag in dif2.) 855 <1> ; Else, 856 <1> ; do nothing 857 <1> ; CHG: bx 858 <1> ; STT: ds = ss = debugger data selector 859 <1> adjust_cseip_after_breakpoint: 860 00003717 F606[D500]06 <1> testopt [internalflags2], dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust 862 0000371C 7509 <1> jnz .retn 863 0000371E 800E[D500]02 <1> setopt [internalflags2], dif2_tpg_adjusted_cseip 864 <1> _386_PM mov bx, word [reg_cs] 865 <1> _386_PM call resetmode_and_test_d_b_bit 866 <1> _386_PM jz .16 ; 16-bit cs --> 867 <1> _386_PM o32 ; dec dword [reg_eip] 868 <1> .16: 869 00003723 FF0E[DC0C] <1> dec word [reg_eip] ; re-execute (restored) opcode one byte in front of this 870 <1> .retn: 871 00003727 C3 <1> retn 872 <1> 873 <1> 874 <1> %ifn _BREAKPOINTS 875 <1> bb_check_hit: 876 <1> xor ax, ax 877 <1> stc 878 <1> retn 879 <1> %else 880 <1> ; INP: word [run_int] 881 <1> ; word [reg_cs] 882 <1> ; (d)word [reg_eip] 883 <1> ; bb breakpoints 884 <1> ; OUT: NC if a breakpoint was hit, 885 <1> ; (e)ip must be decremented by one 886 <1> ; word [bb_deferred_message_in_lineout_behind] set 887 <1> ; and line_out written if bb point matched 888 <1> ; (The bb point's index is already written to this msg.) 889 <1> ; ax & 1 set if non-pass match (actual hit), 890 <1> ; else ax & 2 set if pass match (consider as hit first, 891 <1> ; but dump registers next (not to silent buffer) 892 <1> ; and then continue execution) 893 <1> ; else ax & 4 always set, indicates any match 894 <1> ; (including matches that should merely continue) 895 <1> ; all pass points' counters stepped 896 <1> ; CY if no breakpoint was hit, 897 <1> ; ax = 0 898 <1> ; CHG: all 899 <1> ; STT: es = ds = ss 900 <1> bb_check_hit: 901 <1> lframe near 902 00003728 5589E5 <1> lenter 903 0000372B 31C0 <1> xor ax, ax 904 <1> lequ 1, flag_trigger 905 <1> lequ 2, flag_pass 906 <1> lequ 4, flag_match 907 <1> lvar word, flags 908 0000372D 50 <1> push ax 909 <1> 910 <1> ; Finish up. Check if it was one of _our_ breakpoints. 911 0000372E 813E[000C][3839] <1> cmp word [run_int], int3msg 912 00003734 7505 <1> jne @F ; if not interrupt 03h --> 913 <1> 914 <1> ; Get previous cs:eip (where breakpoint was executed if any at all). 915 00003736 E82905 <1> call get_cseip_of_possible_breakpoint 916 <1> ; dx:ax = linear address of previous cs:eip 917 <1> ; bx = reg_cs 918 00003739 EB15 <1> jmp .check 919 <1> 920 <1> @@: 921 <1> ; For T/TP/P: if trace interrupt fired just while 922 <1> ; pointing at a bb point, do match. 923 0000373B 813E[000C][1539] <1> cmp word [run_int], int1msg 924 00003741 7403E95101 <1> jne .gg9 925 <1> 926 00003746 800E[D500]04 <1> setopt [internalflags2], dif2_tpg_do_not_adjust 927 <1> ; remember that we should not adjust 928 <1> _386_PM_o32 929 0000374B 31C9 <1> xor cx, cx 930 0000374D E89704 <1> call get_cseip_ecx_linear 931 <1> ; get linear of this cs:(e)ip 932 <1> .check: 933 00003750 7303E94201 <1> jc .gg9 934 <1> 935 <1> ; Store the matched address (if any) here in case of non-hit 936 <1> ; match. (Ie, non-hit pass match or non-hit non-pass match.) 937 00003755 A3[F400] <1> mov word [gg_next_cseip_linear], ax 938 00003758 8916[F600] <1> mov word [gg_next_cseip_linear + 2], dx 939 <1> 940 0000375C 87DA <1> xchg bx, dx 941 0000375E 91 <1> xchg cx, ax ; bx:cx = linear address of previous cs:eip 942 0000375F 31C0 <1> xor ax, ax 943 <1> .loop: 944 00003761 53 <1> push bx 945 00003762 50 <1> push ax 946 00003763 E8792E <1> call calcpointbit ; bx = index, ah = value 947 00003766 84A7[0804] <1> test byte [b_bplist.used_mask+bx], ah 948 <1> ; (NC) 949 0000376A 7503E91601 <1> jz .next 950 0000376F 84A7[0A04] <1> test byte [b_bplist.disabled_mask+bx], ah 951 <1> ; (NC) 952 00003773 7403E90D01 <1> jnz .next 953 00003778 58 <1> pop ax 954 00003779 5B <1> pop bx 955 0000377A 53 <1> push bx 956 0000377B 50 <1> push ax 957 0000377C 89C6 <1> mov si, ax 958 0000377E 01F6 <1> add si, si 959 00003780 01F6 <1> add si, si 960 <1> %if BPSIZE == 4 961 <1> %elif BPSIZE == 5 962 <1> add si, ax 963 <1> %elif BPSIZE == 6 964 00003782 01C6 <1> add si, ax ; * 5 965 00003784 01C6 <1> add si, ax ; * 6 966 <1> %elif BPSIZE == 9 967 <1> add si, si ; * 8 968 <1> add si, ax ; * 9 969 <1> %else 970 <1> %error Unexpected breakpoint size 971 <1> %endif 972 00003786 81C6[0C04] <1> add si, b_bplist.bp ; -> point 973 <1> 974 0000378A E83C01 <1> call gg_bb_lods_bp_linear 975 <1> 976 0000378D E88D03 <1> call gg_bb_check_is_first 977 00003790 7203E9F000 <1> jnc .next 978 <1> 979 00003795 39C8 <1> cmp ax, cx 980 00003797 7403E9E900 <1> jne .next 981 0000379C 39DA <1> cmp dx, bx 982 0000379E 7403E9E200 <1> jne .next 983 <1> 984 <1> .hit: 985 000037A3 58 <1> pop ax 986 000037A4 50 <1> push ax 987 <1> 988 000037A5 804EFE04 <1> or byte [bp + ?flags], ?flag_match 989 <1> 990 <1> %if _SYMBOLIC 991 <1> cmp ax, _NUM_B_BP ; is it a symbol breakpoint ? 992 <1> jb @F ; no --> 993 <1> 994 <1> ; skip WHEN and counter handling for symbol breakpoints 995 <1> test byte [bp + ?flags], ?flag_trigger 996 <1> ; triggered yet ? 997 <1> jz .setup_trigger ; no, trigger now --> 998 <1> jmp .next ; yes, ignore --> 999 <1> 1000 <1> @@: 1001 <1> %endif 1002 000037A9 89C7 <1> mov di, ax 1003 000037AB 01FF <1> add di, di 1004 <1> 1005 000037AD 8BB5[AC04] <1> mov si, [b_bplist.when + di] 1006 <1> ; si -> condition 1007 000037B1 85F6 <1> test si, si ; any ? 1008 000037B3 741B <1> jz @F ; no --> 1009 <1> %if _PM 1010 <1> call resetmode 1011 <1> %endif 1012 000037B5 FF36[660B] <1> push word [rc] 1013 000037B9 8F06[680B] <1> pop word [priorrc] 1014 000037BD AC <1> lodsb 1015 000037BE E8B65B <1> nearcall getexpression ; parse stored expression 1016 000037C1 E8DB61 <1> call chkeol 1017 000037C4 E8D354 <1> nearcall toboolean ; get boolean 1018 000037C7 85D2 <1> test dx, dx ; true ? 1019 000037C9 7503E9B700 <1> jz .next ; no, skip --> 1020 000037CE 58 <1> pop ax 1021 000037CF 50 <1> push ax 1022 <1> @@: 1023 <1> 1024 000037D0 8D9D[6C04] <1> lea bx, [b_bplist.counter + di] 1025 <1> ; word [bx] = this matched point's counter 1026 <1> 1027 000037D4 F646FE03 <1> test byte [bp + ?flags], ?flag_trigger | ?flag_pass 1028 000037D8 7413 <1> jz @F ; none set yet ? --> 1029 000037DA E8C900 <1> call step_pass_counter ; step counter even if already matched 1030 000037DD 7203E9A300 <1> jnc .next ; (either is already set, so additional 1031 <1> ; setting of ?flag_pass is skipped) 1032 000037E2 F646FE01 <1> test byte [bp + ?flags], ?flag_trigger 1033 000037E6 7403E99A00 <1> jnz .next ; (trigger is already set, so skip triggering) 1034 000037EB EB05 <1> jmp .setup_trigger ; triggered (after previous pass match) 1035 <1> 1036 <1> @@: 1037 000037ED E8B600 <1> call step_pass_counter ; step counter of matched point, no flag yet 1038 000037F0 7340 <1> jnc .check_pass ; not triggered, check for pass match --> 1039 <1> 1040 <1> .setup_trigger: 1041 <1> ; Trigger! (And the first detected triggering point.) 1042 000037F2 804EFE01 <1> or byte [bp + ?flags], ?flag_trigger 1043 <1> 1044 000037F6 51 <1> push cx 1045 000037F7 BF[B40A] <1> mov di, line_out 1046 000037FA BE[B227] <1> mov si, msg.bb_hit.1 1047 <1> %if _SYMBOLIC 1048 <1> cmp ax, _NUM_B_BP 1049 <1> jb @F 1050 <1> mov si, msg.bb_sym_hit.1 1051 <1> @@: 1052 <1> %endif 1053 000037FD E89E00 <1> call copy_single_counted_string 1054 <1> ; (If _SYMBOLIC=0) Now si -> msg.bb_hit.2.nocounter 1055 <1> ; (If _SYMBOLIC=1) Now si -> msg.bb_hit.2.nocounter 1056 <1> ; or si -> msg.bb_sym_hit.2.nocounter 1057 <1> 1058 <1> 1059 00003800 89C2 <1> mov dx, ax 1060 <1> %if _SYMBOLIC 1061 <1> cmp ax, _NUM_B_BP 1062 <1> jb @F 1063 <1> sub ax, _NUM_B_BP 1064 <1> call hexbyte ; store index of this point 1065 <1> jmp @FF ; skip counter dump --> 1066 <1> 1067 <1> @@: 1068 <1> %endif 1069 <1> ; Store breakpoint index in message. 1070 00003802 E88C62 <1> call hexbyte ; store index of this point 1071 <1> 1072 <1> ; Get counter of this breakpoint. 1073 00003805 8B07 <1> mov ax, word [bx] 1074 <1> 1075 <1> ; Is it equal to default ? 1076 00003807 3D0080 <1> cmp ax, 8000h 1077 0000380A 7409 <1> je @F ; yes, skip --> 1078 <1> 1079 0000380C BE[EC27] <1> mov si, msg.bb_hit.2.counter 1080 0000380F E88C00 <1> call copy_single_counted_string 1081 <1> ; Now si -> msg.bb_hit.3.counter.no_id 1082 <1> 1083 <1> ; Store counter in message. 1084 00003812 E87562 <1> call hexword 1085 <1> 1086 <1> @@: 1087 00003815 F606[D400]08 <1> testopt [internalflags2], dif2_gg_is_gg 1088 0000381A 7407 <1> jz @F 1089 0000381C F606[A200]08 <1> testopt [options], gg_bb_hit_no_repeat 1090 00003821 EB05 <1> jmp @FF 1091 <1> @@: 1092 00003823 F606[A200]10 <1> testopt [options], tp_bb_hit_no_repeat 1093 <1> @@: 1094 00003828 7406 <1> jz @F 1095 0000382A C706[020C][F504] <1> mov word [lastcmd], dmycmd 1096 <1> @@: 1097 00003830 EB1D <1> jmp .trigger_common 1098 <1> 1099 <1> 1100 <1> .check_pass: 1101 00003832 7451 <1> jz .next ; no pass match ? --> 1102 <1> 1103 00003834 804EFE02 <1> or byte [bp + ?flags], ?flag_pass 1104 <1> 1105 00003838 51 <1> push cx 1106 00003839 BF[B40A] <1> mov di, line_out 1107 0000383C BE[CF27] <1> mov si, msg.bb_pass.1 1108 0000383F E85C00 <1> call copy_single_counted_string 1109 <1> ; Now si -> msg.bb_pass.2 1110 <1> 1111 00003842 89C2 <1> mov dx, ax 1112 <1> ; Store breakpoint index in message. 1113 00003844 E84A62 <1> call hexbyte ; store index of this point 1114 <1> 1115 00003847 E85400 <1> call copy_single_counted_string 1116 <1> ; Now si -> msg.bb_pass.3.no_id 1117 <1> 1118 <1> ; Get counter of this breakpoint. 1119 0000384A 8B07 <1> mov ax, word [bx] 1120 <1> ; Store counter in message. 1121 0000384C E83B62 <1> call hexword 1122 <1> 1123 <1> .trigger_common: 1124 0000384F 53 <1> push bx 1125 <1> %if _SYMBOLIC 1126 <1> cmp dx, _NUM_B_BP ; symbol breakpoint ? 1127 <1> jae @F ; yes, no ID --> 1128 <1> %endif 1129 00003850 BBFFFF <1> mov bx, -1 1130 00003853 E8CF28 <1> call get_set_id_offset_length 1131 00003856 F6C7FC <1> test bh, 63 << 2 ; length nonzero ? 1132 00003859 7421 <1> jz @F ; no --> 1133 <1> 1134 <1> ; The maximum length of a short ID is based on 1135 <1> ; how much space there is after the longest message 1136 <1> ; ("Passed ..., counter=XXXX") assuming 80 columns. 1137 0000385B BE[0228] <1> mov si, msg.bb_hitpass_id.short 1138 0000385E 80FF74 <1> cmp bh, 29 << 2 ; long ? 1139 00003861 7203 <1> jb .trigger_short_id 1140 <1> ; This jump MUST be a jb, not jbe. The jbe 1141 <1> ; would not match ZR for words where the 1142 <1> ; idbuffer offset is a nonzero value. 1143 00003863 BE[FA27] <1> mov si, msg.bb_hitpass_id.long 1144 <1> .trigger_short_id: 1145 <1> 1146 00003866 E83500 <1> call copy_single_counted_string 1147 00003869 88F9 <1> mov cl, bh 1148 0000386B D0E9 <1> shr cl, 1 1149 0000386D D0E9 <1> shr cl, 1 ; cx = length 1150 0000386F 81E3FF03 <1> and bx, 1023 ; bx = offset 1151 00003873 8DB7[D004] <1> lea si, [b_bplist.idbuffer + bx] 1152 00003877 F3A4 <1> rep movsb 1153 <1> 1154 00003879 BE[F727] <1> mov si, msg.bb_hitpass_id.after 1155 <1> 1156 <1> @@: 1157 0000387C 5B <1> pop bx 1158 0000387D E81E00 <1> call copy_single_counted_string 1159 <1> 1160 00003880 893E[FE00] <1> mov word [bb_deferred_message_in_lineout_behind], di 1161 00003884 59 <1> pop cx 1162 <1> 1163 <1> .next: 1164 00003885 58 <1> pop ax 1165 00003886 5B <1> pop bx 1166 <1> 1167 00003887 40 <1> inc ax 1168 00003888 83F810 <1> cmp ax, _NUM_B_BP + _NUM_SYM_BP 1169 0000388B 7303E9D1FE <1> jb .loop 1170 <1> 1171 00003890 8B46FE <1> mov ax, word [bp + ?flags] 1172 00003893 A807 <1> test al, ?flag_pass | ?flag_trigger | ?flag_match 1173 00003895 7503 <1> jnz .return ; (NC) 1174 <1> 1175 <1> .gg9: 1176 00003897 31C0 <1> xor ax, ax 1177 00003899 F9 <1> stc 1178 <1> .return: 1179 0000389A 89EC5D <1> lleave 1180 0000389D C3 <1> retn 1181 <1> 1182 <1> 1183 <1> ; INP: byte [ds:si] = length of source string 1184 <1> ; ds:si + 1 -> source string 1185 <1> ; es:di -> destination buffer 1186 <1> ; OUT: cx = 0 1187 <1> ; ds:si -> after source string 1188 <1> ; es:di -> after written string 1189 <1> ; CHG: - 1190 <1> ; STT: UP 1191 <1> copy_single_counted_string: 1192 0000389E 91 <1> xchg ax, cx 1193 0000389F 31C0 <1> xor ax, ax 1194 000038A1 AC <1> lodsb 1195 000038A2 91 <1> xchg ax, cx 1196 000038A3 F3A4 <1> rep movsb 1197 000038A5 C3 <1> retn 1198 <1> 1199 <1> 1200 <1> ; INP: word [bx] = pass counter of this breakpoint 1201 <1> ; OUT: NC if to proceed (no trigger), 1202 <1> ; ZR if no pass message display 1203 <1> ; NZ if pass message display 1204 <1> ; CY if to trigger 1205 <1> step_pass_counter: 1206 000038A6 F707FF3F <1> test word [bx], 3FFFh ; is it already at a terminal state ? 1207 000038AA 740A <1> jz .no_decrement ; yes, do not further decrement --> 1208 000038AC FF0F <1> dec word [bx] ; decrement (to 0/4000h/8000h/C000h) 1209 000038AE 7417 <1> jz .trigger ; case for decrementing 1 to 0 --> 1210 000038B0 813F0040 <1> cmp word [bx], 4000h 1211 000038B4 7411 <1> je .trigger ; case for decrementing 4001h to 4000h 1212 <1> .no_decrement: 1213 000038B6 813F0080 <1> cmp word [bx], 8000h ; decrement resulted in 8000h 1214 000038BA 740B <1> je .trigger ; or was already in that state? --> 1215 000038BC 813F00C0 <1> cmp word [bx], 0_C000h 1216 000038C0 7405 <1> je .trigger ; or C000h --> 1217 <1> .proceed: 1218 000038C2 F6470140 <1> test byte [bx + 1], 40h ; (NC) ZR if no pass message 1219 000038C6 C3 <1> retn 1220 <1> 1221 <1> .trigger: 1222 000038C7 F9 <1> stc 1223 000038C8 C3 <1> retn 1224 <1> %endif 1225 <1> 1226 <1> 1227 <1> ; INP: si -> linear address of breakpoint 1228 <1> ; (32 bits if _PM, else 24 bits) 1229 <1> ; OUT: dx:ax = linear address of breakpoint 1230 <1> ; si -> behind linear address 1231 <1> gg_bb_lods_bp_linear: 1232 000038C9 AD <1> lodsw 1233 000038CA 92 <1> xchg ax, dx 1234 <1> %if _PM 1235 <1> lodsw 1236 <1> %else 1237 000038CB 31C0 <1> xor ax, ax 1238 000038CD AC <1> lodsb 1239 <1> %endif 1240 000038CE 92 <1> xchg ax, dx 1241 000038CF C3 <1> retn 1242 <1> 1243 <1> 1244 <1> ; INP: word [run_int] 1245 <1> ; word [reg_cs] 1246 <1> ; (d)word [reg_eip] 1247 <1> ; gg/bb breakpoints 1248 <1> ; OUT: NC if a breakpoint was hit, 1249 <1> ; (e)ip must be decremented by one 1250 <1> ; word [bb_deferred_message_in_lineout_behind] set 1251 <1> ; and line_out written if bb point matched 1252 <1> ; (The bb point's index is already written to this msg.) 1253 <1> ; ax = 7 if non-bb match, else 1254 <1> ; ax & 1 set if non-pass match (actual hit), 1255 <1> ; else ax & 2 set if pass match (consider as hit first, 1256 <1> ; but dump registers next (not to silent buffer) 1257 <1> ; and then continue execution) 1258 <1> ; else ax & 4 always set, indicates any match 1259 <1> ; (including matches that should merely continue) 1260 <1> ; all pass points' counters stepped 1261 <1> ; CY if no breakpoint was hit, 1262 <1> ; ax = 0 1263 <1> ; CHG: all 1264 <1> ; STT: es = ds = ss 1265 <1> gg_bb_check_hit: 1266 000038D0 E855FE <1> call bb_check_hit 1267 000038D3 720D <1> jc .gg_check_hit 1268 <1> 1269 000038D5 A801 <1> test al, 1 ; actual bb hit ? 1270 000038D7 7507 <1> jnz .ret_NC ; yes, return as hit 1271 <1> 1272 000038D9 50 <1> push ax ; bb is pass match or any other match, 1273 000038DA E80500 <1> call gg_check_hit ; is gg a match ? 1274 000038DD 58 <1> pop ax 1275 000038DE 732D <1> jnc gg_check_hit.hit ; yes --> (set NC, ax = 7) 1276 <1> 1277 <1> ; Here, we return the flags 2 (set if pass match) and 1278 <1> ; 4 (always set, indicating any match). 1279 <1> 1280 <1> .ret_NC: 1281 000038E0 F8 <1> clc 1282 000038E1 C3 <1> retn 1283 <1> 1284 <1> .gg_check_hit: 1285 <1> ; (fall through) 1286 <1> 1287 <1> %ifn _NUM_G_BP 1288 <1> gg_check_hit: 1289 <1> stc 1290 <1> retn 1291 <1> %else 1292 <1> ; INP: word [run_int] 1293 <1> ; word [reg_cs] 1294 <1> ; (d)word [reg_eip] 1295 <1> ; bb breakpoints 1296 <1> ; OUT: NC if a breakpoint was hit, 1297 <1> ; (e)ip must be decremented by one 1298 <1> ; ax = 7 1299 <1> ; CY if no breakpoint was hit, 1300 <1> ; ax = 0 1301 <1> ; CHG: all 1302 <1> ; STT: es = ds = ss 1303 <1> gg_check_hit: 1304 <1> ; Finish up. Check if it was one of _our_ breakpoints. 1305 000038E2 813E[000C][3839] <1> cmp word [run_int], int3msg 1306 000038E8 752D <1> jne .gg9 ; if not interrupt 03h --> 1307 <1> 1308 <1> ; Get previous cs:eip (where breakpoint was executed if any at all). 1309 000038EA E87503 <1> call get_cseip_of_possible_breakpoint 1310 <1> ; dx:ax = linear address of previous cs:eip 1311 000038ED 7228 <1> jc .gg9 1312 000038EF BE[520A] <1> mov si, g_bplist.bp 1313 000038F2 31C9 <1> xor cx, cx 1314 000038F4 8A4CFF <1> mov cl, byte [si-1] ; number of saved breakpoints 1315 000038F7 E31E <1> jcxz .gg9 ; none, so always unexpected --> 1316 <1> 1317 000038F9 89C7 <1> mov di, ax 1318 000038FB 89D3 <1> mov bx, dx ; bx:di = linear address of previous cs:(e)ip 1319 <1> 1320 <1> .loop_gg6: 1321 000038FD E8C9FF <1> call gg_bb_lods_bp_linear 1322 <1> 1323 00003900 E81A02 <1> call gg_bb_check_is_first 1324 00003903 730D <1> jnc .next 1325 <1> 1326 00003905 39DA <1> cmp dx, bx 1327 00003907 7509 <1> jne .next 1328 00003909 39F8 <1> cmp ax, di 1329 0000390B 7505 <1> jne .next 1330 <1> 1331 <1> .hit: 1332 0000390D B80700 <1> mov ax, 7 1333 00003910 F8 <1> clc 1334 00003911 C3 <1> retn 1335 <1> 1336 <1> .next: 1337 <1> 1338 <1> %if BPSIZE == 4 || BPSIZE == 5 1339 <1> inc si ; skip saved (actually CCh) byte 1340 <1> %elif BPSIZE == 6 1341 00003912 83C603 <1> add si, 3 ; skip word offset and byte content 1342 <1> %elif BPSIZE == 9 1343 <1> add si, 5 ; skip dword offset and byte content 1344 <1> %endif 1345 <1> ; BPSIZE implied 1346 00003915 E2E6 <1> loop .loop_gg6 ; try next if there's any 1347 <1> 1348 <1> .gg9: 1349 00003917 31C0 <1> xor ax, ax 1350 00003919 F9 <1> stc 1351 0000391A C3 <1> retn 1352 <1> %endif 1353 <1> 1354 <1> 1355 <1> %if _DELAY_BEFORE_BP 1356 <1> delay_before_bp: 1357 0000391B F606[AB00]04 <1> testopt [options3], opt3_delay_before_bp 1358 00003920 7428 <1> jz .ret 1359 00003922 F606[DA00]80 <1> testopt [internalflags3], dif3_delayed 1360 00003927 7521 <1> jnz .ret 1361 00003929 800E[DA00]80 <1> setopt [internalflags3], dif3_delayed 1362 0000392E 06 <1> push es 1363 0000392F 57 <1> push di 1364 00003930 50 <1> push ax 1365 00003931 BF4000 <1> mov di, 40h ; dual mode segment/selector 1366 00003934 8EC7 <1> mov es, di 1367 00003936 268B3E6C00 <1> mov di, word [es:6Ch] 1368 <1> @@: 1369 0000393B 263B3E6C00 <1> cmp di, word [es:6Ch] 1370 00003940 7505 <1> jne @F 1371 00003942 E8AD69 <1> call idle 1372 00003945 EBF4 <1> jmp @B 1373 <1> @@: 1374 00003947 58 <1> pop ax 1375 00003948 5F <1> pop di 1376 00003949 07 <1> pop es 1377 <1> .ret: 1378 0000394A C3 <1> retn 1379 <1> %endif 1380 <1> 1381 <1> 1382 <1> %if _BREAKPOINTS 1383 <1> bb_writepoints_init_reset: 1384 0000394B BF[0C04] <1> mov di, b_bplist.bp 1385 0000394E B0CC <1> mov al, 0CCh 1386 00003950 B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 1387 <1> .loop: 1388 00003953 83C705 <1> add di, BPSIZE - 1 1389 00003956 AA <1> stosb 1390 00003957 E2FA <1> loop .loop 1391 <1> 1392 <1> ; This is called first by gg before writing any of the 1393 <1> ; gg points. So, if it fails, it only needs to restore 1394 <1> ; its own points, not any of the gg points. 1395 <1> ; This is also called deep down in run_with_bb when called 1396 <1> ; from tt or pp. In this case, there may be a proceed 1397 <1> ; breakpoint already written. On failure, after having 1398 <1> ; restored all yet-written bb points, this proceed 1399 <1> ; breakpoint is restored too. 1400 <1> ; Symbolic branch: This initialises symbol breakpoints. 1401 <1> ; 1402 <1> ; INP: bb breakpoints 1403 <1> ; tpg_proceed_bp 1404 <1> ; OUT: does not return if an error occurred, 1405 <1> ; instead jumps to cmd3 1406 <1> ; STT: might return modeswitched 1407 <1> bb_writepoints_init: 1408 <1> %if _SYMBOLIC 1409 <1> nearcall zz_detect_xms ; re-detect XMS if used after run 1410 <1> 1411 <1> mov dx, word [sym_storage.main.bb.first] 1412 <1> mov bx, b_bplist.bp + _NUM_B_BP * BPSIZE 1413 <1> mov cx, _NUM_B_BP 1414 <1> jmp .sym_condition 1415 <1> 1416 <1> .sym_loop: 1417 <1> cmp cx, _NUM_B_BP + _NUM_SYM_BP 1418 <1> jb .sym_enough 1419 <1> mov dx, msg.bb_sym_too_many 1420 <1> .sym_error_putsz: 1421 <1> call putsz_error 1422 <1> mov cx, (_NUM_B_BP + _NUM_SYM_BP) 1423 <1> xor ax, ax 1424 <1> @@: 1425 <1> push ax 1426 <1> loop @B ; dummy bb error info 1427 <1> mov bp, sp 1428 <1> dec cx ; no bb write/restore failure 1429 <1> push cx 1430 <1> push cx 1431 <1> jmp .sym_error_done ; handle error (including pp restore) --> 1432 <1> 1433 <1> .sym_enough: 1434 <1> push dx 1435 <1> push ax 1436 <1> dualcall getfarpointer.main 1437 <1> pop di 1438 <1> pop es 1439 <1> 1440 <1> mov ax, word [es:di + smLinear] 1441 <1> mov word [bx], ax ; store low word of linear 1442 <1> inc bx 1443 <1> inc bx 1444 <1> mov ax, word [es:di + smLinear + 2] 1445 <1> %if BPSIZE == 5 || BPSIZE == 9 1446 <1> mov word [bx], ax ; store high word of linear 1447 <1> inc bx 1448 <1> inc bx 1449 <1> %else 1450 <1> mov byte [bx], al ; store high byte of linear 1451 <1> inc bx 1452 <1> mov dx, msg.bb_sym_beyond_linear 1453 <1> test ah, ah 1454 <1> jnz .sym_error_putsz 1455 <1> %endif 1456 <1> %if BPSIZE == 6 || BPSIZE == 9 1457 <1> mov ax, word [es:di + smOffset] 1458 <1> mov word [bx], ax ; store low word of offset 1459 <1> inc bx 1460 <1> inc bx 1461 <1> mov ax, word [es:di + smOffset + 2] 1462 <1> %if BPSIZE == 9 1463 <1> mov word [bx], ax ; store high word of offset 1464 <1> inc bx 1465 <1> inc bx 1466 <1> %else 1467 <1> mov dx, msg.bb_sym_beyond_offset 1468 <1> test ax, ax 1469 <1> jnz .sym_error_putsz 1470 <1> %endif 1471 <1> %endif 1472 <1> inc bx ; skip content byte 1473 <1> mov ax, cx 1474 <1> push bx 1475 <1> call calcpointbit 1476 <1> or byte [b_bplist.used_mask + bx], ah 1477 <1> pop bx 1478 <1> inc cx 1479 <1> mov dx, word [es:di + smSpecialNext] 1480 <1> 1481 <1> .sym_condition: 1482 <1> cmp dx, -1 1483 <1> jne .sym_loop 1484 <1> 1485 <1> jmp @FF 1486 <1> @@: 1487 <1> mov ax, cx 1488 <1> call calcpointbit 1489 <1> not ah 1490 <1> and byte [b_bplist.used_mask + bx], ah 1491 <1> inc cx 1492 <1> @@: 1493 <1> cmp cx, _NUM_B_BP + _NUM_SYM_BP 1494 <1> jb @BB 1495 <1> %endif 1496 <1> 1497 00003959 E8D500 <1> call bb_writepoints 1498 0000395C 735B <1> jnc .retn 1499 <1> 1500 0000395E 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 1501 <1> ; reserve space for bb error info 1502 00003961 89E5 <1> mov bp, sp 1503 <1> ; cx = index of failed point 1504 <1> ; = index above last one to restore 1505 <1> ; ax = error info of failed point 1506 00003963 50 <1> push ax 1507 00003964 51 <1> push cx 1508 00003965 E8B100 <1> call bb_restorepoints_and_init_error_info 1509 <1> .sym_error_done: 1510 <1> 1511 <1> bb_restorepoints_exit: equ $ 1512 <1> ; If this is not gg and T/P wrote a proceed breakpoint, 1513 <1> ; restore it here (after having restored bb points). 1514 00003968 E8A70A <1> call proceed_writepoint_restore 1515 <1> ; This call might return modeswitched. 1516 0000396B BB0000 <1> mov bx, 0 ; (preserve CF) 1517 0000396E 7305 <1> jnc @F 1518 00003970 80CC80 <1> or ah, 80h ; mark error during restoration 1519 00003973 89C3 <1> mov bx, ax ; bx & 80h set: error restoring pp 1520 <1> @@: 1521 <1> 1522 00003975 59 <1> pop cx 1523 00003976 58 <1> pop ax ; error info + index of failed point 1524 <1> 1525 00003977 89CE <1> mov si, cx 1526 00003979 01F6 <1> add si, si 1527 0000397B 01F6 <1> add si, si ; * 4 1528 <1> %if BPSIZE == 4 1529 <1> %elif BPSIZE == 5 1530 <1> add si, cx ; * 5 1531 <1> %elif BPSIZE == 6 1532 0000397D 01CE <1> add si, cx ; * 5 1533 0000397F 01CE <1> add si, cx ; * 6 1534 <1> %elif BPSIZE == 9 1535 <1> add si, si ; * 8 1536 <1> add si, cx ; * 9 1537 <1> %else 1538 <1> %error Unexpected breakpoint size 1539 <1> %endif 1540 00003981 81C6[0C04] <1> add si, b_bplist.bp ; -> point 1541 <1> 1542 00003985 53 <1> push bx 1543 <1> 1544 00003986 E86CFD <1> call put_deferred_message_silent 1545 <1> ; CHG: dx 1546 <1> 1547 00003989 83F9FF <1> cmp cx, -1 1548 0000398C 740B <1> je @F 1549 <1> 1550 <1> ; si-> point 1551 <1> ; ax = info (ah = reason, al = new value if reason 3) 1552 <1> ; cx = 0-based index of initially failed point 1553 0000398E FF7402 <1> push word [si + 2] 1554 00003991 FF34 <1> push word [si] ; stack: linear address 1555 00003993 BB0040 <1> mov bx, 4000h ; bh = 40h (bb), 1556 <1> ; bl = what we tried to restore (n/a) 1557 00003996 E8E40A <1> call display_breakpoint_failure 1558 <1> ; This function calls resetmode. 1559 <1> 1560 <1> @@: 1561 00003999 E8E301 <1> call bb_handlefailedrestore 1562 <1> ; This function calls resetmode. 1563 <1> 1564 0000399C 58 <1> pop ax 1565 0000399D F6C480 <1> test ah, 80h ; pp failed to restore ? 1566 000039A0 7411 <1> jz @F 1567 <1> 1568 000039A2 FF36[0201] <1> push word [tpg_proceed_bp + 2] 1569 000039A6 FF36[0001] <1> push word [tpg_proceed_bp] 1570 000039AA 8A1E[0501] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 1571 000039AE B700 <1> mov bh, 0 ; proceed breakpoint 1572 000039B0 E8CA0A <1> call display_breakpoint_failure 1573 <1> @@: 1574 000039B3 83C420 <1> add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 1575 <1> ; discard bb error info 1576 000039B6 E947C6 <1> jmp cmd3 1577 <1> 1578 <1> .retn: 1579 000039B9 C3 <1> retn 1580 <1> %endif 1581 <1> 1582 <1> 1583 <1> %if _NUM_G_BP 1584 <1> ; INP: ss:bp -> behind gg error info space 1585 <1> ; cx = number of error info words on stack 1586 <1> ; OUT: error info space initialised to all zeros 1587 <1> ; CHG: ax, di, es 1588 <1> ; STT: sets es to ss 1589 <1> gg_restorepoints_init_error_info: 1590 000039BA 16 <1> push ss 1591 000039BB 07 <1> pop es 1592 000039BC 89EF <1> mov di, bp ; es:di -> behind error info 1593 000039BE 51 <1> push cx 1594 000039BF 4F <1> dec di 1595 000039C0 4F <1> dec di 1596 000039C1 31C0 <1> xor ax, ax 1597 000039C3 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 1598 000039C4 F3AB <1> rep stosw ; initialize error info 1599 000039C6 FC <1> cld 1600 000039C7 59 <1> pop cx 1601 000039C8 C3 <1> retn 1602 <1> 1603 <1> 1604 <1> gg_restorepoints_and_init_error_info: 1605 000039C9 E8EEFF <1> call gg_restorepoints_init_error_info 1606 <1> 1607 <1> ; Restore gg breakpoints. 1608 <1> ; On errors remember failures but restore all remaining anyway. 1609 <1> ; 1610 <1> ; INP: cx = number of breakpoints to restore (<= 255), 1611 <1> ; assumed at beginning of g_bplist.bp 1612 <1> ; ss:bp -> behind cx words for error info 1613 <1> ; OUT: NC if all points restored successfully 1614 <1> ; CY if at least one point couldn't be restored, 1615 <1> ; error info filled, high byte: 1616 <1> ; reason = 0 = no error (this point didn't fail), 1617 <1> ; 1 = couldn't write, 1618 <1> ; 2 = unreachable, 1619 <1> ; 3 = overwritten), 1620 <1> ; low byte: new byte value (if reason 3) 1621 <1> ; CHG: ax, bx, (e)dx, si, di, es 1622 <1> ; STT: sets es to ss 1623 <1> ; might return modeswitched 1624 <1> ; 1625 <1> ; Note: The points are restored in reverse, from the last back 1626 <1> ; to the front. The first point is handled last. 1627 <1> gg_restorepoints: 1628 000039CC 89CE <1> mov si, cx 1629 000039CE 01F6 <1> add si, si 1630 000039D0 01F6 <1> add si, si ; * 4 1631 <1> %if BPSIZE == 4 1632 <1> %elif BPSIZE == 5 1633 <1> add si, cx ; * 5 1634 <1> %elif BPSIZE == 6 1635 000039D2 01CE <1> add si, cx ; * 5 1636 000039D4 01CE <1> add si, cx ; * 6 1637 <1> %elif BPSIZE == 9 1638 <1> add si, si ; * 8 1639 <1> add si, cx ; * 9 1640 <1> %else 1641 <1> %error Unexpected breakpoint size 1642 <1> %endif 1643 000039D6 81C6[4C0A] <1> add si, g_bplist.bp - BPSIZE ; -> last point in list (first to restore) 1644 <1> 1645 000039DA F8 <1> clc ; assume success 1646 000039DB 51 <1> push cx 1647 000039DC 9C <1> pushf 1648 000039DD E329 <1> jcxz .done ; nothing to do --> 1649 <1> .loop: 1650 000039DF E8E300 <1> call gg_writepoints_restore ; Restore breakpoint bytes. 1651 000039E2 7324 <1> jnc .done ; successful --> 1652 000039E4 5A <1> pop dx ; discard flags 1653 000039E5 5B <1> pop bx 1654 000039E6 53 <1> push bx 1655 000039E7 9C <1> pushf ; store (CY) flags 1656 <1> 1657 000039E8 50 <1> push ax 1658 000039E9 89F7 <1> mov di, si 1659 000039EB 81EF[580A] <1> sub di, BPSIZE+g_bplist.bp 1660 <1> %if BPSIZE == 5 || BPSIZE == 6 || BPSIZE == 9 1661 000039EF 89F8 <1> mov ax, di 1662 000039F1 31D2 <1> xor dx, dx 1663 000039F3 BF0600 <1> mov di, BPSIZE 1664 000039F6 F7F7 <1> div di 1665 000039F8 89C7 <1> mov di, ax ; di = 0-based point index 1666 000039FA D1E7 <1> shl di, 1 ; di = 0-based error info offset 1667 <1> %elif BPSIZE == 4 1668 <1> shr di, 1 ; di = 0-based error info offset 1669 <1> %else 1670 <1> %error "Unexpected BPSIZE" 1671 <1> %endif 1672 000039FC 29DF <1> sub di, bx 1673 000039FE 29DF <1> sub di, bx 1674 00003A00 8F03 <1> pop word [bp+di] ; store error info 1675 00003A02 49 <1> dec cx ; exclude the failed point 1676 00003A03 83EE0C <1> sub si, 2*BPSIZE ; -> the point _before_ failed one 1677 00003A06 EBD7 <1> jmp short .loop 1678 <1> .done: 1679 00003A08 9D <1> popf ; get flags. CY if any couldn't be restored 1680 00003A09 59 <1> pop cx ; restore cx 1681 00003A0A C3 <1> retn 1682 <1> %endif 1683 <1> 1684 <1> 1685 <1> %if _BREAKPOINTS 1686 <1> ; INP: ss:bp -> error info space (one word per bb breakpoint) 1687 <1> ; OUT: error info space initialised to all zeros 1688 <1> ; CHG: ax, di, es 1689 <1> ; STT: sets es to ss 1690 <1> ; 1691 <1> ; Note: This initialises words for all bb points. 1692 <1> ; While the value in cx is preserved, it is 1693 <1> ; assumed that space for all points is allocated. 1694 <1> bb_restorepoints_init_error_info: 1695 00003A0B 16 <1> push ss 1696 00003A0C 07 <1> pop es 1697 00003A0D 89EF <1> mov di, bp 1698 00003A0F 31C0 <1> xor ax, ax 1699 00003A11 51 <1> push cx 1700 00003A12 B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 1701 00003A15 F3AB <1> rep stosw 1702 00003A17 59 <1> pop cx 1703 00003A18 C3 <1> retn 1704 <1> 1705 <1> 1706 <1> bb_restorepoints_and_init_error_info: 1707 00003A19 E8EFFF <1> call bb_restorepoints_init_error_info 1708 <1> 1709 <1> ; Restore bb breakpoints. 1710 <1> ; On errors remember failures but restore all remaining anyway. 1711 <1> ; 1712 <1> ; INP: cx = index above last one to restore 1713 <1> ; ss:bp -> error info space (one word per bb breakpoint) 1714 <1> ; OUT: NC if all points restored successfully 1715 <1> ; CY if at least one point couldn't be restored, 1716 <1> ; error info filled, high byte: 1717 <1> ; reason = 0 = no error (this point didn't fail), 1718 <1> ; 1 = couldn't write, 1719 <1> ; 2 = unreachable, 1720 <1> ; 3 = overwritten), 1721 <1> ; low byte: new byte value (if reason 3) 1722 <1> ; CHG: ax, bx, cx, (e)dx, si, di, es 1723 <1> ; STT: sets es to ss 1724 <1> ; might return modeswitched 1725 <1> ; 1726 <1> ; Note: The points are restored in reverse, from the list back 1727 <1> ; to the front. The first point is handled last. 1728 <1> bb_restorepoints: 1729 <1> 1730 00003A1C F8 <1> clc ; assume success 1731 00003A1D 9C <1> pushf 1732 00003A1E E30F <1> jcxz .done 1733 <1> .loop: 1734 00003A20 E81400 <1> call bb_writepoints_restore 1735 00003A23 730A <1> jnc .done 1736 00003A25 5A <1> pop dx ; (discard flags) 1737 00003A26 9C <1> pushf ; store (CY) flags 1738 <1> ; cx = index of point that failed to write 1739 <1> ; ah = reason, al = new byte value (reason 3) 1740 00003A27 89CF <1> mov di, cx 1741 00003A29 01FF <1> add di, di 1742 00003A2B 8903 <1> mov word [bp + di], ax ; store error info 1743 00003A2D EBF1 <1> jmp .loop 1744 <1> 1745 <1> .done: 1746 00003A2F 9D <1> popf ; CF 1747 00003A30 C3 <1> retn 1748 <1> 1749 <1> 1750 <1> ; Loop through bb breakpoints and exchange the saved 1751 <1> ; byte with that one at the actual address. Used to write 1752 <1> ; the breakpoints. 1753 <1> ; 1754 <1> ; INP: - 1755 <1> ; OUT: NC if successful 1756 <1> ; CY if error writing a point, 1757 <1> ; cx = index of point that failed to write 1758 <1> ; (all PRIOR points were processed successfully, 1759 <1> ; either written successfully or skipped) 1760 <1> ; CHG: ax, bx, (e)dx, si, cx, di 1761 <1> ; STT: might return modeswitched 1762 <1> bb_writepoints: 1763 00003A31 31C9 <1> xor cx, cx 1764 00003A33 BF0100 <1> mov di, 1 1765 00003A36 A9 <1> db __TEST_IMM16 ; (skip xor, NC) 1766 <1> 1767 <1> ; Same, but go through the breakpoints in reverse order 1768 <1> ; and check that what we overwrite is a 0CCh byte. If so, 1769 <1> ; restore the original value. (The 0CCh is discarded.) 1770 <1> ; 1771 <1> ; INP: cx = index *above* last to write 1772 <1> ; (_NUM_B_BP + _NUM_SYM_BP for all) 1773 <1> ; OUT: NC if successful 1774 <1> ; CY if error writing a point, 1775 <1> ; cx = index of point that failed to write 1776 <1> ; ah = 1 if error because point could not be written 1777 <1> ; ah = 2 if error because address is unreachable 1778 <1> ; ah = 3 if error because point contained non-0CCh value, 1779 <1> ; al = new byte 1780 <1> ; CHG: ax, bx, (e)dx, si, cx, di 1781 <1> ; STT: might return modeswitched 1782 <1> bb_writepoints_restore: 1783 00003A37 31FF <1> xor di, di ; (NC) 1784 <1> bb_wp: 1785 <1> lframe near 1786 00003A39 5589E5 <1> lenter 1787 <1> lvar word, is_write 1788 00003A3C 57 <1> push di 1789 <1> 1790 00003A3D F646FE01 <1> test byte [bp + ?is_write], 1 1791 <1> ; (NC) is it writing ? 1792 00003A41 7458 <1> jz .next ; no, is restoring, first decrement cx --> 1793 <1> 1794 <1> .loop: 1795 00003A43 89C8 <1> mov ax, cx 1796 00003A45 E8972B <1> call calcpointbit ; bx = index, ah = value 1797 00003A48 84A7[0804] <1> test byte [b_bplist.used_mask+bx], ah 1798 <1> ; (NC) 1799 00003A4C 744D <1> jz .next 1800 00003A4E 84A7[0A04] <1> test byte [b_bplist.disabled_mask+bx], ah 1801 <1> ; (NC) 1802 00003A52 7547 <1> jnz .next 1803 <1> 1804 00003A54 89CE <1> mov si, cx 1805 00003A56 01F6 <1> add si, si 1806 00003A58 01F6 <1> add si, si ; * 4 1807 <1> %if BPSIZE == 4 1808 <1> %elif BPSIZE == 5 1809 <1> add si, cx ; * 5 1810 <1> %elif BPSIZE == 6 1811 00003A5A 01CE <1> add si, cx ; * 5 1812 00003A5C 01CE <1> add si, cx ; * 6 1813 <1> %elif BPSIZE == 9 1814 <1> add si, si ; * 8 1815 <1> add si, cx ; * 9 1816 <1> %else 1817 <1> %error Unexpected breakpoint size 1818 <1> %endif 1819 00003A5E 81C6[0C04] <1> add si, b_bplist.bp ; -> point 1820 <1> 1821 00003A62 E864FE <1> call gg_bb_lods_bp_linear 1822 <1> ; dx:ax = linear address 1823 <1> 1824 00003A65 E8B500 <1> call gg_bb_check_is_first 1825 00003A68 7331 <1> jnc .next ; (NC) 1826 <1> 1827 00003A6A E81502 <1> call getsegmented ; bx:(e)dx = segmented address 1828 <1> %if BPSIZE == 6 1829 00003A6D AD <1> lodsw ; skip word offset 1830 <1> %elif BPSIZE == 9 1831 <1> lodsw 1832 <1> lodsw ; skip dword offset 1833 <1> %endif 1834 00003A6E AC <1> lodsb ; get byte to write 1835 00003A6F B402 <1> mov ah, 2 1836 00003A71 723E <1> jc .return ; not in PM anymore/address not available --> (CY) 1837 00003A73 F646FE01 <1> test byte [bp + ?is_write], 1 1838 <1> ; writing? 1839 00003A77 7517 <1> jnz .forward_nocheck ; yes --> 1840 <1> 1841 <1> .backward_check: 1842 00003A79 50 <1> push ax 1843 00003A7A E8A23A <1> call readmem ; read current byte 1844 00003A7D 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 1845 00003A7F B483 <1> mov ah, 83h ; (80h = error occurred while restoring) 1846 00003A81 F9 <1> stc 1847 00003A82 752D <1> jne .return_discard ; nope --> (CY) 1848 00003A84 58 <1> pop ax 1849 00003A85 E8853A <1> call writemem ; return the byte to its original value 1850 00003A88 7211 <1> jc .next ; failed --> (CY, handled there) 1851 00003A8A C644FFCC <1> mov byte [si-1], 0CCh ; reset stored point 1852 00003A8E EB0B <1> jmp short .next 1853 <1> 1854 <1> .forward_nocheck: 1855 <1> %if _DELAY_BEFORE_BP 1856 00003A90 E888FE <1> call delay_before_bp 1857 <1> %endif 1858 00003A93 E8773A <1> call writemem 1859 00003A96 7203 <1> jc .next 1860 00003A98 8844FF <1> mov byte [si-1], al ; save the previous byte there 1861 <1> .next: 1862 00003A9B B401 <1> mov ah, 1 ; (in case of error) 1863 00003A9D 7212 <1> jc .return ; failed to write --> (CY) 1864 <1> 1865 00003A9F F646FE01 <1> test byte [bp + ?is_write], 1 1866 00003AA3 7505 <1> jnz .is_write_next 1867 00003AA5 49 <1> dec cx ; restore: decrement index 1868 00003AA6 799B <1> jns .loop ; decremented to 0FFFFh ? no, loop --> 1869 00003AA8 EB06 <1> jmp .return_NC 1870 <1> 1871 <1> .is_write_next: 1872 00003AAA 41 <1> inc cx ; write: increment index 1873 00003AAB 83F910 <1> cmp cx, _NUM_B_BP + _NUM_SYM_BP 1874 <1> ; above last ? 1875 00003AAE 7293 <1> jb .loop ; no, loop --> 1876 <1> .return_NC: 1877 00003AB0 F8 <1> clc 1878 <1> .return: 1879 <1> .return_discard: 1880 00003AB1 730A <1> jnc .ret 1881 <1> 1882 00003AB3 F646FE01 <1> test byte [bp + ?is_write], 1 1883 <1> ; restoring ? 1884 00003AB7 7503 <1> jnz .ret_CY ; no --> 1885 00003AB9 80CC80 <1> or ah, 80h ; error occurred while restoring 1886 <1> .ret_CY: 1887 00003ABC F9 <1> stc 1888 <1> .ret: 1889 00003ABD 89EC5D <1> lleave 1890 00003AC0 C3 <1> lret 1891 <1> %endif 1892 <1> 1893 <1> 1894 <1> %if _NUM_G_BP 1895 <1> ; Loop through saved breakpoints and exchange the saved 1896 <1> ; byte with that one at the actual address. Used to write 1897 <1> ; the breakpoints. 1898 <1> ; 1899 <1> ; INP: si-> current point 1900 <1> ; cx = number of points to write (might be zero) 1901 <1> ; OUT: NC if successful 1902 <1> ; CY if error writing a point, 1903 <1> ; cx = number of points still to write (including failed one) 1904 <1> ; (si-BPSIZE)-> point that failed 1905 <1> ; CHG: ax, bx, (e)dx, si, cx, di 1906 <1> gg_writepoints: 1907 00003AC1 BF0100 <1> mov di, 1 1908 00003AC4 A9 <1> db __TEST_IMM16 ; (skip xor, NC) 1909 <1> 1910 <1> ; Same, but go through the breakpoints in reverse order 1911 <1> ; and check that what we overwrite is a 0CCh byte. If so, 1912 <1> ; restore the original value. (The 0CCh is discarded.) 1913 <1> ; 1914 <1> ; Additionally: 1915 <1> ; OUT: CY if error writing a point, 1916 <1> ; ah = 1 if error because point could not be written 1917 <1> ; ah = 2 if error because address is unreachable 1918 <1> ; ah = 3 if error because point contained non-0CCh value, 1919 <1> ; al = new byte 1920 <1> gg_writepoints_restore: 1921 00003AC5 31FF <1> xor di, di ; (NC) 1922 <1> gg_wp: 1923 00003AC7 E347 <1> jcxz .return ;if nothing to do --> (still NC from xor/test) 1924 <1> .loop: 1925 00003AC9 E8FDFD <1> call gg_bb_lods_bp_linear 1926 <1> ; dx:ax = linear address 1927 <1> 1928 00003ACC E84E00 <1> call gg_bb_check_is_first 1929 00003ACF 7209 <1> jc @F ; if to handle this breakpoint --> 1930 <1> 1931 <1> ; Skip to next breakpoint. 1932 <1> %if BPSIZE == 4 || BPSIZE == 5 1933 <1> inc si ; -> after point 1934 <1> %elif BPSIZE == 6 1935 00003AD1 83C603 <1> add si, 3 ; skip word offset and byte content 1936 <1> %elif BPSIZE == 9 1937 <1> add si, 5 ; skip dword offset and byte content 1938 <1> %endif 1939 <1> ; BPSIZE implied 1940 <1> 1941 00003AD4 85FF <1> test di, di ; (NC) 1942 00003AD6 7532 <1> jnz .next ; going forward --> 1943 00003AD8 EB22 <1> jmp .next_lea_si ; (NC) 1944 <1> 1945 <1> ; Handle this breakpoint. 1946 <1> @@: 1947 00003ADA E8A501 <1> call getsegmented ; bx:(e)dx = segmented address 1948 <1> %if BPSIZE == 6 1949 00003ADD AD <1> lodsw ; skip word offset 1950 <1> %elif BPSIZE == 9 1951 <1> lodsw 1952 <1> lodsw ; skip dword offset 1953 <1> %endif 1954 00003ADE AC <1> lodsb ; get byte to write 1955 00003ADF B402 <1> mov ah, 2 1956 00003AE1 722D <1> jc .return ; not in PM anymore/address not available --> (CY) 1957 00003AE3 85FF <1> test di, di ; writing? 1958 00003AE5 751A <1> jnz .forward_nocheck ; yes --> 1959 <1> 1960 <1> .backward_check: 1961 00003AE7 50 <1> push ax 1962 00003AE8 E8343A <1> call readmem ; read current byte 1963 00003AEB 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 1964 00003AED B483 <1> mov ah, 83h ; (80h = error occurred while restoring) 1965 00003AEF F9 <1> stc 1966 00003AF0 7529 <1> jne .return_discard ; nope --> (CY) 1967 00003AF2 58 <1> pop ax 1968 00003AF3 E8173A <1> call writemem ; return the byte to its original value 1969 00003AF6 7212 <1> jc .next ; failed --> (CY, handled there) 1970 00003AF8 C644FFCC <1> mov byte [si-1], 0CCh ; reset stored point 1971 <1> .next_lea_si: 1972 00003AFC 8D74F4 <1> lea si, [si-2*BPSIZE] ; adjust (for reverse writing) 1973 00003AFF EB09 <1> jmp short .next 1974 <1> 1975 <1> .forward_nocheck: 1976 <1> %if _DELAY_BEFORE_BP 1977 00003B01 E817FE <1> call delay_before_bp 1978 <1> %endif 1979 00003B04 E8063A <1> call writemem 1980 00003B07 8844FF <1> mov byte [si-1], al ; save the previous byte there 1981 <1> .next: 1982 00003B0A B401 <1> mov ah, 1 ; (in case of error) 1983 00003B0C 7202 <1> jc .return ; failed to write --> (CY) 1984 00003B0E E2B9 <1> loop .loop 1985 <1> .return: ; (NC) 1986 00003B10 730A <1> jnc .ret 1987 <1> 1988 00003B12 85FF <1> test di, di ; restoring ? 1989 00003B14 7503 <1> jnz .ret_CY ; no --> 1990 00003B16 80CC80 <1> or ah, 80h ; error occurred while restoring 1991 <1> .ret_CY: 1992 00003B19 F9 <1> stc 1993 00003B1A 52 <1> push dx ; (counteract effect of pop) 1994 <1> .return_discard: 1995 00003B1B 5A <1> pop dx 1996 <1> .ret: 1997 00003B1C C3 <1> retn 1998 <1> %endif 1999 <1> 2000 <1> 2001 <1> ; INP: dx:ax = linear address of point to be (re)set 2002 <1> ; dword [internalflags2] 2003 <1> ; dword [gg_first_cseip_linear] 2004 <1> ; OUT: CY if to (re)set breakpoint 2005 <1> ; if: no flag set 2006 <1> ; or: dx:ax doesn't match, dif2_gg_skip_non_cseip clear 2007 <1> ; (setting non-cseip point) 2008 <1> ; or: dx:ax matches, dif2_gg_skip_cseip clear 2009 <1> ; (setting cseip point afterwards) 2010 <1> ; NC if to not (re)set breakpoint 2011 <1> ; if: dx:ax doesn't match, dif2_gg_skip_non_cseip set 2012 <1> ; (not setting non-cseip point afterwards) 2013 <1> ; or: dx:ax matches, dif2_gg_skip_cseip set 2014 <1> ; (not setting cseip point) 2015 <1> gg_bb_check_is_first: 2016 00003B1D F606[D400]07 <1> testopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2018 00003B22 7418 <1> jz .continue 2019 <1> 2020 00003B24 3906[F000] <1> cmp [gg_first_cseip_linear], ax 2021 00003B28 7514 <1> jne .is_not_first 2022 00003B2A 3916[F200] <1> cmp [gg_first_cseip_linear + 2], dx 2023 00003B2E 750E <1> jne .is_not_first 2024 <1> 2025 <1> .is_first: 2026 00003B30 800E[D400]10 <1> setopt [internalflags2], dif2_gg_first_detected 2027 00003B35 F606[D400]04 <1> testopt [internalflags2], dif2_gg_skip_cseip 2028 00003B3A 7509 <1> jnz .skip 2029 <1> .continue: 2030 00003B3C F9 <1> stc 2031 00003B3D C3 <1> retn 2032 <1> 2033 <1> .is_not_first: 2034 00003B3E F606[D400]02 <1> testopt [internalflags2], dif2_gg_skip_non_cseip 2035 00003B43 74F7 <1> jz .continue 2036 <1> .skip: 2037 00003B45 F8 <1> clc 2038 00003B46 C3 <1> retn 2039 <1> 2040 <1> 2041 <1> ; INP: al = number to put 2042 <1> ; OUT: putsline called with ordinal string 2043 <1> ; CHG: di, [line_out], ax 2044 <1> putordinalbyte: 2045 00003B47 53 <1> push bx 2046 00003B48 51 <1> push cx 2047 00003B49 52 <1> push dx 2048 <1> 2049 <1> ; Note that trim_overflow in front of line_out is 2050 <1> ; initialised to '0', which we depend on here. 2051 <1> ; With the output from decbyte, at least two decimal 2052 <1> ; digits are always valid in the buffer. 2053 00003B4A BF[B40A] <1> mov di, line_out 2054 00003B4D E80700 <1> call ordinalbyte 2055 00003B50 E8745F <1> call putsline 2056 00003B53 5A <1> pop dx 2057 00003B54 59 <1> pop cx 2058 00003B55 5B <1> pop bx 2059 00003B56 C3 <1> retn 2060 <1> 2061 <1> 2062 <1> ordinalbyte: 2063 00003B57 E8975E <1> call decbyte 2064 00003B5A 8B45FE <1> mov ax, [di - 2] ; al = lower address, higher decimal digit 2065 <1> ; ah = higher address, lower decimal digit 2066 00003B5D 3C31 <1> cmp al, '1' 2067 00003B5F 7417 <1> je .gotsuf_th ; 11th, 12th, 13th or other teen --> 2068 00003B61 BA7374 <1> mov dx, "st" 2069 00003B64 80FC31 <1> cmp ah, '1' 2070 00003B67 7412 <1> je .gotsuf ; if low digit was one --> 2071 00003B69 BA6E64 <1> mov dx, "nd" 2072 00003B6C 80FC32 <1> cmp ah, '2' 2073 00003B6F 740A <1> je .gotsuf ; if low digit was two --> 2074 00003B71 B272 <1> mov dl, 'r' 2075 00003B73 80FC33 <1> cmp ah, '3' 2076 00003B76 7403 <1> je .gotsuf ; if low digit was three --> 2077 <1> .gotsuf_th: 2078 00003B78 BA7468 <1> mov dx, "th" 2079 <1> .gotsuf: 2080 00003B7B 89D0 <1> mov ax, dx 2081 00003B7D AB <1> stosw 2082 00003B7E C3 <1> retn 2083 <1> 2084 <1> 2085 <1> %if _BREAKPOINTS 2086 <1> ; INP: ss:bp -> error info (points at first info word) 2087 <1> ; Each word provides information for one point we tried 2088 <1> ; to restore. The lowest info word corresponds to the 2089 <1> ; first bb breakpoint (bb 00), followed by the info word 2090 <1> ; for the second bb breakpoint (bb 01), and so on. 2091 <1> ; There are always as many info words as there are 2092 <1> ; bb breakpoints. 2093 <1> ; CHG: ax, bx, cx, dx, di, si 2094 <1> ; STT: sets es to ss 2095 <1> bb_handlefailedrestore: 2096 <1> %if _PM 2097 <1> call resetmode 2098 <1> %endif 2099 00003B7F 31FF <1> xor di, di 2100 00003B81 31C9 <1> xor cx, cx 2101 00003B83 16 <1> push ss 2102 00003B84 07 <1> pop es 2103 00003B85 BE[0C04] <1> mov si, b_bplist.bp 2104 <1> .loop: 2105 00003B88 8B03 <1> mov ax, word [bp + di] 2106 00003B8A F6C47F <1> test ah, 7Fh ; failed ? 2107 00003B8D 7414 <1> jz .next 2108 00003B8F 51 <1> push cx 2109 00003B90 57 <1> push di 2110 <1> ; cx = 0-based index 2111 00003B91 FF7402 <1> push word [si + 2] 2112 00003B94 FF34 <1> push word [si] ; stack: linear address 2113 00003B96 8A5C05 <1> mov bl, byte [si + BPSIZE - 1] 2114 <1> ; bl = what we tried to restore 2115 00003B99 B740 <1> mov bh, 40h ; bh = 40h (bb) 2116 00003B9B 80CC80 <1> or ah, 80h ; ah & 80h = set (is restore) 2117 00003B9E E8DC08 <1> call display_breakpoint_failure 2118 00003BA1 5F <1> pop di 2119 00003BA2 59 <1> pop cx 2120 <1> .next: 2121 00003BA3 83C606 <1> add si, BPSIZE 2122 00003BA6 AF <1> scasw ; di += 2 2123 00003BA7 41 <1> inc cx 2124 00003BA8 83F910 <1> cmp cx, _NUM_B_BP + _NUM_SYM_BP 2125 00003BAB 72DB <1> jb .loop 2126 <1> .end: 2127 00003BAD C3 <1> retn 2128 <1> %endif 2129 <1> 2130 <1> 2131 <1> %if _NUM_G_BP 2132 <1> ; INP: cx = number of restored points (number of info words) 2133 <1> ; ss:bp-> error info (points *behind* last info word) 2134 <1> ; Each word provides information for one point we tried 2135 <1> ; to restore. The lowest info word corresponds to the 2136 <1> ; first gg breakpoint, followed by the info word for 2137 <1> ; the second gg breakpoint (if any), and so on. 2138 <1> ; CHG: ax, bx, cx, dx, di, si 2139 <1> ; STT: sets es to ss 2140 <1> gg_handlefailedrestore: 2141 <1> %if _PM 2142 <1> call resetmode 2143 <1> %endif 2144 00003BAE 89CF <1> mov di, cx 2145 00003BB0 01FF <1> add di, di 2146 00003BB2 F7DF <1> neg di 2147 00003BB4 16 <1> push ss 2148 00003BB5 07 <1> pop es 2149 00003BB6 BB0000 <1> mov bx, 0 2150 00003BB9 BE[520A] <1> mov si, g_bplist.bp 2151 00003BBC E325 <1> jcxz .end 2152 <1> .loop: 2153 00003BBE 8B03 <1> mov ax, word [bp+di] 2154 00003BC0 F6C47F <1> test ah, 7Fh ; failed? 2155 00003BC3 7416 <1> jz .next ; no --> 2156 <1> 2157 <1> ; si-> point 2158 <1> ; ax = info (ah = reason, al = new value if reason 3) 2159 <1> ; bx = point's 0-based index 2160 <1> .display: 2161 00003BC5 53 <1> push bx 2162 00003BC6 57 <1> push di 2163 00003BC7 89D9 <1> mov cx, bx ; cx = 0-based index 2164 00003BC9 FF7402 <1> push word [si + 2] 2165 00003BCC FF34 <1> push word [si] ; stack: linear address 2166 00003BCE 8A5C05 <1> mov bl, byte [si + BPSIZE - 1] 2167 <1> ; bl = what we tried to restore 2168 00003BD1 B780 <1> mov bh, 80h ; bh = 80h (gg) 2169 00003BD3 80CC80 <1> or ah, 80h ; ah & 80h = set (is restore) 2170 00003BD6 E8A408 <1> call display_breakpoint_failure 2171 00003BD9 5F <1> pop di 2172 00003BDA 5B <1> pop bx 2173 <1> .next: 2174 00003BDB 43 <1> inc bx ; increment counter 2175 00003BDC 83C606 <1> add si, BPSIZE ; -> next point 2176 00003BDF 47 <1> inc di 2177 00003BE0 47 <1> inc di ; di+bp-> next error info 2178 00003BE1 75DB <1> jnz .loop ; not yet at end --> 2179 <1> .end: 2180 00003BE3 C3 <1> retn 2181 <1> %endif ; _NUM_G_BP 2182 <1> 2183 <1> 2184 <1> ; INP: word [reg_cs] 2185 <1> ; (d)word [reg_eip] 2186 <1> ; OUT: bx = word [reg_cs] 2187 <1> ; CY if invalid address 2188 <1> ; NC if address is valid, 2189 <1> ; dx:ax = linear address 2190 <1> ; CHG: edx, ax, ecx 2191 <1> get_cseip_minus_1_linear: 2192 <1> _386_PM_o32 ; or ecx, byte -1 2193 00003BE4 83C9FF <1> or cx, byte -1 2194 <1> 2195 <1> ; INP: word [reg_cs] 2196 <1> ; (d)word [reg_eip] 2197 <1> ; (e)cx = adjustment to (e)ip 2198 <1> ; OUT: bx = word [reg_cs] 2199 <1> ; CY if invalid address 2200 <1> ; NC if address is valid, 2201 <1> ; dx:ax = linear address 2202 <1> ; CHG: edx, ax 2203 <1> get_cseip_ecx_linear: 2204 00003BE7 8B1E[D00C] <1> mov bx, [reg_cs] ; bx = cs 2205 <1> _386_PM_o32 2206 00003BEB 8B16[DC0C] <1> mov dx, [reg_eip] ; (e)dx = (e)ip 2207 <1> _386_PM_o32 2208 00003BEF 01CA <1> add dx, cx ; bx:(e)dx = adjusted cs:(e)ip 2209 <1> ; (getlinear doesn't use the high word of edx if it's a 16-bit cs) 2210 <1> ; call getlinear ; dx:ax = linear address of this cs:eip 2211 <1> ; (fall through to getlinear_d_b) 2212 <1> 2213 <1> 2214 <1> ; INP: If currently in RM, 2215 <1> ; bx:dx = segment:offset of address 2216 <1> ; If currently in PM, 2217 <1> ; bx:(e)dx = selector:offset of address 2218 <1> ; OUT: bx = unchanged (selector/segment) 2219 <1> ; CY if address is invalid, 2220 <1> ; because Int31.0006 failed for bx or 2221 <1> ; because 32-bit address overflowed or 2222 <1> ; because A20 could not be switched on 2223 <1> ; NC if address is valid, 2224 <1> ; dx:ax = linear address 2225 <1> ; dh is always zero if the address is in RM address space 2226 <1> ; CHG: dx, ax 2227 <1> %if _PM 2228 <1> getlinear_d_b: section_of_function 2229 <1> push di 2230 <1> mov di, test_d_b_bit 2231 <1> call getlinear_common 2232 <1> pop di 2233 <1> retn 2234 <1> 2235 <1> getlinear_high_limit: section_of_function 2236 <1> push di 2237 <1> mov di, test_high_limit 2238 <1> call getlinear_common 2239 <1> pop di 2240 <1> retn 2241 <1> 2242 <1> getlinear_32bit: section_of_function 2243 <1> push di 2244 <1> mov di, .always_NZ 2245 <1> call getlinear_common 2246 <1> pop di 2247 <1> retn 2248 <1> 2249 <1> .always_NZ: 2250 <1> test di, di 2251 <1> retn 2252 <1> 2253 <1> section_of getlinear_16bit 2254 <1> getlinear_16bit: section_of_function 2255 <1> push di 2256 <1> mov di, .always_ZR 2257 <1> call getlinear_common 2258 <1> pop di 2259 <1> retn 2260 <1> 2261 <1> .always_ZR: 2262 <1> cmp di, di 2263 <1> retn 2264 <1> 2265 <1> %if _DEBUG1 2266 <1> getlinear_high_limit.do_not_use_test: section_of_function 2267 <1> ; DO NOT use resetmode, called by readmem/writemem 2268 <1> push di 2269 <1> mov di, test_d_b_bit 2270 <1> call getlinear_common.do_not_use_test 2271 <1> pop di 2272 <1> retn 2273 <1> %endif 2274 <1> %else 2275 <1> check_section_of getlinear_d_b 2276 <1> check_section_of getlinear_high_limit 2277 <1> check_section_of getlinear_32bit 2278 <1> getlinear_d_b: equ getlinear_common 2279 <1> getlinear_high_limit: equ getlinear_common 2280 <1> getlinear_32bit: equ getlinear_common 2281 <1> getlinear_16bit: equ getlinear_common 2282 <1> %if _DEBUG1 2283 <1> check_section_of getlinear_high_limit.do_not_use_test 2284 <1> getlinear_high_limit.do_not_use_test: equ getlinear_common.do_not_use_test 2285 <1> %endif 2286 <1> %endif 2287 <1> 2288 <1> 2289 <1> ; Internal entry: Call function di to determine use 2290 <1> ; of a 32-bit offset, INP: bx = seg/sel, OUT: NZ iff 32-bit 2291 <1> getlinear_common: section_of_function 2292 <1> %if _PM 2293 <1> call resetmode 2294 <1> ; This must execute in the correct mode, 2295 <1> ; because we get the input from whatever 2296 <1> ; mode we were originally entered in. 2297 <1> %endif 2298 <1> %if _DEBUG1 2299 <1> call .do_not_use_test ; get linear address 2300 <1> jc @F ; already an error ? then return --> 2301 <1> push bx 2302 <1> push cx 2303 <1> mov bx, test_records_getLinear 2304 <1> call handle_test_case_multiple_16 2305 <1> ; check whether this should testcase the error 2306 <1> ; CY to indicate error from this call 2307 <1> pop cx 2308 <1> pop bx 2309 <1> @@: 2310 <1> retn 2311 <1> 2312 <1> %endif 2313 <1> ; DOES NOT use resetmode 2314 <1> .do_not_use_test: 2315 00003BF1 53 <1> push bx 2316 <1> %if _PM 2317 <1> call ispm 2318 <1> jnz .rm 2319 <1> mov ax, 0006h 2320 <1> push cx 2321 <1> push dx 2322 <1> int 31h ; get selector base address into cx:dx 2323 <1> pop ax ; (edxh:)ax = offset, cx:dx = base 2324 <1> jc .return_cx_bx 2325 <1> 2326 <1> _386 call di 2327 <1> _386 jz .16 2328 <1> _386 push edx 2329 <1> _386 pop bx 2330 <1> _386 pop bx ; bx = high word edx (in 32-bit PM segment) 2331 <1> _386 jmp .32 2332 <1> .16: ; bx:ax = offset 2333 <1> xor bx, bx ; 16-bit PM segment, clear offset high word 2334 <1> .32: 2335 <1> add ax, dx 2336 <1> adc bx, cx ; add the base 2337 <1> xchg bx, dx ; dx:ax = 32-bit linear address 2338 <1> clc 2339 <1> 2340 <1> .return_cx_bx: 2341 <1> pop cx 2342 <1> pop bx 2343 <1> retn 2344 <1> .rm: 2345 <1> %endif 2346 00003BF2 89D8 <1> mov ax, bx 2347 00003BF4 51 <1> push cx 2348 00003BF5 B104 <1> mov cl, 4 2349 00003BF7 D3C0 <1> rol ax, cl 2350 00003BF9 59 <1> pop cx 2351 00003BFA BBF0FF <1> mov bx, 0FFF0h 2352 00003BFD 21C3 <1> and bx, ax ; bx = low word adjustment 2353 00003BFF 83E00F <1> and ax, byte 0Fh ; ax = higher bits which don't fit in the low word 2354 00003C02 01DA <1> add dx, bx 2355 00003C04 83D000 <1> adc ax, byte 0 2356 00003C07 92 <1> xchg ax, dx ; dx:ax = 21-bit linear address 2357 00003C08 F606[D100]10 <1> testopt [internalflags], debuggeeA20 2358 00003C0D 7503 <1> jnz .return_bx ; A20 line enabled, no need to adjust (NC) 2359 00003C0F 80E2EF <1> and dl, ~10h ; clear corresponding bit of the address if it was set (NC) 2360 <1> .return_bx: 2361 00003C12 5B <1> pop bx 2362 00003C13 C3 <1> retn 2363 <1> 2364 <1> 2365 <1> ; INP: bx = segment/selector to use by default 2366 <1> ; al = next character in input 2367 <1> ; si -> following character in input 2368 <1> ; OUT: NC if successful, 2369 <1> ; bx:dx = linear address 2370 <1> ; (if not _PM, this always fits in 24 bits) 2371 <1> ; al = next character 2372 <1> ; si -> following character 2373 <1> ; (d)word [bp_offset] = preferred offset, -1 if none 2374 <1> ; CY if error 2375 <1> ; CHG: edx, bx, ax, si, (d)word [bp_offset] 2376 <1> getlinearaddr: section_of_function 2377 <1> %if _PM 2378 <1> call resetmode 2379 <1> %endif 2380 <1> _386_PM_o32 ; or dword 2381 00003C14 830E[2045]FF <1> or word [bp_offset], strict byte -1 2382 00003C19 E8955D <1> call skipcomm0 2383 00003C1C 3C40 <1> cmp al, '@' 2384 00003C1E 7530 <1> jne .at_not 2385 00003C20 AC <1> lodsb ; insure we have a blank or opening parens 2386 00003C21 3C28 <1> cmp al, '(' 2387 00003C23 740A <1> je .at 2388 00003C25 3C09 <1> cmp al, 9 2389 00003C27 7406 <1> je .at 2390 00003C29 3C20 <1> cmp al, 32 2391 00003C2B 7402 <1> je .at 2392 00003C2D EB1E <1> jmp .at_not_reload ; assume the @ is part of a symbol 2393 <1> 2394 <1> .at: 2395 00003C2F E8AE5D <1> call skipwh0 2396 00003C32 3C28 <1> cmp al, '(' 2397 00003C34 750D <1> jne .at_not_paren 2398 <1> 2399 00003C36 E83E57 <1> nearcall getdword 2400 00003C39 E8A45D <1> call skipwh0 2401 00003C3C 3C29 <1> cmp al, ')' 2402 00003C3E 7520 <1> jne .error 2403 00003C40 AC <1> lodsb 2404 <1> 2405 00003C41 EB03 <1> jmp .at_got 2406 <1> 2407 <1> .at_not_paren: 2408 00003C43 E83157 <1> nearcall getdword 2409 <1> .at_got: 2410 <1> %ifn _PM 2411 <1> ; test bh, bh 2412 <1> ; jnz .error 2413 00003C46 83FB11 <1> cmp bx, 11h 2414 00003C49 7315 <1> jae .error 2415 <1> %endif 2416 00003C4B F8 <1> clc 2417 00003C4C C3 <1> retn 2418 <1> 2419 <1> .at_not_reload: 2420 00003C4D 4E <1> dec si 2421 00003C4E 4E <1> dec si 2422 00003C4F AC <1> lodsb 2423 <1> .at_not: 2424 00003C50 E8FD4A <1> nearcall getaddrX 2425 <1> %if _PM 2426 <1> _no386 and word [bp_offset + 2], 0 2427 <1> %endif 2428 <1> _386_PM_o32 ; mov dword [bp_offset], edx 2429 00003C53 8916[2045] <1> mov word [bp_offset], dx 2430 00003C57 50 <1> push ax 2431 00003C58 E896FF <1> call getlinear_high_limit 2432 00003C5B 93 <1> xchg bx, ax ; dx:bx = linear 2433 00003C5C 87D3 <1> xchg dx, bx ; bx:dx = linear 2434 00003C5E 58 <1> pop ax ; al = next character 2435 00003C5F C3 <1> retn 2436 <1> 2437 <1> .error: 2438 00003C60 F9 <1> stc 2439 00003C61 C3 <1> retn 2440 <1> 2441 <1> 2442 <1> usesection lDEBUG_DATA_ENTRY 2443 <1> align 4, db 0 2444 00004520 0000 <1> bp_offset: dw 0 2445 <1> %if _PM 2446 <1> dw 0 2447 <1> %endif 2448 <1> usesection lDEBUG_CODE 2449 <1> 2450 <1> 2451 <1> ; INP: word [reg_cs] 2452 <1> ; (d)word [reg_eip] 2453 <1> ; dword [tpg_possible_breakpoint] 2454 <1> ; [internalflags2] & dif2_tpg_have_bp 2455 <1> ; OUT: CY if invalid address 2456 <1> ; NC if address is valid, 2457 <1> ; dx:ax = linear address 2458 <1> ; CHG: edx, ax, ecx, bx 2459 <1> ; STT: ds = ss = debugger data selector 2460 <1> get_cseip_of_possible_breakpoint: 2461 00003C62 A1[F800] <1> mov ax, [tpg_possible_breakpoint] 2462 00003C65 8B16[FA00] <1> mov dx, [tpg_possible_breakpoint + 2] 2463 <1> ; dx:ax = stored possible breakpoint address 2464 00003C69 F606[D500]01 <1> testopt [internalflags2], dif2_tpg_have_bp 2465 00003C6E 7511 <1> jnz .retn ; (NC) if already stored --> 2466 00003C70 E871FF <1> call get_cseip_minus_1_linear 2467 <1> ; dx:ax = linear address at cs:(e)ip - 1 2468 00003C73 720C <1> jc .retn ; (CY) if getlinear failed --> 2469 00003C75 A3[F800] <1> mov [tpg_possible_breakpoint], ax 2470 00003C78 8916[FA00] <1> mov [tpg_possible_breakpoint + 2], dx 2471 <1> ; store for later use 2472 00003C7C 800E[D500]01 <1> setopt [internalflags2], dif2_tpg_have_bp 2473 <1> ; (NC) 2474 <1> .retn: 2475 00003C81 C3 <1> retn 2476 <1> 2477 <1> 2478 <1> %if _PM 2479 <1> 2480 <1> ; DEBUGX: when a mode switch from PM to RM did occur in the debuggee, 2481 <1> ; breakpoint addresses in non-RM address space are unreachable. 2482 <1> ; To enable the debugger to reset the breakpoints, it has to switch 2483 <1> ; temporarily to PM. (In DEBUG/X 1.19, a switch from RM to PM in the 2484 <1> ; debuggee will temporarily switch the debugger back to RM too. We 2485 <1> ; handle this case without a switch as the linear RM address can be 2486 <1> ; accessed directly in PM, assuming that the DPMI hosts linear-to- 2487 <1> ; physical mapping for the RM address space is the same as the one 2488 <1> ; we get in PM.) 2489 <1> 2490 <1> ; (To use mode switching in any case, the format the breakpoints are 2491 <1> ; stored in needs to be modified. Additionally, the mode switching 2492 <1> ; needs to be done elsewhere instead of in getsegmented. resetmode 2493 <1> ; can be used as is, even if a mode switch from PM to RM occured.) 2494 <1> 2495 <1> switchmode: 2496 <1> ;--- raw switch: 2497 <1> ;--- si:e/di: new cs:e/ip 2498 <1> ;--- dx:e/bx: new ss:e/sp 2499 <1> ;--- ax: new ds 2500 <1> ;--- cx: new es 2501 <1> _386 xor ebx, ebx ; clear ebxh 2502 <1> mov bx, sp 2503 <1> _386 xor edi, edi ; clear edih 2504 <1> mov di, .back_after_switch 2505 <1> call ispm 2506 <1> jz .pm 2507 <1> .r86m: 2508 <1> d4 call d4message 2509 <1> d4 asciz "In switchmode.r86m",13,10 2510 <1> mov ax, [dssel] ; switch rm -> pm 2511 <1> mov si, [code_sel] 2512 <1> mov dx, ax 2513 <1> mov cx, ax 2514 <1> jmp far [dpmi_rm2pm] 2515 <1> .pm: 2516 <1> d4 call d4message 2517 <1> d4 asciz "In switchmode.pm",13,10 2518 <1> mov ax, [pspdbg] ; switch pm -> rm 2519 <1> mov si, [code_seg] 2520 <1> mov dx, ax 2521 <1> mov cx, ax 2522 <1> _386_o32 ; jmp far dword [dpmi_pm2rm] 2523 <1> jmp far [dpmi_pm2rm] 2524 <1> 2525 <1> .back_after_switch: 2526 <1> xoropt [internalflags], protectedmode 2527 <1> d4 call d4message 2528 <1> d4 asciz "In switchmode.back_after_switch",13,10 2529 <1> retn 2530 <1> 2531 <1> 2532 <1> ; INP: al = direction, 0 = save state, 1 = restore state 2533 <1> ; [auxbuff] = state buffer 2534 <1> ; ES = debugger data selector 2535 <1> ; CHG: edi 2536 <1> sr_state: 2537 <1> testopt [internalflags], switchbuffer 2538 <1> jz .return ; no need to call --> 2539 <1> _386_o32 ; xor edi, edi 2540 <1> xor di, di 2541 <1> call ispm 2542 <1> jz .pm 2543 <1> .r86m: 2544 <1> d4 call d4message 2545 <1> d4 asciz "In sr_state.r86m",13,10 2546 <1> mov es, word [auxbuff_segorsel + soaSegment] 2547 <1> call far [dpmi_rmsav] 2548 <1> jmp .return 2549 <1> 2550 <1> .pm: 2551 <1> d4 call d4message 2552 <1> d4 asciz "In sr_state.pm",13,10 2553 <1> mov es, word [auxbuff_segorsel + soaSelector] 2554 <1> _386_o32 ; call far dword [dpmi_pmsav] 2555 <1> call far [dpmi_pmsav] 2556 <1> .return: 2557 <1> push ss 2558 <1> pop es 2559 <1> retn 2560 <1> 2561 <1> 2562 <1> ; INP: [internalflags] & modeswitched 2563 <1> ; OUT: flag cleared, mode switched back if had been switched 2564 <1> ; EI 2565 <1> ; CHG: - (not even flags!) 2566 <1> ; STT: es = ds = ss = gs = fs = debugger data segment/selector 2567 <1> ; 2568 <1> ; Switches back to RM if a mode switch to PM was done by getsegmented. 2569 <1> ; Does nothing otherwise. (Can be called multiple times.) 2570 <1> resetmode: 2571 <1> pushf 2572 <1> testopt [internalflags], modeswitched ; switched mode previously ? 2573 <1> jz .return ; no --> 2574 <1> d4 call d4message 2575 <1> d4 asciz "In resetmode (actually resetting)",13,10 2576 <1> subcpu 286 2577 <1> _386_o32 2578 <1> pusha 2579 <1> call switchmode ; switch back to the mode we were entered in (RM) 2580 <1> mov al, 1 2581 <1> call sr_state ; restore state 2582 <1> call handle_mode_changed ; ! called with flag set 2583 <1> clropt [internalflags], modeswitched ; reset the flag 2584 <1> _386 push ss 2585 <1> _386 pop gs 2586 <1> _386 push ss 2587 <1> _386 pop fs 2588 <1> _386_o32 2589 <1> popa 2590 <1> subcpureset 2591 <1> .return: 2592 <1> popf 2593 <1> sti 2594 <1> retn 2595 <1> %endif 2596 <1> 2597 <1> ; INP: dx:ax = linear address 2598 <1> ; OUT: CY if inaccessible 2599 <1> ; NC if accessible, 2600 <1> ; bx:(e)dx = segment:offset or selector:offset address 2601 <1> ; A temporary mode switch from RM to PM might have occured. 2602 <1> ; This has to be reset by calling resetmode. 2603 <1> ; CHG: (e)ax, (e)bx, (e)dx, fs, gs 2604 <1> ; STT: es = ds = ss = our segment/selector 2605 <1> ; 2606 <1> ; It is assumed that only one byte needs to be accessed. 2607 <1> ; (A workaround to access multiple bytes would be to access each 2608 <1> ; byte separately and call this function for each of the bytes.) 2609 <1> ; 2610 <1> ; The TSR command code assumes that getsegmented.pm does not switch 2611 <1> ; modes and that it will return an offset in (e)dx that allows 2612 <1> ; 16-bit access. Adjust that code if either is no longer true. 2613 <1> ; 2614 <1> ; This is often used in conjunction with writemem or 2615 <1> ; readmem. Refer to debug.asm for those. Note that 2616 <1> ; they will decide whether to use edx or dx depending 2617 <1> ; on the segment limit of the selector returned in 2618 <1> ; bx. Currently edxh is always zero so it doesn't 2619 <1> ; matter whether writemem or readmem choose a32 or 2620 <1> ; a16 addressing. 2621 <1> getsegmented: 2622 <1> %if _DEBUG1 2623 <1> push bx 2624 <1> push cx 2625 <1> mov bx, test_records_getSegmented 2626 <1> call handle_test_case_multiple_16 2627 <1> pop cx 2628 <1> pop bx 2629 <1> jnc @F 2630 <1> ; stc ; (already CY if the conditional didn't jump) 2631 <1> retn 2632 <1> 2633 <1> @@: 2634 <1> %endif 2635 <1> .do_not_use_test: 2636 <1> 2637 <1> %if _PM 2638 <1> call ispm 2639 <1> jnz .rm 2640 <1> .pm: 2641 <1> push cx 2642 <1> mov bx, word [scratchsel] 2643 <1> xchg ax, dx 2644 <1> xchg ax, cx ; cx:dx = linear address 2645 <1> mov ax, 0007h 2646 <1> int 31h ; set base to the address 2647 <1> pop cx 2648 <1> jc .invalid 2649 <1> %if 1 2650 <1> push cx 2651 <1> mov ax, 0008h 2652 <1> xor cx, cx 2653 <1> xor dx, dx 2654 <1> int 31h ; set limit to zero (access to one byte only) 2655 <1> pop cx 2656 <1> jc .invalid 2657 <1> %endif 2658 <1> _386_o32 ; xor edx, edx 2659 <1> xor dx, dx ; bx:(e)dx = selector:offset (using scratchsel with the address as base) 2660 <1> retn ; (NC) 2661 <1> %endif 2662 <1> .rm: 2663 00003C82 83FA10 <1> cmp dx, byte 10h ; check for address space 2664 00003C85 7219 <1> jb .nothma ; below HMA, normal access --> 2665 00003C87 7402 <1> je .checkhma ; possibly in HMA --> 2666 <1> .nonrmspace: ; above HMA 2667 <1> %if _PM 2668 <1> ; It's a PM address but we are in RM. 2669 <1> testopt [internalflags], canswitchmode 2670 <1> jz .invalid ; can't switch to PM --> 2671 <1> .switchmodes: 2672 <1> _386_o32 2673 <1> push si 2674 <1> _386_o32 2675 <1> push di 2676 <1> _386_o32 2677 <1> push cx 2678 <1> _386_o32 2679 <1> push bp 2680 <1> push dx 2681 <1> push ax 2682 <1> d4 call d4message 2683 <1> d4 asciz "In getsegmented.switchmodes (switching to access memory beyond 1088 KiB)",13,10 2684 <1> call remember_mode 2685 <1> setopt [internalflags], modeswitched ; set flag for resetmode 2686 <1> mov al, 0 2687 <1> call sr_state ; save state 2688 <1> call switchmode ; switch to PM 2689 <1> call handle_mode_changed ; ! called with flag set 2690 <1> pop ax 2691 <1> pop dx 2692 <1> _386_o32 2693 <1> pop bp 2694 <1> _386_o32 2695 <1> pop cx 2696 <1> _386_o32 2697 <1> pop di 2698 <1> _386_o32 2699 <1> pop si 2700 <1> jmp .pm 2701 <1> 2702 <1> .invalid: ; the address is inaccessible 2703 <1> %endif 2704 00003C89 F9 <1> stc 2705 00003C8A C3 <1> retn 2706 <1> 2707 <1> .checkhma: 2708 00003C8B 83F8F0 <1> cmp ax, -10h ; valid offset for HMA ? 2709 00003C8E 73F9 <1> jae .nonrmspace ; no, above HMA --> 2710 00003C90 F606[D100]20 <1> testopt [internalflags], debuggerA20 ; A20 on, HMA accessible ? 2711 00003C95 74F2 <1> jz .nonrmspace ; no, treat as above HMA (DEBUGX) --> 2712 00003C97 BBFFFF <1> mov bx, 0FFFFh ; the HMA must always be addressed by segment FFFFh 2713 00003C9A 83C010 <1> add ax, byte 10h ; and the offset is always at least 0010h (FFFFh:0010h = 00100000h) 2714 <1> ; (NC because we checked that this won't overflow) 2715 00003C9D 92 <1> xchg ax, dx ; bx:dx = segment:offset 2716 00003C9E EB11 <1> jmp .zero_edxh 2717 <1> 2718 <1> .nothma: 2719 00003CA0 51 <1> push cx 2720 00003CA1 B104 <1> mov cl, 4 2721 00003CA3 D3CA <1> ror dx, cl ; dx (high 4 bits) = high 4 bits of segment 2722 00003CA5 89C3 <1> mov bx, ax 2723 00003CA7 D3EB <1> shr bx, cl ; bx = low 12 bits of segment 2724 00003CA9 09DA <1> or dx, bx ; dx = segment 2725 00003CAB 83E00F <1> and ax, byte 0Fh ; ax = low 4 bits of linear, used as offset (NC) 2726 00003CAE 92 <1> xchg ax, dx 2727 00003CAF 93 <1> xchg ax, bx ; bx:dx = segment:offset 2728 00003CB0 59 <1> pop cx 2729 <1> .zero_edxh: 2730 <1> _386_PM movzx edx, dx 2731 00003CB1 C3 <1> retn 2732 <1> 2733 <1> 2734 <1> ; T command - Trace. 2735 <1> tt: 2736 <1> %if _TEST_HELP_FILE 2737 <1> dec si 2738 <1> dec si 2739 <1> mov dx, msg.testhelp 2740 <1> call isstring? 2741 <1> je testhelpfile 2742 <1> inc si 2743 <1> lodsb 2744 <1> %endif 2745 <1> 2746 00003CB2 8A64FE <1> mov ah, byte [si - 2] 2747 00003CB5 80E4DF <1> and ah, TOUPPER 2748 00003CB8 80FC54 <1> cmp ah, 'T' 2749 00003CBB 7508 <1> jne @F 2750 00003CBD 88C4 <1> mov ah, al 2751 00003CBF 80E4DF <1> and ah, TOUPPER 2752 00003CC2 80FC4D <1> cmp ah, 'M' 2753 <1> @@: 2754 00003CC5 7542 <1> jne isnotmodeset 2755 00003CC7 E8E65C <1> call skipcomma 2756 00003CCA E8BD5C <1> call iseol? 2757 00003CCD 7416 <1> je ismodeget 2758 00003CCF E8A556 <1> nearcall getexpression 2759 00003CD2 E8CA5C <1> call chkeol ; expect end of line here 2760 00003CD5 09DA <1> or dx, bx 2761 00003CD7 7507 <1> jnz .set ; selected nonzero --> 2762 <1> .clear: ; selected zero 2763 00003CD9 8026[A000]FD <1> clropt [options], traceints 2764 00003CDE EB05 <1> jmp short .get 2765 <1> .set: 2766 00003CE0 800E[A000]02 <1> setopt [options], traceints 2767 <1> .get: 2768 <1> ismodeget: 2769 00003CE5 B030 <1> mov al, '0' 2770 00003CE7 BE[C538] <1> mov si, tmode0 2771 00003CEA F606[A000]02 <1> testopt [options], traceints 2772 00003CEF 7404 <1> jz .zero 2773 00003CF1 40 <1> inc ax 2774 00003CF2 BE[BE38] <1> mov si, tmode1 2775 <1> .zero: 2776 00003CF5 A2[AA38] <1> mov byte [tmodev], al 2777 00003CF8 BF[B40A] <1> mov di, line_out 2778 00003CFB 56 <1> push si 2779 00003CFC BE[9C38] <1> mov si, tmodes 2780 00003CFF E8E95C <1> call showstring 2781 00003D02 5E <1> pop si 2782 00003D03 E8E55C <1> call showstring 2783 00003D06 E9BA5D <1> jmp putsline_crlf 2784 <1> 2785 <1> isnotmodeset: 2786 <1> %if _TSR && (_APPLICATION || _DEVICE) 2787 00003D09 80FC53 <1> cmp ah, 'S' 2788 00003D0C 750D <1> jne @F 2789 00003D0E 50 <1> push ax 2790 00003D0F 8A04 <1> mov al, byte [si] 2791 00003D11 24DF <1> and al, TOUPPER 2792 00003D13 3C52 <1> cmp al, 'R' 2793 00003D15 58 <1> pop ax 2794 00003D16 7503E91E02 <1> je tsr 2795 <1> @@: 2796 <1> %endif 2797 <1> 2798 <1> %if _RH 2799 00003D1B E863EE <1> call enable_rh 2800 <1> %endif 2801 <1> 2802 <1> %if _TTEST 2803 00003D1E 50 <1> push ax 2804 00003D1F 80FC54 <1> cmp ah, 'T' 2805 00003D22 7516 <1> jne @F 2806 00003D24 8B04 <1> mov ax, word [si] 2807 00003D26 25DFDF <1> and ax, TOUPPER_W 2808 00003D29 3D4553 <1> cmp ax, "ES" 2809 00003D2C 750C <1> jne @F 2810 00003D2E 8A4402 <1> mov al, byte [si + 2] 2811 00003D31 24DF <1> and al, TOUPPER 2812 00003D33 3C54 <1> cmp al, 'T' 2813 00003D35 7503E9A600 <1> je ttestcmd 2814 <1> @@: 2815 00003D3A 58 <1> pop ax 2816 <1> %endif 2817 <1> 2818 00003D3B 8026[D300]F7 <1> clropt [internalflags], tt_p 2819 00003D40 80FC50 <1> cmp ah, 'P' 2820 00003D43 7506 <1> jne @F 2821 00003D45 AC <1> lodsb 2822 00003D46 800E[D300]08 <1> setopt [internalflags], tt_p 2823 <1> @@: 2824 <1> tt0: 2825 <1> %if _RH 2826 00003D4B E833EE <1> call enable_rh 2827 <1> %endif 2828 00003D4E C706[020C][4B3D] <1> mov word [lastcmd], tt0 2829 00003D54 8026[D500]EF <1> clropt [internalflags2], dif2_is_pp 2830 00003D59 E8FF09 <1> call parse_pt ; process arguments 2831 <1> 2832 <1> ; Do it times. 2833 <1> tt1: 2834 00003D5C 53 <1> push bx 2835 00003D5D 51 <1> push cx 2836 <1> 2837 00003D5E F606[D300]08 <1> testopt [internalflags], tt_p 2838 00003D63 7439 <1> jz .not_p 2839 <1> 2840 <1> %if _PM 2841 <1> call resetmode 2842 <1> %endif 2843 00003D65 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 2844 00003D68 8B1E[D00C] <1> mov bx, word [reg_cs] 2845 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 2846 00003D6C 8B36[DC0C] <1> mov si, word [reg_eip] 2847 <1> .pp2: 2848 00003D70 E84808 <1> call pp16 ; get next instruction byte into AL 2849 00003D73 BF[6411] <1> mov di, ppbytes 2850 00003D76 B91900 <1> mov cx, PPLEN_ONLY_STRING 2851 <1> %if _SYMBOLIC 2852 <1> mov byte [pp_instruction], al 2853 <1> %endif 2854 00003D79 F2AE <1> repne scasb 2855 00003D7B 7521 <1> jne .not_p ; if not one of these --> 2856 00003D7D 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 2857 00003D80 A880 <1> test al, PP_PREFIX ; prefix ? 2858 00003D82 740E <1> jz .pp3 ; no --> 2859 00003D84 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 2860 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 2861 <1> ; between decoding as O32 and O16, they're always 2862 <1> ; decoded as O32. The same is true for A32, and 2863 <1> ; in a 32-bit cs for O16 and A16. 2864 00003D86 FECA <1> dec dl 2865 00003D88 75E6 <1> jnz .pp2 ; if not out of bytes --> 2866 00003D8A BA[882B] <1> mov dx, msg.warnprefix 2867 00003D8D E82362 <1> call putsz 2868 00003D90 EB0C <1> jmp .not_p 2869 <1> 2870 <1> ; A repeatable string instruction is to be decoded. 2871 <1> ; Finish the decoding and skip the appropriate number 2872 <1> ; of opcode bytes. 2873 <1> .pp3: 2874 <1> _386_PM call pp_fix32bitflags 2875 00003D92 A847 <1> test al, PP_VARSIZ | PP_SIZ_MASK 2876 00003D94 7403E9C444 <1> jnz error 2877 <1> %if 0 2878 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 2879 <1> jz .ignoreosize ; no --> 2880 <1> and dh, 2 2881 <1> add al, dh 2882 <1> .ignoreosize: 2883 <1> and ax, PP_SIZ_MASK 2884 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 2885 <1> _386_PM_o32 ; add esi, eax 2886 <1> add si, ax 2887 <1> %endif 2888 <1> ; pp10: 2889 <1> %if _SYMBOLIC 2890 <1> call pp3_check_symhints 2891 <1> jc .not_p ; trace --> 2892 <1> %endif 2893 <1> ; jmp short pp11 ; we have a skippable instruction here 2894 <1> ; pp11: 2895 <1> _386_PM call resetmode_and_test_d_b_bit 2896 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 2897 <1> _386_PM movzx esi, si ; clear high word here 2898 <1> .32: 2899 00003D99 E88907 <1> call proceedbreakpoint ; run until the breakpoint is hit 2900 <1> ; This call might return modeswitched. 2901 00003D9C EB03 <1> jmp short @F 2902 <1> 2903 <1> .not_p: 2904 00003D9E E8A502 <1> call traceone ; call common code 2905 <1> @@: 2906 00003DA1 7303E96402 <1> jc unexpectedinterrupt ; an unexpected interrupt occured --> 2907 <1> %if _BREAKPOINTS 2908 00003DA6 BA0000 <1> mov dx, 0 ; do not skip WHILE 2909 00003DA9 7413 <1> jz @F ; (breakpoint after instruction was hit) 2910 <1> 2911 <1> ; bb breakpoint was hit. dumpregs, then return 2912 00003DAB E8B100 <1> call handle_bb_hit_pass_match 2913 00003DAE 7204 <1> jc .actual_hit ; actual match ? --> 2914 00003DB0 7414 <1> jz tt2.nodump ; non-silent mode ? --> 2915 00003DB2 EB0A <1> jmp tt2 ; silent mode --> 2916 <1> 2917 <1> .actual_hit: 2918 <1> %if _PM 2919 <1> call resetmode 2920 <1> %endif 2921 00003DB4 E83EF9 <1> call put_deferred_message_silent 2922 00003DB7 E8B205 <1> call dumpregs_extended_silent 2923 00003DBA 59 <1> pop cx 2924 00003DBB 5B <1> pop bx ; (discard counter) 2925 00003DBC EB1B <1> jmp @FF 2926 <1> @@: 2927 <1> %endif 2928 <1> tt2: 2929 00003DBE 52 <1> push dx 2930 <1> %if _PM 2931 <1> call resetmode 2932 <1> %endif 2933 00003DBF E833F9 <1> call put_deferred_message_silent 2934 00003DC2 E8A705 <1> call dumpregs_extended_silent 2935 <1> ; dump registers 2936 00003DC5 5A <1> pop dx ; preserve skip WHILE flag 2937 <1> .nodump: 2938 <1> 2939 00003DC6 E84F00 <1> call tt_handle_while 2940 00003DC9 59 <1> pop cx 2941 00003DCA 5B <1> pop bx 2942 <1> 2943 00003DCB 83E901 <1> sub cx, 1 2944 00003DCE 83DB00 <1> sbb bx, 0 ; decrement loop counter 2945 <1> 2946 00003DD1 85DB <1> test bx, bx 2947 00003DD3 7508 <1> jnz tt1_jmp ; loop --> 2948 00003DD5 85C9 <1> test cx, cx 2949 00003DD7 7504 <1> jnz tt1_jmp ; loop --> 2950 <1> 2951 <1> @@: 2952 <1> %if _PM 2953 <1> call resetmode 2954 <1> %endif 2955 00003DD9 E8BB60 <1> call silence_dump 2956 <1> 2957 00003DDC C3 <1> retn 2958 <1> 2959 <1> tt1_jmp: 2960 00003DDD E97CFF <1> jmp tt1 2961 <1> 2962 <1> 2963 <1> %if _TTEST 2964 <1> ttestcmd: 2965 00003DE0 58 <1> pop ax 2966 00003DE1 46 <1> inc si 2967 00003DE2 46 <1> inc si 2968 00003DE3 46 <1> inc si 2969 00003DE4 E8F85B <1> call skipwhite 2970 <1> 2971 <1> .tt0: 2972 00003DE7 C706[020C][E73D] <1> mov word [lastcmd], .tt0 2973 00003DED 8026[D500]EF <1> clropt [internalflags2], dif2_is_pp 2974 00003DF2 E86609 <1> call parse_pt ; process arguments 2975 <1> 2976 <1> ; Do it times. 2977 <1> .tt1: 2978 00003DF5 53 <1> push bx 2979 00003DF6 51 <1> push cx 2980 <1> 2981 <1> .tt2: 2982 <1> %if _PM 2983 <1> call resetmode 2984 <1> %endif 2985 00003DF7 E8FBF8 <1> call put_deferred_message_silent 2986 00003DFA E86F05 <1> call dumpregs_extended_silent 2987 <1> ; dump registers 2988 <1> .nodump: 2989 <1> 2990 00003DFD 31D2 <1> xor dx, dx 2991 00003DFF E81600 <1> call tt_handle_while 2992 00003E02 59 <1> pop cx 2993 00003E03 5B <1> pop bx 2994 <1> 2995 00003E04 83E901 <1> sub cx, 1 2996 00003E07 83DB00 <1> sbb bx, 0 ; decrement loop counter 2997 <1> 2998 00003E0A 85DB <1> test bx, bx 2999 00003E0C 7508 <1> jnz .tt1_jmp ; loop --> 3000 00003E0E 85C9 <1> test cx, cx 3001 00003E10 7504 <1> jnz .tt1_jmp ; loop --> 3002 <1> 3003 <1> @@: 3004 <1> %if _PM 3005 <1> call resetmode 3006 <1> %endif 3007 00003E12 E88260 <1> call silence_dump 3008 <1> 3009 00003E15 C3 <1> retn 3010 <1> 3011 <1> .tt1_jmp: 3012 00003E16 EBDD <1> jmp .tt1 3013 <1> %endif 3014 <1> 3015 <1> 3016 <1> ; INP: dx = nonzero if to bypass while condition 3017 <1> tt_handle_while: 3018 00003E18 85D2 <1> test dx, dx 3019 00003E1A 7538 <1> jnz @F 3020 00003E1C F606[D300]04 <1> testopt [internalflags], tt_while 3021 00003E21 7431 <1> jz @F 3022 <1> 3023 <1> %if _PM 3024 <1> call resetmode 3025 <1> %endif 3026 00003E23 E82F00 <1> call .point_to_condition 3027 <1> ; dx = si -> line_out with condition 3028 00003E26 FF36[660B] <1> push word [rc] 3029 00003E2A 8F06[680B] <1> pop word [priorrc] 3030 00003E2E AC <1> lodsb 3031 00003E2F E84555 <1> nearcall getexpression ; parse stored expression 3032 00003E32 E86A5B <1> call chkeol 3033 00003E35 E8624E <1> nearcall toboolean ; get boolean 3034 00003E38 85D2 <1> test dx, dx ; true ? 3035 00003E3A 7518 <1> jnz @F ; yes, continue --> 3036 <1> 3037 00003E3C E85860 <1> call silence_dump 3038 <1> 3039 00003E3F BA[EF21] <1> mov dx, msg.while_terminated_before 3040 00003E42 E86E61 <1> call putsz 3041 00003E45 E80D00 <1> call .point_to_condition 3042 00003E48 E86861 <1> call putsz ; display condition 3043 00003E4B BA[0122] <1> mov dx, msg.while_terminated_after 3044 00003E4E E86261 <1> call putsz 3045 00003E51 E9ACC1 <1> jmp cmd3 3046 <1> 3047 <1> @@: 3048 00003E54 C3 <1> retn 3049 <1> 3050 <1> 3051 <1> .point_to_condition: 3052 00003E55 16 <1> push ss 3053 00003E56 07 <1> pop es 3054 00003E57 16 <1> push ss 3055 00003E58 1F <1> pop ds 3056 00003E59 BE[F00C] <1> mov si, while_buffer 3057 00003E5C 89F2 <1> mov dx, si 3058 00003E5E C3 <1> retn 3059 <1> 3060 <1> 3061 <1> ; INP: cl = flags indicating what kind of bb match occurred 3062 <1> ; cl & 1 set if actual hit, 3063 <1> ; else cl & 2 set if pass match, 3064 <1> ; else it is a non-pass non-hit match 3065 <1> ; (cl & 4 always set (indicates any bb match)) 3066 <1> ; cl & 8 set if pp/tt breakpoint hit 3067 <1> ; dword [ss:sp] = command repetition counter 3068 <1> ; OUT: NC if pass match or non-pass non-hit match, 3069 <1> ; if pass match: deferred message output, dumpregs output 3070 <1> ; if cl & 8 set (pass/nonpass bb, tt/pp hit): 3071 <1> ; dx = 0 3072 <1> ; ZR if [internalflags] & tt_silent_mode clear 3073 <1> ; NZ if [internalflags] & tt_silent_mode set 3074 <1> ; if cl & 8 clear (pass/nonpass bb, no tt/pp hit): 3075 <1> ; ZR 3076 <1> ; dword [ss:sp] increased by 1 3077 <1> ; dx = 1 (indicates to skip WHILE condition) 3078 <1> ; CY if actual hit (hit bb), 3079 <1> ; dx = 0 3080 <1> ; ax = INP:cx 3081 <1> ; CHG: dx, bx, cx, si, di, all high words, fs, gs 3082 <1> ; STT: ds = es = ss 3083 <1> handle_bb_hit_pass_match: 3084 <1> d5 call d5message 3085 <1> d5 asciz "in handle_bb_hit_pass_match",13,10 3086 <1> 3087 00003E5F 91 <1> xchg ax, cx 3088 <1> 3089 00003E60 F606[D500]08 <1> testopt [internalflags2], dif2_bp_failure 3090 00003E65 7569 <1> jnz .actual_hit ; after failure, handle as actual hit 3091 <1> 3092 00003E67 A801 <1> test al, 1 ; actual hit ? else: non-hit, pass or non-pass 3093 00003E69 7565 <1> jnz .actual_hit ; yes --> 3094 <1> 3095 00003E6B A802 <1> test al, 2 ; at least pass match ? 3096 00003E6D 7415 <1> jz .nonpassnonhit ; no --> 3097 <1> 3098 <1> .passnonhit: 3099 <1> 3100 <1> d5 call d5message 3101 <1> d5 asciz "bb pass non-hit",13,10 3102 <1> 3103 <1> %if _PM 3104 <1> call resetmode 3105 <1> %endif 3106 <1> ; call put_deferred_message_loud 3107 00003E6F BA[122A] <1> mov dx, msg.empty_message 3108 00003E72 8716[FC00] <1> xchg dx, word [gg_deferred_message] 3109 00003E76 E83A61 <1> call putsz 3110 00003E79 BA[C79A] <1> mov dx, putsline 3111 00003E7C E883F8 <1> call put_bb_deferred_message_calling_dx 3112 <1> 3113 00003E7F 50 <1> push ax 3114 <1> ; call dumpregs_extended_loud 3115 <1> ; (includes handle_serial_flags_ctrl_c) 3116 00003E80 E890EA <1> call dumpregs_extended 3117 00003E83 58 <1> pop ax ; (preserve so the test al, 8 can use it) 3118 <1> .nonpassnonhit: 3119 00003E84 E8EE04 <1> call handle_serial_flags_ctrl_c 3120 <1> 3121 <1> ; al & 4 always set 3122 <1> 3123 00003E87 8026[D400]E9 <1> clropt [internalflags2], dif2_gg_skip_non_cseip | dif2_gg_skip_cseip | dif2_gg_first_detected 3125 00003E8C 800E[D400]01 <1> setopt [internalflags2], dif2_gg_is_first 3126 <1> 3127 00003E91 FF36[F600] <1> push word [gg_next_cseip_linear + 2] 3128 00003E95 FF36[F400] <1> push word [gg_next_cseip_linear] 3129 00003E99 8F06[F000] <1> pop word [gg_first_cseip_linear] 3130 00003E9D 8F06[F200] <1> pop word [gg_first_cseip_linear + 2] 3131 <1> 3132 00003EA1 A808 <1> test al, 8 ; not bb hit, is tt/pp hit ? 3133 00003EA3 751C <1> jnz @FF ; yes --> 3134 <1> 3135 00003EA5 F706[D400]8010 <1> testopt [internalflags2], dif2_is_pp | dif2_tpg_keep_proceed_bp, 1 3136 00003EAB 7502 <1> jnz @F 3137 00003EAD EB12 <1> jmp @FF 3138 <1> 3139 <1> @@: 3140 <1> lframe near 3141 <1> lpar dword, counter 3142 <1> lpar_return 3143 00003EAF 5589E5 <1> lenter 3144 00003EB2 83460401 <1> add word [bp + ?counter], 1 3145 00003EB6 83560600 <1> adc word [bp + ?counter + 2], 0 3146 00003EBA 5D <1> lleave 3147 00003EBB BA0100 <1> mov dx, 1 ; skip WHILE 3148 00003EBE 38C0 <1> cmp al, al ; (NC, ZR) 3149 00003EC0 C3 <1> retn 3150 <1> 3151 <1> @@: 3152 00003EC1 31D2 <1> xor dx, dx ; no skip WHILE 3153 00003EC3 A802 <1> test al, 2 ; displayed pass point ? 3154 00003EC5 7503 <1> jnz @F ; yes --> 3155 00003EC7 A8FF <1> test al, -1 ; NC, NZ (do not skip dump) 3156 <1> ; al & 0Ch is set so this test is NZ 3157 00003EC9 C3 <1> retn 3158 <1> 3159 <1> @@: 3160 00003ECA F606[D300]10 <1> testopt [internalflags], tt_silent_mode 3161 <1> ; (NC, ZF is ZR if to skip dump) 3162 00003ECF C3 <1> retn 3163 <1> 3164 <1> .actual_hit: 3165 <1> d5 call d5message 3166 <1> d5 asciz "bb hit",13,10 3167 <1> 3168 00003ED0 31D2 <1> xor dx, dx ; no skip WHILE 3169 00003ED2 F9 <1> stc 3170 00003ED3 C3 <1> retn 3171 <1> 3172 <1> 3173 <1> %if _ATTACH 3174 <1> attach: 3175 <1> %if _BOOTLDR 3176 00003ED4 F606[D100]40 <1> testopt [internalflags], nodosloaded 3177 00003ED9 7403E97F43 <1> jnz error 3178 <1> %endif 3179 00003EDE E8FF5A <1> call skipwh0 3180 00003EE1 E87559 <1> nearcall getword 3181 00003EE4 E8B85A <1> call chkeol 3182 00003EE7 F606[D200]40 <1> testopt [internalflags], tsrmode 3183 00003EEC 7506 <1> jnz @F ; resident --> 3184 00003EEE BA[3614] <1> mov dx, msg.notyettsr 3185 <1> .putsz: 3186 00003EF1 E9BF60 <1> jmp putsz 3187 <1> 3188 <1> @@: 3189 <1> %if _PM 3190 <1> call setes2dx 3191 <1> %else 3192 00003EF4 8EC2 <1> mov es, dx 3193 <1> %endif 3194 00003EF6 26813E0000CD20 <1> cmp word [es:0], 20CDh 3195 00003EFD 7405 <1> je @F 3196 00003EFF BA[5914] <1> mov dx, msg.invalidpsp 3197 00003F02 EBED <1> jmp .putsz 3198 <1> 3199 <1> @@: 3200 00003F04 2639161600 <1> cmp word [es:16h], dx 3201 00003F09 7505 <1> jne @F 3202 00003F0B BA[8114] <1> mov dx, msg.selfownedpsp 3203 00003F0E EBE1 <1> jmp .putsz 3204 <1> 3205 <1> @@: 3206 00003F10 06 <1> push es 3207 00003F11 1F <1> pop ds 3208 00003F12 16 <1> push ss 3209 00003F13 07 <1> pop es 3210 00003F14 BE0A00 <1> mov si, TPIV 3211 00003F17 BF[1C0B] <1> mov di, psp22 3212 00003F1A A5 <1> movsw 3213 00003F1B A5 <1> movsw ; save Int22 3214 <1> %if _PM 3215 <1> mov ax, word [ss:pspdbg] 3216 <1> %else 3217 00003F1C 8CD0 <1> mov ax, ss ; => our process 3218 <1> %endif 3219 00003F1E C744FC[D046] <1> mov word [ si-4 ], int22 3220 00003F23 8944FE <1> mov word [ si-2 ], ax ; set pspInt22 (required) 3221 00003F26 BE1600 <1> mov si, 16h 3222 00003F29 A5 <1> movsw ; save parent 3223 00003F2A 8944FE <1> mov word [ si-2 ], ax ; set pspParent 3224 00003F2D 16 <1> push ss 3225 00003F2E 1F <1> pop ds 3226 00003F2F 8026[D200]BF <1> clropt [internalflags], tsrmode 3227 00003F34 BA[AC14] <1> mov dx, msg.nowattached 3228 00003F37 EBB8 <1> jmp .putsz 3229 <1> %endif 3230 <1> 3231 <1> 3232 <1> %if _TSR && (_APPLICATION || _DEVICE) 3233 <1> tsr: 3234 <1> %if _BOOTLDR 3235 00003F39 F606[D100]40 <1> testopt [internalflags], nodosloaded 3236 00003F3E 7403E91A43 <1> jnz error 3237 <1> %endif 3238 00003F43 E88FC7 <1> call guard_re 3239 00003F46 46 <1> inc si 3240 00003F47 AC <1> lodsb 3241 00003F48 E8545A <1> call chkeol 3242 00003F4B F606[D200]40 <1> testopt [internalflags], tsrmode 3243 00003F50 7405 <1> jz .try ; not yet resident --> 3244 00003F52 BA[2214] <1> mov dx, msg.alreadytsr 3245 00003F55 EB38 <1> jmp short .putsz 3246 <1> .try: 3247 00003F57 8B16[000B] <1> mov dx, word [pspdbe] 3248 00003F5B 8B1E[020B] <1> mov bx, word [pspdbg] 3249 00003F5F BF0A00 <1> mov di, 0Ah 3250 <1> .loop: 3251 <1> %if _PM 3252 <1> mov cx, dx ; = original segment address 3253 <1> call ispm 3254 <1> jnz .rm 3255 <1> push bx 3256 <1> mov ax, dx 3257 <1> [cpu 286] 3258 <1> shr dx, 12 3259 <1> shl ax, 4 ; shift to get a 32-bit linear address 3260 <1> __CPU__ 3261 <1> call getsegmented.pm ; set up selector for access 3262 <1> ; This call makes some assumptions: 3263 <1> ; - No mode switch occurs; we are still in PM. 3264 <1> ; Currently none is performed from PM. 3265 <1> ; - (e)dx isn't larger than about FFD0h. 3266 <1> ; Currently scratchsel with an offset of zero is returned. 3267 <1> call setrmlimit 3268 <1> mov di, dx ; -> PSP 3269 <1> mov dx, bx 3270 <1> pop bx 3271 <1> add di, byte 0Ah ; -> PSP termination vector 3272 <1> .rm: 3273 <1> %endif 3274 00003F62 8EC2 <1> mov es, dx 3275 00003F64 268B450C <1> mov ax, word [es:(di-0Ah)+16h] 3276 00003F68 40 <1> inc ax 3277 00003F69 741F <1> jz .pspnotfound 3278 00003F6B 48 <1> dec ax 3279 00003F6C 741C <1> jz .pspnotfound ; parent is invalid --> 3280 <1> %if _PM 3281 <1> cmp ax, cx 3282 <1> %else 3283 00003F6E 39D0 <1> cmp ax, dx 3284 <1> %endif 3285 00003F70 7418 <1> je .pspnotfound ; parent is the process itself --> 3286 00003F72 89C2 <1> mov dx, ax 3287 00003F74 39D8 <1> cmp ax, bx 3288 00003F76 75EA <1> jne .loop ; parent is not us --> 3289 00003F78 26813D[D046] <1> cmp word [es:di], int22 3290 00003F7D 7506 <1> jne .psphooked 3291 00003F7F 26395D02 <1> cmp word [es:di+2], bx 3292 00003F83 740D <1> je .found ; correct vector --> (otherwise: hooked) 3293 <1> .psphooked: 3294 00003F85 BA[C213] <1> mov dx, msg.psphooked 3295 00003F88 EB03 <1> jmp short .putsz_es 3296 <1> .pspnotfound: 3297 00003F8A BA[9713] <1> mov dx, msg.pspnotfound 3298 <1> .putsz_es: 3299 00003F8D 16 <1> push ss 3300 00003F8E 07 <1> pop es 3301 <1> .putsz: 3302 00003F8F E92160 <1> jmp putsz 3303 <1> 3304 <1> .found: 3305 00003F92 BE[1C0B] <1> mov si, psp22 3306 00003F95 A5 <1> movsw 3307 00003F96 A5 <1> movsw ; write our parent's vector 3308 00003F97 83C708 <1> add di, 16h-(0Ah+4) 3309 00003F9A A5 <1> movsw ; write our parent 3310 00003F9B 800E[D200]40 <1> setopt [internalflags], tsrmode ; note that we are resident 3311 <1> %if _PM 3312 <1> push cx 3313 <1> %else 3314 00003FA0 06 <1> push es 3315 <1> %endif 3316 00003FA1 BA[0014] <1> mov dx, msg.nowtsr1 3317 00003FA4 E8E6FF <1> call .putsz_es 3318 00003FA7 58 <1> pop ax 3319 00003FA8 BF[B40A] <1> mov di, line_out 3320 00003FAB E8DC5A <1> call hexword 3321 00003FAE E8165B <1> call putsline 3322 00003FB1 BF[1C0B] <1> mov di, psp22 3323 00003FB4 31C0 <1> xor ax, ax 3324 00003FB6 AB <1> stosw 3325 00003FB7 AB <1> stosw 3326 00003FB8 AB <1> stosw ; clear our parent/int22 fields 3327 00003FB9 BA[1014] <1> mov dx, msg.nowtsr2 3328 00003FBC EBD1 <1> jmp short .putsz 3329 <1> %endif 3330 <1> 3331 <1> 3332 <1> ; INP: dx -> message, zero-terminated 3333 <1> ; CHG: - 3334 <1> ; OUT: message displayed or put into silent buffer 3335 <1> ; STT: ds = es = ss = debugger data selector 3336 <1> putsz_silent: 3337 00003FBE E81000 <1> call silence_init 3338 00003FC1 E8EF5F <1> call putsz ; print string 3339 <1> 3340 <1> silence_exit: 3341 00003FC4 F606[D300]10 <1> testopt [internalflags], tt_silent_mode 3342 00003FC9 7405 <1> jz @F 3343 00003FCB 8026[D300]DF <1> clropt [internalflags], tt_silence 3344 <1> @@: 3345 00003FD0 C3 <1> retn 3346 <1> 3347 <1> 3348 <1> silence_init: 3349 00003FD1 F606[D300]10 <1> testopt [internalflags], tt_silent_mode 3350 00003FD6 7405 <1> jz @F 3351 00003FD8 800E[D300]20 <1> setopt [internalflags], tt_silence 3352 <1> @@: 3353 00003FDD C3 <1> retn 3354 <1> 3355 <1> 3356 <1> ; INP: es:di -> behind message in line_out 3357 <1> ; CHG: ax, bx, cx, dx 3358 <1> ; OUT: message displayed or put into silent buffer 3359 <1> ; STT: ds = es = ss = debugger data selector 3360 <1> putsline_silent: 3361 00003FDE E8F0FF <1> call silence_init 3362 00003FE1 E8E35A <1> call putsline 3363 00003FE4 EBDE <1> jmp silence_exit 3364 <1> 3365 <1> 3366 <1> ; INP: word [run_int] 3367 <1> ; InDOS status 3368 <1> ; STT: es = ds = ss 3369 <1> ; OUT: dx -> last message 3370 <1> ; message displayed 3371 <1> ; CHG: ax, di 3372 <1> putrunint: 3373 <1> %if _DEBUG && _DEBUG_COND 3374 <1> testopt [options6], opt6_debug_putrunint 3375 <1> jz @F 3376 <1> testopt [internalflags6], dif6_debug_mode 3377 <1> jnz @F 3378 <1> call reset_interrupts 3379 <1> setopt [internalflags6], dif6_debug_mode 3380 <1> setopt [options6], opt6_debug_mode 3381 <1> @@: 3382 <1> %endif 3383 <1> 3384 <1> %if _DEBUG 3385 <1> %if _DEBUG_COND 3386 <1> testopt [internalflags6], dif6_debug_mode 3387 <1> jz @F 3388 <1> %endif 3389 <1> testopt [options6], opt6_debug_putrunint_early 3390 <1> jz @F 3391 <1> int3 3392 <1> nop 3393 <1> @@: 3394 <1> %endif 3395 <1> 3396 <1> %if _AREAS_HOOK_SERVER 3397 <1> _386_PM_o32 ; push ecx 3398 <1> push cx 3399 <1> push bx 3400 <1> _386_PM_o32 ; push esi 3401 <1> push si 3402 <1> 3403 <1> mov ax, word [run_int] 3404 <1> cmp ax, int1msg 3405 <1> je .end_j 3406 <1> cmp ax, int3msg 3407 <1> je .end_j 3408 <1> %if _CATCHINT19 3409 <1> cmp ax, int19msg 3410 <1> je .end_j 3411 <1> %endif 3412 <1> cmp ax, progtrm 3413 <1> jne @F 3414 <1> .end_j: 3415 <1> jmp .end 3416 <1> 3417 <1> @@: 3418 <1> _386_PM_o32 ; xor ecx, ecx 3419 <1> xor cx, cx 3420 <1> call get_cseip_ecx_linear 3421 <1> mov bx, dx ; bx:ax = linear cs:eip 3422 <1> push ss 3423 <1> pop es 3424 <1> mov di, ddebugareas 3425 <1> xor cx, cx 3426 <1> 3427 <1> .loop: 3428 <1> %if _PM 3429 <1> mov dx, word [es:di + areastrucNext + 2] 3430 <1> mov di, word [es:di + areastrucNext] 3431 <1> call setes2dx 3432 <1> %else 3433 <1> les di, [es:di + areastrucNext] 3434 <1> mov dx, es 3435 <1> %endif 3436 <1> cmp dx, word [pspdbg] 3437 <1> je .end 3438 <1> 3439 <1> push dx 3440 <1> push di 3441 <1> push cx 3442 <1> push bx 3443 <1> push ax 3444 <1> 3445 <1> push di 3446 <1> mov cx, word [es:di + areastrucFunAmount] 3447 <1> mov di, word [es:di + areastrucFunOffset] 3448 <1> jcxz .noareafun 3449 <1> .loopareafun: 3450 <1> cmp bx, word [es:di + areastrucfunLinear + 2] 3451 <1> jne @F 3452 <1> cmp ax, word [es:di + areastrucfunLinear] 3453 <1> @@: 3454 <1> jb .nextareafun 3455 <1> 3456 <1> cmp bx, word [es:di + areastrucfunLinearEnd + 2] 3457 <1> jne @F 3458 <1> cmp ax, word [es:di + areastrucfunLinearEnd] 3459 <1> @@: 3460 <1> jae .nextareafun 3461 <1> 3462 <1> push bx 3463 <1> push ax 3464 <1> push cx 3465 <1> push di 3466 <1> 3467 <1> sub ax, word [es:di + areastrucfunLinear] 3468 <1> sbb bx, word [es:di + areastrucfunLinear + 2] 3469 <1> jnz .nextareafun_pop 3470 <1> 3471 <1> mov cx, word [es:di + areastrucfunListAmount] 3472 <1> push cx 3473 <1> mov di, word [es:di + areastrucfunListOffset] 3474 <1> repne scasw 3475 <1> pop cx 3476 <1> jne .nextareafun_pop 3477 <1> add cx, cx 3478 <1> dec di 3479 <1> dec di 3480 <1> add di, cx 3481 <1> _386_PM xor ecx, ecx 3482 <1> mov cx, word [es:di] 3483 <1> _386_PM_o32 3484 <1> mov si, word [reg_esp] 3485 <1> _386_PM_o32 3486 <1> add si, cx 3487 <1> push ds 3488 <1> %if _PM 3489 <1> mov bx, word [reg_ss] 3490 <1> call test_d_b_bit 3491 <1> mov ds, bx 3492 <1> jz .16 3493 <1> .32: 3494 <1> _386_PM_a32 3495 <1> %else 3496 <1> mov ds, word [reg_ss] 3497 <1> %endif 3498 <1> .16: 3499 <1> lodsw 3500 <1> pop ds 3501 <1> .gotfunction: 3502 <1> pop di 3503 <1> pop cx 3504 <1> pop bx ; (discard) 3505 <1> pop bx 3506 <1> 3507 <1> xchg dx, ax 3508 <1> mov bx, word [reg_cs] ; bx:dx = cs:ip 3509 <1> call getlinear_16bit ; dx:ax = linear 3510 <1> mov bx, dx ; bx:ax = linear 3511 <1> jmp .noareafun 3512 <1> 3513 <1> .nextareafun_pop: 3514 <1> pop di 3515 <1> pop cx 3516 <1> pop ax 3517 <1> pop bx 3518 <1> .nextareafun: 3519 <1> add di, AREASTRUCFUN_size 3520 <1> loop .loopareafun 3521 <1> .noareafun: 3522 <1> pop di 3523 <1> 3524 <1> mov cx, word [es:di + areastrucSubAmount] 3525 <1> mov di, word [es:di + areastrucSubOffset] 3526 <1> jcxz .noareasub 3527 <1> .loopareasub: 3528 <1> cmp bx, word [es:di + areastrucsubLinear + 2] 3529 <1> jne @F 3530 <1> cmp ax, word [es:di + areastrucsubLinear] 3531 <1> @@: 3532 <1> jb .nextareasub 3533 <1> 3534 <1> cmp bx, word [es:di + areastrucsubLinearEnd + 2] 3535 <1> jne @F 3536 <1> cmp ax, word [es:di + areastrucsubLinearEnd] 3537 <1> @@: 3538 <1> jae .nextareasub 3539 <1> 3540 <1> push bx 3541 <1> push ax 3542 <1> push cx 3543 <1> push di 3544 <1> 3545 <1> sub ax, word [es:di + areastrucsubLinear] 3546 <1> sbb bx, word [es:di + areastrucsubLinear + 2] 3547 <1> jnz .nextareasub_pop 3548 <1> 3549 <1> mov dx, ax ; = ip 3550 <1> mov si, word [es:di + areastrucsubListOffset] 3551 <1> mov cx, word [es:di + areastrucsubListAmount] 3552 <1> .looparea: 3553 <1> es lodsw 3554 <1> cmp dx, ax 3555 <1> es lodsw 3556 <1> jb .nextarea 3557 <1> cmp dx, ax 3558 <1> jae .nextarea 3559 <1> es lodsw 3560 <1> mov bx, ax ; es:bx -> area message 3561 <1> xchg ax, dx ; es:dx -> area message 3562 <1> 3563 <1> ; If we are displaying to a serial port then 3564 <1> ; we assume that we are not sharing the output 3565 <1> ; device with an areas hook client. Therefore 3566 <1> ; we want to skip the initial linebreal in the 3567 <1> ; areas message if there is one. 3568 <1> ; The linebreaks are intended to separate (shared) 3569 <1> ; output from prior output of the code that caused 3570 <1> ; the fault, eg interactive E mode prompt or 3571 <1> ; partial disassembly output. 3572 <1> cmp word [es:bx], 13 | (10 << 8) 3573 <1> ; is it with an initial linebreak ? 3574 <1> jne @F ; no --> 3575 <1> testopt [serial_flags], sf_use_serial 3576 <1> jz @F ; if not serial --> 3577 <1> inc dx 3578 <1> inc dx ; skip the linebreak 3579 <1> @@: 3580 <1> push es 3581 <1> pop ds ; => our area hook client's data selector 3582 <1> call putsz ; display ds:dx -> ASCIZ message 3583 <1> push ss 3584 <1> pop ds ; reset ds 3585 <1> pop di 3586 <1> pop cx 3587 <1> pop ax 3588 <1> pop bx 3589 <1> 3590 <1> pop ax 3591 <1> pop bx 3592 <1> pop cx 3593 <1> pop di 3594 <1> pop dx 3595 <1> 3596 <1> jmp .end 3597 <1> 3598 <1> .nextarea: 3599 <1> add si, 4 3600 <1> loop .looparea 3601 <1> 3602 <1> .nextareasub_pop: 3603 <1> pop di 3604 <1> pop cx 3605 <1> pop ax 3606 <1> pop bx 3607 <1> .nextareasub: 3608 <1> add di, AREASTRUCSUB_size 3609 <1> loop .loopareasub 3610 <1> .noareasub: 3611 <1> 3612 <1> .next: 3613 <1> pop ax 3614 <1> pop bx 3615 <1> pop cx 3616 <1> pop di 3617 <1> %if _PM 3618 <1> pop dx 3619 <1> call setes2dx 3620 <1> %else 3621 <1> pop es 3622 <1> %endif 3623 <1> loop .loop_j 3624 <1> jmp .end 3625 <1> 3626 <1> .loop_j: 3627 <1> jmp .loop 3628 <1> 3629 <1> .end: 3630 <1> _386_PM_o32 ; pop esi 3631 <1> pop si 3632 <1> pop bx 3633 <1> _386_PM_o32 ; pop ecx 3634 <1> pop cx 3635 <1> %endif 3636 00003FE6 16 <1> push ss 3637 00003FE7 07 <1> pop es 3638 <1> 3639 <1> .noarea: 3640 00003FE8 8B16[000C] <1> mov dx, word [run_int] 3641 00003FEC 81FA[FF3B] <1> cmp dx, progtrm 3642 00003FF0 7515 <1> jne .done 3643 <1> 3644 00003FF2 B8FFFF <1> mov ax, -1 3645 00003FF5 E87845 <1> call InDOS 3646 00003FF8 7504 <1> jnz .no_int21_4D 3647 <1> 3648 00003FFA B44D <1> mov ah, 4Dh 3649 00003FFC CD21 <1> int 21h 3650 <1> .no_int21_4D: 3651 00003FFE A3[2245] <1> mov word [usertermcode], ax 3652 00004001 BF[1E3C] <1> mov di, progexit 3653 00004004 E8835A <1> call hexword 3654 <1> .done: 3655 00004007 E9A95F <1> jmp putsz 3656 <1> 3657 <1> 3658 <1> usesection lDEBUG_DATA_ENTRY 3659 <1> align 2, db 0 3660 00004522 0000 <1> usertermcode: dw 0 3661 <1> usesection lDEBUG_CODE 3662 <1> 3663 <1> 3664 <1> ; Print message about unexpected interrupt, dump registers, and 3665 <1> ; end command. This code is also used by the G and P commands. 3666 <1> unexpectedinterrupt: 3667 <1> %if _PM 3668 <1> call resetmode 3669 <1> %endif 3670 0000400A E8C4FF <1> call silence_init 3671 0000400D E8D6FF <1> call putrunint 3672 00004010 E8B1FF <1> call silence_exit 3673 <1> %if _CATCHINT19 3674 00004013 81FA[4C3A] <1> cmp dx, int19msg 3675 00004017 7409 <1> je .noregs ; if it terminated, skip the registers 3676 <1> %endif 3677 00004019 81FA[FF3B] <1> cmp dx, progtrm 3678 0000401D 7403 <1> je .noregs ; if it terminated, skip the registers 3679 0000401F E84A03 <1> call dumpregs_extended_silent 3680 <1> .noregs: 3681 00004022 E8FE02 <1> call terminate_silent_dump.if_nonnull 3682 00004025 E86F5E <1> call silence_dump 3683 <1> 3684 00004028 F606[D400]08 <1> testopt [internalflags2], dif2_gg_is_gg 3685 0000402D 7407 <1> jz @F 3686 0000402F F606[A200]20 <1> testopt [options], gg_unexpected_no_repeat 3687 00004034 EB05 <1> jmp @FF 3688 <1> @@: 3689 00004036 F606[A200]40 <1> testopt [options], tp_unexpected_no_repeat 3690 <1> @@: 3691 0000403B 7406 <1> jz @F 3692 0000403D C706[020C][F504] <1> mov word [lastcmd], dmycmd 3693 <1> @@: 3694 <1> 3695 00004043 E9BABF <1> jmp cmd3 ; back to the start 3696 <1> 3697 <1> 3698 <1> ; Trace an instruction. 3699 <1> ; INP: word [reg_cs], dword [reg_eip], other register values 3700 <1> ; OUT: NC if the breakpoint or trace interrupt was hit, 3701 <1> ; ah = 0 3702 <1> ; ch = 0 3703 <1> ; d[reg_eip] adjusted if a breakpoint (bb) hit 3704 <1> ; cx & 8 set if trace interrupt hit 3705 <1> ; (assumed to be the expected trace hit) 3706 <1> ; (ZF only set if _BREAKPOINTS) 3707 <1> ; ZR if trace interrupt was hit, 3708 <1> ; cx & 7 = 0 3709 <1> ; NZ if a breakpoint (bb) was hit (or both were hit), 3710 <1> ; cx & 1 set if non-pass match (actual hit), 3711 <1> ; else cx & 2 set if pass match (consider as hit first, 3712 <1> ; but dump registers next (not to silent buffer) 3713 <1> ; and then continue execution) 3714 <1> ; else cx & 4 always set, indicates any match 3715 <1> ; (including matches that should merely continue) 3716 <1> ; all pass points' counters stepped 3717 <1> ; CY if no breakpoint and no trace interrupt was hit, 3718 <1> ; cx = 0 3719 <1> ; If [internalflags2] & dif2_gg_is_gg is set: 3720 <1> ; ah & 7Fh = status = 0 = no error, 3721 <1> ; 1 = couldn't write, 3722 <1> ; 2 = unreachable, 3723 <1> ; 3 = overwritten, al = new value 3724 <1> ; ah & 80h = set if error restoring point, 3725 <1> ; else error writing point to begin with 3726 <1> ; If that flag is clear: 3727 <1> ; Does not return if a breakpoint cannot be written 3728 <1> ; or cannot be restored, jumps to cmd3 instead. 3729 <1> ; CHG: all 3730 <1> ; STT: ds = es = ss 3731 <1> ; might return modeswitched (if dif2_gg_is_gg) 3732 <1> ; might be called while modeswitched 3733 <1> traceone: 3734 00004046 F606[D400]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 3735 0000404B 7403E97D00 <1> jnz .proceedbreakpoint 3736 <1> 3737 <1> %if _PM 3738 <1> call resetmode 3739 <1> %endif 3740 00004050 31C9 <1> xor cx, cx 3741 00004052 E89734 <1> call getcseipbyte 3742 00004055 3CCD <1> cmp al, 0CDh ; int opcode? 3743 00004057 7577 <1> jne .isstdtrace ; no --> 3744 00004059 41 <1> inc cx 3745 0000405A E88F34 <1> call getcseipbyte 3746 0000405D 3C03 <1> cmp al, 3 3747 0000405F 746F <1> je .isstdtrace ; int 3 opcode --> 3748 00004061 F606[A000]02 <1> testopt [options], traceints ; TM=1? 3749 00004066 7503E9AA00 <1> jz isstdtraceX 3750 <1> %if _IMMASM 3751 <1> testopt [internalflags6], dif6_immasm 3752 <1> jnz isstdtraceX 3753 <1> %endif 3754 0000406B 3C01 <1> cmp al, 1 3755 0000406D 7461 <1> je .isstdtrace ; int 1 opcode --> 3756 <1> 3757 <1> ; TM==1, single-step into the INT 3758 0000406F 88C3 <1> mov bl, al 3759 <1> %if _PM 3760 <1> call ispm 3761 <1> jz .singlestep_into_interrupt_pm 3762 <1> %endif 3763 00004071 B700 <1> mov bh, 0 3764 00004073 1E <1> push ds 3765 00004074 31C0 <1> xor ax, ax 3766 00004076 8ED8 <1> mov ds, ax 3767 00004078 D1E3 <1> shl bx, 1 3768 0000407A D1E3 <1> shl bx, 1 3769 0000407C C537 <1> lds si, [bx] 3770 0000407E FA <1> cli 3771 0000407F 8A04 <1> mov al, byte [si] 3772 00004081 FE04 <1> inc byte [si] 3773 00004083 3804 <1> cmp byte [si], al 3774 00004085 8804 <1> mov byte [si], al 3775 00004087 FB <1> sti 3776 00004088 8CDB <1> mov bx, ds ; bx:si-> interrupt handler (RM, 16 bit) 3777 0000408A 89D8 <1> mov ax, bx 3778 0000408C 1F <1> pop ds 3779 0000408D 753E <1> jne .singlestep_into_interrupt_setbp 3780 <1> 3781 <1> ; The interrupt handler is in a ROM. 3782 <1> %if 0 3783 <1> jmp short isstdtraceX 3784 <1> %else 3785 0000408F 8736[DC0C] <1> xchg si, word [reg_eip] 3786 00004093 8706[D00C] <1> xchg ax, word [reg_cs] ; get cs:ip, set interrupt handler address 3787 00004097 8B0E[E00C] <1> mov cx, word [reg_efl] ; get flags 3788 0000409B 1E <1> push ds 3789 0000409C 8B1E[B40C] <1> mov bx, word [reg_esp] 3790 000040A0 8E1E[CC0C] <1> mov ds, word [reg_ss] ; ds:bx-> debuggee stack 3791 000040A4 83EB06 <1> sub bx, byte 6 ; reserve enough space for flags, cs, ip 3792 000040A7 46 <1> inc si 3793 000040A8 46 <1> inc si ; skip CDh xxh opcode 3794 000040A9 894F04 <1> mov word [bx+4], cx 3795 000040AC 894702 <1> mov word [bx+2], ax 3796 000040AF 8937 <1> mov word [bx+0], si ; save flags, cs, ip on stack 3797 000040B1 1F <1> pop ds 3798 000040B2 891E[B40C] <1> mov word [reg_esp], bx ; update sp 3799 000040B6 8026[E10C]FC <1> and byte [reg_efl+1], ~(2|1) ; clear IF and TF (NC) 3800 <1> ; Note: If invalid flag values were previously set by the user 3801 <1> ; by directly accessing the FL or EFL register, these won't be 3802 <1> ; fixed by us now. This could be worked around by executing a 3803 <1> ; NOP in debuggee's environment (or only with debuggee's flags) 3804 <1> ; first, but I don't think it's much of an issue. 3805 000040BB C706[000C][1539] <1> mov word [run_int], int1msg 3806 000040C1 8126[D400]7FF8 <1> clropt [internalflags2], dif2_tpg_have_bp | dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust | dif2_tpg_keep_proceed_bp, 1 3809 000040C7 B90800 <1> mov cx, 8 3810 000040CA 31C0 <1> xor ax, ax ; NC, ZR 3811 000040CC C3 <1> retn 3812 <1> 3813 <1> %endif 3814 <1> %if _PM 3815 <1> .singlestep_into_interrupt_pm: 3816 <1> mov ax, 0204h 3817 <1> int 31h 3818 <1> mov bx, cx 3819 <1> _386_o32 ; mov esi, edx 3820 <1> mov si, dx ; bx:(e)si-> interrupt handler 3821 <1> test bl, 4 ; is it a LDT selector? (NC) 3822 <1> jz isstdtraceX ; no --> 3823 <1> %endif 3824 <1> .singlestep_into_interrupt_setbp: 3825 <1> .proceedbreakpoint: 3826 000040CD E95504 <1> jmp proceedbreakpoint 3827 <1> 3828 <1> .isstdtrace: 3829 <1> %if _PM 3830 <1> call ispm 3831 <1> jz .notdpmientry ; already in PM --> 3832 <1> mov ax, w[reg_eip] ; is this a switch to protected mode ? 3833 <1> cmp ax, w[dpmiwatch+0] 3834 <1> jne .notdpmientry 3835 <1> mov ax, w[reg_cs] 3836 <1> cmp ax, w[dpmiwatch+2] 3837 <1> je isdpmientry ; yes, catch it --> (this means really "go") 3838 <1> .notdpmientry: 3839 <1> %endif 3840 000040D0 800E[E10C]01 <1> or byte [reg_efl+1], 1 ; set single-step mode (cleared when returning into DEBUG) 3841 000040D5 31C9 <1> xor cx, cx 3842 000040D7 E85100 <1> call skipprefixes 3843 000040DA 3C9C <1> cmp al, 9Ch ; opcode "PUSHF"? 3844 000040DC 7517 <1> jnz .notpushf 3845 <1> %if _BREAKPOINTS 3846 000040DE E8E004 <1> call run_with_bb 3847 000040E1 B400 <1> mov ah, 0 3848 000040E3 9C <1> pushf 3849 <1> %else 3850 <1> call run 3851 <1> xor cx, cx 3852 <1> xor ax, ax 3853 <1> %endif 3854 <1> ; Clear TF in the fl word or efl dword 3855 <1> ; pointed to by debuggee's ss:(e)sp 3856 000040E4 06 <1> push es 3857 <1> %if _PM 3858 <1> mov bx, word [reg_ss] ; get ss selector into bx 3859 <1> mov es, bx 3860 <1> _386 call test_d_b_bit ; check whether a 32-bit ss 3861 <1> %else 3862 000040E5 8E06[CC0C] <1> mov es, word [reg_ss] 3863 <1> %endif 3864 <1> _386_PM_o32 ; mov ebx, dword [reg_esp] 3865 000040E9 8B1E[B40C] <1> mov bx, word [reg_esp] ; es:(e)bx-> debuggee's stack 3866 <1> _386_PM jz .pushf_16 3867 <1> _386_PM and byte [es:ebx+1], ~1 ; clear TF 3868 <1> _386_PM jmp short .pushf_common 3869 <1> .pushf_16: 3870 000040ED 26806701FE <1> and byte [es:bx+1], ~1 ; clear TF 3871 <1> .pushf_common: 3872 000040F2 07 <1> pop es 3873 000040F3 EB06 <1> jmp short .checkreturn 3874 <1> .notpushf: 3875 <1> %if _BREAKPOINTS 3876 000040F5 E8C904 <1> call run_with_bb 3877 000040F8 B400 <1> mov ah, 0 3878 000040FA 9C <1> pushf 3879 <1> %else 3880 <1> call run 3881 <1> xor cx, cx 3882 <1> xor ax, ax 3883 <1> %endif 3884 <1> .checkreturn: 3885 000040FB 813E[000C][1539] <1> cmp word [run_int], int1msg 3886 00004101 7509 <1> jne .nomatch 3887 00004103 80C908 <1> or cl, 8 3888 <1> %if _BREAKPOINTS 3889 00004106 9D <1> popf ; CF 3890 00004107 7308 <1> jnc .ret_NZ_NC 3891 <1> %endif 3892 00004109 38C0 <1> cmp al, al ; if correct interrupt (ZR, NC) 3893 0000410B C3 <1> retn 3894 <1> 3895 <1> .nomatch: 3896 <1> %if _BREAKPOINTS 3897 0000410C 9D <1> popf ; CF 3898 0000410D 7302 <1> jnc .ret_NZ_NC 3899 <1> %endif 3900 0000410F F9 <1> stc 3901 00004110 C3 <1> retn 3902 <1> 3903 <1> %if _BREAKPOINTS 3904 <1> .ret_NZ_NC: 3905 00004111 80C904 <1> or cl, 4 ; (NZ, NC) 3906 00004114 C3 <1> retn 3907 <1> %endif 3908 <1> 3909 <1> 3910 <1> ; an INT is to be processed (TM is 0) 3911 <1> ; to avoid the nasty x86 bug which makes IRET 3912 <1> ; cause a debug exception 1 instruction too late 3913 <1> ; a breakpoint is set behind the INT 3914 <1> 3915 <1> isstdtraceX: 3916 00004115 B90200 <1> mov cx, 2 3917 00004118 E84600 <1> call iswriteablecseip ; is it ROM ? 3918 0000411B 72B3 <1> jc traceone.isstdtrace ; is read-only --> 3919 0000411D 8B1E[D00C] <1> mov bx, word [reg_cs] 3920 <1> 3921 <1> ; (e)si = (e)ip + 2 3922 <1> ; We don't test whether it's a 32-bit code segment here. 3923 <1> ; The previous code would leave the high word of esi uninitialized then. 3924 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 3925 00004121 8B36[DC0C] <1> mov si, word [reg_eip] 3926 <1> _386_PM_o32 ; add esi, byte 2 3927 00004125 83C602 <1> add si, byte 2 ; ! do not remove the byte override, else o32 won't work 3928 00004128 E9FA03 <1> jmp proceedbreakpoint ; set BP at BX:(E)SI and run debuggee 3929 <1> 3930 <1> ; Call getcseipbyte and loop while increasing cx if the returned 3931 <1> ; byte was a prefix. Returns the first non-prefix byte (an opcode) 3932 <1> ; in al. (WAIT or FWAIT is not considered a prefix because it's 3933 <1> ; really an opcode and we also trace it without executing a 3934 <1> ; following FPU opcode.) 3935 <1> skipprefixes: 3936 <1> .: 3937 0000412B E8BE33 <1> call getcseipbyte 3938 0000412E 3C26 <1> cmp al, 26h 3939 00004130 742A <1> je .prefix ; ES 3940 00004132 3C2E <1> cmp al, 2Eh 3941 00004134 7426 <1> je .prefix ; CS 3942 00004136 3C36 <1> cmp al, 36h 3943 00004138 7422 <1> je .prefix ; SS 3944 0000413A 3C3E <1> cmp al, 3Eh 3945 0000413C 741E <1> je .prefix ; DS 3946 0000413E 3CF0 <1> cmp al, 0F0h 3947 00004140 741A <1> je .prefix ; LOCK 3948 00004142 3CF3 <1> cmp al, 0F3h 3949 00004144 7416 <1> je .prefix ; REPZ 3950 00004146 3CF2 <1> cmp al, 0F2h 3951 00004148 7412 <1> je .prefix ; REPNZ 3952 0000414A EB14 <1> _no386_jmps .noprefix ; no 386, following aren't prefixes (invalid opcodes on 186+) --> 3953 0000414C 3C64 <1> cmp al, 64h 3954 0000414E 740C <1> je .prefix ; FS 3955 00004150 3C65 <1> cmp al, 65h 3956 00004152 7408 <1> je .prefix ; GS 3957 00004154 3C66 <1> cmp al, 66h 3958 00004156 7404 <1> je .prefix ; o32/o16 3959 00004158 3C67 <1> cmp al, 67h 3960 0000415A 7504 <1> jne .noprefix ; not a32/a16 3961 <1> .prefix: 3962 0000415C 41 <1> inc cx 3963 <1> ; jmp short . 3964 0000415D 79CC <1> jns . ; this is not correct but serves as hack to avoid an infinite loop 3965 <1> ; (note that getcseipbyte really uses cx as signed number) 3966 0000415F 49 <1> dec cx ; back to 07FFFh 3967 <1> .noprefix: 3968 00004160 C3 <1> retn 3969 <1> 3970 <1> 3971 <1> ;--- test if memory at CS:E/IP can be written to 3972 <1> ;--- return C if not 3973 <1> 3974 <1> iswriteablecseip: 3975 00004161 E88833 <1> call getcseipbyte ; get byte at CS:EIP+CX 3976 00004164 88C4 <1> mov ah, al 3977 00004166 34FF <1> xor al, 0FFh 3978 00004168 E89133 <1> call setcseipbyte 3979 0000416B 720E <1> jc .return 3980 0000416D E87C33 <1> call getcseipbyte 3981 00004170 38C4 <1> cmp ah, al ; is it ROM? 3982 00004172 F9 <1> stc 3983 00004173 7406 <1> jz .return 3984 00004175 88E0 <1> mov al, ah 3985 00004177 E88233 <1> call setcseipbyte 3986 0000417A F8 <1> clc 3987 <1> .return: 3988 0000417B C3 <1> retn 3989 <1> 3990 <1> 3991 <1> %if _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 3992 <1> usesection lDEBUG_DATA_ENTRY 3993 <1> 3994 <1> r86m_debugger_exception: 3995 00004524 FA <1> cli 3996 00004525 8CC8 <1> mov ax, cs 3997 00004527 8ED8 <1> mov ds, ax ; => debugger data segment 3998 00004529 8F06[944A] <1> pop word [exception_csip] ; ip 3999 0000452D 8F06[964A] <1> pop word [exception_csip + 2] ; cs 4000 00004531 5A <1> pop dx ; get rid of flags 4001 <1> %if _AREAS 4002 00004532 FC <1> cld 4003 00004533 8EC0 <1> mov es, ax 4004 00004535 89E6 <1> mov si, sp 4005 00004537 BF[984A] <1> mov di, exception_stack 4006 0000453A B90800 <1> mov cx, 8 4007 0000453D F3A4 <1> rep movsb 4008 <1> %endif 4009 0000453F 8ED0 <1> mov ss, ax 4010 <1> %ifn _ONLY386 4011 <1> ..@patch_no386_ds_6_DATA_ENTRY: 4012 00004541 66 <1> o32 ; mov esp, dword [savesp] 4013 <1> %endif 4014 00004542 8B26[EC0A] <1> mov sp, word [savesp] 4015 00004546 90 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 4016 00004547 E8FDFA <1> call entry_to_code_seg 4017 0000454A [7C41] <1> dw .code 4018 <1> 4019 <1> usesection lDEBUG_CODE 4020 <1> .code: 4021 0000417C FB <1> sti 4022 <1> %endif 4023 <1> %if _PM || _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 4024 <1> debuggerexception: 4025 0000417D FC <1> cld 4026 0000417E 16 <1> push ss 4027 0000417F 1F <1> pop ds 4028 <1> %if _DEBUG && _DEBUG_COND 4029 <1> testopt [options6], opt6_debug_exception 4030 <1> jz @F 4031 <1> testopt [internalflags6], dif6_debug_mode 4032 <1> jnz @F 4033 <1> call reset_interrupts 4034 <1> setopt [internalflags6], dif6_debug_mode 4035 <1> setopt [options6], opt6_debug_mode 4036 <1> @@: 4037 <1> %endif 4038 <1> 4039 <1> %if _DEBUG 4040 <1> %if _DEBUG_COND 4041 <1> testopt [internalflags6], dif6_debug_mode 4042 <1> jz @F 4043 <1> %endif 4044 <1> testopt [options6], opt6_debug_exception_early 4045 <1> jz @F 4046 <1> int3 4047 <1> nop 4048 <1> @@: 4049 <1> %endif 4050 00004180 E8BC43 <1> call unhack ; sets es to ss 4051 <1> 4052 <1> %if _AREAS 4053 00004183 8CCB <1> mov bx, cs 4054 00004185 3B1E[964A] <1> cmp bx, word [exception_csip + 2] 4055 00004189 7532 <1> jne .unknownarea 4056 0000418B A1[944A] <1> mov ax, word [exception_csip] 4057 0000418E BF[C045] <1> mov di, areafunctions 4058 00004191 B90500 <1> mov cx, areafunctions.amount 4059 00004194 F2AF <1> repne scasw 4060 00004196 7508 <1> jne .unknownfunction 4061 00004198 BB[984A] <1> mov bx, exception_stack 4062 0000419B 035D08 <1> add bx, word [di - areafunctions - 2 + areafunctions.skip] 4063 0000419E 8B07 <1> mov ax, [bx] 4064 <1> .gotfunction: 4065 <1> 4066 <1> .unknownfunction: 4067 000041A0 89C2 <1> mov dx, ax ; = ip 4068 000041A2 BE[5045] <1> mov si, areas 4069 000041A5 B90E00 <1> mov cx, areas.amount 4070 <1> .looparea: 4071 000041A8 AD <1> lodsw 4072 000041A9 39C2 <1> cmp dx, ax 4073 000041AB AD <1> lodsw 4074 000041AC 720B <1> jb .nextarea 4075 000041AE 39C2 <1> cmp dx, ax 4076 000041B0 7307 <1> jae .nextarea 4077 000041B2 AD <1> lodsw 4078 000041B3 92 <1> xchg ax, dx 4079 000041B4 E8FC5D <1> call putsz 4080 000041B7 EB04 <1> jmp .donearea 4081 <1> .nextarea: 4082 000041B9 AD <1> lodsw 4083 000041BA AD <1> lodsw 4084 000041BB E2EB <1> loop .looparea 4085 <1> 4086 <1> .donearea: 4087 <1> .unknownarea: 4088 <1> %endif 4089 000041BD E828FE <1> call putrunint.noarea 4090 <1> %if _EXCCSIP 4091 000041C0 BF[653A] <1> mov di, exccsip 4092 000041C3 A1[964A] <1> mov ax, word [exception_csip + 2] 4093 000041C6 E8C158 <1> call hexword 4094 000041C9 47 <1> inc di 4095 000041CA A1[944A] <1> mov ax, word [exception_csip] 4096 000041CD E8BA58 <1> call hexword 4097 <1> 4098 000041D0 BA[5F3A] <1> mov dx, excloc 4099 000041D3 E8DD5D <1> call putsz 4100 <1> %endif 4101 <1> %if _DEBUG 4102 <1> %if _DEBUG_COND 4103 <1> testopt [internalflags6], dif6_debug_mode 4104 <1> jz @F 4105 <1> %endif 4106 <1> testopt [options6], opt6_debug_exception_late 4107 <1> jz @F 4108 <1> int3 4109 <1> @@: 4110 <1> %endif 4111 000041D6 E927BE <1> jmp cmd3 4112 <1> %endif ; _PM || _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 4113 <1> 4114 <1> 4115 <1> %if _AREAS 4116 <1> usesection lDEBUG_DATA_ENTRY 4117 <1> 4118 <1> %imacro areadefine 1-2.nolist 4119 <1> dw ..@%1_start 4120 <1> dw ..@%1_end 4121 <1> %ifempty %2 4122 <1> dw msg.area_%1 4123 <1> %else 4124 <1> dw msg.area_%2 4125 <1> %endif 4126 <1> dw 0 4127 <1> %endmacro 4128 <1> 4129 <1> %define AREAFUNCTIONS "" 4130 <1> %define AREAFUNCTIONSSKIP "" 4131 <1> %imacro areafunctiondefine 2.nolist 4132 <1> %xdefine AREAFUNCTIONS AREAFUNCTIONS,%1 4133 <1> %xdefine AREAFUNCTIONSSKIP AREAFUNCTIONSSKIP,%2 4134 <1> %endmacro 4135 <1> 4136 0000454C 00 <1> align 8, db 0 4137 <1> areas: 4138 <1> .: 4139 <1> ; More specific areas first! 4140 <1> ; (The first range match wins.) 4141 00004550 [DF67][2269][6C3B]- <1> areadefine ee_interactive_access 4141 00004556 0000 <1> 4142 <1> %ifn _DUALCODE && _EXPRDUALCODE 4143 00004558 [C495][E895][713A]- <1> areadefine hh_indirection_memory_access 4143 0000455E 0000 <1> 4144 <1> %else 4145 <1> areadefine hh_code1_indirection_memory_access, hh_indirection_memory_access 4146 <1> %endif 4147 00004560 [6823][9423][903A]- <1> areadefine rr_variable_read_access 4147 00004566 0000 <1> 4148 00004568 [3825][8E25][B43A]- <1> areadefine rr_variable_write_access 4148 0000456E 0000 <1> 4149 00004570 [E14F][F350][D93A]- <1> areadefine uu_referenced_memory_access 4149 00004576 0000 <1> 4150 00004578 [A652][C052][013B]- <1> areadefine uu_simulate_scas 4150 0000457E 0000 <1> 4151 00004580 [C052][DA52][253B]- <1> areadefine uu_simulate_cmps 4151 00004586 0000 <1> 4152 00004588 [FB06][4414][493B]- <1> areadefine aa_access 4152 0000458E 0000 <1> 4153 00004590 [4414][8321][5A3B]- <1> areadefine dd_access 4153 00004596 0000 <1> 4154 00004598 [8667][2269][6E3B]- <1> areadefine ee_access 4154 0000459E 0000 <1> 4155 000045A0 [8321][F531][813B]- <1> areadefine rr_access 4155 000045A6 0000 <1> 4156 000045A8 [697C][A27E][9A3B]- <1> areadefine sss_access 4156 000045AE 0000 <1> 4157 000045B0 [8533][1849][B13B]- <1> areadefine run_access 4157 000045B6 0000 <1> 4158 000045B8 [C849][EB5C][C53B]- <1> areadefine uu_access 4158 000045BE 0000 <1> 4159 <1> .end: 4160 <1> .amount: equ (.end - .) / 8 4161 <1> 4162 <1> %if _DUALCODE && _EXPRDUALCODE 4163 <1> areas2: 4164 <1> .: 4165 <1> areadefine hh_indirection_memory_access 4166 <1> .end: 4167 <1> .amount: equ (.end - .) / 8 4168 <1> %endif 4169 <1> 4170 <1> areafunctiondefine ..@readmem_fault_skip_4_near_call, 4 4171 <1> areafunctiondefine ..@writemem_fault_skip_4_near_call_a, 4 4172 <1> areafunctiondefine ..@writemem_fault_skip_4_near_call_b, 4 4173 <1> areafunctiondefine ..@getcseipbyte_fault_skip_2_near_call, 2 4174 <1> areafunctiondefine ..@setcseipbyte_fault_skip_2_near_call, 2 4175 <1> %if _PM 4176 <1> areafunctiondefine ..@readmem_fault_skip_2_near_call, 2 4177 <1> areafunctiondefine ..@writemem_fault_skip_2_near_call_a, 2 4178 <1> areafunctiondefine ..@writemem_fault_skip_2_near_call_b, 2 4179 <1> areafunctiondefine ..@getcseipbyte_fault_skip_6_near_call, 6 4180 <1> areafunctiondefine ..@setcseipbyte_fault_skip_6_near_call, 6 4181 <1> %endif 4182 <1> 4183 <1> 4184 <1> align 2, db 0 4185 <1> areafunctions: 4186 <1> .: 4187 000045C0 [2575][1575][1775]- <1> dw AREAFUNCTIONS 4187 000045C6 [F774][0775] <1> 4188 <1> .end: 4189 <1> .amount: equ (.end - .) / 2 4190 <1> .skip: 4191 000045CA 040004000400020002- <1> dw AREAFUNCTIONSSKIP 4191 000045D3 00 <1> 4192 <1> 4193 <1> 4194 <1> %if _AREAS_HOOK_CLIENT 4195 <1> areas_struc: 4196 <1> istruc AREASTRUC 4197 <1> at areastrucEntry 4198 <1> stc 4199 <1> retf 4200 <1> at areastrucNext, dd -1 4201 <1> at areastrucPrev, dd -1 4202 <1> at areastrucSubAmount, dw areas_sub_amount 4203 <1> at areastrucSubOffset, dw areas_sub 4204 <1> at areastrucFunAmount, dw 1 4205 <1> at areastrucFunOffset, dw areas_fun 4206 <1> iend 4207 <1> 4208 <1> areas_sub: 4209 <1> istruc AREASTRUCSUB 4210 <1> at areastrucsubLinear, dd 0 4211 <1> at areastrucsubLinearEnd, dd ldebug_code_size 4212 <1> at areastrucsubListOffset, dw areas 4213 <1> at areastrucsubListAmount, dw areas.amount 4214 <1> iend 4215 <1> %if _DUALCODE && _EXPRDUALCODE 4216 <1> istruc AREASTRUCSUB 4217 <1> at areastrucsubLinear, dd 0 4218 <1> at areastrucsubLinearEnd, dd ldebug_code2_size 4219 <1> at areastrucsubListOffset, dw areas2 4220 <1> at areastrucsubListAmount, dw areas2.amount 4221 <1> iend 4222 <1> %endif 4223 <1> areas_sub_amount equ ($ - areas_sub) / AREASTRUCSUB_size 4224 <1> 4225 <1> areas_fun: 4226 <1> istruc AREASTRUCFUN 4227 <1> at areastrucfunLinear, dd 0 4228 <1> at areastrucfunLinearEnd, dd ldebug_code_size 4229 <1> at areastrucfunListOffset, dw areafunctions 4230 <1> at areastrucfunListAmount, dw areafunctions.amount 4231 <1> iend 4232 <1> %endif 4233 <1> 4234 <1> usesection lDEBUG_CODE 4235 <1> %endif 4236 <1> 4237 <1> 4238 <1> %if _PM 4239 <1> [cpu 386] 4240 <1> ; INP: dh = flags as for pp2,pp3,pp5 (1 = ASIZE, 2 = OSIZE) 4241 <1> ; OUT: dh = flags as used by pp3,pp5 (1 = A32, 2 = O32) 4242 <1> pp_fix32bitflags: 4243 <1> call test_d_b_bit 4244 <1> jz .16 4245 <1> xor dh, 1|2 ; toggle OSIZE and ASIZE (once) 4246 <1> .16: 4247 <1> retn 4248 <1> __CPU__ 4249 <1> %endif 4250 <1> 4251 <1> ; P command - proceed (i.e., skip over call/int/loop/string instruction). 4252 <1> pp: 4253 <1> %if _RH 4254 000041D9 E8A5E9 <1> call enable_rh 4255 <1> %endif 4256 000041DC C706[020C][D941] <1> mov word [lastcmd], pp 4257 000041E2 800E[D500]10 <1> setopt [internalflags2], dif2_is_pp 4258 000041E7 E87105 <1> call parse_pt ; process arguments 4259 <1> 4260 <1> ; Do it times. First check the type of instruction. 4261 <1> pp1: 4262 000041EA 53 <1> push bx 4263 000041EB 51 <1> push cx ; save bx:cx 4264 <1> %if _PM 4265 <1> call resetmode 4266 <1> %endif 4267 000041EC BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 4268 000041EF 8B1E[D00C] <1> mov bx, word [reg_cs] 4269 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 4270 000041F3 8B36[DC0C] <1> mov si, word [reg_eip] 4271 <1> pp2: 4272 000041F7 E8C103 <1> call pp16 ; get next instruction byte into AL 4273 000041FA BF[6411] <1> mov di, ppbytes 4274 000041FD B92000 <1> mov cx, PPLEN 4275 00004200 A2[0601] <1> mov byte [pp_instruction], al 4276 00004203 F2AE <1> repne scasb 4277 00004205 752A <1> jne pp5 ; if not one of these --> 4278 00004207 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 4279 0000420A A880 <1> test al, PP_PREFIX ; prefix ? 4280 0000420C 740F <1> jz pp3 ; no --> 4281 0000420E 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 4282 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 4283 <1> ; between decoding as O32 and O16, they're always 4284 <1> ; decoded as O32. The same is true for A32, and 4285 <1> ; in a 32-bit cs for O16 and A16. 4286 00004210 FECA <1> dec dl 4287 00004212 75E3 <1> jnz pp2 ; if not out of bytes --> 4288 00004214 BA[882B] <1> mov dx, msg.warnprefix 4289 00004217 E8995D <1> call putsz 4290 0000421A E9B500 <1> jmp pp12 4291 <1> 4292 <1> ; A repeatable string, interrupt, call immediate or loop 4293 <1> ; instruction is to be decoded. Finish the decoding and 4294 <1> ; skip the appropriate number of opcode bytes. 4295 <1> pp3: 4296 <1> _386_PM call pp_fix32bitflags 4297 <1> _386_PM_o32 4298 0000421D 8936[0C01] <1> mov word [pp_operand], si 4299 00004221 A840 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 4300 00004223 7405 <1> jz .ignoreosize ; no --> 4301 00004225 80E602 <1> and dh, 2 4302 00004228 00F0 <1> add al, dh 4303 <1> .ignoreosize: 4304 0000422A 83E007 <1> and ax, PP_SIZ_MASK 4305 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 4306 <1> _386_PM_o32 ; add esi, eax 4307 0000422D 01C6 <1> add si, ax 4308 0000422F EB55 <1> jmp pp10 4309 <1> 4310 <1> 4311 <1> pp5: 4312 <1> _386_PM call pp_fix32bitflags 4313 00004231 3CFF <1> cmp al, 0FFh ; FF/2 or FF/3 indirect NEAR or FAR call ? 4314 00004233 7403E99A00 <1> jne pp12 ; no, just an ordinary instruction --> 4315 00004238 E88003 <1> call pp16 ; get MOD REG R/M byte 4316 0000423B 24F7 <1> and al, ~ (1 << 3) ; clear lowest bit of REG field (/3 to /2) 4317 0000423D 3410 <1> xor al, 2 << 3 ; /3 or /2 to /0 4318 0000423F A838 <1> test al, 7 << 3 4319 00004241 7403E98C00 <1> jnz pp12 ; if not FF/2 or FF/3 --> 4320 00004246 3CC0 <1> cmp al, 0C0h ; mod = 3 ? 4321 00004248 733C <1> jae .adjust0 ; if just a register --> 4322 0000424A F6C601 <1> test dh, 1 4323 0000424D 750E <1> jnz .a32 ; if 32-bit addressing --> 4324 0000424F 3C06 <1> cmp al, 6 ; mod = 0 r/m = 6 would encode bp ? 4325 00004251 7431 <1> je .adjust2 ; if just plain disp16 --> 4326 00004253 3C40 <1> cmp al, 40h 4327 00004255 722F <1> jb .adjust0 ; if indirect register --> 4328 00004257 3C80 <1> cmp al, 80h 4329 00004259 722A <1> jb .adjust1 ; if disp8[reg(s)] 4330 0000425B EB27 <1> jmp short .adjust2 ; it's disp16[reg(s)] 4331 <1> 4332 <1> ; Handle 32-bit addressing (A32 ModR/M referencing memory) 4333 <1> .a32: 4334 0000425D 3C05 <1> cmp al, 5 ; mod = 0 and r/m = 5 (would encode ebp) ? 4335 0000425F 7421 <1> je .adjust4 ; if just plain disp32 --> 4336 00004261 3404 <1> xor al, 4 ; 4 to 0 (r/m 4 would encode esp) 4337 00004263 A807 <1> test al, 7 ; 0 if r/m would encode esp 4338 00004265 7513 <1> jnz .a32_nosib ; if no SIB byte --> 4339 00004267 86C4 <1> xchg al, ah 4340 00004269 E84F03 <1> call pp16 4341 0000426C 86C4 <1> xchg al, ah ; load and skip the SIB byte 4342 <1> ; The SIB byte is only used here to detect the 4343 <1> ; special case encoding of disp32 with mod=0 4344 <1> ; and base=5. index=4 is also special but it 4345 <1> ; does not alter the size of the displacement 4346 <1> ; that we have to skip. 4347 0000426E A8C0 <1> test al, 0C0h ; is it mod = 0 ? 4348 00004270 7508 <1> jnz @F ; no, not a special case --> 4349 00004272 80E407 <1> and ah, 7 4350 00004275 80FC05 <1> cmp ah, 5 ; is it base = 5 ? 4351 00004278 7408 <1> je .adjust4 ; yes, special case encoding of disp32 --> 4352 <1> @@: 4353 <1> .a32_nosib: 4354 0000427A 3C40 <1> cmp al, 40h 4355 0000427C 7208 <1> jb .adjust0 ; if indirect register --> 4356 0000427E 3C80 <1> cmp al, 80h 4357 00004280 7203 <1> jb .adjust1 ; if disp8[reg(s)] --> 4358 <1> ; otherwise, it's disp32[reg(s)] 4359 <1> .adjust4: 4360 <1> _386_PM_o32 ; inc esi 4361 00004282 46 <1> inc si ; skip an instruction byte 4362 <1> _386_PM_o32 ; inc esi 4363 00004283 46 <1> inc si ; skip an instruction byte 4364 <1> .adjust2: 4365 <1> _386_PM_o32 ; inc esi 4366 00004284 46 <1> inc si ; skip an instruction byte 4367 <1> .adjust1: 4368 <1> _386_PM_o32 ; inc esi 4369 00004285 46 <1> inc si ; skip an instruction byte 4370 <1> .adjust0: 4371 <1> 4372 <1> pp10: 4373 <1> _386_PM_o32 4374 00004286 56 <1> push si 4375 <1> 4376 00004287 803E[0601]E8 <1> cmp byte [pp_instruction], 0E8h 4377 0000428C 7534 <1> jne .done 4378 <1> 4379 <1> _386_PM_o32 4380 0000428E 8B36[0C01] <1> mov si, word [pp_operand] 4381 <1> 4382 <1> _386_PM xor eax, eax 4383 00004292 E82603 <1> call pp16 4384 00004295 86C4 <1> xchg al, ah 4385 00004297 E82103 <1> call pp16 4386 0000429A 86C4 <1> xchg al, ah 4387 <1> _386_PM jmp @F 4388 0000429C F6C602 <1> test dh, 2 4389 0000429F 7521 <1> jnz .notcallrel16 4390 <1> @@: 4391 <1> _386_PM test dh, 2 4392 <1> _386_PM jz @F 4393 <1> 4394 <1> _386_PM rol eax, 16 4395 <1> _386_PM call pp16 4396 <1> _386_PM xchg al, ah 4397 <1> _386_PM call pp16 4398 <1> _386_PM xchg al, ah 4399 <1> _386_PM rol eax, 16 4400 <1> @@: 4401 <1> _386_PM_o32 4402 000042A1 01C6 <1> add si, ax 4403 000042A3 B20F <1> mov dl, 15 ; number of bytes to go 4404 <1> .loop: 4405 000042A5 E81303 <1> call pp16 4406 000042A8 3CCB <1> cmp al, 0CBh ; retf ? 4407 000042AA 7417 <1> je .trace 4408 000042AC 3CCA <1> cmp al, 0CAh ; retf imm16 ? 4409 000042AE 7413 <1> je .trace 4410 000042B0 3CCF <1> cmp al, 0CFh ; iret ? 4411 000042B2 740F <1> je .trace 4412 000042B4 BF[6411] <1> mov di, ppbytes 4413 000042B7 B90B00 <1> mov cx, PPLEN_ONLY_PREFIXES 4414 000042BA F2AE <1> repne scasb 4415 000042BC 7504 <1> jne .done 4416 <1> ; if one of the prefixes 4417 000042BE FECA <1> dec dl 4418 000042C0 75E3 <1> jnz .loop ; if not out of bytes --> 4419 <1> 4420 <1> ; fall through: do not trace 4421 <1> .notcallrel16: 4422 <1> .done: 4423 000042C2 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 4424 <1> .trace: 4425 000042C3 F9 <1> stc ; trace 4426 <1> _386_PM_o32 4427 000042C4 5E <1> pop si 4428 <1> 4429 000042C5 720B <1> jc pp12 ; trace --> 4430 <1> %if _SYMBOLIC 4431 <1> call pp3_check_symhints 4432 <1> jc pp12 ; trace --> 4433 <1> %endif 4434 <1> ; jmp pp11 ; we have a skippable instruction here 4435 <1> pp11: 4436 <1> _386_PM call test_d_b_bit 4437 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 4438 <1> _386_PM movzx esi, si ; clear high word here 4439 <1> .32: 4440 <1> @@: 4441 000042C7 E85B02 <1> call proceedbreakpoint ; run until the breakpoint is hit 4442 000042CA 7254 <1> jc pp15 ; unexpected --> 4443 <1> %if _BREAKPOINTS 4444 000042CC 7515 <1> jnz pp12.bb_hit 4445 <1> %endif 4446 000042CE 31D2 <1> xor dx, dx ; do not skip WHILE 4447 000042D0 EB2C <1> jmp short pp13 4448 <1> 4449 <1> pp12: 4450 000042D2 F606[D400]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 4451 000042D7 75EE <1> jnz @B 4452 <1> 4453 000042D9 E86AFD <1> call traceone 4454 000042DC 7242 <1> jc pp15 4455 <1> ; jc unexpectedinterrupt 4456 <1> 4457 <1> %if _BREAKPOINTS 4458 000042DE BA0000 <1> mov dx, 0 ; do not skip WHILE 4459 000042E1 7413 <1> jz @F 4460 <1> 4461 <1> .bb_hit: 4462 000042E3 E879FB <1> call handle_bb_hit_pass_match 4463 000042E6 7204 <1> jc .actual_hit 4464 <1> d5 call d5message 4465 <1> d5 asciz "in pp12.bb_hit after non-hit",13,10 4466 000042E8 741C <1> jz pp13.nodump 4467 000042EA EB12 <1> jmp pp13 4468 <1> 4469 <1> 4470 <1> .actual_hit: 4471 <1> %if _PM 4472 <1> call resetmode 4473 <1> %endif 4474 000042EC E806F4 <1> call put_deferred_message_silent 4475 000042EF E87A00 <1> call dumpregs_extended_silent 4476 000042F2 59 <1> pop cx 4477 000042F3 5B <1> pop bx ; (discard counter) 4478 000042F4 EB23 <1> jmp @FF 4479 <1> 4480 <1> @@: 4481 <1> %endif 4482 <1> 4483 <1> ; We could check here for the correct address too, but that 4484 <1> ; would require disassembling the instruction and correctly so. 4485 <1> ; (Disassembling it incorrectly would only result in spurious 4486 <1> ; "Unexpected single-step interrupt" messages aborting multi- 4487 <1> ; traces though, so it won't be fatal.) 4488 <1> ; Wouldn't really be useful though: Only the "int1" or "int 01h" 4489 <1> ; instructions should cause this, and their operation means we 4490 <1> ; might as well behave as if the breakpoint was expected. 4491 000042F6 813E[000C][1539] <1> cmp word [run_int], int1msg 4492 000042FC 7522 <1> jne pp15 ; if some other interrupt (unexpected) --> 4493 <1> 4494 <1> pp13: 4495 000042FE 52 <1> push dx 4496 <1> %if _PM 4497 <1> call resetmode 4498 <1> %endif 4499 <1> ; An expected breakpoint. Dump registers, then loop. 4500 000042FF E8F3F3 <1> call put_deferred_message_silent 4501 00004302 E86700 <1> call dumpregs_extended_silent 4502 00004305 5A <1> pop dx ; preserve skip WHILE flag 4503 <1> 4504 <1> .nodump: 4505 00004306 E80FFB <1> call tt_handle_while 4506 00004309 59 <1> pop cx 4507 0000430A 5B <1> pop bx 4508 <1> 4509 0000430B 83E901 <1> sub cx, 1 4510 0000430E 83DB00 <1> sbb bx, 0 4511 <1> 4512 00004311 85DB <1> test bx, bx 4513 00004313 7508 <1> jnz pp14 4514 00004315 85C9 <1> test cx, cx 4515 00004317 7504 <1> jnz pp14 ; back for more --> 4516 <1> 4517 <1> @@: 4518 <1> %if _PM 4519 <1> call resetmode 4520 <1> %endif 4521 00004319 E87B5B <1> call silence_dump 4522 <1> 4523 0000431C C3 <1> retn 4524 <1> 4525 <1> %if ($ - pp1 - 1) < 128 4526 <1> pp14: equ pp1 4527 <1> %else 4528 0000431D E9CAFE <1> pp14: jmp pp1 4529 <1> %endif 4530 <1> 4531 <1> pp15: 4532 00004320 E9E7FC <1> jmp unexpectedinterrupt ; print message about unexpected interrupt 4533 <1> ; and quit 4534 <1> 4535 <1> 4536 <1> %if _SYMBOLIC 4537 <1> ; INP: bx:(e)si -> where to place breakpoint by default 4538 <1> ; byte [pp_instruction] = E8h if near immediate call, 4539 <1> ; bx:(d)word [pp_operand] -> rel16/rel32 4540 <1> ; word [reg_cs]:(d)word [reg_eip] = next CS:(E)IP 4541 <1> ; OUT: NC if no symhint detected or only skip symhints, 4542 <1> ; bx:(e)si -> where to place breakpoint 4543 <1> ; (will be modified if skip symhints occurred) 4544 <1> ; CY if trace symhints detected 4545 <1> pp3_check_symhints: 4546 <1> nearcall zz_detect_xms ; re-detect XMS if used after run 4547 <1> 4548 <1> ; Check for ..@symhint_trace|skip_caller_* hint at called address. 4549 <1> pp3_check_trace_caller_or_skip_caller: 4550 <1> xor ax, ax 4551 <1> lframe 4552 <1> lenter 4553 <1> lvar word, segment 4554 <1> push bx 4555 <1> lvar dword, offset 4556 <1> %ifn _PM 4557 <1> push ax 4558 <1> %else 4559 <1> _no386 push ax 4560 <1> %endif 4561 <1> _386_PM_o32 4562 <1> push si 4563 <1> lvar word, skip 4564 <1> push ax 4565 <1> 4566 <1> mov al, byte [pp_instruction] 4567 <1> cmp al, 0E8h 4568 <1> jne .notcallrel16 4569 <1> _386_PM_o32 4570 <1> mov si, word [pp_operand] 4571 <1> 4572 <1> _386_PM movzx eax, ax 4573 <1> call pp16 4574 <1> xchg al, ah 4575 <1> call pp16 4576 <1> xchg al, ah 4577 <1> _386_PM jmp @F 4578 <1> test dh, 2 4579 <1> jnz .notcallrel16 4580 <1> @@: 4581 <1> _386_PM test dh, 2 4582 <1> _386_PM jz @F 4583 <1> 4584 <1> _386_PM rol eax, 16 4585 <1> _386_PM call pp16 4586 <1> _386_PM xchg al, ah 4587 <1> _386_PM call pp16 4588 <1> _386_PM xchg al, ah 4589 <1> _386_PM rol eax, 16 4590 <1> @@: 4591 <1> _386_PM_o32 4592 <1> add si, ax 4593 <1> _386_PM_o32 4594 <1> mov dx, si 4595 <1> call getlinear_d_b 4596 <1> jc @F 4597 <1> mov cx, dx 4598 <1> mov bx, ax 4599 <1> nearcall binsearchmain ; search for matching symbol 4600 <1> jcxz @F 4601 <1> .loop_symbol: 4602 <1> push bx ; main index 4603 <1> push ax ; (reserve space, uninitialised) 4604 <1> dualcall getfarpointer.main 4605 <1> pop di 4606 <1> pop es 4607 <1> 4608 <1> test byte [es:di + smFlags + 1], smfSymHint >> 8 4609 <1> jz .next_symbol 4610 <1> 4611 <1> nearcall zz_copy_strings_to_str_buffer 4612 <1> 4613 <1> push cx 4614 <1> push ss 4615 <1> pop es 4616 <1> mov di, str_buffer + msg.symhint_size 4617 <1> mov si, msg.trace_caller 4618 <1> mov cx, msg.trace_caller_size 4619 <1> push di 4620 <1> repe cmpsb 4621 <1> pop di 4622 <1> pop cx 4623 <1> je pp3_trace 4624 <1> 4625 <1> push cx 4626 <1> mov si, msg.skip_caller 4627 <1> mov cx, msg.skip_caller_size 4628 <1> repe cmpsb 4629 <1> pop cx 4630 <1> jne .next_symbol 4631 <1> 4632 <1> call pp3_handle_skip_di 4633 <1> 4634 <1> .next_symbol: 4635 <1> inc bx 4636 <1> loop .loop_symbol 4637 <1> 4638 <1> @@: 4639 <1> .notcallrel16: 4640 <1> 4641 <1> 4642 <1> ; Check for ..@symhint_trace|skip_here_* hint at cs:eip address. 4643 <1> pp3_check_trace_here_or_skip_here: 4644 <1> mov bx, word [reg_cs] 4645 <1> _386_PM_o32 4646 <1> mov dx, word [reg_eip] 4647 <1> call getlinear_d_b 4648 <1> jc @F 4649 <1> mov cx, dx 4650 <1> mov bx, ax 4651 <1> nearcall binsearchmain ; search for matching symbol 4652 <1> jcxz @F 4653 <1> .loop_symbol: 4654 <1> push bx ; main index 4655 <1> push ax ; (reserve space, uninitialised) 4656 <1> dualcall getfarpointer.main 4657 <1> pop di 4658 <1> pop es 4659 <1> 4660 <1> test byte [es:di + smFlags + 1], smfSymHint >> 8 4661 <1> jz .next_symbol 4662 <1> 4663 <1> nearcall zz_copy_strings_to_str_buffer 4664 <1> 4665 <1> push cx 4666 <1> push ss 4667 <1> pop es 4668 <1> mov di, str_buffer + msg.symhint_size 4669 <1> mov si, msg.trace_here 4670 <1> mov cx, msg.trace_here_size 4671 <1> push di 4672 <1> repe cmpsb 4673 <1> pop di 4674 <1> pop cx 4675 <1> je pp3_trace 4676 <1> 4677 <1> push cx 4678 <1> mov si, msg.skip_here 4679 <1> mov cx, msg.skip_here_size 4680 <1> repe cmpsb 4681 <1> pop cx 4682 <1> jne .next_symbol 4683 <1> 4684 <1> call pp3_handle_skip_di 4685 <1> 4686 <1> .next_symbol: 4687 <1> inc bx 4688 <1> loop .loop_symbol 4689 <1> 4690 <1> @@: 4691 <1> db __TEST_IMM8 ; skip stc, NC 4692 <1> pp3_trace: 4693 <1> stc 4694 <1> 4695 <1> push ss 4696 <1> pop es 4697 <1> push ss 4698 <1> pop ds 4699 <1> 4700 <1> mov word [stack_low_address], str_buffer 4701 <1> 4702 <1> pop dx ; ?skip 4703 <1> _386_PM_o32 4704 <1> pop si ; ?offset 4705 <1> %ifn _PM 4706 <1> pop ax ; ?offset high word 4707 <1> %else 4708 <1> _no386 pop ax ; ?offset high word (if it was not pop esi) 4709 <1> %endif 4710 <1> pop bx ; ?segment 4711 <1> ; restore bx:(e)si if proceeding, else discard 4712 <1> lleave code 4713 <1> lahf 4714 <1> _386_PM movzx edx, dx 4715 <1> _386_PM_o32 4716 <1> add si, dx 4717 <1> sahf 4718 <1> retn 4719 <1> 4720 <1> 4721 <1> ; INP: ds:di -> symbol with ASCIZ keyword or expression 4722 <1> ; word [bp + ?segment] = segment/selector of breakpoint 4723 <1> ; (d)word [bp + ?offset] = offset of breakpoint 4724 <1> ; OUT: word [bp + ?skip] = how far to skip 4725 <1> ; CHG: esi, dx, ax 4726 <1> ; STT: es = ds = ss 4727 <1> pp3_handle_skip_di: 4728 <1> push bx 4729 <1> push cx 4730 <1> 4731 <1> mov si, di 4732 <1> @@: 4733 <1> lodsb 4734 <1> cmp al, 0 4735 <1> je .expr_have 4736 <1> cmp al, '_' 4737 <1> jne @B 4738 <1> mov byte [si - 1], 0 4739 <1> .expr_have: 4740 <1> mov si, di 4741 <1> mov dx, msg.asciz 4742 <1> call isstring? 4743 <1> jne .expr_num 4744 <1> xor cx, cx 4745 <1> mov bx, word [bp + ?segment] 4746 <1> _386_PM_o32 4747 <1> mov si, word [bp + ?offset] 4748 <1> .expr_asciz_loop: 4749 <1> call pp16 4750 <1> test al, al 4751 <1> loopnz .expr_asciz_loop 4752 <1> jcxz .error 4753 <1> neg cx 4754 <1> mov dx, cx 4755 <1> jmp .expr_got 4756 <1> 4757 <1> .error: 4758 <1> mov si, line_in + 2 4759 <1> jmp error 4760 <1> 4761 <1> .expr_num: 4762 <1> lodsb 4763 <1> nearcall getword 4764 <1> .expr_got: 4765 <1> mov word [bp + ?skip], dx 4766 <1> 4767 <1> pop cx 4768 <1> pop bx 4769 <1> retn 4770 <1> 4771 <1> lleave ctx 4772 <1> 4773 <1> 4774 <1> ; INP: bx = SYMMAIN index 4775 <1> ; CHG: es, di, si, dx, ax 4776 <1> ; STT: ss = ds 4777 <1> ; 4778 <1> ; Note: This invalidates the access slice. 4779 <1> zz_copy_strings_to_str_buffer: section_of_function 4780 <1> mov word [stack_low_address], stack 4781 <1> 4782 <1> push cx 4783 <1> 4784 <1> push bx ; main index 4785 <1> push ax ; (reserve space, uninitialised) 4786 <1> dualcall getfarpointer.main 4787 <1> pop di 4788 <1> pop es 4789 <1> push ds 4790 <1> ; Here we depend on str_buffer being 512-bytes long, 4791 <1> ; to allow storing both smName1 and smName2 contents 4792 <1> ; one after another in str_buffer. 4793 <1> nearcall getstring1 4794 <1> push ss 4795 <1> pop es 4796 <1> mov si, dx 4797 <1> mov di, str_buffer 4798 <1> rep movsb 4799 <1> mov si, di 4800 <1> pop ds 4801 <1> push bx ; main index 4802 <1> push ax ; (reserve space, uninitialised) 4803 <1> dualcall getfarpointer.main 4804 <1> pop di 4805 <1> pop es 4806 <1> push ds 4807 <1> nearcall getstring2 4808 <1> push ss 4809 <1> pop es 4810 <1> mov di, si 4811 <1> mov si, dx 4812 <1> rep movsb 4813 <1> mov al, 0 4814 <1> stosb 4815 <1> pop ds 4816 <1> 4817 <1> pop cx 4818 <1> retn 4819 <1> %endif 4820 <1> 4821 <1> 4822 <1> terminate_silent_dump.if_nonnull: 4823 <1> %if _RH 4824 00004323 F606[B600]10 <1> testopt [options6], opt6_rh_mode 4825 00004328 7507 <1> jnz @F 4826 <1> %endif 4827 0000432A F606[D300]10 <1> testopt [internalflags], tt_silent_mode 4828 0000432F 743A <1> jz terminate_silent_dump.ret 4829 <1> @@: 4830 00004331 06 <1> push es 4831 00004332 57 <1> push di 4832 00004333 50 <1> push ax 4833 00004334 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] 4834 00004338 8B3E[4C0A] <1> mov di, word [auxbuff_behind_last_silent] 4835 <1> %if _PM 4836 <1> cmp di, word [auxbuff_switchbuffer_size] 4837 <1> je terminate_silent_dump.done 4838 <1> %else 4839 0000433C 85FF <1> test di, di 4840 0000433E 7428 <1> jz terminate_silent_dump.done 4841 <1> %endif 4842 00004340 4F <1> dec di 4843 00004341 B000 <1> mov al, 0 4844 00004343 AE <1> scasb 4845 00004344 7422 <1> je terminate_silent_dump.done 4846 00004346 EB1B <1> jmp @FF 4847 <1> 4848 <1> terminate_silent_dump: 4849 <1> %if _RH 4850 00004348 F606[B600]10 <1> testopt [options6], opt6_rh_mode 4851 0000434D 7507 <1> jnz @F 4852 <1> %endif 4853 0000434F F606[D300]10 <1> testopt [internalflags], tt_silent_mode 4854 00004354 7415 <1> jz .ret 4855 <1> @@: 4856 <1> .is_silent: 4857 00004356 06 <1> push es 4858 00004357 57 <1> push di 4859 00004358 50 <1> push ax 4860 00004359 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] 4861 0000435D 8B3E[4C0A] <1> mov di, word [auxbuff_behind_last_silent] 4862 00004361 B000 <1> mov al, 0 4863 <1> @@: 4864 00004363 AA <1> stosb 4865 00004364 FF06[4C0A] <1> inc word [auxbuff_behind_last_silent] 4866 <1> ; -> point past the NUL 4867 <1> .done: 4868 00004368 58 <1> pop ax 4869 00004369 5F <1> pop di 4870 0000436A 07 <1> pop es 4871 <1> .ret: 4872 0000436B C3 <1> retn 4873 <1> 4874 <1> 4875 <1> dumpregs_extended_silent: 4876 <1> %if _PM 4877 <1> call resetmode 4878 <1> %endif 4879 0000436C E862FC <1> call silence_init 4880 <1> ; Call dumpregs (trimputs, puts, putsline, disasm) with 4881 <1> ; "silence" flag (writes to auxbuff instead of terminal). 4882 0000436F E8A1E5 <1> call dumpregs_extended 4883 <1> 4884 <1> %ifn _RH 4885 <1> ; Terminate the last dump's output with a NUL byte. 4886 <1> call terminate_silent_dump.if_nonnull 4887 <1> %endif 4888 00004372 E84FFC <1> call silence_exit 4889 <1> 4890 <1> handle_serial_flags_ctrl_c: 4891 00004375 1E <1> push ds 4892 00004376 50 <1> push ax 4893 00004377 16 <1> push ss 4894 00004378 1F <1> pop ds 4895 00004379 F606[AB00]40 <1> testopt [options3], opt3_check_ctrlc_0bh 4896 0000437E 7409 <1> jz @FF 4897 <1> ; The following DOS call originated in sleepcmd. 4898 <1> ; However, it is useful for all callers of this 4899 <1> ; function so put it here. 4900 00004380 E8ED41 <1> call InDOS 4901 00004383 7504 <1> jnz @F 4902 00004385 B40B <1> mov ah, 0Bh 4903 <1> doscall ; allow to break with Ctrl-C 1581 00004387 CD21 <2> int 21h 4904 <1> @@: 4905 <1> @@: 4906 00004389 F606[150C]02 <1> testopt [serial_flags], sf_ctrl_c 4907 0000438E 755B <1> jnz handle_ctrl_c 4908 00004390 F606[150C]10 <1> testopt [serial_flags], sf_use_serial 4909 00004395 7551 <1> jnz .ret 4910 00004397 E8CF41 <1> call InDOS_or_BIOS_IO 4911 0000439A 744C <1> jz .ret 4912 0000439C F606[AB00]20 <1> testopt [options3], opt3_check_ctrlc_keyb 4913 000043A1 7445 <1> jz .ret 4914 <1> 4915 <1> .check_rombios_buffer: 4916 000043A3 53 <1> push bx 4917 000043A4 52 <1> push dx 4918 000043A5 B84000 <1> mov ax, 40h ; dual mode segment/selector 4919 000043A8 50 <1> push ax 4920 000043A9 A1[260C] <1> mov ax, word [io_end_buffer] 4921 000043AC 8B16[240C] <1> mov dx, word [io_start_buffer] 4922 000043B0 1F <1> pop ds 4923 000043B1 85C0 <1> test ax, ax 4924 000043B3 7503 <1> jnz @F 4925 000043B5 A18200 <1> mov ax, word [82h] ; end of circular keypress buffer 4926 <1> @@: 4927 000043B8 85D2 <1> test dx, dx 4928 000043BA 7504 <1> jnz @F 4929 000043BC 8B168000 <1> mov dx, word [80h] ; start of circular buffer 4930 <1> @@: 4931 000043C0 89C3 <1> mov bx, ax 4932 000043C2 29D3 <1> sub bx, dx ; cmp end, start 4933 000043C4 7620 <1> jbe .ret_dx_bx ; invalid --> 4934 000043C6 F6C301 <1> test bl, 1 ; even amount of bytes ? 4935 000043C9 751B <1> jnz .ret_dx_bx ; invalid --> 4936 000043CB 8B1E1A00 <1> mov bx, word [1Ah] ; current head of circular buffer 4937 <1> .loop: 4938 000043CF 3B1E1C00 <1> cmp bx, word [1Ch] ; equal to current tail ? 4939 000043D3 7411 <1> je .ret_dx_bx ; yes, all entries checked --> 4940 000043D5 803F03 <1> cmp byte [bx], 3 ; is it Ctrl-C ? 4941 000043D8 7411 <1> je handle_ctrl_c ; yes, handle --> 4942 000043DA 43 <1> inc bx 4943 000043DB 43 <1> inc bx ; -> next entry 4944 000043DC 39C3 <1> cmp bx, ax ; at end of buffer ? 4945 000043DE 72EF <1> jb .loop ; no, loop --> 4946 000043E0 7704 <1> ja .ret_dx_bx ; invalid --> 4947 000043E2 89D3 <1> mov bx, dx ; reset to start of buffer 4948 000043E4 EBE9 <1> jmp .loop ; then loop --> 4949 <1> 4950 <1> .ret_dx_bx: 4951 000043E6 5A <1> pop dx 4952 000043E7 5B <1> pop bx 4953 <1> 4954 <1> .ret: 4955 000043E8 58 <1> pop ax 4956 000043E9 1F <1> pop ds 4957 000043EA C3 <1> retn 4958 <1> 4959 <1> 4960 <1> handle_ctrl_c: 4961 000043EB 16 <1> push ss 4962 000043EC 1F <1> pop ds 4963 000043ED 16 <1> push ss 4964 000043EE 07 <1> pop es 4965 000043EF 8026[150C]F9 <1> clropt [serial_flags], sf_ctrl_c | sf_double_ctrl_c 4966 <1> %if _PM 4967 <1> call resetmode 4968 <1> %endif 4969 000043F4 E82CFF <1> call terminate_silent_dump.if_nonnull 4970 000043F7 E89D5A <1> call silence_dump 4971 000043FA BA[B912] <1> mov dx, msg.ctrlc 4972 000043FD E8B35B <1> call putsz 4973 <1> 4974 00004400 800E[D800]10 <1> setopt [internalflags3], dif3_input_terminal_override 4975 <1> ; make sure we drain terminal input 4976 <1> @@: 4977 00004405 E8095E <1> call getc_if_any ; drain the buffer 4978 00004408 75FB <1> jnz @B ; if any was available --> 4979 <1> 4980 0000440A 8026[D800]EF <1> clropt [internalflags3], dif3_input_terminal_override 4981 0000440F E97DC0 <1> jmp cmd2_reset_re 4982 <1> 4983 <1> 4984 <1> ; INP: bp [tpg_proceed_bp], 4985 <1> ; linear address and point content to write 4986 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 4987 <1> ; set if a breakpoint was written 4988 <1> ; OUT: CY if error, 4989 <1> ; bp [tpg_proceed_bp] = has point content to restore 4990 <1> ; ah = reason = 0 = no error (never), 4991 <1> ; 1 = couldn't write, 4992 <1> ; 2 = unreachable, 4993 <1> ; 3 = overwritten, al = new byte value 4994 <1> ; NC if no error, 4995 <1> ; ah = 0 4996 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 4997 <1> ; cleared 4998 <1> ; CHG: di, (e)dx, ax, bx 4999 <1> ; STT: might switch modes due to getsegmented call 5000 <1> proceed_writepoint_restore: 5001 00004412 B400 <1> mov ah, 0 5002 00004414 F606[D400]40 <1> testopt [internalflags2], dif2_tpg_proceed_bp_set 5003 00004419 7461 <1> jz proceed_wp.retn ; (NC) 5004 0000441B BF0100 <1> mov di, 1 5005 0000441E EB05 <1> jmp proceed_wp 5006 <1> 5007 <1> ; INP: bp [tpg_proceed_bp], 5008 <1> ; linear address and point content to write (0CCh) 5009 <1> ; OUT: CY if error, 5010 <1> ; bp [tpg_proceed_bp] = has point content 0CCh 5011 <1> ; ah = reason = 0 = no error (never), 5012 <1> ; 1 = couldn't write, 5013 <1> ; 2 = unreachable, 5014 <1> ; 3 = overwritten (never) 5015 <1> ; NC if no error (either flag not set or point restored), 5016 <1> ; ah = 0 5017 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5018 <1> ; set 5019 <1> ; CHG: di, (e)dx, ax, bx 5020 <1> ; STT: might switch modes due to getsegmented call 5021 <1> proceed_writepoint: 5022 <1> %if _DELAY_BEFORE_BP 5023 00004420 E8F8F4 <1> call delay_before_bp 5024 <1> %endif 5025 00004423 31FF <1> xor di, di 5026 <1> proceed_wp: 5027 <1> lframe near 5028 00004425 5589E5 <1> lenter 5029 00004428 83F701 <1> xor di, 1 5030 <1> lvar word, is_write 5031 0000442B 57 <1> push di 5032 <1> 5033 0000442C A1[0001] <1> mov ax, word [tpg_proceed_bp] 5034 <1> %if _PM 5035 <1> mov dx, word [tpg_proceed_bp + 2] 5036 <1> %else 5037 0000442F 31D2 <1> xor dx, dx 5038 00004431 8A16[0201] <1> mov dl, byte [tpg_proceed_bp + 2] 5039 <1> %endif 5040 00004435 E84AF8 <1> call getsegmented 5041 00004438 A0[0501] <1> mov al, byte [tpg_proceed_bp + BPSIZE - 1] 5042 <1> ; al = byte to restore 5043 0000443B B402 <1> mov ah, 2 ; error reason: unreachable 5044 0000443D 723A <1> jc .return 5045 <1> 5046 0000443F F646FE01 <1> test byte [bp + ?is_write], 1 5047 <1> ; (NC) is it writing ? 5048 00004443 7518 <1> jnz .write 5049 <1> .restore: 5050 00004445 50 <1> push ax 5051 00004446 E8D630 <1> call readmem ; read current byte 5052 00004449 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 5053 0000444B B403 <1> mov ah, 3 ; error reason: overwritten, al = new value 5054 0000444D F9 <1> stc 5055 0000444E 7529 <1> jne .return_discard ; nope --> (CY) 5056 00004450 58 <1> pop ax 5057 00004451 E8B930 <1> call writemem ; return the byte to its original value 5058 00004454 720D <1> jc .next ; failed --> (CY, handled there) 5059 00004456 C606[0501]CC <1> mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 5060 <1> ; reset stored point 5061 0000445B EB06 <1> jmp short .next 5062 <1> 5063 <1> .write: 5064 0000445D E8AD30 <1> call writemem 5065 00004460 A2[0501] <1> mov byte [tpg_proceed_bp + BPSIZE - 1], al 5066 <1> ; save the previous byte there 5067 <1> .next: 5068 00004463 B401 <1> mov ah, 1 ; (in case of error) error reason: cannot write 5069 00004465 7212 <1> jc .return ; failed to write --> (CY) 5070 00004467 B400 <1> mov ah, 0 ; (no error) 5071 <1> 5072 00004469 800E[D400]40 <1> setopt [internalflags2], dif2_tpg_proceed_bp_set 5073 <1> ; set flag in case of successful writing 5074 0000446E F646FE01 <1> test byte [bp + ?is_write], 1 5075 <1> ; (NC) is it writing ? 5076 00004472 7505 <1> jnz .return ; yes, leave flag set --> 5077 00004474 8026[D400]BF <1> clropt [internalflags2], dif2_tpg_proceed_bp_set 5078 <1> ; (NC) clear flag in case of successful restoring 5079 <1> .return: 5080 <1> .return_discard: 5081 00004479 89EC5D <1> lleave 5082 <1> .retn: 5083 0000447C C3 <1> retn 5084 <1> 5085 <1> 5086 <1> ; INP: ah & 7Fh = status = 0 = no error, 5087 <1> ; 1 = couldn't write, 5088 <1> ; 2 = unreachable, 5089 <1> ; 3 = overwritten, al = new value 5090 <1> ; ah & 80h = set if error restoring point, 5091 <1> ; else error writing point 5092 <1> ; bh & 80h = set if gg breakpoint, 5093 <1> ; cx = index (0-based) 5094 <1> ; bh & 40h = set if bb breakpoint, 5095 <1> ; cx = index (0-based) 5096 <1> ; bh & C0h = clear if proceed breakpoint 5097 <1> ; bl = what we tried to restore, only set if ah & 80h set 5098 <1> ; dword [ss:sp] = linear address (24 bit if non-_PM) 5099 <1> ; CHG: ax, bx, cx, dx, di 5100 <1> ; STT: ds = es = ss = debugger data selector 5101 <1> display_breakpoint_failure: 5102 <1> %if _PM 5103 <1> call resetmode 5104 <1> %endif 5105 <1> 5106 0000447D 50 <1> push ax 5107 0000447E 53 <1> push bx 5108 0000447F 51 <1> push cx 5109 00004480 56 <1> push si 5110 00004481 E8135A <1> call silence_dump ; do away with silent mode 5111 00004484 5E <1> pop si 5112 00004485 59 <1> pop cx 5113 00004486 5B <1> pop bx 5114 00004487 58 <1> pop ax 5115 <1> 5116 00004488 800E[D500]08 <1> setopt [internalflags2], dif2_bp_failure 5117 <1> 5118 <1> lframe near 5119 <1> lpar dword, linear 5120 0000448D 5589E5 <1> lenter 5121 <1> lvar word, input_ax 5122 00004490 50 <1> push ax 5123 <1> 5124 00004491 BA[8628] <1> mov dx, msg.cant_bp_the 5125 00004494 E81C5B <1> call putsz 5126 00004497 F6C780 <1> test bh, 80h 5127 0000449A 740B <1> jz @F 5128 <1> 5129 0000449C 89C8 <1> mov ax, cx 5130 0000449E 40 <1> inc ax ; make it 1-based 5131 0000449F E8A5F6 <1> call putordinalbyte 5132 <1> 5133 000044A2 BA[B628] <1> mov dx, msg.cant_bp_type_gg 5134 000044A5 EB15 <1> jmp .got_type 5135 <1> 5136 <1> @@: 5137 000044A7 F6C740 <1> test bh, 40h 5138 000044AA 740D <1> jz @F 5139 <1> 5140 000044AC 89C8 <1> mov ax, cx 5141 000044AE BF[B328] <1> mov di, msg.cant_bp_type_permanent.index 5142 000044B1 E8DD55 <1> call hexbyte ; (0-based index) 5143 <1> 5144 000044B4 BA[9E28] <1> mov dx, msg.cant_bp_type_permanent 5145 <1> %if _SYMBOLIC 5146 <1> sub ax, _NUM_B_BP 5147 <1> jb .got_type 5148 <1> 5149 <1> mov di, msg.cant_bp_type_symbol.index 5150 <1> call hexbyte ; (0-based index) 5151 <1> 5152 <1> mov dx, msg.cant_bp_type_symbol 5153 <1> %endif 5154 000044B7 EB03 <1> jmp .got_type 5155 <1> 5156 <1> @@: 5157 000044B9 BA[8B28] <1> mov dx, msg.cant_bp_type_proceed 5158 <1> 5159 <1> .got_type: 5160 000044BC E8F45A <1> call putsz 5161 <1> 5162 000044BF BF[CD28] <1> mov di, msg.cant_bp_linear.address1 5163 000044C2 8B4606 <1> mov ax, word [bp + ?linear + 2] 5164 <1> %ifn _PM 5165 000044C5 B400 <1> mov ah, 0 5166 <1> %endif 5167 000044C7 E8C055 <1> call hexword 5168 000044CA 47 <1> inc di 5169 <1> ; mov di, msg.cant_bp_linear.address2 5170 000044CB 8B4604 <1> mov ax, word [bp + ?linear] 5171 000044CE E8B955 <1> call hexword 5172 <1> 5173 000044D1 BA[C428] <1> mov dx, msg.cant_bp_linear 5174 000044D4 E8DC5A <1> call putsz 5175 <1> 5176 000044D7 BF[0229] <1> mov di, msg.cant_bp_restore.value 5177 000044DA 89D8 <1> mov ax, bx 5178 000044DC E8B255 <1> call hexbyte 5179 <1> 5180 000044DF BA[D928] <1> mov dx, msg.cant_bp_write 5181 000044E2 8B46FE <1> mov ax, word [bp + ?input_ax] 5182 000044E5 F6C480 <1> test ah, 80h 5183 000044E8 7406 <1> jz @F 5184 000044EA 80E47F <1> and ah, ~80h 5185 000044ED BA[EC28] <1> mov dx, msg.cant_bp_restore 5186 <1> @@: 5187 000044F0 E8C05A <1> call putsz 5188 <1> 5189 000044F3 BF[7D29] <1> mov di, msg.cant_bp_reason3.value 5190 000044F6 E89855 <1> call hexbyte 5191 <1> 5192 000044F9 BA[0629] <1> mov dx, msg.cant_bp_reason 5193 000044FC E8B45A <1> call putsz 5194 <1> 5195 000044FF BA[1229] <1> mov dx, msg.cant_bp_reason0 5196 00004502 80FC01 <1> cmp ah, 1 5197 00004505 7215 <1> jb @F 5198 00004507 BA[3829] <1> mov dx, msg.cant_bp_reason1 5199 0000450A 7410 <1> je @F 5200 0000450C BA[4B29] <1> mov dx, msg.cant_bp_reason2 5201 0000450F 80FC03 <1> cmp ah, 3 5202 00004512 7208 <1> jb @F 5203 00004514 BA[6029] <1> mov dx, msg.cant_bp_reason3 5204 00004517 7403 <1> je @F 5205 00004519 BA[8329] <1> mov dx, msg.cant_bp_reasonu 5206 <1> @@: 5207 0000451C E8945A <1> call putsz 5208 <1> 5209 0000451F 89EC5D <1> lleave 5210 00004522 C20400 <1> lret 5211 <1> 5212 <1> 5213 <1> %if _PM 5214 <1> isdpmientry: 5215 <1> testopt [internalflags4], dif4_int_2F_hooked 5216 <1> jnz .stdhook 5217 <1> mov word [reg_eip], mydpmientry 5218 <1> mov word [reg_cs], ds ; if Int2F not hooked, point to the hook here 5219 <1> ; ds => lDEBUG_DATA_ENTRY 5220 <1> .stdhook: 5221 <1> ; Run code until it returned far. 5222 <1> mov bx, word [reg_esp] 5223 <1> push ds 5224 <1> mov ds, word [reg_ss] ; ds:bx-> (16-bit) stack 5225 <1> mov si, word [bx+0] 5226 <1> mov bx, word [bx+2] ; get (16-bit) far return address 5227 <1> pop ds 5228 <1> %endif 5229 <1> ; Proceed over an instruction 5230 <1> ; INP: bx:(e)si-> where to write the breakpoint 5231 <1> ; OUT: NC if the breakpoint was hit, 5232 <1> ; ah = 0 5233 <1> ; ch = 0 5234 <1> ; d[reg_eip] adjusted 5235 <1> ; cx & 8 set if proceed point hit 5236 <1> ; (ZF only set if _BREAKPOINTS) 5237 <1> ; ZR if breakpoint after instruction was hit, 5238 <1> ; cx & 7 = 0 5239 <1> ; NZ if another breakpoint (bb) was hit (or both), 5240 <1> ; cx & 1 set if non-pass match (actual hit), 5241 <1> ; else cx & 2 set if pass match (consider as hit first, 5242 <1> ; but dump registers next (not to silent buffer) 5243 <1> ; and then continue execution) 5244 <1> ; else cx & 4 always set, indicates any match 5245 <1> ; (including matches that should merely continue) 5246 <1> ; all pass points' counters stepped 5247 <1> ; CY if the breakpoint was not hit, 5248 <1> ; cx = 0 5249 <1> ; If [internalflags2] & dif2_gg_is_gg is set: 5250 <1> ; ah & 7Fh = status = 0 = no error, 5251 <1> ; 1 = couldn't write, 5252 <1> ; 2 = unreachable, 5253 <1> ; 3 = overwritten, al = new value 5254 <1> ; ah & 80h = set if error restoring point, 5255 <1> ; else error writing point to begin with 5256 <1> ; If that flag is clear: 5257 <1> ; Does not return if a breakpoint cannot be written 5258 <1> ; or cannot be restored, jumps to cmd3 instead. 5259 <1> ; CHG: all 5260 <1> ; STT: ds = es = ss 5261 <1> ; might return modeswitched (if dif2_gg_is_gg) 5262 <1> ; might be called while modeswitched 5263 <1> proceedbreakpoint: 5264 00004525 F606[D400]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 5265 0000452A 750C <1> jnz @F 5266 <1> 5267 <1> _386_PM_o32 ; mov edx, esi 5268 0000452C 89F2 <1> mov dx, si ; bx:(e)dx = segmented 5269 0000452E E8C0F6 <1> call getlinear_d_b ; dx:ax = linear 5270 <1> 5271 00004531 A3[0001] <1> mov word [tpg_proceed_bp], ax 5272 <1> ; The following two instructions must be in this order. 5273 <1> ; For the non-_PM build, writing to the second word 5274 <1> ; of the breakpoint also writes to the content byte. 5275 00004534 8916[0201] <1> mov word [tpg_proceed_bp + 2], dx 5276 <1> ; store in point 5277 <1> @@: 5278 00004538 C606[0501]CC <1> mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 5279 <1> ; initialise content 5280 0000453D E8E0FE <1> call proceed_writepoint 5281 <1> ; This call might return modeswitched. 5282 00004540 7308 <1> jnc @F 5283 <1> 5284 00004542 80E47F <1> and ah, ~80h ; mark error during writing 5285 <1> 5286 00004545 31C9 <1> xor cx, cx ; cx = 0 in case of branching 5287 00004547 51 <1> push cx ; put the zero on the stack 5288 <1> 5289 00004548 EB0E <1> jmp .failure 5290 <1> 5291 <1> @@: 5292 <1> ; The run functions call resetmode. 5293 <1> %if _BREAKPOINTS 5294 0000454A E87400 <1> call run_with_bb 5295 0000454D 89C8 <1> mov ax, cx 5296 <1> %else 5297 <1> call run 5298 <1> xor ax, ax 5299 <1> %endif 5300 0000454F 50 <1> push ax 5301 <1> 5302 <1> ; It's important to keep the linear address saved inbetween, 5303 <1> ; even though we save by value (as opposed to DEBUG/X G's saving 5304 <1> ; of the reference) because the selector that we used for the 5305 <1> ; access might now be invalid or (worse) point elsewhere, or 5306 <1> ; a mode change might have occured. (The latter is sometimes 5307 <1> ; handled by a specific kludge in DEBUG/X, but not always.) 5308 <1> 5309 00004550 E8BFFE <1> call proceed_writepoint_restore 5310 <1> ; This call might return modeswitched. 5311 00004553 7326 <1> jnc @F 5312 <1> 5313 00004555 80CC80 <1> or ah, 80h ; mark error during restoration 5314 <1> 5315 <1> .failure: 5316 <1> ; Here we may be modeswitched. 5317 00004558 F606[D400]08 <1> testopt [internalflags2], dif2_gg_is_gg 5318 <1> ; is it from gg ? 5319 0000455D 7559 <1> jnz .return_CY_pop_cx ; (CY) yes, return to gg 5320 <1> ; This branch may be taken while modeswitched. 5321 <1> 5322 <1> %if _PM 5323 <1> call resetmode 5324 <1> %endif 5325 <1> 5326 0000455F E893F1 <1> call put_deferred_message_silent 5327 <1> 5328 00004562 50 <1> push ax 5329 00004563 E83159 <1> call silence_dump 5330 00004566 58 <1> pop ax 5331 <1> 5332 00004567 FF36[0201] <1> push word [tpg_proceed_bp + 2] 5333 0000456B FF36[0001] <1> push word [tpg_proceed_bp] 5334 0000456F 8A1E[0501] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 5335 00004573 B700 <1> mov bh, 0 5336 00004575 E805FF <1> call display_breakpoint_failure 5337 <1> ; This function calls resetmode. 5338 00004578 E985BA <1> jmp cmd3 5339 <1> 5340 <1> @@: 5341 0000457B E8E4F6 <1> call get_cseip_of_possible_breakpoint 5342 <1> ; dx:ax = linear address 1 before cs:(e)ip 5343 0000457E 7236 <1> jc .return_CY_pop_cx_ax_zero 5344 <1> 5345 00004580 59 <1> pop cx 5346 <1> %if _PM 5347 <1> cmp word [tpg_proceed_bp + 2], dx 5348 <1> %else 5349 00004581 84F6 <1> test dh, dh ; (bits 24 to 31 set. shouldn't happen) 5350 00004583 7517 <1> jnz .not_pp 5351 00004585 3816[0201] <1> cmp byte [tpg_proceed_bp + 2], dl 5352 <1> %endif 5353 00004589 7511 <1> jne .not_pp 5354 0000458B 3906[0001] <1> cmp word [tpg_proceed_bp], ax 5355 0000458F 750B <1> jne .not_pp ; is unexpected (not behind the breakpoint) --> 5356 <1> 5357 <1> ; Need to check this here, because we have to 5358 <1> ; decrement (e)ip if the breakpoint was hit. 5359 00004591 813E[000C][3839] <1> cmp word [run_int], int3msg 5360 00004597 7503 <1> jne .not_pp ; is unexpected (not returned by interrupt 03h) --> 5361 00004599 80C908 <1> or cl, 8 ; set flag: pp hit 5362 <1> 5363 <1> .not_pp: 5364 0000459C B400 <1> mov ah, 0 ; set error to "no error" 5365 <1> 5366 0000459E E319 <1> jcxz .return_CY ; bb hit/pass/nonpass or pp hit ? if no --> 5367 <1> 5368 000045A0 E874F1 <1> call adjust_cseip_after_breakpoint 5369 <1> ; decrement (e)ip to point at the instruction 5370 <1> 5371 000045A3 F6C101 <1> test cl, 1 ; bb hit ? 5372 000045A6 750A <1> jnz .return ; yes, return (NC, NZ) --> 5373 <1> 5374 000045A8 F6C108 <1> test cl, 8 ; proceed point matched ? 5375 000045AB 7506 <1> jnz @F ; yes --> 5376 <1> 5377 000045AD 800E[D400]80 <1> setopt [internalflags2], dif2_tpg_keep_proceed_bp 5378 <1> ; flag that we should keep this proceed point 5379 <1> ; (NC, NZ) 5380 <1> .return: 5381 000045B2 C3 <1> retn 5382 <1> 5383 <1> @@: 5384 <1> ; return with ax = 0, NC, ZR 5385 <1> ; 5386 <1> ; (hit proceed point, no hit bb (possibly pass/non-pass bb) 5387 000045B3 31C0 <1> xor ax, ax ; ah = 0 (NC, ZR) 5388 000045B5 C3 <1> retn 5389 <1> 5390 <1> ; set ax = 0, pop cx, CY 5391 <1> .return_CY_pop_cx_ax_zero: 5392 000045B6 31C0 <1> xor ax, ax 5393 <1> 5394 <1> ; pop cx, CY (preserve ax) 5395 <1> .return_CY_pop_cx: 5396 000045B8 59 <1> pop cx 5397 <1> .return_CY: 5398 000045B9 F9 <1> stc 5399 000045BA C3 <1> retn 5400 <1> 5401 <1> 5402 <1> ; PPX - Get next byte in instruction stream. 5403 <1> ; INP: bx:(e)si-> next byte 5404 <1> ; OUT: al = next byte 5405 <1> ; (e)si incremented 5406 <1> pp16: 5407 <1> %if _PM 5408 <1> call resetmode_and_test_d_b_bit 5409 <1> %endif 5410 000045BB 1E <1> push ds 5411 000045BC 8EDB <1> mov ds, bx 5412 <1> %if _PM 5413 <1> jz .16 5414 <1> a32 ; use esi for lodsb 5415 <1> .16: 5416 <1> %endif 5417 000045BE AC <1> lodsb 5418 000045BF 1F <1> pop ds 5419 000045C0 C3 <1> retn 5420 <1> ; begin loop over instruction bytes. 5421 <1> 5422 <1> 5423 <1> %if _BREAKPOINTS 5424 <1> ; Run with bb breakpoints 5425 <1> ; 5426 <1> ; OUT: CY if another breakpoint (not a bb one) or trace hit, 5427 <1> ; cx = 0 5428 <1> ; NC if a bb breakpoint hit, 5429 <1> ; cx & 1 set if it is an actual hit 5430 <1> ; else cx & 2 set if it is a pass match, 5431 <1> ; else it is a non-pass non-match 5432 <1> ; (cx & 4 always set) 5433 <1> ; STT: might return modeswitched 5434 <1> run_with_bb: 5435 000045C1 F606[D400]08 <1> testopt [internalflags2], dif2_gg_is_gg 5436 000045C6 750C <1> jnz .no_bb 5437 <1> 5438 000045C8 F606[D300]C0 <1> testopt [internalflags], tt_no_bb | tt_no_bb_first 5439 000045CD 740C <1> jz @F 5440 <1> 5441 000045CF 8026[D300]7F <1> clropt [internalflags], tt_no_bb_first 5442 <1> 5443 <1> .no_bb: 5444 000045D4 E87400 <1> call run 5445 000045D7 31C9 <1> xor cx, cx 5446 000045D9 F9 <1> stc 5447 000045DA C3 <1> retn 5448 <1> 5449 <1> @@: 5450 <1> .gg5: 5451 <1> %if _BREAKPOINTS 5452 000045DB E86DF3 <1> call bb_writepoints_init_reset 5453 <1> %endif 5454 <1> 5455 000045DE F606[D400]10 <1> testopt [internalflags2], dif2_gg_first_detected 5456 000045E3 7436 <1> jz .only_run ; easy case, no cseip point detected --> 5457 <1> 5458 <1> 5459 <1> ; Enter special mode: Restore cseip breakpoint content. 5460 000045E5 800E[D400]02 <1> setopt [internalflags2], dif2_gg_skip_non_cseip 5461 <1> 5462 000045EA 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 5463 000045ED 89E5 <1> mov bp, sp ; -> error info 5464 <1> 5465 000045EF B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 5466 <1> ; = index above last one to restore 5467 000045F2 E824F4 <1> call bb_restorepoints_and_init_error_info 5468 000045F5 7317 <1> jnc @F ; no error ? --> 5469 <1> 5470 <1> ; Error in bb_restorepoints. Try to restore other bb. 5471 <1> 5472 <1> ; Exit special mode: Handle non-cseip breakpoints again. 5473 000045F7 8026[D400]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 5474 <1> 5475 <1> ; Enter special mode: Skip cseip breakpoints. 5476 000045FC 800E[D400]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 5477 <1> 5478 <1> ; As we already tried to restore all cseip bb points, 5479 <1> ; here we skip these in the bb_restorepoints call. 5480 00004601 B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 5481 00004604 E815F4 <1> call bb_restorepoints 5482 <1> 5483 <1> ; Exit special mode: No longer skip cseip breakpoints. 5484 00004607 8026[D400]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 5485 <1> 5486 <1> ; The failure that led us here is already noted in the info. 5487 0000460C EB1D <1> jmp .bb_exit 5488 <1> 5489 <1> 5490 <1> @@: 5491 <1> ; Success! Now discard the reserved error info. 5492 0000460E 83C420 <1> add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 5493 <1> 5494 <1> ; Exit special mode, do not skip non-cseip breakpoints anymore. 5495 00004611 8026[D400]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 5496 <1> 5497 <1> ; Enter special mode: Skip matching/restoring cseip breakpoint. 5498 00004616 800E[D400]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 5499 <1> 5500 <1> .only_run: 5501 0000461B E82D00 <1> call run 5502 <1> .after_run: 5503 <1> 5504 <1> %if _BREAKPOINTS 5505 0000461E 83EC20 <1> sub sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 5506 00004621 89E5 <1> mov bp, sp 5507 <1> 5508 00004623 B91000 <1> mov cx, _NUM_B_BP + _NUM_SYM_BP 5509 <1> ; = index above last one to restore 5510 00004626 E8F0F3 <1> call bb_restorepoints_and_init_error_info 5511 00004629 7308 <1> jnc @F 5512 <1> 5513 <1> .bb_exit: 5514 0000462B B8FFFF <1> mov ax, -1 5515 0000462E 50 <1> push ax ; (unused: ax error info) 5516 0000462F 50 <1> push ax ; cx error point index, -1 = invalid 5517 <1> 5518 00004630 E935F3 <1> jmp bb_restorepoints_exit 5519 <1> 5520 <1> 5521 <1> @@: 5522 00004633 83C420 <1> add sp, (_NUM_B_BP + _NUM_SYM_BP) * 2 5523 <1> 5524 00004636 E8EFF0 <1> call bb_check_hit 5525 00004639 89C1 <1> mov cx, ax 5526 0000463B 9C <1> pushf 5527 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 5528 <1> ; 5529 <1> ; This resets all the special flags for subsequent calls. 5530 0000463C 8026[D400]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 5533 00004641 9D <1> popf ; CF 5534 00004642 7302 <1> jnc @F 5535 <1> 5536 00004644 F9 <1> stc 5537 <1> ; cx = flags as returned by bb_check_hit 5538 00004645 C3 <1> retn 5539 <1> 5540 <1> @@: 5541 00004646 E8CEF0 <1> call adjust_cseip_after_breakpoint 5542 <1> ; re-execute (restored) opcode one byte in front of this 5543 00004649 F8 <1> clc ; (NC) 5544 <1> ; cx = flags as returned by bb_check_hit 5545 0000464A C3 <1> retn 5546 <1> %endif 5547 <1> %endif 5548 <1> 5549 <1> 5550 <1> ; Run - Start up the running program. 5551 <1> ; 5552 <1> ; INP: b[eqflag], a[eqladdr] = address given behind '=' for command 5553 <1> ; w[pspdbe] = process of debuggee 5554 <1> ; [run2324] = interrupt handlers 23h and 24h to set 5555 <1> ; values for registers in d[reg_eax] etc 5556 <1> ; OUT: (_DEBUG && _DEBUGUPDATESAVE) 5557 <1> ; interrupt handlers' ieNext fields updated 5558 <1> ; d[reg_eax] etc updated 5559 <1> ; w[run_int]-> message of how execution returned 5560 <1> ; UP, EI, high word efl = 0, es = ds = ss 5561 <1> ; CHG: all 5562 <1> ; STT: ds = ss 5563 <1> ; UP 5564 <1> ; (INP:es ignored) 5565 <1> run: 5566 0000464B 16 <1> push ss 5567 0000464C 07 <1> pop es 5568 <1> %if _PM 5569 <1> call resetmode 5570 <1> call remember_mode 5571 <1> %endif 5572 <1> %if _DELAY_BEFORE_BP 5573 0000464D 8026[DA00]7F <1> clropt [internalflags3], dif3_delayed 5574 <1> %endif 5575 00004652 8126[D400]7FF0 <1> clropt [internalflags2], dif2_tpg_have_bp | dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust | dif2_bp_failure | dif2_tpg_keep_proceed_bp, 1 5579 00004658 E8A402 <1> call seteq ; set CS:IP to '=' address 5580 <1> 5581 <1> %if _VXCHG 5582 0000465B B000 <1> mov al, 0 ; restore debuggee screen 5583 0000465D E8103D <1> call swapscreen 5584 <1> %endif 5585 <1> 5586 <1> %if _ALTVID 5587 00004660 E8AE00 <1> call setscreen 5588 <1> %endif 5589 <1> 5590 <1> ; For DDebugX: Do this before we install our 5591 <1> ; exception handlers. So if an exception 5592 <1> ; is raised then it is handled by the outer 5593 <1> ; instance instead of our handler. 5594 <1> ; (The actual problem may be that we don't 5595 <1> ; restore the handlers in the entrypoint 5596 <1> ; that leads to debuggerexception.) 5597 <1> ; Also, for non-_DEBUG DebugX too, check the 5598 <1> ; validity before setting debuggee PSP and 5599 <1> ; int 23h, 24h so they needn't be reset. 5600 <1> %if _PM 5601 <1> ; Load segreg values into es to make sure 5602 <1> ; they're valid. (Previously done with 5603 <1> ; the stack pointing into the reg array. 5604 <1> ; Better to do it now with a valid stack.) 5605 <1> ; Only done if we may be in Protected Mode. 5606 <1> ; 86 Mode allows any value to be loaded. 5607 <1> mov es, word [reg_ds] 5608 <1> mov es, word [reg_ss] 5609 <1> _386 mov es, word [reg_fs] 5610 <1> _386 mov es, word [reg_gs] 5611 <1> %endif 5612 00004663 8E06[C80C] <1> mov es, word [reg_es] ; last one: actual es value 5613 <1> 5614 00004667 8B1E[000B] <1> mov bx, word [pspdbe] 5615 0000466B E85D27 <1> call setpsp ; set debuggee's PSP 5616 0000466E E8483E <1> call setint2324 ; set debuggee's int 23/24 5617 <1> 5618 <1> %if _DEBUG ; set this copy's divide/trace/breakpoint ints 5619 <1> %if _TSR || _BOOTLDR || _DEVICE 5620 <1> ..@patch_tsr_quit_run: 5621 <1> db __TEST_IMM16 5622 <1> dw __REL16__(.skipints) 5623 <1> %endif 5624 <1> %if _DEBUG_COND 5625 <1> testopt [internalflags6], dif6_debug_mode 5626 <1> jz .skipints 5627 <1> call set_interrupts 5628 <1> jmp .skipints 5629 <1> 5630 <1> set_interrupts: equ $ 5631 <1> %endif 5632 <1> push cx 5633 <1> push si 5634 <1> push ax 5635 <1> push dx 5636 <1> push es 5637 <1> push bx 5638 <1> push bp 5639 <1> push di 5640 <1> 5641 <1> %if _PM 5642 <1> call ispm 5643 <1> jz @F ; in PM --> 5644 <1> testopt [internalflags], canswitchmode 5645 <1> jz @FF ; in 86 Mode and cannot switch to PM --> 5646 <1> 5647 <1> d4 call d4message 5648 <1> d4 asciz "In run (switch mode before calling pm_set_handlers)",13,10 5649 <1> setopt [internalflags], modeswitched ; set flag for resetmode 5650 <1> mov al, 0 5651 <1> call sr_state ; save state 5652 <1> call switchmode ; switch to PM 5653 <1> ; ! handle_mode_changed not called here ! 5654 <1> ; do not call InDOS or other functions using seg/sels 5655 <1> @@: 5656 <1> call pm_set_handlers 5657 <1> ; ! this calls resetmode 5658 <1> @@: 5659 <1> %endif 5660 <1> 5661 <1> %if _CATCHINT06 && _DETECT95LX 5662 <1> mov cx, word [inttab_number_variable] 5663 <1> %else 5664 <1> mov cx, inttab_number 5665 <1> %endif 5666 <1> mov si, inttab 5667 <1> .intloop: 5668 <1> lodsb 5669 <1> xchg ax, dx 5670 <1> lodsw ; get address 5671 <1> xchg ax, dx 5672 <1> %if _DEBUGUPDATESAVE 5673 <1> mov di, dx ; -> IISP header 5674 <1> %endif 5675 <1> 5676 <1> call InDOS 5677 <1> jz .int21_25 5678 <1> 5679 <1> xor bx, bx 5680 <1> %if _PM 5681 <1> call ispm 5682 <1> jnz @F 5683 <1> push dx 5684 <1> mov dx, bx ; set segment to access (= 0) 5685 <1> call setrmsegm ; get bx = selector configured to this 5686 <1> pop dx 5687 <1> @@: 5688 <1> %endif 5689 <1> mov es, bx ; => 86 Mode IVT (segment or selector) 5690 <1> %if _PM 5691 <1> xor bx, bx ; bh = 0 5692 <1> %endif 5693 <1> mov bl, al 5694 <1> add bx, bx 5695 <1> add bx, bx 5696 <1> 5697 <1> %if _DEBUGUPDATESAVE 5698 <1> push word [ es:bx + 2 ] 5699 <1> push word [ es:bx ] ; get vector 5700 <1> pop word [ di + ieNext ] 5701 <1> pop word [ di + ieNext + 2] 5702 <1> %endif 5703 <1> 5704 <1> mov word [ es:bx ], dx 5705 <1> %if _PM 5706 <1> push word [ pspdbg ] ; => lDEBUG_DATA_ENTRY (86 Mode seg) 5707 <1> pop word [ es:bx + 2 ] 5708 <1> %else 5709 <1> mov word [ es:bx + 2 ], ds ; => lDEBUG_DATA_ENTRY 5710 <1> %endif 5711 <1> jmp short .intset 5712 <1> 5713 <1> .int21_25: 5714 <1> 5715 <1> %if _PM 5716 <1> %if _DEBUGUPDATESAVE 5717 <1> mov ah, 35h ; get interrupt vector 5718 <1> push word [pspdbg] ; => lDEBUG_DATA_ENTRY 5719 <1> dual2call _doscall_return_es_parameter_es_ds 5720 <1> mov word [ di + ieNext ], bx 5721 <1> pop word [ di + ieNext + 2 ] 5722 <1> %endif 5723 <1> mov ah, 25h ; set interrupt vector 5724 <1> push word [pspdbg] ; => lDEBUG_DATA_ENTRY 5725 <1> dual2call _doscall_return_es_parameter_es_ds 5726 <1> pop ax ; (discard returned parameter) 5727 <1> %else 5728 <1> %if _DEBUGUPDATESAVE 5729 <1> mov ah, 35h 5730 <1> int 21h ; get vector 5731 <1> mov word [ di + ieNext ], bx 5732 <1> mov word [ di + ieNext + 2 ], es 5733 <1> %endif 5734 <1> mov ah, 25h ; set interrupt vector 5735 <1> int 21h ; ds => lDEBUG_DATA_ENTRY 5736 <1> %endif 5737 <1> .intset: 5738 <1> loop .intloop 5739 <1> 5740 <1> pop di 5741 <1> pop bp 5742 <1> pop bx 5743 <1> pop es 5744 <1> pop dx 5745 <1> pop ax 5746 <1> pop si 5747 <1> pop cx 5748 <1> %if _DEBUG_COND 5749 <1> retn 5750 <1> %endif 5751 <1> .skipints: 5752 <1> %endif 5753 <1> 5754 <1> .2: 5755 <1> %if _RUN2_ENTRY_SECTION 5756 <1> %if _PM 5757 <1> call ispm 5758 <1> jnz @F 5759 <1> push word [cssel] 5760 <1> db __TEST_IMM8 ; (skip push) 5761 <1> @@: 5762 <1> %endif 5763 00004671 16 <1> push ss 5764 00004672 B8[D445] <1> mov ax, .entry 5765 00004675 50 <1> push ax 5766 00004676 CB <1> retf 5767 <1> 5768 <1> usesection lDEBUG_DATA_ENTRY 5769 <1> .entry: 5770 <1> %endif 5771 000045D4 2B26[FC0A] <1> sub sp, word [run_sp_reserve] 5772 000045D8 8926[F80A] <1> mov word [run_sp], sp ; save stack position 5773 <1> 5774 <1> ; Disable this for now. The debugger uses its ss 5775 <1> ; for 86 Mode and Protected Mode at the same area 5776 <1> ; so it should always be valid to adjust SPSAV with 5777 <1> ; the current run_sp, regardless of current mode. 5778 <1> ; Update: SPSAV should always hold a 86 Mode address. 5779 <1> ; So check for our segment, not the current ss. (But 5780 <1> ; for _PM=0 ss is always equal to word [pspdbg].) 5781 <1> ; I assume that the original fix was intended for cases 5782 <1> ; where the segment doesn't match our 86 Mode ss, that 5783 <1> ; is the word [pspdbg]. 5784 <1> %if 1 5785 <1> ; 16.2.2021: check if saved SS is debugger's SS. If no, don't adjust saved SP. 5786 <1> ; SS may be != saved SS if debugger is stopped in protected-mode - then the 5787 <1> ; current DPMI real-mode stack may be stored in SPSAV. 5788 <1> %if _PM 5789 <1> mov ax, word [pspdbg] 5790 <1> %else 5791 000045DC 8CD0 <1> mov ax, ss 5792 <1> %endif 5793 000045DE 3B063000 <1> cmp ax, word [SPSAV + 2] 5794 000045E2 7508 <1> jne @F 5795 <1> %endif 5796 000045E4 2B26[FE0A] <1> sub sp, word [spadjust] 5797 000045E8 89262E00 <1> mov word [SPSAV], sp 5798 <1> @@: 5799 000045EC FA <1> cli 5800 <1> 5801 000045ED BC[A40C] <1> mov sp, regs 5802 <1> %ifn _ONLY386 5803 000045F0 EB11 <1> _386_jmps .386 ; --> 5804 000045F2 58 <1> pop ax 5805 000045F3 58 <1> pop ax ; discard all high words 5806 000045F4 5B <1> pop bx 5807 000045F5 58 <1> pop ax 5808 000045F6 59 <1> pop cx 5809 000045F7 58 <1> pop ax 5810 000045F8 5A <1> pop dx 5811 000045F9 58 <1> pop ax 5812 000045FA 58 <1> pop ax ; we'll get esp later 5813 000045FB 58 <1> pop ax 5814 000045FC 5D <1> pop bp 5815 000045FD 58 <1> pop ax 5816 000045FE 5E <1> pop si 5817 000045FF 58 <1> pop ax 5818 00004600 5F <1> pop di 5819 <1> ; ds, ss, cs loaded later 5820 <1> ; es already loaded 5821 <1> %endif 5822 <1> %ifn _ONLYNON386 5823 <1> %ifn _ONLY386 5824 00004601 EB18 <1> jmp short .common 5825 <1> %endif 5826 <1> 5827 <1> .386: 5828 <1> [cpu 386] 5829 00004603 6658 <1> pop eax 5830 00004605 665B <1> pop ebx 5831 00004607 6659 <1> pop ecx 5832 00004609 665A <1> pop edx 5833 0000460B 58 <1> pop ax 5834 0000460C 58 <1> pop ax ; we'll get esp later 5835 0000460D 665D <1> pop ebp 5836 0000460F 665E <1> pop esi 5837 00004611 665F <1> pop edi 5838 <1> ; pop ax ; get ds later 5839 <1> ; pop ax ; discard high words of segment registers 5840 <1> ; pop ax ; es already loaded 5841 <1> ; pop ax 5842 <1> ; pop ax ; get ss later 5843 <1> ; pop ax 5844 <1> ; pop ax ; get cs later 5845 <1> ; pop ax 5846 00004613 83C410 <1> add sp, byte 8 * 2 5847 00004616 0FA1 <1> pop fs 5848 00004618 58 <1> pop ax 5849 00004619 0FA9 <1> pop gs 5850 <1> __CPU__ 5851 <1> .common: 5852 <1> %endif 5853 0000461B A1[A40C] <1> mov ax, word [reg_eax] ; restore ax (used to discard words) 5854 0000461E 8E16[CC0C] <1> mov ss, word [reg_ss] 5855 <1> %if _ONLYNON386 5856 <1> mov sp, word [reg_esp] 5857 <1> %else 5858 <1> ..@patch_no386_ds_code_or_entry: 5859 00004622 66 <1> o32 ; mov esp, dword [reg_esp] 5860 00004623 8B26[B40C] <1> mov sp, word [reg_esp] ; restore program stack 5861 <1> %endif 5862 00004627 C606[530B]00 <1> mov byte [bInDbg], 0 5863 0000462C 66 <1> _386_o32 ; push dword [reg_efl] 5864 0000462D FF36[E00C] <1> push word [reg_efl] 5865 00004631 66 <1> _386_o32 ; push dword [reg_cs] ; high word is zero 5866 00004632 FF36[D00C] <1> push word [reg_cs] 5867 00004636 66 <1> _386_o32 ; push dword [reg_eip] 5868 00004637 FF36[DC0C] <1> push word [reg_eip] 5869 0000463B F606[E10C]02 <1> test byte [reg_efl+1], 2 ; IF set? 5870 00004640 8E1E[C40C] <1> mov ds, word [reg_ds] ; restore ds 5871 00004644 7401 <1> jz .di 5872 00004646 FB <1> sti ; required for ring3 protected mode if IOPL==0 5873 <1> .di: 5874 <1> %if _ONLYNON386 5875 <1> iret 5876 <1> %else 5877 <1> ..@patch_no386_iret_code_or_entry: 5878 00004647 66 <1> o32 ; iretd 5879 00004648 CF <1> iret ; jump to program 5880 <1> %endif 5881 <1> 5882 <1> ; The byte at ..@patch_no386_ds will be adjusted to a ds prefix on non-386 processors. 5883 <1> ; This does not change the following instruction's behaviour (aside from changing it 5884 <1> ; to a 16-bit instruction as intended) and insures that sp is set in the instruction 5885 <1> ; right behind the instruction that sets ss. 5886 <1> 5887 <1> ; The byte at ..@patch_no386_iret will be adjusted to an iret instruction on non-386 processors. 5888 <1> ; This avoids the NOP that would be written there if _386_o32 was used, because the iret 5889 <1> ; should follow right behind the sti instruction. 5890 <1> 5891 <1> 5892 <1> usesection lDEBUG_DATA_ENTRY 5893 <1> 5894 <1> 5895 <1> %if _CATCHSYSREQ 5896 <1> @@: 5897 <1> jmp far [cs:intr_sysreq.next] 5898 <1> 5899 <1> iispentry intr_sysreq, 0 5900 <1> cmp byte [cs:bInDbg], 0 5901 <1> jne @B 5902 <1> %if _SYSREQINT == 15h 5903 <1> cmp ax, 8501h ; sysreq released? 5904 <1> jne @B 5905 <1> %else 5906 <1> pushf 5907 <1> push cs 5908 <1> call @B 5909 <1> push ds 5910 <1> push ax 5911 <1> mov ax, 40h 5912 <1> mov ds, ax 5913 <1> test byte [18h], 4 5914 <1> pop ax 5915 <1> pop ds 5916 <1> jnz @F 5917 <1> iret 5918 <1> 5919 <1> @@: 5920 <1> %endif 5921 <1> %if _PM && _SYSREQ_DISABLE_INT2F_HOOK 5922 <1> clropt [options4], opt4_int_2F_hook ; disable hooking 5923 <1> %endif 5924 <1> mov word [cs:run_int], sysreqmsg ; remember interrupt type 5925 <1> jmp intrtn ; jump to register saving routine 5926 <1> %endif 5927 <1> 5928 <1> 5929 <1> %if _CATCHINT08 5930 00004649 CBEB10FFFFFFFF4B42- <1> iispentry intr8, 0 5930 00004652 00EBF400 <1> 5931 <1> intr8_original: equ intr8.next 5932 0000465C 9C <1> pushf 5933 0000465D 2EFF1E[4C46] <1> call far [cs:intr8_original] 5934 00004662 9C <1> pushf 5935 00004663 53 <1> push bx 5936 00004664 1E <1> push ds 5937 <1> 5938 00004665 0E <1> push cs 5939 00004666 1F <1> pop ds 5940 <1> 5941 00004667 803E[530B]00 <1> cmp byte [bInDbg], 0 ; in debugger ? 5942 0000466C 7559 <1> jne .reset ; yes --> 5943 <1> 5944 0000466E F606[150C]04 <1> testopt [serial_flags], sf_double_ctrl_c 5945 00004673 7408 <1> jz @F 5946 <1> 5947 00004675 C706[000C][CC39] <1> mov word [run_int], runint_ctrlc_msg 5948 0000467B EB44 <1> jmp @FF 5949 <1> 5950 <1> @@: 5951 0000467D BB4000 <1> mov bx, 40h 5952 00004680 8EDB <1> mov ds, bx 5953 00004682 F606170004 <1> test byte [17h], 4 ; CTRL currently pressed ? 5954 00004687 0E <1> push cs 5955 00004688 1F <1> pop ds 5956 00004689 743C <1> jz .reset ; no --> 5957 <1> 5958 0000468B 8B1E[0E0C] <1> mov bx, word [intr8_limit] 5959 0000468F 85DB <1> test bx, bx ; enabled ? 5960 00004691 7439 <1> jz .return ; no --> 5961 00004693 FF06[0C0C] <1> inc word [intr8_counter] 5962 00004697 391E[0C0C] <1> cmp word [intr8_counter], bx ; default is ca 5 seconds 5963 0000469B 722F <1> jb .return 5964 <1> 5965 0000469D C706[000C][6B39] <1> mov word [run_int], int8msg 5966 000046A3 F606[A100]80 <1> testopt [options], int8_disable_serial 5967 000046A8 7417 <1> jz @F 5968 000046AA F606[150C]10 <1> testopt [serial_flags], sf_use_serial 5969 000046AF 7410 <1> jz @F 5970 <1> 5971 <1> ; Immediately disable use of serial I/O. 5972 000046B1 8026[150C]EF <1> clropt [serial_flags], sf_use_serial 5973 000046B6 8026[A100]BF <1> clropt [options], enable_serial 5974 000046BB C706[000C][9239] <1> mov word [run_int], int8_kbd_msg 5975 <1> 5976 <1> @@: 5977 000046C1 1F <1> pop ds 5978 000046C2 5B <1> pop bx 5979 000046C3 9D <1> popf ; (in 86 Mode) 5980 000046C4 E97901 <1> jmp intrtn 5981 <1> 5982 <1> .reset: 5983 000046C7 8326[0C0C]00 <1> and word [intr8_counter], 0 5984 <1> .return: 5985 000046CC 1F <1> pop ds 5986 000046CD 5B <1> pop bx 5987 000046CE 9D <1> popf ; (in 86 Mode) 5988 000046CF CF <1> iret 5989 <1> %endif 5990 <1> 5991 <1> 5992 <1> ; Interrupt 22h (program termination) handler. 5993 <1> int22: 5994 000046D0 FA <1> cli 5995 <1> .cleartraceflag: 5996 000046D1 0E <1> push cs 5997 000046D2 1F <1> pop ds 5998 000046D3 0E <1> push cs 5999 000046D4 17 <1> pop ss 6000 000046D5 8B26[F80A] <1> mov sp, word [run_sp] ; restore running stack 6001 000046D9 0326[FC0A] <1> add sp, word [run_sp_reserve] 6002 000046DD C706[000C][FF3B] <1> mov word [run_int], progtrm ; set interrupt message 6003 000046E3 C706[020C][F504] <1> mov word [lastcmd], dmycmd ; disable T/P/G auto-repeat 6004 <1> %if _PM 6005 <1> clropt [internalflags], protectedmode ; reset PM flag 6006 <1> %endif 6007 <1> %ifn _RUN_ENTRY_SECTION 6008 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 6009 <1> call entry_to_code_seg 6010 <1> dw intrtn1_code 6011 <1> ; jump to register saving routine 6012 <1> %else 6013 000046E9 E9D701 <1> jmp intrtn1_entry 6014 <1> %endif 6015 <1> 6016 <1> sharedentry1.hwreset: 6017 000046EC CB <1> retf 6018 <1> 6019 <1> 6020 <1> ; Interrupt 01h (single-step interrupt) handler. 6021 000046ED 90EB10FFFFFFFF4B42- <1> iispentry intr1, 0, sharedentry1 6021 000046F6 00EBF300 <1> 6022 <1> lframe int 6023 00004700 5589E5 <1> lenter 6024 00004703 50 <1> push ax 6025 <1> 6026 <1> %ifn _PASSTF 6027 00004704 806607FE <1> clropt [bp + ?frame_fl], 100h ; clear TF (always) 6028 <1> %endif 6029 <1> 6030 00004708 8CC8 <1> mov ax, cs 6031 0000470A 394604 <1> cmp word [bp + ?frame_cs], ax ; entry segment ? 6032 0000470D 751A <1> jne .if_ZR ; no --> (NZ) 6033 <1> 6034 <1> ; On the NEC V20 if we trace an int3 instruction 6035 <1> ; or a div instruction that faults, we will 6036 <1> ; enter our Trace Interrupt entry with the 6037 <1> ; interrupt stack frame pointing at the first 6038 <1> ; instruction of the int 3 or int 0 handler. 6039 <1> ; If this happens, clear the Trace Flag and 6040 <1> ; continue running our handler. 6041 0000470F 817E02[3847] <1> cmp word [bp + ?frame_ip], intr0 6042 00004714 7413 <1> je .if_ZR ; that one --> (ZR) 6043 00004716 817E02[5447] <1> cmp word [bp + ?frame_ip], intr3 6044 0000471B 740C <1> je .if_ZR ; that one --> (ZR) 6045 <1> 6046 <1> ; If the DOS doesn't clear the Trace Flag when 6047 <1> ; it uses a PRA to return to, its iret will 6048 <1> ; enable tracing and invoke our Trace Interrupt 6049 <1> ; with the stack frame pointing to *the second* 6050 <1> ; instruction in the PRA handler. 6051 <1> ; Like above, clear TF then run the PRA handler. 6052 <1> %if _PM 6053 <1> cmp word [bp + ?frame_ip], getline_extra_int22.cleartraceflag 6054 <1> je .if_ZR ; that one --> (ZR) 6055 <1> %endif 6056 0000471D 817E02[D146] <1> cmp word [bp + ?frame_ip], int22.cleartraceflag 6057 00004722 7405 <1> je .if_ZR ; that one --> (ZR) 6058 00004724 817E02[6140] <1> cmp word [bp + ?frame_ip], debug22.cleartraceflag 6059 <1> .if_ZR: 6060 00004729 58 <1> pop ax 6061 <1> 6062 <1> %if _PASSTF 6063 <1> jnz @F ; handle trace entry --> 6064 <1> clropt [bp + ?frame_fl], 100h ; clear TF (only if we continue) 6065 <1> lleave code, optimiserestoresp ; restore bp 6066 <1> iret ; continue run if matched 6067 <1> 6068 <1> @@: 6069 <1> lleave , optimiserestoresp ; restore bp 6070 <1> %else 6071 0000472A 5D <1> lleave , optimiserestoresp ; restore bp (common before branch) 6072 0000472B 7501 <1> jnz @F ; handle trace entry --> 6073 0000472D CF <1> iret ; continue run if matched 6074 <1> 6075 <1> @@: 6076 <1> %endif 6077 <1> 6078 0000472E 2EC706[000C][1539] <1> mov word [cs:run_int], int1msg ; remember interrupt type 6079 00004735 E90801 <1> jmp intrtn ; jump to register saving routine 6080 <1> 6081 <1> 6082 <1> ; Interrupt 00h (divide error) handler. 6083 00004738 EB10FFFFFFFF4B4200- <1> iispentry intr0, 0, sharedentry1 6083 00004741 EBA900 <1> 6084 0000474A 2EC706[000C][0639] <1> mov word [cs:run_int], int0msg ; remember interrupt type 6085 00004751 E9EC00 <1> jmp intrtn ; jump to register saving routine 6086 <1> 6087 <1> 6088 <1> 6089 <1> ; Interrupt 03h (breakpoint interrupt) handler. 6090 00004754 EB10FFFFFFFF4B4200- <1> iispentry intr3, 0, sharedentry1 6090 0000475D EB8D00 <1> 6091 00004766 2EC706[000C][3839] <1> mov word [cs:run_int], int3msg ; remember interrupt type 6092 <1> %if _CATCHINT06 6093 0000476D E9D000 <1> jmp intrtn ; jump to register saving routine 6094 <1> 6095 <1> 6096 <1> ; Interrupt 06h (invalid opcode) handler. 6097 00004770 EB10FFFFFFFF4B4200- <1> iispentry intr6, 0, sharedentry2 6097 00004779 EB1100 <1> 6098 00004782 2EC706[000C][5A39] <1> mov word [cs:run_int], int6msg ; remember interrupt type 6099 <1> %endif 6100 00004789 E9B400 <1> jmp intrtn ; jump to register saving routine 6101 <1> 6102 <1> 6103 <1> sharedentry2.hwreset: 6104 0000478C CB <1> retf 6105 <1> 6106 <1> 6107 <1> %if _CATCHINT07 6108 <1> ; Interrupt 07h (no x87 present on 286+) handler. 6109 <1> iispentry intr7, 0, sharedentry2 6110 <1> mov word [cs:run_int], int7msg ; remember interrupt type 6111 <1> cmp byte [cs:bInDbg], 0 6112 <1> jne r86m_debugger_exception 6113 <1> jmp intrtn ; jump to register saving routine 6114 <1> %endif 6115 <1> 6116 <1> %if _CATCHINT0C 6117 <1> ; Interrupt 0Ch (stack fault in R86M, or IRQ) handler. 6118 0000478D 90EB10FFFFFFFF4B42- <1> iispentry intr0C, 0, sharedentry2 6118 00004796 00EBF300 <1> 6119 <1> %if _MCLOPT 6120 <1> cmp byte [cs:master_pic_base], 20h 6121 <1> jae @F 6122 <1> %endif 6123 000047A0 50 <1> push ax 6124 000047A1 B00B <1> mov al, 0Bh ; request In-Service Register (ISR) 6125 000047A3 E620 <1> out 20h, al ; from primary PIC 6126 000047A5 E420 <1> in al, 20h ; read the ISR 6127 000047A7 A810 <1> test al, 1_0000b ; IRQ #4 occurred ? 6128 000047A9 58 <1> pop ax 6129 000047AA 7515 <1> jnz .notours ; yes, (likely) not a stack fault --> 6130 <1> @@: 6131 000047AC 2EC706[000C][F339] <1> mov word [cs:run_int], int0Cmsg ; remember interrupt type 6132 000047B3 2E803E[530B]00 <1> cmp byte [cs:bInDbg], 0 6133 000047B9 7403E966FD <1> jne r86m_debugger_exception 6134 000047BE E97F00 <1> jmp intrtn ; jump to register saving routine 6135 <1> 6136 <1> .notours: 6137 000047C1 2EFF2E[9047] <1> jmp far [cs:.next] 6138 <1> %endif 6139 <1> %if _CATCHINT0D 6140 <1> 6141 <1> 6142 <1> ; Interrupt 0Dh (general protection fault in R86M, or IRQ) handler. 6143 000047C6 EB10FFFFFFFF4B4200- <1> iispentry intr0D, 0, sharedentry2 6143 000047CF EBBB00 <1> 6144 <1> %if _MCLOPT 6145 <1> cmp byte [cs:master_pic_base], 20h 6146 <1> jae @F 6147 <1> %endif 6148 000047D8 50 <1> push ax 6149 000047D9 B00B <1> mov al, 0Bh ; request In-Service Register (ISR) 6150 000047DB E620 <1> out 20h, al ; from primary PIC 6151 000047DD E420 <1> in al, 20h ; read the ISR 6152 000047DF A820 <1> test al, 10_0000b ; IRQ #5 occurred ? 6153 000047E1 58 <1> pop ax 6154 000047E2 7514 <1> jnz .notours ; yes, (likely) not a GPF --> 6155 <1> @@: 6156 000047E4 2EC706[000C][0B3A] <1> mov word [cs:run_int], int0Dmsg ; remember interrupt type 6157 000047EB 2E803E[530B]00 <1> cmp byte [cs:bInDbg], 0 6158 000047F1 7403E92EFD <1> jne r86m_debugger_exception 6159 000047F6 EB48 <1> jmp intrtn ; jump to register saving routine 6160 <1> 6161 <1> .notours: 6162 000047F8 2EFF2E[C847] <1> jmp far [cs:.next] 6163 <1> %endif 6164 <1> %if _CATCHINT18 6165 <1> ; Interrupt 18h (diskless boot hook) handler. 6166 000047FD 90EB10FFFFFFFF4B42- <1> iispentry intr18, 0, sharedentry3 6166 00004806 00EB5600 <1> 6167 00004810 2EC706[000C][303A] <1> mov word [cs:run_int], int18msg ; remember interrupt type 6168 <1> %endif 6169 <1> %if _CATCHINT19 6170 00004817 EB27 <1> jmp intrtn ; jump to register saving routine 6171 <1> 6172 <1> 6173 <1> ; Interrupt 19h (boot load) handler. 6174 00004819 90EB10FFFFFFFF4B42- <1> iispentry intr19, 0, sharedentry3 6174 00004822 00EB3A00 <1> 6175 0000482C 2EC706[000C][4C3A] <1> mov word [cs:run_int], int19msg ; remember interrupt type 6176 00004833 2EC706[020C][F504] <1> mov word [cs:lastcmd], dmycmd ; disable T/P/G auto-repeat 6177 0000483A 2E8026[D700]FE <1> clropt [cs:internalflags2], dif2_boot_loaded_kernel 6178 <1> %endif 6179 <1> 6180 <1> ; Common interrupt routine. 6181 <1> 6182 <1> ; Housekeeping. 6183 <1> intrtn: 6184 00004840 FA <1> cli ; just in case 6185 00004841 2E8F06[DC0C] <1> pop word [cs:reg_eip] ; recover things from stack 6186 00004846 2E8F06[D00C] <1> pop word [cs:reg_cs] 6187 0000484B 2E8F06[E00C] <1> pop word [cs:reg_efl] 6188 00004850 2E8C1E[C40C] <1> mov word [cs:reg_ds], ds ; ! word-aligned (AC flag) 6189 00004855 2EA3[A40C] <1> mov word [cs:reg_eax], ax ; ! word-aligned (AC flag) 6190 00004859 8CC8 <1> mov ax, cs 6191 0000485B 8ED8 <1> mov ds, ax ; => lDEBUG_DATA_ENTRY 6192 <1> %ifn _RUN_ENTRY_SECTION 6193 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 6194 <1> call entry_to_code_seg 6195 <1> dw intrtn_code 6196 <1> ; To avoid delaying the code segment switch, we use the client's 6197 <1> ; stack here to call (jump) via entry_to_code_seg. 6198 <1> %else 6199 0000485D EB01 <1> jmp intrtn_entry 6200 <1> %endif 6201 <1> 6202 <1> sharedentry3.hwreset: 6203 0000485F CB <1> retf 6204 <1> 6205 <1> 6206 <1> %ifn _RUN_ENTRY_SECTION 6207 <1> usesection lDEBUG_CODE 6208 <1> 6209 <1> code_insure_low_byte_not_0CCh 6210 <1> intrtn_code: 6211 <1> %else 6212 <1> usesection lDEBUG_DATA_ENTRY 6213 <1> intrtn_entry: 6214 <1> %endif 6215 <1> 6216 <1> %if _PM 6217 <1> clropt [internalflags], protectedmode ; reset PM flag 6218 <1> .from_installdpmi: 6219 <1> %endif 6220 00004860 8C16[CC0C] <1> mov word [reg_ss], ss ; save stack position 6221 00004864 8326[DE0C]00 <1> _386 and word [reg_eip+2], byte 0 ; we're from real mode 6222 00004869 66 <1> _386_o32 ; mov dword [reg_esp], esp 6223 0000486A 8926[B40C] <1> mov word [reg_esp], sp 6224 0000486E 8ED0 <1> mov ss, ax ; mov ss, cs ; (don't use the stack here) 6225 <1> 6226 <1> %if _PM 6227 <1> jmp @F 6228 <1> 6229 <1> %ifn _RUN_ENTRY_SECTION 6230 <1> intrtn2_code: ; <--- entry protected mode 6231 <1> %else 6232 <1> intrtn2_entry: ; <--- entry protected mode 6233 <1> %endif 6234 <1> mov word [ss:reg_ds], ds ; ! word-aligned (AC flag) 6235 <1> mov word [ss:reg_eax], ax ; ! word-aligned (AC flag) 6236 <1> mov ax, ss 6237 <1> mov ds, ax ; mov ds, ss 6238 <1> @@: 6239 <1> %endif 6240 00004870 B80200 <1> mov ax, 2 6241 <1> %ifn _ONLY386 6242 00004873 EB1A <1> _386_jmps .386 ; --> 6243 00004875 BC[CA0C] <1> mov sp, reg_es+2 6244 00004878 06 <1> push es 6245 <1> ; sub sp, ax 6246 <1> ; sub sp, ax ; ds already saved 6247 <1> ; sub sp, ax ; don't overwrite high word of di 6248 00004879 83EC06 <1> sub sp, byte 3*2 6249 0000487C 57 <1> push di 6250 0000487D 29C4 <1> sub sp, ax 6251 0000487F 56 <1> push si 6252 00004880 29C4 <1> sub sp, ax 6253 00004882 55 <1> push bp 6254 <1> ; sub sp, ax 6255 <1> ; sub sp, ax ; sp already saved 6256 <1> ; sub sp, ax 6257 00004883 83EC06 <1> sub sp, byte 3*2 6258 00004886 52 <1> push dx 6259 00004887 29C4 <1> sub sp, ax 6260 00004889 51 <1> push cx 6261 0000488A 29C4 <1> sub sp, ax 6262 0000488C 53 <1> push bx 6263 <1> %endif 6264 <1> %ifn _ONLYNON386 6265 <1> %ifn _ONLY386 6266 0000488D EB34 <1> jmp short .common 6267 <1> %endif 6268 <1> 6269 <1> .386: 6270 <1> [cpu 386] 6271 0000488F 66BC[DA0C0000] <1> mov esp, reg_gs+2 6272 00004895 0FA8 <1> push gs 6273 00004897 29C4 <1> sub sp, ax ; don't overwrite high words of segments 6274 00004899 0FA0 <1> push fs 6275 <1> ; sub sp, ax 6276 <1> ; sub sp, ax ; cs already saved 6277 <1> ; sub sp, ax 6278 <1> ; sub sp, ax ; ss already saved 6279 <1> ; sub sp, ax 6280 0000489B 83EC0A <1> sub sp, byte 5*2 6281 0000489E 06 <1> push es 6282 <1> ; sub sp, ax 6283 <1> ; sub sp, ax ; ds already saved 6284 0000489F 83EC04 <1> sub sp, byte 2*2 6285 000048A2 6657 <1> push edi 6286 000048A4 6656 <1> push esi 6287 000048A6 6655 <1> push ebp 6288 <1> ; sub sp, ax 6289 <1> ; sub sp, ax ; sp already saved 6290 000048A8 83EC04 <1> sub sp, byte 2*2 6291 000048AB 6652 <1> push edx 6292 000048AD 6651 <1> push ecx 6293 000048AF 669C <1> pushfd ; (this overwrites reg_ebx) 6294 000048B1 01C4 <1> add sp, ax ; discard low word of efl 6295 000048B3 8F06[E20C] <1> pop word [reg_efl+2] 6296 000048B7 6A00 <1> push 0 6297 000048B9 9C <1> pushf ; (this also overwrites reg_ebx) 6298 000048BA 669D <1> popfd ; clear high word of efl inside debugger (resets AC flag) 6299 000048BC 6653 <1> push ebx 6300 000048BE A1[A40C] <1> mov ax, word [reg_eax] ; restore ax 6301 000048C1 6650 <1> push eax ; so we don't overwrite it with 2 here 6302 <1> __CPU__ 6303 <1> .common: 6304 <1> %endif 6305 <1> 6306 <1> %ifn _RUN_ENTRY_SECTION 6307 <1> code_insure_low_byte_not_0CCh 6308 <1> ; Clean up. 6309 <1> intrtn1_code: 6310 <1> %else 6311 <1> intrtn1_entry: 6312 <1> %endif 6313 000048C3 66 <1> _386_o32 ; mov esp, dword [run_sp] 6314 000048C4 8B26[F80A] <1> mov sp, word [run_sp] ; restore running stack 6315 000048C8 0326[FC0A] <1> add sp, word [run_sp_reserve] 6316 000048CC FC <1> cld ; clear direction flag 6317 000048CD FB <1> sti ; interrupts back on 6318 <1> 6319 <1> %if _SYMBOLIC 6320 <1> clropt [internalflags2], dif2_xms_detection_done 6321 <1> ; Re-detect XMS after running. 6322 <1> ; 6323 <1> ; The actual detection is done in symbol access functions, 6324 <1> ; which are only called once all breakpoints are restored. 6325 <1> %endif 6326 <1> 6327 <1> %if _RUN_ENTRY_SECTION 6328 <1> %if _PM 6329 <1> testopt [internalflags], protectedmode 6330 <1> jz @F 6331 <1> call entry_to_code_sel 6332 <1> dw .code 6333 <1> 6334 <1> @@: 6335 <1> %endif 6336 000048CE E876F7 <1> call entry_to_code_seg 6337 000048D1 [7746] <1> dw .code 6338 <1> 6339 <1> usesection lDEBUG_CODE 6340 <1> .code: 6341 <1> %endif 6342 <1> 6343 <1> %if _PM 6344 <1> call handle_mode_changed 6345 <1> %endif 6346 <1> 6347 00004677 E8E8F5 <1> call get_cseip_of_possible_breakpoint 6348 <1> ; Initialise this here. This means we do not need to call 6349 <1> ; resetmode between proceed_wp and bb_wp and gg_wp. If 6350 <1> ; more than one point needs to switch modes this avoids 6351 <1> ; repeated modeswitching back and forth. 6352 <1> 6353 <1> %if _DEBUG ; reset to next copy's divide/trace/breakpoint ints 6354 <1> %if _DEBUG_COND 6355 <1> testopt [internalflags6], dif6_debug_mode 6356 <1> jz .skipints 6357 <1> call reset_interrupts 6358 <1> jmp .skipints 6359 <1> 6360 <1> reset_interrupts: equ $ 6361 <1> %endif 6362 <1> push cx 6363 <1> push si 6364 <1> push di 6365 <1> push ax 6366 <1> push bx 6367 <1> push dx 6368 <1> push bp 6369 <1> 6370 <1> %if _PM 6371 <1> call ispm 6372 <1> jz @F ; in PM --> 6373 <1> testopt [internalflags], canswitchmode 6374 <1> jz @FF ; in 86 Mode and cannot switch to PM --> 6375 <1> 6376 <1> d4 call d4message 6377 <1> d4 asciz "In intrtn1_code (switch mode before calling pm_reset_handlers)",13,10 6378 <1> setopt [internalflags], modeswitched ; set flag for resetmode 6379 <1> mov al, 0 6380 <1> call sr_state ; save state 6381 <1> call switchmode ; switch to PM 6382 <1> ; ! handle_mode_changed not called here ! 6383 <1> ; do not call InDOS or other functions using seg/sels 6384 <1> @@: 6385 <1> call pm_reset_handlers 6386 <1> ; ! this calls resetmode 6387 <1> @@: 6388 <1> 6389 <1> numdef OVERRIDE_BUILD_PM_DEBUG, 0 6390 <1> %if ! _CATCHPMINT214C && ! _OVERRIDE_BUILD_PM_DEBUG 6391 <1> %fatal Cannot build DDEBUGX: handler switching without Int21.4C hook untested 6392 <1> %endif 6393 <1> %endif 6394 <1> 6395 <1> %if CATCHINTAMOUNT 6396 <1> %if _CATCHINT06 && _DETECT95LX 6397 <1> mov cx, word [inttab_number_variable] 6398 <1> %else 6399 <1> mov cx, inttab_number 6400 <1> %endif 6401 <1> mov si, inttab 6402 <1> mov dx, -1 ; always force 6403 <1> .nextint: 6404 <1> lodsb 6405 <1> xchg ax, bx ; bl = number 6406 <1> lodsw ; si -> list 6407 <1> xchg ax, si ; si -> entry, ax -> list 6408 <1> xchg ax, bx ; al = number, bx -> list 6409 <1> call UnhookInterruptForce 6410 <1> xchg bx, si ; si -> list 6411 <1> loop .nextint 6412 <1> %endif 6413 <1> 6414 <1> pop bp 6415 <1> pop dx 6416 <1> pop bx 6417 <1> pop ax 6418 <1> pop di 6419 <1> pop si 6420 <1> pop cx 6421 <1> %if _DEBUG_COND 6422 <1> retn 6423 <1> %endif 6424 <1> .skipints: 6425 <1> %endif 6426 <1> 6427 0000467A 8026[E10C]FE <1> clropt [reg_efl], 100h ; clear TF 6428 <1> 6429 0000467F E86C27 <1> call getpsp 6430 00004682 891E[000B] <1> mov word [pspdbe], bx 6431 <1> 6432 00004686 E84C3E <1> call getint2324 ; save debuggee's int 23/24, set debugger's int 23/24 6433 <1> 6434 00004689 16 <1> push ss 6435 0000468A 07 <1> pop es 6436 0000468B E83B27 <1> call setpspdbg ; set PSP of debugger 6437 <1> 6438 0000468E 800E[D100]30 <1> setopt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is on 6439 <1> %if _PM 6440 <1> call ispm 6441 <1> jz .a20done ; assume A20 on. (is this the right thing to do?) 6442 <1> %endif 6443 00004693 06 <1> push es 6444 00004694 1E <1> push ds 6445 00004695 57 <1> push di 6446 00004696 56 <1> push si 6447 00004697 51 <1> push cx 6448 00004698 31F6 <1> xor si, si 6449 0000469A 8EDE <1> mov ds, si ; ds = 0000h 6450 0000469C 4E <1> dec si 6451 0000469D 8EC6 <1> mov es, si ; es = FFFFh 6452 0000469F 46 <1> inc si ; ds:si = 0000h:0000h = 00000h 6453 000046A0 BF1000 <1> mov di, 0010h ; es:di = FFFFh:0010h = 100000h (same address if it overflows) 6454 000046A3 89F9 <1> mov cx, di ; 32 byte (16 = 10h word) 6455 000046A5 F3A7 <1> repe cmpsw ; compare them and assume A20 line switched off if same 6456 000046A7 59 <1> pop cx 6457 000046A8 5E <1> pop si 6458 000046A9 5F <1> pop di 6459 000046AA 1F <1> pop ds 6460 000046AB 07 <1> pop es 6461 000046AC 7505 <1> jne .a20done ; not equal, A20 line is switched on --> 6462 <1> ; if equal, the A20 line is probably switched off 6463 000046AE 8026[D100]CF <1> clropt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is off 6464 <1> 6465 <1> %if 0 ;_LOCALENABLEA20 6466 <1> ; This doesn't serve any particular reason if we have no business accessing the HMA. 6467 <1> ; What's more important is that the dump, assemble, and disassemble commands *should* 6468 <1> ; use a disabled A20 if it is disabled to the debuggee. Thus, enabling A20 belongs, if 6469 <1> ; at all, into getsegmented (similar to the switch to PM) as there may be breakpoints in 6470 <1> ; the HMA that we need to reset. 6471 <1> %if _GUARD_86M_INT2F 6472 <1> push es 6473 <1> xor ax, ax 6474 <1> mov es, ax ; (only used in 86 Mode) 6475 <1> mov ax, [es:2Fh * 4] 6476 <1> cmp ax, -1 6477 <1> je @F ; --> (ZR) 6478 <1> or ax, [es:2Fh * 4 + 2] 6479 <1> @@: 6480 <1> pop es 6481 <1> jz @F 6482 <1> %endif 6483 <1> mov ax, 4300h 6484 <1> int 2Fh ; XMS v2 installation check 6485 <1> cmp al, 80h ; installed ? 6486 <1> jne .a20done ; no --> 6487 <1> mov ax, 4310h 6488 <1> int 2Fh ; get entry 6489 <1> mov ah, 05h 6490 <1> push cs 6491 <1> call callfaresbx ; local enable A20 6492 <1> push ds 6493 <1> pop es 6494 <1> dec ax 6495 <1> jnz .a20done ; not able to enable A20 --> 6496 <1> ; actually check here to insure it is on? 6497 <1> setopt [internalflags], debuggerA20 ; our A20 is on 6498 <1> @@: 6499 <1> %endif 6500 <1> .a20done: 6501 <1> 6502 000046B3 C606[530B]01 <1> mov byte [bInDbg], 1 6503 <1> %if _CATCHINT19 6504 000046B8 813E[000C][4C3A] <1> cmp word [run_int], int19msg 6505 000046BE 7505 <1> jne @F 6506 000046C0 800E[DA00]20 <1> setopt [internalflags3], dif3_gotint19 6507 <1> %endif 6508 <1> @@: 6509 000046C5 813E[000C][FF3B] <1> cmp word [run_int], progtrm 6510 000046CB 7505 <1> jnz @F 6511 000046CD 800E[D200]80 <1> setopt [internalflags], attachedterm 6512 <1> @@: 6513 <1> 6514 <1> %if _FORCETEXT 6515 <1> call checkgfx ; see if current mode is gfx, set to text if yes 6516 <1> %endif 6517 <1> 6518 <1> %if _VXCHG 6519 000046D2 B001 <1> mov al, 1 ; restore debugger screen 6520 000046D4 E8993C <1> call swapscreen 6521 <1> %ifn _VXCHGBIOS 6522 000046D7 06 <1> push es 6523 000046D8 B84000 <1> mov ax, 0040h 6524 000046DB 8EC0 <1> mov es, ax 6525 000046DD 26A08400 <1> mov al, [es:84h] ; did the number of screen rows change? 6526 000046E1 268A3E6200 <1> mov bh, [es:62h] 6527 000046E6 883E[550B] <1> mov [vpage], bh 6528 000046EA 3A06[4A0B] <1> cmp al, [vrows] 6529 000046EE A2[4A0B] <1> mov [vrows], al 6530 000046F1 7419 <1> jz @F 6531 <1> 6532 000046F3 F606[E400]01 <1> testopt [internalflags6], dif6_vv_mode 6533 000046F8 7412 <1> jz @F 6534 <1> 6535 000046FA 88C6 <1> mov dh, al ; yes. we cannot fully restore, but at least 6536 000046FC B200 <1> mov dl, 0 ; clear bottom line to ensure the debugger displays 6537 <1> ; will be seen 6538 000046FE B402 <1> mov ah, 2 ; set cursor position 6539 00004700 CD10 <1> int 10h 6540 00004702 B307 <1> mov bl, 7 ; BH=video page, BL=attribute 6541 00004704 B95000 <1> mov cx, 80 ; CX=columns 6542 00004707 B82009 <1> mov ax, 0920h ; AL=char to display 6543 0000470A CD10 <1> int 10h 6544 <1> @@: 6545 0000470C 07 <1> pop es 6546 <1> %else 6547 <1> ;--- with page flips, there are problems with many BIOSes: 6548 <1> ;--- the debugger displays may get the color of the debuggee! 6549 <1> ;--- if there's any trick to convince the BIOS not to do this, 6550 <1> ;--- implement it here! 6551 <1> mov byte [vpage], 1 6552 <1> %endif 6553 <1> %endif 6554 <1> 6555 <1> %if _ALTVID 6556 0000470D E80100 <1> call setscreen 6557 <1> %endif 6558 <1> 6559 00004710 C3 <1> retn 6560 <1> 6561 <1> %if 0 ;_LOCALENABLEA20 6562 <1> callfaresbx: 6563 <1> push es 6564 <1> push bx 6565 <1> retf 6566 <1> %endif 6567 <1> 6568 <1> 6569 <1> %if _ALTVID 6570 <1> 6571 <1> ;--- switch to debugger/debuggee screen with option /2. 6572 <1> ;--- since DOS/BIOS is used for output, there's no guarantee that it will work. 6573 <1> 6574 <1> setscreen: 6575 00004711 C3 <1> retn ; will be patched to "push ds" if "/2" cmdline switch and second adapter exists 6576 <1> ; (SMC in section lDEBUG_CODE) 6577 00004712 8B16[4D0B] <1> mov dx, [oldcrtp] 6578 00004716 8B1E[4F0B] <1> mov bx, [oldcols] 6579 0000471A A1[510B] <1> mov ax, [oldmr] 6580 0000471D B94000 <1> mov cx, 0040h ; 0040h is supposed to work in both rm/pm 6581 00004720 8ED9 <1> mov ds, cx 6582 00004722 368B0E[4B0B] <1> mov cx, [ss:oldcsrpos] 6583 00004727 80261000CF <1> and byte [10h], ~ 30h 6584 0000472C 80FAB4 <1> cmp dl, 0B4h 6585 0000472F 7505 <1> jnz @F 6586 00004731 800E100030 <1> or byte [10h], 30h 6587 <1> @@: 6588 00004736 871E4A00 <1> xchg bx, [4Ah] 6589 0000473A 870E5000 <1> xchg cx, [50h] 6590 0000473E 87166300 <1> xchg dx, [63h] 6591 00004742 86064900 <1> xchg al, [49h] 6592 00004746 86268400 <1> xchg ah, [84h] 6593 0000474A 1F <1> pop ds 6594 0000474B 8916[4D0B] <1> mov [oldcrtp], dx 6595 0000474F 890E[4B0B] <1> mov [oldcsrpos], cx 6596 00004753 891E[4F0B] <1> mov [oldcols], bx 6597 00004757 A3[510B] <1> mov [oldmr], ax 6598 0000475A C3 <1> retn 6599 <1> %endif 6600 <1> 6601 <1> 6602 <1> %if _FORCETEXT 6603 <1> checkgfx: 6604 <1> mov dx, 3CEh ; see if in graphics mode 6605 <1> in al, dx 6606 <1> mov bl, al 6607 <1> mov al, 6 6608 <1> out dx, al 6609 <1> inc dx 6610 <1> in al, dx 6611 <1> xchg bl, al 6612 <1> dec dx 6613 <1> out dx, al 6614 <1> test bl, 1 6615 <1> jz @F 6616 <1> mov ax, 0003h 6617 <1> int 10h 6618 <1> @@: 6619 <1> retn 6620 <1> %endif 6621 <1> 6622 <1> 6623 <1> %if _PM 6624 <1> ; INP: flag for PM 6625 <1> ; flag for prior PM (from remember_mode) 6626 <1> ; flag for modeswitched (set if in modeswitching) 6627 <1> ; OUT: seg/sels initialised for new mode, if changed 6628 <1> handle_mode_changed: 6629 <1> mov si, convsegs 6630 <1> mov cx, convsegs.amount 6631 <1> 6632 <1> call ispm 6633 <1> jz .now_pm 6634 <1> [cpu 286] 6635 <1> .now_86m: 6636 <1> testopt [internalflags3], dif3_prior_pm 6637 <1> jz .from_no_change 6638 <1> %if _MMXSUPP && _MMX_REDETECT 6639 <1> call mmx_redetect 6640 <1> %endif 6641 <1> .from_pm_now_86m: 6642 <1> .from_pm_now_86m.loop: 6643 <1> lodsw 6644 <1> xchg ax, di 6645 <1> cmp si, convsegs.end_fixed 6646 <1> ja @F 6647 <1> mov dx, word [di + soaSegment] 6648 <1> mov word [di + soaSegSel], dx 6649 <1> loop .from_pm_now_86m.loop 6650 <1> jmp .from_done_change 6651 <1> 6652 <1> @@: 6653 <1> ; We want to switch modes to get the segment bases. 6654 <1> ; First check we aren't already modeswitched. 6655 <1> testopt [internalflags], modeswitched 6656 <1> jnz .from_done_change ; cancel this --> 6657 <1> 6658 <1> testopt [internalflags], canswitchmode 6659 <1> jnz @FF 6660 <1> jmp @F 6661 <1> 6662 <1> .from_pm_now_86m.loop.nonfixed.nomodeswitch: 6663 <1> lodsw 6664 <1> xchg ax, di 6665 <1> @@: 6666 <1> xor dx, dx 6667 <1> mov word [di + soaSegment], dx 6668 <1> mov word [di + soaSegSel], dx 6669 <1> loop .from_pm_now_86m.loop.nonfixed.nomodeswitch 6670 <1> jmp .from_done_change 6671 <1> 6672 <1> @@: 6673 <1> push cx 6674 <1> push di 6675 <1> push si 6676 <1> d4 call d4message 6677 <1> d4 asciz "In intrtn1_code.from_pm_now_86m (switching modes to access selectors)",13,10 6678 <1> setopt [internalflags], modeswitched ; set flag for resetmode 6679 <1> mov al, 0 6680 <1> call sr_state ; save state 6681 <1> call switchmode ; switch to PM 6682 <1> ; ! handle_mode_changed not called here ! 6683 <1> ; do not call InDOS or other functions using seg/sels 6684 <1> pop si 6685 <1> pop di 6686 <1> jmp @F 6687 <1> 6688 <1> .from_pm_now_86m.loop.nonfixed: 6689 <1> lodsw 6690 <1> xchg ax, di 6691 <1> push cx 6692 <1> @@: 6693 <1> xor bx, bx 6694 <1> xchg bx, word [di + soaSelector] 6695 <1> mov ax, 0006h 6696 <1> int 31h 6697 <1> jc @F 6698 <1> test dl, 15 6699 <1> jnz @F 6700 <1> test cx, 0FFF0h 6701 <1> jnz @F 6702 <1> shr dx, 4 6703 <1> shl cx, 12 6704 <1> or dx, cx 6705 <1> mov word [di + soaSegment], dx 6706 <1> pop cx 6707 <1> mov word [di + soaSegSel], dx 6708 <1> loop .from_pm_now_86m.loop.nonfixed 6709 <1> call resetmode ; ! only if we did the switch 6710 <1> ; Note: This recursively calls this function, 6711 <1> ; handle_mode_changed. Because the modeswitched 6712 <1> ; flag is set during this call, this only re- 6713 <1> ; initialises the fixed seg/sels with the segment 6714 <1> ; values. That is redundant but does no harm. 6715 <1> jmp .from_done_change 6716 <1> __CPU__ 6717 <1> 6718 <1> .now_pm: 6719 <1> testopt [internalflags3], dif3_prior_pm 6720 <1> jnz .from_no_change 6721 <1> %if _MMXSUPP && _MMX_REDETECT 6722 <1> call mmx_redetect 6723 <1> %endif 6724 <1> .from_86m_now_pm: 6725 <1> .from_86m_now_pm.loop: 6726 <1> lodsw 6727 <1> xchg ax, di 6728 <1> cmp si, convsegs.end_fixed 6729 <1> ja @F 6730 <1> 6731 <1> mov ax, word [di + soaSelector] 6732 <1> test ax, ax 6733 <1> jnz .no_dosdata_change 6734 <1> mov bx, word [di + soaSegment] 6735 <1> mov ax, 0002h 6736 <1> int 31h 6737 <1> mov word [di + soaSelector], ax 6738 <1> 6739 <1> .no_dosdata_change: 6740 <1> mov word [di + soaSegSel], ax 6741 <1> jmp @FFF 6742 <1> 6743 <1> @@: 6744 <1> ; Magic: Do not modify if called during modeswitching. 6745 <1> testopt [internalflags], modeswitched 6746 <1> jnz .from_done_change ; cancel this --> 6747 <1> 6748 <1> mov bx, word [di + soaSegment] 6749 <1> mov ax, 0002h 6750 <1> int 31h 6751 <1> jnc @F 6752 <1> xor ax, ax 6753 <1> @@: 6754 <1> mov word [di + soaSegSel], ax 6755 <1> mov word [di + soaSelector], ax 6756 <1> and word [di + soaSegment], 0 6757 <1> @@: 6758 <1> %if $ - .from_86m_now_pm.loop > 126 6759 <1> loop .from_86m_now_pm.loop_j 6760 <1> jmp .from_done_change 6761 <1> 6762 <1> .from_86m_now_pm.loop_j: 6763 <1> jmp .from_86m_now_pm.loop 6764 <1> %else 6765 <1> loop .from_86m_now_pm.loop 6766 <1> %endif 6767 <1> .from_done_change: 6768 <1> .from_no_change: 6769 <1> 6770 <1> 6771 <1> remember_mode: 6772 <1> call ispm 6773 <1> jnz .from_86m 6774 <1> .from_pm: 6775 <1> setopt [internalflags3], dif3_prior_pm 6776 <1> jmp @F 6777 <1> 6778 <1> .from_86m: 6779 <1> clropt [internalflags3], dif3_prior_pm 6780 <1> @@: 6781 <1> retn 6782 <1> %endif 6783 <1> 6784 <1> 6785 <1> %if _MMXSUPP && _MMX_REDETECT && _PM 6786 <1> mmx_redetect: 6787 <1> _no386 retn 6788 <1> %ifn _ONLYNON386 6789 <1> subcpu 386 6790 <1> push eax 6791 <1> push ebx 6792 <1> push ecx 6793 <1> push edx 6794 <1> 6795 <1> mov byte [has_mmx], 0 ; if no 486 or no cpuid, reset 6796 <1> 6797 <1> ; Copied from init.asm, debugging messages 6798 <1> ; and machine variable access removed. 6799 <1> mov bx, sp ; save current stack pointer to align 6800 <1> and sp, ~3 ; align stack to avoid AC fault 6801 <1> pushfd ; push original EFLAGS 6802 <1> pop eax ; get original EFLAGS 6803 <1> mov ecx, eax ; save original EFLAGS in ECX (including IF) 6804 <1> 6805 <1> xor eax, 40000h ; flip AC bit in EFLAGS 6806 <1> and ax, ~0200h ; clear IF 6807 <1> push eax ; put new EFLAGS value on stack 6808 <1> popfd ; replace EFLAGS value; DI 6809 <1> pushfd ; get new EFLAGS 6810 <1> pop eax ; store new EFLAGS value in EAX 6811 <1> mov ax, cx ; ignore low bits (including IF) 6812 <1> cmp eax, ecx 6813 <1> je .cpudone_stack_eax_equals_ecx ; if 80386 --> 6814 <1> 6815 <1> ; Intel486 DX CPU, Intel487 SX NDP, and Intel486 SX CPU check. 6816 <1> ; Checking for ability to set/clear ID flag (bit 21) in EFLAGS 6817 <1> ; which indicates the presence of a processor with the ability 6818 <1> ; to use the CPUID instruction. 6819 <1> mov eax, ecx ; get original EFLAGS 6820 <1> xor eax, 200000h ; flip ID bit in EFLAGS 6821 <1> and ax, ~0200h ; clear IF 6822 <1> push eax ; save new EFLAGS value on stack 6823 <1> popfd ; replace current EFLAGS value; DI 6824 <1> pushfd ; get new EFLAGS 6825 <1> pop eax ; store new EFLAGS in EAX 6826 <1> mov ax, cx ; ignore low bits (including IF) 6827 <1> 6828 <1> .cpudone_stack_eax_equals_ecx: 6829 <1> push ecx 6830 <1> popfd ; restore AC,ID bits and IF in EFLAGS (86 Mode) 6831 <1> mov sp, bx ; restore sp 6832 <1> 6833 <1> cmp eax, ecx ; check if it's changed 6834 <1> je .cpudone ; if it's a 486 (can't toggle ID bit) --> 6835 <1> 6836 <1> ; Execute CPUID instruction. 6837 <1> subcpu 486 ; NASM (at least 2.10rc1) handles cpuid itself as a 6838 <1> ; 586+ instruction, but we know better. So this 6839 <1> ; part is declared for 486 compatibility, and only 6840 <1> ; the cpuid instructions are emitted with 586 6841 <1> ; compatibility to appease NASM. 6842 <1> xor eax, eax ; set up input for CPUID instruction 6843 <1> [cpu 586] 6844 <1> cpuid 6845 <1> __CPU__ 6846 <1> cmp eax, byte 1 6847 <1> jb .cpudone ; if 1 is not a valid input value for CPUID 6848 <1> xor eax, eax ; otherwise, run CPUID with eax = 1 6849 <1> inc eax 6850 <1> [cpu 586] 6851 <1> cpuid 6852 <1> __CPU__ 6853 <1> test edx, 80_0000h 6854 <1> setnz byte [has_mmx] 6855 <1> .cpudone: 6856 <1> pop edx 6857 <1> pop ecx 6858 <1> pop ebx 6859 <1> pop eax 6860 <1> retn 6861 <1> 6862 <1> subcpureset 6863 <1> subcpureset 6864 <1> %endif 6865 <1> %endif 6866 <1> 6867 <1> 6868 <1> %if _PM && _DEBUG 6869 <1> ; INP: - 6870 <1> ; OUT: es = ds 6871 <1> ; CHG: eax, edx, bx, cx, bp, si, di 6872 <1> ; STT: in PM 6873 <1> ; do not call InDOS or other functions using seg/sels 6874 <1> pm_set_handlers: 6875 <1> xor bp, bp ; = 0 if no 386 6876 <1> _386 inc bp 6877 <1> _386 inc bp ; = 2 if 386 6878 <1> 6879 <1> push ds 6880 <1> pop es 6881 <1> 6882 <1> mov si, exctab ; hook several exceptions 6883 <1> %if _DEBUGUPDATESAVE 6884 <1> mov di, excsave 6885 <1> %endif 6886 <1> _386 xor edx, edx ; clear edxh 6887 <1> mov dx, exc_first 6888 <1> .loopexc: 6889 <1> lodsb 6890 <1> mov bl, al 6891 <1> 6892 <1> %if _DEBUGUPDATESAVE 6893 <1> _386_o32 ; push edx 6894 <1> push dx ; preserve excXX pointer 6895 <1> mov ax, 0202h 6896 <1> ; (edxh is zero) 6897 <1> int 31h ; cx:(e)dx -> prior handler 6898 <1> _386_o32 ; xchg eax, edx 6899 <1> xchg ax, dx 6900 <1> _386_o32 ; stosd 6901 <1> stosw ; store offset (dword on 386+, else word) 6902 <1> xchg ax, cx 6903 <1> stosw ; store selector 6904 <1> mov ax, 4 6905 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 6906 <1> add di, ax ; -> next entry of excsave 6907 <1> _386_o32 ; pop edx 6908 <1> pop dx 6909 <1> %endif 6910 <1> 6911 <1> mov cx, word [cssel] ; -> our handler for this exception 6912 <1> mov ax, 0203h 6913 <1> int 31h ; set our handler 6914 <1> add dx, byte exc_second - exc_first 6915 <1> ; -> next handler 6916 <1> cmp si, endexctab ; if another to go --> 6917 <1> jb .loopexc 6918 <1> 6919 <1> %if _CATCHPMINT214C 6920 <1> mov si, pminttab ; ds:si -> pminttab 6921 <1> %if _DEBUGUPDATESAVE 6922 <1> mov di, pmintsave ; es:di -> pmintsave 6923 <1> %endif 6924 <1> .loopint: 6925 <1> lodsb ; get interrupt number 6926 <1> mov bl, al ; bl = interrupt number 6927 <1> 6928 <1> %if _DEBUGUPDATESAVE 6929 <1> _386 xor edx, edx ; clear edxh 6930 <1> mov ax, 0204h 6931 <1> int 31h ; cx:(e)dx -> prior handler 6932 <1> _386_o32 ; xchg eax, edx 6933 <1> xchg ax, dx ; (e)ax = offset 6934 <1> _386_o32 ; stosd 6935 <1> stosw ; store offset (dword on 386+, else word) 6936 <1> xchg ax, cx 6937 <1> stosw ; store selector 6938 <1> mov ax, 4 6939 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 6940 <1> add di, ax ; -> next entry of pmintsave 6941 <1> %endif 6942 <1> 6943 <1> lodsw ; ax -> our handler 6944 <1> _386 xor edx, edx 6945 <1> xchg ax, dx ; (e)dx -> our handler 6946 <1> mov cx, word [cssel] ; cx:(e)dx -> our handler 6947 <1> mov ax, 0205h 6948 <1> int 31h 6949 <1> cmp si, pminttab.end 6950 <1> jb .loopint 6951 <1> %endif 6952 <1> 6953 <1> jmp resetmode 6954 <1> %endif 6955 <1> 6956 <1> 6957 <1> %if _PM && (_DEBUG || 1 || _CATCHPMINT214C) 6958 <1> ; INP: - 6959 <1> ; OUT: - 6960 <1> ; CHG: eax, edx, bx, cx, bp, si, di 6961 <1> ; STT: in PM 6962 <1> ; do not call InDOS or other functions using seg/sels 6963 <1> pm_reset_handlers: 6964 <1> xor bp, bp ; = 0 if no 386 6965 <1> _386 inc bp 6966 <1> _386 inc bp ; = 2 if 386 6967 <1> 6968 <1> 6969 <1> %if CATCHEXCAMOUNT 6970 <1> ; unhook exceptions 6971 <1> mov di, exctab 6972 <1> mov si, excsave 6973 <1> .loopexc: 6974 <1> mov bl, [di] ; bl = exception number 6975 <1> inc di 6976 <1> _386_o32 ; lodsd 6977 <1> lodsw ; load offset (dword on 386+, else word) 6978 <1> _386_o32 ; xchg eax, edx 6979 <1> xchg ax, dx 6980 <1> lodsw ; load selector 6981 <1> xchg ax, cx ; cx:(e)dx -> prior handler 6982 <1> mov ax, 4 6983 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 6984 <1> add si, ax ; -> next entry of excsave 6985 <1> mov ax, 0203h 6986 <1> int 31h ; set previous handler 6987 <1> cmp di, endexctab ; if another to go --> 6988 <1> jb .loopexc 6989 <1> %endif 6990 <1> 6991 <1> 6992 <1> %if CATCHPMINTAMOUNT 6993 <1> ; unhook interrupts 6994 <1> mov di, pminttab ; ds:di -> pminttab 6995 <1> mov si, pmintsave ; ds:si -> pmintsave 6996 <1> .loopint: 6997 <1> mov bl, [di] ; bl = interrupt number 6998 <1> add di, 3 ; -> after this pminttab entry 6999 <1> _386_o32 ; lodsd 7000 <1> lodsw ; load offset (dword on 386+, else word) 7001 <1> _386_o32 ; xchg eax, edx 7002 <1> xchg ax, dx 7003 <1> lodsw ; load selector 7004 <1> xchg ax, cx ; cx:(e)dx -> prior handler 7005 <1> mov ax, 4 7006 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7007 <1> add si, ax ; -> next entry of pmintsave 7008 <1> mov ax, 0205h 7009 <1> int 31h ; set previous handler 7010 <1> cmp di, pminttab.end ; if another to go --> 7011 <1> jb .loopint 7012 <1> %endif 7013 <1> 7014 <1> jmp resetmode 7015 <1> %endif 7016 <1> 7017 <1> 7018 <1> %if _DEBUG1 7019 <1> ; INP: bx -> dword address, word counter 7020 <1> ; dx:ax = linear address to check 7021 <1> ; OUT: NC if to proceed as usual 7022 <1> ; CY if address matched and counter indicates trigger 7023 <1> ; (ie, this should cause the caller to fail) 7024 <1> ; If the address matched, the counter has been stepped. 7025 <1> ; (The result of that step indicates whether to trigger.) 7026 <1> ; STT: ds = ss = debugger data selector 7027 <1> handle_test_case: 7028 <1> cmp word [bx], ax 7029 <1> jne .proceed 7030 <1> cmp word [bx + 2], dx 7031 <1> jne .proceed 7032 <1> 7033 <1> test word [bx + 4], 7FFFh ; is it already at a terminal state ? 7034 <1> jz .no_decrement ; yes, do not further decrement --> 7035 <1> dec word [bx + 4] ; decrement (towards 0 or 8000h) 7036 <1> jz .trigger ; case for decrementing 1 to 0 --> 7037 <1> .no_decrement: 7038 <1> cmp word [bx + 4], 8000h ; decrement resulted in 8000h 7039 <1> je .trigger ; or was already in that state? --> 7040 <1> .proceed: 7041 <1> clc 7042 <1> retn 7043 <1> 7044 <1> .trigger: 7045 <1> stc 7046 <1> retn 7047 <1> 7048 <1> 7049 <1> ; INP: bx -> first test record (dword address, word counter) 7050 <1> ; dx:ax = linear address to check 7051 <1> ; cx = number of consecutive test records to check 7052 <1> ; OUT: NC if to proceed as usual 7053 <1> ; CY if address matched and counter indicates trigger 7054 <1> ; (ie, this should cause the caller to fail) 7055 <1> ; CHG: bx, cx 7056 <1> ; STT: ds = ss = debugger data selector 7057 <1> ; 7058 <1> ; Note that all test cases are tried and, if the address 7059 <1> ; matches, their counters are stepped. In particular, 7060 <1> ; a trigger no longer causes us to skip all further 7061 <1> ; test cases that may have the same address. 7062 <1> ; If at least one of the matching test cases indicates a 7063 <1> ; trigger condition after its stepping, the return is CY. 7064 <1> handle_test_case_multiple_16: 7065 <1> mov cx, 16 7066 <1> handle_test_case_multiple: 7067 <1> clc 7068 <1> pushf ; initialise flags on stack with NC 7069 <1> jcxz .end 7070 <1> .loop: 7071 <1> call handle_test_case 7072 <1> jnc .next 7073 <1> popf ; (discard) 7074 <1> stc 7075 <1> pushf ; new flags on stack with CY 7076 <1> .next: 7077 <1> add bx, 6 7078 <1> loop .loop 7079 <1> .end: 7080 <1> popf ; CF 7081 <1> retn 7082 <1> %endif 7083 <1> 7084 <1> 7085 <1> usesection lDEBUG_DATA_ENTRY 7086 000048D3 00 <1> align 4, db 0 7087 000048D4 01000000 <1> default_pp_count: dd 1 7088 000048D8 01000000 <1> default_tp_count: dd 1 7089 000048DC 01000000 <1> default_tt_count: dd 1 7090 <1> 7091 <1> 7092 <1> usesection lDEBUG_CODE 7093 <1> ; PARSE_PT - Parse 'p' or 't' command. Also resets pagedcommand flag. 7094 <1> ; Entry AL First character of command 7095 <1> ; SI Address of next character 7096 <1> ; [internalflags2] & dif2_is_pp = set if P 7097 <1> ; [internalflags] & tt_p = set if TP 7098 <1> ; both clear if T 7099 <1> ; Exit BX:CX Number of times to repeat 7100 <1> ; Uses AH,BX,CX,DX. 7101 <1> 7102 <1> parse_pt: 7103 0000475B E877BF <1> call guard_re 7104 0000475E C706[FC00][122A] <1> mov word [gg_deferred_message], msg.empty_message 7105 00004764 8326[FE00]00 <1> and word [bb_deferred_message_in_lineout_behind], 0 7106 00004769 8026[D400]F7 <1> clropt [internalflags2], dif2_gg_is_gg 7107 0000476E 8026[D300]2B <1> clropt [internalflags], tt_while | tt_silent_mode | tt_no_bb | tt_no_bb_first 7109 00004773 8326[560A]00 <1> and word [tt_silent_mode_number], 0 7110 <1> 7111 <1> ; TP.NB, T.NB, P.NB: trace/proceed without bb breakpoints 7112 <1> ; 7113 <1> ; Note that when such a command is repeated through lastcmd, 7114 <1> ; it gets an empty line, thus tt_no_bb remains clear, and 7115 <1> ; the corresponding command without .NB is run. 7116 00004778 3C2E <1> cmp al, '.' 7117 0000477A 7520 <1> jne .no_dot 7118 <1> 7119 0000477C AD <1> lodsw 7120 0000477D 25DFDF <1> and ax, TOUPPER_W 7121 00004780 3D4E42 <1> cmp ax, "NB" 7122 00004783 7411 <1> je .dot_nb 7123 <1> ; TP.SB, T.SB, P.SB: trace/proceed without bb for first step 7124 00004785 3D5342 <1> cmp ax, "SB" 7125 00004788 7405 <1> je .dot_sb 7126 0000478A 4E <1> dec si 7127 0000478B 4E <1> dec si 7128 0000478C E9CE3A <1> jmp error 7129 <1> 7130 <1> .dot_sb: 7131 0000478F 800E[D300]80 <1> setopt [internalflags], tt_no_bb_first 7132 00004794 EB05 <1> jmp .dot_common 7133 <1> 7134 <1> .dot_nb: 7135 00004796 800E[D300]40 <1> setopt [internalflags], tt_no_bb 7136 <1> .dot_common: 7137 0000479B AC <1> lodsb 7138 <1> .no_dot: 7139 0000479C E84001 <1> call parseql ; process =addr 7140 0000479F E80F52 <1> call skipcomm0 ; skip any white space 7141 <1> 7142 000047A2 BA0400 <1> mov dx, opt3_pp_no_paging 7143 000047A5 8B1E[D648] <1> mov bx, word [default_pp_count + 2] 7144 000047A9 8B0E[D448] <1> mov cx, word [default_pp_count] 7145 000047AD F606[D500]10 <1> testopt [internalflags2], dif2_is_pp 7146 000047B2 751D <1> jnz @F 7147 000047B4 BA0200 <1> mov dx, opt3_tp_no_paging 7148 000047B7 8B1E[DA48] <1> mov bx, word [default_tp_count + 2] 7149 000047BB 8B0E[D848] <1> mov cx, word [default_tp_count] 7150 000047BF F606[D300]08 <1> testopt [internalflags], tt_p 7151 000047C4 750B <1> jnz @F 7152 000047C6 BA0100 <1> mov dx, opt3_tt_no_paging 7153 000047C9 8B1E[DE48] <1> mov bx, word [default_tt_count + 2] 7154 000047CD 8B0E[DC48] <1> mov cx, word [default_tt_count] 7155 <1> @@: ; bx:cx = default count 7156 <1> 7157 000047D1 8516[A800] <1> test word [options3], dx 7158 000047D5 7405 <1> jz @F 7159 000047D7 8026[D000]F7 <1> clropt [internalflags], pagedcommand 7160 <1> @@: 7161 <1> 7162 <1> ; Initialise auxbuff pointers. 7163 000047DC E8EA00 <1> call tpg_initialise_empty_auxbuff 7164 <1> 7165 000047DF E8A851 <1> call iseol? 7166 000047E2 7472 <1> je .ppt1 ; if no count given --> (uses bx:cx = default) 7167 000047E4 E8904B <1> nearcall getdword ; bx:dx = given count 7168 <1> 7169 000047E7 53 <1> push bx 7170 000047E8 52 <1> push dx ; push count 7171 000047E9 E8F451 <1> call skipwh0 7172 000047EC E89B51 <1> call iseol? 7173 000047EF 7463 <1> je .no_while 7174 000047F1 4E <1> dec si 7175 000047F2 BA[1E21] <1> mov dx, msg.while 7176 000047F5 E82851 <1> call isstring? 7177 000047F8 7405 <1> je .found_while 7178 <1> 7179 000047FA E8A200 <1> call .handle_silent ; (error if no SILENT keyword) 7180 <1> 7181 000047FD EB55 <1> jmp .no_while 7182 <1> 7183 <1> 7184 <1> .found_while: 7185 000047FF E8AE51 <1> call skipcomma 7186 00004802 4E <1> dec si 7187 00004803 89F1 <1> mov cx, si 7188 00004805 AC <1> lodsb 7189 00004806 E86E4B <1> nearcall getexpression 7190 00004809 E88E44 <1> nearcall toboolean 7191 0000480C E8D151 <1> call skipwh0 7192 0000480F 52 <1> push dx 7193 00004810 56 <1> push si 7194 00004811 E87651 <1> call iseol? ; expect end of line here 7195 00004814 7404 <1> je .no_while_silent 7196 <1> 7197 00004816 4E <1> dec si 7198 00004817 E88500 <1> call .handle_silent 7199 <1> 7200 <1> .no_while_silent: 7201 0000481A 5E <1> pop si 7202 0000481B 5A <1> pop dx 7203 0000481C 85D2 <1> test dx, dx ; condition true now ? 7204 0000481E 7509 <1> jnz @F 7205 <1> 7206 00004820 BA[C821] <1> mov dx, msg.while_not_true 7207 00004823 E88D57 <1> call putsz 7208 00004826 E9D7B7 <1> jmp cmd3 7209 <1> 7210 <1> @@: 7211 <1> ; (si + 1) -> line terminator (13, ';', 0) or next keyword 7212 <1> @@: 7213 00004829 4E <1> dec si ; -> terminator, or blank 7214 0000482A 807CFF20 <1> cmp byte [si - 1], 32 ; another blank at end ? 7215 0000482E 74F9 <1> je @B ; yes --> 7216 00004830 807CFF09 <1> cmp byte [si - 1], 9 7217 00004834 74F3 <1> je @B ; yes --> 7218 00004836 89F0 <1> mov ax, si 7219 00004838 29C8 <1> sub ax, cx ; ax = length of expression 7220 0000483A 3D0701 <1> cmp ax, while_buffer.length - 1 7221 0000483D 7603E91B3A <1> ja error 7222 00004842 57 <1> push di 7223 00004843 BF[F00C] <1> mov di, while_buffer 7224 00004846 89CE <1> mov si, cx ; -> expression start 7225 00004848 91 <1> xchg cx, ax ; cx = length of expression 7226 00004849 F3A4 <1> rep movsb ; store expression 7227 0000484B B000 <1> mov al, 0 7228 0000484D AA <1> stosb ; terminate string 7229 0000484E 5F <1> pop di 7230 <1> 7231 0000484F 800E[D300]04 <1> setopt [internalflags], tt_while 7232 <1> .no_while: 7233 00004854 59 <1> pop cx 7234 00004855 5B <1> pop bx ; bx:cx = given count 7235 <1> 7236 <1> .ppt1: 7237 00004856 85DB <1> test bx, bx 7238 00004858 7507 <1> jnz @F 7239 0000485A 85C9 <1> test cx, cx 7240 0000485C 7503E9FC39 <1> jz error ; must be at least 1, else error --> 7241 <1> @@: 7242 00004861 53 <1> push bx 7243 00004862 51 <1> push cx 7244 <1> 7245 00004863 8026[D400]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 7248 <1> 7249 00004868 F606[A200]04 <1> testopt [options], tp_do_not_skip_bp 7250 0000486D 752A <1> jnz .do_not_skip_cseip 7251 0000486F 800E[D400]01 <1> setopt [internalflags2], dif2_gg_is_first 7252 <1> 7253 00004874 803E[F80B]00 <1> cmp byte [eqflag], 0 7254 00004879 7507 <1> jne .cseip_take_eql 7255 <1> 7256 <1> _386_PM_o32 ; xor ecx, ecx 7257 0000487B 31C9 <1> xor cx, cx 7258 0000487D E867F3 <1> call get_cseip_ecx_linear 7259 00004880 EB0B <1> jmp .got_cseip 7260 <1> 7261 <1> .cseip_take_eql: 7262 00004882 8B1E[FE0B] <1> mov bx, word [eqladdr + 4] 7263 <1> _386_PM_o32 ; mov edx, dword [eqladdr] 7264 00004886 8B16[FA0B] <1> mov dx, word [eqladdr] 7265 0000488A E864F3 <1> call getlinear_d_b 7266 <1> .got_cseip: 7267 0000488D 7303E9CB39 <1> jc error 7268 00004892 A3[F000] <1> mov word [gg_first_cseip_linear], ax 7269 00004895 8916[F200] <1> mov word [gg_first_cseip_linear + 2], dx 7270 <1> .do_not_skip_cseip: 7271 <1> 7272 00004899 59 <1> pop cx 7273 0000489A 5B <1> pop bx 7274 <1> 7275 0000489B E86100 <1> call seteq ; make the = operand take effect 7276 0000489E C3 <1> retn 7277 <1> 7278 <1> 7279 <1> .handle_silent: 7280 0000489F BA[2421] <1> mov dx, msg.silent 7281 000048A2 E87B50 <1> call isstring? 7282 000048A5 7403E9B339 <1> jne error 7283 000048AA E80351 <1> call skipcomma 7284 000048AD 4E <1> dec si 7285 000048AE E81851 <1> call skipequals 7286 000048B1 E8D650 <1> call iseol? 7287 000048B4 740A <1> je .no_silent_mode_number 7288 <1> 7289 000048B6 E8A04F <1> nearcall getword 7290 000048B9 8916[560A] <1> mov word [tt_silent_mode_number], dx 7291 000048BD E8DF50 <1> call chkeol 7292 <1> 7293 <1> .no_silent_mode_number: 7294 000048C0 E8EFBD <1> call guard_auxbuff.1_or_2 7295 000048C3 800E[D300]10 <1> setopt [internalflags], tt_silent_mode 7296 000048C8 C3 <1> retn 7297 <1> 7298 <1> 7299 <1> ; INP: (_PM) word [auxbuff_switchbuffer_size] 7300 <1> ; word [auxbuff_behind_last_silent] 7301 <1> ; [options6] & opt6_rh_mode 7302 <1> ; OUT: word [auxbuff_behind_last_silent] 7303 <1> ; word [auxbuff_start_silent] 7304 <1> ; CHG: dx 7305 <1> tpg_initialise_empty_auxbuff: 7306 <1> %if _RH 7307 000048C9 8B16[4C0A] <1> mov dx, word [auxbuff_behind_last_silent] 7308 000048CD F606[B600]10 <1> testopt [options6], opt6_rh_mode 7309 000048D2 7506 <1> jnz .last 7310 <1> %endif 7311 <1> .reset: 7312 <1> %if _PM 7313 <1> mov dx, word [auxbuff_switchbuffer_size] 7314 <1> %else 7315 000048D4 31D2 <1> xor dx, dx 7316 <1> %endif 7317 000048D6 8916[4C0A] <1> mov word [auxbuff_behind_last_silent], dx 7318 <1> .last: 7319 <1> %if _RH 7320 000048DA 8916[4E0A] <1> mov word [auxbuff_start_silent], dx 7321 <1> %endif 7322 000048DE C3 <1> retn 7323 <1> 7324 <1> 7325 <1> ; PARSEQL - Parse `=' operand for `g', 'p' and `t' commands. 7326 <1> ; Entry AL First character of command 7327 <1> ; SI Address of next character 7328 <1> ; Exit AL First character beyond range 7329 <1> ; SI Address of the character after that 7330 <1> ; eqflag Nonzero if an `=' operand was present 7331 <1> ; eqladdr Address, if one was given 7332 <1> ; Uses AH,BX,CX,DX. 7333 <1> 7334 <1> parseql: 7335 000048DF C606[F80B]00 <1> mov byte [eqflag], 0 ; mark '=' as absent 7336 000048E4 3C3D <1> cmp al, '=' 7337 000048E6 7516 <1> jne peq1 ; if no '=' operand 7338 000048E8 E8F450 <1> call skipwhite 7339 000048EB 8B1E[D00C] <1> mov bx, word [reg_cs] ; default segment 7340 000048EF E85E3E <1> nearcall getaddrX ; get the address into bx:(e)dx 7341 <1> _386_PM_o32 ; mov dword [eqladdr], edx 7342 000048F2 8916[FA0B] <1> mov word [eqladdr+0], dx 7343 000048F6 891E[FE0B] <1> mov word [eqladdr+4], bx 7344 000048FA FE06[F80B] <1> inc byte [eqflag] 7345 <1> peq1: 7346 000048FE C3 <1> retn 7347 <1> 7348 <1> 7349 <1> ; SETEQ - Copy the = arguments to their place, if appropriate. 7350 <1> ; (This is not done immediately, because the command may have 7351 <1> ; a syntax error.) 7352 <1> ; Uses AX. 7353 <1> seteq: 7354 000048FF 803E[F80B]00 <1> cmp byte [eqflag], 0 7355 00004904 7411 <1> je .return ; if no `=' operand 7356 00004906 A1[FA0B] <1> mov ax, word [eqladdr+0] 7357 00004909 A3[DC0C] <1> mov word [reg_eip], ax 7358 <1> %if _PM 7359 <1> mov ax, word [eqladdr+2] 7360 <1> mov word [reg_eip+2], ax 7361 <1> %endif 7362 0000490C A1[FE0B] <1> mov ax, word [eqladdr+4] 7363 0000490F A3[D00C] <1> mov word [reg_cs], ax 7364 00004912 C606[F80B]00 <1> mov byte [eqflag], 0 ; clear the flag 7365 <1> .return: 7366 00004917 C3 <1> retn 7367 <1> 7368 <1> ..@run_access_end: 2929 %include "install.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug INSTALL commands 5 <1> 6 <1> Copyright (C) 2008-2022 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> uninstall: 18 00004918 B9[7C49] <1> mov cx, install.clear 19 0000491B EB03 <1> jmp install.common 20 <1> 21 <1> install: 22 0000491D B9[5849] <1> mov cx, .set 23 <1> 24 <1> .common: 25 00004920 E8BC50 <1> call skipwhite 26 00004923 56 <1> push si 27 <1> .loopcheck: 28 00004924 4E <1> dec si 29 00004925 E88900 <1> call checkinstallflag ; valid command ? (errors out if no) 30 00004928 E88550 <1> call skipcomma 31 0000492B E85C50 <1> call iseol? 32 0000492E 75F4 <1> jne .loopcheck 33 <1> 34 00004930 5E <1> pop si 35 <1> .loopdo: 36 00004931 4E <1> dec si 37 00004932 E87C00 <1> call checkinstallflag ; re-detect which it is, cannot fail 38 00004935 8B5702 <1> mov dx, word [bx + ifDescription] 39 00004938 8B7F04 <1> mov di, word [bx + ifOptions] 40 0000493B 8B4706 <1> mov ax, word [bx + ifValue] 41 0000493E 85FF <1> test di, di ; normal with options pointer ? 42 00004940 7503 <1> jnz @F ; yes --> 43 00004942 FFD0 <1> call ax ; call ifValue function pointer 44 00004944 A9 <1> db __TEST_IMM16 ; (skip call cx) 45 <1> @@: 46 00004945 FFD1 <1> call cx ; call install.set or install.clear 47 00004947 E86650 <1> call skipcomma 48 0000494A E83D50 <1> call iseol? 49 0000494D 75E2 <1> jne .loopdo 50 0000494F C3 <1> retn 51 <1> 52 <1> 53 <1> ; OUT: ZR if not reverse 54 <1> .isreverse: 55 <1> ; (n & (n - 1)) != 0 56 00004950 53 <1> push bx 57 00004951 89C3 <1> mov bx, ax 58 00004953 4B <1> dec bx 59 00004954 21C3 <1> and bx, ax 60 00004956 5B <1> pop bx 61 00004957 C3 <1> retn 62 <1> 63 <1> .set: 64 00004958 E8F5FF <1> call .isreverse 65 0000495B 740C <1> jz .setnormal 66 <1> 67 <1> .setreverse: 68 0000495D F7D0 <1> not ax 69 0000495F 8505 <1> test word [di], ax ; already clear ? 70 00004961 7410 <1> jz @F ; yes --> 71 00004963 F7D0 <1> not ax 72 00004965 2105 <1> and word [di], ax ; clear flag 73 00004967 EB06 <1> jmp .settry 74 <1> 75 <1> 76 <1> .setnormal: 77 00004969 8505 <1> test word [di], ax ; already set ? 78 0000496B 7506 <1> jnz @F ; yes --> 79 0000496D 0905 <1> or word [di], ax ; set flag 80 <1> .settry: 81 0000496F F8 <1> clc ; NC = setting 82 00004970 FF6708 <1> jmp near [bx + ifTrying]; call try handler 83 <1> 84 <1> @@: 85 00004973 E83D56 <1> call putsz 86 00004976 BA[001A] <1> mov dx, msg.alreadyenabled 87 <1> .putsz: 88 00004979 E93756 <1> jmp putsz 89 <1> 90 <1> 91 <1> .clear: 92 0000497C E8D1FF <1> call .isreverse 93 0000497F 740A <1> jz .clearnormal 94 <1> 95 <1> .clearreverse: 96 00004981 F7D0 <1> not ax 97 00004983 8505 <1> test word [di], ax ; already set ? 98 00004985 7510 <1> jnz @F 99 00004987 0905 <1> or word [di], ax ; set flag 100 00004989 EB08 <1> jmp .cleartry 101 <1> 102 <1> .clearnormal: 103 0000498B 8505 <1> test word [di], ax ; already clear ? 104 0000498D 7408 <1> jz @F ; yes --> 105 0000498F F7D0 <1> not ax ; get mask value 106 00004991 2105 <1> and word [di], ax ; clear flag 107 <1> .cleartry: 108 00004993 F9 <1> stc ; CY = clearing 109 00004994 FF6708 <1> jmp near [bx + ifTrying]; call try handler 110 <1> 111 <1> @@: 112 00004997 E81956 <1> call putsz 113 0000499A BA[171A] <1> mov dx, msg.alreadydisabled 114 0000499D EBDA <1> jmp .putsz 115 <1> 116 <1> 117 <1> install_trying: 118 0000499F 7208 <1> jc .clear 119 <1> .set: 120 000049A1 E80F56 <1> call putsz 121 000049A4 BA[2F1A] <1> mov dx, msg.tryenable 122 000049A7 EB06 <1> jmp .putsz 123 <1> 124 <1> .clear: 125 000049A9 E80756 <1> call putsz 126 000049AC BA[451A] <1> mov dx, msg.trydisable 127 <1> .putsz: 128 000049AF EBC8 <1> jmp install.putsz 129 <1> 130 <1> checkinstallflag: 131 000049B1 BB[242D] <1> mov bx, installflags 132 <1> @@: 133 000049B4 8B17 <1> mov dx, word [bx + ifKeyword] 134 000049B6 85D2 <1> test dx, dx 135 000049B8 740B <1> jz .error 136 000049BA E8634F <1> call isstring? 137 000049BD 7405 <1> je @F 138 000049BF 83C30C <1> add bx, INSTALLFLAG_size 139 000049C2 EBF0 <1> jmp @B 140 <1> 141 <1> @@: 142 000049C4 C3 <1> retn 143 <1> 144 <1> .error: 145 000049C5 E99538 <1> jmp error 146 <1> 147 <1> 148 <1> %if _AREAS && _AREAS_HOOK_CLIENT 149 <1> install_areas: 150 <1> cmp cx, install.clear 151 <1> je uninstall_areas 152 <1> 153 <1> push si 154 <1> cmp word [areas_struc + areastrucEntry], 0CBF9h 155 <1> je @F 156 <1> mov dx, msg.areasalreadyinstalled 157 <1> mov ax, 0703h 158 <1> .setrc_putsz_ret: 159 <1> call setrc 160 <1> .putsz_ret: 161 <1> call putsz 162 <1> pop si 163 <1> retn 164 <1> 165 <1> @@: 166 <1> call findinstalleddebugger 167 <1> ; CHG: si, di, es, ax, cx, dx 168 <1> push ss 169 <1> pop es 170 <1> jnc @F 171 <1> 172 <1> mov dx, msg.areasnodebuggerfound 173 <1> mov ax, 0704h 174 <1> jmp .setrc_putsz_ret 175 <1> 176 <1> @@: 177 <1> mov al, 33h 178 <1> mov bx, areas_struc 179 <1> %if _PM 180 <1> mov dx, word [pspdbg] 181 <1> call call_int2D 182 <1> %else 183 <1> mov dx, ss 184 <1> int 2Dh ; install areas 185 <1> %endif 186 <1> push ss 187 <1> pop ds 188 <1> push ss 189 <1> pop es 190 <1> 191 <1> test al, al 192 <1> jz .not_supported 193 <1> cmp al, -1 194 <1> je .installed 195 <1> mov di, msg.areasnotinstalled.code 196 <1> call hexbyte 197 <1> mov dx, msg.areasnotinstalled 198 <1> mov ax, 0702h 199 <1> jmp .setrc_putsz_ret 200 <1> 201 <1> .not_supported: 202 <1> mov dx, msg.areasnotsupported 203 <1> mov ax, 0701h 204 <1> jmp .setrc_putsz_ret 205 <1> 206 <1> .installed: 207 <1> mov dx, msg.areasinstalled 208 <1> jmp .putsz_ret 209 <1> 210 <1> 211 <1> uninstall_areas: 212 <1> push si 213 <1> ; cx != 0 214 <1> cmp word [areas_struc + areastrucEntry], 0CBF9h 215 <1> jne .is_installed 216 <1> mov dx, msg.areasalreadyuninstalled 217 <1> mov ax, 0705h 218 <1> .setrc_putsz_ret: 219 <1> jmp install_areas.setrc_putsz_ret 220 <1> .putsz_ret: 221 <1> jmp install_areas.putsz_ret 222 <1> 223 <1> 224 <1> .qq_entry: 225 <1> push si 226 <1> xor cx, cx 227 <1> cmp word [areas_struc + areastrucEntry], 0CBF9h 228 <1> jne .is_installed 229 <1> .ret: 230 <1> pop si 231 <1> retn 232 <1> 233 <1> 234 <1> .is_installed: 235 <1> push cx 236 <1> mov al, 0 237 <1> %if _PM 238 <1> call ispm 239 <1> jnz .86m 240 <1> subcpu 286 241 <1> .pm: 242 <1> lframe none 243 <1> lvar 32h, 86m_call_struc 244 <1> lenter 245 <1> mov word [bp + ?86m_call_struc +1Ch], ax ; eax 246 <1> xor ax, ax 247 <1> mov word [bp + ?86m_call_struc +20h], ax ; flags 248 <1> mov word [bp + ?86m_call_struc +0Ch + 2], ax 249 <1> mov word [bp + ?86m_call_struc +0Ch], ax 250 <1> mov word [bp + ?86m_call_struc +2Eh], ax ; sp 251 <1> mov word [bp + ?86m_call_struc +30h], ax ; ss 252 <1> mov word [bp + ?86m_call_struc +22h], ax ; es 253 <1> mov word [bp + ?86m_call_struc +24h], ax ; ds 254 <1> mov ax, word [pspdbg] 255 <1> mov word [bp + ?86m_call_struc +2Ah], areas_struc + areastrucEntry 256 <1> ; ip 257 <1> mov word [bp + ?86m_call_struc +2Ch], ax ; cs 258 <1> ; push ss 259 <1> ; pop es ; => stack 260 <1> lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 261 <1> _386 movzx edi, di ; (previously checked b[dpmi32] here) 262 <1> xor bx, bx ; flags/reserved 263 <1> xor cx, cx ; do not copy from PM stack 264 <1> mov ax, 0301h 265 <1> int 31h ; call 86 mode function with far return 266 <1> mov ah, byte [bp + ?86m_call_struc +20h] ; flags 267 <1> sahf 268 <1> mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 269 <1> lleave 270 <1> subcpureset 271 <1> jmp .common 272 <1> %endif 273 <1> .86m: 274 <1> push cs 275 <1> call .86m_to_entry_areas_struc 276 <1> .common: 277 <1> pop cx 278 <1> push ss 279 <1> pop ds 280 <1> push ss 281 <1> pop es 282 <1> jcxz .ret 283 <1> mov di, msg.areasuninstalled.code 284 <1> call hexbyte 285 <1> mov dx, msg.areasuninstalled 286 <1> jmp .putsz_ret 287 <1> 288 <1> .86m_to_entry_areas_struc: 289 <1> mov bx, areas_struc + areastrucEntry 290 <1> push ss 291 <1> push bx 292 <1> retf 293 <1> %endif 2930 %include "uu.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug U command - Disassembler 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 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 19 <1> 20 <1> ..@uu_access_start: 21 <1> ; U command - disassemble. 22 <1> uu: 23 000049C8 4E <1> dec si 24 000049C9 4E <1> dec si 25 000049CA BA[F619] <1> mov dx, msg.uninstall 26 000049CD E8504F <1> call isstring? 27 000049D0 AC <1> lodsb 28 000049D1 7503E942FF <1> je uninstall 29 000049D6 AC <1> lodsb 30 <1> 31 000049D7 C706[020C][E249] <1> mov word [lastcmd], lastuu 32 000049DD E8AA4F <1> call iseol? 33 000049E0 7530 <1> jne uu1 ; if an address was given 34 <1> 35 <1> lastuu: 36 <1> _386_PM xor eax, eax 37 000049E2 A1[5E0B] <1> mov ax, word [uu_default_lines] 38 <1> ; default length in lines, if nonzero 39 000049E5 85C0 <1> test ax, ax 40 000049E7 740C <1> jz @F 41 000049E9 7807 <1> js short .error 42 000049EB A3[C40B] <1> mov word [getrange_lines], ax 43 000049EE 31C0 <1> xor ax, ax 44 000049F0 EB11 <1> jmp @FF 45 <1> 46 <1> .error: 47 000049F2 E96838 <1> jmp error 48 <1> 49 <1> @@: 50 000049F5 C706[C40B]0080 <1> mov word [getrange_lines], 8000h 51 000049FB A1[5C0B] <1> mov ax, word [uu_default_length] 52 000049FE 85C0 <1> test ax, ax 53 00004A00 74F0 <1> jz short .error 54 00004A02 48 <1> dec ax 55 <1> @@: 56 <1> _386_PM_o32 ; mov ecx, dword [u_addr] 57 00004A03 8B0E[840B] <1> mov cx, word [u_addr] 58 <1> _386_PM_o32 ; mov edx, ecx 59 00004A07 89CA <1> mov dx, cx 60 <1> _386_PM_o32 ; add ecx, byte 1Fh 61 00004A09 01C1 <1> add cx, ax 62 00004A0B 7303 <1> jnc .no_overflow ; if no overflow --> 63 <1> _386_PM_o32 ; or ecx, byte -1 64 00004A0D 83C9FF <1> or cx, byte -1 ; til end of segment 65 <1> .no_overflow: 66 00004A10 EB25 <1> jmp short uu2 67 <1> 68 <1> uu1: 69 00004A12 8B0E[5C0B] <1> mov cx, word [uu_default_length] 70 <1> ; default length 71 00004A16 8B3E[5E0B] <1> mov di, word [uu_default_lines] 72 <1> ; default length in lines, if nonzero 73 00004A1A 8B1E[D00C] <1> mov bx, word [reg_cs] 74 00004A1E C706[C40B]0080 <1> mov word [getrange_lines], 8000h 75 <1> %if _MS_0RANGE_COMPAT 76 00004A24 C606[190B]FF <1> mov byte [getrange_is_uu], -1 77 00004A29 E87A3C <1> nearcall getrangeX.lines_and_uu ; get address range into bx:(e)dx 78 <1> %else 79 <1> nearcall getrangeX.lines ; get address range into bx:(e)dx 80 <1> %endif 81 00004A2C E8704F <1> call chkeol ; expect end of line here 82 00004A2F 891E[880B] <1> mov word [u_addr + saSegSel], bx 83 <1> %if _PM 84 <1> call ispm 85 <1> jnz .86m 86 <1> .pm: 87 <1> mov word [u_addr + saSelector], bx 88 <1> jmp @F 89 <1> .86m: 90 <1> mov word [u_addr + saSegment], bx 91 <1> @@: 92 <1> %endif 93 <1> _386_PM_o32 ; mov dword [u_addr], edx 94 00004A33 8916[840B] <1> mov word [u_addr], dx 95 <1> 96 <1> ; (d)word [u_addr] = offset start address 97 <1> ; word [u_addr + saSegSel] = segment start address 98 <1> ; (e)cx = end address 99 <1> ; (e)dx = start adddress (same as [u_addr]) 100 <1> uu2: 101 <1> _386_PM_o32 ; inc ecx 102 00004A37 41 <1> inc cx 103 <1> uu3: 104 00004A38 E83AF9 <1> call handle_serial_flags_ctrl_c 105 <1> _386_PM_o32 ; push ecx 106 00004A3B 51 <1> push cx 107 <1> _386_PM_o32 ; push edx 108 00004A3C 52 <1> push dx 109 00004A3D 8326[BA49]00 <1> and word [disflags], 0 110 00004A42 E81E00 <1> call disasm ; do it 111 <1> _386_PM_o32 ; pop ebx 112 00004A45 5B <1> pop bx 113 <1> _386_PM_o32 ; pop ecx 114 00004A46 59 <1> pop cx 115 <1> _386_PM_o32 ; mov eax, dword [u_addr] 116 00004A47 A1[840B] <1> mov ax, word [u_addr] 117 <1> _386_PM_o32 ; mov edx, eax 118 00004A4A 89C2 <1> mov dx, ax 119 <1> _386_PM_o32 ; sub eax, ecx 120 00004A4C 29C8 <1> sub ax, cx ; current position - end 121 <1> _386_PM_o32 ; sub ebx, ecx 122 00004A4E 29CB <1> sub bx, cx ; previous position - end 123 <1> 124 00004A50 F606[C50B]80 <1> testopt [getrange_lines], 8000h 125 00004A55 7405 <1> jz @F 126 <1> _386_PM_o32 ; cmp eax, ebx 127 00004A57 39D8 <1> cmp ax, bx 128 00004A59 73DD <1> jnb uu3 ; if we haven't reached the goal 129 00004A5B C3 <1> retn 130 <1> 131 <1> @@: 132 00004A5C FF0E[C40B] <1> dec word [getrange_lines] 133 00004A60 75D6 <1> jnz uu3 134 00004A62 C3 <1> retn 135 <1> 136 <1> 137 <1> usesection lDEBUG_DATA_ENTRY 138 <1> 139 <1> ; Jump table for displaying sized operands. 140 <1> ; Entries are defined in the debug.asm opsizeditem list. 141 <1> align 2, db 0 142 <1> disjmp2: 143 000048E0 [DA52][0B53][4455]- <1> dw DISJMP2_OPSIZEDITEMS 143 000048E6 [5155][FC52][5A55]- <1> 143 000048EC [9455][9955] <1> 144 <1> .end: 145 <1> 146 <1> ; Jump table for displaying operands. 147 <1> ; Entries are defined in the debug.asm opitem list. 148 <1> align 2, db 0 149 <1> optab: 150 000048F0 [F74B] <1> dw da_internal_error ; entry for OP_END 151 000048F2 [9D55][A155][B255]- <1> dw OPTAB_OPITEMS 151 000048F8 [CF55][E555][F755]- <1> 151 000048FE [9156][CF56][7858]- <1> 151 00004904 [8858][9E58][BE58]- <1> 151 0000490A [C958][E858][1059]- <1> 151 00004910 [1059][2259][3659]- <1> 151 00004916 [2859][4159][4959]- <1> 151 0000491C [195A][435A][5E5A]- <1> 151 00004922 [6A5A][715A][225A]- <1> 151 00004928 [295A][305A][3C5A]- <1> 151 0000492E [375A][5A59][8259]- <1> 151 00004934 [B359][125A][F74B]- <1> 151 0000493A 310033004458434C53- <1> 151 00004943 544353445345534653- <1> 151 0000494C 47535353 <1> 152 <1> 153 <1> 154 <1> %if _MEMREF_AMOUNT 155 <1> align 16, db 0 156 00004950 00 <1> memrefs: times MEMREF_size * _MEMREF_AMOUNT db 0 157 00004990 0000 <1> .free: dw 0 158 <1> 159 00004992 00 <1> align 4, db 0 160 <1> string_memref_counter: 161 00004994 00000000 <1> dd 0 162 <1> %endif 163 <1> 164 <1> 165 <1> ; DISASM - Disassemble. 166 <1> 167 <1> %if _SYMBOLIC 168 <1> align 4, db 0 169 <1> u_lin_start: dd 0 170 <1> %endif 171 <1> align 2, db 0 172 <1> %if _40COLUMNS 173 00004998 0000 <1> mnemonofs: dw 0 174 0000499A 0000 <1> trailofs: dw 0 175 <1> %endif 176 0000499C 0000 <1> dis_n: dw 0 ; number of bytes in instruction so far 177 0000499E 0000 <1> dw 0 178 000049A0 00 <1> preflags: db 0 ; flags for prefixes found so far (includes OSIZE,ASIZE) 179 000049A1 00 <1> preused: db 0 ; flags for prefixes used so far 180 <1> %if _PM 181 <1> presizeflags: db 0 ; O32,A32 flags = (OSIZE,ASIZE) XOR (32-bit cs?) 182 <1> %else 183 <1> presizeflags: equ preflags ; O32,A32 flags are always equal to OSIZE,ASIZE 184 <1> %endif 185 <1> 186 <1> PRESEG equ 1 ; segment prefix 187 <1> PREREP equ 2 ; rep prefixes 188 <1> PREREPZ equ 4 ; F3h, not F2h 189 <1> PRELOCK equ 8 ; lock prefix 190 <1> PREOSIZE equ 10h ; flag for OSIZE prefix 191 <1> PREASIZE equ 20h ; flag for ASIZE prefix 192 <1> PRE32D equ 10h ; flag for 32-bit data 193 <1> PRE32A equ 20h ; flag for 32-bit addressing 194 <1> PREWAIT equ 40h ; prefix wait (not really a prefix) 195 <1> GOTREGM equ 80h ; set if we have the reg/mem part 196 <1> 197 000049A2 00 <1> instru: db 0 ; the main instruction byte 198 000049A3 00 <1> disp8: db 0 199 <1> align 2, db 0 200 000049A4 0000 <1> index: dw 0 ; index of the instruction (unsqueezed) 201 000049A6 380339033C03 <1> obsinst:dw SFPGROUP3, SFPGROUP3+1, SFPGROUP3+4 202 000049AC 04020602 <1> dw SPARSE_BASE+24h, SPARSE_BASE+26h ; obsolete-instruction values 203 <1> ; This is used to search for obsolete instructions: 204 <1> ; DBE0h: feni 205 <1> ; DBE1h: fdisi 206 <1> ; DBE4h: fsetpm 207 <1> ; 124h: mov trX, reg 208 <1> ; 126h: mov reg, trX 209 <1> 210 000049B0 00 <1> rmsize: db 0 ; <0 or 0 or >0 means mod r/m is 8 or 16 or 32 211 000049B1 00 <1> segmnt: db 0 ; segment determined by prefix (or otherwise) 212 000049B2 00 <1> align 4, db 0 213 000049B4 00000000 <1> addrr: dd 0 ; address in mod r/m byte 214 000049B8 0000 <1> savesp2:dw 0 ; save the stack pointer here (used in disasm) 215 <1> 216 <1> align 2, db 0 217 000049BA 0000 <1> disflags: dw 0 ; flags for the disassembler 218 <1> 219 <1> ;--- equates for disflags: 220 <1> 221 <1> DIS_F_REPT equ 1 ; repeat after pop ss, etc. 222 <1> DIS_F_SHOW equ 2 ; show memory contents 223 <1> DIS_I_SHOW equ 4 ; there are memory contents to show 224 <1> DIS_I_UNUSED equ 8 ; (internal) print " (unused)" 225 <1> DIS_I_SHOWSIZ equ 10h ; (internal) always show the operand size 226 <1> DIS_I_KNOWSIZ equ 20h ; (internal) we know the operand size of instr. 227 <1> DIS_I_MOV_SS equ 40h ; (internal) note for repetition: mov ss 228 <1> DIS_I_DONTSHOW equ 80h ; do not show memory contents override 229 <1> DIS_I_NOSIZ equ 100h ; do not show size 230 <1> DIS_I_FAR_M equ 200h ; far memory reference, show segment word contents 231 <1> DIS_I_DOUBLE_M equ 400h ; double memory reference, show second item contents 232 <1> DIS_I_SHOW_A32 equ 800h ; memory contents to show are 32-bit addressed 233 <1> DIS_I_M_SRC equ 1000h ; memory operand is source 234 <1> DIS_I_M_DST equ 2000h ; memory operand is destination 235 <1> ; both of the above may be set 236 <1> DIS_I_M_ALWAYS_16 equ 4000h ; mov from or to segreg, display no size 237 <1> ; and treat as m16 and ignore (but allow) osize 238 <1> 239 000049BC 00 <1> disflags2: db 0 ; another copy of DIS_I_KNOWSIZ 240 000049BD 00 <1> disrepeatcount: db 0 241 <1> 242 <1> align 2, db 0 243 000049BE 0000 <1> sizeloc: dw 0 ; address of size words in output line 244 <1> %if _COND 245 000049C0 0000 <1> condmsg: dw 0 ; -> conditionals message to display (if R and no mem) 246 <1> %endif 247 <1> 248 <1> ; Jump table for a certain place. 249 <1> ; The size of this table matches OPTYPES_BASE. 250 <1> align 2, db 0 251 <1> disjmp: 252 000049C2 [915A] <1> dw disbad ; illegal instruction 253 000049C4 [194B] <1> dw da_twobyte ; two-byte instruction 254 000049C6 [254B] <1> dw da_insgrp ; instruction group 255 000049C8 [2C4B] <1> dw da_fpuins ; coprocessor instruction 256 000049CA [474B] <1> dw da_fpugrp ; coprocessor instruction group 257 000049CC [504B] <1> dw da_insprf ; instruction prefix (including 66h/67h) 258 <1> %if ($ - disjmp) != OPTYPES_BASE 259 <1> %error Wrong length of table disjmp 260 <1> %endif 261 <1> 262 <1> ; Table for 16-bit mod r/m addressing. 8 = BX, 4 = BP, 2 = SI, 1 = DI. 263 000049CE 0A09060502010408 <1> rmtab: db 8+2, 8+1, 4+2, 4+1, 2, 1, 4, 8 264 <1> 265 <1> 266 <1> %macro defgpr 1.nolist 267 <1> REG_ %+ %1: equ ($ - rgnam816) / 2 268 <1> %defstr %%string %1 269 <1> db %%string 270 <1> %endmacro 271 <1> %macro defsr 1.nolist 272 <1> REG_ %+ %1: equ REG_NO_GPR + ($ - segrgnam) / 2 273 <1> %defstr %%string %1 274 <1> db %%string 275 <1> %endmacro 276 <1> 277 <1> REG_NO_GPR equ 24 ; 16..23 are registers eax..edi 278 <1> 279 <1> align 2, db 0 280 <1> ; Tables of register names. 281 <1> ; rgnam816/rgnam16/segrgnam/xregnam must be consecutive. 282 <1> rgnam816: 283 000049D6 414C <1> defgpr AL 284 000049D8 434C <1> defgpr CL 285 000049DA 444C <1> defgpr DL 286 000049DC 424C <1> defgpr BL 287 000049DE 4148 <1> defgpr AH 288 000049E0 4348 <1> defgpr CH 289 000049E2 4448 <1> defgpr DH 290 000049E4 4248 <1> defgpr BH ; 0..7 291 <1> rgnam16: 292 000049E6 4158 <1> defgpr AX 293 000049E8 4358 <1> defgpr CX 294 000049EA 4458 <1> defgpr DX 295 000049EC 4258 <1> defgpr BX 296 000049EE 5350 <1> defgpr SP 297 000049F0 4250 <1> defgpr BP 298 000049F2 5349 <1> defgpr SI 299 000049F4 4449 <1> defgpr DI ; 8..15 (16-bit), 16..23 (32-bit) 300 <1> N_REGS16 equ ($ - rgnam16) >> 1 301 <1> segrgnam: 302 000049F6 4553 <1> defsr ES 303 000049F8 4353 <1> defsr CS 304 000049FA 5353 <1> defsr SS 305 000049FC 4453 <1> defsr DS 306 000049FE 4653 <1> defsr FS 307 00004A00 4753 <1> defsr GS ; 24..29 308 <1> N_SEGREGS equ ($ - segrgnam) >> 1 309 <1> xregnam: 310 00004A02 5354 <1> defsr ST 311 00004A04 4D4D <1> defsr MM 312 00004A06 4352 <1> defsr CR 313 00004A08 4452 <1> defsr DR 314 00004A0A 5452 <1> defsr TR ; 30..34 315 <1> N_ALLREGS equ ($ - rgnam816) >> 1 316 <1> 317 <1> 318 <1> align 2, db 0 319 00004A0C [A40C][AC0C][B00C]- <1> reg32addr: dw reg_eax, reg_ecx, reg_edx, reg_ebx 319 00004A12 [A80C] <1> 320 00004A14 [B40C][B80C][BC0C]- <1> dw reg_esp, reg_ebp, reg_esi, reg_edi 320 00004A1A [C00C] <1> 321 <1> 322 <1> align 2, db 0 323 00004A1C [C80C][D00C][CC0C]- <1> segrgaddr: dw reg_es,reg_cs,reg_ss,reg_ds,reg_fs,reg_gs 323 00004A22 [C40C][D40C][D80C] <1> 324 <1> 325 <1> ; Tables for handling of named prefixes. 326 <1> 327 <1> prefixlist: 328 00004A28 262E363E <1> .segment: db 26h,2Eh,36h,3Eh 329 <1> %ifdef MN_GS 330 00004A2C 6465 <1> db 64h,65h ; segment prefixes (in order) 331 <1> %endif 332 <1> .after_segment: 333 00004A2E 9BF0F2F3 <1> db 9Bh,0F0h,0F2h,0F3h ; WAIT,LOCK,REPNE,REPE 334 <1> .size: 335 <1> %ifdef MN_O32 336 00004A32 6667 <1> db 066h,067h ; OSIZE, ASIZE 337 <1> %endif 338 <1> N_PREFIX: equ $ - prefixlist 339 <1> 340 <1> align 2, db 0 341 00004A34 C309F90535082F08 <1> prefixmnem: dw MN_WAIT,MN_LOCK,MN_REPNE,MN_REPE 342 <1> %ifdef MN_O32 343 00004A3C 0C000200 <1> dw MN_O32,MN_A32 ; in 16-bit CS, OSIZE is O32 and ASIZE is A32 344 <1> %if _PM 345 <1> dw MN_O16,MN_A16 ; in 32-bit CS, OSIZE is O16 and ASIZE is A16 346 <1> %endif 347 <1> %endif 348 <1> 349 <1> %if _COND 350 <1> align 2, db 0 351 <1> cond_table: 352 00004A40 0008 <1> dw 800h ; OF 353 00004A42 0100 <1> dw 1 ; CF 354 00004A44 4000 <1> dw 40h ; ZF 355 00004A46 4100 <1> dw 41h ; CF | ZF 356 00004A48 8000 <1> dw 80h ; SF 357 00004A4A 0400 <1> dw 4 ; PF 358 <1> ; dw cond_L_GE ; handled specifically 359 <1> ; dw cond_LE_G ; handled specifically 360 <1> %endif 361 <1> 362 <1> single_byte_opcodes_repeat_disassembly: 363 <1> .: 364 00004A4C E6 <1> db 0E6h ; out imm8, al 365 00004A4D E7 <1> db 0E7h ; out imm8, (e)ax 366 00004A4E EE <1> db 0EEh ; out dx, al 367 00004A4F EF <1> db 0EFh ; out dx, (e)ax 368 00004A50 6E <1> db 06Eh ; outsb 369 00004A51 6F <1> db 06Fh ; outsw/outsd 370 00004A52 E4 <1> db 0E4h ; in al, imm8 371 00004A53 E5 <1> db 0E5h ; in (e)ax, imm8 372 00004A54 EC <1> db 0ECh ; in al, dx 373 00004A55 ED <1> db 0EDh ; in (e)ax, dx 374 00004A56 6C <1> db 06Ch ; insb 375 00004A57 6D <1> db 06Dh ; insw/insd 376 00004A58 F4 <1> db 0F4h ; hlt 377 00004A59 FB <1> db 0FBh ; sti 378 00004A5A 17 <1> db 17h ; pop ss 379 <1> .length: equ $ - . 380 00004A5B 1F <1> db 1Fh ; pop ds 381 00004A5C 07 <1> db 07h ; pop es 382 <1> .length_nec: equ $ - . 383 <1> 384 <1> 385 <1> usesection lDEBUG_CODE 386 <1> 387 <1> disasm: 388 00004A63 C606[BD49]00 <1> mov byte [disrepeatcount], 0 ; number of repeated disassembly lines 389 <1> 390 <1> %if _MEMREF_AMOUNT 391 00004A68 B90400 <1> mov cx, _MEMREF_AMOUNT 392 00004A6B BF[5049] <1> mov di, memrefs 393 <1> @@: 394 00004A6E E8740D <1> call init_one_memref 395 00004A71 E2FB <1> loop @B 396 00004A73 AB <1> stosw ; memrefs.free 397 <1> %endif 398 <1> 399 <1> .preserve_disrepeatcount: 400 <1> %if _COND 401 00004A74 8326[C049]00 <1> and word [condmsg], 0 ; initialize conditions message 402 <1> %endif 403 <1> .preserve_condmsg_and_disrepeatcount: 404 00004A79 8926[B849] <1> mov word [savesp2], sp 405 <1> _386_PM_o32 ; xor eax, eax 406 00004A7D 31C0 <1> xor ax, ax 407 <1> _386_PM_o32 ; mov dword [dis_n], eax 408 00004A7F A3[9C49] <1> mov word [dis_n], ax 409 00004A82 A2[A349] <1> mov byte [disp8], al 410 00004A85 A3[A049] <1> mov word [preflags], ax ; clear preflags and preused 411 00004A88 C606[B149]03 <1> mov byte [segmnt], 3 ; initially use DS segment 412 00004A8D C606[B049]80 <1> mov byte [rmsize], 80h ; don't display any memory 413 00004A92 A3[1C41] <1> mov word [dismach], ax ; no special machine needed, so far 414 00004A95 8B1E[880B] <1> mov bx, word [u_addr + saSegSel] 415 <1> %if _PM 416 <1> mov byte [bCSAttr], al 417 <1> %if _DISASM_32BIT 418 <1> call test_d_b_bit 419 <1> jz .16 420 <1> mov byte [bCSAttr], 40h 421 <1> .16: 422 <1> %endif 423 <1> %endif 424 <1> %if _40COLUMNS 425 00004A99 B81C00 <1> mov ax, MNEMONOFS 426 00004A9C BA4F00 <1> mov dx, 79 427 <1> %if _MS_MNEMON_COMPAT 428 00004A9F F606[E900]04 <1> testopt [asm_options], disasm_msdebug_mnemonofs 429 00004AA4 7403 <1> jz .notms 430 00004AA6 B81800 <1> mov ax, MNEMONOFS_MS 431 <1> .notms: 432 <1> %endif 433 00004AA9 F606[E900]01 <1> testopt [asm_options], disasm_40_columns 434 00004AAE 7406 <1> jz .not40 435 00004AB0 B81400 <1> mov ax, MNEMONOFS_40 436 00004AB3 BA2700 <1> mov dx, 39 437 <1> .not40: 438 00004AB6 A3[9849] <1> mov word [mnemonofs], ax 439 00004AB9 8916[9A49] <1> mov word [trailofs], dx 440 <1> %endif 441 <1> 442 <1> %if _SYMBOLIC 443 <1> nearcall zz_detect_xms ; re-detect XMS if used after run 444 <1> 445 <1> testopt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 446 <1> jnz .no_symbol 447 <1> 448 <1> _386_PM_o32 449 <1> mov dx, word [u_addr] 450 <1> call getlinear_32bit 451 <1> jc .no_symbol 452 <1> 453 <1> mov word [u_lin_start], ax 454 <1> mov word [u_lin_start + 2], dx 455 <1> 456 <1> mov cx, dx 457 <1> mov bx, ax 458 <1> nearcall binsearchmain ; search for matching symbol 459 <1> jcxz .no_symbol 460 <1> .loop_symbol: 461 <1> push bx 462 <1> dualcall displaystring 463 <1> push bx 464 <1> push ax 465 <1> dualcall getfarpointer.main 466 <1> pop di 467 <1> pop es 468 <1> xor dx, dx 469 <1> _386_PM test byte [bCSAttr], 40h 470 <1> _386_PM jz @F 471 <1> _386_PM mov dx, word [u_addr + 2] 472 <1> @@: 473 <1> mov ax, word [u_addr] 474 <1> cmp dx, word [es:di + smOffset + 2] 475 <1> mov dx, msg.uu_after_symbol.non_wrt 476 <1> jne .wrt_symbol 477 <1> cmp ax, word [es:di + smOffset] 478 <1> je .non_wrt_symbol 479 <1> .wrt_symbol: 480 <1> mov dx, msg.uu_between_symbol.wrt 481 <1> call disp_message 482 <1> push ss 483 <1> pop es 484 <1> mov di, line_out 485 <1> mov ax, word [u_addr + 4] 486 <1> call hexword 487 <1> push bx 488 <1> push cx 489 <1> call putsline 490 <1> pop cx 491 <1> pop bx 492 <1> mov dx, msg.uu_after_symbol.wrt 493 <1> .non_wrt_symbol: 494 <1> call disp_message 495 <1> .next_symbol: 496 <1> inc bx 497 <1> loop .loop_symbol 498 <1> 499 <1> .no_symbol: 500 <1> push ss 501 <1> pop es 502 <1> push ss 503 <1> pop ds 504 <1> %endif 505 <1> 506 00004ABD E8BC11 <1> call disgetbyte ; get a byte of the instruction 507 00004AC0 3C9B <1> cmp al, 9Bh ; wait instruction (must be the first prefix) 508 00004AC2 7508 <1> jne da2 ; if not --> 509 <1> 510 <1> ; The wait instruction is actually a separate instruction as far as 511 <1> ; the x86 is concerned, but we treat it as a prefix since there are 512 <1> ; some mnemonics that incorporate it. But it has to be treated specially 513 <1> ; since you can't do, e.g., seg cs wait ... but must do wait seg cs ... 514 <1> ; instead. We'll catch it later if the wait instruction is not going to 515 <1> ; be part of a shared mnemonic. 516 <1> 517 00004AC4 800E[A049]40 <1> or byte [preflags], PREWAIT 518 <1> 519 <1> ; If we've found a prefix, we return here for the actual instruction 520 <1> ; (or another prefix). 521 <1> 522 <1> da1: 523 00004AC9 E8B011 <1> call disgetbyte 524 <1> da2: 525 00004ACC A2[A249] <1> mov [instru],al ; save away the instruction 526 00004ACF B400 <1> mov ah,0 527 <1> 528 <1> ; Now we have the sequence number of the instruction in AX. Look it up. 529 <1> 530 <1> da3: 531 00004AD1 89C3 <1> mov bx,ax 532 00004AD3 A3[A449] <1> mov [index],ax ; save the compressed index 533 00004AD6 3DE001 <1> cmp ax,SPARSE_BASE 534 00004AD9 720A <1> jb da4 ; if it's not from the squeezed part of the table 535 00004ADB 8A9F[5012] <1> mov bl,[sqztab+bx-SPARSE_BASE] 536 00004ADF B700 <1> mov bh,0 537 00004AE1 81C3E001 <1> add bx,SPARSE_BASE ; bx = compressed index 538 <1> 539 <1> da4: 540 00004AE5 8A8F[580C] <1> mov cl, [optypes+bx]; cx = opcode type 541 00004AE9 B500 <1> mov ch, 0 542 00004AEB D1E3 <1> shl bx, 1 543 00004AED 8B9F[F60E] <1> mov bx, [opinfo+bx] ; bx = other info (usually the mnemonic) 544 00004AF1 89CE <1> mov si, cx 545 00004AF3 89D8 <1> mov ax, bx 546 00004AF5 B10C <1> mov cl, 12 547 00004AF7 D3E8 <1> shr ax, cl 548 00004AF9 3A06[1C41] <1> cmp al, [dismach] 549 00004AFD 7203 <1> jb da5 ; if a higher machine is already required 550 00004AFF A2[1C41] <1> mov [dismach], al ; set machine type 551 <1> da5: 552 00004B02 80E70F <1> and bh, 0Fh ; remove the machine field 553 00004B05 83FE0C <1> cmp si, OPTYPES_BASE 554 00004B08 7360 <1> jae da13_unp ; if this is an actual instruction 555 00004B0A F7C60100 <1> test si, 1 ; check whether valid displacement 556 00004B0E 7403E9E400 <1> jnz da_internal_error ; if not --> 557 00004B13 FF94[C249] <1> call [disjmp+si] ; otherwise, do more specific processing 558 00004B17 EBB8 <1> jmp s da3 ; back for more 559 <1> 560 <1> ; Two-byte instruction. 561 <1> 562 <1> da_twobyte: 563 00004B19 E86011 <1> call disgetbyte 564 00004B1C A2[A249] <1> mov [instru],al 565 00004B1F B400 <1> mov ah,0 566 00004B21 05E001 <1> add ax,SPARSE_BASE 567 00004B24 C3 <1> ret 568 <1> 569 <1> ; Instruction group. 570 <1> 571 <1> da_insgrp: 572 00004B25 E8C10F <1> call getregmem_r ; get the middle 3 bits of the R/M byte 573 00004B28 98 <1> cbw 574 00004B29 01D8 <1> add ax,bx ; offset 575 00004B2B C3 <1> ret 576 <1> 577 <1> ; Coprocessor instruction. 578 <1> 579 <1> da_fpuins: 580 00004B2C 800E[BA49]10 <1> or byte [disflags],DIS_I_SHOWSIZ 581 00004B31 800E[1D41]01 <1> or byte [dmflags],DM_COPR 582 00004B36 E8BA0F <1> call getregmem 583 00004B39 3CC0 <1> cmp al,0c0h 584 00004B3B 72E8 <1> jb da_insgrp ;range 00-bfh is same as an instruction group 585 00004B3D B103 <1> mov cl,3 586 00004B3F D2E8 <1> shr al,cl ;C0h --> 18h 587 00004B41 2C10 <1> sub al,18h-8 ;18h --> 8 588 00004B43 98 <1> cbw 589 00004B44 01D8 <1> add ax,bx ;offset 590 00004B46 C3 <1> ret 591 <1> 592 <1> ; Coprocessor instruction group. 593 <1> 594 <1> da_fpugrp: 595 00004B47 A0[1641] <1> mov al,[regmem] 596 00004B4A 2407 <1> and al,7 597 00004B4C 98 <1> cbw 598 00004B4D 01D8 <1> add ax,bx 599 00004B4F C3 <1> ret 600 <1> 601 <1> ; Instruction prefix. At this point, bl = prefix bits; bh = segment 602 <1> 603 <1> da_insprf: 604 00004B50 841E[A049] <1> test bl,[preflags] 605 00004B54 7511 <1> jnz da12 ; if there are duplicates 606 00004B56 081E[A049] <1> or [preflags],bl 607 00004B5A F6C301 <1> test bl,PRESEG 608 00004B5D 7404 <1> jz da11 ; if not a segment 609 00004B5F 883E[B149] <1> mov [segmnt],bh ; save the segment 610 <1> da11: 611 00004B63 58 <1> pop ax ; discard return address 612 00004B64 E962FF <1> jmp da1 613 <1> 614 <1> da12: 615 00004B67 E9270F <1> jmp disbad ; we don't allow duplicate prefixes 616 <1> 617 <1> ; si = index into table opindex, + OPTYPES_BASE 618 <1> da13_unp: 619 00004B6A 83EE0C <1> sub si, OPTYPES_BASE ; = offset into opindex 620 00004B6D 31C0 <1> xor ax, ax 621 00004B6F 8A84[3416] <1> mov al, [si + opindex] ; ax = adjustment (from opindex) 622 00004B73 01F6 <1> add si, si ; take offset twice 623 00004B75 4E <1> dec si ; subtract one 624 00004B76 01C6 <1> add si, ax ; add in the adjustment 625 <1> 626 <1> ; OK. Here we go. This is an actual instruction. 627 <1> ; bx = offset of mnemonic in mnlist 628 <1> ; si = offset of operand list in oplists 629 <1> ; First print the op mnemonic. 630 <1> 631 <1> da13: 632 <1> %if _PM 633 <1> mov al, byte [preflags] 634 <1> and al, PREOSIZE | PREASIZE ; get OSIZE,ASIZE status (= O32,A32 in 16-bit cs) 635 <1> %if _DISASM_32BIT 636 <1> _386 test byte [bCSAttr], 40h ; in a 32-bit segment? 637 <1> _386 jz .16 ; no --> 638 <1> _386 xor al, PRE32D | PRE32A ; OSIZE,ASIZE present means O16,A16 639 <1> .16: 640 <1> %endif 641 <1> mov byte [presizeflags], al ; set O32,A32 status 642 <1> %endif 643 00004B78 56 <1> push si 644 00004B79 8DB7[9E01] <1> lea si,[mnlist+bx] ; offset of mnemonic 645 <1> %ifdef MN_BSWAP 646 00004B7D 81FE[F501] <1> cmp si,mnlist+MN_BSWAP 647 00004B81 7505 <1> jne da13a ; if not BSWAP 648 00004B83 E88910 <1> call dischk32d 649 00004B86 74DF <1> jz da12 ; if no operand-size prefix --> 650 <1> %endif 651 <1> da13a: 652 00004B88 E8B00F <1> call showop ; print out the op code (at line_out+28) 653 00004B8B 8326[BE49]00 <1> and word [sizeloc], 0 ; clear out this flag 654 00004B90 5E <1> pop si ; recover list of operands (offset in oplists) 655 00004B91 81C6[0000] <1> add si, oplists ; -> actual oplist entry 656 <1> 657 <1> da14_check_end: 658 00004B95 803C00 <1> cmp byte [si], OP_END 659 00004B98 7503E98400 <1> je da_op_end_e ; if we're done --> 660 <1> 661 <1> ; Loop over operands. si-> next operand type. 662 <1> ; Fortunately the operands appear in the instruction in the same 663 <1> ; order as they appear in the disassembly output. 664 <1> 665 <1> da14: 666 00004B9D C606[BC49]00 <1> mov byte [disflags2], 0 ; clear out size-related flags 667 00004BA2 AC <1> lodsb ; get the operand type 668 00004BA3 3C40 <1> cmp al,OP_SIZE 669 00004BA5 7259 <1> jb da18 ; if it's not size dependent 670 00004BA7 C606[BC49]20 <1> mov byte [disflags2],DIS_I_KNOWSIZ ;indicate variable size 671 00004BAC 3CA0 <1> cmp al,OP_1632_DEFAULT 672 00004BAE 7313 <1> jae da15_default 673 00004BB0 3C60 <1> cmp al,OP_8 674 00004BB2 7329 <1> jae da16 ; if the size is fixed (8, 16, 32, 64) 675 00004BB4 3C50 <1> cmp al,OP_1632 676 00004BB6 7317 <1> jae da15 ; if word or dword (or segreg mov) 677 <1> ; OP_ALL here. This has a width of 2. 678 <1> ; If the low bit is clear, this means 679 <1> ; 8 bit, else 16/32 bits. 680 00004BB8 B4FF <1> mov ah,-1 681 00004BBA F606[A249]01 <1> test byte [instru],1 682 00004BBF 7424 <1> jz da17 ; if byte --> 683 00004BC1 EB0C <1> jmp da15 684 <1> 685 <1> da15_default: 686 <1> %if _DISASM_32BIT 687 00004BC3 F606[A049]10 <1> test byte [preflags], PREOSIZE 688 00004BC8 7505 <1> jnz da15 689 <1> %endif 690 00004BCA 800E[BB49]01 <1> setopt [disflags], DIS_I_NOSIZ 691 <1> da15: 692 00004BCF 800E[A149]10 <1> or byte [preused],PRE32D; mark this flag as used 693 <1> .no_use_osize: 694 00004BD4 8A26[A049] <1> mov ah,[presizeflags] 695 00004BD8 80E410 <1> and ah,PRE32D ;this will be 10h for dword, 00h for word 696 00004BDB EB08 <1> jmp s da17 ;done 697 <1> 698 <1> da16: 699 00004BDD 88C4 <1> mov ah,al ;OP_8, OP_16, OP_32 or OP_64 (we know which) 700 00004BDF 80E4F0 <1> and ah,0f0h ;this converts ah to <0 for byte, =0 for word, 701 00004BE2 80EC70 <1> sub ah,OP_16 ;and >0 for dword (byte=F0h, word=00h, dword=10h, qword=20h) 702 <1> 703 <1> ; Now we know the size (in ah); branch off to do the operand itself. 704 <1> 705 <1> da17: 706 00004BE5 88C3 <1> mov bl, al 707 00004BE7 83E30F <1> and bx, 0Fh ; 8 entries (IMM, RM, M, R_MOD, M_OFFS, R, R_ADD, AX) 708 00004BEA D1E3 <1> shl bx, 1 709 00004BEC 83FB10 <1> cmp bx, disjmp2.end - disjmp2 710 00004BEF 7306 <1> jae @F 711 00004BF1 FF97[E048] <1> call [disjmp2 + bx] ; print out the operand 712 00004BF5 EB27 <1> jmp short da20 ; done with operand 713 <1> 714 <1> @@: 715 <1> da_internal_error: 716 00004BF7 BA[482A] <1> mov dx, msg.uu_internal_error 717 00004BFA E8B653 <1> call putsz 718 00004BFD E900B4 <1> jmp cmd3 719 <1> 720 <1> 721 <1> ; Sizeless operands. 722 <1> 723 <1> da18: 724 00004C00 98 <1> cbw 725 00004C01 93 <1> xchg ax, bx ; bx = index 726 00004C02 D1E3 <1> shl bx, 1 727 00004C04 8B87[F048] <1> mov ax, [optab + bx] 728 00004C08 83FB4A <1> cmp bx, OP_FIRST_STRING << 1 729 00004C0B 720F <1> jb da19 ; if it's not a string 730 00004C0D 83FB60 <1> cmp bx, OP_AFTER_LAST << 1 731 00004C10 73E5 <1> jae @B 732 00004C12 E88F0F <1> call dis_stosw_lowercase 733 00004C15 84E4 <1> test ah, ah 734 00004C17 7505 <1> jnz da20 ; if it's two characters 735 00004C19 4F <1> dec di 736 00004C1A EB02 <1> jmp s da20 ; done with operand 737 <1> 738 <1> da19: 739 00004C1C FFD0 <1> call ax ; otherwise, do something else 740 <1> 741 <1> ; Operand done, check if there's another one. 742 <1> da20: 743 00004C1E 803C00 <1> cmp byte [si], OP_END 744 <1> da_op_end_e: 745 00004C21 7410 <1> je da_op_end ; if we're done --> 746 00004C23 B02C <1> mov al,',' 747 00004C25 AA <1> stosb 748 00004C26 F606[E800]02 <1> testopt [asm_options], disasm_commablank 749 00004C2B 7403 <1> jz .nospace 750 00004C2D B020 <1> mov al, 32 751 00004C2F AA <1> stosb 752 <1> .nospace: 753 00004C30 E96AFF <1> jmp da14 ;another operand 754 <1> 755 <1> 756 <1> ; All operands done. Now handle prefixes: 757 <1> ; OPSIZE (66h), ADDRSIZE (67h), WAIT, segment, REP, LOCK 758 <1> da_op_end: 759 <1> 760 <1> ; Now check whether O32 or A32 modifies the opcode. 761 <1> da_modify_opcode_osize_asize: 762 <1> %if _DISASM_32BIT 763 00004C33 B90200 <1> mov cx, N_LTABO 764 00004C36 BB[CC15] <1> mov bx, ltabo1 765 00004C39 BA0200 <1> mov dx, 2*N_LTABO-2 766 00004C3C B410 <1> mov ah, PRE32D 767 00004C3E E89100 <1> call da23_osize_asize 768 <1> 769 00004C41 B90100 <1> mov cx, N_LTABA 770 00004C44 BB[D415] <1> mov bx, ltaba1 771 00004C47 BA0000 <1> mov dx, 2*N_LTABA-2 772 00004C4A B420 <1> mov ah, PRE32A 773 00004C4C E88300 <1> call da23_osize_asize 774 <1> %endif 775 <1> 776 <1> ; Now check and loop for unused prefixes. 777 <1> da21: 778 00004C4F A0[A149] <1> mov al, [preused] ; = flags that are used 779 00004C52 F6D0 <1> not al ; = flags that are not used 780 00004C54 2206[A049] <1> and al, [preflags] ; = flags that are not used but present 781 00004C58 7503E95301 <1> jz da28 ; if all present flags were used --> 782 <1> 783 00004C5D B90B00 <1> mov cx, N_WTAB 784 00004C60 BB[A015] <1> mov bx, wtab1 785 00004C63 BA1400 <1> mov dx, 2*N_WTAB-2 786 00004C66 B440 <1> mov ah, PREWAIT 787 00004C68 84E0 <1> test al, ah 788 00004C6A 740A <1> jz @F 789 <1> ; if there's a WAIT prefix hanging 790 00004C6C E86300 <1> call da23_wait 791 00004C6F 7403E98500 <1> jne disbad2 792 00004C74 EBD9 <1> jmp da21 793 <1> 794 <1> @@: 795 <1> %if _DISASM_32BIT 796 00004C76 B420 <1> mov ah, PREASIZE 797 00004C78 84E0 <1> test al, ah 798 00004C7A 7515 <1> jnz da21_asize ; if it is a 67h prefix --> 799 <1> 800 00004C7C B410 <1> mov ah, PREOSIZE 801 00004C7E 84E0 <1> test al, ah 802 00004C80 747A <1> jz da24 ; if not osize --> 803 <1> da21_osize: 804 <1> ; check whether OSIZE applies (segreg push/pop) 805 00004C82 57 <1> push di 806 00004C83 50 <1> push ax 807 00004C84 A1[A449] <1> mov ax, [index] 808 <1> %if 0 809 <1> mov di, .msg_number 810 <1> call hexword 811 <1> push dx 812 <1> mov dx, .msg 813 <1> call putsz 814 <1> pop dx 815 <1> jmp .skipmsg 816 <1> usesection lDEBUG_DATA_ENTRY 817 <1> .msg: db "Index=" 818 <1> .msg_number: 819 <1> asciz "----h, base=",_4digitshex(SPARSE_BASE),"h.",13,10 820 <1> usesection lDEBUG_CODE 821 <1> .skipmsg: 822 <1> %endif 823 00004C87 BF[B411] <1> mov di, o32prfxtab 824 00004C8A B90B00 <1> mov cx, O32P_AMOUNT 825 00004C8D F2AF <1> repne scasw 826 00004C8F EB16 <1> jmp da21_a_o_common 827 <1> 828 <1> da21_asize: 829 <1> ; check whether ASIZE applies to an implicit operand 830 00004C91 57 <1> push di 831 00004C92 50 <1> push ax 832 00004C93 A1[A449] <1> mov ax, [index] 833 00004C96 84E4 <1> test ah, ah 834 00004C98 750D <1> jnz da21_nota32prfx_nz 835 <1> ; opcode index > FF, not in this list --> 836 00004C9A BF[AC11] <1> mov di, a32prfxtab 837 00004C9D AE <1> scasb ; xlatb ? 838 00004C9E 7407 <1> je @F ; yes --> (ZR) 839 00004CA0 24FE <1> and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 840 00004CA2 B90700 <1> mov cx, A32P_LEN - 1 841 00004CA5 F2AE <1> repne scasb ; scan table (low bit cleared) 842 <1> @@: 843 <1> da21_a_o_common: 844 <1> da21_nota32prfx_nz: 845 00004CA7 58 <1> pop ax 846 00004CA8 5F <1> pop di 847 00004CA9 754E <1> jne da21_notprfx ; not in the list --> 848 <1> 849 00004CAB 0826[A149] <1> or [preused], ah ; mark it as used 850 00004CAF B104 <1> mov cl, 4 ; (ch = 0 because A32P_LEN / O32P_AMOUNT < 256) 851 <1> %if A32P_LEN > 255 || O32P_AMOUNT > 255 852 <1> %error Remove optimisation 853 <1> %endif 854 00004CB1 E80B10 <1> call moveover ; make space for "A32 " (or a16, osize) 855 <1> _386_PM push ax 856 00004CB4 80FC10 <1> cmp ah, PREOSIZE ; is it OSIZE ? 857 00004CB7 B84133 <1> mov ax, "A3" ; start of "A32" 858 00004CBA 7502 <1> jne @F ; no --> 859 00004CBC B04F <1> mov al, 'O' ; make it OSIZE (O32/O16) 860 <1> @@: 861 00004CBE E84F0E <1> call dis_lowercase ; al = "a"/"o" if lowercase option specified 862 <1> %if _40COLUMNS 863 00004CC1 8B36[9849] <1> mov si, word [mnemonofs] 864 00004CC5 8984[B40A] <1> mov word [line_out + si], ax 865 00004CC9 C784[B60A]3220 <1> mov word [line_out + si + 2], "2 " 866 <1> ; trail of A32/O32 867 <1> _386_PM pop ax 868 <1> _386_PM test byte [presizeflags], ah 869 <1> _386_PM ; do we have 32-bit ASIZE/OSIZE ? 870 <1> _386_PM jnz da21_j0 ; yes, keep a32/o32 (in 16-bit cs) --> 871 <1> _386_PM mov word [line_out + si + 1], "16" 872 <1> ; no, make it a16/o16 (in 32-bit cs) 873 <1> %else 874 <1> mov word [line_out+MNEMONOFS], ax 875 <1> mov word [line_out+MNEMONOFS+2], "2 " 876 <1> ; trail of A32/O32 877 <1> _386_PM pop ax 878 <1> _386_PM test byte [presizeflags], ah 879 <1> _386_PM ; do we have 32-bit ASIZE/OSIZE ? 880 <1> _386_PM jnz da21_j0 ; yes, keep a32/o32 (in 16-bit cs) --> 881 <1> _386_PM mov word [line_out + MNEMONOFS + 1], "16" 882 <1> ; no, make it a16/o16 (in 32-bit cs) 883 <1> %endif 884 <1> %else 885 <1> jmp da24 886 <1> %endif 887 <1> 888 <1> da21_j0: 889 00004CCF E97DFF <1> jmp da21 890 <1> 891 <1> da21_notprfx: equ disbad2 892 <1> 893 <1> 894 <1> da23_osize_asize: equ da23 895 <1> 896 <1> da23_wait: 897 <1> %if _PM 898 <1> or byte [presizeflags], ah 899 <1> ; Fake that this flag is set for da23's check. 900 <1> ; If not _PM then presizeflags == preflags and 901 <1> ; PREWAIT is already set in that variable. 902 <1> %endif 903 <1> 904 <1> ; INP: bx -> array of words to match against word [index] 905 <1> ; cx = number of array entries 906 <1> ; ah = preused flag to mark as used if match 907 <1> ; ah = presizeflags flag to check if in use 908 <1> ; dx = offset to add to di -> behind matched word 909 <1> ; OUT: ZR if one of the array entries matched, 910 <1> ; byte [preused] |= INP:ah 911 <1> ; if also flag in byte [presizeflags] was set, 912 <1> ; mnemonic replaced 913 <1> ; NZ if no entry matched 914 <1> ; CHG: ax, cx, si 915 <1> ; 916 <1> ; Note: If this is called with a 32-bit CS then the 917 <1> ; OSIZE/ASIZE value in the byte [preflags] is 918 <1> ; inverted to that in the byte [presizeflags]. 919 <1> ; As we check the latter, for O16/A16 we will 920 <1> ; not modify the mnemonics (keeping the 16-bit 921 <1> ; default mnemonics) but will mark the prefix 922 <1> ; as used by setting the flag in byte [preused]. 923 <1> ; If there is no OSIZE/ASIZE in 32-bit CS then 924 <1> ; the preused flag is also set (which does no 925 <1> ; harm) and the 32-bit mnemonic is selected. 926 <1> ; Operation in 16-bit CS has the same result as 927 <1> ; the prior handling, though it will always 928 <1> ; scan for the affected opcodes, and set the 929 <1> ; preused flag even if no prefix is used. 930 <1> da23: 931 00004CD2 57 <1> push di 932 00004CD3 89DF <1> mov di, bx 933 00004CD5 50 <1> push ax 934 00004CD6 0C01 <1> or al, 1 ; NZ, in case cx == 0 935 00004CD8 A1[A449] <1> mov ax, [index] 936 00004CDB F2AF <1> repne scasw 937 00004CDD 58 <1> pop ax 938 00004CDE 7517 <1> jne .ret ; if not found in the list --> (NZ) 939 00004CE0 0826[A149] <1> or byte [preused], ah ; mark this (OSIZE, ASIZE or WAIT) prefix as used 940 00004CE4 8426[A049] <1> test byte [presizeflags], ah 941 <1> ; is it O32, A32, or is WAIT present ? 942 00004CE8 740D <1> jz .ret ; no, do not modify mnemonic --> 943 00004CEA 01D7 <1> add di, dx ; replace the mnemonic with the modified name 944 00004CEC 8B35 <1> mov si, [di] 945 00004CEE 81C6[9E01] <1> add si, mnlist 946 00004CF2 E8460E <1> call showop ; copy instruction mnemonic 947 00004CF5 38C0 <1> cmp al, al ; ZR 948 <1> .ret: 949 00004CF7 5F <1> pop di 950 00004CF8 C3 <1> retn 951 <1> 952 <1> 953 <1> da21_j1: equ da21_j0 954 <1> 955 <1> disbad2: 956 00004CF9 E9950D <1> jmp disbad 957 <1> 958 <1> da24: 959 00004CFC A801 <1> test al, PRESEG 960 00004CFE 7438 <1> jz da25 ; if not because of a segment prefix --> 961 00004D00 A1[A449] <1> mov ax, [index] 962 00004D03 84E4 <1> test ah, ah 963 00004D05 75F2 <1> jnz disbad2 ; if index > 256, it's none of these --> 964 00004D07 57 <1> push di 965 00004D08 B90900 <1> mov cx, SEGP_LEN 966 00004D0B BF[A411] <1> mov di, segprfxtab 967 00004D0E F2AE <1> repne scasb 968 00004D10 5F <1> pop di 969 00004D11 75E6 <1> jne disbad2 ; if it's not on the list --> 970 00004D13 B90300 <1> mov cx, 3 971 00004D16 E8A60F <1> call moveover 972 00004D19 57 <1> push di 973 <1> %if _40COLUMNS 974 00004D1A BF[B40A] <1> mov di, line_out 975 00004D1D 033E[9849] <1> add di, word [mnemonofs] 976 <1> %else 977 <1> mov di, line_out+MNEMONOFS 978 <1> %endif 979 00004D21 E87D0E <1> call showseg ; show segment register 980 00004D24 B03A <1> mov al, ':' 981 00004D26 F606[E800]04 <1> testopt [asm_options], disasm_nasm 982 00004D2B 7402 <1> jz .notnasm 983 00004D2D B020 <1> mov al, 32 984 <1> .notnasm: 985 00004D2F AA <1> stosb 986 00004D30 5F <1> pop di 987 00004D31 800E[A149]01 <1> or byte [preused], PRESEG ; mark it as used 988 <1> da21_j2: 989 00004D36 EB97 <1> jmp s da21_j1 990 <1> 991 <1> da25: 992 00004D38 A802 <1> test al, PREREP 993 00004D3A 7435 <1> jz da26 ; if not a REP prefix 994 00004D3C 2406 <1> and al, PREREP|PREREPZ 995 00004D3E 0806[A149] <1> or [preused], al 996 00004D42 A1[A449] <1> mov ax, [index] 997 00004D45 84E4 <1> test ah, ah 998 00004D47 7525 <1> jnz disbad3 ; if not in the first 256 bytes 999 00004D49 24FE <1> and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 1000 00004D4B 57 <1> push di 1001 00004D4C BF[AD11] <1> mov di, replist 1002 00004D4F B90500 <1> mov cx, REP_SAME_LEN; scan those for REP first 1003 00004D52 F2AE <1> repne scasb 1004 00004D54 BE[BB09] <1> mov si, mnlist+MN_REP 1005 00004D57 7439 <1> je da27 ; if one of the REP instructions --> 1006 00004D59 B102 <1> mov cl, REP_DIFF_LEN; (ch = 0) 1007 00004D5B F2AE <1> repne scasb 1008 00004D5D 750F <1> jne disbad3 ; if not one of the REPE/REPNE instructions 1009 00004D5F BE[CD09] <1> mov si, mnlist+MN_REPE 1010 00004D62 F606[A149]04 <1> test byte [preused], PREREPZ 1011 00004D67 7529 <1> jnz da27 ; if REPE 1012 00004D69 BE[D309] <1> mov si, mnlist+MN_REPNE 1013 00004D6C EB24 <1> jmp s da27 ; it's REPNE 1014 <1> 1015 <1> disbad3: 1016 00004D6E E9200D <1> jmp disbad 1017 <1> 1018 <1> da26: 1019 00004D71 A808 <1> test al, PRELOCK 1020 00004D73 74F9 <1> jz disbad3 ; if not a lock prefix, either --> 1021 00004D75 57 <1> push di 1022 00004D76 A1[A449] <1> mov ax, [index] 1023 00004D79 BF[D815] <1> mov di, locktab 1024 00004D7C B92E00 <1> mov cx, N_LOCK 1025 00004D7F F2AF <1> repne scasw 1026 00004D81 75EB <1> jne disbad3 ; if not in the approved list --> 1027 00004D83 F606[A149]01 <1> test byte [preused], PRESEG 1028 00004D88 74E4 <1> jz disbad3 ; if memory was not accessed --> 1029 00004D8A BE[9707] <1> mov si, mnlist+MN_LOCK 1030 00004D8D 800E[A149]08 <1> or byte [preused], PRELOCK 1031 <1> 1032 <1> ; Slip in another mnemonic (REP or LOCK). 1033 <1> ; SI = offset of mnemonic, what should be 1034 <1> ; DI is on the stack. 1035 <1> 1036 <1> da27: 1037 00004D92 5F <1> pop di 1038 00004D93 B90800 <1> mov cx, 8 1039 <1> %if _40COLUMNS 1040 <1> ; We cheat: Instead of moving things back after showop, 1041 <1> ; which obtains the final true length of the mnemonic, 1042 <1> ; we get the length here separately. This only works because 1043 <1> ; the REP and LOCK prefixes are never suffixed by a W or D, 1044 <1> ; so the length found here matches what showop will get. 1045 00004D96 F606[E900]02 <1> testopt [asm_options], disasm_no_indent 1046 00004D9B 7407 <1> jz @F 1047 00004D9D 8B4CFE <1> mov cx, word [si - 2] ; get mnemonic length in low 4 bits 1048 00004DA0 83E10F <1> and cx, 15 ; extract the length 1049 00004DA3 41 <1> inc cx ; allow for one blank 1050 <1> @@: 1051 <1> %endif 1052 00004DA4 56 <1> push si 1053 00004DA5 E8170F <1> call moveover 1054 00004DA8 5E <1> pop si 1055 00004DA9 57 <1> push di 1056 00004DAA E88E0D <1> call showop 1057 00004DAD 5F <1> pop di 1058 00004DAE EB86 <1> jmp s da21_j2 1059 <1> 1060 <1> ; Done with instruction. Erase the size indicator, if appropriate. 1061 <1> 1062 <1> da28: 1063 00004DB0 8B0E[BE49] <1> mov cx, [sizeloc] ; -> size keyword, or zero if none 1064 00004DB4 E324 <1> jcxz da28b ; if there was no size given --> 1065 00004DB6 A0[BA49] <1> mov al, [disflags] 1066 00004DB9 A810 <1> test al, DIS_I_SHOWSIZ 1067 00004DBB 751D <1> jnz da28b ; if we need to show the size --> 1068 00004DBD A820 <1> test al, DIS_I_KNOWSIZ 1069 00004DBF 7419 <1> jz da28b ; if the size is not known already --> 1070 00004DC1 87CF <1> xchg cx, di ; di -> size keyword, cx -> behind disassembly 1071 00004DC3 89FE <1> mov si,di ; si -> size keyword 1072 00004DC5 B020 <1> mov al, 32 ; scan for next blank 1073 <1> da28a: 1074 00004DC7 AE <1> scasb ; skip size name 1075 00004DC8 75FD <1> jne da28a ; if not done yet --> 1076 <1> ; (The above is the same as repne scasb, but 1077 <1> ; has no effect on cx.) 1078 00004DCA F606[E800]04 <1> testopt [asm_options], disasm_nasm 1079 00004DCF 7503 <1> jnz .nasm 1080 00004DD1 83C704 <1> add di, byte 4 ; skip 'PTR ' 1081 <1> .nasm: 1082 00004DD4 87F7 <1> xchg si, di ; di -> size keyword, si -> after size keyword 1083 00004DD6 29F1 <1> sub cx, si ; behind disassembly - after size keyword 1084 <1> ; = length of disassembly part after keyword 1085 00004DD8 F3A4 <1> rep movsb ; move the remainder of the line 1086 <1> ; di -> behind disassembly (size keyword deleted) 1087 <1> 1088 <1> ; Now we're really done. Print out the bytes on the left. 1089 <1> 1090 <1> ; di -> behind disassembly 1091 <1> da28b: 1092 00004DDA 57 <1> push di 1093 00004DDB BF[B40A] <1> mov di, line_out ; print start of disassembly line 1094 00004DDE A1[880B] <1> mov ax, [u_addr + saSegSel] 1095 <1> ; print address 1096 00004DE1 E8A64C <1> call hexword ; segment/selector 1097 00004DE4 B03A <1> mov al, ':' 1098 00004DE6 AA <1> stosb ; colon 1099 <1> _386_PM_o32 ; mov eax, dword [u_addr] 1100 00004DE7 A1[840B] <1> mov ax, word [u_addr] 1101 <1> %if _PM && _DISASM_32BIT 1102 <1> test byte [bCSAttr], 40h 1103 <1> jz .16 1104 <1> call hexword_high 1105 <1> .16: 1106 <1> %endif 1107 00004DEA E89D4C <1> call hexword ; offset 1108 00004DED B020 <1> mov al, 32 1109 00004DEF AA <1> stosb ; one blank 1110 00004DF0 8B1E[9C49] <1> mov bx, [dis_n] 1111 <1> da28c: 1112 <1> %if _40COLUMNS 1113 00004DF4 BE[B30A] <1> mov si, line_out - 1 1114 00004DF7 0336[9849] <1> add si, word [mnemonofs] 1115 <1> %else 1116 <1> mov si,line_out+MNEMONOFS - 1 1117 <1> %endif 1118 00004DFB 29FE <1> sub si, di ; how many columns available for machine code 1119 00004DFD D1EE <1> shr si, 1 ; how many bytes can be dumped 1120 00004DFF 39F3 <1> cmp bx, si 1121 00004E01 7619 <1> jbe da29 ; if it's a short instruction which fits in one line 1122 00004E03 29F3 <1> sub bx, si ; bx = how many bytes to defer to next line(s) 1123 00004E05 53 <1> push bx 1124 00004E06 89F3 <1> mov bx, si ; bx = how many bytes fit in this line 1125 00004E08 57 <1> push di 1126 00004E09 E89D0E <1> call disshowbytes ; dump bytes on this line 1127 00004E0C E8B44C <1> call putsline_crlf ; append CR LF and display line 1128 <1> ; Note that MNEMONOFS is always even, and so is the length 1129 <1> ; of the prefix (segment + colon + offset 4 or 8 + blank). 1130 <1> ; We determined how many bytes to dump by using line_out 1131 <1> ; plus mnemonofs minus 1. Therefore we will always actually 1132 <1> ; have two bytes left before the disassembly here. This is 1133 <1> ; crucial for this call as it appends two bytes to the line. 1134 <1> ; We do not want the CR or LF to overwrite the disassembly 1135 <1> ; text in the line_out buffer so we need two bytes of space. 1136 00004E0F 59 <1> pop cx ; -> at column after segmented address 1137 00004E10 5B <1> pop bx ; = how many bytes left for subsequent line(s) 1138 00004E11 BF[B40A] <1> mov di, line_out ; reset di 1139 00004E14 29F9 <1> sub cx, di ; = how many columns to skip 1140 00004E16 B020 <1> mov al, 32 1141 00004E18 F3AA <1> rep stosb ; fill with blanks 1142 00004E1A EBD8 <1> jmp short da28c ; loop for subsequent line(s) --> 1143 <1> da29: 1144 00004E1C E88A0E <1> call disshowbytes ; dunp remaining bytes 1145 <1> da30: 1146 00004E1F B020 <1> mov al, 32 ; pad to op code 1147 <1> %if _40COLUMNS 1148 00004E21 B9[B40A] <1> mov cx, line_out 1149 00004E24 030E[9849] <1> add cx, word [mnemonofs] 1150 <1> %else 1151 <1> mov cx,line_out+MNEMONOFS 1152 <1> %endif 1153 00004E28 29F9 <1> sub cx,di 1154 00004E2A 7202 <1> jc da30_1 ; (shouldn't happen) 1155 00004E2C F3AA <1> rep stosb 1156 <1> da30_1: 1157 00004E2E 5F <1> pop di ; -> behind disassembly 1158 00004E2F F606[BA49]08 <1> test byte [disflags],DIS_I_UNUSED 1159 00004E34 740D <1> jz da32 ; if we don't print ` (unused)' 1160 00004E36 BE[CF38] <1> mov si,unused 1161 00004E39 807DFF20 <1> cmp byte [di-1], 32 1162 00004E3D 7501 <1> jne da31 ; if there's already a space here 1163 00004E3F 46 <1> inc si 1164 <1> da31: 1165 00004E40 E8A84B <1> call showstring 1166 <1> 1167 <1> ; Print info on minimal processor needed. 1168 <1> 1169 <1> da32: 1170 00004E43 A0[1C41] <1> mov al, [dismach] 1171 00004E46 3A06[100C] <1> cmp al, [maxmachinetype] 1172 00004E4A 7603 <1> jbe @F 1173 00004E4C A2[100C] <1> mov [maxmachinetype], al 1174 <1> @@: 1175 00004E4F 57 <1> push di 1176 00004E50 BF[A649] <1> mov di, obsinst 1177 00004E53 8B0E[A449] <1> mov cx, word [index] 1178 00004E57 E8C00D <1> call showmach ;show the machine type, if needed 1179 00004E5A 5F <1> pop di 1180 00004E5B E313 <1> jcxz da32f_j1 ; if no message --> 1181 <1> 1182 <1> ; Print a message on the far right. 1183 <1> 1184 <1> da32_tabto: 1185 <1> %if _40COLUMNS 1186 00004E5D B8[B40A] <1> mov ax, line_out 1187 00004E60 0306[9A49] <1> add ax, word [trailofs] 1188 <1> %else 1189 <1> mov ax, line_out+79 1190 <1> %endif 1191 00004E64 29C8 <1> sub ax, cx 1192 00004E66 51 <1> push cx 1193 00004E67 E83D4C <1> call tab_to ; tab out to the location 1194 00004E6A 59 <1> pop cx 1195 00004E6B F3A4 <1> rep movsb ; copy the string 1196 <1> da32z_j1: 1197 00004E6D E98302 <1> jmp da32z ; done 1198 <1> 1199 <1> da32f_j1: 1200 00004E70 EB72 <1> jmp da32f 1201 <1> 1202 <1> %if _COND 1203 <1> ; Try dumping a condition status. 1204 <1> da32_cond: 1205 <1> %if _COND_RDUMP_ONLY 1206 00004E72 A802 <1> test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 1207 00004E74 75F7 <1> jnz da32z_j1 ; not showing conditionals message --> 1208 <1> %endif 1209 00004E76 8B36[C049] <1> mov si, word [condmsg] 1210 00004E7A 85F6 <1> test si, si ; stored a message here ? 1211 00004E7C 74EF <1> jz da32z_j1 ; no --> 1212 00004E7E 57 <1> push di 1213 00004E7F 89F7 <1> mov di, si 1214 00004E81 B9FFFF <1> mov cx, -1 1215 00004E84 31C0 <1> xor ax, ax 1216 00004E86 F2AE <1> repne scasb 1217 00004E88 F7D1 <1> not cx 1218 00004E8A 49 <1> dec cx ; get string length 1219 00004E8B 5F <1> pop di 1220 00004E8C EBCF <1> jmp short da32_tabto 1221 <1> %else 1222 <1> da32_cond: equ da32z_j1 1223 <1> %endif 1224 <1> 1225 <1> da32_xlatb: 1226 00004E8E A802 <1> test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 1227 00004E90 75E0 <1> jnz da32_cond 1228 00004E92 803E[B149]03 <1> _no386 cmp byte [segmnt], 3 1229 00004E97 77D9 <1> _no386 ja da32_cond ; if FS or GS on non-386 --> (invalid) 1230 00004E99 F606[A049]20 <1> _no386 test byte [presizeflags], PRE32A 1231 00004E9E 75D2 <1> _no386 jnz da32_cond 1232 00004EA0 803E[B149]05 <1> cmp byte [segmnt], 5 1233 00004EA5 77CB <1> ja da32_cond ; if invalid segment --> 1234 00004EA7 813E[A449]D700 <1> cmp word [index], 0D7h ; xlatb ? 1235 00004EAD 75C3 <1> jne da32_cond 1236 00004EAF A1[A80C] <1> mov ax, word [reg_ebx] 1237 00004EB2 A3[B449] <1> mov word [addrr], ax 1238 00004EB5 A1[AA0C] <1> mov ax, word [reg_ebx + 2] 1239 00004EB8 A3[B649] <1> mov word [addrr + 2], ax; get address in (e)bx 1240 00004EBB A0[A40C] <1> mov al, byte [reg_eax] 1241 00004EBE 0006[B449] <1> add byte [addrr], al 1242 00004EC2 8016[B549]00 <1> adc byte [addrr + 1], 0 1243 00004EC7 8316[B649]00 <1> adc word [addrr + 2], 0 ; add al 1244 00004ECC C606[B049]80 <1> mov byte [rmsize], 80h ; byte size 1245 <1> %if _MEMREF_AMOUNT 1246 00004ED1 800E[BB49]10 <1> setopt [disflags], DIS_I_M_SRC 1247 <1> %endif 1248 <1> %if _DISASM_32BIT 1249 00004ED6 F606[A049]20 <1> test byte [presizeflags], PRE32A 1250 00004EDB 7425 <1> jz @F 1251 00004EDD 800E[BB49]08 <1> setopt [disflags], DIS_I_SHOW_A32 1252 <1> ; set flag if 32-bit 1253 <1> %endif 1254 00004EE2 EB1E <1> jmp @F 1255 <1> 1256 <1> 1257 <1> ; Dump referenced memory location. 1258 <1> 1259 <1> da32f: 1260 00004EE4 A0[BA49] <1> mov al,[disflags] 1261 00004EE7 3406 <1> xor al, DIS_F_SHOW | DIS_I_SHOW 1262 00004EE9 A886 <1> test al, DIS_F_SHOW | DIS_I_SHOW | DIS_I_DONTSHOW 1263 <1> ; (NZ if either _SHOW is clear, or _DONTSHOW is set) 1264 00004EEB 75A1 <1> jnz da32_xlatb ; if there is no memory location to show --> 1265 00004EED 803E[B149]03 <1> _no386 cmp byte [segmnt], 3 1266 00004EF2 779A <1> _no386 ja da32_xlatb ; if FS or GS on non-386 --> (invalid) 1267 00004EF4 F606[BB49]08 <1> _no386 testopt [disflags], DIS_I_SHOW_A32 1268 00004EF9 7593 <1> _no386 jnz da32_xlatb 1269 00004EFB 803E[B149]05 <1> cmp byte [segmnt], 5 1270 00004F00 778C <1> ja da32_xlatb ; if invalid segment --> 1271 <1> @@: 1272 <1> %if _PM 1273 <1> push ax 1274 <1> %endif 1275 00004F02 A0[B149] <1> mov al, [segmnt] ; segment number 1276 00004F05 98 <1> cbw 1277 00004F06 D1E0 <1> shl ax, 1 1278 00004F08 93 <1> xchg ax, bx ; mov bx, ax 1279 00004F09 8B9F[1C4A] <1> mov bx, [segrgaddr + bx]; get address of value 1280 <1> %if _PM 1281 <1> pop ax 1282 <1> call ispm 1283 <1> jnz @F ; if 86 Mode, all segments readable --> 1284 <1> [cpu 286] 1285 <1> verr word [bx] 1286 <1> jnz da32_cond ; (NOT to da32_xlatb) 1287 <1> __CPU__ 1288 <1> @@: 1289 <1> %endif 1290 00004F0D 53 <1> push bx 1291 <1> %if _MEMREF_AMOUNT 1292 00004F0E FF37 <1> push word [bx] ; = segment/selector value 1293 00004F10 E88608 <1> call get_free_memref ; memrefs + bx -> the memref structure 1294 00004F13 8F87[5849] <1> pop word [memrefs + bx + mrSegmentSelector] 1295 00004F17 808F[5A49]02 <1> or byte [memrefs + bx + mrFlags], mrfMem 1296 00004F1C F606[BB49]10 <1> testopt [disflags], DIS_I_M_SRC 1297 00004F21 7405 <1> jz @F 1298 00004F23 808F[5A49]04 <1> or byte [memrefs + bx + mrFlags], mrfMemSource 1299 <1> @@: 1300 00004F28 F606[BB49]20 <1> testopt [disflags], DIS_I_M_DST 1301 00004F2D 7405 <1> jz @F 1302 00004F2F 808F[5A49]08 <1> or byte [memrefs + bx + mrFlags], mrfMemDest 1303 <1> @@: 1304 <1> %endif 1305 <1> 1306 <1> %if _40COLUMNS 1307 00004F34 B8[AC0A] <1> mov ax, line_out - 8 1308 00004F37 0306[9A49] <1> add ax, word [trailofs] 1309 <1> %else 1310 <1> mov ax, line_out + 79 - 8 1311 <1> %endif 1312 <1> ; 8 is composed of: 1313 <1> ; 3 segreg name + colon 1314 <1> ; 4 low word offset 1315 <1> ; 1 equals sign 1316 <1> ; 79 means we write to the very right of an 80-columns 1317 <1> ; display, up to the second-to-last column. 1318 00004F3B B90200 <1> mov cx, 2 ; if byte then content uses 2 digits 1319 <1> %if _MEMREF_AMOUNT 1320 00004F3E C687[5C49]01 <1> mov byte [memrefs + bx + mrLength], 1 1321 <1> ; if byte then length = 1 1322 <1> %endif 1323 00004F43 803E[B049]00 <1> cmp byte [rmsize],0 1324 00004F48 7C10 <1> jl da32h ; if byte 1325 00004F4A 7408 <1> jz da32g ; if word 1326 <1> %if _MEMREF_AMOUNT 1327 00004F4C 8087[5C49]02 <1> add byte [memrefs + bx + mrLength], 2 1328 <1> ; add 2 bytes to length for high half of dword 1329 <1> %endif 1330 00004F51 83C104 <1> add cx, byte 4 ; add 4 digits for high half of dword 1331 <1> da32g: 1332 <1> %if _MEMREF_AMOUNT 1333 00004F54 FE87[5C49] <1> inc byte [memrefs + bx + mrLength] 1334 <1> ; add 1 byte to length for the high byte 1335 <1> %endif 1336 00004F58 41 <1> inc cx 1337 00004F59 41 <1> inc cx ; add 2 digits for the high byte 1338 <1> da32h: 1339 00004F5A F606[BB49]04 <1> testopt [disflags], DIS_I_DOUBLE_M 1340 00004F5F 740B <1> jz @F 1341 <1> %if _MEMREF_AMOUNT 1342 00004F61 8A97[5C49] <1> mov dl, byte [memrefs + bx + mrLength] 1343 00004F65 0097[5C49] <1> add byte [memrefs + bx + mrLength], dl 1344 <1> ; double the amount of bytes 1345 <1> %endif 1346 00004F69 01C9 <1> add cx, cx ; double the amount of digits 1347 00004F6B 41 <1> inc cx ; plus one slot for the comma 1348 <1> @@: 1349 00004F6C F606[BB49]02 <1> testopt [disflags], DIS_I_FAR_M 1350 00004F71 7408 <1> jz @F 1351 <1> %if _MEMREF_AMOUNT 1352 00004F73 8087[5C49]02 <1> add byte [memrefs + bx + mrLength], 2 1353 <1> ; add 2 bytes to the length for the segment 1354 <1> %endif 1355 00004F78 83C105 <1> add cx, 5 ; 4 digits for segment plus 1 colon 1356 <1> @@: 1357 <1> %if _MEMREF_AMOUNT 1358 00004F7B FF36[B449] <1> push word [addrr] 1359 00004F7F 8F87[5449] <1> pop word [memrefs + bx + mrOffset] 1360 <1> %endif 1361 <1> %if _DISASM_32BIT 1362 00004F83 F606[BB49]08 <1> testopt [disflags], DIS_I_SHOW_A32 1363 00004F88 7410 <1> jz @F 1364 <1> %if _MEMREF_AMOUNT 1365 00004F8A FF36[B649] <1> push word [addrr + 2] 1366 00004F8E 8F87[5649] <1> pop word [memrefs + bx + mrOffset + 2] 1367 00004F92 808F[5A49]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 1368 <1> %endif 1369 00004F97 83C104 <1> add cx, 4 ; add 4 digits for high word offset 1370 <1> @@: 1371 <1> %endif 1372 <1> %if _MEMREF_AMOUNT 1373 00004F9A E81708 <1> call calc_linear_memref_and_mark_nonfree 1374 <1> %endif 1375 00004F9D 29C8 <1> sub ax, cx 1376 00004F9F E8054B <1> call tab_to ; CHG: ax, bx, cx, dx, di 1377 00004FA2 E8F00B <1> call showseg_uppercase_ax 1378 <1> ; ax = segment register name 1379 00004FA5 E87A0B <1> call dis_lowercase_refmem_w 1380 00004FA8 AB <1> stosw 1381 00004FA9 B03A <1> mov al, ':' 1382 00004FAB AA <1> stosb 1383 <1> %if _DISASM_32BIT 1384 00004FAC F606[BB49]08 <1> testopt [disflags], DIS_I_SHOW_A32 1385 00004FB1 7406 <1> jz @F 1386 00004FB3 A1[B649] <1> mov ax, [addrr + 2] 1387 00004FB6 E8D14A <1> call hexword ; show high word of offset 1388 <1> @@: 1389 <1> %endif 1390 00004FB9 A1[B449] <1> mov ax, [addrr] 1391 00004FBC E8CB4A <1> call hexword ; show offset 1392 <1> 1393 <1> %if _DISASM_32BIT 1394 00004FBF F606[BB49]08 <1> testopt [disflags], DIS_I_SHOW_A32 1395 00004FC4 7407 <1> jz .isa16option ; if 16-bit addressing --> 1396 00004FC6 F606[E900]20 <1> testopt [asm_options], disasm_a32_memref 1397 00004FCB EB05 <1> jmp .commonoption 1398 <1> .isa16option: 1399 <1> %endif 1400 00004FCD F606[E900]10 <1> testopt [asm_options], disasm_a16_memref 1401 <1> .commonoption: 1402 00004FD2 7504 <1> jnz @F 1403 00004FD4 5B <1> pop bx 1404 00004FD5 E91B01 <1> jmp da32z 1405 <1> @@: 1406 <1> 1407 00004FD8 B03D <1> mov al,'=' 1408 00004FDA AA <1> stosb 1409 00004FDB E8E94A <1> call putsline 1410 00004FDE BF[B40A] <1> mov di, line_out 1411 <1> ..@uu_referenced_memory_access_start: 1412 00004FE1 5B <1> pop bx 1413 00004FE2 06 <1> push es 1414 00004FE3 8E07 <1> mov es, [bx] 1415 00004FE5 66 <1> _386_o32 1416 00004FE6 8B1E[B449] <1> mov bx, [addrr] 1417 <1> 1418 00004FEA F606[BB49]02 <1> testopt [disflags], DIS_I_FAR_M 1419 00004FEF 743D <1> jz .no_far_m 1420 00004FF1 BE0100 <1> mov si, 1 1421 00004FF4 803E[B049]00 <1> cmp byte [rmsize], 0 1422 00004FF9 7C08 <1> jl @F 1423 00004FFB BE0200 <1> mov si, 2 1424 00004FFE 7403 <1> jz @F 1425 00005000 BE0400 <1> mov si, 4 1426 <1> @@: 1427 <1> %if _DISASM_32BIT 1428 00005003 F606[BB49]08 <1> testopt [disflags], DIS_I_SHOW_A32 1429 00005008 7411 <1> jz @F 1430 <1> [cpu 386] 1431 0000500A 660FB7F6 <1> movzx esi, si 1432 0000500E 26678A0433 <1> mov al, byte [es:ebx + esi] 1433 00005013 26678A643301 <1> mov ah, byte [es:ebx + esi + 1] 1434 <1> __CPU__ 1435 00005019 EB07 <1> jmp @FF 1436 <1> @@: 1437 <1> %endif 1438 0000501B 268A00 <1> mov al, byte [es:bx + si] 1439 0000501E 268A6001 <1> mov ah, byte [es:bx + si + 1] 1440 <1> @@: 1441 00005022 8CC6 <1> mov si, es 1442 00005024 07 <1> pop es 1443 00005025 06 <1> push es 1444 00005026 E8614A <1> call hexword 1445 00005029 B03A <1> mov al, ':' 1446 0000502B AA <1> stosb 1447 0000502C 8EC6 <1> mov es, si 1448 <1> .no_far_m: 1449 <1> 1450 0000502E 8CC6 <1> mov si, es 1451 <1> %if _DISASM_32BIT 1452 00005030 F606[BB49]08 <1> testopt [disflags], DIS_I_SHOW_A32 1453 00005035 741E <1> jz @F 1454 <1> [cpu 386] 1455 00005037 26678A03 <1> mov al, [es:ebx] ; avoid a "mov ax,[-1]" 1456 0000503B 803E[B049]00 <1> cmp byte [rmsize], 0 1457 00005040 7C38 <1> jl .displaybyte ; if byte --> 1458 00005042 26678A6301 <1> mov ah, [es:ebx + 1] 1459 00005047 742B <1> jz .displayword ; if word --> 1460 00005049 26678A5302 <1> mov dl, [es:ebx + 2] ; avoid a "mov dx,[-1]" 1461 0000504E 26678A7303 <1> mov dh, [es:ebx + 3] 1462 <1> __CPU__ 1463 00005053 EB18 <1> jmp .displaydword ; is dword --> 1464 <1> @@: 1465 <1> %endif 1466 00005055 268A07 <1> mov al, [es:bx] ; avoid a "mov ax,[-1]" 1467 00005058 803E[B049]00 <1> cmp byte [rmsize], 0 1468 0000505D 7C1B <1> jl .displaybyte ; if byte 1469 0000505F 268A6701 <1> mov ah, [es:bx + 1] 1470 00005063 740F <1> jz .displayword ; if word 1471 00005065 268A5702 <1> mov dl, [es:bx + 2] ; avoid a "mov dx,[-1]" 1472 00005069 268A7703 <1> mov dh, [es:bx + 3] 1473 <1> .displaydword: 1474 0000506D 07 <1> pop es 1475 0000506E 92 <1> xchg ax, dx 1476 0000506F E8184A <1> call hexword 1477 00005072 92 <1> xchg ax, dx 1478 00005073 A8 <1> db __TEST_IMM8 ; (skip pop) 1479 <1> .displayword: 1480 00005074 07 <1> pop es 1481 00005075 E8124A <1> call hexword 1482 00005078 EB04 <1> jmp short .displayed ; done 1483 <1> .displaybyte: 1484 0000507A 07 <1> pop es 1485 0000507B E8134A <1> call hexbyte ; display byte 1486 <1> .displayed: 1487 <1> 1488 0000507E F606[BB49]04 <1> testopt [disflags], DIS_I_DOUBLE_M 1489 00005083 746E <1> jz .no_double_m 1490 <1> 1491 00005085 B02C <1> mov al, ',' 1492 00005087 AA <1> stosb 1493 <1> 1494 00005088 06 <1> push es 1495 00005089 8EC6 <1> mov es, si 1496 <1> 1497 0000508B BE0100 <1> mov si, 1 1498 0000508E 803E[B049]00 <1> cmp byte [rmsize], 0 1499 00005093 7C08 <1> jl @F 1500 00005095 BE0200 <1> mov si, 2 1501 00005098 7403 <1> jz @F 1502 0000509A BE0400 <1> mov si, 4 1503 <1> @@: 1504 <1> %if _DISASM_32BIT 1505 0000509D F606[BB49]08 <1> testopt [disflags], DIS_I_SHOW_A32 1506 000050A2 7426 <1> jz @F 1507 <1> [cpu 386] 1508 000050A4 660FB7F6 <1> movzx esi, si 1509 000050A8 26678A0433 <1> mov al, [es:ebx + esi] ; avoid a "mov ax,[-1]" 1510 000050AD 803E[B049]00 <1> cmp byte [rmsize], 0 1511 000050B2 7C3B <1> jl .double_displaybyte ; if byte --> 1512 000050B4 26678A643301 <1> mov ah, [es:ebx + esi + 1] 1513 000050BA 742D <1> jz .double_displayword ; if word --> 1514 000050BC 26678A543302 <1> mov dl, [es:ebx + esi + 2] 1515 <1> ; avoid a "mov dx,[-1]" 1516 000050C2 26678A743303 <1> mov dh, [es:ebx + esi + 3] 1517 <1> __CPU__ 1518 000050C8 EB18 <1> jmp .double_displaydword 1519 <1> @@: 1520 <1> %endif 1521 000050CA 268A00 <1> mov al, [es:bx + si] ; avoid a "mov ax,[-1]" 1522 000050CD 803E[B049]00 <1> cmp byte [rmsize], 0 1523 000050D2 7C1B <1> jl .double_displaybyte ; if byte --> 1524 000050D4 268A6001 <1> mov ah, [es:bx + si + 1] 1525 000050D8 740F <1> jz .double_displayword ; if word --> 1526 000050DA 268A5002 <1> mov dl, [es:bx + si + 2]; avoid a "mov dx,[-1]" 1527 000050DE 268A7003 <1> mov dh, [es:bx + si + 3] 1528 <1> .double_displaydword: 1529 000050E2 07 <1> pop es 1530 000050E3 92 <1> xchg ax, dx 1531 000050E4 E8A349 <1> call hexword 1532 000050E7 92 <1> xchg ax, dx 1533 000050E8 A8 <1> db __TEST_IMM8 ; (skip pop) 1534 <1> .double_displayword: 1535 000050E9 07 <1> pop es 1536 000050EA E89D49 <1> call hexword 1537 000050ED EB04 <1> jmp short .double_displayed 1538 <1> .double_displaybyte: 1539 000050EF 07 <1> pop es 1540 000050F0 E89E49 <1> call hexbyte ; display byte 1541 <1> .double_displayed: 1542 <1> .no_double_m: 1543 <1> ..@uu_referenced_memory_access_end: 1544 <1> 1545 <1> da32z: 1546 000050F3 E8C549 <1> call trimputs ; done with operand list 1547 <1> 1548 <1> %if _MEMREF_AMOUNT 1549 <1> set_string_memref: 1550 000050F6 F606[BA49]02 <1> test byte [disflags], DIS_F_SHOW 1551 000050FB 7503 <1> jnz @F 1552 <1> .none_j: 1553 000050FD E91D01 <1> jmp .none 1554 <1> @@: 1555 <1> 1556 00005100 A1[A449] <1> mov ax, [index] 1557 00005103 84E4 <1> test ah, ah 1558 00005105 75F6 <1> jnz .none_j 1559 00005107 BF[6F11] <1> mov di, ppbytes.string ; list of string opcodes 1560 0000510A B90E00 <1> mov cx, ppbytes.string_amount 1561 0000510D F2AE <1> repne scasb 1562 0000510F 75EC <1> jne .none_j ; if not one of these --> 1563 <1> ; last entries are: 0A6h,0A7h,0AEh,0AFh 1564 <1> ; corresponding to cmpsb, cmpsw/d, scasb, scasw/d 1565 <1> ; so cx = 0 means scasw, = 1 scasb, = 2 cmpsw, = 3 cmpsb 1566 00005111 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 1567 <1> 1568 00005114 31D2 <1> xor dx, dx 1569 00005116 FF36[AC0C] <1> push word [reg_ecx] 1570 0000511A 8F06[9449] <1> pop word [string_memref_counter] 1571 <1> %if _DISASM_32BIT 1572 0000511E F606[A049]20 <1> test byte [presizeflags], PRE32A 1573 00005123 7404 <1> jz @F ; if 16-bit addressing --> 1574 00005125 8B16[AE0C] <1> mov dx, [reg_ecx + 2] ; = ecxh value 1575 <1> @@: 1576 <1> %endif 1577 00005129 8916[9649] <1> mov word [string_memref_counter + 2], dx 1578 <1> 1579 0000512D 80F904 <1> cmp cl, 4 ; repetition differs for memory content ? 1580 00005130 7203E9A000 <1> jae @F ; no --> 1581 00005135 F606[A049]02 <1> test byte [preflags], PREREP 1582 0000513A 7503E99600 <1> jz @F ; if not repeated --> 1583 <1> 1584 <1> %if _DISASM_32BIT 1585 0000513F F606[A049]20 <1> test byte [presizeflags], PRE32A 1586 00005144 7407 <1> jz .isa16option ; if 16-bit addressing --> 1587 00005146 F606[E900]80 <1> testopt [asm_options], disasm_a32_string 1588 0000514B EB05 <1> jmp .commonoption 1589 <1> .isa16option: 1590 <1> %endif 1591 0000514D F606[E900]40 <1> testopt [asm_options], disasm_a16_string 1592 <1> .commonoption: 1593 00005152 750D <1> jnz .optiondone 1594 00005154 C706[9449]0100 <1> mov word [string_memref_counter], 1 1595 0000515A 8326[9649]00 <1> and word [string_memref_counter + 2], 0 1596 0000515F EB74 <1> jmp @F 1597 <1> 1598 <1> .optiondone: 1599 <1> 1600 00005161 01C9 <1> add cx, cx ; 0 = scasd, 2 = scasb, 4 = cmpsd, 6 = cmpsb 1601 <1> %if _DISASM_32BIT 1602 00005163 F606[A049]10 <1> test byte [presizeflags], PRE32D 1603 00005168 7501 <1> jnz .iso32 1604 <1> %endif 1605 0000516A 41 <1> inc cx ; point to word entry, not dword 1606 <1> .iso32: 1607 <1> 1608 0000516B 01C9 <1> add cx, cx ; table entries are words, so 0..14 1609 <1> 1610 0000516D F606[A049]04 <1> test byte [preflags], PREREPZ 1611 00005172 7403 <1> jz .isrepne 1612 00005174 83C110 <1> add cx, simulate_rep_sca_cmp.table_repe_offset 1613 <1> ; from 0..14 to 16..30 1614 <1> .isrepne: 1615 <1> 1616 00005177 89CB <1> mov bx, cx ; = index into table 1617 00005179 8B97[5E4A] <1> mov dx, word [bx + simulate_rep_sca_cmp.table] 1618 <1> ; function to call 1619 <1> %if _DISASM_32BIT 1620 0000517D F606[A049]20 <1> test byte [presizeflags], PRE32A 1621 00005182 7401 <1> jz .isa16 ; if 16-bit addressing --> 1622 00005184 4A <1> dec dx ; a32 prefix is 1 byte lower than table entry 1623 <1> .isa16: 1624 <1> %endif 1625 <1> 1626 00005185 66 <1> _386_o32 1627 00005186 8B36[BC0C] <1> mov si, word [reg_esi] 1628 0000518A 66 <1> _386_o32 1629 0000518B 8B3E[C00C] <1> mov di, word [reg_edi] 1630 0000518F 66 <1> _386_o32 1631 00005190 8B0E[AC0C] <1> mov cx, word [reg_ecx] 1632 00005194 8E06[C80C] <1> mov es, word [reg_es] 1633 00005198 50 <1> push ax 1634 00005199 A810 <1> test al, PP_STRSRC ; cmps ? 1635 0000519B 740D <1> jz .issca ; no, no need to load ds --> 1636 <1> 1637 0000519D A0[B149] <1> mov al, [segmnt] ; segment number 1638 000051A0 98 <1> cbw 1639 000051A1 D1E0 <1> shl ax, 1 1640 000051A3 93 <1> xchg ax, bx ; mov bx, ax 1641 000051A4 8B9F[1C4A] <1> mov bx, word [segrgaddr + bx] 1642 <1> ; si = address of segment/selector reg 1643 000051A8 8E1F <1> mov ds, [bx] 1644 <1> 1645 <1> .issca: 1646 000051AA 66 <1> _386_o32 1647 000051AB 36A1[A40C] <1> mov ax, word [ss:reg_eax] 1648 <1> 1649 000051AF 36F606[E10C]04 <1> testopt [ss:reg_efl], 400h 1650 <1> ; DF set ? 1651 000051B5 7401 <1> jz .up 1652 000051B7 FD <1> std 1653 <1> .up: 1654 000051B8 FFD2 <1> call dx ; simulate the repeated string op 1655 000051BA FC <1> cld 1656 000051BB 16 <1> push ss 1657 000051BC 1F <1> pop ds 1658 000051BD 16 <1> push ss 1659 000051BE 07 <1> pop es 1660 <1> 1661 000051BF 6651 <1> _386 push ecx 1662 000051C1 59 <1> _386 pop cx 1663 000051C2 5A <1> _386 pop dx 1664 <1> 1665 <1> %if _DISASM_32BIT 1666 000051C3 F606[A049]20 <1> _386 test byte [presizeflags], PRE32A 1667 000051C8 7502 <1> _386 jnz .count32 ; if 32-bit addressing --> 1668 <1> %endif 1669 000051CA 31D2 <1> xor dx, dx 1670 <1> .count32: 1671 000051CC 290E[9449] <1> sub word [string_memref_counter], cx 1672 000051D0 1916[9649] <1> sbb word [string_memref_counter + 2], dx 1673 <1> 1674 000051D4 58 <1> pop ax 1675 <1> @@: 1676 <1> 1677 000051D5 A810 <1> test al, PP_STRSRC 1678 000051D7 7429 <1> jz .no_src 1679 <1> 1680 000051D9 803E[B149]03 <1> _no386 cmp byte [segmnt], 3 1681 000051DE 7722 <1> _no386 ja .no_src ; if FS or GS on non-386 --> (invalid) 1682 000051E0 803E[B149]05 <1> cmp byte [segmnt], 5 1683 000051E5 771B <1> ja .no_src ; if invalid segment --> 1684 <1> 1685 000051E7 50 <1> push ax 1686 000051E8 A0[B149] <1> mov al, [segmnt] ; segment number 1687 000051EB 98 <1> cbw 1688 000051EC D1E0 <1> shl ax, 1 1689 000051EE 93 <1> xchg ax, bx ; mov bx, ax 1690 000051EF 58 <1> pop ax 1691 000051F0 8BB7[1C4A] <1> mov si, word [segrgaddr + bx] 1692 <1> ; si = address of segment/selector reg 1693 000051F4 BF[BC0C] <1> mov di, reg_esi ; di = address of offset reg 1694 000051F7 E8F805 <1> call init_string_memref 1695 <1> @@: ; entry: set memref to string source and mark 1696 <1> ; (jump to .none afterwards if al is zero) 1697 000051FA 808F[5A49]60 <1> or byte [memrefs + bx + mrFlags], mrfString | mrfStringSource 1698 000051FF E8B205 <1> call calc_linear_memref_and_mark_nonfree 1699 <1> 1700 <1> .no_src: 1701 00005202 A828 <1> test al, PP_STRDEST | PP_STRSRC2 1702 00005204 7417 <1> jz .none 1703 00005206 BE[C80C] <1> mov si, reg_es ; si = address of segment/selector reg 1704 00005209 BF[C00C] <1> mov di, reg_edi ; di = address of offset reg 1705 0000520C E8E305 <1> call init_string_memref 1706 0000520F A808 <1> test al, PP_STRSRC2 ; alternative string source ? 1707 00005211 B000 <1> mov al, 0 ; (cause conditional branch to jump) 1708 00005213 75E5 <1> jnz @B ; yes, set as string source --> 1709 00005215 808F[5A49]A0 <1> or byte [memrefs + bx + mrFlags], mrfString | mrfStringDest 1710 0000521A E89705 <1> call calc_linear_memref_and_mark_nonfree 1711 <1> 1712 <1> .none: 1713 <1> 1714 <1> %if _SYMBOLIC 1715 <1> display_symbol_memrefs: 1716 <1> testopt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 1717 <1> jnz .none_memref 1718 <1> 1719 <1> mov cx, [memrefs.free] 1720 <1> test cx, cx 1721 <1> jz .none_memref 1722 <1> 1723 <1> xor si, si 1724 <1> .loop_memref: 1725 <1> push cx 1726 <1> push si 1727 <1> 1728 <1> mov bx, si 1729 <1> call get_memref_index_bx 1730 <1> mov ax, word [memrefs + bx + mrFlags] 1731 <1> mov dx, msg.memrefs_branchdirect 1732 <1> test al, mrfBranchDirect 1733 <1> jnz .gotmsg 1734 <1> 1735 <1> test byte [disflags], DIS_F_SHOW 1736 <1> jz .next_memref 1737 <1> 1738 <1> mov dx, msg.memrefs_stringsource 1739 <1> test al, mrfStringSource 1740 <1> jnz .gotmsg 1741 <1> mov dx, msg.memrefs_stringdest 1742 <1> test al, mrfStringDest 1743 <1> jnz .gotmsg 1744 <1> mov dl, al 1745 <1> and dl, mrfMemSource | mrfMemDest 1746 <1> cmp dl, mrfMemSource | mrfMemDest 1747 <1> mov dx, msg.memrefs_memsourcedest 1748 <1> je .gotmsg 1749 <1> mov dx, msg.memrefs_memsource 1750 <1> test al, mrfMemSource 1751 <1> jnz .gotmsg 1752 <1> mov dx, msg.memrefs_memdest 1753 <1> test al, mrfMemDest 1754 <1> jnz .gotmsg 1755 <1> mov dx, msg.memrefs_mem_unknown 1756 <1> test al, mrfMem 1757 <1> jnz .gotmsg 1758 <1> mov dx, msg.memrefs_unknown 1759 <1> .gotmsg: 1760 <1> 1761 <1> ; We do not call zz_detect_xms here because that is 1762 <1> ; already done unconditionally during the initialisation 1763 <1> ; of the function disasm. 1764 <1> 1765 <1> push dx 1766 <1> mov ax, [memrefs + bx + mrLinear] 1767 <1> mov dx, [memrefs + bx + mrLinear + 2] 1768 <1> 1769 <1> mov cx, dx 1770 <1> mov bx, ax 1771 <1> nearcall binsearchmain ; search for matching symbol 1772 <1> pop dx 1773 <1> jcxz .no_symbol 1774 <1> .loop_symbol: 1775 <1> call putsz 1776 <1> push bx 1777 <1> dualcall displaystring 1778 <1> push bx 1779 <1> push ax 1780 <1> dualcall getfarpointer.main 1781 <1> pop di 1782 <1> pop es 1783 <1> 1784 <1> pop si 1785 <1> push si 1786 <1> 1787 <1> push dx 1788 <1> 1789 <1> push bx 1790 <1> mov bx, si 1791 <1> call get_memref_index_bx 1792 <1> mov dx, word [memrefs + bx + mrOffset + 2] 1793 <1> mov ax, word [memrefs + bx + mrOffset] 1794 <1> 1795 <1> cmp dx, word [es:di + smOffset + 2] 1796 <1> mov dx, msg.memref_after_symbol.non_wrt 1797 <1> jne .wrt_symbol 1798 <1> cmp ax, word [es:di + smOffset] 1799 <1> je .non_wrt_symbol 1800 <1> .wrt_symbol: 1801 <1> mov dx, msg.memref_between_symbol.wrt 1802 <1> call disp_message 1803 <1> push ss 1804 <1> pop es 1805 <1> mov di, line_out 1806 <1> mov ax, word [memrefs + bx + mrSegmentSelector] 1807 <1> call hexword 1808 <1> push bx 1809 <1> push cx 1810 <1> call putsline 1811 <1> pop cx 1812 <1> pop bx 1813 <1> mov dx, msg.memref_after_symbol.wrt 1814 <1> .non_wrt_symbol: 1815 <1> call disp_message 1816 <1> 1817 <1> pop bx 1818 <1> pop dx 1819 <1> .next_symbol: 1820 <1> inc bx 1821 <1> loop .loop_symbol 1822 <1> 1823 <1> .no_symbol: 1824 <1> push ss 1825 <1> pop es 1826 <1> push ss 1827 <1> pop ds 1828 <1> 1829 <1> .next_memref: 1830 <1> pop si 1831 <1> pop cx 1832 <1> inc si 1833 <1> loop .loop_memref_j 1834 <1> jmp .none_memref 1835 <1> 1836 <1> .loop_memref_j: 1837 <1> jmp .loop_memref 1838 <1> 1839 <1> .none_memref: 1840 <1> %endif 1841 <1> 1842 <1> %if _DEBUG2 1843 <1> display_memrefs: 1844 <1> mov cx, [memrefs.free] 1845 <1> test cx, cx 1846 <1> jz .none 1847 <1> xor si, si 1848 <1> .loop: 1849 <1> mov bx, si 1850 <1> call get_memref_index_bx 1851 <1> mov ax, word [memrefs + bx + mrFlags] 1852 <1> mov dx, msg.memrefs_branchdirect 1853 <1> test al, mrfBranchDirect 1854 <1> jnz .gotmsg 1855 <1> mov dx, msg.memrefs_stringsource 1856 <1> test al, mrfStringSource 1857 <1> jnz .gotmsg 1858 <1> mov dx, msg.memrefs_stringdest 1859 <1> test al, mrfStringDest 1860 <1> jnz .gotmsg 1861 <1> mov dl, al 1862 <1> and dl, mrfMemSource | mrfMemDest 1863 <1> cmp dl, mrfMemSource | mrfMemDest 1864 <1> mov dx, msg.memrefs_memsourcedest 1865 <1> je .gotmsg 1866 <1> mov dx, msg.memrefs_memsource 1867 <1> test al, mrfMemSource 1868 <1> jnz .gotmsg 1869 <1> mov dx, msg.memrefs_memdest 1870 <1> test al, mrfMemDest 1871 <1> jnz .gotmsg 1872 <1> mov dx, msg.memrefs_mem_unknown 1873 <1> test al, mrfMem 1874 <1> jnz .gotmsg 1875 <1> mov dx, msg.memrefs_unknown 1876 <1> .gotmsg: 1877 <1> call putsz 1878 <1> 1879 <1> mov di, line_out 1880 <1> mov ax, word [memrefs + bx + mrSegmentSelector] 1881 <1> call hexword 1882 <1> push word [memrefs + bx + mrOffset] 1883 <1> mov al, ':' 1884 <1> stosb 1885 <1> %if 1 || _PM 1886 <1> mov ax, word [memrefs + bx + mrOffset + 2] 1887 <1> test byte [memrefs + bx + mrFlags], mrfA32 1888 <1> jz .16 1889 <1> call hexword 1890 <1> .16: 1891 <1> %endif 1892 <1> pop ax 1893 <1> call hexword 1894 <1> push si 1895 <1> push cx 1896 <1> mov si, msg.memrefs_length 1897 <1> call copy_single_counted_string 1898 <1> mov ax, word [memrefs + bx + mrLength + 2] 1899 <1> test ax, ax 1900 <1> jz @F 1901 <1> call hexword 1902 <1> @@: 1903 <1> mov ax, word [memrefs + bx + mrLength] 1904 <1> call hexword 1905 <1> call putsline_crlf 1906 <1> pop cx 1907 <1> pop si 1908 <1> 1909 <1> inc si 1910 <1> dec cx 1911 <1> jnz .loop 1912 <1> .none: 1913 <1> %endif ; _DEBUG2 1914 <1> %endif ; _MEMREF_AMOUNT 1915 <1> 1916 <1> 1917 <1> da_repeat: 1918 <1> %if _SYMBOLIC 1919 <1> testopt [internalflags3], dif3_nosymbols_1 | dif3_nosymbols_2 1920 <1> jnz .no_sym_between 1921 <1> 1922 <1> mov bx, word [u_addr + 4] 1923 <1> _386_PM_o32 1924 <1> mov dx, word [u_addr] 1925 <1> call getlinear_32bit 1926 <1> jc .no_sym_between 1927 <1> 1928 <1> ; push dx 1929 <1> push ax ; linear after instruction 1930 <1> 1931 <1> xchg dx, cx 1932 <1> xchg ax, bx 1933 <1> 1934 <1> sub bx, 1 1935 <1> sbb cx, 0 ; cx:bx = end of range 1936 <1> 1937 <1> mov dx, word [u_lin_start + 2] 1938 <1> mov ax, word [u_lin_start] 1939 <1> add ax, 1 1940 <1> adc dx, 0 ; dx:ax = start of range 1941 <1> 1942 <1> nearcall binsearchmain 1943 <1> pop ax 1944 <1> ; pop dx ; dx:ax = linear after instruction 1945 <1> jcxz .no_sym_between 1946 <1> 1947 <1> .loop_sym_between: 1948 <1> ; push dx 1949 <1> push ax 1950 <1> push bx 1951 <1> dualcall displaystring 1952 <1> pop ax 1953 <1> ; pop dx 1954 <1> 1955 <1> push bx 1956 <1> push ax ; (reserve space, uninitialised) 1957 <1> dualcall getfarpointer.main 1958 <1> pop di 1959 <1> pop es 1960 <1> 1961 <1> ; push dx 1962 <1> push ax 1963 <1> sub ax, word [es:di + smLinear] 1964 <1> ; sbb dx, word [es:di + smLinear + 2] 1965 <1> 1966 <1> ; push dx 1967 <1> push ax 1968 <1> xor dx, dx 1969 <1> add ax, word [es:di + smOffset] 1970 <1> adc dx, word [es:di + smOffset + 2] 1971 <1> cmp word [u_addr + 2], dx 1972 <1> mov dx, msg.uu_after_symbol_between_1.non_wrt 1973 <1> jne .sym_between.wrt 1974 <1> cmp word [u_addr], ax 1975 <1> je .sym_between.not_wrt 1976 <1> .sym_between.wrt: 1977 <1> mov dx, msg.uu_after_symbol_between_1.wrt 1978 <1> call disp_message 1979 <1> 1980 <1> push ss 1981 <1> pop es 1982 <1> mov di, line_out 1983 <1> mov ax, word [u_addr + 4] 1984 <1> call hexword 1985 <1> push bx 1986 <1> push cx 1987 <1> call putsline 1988 <1> pop cx 1989 <1> pop bx 1990 <1> 1991 <1> mov dx, msg.uu_after_symbol_between_2.wrt 1992 <1> .sym_between.not_wrt: 1993 <1> call disp_message 1994 <1> pop ax 1995 <1> ; pop dx 1996 <1> 1997 <1> push ss 1998 <1> pop es 1999 <1> push di 2000 <1> push bx 2001 <1> push cx 2002 <1> mov di, line_out 2003 <1> call decword 2004 <1> call putsline 2005 <1> pop cx 2006 <1> pop bx 2007 <1> pop di 2008 <1> pop ax 2009 <1> ; pop dx 2010 <1> 2011 <1> ; push dx 2012 <1> mov dx, msg.uu_after_symbol_between_3 2013 <1> call disp_message 2014 <1> ; pop dx 2015 <1> 2016 <1> inc bx 2017 <1> loop .loop_sym_between 2018 <1> .no_sym_between: 2019 <1> push ss 2020 <1> pop es 2021 <1> %endif 2022 <1> 2023 0000521D A0[BA49] <1> mov al, [disflags] 2024 <1> %if _IMMASM 2025 <1> testopt [internalflags6], dif6_immasm 2026 <1> jz .notimmasm 2027 <1> test al, DIS_I_UNUSED 2028 <1> jnz @F ; if " (unused)" was displayed --> 2029 <1> .notimmasm: 2030 <1> %endif 2031 00005220 A801 <1> test al, DIS_F_REPT 2032 00005222 7453 <1> jz @FF ; if not repeating --> 2033 00005224 A808 <1> test al, DIS_I_UNUSED 2034 00005226 7536 <1> jnz @F ; if " (unused)" was displayed --> 2035 00005228 A840 <1> test al, DIS_I_MOV_SS 2036 0000522A A1[A449] <1> mov ax, [index] 2037 0000522D 740C <1> jz .not_mov_to_ss ; not mov to ss --> 2038 <1> 2039 0000522F F606[E800]80 <1> testopt [asm_options], disasm_nec 2040 00005234 7528 <1> jnz @F ; allow mov from or to any segreg 2041 <1> ; DIS_I_MOV_SS is set, check for wo[index] == 8Eh; 2042 <1> ; as we only want to match move *to* ss, not from (8Ch). 2043 00005236 3D8E00 <1> cmp ax, 8Eh ; move to seg reg? 2044 00005239 7423 <1> je @F ; yes, it is mov to ss --> 2045 <1> .not_mov_to_ss: 2046 <1> 2047 0000523B 3DF802 <1> cmp ax, SGROUP4 + 0 ; pop r/m ? 2048 0000523E 7507 <1> jne .not_pop_rm 2049 00005240 803E[1641]C0 <1> cmp byte [regmem], 1100_0000b 2050 <1> ; long-form pop reg ? 2051 00005245 7317 <1> jae @F ; yes --> 2052 <1> .not_pop_rm: 2053 <1> 2054 00005247 84E4 <1> test ah, ah 2055 00005249 752D <1> jnz .not_single_byte_opcode 2056 <1> 2057 0000524B BF[4C4A] <1> mov di, single_byte_opcodes_repeat_disassembly 2058 0000524E B90F00 <1> mov cx, single_byte_opcodes_repeat_disassembly.length 2059 00005251 F606[E800]80 <1> testopt [asm_options], disasm_nec 2060 00005256 7402 <1> jz .not_nec 2061 <1> %if single_byte_opcodes_repeat_disassembly.length_nec == single_byte_opcodes_repeat_disassembly.length + 2 2063 00005258 41 <1> inc cx 2064 00005259 41 <1> inc cx 2065 <1> %else 2066 <1> mov cx, single_byte_opcodes_repeat_disassembly.length_nec 2067 <1> %endif 2068 <1> .not_nec: 2069 0000525A F2AE <1> repne scasb 2070 0000525C 751A <1> jne @FFF 2071 <1> @@: 2072 0000525E 8326[BA49]03 <1> and word [disflags], DIS_F_REPT|DIS_F_SHOW 2073 00005263 FE06[BD49] <1> inc byte [disrepeatcount] 2074 00005267 803E[BD49]10 <1> cmp byte [disrepeatcount], 16 2075 0000526C 7303E903F8 <1> jb disasm.preserve_disrepeatcount 2076 <1> 2077 00005271 BA[1E2A] <1> mov dx, msg.uu_too_many_repeat 2078 00005274 E83C4D <1> call putsz 2079 <1> @@: 2080 00005277 C3 <1> retn 2081 <1> 2082 <1> @@: 2083 <1> .not_single_byte_opcode: 2084 <1> 2085 00005278 8A3E[A349] <1> mov bh, byte [disp8] 2086 0000527C 3DEB00 <1> cmp ax, 0EBh ; unconditional short jump ? 2087 0000527F 74F6 <1> je @BB ; yes, return --> 2088 <1> _386_PM_o32 ; and dword [dis_n], byte 0 2089 00005281 8326[9C49]00 <1> and word [dis_n], byte 0 2090 00005286 E8F309 <1> call disgetbyte 2091 00005289 B302 <1> mov bl, 2 ; displacement to skip a jmp short 2092 0000528B 3CEB <1> cmp al, 0EBh ; jmp short ? 2093 0000528D 7406 <1> je @F ; yes --> 2094 0000528F B303 <1> mov bl, 3 ; displacement to skip a 16-bit jmp near 2095 00005291 3CE9 <1> cmp al, 0E9h ; jmp near ? 2096 00005293 75E2 <1> jne @BB ; no, return --> 2097 <1> %if _PM 2098 <1> %if _DISASM_32BIT 2099 <1> test byte [bCSAttr], 40h ; 32-bit code segment ? 2100 <1> jz @F ; no, 16-bit, use displacement 3 --> 2101 <1> mov bl, 5 ; displacement to skip a 32-bit jmp near 2102 <1> %endif 2103 <1> %endif 2104 <1> @@: 2105 00005295 38DF <1> cmp bh, bl ; right displacement ? 2106 00005297 75DE <1> jne @BBB ; no --> 2107 <1> 2108 00005299 8326[BA49]03 <1> and word [disflags], DIS_F_REPT|DIS_F_SHOW 2109 0000529E 8336[C049]04 <1> xor word [condmsg], (msg.condnotjump + DATASECTIONFIXUP) ^ (msg.condjump + DATASECTIONFIXUP) 2111 000052A3 E9D3F7 <1> jmp disasm.preserve_condmsg_and_disrepeatcount 2112 <1> 2113 <1> 2114 <1> %if _MEMREF_AMOUNT 2115 <1> simulate_rep_sca_cmp: 2116 <1> 2117 <1> ..@uu_simulate_scas_start: 2118 000052A6 67 <1> _386_a32 2119 <1> .repne_scasd: 2120 000052A7 66 <1> _386_o32 2121 000052A8 F2 <1> repne 2122 000052A9 AF <1> scasw 2123 000052AA C3 <1> retn 2124 <1> 2125 000052AB 67 <1> _386_a32 2126 <1> .repne_scasw: 2127 000052AC F2AF <1> repne scasw 2128 000052AE C3 <1> retn 2129 <1> 2130 000052AF 67 <1> _386_a32 2131 <1> .repne_scasb: 2132 000052B0 F2AE <1> repne scasb 2133 000052B2 C3 <1> retn 2134 <1> 2135 000052B3 67 <1> _386_a32 2136 <1> .repe_scasd: 2137 000052B4 66 <1> _386_o32 2138 000052B5 F3 <1> repe 2139 000052B6 AF <1> scasw 2140 000052B7 C3 <1> retn 2141 <1> 2142 000052B8 67 <1> _386_a32 2143 <1> .repe_scasw: 2144 000052B9 F3AF <1> repe scasw 2145 000052BB C3 <1> retn 2146 <1> 2147 000052BC 67 <1> _386_a32 2148 <1> .repe_scasb: 2149 000052BD F3AE <1> repe scasb 2150 000052BF C3 <1> retn 2151 <1> ..@uu_simulate_scas_end: 2152 <1> 2153 <1> ..@uu_simulate_cmps_start: 2154 000052C0 67 <1> _386_a32 2155 <1> .repne_cmpsd: 2156 000052C1 66 <1> _386_o32 2157 000052C2 F2 <1> repne 2158 000052C3 A7 <1> cmpsw 2159 000052C4 C3 <1> retn 2160 <1> 2161 000052C5 67 <1> _386_a32 2162 <1> .repne_cmpsw: 2163 000052C6 F2A7 <1> repne cmpsw 2164 000052C8 C3 <1> retn 2165 <1> 2166 000052C9 67 <1> _386_a32 2167 <1> .repne_cmpsb: 2168 000052CA F2A6 <1> repne cmpsb 2169 000052CC C3 <1> retn 2170 <1> 2171 000052CD 67 <1> _386_a32 2172 <1> .repe_cmpsd: 2173 000052CE 66 <1> _386_o32 2174 000052CF F3 <1> repe 2175 000052D0 A7 <1> cmpsw 2176 000052D1 C3 <1> retn 2177 <1> 2178 000052D2 67 <1> _386_a32 2179 <1> .repe_cmpsw: 2180 000052D3 F3A7 <1> repe cmpsw 2181 000052D5 C3 <1> retn 2182 <1> 2183 000052D6 67 <1> _386_a32 2184 <1> .repe_cmpsb: 2185 000052D7 F3A6 <1> repe cmpsb 2186 000052D9 C3 <1> retn 2187 <1> ..@uu_simulate_cmps_end: 2188 <1> 2189 <1> 2190 <1> usesection lDEBUG_DATA_ENTRY 2191 00004A5D 00 <1> align 2, db 0 2192 <1> .table: 2193 00004A5E [A752] <1> dw .repne_scasd 2194 00004A60 [AC52] <1> dw .repne_scasw 2195 00004A62 [B052] <1> dw .repne_scasb 2196 00004A64 [B052] <1> dw .repne_scasb 2197 00004A66 [C152] <1> dw .repne_cmpsd 2198 00004A68 [C652] <1> dw .repne_cmpsw 2199 00004A6A [CA52] <1> dw .repne_cmpsb 2200 00004A6C [CA52] <1> dw .repne_cmpsb 2201 <1> .table_repe_offset: equ $ - .table 2202 00004A6E [B452] <1> dw .repe_scasd 2203 00004A70 [B952] <1> dw .repe_scasw 2204 00004A72 [BD52] <1> dw .repe_scasb 2205 00004A74 [BD52] <1> dw .repe_scasb 2206 00004A76 [CE52] <1> dw .repe_cmpsd 2207 00004A78 [D352] <1> dw .repe_cmpsw 2208 00004A7A [D752] <1> dw .repe_cmpsb 2209 00004A7C [D752] <1> dw .repe_cmpsb 2210 <1> 2211 <1> usesection lDEBUG_CODE 2212 <1> %endif 2213 <1> 2214 <1> 2215 <1> ; Here are the routines for printing out the operands themselves. 2216 <1> ; Immediate data (OP_IMM) 2217 <1> 2218 <1> dop_imm: 2219 000052DA 80FC00 <1> cmp ah, 0 2220 000052DD 7C17 <1> jl dop03 ; if just a byte --> 2221 000052DF 9C <1> pushf 2222 000052E0 F606[BA49]10 <1> test byte [disflags], DIS_I_SHOWSIZ 2223 000052E5 7403 <1> jz .nosize ; if we don't need to show the size --> 2224 000052E7 E8BF08 <1> call showsize 2225 <1> .nosize: 2226 000052EA E8A509 <1> call disgetword 2227 <1> %if _IMMASM 2228 <1> mov word [immasm_imm16], ax 2229 <1> %endif 2230 000052ED 9D <1> popf ; ZF 2231 000052EE 7503E99747 <1> je hexword ; if just a word 2232 000052F3 E9FF08 <1> jmp disp32.ax 2233 <1> 2234 <1> dop03: 2235 000052F6 E88309 <1> call disgetbyte ; print immediate byte 2236 000052F9 E99547 <1> jmp hexbyte 2237 <1> 2238 <1> 2239 <1> ; Memory offset reference (OP_MOFFS) 2240 <1> 2241 <1> dop_moffs: 2242 000052FC B005 <1> mov al, 5 2243 <1> %if _DISASM_32BIT 2244 000052FE F606[A049]20 <1> test byte [presizeflags], PRE32A 2245 00005303 7501 <1> jnz .32 ; if 32-bit addressing --> 2246 <1> %endif 2247 00005305 40 <1> inc ax 2248 <1> .32: 2249 00005306 A2[1641] <1> mov [regmem], al 2250 00005309 EB13 <1> jmp s dop05 2251 <1> 2252 <1> 2253 <1> ; MOD R/M (OP_RM) 2254 <1> 2255 <1> dop_rm: 2256 0000530B E8E507 <1> call getregmem 2257 0000530E 3CC0 <1> cmp al,0c0h 2258 00005310 7203E94802 <1> jae dop33 ; if pure register reference --> 2259 <1> 2260 00005315 F606[BB49]40 <1> testopt [disflags], DIS_I_M_ALWAYS_16 2261 0000531A 7402 <1> jz @F 2262 0000531C B400 <1> mov ah, 0 ; word size (m16) 2263 <1> @@: 2264 <1> 2265 <1> dop05: ; <--- used by OP_M, OP_M64, OP_M80, OP_MOFFS 2266 0000531E 8826[B049] <1> mov byte [rmsize], ah ; save r/m size 2267 00005322 F606[BB49]01 <1> testopt [disflags], DIS_I_NOSIZ 2268 00005327 7506 <1> jnz @F 2269 00005329 E87D08 <1> call showsize ; print out size 2270 0000532C E8B108 <1> call showptr ; append "PTR " (if not NASM syntax) 2271 <1> @@: 2272 <1> dop06: ; <--- used by OP_MXX, OP_MFLOAT, OP_MDOUBLE 2273 0000532F 800E[A149]01 <1> or byte [preused],PRESEG ; needed even if there's no segment override 2274 <1> ; because handling of LOCK prefix relies on it 2275 00005334 B05B <1> mov al, '[' 2276 00005336 E80202 <1> call stosb_nasm 2277 <1> 2278 00005339 F606[A049]01 <1> test byte [preflags],PRESEG 2279 0000533E 7406 <1> jz dop07 ;if no segment override 2280 00005340 E85E08 <1> call showseg ;print segment name 2281 00005343 B03A <1> mov al,':' 2282 00005345 AA <1> stosb 2283 <1> dop07: 2284 00005346 A0[1641] <1> mov al,[regmem] 2285 00005349 24C7 <1> and al,0c7h 2286 0000534B 800E[A149]20 <1> or byte [preused],PREASIZE 2287 <1> %if _DISASM_32BIT 2288 00005350 F606[A049]20 <1> test byte [presizeflags],PRE32A 2289 00005355 7403E9AF00 <1> jnz dop18 ;if 32-bit addressing 2290 <1> %endif 2291 0000535A 800E[BA49]04 <1> or byte [disflags],DIS_I_SHOW ;we'd like to show this address 2292 0000535F 8326[B449]00 <1> and word [addrr], 0 ; zero out the address initially 2293 00005364 93 <1> xchg ax,bx ;mov bx,ax 2294 00005365 E8C601 <1> call store_opensqubracket 2295 00005368 80FB06 <1> cmp bl,6 2296 0000536B 7503E98B00 <1> je dop16 ;if [xxxx] 2297 00005370 83E307 <1> and bx,7 2298 00005373 8A9F[CE49] <1> mov bl,[rmtab+bx] 2299 00005377 F6C308 <1> test bl,8 2300 0000537A 7525 <1> jnz dop09 ;if BX 2301 0000537C F6C304 <1> test bl,4 2302 0000537F 7436 <1> jz dop11 ;if not BP 2303 00005381 B84250 <1> mov ax,'BP' 2304 00005384 8B0E[B80C] <1> mov cx,[reg_ebp] 2305 00005388 E80A00 <1> call da_set_default_ss 2306 0000538B EB1B <1> jmp dop10 2307 <1> 2308 <1> 2309 <1> ; INP: al = 2 * register number 2310 <1> ; [preflags] & PRESEG set if segment overridden 2311 <1> ; else, 2312 <1> ; byte [segmnt] = initialised to 3 (ds) 2313 <1> ; OUT: no action if register number not for esp or ebp 2314 <1> ; no action if segment overridden 2315 <1> ; otherwise, 2316 <1> ; byte [segmnt] -= 1, resulting in 2 (ss) 2317 <1> da_set_default_ss_if_esp_ebp: 2318 0000538D 3C08 <1> cmp al, 2 * 4 2319 0000538F 7404 <1> je @F 2320 00005391 3C0A <1> cmp al, 2 * 5 2321 00005393 750B <1> jne @FF 2322 <1> @@: 2323 <1> da_set_default_ss: 2324 00005395 F606[A049]01 <1> test byte [preflags], PRESEG 2325 0000539A 7504 <1> jnz @F ; if segment override --> 2326 0000539C FE0E[B149] <1> dec byte [segmnt] ; default is now SS 2327 <1> @@: 2328 000053A0 C3 <1> retn 2329 <1> 2330 <1> 2331 <1> dop09: 2332 000053A1 B84258 <1> mov ax,'BX' ;BX 2333 000053A4 8B0E[A80C] <1> mov cx,[reg_ebx] 2334 <1> 2335 <1> dop10: 2336 000053A8 890E[B449] <1> mov [addrr],cx ;print it out, etc. 2337 000053AC E8F507 <1> call dis_stosw_lowercase 2338 000053AF F6C303 <1> test bl,2+1 2339 000053B2 741C <1> jz dop13 ;if done 2340 000053B4 B02B <1> mov al,'+' 2341 000053B6 AA <1> stosb 2342 <1> dop11: 2343 000053B7 B85349 <1> mov ax,'SI' 2344 000053BA 8B0E[BC0C] <1> mov cx,[reg_esi] 2345 000053BE F6C301 <1> test bl,1 2346 000053C1 7406 <1> jz dop12 ;if SI 2347 000053C3 B044 <1> mov al,'D' ;DI 2348 000053C5 8B0E[C00C] <1> mov cx,[reg_edi] 2349 <1> 2350 <1> dop12: 2351 000053C9 010E[B449] <1> add [addrr], cx ; print it out, etc. 2352 000053CD E8D407 <1> call dis_stosw_lowercase 2353 <1> dop13: 2354 000053D0 F606[1641]C0 <1> test byte [regmem], 0C0h 2355 000053D5 742E <1> jz s dop17 ; if no displacement --> 2356 000053D7 F606[1641]80 <1> test byte [regmem], 80h 2357 000053DC 751A <1> jnz dop15 ; if word displacement --> 2358 000053DE E89B08 <1> call disgetbyte 2359 000053E1 98 <1> cbw 2360 000053E2 0106[B449] <1> add [addrr], ax 2361 000053E6 3C00 <1> cmp al, 0 2362 000053E8 B42B <1> mov ah, '+' 2363 000053EA 7D04 <1> jge dop14 ; if not negative --> 2364 000053EC B42D <1> mov ah, '-' 2365 000053EE F6D8 <1> neg al 2366 <1> dop14: 2367 000053F0 8825 <1> mov [di], ah 2368 000053F2 47 <1> inc di 2369 000053F3 E89B46 <1> call hexbyte ; print the byte displacement 2370 000053F6 EB0D <1> jmp s dop17 ; done --> 2371 <1> 2372 <1> dop15: 2373 000053F8 B02B <1> mov al, '+' 2374 000053FA AA <1> stosb 2375 <1> dop16: 2376 000053FB E89408 <1> call disgetword 2377 000053FE 0106[B449] <1> add [addrr], ax 2378 00005402 E88546 <1> call hexword ; print word displacement 2379 <1> 2380 <1> dop17: 2381 00005405 B05D <1> mov al, ']' 2382 00005407 AA <1> stosb 2383 00005408 C3 <1> retn 2384 <1> 2385 <1> %if _DISASM_32BIT 2386 <1> ; 32-bit MOD REG R/M addressing. 2387 <1> 2388 <1> dop18: 2389 00005409 810E[BA49]0408 <1> or word [disflags], DIS_I_SHOW | DIS_I_SHOW_A32 2390 0000540F 8326[B449]00 <1> and word [addrr], 0 2391 00005414 8326[B649]00 <1> and word [addrr + 2], 0 ; zero out the address initially 2392 00005419 3C05 <1> cmp al, 5 ; mod=0 and r/m=5 ? 2393 0000541B 7503E98200 <1> je dop19 ; yes, just a disp32 address --> 2394 00005420 50 <1> push ax 2395 00005421 2407 <1> and al, 7 2396 00005423 3C04 <1> cmp al, 4 2397 00005425 7506 <1> jne dop20 ; if no SIB --> 2398 00005427 E85208 <1> call disgetbyte ; get and save it 2399 0000542A A2[1741] <1> mov [sibbyte], al 2400 <1> dop20: 2401 0000542D 58 <1> pop ax 2402 0000542E A880 <1> test al, 80h 2403 00005430 7538 <1> jnz dop22 ; if disp32 --> 2404 00005432 A840 <1> test al, 40h 2405 00005434 743A <1> jz dop23 ; if no disp8 --> 2406 00005436 E84308 <1> call disgetbyte 2407 <1> 2408 00005439 98 <1> cbw 2409 0000543A 99 <1> cwd 2410 0000543B 0106[B449] <1> add word [addrr], ax 2411 0000543F 1116[B649] <1> adc word [addrr + 2], dx 2412 <1> 2413 00005443 3C00 <1> cmp al, 0 2414 00005445 7D06 <1> jge dop21 ; if not negative --> 2415 00005447 F6D8 <1> neg al 2416 00005449 C6052D <1> mov byte [di], '-' 2417 0000544C 47 <1> inc di 2418 <1> dop21: 2419 0000544D E84146 <1> call hexbyte 2420 00005450 EB1B <1> jmp s dop22a ; done --> 2421 <1> 2422 <1> disp32_add_to_addrr: 2423 00005452 E83D08 <1> call disgetword 2424 00005455 0106[B449] <1> add word [addrr], ax 2425 00005459 50 <1> push ax 2426 0000545A 9C <1> pushf 2427 0000545B E83408 <1> call disgetword 2428 0000545E 9D <1> popf 2429 0000545F 1106[B649] <1> adc word [addrr + 2], ax 2430 00005463 E82446 <1> call hexword 2431 00005466 58 <1> pop ax 2432 00005467 E92046 <1> jmp hexword 2433 <1> 2434 <1> dop22: 2435 0000546A E8E5FF <1> call disp32_add_to_addrr 2436 <1> ; print disp32 2437 <1> 2438 <1> dop22a: 2439 0000546D E8C900 <1> call store_plus 2440 <1> 2441 <1> dop23: 2442 00005470 A0[1641] <1> mov al,[regmem] 2443 00005473 2407 <1> and al,7 2444 00005475 3C04 <1> cmp al,4 2445 00005477 7403E99800 <1> jne dop28 ;if no SIB 2446 0000547C A0[1741] <1> mov al, [sibbyte] 2447 0000547F 88C4 <1> mov ah, al 2448 00005481 250738 <1> and ax, 00_111_000_00_000_111b 2449 <1> ; ah = index << 3, al = base 2450 00005484 80FC20 <1> cmp ah, 4 << 3 ; index encodes esp ? 2451 00005487 7414 <1> je dop_sib_index_4 ; yes, use base only --> 2452 <1> ; When this branch is taken, the scale is ignored. 2453 <1> ; This is typically used only for encoding [esp] 2454 <1> ; and [esp + x] but is a valid encoding even for 2455 <1> ; other base registers. So better support it. 2456 <1> ; (This used to be a special case for SIB == 24h 2457 <1> ; only because it doesn't usually occur else. 2458 <1> ; The other cases were rejected in dop25.) 2459 <1> 2460 00005489 E80700 <1> call dop_is_mod_0_and_base_5 2461 0000548C 7539 <1> jnz dop24 ; if not mod=0 base=5 --> 2462 0000548E E8C1FF <1> call disp32_add_to_addrr; show 32-bit displacement instead of [EBP] 2463 00005491 EB45 <1> jmp dop25 ; and handle the scale and index --> 2464 <1> 2465 <1> 2466 <1> ; INP: al = low 3 bits of SIB byte (= base) 2467 <1> ; byte [regmem] = ModR/M byte 2468 <1> ; OUT: NZ if not mod=0 base=5 special case 2469 <1> ; ZR else 2470 <1> ; REM: base=5 usually encodes [ebp], and mod=0 2471 <1> ; usually encodes no displacement field. 2472 <1> ; If both are true however, then the 2473 <1> ; special case is true: there is no base 2474 <1> ; register and a 32-bit displacement. 2475 <1> dop_is_mod_0_and_base_5: 2476 00005493 3C05 <1> cmp al, 5 2477 00005495 7505 <1> jne @F ; NZ if not base=5 --> 2478 00005497 F606[1641]C0 <1> test byte [regmem], 1100_0000b 2479 <1> ; NZ if not mod=0 2480 <1> @@: 2481 0000549C C3 <1> retn 2482 <1> 2483 <1> 2484 <1> dop_sib_index_4: 2485 <1> ; The mod=0 base=5 special case and the 2486 <1> ; index=4 special case can occur both 2487 <1> ; together. That is a SIB encoding of 2488 <1> ; a 32-bit displacement without any 2489 <1> ; index or base registers. 2490 <1> ; 2491 <1> ; This was noted on stackoverflow.com by 2492 <1> ; Peter Cordes: "x86-32 has 2 redundant 2493 <1> ; ways to encode [0x123456], i.e. no-base 2494 <1> ; + disp32: with or without a SIB byte, 2495 <1> ; because SIB has an encoding for no-base 2496 <1> ; and no-index." (There is a use for this 2497 <1> ; distinction and thus the SIB form only 2498 <1> ; in 64-bit mode but it is accepted as a 2499 <1> ; valid alternative encoding even for us.) 2500 <1> ; 2501 <1> ; - https://stackoverflow.com/questions/48124293/can-rip-be-used-with-another-register-with-rip-relative-addressing/48125453#48125453 2502 0000549D E8F3FF <1> call dop_is_mod_0_and_base_5 2503 000054A0 7572 <1> jnz dop28 ; if not mod=0 base=5 --> 2504 <1> ; fall through to dop19 2505 <1> 2506 <1> dop19: 2507 000054A2 E88900 <1> call store_opensqubracket 2508 000054A5 E8AAFF <1> call disp32_add_to_addrr 2509 <1> ; display 32-bit offset 2510 <1> dop17_j1: 2511 000054A8 E95AFF <1> jmp dop17 2512 <1> 2513 <1> add_reg32_to_addrr: 2514 000054AB B90100 <1> mov cx, 1 2515 <1> add_reg32_times_cx_to_addrr: 2516 000054AE 50 <1> push ax 2517 000054AF 53 <1> push bx 2518 000054B0 93 <1> xchg ax, bx 2519 000054B1 8B9F[0C4A] <1> mov bx, word [reg32addr + bx] 2520 <1> @@: 2521 000054B5 8B07 <1> mov ax, word [bx] 2522 000054B7 0106[B449] <1> add word [addrr], ax 2523 000054BB 8B4702 <1> mov ax, word [bx + 2] 2524 000054BE 1106[B649] <1> adc word [addrr + 2], ax 2525 000054C2 E2F1 <1> loop @B 2526 000054C4 5B <1> pop bx 2527 000054C5 58 <1> pop ax 2528 000054C6 C3 <1> retn 2529 <1> 2530 <1> dop24: 2531 000054C7 E85800 <1> call store_opensqubracket_e 2532 000054CA E83307 <1> call showreg16 ; show 16-bit register name (number in AL) 2533 000054CD E8BDFE <1> call da_set_default_ss_if_esp_ebp 2534 000054D0 E8D8FF <1> call add_reg32_to_addrr 2535 000054D3 B05D <1> mov al, ']' 2536 000054D5 E85800 <1> call stosb_notnasm 2537 <1> dop25: 2538 000054D8 E85E00 <1> call store_plus 2539 <1> 2540 000054DB A0[1741] <1> mov al, [sibbyte] 2541 000054DE E80B06 <1> call da_get_bits_3_to_5 ; al = index 2542 <1> ; (In dop23 we already checked this is not = 4 2543 <1> ; which is a special escaping encoding.) 2544 <1> 2545 000054E1 E83E00 <1> call store_opensqubracket_e 2546 <1> 2547 000054E4 8A26[1741] <1> mov ah, [sibbyte] 2548 000054E8 B90100 <1> mov cx, 1 2549 000054EB F6C4C0 <1> test ah, 0C0h 2550 000054EE 740F <1> jz @F 2551 000054F0 41 <1> inc cx 2552 000054F1 F6C480 <1> test ah, 80h 2553 000054F4 7409 <1> jz @F 2554 000054F6 B104 <1> mov cl, 4 2555 000054F8 F6C440 <1> test ah, 40h 2556 000054FB 7402 <1> jz @F 2557 000054FD B108 <1> mov cl, 8 2558 <1> @@: 2559 <1> 2560 000054FF E8FE06 <1> call showreg16 2561 00005502 51 <1> push cx 2562 00005503 E8A8FF <1> call add_reg32_times_cx_to_addrr 2563 00005506 59 <1> pop cx 2564 00005507 49 <1> dec cx ; = 0-based scale 2565 00005508 7408 <1> jz dop27 ; if scale == 1 (S=00b) --> 2566 0000550A B02A <1> mov al, '*' 2567 0000550C AA <1> stosb 2568 0000550D 88C8 <1> mov al, cl 2569 0000550F 0431 <1> add al, '1' ; from 0-based to '1'-based 2570 <1> dop26: 2571 00005511 AA <1> stosb 2572 <1> dop27: 2573 <1> dop17_j2: 2574 00005512 EB94 <1> jmp s dop17_j1 2575 <1> 2576 <1> ; 32-bit addressing without SIB 2577 <1> 2578 <1> dop28: 2579 00005514 E80B00 <1> call store_opensqubracket_e 2580 00005517 E8E606 <1> call showreg16 2581 0000551A E870FE <1> call da_set_default_ss_if_esp_ebp 2582 0000551D E88BFF <1> call add_reg32_to_addrr 2583 00005520 EBF0 <1> jmp short dop27 2584 <1> 2585 <1> ; Store '[' if not NASM syntax, 2586 <1> ; then (regardless of syntax) store 'E' 2587 <1> ; INP: di-> buffer 2588 <1> ; OUT: di-> behind "[E" or 'E' 2589 <1> ; CHG: - 2590 <1> ; 2591 <1> ; The 'E' is lowercased if that option is selected. 2592 <1> store_opensqubracket_e: 2593 00005522 50 <1> push ax 2594 00005523 E80800 <1> call store_opensqubracket 2595 00005526 B045 <1> mov al, 'E' 2596 00005528 E8E505 <1> call dis_lowercase 2597 0000552B AA <1> stosb 2598 0000552C 58 <1> pop ax 2599 0000552D C3 <1> retn 2600 <1> %endif 2601 <1> 2602 <1> ; Store '[' if not NASM syntax 2603 <1> ; INP: di-> buffer 2604 <1> ; OUT: di-> behind '[' if not NASM syntax 2605 <1> ; CHG: al 2606 <1> store_opensqubracket: 2607 0000552E B05B <1> mov al, '[' 2608 <1> 2609 <1> ; Store al if not NASM syntax 2610 <1> ; INP: di-> buffer 2611 <1> ; OUT: di-> behind stored byte if not NASM syntax 2612 <1> ; CHG: - 2613 <1> stosb_notnasm: 2614 00005530 F606[E800]04 <1> testopt [asm_options], disasm_nasm 2615 00005535 7501 <1> jnz .ret 2616 00005537 AA <1> stosb 2617 00005538 C3 <1> .ret: retn 2618 <1> 2619 <1> ; Store '+' if NASM syntax 2620 <1> ; INP: di-> buffer 2621 <1> ; OUT: di-> behind '+' if NASM syntax 2622 <1> ; CHG: al 2623 <1> store_plus: 2624 00005539 B02B <1> mov al, '+' 2625 <1> 2626 <1> ; Store al if NASM syntax 2627 <1> ; INP: di-> buffer 2628 <1> ; OUT: di-> behind stored byte if NASM syntax 2629 <1> ; CHG: - 2630 <1> stosb_nasm: 2631 0000553B F606[E800]04 <1> testopt [asm_options], disasm_nasm 2632 00005540 7401 <1> jz .ret 2633 00005542 AA <1> stosb 2634 00005543 C3 <1> .ret: retn 2635 <1> 2636 <1> 2637 <1> ; Memory-only reference (OP_M) 2638 <1> 2639 <1> dop_m: 2640 00005544 E8AC05 <1> call getregmem 2641 00005547 3CC0 <1> cmp al, 0C0h 2642 00005549 7303E9D0FD <1> jb dop05 ; if it's what we expect --> 2643 <1> 2644 <1> ; it's a register reference 2645 0000554E E94005 <1> disbad1:jmp disbad ; this is not supposed to happen --> 2646 <1> 2647 <1> ; Register reference from MOD R/M part (OP_R_MOD) 2648 <1> 2649 <1> dop_r_mod: 2650 00005551 E89F05 <1> call getregmem 2651 00005554 3CC0 <1> cmp al,0c0h 2652 00005556 72F6 <1> jb disbad1 ;if it's a memory reference 2653 00005558 EB03 <1> jmp s dop33 2654 <1> 2655 <1> ; Pure register reference (OP_R) 2656 <1> 2657 <1> dop_r: 2658 0000555A E88C05 <1> call getregmem_r 2659 <1> 2660 <1> dop33: ; <--- used by OP_RM, OP_R_MOD and OP_R_ADD 2661 0000555D 2407 <1> and al,7 ;entry point for regs from MOD R/M, and others 2662 0000555F 8A0E[BC49] <1> mov cl,[disflags2] 2663 00005563 080E[BA49] <1> or [disflags],cl ;if it was variable size operand, the size 2664 <1> ;should now be marked as known. 2665 00005567 80FC00 <1> cmp ah,0 2666 0000556A 7C11 <1> jl dop35 ;if byte register 2667 0000556C 740D <1> jz dop34 ;if word register 2668 <1> dop33a: 2669 0000556E 80FC20 <1> cmp ah, 20h ; qword register (MMX) ? 2670 00005571 7415 <1> je dop35_1 ; --> 2671 00005573 50 <1> push ax 2672 00005574 B045 <1> mov al, 'E' 2673 00005576 E89705 <1> call dis_lowercase 2674 00005579 AA <1> stosb 2675 0000557A 58 <1> pop ax 2676 <1> ;mov byte [di],'E' ;enter here from OP_ECX 2677 <1> ;inc di 2678 <1> dop34: 2679 0000557B 0408 <1> add al,8 2680 <1> dop35: 2681 0000557D 98 <1> cbw 2682 0000557E D1E0 <1> shl ax,1 2683 00005580 93 <1> xchg ax,bx ;mov bx,ax 2684 00005581 8B87[D649] <1> mov ax,[rgnam816+bx];get the register name 2685 00005585 E91C06 <1> jmp dis_stosw_lowercase 2686 <1> 2687 <1> dop35_1: 2688 00005588 50 <1> push ax 2689 00005589 B84D4D <1> mov ax, "MM" 2690 0000558C E81506 <1> call dis_stosw_lowercase 2691 0000558F 58 <1> pop ax 2692 00005590 0430 <1> add al, '0' 2693 00005592 AA <1> stosb 2694 00005593 C3 <1> retn 2695 <1> 2696 <1> ; Register number embedded in the instruction (OP_R_ADD) 2697 <1> 2698 <1> dop_r_add: 2699 00005594 A0[A249] <1> mov al,[instru] 2700 00005597 EBC4 <1> jmp s dop33 2701 <1> 2702 <1> ; AL or AX or EAX (OP_AX) 2703 <1> 2704 <1> dop_ax: 2705 00005599 B000 <1> mov al,0 2706 0000559B EBC0 <1> jmp s dop33 2707 <1> 2708 <1> ; QWORD mem (OP_M64) 2709 <1> ; This operand type is used by CMPXCHG8B, FILD and FISTP. 2710 <1> dop_m64: 2711 <1> ;mov ax, 'Q' ; print "QWORD" 2712 0000559D B420 <1> mov ah, 20h ; size QWORD 2713 0000559F EB35 <1> jmp s dop40 2714 <1> 2715 <1> ; FLOAT (=REAL4) mem (OP_MFLOAT) 2716 <1> dop_mfloat: 2717 000055A1 B8464C <1> mov ax, "FL" 2718 000055A4 E8FD05 <1> call dis_stosw_lowercase 2719 000055A7 B84F41 <1> mov ax, "OA" 2720 000055AA E8F705 <1> call dis_stosw_lowercase 2721 000055AD B85420 <1> mov ax, "T " 2722 000055B0 EB15 <1> jmp short dop38c 2723 <1> 2724 <1> ; DOUBLE (=REAL8) mem (OP_MDOUBLE). 2725 <1> 2726 <1> dop_mdouble: 2727 000055B2 B8444F <1> mov ax, "DO" 2728 000055B5 E8EC05 <1> call dis_stosw_lowercase 2729 000055B8 B85542 <1> mov ax, "UB" 2730 000055BB E8E605 <1> call dis_stosw_lowercase 2731 000055BE B04C <1> mov al, 'L' 2732 000055C0 E84D05 <1> call dis_lowercase 2733 000055C3 AA <1> stosb 2734 000055C4 B84520 <1> mov ax, "E " 2735 <1> dop38c: 2736 000055C7 E8DA05 <1> call dis_stosw_lowercase 2737 000055CA E81306 <1> call showptr 2738 000055CD EB1B <1> jmp s dop42a 2739 <1> 2740 <1> ; TBYTE (=REAL10) mem (OP_M80). 2741 <1> 2742 <1> dop_m80: 2743 000055CF B854FF <1> mov ax,0FF00h+'T' ;print 'T' + "BYTE" 2744 000055D2 E83B05 <1> call dis_lowercase 2745 000055D5 AA <1> stosb 2746 <1> dop40: 2747 000055D6 E81A05 <1> call getregmem 2748 000055D9 3CC0 <1> cmp al,0c0h 2749 000055DB 7317 <1> jae disbad5 ; if it's a register reference 2750 000055DD 800E[BA49]80 <1> or byte [disflags], DIS_I_DONTSHOW 2751 <1> ; don't show this 2752 000055E2 E939FD <1> jmp dop05 2753 <1> 2754 <1> %if 0 2755 <1> ; Far memory (OP_FARMEM). 2756 <1> ; This is either a FAR16 (DWORD) or FAR32 (FWORD) pointer. 2757 <1> dop_farmem: 2758 <1> call dischk32d 2759 <1> jz dop41a ; if not dword far 2760 <1> call showdword 2761 <1> dop41a: 2762 <1> mov ax, "FA" ; store "FAR " 2763 <1> call dis_stosw_lowercase 2764 <1> mov ax, "R " 2765 <1> call dis_stosw_lowercase 2766 <1> %endif 2767 <1> 2768 <1> ; mem (OP_MXX). 2769 <1> 2770 <1> dop_mxx: 2771 000055E5 800E[BA49]80 <1> or byte [disflags], DIS_I_DONTSHOW 2772 <1> ; don't show this 2773 <1> dop42a: 2774 000055EA E80605 <1> call getregmem 2775 000055ED 3CC0 <1> cmp al,0c0h 2776 000055EF 7303E93BFD <1> jb dop06 ; mem ref, don't show size --> 2777 <1> disbad5: 2778 000055F4 E99A04 <1> jmp disbad 2779 <1> 2780 <1> ; Far immediate (OP_FARP). Either FAR16 or FAR32. 2781 <1> dop_farimm: 2782 000055F7 E89806 <1> call disgetword 2783 000055FA 50 <1> push ax 2784 <1> %if _DISASM_32BIT 2785 000055FB E81106 <1> call dischk32d 2786 000055FE 7409 <1> jz dop44_word ; if not 32-bit address 2787 <1> 2788 <1> dop44_dword: 2789 <1> %if _PM 2790 <1> test byte [bCSAttr],40h ; for 16-bit code segments 2791 <1> jnz @F ; no need to display "WORD " 2792 <1> %endif 2793 00005600 E8C505 <1> call showdword 2794 <1> @@: 2795 <1> 2796 00005603 E88C06 <1> call disgetword 2797 00005606 50 <1> push ax 2798 00005607 EB00 <1> jmp dop44_common 2799 <1> %endif 2800 <1> 2801 <1> dop44_word: 2802 <1> %if _PM 2803 <1> %if _DISASM_32BIT 2804 <1> test byte [bCSAttr],40h ; for 32-bit code segments 2805 <1> jz @F ; no need to display "DWORD " 2806 <1> call showword 2807 <1> @@: 2808 <1> %endif 2809 <1> %endif 2810 <1> 2811 <1> dop44_common: 2812 00005609 E88606 <1> call disgetword 2813 <1> %if _MEMREF_AMOUNT 2814 0000560C E88A01 <1> call get_free_memref 2815 0000560F 8987[5849] <1> mov word [memrefs + bx + mrSegmentSelector], ax 2816 <1> %endif 2817 00005613 E87444 <1> call hexword 2818 <1> %if _IMMASM 2819 <1> mov word [immasm_far_target + 4], ax 2820 <1> xor ax, ax 2821 <1> mov word [immasm_far_target + 2], ax 2822 <1> %endif 2823 00005616 B03A <1> mov al,':' 2824 00005618 AA <1> stosb 2825 <1> %if _DISASM_32BIT 2826 00005619 E8F305 <1> call dischk32d 2827 0000561C 740D <1> jz dop45 ;if not 32-bit address 2828 0000561E 58 <1> pop ax 2829 <1> %if _IMMASM 2830 <1> mov word [immasm_far_target + 2], ax 2831 <1> %endif 2832 <1> %if _MEMREF_AMOUNT 2833 0000561F 8987[5649] <1> mov word [memrefs + bx + mrOffset + 2], ax 2834 00005623 808F[5A49]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 2835 <1> %endif 2836 00005628 E85F44 <1> call hexword 2837 <1> dop45: 2838 <1> %endif 2839 0000562B 58 <1> pop ax 2840 <1> %if _IMMASM 2841 <1> mov word [immasm_far_target], ax 2842 <1> %endif 2843 <1> %if _MEMREF_AMOUNT 2844 0000562C 8987[5449] <1> mov word [memrefs + bx + mrOffset], ax 2845 00005630 808F[5A49]01 <1> or byte [memrefs + bx + mrFlags], mrfBranchDirect 2846 00005635 E87C01 <1> call calc_linear_memref_and_mark_nonfree 2847 <1> %endif 2848 00005638 E94F44 <1> jmp hexword 2849 <1> 2850 <1> 2851 <1> %if _COND 2852 <1> ; INP: [presizeflags] & PRE32A, d[reg_ecx] 2853 <1> ; OUT: dx:ax = (e)cx 2854 <1> cond_get_ecx: 2855 0000563B A1[AC0C] <1> mov ax, word [reg_ecx] 2856 <1> %if _DISASM_32BIT 2857 0000563E F606[A049]20 <1> test byte [presizeflags], PRE32A ; A32 ? 2858 00005643 8B16[AE0C] <1> mov dx, word [reg_ecx+2] 2859 00005647 7502 <1> jnz .ecx 2860 <1> %endif 2861 00005649 31D2 <1> xor dx, dx 2862 <1> .ecx: 2863 0000564B C3 <1> retn 2864 <1> 2865 <1> ; INP: ax = 0..15 condition code, else invalid 2866 <1> ; OUT: w[condmsg] set as appropriate 2867 <1> cond_handle: 2868 0000564C 83F80F <1> cmp ax, 15 2869 0000564F 7738 <1> ja .return 2870 00005651 8B0E[E00C] <1> mov cx, word [reg_efl] ; get flags 2871 00005655 89C3 <1> mov bx, ax 2872 00005657 80E3FE <1> and bl, ~1 ; make even 2873 0000565A 2401 <1> and al, 1 ; 1 if negated condition 2874 0000565C 80FB0C <1> cmp bl, 12 ; L/GE or LE/G? 2875 0000565F 7306 <1> jae .specific ; yes --> 2876 <1> 2877 00005661 858F[404A] <1> test cx, [cond_table+bx]; flag(s) set ? 2878 00005665 EB14 <1> jmp short .jump_ZF ; NZ if (normal) condition true --> 2879 <1> 2880 <1> .specific: 2881 00005667 80FB0E <1> cmp bl, 14 2882 0000566A 7205 <1> jb .L_GE 2883 <1> 2884 <1> ; Handle LE/NG and G/NLE conditions. 2885 <1> ; The former says ZF | (OF ^ SF). 2886 <1> .LE_G: 2887 0000566C F6C140 <1> test cl, 40h ; ZF | .. 2888 0000566F 750C <1> jnz .jump_true 2889 <1> 2890 <1> ; Handle L/NGE and GE/NL conditions. 2891 <1> ; The former says OF ^ SF. 2892 <1> .L_GE: 2893 00005671 81E18008 <1> and cx, 880h ; OF ^ SF 2894 00005675 7408 <1> jz .jump_false ; both clear --> 2895 00005677 81F18008 <1> xor cx, 880h 2896 <1> .jump_ZF: 2897 0000567B 7402 <1> jz .jump_false ; both set --> (or ZR: (normal) condition false) 2898 <1> .jump_true: 2899 0000567D 3401 <1> xor al, 1 ; (negating ^ raw truth) = cooked truth 2900 <1> .jump_false: 2901 0000567F 84C0 <1> test al, al ; true ? 2902 00005681 7507 <1> jnz .msg_jumping ; yes --> 2903 <1> 2904 <1> .msg_notjumping: 2905 00005683 C706[C049][B23F] <1> mov word [condmsg], msg.condnotjump 2906 <1> .return: 2907 00005689 C3 <1> retn 2908 <1> 2909 <1> .msg_jumping: 2910 0000568A C706[C049][B63F] <1> mov word [condmsg], msg.condjump 2911 00005690 C3 <1> retn 2912 <1> %endif 2913 <1> 2914 <1> 2915 <1> ; 8-bit relative jump (OP_REL8) 2916 <1> 2917 <1> dop_rel8: 2918 <1> %if _COND 2919 00005691 A1[A449] <1> mov ax, word [index] 2920 00005694 3DE300 <1> cmp ax, 0E3h 2921 00005697 772C <1> ja .cond_done ; no conditional jump --> 2922 00005699 7211 <1> jb .cond_noncx ; not jcxz, check for other --> 2923 <1> 2924 0000569B E89DFF <1> call cond_get_ecx 2925 0000569E 09D0 <1> or ax, dx 2926 000056A0 7405 <1> jz .cond_msg_jumping 2927 <1> .cond_msg_notjumping: 2928 000056A2 E8DEFF <1> call cond_handle.msg_notjumping 2929 000056A5 EB1E <1> jmp short .cond_done 2930 <1> 2931 <1> .cond_msg_jumping: 2932 000056A7 E8E0FF <1> call cond_handle.msg_jumping 2933 000056AA EB19 <1> jmp short .cond_done 2934 <1> 2935 <1> .cond_noncx: 2936 000056AC 3CE0 <1> cmp al, 0E0h 2937 000056AE 7210 <1> jb .cond_nonloop ; not loop, check for other --> 2938 <1> 2939 000056B0 50 <1> push ax 2940 000056B1 E887FF <1> call cond_get_ecx 2941 000056B4 48 <1> dec ax ; = 0 if cx is 1 2942 000056B5 09D0 <1> or ax, dx ; = 0 if cx is 1 and ecx is cx 2943 000056B7 58 <1> pop ax 2944 000056B8 74E8 <1> jz .cond_msg_notjumping ; if (e)cx is 1 --> 2945 000056BA 3CE2 <1> cmp al, 0E2h 2946 000056BC 74E9 <1> je .cond_msg_jumping ; loop without additional condition --> 2947 000056BE 3495 <1> xor al, 0E0h^75h ; E0h (loopnz) to 75h (jnz), 2948 <1> ; E1h (loopz) to 74h (jz) 2949 <1> 2950 <1> .cond_nonloop: 2951 000056C0 2C70 <1> sub al, 70h ; (ah = 0) 2952 000056C2 E887FF <1> call cond_handle ; call common code (checks for ax < 16) 2953 <1> .cond_done: 2954 <1> %endif 2955 000056C5 E8B405 <1> call disgetbyte 2956 000056C8 98 <1> cbw 2957 000056C9 A2[A349] <1> mov byte [disp8], al 2958 000056CC E98A00 <1> jmp dop48 2959 <1> 2960 <1> ; 16/32-bit relative jump (OP_REL1632) 2961 <1> 2962 <1> dop_rel1632: 2963 <1> %if _COND 2964 000056CF A1[A449] <1> mov ax, word [index] 2965 000056D2 2D6002 <1> sub ax, SPARSE_BASE+80h 2966 000056D5 E874FF <1> call cond_handle 2967 <1> %endif 2968 000056D8 E8B705 <1> call disgetword 2969 <1> %if _DISASM_32BIT 2970 000056DB E83105 <1> call dischk32d 2971 000056DE 745D <1> jz dop48_near ; if not 32-bit offset 2972 000056E0 92 <1> xchg ax, dx ; mov dx, ax 2973 000056E1 E8AE05 <1> call disgetword 2974 <1> 2975 000056E4 813E[A449]E800 <1> cmp word [index], 00E8h 2976 000056EA 7429 <1> je .not_show_keyword ; no need to distinguish NEAR call --> 2977 <1> ; ax:dx between FFFFh:FF80h (-128) .. 0000h:007Fh (127): 2978 <1> ; == show "NEAR" keyword 2979 <1> ; 2980 <1> ; Note: This is not entirely correct. If a jump short is 2981 <1> ; used, the actual opcode is shorter, thus the 2982 <1> ; exact distance that can be reached by the jump short 2983 <1> ; differs from what the jump near can reach with 2984 <1> ; a rel16/32 displacement between -128..127. 2985 000056EC 83F8FF <1> cmp ax, -1 2986 000056EF 7410 <1> je .checkminus 2987 000056F1 85C0 <1> test ax, ax 2988 000056F3 7520 <1> jnz .not_show_keyword 2989 <1> .checkplus: 2990 000056F5 83FA7F <1> cmp dx, byte 127 2991 000056F8 7F1B <1> jg .not_show_keyword 2992 000056FA 83FA00 <1> cmp dx, 0 2993 000056FD 7C16 <1> jl .not_show_keyword 2994 000056FF EB0A <1> jmp .show_keyword 2995 <1> 2996 <1> .checkminus: 2997 00005701 83FA80 <1> cmp dx, byte -128 2998 00005704 7C0F <1> jl .not_show_keyword 2999 00005706 83FA00 <1> cmp dx, 0 3000 00005709 7D0A <1> jge .not_show_keyword 3001 <1> 3002 <1> .show_keyword: 3003 0000570B F606[E800]20 <1> testopt [asm_options], disasm_show_near 3004 00005710 7503 <1> jnz .not_show_keyword 3005 00005712 E86A03 <1> call dop_show_near 3006 <1> .not_show_keyword: 3007 <1> 3008 <1> %if _PM 3009 <1> test byte [bCSAttr],40h ; for 32-bit code segments 3010 <1> jnz @F ; no need to display "DWORD " 3011 <1> %endif 3012 00005715 50 <1> push ax 3013 00005716 E8AF04 <1> call showdword 3014 00005719 58 <1> pop ax 3015 <1> @@: 3016 <1> 3017 0000571A 8B1E[840B] <1> mov bx,[u_addr+0] 3018 0000571E 031E[9C49] <1> add bx,[dis_n] 3019 00005722 1306[9E49] <1> adc ax,[dis_n + 2] 3020 00005726 01DA <1> add dx,bx 3021 <1> %if _PM 3022 <1> adc ax,[u_addr+2] 3023 <1> %else 3024 00005728 83D000 <1> adc ax, 0 3025 <1> %endif 3026 <1> %if _MEMREF_AMOUNT 3027 0000572B E86B00 <1> call get_free_memref 3028 0000572E 8987[5649] <1> mov word [memrefs + bx + mrOffset + 2], ax 3029 00005732 808F[5A49]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 3030 <1> %endif 3031 00005737 E85043 <1> call hexword 3032 0000573A 92 <1> xchg ax,dx 3033 0000573B EB42 <1> jmp s dop_branch_word 3034 <1> %endif 3035 <1> 3036 <1> dop48_near: 3037 0000573D 813E[A449]E800 <1> cmp word [index], 00E8h 3038 00005743 7414 <1> je @F ; no need to distinguish NEAR call --> 3039 <1> ; ax between FF80h (-128) .. 007Fh (127): 3040 <1> ; == show "NEAR" keyword 3041 <1> ; 3042 <1> ; Note: This is not entirely correct. If a jump short is 3043 <1> ; used, the actual opcode is shorter, thus the 3044 <1> ; exact distance that can be reached by the jump short 3045 <1> ; differs from what the jump near can reach with 3046 <1> ; a rel16/32 displacement between -128..127. 3047 00005745 83F880 <1> cmp ax, byte -128 3048 00005748 7C0F <1> jl @F 3049 0000574A 83F87F <1> cmp ax, byte 127 3050 0000574D 7F0A <1> jg @F 3051 0000574F F606[E800]20 <1> testopt [asm_options], disasm_show_near 3052 00005754 7503 <1> jnz @F 3053 00005756 E82603 <1> call dop_show_near 3054 <1> @@: 3055 <1> 3056 <1> %if _PM && _DISASM_32BIT 3057 <1> test byte [bCSAttr],40h ; for 16-bit code segments 3058 <1> jz @F ; no need to display "WORD " 3059 <1> push ax 3060 <1> call showword 3061 <1> pop ax 3062 <1> @@: 3063 <1> %endif 3064 <1> 3065 <1> dop48: 3066 00005759 99 <1> cwd 3067 0000575A 0306[840B] <1> add ax, word [u_addr] 3068 <1> %if _PM 3069 <1> adc dx, word [u_addr + 2] 3070 <1> %else 3071 0000575E 83D200 <1> adc dx, 0 3072 <1> %endif 3073 00005761 0306[9C49] <1> add ax, word [dis_n] 3074 00005765 1316[9E49] <1> adc dx, word [dis_n + 2] 3075 <1> %if _DISASM_32BIT 3076 00005769 E8A304 <1> call dischk32d ; 32-bit opsize ? 3077 0000576C 7411 <1> jz .16 ; no --> 3078 0000576E 92 <1> xchg ax, dx 3079 0000576F E81843 <1> call hexword ; yes, display high word 3080 00005772 92 <1> xchg ax, dx 3081 <1> %if _MEMREF_AMOUNT 3082 00005773 E82300 <1> call get_free_memref 3083 00005776 8997[5649] <1> mov word [memrefs + bx + mrOffset + 2], dx 3084 0000577A 808F[5A49]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 3085 <1> %endif 3086 <1> .16: 3087 <1> %endif 3088 <1> 3089 <1> dop_branch_word: 3090 <1> %if _MEMREF_AMOUNT 3091 0000577F E81700 <1> call get_free_memref 3092 00005782 8987[5449] <1> mov word [memrefs + bx + mrOffset], ax 3093 00005786 FF36[880B] <1> push word [u_addr + saSegSel] 3094 0000578A 8F87[5849] <1> pop word [memrefs + bx + mrSegmentSelector] 3095 0000578E 808F[5A49]01 <1> or byte [memrefs + bx + mrFlags], mrfBranchDirect 3096 00005793 E81E00 <1> call calc_linear_memref_and_mark_nonfree 3097 <1> %endif 3098 00005796 E9F142 <1> jmp hexword ; call hexword and return 3099 <1> 3100 <1> 3101 <1> %if _MEMREF_AMOUNT 3102 <1> ; INP: word [memrefs.free] 3103 <1> ; OUT: bx = byte index into memref array 3104 <1> ; CHG: - 3105 <1> ; STT: ss = ds = es 3106 <1> get_free_memref: 3107 00005799 8B1E[9049] <1> mov bx, [memrefs.free] 3108 <1> get_memref_index_bx: 3109 0000579D 83FB04 <1> cmp bx, _MEMREF_AMOUNT 3110 000057A0 7309 <1> jae @F 3111 000057A2 01DB <1> add bx, bx 3112 000057A4 01DB <1> add bx, bx 3113 000057A6 01DB <1> add bx, bx 3114 000057A8 01DB <1> add bx, bx 3115 <1> %if MEMREF_size != 16 3116 <1> %error Adjust multiplication 3117 <1> %endif 3118 000057AA C3 <1> retn 3119 <1> 3120 <1> @@: 3121 000057AB BA[552B] <1> mov dx, msg.memrefs_invalid_internal 3122 000057AE E80248 <1> call putsz 3123 000057B1 E94CA8 <1> jmp cmd3 3124 <1> 3125 <1> 3126 <1> ; INP: word [memrefs.free] 3127 <1> ; [memrefs] array entry 3128 <1> ; OUT: NC if valid segmented address (getlinear succeeded), 3129 <1> ; dword [memrefs + x + mrLinear] filled 3130 <1> ; word [memrefs.free] incremented 3131 <1> ; CY if invalid address, 3132 <1> ; [memrefs + x] re-initialised 3133 <1> ; word [memrefs.free] left unmodified 3134 <1> ; CHG: - 3135 <1> ; STT: ss = ds = es 3136 <1> calc_linear_memref_and_mark_nonfree: 3137 000057B4 50 <1> push ax 3138 000057B5 53 <1> push bx 3139 <1> _386_PM_o32 3140 000057B6 52 <1> push dx 3141 000057B7 E8DFFF <1> call get_free_memref 3142 000057BA 53 <1> push bx 3143 <1> _386_PM_o32 3144 000057BB 8B97[5449] <1> mov dx, word [memrefs + bx + mrOffset] 3145 000057BF 8B9F[5849] <1> mov bx, word [memrefs + bx + mrSegmentSelector] 3146 000057C3 E82BE4 <1> call getlinear_32bit 3147 000057C6 5B <1> pop bx 3148 000057C7 7210 <1> jc .error 3149 <1> 3150 000057C9 8987[5049] <1> mov word [memrefs + bx + mrLinear], ax 3151 000057CD 8997[5249] <1> mov word [memrefs + bx + mrLinear + 2], dx 3152 000057D1 FF06[9049] <1> inc word [memrefs.free] 3153 <1> 3154 <1> ; clc 3155 <1> .return: 3156 <1> _386_PM_o32 3157 000057D5 5A <1> pop dx 3158 000057D6 5B <1> pop bx 3159 000057D7 58 <1> pop ax 3160 000057D8 C3 <1> retn 3161 <1> 3162 <1> .error: 3163 000057D9 57 <1> push di 3164 000057DA 8DBF[5049] <1> lea di, [memrefs + bx] 3165 000057DE E80400 <1> call init_one_memref 3166 000057E1 5F <1> pop di 3167 000057E2 F9 <1> stc 3168 000057E3 EBF0 <1> jmp .return 3169 <1> 3170 <1> 3171 <1> ; INP: di -> memref to initialise 3172 <1> ; OUT: ax = 0 3173 <1> ; di -> past initialised memref 3174 <1> ; CHG: - 3175 <1> ; STT: ss = ds = es 3176 <1> init_one_memref: 3177 000057E5 31C0 <1> xor ax, ax 3178 <1> 3179 <1> ; INP: di -> memref to initialise 3180 <1> ; ax = 0 3181 <1> ; OUT: di -> past initialised memref 3182 <1> ; CHG: - 3183 <1> ; STT: ss = ds = es 3184 <1> .ax_already_zero: 3185 000057E7 AB <1> stosw ; zero-initialise all memrefs 3186 000057E8 AB <1> stosw ; mrLinear 3187 000057E9 AB <1> stosw 3188 000057EA AB <1> stosw ; mrOffset 3189 000057EB AB <1> stosw ; mrSegmentSelector 3190 000057EC AB <1> stosw ; mrFlags 3191 000057ED 40 <1> inc ax 3192 000057EE AB <1> stosw 3193 000057EF 48 <1> dec ax 3194 000057F0 AB <1> stosw ; mrLength = 1 3195 000057F1 C3 <1> retn 3196 <1> 3197 <1> 3198 <1> ; INP: si = address of segreg (reg_cs, reg_ds, etc) 3199 <1> ; di = address of index reg (reg_esi or reg_edi) 3200 <1> ; [memrefs] 3201 <1> ; [presizeflags] 3202 <1> ; byte [index] = which opcode 3203 <1> ; [reg_ecx] 3204 <1> ; [reg_efl] & 400h = Direction Flag 3205 <1> ; OUT: memrefs + bx -> current memref (partially filled) 3206 <1> ; CHG: bx, si, di, cx, dx 3207 <1> init_string_memref: 3208 000057F2 E8A4FF <1> call get_free_memref 3209 000057F5 FF34 <1> push word [si] ; get segment/selector 3210 000057F7 8F87[5849] <1> pop word [memrefs + bx + mrSegmentSelector] 3211 <1> ; store segment/selector 3212 000057FB FF35 <1> push word [di] 3213 000057FD 8F87[5449] <1> pop word [memrefs + bx + mrOffset] 3214 <1> ; store low word of offset 3215 00005801 8B0E[9649] <1> mov cx, word [string_memref_counter + 2] 3216 00005805 8B16[9449] <1> mov dx, word [string_memref_counter] 3217 <1> 3218 00005809 F606[A049]20 <1> test byte [presizeflags], PRE32A 3219 0000580E 740C <1> jz @F ; if 16-bit addressing --> 3220 00005810 FF7502 <1> push word [di + 2] 3221 00005813 8F87[5649] <1> pop word [memrefs + bx + mrOffset + 2] 3222 <1> ; store high word of offset 3223 00005817 808F[5A49]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 3224 <1> ; remember that it is a32 3225 <1> @@: 3226 <1> 3227 0000581C F606[A049]02 <1> test byte [preflags], PREREP 3228 00005821 7505 <1> jnz @F ; if to take (e)cx repetitions --> 3229 00005823 BA0100 <1> mov dx, 1 3230 00005826 31C9 <1> xor cx, cx ; cx:dx = 1, just one element 3231 <1> @@: 3232 <1> 3233 00005828 50 <1> push ax 3234 00005829 B80100 <1> mov ax, 1 3235 0000582C F606[A449]01 <1> test byte [index], 1 ; element size is byte ? 3236 00005831 740A <1> jz @F ; yes, ax = 1 3237 00005833 40 <1> inc ax ; = 2 3238 <1> %if _DISASM_32BIT 3239 00005834 F606[A049]10 <1> test byte [presizeflags], PRE32D 3240 <1> ; element size is word ? 3241 00005839 7402 <1> jz @F ; yes, ax = 2 3242 0000583B 01C0 <1> add ax, ax ; = 4 3243 <1> %endif 3244 <1> @@: 3245 <1> 3246 0000583D 3C01 <1> cmp al, 1 ; byte size ? 3247 0000583F 7415 <1> je @F ; yes, do not multiply --> 3248 00005841 01D2 <1> add dx, dx 3249 00005843 11C9 <1> adc cx, cx ; * 2, word to byte 3250 00005845 720A <1> jc .carry_counter 3251 00005847 3C02 <1> cmp al, 2 ; word size ? 3252 00005849 740B <1> je @F ; yes, done multiplying --> 3253 0000584B 01D2 <1> add dx, dx 3254 0000584D 11C9 <1> adc cx, cx ; * 4, dword to byte 3255 0000584F 7305 <1> jnc @F 3256 <1> .carry_counter: 3257 00005851 BAFFFF <1> mov dx, -1 3258 00005854 89D1 <1> mov cx, dx ; in case the counter is large 3259 <1> ; A carry out of an a16 address is not yet handled. 3260 <1> ; Note that eg cx=8000h a16 movsw may be valid to 3261 <1> ; copy exactly 64 KiB. Likewise, technically a 3262 <1> ; size of exactly 4 GiB is valid; however, our 3263 <1> ; memref format cannot store that. 3264 <1> @@: 3265 00005856 8997[5C49] <1> mov word [memrefs + bx + mrLength], dx 3266 0000585A 898F[5E49] <1> mov word [memrefs + bx + mrLength + 2], cx 3267 <1> 3268 0000585E F606[E10C]04 <1> testopt [reg_efl], 400h ; DF set ? 3269 00005863 7411 <1> jz @F 3270 <1> 3271 00005865 0187[5449] <1> add word [memrefs + bx + mrOffset], ax 3272 00005869 8397[5649]00 <1> adc word [memrefs + bx + mrOffset + 2], 0 3273 0000586E 2997[5449] <1> sub word [memrefs + bx + mrOffset], dx 3274 00005872 198F[5649] <1> sbb word [memrefs + bx + mrOffset + 2], cx 3275 <1> 3276 <1> @@: 3277 00005876 58 <1> pop ax 3278 00005877 C3 <1> retn 3279 <1> %endif 3280 <1> 3281 <1> 3282 <1> ; Check for ST(1) (OP_1CHK). 3283 <1> 3284 <1> dop49: 3285 00005878 58 <1> pop ax ;discard return address 3286 00005879 A0[1641] <1> mov al,[regmem] 3287 0000587C 2407 <1> and al,7 3288 0000587E 3C01 <1> cmp al,1 3289 00005880 7403 <1> je dop50 ;if it's ST(1) 3290 00005882 E918F3 <1> jmp da14 ;another operand (but no comma) 3291 <1> 3292 <1> dop50: 3293 00005885 E9ABF3 <1> jmp da_op_end ; end of list --> 3294 <1> 3295 <1> ; ST(I) (OP_STI). 3296 <1> 3297 <1> dop_sti: 3298 00005888 A0[1641] <1> mov al, byte [regmem] 3299 0000588B 2407 <1> and al, 7 3300 0000588D 93 <1> xchg ax, bx ;mov bx,ax 3301 0000588E B85354 <1> mov ax, 'ST' 3302 00005891 E81003 <1> call dis_stosw_lowercase; store ST(bl) 3303 00005894 B028 <1> mov al, '(' 3304 00005896 AA <1> stosb 3305 00005897 B83029 <1> mov ax, '0)' 3306 0000589A 08D8 <1> or al, bl 3307 0000589C AB <1> stosw 3308 0000589D C3 <1> retn 3309 <1> 3310 <1> ; CRx (OP_CR). 3311 <1> 3312 <1> dop_cr: 3313 0000589E BB4352 <1> mov bx,'CR' 3314 000058A1 E84502 <1> call getregmem_r 3315 000058A4 3C04 <1> cmp al,4 3316 000058A6 7713 <1> ja disbad4 ;if too large 3317 000058A8 7505 <1> jne dop52a 3318 000058AA C606[1C41]05 <1> mov byte [dismach],5 ;CR4 is new to the 586 3319 <1> dop52a: 3320 000058AF 813E[A449]0202 <1> cmp word [index],SPARSE_BASE+22h 3321 000058B5 7528 <1> jne dop55 ;if not MOV CRx,xx 3322 000058B7 3C01 <1> cmp al,1 3323 000058B9 7524 <1> jne dop55 ;if not CR1 3324 <1> 3325 000058BB E9D301 <1> disbad4:jmp disbad ;can't MOV CR1,xx 3326 <1> 3327 <1> ; DRx (OP_DR). 3328 <1> 3329 <1> dop_dr: 3330 000058BE E82802 <1> call getregmem_r 3331 000058C1 BB4452 <1> mov bx,'DR' 3332 000058C4 B9FFFF <1> mov cx,-1 ;no max or illegal value 3333 000058C7 EB16 <1> jmp s dop55 3334 <1> 3335 <1> ; TRx (OP_TR). 3336 <1> 3337 <1> dop_tr: 3338 000058C9 E81D02 <1> call getregmem_r 3339 000058CC 3C03 <1> cmp al,3 3340 000058CE 7303E9BE01 <1> jb disbad ;if too small 3341 000058D3 3C06 <1> cmp al,6 3342 000058D5 7305 <1> jae dop54a ;if TR6-7 3343 000058D7 C606[1C41]04 <1> mov byte [dismach],4 ;TR3-5 are new to the 486 3344 <1> dop54a: 3345 000058DC BB5452 <1> mov bx,'TR' 3346 <1> 3347 <1> dop55: 3348 000058DF 93 <1> xchg ax, bx 3349 000058E0 E8C102 <1> call dis_stosw_lowercase; store XX 3350 000058E3 93 <1> xchg ax, bx 3351 000058E4 0C30 <1> or al, '0' 3352 000058E6 AA <1> stosb 3353 000058E7 C3 <1> retn 3354 <1> 3355 <1> ; Segment register (OP_SEGREG). 3356 <1> 3357 <1> dop_segreg: 3358 000058E8 E8FE01 <1> call getregmem_r 3359 000058EB 3C06 <1> cmp al,6 3360 000058ED 7203E99F01 <1> jae disbad ; if not a segment register --> 3361 000058F2 F606[E800]80 <1> testopt [asm_options], disasm_nec 3362 000058F7 7504 <1> jnz .nec ; allow mov from or to any segreg 3363 000058F9 3C02 <1> cmp al,2 3364 000058FB 7505 <1> jne @F ; if not SS --> 3365 <1> .nec: 3366 000058FD 800E[BA49]40 <1> or byte [disflags], DIS_I_MOV_SS ; note this 3367 <1> @@: 3368 00005902 3C04 <1> cmp al,4 3369 00005904 7205 <1> jb dop57a ;if not FS or GS 3370 00005906 C606[1C41]03 <1> mov byte [dismach],3;(no new 486-686 instructions involve seg regs) 3371 <1> dop57a: 3372 0000590B 0410 <1> add al,16 3373 0000590D E96DFC <1> jmp dop35 ;go print it out 3374 <1> 3375 <1> ; Sign-extended immediate byte (OP_IMMS8). "push xx" 3376 <1> 3377 <1> dop_imms8: 3378 00005910 E86903 <1> call disgetbyte 3379 00005913 3C00 <1> cmp al,0 3380 00005915 93 <1> xchg ax,bx ;mov bl,al 3381 00005916 B02B <1> mov al,'+' 3382 00005918 7D04 <1> jge dop58a ;if >= 0 3383 0000591A F6DB <1> neg bl 3384 0000591C B02D <1> mov al,'-' 3385 <1> dop58a: 3386 0000591E AA <1> stosb 3387 0000591F 93 <1> xchg ax,bx ;mov al,bl 3388 00005920 EB03 <1> jmp s dop59a ;call hexbyte and return 3389 <1> 3390 <1> 3391 <1> ; Immediate byte (OP_IMM8). 3392 <1> 3393 <1> dop_imm8: 3394 00005922 E85703 <1> call disgetbyte 3395 <1> dop59a: 3396 00005925 E96941 <1> jmp hexbyte ;call hexbyte and return 3397 <1> 3398 <1> 3399 <1> dop_imm8_int: 3400 00005928 E85103 <1> call disgetbyte 3401 0000592B 3C03 <1> cmp al, 3 3402 0000592D 75F6 <1> jne dop59a 3403 0000592F 50 <1> push ax 3404 00005930 E88A02 <1> call showsize.byte 3405 00005933 58 <1> pop ax 3406 00005934 EBEF <1> jmp dop59a 3407 <1> 3408 <1> dop_imm8_optional: 3409 00005936 E84303 <1> call disgetbyte 3410 00005939 3C0A <1> cmp al, 10 3411 0000593B 75E8 <1> jne dop59a 3412 0000593D 58 <1> pop ax 3413 0000593E E9F2F2 <1> jmp da_op_end 3414 <1> 3415 <1> 3416 <1> ; Show MMx reg (OP_MMX; previously was "Show ECX if 32-bit LOOPxx"). 3417 <1> dop_mmx: 3418 00005941 BB4D4D <1> mov bx, "MM" 3419 00005944 E8A201 <1> call getregmem_r 3420 00005947 EB96 <1> jmp short dop55 3421 <1> 3422 <1> ; MMX register (in ModR/M part) 3423 <1> dop_mmx_mod: 3424 00005949 BB4D4D <1> mov bx, "MM" 3425 0000594C E8A401 <1> call getregmem 3426 0000594F 3CC0 <1> cmp al, 0C0h 3427 00005951 7303E93B01 <1> jb disbad ; needs to be encoded as register --> 3428 00005956 2407 <1> and al, 7 3429 00005958 EB85 <1> jmp short dop55 3430 <1> 3431 <1> 3432 <1> %if _MEMREF_AMOUNT 3433 <1> dop_stack_push: 3434 0000595A B80200 <1> mov ax, 2 3435 <1> .special: 3436 <1> %if _DISASM_32BIT 3437 0000595D F606[A049]10 <1> test byte [presizeflags], PRE32D 3438 <1> .iso16_if_ZR: 3439 00005962 7402 <1> jz .iso16 3440 00005964 01C0 <1> add ax, ax 3441 <1> %endif 3442 <1> .iso16: 3443 00005966 E830FE <1> call get_free_memref ; memrefs + bx -> the memref structure 3444 <1> 3445 00005969 8987[5C49] <1> mov word [memrefs + bx + mrLength], ax 3446 0000596D 8B0E[B60C] <1> mov cx, word [reg_esp + 2] 3447 00005971 8B16[B40C] <1> mov dx, word [reg_esp] 3448 00005975 29C2 <1> sub dx, ax 3449 00005977 83D900 <1> sbb cx, 0 3450 <1> 3451 0000597A 8997[5449] <1> mov word [memrefs + bx + mrOffset], dx 3452 <1> 3453 0000597E B20A <1> mov dl, mrfMemDest | mrfMem 3454 <1> 3455 00005980 EB21 <1> jmp dop_stack_common 3456 <1> 3457 <1> %if _PM && _DISASM_32BIT 3458 <1> .special_int: 3459 <1> call ispm 3460 <1> jnz .iso16 3461 <1> cmp byte [dpmi32], 0 3462 <1> jmp .iso16_if_ZR 3463 <1> %else 3464 <1> .special_int: equ .iso16 3465 <1> %endif 3466 <1> 3467 <1> dop_stack_pop: 3468 00005982 B80200 <1> mov ax, 2 3469 <1> .special: 3470 00005985 8B0E[B60C] <1> mov cx, word [reg_esp + 2] 3471 00005989 8B16[B40C] <1> mov dx, word [reg_esp] 3472 <1> .leave: 3473 <1> %if _DISASM_32BIT 3474 0000598D F606[A049]10 <1> test byte [presizeflags], PRE32D 3475 00005992 7402 <1> jz .iso16 3476 00005994 01C0 <1> add ax, ax 3477 <1> .iso16: 3478 <1> %endif 3479 00005996 E800FE <1> call get_free_memref ; memrefs + bx -> the memref structure 3480 <1> 3481 00005999 8987[5C49] <1> mov word [memrefs + bx + mrLength], ax 3482 <1> 3483 0000599D 8997[5449] <1> mov word [memrefs + bx + mrOffset], dx 3484 <1> 3485 000059A1 B206 <1> mov dl, mrfMemSource | mrfMem 3486 <1> 3487 <1> dop_stack_common: 3488 000059A3 A1[CC0C] <1> mov ax, word [reg_ss] ; get ss selector into ax 3489 000059A6 8987[5849] <1> mov word [memrefs + bx + mrSegmentSelector], ax 3490 <1> 3491 <1> %if _DISASM_32BIT 3492 <1> _386_PM xchg ax, bx ; selector in bx 3493 <1> _386_PM call test_d_b_bit ; check whether a 32-bit ss 3494 <1> _386_PM xchg ax, bx 3495 <1> _386_PM jz .isstack16 3496 <1> _386_PM or dl, mrfA32 3497 <1> _386_PM mov word [memrefs + bx + mrOffset + 2], cx 3498 <1> .isstack16: 3499 <1> %endif 3500 <1> 3501 000059AA 0897[5A49] <1> or byte [memrefs + bx + mrFlags], dl 3502 000059AE E803FE <1> call calc_linear_memref_and_mark_nonfree 3503 000059B1 EB5B <1> jmp dop_continue_maybe_end 3504 <1> 3505 <1> 3506 <1> dop_stack_special: 3507 000059B3 A1[A449] <1> mov ax, [index] 3508 000059B6 3D3301 <1> cmp ax, GROUP7 + 3 ; call far [mem] ? 3509 000059B9 7414 <1> je .callfar 3510 000059BB 84E4 <1> test ah, ah 3511 000059BD 754C <1> jnz .error 3512 000059BF 57 <1> push di 3513 000059C0 BF[7E4A] <1> mov di, .bytes ; list of opcodes 3514 000059C3 B90B00 <1> mov cx, .bytes_amount 3515 000059C6 F2AE <1> repne scasb 3516 000059C8 8A450A <1> mov al, [di + .bytes_amount - 1] 3517 000059CB 5F <1> pop di 3518 000059CC 753D <1> jne .error ; if not one of these --> 3519 <1> 3520 000059CE A9 <1> db __TEST_IMM16 ; (skip mov) 3521 <1> .callfar: 3522 000059CF B044 <1> mov al, 40h + 4 3523 <1> 3524 <1> .haveinfo: 3525 000059D1 89C3 <1> mov bx, ax 3526 000059D3 83E01F <1> and ax, 1Fh 3527 000059D6 80FB80 <1> cmp bl, 80h 3528 000059D9 73AA <1> jae dop_stack_pop.special 3529 000059DB 80FB40 <1> cmp bl, 40h 3530 000059DE 7203E97AFF <1> jae dop_stack_push.special 3531 000059E3 80FB20 <1> cmp bl, 20h 3532 000059E6 7203E97BFF <1> jae dop_stack_push.special_int 3533 000059EB 84C0 <1> test al, al 3534 000059ED 740F <1> jz .leave 3535 000059EF 3C01 <1> cmp al, 1 3536 000059F1 7518 <1> jne .error 3537 <1> .into: 3538 000059F3 F606[E10C]08 <1> testopt [reg_efl], 800h 3539 000059F8 7414 <1> jz .none 3540 000059FA B026 <1> mov al, 20h + 6 3541 000059FC EBD3 <1> jmp .haveinfo 3542 <1> 3543 <1> .leave: 3544 000059FE B80200 <1> mov ax, 2 ; pop size = 1 word or 1 dword 3545 00005A01 8B0E[BA0C] <1> mov cx, word [reg_ebp + 2] 3546 00005A05 8B16[B80C] <1> mov dx, word [reg_ebp] ; pop from address in (e)bp, not (e)sp 3547 00005A09 EB82 <1> jmp dop_stack_pop.leave 3548 <1> 3549 <1> .error: 3550 00005A0B E9E9F1 <1> jmp da_internal_error 3551 <1> 3552 <1> usesection lDEBUG_DATA_ENTRY 3553 <1> 3554 <1> .bytes: 3555 00004A7E CDCE <1> db 0CDh, 0CEh ; int, into 3556 00004A80 CCF1 <1> db 0CCh, 0F1h ; int3, int1 3557 00004A82 9A <1> db 9Ah ; call far imm:imm 3558 00004A83 CFCACB <1> db 0CFh, 0CAh, 0CBh ; iret, retf imm, retf 3559 00004A86 60 <1> db 60h ; pusha 3560 00004A87 61 <1> db 61h ; popa 3561 00004A88 C9 <1> db 0C9h ; leave 3562 <1> .bytes_amount: equ $ - .bytes 3563 <1> 3564 <1> ; In this table the bits have the following meaning: 3565 <1> ; 3566 <1> ; flag 80h: special pop 3567 <1> ; flag 40h: special push 3568 <1> ; flag 20h: special push for int 3569 <1> ; if neither flag set: unusual, for leave and into 3570 <1> ; else: masked with 1Fh gives amount of bytes to push/pop 3571 <1> ; in o16, which needs to be doubled to get the amount 3572 <1> ; to push/pop in o32 instead. 3573 <1> .info: 3574 00004A89 26 <1> db 20h + 6 ; int 3575 00004A8A 01 <1> db 1 ; into 3576 00004A8B 26 <1> db 20h + 6 ; int3 3577 00004A8C 26 <1> db 20h + 6 ; int1 3578 00004A8D 44 <1> db 40h + 4 ; call far imm:imm 3579 00004A8E 86 <1> db 80h + 6 ; iret 3580 00004A8F 84 <1> db 80h + 4 ; retf imm 3581 00004A90 84 <1> db 80h + 4 ; retf 3582 00004A91 50 <1> db 40h + 16 ; pusha 3583 00004A92 90 <1> db 80h + 16 ; popa 3584 00004A93 00 <1> db 0 ; leave 3585 <1> 3586 <1> usesection lDEBUG_CODE 3587 <1> 3588 <1> .none: 3589 <1> %else 3590 <1> dop_stack_push: 3591 <1> dop_stack_pop: 3592 <1> dop_stack_special: 3593 <1> %endif 3594 <1> dop_continue_maybe_end: 3595 00005A0E 58 <1> pop ax ; discard return address 3596 00005A0F E983F1 <1> jmp da14_check_end ; next --> 3597 <1> 3598 <1> 3599 <1> dop_m_always_16: 3600 00005A12 800E[BB49]41 <1> setopt [disflags], DIS_I_M_ALWAYS_16 | DIS_I_NOSIZ 3601 00005A17 EBF5 <1> jmp dop_continue_maybe_end 3602 <1> 3603 <1> 3604 <1> ; Set flag to always show size (OP_SHOSIZ). 3605 <1> dop_shosiz: 3606 00005A19 800E[BA49]10 <1> or byte [disflags],DIS_I_SHOWSIZ 3607 <1> dop60a: 3608 00005A1E 58 <1> pop ax ; discard return address 3609 00005A1F E97BF1 <1> jmp da14 ; next... 3610 <1> 3611 <1> dop_far_m: 3612 00005A22 800E[BB49]02 <1> setopt [disflags], DIS_I_FAR_M 3613 00005A27 EBF5 <1> jmp dop60a 3614 <1> 3615 <1> dop_double_m: 3616 00005A29 800E[BB49]04 <1> setopt [disflags], DIS_I_DOUBLE_M 3617 00005A2E EBEE <1> jmp dop60a 3618 <1> 3619 <1> 3620 <1> %if _MEMREF_AMOUNT 3621 <1> dop_m_src: 3622 00005A30 800E[BB49]10 <1> setopt [disflags], DIS_I_M_SRC 3623 00005A35 EBE7 <1> jmp dop60a 3624 <1> 3625 <1> dop_m_src_dst: 3626 00005A37 800E[BB49]10 <1> setopt [disflags], DIS_I_M_SRC 3627 <1> dop_m_dst: 3628 00005A3C 800E[BB49]20 <1> setopt [disflags], DIS_I_M_DST 3629 00005A41 EBDB <1> jmp dop60a 3630 <1> %else 3631 <1> dop_m_src: equ dop60a 3632 <1> dop_m_src_dst: equ dop60a 3633 <1> dop_m_dst: equ dop60a 3634 <1> %endif 3635 <1> 3636 <1> 3637 <1> dop_short: 3638 00005A43 F606[E800]10 <1> testopt [asm_options], disasm_show_short 3639 00005A48 74D4 <1> jz dop60a 3640 00005A4A B85348 <1> mov ax, "SH" 3641 00005A4D E85401 <1> call dis_stosw_lowercase 3642 00005A50 B84F52 <1> mov ax, "OR" 3643 00005A53 E84E01 <1> call dis_stosw_lowercase 3644 00005A56 B85420 <1> mov ax, "T " 3645 00005A59 E84801 <1> call dis_stosw_lowercase 3646 <1> dop60a_1: 3647 00005A5C EBC0 <1> jmp dop60a 3648 <1> 3649 <1> dop_near: 3650 00005A5E F606[E800]20 <1> testopt [asm_options], disasm_show_near 3651 00005A63 74F7 <1> jz dop60a_1 3652 00005A65 E81700 <1> call dop_show_near 3653 <1> dop60a_2: 3654 00005A68 EBF2 <1> jmp dop60a_1 3655 <1> 3656 <1> dop_far: 3657 00005A6A F606[E800]40 <1> testopt [asm_options], disasm_show_far 3658 00005A6F 74F7 <1> jz dop60a_2 3659 <1> dop_far_required: 3660 00005A71 B84641 <1> mov ax, "FA" ; store "FAR " 3661 00005A74 E82D01 <1> call dis_stosw_lowercase 3662 00005A77 B85220 <1> mov ax, "R " 3663 00005A7A E82701 <1> call dis_stosw_lowercase 3664 00005A7D EBE9 <1> jmp dop60a_2 3665 <1> 3666 <1> dop_show_near: 3667 00005A7F 50 <1> push ax 3668 00005A80 B84E45 <1> mov ax, "NE" 3669 00005A83 E81E01 <1> call dis_stosw_lowercase 3670 00005A86 B84152 <1> mov ax, "AR" 3671 00005A89 E81801 <1> call dis_stosw_lowercase 3672 00005A8C B020 <1> mov al, " " 3673 00005A8E AA <1> stosb 3674 00005A8F 58 <1> pop ax 3675 00005A90 C3 <1> retn 3676 <1> 3677 <1> 3678 <1> disbad: 3679 00005A91 8B26[B849] <1> mov sp,[savesp2] ;pop junk off stack 3680 00005A95 B8[784B] <1> mov ax, da13 3681 00005A98 50 <1> push ax 3682 <1> _386_PM_o32 ; xor eax, eax 3683 00005A99 31C0 <1> xor ax, ax 3684 <1> _386_PM_o32 ; mov dword [dis_n], eax 3685 00005A9B A3[9C49] <1> mov word [dis_n], ax 3686 00005A9E A3[A049] <1> mov word [preflags], ax ; clear preflags and preused 3687 <1> %if _COND 3688 00005AA1 A3[C049] <1> mov word [condmsg], ax ; initialize conditions message 3689 <1> %endif 3690 00005AA4 C606[B049]80 <1> mov byte [rmsize], 80h ; don't display any memory 3691 00005AA9 A3[1C41] <1> mov word [dismach], ax ; forget about the machine type 3692 00005AAC 8026[BA49]FB <1> and byte [disflags],~DIS_I_SHOW ;and flags 3693 00005AB1 E8C801 <1> call disgetbyte 3694 00005AB4 BF[284A] <1> mov di,prefixlist 3695 00005AB7 B90C00 <1> mov cx,N_PREFIX 3696 00005ABA F2AE <1> repne scasb 3697 00005ABC 740B <1> je .namedprefix ;if it's a named prefix 3698 <1> _386_PM_o32 ; dec dword [dis_n] 3699 00005ABE FF0E[9C49] <1> dec word [dis_n] 3700 00005AC2 BBC101 <1> mov bx,MN_DB ;offset of 'DB' mnemonic 3701 00005AC5 BEB516 <1> mov si, fake_oplist.op_imm8 - oplists 3702 00005AC8 C3 <1> retn 3703 <1> 3704 <1> .namedprefix: 3705 00005AC9 800E[BA49]08 <1> or byte [disflags],DIS_I_UNUSED ;print special flag 3706 00005ACE BB0B00 <1> mov bx,N_PREFIX - 1 3707 00005AD1 29CB <1> sub bx,cx 3708 00005AD3 D1E3 <1> shl bx,1 3709 00005AD5 83FB0C <1> cmp bx, byte (prefixlist.after_segment - prefixlist) *2 3710 00005AD8 7207 <1> jb .segprefix ; if SEG directive --> 3711 <1> %if _PM 3712 <1> cmp bx, byte (prefixlist.size - prefixlist) *2 3713 <1> jb .non16prefix ; if not OSIZE or ASIZE --> 3714 <1> test byte [bCSAttr], 40h; 32-bit code segment ? 3715 <1> jz .non16prefix ; no, O32 or A32 --> 3716 <1> add bx, byte 4 ; yes, change to O16 or A16 3717 <1> .non16prefix: 3718 <1> %endif 3719 00005ADA 8B9F[284A] <1> mov bx,[prefixmnem+bx-(prefixlist.after_segment - prefixlist) *2] 3720 00005ADE 31F6 <1> xor si, si ; no operand (empty oplist) 3721 00005AE0 C3 <1> retn 3722 <1> 3723 <1> .segprefix: 3724 00005AE1 8DB7B716 <1> lea si, [bx + fake_oplist.op_segments - oplists] 3725 <1> ; -> fake OPLIST for segments 3726 00005AE5 BB5108 <1> mov bx,MN_SEG 3727 00005AE8 C3 <1> retn 3728 <1> 3729 <1> 3730 <1> usesection ASMTABLE1 3731 <1> fake_oplist: 3732 <1> .op_imm8: 3733 000016B5 1100 <1> db OP_IMM8, 0 3734 <1> .op_segments: 3735 000016B7 2C00 <1> db OP_ES, 0 3736 000016B9 2A00 <1> db OP_CS, 0 3737 000016BB 2F00 <1> db OP_SS, 0 3738 000016BD 2B00 <1> db OP_DS, 0 3739 <1> %ifdef MN_GS 3740 000016BF 2D00 <1> db OP_FS, 0 3741 000016C1 2E00 <1> db OP_GS, 0 3742 <1> %endif 3743 <1> 3744 <1> usesection lDEBUG_CODE 3745 <1> 3746 <1> 3747 <1> ; GETREGMEM_R - Get the reg part of the reg/mem part of the instruction 3748 <1> ; Uses CL 3749 <1> 3750 <1> getregmem_r: 3751 00005AE9 E80700 <1> call getregmem 3752 <1> 3753 <1> ; INP: al = bits 3 to 5 has value to extract 3754 <1> ; OUT: al = (INP:al >> 3) & 7 3755 <1> ; CHG: cl 3756 <1> da_get_bits_3_to_5: 3757 00005AEC B103 <1> mov cl,3 3758 00005AEE D2E8 <1> shr al,cl 3759 00005AF0 2407 <1> and al,7 3760 00005AF2 C3 <1> ret 3761 <1> 3762 <1> ; GETREGMEM - Get the reg/mem part of the instruction 3763 <1> 3764 <1> getregmem: 3765 00005AF3 F606[A149]80 <1> test byte [preused],GOTREGM 3766 00005AF8 750B <1> jnz grm1 ;if we have it already 3767 00005AFA 800E[A149]80 <1> or byte [preused],GOTREGM 3768 00005AFF E87A01 <1> call disgetbyte ;get the byte 3769 00005B02 A2[1641] <1> mov [regmem],al ;save it away 3770 <1> 3771 00005B05 A0[1641] <1> grm1: mov al,[regmem] 3772 00005B08 C3 <1> ret 3773 <1> 3774 <1> dis_lowercase_w: 3775 00005B09 86C4 <1> xchg al, ah 3776 00005B0B E80200 <1> call dis_lowercase 3777 00005B0E 86C4 <1> xchg al, ah 3778 <1> dis_lowercase: 3779 00005B10 3C41 <1> cmp al, 'A' 3780 00005B12 720D <1> jb .not 3781 00005B14 3C5A <1> cmp al, 'Z' 3782 00005B16 7709 <1> ja .not 3783 00005B18 F606[E800]01 <1> testopt [asm_options], disasm_lowercase 3784 00005B1D 7402 <1> jz .not 3785 00005B1F 0C20 <1> or al, 20h 3786 <1> .not: 3787 00005B21 C3 <1> retn 3788 <1> 3789 <1> 3790 <1> dis_lowercase_refmem_w: 3791 00005B22 86C4 <1> xchg al, ah 3792 00005B24 E80200 <1> call dis_lowercase_refmem 3793 00005B27 86C4 <1> xchg al, ah 3794 <1> dis_lowercase_refmem: 3795 00005B29 3C41 <1> cmp al, 'A' 3796 00005B2B 720D <1> jb .not 3797 00005B2D 3C5A <1> cmp al, 'Z' 3798 00005B2F 7709 <1> ja .not 3799 00005B31 F606[E800]08 <1> testopt [asm_options], disasm_lowercase_refmem 3800 00005B36 7402 <1> jz .not 3801 00005B38 0C20 <1> or al, 20h 3802 <1> .not: 3803 00005B3A C3 <1> retn 3804 <1> 3805 <1> 3806 <1> ; Show the opcode mnemonic 3807 <1> ; 3808 <1> ; INP: si-> Opcode mnemonic string of an mnlist entry. 3809 <1> ; w[si-2] & 0Fh = Length of that string. 3810 <1> ; OUT: di-> next available byte in output line 3811 <1> ; (>= line_out + 32 due to padding) 3812 <1> ; CHG: ax, cx, si 3813 <1> showop: 3814 <1> %if _40COLUMNS 3815 00005B3B BF[B40A] <1> mov di, line_out 3816 00005B3E 033E[9849] <1> add di, word [mnemonofs] 3817 <1> %else 3818 <1> mov di, line_out+MNEMONOFS 3819 <1> %endif 3820 00005B42 56 <1> push si 3821 <1> 3822 00005B43 8B4CFE <1> mov cx, [si-2] 3823 00005B46 83E10F <1> and cx, 0Fh 3824 <1> .loop: 3825 00005B49 AC <1> lodsb 3826 00005B4A E8C3FF <1> call dis_lowercase 3827 00005B4D AA <1> stosb 3828 00005B4E E2F9 <1> loop .loop 3829 <1> 3830 00005B50 58 <1> pop ax ; ax-> mnemonic 3831 00005B51 3D[920B] <1> cmp ax, mnlist_a_suffix_allowed ; non-suffixed mnemonic ? 3832 00005B54 7227 <1> jb .nosuffix ; yes --> 3833 00005B56 3D[B60B] <1> cmp ax, mnlist_o_suffix_allowed ; optional address size suffix ? 3834 00005B59 7208 <1> jb .a_suffix_allowed ; yes --> 3835 00005B5B 3D[2B0C] <1> cmp ax, mnlist_o_suffix_required; optional operand size suffix ? 3836 00005B5E B410 <1> mov ah, PREOSIZE ; (OSIZE: check OSIZE/O32) 3837 00005B60 7309 <1> jae .suffix_decide ; no, it's required --> 3838 00005B62 A9 <1> db __TEST_IMM16 ; (skip mov) 3839 <1> .a_suffix_allowed: 3840 00005B63 B420 <1> mov ah, PREASIZE ; optional ASIZE: check ASIZE/A32 3841 <1> 3842 <1> .suffix_decide_optional: ; check whether the suffix is necessary 3843 00005B65 8426[A049] <1> test byte [preflags], ah ; check if such a prefix occured (ZR if not) 3844 00005B69 740E <1> jz .suffix_invisible ; no, is default form --> (hide suffix) 3845 <1> 3846 <1> .suffix_decide: ; suffix will be displayed, now only decide which 3847 00005B6B B057 <1> mov al, 'W' 3848 00005B6D 8426[A049] <1> test byte [presizeflags], ah ; 32-bit form ? 3849 00005B71 7402 <1> jz .got_suffix ; no --> 3850 00005B73 B044 <1> mov al, 'D' 3851 <1> .got_suffix: 3852 00005B75 E898FF <1> call dis_lowercase 3853 00005B78 AA <1> stosb ; store suffix 3854 <1> 3855 <1> .suffix_invisible: ; notional suffix either displayed or left hidden, 3856 00005B79 0826[A149] <1> or byte [preused], ah ; in any case, mark opcode prefix as used 3857 <1> 3858 <1> .nosuffix: 3859 <1> 3860 <1> ; Store blanks to pad to 8 characters, but at least one 3861 <1> %if _40COLUMNS 3862 00005B7D BE[BC0A] <1> mov si, line_out + 8 3863 00005B80 0336[9849] <1> add si, word [mnemonofs] 3864 <1> %endif 3865 00005B84 B020 <1> mov al, 32 3866 <1> 3867 <1> %if _40COLUMNS 3868 00005B86 F606[E900]02 <1> testopt [asm_options], disasm_no_indent 3869 00005B8B 7506 <1> jnz @F 3870 <1> %endif 3871 <1> .pad: 3872 00005B8D AA <1> stosb ; store a blank 3873 <1> %if _40COLUMNS 3874 00005B8E 39F7 <1> cmp di, si ; past 8 columns already ? 3875 <1> %else 3876 <1> cmp di, line_out+MNEMONOFS+8 3877 <1> %endif 3878 00005B90 72FB <1> jb .pad ; not yet, loop --> 3879 <1> 3880 00005B92 C3 <1> retn 3881 <1> 3882 <1> %if _40COLUMNS 3883 <1> @@: 3884 00005B93 AA <1> stosb ; store a single blank 3885 00005B94 C3 <1> retn 3886 <1> %endif 3887 <1> 3888 <1> 3889 <1> ; INP: byte [segmnt] = number of segment register 3890 <1> ; [segrgnam] = uppercase segment register names 3891 <1> ; CHG: bx, ax 3892 <1> ; OUT: ax = uppercase segment register name 3893 <1> showseg_uppercase_ax: 3894 00005B95 A0[B149] <1> mov al,[segmnt] ;segment number 3895 00005B98 98 <1> cbw 3896 00005B99 D1E0 <1> shl ax,1 3897 00005B9B 93 <1> xchg ax,bx ;mov bx,ax 3898 00005B9C 8B87[F649] <1> mov ax,[segrgnam+bx] ;get register name 3899 00005BA0 C3 <1> retn 3900 <1> 3901 <1> ; SHOWSEG - Show the segment descriptor in SEGMNT 3902 <1> ; Entry DI Where to put it 3903 <1> ; Exit DI Updated 3904 <1> ; Uses AX, BX 3905 <1> 3906 <1> showseg: 3907 00005BA1 E8F1FF <1> call showseg_uppercase_ax 3908 <1> dis_stosw_lowercase: 3909 00005BA4 E862FF <1> call dis_lowercase_w 3910 00005BA7 AB <1> stosw 3911 00005BA8 C3 <1> retn 3912 <1> 3913 <1> 3914 <1> ; Write a size specifier to the buffer 3915 <1> ; and set some flags 3916 <1> ; INP: ah = r/m size value, 3917 <1> ; F0h byte (less than zero) 3918 <1> ; 00h word (equal to zero) 3919 <1> ; 10h dword (greater than zero, but != 20h) 3920 <1> ; 20h qword (greater than zero, == 20h) 3921 <1> ; di-> buffer 3922 <1> ; OUT: di-> behind size specifier in buffer 3923 <1> ; by[rmsize] set 3924 <1> ; wo[sizeloc]-> size specifier in buffer 3925 <1> ; CHG: ax 3926 <1> ; 3927 <1> ; Size specifiers are BYTE, WORD, DWORD, and QWORD. One 3928 <1> ; blank is appended to the size specifier. 3929 <1> ; 3930 <1> ; Size specifiers are lowercased if that option is selected. 3931 <1> showsize: 3932 00005BA9 8826[B049] <1> mov [rmsize], ah ; save r/m size 3933 00005BAD 893E[BE49] <1> mov [sizeloc], di ; save where we're putting this 3934 00005BB1 B051 <1> mov al, 'Q' 3935 00005BB3 80FC20 <1> cmp ah, 20h ; QWORD ? 3936 00005BB6 7412 <1> je .qword ; yes --> 3937 00005BB8 80FC00 <1> cmp ah, 0 3938 00005BBB 7D09 <1> jge .notbyte ; if word or dword --> 3939 <1> .byte: 3940 00005BBD B85445 <1> mov ax, "TE" 3941 00005BC0 50 <1> push ax 3942 00005BC1 B84259 <1> mov ax, "BY" 3943 00005BC4 EB0F <1> jmp s .common 3944 <1> 3945 <1> .notbyte: 3946 00005BC6 7406 <1> je .word ; if word 3947 <1> .dword: 3948 00005BC8 B044 <1> mov al, 'D' 3949 <1> .qword: 3950 00005BCA E843FF <1> call dis_lowercase 3951 00005BCD AA <1> stosb 3952 <1> .word: 3953 00005BCE B85244 <1> mov ax, "RD" 3954 00005BD1 50 <1> push ax 3955 00005BD2 B8574F <1> mov ax, "WO" 3956 <1> .common: 3957 00005BD5 E8CCFF <1> call dis_stosw_lowercase 3958 00005BD8 58 <1> pop ax 3959 00005BD9 E8C8FF <1> call dis_stosw_lowercase 3960 00005BDC B020 <1> mov al, 32 3961 00005BDE AA <1> stosb 3962 <1> showptr.ret: 3963 00005BDF C3 <1> retn 3964 <1> 3965 <1> ; Write "PTR " to a buffer if NASM syntax is not selected. 3966 <1> ; INP: di-> buffer 3967 <1> ; OUT: di-> behind written string "PTR " (or unchanged) 3968 <1> ; CHG: ax 3969 <1> ; 3970 <1> ; The string is lowercased if that option is selected. 3971 <1> showptr: 3972 00005BE0 F606[E800]04 <1> testopt [asm_options], disasm_nasm 3973 00005BE5 75F8 <1> jnz .ret 3974 00005BE7 B85054 <1> mov ax, "PT" 3975 00005BEA E8B7FF <1> call dis_stosw_lowercase 3976 00005BED B85220 <1> mov ax, "R " 3977 00005BF0 EBB2 <1> jmp s dis_stosw_lowercase 3978 <1> 3979 <1> ; Write "DWORD " to a buffer 3980 <1> ; INP: di-> buffer 3981 <1> ; OUT: di-> behind written string "DWORD " 3982 <1> ; CHG: ax 3983 <1> ; 3984 <1> ; The string is lowercased if that option is selected. 3985 <1> showdword: equ showsize.dword 3986 <1> showword: equ showsize.word 3987 <1> 3988 <1> ; DISP32 - Print 32-bit displacement for addressing modes. 3989 <1> ; Entry None 3990 <1> ; Exit None 3991 <1> ; Uses AX 3992 <1> 3993 <1> disp32: 3994 00005BF2 E89D00 <1> call disgetword 3995 <1> .ax: 3996 00005BF5 50 <1> push ax 3997 00005BF6 E89900 <1> call disgetword 3998 00005BF9 E88E3E <1> call hexword 3999 00005BFC 58 <1> pop ax 4000 00005BFD E98A3E <1> jmp hexword 4001 <1> 4002 <1> ; SHOWREG16 - Show 16-bit register name. 4003 <1> ; 4004 <1> ; INP: al = register number, 0 to 7 4005 <1> ; di -> buffer 4006 <1> ; OUT: register name stored to buffer 4007 <1> ; ax = INP:al * 2 4008 <1> showreg16: 4009 00005C00 98 <1> cbw 4010 00005C01 D1E0 <1> shl ax,1 4011 00005C03 93 <1> xchg ax,bx 4012 00005C04 50 <1> push ax 4013 00005C05 8B87[E649] <1> mov ax,[rgnam16+bx] 4014 00005C09 E898FF <1> call dis_stosw_lowercase 4015 00005C0C 58 <1> pop ax 4016 00005C0D 93 <1> xchg ax,bx 4017 00005C0E C3 <1> ret 4018 <1> 4019 <1> 4020 <1> %if _DISASM_32BIT 4021 <1> ; DISCHK32D - Check for O32 (32-bit operand size). 4022 <1> dischk32d: 4023 00005C0F 800E[A149]10 <1> or byte [preused], PREOSIZE 4024 00005C14 F606[A049]10 <1> test byte [presizeflags], PRE32D 4025 00005C19 C3 <1> retn 4026 <1> %endif 4027 <1> 4028 <1> 4029 <1> ; SHOWMACH - Return string "[needs math coprocessor]", etc. 4030 <1> ; Entry di -> table of 5 words 4031 <1> ; cx = instruction 4032 <1> ; Exit si Address of string 4033 <1> ; cx Length of string, or 0 if not needed 4034 <1> ; Uses al, di 4035 <1> 4036 <1> showmach: 4037 00005C1A BE[D938] <1> mov si,needsmsg ; candidate message 4038 00005C1D F606[1D41]01 <1> test byte [dmflags],DM_COPR 4039 00005C22 741E <1> jz sm1 ; if not a coprocessor instruction 4040 00005C24 C6440937 <1> mov byte [si + needsmsg.digit_6_ofs], '7' 4041 <1> ; change message text 4042 00005C28 A0[300B] <1> mov al,[mach_87] 4043 00005C2B 803E[2F0B]00 <1> cmp byte [has_87],0 4044 00005C30 751A <1> jnz sm2 ; if it has a coprocessor 4045 00005C32 A0[2E0B] <1> mov al,[machine] 4046 00005C35 3A06[1C41] <1> cmp al,[dismach] 4047 00005C39 7217 <1> jb sm3 ; if we display the message 4048 00005C3B BE[E438] <1> mov si,needsmath ; print this message instead 4049 00005C3E B91800 <1> mov cx,needsmath_L 4050 00005C41 C3 <1> retn 4051 <1> 4052 <1> sm1: 4053 00005C42 BE[D938] <1> mov si,needsmsg ; candidate message 4054 00005C45 C6440936 <1> mov byte [si + needsmsg.digit_6_ofs], '6' 4055 <1> ; reset message text 4056 00005C49 A0[2E0B] <1> mov al,[machine] 4057 <1> sm2: 4058 00005C4C 3A06[1C41] <1> cmp al,[dismach] 4059 00005C50 730C <1> jae sm4 ; if no message (so far) 4060 <1> sm3: 4061 00005C52 A0[1C41] <1> mov al,[dismach] 4062 00005C55 0430 <1> add al,'0' 4063 00005C57 884407 <1> mov byte [si + needsmsg.digit_x_ofs], al 4064 00005C5A B90B00 <1> mov cx,needsmsg_L ; length of the message 4065 00005C5D C3 <1> retn 4066 <1> 4067 <1> ; Check for obsolete instruction. 4068 <1> sm4: 4069 00005C5E BE[FC38] <1> mov si, obsolete ; candidate message 4070 00005C61 89C8 <1> mov ax, cx ; get info on this instruction 4071 00005C63 B90500 <1> mov cx, 5 4072 00005C66 F2AF <1> repne scasw 4073 00005C68 7511 <1> jne sm6 ; if no matches 4074 00005C6A BF[3641] <1> mov di, obsmach + 5 - 1 4075 00005C6D 29CF <1> sub di, cx 4076 00005C6F 31C9 <1> xor cx, cx ; clear CX: no message 4077 00005C71 A0[300B] <1> mov al, byte [mach_87] 4078 00005C74 3A05 <1> cmp al, byte [di] 4079 00005C76 7E03 <1> jle sm5 ; if this machine is OK 4080 00005C78 B90A00 <1> mov cx, obsolete_L 4081 <1> sm5: 4082 00005C7B C3 <1> retn 4083 <1> 4084 <1> sm6: equ sm5 4085 <1> 4086 <1> 4087 <1> ; DISGETBYTE - Get byte for disassembler. 4088 <1> ; Entry None 4089 <1> ; Exit AL Next byte in instruction stream 4090 <1> ; Uses None 4091 <1> 4092 <1> disgetbyte: 4093 00005C7C 1E <1> push ds 4094 <1> _386_PM_o32 ; push esi 4095 00005C7D 56 <1> push si ; save ds, (e)si 4096 <1> _386_PM_o32 ; mov esi, dword [u_addr] 4097 00005C7E 8B36[840B] <1> mov si, word [u_addr] 4098 <1> _386_PM_o32 ; add esi, dword [dis_n] 4099 00005C82 0336[9C49] <1> add si, word [dis_n] ; index to the right byte 4100 00005C86 8E1E[880B] <1> mov ds, word [u_addr + saSegSel] 4101 <1> _386_PM_a32 4102 00005C8A AC <1> lodsb ; get the byte 4103 <1> _386_PM_o32 ; pop esi 4104 00005C8B 5E <1> pop si 4105 00005C8C 1F <1> pop ds ; restore regs 4106 <1> _386_PM_o32 ; inc dword [dis_n] 4107 00005C8D FF06[9C49] <1> inc word [dis_n] ; indicate that we've gotten this byte 4108 00005C91 C3 <1> retn 4109 <1> 4110 <1> 4111 <1> ; DISGETWORD - Get word for disassembler. 4112 <1> ; Entry None 4113 <1> ; Exit AX Next word 4114 <1> ; Uses None 4115 <1> 4116 <1> disgetword: 4117 00005C92 1E <1> push ds 4118 <1> _386_PM_o32 ; push esi 4119 00005C93 56 <1> push si ; save ds, (e)si 4120 <1> _386_PM_o32 ; mov esi, dword [u_addr] 4121 00005C94 8B36[840B] <1> mov si, word [u_addr] 4122 <1> _386_PM_o32 ; add esi, dword [dis_n] 4123 00005C98 0336[9C49] <1> add si, word [dis_n] ; index to the right byte 4124 00005C9C 8E1E[880B] <1> mov ds, word [u_addr + saSegSel] 4125 <1> _386_PM_a32 4126 00005CA0 AD <1> lodsw ; get the word 4127 <1> _386_PM_o32 ; pop esi 4128 00005CA1 5E <1> pop si 4129 00005CA2 1F <1> pop ds ; restore regs 4130 <1> _386_PM_o32 ; add dword [dis_n], byte 2 4131 00005CA3 8306[9C49]02 <1> add word [dis_n], byte 2 ; indicate that we've gotten this word 4132 00005CA8 C3 <1> retn 4133 <1> 4134 <1> 4135 <1> ; DISSHOWBYTES - Show bytes for the disassembler. 4136 <1> ; Entry BX Number of bytes (must be > 0) 4137 <1> ; di-> output line 4138 <1> ; Exit u_addr updated 4139 <1> ; Uses BX, (E)SI. 4140 <1> 4141 <1> disshowbytes: 4142 <1> _386_PM_o32 ; mov esi, dword [u_addr] 4143 00005CA9 8B36[840B] <1> mov si, word [u_addr] 4144 00005CAD 8E1E[880B] <1> mov ds, word [u_addr + saSegSel] 4145 <1> .loop: 4146 <1> _386_PM_a32 4147 00005CB1 AC <1> lodsb 4148 00005CB2 E8DC3D <1> call hexbyte 4149 00005CB5 4B <1> dec bx 4150 00005CB6 75F9 <1> jnz .loop 4151 00005CB8 16 <1> push ss 4152 00005CB9 1F <1> pop ds 4153 <1> _386_PM_o32 ; mov dword [u_addr], esi 4154 00005CBA 8936[840B] <1> mov word [u_addr], si 4155 00005CBE C3 <1> retn 4156 <1> 4157 <1> ; MOVEOVER - Move the line to the right. 4158 <1> ; Entry DI Last address + 1 of line so far 4159 <1> ; CX Number of bytes to move 4160 <1> ; Exit DI Updated 4161 <1> ; Uses SI 4162 <1> moveover: 4163 00005CBF 833E[BE49]00 <1> cmp word [sizeloc], byte 0 4164 00005CC4 7404 <1> je mo1 ; if sizeloc not saved 4165 00005CC6 010E[BE49] <1> add word [sizeloc], cx 4166 <1> 4167 <1> mo1: 4168 00005CCA 89FE <1> mov si, di 4169 00005CCC 01CF <1> add di, cx 4170 00005CCE 89F9 <1> mov cx, di 4171 <1> %if _40COLUMNS 4172 00005CD0 81E9[B40A] <1> sub cx, line_out 4173 00005CD4 2B0E[9849] <1> sub cx, word [mnemonofs] 4174 <1> %else 4175 <1> sub cx, line_out+MNEMONOFS 4176 <1> %endif 4177 00005CD8 57 <1> push di 4178 00005CD9 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 4179 00005CDA 4E <1> dec si 4180 00005CDB 4F <1> dec di 4181 <1> 4182 <1> 4183 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 4184 <1> ; Refer to comment in init.asm init_movp. 4185 <1> 4186 <1> %if _AMD_ERRATUM_109_WORKAROUND 4187 00005CDC E308 <1> jcxz @FF 4188 00005CDE 83F914 <1> cmp cx, 20 4189 00005CE1 7703 <1> ja @FF 4190 <1> @@: 4191 00005CE3 A4 <1> movsb 4192 00005CE4 E2FD <1> loop @B 4193 <1> @@: 4194 <1> %endif 4195 00005CE6 F3A4 <1> rep movsb 4196 00005CE8 5F <1> pop di 4197 00005CE9 FC <1> cld 4198 00005CEA C3 <1> retn 4199 <1> 4200 <1> ..@uu_access_end: 2931 %if _IMMASM 2932 %include "immasm.asm" 2933 %else 2934 immasm: 2935 00005CEB AC lodsb 2936 00005CEC E8B03C call chkeol 2937 00005CEF E90EA3 jmp cmd3 2938 %endif 2939 %if _HELP_COMPRESSED 2940 overridedef STANDALONE, 0 2941 %include "hshrink.asm" 2942 resetdef STANDALONE 2943 %endif 2944 2945 2946 usesection lDEBUG_DATA_ENTRY 2947 2948 %if _PM || _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 2949 align 4, db 0 2950 00004A94 00000000 exception_csip: dd 0 ; 16:16 far 16-bit address of debugger exception 2951 %if _AREAS 2952 00004A98 0000 exception_stack:times 4 dw 0 2953 ; stack of debugger exception 2954 %endif 2955 %endif 2956 2957 %if _PM 2958 %include "pmdata.asm" 2959 %include "pminit.asm" 2960 %include "pmentry.asm" 2961 2962 2963 usesection lDEBUG_CODE 2964 2965 resetmode_and_test_d_b_bit: 2966 %if _PM 2967 call resetmode 2968 %endif 2969 2970 ; Test if bx is a 32-bit selector 2971 ; (as opposed to a 16-bit selector or a segment) 2972 ; 2973 ; INP: bx = selector (PM) or segment (86M) 2974 ; OUT: NZ = 32-bit 2975 ; ZR = 16-bit (always if 86M) 2976 ; NC 2977 ; REM: This checks whether a code segment's D bit or 2978 ; a stack segment's B bit is set. This operation 2979 ; is not meaningful otherwise. 2980 test_d_b_bit: section_of_function 2981 _386 call ispm 2982 _386 jz .pm ; 386 and PM, check selector --> 2983 ; not PM or no 386 2984 .ZR: 2985 cmp al, al ; ZR, NC 2986 retn 2987 .pm: 2988 [cpu 386] 2989 push eax 2990 xor eax, eax ; use rights = 0 if inaccessible 2991 lar eax, ebx ; access rights 2992 ; eax is unchanged if the access rights are inaccessible 2993 ; (and NZ is set in that case) 2994 test eax, 400000h ; test bit (NC) 2995 pop eax 2996 retn 2997 __CPU__ 2998 2999 3000 ; Test if selector in bx has a limit beyond 64 KiB - 1 B 3001 ; 3002 ; INP: bx = selector (PM) or segment (86M) 3003 ; OUT: NZ = limit above 64 KiB - 1 B 3004 ; ZR = limit below 64 KiB (always if 86M) 3005 ; NC 3006 test_high_limit: section_of_function 3007 _386 call ispm 3008 _386 jz .pm ; 386 and PM, check selector --> 3009 ; not PM or no 386 3010 jmp test_d_b_bit.ZR 3011 3012 .pm: 3013 [cpu 386] 3014 push eax 3015 xor eax, eax ; use limit = 0 if inaccessible 3016 lsl eax, ebx ; segment limit 3017 ; eax is unchanged if the segment limit is inaccessible 3018 ; (and NZ is set in that case) 3019 test eax, 0FFFF_0000h ; (NC) ZR if low limit, else NZ 3020 pop eax 3021 retn 3022 __CPU__ 3023 3024 subcpureset ; subcpu used in pminit.asm 3025 %endif ; _PM 3026 3027 %if _NOEXTENDER 3028 ; When we support non-extended DPMI, some calls to Int21 3029 ; are (extended) Int21 calls and some are (not extended) 3030 ; calls down to the real mode Int21. doscall is a macro 3031 ; that will always call the non-extended Int21. 3032 3033 ; Execute a non-extended DOS call 3034 _doscall: section_of_function 3035 pushf 3036 call ispm 3037 jnz .rm 3038 subcpu 286 3039 ; Execute a non-extended DOS call from PM 3040 popf 3041 .pm: 3042 push word [ss:pspdbg] 3043 push 21h 3044 call intcall 3045 retn 3046 subcpureset 3047 .rm: 3048 popf 3049 jmp _int21 3050 %endif 3051 3052 3053 %if _DUALCODE 3054 %push 3055 %assign %$counter 0 3056 3057 %rep 2 3058 3059 %if %$counter == 0 3060 %define %$currentindex 0 3061 %define %$currentname lDEBUG_CODE 3062 %define %$othername lDEBUG_CODE2 3063 %define %$othersegvar code2_seg 3064 %define %$otherselvar code2_sel 3065 %else 3066 %define %$currentindex 1 3067 %define %$currentname lDEBUG_CODE2 3068 %define %$othername lDEBUG_CODE 3069 %define %$othersegvar code_seg 3070 %define %$otherselvar code_sel 3071 %endif 3072 3073 usesection %$currentname 3074 %if _PM 3075 %$currentname %+ _to_ %+ %$currentname %+ _dualcall_helper: 3076 push ax ; placeholder 3077 push ax ; chain 3078 lframe 0 3079 lpar word, offset_segment 3080 lpar word, placeholder 3081 lpar word, chain 3082 lenter 3083 pushf 3084 push ax 3085 push bx 3086 mov bx, word [bp + ?offset_segment] 3087 %if _DEBUG 3088 mov word [bp + ?placeholder], bx 3089 inc bx 3090 inc bx 3091 mov ax, word [cs:bx] 3092 %else 3093 mov ax, word [cs:bx] 3094 inc bx 3095 inc bx 3096 mov word [bp + ?placeholder], bx 3097 %endif 3098 mov word [bp + ?chain], ax 3099 mov word [bp + ?offset_segment], %$$currentindex 3100 pop bx 3101 pop ax 3102 popf 3103 lleave 3104 retn 3105 3106 %$currentname %+ _to_ %+ %$othername %+ _dualcall_helper: 3107 push ax ; placeholder 3108 push ax ; chain 3109 push ax ; chain 3110 lframe 0 3111 lpar word, offset_segment 3112 lpar word, placeholder 3113 lpar dword, chain 3114 lenter 3115 pushf 3116 push ax 3117 push bx 3118 mov bx, word [bp + ?offset_segment] 3119 %if _DEBUG 3120 mov word [bp + ?placeholder], bx 3121 inc bx 3122 inc bx 3123 mov ax, word [cs:bx] 3124 %else 3125 mov ax, word [cs:bx] 3126 inc bx 3127 inc bx 3128 mov word [bp + ?placeholder], bx 3129 %endif 3130 mov word [bp + ?chain], ax 3131 mov ax, word [ss:%$$otherselvar] 3132 call _CURRENT_SECTION %+ _ispm 3133 jz .pm1 3134 mov ax, word [ss:%$$othersegvar] 3135 .pm1: 3136 mov word [bp + ?chain + 2], ax 3137 mov word [bp + ?offset_segment], %$$currentindex 3138 pop bx 3139 pop ax 3140 popf 3141 lleave 3142 retf 3143 3144 3145 %$currentname %+ _dualret_helper: 3146 lframe near 3147 lpar word, index_segment 3148 lpar word, offset 3149 lpar_return 3150 lenter 3151 pushf 3152 push ax 3153 3154 mov ax, word [ss:code_sel] 3155 call _CURRENT_SECTION %+ _ispm 3156 jz .pm1 3157 mov ax, word [ss:code_seg] 3158 .pm1: 3159 cmp word [bp + ?index_segment], 1 3160 jb .got 3161 mov ax, word [ss:code2_sel] 3162 call _CURRENT_SECTION %+ _ispm 3163 jz .pm2 3164 mov ax, word [ss:code2_seg] 3165 .pm2: 3166 .got: 3167 mov word [bp + ?index_segment], ax 3168 pop ax 3169 popf 3170 lleave 3171 lret 3172 %endif 3173 3174 3175 %ifn _DUALCODE && ! _PM && _DUALCODENEARDUAL 3176 %$currentname %+ _to_ %+ %$othername %+ _nearcall_helper: 3177 push ax ; return_offset 3178 push ax ; placeholder 3179 push ax ; chain 3180 push ax ; chain 3181 lframe 0 3182 lpar word, offset_segment 3183 lpar word, return_offset ; far return 3184 lpar word, placeholder ; near return 3185 lpar dword, chain ; far target address 3186 lenter 3187 pushf 3188 push ax 3189 push bx 3190 mov bx, word [bp + ?offset_segment] 3191 %if _DEBUG 3192 mov word [bp + ?return_offset], bx 3193 inc bx 3194 inc bx 3195 mov ax, word [cs:bx] 3196 %else 3197 mov ax, word [cs:bx] 3198 inc bx 3199 inc bx 3200 mov word [bp + ?return_offset], bx 3201 %endif 3202 mov word [bp + ?chain], ax 3203 3204 %if _PM 3205 mov ax, word [ss:%$$otherselvar] 3206 call _CURRENT_SECTION %+ _ispm 3207 jz .pm1 3208 %endif 3209 mov ax, word [ss:%$$othersegvar] 3210 .pm1: 3211 mov word [bp + ?chain + 2], ax 3212 %if _PM 3213 mov word [bp + ?offset_segment], %$$currentindex 3214 %else 3215 mov word [bp + ?offset_segment], cs 3216 %endif 3217 mov word [bp + ?placeholder], %$$othername %+ _retf_from_dual 3218 pop bx 3219 pop ax 3220 popf 3221 lleave 3222 retf 3223 3224 %$currentname %+ _retf_from_dual: 3225 dualreturn 3226 retf 3227 %endif 3228 3229 3230 %assign %$counter %$counter + 1 3231 %endrep 3232 %pop 3233 %endif 3234 3235 3236 usesection lDEBUG_CODE 3237 3238 %if _SYMBOLIC 3239 %include "symbols.asm" 3240 %else 3241 3242 %if _PM 3243 3244 3245 usesection SECTION_OF_ %+ selector_to_segment 3246 3247 ; For branches other than symbolic, here's selector_to_segment 3248 ; (as used by the puts in lineio.asm). Picked from symsnip 3249 ; binsrch.asm at revision 9c232415d568. 3250 ; INP: word [ss:sp] = selector to access 3251 ; OUT: word [ss:sp] = segment value to use for access 3252 ; CHG: - 3253 dualfunction 3254 selector_to_segment: section_of_function 3255 lframe dualdistance 3256 lpar word, in_selector_out_segment 3257 lpar_return 3258 lenter 3259 3260 call _CURRENT_SECTION %+ _ispm 3261 ; is it PM ? 3262 jnz .ret ; no, 86M --> (selector == segment) 3263 3264 subcpu 286 3265 push ax 3266 push bx 3267 push cx 3268 push dx 3269 3270 mov bx, word [bp + ?in_selector_out_segment] 3271 mov ax, 6 3272 int 31h ; get segment base to cx:dx 3273 shr dx, 4 3274 shl cx, 12 3275 or dx, cx 3276 mov word [bp + ?in_selector_out_segment], dx 3277 3278 pop dx 3279 pop cx 3280 pop bx 3281 pop ax 3282 subcpureset 3283 3284 .ret: 3285 lleave 3286 dualreturn 3287 lret 3288 %endif 3289 3290 %endif 3291 3292 3293 ; support functions for symbols.asm 3294 usesection lDEBUG_CODE 3295 %if _PM 3296 dualfunction 3297 push_cxdx_or_edx: section_of_function 3298 lframe dualdistance 3299 lpar dword, return 3300 lpar_return 3301 lenter 3302 _no386 push cx 3303 _386_o32 3304 push dx 3305 pop word [bp + ?return] 3306 pop word [bp + ?return + 2] 3307 lleave 3308 dualreturn 3309 lret 3310 %endif 3311 3312 ; INP: ds:dx -> message 3313 ; cx = length 3314 ; CHG: - 3315 ; STT: ds, es don't care 3316 disp_message_length_cx: section_of_function 3317 00005CF2 50 push ax 3318 00005CF3 53 push bx 3319 00005CF4 51 push cx 3320 00005CF5 52 push dx 3321 00005CF6 06 push es 3322 00005CF7 1E push ds 3323 00005CF8 1E push ds 3324 00005CF9 07 pop es ; es:dx -> message, cx = length 3325 00005CFA 16 push ss 3326 00005CFB 1F pop ds ; ds = ss (required for puts) 3327 00005CFC E8CF3D call puts 3328 00005CFF 1F pop ds 3329 00005D00 07 pop es 3330 00005D01 5A pop dx 3331 00005D02 59 pop cx 3332 00005D03 5B pop bx 3333 00005D04 58 pop ax 3334 00005D05 C3 retn 3335 3336 ; INP: ds:dx -> message, ASCIZ 3337 ; CHG: - 3338 ; STT: ds, es don't care 3339 disp_message: section_of_function 3340 00005D06 06 push es 3341 00005D07 1E push ds 3342 00005D08 07 pop es ; es:dx -> message 3343 00005D09 E8A742 call putsz ; (sets up ds = ss internally) 3344 00005D0C 07 pop es 3345 00005D0D C3 retn 3346 3347 ; INP: al = character to display 3348 ; CHG: - 3349 ; STT: ds, es don't care 3350 disp_al: equ putc 3351 3352 3353 ; Display number in ax hexadecimal, always 4 digits 3354 ; 3355 ; INP: ax = number 3356 ; OUT: displayed using disp_al 3357 ; CHG: none 3358 disp_ax_hex: section_of_function 3359 00005D0E 86C4 xchg al, ah 3360 00005D10 E80200 nearcall disp_al_hex 3361 00005D13 86C4 xchg al, ah 3362 disp_al_hex: section_of_function 3363 00005D15 51 push cx 3364 00005D16 B104 mov cl, 4 3365 00005D18 D2C0 rol al, cl 3366 00005D1A E80300 nearcall disp_al_nybble_hex 3367 00005D1D D2C0 rol al, cl 3368 00005D1F 59 pop cx 3369 disp_al_nybble_hex: section_of_function 3370 00005D20 50 push ax 3371 00005D21 240F and al, 0Fh 3372 00005D23 0430 add al, '0' 3373 00005D25 3C39 cmp al, '9' 3374 00005D27 7602 jbe @F 3375 00005D29 0407 add al, -'9' -1 +'A' 3376 @@: 3377 00005D2B E8A742 nearcall disp_al 3378 00005D2E 58 pop ax 3379 00005D2F C3 retn 3380 3381 3382 ; Display number in ax decimal 3383 ; 3384 ; INP: ax = number 3385 ; OUT: displayed using disp_al 3386 ; CHG: none 3387 disp_ax_dec: section_of_function ; ax (no leading zeros) 3388 00005D30 53 push bx 3389 00005D31 31DB xor bx, bx 3390 .pushax: 3391 00005D33 52 push dx 3392 00005D34 50 push ax 3393 00005D35 08DB or bl, bl 3394 00005D37 7405 jz .nobl 3395 00005D39 80EB05 sub bl, 5 3396 00005D3C F6DB neg bl 3397 .nobl: 3398 00005D3E 51 push cx 3399 00005D3F B91027 mov cx, 10000 3400 00005D42 E81B00 call .divide_out 3401 00005D45 B9E803 mov cx, 1000 3402 00005D48 E81500 call .divide_out 3403 00005D4B B96400 mov cx, 100 3404 00005D4E E80F00 call .divide_out 3405 00005D51 B10A mov cl, 10 3406 00005D53 E80A00 call .divide_out 3407 ; (Divisor 1 is useless) 3408 00005D56 0430 add al, '0' 3409 00005D58 E87A42 nearcall disp_al 3410 00005D5B 59 pop cx 3411 00005D5C 58 pop ax 3412 00005D5D 5A pop dx 3413 00005D5E 5B pop bx ; Caller's register 3414 00005D5F C3 retn 3415 3416 3417 ; INP: ax = number 3418 ; cx = divisor 3419 ; OUT: ax = remainder of operation 3420 ; result displayed 3421 .divide_out: 3422 00005D60 52 push dx 3423 00005D61 31D2 xor dx, dx 3424 00005D63 F7F1 div cx ; 0:ax / cx 3425 00005D65 52 push dx ; remainder 3426 00005D66 FECB dec bl 3427 00005D68 7503 jnz .nobl2 3428 00005D6A 80CF01 or bh, 1 3429 .nobl2: 3430 00005D6D 08C7 or bh, al 3431 00005D6F 7405 jz .leadingzero 3432 00005D71 0430 add al, '0' 3433 00005D73 E85F42 nearcall disp_al ; display result 3434 .leadingzero: 3435 00005D76 58 pop ax ; remainder 3436 00005D77 5A pop dx 3437 00005D78 C3 retn 3438 3439 3440 %include "cc.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug C command (compare) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 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 19 <1> 20 <1> %if _COUNT 21 <1> count_cmd: 22 00005D79 E8343C <1> call skipcomma 23 <1> 24 00005D7C 4E <1> dec si 25 00005D7D BA[0A1F] <1> mov dx, msg.range 26 00005D80 E89D3B <1> call isstring? 27 00005D83 AC <1> lodsb 28 00005D84 7512 <1> jne .notrange 29 <1> 30 00005D86 8B1E[C40C] <1> mov bx, word [reg_ds] ; get range 31 00005D8A 31C9 <1> xor cx, cx 32 00005D8C E80D29 <1> nearcall getrangeX ; try to get range 33 00005D8F E80D3C <1> call chkeol ; and insure end-of-line 34 <1> ; successful if it returned 35 <1> _386_PM_o32 ; mov esi, edx 36 00005D92 89D6 <1> mov si, dx ; bx:esi-> source string 37 <1> _386_PM_o32 ; sub ecx, edx 38 00005D94 29D1 <1> sub cx, dx ; ecx = count - 1 39 00005D96 EB0C <1> jmp short .setesedi 40 <1> 41 <1> .notrange: 42 00005D98 E8812A <1> nearcall getstr ; get string of bytes 43 00005D9B 81EF[B40A] <1> sub di, line_out ; di = number of bytes to look for 44 00005D9F 7405 <1> jz .0 45 00005DA1 89F9 <1> mov cx, di 46 00005DA3 49 <1> dec cx 47 <1> _386_PM movzx ecx, cx ; ecx = count - 1 48 <1> .setesedi: 49 00005DA4 85E4 <1> test sp, sp ; (NZ) 50 <1> .0: 51 00005DA6 E80800 <1> call count_store.maybe_0 52 00005DA9 BF[B40A] <1> mov di, line_out 53 00005DAC E9820D <1> jmp hh.single 54 <1> %endif 55 <1> 56 <1> 57 <1> %if _COUNT || _SCOUNT 58 <1> count_store: 59 00005DAF 85E4 <1> test sp, sp ; (NZ) 60 <1> .maybe_0: 61 00005DB1 BB0000 <1> mov bx, 0 62 00005DB4 89DA <1> mov dx, bx 63 00005DB6 7408 <1> jz .0 64 <1> _386_PM_o32 65 00005DB8 51 <1> push cx 66 00005DB9 5A <1> pop dx 67 <1> _386_PM pop bx 68 00005DBA 83C201 <1> add dx, 1 69 00005DBD 83D300 <1> adc bx, 0 70 <1> .0: 71 00005DC0 8916[604C] <1> mov word [count_var], dx 72 00005DC4 891E[624C] <1> mov word [count_var + 2], bx 73 00005DC8 C3 <1> retn 74 <1> %endif 75 <1> 76 <1> %if _CLEAR 77 <1> clear_cmd: 78 00005DC9 AC <1> lodsb 79 00005DCA E8D23B <1> call chkeol 80 00005DCD BA[9C1E] <1> mov dx, msg.clear_sequence 81 00005DD0 E9E041 <1> jmp putsz 82 <1> %endif 83 <1> 84 <1> ; C command - compare bytes. 85 <1> cc: 86 <1> %if _COUNT || _CLEAR 87 00005DD3 4E <1> dec si 88 00005DD4 4E <1> dec si 89 <1> %if _COUNT 90 00005DD5 BA[901E] <1> mov dx, msg.count 91 00005DD8 E8453B <1> call isstring? 92 00005DDB 749C <1> je count_cmd 93 <1> %endif 94 <1> %if _CLEAR 95 00005DDD BA[961E] <1> mov dx, msg.clear 96 00005DE0 E83D3B <1> call isstring? 97 00005DE3 74E4 <1> je clear_cmd 98 <1> %endif 99 00005DE5 46 <1> inc si 100 00005DE6 AC <1> lodsb 101 <1> %endif 102 <1> %if _PM 103 <1> mov di, getaddrX ; second parameter needn't be writable 104 <1> %endif 105 00005DE7 E8BF27 <1> call parsecm ; parse arguments 106 <1> 107 <1> ; To make the 16-bit 64 KiB compare hack below work, the 108 <1> ; full ecx mustn't be increased here for 16-bit segments. 109 <1> ; The passed ecx isn't higher than FFFFh for 16-bit segments, 110 <1> ; and a value of 0001_0000h needs to be passed as zero to 111 <1> ; the hack anyway. 112 <1> %if _PM 113 <1> cmp byte [ss:bAddr32], 0 114 <1> je .16 115 <1> [cpu 386] 116 <1> inc ecx 117 <1> jnz cc1 118 <1> jmp error 119 <1> __CPU__ 120 <1> .16: 121 <1> %endif 122 00005DEA 41 <1> inc cx 123 <1> cc1: 124 00005DEB 1E <1> push ds 125 00005DEC 06 <1> push es 126 00005DED 16 <1> push ss 127 00005DEE 1F <1> pop ds ; ds := cs 128 00005DEF E83927 <1> call dohack ; do the interrupt pointer hack 129 00005DF2 07 <1> pop es 130 00005DF3 1F <1> pop ds 131 <1> %if _PM 132 <1> cmp byte [ss:bAddr32], 0 133 <1> jz .cmp16 134 <1> a32 repe cmpsb 135 <1> mov dl, byte [esi-1] 136 <1> mov dh, byte [es:edi-1] 137 <1> jmp short .cmpdone 138 <1> .cmp16: 139 <1> %endif 140 <1> ; The following 3 instructions make a hack to support 64 KiB 141 <1> ; compare. The only time we get here with cx = 0 is the first 142 <1> ; iteration for a 64 KiB compare. In that case, dec cx results 143 <1> ; in FFFFh making repe cmpsb work. The single cmpsb will either 144 <1> ; jump the repe cmpsb (if it found a mismatch) or not jump it. 145 <1> ; The repe cmpsb might be executed with cx = 0, but will then 146 <1> ; not change anything including the flags so it works. 147 00005DF4 49 <1> dec cx 148 00005DF5 A6 <1> cmpsb 149 00005DF6 7502 <1> jne .skip 150 00005DF8 F3A6 <1> repe cmpsb ; start comparing 151 <1> .skip: 152 00005DFA 8A54FF <1> mov dl, byte [si-1] ; save the possibly errant characters 153 00005DFD 268A75FF <1> mov dh, byte [es:di-1] 154 <1> .cmpdone: 155 00005E01 9F <1> lahf 156 00005E02 1E <1> push ds 157 00005E03 06 <1> push es 158 00005E04 16 <1> push ss 159 00005E05 1F <1> pop ds 160 00005E06 E83627 <1> call unhack ; undo the interrupt pointer hack 161 00005E09 07 <1> pop es 162 00005E0A 1F <1> pop ds 163 00005E0B 9E <1> sahf 164 00005E0C 744A <1> je cc2 ; if we're done 165 00005E0E 06 <1> push es 166 00005E0F 16 <1> push ss 167 00005E10 07 <1> pop es 168 <1> _386_PM_o32 ; mov ebx, edi 169 00005E11 89FB <1> mov bx, di 170 00005E13 BF[B40A] <1> mov di, line_out 171 00005E16 8CD8 <1> mov ax, ds 172 00005E18 E86F3C <1> call hexword 173 00005E1B B03A <1> mov al, ':' 174 00005E1D AA <1> stosb 175 <1> _386_PM_o32 ; mov eax, esi 176 00005E1E 89F0 <1> mov ax, si 177 <1> _386_PM_o32 ; dec eax 178 00005E20 48 <1> dec ax 179 <1> %if _PM 180 <1> cmp byte [ss:bAddr32], 0 181 <1> jz .16si 182 <1> call hexword_high 183 <1> .16si: 184 <1> %endif 185 00005E21 E8663C <1> call hexword 186 00005E24 B82020 <1> mov ax, 32<<8|32 187 00005E27 AB <1> stosw 188 00005E28 88D0 <1> mov al, dl 189 00005E2A E8643C <1> call hexbyte 190 00005E2D B82020 <1> mov ax, 32<<8|32 191 00005E30 AB <1> stosw 192 00005E31 88F0 <1> mov al, dh 193 00005E33 E85B3C <1> call hexbyte 194 00005E36 B82020 <1> mov ax, 32<<8|32 195 00005E39 AB <1> stosw 196 00005E3A 58 <1> pop ax 197 00005E3B 50 <1> push ax 198 00005E3C E84B3C <1> call hexword 199 00005E3F B03A <1> mov al, ':' 200 00005E41 AA <1> stosb 201 <1> _386_PM_o32 ; mov eax, ebx 202 00005E42 89D8 <1> mov ax, bx 203 <1> _386_PM_o32 ; dec eax 204 00005E44 48 <1> dec ax 205 <1> %if _PM 206 <1> cmp byte [ss:bAddr32], 0 207 <1> jz .16bx 208 <1> call hexword_high 209 <1> .16bx: 210 <1> %endif 211 00005E45 E8423C <1> call hexword 212 00005E48 1E <1> push ds 213 00005E49 16 <1> push ss 214 00005E4A 1F <1> pop ds 215 00005E4B 53 <1> push bx 216 00005E4C 51 <1> push cx 217 00005E4D E8733C <1> call putsline_crlf 218 00005E50 59 <1> pop cx 219 00005E51 5F <1> pop di 220 00005E52 1F <1> pop ds 221 00005E53 07 <1> pop es 222 <1> %if _PM 223 <1> cmp byte [ss:bAddr32],0 224 <1> jz cc1_6 225 <1> [cpu 386] 226 <1> jecxz cc2 227 <1> __CPU__ 228 <1> cc1_j1: 229 <1> jmp cc1 230 <1> cc1_6: 231 <1> %else 232 <1> cc1_j1 equ cc1 233 <1> %endif 234 <1> %if 0 235 <1> _386_PM_o32 ; inc ecx 236 <1> inc cx 237 <1> _386_PM_a32 ; loopd cc1 238 <1> loop cc1 ; if not done yet 239 <1> %else 240 <1> _386_PM_a32 ; jecxz cc2 241 00005E54 E302 <1> jcxz cc2 242 00005E56 EB93 <1> jmp cc1 ; if not done yet 243 <1> %endif 244 <1> cc2: 245 00005E58 16 <1> push ss ; restore segment registers 246 00005E59 1F <1> pop ds 247 00005E5A 16 <1> push ss 248 00005E5B 07 <1> pop es 249 00005E5C C3 <1> retn 3441 3442 3443 %include "bb.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug B commands (permanent breakpoints, break upwards) 5 <1> 6 <1> Copyright (C) 2008-2022 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> usesection lDEBUG_DATA_ENTRY 18 <1> 19 <1> bb_dispatch: 20 <1> .scan: 21 <1> %if _BREAKPOINTS 22 00004AA0 50 <1> db 'P' 23 00004AA1 4E <1> db 'N' 24 00004AA2 43 <1> db 'C' 25 00004AA3 44 <1> db 'D' 26 00004AA4 45 <1> db 'E' 27 00004AA5 54 <1> db 'T' 28 00004AA6 4C <1> db 'L' 29 00004AA7 49 <1> db 'I' 30 00004AA8 57 <1> db 'W' 31 <1> %if BPSIZE == 6 || BPSIZE == 9 32 00004AA9 4F <1> db 'O' 33 <1> %endif 34 00004AAA 53 <1> db 'S' 35 <1> %endif 36 00004AAB 55 <1> db 'U' ; BU command 37 00004AAC 00 <1> db 0 ; placeholder, never matches 38 <1> .scanamount: equ $ - .scan 39 <1> 40 00004AAD 00 <1> align 2, db 0 41 <1> .offset: 42 <1> %if _BREAKPOINTS 43 00004AAE [885E] <1> dw point_set 44 00004AB0 [4E60] <1> dw point_number 45 00004AB2 [E262] <1> dw point_clear 46 00004AB4 [2064] <1> dw point_disable 47 00004AB6 [1364] <1> dw point_enable 48 00004AB8 [2B64] <1> dw point_toggle 49 00004ABA [3664] <1> dw point_list 50 00004ABC [A060] <1> dw point_id 51 00004ABE [E161] <1> dw point_when 52 <1> %if BPSIZE == 6 || BPSIZE == 9 53 00004AC0 [8561] <1> dw point_offset 54 <1> %endif 55 00004AC2 [D566] <1> dw point_swap 56 <1> %endif 57 00004AC4 [7C67] <1> dw bu_breakpoint 58 00004AC6 [5D82] <1> dw error 59 <1> .offsetamount: equ ($ - .offset) / 2 60 <1> 61 <1> %if .scanamount != .offsetamount 62 <1> %error bb dispatch mismatch 63 <1> %endif 64 <1> 65 <1> 66 <1> usesection lDEBUG_CODE 67 <1> 68 <1> bb: 69 <1> %if _BOOTLDR 70 <1> %if _APPLICATION || _DEVICE 71 00005E5D F606[D100]40 <1> testopt [internalflags], nodosloaded 72 00005E62 740F <1> jz @F 73 <1> %endif 74 00005E64 4E <1> dec si 75 00005E65 4E <1> dec si ; -> at 'B' 76 00005E66 BA[E118] <1> mov dx, msg.boot 77 00005E69 E8B43A <1> call isstring? ; check for "BOOT" 78 00005E6C 7503E91359 <1> je bootcmd 79 00005E71 46 <1> inc si ; skip 'B' 80 00005E72 AC <1> lodsb ; load next 81 <1> @@: 82 <1> %endif 83 00005E73 E8F83A <1> call uppercase 84 00005E76 BF[A04A] <1> mov di, bb_dispatch.scan 85 00005E79 B90D00 <1> mov cx, bb_dispatch.scanamount 86 00005E7C F2AE <1> repne scasb 87 <1> ; di -> behind the NUL if no valid subcommand 88 00005E7E 81EF[A14A] <1> sub di, bb_dispatch.scan + 1 89 00005E82 D1E7 <1> shl di, 1 90 00005E84 FFA5[AE4A] <1> jmp near word [bb_dispatch.offset + di] 91 <1> 92 <1> 93 <1> %if _BREAKPOINTS 94 <1> point_set: 95 00005E88 E8253B <1> call skipcomma 96 <1> 97 00005E8B E8A207 <1> call getpointat ; "AT" keyword ? 98 00005E8E 720B <1> jc .not_at ; no --> 99 00005E90 BF[CE5E] <1> mov di, .get_saved ; access saved address later 100 00005E93 E85807 <1> call findpointat ; do we find it ? 101 00005E96 7210 <1> jc .find_new ; no, treat as if "NEW" keyword given --> 102 <1> ; point index is in dx 103 00005E98 52 <1> push dx 104 00005E99 EB51 <1> jmp @FF ; skip check whether used 105 <1> 106 <1> .not_at: 107 00005E9B BF[C25E] <1> mov di, .get_addr ; get address from input command line later 108 00005E9E E8B007 <1> call getpointindex 109 00005EA1 7338 <1> jnc @F ; got an index --> 110 00005EA3 7503E9B523 <1> jz error ; "ALL" is invalid 111 <1> ; got "NEW" keyword 112 <1> .find_new: 113 00005EA8 31C9 <1> xor cx, cx 114 00005EAA 50 <1> push ax 115 <1> .new_loop: 116 00005EAB 89C8 <1> mov ax, cx ; try this index 117 00005EAD E82F07 <1> call calcpointbit 118 <1> %if ((_NUM_B_BP+7)>>3) != 1 119 00005EB0 84A7[0804] <1> test byte [b_bplist.used_mask+bx], ah 120 <1> %else 121 <1> test byte [b_bplist.used_mask], ah 122 <1> %endif 123 00005EB4 7421 <1> jz .new_found ; found unused one --> 124 <1> 125 00005EB6 41 <1> inc cx ; = next index 126 00005EB7 83F910 <1> cmp cx, _NUM_B_BP ; valid ? 127 00005EBA 72EF <1> jb .new_loop ; yes, try next --> 128 <1> 129 00005EBC BA[9527] <1> mov dx, msg.bb_no_new 130 00005EBF E9D5A6 <1> jmp prnquit 131 <1> 132 <1> 133 <1> ; INP: al=, si-> input line 134 <1> ; OUT: al=, si-> after 135 <1> ; bx:dx = linear adddress 136 <1> ; does not return if error 137 <1> ; CHG: edxh 138 <1> .get_addr: 139 00005EC2 8B1E[D00C] <1> mov bx, word [reg_cs] 140 00005EC6 E84BDD <1> call getlinearaddr 141 00005EC9 730B <1> jnc .retn 142 00005ECB E98F23 <1> jmp error 143 <1> 144 <1> 145 <1> ; INP: al=, si-> input line 146 <1> ; OUT: bx:dx = linear address 147 <1> ; CHG: - 148 <1> .get_saved: 149 00005ECE 8B16[C84A] <1> mov dx, word [..@bb_saved_linear] 150 00005ED2 8B1E[CA4A] <1> mov bx, word [..@bb_saved_linear + 2] 151 <1> .retn: 152 00005ED6 C3 <1> retn 153 <1> 154 <1> usesection lDEBUG_DATA_ENTRY 155 <1> align 4, db 0 156 <1> ..@bb_saved_linear: 157 00004AC8 00000000 <1> dd 0 158 <1> usesection lDEBUG_CODE 159 <1> 160 <1> 161 <1> .new_found: 162 00005ED7 58 <1> pop ax 163 00005ED8 51 <1> push cx 164 00005ED9 EB11 <1> jmp @FF 165 <1> 166 <1> @@: 167 00005EDB 52 <1> push dx 168 00005EDC 50 <1> push ax 169 00005EDD 89D0 <1> mov ax, dx 170 00005EDF E8FD06 <1> call calcpointbit 171 <1> %if ((_NUM_B_BP+7)>>3) != 1 172 00005EE2 84A7[0804] <1> test byte [b_bplist.used_mask+bx], ah 173 <1> %else 174 <1> test byte [b_bplist.used_mask], ah 175 <1> %endif 176 00005EE6 58 <1> pop ax 177 00005EE7 7403E97123 <1> jnz error 178 <1> @@: 179 00005EEC FFD7 <1> call di ; call either .get_addr or .get_saved 180 <1> ; in any case, bx:dx = linear address 181 00005EEE BF0080 <1> mov di, 8000h ; default counter 182 00005EF1 52 <1> push dx 183 00005EF2 31D2 <1> xor dx, dx 184 <1> 185 <1> usesection lDEBUG_DATA_ENTRY 186 <1> align 4, db 0 187 <1> ..@bb_id_start: 188 00004ACC 0000 <1> dw 0 189 <1> ..@bb_id_length: 190 00004ACE 0000 <1> dw 0 191 <1> ..@bb_when_start: 192 00004AD0 0000 <1> dw 0 193 <1> ..@bb_when_length: 194 00004AD2 0000 <1> dw 0 195 <1> usesection lDEBUG_CODE 196 <1> 197 <1> 198 00005EF4 8916[CE4A] <1> mov word [..@bb_id_length], dx 199 00005EF8 8916[D24A] <1> mov word [..@bb_when_length], dx 200 <1> ; initialise to empty ID 201 00005EFC 52 <1> push dx 202 <1> .loop_additional: 203 00005EFD E8B13A <1> call skipcomm0 204 00005F00 4E <1> dec si 205 00005F01 BA[1C1C] <1> mov dx, msg.number 206 00005F04 E8193A <1> call isstring? 207 00005F07 7435 <1> je .additional_number 208 00005F09 BA[231C] <1> mov dx, msg.counter 209 00005F0C E8113A <1> call isstring? 210 00005F0F 742D <1> je .additional_number 211 00005F11 BA[2B1C] <1> mov dx, msg.id 212 00005F14 E8093A <1> call isstring? 213 00005F17 7454 <1> je .additional_id 214 00005F19 BA[2E1C] <1> mov dx, msg.when 215 00005F1C E8013A <1> call isstring? 216 00005F1F 743E <1> je .additional_when 217 <1> %if BPSIZE == 6 || BPSIZE == 9 218 00005F21 BA[331C] <1> mov dx, msg.offset 219 00005F24 E8F939 <1> call isstring? 220 00005F27 7425 <1> je .additional_offset 221 <1> %endif 222 00005F29 AC <1> lodsb 223 00005F2A E85D3A <1> call iseol? 224 00005F2D 7445 <1> je .no_additional 225 00005F2F 5A <1> pop dx 226 00005F30 85D2 <1> test dx, dx ; already got a number without keyword? 227 00005F32 7403E92623 <1> jnz error ; yes --> 228 00005F37 42 <1> inc dx ; remember for subsequent iterations 229 00005F38 52 <1> push dx 230 00005F39 E8A43A <1> call skipwh0 231 00005F3C EB0B <1> jmp @F 232 <1> 233 <1> .additional_number: 234 00005F3E E8883A <1> call skipequals 235 00005F41 E8463A <1> call iseol? 236 00005F44 7503E91423 <1> je error 237 <1> @@: 238 00005F49 E8CE00 <1> call getcounter 239 00005F4C EBAF <1> jmp .loop_additional 240 <1> 241 <1> %if BPSIZE == 6 || BPSIZE == 9 242 <1> .additional_offset: 243 00005F4E 5A <1> pop dx 244 00005F4F 80CA01 <1> or dl, 1 ; remember for subsequent iterations 245 <1> ; not to accept number without keyword 246 00005F52 52 <1> push dx 247 00005F53 E8733A <1> call skipequals 248 <1> %if _PM 249 <1> push bx 250 <1> nearcall getdword 251 <1> mov word [bp_offset], dx 252 <1> mov word [bp_offset + 2], bx 253 <1> pop bx 254 <1> %else 255 00005F56 E80039 <1> nearcall getword 256 00005F59 8916[2045] <1> mov word [bp_offset], dx 257 <1> %endif 258 00005F5D EB9E <1> jmp .loop_additional 259 <1> %endif 260 <1> 261 <1> .additional_when: 262 00005F5F 5A <1> pop dx 263 00005F60 80CA01 <1> or dl, 1 ; remember for subsequent iterations 264 <1> ; not to accept number without keyword 265 00005F63 52 <1> push dx 266 00005F64 E8623A <1> call skipequals 267 00005F67 4E <1> dec si 268 00005F68 E88400 <1> call get_when 269 00005F6B EB90 <1> jmp .loop_additional 270 <1> 271 <1> .additional_id: 272 00005F6D E8593A <1> call skipequals 273 00005F70 4E <1> dec si 274 00005F71 E84B00 <1> call get_id 275 <1> 276 <1> .no_additional: 277 00005F74 5A <1> pop dx ; discard non-keyword NUMBER indicator 278 00005F75 5A <1> pop dx ; restore dx = low word of linear 279 <1> 280 00005F76 87DA <1> xchg bx, dx ; dx:bx = linear 281 00005F78 93 <1> xchg bx, ax ; dx:ax = linear 282 00005F79 5B <1> pop bx ; = 0-based point index to set 283 00005F7A 52 <1> push dx 284 00005F7B 50 <1> push ax ; on stack: dword linear 285 <1> 286 00005F7C 57 <1> push di 287 00005F7D 87D3 <1> xchg dx, bx ; dx = point index 288 <1> 289 <1> ; As for set_id, set_when will free a prior condition 290 <1> ; when writing the new one. However, we check for the 291 <1> ; appropriate buffer size being still free before 292 <1> ; calling set_when because we want to cancel the point 293 <1> ; initialisation if either the ID or the condition do 294 <1> ; not fit, without having yet written anything. 295 00005F7F E8E702 <1> call check_when_space ; CHG ax, bx, cx, si, di 296 <1> 297 <1> ; Note that point_clear and init both leave the 298 <1> ; empty word in the ID array. Therefore we can 299 <1> ; always handle this by freeing the prior value 300 <1> ; first, which is required if we're resetting 301 <1> ; an existing point with BP AT. 302 <1> ; The set_id function takes care of this. 303 00005F82 E85A01 <1> call set_id ; CHG ax, bx, cx, si, di 304 <1> 305 <1> ; After check_when_space then set_id both returned, 306 <1> ; we have finally checked all error conditions and 307 <1> ; are now actually modifying things. 308 00005F85 E8A502 <1> call set_when ; CHG ax, bx, cx, si, di 309 00005F88 92 <1> xchg ax, dx ; ax = point index 310 00005F89 5F <1> pop di ; preserve counter value 311 <1> 312 00005F8A 89C3 <1> mov bx, ax 313 00005F8C 01DB <1> add bx, bx 314 00005F8E 01DB <1> add bx, bx 315 <1> %if BPSIZE == 4 316 <1> %elif BPSIZE == 5 317 <1> add bx, ax 318 <1> %elif BPSIZE == 6 319 00005F90 01C3 <1> add bx, ax ; * 5 320 00005F92 01C3 <1> add bx, ax ; * 6 321 <1> %elif BPSIZE == 9 322 <1> add bx, bx ; * 8 323 <1> add bx, ax ; * 9 324 <1> %else 325 <1> %error Unexpected breakpoint size 326 <1> %endif 327 00005F94 8F87[0C04] <1> pop word [ b_bplist.bp + bx ] 328 <1> ; These two instructions need to stay in that order. 329 <1> ; For the non-PM version, the pop overwrites the byte 330 <1> ; that is then initialized to 0CCh (the breakpoint 331 <1> ; content byte). 332 <1> ; (This is not true for BPSIZE == 6. Instead, the pop 333 <1> ; overwrites the first byte of the preferred offset.) 334 00005F98 8F87[0E04] <1> pop word [ b_bplist.bp + bx + 2 ] 335 00005F9C C687[1104]CC <1> mov byte [ b_bplist.bp + bx + BPSIZE - 1 ], 0CCh 336 <1> %if BPSIZE == 6 337 00005FA1 FF36[2045] <1> push word [bp_offset] 338 00005FA5 8F87[0F04] <1> pop word [ b_bplist.bp + bx + 3 ] 339 <1> %elif BPSIZE == 9 340 <1> push word [bp_offset] 341 <1> pop word [ b_bplist.bp + bx + 4 ] 342 <1> push word [bp_offset + 2] 343 <1> pop word [ b_bplist.bp + bx + 6 ] 344 <1> %endif 345 00005FA9 89C3 <1> mov bx, ax 346 00005FAB 01DB <1> add bx, bx 347 00005FAD 89BF[6C04] <1> mov word [ b_bplist.counter + bx ], di 348 00005FB1 E82B06 <1> call calcpointbit 349 <1> %if ((_NUM_B_BP+7)>>3) != 1 350 00005FB4 08A7[0804] <1> or byte [b_bplist.used_mask+bx], ah 351 00005FB8 F6D4 <1> not ah 352 00005FBA 20A7[0A04] <1> and byte [b_bplist.disabled_mask+bx], ah 353 <1> %if _BREAKPOINTS_STICKY 354 <1> and byte [b_bplist.sticky_mask+bx], ah 355 <1> %endif 356 <1> %else 357 <1> or byte [b_bplist.used_mask], ah 358 <1> not ah 359 <1> and byte [b_bplist.disabled_mask], ah 360 <1> %if _BREAKPOINTS_STICKY 361 <1> and byte [b_bplist.sticky_mask], ah 362 <1> %endif 363 <1> %endif 364 00005FBE C3 <1> retn 365 <1> 366 <1> 367 <1> ; INP: si -> first non-blank character 368 <1> ; OUT: ..@bb_id_start and ..@bb_id_length set 369 <1> ; does not return if error (too long) 370 <1> ; CHG: ax, cx, si 371 <1> get_id: 372 00005FBF 8936[CC4A] <1> mov word [..@bb_id_start], si 373 <1> @@: 374 00005FC3 AC <1> lodsb 375 00005FC4 E8C739 <1> call iseol?.notsemicolon 376 00005FC7 75FA <1> jne @B 377 <1> ; si -> after EOL char 378 <1> ; si - 1 -> EOL char 379 <1> @@: 380 00005FC9 4E <1> dec si 381 00005FCA 3B36[CC4A] <1> cmp si, word [..@bb_id_start] 382 00005FCE 740C <1> je @F 383 00005FD0 807CFF20 <1> cmp byte [si - 1], 32 384 00005FD4 74F3 <1> je @B 385 00005FD6 807CFF09 <1> cmp byte [si - 1], 9 386 00005FDA 74ED <1> je @B 387 <1> @@: 388 00005FDC 89F1 <1> mov cx, si 389 00005FDE 2B0E[CC4A] <1> sub cx, word [..@bb_id_start] 390 00005FE2 890E[CE4A] <1> mov word [..@bb_id_length], cx 391 00005FE6 83F93F <1> cmp cx, 63 392 00005FE9 7603E96F22 <1> ja error 393 <1> 394 <1> %if 0 395 <1> push dx 396 <1> mov dx, msg.id 397 <1> call putsz 398 <1> mov al, 32 399 <1> call putc 400 <1> mov al, '"' 401 <1> call putc 402 <1> mov dx, word [..@bb_id_start] 403 <1> mov cx, word [..@bb_id_length] 404 <1> call disp_message_length_cx 405 <1> mov al, '"' 406 <1> call putc 407 <1> mov dx, crlf 408 <1> call putsz 409 <1> pop dx 410 <1> %endif 411 00005FEE C3 <1> retn 412 <1> 413 <1> 414 <1> ; INP: si -> first non-blank character 415 <1> ; OUT: ..@bb_when_start and ..@bb_when_length set 416 <1> ; does not return if error 417 <1> ; al = character after the condition, si -> next 418 <1> ; CHG: ax, cx, si 419 <1> get_when: 420 00005FEF 8936[D04A] <1> mov word [..@bb_when_start], si 421 <1> @@: 422 00005FF3 AC <1> lodsb 423 00005FF4 52 <1> push dx 424 00005FF5 53 <1> push bx 425 00005FF6 E87E33 <1> nearcall getexpression 426 00005FF9 5B <1> pop bx 427 00005FFA 5A <1> pop dx 428 <1> ; si -> after condition char 429 <1> ; si - 1 -> last condition char 430 <1> @@: 431 00005FFB 4E <1> dec si 432 00005FFC 3B36[D04A] <1> cmp si, word [..@bb_when_start] 433 00006000 740C <1> je @F 434 00006002 807CFF20 <1> cmp byte [si - 1], 32 435 00006006 74F3 <1> je @B 436 00006008 807CFF09 <1> cmp byte [si - 1], 9 437 0000600C 74ED <1> je @B 438 <1> @@: 439 0000600E 89F1 <1> mov cx, si 440 00006010 2B0E[D04A] <1> sub cx, word [..@bb_when_start] 441 00006014 890E[D24A] <1> mov word [..@bb_when_length], cx 442 <1> 443 00006018 AC <1> lodsb 444 <1> %if 0 445 <1> push dx 446 <1> mov dx, msg.when 447 <1> call putsz 448 <1> mov al, 32 449 <1> call putc 450 <1> mov al, '"' 451 <1> call putc 452 <1> mov dx, word [..@bb_when_start] 453 <1> mov cx, word [..@bb_when_length] 454 <1> call disp_message_length_cx 455 <1> mov al, '"' 456 <1> call putc 457 <1> mov dx, crlf 458 <1> call putsz 459 <1> dec si 460 <1> lodsb 461 <1> pop dx 462 <1> %endif 463 00006019 C3 <1> retn 464 <1> 465 <1> 466 <1> ; INP: al = first character, si -> next character 467 <1> ; di = default value 468 <1> ; OUT: di = counter value (default if EOL) 469 <1> ; al = first character after number, si -> next 470 <1> ; CHG: - 471 <1> ; does not return if error encountered 472 <1> getcounter: 473 <1> .: 474 0000601A E8C339 <1> call skipwh0 475 0000601D E86A39 <1> call iseol? 476 00006020 7407 <1> je .got_counter 477 00006022 52 <1> push dx 478 00006023 E83338 <1> nearcall getword 479 00006026 89D7 <1> mov di, dx 480 00006028 5A <1> pop dx 481 <1> .got_counter: 482 00006029 C3 <1> retn 483 <1> 484 <1> 485 <1> ; INP: al = first character, si -> next character 486 <1> ; OUT: di = counter value (defaults to 8000h) 487 <1> ; CHG: ax, si (flags not changed) 488 <1> ; does not return if error encountered 489 <1> .pushf_chkeol: 490 0000602A BF0080 <1> mov di, 8000h ; default counter 491 0000602D 9C <1> pushf 492 0000602E 52 <1> push dx 493 0000602F 4E <1> dec si 494 00006030 BA[1C1C] <1> mov dx, msg.number 495 00006033 E8EA38 <1> call isstring? 496 00006036 7408 <1> je @F 497 00006038 BA[231C] <1> mov dx, msg.counter 498 0000603B E8E238 <1> call isstring? 499 0000603E 7504 <1> jne @FF 500 <1> @@: 501 00006040 E88639 <1> call skipequals 502 00006043 A8 <1> db __TEST_IMM8 ; (skip lodsb) 503 <1> @@: 504 00006044 AC <1> lodsb 505 00006045 5A <1> pop dx 506 00006046 E8D1FF <1> call . 507 00006049 E85339 <1> call chkeol 508 0000604C 9D <1> popf 509 0000604D C3 <1> retn 510 <1> 511 <1> 512 <1> point_number: 513 0000604E E85F39 <1> call skipcomma 514 <1> 515 00006051 E8DC05 <1> call getpointat ; "AT" keyword ? 516 00006054 720D <1> jc .not_at ; no --> 517 00006056 E89505 <1> call findpointat ; do we find it ? 518 00006059 7303E9FF21 <1> jc error ; not found --> 519 0000605E E8C9FF <1> call getcounter.pushf_chkeol 520 00006061 EB26 <1> jmp @F ; point index is in dx --> 521 <1> 522 <1> .not_at: 523 00006063 E8EB05 <1> call getpointindex 524 00006066 E8C1FF <1> call getcounter.pushf_chkeol 525 00006069 731E <1> jnc @F 526 0000606B 7403E9ED21 <1> jnz error ; "NEW" is invalid --> 527 <1> 528 00006070 31C9 <1> xor cx, cx 529 <1> .all_loop: 530 00006072 89C8 <1> mov ax, cx 531 00006074 89CA <1> mov dx, cx 532 00006076 E86605 <1> call calcpointbit 533 <1> %if ((_NUM_B_BP+7)>>3) != 1 534 00006079 84A7[0804] <1> test byte [b_bplist.used_mask+bx], ah 535 <1> %else 536 <1> test byte [b_bplist.used_mask], ah 537 <1> %endif 538 0000607D 7403 <1> jz .all_next 539 0000607F E81500 <1> call .setnumber 540 <1> .all_next: 541 00006082 41 <1> inc cx 542 00006083 83F910 <1> cmp cx, _NUM_B_BP 543 00006086 72EA <1> jb .all_loop 544 00006088 C3 <1> retn 545 <1> 546 <1> @@: 547 00006089 89D0 <1> mov ax, dx 548 0000608B E85105 <1> call calcpointbit 549 <1> %if ((_NUM_B_BP+7)>>3) != 1 550 0000608E 84A7[0804] <1> test byte [b_bplist.used_mask+bx], ah 551 <1> %else 552 <1> test byte [b_bplist.used_mask], ah 553 <1> %endif 554 00006092 7503E9C621 <1> jz error 555 <1> 556 <1> .setnumber: 557 00006097 89D3 <1> mov bx, dx 558 00006099 01DB <1> add bx, bx 559 0000609B 89BF[6C04] <1> mov word [b_bplist.counter + bx], di 560 0000609F C3 <1> retn 561 <1> 562 <1> 563 <1> point_id: 564 000060A0 E80D39 <1> call skipcomma 565 <1> 566 000060A3 E88A05 <1> call getpointat ; "AT" keyword ? 567 000060A6 720A <1> jc .not_at ; no --> 568 000060A8 E84305 <1> call findpointat ; do we find it ? 569 000060AB 7303E9AD21 <1> jc error ; not found --> 570 000060B0 EB08 <1> jmp @F ; point index is in dx --> 571 <1> 572 <1> .not_at: 573 000060B2 E89C05 <1> call getpointindex 574 000060B5 7303E9A321 <1> jc error ; "NEW" and "ALL" keywords are invalid --> 575 <1> 576 <1> @@: 577 000060BA 50 <1> push ax 578 000060BB 89D0 <1> mov ax, dx 579 000060BD E81F05 <1> call calcpointbit 580 <1> %if ((_NUM_B_BP+7)>>3) != 1 581 000060C0 84A7[0804] <1> test byte [b_bplist.used_mask+bx], ah 582 <1> %else 583 <1> test byte [b_bplist.used_mask], ah 584 <1> %endif 585 000060C4 7503E99421 <1> jz error 586 000060C9 58 <1> pop ax 587 <1> 588 000060CA E8E438 <1> call skipcomm0 589 <1> 590 000060CD 4E <1> dec si 591 000060CE 52 <1> push dx 592 000060CF BA[2B1C] <1> mov dx, msg.id 593 000060D2 E84B38 <1> call isstring? 594 000060D5 7504 <1> jne .no_id_kw 595 000060D7 E8EF38 <1> call skipequals 596 000060DA 4E <1> dec si 597 <1> .no_id_kw: 598 000060DB 5A <1> pop dx 599 000060DC E8E0FE <1> call get_id 600 <1> 601 <1> ; INP: ..@bb_id_start 602 <1> ; ..@bb_id_length 603 <1> ; dx = point index 604 <1> ; OUT: jumps to error if failure (too long) 605 <1> ; CHG: ax, bx, cx, si, di 606 <1> set_id: 607 000060DF BBFFFF <1> mov bx, -1 608 000060E2 E84000 <1> call get_set_id_offset_length 609 000060E5 B10A <1> mov cl, 10 610 000060E7 89D8 <1> mov ax, bx 611 000060E9 D3EB <1> shr bx, cl ; bx = length of ID to free 612 <1> 613 000060EB 8B36[CC04] <1> mov si, word [b_bplist.idbuffer.free] 614 <1> ; offset free 615 000060EF F7DE <1> neg si ; - offset free 616 000060F1 81C68001 <1> add si, b_bplist.idbuffer.length 617 <1> ; 1024 - offset free = amount free 618 000060F5 01DE <1> add si, bx ; amount free + length of ID to free 619 000060F7 8B0E[CE4A] <1> mov cx, word [..@bb_id_length] 620 000060FB E33F <1> jcxz .empty ; if no ID to set --> 621 000060FD 39CE <1> cmp si, cx ; enough free ? 622 000060FF 8B36[CC4A] <1> mov si, word [..@bb_id_start] 623 <1> ; -> ID string 624 00006103 7303E95521 <1> jb error ; no --> 625 <1> 626 00006108 51 <1> push cx 627 00006109 E83700 <1> call free_id ; actually free it now 628 0000610C 59 <1> pop cx 629 0000610D 51 <1> push cx 630 0000610E 89CB <1> mov bx, cx ; length 631 00006110 B10A <1> mov cl, 10 ; offset part is 10 bits (0..1023) 632 00006112 D3E3 <1> shl bx, cl ; length is in top 6 bits (0..63) 633 00006114 59 <1> pop cx 634 00006115 8B3E[CC04] <1> mov di, word [b_bplist.idbuffer.free] 635 <1> ; = offset of free part 636 00006119 010E[CC04] <1> add word [b_bplist.idbuffer.free], cx 637 <1> ; mark space as used 638 0000611D 09FB <1> or bx, di ; OR in the offset 639 0000611F 81C7[D004] <1> add di, b_bplist.idbuffer 640 <1> ; -> into buffer space 641 00006123 F3A4 <1> rep movsb ; write 642 <1> 643 <1> ; now remember this 644 <1> .after_empty: 645 <1> ; INP: dx = 0-based point index 646 <1> ; bx = word to set (-1 if not to modify) 647 <1> ; OUT: bx = word read 648 <1> get_set_id_offset_length: equ $ 649 00006125 87D3 <1> xchg dx, bx 650 00006127 D1E3 <1> shl bx, 1 651 00006129 FFB7[8C04] <1> push word [b_bplist.id + bx] 652 0000612D 83FAFF <1> cmp dx, -1 653 00006130 7404 <1> je @F 654 00006132 8997[8C04] <1> mov word [b_bplist.id + bx], dx 655 <1> @@: 656 00006136 5A <1> pop dx 657 00006137 D1EB <1> shr bx, 1 658 00006139 87D3 <1> xchg dx, bx 659 0000613B C3 <1> retn 660 <1> 661 <1> .empty: 662 0000613C E80400 <1> call free_id 663 0000613F 31DB <1> xor bx, bx ; offset = 0 and length = 0 664 00006141 EBE2 <1> jmp .after_empty 665 <1> 666 <1> 667 <1> ; INP: ax = offset/length word of ID to free 668 <1> ; (length zero means none) 669 <1> ; b_bplist.id = ID array (ONE of which matches ax) 670 <1> ; CHG: ax, bx, cx 671 <1> ; OUT: b_bplist.id entries adjusted 672 <1> ; (the one that is being freed is unaffected) 673 <1> ; b_bplist.idbuffer adjusted 674 <1> ; STT: UP, ss = ds = es 675 <1> ; REM: The b_bplist.id array contains zeroes as 676 <1> ; indicators of unused entries. This implies 677 <1> ; that the length field is zero too. However, 678 <1> ; the canonical NULL entry is *all* zeros. 679 <1> free_id: 680 00006143 B10A <1> mov cl, 10 681 00006145 89C3 <1> mov bx, ax 682 00006147 81E3FF03 <1> and bx, 1023 ; bx = offset of ID to free 683 0000614B D3E8 <1> shr ax, cl ; ax = length of ID to free 684 0000614D 91 <1> xchg cx, ax ; cx = length of ID to free 685 <1> 686 0000614E 56 <1> push si 687 0000614F 57 <1> push di 688 <1> 689 00006150 E330 <1> jcxz .return ; if none to free --> 690 <1> 691 00006152 51 <1> push cx 692 00006153 8DBF[D004] <1> lea di, [b_bplist.idbuffer + bx] 693 <1> ; -> ID to be freed 694 <1> ; (destination of following data) 695 00006157 89FE <1> mov si, di 696 00006159 01CE <1> add si, cx ; -> behind ID to be freed 697 <1> ; (source of following data) 698 0000615B 89F1 <1> mov cx, si 699 0000615D F7D9 <1> neg cx ; minus pointer to first subsequent data 700 0000615F 81C1[5006] <1> add cx, b_bplist.idbuffer + b_bplist.idbuffer.length 701 <1> ; pointer behind buffer - pointer subsequent data 702 <1> ; = length of data to move 703 00006163 F3A4 <1> rep movsb ; now di -> first uninitialised byte 704 00006165 59 <1> pop cx ; = length of data freed 705 <1> 706 00006166 290E[CC04] <1> sub word [b_bplist.idbuffer.free], cx 707 <1> ; mark as free 708 0000616A 51 <1> push cx 709 0000616B 30C0 <1> xor al, al 710 0000616D F3AA <1> rep stosb ; clear the buffer trailer (uninitialised part) 711 0000616F 5F <1> pop di ; di = length of data freed 712 <1> 713 00006170 BE[8C04] <1> mov si, b_bplist.id 714 <1> %if _NUM_B_BP < 256 715 00006173 B110 <1> mov cl, _NUM_B_BP 716 <1> %else 717 <1> mov cx, _NUM_B_BP 718 <1> %endif 719 <1> .loop: 720 00006175 AD <1> lodsw 721 00006176 25FF03 <1> and ax, 1023 ; get offset 722 00006179 39D8 <1> cmp ax, bx ; offset matches what we're freeing ?, OR 723 <1> ; is it below/equal the offset we're freeing ? 724 0000617B 7603 <1> jbe .next ; yes --> (also jumps if ax == 0) 725 0000617D 297CFE <1> sub word [si - 2], di ; adjust offset 726 <1> ; This subtraction shouldn't underflow the 10 bits 727 <1> ; used for the offset, so it should leave the top 728 <1> ; 6 bits for the ID length unchanged. 729 <1> .next: 730 00006180 E2F3 <1> loop .loop 731 <1> 732 <1> .return: 733 00006182 5F <1> pop di 734 00006183 5E <1> pop si 735 00006184 C3 <1> retn 736 <1> 737 <1> 738 <1> %if BPSIZE == 6 || BPSIZE == 9 739 <1> point_offset: 740 00006185 E82838 <1> call skipcomma 741 <1> 742 00006188 E8A504 <1> call getpointat ; "AT" keyword ? 743 0000618B 720A <1> jc .not_at ; no --> 744 0000618D E85E04 <1> call findpointat ; do we find it ? 745 00006190 7303E9C820 <1> jc error ; not found --> 746 00006195 EB08 <1> jmp @F ; point index is in dx --> 747 <1> 748 <1> .not_at: 749 00006197 E8B704 <1> call getpointindex 750 0000619A 7303E9BE20 <1> jc error ; "NEW" and "ALL" keywords are invalid --> 751 <1> 752 <1> @@: 753 0000619F 50 <1> push ax 754 000061A0 89D0 <1> mov ax, dx 755 000061A2 E83A04 <1> call calcpointbit 756 <1> %if ((_NUM_B_BP+7)>>3) != 1 757 000061A5 84A7[0804] <1> test byte [b_bplist.used_mask+bx], ah 758 <1> %else 759 <1> test byte [b_bplist.used_mask], ah 760 <1> %endif 761 000061A9 7503E9AF20 <1> jz error 762 000061AE 58 <1> pop ax 763 <1> 764 000061AF E8FF37 <1> call skipcomm0 765 000061B2 52 <1> push dx 766 000061B3 BAFFFF <1> mov dx, -1 767 <1> %if BPSIZE == 9 768 <1> mov bx, dx 769 <1> %endif 770 000061B6 E8D137 <1> call iseol? 771 000061B9 7414 <1> je @F 772 000061BB 4E <1> dec si 773 000061BC BA[331C] <1> mov dx, msg.offset 774 000061BF E85E37 <1> call isstring? 775 000061C2 7504 <1> jne .no_offset_kw 776 000061C4 E80238 <1> call skipequals 777 000061C7 4E <1> dec si 778 <1> .no_offset_kw: 779 000061C8 AC <1> lodsb 780 <1> %if BPSIZE == 9 781 <1> nearcall getdword ; bx:dx = offset 782 <1> %else 783 000061C9 E88D36 <1> nearcall getword ; dx = offset 784 <1> %endif 785 000061CC E8D037 <1> call chkeol 786 <1> @@: 787 000061CF 58 <1> pop ax 788 000061D0 89C7 <1> mov di, ax 789 000061D2 01FF <1> add di, di 790 000061D4 01FF <1> add di, di ; * 4 791 <1> %if BPSIZE == 6 792 000061D6 01C7 <1> add di, ax ; * 5 793 000061D8 01C7 <1> add di, ax ; * 6 794 000061DA 81C7[0F04] <1> add di, b_bplist.bp + 3 795 <1> %elif BPSIZE == 9 796 <1> add di, di ; * 8 797 <1> add di, ax ; * 9 798 <1> add di, b_bplist.bp + 4 799 <1> %else 800 <1> %error Unexpected breakpoint size 801 <1> %endif 802 000061DE 92 <1> xchg ax, dx 803 000061DF AB <1> stosw ; store low word of offset 804 <1> %if BPSIZE == 9 805 <1> xchg ax, bx 806 <1> stosw ; store high word of offset 807 <1> %endif 808 000061E0 C3 <1> retn 809 <1> %endif 810 <1> 811 <1> 812 <1> point_when: 813 000061E1 E8CC37 <1> call skipcomma 814 <1> 815 000061E4 E84904 <1> call getpointat ; "AT" keyword ? 816 000061E7 720A <1> jc .not_at ; no --> 817 000061E9 E80204 <1> call findpointat ; do we find it ? 818 000061EC 7303E96C20 <1> jc error ; not found --> 819 000061F1 EB08 <1> jmp @F ; point index is in dx --> 820 <1> 821 <1> .not_at: 822 000061F3 E85B04 <1> call getpointindex 823 000061F6 7303E96220 <1> jc error ; "NEW" and "ALL" keywords are invalid --> 824 <1> 825 <1> @@: 826 000061FB 50 <1> push ax 827 000061FC 89D0 <1> mov ax, dx 828 000061FE E8DE03 <1> call calcpointbit 829 <1> %if ((_NUM_B_BP+7)>>3) != 1 830 00006201 84A7[0804] <1> test byte [b_bplist.used_mask+bx], ah 831 <1> %else 832 <1> test byte [b_bplist.used_mask], ah 833 <1> %endif 834 00006205 7503E95320 <1> jz error 835 0000620A 58 <1> pop ax 836 <1> 837 0000620B E8A337 <1> call skipcomm0 838 0000620E 8326[D24A]00 <1> and word [..@bb_when_length], 0 839 00006213 E87437 <1> call iseol? 840 00006216 7415 <1> je @F 841 00006218 4E <1> dec si 842 00006219 52 <1> push dx 843 0000621A BA[2E1C] <1> mov dx, msg.when 844 0000621D E80037 <1> call isstring? 845 00006220 7504 <1> jne .no_when_kw 846 00006222 E8A437 <1> call skipequals 847 00006225 4E <1> dec si 848 <1> .no_when_kw: 849 00006226 5A <1> pop dx 850 00006227 E8C5FD <1> call get_when 851 0000622A E87237 <1> call chkeol 852 <1> @@: 853 <1> 854 <1> 855 <1> ; INP: ..@bb_when_start 856 <1> ; ..@bb_when_length 857 <1> ; dx = point index 858 <1> ; OUT: jumps to error if failure (too long) 859 <1> ; CHG: ax, bx, cx, si, di 860 <1> ; STT: UP, ss = ds = es 861 <1> set_when: 862 0000622D E83900 <1> call check_when_space ; cx = length (with terminating NUL) or 0, 863 <1> ; si -> clause (if cx != 0), 864 <1> ; ax = prior pointer or 0 865 00006230 E330 <1> jcxz .empty 866 <1> 867 00006232 51 <1> push cx 868 00006233 E86B00 <1> call free_when ; actually free it now (INP ax) 869 00006236 59 <1> pop cx 870 00006237 8B3E[CE04] <1> mov di, word [b_bplist.whenbuffer.free] 871 <1> ; = offset of free part 872 0000623B 010E[CE04] <1> add word [b_bplist.whenbuffer.free], cx 873 <1> ; mark space as used 874 0000623F 81C7[5006] <1> add di, b_bplist.whenbuffer 875 <1> ; -> into buffer space 876 00006243 89FB <1> mov bx, di ; bx -> buffer for clause, for set function 877 <1> ; si -> new clause (left by check function) 878 00006245 F3A4 <1> rep movsb ; write (with space for the NUL) 879 00006247 C645FF00 <1> mov byte [di - 1], 0 ; actually write a NUL 880 <1> 881 <1> ; now remember this 882 <1> .after_empty: 883 <1> ; INP: dx = 0-based point index 884 <1> ; bx = word to set (-1 if not to modify) 885 <1> ; OUT: bx = word read 886 <1> get_set_when_offset: equ $ 887 0000624B 87D3 <1> xchg dx, bx 888 0000624D D1E3 <1> shl bx, 1 889 0000624F FFB7[AC04] <1> push word [b_bplist.when + bx] 890 00006253 83FAFF <1> cmp dx, -1 891 00006256 7404 <1> je @F 892 00006258 8997[AC04] <1> mov word [b_bplist.when + bx], dx 893 <1> @@: 894 0000625C 5A <1> pop dx 895 0000625D D1EB <1> shr bx, 1 896 0000625F 87D3 <1> xchg dx, bx 897 00006261 C3 <1> retn 898 <1> 899 <1> .empty: 900 00006262 E83C00 <1> call free_when 901 00006265 31DB <1> xor bx, bx ; offset = 0 902 00006267 EBE2 <1> jmp .after_empty 903 <1> 904 <1> 905 <1> ; INP: ..@bb_when_start 906 <1> ; ..@bb_when_length 907 <1> ; dx = point index 908 <1> ; OUT: jumps to error if failure (too long) 909 <1> ; ax = prior pointer from array (to be freed), 910 <1> ; or 0 if no prior clause to free 911 <1> ; cx = length (including terminating NUL) 912 <1> ; or = 0 if no WHEN clause 913 <1> ; (if cx != 0) si -> WHEN clause data 914 <1> ; CHG: ax, bx, cx, si, di 915 <1> ; STT: UP, ss = ds = es 916 <1> check_when_space: 917 00006269 BBFFFF <1> mov bx, -1 918 0000626C E8DCFF <1> call get_set_when_offset 919 <1> 920 0000626F 53 <1> push bx 921 00006270 85DB <1> test bx, bx 922 00006272 740D <1> jz @F 923 00006274 89DF <1> mov di, bx 924 00006276 B9FFFF <1> mov cx, -1 925 00006279 B000 <1> mov al, 0 926 0000627B F2AE <1> repne scasb 927 0000627D F7D1 <1> not cx ; = length to free (including terminating NUL) 928 0000627F 89CB <1> mov bx, cx 929 <1> @@: ; bx = length to free 930 00006281 58 <1> pop ax ; ax -> prior clause in .whenbuffer 931 <1> 932 00006282 8B36[CE04] <1> mov si, word [b_bplist.whenbuffer.free] 933 <1> ; offset free 934 00006286 F7DE <1> neg si ; - offset free 935 00006288 81C60004 <1> add si, b_bplist.whenbuffer.length 936 <1> ; 1024 - offset free = amount free 937 0000628C 01DE <1> add si, bx ; amount free + length of condition to free 938 0000628E 8B0E[D24A] <1> mov cx, word [..@bb_when_length] 939 00006292 E30C <1> jcxz .empty ; if no condition to set --> 940 00006294 41 <1> inc cx ; count terminating NUL 941 00006295 39CE <1> cmp si, cx ; enough free ? 942 00006297 8B36[D04A] <1> mov si, word [..@bb_when_start] 943 <1> ; -> condition string 944 0000629B 7303E9BD1F <1> jb error ; no --> 945 <1> .empty: 946 000062A0 C3 <1> retn 947 <1> 948 <1> 949 <1> ; INP: ax = offset word of condition to free 950 <1> ; (zero means none) 951 <1> ; b_bplist.when = condition array (ONE of which matches ax) 952 <1> ; CHG: ax, bx, cx 953 <1> ; OUT: b_bplist.when entries adjusted 954 <1> ; (the one that is being freed is unaffected) 955 <1> ; b_bplist.whenbuffer adjusted 956 <1> ; STT: UP, ss = ds = es 957 <1> ; REM: The b_bplist.when array contains actual offsets 958 <1> ; into the b_bplist.whenbuffer space. Therefore 959 <1> ; a value of zero acts as a NULL pointer and valid 960 <1> ; values are >= b_bplist.whenbuffer. 961 <1> free_when: 962 000062A1 56 <1> push si 963 000062A2 57 <1> push di 964 <1> 965 000062A3 85C0 <1> test ax, ax 966 000062A5 7438 <1> jz .return 967 <1> 968 000062A7 89C7 <1> mov di, ax 969 000062A9 89C3 <1> mov bx, ax 970 <1> ; -> condition to be freed 971 <1> ; (destination of following data) 972 000062AB 57 <1> push di 973 000062AC B9FFFF <1> mov cx, -1 974 000062AF B000 <1> mov al, 0 975 000062B1 F2AE <1> repne scasb 976 000062B3 F7D1 <1> not cx ; = length to free (including terminating NUL) 977 000062B5 5F <1> pop di 978 000062B6 51 <1> push cx 979 000062B7 89FE <1> mov si, di 980 000062B9 01CE <1> add si, cx ; -> behind condition to be freed 981 <1> ; (source of following data) 982 000062BB 89F1 <1> mov cx, si 983 000062BD F7D9 <1> neg cx ; minus pointer to first subsequent data 984 000062BF 81C1[500A] <1> add cx, b_bplist.whenbuffer + b_bplist.whenbuffer.length 985 <1> ; pointer behind buffer - pointer subsequent data 986 <1> ; = length of data to move 987 000062C3 F3A4 <1> rep movsb ; now di -> first uninitialised byte 988 000062C5 59 <1> pop cx ; = length of data freed 989 <1> 990 000062C6 290E[CE04] <1> sub word [b_bplist.whenbuffer.free], cx 991 <1> ; mark as free 992 000062CA 51 <1> push cx 993 000062CB 30C0 <1> xor al, al 994 000062CD F3AA <1> rep stosb ; clear the buffer trailer (uninitialised part) 995 000062CF 5F <1> pop di ; di = length of data freed 996 <1> 997 000062D0 BE[AC04] <1> mov si, b_bplist.when 998 <1> %if _NUM_B_BP < 256 999 000062D3 B110 <1> mov cl, _NUM_B_BP 1000 <1> %else 1001 <1> mov cx, _NUM_B_BP 1002 <1> %endif 1003 <1> .loop: 1004 000062D5 AD <1> lodsw 1005 000062D6 39D8 <1> cmp ax, bx ; offset we're freeing ?, OR 1006 <1> ; is it below/equal the offset we're freeing ? 1007 000062D8 7603 <1> jbe .next ; yes --> (also jumps if ax == 0) 1008 000062DA 297CFE <1> sub word [si - 2], di ; adjust offset 1009 <1> .next: 1010 000062DD E2F6 <1> loop .loop 1011 <1> 1012 <1> .return: 1013 000062DF 5F <1> pop di 1014 000062E0 5E <1> pop si 1015 000062E1 C3 <1> retn 1016 <1> 1017 <1> 1018 <1> point_clear: 1019 000062E2 BF[E762] <1> mov di, .clear 1020 000062E5 EB1F <1> jmp point_clear_enable_disable_toggle_common 1021 <1> 1022 <1> .clear: 1023 000062E7 F7D0 <1> not ax 1024 <1> %if ((_NUM_B_BP+7)>>3) != 1 1025 000062E9 20A7[0804] <1> and byte [b_bplist.used_mask+bx], ah 1026 000062ED 20A7[0A04] <1> and byte [b_bplist.disabled_mask+bx], ah 1027 <1> %else 1028 <1> and byte [b_bplist.used_mask], ah 1029 <1> and byte [b_bplist.disabled_mask], ah 1030 <1> %endif 1031 000062F1 51 <1> push cx 1032 <1> 1033 000062F2 31DB <1> xor bx, bx ; replace by empty word 1034 000062F4 E82EFE <1> call get_set_id_offset_length 1035 000062F7 93 <1> xchg ax, bx ; ax = word what to free 1036 000062F8 E848FE <1> call free_id ; actually free it now 1037 <1> 1038 000062FB 31DB <1> xor bx, bx ; replace by empty word 1039 000062FD E84BFF <1> call get_set_when_offset 1040 00006300 93 <1> xchg ax, bx ; ax = word what to free 1041 00006301 E89DFF <1> call free_when ; actually free it now 1042 <1> 1043 <1> %if 0 1044 <1> xor cx, cx 1045 <1> 1046 <1> mov bx, dx 1047 <1> add bx, bx ; * 2 1048 <1> mov word [b_bplist.counter + bx], cx 1049 <1> 1050 <1> add bx, bx ; * 4 1051 <1> %if BPSIZE == 4 1052 <1> %elif BPSIZE == 5 1053 <1> add bx, dx ; * 5 1054 <1> %elif BPSIZE == 6 1055 <1> add bx, dx ; * 5 1056 <1> add bx, dx ; * 6 1057 <1> %elif BPSIZE == 9 1058 <1> add bx, bx ; * 8 1059 <1> add bx, dx ; * 9 1060 <1> %else 1061 <1> %error Unexpected breakpoint size 1062 <1> %endif 1063 <1> add bx, b_bplist.bp 1064 <1> mov word [bx], cx 1065 <1> mov word [bx + 2], cx 1066 <1> %if BPSIZE == 4 1067 <1> %elif BPSIZE == 5 1068 <1> mov byte [bx + 4], cl 1069 <1> %elif BPSIZE == 6 1070 <1> mov word [bx + 4], cx 1071 <1> %elif BPSIZE == 9 1072 <1> mov word [bx + 4], cx 1073 <1> mov word [bx + 6], cx 1074 <1> mov byte [bx + 8], cl 1075 <1> %else 1076 <1> %error Unexpected breakpoint size 1077 <1> %endif 1078 <1> 1079 <1> %endif 1080 <1> 1081 00006304 59 <1> pop cx 1082 00006305 C3 <1> retn 1083 <1> 1084 <1> point_clear_enable_disable_toggle_common: 1085 00006306 E8A736 <1> call skipcomma 1086 <1> 1087 00006309 BD[F863] <1> mov bp, .checkend 1088 0000630C 4E <1> dec si 1089 0000630D BA[801F] <1> mov dx, msg.in 1090 00006310 E80D36 <1> call isstring? 1091 00006313 7403E9A200 <1> jne .notin 1092 00006318 BD[A463] <1> mov bp, .parse_next 1093 0000631B E89236 <1> call skipcomma 1094 0000631E 4E <1> dec si 1095 0000631F BA[831F] <1> mov dx, msg.existing 1096 00006322 E8FB35 <1> call isstring? 1097 00006325 AC <1> lodsb 1098 00006326 7506 <1> jne .notexisting 1099 00006328 BD[7C63] <1> mov bp, .parse_next_existing 1100 0000632B E88336 <1> call skipcomm0 1101 <1> .notexisting: 1102 0000632E 56 <1> push si 1103 0000632F E98700 <1> jmp .in 1104 <1> 1105 <1> .in_multiple: 1106 00006332 57 <1> push di 1107 00006333 4E <1> dec si 1108 00006334 E86235 <1> nearcall get_value_range; OUT: cx:di = from, bx:dx = to 1109 00006337 730C <1> jnc @F 1110 00006339 7507 <1> jnz .error 1111 0000633B 83FF10 <1> cmp di, _NUM_B_BP 1112 0000633E 7302 <1> jae .error 1113 00006340 E31A <1> jcxz .in_multiple.next ; (cx = 0) 1114 <1> .error: 1115 00006342 E9181F <1> jmp error 1116 <1> 1117 <1> @@: 1118 00006345 83FF10 <1> cmp di, _NUM_B_BP 1119 00006348 73F8 <1> jae .error 1120 0000634A E302 <1> jcxz @F 1121 0000634C EBF4 <1> jmp .error 1122 <1> 1123 <1> @@: 1124 0000634E 85DB <1> test bx, bx 1125 00006350 75F0 <1> jnz .error 1126 00006352 83FA10 <1> cmp dx, _NUM_B_BP 1127 00006355 73EB <1> jae .error 1128 <1> 1129 00006357 89D1 <1> mov cx, dx 1130 00006359 29F9 <1> sub cx, di 1131 0000635B 41 <1> inc cx ; = amount (nonzero) 1132 <1> .in_multiple.next: 1133 0000635C 89FA <1> mov dx, di ; dx = first index 1134 0000635E 5F <1> pop di 1135 0000635F F8 <1> clc ; no keywords 1136 00006360 C3 <1> retn 1137 <1> 1138 <1> 1139 00006361 00 <1> align 2, db 0 1140 00006362 [3263] <1> dw .in_multiple 1141 <1> .do_next_existing: 1142 00006364 E30A <1> jcxz @FFF ; value range with length zero ? 1143 <1> @@: 1144 00006366 E8A000 <1> call .checkindex_internal 1145 00006369 7402 <1> jz @F 1146 0000636B FFD7 <1> call di 1147 <1> @@: 1148 0000636D 42 <1> inc dx 1149 0000636E E2F6 <1> loop @BB ; loop through value range 1150 <1> @@: 1151 00006370 4E <1> dec si 1152 00006371 E83C36 <1> call skipcomma 1153 00006374 E81336 <1> call iseol? 1154 00006377 7540 <1> jne .in 1155 00006379 C3 <1> retn 1156 <1> 1157 <1> align 2, db 0 1158 0000637A [3263] <1> dw .in_multiple 1159 <1> .parse_next_existing: 1160 0000637C 4E <1> dec si 1161 0000637D E83036 <1> call skipcomma 1162 00006380 E80736 <1> call iseol? 1163 00006383 7534 <1> jne .in 1164 <1> 1165 00006385 5E <1> pop si 1166 00006386 BD[6463] <1> mov bp, .do_next_existing 1167 00006389 EB2E <1> jmp .in 1168 <1> 1169 0000638B 00 <1> align 2, db 0 1170 0000638C [3263] <1> dw .in_multiple 1171 <1> .do_next: 1172 0000638E E308 <1> jcxz @FFF ; value range with length zero ? 1173 <1> @@: 1174 00006390 E86D00 <1> call .checkindex 1175 00006393 FFD7 <1> call di 1176 <1> @@: 1177 00006395 42 <1> inc dx 1178 00006396 E2F8 <1> loop @BB ; loop through value range 1179 <1> @@: 1180 00006398 4E <1> dec si 1181 00006399 E81436 <1> call skipcomma 1182 0000639C E8EB35 <1> call iseol? 1183 0000639F 7518 <1> jne .in 1184 000063A1 C3 <1> retn 1185 <1> 1186 <1> align 2, db 0 1187 000063A2 [3263] <1> dw .in_multiple 1188 <1> .parse_next: 1189 000063A4 E306 <1> jcxz @FFF ; value range with length zero ? 1190 <1> @@: 1191 000063A6 E85700 <1> call .checkindex 1192 <1> @@: 1193 000063A9 42 <1> inc dx 1194 000063AA E2FA <1> loop @BB ; loop through value range 1195 <1> @@: 1196 000063AC 4E <1> dec si 1197 000063AD E80036 <1> call skipcomma 1198 000063B0 E8D735 <1> call iseol? 1199 000063B3 7504 <1> jne .in 1200 <1> 1201 000063B5 5E <1> pop si 1202 000063B6 BD[8E63] <1> mov bp, .do_next 1203 <1> 1204 <1> .in: 1205 000063B9 4E <1> dec si 1206 <1> .notin: 1207 000063BA AC <1> lodsb 1208 000063BB E87202 <1> call getpointat ; "AT" keyword ? 1209 000063BE 720D <1> jc .not_at ; no --> 1210 000063C0 E82B02 <1> call findpointat ; do we find it ? 1211 000063C3 7303E9951E <1> jc error ; not found --> 1212 000063C8 B90100 <1> mov cx, 1 ; (for bb IN) 1213 000063CB EB26 <1> jmp @F ; point index is in dx --> 1214 <1> 1215 <1> .not_at: 1216 000063CD 2EFF56FE <1> call near word [cs:bp - 2] 1217 000063D1 7320 <1> jnc @F ; point index is in dx, no keyword --> 1218 <1> .error_NZ: 1219 000063D3 7403E9851E <1> jnz error ; "NEW" is invalid --> 1220 <1> 1221 000063D8 E8C435 <1> call chkeol 1222 000063DB 31C9 <1> xor cx, cx 1223 <1> .all_loop: 1224 000063DD 89C8 <1> mov ax, cx 1225 000063DF E8FD01 <1> call calcpointbit 1226 <1> %if ((_NUM_B_BP+7)>>3) != 1 1227 000063E2 84A7[0804] <1> test byte [b_bplist.used_mask+bx], ah 1228 <1> %else 1229 <1> test byte [b_bplist.used_mask], ah 1230 <1> %endif 1231 000063E6 7404 <1> jz .all_next 1232 000063E8 89CA <1> mov dx, cx 1233 000063EA FFD7 <1> call di 1234 <1> .all_next: 1235 000063EC 41 <1> inc cx 1236 000063ED 83F910 <1> cmp cx, _NUM_B_BP 1237 000063F0 72EB <1> jb .all_loop 1238 000063F2 C3 <1> retn 1239 <1> 1240 <1> @@: 1241 000063F3 FFE5 <1> jmp bp 1242 <1> 1243 000063F5 00 <1> align 2, db 0 1244 000063F6 [5166] <1> dw getpointindex 1245 <1> .checkend: 1246 000063F8 E8A435 <1> call chkeol 1247 000063FB E80200 <1> call .checkindex 1248 000063FE FFE7 <1> jmp di 1249 <1> 1250 <1> .checkindex: 1251 00006400 E80600 <1> call .checkindex_internal 1252 00006403 7503E9551E <1> jz error 1253 00006408 C3 <1> retn 1254 <1> 1255 <1> .checkindex_internal: 1256 00006409 89D0 <1> mov ax, dx 1257 0000640B E8D101 <1> call calcpointbit 1258 <1> %if ((_NUM_B_BP+7)>>3) != 1 1259 0000640E 84A7[0804] <1> test byte [b_bplist.used_mask+bx], ah 1260 <1> %else 1261 <1> test byte [b_bplist.used_mask], ah 1262 <1> %endif 1263 00006412 C3 <1> retn 1264 <1> 1265 <1> 1266 <1> point_enable: 1267 00006413 BF[1964] <1> mov di, .enable 1268 00006416 E9EDFE <1> jmp point_clear_enable_disable_toggle_common 1269 <1> 1270 <1> .enable: 1271 00006419 F7D0 <1> not ax 1272 <1> %if ((_NUM_B_BP+7)>>3) != 1 1273 0000641B 20A7[0A04] <1> and byte [b_bplist.disabled_mask+bx], ah 1274 <1> %else 1275 <1> and byte [b_bplist.disabled_mask], ah 1276 <1> %endif 1277 0000641F C3 <1> retn 1278 <1> 1279 <1> 1280 <1> point_disable: 1281 00006420 BF[2664] <1> mov di, .disable 1282 00006423 E9E0FE <1> jmp point_clear_enable_disable_toggle_common 1283 <1> 1284 <1> .disable: 1285 <1> %if ((_NUM_B_BP+7)>>3) != 1 1286 00006426 08A7[0A04] <1> or byte [b_bplist.disabled_mask+bx], ah 1287 <1> %else 1288 <1> or byte [b_bplist.disabled_mask], ah 1289 <1> %endif 1290 0000642A C3 <1> retn 1291 <1> 1292 <1> 1293 <1> point_toggle: 1294 0000642B BF[3164] <1> mov di, .toggle 1295 0000642E E9D5FE <1> jmp point_clear_enable_disable_toggle_common 1296 <1> 1297 <1> .toggle: 1298 <1> %if ((_NUM_B_BP+7)>>3) != 1 1299 00006431 30A7[0A04] <1> xor byte [b_bplist.disabled_mask+bx], ah 1300 <1> %else 1301 <1> xor byte [b_bplist.disabled_mask], ah 1302 <1> %endif 1303 00006435 C3 <1> retn 1304 <1> 1305 <1> 1306 <1> point_list: 1307 00006436 E87735 <1> call skipcomma 1308 00006439 E84E35 <1> call iseol? 1309 0000643C 7503E97D00 <1> je .all 1310 <1> 1311 00006441 E8EC01 <1> call getpointat ; "AT" keyword ? 1312 00006444 7258 <1> jc .not_at ; no --> 1313 00006446 E8A501 <1> call findpointat ; do we find it ? 1314 <1> ; Here we ignore the point index in dx, we just 1315 <1> ; take note that at least one point matching the 1316 <1> ; specified address exists. The points are matched 1317 <1> ; against the linear address in ..@bb_saved_linear. 1318 00006449 7307 <1> jnc .all_matching 1319 <1> 1320 0000644B BA[5628] <1> mov dx, msg.bpnone_at 1321 0000644E E8623B <1> call putsz 1322 00006451 C3 <1> retn 1323 <1> 1324 <1> 1325 <1> .all_matching: 1326 00006452 31ED <1> xor bp, bp 1327 00006454 31DB <1> xor bx, bx 1328 00006456 31D2 <1> xor dx, dx 1329 00006458 BF[B40A] <1> mov di, line_out 1330 <1> .loop_matching: 1331 0000645B 89DE <1> mov si, bx 1332 0000645D 01F6 <1> add si, si 1333 0000645F 01F6 <1> add si, si 1334 <1> %if BPSIZE == 4 1335 <1> %elif BPSIZE == 5 1336 <1> add si, bx 1337 <1> %elif BPSIZE == 6 1338 00006461 01DE <1> add si, bx ; * 5 1339 00006463 01DE <1> add si, bx ; * 6 1340 <1> %elif BPSIZE == 9 1341 <1> add si, si ; * 8 1342 <1> add si, bx ; * 9 1343 <1> %else 1344 <1> %error Unexpected breakpoint size 1345 <1> %endif 1346 00006465 81C6[0C04] <1> add si, b_bplist.bp 1347 00006469 AD <1> lodsw 1348 0000646A 3906[C84A] <1> cmp word [..@bb_saved_linear], ax 1349 0000646E 7526 <1> jne .next_matching 1350 <1> %if _PM 1351 <1> lodsw 1352 <1> %else 1353 00006470 31C0 <1> xor ax, ax 1354 00006472 AC <1> lodsb 1355 <1> %endif 1356 00006473 3906[CA4A] <1> cmp word [..@bb_saved_linear + 2], ax 1357 00006477 751D <1> jne .next_matching 1358 <1> 1359 00006479 57 <1> push di 1360 0000647A B020 <1> mov al, 32 1361 0000647C B92800 <1> mov cx, 40 1362 0000647F F3AA <1> rep stosb ; initialize field with blanks 1363 00006481 30C0 <1> xor al, al 1364 00006483 AA <1> stosb ; terminate it 1365 00006484 5F <1> pop di 1366 <1> 1367 00006485 E88000 <1> call .single ; fill buffer 1368 <1> 1369 00006488 52 <1> push dx 1370 00006489 53 <1> push bx 1371 <1> %if 0 1372 <1> test dl, 1 ; an odd point ? 1373 <1> jnz .odd_matching ; yes --> 1374 <1> mov di, line_out + 40 ; write next point after the field 1375 <1> jmp .was_even_matching 1376 <1> .odd_matching: 1377 <1> %endif 1378 0000648A E83636 <1> call putsline_crlf ; put line with linebreak (and no excess blanks) 1379 0000648D E83501 <1> call handle_bl_when 1380 00006490 BF[B40A] <1> mov di, line_out ; write next point at start of field 1381 <1> .was_even_matching: 1382 00006493 5B <1> pop bx 1383 00006494 5A <1> pop dx 1384 00006495 42 <1> inc dx ; increment odd/even counter 1385 <1> .next_matching: 1386 00006496 43 <1> inc bx ; increment breakpoint index 1387 00006497 83FB10 <1> cmp bx, _NUM_B_BP 1388 0000649A 75BF <1> jne .loop_matching 1389 0000649C EB51 <1> jmp .end 1390 <1> 1391 <1> 1392 <1> .not_at: 1393 0000649E E8B001 <1> call getpointindex 1394 000064A1 730A <1> jnc @F 1395 000064A3 7403E9B51D <1> jnz error ; "NEW" is invalid --> 1396 <1> 1397 000064A8 E8F434 <1> call chkeol 1398 000064AB EB11 <1> jmp .all 1399 <1> @@: 1400 000064AD E8EF34 <1> call chkeol 1401 000064B0 89D3 <1> mov bx, dx 1402 000064B2 BF[B40A] <1> mov di, line_out 1403 000064B5 E85000 <1> call .single 1404 000064B8 E80836 <1> call putsline_crlf 1405 000064BB E90701 <1> jmp handle_bl_when 1406 <1> 1407 <1> 1408 <1> .all: 1409 000064BE 31ED <1> xor bp, bp ; high byte: any set points encountered yet, 1410 <1> ; low byte: current line has any set points 1411 000064C0 31DB <1> xor bx, bx 1412 000064C2 BF[B40A] <1> mov di, line_out 1413 <1> .loop: 1414 000064C5 57 <1> push di 1415 000064C6 B020 <1> mov al, 32 1416 000064C8 B92800 <1> mov cx, 40 1417 000064CB F3AA <1> rep stosb ; initialize field with blanks 1418 000064CD 30C0 <1> xor al, al 1419 000064CF AA <1> stosb ; terminate it 1420 000064D0 5F <1> pop di 1421 <1> 1422 000064D1 E83400 <1> call .single ; fill buffer 1423 <1> 1424 000064D4 53 <1> push bx 1425 <1> %if 0 1426 <1> test bl, 1 ; an odd point ? 1427 <1> jnz .odd ; yes --> 1428 <1> mov di, line_out + 40 ; write next point after the field 1429 <1> jmp .was_even 1430 <1> .odd: 1431 <1> %endif 1432 000064D5 F7C5FF00 <1> test bp, 00FFh ; any point set in this line ? 1433 000064D9 740A <1> jz .skip_putsline ; no --> 1434 000064DB E8E535 <1> call putsline_crlf ; put line with linebreak (and no excess blanks) 1435 000064DE E8E400 <1> call handle_bl_when 1436 <1> 1437 000064E1 81E500FF <1> and bp, ~00FFh ; clear flag for next line processing 1438 <1> .skip_putsline: 1439 000064E5 BF[B40A] <1> mov di, line_out ; write next point at start of field 1440 <1> .was_even: 1441 000064E8 5B <1> pop bx 1442 000064E9 43 <1> inc bx 1443 000064EA 83FB10 <1> cmp bx, _NUM_B_BP 1444 000064ED 75D6 <1> jne .loop 1445 <1> .end: 1446 000064EF 81FF[B40A] <1> cmp di, line_out 1447 000064F3 7406 <1> je @F 1448 000064F5 E8CB35 <1> call putsline_crlf 1449 000064F8 E8CA00 <1> call handle_bl_when 1450 <1> @@: 1451 000064FB F7C500FF <1> test bp, 0FF00h 1452 000064FF 7506 <1> jnz @F 1453 00006501 BA[3628] <1> mov dx, msg.bpnone 1454 00006504 E8AC3A <1> call putsz 1455 <1> @@: 1456 00006507 C3 <1> retn 1457 <1> 1458 <1> .single: 1459 00006508 BE[1028] <1> mov si, msg.bp 1460 0000650B E8DD34 <1> call showstring 1461 0000650E 53 <1> push bx 1462 0000650F 89D8 <1> mov ax, bx 1463 00006511 E87D35 <1> call hexbyte ; store index of this point 1464 00006514 E8C800 <1> call calcpointbit 1465 00006517 BE[1A28] <1> mov si, msg.bpunused 1466 <1> %if ((_NUM_B_BP+7)>>3) != 1 1467 0000651A 84A7[0804] <1> test byte [b_bplist.used_mask+bx], ah 1468 <1> %else 1469 <1> test byte [b_bplist.used_mask], ah 1470 <1> %endif 1471 0000651E 7508 <1> jnz @F ; if set --> 1472 00006520 E8C834 <1> call showstring 1473 00006523 31F6 <1> xor si, si 1474 00006525 E99B00 <1> jmp .unused 1475 <1> 1476 <1> @@: 1477 00006528 81CD0101 <1> or bp, 0101h ; flag that there was a point set in this line 1478 0000652C BE[1728] <1> mov si, msg.bpdisabled 1479 <1> %if ((_NUM_B_BP+7)>>3) != 1 1480 0000652F 84A7[0A04] <1> test byte [b_bplist.disabled_mask+bx], ah 1481 <1> %else 1482 <1> test byte [b_bplist.disabled_mask], ah 1483 <1> %endif 1484 00006533 7503 <1> jnz .disabled ; disabled --> (D) 1485 00006535 BE[1428] <1> mov si, msg.bpenabled 1486 <1> .disabled: 1487 00006538 E8B034 <1> call showstring 1488 0000653B BE[2228] <1> mov si, msg.bpaddress 1489 0000653E E8AA34 <1> call showstring 1490 00006541 58 <1> pop ax 1491 00006542 50 <1> push ax 1492 00006543 89C6 <1> mov si, ax 1493 00006545 01F6 <1> add si, si 1494 00006547 01F6 <1> add si, si 1495 <1> %if BPSIZE == 4 1496 <1> %elif BPSIZE == 5 1497 <1> add si, ax 1498 <1> %elif BPSIZE == 6 1499 00006549 01C6 <1> add si, ax ; * 5 1500 0000654B 01C6 <1> add si, ax ; * 6 1501 <1> %elif BPSIZE == 9 1502 <1> add si, si ; * 8 1503 <1> add si, ax ; * 9 1504 <1> %else 1505 <1> %error Unexpected breakpoint size 1506 <1> %endif 1507 0000654D 81C6[0C04] <1> add si, b_bplist.bp ; -> point 1508 00006551 52 <1> push dx 1509 00006552 AD <1> lodsw 1510 00006553 92 <1> xchg ax, dx 1511 <1> %if _PM 1512 <1> lodsw 1513 <1> call hexword 1514 <1> %else 1515 00006554 31C0 <1> xor ax, ax 1516 00006556 AC <1> lodsb 1517 00006557 E83735 <1> call hexbyte 1518 <1> %endif 1519 0000655A 50 <1> push ax 1520 0000655B B05F <1> mov al, '_' 1521 0000655D AA <1> stosb 1522 0000655E 58 <1> pop ax 1523 0000655F 92 <1> xchg ax, dx 1524 00006560 E82735 <1> call hexword ; display (linear) address 1525 <1> %if BPSIZE == 6 || BPSIZE == 9 1526 <1> ; INP: dx:ax = linear address 1527 <1> ; si -> (d)word offset 1528 <1> ; di -> where to store 1529 <1> ; OUT: cx = length displayed 1530 <1> ; si -> after offset 1531 <1> ; di -> after stored string 1532 <1> ; CHG: ax, dx 1533 00006563 E80F01 <1> call bp_display_offset ; BPSIZE implied 1534 <1> %else 1535 <1> xor cx, cx 1536 <1> %endif 1537 00006566 5A <1> pop dx 1538 00006567 AC <1> lodsb 1539 00006568 50 <1> push ax 1540 00006569 BE[2828] <1> mov si, msg.bpcontent 1541 0000656C E87C34 <1> call showstring 1542 0000656F 58 <1> pop ax 1543 00006570 E81E35 <1> call hexbyte ; display content 1544 00006573 BE[2B28] <1> mov si, msg.bpcounter 1545 00006576 E87234 <1> call showstring 1546 00006579 58 <1> pop ax 1547 0000657A 50 <1> push ax 1548 0000657B 89C3 <1> mov bx, ax 1549 0000657D 52 <1> push dx 1550 0000657E 89C2 <1> mov dx, ax 1551 00006580 01DB <1> add bx, bx 1552 00006582 8B87[6C04] <1> mov ax, word [b_bplist.counter + bx] 1553 00006586 E80135 <1> call hexword 1554 <1> 1555 00006589 BBFFFF <1> mov bx, -1 1556 0000658C E896FB <1> call get_set_id_offset_length 1557 0000658F F6C7FC <1> test bh, 63 << 2 ; length nonzero ? 1558 00006592 7426 <1> jz @F ; no --> 1559 <1> 1560 <1> ; The maximum length of a short ID is based on 1561 <1> ; how much space there is assuming 80 columns. 1562 00006594 BE[0228] <1> mov si, msg.bb_hitpass_id.short 1563 00006597 D0E1 <1> shl cl, 1 1564 00006599 D0E1 <1> shl cl, 1 1565 0000659B F6D9 <1> neg cl 1566 0000659D 80C18C <1> add cl, 35 << 2 1567 000065A0 38CF <1> cmp bh, cl ; long ? 1568 000065A2 7203 <1> jb .trigger_short_id 1569 <1> ; This jump MUST be a jb, not jbe. The jbe 1570 <1> ; would not match ZR for words where the 1571 <1> ; idbuffer offset is a nonzero value. 1572 000065A4 BE[FA27] <1> mov si, msg.bb_hitpass_id.long 1573 <1> .trigger_short_id: 1574 <1> 1575 000065A7 E8F4D2 <1> call copy_single_counted_string 1576 000065AA 88F9 <1> mov cl, bh 1577 000065AC D0E9 <1> shr cl, 1 1578 000065AE D0E9 <1> shr cl, 1 ; cx = length 1579 000065B0 81E3FF03 <1> and bx, 1023 ; bx = offset 1580 000065B4 8DB7[D004] <1> lea si, [b_bplist.idbuffer + bx] 1581 000065B8 F3A4 <1> rep movsb 1582 <1> 1583 <1> @@: 1584 <1> 1585 000065BA BBFFFF <1> mov bx, -1 1586 000065BD E88BFC <1> call get_set_when_offset 1587 000065C0 89DE <1> mov si, bx 1588 000065C2 5A <1> pop dx 1589 <1> 1590 <1> .unused: 1591 000065C3 5B <1> pop bx ; restore counter (if displaying all) 1592 000065C4 C3 <1> retn 1593 <1> 1594 <1> 1595 <1> ; CHG: si, al 1596 <1> handle_bl_when: 1597 000065C5 87D6 <1> xchg dx, si 1598 000065C7 85D2 <1> test dx, dx 1599 000065C9 7411 <1> jz @F 1600 000065CB 52 <1> push dx 1601 000065CC BA[0928] <1> mov dx, msg.bb_when 1602 000065CF E8E139 <1> call putsz 1603 000065D2 5A <1> pop dx 1604 000065D3 E8DD39 <1> call putsz 1605 <1> %if 0 1606 <1> mov al, '$' 1607 <1> call putc 1608 <1> %endif 1609 000065D6 BA[E732] <1> mov dx, crlf 1610 000065D9 E8D739 <1> call putsz 1611 <1> @@: 1612 000065DC 87D6 <1> xchg dx, si 1613 000065DE C3 <1> retn 1614 <1> 1615 <1> 1616 <1> ; INP: ax = 0-based index of point 1617 <1> ; OUT: (bx-> byte to access. only if at least 9 points) 1618 <1> ; (bx = 0 always if 8 or fewer points) 1619 <1> ; ah = value to access 1620 <1> ; CHG: al 1621 <1> calcpointbit: 1622 <1> %if ((_NUM_B_BP+7)>>3) != 1 1623 000065DF 89C3 <1> mov bx, ax 1624 <1> %endif 1625 000065E1 2407 <1> and al, 7 1626 000065E3 B401 <1> mov ah, 1 1627 000065E5 91 <1> xchg ax, cx 1628 000065E6 D2E5 <1> shl ch, cl 1629 <1> %if ((_NUM_B_BP+7)>>3) != 1 1630 000065E8 B103 <1> mov cl, 3 1631 000065EA D3EB <1> shr bx, cl 1632 <1> %else 1633 <1> xor bx, bx 1634 <1> %endif 1635 000065EC 91 <1> xchg ax, cx 1636 000065ED C3 <1> retn 1637 <1> 1638 <1> 1639 <1> ; INP: bx:dx = linear address 1640 <1> ; OUT: NC if point found, 1641 <1> ; dx = point index 1642 <1> ; CY if point not found, 1643 <1> ; bx:dx unchanged 1644 <1> ; CHG: di 1645 <1> findpointat: 1646 <1> lframe near 1647 000065EE 5589E5 <1> lenter 1648 <1> lvar word, orig_ax 1649 000065F1 50 <1> push ax 1650 <1> lvar word, orig_si 1651 000065F2 56 <1> push si 1652 <1> lvar dword, orig_bxdx 1653 000065F3 53 <1> push bx 1654 000065F4 52 <1> push dx 1655 000065F5 31D2 <1> xor dx, dx 1656 <1> .loop: 1657 000065F7 89D0 <1> mov ax, dx 1658 000065F9 E8E3FF <1> call calcpointbit 1659 <1> %if ((_NUM_B_BP+7)>>3) != 1 1660 000065FC 84A7[0804] <1> test byte [b_bplist.used_mask + bx], ah 1661 <1> %else 1662 <1> test byte [b_bplist.used_mask], ah 1663 <1> %endif 1664 00006600 741F <1> jz .next 1665 <1> 1666 00006602 89D6 <1> mov si, dx 1667 00006604 01F6 <1> add si, si 1668 00006606 01F6 <1> add si, si 1669 <1> %if BPSIZE == 4 1670 <1> %elif BPSIZE == 5 1671 <1> add si, dx 1672 <1> %elif BPSIZE == 6 1673 00006608 01D6 <1> add si, dx ; * 5 1674 0000660A 01D6 <1> add si, dx ; * 6 1675 <1> %elif BPSIZE == 9 1676 <1> add si, si ; * 8 1677 <1> add si, dx ; * 9 1678 <1> %else 1679 <1> %error Unexpected breakpoint size 1680 <1> %endif 1681 0000660C 81C6[0C04] <1> add si, b_bplist.bp ; -> point 1682 00006610 AD <1> lodsw 1683 00006611 3946F8 <1> cmp word [bp + ?orig_bxdx], ax 1684 00006614 750B <1> jne .next 1685 <1> %if _PM 1686 <1> lodsw 1687 <1> %else 1688 00006616 31C0 <1> xor ax, ax 1689 00006618 AC <1> lodsb 1690 <1> %endif 1691 00006619 3946FA <1> cmp word [bp + ?orig_bxdx + 2], ax 1692 0000661C 7503 <1> jne .next 1693 <1> ; (NC) 1694 0000661E 5B <1> pop bx ; discard dx on stack, clobbering bx 1695 0000661F EB08 <1> jmp .ret_with_dx 1696 <1> 1697 <1> .next: 1698 00006621 42 <1> inc dx 1699 00006622 83FA10 <1> cmp dx, _NUM_B_BP 1700 00006625 72D0 <1> jb .loop 1701 <1> 1702 00006627 F9 <1> stc 1703 <1> .ret: 1704 00006628 5A <1> pop dx 1705 <1> .ret_with_dx: 1706 00006629 5B <1> pop bx ; pop ?orig_bxdx 1707 0000662A 5E <1> pop si ; pop ?orig_si 1708 0000662B 58 <1> pop ax ; pop ?orig_ax 1709 0000662C 89EC5D <1> lleave 1710 0000662F C3 <1> lret 1711 <1> 1712 <1> 1713 <1> ; INP: si->, al= 1714 <1> ; OUT: CY if no "AT" keyword + address, 1715 <1> ; si, al unchanged 1716 <1> ; NC if "AT" keyword + address, 1717 <1> ; si->, al= after 1718 <1> ; bx:dx = dword [..@bb_saved_linear] = linear address 1719 <1> ; CHG: edx, bx 1720 <1> getpointat: 1721 00006630 4E <1> dec si 1722 00006631 BA[1B21] <1> mov dx, msg.at 1723 00006634 E8E932 <1> call isstring? 1724 00006637 AC <1> lodsb 1725 00006638 7402 <1> je .at 1726 0000663A F9 <1> stc 1727 0000663B C3 <1> retn 1728 <1> 1729 <1> .at: 1730 0000663C 8B1E[D00C] <1> mov bx, word [reg_cs] 1731 00006640 E8D1D5 <1> call getlinearaddr 1732 00006643 7303E9151C <1> jc error 1733 00006648 8916[C84A] <1> mov word [..@bb_saved_linear], dx 1734 0000664C 891E[CA4A] <1> mov word [..@bb_saved_linear + 2], bx 1735 00006650 C3 <1> retn 1736 <1> 1737 <1> 1738 <1> ; INP: si->, al= 1739 <1> ; OUT: NC if a point is specified, 1740 <1> ; dx = point index (0-based, below _NUM_B_BP) 1741 <1> ; CY if a keyword is specified, 1742 <1> ; ZR if "ALL" keyword specified 1743 <1> ; NZ if "NEW" keyword specified 1744 <1> getpointindex: 1745 00006651 4E <1> dec si 1746 00006652 BA[8D27] <1> mov dx, msg.all 1747 00006655 E8C832 <1> call isstring? 1748 00006658 7418 <1> je .is_all ; (ZR) 1749 0000665A BA[9127] <1> mov dx, msg.new 1750 0000665D E8C032 <1> call isstring? 1751 00006660 740E <1> je .is_new 1752 00006662 AC <1> lodsb 1753 00006663 E8F331 <1> nearcall getword 1754 00006666 83FA10 <1> cmp dx, _NUM_B_BP 1755 00006669 7203E9EF1B <1> jae error 1756 0000666E F8 <1> clc ; (NC) 1757 0000666F C3 <1> retn 1758 <1> 1759 <1> .is_new: 1760 00006670 85F6 <1> test si, si ; (NZ) 1761 <1> .is_all: 1762 00006672 F9 <1> stc ; (CY) 1763 00006673 AC <1> lodsb ; al = separator, si-> after 1764 00006674 C3 <1> retn 1765 <1> %endif 1766 <1> 1767 <1> 1768 <1> %if BPSIZE == 6 || BPSIZE == 9 1769 <1> ; INP: dx:ax = linear address 1770 <1> ; si -> (d)word offset 1771 <1> ; di -> where to store 1772 <1> ; OUT: cx = length displayed 1773 <1> ; si -> after offset 1774 <1> ; di -> after stored string 1775 <1> ; CHG: ax, dx 1776 <1> bp_display_offset: 1777 <1> lframe 1778 <1> lvar dword, offset 1779 00006675 5589E55050 <1> lenter 1780 <1> lvar dword, linear 1781 0000667A 52 <1> push dx 1782 0000667B 50 <1> push ax 1783 0000667C B82020 <1> mov ax, " " 1784 <1> lvar word, prefix 1785 0000667F 50 <1> push ax 1786 <1> lvar word, start_write 1787 00006680 57 <1> push di 1788 00006681 53 <1> push bx 1789 00006682 AD <1> lodsw 1790 <1> %if _PM 1791 <1> xchg ax, dx 1792 <1> lodsw 1793 <1> cmp ax, -1 1794 <1> xchg ax, dx 1795 <1> jne @F 1796 <1> %else 1797 00006683 31D2 <1> xor dx, dx 1798 <1> %endif 1799 00006685 83F8FF <1> cmp ax, -1 1800 00006688 7436 <1> je .skip 1801 <1> @@: 1802 0000668A 8956FE <1> mov word [bp + ?offset + 2], dx 1803 0000668D 8946FC <1> mov word [bp + ?offset], ax 1804 <1> 1805 00006690 8B56FA <1> mov dx, word [bp + ?linear + 2] 1806 00006693 8B46F8 <1> mov ax, word [bp + ?linear] 1807 00006696 2B46FC <1> sub ax, word [bp + ?offset] 1808 00006699 1B56FE <1> sbb dx, word [bp + ?offset + 2] 1809 <1> 1810 <1> %if _PM 1811 <1> call ispm 1812 <1> jnz .r86m 1813 <1> 1814 <1> push dx 1815 <1> push ax 1816 <1> mov ax, 6 1817 <1> mov bx, word [reg_cs] 1818 <1> int 31h 1819 <1> pop ax 1820 <1> pop bx 1821 <1> jc .try_r86m 1822 <1> 1823 <1> cmp cx, bx 1824 <1> jne .try_r86m 1825 <1> cmp dx, ax 1826 <1> jne .try_r86m 1827 <1> 1828 <1> mov ax, " " 1829 <1> stosw 1830 <1> mov ax, "CS" 1831 <1> stosw 1832 <1> jmp .offset 1833 <1> 1834 <1> .try_r86m: 1835 <1> mov byte [bp + ?prefix + 1], '$' 1836 <1> %endif 1837 <1> 1838 <1> .r86m: 1839 0000669C B90400 <1> mov cx, 4 1840 0000669F A80F <1> test al, 15 1841 000066A1 7527 <1> jnz .questionmarks 1842 000066A3 F7C2F0FF <1> test dx, 0FFF0h 1843 000066A7 7521 <1> jnz .questionmarks 1844 000066A9 D3E8 <1> shr ax, cl 1845 000066AB D3CA <1> ror dx, cl 1846 000066AD 09C2 <1> or dx, ax 1847 000066AF 8B46F6 <1> mov ax, word [bp + ?prefix] 1848 000066B2 AB <1> stosw 1849 000066B3 92 <1> xchg ax, dx 1850 000066B4 E8D333 <1> call hexword 1851 <1> 1852 <1> .offset: 1853 000066B7 B03A <1> mov al, ':' 1854 000066B9 AA <1> stosb 1855 <1> %if _PM 1856 <1> mov ax, word [bp + ?offset + 2] 1857 <1> test ax, ax 1858 <1> jz @F 1859 <1> call hexword 1860 <1> @@: 1861 <1> %endif 1862 000066BA 8B46FC <1> mov ax, word [bp + ?offset] 1863 000066BD E8CA33 <1> call hexword 1864 <1> 1865 <1> .skip: 1866 000066C0 5B <1> pop bx 1867 000066C1 59 <1> pop cx ; get ?start_write 1868 000066C2 F7D9 <1> neg cx 1869 000066C4 01F9 <1> add cx, di 1870 000066C6 89EC5D <1> lleave 1871 000066C9 C3 <1> retn 1872 <1> 1873 <1> .questionmarks: 1874 000066CA B82020 <1> mov ax, " " 1875 000066CD AB <1> stosw 1876 000066CE B83F3F <1> mov ax, "??" 1877 000066D1 AB <1> stosw 1878 000066D2 AB <1> stosw 1879 000066D3 EBE2 <1> jmp .offset 1880 <1> 1881 <1> 1882 <1> point_swap: 1883 000066D5 E8D832 <1> call skipcomma 1884 000066D8 E876FF <1> call getpointindex 1885 000066DB 7303E99900 <1> jc .error 1886 000066E0 89D5 <1> mov bp, dx 1887 000066E2 E86CFF <1> call getpointindex 1888 000066E5 7303E98F00 <1> jc .error 1889 000066EA E8B232 <1> call chkeol 1890 <1> 1891 000066ED B90200 <1> mov cx, 2 1892 <1> .loop_push: 1893 000066F0 89D0 <1> mov ax, dx 1894 000066F2 E8EAFE <1> call calcpointbit 1895 000066F5 88E0 <1> mov al, ah 1896 000066F7 22A7[0804] <1> and ah, byte [b_bplist.used_mask + bx] 1897 000066FB 2287[0A04] <1> and al, byte [b_bplist.disabled_mask + bx] 1898 000066FF 50 <1> push ax 1899 00006700 89D3 <1> mov bx, dx 1900 00006702 01DB <1> add bx, bx ; * 2 1901 00006704 FFB7[6C04] <1> push word [b_bplist.counter + bx] 1902 00006708 FFB7[8C04] <1> push word [b_bplist.id + bx] 1903 0000670C FFB7[AC04] <1> push word [b_bplist.when + bx] 1904 <1> 1905 00006710 01DB <1> add bx, bx ; * 4 1906 <1> %if BPSIZE == 4 1907 <1> %elif BPSIZE == 5 1908 <1> add bx, dx ; * 5 1909 <1> %elif BPSIZE == 6 1910 00006712 01D3 <1> add bx, dx ; * 5 1911 00006714 01D3 <1> add bx, dx ; * 6 1912 <1> %elif BPSIZE == 9 1913 <1> add bx, bx ; * 8 1914 <1> add bx, dx ; * 9 1915 <1> %else 1916 <1> %error Unexpected breakpoint size 1917 <1> %endif 1918 00006716 FFB7[0C04] <1> push word [b_bplist.bp + bx] 1919 0000671A FFB7[0E04] <1> push word [b_bplist.bp + bx + 2] 1920 <1> %if BPSIZE == 4 1921 <1> %elif BPSIZE == 5 1922 <1> push word [b_bplist.bp + bx + 4] 1923 <1> %elif BPSIZE == 6 1924 0000671E FFB7[1004] <1> push word [b_bplist.bp + bx + 4] 1925 <1> %elif BPSIZE == 9 1926 <1> push word [b_bplist.bp + bx + 4] 1927 <1> push word [b_bplist.bp + bx + 6] 1928 <1> push word [b_bplist.bp + bx + 8] 1929 <1> %else 1930 <1> %error Unexpected breakpoint size 1931 <1> %endif 1932 00006722 87EA <1> xchg bp, dx 1933 00006724 E2CA <1> loop .loop_push 1934 <1> 1935 00006726 B102 <1> mov cl, 2 1936 <1> .loop_pop: 1937 00006728 89D3 <1> mov bx, dx 1938 0000672A 01DB <1> add bx, bx ; * 2 1939 0000672C 01DB <1> add bx, bx ; * 4 1940 <1> %if BPSIZE == 4 1941 <1> %elif BPSIZE == 5 1942 <1> add bx, dx ; * 5 1943 <1> %elif BPSIZE == 6 1944 0000672E 01D3 <1> add bx, dx ; * 5 1945 00006730 01D3 <1> add bx, dx ; * 6 1946 <1> %elif BPSIZE == 9 1947 <1> add bx, bx ; * 8 1948 <1> add bx, dx ; * 9 1949 <1> %else 1950 <1> %error Unexpected breakpoint size 1951 <1> %endif 1952 <1> %if BPSIZE == 4 1953 <1> %elif BPSIZE == 5 1954 <1> pop ax 1955 <1> mov byte [b_bplist.bp + bx + 4], al 1956 <1> %elif BPSIZE == 6 1957 00006732 8F87[1004] <1> pop word [b_bplist.bp + bx + 4] 1958 <1> %elif BPSIZE == 9 1959 <1> pop ax 1960 <1> mov byte [b_bplist.bp + bx + 8], al 1961 <1> pop word [b_bplist.bp + bx + 6] 1962 <1> pop word [b_bplist.bp + bx + 4] 1963 <1> %else 1964 <1> %error Unexpected breakpoint size 1965 <1> %endif 1966 00006736 8F87[0E04] <1> pop word [b_bplist.bp + bx + 2] 1967 0000673A 8F87[0C04] <1> pop word [b_bplist.bp + bx] 1968 <1> 1969 0000673E 89D3 <1> mov bx, dx 1970 00006740 01DB <1> add bx, bx ; * 2 1971 00006742 8F87[AC04] <1> pop word [b_bplist.when + bx] 1972 00006746 8F87[8C04] <1> pop word [b_bplist.id + bx] 1973 0000674A 8F87[6C04] <1> pop word [b_bplist.counter + bx] 1974 0000674E 5E <1> pop si 1975 0000674F 89D0 <1> mov ax, dx 1976 00006751 E88BFE <1> call calcpointbit 1977 00006754 87F2 <1> xchg si, dx 1978 00006756 F6D4 <1> not ah 1979 00006758 20A7[0804] <1> and byte [b_bplist.used_mask + bx], ah 1980 0000675C 20A7[0A04] <1> and byte [b_bplist.disabled_mask + bx], ah 1981 00006760 F6D4 <1> not ah 1982 00006762 84D2 <1> test dl, dl 1983 00006764 7404 <1> jz @F 1984 00006766 08A7[0A04] <1> or byte [b_bplist.disabled_mask + bx], ah 1985 <1> @@: 1986 0000676A 84F6 <1> test dh, dh 1987 0000676C 7404 <1> jz @F 1988 0000676E 08A7[0804] <1> or byte [b_bplist.used_mask + bx], ah 1989 <1> @@: 1990 00006772 87F2 <1> xchg si, dx 1991 00006774 87EA <1> xchg bp, dx 1992 00006776 E2B0 <1> loop .loop_pop 1993 00006778 C3 <1> retn 1994 <1> 1995 <1> .error: 1996 00006779 E9E11A <1> jmp error 1997 <1> %endif 1998 <1> 1999 <1> %if _DUALCODE 2000 <1> usesection lDEBUG_CODE2 2001 <1> 2002 <1> section_of bu_relocated 2003 <1> dualfunction 2004 <1> bu_relocated: section_of_function 2005 <1> lframe dualdistance 2006 <1> lpar word, sign 2007 <1> lenter 2008 <1> mov ax, word [bp + ?sign] 2009 <1> mov di, msg.bu_relocated.sign 2010 <1> nearcall hexword 2011 <1> mov dx, msg.bu_relocated 2012 <1> nearcall putsz 2013 <1> lleave 2014 <1> dualreturn 2015 <1> lret 2016 <1> 2017 <1> usesection lDEBUG_CODE 2018 <1> %endif 2019 <1> 2020 <1> bu_breakpoint: 2021 0000677C AC <1> lodsb 2022 <1> %if _DUALCODE 2023 <1> cmp al, '2' 2024 <1> je .2 2025 <1> %endif 2026 0000677D E81F32 <1> call chkeol 2027 <1> %if _DEBUG 2028 <1> %if _DEBUG_COND 2029 <1> testopt [internalflags6], dif6_debug_mode 2030 <1> jnz @F 2031 <1> mov dx, msg.bu_disabled 2032 <1> jmp putsz 2033 <1> @@: 2034 <1> %endif 2035 <1> mov dx, msg.bu 2036 <1> call putsz 2037 <1> pop dx ; discard near return address 2038 <1> mov dx, dmycmd ; point dx to empty function 2039 <1> jmp cmd4.int3 ; run a breakpoint right before dispatcher 2040 <1> %else 2041 00006780 BA[BF2B] <1> mov dx, msg.notbu 2042 00006783 E92D38 <1> jmp putsz 2043 <1> %endif 2044 <1> 2045 <1> %if _DUALCODE 2046 <1> .2: 2047 <1> call skipwhite 2048 <1> call chkeol 2049 <1> mov ax, 2642h 2050 <1> push ax 2051 <1> dualcall bu_relocated 2052 <1> retn 2053 <1> %endif 3444 3445 3446 %include "ee.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug E command (enter into memory) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 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 19 <1> 20 <1> ..@ee_access_start: 21 <1> 22 <1> %if 0 23 <1> 24 <1> ee 0: 25 <1> push ss 26 <1> pop ds 27 <1> push ss 28 <1> pop es 29 <1> mov ax, word [ savesp ] 30 <1> inc ax 31 <1> inc ax 32 <1> mov sp, ax ; restore stack 33 <1> mov bx, word [e_addr + saSegSel] 34 <1> _386_PM_o32 35 <1> mov dx, word [ e_addr ] ; get back address 36 <1> 37 <1> 38 <1> ; Prompt mode. 39 <1> ee 1: 40 <1> mov word [ errret ], ee 0 41 <1> 42 <1> ; Begin loop over lines. 43 <1> ee 2: ; <--- next line 44 <1> mov word [e_addr + saSegSel], bx 45 <1> %if _PM 46 <1> call ispm 47 <1> jnz .86m 48 <1> .pm: 49 <1> mov word [e_addr + saSelector], bx 50 <1> jmp @F 51 <1> .86m: 52 <1> mov word [e_addr + saSegment], bx 53 <1> @@: 54 <1> %endif 55 <1> _386_PM_o32 56 <1> mov word [ e_addr ], dx ; save address 57 <1> mov di, line_out 58 <1> mov ax, bx ; print out segment and offset 59 <1> call hexword 60 <1> 61 <1> === 62 <1> 63 <1> 64 <1> mov al, '.' 65 <1> stosb 66 <1> call getline00 ; read input line 67 <1> call iseol? 68 <1> je .end 69 <1> %if _PM 70 <1> xor bx, bx 71 <1> %endif 72 <1> mov dx, 1 73 <1> call ee_checkplusminus 74 <1> jne .notplusminus 75 <1> cmp al, '+' 76 <1> je ee 3 77 <1> jmp short ee 2 78 <1> 79 <1> .notplusminus: 80 <1> 81 <1> === 82 <1> 83 <1> 84 <1> ; INP: al = character, si-> line 85 <1> ; bx:dx = increment to add/subtract if this is an add/sub request 86 <1> ; OUT: al, si unchanged 87 <1> ; NZ if no add/sub request 88 <1> ; ZR if add/sub request, 89 <1> ; [ e_addr ] offset adjusted 90 <1> ee_checkplusminus: 91 <1> cmp al, '-' 92 <1> jne .not 93 <1> cmp al, '+' 94 <1> jne .not 95 <1> push si 96 <1> push ax 97 <1> call skipwhite 98 <1> call iseol? 99 <1> pop ax 100 <1> pop si 101 <1> jne .not 102 <1> cmp al, '-' 103 <1> je .minus 104 <1> add word [ e_addr ], dx 105 <1> _386_PM adc word [ e_addr+2 ], bx 106 <1> jmp short .done 107 <1> 108 <1> .minus: 109 <1> sub word [ e_addr ], dx 110 <1> _386_PM sbb word [ e_addr+2 ], bx 111 <1> .done: 112 <1> cmp al, al 113 <1> .not: 114 <1> retn 115 <1> 116 <1> === 117 <1> 118 <1> 119 <1> ee 9: 120 <1> call getline00 121 <1> 122 <1> %endif 123 <1> 124 <1> errorj4: 125 00006786 E9D41A <1> jmp error 126 <1> 127 <1> 128 <1> ; E command - edit memory. 129 <1> ee: 130 00006789 E8761D <1> call prephack 131 0000678C E8FB31 <1> call iseol? 132 0000678F 750A <1> jne @F 133 00006791 8B1E[8E0B] <1> mov bx, word [e_addr + saSegSel] 134 <1> _386_PM_o32 135 00006795 8B16[8A0B] <1> mov dx, word [e_addr] 136 00006799 EB44 <1> jmp ee1 137 <1> 138 <1> @@: 139 0000679B 8B1E[C40C] <1> mov bx, word [reg_ds] 140 0000679F E8AE1F <1> nearcall getaddrX ; get address into bx:(e)dx, no scratchsel 141 000067A2 E80C32 <1> call skipcomm0 142 000067A5 E8E231 <1> call iseol? 143 000067A8 7435 <1> je ee1 ; if prompt mode 144 <1> 145 <1> eeparsestr: 146 000067AA 53 <1> push bx 147 <1> %if _PM 148 <1> call verifysegm_or_error; get scratchsel if code selector 149 <1> %endif 150 <1> _386_PM_o32 ; push edx 151 000067AB 52 <1> push dx ; save destination offset 152 000067AC E86D20 <1> nearcall getstr ; get data bytes 153 000067AF 89F9 <1> mov cx, di 154 000067B1 BA[B40A] <1> mov dx, line_out 155 000067B4 29D1 <1> sub cx, dx ; length of byte string 156 <1> _386_PM_o32 ; pop edi 157 000067B6 5F <1> pop di 158 000067B7 7410 <1> jz ee2_empty ; if length == 0 --> 159 <1> _386_PM movzx ecx, cx 160 <1> _386_PM_o32 ; mov eax, ecx 161 000067B9 89C8 <1> mov ax, cx 162 000067BB 48 <1> dec ax ; (cannot be 0) 163 <1> _386_PM call test_high_limit ; 32-bit segment ? 164 <1> _386_PM jz .16 ; no --> 165 <1> _386_PM_o32 ; add eax, edi 166 <1> .16: 167 000067BC 01F8 <1> add ax, di 168 000067BE 72C6 <1> jc short errorj4 ; if it wraps around 169 000067C0 E8681D <1> call dohack 170 000067C3 89D6 <1> mov si, dx 171 000067C5 8EC3 <1> mov es, bx 172 <1> %if _PM 173 <1> cmp byte [bAddr32], 0 174 <1> jz ee_2 175 <1> [cpu 386] 176 <1> movzx esi, si ; ds:esi -> source 177 <1> a32 ; a32 rep movsb 178 <1> __CPU__ 179 <1> ee_2: 180 <1> %endif 181 000067C7 F3A4 <1> rep movsb 182 <1> ee2_empty: 183 000067C9 5B <1> pop bx 184 <1> _386_PM call test_high_limit ; 32-bit segment ? 185 <1> _386_PM jnz .32 ; yes --> 186 <1> _386_PM movzx edi, di ; limit to 16 bits 187 <1> .32: 188 000067CA 891E[8E0B] <1> mov word [e_addr + saSegSel], bx 189 <1> _386_PM_o32 190 000067CE 893E[8A0B] <1> mov word [e_addr], di 191 <1> 192 <1> ; Restore ds + es and undo the interrupt vector hack. 193 <1> ; This code is also used by the `m' command. 194 <1> ee0a: 195 000067D2 16 <1> push ss ; restore ds 196 000067D3 1F <1> pop ds 197 000067D4 16 <1> push ss ; restore es 198 000067D5 07 <1> pop es 199 000067D6 BF[040B] <1> mov di, run2324 ; debuggee's int 23/24 values 200 000067D9 E83F1D <1> call prehak1 ; copy things back 201 000067DC E9601D <1> jmp unhack 202 <1> 203 <1> 204 <1> ..@ee_interactive_access_start: 205 <1> 206 <1> ; Prompt mode. 207 <1> ee1: 208 000067DF E8F39E <1> call guard_re 209 <1> ; Begin loop over lines. 210 <1> ee2: ; <--- next line 211 000067E2 89D8 <1> mov ax, bx ; print out segment and offset 212 000067E4 E8A332 <1> call hexword ; (uses original selector, not scratchsel) 213 000067E7 B03A <1> mov al, ':' 214 000067E9 AA <1> stosb 215 <1> _386_PM_o32 ; mov eax, edx 216 000067EA 89D0 <1> mov ax, dx 217 <1> %if _PM 218 <1> call test_high_limit ; 32-bit segment ? 219 <1> jz .16 ; no --> 220 <1> call hexword_high 221 <1> .16: 222 <1> %endif 223 000067EC E89B32 <1> call hexword 224 <1> 225 <1> %if _40COLUMNS 226 000067EF F606[B500]10 <1> testopt [options6], opt6_40_columns 227 000067F4 7405 <1> jz ee3 228 000067F6 B020 <1> mov al, 32 229 000067F8 AA <1> stosb ; only one blank byte here 230 000067F9 EB04 <1> jmp @F 231 <1> %endif 232 <1> 233 <1> ; Begin loop over bytes. 234 <1> ee3: ; <--- next byte 235 000067FB B82020 <1> mov ax, 32<<8|32 ; print old value of byte 236 000067FE AB <1> stosw 237 <1> @@: 238 000067FF E8291D <1> call dohack ; do the INT pointer hack 239 00006802 E81A0D <1> call readmem ; read mem at BX:(E)DX 240 00006805 E8371D <1> call unhack ; undo the INT pointer hack 241 00006808 891E[8E0B] <1> mov word [e_addr + saSegSel], bx 242 <1> _386_PM_o32 243 0000680C 8916[8A0B] <1> mov word [e_addr], dx 244 00006810 E87E32 <1> call hexbyte 245 00006813 B02E <1> mov al, '.' 246 00006815 AA <1> stosb 247 00006816 C606[EB0A]00 <1> mov byte [ linecounter ], 0 ; reset counter 248 0000681B 8026[D200]EF <1> clropt [internalflags], promptwaiting 249 00006820 53 <1> push bx 250 00006821 52 <1> push dx 251 00006822 E8A232 <1> call putsline 252 00006825 5A <1> pop dx 253 00006826 5B <1> pop bx 254 00006827 BE[C40A] <1> mov si, line_out+16 ; address of buffer for characters 255 0000682A 31C9 <1> xor cx, cx ; number of characters so far 256 <1> 257 <1> ee4_next: 258 0000682C E82B3D <1> call getline_is_input_file? 259 0000682F 7238 <1> jc ee9_getc_tty ; if it's a TTY 260 <1> 261 <1> ee_getc_file: 262 00006831 800E[D600]40 <1> setopt [internalflags2], dif2_did_getline_file 263 <1> ; set this flag so yy_reset_buf knows 264 <1> ; that we may have buffered the file 265 <1> 266 00006836 56 <1> push si 267 <1> %if _NEWFULLHANDLING 268 00006837 BF[0300] <1> mov di, line_in+3 ; read max 269 <1> %else 270 <1> mov di, line_in+2 271 <1> %endif 272 0000683A 8B36[620B] <1> mov si, word [bufnext] 273 <1> ee5: 274 0000683E 3B36[640B] <1> cmp si, word [bufend] 275 00006842 7207 <1> jb ee6 ; if there's a character already 276 00006844 E8ED42 <1> call fillbuf 277 00006847 B00D <1> mov al, 13 278 00006849 7217 <1> jc ee8 ; if eof 279 <1> ee6: 280 0000684B 803E[540B]0D <1> cmp byte [notatty], 13 281 00006850 750C <1> jne ee7 ; if no need to compress CR/LF 282 00006852 803C0A <1> cmp byte [si], 10 283 00006855 7507 <1> jne ee7 ; if not a line feed 284 00006857 46 <1> inc si ; skip it 285 00006858 FE06[540B] <1> inc byte [notatty] ; avoid repeating this 286 0000685C EBE0 <1> jmp ee5 ; next character 287 <1> 288 <1> ee7: 289 0000685E AC <1> lodsb ; get the character 290 0000685F A2[540B] <1> mov byte [notatty], al 291 <1> ee8: 292 00006862 8936[620B] <1> mov word [bufnext], si 293 00006866 5E <1> pop si 294 00006867 EB03 <1> jmp ee10_got_codepoint 295 <1> 296 <1> ee9_getc_tty: 297 00006869 E8AA37 <1> call getc ; character input without echo 298 <1> ee10_got_codepoint: 299 0000686C 3C20 <1> cmp al, 32 ; (go to next byte) 300 0000686E 7440 <1> je ee13_write 301 00006870 3C2D <1> cmp al, '-' ; (go to prior byte) 302 00006872 743C <1> je ee13_write 303 00006874 3C2E <1> cmp al, '.' ; (exit E interactive mode) 304 00006876 7438 <1> je ee13_write 305 00006878 3C0A <1> cmp al, 10 306 0000687A 7434 <1> je ee13_write 307 0000687C E80F31 <1> call iseol?.notsemicolon; (also exit E interactive mode) 308 0000687F 742F <1> je ee13_write ; all: done with this byte --> 309 00006881 3C08 <1> cmp al, 8 310 00006883 741D <1> je ee11_backspace ; if backspace --> 311 00006885 3C7F <1> cmp al, 7Fh 312 00006887 7419 <1> je ee11_backspace ; if DEL (handle like backspace) --> 313 00006889 83F902 <1> cmp cx, byte 2 ; otherwise, it should be a hex character 314 0000688C 731B <1> jae ee4_next_j ; if we have a full byte already 315 0000688E 8804 <1> mov byte [si], al 316 00006890 E8EB2F <1> nearcall getnyb 317 00006893 7214 <1> jc ee4_next_j ; if it's not a hex character 318 00006895 41 <1> inc cx 319 00006896 AC <1> lodsb ; get the character back 320 00006897 EB12 <1> jmp ee12_put_then_next 321 <1> 322 <1> ee112_priorbyte: 323 00006899 E83937 <1> call putc ; display the minus 324 <1> _386_PM call test_high_limit ; 32-bit segment ? 325 <1> _386_PM jz .16 ; no --> 326 <1> _386_PM_o32 327 <1> .16: 328 0000689C 4A <1> dec dx ; decrement offset (16 bit or 32 bit) 329 0000689D BF[B40A] <1> mov di, line_out 330 000068A0 EB76 <1> jmp ee15_linebreak_and_ee2 331 <1> 332 <1> ee11_backspace: 333 000068A2 E305 <1> jcxz ee4_next_j ; if nothing to backspace over 334 000068A4 49 <1> dec cx 335 000068A5 4E <1> dec si 336 000068A6 E87941 <1> call fullbsout 337 <1> ee4_next_j: 338 000068A9 EB81 <1> jmp ee4_next 339 <1> 340 <1> ee12_put_then_next: 341 000068AB E82737 <1> call putc 342 000068AE EBF9 <1> jmp ee4_next_j ; back for more 343 <1> 344 <1> ; We have a byte (if CX != 0). 345 <1> ; 346 <1> ; cx = number of digits we have (0..2) 347 <1> ; al = codepoint specifying how to proceed after writing 348 <1> ee13_write: 349 000068B0 E32D <1> jcxz ee14_done_write ; if no change for this byte 350 <1> 351 000068B2 50 <1> push ax ; preserve proceed control 352 000068B3 31C0 <1> xor ax, ax ; ah = 0, al = 0 353 000068B5 8804 <1> mov byte [si], al ; terminate the string 354 000068B7 29CE <1> sub si, cx ; point to beginning 355 <1> @@: 356 000068B9 00E4 <1> add ah, ah 357 000068BB 00E4 <1> add ah, ah 358 000068BD 00E4 <1> add ah, ah 359 000068BF 00E4 <1> add ah, ah ; prior value times 16 360 000068C1 00C4 <1> add ah, al ; add next digit (0 in first iteration) 361 000068C3 AC <1> lodsb ; load next digit (or NUL) 362 000068C4 E8B72F <1> nearcall getnyb 363 000068C7 73F0 <1> jnc @B ; if another digit --> (NC) 364 <1> ; (CY can only mean we reached the NUL) 365 000068C9 88E0 <1> mov al, ah ; get byte value 366 000068CB E85D1C <1> call dohack ; do the INT pointer hack 367 000068CE E83C0C <1> call writemem ; write AL at BX:(E)DX (may use scratchsel) 368 000068D1 BF[040B] <1> mov di, run2324 ; debuggee's int 23/24 369 000068D4 E8441C <1> call prehak1 ; copy things back 370 000068D7 E8651C <1> call unhack ; undo the INT pointer hack 371 <1> _386_PM call test_high_limit ; 32-bit segment ? 372 <1> _386_PM jz .16 ; no --> 373 <1> _386_PM_o32 374 <1> .16: 375 000068DA FF06[8A0B] <1> inc word [e_addr] 376 000068DE 58 <1> pop ax ; al = how to proceed 377 <1> 378 <1> ; End the loop over bytes. 379 <1> ee14_done_write: 380 000068DF BF[B40A] <1> mov di, line_out ; reset output buffer 381 <1> 382 000068E2 3C20 <1> cmp al, 32 ; (go to next byte) 383 000068E4 7414 <1> je ee_nextbyte 384 000068E6 3C2D <1> cmp al, '-' ; (go to prior byte) 385 000068E8 74AF <1> je ee112_priorbyte 386 000068EA 3C2E <1> cmp al, '.' ; (exit E interactive mode) 387 000068EC 7431 <1> je ee16_end 388 000068EE 3C0A <1> cmp al, 10 389 000068F0 742D <1> je ee16_end 390 000068F2 E89930 <1> call iseol?.notsemicolon; (also exit E interactive mode) 391 000068F5 7428 <1> je ee16_end 392 000068F7 E96319 <1> jmp error ; unexpected value 393 <1> 394 <1> ee_nextbyte: 395 <1> _386_PM call test_high_limit ; 32-bit segment ? 396 <1> _386_PM jz .16 ; no --> 397 <1> _386_PM_o32 398 <1> .16: 399 000068FA 42 <1> inc dx ; increment offset (16 bit or 32 bit) 400 <1> %if _40COLUMNS 401 000068FB F606[B500]10 <1> testopt [options6], opt6_40_columns 402 00006900 7405 <1> jz @F 403 00006902 F6C203 <1> test dl, 3 404 00006905 7411 <1> jz ee15_linebreak_and_ee2 405 <1> @@: 406 <1> %endif 407 00006907 F6C207 <1> test dl, 7 408 0000690A 740C <1> jz ee15_linebreak_and_ee2 409 <1> ; if new line 410 0000690C F7D1 <1> not cx 411 0000690E 83C104 <1> add cx, byte 4 ; compute 3 - cx 412 00006911 B020 <1> mov al, 32 413 00006913 F3AA <1> rep stosb ; store that many spaces 414 00006915 E9E3FE <1> jmp ee3 ; back for more 415 <1> 416 <1> ee15_linebreak_and_ee2: 417 00006918 B80D0A <1> mov ax, 10 << 8 | 13 ; terminate this line 418 0000691B AB <1> stosw 419 0000691C E9C3FE <1> jmp ee2 ; back for a new line 420 <1> 421 <1> ee16_end: 422 0000691F E9A131 <1> jmp putsline_crlf ; call putsline and return 423 <1> 424 <1> ..@ee_interactive_access_end: 425 <1> 426 <1> ..@ee_access_end: 3447 3448 3449 %include "ff.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug F command (find) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 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 19 <1> 20 <1> ; F command - fill memory 21 <1> ff: 22 00006922 31C9 <1> xor cx, cx ; get address range (no default length) 23 00006924 8B1E[C40C] <1> mov bx, word [reg_ds] 24 00006928 E8711D <1> nearcall getrange ; get address range into bx:(e)dx 25 <1> _386_PM_o32 ; sub ecx, edx 26 0000692B 29D1 <1> sub cx, dx 27 <1> _386_PM_o32 ; inc ecx 28 0000692D 41 <1> inc cx ; (e)cx = number of bytes 29 0000692E 53 <1> push bx 30 <1> _386_PM_o32 ; push ecx 31 0000692F 51 <1> push cx ; save it 32 <1> _386_PM_o32 ; push edx 33 00006930 52 <1> push dx ; save start address 34 <1> 35 00006931 4E <1> dec si 36 00006932 BA[0A1F] <1> mov dx, msg.range 37 00006935 E8E82F <1> call isstring? 38 00006938 AC <1> lodsb 39 00006939 751A <1> jne .notrange 40 <1> 41 0000693B 8B1E[C40C] <1> mov bx, word [reg_ds] ; get search range 42 0000693F 800E[DB00]04 <1> setopt [internalflags3], dif3_accept_getrange_0 43 <1> %if _MS_0RANGE_COMPAT 44 00006944 C606[190B]00 <1> mov byte [getrange_is_uu], 0 45 <1> %endif 46 00006949 E85F1D <1> nearcall getrangeX.ecx_and_0_valid 47 <1> ; try to get second range 48 0000694C E85030 <1> call chkeol ; and insure end-of-line 49 <1> ; successful if it returned 50 <1> _386_PM_o32 ; mov esi, edx 51 0000694F 89D6 <1> mov si, dx ; bx:esi-> source string 52 <1> _386_PM_o32 ; sub ecx, edx 53 00006951 29D1 <1> sub cx, dx ; ecx = count - 1 54 00006953 EB17 <1> jmp short @F 55 <1> 56 <1> .notrange: 57 00006955 E85930 <1> call skipcomm0 58 00006958 E8C11E <1> nearcall getstr ; get string of bytes 59 0000695B 89F9 <1> mov cx, di 60 0000695D 81E9[B40A] <1> sub cx, line_out 61 00006961 7503E9F718 <1> jz error 62 00006966 49 <1> dec cx 63 <1> _386_PM movzx ecx, cx 64 00006967 8CDB <1> mov bx, ds 65 <1> _386_PM xor esi, esi 66 00006969 BE[B40A] <1> mov si, line_out 67 <1> 68 <1> @@: 69 <1> _386_PM_o32 ; pop edi 70 0000696C 5F <1> pop di 71 <1> _386_PM_o32 ; pop eax 72 0000696D 58 <1> pop ax 73 0000696E 07 <1> pop es 74 0000696F 8EDB <1> mov ds, bx 75 <1> %if _PM 76 <1> cmp byte [ss:bAddr32], 0 77 <1> jz ff16 78 <1> ff32: 79 <1> [cpu 386] 80 <1> inc ecx 81 <1> jz error 82 <1> cmp ecx, byte 1 83 <1> je .onebytesource 84 <1> xor edx, edx ; edx:eax = size 85 <1> div ecx 86 <1> test eax, eax 87 <1> jz .partial 88 <1> .loop: 89 <1> push esi 90 <1> push ecx 91 <1> a32 movsb 92 <1> dec ecx 93 <1> a32 rep movsb 94 <1> pop ecx 95 <1> pop esi 96 <1> dec eax 97 <1> jnz .loop 98 <1> .partial: 99 <1> mov ecx, edx ; get remainder (number of bytes in partial copy) 100 <1> jecxz ffret ; if no partial copy --> 101 <1> a32 rep movsb 102 <1> jmp short ffret ; done --> 103 <1> .onebytesource: 104 <1> mov ecx, eax ; size 105 <1> mov al, byte [esi] 106 <1> a32 rep stosb 107 <1> jmp short ffret 108 <1> __CPU__ 109 <1> ff16: 110 <1> %endif 111 00006971 31D2 <1> xor dx, dx ; dx:ax = size 112 00006973 83F801 <1> cmp ax, byte 1 113 00006976 83D200 <1> adc dx, byte 0 ; convert 0000:0000 to 0001:0000 (0 = 64 KiB) 114 00006979 41 <1> inc cx 115 0000697A 7503 <1> jnz @F 116 <1> ; dx:ax = 1_0000h, remainder = 0, quotient = 1 117 <1> ; dx:ax = 1, remainder = 1, quotient = 0 118 <1> ; dx:ax = 1234h, remainder = 1234h, quotient = 0 119 0000697C 92 <1> xchg ax, dx 120 0000697D EB07 <1> jmp @FF 121 <1> 122 <1> @@: 123 0000697F 83F901 <1> cmp cx, byte 1 124 00006982 7419 <1> je .onebytesource ; a common optimization 125 00006984 F7F1 <1> div cx ; compute number of whole repetitions 126 <1> @@: 127 00006986 85C0 <1> test ax, ax 128 00006988 740B <1> jz .partial ; if less than one whole rep 129 <1> .loop: 130 0000698A 56 <1> push si 131 0000698B 51 <1> push cx 132 0000698C A4 <1> movsb 133 0000698D 49 <1> dec cx 134 0000698E F3A4 <1> rep movsb 135 00006990 59 <1> pop cx 136 00006991 5E <1> pop si 137 00006992 48 <1> dec ax 138 00006993 75F5 <1> jnz .loop ; if more to go 139 <1> .partial: 140 00006995 89D1 <1> mov cx, dx ; get remainder (number of bytes in partial copy) 141 00006997 E30C <1> jcxz ffret ; if no partial copy --> 142 00006999 F3A4 <1> rep movsb 143 0000699B EB08 <1> jmp short ffret ; done --> 144 <1> .onebytesource: 145 0000699D 89C1 <1> mov cx, ax ; size 146 0000699F 8A04 <1> mov al, byte [si] 147 000069A1 AA <1> stosb ; cx=0 -> 64 kB 148 000069A2 49 <1> dec cx 149 000069A3 F3AA <1> rep stosb 150 <1> ffret: 151 000069A5 16 <1> push ss ; restore ds 152 000069A6 1F <1> pop ds 153 000069A7 16 <1> push ss ; restore es 154 000069A8 07 <1> pop es 155 000069A9 C3 <1> retn 3450 3451 3452 %include "hh.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug H commands (hexadecimal calculation) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 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 19 <1> 20 <1> %if _EXPRESSIONS 21 <1> 22 <1> ; H command - hex computation 23 <1> hh: 24 000069AA E80430 <1> call skipcomm0 25 000069AD 4E <1> dec si 26 000069AE BA[D51F] <1> mov dx, msg.base 27 000069B1 E86C2F <1> call isstring? 28 000069B4 7403E9CF00 <1> jne .normal 29 000069B9 E80D30 <1> call skipequals 30 000069BC E8B829 <1> nearcall getexpression 31 000069BF 85DB <1> test bx, bx 32 <1> @@: 33 000069C1 7403E9BF00 <1> jnz .error 34 000069C6 83FA24 <1> cmp dx, 36 35 000069C9 77F6 <1> ja @B 36 000069CB 83FA02 <1> cmp dx, 2 37 000069CE 72F1 <1> jb @B 38 000069D0 52 <1> push dx 39 <1> 40 000069D1 E8DD2F <1> call skipcomm0 41 000069D4 4E <1> dec si 42 000069D5 BA[DA1F] <1> mov dx, msg.group 43 000069D8 E8452F <1> call isstring? 44 000069DB BA0000 <1> mov dx, 0 45 000069DE 7513 <1> jne .gotgroup 46 000069E0 E8E62F <1> call skipequals 47 000069E3 E89129 <1> nearcall getexpression 48 000069E6 E8C82F <1> call skipcomm0 49 000069E9 85DB <1> test bx, bx 50 000069EB 75D4 <1> jnz @B 51 000069ED 83FA20 <1> cmp dx, 32 52 000069F0 77CF <1> ja @B 53 000069F2 4E <1> dec si 54 <1> .gotgroup: 55 000069F3 52 <1> push dx 56 000069F4 BA[E01F] <1> mov dx, msg.width 57 000069F7 E8262F <1> call isstring? 58 000069FA BB0000 <1> mov bx, 0 59 000069FD 7515 <1> jne .gotwidth 60 000069FF E8C72F <1> call skipequals 61 00006A02 E87229 <1> nearcall getexpression 62 00006A05 E8A92F <1> call skipcomm0 63 00006A08 85DB <1> test bx, bx 64 00006A0A 75B5 <1> jnz @B 65 00006A0C 83FA20 <1> cmp dx, 32 66 00006A0F 77B0 <1> ja @B 67 00006A11 89D3 <1> mov bx, dx 68 00006A13 A8 <1> db __TEST_IMM8 ; (skip lodsb) 69 <1> .gotwidth: 70 00006A14 AC <1> lodsb 71 00006A15 53 <1> push bx 72 00006A16 E85701 <1> call .compute 73 00006A19 58 <1> pop ax 74 00006A1A 5E <1> pop si 75 00006A1B 59 <1> pop cx 76 00006A1C BF[F60A] <1> mov di, line_out + 66 77 <1> 78 00006A1F E88E01 <1> call .storeresult 79 <1> 80 00006A22 93 <1> xchg bx, ax ; ax:dx = number, bx = width 81 00006A23 92 <1> xchg ax, dx ; dx:ax = number 82 <1> lframe 83 00006A24 5589E5 <1> lenter 84 <1> lvar dword, dividend 85 00006A27 52 <1> push dx 86 00006A28 50 <1> push ax 87 00006A29 4B <1> dec bx 88 <1> lvar word, minwidth 89 00006A2A 53 <1> push bx 90 <1> lvar word, group 91 00006A2B 56 <1> push si 92 <1> lvar word, groupcounter 93 00006A2C 56 <1> push si 94 <1> 95 00006A2D 89FB <1> mov bx, di 96 00006A2F FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 97 <1> 98 <1> ; dword [bp + ?dividend] = number to display 99 <1> ; cx = base 100 <1> .loop_write: 101 <1> 102 00006A30 31D2 <1> xor dx, dx 103 00006A32 57 <1> push di 104 00006A33 BF0400 <1> mov di, 4 105 <1> .loop_divide: 106 00006A36 8B43FA <1> mov ax, [bp + ?dividend - 2 + di] 107 00006A39 F7F1 <1> div cx 108 00006A3B 8943FA <1> mov word [bp + ?dividend - 2 + di], ax 109 00006A3E 4F <1> dec di 110 00006A3F 4F <1> dec di 111 00006A40 75F4 <1> jnz .loop_divide 112 <1> ; dx = last remainder 113 00006A42 5F <1> pop di 114 00006A43 92 <1> xchg ax, dx ; ax = remainder (next digit) 115 <1> ; dword [bp + ?dividend] = result of div 116 00006A44 0430 <1> add al, '0' 117 00006A46 3C39 <1> cmp al, '9' 118 00006A48 7602 <1> jbe @F 119 00006A4A 0407 <1> add al, -('9'+1)+'A' 120 <1> @@: 121 00006A4C AA <1> stosb 122 <1> 123 00006A4D FF4EF6 <1> dec word [bp + ?groupcounter] 124 00006A50 7509 <1> jnz @F 125 00006A52 FF76F8 <1> push word [bp + ?group] 126 00006A55 8F46F6 <1> pop word [bp + ?groupcounter] 127 00006A58 B05F <1> mov al, '_' 128 00006A5A AA <1> stosb 129 <1> @@: 130 <1> 131 00006A5B FF4EFA <1> dec word [bp + ?minwidth] 132 00006A5E 79D0 <1> jns .loop_write 133 <1> 134 00006A60 837EFE00 <1> cmp word [bp + ?dividend + 2], 0 135 00006A64 75CA <1> jnz .loop_write 136 00006A66 837EFC00 <1> cmp word [bp + ?dividend], 0 137 <1> ; any more ? 138 00006A6A 75C4 <1> jnz .loop_write ; loop --> 139 <1> 140 00006A6C FC <1> cld 141 <1> 142 00006A6D 29FB <1> sub bx, di 143 00006A6F 89D9 <1> mov cx, bx 144 00006A71 89FE <1> mov si, di 145 00006A73 46 <1> inc si 146 <1> 147 00006A74 BF[B40A] <1> mov di, line_out 148 <1> 149 00006A77 803C5F <1> cmp byte [si], '_' 150 00006A7A 7502 <1> jne @F 151 00006A7C 46 <1> inc si 152 00006A7D 49 <1> dec cx 153 <1> ; never need to loop because next digit is always a digit 154 <1> 155 <1> @@: 156 00006A7E F3A4 <1> rep movsb ; overlapping! 157 <1> 158 00006A80 89EC5D <1> lleave 159 00006A83 EB76 <1> jmp short .putsline_crlf 160 <1> 161 <1> 162 <1> .error: 163 00006A85 E9D517 <1> jmp error 164 <1> 165 <1> 166 <1> .normal: 167 00006A88 BA[891E] <1> mov dx, msg.as 168 00006A8B E8922E <1> call isstring? 169 00006A8E 7532 <1> jne .not_as 170 <1> 171 <1> .as: 172 00006A90 E81D2F <1> call skipcomma 173 00006A93 4E <1> dec si 174 00006A94 E8621E <1> nearcall get_length_keyword 175 00006A97 AC <1> lodsb 176 00006A98 75EB <1> jne short .error 177 00006A9A E8D300 <1> call .compute 178 00006A9D E308 <1> jcxz @FF 179 <1> @@: 180 00006A9F D1E2 <1> shl dx, 1 181 00006AA1 D1D3 <1> rcl bx, 1 182 00006AA3 72E0 <1> jc short .error 183 00006AA5 E2F8 <1> loop @B 184 <1> @@: 185 00006AA7 E80601 <1> call .storeresult 186 <1> 187 00006AAA B400 <1> mov ah, 0 188 00006AAC 53 <1> push bx 189 00006AAD 52 <1> push dx 190 00006AAE E8C600 <1> call .store 191 <1> 192 00006AB1 B82020 <1> mov ax, (32 << 8) | 32 193 00006AB4 AB <1> stosw 194 00006AB5 58 <1> pop ax 195 00006AB6 5A <1> pop dx 196 00006AB7 B90100 <1> mov cx, 1 ; cx = 1, multiplier 197 00006ABA BB0800 <1> mov bx, 4+4 ; bx = 4+4, width 198 00006ABD E808B5 <1> call disp_dxax_times_cx_width_bx_size.store 199 00006AC0 EB39 <1> jmp short .putsline_crlf 200 <1> 201 <1> 202 <1> .not_as: 203 00006AC2 AC <1> lodsb 204 00006AC3 56 <1> push si 205 00006AC4 50 <1> push ax 206 00006AC5 800E[0054]01 <1> or byte [hhflag], 1 ; set flag so no operator means add 207 <1> %if _HHDIVREMAIN 208 00006ACA C606[0254]00 <1> mov byte [hh_div_active], 0 209 <1> %endif 210 00006ACF E89E00 <1> call .compute 211 00006AD2 58 <1> pop ax 212 00006AD3 5E <1> pop si 213 00006AD4 E8D900 <1> call .storeresult 214 00006AD7 F606[0054]04 <1> test byte [hhflag], 4 ; any two-fold operation ? 215 00006ADC 7420 <1> jz .single_and_div ; no --> 216 00006ADE 8A26[A500] <1> mov ah, byte [options2 + 1] 217 00006AE2 80E410 <1> and ah, opt2_hh_compat >> 8 218 00006AE5 E8A400 <1> call .store2 ; display "FFFFFFFF (-0001)" 219 00006AE8 50 <1> push ax 220 00006AE9 B82020 <1> mov ax, 32<<8|32 221 00006AEC AB <1> stosw 222 00006AED 58 <1> pop ax 223 00006AEE 50 <1> push ax 224 00006AEF 800E[0054]02 <1> or byte [hhflag], 2 ; set flag so no operator means sub 225 00006AF4 E87900 <1> call .compute 226 00006AF7 58 <1> pop ax 227 00006AF8 E89100 <1> call .store2 ; display "FFFFFFFF (-0001)" 228 <1> .putsline_crlf: 229 00006AFB E9C52F <1> jmp putsline_crlf 230 <1> 231 <1> .single_and_div: 232 <1> %if _HHDIVREMAIN 233 00006AFE D006[0254] <1> rol byte [hh_div_active], 1 234 00006B02 732D <1> jnc .single 235 <1> 236 00006B04 E82A00 <1> call .single 237 <1> 238 00006B07 BF[B40A] <1> mov di, line_out 239 00006B0A BE[A51E] <1> mov si, msg.hh_div_remainder 240 00006B0D E88ECD <1> call copy_single_counted_string 241 <1> 242 00006B10 8B16[F853] <1> mov dx, word [hh_div_divisor] 243 00006B14 8B1E[FA53] <1> mov bx, word [hh_div_divisor + 2] 244 00006B18 FF36[F653] <1> push word [hh_div_dividend + 2] 245 00006B1C FF36[F453] <1> push word [hh_div_dividend] 246 00006B20 8F06[F053] <1> pop word [hhvar] 247 00006B24 8F06[F253] <1> pop word [hhvar + 2] 248 00006B28 31C0 <1> xor ax, ax 249 00006B2A 8826[0154] <1> mov byte [hhtype], ah 250 00006B2E E8FB1F <1> nearcall of_modulo 251 <1> %endif 252 <1> 253 <1> .single: 254 00006B31 B400 <1> mov ah, 0 255 00006B33 53 <1> push bx 256 00006B34 52 <1> push dx 257 00006B35 E85400 <1> call .store2 258 <1> 259 00006B38 B82020 <1> mov ax, (32 << 8) | 32 260 00006B3B AB <1> stosw 261 00006B3C B86465 <1> mov ax, "de" 262 00006B3F AB <1> stosw 263 00006B40 B86369 <1> mov ax, "ci" 264 00006B43 AB <1> stosw 265 00006B44 B86D61 <1> mov ax, "ma" 266 00006B47 AB <1> stosw 267 00006B48 B86C3A <1> mov ax, "l:" 268 00006B4B AB <1> stosw 269 00006B4C B020 <1> mov al, 32 270 00006B4E AA <1> stosb 271 00006B4F 58 <1> pop ax 272 00006B50 5A <1> pop dx 273 00006B51 E8C62E <1> call decdword 274 00006B54 85D2 <1> test dx, dx ; result negative ? 275 00006B56 7916 <1> jns @F ; no --> 276 00006B58 50 <1> push ax 277 00006B59 B82028 <1> mov ax, " (" 278 00006B5C AB <1> stosw 279 00006B5D B02D <1> mov al, "-" 280 00006B5F AA <1> stosb 281 00006B60 58 <1> pop ax 282 00006B61 F7DA <1> neg dx 283 00006B63 F7D8 <1> neg ax 284 00006B65 83DA00 <1> sbb dx, byte 0 ; neg bx:dx 285 00006B68 E8AF2E <1> call decdword 286 00006B6B B029 <1> mov al, ")" 287 00006B6D AA <1> stosb 288 <1> @@: 289 00006B6E EB8B <1> jmp .putsline_crlf 290 <1> 291 <1> 292 <1> .compute: 293 00006B70 E80428 <1> nearcall getdword 294 00006B73 E8292E <1> call chkeol ; expect end of line here 295 <1> .comp_ret: 296 00006B76 C3 <1> retn 297 <1> 298 <1> ; INP: bx:dx = result 299 <1> ; ah = flag, nonzero if to stay 86-DOS Debug compatible 300 <1> ; OUT: displayed 301 <1> ; CHG: di, bx, dx 302 <1> .store: 303 00006B77 50 <1> push ax 304 00006B78 84E4 <1> test ah, ah 305 00006B7A 7509 <1> jnz .store_nothigh 306 00006B7C 85DB <1> test bx, bx 307 00006B7E 7405 <1> jz .store_nothigh ; no need to display 32-bit value 308 00006B80 89D8 <1> mov ax, bx 309 00006B82 E8052F <1> call hexword 310 <1> .store_nothigh: 311 00006B85 89D0 <1> mov ax, dx 312 00006B87 E8002F <1> call hexword 313 00006B8A 58 <1> pop ax 314 00006B8B C3 <1> retn 315 <1> 316 <1> .store2: 317 00006B8C E8E8FF <1> call .store 318 00006B8F 50 <1> push ax 319 00006B90 84E4 <1> test ah, ah 320 00006B92 751A <1> jnz .store2_ret 321 00006B94 85DB <1> test bx, bx ; result negative ? 322 00006B96 7916 <1> jns .store2_ret ; no --> 323 00006B98 B82028 <1> mov ax, " (" 324 00006B9B AB <1> stosw 325 00006B9C B02D <1> mov al, "-" 326 00006B9E AA <1> stosb 327 00006B9F F7DB <1> neg bx 328 00006BA1 F7DA <1> neg dx 329 00006BA3 83DB00 <1> sbb bx, byte 0 ; neg bx:dx 330 00006BA6 58 <1> pop ax 331 00006BA7 50 <1> push ax 332 00006BA8 E8CCFF <1> call .store 333 00006BAB B029 <1> mov al, ")" 334 00006BAD AA <1> stosb 335 <1> .store2_ret: 336 00006BAE 58 <1> pop ax 337 00006BAF C3 <1> retn 338 <1> 339 <1> 340 <1> .storeresult: 341 00006BB0 8916[D44A] <1> mov word [hhresult], dx 342 00006BB4 891E[D64A] <1> mov word [hhresult + 2], bx 343 00006BB8 C3 <1> retn 344 <1> %else 345 <1> ; H command - hex addition and subtraction. 346 <1> hh: 347 <1> nearcall getdword 348 <1> push bx 349 <1> push dx 350 <1> call skipcomm0 351 <1> nearcall getdword 352 <1> call chkeol ; expect end of line here 353 <1> pop cx 354 <1> pop ax ; first value in AX:CX, second in BX:DX 355 <1> mov si, ax 356 <1> mov bp, cx ; first value in SI:BP now 357 <1> mov ax, cx 358 <1> add ax, dx 359 <1> push ax 360 <1> mov ax, si 361 <1> adc ax, bx 362 <1> jz .nothigh1 ; no need to display 32-bit value 363 <1> call hexword 364 <1> .nothigh1: 365 <1> pop ax 366 <1> call hexword 367 <1> mov ax, 2020h 368 <1> stosw 369 <1> mov ax, bp 370 <1> sub ax, dx 371 <1> push ax 372 <1> mov ax, si 373 <1> sbb ax, bx 374 <1> jz .nothigh2 ; no need to display 32-bit value 375 <1> or si, bx 376 <1> jz .nothigh2 ; both were zero, non-zero result only by carry --> 377 <1> call hexword 378 <1> .nothigh2: 379 <1> pop ax 380 <1> call hexword 381 <1> call putsline_crlf 382 <1> retn 383 <1> %endif 384 <1> 385 <1> 386 <1> usesection lDEBUG_DATA_ENTRY 387 <1> 388 <1> align 4, db 0 389 00004AD4 00000000 <1> hhresult: dd 0 3453 3454 3455 %include "iioo.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug I and O commands (port input/output) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 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 19 <1> 20 <1> ; O command - output to I/O port. 21 <1> oo: 22 00006BB9 B44F <1> mov ah, 'O' 23 00006BBB BB[C26B] <1> mov bx, .tab 24 00006BBE E9B901 <1> jmp ii.common 25 <1> 26 <1> 27 00006BC1 00 <1> align 2, db 0 28 <1> .tab: 29 00006BC2 [C86B][D26B][DC6B] <1> dw .byte, .word, .dword 30 <1> 31 <1> 32 <1> .byte: 33 00006BC8 E89C2C <1> nearcall getbyte ; read value from command line 34 00006BCB E8D12D <1> call chkeol ; expect end of line here 35 00006BCE 92 <1> xchg ax, dx ; al = value 36 00006BCF 5A <1> pop dx ; recover port number 37 00006BD0 EE <1> out dx, al ; send 38 00006BD1 C3 <1> retn 39 <1> 40 <1> .word: 41 00006BD2 E8842C <1> nearcall getword 42 00006BD5 E8C72D <1> call chkeol 43 00006BD8 92 <1> xchg ax, dx ; ax = value 44 00006BD9 5A <1> pop dx 45 00006BDA EF <1> out dx, ax 46 00006BDB C3 <1> retn 47 <1> 48 <1> .dword: 49 <1> [cpu 386] 50 00006BDC E89827 <1> nearcall getdword 51 00006BDF E8BD2D <1> call chkeol ; expect end of line here 52 00006BE2 53 <1> push bx 53 00006BE3 52 <1> push dx 54 00006BE4 6658 <1> pop eax ; eax = value 55 00006BE6 5A <1> pop dx 56 00006BE7 66EF <1> out dx, eax 57 00006BE9 C3 <1> retn 58 <1> __CPU__ 59 <1> 60 <1> 61 <1> %include "if.asm" ; (jumps to .not_if for port Input commands) 1 <2> 2 <2> %if 0 3 <2> 4 <2> lDebug IF commands (conditional control flow) 5 <2> 6 <2> Copyright (C) 2008-2022 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> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 18 <2> if_exists_check: 19 00006BEA 16 <2> push ss 20 00006BEB 07 <2> pop es 21 00006BEC 8B3E[340C] <2> mov di, word [if_exists_si] 22 00006BF0 8B0E[380C] <2> mov cx, word [if_exists_length] 23 00006BF4 8B36[360C] <2> mov si, word [if_exists_sp] 24 00006BF8 F3A4 <2> rep movsb 25 00006BFA 8B0E[380C] <2> mov cx, word [if_exists_length] 26 00006BFE 41 <2> inc cx 27 00006BFF 80E1FE <2> and cl, ~1 28 <2> 29 00006C02 8B36[320C] <2> mov si, word [if_exists_then_address] 30 00006C06 85F6 <2> test si, si 31 00006C08 740A <2> jz .error 32 00006C0A 4E <2> dec si 33 00006C0B BA[5C1A] <2> mov dx, msg.then 34 00006C0E E80F2D <2> call isstring? 35 00006C11 7501 <2> jne .error 36 00006C13 C3 <2> retn 37 <2> 38 <2> .error: 39 00006C14 B80701 <2> mov ax, 107h 40 00006C17 E88F16 <2> call setrc 41 00006C1A E94016 <2> jmp error 42 <2> 43 <2> if_exists_not_found: 44 00006C1D E8CAFF <2> call if_exists_check 45 00006C20 F606[D800]40 <2> testopt [internalflags3], dif3_if_not 46 00006C25 7512 <2> jnz if_exists_condition_met 47 <2> if_exists_condition_not_met: 48 00006C27 E9D693 <2> jmp cmd3 49 <2> 50 <2> if_exists_found_open: 51 00006C2A 16 <2> push ss 52 00006C2B 07 <2> pop es 53 00006C2C E86439 <2> call getline_close_file 54 <2> 55 <2> if_exists_found_closed: 56 00006C2F E8B8FF <2> call if_exists_check 57 00006C32 F606[D800]40 <2> testopt [internalflags3], dif3_if_not 58 00006C37 75EE <2> jnz if_exists_condition_not_met 59 <2> if_exists_condition_met: 60 00006C39 8B26[360C] <2> mov sp, word [if_exists_sp] 61 00006C3D 01CC <2> add sp, cx 62 00006C3F E89D2D <2> call skipwhite 63 00006C42 5A <2> pop dx ; discard near return address 64 00006C43 8026[DB00]E7 <2> clropt [internalflags3], dif3_in_if | dif3_auxbuff_guarded_1 65 00006C48 E9ED97 <2> jmp cmd3_notblank 66 <2> %endif 67 <2> 68 <2> 69 <2> ; IF command -- conditional 70 <2> ii: 71 00006C4B 89F2 <2> mov dx, si 72 00006C4D 50 <2> push ax 73 00006C4E 8B44FE <2> mov ax, [si - 2] 74 00006C51 25DFDF <2> and ax, TOUPPER_W 75 00006C54 3D4946 <2> cmp ax, "IF" 76 00006C57 58 <2> pop ax 77 00006C58 7403E90701 <2> jne .not_if 78 <2> 79 00006C5D E87F2D <2> call skipwhite 80 00006C60 E8BF1C <2> nearcall isoperator? 81 00006C63 7514 <2> jne .if 82 00006C65 89CB <2> mov bx, cx 83 00006C67 01DB <2> add bx, bx ; bh = 0 ! 84 00006C69 50 <2> push ax 85 <2> %if _DUALCODE && _EXPRDUALCODE 86 <2> nearcall ..@rr_operatordispatchers 87 <2> %else 88 00006C6A FF97[D04B] <2> call near [operatordispatchers+bx] 89 <2> %endif 90 00006C6E 58 <2> pop ax 91 00006C6F 85DB <2> test bx, bx 92 00006C71 7403E9EE00 <2> jnz .not_if 93 00006C76 E8662D <2> call skipwhite 94 <2> .if: 95 00006C79 8026[D800]BF <2> clropt [internalflags3], dif3_if_not 96 00006C7E 4E <2> dec si 97 00006C7F BA[611A] <2> mov dx, msg.not 98 00006C82 E89B2C <2> call isstring? 99 00006C85 AC <2> lodsb 100 00006C86 7508 <2> jne @F 101 00006C88 E8552D <2> call skipwh0 102 00006C8B 800E[D800]40 <2> setopt [internalflags3], dif3_if_not 103 <2> 104 <2> @@: 105 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 106 00006C90 4E <2> dec si 107 00006C91 BA[3D26] <2> mov dx, msg.exists 108 00006C94 E8892C <2> call isstring? 109 00006C97 AC <2> lodsb 110 00006C98 7554 <2> jne .if_numeric 111 00006C9A E8432D <2> call skipwh0 112 00006C9D 4E <2> dec si 113 00006C9E BA[3D1C] <2> mov dx, msg.r 114 00006CA1 E87C2C <2> call isstring? 115 00006CA4 7474 <2> je .is_variable 116 00006CA6 BA[4426] <2> mov dx, msg.y 117 00006CA9 E8742C <2> call isstring? 118 00006CAC 7403E9AC15 <2> jne error 119 00006CB1 E82B2D <2> call skipwhite 120 <2> 121 00006CB4 4E <2> dec si 122 00006CB5 8936[340C] <2> mov word [if_exists_si], si 123 00006CB9 89F3 <2> mov bx, si 124 <2> @@: 125 00006CBB AC <2> lodsb 126 00006CBC E8CF2C <2> call iseol?.notsemicolon 127 00006CBF 75FA <2> jne @B 128 00006CC1 89F1 <2> mov cx, si ; -> after EOL byte 129 00006CC3 29D9 <2> sub cx, bx ; = length including EOL 130 00006CC5 890E[380C] <2> mov word [if_exists_length], cx 131 00006CC9 41 <2> inc cx ; round up 132 00006CCA 80E1FE <2> and cl, ~1 ; make even 133 00006CCD 29CC <2> sub sp, cx 134 00006CCF 8926[360C] <2> mov word [if_exists_sp], sp 135 00006CD3 89E7 <2> mov di, sp 136 00006CD5 89DE <2> mov si, bx 137 00006CD7 D1E9 <2> shr cx, 1 138 00006CD9 F3A5 <2> rep movsw 139 <2> 140 00006CDB 89DE <2> mov si, bx 141 00006CDD AC <2> lodsb 142 00006CDE 8326[320C]00 <2> and word [if_exists_then_address], 0 143 00006CE3 800E[DB00]08 <2> setopt [internalflags3], dif3_in_if 144 00006CE8 E8063F <2> call yy 145 00006CEB E96F15 <2> jmp error 146 <2> %endif 147 <2> 148 <2> .if_numeric: 149 00006CEE E88626 <2> nearcall getexpression 150 00006CF1 E8A61F <2> nearcall toboolean 151 00006CF4 89D3 <2> mov bx, dx 152 <2> .if_bx: 153 00006CF6 BA[5C1A] <2> mov dx, msg.then 154 00006CF9 4E <2> dec si 155 00006CFA E8232C <2> call isstring? 156 00006CFD 7403E95B15 <2> jne error 157 <2> .if_bx_after_then: 158 00006D02 E8DA2C <2> call skipwhite 159 00006D05 F606[D800]40 <2> testopt [internalflags3], dif3_if_not 160 00006D0A 7403 <2> jz @F 161 00006D0C 80F301 <2> xor bl, 1 162 <2> @@: 163 00006D0F 85DB <2> test bx, bx 164 00006D11 7404 <2> jz .if_false 165 00006D13 5B <2> pop bx ; discard near return address to cmd3 166 00006D14 E92197 <2> jmp cmd3_notblank ; execute tail 167 <2> 168 <2> .if_false: 169 00006D17 E9AE43 <2> jmp resetrc 170 <2> 171 <2> 172 <2> .is_variable: 173 00006D1A E8932C <2> call skipcomma 174 00006D1D 56 <2> push si 175 00006D1E E8CA21 <2> nearcall isvariable? 176 00006D21 5F <2> pop di ; - 1 -> start of candidate variable name 177 00006D22 7212 <2> jc .skipvariablename ; not valid, go to skip --> (si unchanged) 178 <2> 179 00006D24 BB0100 <2> mov bx, 1 ; prepare valid variable return 180 00006D27 4E <2> dec si 181 00006D28 E8852C <2> call skipcomma 182 00006D2B BA[5C1A] <2> mov dx, msg.then 183 00006D2E 4E <2> dec si 184 00006D2F E8EE2B <2> call isstring? ; keyword as expected ? 185 00006D32 74CE <2> je .if_bx_after_then ; yes, handle THEN command --> 186 00006D34 89FE <2> mov si, di ; reset - 1 -> start of name 187 <2> 188 <2> .skipvariablename: 189 00006D36 4E <2> dec si ; -> start of name 190 <2> @@: 191 00006D37 AC <2> lodsb 192 00006D38 3C20 <2> cmp al, 32 ; end of name ? 193 00006D3A 7420 <2> je @F 194 00006D3C 3C09 <2> cmp al, 9 195 00006D3E 741C <2> je @F 196 00006D40 3C2C <2> cmp al, ',' 197 00006D42 7418 <2> je @F 198 00006D44 E8432C <2> call iseol? 199 00006D47 7413 <2> je @F ; yes --> 200 00006D49 3C28 <2> cmp al, '(' ; parens (index expression) ? 201 00006D4B 75EA <2> jne @B ; no, loop --> 202 00006D4D E88F2C <2> call skipwhite 203 00006D50 E82426 <2> nearcall getexpression ; parse index expression (must be valid) 204 00006D53 3C29 <2> cmp al, ')' ; closing parens ? 205 00006D55 7403E90315 <2> jne error ; no, error --> 206 00006D5A EBDB <2> jmp @B ; loop --> 207 <2> 208 <2> @@: 209 00006D5C 31DB <2> xor bx, bx ; prepare invalid variable return 210 <2> .if_bx_comma: 211 00006D5E 4E <2> dec si 212 00006D5F E84E2C <2> call skipcomma 213 00006D62 EB92 <2> jmp .if_bx ; check for the THEN keyword --> 62 <1> ; I command - input from I/O port. 63 <1> .not_if: 64 00006D64 89D6 <1> mov si, dx 65 00006D66 4E <1> dec si 66 00006D67 4E <1> dec si 67 00006D68 BA[F819] <1> mov dx, msg.install 68 00006D6B E8B22B <1> call isstring? 69 00006D6E AC <1> lodsb 70 00006D6F 7503E9A9DB <1> je install 71 00006D74 AC <1> lodsb 72 <1> 73 00006D75 B449 <1> mov ah, 'I' 74 00006D77 BB[AC6D] <1> mov bx, .tab 75 <1> 76 <1> ; bx = jump table for byte, word, dword handler 77 <1> ; ah = letter of the command 78 <1> ; si, al etc. 79 <1> .common: 80 00006D7A 50 <1> push ax 81 00006D7B E8F02B <1> call uppercase 82 00006D7E 3C57 <1> cmp al, 'W' 83 00006D80 7507 <1> jne .notw 84 <1> .incbx2: 85 00006D82 43 <1> inc bx 86 00006D83 43 <1> inc bx ; use word handler 87 00006D84 E8582C <1> call skipwhite ; skip the 'W' til next character 88 00006D87 EB12 <1> jmp short .sizeset 89 <1> 90 <1> .notw: 91 00006D89 3C44 <1> cmp al, 'D' 92 00006D8B 750E <1> jne .sizeset 93 <1> %if 1 94 00006D8D 3264FE <1> xor ah, byte [si-2] 95 00006D90 7405 <1> jz .d ; "Id" or "Od" --> (uppercase command) 96 00006D92 80F420 <1> xor ah, 32 97 00006D95 7504 <1> jnz .sizeset ; no space is allowed between the command and 'D' --> 98 <1> ; "id" or "od" here (lowercase command) 99 <1> .d: 100 <1> %endif 101 00006D97 43 <1> _386 inc bx 102 00006D98 43 <1> _386 inc bx ; use dword handler 103 00006D99 EBE7 <1> _386_jmps .incbx2 ; bx += 2 and skip the 'D' 104 <1> ; no 386 here. try with D as part of port number 105 <1> .sizeset: 106 00006D9B E8BB2A <1> nearcall getword ; get port 107 00006D9E 59 <1> pop cx ; restore letter if necessary 108 00006D9F 80FD49 <1> cmp ch, 'I' ; check whether I or O 109 00006DA2 7504 <1> jne .o ; O --> 110 00006DA4 E8F82B <1> call chkeol ; expect end of line here for I commands 111 00006DA7 A8 <1> db __TEST_IMM8 ; (skip push) 112 <1> .o: 113 00006DA8 52 <1> push dx ; save port number for O commands 114 00006DA9 2EFF27 <1> jmp near [cs:bx] 115 <1> 116 <1> 117 <1> align 2, db 0 118 <1> .tab: 119 00006DAC [B26D][B86D][BF6D] <1> dw .byte, .word, .dword 120 <1> 121 <1> .byte: 122 00006DB2 EC <1> in al, dx 123 00006DB3 E8DB2C <1> call hexbyte 124 00006DB6 EB04 <1> jmp short .done 125 <1> 126 <1> .word: 127 00006DB8 ED <1> in ax, dx 128 <1> .doneword: 129 00006DB9 E8CE2C <1> call hexword 130 <1> .done: 131 00006DBC E9042D <1> jmp putsline_crlf 132 <1> 133 <1> .dword: 134 <1> [cpu 386] 135 00006DBF 66ED <1> in eax, dx 136 00006DC1 E8BA2C <1> call hexword_high 137 <1> __CPU__ 138 00006DC4 EBF3 <1> jmp short .doneword 139 <1> 140 <1> 141 00006DC6 E99414 <1> errorj5:jmp error 3456 3457 3458 usesection lDEBUG_CODE 3459 3460 %if _PM 3461 3462 %if _DUALCODE 3463 %assign REPEAT 2 3464 %else 3465 %assign REPEAT 1 3466 %endif 3467 3468 usesection lDEBUG_CODE 3469 %rep REPEAT 3470 ; OUT: NC 3471 ; ZR if in protected mode 3472 ; NZ otherwise 3473 ; STT: - 3474 ; ([internalflags] & nodosloaded, [internalflags] & protectedmode set up) 3475 _CURRENT_SECTION %+ _ispm: 3476 push ax 3477 %if protectedmode & ~0FF00h 3478 %error Internal flags re-ordered, adjust code here 3479 %endif 3480 mov al, byte [ss:internalflags+1] ; get flag byte 3481 and al, protectedmode>>8 ; separate PM flag 3482 xor al, protectedmode>>8 ; ZR if in PM (NC) 3483 pop ax 3484 retn 3485 3486 usesection lDEBUG_CODE2 3487 %endrep 3488 usesection lDEBUG_CODE 3489 ispm equ _CURRENT_SECTION %+ _ispm 3490 check_section_of ispm 3491 3492 %endif 3493 3494 3495 setpspdbg: 3496 %if _PM 3497 mov bx, word [pspdbg] 3498 %else 3499 00006DC9 8CD3 mov bx, ss ; = word [pspdbg] (if _PM=0 or in 86M) 3500 %endif 3501 3502 setpsp: 3503 %if _APPLICATION || _DEVICE 3504 %if _BOOTLDR 3505 00006DCB F606[D100]40 testopt [internalflags], nodosloaded 3506 00006DD0 7560 jnz .ret ; no PSPs --> 3507 %endif 3508 3509 %if _USESDA 3510 00006DD2 833E[2A0B]FF cmp word [pSDA+0], byte -1 3511 00006DD7 7411 je .int21 3512 3513 .86m: 3514 00006DD9 1E push ds 3515 00006DDA 56 push si 3516 00006DDB BE[2C0B] mov si, pSDA + so16aSegSel 3517 00006DDE E8AE17 call update_dosdata_segment 3518 00006DE1 C574FE lds si, [si - so16aSegSel] 3519 00006DE4 895C10 mov word [si+10h], bx ; set PSP segment 3520 00006DE7 5E pop si 3521 00006DE8 1F pop ds 3522 00006DE9 C3 retn 3523 3524 .int21: 3525 %endif 3526 00006DEA B450 mov ah, 50h 3527 %if _PM 3528 call ispm 3529 jnz .int21_86m 3530 %if _NOEXTENDER 3531 jmp _doscall.pm ; insure non-extended (set to bx = PSP segment) 3532 %else 3533 mov ax, 0002h 3534 int 31h ; segment to selector 3535 xchg bx, ax ; bx = selector 3536 mov ah, 50h ; reset to function number 3537 %endif 3538 .int21_86m: 3539 %endif 3540 00006DEC EB39 jmp _int21 3541 %else 3542 retn 3543 %endif 3544 3545 3546 getpsp: 3547 %if _APPLICATION || _DEVICE 3548 %if _BOOTLDR 3549 00006DEE 31DB xor bx, bx ; = placeholder value if no PSPs 3550 00006DF0 F606[D100]40 testopt [internalflags], nodosloaded 3551 00006DF5 753B jnz .ret ; no PSPs --> 3552 %endif 3553 %if _USESDA 3554 00006DF7 833E[2A0B]FF cmp word [pSDA+0], byte -1 3555 00006DFC 7411 je .int21 3556 00006DFE 1E push ds 3557 00006DFF 56 push si 3558 00006E00 BE[2C0B] mov si, pSDA + so16aSegSel 3559 00006E03 E88917 call update_dosdata_segment 3560 00006E06 C574FE lds si, [si - so16aSegSel] 3561 00006E09 8B5C10 mov bx, word [si + 10h] ; bx = PSP segment 3562 00006E0C 5E pop si 3563 00006E0D 1F pop ds 3564 00006E0E C3 retn 3565 3566 .int21: 3567 %endif 3568 00006E0F B451 mov ah, 51h 3569 %if _PM 3570 call ispm 3571 jnz .int21_86m 3572 %if _NOEXTENDER 3573 jmp _doscall.pm ; insure non-extended (bx = PSP segment) 3574 %else 3575 call _int21 ; get PSP as a selector 3576 push bx 3577 dualcall selector_to_segment 3578 pop bx ; bx = PSP segment 3579 retn 3580 %endif 3581 .int21_86m: 3582 %endif 3583 00006E11 EB14 jmp _int21 ; in 86 Mode call DOS the normal way 3584 %else 3585 xor bx, bx ; = placeholder value if no PSPs 3586 retn 3587 %endif 3588 3589 3590 dual2function 3591 _doscall_return_es: section_of_function 3592 _doscall_return_es_parameter_es_ds: section_of_function 3593 lframe dual2distance 3594 lpar word, es_ds_value 3595 lpar_return 3596 %if _PM 3597 lvar word, int_number 3598 lenter 3599 mov word [bp + ?int_number], 21h 3600 pushf 3601 call ispm 3602 jnz .rm 3603 .pm: 3604 popf 3605 push word [bp + ?es_ds_value] 3606 push word [bp + ?es_ds_value] 3607 push word [bp + ?int_number] 3608 push word [bp + ?frame_bp] 3609 call intcall_return_parameter_es_parameter_ds 3610 pop word [bp + ?es_ds_value] ; discard returned ds 3611 pop word [bp + ?es_ds_value] ; get es 3612 jmp .ret 3613 .rm: 3614 popf 3615 %else 3616 00006E13 5589E5 lenter 3617 %endif 3618 00006E16 06 push es 3619 00006E17 1E push ds 3620 00006E18 8E5E04 mov ds, word [bp + ?es_ds_value] 3621 00006E1B 8E4604 mov es, word [bp + ?es_ds_value] 3622 00006E1E CD21 int 21h 3623 00006E20 8C4604 mov word [bp + ?es_ds_value], es 3624 00006E23 1F pop ds 3625 00006E24 07 pop es 3626 .ret: 3627 00006E25 5D lleave 3628 dual2return 3629 00006E26 C3 lret 3630 3631 3632 ; Execute real Int21 instruction. If this is in PM it might get extended. 3633 _int21: 3634 %if _APPLICATION || _DEVICE 3635 %if _BOOTLDR 3636 00006E27 9C pushf 3637 00006E28 F606[D100]40 testopt [internalflags], nodosloaded 3638 00006E2D 7504 jnz .reterr ; no Int21 --> (throw?) 3639 00006E2F 9D popf 3640 %endif 3641 00006E30 CD21 int 21h 3642 setpsp.ret: equ $ 3643 getpsp.ret: equ $ 3644 00006E32 C3 retn 3645 %if _BOOTLDR 3646 .reterr: 3647 00006E33 9D popf 3648 00006E34 B80100 mov ax, 1 3649 00006E37 F9 stc 3650 00006E38 C3 retn 3651 %endif 3652 %else 3653 mov ax, 1 3654 stc 3655 retn 3656 %endif 3657 3658 3659 %if _PM 3660 intcall_return_parameter_es_parameter_ds: 3661 lframe near 3662 lpar word, es_value 3663 lpar word, ds_value 3664 lpar_return 3665 lpar word, int_number 3666 lpar word, bp_value 3667 lvar 32h, 86m_call_struc 3668 lenter 3669 push es 3670 mov word [bp + ?86m_call_struc +00h], di ; edi 3671 mov word [bp + ?86m_call_struc +04h], si ; esi 3672 mov word [bp + ?86m_call_struc +10h], bx ; ebx 3673 mov word [bp + ?86m_call_struc +14h], dx ; edx 3674 mov word [bp + ?86m_call_struc +18h], cx ; ecx 3675 mov word [bp + ?86m_call_struc +1Ch], ax ; eax 3676 mov ax, word [bp + ?bp_value] 3677 mov word [bp + ?86m_call_struc +08h], ax ; bp 3678 mov al, 0 ; (preserve flags!) 3679 lahf 3680 xchg al, ah 3681 mov word [bp + ?86m_call_struc +20h], ax ; flags 3682 xor ax, ax 3683 mov word [bp + ?86m_call_struc +0Ch + 2], ax 3684 mov word [bp + ?86m_call_struc +0Ch], ax 3685 mov word [bp + ?86m_call_struc +2Eh], ax ; sp 3686 mov word [bp + ?86m_call_struc +30h], ax ; ss 3687 mov ax, word [bp + ?es_value] ; usually [pspdbg] 3688 mov word [bp + ?86m_call_struc +22h], ax ; es 3689 mov ax, word [bp + ?ds_value] ; usually [pspdbg] 3690 mov word [bp + ?86m_call_struc +24h], ax ; ds 3691 push ss 3692 pop es ; => stack 3693 lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 3694 _386 movzx edi, di ; (previously checked b[dpmi32] here) 3695 mov bx, word [bp + ?int_number] ; int# 3696 xor cx, cx 3697 mov ax, 0300h 3698 int 31h 3699 mov ah, byte [bp + ?86m_call_struc +20h] ; flags 3700 sahf 3701 mov di, word [bp + ?86m_call_struc +00h] ; edi 3702 mov si, word [bp + ?86m_call_struc +04h] ; esi 3703 mov bx, word [bp + ?86m_call_struc +10h] ; ebx 3704 mov dx, word [bp + ?86m_call_struc +14h] ; edx 3705 mov cx, word [bp + ?86m_call_struc +18h] ; ecx 3706 mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 3707 push word [bp + ?86m_call_struc +22h] ; return es value 3708 pop word [bp + ?es_value] ; in the parameter 3709 push word [bp + ?86m_call_struc +24h] ; return ds value 3710 pop word [bp + ?ds_value] ; in the parameter 3711 pop es 3712 lleave 3713 lret 3714 3715 intcall: 3716 lframe near 3717 lpar word, es_ds_value 3718 lpar word, int_number 3719 lenter 3720 push word [bp + ?es_ds_value] ; es 3721 push word [bp + ?es_ds_value] ; ds 3722 push word [bp + ?int_number] ; int number 3723 push word [bp + ?frame_bp] ; bp 3724 call intcall_return_parameter_es_parameter_ds 3725 ; (discard returned parameters ?es_value, ?ds_value, done by lleave) 3726 lleave , forcerestoresp 3727 lret 3728 3729 3730 call_int2D: 3731 call ispm 3732 jnz short .rm 3733 subcpu 286 3734 push word [ss:pspdbg] ; es ds value. generally unused 3735 push 2Dh ; interrupt 2Dh 3736 call intcall ; call it 3737 retn 3738 subcpureset 3739 .rm: 3740 int 2Dh ; directly call int 2Dh 3741 retn 3742 3743 3744 ; Called in PM only, ds unknown. 3745 ; 3746 ; INP: - 3747 ; OUT: CY if no DOS extender available ("MS-DOS" on Int2F.168A) 3748 ; NC if DOS extender available 3749 ; CHG: - 3750 isextenderavailable: 3751 subcpu 286 3752 push ds 3753 push es 3754 pusha 3755 push ss 3756 pop ds 3757 mov si, msg.msdos 3758 _386 movzx esi, si 3759 mov ax, 168Ah 3760 int 2Fh 3761 cmp al, 1 ; CY if al is zero 3762 cmc ; NC if al is zero, CY else 3763 popa 3764 pop es 3765 pop ds 3766 retn 3767 subcpureset 3768 3769 nodosextinst: 3770 push ss 3771 pop ds 3772 mov dx, nodosext 3773 jmp putsz 3774 %endif 3775 3776 3777 3778 %include "ll.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug L commands (load sector, load program) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 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 19 <1> 20 <1> ; L command - read a program, or disk sectors, from disk. 21 <1> ll: 22 <1> %if _BOOTLDR 23 <1> %if _APPLICATION || _DEVICE 24 00006E39 F606[D100]40 <1> testopt [internalflags], nodosloaded 25 00006E3E 7406 <1> jz @F 26 <1> %endif 27 00006E40 BA[D014] <1> mov dx, msg.nobootsupp 28 00006E43 E96D31 <1> jmp putsz 29 <1> @@: 30 <1> %endif 31 <1> 32 <1> %if _APPLICATION || _DEVICE 33 00006E46 E88D17 <1> call parselw ; parse L and W argument format 34 00006E49 7433 <1> jz ll1 ; if request to read program 35 <1> %if _PM && _NOEXTENDER 36 <1> call ispm 37 <1> jnz .rm 38 <1> call isextenderavailable 39 <1> jc nodosextinst 40 <1> .rm: 41 <1> %endif 42 00006E4B 36F606[D000]06 <1> testopt [ss:internalflags], newpacket| ntpacket 43 00006E51 7423 <1> jz .oldint 44 00006E53 88C2 <1> mov dl, al ; zero-based drive 45 00006E55 BE0060 <1> mov si, 6000h ; read, assume "file data" 46 <1> %if _VDD 47 00006E58 F606[D000]04 <1> testopt [internalflags], ntpacket 48 00006E5D 750A <1> jnz .vdd 49 <1> %endif 50 00006E5F FEC2 <1> inc dl ; one-based drive 51 00006E61 B80573 <1> mov ax, 7305h ; ds:(e)bx-> packet 52 00006E64 F9 <1> stc 53 00006E65 CD21 <1> int 21h ; use int 21h here, not doscall 54 00006E67 EB0F <1> jmp short .done 55 <1> %if _VDD 56 <1> .vdd: 57 00006E69 A1[0C0B] <1> mov ax, word [hVdd] 58 00006E6C B90500 <1> mov cx, 5 59 <1> %if _PM 60 <1> add cl, byte [dpmi32] 61 <1> %endif 62 00006E6F C4C4580290 <1> DispatchCall 63 00006E74 EB02 <1> jmp short .done 64 <1> %endif 65 <1> .oldint: 66 00006E76 CD25 <1> int 25h 67 <1> .done: 68 00006E78 BA[4738] <1> mov dx, reading 69 00006E7B E9A210 <1> jmp ww1 70 <1> 71 <1> ; For .COM or .EXE files, we can only load at cs:100. Check that first. 72 <1> ll1: 73 00006E7E E8EF16 <1> call InDOS 74 00006E81 7520 <1> jnz not_while_indos 75 00006E83 E84F98 <1> call guard_re 76 00006E86 F606[B500]04 <1> testopt [options6], opt6_flat_binary 77 00006E8B 752A <1> jnz ll4 78 00006E8D F606[040C]06 <1> test byte [fileext], EXT_COM| EXT_EXE 79 00006E92 7423 <1> jz ll4 ; if not .COM or .EXE file 80 00006E94 3B1E[D00C] <1> cmp bx, word [reg_cs] 81 00006E98 7506 <1> jne ll2 ; if segment is wrong 82 00006E9A 81FA0001 <1> cmp dx, 100h 83 00006E9E 7417 <1> je ll4 ; if address is OK (or not given) 84 <1> ll2: 85 00006EA0 E9BA13 <1> jmp error ; can only load .COM or .EXE at cs:100 86 <1> 87 <1> not_while_indos: 88 00006EA3 B80501 <1> mov ax, 0105h 89 00006EA6 E80014 <1> call setrc 90 00006EA9 BA[F212] <1> mov dx, msg.not_while_indos 91 00006EAC E9FE30 <1> jmp putsz_error 92 <1> 93 <1> 94 <1> ; load (any) file (if not .EXE or .COM, load at BX:DX) 95 <1> ll3: 96 00006EAF 803E[040C]00 <1> cmp byte [fileext], 0 97 00006EB4 7501 <1> jne ll4 98 00006EB6 C3 <1> retn 99 <1> 100 <1> ; open file and get length 101 <1> ll4: 102 00006EB7 89DE <1> mov si, bx ; save destination address, segment 103 00006EB9 89D7 <1> mov di, dx ; and offset 104 00006EBB B8003D <1> mov ax, 3D00h ; open file for reading 105 00006EBE BA8000 <1> mov dx, DTA 106 <1> doscall 1581 00006EC1 CD21 <2> int 21h 107 00006EC3 7303E9F402 <1> jc ll16 ; error 108 00006EC8 93 <1> xchg ax, bx ; mov bx, ax 109 00006EC9 B80242 <1> mov ax, 4202h ; lseek 110 00006ECC 31C9 <1> xor cx, cx 111 00006ECE 31D2 <1> xor dx, dx 112 00006ED0 CD21 <1> int 21h 113 <1> 114 <1> ; Split off file types 115 <1> ; At this point: 116 <1> ; bx file handle 117 <1> ; dx:ax file length 118 <1> ; si:di load address (CS:100h for .EXE or .COM) 119 <1> 120 00006ED2 F606[B500]04 <1> testopt [options6], opt6_flat_binary 121 00006ED7 750A <1> jnz @F 122 00006ED9 F606[040C]06 <1> test byte [fileext], EXT_COM | EXT_EXE 123 00006EDE 7403E9DD01 <1> jnz ll13 ; if .COM or .EXE file 124 <1> @@: 125 <1> 126 <1> %if _PM 127 <1> ;--- dont load a file in protected mode, 128 <1> ;--- the read loop makes some segment register arithmetic 129 <1> call ispm 130 <1> jnz .rm 131 <1> mov dx, nopmsupp 132 <1> call putsz 133 <1> jmp ll12 134 <1> .rm: 135 <1> %endif 136 <1> 137 <1> ; Load it ourselves. 138 <1> ; For non-.com/.exe files, we just do a read, and set BX:CX to the 139 <1> ; number of bytes read. 140 <1> ; 141 <1> ; si:di = address where to load 142 <1> 143 00006EE3 F606[B500]04 <1> testopt [options6], opt6_flat_binary 144 00006EE8 750A <1> jnz @F 145 00006EEA F606[040C]08 <1> test byte [fileext], EXT_HEX 146 00006EEF 7403E9B900 <1> jnz ll_hex ; if .HEX file --> 147 <1> @@: 148 <1> 149 00006EF4 E89D46 <1> call ensuredebuggeeloaded ; make sure a debuggee is loaded 150 00006EF7 7531 <1> jnz ll9.common ; if have no process --> 151 <1> ; si:di = preserved if had a process, 152 <1> ; else si:di = cs:ip (psp:100h) 153 <1> ; ? Can we ever get NC, ZR return here ? 154 <1> 155 00006EF9 8E06[000B] <1> mov es, word [pspdbe] 156 <1> 157 <1> ; Check the size against available space. 158 00006EFD 56 <1> push si 159 00006EFE 53 <1> push bx 160 <1> 161 00006EFF 263B360200 <1> cmp si, word [es:ALASAP] 162 00006F04 9C <1> pushf 163 00006F05 F7DE <1> neg si 164 00006F07 9D <1> popf 165 00006F08 7305 <1> jae ll6 ; if loading past end of mem, allow through ffff 166 00006F0A 2603360200 <1> add si, word [es:ALASAP] ; si = number of paragraphs available 167 <1> ll6: 168 00006F0F B90400 <1> mov cx, 4 169 00006F12 31DB <1> xor bx, bx ; bx:si = amount of paragraphs 170 <1> ll7: 171 00006F14 D1E6 <1> shl si, 1 172 00006F16 D1D3 <1> rcl bx, 1 173 00006F18 E2FA <1> loop ll7 ; bx:si = amount of bytes from paragraphs 174 00006F1A 29FE <1> sub si, di 175 00006F1C 19CB <1> sbb bx, cx ; bx:si = amount of bytes left 176 00006F1E 7208 <1> jb ll9 ; if already we're out of space --> 177 00006F20 39D3 <1> cmp bx, dx ; cmp bx:si, dx:ax (compare high word) 178 00006F22 7502 <1> jne @F ; if high word differs --> 179 00006F24 39C6 <1> cmp si, ax ; compare low word 180 <1> @@: 181 00006F26 730A <1> jae ll10 ; if not out of space --> 182 <1> ll9: 183 00006F28 5B <1> pop bx ; out of space 184 00006F29 5E <1> pop si 185 <1> .common: 186 00006F2A BA[ED3C] <1> mov dx, doserr8 ; not enough memory 187 00006F2D E88330 <1> call putsz ; print string 188 00006F30 EB5D <1> jmp short ll12 ; finally close file --> 189 <1> 190 <1> ll10: 191 00006F32 5B <1> pop bx 192 00006F33 5E <1> pop si 193 <1> 194 <1> ; Store length in registers 195 <1> 196 <1> ; seems a bit unwise to modify registers if a debuggee is running 197 <1> ; but MS DEBUG does it as well 198 <1> 199 <1> %if 0 200 <1> mov cx,[reg_cs] 201 <1> cmp cx,[pspdbe] 202 <1> jnz .noregmodify 203 <1> cmp word [reg_eip], 100h 204 <1> jnz .noregmodify 205 <1> %endif 206 00006F34 8916[A80C] <1> mov word [reg_ebx], dx 207 00006F38 A3[AC0C] <1> mov word [reg_ecx], ax 208 <1> .noregmodify: 209 <1> 210 00006F3B E80200 <1> call ll_bin_hex_common 211 00006F3E EB33 <1> jmp ll10_5 212 <1> 213 <1> 214 <1> ll_bin_hex_common: 215 00006F40 F606[B500]08 <1> testopt [options6], opt6_big_stack 216 00006F45 7422 <1> jz .nostacksetup 217 00006F47 A1[000B] <1> mov ax, word [pspdbe] 218 00006F4A 48 <1> dec ax 219 00006F4B 8ED8 <1> mov ds, ax ; => MCB 220 00006F4D 8B160300 <1> mov dx, word [3] ; size in paragraphs 221 00006F51 83EA1F <1> sub dx, 20h - 1 222 00006F54 01C2 <1> add dx, ax 223 00006F56 8EDA <1> mov ds, dx ; => our stack 224 00006F58 8326FE0100 <1> and word [200h - 2], 0 ; put a zero on top 225 00006F5D 16 <1> push ss 226 00006F5E 1F <1> pop ds ; restore debugger segment 227 00006F5F 8916[CC0C] <1> mov word [reg_ss], dx 228 00006F63 C706[B40C]FE01 <1> mov word [reg_esp], 200h - 2 229 <1> ; -> at the zero 230 <1> 231 <1> .nostacksetup: 232 <1> 233 <1> ; Rewind the file 234 00006F69 B80042 <1> mov ax, 4200h ; lseek 235 00006F6C 31C9 <1> xor cx, cx 236 00006F6E 31D2 <1> xor dx, dx 237 00006F70 CD21 <1> int 21h 238 00006F72 C3 <1> retn 239 <1> 240 <1> 241 <1> ll10_5: 242 00006F73 BA0F00 <1> mov dx, 0Fh 243 00006F76 21FA <1> and dx, di 244 00006F78 B104 <1> mov cl, 4 245 00006F7A D3EF <1> shr di, cl 246 00006F7C 01FE <1> add si, di ; si:dx -> address to read to 247 <1> 248 <1> ; Loop over chunks to read 249 <1> ll11: 250 00006F7E B43F <1> mov ah, 3Fh ; read from file into DS:(E)DX 251 00006F80 B900FE <1> mov cx, 0FE00h ; read up to this many bytes 252 00006F83 8EDE <1> mov ds, si 253 00006F85 CD21 <1> int 21h ; ax = how many bytes read 254 <1> 255 00006F87 81C6E00F <1> add si, 0FE0h ; (won't work in protected mode!) 256 00006F8B 39C8 <1> cmp ax, cx ; read a full chunk ? 257 00006F8D 74EF <1> je ll11 ; yes, end of file maybe not yet reached --> 258 <1> 259 <1> ; Close the file and finish up. 260 <1> ll12: 261 00006F8F B43E <1> mov ah, 3Eh ; close file 262 00006F91 CD21 <1> int 21h 263 00006F93 16 <1> push ss ; restore ds 264 00006F94 1F <1> pop ds 265 <1> 266 <1> ; INP: execblk.cmdline 267 <1> ; es => PSP to populate 268 <1> ; CHG: si, di, cx 269 <1> ; STT: ds = ss 270 <1> ll_copy_cmdline_and_fcbs: 271 <1> %if _MS_N_COMPAT 272 00006F95 B98000 <1> mov cx, 128 ; counter = 128 bytes 273 <1> 274 <1> ; INP: cx = length to copy 275 <1> .have_cx: 276 <1> %endif 277 00006F98 C536[8E0C] <1> lds si, [execblk.cmdline] 278 00006F9C BF8000 <1> mov di, 80h ; es:di -> PSP command line field 279 <1> %ifn _MS_N_COMPAT 280 <1> mov cx, di ; counter = 128 bytes 281 <1> %endif 282 00006F9F F3A4 <1> rep movsb ; copy over 283 00006FA1 BF5C00 <1> mov di, 5Ch 284 <1> ; lds si, [ss:execblk.fcb1] 285 00006FA4 89FE <1> mov si, di 286 00006FA6 B110 <1> mov cl, 16 ; 32 bytes 287 00006FA8 F3A5 <1> rep movsw 288 00006FAA 16 <1> push ss 289 00006FAB 1F <1> pop ds 290 00006FAC C3 <1> retn ; done 291 <1> 292 <1> 293 <1> ll_hex: 294 00006FAD E8E445 <1> call ensuredebuggeeloaded ; make sure a debuggee is loaded 295 00006FB0 7403E975FF <1> jnz ll9.common ; if have no process --> 296 <1> ; si:di = preserved if had a process, 297 <1> ; else si:di = cs:ip (psp:100h) 298 <1> ; ? Can we ever get NC, ZR return here ? 299 00006FB5 7202 <1> jc @F 300 00006FB7 31FF <1> xor di, di ; created process, reset di (100h) to 0 301 <1> @@: 302 <1> 303 00006FB9 8EC6 <1> mov es, si ; => segment to write to 304 <1> 305 00006FBB E882FF <1> call ll_bin_hex_common 306 <1> lframe none 307 <1> lvar word, high_effective_offset 308 00006FBE 5589E550 <1> lenter 309 00006FC2 31C0 <1> xor ax, ax 310 <1> lvar dword, highest 311 00006FC4 50 <1> push ax 312 00006FC5 50 <1> push ax 313 <1> lvar word, highoffset 314 00006FC6 50 <1> push ax 315 <1> lvar dword, base 316 00006FC7 06 <1> push es 317 00006FC8 57 <1> push di ; -> base address for write 318 00006FC9 BE[B40B] <1> mov si, line_out + 256 319 <1> .find_line_start: 320 00006FCC E8C800 <1> call ll_hex_read ; scan for colon 321 00006FCF 3C3A <1> cmp al, ':' 322 00006FD1 75F9 <1> jne .find_line_start 323 <1> 324 00006FD3 E8A400 <1> call ll_hex_read_byte ; amount of data bytes 325 00006FD6 B400 <1> mov ah, 0 326 00006FD8 91 <1> xchg ax, cx 327 00006FD9 E378 <1> jcxz ll_hex_done 328 00006FDB E89C00 <1> call ll_hex_read_byte ; MSByte of offset 329 00006FDE 88C6 <1> mov dh, al 330 00006FE0 E89700 <1> call ll_hex_read_byte ; LSByte of offset 331 00006FE3 88C2 <1> mov dl, al 332 00006FE5 E89200 <1> call ll_hex_read_byte ; type 333 00006FE8 3C04 <1> cmp al, 4 ; new high offset ? 334 00006FEA 7457 <1> je .change_high_offset 335 00006FEC 3C00 <1> cmp al, 0 ; data ? 336 00006FEE 75DC <1> jne .find_line_start ; no --> 337 <1> 338 00006FF0 8B46F8 <1> mov ax, word [bp + ?highoffset] 339 00006FF3 8946FE <1> mov word [bp + ?high_effective_offset], ax 340 00006FF6 83F810 <1> cmp ax, 10h 341 00006FF9 7372 <1> jae ll_hex_error 342 00006FFB 51 <1> push cx 343 00006FFC B10C <1> mov cl, 12 344 00006FFE D3E0 <1> shl ax, cl ; high offset * 1000h = segment adjust 345 00007000 59 <1> pop cx 346 00007001 0346F6 <1> add ax, word [bp + ?base + 2] 347 <1> ; => target 348 00007004 7267 <1> jc ll_hex_error 349 00007006 0356F4 <1> add dx, [bp + ?base] ; -> target. except if CY 350 00007009 7306 <1> jnc @F 351 0000700B FF46FE <1> inc word [bp + ?high_effective_offset] 352 0000700E 050010 <1> add ax, 1000h ; => next 64 KiB 353 <1> @@: 354 00007011 8EC0 <1> mov es, ax 355 00007013 89D7 <1> mov di, dx ; es:di -> destination 356 <1> .loop: 357 00007015 E86200 <1> call ll_hex_read_byte ; data byte 358 00007018 AA <1> stosb ; write it 359 00007019 85FF <1> test di, di ; past end of 64 KiB segment ? 360 0000701B 750F <1> jnz @F 361 0000701D 8CC7 <1> mov di, es 362 0000701F 81C70010 <1> add di, 1000h ; => next 64 KiB 363 00007023 7248 <1> jc ll_hex_error 364 00007025 8EC7 <1> mov es, di 365 00007027 FF46FE <1> inc word [bp + ?high_effective_offset] 366 <1> ; next 64 KiB 367 0000702A 31FF <1> xor di, di ; reset offset 368 <1> @@: 369 0000702C 8B46FE <1> mov ax, word [bp + ?high_effective_offset] 370 <1> 371 0000702F 3B46FC <1> cmp ax, word [bp + ?highest + 2] 372 00007032 7503 <1> jne @F 373 00007034 3B7EFA <1> cmp di, word [bp + ?highest] 374 <1> @@: 375 00007037 7606 <1> jbe @F 376 00007039 8946FC <1> mov word [bp + ?highest + 2], ax 377 0000703C 897EFA <1> mov word [bp + ?highest], di 378 <1> ; remember the highest offset after 379 <1> @@: 380 0000703F E2D4 <1> loop .loop 381 <1> ; after the last data byte there is a checksum 382 <1> ; (which we ignore) 383 <1> ; then a linebreak is expected (ignored too) 384 00007041 EB89 <1> jmp .find_line_start 385 <1> 386 <1> 387 <1> .change_high_offset: 388 00007043 E83400 <1> call ll_hex_read_byte ; MSByte of offset 389 00007046 88C6 <1> mov dh, al 390 00007048 E82F00 <1> call ll_hex_read_byte ; LSByte of offset 391 0000704B 88C2 <1> mov dl, al 392 0000704D 8956F8 <1> mov word [bp + ?highoffset], dx 393 00007050 E979FF <1> jmp .find_line_start 394 <1> 395 <1> 396 <1> ll_hex_done: 397 00007053 B43E <1> mov ah, 3Eh 398 00007055 CD21 <1> int 21h 399 00007057 8B46FC <1> mov ax, word [bp + ?highest + 2] 400 0000705A A3[A80C] <1> mov word [reg_ebx], ax 401 0000705D 8B46FA <1> mov ax, word [bp + ?highest] 402 00007060 A3[AC0C] <1> mov word [reg_ecx], ax 403 00007063 89EC5D <1> lleave , forcerestoresp 404 00007066 8E06[000B] <1> mov es, word [pspdbe] 405 0000706A E928FF <1> jmp ll_copy_cmdline_and_fcbs 406 <1> 407 <1> 408 <1> ll_hex_error: 409 0000706D B43E <1> mov ah, 3Eh 410 0000706F CD21 <1> int 21h 411 00007071 BA[6F3C] <1> mov dx, msg.hexerror 412 00007074 E83C2F <1> call putsz 413 00007077 E9868F <1> jmp cmd3 414 <1> 415 <1> 416 <1> ; INP: si -> at next buffered byte, line_out + 1 .. + 256 417 <1> ; bx = file handle 418 <1> ; OUT: al = byte read from two hexits 419 <1> ; si updated 420 <1> ; may jump to ll_hex_error or ll_hex_done instead 421 <1> ; CHG: ah 422 <1> ll_hex_read_byte: 423 0000707A 51 <1> push cx 424 0000707B 52 <1> push dx 425 0000707C E81800 <1> call ll_hex_read 426 0000707F E8FC27 <1> nearcall getnyb 427 00007082 72E9 <1> jc ll_hex_error 428 00007084 88C4 <1> mov ah, al 429 00007086 E80E00 <1> call ll_hex_read 430 00007089 E8F227 <1> nearcall getnyb 431 0000708C 72DF <1> jc ll_hex_error 432 0000708E B104 <1> mov cl, 4 433 00007090 D2E4 <1> shl ah, cl 434 00007092 08E0 <1> or al, ah 435 00007094 5A <1> pop dx 436 00007095 59 <1> pop cx 437 00007096 C3 <1> retn 438 <1> 439 <1> 440 <1> ; INP: si -> at next buffered byte, line_out + 1 .. + 256 441 <1> ; bx = file handle 442 <1> ; OUT: al = text 443 <1> ; si updated 444 <1> ; may jump to ll_hex_error or ll_hex_done instead 445 <1> ; CHG: cx, dx 446 <1> ll_hex_read: 447 00007097 50 <1> push ax 448 00007098 81FE[B40B] <1> cmp si, line_out + 256 ; at end of buffer ? 449 0000709C 7517 <1> jne .simple ; not yet --> 450 <1> 451 0000709E B90001 <1> mov cx, 256 ; buffer size 452 000070A1 BA[B40A] <1> mov dx, line_out ; -> buffer 453 000070A4 B43F <1> mov ah, 3Fh 454 000070A6 CD21 <1> int 21h 455 000070A8 72C3 <1> jc ll_hex_error 456 000070AA 89D6 <1> mov si, dx ; reset -> buffer 457 000070AC 39C1 <1> cmp cx, ax ; full buffer read ? 458 000070AE 7405 <1> je .simple ; yes --> 459 000070B0 93 <1> xchg ax, bx 460 000070B1 C6001A <1> mov byte [si + bx], 1Ah ; insert an EOF after read data 461 000070B4 93 <1> xchg ax, bx 462 <1> 463 <1> .simple: 464 000070B5 58 <1> pop ax ; preserve ah 465 000070B6 AC <1> lodsb ; al = next text 466 000070B7 84C0 <1> test al, al ; 0 ? 467 000070B9 7498 <1> jz ll_hex_done 468 000070BB 3C1A <1> cmp al, 1Ah ; EOF ? 469 000070BD 7494 <1> je ll_hex_done ; yes --> 470 000070BF C3 <1> retn 471 <1> 472 <1> 473 <1> ll13: 474 <1> ; file is .EXE or .COM 475 <1> 476 <1> ; Previously: adjust .exe size by 200h (who knows why) 477 <1> ; ecm: this is wrong. It needs to be adjusted by the header size, 478 <1> ; which is stored (as number of paragraphs) in the .EXE header. 479 <1> ; The header size is often 200h, but not always. 480 000070C0 52 <1> push dx 481 000070C1 50 <1> push ax 482 <1> 483 000070C2 B80042 <1> mov ax, 4200h ; lseek set 484 000070C5 31C9 <1> xor cx, cx 485 000070C7 31D2 <1> xor dx, dx 486 000070C9 CD21 <1> int 21h 487 000070CB 16 <1> push ss 488 000070CC 1F <1> pop ds 489 <1> 490 000070CD 89E5 <1> mov bp, sp 491 000070CF B91C00 <1> mov cx, EXEHEADER_size 492 000070D2 29CC <1> sub sp, cx 493 000070D4 89E2 <1> mov dx, sp 494 000070D6 89E6 <1> mov si, sp 495 000070D8 B43F <1> mov ah, 3Fh 496 000070DA CD21 <1> int 21h 497 <1> 498 <1> ; Close the file 499 000070DC 50 <1> push ax 500 000070DD B43E <1> mov ah, 3Eh ; close file 501 000070DF CD21 <1> int 21h 502 000070E1 58 <1> pop ax 503 <1> 504 000070E2 39C8 <1> cmp ax, cx 505 000070E4 7526 <1> jne .no_exe ; (ax = 0 if empty file) 506 000070E6 813C4D5A <1> cmp word [si + exeSignature], "MZ" 507 000070EA 7406 <1> je @F 508 000070EC 813C5A4D <1> cmp word [si + exeSignature], "ZM" 509 000070F0 751A <1> jne .no_exe 510 <1> @@: 511 <1> 512 <1> ; This possibly should honour the size of the image in pages 513 <1> ; as indicated by the header, instead of the file size. 514 <1> ; Oh well, for now we use the file size (on stack). 515 000070F2 8B4408 <1> mov ax, [si + exeHeaderSize] 516 000070F5 31F6 <1> xor si, si 517 000070F7 B90400 <1> mov cx, 4 518 <1> @@: 519 000070FA D1E0 <1> shl ax, 1 520 000070FC D1D6 <1> rcl si, 1 521 000070FE E2FA <1> loop @B ; si:ax <<= 4 522 <1> 523 00007100 89EC <1> mov sp, bp 524 00007102 5B <1> pop bx 525 00007103 5A <1> pop dx 526 <1> 527 00007104 29C3 <1> sub bx, ax 528 00007106 19F2 <1> sbb dx, si ; file size minus header size 529 <1> 530 00007108 B001 <1> mov al, 1 ; indicate nonzero filesize 531 0000710A EB04 <1> jmp @F 532 <1> 533 <1> .no_exe: 534 0000710C 89EC <1> mov sp, bp 535 0000710E 5B <1> pop bx 536 0000710F 5A <1> pop dx ; full file size 537 <1> @@: 538 <1> 539 <1> ; Clear registers 540 <1> 541 <1> ll14: 542 00007110 50 <1> push ax ; zero if empty file 543 00007111 53 <1> push bx 544 00007112 52 <1> push dx 545 <1> ; mov word [reg_ebx], dx 546 <1> ; mov word [reg_ecx], bx 547 <1> 548 <1> ;--- cancel current process (unless there is none) 549 <1> ;--- this will also put cpu back in real-mode!!! 550 <1> 551 00007113 E89E11 <1> call terminate_attached_process 552 00007116 7503E9A400 <1> jz ll_attached_unterminated 553 <1> %if _PM 554 <1> call ispm 555 <1> jz ll_still_pm 556 <1> %endif 557 <1> 558 0000711B E8FD45 <1> call zeroregs 559 <1> 560 0000711E 8F06[A80C] <1> pop word [reg_ebx] 561 00007122 8F06[AC0C] <1> pop word [reg_ecx] 562 <1> 563 <1> ; Fix up interrupt vectors in PSP 564 00007126 BE0E00 <1> mov si, CCIV ; address of original INT 23 and 24 (in PSP) 565 00007129 BF[040B] <1> mov di, run2324 566 0000712C A5 <1> movsw 567 0000712D A5 <1> movsw 568 0000712E A5 <1> movsw 569 0000712F A5 <1> movsw 570 <1> 571 <1> ; Prior to our report in 2022 May, the FreeDOS kernel 572 <1> ; incorrectly returned NC without loading a process 573 <1> ; when passed a file that is empty (0 byte). Refer 574 <1> ; to https://github.com/FDOS/kernel/issues/70 575 00007130 58 <1> pop ax ; zero if empty file 576 00007131 85C0 <1> test ax, ax 577 00007133 B00B <1> mov al, 0Bh ; ax = 000Bh (Invalid format) 578 00007135 7503E98200 <1> jz ll16 579 <1> 580 <1> ; Actual program loading. Use the DOS interrupt. 581 0000713A B8014B <1> mov ax, 4B01h ; load program 582 0000713D BA8000 <1> mov dx, DTA ; offset of file to load 583 00007140 BB[8C0C] <1> mov bx, execblk ; parameter block 584 00007143 CD21 <1> int 21h ; load it 585 00007145 7275 <1> jc ll16 ; if error 586 00007147 89E0 <1> mov ax, sp 587 00007149 2B062E00 <1> sub ax, [SPSAV] 588 0000714D 3D8000 <1> cmp ax, 80h 589 00007150 7203 <1> jb ll15 ; if in range 590 00007152 B88000 <1> mov ax, 80h 591 <1> ll15: 592 00007155 A3[FE0A] <1> mov word [spadjust], ax 593 00007158 C436[9A0C] <1> les si, [execblk.sssp] 594 0000715C 26AD <1> es lodsw ; recover ax 595 0000715E A3[A40C] <1> mov word [reg_eax], ax 596 00007161 8936[B40C] <1> mov word [reg_esp], si 597 00007165 8C06[CC0C] <1> mov word [reg_ss], es 598 00007169 C436[9E0C] <1> les si, [execblk.csip] 599 0000716D 8936[DC0C] <1> mov word [reg_eip], si 600 00007171 8C06[D00C] <1> mov word [reg_cs], es 601 00007175 16 <1> push ss 602 00007176 07 <1> pop es 603 00007177 E874FC <1> call getpsp 604 0000717A 93 <1> xchg ax, bx ; ax = PSP, clobber bx 605 0000717B A3[000B] <1> mov word [pspdbe], ax 606 0000717E 8026[D200]7F <1> clropt [internalflags], attachedterm 607 00007183 BF[C40C] <1> mov di, reg_ds 608 00007186 AB <1> stosw 609 00007187 AF <1> scasw 610 00007188 AB <1> stosw ; reg_es 611 00007189 50 <1> push ax 612 0000718A E83CFC <1> call setpspdbg 613 <1> 614 <1> ; Finish up. Set termination address. 615 0000718D B82225 <1> mov ax, 2522h ; set interrupt vector 22h 616 00007190 BA[D046] <1> mov dx, int22 ; ds => lDEBUG_DATA_ENTRY 617 00007193 CD21 <1> int 21h 618 00007195 1F <1> pop ds 619 00007196 89160A00 <1> mov word [TPIV], dx 620 0000719A 8C160C00 <1> mov word [TPIV+2], ss ; => lDEBUG_DATA_ENTRY 621 0000719E 16 <1> push ss 622 0000719F 1F <1> pop ds 623 <1> %endif 624 <1> 625 <1> ; Set up initial addresses for 'a', 'd', and 'u' commands. 626 <1> adusetup: 627 000071A0 A1[DC0C] <1> mov ax, word [reg_eip] 628 000071A3 8B0E[DE0C] <1> mov cx, word [reg_eip+2] 629 000071A7 8B1E[D00C] <1> mov bx, word [reg_cs] 630 000071AB BA0900 <1> mov dx, var_addr_entries.amount 631 000071AE BF[720B] <1> mov di, var_addr_entries 632 <1> 633 <1> .loop: 634 000071B1 AB <1> stosw ; IP 635 <1> %if saSegSel == 4 636 000071B2 890D <1> mov word [di], cx 637 000071B4 AF <1> scasw ; skip this word 638 <1> %endif 639 000071B5 93 <1> xchg ax, bx 640 000071B6 AB <1> stosw ; CS 641 <1> %if _PM 642 <1> %if SEGADR_size != 10 643 <1> %error Unexpected SEGADR size 644 <1> %endif 645 <1> call ispm 646 <1> jnz .86m 647 <1> .pm: 648 <1> scasw ; skip saSegment 649 <1> stosw ; store saSelector 650 <1> jmp @F 651 <1> .86m: 652 <1> stosw ; store saSegment 653 <1> scasw ; skip saSelector 654 <1> @@: 655 <1> %else 656 <1> %if SEGADR_size == 10 657 <1> %error Unexpected SEGADR size 658 <1> %endif 659 <1> %endif 660 000071B7 93 <1> xchg ax, bx ; d_addr 661 <1> 662 000071B8 4A <1> dec dx 663 000071B9 75F6 <1> jnz .loop 664 000071BB C3 <1> retn 665 <1> 666 <1> %if _APPLICATION || _DEVICE 667 <1> ; Error messages. Print and quit. 668 <1> ll16: 669 000071BC E9530E <1> jmp ww15 ; print error message 670 <1> 671 <1> 672 <1> ll_attached_unterminated: 673 000071BF E824CE <1> call putrunint 674 000071C2 BA[7D24] <1> mov dx, msg.ll_unterm 675 <1> %if _PM 676 <1> jmp @F 677 <1> 678 <1> ll_still_pm: 679 <1> mov dx, msg.cannotpmload 680 <1> %endif 681 <1> @@: 682 000071C5 E8EB2D <1> call putsz 683 000071C8 E9358E <1> jmp cmd3 684 <1> %endif 3779 3780 3781 %include "mm.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug M commands (move, machine type) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 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 19 <1> 20 <1> ; M command - move from place to place. 21 <1> ; 22 <1> ; First check for machine-related M commands. 23 <1> ; Those are: M, MNC, M?, MC, MC2, MC3, M [one expression] 24 <1> ; Move M command has more than one expression. 25 <1> mm: 26 000071CB 89F1 <1> mov cx, si ; - 1 -> input 27 000071CD 56 <1> push si 28 000071CE E8B927 <1> call iseol? 29 000071D1 7503E98200 <1> je mc ; no argument, CPU-related M command 30 000071D6 8A24 <1> mov ah, byte [ si ] 31 000071D8 50 <1> push ax 32 000071D9 25DFDF <1> and ax, ~(2020h) 33 000071DC 3D4E43 <1> cmp ax, "NC" 34 000071DF 58 <1> pop ax 35 000071E0 7506 <1> jne @F 36 000071E2 B9[3526] <1> mov cx, msg.c0 + 1 ; - 1 -> C0 string 37 000071E5 46 <1> inc si ; skip 'N' 38 000071E6 EB07 <1> jmp .checkend 39 <1> 40 <1> @@: 41 000071E8 3C3F <1> cmp al, '?' 42 000071EA 7511 <1> jne @F 43 000071EC B9[3726] <1> mov cx, msg.cr + 1 ; - 1 -> empty string 44 <1> .checkend: 45 000071EF E8ED27 <1> call skipwhite ; skip '?' or 'C' (in "NC") 46 000071F2 E89527 <1> call iseol? 47 000071F5 7461 <1> je mc 48 000071F7 5E <1> pop si 49 000071F8 56 <1> push si 50 000071F9 4E <1> dec si 51 000071FA E8E227 <1> call skipwhite 52 <1> @@: 53 000071FD 56 <1> push si 54 000071FE E80113 <1> call prephack 55 00007201 8B1E[C40C] <1> mov bx, word [reg_ds] ; get source range 56 00007205 E84815 <1> nearcall getaddrX ; just parse an address first 57 <1> ; Note that valid MC commands allow at most C3h 58 <1> ; in the expression read here. This must be 59 <1> ; allowed by this getaddrX call regardless the 60 <1> ; D/B bit and limit of the ds segment. 61 <1> ; By using getaddrX here instead of getexpression 62 <1> ; as previously, we get support for all special 63 <1> ; cases of address parameters for free. This now 64 <1> ; includes the single or double dollar sign prefix 65 <1> ; and also the taken keywords (not previously 66 <1> ; allowed here). 67 00007208 59 <1> pop cx ; - 1 -> input 68 00007209 E87E27 <1> call iseol? 69 0000720C 744A <1> je mc ; one argument, CPU-related 70 <1> 71 <1> ; bx:(e)dx, si, al are already initialised here. 72 <1> .mm: 73 0000720E 5F <1> pop di ; discard si on stack 74 <1> 75 <1> ; It is a normal M command (Move) 76 <1> %if _PM 77 <1> mov di, getaddr ; second parameter must be writable 78 <1> %endif 79 0000720F E89213 <1> call parsecm_have_address 80 <1> ; parse arguments (DS:ESI, ES:EDI, ECX) 81 00007212 51 <1> push cx 82 <1> %if _PM 83 <1> call ispm 84 <1> jnz .rm 85 <1> mov ax, ds 86 <1> mov cx, es 87 <1> cmp ax, cx 88 <1> je .pmsimple ; same selector, simple --> 89 <1> 90 <1> mov ax, 0006h 91 <1> mov bx, ds 92 <1> int 31h ; get selector's base 93 <1> jc error 94 <1> push cx 95 <1> push dx 96 <1> mov ax, 0006h 97 <1> mov bx, es 98 <1> int 31h ; get selector's base 99 <1> jc error ; throw 100 <1> cmp byte [ss:bAddr32], 0 101 <1> je .pm16 102 <1> [cpu 386] 103 <1> pop eax 104 <1> push cx 105 <1> push dx 106 <1> pop edx ; mov edx, cxdx 107 <1> add eax, esi ; add offset to source selector's base 108 <1> jc error 109 <1> add edx, edi ; add offset to destination selector's base 110 <1> jc error ; if overflow (> 4 GiB) --> 111 <1> cmp eax, edx ; compare linear source to linear destination 112 <1> jmp short m3 ; and decide whether to move up or down --> 113 <1> __CPU__ 114 <1> 115 <1> .rm: 116 <1> mov ax, ds 117 <1> mov bx, ds 118 <1> mov dx, es 119 <1> mov cl, 12 120 <1> shr bx, cl 121 <1> shr dx, cl 122 <1> push dx 123 <1> mov dx, es 124 <1> mov cl, 4 125 <1> shl ax, cl 126 <1> shl dx, cl 127 <1> pop cx 128 <1> db __TEST_IMM16 ; (skip 2 pop instructions) 129 <1> 130 <1> .pm16: 131 <1> pop ax 132 <1> pop bx 133 <1> add ax, si 134 <1> adc bx, byte 0 ; add offset to source selector's base 135 <1> jc error 136 <1> add dx, di 137 <1> adc cx, byte 0 ; add offset to destination selector's base 138 <1> jc error ; if overflow (> 4 GiB) --> 139 <1> cmp bx, cx ; compare linear source to linear destination 140 <1> jne m3 141 <1> cmp ax, dx 142 <1> jmp short m3 ; and decide whether to move up or down --> 143 <1> 144 <1> .pmsimple: 145 <1> _386_o32 ; cmp esi, edi 146 <1> cmp si, di 147 <1> %else 148 00007213 89FA <1> mov dx, di 149 00007215 8CC3 <1> mov bx, es 150 00007217 B104 <1> mov cl, 4 151 00007219 D3EA <1> shr dx, cl 152 0000721B 01DA <1> add dx, bx ; upper 16 bits of destination 153 0000721D 89F0 <1> mov ax, si 154 0000721F D3E8 <1> shr ax, cl 155 00007221 8CDB <1> mov bx, ds 156 00007223 01D8 <1> add ax, bx 157 00007225 39D0 <1> cmp ax, dx 158 00007227 750B <1> jne m3 ; if we know which is larger 159 00007229 89F0 <1> mov ax, si 160 0000722B 240F <1> and al, 0Fh 161 0000722D 89FB <1> mov bx, di 162 0000722F 80E30F <1> and bl, 0Fh 163 00007232 38D8 <1> cmp al, bl 164 <1> %endif 165 00007234 59 <1> m3: pop cx 166 00007235 9F <1> lahf 167 00007236 1E <1> push ds 168 00007237 06 <1> push es 169 00007238 16 <1> push ss ; ds := cs 170 00007239 1F <1> pop ds 171 0000723A E8EE12 <1> call dohack ; do the interrupt pointer hack 172 0000723D 07 <1> pop es 173 0000723E 1F <1> pop ds 174 0000723F 9E <1> sahf 175 00007240 730F <1> jae .forward ; if forward copy is OK 176 <1> _386_PM_o32 177 00007242 01CE <1> add si, cx 178 <1> _386_PM_o32 179 00007244 01CF <1> add di, cx ; point both behind data 180 00007246 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 181 <1> 182 <1> 183 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 184 <1> ; Refer to comment in init.asm init_movp. 185 <1> 186 <1> %if _AMD_ERRATUM_109_WORKAROUND 187 <1> _386_PM_a32 188 00007247 E308 <1> jcxz @FF 189 <1> _386_PM_o32 190 00007249 83F914 <1> cmp cx, strict byte 20 191 0000724C 7703 <1> ja @FF 192 <1> @@: 193 <1> _386_PM_a32 194 0000724E A4 <1> movsb 195 <1> _386_PM_a32 196 0000724F E2FD <1> loop @B 197 <1> @@: 198 <1> %endif 199 <1> .forward: 200 <1> _386_PM_a32 201 00007251 F3A4 <1> rep movsb ; do the move 202 <1> _386_PM_a32 203 00007253 A4 <1> movsb ; one more byte (length of zero means 64 KiB. or 4 GiB..) 204 <1> .was32: 205 00007254 FC <1> cld ; restore flag 206 00007255 E97AF5 <1> jmp ee0a ; restore segments and undo the interrupt pointer hack 207 <1> 208 <1> 209 <1> ; Other M command: set machine type. 210 <1> ; 211 <1> ; INP: cx -> numeric input (expression 0..6, C, C0, C2, C3) 212 <1> ; or cx -> EOL 213 <1> ; word [ss:sp] = to discard 214 <1> mc: 215 00007258 89CE <1> mov si, cx 216 0000725A 5A <1> pop dx ; discard 217 0000725B 4E <1> dec si 218 0000725C E88027 <1> call skipwhite ; reload 219 0000725F E82827 <1> call iseol? 220 00007262 7460 <1> je mquery ; if just an M or M? (query machine type) --> 221 00007264 E80026 <1> nearcall getbyte ; get numeric input 222 00007267 E83527 <1> call chkeol ; insure valid 223 0000726A 92 <1> xchg ax, dx 224 0000726B 3C06 <1> cmp al, 6 225 0000726D 7725 <1> ja mc_fpu 226 <1> 227 <1> mc_cpu: 228 0000726F A2[2E0B] <1> mov byte [machine], al ; set machine type 229 00007272 A2[300B] <1> mov byte [mach_87], al ; coprocessor type, too 230 <1> 231 <1> mc_encode: 232 00007275 803E[2F0B]00 <1> cmp byte [has_87], 0 233 0000727A B0C0 <1> mov al, 0C0h 234 0000727C 7412 <1> je .done 235 0000727E 803E[2E0B]03 <1> cmp byte [machine], 3 236 00007283 B00C <1> mov al, 0Ch 237 00007285 7509 <1> jne .done 238 00007287 803E[300B]02 <1> cmp byte [mach_87], 2 239 0000728C 7502 <1> jne .done 240 0000728E B0C2 <1> mov al, 0C2h 241 <1> .done: 242 00007290 A2[310B] <1> mov byte [encodedmach87], al 243 00007293 C3 <1> retn 244 <1> 245 <1> mc_fpu: 246 00007294 8A26[2E0B] <1> mov ah, byte [machine] 247 00007298 3C0C <1> cmp al, 0Ch ; MC command ? 248 0000729A 741D <1> je mcc_ah 249 0000729C 3CC0 <1> cmp al, 0C0h ; MC0 command or MNC command ? 250 0000729E 7410 <1> je mnc 251 000072A0 80FC03 <1> cmp ah, 3 ; MC2 or MC3 only valid for machine 386 252 000072A3 7508 <1> jne .error 253 000072A5 3CC2 <1> cmp al, 0C2h ; MC2 command ? 254 000072A7 740E <1> je mcc_2 255 000072A9 3CC3 <1> cmp al, 0C3h ; MC3 command ? 256 000072AB 740C <1> je mcc_3 ; (ah = 3) 257 <1> .error: ; invalid input 258 000072AD E9AD0F <1> jmp error 259 <1> 260 <1> mnc: 261 000072B0 C606[2F0B]00 <1> mov byte [has_87], 0 ; clear coprocessor flag 262 000072B5 EBBE <1> jmp mc_encode ; done 263 <1> 264 <1> mcc_2: 265 000072B7 B402 <1> mov ah, 2 ; set type to 287 266 <1> mcc_3: ; (if jumping here ah = 3) set type to 387 267 <1> mcc_ah: 268 000072B9 C606[2F0B]01 <1> mov byte [has_87], 1 ; set coprocessor flag 269 000072BE 8826[300B] <1> mov byte [mach_87], ah ; set coprocessor type 270 000072C2 EBB1 <1> jmp mc_encode ; done 271 <1> 272 <1> 273 <1> ; Display machine type. 274 <1> mquery: 275 000072C4 BE[5F38] <1> mov si, msg8088 276 000072C7 A0[2E0B] <1> mov al, byte [machine] 277 000072CA 3C00 <1> cmp al, 0 278 000072CC 7407 <1> je .88or86 ; if 8088 279 000072CE BE[6738] <1> mov si, msgx86 280 000072D1 0430 <1> add al, '0' 281 000072D3 8804 <1> mov byte [si], al 282 <1> .88or86: 283 000072D5 E81327 <1> call showstring 284 000072D8 BE[6B38] <1> mov si, no_copr 285 000072DB 803E[2F0B]00 <1> cmp byte [has_87], 0 286 000072E0 740F <1> je .m12 ; if no coprocessor 287 000072E2 BE[8038] <1> mov si, has_copr 288 000072E5 A0[300B] <1> mov al, byte [mach_87] 289 000072E8 3A06[2E0B] <1> cmp al, byte [machine] 290 000072EC 7403 <1> je .m12 ; if has coprocessor same as processor 291 000072EE BE[9238] <1> mov si, has_287 292 <1> .m12: 293 000072F1 E8F726 <1> call showstring ; show string 294 000072F4 E9CC27 <1> jmp putsline_crlf ; call puts and quit 3782 3783 3784 usesection lDEBUG_CODE 3785 3786 ; K command - enter Kommand line in new style 3787 ; N command - change the Name of the program being debugged 3788 ; 3789 ; N command is subject to weird Microsoft compatibility if 3790 ; an options2 flag is set. In this mode, the entire line_in 3791 ; contents after the N command are used for the command line 3792 ; tail rather than only the tail after the program name. 3793 ; (Yes, really.) Also, the debuggee ds is assumed to point 3794 ; to a PSP and the FCBs and command line tail are written 3795 ; to this segment. 3796 %if _MS_N_COMPAT 3797 nn: 3798 000072F7 800E[D700]80 setopt [internalflags2], dif2_nn_capitalise 3799 ; prepare old style (MS Debug compatibility) 3800 000072FC F606[A600]02 testopt [options2], opt2_nn_capitalise 3801 00007301 7505 jnz @F ; leave it set --> 3802 00007303 8026[D700]7F clropt [internalflags2], dif2_nn_capitalise 3803 ; disable old style, use new style 3804 @@: 3805 3806 00007308 800E[D700]40 setopt [internalflags2], dif2_nn_compat 3807 ; prepare old style (MS Debug compatibility) 3808 0000730D F606[A600]01 testopt [options2], opt2_nn_compat 3809 00007312 750C jnz @FF ; leave it set --> 3810 00007314 EB05 jmp @F 3811 kk: 3812 00007316 8026[D700]7F clropt [internalflags2], dif2_nn_capitalise 3813 ; also disable capitalisation 3814 @@: 3815 0000731B 8026[D700]BF clropt [internalflags2], dif2_nn_compat 3816 ; disable old style, use new style 3817 @@: 3818 %else 3819 kk: 3820 nn: 3821 %endif 3822 00007320 16 push ss 3823 00007321 07 pop es 3824 3825 %if _MS_N_COMPAT 3826 00007322 4E dec si ; -> first non-blank 3827 @@: 3828 00007323 4E dec si ; -> before prior start of command 3829 00007324 803C20 cmp byte [si], 32 ; blank ? 3830 00007327 74FA je @B 3831 00007329 803C09 cmp byte [si], 9 3832 0000732C 74F5 je @B ; yes, decrement --> 3833 0000732E 46 inc si ; restore -> start of command (first blank, if any) 3834 0000732F AC lodsb ; make al = first text byte, si -> after 3835 %endif 3836 3837 %if _BOOTLDR 3838 %if _APPLICATION || _DEVICE 3839 00007330 36F606[D100]40 testopt [ss:internalflags], nodosloaded 3840 00007336 7406 jz @F 3841 %endif 3842 00007338 BA[D014] mov dx, msg.nobootsupp 3843 0000733B E9752C jmp putsz 3844 @@: 3845 %endif 3846 %if _APPLICATION || _DEVICE 3847 %if _MS_N_COMPAT 3848 0000733E F606[D700]40 testopt [internalflags2], dif2_nn_compat 3849 00007343 7405 jz @F 3850 00007345 E89200 call nn_copy_to_line_out 3851 00007348 4E dec si 3852 00007349 AC lodsb ; restore al 3853 @@: 3854 %endif 3855 0000734A BF8000 mov di, DTA ; destination address 3856 %if _MS_N_COMPAT ; (not needed if not including the blank scan) 3857 0000734D E89026 call skipwh0 ; skip blanks before program load filename 3858 %endif 3859 3860 ; Copy and canonicalize file name. 3861 nn1: 3862 00007350 81FF[6E00] cmp di, N_BUFFER_END 3863 00007354 7313 jae .toolong 3864 00007356 E87F01 call ifsep ; check for separators CR, blank, tab, comma, ;, = 3865 00007359 7428 je nn3 ; if end of file name 3866 0000735B 363A06[570B] cmp al, byte [ss:swch1] 3867 ; The use of ss here appears to be intended to 3868 ; allow loading from ds different from the 3869 ; data entry and PSP segment, However, the 3870 ; subsequent copy of the command tail around 3871 ; nn4 does not participate in this scheme. 3872 ; So if this is used make sure to adjust that. 3873 00007360 7421 je nn3 ; if '/' (and '/' is the switch character) 3874 00007362 E80926 call uppercase 3875 00007365 AA stosb 3876 00007366 AC lodsb 3877 00007367 EBE7 jmp short nn1 ; back for more 3878 3879 .toolong: 3880 nn4.toolong: 3881 00007369 16 push ss 3882 0000736A 1F pop ds 3883 0000736B BA[011C] mov dx, msg.n_toolongname 3884 0000736E E8422C call putsz 3885 00007371 BF[6B00] mov di, N_BUFFER_END - 3 3886 00007374 B000 mov al, 0 ; truncate the name 3887 00007376 AA stosb 3888 00007377 A2[040C] mov byte [fileext], al ; invalid / none 3889 0000737A 893E[8E0C] mov word [execblk.cmdline], di 3890 0000737E B8000D mov ax, 13 << 8 ; 0 in low byte (tail length), CR in high byte 3891 00007381 AB stosw 3892 00007382 C3 retn 3893 3894 3895 nn3: 3896 00007383 16 push ss 3897 00007384 1F pop ds 3898 00007385 B000 mov al, 0 ; null terminate the file name string 3899 00007387 AA stosb 3900 00007388 893E[8E0C] mov word [execblk.cmdline], di 3901 ; save start of command tail 3902 3903 %if _DEBUG4 3904 push dx 3905 mov dx, DTA 3906 call d4disp_msg 3907 mov dx, crlf 3908 call d4disp_msg 3909 pop dx 3910 %endif 3911 ; Determine file extension 3912 0000738C 81FF8100 cmp di, DTA+1 3913 00007390 7438 je nn3d ; if no file name at all 3914 00007392 81FF8500 cmp di, DTA+5 3915 00007396 7230 jb nn3c ; if no extension (name too short) 3916 00007398 B008 mov al, EXT_HEX 3917 0000739A 817DFB2E48 cmp word [di-5], ".H" 3918 0000739F 7507 jne nn3a ; if not .HEX 3919 000073A1 817DFD4558 cmp word [di-3], "EX" 3920 000073A6 7422 je nn3d ; if .HEX 3921 nn3a: 3922 000073A8 B004 mov al, EXT_EXE 3923 000073AA 817DFB2E45 cmp word [di-5], ".E" 3924 000073AF 7507 jne nn3b ; if not .EXE 3925 000073B1 817DFD5845 cmp word [di-3], "XE" 3926 000073B6 7412 je nn3d ; if .EXE 3927 nn3b: 3928 000073B8 B002 mov al, EXT_COM 3929 000073BA 817DFB2E43 cmp word [di-5], ".C" 3930 000073BF 7507 jne nn3c ; if not .COM 3931 000073C1 817DFD4F4D cmp word [di-3], "OM" 3932 000073C6 7402 je nn3d ; if .COM 3933 nn3c: 3934 000073C8 B001 mov al, EXT_OTHER 3935 nn3d: 3936 000073CA A2[040C] mov byte [fileext], al 3937 3938 ; Finish the N command 3939 000073CD 57 push di 3940 %if _MS_N_COMPAT 3941 000073CE F606[D700]40 testopt [internalflags2], dif2_nn_compat 3942 000073D3 751D jnz @F 3943 000073D5 E80200 call nn_copy_to_line_out 3944 000073D8 EB18 jmp @F 3945 3946 ; INP: si - 1 -> command line tail 3947 ; OUT: line_out has tail, terminated by 0 or 13 (CR) 3948 ; CHG: di, al 3949 nn_copy_to_line_out: 3950 000073DA 56 push si 3951 %endif 3952 000073DB BF[B40A] mov di, line_out 3953 000073DE 4E dec si 3954 nn4: 3955 000073DF AC lodsb ; copy the remainder to line_out 3956 000073E0 F606[D700]80 testopt [internalflags2], dif2_nn_capitalise 3957 000073E5 7403 jz .nocaps 3958 000073E7 E88425 call uppercase 3959 .nocaps: 3960 000073EA AA stosb 3961 000073EB E8A025 call iseol?.notsemicolon 3962 000073EE 75EF jne nn4 3963 %if _MS_N_COMPAT 3964 000073F0 5E pop si 3965 000073F1 C3 retn 3966 3967 @@: 3968 %endif 3969 000073F2 E87B11 call InDOS 3970 000073F5 740E jz .fcb_setup 3971 %if _DEVICE 3972 000073F7 F606[E600]40 testopt [internalflags6], dif6_device_mode 3973 000073FC 7505 jnz @F 3974 %endif 3975 000073FE 8326[A40C]00 and word [reg_eax], 0 3976 @@: 3977 00007403 EB23 jmp .fcb_none 3978 3979 .fcb_setup: 3980 ; Set up FCBs. 3981 00007405 BE[B40A] mov si, line_out 3982 00007408 BF5C00 mov di, 5Ch 3983 0000740B E87400 call nn6 ; do first FCB 3984 %if _DEVICE 3985 0000740E F606[E600]40 testopt [internalflags6], dif6_device_mode 3986 00007413 7503 jnz @F 3987 %endif 3988 00007415 A2[A40C] mov byte [reg_eax], al 3989 @@: 3990 00007418 BF6C00 mov di, 6Ch 3991 0000741B E86400 call nn6 ; second FCB 3992 %if _DEVICE 3993 0000741E F606[E600]40 testopt [internalflags6], dif6_device_mode 3994 00007423 7503 jnz @F 3995 %endif 3996 00007425 A2[A50C] mov byte [reg_eax+1], al 3997 @@: 3998 .fcb_none: 3999 4000 ; Copy command tail. 4001 00007428 BE[B40A] mov si, line_out 4002 0000742B 5F pop di 4003 0000742C 81FF[6C00] cmp di, N_BUFFER_END - 2 4004 00007430 7203E934FF jae .toolong 4005 00007435 57 push di ; -> counter byte 4006 00007436 47 inc di ; -> first byte of buffer 4007 00007437 8D5D7F lea bx, [di + 127] ; -> behind last byte of PSP target buffer 4008 ; (within 128 bytes the CR must be written) 4009 0000743A B8[6E00] mov ax, N_BUFFER_END ; -> behind last byte in our N buffer 4010 0000743D 39C3 cmp bx, ax ; use whichever limit is smaller 4011 0000743F 7202 jb @F 4012 00007441 89C3 mov bx, ax ; N buffer is smaller, use it as limit 4013 @@: 4014 nn5: 4015 00007443 39DF cmp di, bx ; can store one more (possibly CR) ? 4016 00007445 7331 jae .toolong ; no --> 4017 00007447 AC lodsb 4018 00007448 AA stosb ; store byte 4019 00007449 E84225 call iseol?.notsemicolon; end of string ? 4020 0000744C 75F5 jne nn5 ; if not end of string --> 4021 .toolong_terminate: ; jump destination from .toolong 4022 0000744E C645FF0D mov byte [di - 1], 13 ; (just overwrite this unconditionally) 4023 00007452 57 push di 4024 00007453 89F9 mov cx, di 4025 00007455 81E9[6E00] sub cx, N_BUFFER_END 4026 00007459 F7D9 neg cx 4027 0000745B 31C0 xor ax, ax 4028 0000745D F3AA rep stosb 4029 0000745F 5F pop di 4030 00007460 58 pop ax ; recover old DI 4031 00007461 97 xchg ax, di 4032 00007462 29F8 sub ax, di ; compute length of tail 4033 %if _MS_N_COMPAT 4034 00007464 89C1 mov cx, ax 4035 %endif 4036 00007466 48 dec ax 4037 00007467 48 dec ax 4038 00007468 AA stosb 4039 %if _MS_N_COMPAT 4040 00007469 F606[D700]40 testopt [internalflags2], dif2_nn_compat 4041 0000746E 7407 jz @F 4042 00007470 8E06[C40C] mov es, word [reg_ds] ; modify current ds, assuming a PSP 4043 00007474 E821FB call ll_copy_cmdline_and_fcbs.have_cx 4044 @@: 4045 %endif 4046 %if _DEBUG4 4047 mov dx, DTA 4048 call d4disp_msg 4049 mov dx, crlf 4050 call d4disp_msg 4051 %endif 4052 00007477 C3 retn ; done 4053 4054 .toolong: 4055 00007478 BA[E61B] mov dx, msg.n_toolongtail 4056 0000747B E8352B call putsz 4057 0000747E 89DF mov di, bx 4058 00007480 EBCC jmp .toolong_terminate 4059 4060 4061 ; Subroutine to process an FCB. 4062 ; 4063 ; INP: di -> FCB 4064 ; si -> input 4065 nn6: 4066 00007482 AC lodsb 4067 00007483 E80825 call iseol?.notsemicolon 4068 00007486 740B je nn7 ; if end 4069 00007488 E84D00 call ifsep 4070 0000748B 74F5 je nn6 ; if separator (other than CR) 4071 0000748D 3A06[560B] cmp al, byte [switchar] 4072 00007491 741B je nn10 ; if switch character 4073 nn7: 4074 00007493 4E dec si 4075 00007494 B80129 mov ax, 2901h ; parse filename 4076 doscall 1581 00007497 CD21 <1> int 21h 4077 00007499 50 push ax ; save AL 4078 nn8: 4079 0000749A AC lodsb ; skip till separator 4080 0000749B E83A00 call ifsep 4081 0000749E 7406 je nn9 ; if separator character (including CR) 4082 000074A0 3A06[570B] cmp al, byte [swch1] 4083 000074A4 75F4 jne nn8 ; if not switchar (sort of) 4084 nn9: 4085 000074A6 4E dec si 4086 000074A7 58 pop ax ; recover AL 4087 000074A8 3C01 cmp al, 1 4088 000074AA 7501 jne nn9a ; if not 1 4089 000074AC 48 dec ax 4090 nn9a: 4091 000074AD C3 retn 4092 4093 ; Handle a switch (differently). 4094 000074AE AC nn10: lodsb 4095 000074AF E8DC24 call iseol?.notsemicolon 4096 000074B2 74DF je nn7 ; if end of string 4097 000074B4 E82100 call ifsep 4098 000074B7 74F5 je nn10 ; if another separator (other than CR) 4099 000074B9 B000 mov al, 0 4100 000074BB AA stosb 4101 000074BC 4E dec si 4102 000074BD AC lodsb 4103 000074BE 3C61 cmp al, 'a' 4104 000074C0 7206 jb nn11 ; if not a lower case letter 4105 000074C2 3C7A cmp al, 'z' 4106 000074C4 7702 ja nn11 4107 000074C6 24DF and al, TOUPPER ; convert to upper case 4108 000074C8 AA nn11: stosb 4109 000074C9 B82020 mov ax, 32<<8|32 4110 000074CC AB stosw 4111 000074CD AB stosw 4112 000074CE AB stosw 4113 000074CF AB stosw 4114 000074D0 AB stosw 4115 000074D1 31C0 xor ax, ax 4116 000074D3 AB stosw 4117 000074D4 AB stosw 4118 000074D5 AB stosw 4119 000074D6 AB stosw 4120 000074D7 C3 retn ; return with al = 0 4121 4122 4123 ; Compare character with separators 4124 ; 4125 ; INP: al = character 4126 ; OUT: ZR if al is CR, NUL, blank, tab, comma, semicolon, or equal sign 4127 ; NZ else 4128 ; REM: This is only used for parsing FCBs. 4129 ifsep: section_of_function 4130 000074D8 E8AF24 call iseol? ; semicolon or CR or NUL 4131 000074DB 740E je .return 4132 000074DD 3C20 cmp al, 32 4133 000074DF 740A je .return 4134 000074E1 3C09 cmp al, 9 4135 000074E3 7406 je .return 4136 000074E5 3C2C cmp al, ',' 4137 000074E7 7402 je .return 4138 000074E9 3C3D cmp al, '=' 4139 .return: 4140 000074EB C3 retn 4141 %endif 4142 4143 4144 ; Ensure segment in bx is writeable 4145 ; 4146 ; INP: bx = selector/segment 4147 ; OUT: NC if in 86M, bx unchanged 4148 ; NC if in PM and bx not a code segment, bx unchanged 4149 ; NC if in PM and was a code segment, 4150 ; bx = word [scratchsel], set up to mirror INP:bx selector 4151 ; CY if in PM and a failure occurred, segment not writeable 4152 ; CHG: bx 4153 ; STT: ss = debugger data selector 4154 %if _PM 4155 verifysegm_or_error: 4156 push bx 4157 call verifysegm 4158 jc .ro 4159 add sp, 2 ; (discard bx on stack) 4160 retn 4161 4162 .ro: 4163 push ss 4164 pop es 4165 call ee0a 4166 mov di, msg.readonly_verifysegm.selector 4167 pop ax ; get original selector 4168 call hexword 4169 mov dx, msg.readonly_verifysegm 4170 call putsz_error 4171 jmp cmd3 4172 4173 4174 verifysegm: 4175 call ispm 4176 jnz .rm ; (NC) 4177 push ax 4178 push es 4179 _386_o32 ; push edi 4180 push di 4181 push bp 4182 mov bp, sp 4183 sub sp, 8 4184 push ss 4185 pop es 4186 mov di, sp 4187 _386 movzx edi, di 4188 mov ax, 000Bh ; get descriptor 4189 int 31h 4190 jc @F 4191 test byte [di+5], 8 ; code segment ? 4192 jz @F ; (NC) no --> 4193 and byte [di+5], 0F3h ; reset CODE+conforming attr 4194 or byte [di+5], 2 ; set writable 4195 mov bx, word [scratchsel] 4196 mov ax, 000Ch 4197 int 31h 4198 @@: 4199 mov sp, bp 4200 pop bp 4201 _386_o32 ; pop edi 4202 pop di 4203 pop es 4204 pop ax 4205 .rm: 4206 .retn: 4207 retn 4208 4209 subcpu 286 4210 ; INP: dx = 86 Mode segment to access 4211 ; OUT: bx = scratch selector, addressing that segment, 4212 ; limit set to 64 KiB (allow all 16-bit accesses) 4213 ; CHG: - 4214 ; STT: ss = lDEBUG_DATA_ENTRY selector, in PM 4215 setrmsegm: section_of_function 4216 mov bx, word [ss:scratchsel] 4217 call setrmaddr 4218 4219 ; INP: bx = selector 4220 ; OUT: limit set to 0FFFFh 4221 ; STT: in PM 4222 setrmlimit: 4223 push ax 4224 push cx 4225 push dx 4226 xor cx, cx 4227 ; _386 dec cx ; limit 0FFFF_FFFFh on 386+ 4228 ; We don't want that here. All users expect a 64 KiB segment. 4229 mov dx, -1 ; limit 0FFFFh on 286 4230 mov ax, 8 4231 int 31h ; set limit 4232 pop dx ; restore base segment 4233 pop cx 4234 pop ax 4235 retn 4236 4237 setrmaddr: ;<--- set selector in BX to segment address in DX 4238 .: 4239 push ax 4240 push cx 4241 push dx 4242 mov cx, dx 4243 shl dx, 4 4244 shr cx, 12 ; cx:dx = base address 4245 mov ax, 7 4246 int 31h ; set base 4247 pop dx 4248 pop cx 4249 pop ax 4250 retn 4251 4252 subcpureset 4253 %endif 4254 4255 ; Read a byte relative to cs:eip 4256 ; 4257 ; INP: reg_cs, reg_eip 4258 ; cx = (signed) eip adjustment 4259 ; OUT: al = byte at that address 4260 ; (e)bx = new offset (eip+adjustment) 4261 ; CHG: - 4262 getcseipbyte: 4263 000074EC 06 push es 4264 %if _PM 4265 mov bx, word [reg_cs] 4266 mov es, bx 4267 call test_d_b_bit 4268 jz .16 4269 [cpu 386] 4270 mov ebx, dword [reg_eip] 4271 push edx 4272 movsx edx, cx 4273 add ebx, edx 4274 ..@getcseipbyte_fault_skip_6_near_call: 4275 mov al, byte [es:ebx] 4276 pop edx 4277 pop es 4278 retn 4279 __CPU__ 4280 .16: 4281 %else 4282 000074ED 8E06[D00C] mov es, word [reg_cs] 4283 %endif 4284 000074F1 8B1E[DC0C] mov bx, word [reg_eip] 4285 000074F5 01CB add bx, cx 4286 ..@getcseipbyte_fault_skip_2_near_call: 4287 000074F7 268A07 mov al, byte [es:bx] 4288 000074FA 07 pop es 4289 000074FB C3 retn 4290 4291 ; Write to a byte relative to cs:eip 4292 ; 4293 ; INP: reg_cs, reg_eip 4294 ; cx = (signed) eip adjustment 4295 ; al = source byte to write 4296 ; OUT: NC if apparently written 4297 ; CY if failed to get a writeable selector 4298 ; CHG: (e)bx 4299 setcseipbyte: 4300 000074FC 06 push es 4301 %if _PM 4302 mov bx, word [reg_cs] 4303 call verifysegm 4304 jc .ret 4305 mov es, bx 4306 call test_d_b_bit 4307 jz .16 4308 [cpu 386] 4309 mov ebx, dword [reg_eip] 4310 push edx 4311 movsx edx, cx 4312 ..@setcseipbyte_fault_skip_6_near_call: 4313 mov byte [es:ebx+edx],al 4314 pop edx 4315 pop es 4316 clc 4317 retn 4318 __CPU__ 4319 .16: 4320 %else 4321 000074FD 8E06[D00C] mov es, word [reg_cs] 4322 %endif 4323 00007501 8B1E[DC0C] mov bx, word [reg_eip] 4324 00007505 01CB add bx, cx 4325 ..@setcseipbyte_fault_skip_2_near_call: 4326 00007507 268807 mov byte [es:bx], al 4327 0000750A F8 clc 4328 .ret: 4329 0000750B 07 pop es 4330 0000750C C3 retn 4331 4332 ; Exchange byte with memory 4333 ; 4334 ; INP: bx:(e)dx-> destination byte 4335 ; al = source byte 4336 ; REM: Determines whether to use edx by the 4337 ; segment limit of the selector. 4338 ; (Uses in run.asm always pass a segmented 4339 ; address obtained from getsegmented. This 4340 ; will have edxh = 0 always so it doesn't 4341 ; matter whether we use edx or dx.) 4342 ; OUT: CY if failed due to segment not writable 4343 ; NC if successful, 4344 ; al = previous value of destination byte 4345 ; CHG: ah 4346 writemem: 4347 %if _DEBUG1 4348 push dx 4349 push ax 4350 4351 call getlinear_high_limit.do_not_use_test ; NB do NOT resetmode 4352 jc @F ; already an error ? then return --> (CY) 4353 push bx 4354 push cx 4355 mov bx, test_records_Writemem 4356 call handle_test_case_multiple_16 4357 ; check whether this should testcase the error 4358 ; CY to indicate error from this call 4359 pop cx 4360 pop bx 4361 @@: 4362 pop ax 4363 pop dx 4364 jnc .do_not_use_test 4365 retn ; return CY here 4366 4367 %endif 4368 .do_not_use_test: 4369 4370 0000750D 88C4 mov ah, al 4371 %if _PM 4372 call ispm 4373 jnz .16 ; (NC from ispm) --> 4374 call verifysegm ; make bx a writeable segment 4375 jc .ret 4376 _386_PM call test_high_limit ; 32-bit segment ? 4377 jz .16 ; (NC from test_d_b_bit) --> 4378 [cpu 386] 4379 push ds 4380 mov ds, bx 4381 ..@writemem_fault_skip_2_near_call_a: 4382 xchg al, byte [edx] 4383 ..@writemem_fault_skip_2_near_call_b: 4384 cmp ah, byte [edx] 4385 pop ds 4386 __CPU__ 4387 jmp short .cmp 4388 .16: 4389 %endif 4390 0000750F 1E push ds 4391 00007510 8EDB mov ds, bx 4392 00007512 53 push bx 4393 00007513 89D3 mov bx, dx 4394 ..@writemem_fault_skip_4_near_call_a: 4395 00007515 8607 xchg al, byte [bx] 4396 ..@writemem_fault_skip_4_near_call_b: 4397 00007517 3A27 cmp ah, byte [bx] 4398 00007519 5B pop bx 4399 0000751A 1F pop ds 4400 .cmp: 4401 0000751B 7401 je .ret ; (NC) 4402 0000751D F9 stc ; Failed to compare (i.e. memory wasn't our byte after writing). 4403 ; This check catches ROM that will silently fail to write. 4404 .ret: 4405 0000751E C3 retn 4406 4407 4408 ; Read byte from memory 4409 ; 4410 ; INP: bx:(e)dx-> destination byte 4411 ; REM: Determines whether to use edx by the 4412 ; segment limit of the selector. 4413 ; (Uses in run.asm always pass a segmented 4414 ; address obtained from getsegmented. This 4415 ; will have edxh = 0 always so it doesn't 4416 ; matter whether we use edx or dx.) 4417 ; OUT: al = value of byte read 4418 readmem: 4419 %if _DEBUG1 4420 push dx 4421 push ax 4422 4423 call getlinear_high_limit.do_not_use_test ; NB do NOT resetmode 4424 jc @F ; already an error ? then return --> (CY) 4425 push bx 4426 push cx 4427 mov bx, test_records_Readmem 4428 call handle_test_case_multiple_16 4429 ; check whether this should testcase the error 4430 ; CY to indicate error from this call 4431 pop cx 4432 pop bx 4433 @@: 4434 pop ax 4435 pop dx 4436 jnc .do_not_use_test 4437 mov al, byte [test_readmem_value] 4438 ; return a most likely wrong value 4439 retn 4440 4441 %endif 4442 .do_not_use_test: 4443 4444 %if _PM 4445 _386_PM call test_high_limit ; 32-bit segment ? 4446 jz .16 4447 [cpu 386] 4448 push ds 4449 mov ds, bx 4450 ..@readmem_fault_skip_2_near_call: 4451 mov al, byte [edx] 4452 pop ds 4453 retn 4454 __CPU__ 4455 .16: 4456 %endif 4457 0000751F 1E push ds 4458 00007520 53 push bx 4459 00007521 8EDB mov ds, bx 4460 00007523 89D3 mov bx, dx 4461 ..@readmem_fault_skip_4_near_call: 4462 00007525 8A07 mov al, byte [bx] 4463 00007527 5B pop bx 4464 00007528 1F pop ds 4465 00007529 C3 retn 4466 4467 4468 ; Q command - quit. 4469 qq: 4470 0000752A E8A891 call guard_re 4471 0000752D 31C9 xor cx, cx ; no qq mode selected 4472 0000752F 4E dec si 4473 .loop: 4474 00007530 AC lodsb 4475 00007531 E83A24 call uppercase 4476 00007534 3C41 cmp al, 'A' 4477 00007536 741C je qq_a 4478 00007538 B501 mov ch, qqmode_b; QB mode (breakpoint before terminate) 4479 0000753A 3C42 cmp al, 'B' 4480 0000753C 7412 je .otherletter 4481 0000753E B502 mov ch, qqmode_c; QC mode (terminate device in a container MCB) 4482 00007540 3C43 cmp al, 'C' 4483 00007542 740C je .otherletter 4484 00007544 B504 mov ch, qqmode_d; QD mode (terminate device in initialisation) 4485 00007546 3C44 cmp al, 'D' 4486 00007548 7406 je .otherletter 4487 0000754A 880E[D84A] mov byte [qq_mode], cl 4488 0000754E EB1B jmp qq_default 4489 4490 .otherletter: 4491 00007550 08E9 or cl, ch 4492 00007552 EBDC jmp .loop 4493 4494 usesection lDEBUG_DATA_ENTRY 4495 00004AD8 00 qq_mode: db 0 4496 qqmode_b: equ 1 4497 qqmode_c: equ 2 4498 qqmode_d: equ 4 4499 usesection lDEBUG_CODE 4500 4501 qq_a: 4502 00007554 AC lodsb 4503 00007555 E84724 call chkeol 4504 00007558 E8590D call terminate_attached_process 4505 0000755B BB[ED24] mov bx, msg.qq_a_unterminated 4506 0000755E 7403 jz .attached_unterminated 4507 00007560 BB[1225] mov bx, msg.qq_a_terminated 4508 .attached_unterminated: 4509 00007563 E880CA call putrunint 4510 00007566 89DA mov dx, bx 4511 00007568 E9482A jmp putsz 4512 4513 4514 qq_default: 4515 0000756B E83124 call chkeol 4516 4517 %if _RH 4518 0000756E 8026[B600]EF clropt [options6], opt6_rh_mode 4519 00007573 8026[DB00]BF clropt [internalflags3], dif3_auxbuff_guarded_3 4520 00007578 8026[E600]C7 clropt [internalflags6], dif6_rh_mode_was | dif6_rh_mode | dif6_rh_mode_2 4521 %endif 4522 0000757D E83991 call guard_auxbuff 4523 4524 %if _DEVICE 4525 %if _APPLICATION || _BOOTLDR 4526 00007580 F606[E600]40 testopt [internalflags6], dif6_device_mode 4527 00007585 740B jz .nondevice 4528 %endif 4529 00007587 F6C106 test cl, qqmode_c | qqmode_d 4530 0000758A 7506 jnz .deviceselected 4531 0000758C BA[6B25] mov dx, msg.qq_device_none_selected 4532 0000758F E9212A jmp putsz 4533 4534 .deviceselected: 4535 .nondevice: 4536 %endif 4537 %if _BOOTLDR 4538 ; Test whether we are in non-DOS mode, and were 4539 ; currently entered in protected mode. Since 4540 ; this will make the entire operation fail, 4541 ; it has to be checked for before modifying 4542 ; or releasing any of the resources. 4543 ; (Does this ever occur? No?) 4544 00007592 F606[D100]40 testopt [internalflags], nodosloaded 4545 00007597 7414 jz .notpmnodos 4546 %if _PM 4547 call ispm 4548 %if _TSR ; same message, reuse code 4549 jz .cannotpmquit 4550 %else 4551 jnz .notpmnodos_nodos 4552 mov dx, msg.cannotpmquit 4553 jmp putsz 4554 %endif 4555 %endif 4556 .notpmnodos_nodos: 4557 00007599 E8C23F call bootgetmemorysize ; dx => behind usable memory 4558 0000759C A1[D25A] mov ax, word [ boot_new_memsizekib ] 4559 0000759F B106 mov cl, 6 4560 000075A1 D3E0 shl ax, cl 4561 000075A3 39D0 cmp ax, dx ; same? 4562 000075A5 7406 je @F 4563 000075A7 BA[D219] mov dx, msg.cannotbootquit_memsizes 4564 000075AA E9062A jmp .putsz 4565 %if !_TSR || !_PM 4566 .putsz equ putsz 4567 %endif 4568 4569 @@: 4570 .notpmnodos: 4571 %endif 4572 %if _PM 4573 %if _TSR 4574 ; Test whether we are in TSR mode, and were 4575 ; currently entered in protected mode. Since 4576 ; this will make the entire operation fail, 4577 ; it has to be checked for before modifying 4578 ; or releasing any of the resources. 4579 testopt [internalflags], tsrmode 4580 jz .notpmtsr 4581 call ispm 4582 jnz .notpmtsr 4583 4584 ; This isn't yet implemented. Broken down: 4585 ; * Uses terminate_attached_process which returns in real mode. 4586 ; * Exception vectors are implicitly restored/discarded by that. 4587 ; * (RM) Interrupt vectors are currently restored in real mode. Unnecessary. 4588 ; * The VDD is un-registered in real mode. Necessary? 4589 ; * Normal 21.4C is used to return to the real parent. 4590 ; * We have to discard our DOS process resources. Any DPMI TSR resources? 4591 ; * We must again gain control in debuggee's mode after discarding them. 4592 ; * We must return to the debuggee and seemlessly discard our memory. The 4593 ; stack trick possibly/probably does not work in protected mode. 4594 4595 .cannotpmquit: 4596 mov dx, msg.cannotpmquit 4597 .putsz: 4598 jmp putsz 4599 4600 .notpmtsr: 4601 %endif 4602 4603 %if (opt4_int_2F_hook)&~0FFh 4604 %fatal DCO4 re-ordered, adjust code here 4605 %endif 4606 mov ax, [options4] 4607 mov ah, __TEST_IMM8 4608 xchg ah, [dpmidisable] ; disable DPMI hook 4609 ; (SMC in section lDEBUG_DATA_ENTRY) 4610 push ax 4611 clropt [options4], opt4_int_2F_hook ; avoid a new hook while terminating 4612 %endif 4613 4614 4615 qq_restore_interrupts_simulated: 4616 000075AD 31ED xor bp, bp 4617 4618 %if _CATCHINT2D 4619 .2D: 4620 000075AF B02D mov al, 2Dh ; interrupt number 4621 000075B1 BE[B040] mov si, int2D ; -> IISP entry header 4622 000075B4 B93244 mov cx, "2D" 4623 000075B7 BA0800 mov dx, opt4_int_2D_force >> 16 4624 %if (opt4_int_2D_force >> 16) == dif4_int_2D_hooked 4625 000075BA E8C005 call qq_int_unhook_sim.set_bx_to_dx 4626 %else 4627 mov bx, dif4_int_2D_hooked 4628 call qq_int_unhook_sim 4629 %endif 4630 %endif 4631 4632 4633 %if _CATCHINTFAULTCOND && _CATCHINT0D 4634 .0D: 4635 000075BD B00D mov al, 0Dh ; interrupt number 4636 000075BF BE[C647] mov si, intr0D ; -> IISP entry header 4637 000075C2 B93044 mov cx, "0D" 4638 000075C5 BA1000 mov dx, opt4_int_0D_force >> 16 4639 %if (opt4_int_0D_force >> 16) == dif4_int_0D_hooked 4640 000075C8 E8B205 call qq_int_unhook_sim.set_bx_to_dx 4641 %else 4642 mov bx, dif4_int_0D_hooked 4643 call qq_int_unhook_sim 4644 %endif 4645 %endif 4646 4647 4648 %if _CATCHINTFAULTCOND && _CATCHINT0C 4649 .0C: 4650 000075CB B00C mov al, 0Ch ; interrupt number 4651 000075CD BE[8E47] mov si, intr0C ; -> IISP entry header 4652 000075D0 B93043 mov cx, "0C" 4653 000075D3 BA2000 mov dx, opt4_int_0C_force >> 16 4654 %if (opt4_int_0C_force >> 16) == dif4_int_0C_hooked 4655 000075D6 E8A405 call qq_int_unhook_sim.set_bx_to_dx 4656 %else 4657 mov bx, dif4_int_0C_hooked 4658 call qq_int_unhook_sim 4659 %endif 4660 %endif 4661 4662 4663 %if _CATCHINT08 4664 .08: 4665 000075D9 B008 mov al, 08h ; interrupt number 4666 000075DB BE[4A46] mov si, intr8 ; -> IISP entry header 4667 000075DE B93038 mov cx, "08" 4668 000075E1 BA0400 mov dx, opt4_int_08_force >> 16 4669 %if (opt4_int_08_force >> 16) == dif4_int_08_hooked 4670 000075E4 E89605 call qq_int_unhook_sim.set_bx_to_dx 4671 %else 4672 mov bx, dif4_int_08_hooked 4673 call qq_int_unhook_sim 4674 %endif 4675 %endif 4676 4677 4678 .serial: 4679 000075E7 A0[440C] mov al, byte [serial_installed_intnum] 4680 000075EA BE[1254] mov si, serial_interrupt_handler 4681 000075ED 51 push cx ; (make space) 4682 000075EE 89E7 mov di, sp ; es:di -> word on stack 4683 000075F0 E89E24 call hexbyte ; write byte value as text 4684 000075F3 59 pop cx ; cx = what to write into error message 4685 000075F4 BA0100 mov dx, opt4_int_serial_force >> 16 4686 %if (opt4_int_serial_force >> 16) == dif4_int_serial_hooked 4687 000075F7 E88305 call qq_int_unhook_sim.set_bx_to_dx 4688 %else 4689 mov bx, dif4_int_serial_hooked 4690 call qq_int_unhook_sim 4691 %endif 4692 4693 %if _PM 4694 .2F: 4695 mov al, 2Fh ; interrupt number 4696 mov si, debug2F ; -> IISP entry header 4697 mov cx, "2F" 4698 mov dx, opt4_int_2F_force >> 16 4699 testopt [internalflags], hooked2F 4700 jz .noint2F 4701 call qq_int_unhook_sim.need 4702 4703 .noint2F: 4704 %endif 4705 4706 4707 %if CATCHINTAMOUNT && ! (_DEBUG && ! _DEBUG_COND) 4708 %if _DEBUG 4709 testopt [internalflags6], dif6_debug_mode 4710 jnz .skipints 4711 %endif 4712 ; Simulate to restore interrupt vectors. 4713 000075FA BE[6C0C] mov si, inttab 4714 000075FD BF[810C] mov di, intforcetab 4715 %if _CATCHINT06 && _DETECT95LX 4716 00007600 8B0E[8A0C] mov cx, word [inttab_number_variable] 4717 %else 4718 mov cx, inttab_number 4719 %endif 4720 00007604 31D2 xor dx, dx 4721 .nextintsim: 4722 00007606 AC lodsb 4723 00007607 93 xchg ax, bx ; bl = number 4724 00007608 AD lodsw ; si -> list 4725 00007609 96 xchg ax, si ; si -> entry, ax -> list 4726 0000760A 93 xchg ax, bx ; al = number, bx -> list 4727 0000760B 57 push di 4728 0000760C 8A35 mov dh, byte [di] 4729 0000760E E8473E call UnhookInterruptForceSim 4730 00007611 5F pop di 4731 00007612 16 push ss 4732 00007613 07 pop es 4733 00007614 730D jnc @F 4734 00007616 BF[C523] mov di, msg.serial_cannot_unhook.int 4735 00007619 E87524 call hexbyte 4736 0000761C BA[AA23] mov dx, msg.serial_cannot_unhook.nowarn 4737 0000761F E89129 call putsz 4738 00007622 45 inc bp 4739 @@: 4740 00007623 47 inc di 4741 00007624 87DE xchg bx, si ; si -> list 4742 00007626 E2DE loop .nextintsim 4743 .skipints: 4744 %endif 4745 4746 00007628 BA[122A] mov dx, msg.empty_message 4747 0000762B 85ED test bp, bp 4748 0000762D 7403E90B03 jnz qq_attached_unterminated.common 4749 4750 4751 %if _DEVICE 4752 qq_device_prepare: 4753 %if _APPLICATION || _BOOTLDR 4754 00007632 F606[E600]40 testopt [internalflags6], dif6_device_mode 4755 00007637 7503E99001 jz qq_nondevice 4756 %endif 4757 4758 %if _PM 4759 mov dx, msg.qq_device_pm 4760 call ispm 4761 jz @F ; in PM --> 4762 %endif 4763 4764 ; Try quitting early in device init ? 4765 0000763C F606[D84A]04 testopt [qq_mode], qqmode_d 4766 00007641 7437 jz .device_c ; no, must be container quit --> 4767 4768 .device_d: 4769 00007643 F606[D200]40 testopt [internalflags], tsrmode 4770 00007648 741E jz .check_device_c 4771 4772 0000764A BE[A40C] mov si, regs 4773 0000764D BF[240D] mov di, device_quittable_regs 4774 00007650 B92000 mov cx, words(regs.size) 4775 00007653 F3A7 repe cmpsw ; can quit to device init ? 4776 00007655 7511 jne .check_device_c 4777 00007657 C43E[400C] les di, [device_header_address] 4778 0000765B B0FF mov al, -1 4779 0000765D B104 mov cl, 4 4780 0000765F F3AE repe scasb ; is next device pointer still -1 ? 4781 00007661 16 push ss 4782 00007662 07 pop es 4783 00007663 7503E96401 je qq_device_got ; yes --> 4784 4785 .check_device_c: 4786 ; Cannot quit to device init. Clear the flag 4787 ; so we know later on that we're trying QC. 4788 00007668 8026[D84A]FB clropt [qq_mode], qqmode_d 4789 0000766D F606[D84A]02 testopt [qq_mode], qqmode_c 4790 ; actually want to try QC ? 4791 00007672 7506 jnz .device_c ; yes --> 4792 4793 00007674 BA[B625] mov dx, msg.qq_device_no_d 4794 @@: 4795 00007677 E9C302 jmp qq_attached_unterminated.common 4796 4797 .device_c: 4798 0000767A B80258 mov ax, 5802h 4799 0000767D CD21 int 21h 4800 0000767F B400 mov ah, 0 4801 00007681 50 push ax ; preserve UMB link 4802 00007682 B80358 mov ax, 5803h 4803 00007685 BB0100 mov bx, 1 4804 00007688 CD21 int 21h ; enable UMB link 4805 ; we want to support the case in which 4806 ; the first UMCB may have changed. so 4807 ; instead of searching for it again we 4808 ; just request the link enabled. 4809 4810 0000768A BBFFFF mov bx, -1 4811 0000768D B452 mov ah, 52h 4812 0000768F CD21 int 21h 4813 00007691 89DF mov di, bx 4814 00007693 83FBBE cmp bx, - (30h + 12h) 4815 00007696 7603E91E01 ja .no_c 4816 0000769B 83FB01 cmp bx, 1 4817 0000769E 7503E91601 je .no_c 4818 000076A3 268B57FE mov dx, word [es:bx - 2] 4819 000076A7 B93000 mov cx, 30h 4820 4821 .nulloop: 4822 000076AA BE[2C26] mov si, msg.NULblank 4823 000076AD A7 cmpsw ; di += 2, si += 2. compare 4824 000076AE 750A jne .nulnext 4825 .nulcheck: 4826 000076B0 57 push di 4827 000076B1 51 push cx 4828 000076B2 B103 mov cl, 3 ; 3 more words to go 4829 000076B4 F3A7 repe cmpsw ; match ? 4830 000076B6 59 pop cx 4831 000076B7 5F pop di 4832 000076B8 7406 je .nulfound 4833 .nulnext: 4834 000076BA 4F dec di ; di -= 1 so it ends up 1 higher than prior 4835 000076BB E2ED loop .nulloop 4836 000076BD E9F900 jmp .no_c 4837 4838 .nulfound: 4839 000076C0 83EF0C sub di, 3 * 2 + 4 + 2 ; (strategy, interrupt, flags are words, 4840 ; next device pointer is a dword. 4841 ; additional plus 2 for the cmpsw output.) 4842 4843 ; es:di -> NUL device header 4844 .devloop: 4845 000076C3 A1[400C] mov ax, word [device_header_address] 4846 000076C6 263B05 cmp ax, word [es:di] 4847 000076C9 7509 jne .devnext 4848 000076CB A1[420C] mov ax, word [device_header_address + 2] 4849 000076CE 263B4502 cmp ax, word [es:di + 2] 4850 000076D2 7411 je .mcb 4851 .devnext: 4852 000076D4 41 inc cx 4853 000076D5 7903E9DF00 js .no_c 4854 4855 000076DA 26C43D les di, [es:di] 4856 000076DD 83FFFF cmp di, -1 4857 000076E0 75E1 jne .devloop 4858 000076E2 E9D400 jmp .no_c 4859 4860 .mcb: 4861 4862 000076E5 893E[DC4A] mov word [.device_reference], di 4863 000076E9 8C06[DE4A] mov word [.device_reference + 2], es 4864 4865 000076ED 8326[E64A]00 and word [.counter], 0 4866 000076F2 89C7 mov di, ax ; => start of memory allocated to us 4867 000076F4 8B0E[3E0C] mov cx, word [device_mcb_paragraphs] 4868 ; = amount paragraphs allocated to us 4869 000076F8 01CF add di, cx ; => behind memory allocated to us 4870 4871 ; dx => first MCB 4872 .mcbloop: 4873 000076FA 8EC2 mov es, dx 4874 000076FC 89D6 mov si, dx ; => MCB 4875 000076FE 2603360300 add si, word [es:3] 4876 00007703 46 inc si ; => next MCB (or behind current MCB) 4877 00007704 26803E00004D cmp byte [es:0], 'M' ; valid MCB ? 4878 0000770A 740B je @F 4879 0000770C 26803E00005A cmp byte [es:0], 'Z' 4880 00007712 7403E9A200 jne .no_c ; no --> 4881 @@: 4882 00007717 39C2 cmp dx, ax ; start of MCB < allocation ? 4883 00007719 731F jae .mcbnext ; no --> 4884 0000771B 39FE cmp si, di ; end of MCB > allocation ? 4885 0000771D 721B jb .mcbnext ; no --> 4886 4887 0000771F 26833E010000 cmp word [es:1], 0 ; free ? 4888 00007725 7413 je .mcbnext ; do not match --> 4889 00007727 48 dec ax ; => our (sub) MCB 4890 00007728 39C2 cmp dx, ax ; matches (DEVLOAD style) ? 4891 0000772A 7520 jne .mcbcontainer ; no --> 4892 0000772C 26390E0300 cmp word [es:3], cx ; size matches ? 4893 00007731 7519 jne .mcbcontainer ; no --> 4894 00007733 8326[E04A]00 and word [.container_segment], 0 4895 00007738 EB7E jmp .mcbdone ; found a non-container MCB 4896 4897 .mcbnext: 4898 0000773A FF06[E64A] inc word [.counter] ; safeguard against infinite loop 4899 0000773E 7479 jz .no_c 4900 00007740 89F2 mov dx, si ; => next MCB 4901 00007742 26803E00004D cmp byte [es:0], 'M' ; prior was 'M' ? 4902 00007748 74B0 je .mcbloop ; yes, so loop --> 4903 0000774A EB6D jmp .no_c 4904 4905 .mcbcontainer: 4906 0000774C 40 inc ax ; => allocated block (device header) 4907 0000774D 26833E010050 cmp word [es:1], 50h ; SD owner system ? 4908 00007753 73E5 jae .mcbnext 4909 00007755 26813E08005344 cmp word [es:8], "SD" 4910 0000775C 75DC jne .mcbnext ; no --> 4911 4912 0000775E 26FF360000 push word [es:0] 4913 00007763 8F06[E44A] pop word [.container_is_z] 4914 00007767 8936[E24A] mov word [.container_end], si 4915 0000776B 8916[E04A] mov word [.container_segment], dx 4916 0000776F 42 inc dx ; => sub-MCB 4917 .submcbloop: 4918 00007770 8EC2 mov es, dx 4919 00007772 89D6 mov si, dx 4920 00007774 2603360300 add si, word [es:3] 4921 00007779 46 inc si ; => next sub or MCB (or behind Z MCB) 4922 0000777A 39C2 cmp dx, ax 4923 0000777C 731C jae .submcbnext 4924 0000777E 39FE cmp si, di 4925 00007780 7218 jb .submcbnext 4926 4927 00007782 50 push ax 4928 00007783 48 dec ax ; => our (sub) MCB 4929 00007784 39C2 cmp dx, ax ; matched start of allocation ? 4930 00007786 58 pop ax 4931 00007787 7511 jne .submcbnext 4932 00007789 26390E0300 cmp word [es:3], cx ; matches allocation size ? 4933 0000778E 750A jne .submcbnext 4934 00007790 26833E010000 cmp word [es:1], 0 ; is not free ? 4935 00007796 7402 je .submcbnext 4936 00007798 EB1E jmp .mcbdone ; all yes, found it --> 4937 4938 .submcbnext: 4939 0000779A FF06[E64A] inc word [.counter] ; safeguard against infinite loop 4940 0000779E 7419 jz .no_c 4941 000077A0 89F2 mov dx, si ; => next sub MCB or after container 4942 000077A2 8B36[E24A] mov si, word [.container_end] 4943 000077A6 39F2 cmp dx, si ; after container ? 4944 000077A8 72C6 jb .submcbloop ; no --> 4945 ; This jump could be a jne but generally 4946 ; we can assume that the container does 4947 ; not overflow across the 1 MiB limit. 4948 ; And this is more hardened against errors. 4949 000077AA 89F2 mov dx, si ; insure we use actual container end 4950 000077AC 803E[E44A]5A cmp byte [.container_is_z], 'Z' 4951 ; container had a Z ? 4952 000077B1 7403E944FF jne .mcbloop ; no --> 4953 ; if here, loop now, dx already updated and 4954 ; furthermore es does not point at container! 4955 000077B6 EB01 jmp .no_c 4956 4957 usesection lDEBUG_DATA_ENTRY 4958 00004AD9 00 align 4, db 0 4959 00004ADC 00000000 .device_reference: dd 0 4960 00004AE0 0000 .container_segment: dw 0 4961 00004AE2 0000 .container_end: dw 0 4962 00004AE4 0000 .container_is_z: dw 0 4963 00004AE6 0000 .counter: dw 0 4964 usesection lDEBUG_CODE 4965 4966 .mcbdone: 4967 4968 000077B8 A8 db __TEST_IMM8 ; (skip stc, NC) 4969 .no_c: 4970 000077B9 F9 stc 4971 000077BA 5B pop bx 4972 000077BB 9C pushf 4973 000077BC B80358 mov ax, 5803h 4974 000077BF CD21 int 21h ; restore UMB link 4975 000077C1 9D popf 4976 000077C2 16 push ss 4977 000077C3 07 pop es 4978 000077C4 7306 jnc @F 4979 000077C6 BA[F525] mov dx, msg.qq_device_no_c 4980 000077C9 E97101 jmp qq_attached_unterminated.common 4981 4982 @@: 4983 4984 qq_device_got: 4985 qq_nondevice: 4986 %endif 4987 4988 4989 qq_restore_interrupts: 4990 %if _CATCHINT2D 4991 .2D: 4992 000077CC B02D mov al, 2Dh ; interrupt number 4993 000077CE BE[B040] mov si, int2D ; -> IISP entry header 4994 000077D1 B93244 mov cx, "2D" 4995 000077D4 BA0800 mov dx, opt4_int_2D_force >> 16 4996 %if (opt4_int_2D_force >> 16) == dif4_int_2D_hooked 4997 000077D7 E8BF03 call qq_int_unhook_real.set_bx_to_dx 4998 %else 4999 mov bx, dif4_int_2D_hooked 5000 call qq_int_unhook_real 5001 %endif 5002 000077DA 7303E95E01 jc qq_attached_unterminated.common 5003 %endif 5004 5005 5006 %if _CATCHINTFAULTCOND && _CATCHINT0D 5007 .0D: 5008 000077DF B00D mov al, 0Dh ; interrupt number 5009 000077E1 BE[C647] mov si, intr0D ; -> IISP entry header 5010 000077E4 B93044 mov cx, "0D" 5011 000077E7 BA1000 mov dx, opt4_int_0D_force >> 16 5012 %if (opt4_int_0D_force >> 16) == dif4_int_0D_hooked 5013 000077EA E8AC03 call qq_int_unhook_real.set_bx_to_dx 5014 %else 5015 mov bx, dif4_int_0D_hooked 5016 call qq_int_unhook_real 5017 %endif 5018 000077ED 7303E94B01 jc qq_attached_unterminated.common 5019 %endif 5020 5021 5022 %if _CATCHINTFAULTCOND && _CATCHINT0C 5023 .0C: 5024 000077F2 B00C mov al, 0Ch ; interrupt number 5025 000077F4 BE[8E47] mov si, intr0C ; -> IISP entry header 5026 000077F7 B93043 mov cx, "0C" 5027 000077FA BA2000 mov dx, opt4_int_0C_force >> 16 5028 %if (opt4_int_0C_force >> 16) == dif4_int_0C_hooked 5029 000077FD E89903 call qq_int_unhook_real.set_bx_to_dx 5030 %else 5031 mov bx, dif4_int_0C_hooked 5032 call qq_int_unhook_real 5033 %endif 5034 00007800 7303E93801 jc qq_attached_unterminated.common 5035 %endif 5036 5037 5038 %if _CATCHINT08 5039 .08: 5040 00007805 B008 mov al, 08h ; interrupt number 5041 00007807 BE[4A46] mov si, intr8 ; -> IISP entry header 5042 0000780A B93038 mov cx, "08" 5043 0000780D BA0400 mov dx, opt4_int_08_force >> 16 5044 %if (opt4_int_08_force >> 16) == dif4_int_08_hooked 5045 00007810 E88603 call qq_int_unhook_real.set_bx_to_dx 5046 %else 5047 mov bx, dif4_int_08_hooked 5048 call qq_int_unhook_real 5049 %endif 5050 00007813 7303E92501 jc qq_attached_unterminated.common 5051 %endif 5052 5053 5054 .serial: 5055 00007818 F606[150C]01 testopt [serial_flags], sf_init_done 5056 0000781D 740D jz @F 5057 0000781F E8F739 call serial_clean_up ; unhook interrupt 5058 00007822 8026[150C]EE clropt [serial_flags], sf_init_done | sf_use_serial 5059 ; clear (in case return to cmd3) 5060 00007827 8026[A100]BF clropt [options], enable_serial ; do not output to serial any longer 5061 @@: 5062 0000782C F606[DC00]01 testopt [internalflags4], dif4_int_serial_hooked 5063 00007831 7419 jz .done_serial 5064 00007833 E82E3A call serial_uninstall_interrupt_handler 5065 00007836 7314 jnc .done_serial ; if it succeeded --> 5066 5067 00007838 BF[C523] mov di, msg.serial_cannot_unhook.int 5068 0000783B A0[440C] mov al, byte [serial_installed_intnum] 5069 0000783E E85022 call hexbyte 5070 00007841 BA[AA23] mov dx, msg.serial_cannot_unhook.nowarn 5071 00007844 C606[1A54]00 mov byte [serial_interrupt_handler + ieEOI], 0 5072 ; we do not issue EOI any longer 5073 00007849 E9F100 jmp qq_attached_unterminated.common 5074 5075 5076 .done_serial: 5077 5078 %if _PM 5079 .2F: 5080 mov al, 2Fh ; interrupt number 5081 mov si, debug2F ; -> IISP entry header 5082 mov cx, "2F" 5083 mov dx, opt4_int_2F_force >> 16 5084 %if (opt4_int_2F_force >> 16) == dif4_int_2F_hooked 5085 mov bx, dx 5086 %else 5087 mov bx, dif4_int_2F_hooked 5088 %endif 5089 testopt [internalflags], hooked2F 5090 jz .noint2F 5091 call qq_int_unhook_real.need 5092 jc qq_attached_unterminated.common 5093 5094 .got2F: 5095 clropt [internalflags], hooked2F 5096 5097 .noint2F: 5098 %endif 5099 5100 5101 %if _BOOTLDR 5102 %if _APPLICATION || _DEVICE 5103 0000784C F606[D100]40 testopt [internalflags], nodosloaded 5104 00007851 7511 jnz .restoreints 5105 %else 5106 jmp .restoreints 5107 %endif 5108 %endif 5109 5110 5111 %if _APPLICATION || _DEVICE 5112 ; Cancel child's process if any. 5113 ; This will drop to real mode if debuggee is in protected mode. 5114 %if _TSR || _DEVICE 5115 00007853 F606[D200]40 testopt [internalflags], tsrmode 5116 00007858 7402 jz .terminate_attached ; falls through for device or TSR application 5117 5118 %if _PM 5119 call ispm 5120 jz @F ; in PM --> 5121 testopt [internalflags], canswitchmode 5122 jz @FF ; in 86 Mode and cannot switch to PM --> 5123 5124 setopt [internalflags], modeswitched ; set flag for resetmode 5125 mov al, 0 5126 call sr_state ; save state 5127 call switchmode ; switch to PM 5128 ; ! handle_mode_changed not called here ! 5129 ; do not call InDOS or other functions using seg/sels 5130 @@: 5131 call pm_reset_handlers 5132 ; ! this calls resetmode 5133 5134 ; remember that we cannot access Protected Mode any longer 5135 clropt [internalflags], canswitchmode | switchbuffer 5136 @@: 5137 %endif 5138 5139 0000785A EB08 jmp .restoreints 5140 5141 .terminate_attached: 5142 %endif 5143 5144 0000785C E8550A call terminate_attached_process 5145 0000785F 7503E9D300 jz qq_attached_unterminated 5146 %if _PM 5147 call ispm 5148 jnz @F 5149 5150 mov dx, msg.qq_still_pm 5151 jmp qq_attached_unterminated.common 5152 @@: 5153 %endif 5154 %endif 5155 5156 .restoreints: 5157 %if CATCHINTAMOUNT && ! (_DEBUG && ! _DEBUG_COND) 5158 %if _DEBUG 5159 testopt [internalflags6], dif6_debug_mode 5160 jnz .skiprestoreints 5161 %endif 5162 ; Restore interrupt vectors. 5163 00007864 BE[6C0C] mov si, inttab 5164 00007867 BF[810C] mov di, intforcetab 5165 %if _CATCHINT06 && _DETECT95LX 5166 0000786A 8B0E[8A0C] mov cx, word [inttab_number_variable] 5167 %else 5168 mov cx, inttab_number 5169 %endif 5170 0000786E 31D2 xor dx, dx 5171 .nextint: 5172 00007870 AC lodsb 5173 00007871 93 xchg ax, bx ; bl = number 5174 00007872 AD lodsw ; si -> list 5175 00007873 96 xchg ax, si ; si -> entry, ax -> list 5176 00007874 93 xchg ax, bx ; al = number, bx -> list 5177 00007875 57 push di 5178 00007876 8A35 mov dh, byte [di] 5179 00007878 E8A53B call UnhookInterruptForce 5180 0000787B 5F pop di 5181 0000787C 47 inc di 5182 0000787D 87DE xchg bx, si ; si -> list 5183 0000787F E2EF loop .nextint 5184 .skiprestoreints: 5185 %endif 5186 5187 5188 %if _PM 5189 pop ax ; (discard) 5190 %endif 5191 5192 5193 qqlate: 5194 %if _AREAS && _AREAS_HOOK_CLIENT 5195 call uninstall_areas.qq_entry 5196 %endif 5197 5198 %if _AREAS_HOOK_SERVER 5199 @@: 5200 mov dx, word [ddebugareas.next + 2] 5201 mov bx, word [ddebugareas.next] 5202 mov ax, ss 5203 cmp dx, ax 5204 je @F 5205 push dx 5206 push bx 5207 mov al, 0 5208 push cs 5209 call qqlate_86m_to_areastruc_entry 5210 push ss 5211 pop ds 5212 push ss 5213 pop es 5214 pop bx 5215 pop dx 5216 cmp dx, word [ddebugareas.next + 2] 5217 jne @B 5218 cmp bx, word [ddebugareas.next] 5219 jne @B 5220 mov dx, msg.qqlate_areas_error 5221 jmp putsz 5222 5223 @@: 5224 %endif 5225 5226 %if _SYMBOLIC 5227 ; Free XMS symbol table. 86 Mode memory backed symbol table 5228 ; is freed by our process's termination. 5229 ; Update: QD device termination does not currently terminate 5230 ; our process. In the meantime, free things explicitly. 5231 ; Note that the calls need to be in this order because of 5232 ; how zz_free_xms calls zz_free_reset first. 5233 nearcall zz_free_dos 5234 nearcall zz_free_xms 5235 %endif 5236 5237 ; Release the registered VDD. 5238 %if _VDD 5239 00007881 F606[D000]04 testopt [internalflags], ntpacket 5240 00007886 7408 jz .novdd 5241 00007888 A1[0C0B] mov ax, word [hVdd] 5242 0000788B C4C4580190 UnRegisterModule 5243 .novdd: 5244 %endif 5245 5246 %if _VXCHG 5247 00007890 F606[E400]01 testopt [internalflags6], dif6_vv_mode 5248 00007895 7403 jz @F 5249 5250 00007897 E8EF0B call vv_disable 5251 @@: 5252 %endif 5253 5254 %if _ALTVID 5255 0000789A E874CE call setscreen 5256 %endif 5257 5258 ; Restore termination address. 5259 %if _BOOTLDR 5260 %if _APPLICATION || _DEVICE 5261 0000789D F606[D100]40 testopt [internalflags], nodosloaded 5262 000078A2 7403E97F01 jnz .bootterminate ; terminate --> 5263 %else 5264 jmp .bootterminate 5265 %endif 5266 %endif 5267 %if _DEVICE 5268 %if _APPLICATION 5269 000078A7 F606[E600]40 testopt [internalflags6], dif6_device_mode 5270 000078AC 7403E98F00 jnz .deviceterminate 5271 %else 5272 jmp .deviceterminate 5273 %endif 5274 %endif 5275 5276 %if _APPLICATION || _DEVICE 5277 %if _TSR || _DEVICE 5278 .appterminate: 5279 000078B1 16 push ss 5280 000078B2 07 pop es 5281 000078B3 F606[D200]40 testopt [internalflags], tsrmode 5282 000078B8 745D jz .nontsrterminate 5283 5284 .tsrterminate: 5285 000078BA BA[F94A] mov dx, qq.proceedtsrtermination 5286 5287 .terminate_to_shim_process: 5288 000078BD 31F6 xor si, si 5289 000078BF 8E06[4A0A] mov es, word [auxbuff_segorsel] 5290 000078C3 31FF xor di, di 5291 000078C5 31C0 xor ax, ax 5292 000078C7 B90800 mov cx, 8 5293 000078CA F3AB rep stosw ; 10h MCB bytes 5294 000078CC B94000 mov cx, 40h 5295 000078CF F3A5 rep movsw ; 80h PSP bytes 5296 000078D1 8CC0 mov ax, es 5297 000078D3 40 inc ax 5298 000078D4 26A30100 mov word [es:1], ax ; fake MCB 5299 000078D8 1E push ds 5300 000078D9 8ED8 mov ds, ax 5301 000078DB C70634001800 mov word [34h], 18h 5302 000078E1 A33600 mov word [36h], ax ; insure default PHT and fix segment 5303 000078E4 C70632000100 mov word [32h], 1 ; only one PHT entry (zero might crash) 5304 000078EA C6061800FF mov byte [18h], -1 ; PHT entry is closed 5305 000078EF C7062C000000 mov word [2Ch], 0 ; PSP clear 5306 000078F5 E82201 call .setparent ; make it self-owned, just in case 5307 000078F8 8CD3 mov bx, ss ; => process segment 5308 000078FA 4B dec bx ; span actual MCB 5309 %if _DEVICE 5310 %if _APPLICATION 5311 000078FB 36F606[E600]40 testopt [ss:internalflags6], dif6_device_mode 5312 00007901 7403 jz @F 5313 %endif 5314 00007903 83EB04 sub bx, deviceshim_size_p + paras(10h) 5315 ; spam shim and pseudo MCB 5316 @@: 5317 %endif 5318 00007906 8EDB mov ds, bx ; => our (real) MCB 5319 00007908 81FA[F94A] cmp dx, qq.proceedtsrtermination 5320 0000790C 7503 jne @F 5321 0000790E A30100 mov word [1], ax ; owner = fake PSP 5322 @@: 5323 00007911 1F pop ds 5324 00007912 E80501 call .setparent ; make the fake PSP our parent 5325 00007915 EB1B jmp short terminate_00 ; see ya 5326 5327 .nontsrterminate: 5328 %endif 5329 00007917 BE[1C0B] mov si, psp22 ; restore termination address 5330 0000791A BF0A00 mov di, TPIV 5331 0000791D A5 movsw 5332 0000791E A5 movsw 5333 0000791F BF1600 mov di, 16h ; restore PSP of parent 5334 00007922 A5 movsw 5335 ; Really done. 5336 5337 00007923 F606[D84A]01 testopt [qq_mode], qqmode_b 5338 00007928 7401 jz @F 5339 0000792A CC int3 5340 5341 @@: 5342 0000792B B44C mov ah, 4Ch ; quit 5343 0000792D A0[3D0C] mov al, byte [qqtermcode] 5344 ; return code 5345 00007930 CD21 int 21h 5346 %endif 5347 5348 5349 terminate_00: ; used by terminate_attached_process 5350 00007932 B8004C mov ax, 4C00h ; quit 5351 00007935 CD21 int 21h 5352 5353 5354 %if _AREAS_HOOK_SERVER 5355 qqlate_86m_to_areastruc_entry: 5356 mov cx, areastruc_entry.qq_entry 5357 push ss 5358 push cx 5359 retf 5360 %endif 5361 5362 5363 qq_attached_unterminated: 5364 00007937 E8ACC6 call putrunint 5365 0000793A BA[BB24] mov dx, msg.qq_unterm 5366 5367 .common: 5368 ; Restore state: 5369 %if _PM 5370 %if (opt4_int_2F_hook)&~0FFh 5371 %fatal DCO4 re-ordered, adjust code here 5372 %endif 5373 pop ax 5374 mov [dpmidisable], ah ; (SMC in section lDEBUG_DATA_ENTRY) 5375 and al, opt4_int_2F_hook 5376 clropt [options4], opt4_int_2F_hook 5377 or [options4], al 5378 %endif 5379 0000793D E97326 jmp putsz 5380 5381 5382 %if _DEVICE 5383 qqlate.deviceterminate: 5384 00007940 F606[D84A]04 testopt [qq_mode], qqmode_d 5385 00007945 7432 jz .mode_c 5386 5387 .mode_d: 5388 ; We modify the device request header 5389 ; only now, so in case of being unable 5390 ; to release something then the debugger 5391 ; will remain usable and stay resident. 5392 00007947 8E06[C80C] mov es, word [reg_es] 5393 0000794B 8B1E[A80C] mov bx, word [reg_ebx] 5394 0000794F 8CD8 mov ax, ds ; => process segment 5395 00007951 83E804 sub ax, paras(deviceshim_size + 10h) 5396 ; span shim and pseudo MCB 5397 00007954 26C747030381 mov word [es:bx + 3], 8103h ; error, done, code: unknown command 5398 0000795A 2683670E00 and word [es:bx + 0Eh], 0 5399 0000795F 26894710 mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 5400 ; es reset in run or qqlate.terminate_to_shim_process 5401 5402 %if 0 ; old code to manually release process resources 5403 xor bx, bx ; = 0 5404 mov cx, word [32h] ; get amount of handles 5405 .loop: 5406 mov ah, 3Eh 5407 int 21h ; close it 5408 inc bx ; next handle 5409 loop .loop ; loop for all process handles --> 5410 %else ; new code re-using TSR terminate handling 5411 00007963 BA[E84A] mov dx, .proceed 5412 00007966 E954FF jmp qqlate.terminate_to_shim_process 5413 5414 5415 usesection lDEBUG_DATA_ENTRY 5416 .proceed: 5417 00004AE8 FA cli 5418 00004AE9 8CC8 mov ax, cs 5419 00004AEB 8ED0 mov ss, ax 5420 00004AED BC[0010] mov sp, stack_end 5421 00004AF0 8ED8 mov ds, ax 5422 00004AF2 FC cld 5423 00004AF3 FB sti 5424 5425 00004AF4 E850F5 call entry_to_code_seg 5426 00004AF7 [6979] dw .proceedcode 5427 5428 5429 usesection lDEBUG_CODE 5430 code_insure_low_byte_not_0CCh 5431 .proceedcode: 5432 %endif 5433 5434 %if _DEBUG 5435 ; avoid hooking interrupts again: 5436 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 5437 ; (SMC in section lDEBUG_CODE) 5438 %endif 5439 00007969 F606[D84A]01 testopt [qq_mode], qqmode_b 5440 0000796E 7406 jz @F 5441 00007970 C706[DC0C][7B55] mov word [reg_eip], entry_int3_retf 5442 @@: 5443 00007976 E9D2CC jmp run ; run this 5444 5445 5446 .mode_c: 5447 qqlate_device_container: 5448 00007979 06 push es 5449 0000797A C43E[DC4A] les di, [qq_device_prepare.device_reference] 5450 0000797E 8CC2 mov dx, es ; => device header pointing to ours 5451 00007980 8CD0 mov ax, ss ; => process segment 5452 00007982 83E804 sub ax, deviceshim_size_p + paras(10h) 5453 ; span shim and pseudo MCB 5454 ; ! ax is re-used in .handlecontainer 5455 00007985 8EC0 mov es, ax ; => our device header 5456 00007987 26FF360200 push word [es:0 + 2] 5457 0000798C 26FF360000 push word [es:0] ; get our next link 5458 00007991 8EC2 mov es, dx 5459 00007993 268F05 pop word [es:di] 5460 00007996 268F4502 pop word [es:di + 2] ; update their next link 5461 0000799A 8EC0 mov es, ax 5462 0000799C 26830E0000FF or word [es:0], -1 5463 000079A2 26830E0200FF or word [es:0 + 2], -1 ; de-initialise our next link 5464 000079A8 07 pop es 5465 5466 000079A9 31C9 xor cx, cx ; flag: do not shrink our allocation 5467 000079AB 8B1E[E04A] mov bx, word [qq_device_prepare.container_segment] 5468 000079AF 85DB test bx, bx ; are we in a container ? 5469 000079B1 7451 jz .nocontainer ; no --> 5470 .handlecontainer: 5471 000079B3 0306[3E0C] add ax, word [device_mcb_paragraphs] 5472 ; => behind our allocation 5473 000079B7 89C2 mov dx, ax 5474 000079B9 F7DA neg dx 5475 000079BB 0316[E24A] add dx, word [qq_device_prepare.container_end] 5476 ; are we last in container ? 5477 000079BF 1E push ds 5478 000079C0 8EDB mov ds, bx ; => container 5479 5480 000079C2 7418 je .notrail ; yes, easier --> 5481 5482 000079C4 48 dec ax ; => last paragraph allocated to us 5483 ; (buffer for trailer container MCB) 5484 000079C5 8EC0 mov es, ax 5485 000079C7 31F6 xor si, si 5486 000079C9 31FF xor di, di 5487 ; copy over MCB letter, owner, and name/type 5488 000079CB B90800 mov cx, words(16) 5489 000079CE F3A5 rep movsw 5490 000079D0 36C606[E44A]4D mov byte [ss:qq_device_prepare.container_is_z], 'M' 5491 ; tell subsequent handler to use 'M' 5492 000079D6 2689160300 mov word [es:3], dx ; set new size 5493 000079DB 41 inc cx ; flag: shrink our allocation 5494 5495 .notrail: 5496 000079DC E82B00 call .setowner 5497 000079DF 26290E0300 sub word [es:3], cx ; -= 1 in case we have trail 5498 000079E4 36A0[E44A] mov al, byte [ss:qq_device_prepare.container_is_z] 5499 000079E8 26A20000 mov byte [es:0], al ; set our letter to M or Z 5500 ; (Z only if container had Z and also 5501 ; there is no trailing container created) 5502 5503 000079EC 29DA sub dx, bx ; device mode MCB minus container MCB 5504 000079EE 4A dec dx ; account for MCB paragraph to get MCB size 5505 000079EF 89160300 mov word [3], dx ; adjust size 5506 000079F3 C60600004D mov byte [0], 'M' ; set M unconditionally 5507 000079F8 85D2 test dx, dx ; size zero ? 5508 000079FA 7504 jnz @F 5509 000079FC 89160100 mov word [1], dx ; yes, zero the owner too 5510 @@: 5511 00007A00 1F pop ds 5512 00007A01 E9ADFE jmp qqlate.appterminate 5513 5514 .nocontainer: 5515 00007A04 E80300 call .setowner 5516 00007A07 E9A7FE jmp qqlate.appterminate 5517 5518 5519 ; INP: ss = debugger process/data segment 5520 ; OUT: es = dx => our device mode MCB 5521 ; owner of this MCB set to our process 5522 ; STT: R86M 5523 ; CHG: - 5524 .setowner: 5525 00007A0A 8CD2 mov dx, ss 5526 00007A0C 83EA05 sub dx, deviceshim_size_p + paras(10h + 10h) 5527 ; span shim, pseudo MCB, actual MCB 5528 00007A0F 8EC2 mov es, dx ; => device mode MCB 5529 00007A11 268C160100 mov word [es:1], ss ; insure valid owner (must be our PSP) 5530 00007A16 C3 retn 5531 %endif 5532 5533 5534 %if (_APPLICATION && _TSR) || _DEVICE 5535 usesection lDEBUG_DATA_ENTRY 5536 5537 qq.proceedtsrtermination: 5538 00004AF9 FA cli 5539 00004AFA 8CC8 mov ax, cs 5540 00004AFC 8ED0 mov ss, ax 5541 00004AFE BC[0010] mov sp, stack_end 5542 00004B01 8ED8 mov ds, ax 5543 00004B03 FC cld 5544 00004B04 FB sti 5545 00004B05 832E[B40C]12 sub word [reg_esp], 2+4+((qq.tsrfreecode_size+1)&~1) 5546 00004B0A 8B3E[B40C] mov di, word [reg_esp] ; -> stack frame 5547 00004B0E 8E06[CC0C] mov es, word [reg_ss] 5548 00004B12 A1[C40C] mov ax, word [reg_ds] 5549 00004B15 AB stosw ; debuggee's ds 5550 00004B16 A1[DC0C] mov ax, word [reg_eip] 5551 00004B19 AB stosw 5552 00004B1A A1[D00C] mov ax, word [reg_cs] 5553 00004B1D AB stosw ; debuggee's cs:ip 5554 00004B1E 06 push es 5555 00004B1F 57 push di 5556 00004B20 BE[5C4B] mov si, qq.tsrfreecode 5557 00004B23 B90600 mov cx, ((qq.tsrfreecode_size+1)>>1) 5558 00004B26 F3A5 rep movsw ; code on stack 5559 00004B28 8CC8 mov ax, cs ; => process segment 5560 00004B2A 48 dec ax ; span actual MCB 5561 %if _DEVICE 5562 %if _APPLICATION 5563 00004B2B F606[E600]40 testopt [internalflags6], dif6_device_mode 5564 00004B30 7403 jz @F 5565 %endif 5566 00004B32 83E804 sub ax, deviceshim_size_p + paras(10h) 5567 ; span shim + pseudo MCB 5568 @@: 5569 %endif 5570 00004B35 A3[C40C] mov word [reg_ds], ax ; = our MCB 5571 00004B38 8F06[DC0C] pop word [reg_eip] 5572 00004B3C 8F06[D00C] pop word [reg_cs] ; -> code on stack (at int3) 5573 00004B40 F606[D84A]01 testopt [qq_mode], qqmode_b 5574 ; QB mode ? 5575 00004B45 7504 jnz @F ; yes, leave pointing cs:ip at int3 5576 00004B47 FF06[DC0C] inc word [reg_eip] ; point cs:ip past the int3 5577 @@: 5578 00004B4B F606[AB00]80 testopt [options3], opt3_tsr_quit_leave_tf 5579 00004B50 7505 jnz @F 5580 00004B52 8026[E10C]FE clropt [reg_efl], 100h ; clear TF 5581 @@: 5582 5583 00004B57 E8EDF4 call entry_to_code_seg 5584 00004B5A [177A] dw .proceedtsrcode 5585 5586 5587 usesection lDEBUG_CODE 5588 5589 code_insure_low_byte_not_0CCh 5590 .proceedtsrcode: 5591 %if _DEBUG 5592 ; avoid hooking interrupts again: 5593 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 5594 ; (SMC in section lDEBUG_CODE) 5595 %endif 5596 00007A17 E931CC jmp run ; run this 5597 5598 5599 usesection lDEBUG_DATA_ENTRY 5600 5601 align 2, db 0 5602 ; (Update: Explicitly clears TF now, except if the 5603 ; option opt3_tsr_quit_leave_tf is set. See above.) 5604 ; 5605 ; Note that since we are in control of debuggee's TF and 5606 ; reset it every time the debugger is entered, this code 5607 ; will not be entered with TF set. It might be entered 5608 ; with IF set and an interrupt might occur; the only harm 5609 ; done then is that the interrupt handler has less stack 5610 ; available. All flags must be preserved by this code. 5611 qq.tsrfreecode: 5612 00004B5C CC int3 ; breakpoint for QB mode, 1 byte 5613 00004B5D C70601000000 mov word [1], 0 ; free the MCB 5614 00004B63 1F pop ds ; restore debuggee's ds 5615 00004B64 CA0C00 retf ((qq.tsrfreecode_size+1)&~1) ; jump 5616 qq.tsrfreecode_size: equ $-qq.tsrfreecode 5617 5618 5619 usesection lDEBUG_CODE 5620 5621 ; INP: ax => PSP segment to set as parent 5622 ; ss:dx -> entrypoint to set as PRA 5623 qqlate.setparent: 5624 00007A1A A31600 mov word [16h], ax 5625 00007A1D 89160A00 mov word [0Ah], dx 5626 00007A21 8C160C00 mov word [0Ah+2], ss 5627 00007A25 C3 retn 5628 %endif 5629 5630 5631 usesection lDEBUG_CODE 5632 5633 %if _BOOTLDR 5634 qqlate.bootterminate: 5635 00007A26 812E[B40C]BE00 sub word [reg_esp], 2*8+4+((qq.bootfreecode_size+1)&~1) 5636 00007A2C 8B3E[B40C] mov di, word [reg_esp] ; -> stack frame 5637 00007A30 8E06[CC0C] mov es, word [reg_ss] 5638 00007A34 A1[C40C] mov ax, word [reg_ds] 5639 00007A37 AB stosw 5640 00007A38 A1[C80C] mov ax, word [reg_es] 5641 00007A3B AB stosw 5642 00007A3C A1[BC0C] mov ax, word [reg_esi] 5643 00007A3F AB stosw 5644 00007A40 A1[C00C] mov ax, word [reg_edi] 5645 00007A43 AB stosw 5646 00007A44 A1[A40C] mov ax, word [reg_eax] 5647 00007A47 AB stosw 5648 00007A48 A1[AC0C] mov ax, word [reg_ecx] 5649 00007A4B AB stosw 5650 00007A4C A1[A80C] mov ax, word [reg_ebx] 5651 00007A4F AB stosw 5652 00007A50 A1[B00C] mov ax, word [reg_edx] 5653 00007A53 AB stosw 5654 00007A54 A1[DC0C] mov ax, word [reg_eip] 5655 00007A57 AB stosw 5656 00007A58 A1[D00C] mov ax, word [reg_cs] 5657 00007A5B AB stosw ; debuggee's cs:ip 5658 00007A5C 06 push es 5659 00007A5D 57 push di 5660 00007A5E 1E push ds 5661 00007A5F 0E push cs 5662 00007A60 1F pop ds ; => lDEBUG_CODE 5663 00007A61 BE[D47A] mov si, qq.bootfreecode 5664 00007A64 B95500 mov cx, ((qq.bootfreecode_size+1)>>1) 5665 00007A67 F3A5 rep movsw ; code on stack 5666 00007A69 1F pop ds 5667 5668 00007A6A 16 push ss 5669 00007A6B 07 pop es 5670 5671 00007A6C A1[D25A] mov ax, word [ boot_new_memsizekib ] 5672 00007A6F B106 mov cl, 6 5673 00007A71 D3E0 shl ax, cl ; ax => source of EBDA (new position) 5674 00007A73 8B16[D45A] mov dx, word [ boot_old_memsizekib ] 5675 00007A77 D3E2 shl dx, cl ; dx => destination of EBDA (old position) 5676 00007A79 31C9 xor cx, cx ; size of EBDA to move (if none) 5677 00007A7B 1E push ds 5678 00007A7C 8ED9 mov ds, cx 5679 00007A7E 8B1E0E04 mov bx, word [40Eh] ; new ref in word [0:40Eh] (if none) 5680 00007A82 1F pop ds 5681 00007A83 803E[D65A]00 cmp byte [ boot_ebdaflag ], 0 ; any EBDA ? 5682 00007A88 7412 jz .noebda 5683 5684 00007A8A 1E push ds 5685 00007A8B 8ED8 mov ds, ax ; => EBDA 5686 00007A8D 31DB xor bx, bx 5687 00007A8F 8A1E0000 mov bl, byte [ 0 ] ; EBDA size in KiB 5688 00007A93 B106 mov cl, 6 5689 00007A95 D3E3 shl bx, cl ; *64, to paragraphs 5690 00007A97 89D9 mov cx, bx ; = size of EBDA to move (in paragraphs) 5691 00007A99 89D3 mov bx, dx ; = new EBDA reference to put in word [0:40Eh] 5692 00007A9B 1F pop ds 5693 5694 .noebda: 5695 00007A9C A3[A40C] mov word [reg_eax], ax ; => relocated (new) EBDA position 5696 ; (in front of debugger image) 5697 00007A9F 891E[A80C] mov word [reg_ebx], bx ; = what to put in word [0:40Eh], 5698 ; unchanged content of that word if no EBDA 5699 00007AA3 890E[AC0C] mov word [reg_ecx], cx ; = EBDA size, 0 if no EBDA 5700 00007AA7 8916[B00C] mov word [reg_edx], dx ; = original (old) EBDA position 5701 ; = original mem size (in paras) 5702 ; (behind/in debugger image) 5703 00007AAB C706[C40C]0000 mov word [reg_ds], 0 5704 5705 00007AB1 8F06[DC0C] pop word [reg_eip] 5706 00007AB5 8F06[D00C] pop word [reg_cs] ; -> code on stack 5707 00007AB9 F606[D84A]01 testopt [qq_mode], qqmode_b 5708 ; QB mode ? 5709 00007ABE 7504 jnz @F ; yes, leave pointing cs:ip at int3 5710 00007AC0 FF06[DC0C] inc word [reg_eip] ; point cs:ip past the int3 5711 @@: 5712 00007AC4 F606[AB00]80 testopt [options3], opt3_tsr_quit_leave_tf 5713 00007AC9 7505 jnz @F 5714 00007ACB 8026[E10C]FE clropt [reg_efl], 100h ; clear TF 5715 @@: 5716 ; call dumpregs 5717 %if _DEBUG 5718 ; avoid hooking interrupts again: 5719 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 5720 ; (SMC in section lDEBUG_CODE) 5721 %endif 5722 ; jmp cmd3 5723 00007AD0 E978CB jmp run ; run this 5724 5725 5726 00007AD3 00 align 2, db 0 5727 qq.bootfreecode: 5728 00007AD4 CC int3 ; breakpoint for QB mode, 1 byte 5729 00007AD5 9C pushf 5730 00007AD6 E81800 call movp ; move EBDA back (if any) 5731 00007AD9 891E0E04 mov word [40Eh], bx ; back relocate EBDA (if any) 5732 00007ADD B106 mov cl, 6 5733 00007ADF D3EA shr dx, cl ; = to KiB 5734 00007AE1 89161304 mov word [413h], dx ; back relocate mem size 5735 00007AE5 9D popf 5736 00007AE6 1F pop ds 5737 00007AE7 07 pop es 5738 00007AE8 5E pop si 5739 00007AE9 5F pop di 5740 00007AEA 58 pop ax 5741 00007AEB 59 pop cx 5742 00007AEC 5B pop bx 5743 00007AED 5A pop dx 5744 00007AEE CAAA00 retf ((qq.bootfreecode_size+1)&~1) 5745 5746 5747 ; Move paragraphs 5748 ; 5749 ; INP: ax:0-> source 5750 ; dx:0-> destination 5751 ; cx = number of paragraphs 5752 ; CHG: - 5753 ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 5754 ; Do not provide a wrapped/HMA source or destination! 5755 movp: section_of_function 5756 00007AF1 51 push cx 5757 00007AF2 1E push ds 5758 00007AF3 56 push si 5759 00007AF4 06 push es 5760 00007AF5 57 push di 5761 5762 00007AF6 39D0 cmp ax, dx ; source above destination ? 5763 00007AF8 770A ja .up ; yes, move up (forwards) --> 5764 00007AFA 747B je .return ; same, no need to move --> 5765 00007AFC 50 push ax 5766 00007AFD 01C8 add ax, cx ; (expected not to carry) 5767 00007AFF 39D0 cmp ax, dx ; end of source is above destination ? 5768 00007B01 58 pop ax 5769 00007B02 7730 ja .down ; yes, move from top down --> 5770 ; Here, the end of source is below-or-equal the destination, 5771 ; so they do not overlap. In this case we prefer moving up. 5772 5773 .up: 5774 00007B04 50 push ax 5775 00007B05 52 push dx 5776 .uploop: 5777 00007B06 8ED8 mov ds, ax 5778 00007B08 8EC2 mov es, dx 5779 00007B0A 31FF xor di, di 5780 00007B0C 31F6 xor si, si ; -> start of segment 5781 00007B0E 81E90010 sub cx, 1000h ; 64 KiB left ? 5782 00007B12 7610 jbe .uplast ; no --> 5783 00007B14 51 push cx 5784 00007B15 B90080 mov cx, 10000h /2 5785 00007B18 F3A5 rep movsw ; move 64 KiB 5786 00007B1A 59 pop cx 5787 00007B1B 050010 add ax, 1000h 5788 00007B1E 81C20010 add dx, 1000h ; -> next segment 5789 00007B22 EBE2 jmp short .uploop ; proceed for more --> 5790 .uplast: 5791 00007B24 81C10010 add cx, 1000h ; restore counter 5792 00007B28 D1E1 shl cx, 1 5793 00007B2A D1E1 shl cx, 1 5794 00007B2C D1E1 shl cx, 1 ; *8, paragraphs to words 5795 00007B2E F3A5 rep movsw ; move last part 5796 00007B30 5A pop dx 5797 00007B31 58 pop ax 5798 00007B32 EB43 jmp short .return 5799 5800 .down: 5801 00007B34 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 5802 .dnloop: 5803 00007B35 81E90010 sub cx, 1000h ; 64 KiB left ? 5804 00007B39 761A jbe .dnlast ; no --> 5805 00007B3B 50 push ax 5806 00007B3C 52 push dx 5807 00007B3D 01C8 add ax, cx 5808 00007B3F 01CA add dx, cx 5809 00007B41 8ED8 mov ds, ax ; -> 64 KiB not yet moved 5810 00007B43 8EC2 mov es, dx 5811 00007B45 5A pop dx 5812 00007B46 58 pop ax 5813 00007B47 BFFEFF mov di, -2 5814 00007B4A 89FE mov si, di ; moved from last word down 5815 00007B4C 51 push cx 5816 00007B4D B90080 mov cx, 10000h /2 5817 00007B50 F3A5 rep movsw ; move 64 KiB 5818 00007B52 59 pop cx 5819 00007B53 EBE0 jmp short .dnloop ; proceed for more --> 5820 .dnlast: 5821 00007B55 81C10010 add cx, 1000h ; restore counter 5822 00007B59 D1E1 shl cx, 1 5823 00007B5B D1E1 shl cx, 1 5824 00007B5D D1E1 shl cx, 1 ; *8, paragraphs to words 5825 00007B5F 89CF mov di, cx 5826 00007B61 4F dec di 5827 00007B62 D1E7 shl di, 1 ; words to offset, -> last word 5828 00007B64 89FE mov si, di 5829 00007B66 8ED8 mov ds, ax 5830 00007B68 8EC2 mov es, dx ; first segment correct 5831 5832 5833 numdef AMD_ERRATUM_109_WORKAROUND, 1 5834 ; Refer to comment in init.asm init_movp. 5835 5836 %if _AMD_ERRATUM_109_WORKAROUND 5837 00007B6A E308 jcxz @FF 5838 00007B6C 83F914 cmp cx, 20 5839 00007B6F 7703 ja @FF 5840 @@: 5841 00007B71 A5 movsw 5842 00007B72 E2FD loop @B 5843 @@: 5844 %endif 5845 00007B74 F3A5 rep movsw ; move first part 5846 00007B76 FC cld 5847 .return: 5848 00007B77 5F pop di 5849 00007B78 07 pop es 5850 00007B79 5E pop si 5851 00007B7A 1F pop ds 5852 00007B7B 59 pop cx 5853 00007B7C C3 retn 5854 qq.bootfreecode_size: equ $-qq.bootfreecode 5855 %endif 5856 5857 5858 %if (_CATCHINTFAULTCOND && _CATCHINT0D) || (_CATCHINTFAULTCOND && _CATCHINT0C) || _CATCHINT08 || _CATCHINT2D || _PM || 1 ; (serial) 5862 ; INP: ds:si -> IISP entry 5863 ; al = interrupt number 5864 ; dx = interrupt unhook force flag (dif4 high word) 5865 ; bx = interrupt hook status flag (dif4 low word) 5866 ; cx = letters to insert into message 5867 ; bp = number of interrupts already unable to unhook 5868 ; OUT: NC if able to unhook or not currently hooked 5869 ; CY if currently hooked and unable to unhook, 5870 ; error message displayed 5871 ; bp incremented 5872 qq_int_unhook_sim.set_bx_to_dx: 5873 00007B7D 89D3 mov bx, dx 5874 5875 qq_int_unhook_sim: 5876 00007B7F 851E[DC00] test word [internalflags4], bx 5877 00007B83 7413 jz .ret ; (NC) 5878 5879 .need: 5880 00007B85 E8D038 call UnhookInterruptForceSim 5881 ; try unhooking it 5882 00007B88 16 push ss 5883 00007B89 07 pop es 5884 00007B8A 730C jnc .ret 5885 5886 00007B8C 890E[C523] mov word [msg.serial_cannot_unhook.int], cx 5887 00007B90 BA[AA23] mov dx, msg.serial_cannot_unhook.nowarn 5888 00007B93 E81D24 call putsz 5889 00007B96 45 inc bp 5890 00007B97 F9 stc 5891 5892 .ret: 5893 00007B98 C3 retn 5894 %endif 5895 5896 5897 %if (_CATCHINTFAULTCOND && _CATCHINT0D) || (_CATCHINTFAULTCOND && _CATCHINT0C) || _CATCHINT08 || _CATCHINT2D || _PM 5900 ; INP: al = interrupt number 5901 ; ds:si -> IISP entry 5902 ; dx = interrupt unhook force flag (dif4 high word) 5903 ; bx = interrupt hook status flag (dif4 low word) 5904 ; cx = text to insert into error message 5905 ; OUT: CY if is hooked and error unhooking, 5906 ; dx -> error message 5907 ; NC if not hooked now (already wasn't or have unhooked), 5908 ; ZR if was already unhooked 5909 ; NZ if has been unhooked, was hooked 5910 qq_int_unhook_real.set_bx_to_dx: 5911 00007B99 89D3 mov bx, dx 5912 5913 qq_int_unhook_real: 5914 00007B9B 851E[DC00] test word [internalflags4], bx 5915 00007B9F 7419 jz .ret ; --> (NC, ZR) 5916 5917 .need: 5918 00007BA1 E87C38 call UnhookInterruptForce 5919 ; try unhooking it 5920 00007BA4 7309 jnc .unhooked 5921 5922 00007BA6 890E[C523] mov word [msg.serial_cannot_unhook.int], cx 5923 00007BAA BA[AA23] mov dx, msg.serial_cannot_unhook.nowarn 5924 00007BAD F9 stc 5925 00007BAE C3 retn 5926 5927 .unhooked: 5928 00007BAF F7D3 not bx 5929 00007BB1 211E[DC00] and word [internalflags4], bx 5930 00007BB5 E87639 call update_inttab_optional 5931 00007BB8 85E4 test sp, sp ; (NC, NZ) 5932 .ret: 5933 00007BBA C3 retn 5934 %endif 5935 5936 5937 %include "ss.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-2022 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 19 <1> 20 <1> sleepcmd: 21 00007BBB E8F21D <1> call skipcomma 22 00007BBE E8B617 <1> nearcall getdword 23 00007BC1 53 <1> push bx 24 00007BC2 52 <1> push dx 25 00007BC3 E81A1E <1> call skipwh0 26 00007BC6 E8C11D <1> call iseol? 27 00007BC9 7421 <1> je .seconds 28 00007BCB 4E <1> dec si 29 00007BCC BA[3121] <1> mov dx, msg.seconds 30 00007BCF E84E1D <1> call isstring? 31 00007BD2 7414 <1> je .seconds_check_eol 32 00007BD4 BA[3921] <1> mov dx, msg.ticks 33 00007BD7 E8461D <1> call isstring? 34 <1> .error_NZ: 35 00007BDA 7403E97E06 <1> jne error 36 <1> .ticks_check_eol: 37 00007BDF AC <1> lodsb 38 00007BE0 E8BC1D <1> call chkeol 39 <1> 40 00007BE3 B80100 <1> mov ax, 1 41 00007BE6 EB07 <1> jmp .common 42 <1> 43 <1> .seconds_check_eol: 44 00007BE8 AC <1> lodsb 45 00007BE9 E8B31D <1> call chkeol 46 <1> .seconds: 47 00007BEC B81200 <1> mov ax, 18 48 <1> .common: 49 00007BEF 5A <1> pop dx 50 00007BF0 50 <1> push ax 51 00007BF1 F7E2 <1> mul dx ; dx:ax = low word times multiplier 52 00007BF3 89D3 <1> mov bx, dx 53 00007BF5 89C1 <1> mov cx, ax ; bx:cx = low word times multiplier 54 00007BF7 58 <1> pop ax 55 00007BF8 5A <1> pop dx 56 00007BF9 F7E2 <1> mul dx ; dx:ax = high word times multiplier 57 00007BFB 01C3 <1> add bx, ax 58 00007BFD 83D200 <1> adc dx, 0 ; dx:bx:cx = entire result 59 00007C00 75D8 <1> jnz .error_NZ 60 <1> 61 00007C02 85C9 <1> test cx, cx 62 00007C04 7504 <1> jnz @F 63 00007C06 85DB <1> test bx, bx 64 00007C08 745E <1> jz .end 65 <1> @@: 66 <1> 67 00007C0A B84000 <1> mov ax, 40h ; bimodal segment/selector 68 00007C0D 8EC0 <1> mov es, ax 69 <1> .loop_reset: 70 00007C0F 268B166C00 <1> mov dx, word [es:6Ch] 71 <1> .loop: 72 00007C14 263B166C00 <1> cmp dx, word [es:6Ch] 73 00007C19 7520 <1> jne .next 74 00007C1B E857C7 <1> call handle_serial_flags_ctrl_c 75 00007C1E F606[AB00]40 <1> testopt [options3], opt3_check_ctrlc_0bh 76 00007C23 7509 <1> jnz @F ; already called function 0Bh --> 77 00007C25 E84809 <1> call InDOS 78 00007C28 7504 <1> jnz @F 79 00007C2A B40B <1> mov ah, 0Bh 80 <1> doscall ; allow to break with Ctrl-C 1581 00007C2C CD21 <2> int 21h 81 <1> @@: 82 <1> %if _SLEEP_NEW 83 00007C2E 8B3E[5A4C] <1> mov di, word [sleep_repeat_idle] 84 00007C32 47 <1> inc di 85 <1> @@: 86 00007C33 E8BC26 <1> call idle 87 00007C36 4F <1> dec di 88 00007C37 75FA <1> jnz @B 89 <1> %else 90 <1> call idle 91 <1> %endif 92 00007C39 EBD9 <1> jmp .loop 93 <1> 94 <1> .next: 95 <1> %if _SLEEP_NEW 96 00007C3B F7DA <1> neg dx ; minus prior tick 97 00007C3D 2603166C00 <1> add dx, word [es:6Ch] ; new tick - prior tick 98 <1> 99 00007C42 3B16[5E4C] <1> cmp dx, word [sleep_delta_limit] 100 00007C46 7609 <1> jbe @F 101 00007C48 8B16[5E4C] <1> mov dx, word [sleep_delta_limit] 102 00007C4C 85D2 <1> test dx, dx 103 00007C4E 7501 <1> jnz @F 104 00007C50 42 <1> inc dx ; limit 0 would lead to stagnant sleep 105 <1> @@: 106 00007C51 3B16[5C4C] <1> cmp dx, word [sleep_highest_delta] 107 00007C55 7604 <1> jbe @F 108 00007C57 8916[5C4C] <1> mov word [sleep_highest_delta], dx 109 <1> @@: 110 00007C5B 29D1 <1> sub cx, dx 111 00007C5D 83DB00 <1> sbb bx, 0 112 00007C60 7206 <1> jc .end 113 <1> %else 114 <1> sub cx, 1 115 <1> sbb bx, 0 116 <1> %endif 117 00007C62 75AB <1> jnz .loop_reset 118 00007C64 E302 <1> jcxz .end 119 00007C66 EBA7 <1> jmp .loop_reset 120 <1> 121 <1> .end: 122 00007C68 C3 <1> retn 123 <1> 124 <1> 125 <1> ..@sss_access_start: 126 <1> 127 <1> ; S command - search for a string of bytes. 128 <1> sss: 129 00007C69 4E <1> dec si 130 00007C6A 4E <1> dec si ; -> at 'S' 131 00007C6B BA[2B21] <1> mov dx, msg.sleep 132 00007C6E E8AF1C <1> call isstring? ; check for "SLEEP" 133 00007C71 7503E945FF <1> je sleepcmd 134 00007C76 46 <1> inc si ; skip 'S' 135 00007C77 AC <1> lodsb ; load next 136 <1> 137 00007C78 8026[DB00]7F <1> clropt [internalflags3], dif3_sss_is_reverse 138 <1> 139 00007C7D 8B1E[C40C] <1> mov bx, word [reg_ds] ; get search range 140 <1> _386_PM_o32 ; xor ecx, ecx 141 00007C81 31C9 <1> xor cx, cx 142 00007C83 E8160A <1> nearcall getrangeX ; get address range into BX:(E)DX..BX:(E)CX 143 00007C86 E8281D <1> call skipcomm0 144 <1> _386_PM_o32 ; push edx 145 00007C89 52 <1> push dx 146 <1> _386_PM_o32 ; push ecx 147 00007C8A 51 <1> push cx 148 00007C8B 53 <1> push bx 149 <1> 150 00007C8C C606[B20A]00 <1> mov byte [sss_silent_count_used], 0 151 <1> 152 00007C91 BA[721F] <1> mov dx, msg.reverse 153 00007C94 4E <1> dec si 154 00007C95 E8881C <1> call isstring? 155 00007C98 7509 <1> jne @F 156 <1> 157 00007C9A 800E[DB00]80 <1> setopt [internalflags3], dif3_sss_is_reverse 158 00007C9F E83D1D <1> call skipwhite 159 00007CA2 4E <1> dec si 160 <1> @@: 161 <1> 162 00007CA3 BA[2421] <1> mov dx, msg.silent 163 00007CA6 E8771C <1> call isstring? 164 00007CA9 7513 <1> jne @F 165 00007CAB E81B1D <1> call skipequals 166 00007CAE E8C616 <1> nearcall getdword 167 00007CB1 8916[C00B] <1> mov word [sss_silent_count], dx 168 00007CB5 891E[C20B] <1> mov word [sss_silent_count + 2], bx 169 00007CB9 F616[B20A] <1> not byte [sss_silent_count_used] 170 00007CBD 4E <1> dec si 171 <1> @@: 172 <1> 173 00007CBE BA[0A1F] <1> mov dx, msg.range 174 00007CC1 E85C1C <1> call isstring? 175 00007CC4 AC <1> lodsb 176 00007CC5 7513 <1> jne .notrange 177 <1> 178 00007CC7 8B1E[C40C] <1> mov bx, word [reg_ds] ; get search range 179 00007CCB 31C9 <1> xor cx, cx 180 00007CCD E8CC09 <1> nearcall getrangeX ; try to get second range 181 00007CD0 56 <1> push si 182 00007CD1 E8CB1C <1> call chkeol ; and insure end-of-line 183 <1> ; successful if it returned 184 <1> _386_PM_o32 ; mov esi, edx 185 00007CD4 89D6 <1> mov si, dx ; bx:esi-> source string 186 <1> _386_PM_o32 ; sub ecx, edx 187 00007CD6 29D1 <1> sub cx, dx ; ecx = count - 1 188 00007CD8 EB34 <1> jmp short .setesedi 189 <1> 190 <1> .notrange: 191 00007CDA E83F0B <1> nearcall getstr ; get string of bytes 192 00007CDD 56 <1> push si 193 00007CDE 81EF[B40A] <1> sub di, line_out ; di = number of bytes to look for 194 00007CE2 7503E97605 <1> jz error 195 00007CE7 89F9 <1> mov cx, di 196 00007CE9 4F <1> dec di ; minus one 197 00007CEA BE[B40A] <1> mov si, line_out 198 00007CED 57 <1> push di 199 <1> 200 <1> %if _SWHILEBUFFER 201 <1> %if _WHILEBUFFSIZE < 264 202 <1> %error WHILE buffer not large enough for search pattern 203 <1> %endif 204 00007CEE F606[D300]04 <1> testopt [internalflags], tt_while 205 00007CF3 7509 <1> jnz .use_auxbuff 206 00007CF5 BF[F00C] <1> mov di, while_buffer 207 00007CF8 57 <1> push di 208 00007CF9 F3A4 <1> rep movsb 209 00007CFB 5E <1> pop si 210 <1> _386_PM movzx esi, si 211 00007CFC EB0D <1> jmp .use_whilebuffer 212 <1> 213 <1> .use_auxbuff: 214 <1> %endif 215 00007CFE E8B889 <1> call guard_auxbuff 216 00007D01 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] 217 00007D05 31FF <1> xor di, di 218 00007D07 F3A4 <1> rep movsb ; move to auxbuff 219 <1> _386_PM_o32 ; xor esi, esi 220 00007D09 31F6 <1> xor si, si 221 <1> .use_whilebuffer: 222 00007D0B 8CC3 <1> mov bx, es ; bx:esi -> auxbuff 223 00007D0D 59 <1> pop cx 224 <1> _386_PM movzx ecx, cx ; ecx = count - 1 225 <1> .setesedi: 226 <1> %if _SCOUNT 227 00007D0E 53 <1> push bx 228 00007D0F E89DE0 <1> call count_store 229 00007D12 5B <1> pop bx 230 <1> %endif 231 00007D13 16 <1> push ss 232 00007D14 07 <1> pop es 233 00007D15 BF[B40B] <1> mov di, search_results 234 00007D18 31C0 <1> xor ax, ax 235 00007D1A A3[F40B] <1> mov word [sscounter], ax 236 00007D1D A3[F60B] <1> mov word [sscounter + 2], ax 237 00007D20 51 <1> push cx 238 <1> %if _PM 239 <1> mov cx, (6 * 16) >> 1 240 <1> %else 241 00007D21 B92000 <1> mov cx, (4 * 16) >> 1 242 <1> %endif 243 00007D24 F3AB <1> rep stosw 244 00007D26 59 <1> pop cx 245 <1> 246 00007D27 E8D807 <1> call prephack ; set up for the interrupt vector hack 247 00007D2A E8FE07 <1> call dohack 248 00007D2D 8EDB <1> mov ds, bx 249 00007D2F 5F <1> pop di ; original si 250 00007D30 07 <1> pop es 251 <1> _386_PM_jmpn .386init ; 386 --> 252 <1> .init: 253 00007D31 5B <1> pop bx 254 00007D32 5A <1> pop dx 255 <1> .init_popped: 256 00007D33 29D3 <1> sub bx, dx ; bx = number of bytes in search range minus one 257 00007D35 29CB <1> sub bx, cx ; = number of possible positions of string minus 1 258 00007D37 7303E93301 <1> jb .error_unhack_di 259 00007D3C 89D7 <1> mov di, dx 260 00007D3E 89CA <1> mov dx, cx 261 00007D40 89D9 <1> mov cx, bx 262 <1> 263 <1> ; ds:si-> search string, length (dx+1) 264 <1> ; es:di-> data to search in, (cx+1) bytes 265 00007D42 36F606[DB00]80 <1> testopt [ss:internalflags3], dif3_sss_is_reverse 266 00007D48 7516 <1> jnz .reverse 267 <1> .loop: 268 00007D4A 0C01 <1> or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 269 00007D4C 56 <1> push si 270 00007D4D AC <1> lodsb ; first character in al 271 00007D4E F2AE <1> repne scasb ; look for first byte 272 00007D50 7408 <1> je .foundbyte 273 00007D52 AE <1> scasb ; count in cx was cnt-1 274 00007D53 7536 <1> jne .done 275 <1> .found_last_byte: 276 00007D55 E85600 <1> call .handle_found_byte 277 00007D58 EB31 <1> jmp .done 278 <1> 279 <1> .foundbyte: 280 00007D5A E85100 <1> call .handle_found_byte 281 00007D5D 5E <1> pop si 282 00007D5E EBEA <1> jmp .loop ; cx = 0 if one to search, 283 <1> ; cx = 1 if two to search, etc 284 <1> 285 <1> .reverse: 286 00007D60 01CF <1> add di, cx ; -> last position to check 287 <1> .reverseloop: 288 00007D62 0C01 <1> or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 289 00007D64 56 <1> push si 290 00007D65 AC <1> lodsb ; first character in al 291 00007D66 FD <1> std ; no AMD erratum workaround needed 292 00007D67 F2AE <1> repne scasb ; look for first byte 293 00007D69 7411 <1> je .reversefoundbyte 294 00007D6B AE <1> scasb ; count in cx was cnt-1 295 00007D6C 751D <1> jne .done 296 <1> .reversefound_last_byte: 297 00007D6E FC <1> cld 298 00007D6F 83C702 <1> add di, 2 299 00007D72 38C0 <1> cmp al, al ; ZR for case if dx = 0 300 00007D74 E83700 <1> call .handle_found_byte 301 00007D77 83EF02 <1> sub di, 2 302 00007D7A EB0F <1> jmp .done 303 <1> 304 <1> .reversefoundbyte: 305 00007D7C FC <1> cld 306 00007D7D 83C702 <1> add di, 2 307 00007D80 38C0 <1> cmp al, al ; ZR for case if dx = 0 308 00007D82 E82900 <1> call .handle_found_byte 309 00007D85 83EF02 <1> sub di, 2 310 00007D88 5E <1> pop si 311 00007D89 EBD7 <1> jmp .reverseloop ; cx = 0 if one to search, 312 <1> ; cx = 1 if two to search, etc 313 <1> 314 <1> .done: 315 00007D8B 5E <1> pop si ; discard 316 <1> .commondone: 317 00007D8C FC <1> cld 318 00007D8D 16 <1> push ss 319 00007D8E 1F <1> pop ds 320 00007D8F E8AD07 <1> call unhack 321 00007D92 BF[B40A] <1> mov di, line_out 322 <1> 323 00007D95 A1[F60B] <1> mov ax, word [sscounter + 2] 324 00007D98 85C0 <1> test ax, ax 325 00007D9A 7403 <1> jz .nohighcounter 326 00007D9C E8EB1C <1> call hexword 327 <1> .nohighcounter: 328 <1> 329 00007D9F A1[F40B] <1> mov ax, word [sscounter] 330 00007DA2 E8E51C <1> call hexword 331 00007DA5 E81F1D <1> call putsline 332 00007DA8 BA[BE3F] <1> mov dx, msg.matches 333 00007DAB E90522 <1> jmp putsz 334 <1> 335 <1> 336 <1> ; INP: ZR 337 <1> .handle_found_byte: 338 00007DAE 51 <1> push cx 339 00007DAF 57 <1> push di 340 00007DB0 89D1 <1> mov cx, dx 341 00007DB2 F3A6 <1> repe cmpsb ; compare string behind first byte 342 <1> ; If we're searching for a single-byte value then 343 <1> ; dx is equal to zero here. In that case cx gets 344 <1> ; the value zero and then repe cmpsb does not 345 <1> ; alter ZF, meaning it will stay ZR (as noted for 346 <1> ; the comment INP section). 347 00007DB4 5F <1> pop di 348 00007DB5 7402 <1> je .display ; if equal 349 <1> .next: 350 00007DB7 59 <1> pop cx 351 00007DB8 C3 <1> retn 352 <1> 353 <1> .display: 354 00007DB9 8CC3 <1> mov bx, es 355 00007DBB 57 <1> push di 356 00007DBC 1E <1> push ds 357 00007DBD 06 <1> push es 358 00007DBE 16 <1> push ss 359 00007DBF 1F <1> pop ds 360 00007DC0 E87C07 <1> call unhack ; undo the interrupt vector hack and restore es 361 00007DC3 57 <1> push di 362 00007DC4 833E[F60B]00 <1> cmp word [sscounter + 2], 0 363 00007DC9 7518 <1> jne @F 364 00007DCB 8B3E[F40B] <1> mov di, word [sscounter] 365 00007DCF 83FF10 <1> cmp di, 16 366 00007DD2 730F <1> jae @F 367 <1> %if _PM 368 <1> add di, di ; * 2 369 <1> mov ax, di 370 <1> add di, di ; * 4 371 <1> add di, ax ; * 4 + * 2 = * 6 372 <1> %else 373 00007DD4 01FF <1> add di, di 374 00007DD6 01FF <1> add di, di ; * 4 375 <1> %endif 376 00007DD8 81C7[B40B] <1> add di, search_results 377 00007DDC 58 <1> pop ax 378 00007DDD 50 <1> push ax 379 00007DDE 48 <1> dec ax 380 00007DDF AB <1> stosw 381 <1> %if _PM 382 <1> xor ax, ax 383 <1> stosw 384 <1> %endif 385 00007DE0 89D8 <1> mov ax, bx 386 00007DE2 AB <1> stosw 387 <1> 388 <1> @@: 389 00007DE3 8306[F40B]01 <1> add word [sscounter], 1 390 00007DE8 8316[F60B]00 <1> adc word [sscounter + 2], 0 391 00007DED D006[B20A] <1> rol byte [sss_silent_count_used], 1 392 00007DF1 7317 <1> jnc @F 393 00007DF3 A1[C00B] <1> mov ax, word [sss_silent_count] 394 00007DF6 0B06[C20B] <1> or ax, word [sss_silent_count + 2] 395 00007DFA 58 <1> pop ax 396 00007DFB 52 <1> push dx 397 00007DFC 7467 <1> jz .nodisplay 398 00007DFE 5A <1> pop dx 399 00007DFF 50 <1> push ax 400 00007E00 832E[C00B]01 <1> sub word [sss_silent_count], 1 401 00007E05 831E[C20B]00 <1> sbb word [sss_silent_count + 2], 0 402 <1> @@: 403 00007E0A 89D8 <1> mov ax, bx 404 00007E0C BF[B40A] <1> mov di, line_out 405 00007E0F E8781C <1> call hexword ; 4 (segment) 406 00007E12 B03A <1> mov al, ':' 407 00007E14 AA <1> stosb ; +1=5 408 00007E15 58 <1> pop ax 409 00007E16 48 <1> dec ax 410 00007E17 E8701C <1> call hexword 411 <1> %if _SDUMP 412 00007E1A F606[A200]80 <1> testopt [options], ss_no_dump 413 00007E1F 7540 <1> jnz .no_dump 414 00007E21 F9 <1> stc 415 00007E22 11D0 <1> adc ax, dx ; -> behind result 416 00007E24 763B <1> jbe .noresult ; end of segment 417 00007E26 89C6 <1> mov si, ax ; cannot be zero 418 <1> 419 <1> %if _SDUMPDISPLACEMENT 420 <1> _386_PM movzx edx, dx 421 00007E28 E84E00 <1> call sss_calculate_displacement 422 <1> 423 00007E2B 89FB <1> mov bx, di 424 00007E2D 01C3 <1> add bx, ax 425 00007E2F 01C3 <1> add bx, ax 426 00007E31 01C3 <1> add bx, ax 427 <1> %else 428 <1> mov ax, 32<<8|32 429 <1> stosw 430 <1> lea bx, [di+3*16] 431 <1> %endif 432 <1> 433 00007E33 89F1 <1> mov cx, si ; cannot be zero 434 00007E35 F7D9 <1> neg cx ; cannot be zero 435 <1> %if _SDUMPDISPLACEMENT 436 00007E37 39C1 <1> cmp cx, ax 437 <1> %else 438 <1> cmp cx, byte 16 439 <1> %endif 440 00007E39 7602 <1> jbe .cxdone 441 <1> %if _SDUMPDISPLACEMENT 442 00007E3B 89C1 <1> mov cx, ax 443 <1> %else 444 <1> mov cx, 16 445 <1> %endif 446 <1> .cxdone: ; cx cannot be zero 447 00007E3D 1F <1> pop ds 448 00007E3E 1E <1> push ds ; restore search's segment 449 <1> %if _SDUMPDISPLACEMENT 450 00007E3F 50 <1> push ax 451 <1> %endif 452 00007E40 51 <1> push cx 453 <1> .disploop: 454 00007E41 AC <1> lodsb 455 00007E42 E8AB99 <1> call dd_store 456 00007E45 B020 <1> mov al, 32 457 00007E47 AA <1> stosb 458 00007E48 E2F7 <1> loop .disploop 459 00007E4A 59 <1> pop cx 460 <1> %if _SDUMPDISPLACEMENT 461 00007E4B 58 <1> pop ax 462 <1> %endif 463 00007E4C 16 <1> push ss 464 00007E4D 1F <1> pop ds 465 00007E4E F7D9 <1> neg cx 466 <1> %if _SDUMPDISPLACEMENT 467 00007E50 01C1 <1> add cx, ax 468 <1> %else 469 <1> add cx, byte 16 470 <1> %endif 471 00007E52 7407 <1> jz .noblanks 472 <1> .loopblanks: 473 00007E54 B82020 <1> mov ax, 32<<8|32 474 00007E57 AB <1> stosw 475 00007E58 AA <1> stosb 476 00007E59 E2F9 <1> loop .loopblanks 477 <1> .noblanks: 478 00007E5B C645E72D <1> mov byte [di-(1+(8*3))], '-' 479 00007E5F 89DF <1> mov di, bx 480 <1> .noresult: 481 <1> .no_dump: 482 <1> %endif ; _SDUMP 483 00007E61 52 <1> push dx 484 00007E62 E85E1C <1> call putsline_crlf 485 <1> .nodisplay: 486 00007E65 E8C306 <1> call dohack 487 00007E68 5A <1> pop dx 488 00007E69 07 <1> pop es 489 00007E6A 1F <1> pop ds 490 00007E6B 5F <1> pop di 491 00007E6C E948FF <1> jmp .next 492 <1> 493 <1> 494 <1> .error_unhack_di: 495 00007E6F 16 <1> push ss 496 00007E70 1F <1> pop ds 497 00007E71 E8CB06 <1> call unhack 498 00007E74 89FE <1> mov si, di 499 00007E76 E9E403 <1> jmp error 500 <1> 501 <1> 502 <1> %if _PM 503 <1> subcpu 386 504 <1> 505 <1> .386init: 506 <1> pop ebx 507 <1> pop edx 508 <1> call ispm 509 <1> jnz .init_popped ; not PM --> 510 <1> sub ebx, edx ; ebx = number of bytes in search range minus one 511 <1> sub ebx, ecx ; = number of possible positions of string minus 1 512 <1> jb .error_unhack_di 513 <1> mov edi, edx 514 <1> mov edx, ecx 515 <1> mov ecx, ebx 516 <1> 517 <1> ; ds:esi-> search string, length (edx+1) 518 <1> ; es:edi-> data to search in, (ecx+1) bytes 519 <1> ; Although 386+ RM still uses 64 KiB segments, it allows 520 <1> ; us to use the 32-bit addressing variant of the string 521 <1> ; instructions as long as we never access any byte above 522 <1> ; the 64 KiB limit. (Even if the index register contains 523 <1> ; 00010000h after an instruction executed.) 524 <1> testopt [ss:internalflags3], dif3_sss_is_reverse 525 <1> jnz .386reverse 526 <1> .386loop: 527 <1> or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 528 <1> push esi 529 <1> a32 lodsb ; first character in al 530 <1> a32 repne scasb ; look for first byte 531 <1> je .386foundbyte 532 <1> a32 scasb ; count in ecx was cnt-1 533 <1> jne .386done 534 <1> .386found_last_byte: 535 <1> call .386handle_found_byte 536 <1> jmp .386done 537 <1> 538 <1> .386foundbyte: 539 <1> call .386handle_found_byte 540 <1> pop esi 541 <1> jmp .386loop ; ecx = 0 if one to search, 542 <1> ; ecx = 1 if two to search, etc 543 <1> 544 <1> .386reverse: 545 <1> add edi, ecx ; -> last position to check 546 <1> .386reverseloop: 547 <1> or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 548 <1> push esi 549 <1> a32 lodsb ; first character in al 550 <1> std ; no AMD erratum workaround needed 551 <1> a32 repne scasb ; look for first byte 552 <1> je .386reversefoundbyte 553 <1> a32 scasb ; count in ecx was cnt-1 554 <1> jne .386done 555 <1> .386reversefound_last_byte: 556 <1> cld 557 <1> add edi, 2 558 <1> cmp al, al ; ZR for case if edx = 0 559 <1> call .386handle_found_byte 560 <1> sub edi, 2 561 <1> jmp .386done 562 <1> 563 <1> .386reversefoundbyte: 564 <1> cld 565 <1> add edi, 2 566 <1> cmp al, al ; ZR for case if edx = 0 567 <1> call .386handle_found_byte 568 <1> sub edi, 2 569 <1> pop esi 570 <1> jmp .386reverseloop ; ecx = 0 if one to search, 571 <1> ; ecx = 1 if two to search, etc 572 <1> 573 <1> .386done: 574 <1> pop esi ; discard 575 <1> jmp .commondone 576 <1> 577 <1> 578 <1> ; INP: ZR 579 <1> .386handle_found_byte: 580 <1> push ecx 581 <1> push edi 582 <1> mov ecx, edx 583 <1> a32 repe cmpsb ; compare string behind first byte 584 <1> ; If we're searching for a single-byte value then 585 <1> ; edx is equal to zero here. In that case ecx gets 586 <1> ; the value zero and then a32 repe cmpsb does not 587 <1> ; alter ZF, meaning it will stay ZR (as noted for 588 <1> ; the comment INP section). 589 <1> pop edi 590 <1> je .386display ; if equal 591 <1> .386next: 592 <1> pop ecx 593 <1> retn 594 <1> 595 <1> .386display: 596 <1> mov bx, es 597 <1> push edi 598 <1> push ds 599 <1> push es 600 <1> push ss 601 <1> pop ds 602 <1> call unhack ; undo the interrupt vector hack and restore es 603 <1> push edi 604 <1> mov edi, dword [sscounter] 605 <1> cmp edi, 16 606 <1> jae @F 607 <1> add di, di ; * 2 608 <1> mov ax, di 609 <1> add di, di ; * 4 610 <1> add di, ax ; * 4 + * 2 = * 6 611 <1> add di, search_results 612 <1> pop eax 613 <1> push eax 614 <1> dec eax 615 <1> stosd 616 <1> mov ax, bx 617 <1> stosw 618 <1> 619 <1> @@: 620 <1> inc dword [sscounter] 621 <1> rol byte [sss_silent_count_used], 1 622 <1> jnc @F 623 <1> cmp dword [sss_silent_count], 0 624 <1> pop eax 625 <1> push dx 626 <1> je .386nodisplay 627 <1> pop dx 628 <1> push eax 629 <1> sub word [sss_silent_count], 1 630 <1> sbb word [sss_silent_count + 2], 0 631 <1> @@: 632 <1> mov ax, bx 633 <1> mov di, line_out 634 <1> call hexword ; 4 (segment) 635 <1> mov al, ':' 636 <1> stosb ; +1=5 637 <1> pop eax 638 <1> dec eax 639 <1> call test_high_limit 640 <1> jz .noa32 641 <1> call hexword_high 642 <1> .noa32: 643 <1> call hexword 644 <1> %if _SDUMP 645 <1> testopt [options], ss_no_dump 646 <1> jnz .386_no_dump 647 <1> stc 648 <1> adc eax, edx ; -> behind result 649 <1> jbe .386noresult ; end of segment 650 <1> mov esi, eax 651 <1> ; esi is at most 10000h in a 64 KiB segment. 652 <1> ; The jcxz at .386cxdone will branch if si = 0, 653 <1> ; which is only possible if esi = 10000h. 654 <1> ; esi is never zero here. 655 <1> 656 <1> %if _SDUMPDISPLACEMENT 657 <1> call sss_calculate_displacement 658 <1> %else 659 <1> mov ax, 32<<8|32 660 <1> stosw 661 <1> %endif 662 <1> 663 <1> pop bx ; get search selector 664 <1> push bx 665 <1> call test_high_limit 666 <1> jnz .386_high_limit 667 <1> 668 <1> .386_low_limit: 669 <1> mov cx, si ; 0 if at end of 64 KiB limit, else nonzero 670 <1> neg cx ; 0 if at end of 64 KiB limit, else nonzero 671 <1> %if _SDUMPDISPLACEMENT 672 <1> cmp cx, ax 673 <1> %else 674 <1> cmp cx, byte 16 ; below or equal maximum dump length ? 675 <1> %endif 676 <1> jmp @F 677 <1> 678 <1> .386_high_limit: 679 <1> mov ecx, esi ; cannot be 0 680 <1> neg ecx ; cannot be 0 681 <1> %if _SDUMPDISPLACEMENT 682 <1> movzx eax, ax 683 <1> cmp ecx, eax 684 <1> %else 685 <1> cmp ecx, byte 16 ; below or equal maximum dump length ? 686 <1> %endif 687 <1> @@: 688 <1> jbe .386cxdone ; (e)cx <= maximum dump length, use cx 689 <1> %if _SDUMPDISPLACEMENT 690 <1> mov cx, ax 691 <1> %else 692 <1> mov cx, 16 ; reset cx (ecxh is not used) 693 <1> %endif 694 <1> .386cxdone: 695 <1> jcxz .386noresult ; if at end of 64 KiB limit --> 696 <1> ; (The displacement is already written here. Oh well.) 697 <1> %if _SDUMPDISPLACEMENT 698 <1> mov bx, di 699 <1> add bx, ax 700 <1> add bx, ax 701 <1> add bx, ax 702 <1> %else 703 <1> lea bx, [di+3*16] 704 <1> %endif 705 <1> pop ds 706 <1> push ds ; restore search's segment 707 <1> %if _SDUMPDISPLACEMENT 708 <1> push ax 709 <1> %endif 710 <1> push cx 711 <1> .386disploop: 712 <1> a32 lodsb 713 <1> call dd_store 714 <1> mov al, 32 715 <1> stosb 716 <1> loop .386disploop 717 <1> pop cx 718 <1> %if _SDUMPDISPLACEMENT 719 <1> pop ax 720 <1> %endif 721 <1> push ss 722 <1> pop ds 723 <1> neg cx 724 <1> %if _SDUMPDISPLACEMENT 725 <1> add cx, ax 726 <1> %else 727 <1> add cx, byte 16 728 <1> %endif 729 <1> jz .386noblanks 730 <1> .386loopblanks: 731 <1> mov ax, 32<<8|32 732 <1> stosw 733 <1> stosb 734 <1> loop .386loopblanks 735 <1> .386noblanks: 736 <1> mov byte [di-(1+(8*3))], '-' 737 <1> mov di, bx 738 <1> .386noresult: 739 <1> .386_no_dump: 740 <1> %endif ; _SDUMP 741 <1> push dx 742 <1> call putsline_crlf 743 <1> .386nodisplay: 744 <1> call dohack 745 <1> pop dx 746 <1> pop es 747 <1> pop ds 748 <1> pop edi 749 <1> jmp .386next 750 <1> 751 <1> subcpureset 752 <1> %endif ; _PM 753 <1> 754 <1> 755 <1> %if _SDUMPDISPLACEMENT 756 <1> 757 <1> ; INP: (e)dx = length of pattern - 1 758 <1> ; es:di -> where to write, within line_out 759 <1> ; di <= line_out + 13 760 <1> ; di >= line_out + 9 761 <1> ; OUT: bx = table offset 762 <1> ; ax = how many bytes to dump (13 .. 16) 763 <1> ; CHG: - 764 <1> sss_calculate_displacement: 765 <1> 766 00007E79 31DB <1> xor bx, bx 767 <1> _386_PM_o32 768 00007E7B 42 <1> inc dx ; = pattern length (can overflow) 769 <1> _386_PM mov bl, 6 ; dword needed 770 <1> _386_PM test edx, 0FF00_0000h 771 <1> _386_PM jnz @F 772 <1> _386_PM mov bl, 4 ; 3byte needed 773 <1> _386_PM test edx, 0FF_0000h 774 <1> _386_PM jnz @F 775 00007E7C B302 <1> mov bl, 2 ; word needed 776 00007E7E 84F6 <1> test dh, dh 777 00007E80 7502 <1> jnz @F 778 00007E82 B300 <1> mov bl, 0 ; byte needed 779 <1> @@: 780 <1> 781 00007E84 B8202B <1> mov ax, " +" 782 00007E87 AB <1> stosw ; common prefix 783 <1> _386_PM_o32 784 00007E88 89D0 <1> mov ax, dx 785 00007E8A FF97[684B] <1> call near [sss_displacement_write_table + bx] 786 <1> ; write displacement number 787 <1> _386_PM_o32 788 00007E8E 4A <1> dec dx ; restore 789 <1> 790 00007E8F B82020 <1> mov ax, 32 | 32 << 8 791 00007E92 AB <1> stosw ; write blanks 792 00007E93 89F8 <1> mov ax, di 793 00007E95 2D[B40A] <1> sub ax, line_out ; = length written so far (<= 25, >= 15) 794 00007E98 F7D8 <1> neg ax ; minus length written so far (>= -25, <= -15) 795 00007E9A 83C04F <1> add ax, 79 ; 79 minus length written so far 796 <1> ; = how many columns remaining (>= 54, <= 64) 797 00007E9D D1E8 <1> shr ax, 1 798 00007E9F D1E8 <1> shr ax, 1 ; divide by 4 (>= 13, <= 16) 799 <1> ; = how many bytes can be dumped 800 00007EA1 C3 <1> retn 801 <1> 802 <1> 803 <1> usesection lDEBUG_DATA_ENTRY 804 00004B67 00 <1> align 2, db 0 805 <1> sss_displacement_write_table: 806 00004B68 [919A] <1> dw .byte 807 00004B6A [8A9A] <1> dw .word 808 <1> %if _PM && ! _ONLYNON386 809 <1> dw .3byte 810 <1> dw .dword 811 <1> %endif 812 <1> 813 <1> usesection lDEBUG_CODE 814 <1> 815 <1> .byte: equ hexbyte 816 <1> .word: equ hexword 817 <1> %if _PM && ! _ONLYNON386 818 <1> .3byte: 819 <1> subcpu 386 820 <1> ror eax, 16 821 <1> call hexbyte 822 <1> rol eax, 16 823 <1> subcpureset 824 <1> jmp .word 825 <1> .dword: equ hexdword 826 <1> %endif 827 <1> %endif 828 <1> 829 <1> ..@sss_access_end: 5938 5939 5940 usesection lDEBUG_CODE 5941 5942 %if 0 5943 getdebuggeebyte: 5944 push bp 5945 mov bp, sp 5946 sub sp, byte 4 5947 push bx 5948 push cx 5949 %define _dedata -4 5950 %define _bp 0 5951 %define _ip 2 5952 %define _adroffset 4 5953 %define _adrsegment 8 5954 test byte [], memorydump 5955 jz .realmemory 5956 5957 jmp short .return 5958 .realmemory32: 5959 .realmemory: 5960 mov ax, word [ bp + _adrsegment ] 5961 mov bx, word [ bp + _adroffset ] 5962 push ds 5963 mov ds, ax 5964 push word [ bx ] 5965 pop word [ bp + _dedata ] 5966 push word [ bx +2 ] 5967 pop word [ bp + _dedata +2 ] 5968 pop ds 5969 ; test ax, ax 5970 ; jnz .return 5971 mov dx, ax 5972 mov cl, 4 5973 shl ax, cl 5974 mov cl, 12 5975 shr dx, cl 5976 add ax, bx 5977 adc dx, byte 0 5978 jnz .return 5979 sub ax, 23h*4 5980 jb .return 5981 cmp ax, 2*4 5982 jae .return 5983 5984 push ds 5985 xor bx, bx 5986 mov ds, bx 5987 push si 5988 push di 5989 mov si, 22h*4 5990 mov di, hackints.dummy22 5991 movsw 5992 movsw 5993 mov bl, 8 5994 add si, bx 5995 add di, bx 5996 movsw 5997 movsw 5998 5999 mov cl, byte [ bx - 4 + hackints2324 ] 6000 mov byte [ bp + _dedata ], cl 6001 .return: 6002 pop cx 6003 pop bx 6004 pop ax 6005 pop dx 6006 pop bp 6007 retn 6 6008 6009 6010 ; Interrupt hack table 6011 ; 6012 ; This contains the Int23 and Int24 handler we want to show 6013 ; the user. As we'll retrieve a dword per access, 6014 align 4, db 0 6015 hackints: 6016 .dummy22: dd 0 6017 .23: dd 0 6018 .24: dd 0 6019 .dummy25: dd 0 6020 %endif 6021 6022 6023 %include "ww.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug W commands (write sector, write program) 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 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 19 <1> 20 <1> lockdrive: 21 00007EA2 50 <1> push ax 22 00007EA3 53 <1> push bx 23 00007EA4 51 <1> push cx 24 00007EA5 52 <1> push dx 25 00007EA6 88C3 <1> mov bl, al 26 00007EA8 FEC3 <1> inc bl 27 00007EAA B700 <1> mov bh, 0 28 00007EAC B94A08 <1> mov cx, 084Ah 29 00007EAF BA0100 <1> mov dx, 0001h 30 00007EB2 B80D44 <1> mov ax, 440Dh 31 00007EB5 CD21 <1> int 21h 32 00007EB7 5A <1> pop dx 33 00007EB8 59 <1> pop cx 34 00007EB9 5B <1> pop bx 35 00007EBA 58 <1> pop ax 36 00007EBB C3 <1> retn 37 <1> 38 <1> unlockdrive: 39 00007EBC 50 <1> push ax 40 00007EBD 53 <1> push bx 41 00007EBE 51 <1> push cx 42 00007EBF 52 <1> push dx 43 00007EC0 88C3 <1> mov bl, al 44 00007EC2 FEC3 <1> inc bl 45 00007EC4 B700 <1> mov bh, 0 46 00007EC6 B96A08 <1> mov cx, 086Ah 47 00007EC9 BA0100 <1> mov dx, 0001h 48 00007ECC B80D44 <1> mov ax, 440Dh 49 00007ECF CD21 <1> int 21h 50 00007ED1 5A <1> pop dx 51 00007ED2 59 <1> pop cx 52 00007ED3 5B <1> pop bx 53 00007ED4 58 <1> pop ax 54 00007ED5 C3 <1> retn 55 <1> 56 <1> 57 <1> ; W command - write a program, or disk sectors, to disk. 58 <1> ww: 59 <1> %if _BOOTLDR 60 <1> %if _APPLICATION || _DEVICE 61 00007ED6 F606[D100]40 <1> testopt [internalflags], nodosloaded 62 00007EDB 7406 <1> jz @F 63 <1> %endif 64 00007EDD BA[D014] <1> mov dx, msg.nobootsupp 65 00007EE0 E9D020 <1> jmp putsz 66 <1> @@: 67 <1> %endif 68 <1> 69 <1> %if _APPLICATION || _DEVICE 70 00007EE3 E8F006 <1> call parselw ; parse L and W argument format 71 00007EE6 746A <1> jz ww4 ; if request to write program 72 <1> %if _PM && _NOEXTENDER 73 <1> call ispm 74 <1> jnz .rm 75 <1> call isextenderavailable 76 <1> jc nodosextinst 77 <1> .rm: 78 <1> %endif 79 00007EE8 36F606[D000]06 <1> testopt [ss:internalflags], newpacket| ntpacket 80 00007EEE 742B <1> jz .oldint 81 00007EF0 88C2 <1> mov dl, al ; A: = 0, ... 82 00007EF2 BE0160 <1> mov si, 6001h ; write, assume "file data" 83 <1> %if _VDD 84 00007EF5 F606[D000]04 <1> testopt [internalflags], ntpacket 85 00007EFA 7512 <1> jnz .vdd 86 <1> %endif 87 00007EFC FEC2 <1> inc dl ; A: = 1, ... 88 00007EFE E8A1FF <1> call lockdrive 89 00007F01 B80573 <1> mov ax, 7305h ; ds:(e)bx-> packet 90 00007F04 F9 <1> stc 91 00007F05 CD21 <1> int 21h ; use int 21h here, not doscall 92 00007F07 9C <1> pushf 93 00007F08 E8B1FF <1> call unlockdrive 94 00007F0B 9D <1> popf 95 00007F0C EB0F <1> jmp short .done 96 <1> %if _VDD 97 <1> .vdd: 98 00007F0E A1[0C0B] <1> mov ax, word [hVdd] 99 00007F11 B90500 <1> mov cx, 5 100 <1> %if _PM 101 <1> add cl, byte [dpmi32] 102 <1> %endif 103 00007F14 C4C4580290 <1> DispatchCall 104 00007F19 EB02 <1> jmp short .done 105 <1> %endif 106 <1> .oldint: 107 00007F1B CD26 <1> int 26h 108 <1> .done: 109 00007F1D BA[4D38] <1> mov dx, writing 110 <1> ww1: 111 00007F20 8CD3 <1> mov bx, ss ; restore segment registers 112 00007F22 8EDB <1> mov ds, bx 113 00007F24 8B26[EC0A] <1> mov sp, word [savesp] 114 00007F28 8EC3 <1> mov es, bx 115 00007F2A 7323 <1> jnc ww3 ; if no error 116 00007F2C 3C0C <1> cmp al, 0Ch 117 00007F2E 7602 <1> jbe ww2 ; if in range 118 00007F30 B00C <1> mov al, 0Ch 119 <1> ww2: 120 00007F32 98 <1> cbw ; ah = 0 121 00007F33 BB[7E37] <1> mov bx, dskerrs ; -> byte table 122 00007F36 D7 <1> xlatb ; get offset from dskerrs 123 00007F37 01D8 <1> add ax, bx ; -> message 124 00007F39 BF[B40A] <1> mov di, line_out 125 00007F3C 89C6 <1> mov si, ax 126 00007F3E E8AA1A <1> call showstring 127 00007F41 89D6 <1> mov si, dx 128 00007F43 E8A51A <1> call showstring 129 00007F46 BE[5338] <1> mov si, drive 130 00007F49 E89F1A <1> call showstring 131 00007F4C E8741B <1> call putsline_crlf 132 <1> ww3: 133 00007F4F E9AE80 <1> jmp cmd3 ; can't return because Int26 leaves stack wrong 134 <1> 135 <1> ; Write to file. First check the file extension. 136 <1> ; size of file is in client's BX:CX, 137 <1> ; default start address is DS:100h 138 <1> 139 <1> ww4: 140 00007F52 E81B06 <1> call InDOS 141 00007F55 7403E949EF <1> jnz not_while_indos 142 <1> 143 00007F5A A0[040C] <1> mov al, byte [fileext] ; get flags of file extension 144 00007F5D F606[B500]04 <1> testopt [options6], opt6_flat_binary 145 00007F62 7509 <1> jnz ww5 146 00007F64 A80C <1> test al, EXT_EXE + EXT_HEX 147 00007F66 7405 <1> jz ww5 ; if not EXE or HEX 148 00007F68 BA[263C] <1> mov dx, nowhexe 149 00007F6B EB07 <1> jmp short ww6 150 <1> 151 <1> ww5: 152 00007F6D 3C00 <1> cmp al, 0 153 00007F6F 7506 <1> jnz ww7 ; if extension exists 154 00007F71 BA[4C3C] <1> mov dx, nownull 155 <1> ww6: 156 00007F74 E9CC00 <1> jmp ww16 157 <1> 158 <1> ; File extension is OK; write it. First, create the file. 159 <1> ww7: 160 <1> %if _PM 161 <1> call ispm 162 <1> jnz ww7_1 163 <1> mov dx, nopmsupp 164 <1> jmp putsz 165 <1> ww7_1: 166 <1> %endif 167 00007F77 BD[B40A] <1> mov bp, line_out 168 00007F7A 80FEFE <1> cmp dh, 0FEh 169 00007F7D 7207 <1> jb ww8 ; if (dx < 0xFE00) 170 00007F7F 80EEFE <1> sub dh, 0FEh ; dx -= 0xFE00; 171 00007F82 81C3E00F <1> add bx, 0FE0h 172 <1> ww8: 173 00007F86 89560A <1> mov word [bp+10], dx ; save lower part of address in line_out+10 174 00007F89 89DE <1> mov si, bx ; upper part goes into si 175 00007F8B B43C <1> mov ah, 3Ch ; create file 176 00007F8D 31C9 <1> xor cx, cx ; no attributes 177 00007F8F BA8000 <1> mov dx, DTA 178 <1> doscall 1581 00007F92 CD21 <2> int 21h 179 00007F94 727C <1> jc ww15 ; if error 180 00007F96 50 <1> push ax ; save file handle 181 <1> 182 <1> ; Print message about writing. 183 00007F97 BA[833C] <1> mov dx, wwmsg1 184 00007F9A E81620 <1> call putsz ; print string 185 00007F9D A1[A80C] <1> mov ax, word [reg_ebx] 186 00007FA0 83F810 <1> cmp ax, 10h 187 00007FA3 7202 <1> jb ww9 ; if not too large 188 00007FA5 31C0 <1> xor ax, ax ; too large: zero it out 189 <1> ww9: 190 00007FA7 894608 <1> mov word [bp+8], ax 191 00007FAA 85C0 <1> test ax, ax 192 00007FAC 7403 <1> jz ww10 193 00007FAE E8EB1A <1> call hexnyb 194 <1> ww10: 195 00007FB1 A1[AC0C] <1> mov ax, word [reg_ecx] 196 00007FB4 894606 <1> mov word [bp+6], ax 197 00007FB7 E8D01A <1> call hexword 198 00007FBA E80A1B <1> call putsline ; print size 199 00007FBD BA[8C3C] <1> mov dx, wwmsg2 200 00007FC0 E8F01F <1> call putsz ; print string 201 <1> 202 <1> ; Now write the file. Size remaining is in line_out+6. 203 00007FC3 5B <1> pop bx ; recover file handle 204 00007FC4 8B560A <1> mov dx, word [bp+10] ; address to write from is si:dx 205 <1> ww11: 206 00007FC7 B800FE <1> mov ax, 0FE00h 207 00007FCA 29D0 <1> sub ax, dx 208 00007FCC 807E0800 <1> cmp byte [bp+8], 0 209 00007FD0 7508 <1> jnz ww12 ; if more than 0FE00h bytes remaining 210 00007FD2 3B4606 <1> cmp ax, word [bp+6] 211 00007FD5 7203 <1> jb ww12 ; ditto 212 00007FD7 8B4606 <1> mov ax, word [bp+6] 213 <1> ww12: 214 00007FDA 91 <1> xchg ax, cx ; mov cx, ax 215 00007FDB 8EDE <1> mov ds, si 216 00007FDD B440 <1> mov ah, 40h ; write to file 217 00007FDF CD21 <1> int 21h ; use INT, not doscall 218 00007FE1 16 <1> push ss ; restore DS 219 00007FE2 1F <1> pop ds 220 00007FE3 39C8 <1> cmp ax, cx 221 00007FE5 7515 <1> jne ww13 ; if disk full 222 00007FE7 31D2 <1> xor dx, dx ; next time write from xxxx:0 223 00007FE9 81C6E00F <1> add si, 0FE0h ; update segment pointer 224 00007FED 294E06 <1> sub word [bp+6], cx 225 00007FF0 9F <1> lahf 226 00007FF1 805E0800 <1> sbb byte [bp+8], 0 227 00007FF5 75D0 <1> jnz ww11 ; if more to go 228 00007FF7 9E <1> sahf 229 00007FF8 75CD <1> jnz ww11 ; ditto 230 00007FFA EB11 <1> jmp short ww14 ; done 231 <1> 232 <1> ww13: 233 00007FFC BA[953C] <1> mov dx, diskful 234 00007FFF E8B11F <1> call putsz ; print string 235 00008002 E80800 <1> call ww14 ; close file 236 <1> 237 00008005 B441 <1> mov ah, 41h ; unlink file 238 00008007 BA8000 <1> mov dx, DTA 239 <1> doscall 1581 0000800A CD21 <2> int 21h 240 0000800C C3 <1> retn 241 <1> 242 <1> ; Close the file. 243 <1> ww14: 244 0000800D B43E <1> mov ah, 3Eh ; close file 245 0000800F CD21 <1> int 21h 246 00008011 C3 <1> retn 247 <1> 248 <1> ; Error opening file. This is also called by the load command. 249 <1> ww15: 250 00008012 83F802 <1> cmp ax, byte 2 251 00008015 BA[BB3C] <1> mov dx, doserr2 ; File not found 252 00008018 7429 <1> je ww16 253 0000801A 83F803 <1> cmp ax, byte 3 254 0000801D BA[CC3C] <1> mov dx, doserr3 ; Path not found 255 00008020 7421 <1> je ww16 256 00008022 83F805 <1> cmp ax, byte 5 257 00008025 BA[DD3C] <1> mov dx, doserr5 ; Access denied 258 00008028 7419 <1> je ww16 259 0000802A 83F808 <1> cmp ax, byte 8 260 0000802D BA[ED3C] <1> mov dx, doserr8 ; Insufficient memory 261 00008030 7411 <1> je ww16 262 00008032 83F80B <1> cmp ax, byte 11 263 00008035 BA[033D] <1> mov dx, doserr11 ; Invalid format 264 00008038 7409 <1> je ww16 265 0000803A BF[A73C] <1> mov di, openerr1 266 0000803D E84A1A <1> call hexword 267 00008040 BA[A13C] <1> mov dx, openerr ; Error ____ opening file 268 <1> ww16: 269 00008043 E96D1F <1> jmp putsz 270 <1> %endif 6024 6025 6026 usesection lDEBUG_CODE 6027 6028 %ifn _EMS 6029 xx: equ error 6030 %else 6031 usesection lDEBUG_DATA_ENTRY 6032 align 2, db 0 6033 00004B6C FFFF xaresult: dw -1 6034 6035 usesection lDEBUG_CODE 6036 6037 ; X commands - manipulate EMS memory. 6038 ; 6039 ; Reference: 6040 ; http://www.nondot.org/sabre/os/files/MemManagement/LIMEMS41.txt 6041 6042 00008046 3C3F xx: cmp al, '?' 6043 00008048 741F je xhelp ; if a call for help 6044 0000804A 0C20 or al, TOLOWER 6045 0000804C 3C61 cmp al, 'a' 6046 0000804E 7423 je xa ; if XA command 6047 00008050 3C64 cmp al, 'd' 6048 00008052 744E je xd ; if XD command 6049 00008054 3C6D cmp al, 'm' 6050 00008056 7503E98600 je xm ; if XM command 6051 0000805B 3C72 cmp al, 'r' 6052 0000805D 7461 je xr ; if XR command 6053 0000805F 3C73 cmp al, 's' 6054 00008061 7503E9B100 je xs ; if XS command 6055 00008066 E9F401 jmp error 6056 6057 00008069 AC xhelp: lodsb 6058 0000806A E83219 call chkeol 6059 0000806D BA[8749] mov dx, msg.xhelp 6060 00008070 E9321F jmp putsz_exthelp ; print string and return 6061 6062 ; XA - Allocate EMS. 6063 00008073 E88A01 xa: call emschk 6064 00008076 E83719 call skipcomma 6065 00008079 E8DD17 nearcall getword ; get argument into DX 6066 0000807C E82019 call chkeol ; expect end of line here 6067 0000807F 89D3 mov bx, dx 6068 6069 00008081 830E[6C4B]FF or word [xaresult], -1 6070 00008086 B8005A mov ax, 5A00h ; use the EMS 4.0 version to alloc 0 pages 6071 00008089 85DB test bx, bx 6072 0000808B 7402 jz short .nullcnt 6073 0000808D B443 mov ah, 43h ; allocate handle 6074 .nullcnt: 6075 0000808F E83F01 call emscall 6076 00008092 92 xchg ax, dx ; mov ax, dx 6077 00008093 A3[6C4B] mov word [xaresult], ax 6078 00008096 BF[0E3E] mov di, xaans1 6079 00008099 E8EE19 call hexword 6080 0000809C BA[FD3D] mov dx, xaans 6081 0000809F E9111F jmp putsz ; print string and return 6082 6083 ; XD - Deallocate EMS handle. 6084 000080A2 E85B01 xd: call emschk 6085 000080A5 E80819 call skipcomma 6086 000080A8 E8AE17 nearcall getword ; get argument into DX 6087 000080AB E8F118 call chkeol ; expect end of line here 6088 6089 000080AE B445 mov ah, 45h ; deallocate handle 6090 000080B0 E81E01 call emscall 6091 000080B3 92 xchg ax, dx ; mov ax,dx 6092 000080B4 BF[1C3E] mov di, xdans1 6093 000080B7 E8D019 call hexword 6094 000080BA BA[153E] mov dx, xdans 6095 000080BD E9F31E jmp putsz ; print string and return 6096 6097 ; XR - Reallocate EMS handle. 6098 000080C0 E83D01 xr: call emschk 6099 000080C3 E8EA18 call skipcomma 6100 000080C6 E89017 nearcall getword ; get handle argument into DX 6101 000080C9 89D3 mov bx, dx 6102 000080CB E8E318 call skipcomm0 6103 000080CE E88817 nearcall getword ; get count argument into DX 6104 000080D1 E8CB18 call chkeol ; expect end of line here 6105 000080D4 87DA xchg bx, dx 6106 6107 000080D6 B451 mov ah, 51h ; reallocate handle 6108 000080D8 E8F600 call emscall 6109 000080DB BA[2F3E] mov dx, xrans 6110 000080DE E9D21E jmp putsz ; print string and return 6111 6112 ; XM - Map EMS memory to physical page. 6113 000080E1 E81C01 xm: call emschk 6114 000080E4 E8C918 call skipcomma 6115 000080E7 E86F17 nearcall getword ; get logical page (FFFFh means unmap) 6116 000080EA 89D3 mov bx, dx ; save it in BX 6117 000080EC E8C218 call skipcomm0 6118 000080EF E87517 nearcall getbyte ; get physical page (DL) 6119 000080F2 52 push dx 6120 000080F3 E8BB18 call skipcomm0 6121 000080F6 E86017 nearcall getword ; get handle into DX 6122 000080F9 E8A318 call chkeol ; expect end of line 6123 000080FC 58 pop ax ; recover physical page into AL 6124 000080FD 50 push ax 6125 000080FE B444 mov ah, 44h ; function 5 - map memory 6126 00008100 E8CE00 call emscall 6127 00008103 BF[513E] mov di, xmans1 6128 00008106 93 xchg ax, bx ; mov ax, bx 6129 00008107 E88019 call hexword 6130 0000810A BF[6E3E] mov di, xmans2 6131 0000810D 58 pop ax 6132 0000810E E88019 call hexbyte 6133 00008111 BA[443E] mov dx, xmans 6134 00008114 E99C1E jmp putsz ; print string and return 6135 6136 ; XS - Print EMS status. 6137 xs: 6138 00008117 E8E600 call emschk 6139 0000811A AC lodsb 6140 0000811B E88118 call chkeol ; no arguments allowed 6141 6142 ; First print out the handles and handle sizes. This can be done either 6143 ; by trying all possible handles or getting a handle table. 6144 ; The latter is preferable, if it fits in memory. 6145 0000811E B44B mov ah, 4Bh ; function 12 - get handle count 6146 00008120 E8AE00 call emscall 6147 00008123 83FB42 cmp bx, (line_out_end-line_out)/4 6148 00008126 762B jbe short xs3 ; if we can do it by getting the table 6149 00008128 31D2 xor dx, dx ; handle 6150 6151 xs1: 6152 ; try EMS 4.0 function 5402h to get total number of handles 6153 0000812A B80254 mov ax, 5402h 6154 0000812D E8CB00 call emscall.witherrors 6155 00008130 89D9 mov cx, bx ; cx = number of handles 6156 00008132 7403 jz @F 6157 6158 00008134 B9FF00 mov cx, 0FFh ; total number of handles (assumed) 6159 ; this does not match the prior code here, 6160 ; which used 100h handles assuming that 6161 ; 0FFh is the last valid handle number. 6162 ; however, if we assume that there are 0FFh 6163 ; valid handles then the last number is 0FEh! 6164 @@: 6165 6166 00008137 B44C mov ah, 4Ch ; function 13 - get handle pages 6167 00008139 E8BF00 call emscall.witherrors 6168 0000813C 750D jnz short .err 6169 0000813E 93 xchg ax, bx ; mov ax,bx 6170 0000813F E8D200 call hndlshow 6171 .cont: 6172 00008142 42 inc dx ; increment handle number to access 6173 00008143 7404 jz @F ; (if 0000h handles, do not loop forever) 6174 00008145 39CA cmp dx, cx ; end of the loop ? 6175 00008147 72E1 jb short xs1 ; if more to be done --> 6176 @@: 6177 00008149 EB1F jmp short xs5 ; done with this part 6178 6179 .err: 6180 0000814B 80FC83 cmp ah, 83h ; no such handle? 6181 0000814E 74F2 je short .cont ; just skip --> 6182 00008150 E98300 jmp emscall.errorhandle ; if other error --> 6183 6184 ; Get the information in tabular form. 6185 xs3: 6186 00008153 B44D mov ah, 4Dh ; function 14 - get all handle pages 6187 00008155 BF[B40A] mov di, line_out 6188 00008158 E87600 call emscall 6189 0000815B 85DB test bx, bx 6190 0000815D 740B jz short xs5 6191 0000815F 89FE mov si, di 6192 xs4: 6193 00008161 AD lodsw 6194 00008162 92 xchg ax, dx 6195 00008163 AD lodsw 6196 00008164 E8AD00 call hndlshow 6197 00008167 4B dec bx 6198 00008168 75F7 jnz short xs4 ; if more to go 6199 6200 xs5: 6201 0000816A BA[E732] mov dx, crlf 6202 0000816D E8431E call putsz ; print string 6203 6204 ; Next print the mappable physical address array. 6205 ; The size of the array shouldn't be a problem. 6206 00008170 B80058 mov ax, 5800h ; function 25 - get mappable phys. address array 6207 00008173 BF[B40A] mov di, line_out ; address to put array 6208 00008176 E85800 call emscall 6209 00008179 BA[F63E] mov dx, xsnopgs 6210 0000817C E328 jcxz xs7 ; NO mappable pages! 6211 6212 0000817E 89FE mov si, di 6213 xs6: 6214 00008180 51 push cx 6215 00008181 AD lodsw 6216 00008182 BF[B23E] mov di, xsstr2b 6217 00008185 E80219 call hexword 6218 00008188 AD lodsw 6219 00008189 BF[A53E] mov di, xsstr2a 6220 0000818C E80219 call hexbyte 6221 0000818F BA[9A3E] mov dx, xsstr2 6222 00008192 E81E1E call putsz ; print string 6223 00008195 59 pop cx ; end of loop 6224 00008196 F6C101 test cl, 1 6225 00008199 7406 jz short xs_nonl 6226 0000819B BA[E732] mov dx, crlf ; blank line 6227 0000819E E8121E call putsz ; print string 6228 xs_nonl: 6229 000081A1 E2DD loop xs6 6230 000081A3 BA[E732] mov dx, crlf ; blank line 6231 xs7: 6232 000081A6 E80A1E call putsz ; print string 6233 6234 ; Finally, print the cumulative totals. 6235 000081A9 B442 mov ah, 42h ; function 3 - get unallocated page count 6236 000081AB E82300 call emscall 6237 000081AE 89D0 mov ax, dx ; total pages available 6238 000081B0 29D8 sub ax, bx ; number of pages allocated 6239 000081B2 BB[EC3E] mov bx, xsstrpg 6240 000081B5 E87300 call sumshow ; print the line 6241 000081B8 B44B mov ah, 4Bh ; function 12 - get handle count 6242 000081BA E81400 call emscall 6243 000081BD 53 push bx ; number of handles allocated 6244 6245 ; try EMS 4.0 function 5402h to get total number of handles 6246 000081BE B80254 mov ax, 5402h 6247 000081C1 E83700 call emscall.witherrors ; don't use emscall, this function may fail! 6248 000081C4 89DA mov dx, bx 6249 000081C6 7403 jz @F 6250 6251 000081C8 BAFF00 mov dx, 0FFh ; total number of handles 6252 @@: 6253 000081CB 58 pop ax ; ax = number of handles allocated 6254 000081CC BB[F03E] mov bx, xsstrhd 6255 000081CF EB5A jmp sumshow ; print the line 6256 6257 ; Call EMS 6258 emscall: 6259 000081D1 E82700 call .witherrors 6260 000081D4 7429 jz short .ret ; return if OK 6261 .errorhandle: 6262 000081D6 88E0 mov al, ah 6263 000081D8 3C8B cmp al, 8Bh 6264 000081DA 7F0D jg short .ce2 ; if out of range (signed comparison intended) 6265 000081DC 98 cbw 6266 000081DD 89C3 mov bx, ax 6267 000081DF D1E3 shl bx, 1 6268 000081E1 8B97[DA3E] mov dx, word [emserrs+100h+bx] 6269 000081E5 85D2 test dx, dx 6270 000081E7 7528 jnz short .ce4 ; if there's a word there 6271 .ce2: 6272 000081E9 BA[F23D] mov dx, emserrx 6273 000081EC E8C41D call putsz 6274 000081EF BF[B40A] mov di, line_out 6275 000081F2 E89C18 call hexbyte 6276 000081F5 E8CB18 call putsline_crlf 6277 000081F8 E9057E jmp cmd3 ; quit 6278 6279 .witherrors: 6280 %if _PM 6281 call ispm 6282 jnz short .rm 6283 subcpu 286 6284 push word [ss:pspdbg] 6285 push 67h 6286 call intcall 6287 db __TEST_IMM16 ; (skip int opcode) 6288 subcpureset 6289 .rm: 6290 %endif 6291 000081FB CD67 int 67h 6292 000081FD 84E4 test ah, ah 6293 .ret: 6294 emschk.ret: 6295 000081FF C3 retn 6296 6297 6298 ; Check for EMS 6299 ; maybe should disable this while bootloaded ? 6300 emschk: 6301 00008200 B067 mov al, 67h 6302 00008202 E86D31 call intchk ; ZR if offset = -1 or segment = 0 6303 ; CHG: ax, dx, bx 6304 00008205 7407 jz .failed 6305 00008207 B446 mov ah, 46h 6306 00008209 E8EFFF call emscall.witherrors ; get version 6307 0000820C 74F1 jz short .ret ; success --> 6308 .failed: 6309 0000820E BA[143D] mov dx, emsnot 6310 emscall.ce4: 6311 00008211 E98383 jmp prnquit ; otherwise abort with message --> 6312 6313 ; HNDLSHOW - Print XS line giving the handle and pages allocated. 6314 ; 6315 ; Entry DX Handle 6316 ; AX Number of pages 6317 ; 6318 ; Exit Line printed 6319 ; 6320 ; Uses ax, di 6321 hndlshow: 6322 00008214 BF[833E] mov di, xsstr1b 6323 00008217 E87018 call hexword 6324 0000821A 89D0 mov ax, dx 6325 0000821C BF[7A3E] mov di, xsstr1a 6326 0000821F E86818 call hexword 6327 00008222 52 push dx 6328 00008223 BA[733E] mov dx, xsstr1 6329 00008226 E88A1D call putsz ; print string 6330 00008229 5A pop dx 6331 0000822A C3 retn 6332 6333 ; SUMSHOW - Print summary line for XS command. 6334 ; 6335 ; Entry AX Number of xxxx's that have been used 6336 ; DX Total number of xxxx's 6337 ; BX Name of xxxx 6338 ; 6339 ; Exit String printed 6340 ; 6341 ; Uses AX, CX, DX, DI 6342 sumshow: 6343 0000822B BF[B93E] mov di, xsstr3 6344 0000822E 57 push di 6345 0000822F E81600 call trimhex 6346 00008232 92 xchg ax, dx ; mov ax,dx 6347 00008233 BF[C93E] mov di, xsstr3a 6348 00008236 E80F00 call trimhex 6349 00008239 5A pop dx ; mov dx,xsstr3 6350 0000823A E8761D call putsz ; print string 6351 0000823D 89DA mov dx, bx 6352 0000823F E8711D call putsz ; print string 6353 00008242 BA[D33E] mov dx, xsstr4 6354 00008245 E96B1D jmp putsz ; print string and return 6355 6356 ; TRIMHEX - Print word without leading zeroes. 6357 ; 6358 ; Entry AX Number to print 6359 ; DI Where to print it 6360 ; 6361 ; Uses AX, CX, DI. 6362 trimhex: 6363 00008248 E83F18 call hexword 6364 0000824B 83EF04 sub di, 4 ; back up DI to start of word 6365 0000824E B90300 mov cx, 3 6366 00008251 B030 mov al, '0' 6367 .loop: 6368 00008253 AE scasb 6369 00008254 7506 jne .done ; return if not a '0' 6370 00008256 C645FF20 mov byte [di-1], ' ' 6371 0000825A E2F7 loop .loop 6372 .done: 6373 0000825C C3 retn 6374 %endif ; _EMS 6375 6376 %if _DUALCODE 6377 usesection lDEBUG_CODE2 6378 error_mirror: 6379 dualcall error 6380 6381 usesection lDEBUG_CODE 6382 %else 6383 error_mirror equ error 6384 %endif 6385 6386 ; Error handlers. 6387 dualfunction 6388 error: section_of_function 6389 0000825D 16 push ss 6390 0000825E 07 pop es 6391 0000825F 16 push ss 6392 00008260 1F pop ds 6393 %if _RH 6394 00008261 8026[E600]CF clropt [internalflags6], dif6_rh_mode_2 | dif6_rh_mode 6395 %endif 6396 00008266 89F1 mov cx, si 6397 00008268 81E9[0300] sub cx, line_in+3 6398 0000826C 81F90001 cmp cx, 256 6399 00008270 7705 ja .invalid 6400 00008272 030E[600B] add cx, word [promptlen]; number of spaces to skip 6401 00008276 A9 db __TEST_IMM16 ; (skip xor) 6402 .invalid: 6403 00008277 31C9 xor cx, cx ; if we're really messed up 6404 00008279 8B26[F60A] mov sp, [throwsp] 6405 0000827D FF26[F40A] jmp near [throwret] 6406 ; INP: cx = number of spaces to indent 6407 6408 ; This is the default address in throwret. 6409 ; Display the error, then jump to errret. 6410 errhandler: 6411 00008281 E8AD27 call get_columns ; ax = columns 6412 .: 6413 00008284 29C1 sub cx, ax 6414 00008286 73FC jnc . 6415 00008288 01C1 add cx, ax 6416 0000828A 7407 jz err2 6417 0000828C B020 mov al, 32 6418 .loop: 6419 0000828E E8441D call putc 6420 00008291 E2FB loop .loop 6421 err2: 6422 00008293 BA[DF32] mov dx, errcarat 6423 00008296 E81A1D call putsz ; print string 6424 00008299 B8FF01 mov ax, 01FFh 6425 0000829C E80A00 call setrc 6426 0000829F C706[020C][F504] mov word [lastcmd], dmycmd 6427 ; cancel command repetition 6428 000082A5 FF26[F20A] jmp near [errret] ; return to the prompt (cmd3, aa01) 6429 6430 6431 setrc: section_of_function 6432 000082A9 833E[660B]00 cmp word [rc], 0 6433 000082AE 7503 jne .ret 6434 000082B0 A3[660B] mov word [rc], ax 6435 .ret: 6436 000082B3 C3 retn 6437 6438 6439 ; Terminate the attached process, if any 6440 ; 6441 ; OUT: NZ if now no process attached 6442 ; ZR if still a process attached, 6443 ; ie we failed to terminate this one 6444 terminate_attached_process: 6445 000082B4 F606[D200]80 testopt [internalflags], attachedterm 6446 000082B9 7537 jnz @F 6447 6448 000082BB 8026[E10C]FC clropt [reg_efl], 300h ; clear TF and IF 6449 000082C0 8C0E[D00C] mov word [reg_cs], cs 6450 000082C4 C706[DC0C][3279] mov word [reg_eip], terminate_00 6451 000082CA 50 push ax ; (dummy to take space for return address) 6452 000082CB 8C16[CC0C] mov word [reg_ss], ss 6453 000082CF 8926[B40C] mov word [reg_esp], sp ; save current ss:sp 6454 000082D3 58 pop ax ; (discard) 6455 000082D4 31C0 xor ax, ax 6456 000082D6 A3[DE0C] mov word [reg_eip+2], ax 6457 000082D9 A3[B60C] mov word [reg_esp+2], ax 6458 000082DC A3[E20C] mov word [reg_efl+2], ax 6459 %if _PM 6460 mov word [reg_es], ax 6461 mov word [reg_ds], ax 6462 mov word [reg_fs], ax 6463 mov word [reg_gs], ax ; insure valid segregs in PM 6464 %endif 6465 000082DF C706[FC0A]8000 mov word [run_sp_reserve], 128 6466 000082E5 E863C3 call run 6467 ; The dummy stack space above is to hold the return address 6468 ; of this call. The debugger stack is used by this run. 6469 000082E8 8326[FC0A]00 and word [run_sp_reserve], 0 6470 6471 %if _SYMBOLIC 6472 nearcall zz_detect_xms 6473 clropt [internalflags2], dif2_createdprocess 6474 %endif 6475 000082ED F606[D200]80 testopt [internalflags], attachedterm 6476 @@: 6477 000082F2 C3 retn 6478 6479 6480 %include "vv.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug code and command (V) to flip video screens 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2022 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> %if _VXCHG 19 <1> 20 <1> ;--- show debuggee screen, wait for a keypress, then restore debugger screen 21 <1> 22 <1> vv: 23 000082F3 4E <1> dec si 24 000082F4 BA[101F] <1> mov dx, msg.on 25 000082F7 E82616 <1> call isstring? 26 000082FA 750A <1> jne @F 27 <1> vv_on: 28 000082FC AC <1> lodsb 29 000082FD E89F16 <1> call chkeol 30 00008300 800E[B400]01 <1> setopt [options6], opt6_vv_mode 31 00008305 C3 <1> retn 32 <1> 33 <1> @@: 34 00008306 BA[131F] <1> mov dx, msg.off 35 00008309 E81416 <1> call isstring? 36 0000830C 752C <1> jne @F 37 <1> vv_off: 38 0000830E E8CE16 <1> call skipwhite 39 00008311 4E <1> dec si 40 00008312 BA[1D23] <1> mov dx, msg.keep 41 00008315 E80816 <1> call isstring? 42 00008318 7505 <1> jne .notkeep 43 0000831A 800E[B400]02 <1> setopt [options6], opt6_vv_keep 44 <1> .notkeep: 45 0000831F E8BD16 <1> call skipwhite 46 00008322 4E <1> dec si 47 00008323 BA[1B23] <1> mov dx, msg.nokeep 48 00008326 E8F715 <1> call isstring? 49 00008329 7505 <1> jne .notnokeep 50 0000832B 8026[B400]FD <1> clropt [options6], opt6_vv_keep 51 <1> .notnokeep: 52 00008330 AC <1> lodsb 53 00008331 E86B16 <1> call chkeol 54 00008334 8026[B400]FE <1> clropt [options6], opt6_vv_mode 55 00008339 C3 <1> retn 56 <1> 57 <1> @@: 58 0000833A AC <1> lodsb 59 0000833B E86116 <1> call chkeol 60 <1> 61 0000833E F606[E400]01 <1> testopt [internalflags6], dif6_vv_mode 62 00008343 7506 <1> jnz @F 63 00008345 BA[3A1F] <1> mov dx, msg.vv_disabled 64 00008348 E9681C <1> jmp putsz 65 <1> 66 <1> @@: 67 0000834B B000 <1> mov al, 0 68 0000834D E82000 <1> call swapscreen 69 <1> %if 0 ;n _VXCHGBIOS ; no longer needed, swapscreen has set cursor 70 <1> 71 <1> ;--- swapscreen has restored screen and cursor pos, but we want 72 <1> ;--- the cursor be shown on the screen - so set it through BIOS calls. 73 <1> 74 <1> mov ah, 0Fh ; get current mode (and video page in BH) 75 <1> int 10h 76 <1> mov ah, 3 ; get cursor pos of page in BH 77 <1> int 10h 78 <1> mov ah, 2 ; set cursor pos of page in BH 79 <1> int 10h 80 <1> %endif 81 <1> 82 00008350 F606[B400]10 <1> testopt [options6], opt6_vv_int16 83 00008355 750F <1> jnz .int16 84 <1> .terminal: 85 00008357 800E[D800]10 <1> setopt [internalflags3], dif3_input_terminal_override 86 <1> ; make sure we get terminal input 87 0000835C E8B71C <1> call getc 88 0000835F 8026[D800]EF <1> clropt [internalflags3], dif3_input_terminal_override 89 00008364 EB04 <1> jmp @F 90 <1> 91 <1> .int16: 92 <1> ; mov ah, 10h 93 00008366 31C0 <1> xor ax, ax 94 00008368 CD16 <1> int 16h 95 <1> @@: 96 <1> 97 0000836A B001 <1> mov al, 1 98 0000836C E80100 <1> call swapscreen 99 0000836F C3 <1> retn 100 <1> 101 <1> 102 <1> ;--- AL=0: save debugger screen, restore debuggee screen 103 <1> ;--- AL=1: save debuggee screen, restore debugger screen 104 <1> 105 <1> swapscreen: 106 00008370 F606[E400]01 <1> testopt [internalflags6], dif6_vv_mode 107 00008375 7450 <1> jz .done 108 <1> 109 <1> %ifn _VXCHGBIOS 110 00008377 BE[380B] <1> mov si, xmsmove 111 0000837A 837C0A00 <1> cmp word [si + XMSM.dsthdl], 0 112 0000837E 7447 <1> jz .done 113 <1> 114 00008380 B10E <1> mov cl, 14 115 00008382 D3E0 <1> shl ax, cl ; 0 -> 0000, 1 -> 4000h 116 00008384 89440C <1> mov word [si + XMSM.dstadr], ax 117 <1> 118 <1> ;--- use offset & size of current video page as src/dst for 119 <1> ;--- xms block move. Also toggle cursor pos debuggee/debugger. 120 <1> 121 00008387 B84000 <1> mov ax, 40h ; bimodal selector/segment 122 0000838A 8EC0 <1> mov es, ax 123 0000838C 26A14C00 <1> mov ax, [es:4Ch] 124 00008390 8904 <1> mov word [si + XMSM.size_], ax 125 00008392 26A14E00 <1> mov ax, [es:4Eh] 126 00008396 894406 <1> mov word [si + XMSM.srcadr + 0], ax 127 <1> 128 <1> ;--- get/set cursor position manually for speed reasons. 129 00008399 268A1E6200 <1> mov bl, [es:62h] 130 0000839E B700 <1> mov bh, 0 131 000083A0 D1E3 <1> shl bx, 1 132 000083A2 268B5750 <1> mov dx, [es:bx + 50h] ; get cursor position of current page 133 000083A6 8716[480B] <1> xchg dx, [csrpos] 134 <1> %if 0 135 <1> mov [es:bx + 50h], dx 136 <1> %else 137 000083AA 268A3E6200 <1> mov bh, byte [es:62h] 138 000083AF B402 <1> mov ah, 2 139 000083B1 CD10 <1> int 10h 140 <1> %endif 141 <1> 142 000083B3 B40B <1> mov ah, 0Bh ; save video screen to XMS 143 000083B5 E82C00 <1> call runxms 144 000083B8 E80D00 <1> call swapsrcdst 145 000083BB 80740740 <1> xor byte [si + XMSM.srcadr + 1], 40h 146 000083BF B40B <1> mov ah, 0Bh ; restore video screen from XMS 147 000083C1 E82000 <1> call runxms 148 000083C4 E80100 <1> call swapsrcdst 149 <1> ; xor byte [si + XMSM.dstadr + 1], 40h 150 <1> %else 151 <1> mov ah, 05h ; just use BIOS to activate video page 152 <1> int 10h 153 <1> %endif 154 <1> .done: 155 000083C7 C3 <1> retn 156 <1> 157 <1> %ifn _VXCHGBIOS 158 <1> swapsrcdst: 159 000083C8 8B4404 <1> mov ax, [si + XMSM.srchdl] 160 000083CB 8B4C06 <1> mov cx, word [si + XMSM.srcadr + 0] 161 000083CE 8B5408 <1> mov dx, word [si + XMSM.srcadr + 2] 162 000083D1 87440A <1> xchg ax, [si + XMSM.dsthdl] 163 000083D4 874C0C <1> xchg cx, word [si + XMSM.dstadr + 0] 164 000083D7 87540E <1> xchg dx, word [si + XMSM.dstadr + 2] 165 000083DA 894404 <1> mov [si + XMSM.srchdl], ax 166 000083DD 894C06 <1> mov word [si + XMSM.srcadr + 0], cx 167 000083E0 895408 <1> mov word [si + XMSM.srcadr + 2], dx 168 000083E3 C3 <1> retn 169 <1> runxms: 170 000083E4 1E <1> push ds 171 000083E5 07 <1> pop es 172 <1> %if _PM 173 <1> call ispm 174 <1> jz @F 175 <1> %endif 176 000083E6 FF1E[340B] <1> call far [xmsdrv] 177 000083EA C3 <1> retn 178 <1> %if _PM 179 <1> @@: 180 <1> %ifn _ONLYNON386 181 <1> _no386 jmp .286 182 <1> subcpu 386 183 <1> push dword 0 ; ss:sp 184 <1> push dword [xmsdrv] 185 <1> ; cs:ip 186 <1> push dword 0 ; fs,gs 187 <1> push word [pspdbg] 188 <1> ; ds 189 <1> push word 0 ; es 190 <1> pushf 191 <1> pushad 192 <1> mov edi, esp 193 <1> xor cx, cx 194 <1> mov bh, 0 195 <1> mov ax, 0301h 196 <1> int 31h 197 <1> popad 198 <1> add sp, 50 - 32 ; sizeof RMCS - 32 199 <1> ; ie discard fl, segregs, cs:ip, ss:sp 200 <1> retn 201 <1> subcpureset 202 <1> %endif 203 <1> %ifn _ONLY386 204 <1> .286: 205 <1> subcpu 286 206 <1> push word 0 207 <1> push word 0 ; ss:sp 208 <1> push word [xmsdrv + 2] 209 <1> push word [xmsdrv] 210 <1> ; cs:ip 211 <1> push word 0 212 <1> push word 0 ; fs,gs 213 <1> push word [pspdbg] 214 <1> ; ds 215 <1> push word 0 ; es 216 <1> pushf 217 <1> push word 0 218 <1> push ax 219 <1> push word 0 220 <1> push cx 221 <1> push word 0 222 <1> push dx 223 <1> push word 0 224 <1> push bx 225 <1> push word 0 226 <1> push word 0 227 <1> push word 0 ; esp 228 <1> push bp 229 <1> push word 0 230 <1> push si 231 <1> push word 0 232 <1> push di 233 <1> mov di, sp 234 <1> xor cx, cx 235 <1> mov bh, 0 236 <1> mov ax, 0301h 237 <1> int 31h 238 <1> pop di 239 <1> pop ax 240 <1> pop si 241 <1> pop ax 242 <1> pop bp 243 <1> pop ax 244 <1> pop ax ; esp 245 <1> pop ax 246 <1> pop bx 247 <1> pop ax 248 <1> pop dx 249 <1> pop ax 250 <1> pop cx 251 <1> pop ax 252 <1> pop ax ; ax 253 <1> add sp, 50 - 32 + 2 ; sizeof RMCS - 32 + 2 254 <1> ; ie discard eaxh and fl, segregs, cs:ip, ss:sp 255 <1> retn 256 <1> subcpureset 257 <1> %endif 258 <1> %endif 259 <1> %endif 260 <1> 261 <1> vv_set: 262 000083EB F606[B400]01 <1> testopt [options6], opt6_vv_mode 263 000083F0 750B <1> jnz .checkenable 264 <1> 265 <1> .checkdisable: 266 000083F2 F606[E400]01 <1> testopt [internalflags6], dif6_vv_mode 267 000083F7 7403E98D00 <1> jnz vv_disable 268 000083FC C3 <1> retn 269 <1> 270 <1> .checkenable: 271 000083FD F606[E400]01 <1> testopt [internalflags6], dif6_vv_mode 272 00008402 7401 <1> jz vv_enable 273 <1> .ret: 274 00008404 C3 <1> retn 275 <1> 276 <1> vv_enable: 277 00008405 B02F <1> mov al, 2Fh 278 00008407 E8682F <1> call intchk 279 0000840A 7470 <1> jz .noxmm 280 <1> 281 <1> %ifn _VXCHGBIOS 282 0000840C B80043 <1> mov ax, 4300h ; check if XMM is here 283 <1> %if _PM 284 <1> call .call2F 285 <1> %else 286 0000840F CD2F <1> int 2Fh 287 <1> %endif 288 00008411 3C80 <1> cmp al, 80h 289 00008413 7567 <1> jnz .noxmm ; no - no screen flip 290 00008415 B81043 <1> mov ax, 4310h 291 <1> %if _PM 292 <1> call .call2F 293 <1> mov word [xmsdrv + 0], bx 294 <1> mov word [xmsdrv + 2], dx 295 <1> %else 296 00008418 CD2F <1> int 2Fh 297 0000841A 891E[340B] <1> mov word [xmsdrv + 0], bx 298 0000841E 8C06[360B] <1> mov word [xmsdrv + 2], es 299 <1> %endif 300 <1> 301 00008422 BA2000 <1> mov dx, 32 ; alloc 32 KiB EMB 302 00008425 B409 <1> mov ah, 9 303 00008427 E8BAFF <1> call runxms 304 0000842A 83F801 <1> cmp ax, 1 305 0000842D 754D <1> jnz .noxmm 306 0000842F BE[380B] <1> mov si, xmsmove 307 00008432 89540A <1> mov [si + XMSM.dsthdl], dx ; save the handle in block move struct. 308 00008435 C6440D40 <1> mov byte [si + XMSM.dstadr + 1], 40h 309 <1> ; the XMS memory will be used to 310 <1> ; save/restore 2 screens, with a max 311 <1> ; capacity per screen of 16 KiB 312 00008439 B84000 <1> mov ax, 40h ; bi-modal segment/selector 313 0000843C 8EC0 <1> mov es, ax 314 0000843E 26A14C00 <1> mov ax, [es:4Ch] ; current screen size, might change! 315 00008442 8904 <1> mov word [si + XMSM.size_], ax 316 00008444 26A14E00 <1> mov ax, [es:4Eh] ; page start in video memory 317 00008448 894406 <1> mov word [si + XMSM.srcadr + 0], ax 318 0000844B B800B0 <1> mov ax, 0B000h 319 0000844E 26803E6304B4 <1> cmp byte [es:463h], 0B4h 320 00008454 7403 <1> je @F 321 00008456 80CC08 <1> or ah, 8 322 <1> @@: 323 00008459 894408 <1> mov word [si + XMSM.srcadr + 2], ax 324 <1> 325 0000845C B40F <1> mov ah, 0Fh ; get active video page in BH 326 0000845E CD10 <1> int 10h 327 00008460 B403 <1> mov ah, 03h ; get cursor pos in DX of active page 328 00008462 CD10 <1> int 10h 329 00008464 8916[480B] <1> mov [csrpos], dx 330 00008468 26A08400 <1> mov al, [es:84h] 331 0000846C A2[4A0B] <1> mov [vrows], al 332 0000846F B40B <1> mov ah, 0Bh ; save current screen now 333 00008471 E870FF <1> call runxms 334 <1> %else 335 <1> ;--- use BIOS to swap page 0/1, a simple approach 336 <1> ;--- that in theory would fit perfectly, but 337 <1> ;--- unfortunately in reality may have quirks. 338 <1> mov ax, 40h 339 <1> mov es, ax 340 <1> mov si, [es:4Eh] 341 <1> mov cx, [es:4Ch] 342 <1> shr cx, 1 343 <1> mov ax, 0501h ; debugger page is 1 344 <1> int 10h 345 <1> mov di, [es:4Eh] 346 <1> mov dx, [es:50h+0*2] 347 <1> mov [es:50h+1*2], dx 348 <1> mov ax, 0B000h 349 <1> cmp byte [es:63h], 0B4h 350 <1> jz @F 351 <1> or ah, 8 352 <1> @@: 353 <1> mov es, ax 354 <1> push ds 355 <1> mov ds, ax 356 <1> rep movsw 357 <1> pop ds 358 <1> %endif 359 00008474 800E[E400]01 <1> setopt [internalflags6], dif6_vv_mode 360 00008479 1E <1> push ds 361 0000847A 07 <1> pop es 362 0000847B C3 <1> retn 363 <1> 364 <1> .noxmm: 365 0000847C 8026[B400]FE <1> clropt [options6], opt6_vv_mode 366 00008481 1E <1> push ds 367 00008482 07 <1> pop es 368 00008483 BA[171F] <1> mov dx, msg.vv_enable_failure 369 00008486 E92A1B <1> jmp putsz 370 <1> 371 <1> %if _PM 372 <1> .call2F: 373 <1> call ispm 374 <1> jz @F 375 <1> push es 376 <1> int 2Fh 377 <1> mov dx, es 378 <1> pop es 379 <1> retn 380 <1> 381 <1> @@: 382 <1> subcpu 286 383 <1> push word [pspdbg] 384 <1> push word [pspdbg] 385 <1> push word 2Fh 386 <1> push bp 387 <1> call intcall_return_parameter_es_parameter_ds 388 <1> pop dx ; discard returned ds 389 <1> pop dx ; get es 390 <1> subcpureset 391 <1> retn 392 <1> %endif 393 <1> 394 <1> vv_disable: 395 00008489 F606[E400]01 <1> testopt [internalflags6], dif6_vv_mode 396 0000848E 7428 <1> jz .ret 397 <1> %ifn _VXCHGBIOS 398 00008490 8B16[420B] <1> mov dx, word [xmsmove + XMSM.dsthdl] 399 00008494 85D2 <1> test dx, dx 400 00008496 741B <1> jz @F 401 <1> %endif 402 00008498 F606[B400]02 <1> testopt [options6], opt6_vv_keep 403 0000849D 7507 <1> jnz .keep 404 0000849F 52 <1> push dx 405 000084A0 B000 <1> mov al, 0 ; restore debuggee screen 406 000084A2 E8CBFE <1> call swapscreen 407 000084A5 5A <1> pop dx 408 <1> .keep: 409 <1> %ifn _VXCHGBIOS 410 000084A6 B40A <1> mov ah, 0Ah ; and free XMS handle 411 000084A8 E839FF <1> call runxms 412 000084AB 31C0 <1> xor ax, ax 413 000084AD A3[420B] <1> mov word [xmsmove + XMSM.dsthdl], ax 414 000084B0 A3[3C0B] <1> mov word [xmsmove + XMSM.srchdl], ax 415 <1> %endif 416 <1> 417 <1> @@: 418 000084B3 8026[E400]FE <1> clropt [internalflags6], dif6_vv_mode 419 <1> .ret: 420 000084B8 C3 <1> retn 421 <1> %else 422 <1> 423 <1> vv equ error 424 <1> 425 <1> %endif 6481 6482 6483 %if _DEVICE && _DEVICE_SET_2324 6484 usesection lDEBUG_DATA_ENTRY 6485 devint23: 6486 00004B6E F9 stc 6487 00004B6F CB retf 6488 6489 devint24: 6490 00004B70 B003 mov al, 3 6491 00004B72 CF iret 6492 6493 usesection lDEBUG_CODE 6494 %endif 6495 6496 6497 ;--- this is called by "run" 6498 ;--- set debuggee's INT 23/24. 6499 ;--- don't use INT 21h here, DOS might be "in use". 6500 ;--- registers may be modified - will soon be set to debuggee's 6501 6502 ; Low-level functions to reset to debuggee's interrupt vectors 23h/24h 6503 ; INP: - 6504 ; OUT: - 6505 ; CHG: bx, (e)dx, cx, ax 6506 ; STT: ds = our segment 6507 ; Do not use Int21, even if not in InDOS mode 6508 setint2324: 6509 %if _BOOTLDR 6510 %if _APPLICATION || _DEVICE 6511 000084B9 F606[D100]40 testopt [internalflags], nodosloaded 6512 000084BE 7514 jnz .ret ; don't touch int23/24 --> 6513 %else 6514 retn 6515 %endif 6516 %endif 6517 %if _APPLICATION || _DEVICE 6518 %if _PM 6519 call ispm 6520 jz .pm 6521 %endif 6522 000084C0 06 push es 6523 000084C1 57 push di 6524 000084C2 56 push si 6525 6526 000084C3 31FF xor di, di 6527 000084C5 8EC7 mov es, di 6528 000084C7 BF8C00 mov di, 23h *4 6529 000084CA BE[040B] mov si, run2324 6530 000084CD A5 movsw 6531 000084CE A5 movsw 6532 000084CF A5 movsw 6533 000084D0 A5 movsw 6534 6535 %if _PM 6536 call InDOS 6537 jnz @F 6538 call hook2F 6539 @@: 6540 %endif 6541 000084D1 5E pop si 6542 000084D2 5F pop di 6543 000084D3 07 pop es 6544 .ret: 6545 000084D4 C3 retn 6546 %if _PM 6547 .pm: 6548 push si 6549 mov si, run2324 6550 mov bx, 0223h 6551 .loop: 6552 _386_o32 ; mov edx, dword [si+0] 6553 mov dx, word [si+0] 6554 mov cx, word [si+4] 6555 mov ax, 0205h 6556 int 31h 6557 add si, 6 6558 inc bl 6559 dec bh 6560 jnz .loop 6561 pop si 6562 retn 6563 %endif 6564 %endif 6565 6566 6567 ; Low-level functions to save debuggee's interrupt vectors 23h/24h 6568 ; and set our interrupt vectors instead 6569 ; INP: - 6570 ; OUT: - 6571 ; CHG: - 6572 ; STT: ds = our segment 6573 ; Do not use Int21, even if not in InDOS mode 6574 getint2324: 6575 %if _BOOTLDR 6576 %if _APPLICATION || _DEVICE 6577 000084D5 F606[D100]40 testopt [internalflags], nodosloaded 6578 000084DA 7525 jnz .ret ; don't touch int23/24 --> 6579 %else 6580 retn 6581 %endif 6582 %endif 6583 %if _APPLICATION || _DEVICE 6584 %if _PM 6585 call ispm 6586 jz .pm 6587 %endif 6588 000084DC 56 push si 6589 000084DD 57 push di 6590 000084DE 06 push es 6591 6592 000084DF 1E push ds 6593 000084E0 07 pop es 6594 000084E1 31FF xor di, di 6595 000084E3 8EDF mov ds, di 6596 000084E5 BF[040B] mov di, run2324 6597 000084E8 BE8C00 mov si, 23h *4 6598 000084EB 56 push si 6599 000084EC A5 movsw ; save interrupt vector 23h 6600 000084ED A5 movsw 6601 000084EE A5 movsw ; save interrupt vector 24h 6602 000084EF A5 movsw 6603 000084F0 5F pop di 6604 000084F1 06 push es 6605 000084F2 1F pop ds 6606 000084F3 31F6 xor si, si 6607 000084F5 8EC6 mov es, si 6608 000084F7 BE0E00 mov si, CCIV 6609 000084FA A5 movsw 6610 000084FB A5 movsw 6611 000084FC A5 movsw 6612 000084FD A5 movsw 6613 6614 000084FE 07 pop es 6615 000084FF 5F pop di 6616 00008500 5E pop si 6617 .ret: 6618 00008501 C3 retn 6619 %if _PM 6620 subcpu 286 6621 .pm: 6622 _386_o32 6623 pusha 6624 mov di, run2324 6625 mov bx, 0223h 6626 .loop: 6627 mov ax, 0204h 6628 int 31h 6629 _386_o32 ; mov dword [di+0], edx 6630 mov word [di+0], dx 6631 mov word [di+4], cx 6632 add di, byte 6 6633 inc bl 6634 dec bh 6635 jnz .loop 6636 %if _ONLYNON386 6637 db __TEST_IMM8 ; (skip pusha) 6638 %else 6639 db __TEST_IMM16 ; (skip pushad) 6640 %endif 6641 6642 restoredbgi2324: 6643 setdbgi2324: 6644 _386_o32 6645 pusha 6646 mov si, dbg2324 6647 mov bx, 0223h 6648 _386 xor edx, edx 6649 .loop: 6650 lodsw 6651 mov dx, ax 6652 mov cx, word [cssel] 6653 mov ax, 0205h 6654 int 31h 6655 inc bl 6656 dec bh 6657 jnz .loop 6658 _386_o32 6659 popa 6660 retn 6661 subcpureset 6662 %endif 6663 %endif 6664 6665 %if 0 6666 The next three subroutines concern the handling of Int23 and 24. 6667 These interrupt vectors are saved and restored when running the 6668 child process, but are not active when DEBUG itself is running. 6669 It is still useful for the programmer to be able to check where Int23 6670 and 24 point, so these values are copied into the interrupt table 6671 during parts of the C, D, (DX, DI,) E, M, and S commands, so that 6672 they appear to be in effect. The E command also copies these values 6673 back. 6674 6675 Between calls to dohack and unhack, there should be no calls to DOS, 6676 so that there is no possibility of these vectors being used when 6677 DEBUG itself is running. 6678 6679 ; As long as no DOS is loaded anyway, Int23 and Int24 won't be touched 6680 by us, so the whole hack is unnecessary and will be skipped. 6681 %endif 6682 6683 ; PREPHACK - Set up for interrupt vector substitution. 6684 ; Entry es = cs 6685 prephack: 6686 00008502 803E[180B]00 cmp byte [hakstat], 0 6687 00008507 7509 jne .err ; if hack status error --> 6688 00008509 57 push di 6689 0000850A BF[100B] mov di, sav2324 ; debugger's Int2324 6690 0000850D E80B00 call prehak1 6691 00008510 5F pop di 6692 00008511 C3 retn 6693 6694 .err: 6695 00008512 52 push dx 6696 00008513 BA[D93B] mov dx, ph_msg 6697 00008516 E89A1A call putsz ; display error 6698 00008519 5A pop dx 6699 0000851A C3 retn 6700 6701 ; INP: di-> saved interrupt vectors 6702 ; OUT: - 6703 ; CHG: - 6704 prehak1: 6705 %if _PM 6706 call ispm 6707 jz .pm ; nothing to do 6708 %endif 6709 0000851B 1E push ds 6710 0000851C 56 push si 6711 0000851D 31F6 xor si, si 6712 0000851F 8EDE mov ds, si 6713 00008521 BE8C00 mov si, 23h *4 6714 00008524 A5 movsw 6715 00008525 A5 movsw 6716 00008526 A5 movsw 6717 00008527 A5 movsw 6718 00008528 5E pop si 6719 00008529 1F pop ds 6720 .pm: 6721 0000852A C3 retn 6722 6723 6724 ; DOHACK - Fake the interrupt vectors 23h and 24h to debuggee's 6725 ; UNHACK - Restore interrupt vectors 23h and 24h to our values 6726 ; It's OK to do either of these twice in a row. 6727 ; In particular, the S command may do unhack twice in a row. 6728 ; INP: ds = our segment 6729 ; OUT: es = our segment 6730 ; CHG: - 6731 ; STT: Do not use Int21 6732 dohack: 6733 0000852B 16 push ss 6734 0000852C 07 pop es 6735 %if _BOOTLDR 6736 %if _APPLICATION || _DEVICE 6737 0000852D F606[D100]40 testopt [internalflags], nodosloaded 6738 00008532 752D jnz unhack.ret ; nothing to hack --> 6739 %else 6740 retn 6741 %endif 6742 %endif 6743 %if _APPLICATION || _DEVICE 6744 00008534 56 push si 6745 00008535 C606[180B]01 mov byte [hakstat], 1 6746 0000853A BE[040B] mov si, run2324 ; debuggee's interrupt vectors 6747 %if _PM 6748 call ispm 6749 jnz unhack.common 6750 subcpu 286 6751 _386_o32 6752 pusha 6753 mov bx, 0223h 6754 .pm_loop: 6755 _386_o32 6756 mov dx, word [si+0+0] 6757 mov cx, word [si+0+4] 6758 mov ax, 205h 6759 int 31h 6760 add si, byte 6 6761 inc bl 6762 dec bh 6763 jnz .pm_loop 6764 _386_o32 6765 popa 6766 pop si 6767 retn 6768 subcpureset 6769 %else 6770 0000853D EB12 jmp short unhack.common 6771 %endif 6772 %endif 6773 6774 unhack: 6775 0000853F 16 push ss 6776 00008540 07 pop es 6777 %if _BOOTLDR 6778 %if _APPLICATION || _DEVICE 6779 00008541 F606[D100]40 testopt [internalflags], nodosloaded 6780 00008546 7519 jnz .ret ; nothing to hack --> 6781 %else 6782 retn 6783 %endif 6784 %endif 6785 %if _APPLICATION || _DEVICE 6786 00008548 C606[180B]00 mov byte [hakstat], 0 6787 %if _PM 6788 call ispm 6789 jz restoredbgi2324 6790 %endif 6791 0000854D 56 push si 6792 0000854E BE[100B] mov si, sav2324 ; debugger's interrupt vectors 6793 .common: 6794 00008551 57 push di 6795 00008552 06 push es 6796 00008553 31FF xor di, di 6797 00008555 8EC7 mov es, di 6798 00008557 BF8C00 mov di, 23h *4 6799 0000855A A5 movsw 6800 0000855B A5 movsw 6801 0000855C A5 movsw 6802 0000855D A5 movsw 6803 0000855E 07 pop es 6804 0000855F 5F pop di 6805 00008560 5E pop si 6806 .ret: 6807 00008561 C3 retn 6808 %endif 6809 6810 6811 InDOS_or_BIOS_output: 6812 00008562 F606[B500]02 testopt [options6], opt6_bios_output 6813 00008567 7525 jnz InDOS.return ; if should do output to ROM-BIOS --> 6814 6815 InDOS_or_BIOS_IO: 6816 00008569 F606[B700]01 testopt [options6], opt6_bios_io 6817 0000856E 751E jnz InDOS.return ; if should do I/O from/to ROM-BIOS --> 6818 6819 6820 ; OUT: NZ if InDOS mode 6821 ; ZR if not 6822 ; CHG: - 6823 ; STT: ss = ds 6824 InDOS: section_of_function 6825 %if _BOOTLDR 6826 00008570 F606[D100]40 testopt [internalflags], nodosloaded 6827 00008575 7517 jnz .return ; always "in DOS" --> 6828 %endif 6829 %if _APPLICATION || _DEVICE 6830 00008577 F606[A000]08 testopt [options], fakeindos 6831 0000857C 7510 jnz .return ; faking InDOS on anyway --> 6832 .real_indos: 6833 0000857E 1E push ds 6834 0000857F 56 push si 6835 00008580 BE[280B] mov si, pInDOS + so16aSegSel 6836 00008583 E80900 call update_dosdata_segment 6837 00008586 C574FE lds si, [si - so16aSegSel] 6838 00008589 803C00 cmp byte [si], 0 6839 0000858C 5E pop si 6840 0000858D 1F pop ds 6841 %endif 6842 .return: 6843 0000858E C3 retn 6844 6845 6846 ; INP: si -> word seg or sel, word segment, word selector 6847 update_dosdata_segment: 6848 %if _APPLICATION || _DEVICE 6849 0000858F F606[D700]20 testopt [internalflags2], dif2_int31_segment 6850 00008594 740D jz .ret 6851 00008596 52 push dx 6852 00008597 50 push ax 6853 00008598 53 push bx 6854 00008599 B031 mov al, 31h 6855 0000859B E8B92D call get_86m_interrupt_handler_no_dos 6856 %if _PM 6857 cmp word [si + soaSegment], dx 6858 je @F 6859 6860 call ispm 6861 jnz .realmode 6862 6863 mov bx, dx 6864 mov ax, 0002h 6865 int 31h 6866 6867 mov word [si + soaSegSel], ax 6868 mov word [si + soaSelector], ax 6869 jmp @F 6870 6871 .realmode: 6872 mov word [si + soaSegSel], dx 6873 and word [si + soaSelector], 0 6874 6875 @@: 6876 mov word [si + soaSegment], dx 6877 pop bx 6878 pop ax 6879 %else 6880 0000859E 5B pop bx 6881 0000859F 58 pop ax 6882 000085A0 8914 mov word [si + soaSegSel], dx 6883 %endif 6884 000085A2 5A pop dx 6885 %endif 6886 .ret: 6887 000085A3 C3 retn 6888 6889 6890 ; PARSECM - Parse command line for C and M commands. 6891 ; Entry AL First nonwhite character of parameters 6892 ; SI Address of the character after that 6893 ; DI (If _PM) getaddr or getaddrX for second parameter 6894 ; Exit DS:ESI Address from first parameter 6895 ; ES:EDI Address from second parameter 6896 ; ECX Length of address range minus one 6897 ; [bAddr32] Set if any high word non-zero 6898 6899 parsecm_have_address: 6900 000085A4 E8E300 nearcall getrangeX_have_address_need_length 6901 000085A7 EB0C jmp @F 6902 6903 parsecm: 6904 000085A9 E856FF call prephack 6905 000085AC 8B1E[C40C] mov bx, word [reg_ds] ; get source range 6906 000085B0 31C9 xor cx, cx 6907 000085B2 E8E700 nearcall getrangeX ; get address range into bx:(e)dx bx:(e)cx 6908 ; Bug fixed in Debug/X 2.00: This used the same scratch 6909 ; selector as the getaddr used for the second operand. 6910 ; As we never write to the first operand of an C or M 6911 ; command the simple fix is to use getrangeX here. 6912 @@: 6913 000085B5 53 push bx ; save segment first address 6914 000085B6 E8F813 call skipcomm0 6915 000085B9 8B1E[C40C] mov bx, word [reg_ds] 6916 _386_PM_o32 ; sub ecx, edx 6917 000085BD 29D1 sub cx, dx ; number of bytes minus one 6918 _386_PM_o32 ; push edx 6919 000085BF 52 push dx 6920 _386_PM_o32 ; push ecx 6921 000085C0 51 push cx 6922 %if _PM 6923 mov cl, byte [bAddr32] 6924 push cx 6925 %if _DUALCODE && _EXPRDUALCODE 6926 nearcall ..@parsecm_getaddr 6927 6928 usesection lDEBUG_CODE2 6929 ..@parsecm_getaddr: section_of_function 6930 jmp di 6931 6932 usesection lDEBUG_CODE 6933 %else 6934 call di ; get destination address into bx:edx 6935 %endif 6936 pop cx 6937 or byte [bAddr32], cl ; if either is 32-bit, handle both as 32-bit 6938 %else 6939 000085C1 E88C01 nearcall getaddr ; get destination address into bx:dx 6940 %endif 6941 _386_PM_o32 6942 000085C4 59 pop cx ; pop ecx 6943 _386_PM_o32 ; mov edi, edx 6944 000085C5 89D7 mov di, dx 6945 _386_PM_o32 6946 000085C7 01CA add dx, cx ; add edx, ecx 6947 000085C9 7208 jc short errorj7 ; if it wrapped around 6948 000085CB E8D113 call chkeol ; expect end of line 6949 000085CE 8EC3 mov es, bx 6950 _386_PM_o32 ; pop esi 6951 000085D0 5E pop si 6952 000085D1 1F pop ds 6953 000085D2 C3 retn 6954 6955 errorj7: 6956 000085D3 E987FC jmp error 6957 6958 6959 %if _APPLICATION || _DEVICE 6960 ; PARSELW - Parse command line for L and W commands. 6961 ; 6962 ; Entry AL First nonwhite character of parameters 6963 ; SI Address of the character after that 6964 ; 6965 ; Exit If there is at most one argument (program load/write), then the 6966 ; zero flag is set, and registers are set as follows: 6967 ; bx:(e)dx Transfer address 6968 ; 6969 ; If there are more arguments (absolute disk read/write), then the 6970 ; zero flag is clear, and registers are set as follows: 6971 ; 6972 ; DOS versions prior to 3.31: 6973 ; AL Drive number 6974 ; CX Number of sectors to read 6975 ; DX Beginning logical sector number 6976 ; DS:BX Transfer address 6977 ; 6978 ; Later DOS versions: 6979 ; AL Drive number 6980 ; BX Offset of packet 6981 ; CX 0FFFFh 6982 6983 usesection lDEBUG_DATA_ENTRY 6984 00004B73 00 align 4, db 0 6985 00004B74 00000000 packet: dd 0 ; sector number 6986 00004B78 0000 dw 0 ; number of sectors to read 6987 00004B7A 00000000 dd 0 ; transfer address Segm:OOOO 6988 %if _PM 6989 dw 0 ; transfer address might be Segm:OOOOOOOO! 6990 %endif 6991 6992 usesection lDEBUG_CODE 6993 parselw: 6994 000085D6 8B1E[D00C] mov bx, word [reg_cs] ; default segment 6995 000085DA 66 _386_o32 ; xor edx, edx 6996 000085DB 31D2 xor dx, dx 6997 000085DD F606[040C]08 test byte [fileext], EXT_HEX 6998 000085E2 7502 jnz @F ; if .HEX file, default offset is 0 --> 6999 000085E4 B601 mov dh, 1 ; default offset in dx = 100h 7000 @@: 7001 000085E6 E8A113 call iseol? 7002 000085E9 7468 je plw2 ; if no arguments 7003 000085EB E86201 nearcall getaddr ; get buffer address into bx:(e)dx 7004 000085EE E8C013 call skipcomm0 7005 000085F1 E89613 call iseol? 7006 000085F4 745D je plw2 ; if only one argument 7007 000085F6 53 push bx ; save segment 7008 000085F7 52 push dx ; save offset 7009 000085F8 BB8000 mov bx, 80h ; max number of sectors to read 7010 000085FB F7DA neg dx 7011 000085FD 7406 jz plw1 ; if address is zero 7012 000085FF B109 mov cl, 9 7013 00008601 D3EA shr dx, cl ; max number of sectors which can be read 7014 00008603 89D7 mov di, dx 7015 plw1: 7016 00008605 803C3A cmp byte [si], ':' ; drive letter specification ? 7017 00008608 750F jne @F ; no --> 7018 7019 0000860A 50 push ax 7020 0000860B E86013 call uppercase 7021 0000860E 2C41 sub al, 'A' 7022 00008610 3C20 cmp al, 32 ; valid drive ? 7023 00008612 88C2 mov dl, al ; put drive number 7024 00008614 46 inc si ; -> past the colon 7025 00008615 58 pop ax 7026 00008616 7205 jb @FF ; got it --> 7027 00008618 4E dec si ; -> at colon 7028 7029 @@: 7030 00008619 E84B12 nearcall getbyte ; get drive number (DL) 7031 0000861C A8 db __TEST_IMM8 ; (skip lodsb) 7032 @@: 7033 0000861D AC lodsb 7034 0000861E E89013 call skipcomm0 7035 00008621 52 push dx 7036 00008622 80C241 add dl, 'A' 7037 00008625 8816[5D38] mov byte [driveno], dl 7038 00008629 E84B0D nearcall getdword ; get relative sector number 7039 0000862C E88213 call skipcomm0 7040 0000862F 53 push bx ; save sector number high 7041 00008630 52 push dx ; save sector number low 7042 00008631 56 push si ; in case we find an error 7043 00008632 E82412 nearcall getword ; get sector count 7044 00008635 4A dec dx 7045 00008636 39FA cmp dx, di 7046 00008638 7399 jae errorj7 ; if too many sectors 7047 0000863A 42 inc dx 7048 0000863B 89D1 mov cx, dx 7049 0000863D E85F13 call chkeol ; expect end of line 7050 00008640 F606[D000]07 testopt [internalflags], oldpacket| newpacket| ntpacket 7051 00008645 750D jnz plw3 ; if using a packet --> 7052 00008647 5E pop si ; in case of error 7053 00008648 5A pop dx ; get LoWord starting logical sector number 7054 00008649 5B pop bx ; get HiWord 7055 0000864A 85DB test bx, bx ; just a 16-bit sector number possible 7056 0000864C 7585 jnz errorj7 ; if too big 7057 0000864E 58 pop ax ; drive number 7058 0000864F 5B pop bx ; transfer buffer ofs 7059 00008650 1F pop ds ; transfer buffer seg 7060 00008651 85C9 test cx, cx ; NZ 7061 plw2: 7062 00008653 C3 retn 7063 7064 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 7065 plw3: 7066 00008654 5B pop bx ; discard si 7067 00008655 BB[744B] mov bx, packet 7068 00008658 8F07 pop word [bx+0] ; LoWord sector number 7069 0000865A 8F4702 pop word [bx+2] ; HiWord sector number 7070 0000865D 894F04 mov word [bx+4], cx ; number of sectors 7071 00008660 58 pop ax ; drive number 7072 00008661 8F4706 pop word [bx+6] ; transfer address ofs 7073 00008664 5A pop dx 7074 00008665 31C9 xor cx, cx 7075 %if _PM 7076 call ispm 7077 jnz plw3_1 7078 cmp byte [dpmi32], 0 7079 jz plw3_1 7080 [cpu 386] 7081 mov word [bx+10], dx ; save segment of transfer buffer 7082 movzx ebx, bx 7083 shr edx, 16 ; get HiWord(offset) 7084 cmp byte [bAddr32], 1 7085 jz plw3_1 7086 xor dx, dx 7087 __CPU__ 7088 plw3_1: 7089 %endif 7090 00008667 895708 mov word [bx+8], dx ; transfer address seg 7091 0000866A 49 dec cx ; NZ and make cx = -1 7092 0000866B C3 retn 7093 %endif 7094 7095 7096 %include "expr.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug expression evaluator 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 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> %if _EXPRDUALCODE && _DUALCODE 19 <1> usesection lDEBUG_CODE2 20 <1> 21 <1> error_expr: nearcall error 22 <1> 23 <1> %if _DEBUG4 || _DEBUG5 24 <1> %define _DEB_ASM_PREFIX expr_ 25 <1> %include "deb.asm" 26 <1> %endif 27 <1> 28 <1> %else 29 <1> usesection lDEBUG_CODE 30 <1> 31 <1> error_expr: equ error 32 <1> 33 <1> %if _DEBUG4 || _DEBUG5 34 <1> expr_d4message equ d4message 35 <1> %endif 36 <1> %endif 37 <1> 38 <1> ;--- get a valid offset for segment in BX 39 <1> 40 <1> ; INP: bx = segment 41 <1> ; al = first character, si -> next character 42 <1> ; ah = 1 if might be a segment or pointer 43 <1> ; ah = 0 if must be an offset 44 <1> ; OUT: CY if pointer type return, bx:dx = pointer 45 <1> ; DebugX on a 386: 46 <1> ; edx = offset (even if 16-bit PM/86M segment) 47 <1> ; ah = 1 if a 32-bit segment, 0 if a 16-bit segment 48 <1> ; DebugX otherwise: 49 <1> ; dx = offset 50 <1> ; ah = 0 51 <1> ; Debug: 52 <1> ; dx = offset 53 <1> ; al, si refer to next part of command line 54 <1> ; CHG: Debug: ah, DebugX: - 55 <1> ; REM: The byte [bAddr32] is no longer changed by this 56 <1> ; function. The caller has to use the status that 57 <1> ; is returned in ah, if desired. 58 <1> getofsforbx: section_of_function 59 0000866C 51 <1> push cx ; preserve 60 0000866D 53 <1> push bx ; preserve 61 0000866E 88E5 <1> mov ch, ah ; ch = 0 if must be an offset 62 <1> %if _PM 63 <1> _386 xor edx, edx ; properly initialize high word 64 <1> nearcall test_high_limit 65 <1> jz .16 ; 16-bit segment --> 66 <1> [cpu 386] 67 <1> nearcall getdword 68 <1> push bx 69 <1> push dx 70 <1> pop edx ; edx = 32-bit offset 71 <1> nearcall checkpointer 72 <1> mov ah, 1 ; return 32-bit offset flag 73 <1> jmp .ret_pop_NC 74 <1> __CPU__ 75 <1> %endif 76 <1> 77 <1> .16: 78 00008670 E8040D <1> nearcall getexpression 79 00008673 E80700 <1> nearcall checkpointer 80 00008676 E8E511 <1> nearcall getword.checksignificantbits 81 <1> %if _PM 82 <1> mov ah, 0 ; return 16-bit offset flag 83 <1> %endif 84 <1> .ret_pop_NC: 85 00008679 5B <1> pop bx 86 0000867A 59 <1> pop cx ; restore 87 0000867B F8 <1> clc 88 0000867C C3 <1> retn 89 <1> 90 <1> checkpointer: section_of_function 91 0000867D 84E4 <1> test ah, ah ; pointer type ? 92 0000867F 7908 <1> jns .ret ; no --> 93 00008681 84ED <1> test ch, ch ; can be a pointer or segment ? 94 00008683 7414 <1> jz errorj10 ; no --> 95 00008685 59 <1> pop cx ; discard a near return address 96 00008686 59 <1> pop cx ; discard bx 97 00008687 59 <1> pop cx ; restore cx 98 <1> %if _PM 99 <1> _386 movzx edx, dx ; edx = dx 100 <1> mov ah, 0 ; always treat as 16-bit offset 101 <1> %endif 102 00008688 F9 <1> stc ; return a pointer type 103 <1> .ret: 104 <1> retn_expr: 105 00008689 C3 <1> retn 106 <1> 107 <1> 108 <1> ; GETRANGE - Get address range from input line. 109 <1> ; a range consists of either start and end address 110 <1> ; or a start address, a 'L' and a length. 111 <1> ; Entry AL First character of range 112 <1> ; SI Address of next character 113 <1> ; BX Default segment to use 114 <1> ; CX Default length to use (or 0 if not allowed) 115 <1> ; di Default length in lines if nonzero 116 <1> ; (only used for getrange.lines entrypoint 117 <1> ; and with word getrange_lines & 8000h set) 118 <1> ; must be <= 7FFFh 119 <1> ; Exit AL First character beyond range 120 <1> ; SI Address of the character after that 121 <1> ; BX:(E)DX First address in range 122 <1> ; BX:(E)CX Last address in range 123 <1> ; Uses AH 124 <1> 125 <1> %if _PM 126 <1> getrangeX: section_of_function 127 <1> and word [getrange_lines], 0 128 <1> .lines: section_of_function getrangeX 129 <1> %if _MS_0RANGE_COMPAT 130 <1> mov byte [getrange_is_uu], 0 131 <1> .lines_and_uu: section_of_function getrangeX 132 <1> %endif 133 <1> clropt [internalflags3], dif3_accept_getrange_0 134 <1> _386 movzx ecx, cx 135 <1> .ecx_and_0_valid: section_of_function getrangeX 136 <1> _386_PM_o32 137 <1> push cx 138 <1> nearcall getaddrX 139 <1> jmp short getrange.common 140 <1> %else 141 <1> check_section_of getrangeX 142 <1> check_section_of getrangeX.lines 143 <1> %if _MS_0RANGE_COMPAT 144 <1> check_section_of getrangeX.lines_and_uu 145 <1> %endif 146 <1> check_section_of getrangeX.ecx_and_0_valid 147 <1> getrangeX: equ getrange 148 <1> getrangeX.lines: equ getrange.lines 149 <1> %if _MS_0RANGE_COMPAT 150 <1> getrangeX.lines_and_uu: equ getrange.lines_and_uu 151 <1> %endif 152 <1> getrangeX.ecx_and_0_valid: equ getrange.ecx_and_0_valid 153 <1> %endif 154 <1> 155 <1> getrangeX_have_address_need_length: section_of_function 156 0000868A 8326[C40B]00 <1> and word [getrange_lines], 0 157 0000868F 8026[DB00]FB <1> clropt [internalflags3], dif3_accept_getrange_0 158 <1> _386_PM_o32 159 00008694 31C9 <1> xor cx, cx 160 <1> _386_PM_o32 161 00008696 51 <1> push cx ; save the default length 162 00008697 EB16 <1> jmp getrange.common 163 <1> 164 <1> 165 00008699 E9C1FB <1> errorj10: jmp error_expr 166 <1> 167 <1> getrange: section_of_function 168 0000869C 8326[C40B]00 <1> and word [getrange_lines], 0 169 <1> .lines: section_of_function getrange 170 <1> %if _MS_0RANGE_COMPAT 171 000086A1 C606[190B]00 <1> mov byte [getrange_is_uu], 0 172 <1> .lines_and_uu: section_of_function getrange 173 <1> %endif 174 000086A6 8026[DB00]FB <1> clropt [internalflags3], dif3_accept_getrange_0 175 <1> _386_PM movzx ecx, cx 176 <1> .ecx_and_0_valid: section_of_function getrange 177 <1> _386_PM_o32 178 000086AB 51 <1> push cx ; save the default length 179 000086AC E8A100 <1> nearcall getaddr ; get address into bx:(e)dx (sets bAddr32) (returns edx) 180 <1> .common: 181 000086AF 56 <1> push si 182 000086B0 E8FE12 <1> nearcall skipcomm0 183 000086B3 E8D412 <1> nearcall iseol? 184 000086B6 7533 <1> jne gr2 185 000086B8 5E <1> pop si ; restore si and cx 186 <1> _386_PM_o32 187 000086B9 59 <1> pop cx 188 000086BA 4E <1> dec si ; restore al 189 000086BB AC <1> lodsb 190 <1> 191 000086BC F606[C50B]80 <1> testopt [getrange_lines], 8000h 192 000086C1 740D <1> jz @F ; if lines length not supported --> 193 000086C3 85FF <1> test di, di ; default lines given ? 194 000086C5 7409 <1> jz @F ; no --> 195 000086C7 78D0 <1> js short errorj10 ; error if sign bit set --> 196 000086C9 893E[C40B] <1> mov word [getrange_lines], di 197 <1> ; return lines (PL) 198 000086CD B90100 <1> mov cx, 1 ; placeholder length 199 <1> @@: 200 <1> 201 000086D0 B402 <1> mov ah, 2 ; do not allow past boundary if F RANGE 202 000086D2 F606[DB00]04 <1> testopt [internalflags3], dif3_accept_getrange_0 203 <1> ; F RANGE special case ? 204 000086D7 7504 <1> jnz @F ; yes --> 205 <1> _386_PM_a32 206 000086D9 E3BE <1> jcxz errorj10 ; if a range is mandatory 207 000086DB 30E4 <1> xor ah, ah ; default range, allow clamping to boundary 208 <1> @@: 209 <1> gr3.addcheck: 210 <1> _386_PM cmp byte [bAddr32], 0 211 <1> _386_PM je .16 212 <1> _386_PM dec ecx 213 <1> _386_PM add ecx, edx 214 <1> _386_PM jnc gr1 ; if no wraparound 215 <1> _386_PM or ecx, byte -1 ; go to end of segment 216 <1> _386_PM jmp short .checkgr3 ; check if clamping allowed --> 217 <1> .16: 218 <1> _386_PM test ah, 2 ; F RANGE with implicit length ? 219 <1> _386_PM jz @F ; no --> 220 <1> _386_PM cmp ecx, 1_0000h ; yes, is it a 32-bit length > 64 KiB ? 221 <1> _386_PM ja short errorj10 ; error if so (don't try to clamp) --> 222 <1> @@: 223 <1> _386_PM cmp ecx, 0FFFFh ; was high ? 224 <1> _386_PM jbe @F ; no --> (ecxh = 0) 225 <1> _386_PM xor ecx, ecx ; ecxh = 0 and prepare so as to 226 <1> ; result in cx = FFFFh after dec 227 <1> @@: 228 000086DD 49 <1> dec cx 229 000086DE 01D1 <1> add cx, dx 230 000086E0 7328 <1> jnc gr1 ; if no wraparound 231 000086E2 B9FFFF <1> mov cx, -1 ; go to end of segment 232 <1> ; next, check if clamping allowed 233 <1> .checkgr3: ; checks if clamping allowed 234 000086E5 84E4 <1> test ah, ah ; clamping allowed ? 235 000086E7 7421 <1> jz gr1 236 000086E9 EBAE <1> jmp errorj10 ; (no) if a specified length wrapped --> 237 <1> 238 <1> gr2: 239 <1> _386_PM add sp, byte 2 ; for the ecxh on stack 240 000086EB 83C404 <1> add sp, byte 4 ; discard saved cx, si 241 000086EE E87D12 <1> nearcall uppercase 242 000086F1 3C4C <1> cmp al, 'L' 243 000086F3 7416 <1> je gr3 ; if a range is given 244 <1> ; nearcall skipwh0 ; get next nonblank 245 <1> _386_PM_o32 ; xchg ecx, edx 246 000086F5 87CA <1> xchg cx, dx 247 000086F7 BA[061F] <1> mov dx, msg.end 248 000086FA 4E <1> dec si 249 000086FB E82212 <1> nearcall isstring? ; (advance si if match) 250 000086FE AC <1> lodsb 251 000086FF B400 <1> mov ah, 0 ; must be offset 252 00008701 E868FF <1> nearcall getofsforbx_remember_bitness 253 <1> ; (DebugX: returns edx no matter what) 254 <1> _386_PM_o32 ; xchg ecx, edx 255 00008704 87CA <1> xchg cx, dx 256 <1> _386_PM_o32 ; cmp edx, ecx 257 00008706 39CA <1> cmp dx, cx 258 00008708 7743 <1> ja short errorj2b ; if empty range --> 259 <1> gr1: 260 0000870A C3 <1> retn 261 <1> 262 <1> gr3: 263 0000870B 4E <1> dec si ; -> at 'L' 264 0000870C 52 <1> push dx 265 0000870D BA[FF1E] <1> mov dx, msg.length 266 00008710 E80D12 <1> nearcall isstring? 267 00008713 5A <1> pop dx 268 00008714 7501 <1> jne .notlength 269 00008716 A8 <1> db __TEST_IMM8 ; (skip inc, si -> terminator after "LENGTH") 270 <1> .notlength: 271 00008717 46 <1> inc si ; -> behind 'L' 272 00008718 E89512 <1> nearcall skipcomma ; discard the 'L' 273 <1> ;--- a range is entered with the L/ength argument 274 <1> ;--- get a valid length for segment in BX 275 0000871B 52 <1> push dx 276 0000871C 53 <1> push bx 277 <1> _386_PM nearcall test_high_limit 278 <1> _386_PM pushf 279 0000871D 8B0E[C40B] <1> mov cx, word [getrange_lines] 280 00008721 E89B01 <1> nearcall get_length.lines 281 <1> _386_PM popf 282 <1> _386_PM jnz .not16_64kib ; don't check for <= 64 KiB 283 00008724 83FB01 <1> cmp bx, byte 1 284 00008727 7206 <1> jb .not16_64kib ; < 64 KiB in 16-bit segment --> 285 00008729 7522 <1> jne short errorj2b ; 16-bit segment, above 64 KiB --> 286 0000872B 85D2 <1> test dx, dx 287 0000872D 751E <1> jnz short errorj2b ; 16-bit segment, above 64 KiB --> 288 <1> .not16_64kib: 289 <1> @@: 290 <1> %if _PM 291 <1> _386 push bx ; (only push high word on 386+) 292 <1> push dx 293 <1> _386_o32 ; pop ecx ; mov ecx, bxdx 294 <1> pop cx ; mov cx, dx 295 <1> %else 296 0000872F 89D1 <1> mov cx, dx 297 <1> %endif 298 00008731 09D3 <1> or bx, dx ; zero ? 299 00008733 7406 <1> jz short explicit0range ; yes, error --> 300 00008735 5B <1> pop bx 301 00008736 5A <1> pop dx 302 00008737 B401 <1> mov ah, 1 303 00008739 EBA2 <1> jmp .addcheck 304 <1> 305 <1> explicit0range: 306 <1> %if _MS_0RANGE_COMPAT 307 0000873B F606[A600]04 <1> testopt [options2], opt2_0range_compat 308 00008740 740B <1> jz errorj2b 309 00008742 43 <1> inc bx ; bx:dx = 10000h (64 KiB) 310 00008743 D006[190B] <1> rol byte [getrange_is_uu], 1 311 00008747 73E6 <1> jnc @B ; if not uu --> 312 00008749 87DA <1> xchg bx, dx ; bx:dx = 1 313 0000874B EBE2 <1> jmp @B 314 <1> %endif 315 <1> errorj2b: 316 0000874D E90DFB <1> jmp error_expr 317 <1> 318 <1> 319 <1> ; GETADDR - Get address from input line. 320 <1> ; Entry AL First character of address 321 <1> ; SI Address of next character 322 <1> ; BX Default segment to use 323 <1> ; Exit AL First character beyond address 324 <1> ; SI Address of the character after that 325 <1> ; BX:(E)DX Address found 326 <1> ; Uses AH,CX 327 <1> ; REM: mm expects that numeric expressions evaluating 328 <1> ; to numbers in the range 0 to C3h are always 329 <1> ; allowed here regardless the default segment's 330 <1> ; D/B bit and limit. This is needed for its mc 331 <1> ; command detection. 332 <1> 333 <1> getaddr: section_of_function 334 <1> %if _PM 335 <1> nearcall getaddrX 336 <1> %if _EXPRDUALCODE && _DUALCODE 337 <1> nearcall verifysegm_or_error ; make BX a writeable segment 338 <1> retn 339 <1> %else 340 <1> jmp verifysegm_or_error ; make BX a writeable segment 341 <1> %endif 342 <1> 343 <1> ; getaddrX differs from getaddr in that BX is not ensured 344 <1> ; to be writeable in PM. 345 <1> ; 346 <1> ; For DEBUG without PM support, getaddr is getaddrX. Both don't return CF. 347 <1> 348 <1> getaddrX: section_of_function 349 <1> mov byte [bAddr32], 0 350 <1> xor cx, cx 351 <1> cmp al, '$' ; a real-mode segment? 352 <1> jne ga1_1 353 <1> lodsb 354 <1> %if _DOUBLEDOLLAR 355 <1> cmp al, '$' 356 <1> jne @F 357 <1> lodsb 358 <1> dec cx ; indicate double dollar sign (0FFFFh) 359 <1> @@: 360 <1> %endif 361 <1> 362 <1> _386 xor edx, edx ; edxh = 0 363 <1> nearcall getexpression 364 <1> test ah, ah ; pointer type ? 365 <1> jns @F 366 <1> 367 <1> nearcall ispm ; need to translate ? 368 <1> jnz .ret ; no --> 369 <1> ; bx = segment 370 <1> ; after falling through we get bx:(e)dx = segmented address 371 <1> 372 <1> check_section_of seg_bx_to_sel 373 <1> seg_bx_to_sel: equ $ ; (no base for local labels) 374 <1> push ax 375 <1> mov ax, 0002h 376 <1> int 31h 377 <1> jc short errorj2 378 <1> mov bx, ax ; bx = segment 379 <1> %if _DOUBLEDOLLAR 380 <1> push dx 381 <1> push cx 382 <1> xor cx, cx 383 <1> mov dx, -1 384 <1> mov ax, 0008h 385 <1> int 31h ; set segment limit 0FFFFh 386 <1> pop cx 387 <1> jcxz .no_double_dollar 388 <1> mov dx, cx ; cx:dx = 0FFFFh 389 <1> mov ax, 0008h 390 <1> int 31h ; set segment limit 0FFFF_FFFFh 391 <1> .no_double_dollar: 392 <1> pop dx 393 <1> %endif 394 <1> pop ax 395 <1> .ret: 396 <1> retn 397 <1> 398 <1> @@: 399 <1> nearcall getword.checksignificantbits 400 <1> nearcall ispm ; need to translate ? 401 <1> jnz .checkseg ; no --> 402 <1> mov bx, dx 403 <1> nearcall seg_bx_to_sel 404 <1> mov dx, bx 405 <1> .checkseg: 406 <1> push si 407 <1> nearcall skipwh0 408 <1> cmp al, ':' ; was a segment at all? 409 <1> je ga2_2 ; yes --> 410 <1> errorj2: 411 <1> jmp error_expr 412 <1> %else 413 <1> getaddrX: section_of_function 414 00008750 3C24 <1> cmp al, '$' 415 00008752 7517 <1> jne ga1_1 416 00008754 AC <1> lodsb 417 <1> %if _DOUBLEDOLLAR 418 <1> cmp al, '$' 419 <1> jne @F 420 <1> lodsb 421 <1> @@: 422 <1> %endif 423 00008755 E81F0C <1> nearcall getexpression 424 00008758 84E4 <1> test ah, ah ; pointer type ? 425 0000875A 780E <1> js .ret ; return bx:dx = segmented address 426 0000875C 50 <1> push ax ; (unused) 427 0000875D E8FE10 <1> nearcall getword.checksignificantbits 428 00008760 E87D12 <1> nearcall skipwh0 429 00008763 3C3A <1> cmp al, ':' 430 00008765 7439 <1> je ga2_2 431 00008767 E9F3FA <1> jmp error_expr 432 <1> 433 <1> .ret: 434 0000876A C3 <1> retn 435 <1> %endif 436 <1> ga1_1: 437 0000876B 4E <1> dec si 438 0000876C BA[D31F] <1> mov dx, msg.t 439 0000876F E8AE11 <1> nearcall isstring? 440 00008772 743A <1> je ga_taken 441 00008774 BA[D21F] <1> mov dx, msg.nt 442 00008777 E8A611 <1> nearcall isstring? 443 0000877A 742F <1> je ga_nottaken 444 0000877C BA[CC1F] <1> mov dx, msg.taken 445 0000877F E89E11 <1> nearcall isstring? 446 00008782 742A <1> je ga_taken 447 00008784 BA[C91F] <1> mov dx, msg.nottaken 448 00008787 E89611 <1> nearcall isstring? 449 0000878A 741F <1> je ga_nottaken 450 0000878C AC <1> lodsb 451 0000878D B401 <1> mov ah, 1 ; might be a pointer type 452 0000878F E8DAFE <1> nearcall getofsforbx 453 00008792 720B <1> jc .ret 454 00008794 56 <1> push si 455 00008795 E84812 <1> nearcall skipwh0 456 00008798 3C3A <1> cmp al, ':' 457 0000879A 7404 <1> je ga2 ; if this is a segment/selector --> 458 0000879C 5E <1> pop si 459 0000879D 4E <1> dec si 460 0000879E AC <1> lodsb 461 <1> .ret: 462 <1> %if _PM 463 <1> jmp short remember_bitness 464 <1> ; remember 32-bitness (only if no segment) 465 <1> %else 466 0000879F C3 <1> retn 467 <1> %endif 468 <1> 469 <1> ga2: 470 <1> _386_PM cmp edx, 0001_0000h ; segment/selector fits in word ? 471 <1> _386_PM jae short errorj2 ; no --> 472 <1> ga2_2: 473 000087A0 58 <1> pop ax ; throw away saved si 474 000087A1 89D3 <1> mov bx, dx ; mov segment into BX 475 000087A3 E83912 <1> nearcall skipwhite ; skip to next word 476 000087A6 B400 <1> mov ah, 0 ; must be an offset 477 <1> %if _PM 478 <1> getofsforbx_remember_bitness: section_of_function 479 <1> nearcall getofsforbx 480 <1> remember_bitness: section_of_function 481 <1> or byte [bAddr32], ah ; remember 32-bitness 482 <1> retn 483 <1> %else 484 000087A8 E9C1FE <1> jmp getofsforbx 485 <1> 486 <1> check_section_of getofsforbx_remember_bitness 487 <1> getofsforbx_remember_bitness: equ getofsforbx 488 <1> %endif 489 <1> 490 <1> 491 <1> ga_nottaken: section_of_function 492 000087AB 31C0 <1> xor ax, ax ; 0 = not taken 493 000087AD A9 <1> db __TEST_IMM16 ; (skip mov) 494 <1> ga_taken: section_of_function 495 000087AE B001 <1> mov al, 1 ; 1 = taken 496 000087B0 57 <1> push di 497 <1> _386_PM_o32 ; (push esi) 498 000087B1 56 <1> push si 499 <1> _386_PM_o32 ; (push eax) 500 000087B2 50 <1> push ax ; ! must be the LAST word in this stack frame 501 <1> 502 000087B3 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go, DH = prefix flags 503 000087B6 8B1E[D00C] <1> mov bx, word [reg_cs] 504 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 505 000087BA 8B36[DC0C] <1> mov si, word [reg_eip] 506 <1> .pp2: 507 000087BE E8FABD <1> nearcall pp16 ; get next instruction byte into AL 508 000087C1 BF[6411] <1> mov di, ppbytes 509 000087C4 B90B00 <1> mov cx, PPLEN_ONLY_PREFIXES 510 000087C7 F2AE <1> repne scasb ; asize, osize, seg prefixes (ie, hints) ? 511 000087C9 750F <1> jne @F ; no --> 512 000087CB 8A451F <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 513 <1> ; test al, PP_PREFIX ; prefix ? 514 <1> ; jz pp3 ; no --> 515 <1> ; (Always set in ga_taken.) 516 000087CE 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 517 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 518 <1> ; between decoding as O32 and O16, they're always 519 <1> ; decoded as O32. The same is true for A32, and 520 <1> ; in a 32-bit cs for O16 and A16. 521 <1> .next: 522 000087D0 FECA <1> dec dl 523 000087D2 75EA <1> jnz .pp2 ; if not out of bytes --> 524 <1> .pp5: ; unknown, error out on the (NOT)TAKEN keyword 525 <1> _386_PM_o32 ; (pop eax) 526 000087D4 58 <1> pop ax 527 <1> _386_PM_o32 ; (pop esi) 528 000087D5 5E <1> pop si ; restore si so error will be behind keyword 529 000087D6 5F <1> pop di 530 000087D7 46 <1> inc si 531 000087D8 EB3F <1> jmp errorj2a 532 <1> 533 <1> @@: 534 000087DA 3C70 <1> cmp al, 70h ; jcc rel8 ? 535 000087DC 7204 <1> jb @F ; no --> 536 000087DE 3C7F <1> cmp al, 7Fh 537 000087E0 7623 <1> jbe .rel_8 ; yes --> 538 <1> @@: 539 000087E2 3CE0 <1> cmp al, 0E0h ; loop* / j(e)cxz rel8 ? 540 000087E4 7204 <1> jb @F ; no --> 541 000087E6 3CE3 <1> cmp al, 0E3h 542 000087E8 761B <1> jbe .rel_8 ; yes --> 543 <1> @@: 544 000087EA 3C0F <1> cmp al, 0Fh ; prefix byte ? 545 000087EC 75E6 <1> jne .pp5 ; no, no valid conditional branch (error) --> 546 000087EE E8CABD <1> nearcall pp16 547 000087F1 3C80 <1> cmp al, 80h ; jcc rel16/rel32 ? 548 000087F3 72DF <1> jb .pp5 549 000087F5 3C8F <1> cmp al, 8Fh 550 000087F7 77DB <1> ja .pp5 ; no, error --> 551 <1> .rel_16_32: 552 <1> _386_PM nearcall pp_fix32bitflags 553 000087F9 E8BFBD <1> nearcall pp16 554 000087FC 86C4 <1> xchg al, ah 555 000087FE E8BABD <1> nearcall pp16 556 00008801 86C4 <1> xchg al, ah ; ax = rel16 557 <1> _386_PM test dh, PP_OPSIZ 558 <1> _386_PM jz @F ; have 16-bit displacement --> 559 <1> _386_PM rol eax, 16 ; preserve low 16 bits in high 16 bits 560 <1> _386_PM nearcall pp16 561 <1> _386_PM ror eax, 8 562 <1> _386_PM nearcall pp16 563 <1> _386_PM ror eax, 8 ; magic swap to put high 16 bits where they belong 564 00008803 EB04 <1> jmp @FF ; have 32-bit displacement --> 565 <1> ; (When _PM=0 build or no 386, this branch will do the 566 <1> ; same thing as taking it as a 16-bit displacement.) 567 <1> 568 <1> .rel_8: 569 00008805 E8B3BD <1> nearcall pp16 ; get 8-bit displacement 570 00008808 98 <1> cbw ; 8 to 16 bits 571 <1> @@: 572 <1> _386_PM cwde ; 16 to 32 bits 573 <1> @@: 574 00008809 5A <1> pop dx ; get ax from stack 575 0000880A 52 <1> push dx ; restore it to the stack 576 0000880B 84D2 <1> test dl, dl ; 1 if ga_taken, 0 if ga_nottaken 577 0000880D 7402 <1> jz @F ; ga_nottaken, esi has eip value after inst --> 578 <1> _386_PM_o32 ; (add esi, eax) 579 0000880F 01C6 <1> add si, ax ; ga_taken: apply displacement to esi 580 <1> @@: 581 <1> _386_PM_o32 582 00008811 89F2 <1> mov dx, si ; get into (e)dx, bx already has seg/sel 583 <1> _386_PM nearcall test_d_b_bit 584 <1> _386_PM jnz @F ; if 32-bit cs --> 585 <1> _386_PM movzx edx, dx ; clear high 16 bits 586 <1> @@: 587 <1> _386_PM_o32 ; (pop eax) 588 00008813 58 <1> pop ax 589 <1> _386_PM_o32 ; (pop esi) 590 00008814 5E <1> pop si 591 00008815 5F <1> pop di 592 <1> _386_PM mov ah, 0 ; do not remember bitness (is 16 bit) 593 <1> _386_PM jz @F ; if 16-bit cs --> 594 <1> _386_PM inc ah ; remember bitness as 1 (is 32 bit) 595 <1> @@: 596 <1> _386_PM nearcall remember_bitness 597 <1> %if _EXPRDUALCODE && _DUALCODE 598 <1> nearcall skipwhite 599 <1> retn 600 <1> %else 601 00008816 E9C611 <1> jmp skipwhite 602 <1> %endif 603 <1> 604 <1> errorj2a: 605 00008819 E941FA <1> jmp error_expr 606 <1> 607 <1> 608 <1> ; GETSTR - Get string of bytes. Put the answer in line_out. 609 <1> ; Entry AL first character 610 <1> ; SI address of next character 611 <1> ; Exit [line_out] first byte of string 612 <1> ; DI address of last+1 byte of string 613 <1> ; Uses AX, cx, dx,SI 614 <1> 615 <1> getstr: section_of_function 616 <1> %if _STRNUM 617 0000881C 53 <1> push bx 618 0000881D BF[B40A] <1> mov di, line_out 619 00008820 E88E11 <1> nearcall skipcomm0 620 00008823 E86411 <1> nearcall iseol? 621 00008826 74F1 <1> je short errorj2a ; we don't allow empty byte strings 622 00008828 4E <1> dec si 623 00008829 31C9 <1> xor cx, cx ; default size = bytes 624 0000882B BA[891E] <1> mov dx, msg.as 625 0000882E E8EF10 <1> nearcall isstring? 626 00008831 7509 <1> jne .notas 627 00008833 E87A11 <1> nearcall skipcomma 628 00008836 4E <1> dec si 629 00008837 E8BF00 <1> nearcall get_length_keyword 630 0000883A 75DD <1> jnz errorj2a 631 <1> .notas: 632 0000883C E87111 <1> nearcall skipcomma 633 0000883F 80F902 <1> cmp cl, 2 ; 0 = bytes, 1 = words, 2 = dwords 634 <1> ; (ch is always zero) 635 00008842 77D5 <1> ja errorj2a ; higher is invalid --> 636 00008844 89CB <1> mov bx, cx 637 00008846 01DB <1> add bx, bx 638 <1> %else 639 <1> mov di, line_out 640 <1> nearcall iseol? 641 <1> je short errorj2a ; we don't allow empty byte strings 642 <1> %endif 643 <1> gs1: 644 00008848 3C27 <1> cmp al, "'" 645 0000884A 740A <1> je gs2 ; if string 646 0000884C 3C22 <1> cmp al, '"' 647 0000884E 7406 <1> je gs2 ; ditto 648 <1> %if _STRNUM 649 00008850 FF97[7E4B] <1> call near [getstr_dispatch_table.numeric + bx] 650 <1> %else 651 <1> nearcall getbyte ; byte in DL 652 <1> mov byte [di], dl ; store the byte 653 <1> inc di 654 <1> %endif 655 00008854 EB17 <1> jmp short gs6 656 <1> 657 <1> gs2: 658 00008856 88C4 <1> mov ah, al ; save quote character 659 <1> gs3: 660 00008858 AC <1> lodsb 661 00008859 38E0 <1> cmp al, ah 662 0000885B 740B <1> je gs5 ; if possible end of string 663 0000885D E82E11 <1> nearcall iseol?.notsemicolon 664 00008860 74B7 <1> je short errorj2a ; if end of line 665 <1> gs4: 666 <1> %if _STRNUM 667 00008862 FF97[844B] <1> call near [getstr_dispatch_table.string + bx] 668 <1> %else 669 <1> stosb ; save character and continue 670 <1> %endif 671 00008866 EBF0 <1> jmp short gs3 672 <1> 673 <1> gs5: 674 00008868 AC <1> lodsb 675 00008869 38E0 <1> cmp al, ah 676 0000886B 74F5 <1> je gs4 ; if doubled quote character 677 <1> gs6: 678 0000886D E84111 <1> nearcall skipcomm0 ; go back for more 679 00008870 E81711 <1> nearcall iseol? 680 00008873 75D3 <1> jne gs1 ; if not done yet 681 <1> %if _STRNUM 682 00008875 5B <1> pop bx 683 <1> %endif 684 00008876 C3 <1> retn 685 <1> 686 <1> 687 <1> %if _STRNUM 688 <1> getstr_numeric_byte: 689 00008877 E8ED0F <1> nearcall getbyte ; byte in DL 690 <1> ; cmp di, line_out_end - 1 691 <1> ; ja errorj2a 692 0000887A 8815 <1> mov byte [di], dl ; store the byte 693 0000887C 47 <1> inc di 694 0000887D C3 <1> retn 695 <1> 696 <1> getstr_numeric_word: 697 0000887E E8D80F <1> nearcall getword ; dx 698 00008881 81FF[BA0B] <1> cmp di, line_out_end - 2 699 00008885 7792 <1> ja errorj2a 700 00008887 8915 <1> mov word [di], dx ; store 701 00008889 AF <1> scasw ; di += 2 702 0000888A C3 <1> retn 703 <1> 704 <1> getstr_numeric_dword: 705 0000888B 53 <1> push bx 706 0000888C E8E80A <1> nearcall getdword ; bx:dx 707 0000888F 81FF[B80B] <1> cmp di, line_out_end - 4 708 00008893 7784 <1> ja errorj2a 709 00008895 8915 <1> mov word [di], dx ; store 710 00008897 AF <1> scasw ; di += 2 711 00008898 891D <1> mov word [di], bx ; store 712 0000889A AF <1> scasw ; di += 2 713 0000889B 5B <1> pop bx 714 0000889C C3 <1> retn 715 <1> 716 <1> getstr_string_byte: 717 <1> ; cmp di, line_out_end - 1 718 <1> ; ja errorj2a 719 0000889D AA <1> stosb ; save character and continue 720 0000889E C3 <1> retn 721 <1> 722 <1> getstr_string_word: 723 0000889F 81FF[BA0B] <1> cmp di, line_out_end - 2 724 000088A3 7603E971FF <1> ja errorj2a 725 000088A8 AA <1> stosb ; save character and continue 726 000088A9 B000 <1> mov al, 0 727 000088AB AA <1> stosb 728 000088AC C3 <1> retn 729 <1> 730 <1> getstr_string_dword: 731 000088AD 81FF[B80B] <1> cmp di, line_out_end - 4 732 000088B1 7603E963FF <1> ja errorj2a 733 000088B6 AA <1> stosb ; save character and continue 734 000088B7 B000 <1> mov al, 0 735 000088B9 AA <1> stosb 736 000088BA AA <1> stosb 737 000088BB AA <1> stosb 738 000088BC C3 <1> retn 739 <1> 740 <1> 741 <1> usesection lDEBUG_DATA_ENTRY 742 <1> 743 <1> ; REM: Dispatch table in section lDEBUG_CODE or lDEBUG_CODE2 744 <1> align 2, db 0 745 <1> getstr_dispatch_table: 746 00004B7E [7788] <1> .numeric: dw getstr_numeric_byte 747 00004B80 [7E88] <1> dw getstr_numeric_word 748 00004B82 [8B88] <1> dw getstr_numeric_dword 749 00004B84 [9D88] <1> .string: dw getstr_string_byte 750 00004B86 [9F88] <1> dw getstr_string_word 751 00004B88 [AD88] <1> dw getstr_string_dword 752 <1> 753 <1> %if _EXPRDUALCODE && _DUALCODE 754 <1> usesection lDEBUG_CODE2 755 <1> %else 756 <1> usesection lDEBUG_CODE 757 <1> %endif 758 <1> 759 <1> %endif ; _STRNUM 760 <1> 761 <1> 762 <1> ; INP: al =, si -> input 763 <1> ; cx = getrange lines flag (8000h if LINES allowed) 764 <1> ; OUT: al =, si -> after number / keyword 765 <1> ; If not LINES, 766 <1> ; word [getrange_lines] unchanged 767 <1> ; bx:dx = size 768 <1> ; If LINES, 769 <1> ; word [getrange_lines] = number of lines 770 <1> ; (must be >= 1 and <= 7FFFh) 771 <1> ; bx:dx = 1, as a placeholder value 772 <1> ; CHG: ah, cx 773 <1> ; REM: jumps to error on invalid input 774 <1> get_length: section_of_function 775 000088BD 31C9 <1> xor cx, cx ; do not allow LINES 776 <1> .lines: section_of_function get_length 777 <1> 778 000088BF E8B50A <1> nearcall getdword 779 <1> 780 000088C2 4E <1> dec si 781 000088C3 52 <1> push dx 782 <1> 783 000088C4 85C9 <1> test cx, cx ; LINES allowed ? 784 000088C6 791F <1> jns @F ; no --> 785 <1> 786 000088C8 BA[281E] <1> mov dx, msg.lines 787 000088CB E85210 <1> nearcall isstring? ; LINES specified ? 788 000088CE 7517 <1> jne @F ; no --> 789 <1> 790 000088D0 5A <1> pop dx 791 000088D1 85DB <1> test bx, bx ; lines must be <= 7FFFh 792 000088D3 750F <1> jnz .error ; if > FFFFh --> 793 000088D5 85D2 <1> test dx, dx 794 000088D7 740B <1> jz .error ; lines mustn't be zero --> 795 000088D9 7809 <1> js .error ; if >= 8000h --> 796 000088DB 8916[C40B] <1> mov word [getrange_lines], dx 797 <1> ; save lines specified 798 000088DF BA0100 <1> mov dx, 1 ; return a placeholder size in bx:dx 799 000088E2 EB11 <1> jmp .done 800 <1> 801 <1> .error: 802 000088E4 E976F9 <1> jmp error_expr 803 <1> 804 <1> @@: 805 000088E7 E80F00 <1> nearcall get_length_keyword 806 <1> ; si -> terminator after length unit 807 <1> ; (or -> after expression if no unit) 808 000088EA 5A <1> pop dx 809 000088EB E308 <1> jcxz .noshift ; "BYTES" or no unit given --> 810 <1> .shiftloop: 811 000088ED D1E2 <1> shl dx, 1 812 000088EF D1D3 <1> rcl bx, 1 813 000088F1 72F1 <1> jc short .error ; too large --> 814 000088F3 E2F8 <1> loop .shiftloop ; loop shifting (if it was shift count > 1) 815 <1> .noshift: 816 <1> .done: 817 000088F5 E8E710 <1> nearcall skipwhite ; al = next character, si -> after that 818 000088F8 C3 <1> retn 819 <1> 820 <1> 821 <1> ; INP: si -> potential keyword 822 <1> ; OUT: NZ if no keyword, 823 <1> ; si unchanged 824 <1> ; cx = 0 (default length shift like BYTES) 825 <1> ; ZR if keyword found, 826 <1> ; si -> separator behind keyword 827 <1> ; cx = length shift 828 <1> ; CHG: dx, al 829 <1> get_length_keyword: section_of_function 830 000088F9 53 <1> push bx 831 000088FA BB[883F] <1> mov bx, table_length_keywords 832 <1> @@: 833 000088FD 8B0F <1> mov cx, word [bx] ; = shift count (0 if last entry of table) 834 000088FF 8B5702 <1> mov dx, word [bx + 2] ; -> keyword in allcaps ASCIZ (or 0 if EOT) 835 00008902 E81B10 <1> nearcall isstring? ; this keyword matches ? 836 00008905 7407 <1> je .gotsize ; yes --> (ZR) 837 00008907 E305 <1> jcxz .gotsize ; no, but it was the last entry --> (NZ) 838 00008909 83C304 <1> add bx, 4 839 0000890C EBEF <1> jmp @B 840 <1> 841 <1> .gotsize: 842 0000890E 5B <1> pop bx 843 0000890F C3 <1> retn 844 <1> 845 <1> 846 <1> isbracketorunaryoperator?: section_of_function 847 00008910 E80900 <1> nearcall isunaryoperator? 848 00008913 7406 <1> je .yes 849 <1> %if _INDIRECTION 850 00008915 3C5B <1> cmp al, '[' 851 00008917 7402 <1> je .yes 852 <1> %endif 853 00008919 3C28 <1> cmp al, '(' 854 <1> .yes: 855 0000891B C3 <1> retn 856 <1> 857 <1> 858 <1> ; Is al one of the simple unary operators? 859 <1> ; OUT: NZ if not 860 <1> ; ZR if so, 861 <1> ; NC 862 <1> ; cx = index into unaryoperators 863 <1> isunaryoperator?: section_of_function 864 0000891C 57 <1> push di 865 0000891D BF[BE4B] <1> mov di, unaryoperators 866 00008920 EB04 <1> jmp short isoperator?.common 867 <1> 868 <1> ; See previous description. 869 <1> isoperator?: section_of_function 870 00008922 57 <1> push di 871 00008923 BF[A64B] <1> mov di, operators 872 <1> .common: 873 00008926 8B0D <1> mov cx, word [di] 874 00008928 51 <1> push cx 875 00008929 AF <1> scasw 876 0000892A F2AE <1> repne scasb 877 0000892C 5F <1> pop di 878 0000892D 7507 <1> jne .no 879 0000892F F7D9 <1> neg cx 880 00008931 01F9 <1> add cx, di 881 00008933 49 <1> dec cx 882 00008934 38C0 <1> cmp al, al ; NC, ZR 883 <1> .no: 884 00008936 5F <1> pop di 885 00008937 C3 <1> retn 886 <1> 887 <1> 888 <1> ; INP: al = character 889 <1> ; OUT: al = capitalised character 890 <1> ; ZR, NC if a separator 891 <1> ; NZ if no separator 892 <1> isseparator?: section_of_function 893 <1> .: 894 00008938 E83310 <1> nearcall uppercase 895 0000893B 51 <1> push cx 896 <1> %if _EXPRESSIONS 897 0000893C 3C41 <1> cmp al, 'A' 898 0000893E 7204 <1> jb @F 899 00008940 3C5A <1> cmp al, 'Z' 900 00008942 7605 <1> jbe @FF 901 <1> @@: 902 00008944 E8DBFF <1> nearcall isoperator? ; normal operators are separators (also handles equality sign) 903 00008947 740A <1> je .yes ; if match --> (ZR, NC) 904 <1> @@: 905 <1> %endif 906 00008949 57 <1> push di 907 0000894A BF[DC53] <1> mov di, separators 908 0000894D 8B0D <1> mov cx, word [di] 909 0000894F AF <1> scasw 910 00008950 F2AE <1> repne scasb ; ZR, NC on match, NZ else 911 00008952 5F <1> pop di 912 <1> .yes: 913 00008953 59 <1> pop cx 914 00008954 C3 <1> retn 915 <1> 916 <1> ; INP: al = character 917 <1> ; OUT: al = capitalised character 918 <1> ; ZR, NC if a separator (not L or dot) 919 <1> ; NZ if no separator (including L or dot) 920 <1> .except_L_or_dot: section_of_function isseparator? 921 00008955 E81610 <1> nearcall uppercase 922 00008958 3C2E <1> cmp al, '.' 923 0000895A 7404 <1> je .ret_NZ 924 0000895C 3C4C <1> cmp al, 'L' 925 0000895E 75D8 <1> jne . 926 <1> .ret_NZ: 927 00008960 84C0 <1> test al, al 928 00008962 C3 <1> retn 929 <1> 930 <1> 931 <1> ; Does one of the type operators start in input? 932 <1> ; 933 <1> ; INP: al = first character 934 <1> ; si-> next character 935 <1> ; OUT: Iff NC, 936 <1> ; bx>>1 = offset into typebitmasks and typehandlers tables 937 <1> ; bx&1 = set iff signed type 938 <1> ; di-> behind the type operator 939 <1> ; CHG: bx, cx, di 940 <1> ; 941 <1> ; Note: Signed types are specified by an S prefix to 942 <1> ; the type names. Only non-address types can 943 <1> ; be signed (that is, offset, segment, and 944 <1> ; pointer cannot be signed). 945 <1> ; Types can be specified with abbreviated names, 946 <1> ; except where that would clash with numeric 947 <1> ; input or a register name or ambiguity would 948 <1> ; be caused. These cases are: 949 <1> ; SS, S (short, seg, signed, ss) 950 <1> ; B (byte, numeric 0Bh) 951 <1> ; C (char, numeric 0Ch) 952 <1> ; D (dword, numeric 0Dh) 953 <1> ; 3 (3byte, numeric 3) 954 <1> ; 3B (3byte, numeric 3Bh) 955 <1> ; CH (char, register ch) 956 <1> istype?: section_of_function 957 <1> %if maxtypesize & 1 958 00008963 B90800 <1> mov cx, maxtypesize+1 ; = maximum count + 1 959 <1> %else 960 <1> mov cx, maxtypesize ; = maximum count 961 <1> %endif 962 <1> ; cx is even here! 963 00008966 52 <1> push dx 964 00008967 50 <1> push ax 965 00008968 56 <1> push si 966 <1> 967 00008969 29CC <1> sub sp, cx ; allocate name buffer 968 0000896B 89E7 <1> mov di, sp ; -> name buffer 969 0000896D 57 <1> push di 970 0000896E 31DB <1> xor bx, bx ; initialise count 971 <1> %ifn maxtypesize & 1 972 <1> inc cx ; = maximum count + 1 973 <1> %endif 974 <1> ; The +1 does not represent an off-by-one 975 <1> ; because the below loop stores to the 976 <1> ; buffer at the beginning of subsequent 977 <1> ; iterations, after checking cx. 978 <1> 979 00008970 A9 <1> db __TEST_IMM16 ; (skip stosb and lodsb) 980 <1> .storename: 981 00008971 AA <1> stosb ; store in name buffer 982 00008972 AC <1> lodsb ; get next character to check 983 00008973 E8F80F <1> nearcall uppercase 984 00008976 51 <1> push cx 985 00008977 E896FF <1> nearcall isbracketorunaryoperator?; terminator ? 986 0000897A 59 <1> pop cx 987 0000897B 7417 <1> je .endname 988 0000897D E80A10 <1> nearcall iseol? 989 00008980 7412 <1> je .endname 990 00008982 3C20 <1> cmp al, 32 991 00008984 740E <1> je .endname 992 00008986 3C09 <1> cmp al, 9 993 00008988 740A <1> je .endname 994 0000898A 3C2C <1> cmp al, ',' 995 0000898C 7406 <1> je .endname ; yes --> 996 <1> ; We don't check for digits here. 997 <1> ; Immediate values and variables 998 <1> ; must leave a space inbetween. 999 0000898E 43 <1> inc bx ; count characters 1000 0000898F E2E0 <1> loop .storename ; count remaining buffer space 1001 <1> ; Here, the potential name was too 1002 <1> ; long for a valid type name. 1003 00008991 F9 <1> stc 1004 00008992 EB1F <1> jmp short .done ; --> 1005 <1> 1006 <1> .endname: 1007 00008994 E84910 <1> nearcall skipwh0 ; skip to next field 1008 00008997 4E <1> dec si ; -> behind potential name 1009 00008998 5F <1> pop di ; -> name buffer 1010 00008999 89D9 <1> mov cx, bx ; cx = length 1011 0000899B 56 <1> push si ; save position in input line 1012 0000899C 89FE <1> mov si, di ; si-> name buffer 1013 0000899E 53 <1> push bx 1014 0000899F 57 <1> push di 1015 000089A0 F8 <1> clc ; indicate unsigned check 1016 000089A1 E81900 <1> nearcall isunsignedtype? ; matches an unsigned type ? 1017 000089A4 5E <1> pop si 1018 000089A5 59 <1> pop cx 1019 000089A6 730B <1> jnc .done ; yes --> 1020 <1> 1021 000089A8 AC <1> lodsb ; al = first, si-> second character 1022 000089A9 49 <1> dec cx ; cx = length less one 1023 000089AA 3C53 <1> cmp al, 'S' ; first character an "S" ? 1024 000089AC F9 <1> stc ; (indicate signed check, or: no type) 1025 000089AD 7504 <1> jne .done ; no, not signed either --> 1026 000089AF E80B00 <1> nearcall isunsignedtype? ; matches an unsigned type now ? 1027 000089B2 43 <1> inc bx ; if NC, set to indicate signed type 1028 <1> .done: 1029 000089B3 9F <1> lahf 1030 000089B4 5F <1> pop di ; if NC, -> behind matched type name 1031 000089B5 83C408 <1> add sp, (maxtypesize+1) & ~1 ; discard name buffer 1032 000089B8 5E <1> pop si 1033 000089B9 9E <1> sahf 1034 000089BA 58 <1> pop ax 1035 000089BB 5A <1> pop dx 1036 000089BC C3 <1> retn 1037 <1> 1038 <1> ; Does one of the unsigned type operators start in buffer? 1039 <1> ; 1040 <1> ; INP: si-> name buffer with capitalised potential name 1041 <1> ; cx = length of potential name 1042 <1> ; CY iff looking for signed type 1043 <1> ; OUT: Iff NC, 1044 <1> ; bx>>1 = offset into typebitmasks and typehandlers tables 1045 <1> ; bx&1 = 0 1046 <1> ; CHG: ax, bx, cx, dx, si, di 1047 <1> isunsignedtype?: section_of_function 1048 000089BD BF[FC3F] <1> mov di, types 1049 000089C0 19D2 <1> sbb dx, dx ; 0FFFFh if signed check else 0 1050 000089C2 E351 <1> jcxz .notype ; if zero characters --> 1051 000089C4 83F902 <1> cmp cx, 2 1052 000089C7 750C <1> jne @F 1053 000089C9 813C4348 <1> cmp word [si], "CH" 1054 000089CD 7446 <1> je .notype 1055 000089CF 813C3342 <1> cmp word [si], "3B" 1056 000089D3 7440 <1> je .notype 1057 <1> @@: 1058 000089D5 E214 <1> loop .single_character_checked ; if not single character --> 1059 <1> 1060 000089D7 AC <1> lodsb ; get that character 1061 000089D8 3C53 <1> cmp al, 'S' ; specified "S" or "SS" ? 1062 000089DA 7439 <1> je .notype ; yes, not allowed --> 1063 000089DC 08D0 <1> or al, dl ; iff signed check, al |= 0FFh 1064 000089DE 4E <1> dec si ; (restore) 1065 000089DF 3C33 <1> cmp al, '3' 1066 000089E1 7432 <1> je .notype 1067 000089E3 3C41 <1> cmp al, 'A' ; specified only a valid digit ? 1068 000089E5 7204 <1> jb .single_character_checked 1069 000089E7 3C47 <1> cmp al, 'F'+1 1070 000089E9 722A <1> jb .notype ; yes, not allowed --> 1071 <1> 1072 <1> .single_character_checked: 1073 000089EB 41 <1> inc cx ; (restore) 1074 000089EC 83E2E1 <1> and dx, types.addresses-types.end ; = 0 iff unsigned check 1075 000089EF 31C0 <1> xor ax, ax ; initialise ah, and ax = 0 first 1076 000089F1 31DB <1> xor bx, bx 1077 000089F3 87FE <1> xchg di, si 1078 000089F5 81C2[4740] <1> add dx, types.end ; = .addresses for signed check, 1079 <1> ; = .end for unsigned check 1080 <1> 1081 <1> ; Before each iteration, 1082 <1> ; si-> byte-counted next name to check 1083 <1> ; di-> potential name (in name buffer) 1084 <1> ; cx = cl = length of potential name 1085 <1> ; (dx-1) = maximum value for si 1086 <1> ; ah = 0 1087 <1> ; Before the first iteration additionally, 1088 <1> ; bx&~3 = index to return for this name (if match) 1089 <1> ; al = 0 1090 <1> ; Before subsequent iterations additionally, 1091 <1> ; (bx+2)&~3 = index to return for this name (if match) 1092 <1> ; al = offset to add to si first 1093 000089F9 A9 <1> db __TEST_IMM16 ; (skip two times inc bx) 1094 <1> .loop: 1095 000089FA 43 <1> inc bx 1096 000089FB 43 <1> inc bx ; increase index 1097 000089FC 01C6 <1> add si, ax ; -> next table entry 1098 000089FE AC <1> lodsb ; ax = length of full name 1099 000089FF 39D6 <1> cmp si, dx ; checked all allowed names? 1100 00008A01 7312 <1> jae .notype ; yes, done --> 1101 00008A03 39C8 <1> cmp ax, cx ; full name large enough ? 1102 00008A05 72F3 <1> jb .loop ; no --> 1103 00008A07 57 <1> push di 1104 00008A08 51 <1> push cx 1105 00008A09 56 <1> push si 1106 00008A0A F3A6 <1> repe cmpsb ; potential name matches ? 1107 00008A0C 5E <1> pop si 1108 00008A0D 59 <1> pop cx 1109 00008A0E 5F <1> pop di 1110 00008A0F 75E9 <1> jne .loop ; no --> 1111 <1> 1112 00008A11 80E3FC <1> and bl, ~3 ; conflate alternative type names 1113 00008A14 A8 <1> db __TEST_IMM8 ; (NC, skip stc) 1114 <1> .notype: 1115 00008A15 F9 <1> stc 1116 00008A16 C3 <1> retn 1117 <1> 1118 <1> 1119 <1> usesection lDEBUG_DATA_ENTRY 1120 <1> 1121 <1> ; Table of bit masks and shift counts to determine 1122 <1> ; how a type modifies the bit mask of required bytes. 1123 <1> ; 1124 <1> ; It would be possible to always retrieve a full dword 1125 <1> ; from memory to process indirection in expressions, 1126 <1> ; but this could fault if accessing inexistent data. 1127 <1> ; Hence the debugger should minimise memory access. 1128 <1> ; For this reason, types allow the expression evaluator 1129 <1> ; to keep track which of the term's bytes are actually 1130 <1> ; going to be used. The bit mask of required bytes 1131 <1> ; indicates which bytes are not discarded by any of a 1132 <1> ; term's type operators. 1133 <1> ; 1134 <1> ; The second byte of each entry (applied to ch by the 1135 <1> ; reader, ie high byte of cx) indicates a mask to 1136 <1> ; apply to the bit mask of required bytes. Note that 1137 <1> ; this mask is applied first, before the shift that's 1138 <1> ; described next. 1139 <1> ; The first byte of each entry (loaded into cl by the 1140 <1> ; reader, ie low byte of cx) indicates a shift left 1141 <1> ; count to apply to the bit mask of required bytes. 1142 <1> ; (Only the segment type doesn't have 0 currently.) 1143 <1> ; 1144 <1> ; Note that types are parsed forwards through the input 1145 <1> ; (ie the specified command) but are actually applied 1146 <1> ; to the numeric value they refer to backwards, that 1147 <1> ; is, a type that is closer to the term in the input 1148 <1> ; is applied to the term's result before a type that's 1149 <1> ; farther from the term. 1150 <1> ; Misleadingly, this reversal isn't very apparent in 1151 <1> ; most processing of the type and unary operators. 1152 <1> ; The segment type's shifting and masking reflects the 1153 <1> ; reversal: while the actual operation is to shift 1154 <1> ; right then restrict to the low word, the entry in 1155 <1> ; this table indicates to restrict the bit mask to 1156 <1> ; the low word then shift left. 1157 <1> align 2, db 0 1158 <1> typebitmasks: 1159 00004B8A 0001 <1> db 0, 1b ; byte 1160 00004B8C 0003 <1> db 0, 11b ; word 1161 00004B8E 0007 <1> db 0, 111b ; 3byte 1162 00004B90 000F <1> db 0, 1111b ; dword 1163 00004B92 000F <1> db 0, 1111b ; pointer 1164 00004B94 0003 <1> db 0, 11b ; offset 1165 00004B96 0203 <1> db 2, 11b ; segment 1166 <1> 1167 <1> 1168 <1> ; Dispatch table for type conversion functions. 1169 <1> ; 1170 <1> ; INP: bx:dx = dword input 1171 <1> ; CF = signedness of type conversion 1172 <1> ; ah from lahf with the same CF as current 1173 <1> ; al = type (80h = pointer, 40h = signed) 1174 <1> ; OUT: bx:dx = new value 1175 <1> ; ah = type (80h = pointer, 40h = signed) 1176 <1> ; CHG: ax 1177 <1> ; REM: Dispatch table in section lDEBUG_CODE or lDEBUG_CODE2 1178 <1> align 2, db 0 1179 <1> typehandlers: 1180 00004B98 [2A8A] <1> dw handlebyte 1181 00004B9A [358A] <1> dw handleword 1182 00004B9C [1D8A] <1> dw handle3byte 1183 00004B9E [408A] <1> dw handledword 1184 00004BA0 [488A] <1> dw handlepointer 1185 00004BA2 [358A] <1> dw handleoffset 1186 00004BA4 [178A] <1> dw handlesegment 1187 <1> 1188 <1> 1189 <1> %if _EXPRDUALCODE && _DUALCODE 1190 <1> usesection lDEBUG_CODE2 1191 <1> %else 1192 <1> usesection lDEBUG_CODE 1193 <1> %endif 1194 <1> 1195 <1> handlesegment: section_of_function 1196 00008A17 89DA <1> mov dx, bx 1197 00008A19 30E4 <1> xor ah, ah ; NC, ah = 0 1198 00008A1B EB18 <1> jmp short handleword 1199 <1> handleoffset equ handleword 1200 <1> 1201 <1> handle3byte: section_of_function 1202 00008A1D B700 <1> mov bh, 0 1203 00008A1F 7307 <1> jnc .zero ; (iff unsigned type -->) 1204 00008A21 84DB <1> test bl, bl ; signed ? 1205 00008A23 7902 <1> jns .zero_f ; no --> 1206 00008A25 FECF <1> dec bh 1207 <1> .zero_f: 1208 00008A27 9E <1> sahf ; restore CF 1209 <1> .zero: 1210 00008A28 EB16 <1> jmp handledword 1211 <1> 1212 <1> handlebyte: section_of_function 1213 00008A2A B600 <1> mov dh, 0 1214 00008A2C 7307 <1> jnc .zero ; (iff unsigned type -->) 1215 00008A2E 84D2 <1> test dl, dl ; signed ? 1216 00008A30 7902 <1> jns .zero_f ; no --> 1217 00008A32 FECE <1> dec dh 1218 <1> .zero_f: 1219 00008A34 9E <1> sahf ; restore CF 1220 <1> .zero: 1221 <1> handleword: section_of_function 1222 00008A35 BB0000 <1> mov bx, 0 1223 00008A38 7306 <1> jnc .zero ; (iff unsigned type -->) 1224 00008A3A 85D2 <1> test dx, dx ; signed ? 1225 00008A3C 7901 <1> jns .zero_f ; no --> 1226 00008A3E 4B <1> dec bx 1227 <1> .zero_f: 1228 00008A3F 9E <1> sahf ; restore CF 1229 <1> .zero: 1230 <1> handledword: section_of_function 1231 00008A40 7203 <1> jc .signed ; if signed --> 1232 00008A42 30E4 <1> xor ah, ah ; return pointer=0 signed=0 1233 00008A44 C3 <1> retn 1234 <1> 1235 <1> .signed: 1236 00008A45 B440 <1> mov ah, 40h ; return pointer=0 signed=1 1237 00008A47 C3 <1> retn 1238 <1> 1239 <1> handlepointer: section_of_function 1240 00008A48 B480 <1> mov ah, 80h ; return pointer=1 signed=0 1241 00008A4A C3 <1> retn 1242 <1> 1243 <1> 1244 <1> usesection lDEBUG_DATA_ENTRY 1245 <1> 1246 <1> ; List of binary and unary operators. 1247 <1> ; The order has to match that in the respective 1248 <1> ; operator handler dispatch table below. 1249 <1> align 2, db 0 1250 <1> operators: 1251 00004BA6 15002B2D2A2F253C3E- <1> .: countedw "+-*/%<>=!|&^oOaAxXcC?" 1251 00004BAF 3D217C265E6F4F6141- <1> 1251 00004BB8 785863433F <1> 1252 <1> .amount: equ $ - . - 2 1253 00004BBD 00 <1> align 2, db 0 1254 <1> unaryoperators: 1255 00004BBE 05002B2D7E213F <1> .: countedw "+-~!?" 1256 <1> .amount: equ $ - . - 2 1257 <1> 1258 <1> 1259 <1> ; Dispatch table for unary operators, 1260 <1> ; used by getexpression. 1261 <1> ; Functions in this table are called with: 1262 <1> ; 1263 <1> ; INP: bx:dx = number 1264 <1> ; ah = type 1265 <1> ; OUT: bx:dx = result 1266 <1> ; ah = type 1267 <1> ; CHG: - 1268 <1> ; REM: Dispatch table in section lDEBUG_CODE or lDEBUG_CODE2 1269 00004BC5 00 <1> align 2, db 0 1270 <1> unaryoperatorhandlers: 1271 <1> .: 1272 00004BC6 [5F8A] <1> dw uoh_plus ; + 1273 00004BC8 [558A] <1> dw uoh_minus ; - 1274 00004BCA [608A] <1> dw uoh_not_bitwise ; ~ 1275 00004BCC [678A] <1> dw uoh_not_boolean ; ! 1276 00004BCE [4B8A] <1> dw uoh_abs ; ? 1277 <1> .amount: equ ($ - .) / 2 1278 <1> %if .amount != unaryoperators.amount 1279 <1> %error String and table mismatch 1280 <1> %endif 1281 <1> 1282 <1> 1283 <1> %if _EXPRDUALCODE && _DUALCODE 1284 <1> usesection lDEBUG_CODE2 1285 <1> %else 1286 <1> usesection lDEBUG_CODE 1287 <1> %endif 1288 <1> 1289 <1> uoh_abs: section_of_function 1290 00008A4B 80E4BF <1> and ah, ~ 40h ; make type signed=0 1291 00008A4E F6C780 <1> test bh, 80h ; negative ? 1292 00008A51 740C <1> jz uoh_plus ; no --> 1293 00008A53 EB03 <1> jmp calculate_minus_bxdx 1294 <1> uoh_minus: section_of_function 1295 00008A55 80CC40 <1> or ah, 40h ; make type signed=1 1296 <1> calculate_minus_bxdx: section_of_function 1297 00008A58 F7DB <1> neg bx 1298 00008A5A F7DA <1> neg dx 1299 00008A5C 83DB00 <1> sbb bx, byte 0 ; neg bx:dx 1300 <1> uoh_plus: section_of_function ; (nop) 1301 00008A5F C3 <1> retn 1302 <1> 1303 <1> uoh_not_bitwise: section_of_function 1304 00008A60 B400 <1> mov ah, 0 ; make type pointer=0 signed=0 1305 00008A62 F7D3 <1> not bx 1306 00008A64 F7D2 <1> not dx 1307 00008A66 C3 <1> retn 1308 <1> 1309 <1> uoh_not_boolean: section_of_function 1310 00008A67 B400 <1> mov ah, 0 ; make type pointer=0 signed=0 1311 00008A69 E82E02 <1> nearcall toboolean 1312 00008A6C 80F201 <1> xor dl, 1 ; toggle only bit 0 1313 00008A6F C3 <1> retn 1314 <1> 1315 <1> 1316 <1> usesection lDEBUG_DATA_ENTRY 1317 <1> 1318 <1> ; Word table operatordispatchers: order as in string operators 1319 <1> ; Pointed functions dispatch depending on operator characters 1320 <1> ; Return: operator index, 0 = invalid 1321 <1> 1322 <1> ; Operator index (byte): 1323 <1> ; 0 = invalid, no operator found 1324 <1> ; 1.. = 1-based index in byte table operatorprecedences 1325 <1> ; = 1-based index in word table operatorfunctions 1326 <1> ; = 1-based index in word table operatornames 1327 <1> 1328 <1> ; Dispatch table for (binary) expression operators, 1329 <1> ; used by getexpression. 1330 <1> ; Functions in this table are called with: 1331 <1> ; INP: al = operator character (which is also implicit) 1332 <1> ; si-> remaining line (directly) behind operator character 1333 <1> ; OUT: bl != 0 if a valid operator, 1334 <1> ; bl = operator index 1335 <1> ; si-> behind the last character belonging to the operator 1336 <1> ; bl = 0 if no valid operator 1337 <1> ; CHG: al, bh, dx 1338 <1> 1339 <1> struc opprecs 1340 00000000 ?? <1> OPPREC_INVALID: resb 1 1341 00000001 ?? <1> OPPREC_COND: resb 1 1342 00000002 ?? <1> OPPREC_BOOL_OR: resb 1 1343 00000003 ?? <1> OPPREC_BOOL_XOR:resb 1 1344 00000004 ?? <1> OPPREC_BOOL_AND:resb 1 1345 00000005 ?? <1> OPPREC_COMPARE: resb 1 1346 00000006 ?? <1> OPPREC_BIT_OR: resb 1 1347 00000007 ?? <1> OPPREC_BIT_XOR: resb 1 1348 00000008 ?? <1> OPPREC_BIT_AND: resb 1 1349 00000009 ?? <1> OPPREC_BIT_CLR: resb 1 1350 0000000A ?? <1> OPPREC_SHIFT: resb 1 1351 0000000B ?? <1> OPPREC_ADDSUB: resb 1 1352 0000000C ?? <1> OPPREC_MULDIV: resb 1 1353 0000000D ?? <1> OPPREC_POWER: resb 1 1354 <1> OPPREC_RIGHTOP: ; (to process it first in getexpression) 1355 <1> endstruc 1356 <1> ; The number of precedence levels indicates how many 1357 <1> ; intermediate results getexpression might have to save 1358 <1> ; on its stack. With thirteen levels of precedence, up to 1359 <1> ; twelve intermediate results are pushed by getexpression. 1360 <1> ; (With 6 bytes each, that gives a moderate 72 bytes.) 1361 <1> ; Key to this is that, in case of a low enough operator 1362 <1> ; behind the one that triggered the pushing, the pushed 1363 <1> ; value will be popped before proceeding. This way more 1364 <1> ; intermediate results may be pushed later but the stack 1365 <1> ; never holds intermediate results that don't need to be 1366 <1> ; on the stack. 1367 <1> 1368 <1> ; This is the definition of operator index values. The tables 1369 <1> ; operatorprecedences and operatorfunctions are ordered by this. 1370 <1> ; The operator dispatchers return one of these. 1371 <1> struc ops 1372 00000000 ?? <1> OPERATOR_INVALID: resb 1 ; 0 - invalid 1373 00000001 ?? <1> OPERATOR_PLUS: resb 1 ; + 1374 00000002 ?? <1> OPERATOR_MINUS: resb 1 ; - 1375 00000003 ?? <1> OPERATOR_MULTIPLY: resb 1 ; * 1376 00000004 ?? <1> OPERATOR_DIVIDE: resb 1 ; / 1377 00000005 ?? <1> OPERATOR_MODULO: resb 1 ; % 1378 00000006 ?? <1> OPERATOR_POWER: resb 1 ; ** 1379 00000007 ?? <1> OPERATOR_CMP_BELOW: resb 1 ; < 1380 00000008 ?? <1> OPERATOR_CMP_BELOW_EQUAL: resb 1 ; <= 1381 00000009 ?? <1> OPERATOR_CMP_ABOVE: resb 1 ; > 1382 0000000A ?? <1> OPERATOR_CMP_ABOVE_EQUAL: resb 1 ; >= 1383 0000000B ?? <1> OPERATOR_CMP_EQUAL: resb 1 ; == 1384 0000000C ?? <1> OPERATOR_CMP_NOT_EQUAL: resb 1 ; != 1385 0000000D ?? <1> OPERATOR_SHIFT_LEFT: resb 1 ; << 1386 0000000E ?? <1> OPERATOR_SHIFT_RIGHT: resb 1 ; >> 1387 0000000F ?? <1> OPERATOR_SHIFT_RIGHT_SIGNED: resb 1 ; >>> 1388 00000010 ?? <1> OPERATOR_BIT_MIRROR: resb 1 ; >< 1389 00000011 ?? <1> OPERATOR_BIT_CLR: resb 1 ; clr (bitwise AND with bitwise NOT) 1390 00000012 ?? <1> OPERATOR_BIT_OR: resb 1 ; | 1391 00000013 ?? <1> OPERATOR_BIT_XOR: resb 1 ; ^ 1392 00000014 ?? <1> OPERATOR_BIT_AND: resb 1 ; & 1393 00000015 ?? <1> OPERATOR_BOOL_OR: resb 1 ; || 1394 00000016 ?? <1> OPERATOR_BOOL_XOR: resb 1 ; ^^ 1395 00000017 ?? <1> OPERATOR_BOOL_AND: resb 1 ; && 1396 00000018 ?? <1> OPERATOR_COND: resb 1 ; ?? :: construct (special) 1397 00000019 ?? <1> OPERATOR_RIGHTOP: resb 1 ; (dummy right-operand operator) 1398 <1> endstruc 1399 <1> ; Order of BIT_* needs to be the same as that of BOOL_*. 1400 <1> ; BOOL_* have to follow directly behind BIT_*. 1401 <1> ; "R CF op= expr" depends on that (rr4 in rr.asm). 1402 <1> 1403 <1> ; REM: Dispatch table in section lDEBUG_CODE or lDEBUG_CODE2 1404 <1> align 2, db 0 1405 <1> operatordispatchers: 1406 <1> .: 1407 00004BD0 [738A] <1> dw od_plus ; + 1408 00004BD2 [708A] <1> dw od_minus ; - 1409 00004BD4 [768A] <1> dw od_multiply ; * ** 1410 00004BD6 [808A] <1> dw od_divide ; / 1411 00004BD8 [838A] <1> dw od_modulo ; % 1412 00004BDA [AB8A] <1> dw od_below ; < <> <= << 1413 00004BDC [868A] <1> dw od_above ; > >< >= >> >>> 1414 00004BDE [C88A] <1> dw od_equal ; == =< => 1415 00004BE0 [DA8A] <1> dw od_not ; != 1416 00004BE2 [E28A] <1> dw od_or ; | || 1417 00004BE4 [ED8A] <1> dw od_and ; & && 1418 00004BE6 [F88A] <1> dw od_xor ; ^ ^^ 1419 00004BE8 [0A8B] <1> dw od_o ; o 1420 00004BEA [0A8B] <1> dw od_o ; O 1421 00004BEC [118B] <1> dw od_a ; a 1422 00004BEE [118B] <1> dw od_a ; A 1423 00004BF0 [188B] <1> dw od_x ; x 1424 00004BF2 [188B] <1> dw od_x ; X 1425 00004BF4 [1F8B] <1> dw od_c ; c 1426 00004BF6 [1F8B] <1> dw od_c ; C 1427 00004BF8 [038B] <1> dw od_cond ; ? 1428 <1> .end: equ $ - . 1429 <1> .amount: equ ($ - .) / 2 1430 <1> %if .amount != operators.amount 1431 <1> %error String and table mismatch 1432 <1> %endif 1433 <1> %if .amount > 100h 1434 <1> %error Too many operator dispatchers 1435 <1> %endif 1436 <1> 1437 <1> 1438 <1> operatorprecedences: 1439 <1> .: 1440 00004BFA 00 <1> db OPPREC_INVALID ; need this for some checks 1441 00004BFB 0B <1> db OPPREC_ADDSUB ; + 1442 00004BFC 0B <1> db OPPREC_ADDSUB ; - 1443 00004BFD 0C <1> db OPPREC_MULDIV ; * 1444 00004BFE 0C <1> db OPPREC_MULDIV ; / 1445 00004BFF 0C <1> db OPPREC_MULDIV ; % 1446 00004C00 0D <1> db OPPREC_POWER ; ** 1447 00004C01 05 <1> db OPPREC_COMPARE ; < 1448 00004C02 05 <1> db OPPREC_COMPARE ; <= 1449 00004C03 05 <1> db OPPREC_COMPARE ; > 1450 00004C04 05 <1> db OPPREC_COMPARE ; >= 1451 00004C05 05 <1> db OPPREC_COMPARE ; == 1452 00004C06 05 <1> db OPPREC_COMPARE ; != 1453 00004C07 0A <1> db OPPREC_SHIFT ; << 1454 00004C08 0A <1> db OPPREC_SHIFT ; >> 1455 00004C09 0A <1> db OPPREC_SHIFT ; >>> 1456 00004C0A 0A <1> db OPPREC_SHIFT ; >< 1457 00004C0B 09 <1> db OPPREC_BIT_CLR ; clr 1458 00004C0C 06 <1> db OPPREC_BIT_OR ; | 1459 00004C0D 07 <1> db OPPREC_BIT_XOR ; ^ 1460 00004C0E 08 <1> db OPPREC_BIT_AND ; & 1461 00004C0F 02 <1> db OPPREC_BOOL_OR ; || 1462 00004C10 03 <1> db OPPREC_BOOL_XOR ; ^^ 1463 00004C11 04 <1> db OPPREC_BOOL_AND ; && 1464 00004C12 01 <1> db OPPREC_COND ; ?? :: construct 1465 00004C13 0E <1> db OPPREC_RIGHTOP ; getexpression: no number yet 1466 <1> .amount: equ $ - . 1467 <1> %if .amount != ops_size 1468 <1> %error Operators table size mismatch 1469 <1> %endif 1470 <1> 1471 <1> 1472 <1> ; REM: Dispatch table in section lDEBUG_CODE or lDEBUG_CODE2 1473 <1> align 2, db 0 1474 <1> operatorfunctions: 1475 <1> .: 1476 00004C14 [5D82] <1> dw error_expr ; should not be called 1477 00004C16 [4F8B] <1> dw of_plus ; + 1478 00004C18 [4C8B] <1> dw of_minus ; - 1479 00004C1A [5C8B] <1> dw of_multiply ; * 1480 00004C1C [878B] <1> dw of_divide ; / 1481 00004C1E [2C8B] <1> dw of_modulo ; % 1482 00004C20 [238C] <1> dw of_power ; ** 1483 00004C22 [7C8C] <1> dw of_compare_below ; < 1484 00004C24 [768C] <1> dw of_compare_below_equal ; <= 1485 00004C26 [948C] <1> dw of_compare_above ; > 1486 00004C28 [8E8C] <1> dw of_compare_above_equal ; >= 1487 00004C2A [888C] <1> dw of_compare_equal ; == 1488 00004C2C [828C] <1> dw of_compare_not_equal ; != 1489 00004C2E [CF8C] <1> dw of_shift_left ; << 1490 00004C30 [B78C] <1> dw of_shift_right ; >> 1491 00004C32 [C38C] <1> dw of_shift_right_signed ; >>> 1492 00004C34 [F68C] <1> dw of_bit_mirror ; >< 1493 00004C36 [538D] <1> dw of_clr_bitwise ; clr 1494 00004C38 [418D] <1> dw of_or_bitwise ; | 1495 00004C3A [688D] <1> dw of_xor_bitwise ; ^ 1496 00004C3C [578D] <1> dw of_and_bitwise ; & 1497 00004C3E [4C8D] <1> dw of_or_boolean ; || 1498 00004C40 [728D] <1> dw of_xor_boolean ; ^^ 1499 00004C42 [618D] <1> dw of_and_boolean ; && 1500 00004C44 [E297] <1> dw of_cond ; ?? :: construct 1501 00004C46 [A48C] <1> dw of_rightop ; set to right operand 1502 <1> .amount: equ ($ - .) / 2 1503 <1> %if .amount != ops_size 1504 <1> %error Operators table size mismatch 1505 <1> %endif 1506 <1> 1507 <1> 1508 <1> %if _EXPRESSION_DEBUG 1509 <1> 1510 <1> %define OPNAMES db "" 1511 <1> %macro opname 1.nolist 1512 <1> %defstr %%string %1 1513 <1> %substr %%prefix %%string 1,3 1514 <1> %ifidni %%prefix, "of_" 1515 <1> %substr %%string %%string 4,-1 1516 <1> %endif 1517 <1> %xdefine OPNAMES OPNAMES,%%name:,{asciz %%string} 1518 <1> dw %%name 1519 <1> %endmacro 1520 <1> 1521 <1> %macro opnamesstrings 1-* 1522 <1> %rep %0 1523 <1> %1 1524 <1> %rotate 1 1525 <1> %endrep 1526 <1> %endmacro 1527 <1> 1528 <1> align 2, db 0 1529 <1> operatornames: 1530 <1> .: 1531 <1> opname invalid ; invalid 1532 <1> opname of_plus ; + 1533 <1> opname of_minus ; - 1534 <1> opname of_multiply ; * 1535 <1> opname of_divide ; / 1536 <1> opname of_modulo ; % 1537 <1> opname of_power ; ** 1538 <1> opname of_compare_below ; < 1539 <1> opname of_compare_below_equal ; <= 1540 <1> opname of_compare_above ; > 1541 <1> opname of_compare_above_equal ; >= 1542 <1> opname of_compare_equal ; == 1543 <1> opname of_compare_not_equal ; != 1544 <1> opname of_shift_left ; << 1545 <1> opname of_shift_right ; >> 1546 <1> opname of_shift_right_signed ; >>> 1547 <1> opname of_bit_mirror ; >< 1548 <1> opname of_clr_bitwise ; clr 1549 <1> opname of_or_bitwise ; | 1550 <1> opname of_xor_bitwise ; ^ 1551 <1> opname of_and_bitwise ; & 1552 <1> opname of_or_boolean ; || 1553 <1> opname of_xor_boolean ; ^^ 1554 <1> opname of_and_boolean ; && 1555 <1> opname of_cond ; ?? :: construct 1556 <1> opname right ; set to right operand 1557 <1> .amount: equ ($ - .) / 2 1558 <1> %if .amount != ops_size 1559 <1> %error Operators table size mismatch 1560 <1> %endif 1561 <1> 1562 <1> opnamesstrings OPNAMES 1563 <1> %endif 1564 <1> 1565 <1> %if _EXPRDUALCODE && _DUALCODE 1566 <1> usesection lDEBUG_CODE2 1567 <1> %else 1568 <1> usesection lDEBUG_CODE 1569 <1> %endif 1570 <1> 1571 <1> od_minus: section_of_function 1572 00008A70 B302 <1> mov bl, OPERATOR_MINUS 1573 00008A72 C3 <1> retn 1574 <1> 1575 <1> od_plus: section_of_function 1576 00008A73 B301 <1> mov bl, OPERATOR_PLUS 1577 00008A75 C3 <1> retn 1578 <1> 1579 <1> od_multiply: section_of_function 1580 00008A76 B303 <1> mov bl, OPERATOR_MULTIPLY 1581 00008A78 3804 <1> cmp byte [si], al 1582 00008A7A 7503 <1> jne .ret 1583 00008A7C 46 <1> inc si 1584 00008A7D B306 <1> mov bl, OPERATOR_POWER 1585 <1> .ret: 1586 00008A7F C3 <1> retn 1587 <1> 1588 <1> od_divide: section_of_function 1589 00008A80 B304 <1> mov bl, OPERATOR_DIVIDE 1590 00008A82 C3 <1> retn 1591 <1> 1592 <1> od_modulo: section_of_function 1593 00008A83 B305 <1> mov bl, OPERATOR_MODULO 1594 00008A85 C3 <1> retn 1595 <1> 1596 <1> od_above: section_of_function 1597 00008A86 3804 <1> cmp byte [si], al 1598 00008A88 7411 <1> je .shr 1599 00008A8A 803C3C <1> cmp byte [si], '<' 1600 00008A8D 7418 <1> je .mirror 1601 00008A8F 803C3D <1> cmp byte [si], '=' 1602 00008A92 7403 <1> je .cmp_ae 1603 00008A94 B309 <1> mov bl, OPERATOR_CMP_ABOVE 1604 00008A96 C3 <1> retn 1605 <1> .cmp_ae: 1606 00008A97 46 <1> inc si 1607 00008A98 B30A <1> mov bl, OPERATOR_CMP_ABOVE_EQUAL 1608 00008A9A C3 <1> retn 1609 <1> .shr: 1610 00008A9B 46 <1> inc si 1611 00008A9C 3804 <1> cmp byte [si], al 1612 00008A9E 7403 <1> je .sar 1613 00008AA0 B30E <1> mov bl, OPERATOR_SHIFT_RIGHT 1614 00008AA2 C3 <1> retn 1615 <1> .sar: 1616 00008AA3 46 <1> inc si 1617 00008AA4 B30F <1> mov bl, OPERATOR_SHIFT_RIGHT_SIGNED 1618 00008AA6 C3 <1> retn 1619 <1> .mirror: 1620 00008AA7 46 <1> inc si 1621 00008AA8 B310 <1> mov bl, OPERATOR_BIT_MIRROR 1622 00008AAA C3 <1> retn 1623 <1> 1624 <1> od_below: section_of_function 1625 00008AAB 3804 <1> cmp byte [si], al 1626 00008AAD 7411 <1> je .shl 1627 00008AAF 803C3E <1> cmp byte [si], '>' 1628 00008AB2 7410 <1> je .ncmp 1629 00008AB4 803C3D <1> cmp byte [si], '=' 1630 00008AB7 7403 <1> je .cmp_be 1631 00008AB9 B307 <1> mov bl, OPERATOR_CMP_BELOW 1632 00008ABB C3 <1> retn 1633 <1> .cmp_be: 1634 00008ABC 46 <1> inc si 1635 00008ABD B308 <1> mov bl, OPERATOR_CMP_BELOW_EQUAL 1636 00008ABF C3 <1> retn 1637 <1> .shl: 1638 00008AC0 46 <1> inc si 1639 00008AC1 B30D <1> mov bl, OPERATOR_SHIFT_LEFT 1640 00008AC3 C3 <1> retn 1641 <1> .ncmp: 1642 <1> od_not.ncmp: 1643 00008AC4 46 <1> inc si 1644 00008AC5 B30C <1> mov bl, OPERATOR_CMP_NOT_EQUAL 1645 00008AC7 C3 <1> retn 1646 <1> 1647 <1> od_equal: section_of_function 1648 00008AC8 803C3E <1> cmp byte [si], '>' 1649 00008ACB 74CA <1> je od_above.cmp_ae 1650 00008ACD 803C3C <1> cmp byte [si], '<' 1651 00008AD0 74EA <1> je od_below.cmp_be 1652 00008AD2 3804 <1> cmp byte [si], al 1653 00008AD4 7509 <1> jne .invalid ; no valid operator --> 1654 <1> .cmp: 1655 00008AD6 46 <1> inc si 1656 00008AD7 B30B <1> mov bl, OPERATOR_CMP_EQUAL 1657 00008AD9 C3 <1> retn 1658 <1> 1659 <1> od_not: section_of_function 1660 00008ADA 803C3D <1> cmp byte [si], '=' 1661 00008ADD 74E5 <1> je .ncmp 1662 <1> od_equal.invalid: 1663 00008ADF B300 <1> mov bl, OPERATOR_INVALID 1664 00008AE1 C3 <1> retn 1665 <1> 1666 <1> od_or: section_of_function 1667 00008AE2 3804 <1> cmp byte [si], al 1668 00008AE4 7403 <1> je .boolean 1669 00008AE6 B312 <1> mov bl, OPERATOR_BIT_OR 1670 00008AE8 C3 <1> retn 1671 <1> .boolean: 1672 00008AE9 46 <1> inc si 1673 00008AEA B315 <1> mov bl, OPERATOR_BOOL_OR 1674 00008AEC C3 <1> retn 1675 <1> od_and: section_of_function 1676 00008AED 3804 <1> cmp byte [si], al 1677 00008AEF 7403 <1> je .boolean 1678 00008AF1 B314 <1> mov bl, OPERATOR_BIT_AND 1679 00008AF3 C3 <1> retn 1680 <1> .boolean: 1681 00008AF4 46 <1> inc si 1682 00008AF5 B317 <1> mov bl, OPERATOR_BOOL_AND 1683 00008AF7 C3 <1> retn 1684 <1> 1685 <1> od_xor: section_of_function 1686 00008AF8 3804 <1> cmp byte [si], al 1687 00008AFA 7403 <1> je .boolean 1688 00008AFC B313 <1> mov bl, OPERATOR_BIT_XOR 1689 00008AFE C3 <1> retn 1690 <1> .boolean: 1691 00008AFF 46 <1> inc si 1692 00008B00 B316 <1> mov bl, OPERATOR_BOOL_XOR 1693 00008B02 C3 <1> retn 1694 <1> 1695 <1> 1696 <1> od_cond: section_of_function 1697 00008B03 B318 <1> mov bl, OPERATOR_COND 1698 00008B05 BA[3A1C] <1> mov dx, msg.questionmark 1699 00008B08 EB1A <1> jmp od_string_common 1700 <1> 1701 <1> od_o: section_of_function 1702 00008B0A B312 <1> mov bl, OPERATOR_BIT_OR 1703 00008B0C BA[3D1C] <1> mov dx, msg.r 1704 00008B0F EB13 <1> jmp od_string_common 1705 <1> 1706 <1> od_a: section_of_function 1707 00008B11 B314 <1> mov bl, OPERATOR_BIT_AND 1708 00008B13 BA[3F1C] <1> mov dx, msg.nd 1709 00008B16 EB0C <1> jmp od_string_common 1710 <1> 1711 <1> od_x: section_of_function 1712 00008B18 B313 <1> mov bl, OPERATOR_BIT_XOR 1713 00008B1A BA[3C1C] <1> mov dx, msg.or 1714 00008B1D EB05 <1> jmp od_string_common 1715 <1> 1716 <1> od_c: section_of_function 1717 00008B1F B311 <1> mov bl, OPERATOR_BIT_CLR 1718 00008B21 BA[421C] <1> mov dx, msg.lr 1719 <1> ; jmp od_string_common 1720 <1> 1721 <1> od_string_common: section_of_function 1722 00008B24 E8F90D <1> nearcall isstring? 1723 00008B27 7402 <1> je .ret 1724 <1> .none: 1725 00008B29 31DB <1> xor bx, bx 1726 <1> .ret: 1727 00008B2B C3 <1> retn 1728 <1> 1729 <1> 1730 <1> ; (Binary) Expression operator functions, 1731 <1> ; used by getexpression. 1732 <1> ; These functions are called with: 1733 <1> ; INP: dword [hhvar] = previous number (left-hand operand) 1734 <1> ; byte [hhtype] = previous type 1735 <1> ; bx:dx = following number (right-hand operand) 1736 <1> ; ah = following type 1737 <1> ; OUT: bx:dx = result 1738 <1> ; ah = type 1739 <1> ; CHG: ax, cx 1740 <1> ; Note: Errors (divisor zero) are currently simply handled 1741 <1> ; by jumping to "error". 1742 <1> ; getexpression mustn't be called after until hhvar is 1743 <1> ; no longer used, as the call might overwrite hhvar. 1744 <1> ; 1745 <1> ; Type info (in ah and b[hhtype]) appears to be correctly 1746 <1> ; passed to here already. However, how should that be used? 1747 <1> ; 1748 <1> ; Quite simply, doing any arithmetic on two unsigned numbers 1749 <1> ; could return the smallest possible unsigned type (so that 1750 <1> ; if the result is <= 255 then the type is 1, if <= 65536 1751 <1> ; then the type is 2, else the type is 4). 1752 <1> ; 1753 <1> ; Handling two signed numbers here might be equally simple: 1754 <1> ; if the result is >= -128 && <= 127 then the type is 81h, 1755 <1> ; if the result is >= -32768 && <= 32767 then the type is 1756 <1> ; 82h, otherwise the type is 84h. Have to look into this. 1757 <1> ; (How does this interact with the unsignedness of the 1758 <1> ; actual computations?) 1759 <1> ; 1760 <1> ; It gets hairy when one operand is signed and the other 1761 <1> ; isn't; generally, two sub-cases of this exist: first, the 1762 <1> ; signed operand is positive, second, the signed operand is 1763 <1> ; negative. (Whether this distinction actually makes sense 1764 <1> ; for the implementation is still to be determined.) 1765 <1> ; Possible models: 1766 <1> ; * Result is always signed. 1767 <1> ; * Result is always unsigned(?!). 1768 <1> ; * Result is treated as signed, but if it's positive its 1769 <1> ; type is changed to unsigned. 1770 <1> ; 1771 <1> ; It is also possible that operators could be handled 1772 <1> ; differently, for example, (some) bit and boolean 1773 <1> ; operators could imply unsigned operands in any case. 1774 <1> ; (>>> obviously implies a signed left operand already.) 1775 <1> ; 1776 <1> ; Note that (signed) negative bit shifting counts could 1777 <1> ; imply reversing the operation; << becomes >> and such. 1778 <1> ; 1779 <1> ; Note that for the addition of, for example, bit rotation, 1780 <1> ; it would be useful to retain the originally used type 1781 <1> ; inside getdword. At the end of getdword, the current bit 1782 <1> ; counting could be changed to use the "signed" bit of the 1783 <1> ; types and then determine which signed or unsigned type is 1784 <1> ; large enough to hold the value. (It might already work 1785 <1> ; mostly like that.) (Is this specifically about binary 1786 <1> ; operators? - No. In fact, binary operators are the most 1787 <1> ; likely to be (one of) the syntactic element(s) which 1788 <1> ; should change (and possible 'optimize') types. - Then 1789 <1> ; this might still apply to unary operators, and brackets 1790 <1> ; and parentheses. In particular, the later should call 1791 <1> ; a different entry or instruct getdword not to optimize 1792 <1> ; the type at the end so as to retain it. - Although in 1793 <1> ; cases where that matters, the parentheses are arguably 1794 <1> ; unnecessary, aren't they?) 1795 <1> ; 1796 <1> ; It has to be decided whether there should be implicit 1797 <1> ; dispatching based on the operands' types' signedness. 1798 <1> ; For example, currently (with all operands being implied 1799 <1> ; to be unsigned) there exist >> and >>>, and there could 1800 <1> ; exist > and S>. With implicit signedness dispatching, the 1801 <1> ; behaviour of >> would change: it would expose the current 1802 <1> ; >>'s behaviour with an unsigned (left) operand, and the 1803 <1> ; current >>>'s behaviour with a signed (left) operand. 1804 <1> ; (Either U(nsigned)>> and S(igned)>> operators could then 1805 <1> ; exist, which would imply an unsigned or signed left 1806 <1> ; operand respectively, or the affected operands' signedness 1807 <1> ; could be changed with the currently available prefix or 1808 <1> ; possible new postfix unary operators. 1809 <1> of_modulo: section_of_function 1810 00008B2C FF36[F253] <1> push word [hhvar+2] 1811 00008B30 FF36[F053] <1> push word [hhvar] 1812 00008B34 53 <1> push bx 1813 00008B35 52 <1> push dx 1814 00008B36 E87200 <1> call of_divide.no_hh_div; bx:dx := prev / foll 1815 00008B39 8F06[F053] <1> pop word [hhvar] 1816 00008B3D 8F06[F253] <1> pop word [hhvar+2] 1817 00008B41 E81800 <1> nearcall of_multiply ; bx:dx := (prev / foll) * foll 1818 00008B44 8F06[F053] <1> pop word [hhvar] 1819 00008B48 8F06[F253] <1> pop word [hhvar+2] 1820 <1> ; jmp short of_minus ; bx:dx := prev - ((prev / foll) * foll) 1821 <1> 1822 <1> of_minus: section_of_function 1823 00008B4C E809FF <1> nearcall calculate_minus_bxdx 1824 <1> of_plus: section_of_function 1825 00008B4F 0316[F053] <1> add dx, word [hhvar] 1826 00008B53 131E[F253] <1> adc bx, word [hhvar+2] 1827 <1> or_hhtype: section_of_function 1828 00008B57 0A26[0154] <1> or ah, byte [hhtype] 1829 00008B5B C3 <1> retn 1830 <1> 1831 <1> of_multiply: section_of_function; bx:dx := var * bx:dx 1832 00008B5C 0826[0154] <1> or byte [hhtype], ah 1833 00008B60 56 <1> push si 1834 00008B61 57 <1> push di ; si:di is used as temporary storage 1835 00008B62 89D0 <1> mov ax, dx 1836 00008B64 50 <1> push ax 1837 00008B65 F726[F053] <1> mul word [hhvar] 1838 00008B69 89C7 <1> mov di, ax 1839 00008B6B 89D6 <1> mov si, dx 1840 00008B6D 58 <1> pop ax 1841 00008B6E F726[F253] <1> mul word [hhvar+2] 1842 00008B72 01C6 <1> add si, ax 1843 00008B74 89D8 <1> mov ax, bx 1844 00008B76 F726[F053] <1> mul word [hhvar] 1845 00008B7A 01C6 <1> add si, ax 1846 <1> ; bx*[hhvar+2] not required, completely overflows 1847 00008B7C 89FA <1> mov dx, di 1848 00008B7E 89F3 <1> mov bx, si 1849 00008B80 5F <1> pop di 1850 00008B81 5E <1> pop si ; restore those 1851 <1> set_hhtype: section_of_function 1852 00008B82 8A26[0154] <1> mov ah, byte [hhtype] 1853 00008B86 C3 <1> retn 1854 <1> 1855 <1> of_divide: section_of_function ; bx:dx := var / bx:dx 1856 <1> %if _HHDIVREMAIN 1857 00008B87 833E[FC53]01 <1> cmp word [hh_depth], 1 1858 00008B8C 751D <1> jne @F 1859 00008B8E C606[0254]FF <1> mov byte [hh_div_active], -1 1860 00008B93 8916[F853] <1> mov word [hh_div_divisor], dx 1861 00008B97 891E[FA53] <1> mov word [hh_div_divisor + 2], bx 1862 00008B9B FF36[F253] <1> push word [hhvar + 2] 1863 00008B9F FF36[F053] <1> push word [hhvar] 1864 00008BA3 8F06[F453] <1> pop word [hh_div_dividend] 1865 00008BA7 8F06[F653] <1> pop word [hh_div_dividend + 2] 1866 <1> @@: 1867 <1> %endif 1868 <1> .no_hh_div: 1869 00008BAB 0826[0154] <1> or byte [hhtype], ah 1870 00008BAF 53 <1> push bx 1871 00008BB0 09D3 <1> or bx, dx ; divisor zero ? 1872 00008BB2 5B <1> pop bx 1873 00008BB3 744A <1> jz short .error ; divisor zero ! 1874 00008BB5 EB4B <1> _386_jmps .32 ; 386, use 32-bit code --> 1875 00008BB7 85DB <1> test bx, bx ; need only 16-bit divisor ? 1876 00008BB9 7514 <1> jnz .difficultdiv16 ; nope --> 1877 00008BBB 89D1 <1> mov cx, dx 1878 00008BBD 31D2 <1> xor dx, dx 1879 00008BBF A1[F253] <1> mov ax, word [hhvar+2] ; dx:ax = high word of previous number 1880 00008BC2 F7F1 <1> div cx 1881 00008BC4 89C3 <1> mov bx, ax 1882 00008BC6 A1[F053] <1> mov ax, word [hhvar] ; ax = low word of previous number, dx = remainder 1883 00008BC9 F7F1 <1> div cx 1884 00008BCB 89C2 <1> mov dx, ax ; bx:dx = result 1885 00008BCD EBB3 <1> jmp set_hhtype 1886 <1> 1887 <1> .difficultdiv16: ; code adapted from Art of Assembly chapter 9 1888 <1> ; refer to http://www.plantation-productions.com/Webster/www.artofasm.com/DOS/ch09/CH09-4.html#HEADING4-99 1889 00008BCF B92000 <1> mov cx, 32 1890 00008BD2 55 <1> push bp 1891 00008BD3 56 <1> push si 1892 00008BD4 57 <1> push di 1893 00008BD5 A1[F053] <1> mov ax, word [hhvar] 1894 00008BD8 8B2E[F253] <1> mov bp, word [hhvar+2] ; bp:ax = previous number 1895 00008BDC 31FF <1> xor di, di 1896 00008BDE 31F6 <1> xor si, si ; clear variable si:di 1897 00008BE0 92 <1> xchg ax, dx 1898 00008BE1 87EB <1> xchg bp, bx ; bx:dx = previous number, bp:ax = divisor 1899 <1> .bitloop: 1900 00008BE3 D1E2 <1> shl dx, 1 1901 00008BE5 D1D3 <1> rcl bx, 1 1902 00008BE7 D1D7 <1> rcl di, 1 1903 00008BE9 D1D6 <1> rcl si, 1 ; si:di:bx:dx << 1 1904 00008BEB 39EE <1> cmp si, bp ; does the divisor fit into si:di here ? 1905 00008BED 7502 <1> jne @F 1906 00008BEF 39C7 <1> cmp di, ax 1907 <1> @@: 1908 00008BF1 7205 <1> jb .trynext ; no --> 1909 <1> .goesinto: 1910 00008BF3 29C7 <1> sub di, ax 1911 00008BF5 19EE <1> sbb si, bp ; subtract divisor 1912 00008BF7 42 <1> inc dx ; set a bit of the result (bit was zero before, never carries) 1913 <1> .trynext: 1914 00008BF8 E2E9 <1> loop .bitloop ; loop for 32 bits 1915 00008BFA 5F <1> pop di 1916 00008BFB 5E <1> pop si 1917 00008BFC 5D <1> pop bp 1918 00008BFD EB83 <1> jmp set_hhtype 1919 <1> 1920 <1> .error: 1921 00008BFF E95BF6 <1> jmp error_expr 1922 <1> 1923 <1> %ifn _ONLYNON386 1924 <1> .32: 1925 <1> [cpu 386] 1926 00008C02 6650 <1> push eax 1927 00008C04 6653 <1> push ebx 1928 00008C06 6652 <1> push edx ; to preserve the high words 1929 00008C08 53 <1> push bx 1930 00008C09 52 <1> push dx 1931 00008C0A 665B <1> pop ebx ; ebx = following number 1932 00008C0C 6631D2 <1> xor edx, edx 1933 00008C0F 66A1[F053] <1> mov eax, dword [hhvar] ; edx:eax = previous number 1934 00008C13 66F7F3 <1> div ebx 1935 00008C16 665A <1> pop edx 1936 00008C18 665B <1> pop ebx ; restore high words 1937 00008C1A 6650 <1> push eax 1938 00008C1C 5A <1> pop dx 1939 00008C1D 5B <1> pop bx ; bx:dx = result 1940 00008C1E 6658 <1> pop eax ; restore high word of eax 1941 <1> __CPU__ 1942 00008C20 E95FFF <1> jmp set_hhtype 1943 <1> %endif 1944 <1> 1945 <1> 1946 <1> of_power: section_of_function 1947 00008C23 0826[0154] <1> or byte [hhtype], ah 1948 00008C27 89D9 <1> mov cx, bx 1949 00008C29 89D0 <1> mov ax, dx ; get exponent 1950 00008C2B 09D3 <1> or bx, dx ; exponent zero ? 1951 00008C2D BB0000 <1> mov bx, 0 1952 00008C30 BA0100 <1> mov dx, 1 1953 00008C33 743E <1> jz .ret ; yes, return with result as 1 --> 1954 00008C35 3916[F053] <1> cmp word [hhvar], dx ; optimization: 1955 00008C39 7506 <1> jne .notone 1956 00008C3B 391E[F253] <1> cmp word [hhvar+2], bx 1957 00008C3F 7432 <1> je .ret ; if base is one (and exponent not zero), result is 1 --> 1958 <1> .notone: 1959 00008C41 55 <1> push bp 1960 <1> 1961 <1> .loop: ; cx:ax non-zero here 1962 00008C42 D1E9 <1> shr cx, 1 1963 00008C44 D1D8 <1> rcr ax, 1 ; exponent /= 2 1964 00008C46 50 <1> push ax 1965 00008C47 51 <1> push cx 1966 00008C48 7303 <1> jnc .even ; if exponent was even --> 1967 00008C4A E80FFF <1> nearcall of_multiply ; var *= base 1968 <1> .even: 1969 <1> ; In the last iteration, cx:ax might be zero here 1970 <1> ; making the next call unnecessary. Oh well. 1971 00008C4D 53 <1> push bx 1972 00008C4E 52 <1> push dx 1973 00008C4F 8B1E[F253] <1> mov bx, word [hhvar+2] 1974 00008C53 8B16[F053] <1> mov dx, word [hhvar] ; base 1975 00008C57 E802FF <1> nearcall of_multiply ; * base = base squared 1976 00008C5A 891E[F253] <1> mov word [hhvar+2], bx 1977 00008C5E 8916[F053] <1> mov word [hhvar], dx ; store as new base 1978 00008C62 5A <1> pop dx 1979 00008C63 5B <1> pop bx 1980 00008C64 59 <1> pop cx 1981 00008C65 58 <1> pop ax 1982 <1> 1983 00008C66 89DD <1> mov bp, bx ; optimization: 1984 00008C68 09D5 <1> or bp, dx ; register now zero ? 1985 00008C6A 7406 <1> jz .ret_bp ; if so, return now --> (multiplying zero always results in zero) 1986 00008C6C 89CD <1> mov bp, cx 1987 00008C6E 09C5 <1> or bp, ax ; exponent now zero ? 1988 00008C70 75D0 <1> jnz .loop ; no, loop --> 1989 <1> 1990 <1> .ret_bp: 1991 00008C72 5D <1> pop bp 1992 <1> .ret: 1993 00008C73 E90CFF <1> jmp set_hhtype 1994 <1> 1995 <1> of_compare_below_equal: section_of_function 1996 00008C76 E82C00 <1> nearcall of_helper_compare 1997 00008C79 7628 <1> jbe of_helper_compare_true 1998 00008C7B C3 <1> retn 1999 <1> 2000 <1> of_compare_below: section_of_function 2001 00008C7C E82600 <1> nearcall of_helper_compare 2002 00008C7F 7222 <1> jb of_helper_compare_true 2003 00008C81 C3 <1> retn 2004 <1> 2005 <1> of_compare_not_equal: section_of_function 2006 00008C82 E82000 <1> nearcall of_helper_compare 2007 00008C85 751C <1> jne of_helper_compare_true 2008 00008C87 C3 <1> retn 2009 <1> 2010 <1> of_compare_equal: section_of_function 2011 00008C88 E81A00 <1> nearcall of_helper_compare 2012 00008C8B 7416 <1> je of_helper_compare_true 2013 00008C8D C3 <1> retn 2014 <1> 2015 <1> of_compare_above_equal: section_of_function 2016 00008C8E E81400 <1> nearcall of_helper_compare 2017 00008C91 7310 <1> jae of_helper_compare_true 2018 00008C93 C3 <1> retn 2019 <1> 2020 <1> of_compare_above: section_of_function 2021 00008C94 E80E00 <1> nearcall of_helper_compare 2022 00008C97 770A <1> ja of_helper_compare_true 2023 00008C99 C3 <1> retn 2024 <1> 2025 <1> 2026 <1> ; Called by operator functions to convert a number to boolean 2027 <1> ; 2028 <1> ; INP: bx:dx 2029 <1> ; OUT: dx = 0 or 1 2030 <1> ; bx = 0 2031 <1> ; ZF 2032 <1> toboolean: section_of_function 2033 00008C9A 09D3 <1> or bx, dx ; = 0 iff it was 0000_0000h 2034 00008C9C 83FB01 <1> cmp bx, byte 1 ; CY iff it was 0000_0000h, else NC 2035 00008C9F 19D2 <1> sbb dx, dx ; -1 iff it was 0000_0000h, else 0 2036 00008CA1 31DB <1> xor bx, bx 2037 <1> 2038 <1> ; INP: dx 2039 <1> ; OUT: dx += 1 2040 <1> of_helper_compare_true: section_of_function 2041 00008CA3 42 <1> inc dx ; bx:dx = 0 iff it was 0000_0000h, else 1 2042 <1> 2043 <1> ; Dummy operator computation function, 2044 <1> ; used when setting a register without operator (rr) 2045 <1> ; and to initialize the first getexpression loop iteration 2046 <1> ; INP: dword [hhvar] = previous number (left-hand operand) 2047 <1> ; byte [hhtype] = previous type 2048 <1> ; bx:dx = following number (right-hand operand) 2049 <1> ; ah = following type 2050 <1> ; OUT: bx:dx = result (right-hand operand) 2051 <1> ; ah = type 2052 <1> ; CHG: ax, cx 2053 <1> of_rightop: section_of_function 2054 00008CA4 C3 <1> retn 2055 <1> 2056 <1> 2057 <1> ; Called by operator functions to compare operands 2058 <1> ; 2059 <1> ; INP: dword [hhvar], byte [hhtype] 2060 <1> ; bx:dx, ah 2061 <1> ; OUT: Flags as for "cmp d[hhvar], bxdx" 2062 <1> ; bx:dx = 0 2063 <1> ; ah = 0 2064 <1> of_helper_compare: section_of_function 2065 00008CA5 30E4 <1> xor ah, ah ; type signed=0 pointer=0 2066 00008CA7 391E[F253] <1> cmp word [hhvar+2], bx 2067 00008CAB 7504 <1> jne .ret 2068 00008CAD 3916[F053] <1> cmp word [hhvar], dx 2069 <1> .ret: 2070 00008CB1 BB0000 <1> mov bx, 0 2071 00008CB4 89DA <1> mov dx, bx ; set both to zero (without affecting flags) 2072 00008CB6 C3 <1> retn 2073 <1> 2074 <1> of_shift_right: section_of_function 2075 00008CB7 30E4 <1> xor ah, ah 2076 00008CB9 E81F00 <1> nearcall of_helper_getshiftdata 2077 <1> .loop: 2078 00008CBC D1EB <1> shr bx, 1 2079 00008CBE D1DA <1> rcr dx, 1 2080 00008CC0 E2FA <1> loop .loop 2081 00008CC2 C3 <1> retn 2082 <1> 2083 <1> of_shift_right_signed: section_of_function 2084 00008CC3 B440 <1> mov ah, 40h 2085 00008CC5 E81300 <1> nearcall of_helper_getshiftdata 2086 <1> .loop: 2087 00008CC8 D1FB <1> sar bx, 1 2088 00008CCA D1DA <1> rcr dx, 1 2089 00008CCC E2FA <1> loop .loop 2090 00008CCE C3 <1> retn 2091 <1> 2092 <1> of_shift_left: section_of_function 2093 00008CCF 30E4 <1> xor ah, ah 2094 00008CD1 E80700 <1> nearcall of_helper_getshiftdata 2095 <1> .loop: 2096 00008CD4 D1E2 <1> shl dx, 1 2097 00008CD6 D1D3 <1> rcl bx, 1 2098 00008CD8 E2FA <1> loop .loop 2099 00008CDA C3 <1> retn 2100 <1> 2101 <1> ; Called by operator functions to get shift data 2102 <1> ; 2103 <1> ; This returns to the next caller with the unchanged input 2104 <1> ; operand if the shift count is zero. Otherwise, large shift 2105 <1> ; counts are normalized so the returned value in cx is not 2106 <1> ; zero and not higher than 32. This normalization is not just 2107 <1> ; an optimization, it's required for shift counts that don't 2108 <1> ; fit into a 16-bit counter. 2109 <1> ; 2110 <1> ; INP: bx:dx = shift count 2111 <1> ; OUT: bx:dx = input operand 2112 <1> ; If shift count is >= 1 and <= 32, 2113 <1> ; cx = shift count 2114 <1> ; If shift count is > 32, 2115 <1> ; cx = 32 2116 <1> ; If shift count is zero, 2117 <1> ; discards one near return address before returning 2118 <1> ; CHG: cx 2119 <1> of_helper_getshiftdata: section_of_function 2120 00008CDB 89D1 <1> mov cx, dx 2121 00008CDD 85DB <1> test bx, bx 2122 00008CDF 7505 <1> jnz .largeshift 2123 00008CE1 83FA20 <1> cmp dx, byte 32 2124 00008CE4 7203 <1> jb .normalshift 2125 <1> .largeshift: 2126 00008CE6 B92000 <1> mov cx, 32 ; fix at maximal shift count 2127 <1> .normalshift: 2128 00008CE9 8B16[F053] <1> mov dx, word [hhvar] 2129 00008CED 8B1E[F253] <1> mov bx, word [hhvar+2] 2130 00008CF1 E301 <1> jcxz .break ; shift count zero, return input --> 2131 00008CF3 C3 <1> retn 2132 <1> 2133 <1> .break: 2134 00008CF4 59 <1> pop cx ; discard near return address 2135 00008CF5 C3 <1> retn 2136 <1> 2137 <1> of_bit_mirror: section_of_function 2138 00008CF6 30E4 <1> xor ah, ah 2139 00008CF8 89D1 <1> mov cx, dx 2140 00008CFA 85DB <1> test bx, bx 2141 00008CFC 7505 <1> jnz .large 2142 00008CFE 83FA40 <1> cmp dx, byte 64 2143 00008D01 7205 <1> jb .normal 2144 <1> .large: 2145 00008D03 31DB <1> xor bx, bx ; mirror count 64 or higher: 2146 00008D05 31D2 <1> xor dx, dx ; all 32 bits mirrored with (nonexistent) zero bits 2147 00008D07 C3 <1> retn 2148 <1> .normal: 2149 00008D08 8B16[F053] <1> mov dx, word [hhvar] 2150 00008D0C 8B1E[F253] <1> mov bx, word [hhvar+2] 2151 00008D10 80F901 <1> cmp cl, 1 2152 00008D13 762B <1> jbe .ret ; mirror count one or zero, return input --> 2153 00008D15 56 <1> push si 2154 00008D16 57 <1> push di 2155 <1> 2156 00008D17 51 <1> push cx 2157 00008D18 BFFFFF <1> mov di, -1 2158 00008D1B 89FE <1> mov si, di 2159 <1> .loopmask: 2160 00008D1D D1E7 <1> shl di, 1 2161 00008D1F D1D6 <1> rcl si, 1 2162 00008D21 E2FA <1> loop .loopmask ; create mask of bits not involved in mirroring 2163 00008D23 21DE <1> and si, bx 2164 00008D25 21D7 <1> and di, dx ; get the uninvolved bits 2165 00008D27 59 <1> pop cx 2166 <1> 2167 00008D28 56 <1> push si 2168 00008D29 57 <1> push di ; save them 2169 00008D2A 31F6 <1> xor si, si 2170 00008D2C 31FF <1> xor di, di ; initialize mirrored register 2171 <1> .loop: 2172 00008D2E D1EB <1> shr bx, 1 2173 00008D30 D1DA <1> rcr dx, 1 ; shift out of original register's current LSB 2174 00008D32 D1D7 <1> rcl di, 1 2175 00008D34 D1D6 <1> rcl si, 1 ; into other register's current LSB 2176 00008D36 E2F6 <1> loop .loop 2177 00008D38 5A <1> pop dx 2178 00008D39 5B <1> pop bx ; restore uninvolved bits 2179 00008D3A 09F3 <1> or bx, si 2180 00008D3C 09FA <1> or dx, di ; combine with mirrored bits 2181 <1> 2182 00008D3E 5F <1> pop di 2183 00008D3F 5E <1> pop si 2184 <1> .ret: 2185 00008D40 C3 <1> retn 2186 <1> 2187 <1> of_or_bitwise: section_of_function 2188 00008D41 0B16[F053] <1> or dx, word [hhvar] 2189 00008D45 0B1E[F253] <1> or bx, word [hhvar+2] ; bitwise or 2190 <1> or_hhtype_1: section_of_function 2191 00008D49 E90BFE <1> jmp or_hhtype 2192 <1> 2193 <1> of_or_boolean: section_of_function 2194 00008D4C E82B00 <1> nearcall of_helper_getbool 2195 00008D4F 09DA <1> or dx, bx ; boolean or 2196 00008D51 EB24 <1> jmp short of_helper_retbool 2197 <1> 2198 <1> of_clr_bitwise: section_of_function 2199 00008D53 F7D3 <1> not bx 2200 00008D55 F7D2 <1> not dx 2201 <1> 2202 <1> of_and_bitwise: section_of_function 2203 00008D57 2316[F053] <1> and dx, word [hhvar] 2204 00008D5B 231E[F253] <1> and bx, word [hhvar+2] ; bitwise and 2205 00008D5F EBE8 <1> jmp or_hhtype_1 2206 <1> 2207 <1> of_and_boolean: section_of_function 2208 00008D61 E81600 <1> nearcall of_helper_getbool 2209 00008D64 21DA <1> and dx, bx ; boolean and 2210 00008D66 EB0F <1> jmp short of_helper_retbool 2211 <1> 2212 <1> of_xor_bitwise: section_of_function 2213 00008D68 3316[F053] <1> xor dx, word [hhvar] 2214 00008D6C 331E[F253] <1> xor bx, word [hhvar+2] ; bitwise xor 2215 00008D70 EBD7 <1> jmp or_hhtype_1 2216 <1> 2217 <1> of_xor_boolean: section_of_function 2218 00008D72 E80500 <1> nearcall of_helper_getbool 2219 00008D75 31DA <1> xor dx, bx ; boolean xor 2220 <1> of_helper_retbool: section_of_function 2221 00008D77 31DB <1> xor bx, bx ; high word always zero 2222 00008D79 C3 <1> retn 2223 <1> 2224 <1> ; Called by operator functions to convert operands to boolean 2225 <1> ; 2226 <1> ; INP: bx:dx = next number, ah = type 2227 <1> ; [hhvar] = previous number, [hhtype] = type 2228 <1> ; OUT: bx = next number's boolean value 2229 <1> ; dx = previous number's boolean value 2230 <1> ; ah = 0 2231 <1> of_helper_getbool: section_of_function 2232 00008D7A 30E4 <1> xor ah, ah 2233 00008D7C E81BFF <1> nearcall toboolean 2234 00008D7F 52 <1> push dx 2235 00008D80 8B16[F053] <1> mov dx, word [hhvar] 2236 00008D84 8B1E[F253] <1> mov bx, word [hhvar+2] 2237 00008D88 E80FFF <1> nearcall toboolean 2238 00008D8B 5B <1> pop bx 2239 00008D8C C3 <1> retn 2240 <1> 2241 <1> 2242 <1> usesection lDEBUG_DATA_ENTRY 2243 <1> 2244 <1> isvariable_data: 2245 00004C48 1F <1> reverselfsrtop: db 1Fh 2246 <1> 2247 <1> %if _DEBUG3 2248 <1> align 8, db 0 2249 <1> kregs: dd 0 2250 <1> dd 1 2251 <1> dd 0aa55aa55h 2252 <1> dd -1 2253 <1> times 12 dd 0 2254 <1> %endif 2255 <1> 2256 00004C49 00 <1> align 4, db 0 2257 00004C4C 02000000 <1> lfsr: dd 2 2258 00004C50 01000000 <1> reverselfsr: dd 1 2259 00004C54 03002080 <1> lfsrtap: dd 8020_0003h 2260 <1> %if _SLEEP_NEW 2261 00004C58 0000 <1> getc_repeat_idle: dw 0 2262 00004C5A 0000 <1> sleep_repeat_idle: dw 0 2263 00004C5C 0000 <1> sleep_highest_delta: dw 0 2264 00004C5E 0500 <1> sleep_delta_limit: dw 5 2265 <1> %endif 2266 <1> %if _COUNT || _SCOUNT 2267 00004C60 00000000 <1> count_var: dd 0 2268 <1> %endif 2269 <1> %if _RH 2270 00004C64 0000 <1> rhcount: dw 0 2271 <1> %endif 2272 <1> 2273 <1> 2274 <1> ; REM: Dispatch table in section lDEBUG_CODE or lDEBUG_CODE2 2275 00004C66 00 <1> align 8, db 0 2276 <1> isvariable_struc_list: 2277 <1> 2278 <1> %assign IVS_ONEBYTE 1 2279 <1> isvariable_struc_onebyte_list: 2280 <1> ; name, size, flags, address, array last index, array skip 2281 00004C68 00003000[640D]FF00 <1> isvariablestruc "V", 4, 0, vregs, 255 2282 <1> %if _DEBUG3 2283 <1> isvariablestruc "K", 4, 0, kregs, 15 2284 <1> %endif 2285 <1> isvariable_struc_onebyte_list_end: 2286 <1> 2287 <1> %assign IVS_ONEBYTE 0 2288 <1> isvariable_struc_morebyte_list: 2289 00004C70 [C451]1600[0E0C]00- <1> isvariablestruc "INT8CTRL", 2, 0, intr8_limit 2289 00004C77 00 <1> 2290 00004C78 [CA51]7200[8D8D]00- <1> isvariablestruc "LFSR", 4, ivfSpecialSetUp, var_lfsr_setup 2290 00004C7F 00 <1> 2291 00004C80 [CC51]7300[A38D]00- <1> isvariablestruc "RLFSR", 4, ivfSpecialSetUp, var_reverselfsr_setup 2291 00004C87 00 <1> 2292 00004C88 [CF51]3500[544C]00- <1> isvariablestruc "LFSRTAP", 4, 0, lfsrtap 2292 00004C8F 00 <1> 2293 00004C90 [D451]0600[484C]00- <1> isvariablestruc "RLFSRTOP", 1, 0, reverselfsrtop 2293 00004C97 00 <1> 2294 <1> %if _SLEEP_NEW 2295 00004C98 [DA51]0600[584C]00- <1> isvariablestruc "GREPIDLE", 1, 0, getc_repeat_idle 2295 00004C9F 00 <1> 2296 00004CA0 [E051]0600[5A4C]00- <1> isvariablestruc "SREPIDLE", 1, 0, sleep_repeat_idle 2296 00004CA7 00 <1> 2297 00004CA8 [E651]1700[5C4C]00- <1> isvariablestruc "SMAXDELTA", 2, 0, sleep_highest_delta 2297 00004CAF 00 <1> 2298 00004CB0 [ED51]1900[5E4C]00- <1> isvariablestruc "SDELTALIMIT", 2, 0, sleep_delta_limit 2298 00004CB7 00 <1> 2299 <1> %endif 2300 00004CB8 [F651]9800[3E0C]00- <1> isvariablestruc "DEVICESIZE", 2, ivfReadOnly, device_mcb_paragraphs 2300 00004CBF 00 <1> 2301 00004CC0 [FE51]BA00[400C]00- <1> isvariablestruc "DEVICEHEADER", 4, ivfReadOnly, device_header_address 2301 00004CC7 00 <1> 2302 00004CC8 [0852]0700[3F42]00- <1> isvariablestruc "DDTEXTAND", 1, 0, dd_text_and 2302 00004CCF 00 <1> 2303 00004CD0 [0F52]8500[2E0B]00- <1> isvariablestruc "MACHX86", 1, ivfReadOnly, machine 2303 00004CD7 00 <1> 2304 00004CD8 [1452]8500[310B]00- <1> isvariablestruc "MACHX87", 1, ivfReadOnly, encodedmach87 2304 00004CDF 00 <1> 2305 00004CE0 [1952]0100[100C]00- <1> isvariablestruc "MMT", 1, 0, maxmachinetype 2305 00004CE7 00 <1> 2306 00004CE8 [1A52]3103[A000]06- <1> isvariablestruc "DCO", 4, ivfArrayOneBased | ivfArrayOptional, options, 6 2306 00004CEF 00 <1> 2308 00004CF0 [1B52]B103[B800]06- <1> isvariablestruc "DCS", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, startoptions, 6 2308 00004CF7 00 <1> 2310 00004CF8 [1C52]B103[D000]06- <1> isvariablestruc "DIF", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, internalflags, 6 2310 00004CFF 00 <1> 2312 00004D00 [1D52]3100[E800]00- <1> isvariablestruc "DAO", 4, 0, asm_options 2312 00004D07 00 <1> 2314 00004D08 [1E52]B100[EC00]00- <1> isvariablestruc "DAS", 4, ivfReadOnly, asm_startoptions 2314 00004D0F 00 <1> 2316 00004D10 [1F52]B100[1C0B]00- <1> isvariablestruc "DPI", 4, ivfReadOnly, psp22 2316 00004D17 00 <1> 2318 00004D18 [2052]9100[020B]00- <1> isvariablestruc "DPR", 2, ivfReadOnly, pspdbg 2318 00004D1F 00 <1> 2320 00004D20 [2152]9100[200B]00- <1> isvariablestruc "DPP", 2, ivfReadOnly, parent 2320 00004D27 00 <1> 2322 00004D28 [2252]B200[1C0B]00- <1> isvariablestruc "DPRA", 4, ivfReadOnly, psp22 2322 00004D2F 00 <1> 2324 00004D30 [2452]9200[020B]00- <1> isvariablestruc "DPSP", 2, ivfReadOnly, pspdbg 2324 00004D37 00 <1> 2326 00004D38 [2652]9500[200B]00- <1> isvariablestruc "DPARENT", 2, ivfReadOnly, parent 2326 00004D3F 00 <1> 2328 <1> %if _PM 2329 <1> isvariablestruc "DPS", 2, ivfReadOnly | ivfSpecialSetUp, var_seldbg_setup 2331 <1> isvariablestruc "DPSPSEL", 2, ivfReadOnly | ivfSpecialSetUp, var_dpspsel_setup 2333 <1> %else 2334 00004D40 [2B52]9500[020B]00- <1> isvariablestruc "DPSPSEL", 2, ivfReadOnly, pspdbg 2334 00004D47 00 <1> 2336 <1> %endif 2337 <1> 2338 00004D48 [3052]3100[D448]00- <1> isvariablestruc "PPC", 4, 0, default_pp_count 2338 00004D4F 00 <1> 2339 00004D50 [3152]3100[D848]00- <1> isvariablestruc "TPC", 4, 0, default_tp_count 2339 00004D57 00 <1> 2340 00004D58 [3252]3100[DC48]00- <1> isvariablestruc "TTC", 4, 0, default_tt_count 2340 00004D5F 00 <1> 2341 <1> 2342 00004D60 [3352]3500[3C0A]00- <1> isvariablestruc "RELIMIT", 4, 0, re_limit 2342 00004D67 00 <1> 2343 00004D68 [3852]3500[380A]00- <1> isvariablestruc "RECOUNT", 4, 0, re_count 2343 00004D6F 00 <1> 2344 00004D70 [3D52]3500[440A]00- <1> isvariablestruc "RCLIMIT", 4, 0, rc_limit 2344 00004D77 00 <1> 2345 00004D78 [4252]3500[400A]00- <1> isvariablestruc "RCCOUNT", 4, 0, rc_count 2345 00004D7F 00 <1> 2346 <1> 2347 00004D80 [4752]1000[680B]00- <1> isvariablestruc "RC", 2, 0, priorrc 2347 00004D87 00 <1> 2348 00004D88 [4752]1100[6A0B]00- <1> isvariablestruc "ERC", 2, 0, erc 2348 00004D8F 00 <1> 2349 00004D90 [4852]0400[3D0C]00- <1> isvariablestruc "QQCODE", 1, 0, qqtermcode 2349 00004D97 00 <1> 2350 00004D98 [4C52]1600[2245]00- <1> isvariablestruc "TERMCODE", 2, 0, usertermcode 2350 00004D9F 00 <1> 2351 <1> 2352 <1> %if _PM 2353 <1> %assign var_addr_offset 4 2354 <1> %else 2355 <1> %assign var_addr_offset 2 2356 <1> %endif 2357 <1> 2358 00004DA0 [5252]1100[720B]00- <1> isvariablestruc "AAO", var_addr_offset, 0, a_addr 2358 00004DA7 00 <1> 2359 00004DA8 [5352]1100[760B]00- <1> isvariablestruc "AAS", 2, 0, a_addr + saSegSel 2359 00004DAF 00 <1> 2360 00004DB0 [5452]1100[780B]00- <1> isvariablestruc "ADO", var_addr_offset, 0, d_addr 2360 00004DB7 00 <1> 2361 00004DB8 [5552]1100[7C0B]00- <1> isvariablestruc "ADS", 2, 0, d_addr + saSegSel 2361 00004DBF 00 <1> 2362 00004DC0 [5652]1100[7E0B]00- <1> isvariablestruc "ABO", var_addr_offset, 0, behind_r_u_addr 2362 00004DC7 00 <1> 2363 00004DC8 [5752]1100[820B]00- <1> isvariablestruc "ABS", 2, 0, behind_r_u_addr + saSegSel 2363 00004DCF 00 <1> 2364 00004DD0 [5852]1100[840B]00- <1> isvariablestruc "AUO", var_addr_offset, 0, u_addr 2364 00004DD7 00 <1> 2365 00004DD8 [5952]1100[880B]00- <1> isvariablestruc "AUS", 2, 0, u_addr + saSegSel 2365 00004DDF 00 <1> 2366 00004DE0 [5A52]1100[8A0B]00- <1> isvariablestruc "AEO", var_addr_offset, 0, e_addr 2366 00004DE7 00 <1> 2367 00004DE8 [5B52]1100[8E0B]00- <1> isvariablestruc "AES", 2, 0, e_addr + saSegSel 2367 00004DEF 00 <1> 2368 <1> %if _DSTRINGS 2369 00004DF0 [5C52]1100[900B]00- <1> isvariablestruc "AZO", var_addr_offset, 0, dz_addr 2369 00004DF7 00 <1> 2370 00004DF8 [5D52]1100[940B]00- <1> isvariablestruc "AZS", 2, 0, dz_addr + saSegSel 2370 00004DFF 00 <1> 2371 00004E00 [5E52]1100[960B]00- <1> isvariablestruc "ACO", var_addr_offset, 0, dcpm_addr 2371 00004E07 00 <1> 2372 00004E08 [5F52]1100[9A0B]00- <1> isvariablestruc "ACS", 2, 0, dcpm_addr + saSegSel 2372 00004E0F 00 <1> 2373 00004E10 [6052]1100[9C0B]00- <1> isvariablestruc "APO", var_addr_offset, 0, dcount_addr 2373 00004E17 00 <1> 2374 00004E18 [6152]1100[A00B]00- <1> isvariablestruc "APS", 2, 0, dcount_addr + saSegSel 2374 00004E1F 00 <1> 2375 00004E20 [6252]1100[A20B]00- <1> isvariablestruc "AWO", var_addr_offset, 0, dwcount_addr 2375 00004E27 00 <1> 2376 00004E28 [6352]1100[A60B]00- <1> isvariablestruc "AWS", 2, 0, dwcount_addr + saSegSel 2376 00004E2F 00 <1> 2377 <1> %endif 2378 <1> %if _PM 2379 <1> isvariablestruc "AXO", 4, 0, a_addr 2380 <1> %endif 2381 <1> 2382 00004E30 [6452]0100[110C]00- <1> isvariablestruc "DSR", 1, 0, serial_rows 2382 00004E37 00 <1> 2383 00004E38 [6552]0100[120C]00- <1> isvariablestruc "DSC", 1, 0, serial_columns 2383 00004E3F 00 <1> 2384 00004E40 [6652]0100[130C]00- <1> isvariablestruc "DST", 1, 0, serial_keep_timeout 2384 00004E47 00 <1> 2385 <1> %if _USE_TX_FIFO 2386 00004E48 [6752]0100[140C]00- <1> isvariablestruc "DSF", 1, 0, serial_fifo_size 2386 00004E4F 00 <1> 2387 <1> %endif 2388 00004E50 [6852]0300[160C]00- <1> isvariablestruc "DSPVI", 1, 0, serial_var_intnum 2388 00004E57 00 <1> 2389 00004E58 [6B52]8300[D00B]00- <1> isvariablestruc "DSPUI", 1, ivfReadOnly, serial_use_intnum 2389 00004E5F 00 <1> 2390 00004E60 [6E52]0300[170C]00- <1> isvariablestruc "DSPVS", 1, 0, serial_var_params 2390 00004E67 00 <1> 2391 00004E68 [7152]8300[D10B]00- <1> isvariablestruc "DSPUS", 1, ivfReadOnly, serial_use_params 2391 00004E6F 00 <1> 2392 00004E70 [7452]0300[180C]00- <1> isvariablestruc "DSPVF", 1, 0, serial_var_fifo 2392 00004E77 00 <1> 2393 00004E78 [7752]8300[D20B]00- <1> isvariablestruc "DSPUF", 1, ivfReadOnly, serial_use_fifo 2393 00004E7F 00 <1> 2394 00004E80 [7A52]1300[1A0C]00- <1> isvariablestruc "DSPVP", 2, 0, serial_var_baseport 2394 00004E87 00 <1> 2395 00004E88 [7D52]9300[D60B]00- <1> isvariablestruc "DSPUP", 2, ivfReadOnly, serial_use_baseport 2395 00004E8F 00 <1> 2396 00004E90 [8052]1300[1C0C]00- <1> isvariablestruc "DSPVD", 2, 0, serial_var_dl 2396 00004E97 00 <1> 2397 00004E98 [8352]9300[D80B]00- <1> isvariablestruc "DSPUD", 2, ivfReadOnly, serial_use_dl 2397 00004E9F 00 <1> 2398 00004EA0 [8652]1300[1E0C]00- <1> isvariablestruc "DSPVM", 2, 0, serial_var_irqmask 2398 00004EA7 00 <1> 2399 00004EA8 [8952]9300[DA0B]00- <1> isvariablestruc "DSPUM", 2, ivfReadOnly, serial_use_irqmask 2399 00004EAF 00 <1> 2400 <1> 2401 <1> %if _40COLUMNS 2402 00004EB0 [8C52]0500[220C]00- <1> isvariablestruc "IOCLINE", 1, 0, io_columns_getline 2402 00004EB7 00 <1> 2403 <1> ; IOCLINE must be before IOC as otherwise "IOCLINE" would get 2404 <1> ; misdetected as "IOC" + "L" separator + junk 2405 <1> %endif 2406 00004EB8 [9152]0100[200C]00- <1> isvariablestruc "IOR", 1, 0, io_rows 2406 00004EBF 00 <1> 2407 00004EC0 [9252]0100[210C]00- <1> isvariablestruc "IOC", 1, 0, io_columns 2407 00004EC7 00 <1> 2408 00004EC8 [9352]1100[240C]00- <1> isvariablestruc "IOS", 2, 0, io_start_buffer 2408 00004ECF 00 <1> 2409 00004ED0 [9452]1100[260C]00- <1> isvariablestruc "IOE", 2, 0, io_end_buffer 2409 00004ED7 00 <1> 2410 00004ED8 [9552]1100[280C]00- <1> isvariablestruc "IOL", 2, 0, io_levels 2410 00004EDF 00 <1> 2411 00004EE0 [9652]1100[2A0C]00- <1> isvariablestruc "IOF", 2, 0, io_flags 2411 00004EE7 00 <1> 2412 00004EE8 [9752]D100[148E]00- <1> isvariablestruc "IOI", 2, ivfReadOnly | ivfSpecialSetUp, var_ioi_setup 2412 00004EEF 00 <1> 2413 00004EF0 [9852]D100[288E]00- <1> isvariablestruc "IOK", 2, ivfReadOnly | ivfSpecialSetUp, var_iok_setup 2413 00004EF7 00 <1> 2414 <1> 2415 <1> %if _CATCHINT2D 2416 00004EF8 [9952]8500[C440]00- <1> isvariablestruc "AMISNUM", 1, ivfReadOnly, amis_multiplex_number 2416 00004EFF 00 <1> 2417 00004F00 [9E52]0800[AD40]00- <1> isvariablestruc "TRYAMISNUM", 1, 0, try_amis_multiplex_number 2417 00004F07 00 <1> 2418 <1> %endif 2419 <1> 2420 00004F08 [A652]3600[D44A]00- <1> isvariablestruc "HHRESULT", 4, 0, hhresult 2420 00004F0F 00 <1> 2421 <1> %if _PM 2422 <1> isvariablestruc "DARESULT", 2, 0, daresult 2423 <1> %endif 2424 <1> %if _EMS 2425 00004F10 [AC52]1600[6C4B]00- <1> isvariablestruc "XARESULT", 2, 0, xaresult 2425 00004F17 00 <1> 2426 <1> %endif 2427 <1> %if _COUNT || _SCOUNT 2428 00004F18 [B252]3300[604C]00- <1> isvariablestruc "COUNT", 4, 0, count_var 2428 00004F1F 00 <1> 2429 <1> %endif 2430 <1> %if _RH 2431 00004F20 [B552]D500[FF8D]00- <1> isvariablestruc "RHCOUNT", 2, ivfReadOnly | ivfSpecialSetUp, var_rhcount_setup 2431 00004F27 00 <1> 2432 <1> %endif 2433 <1> 2434 <1> %if _DEBUG1 2435 <1> isvariablestruc "TRC", 2, ivfArrayOptional, test_records_Readmem + 4, 15, 4 2437 <1> isvariablestruc "TRA", 4, ivfArrayOptional, test_records_Readmem, 15, 2 2439 <1> isvariablestruc "TWC", 2, ivfArrayOptional, test_records_Writemem + 4, 15, 4 2441 <1> isvariablestruc "TWA", 4, ivfArrayOptional, test_records_Writemem, 15, 2 2443 <1> isvariablestruc "TLC", 2, ivfArrayOptional, test_records_getLinear + 4, 15, 4 2445 <1> isvariablestruc "TLA", 4, ivfArrayOptional, test_records_getLinear, 15, 2 2447 <1> isvariablestruc "TSC", 2, ivfArrayOptional, test_records_getSegmented + 4, 15, 4 2449 <1> isvariablestruc "TSA", 4, ivfArrayOptional, test_records_getSegmented, 15, 2 2451 <1> isvariablestruc "TRV", 1, 0, test_readmem_value 2453 <1> %endif 2454 <1> 2455 <1> 2456 <1> %if _PM 2457 <1> isvariablestruc "SRO", 4, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 2459 <1> isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 4, 15, 4 2461 <1> %else 2462 00004F28 [BA52]9102[B40B]0F- <1> isvariablestruc "SRO", 2, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 2462 00004F2F 02 <1> 2464 00004F30 [BB52]9102[B60B]0F- <1> isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 2, 15, 2 2464 00004F37 02 <1> 2466 <1> %endif 2467 00004F38 [BC52]B100[F40B]00- <1> isvariablestruc "SRC", 4, ivfReadOnly, sscounter 2467 00004F3F 00 <1> 2469 <1> 2470 00004F40 [BD52]D004[4C92]FF- <1> isvariablestruc "RI", 2, ivfSpecialSetUp | ivfSeparatorSpecial | ivfReadOnly, var_ri_setup, 255 2470 00004F47 00 <1> 2472 <1> 2473 <1> %if _MMXSUPP 2474 00004F48 [BD52]F004[B691]07- <1> isvariablestruc "MM", 4, ivfSpecialSetUp | ivfSeparatorSpecial | ivfReadOnly, var_mm_setup, 7 2474 00004F4F 00 <1> 2476 <1> %endif 2477 <1> 2478 <1> %if _DEBUG3 2479 <1> isvariablestruc "MT", 4, ivfSpecialSetUp, var_mt_setup, 1 2480 <1> %endif 2481 <1> 2482 <1> %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 2483 00004F50 [BD52]5102[EB92]0F- <1> isvariablestruc "YSF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 2483 00004F57 00 <1> 2485 <1> %if _INPUT_FILE_HANDLES 2486 00004F58 [BE52]5102[EB92]0F- <1> isvariablestruc "YHF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 2486 00004F5F 00 <1> 2488 <1> %endif 2489 <1> %if _INPUT_FILE_BOOT 2490 00004F60 [BF52]5102[EB92]0F- <1> isvariablestruc "YBF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 2490 00004F67 00 <1> 2492 <1> %endif 2493 <1> %endif 2494 <1> 2495 <1> %if _ACCESS_VARIABLES_AMOUNT 2496 00004F68 [C052]B502[D442]03- <1> isvariablestruc "READADR", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 2496 00004F6F 04 <1> 2498 00004F70 [C552]B502[D842]03- <1> isvariablestruc "READLEN", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 2498 00004F77 04 <1> 2500 00004F78 [CA52]B502[F442]03- <1> isvariablestruc "WRITADR", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 2500 00004F7F 04 <1> 2502 00004F80 [CF52]B502[F842]03- <1> isvariablestruc "WRITLEN", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 2502 00004F87 04 <1> 2504 <1> %endif 2505 <1> 2506 <1> %if _PSPVARIABLES 2507 <1> %if _PM 2508 <1> isvariablestruc "PSPS", 2, ivfReadOnly | ivfSpecialSetUp, var_psps_setup 2509 <1> isvariablestruc "PSPSEL", 2, ivfReadOnly | ivfSpecialSetUp, var_psps_setup 2510 <1> %else 2511 00004F88 [D452]9200[000B]00- <1> isvariablestruc "PSPS", 2, ivfReadOnly, pspdbe 2511 00004F8F 00 <1> 2512 00004F90 [D652]9400[000B]00- <1> isvariablestruc "PSPSEL", 2, ivfReadOnly, pspdbe 2512 00004F97 00 <1> 2513 <1> %endif 2514 00004F98 [DA52]9100[000B]00- <1> isvariablestruc "PSP", 2, ivfReadOnly, pspdbe 2514 00004F9F 00 <1> 2515 00004FA0 [DB52]D100[3C8E]00- <1> isvariablestruc "PPR", 2, ivfReadOnly | ivfSpecialSetUp, var_ppr_setup 2515 00004FA7 00 <1> 2516 00004FA8 [DC52]F100[528E]00- <1> isvariablestruc "PPI", 4, ivfReadOnly | ivfSpecialSetUp, var_ppi_setup 2516 00004FAF 00 <1> 2517 00004FB0 [DD52]D400[3C8E]00- <1> isvariablestruc "PARENT", 2, ivfReadOnly | ivfSpecialSetUp, var_ppr_setup 2517 00004FB7 00 <1> 2518 00004FB8 [E152]F100[528E]00- <1> isvariablestruc "PRA", 4, ivfReadOnly | ivfSpecialSetUp, var_ppi_setup 2518 00004FBF 00 <1> 2519 <1> %endif 2520 <1> 2521 <1> %if _BOOTLDR 2522 00004FC0 [E252]4800[DA8E]FF- <1> isvariablestruc "BOOTUNITFL", 1, ivfSpecialSetUp, var_bootunitflags_setup, 255 2522 00004FC7 00 <1> 2523 00004FC8 [EA52]C900[988E]00- <1> isvariablestruc "BOOTLDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootldpunit_setup 2523 00004FCF 00 <1> 2524 00004FD0 [F352]C900[9D8E]00- <1> isvariablestruc "BOOTSDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootsdpunit_setup 2524 00004FD7 00 <1> 2525 <1> %if _INPUT_FILE_BOOT 2526 00004FD8 [FC52]C900[A28E]00- <1> isvariablestruc "BOOTYDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootydpunit_setup 2526 00004FDF 00 <1> 2527 <1> %endif 2528 00004FE0 [0553]F900[B98E]00- <1> isvariablestruc "BOOTLDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootldppart_setup 2528 00004FE7 00 <1> 2529 00004FE8 [0E53]F900[BE8E]00- <1> isvariablestruc "BOOTSDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootsdppart_setup 2529 00004FEF 00 <1> 2530 <1> %if _INPUT_FILE_BOOT 2531 00004FF0 [1753]F900[C38E]00- <1> isvariablestruc "BOOTYDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootydppart_setup 2531 00004FF7 00 <1> 2532 <1> %endif 2533 <1> %endif 2534 <1> 2535 00004FF8 [2053]0900[AE40]00- <1> isvariablestruc "TRYDEBUGNUM", 1, 0, try_debugger_amis_multiplex_number 2535 00004FFF 00 <1> 2536 00005000 [2953]9700[7240]00- <1> isvariablestruc "DEBUGFUNC", 2, ivfReadOnly, debuggerfunction 2536 00005007 00 <1> 2537 <1> %if _MCLOPT 2538 <1> isvariablestruc "MASTERPICBASE", 1, 0, master_pic_base 2539 <1> %endif 2540 <1> 2541 00005008 [3053]9700[1401]00- <1> isvariablestruc "DSTACKLEN", 2, ivfReadOnly, entryseg_size 2541 0000500F 00 <1> 2542 00005010 [3753]9700[020B]00- <1> isvariablestruc "DSTACKSEG", 2, ivfReadOnly, pspdbg 2542 00005017 00 <1> 2543 00005018 [3E53]9700[1401]00- <1> isvariablestruc "DENTRYLEN", 2, ivfReadOnly, entryseg_size 2543 0000501F 00 <1> 2544 00005020 [4553]9700[020B]00- <1> isvariablestruc "DENTRYSEG", 2, ivfReadOnly, pspdbg 2544 00005027 00 <1> 2545 00005028 [4C53]9700[1601]00- <1> isvariablestruc "DCODE1LEN", 2, ivfReadOnly, code_size 2545 0000502F 00 <1> 2546 00005030 [5353]9700[1001]00- <1> isvariablestruc "DCODE1SEG", 2, ivfReadOnly, code_seg 2546 00005037 00 <1> 2547 <1> %if _DUALCODE 2548 <1> isvariablestruc "DCODE2LEN", 2, ivfReadOnly, code2_size 2549 <1> isvariablestruc "DCODE2SEG", 2, ivfReadOnly, code2_seg 2550 <1> %endif 2551 <1> %if _MESSAGESEGMENT 2552 00005038 [5A53]9900[1A01]00- <1> isvariablestruc "DMESSAGELEN", 2, ivfReadOnly, messageseg_size 2552 0000503F 00 <1> 2553 00005040 [6353]9900[1201]00- <1> isvariablestruc "DMESSAGESEG", 2, ivfReadOnly, messageseg 2553 00005047 00 <1> 2554 <1> %endif 2555 00005048 [6C53]9800[520A]00- <1> isvariablestruc "DAUXBUFLEN", 2, ivfReadOnly, auxbuff_current_size 2555 0000504F 00 <1> 2556 <1> %if _PM 2557 <1> isvariablestruc "DAUXBUFSEG", 2, ivfReadOnly, auxbuff_segorsel + soaSegment 2558 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2559 <1> isvariablestruc "DHISBUFLEN", 2, ivfReadOnly, historyseg_size 2560 <1> isvariablestruc "DHISBUFSEG", 2, ivfReadOnly, history.segorsel + soaSegment 2561 <1> %endif 2562 <1> %else 2563 00005050 [7453]9800[4A0A]00- <1> isvariablestruc "DAUXBUFSEG", 2, ivfReadOnly, auxbuff_segorsel 2563 00005057 00 <1> 2564 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2565 00005058 [7C53]9800[1801]00- <1> isvariablestruc "DHISBUFLEN", 2, ivfReadOnly, historyseg_size 2565 0000505F 00 <1> 2566 00005060 [8453]9800[6C0B]00- <1> isvariablestruc "DHISBUFSEG", 2, ivfReadOnly, history.segorsel 2566 00005067 00 <1> 2567 <1> %endif 2568 <1> %endif 2569 <1> %if _IMMASM 2570 <1> isvariablestruc "DIMMSEG", 2, ivfReadOnly, immseg 2571 <1> %endif 2572 00005068 [8C53]9800[1C01]00- <1> isvariablestruc "DALLOCSIZE", 2, ivfReadOnly, alloc_size 2572 0000506F 00 <1> 2573 00005070 [9453]9700[1E01]00- <1> isvariablestruc "DALLOCSEG", 2, ivfReadOnly, alloc_seg 2573 00005077 00 <1> 2574 <1> 2575 <1> %if _PM 2576 <1> isvariablestruc "DSTACKSEL", 2, ivfReadOnly, dssel 2577 <1> isvariablestruc "DENTRYSEL", 2, ivfReadOnly, cssel 2578 <1> isvariablestruc "DCODE1SEL", 2, ivfReadOnly, code_sel 2579 <1> %if _DUALCODE 2580 <1> isvariablestruc "DCODE2SEL", 2, ivfReadOnly, code2_sel 2581 <1> %endif 2582 <1> %if _MESSAGESEGMENT 2583 <1> isvariablestruc "DMESSAGESEL", 2, ivfReadOnly, messagesel 2584 <1> %endif 2585 <1> isvariablestruc "DAUXBUFSEL", 2, ivfReadOnly, auxbuff_segorsel + soaSelector 2586 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2587 <1> isvariablestruc "DHISBUFSEL", 2, ivfReadOnly, history.segorsel + soaSelector 2588 <1> %endif 2589 <1> isvariablestruc "DSCRATCHSEL", 2, ivfReadOnly, scratchsel 2590 <1> %if _SYMBOLIC 2591 <1> isvariablestruc "DSYM1SEL", 2, ivfReadOnly, symsel1 2592 <1> isvariablestruc "DSYM2SEL", 2, ivfReadOnly, symsel2 2593 <1> %endif 2594 <1> %if _IMMASM 2595 <1> isvariablestruc "DIMMSEL", 2, ivfReadOnly, immsel 2596 <1> %endif 2597 <1> %endif 2598 <1> 2599 00005078 [9B53]1900[580B]00- <1> isvariablestruc "DEFAULTDLEN", 2, 0, dd_default_length 2599 0000507F 00 <1> 2600 00005080 [A453]1B00[5A0B]00- <1> isvariablestruc "DEFAULTDLINES", 2, 0, dd_default_lines 2600 00005087 00 <1> 2601 00005088 [AF53]1900[5C0B]00- <1> isvariablestruc "DEFAULTULEN", 2, 0, uu_default_length 2601 0000508F 00 <1> 2602 00005090 [B853]1B00[5E0B]00- <1> isvariablestruc "DEFAULTULINES", 2, 0, uu_default_lines 2602 00005097 00 <1> 2603 <1> 2604 <1> %if _PM 2605 <1> isvariablestruc "CIP", 2, ivfSpecialSetUp, var_cip_setup 2606 <1> isvariablestruc "CSP", 2, ivfSpecialSetUp, var_csp_setup 2607 <1> %else 2608 00005098 [C353]1100[DC0C]00- <1> isvariablestruc "CIP", 2, 0, reg_eip 2608 0000509F 00 <1> 2609 000050A0 [C453]1100[B40C]00- <1> isvariablestruc "CSP", 2, 0, reg_esp 2609 000050A7 00 <1> 2610 <1> %endif 2611 <1> 2612 <1> isvariable_struc_morebyte_list_end: 2613 <1> isvariable_struc_list_end: 2614 <1> 2615 <1> align 2, db 0 2616 000050A8 00000000 <1> interrupt_var: dd 0 2617 <1> align 2, db 0 2618 000050AC 0000 <1> ioi_var: dw 0 2619 000050AE 0000 <1> iok_var: dw 0 2620 <1> %if _PM 2621 <1> align 2, db 0 2622 <1> seldbg: dw 0 2623 <1> align 2, db 0 2624 <1> dpspsel: dw 0 2625 <1> %endif 2626 <1> %if _PSPVARIABLES 2627 <1> align 2, db 0 2628 <1> %if _PM 2629 <1> psp_selector: dw 0 2630 <1> %endif 2631 000050B0 0000 <1> psp_parent: dw 0 2632 000050B2 00000000 <1> psp_pra: dd 0 2633 <1> %endif 2634 <1> 2635 <1> align 2, db 0 2636 <1> isvariable_morebyte_nameheaders: 2637 000050B6 494E4C46524C4C4652- <1> dw IVS_MOREBYTE_NAMEHEADERS 2637 000050BF 4C47525352534D5344- <1> 2637 000050C8 4445444544444D414D- <1> 2637 000050D1 414D4D444344434449- <1> 2637 000050DA 444144414450445044- <1> 2637 000050E3 504450445044504450- <1> 2637 000050EC 505054505454524552- <1> 2637 000050F5 455243524352434552- <1> 2637 000050FE 515154454141414141- <1> 2637 00005107 444144414241424155- <1> 2637 00005110 415541454145415A41- <1> 2637 00005119 5A4143414341504150- <1> 2637 00005122 415741574453445344- <1> 2637 0000512B 534453445344534453- <1> 2637 00005134 445344534453445344- <1> 2637 0000513D 534453445344534453- <1> 2637 00005146 494F494F494F494F49- <1> 2637 0000514F 4F494F494F494F494F- <1> 2637 00005158 414D54524848584143- <1> 2637 00005161 4F5248535253525352- <1> 2637 0000516A 52494D4D5953594859- <1> 2637 00005173 425245524557525752- <1> 2637 0000517C 505350535053505050- <1> 2637 00005185 5050415052424F424F- <1> 2637 0000518E 424F424F424F424F42- <1> 2637 00005197 4F5452444544534453- <1> 2637 000051A0 444544454443444344- <1> 2637 000051A9 4D444D444144414448- <1> 2637 000051B2 444844414441444544- <1> 2637 000051BB 454445444543494353 <1> 2638 <1> .end: 2639 <1> %if IVS_HAVE_ONEBYTE && ! IVS_SINGLE_ONEBYTE 2640 <1> isvariable_onebyte_names: 2641 <1> db IVS_ONEBYTE_NAMES 2642 <1> .end: 2643 <1> %endif 2644 <1> 2645 000051C4 54384354524C535246- <1> isvariablestrings ISVARIABLESTRINGS 2645 000051CD 535253525441504653- <1> 2645 000051D6 52544F50455049444C- <1> 2645 000051DF 45455049444C454158- <1> 2645 000051E8 44454C5441454C5441- <1> 2645 000051F1 4C494D495456494345- <1> 2645 000051FA 53495A455649434548- <1> 2645 00005203 454144455254455854- <1> 2645 0000520C 414E44434858383643- <1> 2645 00005215 48583837544F53464F- <1> 2645 0000521E 534952505241535041- <1> 2645 00005227 52454E54535053454C- <1> 2645 00005230 4343434C494D495443- <1> 2645 00005239 4F554E544C494D4954- <1> 2645 00005242 434F554E5443434F44- <1> 2645 0000524B 45524D434F44454F53- <1> 2645 00005254 4F534F534F534F534F- <1> 2645 0000525D 534F534F534F535243- <1> 2645 00005266 544650564950554950- <1> 2645 0000526F 565350555350564650- <1> 2645 00005278 554650565050555050- <1> 2645 00005281 564450554450564D50- <1> 2645 0000528A 554D434C494E455243- <1> 2645 00005293 53454C46494B49534E- <1> 2645 0000529C 554D59414D49534E55- <1> 2645 000052A5 4D524553554C545245- <1> 2645 000052AE 53554C54554E54434F- <1> 2645 000052B7 554E544F5343464646- <1> 2645 000052C0 414441445241444C45- <1> 2645 000052C9 4E495441445249544C- <1> 2645 000052D2 454E50535053454C50- <1> 2645 000052DB 524952454E54414F54- <1> 2645 000052E4 554E4954464C4F544C- <1> 2645 000052ED 4450554E49544F5453- <1> 2645 000052F6 4450554E49544F5459- <1> 2645 000052FF 4450554E49544F544C- <1> 2645 00005308 4450504152544F5453- <1> 2645 00005311 4450504152544F5459- <1> 2645 0000531A 445050415254594445- <1> 2645 00005323 4255474E554D425547- <1> 2645 0000532C 46554E435441434B4C- <1> 2645 00005335 454E5441434B534547- <1> 2645 0000533E 4E5452594C454E4E54- <1> 2645 00005347 52595345474F444531- <1> 2645 00005350 4C454E4F4445315345- <1> 2645 00005359 474553534147454C45- <1> 2645 00005362 4E4553534147455345- <1> 2645 0000536B 4755584255464C454E- <1> 2645 00005374 555842554653454749- <1> 2645 0000537D 534255464C454E4953- <1> 2645 00005386 4255465345474C4C4F- <1> 2645 0000538F 4353495A454C4C4F43- <1> 2645 00005398 5345474641554C5444- <1> 2645 000053A1 4C454E4641554C5444- <1> 2645 000053AA 4C494E45534641554C- <1> 2645 000053B3 54554C454E4641554C- <1> 2645 000053BC 54554C494E45535050 <1> 2646 <1> 2647 <1> 2648 <1> %if _EXPRDUALCODE && _DUALCODE 2649 <1> usesection lDEBUG_CODE2 2650 <1> %else 2651 <1> usesection lDEBUG_CODE 2652 <1> %endif 2653 <1> isvariable_code: 2654 <1> ; INP: ax = array index (0-based), di = 0 2655 <1> ; cl = default size of variable (1..4) 2656 <1> ; CHG: si, ax 2657 <1> ; OUT: NC if valid, 2658 <1> ; bx -> var, di = 0 or di -> mask 2659 <1> ; cl = size of variable (1..4) 2660 <1> 2661 <1> %if _PM 2662 <1> var_cip_setup: section_of_function 2663 <1> mov bx, word [reg_cs] 2664 <1> nearcall test_d_b_bit 2665 <1> mov bx, reg_eip 2666 <1> @@: 2667 <1> jz .ret 2668 <1> inc cx 2669 <1> inc cx ; = 4 2670 <1> .ret: 2671 <1> clc ; (NC) 2672 <1> retn 2673 <1> 2674 <1> var_csp_setup: section_of_function 2675 <1> mov bx, word [reg_ss] 2676 <1> nearcall test_d_b_bit 2677 <1> mov bx, reg_esp 2678 <1> jmp @B 2679 <1> %endif 2680 <1> 2681 <1> 2682 <1> var_lfsr_setup: section_of_function 2683 00008D8D BB[4C4C] <1> mov bx, lfsr 2684 00008D90 D16F02 <1> shr word [bx + 2], 1 2685 00008D93 D11F <1> rcr word [bx], 1 2686 00008D95 730B <1> jnc .ret ; if not to tap --> (NC) 2687 00008D97 A1[544C] <1> mov ax, word [lfsrtap] 2688 00008D9A 3107 <1> xor word [bx], ax 2689 00008D9C A1[564C] <1> mov ax, word [lfsrtap + 2] 2690 00008D9F 314702 <1> xor word [bx + 2], ax ; (NC) 2691 <1> .ret: 2692 00008DA2 C3 <1> retn 2693 <1> 2694 <1> 2695 <1> var_reverselfsr_setup: section_of_function 2696 00008DA3 BB[504C] <1> mov bx, reverselfsr 2697 00008DA6 91 <1> xchg ax, cx ; preserve original cx 2698 00008DA7 8A0E[484C] <1> mov cl, byte [reverselfsrtop] 2699 00008DAB BE0100 <1> mov si, 1 ; register for shift mask 2700 00008DAE 80F910 <1> cmp cl, 16 ; fits in low 16 bits ? 2701 00008DB1 721B <1> jb .below_16 ; yes --> 2702 00008DB3 80E910 <1> sub cl, 16 ; get bit within high word 2703 00008DB6 80F910 <1> cmp cl, 16 ; beyond maximum ? 2704 00008DB9 7202 <1> jb @F 2705 00008DBB B10F <1> mov cl, 15 ; yes, clamp to bit 31 (for now) 2706 <1> @@: 2707 00008DBD D3E6 <1> shl si, cl ; shift to get a bitmask 2708 00008DBF 91 <1> xchg cx, ax ; restore the original cx 2709 00008DC0 857702 <1> test word [bx + 2], si ; is top bit set ? 2710 00008DC3 9F <1> lahf ; preserve ZF 2711 00008DC4 F7D6 <1> not si ; invert mask to allow clearing 2712 00008DC6 217702 <1> and word [bx + 2], si ; clear the bit if it was set 2713 00008DC9 BFFFFF <1> mov di, -1 ; si:di = mask what to clear in taps 2714 00008DCC EB0F <1> jmp @F 2715 <1> 2716 <1> .below_16: 2717 00008DCE D3E6 <1> shl si, cl ; shift to get a bitmask 2718 00008DD0 91 <1> xchg cx, ax ; restore the original cx 2719 00008DD1 8537 <1> test word [bx], si ; is top bit set ? 2720 00008DD3 9F <1> lahf ; preserve ZF 2721 00008DD4 F7D6 <1> not si ; invert mask to allow clearing 2722 00008DD6 2137 <1> and word [bx], si ; clear the bit if it was set 2723 00008DD8 89F7 <1> mov di, si 2724 00008DDA BEFFFF <1> mov si, -1 ; si:di = mask what to clear in taps 2725 <1> @@: 2726 00008DDD 9E <1> sahf ; restore ZF 2727 00008DDE 97 <1> xchg ax, di ; si:ax = mask what to clear in taps 2728 00008DDF 7416 <1> jz .justshift ; if not to tap, just shift --> (NC) 2729 00008DE1 E81300 <1> call .justshift ; also shift, but return to us afterwards 2730 00008DE4 2306[544C] <1> and ax, word [lfsrtap] 2731 00008DE8 2336[564C] <1> and si, word [lfsrtap + 2] 2732 <1> ; get the taps (highest bit cleared) 2733 00008DEC F9 <1> stc ; lowest bit will get set to 1 2734 00008DED D1D0 <1> rcl ax, 1 2735 00008DEF D1D6 <1> rcl si, 1 ; shift the taps to create reverse taps 2736 00008DF1 3107 <1> xor word [bx], ax 2737 00008DF3 317702 <1> xor word [bx + 2], si ; tap (NC) 2738 00008DF6 C3 <1> retn 2739 <1> 2740 <1> .justshift: 2741 00008DF7 D127 <1> shl word [bx], 1 2742 00008DF9 D15702 <1> rcl word [bx + 2], 1 2743 00008DFC 31FF <1> xor di, di ; restore di = 0 2744 <1> ; also: set NC if return from setup function 2745 00008DFE C3 <1> retn 2746 <1> 2747 <1> 2748 <1> %if _PM 2749 <1> var_dpspsel_setup: section_of_function 2750 <1> mov bx, dpspsel 2751 <1> mov word [bx], ss 2752 <1> clc 2753 <1> retn 2754 <1> 2755 <1> var_seldbg_setup: section_of_function 2756 <1> mov bx, seldbg 2757 <1> and word [bx], byte 0 2758 <1> nearcall ispm 2759 <1> jnz @F 2760 <1> mov word [bx], ds 2761 <1> @@: 2762 <1> clc 2763 <1> retn 2764 <1> %endif 2765 <1> 2766 <1> %if _DEBUG3 2767 <1> var_mt_setup: section_of_function 2768 <1> mov bx, ax 2769 <1> add bx, bx 2770 <1> add bx, bx 2771 <1> mov di, bx 2772 <1> add bx, mtest_regs 2773 <1> add di, masks_test 2774 <1> clc 2775 <1> retn 2776 <1> %endif 2777 <1> 2778 <1> 2779 <1> %if _RH 2780 <1> ; INP: ax = array index (0-based), di = 0 2781 <1> ; cl = default size of variable (1..4) 2782 <1> ; CHG: si, ax 2783 <1> ; OUT: NC if valid, 2784 <1> ; bx -> var, di = 0 or di -> mask 2785 <1> ; cl = size of variable (1..4) 2786 <1> var_rhcount_setup: section_of_function 2787 00008DFF 51 <1> push cx 2788 <1> %if _PM 2789 <1> mov di, word [auxbuff_switchbuffer_size] 2790 <1> %else 2791 00008E00 31FF <1> xor di, di 2792 <1> %endif 2793 00008E02 E88A11 <1> nearcall silence_get_start.have_di 2794 00008E05 E89211 <1> nearcall silence_count_zeroes 2795 <1> 2796 00008E08 93 <1> xchg bx, ax 2797 00008E09 BB[644C] <1> mov bx, rhcount 2798 00008E0C 8907 <1> mov word [bx], ax 2799 00008E0E 59 <1> pop cx 2800 00008E0F 16 <1> push ss 2801 00008E10 07 <1> pop es 2802 00008E11 31FF <1> xor di, di ; NC 2803 00008E13 C3 <1> retn 2804 <1> %endif 2805 <1> 2806 <1> 2807 <1> var_ioi_setup: section_of_function 2808 00008E14 800E[D800]10 <1> setopt [internalflags3], dif3_input_terminal_override 2809 00008E19 E8D211 <1> nearcall peekc 2810 00008E1C 8026[D800]EF <1> clropt [internalflags3], dif3_input_terminal_override 2811 00008E21 BB[AC50] <1> mov bx, ioi_var 2812 00008E24 8907 <1> mov word [bx], ax 2813 00008E26 F8 <1> clc 2814 00008E27 C3 <1> retn 2815 <1> 2816 <1> var_iok_setup: section_of_function 2817 00008E28 800E[D800]10 <1> setopt [internalflags3], dif3_input_terminal_override 2818 00008E2D E8E611 <1> nearcall getc 2819 00008E30 8026[D800]EF <1> clropt [internalflags3], dif3_input_terminal_override 2820 00008E35 BB[AE50] <1> mov bx, iok_var 2821 00008E38 8907 <1> mov word [bx], ax 2822 00008E3A F8 <1> clc 2823 00008E3B C3 <1> retn 2824 <1> 2825 <1> %if _PSPVARIABLES 2826 <1> %if _PM 2827 <1> var_psps_setup: section_of_function 2828 <1> mov bx, psp_selector 2829 <1> nearcall var_get_psp_segment 2830 <1> jc @F 2831 <1> nearcall ispm 2832 <1> jnz @F 2833 <1> push bx 2834 <1> xchg ax, bx 2835 <1> mov ax, 0002h 2836 <1> int 31h 2837 <1> pop bx 2838 <1> @@: 2839 <1> mov word [bx], ax 2840 <1> clc 2841 <1> retn 2842 <1> %endif 2843 <1> 2844 <1> 2845 <1> var_ppr_setup: section_of_function 2846 <1> %if _PM 2847 <1> sub sp, 8 2848 <1> call save_scratchsel 2849 <1> %endif 2850 00008E3C BB[B050] <1> mov bx, psp_parent 2851 00008E3F 31C0 <1> xor ax, ax 2852 00008E41 8907 <1> mov word [bx], ax 2853 00008E43 E83900 <1> nearcall var_get_psp_selector 2854 00008E46 7206 <1> jc @F 2855 00008E48 26A11600 <1> mov ax, word [es:16h] 2856 00008E4C 8907 <1> mov word [bx], ax ; retrieve parent process 2857 <1> @@: 2858 00008E4E 16 <1> push ss 2859 00008E4F 07 <1> pop es 2860 <1> %if _PM 2861 <1> call restore_scratchsel 2862 <1> ; This is not really needed but does not hurt either. 2863 <1> ; getsegmented is used above, but only from PM. 2864 <1> ; This is assumed not to switch modes. 2865 <1> nearcall resetmode ; reset mode if we switched 2866 <1> %endif 2867 00008E50 F8 <1> clc 2868 00008E51 C3 <1> retn 2869 <1> 2870 <1> 2871 <1> var_ppi_setup: section_of_function 2872 <1> %if _PM 2873 <1> sub sp, 8 2874 <1> call save_scratchsel 2875 <1> %endif 2876 00008E52 BB[B250] <1> mov bx, psp_pra 2877 00008E55 31C0 <1> xor ax, ax 2878 00008E57 8907 <1> mov word [bx], ax 2879 00008E59 894702 <1> mov word [bx + 2], ax 2880 00008E5C E82000 <1> nearcall var_get_psp_selector 2881 00008E5F 72ED <1> jc @B 2882 00008E61 26A10A00 <1> mov ax, word [es:TPIV] 2883 00008E65 8907 <1> mov word [bx], ax 2884 00008E67 26A10C00 <1> mov ax, word [es:TPIV + 2] 2885 00008E6B 894702 <1> mov word [bx + 2], ax ; retrieve Int22 address 2886 00008E6E EBDE <1> jmp @B 2887 <1> 2888 <1> 2889 <1> var_get_psp_segment: section_of_function 2890 00008E70 A1[000B] <1> mov ax, word [pspdbe] 2891 00008E73 40 <1> inc ax ; FFFFh ? 2892 00008E74 7405 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 2893 00008E76 48 <1> dec ax ; 0 ? 2894 00008E77 7402 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 2895 00008E79 F8 <1> clc 2896 00008E7A C3 <1> retn 2897 <1> 2898 <1> .pspvar_psp_invalid: 2899 00008E7B 31C0 <1> xor ax, ax 2900 00008E7D F9 <1> stc 2901 00008E7E C3 <1> retn 2902 <1> 2903 <1> 2904 <1> var_get_psp_selector: section_of_function 2905 00008E7F E8EEFF <1> nearcall var_get_psp_segment 2906 00008E82 720D <1> jc .pspvar_psp_invalid 2907 <1> %if _PM 2908 <1> nearcall ispm 2909 <1> jnz short .pspvar_rm 2910 <1> push bx 2911 <1> _386_o32 ; push edx 2912 <1> push dx 2913 <1> push cx 2914 <1> xor dx, dx 2915 <1> mov cx, 4 2916 <1> .pspvar_shift: 2917 <1> shl ax, 1 2918 <1> rcl dx, 1 2919 <1> loop .pspvar_shift ; dx:ax = PSP segment << 4 2920 <1> nearcall getsegmented 2921 <1> ; getsegmented is assumed not to switch modes (see below). 2922 <1> jc short .pspvar_error ; (shouldn't happen) 2923 <1> _386_o32 2924 <1> test dx, dx ; test edx, edx 2925 <1> jnz short .pspvar_error ; (assumed not to happen) 2926 <1> nearcall setrmlimit 2927 <1> pop cx 2928 <1> _386_o32 2929 <1> pop dx ; pop edx 2930 <1> xchg ax, bx ; ax = selector 2931 <1> pop bx 2932 <1> .pspvar_rm: 2933 <1> %endif 2934 00008E84 8EC0 <1> mov es, ax ; es = segment/selector 2935 00008E86 26813E0000CD20 <1> cmp word [es:0], 20CDh ; int 20h opcode ? 2936 00008E8D 7502 <1> jne short .pspvar_psp_invalid ; no, invalid --> 2937 00008E8F F8 <1> clc 2938 00008E90 C3 <1> retn 2939 <1> 2940 <1> .pspvar_psp_invalid: 2941 00008E91 F9 <1> stc 2942 00008E92 C3 <1> retn 2943 <1> 2944 <1> .pspvar_error: 2945 00008E93 31F6 <1> xor si, si 2946 00008E95 E9C5F3 <1> jmp error_expr 2947 <1> %endif 2948 <1> 2949 <1> 2950 <1> %if _BOOTLDR 2951 <1> var_bootldpunit_setup: section_of_function 2952 00008E98 BB[2057] <1> mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit 2954 00008E9B EB45 <1> jmp @F 2955 <1> 2956 <1> var_bootsdpunit_setup: section_of_function 2957 00008E9D BB[C057] <1> mov bx, load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 2959 00008EA0 EB40 <1> jmp @F 2960 <1> 2961 <1> %if _INPUT_FILE_BOOT 2962 <1> var_bootydpunit_setup: section_of_function 2963 00008EA2 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 2964 00008EA7 7440 <1> jz .retc 2965 <1> 2966 00008EA9 52 <1> push dx 2967 00008EAA B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 2968 00008EAD F726[A05A] <1> mul word [load_input_file.active] 2969 00008EB1 5A <1> pop dx 2970 <1> 2971 00008EB2 93 <1> xchg ax, bx 2972 00008EB3 8D9F[A058] <1> lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 2974 00008EB7 EB29 <1> jmp @F 2975 <1> %endif 2976 <1> 2977 <1> var_bootldppart_setup: section_of_function 2978 00008EB9 BB[FC56] <1> mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 2980 00008EBC EB24 <1> jmp @F 2981 <1> 2982 <1> var_bootsdppart_setup: section_of_function 2983 00008EBE BB[9C57] <1> mov bx, load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 2985 00008EC1 EB1F <1> jmp @F 2986 <1> 2987 <1> %if _INPUT_FILE_BOOT 2988 <1> var_bootydppart_setup: section_of_function 2989 00008EC3 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 2990 00008EC8 741F <1> jz .retc 2991 <1> 2992 00008ECA 52 <1> push dx 2993 00008ECB B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 2994 00008ECE F726[A05A] <1> mul word [load_input_file.active] 2995 00008ED2 5A <1> pop dx 2996 <1> 2997 00008ED3 93 <1> xchg ax, bx 2998 00008ED4 8D9F[7C58] <1> lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 3000 00008ED8 EB08 <1> jmp @F 3001 <1> %endif 3002 <1> 3003 <1> var_bootunitflags_setup: section_of_function 3004 00008EDA 05[8055] <1> add ax, load_unit_flags 3005 00008EDD 89C3 <1> mov bx, ax 3006 00008EDF BF[D853] <1> mov di, mask_bootunitflags 3007 <1> @@: 3008 00008EE2 F606[D100]40 <1> testopt [internalflags], nodosloaded 3009 00008EE7 7501 <1> jnz @F ; (NC) 3010 <1> var_bootydpunit_setup.retc: 3011 <1> var_bootydppart_setup.retc: 3012 00008EE9 F9 <1> stc 3013 <1> @@: 3014 00008EEA C3 <1> retn 3015 <1> %endif 3016 <1> 3017 <1> 3018 <1> usesection lDEBUG_DATA_ENTRY 3019 <1> 3020 000053C5 00 <1> align 4, db 0 3021 <1> masks: 3022 <1> ; size 4 want masks + 0 3023 <1> ; size 3 want masks + 1 3024 <1> ; size 2 want masks + 2 3025 <1> ; size 1 want masks + 3 3026 <1> ; size 0 want masks + 4 3027 <1> ; 4 - size = offset into masks 3028 000053C8 00 <1> mask_4byte: db 0 3029 000053C9 00 <1> mask_3byte: db 0 3030 000053CA 00 <1> mask_2byte: db 0 3031 000053CB 00 <1> mask_1byte: db 0 3032 000053CC FFFFFFFF <1> mask_0byte: dd -1 3033 000053D0 FFFF0000 <1> mask_compoundwithzero: db -1, -1, 0, 0 3034 000053D4 FF0FFFFF <1> mask_ysf: dd ~ (ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput) 3036 <1> %if _BOOTLDR 3037 000053D8 F8FFFFFF <1> mask_bootunitflags: dd ~ luf_mask_writable 3038 <1> %endif 3039 <1> 3040 <1> %if _DEBUG3 3041 <1> masks_test: 3042 <1> mask_test_0: dd 0AA55AA55h 3043 <1> mask_test_1: dd 00FF00FFh 3044 <1> mtest_regs: 3045 <1> mtest_reg_0: dd 0 3046 <1> mtest_reg_1: dd 00110022h 3047 <1> %endif 3048 <1> 3049 <1> 3050 <1> %if _EXPRDUALCODE && _DUALCODE 3051 <1> usesection lDEBUG_CODE2 3052 <1> %else 3053 <1> usesection lDEBUG_CODE 3054 <1> %endif 3055 <1> 3056 <1> %if _SYMBOLIC 3057 <1> ; INP: al = first character 3058 <1> ; si -> next character 3059 <1> ; OUT: CY if no symbol 3060 <1> ; NC if symbol, 3061 <1> ; bx:dx = symbol (offset) value 3062 <1> ; al = next character behind symbol 3063 <1> ; si -> behind next character 3064 <1> ; CHG: ah, bx, cx, dx 3065 <1> ; STT: ss = ds = es, UP 3066 <1> ; 3067 <1> ; Note: This invalidates the symbol table access slice. 3068 <1> issymbol?: section_of_function 3069 <1> nearcall zz_detect_xms ; re-detect XMS if used after run (eg WHILE) 3070 <1> 3071 <1> lframe near 3072 <1> lvar word, new_si 3073 <1> lenter 3074 <1> lvar word, orig_si 3075 <1> push si 3076 <1> lvar word, orig_ax 3077 <1> push ax 3078 <1> xor bx, bx 3079 <1> lequ 1, flag_has_nondigit 3080 <1> lequ 2, flag_has_symbol_prefix 3081 <1> lequ 4, flag_has_linear 3082 <1> lequ 8, flag_has_offset 3083 <1> lequ 16, flag_has_base 3084 <1> lequ 32, flag_is_86m_segment 3085 <1> lvar word, flags 3086 <1> push bx 3087 <1> lvar word, main_index ; used as parameter to zz_match_symbol 3088 <1> push ax 3089 <1> 3090 <1> dec si 3091 <1> %if 0 3092 <1> cmp al, '.' 3093 <1> jne @F 3094 <1> inc si ; allow dot prefix to symbol name 3095 <1> mov al, byte [si] 3096 <1> @@: 3097 <1> %endif 3098 <1> cmp al, '0' 3099 <1> jb @F 3100 <1> cmp al, '9' 3101 <1> jbe .not 3102 <1> @@: 3103 <1> 3104 <1> mov dx, msg.sl 3105 <1> nearcall isstring? 3106 <1> jne @F 3107 <1> lodsb 3108 <1> cmp al, '.' 3109 <1> jne short .error 3110 <1> or byte [bp + ?flags], ?flag_has_symbol_prefix | ?flag_has_linear 3111 <1> jmp .not_symbol_prefix 3112 <1> @@: 3113 <1> 3114 <1> mov dx, msg.symbol 3115 <1> nearcall isstring? 3116 <1> jne .not_symbol_prefix 3117 <1> lodsb 3118 <1> cmp al, '.' 3119 <1> jne short .error 3120 <1> or byte [bp + ?flags], ?flag_has_symbol_prefix 3121 <1> 3122 <1> mov dx, msg.linear 3123 <1> nearcall isstring? 3124 <1> jne @F 3125 <1> lodsb 3126 <1> cmp al, '.' 3127 <1> jne short .error 3128 <1> or byte [bp + ?flags], ?flag_has_linear 3129 <1> @@: 3130 <1> 3131 <1> mov dx, msg.offset 3132 <1> nearcall isstring? 3133 <1> jne @F 3134 <1> lodsb 3135 <1> cmp al, '.' 3136 <1> jne short .error 3137 <1> test byte [bp + ?flags], ?flag_has_linear 3138 <1> jnz short .error 3139 <1> or byte [bp + ?flags], ?flag_has_offset 3140 <1> @@: 3141 <1> 3142 <1> mov dx, msg.base 3143 <1> nearcall isstring? 3144 <1> jne @F 3145 <1> lodsb 3146 <1> cmp al, '.' 3147 <1> jne short .error 3148 <1> test byte [bp + ?flags], ?flag_has_linear | ?flag_has_offset 3149 <1> jnz short .error 3150 <1> or byte [bp + ?flags], ?flag_has_base 3151 <1> @@: 3152 <1> 3153 <1> .not_symbol_prefix: 3154 <1> 3155 <1> xor bx, bx 3156 <1> mov dx, si 3157 <1> .loopname: 3158 <1> lodsb 3159 <1> nearcall isseparator?.except_L_or_dot 3160 <1> je .endname 3161 <1> nearcall getexpression.lit_ishexdigit? 3162 <1> jnc @F 3163 <1> or byte [bp + ?flags], ?flag_has_nondigit 3164 <1> @@: 3165 <1> inc bx 3166 <1> jmp .loopname 3167 <1> 3168 <1> .error: 3169 <1> jmp error_expr ; does not use es 3170 <1> 3171 <1> .endname: 3172 <1> mov word [bp + ?new_si], si 3173 <1> mov cx, bx 3174 <1> test cx, cx 3175 <1> jz .not 3176 <1> 3177 <1> test byte [bp + ?flags], ?flag_has_nondigit | ?flag_has_symbol_prefix 3178 <1> jz .not 3179 <1> 3180 <1> mov si, dx 3181 <1> push cx 3182 <1> nearcall zz_hash 3183 <1> pop cx 3184 <1> 3185 <1> .loop: 3186 <1> ; ?main_index used as parameter 3187 <1> push ss 3188 <1> push dx 3189 <1> push cx 3190 <1> 3191 <1> dualcall zz_match_symbol ; ! note that possibly es != ss 3192 <1> jc .not 3193 <1> 3194 <1> testopt [es:di + smFlags], smfPoison 3195 <1> jz @F 3196 <1> setopt [internalflags2], dif2_poison 3197 <1> @@: 3198 <1> 3199 <1> mov dx, word [es:di + smLinear] 3200 <1> mov bx, word [es:di + smLinear + 2] 3201 <1> test byte [bp + ?flags], ?flag_has_linear 3202 <1> jnz .got 3203 <1> test byte [bp + ?flags], ?flag_has_base 3204 <1> jz .offset 3205 <1> .base: 3206 <1> ; offset=100 linear=10100 base=10000 3207 <1> sub dx, word [es:di + smOffset] 3208 <1> sbb bx, word [es:di + smOffset + 2] 3209 <1> jmp .got 3210 <1> 3211 <1> .offset: 3212 <1> mov si, word [bp + ?new_si] 3213 <1> dec si 3214 <1> nearcall skipcomma ; does not use es 3215 <1> dec si 3216 <1> mov dx, msg.wrt 3217 <1> push es 3218 <1> push ss 3219 <1> pop es 3220 <1> nearcall isstring? ; uses es 3221 <1> pop es 3222 <1> jne .offset_no_wrt 3223 <1> 3224 <1> nearcall skipcomma ; does not use es 3225 <1> 3226 <1> cmp al, '$' 3227 <1> jne @F 3228 <1> 3229 <1> or byte [bp + ?flags], ?flag_is_86m_segment 3230 <1> nearcall skipcomma ; does not use es 3231 <1> @@: 3232 <1> 3233 <1> push word [hh_depth_of_single_term] 3234 <1> mov dx, word [hh_depth] 3235 <1> inc dx 3236 <1> mov word [hh_depth_of_single_term], dx 3237 <1> push ss 3238 <1> pop es 3239 <1> nearcall getexpression ; (recursive) uses es 3240 <1> pop word [hh_depth_of_single_term] 3241 <1> 3242 <1> ; The getexpression call may recurse into calling 3243 <1> ; this function itself again. Therefore, it can 3244 <1> ; invalidate the access slice. To make sure we 3245 <1> ; can access the SYMMAIN entry again, reload it. 3246 <1> push word [bp + ?main_index] 3247 <1> push ax ; (reserve space, uninitialised) 3248 <1> dualcall getfarpointer.main 3249 <1> pop di 3250 <1> pop es 3251 <1> 3252 <1> nearcall skipcomm0 ; does not use es 3253 <1> mov word [bp + ?new_si], si 3254 <1> 3255 <1> test bx, bx 3256 <1> jnz short .errorj1 3257 <1> 3258 <1> mov bx, dx 3259 <1> %if _PM 3260 <1> test byte [bp + ?flags], ?flag_is_86m_segment 3261 <1> jnz .wrt_rm 3262 <1> nearcall ispm ; does not use es 3263 <1> jnz .wrt_rm 3264 <1> 3265 <1> mov ax, 0006h 3266 <1> int 31h ; cx:dx = base 3267 <1> jc short .errorj1 3268 <1> xchg ax, cx ; ax:dx = base 3269 <1> xchg dx, ax ; dx:ax = base 3270 <1> jmp .offset_wrt 3271 <1> 3272 <1> .wrt_rm: 3273 <1> %endif 3274 <1> xor dx, dx 3275 <1> mov ax, bx 3276 <1> mov cx, 4 3277 <1> @@: 3278 <1> shl ax, 1 3279 <1> rcl dx, 1 3280 <1> loop @B 3281 <1> 3282 <1> .offset_wrt: 3283 <1> ; dx:ax = seg base 3284 <1> 3285 <1> ; offset=100 3286 <1> ; linear=10100 3287 <1> ; seg base=8000 3288 <1> ; offset wrt seg=8100 3289 <1> neg dx 3290 <1> neg ax 3291 <1> sbb dx, byte 0 ; neg dx:ax 3292 <1> add ax, word [es:di + smLinear] 3293 <1> adc dx, word [es:di + smLinear + 2] ; linear - seg base 3294 <1> xchg ax, dx ; ax:dx = value 3295 <1> xchg ax, bx ; bx:dx = value 3296 <1> jmp .got 3297 <1> 3298 <1> .errorj1: 3299 <1> jmp error_expr ; does not use es 3300 <1> 3301 <1> 3302 <1> .offset_no_wrt: 3303 <1> mov dx, word [es:di + smOffset] 3304 <1> mov bx, word [es:di + smOffset + 2] 3305 <1> 3306 <1> .got: 3307 <1> testopt [es:di + smFlags], smfBase 3308 <1> jz @F 3309 <1> push word [bp + ?main_index] 3310 <1> pop word [sym_storage.main.based.base] 3311 <1> ; if called from zz_add set up base 3312 <1> @@: 3313 <1> 3314 <1> mov si, word [bp + ?new_si] 3315 <1> dec si 3316 <1> lodsb 3317 <1> clc 3318 <1> jmp .ret 3319 <1> .not: 3320 <1> stc 3321 <1> 3322 <1> mov si, word [bp + ?orig_si] 3323 <1> mov ax, word [bp + ?orig_ax] 3324 <1> .ret: 3325 <1> push ss 3326 <1> pop es ; reset es 3327 <1> lleave 3328 <1> retn 3329 <1> %endif 3330 <1> 3331 <1> 3332 <1> ; INP: al = first character 3333 <1> ; si-> next character 3334 <1> ; OUT: CY if no variable, 3335 <1> ; al, si = unchanged 3336 <1> ; NC if variable, 3337 <1> ; bx-> low word 3338 <1> ; dx-> high word 3339 <1> ; (if cl <= 2 then dx-> some word in our memory) 3340 <1> ; (dx != bx+2 if compound register) 3341 <1> ; cl = size of variable (1, 2, 3, 4 bytes) 3342 <1> ; ch = size of variable's name (2..13 bytes) 3343 <1> ; (this is limited to ivfNameLengthLimit) 3344 <1> ; INP:si - 1 -> variable's name 3345 <1> ; (can be modified from original content) 3346 <1> ; ah = 0 if a writeable variable (ie simply memory) 3347 <1> ; 1 if a read-only variable (ie simply memory) 3348 <1> ; 2..33 if an MMX register, see note below 3349 <1> ; al = next character behind variable 3350 <1> ; si-> behind next character 3351 <1> ; dword [di] = mask of bits that are read-only 3352 <1> ; CHG: ah, bx, dx, cx, di 3353 <1> ; STT: ss = ds = es, UP 3354 <1> ; 3355 <1> ; Note: For read access to (half of) an MMX register, no 3356 <1> ; special handling is necessary at all, because cl, 3357 <1> ; bx, and dx are set up to access a buffer that 3358 <1> ; contains the current value. (The value should be 3359 <1> ; read at once though, as the buffer may be shared 3360 <1> ; or become outdated otherwise.) 3361 <1> ; Write access to an MMX register must be handled 3362 <1> ; specifically, however. The returned field type 3363 <1> ; in ah indicates the register number (0..7) in the 3364 <1> ; lowest three bits. The two bits above those specify 3365 <1> ; the access type, which also specifies what was read 3366 <1> ; but need not be examined by readers. The access 3367 <1> ; type must be adhered to by writers. These are the 3368 <1> ; access types: 3369 <1> ; 0 zero extension from 32 bits to write all 64 bits 3370 <1> ; 1 sign extension from 32 bits to write all 64 bits 3371 <1> ; 2 writes only low 32 bits 3372 <1> ; 3 writes only high 32 bits 3373 <1> ; (Access type 3 is the only one for which the read 3374 <1> ; buffer is initialised with the high 32 bits.) 3375 <1> ; 3376 <1> ; As dx points to 'some word in our memory' if it 3377 <1> ; doesn't serve any purpose, it is still valid to 3378 <1> ; read the word that it points to. Particularly dx 3379 <1> ; mustn't contain 0FFFFh then, but with the current 3380 <1> ; implementation, it can also be assumed that we do 3381 <1> ; actually 'own' the word (even with a PM segment 3382 <1> ; shorter than 64 KiB the read would be allowed). 3383 <1> isvariable?: section_of_function 3384 00008EEB A8 <1> db __TEST_IMM8 ; (skip stc, NC) 3385 <1> 3386 <1> ; As above but additionally: 3387 <1> ; 3388 <1> ; INP: di -> buffer to receive variable name, 14 bytes 3389 <1> ; OUT: if NC, buffer filled with all-caps ASCIZ name 3390 <1> .return_name: section_of_function isvariable? 3391 00008EEC F9 <1> stc 3392 <1> 3393 00008EED 4E <1> dec si 3394 <1> lframe 3395 00008EEE 5589E5 <1> lenter 3396 <1> lvar word, bit0_is_return_name 3397 00008EF1 9C <1> pushf 3398 <1> lvar word, return_name_pointer 3399 00008EF2 57 <1> push di 3400 <1> %if ivfNameLengthLimit != 13 3401 <1> %error Adjust code here to new ivfNameLengthLimit 3402 <1> %endif 3403 00008EF3 31C0 <1> xor ax, ax 3404 <1> lvar 16, namebuffer 3405 00008EF5 50 <1> push ax ; ax = 0 so that accidentally reading past 3406 <1> ; the actual buffer wouldn't match 3407 00008EF6 FF740C <1> push word [si+12] 3408 00008EF9 FF740A <1> push word [si+10] 3409 00008EFC FF7408 <1> push word [si+8] 3410 00008EFF FF7406 <1> push word [si+6] 3411 00008F02 FF7404 <1> push word [si+4] 3412 00008F05 FF7402 <1> push word [si+2] 3413 00008F08 FF34 <1> push word [si] 3414 00008F0A 89E7 <1> mov di, sp ; -> name buffer 3415 <1> 3416 <1> lvar word, fieldtype_high_flags_low 3417 <1> lequ ?fieldtype_high_flags_low + 1, fieldtype 3418 <1> lequ ?fieldtype_high_flags_low, flags 3419 00008F0C 50 <1> push ax ; field type initialised to 0 (RW), flags too 3420 00008F0D 31DB <1> _386 xor bx, bx ; (a flag for the 32-bit register name check) 3421 <1> lvar word, length_to_add 3422 00008F0F 50 <1> push ax ; = 0 3423 <1> lvar word, startpointer 3424 00008F10 56 <1> push si ; -> name start 3425 00008F11 89FE <1> mov si, di 3426 00008F13 57 <1> push di 3427 <1> 3428 00008F14 B91000 <1> mov cx, 16 3429 <1> .store: 3430 00008F17 AC <1> lodsb 3431 <1> ; nearcall uppercase; (isseparator? calls uppercase) 3432 00008F18 E81DFA <1> nearcall isseparator? 3433 00008F1B F8 <1> clc 3434 00008F1C 7501 <1> jne short .not_separator 3435 00008F1E F9 <1> stc 3436 <1> .not_separator: 3437 00008F1F D1DA <1> rcr dx, 1 ; dl = flags indicating separators 3438 00008F21 AA <1> stosb 3439 00008F22 E2F3 <1> loop .store 3440 <1> 3441 00008F24 5E <1> pop si 3442 <1> 3443 00008F25 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 3444 00008F29 7409 <1> jz @F 3445 <1> 3446 00008F2B 56 <1> push si 3447 00008F2C B107 <1> mov cl, 14 >> 1 3448 00008F2E 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 3449 00008F31 F3A5 <1> rep movsw 3450 00008F33 5E <1> pop si 3451 <1> 3452 <1> @@: 3453 00008F34 F6C214 <1> test dl, 1<<2|1<<4 3454 00008F37 AD <1> lodsw 3455 00008F38 7503E9A400 <1> jz .notreg16 3456 <1> 3457 00008F3D E88B00 <1> call .reg16names_match ; (iff no match, --> .notreg16) 3458 <1> ; bx-> regs entry of (first) match 3459 00008F40 F6C204 <1> test dl, 1<<2 3460 00008F43 AD <1> lodsw 3461 00008F44 7435 <1> jz @F 3462 00008F46 F6C220 <1> test dl, 1<<5 3463 00008F49 742D <1> jz .reg16_j 3464 00008F4B 817CFC464C <1> cmp word [si - 4], "FL" 3465 00008F50 7526 <1> jne .reg16_j 3466 00008F52 3C2E <1> cmp al, '.' 3467 00008F54 7522 <1> jne .reg16_j 3468 00008F56 4E <1> dec si 3469 00008F57 AD <1> lodsw 3470 00008F58 BF[3C3F] <1> mov di, flagnames 3471 00008F5B B90800 <1> mov cx, flagbits.amount 3472 00008F5E F2AF <1> repne scasw 3473 00008F60 7516 <1> jne .reg16_j 3474 00008F62 8B45CE <1> mov ax, [di - (flagnames + 2) + flagbits] 3475 00008F65 BB[B03F] <1> mov bx, flagvaron 3476 00008F68 8506[E00C] <1> test ax, word [reg_efl] 3477 00008F6C 7501 <1> jnz .flagon 3478 00008F6E 43 <1> inc bx 3479 <1> .flagon: 3480 00008F6F B90105 <1> mov cx, (5 << 8) | 1 ; 5-byte name, 1-byte variable 3481 00008F72 FE46EB <1> inc byte [bp + ?fieldtype] 3482 <1> ; = 1 (RO) 3483 00008F75 E9A900 <1> jmp .return_success_var32_set_dx 3484 <1> 3485 <1> .reg16_j: 3486 00008F78 E9A200 <1> jmp .reg16 ; iff single match --> 3487 <1> 3488 <1> @@: 3489 00008F7B 3D3030 <1> cmp ax, "00" 3490 00008F7E 743E <1> je .compoundwithzero 3491 <1> 3492 <1> ; Check for a second 16-bit register name 3493 <1> ; (ie check for a compound register name) 3494 00008F80 E84800 <1> call .reg16names_match ; (iff no match, --> .notreg16) 3495 <1> ; bx-> regs entry of second match 3496 00008F83 92 <1> xchg dx, ax ; dx-> regs entry of first match 3497 00008F84 B90404 <1> mov cx, 4<<8|4 3498 <1> .return_success: ; cx, bx, dx, ?fieldtype set 3499 00008F87 31C0 <1> xor ax, ax 3500 00008F89 88C8 <1> mov al, cl 3501 00008F8B F7D8 <1> neg ax 3502 00008F8D 05[CC53] <1> add ax, masks + 4 ; 4 - size = offset into masks 3503 00008F90 97 <1> xchg di, ax ; di -> mask 3504 00008F91 807EEB01 <1> cmp byte [bp + ?fieldtype], 1 3505 00008F95 7503 <1> jne @F 3506 00008F97 BF[CC53] <1> mov di, mask_0byte ; di -> mask 3507 <1> @@: 3508 <1> .return_success_di: 3509 00008F9A 31C0 <1> xor ax, ax 3510 00008F9C 88E8 <1> mov al, ch ; ax = length 3511 <1> 3512 00008F9E F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 3513 00008FA2 7407 <1> jz @F 3514 <1> 3515 00008FA4 8B76FC <1> mov si, word [bp + ?return_name_pointer] 3516 00008FA7 01C6 <1> add si, ax 3517 00008FA9 8824 <1> mov byte [si], ah ; zero-terminate 3518 <1> @@: 3519 <1> 3520 00008FAB 5E <1> pop si ; ?startpointer 3521 00008FAC F646EA01 <1> testopt [bp + ?flags], 1 3522 00008FB0 7402 <1> jz @F 3523 00008FB2 58 <1> pop ax ; get length to add to start 3524 00008FB3 50 <1> push ax ; fill stack slot again 3525 <1> @@: 3526 00008FB4 01C6 <1> add si, ax ; -> behind name (should NC) 3527 00008FB6 58 <1> pop ax ; discard ?length_to_add 3528 00008FB7 F8 <1> clc ; (NC) 3529 <1> .return_ax_frame_lodsb: 3530 00008FB8 58 <1> pop ax ; ah = ?type 3531 00008FB9 89EC5D <1> lleave code 3532 00008FBC AC <1> lodsb 3533 <1> .retn: 3534 00008FBD C3 <1> retn 3535 <1> 3536 <1> 3537 <1> .compoundwithzero: 3538 00008FBE 89DA <1> mov dx, bx ; -> word to use as upper word 3539 00008FC0 BF[D053] <1> mov di, mask_compoundwithzero 3540 <1> ; only allow writing upper word 3541 00008FC3 B90404 <1> mov cx, 4 << 8 | 4 ; 4-byte name, 4-byte variable 3542 00008FC6 8D5D02 <1> lea bx, [di + 2] ; -> (constant) word that is zero, as lower word 3543 <1> ; This depends on the contents of mask_compoundwithzero. 3544 00008FC9 EBCF <1> jmp .return_success_di 3545 <1> 3546 <1> 3547 <1> ; INP: ax = capitalised candidate register name 3548 <1> ; ch = 0 3549 <1> ; dx, si, bx, etc set up for later checks 3550 <1> ; OUT: Iff match, 3551 <1> ; bx-> associated regs entry (dword-aligned) 3552 <1> ; ax = INP:bx 3553 <1> ; Else, 3554 <1> ; returns to .notreg16 3555 <1> ; bx left unchanged on 386 systems 3556 <1> ; CHG: cl, di, bx, ax 3557 <1> ; 3558 <1> ; Note: The 32-bit register name check depends on the 3559 <1> ; fact that the low two bits of bx are set to 3560 <1> ; zero on a match, which is true because regs 3561 <1> ; is dword-aligned. 3562 <1> ; It also depends on bx being left unchanged on 3563 <1> ; a mismatch, which is the case unless the 3564 <1> ; non-386 additional FS,GS filtering occurs. 3565 <1> .reg16names_match: 3566 00008FCB BF[DC3F] <1> mov di, reg16names 3567 00008FCE B110 <1> mov cl, 16 3568 00008FD0 F2AF <1> repne scasw 3569 00008FD2 750C <1> jne short .notreg16_pop ; no match --> 3570 00008FD4 01FF <1> add di, di 3571 00008FD6 93 <1> xchg ax, bx ; (returned for compound register name match) 3572 00008FD7 8D9D[E88A] <1> lea bx, [di -2*(reg16names+DATASECTIONFIXUP+2) +regs] 3573 <1> ; -> regs entry 3574 00008FDB C3 <1> _386 retn 3575 <1> ; cx = number of remaining reg16names 3576 00008FDC D1E9 <1> _no386 shr cx, 1 ; cx = number of remaining reg16names pairs 3577 <1> ; = 1 iff exactly the IP,FL pair remaining 3578 <1> ; (ie matched one of FS,GS) 3579 00008FDE E2DD <1> _no386 loop .retn ; iff cx != 1, return the match --> 3580 <1> ; on non-386 systems, FS,GS matches fall through here 3581 <1> .notreg16_pop: 3582 00008FE0 58 <1> pop ax ; (discard near return address) 3583 <1> .notreg16: 3584 <1> ; Check for a 32-bit register name 3585 00008FE1 F6C208 <1> _386 test dl, 1<<3 3586 00008FE4 7419 <1> _386 jz short .notreg32 3587 <1> 3588 00008FE6 8D76EC <1> _386 lea si, [bp+?namebuffer] 3589 00008FE9 AC <1> _386 lodsb 3590 00008FEA D0EB <1> _386 shr bl, 1 ; CY iff second entry during same call 3591 <1> ; (in that case, al contains 'E') 3592 00008FEC 1C45 <1> _386 sbb al, 'E' ; possibly an 'E' register ? (on first entry) 3593 00008FEE AD <1> _386 lodsw 3594 00008FEF 750E <1> _386 jne short .notreg32 ; no --> (or after second entry) 3595 00008FF1 43 <1> _386 inc bx ; prepare flag for second entry 3596 <1> ; (this requires regs to be dword-aligned!) 3597 00008FF2 80FC53 <1> _386 cmp ah, 'S' ; candidate segment register ? 3598 00008FF5 7408 <1> _386 je short .notreg32 ; yes, skip check (disallow match) --> 3599 <1> 3600 00008FF7 E8D1FF <1> _386 call .reg16names_match ; (iff no match, --> .notreg16 (second entry)) 3601 <1> ; bx-> regs entry of match 3602 00008FFA B90403 <1> _386 mov cx, 3<<8|4 3603 00008FFD EB22 <1> _386 jmp short .return_success_var32_set_dx 3604 <1> 3605 <1> .notreg32: 3606 <1> ; Check for an 8-bit register name 3607 00008FFF F6C204 <1> test dl, 1<<2 3608 00009002 7423 <1> jz short .notreg8 3609 <1> 3610 00009004 8D76EC <1> lea si, [bp+?namebuffer] 3611 00009007 AD <1> lodsw 3612 00009008 BF[CC3F] <1> mov di, reg8names 3613 0000900B B108 <1> mov cl, 8 3614 0000900D F2AF <1> repne scasw 3615 0000900F 7516 <1> jne short .notreg8 3616 <1> ; cx = cl = number of remaining reg8names 3617 00009011 80E101 <1> and cl, 1 ; cx = cl = 1 iff an xL register, else 0 3618 00009014 8D9DD5CC <1> lea bx, [di-reg8names-2+regs-1] 3619 <1> ; bx-> reg_eax-1 if AL, reg_eax+1 if AH, etc 3620 00009018 01CB <1> add bx, cx ; bx-> reg_eax if AL, reg_eax+1 if AH, etc 3621 0000901A B101 <1> mov cl, 1 3622 <1> 3623 0000901C A9 <1> db __TEST_IMM16 ; (NC, skip mov) 3624 <1> .reg16: 3625 0000901D B102 <1> mov cl, 2 3626 <1> .got2bytename: 3627 <1> .got2bytename_var32_set_dx: 3628 0000901F B502 <1> mov ch, 2 3629 <1> .return_success_var32_set_dx: 3630 00009021 8D5702 <1> lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 3631 <1> %define .return_success_j .return_success_j1 3632 <1> %[.return_success_j]: 3633 00009024 E960FF <1> jmp .return_success 3634 <1> 3635 <1> .notreg8: 3636 <1> 3637 00009027 BF[B650] <1> mov di, isvariable_morebyte_nameheaders 3638 <1> 3639 <1> .loop: 3640 0000902A 8366EA00 <1> and word [bp + ?fieldtype_high_flags_low], 0 3641 <1> ; clear in case earlier iteration set it 3642 <1> 3643 0000902E 8B46EC <1> mov ax, word [bp + ?namebuffer] 3644 00009031 B9[C451] <1> mov cx, isvariable_morebyte_nameheaders.end 3645 00009034 39CF <1> cmp di, cx 3646 00009036 730A <1> jae @F 3647 00009038 29F9 <1> sub cx, di 3648 0000903A D1E9 <1> shr cx, 1 ; = how many headers remaining 3649 0000903C F2AF <1> repne scasw 3650 0000903E 7421 <1> je .check_morebyte 3651 <1> %if IVS_HAVE_ONEBYTE 3652 00009040 EB0C <1> jmp .next_no_pop 3653 <1> 3654 <1> @@: 3655 <1> %if IVS_SINGLE_ONEBYTE 3656 00009042 41 <1> inc cx 3657 00009043 39CF <1> cmp di, cx ; iteration after one byte var check ? 3658 00009045 7309 <1> jae @F ; yes, end --> 3659 00009047 47 <1> inc di ; remember we did the one byte check 3660 00009048 3C56 <1> cmp al, IVS_SINGLE_ONEBYTE_NAME 3661 0000904A 740A <1> je .check_onebyte 3662 <1> %else 3663 <1> mov cx, isvariable_onebyte_names.end 3664 <1> sub cx, di ; = how many names remaining 3665 <1> jbe @F ; if none --> 3666 <1> repne scasb 3667 <1> je .check_onebyte 3668 <1> %endif 3669 <1> %endif 3670 0000904C A8 <1> db __TEST_IMM8 ; (skip pop) 3671 <1> .next: 3672 0000904D 5F <1> pop di 3673 <1> .next_no_pop: 3674 0000904E EBDA <1> jmp .loop 3675 <1> 3676 <1> @@: 3677 <1> .end: 3678 <1> .return_failure: 3679 00009050 5E <1> pop si ; ?startpointer 3680 00009051 58 <1> pop ax ; ?length_to_add 3681 00009052 F9 <1> stc 3682 00009053 E962FF <1> jmp .return_ax_frame_lodsb 3683 <1> 3684 <1> 3685 <1> %if IVS_HAVE_ONEBYTE 3686 <1> .check_onebyte: 3687 00009056 57 <1> push di 3688 <1> %if IVS_SINGLE_ONEBYTE 3689 00009057 BB[684C] <1> mov bx, isvariable_struc_onebyte_list 3690 <1> %else 3691 <1> sub di, isvariable_onebyte_names + 1 3692 <1> ; = index 3693 <1> %if ISVARIABLESTRUC_size == 8 3694 <1> add di, di ; = index * 2 3695 <1> add di, di ; = index * 4 3696 <1> add di, di ; = index * 8 3697 <1> %else 3698 <1> %error Unexpected structure size 3699 <1> %endif 3700 <1> lea bx, [di + isvariable_struc_onebyte_list] 3701 <1> %endif 3702 0000905A 8D76ED <1> lea si, [bp + ?namebuffer + 1] ; -> buffered string (allcaps) 3703 0000905D 31C9 <1> xor cx, cx ; = 0, gets incremented next 3704 0000905F EB21 <1> jmp @F 3705 <1> %endif 3706 <1> 3707 <1> .check_morebyte: 3708 00009061 57 <1> push di 3709 00009062 81EF[B850] <1> sub di, isvariable_morebyte_nameheaders + 2 3710 <1> ; = index * 2 3711 <1> %if ISVARIABLESTRUC_size == 8 3712 00009066 01FF <1> add di, di ; = index * 4 3713 00009068 01FF <1> add di, di ; = index * 8 3714 <1> %else 3715 <1> %error Unexpected structure size 3716 <1> %endif 3717 0000906A 8D9D[704C] <1> lea bx, [di + isvariable_struc_morebyte_list] 3718 0000906E 8B4F02 <1> mov cx, word [bx + ivFlags] 3719 00009071 83E10F <1> and cx, ivfNameLengthMask ; cx = length 3720 00009074 8B3F <1> mov di, word [bx + ivName] ; -> name 3721 00009076 8D76EE <1> lea si, [bp + ?namebuffer + 2] ; -> buffered string (allcaps) 3722 00009079 38C0 <1> cmp al, al ; ZR (in case remaining length is zero) 3723 0000907B 51 <1> push cx 3724 0000907C F3A6 <1> repe cmpsb ; compare 3725 0000907E 59 <1> pop cx 3726 0000907F 75CC <1> jne .next ; if not same --> 3727 00009081 41 <1> inc cx ; increment twice 3728 <1> @@: 3729 00009082 41 <1> inc cx ; increment once 3730 00009083 AC <1> lodsb ; get next byte in buffer 3731 00009084 807F0600 <1> cmp byte [bx + ivArrayLast], 0 3732 00009088 7503E9D100 <1> je .notarray 3733 <1> 3734 <1> .array: 3735 0000908D 3C28 <1> cmp al, '(' 3736 0000908F 7554 <1> jne .array_not_index_expression ; not index expression --> 3737 <1> 3738 <1> .array_index_expression: 3739 00009091 8B76E6 <1> mov si, word [bp + ?startpointer] 3740 00009094 01CE <1> add si, cx ; -> at opening parens 3741 00009096 46 <1> inc si ; -> behind opening parens 3742 00009097 AC <1> lodsb 3743 00009098 52 <1> push dx 3744 00009099 53 <1> push bx 3745 0000909A E8DA02 <1> nearcall getexpression 3746 0000909D 50 <1> push ax 3747 0000909E 80E43F <1> and ah, 3Fh 3748 000090A1 80FC08 <1> cmp ah, 8 ; from checksignificantbits 3749 000090A4 58 <1> pop ax 3750 000090A5 B600 <1> mov dh, 0 3751 000090A7 89D7 <1> mov di, dx ; di = index 3752 000090A9 5B <1> pop bx 3753 000090AA 5A <1> pop dx 3754 000090AB 77A0 <1> ja short .next ; more than 8 significant bits --> 3755 000090AD E83009 <1> nearcall skipwh0 3756 000090B0 3C29 <1> cmp al, ')' ; insure closing parens 3757 000090B2 753F <1> jne short .error_j3 3758 <1> 3759 000090B4 56 <1> push si 3760 000090B5 2B76E6 <1> sub si, word [bp + ?startpointer] 3761 <1> ; = how much to skip 3762 000090B8 8976E8 <1> mov word [bp + ?length_to_add], si 3763 000090BB 5E <1> pop si 3764 000090BC 804EEA01 <1> setopt [bp + ?flags], 1 3765 <1> 3766 000090C0 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 3767 000090C4 7415 <1> jz .array_no_return_name 3768 <1> 3769 000090C6 97 <1> xchg ax, di 3770 000090C7 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 3771 000090CA 01CF <1> add di, cx ; -> behind name 3772 000090CC 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 3773 000090D0 7705 <1> ja @F ; if >= 10h is a valid index --> 3774 000090D2 E8C709 <1> nearcall hexnyb ; expand to single digit 3775 000090D5 EB03 <1> jmp @FF 3776 <1> @@: 3777 000090D7 E8B709 <1> nearcall hexbyte ; expand to two digits 3778 <1> @@: 3779 000090DA 97 <1> xchg ax, di ; restore di = index 3780 <1> 3781 <1> .array_no_return_name: 3782 000090DB 41 <1> inc cx ; make space for one digit 3783 000090DC 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 3784 000090E0 7601 <1> jna @F ; if maximum index <= 0Fh --> 3785 000090E2 41 <1> inc cx ; make space for another digit 3786 <1> @@: 3787 000090E3 EB66 <1> jmp .array_index_expression_common 3788 <1> 3789 <1> .array_not_index_expression: 3790 000090E5 E850F8 <1> nearcall isseparator? ; name ends ? 3791 000090E8 750C <1> jne @F ; no --> 3792 000090EA F6470302 <1> testopt [bx + ivFlags], ivfArrayOptional 3793 <1> ; is the index optional ? 3794 000090EE 7573 <1> jnz .arrayfirst ; yes, handle as if first --> 3795 <1> .next_j1: 3796 000090F0 E95AFF <1> jmp .next ; no, mismatch --> 3797 <1> 3798 <1> .error_j3: 3799 000090F3 E967F1 <1> jmp error_expr 3800 <1> 3801 <1> @@: 3802 000090F6 E88507 <1> nearcall getnyb 3803 000090F9 72F5 <1> jc .next_j1 3804 000090FB 98 <1> cbw ; ax = first nybble of index 3805 000090FC 97 <1> xchg di, ax ; di = first nybble of index 3806 000090FD AC <1> lodsb 3807 000090FE F6470304 <1> testopt [bx + ivFlags], ivfSeparatorSpecial 3808 00009102 740D <1> jz @F 3809 00009104 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 3810 <1> ; highest > 0Fh ? 3811 00009108 7635 <1> jna .gotseparatorspecial; no --> 3812 0000910A E87107 <1> nearcall getnyb 3813 0000910D 7230 <1> jc .gotseparatorspecial ; not hexit, treat as separator --> 3814 0000910F EB10 <1> jmp .have_second_digit ; have al == 0..0Fh 3815 <1> 3816 <1> @@: 3817 00009111 E824F8 <1> nearcall isseparator? ; single digit ? 3818 00009114 7424 <1> je @F ; yes --> 3819 00009116 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 3820 <1> ; highest > 0Fh ? 3821 0000911A 76D4 <1> jna .next_j1 ; no --> 3822 <1> .get_second_digit: 3823 0000911C E85F07 <1> nearcall getnyb 3824 0000911F 72CF <1> jc .next_j1 3825 <1> .have_second_digit: 3826 00009121 98 <1> cbw ; ax = second nybble of index 3827 00009122 01FF <1> add di, di 3828 00009124 01FF <1> add di, di 3829 00009126 01FF <1> add di, di 3830 00009128 01FF <1> add di, di ; di = first digit times 16 3831 0000912A 01C7 <1> add di, ax ; di = full index 3832 0000912C AC <1> lodsb 3833 0000912D F6470304 <1> testopt [bx + ivFlags], ivfSeparatorSpecial 3834 00009131 7507 <1> jnz @F 3835 00009133 E802F8 <1> nearcall isseparator? 3836 00009136 75B8 <1> jne .next_j1 3837 00009138 EB05 <1> jmp .gotseparatorspecial 3838 <1> @@: ; make sure no hexit follows 3839 0000913A E84107 <1> nearcall getnyb 3840 0000913D 73B1 <1> jnc .next_j1 3841 <1> .gotseparatorspecial: 3842 <1> 3843 0000913F F7DE <1> neg si ; minus -> after separator 3844 00009141 8D4AED <1> lea cx, [bp + ?namebuffer + 1 + si] 3845 <1> ; -> buffered string plus 1 minus -> after separator 3846 <1> ; -> buffered string plus 1 minus (-> at separator plus 1) 3847 <1> ; -> buffered string minus -> at separator 3848 00009144 F7D9 <1> neg cx ; -> at separator minus -> buffered string 3849 00009146 8B76E6 <1> mov si, word [bp + ?startpointer] 3850 00009149 01CE <1> add si, cx 3851 <1> 3852 <1> .array_index_expression_common: 3853 <1> ; si -> behind index 3854 0000914B 89F8 <1> mov ax, di 3855 <1> ; test ah, ah 3856 <1> ; jnz short .error_j1 ; (not possible) 3857 0000914D 3A4706 <1> cmp al, byte [bx + ivArrayLast] 3858 <1> ; index > last ? 3859 00009150 779E <1> ja short .next_j1 ; then error --> 3860 <1> 3861 00009152 F6470301 <1> testopt [bx + ivFlags], ivfArrayOneBased 3862 00009156 7403 <1> jz @F ; got index 3863 00009158 48 <1> dec ax ; decrement index to get 0-based 3864 00009159 7895 <1> js short .next_j1 ; if it was 0, invalid --> 3865 <1> @@: 3866 0000915B 96 <1> xchg ax, si ; si = index 3867 0000915C EB07 <1> jmp .arraycommon ; continue 3868 <1> 3869 <1> 3870 <1> .notarray: 3871 0000915E E8D7F7 <1> nearcall isseparator? ; name ends ? 3872 00009161 758D <1> jne short .next_j1 ; no, mismatch --> 3873 <1> 3874 <1> .arrayfirst: 3875 00009163 31F6 <1> xor si, si ; si = array index (0 here) 3876 <1> 3877 <1> .arraycommon: 3878 00009165 88CD <1> mov ch, cl ; ch = name length 3879 00009167 8B4702 <1> mov ax, word [bx + ivFlags] 3880 0000916A 83E030 <1> and ax, ivfVarLengthMask; ax = shifted encoded var length 3881 0000916D B104 <1> mov cl, ivfVarLengthShift 3882 0000916F D3E8 <1> shr ax, cl ; ax = encoded var length 3883 00009171 40 <1> inc ax ; decode var length 3884 00009172 88C1 <1> mov cl, al ; cl = var length 3885 <1> 3886 00009174 96 <1> xchg ax, si ; ax = array index 3887 <1> 3888 00009175 F6470280 <1> testopt [bx + ivFlags], ivfReadOnly 3889 00009179 7403 <1> jz @F 3890 0000917B FE46EB <1> inc byte [bp + ?fieldtype] 3891 <1> ; = 1 (RO) 3892 <1> @@: 3893 0000917E 31FF <1> xor di, di 3894 00009180 8B7704 <1> mov si, word [bx + ivAddress] 3895 00009183 F6470240 <1> testopt [bx + ivFlags], ivfSpecialSetUp 3896 00009187 7407 <1> jz .notspecial 3897 <1> ; (NC) 3898 00009189 FFD6 <1> call si ; INP: ax = array index (0-based), di = 0 3899 <1> ; cl = default size of variable (1..4) 3900 <1> ; CHG: si, ax, dx 3901 <1> ; OUT: NC if valid, 3902 <1> ; bx -> var, di = 0 or di -> mask 3903 <1> ; cl = size of variable (1..4) 3904 0000918B 7318 <1> jnc @F 3905 0000918D E9BDFE <1> jmp .next 3906 <1> 3907 <1> .notspecial: 3908 00009190 8A5F07 <1> mov bl, byte [bx + ivArrayBetween] 3909 00009193 B700 <1> mov bh, 0 ; bx = array between offset 3910 00009195 00CB <1> add bl, cl 3911 00009197 80D700 <1> adc bh, 0 ; bx = array item size 3912 0000919A F7E3 <1> mul bx ; dx:ax = ax times bx 3913 0000919C 85D2 <1> test dx, dx 3914 0000919E 7513 <1> jnz short .error_j2 3915 000091A0 01F0 <1> add ax, si ; ax -> variable 3916 000091A2 720F <1> jc short .error_j2 3917 000091A4 93 <1> xchg ax, bx ; bx -> variable 3918 <1> @@: 3919 000091A5 5A <1> pop dx ; (discard pointer into names/headers) 3920 000091A6 8D5702 <1> lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 3921 000091A9 85FF <1> test di, di 3922 000091AB 7503E9D7FD <1> jz .return_success 3923 000091B0 E9E7FD <1> jmp .return_success_di 3924 <1> 3925 <1> .error_j2: 3926 000091B3 E9A7F0 <1> jmp error_expr 3927 <1> 3928 <1> 3929 <1> %if _MMXSUPP 3930 <1> var_mm_setup: section_of_function 3931 000091B6 803E[320B]01 <1> cmp byte [has_mmx], 1 ; MMX supported ? 3932 000091BB 7301 <1> jae @F ; yes --> 3933 000091BD C3 <1> retn ; (CY) 3934 <1> 3935 <1> @@: 3936 <1> [cpu 586] 3937 000091BE 50 <1> push ax 3938 000091BF 8D76EF <1> lea si, [bp + ?namebuffer + 3] 3939 <1> ; -> may be type letter, if not index expression 3940 000091C2 F646EA01 <1> testopt [bp + ?flags], 1 3941 000091C6 7409 <1> jz @F 3942 000091C8 8B76E6 <1> mov si, word [bp + ?startpointer] 3943 000091CB 0376E8 <1> add si, word [bp + ?length_to_add] 3944 000091CE FF46E8 <1> inc word [bp + ?length_to_add] 3945 <1> 3946 <1> @@: 3947 000091D1 AC <1> lodsb ; load what may be type letter 3948 000091D2 E89907 <1> nearcall uppercase 3949 <1> 3950 000091D5 3C5A <1> cmp al, 'Z' 3951 000091D7 7418 <1> je @F ; 0 = ZX low --> 3952 000091D9 B310 <1> mov bl, 2<<3 ; = 10h = low 3953 000091DB 3C4C <1> cmp al, 'L' 3954 000091DD 7414 <1> je @FF 3955 000091DF B308 <1> mov bl, 1<<3 ; = 8h = SX low 3956 000091E1 3C53 <1> cmp al, 'S' 3957 000091E3 740E <1> je @FF 3958 000091E5 B318 <1> mov bl, 3<<3 ; = 18h = high 3959 000091E7 3C48 <1> cmp al, 'H' 3960 000091E9 7408 <1> je @FF 3961 000091EB FF4EE8 <1> dec word [bp + ?length_to_add] 3962 000091EE 4E <1> dec si ; -> back at the last text 3963 <1> ; (subsequent code will check for separator) 3964 000091EF B000 <1> mov al, 0 3965 <1> @@: 3966 000091F1 B300 <1> mov bl, 0 ; 0 = ZX low 3967 <1> @@: ; is valid letter 3968 000091F3 50 <1> push ax 3969 000091F4 AC <1> lodsb ; = candidate separator 3970 000091F5 E840F7 <1> nearcall isseparator? ; is it ? 3971 000091F8 58 <1> pop ax 3972 000091F9 754E <1> jne .ret_CY_pop ; no --> 3973 <1> 3974 000091FB F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 3975 000091FF 7406 <1> jz .no_return_name 3976 <1> 3977 00009201 8B76FC <1> mov si, word [bp + ?return_name_pointer] 3978 00009204 884403 <1> mov byte [si + 3], al ; store the additional letter (or 0) 3979 <1> ; pointer + 3 ("MM" then hexit) 3980 <1> 3981 <1> .no_return_name: 3982 00009207 84C0 <1> test al, al 3983 00009209 58 <1> pop ax 3984 0000920A 7402 <1> jz @F 3985 0000920C FEC5 <1> inc ch ; increment name length 3986 <1> @@: 3987 0000920E 93 <1> xchg ax, bx 3988 <1> 3989 <1> ; INP: bx = register number 0..7 3990 <1> ; al = 0 for ZX low, 8 for SX low, 10h for low, 18h for high 3991 0000920F 08D8 <1> or al, bl 3992 00009211 40 <1> inc ax 3993 00009212 40 <1> inc ax 3994 00009213 8846EB <1> mov byte [bp + ?fieldtype], al 3995 <1> 3996 <1> %if _PM 3997 <1> sub sp, 8 3998 <1> call save_scratchsel 3999 <1> %if _EXPRDUALCODE && _DUALCODE 4000 <1> mov dx, word [code2_seg] 4001 <1> %else 4002 <1> mov dx, word [code_seg] 4003 <1> %endif 4004 <1> nearcall setes2dx ; es => lDEBUG_CODE/2 (writable) 4005 <1> %else 4006 <1> %if _EXPRDUALCODE && _DUALCODE 4007 <1> mov es, word [code2_seg]; es => lDEBUG_CODE2 4008 <1> %else 4009 00009216 8E06[1001] <1> mov es, word [code_seg] ; es => lDEBUG_CODE 4010 <1> %endif 4011 <1> %endif 4012 0000921A C0E303 <1> shl bl, 3 ; shift into reg field 4013 0000921D 80CB07 <1> or bl, 07h ; code to get our ModR/M byte (r/m = [bx]) 4014 00009220 26881E[3392] <1> mov byte [es:.getmmxlow_modrm], bl 4015 <1> ; SMC in section lDEBUG_CODE or lDEBUG_CODE2 4016 00009225 26881E[4092] <1> mov byte [es:.getmmxhigh_modrm], bl 4017 <1> ; SMC in section lDEBUG_CODE or lDEBUG_CODE2 4018 0000922A EB00 <1> jmp @F ; try to invalidate prefetch 4019 <1> @@: 4020 <1> 4021 0000922C 16 <1> push ss 4022 0000922D 07 <1> pop es 4023 <1> 4024 <1> %if _PM 4025 <1> call restore_scratchsel 4026 <1> %endif 4027 <1> 4028 0000922E BB[080C] <1> mov bx, mmxbuff 4029 <1> .getmmxlow: 4030 <1> .getmmxlow_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 4031 00009231 0F7E07 <1> movd dword [bx], mm0 ; first, initialise with low dword 4032 <1> 4033 00009234 3C18 <1> cmp al, 18h ; want to write high dword ? 4034 00009236 720F <1> jb .mmxcommon ; no --> 4035 <1> 4036 <1> .getmmxhigh: 4037 00009238 83EC08 <1> sub sp, byte 8 4038 0000923B 89E0 <1> mov ax, sp ; (ss = ds) 4039 0000923D 93 <1> xchg bx, ax ; bx -> qword on stack, ax -> mmxbuff 4040 <1> .getmmxhigh_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 4041 0000923E 0F7F07 <1> movq qword [bx], mm0 4042 00009241 93 <1> xchg bx, ax ; restore bx -> mmxbuff 4043 00009242 5E <1> pop si 4044 00009243 5E <1> pop si ; discard low dword 4045 00009244 668F07 <1> pop dword [bx] ; save high dword here 4046 <1> 4047 <1> .mmxcommon: 4048 00009247 F8 <1> clc 4049 00009248 C3 <1> retn 4050 <1> __CPU__ 4051 <1> 4052 <1> 4053 <1> .ret_CY_pop: 4054 00009249 58 <1> pop ax 4055 <1> .ret_CY: 4056 0000924A F9 <1> stc 4057 0000924B C3 <1> retn 4058 <1> %endif 4059 <1> 4060 <1> 4061 <1> var_ri_setup: section_of_function 4062 0000924C 8D76EF <1> lea si, [bp + ?namebuffer + 3] 4063 0000924F F646EA01 <1> testopt [bp + ?flags], 1 4064 00009253 740F <1> jz @F 4065 00009255 8B76E6 <1> mov si, word [bp + ?startpointer] 4066 00009258 0376E8 <1> add si, word [bp + ?length_to_add] 4067 0000925B FF46E8 <1> inc word [bp + ?length_to_add] 4068 0000925E 50 <1> push ax 4069 0000925F B301 <1> mov bl, 1 ; set up 1 additional digit 4070 00009261 AC <1> lodsb ; load what must be type letter 4071 00009262 EB0A <1> jmp .expr 4072 <1> 4073 <1> @@: 4074 00009264 50 <1> push ax 4075 00009265 B3FF <1> mov bl, -1 4076 <1> @@: 4077 00009267 AC <1> lodsb ; al = candidate type letter, or hexit 4078 00009268 43 <1> inc bx ; count number of hexits 4079 00009269 E81206 <1> nearcall getnyb 4080 0000926C 73F9 <1> jnc @B ; if was a hexit, loop --> 4081 <1> .expr: ; al = type letter 4082 0000926E E8FD06 <1> nearcall uppercase 4083 00009271 88C7 <1> mov bh, al ; bh = letter 4084 00009273 3C4C <1> cmp al, 'L' ; valid one ? 4085 00009275 740C <1> je @F 4086 00009277 3C4F <1> cmp al, 'O' 4087 00009279 7408 <1> je @F 4088 0000927B 3C53 <1> cmp al, 'S' 4089 0000927D 7404 <1> je @F 4090 0000927F 3C50 <1> cmp al, 'P' 4091 00009281 7565 <1> jne .ret_CY_pop ; no --> 4092 <1> @@: ; is valid letter 4093 00009283 AC <1> lodsb ; = candidate separator 4094 00009284 E8B1F6 <1> nearcall isseparator? ; is it ? 4095 00009287 755F <1> jne .ret_CY_pop ; no --> 4096 00009289 58 <1> pop ax 4097 <1> 4098 0000928A F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 4099 0000928E 740E <1> jz .interrupt_no_return_name 4100 <1> 4101 00009290 89DF <1> mov di, bx 4102 00009292 81E7FF00 <1> and di, 255 ; get number of additional hexits 4103 00009296 037EFC <1> add di, word [bp + ?return_name_pointer] 4104 00009299 83C703 <1> add di, 3 ; amount hexits + 3 + pointer 4105 0000929C 883D <1> mov byte [di], bh ; store the additional letter 4106 <1> 4107 <1> .interrupt_no_return_name: 4108 0000929E FEC5 <1> inc ch ; increment name length 4109 000092A0 93 <1> xchg ax, bx 4110 <1> 4111 <1> ; INP: bx = interrupt number 0..255 4112 <1> ; ah = 'S' for segment, 'O' for offset, 'L' for linear 4113 <1> %if _PM 4114 <1> sub sp, 8 4115 <1> call save_scratchsel 4116 <1> %endif 4117 000092A1 31F6 <1> xor si, si 4118 <1> %if _PM 4119 <1> push bx 4120 <1> nearcall setds2si ; ds => IVT 4121 <1> pop bx 4122 <1> %else 4123 000092A3 8EDE <1> mov ds, si ; ds => IVT 4124 <1> %endif 4125 000092A5 80FC53 <1> cmp ah, 'S' 4126 000092A8 7502 <1> jne @F 4127 000092AA 46 <1> inc si 4128 000092AB 46 <1> inc si ; si = 2 (displacement to get segment) 4129 <1> @@: 4130 000092AC 01DB <1> add bx, bx 4131 000092AE 01DB <1> add bx, bx ; ds:bx -> IVT entry 4132 000092B0 FF7002 <1> push word [bx + si + 2] 4133 000092B3 FF30 <1> push word [bx + si] ; get segment:offset or trash:segment 4134 000092B5 16 <1> push ss 4135 000092B6 1F <1> pop ds 4136 000092B7 BB[A850] <1> mov bx, interrupt_var 4137 000092BA 8F07 <1> pop word [bx] 4138 000092BC 8F4702 <1> pop word [bx + 2] 4139 <1> ; store in variable 4140 <1> %if _PM 4141 <1> call restore_scratchsel 4142 <1> %endif 4143 000092BF 80FC50 <1> cmp ah, 'P' ; for pointer type ? 4144 000092C2 741F <1> je .var_size_4 ; yes --> 4145 000092C4 80FC4C <1> cmp ah, 'L' 4146 000092C7 751C <1> jne @FF 4147 000092C9 51 <1> push cx 4148 000092CA 31C0 <1> xor ax, ax 4149 000092CC 874702 <1> xchg ax, word [bx + 2] ; clear high word, get segment 4150 000092CF 31D2 <1> xor dx, dx ; dx:ax = segment 4151 000092D1 B90400 <1> mov cx, 4 4152 <1> @@: 4153 000092D4 D1E0 <1> shl ax, 1 4154 000092D6 D1D2 <1> rcl dx, 1 4155 000092D8 E2FA <1> loop @B ; shift up 4 bits 4156 000092DA 0107 <1> add word [bx], ax 4157 000092DC 115702 <1> adc word [bx + 2], dx ; add to dword 4158 000092DF 59 <1> pop cx 4159 000092E0 B103 <1> mov cl, 3 ; 3byte variable (21 bits needed) 4160 000092E2 A9 <1> db __TEST_IMM16 ; (skip mov) 4161 <1> .var_size_4: 4162 000092E3 B104 <1> mov cl, 4 ; dword variable 4163 <1> @@: 4164 000092E5 31FF <1> xor di, di ; (NC) 4165 000092E7 C3 <1> retn 4166 <1> 4167 <1> .ret_CY_pop: 4168 000092E8 58 <1> pop ax 4169 <1> .ret_CY: 4170 000092E9 F9 <1> stc 4171 000092EA C3 <1> retn 4172 <1> 4173 <1> 4174 <1> 4175 <1> %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 4176 <1> var_ysf_setup: section_of_function 4177 000092EB 93 <1> xchg ax, bx ; bx = index 4178 000092EC 8A46ED <1> mov al, byte [bp + ?namebuffer + 1] 4179 000092EF 3C53 <1> cmp al, 'S' 4180 000092F1 750B <1> jne @F 4181 <1> %if _INPUT_FILE_BOOT 4182 000092F3 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 4183 000092F8 B042 <1> mov al, 'B' 4184 000092FA 7502 <1> jnz @F 4185 <1> %endif 4186 000092FC B048 <1> mov al, 'H' 4187 <1> @@: 4188 000092FE 3C42 <1> cmp al, 'B' 4189 00009300 7509 <1> jne @F 4190 <1> %if _INPUT_FILE_BOOT 4191 00009302 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 4192 00009307 750D <1> jnz @FF 4193 <1> %endif 4194 <1> .notysf: 4195 00009309 F9 <1> stc 4196 0000930A C3 <1> retn 4197 <1> @@: 4198 <1> %if _INPUT_FILE_HANDLES 4199 0000930B 3C48 <1> cmp al, 'H' 4200 0000930D 75FA <1> jne short .notysf 4201 0000930F F606[D600]10 <1> testopt [internalflags2], dif2_input_file 4202 00009314 74F3 <1> jz .notysf 4203 <1> %else 4204 <1> jmp .notysf 4205 <1> %endif 4206 <1> @@: 4207 <1> ; bx = index 4208 <1> %if _INPUT_FILE_HANDLES 4209 00009316 BF[D80A] <1> mov di, input_file_handles.active 4210 <1> ; -> active index for YHF 4211 <1> %endif 4212 <1> %if _INPUT_FILE_BOOT 4213 <1> %if _INPUT_FILE_HANDLES 4214 00009319 3C42 <1> cmp al, 'B' 4215 0000931B 7503 <1> jne @F 4216 <1> %endif 4217 0000931D BF[A05A] <1> mov di, load_input_file.active 4218 <1> ; -> active index for YBF 4219 <1> @@: 4220 <1> %endif 4221 00009320 F7DB <1> neg bx ; -1 .. 0 4222 00009322 7406 <1> jz @F ; if 0, always valid --> 4223 <1> ; index was nonzero, meaning bx now holds a 4224 <1> ; negative number. if [.active] is large enough, 4225 <1> ; adding it to bx yields a positive number, which 4226 <1> ; carries in the addition. check for that. 4227 00009324 031D <1> add bx, word [di] 4228 00009326 73E1 <1> jnc .notysf ; not valid index --> 4229 00009328 EB02 <1> jmp @FF ; valid, use it 4230 <1> @@: 4231 0000932A 031D <1> add bx, word [di] 4232 <1> ; 0 means the topmost level 4233 <1> @@: 4234 <1> %if _INPUT_FILE_BOOT 4235 <1> %if _INPUT_FILE_HANDLES 4236 0000932C 3C42 <1> cmp al, 'B' 4237 0000932E 750D <1> jne @F 4238 <1> %endif 4239 <1> 4240 00009330 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 4241 00009333 93 <1> xchg ax, bx 4242 00009334 F7E3 <1> mul bx ; dx ignored, should be zero 4243 00009336 93 <1> xchg ax, bx ; bx = offset into array 4244 00009337 81C3[4658] <1> add bx, load_input_file - LOADDATA3 + ldFATType 4245 <1> ; -> flag word 4246 0000933B EB0A <1> jmp @FF 4247 <1> 4248 <1> @@: 4249 <1> %endif 4250 <1> %if _INPUT_FILE_HANDLES 4251 0000933D D1E3 <1> shl bx, 1 4252 0000933F D1E3 <1> shl bx, 1 4253 00009341 D1E3 <1> shl bx, 1 ; to qword array index 4254 <1> %if INPUTFILEHANDLE_size != 8 4255 <1> %error Unexpected structure size 4256 <1> %endif 4257 00009343 81C3[5A0A] <1> add bx, input_file_handles + ifhFlags 4258 <1> ; -> flags word 4259 <1> %endif 4260 <1> @@: 4261 00009347 BF[D453] <1> mov di, mask_ysf ; give the mask of read-only bits 4262 0000934A F8 <1> clc 4263 0000934B C3 <1> retn 4264 <1> %endif 4265 <1> 4266 <1> 4267 <1> lleave ctx 4268 <1> 4269 <1> 4270 <1> ; INP: al, si-> string 4271 <1> ; OUT: CY if no valid digit 0..7 4272 <1> ; NC if valid digit, 4273 <1> ; bl = 0..7 4274 <1> ; al, si-> behind digit specification 4275 <1> ; CHG: bl 4276 <1> getstmmxdigit: section_of_function 4277 0000934C 3C28 <1> cmp al, '(' 4278 0000934E 7407 <1> je .paropen 4279 00009350 E81A00 <1> call .isdigit? 4280 00009353 7201 <1> jc .ret 4281 <1> .retlodsb: 4282 00009355 AC <1> lodsb 4283 <1> .ret: 4284 00009356 C3 <1> retn 4285 <1> 4286 <1> .paropen: 4287 00009357 50 <1> push ax 4288 00009358 56 <1> push si 4289 00009359 AC <1> lodsb 4290 0000935A E81000 <1> call .isdigit? 4291 0000935D 720B <1> jc .retpop 4292 0000935F AC <1> lodsb 4293 00009360 3C29 <1> cmp al, ')' ; closing parenthesis ? 4294 00009362 F9 <1> stc 4295 00009363 7505 <1> jne .retpop ; no --> (CY) 4296 00009365 83C404 <1> add sp, byte 4 ; discard saved registers (NC) 4297 00009368 EBEB <1> jmp short .retlodsb 4298 <1> 4299 <1> .retpop: 4300 0000936A 5E <1> pop si 4301 0000936B 58 <1> pop ax 4302 0000936C C3 <1> retn 4303 <1> 4304 <1> .isdigit?: 4305 0000936D 88C3 <1> mov bl, al 4306 0000936F 80EB30 <1> sub bl, '0' 4307 00009372 80FB08 <1> cmp bl, 8 ; valid digit 0..7 ? (CY if so) 4308 00009375 F5 <1> cmc ; NC if so 4309 00009376 C3 <1> retn 4310 <1> 4311 <1> 4312 <1> %if _EXPRDUALCODE && _DUALCODE 4313 <1> usesection lDEBUG_CODE2 4314 <1> %else 4315 <1> usesection lDEBUG_CODE 4316 <1> %endif 4317 <1> isvariable_code_size equ $ - isvariable_code 4318 <1> 4319 <1> 4320 <1> usesection lDEBUG_DATA_ENTRY 4321 <1> isvariable_data_size equ $ - isvariable_data 4322 <1> 4323 <1> numdef SHOW_ISVARIABLE_SIZE, _DEFAULTSHOWSIZE 4324 <1> %if _SHOW_ISVARIABLE_SIZE 4325 <1> %assign CODESIZE isvariable_code_size 4326 <1> %assign DATASIZE isvariable_data_size 4327 <1> %warning isvariable size: CODESIZE code, DATASIZE data 4328 <1> %endif 4329 <1> 4330 <1> 4331 <1> align 2, db 0 4332 000053DC 0F0020090D2C4C3B5D- <1> separators: countedw 32,9,13,",L;]:)(=.'",'"',0 4332 000053E5 3A29283D2E272200 <1> 4333 <1> 4334 <1> %ifn _EXPRESSIONS 4335 <1> %error Building without the expression evaluator is not possible right now 4336 <1> %endif 4337 <1> 4338 <1> %if _EXPRESSIONS 4339 <1> 4340 000053ED 00 <1> align 4, db 0 4341 000053F0 00000000 <1> hhvar: dd 0 ; left-hand operand for operator functions 4342 <1> %if _HHDIVREMAIN 4343 <1> hh_div_dividend: 4344 000053F4 00000000 <1> dd 0 4345 <1> hh_div_divisor: 4346 000053F8 00000000 <1> dd 0 4347 <1> %endif 4348 <1> align 2, db 0 4349 <1> hh_depth: 4350 000053FC 0000 <1> dw 0 4351 <1> hh_depth_of_single_term: 4352 000053FE 0000 <1> dw 0 4353 00005400 00 <1> hhflag: db 0 ; &2: getdword called from hh, default to sub (precedence over 1) 4354 <1> ; &1: getdword called from hh, default to add 4355 <1> ; &4: getdword defaulted to add/sub for hh 4356 <1> ; (Note that during recursive getexpression calls (ie, 4357 <1> ; bracket handling), hh_depth is incremented to 2 and 4358 <1> ; higher. As these flags are only used with hh_depth == 1, 4359 <1> ; this means inside brackets the hh defaulting is 4360 <1> ; not in effect.) 4361 00005401 00 <1> hhtype: db 0 ; type info on left-hand operand for operator functions 4362 <1> %if _HHDIVREMAIN 4363 <1> hh_div_active: 4364 00005402 00 <1> db 0 4365 <1> %endif 4366 <1> %endif 4367 <1> 4368 <1> 4369 <1> %if _EXPRDUALCODE && _DUALCODE 4370 <1> usesection lDEBUG_CODE2 4371 <1> %else 4372 <1> usesection lDEBUG_CODE 4373 <1> %endif 4374 <1> 4375 <1> ; Get a numerical value from input line 4376 <1> ; INP: al = first character 4377 <1> ; si-> next character 4378 <1> ; OUT: bx:dx = numerical value 4379 <1> ; ah&80h = whether a pointer 4380 <1> ; ah&40h = whether a signed type 4381 <1> ; ah&3Fh = number of significant bits 4382 <1> ; one-based position of highest one bit if unsigned or signed but positive 4383 <1> ; one-based position of lowest one bit from the top if negative signed 4384 <1> ; 4385 <1> ; Note: This invalidates the symbol table access slice. 4386 <1> getdword: section_of_function 4387 <1> getexpression: section_of_function 4388 00009377 FF06[FC53] <1> inc word [hh_depth] 4389 0000937B E83306 <1> nearcall skipcomm0 4390 0000937E 51 <1> push cx 4391 0000937F 57 <1> push di 4392 <1> lframe 4393 00009380 5589E5 <1> lenter 4394 <1> 4395 00009383 31C9 <1> xor cx, cx 4396 00009385 51 <1> push cx 4397 <1> lvar word, ??Count 4398 <1> %define lCount ???Count 4399 <1> 4400 <1> ; The first number field's operator is initialized to 4401 <1> ; the dummy right-operand operator, which is set up with 4402 <1> ; the highest precedence. This means it'll be processed 4403 <1> ; immediately in the first iteration below. 4404 00009386 B119 <1> mov cl, OPERATOR_RIGHTOP 4405 00009388 51 <1> push cx ; initialize dummy first number operator 4406 00009389 83EC0A <1> sub sp, byte 6+4 4407 <1> lvar 6, ??A 4408 <1> %define lA ???A 4409 <1> lvar 6, ??B 4410 <1> %define lB ???B 4411 <1> 4412 <1> .loop: 4413 <1> ; Get next term of an expression. A term is one variable, 4414 <1> ; one immediate number, one expression contained within 4415 <1> ; round brackets or one expression used to access memory. 4416 <1> ; This code also parses any number of unary operators 4417 <1> ; (including type conversions) in front of the term. 4418 <1> ; 4419 <1> ; INP: (si-1)-> first character 4420 <1> ; OUT: (see label .term_done) 4421 <1> ; bx:dx = numerical value of term 4422 <1> ; ah&80h = whether a pointer 4423 <1> ; ah&40h = whether a signed type 4424 <1> ; al = first character behind term 4425 <1> ; si-> line 4426 <1> ; CHG: di, cx 4427 <1> ; 4428 <1> ; This part might be simplified by directly modifying 6byte[bp+lB] 4429 <1> ; instead of setting bx:dx and ah. (The current interface is one of 4430 <1> ; the holdovers of getexpressionterm as a separate function.) In 4431 <1> ; that case, bx:dx and ah presumably will then be simply added to 4432 <1> ; the CHG specification. 4433 <1> .term: 4434 0000938C 4E <1> dec si 4435 0000938D 56 <1> push si ; -> term 4436 <1> 4437 <1> ; count unary operators and type specifiers, 4438 <1> ; get the bit mask of required bytes 4439 <1> ; and skip past the operators and specifiers 4440 0000938E E88C04 <1> nearcall count_unary_operators 4441 <1> 4442 <1> %if _INDIRECTION 4443 00009391 3C5B <1> cmp al, '[' 4444 00009393 7503E91002 <1> je .indirection ; handle indirected value --> 4445 <1> %endif 4446 00009398 3C28 <1> cmp al, '(' 4447 0000939A 7503E94D02 <1> je .parens ; handle term with precedence --> 4448 <1> 4449 0000939F 52 <1> push dx ; remember the count+1 4450 <1> ; (only if no indirection or bracket) 4451 <1> 4452 000093A0 4E <1> dec si 4453 000093A1 BA[7A1F] <1> mov dx, msg.value ; does a VALUE keyword for VALUE x IN y go here ? 4454 000093A4 E87905 <1> nearcall isstring? 4455 000093A7 7503E94E01 <1> je .value_in ; yes --> 4456 <1> 4457 000093AC BA[C21F] <1> mov dx, msg.linear ; does a LINEAR keyword go here ? 4458 000093AF E86E05 <1> nearcall isstring? 4459 000093B2 7503E92301 <1> je .linear ; yes --> 4460 <1> 4461 <1> %if _PM 4462 <1> mov dx, msg.desctype 4463 <1> nearcall isstring? 4464 <1> je .desctype ; yes --> 4465 <1> %endif 4466 <1> 4467 000093B7 AC <1> lodsb 4468 <1> 4469 000093B8 E830FB <1> nearcall isvariable? ; is it a variable ? 4470 000093BB 7226 <1> jc .check_literal_or_symbol 4471 <1> ; no, may be an immediate value or symbol --> 4472 <1> 4473 <1> .variable: 4474 000093BD 87DA <1> xchg bx, dx ; bx-> high word 4475 000093BF 88CC <1> mov ah, cl 4476 000093C1 31C9 <1> xor cx, cx 4477 000093C3 80FC02 <1> cmp ah, 2 4478 000093C6 7609 <1> jbe .variable_nohigh 4479 000093C8 8B0F <1> mov cx, word [bx] ; get high word 4480 000093CA 80FC03 <1> cmp ah, 3 4481 000093CD 7702 <1> ja @F 4482 000093CF B500 <1> mov ch, 0 4483 <1> @@: 4484 <1> .variable_nohigh: 4485 000093D1 87DA <1> xchg bx, dx ; bx-> low word 4486 000093D3 8B17 <1> mov dx, word [bx] ; get low word 4487 000093D5 89CB <1> mov bx, cx ; high word/zero 4488 000093D7 80FC01 <1> cmp ah, 1 4489 000093DA 7702 <1> ja .variable_notbyte 4490 000093DC B600 <1> mov dh, 0 ; limit to byte 4491 <1> .variable_notbyte: 4492 <1> .symbol: 4493 000093DE B400 <1> mov ah, 0 ; type pointer=0 signed=0 4494 000093E0 E91902 <1> jmp .term_end 4495 <1> 4496 <1> 4497 <1> .check_literal_or_symbol: 4498 <1> %if _SYMBOLIC 4499 <1> nearcall issymbol? ; is it a symbol ? 4500 <1> jnc .symbol ; yes --> 4501 <1> ; no, must be an immediate value 4502 <1> %endif 4503 <1> 4504 <1> .literal: 4505 000093E3 31DB <1> xor bx, bx ; (in case of decimal base shortcut: 4506 000093E5 BA0A00 <1> mov dx, 10 ; set base: decimal) 4507 000093E8 3C23 <1> cmp al, '#' ; shortcut change to decimal base, or string literal? 4508 000093EA 7542 <1> jne .lithex_common 4509 000093EC 803C22 <1> cmp byte [si], '"' 4510 000093EF 7407 <1> je .lit_string 4511 000093F1 803C27 <1> cmp byte [si], "'" 4512 000093F4 7402 <1> je .lit_string 4513 000093F6 EB78 <1> jmp .lit_base ; decimal base --> 4514 <1> 4515 <1> .lit_string: 4516 000093F8 31D2 <1> xor dx, dx 4517 000093FA AC <1> lodsb 4518 000093FB 86C4 <1> xchg al, ah 4519 <1> 4520 000093FD E81900 <1> call @F 4521 00009400 88C2 <1> mov dl, al 4522 00009402 E81400 <1> call @F 4523 00009405 88C6 <1> mov dh, al 4524 00009407 E80F00 <1> call @F 4525 0000940A 88C3 <1> mov bl, al 4526 0000940C E80A00 <1> call @F 4527 0000940F 88C7 <1> mov bh, al 4528 00009411 AC <1> lodsb 4529 00009412 38E0 <1> cmp al, ah 4530 00009414 7415 <1> je @FFF 4531 <1> .err3: 4532 00009416 E9BE00 <1> jmp .err2 4533 <1> 4534 <1> @@: 4535 00009419 AC <1> lodsb 4536 0000941A 38E0 <1> cmp al, ah 4537 0000941C 7406 <1> je @F 4538 0000941E E86D05 <1> nearcall iseol?.notsemicolon 4539 00009421 74F3 <1> je .err3 4540 <1> .lit_string_retn: 4541 00009423 C3 <1> retn 4542 <1> 4543 <1> @@: 4544 00009424 AC <1> lodsb 4545 00009425 38E0 <1> cmp al, ah 4546 00009427 74FA <1> je .lit_string_retn 4547 00009429 59 <1> pop cx ; (discard near return address) 4548 0000942A 4E <1> dec si 4549 <1> @@: 4550 0000942B AC <1> lodsb 4551 0000942C EB38 <1> jmp .lit_end_string 4552 <1> 4553 <1> 4554 <1> .lithex_common: 4555 0000942E E89403 <1> call .lit_ishexdigit? ; the first character must be a digit then 4556 00009431 7303E9A100 <1> jc .err2 4557 00009436 30D2 <1> xor dl, dl ; initialize value 4558 <1> .lithex_loopdigit: 4559 00009438 3C5F <1> cmp al, '_' 4560 0000943A 7423 <1> je .lithex_skip 4561 0000943C E88603 <1> call .lit_ishexdigit? ; was last character ? 4562 0000943F 7221 <1> jc .lit_end ; yes --> 4563 00009441 F6C7F0 <1> test bh, 0F0h ; would shift bits out ? 4564 00009444 7403E98E00 <1> jnz .err2 4565 00009449 E82205 <1> nearcall uppercase 4566 0000944C 2C30 <1> sub al, '0' 4567 0000944E 3C09 <1> cmp al, 9 ; was decimal digit ? 4568 00009450 7602 <1> jbe .lithex_decimaldigit; yes --> 4569 00009452 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 4570 <1> .lithex_decimaldigit: 4571 00009454 B90400 <1> mov cx, 4 4572 <1> .lithex_loopshift: 4573 00009457 D1E2 <1> shl dx, 1 4574 00009459 D1D3 <1> rcl bx, 1 4575 0000945B E2FA <1> loop .lithex_loopshift ; *16 4576 0000945D 08C2 <1> or dl, al ; add in the new digit 4577 <1> .lithex_skip: 4578 0000945F AC <1> lodsb 4579 00009460 EBD6 <1> jmp short .lithex_loopdigit 4580 <1> 4581 <1> .lit_end: 4582 00009462 3C23 <1> cmp al, '#' ; base change specification? 4583 00009464 740A <1> je .lit_base ; yes --> 4584 <1> .lit_end_string: 4585 00009466 E8CFF4 <1> nearcall isseparator? ; after the number, there must be a separator 4586 00009469 756C <1> jne .err2 ; none here --> 4587 0000946B B400 <1> mov ah, 0 ; type pointer=0 signed=0 4588 0000946D E98C01 <1> jmp .term_end ; okay --> 4589 <1> .lit_base: 4590 00009470 85DB <1> test bx, bx ; insure base <= 36 4591 00009472 7563 <1> jnz .err2 4592 00009474 83FA24 <1> cmp dx, byte 36 4593 00009477 775E <1> ja .err2 4594 00009479 83FA02 <1> cmp dx, byte 2 ; and >= 2 4595 0000947C 7259 <1> jb .err2 ; otherwise error --> 4596 <1> 4597 0000947E AC <1> lodsb 4598 0000947F 80FA10 <1> cmp dl, 16 ; hexadecimal ? 4599 00009482 74AA <1> je .lithex_common ; yes, use specific handling --> 4600 <1> 4601 00009484 89D7 <1> mov di, dx ; di = base 4602 00009486 88D1 <1> mov cl, dl 4603 00009488 80C12F <1> add cl, '0'-1 4604 0000948B 80F939 <1> cmp cl, '9' 4605 0000948E 7602 <1> jbe .lit_basebelow11 4606 00009490 B139 <1> mov cl, '9' 4607 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 4608 00009492 88D5 <1> mov ch, dl 4609 00009494 80C536 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 4610 <1> 4611 00009497 E82E03 <1> call .lit_isdigit? ; first character must be a digit 4612 0000949A 723B <1> jc .err2 4613 0000949C 31D2 <1> xor dx, dx ; initialize value 4614 <1> .lit_loopdigit: 4615 0000949E 3C5F <1> cmp al, '_' 4616 000094A0 7432 <1> je .lit_skip 4617 000094A2 E82303 <1> call .lit_isdigit? ; was last character ? 4618 000094A5 72BB <1> jc .lit_end ; yes --> 4619 000094A7 E8C404 <1> nearcall uppercase 4620 000094AA 2C30 <1> sub al, '0' 4621 000094AC 3C09 <1> cmp al, 9 ; was decimal digit ? 4622 000094AE 7602 <1> jbe .lit_decimaldigit ; yes --> 4623 000094B0 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 4624 <1> .lit_decimaldigit: 4625 000094B2 50 <1> push ax 4626 000094B3 89D0 <1> mov ax, dx 4627 000094B5 53 <1> push bx 4628 000094B6 F7E7 <1> mul di ; multiply low word with base 4629 000094B8 89D3 <1> mov bx, dx 4630 000094BA 89C2 <1> mov dx, ax 4631 000094BC 58 <1> pop ax 4632 000094BD 52 <1> push dx 4633 000094BE F7E7 <1> mul di ; multiply high word with base 4634 000094C0 85D2 <1> test dx, dx 4635 000094C2 5A <1> pop dx 4636 000094C3 7512 <1> jnz .err2 ; overflow --> 4637 000094C5 01C3 <1> add bx, ax ; add them 4638 000094C7 58 <1> pop ax 4639 000094C8 720D <1> jc .err2 ; overflow --> 4640 000094CA 00C2 <1> add dl, al ; add in the new digit 4641 000094CC 80D600 <1> adc dh, 0 4642 000094CF 83D300 <1> adc bx, byte 0 4643 000094D2 7203 <1> jc .err2 ; overflow --> 4644 <1> ; The value 3#102002022201221111210 is exactly equal to ffffFFFFh 4645 <1> ; so 3#102002022201221111211 (or ...2) overflows 32 bits and 4646 <1> ; needs to be detected here when adding in the as yet least 4647 <1> ; significant digit. This is why this jump is needed. 4648 <1> ; This also applies to decimal #4294967296. 4649 <1> 4650 <1> .lit_skip: 4651 000094D4 AC <1> lodsb 4652 000094D5 EBC7 <1> jmp short .lit_loopdigit 4653 <1> 4654 <1> .err2: 4655 000094D7 E983ED <1> jmp error_expr 4656 <1> 4657 <1> 4658 <1> %if _PM 4659 <1> .desctype: 4660 <1> pop ax ; discard unary operators counter 4661 <1> 4662 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_DESCTYPE_STACK_CHECK 4663 <1> call stack_check_indirection 4664 <1> %else 4665 <1> mov ax, _EXPRESSION_DESCTYPE_STACK_CHECK 4666 <1> call stack_check ; abort if deep recursion 4667 <1> %endif 4668 <1> test ax, msg.stack_overflow.desctype 4669 <1> 4670 <1> lodsb 4671 <1> nearcall ispm 4672 <1> jnz short .err2 4673 <1> nearcall skipwh0 4674 <1> nearcall getword 4675 <1> _386 push edx 4676 <1> _386 pop dx 4677 <1> _386 lar edx, edx 4678 <1> _386 jz @F 4679 <1> _386 xor edx, edx 4680 <1> @@: 4681 <1> _386 shr edx, 8 4682 <1> _386 push dx 4683 <1> _386 pop edx 4684 <1> subcpu 286 4685 <1> _no386 lar dx, dx 4686 <1> _no386 jz @F 4687 <1> _no386 xor dx, dx 4688 <1> @@: 4689 <1> _no386 xchg dl, dh 4690 <1> subcpureset 4691 <1> xor bx, bx 4692 <1> nearcall skipcomm0 4693 <1> mov ah, 0 ; type pointer=0 signed=0 4694 <1> jmp .term_end_recount 4695 <1> %endif 4696 <1> 4697 <1> 4698 <1> .linear: 4699 000094DA 58 <1> pop ax ; discard unary operators counter 4700 <1> 4701 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_LINEAR_STACK_CHECK 4702 000094DB E81804 <1> call stack_check_indirection 4703 <1> %else 4704 <1> mov ax, _EXPRESSION_LINEAR_STACK_CHECK 4705 <1> call stack_check ; abort if deep recursion 4706 <1> %endif 4707 000094DE A9[1C2B] <1> test ax, msg.stack_overflow.linear 4708 <1> 4709 000094E1 E8FB04 <1> nearcall skipwhite 4710 <1> _386_PM push word [bAddr32] 4711 <1> _386_PM push edx 4712 <1> _386_PM pop dx 4713 000094E4 8B1E[C40C] <1> mov bx, word [reg_ds] 4714 000094E8 E829A7 <1> nearcall getlinearaddr 4715 <1> _386_PM push dx 4716 <1> _386_PM pop edx 4717 <1> _386_PM pop word [bAddr32] 4718 000094EB 72EA <1> jc .err2 4719 <1> 4720 <1> _386_PM_o32 ; or dword 4721 000094ED 830E[2045]FF <1> or word [bp_offset], strict byte -1 4722 <1> ; do not use a preferred offset 4723 <1> 4724 000094F2 E8BC04 <1> nearcall skipcomm0 4725 000094F5 B400 <1> mov ah, 0 ; type pointer=0 signed=0 4726 000094F7 E90101 <1> jmp .term_end_recount 4727 <1> 4728 <1> 4729 <1> .value_in: 4730 000094FA 58 <1> pop ax ; discard unary operators counter 4731 <1> 4732 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 4733 000094FB E8F803 <1> call stack_check_indirection 4734 <1> %else 4735 <1> mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 4736 <1> call stack_check ; abort if deep recursion 4737 <1> %endif 4738 000094FE A9[012B] <1> test ax, msg.stack_overflow.value_in 4739 <1> 4740 00009501 E8AC04 <1> nearcall skipcomma 4741 00009504 4E <1> dec si 4742 00009505 BA[941F] <1> mov dx, msg.executing 4743 00009508 E81504 <1> nearcall isstring? 4744 0000950B 7514 <1> jne @F 4745 0000950D E8A004 <1> nearcall skipcomma 4746 00009510 56 <1> push si 4747 00009511 BE[9E1F] <1> mov si, msg.executing_value_range 4748 00009514 E88203 <1> nearcall get_value_range 4749 00009517 9C <1> pushf ; ! preserve CF 4750 00009518 E88404 <1> nearcall chkeol 4751 0000951B 9D <1> popf 4752 0000951C 5E <1> pop si 4753 0000951D 4E <1> dec si ; preserves CF 4754 0000951E AC <1> lodsb 4755 0000951F EB03 <1> jmp @FF 4756 <1> 4757 <1> @@: 4758 00009521 E87503 <1> nearcall get_value_range; OUT: cx:di = from, bx:dx = to 4759 <1> @@: 4760 00009524 E88A04 <1> nearcall skipcomm0 4761 <1> 4762 <1> ; If the VALUE is a not normal range (zero length 4763 <1> ; or from > to) then we still have to parse the 4764 <1> ; remaining input line to find the end of the 4765 <1> ; VALUE x IN y construct. So we do this with a 4766 <1> ; sort of hack: we take the invalid / unset 4767 <1> ; range values, do all the (invalid) comparisons, 4768 <1> ; but do not count any of the possible matches. 4769 <1> ; Look at .value_in.found for this hack. 4770 <1> lframe none, nested 4771 00009527 5589E5 <1> lenter 4772 <1> lvar word, bit0_do_not_match 4773 0000952A 9C <1> pushf 4774 <1> lvar dword, value_from 4775 0000952B 51 <1> push cx 4776 0000952C 57 <1> push di 4777 <1> lvar dword, value_to 4778 0000952D 53 <1> push bx 4779 0000952E 52 <1> push dx 4780 0000952F 31C9 <1> xor cx, cx 4781 <1> lvar dword, found 4782 00009531 51 <1> push cx 4783 00009532 51 <1> push cx 4784 <1> 4785 00009533 51 <1> push cx ; zero terminator of keyword remembered offsets 4786 00009534 4E <1> dec si 4787 00009535 BA[801F] <1> mov dx, msg.in 4788 00009538 E8E503 <1> nearcall isstring? 4789 <1> .err3_NZ: 4790 <1> .err4_NZ: 4791 0000953B 759A <1> jne .err2 4792 <1> 4793 0000953D E87004 <1> nearcall skipcomma 4794 00009540 4E <1> dec si 4795 <1> 4796 <1> .value_in.loop: 4797 00009541 E89B04 <1> nearcall skipwhite 4798 00009544 4E <1> dec si 4799 00009545 BB[EC32] <1> mov bx, msgtable_value_range 4800 <1> ; -> table 4801 <1> 4802 <1> @@: 4803 00009548 8B17 <1> mov dx, word [bx] 4804 0000954A 85D2 <1> test dx, dx 4805 0000954C 7419 <1> jz @F ; last checked, go get range --> 4806 0000954E E8CF03 <1> nearcall isstring? 4807 00009551 7405 <1> je .value_in.keyword ; found a keyword --> 4808 00009553 83C304 <1> add bx, 4 ; go to next table entry 4809 00009556 EBF0 <1> jmp @B 4810 <1> 4811 <1> .value_in.keyword: 4812 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 4813 00009558 E89B03 <1> call stack_check_indirection 4814 <1> %else 4815 <1> mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 4816 <1> call stack_check ; abort if deep recursion 4817 <1> %endif 4818 0000955B A9[012B] <1> test ax, msg.stack_overflow.value_in 4819 <1> 4820 0000955E E87E04 <1> nearcall skipwhite ; skip past blanks 4821 00009561 56 <1> push si ; remember offset after keyword 4822 00009562 8B7702 <1> mov si, word [bx + 2] ; -> keyword replacement text 4823 00009565 EBDA <1> jmp .value_in.loop ; handle replacement --> 4824 <1> 4825 <1> @@: 4826 00009567 E82F03 <1> nearcall get_value_range; OUT: cx:di = from, bx:dx = to 4827 0000956A 7223 <1> jc .value_in.next 4828 <1> 4829 <1> ; ! (StartVal > EndMatch) 4830 0000956C 395EFC <1> cmp word [bp + ?value_from + 2], bx 4831 0000956F 7503 <1> jne @F 4832 00009571 3956FA <1> cmp word [bp + ?value_from], dx 4833 <1> @@: 4834 00009574 7719 <1> ja .value_in.next 4835 <1> 4836 <1> ; ! (EndVal < StartMatch) 4837 00009576 394EF8 <1> cmp word [bp + ?value_to + 2], cx 4838 00009579 7503 <1> jne @F 4839 0000957B 397EF6 <1> cmp word [bp + ?value_to], di 4840 <1> @@: 4841 0000957E 720F <1> jb .value_in.next 4842 <1> 4843 <1> .value_in.found: 4844 00009580 8B4EFE <1> mov cx, word [bp + ?bit0_do_not_match] 4845 00009583 F7D1 <1> not cx 4846 00009585 83E101 <1> and cx, 1 4847 00009588 014EF2 <1> add word [bp + ?found], cx 4848 0000958B 8356F200 <1> adc word [bp + ?found], 0 4849 <1> 4850 <1> .value_in.next: 4851 <1> @@: 4852 0000958F E84E04 <1> nearcall skipwh0 4853 00009592 3C2C <1> cmp al, ',' 4854 00009594 74AB <1> je .value_in.loop 4855 <1> 4856 00009596 59 <1> pop cx ; get next remembered offset 4857 00009597 E306 <1> jcxz @F ; if none --> 4858 00009599 89CE <1> mov si, cx ; -> behind keyword 4859 0000959B 4E <1> dec si 4860 0000959C AC <1> lodsb ; reload al 4861 0000959D EBF0 <1> jmp @B ; continue after the keyword --> 4862 <1> 4863 <1> @@: 4864 0000959F 5A <1> pop dx 4865 000095A0 5B <1> pop bx ; pop ?found counter variable 4866 000095A1 89EC5D <1> lleave 4867 <1> 4868 000095A4 B400 <1> mov ah, 0 ; type pointer=0 signed=0 4869 000095A6 EB53 <1> jmp .term_end_recount 4870 <1> 4871 <1> 4872 <1> %if _INDIRECTION 4873 <1> .indirection: 4874 000095A8 E84B03 <1> call stack_check_indirection 4875 <1> ; abort if deep recursion 4876 000095AB A9[B42A] <1> test ax, msg.stack_overflow.indirection 4877 <1> 4878 <1> _386_PM push word [bAddr32] 4879 <1> _386_PM push edx 4880 <1> _386_PM pop dx 4881 <1> 4882 000095AE E8FF03 <1> nearcall skipcomma ; also skips the '[' in al 4883 000095B1 8B1E[C40C] <1> mov bx, word [reg_ds] ; default segment/selector 4884 000095B5 51 <1> push cx ; save previous bit mask (ch) 4885 000095B6 E897F1 <1> nearcall getaddrX ; (recursively calls getexpression:) 4886 000095B9 59 <1> pop cx 4887 000095BA B100 <1> mov cl, 0 4888 000095BC 3C5D <1> cmp al, ']' ; verify this is the closing bracket 4889 <1> .err5_NZ: 4890 000095BE 7403E978FF <1> jne .err4_NZ ; if not --> 4891 000095C3 AC <1> lodsb ; get next character 4892 <1> ; bx:(e)dx-> data 4893 <1> ; ch = bit mask of required bytes 4894 <1> ; cl = 0 4895 <1> 4896 <1> ..@hh_indirection_memory_access_start: 4897 000095C4 50 <1> push ax 4898 000095C5 55 <1> push bp 4899 000095C6 31ED <1> xor bp, bp 4900 000095C8 55 <1> push bp 4901 000095C9 55 <1> push bp 4902 000095CA 89E5 <1> mov bp, sp ; -> buffer 4903 <1> 4904 000095CC E833EF <1> nearcall prephack 4905 000095CF E859EF <1> nearcall dohack 4906 <1> ; Regarding how this loop handles cx, 4907 <1> ; remember that ch holds the flags for 4908 <1> ; the required bytes. 4909 <1> ; And cl is initialised to 0. In 4910 <1> ; each iteration, cl is incremented. 4911 <1> ; The loop instruction then decrements 4912 <1> ; cl again, but the entire cx is only 4913 <1> ; zero if no more bytes are required. 4914 <1> ; (This hack saves a single byte over 4915 <1> ; the "test ch, ch \ jnz" alternative 4916 <1> ; but it isn't very pretty. It 4917 <1> ; also probably slows down a bit.) 4918 <1> .indirection_loop: 4919 000095D2 D0ED <1> shr ch, 1 ; need to read this byte ? 4920 000095D4 7306 <1> jnc .indirection_skip ; no --> 4921 <1> %if _DUALCODE && _EXPRDUALCODE 4922 <1> usesection lDEBUG_CODE 4923 <1> ..@hh_code1_indirection_memory_access_start: 4924 <1> 4925 <1> section_of ..@hh_readmem 4926 <1> dualfunction 4927 <1> ..@hh_readmem: 4928 <1> lframe dualdistance, nested 4929 <1> lframe_needonlyregistered 4930 <1> lenter 4931 <1> call readmem 4932 <1> lleave 4933 <1> dualreturn 4934 <1> lret 4935 <1> 4936 <1> ..@hh_code1_indirection_memory_access_end: 4937 <1> usesection lDEBUG_CODE2 4938 <1> dualcall ..@hh_readmem ; else read byte 4939 <1> %else 4940 000095D6 E846DF <1> nearcall readmem ; else read byte 4941 <1> %endif 4942 000095D9 884600 <1> mov byte [bp+0], al ; store byte 4943 <1> .indirection_skip: 4944 000095DC 41 <1> inc cx ; = 1 if no more to read 4945 000095DD 45 <1> inc bp ; increase buffer pointer 4946 <1> _386_PM_o32 ; inc edx 4947 000095DE 42 <1> inc dx ; increase offset 4948 000095DF E2F1 <1> loop .indirection_loop ; read next byte if any --> 4949 000095E1 E85BEF <1> nearcall unhack 4950 <1> 4951 000095E4 5A <1> pop dx 4952 000095E5 5B <1> pop bx 4953 000095E6 5D <1> pop bp 4954 000095E7 58 <1> pop ax 4955 <1> ..@hh_indirection_memory_access_end: 4956 <1> 4957 <1> _386_PM push dx 4958 <1> _386_PM pop edx 4959 <1> _386_PM pop word [bAddr32] 4960 000095E8 B400 <1> mov ah, 0 ; type pointer=0 signed=0 4961 000095EA EB0F <1> jmp short .term_end_recount 4962 <1> %endif 4963 <1> 4964 <1> 4965 <1> .parens: 4966 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PARENS_STACK_CHECK 4967 000095EC E80703 <1> call stack_check_indirection 4968 <1> %else 4969 <1> mov ax, _EXPRESSION_PARENS_STACK_CHECK 4970 <1> call stack_check ; abort if deep recursion 4971 <1> %endif 4972 000095EF A9[CE2A] <1> test ax, msg.stack_overflow.parens 4973 <1> 4974 000095F2 AC <1> lodsb 4975 000095F3 E881FD <1> nearcall getexpression ; (recursive) bx:dx = number, ah = type 4976 000095F6 3C29 <1> cmp al, ')' ; closing parens ? 4977 000095F8 75C4 <1> jne .err5_NZ ; no --> 4978 000095FA AC <1> lodsb 4979 <1> 4980 <1> .term_end_recount: 4981 000095FB A9 <1> db __TEST_IMM16 ; skip pop, stc; NC 4982 <1> .term_end: 4983 000095FC 59 <1> pop cx ; get count+1 of unary operators and type specifiers 4984 000095FD F9 <1> stc 4985 000095FE 5F <1> pop di ; -> term 4986 000095FF 87F7 <1> xchg si, di 4987 00009601 57 <1> push di ; save -> behind 4988 <1> ; si-> unary operators and types 4989 00009602 720B <1> jc .unary_processnext ; if we preserved the count --> 4990 <1> 4991 00009604 53 <1> push bx 4992 00009605 52 <1> push dx 4993 00009606 56 <1> push si 4994 00009607 E81302 <1> nearcall count_unary_operators 4995 0000960A 89D1 <1> mov cx, dx ; get count+1 again 4996 0000960C 5E <1> pop si 4997 0000960D 5A <1> pop dx 4998 0000960E 5B <1> pop bx 4999 <1> 5000 <1> .unary_processnext: 5001 0000960F E204 <1> loop .unary_doprocess 5002 00009611 5E <1> pop si ; -> behind term 5003 00009612 4E <1> dec si ; -> character to reload in skipwhite 5004 00009613 EB38 <1> jmp short .term_done 5005 <1> 5006 <1> .unary_doprocess: 5007 00009615 56 <1> push si 5008 00009616 51 <1> push cx 5009 00009617 53 <1> push bx 5010 00009618 52 <1> push dx 5011 <1> 5012 00009619 89CF <1> mov di, cx ; count+1 of operators to skip 5013 0000961B E80102 <1> nearcall count_unary_operators_restrict ; skip them 5014 0000961E 752A <1> jnz .err ; if not enough --> (?!) 5015 <1> 5016 00009620 E840F3 <1> nearcall istype? ; get type info if it's a type 5017 00009623 7216 <1> jc .unary_processnotype ; isn't a type --> 5018 00009625 86C4 <1> xchg al, ah ; al = type input 5019 00009627 D1EB <1> shr bx, 1 ; CF = signedness 5020 00009629 9F <1> lahf ; with CF = signedness 5021 0000962A 8B8F[984B] <1> mov cx, word [ typehandlers + bx ] ; function 5022 <1> .unary_processcall: 5023 0000962E 5A <1> pop dx 5024 0000962F 5B <1> pop bx 5025 <1> %if _HHDIVREMAIN 5026 00009630 C606[0254]00 <1> mov byte [hh_div_active], 0 5027 <1> %endif 5028 00009635 FFD1 <1> call cx ; call type or unary operator handler 5029 <1> ; bx:dx = output number, ah = type 5030 00009637 59 <1> pop cx ; restore processing counter 5031 00009638 5E <1> pop si ; restore ->term 5032 00009639 EBD4 <1> jmp short .unary_processnext 5033 <1> 5034 <1> .unary_processnotype: 5035 0000963B E8DEF2 <1> nearcall isunaryoperator?; get unary operator index 5036 0000963E 750A <1> jne .err ; if no unary operator --> (?!) 5037 00009640 89CB <1> mov bx, cx 5038 00009642 D1E3 <1> shl bx, 1 5039 00009644 8B8F[C64B] <1> mov cx, word [ unaryoperatorhandlers + bx ] 5040 00009648 EBE4 <1> jmp short .unary_processcall 5041 <1> 5042 <1> .err: 5043 0000964A E910EC <1> jmp error_expr 5044 <1> 5045 <1> .term_done: ; bx:dx = number, ah = type 5046 <1> ; get the operator following this number 5047 0000964D E88F03 <1> nearcall skipwhite 5048 00009650 8956F2 <1> mov word [bp+lB+0], dx 5049 00009653 895EF4 <1> mov word [bp+lB+2], bx ; store numeric value 5050 00009656 8B1E[FE53] <1> mov bx, word [hh_depth_of_single_term] 5051 0000965A 3B1E[FC53] <1> cmp bx, word [hh_depth] 5052 0000965E 7453 <1> je .operator_invalid 5053 00009660 E8BFF2 <1> nearcall isoperator? ; cl = operator index (if any) 5054 00009663 743E <1> je .operator_apparently_valid 5055 00009665 E82203 <1> nearcall iseol? ; end of line follows ? 5056 00009668 7449 <1> je .operator_invalid 5057 <1> .hh_twofold_check: 5058 <1> ; If we are processing a ?? :: conditional 5059 <1> ; construct then we want the :: to end 5060 <1> ; the parsing of the expression at that 5061 <1> ; point, to then execute the OPERATOR_COND 5062 <1> ; function of_cond. That means here we 5063 <1> ; want to not apply the hh twofold case. 5064 <1> 5065 <1> ; The next check is for an ?? :: construct 5066 <1> ; if the :: happens at hh depth == 1 and 5067 <1> ; there is no nested ?? :: construct. 5068 0000966A 807EFC18 <1> cmp byte [bp + lA + 4], OPERATOR_COND 5069 0000966E 7443 <1> je .operator_invalid ; special check for conditional operator 5070 <1> 5071 <1> ; The next check is for a nested ?? :: 5072 <1> ; construct, or if the clause between 5073 <1> ; ?? and :: contains any other operators 5074 <1> ; than ??. (All operators have higher 5075 <1> ; precedence than ??.) 5076 <1> ; If any ?? is waiting for its :: then we 5077 <1> ; must accept the next :: as an invalid 5078 <1> ; operator, thus not as a separator that 5079 <1> ; activates the hh twofold operation. 5080 00009670 8B4EFE <1> mov cx, word [bp + lCount] ; = how many operators waiting 5081 00009673 E30C <1> jcxz @FF ; if none waiting --> (do hh twofold) 5082 00009675 89E3 <1> mov bx, sp ; -> first waiting operator on stack 5083 <1> @@: 5084 00009677 803F18 <1> cmp byte [bx], OPERATOR_COND ; is it a conditional operator ? 5085 0000967A 7437 <1> je .operator_invalid ; yes, treat as invalid operator --> 5086 <1> ; (it must be a :: to be valid) 5087 0000967C 83C306 <1> add bx, 6 ; -> next waiting operator on stack 5088 0000967F E2F6 <1> loop @B ; loop if any waiting operator left --> 5089 <1> @@: 5090 00009681 833E[FC53]01 <1> cmp word [hh_depth], 1 ; are we in first level expression ? 5091 00009686 752B <1> jne .operator_invalid ; no, do not do special H operation --> 5092 00009688 F606[0054]03 <1> test byte [hhflag], 1|2 ; special H operation requested ? 5093 0000968D 7424 <1> jz .operator_invalid ; no --> 5094 0000968F B302 <1> mov bl, OPERATOR_MINUS ; assume it's sub 5095 00009691 F606[0054]02 <1> test byte [hhflag], 2 ; sub requested by H ? 5096 00009696 7501 <1> jnz .hh_twofold_found ; yes --> 5097 00009698 4B <1> dec bx ; else it must be add 5098 <1> %if (OPERATOR_MINUS - 1) != OPERATOR_PLUS 5099 <1> %error Remove optimisation 5100 <1> %endif 5101 <1> .hh_twofold_found: 5102 00009699 800E[0054]04 <1> or byte [hhflag], 4 ; set flag for H twofold operation 5103 0000969E E81003 <1> nearcall skipcomm0 5104 000096A1 EB12 <1> jmp short .operator_done ; return this --> 5105 <1> 5106 <1> .operator_apparently_valid: 5107 000096A3 89CB <1> mov bx, cx 5108 000096A5 01DB <1> add bx, bx 5109 000096A7 FF97[D04B] <1> call [operatordispatchers + bx] 5110 000096AB 84DB <1> test bl, bl ; valid ? 5111 000096AD 74BB <1> jz .hh_twofold_check ; no, check for H twofold operation --> 5112 000096AF E82D03 <1> nearcall skipwhite 5113 000096B2 A9 <1> db __TEST_IMM16 5114 <1> .operator_invalid: 5115 000096B3 31DB <1> xor bx, bx ; bl = 0 (no operator) 5116 <1> .operator_done: 5117 000096B5 88E7 <1> mov bh, ah ; bh = type info 5118 000096B7 895EF6 <1> mov word [bp+lB+4], bx ; store type and following operator 5119 <1> 5120 <1> %if _EXPRESSION_DEBUG 5121 <1> push ax 5122 <1> push bx 5123 <1> push cx 5124 <1> push dx 5125 <1> push si 5126 <1> push di 5127 <1> 5128 <1> lea bx, [bp + lA] 5129 <1> mov dx, .msgA 5130 <1> call .debugdump 5131 <1> 5132 <1> lea bx, [bp + lB] 5133 <1> mov dx, .msgB 5134 <1> call .debugdump 5135 <1> 5136 <1> pop di 5137 <1> pop si 5138 <1> push si 5139 <1> push di 5140 <1> call .debugline 5141 <1> jmp .debugend 5142 <1> 5143 <1> .debugline: 5144 <1> call .debugpad 5145 <1> mov dx, .msg_end1 5146 <1> nearcall putsz 5147 <1> 5148 <1> dec si 5149 <1> mov dx, si 5150 <1> @@: 5151 <1> lodsb 5152 <1> nearcall iseol? 5153 <1> jne @B 5154 <1> mov cx, si 5155 <1> dec cx 5156 <1> sub cx, dx 5157 <1> nearcall puts 5158 <1> 5159 <1> mov dx, .msg_end2 5160 <1> nearcall putsz 5161 <1> retn 5162 <1> 5163 <1> usesection lDEBUG_DATA_ENTRY 5164 <1> 5165 <1> .msgB: asciz "B = " 5166 <1> .msgA: asciz "A = " 5167 <1> .msg@: asciz "@ = " 5168 <1> .msgPop: asciz "Pop = " 5169 <1> .msg_opA: asciz "(A) " 5170 <1> .msg_opB: asciz " op (B)",13,10 5171 <1> .msg_none: asciz "none" 5172 <1> .msg_op: asciz ", " 5173 <1> .msg_end: db " op" 5174 <1> .msg_linebreak: asciz 13,10 5175 <1> .msg_end1: asciz '"' 5176 <1> .msg_end2: asciz '"',13,10,13,10 5177 <1> .msg_looping_cond: 5178 <1> asciz "Looping for OPPREC_COND",13,10 5179 <1> 5180 <1> %if _EXPRDUALCODE && _DUALCODE 5181 <1> usesection lDEBUG_CODE2 5182 <1> %else 5183 <1> usesection lDEBUG_CODE 5184 <1> %endif 5185 <1> 5186 <1> .debugpad: 5187 <1> mov cx, word [hh_depth] 5188 <1> dec cx 5189 <1> jz @FF 5190 <1> @@: 5191 <1> mov al, 32 5192 <1> nearcall putc 5193 <1> loop @B 5194 <1> @@: 5195 <1> retn 5196 <1> 5197 <1> .debugdump: 5198 <1> call .debugpad 5199 <1> nearcall putsz 5200 <1> 5201 <1> cmp byte [bx + 4], OPERATOR_RIGHTOP 5202 <1> jne @F 5203 <1> mov dx, .msg_none 5204 <1> nearcall putsz 5205 <1> jmp .debugdump_none 5206 <1> 5207 <1> @@: 5208 <1> sub sp, 8 5209 <1> mov di, sp 5210 <1> mov ax, word [bx + 2] 5211 <1> nearcall hexword 5212 <1> mov ax, word [bx] 5213 <1> nearcall hexword 5214 <1> mov cx, di 5215 <1> mov di, sp 5216 <1> @@: 5217 <1> cmp byte [di], '0' 5218 <1> jne @F 5219 <1> inc di 5220 <1> cmp cx, di 5221 <1> ja @B 5222 <1> dec di 5223 <1> @@: 5224 <1> sub cx, di 5225 <1> mov dx, di 5226 <1> push bx 5227 <1> nearcall puts 5228 <1> pop bx 5229 <1> add sp, 8 5230 <1> 5231 <1> .debugdump_none: 5232 <1> mov dx, .msg_op 5233 <1> nearcall putsz 5234 <1> mov si, word [bx + 4] 5235 <1> and si, 00FFh 5236 <1> add si, si 5237 <1> mov dx, word [operatornames + si] 5238 <1> nearcall putsz 5239 <1> mov dx, .msg_end 5240 <1> nearcall putsz 5241 <1> retn 5242 <1> 5243 <1> .debugend: 5244 <1> pop di 5245 <1> pop si 5246 <1> pop dx 5247 <1> pop cx 5248 <1> pop bx 5249 <1> pop ax 5250 <1> %endif 5251 <1> 5252 000096BA 8A4EFC <1> mov cl, byte [bp+lA+4] 5253 000096BD E8F300 <1> call .compare_operators ; (cmp bl, cl = cmp Boprtr, Aoprtr) 5254 000096C0 7249 <1> jb .high_precedence_A ; compute the first operand first --> 5255 <1> ; (jump taken for invalid Boprtr too) 5256 000096C2 7505 <1> jne @F 5257 <1> ; If we get the same operator precedence for 5258 <1> ; Boprtr and Aoprtr we generally want to 5259 <1> ; handle this as a high-precedence A. 5260 <1> ; This is not true for operator cond. If 5261 <1> ; an expression like this is parsed: 5262 <1> ; Acond ?? Bcond ?? Btrue :: Bfalse :: Afalse 5263 <1> ; Then we get first: 5264 <1> ; A = none, right op 5265 <1> ; B = Acond, cond op 5266 <1> ; After the right op is processed: 5267 <1> ; A = Acond, cond op 5268 <1> ; B = Bcond, cond op 5269 <1> ; Next we want: 5270 <1> ; @ = Acond, cond op 5271 <1> ; A = Bcond, cond op 5272 <1> ; B = Btrue, invalid op (::) 5273 <1> ; If we did high precedence A here instead 5274 <1> ; we would get: 5275 <1> ; A = (Acond) cond op (Bcond) 5276 <1> ; At this point of_cond would parse "Btrue..." 5277 <1> ; as the :: clause, failing because it doesn't 5278 <1> ; start with a "::". 5279 000096C4 83FB01 <1> cmp bx, OPPREC_COND 5280 000096C7 7542 <1> jne .high_precedence_A 5281 <1> 5282 <1> @@: 5283 000096C9 FF46FE <1> inc word [bp+lCount] ; increase loop count 5284 000096CC FF76F8 <1> push word [bp+lA+0] 5285 000096CF FF76FA <1> push word [bp+lA+2] 5286 000096D2 FF76FC <1> push word [bp+lA+4] ; push A and its operator 5287 <1> 5288 <1> %if _EXPRESSION_DEBUG 5289 <1> push ax 5290 <1> push bx 5291 <1> push cx 5292 <1> push dx 5293 <1> push si 5294 <1> push di 5295 <1> 5296 <1> lea bx, [bp + lA] 5297 <1> mov dx, .msg@ 5298 <1> call .debugdump 5299 <1> pop di 5300 <1> pop si 5301 <1> pop dx 5302 <1> pop cx 5303 <1> pop bx 5304 <1> pop ax 5305 <1> %endif 5306 <1> 5307 000096D5 FF76F6 <1> push word [bp+lB+4] 5308 000096D8 FF76F4 <1> push word [bp+lB+2] 5309 000096DB FF76F2 <1> push word [bp+lB+0] 5310 000096DE 8F46F8 <1> pop word [bp+lA+0] 5311 000096E1 8F46FA <1> pop word [bp+lA+2] 5312 000096E4 8F46FC <1> pop word [bp+lA+4] ; set A to B, including operator 5313 <1> 5314 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PRECEDENCE_STACK_CHECK 5315 000096E7 E80C02 <1> call stack_check_indirection 5316 <1> %else 5317 <1> mov ax, _EXPRESSION_PRECEDENCE_STACK_CHECK 5318 <1> call stack_check ; abort if deep recursion 5319 <1> %endif 5320 000096EA A9[E82A] <1> test ax, msg.stack_overflow.precedence 5321 <1> 5322 <1> d4 call expr_d4message 5323 <1> d4 asciz "getexpression: Entering loop/recursion",13,10 5324 <1> 5325 <1> .loop_j: 5326 000096ED E99CFC <1> jmp .loop ; start again (former B as first term) --> 5327 <1> 5328 <1> .cont: 5329 <1> 5330 <1> d4 call expr_d4message 5331 <1> d4 asciz "getexpression: End of loop/recursion",13,10 5332 <1> 5333 000096F0 FF76FC <1> push word [bp+lA+4] 5334 000096F3 FF76FA <1> push word [bp+lA+2] 5335 000096F6 FF76F8 <1> push word [bp+lA+0] 5336 000096F9 8F46F2 <1> pop word [bp+lB+0] 5337 000096FC 8F46F4 <1> pop word [bp+lB+2] 5338 000096FF 8F46F6 <1> pop word [bp+lB+4] ; set B to A, including operator 5339 <1> 5340 00009702 8F46FC <1> pop word [bp+lA+4] 5341 00009705 8F46FA <1> pop word [bp+lA+2] 5342 00009708 8F46F8 <1> pop word [bp+lA+0] ; pop A and its operator 5343 <1> 5344 <1> %if _EXPRESSION_DEBUG 5345 <1> push ax 5346 <1> push bx 5347 <1> push cx 5348 <1> push dx 5349 <1> push si 5350 <1> push di 5351 <1> 5352 <1> lea bx, [bp + lA] 5353 <1> mov dx, .msgPop 5354 <1> call .debugdump 5355 <1> lea bx, [bp + lB] 5356 <1> mov dx, .msgB 5357 <1> call .debugdump 5358 <1> 5359 <1> pop di 5360 <1> pop si 5361 <1> push si 5362 <1> push di 5363 <1> call .debugline 5364 <1> 5365 <1> pop di 5366 <1> pop si 5367 <1> pop dx 5368 <1> pop cx 5369 <1> pop bx 5370 <1> pop ax 5371 <1> %endif 5372 <1> 5373 <1> .high_precedence_A: 5374 <1> 5375 <1> %if _EXPRESSION_DEBUG 5376 <1> push ax 5377 <1> push bx 5378 <1> push cx 5379 <1> push dx 5380 <1> push si 5381 <1> push di 5382 <1> 5383 <1> call .debugpad 5384 <1> mov dx, .msg_opA 5385 <1> nearcall putsz 5386 <1> lea bx, [bp + lA] 5387 <1> mov si, word [bx + 4] 5388 <1> and si, 00FFh 5389 <1> add si, si 5390 <1> mov dx, word [operatornames + si] 5391 <1> nearcall putsz 5392 <1> mov dx, .msg_opB 5393 <1> nearcall putsz 5394 <1> 5395 <1> pop di 5396 <1> pop si 5397 <1> pop dx 5398 <1> pop cx 5399 <1> pop bx 5400 <1> pop ax 5401 <1> %endif 5402 <1> 5403 0000970B 8B4EFC <1> mov cx, word [bp+lA+4] ; retrieve A's type info and operator 5404 0000970E FF76FA <1> push word [bp+lA+2] 5405 00009711 FF76F8 <1> push word [bp+lA+0] 5406 00009714 8B46F6 <1> mov ax, word [bp+lB+4] ; retrieve B's type info and operator 5407 00009717 882E[0154] <1> mov byte [hhtype], ch ; set type info 5408 0000971B 8F06[F053] <1> pop word [hhvar] 5409 0000971F B500 <1> mov ch, 0 ; cx = A's 1-based operator index 5410 00009721 8F06[F253] <1> pop word [hhvar+2] ; retrieve A's number 5411 00009725 8B56F2 <1> mov dx, word [bp+lB+0] 5412 00009728 89CF <1> mov di, cx 5413 0000972A 8B5EF4 <1> mov bx, word [bp+lB+2] ; retrieve B's number 5414 0000972D 01FF <1> add di, di ; = offset into dispatch table 5415 0000972F 50 <1> push ax ; preserve B's operator 5416 <1> %if _HHDIVREMAIN 5417 00009730 C606[0254]00 <1> mov byte [hh_div_active], 0 5418 <1> %endif 5419 00009735 FF95[144C] <1> call near [operatorfunctions+di]; compute: (A) operatorA (B) 5420 00009739 59 <1> pop cx ; cl = B's operator 5421 <1> 5422 0000973A 8956F8 <1> mov word [bp+lA+0], dx 5423 0000973D 88C8 <1> mov al, cl ; B's operator 5424 0000973F 895EFA <1> mov word [bp+lA+2], bx 5425 00009742 8946FC <1> mov word [bp+lA+4], ax ; store result in A, with B's operator 5426 <1> 5427 <1> %if OPERATOR_INVALID != 0 5428 <1> %error Remove optimisation 5429 <1> %endif 5430 00009745 84C0 <1> test al, al ; (previous B's) operator valid ? 5431 00009747 7412 <1> jz .end ; no, end of sequence --> 5432 <1> 5433 00009749 837EFE00 <1> cmp word [bp+lCount], byte 0 ; in recursion ? 5434 0000974D 749E <1> je .loop_j ; no, loop --> 5435 <1> 5436 0000974F 5B <1> pop bx 5437 00009750 53 <1> push bx ; retrieve saved ('@') operator 5438 <1> 5439 00009751 E85F00 <1> call .compare_operators ; (cmp bl, cl = cmp @oprtr, Aoprtr) 5440 00009754 7297 <1> jb .loop_j ; A's operator's precedence higher --> 5441 <1> 5442 <1> %if _EXPRESSION_DEBUG 5443 <1> push ax 5444 <1> push bx 5445 <1> push cx 5446 <1> push dx 5447 <1> push si 5448 <1> push di 5449 <1> 5450 <1> cmp bx, OPPREC_COND 5451 <1> jne @F 5452 <1> mov dx, .msg_looping_cond 5453 <1> nearcall putsz 5454 <1> @@: 5455 <1> 5456 <1> pop di 5457 <1> pop si 5458 <1> pop dx 5459 <1> pop cx 5460 <1> pop bx 5461 <1> pop ax 5462 <1> %endif 5463 <1> 5464 00009756 83FB01 <1> cmp bx, OPPREC_COND 5465 00009759 7492 <1> je .loop_j 5466 <1> 5467 <1> d4 call expr_d4message 5468 <1> d4 asciz "getexpression: Loop/recursion found to be not necessary anymore",13,10 5469 <1> 5470 <1> ; dec word [bp+lCount] 5471 <1> ; jmp .cont ; return to previous level --> 5472 <1> 5473 <1> .end: 5474 0000975B FF4EFE <1> dec word [bp+lCount] ; decrease loop count 5475 0000975E 7990 <1> jns .cont ; process next operand from stack --> 5476 <1> 5477 00009760 8B56F8 <1> mov dx, word [bp+lA+0] 5478 00009763 8B5EFA <1> mov bx, word [bp+lA+2] ; retrieve A 5479 00009766 8B46FC <1> mov ax, word [bp+lA+4] ; (discard (invalid) operator) 5480 <1> 5481 00009769 89EC5D <1> lleave code ; remove the stack frame 5482 <1> 5483 0000976C 5F <1> pop di 5484 0000976D 59 <1> pop cx ; restore registers 5485 <1> 5486 0000976E FF0E[FC53] <1> dec word [hh_depth] 5487 00009772 4E <1> dec si 5488 00009773 AC <1> lodsb ; (restore al) 5489 <1> 5490 <1> .countsignificantbits: section_of_function getexpression 5491 00009774 51 <1> push cx 5492 00009775 52 <1> push dx 5493 00009776 53 <1> push bx 5494 00009777 B90100 <1> mov cx, 1 5495 0000977A 53 <1> push bx 5496 0000977B F6C440 <1> test ah, 40h ; signed type ? 5497 0000977E 7416 <1> jz .unsigned ; no --> 5498 00009780 F6C780 <1> test bh, 80h ; negative value ? 5499 00009783 7411 <1> jz .unsigned ; no --> 5500 <1> .signed: 5501 00009785 21D3 <1> and bx, dx 5502 00009787 43 <1> inc bx ; = 0 if -1 (all bits set) 5503 00009788 5B <1> pop bx 5504 00009789 741F <1> jz .done ; is -1, 1 significant bit --> 5505 0000978B B122 <1> mov cl, 32+1+1 ; number of significant bits is 1 + 1-based index of highest clear bit 5506 <1> .signedloop: 5507 0000978D D1E2 <1> shl dx, 1 5508 0000978F D1D3 <1> rcl bx, 1 ; shift up the number 5509 00009791 49 <1> dec cx ; maintain index 5510 00009792 72F9 <1> jc .signedloop ; still a set bit --> 5511 00009794 EB14 <1> jmp short .done 5512 <1> .unsigned: 5513 00009796 09D3 <1> or bx, dx ; = 0 if 0 (all bits cleared) 5514 00009798 5B <1> pop bx 5515 00009799 740F <1> jz .done ; is 0, 1 significant bit --> 5516 0000979B B121 <1> mov cl, 32+1 ; number of significant bits is 1-based index of highest set bit 5517 <1> .unsignedloop: 5518 0000979D D1E2 <1> shl dx, 1 5519 0000979F D1D3 <1> rcl bx, 1 5520 000097A1 49 <1> dec cx 5521 000097A2 73F9 <1> jnc .unsignedloop 5522 000097A4 F6C440 <1> test ah, 40h ; positive signed value ? 5523 000097A7 7401 <1> jz .done ; no --> 5524 000097A9 41 <1> inc cx ; then the following zero bit is required too 5525 <1> .done: 5526 000097AA 80E4C0 <1> and ah, 1100_0000b 5527 <1> ; insure we only pass the top two type bits 5528 000097AD 08CC <1> or ah, cl 5529 <1> ; low 6 bits = number of significant bits 5530 000097AF 5B <1> pop bx 5531 000097B0 5A <1> pop dx 5532 000097B1 59 <1> pop cx 5533 000097B2 C3 <1> retn 5534 <1> 5535 <1> 5536 <1> ; INP: bl = operator index 1 5537 <1> ; cl = operator index 2 5538 <1> ; OUT: flags as for "cmp precedence1, precedence2" 5539 <1> ; CHG: bx, cx 5540 <1> .compare_operators: 5541 000097B3 E80600 <1> call .getprecedence 5542 000097B6 E80300 <1> call .getprecedence 5543 000097B9 39CB <1> cmp bx, cx 5544 000097BB C3 <1> retn 5545 <1> 5546 <1> .getprecedence: 5547 000097BC 30FF <1> xor bh, bh 5548 000097BE 8A9F[FA4B] <1> mov bl, byte [operatorprecedences+bx] 5549 000097C2 87D9 <1> xchg bx, cx 5550 000097C4 C3 <1> retn 5551 <1> 5552 <1> getexpression.lit_ishexdigit?: section_of_function 5553 000097C5 B93946 <1> mov cx, "9F" 5554 <1> getexpression.lit_isdigit?: section_of_function 5555 000097C8 3C30 <1> cmp al, '0' 5556 000097CA 7214 <1> jb .no 5557 000097CC 38C8 <1> cmp al, cl 5558 000097CE 760D <1> jbe .yes 5559 000097D0 50 <1> push ax 5560 000097D1 E89A01 <1> nearcall uppercase 5561 000097D4 38E8 <1> cmp al, ch 5562 000097D6 7707 <1> ja .no_p 5563 000097D8 3C41 <1> cmp al, 'A' 5564 000097DA 7203 <1> jb .no_p 5565 000097DC 58 <1> pop ax 5566 <1> .yes: 5567 000097DD F8 <1> clc 5568 000097DE C3 <1> retn 5569 <1> 5570 <1> .no_p: 5571 000097DF 58 <1> pop ax 5572 <1> .no: 5573 000097E0 F9 <1> stc 5574 000097E1 C3 <1> retn 5575 <1> 5576 <1> 5577 <1> of_cond: section_of_function 5578 000097E2 50 <1> push ax ; second operand type 5579 000097E3 4E <1> dec si 5580 000097E4 AD <1> lodsw 5581 000097E5 3D3A3A <1> cmp ax, "::" 5582 000097E8 7530 <1> jne short .error 5583 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_COND_STACK_CHECK 5584 000097EA E80901 <1> call stack_check_indirection 5585 <1> %else 5586 <1> mov ax, _EXPRESSION_COND_STACK_CHECK 5587 <1> call stack_check ; abort if deep recursion 5588 <1> %endif 5589 000097ED A9[312B] <1> test ax, msg.stack_overflow.cond 5590 <1> 5591 000097F0 A1[F053] <1> mov ax, word [hhvar] 5592 000097F3 0B06[F253] <1> or ax, word [hhvar + 2] ; ax = flag (zero if to take third operand) 5593 000097F7 53 <1> push bx 5594 000097F8 52 <1> push dx 5595 000097F9 50 <1> push ax ; preserve stack 5596 000097FA AC <1> lodsb 5597 000097FB E879FB <1> nearcall getexpression ; parse third operand 5598 000097FE E8B001 <1> nearcall skipcomm0 ; allow comma afterwards 5599 00009801 59 <1> pop cx 5600 00009802 E309 <1> jcxz @F ; if to take third operand --> 5601 00009804 5A <1> pop dx 5602 00009805 5B <1> pop bx ; take second operand 5603 00009806 88C1 <1> mov cl, al 5604 00009808 58 <1> pop ax ; ah = second operand type 5605 00009809 88C8 <1> mov al, cl ; preserve al 5606 0000980B EB03 <1> jmp @FF 5607 <1> 5608 <1> @@: 5609 0000980D 59 <1> pop cx 5610 0000980E 59 <1> pop cx ; discard second operand value 5611 0000980F 59 <1> pop cx ; discard second operand type 5612 <1> @@: 5613 00009810 59 <1> pop cx ; discard near return address 5614 00009811 59 <1> pop cx ; discard cx on stack 5615 <1> 5616 00009812 C646FC19 <1> mov byte [bp+lA+4], OPERATOR_RIGHTOP 5617 00009816 4E <1> dec si 5618 00009817 E933FE <1> jmp getexpression.term_done 5619 <1> 5620 <1> .error: 5621 0000981A E940EA <1> jmp error_expr 5622 <1> 5623 <1> lleave ctx 5624 <1> 5625 <1> 5626 <1> ; INP: si-> possible unary operators 5627 <1> ; OUT: dx = 1 + count of unary operators 5628 <1> ; al, si-> behind identified unary operators 5629 <1> ; ch = bit mask of required bytes, 5630 <1> ; bits 0..3 represent one byte of a dword each 5631 <1> ; bits 4..7 are clear 5632 <1> ; CHG: bx, ch, di 5633 <1> ; 5634 <1> ; Type specifications are parsed as unary operators 5635 <1> ; here. (Elsewhere, "unary operators" refers only to 5636 <1> ; the unary operators specified as one of "+-~!?".) 5637 <1> count_unary_operators: section_of_function 5638 0000981D 31FF <1> xor di, di 5639 <1> ; INP: si-> possible unary operators 5640 <1> ; di = maximum count+1 of unary operators to process, 5641 <1> ; zero means unlimited 5642 <1> ; OUT: dx = 1 + count of unary operators, 5643 <1> ; at most di 5644 <1> ; al, si-> behind identified unary operators 5645 <1> ; ch = bit mask of required bytes, 5646 <1> ; bits 0..3 represent one byte of a dword each 5647 <1> ; bits 4..7 are clear 5648 <1> ; ZR if maximum reached 5649 <1> ; NZ if maximum not reached 5650 <1> ; CHG: bx, ch 5651 <1> count_unary_operators_restrict: section_of_function 5652 0000981F B50F <1> mov ch, 1111b ; default to access a full dword 5653 00009821 31D2 <1> xor dx, dx ; initialize counter to zero 5654 00009823 EB05 <1> jmp @F 5655 <1> 5656 <1> .loop: 5657 00009825 E88801 <1> nearcall skipcomma 5658 00009828 4E <1> dec si 5659 00009829 5F <1> pop di ; get maximum count 5660 <1> @@: 5661 0000982A 42 <1> inc dx ; count unary operators and type specifiers 5662 0000982B 57 <1> push di ; save maximum count again 5663 0000982C E8B001 <1> nearcall skipwhite ; load next character and skip blanks 5664 0000982F 39FA <1> cmp dx, di ; reached maximum ? 5665 00009831 741B <1> je .end ; yes --> (ZR) 5666 00009833 51 <1> push cx 5667 00009834 E82CF1 <1> nearcall istype? ; check for type and if so retrieve info 5668 00009837 720F <1> jc .notype ; not a type --> 5669 00009839 59 <1> pop cx 5670 <1> 5671 0000983A D1EB <1> shr bx, 1 ; discard signedness bit 5672 0000983C 89FE <1> mov si, di ; -> behind the type specifier 5673 0000983E B11F <1> mov cl, 01Fh ; prepare shift count register 5674 00009840 238F[8A4B] <1> and cx,[typebitmasks+bx]; apply mask and get shift count register 5675 00009844 D2E5 <1> shl ch, cl ; apply shift 5676 00009846 EBDD <1> jmp short .loop ; check for more --> 5677 <1> 5678 <1> .notype: 5679 00009848 E8D1F0 <1> nearcall isunaryoperator?; is it a unary operator? 5680 0000984B 59 <1> pop cx 5681 0000984C 74D7 <1> je .loop ; yes, check for more --> 5682 <1> ; (NZ) 5683 <1> .end: 5684 0000984E 5F <1> pop di ; discard 5685 0000984F C3 <1> retn 5686 <1> 5687 <1> 5688 <1> get3byte.checksignificantbits: section_of_function 5689 00009850 50 <1> push ax 5690 00009851 80E43F <1> and ah, 3Fh 5691 00009854 80FC18 <1> cmp ah, 24 5692 00009857 EB1E <1> jmp checksignificantbitscommon 5693 <1> 5694 <1> getword: section_of_function 5695 00009859 53 <1> push bx 5696 0000985A E81AFB <1> nearcall getexpression 5697 0000985D 5B <1> pop bx 5698 <1> .checksignificantbits: section_of_function getword 5699 0000985E 50 <1> push ax 5700 0000985F 80E43F <1> and ah, 3Fh 5701 00009862 80FC10 <1> cmp ah, 16 5702 00009865 EB10 <1> jmp checksignificantbitscommon 5703 <1> 5704 <1> getbyte: section_of_function 5705 00009867 53 <1> push bx 5706 00009868 52 <1> push dx 5707 00009869 E80BFB <1> nearcall getexpression 5708 0000986C 5B <1> pop bx 5709 0000986D 88FE <1> mov dh, bh 5710 0000986F 5B <1> pop bx 5711 <1> .checksignificantbits: section_of_function getbyte 5712 00009870 50 <1> push ax 5713 00009871 80E43F <1> and ah, 3Fh 5714 00009874 80FC08 <1> cmp ah, 8 5715 <1> checksignificantbitscommon: section_of_function 5716 00009877 58 <1> pop ax 5717 00009878 7701 <1> ja short errorj6 ; if error 5718 0000987A C3 <1> retn 5719 <1> 5720 <1> errorj6: 5721 0000987B E9DFE9 <1> jmp error_expr 5722 <1> 5723 <1> 5724 <1> ; GETNYB - Convert the hex character in AL into a nybble. Return 5725 <1> ; carry set in case of error. 5726 <1> 5727 <1> getnyb: section_of_function 5728 0000987E 50 <1> push ax 5729 0000987F 2C30 <1> sub al, '0' 5730 00009881 3C09 <1> cmp al, 9 5731 00009883 760D <1> jbe .return ; if normal digit 5732 00009885 58 <1> pop ax 5733 00009886 50 <1> push ax 5734 00009887 E8E400 <1> nearcall uppercase 5735 0000988A 2C41 <1> sub al, 'A' 5736 0000988C 3C05 <1> cmp al, 'F'-'A' 5737 0000988E 7706 <1> ja .error ; if not A..F 5738 00009890 040A <1> add al, 10 5739 <1> .return: 5740 00009892 44 <1> inc sp ; normal return (first pop old AX) 5741 00009893 44 <1> inc sp 5742 00009894 F8 <1> clc 5743 00009895 C3 <1> retn 5744 <1> .error: 5745 00009896 58 <1> pop ax ; error return 5746 00009897 F9 <1> stc 5747 00009898 C3 <1> retn 5748 <1> 5749 <1> 5750 <1> ; INP: si -> input line 5751 <1> ; OUT: NC if normal range (nonzero, upper >= lower), 5752 <1> ; bx:dx = TO value (upper bound) 5753 <1> ; cx:di = FROM value (lower bound) 5754 <1> ; CY if not normal, 5755 <1> ; bx:dx and cx:di may be invalid 5756 <1> ; ZR if FROM LENGTH with zero length, cx:di valid 5757 <1> ; al = first character 5758 <1> ; si -> next character 5759 <1> ; jumps to error if invalid input 5760 <1> get_value_range: section_of_function 5761 00009899 E84301 <1> nearcall skipwhite 5762 0000989C 4E <1> dec si 5763 0000989D BA[8C1F] <1> mov dx, msg.from 5764 000098A0 E87D00 <1> nearcall isstring? 5765 000098A3 AC <1> lodsb 5766 000098A4 7540 <1> jne .not_from 5767 <1> 5768 <1> .from: 5769 000098A6 E8CEFA <1> nearcall getexpression ; (recursive) 5770 000098A9 89D7 <1> mov di, dx 5771 000098AB 89D9 <1> mov cx, bx ; cx:di = from 5772 <1> 5773 000098AD E80101 <1> nearcall skipcomm0 5774 000098B0 4E <1> dec si 5775 000098B1 BA[911F] <1> mov dx, msg.to 5776 000098B4 E86900 <1> nearcall isstring? 5777 000098B7 7427 <1> je .from_to 5778 000098B9 BA[FF1E] <1> mov dx, msg.length 5779 000098BC E86100 <1> nearcall isstring? 5780 000098BF 7510 <1> jne short .error 5781 <1> 5782 <1> .from_length: 5783 000098C1 AC <1> lodsb 5784 000098C2 51 <1> push cx 5785 000098C3 E8F7EF <1> nearcall get_length ; (recursive call to getexpression) 5786 000098C6 59 <1> pop cx 5787 000098C7 85DB <1> test bx, bx 5788 000098C9 7509 <1> jnz @F 5789 000098CB 85D2 <1> test dx, dx 5790 000098CD 7505 <1> jnz @F 5791 <1> ; ZR = length is zero, cx:di = from 5792 <1> .notnormal: 5793 000098CF F9 <1> stc 5794 000098D0 C3 <1> retn 5795 <1> 5796 <1> .error: 5797 000098D1 E989E9 <1> jmp error_expr 5798 <1> 5799 <1> @@: 5800 <1> ; bx:dx = length 5801 000098D4 01FA <1> add dx, di 5802 000098D6 11CB <1> adc bx, cx ; bx:dx = from + length 5803 000098D8 83EA01 <1> sub dx, 1 5804 000098DB 83DB00 <1> sbb bx, 0 ; bx:dx = from + length - 1 5805 000098DE EB0D <1> jmp @F 5806 <1> 5807 <1> .from_to: 5808 000098E0 AC <1> lodsb 5809 <1> 5810 000098E1 E893FA <1> nearcall getexpression ; (recursive) 5811 <1> ; bx:dx = to 5812 <1> ; cx:di = from 5813 000098E4 EB07 <1> jmp @F 5814 <1> 5815 <1> .not_from: 5816 000098E6 E88EFA <1> nearcall getexpression ; (recursive) 5817 000098E9 89D7 <1> mov di, dx 5818 000098EB 89D9 <1> mov cx, bx ; bx:dx = cx:ax = value 5819 <1> 5820 <1> @@: 5821 000098ED 39CB <1> cmp bx, cx 5822 000098EF 7502 <1> jne @F 5823 000098F1 39FA <1> cmp dx, di 5824 <1> @@: 5825 000098F3 72DA <1> jb .notnormal ; NZ = length overflow or not normal FROM TO 5826 000098F5 C3 <1> retn ; (NC) 5827 <1> 5828 <1> 5829 <1> stack_check_indirection: 5830 000098F6 B88000 <1> mov ax, _EXPRESSION_INDIRECTION_STACK_CHECK 5831 <1> 5832 <1> ; INP: ax = how much stack should be left 5833 <1> ; word [cs:ip + 1] = message for location 5834 <1> ; OUT: doesn't return if stack overflow 5835 <1> ; CHG: ax 5836 <1> ; STT: ds = ss 5837 <1> stack_check: 5838 <1> %if _SYMBOLIC 5839 <1> call .internal 5840 <1> %else 5841 000098F9 05[000E] <1> add ax, stack 5842 000098FC 39C4 <1> cmp sp, ax 5843 <1> %endif 5844 000098FE 7201 <1> jb @F 5845 00009900 C3 <1> retn 5846 <1> 5847 <1> @@: 5848 00009901 58 <1> pop ax 5849 <1> 5850 00009902 16 <1> push ss 5851 00009903 07 <1> pop es 5852 00009904 8B26[F60A] <1> mov sp, [throwsp] 5853 <1> 5854 00009908 BF[A52A] <1> mov di, msg.stack_overflow.caller 5855 0000990B E87C01 <1> nearcall hexword 5856 0000990E BA[892A] <1> mov dx, msg.stack_overflow 5857 00009911 E89F06 <1> nearcall putsz 5858 00009914 93 <1> xchg ax, bx 5859 00009915 2E8B5701 <1> mov dx, [cs:bx + 1] 5860 00009919 E89706 <1> nearcall putsz 5861 <1> 5862 <1> %if _EXPRDUALCODE && _DUALCODE 5863 <1> nearcall to_errret_pop 5864 <1> usesection lDEBUG_CODE 5865 <1> 5866 <1> to_errret_pop: equ $ 5867 <1> add sp, 6 5868 <1> jmp near [errret] 5869 <1> usesection lDEBUG_CODE2 5870 <1> %else 5871 0000991C FF26[F20A] <1> jmp near [errret] 5872 <1> %endif 5873 <1> 5874 <1> 5875 <1> %if _SYMBOLIC 5876 <1> ; INP: ax = how much stack should be left 5877 <1> ; OUT: CY if stack overflow 5878 <1> ; CHG: ax 5879 <1> ; STT: ds = ss 5880 <1> .internal: section_of_function stack_check 5881 <1> add ax, word [stack_low_address] 5882 <1> cmp sp, ax 5883 <1> retn 5884 <1> %endif 5885 <1> 5886 <1> %if _PM 5887 <1> ; INP: ss:sp -> 8-byte save area 5888 <1> ; OUT: in PM: save area filled 5889 <1> ; save area left on stack 5890 <1> ; CHG: - 5891 <1> ; STT: es = ds = debugger data selector 5892 <1> save_scratchsel: 5893 <1> lframe near 5894 <1> lpar qword, savearea 5895 <1> lpar_return 5896 <1> lenter 5897 <1> nearcall ispm 5898 <1> jnz .ret 5899 <1> push ax 5900 <1> push bx 5901 <1> _386_o32 5902 <1> push di 5903 <1> _386 xor edi, edi 5904 <1> lea di, [bp + ?savearea] 5905 <1> mov bx, word [scratchsel] 5906 <1> mov ax, 000Bh 5907 <1> int 31h ; get descriptor 5908 <1> _386_o32 5909 <1> pop di 5910 <1> pop bx 5911 <1> pop ax 5912 <1> .ret: 5913 <1> lleave 5914 <1> lret 5915 <1> 5916 <1> ; INP: ss:sp -> 8-byte save area 5917 <1> ; OUT: in PM: save area used 5918 <1> ; save area popped from stack 5919 <1> ; CHG: - 5920 <1> ; STT: es = ds = debugger data selector 5921 <1> restore_scratchsel: 5922 <1> lframe near 5923 <1> lpar qword, savearea 5924 <1> lenter 5925 <1> nearcall ispm 5926 <1> jnz .ret 5927 <1> push ax 5928 <1> push bx 5929 <1> _386_o32 5930 <1> push di 5931 <1> _386 xor edi, edi 5932 <1> lea di, [bp + ?savearea] 5933 <1> mov bx, word [scratchsel] 5934 <1> mov ax, 000Ch 5935 <1> int 31h ; set descriptor 5936 <1> _386_o32 5937 <1> pop di 5938 <1> pop bx 5939 <1> pop ax 5940 <1> .ret: 5941 <1> lleave 5942 <1> lret 5943 <1> %endif 7097 7098 7099 %include "lineio.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug line input and output 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 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 19 <1> 20 <1> %define PREFIX 21 <1> %include "isstring.asm" 1 <2> 2 <2> %if 0 3 <2> 4 <2> lDebug string keyword comparison 5 <2> 6 <2> Copyright (C) 1995-2003 Paul Vojta 7 <2> Copyright (C) 2008-2023 C. Masloch 8 <2> 9 <2> Usage of the works is permitted provided that this 10 <2> instrument is retained with the works, so that any entity 11 <2> that uses the works is notified of this instrument. 12 <2> 13 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <2> 15 <2> %endif 16 <2> 17 <2> 18 <2> ; Check for given string (cap-insensitive) 19 <2> ; 20 <2> ; INP: ds:si -> input string to check (either cap), 21 <2> ; terminated by CR (13), NUL, semicolon, space, 22 <2> ; tab, dot, comma, equals, colon, [, ], (, or ) 23 <2> ; es:dx -> ASCIZ string to check (all-caps) 24 <2> ; OUT: Iff string matches, 25 <2> ; ZR 26 <2> ; si -> at separator that terminates the keyword 27 <2> ; else, 28 <2> ; NZ 29 <2> ; si = input si 30 <2> ; STT: ds = es = ss 31 <2> ; CHG: dx, al 32 <2> %[PREFIX]isstring?: 33 00009920 56 <2> push si 34 00009921 87D7 <2> xchg dx, di 35 <2> .loop: 36 00009923 AC <2> lodsb 37 00009924 E84700 <2> call %[PREFIX]uppercase 38 00009927 AE <2> scasb 39 00009928 7506 <2> jne .mismatch 40 0000992A 84C0 <2> test al, al 41 0000992C 75F5 <2> jne .loop 42 0000992E EB38 <2> jmp .matched_zr 43 <2> 44 <2> .mismatch: 45 00009930 E85700 <2> call %[PREFIX]iseol? 46 00009933 742C <2> je .checkend 47 00009935 3C20 <2> cmp al, 32 48 00009937 7428 <2> je .checkend 49 00009939 3C09 <2> cmp al, 9 50 0000993B 7424 <2> je .checkend 51 0000993D 3C2E <2> cmp al, '.' 52 0000993F 7420 <2> je .checkend 53 00009941 3C2C <2> cmp al, ',' 54 00009943 741C <2> je .checkend 55 00009945 3C3D <2> cmp al, '=' 56 00009947 7418 <2> je .checkend 57 00009949 3C3A <2> cmp al, ':' 58 0000994B 7414 <2> je .checkend 59 0000994D 3C5B <2> cmp al, '[' 60 0000994F 7410 <2> je .checkend 61 00009951 3C5D <2> cmp al, ']' 62 00009953 740C <2> je .checkend 63 00009955 3C28 <2> cmp al, '(' 64 00009957 7408 <2> je .checkend 65 00009959 3C29 <2> cmp al, ')' 66 0000995B 7404 <2> je .checkend 67 <2> %ifidni PREFIX, init_ 68 <2> cmp al, byte [ss:swch1] 69 <2> je .checkend 70 <2> %endif 71 <2> .ret_nz: 72 <2> ; NZ 73 0000995D 5E <2> pop si 74 <2> .ret: 75 0000995E 87D7 <2> xchg dx, di 76 00009960 C3 <2> retn 77 <2> 78 <2> .checkend: 79 00009961 26807DFF00 <2> cmp byte [es:di - 1], 0 80 00009966 75F5 <2> jne .ret_nz 81 <2> .matched_zr: ; ZR 82 00009968 5F <2> pop di ; (discard) 83 00009969 8D74FF <2> lea si, [si - 1] ; -> separator (preserve ZR) 84 0000996C EBF0 <2> jmp .ret 85 <2> 86 <2> 87 <2> %[PREFIX]uppercase: section_of_function 88 0000996E 3C61 <2> cmp al, 'a' 89 00009970 7206 <2> jb .ret 90 00009972 3C7A <2> cmp al, 'z' 91 00009974 7702 <2> ja .ret 92 00009976 24DF <2> and al, TOUPPER 93 <2> .ret: 94 00009978 C3 <2> retn 95 <2> 96 <2> %ifempty PREFIX 97 <2> iseol?_or_then: 98 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 99 00009979 F606[DB00]08 <2> testopt [internalflags3], dif3_in_if 100 0000997E 740A <2> jz iseol? 101 00009980 BA[5C1A] <2> mov dx, msg.then 102 00009983 4E <2> dec si 103 00009984 E899FF <2> call isstring? 104 00009987 740B <2> je iseol?.ret 105 00009989 AC <2> lodsb 106 <2> %endif 107 <2> %endif 108 <2> 109 <2> %[PREFIX]iseol?: 110 0000998A 3C3B <2> cmp al, ';' 111 0000998C 7406 <2> je .ret 112 <2> .notsemicolon: 113 0000998E 3C0D <2> cmp al, 13 ; this *IS* iseol? 114 00009990 7402 <2> je .ret 115 00009992 3C00 <2> cmp al, 0 116 <2> .ret: 117 00009994 C3 <2> retn 22 <1> 23 <1> 24 <1> chkeol_or_then: 25 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 26 00009995 E84800 <1> call skipwh0 27 00009998 E8DEFF <1> call iseol?_or_then 28 0000999B 74F7 <1> je iseol?.ret ; if EOL --> 29 0000999D EB08 <1> jmp @F 30 <1> %endif 31 <1> 32 <1> ; Check for end of line 33 <1> ; 34 <1> ; INP: al = first character 35 <1> ; ds:si-> next character 36 <1> ; OUT: ZR 37 <1> ; al = 13 or al = ';' or al = 0 38 <1> ; (does not return if anything on line beside blanks) 39 <1> chkeol: section_of_function 40 0000999F E83E00 <1> call skipwh0 41 000099A2 E8E5FF <1> call iseol? 42 000099A5 74ED <1> je iseol?.ret ; if EOL --> 43 <1> 44 <1> @@: 45 000099A7 B80001 <1> mov ax, 0100h 46 000099AA E8FCE8 <1> call setrc 47 <1> errorj8: 48 000099AD E9ADE8 <1> jmp error 49 <1> 50 <1> 51 <1> ; Skip blanks, then an optional comma, and then more blanks 52 <1> ; 53 <1> ; INP: ds:si -> first character 54 <1> ; OUT: al = first non-blank character behind 55 <1> ; ds:si -> character behind the first non-blank behind 56 <1> ; NC 57 <1> ; STK: 3 word 58 <1> skipcomma: 59 000099B0 AC <1> lodsb 60 <1> 61 <1> ; Same as above but we already have the first character in al 62 <1> skipcomm0: 63 000099B1 E82C00 <1> call skipwh0 64 000099B4 3C2C <1> cmp al, ',' 65 000099B6 7510 <1> jne .return ; if no comma 66 000099B8 56 <1> push si 67 000099B9 E82300 <1> call skipwhite 68 000099BC E8CBFF <1> call iseol? 69 000099BF 7504 <1> jne .noteol ; if not end of line 70 000099C1 5E <1> pop si 71 000099C2 B02C <1> mov al, ',' 72 000099C4 C3 <1> retn 73 <1> .noteol: 74 000099C5 83C402 <1> add sp, byte 2 ; pop si into nowhere 75 <1> .return: 76 000099C8 C3 <1> retn 77 <1> 78 <1> 79 <1> ; Skip blanks, then an optional equals sign, then more blanks 80 <1> skipequals: 81 000099C9 AC <1> lodsb 82 <1> skipequ0: 83 000099CA E81300 <1> call skipwh0 84 000099CD 3C3D <1> cmp al, '=' 85 000099CF 7503 <1> jne .return 86 000099D1 E80B00 <1> call skipwhite 87 <1> .return: 88 000099D4 C3 <1> retn 89 <1> 90 <1> 91 <1> ; Skip alphabetic characters, and then white space 92 <1> ; 93 <1> ; INP: ds:si-> first character 94 <1> ; OUT: al = first non-blank character behind alphabetic characters 95 <1> ; ds:si-> character behind the first non-blank behind alpha. 96 <1> ; NC 97 <1> skipalpha: 98 <1> .: 99 000099D5 AC <1> lodsb 100 000099D6 24DF <1> and al, TOUPPER 101 000099D8 2C41 <1> sub al, 'A' 102 000099DA 3C19 <1> cmp al, 'Z'-'A' 103 000099DC 76F7 <1> jbe . 104 000099DE 4E <1> dec si 105 <1> 106 <1> ; Skip blanks and tabs 107 <1> ; 108 <1> ; INP: ds:si-> first character 109 <1> ; OUT: al = first non-blank character 110 <1> ; ds:si-> character behind the first non-blank 111 <1> ; NC 112 <1> ; CHG: - 113 <1> ; STK: 1 word 114 <1> skipwhite: section_of_function 115 000099DF AC <1> lodsb 116 <1> 117 <1> ; Same as above, but first character in al 118 <1> ; 119 <1> ; INP: al = first character 120 <1> ; ds:si-> next character 121 <1> ; OUT: al = first non-blank character 122 <1> ; ds:si-> character behind the first non-blank 123 <1> ; NC 124 <1> ; CHG: - 125 <1> ; STK: 1 word 126 <1> skipwh0: section_of_function 127 000099E0 3C20 <1> cmp al, 32 128 000099E2 74FB <1> je skipwhite 129 000099E4 3C09 <1> cmp al, 9 130 000099E6 74F7 <1> je skipwhite 131 000099E8 F8 <1> clc 132 000099E9 C3 <1> retn 133 <1> 134 <1> 135 <1> ; SHOWSTRING - Print ASCIZ string. 136 <1> showstring.next: 137 000099EA AA <1> stosb 138 <1> showstring: 139 000099EB AC <1> lodsb 140 000099EC 84C0 <1> test al, al 141 000099EE 75FA <1> jnz .next 142 000099F0 C3 <1> retn 143 <1> 144 <1> 145 <1> ; Dump byte as decimal number string 146 <1> ; 147 <1> ; INP: al = byte 148 <1> ; di-> where to store 149 <1> ; OUT: - 150 <1> ; CHG: di-> behind variable-length string 151 <1> decbyte: 152 000099F1 50 <1> push ax 153 000099F2 51 <1> push cx 154 000099F3 B96400 <1> mov cx, 100 155 000099F6 E80B00 <1> call .div 156 000099F9 B10A <1> mov cl, 10 157 000099FB E80600 <1> call .div 158 000099FE 0430 <1> add al, '0' 159 00009A00 AA <1> stosb 160 00009A01 59 <1> pop cx 161 00009A02 58 <1> pop ax 162 00009A03 C3 <1> retn 163 <1> 164 <1> .div: 165 00009A04 30E4 <1> xor ah, ah 166 00009A06 F6F1 <1> div cl 167 00009A08 08C5 <1> or ch, al 168 00009A0A 7403 <1> jz .leadingzero 169 00009A0C 0430 <1> add al, '0' 170 00009A0E AA <1> stosb 171 <1> .leadingzero: 172 00009A0F 86C4 <1> xchg al, ah 173 00009A11 C3 <1> retn 174 <1> 175 <1> 176 <1> decword: section_of_function 177 00009A12 52 <1> push dx 178 00009A13 31D2 <1> xor dx, dx 179 00009A15 E80200 <1> call decdword 180 00009A18 5A <1> pop dx 181 00009A19 C3 <1> retn 182 <1> 183 <1> 184 <1> decdword: section_of_function 185 00009A1A 51 <1> push cx 186 00009A1B 31C9 <1> xor cx, cx 187 00009A1D E80200 <1> call dec_dword_minwidth 188 00009A20 59 <1> pop cx 189 00009A21 C3 <1> retn 190 <1> 191 <1> 192 <1> ; Dump dword as decimal number string 193 <1> ; 194 <1> ; INP: dx:ax = dword 195 <1> ; cx = minimum width (<= 1 for none, must be < 10) 196 <1> ; es:di -> where to store 197 <1> ; OUT: es:di -> behind variable-length string 198 <1> ; CHG: - 199 <1> ; STT: UP 200 <1> dec_dword_minwidth: 201 <1> lframe near 202 <1> lequ 10, bufferlen 203 <1> lvar ?bufferlen,buffer 204 00009A22 5589E58D66F6 <1> lenter 205 <1> lvar dword, dividend 206 00009A28 52 <1> push dx 207 00009A29 50 <1> push ax 208 00009A2A 49 <1> dec cx 209 <1> lvar word, minwidth 210 00009A2B 51 <1> push cx 211 00009A2C 41 <1> inc cx 212 <1> 213 00009A2D 50 <1> push ax 214 00009A2E 53 <1> push bx 215 00009A2F 51 <1> push cx 216 00009A30 52 <1> push dx 217 00009A31 56 <1> push si 218 00009A32 57 <1> push di 219 00009A33 06 <1> push es 220 <1> 221 00009A34 16 <1> push ss 222 00009A35 07 <1> pop es 223 <1> 224 00009A36 8D7EFF <1> lea di, [bp + ?buffer + ?bufferlen - 1] 225 00009A39 89FB <1> mov bx, di 226 00009A3B FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 227 <1> 228 <1> ; dword [bp + ?dividend] = number to display 229 00009A3C B90A00 <1> mov cx, 10 ; divisor 230 <1> .loop_write: 231 <1> 232 00009A3F 31D2 <1> xor dx, dx 233 00009A41 57 <1> push di 234 00009A42 BF0400 <1> mov di, 4 235 <1> .loop_divide: 236 00009A45 8B43F0 <1> mov ax, [bp + ?dividend - 2 + di] 237 00009A48 F7F1 <1> div cx 238 00009A4A 8943F0 <1> mov word [bp + ?dividend - 2 + di], ax 239 00009A4D 4F <1> dec di 240 00009A4E 4F <1> dec di 241 00009A4F 75F4 <1> jnz .loop_divide 242 <1> ; dx = last remainder 243 00009A51 5F <1> pop di 244 00009A52 92 <1> xchg ax, dx ; ax = remainder (next digit) 245 <1> ; dword [bp + ?dividend] = result of div 246 00009A53 0430 <1> add al, '0' 247 00009A55 AA <1> stosb 248 00009A56 FF4EF0 <1> dec word [bp + ?minwidth] 249 00009A59 79E4 <1> jns .loop_write 250 <1> 251 00009A5B 837EF400 <1> cmp word [bp + ?dividend + 2], 0 252 00009A5F 75DE <1> jnz .loop_write 253 00009A61 837EF200 <1> cmp word [bp + ?dividend], 0 254 <1> ; any more ? 255 00009A65 75D8 <1> jnz .loop_write ; loop --> 256 <1> 257 00009A67 FC <1> cld 258 <1> 259 00009A68 29FB <1> sub bx, di 260 00009A6A 89D9 <1> mov cx, bx 261 00009A6C 89FE <1> mov si, di 262 00009A6E 46 <1> inc si 263 <1> 264 00009A6F 07 <1> pop es 265 00009A70 5F <1> pop di 266 <1> 267 <1> @@: 268 00009A71 36A4 <1> ss movsb ; do not replace by rep ss movsb, because 269 <1> ; some 8086 don't like two-prefix opcodes 270 00009A73 E2FC <1> loop @B 271 <1> 272 00009A75 5E <1> pop si 273 00009A76 5A <1> pop dx 274 00009A77 59 <1> pop cx 275 00009A78 5B <1> pop bx 276 00009A79 58 <1> pop ax 277 <1> 278 00009A7A 89EC5D <1> lleave 279 00009A7D C3 <1> retn 280 <1> 281 <1> 282 <1> ; dump high word of eax - assumes 386 283 <1> hexword_high: 284 <1> [cpu 386] 285 00009A7E 66C1C010 <1> rol eax, 16 286 00009A82 E80500 <1> call hexword 287 00009A85 66C1C010 <1> rol eax, 16 288 <1> __CPU__ 289 00009A89 C3 <1> retn 290 <1> 291 <1> 292 <1> ; hexdword - dump dword (in eax) to hex ASCII - assumes 386 293 <1> ; HEXWORD - Print hex word (in AX). 294 <1> ; HEXBYTE - Print hex byte (in AL). 295 <1> ; HEXNYB - Print hex digit. 296 <1> ; Uses none. 297 <1> %if _SDUMPDISPLACEMENT && _PM && ! _ONLYNON386 298 <1> hexdword: 299 <1> call hexword_high 300 <1> %endif 301 <1> hexword: section_of_function 302 00009A8A 86C4 <1> xchg al, ah 303 00009A8C E80200 <1> call hexbyte 304 00009A8F 86C4 <1> xchg al, ah 305 <1> 306 <1> hexbyte: 307 00009A91 51 <1> push cx 308 00009A92 B104 <1> mov cl, 4 309 00009A94 D2C0 <1> rol al, cl 310 00009A96 E80300 <1> call hexnyb 311 00009A99 D2C0 <1> rol al, cl 312 00009A9B 59 <1> pop cx 313 <1> 314 <1> hexnyb: 315 00009A9C 50 <1> push ax 316 00009A9D 240F <1> and al, 0Fh 317 <1> .common: 318 <1> ; These three instructions change to ASCII hex. 319 <1> ; Refer to https://codegolf.stackexchange.com/questions/193793/little-endian-number-to-string-conversion/193842#193842 320 00009A9F 3C0A <1> cmp al, 10 ; set CF according to digit <= 9 321 00009AA1 1C69 <1> sbb al, 69h ; read CF, set CF and conditionally set AF 322 00009AA3 2F <1> das ; magic, which happens to work 323 00009AA4 AA <1> stosb 324 00009AA5 58 <1> pop ax 325 00009AA6 C3 <1> retn 326 <1> 327 <1> ; TAB_TO - Space fill line_out until reaching the 328 <1> ; column indicated by AX. (Display a new line if 329 <1> ; necessary.) At least two blanks are stored. 330 <1> ; 331 <1> ; INP: es:di -> behind text to display 332 <1> ; es:line_out -> text to display 333 <1> ; es:ax -> destination to tab to, 334 <1> ; if ax >= di + 2 then just put blanks, 335 <1> ; else pass content so far to trimputs 336 <1> ; and fill line_out with blanks afterwards 337 <1> ; OUT: es:di -> tabbed to buffer in line_out 338 <1> ; CHG: ax, bx, cx, dx 339 <1> tab_to: 340 00009AA7 50 <1> push ax 341 00009AA8 48 <1> dec ax ; make sure at least two blanks 342 00009AA9 39F8 <1> cmp ax, di 343 00009AAB 7706 <1> ja .sameline ; if there's room on this line --> 344 <1> ; below-or-equal: go to next line. 345 <1> ; That is, if we are at the indicated column 346 <1> ; (actually column - 1 due to dec) then make 347 <1> ; a new line. This covers the case of needing 348 <1> ; zero blanks (or one due to dec) as needing 349 <1> ; a new line, but one or more (two or more) go 350 <1> ; to the same line as prior content. 351 00009AAD E80B00 <1> call trimputs 352 00009AB0 BF[B40A] <1> mov di, line_out 353 <1> .sameline: 354 00009AB3 59 <1> pop cx 355 00009AB4 29F9 <1> sub cx, di 356 00009AB6 B020 <1> mov al, 32 357 00009AB8 F3AA <1> rep stosb ; space fill to the right end 358 <1> puts.retn: 359 00009ABA C3 <1> retn 360 <1> 361 <1> ; Trim excess blanks, append linebreak and display line_out. 362 <1> ; 363 <1> ; INP: es:di -> behind last character to display, or blank 364 <1> ; es:line_out -> text to display 365 <1> ; OUT: es:di -> behind displayed text (CR LF inserted) 366 <1> ; CHG: ax, bx, cx, dx 367 <1> ; 368 <1> ; Note: May overflow if line_out only contains blanks. The byte at 369 <1> ; trim_overflow is used to avoid overflows. 370 <1> trimputs: 371 00009ABB 4F <1> dec di 372 00009ABC 26803D20 <1> cmp byte [es:di], 32 373 00009AC0 74F9 <1> je trimputs 374 00009AC2 47 <1> inc di 375 <1> 376 <1> ; Append linebreak and display line_out 377 <1> ; 378 <1> ; INP: es:di -> behind last character to display 379 <1> ; es:line_out -> text to display 380 <1> ; OUT: es:di -> behind displayed text (CR LF inserted) 381 <1> ; STT: all segment registers same 382 <1> ; CHG: ax, bx, cx, dx 383 <1> putsline_crlf: section_of_function 384 00009AC3 B80D0A <1> mov ax, 10<<8| 13 385 00009AC6 AB <1> stosw 386 <1> 387 <1> ; Display line_out 388 <1> ; 389 <1> ; INP: es:di -> behind last character to display 390 <1> ; es:line_out -> first character to display 391 <1> ; STT: all segment registers same 392 <1> ; CHG: ax, bx, cx, dx 393 <1> putsline: section_of_function 394 00009AC7 89F9 <1> mov cx, di 395 00009AC9 BA[B40A] <1> mov dx, line_out 396 00009ACC 29D1 <1> sub cx, dx 397 <1> 398 <1> ; Display message 399 <1> ; 400 <1> ; INP: es:dx -> message to display 401 <1> ; cx = length of message 402 <1> ; STT: ds = ss = debugger data selector 403 <1> ; CHG: ax, bx, cx, dx 404 <1> puts: 405 <1> ;d4 call d4message 406 <1> ;d4 asciz "In puts first",13,10 407 <1> 408 <1> %if _IMMASM 409 <1> testopt [internalflags6], dif6_immasm_no_output 410 <1> jnz .retn 411 <1> %endif 412 <1> %if _RH 413 00009ACE D006[0701] <1> rol byte [skip_rh], 1 414 00009AD2 7218 <1> jc .no_rh 415 <1> %endif 416 00009AD4 F606[D300]20 <1> testopt [internalflags], tt_silence 417 00009AD9 7403E93803 <1> jnz puts_silence 418 <1> %if _RH 419 00009ADE F606[E600]30 <1> testopt [internalflags6], dif6_rh_mode | dif6_rh_mode_2 420 00009AE3 7407 <1> jz @F 421 00009AE5 52 <1> push dx 422 00009AE6 51 <1> push cx 423 00009AE7 E82C03 <1> call puts_silence ; also copy to auxbuff 424 00009AEA 59 <1> pop cx 425 00009AEB 5A <1> pop dx 426 <1> @@: 427 <1> %endif 428 <1> .no_rh: 429 <1> 430 00009AEC F606[D900]60 <1> testopt [internalflags3], dif3_unquiet 431 00009AF1 7507 <1> jnz @F 432 00009AF3 F606[D900]10 <1> testopt [internalflags3], dif3_quiet_output 433 00009AF8 75C0 <1> jnz .retn 434 <1> @@: 435 <1> 436 <1> ; The following code contains most of the paging support. 437 <1> ; Based on the number of LF characters in the string it 438 <1> ; displays only parts of the string, then interrupts it by 439 <1> ; the "[more]" prompt which waits for any key before 440 <1> ; proceeding. This is ensured to work proper in InDOS mode. 441 <1> ; 442 <1> ; Paging is deactivated if the command's output mustn't be 443 <1> ; paged (clears pagedcommand, which is set by cmd3). It is 444 <1> ; also not used when we output to a file. 445 00009AFA F606[A000]10 <1> testopt [options], nonpagingdevice 446 00009AFF 7403E93901 <1> jnz .display ; deactivated by user --> 447 00009B04 F606[A900]10 <1> testopt [options3], opt3_paging_rc 448 00009B09 750A <1> jnz @F ; don't disable for RC 449 <1> ; RC simply does not disable paging here. 450 <1> ; But it can still be disabled in other 451 <1> ; ways as we do not force it enabled for RC. 452 00009B0B F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 453 00009B10 7403E92801 <1> jnz .display 454 <1> @@: 455 <1> 456 00009B15 F606[A900]40 <1> testopt [options3], opt3_paging_re 457 00009B1A 750C <1> jnz @F ; enable for RE 458 00009B1C F606[DB00]01 <1> testopt [internalflags3], dif3_input_re 459 <1> ; is RE ? 460 00009B21 7403E91701 <1> jnz .display ; yes, don't do paging --> 461 00009B26 EB07 <1> jmp @FF 462 <1> 463 <1> @@: 464 00009B28 F606[DB00]01 <1> testopt [internalflags3], dif3_input_re 465 <1> ; is RE ? 466 00009B2D 7555 <1> jnz .dontcheckredirection ; yes, do paging --> 467 <1> @@: 468 <1> 469 00009B2F F606[A900]20 <1> testopt [options3], opt3_paging_yy 470 00009B34 740E <1> jz @F 471 00009B36 F606[150C]10 <1> testopt [serial_flags], sf_use_serial 472 <1> ; I/O done using serial port ? 473 00009B3B 7547 <1> jnz .dontcheckredirection ; yes, is paged --> 474 00009B3D E829EA <1> call InDOS_or_BIOS_IO ; InDOS mode ? 475 00009B40 7542 <1> jnz .dontcheckredirection ; yes, then we display with Int10 anyway --> 476 00009B42 EB2F <1> jmp @FF ; re-use later @@ 477 <1> 478 <1> @@: 479 <1> %if _INPUT_FILE_BOOT 480 00009B44 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 481 00009B49 7403E9EF00 <1> jnz .display 482 <1> %endif 483 00009B4E E818EA <1> call InDOS_or_BIOS_IO ; InDOS mode ? 484 00009B51 7531 <1> jnz .dontcheckredirection ; yes, then we display with Int10 anyway --> 485 <1> %if _INPUT_FILE_HANDLES 486 00009B53 F606[D600]10 <1> testopt [internalflags2], dif2_input_file 487 00009B58 7403E9E000 <1> jnz .display 488 <1> %endif 489 00009B5D F606[150C]10 <1> testopt [serial_flags], sf_use_serial 490 <1> ; I/O done using serial port ? 491 00009B62 7520 <1> jnz .dontcheckredirection ; yes, is paged --> 492 00009B64 E8FBE9 <1> call InDOS_or_BIOS_output 493 00009B67 750A <1> jnz @F 494 00009B69 F606[D000]80 <1> testopt [internalflags], outputfile 495 00009B6E 7403E9CA00 <1> jnz .display ; output redirected to file. never page --> 496 <1> @@: ; targeted by two branches 497 00009B73 F606[A100]01 <1> testopt [options], nondospaging 498 00009B78 750A <1> jnz .dontcheckredirection 499 00009B7A F606[D000]20 <1> testopt [internalflags], inputfile 500 00009B7F 7403E9B900 <1> jnz .display ; input redirected from a file. never page --> 501 <1> .dontcheckredirection: 502 00009B84 57 <1> push di 503 00009B85 51 <1> push cx ; used as variable: remaining (not yet displayed) line length 504 00009B86 89D7 <1> mov di, dx ; es:di-> string, cx = length 505 <1> .looplf: 506 00009B88 85C9 <1> test cx, cx 507 00009B8A 7503E9AC00 <1> jz .display_pop ; end of string (or ended in LF) --> 508 <1> ; Important: We only ever jump back to .looplf when cx 509 <1> ; zero means it's okay to ignore the waiting prompt as 510 <1> ; flagged below. This is (A) at the start of a string, 511 <1> ; where cx is the whole string's length, (B) after 512 <1> ; determining that prompting is not yet necessary, in 513 <1> ; which case the flag was checked earlier already, (C) 514 <1> ; after the flag has been set and a substring was already 515 <1> ; displayed (so cx is again the whole substring's length) 516 <1> ; or (D) just after the prompt was displayed, in which 517 <1> ; case the flag cannot be set. 518 <1> ; In case A and C, when the (sub)string is empty (ie. cx 519 <1> ; is zero) it's crucial to ignore the waiting prompt as 520 <1> ; this is the exact behaviour we want: If nothing is 521 <1> ; displayed anymore before the getline code prompts 522 <1> ; anyway, do not display our prompt. 523 00009B8F F606[D200]10 <1> testopt [internalflags], promptwaiting ; do we have a prompt to display ? 524 00009B94 7550 <1> jnz .promptnow ; yes, display it before the string --> 525 <1> 526 00009B96 31C0 <1> xor ax, ax 527 00009B98 F606[150C]10 <1> testopt [serial_flags], sf_use_serial 528 <1> ; serial ? 529 00009B9D 7409 <1> jz @F ; no --> 530 00009B9F 0A06[110C] <1> or al, byte [serial_rows] ; ax = number of rows if serial 531 00009BA3 7419 <1> jz .display_pop_ZR ; if zero, do not page --> 532 00009BA5 48 <1> dec ax ; was 1 ? (adjust to rows minus one) 533 00009BA6 7516 <1> jnz @FF ; no, use as rows minus one --> (NZ) 534 <1> ; ax = 0 if it was 1 535 <1> @@: 536 00009BA8 0A06[200C] <1> or al, [io_rows] 537 00009BAC 7410 <1> jz .display_pop_ZR 538 00009BAE 48 <1> dec ax ; was 1 ? (adjust to rows minus one) 539 00009BAF 750D <1> jnz @F ; no, use as rows minus one --> (NZ) 540 <1> ; yes, automatic (use BDA) 541 00009BB1 06 <1> push es 542 00009BB2 B84000 <1> mov ax, 40h ; 0040h is a bimodal segment/selector 543 00009BB5 8EC0 <1> mov es, ax 544 00009BB7 26A08400 <1> mov al, byte [ es:84h ] ; rows on screen 545 00009BBB 07 <1> pop es 546 00009BBC 85C0 <1> test ax, ax 547 <1> @@: 548 <1> .display_pop_ZR: 549 00009BBE 747B <1> jz .display_pop 550 <1> 551 00009BC0 3806[EB0A] <1> cmp byte [ linecounter ], al 552 00009BC4 7268 <1> jb .notyet ; not yet reached --> 553 00009BC6 F606[D000]08 <1> testopt [internalflags], pagedcommand ; active ? 554 00009BCB 7506 <1> jnz .prompt ; yes, prompt --> 555 00009BCD FE0E[EB0A] <1> dec byte [ linecounter ] ; keep count, but don't prompt til next LF 556 00009BD1 EB5B <1> jmp short .notyet 557 <1> 558 <1> .prompt: 559 00009BD3 58 <1> pop ax ; ax = length of string, cx = length of string remaining 560 00009BD4 29C8 <1> sub ax, cx ; ax = length of string til LF 561 00009BD6 91 <1> xchg ax, cx ; cx = til LF incl., ax = behind LF 562 00009BD7 50 <1> push ax ; new count 563 <1> ; cx = length til LF 564 <1> ; es:dx-> start of part til LF 565 00009BD8 E86200 <1> call .display ; display part of message which fits on screen 566 00009BDB 59 <1> pop cx 567 00009BDC 51 <1> push cx ; update cx from variable 568 00009BDD 89FA <1> mov dx, di ; dx-> start of next part 569 00009BDF 800E[D200]10 <1> setopt [internalflags], promptwaiting ; mark as prompting necessary 570 00009BE4 EBA2 <1> jmp short .looplf ; now check whether anything follows at all 571 <1> ; This is the magic to suppress unnecessary prompts as 572 <1> ; were displayed previously. Now, we'll set this flag 573 <1> ; which effectively displays the prompt before (!) any 574 <1> ; other output is done. Previously, the prompt would be 575 <1> ; displayed right here. The only case where behaviour 576 <1> ; changed is when no more output occurs until the flag 577 <1> ; is reset elsewhere - ie. if getline prompts anyway. 578 <1> 579 <1> .promptnow: 580 00009BE6 52 <1> push dx 581 00009BE7 51 <1> push cx 582 00009BE8 C606[EB0A]00 <1> mov byte [ linecounter ], 0 ; prompting, so reset the line counter 583 00009BED 8026[D200]EF <1> clropt [internalflags], promptwaiting 584 00009BF2 06 <1> push es 585 00009BF3 16 <1> push ss 586 00009BF4 07 <1> pop es 587 00009BF5 BA[AB12] <1> mov dx, msg.more ; es:dx -> message 588 00009BF8 B90600 <1> mov cx, msg.more_size 589 00009BFB E83F00 <1> call .display ; print string (avoiding a recursion) 590 00009BFE 07 <1> pop es 591 <1> 592 00009BFF 800E[D800]10 <1> setopt [internalflags3], dif3_input_terminal_override 593 <1> ; This option is a hack for the sole use of 594 <1> ; demo scripts that only want the user to press 595 <1> ; a key for paging. 596 00009C04 F606[A100]01 <1> testopt [options], nondospaging 597 00009C09 7405 <1> jz .getc 598 00009C0B E82104 <1> call getc.raw ; get a character from BIOS 599 00009C0E EB03 <1> jmp short .dispover 600 <1> .getc: 601 00009C10 E80304 <1> call getc ; get a character 602 <1> .dispover: 603 00009C13 8026[D800]EF <1> clropt [internalflags3], dif3_input_terminal_override 604 00009C18 3C03 <1> cmp al, 3 ; is it Ctrl+C ? 605 00009C1A 743B <1> je .ctrlc ; yes, handle that --> 606 00009C1C E856A7 <1> call handle_serial_flags_ctrl_c 607 00009C1F 06 <1> push es 608 00009C20 16 <1> push ss 609 00009C21 07 <1> pop es 610 00009C22 BA[B112] <1> mov dx, msg.more_over ; es:dx -> message 611 00009C25 B90800 <1> mov cx, msg.more_over_size 612 00009C28 E81200 <1> call .display ; overwrite the prompt (avoiding a recursion) 613 00009C2B 07 <1> pop es 614 00009C2C 59 <1> pop cx 615 00009C2D 5A <1> pop dx 616 <1> 617 <1> .notyet: 618 00009C2E B00A <1> mov al, 10 619 00009C30 F2AE <1> repne scasb ; search LF 620 00009C32 7507 <1> jne .display_pop ; none --> 621 <1> 622 00009C34 FE06[EB0A] <1> inc byte [ linecounter ] ; record how many LFs will be displayed 623 00009C38 E94DFF <1> jmp .looplf ; search for next LF --> 624 <1> 625 <1> .display_pop: 626 00009C3B 59 <1> pop cx 627 00009C3C 5F <1> pop di 628 <1> .display: 629 <1> ; Non-paged output code follows. 630 <1> ;d4 call d4message 631 <1> ;d4 asciz "In puts.display first",13,10 632 <1> 633 00009C3D F606[150C]10 <1> testopt [serial_flags], sf_use_serial 634 00009C42 7520 <1> jnz .notdos 635 00009C44 E81BE9 <1> call InDOS_or_BIOS_output 636 00009C47 751B <1> jnz .notdos 637 <1> ; es:dx -> message 638 00009C49 BB0100 <1> mov bx, 1 ; standard output 639 00009C4C B440 <1> mov ah, 40h ; write to file 640 00009C4E E306 <1> jcxz @F 641 <1> %if _PM 642 <1> d5 push di 643 <1> push es ; point ds of _doscall* to msg segment 644 <1> d5 call d4message 645 <1> d5 asciz 13,10,"In puts.display, es=" 646 <1> d5 push es 647 <1> d5 call d4disp_stack_hex 648 <1> d5 call d4message 649 <1> d5 asciz "h",13,10 650 <1> dualcall selector_to_segment ; make sure we give it as a segment 651 <1> ; This assumes that non-access-slice pointers into the 652 <1> ; symbol tables (SYMSTR particularly) can be converted 653 <1> ; into 86M segmented addresses, ie that the selector 654 <1> ; points into 86M-accessible memory. 655 <1> d5 call d4message 656 <1> d5 asciz "In puts.display, on stack =" 657 <1> d5 pop di 658 <1> d5 push di 659 <1> d5 push di 660 <1> d5 call d4disp_stack_hex 661 <1> d5 call d4message 662 <1> d5 asciz "h",13,10 663 <1> dual2call _doscall_return_es_parameter_es_ds 664 <1> add sp, 2 ; discard es returned from call 665 <1> d5 pop di 666 <1> %else 667 00009C50 1E <1> push ds 668 00009C51 06 <1> push es 669 00009C52 1F <1> pop ds ; ds:dx -> message 670 00009C53 CD21 <1> int 21h ; simply call into DOS 671 00009C55 1F <1> pop ds 672 <1> %endif 673 <1> @@: 674 00009C56 C3 <1> retn 675 <1> 676 <1> .ctrlc: 677 00009C57 F606[D700]10 <1> testopt [internalflags2], dif2_in_silence_dump 678 00009C5C 7403 <1> jz @F 679 00009C5E E8EC02 <1> call reset_silent_mode 680 <1> @@: 681 00009C61 E987A7 <1> jmp handle_ctrl_c ; abort currently running command --> 682 <1> ; If handled by DOS, Ctrl+C causes our process to be terminated. 683 <1> ; Because we are self-owned, we re-enter our code at debug22 then. 684 <1> ; debug22 only does some re-initialization of registers before 685 <1> ; entering cmd3. Therefore, instead of aborting we can directly jump 686 <1> ; to cmd3 here. This has the additional benefit of not requiring DOS 687 <1> ; at all, so that no workarounds for InDOS mode and boot loader 688 <1> ; operation are necessary. 689 <1> 690 <1> ; No command should fail spectacularly when being aborted this way, 691 <1> ; because in fact every command calling puts can already be aborted by 692 <1> ; DOS's Ctrl+C checking if DOS is used. This check is really only an 693 <1> ; _additional_ way the commands can be aborted. 694 <1> 695 <1> ; Note that a more complete way to support command abortion would be 696 <1> ; to hook Int1B, and to keep a flag of whether Ctrl+C or Ctrl+Break 697 <1> ; were requested, and to additionally check before or after every I/O 698 <1> ; operation whether Ctrl+C was pressed using non-destructive reads. 699 <1> ; In short, exactly what DOS does. 700 <1> 701 <1> .notdos: 702 00009C64 55 <1> push bp 703 <1> ; Some int 10h functions can corrupt bp, eg 704 <1> ; 06h and 0Eh. Insure to preserve it here. 705 00009C65 56 <1> push si 706 00009C66 F606[D200]01 <1> testopt [internalflags], usecharcounter 707 00009C6B 7505 <1> jnz .dontresetcharcounter 708 00009C6D C606[EA0A]01 <1> mov byte [ charcounter ], 1 709 <1> ; This assumes we always start at the beginning of a line. 710 <1> ; Therefore any call to puts must display at the beginning 711 <1> ; of a line or tab parsing will not work. Only calls to puts 712 <1> ; not containing tab characters may display partial lines. 713 <1> ; (Calls to puts with partial lines and tab characters have 714 <1> ; to set the flag usecharcounter in internalflags.) 715 <1> .dontresetcharcounter: 716 00009C72 E35F <1> jcxz .return 717 00009C74 89D6 <1> mov si, dx 718 <1> .loop: 719 00009C76 26AC <1> es lodsb 720 00009C78 3C09 <1> cmp al, 9 721 00009C7A 750B <1> jne .nottab ; is no tab --> 722 00009C7C A0[EA0A] <1> mov al, byte [ charcounter ] 723 00009C7F 2407 <1> and al, 7 ; at 8 character boundary ? 724 00009C81 B020 <1> mov al, 32 ; (always replaced by blank) 725 00009C83 7402 <1> jz .nottab ; yes, don't use hack --> 726 00009C85 41 <1> inc cx 727 00009C86 4E <1> dec si ; find tab again next lodsb 728 <1> .nottab: 729 00009C87 3C0D <1> cmp al, 13 ; (exact match for CR) 730 00009C89 7505 <1> jne .notcr 731 <1> .cr: 732 00009C8B C606[EA0A]00 <1> mov byte [ charcounter ], 0 ; increased to one before displaying 733 <1> .notcr: 734 <1> %if 0 ; currently we never receive BS here 735 <1> cmp al, 8 736 <1> jne .notbs 737 <1> mov bh, byte [vpage] 738 <1> mov bl, al ; save number of characters per column 739 <1> push cx 740 <1> mov ah, 03h 741 <1> int 10h ; get cursor position dx 742 <1> pop cx 743 <1> dec byte [ charcounter ] ; assume not at start of line 744 <1> mov al, 8 ; changed by Int10 745 <1> or dl, dl 746 <1> jnz .dontcount ; not first column, so display normal --> 747 <1> mov byte [ charcounter ], 1 ; assume at start of screen 748 <1> or dh, dh 749 <1> jz .next ; at start of screen, don't display --> 750 <1> dec dh ; previous line 751 <1> mov dl, bl 752 <1> mov byte [ charcounter ], dl ; really at end of line (one-based counter) 753 <1> dec dl ; last column 754 <1> mov ah, 02h 755 <1> int 10h ; set new cursor position 756 <1> jmp short .next 757 <1> .notbs: 758 <1> %endif 759 00009C90 3C0A <1> cmp al, 10 760 00009C92 7406 <1> je .dontcount_lf ; must not count line feeds! 761 00009C94 FE06[EA0A] <1> inc byte [ charcounter ] 762 <1> %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 763 00009C98 EB05 <1> jmp @F 764 <1> .dontcount_lf: 765 00009C9A 8026[DA00]FD <1> clropt [internalflags3], dif3_int10_highlight 766 <1> @@: 767 <1> %else 768 <1> .dontcount_lf: 769 <1> %endif 770 00009C9F F606[150C]10 <1> testopt [serial_flags], sf_use_serial 771 00009CA4 7405 <1> jz @F 772 <1> 773 00009CA6 E8DE15 <1> call serial_send_char 774 <1> 775 00009CA9 EB26 <1> jmp .next 776 <1> @@: 777 <1> 778 <1> %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT || _CLEAR 779 00009CAB 3C1B <1> cmp al, 27 780 00009CAD 7427 <1> je .try_highlight 781 <1> 782 <1> .nohighlight: 783 <1> %endif 784 00009CAF 8A3E[550B] <1> mov bh, byte [vpage] ; use the current video page 785 <1> 786 <1> %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 787 00009CB3 F606[DA00]02 <1> testopt [internalflags3], dif3_int10_highlight 788 00009CB8 7411 <1> jz @F 789 <1> 790 <1> ; Fix: do not write a musical note for CR. 791 <1> ; This was caused by resetting the flag 792 <1> ; dif3_int10_highlight only for LF. 793 <1> ; Also do not write BEL symbol. 794 <1> ; Hardening: Do not write attributes for 795 <1> ; any nonprintable codepoint. 796 00009CBA 3C20 <1> cmp al, 32 797 00009CBC 720D <1> jb @F 798 00009CBE B409 <1> mov ah, 09h 799 00009CC0 8A1E[0354] <1> mov bl, byte [.attribute] 800 00009CC4 51 <1> push cx 801 00009CC5 B90100 <1> mov cx, 1 802 00009CC8 CD10 <1> int 10h 803 00009CCA 59 <1> pop cx 804 <1> @@: 805 <1> %endif 806 <1> 807 00009CCB B307 <1> mov bl, 7 808 00009CCD B40E <1> mov ah, 0Eh 809 00009CCF CD10 <1> int 10h 810 <1> .next: 811 00009CD1 E2A3 <1> loop .loop 812 <1> .return: 813 00009CD3 5E <1> pop si 814 00009CD4 5D <1> pop bp 815 00009CD5 C3 <1> retn 816 <1> 817 <1> 818 <1> %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT || _CLEAR 819 <1> .try_highlight: 820 00009CD6 F606[AA00]02 <1> testopt [options3], opt3_r_highlight_dumb 821 00009CDB 75D2 <1> jnz .nohighlight 822 00009CDD 83F902 <1> cmp cx, 2 823 00009CE0 76CD <1> jbe .nohighlight 824 00009CE2 26803C5B <1> cmp byte [es:si], '[' 825 00009CE6 75C7 <1> jne .nohighlight 826 <1> %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 827 00009CE8 26807C016D <1> cmp byte [es:si + 1], 'm' 828 00009CED 742F <1> je .highlight_reset 829 <1> %endif 830 00009CEF 83F903 <1> cmp cx, 3 831 00009CF2 74BB <1> je .nohighlight 832 <1> %if _CLEAR 833 00009CF4 26807C0132 <1> cmp byte [es:si + 1], '2' 834 00009CF9 7507 <1> jne @F 835 00009CFB 26807C024A <1> cmp byte [es:si + 2], 'J' 836 00009D00 7458 <1> je .clear 837 <1> @@: 838 <1> %endif 839 <1> %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 840 00009D02 26807C0137 <1> cmp byte [es:si + 1], '7' 841 00009D07 75A6 <1> jne .nohighlight 842 00009D09 26807C026D <1> cmp byte [es:si + 2], 'm' 843 00009D0E 759F <1> jne .nohighlight 844 <1> .highlight_set: 845 00009D10 E87D00 <1> call check_dumb_mode 846 00009D13 749A <1> jz .nohighlight 847 <1> ; This test fails if we are at the very left of 848 <1> ; the screen or in dosemu -dumb mode. So don't 849 <1> ; use highlighting at the beginning of a line! 850 00009D15 800E[DA00]02 <1> setopt [internalflags3], dif3_int10_highlight 851 00009D1A 49 <1> dec cx 852 00009D1B 46 <1> inc si 853 00009D1C EB05 <1> jmp @F 854 <1> 855 <1> .highlight_reset: 856 00009D1E E86F00 <1> call check_dumb_mode 857 00009D21 748C <1> jz .nohighlight 858 <1> ; Refer to above comment. 859 <1> @@: 860 00009D23 800E[DA00]02 <1> setopt [internalflags3], dif3_int10_highlight 861 00009D28 E81800 <1> call .getattrib 862 00009D2B 88E0 <1> mov al, ah 863 00009D2D 257788 <1> and ax, 8877h 864 00009D30 D0C0 <1> rol al, 1 865 00009D32 D0C0 <1> rol al, 1 866 00009D34 D0C0 <1> rol al, 1 867 00009D36 D0C0 <1> rol al, 1 868 00009D38 08E0 <1> or al, ah 869 00009D3A A2[0354] <1> mov byte [.attribute], al 870 <1> %endif 871 <1> 872 <1> .dec_2: 873 00009D3D 49 <1> dec cx 874 00009D3E 49 <1> dec cx 875 00009D3F 46 <1> inc si 876 00009D40 46 <1> inc si 877 00009D41 EB8E <1> jmp .next 878 <1> 879 <1> .getattrib: 880 00009D43 FECA <1> dec dl 881 00009D45 B402 <1> mov ah, 02h 882 00009D47 8A3E[550B] <1> mov bh, byte [vpage] 883 00009D4B CD10 <1> int 10h ; set cursor position 884 00009D4D B408 <1> mov ah, 08h 885 00009D4F CD10 <1> int 10h ; read attribute to ah 886 00009D51 50 <1> push ax 887 00009D52 FEC2 <1> inc dl 888 00009D54 B402 <1> mov ah, 02h 889 00009D56 CD10 <1> int 10h ; set cursor position 890 00009D58 58 <1> pop ax 891 00009D59 C3 <1> retn 892 <1> 893 <1> %if _REGSHIGHLIGHT || _GETLINEHIGHLIGHT || _DHIGHLIGHT 894 <1> usesection lDEBUG_DATA_ENTRY 895 00005403 00 <1> .attribute: db 0 896 <1> usesection lDEBUG_CODE 897 <1> %endif 898 <1> 899 <1> %if _CLEAR 900 <1> .clear: 901 00009D5A E83300 <1> call check_dumb_mode 902 00009D5D 7503E94DFF <1> jz .nohighlight 903 <1> 904 00009D62 E8DEFF <1> call .getattrib 905 00009D65 93 <1> xchg bx, ax ; bh = attrib 906 <1> 907 00009D66 06 <1> push es 908 00009D67 B84000 <1> mov ax, 40h ; bi-modal seg/sel 909 00009D6A 8EC0 <1> mov es, ax 910 00009D6C 51 <1> push cx 911 <1> 912 <1> ; copied from RxANSI 913 00009D6D 31C9 <1> xor cx, cx 914 00009D6F 268A164A00 <1> mov dl, [es:4Ah] ; number of rows 915 00009D74 FECA <1> dec dl 916 00009D76 268A368400 <1> mov dh, [es:84h] ; number of columns 917 00009D7B B80006 <1> mov ax, 0600h 918 00009D7E CD10 <1> int 10h ; Clear screen (bh = attrib) 919 00009D80 31D2 <1> xor dx, dx ; Reset cursor to 0/0 920 00009D82 8A3E[550B] <1> mov bh, byte [vpage] 921 00009D86 B402 <1> mov ah, 02h 922 00009D88 CD10 <1> int 10h ; Set cursor 923 <1> 924 00009D8A 59 <1> pop cx 925 00009D8B 07 <1> pop es 926 <1> 927 00009D8C 49 <1> dec cx 928 00009D8D 46 <1> inc si 929 00009D8E EBAD <1> jmp .dec_2 930 <1> %endif 931 <1> 932 <1> ; INP: byte [vpage] 933 <1> ; CHG: bx, dx 934 <1> ; OUT: ZR iff dumb mode 935 <1> ; STT: ds = ss 936 <1> check_dumb_mode: 937 00009D90 50 <1> push ax 938 00009D91 51 <1> push cx 939 00009D92 B403 <1> mov ah, 3 940 00009D94 8A3E[550B] <1> mov bh, byte [vpage] 941 00009D98 31D2 <1> xor dx, dx ; pre-initialise to zero 942 00009D9A CD10 <1> int 10h ; dl = column, dh = row 943 00009D9C 84D2 <1> test dl, dl 944 00009D9E 7416 <1> jz .ret 945 00009DA0 F606[D300]01 <1> testopt [internalflags], runningdosemu 946 00009DA5 740D <1> jz .ret_NZ 947 00009DA7 B85500 <1> mov ax, 55h ; function DOS_HELPER_GET_TERM_TYPE 948 00009DAA CDE6 <1> int 0E6h ; CHG: ax, bx, cx 949 00009DAC 80E401 <1> and ah, 1 ; ax & 100h = dumb mode 950 00009DAF 80F401 <1> xor ah, 1 ; NZ if not dumb mode 951 00009DB2 EB02 <1> jmp .ret 952 <1> .ret_NZ: 953 00009DB4 85E4 <1> test sp, sp ; (NZ) 954 <1> .ret: 955 00009DB6 59 <1> pop cx 956 00009DB7 58 <1> pop ax 957 00009DB8 C3 <1> retn 958 <1> %endif 959 <1> 960 <1> 961 <1> %if _40COLUMNS 962 <1> ; Display line_out, with IOCLINE linebreaks 963 <1> ; 964 <1> ; INP: es:di -> behind last character to display 965 <1> ; es:line_out -> first character to display 966 <1> ; ax = last fragment length 967 <1> ; OUT: ax = last fragment length 968 <1> ; STT: ds = ss = debugger data selector 969 <1> ; CHG: ax, bx, cx, dx 970 <1> putsline_break_line: 971 00009DB9 89F9 <1> mov cx, di 972 00009DBB BA[B40A] <1> mov dx, line_out 973 00009DBE 29D1 <1> sub cx, dx 974 <1> 975 <1> ; Display message, with IOCLINE linebreaks 976 <1> ; 977 <1> ; INP: es:dx -> message to display 978 <1> ; cx = length of message 979 <1> ; ax = last fragment length 980 <1> ; OUT: ax = last fragment length 981 <1> ; STT: ds = ss = debugger data selector 982 <1> ; CHG: ax, bx, cx, dx 983 <1> puts_break_line: 984 00009DC0 01C8 <1> add ax, cx ; how much in this line if fits 985 00009DC2 8B1E[220C] <1> mov bx, word [io_columns_getline] ; = how many columns to fill 986 00009DC6 85DB <1> test bx, bx ; disabled ? 987 00009DC8 7415 <1> jz .no_split ; yes, use normal handler --> 988 00009DCA 39D8 <1> cmp ax, bx ; total <= columns ? 989 00009DCC 7611 <1> jbe .no_input_split ; yes, back to normal code --> 990 00009DCE 56 <1> push si 991 00009DCF 89CE <1> mov si, cx ; si = length input 992 00009DD1 29C8 <1> sub ax, cx ; restore last fragment length 993 00009DD3 89D9 <1> mov cx, bx 994 00009DD5 29C1 <1> sub cx, ax ; = how much fits in first line 995 00009DD7 29CE <1> sub si, cx ; = how much left, cannot carry 996 <1> 997 <1> ; INP: si = how much left for subsequent iterations 998 <1> ; es:dx -> data to display 999 <1> ; bx = columns to fill 1000 <1> ; cx = length for this iteration 1001 <1> ; OUT: cx = length of last write (0 if empty, no linebreak) 1002 <1> ; CHG: si, dx 1003 00009DD9 E81500 <1> call puts_partial_write 1004 00009DDC 91 <1> xchg ax, cx ; ax = last fragment length 1005 00009DDD 5E <1> pop si 1006 00009DDE C3 <1> retn 1007 <1> 1008 <1> .no_split: 1009 <1> .no_input_split: 1010 00009DDF 50 <1> push ax 1011 00009DE0 E8EBFC <1> call puts 1012 00009DE3 58 <1> pop ax 1013 <1> puts_break_line_more.retn: 1014 00009DE4 C3 <1> retn 1015 <1> 1016 <1> 1017 <1> ; Display a linebreak if last fragment length is zero 1018 <1> ; and there is more to display. This function is only 1019 <1> ; to be called if there is more output to display! 1020 <1> ; 1021 <1> ; INP: ax = last fragment length (no action if nonzero) 1022 <1> ; OUT: line break displayed if ax was zero 1023 <1> ; CHG: dx 1024 <1> puts_break_line_more: 1025 00009DE5 85C0 <1> test ax, ax 1026 00009DE7 75FB <1> jnz .retn 1027 00009DE9 BA[E732] <1> mov dx, crlf 1028 00009DEC E9C401 <1> jmp putsz 1029 <1> 1030 <1> 1031 <1> puts_partial_write.loop: 1032 00009DEF 89D9 <1> mov cx, bx 1033 <1> 1034 <1> ; INP: si = how much left for subsequent iterations 1035 <1> ; es:dx -> data to display 1036 <1> ; bx = columns to fill 1037 <1> ; cx = length for this iteration 1038 <1> ; OUT: cx = length of last write (0 if empty, no linebreak) 1039 <1> ; CHG: si, dx 1040 <1> puts_partial_write: 1041 00009DF1 53 <1> push bx 1042 00009DF2 51 <1> push cx 1043 00009DF3 52 <1> push dx 1044 00009DF4 E8D7FC <1> call puts ; display partial 1045 00009DF7 85F6 <1> test si, si ; more to go ? 1046 00009DF9 7406 <1> jz @F ; no --> 1047 00009DFB BA[E732] <1> mov dx, crlf 1048 00009DFE E8B201 <1> call putsz ; put linebreak 1049 <1> @@: 1050 00009E01 5A <1> pop dx 1051 00009E02 59 <1> pop cx 1052 00009E03 5B <1> pop bx 1053 00009E04 01CA <1> add dx, cx ; advance pointer 1054 00009E06 29DE <1> sub si, bx ; subtract from counter 1055 00009E08 73E5 <1> jnc .loop ; still above zero, loop --> 1056 00009E0A 01DE <1> add si, bx ; restore prior si value 1057 00009E0C 89F1 <1> mov cx, si 1058 00009E0E 53 <1> push bx 1059 00009E0F 51 <1> push cx 1060 00009E10 E8BBFC <1> call puts ; display last part (possibly empty) 1061 00009E13 59 <1> pop cx ; return cx 1062 00009E14 5B <1> pop bx 1063 00009E15 C3 <1> retn 1064 <1> %else 1065 <1> putsline_break_line: equ putsline 1066 <1> puts_break_line: equ puts 1067 <1> puts_break_line_more: equ dmycmd 1068 <1> %endif 1069 <1> 1070 <1> 1071 <1> ; INP: es:dx -> message to display 1072 <1> ; cx = length of message 1073 <1> ; STT: ds = ss = debugger data selector 1074 <1> ; CHG: ax, bx, cx, dx 1075 <1> puts_silence: 1076 00009E16 56 <1> push si 1077 00009E17 57 <1> push di 1078 <1> 1079 <1> .try_again: 1080 00009E18 89D6 <1> mov si, dx ; es:si -> message 1081 00009E1A 8B3E[4C0A] <1> mov di, word [auxbuff_behind_last_silent] 1082 <1> ; (auxbuff):di -> next buffer (if it fits) 1083 <1> %if _AUXBUFFSIZE == _AUXBUFFMAXSIZE 1084 <1> mov ax, _AUXBUFFSIZE - 1 1085 <1> %else 1086 00009E1E A1[520A] <1> mov ax, word [auxbuff_current_size] 1087 00009E21 48 <1> dec ax 1088 <1> %endif 1089 00009E22 29F8 <1> sub ax, di ; number of bytes left free 1090 <1> ; (+ 1 byte terminator) 1091 00009E24 7204 <1> jc .delete 1092 00009E26 39C8 <1> cmp ax, cx ; fits ? 1093 00009E28 730B <1> jae .simple ; yes --> 1094 <1> 1095 <1> .delete: 1096 00009E2A 06 <1> push es 1097 00009E2B 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] 1098 00009E2F E81600 <1> call silence_delete_one_string 1099 00009E32 07 <1> pop es 1100 00009E33 EBE3 <1> jmp .try_again 1101 <1> 1102 <1> .simple: 1103 00009E35 1E <1> push ds 1104 00009E36 06 <1> push es 1105 00009E37 06 <1> push es 1106 00009E38 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] 1107 <1> ; es:di -> next buffer 1108 00009E3C 1F <1> pop ds ; ds:si -> message 1109 00009E3D F3A4 <1> rep movsb ; copy over 1110 00009E3F 07 <1> pop es 1111 00009E40 1F <1> pop ds 1112 00009E41 893E[4C0A] <1> mov word [auxbuff_behind_last_silent], di 1113 <1> ; update pointer 1114 00009E45 5F <1> pop di 1115 00009E46 5E <1> pop si 1116 00009E47 C3 <1> retn 1117 <1> 1118 <1> 1119 <1> ; INP: es => auxbuff 1120 <1> ; ds = ss 1121 <1> ; [auxbuff_behind_last_silent] -> behind last silent 1122 <1> ; OUT: [auxbuff_behind_last_silent] updated 1123 <1> ; auxbuff updated (deleted one of the dump strings, 1124 <1> ; moved forwards in the buffer the remainder) 1125 <1> ; if error, aborts command by jumping to cmd3 1126 <1> ; CHG: ax, di, si 1127 <1> silence_delete_one_string: 1128 00009E48 E81900 <1> call .internal ; call internal implementation 1129 00009E4B 7349 <1> jnc .retn ; no error ? --> 1130 <1> .error: ; else: error, abort command 1131 00009E4D 16 <1> push ss 1132 00009E4E 1F <1> pop ds 1133 00009E4F 16 <1> push ss 1134 00009E50 07 <1> pop es 1135 00009E51 8026[D300]DF <1> clropt [internalflags], tt_silence 1136 <1> %if _RH 1137 00009E56 C606[0701]FF <1> mov byte [skip_rh], 0FFh 1138 <1> %endif 1139 00009E5B BA[9521] <1> mov dx, msg.silent_error 1140 00009E5E E85201 <1> call putsz 1141 00009E61 E99C61 <1> jmp cmd3 1142 <1> 1143 <1> 1144 <1> ; INP: as for silence_delete_one_string 1145 <1> ; OUT: as for silence_delete_one_string, but: 1146 <1> ; CY if error (no more space) 1147 <1> ; NC if success 1148 <1> ; CHG: ax, di, si 1149 <1> ; STT: ds = ss 1150 <1> .internal: 1151 00009E64 51 <1> push cx 1152 00009E65 8B0E[4C0A] <1> mov cx, [auxbuff_behind_last_silent] 1153 <1> ; -> next buffer position 1154 <1> %if _PM 1155 <1> mov di, word [auxbuff_switchbuffer_size] 1156 <1> sub cx, di 1157 <1> %else 1158 00009E69 31FF <1> xor di, di 1159 <1> %endif 1160 00009E6B B000 <1> mov al, 0 1161 00009E6D 3C01 <1> cmp al, 1 ; initialise to NZ (if cx is zero) 1162 00009E6F F2AE <1> repne scasb 1163 00009E71 F9 <1> stc 1164 00009E72 7522 <1> jne .retn ; error, no NUL found in data (CY) 1165 <1> ; es:di -> behind first NUL 1166 <1> 1167 00009E74 89FE <1> mov si, di ; es:si -> next message 1168 <1> %if _RH 1169 00009E76 89F8 <1> mov ax, di 1170 <1> %endif 1171 <1> %if _PM 1172 <1> mov di, word [auxbuff_switchbuffer_size] 1173 <1> %if _RH 1174 <1> sub ax, di ; -> next minus -> first, length of first 1175 <1> %endif 1176 <1> %else 1177 00009E78 31FF <1> xor di, di 1178 <1> %endif 1179 <1> %if _RH 1180 00009E7A 2906[4E0A] <1> sub word [auxbuff_start_silent], ax 1181 <1> %if _PM 1182 <1> jb .reset_start 1183 <1> cmp word [auxbuff_start_silent], di 1184 <1> %endif 1185 00009E7E 7304 <1> jae @F 1186 <1> .reset_start: 1187 00009E80 893E[4E0A] <1> mov word [auxbuff_start_silent], di 1188 <1> @@: 1189 <1> %endif 1190 00009E84 8B0E[4C0A] <1> mov cx, word [auxbuff_behind_last_silent] 1191 00009E88 06 <1> push es 1192 00009E89 1F <1> pop ds ; ds:si -> next message 1193 00009E8A 29F1 <1> sub cx, si ; remaining buffer 1194 00009E8C F3A4 <1> rep movsb ; move to start of silent buffer 1195 00009E8E 16 <1> push ss 1196 00009E8F 1F <1> pop ds 1197 00009E90 893E[4C0A] <1> mov word [auxbuff_behind_last_silent], di 1198 00009E94 59 <1> pop cx 1199 00009E95 F8 <1> clc ; (NC) 1200 <1> .retn: 1201 00009E96 C3 <1> retn 1202 <1> 1203 <1> 1204 <1> ; After having used puts_silence, this dumps all data 1205 <1> ; remaining in the silent buffer in auxbuff. 1206 <1> ; If word [tt_silent_mode_number] is set, only that many 1207 <1> ; data strings (zero-terminated) are dumped, from the end 1208 <1> ; of the buffer. 1209 <1> ; 1210 <1> ; CHG: ax, bx, cx, dx, si, di, es 1211 <1> ; STT: ds = ss = debugger data selector 1212 <1> ; sets es to ss 1213 <1> silence_dump: 1214 00009E97 F606[D300]10 <1> testopt [internalflags], tt_silent_mode ; is in use ? 1215 00009E9C 7501 <1> jnz @F ; yes --> 1216 00009E9E C3 <1> retn ; no. simple 1217 <1> 1218 <1> @@: 1219 <1> %if _RH 1220 00009E9F C606[D30B]00 <1> mov byte [rh_display_with_count], 0 1221 <1> .rh.all: 1222 00009EA4 B8FFFF <1> mov ax, -1 1223 <1> .rh: 1224 00009EA7 A3[500A] <1> mov word [auxbuff_amount_silent], ax 1225 <1> %endif 1226 00009EAA 8026[D300]DF <1> clropt [internalflags], tt_silence 1227 00009EAF 800E[D700]10 <1> setopt [internalflags2], dif2_in_silence_dump 1228 <1> 1229 00009EB4 F606[A900]01 <1> testopt [options3], opt3_silence_paging_set 1230 00009EB9 7413 <1> jz @F 1231 00009EBB F606[A900]02 <1> testopt [options3], opt3_silence_paging_on 1232 00009EC0 7407 <1> jz .turn_paging_off 1233 <1> 1234 <1> .turn_paging_on: 1235 00009EC2 800E[D000]08 <1> setopt [internalflags], pagedcommand 1236 00009EC7 EB05 <1> jmp @F 1237 <1> 1238 <1> .turn_paging_off: 1239 00009EC9 8026[D000]F7 <1> clropt [internalflags], pagedcommand 1240 <1> @@: 1241 <1> 1242 00009ECE E8BA00 <1> call silence_get_start 1243 00009ED1 741E <1> jz .no_number_given 1244 <1> 1245 00009ED3 8B16[560A] <1> mov dx, word [tt_silent_mode_number] 1246 00009ED7 85D2 <1> test dx, dx 1247 00009ED9 7416 <1> jz .no_number_given 1248 <1> 1249 00009EDB E8BC00 <1> call silence_count_zeroes 1250 <1> 1251 <1> %if _RH 1252 00009EDE 8B3E[4E0A] <1> mov di, word [auxbuff_start_silent] 1253 <1> ; reset to -> silent buffered data 1254 <1> %endif 1255 00009EE2 29D3 <1> sub bx, dx ; number of dumps - requested number 1256 <1> ; = excess number of dumps 1257 00009EE4 760B <1> jbe .no_number_given 1258 <1> 1259 00009EE6 89D9 <1> mov cx, bx ; use excess number as loop counter 1260 <1> @@: 1261 <1> %if _RH 1262 00009EE8 51 <1> push cx 1263 00009EE9 B9FFFF <1> mov cx, -1 1264 <1> ; mov al, 0 1265 00009EEC F2AE <1> repne scasb 1266 00009EEE 59 <1> pop cx 1267 <1> %else 1268 <1> call silence_delete_one_string 1269 <1> ; delete one string 1270 <1> %endif 1271 00009EEF E2F7 <1> loop @B ; loop for however many to delete --> 1272 <1> 1273 <1> .no_number_given: 1274 <1> %if _RH 1275 00009EF1 E86400 <1> call .rh_display_count 1276 <1> %endif 1277 <1> 1278 <1> %ifn _RH 1279 <1> %if _PM 1280 <1> mov di, word [auxbuff_switchbuffer_size] 1281 <1> %else 1282 <1> xor di, di 1283 <1> %endif 1284 <1> %endif 1285 <1> ; es:di -> silent buffer 1286 <1> .loop_line: 1287 00009EF4 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] 1288 00009EF8 8B0E[4C0A] <1> mov cx, word [auxbuff_behind_last_silent] 1289 00009EFC 29F9 <1> sub cx, di ; any more data ? 1290 00009EFE 744B <1> jz .return ; no, return --> 1291 00009F00 B000 <1> mov al, 0 1292 00009F02 49 <1> dec cx ; (in case of branching for next conditional) 1293 00009F03 AE <1> scasb ; starts with a NUL byte ? 1294 00009F04 7404 <1> je @F ; yes, skipped --> 1295 00009F06 41 <1> inc cx ; (restore cx to original value) 1296 00009F07 4F <1> dec di ; no, decrement 1297 <1> %if _RH 1298 00009F08 EB05 <1> jmp @FF 1299 <1> @@: 1300 00009F0A E303 <1> jcxz @F ; anything follows the NUL ? 1301 00009F0C E84900 <1> call .rh_display_count 1302 <1> %endif 1303 <1> @@: 1304 00009F0F 89FE <1> mov si, di ; es:si -> start of string 1305 <1> 1306 00009F11 81F90001 <1> cmp cx, 256 ; cx > 256 ? 1307 00009F15 7603 <1> jbe @F ; no --> 1308 00009F17 B90001 <1> mov cx, 256 ; limit to 256 bytes per string 1309 <1> ; (line_out is 264 bytes) 1310 <1> @@: 1311 00009F1A E32F <1> jcxz .return ; (if single byte that was NUL remaining -->) 1312 00009F1C 89CB <1> mov bx, cx ; search string length 1313 00009F1E B000 <1> mov al, 0 1314 00009F20 F2AE <1> repne scasb ; scan for NUL bytes 1315 00009F22 7505 <1> jne @F ; (if none found: cx = 0) 1316 <1> ; (if any found: cx = remaining length) 1317 00009F24 41 <1> inc cx ; cx = remaining length + 1 (do not output NUL) 1318 <1> %if _RH 1319 00009F25 FF0E[500A] <1> dec word [auxbuff_amount_silent] 1320 <1> %endif 1321 <1> @@: 1322 00009F29 29CB <1> sub bx, cx ; search length - remaining = found length 1323 00009F2B 89D9 <1> mov cx, bx ; how much to show 1324 00009F2D 06 <1> push es 1325 00009F2E 1F <1> pop ds ; ds => auxbuff (ds:si -> start of string) 1326 00009F2F 16 <1> push ss 1327 00009F30 07 <1> pop es ; es => line_out 1328 00009F31 BF[B40A] <1> mov di, line_out ; es:di -> line_out 1329 00009F34 51 <1> push cx 1330 00009F35 F3A4 <1> rep movsb ; copy over to line_out 1331 00009F37 59 <1> pop cx ; cx = message length 1332 <1> 1333 00009F38 16 <1> push ss 1334 00009F39 1F <1> pop ds ; reset seg regs to ss 1335 00009F3A BA[B40A] <1> mov dx, line_out ; dx -> message, cx = length 1336 00009F3D 56 <1> push si 1337 00009F3E E8ABFB <1> call puts.no_rh ; print out 1338 00009F41 5F <1> pop di ; -> next silent message 1339 <1> %if _RH 1340 00009F42 833E[500A]00 <1> cmp word [auxbuff_amount_silent], 0 1341 00009F47 7402 <1> je .return 1342 <1> %endif 1343 00009F49 EBA9 <1> jmp .loop_line 1344 <1> 1345 <1> .return: 1346 00009F4B 16 <1> push ss 1347 00009F4C 07 <1> pop es 1348 <1> 1349 <1> reset_silent_mode: equ $ 1350 00009F4D 8026[D300]CF <1> clropt [internalflags], tt_silent_mode | tt_silence 1351 00009F52 8026[D700]EF <1> clropt [internalflags2], dif2_in_silence_dump 1352 00009F57 C3 <1> retn 1353 <1> 1354 <1> 1355 <1> %if _RH 1356 <1> .rh_display_count: 1357 00009F58 D006[D30B] <1> rol byte [rh_display_with_count], 1 1358 00009F5C 57 <1> push di 1359 00009F5D 51 <1> push cx 1360 00009F5E 06 <1> push es 1361 00009F5F 7326 <1> jnc @F 1362 00009F61 A1[D40B] <1> mov ax, word [rh_count_number] 1363 00009F64 83F8FF <1> cmp ax, -1 1364 00009F67 741E <1> je @F 1365 00009F69 FF0E[D40B] <1> dec word [rh_count_number] 1366 00009F6D 16 <1> push ss 1367 00009F6E 07 <1> pop es 1368 00009F6F BF[B40A] <1> mov di, line_out 1369 00009F72 BE[741E] <1> mov si, msg.rh_step.1 1370 00009F75 E82699 <1> call copy_single_counted_string 1371 00009F78 E80FFB <1> call hexword 1372 00009F7B BE[7D1E] <1> mov si, msg.rh_step.2 1373 00009F7E E81D99 <1> call copy_single_counted_string 1374 00009F81 E88EFA <1> call decword 1375 00009F84 E83CFB <1> call putsline_crlf 1376 <1> @@: 1377 00009F87 07 <1> pop es 1378 00009F88 59 <1> pop cx 1379 00009F89 5F <1> pop di 1380 00009F8A C3 <1> retn 1381 <1> %endif 1382 <1> 1383 <1> 1384 <1> ; STT: ss = ds 1385 <1> ; OUT: es => auxbuff 1386 <1> ; es:di -> start of silent data 1387 <1> ; cx = length of silent data 1388 <1> ; ZR if cx == 0 1389 <1> silence_get_start: section_of_function 1390 <1> %if _RH 1391 00009F8B 8B3E[4E0A] <1> mov di, word [auxbuff_start_silent] 1392 <1> %elif _PM 1393 <1> mov di, word [auxbuff_switchbuffer_size] 1394 <1> %else 1395 <1> xor di, di 1396 <1> %endif 1397 <1> 1398 <1> ; INP: auxbuff:di -> start of data 1399 <1> .have_di: section_of_function silence_get_start 1400 00009F8F 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] 1401 00009F93 8B0E[4C0A] <1> mov cx, word [auxbuff_behind_last_silent] 1402 00009F97 29F9 <1> sub cx, di 1403 00009F99 C3 <1> retn 1404 <1> 1405 <1> 1406 <1> ; STT: ss = ds 1407 <1> ; OUT: es => auxbuff 1408 <1> ; bx = number of zeroes in silent data 1409 <1> ; cx = 0 1410 <1> ; CHG: ax, di 1411 <1> silence_count_zeroes: section_of_function 1412 00009F9A 31DB <1> xor bx, bx ; counter of zeros 1413 <1> @@: 1414 00009F9C 43 <1> inc bx ; count zeros (NZ) 1415 00009F9D B000 <1> mov al, 0 1416 <1> ; jcxz @F ; no more data --> 1417 <1> ; If cx == 0 then the inc bx left bx <> 0 so NZ. 1418 <1> ; Therefore the repne scasb will run zero iterations 1419 <1> ; and leave NZ, causing the next conditional jump to 1420 <1> ; not branch back into the loop. 1421 00009F9F F2AE <1> repne scasb ; another zero ? 1422 00009FA1 74F9 <1> je @B ; yes, count and search for next --> 1423 <1> ; no, done 1424 <1> @@: 1425 00009FA3 4B <1> dec bx ; drop bias 1426 00009FA4 C3 <1> retn 1427 <1> 1428 <1> 1429 <1> %if _MESSAGESEGMENT && _PM 1430 <1> get_messagesegsel: 1431 <1> call ispm 1432 <1> jnz .86m 1433 <1> mov ds, word [ss:messagesel] 1434 <1> retn 1435 <1> 1436 <1> .86m: 1437 <1> mov ds, word [ss:messageseg] 1438 <1> retn 1439 <1> %endif 1440 <1> 1441 <1> 1442 <1> ; INP: message segment:(dx & ~1) -> message 1443 <1> ; (dx & 1) if message is uncompressed (ASCIZ), 1444 <1> ; however the low bit must be masked off 1445 <1> ; else the message is compressed 1446 <1> ; CHG: dx low bit 1447 <1> ; OUT: message displayed 1448 <1> ; REM: The protocol implies that all messages passed 1449 <1> ; to this function must start on a word boundary. 1450 <1> putsz_exthelp: 1451 <1> %if _HELP_COMPRESSED 1452 <1> test dl, 1 1453 <1> jnz .uncompressed 1454 <1> 1455 <1> .compressed: 1456 <1> push ds 1457 <1> push ax 1458 <1> push bx 1459 <1> push cx 1460 <1> push dx 1461 <1> push es 1462 <1> push di 1463 <1> push si 1464 <1> 1465 <1> %if _TEST_HELP_FILE 1466 <1> mov word [ss:hshrink_get_file_byte], hshrink_memory_read 1467 <1> ; insure correct source 1468 <1> %endif 1469 <1> xchg si, dx ; si -> message compressed length 1470 <1> %if _MESSAGESEGMENT 1471 <1> %if _PM 1472 <1> call get_messagesegsel ; ds => message segment 1473 <1> %else 1474 <1> mov ds, word [ss:messageseg] ; ds => message segment 1475 <1> %endif 1476 <1> lodsw ; = length 1477 <1> %else 1478 <1> ss lodsw ; = length 1479 <1> %endif 1480 <1> xchg cx, ax ; = length 1481 <1> mov word [ss:hshrink_memory_source.offset], si 1482 <1> ; save offset of data 1483 <1> push ss 1484 <1> pop es 1485 <1> mov di, hshrink_message_buffer ; es:di -> destination 1486 <1> mov si, hshrink_message_buffer.end 1487 <1> ; si -> behind destination end 1488 <1> call depack ; try depacking 1489 <1> ; ds reset before calling puts 1490 <1> push ss 1491 <1> pop es 1492 <1> mov dx, msg.hshrink_error ; if error 1493 <1> jc @F ; skip next instruction if error --> 1494 <1> mov dx, hshrink_message_buffer ; display our decompressed string 1495 <1> @@: 1496 <1> pop si 1497 <1> jmp putsz.saved 1498 <1> 1499 <1> .uncompressed: 1500 <1> and dl, ~1 1501 <1> ; fall through to putsz_messagesegsel 1502 <1> 1503 <1> %endif 1504 <1> 1505 <1> putsz_messagesegsel: 1506 00009FA5 1E <1> push ds 1507 <1> %if _MESSAGESEGMENT 1508 <1> %if _PM 1509 <1> call get_messagesegsel 1510 <1> %else 1511 00009FA6 368E1E[1201] <1> mov ds, word [ss:messageseg] 1512 <1> %endif 1513 <1> %else 1514 <1> push ss 1515 <1> pop ds 1516 <1> %endif 1517 00009FAB EB07 <1> jmp @F 1518 <1> 1519 <1> 1520 <1> putsz_error: section_of_function 1521 00009FAD 36800E[D900]20 <1> setopt [ss:internalflags3], dif3_unquiet_error 1522 <1> 1523 <1> ; Display ASCIZ message 1524 <1> ; 1525 <1> ; INP: ds:dx -> ASCIZ message to display 1526 <1> ; CHG: - 1527 <1> ; STT: ds, es don't care 1528 <1> putsz: section_of_function 1529 00009FB3 1E <1> push ds 1530 <1> @@: 1531 00009FB4 50 <1> push ax 1532 00009FB5 53 <1> push bx 1533 00009FB6 51 <1> push cx 1534 00009FB7 52 <1> push dx 1535 00009FB8 06 <1> push es 1536 00009FB9 1E <1> push ds 1537 00009FBA 07 <1> pop es 1538 00009FBB 57 <1> push di 1539 <1> .saved: 1540 00009FBC 89D7 <1> mov di, dx ; es:di-> string 1541 00009FBE 30C0 <1> xor al, al 1542 00009FC0 B9FFFF <1> mov cx, -1 1543 00009FC3 F2AE <1> repne scasb ; search zero 1544 00009FC5 F7D1 <1> not cx 1545 00009FC7 49 <1> dec cx ; cx = length of message 1546 00009FC8 5F <1> pop di 1547 00009FC9 16 <1> push ss 1548 00009FCA 1F <1> pop ds ; ds = ss 1549 00009FCB E800FB <1> call puts 1550 00009FCE 07 <1> pop es 1551 00009FCF 5A <1> pop dx 1552 00009FD0 59 <1> pop cx 1553 00009FD1 5B <1> pop bx 1554 00009FD2 58 <1> pop ax 1555 00009FD3 1F <1> pop ds 1556 00009FD4 C3 <1> retn 1557 <1> 1558 <1> ; Display character 1559 <1> ; 1560 <1> ; INP: al = character to display 1561 <1> ; CHG: - 1562 <1> ; STT: ds, es don't care 1563 <1> check_section_of disp_al 1564 <1> putc: section_of_function 1565 00009FD5 53 <1> push bx 1566 00009FD6 51 <1> push cx 1567 00009FD7 52 <1> push dx 1568 00009FD8 06 <1> push es 1569 00009FD9 1E <1> push ds 1570 00009FDA 16 <1> push ss 1571 00009FDB 07 <1> pop es ; es:dx -> message 1572 00009FDC 16 <1> push ss 1573 00009FDD 1F <1> pop ds ; ds = ss 1574 00009FDE 50 <1> push ax 1575 00009FDF B90100 <1> mov cx, 1 ; one character 1576 00009FE2 89E2 <1> mov dx, sp ; ds:dx-> ax on stack 1577 00009FE4 E8E7FA <1> call puts 1578 00009FE7 58 <1> pop ax 1579 00009FE8 1F <1> pop ds 1580 00009FE9 07 <1> pop es 1581 00009FEA 5A <1> pop dx 1582 00009FEB 59 <1> pop cx 1583 00009FEC 5B <1> pop bx 1584 00009FED C3 <1> retn 1585 <1> 1586 <1> 1587 <1> ; OUT: ax = 0 if no input available 1588 <1> ; ax = 0FFFFh if DOS stdin input available 1589 <1> ; ah = scancode, al = ASCII if int 16h input available 1590 <1> ; ax = al = ASCII if serial input available 1591 <1> ; REM: This is always a nondestructive read. 1592 <1> peekc: 1593 00009FEE F606[150C]10 <1> testopt [serial_flags], sf_use_serial 1594 00009FF3 750C <1> jnz .serial 1595 00009FF5 E871E5 <1> call InDOS_or_BIOS_IO 1596 00009FF8 740E <1> jz .dos 1597 <1> .bios: 1598 00009FFA B401 <1> mov ah, 01h 1599 00009FFC CD16 <1> int 16h ; key available ? 1600 <1> @@: 1601 00009FFE 7412 <1> jz .return_ax_0 1602 0000A000 C3 <1> retn 1603 <1> 1604 <1> .serial: 1605 0000A001 E8EE10 <1> call serial_check_receive_char 1606 <1> ; do serial getc (check rx buffer) 1607 0000A004 B400 <1> mov ah, 0 1608 0000A006 EBF6 <1> jmp @B 1609 <1> 1610 <1> .dos: 1611 0000A008 B40B <1> mov ah, 0Bh 1612 <1> doscall 1581 0000A00A CD21 <2> int 21h 1613 0000A00C B4FF <1> mov ah, -1 1614 0000A00E 84C0 <1> test al, al 1615 0000A010 EBEC <1> jmp @B 1616 <1> 1617 <1> .return_ax_0: 1618 0000A012 B80000 <1> mov ax, 0 1619 <1> .return: 1620 0000A015 C3 <1> retn 1621 <1> 1622 <1> 1623 <1> ; Get character/key 1624 <1> ; 1625 <1> ; OUT: al = character (if zero, look for ah) 1626 <1> ; ah = scan code or zero 1627 <1> ; CHG: ax 1628 <1> ; STT: ds = ss = debugger segment/selector 1629 <1> ; 1630 <1> ; Idles system when in InDOS mode. When not in InDOS mode, Int21.08 1631 <1> ; is used which is assumed to idle the system itself. 1632 <1> getc: 1633 0000A016 57 <1> push di 1634 0000A017 BF[11A2] <1> mov di, getc_if_any 1635 <1> 1636 0000A01A F606[D800]20 <1> testopt [internalflags3], dif3_input_serial_override 1637 0000A01F 750C <1> jnz @F 1638 0000A021 F606[150C]10 <1> testopt [serial_flags], sf_use_serial 1639 0000A026 7505 <1> jnz @F 1640 0000A028 E83EE5 <1> call InDOS_or_BIOS_IO 1641 0000A02B 7450 <1> jz getc_dos_pop_di 1642 <1> @@: 1643 0000A02D EB04 <1> jmp @F 1644 <1> 1645 <1> .raw: 1646 0000A02F 57 <1> push di 1647 0000A030 BF[7BA2] <1> mov di, getc_if_any.raw 1648 <1> .loop: 1649 <1> @@: 1650 0000A033 FF16[300C] <1> call near word [getline_timer_func] 1651 0000A037 F606[D800]20 <1> testopt [internalflags3], dif3_input_serial_override 1652 0000A03C 7523 <1> jnz @F 1653 0000A03E F606[DB00]01 <1> testopt [internalflags3], dif3_input_re 1654 0000A043 751C <1> jnz @F 1655 <1> %if _INPUT_FILE_BOOT 1656 0000A045 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 1657 0000A04A 7515 <1> jnz @F 1658 <1> %endif 1659 0000A04C F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 1660 0000A051 750E <1> jnz @F 1661 0000A053 F606[150C]10 <1> testopt [serial_flags], sf_use_serial 1662 0000A058 7507 <1> jnz @F 1663 0000A05A F606[A100]04 <1> testopt [options], biosidles 1664 <1> ; idling disabled? 1665 0000A05F 7516 <1> jnz .rawkey ; yes, just request a key --> 1666 <1> 1667 <1> @@: 1668 0000A061 FFD7 <1> call di ; got a key ? 1669 0000A063 7516 <1> jnz .return ; yes --> 1670 <1> .idle: ; common idling for BIOS keyboard and serial 1671 0000A065 E80DA3 <1> call handle_serial_flags_ctrl_c 1672 <1> %if _SLEEP_NEW 1673 0000A068 57 <1> push di 1674 0000A069 8B3E[584C] <1> mov di, word [getc_repeat_idle] 1675 0000A06D 47 <1> inc di 1676 <1> @@: 1677 0000A06E E88102 <1> call idle 1678 0000A071 4F <1> dec di 1679 0000A072 75FA <1> jnz @B 1680 0000A074 5F <1> pop di 1681 <1> %else 1682 <1> call idle 1683 <1> %endif 1684 0000A075 EBBC <1> jmp .loop ; check again --> 1685 <1> 1686 <1> .rawkey: 1687 0000A077 31C0 <1> xor ax, ax 1688 0000A079 CD16 <1> int 16h ; get the key and scancode 1689 <1> .return: 1690 0000A07B 5F <1> pop di 1691 0000A07C C3 <1> retn 1692 <1> 1693 <1> 1694 <1> getc_dos_pop_di: 1695 0000A07D 5F <1> pop di 1696 <1> getc_dos: 1697 <1> %if _PM 1698 <1> call ispm 1699 <1> jnz @F ; if 86 Mode --> 1700 <1> testopt [options2], opt2_getc_idle_dpmi 1701 <1> jnz @FF 1702 <1> @@: 1703 <1> %endif 1704 0000A07E F606[A500]20 <1> testopt [options2], opt2_getc_idle 1705 0000A083 7410 <1> jz getc_dos_internal 1706 <1> @@: 1707 <1> .with_idle: 1708 0000A085 E88901 <1> call getc_if_any 1709 0000A088 7403E9BC00 <1> jnz .return 1710 0000A08D E8E5A2 <1> call handle_serial_flags_ctrl_c 1711 0000A090 E85F02 <1> call idle 1712 0000A093 EBF0 <1> jmp .with_idle 1713 <1> 1714 <1> .return equ getc_dos_internal_get_extended.return 1715 <1> 1716 <1> 1717 <1> getc_dos_internal: 1718 <1> ; DOS character devices handle one-byte characters. Therefore 1719 <1> ; non-ASCII keys cannot be returned with scancode in the high 1720 <1> ; byte of the same call. A non-ASCII key will be split into 1721 <1> ; two characters by CON: one NUL byte followed by the scancode. 1722 0000A095 F606[D800]10 <1> testopt [internalflags3], dif3_input_terminal_override 1723 0000A09A 7403E99300 <1> jnz .terminal 1724 0000A09F F606[DB00]01 <1> testopt [internalflags3], dif3_input_re 1725 0000A0A4 741B <1> jz @F 1726 0000A0A6 56 <1> push si 1727 0000A0A7 8B36[340A] <1> mov si, word [re_buffer.position] 1728 0000A0AB 31C0 <1> xor ax, ax 1729 0000A0AD AC <1> lodsb 1730 0000A0AE 84C0 <1> test al, al 1731 0000A0B0 8936[340A] <1> mov word [re_buffer.position], si 1732 0000A0B4 5E <1> pop si 1733 0000A0B5 7403E98F00 <1> jnz .return 1734 0000A0BA FF0E[340A] <1> dec word [re_buffer.position] 1735 0000A0BE E98800 <1> jmp .return 1736 <1> 1737 <1> .return equ getc_dos_internal_get_extended.return 1738 <1> 1739 <1> 1740 <1> @@: 1741 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1742 <1> %if _INPUT_FILE_BOOT 1743 0000A0C1 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 1744 0000A0C6 750E <1> jnz .file 1745 <1> %endif 1746 <1> %if _INPUT_FILE_HANDLES 1747 0000A0C8 E89EE4 <1> call InDOS_or_BIOS_IO 1748 0000A0CB 7545 <1> jnz .file_not 1749 0000A0CD F606[D600]10 <1> testopt [internalflags2], dif2_input_file 1750 0000A0D2 7502 <1> jnz .file 1751 <1> %endif 1752 0000A0D4 EB3C <1> jmp .file_not 1753 <1> 1754 <1> .file: 1755 0000A0D6 52 <1> push dx 1756 0000A0D7 51 <1> push cx 1757 0000A0D8 53 <1> push bx 1758 0000A0D9 57 <1> push di 1759 0000A0DA 31C0 <1> xor ax, ax ; initialise ah to zero 1760 0000A0DC 50 <1> push ax 1761 0000A0DD 89E2 <1> mov dx, sp ; ds:dx -> al byte on stack 1762 0000A0DF B90100 <1> mov cx, 1 1763 <1> %if _INPUT_FILE_BOOT 1764 <1> %if _INPUT_FILE_HANDLES 1765 0000A0E2 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 1766 0000A0E7 7408 <1> jz @F 1767 <1> %endif 1768 0000A0E9 E8A13B <1> call yy_boot_remember_seek 1769 0000A0EC E8F535 <1> call yy_boot_read 1770 <1> %if _INPUT_FILE_HANDLES 1771 0000A0EF EB0A <1> jmp @FF 1772 <1> @@: 1773 <1> %endif 1774 <1> %endif 1775 <1> %if _INPUT_FILE_HANDLES 1776 0000A0F1 B43F <1> mov ah, 3Fh 1777 0000A0F3 E80C01 <1> call yy_get_handle 1778 0000A0F6 E8A60E <1> call yy_remember_seek 1779 <1> doscall ; (depends on ds = ss) 1581 0000A0F9 CD21 <2> int 21h 1780 <1> %endif 1781 <1> @@: 1782 0000A0FB 7204 <1> jc @F 1783 0000A0FD 85C0 <1> test ax, ax 1784 0000A0FF 750B <1> jnz .file_got 1785 <1> 1786 <1> @@: 1787 0000A101 E84F00 <1> call yy_close_file 1788 0000A104 58 <1> pop ax 1789 0000A105 5F <1> pop di 1790 0000A106 5B <1> pop bx 1791 0000A107 59 <1> pop cx 1792 0000A108 5A <1> pop dx 1793 0000A109 E90AFF <1> jmp getc 1794 <1> 1795 <1> 1796 <1> .file_got: 1797 0000A10C 58 <1> pop ax ; ah = 0, al = character read 1798 0000A10D 5F <1> pop di 1799 0000A10E 5B <1> pop bx 1800 0000A10F 59 <1> pop cx 1801 0000A110 5A <1> pop dx 1802 0000A111 C3 <1> retn 1803 <1> 1804 <1> .file_not: 1805 <1> %endif 1806 0000A112 F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 1807 0000A117 7419 <1> jz @F 1808 0000A119 56 <1> push si 1809 0000A11A 8B36[3002] <1> mov si, word [cmdline_buffer.position] 1810 0000A11E 31C0 <1> xor ax, ax 1811 0000A120 AC <1> lodsb 1812 0000A121 84C0 <1> test al, al 1813 0000A123 8936[3002] <1> mov word [cmdline_buffer.position], si 1814 0000A127 5E <1> pop si 1815 0000A128 751F <1> jnz .return 1816 0000A12A 8026[D900]FE <1> clropt [internalflags3], dif3_input_cmdline 1817 0000A12F E9E4FE <1> jmp getc 1818 <1> 1819 <1> @@: 1820 <1> .terminal: 1821 0000A132 B408 <1> mov ah, 8 1822 <1> doscall ; wait for a key 1581 0000A134 CD21 <2> int 21h 1823 <1> 1824 <1> getc_dos_internal_get_extended: 1825 <1> ; FreeDOS kernel 2036 returns with ax=4C00h upon Control C. 1826 <1> ; This is due to setting ax internally to terminate the 1827 <1> ; process, paired with the termination service just 1828 <1> ; returning for self-owned processes. This was eventually 1829 <1> ; fixed in https://sourceforge.net/p/freedos/svn/1469/ 1830 <1> ; This is a work around to restart our command line then. 1831 <1> ; Usually ah stays 08h when this call returns. 1832 <1> ; (06h if calling from getc_if_any to here.) 1833 0000A136 80FC4C <1> cmp ah, 4Ch 1834 0000A139 740F <1> je .freedos_ctrlc_workaround 1835 0000A13B B400 <1> mov ah, 0 ; assume it is ASCII 1836 0000A13D 84C0 <1> test al, al 1837 0000A13F 7508 <1> jne .return ; ASCII, return with ah zero --> 1838 0000A141 B408 <1> mov ah, 8 1839 <1> doscall ; scancode of non-ASCII key to al 1581 0000A143 CD21 <2> int 21h 1840 0000A145 86C4 <1> xchg al, ah ; to ah 1841 0000A147 B000 <1> mov al, 0 ; return zero for non-ASCII key 1842 <1> .return: 1843 0000A149 C3 <1> retn 1844 <1> 1845 <1> .freedos_ctrlc_workaround: 1846 0000A14A BA[BE12] <1> mov dx, msg.freedos_ctrlc_workaround 1847 0000A14D E863FE <1> call putsz 1848 0000A150 E904FB <1> jmp puts.ctrlc ; use common handler 1849 <1> 1850 <1> 1851 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 1852 <1> ; INP: [input_file_handles], dif2_input_file 1853 <1> ; OUT: most recent file closed, flag cleared if no longer file 1854 <1> ; CHG: di, bx, ax 1855 <1> yy_close_file: 1856 0000A153 F606[DB00]01 <1> testopt [internalflags3], dif3_input_re 1857 0000A158 740B <1> jz @F 1858 0000A15A 8026[DB00]FE <1> clropt [internalflags3], dif3_input_re 1859 0000A15F 800E[DB00]02 <1> setopt [internalflags3], dif3_input_re_closed 1860 0000A164 C3 <1> retn 1861 <1> 1862 <1> @@: 1863 <1> %if _INPUT_FILE_BOOT 1864 0000A165 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 1865 0000A16A 7406 <1> jz @F 1866 0000A16C E8033B <1> call yy_boot_clear_remember_seek 1867 0000A16F E91935 <1> jmp yy_boot_close_file 1868 <1> 1869 <1> @@: 1870 <1> %endif 1871 <1> %if _INPUT_FILE_HANDLES 1872 0000A172 F606[D600]10 <1> testopt [internalflags2], dif2_input_file 1873 0000A177 7455 <1> jz .notfile 1874 0000A179 8B3E[D80A] <1> mov di, word [input_file_handles.active] 1875 0000A17D 57 <1> push di 1876 0000A17E D1E7 <1> shl di, 1 1877 0000A180 D1E7 <1> shl di, 1 1878 0000A182 D1E7 <1> shl di, 1 1879 <1> %if INPUTFILEHANDLE_size != 8 1880 <1> %error Unexpected structure size 1881 <1> %endif 1882 0000A184 8B9D[580A] <1> mov bx, word [input_file_handles + di + ifhHandle] 1883 0000A188 E8F80D <1> call yy_clear_remember_seek 1884 <1> 1885 0000A18B F685[5B0A]01 <1> testopt [input_file_handles + di + ifhFlags], ifhfIsDup 1886 0000A190 7416 <1> jz @F 1887 <1> 1888 0000A192 51 <1> push cx 1889 0000A193 52 <1> push dx 1890 <1> 1891 0000A194 8B9D[500A] <1> mov bx, word [input_file_handles + di - INPUTFILEHANDLE_size + ifhHandle] 1892 0000A198 8B95[5C0A] <1> mov dx, word [input_file_handles + di + ifhParentSeek] 1893 0000A19C 8B8D[5E0A] <1> mov cx, word [input_file_handles + di + ifhParentSeek + 2] 1894 0000A1A0 B80042 <1> mov ax, 4200h ; seek from start 1895 0000A1A3 E8680D <1> call handle_seek_or_remember 1896 <1> 1897 0000A1A6 5A <1> pop dx 1898 0000A1A7 59 <1> pop cx 1899 <1> 1900 <1> @@: 1901 <1> 1902 0000A1A8 E8C5E3 <1> call InDOS 1903 0000A1AB 7406 <1> jz .closefile 1904 <1> 1905 0000A1AD FF06[DA0A] <1> inc word [input_file_handles.to_close] 1906 0000A1B1 EB06 <1> jmp @F 1907 <1> 1908 <1> .closefile: 1909 0000A1B3 B80100 <1> mov ax, 1 1910 0000A1B6 E82C00 <1> call yy_close_file_handles 1911 <1> 1912 <1> @@: 1913 0000A1B9 5F <1> pop di 1914 0000A1BA 4F <1> dec di 1915 0000A1BB 790C <1> jns .next 1916 0000A1BD 8026[D600]EF <1> clropt [internalflags2], dif2_input_file 1917 0000A1C2 800E[D600]20 <1> setopt [internalflags2], dif2_closed_input_file 1918 0000A1C7 EB04 <1> jmp .done 1919 <1> .next: 1920 0000A1C9 893E[D80A] <1> mov word [input_file_handles.active], di 1921 <1> .done: 1922 0000A1CD C3 <1> retn 1923 <1> 1924 <1> .notfile: 1925 0000A1CE F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 1926 0000A1D3 740B <1> jz @F 1927 0000A1D5 8026[D900]FE <1> clropt [internalflags3], dif3_input_cmdline 1928 0000A1DA 800E[D900]02 <1> setopt [internalflags3], dif3_input_cmdline_closed 1929 0000A1DF C3 <1> retn 1930 <1> 1931 <1> @@: 1932 0000A1E0 31F6 <1> xor si, si 1933 0000A1E2 E978E0 <1> jmp error 1934 <1> 1935 <1> 1936 <1> ; INP: word [input_file_handles.to_close] = how many 1937 <1> ; ax = additionally how many (0 or 1) 1938 <1> ; input_file_handles + di -> first to close 1939 <1> ; OUT: word [input_file_handles.to_close] = 0 1940 <1> ; closed handle fields = -1 1941 <1> ; CHG: ax, bx, di 1942 <1> ; STT: DOS must be accessible 1943 <1> yy_close_file_handles: 1944 0000A1E5 51 <1> push cx 1945 0000A1E6 31C9 <1> xor cx, cx 1946 0000A1E8 870E[DA0A] <1> xchg cx, word [input_file_handles.to_close] 1947 0000A1EC 01C1 <1> add cx, ax 1948 0000A1EE 7410 <1> jz @FF 1949 <1> @@: 1950 0000A1F0 BBFFFF <1> mov bx, -1 1951 0000A1F3 879D[580A] <1> xchg bx, word [input_file_handles + di + ifhHandle] 1952 0000A1F7 B43E <1> mov ah, 3Eh 1953 <1> doscall 1581 0000A1F9 CD21 <2> int 21h 1954 0000A1FB 83C708 <1> add di, INPUTFILEHANDLE_size 1955 0000A1FE E2F0 <1> loop @B 1956 <1> @@: 1957 0000A200 59 <1> pop cx 1958 0000A201 C3 <1> retn 1959 <1> 1960 <1> 1961 <1> ; INP: - 1962 <1> ; OUT: di = active handle offset 1963 <1> ; bx = active handle 1964 <1> ; CHG: - 1965 <1> yy_get_handle: 1966 0000A202 8B3E[D80A] <1> mov di, word [input_file_handles.active] 1967 0000A206 D1E7 <1> shl di, 1 1968 0000A208 D1E7 <1> shl di, 1 1969 0000A20A D1E7 <1> shl di, 1 1970 <1> %if INPUTFILEHANDLE_size != 8 1971 <1> %error Unexpected structure size 1972 <1> %endif 1973 0000A20C 8B9D[580A] <1> mov bx, word [input_file_handles + di + ifhHandle] 1974 <1> %endif 1975 0000A210 C3 <1> retn 1976 <1> %endif 1977 <1> 1978 <1> 1979 <1> ; INP: - 1980 <1> ; OUT: NZ if received any, 1981 <1> ; al = character 1982 <1> ; ah = scan code or zero 1983 <1> ; ZR if none received 1984 <1> ; CHG: ax 1985 <1> ; STT: ds = ss = debugger segment/selector 1986 <1> getc_if_any: 1987 0000A211 F606[D800]20 <1> testopt [internalflags3], dif3_input_serial_override 1988 0000A216 755B <1> jnz .serial 1989 0000A218 F606[D800]10 <1> testopt [internalflags3], dif3_input_terminal_override 1990 0000A21D 754D <1> jnz .terminal 1991 <1> 1992 0000A21F F606[DB00]01 <1> testopt [internalflags3], dif3_input_re 1993 0000A224 741D <1> jz @F 1994 0000A226 56 <1> push si 1995 0000A227 8B36[340A] <1> mov si, word [re_buffer.position] 1996 0000A22B 31C0 <1> xor ax, ax 1997 0000A22D AC <1> lodsb 1998 0000A22E 84C0 <1> test al, al 1999 0000A230 8936[340A] <1> mov word [re_buffer.position], si 2000 0000A234 5E <1> pop si 2001 0000A235 7403E9B700 <1> jnz .return 2002 0000A23A FF0E[340A] <1> dec word [re_buffer.position] 2003 0000A23E 38C0 <1> cmp al, al ; ZR 2004 0000A240 E9AE00 <1> jmp .return 2005 <1> 2006 <1> @@: 2007 <1> %if _INPUT_FILE_BOOT 2008 0000A243 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 2009 0000A248 755B <1> jnz .file 2010 <1> %endif 2011 <1> 2012 0000A24A F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 2013 0000A24F 741B <1> jz @F 2014 0000A251 56 <1> push si 2015 0000A252 8B36[3002] <1> mov si, word [cmdline_buffer.position] 2016 0000A256 31C0 <1> xor ax, ax 2017 0000A258 AC <1> lodsb 2018 0000A259 84C0 <1> test al, al 2019 0000A25B 8936[3002] <1> mov word [cmdline_buffer.position], si 2020 0000A25F 5E <1> pop si 2021 0000A260 7403E98C00 <1> jnz .return 2022 0000A265 8026[D900]FE <1> clropt [internalflags3], dif3_input_cmdline 2023 0000A26A EBA5 <1> jmp getc_if_any 2024 <1> 2025 <1> @@: 2026 <1> .terminal: 2027 0000A26C F606[150C]10 <1> testopt [serial_flags], sf_use_serial 2028 0000A271 7411 <1> jz @F ; do BIOS keyboard or DOS getc --> 2029 <1> 2030 <1> .serial: 2031 0000A273 E85B0E <1> call serial_receive_char ; do serial getc (check rx buffer) 2032 0000A276 7479 <1> jz .return ; no data, go and idle --> 2033 0000A278 B400 <1> mov ah, 0 2034 0000A27A C3 <1> retn 2035 <1> 2036 <1> .raw: 2037 0000A27B F606[150C]10 <1> testopt [serial_flags], sf_use_serial 2038 0000A280 75F1 <1> jnz .serial 2039 0000A282 EB5F <1> jmp .bios 2040 <1> 2041 <1> @@: 2042 0000A284 E8E2E2 <1> call InDOS_or_BIOS_IO 2043 0000A287 755A <1> jnz .bios 2044 <1> 2045 0000A289 F606[D800]10 <1> testopt [internalflags3], dif3_input_terminal_override 2046 0000A28E 7546 <1> jnz .dos_terminal 2047 <1> 2048 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 2049 <1> %if _INPUT_FILE_BOOT 2050 0000A290 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 2051 0000A295 750E <1> jnz .file 2052 <1> %endif 2053 <1> %if _INPUT_FILE_HANDLES 2054 0000A297 E8CFE2 <1> call InDOS_or_BIOS_IO 2055 0000A29A 753A <1> jnz .file_not 2056 0000A29C F606[D600]10 <1> testopt [internalflags2], dif2_input_file 2057 0000A2A1 7502 <1> jnz .file 2058 <1> %endif 2059 0000A2A3 EB31 <1> jmp .file_not 2060 <1> 2061 <1> .file: 2062 0000A2A5 57 <1> push di 2063 0000A2A6 53 <1> push bx 2064 0000A2A7 51 <1> push cx 2065 0000A2A8 52 <1> push dx 2066 0000A2A9 31C0 <1> xor ax, ax 2067 0000A2AB 50 <1> push ax 2068 <1> 2069 0000A2AC 89E2 <1> mov dx, sp ; ds:dx -> al byte on stack 2070 0000A2AE B90100 <1> mov cx, 1 ; buffer length = 1 2071 <1> %if _INPUT_FILE_BOOT 2072 <1> %if _INPUT_FILE_HANDLES 2073 0000A2B1 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 2074 0000A2B6 7408 <1> jz @F 2075 <1> %endif 2076 0000A2B8 E8D239 <1> call yy_boot_remember_seek 2077 0000A2BB E82634 <1> call yy_boot_read 2078 0000A2BE EB0A <1> jmp @FF 2079 <1> @@: 2080 <1> %endif 2081 <1> %if _INPUT_FILE_HANDLES 2082 0000A2C0 B43F <1> mov ah, 3Fh 2083 0000A2C2 E83DFF <1> call yy_get_handle 2084 0000A2C5 E8D70C <1> call yy_remember_seek 2085 <1> doscall ; DOS read file (depends on ds = ss) 1581 0000A2C8 CD21 <2> int 21h 2086 <1> %endif 2087 <1> @@: 2088 0000A2CA 7302 <1> jnc @F 2089 0000A2CC 31C0 <1> xor ax, ax 2090 <1> @@: 2091 0000A2CE 85C0 <1> test ax, ax 2092 0000A2D0 58 <1> pop ax 2093 0000A2D1 5A <1> pop dx 2094 0000A2D2 59 <1> pop cx 2095 0000A2D3 5B <1> pop bx 2096 0000A2D4 5F <1> pop di 2097 0000A2D5 C3 <1> retn ; ZR if no character read 2098 <1> 2099 <1> .file_not: 2100 <1> %endif 2101 <1> .dos_terminal: 2102 <1> %if 0 2103 <1> push dx 2104 <1> mov ah, 06h 2105 <1> mov dl, -1 2106 <1> doscall 2107 <1> jz .return_dx ; none available 2108 <1> ; bugfix: the 06h call is a *destructive* read. 2109 <1> ; so do not call getc again, just handle the 2110 <1> ; possible second byte returned. 2111 <1> call getc_dos_internal_get_extended 2112 <1> pop dx 2113 <1> jmp .return_NZ 2114 <1> .return_dx: 2115 <1> pop dx 2116 <1> retn 2117 <1> %else 2118 0000A2D6 B40B <1> mov ah, 0Bh 2119 <1> doscall 1581 0000A2D8 CD21 <2> int 21h 2120 0000A2DA 84C0 <1> test al, al 2121 0000A2DC 7413 <1> jz .return 2122 0000A2DE E8B4FD <1> call getc_dos_internal 2123 0000A2E1 EB0A <1> jmp .return_NZ 2124 <1> %endif 2125 <1> 2126 <1> .bios: 2127 0000A2E3 B401 <1> mov ah, 01h 2128 0000A2E5 CD16 <1> int 16h ; key available ? 2129 0000A2E7 7408 <1> jz .return 2130 0000A2E9 31C0 <1> xor ax, ax 2131 0000A2EB CD16 <1> int 16h 2132 <1> .return_NZ: 2133 0000A2ED 50 <1> push ax 2134 0000A2EE 0C01 <1> or al, 1 ; (NZ) 2135 0000A2F0 58 <1> pop ax 2136 <1> .return: 2137 0000A2F1 C3 <1> retn 2138 <1> 2139 <1> 2140 <1> ; INP: - 2141 <1> ; OUT: - 2142 <1> ; CHG: ax 2143 <1> ; STT: ds = ss = debugger segment/selector 2144 <1> ; 2145 <1> ; Idle system, using 2F.1680 (in given mode), or 2F.1680 2146 <1> ; (calling down to 86 Mode), or sti \ hlt. 2147 <1> idle: 2148 0000A2F2 FB <1> sti 2149 <1> ; Might be required for dosemu2 in loops. Refer to 2150 <1> ; https://hg.pushbx.org/ecm/insight/rev/7973d5dd16f7 2151 0000A2F3 90 <1> nop ; help debugging 2152 <1> 2153 <1> %if _APPLICATION || _DEVICE 2154 <1> %if _BOOTLDR 2155 0000A2F4 F606[D100]40 <1> testopt [internalflags], nodosloaded 2156 0000A2F9 7526 <1> jnz .hlt ; can't call 2F --> 2157 <1> %endif 2158 <1> 2159 0000A2FB F606[AB00]02 <1> testopt [options3], opt3_no_idle_2F 2160 0000A300 751F <1> jnz .hlt 2161 <1> %if _GUARD_86M_INT2F 2162 <1> %if _PM 2163 <1> call ispm 2164 <1> jz @FF ; --> (NZ) 2165 <1> %endif 2166 0000A302 06 <1> push es 2167 0000A303 31C0 <1> xor ax, ax 2168 0000A305 8EC0 <1> mov es, ax ; (only used in 86 Mode) 2169 0000A307 26A1BC00 <1> mov ax, [es:2Fh * 4] 2170 0000A30B 83F8FF <1> cmp ax, -1 2171 0000A30E 7405 <1> je @F ; --> (ZR) 2172 0000A310 260B06BE00 <1> or ax, [es:2Fh * 4 + 2] 2173 <1> @@: 2174 0000A315 07 <1> pop es 2175 0000A316 7409 <1> jz @FF 2176 <1> @@: 2177 <1> %endif 2178 0000A318 B88016 <1> mov ax, 1680h 2179 0000A31B CD2F <1> int 2Fh ; release timeslice in multitasker 2180 0000A31D 84C0 <1> test al, al 2181 0000A31F 740A <1> jz .return ; done idling --> 2182 <1> @@: 2183 <1> %if _PM 2184 <1> call ispm 2185 <1> jnz .hlt 2186 <1> 2187 <1> push bx 2188 <1> push cx 2189 <1> push es 2190 <1> _386_PM_o32 ; push edi 2191 <1> push di 2192 <1> _386 xor edi, edi ; clear EDIH 2193 <1> xor cx, cx ; (copy no words from stack) 2194 <1> 2195 <1> [cpu 286] 2196 <1> push cx ; ss 2197 <1> push cx ; sp (0:0 = host should allocate a stack) 2198 <1> sub sp, byte 12 ; cs:ip (ignored), segments (uninitialized) 2199 <1> pushf 2200 <1> push cx ; EAXH (uninitialized) 2201 <1> push 1680h ; AX 2202 <1> sub sp, byte 12 ; ecx, edx, ebx (uninitialized) 2203 <1> push cx 2204 <1> push cx ; reserved (zero) 2205 <1> sub sp, byte 12 ; ebp, esi, edi (uninitialized) 2206 <1> push ss 2207 <1> pop es 2208 <1> mov di, sp ; es:(e)di -> 86 Mode call structure 2209 <1> mov ax, 0300h 2210 <1> mov bx, 2Fh ; bl = interrupt, bh = reserved (zero) 2211 <1> int 31h ; call real mode 2F.1680 2212 <1> __CPU__ 2213 <1> 2214 <1> add sp, byte 28 ; discard RM call structure 2215 <1> pop ax ; get AX 2216 <1> add sp, byte 20 ; discard RM call structure 2217 <1> 2218 <1> _386_PM_o32 ; pop edi 2219 <1> pop di 2220 <1> pop es 2221 <1> pop cx 2222 <1> pop bx 2223 <1> 2224 <1> test al, al 2225 <1> jz .return ; done idling --> 2226 <1> %endif 2227 <1> %endif 2228 <1> .hlt: 2229 0000A321 F606[A100]02 <1> testopt [options], nohlt 2230 0000A326 7503 <1> jnz .return 2231 <1> %if _PM 2232 <1> %if (protectedmode|dpminohlt)&~0FF00h 2233 <1> %error Option bits re-ordered, adjust code here 2234 <1> %endif 2235 <1> mov al, byte [internalflags+1] 2236 <1> and al, (protectedmode|dpminohlt)>>8 2237 <1> xor al, (protectedmode|dpminohlt)>>8 2238 <1> jz .return ; DPMI host throws GPF when we execute hlt --> 2239 <1> %endif 2240 0000A328 FB <1> sti 2241 0000A329 F4 <1> hlt ; else idle by hlt 2242 0000A32A 90 <1> nop 2243 <1> .return: 2244 0000A32B C3 <1> retn 2245 <1> 2246 <1> 2247 <1> %if _MS_PROMPT_COMPAT 2248 <1> usesection lDEBUG_DATA_ENTRY 2249 <1> align 2, db 0 2250 <1> ; REM: Dispatch table in section lDEBUG_CODE 2251 <1> table_getline_prepare_ldebug: 2252 00005404 [34A3] <1> dw getline_prepare_blank_blank_colon 2253 00005406 [34A3] <1> dw getline_prepare_blank_blank_colon 2254 00005408 [34A3] <1> dw getline_prepare_blank_blank_colon 2255 <1> 2256 <1> ; word +0: other 2257 <1> ; word +2: variable (register) 2258 <1> ; word +4: symbolic F (flag states) 2259 <1> ; REM: Dispatch table in section lDEBUG_CODE 2260 <1> table_getline_prepare_ms_debug: 2261 0000540A [34A3] <1> dw getline_prepare_blank_blank_colon 2262 0000540C [2CA3] <1> dw getline_prepare_crlf_colon 2263 0000540E [3CA3] <1> dw getline_prepare_blank_dash 2264 <1> 2265 <1> 2266 <1> usesection lDEBUG_CODE 2267 <1> 2268 <1> getline_prepare_crlf_colon: 2269 0000A32C E894F7 <1> call putsline_crlf 2270 0000A32F BF[B40A] <1> mov di, line_out 2271 0000A332 EB04 <1> jmp @F 2272 <1> 2273 <1> getline_prepare_blank_blank_colon: 2274 0000A334 B82020 <1> mov ax, 32<<8|32 ; add two spaces and a colon 2275 0000A337 AB <1> stosw 2276 <1> @@: 2277 0000A338 B03A <1> mov al, ':' 2278 0000A33A AA <1> stosb 2279 0000A33B C3 <1> retn 2280 <1> 2281 <1> getline_prepare_blank_dash: 2282 0000A33C B8202D <1> mov ax, '-' << 8 | 32 2283 0000A33F AB <1> stosw 2284 0000A340 C3 <1> retn 2285 <1> %endif 2286 <1> 2287 <1> 2288 <1> ; GETLINE - Print a prompt (address in DX, length in CX) and read a line 2289 <1> ; of input. 2290 <1> ; GETLINE0 - Same as above, but use the output line (so far), plus two 2291 <1> ; spaces and a colon, as a prompt. 2292 <1> ; GETLINE00 - Same as above, but use the output line (so far) as a prompt. 2293 <1> ; Entry CX Length of prompt (getline only) 2294 <1> ; DX Address of prompt string (getline only) 2295 <1> ; 2296 <1> ; DI Address + 1 of last character in prompt (getline0 and 2297 <1> ; getline00 only) 2298 <1> ; 2299 <1> ; Exit AL First nonwhite character in input line 2300 <1> ; SI Address of the next character after that 2301 <1> ; Uses AH,BX,CX,DX,DI 2302 <1> 2303 <1> %ifn _MS_PROMPT_COMPAT 2304 <1> getline0: 2305 <1> mov ax, 32<<8|32 ; add two spaces and a colon 2306 <1> stosw 2307 <1> mov al, ':' 2308 <1> stosb 2309 <1> %endif 2310 <1> getline00: 2311 0000A341 BA[B40A] <1> mov dx, line_out 2312 0000A344 89F9 <1> mov cx, di 2313 0000A346 29D1 <1> sub cx, dx 2314 <1> 2315 <1> getline: ; note: this entry is no longer used 2316 0000A348 8026[D900]77 <1> clropt [internalflags3], dif3_quiet_input_single | dif3_return_eof 2317 <1> .use_dif3_flags: 2318 <1> %if _DEBUG && ! _DEBUG_COND 2319 <1> d0bp 2320 <1> %endif 2321 0000A34D 890E[600B] <1> mov word [promptlen], cx ; save length of prompt 2322 0000A351 8326[3A0C]00 <1> and word [terminator_in_line_in.offset], 0 2323 <1> ; reset this when reading new line 2324 <1> 2325 0000A356 E80102 <1> call getline_is_input_file? 2326 0000A359 7303E90801 <1> jc getline_nofile 2327 <1> 2328 <1> getline_file: 2329 0000A35E F606[DB00]01 <1> testopt [internalflags3], dif3_input_re 2330 0000A363 7549 <1> jnz .notquiet 2331 <1> 2332 <1> %if _INPUT_FILE_BOOT 2333 0000A365 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 2334 0000A36A 7412 <1> jz @F 2335 0000A36C B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 2336 0000A36F 52 <1> push dx 2337 0000A370 F726[A05A] <1> mul word [load_input_file.active] 2338 0000A374 5A <1> pop dx 2339 0000A375 89C7 <1> mov di, ax 2340 0000A377 F685[4758]40 <1> testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietInput 2341 0000A37C EB29 <1> jmp .quiet_if_nz 2342 <1> 2343 <1> @@: 2344 <1> %endif 2345 <1> %if _INPUT_FILE_HANDLES 2346 0000A37E E8E8E1 <1> call InDOS_or_BIOS_IO 2347 0000A381 7518 <1> jnz @F 2348 0000A383 F606[D600]10 <1> testopt [internalflags2], dif2_input_file 2349 0000A388 7411 <1> jz @F 2350 0000A38A 8B3E[D80A] <1> mov di, word [input_file_handles.active] 2351 0000A38E D1E7 <1> shl di, 1 2352 0000A390 D1E7 <1> shl di, 1 2353 0000A392 D1E7 <1> shl di, 1 ; to qword array index 2354 <1> %if INPUTFILEHANDLE_size != 8 2355 <1> %error Unexpected structure size 2356 <1> %endif 2357 0000A394 F685[5B0A]40 <1> testopt [input_file_handles + di + ifhFlags], ifhfQuietInput 2358 0000A399 EB0C <1> jmp .quiet_if_nz 2359 <1> 2360 <1> @@: 2361 <1> %endif 2362 0000A39B F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 2363 0000A3A0 740C <1> jz @F 2364 0000A3A2 F606[A300]40 <1> testopt [options], opt_cmdline_quiet_input 2365 <1> ; jmp .quiet_if_nz 2366 <1> 2367 <1> .quiet_if_nz: 2368 0000A3A7 7405 <1> jz @F 2369 <1> .quiet: 2370 0000A3A9 800E[D900]08 <1> setopt [internalflags3], dif3_quiet_input_single 2371 <1> .notquiet: 2372 <1> @@: 2373 <1> 2374 0000A3AE 800E[D600]40 <1> setopt [internalflags2], dif2_did_getline_file 2375 <1> 2376 <1> 2377 <1> ; This part reads the input line from a file (in the case of 2378 <1> ; `debug < file'). It is necessary to do this by hand because DOS 2379 <1> ; function 0Ah does not handle EOF correctly otherwise. This is 2380 <1> ; especially important for DEBUG because it traps Control-C. 2381 0000A3B3 C706[020C][F504] <1> mov word [lastcmd], dmycmd ; disable auto-repeat while reading from a file 2382 <1> 2383 <1> %if _NEWFULLHANDLING 2384 0000A3B9 BF[0300] <1> mov di, line_in+3 ; read max 2385 <1> %else 2386 <1> mov di, line_in+2 2387 <1> %endif 2388 0000A3BC 8B36[620B] <1> mov si, word [bufnext] 2389 0000A3C0 3B36[640B] <1> cmp si, word [bufend] 2390 0000A3C4 7216 <1> jb .char_buffered ; if there's a character already 2391 0000A3C6 E86B07 <1> call fillbuf 2392 0000A3C9 7311 <1> jnc .fillbuf_had_data 2393 0000A3CB F606[D900]80 <1> testopt [internalflags3], dif3_return_eof 2394 0000A3D0 7402 <1> jz @F 2395 0000A3D2 F9 <1> stc 2396 0000A3D3 C3 <1> retn 2397 <1> @@: 2398 0000A3D4 E8BC01 <1> call getline_close_file 2399 0000A3D7 7403E96CFF <1> jnz getline 2400 <1> 2401 <1> .fillbuf_had_data: 2402 <1> .char_buffered: 2403 <1> %if _NEWFULLHANDLING 2404 0000A3DC 4F <1> dec di 2405 <1> %endif 2406 <1> 2407 <1> ; Discard an LF if the last character read was CR. 2408 0000A3DD 803E[540B]0D <1> cmp byte [notatty], 13 ; last parsed character was CR ? 2409 0000A3E2 750A <1> jne .no_lf_skip ; no, nothing more to do --> 2410 0000A3E4 803C0A <1> cmp byte [si], 10 ; first read character is LF ? 2411 0000A3E7 7505 <1> jne .no_lf_skip ; no --> 2412 0000A3E9 46 <1> inc si ; skip the LF 2413 0000A3EA FE06[540B] <1> inc byte [notatty] ; avoid repeating this 2414 <1> .no_lf_skip: 2415 <1> 2416 0000A3EE 3B36[640B] <1> cmp si, word [bufend] 2417 0000A3F2 740B <1> je @F 2418 0000A3F4 803C40 <1> cmp byte [si], '@' ; no display ? 2419 0000A3F7 7506 <1> jne @F 2420 <1> 2421 0000A3F9 46 <1> inc si ; increment past @ 2422 0000A3FA 800E[D900]08 <1> setopt [internalflags3], dif3_quiet_input_single 2423 <1> @@: 2424 0000A3FF F606[D900]08 <1> testopt [internalflags3], dif3_quiet_input_single 2425 0000A404 7503 <1> jnz gl1 2426 <1> 2427 0000A406 E8C5F6 <1> call puts ; display prompt (having checked it wasn't EOF) 2428 <1> 2429 <1> ; si-> next character in buffer 2430 <1> ; w[bufend]-> behind last valid character of buffer 2431 <1> gl1: 2432 0000A409 8B0E[640B] <1> mov cx, word [bufend] 2433 0000A40D 29F1 <1> sub cx, si ; cx = number of valid characters in buffer 2434 0000A40F 740C <1> jz gl3 ; if none --> 2435 <1> gl2: 2436 0000A411 AC <1> lodsb 2437 0000A412 3C0D <1> cmp al, 13 ; (exact match for CR) 2438 0000A414 7410 <1> je gl4 2439 0000A416 3C0A <1> cmp al, 10 2440 0000A418 740C <1> je gl4 ; if EOL --> 2441 0000A41A AA <1> stosb 2442 0000A41B E2F4 <1> loop gl2 ; if more valid characters --> 2443 <1> 2444 <1> ; The buffer is empty. Fill it again. 2445 <1> gl3: 2446 <1> %if _NEWFULLHANDLING 2447 0000A41D 47 <1> inc di 2448 <1> %endif 2449 0000A41E E81307 <1> call fillbuf 2450 <1> %if _NEWFULLHANDLING 2451 0000A421 4F <1> dec di 2452 <1> %endif 2453 0000A422 73E5 <1> jnc gl1 ; if we have more characters --> 2454 0000A424 B00A <1> mov al, 10 ; make jump after gl4 always branch 2455 <1> %ifn _NEWFULLHANDLING ; should now always have at least one byte free 2456 <1> cmp di, line_in+LINE_IN_LEN 2457 <1> jb @F 2458 <1> dec si 2459 <1> dec di 2460 <1> @@: 2461 <1> %endif 2462 <1> 2463 <1> gl4: 2464 0000A426 3C0D <1> cmp al, 13 ; terminator was CR ? 2465 0000A428 7508 <1> jne @F ; no --> 2466 0000A42A E306 <1> jcxz @F ; if no other byte buffered --> 2467 0000A42C 803C0A <1> cmp byte [si], 10 ; next byte is an LF ? 2468 0000A42F 7501 <1> jne @F ; no --> 2469 0000A431 AC <1> lodsb ; increment si past the LF and set al = 10 2470 <1> ; dec cx ; (not used in subsequent code) 2471 <1> @@: 2472 0000A432 8936[620B] <1> mov word [bufnext], si 2473 0000A436 A2[540B] <1> mov byte [notatty], al ; store 10 or 13 (depending on the kind of EOL) 2474 <1> 2475 0000A439 800E[D900]04 <1> setopt [internalflags3], dif3_at_line_end 2476 0000A43E E87706 <1> call getline_reset_notatty 2477 <1> 2478 0000A441 89F9 <1> mov cx, di ; (counter is for input without CR) 2479 0000A443 B00D <1> mov al, 13 2480 0000A445 AA <1> stosb ; terminate line for our usage 2481 0000A446 BA[0200] <1> mov dx, line_in + 2 2482 0000A449 29D1 <1> sub cx, dx ; = length of input (no CR) 2483 0000A44B F606[D900]08 <1> testopt [internalflags3], dif3_quiet_input_single 2484 0000A450 750D <1> jnz @F 2485 0000A452 800E[D200]01 <1> setopt [internalflags], usecharcounter 2486 0000A457 E874F6 <1> call puts ; print out the received line 2487 0000A45A 8026[D200]FE <1> clropt [internalflags], usecharcounter 2488 <1> @@: 2489 0000A45F 880E[0100] <1> mov byte [line_in+1], cl 2490 0000A463 E9DD00 <1> jmp getline_eol ; done 2491 <1> 2492 <1> getline_nofile: 2493 0000A466 E81F0A <1> call yy_reset_buf 2494 0000A469 C606[EB0A]00 <1> mov byte [linecounter], 0 ; reset counter 2495 0000A46E 8026[D200]EF <1> clropt [internalflags], promptwaiting 2496 0000A473 51 <1> push cx 2497 0000A474 52 <1> push dx 2498 0000A475 E856F6 <1> call puts ; display prompt 2499 0000A478 5A <1> pop dx 2500 0000A479 59 <1> pop cx 2501 0000A47A F606[150C]10 <1> testopt [serial_flags], sf_use_serial 2502 0000A47F 750A <1> jnz .getinput_NZ 2503 0000A481 E8DEE0 <1> call InDOS_or_BIOS_output 2504 <1> ; Special case: If output is to ROM-BI0S we must use 2505 <1> ; getinput so as to use putc and friends, not the 2506 <1> ; DOS interrupt 21h service 0Ah. 2507 0000A484 7505 <1> jnz .getinput_NZ 2508 <1> %if _PM 2509 <1> call ispm 2510 <1> jnz @F ; if 86 Mode --> 2511 <1> testopt [options2], opt2_getinput_dpmi 2512 <1> jnz .getinput_NZ 2513 <1> @@: 2514 <1> %endif 2515 0000A486 F606[A100]08 <1> testopt [options], opt_usegetinput 2516 <1> .getinput_NZ: 2517 0000A48B 7403E99001 <1> jnz getinput 2518 <1> 2519 <1> %if _PM 2520 <1> call ispm 2521 <1> jnz @F ; if 86 Mode --> 2522 <1> testopt [internalflags], canswitchmode 2523 <1> jz @F ; can't switch to 86M --> 2524 <1> setopt [internalflags], modeswitched 2525 <1> ; set flag for resetmode 2526 <1> mov al, 0 2527 <1> call sr_state ; save state 2528 <1> call switchmode ; switch to 86M 2529 <1> call handle_mode_changed ; ! called with flag set 2530 <1> 2531 <1> mov si, getline_extra_int23 2532 <1> mov al, 23h 2533 <1> call install_86m_interrupt_handler 2534 <1> ; override DPMI host's int 23h vector 2535 <1> mov dx, getline_extra_int22 2536 <1> mov ax, 2522h 2537 <1> int 21h 2538 <1> mov word [TPIV], dx ; override our PRI 2539 <1> 2540 <1> mov dx, line_in 2541 <1> mov ah, 0Ah 2542 <1> int 21h ; call DOS 2543 <1> 2544 <1> call getline_extra_uninstall 2545 <1> ; undo patches 2546 <1> jmp getline_eol_enter_history 2547 <1> ; go to common trail 2548 <1> 2549 <1> @@: 2550 <1> %endif 2551 0000A490 BA[0000] <1> mov dx, line_in 2552 0000A493 B40A <1> mov ah, 0Ah ; buffered keyboard input 2553 <1> doscall 1581 0000A495 CD21 <2> int 21h 2554 <1> 2555 <1> getline_eol_enter_history: 2556 <1> %if _HISTORY 2557 <1> %if 0 2558 <1> 2559 <1> The history buffer is implemented as two arrays that grow towards 2560 <1> the middle from either end of the buffer. The first is a byte array 2561 <1> storing text data that starts at the low end (start) of the buffer. 2562 <1> (This is offset 0 in the separate history segment, if used.) The 2563 <1> text is stored back to back, only the content of the lines, no 2564 <1> separators or terminators. 2565 <1> 2566 <1> The second array gives the *end* of each history entry's text. 2567 <1> There are N + 1 array entries, each a 16-bit offset word, where 2568 <1> N is the amount of history entries in use. The words are used as 2569 <1> displacement from a base that's the start of the history buffer. 2570 <1> (Again, the start base is at offset 0 for the separate history 2571 <1> segment. However, for simplicity of the code we always do store 2572 <1> the actual base start offset into a register and displace from 2573 <1> that, even when the actual value of that register will be zero.) 2574 <1> The very first entry of the high array is special. It always 2575 <1> holds the displacement value zero. When used as a displacement 2576 <1> added to the base this points at the very beginning of the 2577 <1> entire history buffer (and thus the start of the low array). 2578 <1> 2579 <1> The size of a history entry in the low array is obtained by 2580 <1> reading both the entry's end displacement from the high array, 2581 <1> and the prior entry (at the next higher address) also from the 2582 <1> high array to receive the end displacement of the prior history 2583 <1> entry. The end displacement of the prior entry is also the 2584 <1> start displacement of the current entry. The delta of the two 2585 <1> end displacements is the size of this history entry. This also 2586 <1> explains why the very first entry of the high array is needed, 2587 <1> and why it contains a zero displacement. It is needed in order 2588 <1> to determine the start displacement and size of the very first 2589 <1> actual history entry. (We could special case the first entry a 2590 <1> different way but using the special first entry of the high 2591 <1> array that holds a constant zero simplifies the code.) 2592 <1> 2593 <1> The history pointers in the word [history.first] as well as 2594 <1> word [history.last] point at the very first (special) entry 2595 <1> of the high array as well as the very last entry of the high 2596 <1> array. (Because the high array grows from the top down, the 2597 <1> first entry is at the highest address and the last entry is 2598 <1> at the lowest address.) Although the word [history.first] is 2599 <1> currently a constant, we use a variable to enable changing 2600 <1> the history allocation dynamically if desired later. If the 2601 <1> two pointers are one and the same then there is no actual 2602 <1> history entry stored in the history. Otherwise, if the 2603 <1> distance between the last high array entry and the last 2604 <1> low array entry is lower than X + 2 bytes then the history is 2605 <1> too full to insert a new entry, where X is the length of the 2606 <1> new history entry's text data and the additional 2 bytes are 2607 <1> for the high array entry to store the end displacement. 2608 <1> 2609 <1> The special first entry of the high array *must* be 2610 <1> initialised to hold the displacement value zero. This happens 2611 <1> in init.asm for the separate history buffer segment (when 2612 <1> initialising the entire segment with zeroes) or in the 2613 <1> zeroing of most of the DATASTACK section (when initialising 2614 <1> the variables from ..@init_first up to ..@init_behind). 2615 <1> 2616 <1> Insertion is simple, if enough space is left in the history 2617 <1> buffer: Copy the text to behind the last entry of the low 2618 <1> array (this is pointed to by the end displacement in the last 2619 <1> high array entry), then create a new last entry of the high 2620 <1> array which points behind the text's destination. 2621 <1> 2622 <1> Deletion is more difficult. (Generally we will delete the 2623 <1> oldest entry, that is the first history entry.) The second 2624 <1> entry of the high array needs to be deleted. All subsequent 2625 <1> entries of the high array need to move "forward" (towards 2626 <1> the higher address), and also must have the length of the 2627 <1> text of the entry to delete subtracted. In the low array the 2628 <1> text data of the first history entry needs to be overwritten 2629 <1> with any subsequent text data; the entire subsequent text data 2630 <1> must be moved "forward" (towards the lower address) by the 2631 <1> distance that equals the length of the entry's text to delete. 2632 <1> 2633 <1> %endif 2634 <1> 2635 <1> .loop: 2636 0000A497 BE[0200] <1> mov si, line_in + 2 2637 0000A49A 31C9 <1> xor cx, cx 2638 0000A49C 0A4CFF <1> or cl, byte [si - 1] 2639 0000A49F 7503E99D00 <1> jz .dontenter 2640 <1> gethistorysegment es 297 0000A4A4 368E06[6C0B] <2> mov %1, word [ss:history.segorsel] 2641 <1> gethistoryoffset bx 300 0000A4A9 BB0000 <2> mov %1, 0 2642 0000A4AC A1[700B] <1> mov ax, word [history.last] 2643 0000A4AF 3B06[6E0B] <1> cmp ax, word [history.first] 2644 0000A4B3 7419 <1> je @F ; if there are no history entries --> 2645 0000A4B5 89C7 <1> mov di, ax ; -> last displacement in high array 2646 0000A4B7 268B15 <1> mov dx, [es:di] ; + bx -> behind last history entry text 2647 0000A4BA 268B7D02 <1> mov di, [es:di + 2] ; + bx -> at last history entry text 2648 0000A4BE 29FA <1> sub dx, di ; = length of last history entry text 2649 0000A4C0 39D1 <1> cmp cx, dx ; length match ? 2650 0000A4C2 750A <1> jne @F ; no --> 2651 <1> 2652 <1> ; always ZR here. would need to keep this in mind if 2653 <1> ; zero-length entries were considered. (repe cmpsb 2654 <1> ; with cx = 0 leaves cx, si, di, fl unchanged.) 2655 0000A4C4 8D39 <1> lea di, [di + bx] ; -> at last text 2656 0000A4C6 51 <1> push cx 2657 0000A4C7 56 <1> push si 2658 0000A4C8 F3A6 <1> repe cmpsb ; compare candidate text to last text 2659 0000A4CA 5E <1> pop si 2660 0000A4CB 59 <1> pop cx 2661 0000A4CC 7473 <1> je .dontenter ; equal, so skip it --> 2662 <1> @@: 2663 0000A4CE 89C7 <1> mov di, ax ; -> last displacement 2664 0000A4D0 268B15 <1> mov dx, [es:di] ; + bx -> free space 2665 0000A4D3 01DA <1> add dx, bx ; -> free space 2666 0000A4D5 F7DA <1> neg dx ; - free space start 2667 0000A4D7 7502 <1> jnz @F 2668 0000A4D9 4A <1> dec dx ; cause add to overflow (= FFFFh) 2669 0000A4DA 47 <1> inc di ; adjust for prior instruction 2670 <1> @@: 2671 0000A4DB 01FA <1> add dx, di ; - free space start + free space end 2672 <1> ; = free space size 2673 0000A4DD 730A <1> jnc .delete ; invalid (shouldn't happen) --> 2674 0000A4DF 7408 <1> jz .delete ; zero bytes free --> 2675 0000A4E1 4A <1> dec dx 2676 0000A4E2 7405 <1> jz .delete ; one byte free --> 2677 0000A4E4 4A <1> dec dx 2678 <1> ; jz .delete ; one or two bytes free --> 2679 <1> ; Commented, a zero will fail the next check 2680 <1> ; already. Unless we modify the above code 2681 <1> ; so that empty lines can be entered into 2682 <1> ; the history, at which point we do not want 2683 <1> ; to fail the insertion when only two bytes 2684 <1> ; are free, ie enough for the displacement and 2685 <1> ; a zero-byte length text. 2686 <1> 2687 0000A4E5 39D1 <1> cmp cx, dx 2688 0000A4E7 7646 <1> jbe .insert ; enough bytes for the new entry --> 2689 <1> .delete: 2690 0000A4E9 3B06[6E0B] <1> cmp ax, word [history.first] 2691 0000A4ED 7508 <1> jne @F 2692 <1> 2693 <1> .error: 2694 0000A4EF BA[E61F] <1> mov dx, msg.history_internal_error 2695 0000A4F2 E8BEFA <1> call putsz 2696 0000A4F5 EB4A <1> jmp .dontenter 2697 <1> 2698 <1> @@: 2699 0000A4F7 89C7 <1> mov di, ax ; -> at last displacement 2700 0000A4F9 268B3D <1> mov di, [es:di] ; + bx -> after last entry's text 2701 0000A4FC 8B36[6E0B] <1> mov si, word [history.first] 2702 0000A500 268B74FE <1> mov si, [es:si - 2] ; + bx -> at second entry's text 2703 0000A504 29F7 <1> sub di, si ; = after last - after first 2704 <1> ; = text length excluding first 2705 0000A506 89F9 <1> mov cx, di ; length to move 2706 0000A508 56 <1> push si 2707 0000A509 01DE <1> add si, bx ; -> after first entry's text 2708 0000A50B 89DF <1> mov di, bx ; -> start of buffer 2709 0000A50D 06 <1> push es 2710 0000A50E 1F <1> pop ds 2711 0000A50F F3A4 <1> rep movsb ; move subsequent text 2712 0000A511 59 <1> pop cx ; = how far we moved (deleted text length) 2713 0000A512 89C7 <1> mov di, ax ; -> at last displacement 2714 0000A514 8B15 <1> mov dx, word [di] ; load last displacement 2715 <1> @@: 2716 0000A516 47 <1> inc di 2717 0000A517 47 <1> inc di ; -> prior displacement 2718 0000A518 363B3E[6E0B] <1> cmp di, word [ss:history.first] 2719 0000A51D 7306 <1> jae @F ; (hardened, shouldn't ever be above) 2720 0000A51F 29CA <1> sub dx, cx ; adjust next displacement 2721 <1> ; by deleted text length 2722 0000A521 8715 <1> xchg word [di], dx ; store in prior displacement 2723 <1> ; and load its old value 2724 0000A523 EBF1 <1> jmp @B 2725 <1> 2726 <1> @@: 2727 0000A525 16 <1> push ss 2728 0000A526 1F <1> pop ds 2729 0000A527 8306[700B]02 <1> add word [history.last], 2 2730 <1> ; deleted one displacement 2731 0000A52C E968FF <1> jmp .loop 2732 <1> 2733 <1> .insert: 2734 0000A52F 89C7 <1> mov di, ax 2735 0000A531 48 <1> dec ax 2736 0000A532 48 <1> dec ax 2737 0000A533 A3[700B] <1> mov word [history.last], ax 2738 0000A536 268B3D <1> mov di, word [es:di] 2739 0000A539 01DF <1> add di, bx 2740 0000A53B F3A4 <1> rep movsb 2741 0000A53D 29DF <1> sub di, bx 2742 0000A53F 97 <1> xchg di, ax ; es:di -> new last history displacement, 2743 <1> ; ax -> after history text 2744 0000A540 AB <1> stosw 2745 <1> 2746 <1> .dontenter: 2747 0000A541 16 <1> push ss 2748 0000A542 07 <1> pop es 2749 <1> %endif 2750 <1> 2751 <1> getline_eol: 2752 0000A543 F606[D900]08 <1> testopt [internalflags3], dif3_quiet_input_single 2753 0000A548 750A <1> jnz @F 2754 0000A54A B00D <1> mov al, 13 2755 0000A54C E886FA <1> call putc ; fix ZDOS Int21.0A display bug 2756 0000A54F B00A <1> mov al, 10 2757 0000A551 E881FA <1> call putc 2758 <1> @@: 2759 <1> set_si_line_in_and_skipwhite: 2760 0000A554 BE[0200] <1> mov si, line_in+2 2761 0000A557 E985F4 <1> jmp skipwhite ; NC 2762 <1> 2763 <1> 2764 <1> %if _PM 2765 <1> getline_extra_uninstall: 2766 <1> mov dx, debug22 2767 <1> mov ax, 2522h 2768 <1> int 21h 2769 <1> mov word [TPIV], dx ; restore default int 22h (PRI) 2770 <1> mov si, getline_extra_int23 2771 <1> mov al, 23h 2772 <1> mov dx, -1 2773 <1> call UnhookInterruptForce 2774 <1> ; restore DPMI host's int 23h handler 2775 <1> jmp resetmode ; return to PM 2776 <1> 2777 <1> usesection lDEBUG_DATA_ENTRY 2778 <1> 2779 <1> iispentry getline_extra_int23 2780 <1> stc 2781 <1> retf ; indicate to abort syscall and process 2782 <1> 2783 <1> align 2 2784 <1> getline_extra_int22: 2785 <1> cli 2786 <1> .cleartraceflag: 2787 <1> cld ; reestablish things 2788 <1> mov ax, cs 2789 <1> mov ds, ax 2790 <1> mov ss, ax 2791 <1> mov sp, word [ savesp ] ; restore stack 2792 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 2793 <1> call entry_to_code_seg 2794 <1> dw .code 2795 <1> 2796 <1> usesection lDEBUG_CODE 2797 <1> 2798 <1> .code: 2799 <1> 2800 <1> _386_o32 ; mov esp 2801 <1> mov sp, word [ savesp ] ; restore stack 2802 <1> _386 and sp, ~3 ; align stack 2803 <1> _386_o32 2804 <1> xor ax, ax 2805 <1> _386_o32 2806 <1> push ax 2807 <1> _386_o32 2808 <1> popf 2809 <1> _386 mov sp, word [ savesp ] ; restore stack 2810 <1> cld 2811 <1> sti 2812 <1> 2813 <1> call getline_extra_uninstall 2814 <1> ; undo patches and return to PM 2815 <1> jmp handle_ctrl_c ; go to common handler --> 2816 <1> %endif 2817 <1> 2818 <1> 2819 <1> getline_is_input_file?: 2820 0000A55A F606[D800]20 <1> testopt [internalflags3], dif3_input_serial_override 2821 0000A55F 7530 <1> jnz .nofile 2822 0000A561 F606[DB00]01 <1> testopt [internalflags3], dif3_input_re 2823 0000A566 7528 <1> jnz .file 2824 0000A568 F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 2825 0000A56D 7521 <1> jnz .file 2826 <1> %if _INPUT_FILE_BOOT 2827 0000A56F F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 2828 0000A574 751A <1> jnz .file 2829 <1> %endif 2830 0000A576 E8F0DF <1> call InDOS_or_BIOS_IO 2831 0000A579 7516 <1> jnz .nofile ; InDOS, not reading from a file --> 2832 <1> %if _INPUT_FILE_HANDLES 2833 0000A57B F606[D600]10 <1> testopt [internalflags2], dif2_input_file 2834 0000A580 750E <1> jnz .file 2835 <1> %endif 2836 0000A582 F606[150C]10 <1> testopt [serial_flags], sf_use_serial 2837 0000A587 7508 <1> jnz .nofile 2838 0000A589 803E[540B]00 <1> cmp byte [notatty], 0 ; check this weird flag 2839 0000A58E 7401 <1> je .nofile ; not reading from a file --> 2840 <1> 2841 <1> .file: 2842 0000A590 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 2843 <1> .nofile: 2844 0000A591 F9 <1> stc 2845 0000A592 C3 <1> retn 2846 <1> 2847 <1> 2848 <1> getline_close_file: 2849 0000A593 51 <1> push cx 2850 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 2851 <1> ; EOF reached. if not input file, quit. else, close input file. 2852 0000A594 F606[DB00]01 <1> testopt [internalflags3], dif3_input_re 2853 0000A599 7515 <1> jnz .re 2854 <1> %if _INPUT_FILE_HANDLES && _INPUT_FILE_BOOT 2855 0000A59B F706[D600]1002 <1> testopt [internalflags2], dif2_input_file | dif2_input_file_boot, 1 2856 0000A5A1 750A <1> jnz @F 2857 <1> %elif _INPUT_FILE_HANDLES 2858 <1> testopt [internalflags2], dif2_input_file 2859 <1> jnz @F 2860 <1> %elif _INPUT_FILE_BOOT 2861 <1> testopt [internalflags2], dif2_input_file_boot 2862 <1> jnz @F 2863 <1> %endif 2864 0000A5A3 F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 2865 0000A5A8 744C <1> jz .qq ; if EOF, quit --> 2866 <1> 2867 0000A5AA B1FE <1> mov cl, -2 2868 0000A5AC A9 <1> db __TEST_IMM16 2869 <1> @@: 2870 0000A5AD 31C9 <1> xor cx, cx 2871 0000A5AF A9 <1> db __TEST_IMM16 2872 <1> .re: 2873 0000A5B0 B1FF <1> mov cl, -1 2874 <1> 2875 0000A5B2 51 <1> push cx 2876 0000A5B3 E85300 <1> call .resetstuff 2877 0000A5B6 59 <1> pop cx 2878 <1> 2879 0000A5B7 E302 <1> jcxz .notre 2880 0000A5B9 EB15 <1> jmp @F 2881 <1> 2882 <1> .notre: 2883 0000A5BB 59 <1> pop cx 2884 0000A5BC F606[D900]04 <1> testopt [internalflags3], dif3_at_line_end 2885 0000A5C1 750C <1> jnz .return ; (NZ) 2886 <1> 2887 0000A5C3 B80D0A <1> mov ax, 13 | 10 << 8 ; pretend we read a CR LF sequence 2888 0000A5C6 AB <1> stosw 2889 0000A5C7 893E[640B] <1> mov word [bufend], di 2890 0000A5CB 4F <1> dec di 2891 0000A5CC 4F <1> dec di 2892 0000A5CD 38C0 <1> cmp al, al ; ZR 2893 <1> .return: 2894 0000A5CF C3 <1> retn 2895 <1> 2896 <1> @@: 2897 0000A5D0 80F9FE <1> cmp cl, -2 2898 0000A5D3 59 <1> pop cx 2899 0000A5D4 7410 <1> je .finish_cmdline 2900 <1> 2901 <1> .finish_re: 2902 0000A5D6 F606[D900]04 <1> testopt [internalflags3], dif3_at_line_end 2903 0000A5DB 7506 <1> jnz @F 2904 0000A5DD BA[B11D] <1> mov dx, msg.unexpected_noneol_re 2905 0000A5E0 E8CAF9 <1> call putsz_error 2906 <1> @@: 2907 0000A5E3 E9A983 <1> jmp dumpregs_extended.exit 2908 <1> 2909 <1> .finish_cmdline: 2910 0000A5E6 F606[D900]04 <1> testopt [internalflags3], dif3_at_line_end 2911 0000A5EB 7506 <1> jnz @F 2912 0000A5ED BA[DF1D] <1> mov dx, msg.unexpected_noneol_rc 2913 0000A5F0 E8BAF9 <1> call putsz_error 2914 <1> @@: 2915 0000A5F3 E90A5A <1> jmp cmd3 2916 <1> %endif 2917 <1> 2918 <1> .qq: 2919 0000A5F6 C606[0200]0D <1> mov byte [line_in + 2], 13 2920 0000A5FB E856FF <1> call set_si_line_in_and_skipwhite 2921 0000A5FE 830E[480A]08 <1> or word [cmd3_set_options], fakeindos 2922 0000A603 E824CF <1> call qq ; if EOF, quit --> 2923 0000A606 E9F759 <1> jmp cmd3 2924 <1> 2925 <1> .resetstuff: 2926 0000A609 57 <1> push di 2927 0000A60A E846FB <1> call yy_close_file ; close file 2928 0000A60D 5F <1> pop di 2929 <1> 2930 <1> %if _NEWFULLHANDLING 2931 0000A60E C706[620B][0300] <1> mov word [bufnext], line_in + 3 2932 0000A614 C706[640B][0300] <1> mov word [bufend], line_in + 3 2933 <1> %else 2934 <1> mov word [bufnext], line_in + 2 2935 <1> mov word [bufend], line_in + 2 2936 <1> %endif 2937 <1> 2938 0000A61A E89B04 <1> call getline_reset_notatty 2939 <1> 2940 0000A61D E93860 <1> jmp determine_quiet_output 2941 <1> 2942 <1> 2943 <1> getinput: 2944 <1> lframe 2945 <1> lequ 254, limit 2946 <1> lvar word, columns 2947 <1> lvar word, maxpercol 2948 <1> lvar word, maxpercolhalf 2949 0000A620 5589E58D66FA <1> lenter 2950 0000A626 06 <1> push es 2951 0000A627 52 <1> push dx 2952 <1> lvar dword, prompt ; (in line_out buffer) 2953 0000A628 31C0 <1> xor ax, ax 2954 <1> %if _HISTORY 2955 0000A62A 50 <1> push ax 2956 <1> lvar word, historyentry 2957 <1> %endif 2958 0000A62B 50 <1> push ax 2959 <1> lvar word, length_displayed 2960 0000A62C 50 <1> push ax 2961 <1> lvar word, length_input 2962 0000A62D 50 <1> push ax 2963 <1> lvar word, offset 2964 0000A62E 50 <1> push ax 2965 <1> lvar word, lastskip 2966 0000A62F 50 <1> push ax 2967 <1> lvar word, low_redraw_and_high_beep 2968 <1> lequ ?low_redraw_and_high_beep, redraw 2969 <1> lequ ?low_redraw_and_high_beep + 1, beep 2970 0000A630 50 <1> push ax 2971 <1> lvar word, low_cursormove_and_high_append 2972 <1> lequ ?low_cursormove_and_high_append, cursormove 2973 <1> lequ ?low_cursormove_and_high_append + 1,append 2974 0000A631 50 <1> push ax 2975 <1> lvar word, low_cursorright_and_high_edited 2976 <1> lequ ?low_cursorright_and_high_edited, cursorright 2977 <1> lequ ?low_cursorright_and_high_edited + 1, edited 2978 0000A632 51 <1> push cx 2979 <1> lvar word, column 2980 0000A633 51 <1> push cx 2981 <1> lvar word, promptlength 2982 <1> 2983 0000A634 57 <1> push di 2984 0000A635 1E <1> push ds 2985 0000A636 07 <1> pop es 2986 <1> 2987 <1> .next: 2988 0000A637 E83B9D <1> call handle_serial_flags_ctrl_c 2989 <1> 2990 0000A63A D046EA <1> rol byte [bp + ?redraw], 1 2991 0000A63D 7203E90701 <1> jnc .no_do_redraw 2992 <1> .do_redraw: 2993 <1> 2994 0000A642 E8EC03 <1> call get_columns 2995 <1> 2996 0000A645 8946FE <1> mov word [bp + ?columns], ax 2997 0000A648 48 <1> dec ax ; $COLS - 1 2998 0000A649 2B46E2 <1> sub ax, word [bp + ?promptlength]; - $promptlength 2999 0000A64C 8946FC <1> mov word [bp + ?maxpercol], ax 3000 0000A64F D1E8 <1> shr ax, 1 ; int($maxpercol / 2) 3001 0000A651 7501 <1> jnz @F 3002 0000A653 40 <1> inc ax ; insure nonzero 3003 <1> @@: 3004 0000A654 8946FA <1> mov word [bp + ?maxpercolhalf], ax 3005 <1> 3006 0000A657 8B46F0 <1> mov ax, [bp + ?length_input] 3007 0000A65A 89C1 <1> mov cx, ax 3008 0000A65C 31FF <1> xor di, di ; variable "skip" 3009 <1> ; + line_in + 2 -> to display 3010 0000A65E 3B46FC <1> cmp ax, word [bp + ?maxpercol] 3011 0000A661 8B46E4 <1> mov ax, word [bp + ?column] ; variable "col" 3012 0000A664 763B <1> jna .not_show_a_maxpercol 3013 <1> .show_a_maxpercol: 3014 <1> 3015 0000A666 8B56FC <1> mov dx, word [bp + ?maxpercol] 3016 0000A669 0356E2 <1> add dx, word [bp + ?promptlength] 3017 <1> 3018 0000A66C 8B5EEC <1> mov bx, word [bp + ?lastskip] 3019 0000A66F 395EEE <1> cmp word [bp + ?offset], bx 3020 0000A672 7307 <1> jae .offset_ae_lastskip ; spaghetti branch --> 3021 <1> .not_offset_ae_lastskip: 3022 <1> 3023 <1> @@: 3024 0000A674 39D0 <1> cmp ax, dx 3025 0000A676 760B <1> jna .not_col_a_maxpercol 3026 <1> .col_a_maxpercol: 3027 0000A678 8B5EFA <1> mov bx, [bp + ?maxpercolhalf] ; bx = step length 3028 <1> 3029 <1> .offset_ae_lastskip: ; spaghetti branch target, re-uses the 3030 <1> ; code of .col_a_maxpercol 3031 <1> ; sub ax, bx ; col -= lastskip 3032 <1> ; add di, bx ; skip += lastskip 3033 <1> ; sub cx, bx ; lessen length of part to display 3034 0000A67B 29D8 <1> sub ax, bx ; lessen col 3035 0000A67D 01DF <1> add di, bx ; heighten offset of part to display 3036 0000A67F 29D9 <1> sub cx, bx ; lessen length of part to display 3037 0000A681 EBF1 <1> jmp @B 3038 <1> 3039 <1> .not_col_a_maxpercol: 3040 0000A683 3B7EEC <1> cmp di, word [bp + ?lastskip] ; scrolling forwards ? 3041 0000A686 7711 <1> ja @F ; yes --> (else backwards or same) 3042 <1> ; The next check should be redundant with the 3043 <1> ; one after it. However, the call to puts with 3044 <1> ; the comment "draw (to move cursor)" will 3045 <1> ; underflow its counter if ax is decremented 3046 <1> ; when it was below-or-equal ?promptlength. 3047 <1> ; Therefore, this check hardens against that. 3048 <1> ; By checking here we ensure that the sub there 3049 <1> ; doesn't underflow, staying above-or-equal 0. 3050 0000A688 3B46E2 <1> cmp ax, word [bp + ?promptlength] 3051 <1> ; possibly at end ? 3052 0000A68B 760C <1> jbe @F ; no --> 3053 0000A68D 39D0 <1> cmp ax, dx ; are we at end ? 3054 0000A68F 7508 <1> jne @F ; no --> 3055 0000A691 3B4EFC <1> cmp cx, word [bp + ?maxpercol] ; displaying the last fragment ? 3056 0000A694 7603 <1> jbe @F ; yes, do not move up --> 3057 0000A696 48 <1> dec ax 3058 0000A697 47 <1> inc di 3059 0000A698 49 <1> dec cx ; move up display by one column 3060 <1> @@: 3061 0000A699 3B4EFC <1> cmp cx, word [bp + ?maxpercol] 3062 0000A69C 7603 <1> jbe @F 3063 0000A69E 8B4EFC <1> mov cx, word [bp + ?maxpercol] 3064 <1> @@: 3065 <1> .not_show_a_maxpercol: 3066 0000A6A1 397EEC <1> cmp word [bp + ?lastskip], di ; need to scroll ? 3067 0000A6A4 7408 <1> je @F ; no --> 3068 0000A6A6 8366E800 <1> and word [bp + ?low_cursormove_and_high_append], 0 3069 <1> ; yes, ignore appending status 3070 <1> ; ignore cursor move status too 3071 0000A6AA C646E600 <1> mov byte [bp + ?cursorright], 0 ; also reset this flag 3072 <1> @@: 3073 <1> 3074 0000A6AE 897EEC <1> mov word [bp + ?lastskip], di ; update variable for next iteration 3075 0000A6B1 8D95[0200] <1> lea dx, [di + line_in + 2] ; -> visible text's data 3076 <1> 3077 0000A6B5 89CB <1> mov bx, cx 3078 0000A6B7 875EF2 <1> xchg bx, word [bp + ?length_displayed] 3079 <1> ; bx = remember how much we had, 3080 <1> ; and update variable 3081 <1> 3082 0000A6BA D046E8 <1> rol byte [bp + ?cursormove], 1 ; cursor move without visible window move ? 3083 0000A6BD 7250 <1> jc .redraw_always_move_cursor ; yes, skip full redraw and also 3084 <1> ; force to do cursor movement --> 3085 0000A6BF 50 <1> push ax 3086 0000A6C0 53 <1> push bx 3087 0000A6C1 51 <1> push cx 3088 0000A6C2 52 <1> push dx 3089 <1> ; On stack: 3090 <1> ; -> start of visible text's data 3091 <1> ; length of visible text 3092 <1> ; prior length of visible text (from prior iteration) 3093 <1> ; variable "col" 3094 0000A6C3 D046E9 <1> rol byte [bp + ?append], 1 ; text appended without visible window move ? 3095 0000A6C6 730E <1> jnc .not_append_redraw ; no, do full redraw --> 3096 0000A6C8 F656E9 <1> not byte [bp + ?append] ; = 0, reset flag after its use 3097 0000A6CB 01CA <1> add dx, cx ; -> behind text to write 3098 0000A6CD 4A <1> dec dx ; -> at last codepoint (appended) 3099 0000A6CE B90100 <1> mov cx, 1 ; only append 3100 <1> %if _GETLINEHIGHLIGHT 3101 <1> ; This appended text is always the very last text 3102 <1> ; in the buffer so it never should get highlighted. 3103 <1> ; If this build option is not in use then the next 3104 <1> ; branch is to the call puts below, re-using that 3105 <1> ; call there that's also used for the full redraw. 3106 0000A6D1 E8FAF3 <1> call puts ; draw appended text 3107 <1> %endif 3108 0000A6D4 EB1A <1> jmp .after_append_redraw ; skip past more prompt/text redraw 3109 <1> 3110 <1> .not_append_redraw: 3111 0000A6D6 51 <1> push cx 3112 0000A6D7 52 <1> push dx 3113 0000A6D8 B00D <1> mov al, 13 3114 0000A6DA E8F8F8 <1> call putc ; reset to start of line 3115 <1> 3116 0000A6DD C456F6 <1> les dx, [bp + ?prompt] 3117 0000A6E0 8B4EE2 <1> mov cx, [bp + ?promptlength] 3118 0000A6E3 E8E8F3 <1> call puts ; redraw the prompt 3119 0000A6E6 16 <1> push ss 3120 0000A6E7 07 <1> pop es ; reset es 3121 0000A6E8 5A <1> pop dx 3122 0000A6E9 59 <1> pop cx ; restore registers for text redraw 3123 <1> %if _GETLINEHIGHLIGHT 3124 <1> ; di for prefix highlight condition 3125 0000A6EA 8B5EF0 <1> mov bx, word [bp + ?length_input] 3126 <1> ; bx for suffix highlight condition 3127 0000A6ED E87103 <1> call puts_with_highlight ; redraw the text 3128 <1> .after_append_redraw: 3129 <1> %else 3130 <1> .after_append_redraw: 3131 <1> call puts ; redraw the text 3132 <1> %endif 3133 0000A6F0 5A <1> pop dx 3134 0000A6F1 5B <1> pop bx 3135 0000A6F2 59 <1> pop cx 3136 <1> ; dx -> start of visible text's data 3137 <1> ; bx = new length of visible text 3138 <1> ; cx = prior length of visible text (from prior iteration) 3139 <1> ; on stack = variable "col" 3140 0000A6F3 29D9 <1> sub cx, bx ; = how many blanks needed to overwrite 3141 0000A6F5 7609 <1> jbe @FF 3142 0000A6F7 01CB <1> add bx, cx ; = length displayed 3143 0000A6F9 B020 <1> mov al, 32 3144 <1> @@: 3145 0000A6FB E8D7F8 <1> call putc 3146 0000A6FE E2FB <1> loop @B 3147 <1> @@: 3148 0000A700 58 <1> pop ax 3149 <1> ; dx -> start of visible text's data 3150 <1> ; ax = variable "col" 3151 <1> ; bx = length of redrawn text (including blanks), 3152 <1> ; this indicates where the cursor is 3153 <1> 3154 <1> ; The following check determines whether the 3155 <1> ; cursor is already where we want it to be 3156 <1> ; after the full redraw is done, including the 3157 <1> ; blanks after the visible text that were used 3158 <1> ; to erase the prior visible text (if any). 3159 <1> ; If this branches then the cursor movement is 3160 <1> ; not needed and thus we're done redrawing. 3161 0000A701 01D3 <1> add bx, dx 3162 0000A703 81EB[0200] <1> sub bx, line_in + 2 ; offset into line (with length displayed) 3163 0000A707 035EE2 <1> add bx, word [bp + ?promptlength]; offset into display 3164 0000A70A 3B5EE4 <1> cmp bx, word [bp + ?column] ; same as column ? 3165 0000A70D 7437 <1> je .do_redraw_done ; yes, skip cursor movement stuff --> 3166 <1> 3167 <1> .redraw_always_move_cursor: 3168 0000A70F C646E800 <1> mov byte [bp + ?cursormove], 0 ; reset flag after its use 3169 <1> 3170 <1> ; dx -> start of visible text's data 3171 <1> ; ax = variable "col" 3172 0000A713 D046E6 <1> rol byte [bp + ?cursorright], 1 ; only cursor to the right without 3173 <1> ; having to scroll the visible text ? 3174 0000A716 7312 <1> jnc @F ; no, do redraw --> 3175 0000A718 F656E6 <1> not byte [bp + ?cursorright] ; = 0, reset for next iteration 3176 0000A71B B90100 <1> mov cx, 1 ; length of text to write 3177 0000A71E 2B46E2 <1> sub ax, word [bp + ?promptlength] 3178 <1> ; = offset into input text 3179 0000A721 48 <1> dec ax ; -> last codepoint of text 3180 <1> ;; test ax, ax ; at start of visible text ? 3181 0000A722 741D <1> jz .redraw_cursorright ; yes, leave di so as to highlight 3182 <1> ; the prefix as appropriate --> 3183 <1> ; (and dx is correct, we'd add zero) 3184 0000A724 31FF <1> xor di, di ; else, tell it not to highlight 3185 0000A726 01C2 <1> add dx, ax ; dx = "skip" + line_in + 2 + index 3186 0000A728 EB17 <1> jmp .redraw_cursorright 3187 <1> 3188 <1> @@: 3189 0000A72A 50 <1> push ax 3190 0000A72B 52 <1> push dx 3191 0000A72C B00D <1> mov al, 13 3192 0000A72E E8A4F8 <1> call putc ; reset cursor 3193 0000A731 C456F6 <1> les dx, [bp + ?prompt] 3194 0000A734 8B4EE2 <1> mov cx, [bp + ?promptlength] 3195 0000A737 E894F3 <1> call puts ; redraw prompt 3196 0000A73A 16 <1> push ss 3197 0000A73B 07 <1> pop es 3198 0000A73C 5A <1> pop dx ; -> current input text 3199 0000A73D 59 <1> pop cx ; = col 3200 0000A73E 2B4EE2 <1> sub cx, word [bp + ?promptlength] 3201 <1> ; = offset into input text, 3202 <1> ; draw that much 3203 <1> .redraw_cursorright: 3204 <1> %if _GETLINEHIGHLIGHT 3205 <1> ; ! di is still set to lastskip value, 3206 <1> ; or reset to zero if cursor right with 3207 <1> ; just a single codepoint redraw but the 3208 <1> ; codepoint to redraw is not at the start 3209 <1> ; of the visible text. 3210 <1> ; di for prefix highlight condition 3211 <1> ; We need to make sure that the suffix is never 3212 <1> ; highlighted here because we are writing a 3213 <1> ; fragment that does not include the last part 3214 <1> ; of the visible text. By zeroing bx we can 3215 <1> ; ensure the suffix highlight condition is 3216 <1> ; always considered to be false. 3217 0000A741 31DB <1> xor bx, bx ; bx = 0, never highlight a suffix 3218 0000A743 E81B03 <1> call puts_with_highlight 3219 <1> %else 3220 <1> call puts ; draw (to move cursor) 3221 <1> %endif 3222 <1> 3223 <1> .do_redraw_done: 3224 0000A746 F656EA <1> not byte [bp + ?redraw] ; = 0 3225 <1> 3226 <1> .no_do_redraw: 3227 <1> 3228 0000A749 D046EB <1> rol byte [bp + ?beep], 1 3229 0000A74C 7308 <1> jnc .no_do_beep 3230 <1> .do_beep: 3231 0000A74E B007 <1> mov al, 7 3232 0000A750 E882F8 <1> call putc 3233 <1> 3234 0000A753 F656EB <1> not byte [bp + ?beep] ; = 0 3235 <1> .no_do_beep: 3236 <1> 3237 0000A756 E8BDF8 <1> call getc ; ax = keycode, al = ASCII or 0 3238 <1> 3239 <1> ; check scancode for int 16h in non-dumb dosemu first 3240 0000A759 86C4 <1> xchg al, ah 3241 0000A75B 3C48 <1> cmp al, 48h 3242 0000A75D 7503E9F501 <1> je .up 3243 0000A762 3C4B <1> cmp al, 4Bh 3244 0000A764 7503E9C201 <1> je .left 3245 0000A769 3C50 <1> cmp al, 50h 3246 0000A76B 7503E90202 <1> je .down 3247 0000A770 3C4D <1> cmp al, 4Dh 3248 0000A772 7503E9C701 <1> je .right 3249 0000A777 3C52 <1> cmp al, 52h 3250 0000A779 7503E94B02 <1> je .insert 3251 0000A77E 3C53 <1> cmp al, 53h 3252 0000A780 7503E96801 <1> je .del 3253 0000A785 3C47 <1> cmp al, 47h 3254 0000A787 7503E98501 <1> je .home 3255 0000A78C 3C4F <1> cmp al, 4Fh 3256 0000A78E 7503E98A01 <1> je .end 3257 0000A793 3C49 <1> cmp al, 49h 3258 0000A795 7503E92F02 <1> je .pageup 3259 0000A79A 3C51 <1> cmp al, 51h 3260 0000A79C 7503E92802 <1> je .pagedown 3261 <1> 3262 <1> ; not a special scancode, check character returned 3263 0000A7A1 86C4 <1> xchg al, ah 3264 0000A7A3 3C1B <1> cmp al, 1Bh 3265 0000A7A5 7403E98B00 <1> jne .not_esc 3266 <1> 3267 <1> ; check escape scancodes for int 16h in -dumb dosemu 3268 <1> ; or input from serial I/O (picocom/screen/ssh/mate-terminal) 3269 <1> .esc: 3270 0000A7AA E869F8 <1> call getc 3271 0000A7AD 3C5B <1> cmp al, '[' 3272 0000A7AF 7403E91502 <1> jne .beep 3273 0000A7B4 E85FF8 <1> call getc 3274 0000A7B7 3C41 <1> cmp al, 41h 3275 0000A7B9 7503E99901 <1> je .up 3276 0000A7BE 3C44 <1> cmp al, 44h 3277 0000A7C0 7503E96601 <1> je .left 3278 0000A7C5 3C42 <1> cmp al, 42h 3279 0000A7C7 7503E9A601 <1> je .down 3280 0000A7CC 3C43 <1> cmp al, 43h 3281 0000A7CE 7503E96B01 <1> je .right 3282 0000A7D3 3C32 <1> cmp al, 32h 3283 0000A7D5 7425 <1> je .check_insert 3284 0000A7D7 3C33 <1> cmp al, 33h 3285 0000A7D9 7421 <1> je .check_del 3286 0000A7DB 3C31 <1> cmp al, 31h 3287 0000A7DD 741D <1> je .check_home 3288 0000A7DF 3C34 <1> cmp al, 34h 3289 0000A7E1 7419 <1> je .check_end 3290 0000A7E3 3C48 <1> cmp al, 48h 3291 0000A7E5 7503E92701 <1> je .home 3292 0000A7EA 3C46 <1> cmp al, 46h 3293 0000A7EC 7503E92C01 <1> je .end 3294 0000A7F1 3C35 <1> cmp al, 35h 3295 0000A7F3 7407 <1> je .check_pageup 3296 0000A7F5 3C36 <1> cmp al, 36h 3297 0000A7F7 7403 <1> je .check_pagedown 3298 0000A7F9 E9CD01 <1> jmp .beep 3299 <1> 3300 <1> 3301 <1> .check_insert: 3302 <1> .check_del: 3303 <1> .check_home: 3304 <1> .check_end: 3305 <1> .check_pageup: 3306 <1> .check_pagedown: 3307 0000A7FC 50 <1> push ax 3308 0000A7FD E816F8 <1> call getc 3309 0000A800 3C7E <1> cmp al, 7Eh 3310 0000A802 58 <1> pop ax 3311 0000A803 7403E9C101 <1> jne .beep 3312 <1> 3313 0000A808 3C32 <1> cmp al, 32h 3314 0000A80A 7503E9BA01 <1> je .insert 3315 0000A80F 3C33 <1> cmp al, 33h 3316 0000A811 7503E9D700 <1> je .del 3317 0000A816 3C31 <1> cmp al, 31h 3318 0000A818 7503E9F400 <1> je .home 3319 0000A81D 3C34 <1> cmp al, 34h 3320 0000A81F 7503E9F900 <1> je .end 3321 0000A824 3C35 <1> cmp al, 35h 3322 0000A826 7503E99E01 <1> je .pageup 3323 0000A82B 3C36 <1> cmp al, 36h 3324 0000A82D 7503E99701 <1> je .pagedown 3325 <1> 3326 0000A832 E99401 <1> jmp .beep 3327 <1> 3328 <1> 3329 <1> .not_esc: 3330 <1> ; check regular characters 3331 0000A835 84C0 <1> test al, al ; waste? 3332 0000A837 7503E9FBFD <1> je .next 3333 0000A83C 3CE0 <1> cmp al, 0E0h 3334 0000A83E 7503E9F4FD <1> je .next ; waste --> 3335 <1> 3336 0000A843 3C01 <1> cmp al, 'A' - '@' 3337 0000A845 7503E9C700 <1> je .home 3338 0000A84A 3C05 <1> cmp al, 'E' - '@' 3339 0000A84C 7503E9CC00 <1> je .end 3340 0000A851 3C03 <1> cmp al, 03h 3341 0000A853 7503E97801 <1> je .ctrlc 3342 0000A858 3C09 <1> cmp al, 09h 3343 0000A85A 7503E96A01 <1> je .beep ; tab 3344 0000A85F 3C08 <1> cmp al, 08h 3345 0000A861 745F <1> je .backspace 3346 0000A863 3C7F <1> cmp al, 7Fh 3347 <1> ; On the server in int 16h of -dumb dosemu, as well as on 3348 <1> ; both systems across serial I/O this code is used. 3349 0000A865 745B <1> je .backspace 3350 0000A867 3C0A <1> cmp al, 10 ; (allow Linux style linebreak) 3351 0000A869 7503E96501 <1> je .done 3352 0000A86E 3C0D <1> cmp al, 13 ; (match for CR keypress) 3353 0000A870 7503E95E01 <1> je .done 3354 <1> 3355 <1> .textcodepoint: 3356 0000A875 8B5EF0 <1> mov bx, word [bp + ?length_input] 3357 0000A878 81FBFE00 <1> cmp bx, ?limit 3358 0000A87C 7207 <1> jb @F 3359 <1> .redraw_and_beep: 3360 0000A87E C646EAFF <1> mov byte [bp + ?redraw], -1 3361 0000A882 E94401 <1> jmp .beep 3362 <1> @@: 3363 <1> 3364 0000A885 C646E7FF <1> mov byte [bp + ?edited], -1 3365 0000A889 8B56F0 <1> mov dx, word [bp + ?length_input] 3366 0000A88C 89D1 <1> mov cx, dx 3367 0000A88E 89D7 <1> mov di, dx 3368 0000A890 16 <1> push ss 3369 0000A891 07 <1> pop es 3370 0000A892 81C7[0200] <1> add di, line_in + 2 ; di -> behind end of input 3371 0000A896 89FE <1> mov si, di 3372 0000A898 4E <1> dec si ; si -> at last entry of input 3373 0000A899 2B4EEE <1> sub cx, word [bp + ?offset] 3374 0000A89C 7504 <1> jnz @F ; not appending --> 3375 <1> .textappend: 3376 0000A89E C646E9FF <1> mov byte [bp + ?append], -1 3377 <1> @@: 3378 0000A8A2 FD <1> std ; AMD erratum 109 workaround done 3379 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 3380 <1> %if _AMD_ERRATUM_109_WORKAROUND 3381 0000A8A3 E308 <1> jcxz @FF 3382 0000A8A5 83F914 <1> cmp cx, 20 3383 0000A8A8 7703 <1> ja @FF 3384 <1> @@: 3385 0000A8AA A4 <1> movsb 3386 0000A8AB E2FD <1> loop @B 3387 <1> @@: 3388 <1> %endif 3389 0000A8AD F3A4 <1> rep movsb 3390 0000A8AF FC <1> cld 3391 0000A8B0 8805 <1> mov byte [di], al 3392 0000A8B2 FF46E4 <1> inc word [bp + ?column] 3393 0000A8B5 FF46EE <1> inc word [bp + ?offset] 3394 0000A8B8 FF46F0 <1> inc word [bp + ?length_input] 3395 <1> .redraw: 3396 0000A8BB C646EAFF <1> mov byte [bp + ?redraw], -1 3397 0000A8BF E975FD <1> jmp .next 3398 <1> 3399 <1> .backspace: 3400 0000A8C2 837EEE00 <1> cmp word [bp + ?offset], 0 3401 0000A8C6 7422 <1> je .backspace_offset_0 3402 <1> 3403 0000A8C8 C646E7FF <1> mov byte [bp + ?edited], -1 3404 0000A8CC 16 <1> push ss 3405 0000A8CD 07 <1> pop es 3406 0000A8CE 8B7EEE <1> mov di, word [bp + ?offset] 3407 0000A8D1 8B4EF0 <1> mov cx, word [bp + ?length_input] 3408 0000A8D4 29F9 <1> sub cx, di ; length after offset 3409 0000A8D6 81C7[0200] <1> add di, line_in + 2 ; -> at offset in line 3410 0000A8DA 89FE <1> mov si, di ; -> at offset in line 3411 0000A8DC 4F <1> dec di ; -> at offset - 1 in line 3412 0000A8DD F3A4 <1> rep movsb ; move down additional content 3413 0000A8DF FF4EE4 <1> dec word [bp + ?column] 3414 0000A8E2 FF4EEE <1> dec word [bp + ?offset] 3415 0000A8E5 FF4EF0 <1> dec word [bp + ?length_input] 3416 0000A8E8 EBD1 <1> jmp .redraw 3417 <1> 3418 <1> .backspace_offset_0: 3419 <1> .del_offset_ae_length_input: 3420 <1> .left_offset_0: 3421 <1> .right_offset_too_high: 3422 0000A8EA E9DC00 <1> jmp .beep 3423 <1> 3424 <1> .del: 3425 0000A8ED 8B46EE <1> mov ax, word [bp + ?offset] 3426 0000A8F0 3B46F0 <1> cmp ax, word [bp + ?length_input] 3427 0000A8F3 73F5 <1> jae .del_offset_ae_length_input 3428 0000A8F5 C646E7FF <1> mov byte [bp + ?edited], -1 3429 0000A8F9 89C7 <1> mov di, ax 3430 0000A8FB 81C7[0200] <1> add di, line_in + 2 ; -> at current offset 3431 0000A8FF 89FE <1> mov si, di 3432 0000A901 46 <1> inc si ; -> after current offset 3433 0000A902 40 <1> inc ax ; offset + 1 3434 0000A903 F7D8 <1> neg ax ; - (offset + 1) 3435 0000A905 0346F0 <1> add ax, word [bp + ?length_input]; length input - (offset + 1) 3436 0000A908 89C1 <1> mov cx, ax 3437 0000A90A F3A4 <1> rep movsb ; move down part after deleted point 3438 0000A90C FF4EF0 <1> dec word [bp + ?length_input] 3439 0000A90F EBAA <1> jmp .redraw 3440 <1> 3441 <1> .home: 3442 0000A911 8366EE00 <1> and word [bp + ?offset], 0 3443 0000A915 FF76E2 <1> push word [bp + ?promptlength] 3444 0000A918 8F46E4 <1> pop word [bp + ?column] 3445 0000A91B EB9E <1> jmp .redraw 3446 <1> 3447 <1> .end: 3448 0000A91D 8B46F0 <1> mov ax, word [bp + ?length_input] 3449 0000A920 8946EE <1> mov word [bp + ?offset], ax 3450 0000A923 0346E2 <1> add ax, word [bp + ?promptlength] 3451 0000A926 8946E4 <1> mov word [bp + ?column], ax 3452 0000A929 EB90 <1> jmp .redraw 3453 <1> 3454 <1> .left: 3455 0000A92B 837EEE00 <1> cmp word [bp + ?offset], 0 3456 0000A92F 74B9 <1> je .left_offset_0 3457 0000A931 C646E8FF <1> mov byte [bp + ?cursormove], -1 3458 0000A935 FF4EEE <1> dec word [bp + ?offset] 3459 0000A938 FF4EE4 <1> dec word [bp + ?column] 3460 0000A93B E97DFF <1> jmp .redraw 3461 <1> 3462 <1> .right: 3463 0000A93E 8B46EE <1> mov ax, word [bp + ?offset] 3464 0000A941 3B46F0 <1> cmp ax, word [bp + ?length_input] 3465 0000A944 73A4 <1> jnb .right_offset_too_high 3466 0000A946 C646E8FF <1> mov byte [bp + ?cursormove], -1 3467 0000A94A C646E6FF <1> mov byte [bp + ?cursorright], -1 3468 0000A94E FF46EE <1> inc word [bp + ?offset] 3469 0000A951 FF46E4 <1> inc word [bp + ?column] 3470 0000A954 E964FF <1> jmp .redraw 3471 <1> 3472 <1> .up: 3473 0000A957 D046E7 <1> rol byte [bp + ?edited], 1 3474 0000A95A 726D <1> jc .beep 3475 <1> %if _HISTORY 3476 0000A95C 8B76F4 <1> mov si, word [bp + ?historyentry] 3477 0000A95F 85F6 <1> test si, si 3478 0000A961 8D7402 <1> lea si, [si + 2] 3479 0000A964 7504 <1> jnz @F 3480 0000A966 8B36[700B] <1> mov si, word [history.last] 3481 <1> @@: 3482 0000A96A 3B36[6E0B] <1> cmp si, word [history.first] 3483 0000A96E 7459 <1> je .beep 3484 0000A970 EB1A <1> jmp .copyline 3485 <1> 3486 <1> .down: 3487 0000A972 D046E7 <1> rol byte [bp + ?edited], 1 3488 0000A975 7252 <1> jc .beep 3489 0000A977 8B76F4 <1> mov si, word [bp + ?historyentry] 3490 0000A97A 85F6 <1> test si, si 3491 0000A97C 744B <1> jz .beep 3492 0000A97E 3B36[700B] <1> cmp si, word [history.last] 3493 0000A982 7506 <1> jne @F 3494 0000A984 31C0 <1> xor ax, ax 3495 0000A986 31C9 <1> xor cx, cx 3496 0000A988 EB10 <1> jmp .setline 3497 <1> 3498 <1> @@: 3499 0000A98A 4E <1> dec si 3500 0000A98B 4E <1> dec si 3501 <1> 3502 <1> .copyline: 3503 0000A98C 89F0 <1> mov ax, si 3504 <1> gethistorysegment ds 297 0000A98E 368E1E[6C0B] <2> mov %1, word [ss:history.segorsel] 3505 0000A993 8B0C <1> mov cx, [si] 3506 0000A995 8B7402 <1> mov si, [si + 2] 3507 0000A998 29F1 <1> sub cx, si 3508 <1> 3509 <1> .setline: 3510 0000A99A 8946F4 <1> mov word [bp + ?historyentry], ax 3511 <1> gethistoryoffset bx 300 0000A99D BB0000 <2> mov %1, 0 3512 0000A9A0 8D30 <1> lea si, [si + bx] 3513 0000A9A2 16 <1> push ss 3514 0000A9A3 07 <1> pop es 3515 0000A9A4 BF[0100] <1> mov di, line_in + 1 3516 0000A9A7 88C8 <1> mov al, cl 3517 0000A9A9 AA <1> stosb 3518 0000A9AA F3A4 <1> rep movsb 3519 0000A9AC B00D <1> mov al, 13 3520 0000A9AE AA <1> stosb 3521 0000A9AF 16 <1> push ss 3522 0000A9B0 1F <1> pop ds 3523 <1> %else 3524 <1> .down: equ .beep 3525 <1> 3526 <1> mov byte [bp + ?edited], -1 3527 <1> %endif 3528 0000A9B1 31C0 <1> xor ax, ax 3529 0000A9B3 A0[0100] <1> mov al, byte [line_in + 1] 3530 0000A9B6 8946EE <1> mov word [bp + ?offset], ax 3531 0000A9B9 8946F0 <1> mov word [bp + ?length_input], ax 3532 0000A9BC 0346E2 <1> add ax, word [bp + ?promptlength] 3533 0000A9BF 8946E4 <1> mov word [bp + ?column], ax 3534 0000A9C2 8366EC00 <1> and word [bp + ?lastskip], 0 3535 0000A9C6 E9F2FE <1> jmp .redraw 3536 <1> 3537 <1> .insert: 3538 <1> .pageup: 3539 <1> .pagedown: 3540 <1> .beep: 3541 0000A9C9 C646EBFF <1> mov byte [bp + ?beep], -1 3542 0000A9CD E967FC <1> jmp .next 3543 <1> 3544 <1> .ctrlc: 3545 0000A9D0 E9189A <1> jmp handle_ctrl_c 3546 <1> 3547 <1> .done: 3548 0000A9D3 8B7EF0 <1> mov di, word [bp + ?length_input] 3549 <1> 3550 0000A9D6 8B56EC <1> mov dx, word [bp + ?lastskip] 3551 0000A9D9 0356F2 <1> add dx, word [bp + ?length_displayed] 3552 <1> ; offset into line (with length displayed) 3553 0000A9DC 0356E2 <1> add dx, word [bp + ?promptlength]; offset into display 3554 0000A9DF 3B56E4 <1> cmp dx, word [bp + ?column] ; same as column ? 3555 0000A9E2 750A <1> jne @F ; no, always redraw --> 3556 <1> 3557 0000A9E4 89F8 <1> mov ax, di 3558 0000A9E6 0346E2 <1> add ax, word [bp + ?promptlength] 3559 0000A9E9 3946FE <1> cmp word [bp + ?columns], ax 3560 0000A9EC 7720 <1> ja .done_no_redraw 3561 <1> 3562 <1> @@: 3563 0000A9EE B00D <1> mov al, 13 3564 0000A9F0 E8E2F5 <1> call putc ; reset cursor 3565 0000A9F3 C456F6 <1> les dx, [bp + ?prompt] 3566 0000A9F6 8B4EE2 <1> mov cx, [bp + ?promptlength] ; es:dx length cx -> prompt data 3567 <1> %if _40COLUMNS 3568 0000A9F9 31C0 <1> xor ax, ax ; last fragment length = 0 3569 0000A9FB E8C2F3 <1> call puts_break_line 3570 0000A9FE 16 <1> push ss 3571 0000A9FF 07 <1> pop es 3572 0000AA00 8B4EF0 <1> mov cx, word [bp + ?length_input] 3573 0000AA03 E303 <1> jcxz @F ; if empty line --> 3574 0000AA05 E8DDF3 <1> call puts_break_line_more ; more follows, do a linebreak if ax == 0 3575 <1> @@: 3576 0000AA08 BA[0200] <1> mov dx, line_in + 2 ; es:dx length cx -> input line data 3577 0000AA0B E8B2F3 <1> call puts_break_line ; INP:ax = last fragment length 3578 <1> ; jmp .done_no_redraw 3579 <1> ; (fall through) 3580 <1> %else 3581 <1> call puts ; redraw prompt 3582 <1> push ss 3583 <1> pop es 3584 <1> mov dx, line_in + 2 3585 <1> mov cx, word [bp + ?length_input] 3586 <1> call puts ; draw 3587 <1> %endif 3588 <1> 3589 <1> .done_no_redraw: 3590 0000AA0E 81C7[0200] <1> add di, line_in + 2 3591 0000AA12 B00D <1> mov al, 13 3592 0000AA14 AA <1> stosb ; store the CR (there always is room) 3593 0000AA15 97 <1> xchg ax, di ; -> behind CR 3594 0000AA16 2C83 <1> sub al, ((-section.DATASTACK.vstart+100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size) +line_in+3) & 0FFh ; length of string, excluding CR 3597 <1> ; (This instruction disregards the unnecessary higher byte.) 3598 0000AA18 5F <1> pop di ; restore di 3599 0000AA19 A2[0100] <1> mov byte [line_in+1], al ; store the length byte 3600 0000AA1C 89EC5D <1> lleave code 3601 0000AA1F E975FA <1> jmp getline_eol_enter_history 3602 <1> 3603 <1> lleave ctx 3604 <1> 3605 <1> 3606 <1> fullbsout: 3607 0000AA22 B008 <1> mov al, 8 3608 0000AA24 E8AEF5 <1> call putc 3609 0000AA27 B020 <1> mov al, 32 3610 0000AA29 E8A9F5 <1> call putc 3611 0000AA2C B008 <1> mov al, 8 3612 0000AA2E E9A4F5 <1> jmp putc 3613 <1> 3614 <1> 3615 <1> ; INP: - 3616 <1> ; OUT: ax = number of columns to use 3617 <1> ; STT: ds = ss = debugger data selector 3618 <1> get_columns: 3619 0000AA31 31C0 <1> xor ax, ax 3620 0000AA33 F606[150C]10 <1> testopt [serial_flags], sf_use_serial 3621 <1> ; serial ? 3622 0000AA38 7411 <1> jz @F ; no --> 3623 0000AA3A 0A06[120C] <1> or al, byte [serial_columns] ; ax = number of columns if serial 3624 0000AA3E 7407 <1> jz .default_columns 3625 0000AA40 3C01 <1> cmp al, 1 3626 0000AA42 751C <1> jne @FF 3627 0000AA44 48 <1> dec ax ; = 0 3628 0000AA45 EB04 <1> jmp @F ; use IOC / BDA selection 3629 <1> .default_columns: 3630 0000AA47 B050 <1> mov al, 80 3631 0000AA49 EB15 <1> jmp @FF 3632 <1> @@: 3633 0000AA4B 0A06[210C] <1> or al, [io_columns] 3634 0000AA4F 74F6 <1> jz .default_columns 3635 0000AA51 3C01 <1> cmp al, 1 ; is 1 ? 3636 0000AA53 750B <1> jne @F ; no, use as columns --> 3637 <1> ; yes, automatic (use BDA) 3638 0000AA55 06 <1> push es 3639 0000AA56 B84000 <1> mov ax, 40h ; 0040h is a bimodal segment/selector 3640 0000AA59 8EC0 <1> mov es, ax 3641 0000AA5B 26A14A00 <1> mov ax, word [ es:4Ah ] ; columns on screen 3642 0000AA5F 07 <1> pop es 3643 <1> @@: 3644 0000AA60 C3 <1> retn 3645 <1> 3646 <1> 3647 <1> %if _GETLINEHIGHLIGHT 3648 <1> ; INP: di = index from total text start to visible text 3649 <1> ; cx = length of visible text to display 3650 <1> ; dx -> visible text to display 3651 <1> ; bx = length of total text 3652 <1> ; di != 0 if to highlight first codepoint 3653 <1> ; di + cx < bx if to highlight last codepoint 3654 <1> ; OUT: if INP:cx == 0, 3655 <1> ; just returns 3656 <1> ; if opt3_getline_highlight not set, 3657 <1> ; just chains to puts 3658 <1> ; no prefix highlight if INP:di == 0, 3659 <1> ; else first codepoint displayed highlighted 3660 <1> ; no suffix highlight if INP:di + INP:cx >= INP:bx, 3661 <1> ; else last codepoint displayed highlighted 3662 <1> ; calls puts and/or putsz to display all text 3663 <1> ; CHG: ax, bx, cx, dx 3664 <1> puts_with_highlight: 3665 0000AA61 E33F <1> jcxz .retn 3666 0000AA63 F606[AB00]01 <1> testopt [options3], opt3_getline_highlight 3667 0000AA68 7439 <1> jz .justputs 3668 0000AA6A 51 <1> push cx 3669 0000AA6B 85FF <1> test di, di ; prefix to highlight ? 3670 0000AA6D 7414 <1> jz @F ; no --> 3671 <1> .prefix: 3672 0000AA6F 53 <1> push bx 3673 0000AA70 E83300 <1> call emit_highlight 3674 0000AA73 52 <1> push dx ; ! dx on stack 3675 0000AA74 51 <1> push cx 3676 0000AA75 B90100 <1> mov cx, 1 3677 0000AA78 E853F0 <1> call puts ; draw one codepoint 3678 0000AA7B 59 <1> pop cx 3679 0000AA7C E83000 <1> call emit_unhighlight 3680 0000AA7F 5A <1> pop dx ; ! restore dx -> data 3681 0000AA80 42 <1> inc dx ; -> second codepoint 3682 0000AA81 49 <1> dec cx ; length one less 3683 0000AA82 5B <1> pop bx 3684 <1> @@: 3685 0000AA83 58 <1> pop ax ; = length of text (including prefix) 3686 0000AA84 01F8 <1> add ax, di ; = index past last displayed 3687 0000AA86 39D8 <1> cmp ax, bx ; is it equal to total text length ? 3688 0000AA88 7319 <1> jae .justputs ; yes, just display --> 3689 <1> 3690 <1> .suffix: 3691 0000AA8A E316 <1> jcxz .retn ; if no suffix possible --> 3692 0000AA8C 49 <1> dec cx ; = length of unhighlighted text 3693 0000AA8D 89C8 <1> mov ax, cx 3694 0000AA8F 01D0 <1> add ax, dx ; -> at codepoint to highlight 3695 0000AA91 50 <1> push ax 3696 0000AA92 E839F0 <1> call puts ; draw unhighlighted text 3697 0000AA95 E80E00 <1> call emit_highlight 3698 0000AA98 5A <1> pop dx ; -> at codepoint to highlight 3699 0000AA99 B90100 <1> mov cx, 1 3700 0000AA9C E82FF0 <1> call puts ; draw one codepoint 3701 0000AA9F E80D00 <1> call emit_unhighlight 3702 <1> .retn: 3703 0000AAA2 C3 <1> retn 3704 <1> 3705 <1> .justputs: 3706 0000AAA3 E928F0 <1> jmp puts ; draw text (no highlight) 3707 <1> %endif 3708 <1> 3709 <1> 3710 <1> %if _GETLINEHIGHLIGHT || _DHIGHLIGHT 3711 <1> emit_highlight: 3712 0000AAA6 52 <1> push dx 3713 0000AAA7 BA[6D24] <1> mov dx, msg.highlight + 1 ; -> ASCIZ escape code 3714 0000AAAA E806F5 <1> call putsz 3715 0000AAAD 5A <1> pop dx 3716 0000AAAE C3 <1> retn 3717 <1> 3718 <1> emit_unhighlight: 3719 0000AAAF 52 <1> push dx 3720 0000AAB0 BA[7324] <1> mov dx, msg.unhighlight + 1 ; -> ASCIZ escape code 3721 0000AAB3 E8FDF4 <1> call putsz 3722 0000AAB6 5A <1> pop dx 3723 0000AAB7 C3 <1> retn 3724 <1> %endif 3725 <1> 3726 <1> 3727 <1> getline_reset_notatty: 3728 0000AAB8 F606[DB00]02 <1> testopt [internalflags3], dif3_input_re_closed 3729 0000AABD 7421 <1> jz @F 3730 0000AABF 8026[DB00]FD <1> clropt [internalflags3], dif3_input_re_closed 3731 0000AAC4 F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 3732 0000AAC9 7515 <1> jnz @F 3733 <1> %if _INPUT_FILE_HANDLES 3734 0000AACB E89BDA <1> call InDOS_or_BIOS_IO 3735 0000AACE 7507 <1> jnz .notfile1 3736 0000AAD0 F606[D600]10 <1> testopt [internalflags2], dif2_input_file 3737 0000AAD5 7509 <1> jnz @F 3738 <1> .notfile1: 3739 <1> %endif 3740 <1> %if _INPUT_FILE_BOOT 3741 0000AAD7 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 3742 0000AADC 7502 <1> jnz @F 3743 <1> %endif 3744 0000AADE EB47 <1> jmp .clear_notatty 3745 <1> 3746 <1> @@: 3747 0000AAE0 F606[D900]02 <1> testopt [internalflags3], dif3_input_cmdline_closed 3748 0000AAE5 741A <1> jz @F 3749 0000AAE7 8026[D900]FD <1> clropt [internalflags3], dif3_input_cmdline_closed 3750 <1> %if _INPUT_FILE_HANDLES 3751 0000AAEC E87ADA <1> call InDOS_or_BIOS_IO 3752 0000AAEF 7507 <1> jnz .notfile2 3753 0000AAF1 F606[D600]10 <1> testopt [internalflags2], dif2_input_file 3754 0000AAF6 7509 <1> jnz @F 3755 <1> .notfile2: 3756 <1> %endif 3757 <1> %if _INPUT_FILE_BOOT 3758 0000AAF8 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 3759 0000AAFD 7502 <1> jnz @F 3760 <1> %endif 3761 0000AAFF EB26 <1> jmp .clear_notatty 3762 <1> 3763 <1> @@: 3764 <1> %if _INPUT_FILE_BOOT 3765 0000AB01 F606[D700]04 <1> testopt [internalflags2], dif2_closed_input_file_boot 3766 0000AB06 7413 <1> jz @F 3767 0000AB08 8026[D700]FB <1> clropt [internalflags2], dif2_closed_input_file_boot 3768 <1> %if _INPUT_FILE_HANDLES 3769 0000AB0D E859DA <1> call InDOS_or_BIOS_IO 3770 0000AB10 7507 <1> jnz .notfile3 3771 0000AB12 F606[D600]10 <1> testopt [internalflags2], dif2_input_file 3772 0000AB17 7502 <1> jnz @F 3773 <1> .notfile3: 3774 <1> %endif 3775 0000AB19 EB0C <1> jmp .clear_notatty 3776 <1> @@: 3777 <1> %endif 3778 <1> %if _INPUT_FILE_HANDLES 3779 0000AB1B F606[D600]20 <1> testopt [internalflags2], dif2_closed_input_file 3780 0000AB20 7411 <1> jz @F 3781 0000AB22 8026[D600]DF <1> clropt [internalflags2], dif2_closed_input_file 3782 <1> %else 3783 <1> jmp @F 3784 <1> %endif 3785 <1> .clear_notatty: 3786 0000AB27 F606[D000]30 <1> testopt [internalflags], inputfile | notstdinput 3787 0000AB2C 7505 <1> jnz @F 3788 0000AB2E C606[540B]00 <1> mov byte [notatty], 0 ; it _is_ a tty 3789 <1> @@: 3790 0000AB33 C3 <1> retn 3791 <1> 3792 <1> 3793 <1> ; Fill input buffer from file. 3794 <1> ; 3795 <1> ; INP: di-> first available byte in input buffer 3796 <1> ; OUT: CY if DOS returned an error or EOF occured 3797 <1> ; NC if no error 3798 <1> ; si = di 3799 <1> ; CHG: - 3800 <1> fillbuf: 3801 0000AB34 E83E98 <1> call handle_serial_flags_ctrl_c 3802 0000AB37 50 <1> push ax 3803 0000AB38 53 <1> push bx 3804 0000AB39 51 <1> push cx 3805 0000AB3A 52 <1> push dx 3806 0000AB3B 89FE <1> mov si, di ; we know this already 3807 0000AB3D B9[0101] <1> mov cx, line_in+LINE_IN_LEN 3808 0000AB40 89FA <1> mov dx, di 3809 0000AB42 29F9 <1> sub cx, di 3810 0000AB44 7703E99E00 <1> jbe .ret_cy ; if no more room --> 3811 <1> 3812 0000AB49 F606[DB00]01 <1> testopt [internalflags3], dif3_input_re 3813 0000AB4E 7429 <1> jz .not_re 3814 0000AB50 56 <1> push si 3815 0000AB51 57 <1> push di 3816 0000AB52 89CB <1> mov bx, cx 3817 0000AB54 8B36[340A] <1> mov si, word [re_buffer.position] 3818 0000AB58 89F7 <1> mov di, si 3819 0000AB5A B9FFFF <1> mov cx, -1 3820 0000AB5D 31C0 <1> xor ax, ax 3821 0000AB5F F2AE <1> repne scasb 3822 0000AB61 F7D1 <1> not cx 3823 0000AB63 49 <1> dec cx 3824 0000AB64 39CB <1> cmp bx, cx 3825 0000AB66 7702 <1> ja @F 3826 0000AB68 89D9 <1> mov cx, bx 3827 <1> @@: 3828 0000AB6A 89C8 <1> mov ax, cx 3829 0000AB6C 89D7 <1> mov di, dx 3830 0000AB6E F3A4 <1> rep movsb 3831 0000AB70 8936[340A] <1> mov word [re_buffer.position], si 3832 0000AB74 5F <1> pop di 3833 0000AB75 5E <1> pop si 3834 0000AB76 F8 <1> clc 3835 0000AB77 EB60 <1> jmp .after 3836 <1> 3837 <1> .not_re: 3838 <1> 3839 <1> %if _INPUT_FILE_BOOT 3840 0000AB79 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 3841 0000AB7E 7408 <1> jz @F 3842 0000AB80 E80A31 <1> call yy_boot_remember_seek 3843 0000AB83 E85E2B <1> call yy_boot_read 3844 0000AB86 EB51 <1> jmp .after 3845 <1> @@: 3846 <1> %endif 3847 <1> 3848 <1> %if _INPUT_FILE_HANDLES 3849 0000AB88 E8DED9 <1> call InDOS_or_BIOS_IO 3850 0000AB8B 750E <1> jnz @F 3851 0000AB8D F606[D600]10 <1> testopt [internalflags2], dif2_input_file 3852 0000AB92 7407 <1> jz @F ; if not input file --> 3853 0000AB94 57 <1> push di 3854 0000AB95 E86AF6 <1> call yy_get_handle ; bx = handle 3855 0000AB98 5F <1> pop di 3856 0000AB99 EB37 <1> jmp .file_handle 3857 <1> %endif 3858 <1> 3859 <1> @@: 3860 0000AB9B F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 3861 0000ABA0 7429 <1> jz .not_cmdline 3862 0000ABA2 56 <1> push si 3863 0000ABA3 57 <1> push di 3864 0000ABA4 89CB <1> mov bx, cx 3865 0000ABA6 8B36[3002] <1> mov si, word [cmdline_buffer.position] 3866 0000ABAA 89F7 <1> mov di, si 3867 0000ABAC B9FFFF <1> mov cx, -1 3868 0000ABAF 31C0 <1> xor ax, ax 3869 0000ABB1 F2AE <1> repne scasb 3870 0000ABB3 F7D1 <1> not cx 3871 0000ABB5 49 <1> dec cx 3872 0000ABB6 39CB <1> cmp bx, cx 3873 0000ABB8 7702 <1> ja @F 3874 0000ABBA 89D9 <1> mov cx, bx 3875 <1> @@: 3876 0000ABBC 89C8 <1> mov ax, cx 3877 0000ABBE 89D7 <1> mov di, dx 3878 0000ABC0 F3A4 <1> rep movsb 3879 0000ABC2 8936[3002] <1> mov word [cmdline_buffer.position], si 3880 0000ABC6 5F <1> pop di 3881 0000ABC7 5E <1> pop si 3882 0000ABC8 F8 <1> clc 3883 0000ABC9 EB0E <1> jmp .after 3884 <1> 3885 <1> .not_cmdline: 3886 <1> 3887 <1> @@: 3888 0000ABCB 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 3889 0000ABCD E899D9 <1> call InDOS_or_BIOS_IO 3890 0000ABD0 7515 <1> jnz .ret_cy 3891 <1> 3892 <1> .file_handle: 3893 0000ABD2 B43F <1> mov ah, 3Fh ; read from file 3894 0000ABD4 E8C803 <1> call yy_remember_seek 3895 <1> doscall 1581 0000ABD7 CD21 <2> int 21h 3896 <1> .after: 3897 0000ABD9 720C <1> jc .ret_cy ; if error --> 3898 0000ABDB 85C0 <1> test ax, ax 3899 0000ABDD 7408 <1> jz .ret_cy ; if EOF --> 3900 0000ABDF 01C2 <1> add dx, ax ; -> behind last valid byte 3901 <1> 3902 0000ABE1 8026[D900]FB <1> clropt [internalflags3], dif3_at_line_end 3903 <1> 3904 0000ABE6 A8 <1> db __TEST_IMM8 ; (NC) 3905 <1> .ret_cy: 3906 0000ABE7 F9 <1> stc 3907 0000ABE8 8916[640B] <1> mov word [bufend], dx ; -> behind last valid byte 3908 0000ABEC 5A <1> pop dx 3909 0000ABED 59 <1> pop cx 3910 0000ABEE 5B <1> pop bx 3911 0000ABEF 58 <1> pop ax 3912 0000ABF0 C3 <1> retn 3913 <1> 3914 <1> 3915 <1> %ifn _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 3916 <1> yy equ error 3917 <1> %else 3918 <1> yy: 3919 0000ABF1 E8E15A <1> call guard_re 3920 <1> %if _INPUT_FILE_BOOT 3921 0000ABF4 F606[D100]40 <1> testopt [internalflags], nodosloaded 3922 0000ABF9 7403E96A27 <1> jnz yy_boot 3923 <1> %endif 3924 <1> %ifn _INPUT_FILE_HANDLES 3925 <1> jmp error 3926 <1> %else 3927 0000ABFE E868D9 <1> call InDOS_or_BIOS_IO 3928 0000AC01 740B <1> jz @F 3929 0000AC03 B80503 <1> mov ax, 0305h 3930 0000AC06 E8A0D6 <1> call setrc 3931 0000AC09 BA[0427] <1> mov dx, msg.yy_no_dos 3932 0000AC0C EB60 <1> jmp .disp_error_1 3933 <1> 3934 <1> @@: 3935 <1> ; If input_file_handles.to_close is set, 3936 <1> ; close all left over open files. (This 3937 <1> ; may only be done when DOS is available.) 3938 0000AC0E 31DB <1> xor bx, bx ; if none left open, -> first structure 3939 0000AC10 F606[D600]10 <1> testopt [internalflags2], dif2_input_file 3940 0000AC15 740B <1> jz @F 3941 0000AC17 8B1E[D80A] <1> mov bx, word [input_file_handles.active] 3942 0000AC1B 43 <1> inc bx ; point to first unused structure 3943 0000AC1C D1E3 <1> shl bx, 1 3944 0000AC1E D1E3 <1> shl bx, 1 3945 0000AC20 D1E3 <1> shl bx, 1 ; to qword array index 3946 <1> %if INPUTFILEHANDLE_size != 8 3947 <1> %error Unexpected structure size 3948 <1> %endif 3949 <1> @@: 3950 0000AC22 89DF <1> mov di, bx ; + input_file_handles -> to close 3951 0000AC24 31C0 <1> xor ax, ax ; zero base amount to close 3952 0000AC26 E8BCF5 <1> call yy_close_file_handles 3953 <1> ; CHG: ax, bx, di 3954 <1> ; if we remembered to close any, do it now 3955 <1> 3956 0000AC29 4E <1> dec si 3957 <1> %if _CONFIG 3958 0000AC2A 830E[0604]FF <1> or word [yy_try_scriptspath], -1 3959 0000AC2F 56 <1> push si 3960 0000AC30 BB[8402] <1> mov bx, scriptspath 3961 0000AC33 8B3E[0404] <1> mov di, word [scriptspath.dir_end] 3962 0000AC37 BA[BD1E] <1> mov dx, msg.scriptskeyword 3963 0000AC3A E8E3EC <1> call isstring? 3964 0000AC3D 740F <1> je .kw 3965 0000AC3F BA[B31E] <1> mov dx, msg.configkeyword 3966 0000AC42 E8DBEC <1> call isstring? 3967 0000AC45 7513 <1> jne @F 3968 0000AC47 BB[0201] <1> mov bx, configpath 3969 0000AC4A 8B3E[8202] <1> mov di, word [configpath.dir_end] 3970 <1> .kw: 3971 0000AC4E AC <1> lodsb 3972 0000AC4F 3C3A <1> cmp al, ':' 3973 0000AC51 7507 <1> jne @F 3974 0000AC53 F616[0604] <1> not byte [yy_try_scriptspath.nokeywordused] 3975 0000AC57 58 <1> pop ax 3976 0000AC58 EB05 <1> jmp @FF 3977 <1> @@: 3978 0000AC5A 5E <1> pop si 3979 <1> %endif 3980 0000AC5B 89F3 <1> mov bx, si ; -> start of name 3981 0000AC5D 89F7 <1> mov di, si ; -> start of name 3982 <1> @@: 3983 0000AC5F AC <1> lodsb ; load character 3984 0000AC60 E827ED <1> call iseol? 3985 0000AC63 7515 <1> jne @F 3986 0000AC65 BA[4626] <1> mov dx, msg.yy_requires_filename 3987 0000AC68 B80403 <1> mov ax, 0304h 3988 0000AC6B E83BD6 <1> call setrc 3989 <1> .disp_error_1: 3990 0000AC6E B8FF03 <1> mov ax, 03FFh 3991 0000AC71 E835D6 <1> call setrc 3992 0000AC74 E836F3 <1> call putsz_error 3993 0000AC77 E98653 <1> jmp cmd3 3994 <1> 3995 <1> @@: 3996 <1> .unquoted_loop: 3997 0000AC7A 3C20 <1> cmp al, 32 ; blank or EOL outside quoted part ? 3998 0000AC7C 7434 <1> je .blank 3999 0000AC7E 3C09 <1> cmp al, 9 4000 0000AC80 7430 <1> je .blank 4001 0000AC82 E805ED <1> call iseol? ; (includes semicolon in lDebug) 4002 0000AC85 742B <1> je .blank ; yes --> 4003 0000AC87 3C22 <1> cmp al, '"' ; starting quote mark ? 4004 0000AC89 740E <1> je .quoted ; yes --> 4005 0000AC8B AA <1> stosb ; store character 4006 <1> .unquote: 4007 0000AC8C AC <1> lodsb ; load character 4008 0000AC8D EBEB <1> jmp .unquoted_loop ; continue in not-quoted loop --> 4009 <1> 4010 <1> .quoted_loop: 4011 0000AC8F E8FCEC <1> call iseol?.notsemicolon; EOL inside quoted part ? 4012 0000AC92 7413 <1> je .quoted_eol ; if yes, error --> 4013 0000AC94 3C22 <1> cmp al, '"' ; ending quote mark ? 4014 0000AC96 74F4 <1> je .unquote ; yes --> 4015 0000AC98 AA <1> stosb ; store character 4016 <1> .quoted: 4017 0000AC99 AC <1> lodsb ; load character 4018 0000AC9A EBF3 <1> jmp .quoted_loop ; continue in quoted loop --> 4019 <1> 4020 <1> .empty: 4021 0000AC9C B80603 <1> mov ax, 0306h 4022 0000AC9F E807D6 <1> call setrc 4023 0000ACA2 BA[6726] <1> mov dx, msg.yy_filename_empty 4024 0000ACA5 EBC7 <1> jmp .disp_error_1 4025 <1> 4026 <1> .quoted_eol: 4027 0000ACA7 B80703 <1> mov ax, 0307h 4028 0000ACAA E8FCD5 <1> call setrc 4029 0000ACAD BA[2E27] <1> mov dx, msg.yy_filename_missing_unquote 4030 0000ACB0 EBBC <1> jmp .disp_error_1 4031 <1> 4032 <1> .blank: 4033 <1> ; mov byte [si - 1], 0 ; terminate (shouldn't be needed) 4034 <1> 4035 0000ACB2 50 <1> push ax 4036 0000ACB3 B000 <1> mov al, 0 4037 0000ACB5 8605 <1> xchg al, byte [di] ; terminate after filename 4038 0000ACB7 893E[3A0C] <1> mov word [terminator_in_line_in.offset], di 4039 0000ACBB A2[3C0C] <1> mov byte [terminator_in_line_in.value], al 4040 0000ACBE 58 <1> pop ax 4041 0000ACBF 39FB <1> cmp bx, di ; empty ? 4042 0000ACC1 74D9 <1> je .empty ; yes --> 4043 <1> ; done 4044 <1> 4045 0000ACC3 F606[D600]10 <1> testopt [internalflags2], dif2_input_file 4046 0000ACC8 7412 <1> jz @F 4047 <1> ; IFH = 1 4048 <1> ; IFH - 1 = 0 4049 <1> ; cmp active, 0 4050 <1> ; active >= 0 --> error 4051 <1> 4052 <1> ; IFH = 2 4053 <1> ; IFH - 1 = 1 4054 <1> ; cmp active, 1 4055 <1> ; active >= 1 --> error 4056 0000ACCA 833E[D80A]0F <1> cmp word [input_file_handles.active], _INPUT_FILE_HANDLES - 1 4057 0000ACCF 720B <1> jb @F 4058 <1> 4059 0000ACD1 B80803 <1> mov ax, 0308h 4060 0000ACD4 E8D2D5 <1> call setrc 4061 0000ACD7 BA[8626] <1> mov dx, msg.yy_too_many_handles 4062 0000ACDA EB92 <1> jmp .disp_error_1 4063 <1> @@: 4064 <1> 4065 0000ACDC 803F3A <1> cmp byte [bx], ':' 4066 0000ACDF 7550 <1> jne .not_yy_goto_subfunction 4067 <1> 4068 0000ACE1 F606[D600]10 <1> testopt [internalflags2], dif2_input_file 4069 0000ACE6 750C <1> jnz @F 4070 <1> 4071 0000ACE8 E86FF8 <1> call getline_is_input_file? 4072 0000ACEB 7238 <1> jc .no_file 4073 0000ACED F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 4074 0000ACF2 7531 <1> jnz .no_file 4075 <1> @@: 4076 0000ACF4 43 <1> inc bx 4077 0000ACF5 89DD <1> mov bp, bx 4078 <1> 4079 0000ACF7 E88E01 <1> call yy_reset_buf 4080 <1> 4081 0000ACFA 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 4082 <1> %if _INPUT_FILE_HANDLES 4083 0000ACFC F606[D600]10 <1> testopt [internalflags2], dif2_input_file 4084 0000AD01 7405 <1> jz @F ; if not input file --> 4085 0000AD03 57 <1> push di 4086 0000AD04 E8FBF4 <1> call yy_get_handle ; bx = handle 4087 0000AD07 5F <1> pop di 4088 <1> @@: 4089 <1> %endif 4090 0000AD08 B445 <1> mov ah, 45h 4091 <1> doscall ; duplicate file handle 1581 0000AD0A CD21 <2> int 21h 4092 0000AD0C 7303E9D700 <1> jc yy_open_file.error 4093 0000AD11 93 <1> xchg ax, bx 4094 <1> 4095 0000AD12 31C9 <1> xor cx, cx 4096 0000AD14 31D2 <1> xor dx, dx 4097 0000AD16 B80142 <1> mov ax, 4201h ; lseek, from current file position 4098 <1> doscall ; call DOS 1581 0000AD19 CD21 <2> int 21h 4099 0000AD1B 91 <1> xchg ax, cx ; dx:cx = current seek 4100 0000AD1C 87D1 <1> xchg dx, cx ; cx:dx = current seek 4101 0000AD1E BE0001 <1> mov si, ifhfIsDup 4102 0000AD21 93 <1> xchg ax, bx 4103 0000AD22 E91201 <1> jmp yy_finish 4104 <1> 4105 <1> 4106 <1> .no_file: 4107 0000AD25 B80903 <1> mov ax, 0309h 4108 0000AD28 E87ED5 <1> call setrc 4109 0000AD2B BA[CC26] <1> mov dx, msg.yy_no_file 4110 0000AD2E E93DFF <1> jmp .disp_error_1 4111 <1> 4112 <1> .not_yy_goto_subfunction: 4113 0000AD31 31ED <1> xor bp, bp 4114 0000AD33 E8AAEC <1> call skipwh0 4115 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4116 0000AD36 8936[320C] <1> mov word [if_exists_then_address], si 4117 <1> %endif 4118 0000AD3A E83CEC <1> call iseol?_or_then 4119 0000AD3D 7425 <1> je .not_yy_goto 4120 <1> 4121 0000AD3F 3C3A <1> cmp al, ':' 4122 0000AD41 7403E917D5 <1> jne error 4123 <1> 4124 0000AD46 E896EC <1> call skipwhite 4125 0000AD49 4E <1> dec si 4126 0000AD4A 89F5 <1> mov bp, si 4127 <1> 4128 <1> @@: 4129 0000AD4C AC <1> lodsb 4130 0000AD4D 3C20 <1> cmp al, 32 4131 0000AD4F 7409 <1> je @F 4132 0000AD51 3C09 <1> cmp al, 9 4133 0000AD53 7405 <1> je @F 4134 0000AD55 E832EC <1> call iseol? 4135 0000AD58 75F2 <1> jne @B 4136 <1> @@: 4137 0000AD5A E883EC <1> call skipwh0 4138 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4139 0000AD5D 8936[320C] <1> mov word [if_exists_then_address], si 4140 <1> %endif 4141 0000AD61 E831EC <1> call chkeol_or_then 4142 <1> 4143 <1> .not_yy_goto: 4144 0000AD64 89DF <1> mov di, bx 4145 <1> 4146 <1> ; INP: ds:di -> filename 4147 <1> ; OUT: File opened, 4148 <1> ; bx = file handle 4149 <1> ; STT: ds = es = ss = debugger data selector/segment 4150 <1> yy_open_file: 4151 0000AD66 E8BA00 <1> call .setup_opencreate ; ds:si -> pathname 4152 0000AD69 B86C71 <1> mov ax, 716Ch ; LFN open-create 4153 0000AD6C 57 <1> push di 4154 0000AD6D 31FF <1> xor di, di ; alias hint 4155 0000AD6F F9 <1> stc 4156 <1> doscall 1581 0000AD70 CD21 <2> int 21h 4157 0000AD72 5F <1> pop di 4158 0000AD73 7203E9B600 <1> jnc .got ; LFN call succeeded --> 4159 <1> 4160 <1> ; Early case for no-LFN-interface available. 4161 <1> ; cmp ax, 1 4162 <1> ; je .try_sfn 4163 0000AD78 3D0071 <1> cmp ax, 7100h 4164 0000AD7B 744B <1> je .try_sfn 4165 <1> 4166 <1> ; Only now, we check whether the used drive supports LFNs. 4167 <1> ; If it does, then we treat the error received as an 4168 <1> ; actual error and cancel here. If not, the SFN function 4169 <1> ; is called next as a fallback. 4170 <1> ; 4171 <1> ; We cannot rely on specific error returns like the 4172 <1> ; expected 7100h CY (or 7100h CF-unchanged) or the similar 4173 <1> ; 0001h CY (Invalid function) because no one agrees on what 4174 <1> ; error code to use. 4175 <1> ; 4176 <1> ; dosemu returns 0003h (Path not found) on FATFS and 4177 <1> ; redirected-non-dosemu drives. But may be changed so as to 4178 <1> ; return 0059h (Function not supported on network). 4179 <1> ; MSWindows 98SE returns 0002h (File not found) on 4180 <1> ; DOS-redirected drives. 4181 <1> ; DOSLFN with Fallback mode enabled supports the call (albeit 4182 <1> ; limited to SFNs). 4183 <1> ; 4184 <1> ; To suss out what the error means, check LFN availability. 4185 <1> ; 4186 <1> ; Refer to https://github.com/stsp/dosemu2/issues/770 4187 0000AD7D 1E <1> push ds 4188 0000AD7E 06 <1> push es 4189 0000AD7F 57 <1> push di 4190 0000AD80 50 <1> push ax 4191 <1> lframe 4192 <1> lvar 34, fstype_buffer 4193 <1> lvar 4, pathname_buffer 4194 0000AD81 5589E58D66DA <1> lenter 4195 <1> 4196 0000AD87 AD <1> lodsw ; load first two bytes of pathname 4197 <1> 4198 0000AD88 16 <1> push ss 4199 0000AD89 1F <1> pop ds 4200 0000AD8A 89E2 <1> mov dx, sp ; ds:dx -> ?pathname_buffer 4201 0000AD8C 16 <1> push ss 4202 0000AD8D 07 <1> pop es 4203 0000AD8E 89E7 <1> mov di, sp ; es:di -> ?pathname_buffer 4204 <1> 4205 0000AD90 80FC3A <1> cmp ah, ':' ; starts with drive specifier ? 4206 0000AD93 7408 <1> je @F ; yes --> 4207 <1> 4208 0000AD95 B419 <1> mov ah, 19h 4209 <1> doscall ; get current default drive 1581 0000AD97 CD21 <2> int 21h 4210 0000AD99 0441 <1> add al, 'A' ; A: = 0, convert to drive letter 4211 0000AD9B B43A <1> mov ah, ':' ; drive specifier 4212 <1> @@: 4213 0000AD9D AB <1> stosw 4214 0000AD9E B85C00 <1> mov ax, '\' ; backslash and zero terminator 4215 0000ADA1 AB <1> stosw ; es:di -> ?fstype_buffer 4216 <1> 4217 0000ADA2 31C0 <1> xor ax, ax 4218 0000ADA4 B91100 <1> mov cx, 34 >> 1 4219 0000ADA7 57 <1> push di 4220 0000ADA8 F3AB <1> rep stosw ; initialise ?fstype_buffer to all zeros 4221 0000ADAA 5F <1> pop di ; -> ?fstype_buffer 4222 <1> 4223 0000ADAB B92000 <1> mov cx, 32 ; size of ?fstype_buffer 4224 0000ADAE 31DB <1> xor bx, bx ; harden, initialise this 4225 0000ADB0 B8A071 <1> mov ax, 71A0h ; get volume information 4226 0000ADB3 F9 <1> stc 4227 <1> doscall ; (depends on ds = es = ss) 1581 0000ADB4 CD21 <2> int 21h 4228 <1> 4229 0000ADB6 7207 <1> jc @F ; if call not supported --> 4230 <1> ; bx = FS flags 4231 0000ADB8 F6C740 <1> test bh, 0100_0000b ; LFN interface available ? 4232 0000ADBB F9 <1> stc ; if no 4233 0000ADBC 7401 <1> jz @F ; no --> 4234 <1> 4235 0000ADBE F8 <1> clc ; is available 4236 <1> @@: 4237 <1> 4238 0000ADBF 89EC5D <1> lleave 4239 0000ADC2 58 <1> pop ax ; (restore error code) 4240 0000ADC3 5F <1> pop di 4241 0000ADC4 07 <1> pop es 4242 0000ADC5 1F <1> pop ds 4243 0000ADC6 7320 <1> jnc .error ; if LFN interface is available, actual error 4244 <1> ; if LFN interface is not available, try SFN 4245 <1> 4246 <1> .try_sfn: 4247 0000ADC8 E85800 <1> call .setup_opencreate 4248 0000ADCB B8006C <1> mov ax, 6C00h ; Open-create 4249 0000ADCE F9 <1> stc 4250 <1> doscall 1581 0000ADCF CD21 <2> int 21h 4251 0000ADD1 735B <1> jnc .got 4252 <1> 4253 0000ADD3 83F801 <1> cmp ax, 1 4254 0000ADD6 7405 <1> je .try_old_open 4255 0000ADD8 3D006C <1> cmp ax, 6C00h 4256 0000ADDB 750B <1> jne .error 4257 <1> 4258 <1> .try_old_open: 4259 0000ADDD 88D8 <1> mov al, bl ; access and sharing modes 4260 0000ADDF B43D <1> mov ah, 3Dh ; Open 4261 0000ADE1 89F2 <1> mov dx, si ; -> filename 4262 0000ADE3 F9 <1> stc 4263 <1> doscall 1581 0000ADE4 CD21 <2> int 21h 4264 0000ADE6 7346 <1> jnc .got 4265 <1> 4266 <1> .error: 4267 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4268 <1> %if _CONFIG 4269 0000ADE8 833E[0604]FF <1> cmp word [yy_try_scriptspath], -1 4270 0000ADED 751E <1> jne @F 4271 0000ADEF F616[0704] <1> not byte [yy_try_scriptspath.didnotyettry] 4272 0000ADF3 89FE <1> mov si, di 4273 0000ADF5 B9FF00 <1> mov cx, 255 4274 0000ADF8 B000 <1> mov al, 0 4275 0000ADFA F2AE <1> repne scasb 4276 0000ADFC 89F9 <1> mov cx, di 4277 0000ADFE 29F1 <1> sub cx, si 4278 0000AE00 8B3E[0404] <1> mov di, word [scriptspath.dir_end] 4279 0000AE04 F3A4 <1> rep movsb 4280 0000AE06 AA <1> stosb 4281 0000AE07 BF[8402] <1> mov di, scriptspath 4282 0000AE0A E959FF <1> jmp yy_open_file 4283 <1> 4284 <1> @@: 4285 <1> %endif 4286 0000AE0D F606[DB00]08 <1> testopt [internalflags3], dif3_in_if 4287 0000AE12 7403E906BE <1> jnz if_exists_not_found 4288 <1> %endif 4289 0000AE17 B80A03 <1> mov ax, 030Ah 4290 0000AE1A E88CD4 <1> call setrc 4291 0000AE1D BA[AB26] <1> mov dx, msg.yy_error_file_open 4292 0000AE20 E94BFE <1> jmp yy.disp_error_1 4293 <1> 4294 <1> .setup_opencreate: 4295 0000AE23 89FE <1> mov si, di ; -> filename 4296 0000AE25 BB2060 <1> mov bx, 0110_0000_0010_0000b ; Auto-commit, no int 24h 4297 <1> ; DENY WRITE, Read-only 4298 0000AE28 31C9 <1> xor cx, cx ; create attribute 4299 0000AE2A BA0100 <1> mov dx, 0000_0000_0000_0001b ; no create / open, no truncate 4300 0000AE2D C3 <1> retn 4301 <1> 4302 <1> .got: 4303 <1> ; ax = file handle 4304 0000AE2E E85700 <1> call yy_reset_buf 4305 <1> 4306 0000AE31 31C9 <1> xor cx, cx 4307 0000AE33 31D2 <1> xor dx, dx 4308 0000AE35 31F6 <1> xor si, si 4309 <1> yy_finish: 4310 0000AE37 F606[D600]10 <1> testopt [internalflags2], dif2_input_file 4311 0000AE3C 7509 <1> jnz @F 4312 0000AE3E 800E[D600]10 <1> setopt [internalflags2], dif2_input_file 4313 0000AE43 31DB <1> xor bx, bx 4314 0000AE45 EB18 <1> jmp @FF 4315 <1> 4316 <1> @@: 4317 0000AE47 FF06[D80A] <1> inc word [input_file_handles.active] 4318 0000AE4B 8B1E[D80A] <1> mov bx, word [input_file_handles.active] 4319 0000AE4F D1E3 <1> shl bx, 1 4320 0000AE51 D1E3 <1> shl bx, 1 4321 0000AE53 D1E3 <1> shl bx, 1 ; to qword array index 4322 <1> %if INPUTFILEHANDLE_size != 8 4323 <1> %error Unexpected structure size 4324 <1> %endif 4325 0000AE55 8BBF[520A] <1> mov di, word [input_file_handles + bx - INPUTFILEHANDLE_size + ifhFlags] 4326 0000AE59 81E700F0 <1> and di, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 4328 0000AE5D 09FE <1> or si, di 4329 <1> @@: 4330 <1> 4331 0000AE5F 8987[580A] <1> mov word [input_file_handles + bx + ifhHandle], ax 4332 0000AE63 89B7[5A0A] <1> mov word [input_file_handles + bx + ifhFlags], si 4333 0000AE67 8997[5C0A] <1> mov word [input_file_handles + bx + ifhParentSeek], dx 4334 0000AE6B 898F[5E0A] <1> mov word [input_file_handles + bx + ifhParentSeek + 2], cx 4335 <1> 4336 0000AE6F 8026[DB00]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 4337 0000AE74 89EE <1> mov si, bp 4338 0000AE76 85F6 <1> test si, si 4339 0000AE78 7403E95F01 <1> jnz cmd_goto.yy_entry 4340 <1> 4341 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4342 0000AE7D F606[DB00]08 <1> testopt [internalflags3], dif3_in_if 4343 0000AE82 7403E9A3BD <1> jnz if_exists_found_open 4344 <1> %endif 4345 0000AE87 C3 <1> retn 4346 <1> %endif 4347 <1> %endif 4348 <1> 4349 <1> 4350 <1> ; INP: word [bufnext], word [bufend] 4351 <1> ; CHG: - 4352 <1> ; 4353 <1> ; Note: When reading from a file, we buffer some of the input 4354 <1> ; in line_in. When switching to a non-file, or starting 4355 <1> ; to read from another file, we have to reset the seek 4356 <1> ; position of the (prior) file to avoid losing the data. 4357 <1> ; This cropped up during yy development, but actually 4358 <1> ; affects serial and InDOS input, too. Therefore, 4359 <1> ; this function is not below the conditional for yy. 4360 <1> yy_reset_buf: 4361 0000AE88 51 <1> push cx 4362 <1> %if _NEWFULLHANDLING 4363 0000AE89 B9[0300] <1> mov cx, line_in + 3 4364 <1> %else 4365 <1> mov cx, line_in + 2 4366 <1> %endif 4367 0000AE8C 870E[620B] <1> xchg cx, word [bufnext] 4368 0000AE90 F7D9 <1> neg cx 4369 0000AE92 030E[640B] <1> add cx, word [bufend] ; cx = how much remaining in buffer 4370 <1> %if _NEWFULLHANDLING 4371 0000AE96 C706[640B][0300] <1> mov word [bufend], line_in + 3 4372 <1> %else 4373 <1> mov word [bufend], line_in + 2 4374 <1> %endif 4375 <1> 4376 0000AE9C F606[D600]40 <1> testopt [internalflags2], dif2_did_getline_file 4377 0000AEA1 7469 <1> jz .not_used 4378 <1> 4379 0000AEA3 50 <1> push ax 4380 0000AEA4 52 <1> push dx 4381 0000AEA5 53 <1> push bx 4382 0000AEA6 89CA <1> mov dx, cx 4383 0000AEA8 31C9 <1> xor cx, cx 4384 0000AEAA F7DA <1> neg dx ; dx = minus how much remaining 4385 0000AEAC 7456 <1> jz .done ; if zero, do not seek at all --> 4386 0000AEAE 49 <1> dec cx ; sign extension into cx:dx 4387 <1> 4388 0000AEAF F606[DB00]01 <1> testopt [internalflags3], dif3_input_re 4389 0000AEB4 7406 <1> jz @F 4390 0000AEB6 0116[340A] <1> add word [re_buffer.position], dx 4391 0000AEBA EB48 <1> jmp .done 4392 <1> @@: 4393 <1> 4394 <1> %if _INPUT_FILE_BOOT 4395 0000AEBC F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 4396 0000AEC1 741E <1> jz @F 4397 0000AEC3 F606[DB00]30 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 4398 0000AEC8 7412 <1> jz .do_boot_seek 4399 <1> 4400 0000AECA FF36[A05A] <1> push word [load_input_file.active] 4401 0000AECE 8F06[E80A] <1> pop word [boot_remember_seek_handle] 4402 0000AED2 890E[E60A] <1> mov word [boot_remember_seek_offset + 2], cx 4403 0000AED6 8916[E40A] <1> mov word [boot_remember_seek_offset], dx 4404 0000AEDA EB28 <1> jmp .done 4405 <1> 4406 <1> .do_boot_seek: 4407 0000AEDC E8A129 <1> call yy_boot_seek_current 4408 0000AEDF EB23 <1> jmp .done 4409 <1> @@: 4410 <1> %endif 4411 <1> 4412 <1> %if _INPUT_FILE_HANDLES 4413 0000AEE1 F606[D600]10 <1> testopt [internalflags2], dif2_input_file 4414 0000AEE6 7407 <1> jz @F ; if not input file --> 4415 0000AEE8 57 <1> push di 4416 0000AEE9 E816F3 <1> call yy_get_handle ; bx = handle 4417 0000AEEC 5F <1> pop di 4418 0000AEED EB0F <1> jmp .filehandle 4419 <1> @@: 4420 <1> %endif 4421 <1> 4422 0000AEEF F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 4423 0000AEF4 7406 <1> jz @F 4424 0000AEF6 0116[3002] <1> add word [cmdline_buffer.position], dx 4425 0000AEFA EB08 <1> jmp .done 4426 <1> @@: 4427 <1> 4428 0000AEFC 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 4429 <1> .filehandle: 4430 0000AEFE B80142 <1> mov ax, 4201h ; lseek, from current file position 4431 0000AF01 E80A00 <1> call handle_seek_or_remember 4432 <1> 4433 <1> .done: 4434 0000AF04 5B <1> pop bx 4435 0000AF05 5A <1> pop dx 4436 0000AF06 58 <1> pop ax 4437 <1> 4438 0000AF07 8026[D600]BF <1> clropt [internalflags2], dif2_did_getline_file 4439 <1> 4440 <1> .not_used: 4441 0000AF0C 59 <1> pop cx 4442 0000AF0D C3 <1> retn 4443 <1> 4444 <1> 4445 <1> handle_seek_or_remember: 4446 0000AF0E E85FD6 <1> call InDOS 4447 0000AF11 7411 <1> jz @F 4448 <1> 4449 0000AF13 A3[DC0A] <1> mov word [indos_remember_seek_function], ax 4450 0000AF16 891E[DE0A] <1> mov word [indos_remember_seek_handle], bx 4451 0000AF1A 890E[E20A] <1> mov word [indos_remember_seek_offset + 2], cx 4452 0000AF1E 8916[E00A] <1> mov word [indos_remember_seek_offset], dx 4453 0000AF22 EB02 <1> jmp .done 4454 <1> 4455 <1> @@: 4456 <1> doscall ; call DOS 1581 0000AF24 CD21 <2> int 21h 4457 <1> .done: 4458 0000AF26 C3 <1> retn 4459 <1> 4460 <1> 4461 <1> yy_reset_buf_and_seek_start: 4462 0000AF27 51 <1> push cx 4463 0000AF28 50 <1> push ax 4464 0000AF29 52 <1> push dx 4465 0000AF2A 53 <1> push bx 4466 <1> %if _NEWFULLHANDLING 4467 0000AF2B B8[0300] <1> mov ax, line_in + 3 4468 <1> %else 4469 <1> mov ax, line_in + 2 4470 <1> %endif 4471 0000AF2E A3[620B] <1> mov word [bufnext], ax 4472 0000AF31 A3[640B] <1> mov word [bufend], ax 4473 <1> 4474 0000AF34 31D2 <1> xor dx, dx 4475 0000AF36 31C9 <1> xor cx, cx 4476 <1> 4477 0000AF38 F606[DB00]01 <1> testopt [internalflags3], dif3_input_re 4478 0000AF3D 7408 <1> jz @F 4479 0000AF3F C706[340A][3402] <1> mov word [re_buffer.position], re_buffer 4480 0000AF45 EB37 <1> jmp .done 4481 <1> @@: 4482 <1> 4483 <1> %if _INPUT_FILE_BOOT 4484 0000AF47 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 4485 0000AF4C 7408 <1> jz @F 4486 0000AF4E E8212D <1> call yy_boot_clear_remember_seek 4487 0000AF51 E8822B <1> call yy_boot_seek_start 4488 0000AF54 EB28 <1> jmp .done 4489 <1> @@: 4490 <1> %endif 4491 <1> 4492 <1> %if _INPUT_FILE_HANDLES 4493 0000AF56 F606[D600]10 <1> testopt [internalflags2], dif2_input_file 4494 0000AF5B 7407 <1> jz @F ; if not input file --> 4495 0000AF5D 57 <1> push di 4496 0000AF5E E8A1F2 <1> call yy_get_handle ; bx = handle 4497 0000AF61 5F <1> pop di 4498 0000AF62 EB11 <1> jmp .filehandle 4499 <1> @@: 4500 <1> %endif 4501 <1> 4502 0000AF64 F606[D900]01 <1> testopt [internalflags3], dif3_input_cmdline 4503 0000AF69 7408 <1> jz @F 4504 0000AF6B C706[3002][3001] <1> mov word [cmdline_buffer.position], cmdline_buffer 4505 0000AF71 EB0B <1> jmp .done 4506 <1> @@: 4507 <1> 4508 0000AF73 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 4509 <1> 4510 <1> .filehandle: 4511 0000AF75 E80B00 <1> call yy_clear_remember_seek 4512 0000AF78 B80042 <1> mov ax, 4200h ; seek from start 4513 0000AF7B E890FF <1> call handle_seek_or_remember 4514 <1> .done: 4515 0000AF7E 5B <1> pop bx 4516 0000AF7F 5A <1> pop dx 4517 0000AF80 58 <1> pop ax 4518 0000AF81 59 <1> pop cx 4519 0000AF82 C3 <1> retn 4520 <1> 4521 <1> 4522 <1> yy_clear_remember_seek: 4523 0000AF83 391E[DE0A] <1> cmp word [indos_remember_seek_handle], bx 4524 0000AF87 7515 <1> jne .ret 4525 <1> .clear: 4526 0000AF89 C706[DC0A]0142 <1> mov word [indos_remember_seek_function], 4201h 4527 0000AF8F 830E[DE0A]FF <1> or word [indos_remember_seek_handle], -1 4528 0000AF94 8326[E20A]00 <1> and word [indos_remember_seek_offset + 2], 0 4529 0000AF99 8326[E00A]00 <1> and word [indos_remember_seek_offset], 0 4530 <1> .ret: 4531 0000AF9E C3 <1> retn 4532 <1> 4533 <1> 4534 <1> yy_remember_seek: 4535 0000AF9F 391E[DE0A] <1> cmp word [indos_remember_seek_handle], bx 4536 0000AFA3 75F9 <1> jne yy_clear_remember_seek.ret 4537 <1> 4538 0000AFA5 50 <1> push ax 4539 0000AFA6 51 <1> push cx 4540 0000AFA7 52 <1> push dx 4541 0000AFA8 8B0E[E20A] <1> mov cx, word [indos_remember_seek_offset + 2] 4542 0000AFAC 8B16[E00A] <1> mov dx, word [indos_remember_seek_offset] 4543 0000AFB0 A1[DC0A] <1> mov ax, word [indos_remember_seek_function] 4544 <1> doscall ; call DOS 1581 0000AFB3 CD21 <2> int 21h 4545 0000AFB5 5A <1> pop dx 4546 0000AFB6 59 <1> pop cx 4547 0000AFB7 58 <1> pop ax 4548 0000AFB8 EBCF <1> jmp yy_clear_remember_seek.clear 4549 <1> 4550 <1> 4551 <1> cmd_goto: 4552 0000AFBA E822EA <1> call skipwhite 4553 0000AFBD 3C3A <1> cmp al, ':' 4554 0000AFBF 7503 <1> jne @F 4555 0000AFC1 E81BEA <1> call skipwhite 4556 <1> @@: 4557 <1> 4558 0000AFC4 E893F5 <1> call getline_is_input_file? 4559 0000AFC7 7312 <1> jnc @F 4560 0000AFC9 BA[5B1C] <1> mov dx, msg.goto_not_file 4561 0000AFCC B80003 <1> mov ax, 0300h 4562 0000AFCF E8D7D2 <1> call setrc 4563 <1> .error: 4564 0000AFD2 B8FF03 <1> mov ax, 03FFh 4565 0000AFD5 E8D1D2 <1> call setrc 4566 0000AFD8 E9D2EF <1> jmp putsz_error 4567 <1> 4568 <1> @@: 4569 0000AFDB 4E <1> dec si 4570 <1> .yy_entry: ; si -> destination label 4571 0000AFDC BA[531C] <1> mov dx, msg.sof 4572 0000AFDF E83EE9 <1> call isstring? 4573 0000AFE2 751B <1> jne @F 4574 0000AFE4 E8F8E9 <1> call skipwhite 4575 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4576 0000AFE7 8936[320C] <1> mov word [if_exists_then_address], si 4577 <1> %endif 4578 0000AFEB E8A7E9 <1> call chkeol_or_then 4579 0000AFEE E8D700 <1> call resetrc 4580 0000AFF1 E833FF <1> call yy_reset_buf_and_seek_start 4581 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4582 0000AFF4 F606[DB00]08 <1> testopt [internalflags3], dif3_in_if 4583 0000AFF9 7403E92CBC <1> jnz if_exists_found_open 4584 <1> %endif 4585 0000AFFE C3 <1> retn 4586 <1> 4587 <1> @@: 4588 0000AFFF BA[571C] <1> mov dx, msg.eof 4589 0000B002 E81BE9 <1> call isstring? 4590 0000B005 751B <1> jne @F 4591 0000B007 E8D5E9 <1> call skipwhite 4592 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4593 0000B00A 8936[320C] <1> mov word [if_exists_then_address], si 4594 <1> %endif 4595 0000B00E E884E9 <1> call chkeol_or_then 4596 0000B011 E8B400 <1> call resetrc 4597 0000B014 E87CF5 <1> call getline_close_file 4598 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4599 0000B017 F606[DB00]08 <1> testopt [internalflags3], dif3_in_if 4600 0000B01C 7403E90EBC <1> jnz if_exists_found_closed 4601 <1> %endif 4602 0000B021 C3 <1> retn 4603 <1> 4604 <1> @@: 4605 0000B022 89F3 <1> mov bx, si 4606 0000B024 B9FFFF <1> mov cx, -1 4607 <1> .loop: 4608 0000B027 41 <1> inc cx 4609 0000B028 AC <1> lodsb 4610 0000B029 3C20 <1> cmp al, 32 4611 0000B02B 7409 <1> je .end 4612 0000B02D 3C09 <1> cmp al, 9 4613 0000B02F 7405 <1> je .end 4614 0000B031 E856E9 <1> call iseol? 4615 0000B034 75F1 <1> jne .loop 4616 <1> .end: 4617 0000B036 C644FF00 <1> mov byte [si - 1], 0 ; terminate 4618 0000B03A E8A3E9 <1> call skipwh0 4619 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4620 0000B03D 8936[320C] <1> mov word [if_exists_then_address], si 4621 <1> %endif 4622 0000B041 E851E9 <1> call chkeol_or_then 4623 0000B044 E376 <1> jcxz .empty 4624 0000B046 41 <1> inc cx ; space for zero terminator 4625 0000B047 41 <1> inc cx ; round up 4626 0000B048 80E1FE <1> and cl, ~1 ; align to word 4627 0000B04B 89E5 <1> mov bp, sp 4628 0000B04D 29CC <1> sub sp, cx ; allocate stack space 4629 0000B04F 89DE <1> mov si, bx ; -> label in line_in 4630 0000B051 89E7 <1> mov di, sp ; -> buffer on stack 4631 0000B053 57 <1> push di 4632 <1> @@: 4633 0000B054 AC <1> lodsb 4634 0000B055 E816E9 <1> call uppercase ; normalise the name in buffer 4635 0000B058 AA <1> stosb 4636 0000B059 E2F9 <1> loop @B ; copy all or all+1 4637 <1> 4638 0000B05B E8C9FE <1> call yy_reset_buf_and_seek_start 4639 <1> 4640 <1> .next_line: 4641 0000B05E 800E[D900]88 <1> setopt [internalflags3], dif3_quiet_input_single | dif3_return_eof 4642 0000B063 31C9 <1> xor cx, cx 4643 0000B065 E8E5F2 <1> call getline.use_dif3_flags 4644 0000B068 7228 <1> jc .notfound 4645 0000B06A 89F3 <1> mov bx, si 4646 0000B06C 3C3A <1> cmp al, ':' 4647 0000B06E 75EE <1> jne .next_line 4648 0000B070 E86CE9 <1> call skipwhite 4649 0000B073 5A <1> pop dx 4650 0000B074 52 <1> push dx 4651 0000B075 4E <1> dec si 4652 0000B076 E8A7E8 <1> call isstring? 4653 0000B079 75E3 <1> jne .next_line 4654 0000B07B 8D77FF <1> lea si, [bx - 1] 4655 0000B07E AC <1> lodsb 4656 0000B07F 89EC <1> mov sp, bp 4657 0000B081 E84400 <1> call resetrc 4658 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4659 0000B084 F606[DB00]08 <1> testopt [internalflags3], dif3_in_if 4660 0000B089 7403E99CBB <1> jnz if_exists_found_open 4661 <1> %endif 4662 0000B08E 5A <1> pop dx ; return address to cmd3 4663 0000B08F E9A653 <1> jmp cmd3_notblank 4664 <1> 4665 <1> .notfound: 4666 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4667 0000B092 F606[DB00]08 <1> testopt [internalflags3], dif3_in_if 4668 0000B097 751B <1> jnz @F 4669 <1> %endif 4670 0000B099 B80103 <1> mov ax, 0301h 4671 0000B09C E80AD2 <1> call setrc 4672 0000B09F BA[C31C] <1> mov dx, msg.goto_not_found.1 4673 0000B0A2 E808EF <1> call putsz_error 4674 0000B0A5 5A <1> pop dx 4675 0000B0A6 E804EF <1> call putsz_error 4676 0000B0A9 BA[E31C] <1> mov dx, msg.goto_not_found.2 4677 0000B0AC E8FEEE <1> call putsz_error 4678 0000B0AF 89EC <1> mov sp, bp 4679 0000B0B1 E9DFF4 <1> jmp getline_close_file 4680 <1> 4681 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 4682 <1> @@: 4683 0000B0B4 89EC <1> mov sp, bp 4684 0000B0B6 E8DAF4 <1> call getline_close_file 4685 0000B0B9 E961BB <1> jmp if_exists_not_found 4686 <1> %endif 4687 <1> 4688 <1> .empty: 4689 0000B0BC B80203 <1> mov ax, 0302h 4690 0000B0BF E8E7D1 <1> call setrc 4691 0000B0C2 BA[9A1C] <1> mov dx, msg.goto_empty 4692 0000B0C5 E90AFF <1> jmp .error 4693 <1> 4694 <1> 4695 <1> resetrc: 4696 0000B0C8 FF36[680B] <1> push word [priorrc] 4697 0000B0CC 8F06[660B] <1> pop word [rc] 4698 0000B0D0 C3 <1> retn 4699 <1> 4700 <1> 4701 <1> %include "serialp.asm" 1 <2> 2 <2> %if 0 3 <2> 4 <2> Serial port handling code 5 <2> 6 <2> 2019 by C. Masloch 7 <2> based on http://www.sci.muni.cz/docs/pc/serport.txt The Serial Port rel. 14 8 <2> 9 <2> Usage of the works is permitted provided that this 10 <2> instrument is retained with the works, so that any entity 11 <2> that uses the works is notified of this instrument. 12 <2> 13 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <2> 15 <2> %endif 16 <2> 17 <2> 18 <2> usesection lDEBUG_DATA_ENTRY 19 <2> 20 00005410 CB <2> iisphwreset serial_interrupt_handler 21 <2> 22 00005411 00 <2> align 2, db 0 23 00005412 EB10FFFFFFFF4B4280- <2> iispentry serial_interrupt_handler, 80h, serial_interrupt_handler 23 0000541B EBF300 <2> 24 00005424 2EF606[150C]01 <2> testopt [cs:serial_flags], sf_init_done 25 0000542A 7505 <2> jnz @F 26 <2> .notours: 27 0000542C 2EFF2E[1454] <2> jmp far [cs:.next] 28 <2> @@: 29 00005431 50 <2> push ax 30 00005432 1E <2> push ds 31 <2> 32 00005433 0E <2> push cs 33 00005434 1F <2> pop ds 34 00005435 B020 <2> mov al, 20h ; acknowledge interrupt 35 00005437 803E[DB0B]00 <2> cmp byte [serial_use_irqmask + 1], 0 36 0000543C 740B <2> je @F 37 0000543E E87900 <2> call serial_next_is_iret 38 00005441 751F <2> jne @FF ; not our job to issue EOI --> 39 00005443 E6A0 <2> out 0A0h, al ; to secondary PIC 40 00005445 E620 <2> out 20h, al ; to primary PIC 41 00005447 EB19 <2> jmp @FF 42 <2> 43 <2> @@: 44 <2> ; Fix for a condition when we use interrupt 0Ch (for COM1). 45 <2> ; If _CATCHINT0C then we need to pass along Stack Fault in R86M to 46 <2> ; the next handler, which will also be ours. Therefore do the inverse 47 <2> ; of the In-Service Register check here. 48 00005449 B00B <2> mov al, 0Bh ; request In-Service Register (ISR) 49 0000544B E620 <2> out 20h, al ; from primary PIC 50 0000544D E420 <2> in al, 20h ; read the ISR 51 0000544F 8406[DA0B] <2> test al, byte [serial_use_irqmask] 52 00005453 7504 <2> jnz .ours 53 00005455 1F <2> pop ds 54 00005456 58 <2> pop ax 55 00005457 EBD3 <2> jmp .notours 56 <2> 57 <2> .ours: 58 00005459 E85E00 <2> call serial_next_is_iret 59 0000545C 7504 <2> jne @F ; not our job to issue EOI --> 60 0000545E B020 <2> mov al, 20h ; acknowledge interrupt 61 00005460 E620 <2> out 20h, al ; to primary PIC 62 <2> @@: 63 00005462 51 <2> push cx 64 00005463 52 <2> push dx 65 00005464 56 <2> push si 66 <2> 67 00005465 FC <2> cld 68 <2> ih_continue: 69 00005466 8B16[D60B] <2> mov dx, [baseport] 70 0000546A 42 <2> inc dx 71 0000546B 42 <2> inc dx ; (base + 2) write FCR, read IIR 72 <2> %if _USE_TX_FIFO 73 0000546C A0[CF0B] <2> mov al, byte [serial_fcr_setting] 74 0000546F 24F9 <2> and al, ~ 0000_0110b 75 00005471 EE <2> out dx, al ; (write FCR) configure FIFOs 76 00005472 31C0 <2> xor ax, ax 77 <2> %else 78 <2> xor ax, ax 79 <2> out dx, al ; (write FCR) configure FIFOs 80 <2> nop 81 <2> %endif 82 00005474 EC <2> in al, dx ; (read IIR) get interrupt cause 83 00005475 A801 <2> test al, 1 ; did the UART generate the int? 84 00005477 750C <2> jnz ih_sep ; no, then it's somebody else's problem 85 00005479 2406 <2> and al, 6 ; mask bits not needed 86 0000547B 89C6 <2> mov si, ax ; make a pointer out of it 87 0000547D 4A <2> dec dx 88 0000547E 4A <2> dec dx ; = base 89 0000547F FF94[CE54] <2> call near word [serial_interrupt_table + si] ; serve this int 90 00005483 EBE1 <2> jmp ih_continue ; and look for more things to be done 91 <2> ih_sep: 92 00005485 5E <2> pop si 93 00005486 5A <2> pop dx ; restore regs 94 00005487 59 <2> pop cx 95 00005488 F606[B600]01 <2> testopt [options6], opt6_share_serial_irq 96 0000548D 7423 <2> jz .ret 97 0000548F F606[B600]02 <2> testopt [options6], opt6_serial_EOI_call 98 <2> ; Sharing the IRQ means we need to pass along 99 <2> ; the call to the next handler. This enables 100 <2> ; using the same IRQ, eg IRQ #3 for COM2 and 101 <2> ; COM4, by two different applications. 102 00005494 741F <2> jz .chain 103 00005496 E82100 <2> call serial_next_is_iret 104 00005499 741A <2> je .chain ; already issued EOI --> 105 0000549B 1F <2> pop ds 106 0000549C 58 <2> pop ax 107 0000549D 9C <2> pushf 108 0000549E 0E <2> push cs 109 0000549F E88AFF <2> call serial_interrupt_handler.notours 110 000054A2 50 <2> push ax 111 000054A3 1E <2> push ds 112 000054A4 B020 <2> mov al, 20h ; acknowledge interrupt 113 000054A6 2E803E[DB0B]00 <2> cmp byte [cs:serial_use_irqmask + 1], 0 114 000054AC 7402 <2> je @F 115 000054AE E6A0 <2> out 0A0h, al ; to secondary PIC 116 <2> @@: 117 000054B0 E620 <2> out 20h, al ; to primary PIC 118 <2> .ret: 119 000054B2 1F <2> pop ds 120 000054B3 58 <2> pop ax 121 000054B4 CF <2> iret 122 <2> 123 <2> .chain: 124 000054B5 1F <2> pop ds 125 000054B6 58 <2> pop ax 126 000054B7 E972FF <2> jmp serial_interrupt_handler.notours 127 <2> 128 <2> 129 <2> ; INP: ds = cs => data entry segment 130 <2> ; OUT: ZR if should issue EOI 131 <2> ; NZ if should not issue EOI 132 <2> ; REM: This returns ZR if we aren't sharing 133 <2> ; the IRQ or we are but the next handler 134 <2> ; consists of an iret instruction only. 135 <2> serial_next_is_iret: 136 000054BA 53 <2> push bx 137 000054BB 1E <2> push ds 138 000054BC F606[B600]01 <2> testopt [options6], opt6_share_serial_irq 139 000054C1 7407 <2> jz @F ; if not sharing --> (ZR) 140 000054C3 C51E[1454] <2> lds bx, [serial_interrupt_handler.next] 141 000054C7 803FCF <2> cmp byte [bx], 0CFh ; iret ? 142 <2> @@: 143 000054CA 1F <2> pop ds 144 000054CB 5B <2> pop bx 145 000054CC C3 <2> retn 146 <2> 147 000054CD 00 <2> align 2, db 0 148 000054CE [D654][DB54][2355]- <2> serial_interrupt_table: dw int_modem,int_tx,int_rx,int_status 148 000054D4 [7655] <2> 149 <2> 150 <2> 151 <2> int_modem: 152 <2> ; just clear modem status, we are not interested in it 153 000054D6 83C206 <2> add dx, 6 154 000054D9 EC <2> in al, dx ; read MSR 155 000054DA C3 <2> retn 156 <2> 157 <2> 158 <2> int_tx: 159 000054DB 8B16[D60B] <2> mov dx, [baseport] 160 000054DF 8B36[E20B] <2> mov si, word [txtail] 161 <2> 162 000054E3 52 <2> push dx 163 000054E4 83C205 <2> add dx, 5 164 000054E7 EC <2> in al, dx ; (base + 5) read LSR 165 000054E8 5A <2> pop dx 166 000054E9 A820 <2> test al, 20h ; Transmitter Holding Register Empty ? 167 000054EB 7421 <2> jz itx_setup_int ; no, it was a spurious interrupt --> 168 <2> ; This conditional detects the condition specified in 169 <2> ; the section "Known problems with several chips": 170 <2> ; When a 1 is written to the bit 1 (Tx int enab) in the 171 <2> ; IER, a Tx interrupt is generated. This is an erroneous 172 <2> ; interrupt if the THRE bit is not set. [So don't set 173 <2> ; this bit as long as the THRE bit isn't set. CB] 174 <2> 175 <2> ; check if there's something to be sent 176 <2> %if _USE_TX_FIFO 177 000054ED B90100 <2> mov cx, 1 178 000054F0 F606[150C]08 <2> test byte [serial_flags], sf_built_in_fifo 179 000054F5 7404 <2> jz @F 180 000054F7 8A0E[140C] <2> mov cl, byte [serial_fifo_size] 181 <2> @@: 182 <2> %endif 183 <2> itx_more: 184 000054FB 3B36[E00B] <2> cmp si, word [txhead] 185 000054FF 7419 <2> je itx_nothing 186 00005501 AC <2> lodsb 187 00005502 EE <2> out dx, al ; write it to the THR 188 <2> ; check for wrap-around in our fifo 189 <2> tx_checkwrap 100 00005503 81FE[F00C] <3> cmp si, txfifo+_TXFIFOSIZE 101 00005507 7203 <3> jb %%tx_nowrap 102 00005509 BE[700C] <3> mov si, txfifo 103 <3> %%tx_nowrap: 190 <2> %if _USE_TX_FIFO 191 <2> ; send as much bytes as the chip can take when available 192 0000550C E2ED <2> loop itx_more 193 <2> %endif 194 <2> itx_setup_int: 195 0000550E 3B36[E00B] <2> cmp si, word [txhead] 196 00005512 7406 <2> je itx_nothing 197 00005514 42 <2> inc dx 198 00005515 B003 <2> mov al, 0000_0011b 199 00005517 EE <2> out dx, al ; write to IER 200 00005518 EB04 <2> jmp itx_dontstop 201 <2> itx_nothing: 202 <2> ; no more data in the fifo, so inhibit TX interrupts 203 0000551A 42 <2> inc dx 204 0000551B B001 <2> mov al, 0000_0001b 205 0000551D EE <2> out dx, al ; write to IER 206 <2> itx_dontstop: 207 0000551E 8936[E20B] <2> mov word [txtail], si 208 00005522 C3 <2> retn 209 <2> 210 <2> 211 <2> int_rx: 212 00005523 8B36[DC0B] <2> mov si, word [rxhead] 213 <2> irx_more: 214 00005527 8B16[D60B] <2> mov dx, [baseport] 215 0000552B EC <2> in al, dx ; read from RBR 216 0000552C 3C03 <2> cmp al, 3 217 0000552E 7511 <2> jne @FF 218 00005530 F606[150C]02 <2> testopt [serial_flags], sf_ctrl_c 219 00005535 7405 <2> jz @F 220 00005537 800E[150C]04 <2> setopt [serial_flags], sf_double_ctrl_c 221 <2> @@: 222 0000553C 800E[150C]02 <2> setopt [serial_flags], sf_ctrl_c 223 <2> @@: 224 00005541 8804 <2> mov byte [si], al 225 00005543 89F0 <2> mov ax, si 226 00005545 46 <2> inc si 227 <2> ; check for wrap-around 228 <2> rx_checkwrap 93 00005546 81FE[700C] <3> cmp si, rxfifo+_RXFIFOSIZE 94 0000554A 7203 <3> jb %%rx_nowrap 95 0000554C BE[F00B] <3> mov si, rxfifo 96 <3> %%rx_nowrap: 229 0000554F 3936[DE0B] <2> cmp word [rxtail], si 230 00005553 7415 <2> je @FF 231 <2> ; see if there are more bytes to be read 232 00005555 83C205 <2> add dx, 5 233 00005558 EC <2> in al, dx ; read LSR 234 00005559 A801 <2> test al, 1 ; Data Available ? 235 0000555B 75CA <2> jnz irx_more 236 <2> .end: 237 0000555D 8936[DC0B] <2> mov word [rxhead], si 238 <2> ; test al, 20h ; Transmitter Holding Register Empty ? 239 <2> ; jnz int_tx ; yes, do transmit next --> 240 <2> ; Sometimes when sending and receiving at the 241 <2> ; same time, TX ints get lost. This is a cure. 242 <2> ; retn 243 00005561 E977FF <2> jmp int_tx ; (this checks for THRE) 244 <2> 245 <2> @@: 246 00005564 8B16[D60B] <2> mov dx, [baseport] 247 00005568 EC <2> in al, dx ; read RBR (discard) 248 00005569 A9 <2> db __TEST_IMM16 ; (skip mov) 249 <2> @@: 250 0000556A 89C6 <2> mov si, ax 251 0000556C 83C205 <2> add dx, 5 252 0000556F EC <2> in al, dx ; read LSR 253 00005570 A801 <2> test al, 1 ; Data Available ? 254 00005572 75F0 <2> jnz @BB 255 00005574 EBE7 <2> jmp .end 256 <2> 257 <2> 258 <2> int_status: 259 <2> ; just clear the status ("this trivial task is left as an exercise 260 <2> ; to the student") 261 00005576 83C205 <2> add dx, 5 262 00005579 EC <2> in al, dx ; read LSR 263 0000557A C3 <2> retn 264 <2> 265 <2> 266 <2> usesection lDEBUG_CODE 267 <2> 268 <2> ; OUT: ZR if no new character in buffer 269 <2> ; NZ if new character read, 270 <2> ; al = character 271 <2> ; STT: ds = debugger segment 272 <2> serial_receive_char: 273 0000B0D1 56 <2> push si 274 <2> ; see if there are bytes to be read from the fifo 275 0000B0D2 8B36[DE0B] <2> mov si, word [rxtail] 276 <2> 277 0000B0D6 3B36[DC0B] <2> cmp si, word [rxhead] 278 0000B0DA 7412 <2> je .nodata 279 0000B0DC AC <2> lodsb 280 <2> %if _ECHO_RX_TO_TX 281 <2> %if _RX_TO_TX_ADD_LF 282 <2> call serial_send_char_add_lf 283 <2> %else 284 <2> call serial_send_char 285 <2> %endif 286 <2> %endif 287 <2> ; check for wrap-around 288 <2> rx_checkwrap 93 0000B0DD 81FE[700C] <3> cmp si, rxfifo+_RXFIFOSIZE 94 0000B0E1 7203 <3> jb %%rx_nowrap 95 0000B0E3 BE[F00B] <3> mov si, rxfifo 96 <3> %%rx_nowrap: 289 0000B0E6 8936[DE0B] <2> mov word [rxtail], si 290 0000B0EA 85F6 <2> test si, si ; (NZ) 291 0000B0EC EB02 <2> jmp .return 292 <2> 293 <2> .nodata: 294 0000B0EE 31C0 <2> xor ax, ax ; (ZR) 295 <2> .return: 296 0000B0F0 5E <2> pop si 297 0000B0F1 C3 <2> retn 298 <2> 299 <2> 300 <2> ; OUT: ZR if no new character in buffer 301 <2> ; NZ if new character available, 302 <2> ; al = character 303 <2> ; STT: ds = debugger segment 304 <2> serial_check_receive_char: 305 0000B0F2 56 <2> push si 306 <2> ; see if there are bytes to be read from the fifo 307 0000B0F3 8B36[DE0B] <2> mov si, word [rxtail] 308 <2> 309 0000B0F7 3B36[DC0B] <2> cmp si, word [rxhead] 310 0000B0FB 7405 <2> je .nodata 311 0000B0FD AC <2> lodsb 312 0000B0FE 85F6 <2> test si, si ; (NZ) 313 0000B100 EB02 <2> jmp .return 314 <2> 315 <2> .nodata: 316 0000B102 31C0 <2> xor ax, ax ; (ZR) 317 <2> .return: 318 0000B104 5E <2> pop si 319 0000B105 C3 <2> retn 320 <2> 321 <2> 322 <2> ; OUT: NC if successful 323 <2> ; CY if handler hooked in different interrrupt 324 <2> ; and couldn't unhook 325 <2> serial_install_interrupt_handler: 326 <2> ; install interrupt handler first 327 0000B106 A0[D00B] <2> mov al, byte [serial_use_intnum] 328 0000B109 F606[DC00]01 <2> testopt [internalflags4], dif4_int_serial_hooked 329 0000B10E 740D <2> jz @F 330 0000B110 3A06[440C] <2> cmp al, byte [serial_installed_intnum] 331 0000B114 7418 <2> je .ret ; --> (NC) 332 0000B116 50 <2> push ax 333 0000B117 E84A01 <2> call serial_uninstall_interrupt_handler 334 0000B11A 58 <2> pop ax 335 0000B11B 7211 <2> jc .ret ; --> (CY) 336 <2> @@: 337 0000B11D A2[440C] <2> mov byte [serial_installed_intnum], al 338 0000B120 BE[1254] <2> mov si, serial_interrupt_handler 339 0000B123 E8F601 <2> call install_86m_interrupt_handler 340 0000B126 800E[DC00]01 <2> setopt [internalflags4], dif4_int_serial_hooked 341 0000B12B E80004 <2> call update_inttab_optional 342 <2> ; (NC) 343 <2> .ret: 344 0000B12E C3 <2> retn 345 <2> 346 <2> 347 <2> %if 0 348 <2> 349 <2> If you do the following: 350 <2> 351 <2> r dspvi FF 352 <2> r dco or= 4000 353 <2> (wait for KEEP prompt to fail) 354 <2> r dspvi 0B 355 <2> r dco or= 4000 356 <2> (try to reply to the KEEP prompt) 357 <2> 358 <2> In dosemu2 the default interrupt handler apparently 359 <2> doesn't send an EOI to the PIC and thus the interrupts 360 <2> get stuck when prompting with the correct handler. 361 <2> Therefore, we should send an EOI to the PIC just in case. 362 <2> 363 <2> %endif 364 <2> 365 <2> ; INP: word [serial_use_irqmask] 366 <2> ; CHG: ax 367 <2> serial_eoi: 368 0000B12F B020 <2> mov al, 20h ; acknowledge interrupt 369 0000B131 803E[DB0B]00 <2> cmp byte [serial_use_irqmask + 1], 0 370 0000B136 7402 <2> je @F 371 0000B138 E6A0 <2> out 0A0h, al ; to secondary PIC 372 <2> @@: 373 0000B13A E620 <2> out 20h, al ; to primary PIC 374 0000B13C C3 <2> retn 375 <2> 376 <2> 377 <2> serial_clear_fifos: 378 <2> ; clear fifos (not those in the 16550A, but ours) 379 0000B13D B8[F00B] <2> mov ax, rxfifo 380 0000B140 A3[DC0B] <2> mov word [rxhead], ax 381 0000B143 A3[DE0B] <2> mov word [rxtail], ax 382 0000B146 B8[700C] <2> mov ax, txfifo 383 0000B149 A3[E00B] <2> mov word [txhead], ax 384 0000B14C A3[E20B] <2> mov word [txtail], ax 385 0000B14F C3 <2> retn 386 <2> 387 <2> 388 <2> numdef SERIAL_DL_WORD, 0 389 <2> 390 <2> serial_init_UART: 391 0000B150 E8DCFF <2> call serial_eoi 392 <2> ; initialize the UART 393 0000B153 8B16[D60B] <2> mov dx, [baseport] 394 0000B157 83C203 <2> add dx, 3 ; (base + 3) read/write LCR 395 0000B15A EC <2> in al, dx ; read LCR 396 0000B15B A2[CD0B] <2> mov byte [serial_save_lcr], al 397 0000B15E B080 <2> mov al, 80h ; DLAB = 1 398 0000B160 EE <2> out dx, al ; write LCR, make DL register accessible 399 0000B161 52 <2> push dx 400 0000B162 8B16[D60B] <2> mov dx, [baseport] ; (base) 401 <2> %if _SERIAL_DL_WORD 402 <2> in ax, dx ; read bps rate divisor (DL) 403 <2> mov word [serial_save_dl], ax 404 <2> mov ax, word [serial_use_dl] 405 <2> out dx, ax ; write bps rate divisor (DL) 406 <2> %else 407 0000B166 EC <2> in al, dx ; read bps rate divisor low byte (DL) 408 0000B167 42 <2> inc dx 409 0000B168 A2[CA0B] <2> mov byte [serial_save_dl], al 410 0000B16B EC <2> in al, dx ; read bps rate divisor high byte (DL) 411 0000B16C A2[CB0B] <2> mov byte [serial_save_dl + 1], al 412 0000B16F A0[D90B] <2> mov al, byte [serial_use_dl + 1] 413 0000B172 EE <2> out dx, al ; write bps rate divisor high byte (DL) 414 0000B173 4A <2> dec dx 415 0000B174 A0[D80B] <2> mov al, byte [serial_use_dl] 416 0000B177 EE <2> out dx, al ; write bps rate divisor low byte (DL) 417 <2> %endif 418 0000B178 5A <2> pop dx ; (base + 3) write LCR 419 0000B179 A0[D10B] <2> mov al, byte [serial_use_params] 420 <2> ; DLAB = 0 and control parameters 421 0000B17C EE <2> out dx, al ; write parameters 422 <2> 423 <2> ; is it a 16550A? 424 0000B17D 4A <2> dec dx ; (base + 2) write FCR, read IIR 425 <2> %if _USE_TX_FIFO 426 0000B17E B007 <2> mov al, 0000_0111b 427 0000B180 0A06[D20B] <2> or al, byte [serial_use_fifo] 428 0000B184 A2[CF0B] <2> mov byte [serial_fcr_setting], al 429 0000B187 EE <2> out dx, al ; (write FCR) try to clear and enable FIFOs 430 0000B188 90 <2> nop 431 0000B189 EC <2> in al, dx ; read IIR 432 0000B18A 800E[150C]08 <2> or byte [serial_flags], sf_built_in_fifo 433 <2> ; in case of built-in tx FIFO 434 0000B18F 24C0 <2> and al, 1100_0000b ; mask of FIFO functional bits 435 0000B191 3CC0 <2> cmp al, 1100_0000b ; both bits set ? 436 0000B193 740B <2> je @F ; yes --> 437 0000B195 8026[150C]F7 <2> and byte [serial_flags], ~ sf_built_in_fifo 438 <2> ; no built-in tx FIFO 439 0000B19A 31C0 <2> xor ax, ax 440 0000B19C A2[CF0B] <2> mov byte [serial_fcr_setting], al 441 0000B19F EE <2> out dx, al ; (write FCR) disable the FIFOs 442 <2> @@: 443 <2> %else 444 <2> xor ax, ax 445 <2> out dx, al ; (write FCR) disable the FIFOs 446 <2> %endif 447 0000B1A0 4A <2> dec dx ; (base + 1) 448 0000B1A1 EC <2> in al, dx ; read IER 449 0000B1A2 A2[CC0B] <2> mov byte [serial_save_ier], al 450 0000B1A5 B001 <2> mov al, 0000_0001b ; allow RX interrupts 451 0000B1A7 EE <2> out dx, al ; write to IER 452 0000B1A8 4A <2> dec dx ; (base + 0) read RBR 453 0000B1A9 EC <2> in al, dx ; clear receiver 454 0000B1AA 83C205 <2> add dx, 5 ; (base + 5) read LSR 455 0000B1AD EC <2> in al, dx ; clear line status 456 0000B1AE 42 <2> inc dx ; (base + 6) read MSR 457 0000B1AF EC <2> in al, dx ; clear modem status 458 <2> ; free interrupt in the ICU 459 0000B1B0 8B0E[DA0B] <2> mov cx, word [serial_use_irqmask] 460 0000B1B4 F7D1 <2> not cx ; negated mask of bits to change 461 0000B1B6 31DB <2> xor bx, bx ; all bits clear (= IRQ ON) 462 0000B1B8 E81200 <2> call set_irq 463 0000B1BB 891E[C80B] <2> mov word [serial_save_irq_off], bx 464 0000B1BF 890E[C60B] <2> mov word [serial_save_irq_mask], cx 465 <2> ; and enable ints from the UART 466 0000B1C3 4A <2> dec dx 467 0000B1C4 4A <2> dec dx ; (base + 4) 468 0000B1C5 EC <2> in al, dx ; read MCR 469 0000B1C6 A2[CE0B] <2> mov byte [serial_save_mcr], al 470 0000B1C9 B008 <2> mov al, 0000_1000b 471 0000B1CB EE <2> out dx, al ; write MCR 472 0000B1CC C3 <2> retn 473 <2> 474 <2> ; INP: cx = negated mask of bits to change 475 <2> ; (if bit is clear, modify corresponding IRQ) 476 <2> ; bx = mask of what to set bits to (0 = IRQ ON, 1 = IRQ OFF) 477 <2> ; OUT: bx = mask of bits previously set 478 <2> ; CHG: ax 479 <2> set_irq: 480 0000B1CD 52 <2> push dx 481 0000B1CE BA0100 <2> mov dx, 1 482 <2> .loop: 483 0000B1D1 85CA <2> test dx, cx 484 0000B1D3 753E <2> jnz .next 485 0000B1D5 84D2 <2> test dl, dl 486 0000B1D7 741E <2> jz .high 487 <2> 488 <2> .low: 489 0000B1D9 E421 <2> in al, 21h ; get PIC configuration 490 0000B1DB 50 <2> push ax 491 0000B1DC F7D2 <2> not dx ; dx = mask of bits to keep 492 0000B1DE 20D0 <2> and al, dl ; mask to 0 the bit to set 493 0000B1E0 53 <2> push bx 494 0000B1E1 F7D2 <2> not dx ; dx = mask of bits to change 495 0000B1E3 20D3 <2> and bl, dl ; get bit state to change to 496 0000B1E5 08D8 <2> or al, bl ; set this bit state 497 0000B1E7 E621 <2> out 21h, al ; configure the PIC 498 0000B1E9 5B <2> pop bx ; = saved states / still to set states 499 0000B1EA F7D2 <2> not dx ; dx = mask of bits to keep 500 0000B1EC 58 <2> pop ax ; = prior config 501 0000B1ED 20D3 <2> and bl, dl ; clear bits to change 502 0000B1EF F7D2 <2> not dx ; dx = mask of bits to change 503 0000B1F1 20D0 <2> and al, dl ; separate out only bits to change 504 0000B1F3 08C3 <2> or bl, al ; set in bx 505 0000B1F5 EB1C <2> jmp .next 506 <2> 507 <2> .high: 508 0000B1F7 E4A1 <2> in al, 0A1h ; get PIC configuration 509 0000B1F9 50 <2> push ax 510 0000B1FA F7D2 <2> not dx ; dx = mask of bits to keep 511 0000B1FC 20F0 <2> and al, dh ; mask to 0 the bit to set 512 0000B1FE 53 <2> push bx 513 0000B1FF F7D2 <2> not dx ; dx = mask of bits to change 514 0000B201 20F7 <2> and bh, dh ; get bit state to change to 515 0000B203 08F8 <2> or al, bh ; set this bit state 516 0000B205 E6A1 <2> out 0A1h, al ; configure the PIC 517 0000B207 5B <2> pop bx ; = saved states / still to set states 518 0000B208 F7D2 <2> not dx ; dx = mask of bits to keep 519 0000B20A 58 <2> pop ax ; = prior config 520 0000B20B 20F7 <2> and bh, dh ; clear bits to change 521 0000B20D F7D2 <2> not dx ; dx = mask of bits to change 522 0000B20F 20F0 <2> and al, dh ; separate out only bits to change 523 0000B211 08C7 <2> or bh, al ; set in bx 524 <2> 525 <2> .next: 526 0000B213 01D2 <2> add dx, dx 527 0000B215 75BA <2> jnz .loop 528 0000B217 5A <2> pop dx 529 0000B218 C3 <2> retn 530 <2> 531 <2> 532 <2> ; OUT: NC if successful 533 <2> ; CY if couldn't unhook 534 <2> serial_clean_up: 535 0000B219 E813FF <2> call serial_eoi 536 0000B21C 31C0 <2> xor ax, ax 537 0000B21E 8B16[D60B] <2> mov dx, [baseport] 538 0000B222 83C204 <2> add dx, 4 ; (base + 4) 539 <2> ; disconnect the UART from the int line 540 0000B225 EE <2> out dx, al ; write MCR 541 0000B226 4A <2> dec dx 542 0000B227 4A <2> dec dx 543 0000B228 4A <2> dec dx ; (base + 1) disable UART ints 544 0000B229 EE <2> out dx, al ; write IER 545 0000B22A 42 <2> inc dx ; (base + 2) 546 <2> ; disable the FIFOs (old software relies on it) 547 0000B22B EE <2> out dx, al ; write FCR 548 <2> 549 <2> ; reset the UART 550 0000B22C 8B16[D60B] <2> mov dx, [baseport] 551 0000B230 83C203 <2> add dx, 3 ; (base + 3) read/write LCR 552 0000B233 B080 <2> mov al, 80h ; DLAB = 1 553 0000B235 EE <2> out dx, al ; write LCR, make DL register accessible 554 0000B236 52 <2> push dx 555 0000B237 8B16[D60B] <2> mov dx, [baseport] ; (base) 556 <2> %if _SERIAL_DL_WORD 557 <2> mov ax, word [serial_save_dl] 558 <2> out dx, ax ; write bps rate divisor (DL) 559 <2> %else 560 0000B23B A0[CA0B] <2> mov al, byte [serial_save_dl] 561 0000B23E EE <2> out dx, al ; write bps rate divisor low byte (DL) 562 0000B23F 42 <2> inc dx 563 0000B240 A0[CB0B] <2> mov al, byte [serial_save_dl + 1] 564 0000B243 EE <2> out dx, al ; write bps rate divisor high byte (DL) 565 <2> %endif 566 0000B244 5A <2> pop dx ; (base + 3) write LCR 567 0000B245 A0[CD0B] <2> mov al, byte [serial_save_lcr] 568 0000B248 EE <2> out dx, al ; write parameters 569 <2> 570 0000B249 4A <2> dec dx ; (base + 2) write FCR, read IIR 571 0000B24A 31C0 <2> xor ax, ax 572 0000B24C EE <2> out dx, al ; (write FCR) disable the FIFOs 573 0000B24D 4A <2> dec dx ; (base + 1) 574 0000B24E A0[CC0B] <2> mov al, byte [serial_save_ier] 575 0000B251 EE <2> out dx, al ; write to IER 576 0000B252 8B1E[C80B] <2> mov bx, [serial_save_irq_off] 577 <2> ; bits clear for IRQ ON 578 0000B256 8B0E[C60B] <2> mov cx, [serial_save_irq_mask] 579 <2> ; negated mask of bits to change 580 0000B25A E870FF <2> call set_irq 581 0000B25D 42 <2> inc dx 582 0000B25E 42 <2> inc dx 583 0000B25F 42 <2> inc dx ; (base + 4) 584 0000B260 A0[CE0B] <2> mov al, byte [serial_save_mcr] 585 0000B263 EE <2> out dx, al ; write MCR 586 <2> 587 <2> ; restore int vector 588 <2> ; OUT: NC if successful 589 <2> ; CY if couldn't unhook 590 <2> serial_uninstall_interrupt_handler: 591 0000B264 BE[1254] <2> mov si, serial_interrupt_handler 592 0000B267 A0[440C] <2> mov al, byte [serial_installed_intnum] 593 0000B26A BA0100 <2> mov dx, opt4_int_serial_force >> 16 594 0000B26D E8B001 <2> call UnhookInterruptForce 595 0000B270 7208 <2> jc @F 596 0000B272 8026[DC00]FE <2> clropt [internalflags4], dif4_int_serial_hooked 597 0000B277 E8B402 <2> call update_inttab_optional 598 <2> ; (NC) 599 <2> @@: 600 0000B27A C3 <2> retn 601 <2> 602 <2> 603 <2> serial_send_char_add_lf: 604 0000B27B 50 <2> push ax 605 <2> .loop: 606 0000B27C E80800 <2> call serial_send_char 607 0000B27F 3C0D <2> cmp al, 13 ; add LF after CR; change it if you don't like it 608 0000B281 B00A <2> mov al, 10 609 0000B283 74F7 <2> je .loop 610 0000B285 58 <2> pop ax 611 0000B286 C3 <2> retn 612 <2> 613 <2> serial_send_char: 614 0000B287 56 <2> push si 615 0000B288 51 <2> push cx 616 0000B289 52 <2> push dx 617 0000B28A 06 <2> push es 618 <2> 619 0000B28B 8B36[E00B] <2> mov si, word [txhead] 620 0000B28F 8804 <2> mov byte [si],al 621 0000B291 46 <2> inc si 622 <2> ; check for wrap-around 623 <2> tx_checkwrap 100 0000B292 81FE[F00C] <3> cmp si, txfifo+_TXFIFOSIZE 101 0000B296 7203 <3> jb %%tx_nowrap 102 0000B298 BE[700C] <3> mov si, txfifo 103 <3> %%tx_nowrap: 624 <2> 625 0000B29B 50 <2> push ax 626 <2> %if _PM 627 <2> push ax 628 <2> call push_if 629 <2> %else 630 0000B29C 9C <2> pushf 631 <2> %endif 632 0000B29D 3936[E20B] <2> cmp word [txtail], si 633 0000B2A1 7558 <2> jne .no_wait 634 <2> 635 <2> ; Because we enable the tx empty interrupt 636 <2> ; when putting data into the buffer, it 637 <2> ; should still be enabled here when the 638 <2> ; buffer is currently full. So we only 639 <2> ; need to wait for the interrupt to 640 <2> ; occur and be processed by our handler. 641 <2> 642 0000B2A3 31C9 <2> xor cx, cx 643 0000B2A5 BA4000 <2> mov dx, 40h ; 0040h is a bimodal segment/selector 644 0000B2A8 8EC2 <2> mov es, dx 645 <2> .wait_reset_dx: 646 0000B2AA 268B166C00 <2> mov dx, word [es:6Ch] 647 <2> 648 <2> .wait: 649 0000B2AF E840F0 <2> call idle 650 <2> %if _PM 651 <2> call pop_if 652 <2> push ax 653 <2> call push_if 654 <2> %else 655 0000B2B2 9D <2> popf 656 0000B2B3 9C <2> pushf 657 <2> %endif 658 <2> 659 0000B2B4 3B36[E20B] <2> cmp si, word [txtail] 660 0000B2B8 7541 <2> jne .no_wait 661 <2> 662 <2> %if _SLEEP_NEW 663 0000B2BA 26A16C00 <2> mov ax, word [es:6Ch] 664 0000B2BE 39C2 <2> cmp dx, ax 665 0000B2C0 74ED <2> je .wait 666 0000B2C2 F7DA <2> neg dx ; minus prior tick 667 0000B2C4 01C2 <2> add dx, ax ; new tick - prior tick 668 <2> 669 0000B2C6 3B16[5E4C] <2> cmp dx, word [sleep_delta_limit] 670 0000B2CA 7609 <2> jbe @F 671 0000B2CC 8B16[5E4C] <2> mov dx, word [sleep_delta_limit] 672 0000B2D0 85D2 <2> test dx, dx 673 0000B2D2 7501 <2> jnz @F 674 0000B2D4 42 <2> inc dx ; limit 0 would lead to stagnant sleep 675 <2> @@: 676 0000B2D5 3B16[5C4C] <2> cmp dx, word [sleep_highest_delta] 677 0000B2D9 7604 <2> jbe @F 678 0000B2DB 8916[5C4C] <2> mov word [sleep_highest_delta], dx 679 <2> @@: 680 0000B2DF 01D1 <2> add cx, dx 681 0000B2E1 7205 <2> jc @F 682 <2> %else 683 <2> cmp dx, word [es:6Ch] 684 <2> je .wait 685 <2> inc cx 686 <2> %endif 687 0000B2E3 83F95A <2> cmp cx, 5 * 18 688 0000B2E6 72C2 <2> jb .wait_reset_dx 689 <2> @@: 690 <2> 691 <2> ; Immediately disable use of serial I/O. 692 0000B2E8 8026[150C]EF <2> clropt [serial_flags], sf_use_serial 693 0000B2ED 8026[A100]BF <2> clropt [options], enable_serial 694 0000B2F2 BA[1522] <2> mov dx, msg.no_progress 695 0000B2F5 E8BBEC <2> call putsz 696 0000B2F8 E9054D <2> jmp cmd3 697 <2> 698 <2> .no_wait: 699 0000B2FB 8936[E00B] <2> mov word [txhead], si 700 0000B2FF FA <2> cli ; try to avoid interrupt while emptying buffer 701 <2> ; test if we can send a byte right away 702 <2> %if 0 ; int_tx checks for THRE ...- 703 <2> mov dx, [baseport] 704 <2> add dx, 5 ; (base + 5) 705 <2> in al, dx ; read LSR 706 <2> test al, 20h ; Transmitter Holding Register Empty ? 707 <2> jz .crank ; no, just enable the interrupt --> 708 <2> %endif 709 <2> 710 <2> ; call int_tx ; send bytes, enables or disables the tx interrupt 711 0000B300 0E <2> push cs 712 0000B301 E80700 <2> call code_to_int_tx 713 <2> 714 <2> %if 0 ; -... and sets up the interrupt accordingly 715 <2> jmp .dontcrank 716 <2> .crank: 717 <2> ; crank it up 718 <2> ; note that this might not work with some very old 8250s 719 <2> add dx, 1 - 5 ; (base + 1) write IER 720 <2> mov al, 0000_0011b 721 <2> out dx, al ; enable tx empty interrupt 722 <2> .dontcrank: 723 <2> %endif 724 <2> %if _PM 725 <2> call pop_if 726 <2> %else 727 0000B304 9D <2> popf 728 <2> %endif 729 0000B305 58 <2> pop ax 730 0000B306 07 <2> pop es 731 0000B307 5A <2> pop dx 732 0000B308 59 <2> pop cx 733 0000B309 5E <2> pop si 734 0000B30A C3 <2> retn 735 <2> 736 <2> %if _PM 737 <2> push_if: 738 <2> lframe near 739 <2> lpar word, flags 740 <2> lpar_return 741 <2> lenter 742 <2> call ispm 743 <2> jnz .86m 744 <2> .pm: 745 <2> push ax 746 <2> mov ax, 0902h 747 <2> int 31h 748 <2> test al, al ; 0 = disabled ? 749 <2> mov ax, 0 ; initialise to IF=0 750 <2> jz @F 751 <2> mov ah, 2 ; else, IF=1 752 <2> @@: 753 <2> mov word [bp + ?flags], ax 754 <2> pop ax 755 <2> jmp .end 756 <2> .86m: 757 <2> pushf 758 <2> pop word [bp + ?flags] 759 <2> .end: 760 <2> lleave 761 <2> lret 762 <2> 763 <2> pop_if: 764 <2> lframe near 765 <2> lpar word, flags 766 <2> lenter 767 <2> call ispm 768 <2> jnz .86m 769 <2> push ax 770 <2> mov ax, 0900h ; initialise to disable VIF = 0900h 771 <2> test byte [bp + ?flags + 1], 2 772 <2> jz @F ; if to disable --> 773 <2> inc ax ; else enable VIF = 0901h 774 <2> @@: 775 <2> int 31h 776 <2> pop ax 777 <2> jmp .end 778 <2> .86m: 779 <2> push word [bp + ?flags] 780 <2> popf 781 <2> .end: 782 <2> lleave 783 <2> lret 784 <2> %endif 785 <2> 786 <2> code_to_int_tx: 787 0000B30B 2EFF36[1AB3] <2> push word [cs:.entry_retf_word] 788 <2> %if _PM 789 <2> ; near return address 790 <2> call ispm 791 <2> jnz .rm 792 <2> 793 <2> push word [cssel] 794 <2> jmp @F 795 <2> 796 <2> %endif 797 <2> .rm: 798 0000B310 16 <2> push ss 799 <2> @@: 800 0000B311 2EFF36[18B3] <2> push word [cs:.int_tx_word] 801 0000B316 CB <2> retf ; jump to lDEBUG_DATA_ENTRY:int_tx 802 <2> 803 0000B317 00 <2> align 2, db 0 804 <2> .int_tx_word: 805 0000B318 [DB54] <2> dw int_tx 806 <2> .entry_retf_word: 807 0000B31A [7C55] <2> dw entry_retf 808 <2> 809 <2> 810 <2> usesection lDEBUG_DATA_ENTRY 811 <2> 812 <2> entry_int3_retf: 813 0000557B CC <2> int3 814 <2> entry_retf: 815 0000557C CB <2> retf 7100 7101 7102 %include "ints.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> Interrupt hooking and unhooking 5 <1> 6 <1> 2021 by 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> usesection lDEBUG_CODE 17 <1> 18 <1> 19 <1> ; INP: 86 Mode ss = word [pspdbg] = cs for handler 20 <1> ; si -> handler entrypoint 21 <1> ; dword [si + ieNext] = storage for next vector 22 <1> ; al = interrupt number 23 <1> ; CHG: ax, bx, cx, dx 24 <1> ; STT: ss = ds (= word [pspdbg] if in 86 Mode) 25 <1> install_86m_interrupt_handler: 26 <1> %if _PM 27 <1> call ispm 28 <1> jnz .rm 29 <1> 30 <1> xchg ax, bx ; bl = interrupt number 31 <1> mov ax, 0200h 32 <1> int 31h ; cx:dx = interrupt vector 33 <1> mov word [si + ieNext], dx 34 <1> mov word [si + ieNext + 2], cx 35 <1> 36 <1> mov ax, 0201h 37 <1> ; bl still = interrupt number 38 <1> mov cx, word [pspdbg] ; cx => lDEBUG_DATA_ENTRY 39 <1> mov dx, si ; cx:dx -> our entrypoint 40 <1> int 31h ; change vector to our handler 41 <1> retn 42 <1> 43 <1> .rm: 44 <1> %endif 45 <1> 46 0000B31C E851D2 <1> call InDOS 47 0000B31F 741E <1> jz .notindos 48 0000B321 06 <1> push es 49 0000B322 1E <1> push ds 50 0000B323 31DB <1> xor bx, bx 51 0000B325 8EDB <1> mov ds, bx 52 0000B327 88C3 <1> mov bl, al 53 0000B329 01DB <1> add bx, bx 54 0000B32B 01DB <1> add bx, bx ; ds:bx -> interrupt vector 55 0000B32D C417 <1> les dx, [bx] ; es:dx = vector 56 0000B32F 36895402 <1> mov word [ss:si + ieNext], dx 57 0000B333 368C4404 <1> mov word [ss:si + ieNext + 2], es 58 <1> ; save prior vector 59 0000B337 8937 <1> mov word [bx], si 60 0000B339 8C5702 <1> mov word [bx + 2], ss ; ss => lDEBUG_DATA_ENTRY 61 <1> ; change vector to our handler 62 0000B33C 1F <1> pop ds 63 0000B33D 07 <1> pop es 64 0000B33E C3 <1> retn 65 <1> 66 <1> .notindos: 67 0000B33F 06 <1> push es 68 0000B340 B435 <1> mov ah, 35h 69 0000B342 CD21 <1> int 21h 70 0000B344 895C02 <1> mov word [si + ieNext], bx 71 0000B347 8C4404 <1> mov word [si + ieNext + 2], es 72 0000B34A 07 <1> pop es 73 0000B34B B425 <1> mov ah, 25h 74 0000B34D 89F2 <1> mov dx, si ; ds => lDEBUG_DATA_ENTRY 75 0000B34F CD21 <1> int 21h ; change vector to our handler 76 0000B351 C3 <1> retn 77 <1> 78 <1> 79 <1> %if _PM 80 <1> get_86m_interrupt_handler_no_dos: 81 <1> call ispm 82 <1> jnz get_86m_interrupt_handler.rm_indos 83 <1> %endif 84 <1> 85 <1> ; INP: al = interrupt number 86 <1> ; OUT: dx:bx = 86 Mode far pointer 87 <1> ; CHG: ah 88 <1> get_86m_interrupt_handler: 89 <1> %if _PM 90 <1> call ispm 91 <1> jnz .rm 92 <1> 93 <1> push ax 94 <1> push cx 95 <1> xchg ax, bx ; bl = interrupt number 96 <1> mov ax, 0200h 97 <1> int 31h ; cx:dx = interrupt vector 98 <1> xchg cx, bx ; bx:dx 99 <1> xchg bx, dx ; dx:bx 100 <1> pop cx 101 <1> pop ax 102 <1> retn 103 <1> 104 <1> .rm: 105 <1> %endif 106 <1> 107 0000B352 E81BD2 <1> call InDOS 108 0000B355 7412 <1> jz .notindos 109 <1> %ifn _PM 110 <1> get_86m_interrupt_handler_no_dos: equ $ 111 <1> %endif 112 <1> .rm_indos: 113 0000B357 1E <1> push ds 114 0000B358 31DB <1> xor bx, bx 115 0000B35A 8EDB <1> mov ds, bx 116 0000B35C 88C3 <1> mov bl, al 117 0000B35E 01DB <1> add bx, bx 118 0000B360 01DB <1> add bx, bx ; ds:bx -> interrupt vector 119 0000B362 8B5702 <1> mov dx, word [bx + 2] 120 0000B365 8B1F <1> mov bx, word [bx] 121 0000B367 1F <1> pop ds 122 0000B368 C3 <1> retn 123 <1> 124 <1> .notindos: 125 0000B369 06 <1> push es 126 0000B36A B435 <1> mov ah, 35h 127 0000B36C CD21 <1> int 21h 128 0000B36E 8CC2 <1> mov dx, es 129 0000B370 07 <1> pop es 130 0000B371 C3 <1> retn 131 <1> 132 <1> 133 <1> ; INP: al = interrupt number 134 <1> ; OUT: ZR if offset = -1 or segment = 0 135 <1> ; NZ else 136 <1> ; CHG: ah, dx, bx 137 <1> intchk: 138 0000B372 E8DDFF <1> call get_86m_interrupt_handler 139 0000B375 43 <1> inc bx 140 0000B376 7402 <1> jz @F ; was 0FFFFh --> 141 0000B378 85D2 <1> test dx, dx 142 <1> ; jz @F ; was 0000h --> 143 <1> @@: 144 0000B37A C3 <1> retn 145 <1> 146 <1> 147 <1> ; INP: al = interrupt number 148 <1> ; dx:bx = 86 Mode far pointer 149 <1> ; CHG: ah 150 <1> set_86m_interrupt_handler: 151 0000B37B 50 <1> push ax 152 0000B37C 53 <1> push bx 153 0000B37D 51 <1> push cx 154 0000B37E 52 <1> push dx 155 <1> %if _PM 156 <1> call ispm 157 <1> jnz .rm 158 <1> 159 <1> xchg ax, bx ; bl = interrupt number, 160 <1> ; dx:ax = vector 161 <1> xchg ax, dx ; ax:dx 162 <1> xchg cx, ax ; cx:dx 163 <1> mov ax, 0201h 164 <1> int 31h ; cx:dx = interrupt vector 165 <1> jmp .ret 166 <1> 167 <1> .rm: 168 <1> %endif 169 <1> 170 0000B37F 1E <1> push ds 171 0000B380 E8EDD1 <1> call InDOS 172 0000B383 7412 <1> jz .notindos 173 0000B385 53 <1> push bx 174 0000B386 31DB <1> xor bx, bx 175 0000B388 8EDB <1> mov ds, bx 176 0000B38A 88C3 <1> mov bl, al 177 0000B38C 01DB <1> add bx, bx 178 0000B38E 01DB <1> add bx, bx ; ds:bx -> interrupt vector 179 0000B390 895702 <1> mov word [bx + 2], dx 180 0000B393 8F07 <1> pop word [bx] 181 0000B395 EB08 <1> jmp .ret_ds 182 <1> 183 <1> .notindos: 184 0000B397 87DA <1> xchg bx, dx 185 0000B399 8EDB <1> mov ds, bx ; ds:dx = vector 186 0000B39B B425 <1> mov ah, 25h 187 0000B39D CD21 <1> int 21h 188 <1> .ret_ds: 189 0000B39F 1F <1> pop ds 190 <1> .ret: 191 0000B3A0 5A <1> pop dx 192 0000B3A1 59 <1> pop cx 193 0000B3A2 5B <1> pop bx 194 0000B3A3 58 <1> pop ax 195 0000B3A4 C3 <1> retn 196 <1> 197 <1> 198 <1> ; INP: dx = 86 Mode segment to access 199 <1> ; OUT: es => segment 200 <1> ; CHG: - 201 <1> %if _PM 202 <1> setes2dx: 203 <1> call ispm 204 <1> jnz @F 205 <1> push bx 206 <1> call setrmsegm 207 <1> mov es, bx 208 <1> pop bx 209 <1> retn 210 <1> 211 <1> @@: 212 <1> mov es, dx 213 <1> retn 214 <1> %endif ; _PM 215 <1> 216 <1> 217 <1> ; INP: ds:si -> source IISP header (or pseudo header) 218 <1> ; es:di -> destination IISP header 219 <1> ; OUT: EI 220 <1> ; si and di both incremented by 6 221 <1> ; CHG: - 222 <1> ; STT: UP 223 <1> update_iisp_header: 224 0000B3A5 50 <1> push ax 225 0000B3A6 51 <1> push cx 226 0000B3A7 52 <1> push dx 227 0000B3A8 57 <1> push di 228 0000B3A9 56 <1> push si 229 0000B3AA 06 <1> push es 230 <1> %if _PM 231 <1> dualcall selector_to_segment 232 <1> %endif 233 0000B3AB 1E <1> push ds 234 0000B3AC 16 <1> push ss 235 0000B3AD 1F <1> pop ds 236 0000B3AE E82100 <1> call findinstalleddebugger 237 0000B3B1 A3[7240] <1> mov word [debuggerfunction], ax 238 0000B3B4 1F <1> pop ds ; must be not using scratchsel ! 239 <1> %if _PM 240 <1> pop dx 241 <1> call setes2dx ; this one uses scratchsel 242 <1> %else 243 0000B3B5 07 <1> pop es 244 <1> %endif 245 0000B3B6 5E <1> pop si 246 0000B3B7 5F <1> pop di 247 0000B3B8 5A <1> pop dx 248 0000B3B9 59 <1> pop cx 249 <1> ; push ax 250 0000B3BA 36A1[7240] <1> mov ax, word [ss:debuggerfunction] 251 0000B3BE 85C0 <1> test ax, ax ; found the debugger ? 252 0000B3C0 7408 <1> jz @F ; no --> 253 <1> %if _PM 254 <1> call ispm 255 <1> jnz .86m 256 <1> [cpu 286] 257 <1> push es ; es 258 <1> dualcall selector_to_segment ; convert to segment 259 <1> push ds ; ds 260 <1> dualcall selector_to_segment ; convert to segment 261 <1> push word 2Dh ; int 2Dh 262 <1> push bp ; bp 263 <1> call intcall_return_parameter_es_parameter_ds 264 <1> add sp, 4 ; discard returned ds, es 265 <1> __CPU__ 266 <1> db __TEST_IMM16 ; (skip int) 267 <1> %endif 268 <1> .86m: 269 0000B3C2 CD2D <1> int 2Dh ; call its Update IISP Header function 270 0000B3C4 3CFF <1> cmp al, 0FFh ; supported ? 271 0000B3C6 58 <1> pop ax 272 0000B3C7 7408 <1> je .ret ; yes. done --> 273 0000B3C9 A8 <1> db __TEST_IMM8 ; (skip pop) 274 <1> @@: 275 0000B3CA 58 <1> pop ax ; restore ax, then do manual update 276 <1> %if _PM 277 <1> push ax 278 <1> call push_if 279 <1> %else 280 0000B3CB 9C <1> pushf 281 <1> %endif 282 0000B3CC FA <1> cli ; try to rest while updating chain 283 0000B3CD A7 <1> cmpsw ; skip over first word (entrypoint) 284 <1> ; (generally xxEBh or 0EA90h) 285 0000B3CE A5 <1> movsw 286 0000B3CF A5 <1> movsw ; transfer source ieNext to dest ieNext 287 <1> %if _PM 288 <1> call pop_if 289 <1> %else 290 0000B3D0 9D <1> popf 291 <1> %endif 292 <1> .ret: 293 0000B3D1 C3 <1> retn 294 <1> 295 <1> 296 <1> ; INP: ds = ss = cs 297 <1> ; OUT: CY, ax = 0000h if not found 298 <1> ; NC, al = 30h if found, 299 <1> ; ah = multiplex number 300 <1> ; CHG: si, di, es, cx, dx 301 <1> findinstalleddebugger: 302 0000B3D2 B02D <1> mov al, 2Dh 303 0000B3D4 53 <1> push bx 304 0000B3D5 E89AFF <1> call intchk 305 0000B3D8 5B <1> pop bx 306 0000B3D9 741E <1> jz .zero 307 <1> 308 0000B3DB F606[AB00]08 <1> testopt [options3], opt3_no_call_update 309 0000B3E0 7517 <1> jnz .zero 310 <1> 311 0000B3E2 8A26[AE40] <1> mov ah, byte [try_debugger_amis_multiplex_number] 312 0000B3E6 E81400 <1> call .check 313 0000B3E9 7305 <1> jnc @F 314 <1> 315 0000B3EB B4FF <1> mov ah, 0FFh ; start with multiplex number 0FFh 316 <1> .loop: 317 0000B3ED E80D00 <1> call .check 318 <1> @@: 319 0000B3F0 B030 <1> mov al, 30h ; al = 30h to indicate found, ah = multiplex number 320 0000B3F2 7308 <1> jnc .end ; if found --> (NC) 321 0000B3F4 80EC01 <1> sub ah, 1 ; search is backward (to find latest installed first), from 0FFh to 00h including 322 0000B3F7 73F4 <1> jnc .loop ; try next if we didn't check all yet --> 323 <1> 324 <1> .zero: 325 0000B3F9 31C0 <1> xor ax, ax ; al = 0 to indicate none found 326 0000B3FB F9 <1> stc ; (CY) 327 <1> .end: 328 0000B3FC C3 <1> retn 329 <1> 330 <1> 331 <1> ; INP: ah = multiplex number to check 332 <1> ; ds = ss = cs 333 <1> ; OUT: CY if multiplex number unused or no signature match, 334 <1> ; bp, ah, ds unmodified 335 <1> ; NC if match found, 336 <1> ; ah = multiplex number (unmodified) 337 <1> ; CHG: si, di, es, cx, dx 338 <1> .check: 339 0000B3FD F606[DC00]08 <1> testopt [internalflags4], dif4_int_2D_hooked 340 0000B402 7406 <1> jz @F 341 0000B404 3A26[C440] <1> cmp ah, byte [amis_multiplex_number] 342 0000B408 7414 <1> je .notfound ; do not use our own multiplexer --> 343 <1> @@: 344 0000B40A B000 <1> mov al, 00h ; AMIS installation check 345 <1> %if _PM 346 <1> call call_int2D 347 <1> %else 348 0000B40C CD2D <1> int 2Dh ; AMIS (or "DOS reserved" = iret if no AMIS present) 349 <1> %endif 350 0000B40E 3CFF <1> cmp al, 0FFh 351 0000B410 750C <1> jne .notfound 352 0000B412 BE[7440] <1> mov si, debuggeramissig ; ds:si -> our AMIS name strings 353 <1> %if _PM 354 <1> call setes2dx 355 <1> %else 356 0000B415 8EC2 <1> mov es, dx ; es:di -> name strings of AMIS multiplexer that just answered 357 <1> %endif 358 0000B417 B90800 <1> mov cx, 8 ; Ignore description, only compare vendor and program name 359 0000B41A F3A7 <1> repe cmpsw 360 0000B41C 7401 <1> je .checkret ; ZR, NC = match --> 361 <1> .notfound: 362 0000B41E F9 <1> stc ; NZ, CY no match 363 <1> .checkret: 364 0000B41F C3 <1> retn 365 <1> 366 <1> 367 <1> ; INP: al = interrupt number 368 <1> ; ds:si-> interrupt entry 369 <1> ; dx = flag in word [options4 + 2] to force 370 <1> ; dx = -1 to force unconditionally 371 <1> ; OUT: es = ss 372 <1> ; CY if unhooking failed, 373 <1> ; ds:si preserved 374 <1> ; NC if unhooking successful 375 <1> ; CHG: ah, di, si 376 <1> ; STT: ds = ss => data entry segment/selector 377 <1> ; word [pspdbg] = data entry 86 Mode segment 378 <1> UnhookInterruptForce: 379 0000B420 E80F00 <1> call UnhookInterrupt 380 0000B423 730C <1> jnc .ret 381 0000B425 83FAFF <1> cmp dx, -1 382 0000B428 7416 <1> je UnhookInterrupt.easy 383 0000B42A 8516[AE00] <1> test word [options4 + 2], dx 384 0000B42E 7510 <1> jnz UnhookInterrupt.easy 385 0000B430 F9 <1> stc 386 <1> .ret: 387 0000B431 C3 <1> retn 388 <1> 389 <1> 390 <1> ; INP: al = interrupt number 391 <1> ; ds:si-> interrupt entry 392 <1> ; OUT: es = ss 393 <1> ; CY if unhooking failed, 394 <1> ; ds:si preserved 395 <1> ; NC if unhooking successful 396 <1> ; CHG: ah, di, si 397 <1> ; STT: ds = ss => data entry segment/selector 398 <1> ; word [pspdbg] = data entry 86 Mode segment 399 <1> UnhookInterrupt: 400 <1> ; UnhookInterruptSim (below) only checks if it's possible to unhook this interrupt. 401 <1> ; This function really unhooks the interrupt if possible. 402 <1> ; 403 <1> ; This is to cover the situation when some of the hooked interrupts can unhook, 404 <1> ; but some can't. If the uninstaller would start to unhook the interrupts and then 405 <1> ; catch the interrupt that can't be unhooked the user would end up with a dead TSR 406 <1> ; that's uninstalled halfway. Very bad. 407 <1> ; 408 <1> ; "Simulating" the unhooking first and checking if all interrupts can unhook 409 <1> ; usually will not return such a state. 410 0000B432 E82900 <1> call UnhookInterruptSim 411 0000B435 721E <1> jc .ret ; bad. --> (CY) 412 0000B437 7407 <1> jz .easy 413 <1> .hard: 414 <1> ; "hard" case: UnhookInterruptSim has however already done the work, 415 <1> ; so the hard case is here indeed easier than the easy case. 416 0000B439 56 <1> push si 417 0000B43A E868FF <1> call update_iisp_header ; copies our stored pointer into the other's entry 418 0000B43D 5E <1> pop si ; restore --> header 419 0000B43E EB0D <1> jmp .done 420 <1> .easy: 421 0000B440 52 <1> push dx 422 0000B441 53 <1> push bx 423 0000B442 8B5404 <1> mov dx, word [si + ieNext + 2] 424 0000B445 8B5C02 <1> mov bx, word [si + ieNext] ; get what we stored in the entry 425 0000B448 E830FF <1> call set_86m_interrupt_handler ; easy case - just reset to the value stored 426 0000B44B 5B <1> pop bx 427 0000B44C 5A <1> pop dx 428 <1> .done: 429 0000B44D 834C04FF <1> or word [si + ieNext + 2], -1 430 0000B451 834C02FF <1> or word [si + ieNext], -1 ; (NC) 431 <1> .ret: 432 0000B455 16 <1> push ss 433 0000B456 07 <1> pop es 434 0000B457 C3 <1> retn 435 <1> 436 <1> 437 <1> ; INP: al = interrupt number 438 <1> ; ds:si-> interrupt entry 439 <1> ; dx = flag in word [options4 + 2] to force 440 <1> ; OUT: NC if no error (hard, easy, or forced case) 441 <1> ; CY if error 442 <1> ; CHG: ah, es, di 443 <1> ; STT: ds = ss => data entry segment/selector 444 <1> ; word [pspdbg] = data entry 86 Mode segment 445 <1> UnhookInterruptForceSim: 446 0000B458 8516[AE00] <1> test word [options4 + 2], dx 447 0000B45C 751D <1> jnz UnhookInterruptSim.retn ; --> (NC) 448 <1> 449 <1> 450 <1> ; INP: ds:si-> IISP entry 451 <1> ; al = interrupt number 452 <1> ; OUT: NC if no error (either hard or easy case), 453 <1> ; ZR if easy case, 454 <1> ; ds:si-> our IISP entry, containing stored interrupt 455 <1> ; NZ if hard case, 456 <1> ; ds:si-> our IISP entry 457 <1> ; es:di-> IISP entry to modify 458 <1> ; implies dword [es:di + 2] = far pointer to ours 459 <1> ; CY if error (not first handler and no IISP chain to this handler) 460 <1> ; CHG: ah, es, di 461 <1> ; STT: ds = ss => data entry segment/selector 462 <1> ; word [pspdbg] = data entry 86 Mode segment 463 <1> UnhookInterruptSim: 464 0000B45E 52 <1> push dx 465 0000B45F 53 <1> push bx 466 <1> 467 <1> ; harden this, check we are an IISP entry 468 0000B460 1E <1> push ds 469 0000B461 07 <1> pop es ; es => our handler segment 470 0000B462 89F3 <1> mov bx, si ; es:bx -> our handler 471 0000B464 E89900 <1> call IsIISPEntry? ; does it have an IISP header ? 472 0000B467 753B <1> jne .fail ; fail if not 473 <1> 474 0000B469 E8E6FE <1> call get_86m_interrupt_handler ; get current vector 475 0000B46C 39DE <1> cmp si, bx ; our pointer ? 476 0000B46E 750C <1> jne .hard 477 0000B470 3916[020B] <1> cmp word [pspdbg], dx ; our segment ? 478 0000B474 7506 <1> jne .hard 479 <1> 480 0000B476 80E400 <1> and ah, 00h ; NC, ZR 481 0000B479 5B <1> pop bx 482 0000B47A 5A <1> pop dx 483 <1> .retn: 484 0000B47B C3 <1> retn 485 <1> 486 <1> .hard: 487 <1> %if _PM 488 <1> call setes2dx 489 <1> %else 490 0000B47C 8EC2 <1> mov es, dx 491 <1> %endif 492 <1> 493 <1> ; INP: ds:si-> IISP entry 494 <1> ; es:bx-> current interrupt entry 495 <1> ; OUT: CY if error 496 <1> ; NC, NZ if no error, 497 <1> ; ds:si-> our IISP entry 498 <1> ; es:di-> IISP entry to modify 499 <1> ; implies dword [es:di + 2] = far pointer to ours 500 <1> ; CHG: ah, es, di, (bx, dx) 501 <1> ; STT: ds = ss => data entry segment/selector 502 <1> ; word [pspdbg] = data entry 86 Mode segment 503 0000B47E E86900 <1> call SearchIISPChain 504 0000B481 7508 <1> jne .harder 505 <1> .found: ; found reference to our interrupt handler 506 0000B483 89DF <1> mov di, bx ; es:di-> IISP entry that references our's 507 0000B485 80CCFF <1> or ah, 0FFh ; NC, NZ 508 0000B488 5B <1> pop bx 509 0000B489 5A <1> pop dx 510 0000B48A C3 <1> retn 511 <1> 512 <1> .harder: ; Desperate attempt to find IISP entry that references ours by 513 <1> ; searching through the interrupts hooked by other AMIS TSRs. Note 514 <1> ; that the plexer loop will find and search through the list of 515 <1> ; hooked interrupts of the uninstalling TSR itself, but this causes 516 <1> ; no trouble. 517 <1> ; INP: ds:si-> IISP entry 518 <1> ; OUT: CY if error 519 <1> ; NC, NZ if no error, 520 <1> ; ds:si-> our IISP entry 521 <1> ; es:di-> IISP entry to modify 522 <1> ; implies dword [es:di + 2] = far pointer to ours 523 <1> ; CHG: ah, es, di, (bx, dx) 524 <1> ; STT: ds = ss => data entry segment/selector 525 <1> ; word [pspdbg] = data entry 86 Mode segment 526 0000B48B 50 <1> push ax ; register with interrupt number last 527 <1> 528 0000B48C B02D <1> mov al, 2Dh 529 0000B48E E8E1FE <1> call intchk ; ZR if offset = -1 or segment = 0 530 <1> ; CHG: ax, dx, bx 531 0000B491 7410 <1> jz .fail_ax 532 <1> 533 0000B493 31C0 <1> xor ax, ax 534 <1> .loopplex: 535 0000B495 B000 <1> mov al, 00h ; AMIS installation check 536 0000B497 51 <1> push cx 537 <1> ; function 0 changes dx, di, cx, al 538 <1> %if _PM 539 <1> call call_int2D 540 <1> %else 541 0000B498 CD2D <1> int 2Dh ; enquire whether there's anyone 542 <1> %endif 543 0000B49A 59 <1> pop cx ; but we don't care who it might be 544 0000B49B FEC0 <1> inc al ; = FFh ? 545 0000B49D 7409 <1> jz .search ; yes, it is in use --> 546 <1> .nextplex: 547 0000B49F FEC4 <1> inc ah 548 0000B4A1 75F2 <1> jnz .loopplex ; try next multiplexer --> 549 <1> .fail_ax: 550 0000B4A3 58 <1> pop ax 551 <1> .fail: ; IISP incompatible TSR between current interrupt entry and our entry 552 <1> ; and no AMIS compatible TSR installed on top of our entry 553 0000B4A4 F9 <1> stc 554 0000B4A5 5B <1> pop bx 555 0000B4A6 5A <1> pop dx 556 0000B4A7 C3 <1> retn 557 <1> 558 <1> ; INP: ah = multiplex number of AMIS TSR to search through 559 <1> ; ss:sp-> interrupt number (byte), must be preserved 560 <1> ; CHG: es, di, dx, bx 561 <1> .search: 562 0000B4A8 B004 <1> mov al, 04h 563 0000B4AA 5B <1> pop bx 564 0000B4AB 53 <1> push bx ; low byte is the interrupt number 565 <1> ; function 4 changes dx, bx, al 566 <1> %if _PM 567 <1> call call_int2D 568 <1> %else 569 0000B4AC CD2D <1> int 2Dh 570 <1> %endif 571 0000B4AE 3C03 <1> cmp al, 03h ; returned its interrupt entry ? 572 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 573 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 574 <1> ; and SearchIISPChain checks the interrupt entry anyway. 575 0000B4B0 742A <1> je .search_dxbx 576 0000B4B2 3C04 <1> cmp al, 04h ; returned list of hooked interrupts ? 577 0000B4B4 75E9 <1> jne .nextplex ; no, try next multiplexer --> 578 0000B4B6 89DF <1> mov di, bx 579 0000B4B8 5B <1> pop bx 580 0000B4B9 53 <1> push bx ; bl = interrupt number 581 0000B4BA 88D8 <1> mov al, bl 582 <1> .search_intlist_seg: 583 <1> %if _PM 584 <1> call setes2dx 585 <1> %else 586 0000B4BC 8EC2 <1> mov es, dx ; es:di-> list 587 <1> %endif 588 <1> .search_intlist: ; Search the returned list for the required interrupt number. 589 0000B4BE AE <1> scasb ; our interrupt number ? 590 0000B4BF 740A <1> je .search_found_intlist 591 0000B4C1 26807DFF2D <1> cmp byte [es:di-1], 2Dh ; was last in list ? 592 0000B4C6 74D7 <1> je .nextplex 593 0000B4C8 AF <1> scasw ; skip pointer 594 0000B4C9 EBF3 <1> jmp short .search_intlist ; try next entry --> 595 <1> 596 <1> .search_found_intlist: 597 0000B4CB 268B1D <1> mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 598 0000B4CE AF <1> scasw ; skip pointer 599 0000B4CF 52 <1> push dx ; preserve dx for .search_intlist_seg 600 0000B4D0 E81700 <1> call SearchIISPChain 601 0000B4D3 5A <1> pop dx 602 0000B4D4 740D <1> je .search_found ; found entry --> 603 <1> ; This specific jump supports TSRs that hook the same 604 <1> ; interrupt more than once; jumping to .nextplex instead 605 <1> ; (as previously) aborts the search after the first match 606 <1> ; in the interrupt list. This support might become useful. 607 0000B4D6 3C2D <1> cmp al, 2Dh ; was last in list ? 608 0000B4D8 74C5 <1> je .nextplex 609 0000B4DA EBE0 <1> jmp short .search_intlist_seg 610 <1> 611 <1> .search_dxbx: 612 <1> %if _PM 613 <1> call setes2dx 614 <1> %else 615 0000B4DC 8EC2 <1> mov es, dx ; es:bx-> (IISP) interrupt entry 616 <1> %endif 617 <1> ; The entry we found now is possibly behind the non-IISP entry that 618 <1> ; terminated our first SearchIISPChain call (at .hard). We then 619 <1> ; possibly might find our entry in this hidden part of the chain. 620 0000B4DE E80900 <1> call SearchIISPChain 621 0000B4E1 75BC <1> jne .nextplex ; didn't find our entry in the chain --> 622 <1> .search_found: 623 0000B4E3 58 <1> pop ax 624 0000B4E4 EB9D <1> jmp short .found 625 <1> 626 <1> 627 <1> SearchIISPChain.next: 628 <1> %if _PM 629 <1> ; dx already next segment 630 <1> mov bx, word [es:bx + ieNext] ; get next offset 631 <1> call setes2dx ; point es:bx -> next handler 632 <1> %else 633 0000B4E6 26C45F02 <1> les bx, [es:bx + ieNext] ; get next interrupt entry 634 <1> %endif 635 <1> 636 <1> ; INP: ds:si-> IISP entry 637 <1> ; es:bx-> current interrupt entry 638 <1> ; OUT: NZ if reference to ds:si not found in IISP chain es:bx-> 639 <1> ; ZR if reference found, 640 <1> ; es:bx-> IISP (or uninstalled iHPFS) interrupt entry with reference 641 <1> ; CHG: es, bx, dx 642 <1> SearchIISPChain: 643 0000B4EA E81300 <1> call IsIISPEntry? ; that an IISP entry ? 644 0000B4ED 7510 <1> jnz .return ; nope --> (NZ) 645 0000B4EF 268B5704 <1> mov dx, word [es:bx + ieNext + 2] ; (for _PM: dx = next segment) 646 0000B4F3 263B7702 <1> cmp si, word [es:bx + ieNext] ; our offset ? 647 0000B4F7 75ED <1> jne .next ; no, try next --> 648 0000B4F9 3B16[020B] <1> cmp dx, word [pspdbg] ; our segment ? 649 0000B4FD 75E7 <1> jne .next ; no, try next --> 650 <1> .return: ; yes, found (ZR) 651 0000B4FF C3 <1> retn 652 <1> 653 <1> 654 <1> ; INP: es:bx-> interrupt entry 655 <1> ; OUT: NZ if non-IISP entry 656 <1> ; ZR if IISP entry 657 <1> IsIISPEntry?: 658 0000B500 83FBF8 <1> cmp bx, - (ieSignature + 2) ; may access word at offset FFFFh ? 659 0000B503 7728 <1> ja .return ; yes, avoid --> (NZ) 660 0000B505 26817F064B42 <1> cmp word [ es:bx + ieSignature ], "KB" ; "KB"/424Bh ? ("BK" in MASM) 661 0000B50B 7520 <1> jne .return 662 0000B50D 26813F90EA <1> cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 663 0000B512 7419 <1> je .return ; unused IISP entry (created by iHPFS) --> 664 0000B514 26803FEB <1> cmp byte [ es:bx + ieEntry ], 0EBh ; jmp short ... ? 665 <1> ; (This opcode should strictly be jmp short $+18 but there's programs 666 <1> ; that save an additional jmp opcode by jumping directly into their 667 <1> ; code even though it's not right behind the header.) 668 0000B518 7513 <1> jne .return 669 0000B51A 26807F09EB <1> cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ... ? 670 0000B51F 740C <1> je .return ; usual IISP entry --> 671 0000B521 26807F09CB <1> cmp byte [ es:bx + ieJmphwreset ], 0CBh ; retf ? 672 0000B526 7405 <1> je .return ; a shorter variant --> 673 0000B528 26807F09CF <1> cmp byte [ es:bx + ieJmphwreset ], 0CFh ; iret ? 674 <1> .return: 675 0000B52D C3 <1> retn 676 <1> 677 <1> 678 <1> ; ! might be called with unknown ss 679 <1> update_inttab_optional: 680 0000B52E 50 <1> push ax 681 0000B52F 53 <1> push bx 682 0000B530 51 <1> push cx 683 0000B531 52 <1> push dx 684 0000B532 56 <1> push si 685 0000B533 BE[440C] <1> mov si, inttab_optional 686 0000B536 BB[6C0C] <1> mov bx, inttab 687 <1> .loop: 688 0000B539 AD <1> lodsw 689 0000B53A 83F8FF <1> cmp ax, -1 690 0000B53D 7415 <1> je .end 691 0000B53F 91 <1> xchg ax, cx 692 0000B540 AD <1> lodsw 693 0000B541 91 <1> xchg ax, cx 694 0000B542 92 <1> xchg ax, dx 695 0000B543 AD <1> lodsw 696 0000B544 92 <1> xchg ax, dx 697 0000B545 8516[DC00] <1> test word [internalflags4], dx 698 0000B549 7407 <1> jz .next 699 0000B54B 4B <1> dec bx 700 0000B54C 4B <1> dec bx 701 0000B54D 890F <1> mov word [bx], cx 702 0000B54F 4B <1> dec bx 703 0000B550 8807 <1> mov byte [bx], al 704 <1> .next: 705 0000B552 EBE5 <1> jmp .loop 706 <1> 707 <1> .end: 708 0000B554 891E[5E0C] <1> mov word [amisintr_offset], bx 709 0000B558 5E <1> pop si 710 0000B559 5A <1> pop dx 711 0000B55A 59 <1> pop cx 712 0000B55B 5B <1> pop bx 713 0000B55C 58 <1> pop ax 714 0000B55D C3 <1> retn 7103 7104 7105 usesection lDEBUG_CODE 7106 7107 %if _BOOTLDR 7108 ; Determine the amount of actual memory 7109 ; 7110 ; This is important to call at the time we need the size, 7111 ; not just save the size initially. Loading other pre-boot 7112 ; installers or RPLs will change the size. 7113 ; 7114 ; INP: - 7115 ; OUT: dx = segment behind usable memory (taking EBDAs & RPLs into account) 7116 ; ds = ss 7117 ; CHG: ax, cx, di, si, ds 7118 bootgetmemorysize: section_of_function 7119 0000B55E 06 push es 7120 0000B55F 31C0 xor ax, ax 7121 0000B561 8ED8 mov ds, ax 7122 0000B563 CD12 int 12h ; get memory size in KiB 7123 0000B565 B106 mov cl, 6 7124 0000B567 D3E0 shl ax, cl ; *64, convert to paragraphs 7125 0000B569 50 push ax 7126 0000B56A C536BC00 lds si, [ 2Fh *4 ] ; get current Int2F 7127 0000B56E 46 inc si ; pointer valid (not 0FFFFh) ? (left increased!) 7128 0000B56F 741B jz .norpl ; no --> 7129 0000B571 8CD8 mov ax, ds 7130 0000B573 85C0 test ax, ax ; segment valid (not zero) ? 7131 0000B575 7415 jz .norpl ; no --> 7132 0000B577 46 times 2 inc si ; +3 with above inc 7133 0000B579 0E push cs 7134 0000B57A 07 pop es 7135 0000B57B BF[91B5] mov di, .rpl 7136 0000B57E B90300 mov cx, .rpl_size 7137 0000B581 F3A6 repe cmpsb ; "RPL" signature ? 7138 0000B583 7507 jne .norpl ; no --> 7139 0000B585 5A pop dx 7140 0000B586 B8064A mov ax, 4A06h 7141 0000B589 CD2F int 2Fh ; adjust usable memory size for RPL 7142 0000B58B A8 db __TEST_IMM8 ; (skip pop) 7143 .norpl: 7144 0000B58C 5A pop dx 7145 ; dx = segment behind last available memory 7146 0000B58D 16 push ss 7147 0000B58E 1F pop ds 7148 0000B58F 07 pop es 7149 0000B590 C3 retn 7150 7151 0000B591 52504C .rpl: db "RPL" 7152 endarea .rpl 7153 %endif 7154 7155 7156 ; Ensure a debuggee process is loaded 7157 ; 7158 ; INP: si:di = to preserve if have a process already 7159 ; OUT: NZ if have no process and unable to create process 7160 ; ZR if have a process or created empty process 7161 ; NC if had no process yet, created one or not 7162 ; CY if had a process already, 7163 ; si:di = preserved input 7164 ; NC, ZR if had no process, created empty one, 7165 ; si:di = debuggee cs:ip 7166 ; NC, NZ if int19 occurred (or bootloaded) 7167 ; CHG: si, di, cx 7168 ensuredebuggeeloaded: 7169 0000B594 50 push ax 7170 0000B595 53 push bx 7171 0000B596 52 push dx 7172 7173 0000B597 F606[DA00]20 testopt [internalflags3], dif3_gotint19 7174 0000B59C 746F jz .notint19 7175 7176 0000B59E 8026[DA00]DF clropt [internalflags3], dif3_gotint19 7177 %if _BOOTLDR 7178 %if _APPLICATION || _DEVICE 7179 0000B5A3 F606[D100]40 testopt [internalflags], nodosloaded 7180 0000B5A8 743B jz .dosint19 7181 %endif 7182 7183 .bootint19: 7184 0000B5AA E86E01 call zeroregs 7185 7186 0000B5AD B86000 mov ax, 60h 7187 0000B5B0 50 push ax 7188 0000B5B1 BF[C40C] mov di, reg_ds 7189 0000B5B4 AB stosw 7190 0000B5B5 AF scasw ; (skip dummy high word) 7191 0000B5B6 AB stosw 7192 0000B5B7 AF scasw 7193 0000B5B8 AB stosw 7194 0000B5B9 AF scasw 7195 0000B5BA AB stosw 7196 0000B5BB E8E2BB call adusetup 7197 0000B5BE E89DFF call bootgetmemorysize 7198 0000B5C1 83EA60 sub dx, 60h 7199 0000B5C4 81FA0010 cmp dx, 1000h 7200 0000B5C8 7602 jbe .bootbelow64kib ; if memory left <= 64 KiB 7201 0000B5CA 31D2 xor dx, dx ; dx = 1000h (same thing, after shifting) 7202 .bootbelow64kib: 7203 0000B5CC B104 mov cl, 4 7204 0000B5CE D3E2 shl dx, cl 7205 0000B5D0 4A dec dx 7206 0000B5D1 4A dec dx 7207 0000B5D2 8916[B40C] mov word [reg_esp], dx 7208 0000B5D6 07 pop es 7209 0000B5D7 87D7 xchg dx, di ; es:di = child stack pointer 7210 0000B5D9 31C0 xor ax, ax 7211 0000B5DB AB stosw ; push 0 on client's stack 7212 7213 0000B5DC 26C7060000CD19 mov word [es:0], 019CDh ; place opcode for int 19h at cs:ip 7214 0000B5E3 EB1B jmp @F 7215 %endif 7216 7217 %if _APPLICATION || _DEVICE 7218 .dosint19: 7219 0000B5E5 8B16[B40C] mov dx, word [reg_esp] 7220 0000B5E9 8B1E[CC0C] mov bx, word [reg_ss] 7221 7222 0000B5ED E82B01 call zeroregs 7223 7224 ; Upon receiving an int 19h in DOS 7225 ; just set up some shim that will 7226 ; lead to process termination. 7227 ; Unlike before we do not longer try 7228 ; to create a new process then. 7229 0000B5F0 8916[B40C] mov word [reg_esp], dx 7230 0000B5F4 891E[CC0C] mov word [reg_ss], bx ; preserve our stack 7231 0000B5F8 FF36[000B] push word [pspdbe] 7232 0000B5FC 8F06[D00C] pop word [reg_cs] ; cs = PSP, ip = 0, 7233 ; cs:ip -> int 20h instruction 7234 7235 @@: 7236 0000B600 F606[D200]80 testopt [internalflags], attachedterm 7237 0000B605 7511 jnz .noprocess ; if also process not loaded 7238 7239 0000B607 80CA01 or dl, 1 ; flags return NC, NZ 7240 0000B60A E9FE00 jmp .return 7241 %endif 7242 7243 .notint19: 7244 0000B60D F606[D200]80 testopt [internalflags], attachedterm 7245 0000B612 7504 jnz .noprocess ; not loaded, create --> 7246 ; flags return ZR 7247 0000B614 F9 stc ; flags return CY 7248 0000B615 E9F300 jmp .return 7249 7250 .noprocess: 7251 %if _BOOTLDR 7252 %if _APPLICATION || _DEVICE 7253 0000B618 F606[D100]40 testopt [internalflags], nodosloaded 7254 0000B61D 7403E9E900 jnz .return ; flags return NC, NZ 7255 %else 7256 jmp .return 7257 %endif 7258 %endif 7259 7260 %if _APPLICATION || _DEVICE 7261 .dosnoprocess: 7262 0000B622 B448 mov ah, 48h ; get size of largest free block 7263 0000B624 BBFFFF mov bx, -1 7264 0000B627 CD21 int 21h 7265 0000B629 83FB11 cmp bx, 11h ; enough for PSP + one paragraph for code/stack ? 7266 0000B62C 7303E9E000 jb .return_no_clr ; no --> 7267 0000B631 B448 mov ah, 48h ; allocate it 7268 0000B633 CD21 int 21h 7269 0000B635 7303E9D700 jc .return_no_clr ; (memory taken between the calls) 7270 7271 0000B63A 50 push ax 7272 0000B63B E8DD00 call zeroregs 7273 0000B63E C606[DD0C]01 mov byte [reg_eip+1], 100h>>8 7274 0000B643 58 pop ax 7275 7276 0000B644 53 push bx 7277 %if _SYMBOLIC 7278 push bx 7279 %endif 7280 0000B645 BF[C40C] mov di, reg_ds ; fill segment registers ds,es,ss,cs 7281 0000B648 AB stosw 7282 0000B649 AF scasw ; (skip dummy high word) 7283 0000B64A AB stosw 7284 0000B64B AF scasw 7285 0000B64C AB stosw 7286 0000B64D AF scasw 7287 0000B64E AB stosw 7288 0000B64F E84EBB call adusetup 7289 0000B652 8B1E[D00C] mov bx, word [reg_cs] ; bx:dx = where to load program 7290 0000B656 8EC3 mov es, bx 7291 0000B658 58 pop ax ; get size of memory block 7292 0000B659 89C2 mov dx, ax 7293 0000B65B 01DA add dx, bx 7294 0000B65D 2689160200 mov word [es:ALASAP], dx 7295 0000B662 50 push ax 7296 0000B663 3D0010 cmp ax, 1000h 7297 0000B666 7602 jbe .below64kib ; if memory left <= 64 KiB 7298 0000B668 31C0 xor ax, ax ; ax = 1000h (same thing, after shifting) 7299 .below64kib: 7300 0000B66A B104 mov cl, 4 7301 0000B66C D3E0 shl ax, cl 7302 0000B66E 48 dec ax 7303 0000B66F 48 dec ax 7304 0000B670 A3[B40C] mov word [reg_esp], ax 7305 0000B673 97 xchg ax, di ; es:di = child stack pointer 7306 0000B674 31C0 xor ax, ax 7307 0000B676 AB stosw ; push 0 on client's stack 7308 7309 ; Create a PSP 7310 0000B677 B455 mov ah, 55h ; create child PSP 7311 0000B679 8CC2 mov dx, es 7312 0000B67B 268B360200 mov si, word [es:ALASAP] 7313 0000B680 F8 clc ; works around OS/2 bug 7314 0000B681 CD21 int 21h 7315 0000B683 2689360200 mov word [es:ALASAP], si 7316 0000B688 E83EB7 call setpspdbg ; reset PSP to ours 7317 0000B68B E807B9 call ll_copy_cmdline_and_fcbs 7318 0000B68E 58 pop ax 7319 7320 0000B68F 1E push ds 7321 0000B690 06 push es 7322 0000B691 1F pop ds 7323 0000B692 3DFF0F cmp ax, 0FFFh 7324 0000B695 7603 jbe @F 7325 0000B697 B8FF0F mov ax, 0FFFh ; 0FFFh for large blocks 7326 @@: 7327 0000B69A 83E810 sub ax, 10h ; cannot underflow because block is >= 110h Bytes 7328 ; at most 0FEFh 7329 0000B69D BB0C00 mov bx, 0Ch 7330 0000B6A0 29C3 sub bx, ax ; 000Ch - 00FEFh = 0F01Dh 7331 0000B6A2 B104 mov cl, 4 7332 0000B6A4 D3E0 shl ax, cl ; 0FEF0h 7333 ; call far 0F01Dh:0FEF0h = 1000C0h 7334 ; This is either the same as 0C0h if A20 masked, or in the HMA. 7335 0000B6A6 C60605009A mov byte [CPMCALL], 09Ah; call far imm:imm opcode 7336 0000B6AB A30600 mov word [CPMCALL + 1], ax 7337 0000B6AE 891E0800 mov word [CPMCALL + 3], bx ; adjusted CALL 5 dispatcher 7338 7339 0000B6B2 BA8000 mov dx, 80h 7340 0000B6B5 B41A mov ah, 1Ah ; set DTA to default DTA 7341 0000B6B7 CD21 int 21h 7342 0000B6B9 1F pop ds 7343 7344 ; Finish up. Set termination address. 7345 0000B6BA B82225 mov ax, 2522h ; set interrupt vector 22h 7346 0000B6BD BA[D046] mov dx, int22 7347 0000B6C0 CD21 int 21h 7348 0000B6C2 2689160A00 mov word [es:TPIV], dx 7349 0000B6C7 268C1E0C00 mov word [es:TPIV+2], ds 7350 7351 0000B6CC 26C6060001C3 mov byte [es:100h], 0C3h ; place opcode for retn at cs:ip 7352 7353 %if _SYMBOLIC 7354 pop bx ; size of memory block 7355 %endif 7356 0000B6D2 8C06[000B] mov word [pspdbe], es 7357 0000B6D6 8CC0 mov ax, es 7358 0000B6D8 48 dec ax 7359 0000B6D9 8EC0 mov es, ax 7360 0000B6DB 40 inc ax 7361 0000B6DC 26C70608004445 mov word [es:8+0], "DE" 7362 0000B6E3 26C7060A004255 mov word [es:8+2], "BU" 7363 0000B6EA 26C7060C004747 mov word [es:8+4], "GG" 7364 0000B6F1 26C7060E004545 mov word [es:8+6], "EE" ; set MCB name 7365 0000B6F8 26A30100 mov word [es:1], ax ; set MCB owner 7366 7367 %if _SYMBOLIC 7368 setopt [internalflags2], dif2_createdprocess 7369 mov word [created_psp], ax 7370 mov word [created_size], bx 7371 %endif 7372 7373 0000B6FC 8B36[D00C] mov si, word [reg_cs] 7374 0000B700 8B3E[DC0C] mov di, word [reg_eip] ; ? is this ever used ? 7375 7376 0000B704 8026[D200]7F clropt [internalflags], attachedterm 7377 0000B709 38C0 cmp al, al ; flags return ZR, NC 7378 %endif 7379 7380 .return: 7381 @@: 7382 0000B70B 16 push ss 7383 0000B70C 07 pop es 7384 7385 0000B70D 5A pop dx 7386 0000B70E 5B pop bx 7387 0000B70F 58 pop ax 7388 0000B710 C3 retn 7389 7390 .return_no_clr: 7391 0000B711 BA[3425] mov dx, msg.ensure_no_memory 7392 0000B714 E89CE8 call putsz 7393 0000B717 85D2 test dx, dx ; flags return NZ, NC 7394 0000B719 EBF0 jmp .return 7395 7396 7397 zeroregs: 7398 ; call set_efl_to_fl ; initialise EFL, and ax = 0 7399 ; set_efl_to_fl: 7400 0000B71B 31C0 xor ax, ax ; initialise ax = 0 and FL = ZR NC etc 7401 0000B71D 50 _no386 push ax ; dummy high word 7402 0000B71E 66 _386_o32 ; pushfd 7403 0000B71F 9C pushf 7404 0000B720 8F06[E00C] pop word [reg_efl] ; set to FL 7405 0000B724 8F06[E20C] pop word [reg_efl+2] ; set to high word of EFL, or zero 7406 ; retn 7407 7408 0000B728 BF[A40C] mov di, regs 7409 0000B72B B91E00 mov cx, 15 * 2 ; (8 standard + 6 segregs + eip) * 2 7410 0000B72E F3AB rep stosw ; initialise all registers 7411 0000B730 C3 retn 7412 7413 7414 %if _PM 7415 ; Hook Int2F if a DPMI host is found. However for Win9x and DosEmu 7416 ; Int2F.1687 is not hooked because it doesn't work. Debugging in 7417 ; protected mode may still work, but the initial switch must be 7418 ; single-stepped. 7419 ; 7420 ; CHG: ah, bx, cx, dx, di, es 7421 ; OUT: al = 0FFh if installed 7422 ; al = status value 0F0h..0FEh else 7423 ; STT: V86/RM 7424 ; ds = debugger data segment 7425 ; ! might be called with unknown ss 7426 ; if [internalflags6] & dif6_in_amis_hook2F 7427 hook2F: 7428 call InDOS 7429 mov al, 0FEh 7430 jnz .return 7431 %if _APPLICATION || _DEVICE 7432 .not_in_dos: 7433 mov al, 0FDh 7434 testopt [internalflags], hooked2F 7435 jnz .return ; don't hook now --> 7436 dec ax ; 0FCh 7437 %if _DEBUG 7438 testopt [internalflags6], dif6_in_hook2F 7439 jnz .return 7440 %endif 7441 .loop: 7442 %if _GUARD_86M_INT2F 7443 push es 7444 xor ax, ax 7445 mov es, ax ; (only used in 86 Mode) 7446 mov ax, [es:2Fh * 4] 7447 cmp ax, -1 7448 je @F ; --> (ZR) 7449 or ax, [es:2Fh * 4 + 2] 7450 @@: 7451 pop es 7452 mov al, 0FBh 7453 jz .return 7454 %endif 7455 %if _DEBUG 7456 testopt [internalflags6], dif6_in_amis_hook2F 7457 jnz @F 7458 push si 7459 call findinstalleddebugger 7460 ; CHG: si, di, es, ax, cx, dx 7461 pop si 7462 jc @F 7463 setopt [internalflags6], dif6_in_hook2F 7464 ; avoid recursion 7465 inc ax ; al = 31h 7466 int 2Dh ; call out to debugger 7467 clropt [internalflags6], dif6_in_hook2F 7468 cmp al, 0FFh 7469 jne @F 7470 %if _DISPHOOK 7471 mov dx, dpmihookamis 7472 call putsz 7473 %endif 7474 @@: 7475 %endif 7476 mov ax, 1687h ; DPMI host installed? 7477 int 2Fh 7478 test ax, ax 7479 mov al, 0FAh 7480 jnz .return 7481 mov word [dpmientry+0], di ; true host DPMI entry 7482 mov word [dpmientry+2], es 7483 mov word [dpmiwatch+0], di 7484 mov word [dpmiwatch+2], es 7485 dec ax ; 0F9h 7486 ; Previously checked DIF nohook2F here. 7487 dec ax ; 0F8h 7488 testopt [options4], opt4_int_2F_hook 7489 jz .return ; requested to not hook --> 7490 mov ax, 352Fh 7491 int 21h 7492 mov word [oldi2F+0], bx 7493 mov word [oldi2F+2], es 7494 mov dx, debug2F ; ds => lDEBUG_DATA_ENTRY 7495 mov ax, 252Fh 7496 int 21h 7497 7498 ; Test whether we can hook the DPMI entrypoint call. 7499 mov ax, 1687h 7500 int 2Fh 7501 test ax, ax 7502 jnz .nohost 7503 cmp di, mydpmientry ; our entrypoint returned ? 7504 jne .nohook 7505 mov ax, es 7506 mov bx, ds ; bx => lDEBUG_DATA_ENTRY 7507 cmp ax, bx 7508 jne .nohook ; no --> 7509 7510 mov word [dpmiwatch+0], mydpmientry 7511 mov word [dpmiwatch+2], ds ; => lDEBUG_DATA_ENTRY 7512 7513 setopt [internalflags], hooked2F 7514 setopt [internalflags4], dif4_int_2F_hooked 7515 call update_inttab_optional 7516 %if _DISPHOOK 7517 testopt [internalflags6], dif6_in_amis_hook2F 7518 jnz @F 7519 mov ax, ds ; ax => lDEBUG_DATA_ENTRY 7520 push ds 7521 pop es 7522 mov di, dpmihookcs 7523 call hexword 7524 mov dx, dpmihook 7525 call putsz 7526 @@: 7527 %endif 7528 mov al, 0FFh 7529 %endif 7530 .return: 7531 push ds 7532 pop es 7533 retn 7534 7535 %if _APPLICATION || _DEVICE 7536 .nohost: 7537 .nohook: 7538 push ds 7539 lds dx, [oldi2F] 7540 mov ax, 252Fh 7541 int 21h ; unhook 7542 pop ds 7543 push ds 7544 pop es ; restore segregs 7545 clropt [options4], opt4_int_2F_hook 7546 ; disable hook next 7547 testopt [internalflags6], dif6_in_amis_hook2F 7548 jnz @F 7549 mov dx, msg.dpmi_no_hook 7550 call putsz ; display message about it 7551 @@: 7552 call .loop 7553 mov al, 0F0h 7554 retn 7555 %endif 7556 %endif 7557 7558 7559 ; Following bits need to be *before* boot.asm 7560 ; to support the _BOOTLDR_DISCARD option. 7561 ; But boot.asm must be included before init.asm 7562 ; so that init will get the nearcall/dualcall 7563 ; uses in boot.asm in its relocation tables. 7564 ; So all code section contents originally from 7565 ; init.asm is now moved to here. 7566 %if _SYMBOLIC && (_APPLICATION || _DEVICE) 7567 ; Moved this here so the nearcall macro is used 7568 ; before we write the relocate_from_code table. 7569 usesection lDEBUG_CODE 7570 ..@switch_s_cont: 7571 nearcall zz_save_strat 7572 nearcall zz_switch_s 7573 dec si 7574 mov dx, si 7575 retf 7576 7577 ..@switch_s_catch: 7578 mov sp, word [throwsp] ; restore stack 7579 ; (needed here if returned to errret) 7580 mov dx, errcarat 7581 call putsz 7582 xor dx, dx 7583 retf 7584 %endif 7585 7586 7587 usesection lDEBUG_CODE 7588 initcont: 7589 %if _APPLICATION 7590 0000B731 CD21 int 21h ; resize to required 7591 ; jc ... ; (expected to work since it had to be larger. also we hooked ints) 7592 %endif 7593 7594 %if _APPLICATION || _DEVICE 7595 .device: 7596 %if _VXCHG 7597 0000B733 E8B5CC call vv_set 7598 %endif 7599 7600 0000B736 1E push ds 7601 0000B737 07 pop es 7602 0000B738 E89ACD call getint2324 ; init run2324 to avoid using or displaying NUL vectors 7603 7604 0000B73B 1E push ds 7605 0000B73C 07 pop es 7606 0000B73D 5E pop si 7607 0000B73E AC lodsb 7608 0000B73F E8D4BB call kk ; process the rest of the command line 7609 %endif 7610 7611 .boot_entry: 7612 0000B742 1E push ds 7613 0000B743 07 pop es ; => lDEBUG_DATA_ENTRY 7614 7615 %if _ALTVID 7616 ; mov al, ALTSCREENBITS 7617 0000B744 E8CA8F call setscreen 7618 %endif 7619 7620 0000B747 BE[0000] mov si, cmd3 7621 %if _BOOTLDR 7622 %if _APPLICATION || _DEVICE 7623 0000B74A F606[D100]40 testopt [internalflags], nodosloaded 7624 0000B74F 7402 jz @F 7625 %endif 7626 0000B751 FFE6 jmp si ; directly jump to cmd3 of the installed image 7627 @@: 7628 %endif 7629 %if _APPLICATION || _DEVICE 7630 0000B753 56 push si 7631 0000B754 E958B7 jmp ll3 ; load a program if one has been given at the command line 7632 %endif 7633 7634 7635 %if _BOOTLDR_DISCARD 7636 usesection lDEBUG_CODE 7637 ldebug_code_bootldr_truncated_size: equ fromparas(paras($ - code_start)) 7638 %else 7639 ldebug_code_bootldr_truncated_size: equ ldebug_code_size 7640 %endif 7641 endarea ldebug_code_bootldr_truncated, 1 7642 7643 %if _BOOTLDR 7644 %include "boot.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug "boot" commands - boot loading 5 <1> 6 <1> Copyright (C) 2008-2017 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> usesection lDEBUG_DATA_ENTRY 18 <1> 19 0000557D 00 <1> align 16, db 0 20 <1> load_unit_flags: 21 00005580 00 <1> times 128 db _LUF_DEFAULT_DISKETTE 22 00005600 00 <1> times 128 db _LUF_DEFAULT_HARDDISK 23 <1> 24 <1> align 16, db 0 25 00005680 00 <1> load_partition_table: times 16 * 4 db 0 26 <1> .end: 27 <1> 28 <1> align 16, db 0 29 <1> ; Data passed to us from loader (in case we booted) 30 <1> loaddata_loadedfrom: 31 000056C0 00 <1> times (-LOADDATA + bsBPB + ebpbNew + BPBN_size) db 0 32 <1> 33 0000573A 00 <1> align 16, db 0 34 <1> load_data_lowest: 35 00005740 00 <1> times LOADDATA3_size db 0 36 <1> ; data used to access storage 37 <1> load_data: 38 00005750 00 <1> times (-LOADDATA2 + bsBPB + ebpbNew + BPBN_size) db 0 39 000057DA 00 <1> align 16, db 0 40 <1> load_current_settings: 41 <1> istruc LOADSETTINGS 42 000057E0 0000 <1> at lsKernelName, load_kernelname_default: dw 0 43 000057E2 0000 <1> at lsAddName, load_addname_default: dw 0 44 000057E4 0000 <1> at lsMinPara, load_minpara: dw 0 45 000057E6 0000 <1> at lsMaxPara, load_maxpara: dw 0 46 000057E8 0000 <1> at lsOptions, load_options: dw 0 47 000057EA 0000 <1> at lsSegment, load_loadseg: dw 0 48 000057EC 00000000 <1> at lsEntry, load_entrypoint: dd 0 49 000057F0 00000000 <1> at lsBPB, load_bpb: dd 0 50 000057F4 0000 <1> at lsCheckOffset, load_check_offset: dw 0 51 000057F6 0000 <1> at lsCheckValue, load_check_value: dw 0 52 <1> at lsName 53 <1> ; iend 54 <1> %pop ; (pop off the istruc context) 55 <1> 56 <1> %if _INPUT_FILE_BOOT 57 000057F8 00 <1> align 16, db 0 58 <1> load_yy_direntry: 59 00005800 00 <1> times DIRENTRY_size db 0 60 <1> 61 <1> LOAD_INPUT_FILE_SIZE equ fromparas(paras(-LOADDATA3 + bsBPB + ebpbNew + BPBN_size)) 62 <1> align 16, db 0 63 <1> load_input_file: 64 00005820 00 <1> times _INPUT_FILE_BOOT * LOAD_INPUT_FILE_SIZE db 0 65 <1> .active: 66 00005AA0 0000 <1> dw 0 67 <1> .goto_offset: 68 00005AA2 0000 <1> dw 0 69 <1> %endif 70 <1> 71 <1> align 4, db 0 72 00005AA4 00000000 <1> load_bpb_dest: dd 0 73 <1> load_sectors: equ load_data - LOADDATA2 + bsBPB + bpbCHSSectors 74 <1> load_heads: equ load_data - LOADDATA2 + bsBPB + bpbCHSHeads 75 <1> load_sectorsize: equ load_data - LOADDATA2 + bsBPB + bpbBytesPerSector 76 <1> load_sectorsizepara: equ load_data - LOADDATA2 + ldParaPerSector 77 <1> load_sectorseg: equ load_data - LOADDATA2 + ldSectorSeg 78 00005AA8 00000000 <1> load_partition_sector: dd 0 79 <1> load_ldp_sector: equ loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 80 <1> ; load_sdp_sector: equ load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 81 00005AAC 0000 <1> load_partition_cycle: dw 0 82 00005AAE 0000 <1> load_cmdline: dw 0 83 <1> load_ldflags: equ load_data - LOADDATA2 + ldFlags 84 <1> load_unit: equ load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 85 00005AB0 0000 <1> load_partition_entry: dw 0 86 00005AB2 00 <1> load_partition: db 0 87 00005AB3 00 <1> load_current_partition: db 0 88 00005AB4 00 <1> load_found_partition: db 0 89 00005AB5 00 <1> load_check_dir_attr: db 0 90 00005AB6 00 <1> load_sector_alt: db 0 91 <1> 92 00005AB7 00 <1> align 4, db 0 93 00005AB8 00 <1> load_kernel_name: times 11 + 1 db 0 94 <1> align 2, db 0 95 <1> ; load_kernelname_default:dw 0 96 <1> ; ASCIZ filename for if load_kernelname_input terminates in '/' 97 00005AC4 0000 <1> load_kernelname_input: dw 0 98 <1> ; input (ASCIZ '/'-terminated pathnames + optional filename) 99 00005AC6 0000 <1> load_kernelname_next: dw 0 100 <1> ; next element in ASCIZ load_kernelname_input, 101 <1> ; empty string if pathname terminated in '/' 102 <1> ; load_addname_default: dw 0 103 00005AC8 0000 <1> load_addname_input: dw 0 104 00005ACA 0000 <1> load_addname_next: dw 0 105 <1> %if _INPUT_FILE_BOOT 106 00005ACC 0000 <1> load_yyname_input: dw 0 107 00005ACE 0000 <1> load_yyname_next: dw 0 108 <1> %endif 109 <1> 110 <1> align 2, db 0 111 00005AD0 0000 <1> load_adr_dirbuf_segment:dw 0 112 00005AD2 0000 <1> boot_new_memsizekib: dw 0 113 00005AD4 0000 <1> boot_old_memsizekib: dw 0 114 00005AD6 00 <1> boot_ebdaflag: db 0 ; EBDA flag: non-zero if present 115 <1> 116 00005AD7 00 <1> align 4, db 0 117 00005AD8 00000000 <1> load_readwrite_sector: dd 0 118 00005ADC 0000 <1> load_readwrite_buffer: dw 0 119 00005ADE 0000 <1> load_readwrite_count: dw 0 120 00005AE0 0000 <1> load_readwrite_function:dw 0 121 <1> 122 <1> 123 <1> usesection lDEBUG_CODE 124 <1> 125 <1> init_bootcmd: 126 0000B757 E87B4F <1> call guard_re 127 0000B75A BD[8057] <1> mov bp, load_data - LOADDATA2 128 <1> 129 0000B75D F606[D800]80 <1> testopt [internalflags3], dif3_partition_changed 130 0000B762 7413 <1> jz @F 131 <1> 132 0000B764 FF761E <1> push word [bp + bsBPB + bpbHiddenSectors + 2] 133 0000B767 FF761C <1> push word [bp + bsBPB + bpbHiddenSectors] 134 0000B76A 8F06[A85A] <1> pop word [load_partition_sector] 135 0000B76E 8F06[AA5A] <1> pop word [load_partition_sector + 2] 136 0000B772 8026[D800]7F <1> clropt [internalflags3], dif3_partition_changed 137 <1> @@: 138 <1> 139 0000B777 31C9 <1> xor cx, cx 140 0000B779 894E1C <1> mov [bp + bsBPB + bpbHiddenSectors + 0], cx 141 0000B77C 894E1E <1> mov [bp + bsBPB + bpbHiddenSectors + 2], cx 142 0000B77F 880E[B65A] <1> mov byte [load_sector_alt], cl 143 0000B783 C3 <1> retn 144 <1> 145 <1> 146 <1> usesection lDEBUG_DATA_ENTRY 147 <1> 148 00005AE2 00 <1> align 4, db 0 149 <1> bootcmd_dispatch: 150 00005AE4 [26BC] <1> dw bootcmd.list 151 00005AE6 [132A] <1> dw msg.list 152 00005AE8 [9FB7] <1> dw bootcmd.quit 153 00005AEA [E618] <1> dw msg.quit 154 00005AEC [24C0] <1> dw boot_read 155 00005AEE [B618] <1> dw msg.read 156 00005AF0 [2CC0] <1> dw boot_write 157 00005AF2 [BB18] <1> dw msg.write 158 00005AF4 [74C8] <1> dw boot_dir 159 00005AF6 [D218] <1> dw msg.dir 160 00005AF8 [D5B7] <1> dw bootcmd.protocol 161 00005AFA [EB18] <1> dw msg.protocol 162 00005AFC 0000 <1> dw 0 ; table end marker 163 <1> 164 <1> 165 <1> usesection lDEBUG_CODE 166 <1> 167 <1> bootcmd: 168 <1> %if _PM 169 <1> call ispm 170 <1> jnz .rm 171 <1> mov dx, nopmsupp 172 <1> mov ax, 0201h 173 <1> call setrc 174 <1> jmp putsz_error 175 <1> .rm: 176 <1> %endif 177 <1> d4 call d4message 178 <1> d4 asciz "In bootcmd",13,10 179 <1> 180 0000B784 E8D0FF <1> call init_bootcmd 181 <1> 182 0000B787 E826E2 <1> call skipcomma 183 0000B78A 4E <1> dec si 184 0000B78B BB[E45A] <1> mov bx, bootcmd_dispatch 185 <1> @@: 186 0000B78E 8B0F <1> mov cx, [bx] 187 0000B790 8B5702 <1> mov dx, [bx + 2] 188 0000B793 83C304 <1> add bx, 4 189 0000B796 E370 <1> jcxz .notproto 190 0000B798 E885E1 <1> call isstring? 191 0000B79B 75F1 <1> jne @B 192 0000B79D FFE1 <1> jmp cx 193 <1> 194 <1> 195 <1> .quit: 196 <1> %if _DOSEMU 197 0000B79F F606[D300]01 <1> testopt [internalflags], runningdosemu 198 0000B7A4 7407 <1> jz .quit_not_dosemu 199 <1> 200 0000B7A6 31DB <1> xor bx, bx 201 0000B7A8 B8FFFF <1> mov ax, -1 202 0000B7AB CDE6 <1> int 0E6h ; dosemu quit 203 <1> 204 <1> .quit_not_dosemu: 205 <1> %endif 206 <1> 207 <1> ; from https://stackoverflow.com/a/5240330/738287 208 0000B7AD B80153 <1> mov ax, 5301h 209 0000B7B0 31DB <1> xor bx, bx 210 0000B7B2 CD15 <1> int 15h ; connect to APM API 211 <1> 212 0000B7B4 B80E53 <1> mov ax, 530Eh 213 0000B7B7 31DB <1> xor bx, bx 214 0000B7B9 B90201 <1> mov cx, 0102h 215 0000B7BC CD15 <1> int 15h ; set APM version to 1.02 216 <1> 217 0000B7BE B80753 <1> mov ax, 5307h 218 0000B7C1 BB0100 <1> mov bx, 1 219 0000B7C4 B90300 <1> mov cx, 3 220 0000B7C7 CD15 <1> int 15h ; shut down system 221 <1> 222 0000B7C9 BA[FD14] <1> mov dx, msg.boot_quit_fail 223 0000B7CC B80202 <1> mov ax, 0202h 224 0000B7CF E8D7CA <1> call setrc 225 0000B7D2 E9D8E7 <1> jmp putsz_error 226 <1> 227 <1> 228 <1> .protocol: 229 0000B7D5 E8F1E1 <1> call skipequals 230 0000B7D8 4E <1> dec si 231 0000B7D9 BA[2D19] <1> mov dx, msg.sector 232 0000B7DC E841E1 <1> call isstring? 233 0000B7DF 7423 <1> je .proto_sector 234 <1> 235 0000B7E1 BA[3419] <1> mov dx, msg.sector_alt 236 0000B7E4 E839E1 <1> call isstring? 237 0000B7E7 7416 <1> je .proto_sector_alt 238 <1> 239 0000B7E9 BB[BC35] <1> mov bx, loadsettings 240 <1> .proto_settings_next: 241 0000B7EC 8D5718 <1> lea dx, [bx + lsName] 242 0000B7EF E82EE1 <1> call isstring? 243 0000B7F2 7421 <1> je .proto_settings 244 0000B7F4 83C320 <1> add bx, LOADSETTINGS_size 245 0000B7F7 833F00 <1> cmp word [bx], 0 246 0000B7FA 75F0 <1> jne .proto_settings_next 247 <1> 248 0000B7FC E95ECA <1> jmp error 249 <1> 250 <1> .proto_sector_alt: 251 0000B7FF C606[B65A]01 <1> mov byte [load_sector_alt], 1 252 <1> .proto_sector: 253 0000B804 E8A9E1 <1> call skipcomma 254 0000B807 A8 <1> db __TEST_IMM8 255 <1> .notproto: 256 0000B808 AC <1> lodsb 257 0000B809 E81906 <1> call parseloadunit_default_sdp 258 0000B80C E91803 <1> jmp .load 259 <1> 260 <1> 261 <1> .errordec: 262 0000B80F 4E <1> dec si 263 <1> .error: 264 0000B810 A8 <1> db __TEST_IMM8 ; skip pop 265 <1> .errorpop: 266 0000B811 5E <1> pop si 267 0000B812 E948CA <1> jmp error 268 <1> 269 <1> 270 <1> .proto_settings: 271 0000B815 56 <1> push si 272 0000B816 89DE <1> mov si, bx 273 0000B818 BF[E057] <1> mov di, load_current_settings 274 0000B81B B90C00 <1> mov cx, lsName >> 1 275 0000B81E F3A5 <1> rep movsw 276 <1> %if lsName & 1 277 <1> movsb 278 <1> %endif 279 0000B820 FF75E8 <1> push word [load_kernelname_default - (load_current_settings + lsName) + di] 280 0000B823 8F85CC02 <1> pop word [load_kernelname_input - (load_current_settings + lsName) + di] 281 0000B827 FF75EA <1> push word [load_addname_default - (load_current_settings + lsName) + di] 282 0000B82A 8F85D002 <1> pop word [load_addname_input - (load_current_settings + lsName) + di] 283 <1> 284 0000B82E 5E <1> pop si 285 <1> 286 <1> d4 call d4message 287 <1> d4 asciz "In bootcmd.proto_settings",13,10 288 <1> 289 <1> .proto_next: 290 0000B82F E87EE1 <1> call skipcomma 291 0000B832 4E <1> dec si 292 0000B833 BA[F418] <1> mov dx, msg.segment 293 0000B836 E8E7E0 <1> call isstring? 294 0000B839 7478 <1> je .proto_segment 295 0000B83B BA[FC18] <1> mov dx, msg.entry 296 0000B83E E8DFE0 <1> call isstring? 297 0000B841 7503E98C00 <1> je .proto_entry 298 0000B846 BA[0219] <1> mov dx, msg.bpb 299 0000B849 E8D4E0 <1> call isstring? 300 0000B84C 7503E99500 <1> je .proto_bpb 301 0000B851 BA[0619] <1> mov dx, msg.minpara 302 0000B854 E8C9E0 <1> call isstring? 303 0000B857 7503E99E00 <1> je .proto_minpara 304 0000B85C BA[0E19] <1> mov dx, msg.maxpara 305 0000B85F E8BEE0 <1> call isstring? 306 0000B862 7503E9A100 <1> je .proto_maxpara 307 0000B867 BA[1619] <1> mov dx, msg.checkoffset 308 0000B86A E8B3E0 <1> call isstring? 309 0000B86D 7503E9A400 <1> je .proto_checkoffset 310 0000B872 BA[2219] <1> mov dx, msg.checkvalue 311 0000B875 E8A8E0 <1> call isstring? 312 0000B878 7503E9B200 <1> je .proto_checkvalue 313 <1> 314 0000B87D BB[4C34] <1> mov bx, loadoptiontable 315 <1> .proto_lot_next: 316 0000B880 8B0F <1> mov cx, [bx] ; flag 317 0000B882 8B5702 <1> mov dx, [bx + 2] ; -> ASCIZ message 318 0000B885 85C9 <1> test cx, cx 319 0000B887 7503E9B100 <1> jz .proto_done 320 0000B88C E891E0 <1> call isstring? 321 0000B88F 7405 <1> je .proto_lot 322 0000B891 83C304 <1> add bx, 4 323 0000B894 EBEA <1> jmp .proto_lot_next 324 <1> 325 <1> .proto_lot: 326 0000B896 E830E1 <1> call skipequals 327 0000B899 89CA <1> mov dx, cx 328 0000B89B F7D2 <1> not dx 329 0000B89D 2116[E857] <1> and word [load_options], dx 330 0000B8A1 E8D3DA <1> nearcall getexpression 331 0000B8A4 E8F3D3 <1> nearcall toboolean 332 0000B8A7 85D2 <1> test dx, dx 333 0000B8A9 7404 <1> jz @F 334 0000B8AB 090E[E857] <1> or word [load_options], cx 335 <1> @@: 336 0000B8AF 4E <1> dec si 337 0000B8B0 E97CFF <1> jmp .proto_next 338 <1> 339 <1> .proto_segment: 340 0000B8B3 E813E1 <1> call skipequals 341 0000B8B6 E8A0DF <1> nearcall getword ; dx = word 342 0000B8B9 83FA50 <1> cmp dx, 50h 343 0000B8BC 7208 <1> jb @F 344 0000B8BE 8916[EA57] <1> mov word [load_loadseg], dx 345 0000B8C2 4E <1> dec si 346 0000B8C3 E969FF <1> jmp .proto_next 347 <1> 348 <1> @@: 349 0000B8C6 BA[5D18] <1> mov dx, msg.boot_segment_too_low 350 0000B8C9 B81002 <1> mov ax, 0210h 351 0000B8CC E8DAC9 <1> call setrc 352 0000B8CF E93D03 <1> jmp .fail 353 <1> 354 <1> 355 <1> .proto_entry: 356 0000B8D2 E8F4E0 <1> call skipequals 357 0000B8D5 31DB <1> xor bx, bx 358 0000B8D7 E876CE <1> nearcall getaddr ; bx:(e)dx = addr 359 <1> _386_PM test edx, 0_FFFF_0000h 360 <1> _386_PM jnz .error 361 0000B8DA 8916[EC57] <1> mov word [load_entrypoint], dx 362 0000B8DE 891E[EE57] <1> mov word [load_entrypoint + 2], bx 363 0000B8E2 4E <1> dec si 364 0000B8E3 E949FF <1> jmp .proto_next 365 <1> 366 <1> .proto_bpb: 367 0000B8E6 E8E0E0 <1> call skipequals 368 0000B8E9 31DB <1> xor bx, bx 369 0000B8EB E862CE <1> nearcall getaddr ; bx:(e)dx = addr 370 <1> _386_PM test edx, 0_FFFF_0000h 371 <1> _386_PM jnz .error 372 0000B8EE 8916[F057] <1> mov word [load_bpb], dx 373 0000B8F2 891E[F257] <1> mov word [load_bpb + 2], bx 374 0000B8F6 4E <1> dec si 375 0000B8F7 E935FF <1> jmp .proto_next 376 <1> 377 <1> .proto_minpara: 378 0000B8FA E8CCE0 <1> call skipequals 379 0000B8FD E859DF <1> nearcall getword ; dx = word 380 0000B900 8916[E457] <1> mov word [load_minpara], dx 381 0000B904 4E <1> dec si 382 0000B905 E927FF <1> jmp .proto_next 383 <1> 384 <1> .proto_maxpara: 385 0000B908 E8BEE0 <1> call skipequals 386 0000B90B E84BDF <1> nearcall getword ; dx = word 387 0000B90E 8916[E657] <1> mov word [load_maxpara], dx 388 0000B912 4E <1> dec si 389 0000B913 E919FF <1> jmp .proto_next 390 <1> 391 <1> .proto_checkoffset: 392 0000B916 E8B0E0 <1> call skipequals 393 0000B919 E83DDF <1> nearcall getword ; dx = word 394 0000B91C 89D0 <1> mov ax, dx 395 0000B91E 241F <1> and al, 31 396 0000B920 3C1F <1> cmp al, 31 397 0000B922 7503E9E9FE <1> je .error 398 <1> ; Previously we rejected all odd values here. Now, 399 <1> ; we only reject a subset of odd values, namely 400 <1> ; those that may actually cross a sector boundary. 401 <1> ; Note that sectors may be as small as 32 bytes. 402 <1> ; This insures the checked word never crosses a sector 403 <1> ; boundary. Thus, loading a single sector suffices. 404 0000B927 8916[F457] <1> mov word [load_check_offset], dx 405 0000B92B 4E <1> dec si 406 0000B92C E900FF <1> jmp .proto_next 407 <1> 408 <1> .proto_checkvalue: 409 0000B92F E897E0 <1> call skipequals 410 0000B932 E824DF <1> nearcall getword ; dx = word 411 0000B935 8916[F657] <1> mov word [load_check_value], dx 412 0000B939 4E <1> dec si 413 0000B93A E9F2FE <1> jmp .proto_next 414 <1> 415 <1> .proto_done: 416 0000B93D BB[8834] <1> mov bx, loadoptiontable.incompatible 417 <1> @@: 418 0000B940 8B0F <1> mov cx, [bx] 419 0000B942 0B4F02 <1> or cx, [bx + 2] 420 0000B945 746B <1> jz .proto_compatible 421 0000B947 8B16[E857] <1> mov dx, word [load_options] 422 0000B94B 21CA <1> and dx, cx 423 0000B94D 39CA <1> cmp dx, cx 424 0000B94F 7405 <1> je .proto_incompatible 425 0000B951 83C304 <1> add bx, 4 426 0000B954 EBEA <1> jmp @B 427 <1> 428 <1> .proto_incompatible: 429 0000B956 16 <1> push ss 430 0000B957 07 <1> pop es 431 0000B958 B80302 <1> mov ax, 0203h 432 0000B95B E84BC9 <1> call setrc 433 0000B95E BA[1715] <1> mov dx, msg.bootfail 434 0000B961 E849E6 <1> call putsz_error 435 0000B964 BA[1018] <1> mov dx, msg.boot_cannot_set_both 436 0000B967 E843E6 <1> call putsz_error 437 0000B96A 8B07 <1> mov ax, word [bx] 438 0000B96C E82200 <1> call .proto_incompatible_get_label 439 0000B96F E83BE6 <1> call putsz_error 440 0000B972 BA[2118] <1> mov dx, msg.boot_and 441 0000B975 E835E6 <1> call putsz_error 442 0000B978 8B4702 <1> mov ax, word [bx + 2] 443 0000B97B E81300 <1> call .proto_incompatible_get_label 444 0000B97E E82CE6 <1> call putsz_error 445 0000B981 BA[2718] <1> mov dx, msg.boot_dot_crlf 446 <1> .putsz_errret: 447 0000B984 B80402 <1> mov ax, 0204h 448 0000B987 E81FC9 <1> call setrc 449 0000B98A E820E6 <1> call putsz_error 450 0000B98D FF26[F20A] <1> jmp near word [errret] 451 <1> 452 <1> .proto_incompatible_get_label: 453 0000B991 53 <1> push bx 454 0000B992 BB[4C34] <1> mov bx, loadoptiontable 455 <1> @@: 456 0000B995 8B0F <1> mov cx, [bx] 457 0000B997 E30E <1> jcxz .proto_internal_error 458 0000B999 39C8 <1> cmp ax, cx 459 0000B99B 8B5702 <1> mov dx, word [bx + 2] 460 0000B99E 7405 <1> je @F 461 0000B9A0 83C304 <1> add bx, 4 462 0000B9A3 EBF0 <1> jmp @B 463 <1> 464 <1> @@: 465 0000B9A5 5B <1> pop bx 466 0000B9A6 C3 <1> retn 467 <1> 468 <1> .proto_internal_error: 469 0000B9A7 BA[2B18] <1> mov dx, msg.boot_internal_error 470 0000B9AA B80502 <1> mov ax, 0205h 471 0000B9AD E8F9C8 <1> call setrc 472 0000B9B0 EBD2 <1> jmp .putsz_errret 473 <1> 474 <1> 475 <1> .proto_compatible: 476 0000B9B2 AC <1> lodsb 477 0000B9B3 E86F04 <1> call parseloadunit_default_sdp 478 0000B9B6 7503E98300 <1> jz .fn_done_eol ; no filename given, use defaults --> 479 <1> ; al was = '/' or '\' or first pathname's first character 480 <1> ; si-> next char 481 0000B9BB BB[C45A] <1> mov bx, load_kernelname_input 482 0000B9BE E83900 <1> call .pathname_parse_super 483 <1> 484 0000B9C1 56 <1> push si 485 0000B9C2 50 <1> push ax 486 0000B9C3 E81AE0 <1> call skipwh0 487 0000B9C6 E8C1DF <1> call iseol? 488 0000B9C9 58 <1> pop ax 489 0000B9CA 5E <1> pop si 490 0000B9CB 7473 <1> je .fn_done 491 <1> 492 0000B9CD BB[C85A] <1> mov bx, load_addname_input 493 <1> 494 0000B9D0 E80DE0 <1> call skipwh0 495 0000B9D3 3C2F <1> cmp al, '/' 496 0000B9D5 7404 <1> je @F 497 0000B9D7 3C5C <1> cmp al, '\' 498 0000B9D9 751A <1> jne .proto_not_double_slash 499 <1> @@: 500 0000B9DB 803C2F <1> cmp byte [si], '/' 501 0000B9DE 7405 <1> je @F 502 0000B9E0 803C5C <1> cmp byte [si], '\' 503 0000B9E3 7510 <1> jne .proto_not_double_slash 504 <1> @@: 505 0000B9E5 4E <1> dec si 506 0000B9E6 8937 <1> mov word [bx], si 507 0000B9E8 C7042F2F <1> mov word [si], "//" 508 0000B9EC 46 <1> inc si 509 0000B9ED 46 <1> inc si 510 0000B9EE AC <1> lodsb 511 0000B9EF C644FF00 <1> mov byte [si - 1], 0 512 0000B9F3 EB4B <1> jmp .fn_done 513 <1> 514 <1> .proto_not_double_slash: 515 0000B9F5 E80200 <1> call .pathname_parse_super 516 0000B9F8 EB46 <1> jmp .fn_done 517 <1> 518 <1> 519 <1> ; INP: bx -> word variable to hold filename 520 <1> ; OUT: word [bx] -> list of /-separated pathnames, zero-terminated 521 <1> ; CHG: ax, cx, si, di, [es:load_kernel_name] 522 <1> .pathname_parse_super: 523 <1> d4 call d4message 524 <1> d4 asciz "In bootcmd.pathname_parse_super",13,10 525 <1> 526 0000B9FA E8E3DF <1> call skipwh0 527 0000B9FD 3C2F <1> cmp al, '/' 528 0000B9FF 7404 <1> je @F 529 0000BA01 3C5C <1> cmp al, '\' 530 0000BA03 7506 <1> jne @FF 531 <1> @@: 532 0000BA05 4E <1> dec si 533 0000BA06 8937 <1> mov word [bx], si 534 0000BA08 46 <1> inc si 535 0000BA09 EB0E <1> jmp .pathname_check 536 <1> 537 <1> @@: 538 0000BA0B 4E <1> dec si 539 0000BA0C 8937 <1> mov word [bx], si 540 <1> 541 <1> .pathname_parse: 542 <1> .pathname_next: 543 <1> d4 call d4message 544 <1> d4 asciz "In bootcmd.pathname_parse",13,10 545 0000BA0E E82407 <1> call boot_parse_fn 546 <1> ; al = separator char 547 <1> ; si -> next char after that (if any) 548 0000BA11 3C2F <1> cmp al, '/' ; path separator? 549 0000BA13 7404 <1> je .pathname_check 550 0000BA15 3C5C <1> cmp al, '\' 551 0000BA17 7517 <1> jne .pathname_none ; no, this was the filename --> 552 <1> .pathname_check: 553 <1> d4 call d4message 554 <1> d4 asciz "In bootcmd.pathname_parse_check",13,10 555 0000BA19 C644FF2F <1> mov byte [si - 1], '/' ; normalise path separator 556 0000BA1D AC <1> lodsb 557 0000BA1E 3C20 <1> cmp al, 32 ; space ? 558 0000BA20 740E <1> je .pathname_gotfirst 559 0000BA22 3C09 <1> cmp al, 9 560 0000BA24 740A <1> je .pathname_gotfirst ; yes, allow for second name --> 561 0000BA26 4E <1> dec si 562 0000BA27 E860DF <1> call iseol? ; EOL ? 563 0000BA2A 75E2 <1> jne .pathname_next ; no, next pathname element --> 564 0000BA2C C60400 <1> mov byte [si], 0 ; terminate after trailing path sep 565 0000BA2F C3 <1> retn 566 <1> 567 <1> .pathname_gotfirst: 568 <1> .pathname_none: 569 0000BA30 B000 <1> mov al, 0 570 0000BA32 4E <1> dec si 571 0000BA33 8604 <1> xchg al, byte [si] ; terminate after filename 572 0000BA35 8936[3A0C] <1> mov word [terminator_in_line_in.offset], si 573 0000BA39 A2[3C0C] <1> mov byte [terminator_in_line_in.value], al 574 0000BA3C 46 <1> inc si 575 0000BA3D C3 <1> retn 576 <1> 577 <1> 578 <1> ; DPR:word [load_kernelname_input] -> ASCIZ pathname. 579 <1> ; if it ends in '/', append DPR:word [load_kernelname_default] 580 <1> ; DPR:word [load_addname_input] -> ASCIZ pathname. 581 <1> ; if it ends in '/', append DPR:word [load_addname_default] 582 <1> ; if it's empty (and no trailing '/' in front of the zero) 583 <1> ; then no additional name is given. 584 <1> .fn_done_eol: 585 0000BA3E B00D <1> mov al, 13 586 <1> .fn_done: 587 <1> d4 call d4message 588 <1> d4 asciz "In bootcmd.fn_done",13,10 589 <1> 590 0000BA40 8326[AE5A]00 <1> and word [load_cmdline], 0 591 <1> 592 0000BA45 E842DF <1> call iseol? 593 0000BA48 743E <1> je @F 594 <1> 595 0000BA4A F606[E957]10 <1> testopt [load_options], LOAD_CMDLINE 596 0000BA4F 7503E909C8 <1> jz error 597 <1> 598 0000BA54 E889DF <1> call skipwh0 599 0000BA57 B400 <1> mov ah, 0 600 0000BA59 3C22 <1> cmp al, '"' 601 0000BA5B 7404 <1> je .cmdline_quote 602 0000BA5D 3C27 <1> cmp al, "'" 603 0000BA5F 7503 <1> jne .cmdline_no_quote 604 <1> .cmdline_quote: 605 0000BA61 88C4 <1> mov ah, al 606 0000BA63 A8 <1> db __TEST_IMM8 607 <1> .cmdline_no_quote: 608 0000BA64 4E <1> dec si 609 0000BA65 8936[AE5A] <1> mov word [load_cmdline], si 610 <1> .cmdline_loop: 611 0000BA69 AC <1> lodsb 612 0000BA6A E821DF <1> call iseol?.notsemicolon 613 0000BA6D 740E <1> je .cmdline_eol 614 0000BA6F 38E0 <1> cmp al, ah 615 0000BA71 75F6 <1> jne .cmdline_loop 616 <1> .cmdline_quote_eol: 617 0000BA73 C644FF00 <1> mov byte [si - 1], 0 618 0000BA77 AC <1> lodsb 619 0000BA78 E824DF <1> call chkeol 620 0000BA7B EB0B <1> jmp @F 621 <1> 622 <1> .cmdline_eol: 623 0000BA7D 84E4 <1> test ah, ah 624 0000BA7F 7403E9D9C7 <1> jnz error 625 0000BA84 C644FF00 <1> mov byte [si - 1], 0 626 <1> 627 <1> @@: 628 0000BA88 F606[D800]07 <1> testopt [internalflags3], dif3_load_is_dp 629 0000BA8D 7527 <1> jnz .load_kernel_from_ldp 630 <1> 631 0000BA8F 8A1E[B25A] <1> mov bl, [load_partition] 632 0000BA93 803E[C057]80 <1> cmp byte [load_unit], 80h 633 0000BA98 7228 <1> jb .p_f_is_diskette 634 0000BA9A 84DB <1> test bl, bl ; partition specified ? 635 0000BA9C 7503E96FFD <1> jz .error ; no, error --> 636 <1> 637 0000BAA1 E80A15 <1> call query_geometry 638 <1> 639 0000BAA4 B9[29C2] <1> mov cx, load_freedos_from_partition 640 0000BAA7 E85C13 <1> call scan_partitions 641 0000BAAA BA[B116] <1> mov dx, msg.boot_partition_not_found 642 0000BAAD B81102 <1> mov ax, 0211h 643 0000BAB0 E8F6C7 <1> call setrc 644 0000BAB3 E95901 <1> jmp .fail 645 <1> 646 <1> 647 <1> .load_kernel_from_ldp: 648 0000BAB6 E8F514 <1> call query_geometry 649 0000BAB9 A1[A85A] <1> mov ax, word [load_partition_sector] 650 0000BABC 8B16[AA5A] <1> mov dx, word [load_partition_sector + 2] 651 0000BAC0 EB0E <1> jmp @F 652 <1> 653 <1> 654 <1> .p_f_is_diskette: 655 0000BAC2 84DB <1> test bl, bl ; partition specified ? 656 0000BAC4 7403E947FD <1> jnz .error ; yes, error --> 657 <1> 658 0000BAC9 E8E214 <1> call query_geometry 659 <1> 660 0000BACC 31C0 <1> xor ax, ax 661 0000BACE 31D2 <1> xor dx, dx 662 <1> @@: 663 0000BAD0 8B1E[4A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 664 0000BAD4 52 <1> push dx 665 0000BAD5 50 <1> push ax 666 0000BAD6 E89D16 <1> call read_ae_512_bytes 667 <1> 668 0000BAD9 26813EFE0155AA <1> cmp word [es:510], 0AA55h 669 0000BAE0 7403E97A19 <1> jne boot_sigmismatch 670 0000BAE5 58 <1> pop ax 671 0000BAE6 5A <1> pop dx 672 <1> 673 0000BAE7 06 <1> push es 674 0000BAE8 F606[E957]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 675 0000BAED 7434 <1> jz @F 676 <1> 677 0000BAEF 50 <1> push ax 678 0000BAF0 31FF <1> xor di, di 679 0000BAF2 8EC7 <1> mov es, di 680 0000BAF4 BF0006 <1> mov di, 600h 681 0000BAF7 B8CD19 <1> mov ax, 19CDh 682 0000BAFA AB <1> stosw ; fake boot sector loader 683 0000BAFB B9FE00 <1> mov cx, 508 / 2 684 0000BAFE 31C0 <1> xor ax, ax 685 0000BB00 F3AB <1> rep stosw ; initialise pseudo MBR 686 0000BB02 B855AA <1> mov ax, 0AA55h 687 0000BB05 AB <1> stosw ; fake boot sector signature 688 0000BB06 58 <1> pop ax 689 <1> 690 0000BB07 BEBE07 <1> mov si, 600h + 512 - 2 - 64 691 0000BB0A 26894408 <1> mov word [es:si + 8], ax 692 0000BB0E 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 693 0000BB12 26C60480 <1> mov byte [es:si + piBoot], 80h ; fake primary active 694 0000BB16 26C64404FF <1> mov byte [es:si + piType], 0FFh ; fake a type 695 0000BB1B 26FE440C <1> inc byte [es:si + piLength] ; fake a size 696 <1> 697 0000BB1F 8936[B05A] <1> mov word [load_partition_entry], si 698 <1> @@: 699 0000BB23 07 <1> pop es 700 <1> 701 0000BB24 E97107 <1> jmp load_freedos_common 702 <1> 703 <1> 704 <1> .load: 705 0000BB27 7403E9E4FC <1> jnz bootcmd.error 706 <1> 707 0000BB2C F606[D800]07 <1> testopt [internalflags3], dif3_load_is_dp 708 0000BB31 751C <1> jnz .load_sector_from_ldp 709 <1> 710 0000BB33 803E[B25A]00 <1> cmp byte [load_partition], 0 711 0000BB38 7421 <1> je .load_boot 712 <1> 713 0000BB3A E87114 <1> call query_geometry 714 <1> 715 <1> d4 call d4message 716 <1> d4 asciz "In bootcmd.load (before call to scan_partitions)",13,10 717 <1> 718 0000BB3D B9[BAC1] <1> mov cx, load_from_partition 719 0000BB40 E8C312 <1> call scan_partitions 720 0000BB43 BA[B116] <1> mov dx, msg.boot_partition_not_found 721 0000BB46 B81202 <1> mov ax, 0212h 722 0000BB49 E85DC7 <1> call setrc 723 0000BB4C E9C000 <1> jmp .fail 724 <1> 725 <1> 726 <1> .load_sector_from_ldp: 727 0000BB4F E85C14 <1> call query_geometry 728 0000BB52 A1[A85A] <1> mov ax, word [load_partition_sector] 729 0000BB55 8B16[AA5A] <1> mov dx, word [load_partition_sector + 2] 730 0000BB59 EB07 <1> jmp @F 731 <1> 732 <1> .load_boot: 733 0000BB5B E85014 <1> call query_geometry 734 <1> 735 0000BB5E 31C0 <1> xor ax, ax 736 0000BB60 31D2 <1> xor dx, dx 737 <1> @@: 738 0000BB62 BBC007 <1> mov bx, 7C0h 739 <1> d4 call d4dumpregs 740 <1> d4 call d4message 741 <1> d4 asciz 13,10,"In bootcmd.load_boot (before call to read_sector)",13,10 742 0000BB65 52 <1> push dx 743 0000BB66 50 <1> push ax 744 0000BB67 E80C16 <1> call read_ae_512_bytes 745 <1> d4 call d4message 746 <1> d4 asciz "In bootcmd.load_boot (after call to read_sector)",13,10 747 0000BB6A 31D2 <1> xor dx, dx 748 0000BB6C 8EC2 <1> mov es, dx 749 <1> 750 0000BB6E A0[C057] <1> mov al, byte [load_unit] ; al = boot unit 751 0000BB71 BB007C <1> mov bx, 7C00h 752 <1> 753 0000BB74 26813EFE7D55AA <1> cmp word [es:7C00h + 510], 0AA55h 754 0000BB7B 7403E9DF18 <1> jne boot_sigmismatch 755 <1> 756 0000BB80 26833F00 <1> cmp word [es:bx], 0 757 0000BB84 7503E9E218 <1> je boot_codemismatch 758 <1> 759 0000BB89 50 <1> push ax 760 0000BB8A B9FF00 <1> mov cx, 510 / 2 761 0000BB8D BF0006 <1> mov di, 600h ; MBR location 762 0000BB90 31C0 <1> xor ax, ax 763 0000BB92 F3AB <1> rep stosw ; initialise (sector and all entries) 764 0000BB94 B855AA <1> mov ax, 0AA55h 765 0000BB97 AB <1> stosw ; initialise boot sector signature 766 0000BB98 26C7060006CD19 <1> mov word [es:600h], 019CDh ; initialise boot sector code 767 0000BB9F BFBE07 <1> mov di, 600h + 510 - 4*16 ; -> first partition table entry 768 0000BBA2 58 <1> pop ax 769 0000BBA3 268F4508 <1> pop word [es:di + piStart] 770 0000BBA7 268F450A <1> pop word [es:di + piStart + 2] ; = boot sector LBA 771 0000BBAB 26C60580 <1> mov byte [es:di + 0], 80h ; "bootable" flag set 772 0000BBAF 26C64504FF <1> mov byte [es:di + 4], 0FFh ; dummy value for FS type (nonzero) 773 0000BBB4 26C6450C01 <1> mov byte [es:di + 12], 1 ; dummy value for length (nonzero) 774 <1> 775 <1> load_partition_common: equ $ 776 0000BBB9 8126[E00C]FFF8 <1> and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 777 0000BBBF 893E[BC0C] <1> mov word [reg_esi], di 778 0000BBC3 893E[B80C] <1> mov word [reg_ebp], di 779 0000BBC7 890E[C40C] <1> mov word [reg_ds], cx ; ds:si -> 0:600h + offset to first entry 780 0000BBCB A2[B00C] <1> mov byte [reg_edx], al ; dl = boot unit 781 0000BBCE 891E[DC0C] <1> mov word [reg_eip], bx 782 0000BBD2 890E[DE0C] <1> mov word [reg_eip + 2], cx 783 0000BBD6 890E[D00C] <1> mov word [reg_cs], cx ; cs:eip = 0:7C00h 784 0000BBDA 803E[B65A]00 <1> cmp byte [load_sector_alt], 0 785 0000BBDF 740A <1> je @F 786 0000BBE1 890E[DC0C] <1> mov word [reg_eip], cx 787 0000BBE5 C706[D00C]C007 <1> mov word [reg_cs], 7C0h ; cs:eip = 07C0h:0 788 <1> @@: 789 0000BBEB 891E[B40C] <1> mov word [reg_esp], bx 790 0000BBEF 890E[B60C] <1> mov word [reg_esp + 2], cx 791 0000BBF3 890E[CC0C] <1> mov word [reg_ss], cx ; ss:esp = 0:7C00h 792 0000BBF7 800E[D700]01 <1> setopt [internalflags2], dif2_boot_loaded_kernel 793 0000BBFC C3 <1> retn 794 <1> 795 <1> 796 <1> .fail_read: 797 0000BBFD 16 <1> push ss 798 0000BBFE 07 <1> pop es 799 0000BBFF BF[4315] <1> mov di, msg.bootfail_read_errorcode 800 0000BC02 88E0 <1> mov al, ah 801 0000BC04 B404 <1> mov ah, 04h 802 0000BC06 E8A0C6 <1> call setrc 803 0000BC09 E885DE <1> call hexbyte 804 0000BC0C BA[2615] <1> mov dx, msg.bootfail_read 805 <1> 806 <1> .fail: 807 0000BC0F 16 <1> push ss 808 0000BC10 07 <1> pop es 809 0000BC11 52 <1> push dx 810 0000BC12 BA[1715] <1> mov dx, msg.bootfail 811 0000BC15 E895E3 <1> call putsz_error 812 0000BC18 5A <1> pop dx 813 0000BC19 E891E3 <1> call putsz_error 814 0000BC1C B8FF02 <1> mov ax, 02FFh 815 0000BC1F E887C6 <1> call setrc 816 0000BC22 FF26[F20A] <1> jmp near word [errret] 817 <1> 818 <1> 819 <1> bootcmd.list: 820 0000BC26 E887DD <1> call skipcomma 821 <1> 822 0000BC29 E8F901 <1> call parseloadunit_default_sdp 823 0000BC2C 7403E9DFFB <1> jnz bootcmd.error 824 <1> 825 0000BC31 E87A13 <1> call query_geometry 826 <1> 827 0000BC34 F606[D800]07 <1> testopt [internalflags3], dif3_load_is_dp 828 0000BC39 752B <1> jnz .list_ldp 829 <1> 830 0000BC3B 803E[B25A]00 <1> cmp byte [load_partition], 0 831 0000BC40 741E <1> je .listall 832 <1> 833 0000BC42 C606[B45A]00 <1> mov byte [load_found_partition], 0 834 0000BC47 B9[9FBC] <1> mov cx, list_single_partition 835 0000BC4A E8B911 <1> call scan_partitions 836 0000BC4D 803E[B45A]00 <1> cmp byte [load_found_partition], 0 837 0000BC52 750B <1> jne @F 838 0000BC54 BA[B116] <1> mov dx, msg.boot_partition_not_found 839 0000BC57 B81302 <1> mov ax, 0213h 840 0000BC5A E84CC6 <1> call setrc 841 0000BC5D EBB0 <1> jmp bootcmd.fail 842 <1> @@: 843 0000BC5F C3 <1> retn 844 <1> 845 <1> .listall: 846 0000BC60 B9[ADBC] <1> mov cx, list_any_partition 847 0000BC63 E9A011 <1> jmp scan_partitions 848 <1> 849 <1> .list_ldp: 850 0000BC66 C606[B45A]00 <1> mov byte [load_found_partition], 0 851 0000BC6B B9[84BC] <1> mov cx, list_partition_if_ldp 852 0000BC6E E89511 <1> call scan_partitions 853 0000BC71 803E[B45A]00 <1> cmp byte [load_found_partition], 0 854 0000BC76 750B <1> jne @F 855 0000BC78 BA[B116] <1> mov dx, msg.boot_partition_not_found 856 0000BC7B B81402 <1> mov ax, 0214h 857 0000BC7E E828C6 <1> call setrc 858 0000BC81 EB8C <1> jmp bootcmd.fail 859 <1> @@: 860 0000BC83 C3 <1> retn 861 <1> 862 <1> 863 <1> list_partition_if_ldp: 864 <1> d4 call d4message 865 <1> d4 asciz "In list_partition_if_ldp",13,10 866 <1> 867 0000BC84 8B43F8 <1> mov ax, word [bp + di - 8] 868 0000BC87 8B53FA <1> mov dx, word [bp + di - 6] ; root 869 0000BC8A 26034408 <1> add ax, word [es:si + 8] 870 0000BC8E 2613540A <1> adc dx, word [es:si + 8 + 2] ; add partition offset 871 0000BC92 3906[A85A] <1> cmp word [load_partition_sector], ax 872 0000BC96 7506 <1> jne @F 873 0000BC98 3916[AA5A] <1> cmp word [load_partition_sector + 2], dx 874 0000BC9C 740B <1> je list_single_partition.gotit 875 <1> @@: 876 0000BC9E C3 <1> retn 877 <1> 878 <1> list_single_partition: 879 <1> d4 call d4message 880 <1> d4 asciz "In list_single_partition",13,10 881 <1> 882 0000BC9F A0[B35A] <1> mov al, byte [load_current_partition] 883 0000BCA2 3A06[B25A] <1> cmp al, byte [load_partition] 884 0000BCA6 7401 <1> je .gotit 885 0000BCA8 C3 <1> retn 886 <1> 887 <1> .gotit: 888 0000BCA9 FE06[B45A] <1> inc byte [load_found_partition] 889 <1> 890 <1> ; INP: es:si -> partition table entry, 891 <1> ; si = load_partition_table .. load_partition_table+48, 892 <1> ; es = ss 893 <1> ; bp + di -> above part table metadata, 894 <1> ; dwo [bp + di - 4] = root (outermost extended position) 895 <1> ; dwo [bp + di - 8] = base (current table position) 896 <1> ; CHG: ax, bx, (cx), dx 897 <1> list_any_partition: 898 0000BCAD 06 <1> push es 899 0000BCAE 51 <1> push cx 900 0000BCAF 56 <1> push si 901 0000BCB0 57 <1> push di 902 <1> 903 0000BCB1 BF[B40A] <1> mov di, line_out ; reset di 904 0000BCB4 B075 <1> mov al, "u" 905 0000BCB6 AA <1> stosb 906 0000BCB7 A0[C057] <1> mov al, byte [load_unit] 907 0000BCBA E8D4DD <1> call hexbyte 908 0000BCBD 84C0 <1> test al, al 909 0000BCBF B02E <1> mov al, '.' 910 0000BCC1 AA <1> stosb 911 0000BCC2 7806 <1> js @F 912 0000BCC4 B020 <1> mov al, 32 913 0000BCC6 AA <1> stosb 914 0000BCC7 AA <1> stosb 915 0000BCC8 EB0D <1> jmp @FF 916 <1> 917 <1> @@: 918 0000BCCA A0[B35A] <1> mov al, byte [load_current_partition] 919 0000BCCD E821DD <1> call decbyte 920 0000BCD0 3C0A <1> cmp al, 10 921 0000BCD2 B020 <1> mov al, 32 922 0000BCD4 7301 <1> jae @F 923 0000BCD6 AA <1> stosb 924 <1> @@: 925 0000BCD7 AA <1> stosb 926 <1> 927 0000BCD8 A0[C057] <1> mov al, byte [load_unit] 928 0000BCDB 50 <1> push ax 929 0000BCDC BB6664 <1> mov bx, "fd" 930 0000BCDF 3C80 <1> cmp al, 80h 931 0000BCE1 7202 <1> jb @F 932 0000BCE3 B368 <1> mov bl, "h" 933 <1> @@: 934 0000BCE5 247F <1> and al, ~80h 935 0000BCE7 0461 <1> add al, 'a' 936 0000BCE9 3C7A <1> cmp al, 'z' 937 0000BCEB 760A <1> jbe @F 938 0000BCED 58 <1> pop ax 939 0000BCEE B020 <1> mov al, 32 940 0000BCF0 B90500 <1> mov cx, 3 + 2 941 0000BCF3 F3AA <1> rep stosb 942 0000BCF5 EB1C <1> jmp .beyondZ 943 <1> 944 <1> @@: 945 0000BCF7 93 <1> xchg ax, bx 946 0000BCF8 AB <1> stosw 947 0000BCF9 93 <1> xchg ax, bx 948 0000BCFA AA <1> stosb 949 0000BCFB 58 <1> pop ax 950 0000BCFC 84C0 <1> test al, al 951 0000BCFE 7806 <1> js @F 952 0000BD00 B020 <1> mov al, 32 953 0000BD02 AA <1> stosb 954 0000BD03 AA <1> stosb 955 0000BD04 EB0D <1> jmp @FF 956 <1> 957 <1> @@: 958 0000BD06 A0[B35A] <1> mov al, byte [load_current_partition] 959 0000BD09 E8E5DC <1> call decbyte 960 0000BD0C 3C0A <1> cmp al, 10 961 0000BD0E B020 <1> mov al, 32 962 0000BD10 7301 <1> jae @F 963 0000BD12 AA <1> stosb 964 <1> @@: 965 <1> .beyondZ: 966 0000BD13 AA <1> stosb 967 <1> 968 0000BD14 8A4404 <1> mov al, byte [si + 4] 969 0000BD17 E877DD <1> call hexbyte 970 <1> 971 0000BD1A B020 <1> mov al, 32 972 0000BD1C AA <1> stosb 973 <1> 974 0000BD1D 89F9 <1> mov cx, di ; (preserve di in line_out) 975 0000BD1F 5F <1> pop di ; get di of scan_partitions 976 0000BD20 57 <1> push di 977 0000BD21 8B43F8 <1> mov ax, word [bp + di - 8] 978 0000BD24 8B53FA <1> mov dx, word [bp + di - 6] ; root 979 0000BD27 89CF <1> mov di, cx ; (preserve di in line_out) 980 0000BD29 034408 <1> add ax, word [si + 8] 981 0000BD2C 13540A <1> adc dx, word [si + 8 + 2] ; add partition offset 982 0000BD2F 92 <1> xchg ax, dx 983 0000BD30 E857DD <1> call hexword 984 0000BD33 92 <1> xchg ax, dx 985 0000BD34 E853DD <1> call hexword 986 <1> 987 0000BD37 50 <1> push ax 988 0000BD38 B82028 <1> mov ax, " (" 989 0000BD3B AB <1> stosw 990 0000BD3C 58 <1> pop ax 991 0000BD3D 51 <1> push cx 992 0000BD3E 53 <1> push bx 993 0000BD3F 8B0E[8B57] <1> mov cx, [load_sectorsize] 994 0000BD43 BB0800 <1> mov bx, 4+4 995 0000BD46 E87F62 <1> call disp_dxax_times_cx_width_bx_size.store 996 0000BD49 50 <1> push ax 997 0000BD4A B82920 <1> mov ax, ") " 998 0000BD4D AB <1> stosw 999 0000BD4E 58 <1> pop ax 1000 <1> 1001 0000BD4F 52 <1> push dx 1002 0000BD50 50 <1> push ax 1003 <1> 1004 0000BD51 8B440C <1> mov ax, word [si + 12] 1005 0000BD54 8B540E <1> mov dx, word [si + 12 + 2] 1006 0000BD57 92 <1> xchg ax, dx 1007 0000BD58 E82FDD <1> call hexword 1008 0000BD5B 92 <1> xchg ax, dx 1009 0000BD5C E82BDD <1> call hexword 1010 <1> 1011 0000BD5F 50 <1> push ax 1012 0000BD60 B82028 <1> mov ax, " (" 1013 0000BD63 AB <1> stosw 1014 0000BD64 58 <1> pop ax 1015 0000BD65 E86062 <1> call disp_dxax_times_cx_width_bx_size.store 1016 0000BD68 B029 <1> mov al, ")" 1017 0000BD6A AA <1> stosb 1018 <1> 1019 0000BD6B 58 <1> pop ax 1020 0000BD6C 5A <1> pop dx 1021 <1> 1022 0000BD6D 5B <1> pop bx 1023 0000BD6E 59 <1> pop cx 1024 <1> 1025 0000BD6F 807C0483 <1> cmp byte [si + piType], ptLinux 1026 0000BD73 7544 <1> jne .notlinux 1027 <1> 1028 0000BD75 8B1E[4A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 1029 0000BD79 E8E913 <1> call read_ae_1536_bytes 1030 <1> 1031 0000BD7C 26813E380453EF <1> cmp word [es:1024 + 56], 0xEF53 ; s_magic == EXT2_SUPER_MAGIC ? 1032 0000BD83 7403E99300 <1> jne .nolabel 1033 <1> 1034 0000BD88 26833E4E0400 <1> cmp word [es:1024 + 76 + 2], 0 1035 0000BD8E 7403E98800 <1> jne .nolabel 1036 0000BD93 26833E4C0401 <1> cmp word [es:1024 + 76], 1 ; s_rev_level == EXT2_DYNAMIC_REV ? 1037 0000BD99 7403E97D00 <1> jne .nolabel 1038 <1> 1039 0000BD9E 06 <1> push es 1040 0000BD9F 1F <1> pop ds 1041 0000BDA0 BE7804 <1> mov si, 1024 + 120 1042 0000BDA3 B91000 <1> mov cx, 16 1043 0000BDA6 16 <1> push ss 1044 0000BDA7 07 <1> pop es 1045 <1> 1046 0000BDA8 B020 <1> mov al, 32 1047 0000BDAA AA <1> stosb 1048 <1> @@: 1049 0000BDAB AC <1> lodsb 1050 0000BDAC 84C0 <1> test al, al 1051 0000BDAE 7403 <1> jz @F 1052 0000BDB0 AA <1> stosb 1053 0000BDB1 E2F8 <1> loop @B 1054 <1> @@: 1055 <1> 1056 0000BDB3 16 <1> push ss 1057 0000BDB4 1F <1> pop ds 1058 <1> 1059 0000BDB5 59 <1> pop cx 1060 0000BDB6 5E <1> pop si 1061 0000BDB7 56 <1> push si ; get si of scan_partitions 1062 0000BDB8 51 <1> push cx 1063 <1> 1064 <1> .notlinux: 1065 0000BDB9 8A5C04 <1> mov bl, byte [si + piType] 1066 0000BDBC 80FB01 <1> cmp bl, ptFAT12 1067 0000BDBF 7419 <1> je .isfat 1068 0000BDC1 80FB04 <1> cmp bl, ptFAT16_16BIT_CHS 1069 0000BDC4 7414 <1> je .isfat 1070 0000BDC6 80FB06 <1> cmp bl, ptFAT16_CHS 1071 0000BDC9 740F <1> je .isfat 1072 0000BDCB 80FB0B <1> cmp bl, ptFAT32_CHS 1073 0000BDCE 740A <1> je .isfat 1074 0000BDD0 80FB0C <1> cmp bl, ptFAT32 1075 0000BDD3 7405 <1> je .isfat 1076 0000BDD5 80FB0E <1> cmp bl, ptFAT16 1077 0000BDD8 7541 <1> jne .notfat 1078 <1> .isfat: 1079 <1> 1080 0000BDDA 8B1E[4A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 1081 0000BDDE E89513 <1> call read_ae_512_bytes 1082 <1> 1083 0000BDE1 26813EFE0155AA <1> cmp word [es:510], 0AA55h 1084 0000BDE8 7531 <1> jne .nolabel 1085 0000BDEA 26833E0B0000 <1> cmp word [es:bsBPB + bpbBytesPerSector], 0 1086 0000BDF0 7429 <1> je .nolabel 1087 0000BDF2 BE2B00 <1> mov si, bsBPB + bpbNew + bpbnVolumeLabel 1088 0000BDF5 26833E160000 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], 0 1089 0000BDFB 7503 <1> jne @F 1090 0000BDFD BE4700 <1> mov si, bsBPB + ebpbNew + bpbnVolumeLabel 1091 <1> @@: 1092 0000BE00 26807CFB29 <1> cmp byte [es:si - bpbnVolumeLabel + bpbnExtBPBSignature], 29h 1093 0000BE05 7514 <1> jne .nolabel 1094 0000BE07 B90B00 <1> mov cx, 11 1095 <1> 1096 0000BE0A 06 <1> push es 1097 0000BE0B 1F <1> pop ds 1098 0000BE0C 16 <1> push ss 1099 0000BE0D 07 <1> pop es 1100 <1> 1101 0000BE0E B020 <1> mov al, 32 1102 0000BE10 AA <1> stosb 1103 <1> @@: 1104 0000BE11 AC <1> lodsb 1105 0000BE12 84C0 <1> test al, al 1106 0000BE14 7403 <1> jz @F 1107 0000BE16 AA <1> stosb 1108 0000BE17 E2F8 <1> loop @B 1109 <1> @@: 1110 <1> 1111 0000BE19 16 <1> push ss 1112 0000BE1A 1F <1> pop ds 1113 <1> .notfat: 1114 <1> .nolabel: 1115 0000BE1B 16 <1> push ss 1116 0000BE1C 07 <1> pop es 1117 0000BE1D E8A3DC <1> call putsline_crlf 1118 <1> 1119 0000BE20 5F <1> pop di 1120 0000BE21 5E <1> pop si 1121 0000BE22 59 <1> pop cx 1122 0000BE23 07 <1> pop es 1123 0000BE24 C3 <1> retn 1124 <1> 1125 <1> 1126 <1> ; INP: al = first character 1127 <1> ; si -> next 1128 <1> ; OUT: NC 1129 <1> ; byte [load_unit] set 1130 <1> ; byte [load_partition] set 1131 <1> ; (zero if none specified, -1 if ldp or sdp) 1132 <1> ; opt [internalflags3] & dif3_load_is_ldp 1133 <1> ; opt [internalflags3] & dif3_load_is_sdp 1134 <1> ; dword [load_partition_sector] set if ldp or sdp 1135 <1> ; ZR if no filename specified (at end of input) 1136 <1> ; NZ if presumably a filename specified, 1137 <1> ; al = first character (slash or whatever non-blank) 1138 <1> ; si -> next 1139 <1> ; CHG: bx, cx, dx, ax, si, di 1140 <1> ; STT: ds = es = ss 1141 <1> parseloadunit_default_sdp: 1142 0000BE25 E81C00 <1> call parseloadunit 1143 0000BE28 7319 <1> jnc @F 1144 <1> 1145 0000BE2A 8A16[C057] <1> mov dl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 1147 0000BE2E 8816[C057] <1> mov byte [load_unit], dl 1148 0000BE32 C606[B25A]FF <1> mov byte [load_partition], -1 1149 0000BE37 800E[D800]02 <1> or byte [internalflags3], dif3_load_is_sdp 1150 <1> 1151 0000BE3C E8A1DB <1> call skipwh0 1152 0000BE3F E848DB <1> call iseol? 1153 0000BE42 F8 <1> clc 1154 <1> @@: 1155 0000BE43 C3 <1> retn 1156 <1> 1157 <1> 1158 <1> ; INP: al = first character 1159 <1> ; si -> next 1160 <1> ; OUT: CY if no load unit 1161 <1> ; (not "HD[A-Z]", "FD[A-Z]", "LD[P]", "SD[P]", "U[0-9A-F]") 1162 <1> ; note: this is barely used! 1163 <1> ; NC else, 1164 <1> ; byte [load_unit] set 1165 <1> ; byte [load_partition] set 1166 <1> ; (zero if none specified, -1 if ldp or sdp) 1167 <1> ; opt [internalflags3] & dif3_load_is_ldp 1168 <1> ; opt [internalflags3] & dif3_load_is_sdp 1169 <1> ; dword [load_partition_sector] set if ldp or sdp 1170 <1> ; ZR if no filename specified (at end of input) 1171 <1> ; NZ if presumably a filename specified, 1172 <1> ; al = first character (slash or whatever non-blank) 1173 <1> ; si -> next 1174 <1> ; CHG: bx, cx, dx, ax, si, di 1175 <1> ; STT: ds = es = ss 1176 <1> parseloadunit: 1177 0000BE44 31DB <1> xor bx, bx 1178 <1> lframe near 1179 <1> lvar word, unit_low_partition_high 1180 <1> lequ ?unit_low_partition_high, unit 1181 <1> lequ ?unit_low_partition_high + 1, partition 1182 0000BE46 5589E550 <1> lenter 1183 <1> lvar word, dif3_set 1184 0000BE4A 53 <1> push bx 1185 <1> lvar dword, load_partition_sector 1186 0000BE4B FF36[AA5A] <1> push word [load_partition_sector + 2] 1187 0000BE4F FF36[A85A] <1> push word [load_partition_sector] 1188 <1> 1189 0000BE53 89F7 <1> mov di, si 1190 0000BE55 8026[D800]F8 <1> clropt [internalflags3], dif3_load_is_dp 1191 0000BE5A E811DB <1> call uppercase 1192 0000BE5D 3C48 <1> cmp al, 'H' 1193 0000BE5F 7503E9EF00 <1> je .load_hd 1194 0000BE64 3C46 <1> cmp al, 'F' 1195 0000BE66 7503E9E500 <1> je .load_fd 1196 0000BE6B B401 <1> mov ah, dif3_load_is_ldp 1197 0000BE6D 3C4C <1> cmp al, 'L' 1198 0000BE6F 7419 <1> je .load_ld_sd 1199 0000BE71 B402 <1> mov ah, dif3_load_is_sdp 1200 0000BE73 3C53 <1> cmp al, 'S' 1201 0000BE75 7413 <1> je .load_ld_sd 1202 <1> %if _INPUT_FILE_BOOT 1203 0000BE77 B404 <1> mov ah, dif3_load_is_ydp 1204 0000BE79 3C59 <1> cmp al, 'Y' 1205 0000BE7B 740D <1> je .load_ld_sd 1206 <1> %endif 1207 0000BE7D 3C55 <1> cmp al, 'U' 1208 0000BE7F 747C <1> je .load_u 1209 <1> .retc: 1210 0000BE81 89FE <1> mov si, di 1211 0000BE83 4E <1> dec si 1212 0000BE84 AC <1> lodsb 1213 0000BE85 F9 <1> stc 1214 <1> .ret: 1215 0000BE86 89EC5D <1> lleave code 1216 0000BE89 C3 <1> lret 1217 <1> 1218 <1> .load_ld_sd: 1219 0000BE8A AC <1> lodsb 1220 0000BE8B E8E0DA <1> call uppercase 1221 0000BE8E 3C44 <1> cmp al, 'D' 1222 0000BE90 75EF <1> jne .retc 1223 <1> 1224 <1> d4 call d4message 1225 <1> d4 asciz "In parseloadunit.load_ld_sd",13,10 1226 <1> 1227 0000BE92 8A16[C057] <1> mov dl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 1229 0000BE96 80FC02 <1> cmp ah, dif3_load_is_sdp 1230 0000BE99 741D <1> je @F 1231 0000BE9B 8A16[2057] <1> mov dl, byte [loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit] 1233 <1> %if _INPUT_FILE_BOOT 1234 0000BE9F 80FC01 <1> cmp ah, dif3_load_is_ldp 1235 0000BEA2 7414 <1> je @F 1236 0000BEA4 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 1237 0000BEA9 74D6 <1> jz .retc 1238 <1> 1239 0000BEAB 93 <1> xchg ax, bx 1240 0000BEAC B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 1241 0000BEAF F726[A05A] <1> mul word [load_input_file.active] 1242 <1> 1243 <1> ; test dx, dx 1244 <1> ; jnz .error 1245 <1> 1246 0000BEB3 93 <1> xchg ax, bx 1247 0000BEB4 8A97[A058] <1> mov dl, byte [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 1249 <1> %endif 1250 <1> @@: 1251 0000BEB8 AC <1> lodsb 1252 0000BEB9 E8B2DA <1> call uppercase 1253 0000BEBC 3C50 <1> cmp al, 'P' 1254 0000BEBE 7403E9AD00 <1> jne .got_unit 1255 <1> 1256 <1> d4 call d4message 1257 <1> d4 asciz "In parseloadunit.load_ld_sd with ldp",13,10 1258 <1> 1259 0000BEC3 8856FE <1> mov byte [bp + ?unit], dl 1260 0000BEC6 C646FFFF <1> mov byte [bp + ?partition], -1 1261 0000BECA 0866FC <1> or byte [bp + ?dif3_set], ah 1262 <1> 1263 0000BECD 80FC02 <1> cmp ah, dif3_load_is_sdp 1264 0000BED0 741D <1> je @F 1265 <1> %if _INPUT_FILE_BOOT 1266 0000BED2 80FC01 <1> cmp ah, dif3_load_is_ldp 1267 0000BED5 740A <1> je .is_ldp 1268 0000BED7 FFB7[7E58] <1> push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors + 2] 1270 0000BEDB FFB7[7C58] <1> push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 1272 0000BEDF EB08 <1> jmp .is_ldp_ydp 1273 <1> 1274 <1> %endif 1275 <1> .is_ldp: 1276 0000BEE1 FF36[FE56] <1> push word [load_ldp_sector + 2] 1277 0000BEE5 FF36[FC56] <1> push word [load_ldp_sector] 1278 <1> .is_ldp_ydp: 1279 0000BEE9 8F46F8 <1> pop word [bp + ?load_partition_sector] 1280 0000BEEC 8F46FA <1> pop word [bp + ?load_partition_sector + 2] 1281 <1> @@: 1282 <1> 1283 0000BEEF E8EDDA <1> call skipwhite 1284 0000BEF2 E895DA <1> call iseol? 1285 0000BEF5 7403E90401 <1> jne .fn 1286 0000BEFA E9FD00 <1> jmp .ret_nc 1287 <1> 1288 <1> .load_u: 1289 0000BEFD AC <1> lodsb 1290 0000BEFE E86DDA <1> call uppercase 1291 <1> 1292 0000BF01 3C28 <1> cmp al, '(' 1293 0000BF03 7419 <1> je @F 1294 0000BF05 3C30 <1> cmp al, '0' 1295 0000BF07 7303E975FF <1> jb .retc 1296 0000BF0C 3C39 <1> cmp al, '9' 1297 0000BF0E 760E <1> jbe @F 1298 0000BF10 3C41 <1> cmp al, 'A' 1299 0000BF12 7303E96AFF <1> jb .retc 1300 0000BF17 3C46 <1> cmp al, 'F' 1301 0000BF19 7603E963FF <1> ja .retc 1302 <1> @@: 1303 <1> 1304 0000BF1E 3C28 <1> cmp al, '(' 1305 0000BF20 7511 <1> jne .u_not_expr 1306 0000BF22 AC <1> lodsb 1307 0000BF23 E851D4 <1> nearcall getexpression 1308 0000BF26 E8B7DA <1> call skipwh0 1309 0000BF29 3C29 <1> cmp al, ')' 1310 0000BF2B AC <1> lodsb 1311 0000BF2C 7403E9DEF8 <1> jne bootcmd.errordec 1312 0000BF31 EB03 <1> jmp .u_check_dot 1313 <1> 1314 <1> .u_not_expr: 1315 0000BF33 E82310 <1> call boot_get_hexadecimal_literal 1316 <1> .u_check_dot: 1317 0000BF36 3C2E <1> cmp al, '.' 1318 0000BF38 7403E9D3F8 <1> jne bootcmd.error 1319 0000BF3D AC <1> lodsb 1320 0000BF3E 85DB <1> test bx, bx 1321 0000BF40 7403E9CBF8 <1> jnz bootcmd.error 1322 0000BF45 81FA0001 <1> cmp dx, 256 1323 0000BF49 7203E9C2F8 <1> jae bootcmd.error 1324 0000BF4E EB20 <1> jmp .got_unit 1325 <1> 1326 <1> .load_fd: 1327 0000BF50 B200 <1> mov dl, 0 1328 <1> 1329 <1> d4 call d4message 1330 <1> d4 asciz "In parseloadunit.load_fd",13,10 1331 <1> 1332 0000BF52 A9 <1> db __TEST_IMM16 ; skip mov 1333 <1> .load_hd: 1334 0000BF53 B280 <1> mov dl, 80h 1335 <1> d4 call d4message 1336 <1> d4 asciz "In parseloadunit.load_fd or .load_hd",13,10 1337 <1> 1338 0000BF55 AC <1> lodsb 1339 0000BF56 E815DA <1> call uppercase 1340 0000BF59 3C44 <1> cmp al, 'D' 1341 0000BF5B 7403E921FF <1> jne .retc 1342 0000BF60 AC <1> lodsb 1343 0000BF61 E80ADA <1> call uppercase 1344 0000BF64 2C41 <1> sub al, 'A' 1345 0000BF66 3C19 <1> cmp al, 'Z' - 'A' 1346 0000BF68 7603E914FF <1> ja .retc 1347 0000BF6D 08C2 <1> or dl, al ; hdX: 80h + number, fdX: 0 + number 1348 0000BF6F AC <1> lodsb 1349 <1> 1350 <1> .got_unit: 1351 0000BF70 89D1 <1> mov cx, dx 1352 0000BF72 884EFE <1> mov byte [bp + ?unit], cl 1353 0000BF75 C646FF00 <1> mov byte [bp + ?partition], 0 1354 0000BF79 3C2F <1> cmp al, '/' ; slash ? 1355 0000BF7B 7503E97E00 <1> je .fn 1356 0000BF80 3C5C <1> cmp al, '\' 1357 0000BF82 747A <1> je .fn ; got a filename --> 1358 0000BF84 3C20 <1> cmp al, 32 ; or blank ? 1359 0000BF86 7404 <1> je @F 1360 0000BF88 3C09 <1> cmp al, 9 1361 0000BF8A 7508 <1> jne .checkeol ; check for EOL -- but no filename 1362 <1> ; (hdd1name is invalid -- must be hdd1/name or hdd1 name) 1363 <1> @@: ; was blank 1364 0000BF8C E851DA <1> call skipwh0 ; skip blanks 1365 0000BF8F E8F8D9 <1> call iseol? ; EOL ? 1366 0000BF92 756A <1> jne .fn ; no, is filename --> 1367 <1> ; will jump after this 1368 <1> .checkeol: 1369 0000BF94 E8F3D9 <1> call iseol? ; EOL ? 1370 0000BF97 7461 <1> je .ret_nc ; yes, no filename --> 1371 <1> 1372 0000BF99 3C28 <1> cmp al, '(' 1373 0000BF9B 740E <1> je @F 1374 0000BF9D 3C30 <1> cmp al, '0' 1375 0000BF9F 7303E9DDFE <1> jb .retc 1376 0000BFA4 3C39 <1> cmp al, '9' 1377 0000BFA6 7603E9D6FE <1> ja .retc 1378 <1> @@: 1379 <1> 1380 <1> d4 call d4message 1381 <1> d4 asciz "In parseloadunit (after no EOL found)",13,10 1382 0000BFAB 51 <1> push cx 1383 0000BFAC 3C28 <1> cmp al, '(' 1384 0000BFAE 7519 <1> jne .not_expr 1385 0000BFB0 AC <1> lodsb ; skip opening paren 1386 <1> 1387 <1> d4 call d4message 1388 <1> d4 asciz "In parseloadunit (before call to getexpression)",13,10 1389 <1> 1390 0000BFB1 E8C3D3 <1> nearcall getexpression 1391 <1> 1392 <1> d4 call d4message 1393 <1> d4 asciz "In parseloadunit (after call to getexpression)",13,10 1394 0000BFB4 E829DA <1> call skipwh0 1395 0000BFB7 3C29 <1> cmp al, ')' 1396 0000BFB9 AC <1> lodsb 1397 0000BFBA 7509 <1> jne .errordec 1398 0000BFBC 89D1 <1> mov cx, dx 1399 0000BFBE 09D9 <1> or cx, bx 1400 0000BFC0 750A <1> jnz .got_expr 1401 0000BFC2 5A <1> pop dx 1402 0000BFC3 EBAB <1> jmp .got_unit 1403 <1> 1404 <1> .errordec: 1405 0000BFC5 4E <1> dec si 1406 <1> .error: 1407 0000BFC6 E947F8 <1> jmp bootcmd.error 1408 <1> 1409 <1> .not_expr: 1410 <1> d4 call d4message 1411 <1> d4 asciz "In parseloadunit (before call to boot_get_decimal_literal)",13,10 1412 0000BFC9 E8850F <1> call boot_get_decimal_literal 1413 <1> .got_expr: ; bx:dx = load partition number 1414 <1> d4 call d4message 1415 <1> d4 asciz "In parseloadunit.got_expr",13,10 1416 0000BFCC 59 <1> pop cx ; cl = load unit 1417 0000BFCD 80F980 <1> cmp cl, 80h 1418 0000BFD0 7303E93BF8 <1> jb bootcmd.error ; diskettes aren't partitioned 1419 0000BFD5 85DB <1> test bx, bx 1420 0000BFD7 7403E934F8 <1> jnz bootcmd.error 1421 0000BFDC 81FAFF00 <1> cmp dx, 255 1422 0000BFE0 7603E92BF8 <1> ja bootcmd.error 1423 0000BFE5 85D2 <1> test dx, dx 1424 0000BFE7 7503E924F8 <1> jz bootcmd.error 1425 0000BFEC E8F1D9 <1> call skipwh0 1426 0000BFEF 8856FF <1> mov byte [bp + ?partition], dl 1427 0000BFF2 884EFE <1> mov byte [bp + ?unit], cl 1428 0000BFF5 E892D9 <1> call iseol? 1429 0000BFF8 7504 <1> jne .fn 1430 <1> .ret_nc: 1431 0000BFFA 31DB <1> xor bx, bx ; NC, ZR 1432 0000BFFC EB06 <1> jmp @F 1433 <1> 1434 <1> .fn: 1435 0000BFFE E8DFD9 <1> call skipwh0 1436 0000C001 83CB01 <1> or bx, 1 ; NC, NZ 1437 <1> @@: 1438 0000C004 8F06[A85A] <1> pop word [load_partition_sector] 1439 0000C008 8F06[AA5A] <1> pop word [load_partition_sector + 2] 1440 <1> ; pop from ?load_partition_sector 1441 0000C00C 9C <1> pushf 1442 0000C00D 8B5EFE <1> mov bx, word [bp + ?unit_low_partition_high] 1443 0000C010 881E[C057] <1> mov byte [load_unit], bl 1444 0000C014 883E[B25A] <1> mov byte [load_partition], bh 1445 0000C018 8A5EFC <1> mov bl, byte [bp + ?dif3_set] 1446 0000C01B 081E[D800] <1> or byte [internalflags3], bl 1447 0000C01F 9D <1> popf ; ZF, CF 1448 0000C020 E963FE <1> jmp .ret 1449 <1> 1450 <1> lleave ctx 1451 <1> 1452 <1> 1453 0000C023 00 <1> align 4, db 0 1454 <1> 1455 <1> boot_read: 1456 0000C024 C706[E05A][88D1] <1> mov word [load_readwrite_function], read_sector 1457 0000C02A EB06 <1> jmp boot_readwrite 1458 <1> 1459 <1> boot_write: 1460 0000C02C C706[E05A][87D1] <1> mov word [load_readwrite_function], write_sector 1461 <1> 1462 <1> boot_readwrite: 1463 <1> 1464 <1> d4 call d4message 1465 <1> d4 asciz "In boot_readwrite",13,10 1466 <1> 1467 0000C032 E894D9 <1> call skipequals 1468 0000C035 E8EDFD <1> call parseloadunit_default_sdp 1469 0000C038 7503E9F500 <1> jz .error 1470 <1> 1471 <1> %if 0 1472 <1> call skipwh0 1473 <1> mov bx, word [reg_ds] ; default segment 1474 <1> nearcall getaddr ; get buffer address into bx:(e)dx 1475 <1> 1476 <1> _386_PM test edx, 0FFFF_0000h 1477 <1> _386_PM jnz .error 1478 <1> 1479 <1> ; (variable must be a dword!) 1480 <1> mov word [load_readwrite_buffer], dx 1481 <1> mov word [load_readwrite_buffer + 2], bx 1482 <1> %else 1483 0000C03D E819D8 <1> nearcall getword 1484 <1> ; (variable is a word) 1485 0000C040 8916[DC5A] <1> mov word [load_readwrite_buffer], dx 1486 <1> %endif 1487 <1> 1488 0000C044 31DB <1> xor bx, bx 1489 0000C046 53 <1> push bx ; hidden specified flag (0) 1490 0000C047 53 <1> push bx 1491 0000C048 53 <1> push bx ; hidden number 1492 0000C049 E894D9 <1> call skipwh0 1493 0000C04C E83BD9 <1> call iseol? 1494 0000C04F 750F <1> jne @F 1495 <1> 1496 <1> d4 call d4message 1497 <1> d4 asciz "In boot_readwrite no sector given no count given",13,10 1498 <1> 1499 0000C051 8326[D85A]00 <1> and word [load_readwrite_sector], 0 1500 0000C056 8326[DA5A]00 <1> and word [load_readwrite_sector + 2], 0 1501 0000C05B BA0100 <1> mov dx, 1 1502 0000C05E EB4A <1> jmp @FF 1503 <1> 1504 <1> @@: 1505 0000C060 BA[C118] <1> mov dx, msg.hidden 1506 0000C063 4E <1> dec si 1507 0000C064 E8B9D8 <1> call isstring? 1508 0000C067 7514 <1> jne .nothidden 1509 <1> 1510 0000C069 83C406 <1> add sp, 6 ; discard hidden number and specified flag 1511 0000C06C BA0100 <1> mov dx, 1 1512 <1> 1513 <1> .hiddencommon: 1514 0000C06F 52 <1> push dx ; hidden specified flag (1 or 2) 1515 <1> 1516 0000C070 E856D9 <1> call skipequals 1517 <1> 1518 0000C073 E801D3 <1> nearcall getdword 1519 0000C076 53 <1> push bx 1520 0000C077 52 <1> push dx ; hidden number 1521 0000C078 E865D9 <1> call skipwh0 1522 <1> 1523 0000C07B EB11 <1> jmp .hiddendone 1524 <1> .nothidden: 1525 0000C07D BA[C818] <1> mov dx, msg.hiddenadd 1526 0000C080 E89DD8 <1> call isstring? 1527 0000C083 7508 <1> jne .nothiddenadd 1528 <1> 1529 0000C085 83C406 <1> add sp, 6 ; discard hidden number and specified flag 1530 0000C088 BA0200 <1> mov dx, 2 1531 0000C08B EBE2 <1> jmp .hiddencommon 1532 <1> 1533 <1> .nothiddenadd: 1534 0000C08D AC <1> lodsb 1535 <1> .hiddendone: 1536 0000C08E E8E6D2 <1> nearcall getexpression ; bx:dx = value 1537 <1> 1538 0000C091 8916[D85A] <1> mov word [load_readwrite_sector], dx 1539 0000C095 891E[DA5A] <1> mov word [load_readwrite_sector + 2], bx 1540 <1> 1541 0000C099 E844D9 <1> call skipwh0 1542 0000C09C BA0100 <1> mov dx, 1 1543 0000C09F E8E8D8 <1> call iseol? 1544 0000C0A2 7406 <1> je @F 1545 0000C0A4 E8B2D7 <1> nearcall getword 1546 0000C0A7 E8F5D8 <1> call chkeol 1547 <1> @@: 1548 0000C0AA 8916[DE5A] <1> mov word [load_readwrite_count], dx 1549 <1> 1550 0000C0AE E8FD0E <1> call query_geometry 1551 <1> 1552 0000C0B1 F606[D800]07 <1> testopt [internalflags3], dif3_load_is_dp 1553 0000C0B6 753C <1> jnz .ldp 1554 <1> 1555 0000C0B8 803E[B25A]00 <1> cmp byte [load_partition], 0 1556 0000C0BD 7447 <1> je .whole_unit 1557 <1> 1558 0000C0BF C606[B45A]00 <1> mov byte [load_found_partition], 0 1559 0000C0C4 B9[D6C0] <1> mov cx, .single_partition 1560 0000C0C7 E83C0D <1> call scan_partitions 1561 <1> ; cmp byte [load_found_partition], 0 1562 <1> ; jne @F 1563 0000C0CA BA[B116] <1> mov dx, msg.boot_partition_not_found 1564 0000C0CD B81502 <1> mov ax, 0215h 1565 0000C0D0 E8D6C1 <1> call setrc 1566 0000C0D3 E939FB <1> jmp bootcmd.fail 1567 <1> ;@@: 1568 <1> ; retn 1569 <1> 1570 <1> 1571 <1> .single_partition: 1572 <1> ; INP: es:si -> partition table entry, 1573 <1> ; si = load_partition_table .. load_partition_table+48, 1574 <1> ; es = ss 1575 <1> ; bp + di -> above part table metadata, 1576 <1> ; dwo [bp + di - 4] = root (outermost extended position) 1577 <1> ; dwo [bp + di - 8] = base (current table position) 1578 <1> ;; CHG: ax, bx, (cx), dx 1579 <1> ; CHG: all 1580 <1> 1581 <1> d4 call d4message 1582 <1> d4 asciz "In boot_readwrite.single_partition",13,10 1583 <1> 1584 0000C0D6 A0[B35A] <1> mov al, byte [load_current_partition] 1585 0000C0D9 3A06[B25A] <1> cmp al, byte [load_partition] 1586 0000C0DD 7401 <1> je .gotit 1587 0000C0DF C3 <1> retn 1588 <1> 1589 <1> .gotit: 1590 <1> d4 call d4message 1591 <1> d4 asciz "In boot_readwrite.gotit",13,10 1592 <1> 1593 <1> ; inc byte [load_found_partition] 1594 <1> 1595 0000C0E0 8B43F8 <1> mov ax, [bp + di - 8] 1596 0000C0E3 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 1597 <1> 1598 0000C0E6 26034408 <1> add ax, [es:si + 8] 1599 0000C0EA 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 1600 <1> 1601 0000C0EE 89EC <1> mov sp, bp 1602 0000C0F0 5D <1> pop bp ; restore bp (scan_partitions) 1603 0000C0F1 5B <1> pop bx ; discard ret address (scan_partitions) 1604 0000C0F2 EB07 <1> jmp .gotbase_dxax 1605 <1> 1606 <1> 1607 <1> .ldp: 1608 0000C0F4 A1[A85A] <1> mov ax, word [load_partition_sector] 1609 0000C0F7 8B16[AA5A] <1> mov dx, word [load_partition_sector + 2] 1610 <1> 1611 <1> .gotbase_dxax: 1612 0000C0FB 89461C <1> mov word [bp + bsBPB + bpbHiddenSectors + 0], ax 1613 0000C0FE 89561E <1> mov word [bp + bsBPB + bpbHiddenSectors + 2], dx 1614 0000C101 800E[D800]80 <1> setopt [internalflags3], dif3_partition_changed 1615 <1> 1616 <1> .whole_unit: 1617 0000C106 5A <1> pop dx 1618 0000C107 5B <1> pop bx ; hidden number (or zero) 1619 0000C108 59 <1> pop cx ; hidden specified flag 1620 0000C109 E30F <1> jcxz @FF ; if not specified --> 1621 0000C10B 49 <1> dec cx ; hidden flag is 1 ? 1622 0000C10C 7406 <1> jz @F ; yes, replacce --> 1623 0000C10E 03561C <1> add dx, word [bp + bsBPB + bpbHiddenSectors + 0] 1624 0000C111 135E1E <1> adc bx, word [bp + bsBPB + bpbHiddenSectors + 2] 1625 <1> ; add to hidden (HIDDENADD=) 1626 <1> 1627 <1> @@: 1628 0000C114 89561C <1> mov word [bp + bsBPB + bpbHiddenSectors + 0], dx 1629 0000C117 895E1E <1> mov word [bp + bsBPB + bpbHiddenSectors + 2], bx 1630 <1> ; overwrite hidden number with this 1631 <1> @@: 1632 <1> 1633 0000C11A A1[D85A] <1> mov ax, word [load_readwrite_sector] 1634 0000C11D 8B16[DA5A] <1> mov dx, word [load_readwrite_sector + 2] 1635 0000C121 8B0E[DE5A] <1> mov cx, word [load_readwrite_count] 1636 0000C125 8B1E[DC5A] <1> mov bx, word [load_readwrite_buffer] 1637 <1> 1638 0000C129 E306 <1> jcxz @FF 1639 <1> @@: 1640 0000C12B FF16[E05A] <1> call near word [load_readwrite_function] 1641 0000C12F E2FA <1> loop @B 1642 <1> @@: 1643 0000C131 C3 <1> retn 1644 <1> 1645 <1> .error: 1646 0000C132 E928C1 <1> jmp error 1647 <1> 1648 <1> 1649 <1> ; INP: ds:si-> first letter of name 1650 <1> ; es:load_kernel_name-> 12-byte buffer (for fn + 0) 1651 <1> ; CHG: ax, cx, di 1652 <1> ; OUT: al = first character after name (EOL, blank, or slash) 1653 <1> ; si -> next character 1654 <1> boot_parse_fn: 1655 0000C135 B020 <1> mov al, 32 1656 0000C137 BF[B85A] <1> mov di, load_kernel_name 1657 0000C13A B90B00 <1> mov cx, 11 1658 0000C13D F3AA <1> rep stosb ; initialise to empty 1659 <1> 1660 0000C13F BF[B85A] <1> mov di, load_kernel_name 1661 0000C142 B90900 <1> mov cx, 9 1662 <1> .loop_name: 1663 0000C145 AC <1> lodsb 1664 0000C146 E825D8 <1> call uppercase 1665 0000C149 E83ED8 <1> call iseol? 1666 0000C14C 7455 <1> je .loop_name_done 1667 0000C14E 3C20 <1> cmp al, 32 1668 0000C150 7451 <1> je .loop_name_done 1669 0000C152 3C09 <1> cmp al, 9 1670 0000C154 744D <1> je .loop_name_done 1671 0000C156 3C2F <1> cmp al, '/' 1672 0000C158 7449 <1> je .loop_name_done 1673 0000C15A 3C5C <1> cmp al, '\' 1674 0000C15C 7445 <1> je .loop_name_done 1675 0000C15E 3C2E <1> cmp al, '.' 1676 0000C160 740F <1> je .loop_name_ext 1677 0000C162 AA <1> stosb 1678 0000C163 E2E0 <1> loop .loop_name 1679 <1> .invalid: 1680 0000C165 BA[FC17] <1> mov dx, msg.boot_invalid_filename 1681 0000C168 B81602 <1> mov ax, 0216h 1682 0000C16B E83BC1 <1> call setrc 1683 0000C16E E99EFA <1> jmp bootcmd.fail 1684 <1> 1685 <1> .loop_name_ext: 1686 0000C171 83F909 <1> cmp cx, 9 1687 0000C174 74EF <1> je .invalid 1688 0000C176 B90400 <1> mov cx, 4 1689 0000C179 BF[C05A] <1> mov di, load_kernel_name + 8 1690 <1> .loop_ext: 1691 0000C17C AC <1> lodsb 1692 0000C17D E8EED7 <1> call uppercase 1693 0000C180 E807D8 <1> call iseol? 1694 0000C183 7419 <1> je .loop_ext_done 1695 0000C185 3C20 <1> cmp al, 32 1696 0000C187 7415 <1> je .loop_ext_done 1697 0000C189 3C09 <1> cmp al, 9 1698 0000C18B 7411 <1> je .loop_ext_done 1699 0000C18D 3C2F <1> cmp al, '/' 1700 0000C18F 740D <1> je .loop_ext_done 1701 0000C191 3C5C <1> cmp al, '\' 1702 0000C193 7409 <1> je .loop_ext_done 1703 0000C195 3C2E <1> cmp al, '.' 1704 0000C197 74CC <1> je .invalid 1705 0000C199 AA <1> stosb 1706 0000C19A E2E0 <1> loop .loop_ext 1707 0000C19C EBC7 <1> jmp .invalid 1708 <1> 1709 <1> .loop_ext_done: 1710 0000C19E 83F904 <1> cmp cx, 4 1711 0000C1A1 74C2 <1> je .invalid 1712 <1> .loop_name_done: 1713 0000C1A3 83F909 <1> cmp cx, 9 1714 0000C1A6 74BD <1> je .invalid 1715 0000C1A8 C606[C35A]00 <1> mov byte [load_kernel_name + 11], 0 1716 0000C1AD 803E[B85A]E5 <1> cmp byte [load_kernel_name], 0E5h 1717 0000C1B2 7505 <1> jne @F 1718 0000C1B4 C606[B85A]05 <1> mov byte [load_kernel_name], 05h 1719 <1> @@: 1720 0000C1B9 C3 <1> retn 1721 <1> 1722 <1> 1723 <1> ; INP: es:si -> partition table entry, 1724 <1> ; si = load_partition_table .. load_partition_table+48, 1725 <1> ; es = ss 1726 <1> ; bp + di -> above part table metadata, 1727 <1> ; dwo [bp + di - 4] = root (outermost extended position) 1728 <1> ; dwo [bp + di - 8] = base (current table position) 1729 <1> ; CHG: ax, bx, (cx), dx 1730 <1> load_from_partition: 1731 <1> d4 call d4message 1732 <1> d4 asciz "In load_from_partition",13,10 1733 <1> 1734 0000C1BA A0[B35A] <1> mov al, byte [load_current_partition] 1735 0000C1BD 3A06[B25A] <1> cmp al, byte [load_partition] 1736 0000C1C1 7401 <1> je .gotit 1737 0000C1C3 C3 <1> retn 1738 <1> 1739 <1> .gotit: 1740 <1> d4 call d4message 1741 <1> d4 asciz "In load_from_partition.gotit",13,10 1742 <1> 1743 0000C1C4 8B43F8 <1> mov ax, [bp + di - 8] 1744 0000C1C7 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 1745 <1> 1746 0000C1CA 52 <1> push dx 1747 0000C1CB 50 <1> push ax 1748 0000C1CC 06 <1> push es 1749 0000C1CD BB6000 <1> mov bx, 60h 1750 0000C1D0 E8A30F <1> call read_ae_512_bytes ; load partition table to 0:600h 1751 0000C1D3 07 <1> pop es 1752 0000C1D4 58 <1> pop ax 1753 0000C1D5 5A <1> pop dx 1754 <1> 1755 0000C1D6 26034408 <1> add ax, [es:si + 8] 1756 0000C1DA 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 1757 <1> 1758 0000C1DE 26894408 <1> mov word [es:si + 8], ax 1759 0000C1E2 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 1760 <1> 1761 0000C1E6 31C9 <1> xor cx, cx 1762 0000C1E8 8EC1 <1> mov es, cx ; es = 0 1763 0000C1EA 8DB43EB0 <1> lea si, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 1764 <1> ; si = 600h + 510-64 .. 600h + 510-16 1765 0000C1EE 26894408 <1> mov word [es:si + 8], ax 1766 0000C1F2 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 1767 <1> 1768 <1> ; dx:ax = absolute sector number 1769 0000C1F6 BBC007 <1> mov bx, 7C0h ; bx:0 = 7C0h:0 -> boot sector area 1770 0000C1F9 E87A0F <1> call read_ae_512_bytes ; load partition boot sector to 0:7C00h 1771 <1> 1772 0000C1FC 89EC <1> mov sp, bp 1773 0000C1FE 5D <1> pop bp ; restore bp (scan_partitions) 1774 0000C1FF 58 <1> pop ax ; discard ret address (scan_partitions) 1775 <1> 1776 0000C200 26813EFE0155AA <1> cmp word [es:510], 0AA55h 1777 0000C207 7403E95312 <1> jne boot_sigmismatch 1778 <1> 1779 0000C20C 31C9 <1> xor cx, cx 1780 0000C20E 26390E0000 <1> cmp word [es:0], cx 1781 0000C213 7503E95312 <1> je boot_codemismatch 1782 <1> 1783 0000C218 8EC1 <1> mov es, cx ; cx = 0, es = 0 1784 0000C21A 89F7 <1> mov di, si ; di -> partition table entry (seg 0) 1785 0000C21C 26800D80 <1> or byte [es:di + 0], 80h ; set bootable flag 1786 0000C220 A0[C057] <1> mov al, byte [load_unit] ; al = unit 1787 0000C223 BB007C <1> mov bx, 7C00h ; bx = 7C00h 1788 0000C226 E990F9 <1> jmp load_partition_common 1789 <1> 1790 <1> 1791 <1> ; INP: es:si -> partition table entry, 1792 <1> ; si = load_partition_table .. load_partition_table+48, 1793 <1> ; es = ss 1794 <1> ; bp + di -> above part table metadata, 1795 <1> ; dwo [bp + di - 4] = root (outermost extended position) 1796 <1> ; dwo [bp + di - 8] = base (current table position) 1797 <1> ; CHG: ax, bx, (cx), dx 1798 <1> load_freedos_from_partition: 1799 <1> d4 call d4message 1800 <1> d4 asciz "In load_freedos_from_partition",13,10 1801 <1> 1802 0000C229 A0[B35A] <1> mov al, byte [load_current_partition] 1803 0000C22C 3A06[B25A] <1> cmp al, byte [load_partition] 1804 0000C230 7401 <1> je .gotit 1805 0000C232 C3 <1> retn 1806 <1> 1807 <1> .gotit: 1808 <1> d4 call d4message 1809 <1> d4 asciz "In load_freedos_from_partition.gotit",13,10 1810 <1> 1811 0000C233 8B43F8 <1> mov ax, [bp + di - 8] 1812 0000C236 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 1813 <1> 1814 0000C239 26034408 <1> add ax, [es:si + 8] 1815 0000C23D 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 1816 <1> 1817 0000C241 26894408 <1> mov word [es:si + 8], ax 1818 0000C245 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 1819 0000C249 26800C80 <1> or byte [es:si + 0], 80h ; set bootable flag 1820 <1> 1821 <1> 1822 0000C24D F606[E957]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 1823 0000C252 7427 <1> jz @F 1824 <1> 1825 0000C254 52 <1> push dx 1826 0000C255 50 <1> push ax 1827 <1> 1828 0000C256 8B43F8 <1> mov ax, [bp + di - 8] 1829 0000C259 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 1830 <1> 1831 0000C25C 52 <1> push dx 1832 0000C25D 50 <1> push ax 1833 0000C25E 06 <1> push es 1834 0000C25F BB6000 <1> mov bx, 60h 1835 0000C262 E8110F <1> call read_ae_512_bytes ; load partition table to 0:600h 1836 0000C265 07 <1> pop es 1837 0000C266 58 <1> pop ax 1838 0000C267 5A <1> pop dx 1839 <1> 1840 0000C268 31C9 <1> xor cx, cx 1841 0000C26A 8EC1 <1> mov es, cx ; es = 0 1842 0000C26C 8DBC3EB0 <1> lea di, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 1843 <1> ; si = 600h + 510-64 .. 600h + 510-16 1844 0000C270 B108 <1> mov cl, 16 / 2 1845 0000C272 57 <1> push di 1846 0000C273 F3A5 <1> rep movsw 1847 <1> 1848 0000C275 8F06[B05A] <1> pop word [load_partition_entry] 1849 <1> 1850 0000C279 58 <1> pop ax 1851 0000C27A 5A <1> pop dx 1852 <1> @@: 1853 <1> 1854 <1> 1855 0000C27B 89EC <1> mov sp, bp 1856 0000C27D 5D <1> pop bp ; restore bp (scan_partitions) 1857 0000C27E 5B <1> pop bx ; discard ret address (scan_partitions) 1858 <1> 1859 <1> ; dx:ax = absolute sector number 1860 0000C27F 8B1E[4A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 1861 0000C283 50 <1> push ax 1862 0000C284 52 <1> push dx 1863 0000C285 E8EE0E <1> call read_ae_512_bytes ; load partition boot sector 1864 <1> 1865 0000C288 26813EFE0155AA <1> cmp word [es:510], 0AA55h 1866 0000C28F 7403E9CB11 <1> jne boot_sigmismatch 1867 <1> 1868 0000C294 31C9 <1> xor cx, cx 1869 <1> ; cmp word [es:0], cx 1870 <1> ; je boot_codemismatch 1871 <1> 1872 0000C296 5A <1> pop dx 1873 0000C297 58 <1> pop ax 1874 <1> 1875 <1> ; dx:ax = boot sector 1876 <1> ; byte [load_unit] = unit 1877 <1> ; es:0-> read sector 1878 <1> load_freedos_common: 1879 0000C298 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 1880 0000C29C 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 1881 <1> 1882 0000C2A1 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 1883 0000C2A4 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 1884 0000C2A9 7403E9C511 <1> jne boot_secsizemismatch 1885 <1> 1886 <1> ; preserve some variables from our pseudo BPB 1887 0000C2AE 31C0 <1> xor ax, ax 1888 0000C2B0 FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 1889 0000C2B3 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 1890 0000C2B8 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 1891 0000C2BB 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 1892 <1> 1893 0000C2C0 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 1894 0000C2C3 D1EB <1> shr bx, 1 1895 0000C2C5 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 1896 <1> 1897 0000C2C8 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 1898 0000C2CD 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 1899 0000C2D0 7407 <1> je .is_fat32 1900 0000C2D2 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 1901 0000C2D7 EB05 <1> jmp short .was_fat1612 1902 <1> .is_fat32: 1903 0000C2D9 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 1904 <1> .was_fat1612: 1905 <1> 1906 0000C2DE 06 <1> push es 1907 0000C2DF 1E <1> push ds 1908 0000C2E0 06 <1> push es 1909 0000C2E1 1F <1> pop ds 1910 0000C2E2 31F6 <1> xor si, si ; -> BPB from boot partition 1911 0000C2E4 16 <1> push ss 1912 0000C2E5 07 <1> pop es 1913 0000C2E6 BF[8057] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 1914 0000C2E9 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 1915 0000C2EC F3A4 <1> rep movsb ; get the BPB 1916 <1> 1917 0000C2EE 1F <1> pop ds 1918 0000C2EF 800E[D800]80 <1> setopt [internalflags3], dif3_partition_changed 1919 <1> 1920 0000C2F4 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 1921 0000C2F7 740B <1> je @F ; is FAT32 --> 1922 0000C2F9 BE[A457] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 1923 0000C2FC BF[C057] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 1924 0000C2FF B91A00 <1> mov cx, BPBN_size 1925 0000C302 F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 1926 <1> ; to where the FAT32 BPBN lives 1927 <1> @@: 1928 0000C304 07 <1> pop es 1929 <1> 1930 0000C305 E856F2 <1> call bootgetmemorysize 1931 0000C308 8956E0 <1> mov word [bp + ldMemoryTop], dx 1932 0000C30B 81EA0005 <1> sub dx, (20 * 1024) >> 4 1933 <1> ; leave 20 KiB free at the top, to 1934 <1> ; allow loading with the lDOS protocol (needs BPB and FAT seg 1935 <1> ; to live below its destination buffers for these) 1936 0000C30F 7303 <1> jnc @F 1937 <1> .outofmem: 1938 0000C311 E9100E <1> jmp query_geometry.out_of_memory_error 1939 <1> @@: 1940 <1> 1941 0000C314 81EA0002 <1> sub dx, 8192 >> 4 1942 0000C318 72F7 <1> jc .outofmem 1943 0000C31A 8956F8 <1> mov word [bp + lsvFATSeg], dx 1944 0000C31D B8FFFF <1> mov ax, -1 1945 0000C320 8946F4 <1> mov word [bp + lsvFATSector], ax 1946 0000C323 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 1947 <1> 1948 0000C326 FF36[EA57] <1> push word [load_loadseg] 1949 0000C32A 8F46FA <1> pop word [bp + lsvLoadSeg] 1950 <1> 1951 0000C32D 31DB <1> xor bx, bx 1952 0000C32F B90808 <1> mov cx, ((- LOADSTACKVARS + 15 + 4096) & ~15) >> 1 1953 0000C332 F606[E957]20 <1> testopt [load_options], LOAD_NO_BPB 1954 0000C337 7506 <1> jnz @F 1955 0000C339 BB0002 <1> mov bx, 512 1956 0000C33C B90809 <1> mov cx, ((512 - LOADSTACKVARS + 15 + 4096) & ~15) >> 1 1957 <1> @@: 1958 <1> 1959 0000C33F 833E[F257]FF <1> cmp word [load_bpb + 2], -1 1960 0000C344 7469 <1> je .auto_bpb 1961 <1> 1962 0000C346 A1[F057] <1> mov ax, [load_bpb] 1963 0000C349 D1E8 <1> shr ax, 1 1964 0000C34B D1E8 <1> shr ax, 1 1965 0000C34D D1E8 <1> shr ax, 1 1966 0000C34F D1E8 <1> shr ax, 1 ; round down: start of BPB 1967 0000C351 0306[F257] <1> add ax, [load_bpb + 2] ; start of BPB 1968 0000C355 2D0101 <1> sub ax, (4096 - LOADSTACKVARS + 15) >> 4 1969 <1> ; start of stack area 1970 0000C358 50 <1> push ax 1971 0000C359 7235 <1> jc .bpb_too_low 1972 <1> 1973 0000C35B 3B46FA <1> cmp ax, word [bp + lsvLoadSeg] 1974 0000C35E 773B <1> ja .loads_below_bpb 1975 <1> 1976 0000C360 83F860 <1> cmp ax, 60h 1977 0000C363 722B <1> jb .bpb_too_low 1978 <1> 1979 0000C365 A1[F057] <1> mov ax, [load_bpb] 1980 0000C368 01D8 <1> add ax, bx 1981 0000C36A 83C00F <1> add ax, 15 1982 0000C36D D1E8 <1> shr ax, 1 1983 0000C36F D1E8 <1> shr ax, 1 1984 0000C371 D1E8 <1> shr ax, 1 1985 0000C373 D1E8 <1> shr ax, 1 1986 0000C375 0306[F257] <1> add ax, [load_bpb + 2] ; end of BPB / pseudo-boot-sector 1987 <1> 1988 0000C379 3B46FA <1> cmp ax, word [bp + lsvLoadSeg] 1989 0000C37C 761F <1> jbe .loads_above_bpb 1990 <1> 1991 0000C37E BA[4018] <1> mov dx, msg.boot_bpb_load_overlap 1992 0000C381 B81702 <1> mov ax, 0217h 1993 0000C384 E822BF <1> call setrc 1994 <1> .fail: 1995 0000C387 B81802 <1> mov ax, 0218h 1996 0000C38A E81CBF <1> call setrc 1997 0000C38D E97FF8 <1> jmp bootcmd.fail 1998 <1> 1999 <1> .bpb_too_low: 2000 0000C390 BA[7018] <1> mov dx, msg.boot_bpb_too_low 2001 0000C393 B81902 <1> mov ax, 0219h 2002 0000C396 E810BF <1> call setrc 2003 0000C399 EBEC <1> jmp .fail 2004 <1> 2005 <1> 2006 <1> 2007 <1> .loads_below_bpb: 2008 0000C39B 89C2 <1> mov dx, ax ; set load top to before BPB/lsv/stack 2009 <1> 2010 <1> .loads_above_bpb: ; dx = word [bp + ldLoadTop] = word [bp + lsvFATSeg] 2011 0000C39D FF36[F257] <1> push word [load_bpb + 2] 2012 0000C3A1 8F06[A65A] <1> pop word [load_bpb_dest + 2] 2013 0000C3A5 FF36[F057] <1> push word [load_bpb] 2014 0000C3A9 8F06[A45A] <1> pop word [load_bpb_dest] 2015 0000C3AD EB37 <1> jmp .got_bpb_set_load_top 2016 <1> 2017 <1> 2018 <1> ; auto-BPB: allocate BPB at top and load below that 2019 <1> .auto_bpb: 2020 0000C3AF 81EA0101 <1> sub dx, (-LOADSTACKVARS + 15 + 4096) >> 4 2021 0000C3B3 7303E959FF <1> jc .outofmem 2022 0000C3B8 85DB <1> test bx, bx 2023 0000C3BA 7408 <1> jz @F 2024 0000C3BC 83EA20 <1> sub dx, 512 >> 4 2025 0000C3BF 7303E94DFF <1> jc .outofmem 2026 <1> @@: 2027 <1> 2028 0000C3C4 52 <1> push dx 2029 0000C3C5 89D0 <1> mov ax, dx 2030 <1> ; eg dx = 800h 2031 <1> ; want (((800h<<4) + 4096 - LOADSTACKVARS) - 7C00h) >> 4 2032 <1> ; which is 143h 2033 <1> ; which :7C00h = 903h:0 2034 <1> ; dx + ( 4096 - LOADSTACKVARS - 7C00h) / 16 2035 <1> ; dx - (-4096 + LOADSTACKVARS + 7C00h) / 16 2036 0000C3C7 BBF0EF <1> mov bx, (-4096 +LOADSTACKVARS) 2037 0000C3CA 031E[F057] <1> add bx, word [load_bpb] 2038 0000C3CE 51 <1> push cx 2039 0000C3CF B104 <1> mov cl, 4 2040 0000C3D1 D3EB <1> shr bx, cl 2041 0000C3D3 59 <1> pop cx 2042 0000C3D4 29D8 <1> sub ax, bx 2043 <1> ; sub ax, (-4096 +LOADSTACKVARS + 7C00h) / 16 2044 0000C3D6 7303E936FF <1> jc .outofmem 2045 <1> ; mov word [load_bpb_dest], 7C00h 2046 0000C3DB FF36[F057] <1> push word [load_bpb] 2047 0000C3DF 8F06[A45A] <1> pop word [load_bpb_dest] 2048 0000C3E3 A3[A65A] <1> mov word [load_bpb_dest + 2], ax 2049 <1> .got_bpb_set_load_top: 2050 0000C3E6 8956E2 <1> mov word [bp + ldLoadTop], dx 2051 <1> 2052 <1> .got_bpb: ; cx = how many words are used for stack/lsv/BPB 2053 0000C3E9 58 <1> pop ax ; -> stack area 2054 0000C3EA 06 <1> push es 2055 0000C3EB 8EC0 <1> mov es, ax 2056 0000C3ED 31FF <1> xor di, di 2057 0000C3EF 31C0 <1> xor ax, ax 2058 0000C3F1 F3AB <1> rep stosw 2059 0000C3F3 07 <1> pop es 2060 <1> 2061 0000C3F4 E80717 <1> call initialise_fs 2062 <1> 2063 0000C3F7 C606[B55A]00 <1> mov byte [load_check_dir_attr], 0 2064 0000C3FC 8B36[C45A] <1> mov si, word [load_kernelname_input] 2065 0000C400 803C2F <1> cmp byte [si], '/' 2066 0000C403 7501 <1> jne @F 2067 0000C405 46 <1> inc si 2068 <1> @@: 2069 0000C406 803C00 <1> cmp byte [si], 0 2070 0000C409 7504 <1> jne @F 2071 0000C40B 8B36[E057] <1> mov si, word [load_kernelname_default] 2072 <1> @@: 2073 0000C40F 16 <1> push ss 2074 0000C410 07 <1> pop es 2075 0000C411 E821FD <1> call boot_parse_fn ; get next pathname 2076 0000C414 3C2F <1> cmp al, '/' 2077 0000C416 7509 <1> jne @F 2078 0000C418 C606[B55A]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 2079 0000C41D 8936[C65A] <1> mov word [load_kernelname_next], si 2080 <1> @@: 2081 <1> 2082 0000C421 BFFFFF <1> mov di, -1 2083 0000C424 89FE <1> mov si, di 2084 0000C426 897EF4 <1> mov [bp + lsvFATSector], di 2085 0000C429 8976F6 <1> mov [bp + lsvFATSector + 2], si 2086 <1> 2087 0000C42C 31C0 <1> xor ax, ax 2088 0000C42E 31D2 <1> xor dx, dx 2089 <1> 2090 <1> scan_dir_kernelname_loop: 2091 0000C430 8946EC <1> mov word [bp + ldDirCluster], ax 2092 0000C433 8956EE <1> mov word [bp + ldDirCluster + 2], dx 2093 <1> 2094 0000C436 31DB <1> xor bx, bx 2095 0000C438 8EC3 <1> mov es, bx 2096 0000C43A BB0005 <1> mov bx, 500h 2097 0000C43D E8C607 <1> call scan_dir_aux_for_file 2098 <1> 2099 0000C440 803E[B55A]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 2100 0000C445 753C <1> jne got_kernelentry 2101 <1> 2102 0000C447 56 <1> push si 2103 0000C448 57 <1> push di 2104 0000C449 C606[B55A]00 <1> mov byte [load_check_dir_attr], 0 2105 0000C44E 8B36[C65A] <1> mov si, word [load_kernelname_next] 2106 0000C452 803C00 <1> cmp byte [si], 0 2107 0000C455 7504 <1> jne @F 2108 0000C457 8B36[E057] <1> mov si, word [load_kernelname_default] 2109 <1> @@: 2110 0000C45B 06 <1> push es 2111 0000C45C 16 <1> push ss 2112 0000C45D 07 <1> pop es 2113 0000C45E E8D4FC <1> call boot_parse_fn ; get next pathname 2114 0000C461 07 <1> pop es 2115 0000C462 3C2F <1> cmp al, '/' 2116 0000C464 7509 <1> jne @F 2117 0000C466 C606[B55A]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 2118 0000C46B 8936[C65A] <1> mov word [load_kernelname_next], si 2119 <1> @@: 2120 0000C46F 5F <1> pop di 2121 0000C470 5E <1> pop si 2122 <1> 2123 0000C471 31D2 <1> xor dx, dx 2124 0000C473 268B471A <1> mov ax, [es:bx + deClusterLow] 2125 <1> ; = first cluster (not FAT32) 2126 0000C477 807EE620 <1> cmp byte [bp + ldFATType], 32 2127 0000C47B 7504 <1> jne @F 2128 0000C47D 268B5714 <1> mov dx, [es:bx + deClusterHigh] 2129 <1> ; dx:ax = first cluster (FAT32) 2130 <1> @@: 2131 <1> 2132 0000C481 EBAD <1> jmp scan_dir_kernelname_loop 2133 <1> 2134 <1> 2135 <1> got_kernelentry: 2136 0000C483 56 <1> push si 2137 0000C484 57 <1> push di 2138 <1> 2139 0000C485 C606[B55A]00 <1> mov byte [load_check_dir_attr], 0 2140 0000C48A 8B36[C85A] <1> mov si, word [load_addname_input] 2141 0000C48E 803C2F <1> cmp byte [si], '/' 2142 0000C491 7511 <1> jne @F 2143 0000C493 46 <1> inc si 2144 0000C494 803C2F <1> cmp byte [si], '/' 2145 0000C497 7503E9A400 <1> je got_no_addentry.no_dxax_on_stack 2146 <1> 2147 0000C49C 31C0 <1> xor ax, ax 2148 0000C49E 8946EC <1> mov word [bp + ldDirCluster], ax 2149 0000C4A1 8946EE <1> mov word [bp + ldDirCluster + 2], ax 2150 <1> ; search from root directory 2151 <1> @@: 2152 0000C4A4 803C00 <1> cmp byte [si], 0 2153 0000C4A7 750C <1> jne @F 2154 0000C4A9 8B36[E257] <1> mov si, word [load_addname_default] 2155 0000C4AD 803C00 <1> cmp byte [si], 0 2156 0000C4B0 7503E98B00 <1> je got_no_addentry.no_dxax_on_stack 2157 <1> @@: 2158 0000C4B5 16 <1> push ss 2159 0000C4B6 07 <1> pop es 2160 0000C4B7 E87BFC <1> call boot_parse_fn ; get next pathname 2161 0000C4BA 3C2F <1> cmp al, '/' 2162 0000C4BC 7509 <1> jne @F 2163 0000C4BE C606[B55A]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 2164 0000C4C3 8936[C65A] <1> mov word [load_kernelname_next], si 2165 <1> @@: 2166 0000C4C7 5F <1> pop di 2167 0000C4C8 5E <1> pop si 2168 0000C4C9 EB06 <1> jmp @F 2169 <1> 2170 <1> scan_dir_addname_loop: 2171 0000C4CB 8946EC <1> mov word [bp + ldDirCluster], ax 2172 0000C4CE 8956EE <1> mov word [bp + ldDirCluster + 2], dx 2173 <1> 2174 <1> @@: 2175 0000C4D1 31DB <1> xor bx, bx 2176 0000C4D3 8EC3 <1> mov es, bx 2177 0000C4D5 BB2005 <1> mov bx, 520h ; 0:bx -> space for second directory entry 2178 0000C4D8 E82B07 <1> call scan_dir_aux_for_file 2179 <1> 2180 0000C4DB 803E[B55A]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 2181 0000C4E0 756C <1> jne got_addentry 2182 <1> 2183 0000C4E2 56 <1> push si 2184 0000C4E3 57 <1> push di 2185 0000C4E4 52 <1> push dx 2186 0000C4E5 50 <1> push ax 2187 0000C4E6 C606[B55A]00 <1> mov byte [load_check_dir_attr], 0 2188 0000C4EB 8B36[CA5A] <1> mov si, word [load_addname_next] 2189 0000C4EF 803C00 <1> cmp byte [si], 0 2190 0000C4F2 7509 <1> jne @F 2191 0000C4F4 8B36[E257] <1> mov si, word [load_addname_default] 2192 0000C4F8 803C00 <1> cmp byte [si], 0 2193 0000C4FB 7441 <1> je got_no_addentry 2194 <1> @@: 2195 0000C4FD 06 <1> push es 2196 0000C4FE 16 <1> push ss 2197 0000C4FF 07 <1> pop es 2198 0000C500 E832FC <1> call boot_parse_fn ; get next pathname 2199 0000C503 07 <1> pop es 2200 0000C504 3C2F <1> cmp al, '/' 2201 0000C506 7509 <1> jne @F 2202 0000C508 C606[B55A]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 2203 0000C50D 8936[CA5A] <1> mov word [load_addname_next], si 2204 <1> @@: 2205 0000C511 58 <1> pop ax 2206 0000C512 5A <1> pop dx 2207 0000C513 5F <1> pop di 2208 0000C514 5E <1> pop si 2209 <1> 2210 0000C515 31D2 <1> xor dx, dx 2211 0000C517 268B471A <1> mov ax, [es:bx + deClusterLow] 2212 <1> ; = first cluster (not FAT32) 2213 0000C51B 807EE620 <1> cmp byte [bp + ldFATType], 32 2214 0000C51F 7504 <1> jne @F 2215 0000C521 268B5714 <1> mov dx, [es:bx + deClusterHigh] 2216 <1> ; dx:ax = first cluster (FAT32) 2217 <1> @@: 2218 <1> 2219 0000C525 EBA4 <1> jmp scan_dir_addname_loop 2220 <1> 2221 <1> 2222 <1> helper_shift_down_and_clamp: 2223 0000C527 B90400 <1> mov cx, 4 2224 <1> @@: 2225 0000C52A D0EA <1> shr dl, 1 2226 0000C52C D1D8 <1> rcr ax, 1 2227 0000C52E D1DB <1> rcr bx, 1 2228 0000C530 E2F8 <1> loop @B 2229 <1> 2230 0000C532 08D0 <1> or al, dl 2231 0000C534 89DA <1> mov dx, bx ; size in paragraphs 2232 0000C536 85C0 <1> test ax, ax ; > 0FFFFh ? 2233 0000C538 7403 <1> jz @F ; no, take actual size --> 2234 0000C53A BAFFFF <1> mov dx, 0FFFFh ; clamp to 0FFFFh 2235 <1> @@: 2236 0000C53D C3 <1> retn 2237 <1> 2238 <1> got_no_addentry: 2239 0000C53E 58 <1> pop ax 2240 0000C53F 5A <1> pop dx 2241 <1> .no_dxax_on_stack: 2242 <1> ; push ax 2243 0000C540 B91000 <1> mov cx, 16 2244 0000C543 31C0 <1> xor ax, ax 2245 0000C545 8EC0 <1> mov es, ax 2246 0000C547 BF2005 <1> mov di, 520h ; es:di -> space for second directory entry 2247 0000C54A F3AB <1> rep stosw ; store zeros 2248 <1> ; pop ax 2249 <1> 2250 0000C54C 5F <1> pop di 2251 0000C54D 5E <1> pop si 2252 <1> 2253 <1> got_addentry: 2254 0000C54E 31C0 <1> xor ax, ax 2255 0000C550 8EC0 <1> mov es, ax 2256 <1> 2257 <1> 2258 <1> ; (boot32.asm code starts here) 2259 <1> 2260 0000C552 8B46E2 <1> mov ax, word [bp + ldLoadTop] 2261 0000C555 2B46EA <1> sub ax, word [bp + ldParaPerSector] 2262 0000C558 7303E9B4FD <1> jc load_freedos_common.outofmem 2263 0000C55D 8946D6 <1> mov [bp + ldLastAvailableSector], ax 2264 <1> 2265 0000C560 268B1E1C05 <1> mov bx, [es:500h + deSize] 2266 0000C565 26A11E05 <1> mov ax, [es:500h + deSize + 2] ; ax:bx = file size 2267 0000C569 268A160C05 <1> mov dl, [es:500h + 12] ; dl = FAT+ size bits 2268 0000C56E 88D6 <1> mov dh, dl 2269 0000C570 81E207E0 <1> and dx, 0E007h ; obtain bits 7-5 and 2-0 2270 0000C574 D0EE <1> shr dh, 1 2271 0000C576 D0EE <1> shr dh, 1 2272 0000C578 08F2 <1> or dl, dh ; dl:ax:bx = file size 2273 0000C57A 52 <1> push dx 2274 0000C57B 50 <1> push ax 2275 0000C57C 53 <1> push bx 2276 <1> 2277 0000C57D E8A7FF <1> call helper_shift_down_and_clamp 2278 <1> ; round down to next paragraph boundary 2279 0000C580 3916[E457] <1> cmp word [load_minpara], dx 2280 0000C584 7603E9A400 <1> ja error_filetoosmall 2281 <1> 2282 0000C589 5B <1> pop bx 2283 0000C58A 58 <1> pop ax 2284 0000C58B 5A <1> pop dx 2285 0000C58C 8B4E0B <1> mov cx, [bp + bsBPB + bpbBytesPerSector] 2286 0000C58F 49 <1> dec cx ; BpS - 1 2287 0000C590 01CB <1> add bx, cx 2288 0000C592 83D000 <1> adc ax, 0 2289 0000C595 80D200 <1> adc dl, 0 ; round up to next sector 2290 0000C598 F7D1 <1> not cx ; ~ (BpS - 1) 2291 0000C59A 21CB <1> and bx, cx ; mask to limit to rounded-up sector 2292 0000C59C E888FF <1> call helper_shift_down_and_clamp 2293 <1> 2294 <1> ; dl:ax:bx = size in paragraphs 2295 0000C59F A1[E657] <1> mov ax, word [load_maxpara] 2296 0000C5A2 39C2 <1> cmp dx, ax ; actual size below maximum ? 2297 0000C5A4 7602 <1> jbe @F ; yes, use actual size --> 2298 0000C5A6 89C2 <1> mov dx, ax ; use maximum size 2299 <1> @@: 2300 0000C5A8 8956D8 <1> mov word [bp + ldParasLeft], dx 2301 0000C5AB C746DA0000 <1> mov word [bp + ldParasDone], 0 2302 <1> 2303 <1> ; get starting cluster of file 2304 0000C5B0 31D2 <1> xor dx, dx 2305 0000C5B2 26A11A05 <1> mov ax, [es:500h + deClusterLow] 2306 <1> ; = first cluster (not FAT32) 2307 <1> 2308 0000C5B6 807EE620 <1> cmp byte [bp + ldFATType], 32 2309 0000C5BA 7505 <1> jne @F 2310 0000C5BC 268B161405 <1> mov dx, [es:500h + deClusterHigh] 2311 <1> ; dx:ax = first cluster (FAT32) 2312 <1> @@: 2313 <1> 2314 0000C5C1 8946F0 <1> mov word [bp + lsvFirstCluster], ax 2315 0000C5C4 8956F2 <1> mov word [bp + lsvFirstCluster + 2], dx 2316 <1> 2317 0000C5C7 E80A08 <1> call check_clust 2318 0000C5CA 7303E96C15 <1> jc error_badchain 2319 <1> 2320 <1> next_load_cluster: 2321 0000C5CF E82107 <1> call clust_to_first_sector 2322 <1> ; dx:ax = first sector of cluster 2323 <1> ; cx:bx = cluster value 2324 0000C5D2 51 <1> push cx 2325 0000C5D3 53 <1> push bx ; preserve cluster number for later 2326 <1> 2327 0000C5D4 8B4EE8 <1> mov cx, [bp + ldClusterSize] 2328 <1> 2329 0000C5D7 8B5EFA <1> mov bx, [bp + lsvLoadSeg] 2330 <1> ; xxx - this will always load an entire cluster (e.g. 64 sectors), 2331 <1> ; even if the file is shorter than this 2332 <1> @@: 2333 0000C5DA 3B5ED6 <1> cmp bx, [bp + ldLastAvailableSector] 2334 0000C5DD 7613 <1> jbe @F 2335 0000C5DF 833E[E657]00 <1> cmp word [load_maxpara], 0 2336 0000C5E4 743D <1> je @FF ; if to allow partial load --> 2337 0000C5E6 BA[8E17] <1> mov dx, msg.boot_file_too_big_error 2338 0000C5E9 B81A02 <1> mov ax, 021Ah 2339 0000C5EC E8BABC <1> call setrc 2340 0000C5EF E91DF6 <1> jmp bootcmd.fail 2341 <1> 2342 <1> @@: 2343 0000C5F2 06 <1> push es ; (must preserve ADR_FATBUF reference) 2344 0000C5F3 E8920B <1> call read_sector 2345 0000C5F6 07 <1> pop es 2346 0000C5F7 895EFA <1> mov [bp + lsvLoadSeg], bx ; => after last read data 2347 <1> 2348 0000C5FA 50 <1> push ax 2349 0000C5FB 8B46EA <1> mov ax, [bp + ldParaPerSector] 2350 0000C5FE 0146DA <1> add word [bp + ldParasDone], ax 2351 0000C601 833E[E657]00 <1> cmp word [load_maxpara], 0 2352 0000C606 7407 <1> je .donotuseleft 2353 0000C608 2946D8 <1> sub word [bp + ldParasLeft], ax 2354 0000C60B 58 <1> pop ax 2355 0000C60C 7615 <1> jbe @F ; read enough --> 2356 0000C60E A8 <1> db __TEST_IMM8 ; (skip pop) 2357 <1> .donotuseleft: 2358 0000C60F 58 <1> pop ax 2359 <1> 2360 0000C610 E2C8 <1> loop @BB 2361 0000C612 5B <1> pop bx 2362 0000C613 59 <1> pop cx 2363 <1> 2364 0000C614 E80507 <1> call clust_next 2365 0000C617 73B6 <1> jnc next_load_cluster 2366 0000C619 40 <1> inc ax 2367 0000C61A 40 <1> inc ax 2368 0000C61B A808 <1> test al, 8 ; set in 0FFF_FFF8h--0FFF_FFFFh, 2369 <1> ; clear in 0, 1, and 0FFF_FFF7h 2370 0000C61D 7503E91915 <1> jz error_badchain 2371 0000C622 A9 <1> db __TEST_IMM16 2372 <1> @@: 2373 0000C623 5B <1> pop bx 2374 0000C624 59 <1> pop cx 2375 <1> 2376 0000C625 A1[E457] <1> mov ax, word [load_minpara] 2377 0000C628 3B46DA <1> cmp ax, word [bp + ldParasDone] 2378 0000C62B 760C <1> jbe @F 2379 <1> error_filetoosmall: 2380 0000C62D BA[9E17] <1> mov dx, msg.boot_file_too_small_error 2381 0000C630 B81B02 <1> mov ax, 021Bh 2382 0000C633 E873BC <1> call setrc 2383 0000C636 E9D6F5 <1> jmp bootcmd.fail 2384 <1> @@: 2385 <1> 2386 <1> 2387 0000C639 8E06[EA57] <1> mov es, word [load_loadseg] 2388 0000C63D 8B3E[F457] <1> mov di, word [load_check_offset] 2389 0000C641 A1[F657] <1> mov ax, word [load_check_value] 2390 0000C644 85C0 <1> test ax, ax 2391 0000C646 7406 <1> jz @F 2392 0000C648 AF <1> scasw 2393 0000C649 7403E9F301 <1> jne .error_check_mismatch 2394 <1> @@: 2395 <1> 2396 <1> ; turn off floppy motor 2397 0000C64E BAF203 <1> mov dx,3F2h 2398 0000C651 B000 <1> mov al,0 2399 0000C653 EE <1> out dx,al 2400 <1> 2401 <1> ; Set-up registers for and jump to loaded file 2402 <1> 2403 0000C654 8A5640 <1> mov dl, [bp + bsBPB + ebpbNew + bpbnBootUnit] 2404 <1> ; testopt [load_options], LOAD_SET_DL_UNIT 2405 <1> ; jz @F 2406 <1> ; (always set dl) 2407 0000C657 8816[B00C] <1> mov byte [reg_edx], dl 2408 <1> @@: 2409 <1> 2410 <1> ; testopt [load_options], LOAD_SET_BL_UNIT 2411 <1> ; jz @F 2412 <1> ; (always set bl -- overwritten later if LOAD_SET_AXBX_DATASTART) 2413 0000C65B 8816[A80C] <1> mov byte [reg_ebx], dl 2414 <1> @@: 2415 <1> 2416 0000C65F 8A6E15 <1> mov ch, byte [bp + bsBPB + bpbMediaID] 2417 0000C662 882E[AD0C] <1> mov byte [reg_ecx + 1], ch 2418 <1> 2419 0000C666 F606[E857]40 <1> testopt [load_options], LOAD_DATASTART_HIDDEN 2420 0000C66B 740C <1> jz @F 2421 0000C66D 8B5E1C <1> mov bx, [bp + bsBPB + bpbHiddenSectors] 2422 0000C670 8B461E <1> mov ax, [bp + bsBPB + bpbHiddenSectors + 2] 2423 0000C673 015EFC <1> add word [bp + lsvDataStart], bx 2424 0000C676 1146FE <1> adc word [bp + lsvDataStart + 2], ax 2425 <1> @@: 2426 <1> 2427 0000C679 F606[E857]80 <1> testopt [load_options], LOAD_SET_AXBX_DATASTART 2428 0000C67E 740D <1> jz @F 2429 0000C680 8B5EFC <1> mov bx, word [bp + lsvDataStart] 2430 0000C683 8B46FE <1> mov ax, word [bp + lsvDataStart + 2] 2431 0000C686 891E[A80C] <1> mov word [reg_ebx], bx 2432 0000C68A A3[A40C] <1> mov word [reg_eax], ax 2433 <1> @@: 2434 <1> 2435 0000C68D F606[E957]08 <1> testopt [load_options], LOAD_SET_AXBX_ROOT_HIDDEN 2436 0000C692 7413 <1> jz @F 2437 0000C694 8B5ED0 <1> mov bx, word [bp + ldRootSector] 2438 0000C697 8B46D2 <1> mov ax, word [bp + ldRootSector + 2] 2439 0000C69A 035E1C <1> add bx, word [bp + bsBPB + bpbHiddenSectors] 2440 0000C69D 13461E <1> adc ax, word [bp + bsBPB + bpbHiddenSectors + 2] 2441 0000C6A0 891E[A80C] <1> mov word [reg_ebx], bx 2442 0000C6A4 A3[A40C] <1> mov word [reg_eax], ax 2443 <1> @@: 2444 <1> 2445 0000C6A7 F606[E857]04 <1> testopt [load_options], LOAD_SET_SIDI_CLUSTER 2446 0000C6AC 740D <1> jz @F 2447 0000C6AE 8B56F2 <1> mov dx, word [bp + lsvFirstCluster + 2] 2448 0000C6B1 8B46F0 <1> mov ax, word [bp + lsvFirstCluster] 2449 0000C6B4 8916[BC0C] <1> mov word [reg_esi], dx 2450 0000C6B8 A3[C00C] <1> mov word [reg_edi], ax 2451 <1> @@: 2452 <1> 2453 <1> ; (boot.asm code ends here) 2454 <1> 2455 <1> 2456 0000C6BB C43E[A45A] <1> les di, [load_bpb_dest] 2457 0000C6BF 57 <1> push di 2458 0000C6C0 83EF10 <1> sub di, -LOADSTACKVARS 2459 0000C6C3 BE[7057] <1> mov si, load_data - LOADDATA2 + LOADSTACKVARS 2460 0000C6C6 B91000 <1> mov cx, -LOADSTACKVARS 2461 0000C6C9 F606[E957]20 <1> testopt [load_options], LOAD_NO_BPB 2462 0000C6CE 7568 <1> jnz .no_bpb_movsb 2463 0000C6D0 B93400 <1> mov cx, -LOADSTACKVARS + bsBPB + bpbNew 2464 0000C6D3 F3A4 <1> rep movsb ; move common BPB part 2465 <1> 2466 0000C6D5 394E16 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], cx 2467 0000C6D8 B93600 <1> mov cx, ebpbNew - bpbNew + BPBN_size ; move FAT32 EBPB part + BPBN 2468 0000C6DB 7406 <1> je @F 2469 0000C6DD 83C61C <1> add si, ebpbNew - bpbNew; -> BPBN 2470 0000C6E0 B91A00 <1> mov cx, BPBN_size ; move only BPBN 2471 <1> @@: 2472 0000C6E3 F3A4 <1> rep movsb 2473 <1> 2474 0000C6E5 89F8 <1> mov ax, di 2475 0000C6E7 5F <1> pop di 2476 0000C6E8 29F8 <1> sub ax, di 2477 0000C6EA 48 <1> dec ax 2478 0000C6EB 48 <1> dec ax 2479 0000C6EC 86C4 <1> xchg al, ah 2480 0000C6EE B0EB <1> mov al, 0EBh 2481 0000C6F0 268905 <1> mov word [es:di], ax 2482 0000C6F3 26C6450290 <1> mov byte [es:di + 2], 90h 2483 <1> 2484 0000C6F8 F606[E957]02 <1> testopt [load_options], LOAD_LBA_SET_TYPE 2485 0000C6FD 7416 <1> jz @F 2486 0000C6FF F646E701 <1> test byte [bp + ldFlags], ldfHasLBA 2487 0000C703 7410 <1> jz @F 2488 <1> 2489 0000C705 26C645020E <1> mov byte [es:di + 2], 0Eh ; (LBA-enabled) FAT16 FS partition type 2490 0000C70A 807EE620 <1> cmp byte [bp + ldFATType], 32 2491 0000C70E 7205 <1> jb @F 2492 0000C710 26C645020C <1> mov byte [es:di + 2], 0Ch ; (LBA-enabled) FAT32 FS partition type 2493 <1> @@: 2494 <1> 2495 0000C715 26C785FE0155AA <1> mov word [es:di + 510], 0AA55h 2496 0000C71C 1E <1> push ds 2497 0000C71D 31C9 <1> xor cx, cx 2498 0000C71F 8ED9 <1> mov ds, cx 2499 0000C721 BE0005 <1> mov si, 500h 2500 0000C724 57 <1> push di 2501 0000C725 81C7D601 <1> add di, 512 - 2 - 2 - 14 - 12 - 12 2502 <1> ; 2: AA55 sig, 2: null word, 14: MS-DOS 7 protocol 2503 <1> ; message table pointer lives here, 2504 <1> ; 12: add name, 12: kernel name 2505 0000C729 B10B <1> mov cl, 11 2506 0000C72B F3A4 <1> rep movsb ; put kernel filename into the pseudo boot sector 2507 0000C72D 47 <1> inc di 2508 0000C72E BE2005 <1> mov si, 520h 2509 0000C731 B10B <1> mov cl, 11 2510 0000C733 F3A4 <1> rep movsb ; put additional filename (if any), cx = 0 2511 0000C735 5F <1> pop di 2512 0000C736 1F <1> pop ds 2513 <1> 2514 <1> ; cx = 0 2515 0000C737 A8 <1> db __TEST_IMM8 ; (skip pop) 2516 <1> .no_bpb_movsb: 2517 0000C738 58 <1> pop ax ; discard word on stack 2518 0000C739 F3A4 <1> rep movsb 2519 <1> 2520 0000C73B 8126[E00C]FFF8 <1> and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 2521 <1> 2522 0000C741 890E[DE0C] <1> mov word [reg_eip + 2], cx 2523 0000C745 FF36[EC57] <1> push word [load_entrypoint] 2524 0000C749 8F06[DC0C] <1> pop word [reg_eip] 2525 0000C74D A1[EE57] <1> mov ax, word [load_entrypoint + 2] 2526 0000C750 0306[EA57] <1> add ax, word [load_loadseg] 2527 0000C754 A3[D00C] <1> mov word [reg_cs], ax 2528 <1> 2529 0000C757 A1[A65A] <1> mov ax, word [load_bpb_dest + 2] 2530 0000C75A A3[CC0C] <1> mov word [reg_ss], ax 2531 <1> ; testopt [load_options], LOAD_SET_DSBP_BPB 2532 <1> ; jz @F 2533 <1> ; (always set ds -- overwritten later if LOAD_SET_DSSI_DPT) 2534 0000C75D A3[C40C] <1> mov word [reg_ds], ax 2535 <1> @@: 2536 0000C760 8B1E[A45A] <1> mov bx, word [load_bpb_dest] 2537 0000C764 890E[BA0C] <1> mov word [reg_ebp + 2], cx 2538 0000C768 891E[B80C] <1> mov word [reg_ebp], bx 2539 0000C76C 89D8 <1> mov ax, bx 2540 0000C76E 83EB10 <1> sub bx, -LOADSTACKVARS ; (subtracts --10h) 2541 0000C771 890E[B60C] <1> mov word [reg_esp + 2], cx 2542 0000C775 891E[B40C] <1> mov word [reg_esp], bx 2543 <1> 2544 0000C779 F606[E957]20 <1> testopt [load_options], LOAD_NO_BPB 2545 0000C77E 751B <1> jnz @F 2546 <1> 2547 0000C780 F606[E957]04 <1> testopt [load_options], LOAD_MESSAGE_TABLE 2548 0000C785 7414 <1> jz @F 2549 0000C787 B96000 <1> mov cx, (bsBPB + ebpbNew + BPBN_size + 2 + 15) & ~15 2550 0000C78A 01C8 <1> add ax, cx 2551 0000C78C 268985EE01 <1> mov word [es:di + 1EEh], ax 2552 <1> ; this pointer points to the MS-DOS 7 message table. 2553 <1> ; 2554 <1> ; note that in actual MS-DOS 7 boot sectors, this value is 2555 <1> ; eg 17Fh, which is incorrectly used with the boot sector's 2556 <1> ; ss to load the table into the initial loader. 2557 <1> ; 2558 <1> ; refer to comments in msg.asm about msdos7_message_table. 2559 0000C791 BE[7935] <1> mov si, msdos7_message_table 2560 0000C794 01CF <1> add di, cx 2561 0000C796 B94300 <1> mov cx, msdos7_message_table.size 2562 0000C799 F3A4 <1> rep movsb 2563 <1> @@: 2564 <1> 2565 0000C79B F606[E957]10 <1> testopt [load_options], LOAD_CMDLINE 2566 0000C7A0 7440 <1> jz .no_cmdline 2567 <1> 2568 0000C7A2 8B36[AE5A] <1> mov si, word [load_cmdline] 2569 0000C7A6 85F6 <1> test si, si 2570 0000C7A8 7503 <1> jnz @F 2571 0000C7AA BE[AE5A] <1> mov si, load_cmdline 2572 <1> @@: 2573 <1> 2574 <1> ; due to the size of our line_in buffer, 2575 <1> ; the command line is never too long for 2576 <1> ; the lsv command line buffer (256 bytes). 2577 0000C7AD B98000 <1> mov cx, lsvclBufferLength / 2 2578 0000C7B0 812E[B40C]0401 <1> sub word [reg_esp], - lsvCommandLine.start + LOADSTACKVARS 2579 <1> ; hazard: if sp is too low, this underflows! 2580 0000C7B6 7303E9AD00 <1> jc .error_stack_underflow 2581 0000C7BB 8E06[CC0C] <1> mov es, [reg_ss] 2582 0000C7BF 8B3E[B40C] <1> mov di, [reg_esp] ; es:di -> stack area for the pointers 2583 0000C7C3 81FF0001 <1> cmp di, 256 2584 0000C7C7 7303E99C00 <1> jb .error_stack_underflow 2585 0000C7CC 57 <1> push di 2586 0000C7CD F3A5 <1> rep movsw 2587 0000C7CF 26884DFF <1> mov byte [es:di - 1], cl; truncate command line if too long 2588 0000C7D3 B8434C <1> mov ax, lsvclSignature 2589 0000C7D6 AB <1> stosw ; write lsvCommandLine.signature 2590 0000C7D7 31C0 <1> xor ax, ax 2591 0000C7D9 AB <1> stosw ; write lsvExtra 2592 0000C7DA 5F <1> pop di 2593 0000C7DB B90001 <1> mov cx, lsvclBufferLength 2594 0000C7DE F2AE <1> repne scasb ; search terminator 2595 0000C7E0 F3AA <1> rep stosb ; zero buffer behind terminator 2596 <1> .no_cmdline: 2597 <1> 2598 0000C7E2 31C0 <1> xor ax, ax 2599 0000C7E4 8EC0 <1> mov es, ax 2600 0000C7E6 BF7800 <1> mov di, 1Eh * 4 2601 0000C7E9 268B5502 <1> mov dx, word [es:di + 2] 2602 0000C7ED 268B1D <1> mov bx, word [es:di] 2603 <1> 2604 0000C7F0 F606[E857]10 <1> testopt [load_options], LOAD_SET_DSSI_DPT 2605 0000C7F5 7408 <1> jz @F 2606 0000C7F7 8916[C40C] <1> mov word [reg_ds], dx 2607 0000C7FB 891E[BC0C] <1> mov word [reg_esi], bx 2608 <1> @@: 2609 0000C7FF F606[E857]20 <1> testopt [load_options], LOAD_PUSH_DPT 2610 0000C804 7419 <1> jz @F 2611 <1> 2612 0000C806 06 <1> push es 2613 0000C807 57 <1> push di 2614 0000C808 832E[B40C]08 <1> sub word [reg_esp], 4 * 2 ; push four words 2615 0000C80D 8E06[CC0C] <1> mov es, [reg_ss] 2616 0000C811 8B3E[B40C] <1> mov di, [reg_esp] ; es:di -> stack area for the pointers 2617 0000C815 58 <1> pop ax ; di (1Eh * 4) 2618 0000C816 AB <1> stosw 2619 0000C817 58 <1> pop ax ; es (0) 2620 0000C818 AB <1> stosw 2621 0000C819 89D8 <1> mov ax, bx 2622 0000C81B AB <1> stosw ; si (Int1E offset) 2623 0000C81C 89D0 <1> mov ax, dx 2624 0000C81E AB <1> stosw ; ds (Int1E segment) 2625 <1> @@: 2626 <1> 2627 0000C81F F606[E957]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 2628 0000C824 7415 <1> jz @F 2629 0000C826 A1[B05A] <1> mov ax, word [load_partition_entry] 2630 0000C829 8326[C40C]00 <1> and word [reg_ds], 0 2631 0000C82E A3[BC0C] <1> mov word [reg_esi], ax 2632 0000C831 F606[E957]20 <1> testopt [load_options], LOAD_NO_BPB 2633 0000C836 7403 <1> jz @F 2634 0000C838 A3[B80C] <1> mov word [reg_ebp], ax 2635 <1> @@: 2636 0000C83B 800E[D700]01 <1> setopt [internalflags2], dif2_boot_loaded_kernel 2637 0000C840 C3 <1> retn 2638 <1> 2639 <1> 2640 <1> .error_check_mismatch: 2641 0000C841 4F <1> dec di 2642 0000C842 4F <1> dec di ; = offset into file 2643 0000C843 26FF35 <1> push word [es:di] ; = value we got in file 2644 0000C846 57 <1> push di ; = offset 2645 0000C847 16 <1> push ss 2646 0000C848 07 <1> pop es ; set STT 2647 0000C849 BF[3416] <1> mov di, msg.bootfail_check_mismatch.check_value 2648 0000C84C E83BD2 <1> call hexword ; write expected value 2649 0000C84F 58 <1> pop ax 2650 0000C850 BF[4416] <1> mov di, msg.bootfail_check_mismatch.check_offset 2651 0000C853 E834D2 <1> call hexword ; write offset 2652 0000C856 58 <1> pop ax 2653 0000C857 BF[5216] <1> mov di, msg.bootfail_check_mismatch.check_got 2654 0000C85A E82DD2 <1> call hexword ; write what we got in file 2655 <1> 2656 0000C85D BA[1B16] <1> mov dx, msg.bootfail_check_mismatch 2657 0000C860 B81C02 <1> mov ax, 021Ch 2658 0000C863 E843BA <1> call setrc 2659 0000C866 EB09 <1> jmp @F ; fail with error message 2660 <1> 2661 <1> .error_stack_underflow: 2662 0000C868 BA[0116] <1> mov dx, msg.bootfail_stack_underflow 2663 0000C86B B81D02 <1> mov ax, 021Dh 2664 0000C86E E838BA <1> call setrc 2665 <1> @@: 2666 0000C871 E99BF3 <1> jmp bootcmd.fail 2667 <1> 2668 <1> 2669 <1> boot_dir: 2670 0000C874 8026[D800]F7 <1> clropt [internalflags3], dif3_load_dir_dir 2671 0000C879 E863D1 <1> call skipwhite 2672 0000C87C 4E <1> dec si 2673 0000C87D BA[D218] <1> mov dx, msg.dir 2674 0000C880 E89DD0 <1> call isstring? 2675 0000C883 7505 <1> jne @F 2676 0000C885 800E[D800]08 <1> setopt [internalflags3], dif3_load_dir_dir 2677 <1> @@: 2678 0000C88A C706[C45A][DF18] <1> mov word [load_kernelname_input], msg.emptydirname 2679 0000C890 AC <1> lodsb 2680 0000C891 E891F5 <1> call parseloadunit_default_sdp 2681 0000C894 7409 <1> jz .fn_done_eol ; no filename given, use defaults --> 2682 <1> ; al was = '/' or '\' or first pathname's first character 2683 <1> ; si-> next char 2684 0000C896 BB[C45A] <1> mov bx, load_kernelname_input 2685 0000C899 E85EF1 <1> call bootcmd.pathname_parse_super 2686 0000C89C E800D1 <1> call chkeol 2687 <1> 2688 <1> .fn_done_eol: 2689 0000C89F F606[D800]07 <1> testopt [internalflags3], dif3_load_is_dp 2690 0000C8A4 7527 <1> jnz .boot_dir_from_ldp 2691 <1> 2692 0000C8A6 8A1E[B25A] <1> mov bl, [load_partition] 2693 0000C8AA 803E[C057]80 <1> cmp byte [load_unit], 80h 2694 0000C8AF 7228 <1> jb .boot_dir_is_diskette 2695 0000C8B1 84DB <1> test bl, bl ; partition specified ? 2696 0000C8B3 7503E958EF <1> jz bootcmd.error ; no, error --> 2697 <1> 2698 0000C8B8 E8F306 <1> call query_geometry 2699 <1> 2700 0000C8BB B9[00C9] <1> mov cx, boot_dir_from_partition 2701 0000C8BE E84505 <1> call scan_partitions 2702 0000C8C1 BA[B116] <1> mov dx, msg.boot_partition_not_found 2703 0000C8C4 B81102 <1> mov ax, 0211h 2704 0000C8C7 E8DFB9 <1> call setrc 2705 0000C8CA E942F3 <1> jmp bootcmd.fail 2706 <1> 2707 <1> 2708 <1> .boot_dir_from_ldp: 2709 0000C8CD E8DE06 <1> call query_geometry 2710 0000C8D0 A1[A85A] <1> mov ax, word [load_partition_sector] 2711 0000C8D3 8B16[AA5A] <1> mov dx, word [load_partition_sector + 2] 2712 0000C8D7 EB0E <1> jmp @F 2713 <1> 2714 <1> 2715 <1> .boot_dir_is_diskette: 2716 0000C8D9 84DB <1> test bl, bl ; partition specified ? 2717 0000C8DB 7403E930EF <1> jnz bootcmd.error ; yes, error --> 2718 <1> 2719 0000C8E0 E8CB06 <1> call query_geometry 2720 <1> 2721 0000C8E3 31C0 <1> xor ax, ax 2722 0000C8E5 31D2 <1> xor dx, dx 2723 <1> @@: 2724 0000C8E7 8B1E[4A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 2725 0000C8EB 52 <1> push dx 2726 0000C8EC 50 <1> push ax 2727 0000C8ED E88608 <1> call read_ae_512_bytes 2728 <1> 2729 0000C8F0 26813EFE0155AA <1> cmp word [es:510], 0AA55h 2730 0000C8F7 7403E9630B <1> jne boot_sigmismatch 2731 0000C8FC 58 <1> pop ax 2732 0000C8FD 5A <1> pop dx 2733 <1> 2734 0000C8FE EB41 <1> jmp boot_dir_common 2735 <1> 2736 <1> 2737 <1> ; INP: es:si -> partition table entry, 2738 <1> ; si = load_partition_table .. load_partition_table+48, 2739 <1> ; es = ss 2740 <1> ; bp + di -> above part table metadata, 2741 <1> ; dwo [bp + di - 4] = root (outermost extended position) 2742 <1> ; dwo [bp + di - 8] = base (current table position) 2743 <1> ; CHG: ax, bx, (cx), dx 2744 <1> boot_dir_from_partition: 2745 <1> d4 call d4message 2746 <1> d4 asciz "In boot_dir_from_partition",13,10 2747 <1> 2748 0000C900 A0[B35A] <1> mov al, byte [load_current_partition] 2749 0000C903 3A06[B25A] <1> cmp al, byte [load_partition] 2750 0000C907 7401 <1> je .gotit 2751 0000C909 C3 <1> retn 2752 <1> 2753 <1> .gotit: 2754 <1> d4 call d4message 2755 <1> d4 asciz "In boot_dir_from_partition.gotit",13,10 2756 <1> 2757 0000C90A 8B43F8 <1> mov ax, [bp + di - 8] 2758 0000C90D 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 2759 <1> 2760 0000C910 26034408 <1> add ax, [es:si + 8] 2761 0000C914 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 2762 <1> 2763 0000C918 26894408 <1> mov word [es:si + 8], ax 2764 0000C91C 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 2765 0000C920 26800C80 <1> or byte [es:si + 0], 80h ; set bootable flag 2766 <1> 2767 0000C924 89EC <1> mov sp, bp 2768 0000C926 5D <1> pop bp ; restore bp (scan_partitions) 2769 0000C927 5B <1> pop bx ; discard ret address (scan_partitions) 2770 <1> 2771 <1> ; dx:ax = absolute sector number 2772 0000C928 8B1E[4A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 2773 0000C92C 50 <1> push ax 2774 0000C92D 52 <1> push dx 2775 0000C92E E84508 <1> call read_ae_512_bytes ; load partition boot sector 2776 <1> 2777 0000C931 26813EFE0155AA <1> cmp word [es:510], 0AA55h 2778 0000C938 7403E9220B <1> jne boot_sigmismatch 2779 <1> 2780 0000C93D 31C9 <1> xor cx, cx 2781 <1> ; cmp word [es:0], cx 2782 <1> ; je boot_codemismatch 2783 <1> 2784 0000C93F 5A <1> pop dx 2785 0000C940 58 <1> pop ax 2786 <1> 2787 <1> ; dx:ax = boot sector 2788 <1> ; byte [load_unit] = unit 2789 <1> ; es:0-> read sector 2790 <1> boot_dir_common: 2791 0000C941 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 2792 0000C945 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 2793 <1> 2794 0000C94A 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 2795 0000C94D 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 2796 0000C952 7403E91C0B <1> jne boot_secsizemismatch 2797 <1> 2798 <1> ; preserve some variables from our pseudo BPB 2799 0000C957 31C0 <1> xor ax, ax 2800 0000C959 FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 2801 0000C95C 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 2802 0000C961 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 2803 0000C964 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 2804 <1> 2805 0000C969 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 2806 0000C96C D1EB <1> shr bx, 1 2807 0000C96E 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 2808 <1> 2809 0000C971 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 2810 0000C976 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 2811 0000C979 7407 <1> je .is_fat32 2812 0000C97B 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 2813 0000C980 EB05 <1> jmp short .was_fat1612 2814 <1> .is_fat32: 2815 0000C982 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 2816 <1> .was_fat1612: 2817 <1> 2818 0000C987 06 <1> push es 2819 0000C988 1E <1> push ds 2820 0000C989 06 <1> push es 2821 0000C98A 1F <1> pop ds 2822 0000C98B 31F6 <1> xor si, si ; -> BPB from boot partition 2823 0000C98D 16 <1> push ss 2824 0000C98E 07 <1> pop es 2825 0000C98F BF[8057] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 2826 0000C992 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 2827 0000C995 F3A4 <1> rep movsb ; get the BPB 2828 <1> 2829 0000C997 1F <1> pop ds 2830 0000C998 800E[D800]80 <1> setopt [internalflags3], dif3_partition_changed 2831 <1> 2832 0000C99D 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 2833 0000C9A0 740B <1> je @F ; is FAT32 --> 2834 0000C9A2 BE[A457] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 2835 0000C9A5 BF[C057] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 2836 0000C9A8 B91A00 <1> mov cx, BPBN_size 2837 0000C9AB F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 2838 <1> ; to where the FAT32 BPBN lives 2839 <1> @@: 2840 0000C9AD 07 <1> pop es 2841 <1> 2842 0000C9AE FF36[4A0A] <1> push word [auxbuff_segorsel] 2843 0000C9B2 8F46F8 <1> pop word [bp + lsvFATSeg] 2844 0000C9B5 804EE702 <1> or byte [bp + ldFlags], ldfFATInvalid 2845 0000C9B9 B8FFFF <1> mov ax, -1 2846 0000C9BC 8946F4 <1> mov word [bp + lsvFATSector], ax 2847 0000C9BF 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 2848 <1> 2849 0000C9C2 E83911 <1> call initialise_fs 2850 <1> 2851 0000C9C5 C706[FE5A][D7CB] <1> mov word [handle_scan_dir_entry], scan_dir_entry 2852 <1> 2853 0000C9CB C606[B55A]00 <1> mov byte [load_check_dir_attr], 0 2854 0000C9D0 8B36[C45A] <1> mov si, word [load_kernelname_input] 2855 0000C9D4 803C2F <1> cmp byte [si], '/' 2856 0000C9D7 7501 <1> jne @F 2857 0000C9D9 46 <1> inc si 2858 <1> @@: 2859 0000C9DA 803C00 <1> cmp byte [si], 0 2860 0000C9DD 7503E99B00 <1> je .root 2861 0000C9E2 16 <1> push ss 2862 0000C9E3 07 <1> pop es 2863 0000C9E4 E84EF7 <1> call boot_parse_fn ; get next pathname 2864 0000C9E7 3C2F <1> cmp al, '/' 2865 0000C9E9 7509 <1> jne @F 2866 0000C9EB C606[B55A]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 2867 0000C9F0 8936[C65A] <1> mov word [load_kernelname_next], si 2868 <1> @@: 2869 0000C9F4 84C0 <1> test al, al 2870 0000C9F6 7506 <1> jnz @F 2871 0000C9F8 C706[FE5A][D4CB] <1> mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 2872 <1> @@: 2873 <1> 2874 0000C9FE BFFFFF <1> mov di, -1 2875 0000CA01 89FE <1> mov si, di 2876 0000CA03 897EF4 <1> mov [bp + lsvFATSector], di 2877 0000CA06 8976F6 <1> mov [bp + lsvFATSector + 2], si 2878 <1> 2879 0000CA09 31C0 <1> xor ax, ax 2880 0000CA0B 31D2 <1> xor dx, dx 2881 <1> 2882 0000CA0D 83EC20 <1> sub sp, 32 2883 <1> 2884 <1> .scan_dir_dirname_loop: 2885 0000CA10 8946EC <1> mov word [bp + ldDirCluster], ax 2886 0000CA13 8956EE <1> mov word [bp + ldDirCluster + 2], dx 2887 <1> 2888 0000CA16 16 <1> push ss 2889 0000CA17 07 <1> pop es 2890 0000CA18 89E3 <1> mov bx, sp 2891 0000CA1A E8EF01 <1> call scan_dir_aux_with_error 2892 <1> 2893 0000CA1D 803E[B55A]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 2894 0000CA22 7542 <1> jne .got_direntry 2895 <1> 2896 0000CA24 56 <1> push si 2897 0000CA25 57 <1> push di 2898 0000CA26 C606[B55A]00 <1> mov byte [load_check_dir_attr], 0 2899 0000CA2B 8B36[C65A] <1> mov si, word [load_kernelname_next] 2900 0000CA2F 803C00 <1> cmp byte [si], 0 2901 0000CA32 744F <1> je .sub 2902 <1> 2903 0000CA34 06 <1> push es 2904 0000CA35 16 <1> push ss 2905 0000CA36 07 <1> pop es 2906 0000CA37 E8FBF6 <1> call boot_parse_fn ; get next pathname 2907 0000CA3A 07 <1> pop es 2908 0000CA3B 3C2F <1> cmp al, '/' 2909 0000CA3D 7509 <1> jne @F 2910 0000CA3F C606[B55A]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 2911 0000CA44 8936[C65A] <1> mov word [load_kernelname_next], si 2912 <1> @@: 2913 0000CA48 84C0 <1> test al, al 2914 0000CA4A 7506 <1> jnz @F 2915 0000CA4C C706[FE5A][D4CB] <1> mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 2916 <1> @@: 2917 <1> 2918 0000CA52 5F <1> pop di 2919 0000CA53 5E <1> pop si 2920 <1> 2921 0000CA54 31D2 <1> xor dx, dx 2922 0000CA56 268B471A <1> mov ax, [es:bx + deClusterLow] 2923 <1> ; = first cluster (not FAT32) 2924 0000CA5A 807EE620 <1> cmp byte [bp + ldFATType], 32 2925 0000CA5E 7504 <1> jne @F 2926 0000CA60 268B5714 <1> mov dx, [es:bx + deClusterHigh] 2927 <1> ; dx:ax = first cluster (FAT32) 2928 <1> @@: 2929 <1> 2930 0000CA64 EBAA <1> jmp .scan_dir_dirname_loop 2931 <1> 2932 <1> .got_direntry: 2933 0000CA66 F606[D800]08 <1> testopt [internalflags3], dif3_load_dir_dir 2934 0000CA6B 7507 <1> jnz @F 2935 0000CA6D 26F6470B10 <1> test byte [es:bx + deAttrib], ATTR_DIRECTORY 2936 0000CA72 7511 <1> jnz @FF 2937 <1> @@: 2938 0000CA74 89DF <1> mov di, bx 2939 0000CA76 E83400 <1> call list_dir_entry 2940 0000CA79 83C420 <1> add sp, 32 2941 0000CA7C C3 <1> retn 2942 <1> 2943 <1> .root: 2944 0000CA7D 31C0 <1> xor ax, ax 2945 0000CA7F 31D2 <1> xor dx, dx 2946 0000CA81 EB15 <1> jmp .scan 2947 <1> 2948 <1> .sub: 2949 0000CA83 5F <1> pop di 2950 0000CA84 5E <1> pop si 2951 <1> 2952 <1> @@: 2953 0000CA85 83C420 <1> add sp, 32 2954 <1> 2955 0000CA88 31D2 <1> xor dx, dx 2956 0000CA8A 268B471A <1> mov ax, [es:bx + deClusterLow] 2957 <1> ; = first cluster (not FAT32) 2958 0000CA8E 807EE620 <1> cmp byte [bp + ldFATType], 32 2959 0000CA92 7504 <1> jne @F 2960 0000CA94 268B5714 <1> mov dx, [es:bx + deClusterHigh] 2961 <1> ; dx:ax = first cluster (FAT32) 2962 <1> @@: 2963 <1> .scan: 2964 0000CA98 8946EC <1> mov word [bp + ldDirCluster], ax 2965 0000CA9B 8956EE <1> mov word [bp + ldDirCluster + 2], dx 2966 <1> 2967 0000CA9E C706[FE5A][ADCA] <1> mov word [handle_scan_dir_entry], list_dir_entry 2968 0000CAA4 C706[005B][F504] <1> mov word [handle_scan_dir_not_found], dmycmd 2969 <1> 2970 0000CAAA E96501 <1> jmp scan_dir_aux 2971 <1> 2972 <1> 2973 <1> list_dir_entry: 2974 0000CAAD 26803D00 <1> cmp byte [es:di], 0 2975 0000CAB1 7503E91D01 <1> je .ret ; (NC, ZR) 2976 0000CAB6 26803DE5 <1> cmp byte [es:di], 0E5h 2977 0000CABA 7504 <1> jne @F 2978 0000CABC 80CB01 <1> or bl, 1 ; (NC, NZ) 2979 0000CABF C3 <1> retn 2980 <1> 2981 <1> @@: 2982 0000CAC0 268A5D0B <1> mov bl, byte [es:di + deAttrib] 2983 0000CAC4 F6C308 <1> test bl, ATTR_VOLLABEL 2984 0000CAC7 7403E90401 <1> jnz .ret_NC_NZ ; skip volume labels (and LFNs) --> (NZ) 2985 <1> 2986 0000CACC 26803D2E <1> cmp byte [es:di], '.' ; dot or dotdot entry ? 2987 0000CAD0 7503E9FB00 <1> je .ret_NC_NZ ; yes, skip --> 2988 <1> 2989 0000CAD5 50 <1> push ax 2990 0000CAD6 53 <1> push bx 2991 0000CAD7 51 <1> push cx 2992 0000CAD8 52 <1> push dx 2993 0000CAD9 56 <1> push si 2994 0000CADA 57 <1> push di 2995 0000CADB 06 <1> push es 2996 0000CADC 1E <1> push ds 2997 0000CADD 06 <1> push es 2998 0000CADE 1F <1> pop ds 2999 0000CADF 89FE <1> mov si, di 3000 <1> 3001 0000CAE1 16 <1> push ss 3002 0000CAE2 07 <1> pop es 3003 0000CAE3 BF[B40A] <1> mov di, line_out 3004 0000CAE6 B90800 <1> mov cx, 8 3005 0000CAE9 F3A4 <1> rep movsb 3006 0000CAEB B82020 <1> mov ax, 2020h 3007 0000CAEE AA <1> stosb 3008 0000CAEF B103 <1> mov cl, 3 3009 0000CAF1 F3A4 <1> rep movsb 3010 0000CAF3 AB <1> stosw 3011 <1> 3012 0000CAF4 1F <1> pop ds 3013 0000CAF5 B02D <1> mov al, '-' 3014 0000CAF7 F6C320 <1> test bl, ATTR_ARCHIVE 3015 0000CAFA 7402 <1> jz @F 3016 0000CAFC B041 <1> mov al, 'A' 3017 <1> @@: 3018 0000CAFE AA <1> stosb 3019 0000CAFF B02D <1> mov al, '-' 3020 0000CB01 F6C302 <1> test bl, ATTR_HIDDEN 3021 0000CB04 7402 <1> jz @F 3022 0000CB06 B048 <1> mov al, 'H' 3023 <1> @@: 3024 0000CB08 AA <1> stosb 3025 0000CB09 B02D <1> mov al, '-' 3026 0000CB0B F6C301 <1> test bl, ATTR_READONLY 3027 0000CB0E 7402 <1> jz @F 3028 0000CB10 B052 <1> mov al, 'R' 3029 <1> @@: 3030 0000CB12 AA <1> stosb 3031 0000CB13 B02D <1> mov al, '-' 3032 0000CB15 F6C304 <1> test bl, ATTR_SYSTEM 3033 0000CB18 7402 <1> jz @F 3034 0000CB1A B053 <1> mov al, 'S' 3035 <1> @@: 3036 0000CB1C AA <1> stosb 3037 0000CB1D B82020 <1> mov ax, 2020h 3038 0000CB20 AB <1> stosw 3039 <1> 3040 0000CB21 F6C310 <1> test bl, ATTR_DIRECTORY 3041 0000CB24 7408 <1> jz @F 3042 0000CB26 BE[D618] <1> mov si, msg.dirinsteadsize 3043 0000CB29 E8726D <1> call copy_single_counted_string 3044 0000CB2C EB2D <1> jmp @FF 3045 <1> 3046 <1> @@: 3047 0000CB2E 07 <1> pop es 3048 0000CB2F 5E <1> pop si 3049 0000CB30 56 <1> push si 3050 0000CB31 06 <1> push es 3051 0000CB32 268A440C <1> mov al, byte [es:si + dePlusSize] 3052 0000CB36 88C4 <1> mov ah, al 3053 0000CB38 2507E0 <1> and ax, 0E007h 3054 0000CB3B 88E2 <1> mov dl, ah 3055 0000CB3D B400 <1> mov ah, 0 3056 0000CB3F B600 <1> mov dh, 0 3057 0000CB41 D1EA <1> shr dx, 1 3058 0000CB43 D1EA <1> shr dx, 1 3059 0000CB45 09D0 <1> or ax, dx 3060 0000CB47 50 <1> push ax 3061 0000CB48 268B541E <1> mov dx, word [es:si + deSize + 2] 3062 0000CB4C 268B441C <1> mov ax, word [es:si + deSize] 3063 0000CB50 5E <1> pop si 3064 0000CB51 16 <1> push ss 3065 0000CB52 07 <1> pop es 3066 0000CB53 31C9 <1> xor cx, cx 3067 0000CB55 BB0800 <1> mov bx, 4+4 3068 0000CB58 E86D54 <1> call disp_dxax_times_cx_width_bx_size.store 3069 <1> 3070 <1> @@: 3071 0000CB5B B82020 <1> mov ax, 2020h 3072 0000CB5E AB <1> stosw 3073 0000CB5F 07 <1> pop es 3074 0000CB60 5E <1> pop si 3075 0000CB61 56 <1> push si 3076 0000CB62 06 <1> push es 3077 0000CB63 268B5C18 <1> mov bx, word [es:si + deDate] 3078 0000CB67 268B7416 <1> mov si, word [es:si + deTime] 3079 0000CB6B 16 <1> push ss 3080 0000CB6C 07 <1> pop es 3081 0000CB6D 89D8 <1> mov ax, bx 3082 0000CB6F B90900 <1> mov cx, 9 3083 0000CB72 D3E8 <1> shr ax, cl 3084 0000CB74 05BC07 <1> add ax, 1980 3085 0000CB77 31D2 <1> xor dx, dx 3086 0000CB79 B104 <1> mov cl, 4 3087 0000CB7B E8A4CE <1> call dec_dword_minwidth 3088 0000CB7E B02D <1> mov al, '-' 3089 0000CB80 AA <1> stosb 3090 0000CB81 89D8 <1> mov ax, bx 3091 0000CB83 B105 <1> mov cl, 5 3092 0000CB85 D3E8 <1> shr ax, cl 3093 0000CB87 83E00F <1> and ax, 15 3094 0000CB8A B102 <1> mov cl, 2 3095 0000CB8C E893CE <1> call dec_dword_minwidth 3096 0000CB8F B02D <1> mov al, '-' 3097 0000CB91 AA <1> stosb 3098 0000CB92 89D8 <1> mov ax, bx 3099 0000CB94 83E01F <1> and ax, 31 3100 0000CB97 E888CE <1> call dec_dword_minwidth 3101 0000CB9A B020 <1> mov al, 32 3102 0000CB9C AA <1> stosb 3103 0000CB9D 89F0 <1> mov ax, si 3104 0000CB9F B10B <1> mov cl, 11 3105 0000CBA1 D3E8 <1> shr ax, cl 3106 0000CBA3 B102 <1> mov cl, 2 3107 0000CBA5 E87ACE <1> call dec_dword_minwidth 3108 0000CBA8 B03A <1> mov al, ':' 3109 0000CBAA AA <1> stosb 3110 0000CBAB 89F0 <1> mov ax, si 3111 0000CBAD B105 <1> mov cl, 5 3112 0000CBAF D3E8 <1> shr ax, cl 3113 0000CBB1 83E03F <1> and ax, 63 3114 0000CBB4 B102 <1> mov cl, 2 3115 0000CBB6 E869CE <1> call dec_dword_minwidth 3116 0000CBB9 B03A <1> mov al, ':' 3117 0000CBBB AA <1> stosb 3118 0000CBBC 89F0 <1> mov ax, si 3119 0000CBBE 83E01F <1> and ax, 31 3120 0000CBC1 D1E0 <1> shl ax, 1 3121 0000CBC3 E85CCE <1> call dec_dword_minwidth 3122 <1> 3123 0000CBC6 E8FACE <1> call putsline_crlf 3124 <1> 3125 0000CBC9 07 <1> pop es 3126 0000CBCA 5F <1> pop di 3127 0000CBCB 5E <1> pop si 3128 0000CBCC 5A <1> pop dx 3129 0000CBCD 59 <1> pop cx 3130 0000CBCE 5B <1> pop bx 3131 0000CBCF 58 <1> pop ax 3132 <1> 3133 <1> .ret_NC_NZ: 3134 0000CBD0 80CB01 <1> or bl, 1 ; (NC, NZ) 3135 <1> .ret: 3136 0000CBD3 C3 <1> retn 3137 <1> 3138 <1> 3139 <1> usesection lDEBUG_DATA_ENTRY 3140 <1> 3141 <1> align 2, db 0 3142 <1> handle_scan_dir_entry: 3143 00005AFE [5D82] <1> dw error 3144 <1> handle_scan_dir_not_found: 3145 00005B00 [5D82] <1> dw error 3146 <1> 3147 <1> 3148 <1> usesection lDEBUG_CODE 3149 <1> 3150 <1> scan_dir_entry_dir_or_file: 3151 0000CBD4 B701 <1> mov bh, 1 3152 0000CBD6 A9 <1> db __TEST_IMM16 ; (skip mov) 3153 <1> 3154 <1> scan_dir_entry: 3155 0000CBD7 B700 <1> mov bh, 0 3156 0000CBD9 26803D00 <1> cmp byte [es:di], 0 3157 0000CBDD F9 <1> stc 3158 0000CBDE 7425 <1> je .ret 3159 0000CBE0 268A5D0B <1> mov bl, byte [es:di + deAttrib] 3160 0000CBE4 F6C308 <1> test bl, ATTR_VOLLABEL 3161 0000CBE7 751B <1> jnz @F ; skip volume labels (and LFNs) --> (NZ) 3162 0000CBE9 84FF <1> test bh, bh 3163 0000CBEB 7509 <1> jnz .no_check_dir 3164 0000CBED 80E310 <1> and bl, ATTR_DIRECTORY ; isolate directory bit 3165 0000CBF0 3A1E[B55A] <1> cmp bl, byte [load_check_dir_attr] ; is it what we're searching? 3166 0000CBF4 750E <1> jne @F ; no --> 3167 <1> .no_check_dir: 3168 0000CBF6 56 <1> push si 3169 0000CBF7 57 <1> push di 3170 0000CBF8 51 <1> push cx 3171 0000CBF9 BE[B85A] <1> mov si, load_kernel_name ; ds:si-> name to match 3172 0000CBFC B90B00 <1> mov cx, 11 ; length of padded 8.3 FAT filename 3173 0000CBFF F3A6 <1> repe cmpsb ; check entry 3174 0000CC01 59 <1> pop cx 3175 0000CC02 5F <1> pop di 3176 0000CC03 5E <1> pop si 3177 <1> @@: 3178 0000CC04 F8 <1> clc 3179 <1> .ret: 3180 0000CC05 C3 <1> retn 3181 <1> 3182 <1> 3183 <1> ; INP: es:bx -> where to place directory entry 3184 <1> ; si:di = loaded FAT sector (0 = first FAT sector) 3185 <1> ; dword [bp + ldDirCluster] = directory cluster to scan, 3186 <1> ; 0 for root dir 3187 <1> ; byte [bp + ldFATType] = size of FAT entry in bits 3188 <1> ; OUT: es:bx -> directory entry (es:bx unchanged) 3189 <1> ; si:di = loaded FAT sector 3190 <1> ; CHG: dx, ax, si, di, cx 3191 <1> scan_dir_aux_for_file: 3192 0000CC06 C706[FE5A][D7CB] <1> mov word [handle_scan_dir_entry], scan_dir_entry 3193 <1> 3194 <1> scan_dir_aux_with_error: 3195 0000CC0C C706[005B][68CC] <1> mov word [handle_scan_dir_not_found], error_filenotfound 3196 <1> 3197 <1> scan_dir_aux: 3198 0000CC12 FF36[4A0A] <1> push word [auxbuff_segorsel] 3199 0000CC16 8F06[D05A] <1> pop word [load_adr_dirbuf_segment] 3200 <1> 3201 <1> scan_dir: 3202 0000CC1A 8B46EC <1> mov ax, word [bp + ldDirCluster] 3203 0000CC1D 8B56EE <1> mov dx, word [bp + ldDirCluster + 2] 3204 <1> 3205 0000CC20 85C0 <1> test ax, ax 3206 0000CC22 7576 <1> jnz fat32_scan_root.dir_clust_dxax 3207 0000CC24 85D2 <1> test dx, dx 3208 0000CC26 7572 <1> jnz fat32_scan_root.dir_clust_dxax 3209 <1> 3210 <1> ; got to scan root directory. use FAT12/FAT16 walker if so, 3211 <1> ; else use FAT32 walker 3212 <1> 3213 0000CC28 807EE610 <1> cmp byte [bp + ldFATType], 16 3214 0000CC2C 7766 <1> ja fat32_scan_root 3215 <1> 3216 0000CC2E 56 <1> push si 3217 0000CC2F 57 <1> push di 3218 0000CC30 06 <1> push es 3219 0000CC31 53 <1> push bx 3220 <1> 3221 0000CC32 8B7611 <1> mov si, word [bp + bsBPB + bpbNumRootDirEnts] 3222 <1> 3223 <1> 3224 <1> ; (boot.asm code starts here) 3225 <1> 3226 <1> fat16_scan_root: 3227 0000CC35 85F6 <1> test si, si 3228 0000CC37 7424 <1> jz handle_filenotfound_fat16 3229 <1> 3230 0000CC39 8B46D0 <1> mov ax, [bp + ldRootSector] 3231 0000CC3C 8B56D2 <1> mov dx, [bp + ldRootSector + 2] 3232 <1> 3233 <1> ; Scan root directory for file. We don't bother to check for deleted 3234 <1> ; entries (E5h) or entries that mark the end of the directory (00h). 3235 <1> ; number of root entries in si here 3236 <1> fat16_next_sect: 3237 0000CC3F 8B1E[D05A] <1> mov bx, [load_adr_dirbuf_segment] 3238 0000CC43 E84205 <1> call read_sector 3239 <1> 3240 0000CC46 8B4ED4 <1> mov cx, [bp + ldEntriesPerSector] ; entries per sector as loop counter 3241 0000CC49 31FF <1> xor di, di ; es:di-> first entry in this sector 3242 <1> fat16_next_ent: 3243 0000CC4B FF16[FE5A] <1> call near word [handle_scan_dir_entry] 3244 0000CC4F 720C <1> jc handle_filenotfound_fat16 3245 0000CC51 8D7D20 <1> lea di, [di + DIRENTRY_size] ; bytes/dirent 3246 0000CC54 7428 <1> je fat16_found_it ; found entry --> 3247 <1> 3248 0000CC56 4E <1> dec si ; count down entire root's entries 3249 0000CC57 E0F2 <1> loopnz fat16_next_ent ; count down sector's entries (jumps iff si >0 && cx >0) 3250 0000CC59 85F6 <1> test si, si ; work around qemu bug 3251 0000CC5B 75E2 <1> jnz fat16_next_sect ; (jumps iff si >0 && cx ==0) 3252 <1> ; ends up here iff si ==0 3253 <1> ; ie all root entries checked unsuccessfully 3254 <1> %if 0 3255 <1> 3256 <1> qemu prior to 2020-08 has a bug which affects the above 3257 <1> conditionals. The bug is that if NZ is set (like when the 3258 <1> branch to fat16_found_it is not taken) and then another 3259 <1> instruction sets ZR (like the dec si at the end of the root 3260 <1> directory) and then loopnz is used which sets cx to zero 3261 <1> then after the loopnz FL will be NZ leading to the jnz branch 3262 <1> to be taken. Eventually the entire load unit is traversed and 3263 <1> qemu returns error 01h when trying to read past the end of 3264 <1> the unit (at least for 1440 KiB diskettes). 3265 <1> 3266 <1> The bug is now worked around by the comparison with zero at 3267 <1> the fat16_next_ent label. The test si, si serves as another 3268 <1> workaround to forcibly set the flag correctly after loopnz. 3269 <1> It is only really needed when the entire root is filled with 3270 <1> non-zero directory entries and an older qemu is used. 3271 <1> 3272 <1> Reference: https://bugs.launchpad.net/qemu/+bug/1888165 3273 <1> 3274 <1> %endif 3275 <1> 3276 <1> handle_filenotfound_fat16: 3277 0000CC5D 5B <1> pop bx 3278 0000CC5E 07 <1> pop es 3279 0000CC5F 5F <1> pop di 3280 0000CC60 5E <1> pop si 3281 <1> 3282 0000CC61 A9 <1> db __TEST_IMM16 ; (skip pop and pop) 3283 <1> handle_filenotfound_fat32: 3284 0000CC62 5B <1> pop bx 3285 0000CC63 07 <1> pop es 3286 <1> 3287 <1> handle_filenotfound: 3288 0000CC64 FF26[005B] <1> jmp near word [handle_scan_dir_not_found] 3289 <1> 3290 <1> error_filenotfound: 3291 <1> %if _INPUT_FILE_BOOT 3292 0000CC68 F606[DB00]08 <1> testopt [internalflags3], dif3_in_if 3293 0000CC6D 7403E9AB9F <1> jnz if_exists_not_found 3294 <1> %endif 3295 0000CC72 BA[7C17] <1> mov dx, msg.boot_file_not_found 3296 0000CC75 B81E02 <1> mov ax, 021Eh 3297 0000CC78 E82EB6 <1> call setrc 3298 0000CC7B E991EF <1> jmp bootcmd.fail 3299 <1> 3300 <1> fat16_found_it: 3301 0000CC7E 5B <1> pop bx 3302 0000CC7F 58 <1> pop ax 3303 0000CC80 B92000 <1> mov cx, 32 3304 0000CC83 29CF <1> sub di, cx 3305 0000CC85 1E <1> push ds 3306 0000CC86 06 <1> push es 3307 0000CC87 1F <1> pop ds 3308 0000CC88 89FE <1> mov si, di ; ds:si -> entry in directory buffer 3309 0000CC8A 89DF <1> mov di, bx 3310 0000CC8C 8EC0 <1> mov es, ax ; es:di -> destination for entry 3311 0000CC8E F3A4 <1> rep movsb 3312 0000CC90 1F <1> pop ds 3313 0000CC91 5F <1> pop di 3314 0000CC92 5E <1> pop si 3315 0000CC93 C3 <1> retn 3316 <1> 3317 <1> 3318 <1> ; (boot32.asm code starts here) 3319 <1> 3320 <1> fat32_scan_root: 3321 0000CC94 8B462C <1> mov ax, [bp + bsBPB + ebpbRootCluster] 3322 0000CC97 8B562E <1> mov dx, [bp + bsBPB + ebpbRootCluster + 2] 3323 <1> 3324 <1> .dir_clust_dxax: 3325 0000CC9A 06 <1> push es 3326 0000CC9B 53 <1> push bx 3327 <1> 3328 0000CC9C E83501 <1> call check_clust 3329 0000CC9F 72C1 <1> jc handle_filenotfound_fat32 3330 <1> 3331 <1> fat32_next_root_clust: 3332 0000CCA1 E84F00 <1> call clust_to_first_sector 3333 0000CCA4 51 <1> push cx 3334 0000CCA5 53 <1> push bx 3335 0000CCA6 8B4EE8 <1> mov cx, [bp + ldClusterSize] 3336 <1> fat32_next_root_sect: 3337 0000CCA9 51 <1> push cx 3338 0000CCAA 8B4ED4 <1> mov cx, [bp + ldEntriesPerSector] 3339 <1> 3340 <1> ; Scan root directory for file. We don't bother to check for deleted 3341 <1> ; entries (E5h) or entries that mark the end of the directory (00h). 3342 0000CCAD 8B1E[D05A] <1> mov bx, [load_adr_dirbuf_segment] 3343 0000CCB1 E8D404 <1> call read_sector 3344 <1> 3345 0000CCB4 57 <1> push di 3346 0000CCB5 31FF <1> xor di, di ; es:di-> first entry in this sector 3347 <1> fat32_next_ent: 3348 0000CCB7 FF16[FE5A] <1> call near word [handle_scan_dir_entry] 3349 0000CCBB 7214 <1> jc handle_filenotfound_fat32_pop 3350 0000CCBD 8D7D20 <1> lea di, [di + DIRENTRY_size] ; bytes/dirent 3351 0000CCC0 7415 <1> je fat32_found_it ; found entry --> 3352 <1> 3353 0000CCC2 E2F3 <1> loop fat32_next_ent ; count down sector's entries (jumps iff cx >0) 3354 0000CCC4 5F <1> pop di 3355 0000CCC5 59 <1> pop cx 3356 0000CCC6 E2E1 <1> loop fat32_next_root_sect 3357 0000CCC8 5B <1> pop bx 3358 0000CCC9 59 <1> pop cx 3359 0000CCCA E84F00 <1> call clust_next 3360 0000CCCD 73D2 <1> jnc fat32_next_root_clust 3361 0000CCCF EB04 <1> jmp @F 3362 <1> 3363 <1> handle_filenotfound_fat32_pop: 3364 0000CCD1 5F <1> pop di 3365 0000CCD2 59 <1> pop cx 3366 0000CCD3 5B <1> pop bx 3367 0000CCD4 59 <1> pop cx 3368 <1> @@: 3369 0000CCD5 EB8B <1> jmp handle_filenotfound_fat32 3370 <1> 3371 <1> 3372 <1> fat32_found_it: 3373 0000CCD7 5A <1> pop dx ; value for di 3374 0000CCD8 83C406 <1> add sp, 6 ; discard sector-in-cluster counter and cluster 3375 0000CCDB 5B <1> pop bx 3376 0000CCDC 58 <1> pop ax 3377 0000CCDD B92000 <1> mov cx, 32 3378 0000CCE0 29CF <1> sub di, cx 3379 0000CCE2 1E <1> push ds 3380 0000CCE3 06 <1> push es 3381 0000CCE4 1F <1> pop ds 3382 0000CCE5 56 <1> push si 3383 0000CCE6 89FE <1> mov si, di ; ds:si -> entry in directory buffer 3384 0000CCE8 89DF <1> mov di, bx 3385 0000CCEA 8EC0 <1> mov es, ax ; es:di -> destination for entry 3386 0000CCEC F3A4 <1> rep movsb 3387 0000CCEE 5E <1> pop si 3388 0000CCEF 1F <1> pop ds 3389 0000CCF0 89D7 <1> mov di, dx ; restore si:di = loaded FAT sector 3390 0000CCF2 C3 <1> retn 3391 <1> 3392 <1> 3393 <1> ; (iniload.asm code continues here) 3394 <1> 3395 <1> ; INP: dx:ax = cluster - 2 (0-based cluster) 3396 <1> ; OUT: cx:bx = input dx:ax 3397 <1> ; dx:ax = first sector of that cluster 3398 <1> ; CHG: - 3399 <1> clust_to_first_sector: 3400 0000CCF3 52 <1> push dx 3401 0000CCF4 50 <1> push ax 3402 0000CCF5 52 <1> push dx 3403 0000CCF6 F726[6857] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 3404 0000CCFA 93 <1> xchg bx, ax 3405 0000CCFB 87CA <1> xchg cx, dx 3406 0000CCFD 58 <1> pop ax 3407 0000CCFE F726[6857] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 3408 0000CD02 85D2 <1> test dx, dx 3409 0000CD04 7513 <1> jnz .error_badchain 3410 0000CD06 92 <1> xchg dx, ax 3411 0000CD07 01CA <1> add dx, cx 3412 0000CD09 720E <1> jc .error_badchain 3413 0000CD0B 93 <1> xchg ax, bx 3414 <1> 3415 0000CD0C 0306[7C57] <1> add ax, [load_data - LOADDATA2 + lsvDataStart] 3416 0000CD10 1316[7E57] <1> adc dx, [load_data - LOADDATA2 + lsvDataStart + 2] 3417 0000CD14 7203 <1> jc .error_badchain 3418 <1> ; dx:ax = first sector in cluster 3419 0000CD16 5B <1> pop bx 3420 0000CD17 59 <1> pop cx ; cx:bx = cluster 3421 0000CD18 C3 <1> retn 3422 <1> 3423 <1> .error_badchain: 3424 0000CD19 E91F0E <1> jmp error_badchain 3425 <1> 3426 <1> 3427 <1> ; INP: cx:bx = cluster (0-based) 3428 <1> ; si:di = loaded FAT sector, -1 if none 3429 <1> ; OUT: CY if no next cluster 3430 <1> ; NC if next cluster found, 3431 <1> ; dx:ax = next cluster value (0-based) 3432 <1> ; si:di = loaded FAT sector 3433 <1> ; CHG: cx, bx 3434 <1> clust_next: 3435 0000CD1C 89D8 <1> mov ax, bx 3436 0000CD1E 89CA <1> mov dx, cx 3437 <1> .dxax: 3438 0000CD20 83C002 <1> add ax, 2 3439 0000CD23 83D200 <1> adc dx, 0 3440 <1> 3441 0000CD26 06 <1> push es 3442 0000CD27 803E[6657]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 3443 0000CD2C 7452 <1> je .fat16 3444 0000CD2E 774C <1> ja .fat32 3445 <1> 3446 <1> .fat12: 3447 <1> ; FAT12 entries are 12 bits, bytes are 8 bits. Ratio is 3 / 2, 3448 <1> ; so multiply cluster number by 3 first, then divide by 2. 3449 <1> ; ax = cluster number (up to 12 bits set) 3450 0000CD30 89C2 <1> mov dx, ax 3451 0000CD32 D1E0 <1> shl ax, 1 ; = 2n (up to 13 bits set) 3452 0000CD34 01D0 <1> add ax, dx ; = 2n+n = 3n (up to 14 bits set) 3453 0000CD36 D1E8 <1> shr ax, 1 ; ax = byte offset into FAT (0..6129) 3454 <1> ; CF = whether to use high 12 bits 3455 0000CD38 19C9 <1> sbb cx, cx ; = -1 iff CY, else 0 3456 <1> 3457 <1> ; Use the calculated byte offset as an offset into the FAT 3458 <1> ; buffer, which holds all of the FAT's relevant data. 3459 0000CD3A 8E06[7857] <1> mov es, [load_data - LOADDATA2 + lsvFATSeg] 3460 0000CD3E 89C3 <1> mov bx, ax ; -> 16-bit word in FAT to load 3461 <1> 3462 0000CD40 F606[6757]02 <1> test byte [load_ldflags], ldfFATInvalid 3463 0000CD45 7426 <1> jz .fat12_have_fat ; already have it --> 3464 0000CD47 51 <1> push cx 3465 0000CD48 31D2 <1> xor dx, dx 3466 0000CD4A F736[8B57] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3467 <1> ; dx = remainder, byte offset 3468 <1> ; ax = sector to read 3469 0000CD4E 52 <1> push dx 3470 0000CD4F 31D2 <1> xor dx, dx 3471 0000CD51 0306[8E57] <1> add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 3472 0000CD55 11D2 <1> adc dx, dx 3473 0000CD57 8B1E[7857] <1> mov bx, [load_data - LOADDATA2 + lsvFATSeg] 3474 0000CD5B E82A04 <1> call read_sector 3475 0000CD5E 59 <1> pop cx 3476 0000CD5F 3B0E[8B57] <1> cmp cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3477 0000CD63 7505 <1> jne .fat12_have_fat_cx 3478 0000CD65 06 <1> push es 3479 0000CD66 E81F04 <1> call read_sector ; read second sector for straddling entry 3480 0000CD69 07 <1> pop es 3481 <1> 3482 <1> .fat12_have_fat_cx: 3483 0000CD6A 89CB <1> mov bx, cx 3484 0000CD6C 59 <1> pop cx 3485 <1> 3486 <1> .fat12_have_fat: 3487 <1> 3488 <1> ; get 16 bits from FAT 3489 0000CD6D 268B07 <1> mov ax, [es:bx] 3490 <1> 3491 0000CD70 80E104 <1> and cl, 4 ; = 4 iff CY after shift, else 0 3492 0000CD73 D3E8 <1> shr ax, cl ; shift down iff odd entry, else unchanged 3493 0000CD75 25FF0F <1> and ax, 0FFFh ; insure it's only 12 bits 3494 0000CD78 31D2 <1> xor dx, dx 3495 0000CD7A EB57 <1> jmp short .gotvalue 3496 <1> 3497 <1> .fat32: 3498 <1> ; * 4 = byte offset into FAT (0--4000_0000h) 3499 0000CD7C 01C0 <1> add ax, ax 3500 0000CD7E 11D2 <1> adc dx, dx 3501 <1> .fat16: 3502 <1> ; * 2 = byte offset into FAT (0--2_0000h) 3503 0000CD80 01C0 <1> add ax, ax 3504 0000CD82 11D2 <1> adc dx, dx 3505 <1> 3506 0000CD84 50 <1> push ax 3507 0000CD85 92 <1> xchg ax, dx 3508 0000CD86 31D2 <1> xor dx, dx ; dx:ax = high word 3509 0000CD88 F736[8B57] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3510 0000CD8C 89C3 <1> mov bx, ax 3511 0000CD8E 58 <1> pop ax ; dx = remainder, ax = low word 3512 0000CD8F F736[8B57] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3513 0000CD93 87D3 <1> xchg dx, bx ; dx:ax = result, bx = remainder 3514 <1> ; dx:ax = sector offset into FAT (0--200_0000h) 3515 <1> ; bx = byte offset into FAT sector (0--8190) 3516 0000CD95 F606[6757]02 <1> test byte [load_ldflags], ldfFATInvalid 3517 0000CD9A 7513 <1> jnz .read_no_store ; always read --> 3518 <1> 3519 0000CD9C 39F2 <1> cmp dx, si 3520 0000CD9E 7504 <1> jne @F ; read sector 3521 0000CDA0 39F8 <1> cmp ax, di 3522 0000CDA2 741B <1> je @FF ; sector is already buffered 3523 <1> @@: 3524 0000CDA4 89D6 <1> mov si, dx 3525 0000CDA6 89C7 <1> mov di, ax 3526 0000CDA8 8916[7657] <1> mov word [load_data - LOADDATA2 + lsvFATSector + 2], dx 3527 0000CDAC A3[7457] <1> mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 3528 <1> 3529 <1> .read_no_store: 3530 0000CDAF 53 <1> push bx 3531 0000CDB0 0306[8E57] <1> add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 3532 0000CDB4 83D200 <1> adc dx, 0 3533 0000CDB7 8B1E[7857] <1> mov bx, [load_data - LOADDATA2 + lsvFATSeg] 3534 0000CDBB E8CA03 <1> call read_sector 3535 0000CDBE 5B <1> pop bx 3536 <1> @@: 3537 0000CDBF 8E06[7857] <1> mov es, [load_data - LOADDATA2 + lsvFATSeg] 3538 0000CDC3 31D2 <1> xor dx, dx 3539 0000CDC5 268B07 <1> mov ax, [es:bx] 3540 <1> 3541 0000CDC8 803E[6657]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 3542 0000CDCD 7404 <1> je @F 3543 0000CDCF 268B5702 <1> mov dx, [es:bx + 2] 3544 <1> @@: 3545 <1> .gotvalue: 3546 0000CDD3 07 <1> pop es 3547 <1> 3548 <1> ; INP: dx:ax = cluster value, 2-based 3549 <1> ; OUT: dx:ax -= 2 (makes it 0-based) 3550 <1> ; CY iff invalid cluster 3551 <1> check_clust: 3552 0000CDD4 80E60F <1> and dh, 0Fh 3553 0000CDD7 83E802 <1> sub ax, 2 3554 0000CDDA 83DA00 <1> sbb dx, 0 3555 <1> 3556 0000CDDD 803E[6657]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 3557 0000CDE2 7707 <1> ja .fat32 3558 0000CDE4 740B <1> je .fat16 3559 <1> 3560 <1> .fat12: 3561 0000CDE6 3DF50F <1> cmp ax, 0FF7h - 2 3562 0000CDE9 EB09 <1> jmp short .common 3563 <1> 3564 <1> .fat32: 3565 0000CDEB 81FAFF0F <1> cmp dx, 0FFFh 3566 0000CDEF 7203 <1> jb @F ; CY here means valid ...- 3567 <1> 3568 <1> .fat16: 3569 0000CDF1 83F8F5 <1> cmp ax, 0FFF7h - 2 3570 <1> @@: ; -... or if NC first, CY here also 3571 <1> .common: 3572 0000CDF4 F5 <1> cmc ; NC if valid 3573 0000CDF5 720E <1> jc .ret 3574 0000CDF7 3B16[4257] <1> cmp dx, word [load_data - LOADDATA2 + ldMaxCluster + 2] 3575 0000CDFB 7504 <1> jne @F 3576 0000CDFD 3B06[4057] <1> cmp ax, word [load_data - LOADDATA2 + ldMaxCluster] 3577 <1> @@: 3578 0000CE01 7701 <1> ja .ret_CY 3579 0000CE03 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 3580 <1> .ret_CY: 3581 0000CE04 F9 <1> stc 3582 <1> .ret: 3583 0000CE05 C3 <1> retn 3584 <1> 3585 <1> 3586 <1> partition_table equ load_partition_table 3587 <1> partition_table.end equ load_partition_table.end 3588 <1> %define _SCANPTAB_PREFIX 3589 <1> %define _SCANPTAB_DEBUG4_PREFIX 3590 <1> %assign _PARTITION_TABLE_IN_CS 0 3591 <1> %define _BASE bp 3592 <1> %include "scanptab.asm" 1 <2> 2 <2> %if 0 3 <2> 4 <2> scanptab - Scan partition table 5 <2> 2019 by 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> ; _SCANPTAB_PREFIX = prefix for our variables and functions 16 <2> ; _SCANPTAB_DEBUG4_PREFIX = prefix for d4 function calls 17 <2> numdef PARTITION_TABLE_IN_CS, 1 18 <2> numdef BOOTCMD_FAIL_ERROR, 1 19 <2> gendef BASE, ss:bx 20 <2> %ifidn _BASE, ss:bx 21 <2> %elifidn _BASE, bp 22 <2> %else 23 <2> %error Invalid base 24 <2> %endif 25 <2> 26 <2> 27 <2> ; INP: byte [%load_unit] = unit to scan 28 <2> ; cx = function to call for each partition 29 <2> ; OUT: function called for each partition 30 <2> ; CHG: di, si, ax, bx, (cx), dx, es 31 <2> ; STT: ds => data segment (used for %load_* variables, unless bp-based) 32 <2> ; 33 <2> ; Note: Calls %read_partition_table (in this module), 34 <2> ; which calls %read_ae_512_bytes, which calls 35 <2> ; read_sector. The read_sector base must be 36 <2> ; zero and the geometry must be initialised. 37 <2> 38 <2> ; Function in cx is called with: 39 <2> ; INP: es:si -> partition table entry, 40 <2> ; si = %partition_table .. %partition_table+48, 41 <2> ; es = ss (if not _PARTITION_TABLE_IN_CS) 42 <2> ; es = cs (if _PARTITION_TABLE_IN_CS) 43 <2> ; byte [%load_current_partition] = partition number, 44 <2> ; 0 for diskette (unpartitioned), 45 <2> ; 1 to 4 for primary partitions, 46 <2> ; 5+ for logical partitions 47 <2> ; _BASE + di -> above part table metadata, 48 <2> ; dword [_BASE + di - 4] = root (outermost extended position) 49 <2> ; dword [_BASE + di - 8] = base (current table position) 50 <2> ; dword [es:si + piStart] = local partition start 51 <2> ; base + local start = absolute partition start 52 <2> ; _BASE -> bp value (dummy if _BASE is not bp), 53 <2> ; near return address of scan_partitions 54 <2> ; CHG: ax, (cx), dx, bx (unless part of _BASE) 55 <2> ; STT: ds => data segment (used for load_* variables, unless bp-based) 56 <2> ; Note: preserves (cx), si, di, ds, es, (bp), _BASE 57 <2> ; 58 <2> ; Note: If the function returns to scan_partitions, 59 <2> ; cx must be left as the function to call for 60 <2> ; subsequent partitions afterwards. 61 <2> ; Note: May load sp from _BASE then pop bp then return 62 <2> ; near if the scan should stop after the call. 63 <2> %[_SCANPTAB_PREFIX]scan_partitions: 64 0000CE06 8326[AC5A]00 <2> and word [ %[_SCANPTAB_PREFIX]load_partition_cycle], 0 65 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 66 <2> d4 asciz "In scan_partitions",13,10 67 <2> 68 0000CE0B 55 <2> push bp 69 <2> %ifidn _BASE, ss:bx 70 <2> mov bx, sp 71 <2> %elifidn _BASE, bp 72 0000CE0C 89E5 <2> mov bp, sp 73 <2> %endif 74 0000CE0E 31FF <2> xor di, di 75 0000CE10 57 <2> push di ; [_BASE+di-2] 76 0000CE11 57 <2> push di ; [_BASE+di-4] 77 0000CE12 57 <2> push di ; [_BASE+di-6] 78 0000CE13 57 <2> push di ; [_BASE+di-8] 79 <2> 80 0000CE14 803E[C057]80 <2> cmp byte [ %[_SCANPTAB_PREFIX]load_unit], 80h 81 0000CE19 7325 <2> jae @F 82 <2> 83 0000CE1B 57 <2> push di 84 0000CE1C 51 <2> push cx 85 <2> %if _PARTITION_TABLE_IN_CS 86 <2> push cs 87 <2> %else 88 0000CE1D 16 <2> push ss 89 <2> %endif 90 0000CE1E 07 <2> pop es 91 0000CE1F BF[8056] <2> mov di, %[_SCANPTAB_PREFIX]partition_table 92 0000CE22 31C0 <2> xor ax, ax 93 0000CE24 B92000 <2> mov cx, (4 * 16) >> 1 94 0000CE27 F3AB <2> rep stosw ; initialise fake partition table 95 0000CE29 59 <2> pop cx 96 0000CE2A 5F <2> pop di 97 0000CE2B BE[8056] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 98 <2> ; -> fake PARTINFO 99 0000CE2E 26C60480 <2> mov byte [es:si + piBoot], 80h ; fake primary active 100 0000CE32 26C64404FF <2> mov byte [es:si + piType], 0FFh ; fake a type 101 0000CE37 C606[B35A]00 <2> mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 0 ; special: 0 = diskette 102 <2> ; piLength is 0, too 103 0000CE3C FFD1 <2> call cx 104 <2> 105 0000CE3E EB66 <2> jmp %[_SCANPTAB_PREFIX]scan_logical.end 106 <2> 107 <2> 108 <2> @@: 109 0000CE40 31C0 <2> xor ax, ax 110 0000CE42 31D2 <2> xor dx, dx 111 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 112 <2> d4 asciz "In scan_partitions (before first call to read_partition_table)",13,10 113 0000CE44 E8DA00 <2> call %[_SCANPTAB_PREFIX]read_partition_table 114 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 115 <2> d4 asciz "In scan_partitions (after first call to read_partition_table)",13,10 116 0000CE47 BE[8056] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 117 0000CE4A 8816[B35A] <2> mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], dl ; = 0 118 <2> .loop_primary_parts: 119 0000CE4E FE06[B35A] <2> inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 120 0000CE52 26807C0400 <2> cmp byte [es:si + piType], 0 121 0000CE57 7402 <2> je .loop_primary_skip 122 0000CE59 FFD1 <2> call cx ; es:si -> partition table entry 123 <2> ; byte [load_current_partition] = which 124 <2> .loop_primary_skip: 125 0000CE5B 83C610 <2> add si, 16 126 0000CE5E 81FE[C056] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 127 0000CE62 72EA <2> jb .loop_primary_parts 128 <2> 129 <2> %[_SCANPTAB_PREFIX]scan_logical: 130 <2> .: 131 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 132 <2> d4 asciz "In scan_logical.",13,10 133 0000CE64 BE[8056] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 134 <2> .loop: 135 0000CE67 FF06[AC5A] <2> inc word [ %[_SCANPTAB_PREFIX]load_partition_cycle] 136 0000CE6B 7503E9A500 <2> jz .got_partition_cycle 137 <2> 138 0000CE70 268A4404 <2> mov al, [es:si + piType] 139 <2> 140 <2> %ifidn _BASE, bp 141 0000CE74 31DB <2> xor bx, bx 142 <2> %endif 143 0000CE76 84C0 <2> test al, al 144 0000CE78 741F <2> jz .next 145 0000CE7A 3C0F <2> cmp al, 0Fh ; extended partition (LBA aware) ? 146 0000CE7C 742C <2> je .push ; yes --> 147 0000CE7E 247F <2> and al, ~80h ; extended partition Linux (85h) ? 148 0000CE80 3C05 <2> cmp al, 05h ; or extended partition DOS (05h) ? 149 0000CE82 7426 <2> je .push ; yes --> 150 <2> 151 <2> %ifidn _BASE, bp 152 0000CE84 395BFE <2> cmp word [_BASE+di-2], bx 153 0000CE87 7505 <2> jne .logical 154 0000CE89 395BFC <2> cmp word [_BASE+di-4], bx 155 <2> %else 156 <2> cmp word [_BASE+di-2], 0 157 <2> jne .logical 158 <2> cmp word [_BASE+di-4], 0 159 <2> %endif 160 0000CE8C 740B <2> je .next 161 <2> .logical: 162 0000CE8E FE06[B35A] <2> inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 163 0000CE92 7503E98400 <2> jz .error_too_many_partitions 164 0000CE97 FFD1 <2> call cx 165 <2> ; CHG: ax, (cx), dx, bx if _BASE = bp 166 <2> ; preserve: (cx), si, di, ds, es, bx if _BASE = ss:bx 167 <2> .next: 168 0000CE99 83C610 <2> add si, 16 ; -> next partition table entry 169 0000CE9C 81FE[C056] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 170 <2> ; was last? 171 0000CEA0 72C5 <2> jb .loop ; no, loop --> 172 0000CEA2 85FF <2> test di, di ; still some on stack? 173 0000CEA4 7546 <2> jnz .pop ; yes, pop 174 <2> .end: 175 <2> %ifidn _BASE, bp 176 0000CEA6 89EC <2> mov sp, bp ; restore sp 177 0000CEA8 5D <2> pop bp 178 <2> %else 179 <2> mov sp, bx ; restore sp 180 <2> pop ax ; (discard dummy bp value) 181 <2> %endif 182 0000CEA9 C3 <2> retn ; and bye 183 <2> 184 <2> .push: 185 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 186 <2> d4 asciz "In scan_logical.push",13,10 187 <2> 188 0000CEAA 56 <2> push si 189 <2> .push_check_empty_next: 190 0000CEAB 83C610 <2> add si, 16 ; -> next 191 0000CEAE 81FE[C056] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 192 <2> ; at end? 193 0000CEB2 734A <2> jae .replace ; yes, no other partitions found, replace --> 194 0000CEB4 26807C0400 <2> cmp byte [es:si + piType], 0 ; is this a partition? 195 0000CEB9 74F0 <2> je .push_check_empty_next ; no, check next --> 196 <2> ; found a partition after this, do push 197 <2> ; (possibly logical or another extended) 198 <2> .push_check_is_not_empty: 199 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 200 <2> d4 asciz "In scan_logical.push_check_is_not_empty",13,10 201 0000CEBB 5E <2> pop si ; restore -> partition table entry 202 0000CEBC 56 <2> push si ; stored at word [_BASE+di-10] 203 0000CEBD 83EF0A <2> sub di, 10 204 0000CEC0 FF7308 <2> push word [_BASE+di+10-2] 205 0000CEC3 FF7306 <2> push word [_BASE+di+10-4] ; copy root 206 <2> 207 0000CEC6 268B4408 <2> mov ax, word [es:si + piStart] 208 0000CECA 268B540A <2> mov dx, word [es:si + piStart + 2] ; get extended partition offset 209 0000CECE 0343FC <2> add ax, word [_BASE+di-4] 210 0000CED1 1353FE <2> adc dx, word [_BASE+di-2] ; add in root to get absolute sector number 211 <2> 212 0000CED4 52 <2> push dx 213 0000CED5 50 <2> push ax ; new base 214 <2> 215 <2> .replace_common: 216 <2> %ifidn _BASE, bp 217 0000CED6 395BFE <2> cmp word [_BASE+di-2], bx ; have a (nonzero) root? 218 0000CED9 750B <2> jne .have_root 219 0000CEDB 395BFC <2> cmp word [_BASE+di-4], bx 220 <2> %else 221 <2> cmp word [_BASE+di-2], 0 ; have a (nonzero) root? 222 <2> jne .have_root 223 <2> cmp word [_BASE+di-4], 0 224 <2> %endif 225 0000CEDE 7506 <2> jne .have_root ; yes --> 226 <2> 227 0000CEE0 8953FE <2> mov word [_BASE+di-2], dx 228 0000CEE3 8943FC <2> mov word [_BASE+di-4], ax ; set root 229 <2> .have_root: 230 <2> 231 0000CEE6 E83800 <2> call %[_SCANPTAB_PREFIX]read_partition_table 232 0000CEE9 E978FF <2> jmp . 233 <2> 234 <2> .pop: 235 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 236 <2> d4 asciz "In scan_logical.pop",13,10 237 <2> 238 0000CEEC 83C70A <2> add di, 10 239 0000CEEF 83C408 <2> add sp, 8 240 0000CEF2 5E <2> pop si 241 <2> 242 0000CEF3 8B43F8 <2> mov ax, word [_BASE+di-8] 243 0000CEF6 8B53FA <2> mov dx, word [_BASE+di-6] 244 0000CEF9 E82500 <2> call %[_SCANPTAB_PREFIX]read_partition_table 245 0000CEFC EB9B <2> jmp .next 246 <2> 247 <2> .replace: 248 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 249 <2> d4 asciz "In scan_logical.replace",13,10 250 <2> 251 0000CEFE 5E <2> pop si ; (discard) 252 0000CEFF 268B4408 <2> mov ax, word [es:si + piStart] 253 0000CF03 268B540A <2> mov dx, word [es:si + piStart + 2] ; get extended partition offset 254 0000CF07 0343FC <2> add ax, word [_BASE+di - 4] 255 0000CF0A 1353FE <2> adc dx, word [_BASE+di - 2] ; add in root 256 0000CF0D 8943F8 <2> mov word [_BASE+di - 8], ax 257 0000CF10 8953FA <2> mov word [_BASE+di - 6], dx ; set base 258 <2> 259 0000CF13 EBC1 <2> jmp .replace_common 260 <2> 261 <2> 262 <2> %if _BOOTCMD_FAIL_ERROR 263 <2> .got_partition_cycle: 264 0000CF15 BA[8F16] <2> mov dx, msg.boot_partition_cycle_error 265 0000CF18 E9F4EC <2> jmp bootcmd.fail 266 <2> 267 <2> .error_too_many_partitions: 268 0000CF1B BA[6C16] <2> mov dx, msg.boot_too_many_partitions_error 269 0000CF1E E9EEEC <2> jmp bootcmd.fail 270 <2> %endif 271 <2> 272 <2> 273 <2> ; if _PARTITION_TABLE_IN_CS: 274 <2> ; INP: dx:ax = partition table sector to read 275 <2> ; CHG: ax, dx 276 <2> ; OUT: es = cs 277 <2> ; 64 bytes [es:partition_table] = partition table 278 <2> ; does not return if error 279 <2> 280 <2> ; else: 281 <2> ; INP: dx:ax = partition table sector to read 282 <2> ; CHG: ax, dx 283 <2> ; OUT: es = ss 284 <2> ; 64 bytes [es:partition_table] = partition table 285 <2> ; does not return if error 286 <2> %[_SCANPTAB_PREFIX]read_partition_table: 287 0000CF21 53 <2> push bx 288 <2> %ifidn _BASE, bp 289 0000CF22 8B1E[4A0A] <2> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 290 <2> %else 291 <2> mov bx, word [bp + ldSectorSeg] 292 <2> %endif 293 0000CF26 E84D02 <2> call %[_SCANPTAB_PREFIX]read_ae_512_bytes 294 0000CF29 5B <2> pop bx 295 0000CF2A 26813EFE0155AA <2> cmp word [es:510], 0AA55h 296 0000CF31 7518 <2> jne .signature_fail 297 0000CF33 1E <2> push ds 298 0000CF34 57 <2> push di 299 0000CF35 56 <2> push si 300 0000CF36 51 <2> push cx 301 0000CF37 06 <2> push es 302 0000CF38 1F <2> pop ds 303 0000CF39 BEBE01 <2> mov si, 510 - 4*16 ; ds:si -> partition table in sectorseg 304 <2> %if _PARTITION_TABLE_IN_CS 305 <2> push cs 306 <2> %else 307 0000CF3C 16 <2> push ss 308 <2> %endif 309 0000CF3D 07 <2> pop es 310 0000CF3E BF[8056] <2> mov di, %[_SCANPTAB_PREFIX]partition_table 311 <2> ; es:di -> cs:%[_SCANPTAB_PREFIX]partition_table 312 0000CF41 B92000 <2> mov cx, 4*16 / 2 313 0000CF44 F3A5 <2> rep movsw 314 0000CF46 59 <2> pop cx 315 0000CF47 5E <2> pop si 316 0000CF48 5F <2> pop di 317 0000CF49 1F <2> pop ds 318 0000CF4A C3 <2> retn 319 <2> 320 <2> 321 <2> %if _BOOTCMD_FAIL_ERROR 322 <2> .signature_fail: 323 0000CF4B BA[7B15] <2> mov dx, msg.bootfail_sig_parttable 324 0000CF4E E9BEEC <2> jmp bootcmd.fail 325 <2> %endif 3593 <1> 3594 <1> 3595 <1> ; INP: al = first character 3596 <1> ; si -> next 3597 <1> ; OUT: doesn't return if error 3598 <1> ; bx:dx = number read 3599 <1> ; al = character after the number 3600 <1> ; si -> next 3601 <1> ; CHG: cx, ax, di 3602 <1> boot_get_decimal_literal: 3603 0000CF51 BA0A00 <1> mov dx, 10 ; set base: decimal 3604 <1> %if 1 3605 0000CF54 B93940 <1> mov cx, '9' | (('A'-10-1 + 10) << 8) 3606 <1> %else 3607 <1> mov cl, dl 3608 <1> add cl, '0'-1 3609 <1> cmp cl, '9' 3610 <1> jbe .lit_basebelow11 3611 <1> mov cl, '9' 3612 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 3613 <1> mov ch, dl 3614 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 3615 <1> %endif 3616 0000CF57 EB06 <1> jmp @F 3617 <1> 3618 <1> 3619 <1> boot_get_hexadecimal_literal: 3620 0000CF59 BA1000 <1> mov dx, 16 ; set base: hexadecimal 3621 <1> %if 1 3622 0000CF5C B93946 <1> mov cx, '9' | (('A'-10-1 + 16) << 8) 3623 <1> %else 3624 <1> mov cl, dl 3625 <1> add cl, '0'-1 3626 <1> cmp cl, '9' 3627 <1> jbe .lit_basebelow11 3628 <1> mov cl, '9' 3629 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 3630 <1> mov ch, dl 3631 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 3632 <1> %endif 3633 <1> 3634 <1> @@: 3635 0000CF5F B400 <1> mov ah, 0 3636 0000CF61 31DB <1> xor bx, bx 3637 0000CF63 89D7 <1> mov di, dx ; di = base 3638 <1> 3639 0000CF65 E860C8 <1> nearcall getexpression.lit_isdigit? ; first character must be a digit 3640 0000CF68 7241 <1> jc .err2 3641 0000CF6A 31D2 <1> xor dx, dx ; initialize value 3642 <1> .lit_loopdigit: 3643 0000CF6C 3C5F <1> cmp al, '_' 3644 0000CF6E 7432 <1> je .lit_skip 3645 0000CF70 E855C8 <1> nearcall getexpression.lit_isdigit? ; was last character ? 3646 0000CF73 7230 <1> jc .lit_end ; yes --> 3647 0000CF75 E8F6C9 <1> call uppercase 3648 0000CF78 2C30 <1> sub al, '0' 3649 0000CF7A 3C09 <1> cmp al, 9 ; was decimal digit ? 3650 0000CF7C 7602 <1> jbe .lit_decimaldigit ; yes --> 3651 0000CF7E 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 3652 <1> .lit_decimaldigit: 3653 0000CF80 50 <1> push ax 3654 0000CF81 89D0 <1> mov ax, dx 3655 0000CF83 53 <1> push bx 3656 0000CF84 F7E7 <1> mul di ; multiply low word with base 3657 0000CF86 89D3 <1> mov bx, dx 3658 0000CF88 89C2 <1> mov dx, ax 3659 0000CF8A 58 <1> pop ax 3660 0000CF8B 52 <1> push dx 3661 0000CF8C F7E7 <1> mul di ; multiply high word with base 3662 0000CF8E 85D2 <1> test dx, dx 3663 0000CF90 5A <1> pop dx 3664 0000CF91 7518 <1> jnz .err2 ; overflow --> 3665 0000CF93 01C3 <1> add bx, ax ; add them 3666 0000CF95 58 <1> pop ax 3667 0000CF96 7213 <1> jc .err2 ; overflow --> 3668 0000CF98 00C2 <1> add dl, al ; add in the new digit 3669 0000CF9A 80D600 <1> adc dh, 0 3670 0000CF9D 83D300 <1> adc bx, byte 0 3671 0000CFA0 7209 <1> jc .err2 ; overflow --> 3672 <1> 3673 <1> .lit_skip: 3674 0000CFA2 AC <1> lodsb 3675 0000CFA3 EBC7 <1> jmp short .lit_loopdigit 3676 <1> 3677 <1> .lit_end: 3678 0000CFA5 E890B9 <1> nearcall isseparator? ; after the number, there must be a separator 3679 0000CFA8 7501 <1> jne .err2 ; none here --> 3680 0000CFAA C3 <1> retn 3681 <1> 3682 <1> .err2: 3683 0000CFAB E9AFB2 <1> jmp error 3684 <1> 3685 <1> 3686 <1> query_geometry: 3687 0000CFAE E80837 <1> call guard_auxbuff 3688 0000CFB1 8A16[C057] <1> mov dl, [load_unit] 3689 <1> ; test dl, dl ; floppy? 3690 <1> ; jns @F ; don't attempt query, might fail --> 3691 <1> ; Note that while the original PC BIOS doesn't support this function 3692 <1> ; (for its diskettes), it does properly return the error code 01h. 3693 <1> ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 3694 0000CFB5 B408 <1> mov ah, 08h 3695 0000CFB7 31C9 <1> xor cx, cx ; initialise cl to 0 3696 0000CFB9 890E[9A57] <1> mov [load_heads], cx 3697 0000CFBD 890E[9857] <1> mov [load_sectors], cx 3698 0000CFC1 31DB <1> xor bx, bx 3699 0000CFC3 88D3 <1> mov bl, dl 3700 0000CFC5 F687[8055]04 <1> testopt [load_unit_flags + bx], lufForceGeometry 3701 0000CFCA 7512 <1> jnz .try_bootsector 3702 0000CFCC F9 <1> stc ; initialise to CY 3703 0000CFCD E83E01 <1> call .int13_retry ; query drive geometry 3704 0000CFD0 720C <1> jc .try_bootsector ; apparently failed --> 3705 0000CFD2 88F2 <1> mov dl, dh 3706 0000CFD4 B600 <1> mov dh, 0 ; dx = maximum head number 3707 0000CFD6 42 <1> inc dx ; dx = number of heads (H is 0-based) 3708 0000CFD7 89C8 <1> mov ax, cx ; ax & 3Fh = maximum sector number 3709 0000CFD9 83E03F <1> and ax, 3Fh ; get sectors (number of sectors, S is 1-based) 3710 0000CFDC 7523 <1> jnz .got_sectors_heads ; valid (S is 1-based), use these --> 3711 <1> ; zero = invalid 3712 <1> .try_bootsector: 3713 0000CFDE 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] ; es => auxbuff 3714 0000CFE2 31DB <1> xor bx, bx ; es:bx -> auxbuff 3715 0000CFE4 B80102 <1> mov ax, 0201h ; read sector, 1 sector 3716 0000CFE7 B90100 <1> mov cx, 1 ; sector 1 (1-based!), cylinder 0 (0-based) 3717 0000CFEA B600 <1> mov dh, 0 ; head 0 (0-based) 3718 0000CFEC 8A16[C057] <1> mov dl, [load_unit] 3719 0000CFF0 F9 <1> stc 3720 0000CFF1 E81A01 <1> call .int13_retry 3721 0000CFF4 7303E93201 <1> jc .access_error 3722 <1> 3723 <1> ; note: the smallest supported sector size, 32 bytes, 3724 <1> ; does contain these entries (offset 18h and 1Ah in sector) 3725 <1> ; within the first BPB sector. 3726 0000CFF9 268B4718 <1> mov ax, word [es:bx + bsBPB + bpbCHSSectors] 3727 0000CFFD 268B571A <1> mov dx, word [es:bx + bsBPB + bpbCHSHeads] 3728 <1> 3729 <1> .got_sectors_heads: 3730 0000D001 A3[9857] <1> mov word [load_sectors], ax 3731 0000D004 8916[9A57] <1> mov word [load_heads], dx 3732 <1> 3733 0000D008 85C0 <1> test ax, ax 3734 0000D00A 7503E94201 <1> jz .invalid_sectors 3735 0000D00F 83F83F <1> cmp ax, 63 3736 0000D012 7603E93A01 <1> ja .invalid_sectors 3737 0000D017 85D2 <1> test dx, dx 3738 0000D019 7503E93A01 <1> jz .invalid_heads 3739 0000D01E 81FA0001 <1> cmp dx, 100h 3740 0000D022 7603E93101 <1> ja .invalid_heads 3741 <1> 3742 0000D027 8E06[4A0A] <1> mov es, word [auxbuff_segorsel] ; es => auxbuff 3743 0000D02B 31DB <1> xor bx, bx ; es:bx -> auxbuff 3744 0000D02D 31C0 <1> xor ax, ax 3745 <1> 3746 <1> %if _AUXBUFFSIZE < 8192+2 3747 <1> %error Expecting to use auxbuff as sector size detection buffer 3748 <1> %endif 3749 <1> 3750 <1> d5 call d5dumpregs 3751 <1> d5 call d5message 3752 <1> d5 asciz 13,10,"In query_geometry 0",13,10 3753 <1> 3754 0000D02F 89DF <1> mov di, bx 3755 0000D031 B90110 <1> mov cx, (8192 + 2) >> 1 3756 <1> ; es:bx -> auxbuff, es:di = same 3757 0000D034 F3AB <1> rep stosw ; fill buffer, di -> behind (auxbuff+8192+2) 3758 0000D036 B80102 <1> mov ax, 0201h ; read sector, 1 sector 3759 0000D039 41 <1> inc cx ; sector 1 (1-based!), cylinder 0 (0-based) 3760 0000D03A B600 <1> mov dh, 0 ; head 0 (0-based) 3761 0000D03C 8A16[C057] <1> mov dl, [load_unit] 3762 0000D040 F9 <1> stc 3763 0000D041 E8CA00 <1> call .int13_retry 3764 0000D044 7303E9E200 <1> jc .access_error 3765 <1> 3766 0000D049 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 3767 0000D04A AF <1> scasw ; -> auxbuff+8192 (at last word to sca) 3768 <1> d5 call d5dumpregs 3769 <1> d5 call d5message 3770 <1> d5 asciz 13,10,"In query_geometry 1",13,10 3771 0000D04B B90110 <1> mov cx, (8192 + 2) >> 1 3772 0000D04E 31C0 <1> xor ax, ax 3773 0000D050 F3AF <1> repe scasw 3774 0000D052 83C704 <1> add di, 4 ; di -> first differing byte (from top) 3775 0000D055 FC <1> cld 3776 0000D056 57 <1> push di 3777 <1> 3778 0000D057 89DF <1> mov di, bx 3779 0000D059 B90110 <1> mov cx, (8192 + 2) >> 1 3780 0000D05C 48 <1> dec ax ; = FFFFh 3781 0000D05D F3AB <1> rep stosw 3782 <1> 3783 0000D05F B80102 <1> mov ax, 0201h 3784 0000D062 41 <1> inc cx 3785 0000D063 B600 <1> mov dh, 0 3786 0000D065 8A16[C057] <1> mov dl, [load_unit] 3787 0000D069 F9 <1> stc 3788 0000D06A E8A100 <1> call .int13_retry 3789 0000D06D 7303E9B900 <1> jc .access_error 3790 <1> 3791 0000D072 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 3792 0000D073 AF <1> scasw ; di -> auxbuff+8192 (last word to sca) 3793 <1> d5 call d5dumpregs 3794 <1> d5 call d5message 3795 <1> d5 asciz 13,10,"In query_geometry 2",13,10 3796 0000D074 5A <1> pop dx 3797 0000D075 B8FFFF <1> mov ax, -1 3798 0000D078 B90110 <1> mov cx, (8192 + 2) >> 1 3799 0000D07B F3AF <1> repe scasw 3800 <1> %if 0 3801 <1> AAAB 3802 <1> ^ 3803 <1> sca B, match 3804 <1> ^ 3805 <1> sca B, mismatch 3806 <1> ^ 3807 <1> stop 3808 <1> %endif 3809 0000D07D 83C704 <1> add di, 4 ; di -> first differing byte (from top) 3810 0000D080 FC <1> cld 3811 <1> 3812 <1> %if 0 3813 <1> 0000000000000 3814 <1> AAAAAAAA00000 3815 <1> ^ 3816 <1> FFFFFFFFFFFFF 3817 <1> AAAAAAAA00FFF 3818 <1> ^ 3819 <1> %endif 3820 0000D081 39FA <1> cmp dx, di ; choose the higher one 3821 0000D083 7302 <1> jae @F 3822 0000D085 89FA <1> mov dx, di 3823 <1> @@: 3824 0000D087 29DA <1> sub dx, bx ; dx = sector size 3825 <1> 3826 <1> d5 call d5dumpregs 3827 <1> d5 call d5message 3828 <1> d5 asciz 13,10,"In query_geometry 3",13,10 3829 <1> 3830 0000D089 81FA0220 <1> cmp dx, 8192 + 2 3831 0000D08D 7203E9AA00 <1> jae .sector_too_large 3832 0000D092 B82000 <1> mov ax, 32 3833 0000D095 39C2 <1> cmp dx, ax 3834 0000D097 7303E9A700 <1> jb .sector_too_small 3835 <1> @@: 3836 0000D09C 39C2 <1> cmp dx, ax 3837 0000D09E 740C <1> je .got_match 3838 0000D0A0 3D0020 <1> cmp ax, 8192 3839 0000D0A3 7203E9A200 <1> jae .sector_not_power 3840 0000D0A8 D1E0 <1> shl ax, 1 3841 0000D0AA EBF0 <1> jmp @B 3842 <1> 3843 <1> .got_match: 3844 0000D0AC A3[8B57] <1> mov word [load_sectorsize], ax 3845 0000D0AF B104 <1> mov cl, 4 3846 0000D0B1 D3E8 <1> shr ax, cl 3847 0000D0B3 A3[6A57] <1> mov word [load_sectorsizepara], ax 3848 <1> 3849 0000D0B6 C606[6757]00 <1> mov byte [load_ldflags], 0 3850 0000D0BB 8A16[C057] <1> mov dl, [load_unit] 3851 0000D0BF 31DB <1> xor bx, bx 3852 0000D0C1 88D3 <1> mov bl, dl 3853 0000D0C3 F687[8055]01 <1> testopt [load_unit_flags + bx], lufForceCHS 3854 0000D0C8 7520 <1> jnz .no_lba 3855 0000D0CA F687[8055]02 <1> testopt [load_unit_flags + bx], lufForceLBA 3856 0000D0CF 7515 <1> jnz .yes_lba 3857 0000D0D1 B441 <1> mov ah, 41h 3858 0000D0D3 BBAA55 <1> mov bx, 55AAh 3859 0000D0D6 F9 <1> stc 3860 0000D0D7 CD13 <1> int 13h ; 13.41.bx=55AA extensions installation check 3861 0000D0D9 720F <1> jc .no_lba 3862 0000D0DB 81FB55AA <1> cmp bx, 0AA55h 3863 0000D0DF 7509 <1> jne .no_lba 3864 0000D0E1 F6C101 <1> test cl, 1 ; support bitmap bit 0 3865 0000D0E4 7404 <1> jz .no_lba 3866 <1> 3867 <1> .yes_lba: 3868 <1> %if ldfHasLBA != 1 3869 <1> %error Assuming ldfHasLBA is 1 3870 <1> %endif 3871 0000D0E6 FE06[6757] <1> inc byte [load_ldflags] 3872 <1> .no_lba: 3873 <1> 3874 0000D0EA A1[4A0A] <1> mov ax, word [auxbuff_segorsel] ; ax => auxbuff 3875 0000D0ED 89C2 <1> mov dx, ax 3876 0000D0EF 81C2FF01 <1> add dx, (8192 - 16) >> 4 3877 0000D0F3 89C3 <1> mov bx, ax 3878 0000D0F5 89D1 <1> mov cx, dx 3879 0000D0F7 81E300F0 <1> and bx, 0F000h 3880 0000D0FB 81E100F0 <1> and cx, 0F000h 3881 0000D0FF 39D9 <1> cmp cx, bx 3882 0000D101 7504 <1> jne @F 3883 0000D103 A3[6457] <1> mov word [load_sectorseg], ax 3884 0000D106 C3 <1> retn 3885 <1> 3886 <1> @@: 3887 0000D107 BA[7F18] <1> mov dx, msg.boot_auxbuff_crossing 3888 0000D10A B020 <1> mov al, 20h 3889 0000D10C EB4F <1> jmp .error_common_j 3890 <1> 3891 <1> 3892 <1> .int13_retry: 3893 0000D10E 9C <1> pushf 3894 0000D10F 50 <1> push ax 3895 0000D110 CD13 <1> int 13h ; first try 3896 0000D112 730B <1> jnc @F ; NC, success on first attempt --> 3897 <1> 3898 <1> ; reset drive 3899 0000D114 31C0 <1> xor ax, ax 3900 0000D116 CD13 <1> int 13h 3901 0000D118 7205 <1> jc @F ; CY, reset failed, error in ah --> 3902 <1> 3903 <1> ; try read again 3904 0000D11A 58 <1> pop ax ; restore function number 3905 0000D11B 9D <1> popf ; CF 3906 0000D11C CD13 <1> int 13h ; retry, CF error status, ah error number 3907 0000D11E C3 <1> retn 3908 <1> 3909 <1> @@: ; NC or CY, stack has function number 3910 0000D11F 44 <1> inc sp 3911 0000D120 44 <1> inc sp 3912 0000D121 44 <1> inc sp 3913 0000D122 44 <1> inc sp ; discard two words on stack, preserve CF 3914 0000D123 C3 <1> retn 3915 <1> 3916 <1> 3917 <1> .out_of_memory_error: 3918 0000D124 BA[5B16] <1> mov dx, msg.boot_out_of_memory_error 3919 0000D127 B021 <1> mov al, 21h 3920 0000D129 EB32 <1> jmp .error_common_j 3921 <1> .access_error: 3922 <1> %if _INPUT_FILE_BOOT 3923 0000D12B F606[DB00]08 <1> testopt [internalflags3], dif3_in_if 3924 0000D130 7403E9E89A <1> jnz if_exists_not_found 3925 <1> %endif 3926 0000D135 BA[C816] <1> mov dx, msg.boot_access_error 3927 0000D138 B022 <1> mov al, 22h 3928 0000D13A EB21 <1> jmp .error_common_j 3929 <1> .sector_too_large: 3930 0000D13C BA[D616] <1> mov dx, msg.boot_sector_too_large 3931 0000D13F B023 <1> mov al, 23h 3932 0000D141 EB1A <1> jmp .error_common_j 3933 <1> .sector_too_small: 3934 0000D143 BA[FC16] <1> mov dx, msg.boot_sector_too_small 3935 0000D146 B024 <1> mov al, 24h 3936 0000D148 EB13 <1> jmp .error_common_j 3937 <1> .sector_not_power: 3938 0000D14A BA[2417] <1> mov dx, msg.boot_sector_not_power 3939 0000D14D B025 <1> mov al, 25h 3940 0000D14F EB0C <1> jmp .error_common_j 3941 <1> .invalid_sectors: 3942 0000D151 BA[4617] <1> mov dx, msg.boot_invalid_sectors 3943 0000D154 B026 <1> mov al, 26h 3944 0000D156 EB05 <1> jmp .error_common_j 3945 <1> .invalid_heads: 3946 0000D158 BA[6217] <1> mov dx, msg.boot_invalid_heads 3947 0000D15B B027 <1> mov al, 27h 3948 <1> .error_common_j: 3949 0000D15D B402 <1> mov ah, 02h 3950 0000D15F E847B1 <1> call setrc 3951 0000D162 E9AAEA <1> jmp bootcmd.fail 3952 <1> 3953 <1> 3954 <1> ; INP: dx:ax = first sector 3955 <1> ; bx:0 -> buffer 3956 <1> ; OUT: dx:ax = sector number after last read 3957 <1> ; es = input bx 3958 <1> ; bx:0 -> buffer after last written 3959 <1> ; CHG: - 3960 <1> ; STT: ds = ss 3961 <1> read_ae_1536_bytes: 3962 0000D165 51 <1> push cx 3963 0000D166 53 <1> push bx 3964 0000D167 B90006 <1> mov cx, 1536 3965 <1> .loop: 3966 0000D16A E81B00 <1> call read_sector 3967 0000D16D 2B0E[8B57] <1> sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3968 0000D171 77F7 <1> ja .loop 3969 0000D173 07 <1> pop es 3970 0000D174 59 <1> pop cx 3971 0000D175 C3 <1> retn 3972 <1> 3973 <1> ; INP: dx:ax = first sector 3974 <1> ; bx:0 -> buffer 3975 <1> ; OUT: dx:ax = sector number after last read 3976 <1> ; es = input bx 3977 <1> ; bx:0 -> buffer after last written 3978 <1> ; CHG: - 3979 <1> ; STT: ds = ss 3980 <1> read_ae_512_bytes: 3981 0000D176 51 <1> push cx 3982 0000D177 53 <1> push bx 3983 0000D178 B90002 <1> mov cx, 512 3984 <1> .loop: 3985 0000D17B E80A00 <1> call read_sector 3986 0000D17E 2B0E[8B57] <1> sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 3987 0000D182 77F7 <1> ja .loop 3988 0000D184 07 <1> pop es 3989 0000D185 59 <1> pop cx 3990 0000D186 C3 <1> retn 3991 <1> 3992 <1> 3993 <1> ; Write a sector using Int13.03 or Int13.43 3994 <1> ; 3995 <1> ; Protocol as for read_sector 3996 <1> write_sector: 3997 0000D187 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 3998 <1> 3999 <1> ; Read a sector using Int13.02 or Int13.42 4000 <1> ; 4001 <1> ; INP: dx:ax = sector number (within partition) 4002 <1> ; bx:0-> buffer 4003 <1> ; (_LBA) ds = ss 4004 <1> ; dword[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors] 4005 <1> ; = base sector number (dx:ax is added to this to get 4006 <1> ; the absolute sector number in the selected unit.) 4007 <1> ; OUT: If unable to read, 4008 <1> ; ! jumps to error instead of returning 4009 <1> ; If sector has been read, 4010 <1> ; dx:ax = next sector number (has been incremented) 4011 <1> ; bx:0-> next buffer (bx = es+word[load_sectorsizepara]) 4012 <1> ; es = input bx 4013 <1> ; CHG: - 4014 <1> ; 4015 <1> ; Note: If error 09h (data boundary error) is returned, 4016 <1> ; the read is done into the load_sectorseg buffer, 4017 <1> ; then copied into the user buffer. 4018 <1> read_sector: 4019 0000D188 F9 <1> stc 4020 <1> 4021 <1> read_sector_CY_or_write_sector_NC: 4022 <1> lframe near 4023 0000D189 5589E5 <1> lenter 4024 <1> lvar word, is_read_bit0 4025 0000D18C 9C <1> pushf 4026 <1> 4027 <1> .err: equ bootcmd.fail_read 4028 <1> d5 call d5dumpregs 4029 <1> d5 call d5message 4030 <1> d5 asciz 13,10,"In read_sector",13,10 4031 <1> 4032 0000D18D 52 <1> push dx 4033 0000D18E 51 <1> push cx 4034 0000D18F 50 <1> push ax 4035 0000D190 56 <1> push si 4036 <1> 4037 0000D191 8EC3 <1> mov es, bx 4038 <1> 4039 <1> ; DX:AX==LBA sector number 4040 <1> ; add partition start (= number of hidden sectors) 4041 0000D193 0306[9C57] <1> add ax,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 0] 4042 0000D197 1316[9E57] <1> adc dx,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2] 4043 <1> 4044 0000D19B 19F6 <1> sbb si, si ; -1 if was CY, 0 else 4045 0000D19D F7DE <1> neg si ; 1 if was CY, 0 else 4046 0000D19F 31C9 <1> xor cx, cx 4047 0000D1A1 51 <1> push cx 4048 0000D1A2 56 <1> push si ; bit 32 = 1 if operating in 33-bit space 4049 0000D1A3 52 <1> push dx 4050 0000D1A4 50 <1> push ax ; qword sector number (lpSector) 4051 0000D1A5 53 <1> push bx 4052 0000D1A6 51 <1> push cx ; bx:0 -> buffer (lpBuffer) 4053 0000D1A7 41 <1> inc cx 4054 0000D1A8 51 <1> push cx ; word number of sectors to read (lpCount) 4055 0000D1A9 B110 <1> mov cl, 10h 4056 0000D1AB 51 <1> push cx ; word size of disk address packet (lpSize) 4057 0000D1AC 89E6 <1> mov si, sp ; ds:si -> disk address packet (on stack) 4058 <1> 4059 0000D1AE F606[6757]01 <1> test byte [load_data - LOADDATA2 + ldFlags], ldfHasLBA 4060 0000D1B3 7503E9B800 <1> jz .no_lba 4061 <1> 4062 <1> d5 call d5message 4063 <1> d5 asciz "In read_sector.lba",13,10 4064 <1> 4065 0000D1B8 8A16[C057] <1> mov dl, byte [load_unit] 4066 0000D1BC E89101 <1> call .set_ah_function_42_or_43 4067 0000D1BF CD13 <1> int 13h ; 13.42 extensions read 4068 0000D1C1 7203E9A400 <1> jnc .lba_done 4069 <1> 4070 0000D1C6 31C0 <1> xor ax, ax 4071 0000D1C8 CD13 <1> int 13h 4072 0000D1CA 7303E92EEA <1> jc .lba_error 4073 <1> 4074 <1> ; have to reset the LBAPACKET's lpCount, as the handler may 4075 <1> ; set it to "the number of blocks successfully transferred". 4076 <1> ; (in any case, the high byte is still zero.) 4077 0000D1CF C6440201 <1> mov byte [si + lpCount], 1 4078 <1> 4079 0000D1D3 E87A01 <1> call .set_ah_function_42_or_43 4080 0000D1D6 CD13 <1> int 13h 4081 0000D1D8 7203E98D00 <1> jnc .lba_done 4082 <1> 4083 0000D1DD 80FC09 <1> cmp ah, 9 ; data boundary error? 4084 0000D1E0 7403E918EA <1> jne .lba_error 4085 <1> 4086 <1> .lba_sectorseg: 4087 <1> d4 call d4dumpregs 4088 <1> d4 call d4message 4089 <1> d4 asciz 13,10,"In read_sector.lba_sectorseg",13,10 4090 <1> 4091 0000D1E5 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 4092 0000D1E9 7542 <1> jnz .lba_sectorseg_read 4093 <1> 4094 <1> .lba_sectorseg_write: 4095 0000D1EB 06 <1> push es 4096 <1> 4097 0000D1EC 1E <1> push ds 4098 0000D1ED 56 <1> push si 4099 0000D1EE 57 <1> push di 4100 0000D1EF 8B0E[8B57] <1> mov cx, word [load_sectorsize] 4101 0000D1F3 8E06[6457] <1> mov es, word [load_sectorseg] ; => sectorseg 4102 <1> ; lds si, [si + lpBuffer + 0] 4103 0000D1F7 8E5C06 <1> mov ds, word [si + lpBuffer + 2]; => user buffer 4104 0000D1FA 31F6 <1> xor si, si 4105 0000D1FC 31FF <1> xor di, di 4106 0000D1FE F3A4 <1> rep movsb ; copy data into sectorseg 4107 0000D200 5F <1> pop di 4108 0000D201 5E <1> pop si 4109 0000D202 1F <1> pop ds 4110 <1> 4111 0000D203 8E06[6457] <1> mov es, word [load_sectorseg] 4112 0000D207 8C4406 <1> mov word [si + lpBuffer + 2], es 4113 <1> ; => sectorseg 4114 <1> ; and word [si + lpBuffer + 0], byte 0 4115 <1> 4116 0000D20A C6440201 <1> mov byte [si + lpCount], 1 4117 0000D20E B443 <1> mov ah, 43h 4118 0000D210 CD13 <1> int 13h 4119 0000D212 7316 <1> jnc @F 4120 <1> 4121 0000D214 31C0 <1> xor ax, ax 4122 0000D216 CD13 <1> int 13h 4123 0000D218 7303E9E0E9 <1> jc .lba_error 4124 <1> 4125 0000D21D C6440201 <1> mov byte [si + lpCount], 1 4126 0000D221 B443 <1> mov ah, 43h 4127 0000D223 CD13 <1> int 13h 4128 0000D225 7303E9D3E9 <1> jc .lba_error 4129 <1> @@: 4130 <1> 4131 0000D22A 07 <1> pop es 4132 0000D22B EB3D <1> jmp .lba_done 4133 <1> 4134 <1> 4135 <1> .lba_sectorseg_read: 4136 <1> ; the offset part of the pointer is already zero! 4137 <1> ; push word [si + lpBuffer + 0] 4138 0000D22D 06 <1> push es ; => user buffer 4139 0000D22E 8E06[6457] <1> mov es, word [load_sectorseg] 4140 0000D232 8C4406 <1> mov word [si + lpBuffer + 2], es 4141 <1> ; and word [si + lpBuffer + 0], byte 0 4142 <1> 4143 0000D235 C6440201 <1> mov byte [si + lpCount], 1 4144 0000D239 E81401 <1> call .set_ah_function_42_or_43 4145 0000D23C CD13 <1> int 13h 4146 0000D23E 7317 <1> jnc .lba_sectorseg_done 4147 <1> 4148 0000D240 31C0 <1> xor ax, ax 4149 0000D242 CD13 <1> int 13h 4150 0000D244 7303E9B4E9 <1> jc .lba_error 4151 <1> 4152 0000D249 C6440201 <1> mov byte [si + lpCount], 1 4153 0000D24D E80001 <1> call .set_ah_function_42_or_43 4154 0000D250 CD13 <1> int 13h 4155 0000D252 7303E9A6E9 <1> jc .lba_error 4156 <1> .lba_sectorseg_done: 4157 <1> 4158 0000D257 31F6 <1> xor si, si 4159 0000D259 07 <1> pop es 4160 <1> ; pop cx 4161 0000D25A 57 <1> push di 4162 <1> ; mov di, cx 4163 0000D25B 31FF <1> xor di, di 4164 0000D25D 8B0E[8B57] <1> mov cx, word [load_sectorsize] 4165 0000D261 8E1E[6457] <1> mov ds, word [load_sectorseg] 4166 0000D265 F3A4 <1> rep movsb 4167 0000D267 5F <1> pop di 4168 <1> 4169 0000D268 16 <1> push ss 4170 0000D269 1F <1> pop ds 4171 <1> .lba_done: 4172 0000D26A 83C410 <1> add sp, 10h 4173 0000D26D E9CE00 <1> jmp .done 4174 <1> 4175 <1> .lba_error: equ .err 4176 <1> 4177 <1> .no_lba: 4178 0000D270 83C408 <1> add sp, 8 4179 0000D273 58 <1> pop ax 4180 0000D274 5A <1> pop dx 4181 0000D275 5E <1> pop si 4182 0000D276 59 <1> pop cx 4183 0000D277 85F6 <1> test si, si 4184 0000D279 7532 <1> jnz .err_4_NZ 4185 <1> 4186 <1> ; DX:AX=LBA sector number 4187 <1> ; divide by number of sectors per track to get sector number 4188 <1> ; Use 32:16 DIV instead of 64:32 DIV for 8088 compatability 4189 <1> ; Use two-step 32:16 divide to avoid overflow 4190 0000D27B 89C1 <1> mov cx,ax 4191 0000D27D 89D0 <1> mov ax,dx 4192 0000D27F 31D2 <1> xor dx,dx 4193 0000D281 F736[9857] <1> div word [load_sectors] 4194 0000D285 91 <1> xchg cx,ax 4195 0000D286 F736[9857] <1> div word [load_sectors] 4196 0000D28A 87CA <1> xchg cx,dx 4197 <1> 4198 <1> ; DX:AX=quotient, CX=remainder=sector (S) - 1 4199 <1> ; divide quotient by number of heads 4200 0000D28C 89C3 <1> mov bx, ax 4201 0000D28E 92 <1> xchg ax, dx 4202 0000D28F 31D2 <1> xor dx, dx 4203 0000D291 F736[9A57] <1> div word [load_heads] 4204 0000D295 93 <1> xchg bx, ax 4205 0000D296 F736[9A57] <1> div word [load_heads] 4206 <1> 4207 <1> ; bx:ax=quotient=cylinder (C), dx=remainder=head (H) 4208 <1> ; move variables into registers for INT 13h AH=02h 4209 0000D29A 88D6 <1> mov dh, dl ; dh = head 4210 0000D29C 41 <1> inc cx ; cl5:0 = sector 4211 0000D29D 86E8 <1> xchg ch, al ; ch = cylinder 7:0, al = 0 4212 0000D29F D1E8 <1> shr ax, 1 4213 0000D2A1 D1E8 <1> shr ax, 1 ; al7:6 = cylinder 9:8 4214 <1> ; bx has bits set iff it's > 0, indicating a cylinder >= 65536. 4215 0000D2A3 08FB <1> or bl, bh ; collect set bits from bh 4216 0000D2A5 08C1 <1> or cl, al ; cl7:6 = cylinder 9:8 4217 <1> ; ah has bits set iff it was >= 4, indicating a cylinder >= 1024. 4218 0000D2A7 08E3 <1> or bl, ah ; collect set bits from ah 4219 0000D2A9 8A16[C057] <1> mov dl, [load_unit] 4220 <1> ; dl = drive 4221 <1> .err_4_NZ: 4222 0000D2AD B404 <1> mov ah, 04h ; error number: sector not found 4223 0000D2AF 7403E949E9 <1> jnz .err ; error if cylinder >= 1024 --> 4224 <1> ; ! bx = 0 (for 13.02 call) 4225 <1> 4226 <1> ; we call INT 13h AH=02h once for each sector. Multi-sector reads 4227 <1> ; may fail if we cross a track or 64K boundary 4228 0000D2B4 BE1100 <1> mov si, 16 + 1 4229 <1> .loop_chs_retry_repeat: 4230 0000D2B7 E8A100 <1> call .set_ax_function_0201_or_0301 4231 0000D2BA CD13 <1> int 13h ; read one sector 4232 0000D2BC 7203E97D00 <1> jnc .done 4233 0000D2C1 50 <1> push ax 4234 0000D2C2 31C0 <1> xor ax, ax 4235 0000D2C4 CD13 <1> int 13h ; reset disk 4236 0000D2C6 58 <1> pop ax 4237 0000D2C7 4E <1> dec si ; another attempt ? 4238 0000D2C8 75ED <1> jnz .loop_chs_retry_repeat ; yes --> 4239 <1> 4240 0000D2CA 80FC09 <1> cmp ah, 9 ; data boundary error? 4241 0000D2CD 7403E92BE9 <1> jne .err 4242 <1> 4243 <1> .chs_sectorseg: 4244 <1> d4 call d4dumpregs 4245 <1> d4 call d4message 4246 <1> d4 asciz 13,10,"In read_sector.chs_sectorseg",13,10 4247 <1> 4248 0000D2D2 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 4249 0000D2D6 7534 <1> jnz .chs_sectorseg_read 4250 <1> 4251 <1> .chs_sectorseg_write: 4252 0000D2D8 06 <1> push es 4253 <1> 4254 0000D2D9 1E <1> push ds 4255 0000D2DA 57 <1> push di 4256 0000D2DB 51 <1> push cx 4257 0000D2DC 8B0E[8B57] <1> mov cx, word [load_sectorsize] 4258 0000D2E0 06 <1> push es 4259 0000D2E1 8E06[6457] <1> mov es, word [load_sectorseg] ; => sectorseg 4260 0000D2E5 1F <1> pop ds ; => user buffer 4261 0000D2E6 31F6 <1> xor si, si 4262 0000D2E8 31FF <1> xor di, di 4263 0000D2EA F3A4 <1> rep movsb ; copy data into sectorseg 4264 0000D2EC 59 <1> pop cx 4265 0000D2ED 5F <1> pop di 4266 0000D2EE 1F <1> pop ds 4267 <1> 4268 0000D2EF B80103 <1> mov ax, 0301h 4269 0000D2F2 CD13 <1> int 13h 4270 0000D2F4 7313 <1> jnc @F 4271 <1> 4272 0000D2F6 31C0 <1> xor ax, ax 4273 0000D2F8 CD13 <1> int 13h 4274 0000D2FA 7303E9FEE8 <1> jc .err 4275 <1> 4276 0000D2FF B80103 <1> mov ax, 0301h 4277 0000D302 CD13 <1> int 13h 4278 0000D304 7303E9F4E8 <1> jc .err 4279 <1> @@: 4280 0000D309 07 <1> pop es 4281 0000D30A EB32 <1> jmp .done 4282 <1> 4283 <1> 4284 <1> .chs_sectorseg_read: 4285 <1> 4286 0000D30C 06 <1> push es ; user buffer 4287 0000D30D 8E06[6457] <1> mov es, word [load_sectorseg] 4288 <1> 4289 0000D311 E84700 <1> call .set_ax_function_0201_or_0301 4290 0000D314 CD13 <1> int 13h 4291 0000D316 7313 <1> jnc .chs_sectorseg_done 4292 <1> 4293 0000D318 31C0 <1> xor ax, ax 4294 0000D31A CD13 <1> int 13h 4295 0000D31C 7303E9DCE8 <1> jc .err 4296 <1> 4297 0000D321 E83700 <1> call .set_ax_function_0201_or_0301 4298 0000D324 CD13 <1> int 13h 4299 0000D326 7303E9D2E8 <1> jc .err 4300 <1> .chs_sectorseg_done: 4301 <1> 4302 0000D32B 31F6 <1> xor si, si 4303 0000D32D 07 <1> pop es 4304 0000D32E 57 <1> push di 4305 0000D32F 31FF <1> xor di, di 4306 0000D331 8B0E[8B57] <1> mov cx, word [load_sectorsize] 4307 0000D335 8E1E[6457] <1> mov ds, word [load_sectorseg] 4308 0000D339 F3A4 <1> rep movsb 4309 0000D33B 5F <1> pop di 4310 <1> 4311 0000D33C 16 <1> push ss 4312 0000D33D 1F <1> pop ds 4313 <1> .done: 4314 <1> ; increment segment 4315 0000D33E 8CC3 <1> mov bx, es 4316 0000D340 031E[6A57] <1> add bx, word [load_sectorsizepara] 4317 <1> 4318 0000D344 5E <1> pop si 4319 0000D345 58 <1> pop ax 4320 0000D346 59 <1> pop cx 4321 0000D347 5A <1> pop dx 4322 <1> ; increment LBA sector number 4323 0000D348 40 <1> inc ax 4324 0000D349 7501 <1> jne @F 4325 0000D34B 42 <1> inc dx 4326 <1> @@: 4327 0000D34C 89EC5D <1> lleave code 4328 0000D34F C3 <1> retn 4329 <1> 4330 <1> .set_ah_function_42_or_43: 4331 0000D350 B442 <1> mov ah, 42h 4332 0000D352 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 4333 0000D356 7502 <1> jnz @F 4334 0000D358 B443 <1> mov ah, 43h 4335 <1> @@: 4336 0000D35A C3 <1> retn 4337 <1> 4338 <1> .set_ax_function_0201_or_0301: 4339 0000D35B B001 <1> mov al, 1 4340 <1> .set_ah_function_02_or_03: 4341 0000D35D B402 <1> mov ah, 02h 4342 0000D35F F646FE01 <1> test byte [bp + ?is_read_bit0], 1 4343 0000D363 7502 <1> jnz @F 4344 0000D365 B403 <1> mov ah, 03h 4345 <1> @@: 4346 0000D367 C3 <1> retn 4347 <1> 4348 <1> lleave ctx 4349 <1> 4350 <1> 4351 <1> %if _INPUT_FILE_BOOT 4352 <1> yy_boot: 4353 0000D368 E8ECE3 <1> call init_bootcmd 4354 <1> 4355 0000D36B E8B7EA <1> call parseloadunit_default_sdp 4356 0000D36E 7510 <1> jnz .have_filename 4357 <1> 4358 0000D370 BA[4626] <1> mov dx, msg.yy_requires_filename 4359 <1> .disp_error_1: 4360 0000D373 B80002 <1> mov ax, 0200h 4361 0000D376 E830AF <1> call setrc 4362 0000D379 E831CC <1> call putsz_error 4363 0000D37C FF26[F20A] <1> jmp near word [errret] 4364 <1> 4365 <1> .have_filename: 4366 0000D380 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 4367 0000D385 740C <1> jz @F 4368 0000D387 833E[A05A]03 <1> cmp word [load_input_file.active], _INPUT_FILE_BOOT - 1 4369 0000D38C 7205 <1> jb @F 4370 <1> 4371 0000D38E BA[8626] <1> mov dx, msg.yy_too_many_handles 4372 0000D391 EBE0 <1> jmp .disp_error_1 4373 <1> @@: 4374 <1> 4375 <1> ; al was = '/' or '\' or first pathname's first character 4376 <1> ; si-> next char 4377 0000D393 3C3A <1> cmp al, ':' 4378 0000D395 7522 <1> jne .not_yy_goto_subfunction 4379 <1> 4380 0000D397 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 4381 0000D39C 7416 <1> jz @F 4382 <1> 4383 0000D39E E83EC6 <1> call skipwhite 4384 0000D3A1 4E <1> dec si 4385 0000D3A2 8936[A25A] <1> mov word [load_input_file.goto_offset], si 4386 <1> 4387 0000D3A6 E81703 <1> call yy_calculate_structure 4388 0000D3A9 E8F402 <1> call yy_boot_get.bx 4389 0000D3AC 800E[D800]80 <1> setopt [internalflags3], dif3_partition_changed 4390 0000D3B1 E97F02 <1> jmp load_yy_finish 4391 <1> 4392 <1> @@: 4393 0000D3B4 BA[CC26] <1> mov dx, msg.yy_no_file 4394 0000D3B7 EBBA <1> jmp .disp_error_1 4395 <1> .not_yy_goto_subfunction: 4396 <1> 4397 0000D3B9 BB[CC5A] <1> mov bx, load_yyname_input 4398 0000D3BC E83BE6 <1> call bootcmd.pathname_parse_super 4399 <1> 4400 0000D3BF 8326[A25A]00 <1> and word [load_input_file.goto_offset], 0 4401 0000D3C4 E819C6 <1> call skipwh0 4402 0000D3C7 8936[320C] <1> mov word [if_exists_then_address], si 4403 0000D3CB E8ABC5 <1> call iseol?_or_then 4404 0000D3CE 7427 <1> je .not_yy_goto 4405 <1> 4406 0000D3D0 3C3A <1> cmp al, ':' 4407 0000D3D2 7403E986AE <1> jne error 4408 <1> 4409 0000D3D7 E805C6 <1> call skipwhite 4410 0000D3DA 4E <1> dec si 4411 0000D3DB 8936[A25A] <1> mov word [load_input_file.goto_offset], si 4412 <1> 4413 <1> @@: 4414 0000D3DF AC <1> lodsb 4415 0000D3E0 3C20 <1> cmp al, 32 4416 0000D3E2 7409 <1> je @F 4417 0000D3E4 3C09 <1> cmp al, 9 4418 0000D3E6 7405 <1> je @F 4419 0000D3E8 E89FC5 <1> call iseol? 4420 0000D3EB 75F2 <1> jne @B 4421 <1> @@: 4422 0000D3ED E8F0C5 <1> call skipwh0 4423 0000D3F0 8936[320C] <1> mov word [if_exists_then_address], si 4424 0000D3F4 E89EC5 <1> call chkeol_or_then 4425 <1> 4426 <1> .not_yy_goto: 4427 <1> 4428 0000D3F7 F606[D800]07 <1> testopt [internalflags3], dif3_load_is_dp 4429 0000D3FC 7555 <1> jnz .load_yy_from_ldp 4430 <1> 4431 0000D3FE 8A1E[B25A] <1> mov bl, [load_partition] 4432 0000D402 803E[C057]80 <1> cmp byte [load_unit], 80h 4433 0000D407 7226 <1> jb .p_f_is_diskette 4434 0000D409 84DB <1> test bl, bl ; partition specified ? 4435 0000D40B 7503E94DAE <1> jz error ; no, error --> 4436 <1> 4437 0000D410 E89BFB <1> call query_geometry 4438 <1> 4439 0000D413 B9[7BD4] <1> mov cx, load_yy_from_partition 4440 0000D416 E8EDF9 <1> call scan_partitions 4441 0000D419 F606[DB00]08 <1> testopt [internalflags3], dif3_in_if 4442 0000D41E 7403E9FA97 <1> jnz if_exists_not_found 4443 0000D423 BA[B116] <1> mov dx, msg.boot_partition_not_found 4444 0000D426 B80602 <1> mov ax, 0206h 4445 0000D429 E87DAE <1> call setrc 4446 0000D42C E9E0E7 <1> jmp bootcmd.fail 4447 <1> 4448 <1> 4449 <1> .p_f_is_diskette: 4450 0000D42F 84DB <1> test bl, bl ; partition specified ? 4451 0000D431 7403E927AE <1> jnz error ; yes, error --> 4452 <1> 4453 0000D436 E875FB <1> call query_geometry 4454 <1> 4455 0000D439 31C0 <1> xor ax, ax 4456 0000D43B 31D2 <1> xor dx, dx 4457 <1> @@: 4458 0000D43D 8B1E[4A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 4459 0000D441 52 <1> push dx 4460 0000D442 50 <1> push ax 4461 0000D443 E830FD <1> call read_ae_512_bytes 4462 <1> 4463 0000D446 26813EFE0155AA <1> cmp word [es:510], 0AA55h 4464 0000D44D 7510 <1> jne boot_sigmismatch 4465 0000D44F 58 <1> pop ax 4466 0000D450 5A <1> pop dx 4467 <1> 4468 0000D451 EB62 <1> jmp load_yy_common 4469 <1> 4470 <1> 4471 <1> .load_yy_from_ldp: 4472 0000D453 E858FB <1> call query_geometry 4473 0000D456 A1[A85A] <1> mov ax, word [load_partition_sector] 4474 0000D459 8B16[AA5A] <1> mov dx, word [load_partition_sector + 2] 4475 0000D45D EBDE <1> jmp @B 4476 <1> %endif 4477 <1> 4478 <1> 4479 <1> boot_sigmismatch: 4480 0000D45F BA[4B15] <1> mov dx, msg.bootfail_sig 4481 0000D462 B80702 <1> mov ax, 0207h 4482 <1> @@: 4483 0000D465 E841AE <1> call setrc 4484 0000D468 E9A4E7 <1> jmp bootcmd.fail 4485 <1> 4486 <1> boot_codemismatch: 4487 0000D46B BA[AF15] <1> mov dx, msg.bootfail_code 4488 0000D46E B80802 <1> mov ax, 0208h 4489 0000D471 EBF2 <1> jmp @B 4490 <1> 4491 <1> boot_secsizemismatch: 4492 0000D473 BA[D615] <1> mov dx, msg.bootfail_secsizediffer 4493 0000D476 B80902 <1> mov ax, 0209h 4494 0000D479 EBEA <1> jmp @B 4495 <1> 4496 <1> 4497 <1> %if _INPUT_FILE_BOOT 4498 <1> ; INP: es:si -> partition table entry, 4499 <1> ; si = load_partition_table .. load_partition_table+48, 4500 <1> ; es = ss 4501 <1> ; bp + di -> above part table metadata, 4502 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4503 <1> ; dwo [bp + di - 8] = base (current table position) 4504 <1> ; CHG: ax, bx, (cx), dx 4505 <1> load_yy_from_partition: 4506 <1> d4 call d4message 4507 <1> d4 asciz "In load_yy_from_partition",13,10 4508 <1> 4509 0000D47B A0[B35A] <1> mov al, byte [load_current_partition] 4510 0000D47E 3A06[B25A] <1> cmp al, byte [load_partition] 4511 0000D482 7401 <1> je .gotit 4512 0000D484 C3 <1> retn 4513 <1> 4514 <1> .gotit: 4515 <1> d4 call d4message 4516 <1> d4 asciz "In load_yy_from_partition.gotit",13,10 4517 <1> 4518 0000D485 8B43F8 <1> mov ax, [bp + di - 8] 4519 0000D488 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4520 <1> 4521 0000D48B 26034408 <1> add ax, [es:si + 8] 4522 0000D48F 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4523 <1> 4524 0000D493 26894408 <1> mov word [es:si + 8], ax 4525 0000D497 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4526 <1> 4527 0000D49B 89EC <1> mov sp, bp 4528 0000D49D 5D <1> pop bp ; restore bp (scan_partitions) 4529 0000D49E 5B <1> pop bx ; discard ret address (scan_partitions) 4530 <1> 4531 <1> ; dx:ax = absolute sector number 4532 0000D49F 8B1E[4A0A] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 4533 0000D4A3 50 <1> push ax 4534 0000D4A4 52 <1> push dx 4535 0000D4A5 E8CEFC <1> call read_ae_512_bytes ; load partition boot sector 4536 <1> 4537 0000D4A8 26813EFE0155AA <1> cmp word [es:510], 0AA55h 4538 0000D4AF 75AE <1> jne boot_sigmismatch 4539 <1> 4540 0000D4B1 31C9 <1> xor cx, cx 4541 <1> ; cmp word [es:0], cx 4542 <1> ; je boot_codemismatch 4543 <1> 4544 0000D4B3 5A <1> pop dx 4545 0000D4B4 58 <1> pop ax 4546 <1> 4547 <1> ; dx:ax = boot sector 4548 <1> ; byte [load_unit] = unit 4549 <1> ; es:0-> read sector 4550 <1> load_yy_common: 4551 0000D4B5 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 4552 0000D4B9 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 4553 <1> 4554 0000D4BE 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 4555 0000D4C1 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 4556 0000D4C6 75AB <1> jne boot_secsizemismatch 4557 <1> 4558 <1> ; preserve some variables from our pseudo BPB 4559 0000D4C8 31C0 <1> xor ax, ax 4560 0000D4CA FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 4561 0000D4CD 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 4562 0000D4D2 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 4563 0000D4D5 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 4564 <1> 4565 0000D4DA 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 4566 0000D4DD D1EB <1> shr bx, 1 4567 0000D4DF 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 4568 <1> 4569 0000D4E2 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 4570 0000D4E7 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 4571 0000D4EA 7407 <1> je .is_fat32 4572 0000D4EC 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 4573 0000D4F1 EB05 <1> jmp short .was_fat1612 4574 <1> .is_fat32: 4575 0000D4F3 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 4576 <1> .was_fat1612: 4577 <1> 4578 0000D4F8 06 <1> push es 4579 0000D4F9 1E <1> push ds 4580 0000D4FA 06 <1> push es 4581 0000D4FB 1F <1> pop ds 4582 0000D4FC 31F6 <1> xor si, si ; -> BPB from boot partition 4583 0000D4FE 16 <1> push ss 4584 0000D4FF 07 <1> pop es 4585 0000D500 BF[8057] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 4586 0000D503 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 4587 0000D506 F3A4 <1> rep movsb ; get the BPB 4588 <1> 4589 0000D508 1F <1> pop ds 4590 0000D509 800E[D800]80 <1> setopt [internalflags3], dif3_partition_changed 4591 <1> 4592 0000D50E 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 4593 0000D511 740B <1> je @F ; is FAT32 --> 4594 0000D513 BE[A457] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 4595 0000D516 BF[C057] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 4596 0000D519 B91A00 <1> mov cx, BPBN_size 4597 0000D51C F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 4598 <1> ; to where the FAT32 BPBN lives 4599 <1> @@: 4600 0000D51E 07 <1> pop es 4601 <1> 4602 <1> .outofmem: equ query_geometry.out_of_memory_error 4603 <1> 4604 0000D51F FF36[4A0A] <1> push word [auxbuff_segorsel] 4605 0000D523 8F46F8 <1> pop word [bp + lsvFATSeg] 4606 0000D526 804EE702 <1> or byte [bp + ldFlags], ldfFATInvalid 4607 0000D52A B8FFFF <1> mov ax, -1 4608 0000D52D 8946F4 <1> mov word [bp + lsvFATSector], ax 4609 0000D530 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 4610 <1> 4611 0000D533 E8C805 <1> call initialise_fs 4612 <1> 4613 0000D536 C606[B55A]00 <1> mov byte [load_check_dir_attr], 0 4614 0000D53B 8B36[CC5A] <1> mov si, word [load_yyname_input] 4615 0000D53F 803C2F <1> cmp byte [si], '/' 4616 0000D542 7501 <1> jne @F 4617 0000D544 46 <1> inc si 4618 <1> @@: 4619 0000D545 803C00 <1> cmp byte [si], 0 4620 0000D548 750C <1> jne @F 4621 <1> ..@yy_filename_empty: 4622 0000D54A BA[6726] <1> mov dx, msg.yy_filename_empty 4623 0000D54D B80A02 <1> mov ax, 020Ah 4624 0000D550 E856AD <1> call setrc 4625 0000D553 E9B9E6 <1> jmp bootcmd.fail 4626 <1> @@: 4627 0000D556 16 <1> push ss 4628 0000D557 07 <1> pop es 4629 0000D558 E8DAEB <1> call boot_parse_fn ; get next pathname 4630 0000D55B 3C2F <1> cmp al, '/' 4631 0000D55D 7509 <1> jne @F 4632 0000D55F C606[B55A]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4633 0000D564 8936[CE5A] <1> mov word [load_yyname_next], si 4634 <1> @@: 4635 <1> 4636 0000D568 BFFFFF <1> mov di, -1 4637 0000D56B 89FE <1> mov si, di 4638 0000D56D 897EF4 <1> mov [bp + lsvFATSector], di 4639 0000D570 8976F6 <1> mov [bp + lsvFATSector + 2], si 4640 <1> 4641 0000D573 31C0 <1> xor ax, ax 4642 0000D575 31D2 <1> xor dx, dx 4643 <1> 4644 <1> scan_dir_yyname_loop: 4645 0000D577 8946EC <1> mov word [bp + ldDirCluster], ax 4646 0000D57A 8956EE <1> mov word [bp + ldDirCluster + 2], dx 4647 <1> 4648 0000D57D 16 <1> push ss 4649 0000D57E 07 <1> pop es 4650 0000D57F BB[0058] <1> mov bx, load_yy_direntry 4651 <1> 4652 0000D582 E881F6 <1> call scan_dir_aux_for_file 4653 <1> 4654 0000D585 803E[B55A]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 4655 0000D58A 753A <1> jne got_yyentry 4656 <1> 4657 0000D58C 56 <1> push si 4658 0000D58D 57 <1> push di 4659 0000D58E C606[B55A]00 <1> mov byte [load_check_dir_attr], 0 4660 0000D593 8B36[CE5A] <1> mov si, word [load_yyname_next] 4661 0000D597 803C00 <1> cmp byte [si], 0 4662 0000D59A 7502 <1> jne @F 4663 0000D59C EBAC <1> jmp ..@yy_filename_empty 4664 <1> @@: 4665 0000D59E 06 <1> push es 4666 0000D59F 16 <1> push ss 4667 0000D5A0 07 <1> pop es 4668 0000D5A1 E891EB <1> call boot_parse_fn ; get next pathname 4669 0000D5A4 07 <1> pop es 4670 0000D5A5 3C2F <1> cmp al, '/' 4671 0000D5A7 7509 <1> jne @F 4672 0000D5A9 C606[B55A]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4673 0000D5AE 8936[CE5A] <1> mov word [load_yyname_next], si 4674 <1> @@: 4675 0000D5B2 5F <1> pop di 4676 0000D5B3 5E <1> pop si 4677 <1> 4678 0000D5B4 31D2 <1> xor dx, dx 4679 0000D5B6 268B471A <1> mov ax, [es:bx + deClusterLow] 4680 <1> ; = first cluster (not FAT32) 4681 0000D5BA 807EE620 <1> cmp byte [bp + ldFATType], 32 4682 0000D5BE 7504 <1> jne @F 4683 0000D5C0 268B5714 <1> mov dx, [es:bx + deClusterHigh] 4684 <1> ; dx:ax = first cluster (FAT32) 4685 <1> @@: 4686 <1> 4687 0000D5C4 EBB1 <1> jmp scan_dir_yyname_loop 4688 <1> 4689 <1> 4690 <1> got_yyentry: 4691 <1> 4692 <1> 4693 <1> ; (boot32.asm code starts here) 4694 <1> 4695 0000D5C6 8B1E[1C58] <1> mov bx, [load_yy_direntry + deSize] 4696 0000D5CA A1[1E58] <1> mov ax, [load_yy_direntry + deSize + 2] 4697 <1> ; ax:bx = file size 4698 0000D5CD 8A16[0C58] <1> mov dl, [load_yy_direntry + 12] 4699 <1> ; dl = FAT+ size bits 4700 0000D5D1 88D6 <1> mov dh, dl 4701 0000D5D3 81E207E0 <1> and dx, 0E007h ; obtain bits 7-5 and 2-0 4702 0000D5D7 740C <1> jz @F 4703 0000D5D9 BA[5927] <1> mov dx, msg.yy_too_large 4704 0000D5DC B80B02 <1> mov ax, 020Bh 4705 0000D5DF E8C7AC <1> call setrc 4706 0000D5E2 E92AE6 <1> jmp bootcmd.fail 4707 <1> @@: 4708 0000D5E5 895EC4 <1> mov word [bp + ldFileSize], bx 4709 0000D5E8 8946C6 <1> mov word [bp + ldFileSize + 2], ax 4710 <1> 4711 0000D5EB 09D8 <1> or ax, bx 4712 0000D5ED 7516 <1> jnz @F 4713 <1> 4714 0000D5EF F606[DB00]08 <1> testopt [internalflags3], dif3_in_if 4715 0000D5F4 7403E92496 <1> jnz if_exists_not_found 4716 0000D5F9 BA[7527] <1> mov dx, msg.yy_empty 4717 0000D5FC B80C02 <1> mov ax, 020Ch 4718 0000D5FF E8A7AC <1> call setrc 4719 0000D602 E90AE6 <1> jmp bootcmd.fail 4720 <1> @@: 4721 <1> 4722 <1> ; get starting cluster of file 4723 0000D605 31D2 <1> xor dx, dx 4724 0000D607 A1[1A58] <1> mov ax, [load_yy_direntry + deClusterLow] 4725 <1> ; = first cluster (not FAT32) 4726 <1> 4727 0000D60A 807EE620 <1> cmp byte [bp + ldFATType], 32 4728 0000D60E 7504 <1> jne @F 4729 0000D610 8B16[1458] <1> mov dx, [load_yy_direntry + deClusterHigh] 4730 <1> ; dx:ax = first cluster (FAT32) 4731 <1> @@: 4732 <1> 4733 0000D614 80E60F <1> and dh, 0Fh 4734 0000D617 8946F0 <1> mov word [bp + lsvFirstCluster], ax 4735 0000D61A 8956F2 <1> mov word [bp + lsvFirstCluster + 2], dx 4736 <1> 4737 0000D61D 8946C8 <1> mov word [bp + ldCurrentCluster], ax 4738 0000D620 8956CA <1> mov word [bp + ldCurrentCluster + 2], dx 4739 0000D623 31DB <1> xor bx, bx 4740 0000D625 895ECC <1> mov word [bp + ldCurrentSeek], bx 4741 0000D628 895ECE <1> mov word [bp + ldCurrentSeek + 2], bx 4742 0000D62B E8A6F7 <1> call check_clust 4743 0000D62E 7303E90805 <1> jc error_badchain 4744 <1> 4745 <1> load_yy_finish: 4746 0000D633 31ED <1> xor bp, bp 4747 0000D635 31DB <1> xor bx, bx 4748 0000D637 BE[4057] <1> mov si, load_data_lowest 4749 0000D63A B95000 <1> mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 4750 <1> 4751 0000D63D BF[2058] <1> mov di, load_input_file 4752 0000D640 F606[D700]02 <1> testopt [internalflags2], dif2_input_file_boot 4753 0000D645 7415 <1> jz @F 4754 0000D647 8B1E[A05A] <1> mov bx, word [load_input_file.active] 4755 0000D64B 43 <1> inc bx 4756 0000D64C B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 4757 0000D64F F7E3 <1> mul bx 4758 <1> ; test dx, dx 4759 <1> ; jnz error 4760 0000D651 01C7 <1> add di, ax 4761 0000D653 8B5586 <1> mov dx, word [di - LOAD_INPUT_FILE_SIZE - LOADDATA3 + ldFATType] 4762 0000D656 81E200F0 <1> and dx, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 4764 0000D65A 09D5 <1> or bp, dx 4765 <1> 4766 <1> @@: 4767 <1> 4768 0000D65C 092E[6657] <1> or word [load_data - LOADDATA2 + ldFATType], bp 4769 0000D660 16 <1> push ss 4770 0000D661 07 <1> pop es 4771 0000D662 F3A5 <1> rep movsw 4772 <1> 4773 <1> ; hazard: this uses load_input_file and 4774 <1> ; load_data_lowest if we are already in 4775 <1> ; a yy_boot script. 4776 0000D664 8026[DB00]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 4777 0000D669 E81CD8 <1> call yy_reset_buf 4778 <1> 4779 0000D66C 891E[A05A] <1> mov word [load_input_file.active], bx 4780 0000D670 800E[D700]02 <1> setopt [internalflags2], dif2_input_file_boot 4781 <1> 4782 0000D675 8B36[A25A] <1> mov si, word [load_input_file.goto_offset] 4783 0000D679 85F6 <1> test si, si 4784 0000D67B 7403E95CD9 <1> jnz cmd_goto.yy_entry 4785 <1> 4786 0000D680 F606[DB00]08 <1> testopt [internalflags3], dif3_in_if 4787 0000D685 7403E9A095 <1> jnz if_exists_found_open 4788 0000D68A C3 <1> retn 4789 <1> 4790 <1> 4791 <1> ; INP: [load_input_file], dif2_input_file_boot 4792 <1> ; OUT: most recent file closed, flag cleared if no longer file 4793 <1> ; CHG: di, bx, ax 4794 <1> yy_boot_close_file: 4795 0000D68B A1[A05A] <1> mov ax, word [load_input_file.active] 4796 0000D68E 48 <1> dec ax 4797 0000D68F 790B <1> jns .next 4798 0000D691 8026[D700]FD <1> clropt [internalflags2], dif2_input_file_boot 4799 0000D696 800E[D700]04 <1> setopt [internalflags2], dif2_closed_input_file_boot 4800 0000D69B C3 <1> retn 4801 <1> .next: 4802 0000D69C A3[A05A] <1> mov word [load_input_file.active], ax 4803 0000D69F C3 <1> retn 4804 <1> 4805 <1> 4806 <1> ; INP: bx -> load data to get 4807 <1> ; OUT: [load_data_lowest] = LOADDATA[123], lsv, BPB 4808 <1> ; CHG: es, ax, dx, di, si 4809 <1> yy_boot_get.bx: 4810 0000D6A0 16 <1> push ss 4811 0000D6A1 07 <1> pop es 4812 <1> 4813 0000D6A2 51 <1> push cx 4814 0000D6A3 BF[4057] <1> mov di, load_data_lowest 4815 0000D6A6 B95000 <1> mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 4816 0000D6A9 89DE <1> mov si, bx 4817 0000D6AB F3A5 <1> rep movsw 4818 0000D6AD 59 <1> pop cx 4819 0000D6AE C3 <1> retn 4820 <1> 4821 <1> 4822 <1> ; INP: [load_data_lowest] = LOADDATA3 4823 <1> ; bx -> load data to set 4824 <1> ; CHG: es, ax, dx, di, si 4825 <1> ; Note: Preserves flags (ZF, CF) 4826 <1> yy_boot_update.bx: 4827 0000D6AF 9C <1> pushf 4828 <1> 4829 0000D6B0 16 <1> push ss 4830 0000D6B1 07 <1> pop es 4831 <1> 4832 0000D6B2 51 <1> push cx 4833 0000D6B3 BE[4057] <1> mov si, load_data_lowest 4834 0000D6B6 B90800 <1> mov cx, LOADDATA3_size >> 1 4835 0000D6B9 89DF <1> mov di, bx 4836 0000D6BB F3A5 <1> rep movsw 4837 0000D6BD 59 <1> pop cx 4838 0000D6BE 9D <1> popf ; ZF, CF 4839 0000D6BF C3 <1> retn 4840 <1> 4841 <1> 4842 <1> ; INP: word [load_input_file.active] 4843 <1> ; OUT: bx -> load input data structure 4844 <1> ; CHG: ax 4845 <1> yy_calculate_structure: 4846 0000D6C0 52 <1> push dx 4847 0000D6C1 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 4848 0000D6C4 F726[A05A] <1> mul word [load_input_file.active] 4849 <1> 4850 <1> ; test dx, dx 4851 <1> ; jnz .error 4852 0000D6C8 5A <1> pop dx 4853 <1> 4854 0000D6C9 93 <1> xchg bx, ax 4855 0000D6CA 81C3[2058] <1> add bx, load_input_file 4856 0000D6CE C3 <1> retn 4857 <1> 4858 <1> 4859 <1> guard_auxbuff_return: 4860 0000D6CF F606[DB00]70 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 | dif3_auxbuff_guarded_3 4863 0000D6D4 7506 <1> jnz @F 4864 0000D6D6 800E[DB00]10 <1> setopt [internalflags3], dif3_auxbuff_guarded_1 4865 <1> ; (NC) 4866 0000D6DB C3 <1> retn 4867 <1> 4868 <1> @@: 4869 0000D6DC BA[F21C] <1> mov dx, msg.guard_auxbuff_error 4870 0000D6DF E8D1C8 <1> call putsz 4871 0000D6E2 F9 <1> stc ; (CY) 4872 0000D6E3 C3 <1> retn 4873 <1> 4874 <1> 4875 <1> ; INP: [load_input_file] = active file 4876 <1> ; cx = how many bytes to read 4877 <1> ; ds:dx -> buffer 4878 <1> ; OUT: CY if error reading 4879 <1> ; NC if success 4880 <1> ; ax = how many bytes read 4881 <1> ; CHG: bx, cx 4882 <1> ; STT: ds = es = ss 4883 <1> yy_boot_read: 4884 0000D6E4 E8D9FF <1> call yy_calculate_structure 4885 <1> 4886 <1> .bx: 4887 <1> lframe near 4888 <1> lvar word, length 4889 <1> lvar word, length_this_cluster 4890 <1> lvar dword, bytes_per_cluster 4891 <1> lvar dword, how_far_in_cluster 4892 0000D6E7 5589E58D66F4 <1> lenter 4893 <1> lvar dword, pointer 4894 0000D6ED 1E <1> push ds 4895 0000D6EE 52 <1> push dx 4896 <1> lvar word, load_input_file_structure 4897 0000D6EF 53 <1> push bx 4898 0000D6F0 31C0 <1> xor ax, ax 4899 <1> lvar word, did_guard_auxbuff 4900 0000D6F2 50 <1> push ax 4901 <1> lvar word, read_how_many 4902 0000D6F3 50 <1> push ax 4903 0000D6F4 52 <1> push dx 4904 0000D6F5 56 <1> push si 4905 0000D6F6 57 <1> push di 4906 <1> 4907 0000D6F7 FF36[F20A] <1> push word [errret] 4908 0000D6FB FF36[F40A] <1> push word [throwret] 4909 0000D6FF FF36[F60A] <1> push word [throwsp] 4910 <1> 4911 0000D703 55 <1> push bp 4912 <1> 4913 0000D704 C706[F20A][7AD8] <1> mov word [errret], .err_ret 4914 0000D70A C706[F40A][7AD8] <1> mov word [throwret], .err_ret 4915 0000D710 8926[F60A] <1> mov word [throwsp], sp 4916 <1> 4917 <1> ; bx -> load_input_file structure 4918 0000D714 E889FF <1> call yy_boot_get.bx 4919 <1> 4920 0000D717 E8B5FF <1> call guard_auxbuff_return 4921 0000D71A 7303E93201 <1> jc .error 4922 0000D71F FF46EC <1> inc word [bp + ?did_guard_auxbuff] 4923 <1> 4924 0000D722 8B16[4657] <1> mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 4925 0000D726 A1[4457] <1> mov ax, word [load_data - LOADDATA2 + ldFileSize] 4926 <1> 4927 0000D729 2B06[4C57] <1> sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 4928 0000D72D 1B16[4E57] <1> sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 4929 <1> ; dx:ax = read at most this many bytes 4930 0000D731 7304 <1> jnc @F 4931 <1> ; file size below current seek 4932 0000D733 31C0 <1> xor ax, ax 4933 0000D735 31D2 <1> xor dx, dx ; = read at most zero bytes 4934 <1> @@: 4935 0000D737 85D2 <1> test dx, dx 4936 0000D739 7506 <1> jnz .use_count 4937 0000D73B 39C8 <1> cmp ax, cx ; dx:ax >= cx ? 4938 0000D73D 7302 <1> jae .use_count ; yes, use cx as count to read 4939 0000D73F 89C1 <1> mov cx, ax ; no, use (dx:)ax as count to read 4940 <1> .use_count: 4941 0000D741 85C9 <1> test cx, cx ; any more to read ? 4942 0000D743 7503E90801 <1> jz .success ; no, reached the end --> 4943 0000D748 894EFE <1> mov word [bp + ?length], cx 4944 <1> 4945 <1> .next_cluster: 4946 0000D74B 8B36[4E57] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 4947 0000D74F 8B3E[4C57] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 4948 0000D753 A1[8B57] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 4949 0000D756 F726[6857] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 4950 <1> 4951 0000D75A 8946F8 <1> mov word [bp + ?bytes_per_cluster], ax 4952 0000D75D 8956FA <1> mov word [bp + ?bytes_per_cluster + 2], dx 4953 0000D760 83E801 <1> sub ax, 1 4954 0000D763 83DA00 <1> sbb dx, 0 4955 0000D766 21D6 <1> and si, dx 4956 0000D768 21C7 <1> and di, ax ; how far are we into cluster 4957 <1> 4958 0000D76A 897EF4 <1> mov word [bp + ?how_far_in_cluster], di 4959 0000D76D 8976F6 <1> mov word [bp + ?how_far_in_cluster + 2], si 4960 <1> 4961 0000D770 F7DE <1> neg si 4962 0000D772 F7DF <1> neg di 4963 0000D774 83DE00 <1> sbb si, byte 0 ; neg si:di 4964 <1> 4965 0000D777 037EF8 <1> add di, word [bp + ?bytes_per_cluster] 4966 0000D77A 1376FA <1> adc si, word [bp + ?bytes_per_cluster + 2] 4967 <1> ; cluster size - how far we are 4968 <1> ; = how much to read from this cluster 4969 0000D77D 85F6 <1> test si, si 4970 0000D77F 7506 <1> jnz .use_count_2 4971 0000D781 39CF <1> cmp di, cx 4972 0000D783 7302 <1> jae .use_count_2 4973 0000D785 89F9 <1> mov cx, di 4974 <1> .use_count_2: 4975 0000D787 894EFC <1> mov word [bp + ?length_this_cluster], cx 4976 <1> 4977 <1> .next_sector: 4978 0000D78A A1[4857] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 4979 0000D78D 8B16[4A57] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 4980 0000D791 E840F6 <1> call check_clust 4981 0000D794 7303E9B800 <1> jc .error 4982 0000D799 E857F5 <1> call clust_to_first_sector 4983 0000D79C 8B1E[8B57] <1> mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 4984 0000D7A0 8B7EF4 <1> mov di, word [bp + ?how_far_in_cluster] 4985 0000D7A3 8B76F6 <1> mov si, word [bp + ?how_far_in_cluster + 2] 4986 0000D7A6 87D6 <1> xchg dx, si 4987 0000D7A8 97 <1> xchg ax, di 4988 0000D7A9 F7F3 <1> div bx 4989 <1> ; dx = byte offset into sector 4990 <1> ; ax = sector offset into cluster's data 4991 0000D7AB 01C7 <1> add di, ax 4992 0000D7AD 83D600 <1> adc si, 0 4993 0000D7B0 87D6 <1> xchg dx, si 4994 0000D7B2 97 <1> xchg ax, di 4995 <1> ; dx:ax = sector in fs 4996 <1> ; si = byte offset 4997 <1> 4998 0000D7B3 89F1 <1> mov cx, si ; = byte offset 4999 0000D7B5 F7D9 <1> neg cx ; - byte offset 5000 0000D7B7 01D9 <1> add cx, bx ; sector size - byte offset 5001 <1> ; = length this sector 5002 0000D7B9 3B4EFC <1> cmp cx, word [bp + ?length_this_cluster] 5003 0000D7BC 7603 <1> jbe @F ; sector has less than requested --> 5004 0000D7BE 8B4EFC <1> mov cx, word [bp + ?length_this_cluster] 5005 <1> ; fill entire remaining request 5006 <1> @@: 5007 0000D7C1 8B1E[4A0A] <1> mov bx, word [auxbuff_segorsel] 5008 0000D7C5 E8C0F9 <1> call read_sector 5009 0000D7C8 1E <1> push ds 5010 <1> 5011 0000D7C9 06 <1> push es 5012 <1> ; es:si -> data in sector buffer 5013 0000D7CA C47EF0 <1> les di, [bp + ?pointer] 5014 <1> ; es:di -> buffer 5015 0000D7CD 014EEA <1> add word [bp + ?read_how_many], cx 5016 0000D7D0 294EFC <1> sub word [bp + ?length_this_cluster], cx 5017 0000D7D3 294EFE <1> sub word [bp + ?length], cx 5018 0000D7D6 010E[4C57] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 5019 0000D7DA 8316[4E57]00 <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 5020 0000D7DF 014EF4 <1> add word [bp + ?how_far_in_cluster], cx 5021 0000D7E2 8356F600 <1> adc word [bp + ?how_far_in_cluster + 2], 0 5022 0000D7E6 1F <1> pop ds ; ds:si -> data in sector buffer 5023 0000D7E7 F3A4 <1> rep movsb ; copy 5024 0000D7E9 897EF0 <1> mov word [bp + ?pointer], di 5025 <1> ; update pointer 5026 0000D7EC 1F <1> pop ds 5027 <1> 5028 0000D7ED 837EFC00 <1> cmp word [bp + ?length_this_cluster], 0 5029 0000D7F1 7597 <1> jne .next_sector 5030 <1> 5031 0000D7F3 8B7EF8 <1> mov di, word [bp + ?bytes_per_cluster] 5032 0000D7F6 8B76FA <1> mov si, word [bp + ?bytes_per_cluster + 2] 5033 0000D7F9 397EF4 <1> cmp word [bp + ?how_far_in_cluster], di 5034 0000D7FC 7505 <1> jne @F 5035 0000D7FE 3976F6 <1> cmp word [bp + ?how_far_in_cluster + 2], si 5036 0000D801 7408 <1> je @FF 5037 <1> @@: 5038 0000D803 837EFE00 <1> cmp word [bp + ?length], 0 5039 0000D807 7548 <1> jne .error 5040 0000D809 EB45 <1> jmp .success 5041 <1> 5042 <1> @@: 5043 0000D80B A1[4857] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 5044 0000D80E 8B16[4A57] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 5045 0000D812 E8BFF5 <1> call check_clust 5046 0000D815 723A <1> jc .error 5047 0000D817 E806F5 <1> call clust_next.dxax 5048 0000D81A 731B <1> jnc @F ; (NC) --> 5049 0000D81C B8F6FF <1> mov ax, 0FFF8h - 2 5050 0000D81F BAFF0F <1> mov dx, 0FFFh 5051 0000D822 8B3E[4C57] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 5052 0000D826 8B36[4E57] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5053 0000D82A 3B36[4457] <1> cmp si, word [load_data - LOADDATA2 + ldFileSize] 5054 0000D82E 7506 <1> jne .set_error 5055 0000D830 3B3E[4657] <1> cmp di, word [load_data - LOADDATA2 + ldFileSize + 2] 5056 0000D834 7401 <1> je .do_not_set_error ; if same then NC --> 5057 <1> .set_error: 5058 0000D836 F9 <1> stc 5059 <1> .do_not_set_error: 5060 <1> @@: 5061 0000D837 9C <1> pushf 5062 0000D838 83C002 <1> add ax, 2 5063 0000D83B 83D200 <1> adc dx, 0 5064 0000D83E A3[4857] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 5065 0000D841 8916[4A57] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 5066 0000D845 9D <1> popf ; CF 5067 0000D846 7209 <1> jc .error 5068 0000D848 8B4EFE <1> mov cx, word [bp + ?length] 5069 0000D84B E303 <1> jcxz .success 5070 0000D84D E9FBFE <1> jmp .next_cluster 5071 <1> 5072 <1> .success: 5073 0000D850 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 5074 <1> .error: 5075 0000D851 F9 <1> stc 5076 <1> 5077 0000D852 5D <1> pop bp 5078 <1> 5079 0000D853 8F06[F60A] <1> pop word [throwsp] 5080 0000D857 8F06[F40A] <1> pop word [throwret] ; restore throw destination 5081 0000D85B 8F06[F20A] <1> pop word [errret] 5082 <1> 5083 0000D85F 9C <1> pushf 5084 0000D860 F646EC01 <1> testopt [bp + ?did_guard_auxbuff], 1 5085 0000D864 7405 <1> jz @F 5086 0000D866 8026[DB00]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 5087 <1> @@: 5088 0000D86B 9D <1> popf ; CF 5089 <1> 5090 0000D86C 8B5EEE <1> mov bx, word [bp + ?load_input_file_structure] 5091 <1> ; bx -> load_input_file structure 5092 0000D86F E83DFE <1> call yy_boot_update.bx 5093 <1> 5094 0000D872 5F <1> pop di 5095 0000D873 5E <1> pop si 5096 0000D874 5A <1> pop dx 5097 0000D875 58 <1> pop ax ; pop from ?read_how_many 5098 0000D876 89EC5D <1> lleave 5099 0000D879 C3 <1> retn 5100 <1> 5101 <1> .err_ret: 5102 0000D87A 8B26[F60A] <1> mov sp, word [throwsp] ; restore stack 5103 <1> ; (needed here if returned to errret) 5104 0000D87E EBD1 <1> jmp .error 5105 <1> 5106 <1> 5107 <1> ; INP: [load_input_file] = active file 5108 <1> ; cx:dx = signed seek distance from current 5109 <1> ; OUT: - 5110 <1> ; CHG: ax, bx, cx, dx 5111 <1> ; STT: ds = es = ss 5112 <1> ; REM: negative seek must not seek to before SOF 5113 <1> yy_boot_seek_current: 5114 0000D880 E83DFE <1> call yy_calculate_structure 5115 <1> 5116 <1> .bx: 5117 <1> lframe near 5118 <1> lvar dword, length 5119 <1> lvar dword, length_this_cluster 5120 <1> lvar dword, bytes_per_cluster 5121 <1> lvar dword, how_far_in_cluster 5122 0000D883 5589E58D66F0 <1> lenter 5123 <1> lvar dword, seek_distance 5124 0000D889 51 <1> push cx 5125 0000D88A 52 <1> push dx 5126 <1> lvar word, load_input_file_structure 5127 0000D88B 53 <1> push bx 5128 0000D88C 31C0 <1> xor ax, ax 5129 <1> lvar word, did_guard_auxbuff 5130 0000D88E 50 <1> push ax 5131 0000D88F 56 <1> push si 5132 0000D890 57 <1> push di 5133 <1> 5134 0000D891 FF36[F20A] <1> push word [errret] 5135 0000D895 FF36[F40A] <1> push word [throwret] 5136 0000D899 FF36[F60A] <1> push word [throwsp] 5137 <1> 5138 0000D89D 55 <1> push bp 5139 <1> 5140 0000D89E C706[F20A][D0DA] <1> mov word [errret], .err_ret 5141 0000D8A4 C706[F40A][D0DA] <1> mov word [throwret], .err_ret 5142 0000D8AA 8926[F60A] <1> mov word [throwsp], sp 5143 <1> 5144 <1> ; bx -> load_input_file structure 5145 0000D8AE E8EFFD <1> call yy_boot_get.bx 5146 <1> 5147 0000D8B1 E81BFE <1> call guard_auxbuff_return 5148 0000D8B4 7303E9F101 <1> jc .error 5149 0000D8B9 FF46E8 <1> inc word [bp + ?did_guard_auxbuff] 5150 <1> 5151 0000D8BC 85C9 <1> test cx, cx 5152 0000D8BE 7975 <1> jns .plus 5153 <1> 5154 0000D8C0 8B36[4E57] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5155 0000D8C4 8B3E[4C57] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 5156 0000D8C8 A1[8B57] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5157 0000D8CB F726[6857] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 5158 <1> 5159 0000D8CF 8946F4 <1> mov word [bp + ?bytes_per_cluster], ax 5160 0000D8D2 8956F6 <1> mov word [bp + ?bytes_per_cluster + 2], dx 5161 0000D8D5 83E801 <1> sub ax, 1 5162 0000D8D8 83DA00 <1> sbb dx, 0 5163 0000D8DB F7D0 <1> not ax 5164 0000D8DD F7D2 <1> not dx 5165 <1> 5166 0000D8DF 56 <1> push si 5167 0000D8E0 57 <1> push di 5168 <1> 5169 0000D8E1 21D6 <1> and si, dx 5170 0000D8E3 21C7 <1> and di, ax ; start seek of current cluster 5171 <1> 5172 0000D8E5 58 <1> pop ax 5173 0000D8E6 5A <1> pop dx ; current seek 5174 <1> 5175 0000D8E7 0346EC <1> add ax, word [bp + ?seek_distance] 5176 0000D8EA 1356EE <1> adc dx, word [bp + ?seek_distance + 2] 5177 0000D8ED 7203E9B801 <1> jnc .error ; target seek 5178 <1> 5179 <1> ; if the cluster is invalid, need to reset 5180 0000D8F2 813E[4A57]FF0F <1> cmp word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 5181 0000D8F8 7207 <1> jb @F 5182 0000D8FA 833E[4857]F8 <1> cmp word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 5183 0000D8FF 7308 <1> jae .minus_reset 5184 <1> @@: 5185 <1> 5186 0000D901 39F2 <1> cmp dx, si ; is target seek 5187 <1> ; >= start seek of current cluster? 5188 0000D903 7502 <1> jne @F 5189 0000D905 39F8 <1> cmp ax, di 5190 <1> @@: 5191 0000D907 7322 <1> jae .minus_simple ; yes, simple --> 5192 <1> 5193 <1> .minus_reset: 5194 <1> ; reset current cluster to first, seek to 0 5195 0000D909 FF36[7257] <1> push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 5196 0000D90D FF36[7057] <1> push word [load_data - LOADDATA2 + lsvFirstCluster] 5197 0000D911 8F06[4857] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster] 5198 0000D915 8F06[4A57] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 5199 0000D919 8326[4C57]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek], 0 5200 0000D91E 8326[4E57]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 5201 <1> 5202 <1> ; set distance 5203 0000D923 8946EC <1> mov word [bp + ?seek_distance], ax 5204 0000D926 8956EE <1> mov word [bp + ?seek_distance + 2], dx 5205 <1> ; use positive seek code 5206 0000D929 EB0A <1> jmp .plus 5207 <1> 5208 <1> .minus_simple: 5209 <1> ; just set seek, current cluster still valid 5210 0000D92B A3[4C57] <1> mov word [load_data - LOADDATA2 + ldCurrentSeek], ax 5211 0000D92E 8916[4E57] <1> mov word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 5212 0000D932 E97501 <1> jmp .return 5213 <1> 5214 <1> .plus: 5215 0000D935 8B16[4657] <1> mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 5216 0000D939 A1[4457] <1> mov ax, word [load_data - LOADDATA2 + ldFileSize] 5217 <1> 5218 0000D93C 2B06[4C57] <1> sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 5219 0000D940 1B16[4E57] <1> sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5220 <1> 5221 0000D944 720A <1> jc .eof 5222 <1> ; dx:ax = how far we can seek within file 5223 0000D946 3B56EE <1> cmp dx, word [bp + ?seek_distance + 2] 5224 0000D949 7503 <1> jne @F 5225 0000D94B 3B46EC <1> cmp ax, word [bp + ?seek_distance] 5226 <1> @@: 5227 0000D94E 771D <1> ja .not_eof 5228 <1> .eof: 5229 0000D950 8B46EC <1> mov ax, word [bp + ?seek_distance] 5230 0000D953 8B56EE <1> mov dx, word [bp + ?seek_distance + 2] 5231 0000D956 0106[4C57] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], ax 5232 0000D95A 1116[4E57] <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 5233 0000D95E C706[4857]F8FF <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 5234 0000D964 C706[4A57]FF0F <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 5235 0000D96A E93D01 <1> jmp .return 5236 <1> 5237 <1> .not_eof: 5238 0000D96D 8B4EEC <1> mov cx, word [bp + ?seek_distance] 5239 0000D970 8B5EEE <1> mov bx, word [bp + ?seek_distance + 2] 5240 0000D973 85DB <1> test bx, bx 5241 0000D975 7507 <1> jnz @F 5242 0000D977 85C9 <1> test cx, cx 5243 0000D979 7503E92C01 <1> jz .return 5244 <1> @@: 5245 0000D97E 894EFC <1> mov word [bp + ?length], cx 5246 0000D981 895EFE <1> mov word [bp + ?length + 2], bx 5247 <1> 5248 <1> ; bx:cx = length 5249 <1> .next_cluster: 5250 0000D984 8B36[4E57] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5251 0000D988 8B3E[4C57] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 5252 0000D98C A1[8B57] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5253 0000D98F F726[6857] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 5254 <1> 5255 0000D993 8946F4 <1> mov word [bp + ?bytes_per_cluster], ax 5256 0000D996 8956F6 <1> mov word [bp + ?bytes_per_cluster + 2], dx 5257 0000D999 83E801 <1> sub ax, 1 5258 0000D99C 83DA00 <1> sbb dx, 0 5259 0000D99F 21D6 <1> and si, dx 5260 0000D9A1 21C7 <1> and di, ax ; how far are we into cluster 5261 <1> 5262 0000D9A3 897EF0 <1> mov word [bp + ?how_far_in_cluster], di 5263 0000D9A6 8976F2 <1> mov word [bp + ?how_far_in_cluster + 2], si 5264 <1> 5265 0000D9A9 F7DE <1> neg si 5266 0000D9AB F7DF <1> neg di 5267 0000D9AD 83DE00 <1> sbb si, byte 0 ; neg si:di 5268 <1> 5269 0000D9B0 037EF4 <1> add di, word [bp + ?bytes_per_cluster] 5270 0000D9B3 1376F6 <1> adc si, word [bp + ?bytes_per_cluster + 2] 5271 <1> ; cluster size - how far we are 5272 <1> ; = how much to read from this cluster 5273 0000D9B6 39DE <1> cmp si, bx 5274 0000D9B8 7502 <1> jne @F 5275 0000D9BA 39CF <1> cmp di, cx 5276 <1> @@: 5277 0000D9BC 7304 <1> jae .use_count_2 5278 0000D9BE 89F9 <1> mov cx, di 5279 0000D9C0 89F3 <1> mov bx, si 5280 <1> .use_count_2: 5281 <1> ; bx:cx = how far to seek in this cluster 5282 0000D9C2 894EF8 <1> mov word [bp + ?length_this_cluster], cx 5283 0000D9C5 895EFA <1> mov word [bp + ?length_this_cluster + 2], bx 5284 <1> 5285 <1> .next_sector: 5286 0000D9C8 A1[4857] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 5287 0000D9CB 8B16[4A57] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 5288 0000D9CF E802F4 <1> call check_clust 5289 0000D9D2 7303E9D300 <1> jc .error 5290 0000D9D7 8B1E[8B57] <1> mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5291 0000D9DB 8B7EF0 <1> mov di, word [bp + ?how_far_in_cluster] 5292 0000D9DE 8B76F2 <1> mov si, word [bp + ?how_far_in_cluster + 2] 5293 <1> 5294 0000D9E1 87D6 <1> xchg dx, si 5295 0000D9E3 97 <1> xchg ax, di 5296 0000D9E4 F7F3 <1> div bx 5297 <1> ; dx = byte offset into sector 5298 <1> ; ax = sector offset into cluster's data 5299 0000D9E6 87D6 <1> xchg dx, si 5300 0000D9E8 97 <1> xchg ax, di 5301 <1> ; si = byte offset 5302 <1> 5303 0000D9E9 89F1 <1> mov cx, si ; = byte offset 5304 0000D9EB F7D9 <1> neg cx ; - byte offset 5305 0000D9ED 01D9 <1> add cx, bx ; sector size - byte offset 5306 <1> ; = length this sector 5307 0000D9EF 837EFA00 <1> cmp word [bp + ?length_this_cluster + 2], 0 5308 0000D9F3 7508 <1> jne @F ; fill remaining sector size 5309 0000D9F5 3B4EF8 <1> cmp cx, word [bp + ?length_this_cluster] 5310 0000D9F8 7603 <1> jbe @F ; sector has less than requested --> 5311 0000D9FA 8B4EF8 <1> mov cx, word [bp + ?length_this_cluster] 5312 <1> ; fill entire remaining request 5313 <1> @@: 5314 0000D9FD 294EF8 <1> sub word [bp + ?length_this_cluster], cx 5315 0000DA00 835EFA00 <1> sbb word [bp + ?length_this_cluster + 2], 0 5316 0000DA04 294EFC <1> sub word [bp + ?length], cx 5317 0000DA07 835EFE00 <1> sbb word [bp + ?length + 2], 0 5318 0000DA0B 010E[4C57] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 5319 0000DA0F 8316[4E57]00 <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 5320 0000DA14 014EF0 <1> add word [bp + ?how_far_in_cluster], cx 5321 0000DA17 8356F200 <1> adc word [bp + ?how_far_in_cluster + 2], 0 5322 <1> 5323 0000DA1B 837EFA00 <1> cmp word [bp + ?length_this_cluster + 2], 0 5324 0000DA1F 75A7 <1> jne .next_sector 5325 0000DA21 837EF800 <1> cmp word [bp + ?length_this_cluster], 0 5326 0000DA25 75A1 <1> jne .next_sector 5327 <1> 5328 0000DA27 8B7EF4 <1> mov di, word [bp + ?bytes_per_cluster] 5329 0000DA2A 8B76F6 <1> mov si, word [bp + ?bytes_per_cluster + 2] 5330 0000DA2D 397EF0 <1> cmp word [bp + ?how_far_in_cluster], di 5331 0000DA30 7505 <1> jne @F 5332 0000DA32 3976F2 <1> cmp word [bp + ?how_far_in_cluster + 2], si 5333 0000DA35 740E <1> je @FF 5334 <1> @@: 5335 0000DA37 837EFE00 <1> cmp word [bp + ?length + 2], 0 5336 0000DA3B 756D <1> jne .error 5337 0000DA3D 837EFC00 <1> cmp word [bp + ?length], 0 5338 0000DA41 7567 <1> jne .error 5339 0000DA43 EB65 <1> jmp .return 5340 <1> 5341 <1> @@: 5342 0000DA45 A1[4857] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 5343 0000DA48 8B16[4A57] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 5344 0000DA4C E885F3 <1> call check_clust 5345 0000DA4F 7259 <1> jc .error 5346 0000DA51 E8CCF2 <1> call clust_next.dxax 5347 0000DA54 732F <1> jnc @F ; (NC) --> 5348 0000DA56 B8F6FF <1> mov ax, 0FFF8h - 2 5349 0000DA59 BAFF0F <1> mov dx, 0FFFh 5350 0000DA5C 8B3E[4C57] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 5351 0000DA60 8B36[4E57] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 5352 0000DA64 3B36[4457] <1> cmp si, word [load_data - LOADDATA2 + ldFileSize] 5353 0000DA68 7506 <1> jne .set_error 5354 0000DA6A 3B3E[4657] <1> cmp di, word [load_data - LOADDATA2 + ldFileSize + 2] 5355 0000DA6E 7401 <1> je .do_not_set_error ; if same then NC --> 5356 <1> .set_error: 5357 0000DA70 F9 <1> stc 5358 <1> .do_not_set_error: 5359 0000DA71 9C <1> pushf 5360 0000DA72 31C9 <1> xor cx, cx 5361 0000DA74 31DB <1> xor bx, bx 5362 0000DA76 874EFC <1> xchg cx, word [bp + ?length] 5363 0000DA79 875EFE <1> xchg bx, word [bp + ?length + 2] 5364 0000DA7C 010E[4C57] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 5365 0000DA80 111E[4E57] <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], bx 5366 0000DA84 A8 <1> db __TEST_IMM8 ; (skip pushf) 5367 <1> @@: 5368 0000DA85 9C <1> pushf 5369 0000DA86 83C002 <1> add ax, 2 5370 0000DA89 83D200 <1> adc dx, 0 5371 0000DA8C A3[4857] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 5372 0000DA8F 8916[4A57] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 5373 0000DA93 9D <1> popf ; CF 5374 0000DA94 7214 <1> jc .error 5375 0000DA96 8B4EFC <1> mov cx, word [bp + ?length] 5376 0000DA99 8B5EFE <1> mov bx, word [bp + ?length + 2] 5377 0000DA9C 85DB <1> test bx, bx 5378 0000DA9E 7403E9E1FE <1> jnz .next_cluster 5379 0000DAA3 85C9 <1> test cx, cx 5380 0000DAA5 7403E9DAFE <1> jnz .next_cluster 5381 <1> .return: 5382 <1> .error: 5383 <1> 5384 0000DAAA 5D <1> pop bp 5385 <1> 5386 0000DAAB 8F06[F60A] <1> pop word [throwsp] 5387 0000DAAF 8F06[F40A] <1> pop word [throwret] ; restore throw destination 5388 0000DAB3 8F06[F20A] <1> pop word [errret] 5389 <1> 5390 0000DAB7 9C <1> pushf 5391 0000DAB8 F646E801 <1> testopt [bp + ?did_guard_auxbuff], 1 5392 0000DABC 7405 <1> jz @F 5393 0000DABE 8026[DB00]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 5394 <1> @@: 5395 0000DAC3 9D <1> popf ; CF 5396 <1> 5397 0000DAC4 8B5EEA <1> mov bx, word [bp + ?load_input_file_structure] 5398 <1> ; bx -> load_input_file structure 5399 0000DAC7 E8E5FB <1> call yy_boot_update.bx 5400 <1> 5401 0000DACA 5F <1> pop di 5402 0000DACB 5E <1> pop si 5403 0000DACC 89EC5D <1> lleave 5404 0000DACF C3 <1> retn 5405 <1> 5406 <1> .err_ret: 5407 0000DAD0 8B26[F60A] <1> mov sp, word [throwsp] ; restore stack 5408 <1> ; (needed here if returned to errret) 5409 0000DAD4 EBD4 <1> jmp .error 5410 <1> 5411 <1> 5412 <1> ; INP: [load_input_file] = active file 5413 <1> ; cx:dx = 0 5414 <1> ; OUT: - 5415 <1> ; CHG: ax, bx, cx, dx 5416 <1> ; STT: ds = es = ss 5417 <1> yy_boot_seek_start: 5418 0000DAD6 E8E7FB <1> call yy_calculate_structure 5419 <1> 5420 <1> .bx: 5421 0000DAD9 56 <1> push si 5422 0000DADA 57 <1> push di 5423 <1> 5424 <1> ; bx -> load_input_file structure 5425 0000DADB E8C2FB <1> call yy_boot_get.bx 5426 <1> 5427 <1> .reset: 5428 <1> ; reset current cluster to first, seek to 0 5429 0000DADE FF36[7257] <1> push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 5430 0000DAE2 FF36[7057] <1> push word [load_data - LOADDATA2 + lsvFirstCluster] 5431 0000DAE6 8F06[4857] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster] 5432 0000DAEA 8F06[4A57] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 5433 0000DAEE 8326[4C57]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek], 0 5434 0000DAF3 8326[4E57]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 5435 <1> 5436 <1> ; bx -> load_input_file structure 5437 0000DAF8 E8B4FB <1> call yy_boot_update.bx 5438 <1> 5439 0000DAFB 5F <1> pop di 5440 0000DAFC 5E <1> pop si 5441 0000DAFD C3 <1> retn 5442 <1> %endif 5443 <1> 5444 <1> 5445 <1> ; INP: bp = load_data - LOADDATA2 5446 <1> initialise_fs: 5447 <1> ; (boot.asm code starts here) 5448 <1> 5449 0000DAFE 31C0 <1> xor ax, ax 5450 <1> ; calculate some values that we need: 5451 <1> ; adjusted sectors per cluster (store in a word, 5452 <1> ; and decode EDR-DOS's special value 0 meaning 256) 5453 0000DB00 8A460D <1> mov al, [bp + bsBPB + bpbSectorsPerCluster] 5454 0000DB03 FEC8 <1> dec al 5455 0000DB05 40 <1> inc ax 5456 0000DB06 8946E8 <1> mov [bp + ldClusterSize], ax 5457 <1> 5458 0000DB09 8B46D4 <1> mov ax, [bp + ldEntriesPerSector] 5459 <1> 5460 <1> ; number of sectors used for root directory (store in CX) 5461 0000DB0C 31D2 <1> xor dx, dx 5462 0000DB0E 89C3 <1> mov bx, ax 5463 0000DB10 48 <1> dec ax ; rounding up 5464 0000DB11 034611 <1> add ax, [bp + bsBPB + bpbNumRootDirEnts] ; (0 iff FAT32) 5465 0000DB14 11D2 <1> adc dx, dx ; account for overflow (dx was zero) 5466 0000DB16 F7F3 <1> div bx ; get number of root sectors 5467 0000DB18 91 <1> xchg ax, cx ; cx = number of root secs 5468 <1> 5469 <1> 5470 <1> ; (iniload.asm code starts here) 5471 <1> 5472 0000DB19 51 <1> push cx ; number of root secs 5473 0000DB1A 31C0 <1> xor ax, ax 5474 <1> ; first sector of root directory 5475 0000DB1C 8A4610 <1> mov al, [bp + bsBPB + bpbNumFATs] ; ! ah = 0, hence ax = number of FATs 5476 0000DB1F 8B4E16 <1> mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 5477 0000DB22 31FF <1> xor di, di ; di:cx = sectors per FAT 5478 <1> ; iff FAT12, FAT16 5479 0000DB24 85C9 <1> test cx, cx ; is FAT32 ? 5480 0000DB26 7506 <1> jnz @F ; no --> 5481 0000DB28 8B4E24 <1> mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 5482 0000DB2B 8B7E26 <1> mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 5483 <1> @@: 5484 0000DB2E 50 <1> push ax 5485 0000DB2F F7E1 <1> mul cx 5486 <1> ; ax = low word SpF*nF 5487 <1> ; dx = high word 5488 0000DB31 93 <1> xchg bx, ax 5489 0000DB32 87CA <1> xchg cx, dx 5490 <1> ; cx:bx = first mul 5491 0000DB34 58 <1> pop ax 5492 0000DB35 F7E7 <1> mul di 5493 <1> ; ax = high word adjust 5494 <1> ; dx = third word 5495 0000DB37 85D2 <1> test dx, dx 5496 0000DB39 740C <1> jz @F 5497 <1> .error_badchain: 5498 <1> error_badchain: equ $ 5499 0000DB3B BA[CA17] <1> mov dx, msg.boot_badchain 5500 0000DB3E B80D02 <1> mov ax, 020Dh 5501 0000DB41 E865A7 <1> call setrc 5502 0000DB44 E9C8E0 <1> jmp bootcmd.fail 5503 <1> 5504 <1> @@: 5505 0000DB47 92 <1> xchg dx, ax 5506 <1> ; dx = high word adjust 5507 0000DB48 01CA <1> add dx, cx 5508 <1> ; dx:bx = result 5509 0000DB4A 93 <1> xchg ax, bx 5510 <1> ; dx:ax = result 5511 0000DB4B 72EE <1> jc .error_badchain 5512 <1> 5513 0000DB4D 03460E <1> add ax, [bp + bsBPB + bpbReservedSectors] 5514 0000DB50 83D200 <1> adc dx, byte 0 5515 0000DB53 72E6 <1> jc .error_badchain 5516 <1> 5517 0000DB55 59 <1> pop cx ; number of root sectors 5518 0000DB56 31FF <1> xor di, di 5519 <1> 5520 <1> ; first sector of disk data area: 5521 0000DB58 01C1 <1> add cx, ax 5522 0000DB5A 11D7 <1> adc di, dx 5523 0000DB5C 72DD <1> jc .error_badchain 5524 0000DB5E 894EFC <1> mov [bp + lsvDataStart], cx 5525 0000DB61 897EFE <1> mov [bp + lsvDataStart + 2], di 5526 <1> 5527 0000DB64 8946D0 <1> mov [bp + ldRootSector], ax 5528 0000DB67 8956D2 <1> mov [bp + ldRootSector + 2], dx 5529 <1> 5530 <1> ; total sectors 5531 0000DB6A 31D2 <1> xor dx, dx 5532 0000DB6C 8B4613 <1> mov ax, [bp + bsBPB + bpbTotalSectors] 5533 0000DB6F 85C0 <1> test ax, ax 5534 0000DB71 7506 <1> jnz @F 5535 0000DB73 8B5622 <1> mov dx, [bp + bsBPB + bpbTotalSectorsLarge + 2] 5536 0000DB76 8B4620 <1> mov ax, [bp + bsBPB + bpbTotalSectorsLarge] 5537 <1> 5538 <1> ; fall through and let it overwrite the field with the 5539 <1> ; already current contents. saves a jump. 5540 <1> @@: 5541 0000DB79 895622 <1> mov [bp + bsBPB + bpbTotalSectorsLarge + 2], dx 5542 0000DB7C 894620 <1> mov [bp + bsBPB + bpbTotalSectorsLarge], ax 5543 <1> 5544 <1> ; dx:ax = total sectors 5545 <1> 5546 0000DB7F 8B5E16 <1> mov bx, [bp + bsBPB + bpbSectorsPerFAT] 5547 0000DB82 C646E620 <1> mov byte [bp + ldFATType], 32 5548 0000DB86 85DB <1> test bx, bx 5549 0000DB88 740B <1> jz @F 5550 <1> 5551 0000DB8A 31C9 <1> xor cx, cx 5552 <1> 5553 0000DB8C 895E24 <1> mov word [bp + bsBPB + ebpbSectorsPerFATLarge], bx 5554 0000DB8F 894E26 <1> mov word [bp + bsBPB + ebpbSectorsPerFATLarge + 2], cx 5555 0000DB92 894E28 <1> mov word [bp + bsBPB + ebpbFSFlags], cx 5556 <1> ; FSVersion, RootCluster, FSINFOSector, BackupSector, Reserved: 5557 <1> ; uninitialised here (initialised by loaded_all later) 5558 <1> 5559 <1> @@: 5560 <1> ; dx:ax = total amount of sectors 5561 0000DB95 2B46FC <1> sub ax, word [bp + lsvDataStart] 5562 0000DB98 1B56FE <1> sbb dx, word [bp + lsvDataStart + 2] 5563 <1> 5564 <1> ; dx:ax = total amount of data sectors 5565 0000DB9B 89C3 <1> mov bx, ax 5566 0000DB9D 92 <1> xchg ax, dx 5567 0000DB9E 31D2 <1> xor dx, dx 5568 0000DBA0 F776E8 <1> div word [bp + ldClusterSize] 5569 0000DBA3 93 <1> xchg bx, ax 5570 0000DBA4 F776E8 <1> div word [bp + ldClusterSize] 5571 <1> ; bx:ax = quotient, dx = remainder 5572 <1> ; bx:ax = number of clusters 5573 0000DBA7 85DB <1> test bx, bx 5574 0000DBA9 741F <1> jz @FF 5575 <1> ; >= 1_0000h clusters, should be FAT32 5576 0000DBAB 81FBFF0F <1> cmp bx, 0FFFh 5577 0000DBAF 770D <1> ja .badclusters 5578 0000DBB1 7505 <1> jne @F 5579 0000DBB3 83F8F5 <1> cmp ax, 0FFF7h - 2 5580 0000DBB6 7706 <1> ja .badclusters 5581 <1> @@: 5582 <1> ; check it is really FAT32 5583 0000DBB8 837E1600 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 5584 0000DBBC 7447 <1> je .gotfattype 5585 <1> 5586 <1> .badclusters: 5587 0000DBBE BA[B017] <1> mov dx, msg.boot_badclusters 5588 0000DBC1 B80E02 <1> mov ax, 020Eh 5589 0000DBC4 E8E2A6 <1> call setrc 5590 0000DBC7 E945E0 <1> jmp bootcmd.fail 5591 <1> 5592 <1> @@: 5593 <1> ; <= FFFFh clusters, may be FAT12 or FAT16 (or small FAT32) 5594 <1> ; check if it is small FAT32 5595 0000DBCA 837E1600 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 5596 0000DBCE 7435 <1> je .gotfattype 5597 <1> 5598 0000DBD0 83F8F5 <1> cmp ax, 0FFF7h - 2 ; too much for FAT16 ? 5599 0000DBD3 77E9 <1> ja .badclusters 5600 0000DBD5 C646E610 <1> mov byte [bp + ldFATType], 16 5601 0000DBD9 3DF50F <1> cmp ax, 0FF7h - 2 ; is it FAT12 ? 5602 0000DBDC 7727 <1> ja .gotfattype ; no, is FAT16 --> 5603 <1> 5604 0000DBDE C646E60C <1> mov byte [bp + ldFATType], 12 5605 <1> 5606 0000DBE2 F606[6757]02 <1> testopt [load_ldflags], ldfFATInvalid 5607 0000DBE7 751C <1> jnz .gotfattype 5608 <1> 5609 0000DBE9 53 <1> push bx 5610 0000DBEA 50 <1> push ax 5611 <1> ; (boot.asm code continues here) 5612 <1> 5613 <1> ; Load the entire FAT into memory. This is easily feasible for FAT12, 5614 <1> ; as the FAT can only contain at most 4096 entries. 5615 <1> ; (The exact condition should be "at most 4087 entries", or with a 5616 <1> ; specific FF7h semantic, "at most 4088 entries"; the more reliable 5617 <1> ; and portable alternative would be "at most 4080 entries".) 5618 <1> ; Thus, no more than 6 KiB need to be read, even though the FAT size 5619 <1> ; as indicated by word[sectors_per_fat] could be much higher. The 5620 <1> ; first loop condition below is to correctly handle the latter case. 5621 <1> ; (Sector size is assumed to be a power of two between 32 and 8192 5622 <1> ; bytes, inclusive. An 8 KiB buffer is necessary if the sector size 5623 <1> ; is 4 or 8 KiB, because reading the FAT can or will write to 8 KiB 5624 <1> ; of memory instead of only the relevant 6 KiB. This is always true 5625 <1> ; if the sector size is 8 KiB, and with 4 KiB sector size it is true 5626 <1> ; iff word[sectors_per_fat] is higher than one.) 5627 0000DBEB BF0018 <1> mov di, 6 << 10 ; maximum size of FAT12 to load 5628 0000DBEE 8B4E16 <1> mov cx, [bp + bsBPB + bpbSectorsPerFAT] 5629 <1> ; maximum size of this FS's FAT 5630 0000DBF1 31D2 <1> xor dx, dx 5631 0000DBF3 8B460E <1> mov ax, [bp + bsBPB + bpbReservedSectors]; = first FAT sector 5632 0000DBF6 8B5EF8 <1> mov bx, [bp + lsvFATSeg] 5633 <1> @@: 5634 0000DBF9 E88CF5 <1> call read_sector ; read next FAT sector 5635 0000DBFC 2B7E0B <1> sub di, [bp + bsBPB + bpbBytesPerSector] 5636 <1> ; di = bytes still left to read 5637 0000DBFF 7602 <1> jbe @F ; if none --> 5638 <1> ; (jbe means jump if CF || ZF) 5639 0000DC01 E2F6 <1> loop @B ; if any FAT sector still remains --> 5640 <1> @@: ; one of the limits reached; FAT read 5641 0000DC03 58 <1> pop ax 5642 0000DC04 5B <1> pop bx 5643 <1> 5644 <1> .gotfattype: 5645 <1> 5646 <1> ; if bx:ax = 1, then entries 0, 1, 2 are valid 5647 0000DC05 83C001 <1> add ax, 1 5648 0000DC08 83D300 <1> adc bx, 0 5649 <1> ; max entry is x+1 (2 if x=1) 5650 <1> 5651 0000DC0B 8946C0 <1> mov word [bp + ldMaxCluster], ax 5652 0000DC0E 895EC2 <1> mov word [bp + ldMaxCluster + 2], bx 5653 <1> 5654 <1> ; if bx:ax was = 1, then entries below 3 have to exist 5655 0000DC11 83C001 <1> add ax, 1 5656 0000DC14 83D300 <1> adc bx, 0 5657 <1> ; if bx:ax was 1, bx:ax now = 3 5658 <1> 5659 0000DC17 89DA <1> mov dx, bx 5660 <1> 5661 0000DC19 807EE610 <1> cmp byte [bp + ldFATType], 16 5662 0000DC1D 720C <1> jb .check_fat_limit_12 5663 0000DC1F 7404 <1> je .check_fat_limit_16 5664 <1> .check_fat_limit_32: 5665 0000DC21 01C0 <1> add ax, ax 5666 0000DC23 11D2 <1> adc dx, dx 5667 <1> .check_fat_limit_16: 5668 0000DC25 01C0 <1> add ax, ax 5669 0000DC27 11D2 <1> adc dx, dx 5670 0000DC29 EB0D <1> jmp @F 5671 <1> 5672 <1> .check_fat_limit_12: 5673 0000DC2B 89C2 <1> mov dx, ax 5674 0000DC2D 01C0 <1> add ax, ax 5675 0000DC2F 01D0 <1> add ax, dx ; * 3 5676 0000DC31 D1E8 <1> shr ax, 1 ; * 3 / 2 = * 1.5 5677 0000DC33 83D000 <1> adc ax, 0 ; if the last nybble is needed 5678 0000DC36 31D2 <1> xor dx, dx 5679 <1> 5680 <1> @@: 5681 0000DC38 8B5E0B <1> mov bx, word [bp + bsBPB + bpbBytesPerSector] 5682 0000DC3B 4B <1> dec bx 5683 0000DC3C 01D8 <1> add ax, bx 5684 0000DC3E 83D200 <1> adc dx, 0 5685 0000DC41 43 <1> inc bx 5686 <1> 5687 0000DC42 91 <1> xchg cx, ax 5688 0000DC43 89D0 <1> mov ax, dx 5689 0000DC45 31D2 <1> xor dx, dx 5690 0000DC47 F7F3 <1> div bx 5691 0000DC49 91 <1> xchg cx, ax 5692 0000DC4A F7F3 <1> div bx 5693 0000DC4C 87CA <1> xchg cx, dx 5694 <1> ; cx = remainder, dx:ax = number of sectors needed 5695 <1> 5696 0000DC4E 8B4E16 <1> mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 5697 0000DC51 31FF <1> xor di, di ; di:cx = sectors per FAT 5698 <1> ; iff FAT12, FAT16 5699 0000DC53 85C9 <1> test cx, cx ; is FAT32 ? 5700 0000DC55 7506 <1> jnz @F ; no --> 5701 0000DC57 8B4E24 <1> mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 5702 0000DC5A 8B7E26 <1> mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 5703 <1> @@: 5704 <1> 5705 0000DC5D 39D7 <1> cmp di, dx 5706 0000DC5F 7502 <1> jne @F 5707 0000DC61 39C1 <1> cmp cx, ax 5708 <1> @@: 5709 0000DC63 730C <1> jae @F 5710 <1> .badfat: 5711 0000DC65 BA[DF17] <1> mov dx, msg.boot_badfat 5712 0000DC68 B80F02 <1> mov ax, 020Fh 5713 0000DC6B E83BA6 <1> call setrc 5714 0000DC6E E99EDF <1> jmp bootcmd.fail 5715 <1> 5716 <1> @@: 5717 0000DC71 C3 <1> retn 5718 <1> 5719 <1> 5720 <1> %if _INPUT_FILE_BOOT 5721 <1> yy_boot_clear_remember_seek: 5722 0000DC72 50 <1> push ax 5723 0000DC73 A1[A05A] <1> mov ax, word [load_input_file.active] 5724 0000DC76 3906[E80A] <1> cmp word [boot_remember_seek_handle], ax 5725 0000DC7A 750F <1> jne .ret_pop_ax 5726 <1> .clear: 5727 0000DC7C 830E[E80A]FF <1> or word [boot_remember_seek_handle], -1 5728 0000DC81 8326[E60A]00 <1> and word [boot_remember_seek_offset + 2], 0 5729 0000DC86 8326[E40A]00 <1> and word [boot_remember_seek_offset], 0 5730 <1> .ret_pop_ax: 5731 0000DC8B 58 <1> pop ax 5732 0000DC8C C3 <1> retn 5733 <1> 5734 <1> 5735 <1> yy_boot_remember_seek: 5736 0000DC8D 50 <1> push ax 5737 0000DC8E A1[A05A] <1> mov ax, word [load_input_file.active] 5738 0000DC91 3906[E80A] <1> cmp word [boot_remember_seek_handle], ax 5739 0000DC95 75F4 <1> jne yy_boot_clear_remember_seek.ret_pop_ax 5740 <1> 5741 0000DC97 53 <1> push bx 5742 0000DC98 51 <1> push cx 5743 0000DC99 52 <1> push dx 5744 0000DC9A 8B0E[E60A] <1> mov cx, word [boot_remember_seek_offset + 2] 5745 0000DC9E 8B16[E40A] <1> mov dx, word [boot_remember_seek_offset] 5746 0000DCA2 E8DBFB <1> call yy_boot_seek_current 5747 0000DCA5 5A <1> pop dx 5748 0000DCA6 59 <1> pop cx 5749 0000DCA7 5B <1> pop bx 5750 0000DCA8 EBD2 <1> jmp yy_boot_clear_remember_seek.clear 5751 <1> %endif 7645 %endif 7646 7647 7648 usesection lDEBUG_CODE 7649 0000DCAA 00 align 16, db 0 7650 ldebug_code_size equ $-section.lDEBUG_CODE.vstart 7651 endarea ldebug_code, 1 7652 7653 7654 usesection lDEBUG_CODE2 7655 align 16, db 0 7656 ldebug_code2_size equ $-section.lDEBUG_CODE2.vstart 7657 endarea ldebug_code2, 1 7658 7659 7660 usesection INIT 7661 initstart: 7662 7663 %include "init.asm" 1 <1> 2 <1> %if 0 3 <1> 4 <1> lDebug initialisation 5 <1> 6 <1> Copyright (C) 1995-2003 Paul Vojta 7 <1> Copyright (C) 2008-2012 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 INIT 19 <1> 20 <1> CODETARGET1_equate equ CODETARGET1 21 <1> CODETARGET2_equate equ CODETARGET2 22 <1> AUXTARGET1_equate equ AUXTARGET1 23 <1> AUXTARGET2_equate equ AUXTARGET2 24 <1> BOOTCODETARGET1_equate equ BOOTCODETARGET1 25 <1> BOOTCODETARGET2_equate equ BOOTCODETARGET2 26 <1> BOOTAUXTARGET1_equate equ BOOTAUXTARGET1 27 <1> BOOTAUXTARGET2_equate equ BOOTAUXTARGET2 28 <1> ldebug_codes_size_equate equ ldebug_code_size + ldebug_code2_size 29 <1> ldebug_codes_truncated_size_equate equ ldebug_code_bootldr_truncated_size + ldebug_code2_size 30 <1> auxbuff_size_equate equ auxbuff_size 31 <1> initsectionoffset_p_equate equ paras(INITSECTIONOFFSET) 32 <1> 33 <1> initcode: 34 <1> %if ($ - $$) != 0 35 <1> %fatal initcode expected at start of section 36 <1> %endif 37 <1> %ifn _APPLICATION 38 <1> push cs 39 <1> pop ds 40 <1> mov dx, imsg.not_an_application 41 <1> mov ah, 09h 42 <1> int 21h 43 <1> mov ax, 4CFFh 44 <1> int 21h 45 <1> 46 <1> ; magic sequence for tellsize 47 <1> mov bx, paras(INITSECTIONOFFSET + init_size + deviceshim_size + 16) 48 <1> mov ah, 4Ah 49 <1> int 21h 50 <1> ; end of magic sequence for tellsize 51 <1> 52 <1> ; The +16 is to avoid entering a zero value 53 <1> ; for exeMinAlloc and exeMaxAlloc, which 54 <1> ; seems to be handled in a special way by 55 <1> ; DOS. (This special handling occurs for 56 <1> ; the uncompressed bootable build, eg 57 <1> ; ldebugu.com, and the nonbootable MZ shim 58 <1> ; build, eg debug.com.) 59 <1> %endif 60 <1> 61 <1> %if _APPLICATION 62 00000000 8CD0 <1> mov ax, ss 63 00000002 8CDA <1> mov dx, ds 64 00000004 29D0 <1> sub ax, dx 65 00000006 31D2 <1> xor dx, dx 66 00000008 B90400 <1> mov cx, 4 67 <1> @@: 68 0000000B D1E0 <1> shl ax, 1 69 0000000D D1D2 <1> rcl dx, 1 70 0000000F E2FA <1> loop @B 71 <1> 72 00000011 50 <1> push ax ; (if sp was zero) 73 <1> 74 00000012 01E0 <1> add ax, sp 75 00000014 83D200 <1> adc dx, 0 76 00000017 83C00F <1> add ax, 15 77 0000001A 83D200 <1> adc dx, 0 78 <1> 79 0000001D 24F0 <1> and al, ~15 80 <1> 81 0000001F 83FA02 <1> cmp dx, APPINITSTACK_END >> 16 82 00000022 771B <1> ja .stackdownfirst 83 00000024 7205 <1> jb .memupfirst 84 00000026 3DA081 <1> cmp ax, APPINITSTACK_END & 0FFFFh 85 00000029 7314 <1> jae .stackdownfirst 86 <1> .memupfirst: 87 <1> ; magic sequence for tellsize 88 0000002B BB1A28 <1> mov bx, paras(APPINITSTACK_END) 89 0000002E B44A <1> mov ah, 4Ah 90 00000030 CD21 <1> int 21h 91 <1> ; end of magic sequence for tellsize 92 00000032 730B <1> jnc @F 93 <1> .memfail: 94 00000034 BA[7C0B] <1> mov dx, imsg.early_mem_fail 95 <1> .earlyfail: 96 00000037 E86014 <1> call init_putsz_cs 97 0000003A B8FF4C <1> mov ax, 4CFFh 98 0000003D CD21 <1> int 21h 99 <1> 100 <1> @@: 101 <1> .stackdownfirst: 102 0000003F 8CD8 <1> mov ax, ds 103 00000041 05FA27 <1> add ax, paras(APPINITSTACK_START) 104 00000044 FA <1> cli 105 00000045 8ED0 <1> mov ss, ax 106 00000047 BC0002 <1> mov sp, APPINITSTACK_SIZE 107 0000004A FB <1> sti 108 <1> 109 <1> ; if jumped to .stackdownfirst: now, shrink our memory block 110 <1> ; else: no-op (already grew or shrunk block) 111 0000004B BB1A28 <1> mov bx, paras(APPINITSTACK_END) 112 0000004E B44A <1> mov ah, 4Ah 113 00000050 CD21 <1> int 21h 114 00000052 72E0 <1> jc .memfail 115 <1> 116 <1> 117 00000054 8CD8 <1> mov ax, ds 118 00000056 05D51A <1> add ax, paras(INITSECTIONOFFSET) 119 00000059 8CDA <1> mov dx, ds 120 0000005B 81C2D625 <1> add dx, paras(APPINITTARGET) 121 0000005F B92402 <1> mov cx, init_size_p 122 00000062 E8A413 <1> call init_movp 123 <1> init_size_p_equate equ init_size_p 124 <1> appinittarget_p_equate equ paras(APPINITTARGET) 125 <1> %if initsectionoffset_p_equate + init_size_p_equate > appinittarget_p_equate 126 <1> %error Overlap detected 127 <1> %endif 128 <1> 129 00000065 52 <1> push dx 130 00000066 E85C01 <1> call init_retf 131 <1> 132 00000069 8CDB <1> mov bx, ds 133 0000006B 89DA <1> mov dx, bx 134 0000006D 81C3D618 <1> add bx, paras(AUXTARGET1) 135 00000071 81C2600D <1> add dx, paras(CODETARGET1) 136 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 137 00000075 89D8 <1> mov ax, bx 138 00000077 050102 <1> add ax, paras(auxbuff_size) 139 <1> %if AUXTARGET1_equate <= CODETARGET1_equate 140 <1> %assign nn AUXTARGET1_equate 141 <1> %assign mm CODETARGET1_equate 142 <1> %error Unexpected layout aux = nn code = mm 143 <1> %endif 144 <1> %endif 145 0000007A 89D1 <1> mov cx, dx 146 0000007C 2EC706[940A][9921] <1> mov word [cs:init_layout], init_app_layout_1 147 00000083 E84001 <1> call init_check_auxbuff 148 00000086 743E <1> jz @F 149 <1> 150 00000088 8CDB <1> mov bx, ds 151 0000008A 89DA <1> mov dx, bx 152 0000008C 81C3600D <1> add bx, paras(AUXTARGET2) 153 00000090 81C2610F <1> add dx, paras(CODETARGET2) 154 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 155 <1> %if (paras(AUXTARGET1_equate) + paras(auxbuff_size_equate)) != (paras(CODETARGET2_equate) + paras(ldebug_codes_truncated_size_equate)) 157 <1> ldebug_code2_size_equate equ ldebug_code2_size 158 <1> ldebug_code_size_equate equ ldebug_code_size 159 <1> ldebug_code_bootldr_truncated_size_equate equ ldebug_code_bootldr_truncated_size 160 <1> %assign vv (paras(ldebug_code2_size_equate)) 161 <1> %assign uu (paras(ldebug_code_size_equate)) 162 <1> %assign tt (paras(ldebug_code_bootldr_truncated_size_equate)) 163 <1> %assign sss (paras(CODETARGET1_equate)) 164 <1> %assign rr (paras(AUXTARGET1_equate)) 165 <1> %assign qq (paras(CODETARGET2_equate)) 166 <1> %assign pp (paras(auxbuff_size_equate)) 167 <1> %assign oo (paras(ldebug_codes_truncated_size_equate)) 168 <1> %assign nn (paras(AUXTARGET1_equate) + paras(auxbuff_size_equate)) 169 <1> %assign mm (paras(CODETARGET2_equate) + paras(ldebug_codes_truncated_size_equate)) 170 <1> %error Unexpected layout aux1+auxb != code2+trunc 171 <1> %error code2+trunc = mm aux1+auxb = nn trunc = oo auxb = pp code2 = qq aux1 = rr 172 <1> %error code1 = sss codeseg1trunc = tt codeseg1 = uu codeseg2 = vv 173 <1> %endif 174 <1> %endif 175 00000094 2EC706[940A][C021] <1> mov word [cs:init_layout], init_app_layout_2 176 0000009B E82801 <1> call init_check_auxbuff 177 0000009E 7426 <1> jz @F 178 <1> 179 <1> ; If both prior attempts failed, we allocate 180 <1> ; an additional 8 KiB and move the buffer to 181 <1> ; that. This should always succeed. 182 000000A0 2EC706[900A]D81E <1> mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 185 <1> ; enlarge the final memory block size 186 <1> 187 000000A7 8CDB <1> mov bx, ds 188 000000A9 81C3D71A <1> add bx, paras(AUXTARGET3) 189 000000AD 89CA <1> mov dx, cx 190 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 191 000000AF 89D8 <1> mov ax, bx 192 000000B1 050102 <1> add ax, paras(auxbuff_size) 193 <1> %endif 194 000000B4 2EC706[940A][9921] <1> mov word [cs:init_layout], init_app_layout_3 195 000000BB E80801 <1> call init_check_auxbuff 196 000000BE 7406 <1> jz @F 197 <1> 198 <1> ; Because this shouldn't happen, this is 199 <1> ; considered an internal error. 200 000000C0 BA[A10B] <1> mov dx, imsg.early_reloc_fail 201 000000C3 E971FF <1> jmp .earlyfail 202 <1> 203 <1> @@: 204 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 205 000000C6 50 <1> push ax 206 <1> %endif 207 000000C7 E8E500 <1> call place_code_segments 208 <1> 209 <1> %if _MESSAGESEGMENT 210 000000CA 8CD8 <1> mov ax, ds 211 000000CC 05B807 <1> add ax, paras(MESSAGESECTIONOFFSET) 212 000000CF 8CDA <1> mov dx, ds 213 000000D1 81C2B808 <1> add dx, paras(100h + DATAENTRYTABLESIZE + datastack_size) 214 000000D5 B9A804 <1> mov cx, paras(messagesegment_truncated_size) 215 000000D8 E82E13 <1> call init_movp 216 000000DB 8916[1201] <1> mov word [messageseg], dx 217 <1> %if _HELP_COMPRESSED && ! _PM 218 <1> mov [hshrink_memory_source.segment], dx 219 <1> %endif 220 <1> %if _BOOTLDR_DISCARD_HELP 221 000000DF C706[1A01]804A <1> mov word [messageseg_size], messagesegment_truncated_size 222 000000E5 1E <1> push ds 223 000000E6 0E <1> push cs 224 000000E7 1F <1> pop ds 225 000000E8 BE[7410] <1> mov si, imsg.boothelp_replacement 226 000000EB 8EC2 <1> mov es, dx 227 000000ED BF[3A4A] <1> mov di, msg.boothelp 228 000000F0 B91D00 <1> mov cx, imsg.boothelp_replacement_size_w 229 000000F3 F3A5 <1> rep movsw 230 000000F5 31C0 <1> xor ax, ax 231 000000F7 B90600 <1> mov cx, words(messagesegment_truncated_size - (msg.boothelp - messagesegment_start + fromwords(imsg.boothelp_replacement_size_w))) 234 000000FA F3AB <1> rep stosw 235 000000FC 1F <1> pop ds 236 <1> %endif 237 <1> %endif 238 <1> 239 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 240 000000FD 58 <1> pop ax 241 000000FE A3[6C0B] <1> mov word [history.segorsel + soaSegSel], ax 242 <1> %if _PM 243 <1> mov word [history.segorsel + soaSegment], ax 244 <1> %endif 245 00000101 8EC0 <1> mov es, ax 246 00000103 31FF <1> xor di, di 247 00000105 B90010 <1> mov cx, historysegment_size >> 1 248 00000108 31C0 <1> xor ax, ax 249 0000010A F3AB <1> rep stosw 250 <1> %endif 251 <1> 252 0000010C 89D8 <1> mov ax, bx 253 <1> 254 0000010E A3[4A0A] <1> mov word [auxbuff_segorsel + soaSegSel], ax 255 <1> %if _PM 256 <1> mov word [auxbuff_segorsel + soaSegment], ax 257 <1> ; initialise auxbuff references 258 <1> %endif 259 <1> %if _IMMASM && _IMMASM_AUXBUFF 260 <1> mov word [immseg], ax 261 <1> %endif 262 <1> 263 00000111 8EC0 <1> mov es, ax 264 00000113 31FF <1> xor di, di 265 00000115 B90810 <1> mov cx, _AUXBUFFSIZE >> 1 266 00000118 31C0 <1> xor ax, ax 267 0000011A F3AB <1> rep stosw ; initialise auxbuff 268 <1> 269 0000011C FA <1> cli 270 0000011D 8CD8 <1> mov ax, ds 271 0000011F 8EC0 <1> mov es, ax 272 00000121 8ED0 <1> mov ss, ax 273 00000123 BC[0010] <1> mov sp, stack_end ; application mode stack switch 274 00000126 FB <1> sti 275 <1> 276 00000127 B44A <1> mov ah, 4Ah 277 00000129 BBFA27 <1> mov bx, paras(APPINITSTACK_START) 278 0000012C CD21 <1> int 21h ; shrink to drop init stack 279 <1> 280 <1> %if _CONFIG 281 <1> find_config_application: 282 0000012E C606[0201]00 <1> mov byte [configpath], 0 283 00000133 A12C00 <1> mov ax, [2Ch] 284 00000136 BF[C80A] <1> mov di, imsg.varconfig 285 00000139 B90D00 <1> mov cx, imsg.varconfig.length 286 0000013C BA[0201] <1> mov dx, configpath 287 0000013F E8BF1F <1> call init_copyvar 288 00000142 7303 <1> jnc .done 289 00000144 E82200 <1> call find_executable_application 290 <1> .done: 291 <1> 292 <1> 293 <1> find_scripts_application: 294 00000147 36C606[8402]00 <1> mov byte [ss:scriptspath], 0 295 0000014D 36A12C00 <1> mov ax, [ss:2Ch] 296 00000151 BF[D50A] <1> mov di, imsg.varscripts 297 00000154 B90E00 <1> mov cx, imsg.varscripts.length 298 00000157 BA[8402] <1> mov dx, scriptspath 299 0000015A E8A41F <1> call init_copyvar 300 0000015D 7303 <1> jnc .done 301 0000015F E80700 <1> call find_executable_application 302 <1> .done: 303 <1> 304 00000162 16 <1> push ss 305 00000163 1F <1> pop ds 306 00000164 16 <1> push ss 307 00000165 07 <1> pop es 308 <1> %endif 309 <1> 310 00000166 E9AB13 <1> jmp old_initcode 311 <1> 312 <1> 313 <1> %if _CONFIG 314 <1> ; INP: dx -> buffer 315 <1> ; ds => PSP 316 <1> find_executable_application: 317 00000169 A12C00 <1> mov ax, [2Ch] 318 0000016C 85C0 <1> test ax, ax 319 0000016E 743E <1> jz .noexec 320 00000170 8ED8 <1> mov ds, ax 321 00000172 31F6 <1> xor si, si 322 <1> @@: 323 00000174 E8AE1F <1> call init_nextvar 324 00000177 75FB <1> jne @B 325 00000179 46 <1> inc si 326 0000017A AD <1> lodsw 327 0000017B 83F801 <1> cmp ax, 1 328 0000017E 752E <1> jne .noexec 329 00000180 1E <1> push ds 330 00000181 07 <1> pop es 331 00000182 89F7 <1> mov di, si 332 00000184 B97F00 <1> mov cx, 127 333 00000187 B000 <1> mov al, 0 334 00000189 F2AE <1> repne scasb 335 0000018B 7521 <1> jne .noexec 336 0000018D 4F <1> dec di 337 <1> 338 0000018E B90000 <1> mov cx, 0 339 <1> @@: 340 00000191 39F7 <1> cmp di, si 341 00000193 7610 <1> jbe @F 342 00000195 4F <1> dec di 343 00000196 803D2F <1> cmp byte [di], '/' 344 00000199 7405 <1> je .slash 345 0000019B 803D5C <1> cmp byte [di], '\' 346 0000019E 75F1 <1> jne @B 347 <1> .slash: 348 000001A0 89F9 <1> mov cx, di 349 000001A2 41 <1> inc cx 350 000001A3 29F1 <1> sub cx, si 351 <1> @@: 352 <1> 353 000001A5 16 <1> push ss 354 000001A6 07 <1> pop es 355 000001A7 89D7 <1> mov di, dx 356 000001A9 F3A4 <1> rep movsb 357 000001AB B000 <1> mov al, 0 358 000001AD AA <1> stosb 359 <1> 360 <1> .noexec: 361 <1> .done: 362 000001AE C3 <1> retn 363 <1> %endif 364 <1> 365 <1> %endif 366 <1> 367 <1> 368 <1> %if _APPLICATION || _DEVICE 369 <1> ; INP: ds => (pseudo) PSP, data/entry segment 370 <1> ; OUT: word [code_seg] set 371 <1> ; code segments placed 372 <1> ; CHG: ax, cx, dx 373 <1> ; STT: UP 374 <1> place_code_segments: 375 000001AF 8CD8 <1> mov ax, ds 376 000001B1 050A0D <1> add ax, paras(CODESECTIONOFFSET) 377 <1> ; => code1 image, then code2 image 378 <1> %if _BOOTLDR_DISCARD 379 000001B4 C706[1601]60B7 <1> mov word [code_size], ldebug_code_bootldr_truncated_size 380 000001BA B9760B <1> mov cx, ldebug_code_bootldr_truncated_size_p 381 <1> ; prepare for code1 segment move 382 <1> %if _DUALCODE 383 <1> cmp ax, dx ; source above destination ? 384 <1> jae @F ; yes --> 385 <1> call .place_code2 ; source is below, move "backward" (high first) 386 <1> %endif 387 000001BD E84912 <1> call init_movp ; low last 388 <1> %if _DUALCODE 389 <1> jmp @FF 390 <1> 391 <1> @@: 392 <1> call init_movp ; source is above, move "forward" (low first) 393 <1> call .place_code2 ; high last 394 <1> @@: 395 <1> %endif 396 <1> %else 397 <1> mov cx, ldebug_code_size_p + ldebug_code2_size_p ; untruncated 398 <1> call init_movp 399 <1> %endif 400 000001C0 8916[1001] <1> mov word [code_seg], dx ; initialise code segment reference 401 000001C4 C3 <1> retn 402 <1> 403 <1> %if _BOOTLDR_DISCARD && _DUALCODE 404 <1> .place_code2: 405 <1> push ax 406 <1> push cx 407 <1> push dx 408 <1> add dx, cx ; => behind truncated code1 segment 409 <1> add ax, ldebug_code_size_p ; untruncated 410 <1> ; => at code2 image 411 <1> mov cx, ldebug_code2_size_p 412 <1> ; = size of code2 segment 413 <1> call init_movp 414 <1> pop dx 415 <1> pop cx 416 <1> pop ax 417 <1> retn 418 <1> %endif 419 <1> %endif 420 <1> 421 <1> 422 <1> init_retf: 423 000001C5 CB <1> retf 424 <1> 425 <1> 426 <1> ; INP: bx => destination for auxbuff 427 <1> ; (The following are not actually used by this function, 428 <1> ; they're just what is passed in and preserved to 429 <1> ; be used by the caller after returning.) 430 <1> ; dx => destination for code image 431 <1> ; (if boot-loaded:) cx => destination for pseudo-PSP 432 <1> ; (implies cx+10h => destination for data_entry) 433 <1> ; ax => segment for history buffer 434 <1> ; OUT: ZR if this destination for auxbuff doesn't cross 435 <1> ; a 64 KiB boundary 436 <1> ; NZ else 437 <1> ; CHG: si, di 438 <1> init_check_auxbuff: 439 000001C6 89DE <1> mov si, bx ; => auxbuff 440 <1> %if _AUXBUFFSIZE < 8192 441 <1> %error Expected full sector length auxbuff 442 <1> %endif 443 000001C8 8DBC0002 <1> lea di, [si + (8192 >> 4)]; => behind auxbuff (at additional paragraph) 444 000001CC 81E600F0 <1> and si, 0F000h ; => 64 KiB chunk of first paragraph of auxbuff 445 000001D0 81E700F0 <1> and di, 0F000h ; => 64 KiB chunk of additional paragraph 446 000001D4 39F7 <1> cmp di, si ; same ? 447 <1> ; ZR if they are the same 448 000001D6 C3 <1> retn 449 <1> 450 <1> 451 <1> %if _BOOTLDR 452 <1> ; Our loader transfers control to us with these registers: 453 <1> ; INP: ss:bp -> BPB 454 <1> ; ss:bp - 16 -> loadstackvars 455 <1> ; ss:bp - 32 -> loaddata 456 <1> ; (loader enters at) cs:0 -> loaded payload 457 <1> ; (loader enters at) cs:32 -> entry point 458 <1> ; (entrypoint sets up) ds:100h -> loaded payload 459 <1> ; STT: EI, UP 460 <1> ; all interrupts left from BIOS 461 <1> boot_initcode: 462 000001D7 FC <1> cld 463 <1> 464 <1> d4 call init_d4message 465 <1> d4 asciz "In boot_initcode",13,10 466 <1> 467 000001D8 8B56E0 <1> mov dx, word [bp + ldMemoryTop] 468 <1> 469 <1> ; initialise sdp 470 000001DB 8B461E <1> mov ax, word [bp + bsBPB + bpbHiddenSectors + 2] 471 000001DE A3[9E57] <1> mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2], ax 472 000001E1 8B461C <1> mov ax, word [bp + bsBPB + bpbHiddenSectors] 473 000001E4 A3[9C57] <1> mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors], ax 474 <1> 475 000001E7 31DB <1> xor bx, bx 476 000001E9 8A4640 <1> mov al, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 477 000001EC A2[C057] <1> mov byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit], al 478 000001EF 88C3 <1> mov bl, al ; bx = LD unit 479 000001F1 84C0 <1> test al, al ; hdd or diskette ? 480 000001F3 8B46EC <1> mov ax, word [bp + ldQueryPatchValue] 481 000001F6 7902 <1> jns @F ; diskette --> 482 000001F8 86C4 <1> xchg al, ah ; get high word of query patch value 483 <1> @@: 484 000001FA 84C0 <1> test al, al ; use for our access to this unit ? 485 000001FC 7906 <1> jns @F ; no --> 486 000001FE 2407 <1> and al, luf_mask_writable ; clear unused bits 487 00000200 8887[8055] <1> mov byte [load_unit_flags + bx], al 488 <1> ; save here 489 <1> @@: 490 <1> 491 <1> 492 00000204 8CDB <1> mov bx, ds 493 00000206 8EC3 <1> mov es, bx ; => data entry image 494 00000208 BF[C056] <1> mov di, loaddata_loadedfrom ; -> loaded from data (ldp) 495 <1> 496 <1> ; initialise LOADDATA, LOADSTACKVARS, and BPB 497 0000020B 16 <1> push ss 498 0000020C 1F <1> pop ds 499 0000020D 8D76E0 <1> lea si, [bp + LOADDATA] ; -> LOADDATA on stack 500 00000210 B97A00 <1> mov cx, (-LOADDATA + bsBPB + ebpbNew + BPBN_size) 501 00000213 F3A4 <1> rep movsb 502 <1> 503 <1> ; initialise cmdline_buffer from below LOADDATA 504 00000215 8DB6E0FE <1> lea si, [bp + ldCommandLine.start] 505 00000219 BF[3001] <1> mov di, cmdline_buffer ; -> our buffer in data entry 506 <1> 507 0000021C 813C00FF <1> cmp word [si], 0FF00h 508 00000220 7505 <1> jne @F 509 <1> 510 00000222 0E <1> push cs 511 00000223 1F <1> pop ds 512 00000224 BE[A411] <1> mov si, imsg.default_cmdline.boot 513 <1> 514 <1> @@: 515 00000227 AC <1> lodsb 516 00000228 84C0 <1> test al, al 517 0000022A 7423 <1> jz @FF 518 <1> 519 0000022C 26800E[D900]01 <1> setopt [es:internalflags3], dif3_input_cmdline 520 00000232 A9 <1> db __TEST_IMM16 521 <1> .switch_c_loop: 522 00000233 AA <1> stosb 523 00000234 AC <1> lodsb 524 <1> .switch_c_loop_after_semicolon: 525 00000235 3C00 <1> cmp al, 0 526 00000237 7415 <1> je @F 527 00000239 3C3B <1> cmp al, ';' 528 0000023B 7508 <1> jne .switch_c_not_semicolon 529 0000023D B00D <1> mov al, 13 530 0000023F AA <1> stosb 531 00000240 E8341E <1> call init_skipwhite 532 00000243 EBF0 <1> jmp .switch_c_loop_after_semicolon 533 <1> 534 <1> .switch_c_not_semicolon: 535 00000245 3C5C <1> cmp al, '\' 536 00000247 75EA <1> jne .switch_c_loop 537 00000249 AC <1> lodsb 538 0000024A 3C00 <1> cmp al, 0 539 0000024C 75E5 <1> jne .switch_c_loop 540 <1> 541 <1> @@: 542 0000024E AA <1> stosb 543 <1> @@: 544 <1> 545 0000024F 89D0 <1> mov ax, dx 546 00000251 2D0022 <1> sub ax, paras(BOOTDELTA) 547 00000254 7303E9DF00 <1> jc .error_out_of_memory 548 <1> ; We exaggerate the target size (BOOTDELTA) for the 549 <1> ; worst case, thus we do not need to check for narrower 550 <1> ; fits later on. BOOTDELTA includes the pseudo-PSP size, 551 <1> ; data_entry size, asmtable1_size, asmtable2_size, 552 <1> ; datastack_size, code_size, 2 times auxbuff_size, 553 <1> ; historysegment_size, 554 <1> ; plus 16 bytes for the image ident prefix paragraph, 555 <1> ; and all of that rounded to a kibibyte boundary. 556 <1> 557 00000259 8CC9 <1> mov cx, cs 558 0000025B 81C14402 <1> add cx, paras(init_size + BOOTINITSTACK_SIZE) 559 0000025F 7303E9D400 <1> jc .error_out_of_memory 560 00000264 39D1 <1> cmp cx, dx 561 00000266 7603E9CD00 <1> ja .error_out_of_memory 562 <1> ; This requires that above the image (including init) 563 <1> ; there is some 512 bytes free. That could be a problem 564 <1> ; except we've already exhausted the iniload-internally 565 <1> ; used buffers + stack, and do not need to preserve any 566 <1> ; of those. Recall that dx holds MemoryTop, *not* the 567 <1> ; lower LoadTop which could be right behind the image. 568 <1> ; The sector buffer alone is documented as being 8 KiB 569 <1> ; sized, not to mention the FAT buffer and stack and 570 <1> ; LOADDATA/LOADSTACKVARS/BPB/boot sector. 571 <1> 572 0000026B 8CCF <1> mov di, cs 573 0000026D FA <1> cli 574 0000026E 8ED7 <1> mov ss, di 575 00000270 BC4024 <1> mov sp, init_size + BOOTINITSTACK_SIZE 576 00000273 FB <1> sti 577 <1> 578 <1> d4 call init_d4message 579 <1> d4 asciz "Switched to init stack",13,10 580 <1> 581 <1> lframe none 582 <1> lvar word, target 583 00000274 5589E550 <1> lenter 584 <1> lvar word, targetstart 585 00000278 50 <1> push ax 586 <1> lvar word, memtop 587 00000279 52 <1> push dx 588 0000027A 8D7F10 <1> lea di, [bx + 10h] 589 <1> lvar word, data 590 0000027D 57 <1> push di 591 0000027E 8DBF0A0D <1> lea di, [bx + paras(CODESECTIONOFFSET)] 592 <1> lvar word, code 593 00000282 57 <1> push di 594 <1> 595 00000283 39C1 <1> cmp cx, ax ; does init end below-or-equal target ? 596 00000285 7703E9BC00 <1> jbe .no_relocation ; yes, no relocation needed --> 597 <1> 598 <1> d4 call init_d4message 599 <1> d4 asciz "Needs relocation of init segment",13,10 600 <1> 601 0000028A 8B46F8 <1> mov ax, word [bp + ?data] 602 0000028D 2D4402 <1> sub ax, paras(init_size + BOOTINITSTACK_SIZE) 603 00000290 7303E9A300 <1> jc .error_out_of_memory ; already at start of memory --> 604 00000295 83F860 <1> cmp ax, 60h 605 00000298 7303E99B00 <1> jb .error_out_of_memory ; already at start of memory --> 606 <1> 607 <1> ; The relocation never overlaps, as we move init 608 <1> ; and its stack to the space before the image. 609 <1> ; Therefore we can move UP. And only a single 610 <1> ; rep movsw instruction is needed as init and 611 <1> ; its stack always fit in a single segment. 612 0000029D 0E <1> push cs 613 0000029E 1F <1> pop ds 614 0000029F 31F6 <1> xor si, si ; -> init source 615 000002A1 8EC0 <1> mov es, ax 616 000002A3 31FF <1> xor di, di ; -> init destination 617 000002A5 B92012 <1> mov cx, words(init_size + BOOTINITSTACK_SIZE) 618 000002A8 F3A5 <1> rep movsw ; relocate only init 619 <1> ; Must not modify the data already on the stack here, 620 <1> ; until after either .done_relocation or 621 <1> ; .entire_relocation_done (which both relocate ss). 622 <1> 623 000002AA 50 <1> push ax 624 000002AB E817FF <1> call init_retf ; jump to new init 625 <1> 626 <1> ; mov ss, ax 627 <1> ; Logic error: The entire load image relocation would 628 <1> ; make it so that the stack would corrupt part of the 629 <1> ; load image that had been relocated the first time 630 <1> ; already here. We want to keep using the high stack 631 <1> ; here until both relocations are done, at which point 632 <1> ; we *must* relocate ss so as to get the stack out of 633 <1> ; the way of installing the final image components. 634 <1> ; Avoid modifying the stack frame variables until after 635 <1> ; we have relocated the stack. However, temporary use 636 <1> ; of the stack is okay before relocating it. (It must 637 <1> ; be because IRQs and debugger tracing will use it.) 638 000002AE 8B4EF6 <1> mov cx, word [bp + ?code] 639 000002B1 81C1CB0D <1> add cx, paras(ldebug_code_size + ldebug_code2_size) ; untruncated 640 000002B5 3B4EFC <1> cmp cx, word [bp + ?targetstart] 641 <1> ; does code end below-or-equal target ? 642 000002B8 7703E98900 <1> jbe .done_relocation ; yes, relocated enough --> 643 <1> 644 <1> .entire_relocation_needed: 645 <1> d4 call init_d4message 646 <1> d4 asciz "Needs relocation of entire load image",13,10 647 <1> 648 000002BD BA6000 <1> mov dx, 60h 649 000002C0 8EC2 <1> mov es, dx 650 000002C2 8CC8 <1> mov ax, cs 651 000002C4 39C2 <1> cmp dx, ax ; already at start of memory ? 652 000002C6 7370 <1> jae .error_out_of_memory ; then error --> 653 <1> ; This move is always downwards, that is, we can 654 <1> ; move UP. Multiple instructions operating on 655 <1> ; different segments may be needed as the image 656 <1> ; can be larger than 64 KiB. 657 <1> ; However, init was already moved to before the 658 <1> ; remainder of the image, so the first 64 KiB 659 <1> ; move will always leave init finished and 660 <1> ; ready to use. So only move the first chunk 661 <1> ; in the special relocator, then jump into the 662 <1> ; final relocated init to do the remainder. 663 <1> 664 000002C8 42 <1> inc dx 665 <1> ; cmp dx, ax 666 <1> ; ja .error_out_of_memory 667 000002C9 B9[F502] <1> mov cx, .relocated 668 000002CC 52 <1> push dx 669 000002CD 51 <1> push cx ; on stack: far address of .relocated 670 <1> 671 000002CE 89C1 <1> mov cx, ax ; source 672 000002D0 29D1 <1> sub cx, dx ; source - target = how far to relocate 673 <1> 674 000002D2 31FF <1> xor di, di ; es:di -> where to put relocator 675 000002D4 06 <1> push es 676 000002D5 57 <1> push di ; on stack: relocator destination 677 000002D6 51 <1> push cx ; on stack: how far to relocate 678 000002D7 0E <1> push cs 679 000002D8 1F <1> pop ds 680 000002D9 BE[F202] <1> mov si, .relocator ; -> relocator source 681 000002DC B90800 <1> mov cx, 8 682 000002DF F3A5 <1> rep movsw ; put relocator stub 683 <1> 684 000002E1 8EC2 <1> mov es, dx 685 000002E3 5A <1> pop dx ; dx = how far to relocate 686 <1> 687 000002E4 31FF <1> xor di, di ; -> where to relocate to 688 000002E6 31F6 <1> xor si, si ; -> relocate start 689 <1> 690 <1> BOOTRELOC1 equ paras( init_size + BOOTINITSTACK_SIZE + DATAENTRYTABLESIZE + messagesegment_size + ldebug_code_size + ldebug_code2_size) ; untruncated 694 <1> 695 <1> %if 0 696 <1> mov cx, BOOTRELOC1 ; how much to relocate 697 <1> mov bx, 1000h 698 <1> mov ax, cx 699 <1> cmp ax, bx ; > 64 KiB? 700 <1> jbe @F 701 <1> mov cx, bx ; first relocate the first 64 KiB 702 <1> @@: 703 <1> sub ax, cx ; how much to relocate later 704 <1> shl cx, 1 705 <1> shl cx, 1 706 <1> shl cx, 1 ; how much to relocate first, 707 <1> ; << 3 == convert paragraphs to words 708 <1> %else 709 000002E8 BB0010 <1> mov bx, 1000h 710 <1> %if BOOTRELOC1 > 1000h 711 000002EB B90080 <1> mov cx, 8000h 712 000002EE B8090D <1> mov ax, BOOTRELOC1 - 1000h 713 <1> %else 714 <1> mov cx, BOOTRELOC1 << 3 715 <1> xor ax, ax 716 <1> %endif 717 <1> %endif 718 000002F1 CB <1> retf ; jump to relocator 719 <1> 720 <1> ; ds:si -> first chunk of to be relocated data 721 <1> ; es:di -> first chunk of relocation destination 722 <1> ; (si = di = 0, and es always <= ds) 723 <1> ; cx = number of words in first chunk 724 <1> ; ax = how many paragraphs remain after first chunk is done 725 <1> ; dx = how far to relocate in paragraphs 726 <1> ; bx = 1000h 727 <1> ; ss:sp -> far return address into relocated init section 728 <1> ; (this always points into the first chunk) 729 <1> .relocator: 730 000002F2 F3A5 <1> rep movsw 731 000002F4 CB <1> retf ; jump to relocated cs : .relocated 732 <1> 733 <1> .relocated: 734 <1> ; ds => prior chunk of relocation source (may be corrupted) 735 <1> ; es => prior chunk of relocation destination 736 <1> ; cx = 0 737 <1> ; ax = how many paragraphs remain 738 <1> ; dx = how far to relocate in paragraphs 739 <1> ; bx = 1000h 740 <1> @@: 741 000002F5 8CC1 <1> mov cx, es 742 000002F7 01D9 <1> add cx, bx 743 000002F9 8EC1 <1> mov es, cx ; => next segment 744 <1> 745 000002FB 8CD9 <1> mov cx, ds 746 000002FD 01D9 <1> add cx, bx 747 000002FF 8ED9 <1> mov ds, cx ; => next segment 748 <1> 749 00000301 29D8 <1> sub ax, bx ; = how much to relocate after this round 750 00000303 B90080 <1> mov cx, 1000h << 3 ; in case another full 64 KiB to relocate 751 00000306 730B <1> jae @F ; another full 64 KiB to relocate this round --> 752 00000308 01D8 <1> add ax, bx ; restore (possibly zero) 753 0000030A D1E0 <1> shl ax, 1 754 0000030C D1E0 <1> shl ax, 1 755 0000030E D1E0 <1> shl ax, 1 ; convert paragraphs to words 756 00000310 91 <1> xchg cx, ax ; cx = that many words (possibly zero) 757 00000311 31C0 <1> xor ax, ax ; no more to relocate after this round 758 <1> 759 <1> @@: 760 <1> ; ds:0 -> next chunk of source 761 <1> ; es:0 -> next chunk of destination 762 <1> ; cx = how many words in this chunk, may be zero 763 <1> ; ax = how many paragraphs remain for next round 764 <1> ; (if ax is nonzero then cx is 8000h for a full 64 KiB) 765 <1> ; dx = how far to relocate in paragraphs 766 <1> ; bx = 1000h 767 00000313 31F6 <1> xor si, si ; -> source 768 00000315 31FF <1> xor di, di ; -> destination 769 00000317 F3A5 <1> rep movsw ; relocate next chunk 770 00000319 85C0 <1> test ax, ax ; another round needed? 771 0000031B 75D8 <1> jnz @BB ; yes --> 772 <1> 773 <1> .entire_relocation_done: 774 0000031D 8CC8 <1> mov ax, cs 775 0000031F 8ED0 <1> mov ss, ax ; relocate the stack 776 00000321 90 <1> nop 777 <1> ; The stack frame variables have been relocated here 778 <1> ; along with the INIT segment data. 779 <1> 780 <1> ; Now okay to modify relocated stack frame variables. 781 00000322 2956F8 <1> sub word [bp + ?data], dx 782 00000325 721A <1> jc .error_internal 783 00000327 2956F6 <1> sub word [bp + ?code], dx 784 0000032A 7215 <1> jc .error_internal 785 <1> 786 0000032C 8B4EF6 <1> mov cx, word [bp + ?code] 787 0000032F 81C1CB0D <1> add cx, paras(ldebug_code_size + ldebug_code2_size) ; untruncated 788 00000333 3B4EFC <1> cmp cx, word [bp + ?targetstart] 789 <1> ; does code end below-or-equal target ? 790 00000336 760E <1> jbe .done_relocation ; yes --> 791 <1> 792 <1> .error_out_of_memory: 793 00000338 BA[6A12] <1> mov dx, imsg.boot_error_out_of_memory 794 <1> .putsz_error: 795 0000033B E87E11 <1> call init_putsz_cs_bootldr 796 0000033E E95002 <1> jmp init_booterror.soft 797 <1> 798 <1> .error_internal: 799 00000341 BA[7B12] <1> mov dx, imsg.boot_error_internal 800 00000344 EBF5 <1> jmp .putsz_error 801 <1> 802 <1> 803 <1> .done_relocation: 804 <1> .no_relocation: 805 00000346 8CC8 <1> mov ax, cs 806 00000348 8ED0 <1> mov ss, ax ; relocate the stack 807 0000034A 90 <1> nop 808 <1> ; Not needed if we got here after having executed 809 <1> ; .entire_relocation_done or by branching to this 810 <1> ; place through the .no_relocation label, but 811 <1> ; doesn't hurt in those cases either. 812 <1> ; The stack frame variables have been relocated here 813 <1> ; along with the INIT segment data. 814 <1> 815 0000034B 2EC606[9605]A8 <1> mov byte [cs:init_booterror.patch_switch_stack], __TEST_IMM8 816 <1> ; SMC in section INIT 817 <1> 818 <1> d4 call init_d4message 819 <1> d4 asciz "Relocated enough",13,10 820 <1> 821 <1> 822 00000351 CD12 <1> int 12h 823 00000353 B106 <1> mov cl, 6 824 00000355 D3E0 <1> shl ax, cl 825 <1> 826 00000357 50 <1> push ax 827 00000358 1E <1> push ds 828 00000359 31F6 <1> xor si, si 829 0000035B 92 <1> xchg dx, ax 830 0000035C 8EDE <1> mov ds, si 831 0000035E C536BC00 <1> lds si, [4 * 2Fh] 832 00000362 83C603 <1> add si, 3 833 00000365 AC <1> lodsb 834 00000366 3C52 <1> cmp al, 'R' 835 00000368 750F <1> jne .no_rpl 836 0000036A AC <1> lodsb 837 0000036B 3C50 <1> cmp al, 'P' 838 0000036D 750A <1> jne .no_rpl 839 0000036F AC <1> lodsb 840 00000370 3C4C <1> cmp al, 'L' 841 00000372 7505 <1> jne .no_rpl 842 00000374 B8064A <1> mov ax, 4A06h 843 00000377 CD2F <1> int 2Fh 844 <1> .no_rpl: 845 00000379 92 <1> xchg ax, dx 846 0000037A 1F <1> pop ds 847 0000037B 5A <1> pop dx 848 <1> 849 0000037C 39D0 <1> cmp ax, dx 850 0000037E 7405 <1> je .no_error_rpl 851 <1> ; in case RPL is present, error out (for now) 852 <1> 853 <1> ; notes for +RPL installation: 854 <1> ; 1. Allocate enough memory for our MCB + an PSP + our image + the last and the RPL MCB 855 <1> ; 2. Create the RPL's MCB + a last MCB 856 <1> ; 3. Relocate, initialise PSP 857 <1> ; 4. Hook Int2F as RPLOADER to report DOS our new size 858 <1> 859 00000380 BA[F011] <1> mov dx, imsg.rpl_detected 860 00000383 EBB6 <1> jmp .putsz_error 861 <1> 862 <1> .no_error_rpl: 863 <1> d4 call init_d4message 864 <1> d4 asciz "Loader past RPL detection",13,10 865 <1> 866 00000385 8B5EFA <1> mov bx, word [bp + ?memtop] 867 00000388 39C3 <1> cmp bx, ax 868 0000038A 740C <1> je @F 869 <1> 870 <1> ; Special debugging support: If memtop is below 871 <1> ; what we detected using int 12h then update 872 <1> ; memtop and continue with the changed memtop. 873 <1> ; The relocations done will suffice in any case. 874 0000038C 8946FA <1> mov word [bp + ?memtop], ax 875 0000038F 89C3 <1> mov bx, ax 876 00000391 7205 <1> jb @F 877 <1> 878 00000393 BA[1712] <1> mov dx, imsg.mismatch_detected 879 00000396 EBA3 <1> jmp .putsz_error 880 <1> 881 <1> @@: ; bx => behind usable memory 882 <1> %if 0 883 <1> mov ah, 0C1h 884 <1> stc 885 <1> int 15h ; BIOS, do you have an EBDA? 886 <1> mov ax, es 887 <1> jnc .ebda ; segment in ax --> 888 <1> ; I don't believe you, let's check 889 <1> %endif ; Enabling this would enable the BIOS to return an EBDA even if it isn't 890 <1> ; noted at 40h:0Eh, which would be useless because we have to relocate it. 891 <1> 892 00000398 31D2 <1> xor dx, dx ; initialise dx to zero if no EBDA 893 0000039A B84000 <1> mov ax, 40h 894 0000039D 8EC0 <1> mov es, ax 895 0000039F 26A10E00 <1> mov ax, word [ es:0Eh ] ; EBDA segment (unless zero) or LPT4 base I/O address (200h..3FCh) 896 000003A3 3D0004 <1> cmp ax, 400h 897 000003A6 7223 <1> jb .noebda ; --> 898 <1> .ebda: 899 <1> d4 call init_d4message 900 <1> d4 asciz "EBDA detected",13,10 901 <1> 902 000003A8 2EFE06[A40A] <1> inc byte [cs:init_boot_ebdaflag] 903 000003AD 39D8 <1> cmp ax, bx 904 <1> ;jb init_booterror.soft ; uhh, the EBDA is inside our memory? 905 <1> ;ja init_booterror.soft ; EBDA higher than top of memory. This is just as unexpected. 906 000003AF 7405 <1> je @F 907 000003B1 BA[4B12] <1> mov dx, imsg.boot_ebda_unexpected 908 000003B4 EB85 <1> jmp .putsz_error 909 <1> 910 <1> @@: 911 000003B6 8ED8 <1> mov ds, ax 912 000003B8 31D2 <1> xor dx, dx 913 000003BA 8A160000 <1> mov dl, byte [ 0 ] ; EBDA size in KiB 914 000003BE B106 <1> mov cl, 6 915 000003C0 D3E2 <1> shl dx, cl ; *64, to paragraphs 916 000003C2 2E8916[9E0A] <1> mov word [cs:init_boot_ebdasize], dx 917 000003C7 2EA3[A00A] <1> mov word [cs:init_boot_ebdasource], ax 918 <1> d4 jmp @F 919 <1> .noebda: 920 <1> d4 call init_d4message 921 <1> d4 asciz "No EBDA detected",13,10 922 <1> @@: 923 <1> 924 <1> 925 000003CB 8B4EFA <1> mov cx, word [bp + ?memtop] 926 000003CE 2E030E[9E0A] <1> add cx, [cs:init_boot_ebdasize] 927 000003D3 81E9D61F <1> sub cx, paras(INITSECTIONOFFSET + datastack_size + auxbuff_size + historysegment_size) 928 <1> ; cx = paragraph of pseudo-PSP if here 929 000003D7 49 <1> dec cx ; => paragraph of image ident 930 000003D8 83E1C0 <1> and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 931 000003DB 41 <1> inc cx ; => paragraph of pseudo-PSP if here 932 <1> 933 000003DC 89CB <1> mov bx, cx 934 000003DE 89DA <1> mov dx, bx 935 000003E0 81C3D51B <1> add bx, paras(BOOTAUXTARGET1) ; => auxbuff target if here 936 000003E4 81C20A0E <1> add dx, paras(BOOTCODETARGET1) ; => code target if here 937 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 938 000003E8 89D8 <1> mov ax, bx 939 000003EA 050102 <1> add ax, paras(auxbuff_size) 940 <1> %if BOOTAUXTARGET1_equate <= BOOTCODETARGET1_equate 941 <1> %error Unexpected layout 942 <1> %endif 943 <1> %endif 944 000003ED E8D6FD <1> call init_check_auxbuff 945 000003F0 743E <1> jz @F 946 <1> 947 <1> d4 call init_d4message 948 <1> d4 asciz "First layout rejected",13,10 949 <1> 950 000003F2 89CB <1> mov bx, cx ; attempt same target again 951 000003F4 89DA <1> mov dx, bx 952 000003F6 81C30A0E <1> add bx, paras(BOOTAUXTARGET2) ; => auxbuff target if here 953 000003FA 81C20B10 <1> add dx, paras(BOOTCODETARGET2) ; => code target if here 954 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 955 <1> %if (paras(BOOTAUXTARGET1_equate) + paras(auxbuff_size_equate)) != (paras(BOOTCODETARGET2_equate) + paras(ldebug_codes_size_equate)) 957 <1> %error Unexpected layout 958 <1> %endif 959 <1> %endif 960 000003FE E8C5FD <1> call init_check_auxbuff 961 00000401 742D <1> jz @F 962 <1> 963 <1> d4 call init_d4message 964 <1> d4 asciz "Second layout rejected",13,10 965 <1> 966 <1> ; If both prior attempts failed, we allocate 967 <1> ; an additional 8 KiB and move the buffer to 968 <1> ; that. This should always succeed. 969 00000403 8B4EFA <1> mov cx, word [bp + ?memtop] 970 00000406 2E030E[9E0A] <1> add cx, [cs:init_boot_ebdasize] 971 0000040B 81E9D721 <1> sub cx, paras(INITSECTIONOFFSET + datastack_size + auxbuff_size*2 + historysegment_size) 972 <1> ; cx = paragraph of pseudo-PSP if here 973 0000040F 49 <1> dec cx ; => paragraph of image ident 974 00000410 83E1C0 <1> and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 975 00000413 41 <1> inc cx ; => paragraph of pseudo-PSP if here 976 <1> 977 00000414 89CB <1> mov bx, cx 978 00000416 89DA <1> mov dx, bx 979 00000418 81C3D51B <1> add bx, paras(BOOTAUXTARGET1) ; => auxbuff target if here 980 <1> ; Note that we use BOOTAUXTARGET1 here, not BOOTAUXTARGET3, because 981 <1> ; we move where the debugger starts rather than where it ends. 982 0000041C 81C20A0E <1> add dx, paras(BOOTCODETARGET1) ; => code target if here 983 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 984 00000420 89D8 <1> mov ax, bx 985 00000422 050102 <1> add ax, paras(auxbuff_size) 986 <1> %endif 987 00000425 E89EFD <1> call init_check_auxbuff 988 00000428 7406 <1> jz @F 989 <1> 990 <1> ; Because this shouldn't happen, this is 991 <1> ; considered an internal error. 992 0000042A BA[A10B] <1> mov dx, imsg.early_reloc_fail 993 0000042D E90BFF <1> jmp .putsz_error 994 <1> 995 <1> 996 <1> ; cx => data_entry target 997 <1> ; dx => code target 998 <1> ; bx => auxbuff target 999 <1> ; ax => history segment 1000 <1> @@: 1001 <1> d4 call init_d4message 1002 <1> d4 asciz "Layout found" 1003 <1> d4 call init_d4dumpregs 1004 <1> d4 call init_d4message 1005 <1> d4 asciz 13,10 1006 <1> 1007 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 1008 00000430 50 <1> push ax 1009 <1> %endif 1010 00000431 894EFE <1> mov word [bp + ?target], cx 1011 00000434 52 <1> push dx 1012 00000435 2E803E[A40A]00 <1> cmp byte [cs:init_boot_ebdaflag], 0 1013 0000043B 742E <1> jz .reloc_memtop_no_ebda 1014 0000043D 49 <1> dec cx 1015 0000043E 2E2B0E[9E0A] <1> sub cx, word [cs:init_boot_ebdasize] 1016 00000443 2EA1[A00A] <1> mov ax, word [cs:init_boot_ebdasource] 1017 00000447 89CA <1> mov dx, cx 1018 00000449 2E890E[A20A] <1> mov word [cs:init_boot_ebdadest], cx 1019 0000044E 2E8B0E[9E0A] <1> mov cx, word [cs:init_boot_ebdasize] 1020 00000453 E8B30F <1> call init_movp 1021 00000456 014EFA <1> add word [bp + ?memtop], cx 1022 00000459 2E800E[A40A]02 <1> or byte [cs:init_boot_ebdaflag], 2 1023 0000045F B84000 <1> mov ax, 40h 1024 00000462 8EC0 <1> mov es, ax 1025 00000464 2689160E00 <1> mov word [es:0Eh], dx ; relocate EBDA 1026 <1> 1027 <1> d4 call init_d4message 1028 <1> d4 asciz "EBDA relocated",13,10 1029 <1> 1030 00000469 EB02 <1> jmp @F 1031 <1> 1032 <1> .reloc_memtop_no_ebda: 1033 0000046B 89CA <1> mov dx, cx 1034 <1> @@: 1035 0000046D B106 <1> mov cl, 6 1036 0000046F D3EA <1> shr dx, cl 1037 00000471 B84000 <1> mov ax, 40h 1038 00000474 8EC0 <1> mov es, ax 1039 00000476 2E8916[9A0A] <1> mov word [ cs:init_boot_new_memsizekib ], dx 1040 0000047B 2687161300 <1> xchg word [es:13h], dx 1041 00000480 2E8916[9C0A] <1> mov word [ cs:init_boot_old_memsizekib ], dx 1042 00000485 5A <1> pop dx 1043 <1> d4 call init_d4message 1044 <1> d4 asciz "Memory top relocated",13,10 1045 <1> 1046 00000486 8B4EFE <1> mov cx, word [bp + ?target] 1047 00000489 8ED9 <1> mov ds, cx 1048 0000048B 8B7EFA <1> mov di, word [bp + ?memtop] ; => memory top 1049 0000048E 81EF4002 <1> sub di, paras(1024+8192) 1050 00000492 8EC7 <1> mov es, di 1051 00000494 39CF <1> cmp di, cx ; max padding starts below target PSP ? 1052 00000496 7209 <1> jb @F ; yes, do not initialise padding 1053 00000498 31FF <1> xor di, di ; -> padding 1054 0000049A B90012 <1> mov cx, words(1024+8192) 1055 0000049D 31C0 <1> xor ax, ax 1056 0000049F F3AB <1> rep stosw ; initialise padding 1057 <1> @@: 1058 <1> 1059 000004A1 8B46F6 <1> mov ax, word [bp + ?code] ; => code source 1060 <1> ; dx => code target 1061 000004A4 B9CB0D <1> mov cx, ldebug_code_size_p + ldebug_code2_size_p ; untruncated 1062 <1> ; = size 1063 000004A7 E85F0F <1> call init_movp ; relocate code to target 1064 <1> d4 call init_d4message 1065 <1> d4 asciz "Code segment relocated",13,10 1066 <1> 1067 000004AA 52 <1> push dx ; (code segment) 1068 000004AB 8B46F8 <1> mov ax, word [bp + ?data] ; => data_entry source 1069 000004AE 8CDA <1> mov dx, ds 1070 000004B0 83C210 <1> add dx, paras(100h) ; => data_entry target 1071 000004B3 B9A807 <1> mov cx, paras(DATAENTRYTABLESIZE) 1072 000004B6 E8500F <1> call init_movp ; relocate data_entry to target 1073 000004B9 8F06[1001] <1> pop word [code_seg] ; initialise code reference 1074 <1> d4 call init_d4message 1075 <1> d4 asciz "Data segment relocated",13,10 1076 <1> 1077 <1> %if _MESSAGESEGMENT 1078 000004BD 8B46F8 <1> mov ax, word [bp + ?data] ; => data_entry source 1079 000004C0 05A807 <1> add ax, paras(MESSAGESECTIONOFFSET - 100h) 1080 000004C3 8CDA <1> mov dx, ds 1081 000004C5 81C2B808 <1> add dx, paras(100h + DATAENTRYTABLESIZE + datastack_size) 1082 000004C9 B95205 <1> mov cx, paras(messagesegment_size) 1083 000004CC E83A0F <1> call init_movp 1084 000004CF 8916[1201] <1> mov word [messageseg], dx 1085 <1> %if _HELP_COMPRESSED && ! _PM 1086 <1> mov [hshrink_memory_source.segment], dx 1087 <1> %endif 1088 <1> %endif 1089 <1> 1090 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 1091 000004D3 58 <1> pop ax 1092 000004D4 A3[6C0B] <1> mov word [history.segorsel + soaSegSel], ax 1093 <1> %if _PM 1094 <1> mov word [history.segorsel + soaSegment], ax 1095 <1> %endif 1096 000004D7 8EC0 <1> mov es, ax 1097 000004D9 31FF <1> xor di, di 1098 000004DB B90010 <1> mov cx, historysegment_size >> 1 1099 000004DE 31C0 <1> xor ax, ax 1100 000004E0 F3AB <1> rep stosw 1101 <1> %endif 1102 <1> 1103 000004E2 89D8 <1> mov ax, bx 1104 000004E4 A3[4A0A] <1> mov word [auxbuff_segorsel + soaSegSel], ax 1105 <1> %if _PM 1106 <1> mov word [auxbuff_segorsel + soaSegment], ax 1107 <1> ; initialise auxbuff references 1108 <1> %endif 1109 <1> %if _IMMASM && _IMMASM_AUXBUFF 1110 <1> mov word [immseg], ax 1111 <1> %endif 1112 <1> 1113 000004E7 8EC0 <1> mov es, ax 1114 000004E9 31FF <1> xor di, di 1115 000004EB B90810 <1> mov cx, _AUXBUFFSIZE >> 1 1116 000004EE 31C0 <1> xor ax, ax 1117 000004F0 F3AB <1> rep stosw ; initialise auxbuff 1118 <1> d4 call init_d4message 1119 <1> d4 asciz "auxbuff initialised",13,10 1120 <1> 1121 000004F2 1E <1> push ds 1122 000004F3 07 <1> pop es 1123 000004F4 31FF <1> xor di, di 1124 000004F6 B98000 <1> mov cx, words(100h) 1125 000004F9 F3AB <1> rep stosw ; initialise pseudo-PSP 1126 <1> 1127 <1> init_boot_imageident: 1128 000004FB 8CD8 <1> mov ax, ds 1129 000004FD 48 <1> dec ax 1130 000004FE 8EC0 <1> mov es, ax ; => paragraph for imageident 1131 00000500 31FF <1> xor di, di ; -> imageident target 1132 00000502 8B5EFA <1> mov bx, word [bp + ?memtop] 1133 00000505 29C3 <1> sub bx, ax ; = how many paragraphs do we use ? 1134 <1> 1135 00000507 891E[1C01] <1> mov word [alloc_size], bx 1136 0000050B A3[1E01] <1> mov word [alloc_seg], ax 1137 <1> 1138 0000050E 0E <1> push cs 1139 0000050F 1F <1> pop ds 1140 00000510 891E[780A] <1> mov word [imageident.size], bx ; set image ident size 1141 <1> 1142 00000514 BE[700A] <1> mov si, imageident 1143 00000517 56 <1> push si 1144 00000518 B90800 <1> mov cx, 8 1145 0000051B 31D2 <1> xor dx, dx 1146 <1> .loop: 1147 0000051D AD <1> lodsw 1148 0000051E 01C2 <1> add dx, ax 1149 00000520 E2FB <1> loop .loop 1150 00000522 5E <1> pop si 1151 <1> 1152 00000523 F7DA <1> neg dx 1153 00000525 8916[760A] <1> mov word [imageident.check], dx ; set image ident checksum 1154 <1> 1155 00000529 B108 <1> mov cl, 8 1156 0000052B F3A5 <1> rep movsw ; write image ident paragraph 1157 <1> 1158 0000052D 8B46FE <1> mov ax, word [bp + ?target] 1159 <1> 1160 <1> lleave ctx ; dropping this frame for stack switch 1161 <1> 1162 00000530 FA <1> cli 1163 00000531 8ED8 <1> mov ds, ax 1164 00000533 8EC0 <1> mov es, ax 1165 00000535 8ED0 <1> mov ss, ax 1166 00000537 BC[0010] <1> mov sp, stack_end ; boot mode stack switch 1167 0000053A FB <1> sti 1168 <1> 1169 0000053B 2EFF36[9C0A] <1> push word [cs:init_boot_old_memsizekib] 1170 00000540 8F06[D45A] <1> pop word [boot_old_memsizekib] 1171 00000544 2EFF36[9A0A] <1> push word [cs:init_boot_new_memsizekib] 1172 00000549 8F06[D25A] <1> pop word [boot_new_memsizekib] 1173 0000054D 2EA0[A40A] <1> mov al, byte [cs:init_boot_ebdaflag] 1174 00000551 2401 <1> and al, 1 1175 00000553 A2[D65A] <1> mov byte [boot_ebdaflag], al 1176 <1> 1177 00000556 800E[D100]40 <1> setopt [internalflags], nodosloaded 1178 0000055B 8026[D000]0F <1> clropt [internalflags], notstdinput|inputfile|notstdoutput|outputfile 1179 00000560 C606[540B]00 <1> mov byte [notatty], 0 ; it _is_ a tty 1180 00000565 800E[DA00]20 <1> setopt [internalflags3], dif3_gotint19 1181 <1> 1182 0000056A BA[9E0B] <1> mov dx, imsg.crlf 1183 0000056D E82A0F <1> call init_putsz_cs 1184 <1> 1185 <1> d4 call init_d4message 1186 <1> d4 asciz "New boot_initcode done",13,10 1187 <1> 1188 <1> %if _CONFIG 1189 <1> write_config_boot: 1190 00000570 BF[0201] <1> mov di, configpath 1191 00000573 B86C64 <1> mov ax, "ld" 1192 00000576 AB <1> stosw 1193 00000577 B8702F <1> mov ax, "p/" 1194 0000057A AB <1> stosw 1195 0000057B 893E[8202] <1> mov word [configpath.dir_end], di 1196 0000057F BF[8402] <1> mov di, scriptspath 1197 00000582 B86C64 <1> mov ax, "ld" 1198 00000585 AB <1> stosw 1199 00000586 B8702F <1> mov ax, "p/" 1200 00000589 AB <1> stosw 1201 0000058A 893E[0404] <1> mov word [scriptspath.dir_end], di 1202 <1> %endif 1203 <1> 1204 0000058E E9720F <1> jmp boot_old_initcode 1205 <1> 1206 <1> 1207 <1> init_booterror: 1208 <1> .soft: 1209 00000591 31C0 <1> xor ax, ax 1210 00000593 A9 <1> db __TEST_IMM16 ; (skip mov) 1211 <1> .hard: 1212 00000594 B001 <1> mov al, 1 1213 <1> 1214 <1> ;d4 call init_d4pocketdosmemdump 1215 <1> d4 call init_d4dumpregs 1216 <1> 1217 <1> .patch_switch_stack: 1218 00000596 EB09 <1> jmp strict short .no_switch_stack 1219 <1> 1220 00000598 8CCB <1> mov bx, cs 1221 0000059A FA <1> cli 1222 0000059B 8ED3 <1> mov ss, bx 1223 0000059D BC4024 <1> mov sp, init_size + BOOTINITSTACK_SIZE 1224 000005A0 FB <1> sti 1225 <1> 1226 <1> .no_switch_stack: 1227 000005A1 50 <1> push ax 1228 <1> 1229 000005A2 B84000 <1> mov ax, 40h 1230 000005A5 8EC0 <1> mov es, ax 1231 <1> 1232 000005A7 2EF606[A40A]02 <1> test byte [cs:init_boot_ebdaflag], 2 1233 000005AD 7416 <1> jz @F 1234 <1> 1235 000005AF 2E8B16[A00A] <1> mov dx, [cs:init_boot_ebdasource] 1236 000005B4 2EA1[A20A] <1> mov ax, [cs:init_boot_ebdadest] 1237 000005B8 2E8B0E[9E0A] <1> mov cx, [cs:init_boot_ebdasize] 1238 000005BD E8490E <1> call init_movp 1239 <1> 1240 000005C0 2689160E00 <1> mov word [es:0Eh], dx 1241 <1> @@: 1242 <1> 1243 000005C5 2E8B16[9C0A] <1> mov dx, [cs:init_boot_old_memsizekib] 1244 000005CA 85D2 <1> test dx, dx 1245 000005CC 7405 <1> jz @F 1246 000005CE 2689161300 <1> mov word [es:13h], dx 1247 <1> @@: 1248 <1> 1249 000005D3 BA[A912] <1> mov dx, imsg.booterror 1250 000005D6 E8E30E <1> call init_putsz_cs_bootldr 1251 000005D9 E8B90E <1> call init_getc_bootldr 1252 000005DC 58 <1> pop ax 1253 000005DD 85C0 <1> test ax, ax 1254 000005DF 7502 <1> jnz @F 1255 000005E1 CD19 <1> int 19h 1256 <1> @@: 1257 000005E3 EA0000FFFF <1> jmp 0FFFFh:0 1258 <1> %endif ; _BOOTLDR 1259 <1> 1260 <1> %if _DEVICE 1261 <1> ; Our entrypoint transfers control to us with these registers: 1262 <1> ; INP: ss:sp -> bx, fl, ds, ax, far return address to DOS 1263 <1> ; ds:100h -> loaded payload 1264 <1> device_initcode: 1265 000005E8 FC <1> cld 1266 <1> 1267 000005E9 830E[0000]FF <1> or word [device_header.next], -1 1268 <1> ; ! this uses offset 100h in the adjusted ds 1269 <1> 1270 000005EE 5B <1> pop bx 1271 000005EF 06 <1> push es 1272 000005F0 53 <1> push bx 1273 000005F1 51 <1> push cx 1274 000005F2 52 <1> push dx 1275 000005F3 56 <1> push si 1276 000005F4 57 <1> push di 1277 <1> 1278 000005F5 268B4710 <1> mov ax, word [es:bx + 0Eh + 2] ; => behind available memory 1279 000005F9 8CDA <1> mov dx, ds 1280 000005FB 83C210 <1> add dx, 10h ; => our memory 1281 000005FE 29D0 <1> sub ax, dx 1282 00000600 721E <1> jc .memorybad 1283 00000602 31D2 <1> xor dx, dx ; dx:ax = amount available paragraphs 1284 00000604 B90400 <1> mov cx, 4 1285 <1> @@: 1286 00000607 D1E0 <1> shl ax, 1 1287 00000609 D1D2 <1> rcl dx, 1 1288 0000060B E2FA <1> loop @B ; dx:ax = amount available bytes 1289 <1> 1290 0000060D 2603470E <1> add ax, word [es:bx + 0Eh] 1291 00000611 83D200 <1> adc dx, 0 ; dx:ax = amount available bytes 1292 <1> 1293 00000614 24F0 <1> and al, ~15 ; (round down) 1294 <1> 1295 00000616 83FA02 <1> cmp dx, DEVICEINITSIZE >> 16 1296 00000619 7503 <1> jne @F 1297 0000061B 3D2080 <1> cmp ax, DEVICEINITSIZE & 0FFFFh 1298 <1> @@: 1299 0000061E 7333 <1> jae .memorygood 1300 <1> 1301 <1> .memorybad: 1302 00000620 BA[7C0B] <1> mov dx, imsg.early_mem_fail 1303 00000623 E8740E <1> call init_putsz_cs 1304 <1> 1305 00000626 B80030 <1> mov ax, 3000h 1306 00000629 CD21 <1> int 21h 1307 0000062B 3C05 <1> cmp al, 5 1308 0000062D 7306 <1> jae @F 1309 0000062F BA[CF0B] <1> mov dx, imsg.dos_below_5 1310 <1> .earlyfail: 1311 00000632 E8650E <1> call init_putsz_cs 1312 <1> @@: 1313 <1> 1314 00000635 5F <1> pop di 1315 00000636 5E <1> pop si 1316 00000637 5A <1> pop dx 1317 00000638 59 <1> pop cx 1318 00000639 5B <1> pop bx 1319 0000063A 07 <1> pop es 1320 <1> 1321 0000063B 8CD8 <1> mov ax, ds 1322 0000063D 83C010 <1> add ax, paras(100h) 1323 00000640 26C747030581 <1> mov word [es:bx + 3], 8105h ; error, done, code: bad structure length 1324 00000646 2683670E00 <1> and word [es:bx + 0Eh], 0 1325 0000064B 26894710 <1> mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 1326 <1> 1327 0000064F 9D <1> popf 1328 00000650 1F <1> pop ds 1329 00000651 58 <1> pop ax 1330 00000652 CB <1> retf 1331 <1> 1332 <1> .memorygood: 1333 00000653 8CD8 <1> mov ax, ds 1334 00000655 05D51A <1> add ax, paras(INITSECTIONOFFSET) 1335 00000658 8CDA <1> mov dx, ds 1336 0000065A 81C2EB25 <1> add dx, paras(DEVICEINITTARGET) 1337 0000065E B92702 <1> mov cx, init_size_p + deviceshim_size_p 1338 00000661 E8A50D <1> call init_movp 1339 <1> init_plus_deviceshim_size_p_equate equ init_size_p + deviceshim_size_p 1340 <1> deviceinittarget_p_equate equ paras(DEVICEINITTARGET) 1341 <1> %if initsectionoffset_p_equate + init_plus_deviceshim_size_p_equate > deviceinittarget_p_equate 1343 <1> %error Overlap detected 1344 <1> %endif 1345 <1> 1346 00000664 52 <1> push dx 1347 00000665 E85DFB <1> call init_retf 1348 <1> 1349 00000668 8CDB <1> mov bx, ds 1350 0000066A 83C314 <1> add bx, paras(DEVICEADJUST) 1351 0000066D 89DA <1> mov dx, bx 1352 0000066F 81C3D618 <1> add bx, paras(AUXTARGET1) 1353 00000673 81C2600D <1> add dx, paras(CODETARGET1) 1354 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 1355 00000677 89D8 <1> mov ax, bx 1356 00000679 050102 <1> add ax, paras(auxbuff_size) 1357 <1> %endif 1358 0000067C 89D1 <1> mov cx, dx 1359 0000067E 2EC706[940A][D521] <1> mov word [cs:init_layout], init_dev_layout_1 1360 00000685 E83EFB <1> call init_check_auxbuff 1361 00000688 7444 <1> jz @F 1362 <1> 1363 0000068A 8CDB <1> mov bx, ds 1364 0000068C 83C314 <1> add bx, paras(DEVICEADJUST) 1365 0000068F 89DA <1> mov dx, bx 1366 00000691 81C3600D <1> add bx, paras(AUXTARGET2) 1367 00000695 81C2610F <1> add dx, paras(CODETARGET2) 1368 00000699 2EC706[940A][DA21] <1> mov word [cs:init_layout], init_dev_layout_2 1369 000006A0 E823FB <1> call init_check_auxbuff 1370 000006A3 7429 <1> jz @F 1371 <1> 1372 <1> ; If both prior attempts failed, we allocate 1373 <1> ; an additional 8 KiB and move the buffer to 1374 <1> ; that. This should always succeed. 1375 000006A5 2EC706[900A]D81E <1> mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 1378 <1> ; enlarge the final memory block size 1379 <1> 1380 000006AC 8CDB <1> mov bx, ds 1381 000006AE 83C314 <1> add bx, paras(DEVICEADJUST) 1382 000006B1 81C3D71A <1> add bx, paras(AUXTARGET3) 1383 000006B5 89CA <1> mov dx, cx 1384 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 1385 000006B7 89D8 <1> mov ax, bx 1386 000006B9 050102 <1> add ax, paras(auxbuff_size) 1387 <1> %endif 1388 000006BC 2EC706[940A][DF21] <1> mov word [cs:init_layout], init_dev_layout_3 1389 000006C3 E800FB <1> call init_check_auxbuff 1390 000006C6 7406 <1> jz @F 1391 <1> 1392 <1> ; Because this shouldn't happen, this is 1393 <1> ; considered an internal error. 1394 000006C8 BA[A10B] <1> mov dx, imsg.early_reloc_fail 1395 000006CB E964FF <1> jmp .earlyfail 1396 <1> 1397 <1> @@: 1398 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 1399 000006CE 50 <1> push ax 1400 <1> %endif 1401 000006CF E8DDFA <1> call place_code_segments 1402 <1> 1403 <1> %if _MESSAGESEGMENT 1404 000006D2 8CD8 <1> mov ax, ds 1405 000006D4 05B807 <1> add ax, paras(MESSAGESECTIONOFFSET) 1406 000006D7 8CDA <1> mov dx, ds 1407 000006D9 81C2CC08 <1> add dx, 10h + paras(deviceshim_size + 110h + DATAENTRYTABLESIZE + datastack_size) 1410 000006DD B9A804 <1> mov cx, paras(messagesegment_truncated_size) 1411 000006E0 E8260D <1> call init_movp 1412 <1> %if _BOOTLDR_DISCARD_HELP 1413 000006E3 C706[1A01]804A <1> mov word [messageseg_size], messagesegment_truncated_size 1414 000006E9 1E <1> push ds 1415 000006EA 0E <1> push cs 1416 000006EB 1F <1> pop ds 1417 000006EC BE[7410] <1> mov si, imsg.boothelp_replacement 1418 000006EF 8EC2 <1> mov es, dx 1419 000006F1 BF[3A4A] <1> mov di, msg.boothelp 1420 000006F4 B91D00 <1> mov cx, imsg.boothelp_replacement_size_w 1421 000006F7 F3A5 <1> rep movsw 1422 000006F9 31C0 <1> xor ax, ax 1423 000006FB B90600 <1> mov cx, words(messagesegment_truncated_size - (msg.boothelp - messagesegment_start + fromwords(imsg.boothelp_replacement_size_w))) 1426 000006FE F3AB <1> rep stosw 1427 00000700 1F <1> pop ds 1428 <1> %endif 1429 00000701 52 <1> push dx 1430 <1> %endif 1431 <1> 1432 00000702 8CD8 <1> mov ax, ds 1433 00000704 83C010 <1> add ax, 10h 1434 00000707 89C2 <1> mov dx, ax 1435 00000709 83C214 <1> add dx, paras(deviceshim_size + 110h) 1436 0000070C B9A807 <1> mov cx, paras(DATAENTRYTABLESIZE) 1437 0000070F E8F70C <1> call init_movp 1438 <1> 1439 00000712 8CC8 <1> mov ax, cs 1440 00000714 052402 <1> add ax, init_size_p 1441 00000717 8CDA <1> mov dx, ds 1442 00000719 83C210 <1> add dx, paras(100h) 1443 0000071C B90300 <1> mov cx, deviceshim_size_p 1444 0000071F E8E70C <1> call init_movp 1445 <1> 1446 00000722 8CDA <1> mov dx, ds 1447 00000724 83C213 <1> add dx, paras(100h) + deviceshim_size_p 1448 00000727 8EC2 <1> mov es, dx 1449 00000729 1E <1> push ds 1450 0000072A 83EA04 <1> sub dx, deviceshim_size_p + 1 1451 0000072D 8EDA <1> mov ds, dx 1452 0000072F 31C0 <1> xor ax, ax 1453 00000731 31FF <1> xor di, di 1454 00000733 B90400 <1> mov cx, 4 1455 00000736 F3AB <1> rep stosw 1456 00000738 BE0800 <1> mov si, 8 1457 0000073B B104 <1> mov cl, 4 1458 0000073D F3A5 <1> rep movsw 1459 0000073F 1F <1> pop ds 1460 <1> 1461 00000740 8CDA <1> mov dx, ds 1462 00000742 83C214 <1> add dx, paras(DEVICEADJUST) 1463 00000745 8EDA <1> mov ds, dx 1464 <1> 1465 <1> %if _MESSAGESEGMENT 1466 <1> %if _HELP_COMPRESSED && ! _PM 1467 <1> pop ax 1468 <1> mov [hshrink_memory_source.segment], ax 1469 <1> mov [messageseg], ax 1470 <1> %else 1471 00000747 8F06[1201] <1> pop word [messageseg] 1472 <1> %endif 1473 <1> %endif 1474 <1> 1475 0000074B 53 <1> push bx 1476 0000074C B451 <1> mov ah, 51h 1477 0000074E CD21 <1> int 21h 1478 00000750 891E[000B] <1> mov word [pspdbe], bx 1479 00000754 5B <1> pop bx 1480 <1> 1481 00000755 8EC2 <1> mov es, dx 1482 00000757 B98000 <1> mov cx, words(256) 1483 0000075A 31FF <1> xor di, di 1484 0000075C 31C0 <1> xor ax, ax 1485 0000075E F3AB <1> rep stosw ; clear buffer for PSP + command line tail 1486 <1> 1487 <1> ; PSP creation moved to later, after command line parsing 1488 <1> 1489 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 1490 00000760 58 <1> pop ax 1491 00000761 A3[6C0B] <1> mov word [history.segorsel + soaSegSel], ax 1492 <1> %if _PM 1493 <1> mov word [history.segorsel + soaSegment], ax 1494 <1> %endif 1495 00000764 8EC0 <1> mov es, ax 1496 00000766 31FF <1> xor di, di 1497 00000768 B90010 <1> mov cx, historysegment_size >> 1 1498 0000076B 31C0 <1> xor ax, ax 1499 0000076D F3AB <1> rep stosw 1500 <1> %endif 1501 <1> 1502 0000076F 89D8 <1> mov ax, bx 1503 <1> 1504 00000771 A3[4A0A] <1> mov word [auxbuff_segorsel + soaSegSel], ax 1505 <1> %if _PM 1506 <1> mov word [auxbuff_segorsel + soaSegment], ax 1507 <1> ; initialise auxbuff references 1508 <1> %endif 1509 <1> %if _IMMASM && _IMMASM_AUXBUFF 1510 <1> mov word [immseg], ax 1511 <1> %endif 1512 <1> 1513 00000774 8EC0 <1> mov es, ax 1514 00000776 31FF <1> xor di, di 1515 00000778 B90810 <1> mov cx, _AUXBUFFSIZE >> 1 1516 0000077B 31C0 <1> xor ax, ax 1517 0000077D F3AB <1> rep stosw ; initialise auxbuff 1518 <1> 1519 0000077F 8CD8 <1> mov ax, ds ; => PSP 1520 00000781 83E804 <1> sub ax, deviceshim_size_p + paras(10h) 1521 00000784 A3[420C] <1> mov word [device_header_address + 2], ax 1522 00000787 A3[1E01] <1> mov word [alloc_seg], ax 1523 <1> 1524 0000078A 8CD8 <1> mov ax, ds ; => PSP 1525 0000078C 2E8B1E[900A] <1> mov bx, word [cs:memsize] 1526 <1> ; = amount paragraphs for PSP + DATA ENTRY + TABLE 1527 <1> ; + DATA STACK + CODE + AUXBUFF + HISTORY 1528 00000791 01D8 <1> add ax, bx ; => placeholder for trailing container 1529 00000793 83C305 <1> add bx, deviceshim_size_p + paras(10h) + paras(10h) 1530 <1> ; (layout is deviceshim, MCB placeholder, debugger segments, 1531 <1> ; placeholder for trailing container MCB) 1532 <1> ; = amount paragraphs expected in MCB 1533 00000796 891E[3E0C] <1> mov word [device_mcb_paragraphs], bx 1534 0000079A 891E[1C01] <1> mov word [alloc_size], bx 1535 <1> 1536 <1> ; ax => where to place container sig 1537 0000079E E80200 <1> call init_dev_place_container_signature 1538 <1> ; ax => behind memory used for device 1539 000007A1 EB12 <1> jmp @F 1540 <1> 1541 <1> ; INP: ax => where to place container signature 1542 <1> ; OUT: ax => behind memory used for device 1543 <1> ; ax = INP:ax + 1 1544 <1> ; CHG: es, di, cx, si 1545 <1> init_dev_place_container_signature: 1546 000007A3 8EC0 <1> mov es, ax 1547 000007A5 31FF <1> xor di, di ; -> buffer for trailing container MCB 1548 000007A7 B90800 <1> mov cx, words(10h) ; = amount words 1549 000007AA 1E <1> push ds 1550 000007AB 0E <1> push cs 1551 000007AC 1F <1> pop ds 1552 000007AD BE[800A] <1> mov si, init_container_signature ; -> init string 1553 000007B0 F3A5 <1> rep movsw 1554 000007B2 1F <1> pop ds 1555 000007B3 40 <1> inc ax ; => behind memory used for device 1556 000007B4 C3 <1> retn 1557 <1> 1558 <1> 1559 <1> @@: 1560 000007B5 8F06[C00C] <1> pop word [reg_edi] 1561 000007B9 8F06[BC0C] <1> pop word [reg_esi] 1562 000007BD 8F06[B00C] <1> pop word [reg_edx] 1563 000007C1 8F06[AC0C] <1> pop word [reg_ecx] 1564 000007C5 892E[B80C] <1> mov word [reg_ebp], bp 1565 000007C9 5B <1> pop bx 1566 000007CA 07 <1> pop es 1567 000007CB 891E[A80C] <1> mov word [reg_ebx], bx 1568 000007CF 8C06[C80C] <1> mov word [reg_es], es 1569 <1> 1570 000007D3 26C747030001 <1> mov word [es:bx + 3], 100h ; no error, done 1571 000007D9 2683670E00 <1> and word [es:bx + 0Eh], 0 1572 000007DE 26894710 <1> mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 1573 <1> 1574 000007E2 8F06[E00C] <1> pop word [reg_efl] 1575 000007E6 8F06[C40C] <1> pop word [reg_ds] 1576 000007EA 8F06[A40C] <1> pop word [reg_eax] 1577 000007EE 8C16[CC0C] <1> mov word [reg_ss], ss 1578 000007F2 8926[B40C] <1> mov word [reg_esp], sp 1579 <1> 1580 000007F6 8C1E[D00C] <1> mov word [reg_cs], ds 1581 000007FA C706[DC0C][7C55] <1> mov word [reg_eip], entry_retf 1582 <1> 1583 <1> .cmdline: 1584 00000800 1E <1> push ds 1585 00000801 26C57712 <1> lds si, [es:bx + 12h] ; ds:si -> device command line 1586 00000805 07 <1> pop es 1587 <1> %if _CONFIG 1588 00000806 1E <1> push ds 1589 00000807 56 <1> push si 1590 <1> %endif 1591 00000808 BF8100 <1> mov di, 81h ; es:di -> PSP command line tail 1592 <1> 1593 <1> ; Writing MS-DOS Device Drivers, second edition, page 349 1594 <1> ; specifies the following as to the command line termination: 1595 <1> ; "Note that the DEVICE= command string is terminated by an 1596 <1> ; Ah when there are no arguments. When there are arguments, 1597 <1> ; the string is terminated with the following sequence: 1598 <1> ; 0h, Dh, Ah." 1599 <1> 1600 <1> ; First skip past name. 1601 <1> @@: 1602 0000080B AC <1> lodsb 1603 0000080C 3C20 <1> cmp al, 32 ; blank ? 1604 0000080E 7412 <1> je @F 1605 00000810 3C09 <1> cmp al, 9 1606 00000812 740E <1> je @F ; yes, got past executable filename --> 1607 00000814 3C00 <1> cmp al, 0 1608 00000816 7446 <1> je .cmdline_end 1609 00000818 3C0D <1> cmp al, 13 1610 0000081A 7442 <1> je .cmdline_end 1611 0000081C 3C0A <1> cmp al, 10 1612 0000081E 743E <1> je .cmdline_end ; if empty tail --> 1613 00000820 EBE9 <1> jmp @B 1614 <1> @@: 1615 00000822 81FFFF00 <1> cmp di, 0FFh ; can store and still have space for CR ? 1616 00000826 7430 <1> je .cmdline_end_truncate ; no --> 1617 00000828 AA <1> stosb ; store it 1618 00000829 3C00 <1> cmp al, 0 ; EOL ? 1619 0000082B 7431 <1> je .cmdline_end 1620 0000082D 3C0D <1> cmp al, 13 1621 0000082F 742D <1> je .cmdline_end 1622 00000831 3C0A <1> cmp al, 10 1623 00000833 7429 <1> je .cmdline_end ; yes --> 1624 00000835 AC <1> lodsb 1625 00000836 3C21 <1> cmp al, '!' ; escape for small letters ? 1626 00000838 75E8 <1> jne @B ; no --> 1627 0000083A AC <1> lodsb 1628 0000083B 3C00 <1> cmp al, 0 1629 0000083D 7414 <1> je .cmdline_end_escaped 1630 0000083F 3C0D <1> cmp al, 13 1631 00000841 7410 <1> je .cmdline_end_escaped 1632 00000843 3C0A <1> cmp al, 10 1633 00000845 740C <1> je .cmdline_end_escaped 1634 <1> ; cmp al, '!' ; (automatically supported) 1635 00000847 3C41 <1> cmp al, 'A' ; is it a capital letter ? 1636 00000849 72D7 <1> jb @B 1637 0000084B 3C5A <1> cmp al, 'Z' 1638 0000084D 77D3 <1> ja @B 1639 0000084F 3420 <1> xor al, 'a' ^ 'A' ; get the small letter 1640 00000851 EBCF <1> jmp @B 1641 <1> 1642 <1> .cmdline_end_escaped: 1643 00000853 BA[F80B] <1> mov dx, imsg.device_end_escaped 1644 00000856 EB03 <1> jmp @F 1645 <1> 1646 <1> .cmdline_end_truncate: 1647 00000858 BA[270C] <1> mov dx, imsg.device_end_truncate 1648 <1> @@: 1649 0000085B E83C0C <1> call init_putsz_cs 1650 <1> .cmdline_end: 1651 0000085E B00D <1> mov al, 13 1652 00000860 AA <1> stosb ; store CR 1653 00000861 97 <1> xchg ax, di 1654 00000862 8CC3 <1> mov bx, es 1655 00000864 8EDB <1> mov ds, bx 1656 00000866 2C82 <1> sub al, 82h ; if -> 82h (CR at 81h). get 0 1657 00000868 A28000 <1> mov byte [80h], al ; store length 1658 <1> 1659 <1> %if _CONFIG 1660 0000086B 5E <1> pop si 1661 0000086C 5A <1> pop dx 1662 <1> %endif 1663 <1> 1664 0000086D FA <1> cli 1665 0000086E 8ED3 <1> mov ss, bx 1666 00000870 BC[0010] <1> mov sp, stack_end ; device mode stack switch 1667 00000873 FB <1> sti 1668 <1> 1669 00000874 800E[D200]40 <1> setopt [internalflags], tsrmode 1670 00000879 8026[D200]7F <1> clropt [internalflags], attachedterm 1671 0000087E 800E[E600]40 <1> setopt [internalflags6], dif6_device_mode 1672 <1> 1673 <1> %if _CONFIG 1674 <1> find_config_device: 1675 00000883 E84200 <1> call init_device_get_environment 1676 <1> 1677 00000886 C606[0201]00 <1> mov byte [configpath], 0 1678 0000088B 50 <1> push ax 1679 0000088C 52 <1> push dx 1680 0000088D 56 <1> push si 1681 0000088E BF[C80A] <1> mov di, imsg.varconfig 1682 00000891 B90D00 <1> mov cx, imsg.varconfig.length 1683 00000894 BA[0201] <1> mov dx, configpath 1684 00000897 E86718 <1> call init_copyvar 1685 0000089A 5E <1> pop si 1686 0000089B 1F <1> pop ds ; -> command line 1687 0000089C 1E <1> push ds 1688 0000089D 56 <1> push si 1689 0000089E 7303 <1> jnc .done 1690 000008A0 E84A00 <1> call find_executable_device 1691 <1> .done: 1692 000008A3 5E <1> pop si 1693 000008A4 1F <1> pop ds ; -> command line 1694 000008A5 58 <1> pop ax 1695 <1> 1696 <1> find_scripts_device: 1697 000008A6 36C606[8402]00 <1> mov byte [ss:scriptspath], 0 1698 000008AC 1E <1> push ds 1699 000008AD 56 <1> push si 1700 000008AE BF[D50A] <1> mov di, imsg.varscripts 1701 000008B1 B90E00 <1> mov cx, imsg.varscripts.length 1702 000008B4 BA[8402] <1> mov dx, scriptspath 1703 000008B7 E84718 <1> call init_copyvar 1704 000008BA 5E <1> pop si 1705 000008BB 1F <1> pop ds ; -> command line 1706 000008BC 7303 <1> jnc .done 1707 000008BE E82C00 <1> call find_executable_device 1708 <1> .done: 1709 <1> 1710 000008C1 16 <1> push ss 1711 000008C2 1F <1> pop ds 1712 000008C3 16 <1> push ss 1713 000008C4 07 <1> pop es 1714 <1> %endif 1715 <1> 1716 000008C5 E94C0C <1> jmp old_initcode 1717 <1> 1718 <1> 1719 <1> init_device_get_environment: 1720 000008C8 B451 <1> mov ah, 51h 1721 000008CA CD21 <1> int 21h 1722 000008CC 8EDB <1> mov ds, bx 1723 000008CE A12C00 <1> mov ax, [2Ch] 1724 000008D1 85C0 <1> test ax, ax 1725 000008D3 7517 <1> jnz @F 1726 000008D5 A11600 <1> mov ax, [16h] 1727 000008D8 85C0 <1> test ax, ax 1728 000008DA 740E <1> jz .zero 1729 000008DC 83F8FF <1> cmp ax, -1 1730 000008DF 7409 <1> je .zero 1731 000008E1 39D8 <1> cmp ax, bx 1732 000008E3 8ED8 <1> mov ds, ax 1733 000008E5 A12C00 <1> mov ax, [2Ch] 1734 000008E8 7502 <1> jne @F 1735 <1> .zero: 1736 000008EA 31C0 <1> xor ax, ax 1737 <1> @@: 1738 000008EC C3 <1> retn 1739 <1> 1740 <1> 1741 <1> %if _CONFIG 1742 <1> ; INP: ss:dx -> buffer 1743 <1> ; ds:si -> device driver command line 1744 <1> find_executable_device: 1745 <1> @@: 1746 000008ED AC <1> lodsb 1747 000008EE 3C20 <1> cmp al, 32 1748 000008F0 74FB <1> je @B 1749 000008F2 3C09 <1> cmp al, 9 1750 000008F4 74F7 <1> je @B 1751 000008F6 4E <1> dec si 1752 000008F7 89F7 <1> mov di, si 1753 <1> @@: 1754 000008F9 AC <1> lodsb 1755 000008FA 3C09 <1> cmp al, 9 1756 000008FC 7410 <1> je @F 1757 000008FE 3C20 <1> cmp al, 32 1758 00000900 740C <1> je @F 1759 00000902 3C0D <1> cmp al, 13 1760 00000904 7408 <1> je @F 1761 00000906 3C0A <1> cmp al, 10 1762 00000908 7404 <1> je @F 1763 0000090A 84C0 <1> test al, al 1764 0000090C 75EB <1> jnz @B 1765 <1> @@: 1766 0000090E 4E <1> dec si 1767 0000090F 1E <1> push ds 1768 00000910 07 <1> pop es 1769 00000911 89F1 <1> mov cx, si 1770 00000913 29F9 <1> sub cx, di 1771 00000915 83F97F <1> cmp cx, 127 1772 00000918 7722 <1> ja .nodevice 1773 0000091A 87FE <1> xchg di, si 1774 <1> 1775 0000091C B90000 <1> mov cx, 0 1776 <1> @@: 1777 0000091F 39F7 <1> cmp di, si 1778 00000921 7610 <1> jbe @F 1779 00000923 4F <1> dec di 1780 00000924 803D2F <1> cmp byte [di], '/' 1781 00000927 7405 <1> je .slash 1782 00000929 803D5C <1> cmp byte [di], '\' 1783 0000092C 75F1 <1> jne @B 1784 <1> .slash: 1785 0000092E 89F9 <1> mov cx, di 1786 00000930 41 <1> inc cx 1787 00000931 29F1 <1> sub cx, si 1788 <1> @@: 1789 <1> 1790 00000933 16 <1> push ss 1791 00000934 07 <1> pop es 1792 00000935 89D7 <1> mov di, dx 1793 00000937 F3A4 <1> rep movsb 1794 00000939 B000 <1> mov al, 0 1795 0000093B AA <1> stosb 1796 <1> 1797 <1> .nodevice: 1798 <1> .done: 1799 0000093C C3 <1> retn 1800 <1> %endif 1801 <1> 1802 <1> 1803 <1> init_device_error_late: 1804 0000093D F606[D100]80 <1> testopt [internalflags], has386 1805 00000942 7431 <1> jz .16 1806 <1> 1807 <1> subcpu 386 1808 00000944 66A1[A40C] <1> mov eax, [reg_eax] 1809 00000948 668B1E[A80C] <1> mov ebx, [reg_ebx] 1810 0000094D 668B0E[AC0C] <1> mov ecx, [reg_ecx] 1811 00000952 668B16[B00C] <1> mov edx, [reg_edx] 1812 00000957 668B36[BC0C] <1> mov esi, [reg_esi] 1813 0000095C 668B3E[C00C] <1> mov edi, [reg_edi] 1814 00000961 668B2E[B80C] <1> mov ebp, [reg_ebp] 1815 00000966 66FF36[E00C] <1> push dword [reg_efl] 1816 0000096B 669D <1> popfd 1817 0000096D 8E26[D40C] <1> mov fs, [reg_fs] 1818 00000971 8E2E[D80C] <1> mov gs, [reg_gs] 1819 <1> subcpureset 1820 <1> 1821 <1> .16: 1822 <1> ; ax done last 1823 00000975 8B1E[A80C] <1> mov bx, [reg_ebx] 1824 00000979 8B0E[AC0C] <1> mov cx, [reg_ecx] 1825 0000097D 8B16[B00C] <1> mov dx, [reg_edx] 1826 00000981 8B36[BC0C] <1> mov si, [reg_esi] 1827 00000985 8B3E[C00C] <1> mov di, [reg_edi] 1828 00000989 8B2E[B80C] <1> mov bp, [reg_ebp] 1829 0000098D FF36[E00C] <1> push word [reg_efl] 1830 00000991 9D <1> popf 1831 00000992 8E06[C80C] <1> mov es, [reg_es] 1832 00000996 8E16[CC0C] <1> mov ss, [reg_ss] 1833 0000099A 8B26[B40C] <1> mov sp, [reg_esp] 1834 0000099E FF36[A40C] <1> push word [reg_eax] 1835 000009A2 8CD8 <1> mov ax, ds 1836 000009A4 8E1E[C40C] <1> mov ds, [reg_ds] 1837 <1> 1838 000009A8 83E804 <1> sub ax, paras(deviceshim_size + 10h) 1839 000009AB 26C747030381 <1> mov word [es:bx + 3], 8103h ; error, done, code: unknown command 1840 000009B1 2683670E00 <1> and word [es:bx + 0Eh], 0 1841 000009B6 26894710 <1> mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 1842 000009BA 58 <1> pop ax 1843 000009BB CB <1> retf 1844 <1> %endif 1845 <1> 1846 <1> 1847 <1> %if _DEBUG4 || _DEBUG5 1848 <1> %define _DEB_ASM_PREFIX init_ 1849 <1> %include "deb.asm" 1850 <1> %endif 1851 <1> 1852 <1> 1853 <1> %macro __writepatchtable2 0-*.nolist 1854 <1> %if %0 & 1 1855 <1> %fatal Expected even number of arguments 1856 <1> %endif 1857 <1> %rep %0 >> 1 1858 <1> %1 %2 1859 <1> %rotate 2 1860 <1> %endrep 1861 <1> %endmacro 1862 <1> 1863 <1> %macro __patchtable2_entry 0.nolist 1864 <1> ; only if this isn't the first (pseudo-)entry 1865 <1> %if %$lastcount != 0 1866 <1> %assign %$runscount %[%$runscount]+1 1867 <1> ; if the offset from %$previous is less than 255 1868 <1> %if (%$last-%$previous) < 255 1869 <1> %assign %$$method2tablesize %$$method2tablesize+1 1870 <1> ; then write a single byte (number of bytes not to patch between) 1871 <1> %xdefine %$$method2list %$$method2list,db,%$last-%$previous 1872 <1> %else 1873 <1> ; otherwise write a 255 ("reposition") and write the 16-bit address afterwards 1874 <1> %assign %$$method2tablesize %$$method2tablesize+3 1875 <1> %xdefine %$$method2list %$$method2list,db,255,dw,%$last 1876 <1> %assign %$reposcount %[%$reposcount]+1 1877 <1> %endif 1878 <1> %if %$lastcount == 1 1879 <1> %assign %$onecount %[%$onecount]+1 1880 <1> %endif 1881 <1> %assign %$$method2tablesize %$$method2tablesize+1 1882 <1> ; and write the number of bytes to be patched 1883 <1> %xdefine %$$method2list %$$method2list,db,%$lastcount 1884 <1> ; define %$previous for the next entry: it points to the next non-patched byte 1885 <1> %define %$previous (%[%$last]+%[%$lastcount]) 1886 <1> %endif 1887 <1> %endmacro 1888 <1> 1889 <1> %macro writepatchtable 2-*.nolist 1890 <1> 1891 <1> numdef %{1}_FORCE_METHOD, 0 1892 <1> %push 1893 <1> ; Determine length of simple table: 1894 <1> %assign %$method1tablesize (%0 - 2)*2 1895 <1> 1896 <1> %if !_%{1}_FORCE_METHOD || _%{1}_FORCE_METHOD == 2 1897 <1> ; Determine length of complicated table: 1898 <1> %assign %$method2tablesize 0 1899 <1> %define %$method2list db,"" 1900 <1> %push 1901 <1> %if _WPT_LABELS 1902 <1> %define %$previous code_start ; if list contains labels 1903 <1> %else 1904 <1> %define %$previous 0 1905 <1> %endif 1906 <1> %define %$last %[%$previous] 1907 <1> %assign %$lastcount 0 1908 <1> %assign %$onecount 0 1909 <1> %assign %$reposcount 0 1910 <1> %assign %$bytescount %0 - 2 1911 <1> %assign %$runscount 0 1912 <1> %rotate 1 1913 <1> %rep %0 - 2 1914 <1> %rotate 1 1915 <1> ;if it continues the previous patch and not too long and this isn't the first 1916 <1> %if ((%$last+%$lastcount) == %1) && (%$lastcount < 255) && (%$lastcount != 0) 1917 <1> ; then do not write an entry, just increase the patch's size 1918 <1> %assign %$lastcount %[%$lastcount]+1 1919 <1> %else 1920 <1> ; otherwise write the last entry 1921 <1> __patchtable2_entry 1922 <1> ; define new %$last to this parameter, %$lastcount to one 1923 <1> %define %$last %1 1924 <1> %assign %$lastcount 1 1925 <1> %endif 1926 <1> %endrep 1927 <1> __patchtable2_entry 1928 <1> 1929 <1> ; at the end, there's a patch with offset 0, size 0 1930 <1> %assign %$$method2tablesize %$$method2tablesize+2 1931 <1> %xdefine %$$method2list %$$method2list,db,0,db,0 1932 <1> 1933 <1> %assign %$$onecount %$onecount 1934 <1> %assign %$$reposcount %$reposcount 1935 <1> %assign %$$bytescount %$bytescount 1936 <1> %assign %$$runscount %$runscount 1937 <1> %pop 1938 <1> %rotate 1 1939 <1> %endif 1940 <1> 1941 <1> %if _%{1}_FORCE_METHOD == 2 1942 <1> %define __%{1}_method 2 1943 <1> %elif _%{1}_FORCE_METHOD == 1 1944 <1> %define __%{1}_method 1 1945 <1> %else 1946 <1> %if _%{1}_FORCE_METHOD 1947 <1> %fatal Invalid forced method selected: _%{1}_FORCE_METHOD 1948 <1> %endif 1949 <1> %if %$method1tablesize > (%$method2tablesize+20) 1950 <1> %define __%{1}_method 2 1951 <1> %else 1952 <1> %define __%{1}_method 1 1953 <1> %endif 1954 <1> %endif 1955 <1> 1956 <1> 1957 <1> %1: 1958 <1> %if __%{1}_method == 2 1959 <1> __writepatchtable2 %$method2list 1960 <1> endarea %1 1961 <1> %assign %$size %1_size 1962 <1> %warning %1: %$size bytes (Method 2) 1963 <1> %warning 1B=%$onecount repo=%$reposcount run=%$runscount byte=%$bytescount 1964 <1> %else 1965 <1> %rotate 1 1966 <1> %rep %0 - 2 1967 <1> %rotate 1 1968 <1> dw %1 1969 <1> %endrep 1970 <1> %rotate 1 1971 <1> endarea %1 1972 <1> %assign %$size %1_size 1973 <1> %warning %1: %$size bytes (Method 1) 1974 <1> %endif 1975 <1> %pop 1976 <1> %endmacro 1977 <1> 1978 <1> align 2, db 0 ; align on word boundary 1979 <1> ; Table of patches that are to be set NOP if not running on a 386. 1980 000009BC 050104040201010101- <1> writepatchtable patch_no386_table, PATCH_NO386_TABLE 1980 000009C5 04FF7A040104040201- <1> 1980 000009CE 01010104FF352204FF- <1> 1980 000009D7 992610FFA52C011201- <1> 1980 000009E0 17011D010101020107- <1> 1980 000009E9 010205BC01FFF02E0A- <1> 1980 000009F2 FFE54F01FF85510104- <1> 1980 000009FB 0104011A01140BDC02- <1> 1980 00000A04 030103010302030103- <1> 1980 00000A0D 010302030103010302- <1> 1980 00000A16 03010301FF976D04FF- <1> 1980 00000A1F DA8501FFB58B02FF0D- <1> 1980 00000A28 8F02CC01051EFF1EB7- <1> 1980 00000A31 010000 <1> 1980 ****************** <1> warning: patch_no386_table: 120 (Method 2) [-w+user] 1980 ****************** <1> warning: 1B=30 repo=12 run=47 byte=138 [-w+user] 1981 <1> %undef PATCH_NO386_TABLE 1982 <1> 1983 <1> align 2, db 0 1984 <1> ; Table of patches that are to be set NOP if running on a 386. 1985 00000A34 FF4A4102FF924E0E4D- <1> writepatchtable patch_386_table, PATCH_386_TABLE 1985 00000A3D 0EFFD95107FFDC8F04- <1> 1985 00000A46 FF1DB7010000 <1> 1985 ****************** <1> warning: patch_386_table: 24 (Method 2) [-w+user] 1985 ****************** <1> warning: 1B=1 repo=5 run=6 byte=42 [-w+user] 1986 <1> %undef PATCH_386_TABLE 1987 <1> 1988 <1> %if _DUALCODE 1989 <1> align 2, db 0 ; align on word boundary 1990 <1> ; Table of patches that are to be set NOP if not running on a 386. 1991 <1> writepatchtable patch_no386_table2, PATCH_NO386_TABLE2 1992 <1> %undef PATCH_NO386_TABLE2 1993 <1> 1994 <1> align 2, db 0 1995 <1> ; Table of patches that are to be set NOP if running on a 386. 1996 <1> writepatchtable patch_386_table2, PATCH_386_TABLE2 1997 <1> %undef PATCH_386_TABLE2 1998 <1> %else 1999 <1> %assign __patch_no386_table2_method 0 2000 <1> %assign __patch_386_table2_method 0 2001 <1> %endif 2002 <1> 2003 <1> align 2, db 0 ; align on word boundary 2004 <1> ; Table of patches that are to be set NOP if not running on a 386. 2005 00000A4C F046F1462C47314736- <1> writepatchtable patch_no386_tableentry, PATCH_NO386_TABLEENTRY 2005 00000A55 476449654966496749- <1> 2005 00000A5E 6849694973497449C3- <1> 2005 00000A67 49 <1> 2005 ****************** <1> warning: patch_no386_tableentry: 28 (Method 1) [-w+user] 2006 <1> %undef PATCH_NO386_TABLEENTRY 2007 <1> 2008 <1> align 2, db 0 2009 <1> ; Table of patches that are to be set NOP if running on a 386. 2010 <1> writepatchtable patch_386_tableentry, PATCH_386_TABLEENTRY 2010 ****************** <1> warning: patch_386_tableentry: 0 (Method 1) [-w+user] 2011 <1> %undef PATCH_386_TABLEENTRY 2012 <1> 2013 <1> %unmacro __writepatchtable2 0-*.nolist 2014 <1> %unmacro __patchtable2_entry 0.nolist 2015 <1> %unmacro writepatchtable 2-*.nolist 2016 <1> 2017 <1> 2018 <1> %if _DUALCODE && ! _PM 2019 <1> align 2, db 0 2020 <1> relocate_from_code: 2021 <1> dw PATCH_RELOCATE_FROM_lDEBUG_CODE 2022 <1> .end: 2023 <1> align 2, db 0 2024 <1> relocate_from_code2: 2025 <1> dw PATCH_RELOCATE_FROM_lDEBUG_CODE2 2026 <1> .end: 2027 <1> 2028 <1> %unimacro dualcall 1.nolist 2029 <1> ; make sure we do not allow later uses 2030 <1> %endif 2031 <1> 2032 <1> 2033 <1> %if _BOOTLDR 2034 00000A68 00 <1> align 16, db 0 2035 <1> ; Image identification 2036 <1> ; First dword: signature 2037 <1> ; Next word: version, two ASCII digits 2038 <1> ; Next word: checksum. adding up all words of the paragraph gives zero 2039 <1> ; Next word: size of image (including this paragraph) 2040 <1> ; Three words reserved, zero. 2041 <1> imageident: 2042 00000A70 4E4445423030 <1> db "NDEB00" 2043 00000A76 0000 <1> .check: dw 0 2044 00000A78 0000 <1> .size: dw 0 2045 00000A7A 0000 <1> times 3 dw 0 2046 <1> %endif 2047 <1> %if _DEVICE 2048 <1> align 16, db 0 2049 <1> init_container_signature: 2050 00000A80 464F525F53445F434F- <1> fill 16, 0, db "FOR_SD_CONTAINER" 2050 00000A89 4E5441494E4552 <1> 2051 <1> %endif 2052 <1> align 2, db 0 2053 00000A90 D71C <1> memsize: dw paras(CODETARGET2 + ldebug_code_bootldr_truncated_size + ldebug_code2_size + historysegment_size) 2057 <1> ; same as paras(AUXTARGET1 + auxbuff_size + historysegment_size) 2058 <1> cmdline_buffer_start: 2059 00000A92 [3001] <1> dw cmdline_buffer 2060 <1> init_layout: 2061 00000A94 [0222] <1> dw init_layout_none 2062 <1> init_auxbuff_want: 2063 00000A96 1020 <1> dw _AUXBUFFSIZE 2064 <1> 2065 <1> init_switch_p_low_pathsearch_high_guessextension: 2066 00000A98 00 <1> init_switch_p_pathsearch: db 0 2067 00000A99 00 <1> init_switch_p_guessextension: db 0 2068 <1> %if _BOOTLDR 2069 00000A9A 0000 <1> init_boot_new_memsizekib: dw 0 2070 00000A9C 0000 <1> init_boot_old_memsizekib: dw 0 2071 <1> 2072 00000A9E 0000 <1> init_boot_ebdasize: dw 0 2073 00000AA0 0000 <1> init_boot_ebdasource: dw 0 2074 00000AA2 0000 <1> init_boot_ebdadest: dw 0 2075 00000AA4 00 <1> init_boot_ebdaflag: db 0 2076 <1> %endif 2077 00000AA5 FF <1> init_switch_pw: db 0FFh 2078 <1> 2079 <1> 2080 <1> imsg: 2081 <1> align 2, db 0 2082 <1> .no_warn_extensions: 2083 00000AA6 2E4845582E524F4D <1> db ".HEX",".ROM" 2084 <1> %if (($ - .no_warn_extensions) % 4) != 0 2085 <1> %error Wrong extensions length 2086 <1> %endif 2087 00000AAE 2E434F4D2E4558452E- <1> .p_extensions: asciz ".COM",".EXE",".BIN" 2087 00000AB7 42494E00 <1> 2088 <1> %if (($ - 1 - .p_extensions) % 4) != 0 2089 <1> %error Wrong extensions length 2090 <1> %endif 2091 00000ABB 4D415800 <1> .max: asciz "MAX" 2092 00000ABF 4D494E00 <1> .min: asciz "MIN" 2093 00000AC3 504154483D <1> .varpath: db "PATH=" 2094 <1> .varpath.length equ $ - .varpath 2095 <1> %if _CONFIG 2096 00000AC8 4C4445425547434F4E- <1> .varconfig: db "LDEBUGCONFIG=" 2096 00000AD1 4649473D <1> 2097 <1> .varconfig.length equ $ - .varconfig 2098 00000AD5 4C4445425547534352- <1> .varscripts: db "LDEBUGSCRIPTS=" 2098 00000ADE 495054533D <1> 2099 <1> .varscripts.length equ $ - .varscripts 2100 <1> %endif 2101 <1> %if _APPLICATION || _DEVICE 2102 <1> .extension_warning: 2103 00000AE3 6C44656275673A2057- <1> asciz _PROGNAME,": Warning, unknown filename extension specified!",13,10 2103 00000AEC 61726E696E672C2075- <1> 2103 00000AF5 6E6B6E6F776E206669- <1> 2103 00000AFE 6C656E616D65206578- <1> 2103 00000B07 74656E73696F6E2073- <1> 2103 00000B10 706563696669656421- <1> 2103 00000B19 0D0A00 <1> 2104 <1> .kktoolong: 2105 00000B1C 6C44656275673A2045- <1> asciz _PROGNAME,": Error, too long command line tail!",13,10 2105 00000B25 72726F722C20746F6F- <1> 2105 00000B2E 206C6F6E6720636F6D- <1> 2105 00000B37 6D616E64206C696E65- <1> 2105 00000B40 207461696C210D0A00 <1> 2106 <1> .pathtoolong: 2107 00000B49 6C44656275673A2045- <1> asciz _PROGNAME,": Error, too long %PATH% variable element!",13,10 2107 00000B52 72726F722C20746F6F- <1> 2107 00000B5B 206C6F6E6720255041- <1> 2107 00000B64 544825207661726961- <1> 2107 00000B6D 626C6520656C656D65- <1> 2107 00000B76 6E74210D0A00 <1> 2108 <1> .early_mem_fail: 2109 00000B7C 6C44656275673A2046- <1> db _PROGNAME,": Failed to allocate memory!" 2109 00000B85 61696C656420746F20- <1> 2109 00000B8E 616C6C6F6361746520- <1> 2109 00000B97 6D656D6F727921 <1> 2110 <1> %endif 2111 <1> .crlf: 2112 00000B9E 0D0A00 <1> asciz 13,10 2113 <1> .early_reloc_fail: 2114 00000BA1 6C44656275673A2046- <1> asciz _PROGNAME,": Failed to relocate, internal error!",13,10 2114 00000BAA 61696C656420746F20- <1> 2114 00000BB3 72656C6F636174652C- <1> 2114 00000BBC 20696E7465726E616C- <1> 2114 00000BC5 206572726F72210D0A- <1> 2114 00000BCE 00 <1> 2115 <1> %if _DEVICE 2116 <1> .dos_below_5: 2117 00000BCF 204E6F74653A20444F- <1> asciz " Note: DOS must be at least version 5.",13,10 2117 00000BD8 53206D757374206265- <1> 2117 00000BE1 206174206C65617374- <1> 2117 00000BEA 2076657273696F6E20- <1> 2117 00000BF3 352E0D0A00 <1> 2118 <1> .device_end_escaped: 2119 00000BF8 6C44656275673A2045- <1> asciz _PROGNAME,": Error, got escaped command line end!",13,10 2119 00000C01 72726F722C20676F74- <1> 2119 00000C0A 206573636170656420- <1> 2119 00000C13 636F6D6D616E64206C- <1> 2119 00000C1C 696E6520656E64210D- <1> 2119 00000C25 0A00 <1> 2120 <1> .device_end_truncate: 2121 00000C27 6C44656275673A2045- <1> asciz _PROGNAME,": Error, truncating too long command line!",13,10 2121 00000C30 72726F722C20747275- <1> 2121 00000C39 6E636174696E672074- <1> 2121 00000C42 6F6F206C6F6E672063- <1> 2121 00000C4B 6F6D6D616E64206C69- <1> 2121 00000C54 6E65210D0A00 <1> 2122 <1> %endif 2123 <1> %ifn _APPLICATION 2124 <1> .not_an_application: 2125 <1> ascic _PROGNAME,": Error, no application mode included!",13,10 2126 <1> %endif 2127 <1> %if _APPLICATION || _DEVICE 2128 <1> %if _ALTVID 2129 <1> .noaltvid: 2130 00000C5A 6C44656275673A2045- <1> asciz _PROGNAME,": Error, no alternative video adapter detected!",13,10 2130 00000C63 72726F722C206E6F20- <1> 2130 00000C6C 616C7465726E617469- <1> 2130 00000C75 766520766964656F20- <1> 2130 00000C7E 616461707465722064- <1> 2130 00000C87 65746563746564210D- <1> 2130 00000C90 0A00 <1> 2131 <1> %endif 2132 <1> align 2, db 0 2133 <1> .help.defaultfilename: 2134 00000C92 4445425547 <1> db _FILENAME 2135 <1> .help.defaultfilename.length equ $ - .help.defaultfilename 2136 <1> 2137 00000C97 00 <1> align 2, db 0 2138 <1> .help.1: 2139 00000C98 6C4465627567207265- <1> fill 80, 0, asciz _PROGNAME,_VERSION,", debugger.",13,10 2139 00000CA1 6C6561736520362028- <1> 2139 00000CAA 323032332D30382D32- <1> 2139 00000CB3 36292C206465627567- <1> 2139 00000CBC 6765722E0D0A0000- <1> 2139 00000CBC <1> 2140 <1> 2141 <1> .help.1a: 2142 00000CE8 0D0A <1> db 13,10 2143 00000CEA 55736167653A20 <1> db "Usage: " 2144 00000CF1 00 <1> asciz 2145 <1> .help.2: 2146 00000CF2 5B2E434F4D5D205B2F- <1> db "[.COM] [/C=commands] [[drive:][path]progname.ext [parameters]]",13,10 2146 00000CFB 433D636F6D6D616E64- <1> 2146 00000D04 735D205B5B64726976- <1> 2146 00000D0D 653A5D5B706174685D- <1> 2146 00000D16 70726F676E616D652E- <1> 2146 00000D1F 657874205B70617261- <1> 2146 00000D28 6D65746572735D5D0D- <1> 2146 00000D31 0A <1> 2147 00000D32 0D0A <1> db 13,10 2148 00000D34 20202F433D636F6D6D- <1> db " /C=commands",9,9, "semicolon-separated list of commands (quote spaces)",13,10 2148 00000D3D 616E6473090973656D- <1> 2148 00000D46 69636F6C6F6E2D7365- <1> 2148 00000D4F 70617261746564206C- <1> 2148 00000D58 697374206F6620636F- <1> 2148 00000D61 6D6D616E6473202871- <1> 2148 00000D6A 756F74652073706163- <1> 2148 00000D73 6573290D0A <1> 2149 <1> %if _CONFIG 2150 00000D78 20202F494E09090964- <1> db " /IN",9,9,9, "discard command line buffer, do not run config",13,10 2150 00000D81 69736361726420636F- <1> 2150 00000D8A 6D6D616E64206C696E- <1> 2150 00000D93 65206275666665722C- <1> 2150 00000D9C 20646F206E6F742072- <1> 2150 00000DA5 756E20636F6E666967- <1> 2150 00000DAE 0D0A <1> 2151 <1> %endif 2152 <1> %if _AUXBUFFSIZE != _AUXBUFFMAXSIZE 2153 00000DB0 20202F413D4D415809- <1> db " /A=MAX",9,9, "expand auxiliary buffer to maximum, " 2153 00000DB9 09657870616E642061- <1> 2153 00000DC2 7578696C6961727920- <1> 2153 00000DCB 62756666657220746F- <1> 2153 00000DD4 206D6178696D756D2C- <1> 2153 00000DDD 20 <1> 2154 00000DDE 3234353736 <1> _autodigits _AUXBUFFMAXSIZE 2155 00000DE3 2042797465730D0A <1> db " Bytes",13,10 2156 00000DEB 20202F413D4D494E09- <1> db " /A=MIN",9,9, "restrict auxiliary buffer to minimum, " 2156 00000DF4 097265737472696374- <1> 2156 00000DFD 20617578696C696172- <1> 2156 00000E06 792062756666657220- <1> 2156 00000E0F 746F206D696E696D75- <1> 2156 00000E18 6D2C20 <1> 2157 00000E1B 38323038 <1> _autodigits _AUXBUFFSIZE 2158 00000E1F 2042797465730D0A <1> db " Bytes",13,10 2159 00000E27 20202F413D6E756D62- <1> db " /A=number",9,9, "set auxiliary buffer size to number of bytes",13,10 2159 00000E30 657209097365742061- <1> 2159 00000E39 7578696C6961727920- <1> 2159 00000E42 627566666572207369- <1> 2159 00000E4B 7A6520746F206E756D- <1> 2159 00000E54 626572206F66206279- <1> 2159 00000E5D 7465730D0A <1> 2160 00000E62 20202F41090909616C- <1> db " /A",9,9,9, "alias for /A=MAX",13,10 2160 00000E6B 69617320666F72202F- <1> 2160 00000E74 413D4D41580D0A <1> 2161 <1> %endif 2162 00000E7B 20202F420909097275- <1> db " /B",9,9,9, "run a breakpoint within initialisation",13,10 2162 00000E84 6E206120627265616B- <1> 2162 00000E8D 706F696E7420776974- <1> 2162 00000E96 68696E20696E697469- <1> 2162 00000E9F 616C69736174696F6E- <1> 2162 00000EA8 0D0A <1> 2163 00000EAA 20202F505B2B7C2D5D- <1> db " /P[+|-]",9,9, "append ext to initial filename and search path",13,10 2163 00000EB3 0909617070656E6420- <1> 2163 00000EBC 65787420746F20696E- <1> 2163 00000EC5 697469616C2066696C- <1> 2163 00000ECE 656E616D6520616E64- <1> 2163 00000ED7 207365617263682070- <1> 2163 00000EE0 6174680D0A <1> 2164 00000EE5 20202F465B2B7C2D5D- <1> db " /F[+|-]",9,9, "always treat executable file as a flat binary",13,10 2164 00000EEE 0909616C7761797320- <1> 2164 00000EF7 747265617420657865- <1> 2164 00000F00 63757461626C652066- <1> 2164 00000F09 696C65206173206120- <1> 2164 00000F12 666C61742062696E61- <1> 2164 00000F1B 72790D0A <1> 2165 00000F1F 20202F455B2B7C2D5D- <1> db " /E[+|-]",9,9, "for flat binaries set up Stack Segment != PSP",13,10 2165 00000F28 0909666F7220666C61- <1> 2165 00000F31 742062696E61726965- <1> 2165 00000F3A 732073657420757020- <1> 2165 00000F43 537461636B20536567- <1> 2165 00000F4C 6D656E7420213D2050- <1> 2165 00000F55 53500D0A <1> 2166 <1> %if _VXCHG 2167 00000F59 20202F565B2B7C2D5D- <1> db " /V[+|-]",9,9, "enable/disable video screen swapping",13,10 2167 00000F62 0909656E61626C652F- <1> 2167 00000F6B 64697361626C652076- <1> 2167 00000F74 6964656F2073637265- <1> 2167 00000F7D 656E20737761707069- <1> 2167 00000F86 6E670D0A <1> 2168 <1> %endif 2169 <1> %if _DEBUG && _DEBUG_COND 2170 <1> db " /D[+|-]",9,9, "enable/disable debuggable mode",13,10 2171 <1> %endif 2172 <1> %if _ALTVID 2173 00000F8A 20202F325B2B7C2D5D- <1> db " /2[+|-]",9,9, "enable/disable use alternate video adapter for output",13,10 2173 00000F93 0909656E61626C652F- <1> 2173 00000F9C 64697361626C652075- <1> 2173 00000FA5 736520616C7465726E- <1> 2173 00000FAE 61746520766964656F- <1> 2173 00000FB7 206164617074657220- <1> 2173 00000FC0 666F72206F75747075- <1> 2173 00000FC9 740D0A <1> 2174 <1> %endif 2175 00000FCC 202070726F676E616D- <1> db " progname.ext",9,9,"(executable) file to debug or examine",13,10 2175 00000FD5 652E65787409092865- <1> 2175 00000FDE 786563757461626C65- <1> 2175 00000FE7 292066696C6520746F- <1> 2175 00000FF0 206465627567206F72- <1> 2175 00000FF9 206578616D696E650D- <1> 2175 00001002 0A <1> 2176 00001003 2020706172616D6574- <1> db " parameters",9,9, "parameters given to program",13,10 2176 0000100C 657273090970617261- <1> 2176 00001015 6D6574657273206769- <1> 2176 0000101E 76656E20746F207072- <1> 2176 00001027 6F6772616D0D0A <1> 2177 0000102E 0D0A <1> db 13,10 2178 00001030 466F722061206C6973- <1> db "For a list of debugging commands, run " 2178 00001039 74206F662064656275- <1> 2178 00001042 6767696E6720636F6D- <1> 2178 0000104B 6D616E64732C207275- <1> 2178 00001054 6E20 <1> 2179 00001056 00 <1> asciz 2180 <1> .help.3: 2181 00001057 20616E642074797065- <1> db " and type ? at the prompt.",13,10 2181 00001060 203F20617420746865- <1> 2181 00001069 2070726F6D70742E0D- <1> 2181 00001072 0A <1> 2182 00001073 00 <1> asciz 2183 <1> %endif 2184 <1> %if _ONLY386 2185 <1> .no386: ascizline "Error: This ",_PROGNAME," build requires a 386 CPU or higher." 2186 <1> %elif _ONLYNON386 2187 <1> .386: asciiline "Warning: This ",_PROGNAME," build is ignorant of 386 CPU specifics." 2188 <1> ascizline 9," It does not allow access to the available 386-specific registers!" 2189 <1> %endif 2190 <1> 2191 <1> %if _BOOTLDR_DISCARD_HELP 2192 <1> align 2, db 0 2193 <1> .boothelp_replacement: helppage bootdisc 53 <2> %defstr %%basename %1 54 <2> %strcat %%includename "help/", %%basename, ".asm" 55 <2> %00: 56 <2> %include %%includename 1 <3> %if 0 2 <3> 3 <3> lDebug help message pages 4 <3> 5 <3> Copyright (C) 1995-2003 Paul Vojta 6 <3> Copyright (C) 2008-2023 C. Masloch 7 <3> 8 <3> Usage of the works is permitted provided that this 9 <3> instrument is retained with the works, so that any entity 10 <3> that uses the works is notified of this instrument. 11 <3> 12 <3> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13 <3> 14 <3> %endif 15 <3> 16 <3> %ifndef MESSAGE_INLINE 17 <3> %include "debug.mac" 18 <3> %endif 19 <3> 20 00001074 546869732068656C70- <3> asciz "This help page is only available in boot loaded mode.",13,10 20 0000107D 207061676520697320- <3> 20 00001086 6F6E6C792061766169- <3> 20 0000108F 6C61626C6520696E20- <3> 20 00001098 626F6F74206C6F6164- <3> 20 000010A1 6564206D6F64652E0D- <3> 20 000010AA 0A00 <3> 57 <2> %ifn %2 58 000010AC 00 <2> asciz 59 <2> %endif 2194 <1> endarea .boothelp_replacement 2195 <1> %endif 2196 <1> 2197 <1> %if _APPLICATION || _DEVICE 2198 <1> %if _SYMBOLIC 2199 <1> .switch_s_garbage: 2200 <1> asciz "Ignoring garbage at end of /S switch!",13,10 2201 <1> .switch_s_error: 2202 <1> asciz "Switch /S invalid content",13,10 2203 <1> %endif 2204 <1> .invalidswitch: 2205 000010AD 496E76616C69642073- <1> db "Invalid switch - " 2205 000010B6 7769746368202D20 <1> 2206 <1> .invalidswitch_a: 2207 000010BE 780D0A00 <1> asciz "x",13,10 2208 <1> .switch_x_error: 2209 000010C2 537769746368202F <1> db "Switch /" 2210 <1> .switch_x_error_a: 2211 000010CA 7820696E76616C6964- <1> asciz "x invalid content",13,10 2211 000010D3 20636F6E74656E740D- <1> 2211 000010DC 0A00 <1> 2212 <1> %endif 2213 <1> %if _CONFIG 2214 <1> %if _APPLICATION 2215 <1> align 2, db 0 2216 <1> .default_cmdline.app: 2217 <1> db _APPSCRIPTPREFIX 2218 000010DE 406966206578697374- <1> db "@if exists y ::CONFIG::",_APPSCRIPTNAME," :",_APPSCRIPTLABEL 2218 000010E7 732079203A3A434F4E- <1> 2218 000010F0 4649473A3A4C444542- <1> 2218 000010F9 55472E534C44203A61- <1> 2218 00001102 70706C69636174696F- <1> 2218 0000110B 6E73746172747570 <1> 2219 00001113 207468656E2079203A- <1> db " then y ::CONFIG::",_APPSCRIPTNAME," :",_APPSCRIPTLABEL 2219 0000111C 3A434F4E4649473A3A- <1> 2219 00001125 4C44454255472E534C- <1> 2219 0000112E 44203A6170706C6963- <1> 2219 00001137 6174696F6E73746172- <1> 2219 00001140 747570 <1> 2220 00001143 0D <1> db 13 2221 <1> .default_cmdline.app.length equ $ - .default_cmdline.app 2222 00001144 00 <1> db 0 2223 <1> %if .default_cmdline.app.length + 128 + 8 > _RC_BUFFER_SIZE 2224 <1> %error Too large default app cmdline 2225 <1> %endif 2226 <1> %endif 2227 <1> %if _DEVICE 2228 00001145 00 <1> align 2, db 0 2229 <1> .default_cmdline.dev: 2230 <1> db _DEVSCRIPTPREFIX 2231 00001146 406966206578697374- <1> db "@if exists y ::CONFIG::",_DEVSCRIPTNAME," :",_DEVSCRIPTLABEL 2231 0000114F 732079203A3A434F4E- <1> 2231 00001158 4649473A3A4C444542- <1> 2231 00001161 55472E534C44203A64- <1> 2231 0000116A 657669636573746172- <1> 2231 00001173 747570 <1> 2232 00001176 207468656E2079203A- <1> db " then y ::CONFIG::",_DEVSCRIPTNAME," :",_DEVSCRIPTLABEL 2232 0000117F 3A434F4E4649473A3A- <1> 2232 00001188 4C44454255472E534C- <1> 2232 00001191 44203A646576696365- <1> 2232 0000119A 73746172747570 <1> 2233 000011A1 0D <1> db 13 2234 <1> .default_cmdline.dev.length equ $ - .default_cmdline.dev 2235 000011A2 00 <1> db 0 2236 <1> %if .default_cmdline.dev.length + 128 + 8 > _RC_BUFFER_SIZE 2237 <1> %error Too large default dev cmdline 2238 <1> %endif 2239 <1> %endif 2240 <1> %endif 2241 <1> %if _BOOTLDR 2242 000011A3 00 <1> align 2, db 0 2243 <1> .default_cmdline.boot: 2244 <1> db _BOOTSCRIPTPREFIX 2245 000011A4 406966206578697374- <1> db "@if exists y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 2245 000011AD 732079206C64702F4C- <1> 2245 000011B6 44454255472E534C44- <1> 2245 000011BF 203A626F6F74737461- <1> 2245 000011C8 72747570 <1> 2246 000011CC 207468656E2079206C- <1> db " then y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 2246 000011D5 64702F4C4445425547- <1> 2246 000011DE 2E534C44203A626F6F- <1> 2246 000011E7 7473746172747570 <1> 2247 000011EF 00 <1> asciz 2248 <1> .default_cmdline.boot.length equ $ - .default_cmdline.boot 2249 <1> %if .default_cmdline.boot.length + 8 > _RC_BUFFER_SIZE 2250 <1> %error Too large default boot cmdline 2251 <1> %endif 2252 <1> 2253 <1> .rpl_detected: 2254 000011F0 52504C206465746563- <1> asciz "RPL detected! Currently unsupported.",13,10 2254 000011F9 746564212043757272- <1> 2254 00001202 656E746C7920756E73- <1> 2254 0000120B 7570706F727465642E- <1> 2254 00001214 0D0A00 <1> 2255 <1> .mismatch_detected: 2256 00001217 4D69736D6174636820- <1> asciz "Mismatch in memory size detected! Internal error!",13,10 2256 00001220 696E206D656D6F7279- <1> 2256 00001229 2073697A6520646574- <1> 2256 00001232 65637465642120496E- <1> 2256 0000123B 7465726E616C206572- <1> 2256 00001244 726F72210D0A00 <1> 2257 <1> .boot_ebda_unexpected: 2258 0000124B 454244412061742075- <1> asciz "EBDA at unexpected position.",13,10 2258 00001254 6E6578706563746564- <1> 2258 0000125D 20706F736974696F6E- <1> 2258 00001266 2E0D0A00 <1> 2259 <1> .boot_error_out_of_memory: 2260 0000126A 4F7574206F66206D65- <1> asciz "Out of memory!",13,10 2260 00001273 6D6F7279210D0A00 <1> 2261 <1> .boot_error_internal: 2262 0000127B 496E7465726E616C20- <1> asciz "Internal error while relocating load image!",13,10 2262 00001284 6572726F7220776869- <1> 2262 0000128D 6C652072656C6F6361- <1> 2262 00001296 74696E67206C6F6164- <1> 2262 0000129F 20696D616765210D0A- <1> 2262 000012A8 00 <1> 2263 <1> .booterror: 2264 000012A9 0D0A6C446562756720- <1> asciz 13,10,_PROGNAME," boot error. Press any key to reboot.",13,10 2264 000012B2 626F6F74206572726F- <1> 2264 000012BB 722E20507265737320- <1> 2264 000012C4 616E79206B65792074- <1> 2264 000012CD 6F207265626F6F742E- <1> 2264 000012D6 0D0A00 <1> 2265 <1> %endif 2266 <1> %if _DOSEMU 2267 000012D9 30322F32352F3933 <1> .dosemudate: db "02/25/93" 2268 <1> %endif 2269 <1> %if _VDD && (_APPLICATION || _DEVICE) 2270 000012E1 44454258585644442E- <1> .vdd: asciz "DEBXXVDD.DLL" 2270 000012EA 444C4C00 <1> 2271 000012EE 446973706174636800 <1> .dispatch: asciz "Dispatch" 2272 000012F7 496E697400 <1> .init: asciz "Init" 2273 000012FC 4D4F555345202020 <1> .mouse: db "MOUSE",32,32,32 ; Looks like a device name 2274 00001304 416E64792057617473- <1> .andy: db "Andy Watson" ; I don't know him and why he's inside the NTVDM mouse driver 2274 0000130D 6F6E <1> 2275 <1> endarea .andy 2276 0000130F 57696E646F7773204E- <1> .ntdos: db "Windows NT MS-DOS subsystem Mouse Driver" ; Int33.004D mouse driver copyright string (not ASCIZ) 2276 00001318 54204D532D444F5320- <1> 2276 00001321 73756273797374656D- <1> 2276 0000132A 204D6F757365204472- <1> 2276 00001333 69766572 <1> 2277 <1> endarea .ntdos 2278 <1> 2279 <1> ; INP: - 2280 <1> ; OUT: CY if not NTVDM 2281 <1> ; NC if NTVDM 2282 <1> ; ds = es = cs 2283 <1> ; CHG: ax, bx, cx, dx, di, si, bp, es, ds 2284 <1> isnt: 2285 00001337 B80258 <1> mov ax, 5802h ; Get UMB link state 2286 0000133A CD21 <1> int 21h 2287 0000133C 30E4 <1> xor ah, ah 2288 0000133E 50 <1> push ax ; Save UMB link state 2289 0000133F B80358 <1> mov ax, 5803h ; Set UMB link state: 2290 00001342 BB0100 <1> mov bx, 1 ; Add UMBs to memory chain 2291 00001345 CD21 <1> int 21h 2292 00001347 B452 <1> mov ah, 52h 2293 00001349 BBFFFF <1> mov bx, -1 2294 0000134C CD21 <1> int 21h ; Get list of lists 2295 0000134E 43 <1> inc bx ; 0FFFFh ? 2296 0000134F 7503E98E00 <1> jz .notnt ; invalid --> 2297 00001354 83FB02 <1> cmp bx, 2 ; would access word at 0FFFFh ? 2298 00001357 7503E98600 <1> je .notnt ; yes, invalid --> 2299 0000135C 268B47FD <1> mov ax, word [es:bx-3] ; First MCB 2300 00001360 0E <1> push cs 2301 00001361 07 <1> pop es ; reset es 2302 <1> .loop: 2303 00001362 8ED8 <1> mov ds, ax ; ds = MCB 2304 00001364 40 <1> inc ax ; Now segment of memory block itself 2305 00001365 31D2 <1> xor dx, dx 2306 00001367 31DB <1> xor bx, bx 2307 00001369 803F5A <1> cmp byte [bx], 'Z' ; End of MCB chain? 2308 0000136C 7503 <1> jne .notlast 2309 0000136E 42 <1> inc dx 2310 0000136F EB05 <1> jmp short .notchain 2311 <1> .notlast: 2312 00001371 803F4D <1> cmp byte [bx], 'M' ; Valid MCB chain? 2313 00001374 756C <1> jne .error 2314 <1> .notchain: 2315 00001376 8B4F03 <1> mov cx, [bx+3] ; MCB size in paragraphs 2316 <1> ; ax = current memory block 2317 <1> ; cx = size of current memory block in paragraphs 2318 <1> ; dx = flag whether this is the last MCB 2319 <1> ; ds = current MCB (before memory block) 2320 00001379 837F0108 <1> cmp word [bx+1], 8 ; MCB owner DOS? 2321 0000137D 755D <1> jne .notfound_1 2322 0000137F 817F085344 <1> cmp word [bx+8], "SD" ; MCB name "SD"? 2323 00001384 7556 <1> jne .notfound_1 2324 <1> .loopsub: 2325 00001386 8ED8 <1> mov ds, ax ; SD sub-segment inside memory block 2326 00001388 40 <1> inc ax 2327 00001389 49 <1> dec cx 2328 0000138A 8B6F03 <1> mov bp, word [bx+3] ; Paragraphs 'til end of SD sub-segment 2329 <1> ; ax = current SD sub-segment 2330 <1> ; cx = paragraphs from SD sub-segment start (ax) to current memory block end 2331 <1> ; ds = current SD sub-MCB (like MCB, but for SD sub-segment) 2332 <1> ; bp = current SD sub-segment size in paragraphs 2333 0000138D 39E9 <1> cmp cx, bp 2334 0000138F 724B <1> jb .notfound_1 ; Goes beyond memory block, invalid --> 2335 00001391 803F51 <1> cmp byte [bx], 'Q' ; NTVDM type 51h sub-segment ? 2336 00001394 753C <1> jne .notfound_2 ; no --> 2337 00001396 BE0800 <1> mov si, 8 ; Offset of device name (if SD device driver sub-segment) 2338 00001399 BF[FC12] <1> mov di, imsg.mouse 2339 0000139C 51 <1> push cx 2340 0000139D 89F1 <1> mov cx, si ; length of name 2341 0000139F F3A6 <1> repe cmpsb ; blank-padded device name "MOUSE" ? 2342 000013A1 59 <1> pop cx 2343 000013A2 752E <1> jne .notfound_2 ; Device name doesn't match, try next SD sub-segment 2344 000013A4 8CD8 <1> mov ax, ds 2345 000013A6 40 <1> inc ax 2346 000013A7 8ED8 <1> mov ds, ax ; Segment of SD sub-segment 2347 <1> ; ds = current SD sub-segment 2348 000013A9 89E8 <1> mov ax, bp ; Leave paragraph value in bp 2349 000013AB A900F0 <1> test ax, 0F000h ; Would *16 cause an overflow? 2350 000013AE 7520 <1> jnz .notfound_3 ; Then too large --> 2351 000013B0 51 <1> push cx 2352 000013B1 B104 <1> mov cl, 4 2353 000013B3 D3E0 <1> shl ax, cl ; *16 2354 000013B5 59 <1> pop cx 2355 <1> ; ax = current SD sub-segment size in byte 2356 <1> .andy: 2357 000013B6 BF[0413] <1> mov di, imsg.andy 2358 000013B9 51 <1> push cx 2359 000013BA B90B00 <1> mov cx, imsg.andy_size 2360 000013BD E82E00 <1> call findstring ; String "Andy Watson"? 2361 000013C0 59 <1> pop cx 2362 000013C1 720D <1> jc .notfound_3 2363 <1> .ntdos: 2364 000013C3 BF[0F13] <1> mov di, imsg.ntdos 2365 000013C6 51 <1> push cx 2366 000013C7 B92800 <1> mov cx, imsg.ntdos_size 2367 000013CA E82100 <1> call findstring ; String "Windows NT MS-DOS subsystem Mouse Driver"? 2368 000013CD 59 <1> pop cx 2369 000013CE 7313 <1> jnc .found ; (NC) 2370 <1> .notfound_3: 2371 000013D0 8CD8 <1> mov ax, ds 2372 <1> .notfound_2: 2373 000013D2 39E9 <1> cmp cx, bp 2374 000013D4 7406 <1> je .notfound_1 ; End of SD memory block, get next MCB 2375 000013D6 01E8 <1> add ax, bp ; Address next SD sub-MCB 2376 000013D8 29E9 <1> sub cx, bp 2377 000013DA EBAA <1> jmp short .loopsub ; Try next SD sub-segment 2378 <1> .notfound_1: 2379 000013DC 01C8 <1> add ax, cx ; Address next MCB 2380 000013DE 85D2 <1> test dx, dx ; Non-zero if 'Z' MCB 2381 000013E0 7480 <1> jz .loop ; If not at end of MCB chain, try next 2382 <1> ; jmp short .notnt ; Otherwise, not found 2383 <1> .error: 2384 <1> .notnt: 2385 000013E2 F9 <1> stc 2386 <1> .found: 2387 000013E3 0E <1> push cs 2388 000013E4 1F <1> pop ds ; restore ds 2389 <1> 2390 000013E5 5B <1> pop bx ; saved UMB link state 2391 000013E6 B80358 <1> mov ax, 5803h 2392 000013E9 9C <1> pushf 2393 000013EA CD21 <1> int 21h ; Set UMB link state 2394 000013EC 9D <1> popf 2395 000013ED C3 <1> retn 2396 <1> 2397 <1> findstring: 2398 000013EE 31F6 <1> xor si, si 2399 <1> .loop: 2400 000013F0 56 <1> push si 2401 000013F1 01CE <1> add si, cx 2402 000013F3 7203 <1> jc .notfound_c 2403 000013F5 4E <1> dec si ; The largest offset we need for this compare 2404 000013F6 39F0 <1> cmp ax, si 2405 <1> .notfound_c: 2406 000013F8 5E <1> pop si 2407 000013F9 720D <1> jb .return ; Not found if at top of memory block --> 2408 000013FB 57 <1> push di 2409 000013FC 56 <1> push si 2410 000013FD 51 <1> push cx 2411 000013FE F3A6 <1> repe cmpsb ; String somewhere inside program? 2412 00001400 59 <1> pop cx 2413 00001401 5E <1> pop si 2414 00001402 5F <1> pop di 2415 00001403 7403 <1> je .return ; Yes, proceed --> (if ZR, NC) 2416 00001405 46 <1> inc si ; Increase pointer by one 2417 00001406 EBE8 <1> jmp short .loop ; Try next address 2418 <1> .return: 2419 00001408 C3 <1> retn 2420 <1> %endif 2421 <1> 2422 <1> 2423 <1> ; Move paragraphs 2424 <1> ; 2425 <1> ; INP: ax:0-> source 2426 <1> ; dx:0-> destination 2427 <1> ; cx = number of paragraphs 2428 <1> ; CHG: - 2429 <1> ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 2430 <1> ; Do not provide a wrapped/HMA source or destination! 2431 <1> init_movp: 2432 00001409 51 <1> push cx 2433 0000140A 1E <1> push ds 2434 0000140B 56 <1> push si 2435 0000140C 06 <1> push es 2436 0000140D 57 <1> push di 2437 <1> 2438 0000140E 39D0 <1> cmp ax, dx ; source above destination ? 2439 00001410 770A <1> ja .up ; yes, move up (forwards) --> 2440 00001412 747B <1> je .return ; same, no need to move --> 2441 00001414 50 <1> push ax 2442 00001415 01C8 <1> add ax, cx ; (expected not to carry) 2443 00001417 39D0 <1> cmp ax, dx ; end of source is above destination ? 2444 00001419 58 <1> pop ax 2445 0000141A 7730 <1> ja .down ; yes, move from top down --> 2446 <1> ; Here, the end of source is below-or-equal the destination, 2447 <1> ; so they do not overlap. In this case we prefer moving up. 2448 <1> 2449 <1> .up: 2450 0000141C 50 <1> push ax 2451 0000141D 52 <1> push dx 2452 <1> .uploop: 2453 0000141E 8ED8 <1> mov ds, ax 2454 00001420 8EC2 <1> mov es, dx 2455 00001422 31FF <1> xor di, di 2456 00001424 31F6 <1> xor si, si ; -> start of segment 2457 00001426 81E90010 <1> sub cx, 1000h ; 64 KiB left ? 2458 0000142A 7610 <1> jbe .uplast ; no --> 2459 0000142C 51 <1> push cx 2460 0000142D B90080 <1> mov cx, 10000h /2 2461 00001430 F3A5 <1> rep movsw ; move 64 KiB 2462 00001432 59 <1> pop cx 2463 00001433 050010 <1> add ax, 1000h 2464 00001436 81C20010 <1> add dx, 1000h ; -> next segment 2465 0000143A EBE2 <1> jmp short .uploop ; proceed for more --> 2466 <1> .uplast: 2467 0000143C 81C10010 <1> add cx, 1000h ; restore counter 2468 00001440 D1E1 <1> shl cx, 1 2469 00001442 D1E1 <1> shl cx, 1 2470 00001444 D1E1 <1> shl cx, 1 ; *8, paragraphs to words 2471 00001446 F3A5 <1> rep movsw ; move last part 2472 00001448 5A <1> pop dx 2473 00001449 58 <1> pop ax 2474 0000144A EB43 <1> jmp short .return 2475 <1> 2476 <1> .down: 2477 0000144C FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 2478 <1> .dnloop: 2479 0000144D 81E90010 <1> sub cx, 1000h ; 64 KiB left ? 2480 00001451 761A <1> jbe .dnlast ; no --> 2481 00001453 50 <1> push ax 2482 00001454 52 <1> push dx 2483 00001455 01C8 <1> add ax, cx 2484 00001457 01CA <1> add dx, cx 2485 00001459 8ED8 <1> mov ds, ax ; -> 64 KiB not yet moved 2486 0000145B 8EC2 <1> mov es, dx 2487 0000145D 5A <1> pop dx 2488 0000145E 58 <1> pop ax 2489 0000145F BFFEFF <1> mov di, -2 2490 00001462 89FE <1> mov si, di ; moved from last word down 2491 00001464 51 <1> push cx 2492 00001465 B90080 <1> mov cx, 10000h /2 2493 00001468 F3A5 <1> rep movsw ; move 64 KiB 2494 0000146A 59 <1> pop cx 2495 0000146B EBE0 <1> jmp short .dnloop ; proceed for more --> 2496 <1> .dnlast: 2497 0000146D 81C10010 <1> add cx, 1000h ; restore counter 2498 00001471 D1E1 <1> shl cx, 1 2499 00001473 D1E1 <1> shl cx, 1 2500 00001475 D1E1 <1> shl cx, 1 ; *8, paragraphs to words 2501 00001477 89CF <1> mov di, cx 2502 00001479 4F <1> dec di 2503 0000147A D1E7 <1> shl di, 1 ; words to offset, -> last word 2504 0000147C 89FE <1> mov si, di 2505 0000147E 8ED8 <1> mov ds, ax 2506 00001480 8EC2 <1> mov es, dx ; first segment correct 2507 <1> 2508 <1> 2509 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 2510 <1> %if 0 2511 <1> 2512 <1> Jack R. Ellis pointed out this erratum: 2513 <1> 2514 <1> Quoting from https://www.amd.com/system/files/TechDocs/25759.pdf page 69: 2515 <1> 2516 <1> 109 Certain Reverse REP MOVS May Produce Unpredictable Behavior 2517 <1> 2518 <1> Description 2519 <1> 2520 <1> In certain situations a REP MOVS instruction may lead to 2521 <1> incorrect results. An incorrect address size, data size 2522 <1> or source operand segment may be used or a succeeding 2523 <1> instruction may be skipped. This may occur under the 2524 <1> following conditions: 2525 <1> 2526 <1> * EFLAGS.DF=1 (the string is being moved in the reverse direction). 2527 <1> 2528 <1> * The number of items being moved (RCX) is between 1 and 20. 2529 <1> 2530 <1> * The REP MOVS instruction is preceded by some microcoded instruction 2531 <1> that has not completely retired by the time the REP MOVS begins 2532 <1> execution. The set of such instructions includes BOUND, CLI, LDS, 2533 <1> LES, LFS, LGS, LSS, IDIV, and most microcoded x87 instructions. 2534 <1> 2535 <1> Potential Effect on System 2536 <1> 2537 <1> Incorrect results may be produced or the system may hang. 2538 <1> 2539 <1> Suggested Workaround 2540 <1> 2541 <1> Contact your AMD representative for information on a BIOS update. 2542 <1> 2543 <1> %endif 2544 <1> 2545 <1> %if _AMD_ERRATUM_109_WORKAROUND 2546 00001482 E308 <1> jcxz @FF 2547 00001484 83F914 <1> cmp cx, 20 2548 00001487 7703 <1> ja @FF 2549 <1> @@: 2550 00001489 A5 <1> movsw 2551 0000148A E2FD <1> loop @B 2552 <1> @@: 2553 <1> %endif 2554 0000148C F3A5 <1> rep movsw ; move first part 2555 0000148E FC <1> cld 2556 <1> .return: 2557 0000148F 5F <1> pop di 2558 00001490 07 <1> pop es 2559 00001491 5E <1> pop si 2560 00001492 1F <1> pop ds 2561 00001493 59 <1> pop cx 2562 00001494 C3 <1> retn 2563 <1> 2564 <1> 2565 <1> %if _BOOTLDR 2566 <1> ; only called for boot-loaded mode 2567 <1> init_getc_bootldr: 2568 00001495 31C0 <1> xor ax, ax 2569 00001497 CD16 <1> int 16h 2570 00001499 C3 <1> retn 2571 <1> %endif 2572 <1> 2573 <1> init_putsz_cs: 2574 0000149A 50 <1> push ax 2575 0000149B 53 <1> push bx 2576 0000149C 51 <1> push cx 2577 0000149D 52 <1> push dx 2578 0000149E 1E <1> push ds 2579 0000149F 06 <1> push es 2580 000014A0 57 <1> push di 2581 000014A1 0E <1> push cs 2582 000014A2 07 <1> pop es 2583 000014A3 0E <1> push cs 2584 000014A4 1F <1> pop ds 2585 000014A5 89D7 <1> mov di, dx ; es:di-> string 2586 000014A7 30C0 <1> xor al, al 2587 000014A9 B9FFFF <1> mov cx, -1 2588 000014AC F2AE <1> repne scasb ; search zero 2589 000014AE F7D1 <1> not cx 2590 000014B0 49 <1> dec cx ; cx = length of message 2591 000014B1 5F <1> pop di 2592 000014B2 E82900 <1> call init_puts_ds 2593 000014B5 07 <1> pop es 2594 000014B6 1F <1> pop ds 2595 000014B7 5A <1> pop dx 2596 000014B8 59 <1> pop cx 2597 000014B9 5B <1> pop bx 2598 000014BA 58 <1> pop ax 2599 000014BB C3 <1> retn 2600 <1> 2601 <1> %if _BOOTLDR 2602 <1> init_putsz_cs_bootldr: 2603 000014BC 50 <1> push ax 2604 000014BD 53 <1> push bx 2605 000014BE 51 <1> push cx 2606 000014BF 52 <1> push dx 2607 000014C0 1E <1> push ds 2608 000014C1 06 <1> push es 2609 000014C2 57 <1> push di 2610 000014C3 0E <1> push cs 2611 000014C4 07 <1> pop es 2612 000014C5 0E <1> push cs 2613 000014C6 1F <1> pop ds 2614 000014C7 89D7 <1> mov di, dx ; es:di-> string 2615 000014C9 30C0 <1> xor al, al 2616 000014CB B9FFFF <1> mov cx, -1 2617 000014CE F2AE <1> repne scasb ; search zero 2618 000014D0 F7D1 <1> not cx 2619 000014D2 49 <1> dec cx ; cx = length of message 2620 000014D3 5F <1> pop di 2621 000014D4 E80F00 <1> call init_puts_ds_bootldr 2622 000014D7 07 <1> pop es 2623 000014D8 1F <1> pop ds 2624 000014D9 5A <1> pop dx 2625 000014DA 59 <1> pop cx 2626 000014DB 5B <1> pop bx 2627 000014DC 58 <1> pop ax 2628 000014DD C3 <1> retn 2629 <1> %endif 2630 <1> 2631 <1> init_puts_ds: 2632 <1> %if _BOOTLDR 2633 <1> %if _APPLICATION || _DEVICE 2634 000014DE 36F606[D100]40 <1> testopt [ss:internalflags], nodosloaded 2635 000014E4 7413 <1> jz @F 2636 <1> %endif 2637 <1> 2638 <1> init_puts_ds_bootldr: 2639 000014E6 56 <1> push si 2640 000014E7 55 <1> push bp 2641 000014E8 89D6 <1> mov si, dx 2642 000014EA E30A <1> jcxz .return 2643 <1> .loop: 2644 000014EC AC <1> lodsb 2645 000014ED BB0700 <1> mov bx, 0007 2646 000014F0 B40E <1> mov ah, 0Eh 2647 000014F2 CD10 <1> int 10h 2648 000014F4 E2F6 <1> loop .loop 2649 <1> .return: 2650 000014F6 5D <1> pop bp 2651 000014F7 5E <1> pop si 2652 000014F8 C3 <1> retn 2653 <1> 2654 <1> @@: 2655 <1> %endif 2656 <1> %if _APPLICATION || _DEVICE 2657 000014F9 BB0100 <1> mov bx, 1 ; standard output 2658 000014FC B440 <1> mov ah, 40h ; write to file 2659 000014FE E302 <1> jcxz @F 2660 00001500 CD21 <1> int 21h 2661 <1> @@: 2662 00001502 C3 <1> retn 2663 <1> %endif 2664 <1> 2665 <1> 2666 <1> %if _BOOTLDR 2667 <1> ; ds = ss = debugger data segment 2668 <1> ; (ds - 1) = image ident prefix paragraph 2669 <1> boot_old_initcode: 2670 00001503 FC <1> cld 2671 <1> 2672 <1> d4 call init_d4message 2673 <1> d4 asciz "In boot loader; press any key",13,10 2674 <1> d4 call init_d4pauseforkey 2675 <1> 2676 00001504 C706[8E0C]8000 <1> mov word [execblk.cmdline], 80h 2677 0000150A C60681000D <1> mov byte [81h], 0Dh 2678 0000150F C606[040C]01 <1> mov byte [fileext], EXT_OTHER ; empty file name and command line as per N 2679 <1> %endif ; _BOOTLDR 2680 <1> 2681 <1> old_initcode: 2682 00001514 FC <1> cld 2683 <1> d0bp 2684 00001515 8CD8 <1> mov ax, ds 2685 00001517 A3[900C] <1> mov word [execblk.cmdline + 2], ax 2686 0000151A A3[940C] <1> mov word [execblk.fcb1 + 2], ax 2687 0000151D A3[980C] <1> mov word [execblk.fcb2 + 2], ax ; set up parameter block for exec command 2688 00001520 A3[020B] <1> mov word [pspdbg], ax 2689 <1> 2690 <1> %if _IMMASM && !_IMMASM_AUXBUFF 2691 <1> add ax, (immasm_buffer + DATASECTIONFIXUP) >> 4 2692 <1> mov word [immseg], ax 2693 <1> %endif 2694 <1> 2695 00001523 1E <1> push ds 2696 00001524 B84000 <1> mov ax, 40h 2697 00001527 8ED8 <1> mov ds, ax 2698 00001529 A18200 <1> mov ax, word [82h] ; end of circular keypress buffer 2699 0000152C 8B168000 <1> mov dx, word [80h] ; start of circular buffer 2700 00001530 85C0 <1> test ax, ax 2701 00001532 7431 <1> jz .forcekeybuffer 2702 00001534 85D2 <1> test dx, dx 2703 00001536 742D <1> jz .forcekeybuffer 2704 00001538 89C3 <1> mov bx, ax 2705 0000153A 29D3 <1> sub bx, dx ; cmp end, start 2706 0000153C 7627 <1> jbe .forcekeybuffer ; below or equal is invalid --> 2707 0000153E F6C301 <1> test bl, 1 ; even amount of bytes ? 2708 00001541 7522 <1> jnz .forcekeybuffer ; no, invalid --> 2709 00001543 8B1E1A00 <1> mov bx, word [1Ah] ; current head of circular buffer 2710 00001547 39C3 <1> cmp bx, ax 2711 00001549 731A <1> jae .forcekeybuffer 2712 0000154B 29D3 <1> sub bx, dx 2713 0000154D 7216 <1> jb .forcekeybuffer 2714 0000154F F6C301 <1> test bl, 1 2715 00001552 7511 <1> jnz .forcekeybuffer ; invalid --> 2716 00001554 8B1E1C00 <1> mov bx, word [1Ch] ; current tail of circular buffer 2717 00001558 39C3 <1> cmp bx, ax 2718 0000155A 7309 <1> jae .forcekeybuffer 2719 0000155C 29D3 <1> sub bx, dx 2720 0000155E 7205 <1> jb .forcekeybuffer 2721 00001560 F6C301 <1> test bl, 1 2722 00001563 740E <1> jz @F ; valid --> 2723 <1> .forcekeybuffer: 2724 00001565 1F <1> pop ds 2725 00001566 C706[260C]3E00 <1> mov word [io_end_buffer], 3Eh 2726 0000156C C706[240C]1E00 <1> mov word [io_start_buffer], 1Eh 2727 00001572 A8 <1> db __TEST_IMM8 ; (skip pop) 2728 <1> @@: 2729 00001573 1F <1> pop ds 2730 <1> 2731 <1> %if _BOOTLDR 2732 <1> %if _APPLICATION || _DEVICE 2733 00001574 F606[D100]40 <1> testopt [internalflags], nodosloaded 2734 00001579 7403 <1> jz .checkio 2735 <1> %endif 2736 <1> d4 call init_d4message 2737 <1> d4 asciz "Common initialisation, determining processor type now",13,10 2738 0000157B E9BB00 <1> jmp init_determineprocessor 2739 <1> .checkio: 2740 <1> %endif 2741 <1> 2742 <1> %if _APPLICATION || _DEVICE 2743 <1> ; Check for console input vs. input from a file or other device. 2744 <1> ; This has to be done early because MS-DOS seems to switch CON 2745 <1> ; to cooked I/O mode only then. 2746 0000157E B80044 <1> mov ax, 4400h ; IOCTL get device information 2747 00001581 31DB <1> xor bx, bx ; StdIn 2748 00001583 B283 <1> mov dl, 83h ; default if 21.4400 fails 2749 00001585 CD21 <1> int 21h 2750 00001587 F6C280 <1> test dl, 80h 2751 0000158A 7414 <1> jz .inputfile 2752 0000158C 8026[D000]DF <1> clropt [internalflags], inputfile 2753 00001591 F6C203 <1> test dl, 3 2754 00001594 740A <1> jz .inputdevice ; if not the console input 2755 00001596 8026[D000]EF <1> clropt [internalflags], notstdinput 2756 0000159B C606[540B]00 <1> mov byte [notatty], 0 ; it _is_ a tty 2757 <1> .inputdevice: 2758 <1> .inputfile: 2759 000015A0 B80044 <1> mov ax, 4400h ; IOCTL get device information 2760 000015A3 43 <1> inc bx ; StdOut 2761 000015A4 B283 <1> mov dl, 83h ; default if 21.4400 fails 2762 000015A6 CD21 <1> int 21h 2763 000015A8 F6C280 <1> test dl, 80h 2764 000015AB 740F <1> jz .outputfile 2765 000015AD 8026[D000]7F <1> clropt [internalflags], outputfile 2766 000015B2 F6C203 <1> test dl, 3 2767 000015B5 7405 <1> jz .outputdevice ; if not the console output 2768 000015B7 8026[D000]BF <1> clropt [internalflags], notstdoutput 2769 <1> .outputdevice: 2770 <1> .outputfile: 2771 <1> 2772 <1> ; Check DOS version 2773 <1> %if _VDD 2774 000015BC 1E <1> push ds 2775 000015BD 0E <1> push cs 2776 000015BE 1F <1> pop ds 2777 000015BF 0E <1> push cs 2778 000015C0 07 <1> pop es 2779 000015C1 E873FD <1> call isnt ; NTVDM ? 2780 000015C4 1F <1> pop ds 2781 000015C5 7205 <1> jc .isnotnt ; no --> 2782 000015C7 800E[D200]02 <1> setopt [internalflags], runningnt 2783 <1> .isnotnt: 2784 <1> %endif 2785 <1> 2786 000015CC B80030 <1> mov ax, 3000h ; check DOS version 2787 000015CF CD21 <1> int 21h 2788 000015D1 86C4 <1> xchg al, ah 2789 000015D3 3D1F03 <1> cmp ax, ver(3,31) ; MS-DOS version > 3.30 ? 2790 000015D6 7205 <1> jb .notoldpacket ; no --> 2791 000015D8 800E[D000]01 <1> setopt [internalflags], oldpacket ; assume Int25/Int26 packet method available 2792 <1> .notoldpacket: 2793 000015DD 50 <1> push ax 2794 000015DE 31DB <1> xor bx, bx ; preset to invalid value 2795 000015E0 B80633 <1> mov ax, 3306h 2796 000015E3 CD21 <1> int 21h 2797 000015E5 84C0 <1> test al, al ; invalid, DOS 1.x error --> 2798 000015E7 7402 <1> jz .213306invalid 2799 000015E9 3CFF <1> cmp al, -1 ; invalid 2800 <1> .213306invalid: 2801 000015EB 58 <1> pop ax 2802 000015EC 7407 <1> je .useoldver 2803 000015EE 85DB <1> test bx, bx ; 0.0 ? 2804 000015F0 7403 <1> jz .useoldver ; assume invalid --> 2805 000015F2 93 <1> xchg ax, bx ; get version to ax 2806 000015F3 86C4 <1> xchg al, ah ; strange Microsoft version format 2807 <1> .useoldver: 2808 000015F5 3D0107 <1> cmp ax, ver(7,01) ; MS-DOS version > 7.00 ? 2809 000015F8 7205 <1> jb .notnewpacket ; no --> 2810 000015FA 800E[D000]03 <1> setopt [internalflags], newpacket| oldpacket ; assume both packet methods available 2811 <1> .notnewpacket: 2812 <1> %if _VDD 2813 000015FF F606[D200]02 <1> testopt [internalflags], runningnt 2814 00001604 741F <1> jz .novdd 2815 00001606 1E <1> push ds 2816 00001607 0E <1> push cs 2817 00001608 1F <1> pop ds 2818 00001609 0E <1> push cs 2819 0000160A 07 <1> pop es 2820 0000160B BE[E112] <1> mov si, imsg.vdd ; ds:si-> ASCIZ VDD filename 2821 0000160E BB[EE12] <1> mov bx, imsg.dispatch ; ds:bx-> ASCIZ dispatching entry 2822 00001611 BF[F712] <1> mov di, imsg.init ; es:di-> ASCIZ init entry 2823 00001614 F8 <1> clc ; ! 2824 00001615 C4C4580090 <1> RegisterModule ; register VDD 2825 0000161A 1F <1> pop ds 2826 0000161B 7208 <1> jc .novdd ; error ? --> 2827 0000161D A3[0C0B] <1> mov word [hVdd], ax 2828 00001620 800E[D000]05 <1> setopt [internalflags], ntpacket| oldpacket ; assume old packet method also available 2829 <1> .novdd: 2830 <1> %endif 2831 <1> %endif 2832 <1> 2833 <1> 2834 <1> %if _CONFIG 2835 <1> do_truename_config: 2836 00001625 BA[0201] <1> mov dx, configpath 2837 00001628 E8D90B <1> call do_truename 2838 0000162B 893E[8202] <1> mov word [configpath.dir_end], di 2839 <1> do_truename_scripts: 2840 0000162F BA[8402] <1> mov dx, scriptspath 2841 00001632 E8CF0B <1> call do_truename 2842 00001635 893E[0404] <1> mov word [scriptspath.dir_end], di 2843 <1> %endif 2844 <1> 2845 <1> 2846 <1> init_determineprocessor: 2847 <1> d4 call init_d4message 2848 <1> d4 asciz "Determining processor type",13,10 2849 <1> 2850 00001639 B92101 <1> mov cx, 0121h 2851 0000163C D2E5 <1> shl ch, cl 2852 0000163E 7514 <1> jnz .found_186_plus ; normal 186 masks shift count with 31 --> 2853 <1> 2854 <1> ; To make it easier to trace past the long-form pop cx 2855 <1> ; instruction, we now run it in a subfunction. 2856 00001640 E80500 <1> call .detect_nec 2857 00001643 E30F <1> jcxz .found_186_plus ; if it was a nop --> 2858 00001645 E9F700 <1> jmp .cpudone ; is an actual 8088/8086 --> 2859 <1> 2860 <1> 2861 <1> ; INP: - 2862 <1> ; OUR: cx = 0 if NEC V20 or NEC V30 2863 <1> ; cx = 1 else 2864 <1> ; CHG: ax, cx 2865 <1> .detect_nec: 2866 <1> ; The NEC V20/V30 processors do support the 186 extensions 2867 <1> ; to the instruction set but do not mask the shift count. 2868 <1> ; Therefore, specifically detect them here. Based on the 2869 <1> ; text in http://www.textfiles.com/hamradio/v20_bug.txt 2870 00001648 89E0 <1> mov ax, sp 2871 0000164A B90100 <1> mov cx, 1 ; = 1 if on actual 8088/8086 2872 0000164D 51 <1> push cx 2873 0000164E 49 <1> dec cx ; = 0 if on NEC V20/V30 2874 <1> 2875 <1> ; NB: Do *NOT* trace this instruction with Trace Flag = 1 and 2876 <1> ; do *NOT* write a breakpoint at the mov sp instruction, 2877 <1> ; that is the very next instruction after the pop cx. 2878 <1> ; Doing either leads to locking up the HP 95LX, requiring to 2879 <1> ; reset the system using Ctrl-Shift-On (which zeroes the 2880 <1> ; system date and time). 2881 0000164F 8FC1 <1> db 8Fh, 0C1h ; pop r/m16 with cx as operand 2882 <1> ; (reportedly a nop on the NECs) 2883 00001651 89C4 <1> mov sp, ax ; reset stack to known state 2884 00001653 C3 <1> retn 2885 <1> 2886 <1> .found_186_plus: 2887 <1> d4 call init_d4message 2888 <1> d4 asciz "Found 186+ processor",13,10 2889 00001654 FE06[2E0B] <1> inc byte [ machine ] ; 1 2890 00001658 54 <1> push sp 2891 00001659 58 <1> pop ax 2892 0000165A 39E0 <1> cmp ax, sp 2893 0000165C 7403E9DE00 <1> jne .cpudone ; 80186 pushes the adjusted value of sp --> 2894 <1> 2895 <1> d4 call init_d4message 2896 <1> d4 asciz "Found 286+ processor",13,10 2897 <1> ; Determine the processor type. This is adapted from code in the 2898 <1> ; Pentium Family User's Manual, Volume 3: Architecture and 2899 <1> ; Programming Manual, Intel Corp., 1994, Chapter 5. That code contains 2900 <1> ; the following comment: 2901 <1> ; 2902 <1> ; This program has been developed by Intel Corporation. 2903 <1> ; Software developers have Intel's permission to incorporate 2904 <1> ; this source code into your software royalty free. 2905 <1> ; 2906 <1> ; Intel 286 CPU check. 2907 <1> ; Bits 12-15 of the flags register are always clear on the 2908 <1> ; 286 processor in real-address mode. 2909 <1> ; Bits 12-15 of the FLAGS register are always set on the 2910 <1> ; 8086 and 186 processor. 2911 00001661 FE06[2E0B] <1> inc byte [ machine ] ; 2 2912 00001665 9C <1> pushf ; save IF 2913 00001666 9C <1> pushf ; get original flags into ax 2914 00001667 58 <1> pop ax 2915 00001668 0D00F0 <1> or ax, 0F000h ; try to set bits 12-15 2916 0000166B 25FFFD <1> and ax, ~0200h ; clear IF 2917 0000166E 50 <1> push ax ; save new flags value on stack 2918 0000166F 9D <1> popf ; replace current flags value; DI 2919 00001670 9C <1> pushf ; get new flags 2920 00001671 58 <1> pop ax ; store new flags in ax 2921 00001672 9D <1> popf ; restore IF (in 86 Mode) 2922 00001673 A900F0 <1> test ax, 0F000h ; if bits 12-15 clear, CPU = 80286 2923 00001676 7503E9C400 <1> jz .cpudone ; if 80286 --> 2924 <1> 2925 <1> d4 call init_d4message 2926 <1> d4 asciz "Found 386+ processor",13,10 2927 <1> ; Intel 386 CPU check. 2928 <1> ; The AC bit, bit #18, is a new bit introduced in the EFLAGS 2929 <1> ; register on the Intel486 DX cpu to generate alignment faults. 2930 <1> ; This bit cannot be set on the Intel386 CPU. 2931 <1> ; 2932 <1> ; It is now safe to use 32-bit opcode/operands. 2933 <1> subcpu 386 2934 0000167B 800E[D100]80 <1> setopt [internalflags], has386 2935 00001680 FE06[2E0B] <1> inc byte [ machine ] ; 3 2936 <1> 2937 <1> %if _DEVICE 2938 <1> %if _APPLICATION || _BOOTLDR 2939 00001684 F606[E600]40 <1> testopt [internalflags6], dif6_device_mode 2940 00001689 7440 <1> jz @F 2941 <1> %endif 2942 <1> 2943 0000168B 8C26[D40C] <1> mov word [reg_fs], fs 2944 0000168F 8C2E[D80C] <1> mov word [reg_gs], gs 2945 <1> %macro set_gpr_h 1 2946 <1> push e %+ %1 2947 <1> pop %1 2948 <1> pop word [reg_e %+ %1 + 2] 2949 <1> %endmacro 2950 <1> set_gpr_h ax 2946 00001693 6650 <2> push e %+ %1 2947 00001695 58 <2> pop %1 2948 00001696 8F06[A60C] <2> pop word [reg_e %+ %1 + 2] 2951 <1> set_gpr_h bx 2946 0000169A 6653 <2> push e %+ %1 2947 0000169C 5B <2> pop %1 2948 0000169D 8F06[AA0C] <2> pop word [reg_e %+ %1 + 2] 2952 <1> set_gpr_h cx 2946 000016A1 6651 <2> push e %+ %1 2947 000016A3 59 <2> pop %1 2948 000016A4 8F06[AE0C] <2> pop word [reg_e %+ %1 + 2] 2953 <1> set_gpr_h dx 2946 000016A8 6652 <2> push e %+ %1 2947 000016AA 5A <2> pop %1 2948 000016AB 8F06[B20C] <2> pop word [reg_e %+ %1 + 2] 2954 <1> set_gpr_h bp 2946 000016AF 6655 <2> push e %+ %1 2947 000016B1 5D <2> pop %1 2948 000016B2 8F06[BA0C] <2> pop word [reg_e %+ %1 + 2] 2955 <1> set_gpr_h si 2946 000016B6 6656 <2> push e %+ %1 2947 000016B8 5E <2> pop %1 2948 000016B9 8F06[BE0C] <2> pop word [reg_e %+ %1 + 2] 2956 <1> set_gpr_h di 2946 000016BD 6657 <2> push e %+ %1 2947 000016BF 5F <2> pop %1 2948 000016C0 8F06[C20C] <2> pop word [reg_e %+ %1 + 2] 2957 <1> ; esph and eiph remain zero 2958 000016C4 669C <1> pushfd 2959 000016C6 9D <1> popfw 2960 000016C7 8F06[E20C] <1> pop word [reg_efl + 2] 2961 <1> %endif 2962 <1> @@: 2963 <1> 2964 000016CB 89E3 <1> mov bx, sp ; save current stack pointer to align 2965 000016CD 83E4FC <1> and sp, ~3 ; align stack to avoid AC fault 2966 000016D0 669C <1> pushfd ; push original EFLAGS 2967 000016D2 6658 <1> pop eax ; get original EFLAGS 2968 000016D4 6689C1 <1> mov ecx, eax ; save original EFLAGS in ECX (including IF) 2969 <1> 2970 000016D7 663500000400 <1> xor eax, 40000h ; flip AC bit in EFLAGS 2971 000016DD 25FFFD <1> and ax, ~0200h ; clear IF 2972 000016E0 6650 <1> push eax ; put new EFLAGS value on stack 2973 000016E2 669D <1> popfd ; replace EFLAGS value; DI 2974 000016E4 669C <1> pushfd ; get new EFLAGS 2975 000016E6 6658 <1> pop eax ; store new EFLAGS value in EAX 2976 000016E8 89C8 <1> mov ax, cx ; ignore low bits (including IF) 2977 000016EA 6639C8 <1> cmp eax, ecx 2978 000016ED 741A <1> je .cpudone_stack_eax_equals_ecx ; if 80386 --> 2979 <1> 2980 <1> d4 call init_d4message 2981 <1> d4 asciz "Found 486+ processor",13,10 2982 <1> ; Intel486 DX CPU, Intel487 SX NDP, and Intel486 SX CPU check. 2983 <1> ; Checking for ability to set/clear ID flag (bit 21) in EFLAGS 2984 <1> ; which indicates the presence of a processor with the ability 2985 <1> ; to use the CPUID instruction. 2986 000016EF FE06[2E0B] <1> inc byte [ machine ] ; 4 2987 000016F3 6689C8 <1> mov eax, ecx ; get original EFLAGS 2988 000016F6 663500002000 <1> xor eax, 200000h ; flip ID bit in EFLAGS 2989 000016FC 25FFFD <1> and ax, ~0200h ; clear IF 2990 000016FF 6650 <1> push eax ; save new EFLAGS value on stack 2991 00001701 669D <1> popfd ; replace current EFLAGS value; DI 2992 00001703 669C <1> pushfd ; get new EFLAGS 2993 00001705 6658 <1> pop eax ; store new EFLAGS in EAX 2994 00001707 89C8 <1> mov ax, cx ; ignore low bits (including IF) 2995 <1> 2996 <1> .cpudone_stack_eax_equals_ecx: 2997 00001709 6651 <1> push ecx 2998 0000170B 669D <1> popfd ; restore AC,ID bits and IF in EFLAGS (86 Mode) 2999 0000170D 89DC <1> mov sp, bx ; restore sp 3000 <1> 3001 0000170F 6639C8 <1> cmp eax, ecx ; check if it's changed 3002 00001712 742B <1> je .cpudone ; if it's a 486 (can't toggle ID bit) --> 3003 <1> 3004 <1> d4 call init_d4message 3005 <1> d4 asciz "Found processor with CPUID support",13,10 3006 <1> ; Execute CPUID instruction. 3007 <1> subcpu 486 ; NASM (at least 2.10rc1) handles cpuid itself as a 3008 <1> ; 586+ instruction, but we know better. So this 3009 <1> ; part is declared for 486 compatibility, and only 3010 <1> ; the cpuid instructions are emitted with 586 3011 <1> ; compatibility to appease NASM. 3012 <1> %if 0 3013 <1> d4 call init_d4message 3014 <1> d4 asciz "CPUID will NOT be executed, to work around official DOSBox releases",13,10 3015 <1> d4 jmp .cpudone 3016 <1> %endif 3017 00001714 6631C0 <1> xor eax, eax ; set up input for CPUID instruction 3018 <1> d4 call init_d4message 3019 <1> d4 asciz "Executing CPUID 0",13,10 3020 <1> [cpu 586] 3021 00001717 0FA2 <1> cpuid 3022 <1> __CPU__ 3023 <1> d4 call init_d4message 3024 <1> d4 asciz "CPUID 0 executed",13,10 3025 00001719 6683F801 <1> cmp eax, byte 1 3026 0000171D 7220 <1> jb .cpudone ; if 1 is not a valid input value for CPUID 3027 0000171F 6631C0 <1> xor eax, eax ; otherwise, run CPUID with eax = 1 3028 00001722 6640 <1> inc eax 3029 <1> d4 call init_d4message 3030 <1> d4 asciz "Executing CPUID 1",13,10 3031 <1> [cpu 586] 3032 00001724 0FA2 <1> cpuid 3033 <1> __CPU__ 3034 <1> d4 call init_d4message 3035 <1> d4 asciz "CPUID 1 executed",13,10 3036 <1> %if _MMXSUPP 3037 00001726 66F7C200008000 <1> test edx, 80_0000h 3038 0000172D 0F9506[320B] <1> setnz byte [has_mmx] 3039 <1> %endif 3040 <1> 3041 00001732 88E0 <1> mov al, ah 3042 00001734 240F <1> and al, 0Fh ; bits 8..11 are the model number 3043 00001736 3C06 <1> cmp al, 6 3044 00001738 7202 <1> jb .below686 ; if < 6 3045 0000173A B006 <1> mov al, 6 ; if >= 6, set it to 6 3046 <1> .below686: 3047 0000173C A2[2E0B] <1> mov byte [ machine ], al; save machine type (486, 586, 686+) 3048 <1> 3049 <1> .cpudone: 3050 <1> subcpureset ; subcpu 486 3051 <1> subcpureset ; subcpu 386 3052 <1> d4 call init_d4message 3053 <1> d4 asciz "Determining floating-point unit",13,10 3054 <1> 3055 <1> ; Next determine the type of FPU in a system and set the mach_87 3056 <1> ; variable with the appropriate value. All registers are used by 3057 <1> ; this code; none are preserved. 3058 <1> ; 3059 <1> ; Coprocessor check. 3060 <1> ; The algorithm is to determine whether the floating-point 3061 <1> ; status and control words can be written to. If not, no 3062 <1> ; coprocessor exists. If the status and control words can be 3063 <1> ; written to, the correct coprocessor is then determined 3064 <1> ; depending on the processor ID. The Intel 386 CPU can 3065 <1> ; work with either an Intel 287 NDP or an Intel 387 NDP. 3066 <1> ; The infinity of the coprocessor must be checked 3067 <1> ; to determine the correct coprocessor ID. 3068 0000173F A0[2E0B] <1> mov al, byte [ machine ] 3069 00001742 A2[300B] <1> mov byte [ mach_87 ], al ; by default, set mach_87 to machine 3070 00001745 FE06[2F0B] <1> inc byte [ has_87 ] 3071 00001749 C606[310B]0C <1> mov byte [encodedmach87], 0Ch 3072 0000174E 3C05 <1> cmp al, 5 ; a Pentium or above always will have a FPU 3073 00001750 7350 <1> jae .fpudone 3074 00001752 FE0E[2F0B] <1> dec byte [ has_87 ] ; assume no FPU 3075 00001756 C606[310B]C0 <1> mov byte [encodedmach87], 0C0h 3076 <1> 3077 0000175B DBE3 <1> fninit ; reset FPU 3078 0000175D B0FF <1> mov al, -1 ; initialise with a non-zero value 3079 0000175F 50 <1> push ax 3080 00001760 89E3 <1> mov bx, sp 3081 00001762 36DD3F <1> fnstsw word [ss:bx] ; save FP status word 3082 00001765 58 <1> pop ax ; retrieve it 3083 00001766 84C0 <1> test al, al 3084 00001768 7538 <1> jnz .fpudone ; if no FPU present 3085 <1> 3086 <1> ; al = 0 here 3087 0000176A 50 <1> push ax 3088 0000176B 36D93F <1> fnstcw word [ss:bx] ; save FP control word 3089 0000176E 58 <1> pop ax ; retrieve it 3090 0000176F 253F10 <1> and ax, 103Fh ; see if selected parts look OK 3091 00001772 83F83F <1> cmp ax, byte 3Fh 3092 00001775 752B <1> jne .fpudone ; if no FPU present 3093 00001777 FE06[2F0B] <1> inc byte [ has_87 ] ; there's an FPU 3094 0000177B C606[310B]0C <1> mov byte [encodedmach87], 0Ch 3095 <1> 3096 <1> ; If we're using a 386, check for 287 vs. 387 by checking whether 3097 <1> ; +infinity = -infinity. 3098 00001780 803E[2E0B]03 <1> cmp byte [ machine ], 3 3099 00001785 751B <1> jne .fpudone ; if not a 386 3100 <1> [cpu 386] 3101 00001787 D9E8 <1> fld1 ; must use default control from FNINIT 3102 00001789 D9EE <1> fldz ; form infinity 3103 0000178B DEF9 <1> fdivp ST1 ; 1 / 0 = infinity 3104 0000178D D9C0 <1> fld ST0 3105 0000178F D9E0 <1> fchs ; form negative infinity 3106 00001791 DED9 <1> fcompp ; see if they are the same and remove them 3107 00001793 9BDFE0 <1> fstsw ax 3108 00001796 9E <1> sahf ; look at status from FCOMPP 3109 00001797 7509 <1> jne .fpudone ; if they are different, then it's a 387 3110 00001799 FE0E[300B] <1> dec byte [ mach_87 ] ; otherwise, it's a 287 3111 0000179D C606[310B]C2 <1> mov byte [encodedmach87], 0C2h 3112 <1> __CPU__ 3113 <1> .fpudone: 3114 <1> 3115 <1> apply_patches: 3116 <1> %if _ONLY386 3117 <1> testopt [internalflags], has386 3118 <1> jnz @F ; okay --> 3119 <1> 3120 <1> %if _BOOTLDR && (_APPLICATION || _DEVICE) 3121 <1> testopt [internalflags], nodosloaded 3122 <1> lahf ; remember status 3123 <1> %endif 3124 <1> mov dx, imsg.no386 3125 <1> call init_putsz_cs ; display the error 3126 <1> %if _BOOTLDR && (_APPLICATION || _DEVICE) 3127 <1> sahf 3128 <1> jnz init_booterror.soft ; abort for loader --> 3129 <1> %elif _BOOTLDR 3130 <1> jmp init_booterror.soft 3131 <1> %endif 3132 <1> %if _DEVICE && _APPLICATION 3133 <1> testopt [internalflags6], dif6_device_mode 3134 <1> jnz init_device_error_late 3135 <1> %elif _DEVICE 3136 <1> jmp init_device_error_late 3137 <1> %endif 3138 <1> %if _APPLICATION 3139 <1> mov ax, 4C01h 3140 <1> int 21h ; abort our process 3141 <1> %endif 3142 <1> 3143 <1> @@: 3144 <1> %elif _ONLYNON386 3145 <1> testopt [internalflags], has386 3146 <1> jz @F ; okay --> 3147 <1> mov dx, imsg.386 3148 <1> call init_putsz_cs ; display the warning 3149 <1> @@: 3150 <1> %endif 3151 <1> 3152 <1> ; Determine which patch table to use, then patch 3153 <1> ; out either the 386+ or non-386 code as appropriate. 3154 000017A2 8E06[1001] <1> mov es, [code_seg] 3155 000017A6 F606[D100]80 <1> testopt [internalflags], has386 3156 000017AB 7408 <1> jz @F 3157 000017AD BE[340A] <1> mov si, patch_386_table ; table of patches to set for 386+ 3158 <1> %if __patch_386_table_method == 1 3159 <1> mov cx, patch_386_table_size_w 3160 <1> call .patch1 3161 <1> %else 3162 000017B0 E81A00 <1> call .patch2 3163 <1> %endif 3164 000017B3 EB41 <1> jmp .patch_code1_end 3165 <1> 3166 <1> @@: 3167 <1> %ifn _ONLYNON386 3168 <1> 3169 <1> %if _RUN2_ENTRY_SECTION 3170 000017B5 C606[2246]3E <1> mov byte [..@patch_no386_ds_code_or_entry], 3Eh 3171 <1> ; write a ds prefix 3172 000017BA C606[4746]CF <1> mov byte [..@patch_no386_iret_code_or_entry], 0CFh 3173 <1> ; write an iret instruction 3174 <1> %else 3175 <1> mov byte [es:..@patch_no386_ds_code_or_entry], 3Eh 3176 <1> ; write a ds prefix 3177 <1> mov byte [es:..@patch_no386_iret_code_or_entry], 0CFh 3178 <1> ; write an iret instruction 3179 <1> %endif 3180 <1> %if _PM && _CATCHPMINT214C 3181 <1> mov byte [es:..@patch_no386_ds_2], 3Eh 3182 <1> mov byte [es:..@patch_no386_ds_3], 3Eh 3183 <1> mov byte [ss:..@patch_no386_nop_DATA_ENTRY], 90h 3184 <1> ; write a nop (note the segment!) 3185 <1> %endif 3186 <1> %if _PM && _CATCHPMINT41 3187 <1> mov byte [ss:..@patch_no386_nop_2_DATA_ENTRY], 90h 3188 <1> ; write a nop (note the segment!) 3189 <1> %endif 3190 <1> %if _PM 3191 <1> mov byte [es:..@patch_no386_ds_4], 3Eh 3192 <1> mov byte [es:..@patch_no386_ds_5], 3Eh ; write some more ds prefixes 3193 <1> %endif 3194 <1> %if _CATCHINT07 || _CATCHINT0C || _CATCHINT0D 3195 000017BF 36C606[4145]3E <1> mov byte [ss:..@patch_no386_ds_6_DATA_ENTRY], 3Eh 3196 <1> ; write a ds prefix (note the segment!) 3197 <1> %endif 3198 <1> %endif 3199 000017C5 BE[BC09] <1> mov si, patch_no386_table ; table of patches to set for 16-bit CPU 3200 <1> %if __patch_no386_table_method == 1 3201 <1> mov cx, patch_no386_table_size_w 3202 <1> call .patch1 3203 <1> %else 3204 000017C8 E80200 <1> call .patch2 3205 <1> %endif 3206 000017CB EB29 <1> jmp .patch_code1_end 3207 <1> 3208 <1> ; Complicated table patch code. 3209 <1> %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 3212 <1> .patch2: 3213 000017CD BF[0000] <1> mov di, code_start ; initialise offset 3214 000017D0 31C0 <1> xor ax, ax ; initialise ah 3215 <1> .looppatch2: 3216 000017D2 2EAC <1> cs lodsb 3217 000017D4 01C7 <1> add di, ax ; skip number of bytes to skip 3218 000017D6 3CFF <1> cmp al, 255 ; really repositioning? 3219 000017D8 7504 <1> jne .l2patch ; no --> 3220 000017DA 97 <1> xchg ax, di ; (to preserve ah) 3221 000017DB 2EAD <1> cs lodsw ; ax = new address 3222 000017DD 97 <1> xchg ax, di ; di = new address 3223 <1> .l2patch: 3224 000017DE 2EAC <1> cs lodsb 3225 000017E0 89C1 <1> mov cx, ax ; cx = number of bytes to patch 3226 000017E2 E311 <1> jcxz .patchesdone ; end of table --> 3227 000017E4 B090 <1> mov al, 90h ; patch to NOP 3228 000017E6 F3AA <1> rep stosb ; patch as many bytes as specified 3229 000017E8 EBE8 <1> jmp short .looppatch2 3230 <1> %endif 3231 <1> 3232 <1> ; Simple table patch code. 3233 <1> %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 3236 <1> .patch1: 3237 000017EA E309 <1> jcxz .patchesdone 3238 <1> .looppatch1: 3239 000017EC 2EAD <1> cs lodsw ; load address of patch 3240 000017EE 93 <1> xchg bx, ax ; (set bx = ax, CHG ax) 3241 000017EF 26C60790 <1> mov byte [es:bx], 90h ; patch 3242 000017F3 E2F7 <1> loop .looppatch1 3243 <1> %endif 3244 <1> .patchesdone: 3245 000017F5 C3 <1> retn 3246 <1> 3247 <1> .patch_code1_end: 3248 <1> 3249 <1> %if _DUALCODE 3250 <1> mov dx, es 3251 <1> %if _BOOTLDR_DISCARD 3252 <1> testopt [internalflags], nodosloaded 3253 <1> jnz @F 3254 <1> 3255 <1> %if _AREAS && _AREAS_HOOK_CLIENT 3256 <1> mov ax, ldebug_code_bootldr_truncated_size 3257 <1> mov word [areas_sub + areastrucfunLinearEnd], ax 3258 <1> mov word [areas_fun + areastrucfunLinearEnd], ax 3259 <1> %endif 3260 <1> add dx, ldebug_code_bootldr_truncated_size_p 3261 <1> jmp @FF 3262 <1> @@: 3263 <1> %endif 3264 <1> add dx, ldebug_code_size_p ; untruncated 3265 <1> @@: 3266 <1> mov word [code2_seg], dx 3267 <1> patch_relocate: 3268 <1> 3269 <1> %if ! _PM 3270 <1> mov si, relocate_from_code 3271 <1> mov di, relocate_from_code.end 3272 <1> call .patch 3273 <1> mov si, relocate_from_code2 3274 <1> mov di, relocate_from_code2.end 3275 <1> %endif 3276 <1> push es 3277 <1> mov es, dx 3278 <1> pop dx 3279 <1> %if ! _PM 3280 <1> call .patch 3281 <1> jmp .done 3282 <1> 3283 <1> .loop: 3284 <1> cs lodsw 3285 <1> xchg bx, ax 3286 <1> mov word [es:bx], dx 3287 <1> .patch: 3288 <1> cmp si, di 3289 <1> jb .loop 3290 <1> retn 3291 <1> 3292 <1> .done: 3293 <1> %endif 3294 <1> 3295 <1> testopt [internalflags], has386 3296 <1> jz @F 3297 <1> mov si, patch_386_table2 ; table of patches to set for 386+ 3298 <1> %if __patch_386_table2_method == 1 3299 <1> mov cx, patch_386_table2_size_w 3300 <1> call apply_patches.patch1 3301 <1> %else 3302 <1> call apply_patches.patch2 3303 <1> %endif 3304 <1> jmp .patch_code2_end 3305 <1> 3306 <1> @@: 3307 <1> mov si, patch_no386_table2 ; table of patches to set for 16-bit CPU 3308 <1> %if __patch_no386_table2_method == 1 3309 <1> mov cx, patch_no386_table2_size_w 3310 <1> call apply_patches.patch1 3311 <1> %else 3312 <1> call apply_patches.patch2 3313 <1> %endif 3314 <1> .patch_code2_end: 3315 <1> %endif 3316 <1> 3317 <1> 3318 <1> patch_entry: 3319 <1> %if patch_386_tableentry_size != 0 || patch_no386_tableentry_size != 0 3320 000017F6 1E <1> push ds 3321 000017F7 07 <1> pop es 3322 000017F8 F606[D100]80 <1> testopt [internalflags], has386 3323 000017FD 740B <1> jz @F 3324 000017FF BE[680A] <1> mov si, patch_386_tableentry ; table of patches to set for 386+ 3325 <1> %if __patch_386_tableentry_method == 1 3326 00001802 B90000 <1> mov cx, patch_386_tableentry_size_w 3327 00001805 E8E2FF <1> call apply_patches.patch1 3328 <1> %else 3329 <1> call apply_patches.patch2 3330 <1> %endif 3331 00001808 EB09 <1> jmp .patch_entry_end 3332 <1> 3333 <1> @@: 3334 0000180A BE[4C0A] <1> mov si, patch_no386_tableentry ; table of patches to set for 16-bit CPU 3335 <1> %if __patch_no386_tableentry_method == 1 3336 0000180D B90E00 <1> mov cx, patch_no386_tableentry_size_w 3337 00001810 E8D7FF <1> call apply_patches.patch1 3338 <1> %else 3339 <1> call apply_patches.patch2 3340 <1> %endif 3341 <1> .patch_entry_end: 3342 <1> %endif 3343 <1> 3344 <1> 3345 <1> %if _DEVICE 3346 <1> ; This must be done after CPU detection 3347 <1> ; because we want to get the high parts 3348 <1> ; of the registers only initialised here. 3349 00001813 1E <1> push ds 3350 00001814 07 <1> pop es 3351 00001815 BE[A40C] <1> mov si, regs 3352 00001818 BF[240D] <1> mov di, device_quittable_regs 3353 0000181B B92000 <1> mov cx, words(regs.size) 3354 0000181E F3A5 <1> rep movsw 3355 <1> %endif 3356 <1> 3357 <1> 3358 <1> ; Check for dosemu. This is done for the boot loaded instance 3359 <1> ; too, as we might be running as DOS inside dosemu. 3360 <1> %if _DOSEMU 3361 00001820 B800F0 <1> mov ax, 0F000h 3362 00001823 8EC0 <1> mov es, ax 3363 00001825 1E <1> push ds 3364 00001826 0E <1> push cs 3365 00001827 1F <1> pop ds ; avoid "repe cs cmpsw" (8086 bug) 3366 00001828 BFF5FF <1> mov di, 0FFF5h 3367 0000182B BE[D912] <1> mov si, imsg.dosemudate 3368 0000182E B90400 <1> mov cx, 4 3369 00001831 F3A7 <1> repe cmpsw ; running in DosEmu? 3370 00001833 1F <1> pop ds 3371 00001834 750A <1> jne .dosemuchecked 3372 00001836 800E[D300]01 <1> setopt [internalflags], runningdosemu 3373 <1> %if _DOSEMU_PRESTROKES_HELP 3374 0000183B B80900 <1> mov ax, 0009h 3375 0000183E CDE6 <1> int 0E6h ; run dosemu2 start_pre_strokes function 3376 <1> ; dosemu2 recently gained a feature that tries to avoid 3377 <1> ; a kernel from eating the first text byte of an -input 3378 <1> ; string. However, this interferes with our use because 3379 <1> ; the strokes are only enabled in dos_post_boot (int.c). 3380 <1> ; There is a new int 0E6h helper function now to enable 3381 <1> ; the strokes right away, which is made for lDebug to work 3382 <1> ; when the debugger is booted and wants the input. This 3383 <1> ; is called DOS_HELPER_PRESTROKES_START (also int.c). 3384 <1> ; Reference: https://github.com/dosemu2/dosemu2/issues/2071 3385 <1> %endif 3386 <1> .dosemuchecked: 3387 <1> %endif 3388 <1> 3389 00001840 1E <1> push ds 3390 00001841 07 <1> pop es ; => lDEBUG_DATA_ENTRY 3391 <1> 3392 00001842 BF[0000] <1> mov di, line_in 3393 00001845 B0FF <1> mov al, 255 3394 00001847 AA <1> stosb 3395 00001848 B000 <1> mov al, 0 3396 0000184A AA <1> stosb 3397 0000184B B00D <1> mov al, 13 3398 0000184D AA <1> stosb ; overwrite line_in beginning 3399 <1> 3400 0000184E BC[0010] <1> mov sp, stack_end ; stack pointer (paragraph aligned) 3401 00001851 BF[0804] <1> mov di, ..@init_first 3402 00001854 B9F009 <1> mov cx, ..@init_behind - ..@init_first 3403 00001857 31C0 <1> xor ax, ax 3404 00001859 F3AA <1> rep stosb ; initialise breakpoint lists, line_out 3405 <1> %if 1 3406 <1> ..@init_behind_equate equ ..@init_behind 3407 <1> stack_equate equ stack 3408 <1> %if ..@init_behind_equate != stack_equate 3409 0000185B BF[000E] <1> mov di, stack 3410 <1> %endif 3411 0000185E B90002 <1> mov cx, stack_end - stack 3412 00001861 B05E <1> mov al, 5Eh 3413 00001863 F3AA <1> rep stosb ; initialise the stack 3414 <1> %endif 3415 <1> 3416 00001865 C606[B30A]30 <1> mov byte [ trim_overflow ], '0' ; initialise line_out so the trimputs loop doesn't overflow 3417 0000186A C706[BC0B]4226 <1> mov word [line_out_overflow], 2642h 3418 <1> 3419 <1> 3420 <1> %if _AREAS_HOOK_SERVER 3421 <1> mov ax, ds 3422 <1> mov word [ddebugareas.next + 2], ax 3423 <1> mov word [ddebugareas.prev + 2], ax 3424 <1> mov word [..@patch_entry_seg], ax 3425 <1> %endif 3426 <1> 3427 <1> %if _AREAS && _AREAS_HOOK_CLIENT 3428 <1> mov ax, word [code_seg] 3429 <1> call add_to_areas_linear_code1 3430 <1> 3431 <1> %if _DUALCODE && _EXPRDUALCODE 3432 <1> mov ax, word [code2_seg] 3433 <1> call add_to_areas_linear_code2 3434 <1> %endif 3435 <1> %endif 3436 <1> 3437 <1> 3438 <1> %if _DEBUG && _DEBUG_COND && _DEBUG_COND_DEFAULT_ON 3439 <1> setopt [internalflags6], dif6_debug_mode 3440 <1> setopt [options6], opt6_debug_mode 3441 <1> setopt [startoptions6], opt6_debug_mode 3442 <1> %endif 3443 <1> 3444 <1> %if _CATCHINT06 && _DETECT95LX 3445 00001870 B8D44D <1> mov ax, 4DD4h 3446 00001873 31DB <1> xor bx, bx 3447 00001875 CD15 <1> int 15h ; HP 95LX/100LX/200LX detect 3448 00001877 81FB5048 <1> cmp bx, 4850h ; "HP" reversed 3449 0000187B 7516 <1> jne @F 3450 0000187D 81F90101 <1> cmp cx, 0101h ; 95LX ? 3451 00001881 7510 <1> jne @F ; no --> 3452 <1> 3453 00001883 A1[7F0C] <1> mov ax, word [inttab.i2D + 1] 3454 00001886 A3[7C0C] <1> mov word [inttab.i06 + 1], ax ; overwrite i06 entry with i2D 3455 00001889 A0[7E0C] <1> mov al, byte [inttab.i2D] 3456 0000188C A2[7B0C] <1> mov byte [inttab.i06], al ; interrupt number too 3457 0000188F FF0E[8A0C] <1> dec word [inttab_number_variable] ; remember one less in use 3458 <1> @@: 3459 <1> %endif 3460 <1> 3461 00001893 B40F <1> mov ah, 0Fh 3462 00001895 CD10 <1> int 10h 3463 00001897 883E[550B] <1> mov byte [vpage], bh 3464 <1> 3465 <1> 3466 <1> %if _BOOTLDR 3467 <1> %if _APPLICATION || _DEVICE 3468 0000189B F606[D100]40 <1> testopt [internalflags], nodosloaded 3469 000018A0 7438 <1> jz initdos 3470 <1> %endif 3471 <1> d4 call init_d4message 3472 <1> d4 asciz "386-related patches applied, boot initialisation proceeding",13,10 3473 <1> 3474 <1> 3475 <1> %if CATCHINTAMOUNT 3476 <1> ; Set up interrupt vectors. 3477 <1> 3478 <1> ; ds still => lDEBUG_DATA_ENTRY 3479 <1> %if _CATCHINT06 && _DETECT95LX 3480 000018A2 8B0E[8A0C] <1> mov cx, word [inttab_number_variable] 3481 <1> %else 3482 <1> mov cx, inttab_number 3483 <1> %endif 3484 000018A6 BE[6C0C] <1> mov si, inttab 3485 <1> .bootintloop: 3486 <1> 3487 <1> ; assumes ss = lDEBUG_DATA_ENTRY 3488 000018A9 36AC <1> ss lodsb 3489 000018AB 31DB <1> xor bx, bx 3490 000018AD 8EDB <1> mov ds, bx 3491 000018AF 88C3 <1> mov bl, al 3492 000018B1 01DB <1> add bx, bx 3493 000018B3 01DB <1> add bx, bx 3494 000018B5 97 <1> xchg ax, di 3495 000018B6 36AD <1> ss lodsw ; get address of IISP header 3496 000018B8 97 <1> xchg ax, di 3497 <1> %if _DEBUG && !_DEBUG_COND 3498 <1> ; vectors are set only when debuggee runs 3499 <1> %else 3500 <1> %if _DEBUG 3501 <1> testopt [ss:internalflags6], dif6_debug_mode 3502 <1> jnz @F 3503 <1> %endif 3504 000018B9 FF7702 <1> push word [ bx+2 ] 3505 000018BC FF37 <1> push word [ bx ] ; get vector 3506 000018BE 368F4502 <1> pop word [ ss:di + ieNext ] 3507 000018C2 368F4504 <1> pop word [ ss:di + ieNext + 2 ] 3508 <1> ; store it 3509 000018C6 8C5702 <1> mov word [ bx+2 ], ss 3510 000018C9 893F <1> mov word [ bx ], di ; set interrupt vector 3511 <1> @@: 3512 <1> %endif 3513 000018CB E2DC <1> loop .bootintloop 3514 <1> %endif 3515 <1> 3516 <1> 3517 000018CD 16 <1> push ss 3518 000018CE 1F <1> pop ds 3519 000018CF 16 <1> push ss 3520 000018D0 07 <1> pop es 3521 <1> 3522 <1> d4 call init_d4message 3523 <1> d4 asciz "Jumping to final boot initialisation code",13,10 3524 000018D1 BE[42B7] <1> mov si, initcont.boot_entry 3525 000018D4 FF36[1001] <1> push word [code_seg] 3526 000018D8 56 <1> push si 3527 000018D9 CB <1> retf 3528 <1> %endif 3529 <1> 3530 <1> %if _APPLICATION || _DEVICE 3531 <1> initdos: 3532 <1> %if _MCB || _INT 3533 000018DA B80258 <1> mov ax, 5802h 3534 000018DD CD21 <1> int 21h 3535 000018DF 30E4 <1> xor ah, ah ; some "DOS" only return al 3536 000018E1 50 <1> push ax ; save UMB link 3537 <1> 3538 <1> getfirstmcb: 3539 000018E2 B452 <1> mov ah, 52h ; get list of lists 3540 000018E4 BBFFFF <1> mov bx, -1 3541 000018E7 CD21 <1> int 21h 3542 000018E9 83FBFF <1> cmp bx, -1 3543 000018EC 7503E98800 <1> je mcb_not_found 3544 000018F1 83FB01 <1> cmp bx, 1 3545 000018F4 7503E98000 <1> je mcb_not_found 3546 000018F9 268B47FE <1> mov ax, word [ es:bx-2 ]; start of MCBs 3547 000018FD A3[220B] <1> mov word [firstmcb], ax 3548 <1> 3549 <1> getfirstumcb: 3550 <1> ; We try to get the first UMCB for gateout 3551 <1> ; for now. To harden our code it should 3552 <1> ; not be assumed that the address is of 3553 <1> ; a valid MCB. However, it is fine to 3554 <1> ; compare an actual MCB address with it. 3555 <1> %if _GUARD_86M_INT2F 3556 00001900 06 <1> push es 3557 00001901 31C0 <1> xor ax, ax 3558 00001903 8EC0 <1> mov es, ax ; (only used in 86 Mode) 3559 00001905 26A1BC00 <1> mov ax, [es:2Fh * 4] 3560 00001909 83F8FF <1> cmp ax, -1 3561 0000190C 7405 <1> je @F ; --> (ZR) 3562 0000190E 260B06BE00 <1> or ax, [es:2Fh * 4 + 2] 3563 <1> @@: 3564 00001913 07 <1> pop es 3565 00001914 7414 <1> jz .determine 3566 <1> %endif 3567 00001916 B86112 <1> mov ax, 1261h ; PTS-DOS: Get first UMCB 3568 00001919 F9 <1> stc 3569 0000191A CD2F <1> int 2Fh 3570 0000191C 720C <1> jc .determine ; not supported --> 3571 0000191E 40 <1> inc ax 3572 0000191F 83F802 <1> cmp ax, byte 2 ; -1, 0, 1 ? 3573 00001922 7606 <1> jbe .determine ; not supported (or none) --> 3574 00001924 48 <1> dec ax 3575 00001925 A3[240B] <1> mov word [ firstumcb ], ax ; set UMB 3576 00001928 EB4F <1> jmp short .got ; got it --> 3577 <1> 3578 <1> .determine: 3579 0000192A B80358 <1> mov ax, 5803h 3580 0000192D 31DB <1> xor bx, bx 3581 0000192F CD21 <1> int 21h ; disable UMB link, leave only LMA chain 3582 00001931 7244 <1> jc .none ; that isn't supported either --> 3583 <1> 3584 00001933 A1[220B] <1> mov ax, word [firstmcb] 3585 00001936 1E <1> push ds 3586 00001937 89C2 <1> mov dx, ax ; first MCB 3587 00001939 31DB <1> xor bx, bx ; use offsets from bx, not addresses 3588 <1> .looplmb: 3589 0000193B 8ED8 <1> mov ds, ax 3590 0000193D 40 <1> inc ax 3591 0000193E 034703 <1> add ax, word [ bx + 3 ] ; next MCB's address 3592 00001941 803F4D <1> cmp byte [ bx ], 'M' 3593 00001944 74F5 <1> je .looplmb ; not last --> 3594 00001946 803F5A <1> cmp byte [ bx ], 'Z' 3595 00001949 752D <1> jne .none_pop_ds ; corrupted --> 3596 0000194B 92 <1> xchg ax, dx ; dx = what we assume to be the first UMA chain MCB 3597 <1> ; ax = first MCB 3598 <1> 3599 0000194C 50 <1> push ax 3600 0000194D 43 <1> inc bx ; = 1 3601 0000194E B80358 <1> mov ax, 5803h 3602 00001951 CD21 <1> int 21h ; enable UMB link, include UMA chain 3603 00001953 58 <1> pop ax 3604 00001954 7221 <1> jc .none ; so we can disable it but not enable? --> 3605 <1> 3606 00001956 4B <1> dec bx ; = 0 3607 00001957 31C9 <1> xor cx, cx ; flag if assumed first UMCB found 3608 <1> .loopumb: 3609 00001959 39D0 <1> cmp ax, dx 3610 0000195B 7501 <1> jne .notlastlmb 3611 0000195D 41 <1> inc cx ; there it is 3612 <1> .notlastlmb: 3613 0000195E 8ED8 <1> mov ds, ax 3614 00001960 803F4D <1> cmp byte [ bx ], 'M' 3615 00001963 7506 <1> jne .islastumb? ; last or corrupted --> 3616 00001965 40 <1> inc ax 3617 00001966 034703 <1> add ax, word [ bx + 3 ] 3618 00001969 EBEE <1> jmp short .loopumb ; process next --> 3619 <1> .islastumb?: 3620 0000196B 803F5A <1> cmp byte [ bx ], 'Z' 3621 0000196E 1F <1> pop ds 3622 0000196F 7506 <1> jne .none ; corrupted --> 3623 00001971 E304 <1> jcxz .none ; didn't find that UMCB --> 3624 <1> ; The MCB at dx which was behind the one that contained the 'Z' 3625 <1> ; signature when we disabled the UMB link is now a valid MCB in 3626 <1> ; the MCB chain after we enabled the UMB link. All previous MCBs 3627 <1> ; are now 'M'. 3628 00001973 8916[240B] <1> mov word [ firstumcb ], dx 3629 <1> .none: 3630 00001977 A8 <1> db __TEST_IMM8 ; (skip pop) 3631 <1> .none_pop_ds: 3632 00001978 1F <1> pop ds 3633 <1> .got: 3634 <1> mcb_not_found: 3635 00001979 5B <1> pop bx 3636 0000197A B80358 <1> mov ax, 5803h 3637 0000197D CD21 <1> int 21h ; restore UMB link 3638 <1> %endif 3639 <1> 3640 <1> getindosflag: 3641 0000197F B434 <1> mov ah, 34h 3642 00001981 CD21 <1> int 21h 3643 00001983 891E[260B] <1> mov word [pInDOS + so16aOffset], bx 3644 00001987 8C06[280B] <1> mov word [pInDOS + so16aSegSel], es 3645 <1> %if _PM 3646 <1> mov word [pInDOS + so16aSegment], es 3647 <1> %endif 3648 <1> 3649 <1> ; get address of DOS swappable DATA area 3650 <1> ; to be used to get/set PSP and thus avoid DOS calls 3651 <1> ; will not work for DOS < 3 3652 <1> %if _USESDA 3653 <1> getsda: 3654 0000198B 1E <1> push ds 3655 0000198C B8065D <1> mov ax, 5D06h 3656 0000198F F9 <1> stc ; initialise to CY 3657 00001990 CD21 <1> int 21h 3658 00001992 8CD8 <1> mov ax, ds 3659 00001994 1F <1> pop ds 3660 00001995 7215 <1> jc .noSDA ; if CY returned, not supported --> 3661 00001997 8EC0 <1> mov es, ax ; es:si -> SDA 3662 <1> %if _DEVICE 3663 00001999 50 <1> push ax 3664 0000199A B451 <1> mov ah, 51h 3665 0000199C CD21 <1> int 21h ; bx = current PSP 3666 0000199E 58 <1> pop ax 3667 <1> %else 3668 <1> mov bx, ds ; bx = our PSP (= current PSP in app mode) 3669 <1> %endif 3670 0000199F 26395C10 <1> cmp word [es:si + 10h], bx ; does this seem like the current PSP field ? 3671 000019A3 7507 <1> jne .noSDA ; no --> 3672 000019A5 8936[2A0B] <1> mov word [pSDA + so16aOffset], si 3673 000019A9 A3[2C0B] <1> mov word [pSDA + so16aSegSel], ax 3674 <1> %if _PM 3675 <1> mov word [pSDA + so16aSegment], ax 3676 <1> %endif 3677 <1> .noSDA: 3678 <1> %endif 3679 <1> 3680 000019AC B83135 <1> mov ax, 3531h 3681 000019AF CD21 <1> int 21h 3682 000019B1 8CC3 <1> mov bx, es 3683 <1> %if _USESDA 3684 000019B3 3B1E[2C0B] <1> cmp bx, word [pSDA + so16aSegSel] 3685 000019B7 750B <1> jne @F 3686 <1> %endif 3687 000019B9 3B1E[280B] <1> cmp bx, word [pInDOS + so16aSegSel] 3688 000019BD 7505 <1> jne @F 3689 <1> 3690 000019BF 800E[D700]20 <1> setopt [internalflags2], dif2_int31_segment 3691 <1> @@: 3692 <1> 3693 <1> 3694 <1> commandline: 3695 000019C4 16 <1> push ss 3696 000019C5 07 <1> pop es 3697 <1> 3698 <1> %if _CONFIG 3699 <1> %if _APPLICATION 3700 000019C6 BE[DE10] <1> mov si, imsg.default_cmdline.app 3701 000019C9 B93300 <1> mov cx, words(imsg.default_cmdline.app.length) 3702 <1> %endif 3703 <1> %if _DEVICE 3704 <1> %if _APPLICATION 3705 000019CC F606[E600]40 <1> testopt [internalflags6], dif6_device_mode 3706 000019D1 7406 <1> jz @F 3707 <1> %endif 3708 000019D3 BE[4611] <1> mov si, imsg.default_cmdline.dev 3709 000019D6 B92E00 <1> mov cx, words(imsg.default_cmdline.dev.length) 3710 <1> %endif 3711 <1> @@: 3712 <1> 3713 000019D9 0E <1> push cs 3714 000019DA 1F <1> pop ds 3715 000019DB BF[3001] <1> mov di, cmdline_buffer 3716 000019DE F3A5 <1> rep movsw 3717 000019E0 26807DFF00 <1> cmp byte [es:di - 1], 0 3718 000019E5 7501 <1> jne @F 3719 000019E7 4F <1> dec di 3720 <1> @@: 3721 000019E8 893E[920A] <1> mov [cmdline_buffer_start], di 3722 000019EC B000 <1> mov al, 0 3723 000019EE AA <1> stosb 3724 000019EF 16 <1> push ss 3725 000019F0 1F <1> pop ds 3726 000019F1 800E[D900]01 <1> setopt [internalflags3], dif3_input_cmdline 3727 <1> %endif 3728 <1> 3729 <1> ; Interpret switches and erase them from the command line. 3730 000019F6 B80037 <1> mov ax, 3700h ; get switch character 3731 000019F9 B22F <1> mov dl, '/' ; preset with default value 3732 000019FB CD21 <1> int 21h 3733 000019FD 8816[560B] <1> mov byte [ switchar ], dl 3734 00001A01 80FA2F <1> cmp dl, '/' 3735 00001A04 7504 <1> jne .notslash 3736 00001A06 8816[570B] <1> mov byte [ swch1 ], dl 3737 <1> .notslash: 3738 00001A0A BE8100 <1> mov si, DTA+1 3739 <1> %if _MS_N_COMPAT 3740 00001A0D C644FF30 <1> mov byte [si - 1], '0' ; avoid kk underflow before start of tail 3741 <1> %endif 3742 <1> .blankloop: 3743 00001A11 AC <1> lodsb 3744 00001A12 3C20 <1> cmp al, 32 3745 00001A14 74FB <1> je .blankloop 3746 00001A16 3C09 <1> cmp al, 9 3747 00001A18 74F7 <1> je .blankloop 3748 <1> 3749 <1> ; Process the /? switch (or the [switchar]? switch). 3750 <1> ; If switchar != / and /? occurs, make sure nothing follows. 3751 00001A1A 3A06[560B] <1> cmp al, byte [switchar] 3752 00001A1E 7503E9DB00 <1> je .switch ; if switch character --> 3753 00001A23 3C2F <1> cmp al, '/' 3754 00001A25 7403E94304 <1> jne .noswitches ; if not the help switch --> 3755 00001A2A 8A04 <1> mov al, byte [ si ] 3756 00001A2C 3C3F <1> cmp al, '?' 3757 00001A2E 7403E93A04 <1> jne .noswitches ; if not /? 3758 00001A33 8A4401 <1> mov al, byte [ si+1 ] 3759 00001A36 3C20 <1> cmp al, 32 3760 00001A38 740B <1> je .help ; if nothing after /? 3761 00001A3A 3C09 <1> cmp al, 9 3762 00001A3C 7407 <1> je .help ; ditto 3763 00001A3E 3C0D <1> cmp al, 13 3764 00001A40 7403E92804 <1> jne .noswitches ; if something after /? --> 3765 <1> 3766 <1> ; Print a help message 3767 <1> .help: 3768 00001A45 1E <1> push ds 3769 <1> %if _DEVICE 3770 <1> %if _APPLICATION 3771 00001A46 F606[E600]40 <1> testopt [internalflags6], dif6_device_mode 3772 00001A4B 742A <1> jz .help_not_device 3773 <1> %endif 3774 <1> 3775 <1> ; We modify the device command line here. 3776 <1> ; Is that wise? Seems to work though. 3777 00001A4D 8B36[A80C] <1> mov si, word [reg_ebx] 3778 00001A51 8E1E[C80C] <1> mov ds, word [reg_es] 3779 00001A55 C57412 <1> lds si, [si + 12h] 3780 00001A58 56 <1> push si 3781 <1> @@: 3782 00001A59 AC <1> lodsb 3783 00001A5A 3C20 <1> cmp al, 32 3784 00001A5C 7412 <1> je @F 3785 00001A5E 3C09 <1> cmp al, 9 3786 00001A60 740E <1> je @F 3787 00001A62 3C00 <1> cmp al, 0 3788 00001A64 740A <1> je @F 3789 00001A66 3C0D <1> cmp al, 13 3790 00001A68 7406 <1> je @F 3791 00001A6A 3C0A <1> cmp al, 10 3792 00001A6C 7402 <1> je @F 3793 00001A6E EBE9 <1> jmp @B 3794 <1> 3795 <1> @@: 3796 00001A70 C644FF00 <1> mov byte [si - 1], 0 3797 00001A74 5E <1> pop si 3798 00001A75 EB1B <1> jmp .help_common 3799 <1> 3800 <1> .help_not_device: 3801 <1> %endif 3802 <1> %if _APPLICATION 3803 00001A77 A12C00 <1> mov ax, word [2Ch] ; => environment 3804 00001A7A 85C0 <1> test ax, ax 3805 00001A7C 7476 <1> jz .help.no_name 3806 00001A7E 8ED8 <1> mov ds, ax 3807 00001A80 31F6 <1> xor si, si 3808 <1> @@: 3809 00001A82 AC <1> lodsb 3810 00001A83 84C0 <1> test al, al 3811 00001A85 75FB <1> jnz @B 3812 00001A87 AC <1> lodsb 3813 00001A88 84C0 <1> test al, al 3814 00001A8A 75F6 <1> jnz @B 3815 00001A8C AD <1> lodsw 3816 00001A8D 83F801 <1> cmp ax, 1 3817 00001A90 7562 <1> jne .help.no_name 3818 <1> %endif 3819 <1> .help_common: 3820 <1> @@: 3821 00001A92 89F3 <1> mov bx, si 3822 <1> @@: 3823 00001A94 AC <1> lodsb 3824 00001A95 3C61 <1> cmp al, 'a' 3825 00001A97 7208 <1> jb @F 3826 00001A99 3C7A <1> cmp al, 'z' 3827 00001A9B 7704 <1> ja @F 3828 00001A9D 806CFF20 <1> sub byte [si - 1], 'a' - 'A' 3829 <1> @@: 3830 00001AA1 3C5C <1> cmp al, '\' 3831 00001AA3 74ED <1> je @BBB 3832 00001AA5 3C2F <1> cmp al, '/' 3833 00001AA7 74E9 <1> je @BBB 3834 00001AA9 84C0 <1> test al, al 3835 00001AAB 75E7 <1> jnz @BB 3836 <1> 3837 00001AAD 89F1 <1> mov cx, si 3838 00001AAF 49 <1> dec cx 3839 00001AB0 29D9 <1> sub cx, bx 3840 <1> 3841 <1> @@: 3842 00001AB2 4E <1> dec si 3843 00001AB3 39DE <1> cmp si, bx 3844 00001AB5 7209 <1> jb @F 3845 00001AB7 803C2E <1> cmp byte [si], '.' 3846 00001ABA 75F6 <1> jne @B 3847 <1> 3848 00001ABC 89F1 <1> mov cx, si 3849 00001ABE 29D9 <1> sub cx, bx 3850 <1> @@: 3851 00001AC0 E332 <1> jcxz .help.no_name 3852 <1> @@: 3853 00001AC2 BA[980C] <1> mov dx, imsg.help.1 ; command-line help message 3854 00001AC5 E8D2F9 <1> call init_putsz_cs 3855 00001AC8 BA[E80C] <1> mov dx, imsg.help.1a 3856 00001ACB E8CCF9 <1> call init_putsz_cs 3857 00001ACE 53 <1> push bx 3858 00001ACF 89DA <1> mov dx, bx 3859 00001AD1 E80AFA <1> call init_puts_ds 3860 00001AD4 BA[F20C] <1> mov dx, imsg.help.2 3861 00001AD7 E8C0F9 <1> call init_putsz_cs 3862 00001ADA 5A <1> pop dx 3863 00001ADB E800FA <1> call init_puts_ds 3864 00001ADE BA[5710] <1> mov dx, imsg.help.3 3865 00001AE1 E8B6F9 <1> call init_putsz_cs 3866 00001AE4 1F <1> pop ds 3867 <1> %if _DEVICE && _APPLICATION 3868 00001AE5 F606[E600]40 <1> testopt [internalflags6], dif6_device_mode 3869 00001AEA 7403E94EEE <1> jnz init_device_error_late 3870 <1> %elif _DEVICE 3871 <1> jmp init_device_error_late 3872 <1> %endif 3873 <1> %if _APPLICATION 3874 00001AEF B8004C <1> mov ax, 4C00h 3875 00001AF2 CD21 <1> int 21h ; done 3876 <1> %endif 3877 <1> 3878 <1> .help.no_name: 3879 00001AF4 0E <1> push cs 3880 00001AF5 1F <1> pop ds 3881 00001AF6 BB[920C] <1> mov bx, imsg.help.defaultfilename 3882 00001AF9 B90500 <1> mov cx, imsg.help.defaultfilename.length 3883 00001AFC EBC4 <1> jmp @B 3884 <1> 3885 <1> 3886 <1> ; Do the (proper) switches. 3887 00001AFE AC <1> .switch:lodsb 3888 00001AFF 3C3F <1> cmp al,'?' 3889 00001B01 7503E93FFF <1> je .help ; if -? 3890 00001B06 E87A06 <1> call init_uppercase 3891 <1> %if _CONFIG 3892 00001B09 3C49 <1> cmp al, 'I' 3893 00001B0B 745E <1> je .switch_i 3894 <1> %endif 3895 00001B0D 3C43 <1> cmp al, 'C' 3896 00001B0F 747B <1> je .switch_c 3897 00001B11 3C50 <1> cmp al, 'P' 3898 00001B13 7503E9E600 <1> je .switch_p 3899 00001B18 3C46 <1> cmp al, 'F' 3900 00001B1A 7503E97A01 <1> je .switch_f 3901 00001B1F 3C45 <1> cmp al, 'E' 3902 00001B21 7503E9A301 <1> je .switch_e 3903 00001B26 3C42 <1> cmp al, 'B' 3904 00001B28 7503E9C800 <1> je .switch_b 3905 00001B2D 3C41 <1> cmp al, 'A' 3906 00001B2F 7503E98602 <1> je .switch_a 3907 <1> %if _VXCHG 3908 00001B34 3C56 <1> cmp al, 'V' 3909 00001B36 7503E9BB01 <1> je .switch_v 3910 <1> %endif 3911 <1> %if _ALTVID 3912 00001B3B 3C32 <1> cmp al, '2' 3913 00001B3D 7503E9EE01 <1> je .switch_2 3914 <1> %endif 3915 <1> %if _MCLOPT 3916 <1> cmp al, 'M' 3917 <1> je .switch_m 3918 <1> %endif 3919 <1> 3920 <1> %if _SYMBOLIC 3921 <1> cmp al, 'S' 3922 <1> je .switch_s 3923 <1> %endif 3924 <1> 3925 <1> %if 1 || (_DEBUG && _DEBUG_COND) 3926 00001B42 3C44 <1> cmp al, 'D' 3927 00001B44 7503E9DA01 <1> je .switch_d 3928 <1> %endif 3929 <1> 3930 <1> ; Other switches may go here. 3931 00001B49 2EA2[BE10] <1> mov [ cs:imsg.invalidswitch_a ], al 3932 00001B4D BA[AD10] <1> mov dx, imsg.invalidswitch ; Invalid switch 3933 <1> ..@init_cmdline_error: 3934 00001B50 E847F9 <1> call init_putsz_cs ; print string 3935 <1> %if _DEVICE && _APPLICATION 3936 00001B53 F606[E600]40 <1> testopt [internalflags6], dif6_device_mode 3937 00001B58 7403E9E0ED <1> jnz init_device_error_late 3938 <1> %elif _DEVICE 3939 <1> jmp init_device_error_late 3940 <1> %endif 3941 <1> %if _APPLICATION 3942 00001B5D B8014C <1> mov ax, 4C01h ; Quit and return error status 3943 00001B60 CD21 <1> int 21h 3944 <1> %endif 3945 <1> 3946 <1> ..@init_cmdline_switch_error: 3947 00001B62 2EA2[CA10] <1> mov byte [cs:imsg.switch_x_error_a], al 3948 00001B66 BA[C210] <1> mov dx, imsg.switch_x_error 3949 00001B69 EBE5 <1> jmp ..@init_cmdline_error 3950 <1> 3951 <1> 3952 <1> %if _CONFIG 3953 <1> .switch_i: 3954 00001B6B AC <1> lodsb 3955 00001B6C 3C4E <1> cmp al, 'N' 3956 00001B6E 7408 <1> je @F 3957 00001B70 3C6E <1> cmp al, 'n' 3958 00001B72 7404 <1> je @F 3959 00001B74 B049 <1> mov al, 'I' 3960 00001B76 EBEA <1> jmp ..@init_cmdline_switch_error 3961 <1> 3962 <1> @@: 3963 00001B78 8026[D900]FE <1> clropt [internalflags3], dif3_input_cmdline 3964 00001B7D C606[3001]00 <1> mov byte [cmdline_buffer], 0 3965 00001B82 2EC706[920A][3001] <1> mov word [cs:cmdline_buffer_start], cmdline_buffer 3966 00001B89 E985FE <1> jmp .blankloop 3967 <1> %endif 3968 <1> 3969 <1> .switch_c: 3970 <1> @@: 3971 00001B8C AC <1> lodsb 3972 00001B8D 3C3D <1> cmp al, '=' 3973 00001B8F 74FB <1> je @B 3974 00001B91 3C3A <1> cmp al, ':' 3975 00001B93 74F7 <1> je @B 3976 <1> 3977 00001B95 2E8B3E[920A] <1> mov di, [cs:cmdline_buffer_start] 3978 00001B9A B400 <1> mov ah, 0 ; initialise to 0 = unquoted 3979 00001B9C A9 <1> db __TEST_IMM16 3980 <1> .switch_c_loop: 3981 00001B9D AA <1> stosb 3982 <1> .switch_c_quoted: 3983 00001B9E AC <1> lodsb 3984 <1> .switch_c_loop_after_semicolon: 3985 <1> 3986 00001B9F 3C0D <1> cmp al, 13 3987 00001BA1 7442 <1> je .switch_c_eol 3988 00001BA3 38E0 <1> cmp al, ah ; close quote mark ? 3989 00001BA5 7508 <1> jne @F ; no --> 3990 00001BA7 3C00 <1> cmp al, 0 3991 00001BA9 743A <1> je .switch_c_eol 3992 00001BAB B400 <1> mov ah, 0 ; continue unquoted 3993 00001BAD EBEF <1> jmp .switch_c_quoted ; and load next character --> 3994 <1> 3995 <1> @@: 3996 00001BAF 84E4 <1> test ah, ah ; currently quoted ? 3997 00001BB1 7514 <1> jnz .switch_c_not_blank ; yes --> 3998 <1> 3999 00001BB3 3C22 <1> cmp al, '"' ; open quote mark ? 4000 00001BB5 7404 <1> je @F 4001 00001BB7 3C27 <1> cmp al, "'" 4002 00001BB9 7504 <1> jne @FF ; no --> 4003 <1> @@: 4004 00001BBB 88C4 <1> mov ah, al ; remember quoted state 4005 00001BBD EBDF <1> jmp .switch_c_quoted ; and load next character --> 4006 <1> 4007 <1> @@: 4008 00001BBF 3C20 <1> cmp al, 32 ; blank while unquoted ? 4009 00001BC1 7426 <1> je .unquoted_blank 4010 00001BC3 3C09 <1> cmp al, 9 4011 00001BC5 7422 <1> je .unquoted_blank ; yes --> 4012 <1> .switch_c_not_blank: 4013 00001BC7 3C3B <1> cmp al, ';' ; unescaped semicolon ? 4014 00001BC9 750C <1> jne .switch_c_not_semicolon 4015 00001BCB B00D <1> mov al, 13 ; yes, replace by CR 4016 00001BCD AA <1> stosb 4017 00001BCE 84E4 <1> test ah, ah 4018 00001BD0 74CC <1> jz .switch_c_quoted 4019 00001BD2 E8A204 <1> call init_skipwhite 4020 00001BD5 EBC8 <1> jmp .switch_c_loop_after_semicolon 4021 <1> 4022 <1> .switch_c_not_semicolon: 4023 00001BD7 3C5C <1> cmp al, '\' ; escape ? 4024 00001BD9 75C2 <1> jne .switch_c_loop ; no, store literal --> 4025 00001BDB AC <1> lodsb ; load escaped character 4026 <1> ; (may be backslash, semicolon, quote) 4027 00001BDC 3C0D <1> cmp al, 13 ; guard against EOL 4028 00001BDE 75BD <1> jne .switch_c_loop 4029 <1> .switch_c_error: 4030 00001BE0 B043 <1> mov al, 'C' 4031 00001BE2 E97DFF <1> jmp ..@init_cmdline_switch_error 4032 <1> 4033 <1> .switch_c_eol: 4034 00001BE5 84E4 <1> test ah, ah ; in quoted state ? 4035 00001BE7 75F7 <1> jnz .switch_c_error ; yes, error --> 4036 <1> .unquoted_blank: 4037 00001BE9 B000 <1> mov al, 0 4038 00001BEB AA <1> stosb ; terminate command line buffer 4039 00001BEC 800E[D900]01 <1> setopt [internalflags3], dif3_input_cmdline 4040 00001BF1 4E <1> dec si 4041 00001BF2 E91CFE <1> jmp .blankloop 4042 <1> 4043 <1> 4044 <1> .switch_b: 4045 00001BF5 2EC606[6D1E]CC <1> mov byte [cs:.breakpoint], 0CCh ; SMC in section init, set point 4046 00001BFB E913FE <1> jmp .blankloop 4047 <1> 4048 <1> 4049 <1> .switch_p: 4050 00001BFE AC <1> lodsb 4051 00001BFF E88105 <1> call init_uppercase 4052 00001C02 BBFFFF <1> mov bx, 0FFFFh ; or 0FFFFh 4053 00001C05 89DA <1> mov dx, bx ; and 0FFFFh 4054 00001C07 4E <1> dec si 4055 00001C08 3C20 <1> cmp al, 32 4056 00001C0A 7478 <1> je @F 4057 00001C0C 3C09 <1> cmp al, 9 4058 00001C0E 7474 <1> je @F 4059 00001C10 3C0D <1> cmp al, 13 4060 00001C12 7470 <1> je @F 4061 00001C14 46 <1> inc si 4062 00001C15 3C2B <1> cmp al, '+' 4063 00001C17 746B <1> je @F 4064 00001C19 42 <1> inc dx ; and 0000h 4065 00001C1A 3C2D <1> cmp al, '-' 4066 00001C1C 7466 <1> je @F 4067 <1> 4068 <1> .switch_p_not_plusminus: 4069 00001C1E 3C53 <1> cmp al, 'S' 4070 00001C20 751E <1> jne .switch_p_not_s 4071 00001C22 B700 <1> mov bh, 00h ; or 0FFh 4072 00001C24 4A <1> dec dx ; and 0FFFFh 4073 00001C25 AC <1> lodsb 4074 00001C26 4E <1> dec si 4075 00001C27 3C20 <1> cmp al, 32 4076 00001C29 7459 <1> je @F 4077 00001C2B 3C09 <1> cmp al, 9 4078 00001C2D 7455 <1> je @F 4079 00001C2F 3C0D <1> cmp al, 13 4080 00001C31 7451 <1> je @F 4081 00001C33 46 <1> inc si 4082 00001C34 3C2B <1> cmp al, '+' 4083 00001C36 744C <1> je @F 4084 00001C38 B200 <1> mov dl, 00h ; and 0FF00h 4085 00001C3A 3C2D <1> cmp al, '-' 4086 00001C3C 7446 <1> je @F 4087 00001C3E EB3F <1> jmp .switch_p_error 4088 <1> 4089 <1> .switch_p_not_s: 4090 00001C40 3C45 <1> cmp al, 'E' 4091 00001C42 751E <1> jne .switch_p_not_e 4092 00001C44 B300 <1> mov bl, 00h ; or 0FF00h 4093 00001C46 4A <1> dec dx ; and 0FFFFh 4094 00001C47 AC <1> lodsb 4095 00001C48 4E <1> dec si 4096 00001C49 3C20 <1> cmp al, 32 4097 00001C4B 7437 <1> je @F 4098 00001C4D 3C09 <1> cmp al, 9 4099 00001C4F 7433 <1> je @F 4100 00001C51 3C0D <1> cmp al, 13 4101 00001C53 742F <1> je @F 4102 00001C55 46 <1> inc si 4103 00001C56 3C2B <1> cmp al, '+' 4104 00001C58 742A <1> je @F 4105 00001C5A B600 <1> mov dh, 00h ; and 00FFh 4106 00001C5C 3C2D <1> cmp al, '-' 4107 00001C5E 7424 <1> je @F 4108 00001C60 EB1D <1> jmp .switch_p_error 4109 <1> 4110 <1> .switch_p_not_e: 4111 00001C62 3C57 <1> cmp al, 'W' 4112 00001C64 7519 <1> jne .switch_p_not_w 4113 <1> ; bl = 0FFh 4114 00001C66 AC <1> lodsb 4115 00001C67 4E <1> dec si 4116 00001C68 3C20 <1> cmp al, 32 4117 00001C6A 7425 <1> je @FF 4118 00001C6C 3C09 <1> cmp al, 9 4119 00001C6E 7421 <1> je @FF 4120 00001C70 3C0D <1> cmp al, 13 4121 00001C72 741D <1> je @FF 4122 00001C74 46 <1> inc si 4123 00001C75 3C2B <1> cmp al, '+' 4124 00001C77 7418 <1> je @FF 4125 00001C79 B300 <1> mov bl, 00h 4126 00001C7B 3C2D <1> cmp al, '-' 4127 00001C7D 7412 <1> je @FF 4128 <1> ; jmp .switch_p_error 4129 <1> 4130 <1> .switch_p_not_w: 4131 <1> .switch_p_error: 4132 00001C7F B050 <1> mov al, 'P' 4133 00001C81 E9DEFE <1> jmp ..@init_cmdline_switch_error 4134 <1> @@: 4135 00001C84 2E091E[980A] <1> or [cs:init_switch_p_low_pathsearch_high_guessextension], bx 4136 00001C89 2E2116[980A] <1> and [cs:init_switch_p_low_pathsearch_high_guessextension], dx 4137 00001C8E E980FD <1> jmp .blankloop 4138 <1> 4139 <1> @@: 4140 00001C91 2E881E[A50A] <1> mov [cs:init_switch_pw], bl 4141 00001C96 E978FD <1> jmp .blankloop 4142 <1> 4143 <1> 4144 <1> .switch_f: 4145 00001C99 AC <1> lodsb 4146 00001C9A BB000C <1> mov bx, opt6_flat_binary + opt6_big_stack 4147 00001C9D 4E <1> dec si 4148 00001C9E 3C20 <1> cmp al, 32 4149 00001CA0 741B <1> je @F 4150 00001CA2 3C09 <1> cmp al, 9 4151 00001CA4 7417 <1> je @F 4152 00001CA6 3C0D <1> cmp al, 13 4153 00001CA8 7413 <1> je @F 4154 00001CAA BB0004 <1> mov bx, opt6_flat_binary 4155 00001CAD 46 <1> inc si 4156 00001CAE 3C2B <1> cmp al, '+' 4157 00001CB0 740B <1> je @F 4158 00001CB2 31DB <1> xor bx, bx 4159 00001CB4 3C2D <1> cmp al, '-' 4160 00001CB6 7405 <1> je @F 4161 <1> .switch_f_error: 4162 00001CB8 B046 <1> mov al, 'F' 4163 00001CBA E9A5FE <1> jmp ..@init_cmdline_switch_error 4164 <1> @@: 4165 00001CBD 8026[B500]FB <1> clropt [options6], opt6_flat_binary 4166 00001CC2 091E[B400] <1> or word [options6], bx 4167 00001CC6 E948FD <1> jmp .blankloop 4168 <1> 4169 <1> .switch_e: 4170 00001CC9 AC <1> lodsb 4171 00001CCA BB0008 <1> mov bx, opt6_big_stack 4172 00001CCD 4E <1> dec si 4173 00001CCE 3C20 <1> cmp al, 32 4174 00001CD0 7418 <1> je @F 4175 00001CD2 3C09 <1> cmp al, 9 4176 00001CD4 7414 <1> je @F 4177 00001CD6 3C0D <1> cmp al, 13 4178 00001CD8 7410 <1> je @F 4179 00001CDA 46 <1> inc si 4180 00001CDB 3C2B <1> cmp al, '+' 4181 00001CDD 740B <1> je @F 4182 00001CDF 31DB <1> xor bx, bx 4183 00001CE1 3C2D <1> cmp al, '-' 4184 00001CE3 7405 <1> je @F 4185 <1> .switch_e_error: 4186 00001CE5 B045 <1> mov al, 'E' 4187 00001CE7 E978FE <1> jmp ..@init_cmdline_switch_error 4188 <1> @@: 4189 00001CEA 8026[B500]F7 <1> clropt [options6], opt6_big_stack 4190 00001CEF 091E[B400] <1> or word [options6], bx 4191 00001CF3 E91BFD <1> jmp .blankloop 4192 <1> 4193 <1> %if _MCLOPT 4194 <1> .switch_m: 4195 <1> lodsb 4196 <1> mov bl, 20h 4197 <1> dec si 4198 <1> cmp al, 32 4199 <1> je @F 4200 <1> cmp al, 9 4201 <1> je @F 4202 <1> cmp al, 13 4203 <1> je @F 4204 <1> inc si 4205 <1> cmp al, '+' 4206 <1> je @F 4207 <1> mov bl, 8 4208 <1> cmp al, '-' 4209 <1> je @F 4210 <1> .switch_m_error: 4211 <1> mov al, 'M' 4212 <1> jmp ..@init_cmdline_switch_error 4213 <1> @@: 4214 <1> mov byte [master_pic_base], bl 4215 <1> jmp .blankloop 4216 <1> %endif 4217 <1> 4218 <1> %if _VXCHG 4219 <1> .switch_v: 4220 00001CF6 AC <1> lodsb 4221 00001CF7 BB0100 <1> mov bx, opt6_vv_mode 4222 00001CFA 4E <1> dec si 4223 00001CFB 3C20 <1> cmp al, 32 4224 00001CFD 7418 <1> je @F 4225 00001CFF 3C09 <1> cmp al, 9 4226 00001D01 7414 <1> je @F 4227 00001D03 3C0D <1> cmp al, 13 4228 00001D05 7410 <1> je @F 4229 00001D07 46 <1> inc si 4230 00001D08 3C2B <1> cmp al, '+' 4231 00001D0A 740B <1> je @F 4232 00001D0C 31DB <1> xor bx, bx 4233 00001D0E 3C2D <1> cmp al, '-' 4234 00001D10 7405 <1> je @F 4235 <1> .switch_v_error: 4236 00001D12 B056 <1> mov al, 'V' 4237 00001D14 E94BFE <1> jmp ..@init_cmdline_switch_error 4238 <1> @@: 4239 00001D17 8026[B400]FE <1> clropt [options6], opt6_vv_mode 4240 00001D1C 091E[B400] <1> or word [options6], bx 4241 00001D20 E9EEFC <1> jmp .blankloop 4242 <1> %endif 4243 <1> 4244 <1> %if _DEBUG && _DEBUG_COND 4245 <1> .switch_d: 4246 <1> lodsb 4247 <1> mov bx, dif6_debug_mode 4248 <1> dec si 4249 <1> cmp al, 32 4250 <1> je @F 4251 <1> cmp al, 9 4252 <1> je @F 4253 <1> cmp al, 13 4254 <1> je @F 4255 <1> inc si 4256 <1> cmp al, '+' 4257 <1> je @F 4258 <1> xor bx, bx 4259 <1> cmp al, '-' 4260 <1> je @F 4261 <1> .switch_d_error: 4262 <1> mov al, 'D' 4263 <1> jmp ..@init_cmdline_switch_error 4264 <1> @@: 4265 <1> clropt [internalflags6], dif6_debug_mode 4266 <1> clropt [options6], opt6_debug_mode 4267 <1> or word [internalflags6], bx 4268 <1> or word [options6], bx 4269 <1> %if dif6_debug_mode != opt6_debug_mode 4270 <1> %error Mismatch of flag and option 4271 <1> %endif 4272 <1> jmp .blankloop 4273 <1> %else 4274 <1> .switch_d: 4275 00001D23 AC <1> lodsb 4276 <1> %if _DEBUG 4277 <1> dec si 4278 <1> cmp al, 32 4279 <1> je @F 4280 <1> cmp al, 9 4281 <1> je @F 4282 <1> cmp al, 13 4283 <1> je @F 4284 <1> inc si 4285 <1> cmp al, '+' 4286 <1> @@: 4287 <1> %else 4288 00001D24 3C2D <1> cmp al, '-' 4289 <1> %endif 4290 00001D26 7503E9E6FC <1> je .blankloop 4291 00001D2B B044 <1> mov al, 'D' 4292 00001D2D E932FE <1> jmp ..@init_cmdline_switch_error 4293 <1> %endif 4294 <1> 4295 <1> 4296 <1> %if _ALTVID 4297 <1> .switch_2: 4298 00001D30 AC <1> lodsb 4299 00001D31 B31E <1> mov bl, 1Eh ; "push ds" 4300 00001D33 4E <1> dec si 4301 00001D34 3C20 <1> cmp al, 32 4302 00001D36 7418 <1> je @F 4303 00001D38 3C09 <1> cmp al, 9 4304 00001D3A 7414 <1> je @F 4305 00001D3C 3C0D <1> cmp al, 13 4306 00001D3E 7410 <1> je @F 4307 00001D40 46 <1> inc si 4308 00001D41 3C2B <1> cmp al, '+' 4309 00001D43 740B <1> je @F 4310 00001D45 B3C3 <1> mov bl, 0C3h ; "retn" 4311 00001D47 3C2D <1> cmp al, '-' 4312 00001D49 7405 <1> je @F 4313 <1> .switch_2_error: 4314 00001D4B B032 <1> mov al, '2' 4315 00001D4D E912FE <1> jmp ..@init_cmdline_switch_error 4316 <1> @@: 4317 00001D50 8E06[1001] <1> mov es, [code_seg] 4318 00001D54 26881E[1147] <1> mov byte [es:setscreen], bl 4319 00001D59 16 <1> push ss 4320 00001D5A 07 <1> pop es 4321 00001D5B 80FBC3 <1> cmp bl, 0C3h 4322 00001D5E 7445 <1> je .noaltvid 4323 00001D60 B8001A <1> mov ax, 1A00h 4324 00001D63 CD10 <1> int 10h 4325 00001D65 3C1A <1> cmp al, 1Ah 4326 00001D67 753C <1> jnz .noaltvid 4327 00001D69 80FF00 <1> cmp bh, 0 4328 00001D6C 7437 <1> jz .noaltvid 4329 <1> 4330 00001D6E 1E <1> push ds 4331 00001D6F B84000 <1> mov ax, 40h 4332 00001D72 8ED8 <1> mov ds, ax 4333 00001D74 8B166300 <1> mov dx, [63h] 4334 00001D78 1F <1> pop ds 4335 00001D79 80F260 <1> xor dl, 60h 4336 00001D7C 8916[4D0B] <1> mov [oldcrtp], dx 4337 00001D80 B007 <1> mov al, 7 4338 00001D82 80FAB4 <1> cmp dl, 0B4h 4339 00001D85 7402 <1> jz @F 4340 00001D87 B003 <1> mov al, 3 4341 <1> @@: 4342 00001D89 A2[510B] <1> mov [oldmode], al 4343 00001D8C B00E <1> mov al, 0Eh 4344 00001D8E EE <1> out dx, al 4345 00001D8F 42 <1> inc dx 4346 00001D90 EC <1> in al, dx 4347 00001D91 88C4 <1> mov ah, al 4348 00001D93 4A <1> dec dx 4349 00001D94 B00F <1> mov al, 0Fh 4350 00001D96 EE <1> out dx, al 4351 00001D97 42 <1> inc dx 4352 00001D98 EC <1> in al, dx 4353 00001D99 B350 <1> mov bl, 80 4354 00001D9B F6F3 <1> div bl 4355 00001D9D 86C4 <1> xchg al, ah 4356 00001D9F A3[4B0B] <1> mov [oldcsrpos], ax 4357 00001DA2 E96CFC <1> jmp .blankloop 4358 <1> 4359 <1> .noaltvid: 4360 00001DA5 BA[5A0C] <1> mov dx, imsg.noaltvid 4361 00001DA8 E8EFF6 <1> call init_putsz_cs 4362 00001DAB 8E06[1001] <1> mov es, [code_seg] 4363 00001DAF 26C606[1147]C3 <1> mov byte [es:setscreen], 0C3h 4364 00001DB5 16 <1> push ss 4365 00001DB6 07 <1> pop es 4366 00001DB7 E957FC <1> jmp .blankloop 4367 <1> %endif 4368 <1> 4369 <1> 4370 <1> %if _SYMBOLIC 4371 <1> .switch_s: 4372 <1> mov dx, si 4373 <1> lodsb 4374 <1> mov ah, 0 ; flag for not quoted 4375 <1> cmp al, '"' 4376 <1> je .s_quoted 4377 <1> cmp al, "'" 4378 <1> jne .s_unquoted 4379 <1> .s_quoted: 4380 <1> mov ah, al ; save away our quote mark 4381 <1> inc dx ; -> behind the quote mark 4382 <1> @@: 4383 <1> lodsb 4384 <1> cmp al, 13 4385 <1> je .switch_s_error 4386 <1> cmp al, 0 4387 <1> je .switch_s_error 4388 <1> cmp al, ah ; closing quote mark ? 4389 <1> jne @B ; not yet --> 4390 <1> jmp .s_end 4391 <1> 4392 <1> db __TEST_IMM8 ; (skip lodsb) 4393 <1> @@: 4394 <1> lodsb 4395 <1> .s_unquoted: 4396 <1> cmp al, 32 4397 <1> ja @B 4398 <1> 4399 <1> .s_end: 4400 <1> dec si ; -> blank or terminator or closing quote 4401 <1> push ax 4402 <1> push si 4403 <1> mov byte [si], 13 ; put in a CR for good measure 4404 <1> mov si, dx 4405 <1> 4406 <1> push word [errret] 4407 <1> push word [throwret] 4408 <1> push word [throwsp] 4409 <1> 4410 <1> push cs 4411 <1> call .jump 4412 <1> 4413 <1> pop word [throwsp] 4414 <1> pop word [throwret] ; restore throw destination 4415 <1> pop word [errret] 4416 <1> pop si 4417 <1> pop ax 4418 <1> mov byte [si], al ; restore if it wasn't CR 4419 <1> ; si -> next character to process 4420 <1> test dx, dx 4421 <1> jz @F 4422 <1> 4423 <1> cmp dx, si 4424 <1> je @F 4425 <1> 4426 <1> mov dx, imsg.switch_s_garbage 4427 <1> call init_putsz_cs 4428 <1> 4429 <1> @@: 4430 <1> test ah, ah ; was quoted ? 4431 <1> jz @F ; no --> 4432 <1> inc si ; skip closing quote mark 4433 <1> @@: 4434 <1> jmp .blankloop 4435 <1> 4436 <1> .switch_s_error: 4437 <1> mov al, 'S' 4438 <1> jmp ..@init_cmdline_switch_error 4439 <1> 4440 <1> .jump: 4441 <1> mov word [errret], ..@switch_s_catch 4442 <1> mov word [throwret], ..@switch_s_catch 4443 <1> mov word [throwsp], sp 4444 <1> 4445 <1> mov ax, ..@switch_s_cont 4446 <1> push word [code_seg] 4447 <1> push ax 4448 <1> retf 4449 <1> %endif 4450 <1> 4451 <1> 4452 <1> usesection INIT 4453 <1> .switch_a: 4454 00001DBA BB0060 <1> mov bx, _AUXBUFFMAXSIZE 4455 00001DBD AC <1> lodsb 4456 00001DBE 3C09 <1> cmp al, 9 4457 00001DC0 7503E99D00 <1> je .switch_a_got 4458 00001DC5 3C20 <1> cmp al, 32 4459 00001DC7 7503E99600 <1> je .switch_a_got 4460 00001DCC 3C0D <1> cmp al, 13 4461 00001DCE 7503E98F00 <1> je .switch_a_got 4462 00001DD3 3C3A <1> cmp al, ':' 4463 00001DD5 7404 <1> je @F 4464 00001DD7 3C3D <1> cmp al, '=' 4465 00001DD9 7501 <1> jne @FF 4466 <1> @@: 4467 00001DDB AC <1> lodsb 4468 <1> @@: 4469 00001DDC 4E <1> dec si 4470 00001DDD 0E <1> push cs 4471 00001DDE 07 <1> pop es 4472 00001DDF BA[BB0A] <1> mov dx, imsg.max 4473 00001DE2 E84903 <1> call init_isstring? 4474 00001DE5 747A <1> je .switch_a_got.lodsb 4475 00001DE7 BB1020 <1> mov bx, _AUXBUFFSIZE 4476 00001DEA BA[BF0A] <1> mov dx, imsg.min 4477 00001DED E83E03 <1> call init_isstring? 4478 00001DF0 746F <1> je .switch_a_got.lodsb 4479 <1> 4480 00001DF2 BA1000 <1> mov dx, 16 4481 00001DF5 803C23 <1> cmp byte [si], '#' 4482 00001DF8 7503 <1> jne .switch_a_zero 4483 00001DFA 46 <1> inc si 4484 00001DFB B20A <1> mov dl, 10 4485 <1> .switch_a_zero: 4486 00001DFD 31DB <1> xor bx, bx 4487 <1> .switch_a_num: 4488 00001DFF AC <1> lodsb 4489 00001E00 3C20 <1> cmp al, 32 ; end of number ? 4490 00001E02 7450 <1> je .switch_a_check 4491 00001E04 3C09 <1> cmp al, 9 4492 00001E06 744C <1> je .switch_a_check 4493 00001E08 3C0D <1> cmp al, 13 4494 00001E0A 7448 <1> je .switch_a_check ; yes --> 4495 00001E0C 3C5F <1> cmp al, '_' ; separator ? 4496 00001E0E 74EF <1> je .switch_a_num 4497 00001E10 3C23 <1> cmp al, '#' ; base change ? 4498 00001E12 7432 <1> je .switch_a_base 4499 00001E14 E86C03 <1> call init_uppercase 4500 00001E17 B400 <1> mov ah, 0 4501 00001E19 3C30 <1> cmp al, '0' ; decimal digit ? 4502 00001E1B 7224 <1> jb .switch_a_error 4503 00001E1D 3C39 <1> cmp al, '9' 4504 00001E1F 7712 <1> ja .switch_a_notdec 4505 00001E21 2C30 <1> sub al, '0' ; ax = digit 4506 <1> .switch_a_gotdigit: 4507 00001E23 93 <1> xchg ax, bx ; ax = prior 4508 00001E24 52 <1> push dx 4509 00001E25 F7E2 <1> mul dx ; dx:ax = prior * base 4510 00001E27 85D2 <1> test dx, dx ; >= 64 KiB ? 4511 00001E29 7516 <1> jnz .switch_a_error ; error --> 4512 00001E2B 5A <1> pop dx 4513 00001E2C 93 <1> xchg bx, ax ; return bx = prior 4514 00001E2D 01C3 <1> add bx, ax ; prior += next 4515 00001E2F 7210 <1> jc .switch_a_error 4516 00001E31 EBCC <1> jmp .switch_a_num 4517 <1> 4518 <1> .switch_a_notdec: 4519 00001E33 3C41 <1> cmp al, 'A' ; alphabetic ? 4520 00001E35 720A <1> jb .switch_a_error 4521 00001E37 3C5A <1> cmp al, 'Z' 4522 00001E39 7706 <1> ja .switch_a_error 4523 00001E3B 04C9 <1> add al, 10 - 'A' ; ax = digit 4524 00001E3D 39D0 <1> cmp ax, dx 4525 00001E3F 72E2 <1> jb .switch_a_gotdigit 4526 <1> ; jae .switch_a_error 4527 <1> .switch_a_error: 4528 <1> ..@init_cmdline_switch_a_error: 4529 00001E41 B041 <1> mov al, 'A' 4530 00001E43 E91CFD <1> jmp ..@init_cmdline_switch_error 4531 <1> 4532 <1> .switch_a_base: 4533 00001E46 83FB02 <1> cmp bx, 2 4534 00001E49 72F6 <1> jb .switch_a_error 4535 00001E4B 83FB24 <1> cmp bx, 36 4536 00001E4E 77F1 <1> ja .switch_a_error 4537 00001E50 89DA <1> mov dx, bx 4538 00001E52 EBA9 <1> jmp .switch_a_zero 4539 <1> 4540 <1> .switch_a_check: 4541 00001E54 81FB1020 <1> cmp bx, _AUXBUFFSIZE 4542 00001E58 72E7 <1> jb .switch_a_error 4543 00001E5A 81FB0060 <1> cmp bx, _AUXBUFFMAXSIZE 4544 00001E5E 77E1 <1> ja .switch_a_error 4545 <1> 4546 00001E60 A8 <1> db __TEST_IMM8 ; (skip lodsb) 4547 <1> .switch_a_got.lodsb: 4548 00001E61 AC <1> lodsb 4549 <1> .switch_a_got: 4550 00001E62 1E <1> push ds 4551 00001E63 07 <1> pop es 4552 00001E64 2E891E[960A] <1> mov word [cs:init_auxbuff_want], bx 4553 00001E69 4E <1> dec si 4554 00001E6A E9A4FB <1> jmp .blankloop 4555 <1> 4556 <1> 4557 <1> .noswitches: 4558 <1> .breakpoint: 4559 00001E6D 90 <1> nop ; SMC in section init 4560 <1> ; Feed the remaining command line to the 'n' command. 4561 00001E6E 4E <1> dec si 4562 00001E6F 56 <1> push si 4563 <1> 4564 <1> 4565 <1> init_analyse_pathname: 4566 00001E70 89F3 <1> mov bx, si 4567 00001E72 31D2 <1> xor dx, dx 4568 00001E74 B000 <1> mov al, 0 4569 <1> @@: 4570 00001E76 3C2F <1> cmp al, '/' 4571 00001E78 7410 <1> je .slash 4572 00001E7A 3C5C <1> cmp al, '\' 4573 00001E7C 740C <1> je .slash 4574 00001E7E 3C3A <1> cmp al, ':' 4575 00001E80 7408 <1> je .colon 4576 00001E82 3C2E <1> cmp al, '.' 4577 00001E84 7507 <1> jne .next 4578 <1> .dot: 4579 00001E86 B201 <1> mov dl, 1 ; set dl (fn with dot) 4580 00001E88 EB03 <1> jmp .next 4581 <1> 4582 <1> .slash: 4583 <1> .colon: 4584 00001E8A BA0001 <1> mov dx, 100h ; set dh (is a pathname), reset dl (fn with dot) 4585 <1> .next: 4586 00001E8D AC <1> lodsb 4587 00001E8E E8F101 <1> call init_ifsep 4588 00001E91 75E3 <1> jne @B 4589 00001E93 4E <1> dec si ; bx -> name, si -> terminator 4590 <1> ; dh = nonzero if a pathname not just filename 4591 <1> ; dl = nonzero if filename contains a dot 4592 00001E94 16 <1> push ss 4593 00001E95 07 <1> pop es 4594 00001E96 89F1 <1> mov cx, si 4595 00001E98 29D9 <1> sub cx, bx ; es:bx -> name, cx = length 4596 <1> 4597 <1> 4598 <1> init_check_warn_extension: 4599 00001E9A 52 <1> push dx 4600 00001E9B 06 <1> push es 4601 <1> 4602 00001E9C 84D2 <1> test dl, dl ; last component has a dot ? 4603 00001E9E 7433 <1> jz .done ; no, do not warn --> 4604 <1> 4605 00001EA0 2ED006[A50A] <1> rol byte [cs:init_switch_pw], 1 4606 00001EA5 732C <1> jnc .done ; warning disabled --> 4607 <1> 4608 00001EA7 83F904 <1> cmp cx, 4 ; can fit an expected extension ? 4609 00001EAA 7221 <1> jb .warn ; no, warn --> 4610 <1> 4611 00001EAC 83EE04 <1> sub si, 4 ; -> possible extension 4612 00001EAF 0E <1> push cs 4613 00001EB0 07 <1> pop es 4614 00001EB1 BF[A60A] <1> mov di, imsg.no_warn_extensions 4615 <1> ; es:di -> allowed extensions 4616 <1> .loop: 4617 00001EB4 B000 <1> mov al, 0 4618 00001EB6 2E864504 <1> xchg byte [cs:di+4], al ; NUL-terminate the candidate extension 4619 00001EBA 50 <1> push ax 4620 00001EBB 89FA <1> mov dx, di 4621 00001EBD E86E02 <1> call init_isstring? ; is it this one ? 4622 00001EC0 58 <1> pop ax 4623 00001EC1 2E884504 <1> mov byte [cs:di+4], al ; restore next extension text 4624 00001EC5 740C <1> je .done ; yes, do not warn --> 4625 00001EC7 AF <1> scasw 4626 00001EC8 AF <1> scasw ; di += 4 4627 00001EC9 84C0 <1> test al, al ; was last ? 4628 00001ECB 75E7 <1> jnz .loop 4629 <1> .warn: 4630 00001ECD BA[E30A] <1> mov dx, imsg.extension_warning 4631 00001ED0 E8C7F5 <1> call init_putsz_cs 4632 <1> 4633 <1> .done: 4634 00001ED3 07 <1> pop es 4635 00001ED4 5A <1> pop dx 4636 <1> 4637 <1> 4638 <1> init_find_path: 4639 00001ED5 2E833E[980A]00 <1> cmp word [cs:init_switch_p_low_pathsearch_high_guessextension], 0 4640 00001EDB 740E <1> je .done_j 4641 <1> 4642 00001EDD E30C <1> jcxz .done_j ; if no filename given --> 4643 <1> 4644 <1> ; es:bx -> name, cx = length 4645 00001EDF BF[F00C] <1> mov di, while_buffer ; ss:while_buffer -> prefix, ss:di -> after end 4646 00001EE2 E8BF01 <1> call init_check_filename 4647 00001EE5 736C <1> jnc .found 4648 <1> 4649 00001EE7 84F6 <1> test dh, dh 4650 00001EE9 7403 <1> jz @F 4651 <1> .done_j: 4652 00001EEB E99800 <1> jmp .done 4653 <1> @@: 4654 00001EEE 2ED006[980A] <1> rol byte [cs:init_switch_p_pathsearch], 1 4655 00001EF3 73F6 <1> jnc .done_j 4656 <1> 4657 <1> %if _DEVICE && _APPLICATION 4658 00001EF5 F606[E600]40 <1> testopt [internalflags6], dif6_device_mode 4659 00001EFA 7505 <1> jnz .device 4660 <1> %endif 4661 <1> %if _APPLICATION 4662 00001EFC A12C00 <1> mov ax, [2Ch] 4663 <1> %if _DEVICE 4664 00001EFF EB03 <1> jmp @F 4665 <1> %endif 4666 <1> %endif 4667 <1> 4668 <1> %if _DEVICE 4669 <1> .device: 4670 00001F01 E8C4E9 <1> call init_device_get_environment 4671 <1> @@: 4672 <1> %endif 4673 <1> 4674 00001F04 51 <1> push cx 4675 00001F05 BF[C30A] <1> mov di, imsg.varpath 4676 00001F08 B90500 <1> mov cx, imsg.varpath.length 4677 00001F0B E8D401 <1> call init_findvar 4678 00001F0E 7275 <1> jc .done_pop 4679 <1> 4680 <1> .pathloop: 4681 00001F10 56 <1> push si 4682 00001F11 B98000 <1> mov cx, 128 ; put a limit 4683 <1> @@: 4684 00001F14 AC <1> lodsb ; get next text 4685 00001F15 3C3B <1> cmp al, ';' ; separator ? 4686 00001F17 7408 <1> je @F ; yes --> 4687 00001F19 3C00 <1> cmp al, 0 ; separator ? 4688 00001F1B 7404 <1> je @F ; yes --> 4689 00001F1D E2F5 <1> loop @B ; loop up to limit 4690 00001F1F EB5D <1> jmp .pathtoolong ; error --> 4691 <1> @@: 4692 00001F21 89F1 <1> mov cx, si 4693 00001F23 49 <1> dec cx ; -> terminator 4694 00001F24 5E <1> pop si ; -> content text 4695 00001F25 29F1 <1> sub cx, si ; = length excluding terminator 4696 00001F27 16 <1> push ss 4697 00001F28 07 <1> pop es 4698 00001F29 BF[F00C] <1> mov di, while_buffer ; es:di -> buffer 4699 <1> 4700 00001F2C B000 <1> mov al, 0 ; no backslash if empty 4701 00001F2E E30A <1> jcxz @FFF ; skip loop if empty --> 4702 <1> @@: 4703 00001F30 AC <1> lodsb ; load from variable 4704 00001F31 3C2F <1> cmp al, '/' ; forward slash ? 4705 00001F33 7502 <1> jne @F ; no --> 4706 00001F35 B05C <1> mov al, '\' ; replace by backslash 4707 <1> @@: 4708 00001F37 AA <1> stosb ; store 4709 00001F38 E2F6 <1> loop @BB ; loop for cx = count 4710 <1> @@: 4711 00001F3A 3C5C <1> cmp al, '\' ; trailing backslash ? 4712 00001F3C 7403 <1> je @F ; yes --> 4713 00001F3E B05C <1> mov al, '\' 4714 00001F40 AA <1> stosb ; append it 4715 <1> @@: 4716 00001F41 59 <1> pop cx 4717 <1> 4718 00001F42 1E <1> push ds 4719 00001F43 56 <1> push si 4720 <1> ; ss = es, es:bx -> name, cx = length 4721 <1> ; ss:while_buffer -> prefix, ss:di -> after end 4722 00001F44 E85D01 <1> call init_check_filename 4723 00001F47 5E <1> pop si 4724 00001F48 1F <1> pop ds ; ds:si -> terminator of path element 4725 00001F49 7308 <1> jnc .found 4726 <1> 4727 00001F4B AC <1> lodsb ; get terminator 4728 00001F4C 3C3B <1> cmp al, ';' ; semicolon ? 4729 00001F4E 7536 <1> jne .done ; no --> 4730 00001F50 51 <1> push cx 4731 00001F51 EBBD <1> jmp .pathloop ; try next --> 4732 <1> 4733 <1> 4734 <1> .found: 4735 00001F53 16 <1> push ss 4736 00001F54 1F <1> pop ds ; ds => PSP 4737 00001F55 5E <1> pop si 4738 00001F56 01CE <1> add si, cx ; ds:si -> behind original name 4739 00001F58 16 <1> push ss 4740 00001F59 07 <1> pop es 4741 00001F5A 4F <1> dec di ; es:di -> NUL 4742 00001F5B EB07 <1> jmp @FF ; skip store on first iteration 4743 <1> 4744 <1> @@: 4745 00001F5D 81FF[F60D] <1> cmp di, while_buffer.end - 2 4746 00001F61 7713 <1> ja .toolong 4747 00001F63 AA <1> stosb 4748 <1> @@: 4749 00001F64 AC <1> lodsb 4750 00001F65 3C00 <1> cmp al, 0 4751 00001F67 7404 <1> je @F 4752 00001F69 3C0D <1> cmp al, 13 4753 00001F6B 75F0 <1> jne @BB 4754 <1> @@: ; (targeted from both directions) 4755 00001F6D B00D <1> mov al, 13 4756 00001F6F AA <1> stosb 4757 00001F70 BE[F00C] <1> mov si, while_buffer 4758 00001F73 56 <1> push si ; offset for N/K command (kk) 4759 00001F74 EB10 <1> jmp .done 4760 <1> 4761 <1> .toolong: 4762 00001F76 BA[1C0B] <1> mov dx, imsg.kktoolong 4763 00001F79 E81EF5 <1> call init_putsz_cs 4764 00001F7C EBEF <1> jmp @B 4765 <1> 4766 <1> .pathtoolong: 4767 00001F7E BA[490B] <1> mov dx, imsg.pathtoolong 4768 00001F81 E816F5 <1> call init_putsz_cs 4769 <1> 4770 00001F84 58 <1> pop ax ; (discard si) 4771 <1> .done_pop: 4772 00001F85 58 <1> pop ax ; (discard cx) 4773 <1> .done: 4774 <1> 4775 <1> 4776 <1> init_change_auxbuff_size: 4777 00001F86 16 <1> push ss 4778 00001F87 1F <1> pop ds 4779 00001F88 16 <1> push ss 4780 00001F89 07 <1> pop es 4781 <1> %if _AUXBUFFSIZE != _AUXBUFFMAXSIZE 4782 00001F8A 2EA1[960A] <1> mov ax, word [cs:init_auxbuff_want] 4783 00001F8E 83C00F <1> add ax, 15 ; cannot carry, ax <= _AUXBUFFMAXSIZE 4784 00001F91 24F0 <1> and al, 0F0h 4785 <1> 4786 00001F93 89C7 <1> mov di, ax 4787 00001F95 83EF18 <1> sub di, 8 * 3 4788 00001F98 A3[520A] <1> mov word [auxbuff_current_size], ax 4789 00001F9B 893E[540A] <1> mov word [auxbuff_current_size_minus_24], di 4790 <1> 4791 00001F9F B104 <1> mov cl, 4 4792 00001FA1 89C3 <1> mov bx, ax 4793 00001FA3 D3EB <1> shr bx, cl 4794 00001FA5 BEFFFD <1> mov si, - paras(_AUXBUFFSIZE) 4795 00001FA8 01DE <1> add si, bx 4796 00001FAA 740E <1> jz @F ; if to keep minimum size 4797 <1> 4798 <1> ; INP: ax = wanted size (rounded to paragraph boundary) 4799 <1> ; bx = wanted size paragraphs 4800 <1> ; si = bx - paragraphs of minimum size = how much to enlarge 4801 <1> ; ip -> function depending on layout 4802 <1> ; STT: ss = ds = es 4803 <1> ; OUT: NC if success 4804 <1> ; CY if error, branch to command line error 4805 00001FAC 2EFF16[940A] <1> call near [cs:init_layout] 4806 00001FB1 16 <1> push ss 4807 00001FB2 1F <1> pop ds 4808 00001FB3 16 <1> push ss 4809 00001FB4 07 <1> pop es 4810 00001FB5 7303E987FE <1> jc ..@init_cmdline_switch_a_error 4811 <1> @@: 4812 <1> %endif 4813 <1> 4814 <1> 4815 <1> init_hook_interrupts: 4816 <1> %if CATCHINTAMOUNT 4817 <1> ; Set up interrupt vectors. 4818 <1> %if _CATCHINT06 && _DETECT95LX 4819 00001FBA 8B0E[8A0C] <1> mov cx, word [inttab_number_variable] 4820 <1> %else 4821 <1> mov cx, inttab_number 4822 <1> %endif 4823 00001FBE BE[6C0C] <1> mov si, inttab 4824 <1> .intloop: 4825 00001FC1 AC <1> lodsb 4826 00001FC2 B435 <1> mov ah, 35h 4827 00001FC4 CD21 <1> int 21h ; get vector 4828 00001FC6 97 <1> xchg ax, di 4829 00001FC7 AD <1> lodsw 4830 00001FC8 97 <1> xchg ax, di 4831 <1> %if _DEBUG && !_DEBUG_COND 4832 <1> ; vectors are set only when debuggee runs 4833 <1> %else 4834 <1> %if _DEBUG 4835 <1> testopt [internalflags6], dif6_debug_mode 4836 <1> jnz @F 4837 <1> %endif 4838 00001FC9 895D02 <1> mov word [ di + ieNext ], bx 4839 00001FCC 8C4504 <1> mov word [ di + ieNext + 2 ], es 4840 <1> ; store it 4841 00001FCF 89FA <1> mov dx, di 4842 00001FD1 B425 <1> mov ah, 25h ; set interrupt vector 4843 00001FD3 CD21 <1> int 21h ; ds => lDEBUG_DATA_ENTRY 4844 <1> @@: 4845 <1> %endif 4846 00001FD5 E2EA <1> loop .intloop 4847 <1> %endif 4848 <1> 4849 <1> 4850 <1> ; Disabled this. hook2F (debug.asm) now detects this condition. 4851 <1> %if _PM && 0 4852 <1> ; Windows 9x and DosEmu are among those hosts which handle some 4853 <1> ; V86 Ints internally without first calling the interrupt chain. 4854 <1> ; This causes various sorts of troubles and incompatibilities; 4855 <1> ; in our case, hooking interrupt 2Fh would not intercept calls 4856 <1> ; made to the DPMI interface because the host sees them first. 4857 <1> %if _WIN9XSUPP 4858 <1> %if _GUARD_86M_INT2F 4859 <1> push es 4860 <1> xor ax, ax 4861 <1> mov es, ax ; (only used in 86 Mode) 4862 <1> mov ax, [es:2Fh * 4] 4863 <1> cmp ax, -1 4864 <1> je @F ; --> (ZR) 4865 <1> or ax, [es:2Fh * 4 + 2] 4866 <1> @@: 4867 <1> pop es 4868 <1> jz @F 4869 <1> %endif 4870 <1> mov ax, 1600h ; running in a Win9x DOS box? 4871 <1> int 2Fh 4872 <1> cmp al, 4 4873 <1> jge .no2Fhook ; this is intentionally a signed comparison! 4874 <1> @@: 4875 <1> %endif 4876 <1> %if _DOSEMU 4877 <1> testopt [internalflags], runningdosemu 4878 <1> jnz .no2Fhook 4879 <1> %endif 4880 <1> %if _WIN9XSUPP || _DOSEMU 4881 <1> jmp short .dpmihostchecked 4882 <1> .no2Fhook: 4883 <1> clropt [options4], opt4_int_2F_hook 4884 <1> .dpmihostchecked: 4885 <1> %endif 4886 <1> %endif 4887 00001FD7 1E <1> push ds 4888 00001FD8 07 <1> pop es 4889 <1> 4890 <1> set_parent_pra: 4891 <1> ; Save, then modify termination address and parent PSP. 4892 <1> %if _DEVICE && _APPLICATION 4893 00001FD9 F606[E600]40 <1> testopt [internalflags6], dif6_device_mode 4894 00001FDE 7537 <1> jnz .device 4895 <1> %elif _DEVICE 4896 <1> jmp .device 4897 <1> %endif 4898 <1> %if _APPLICATION 4899 00001FE0 BE0A00 <1> mov si, TPIV 4900 00001FE3 BF[1C0B] <1> mov di, psp22 4901 00001FE6 A5 <1> movsw 4902 00001FE7 A5 <1> movsw ; save Int22 4903 00001FE8 BA[6040] <1> mov dx, debug22 4904 00001FEB 8954FC <1> mov word [ si-4 ], dx 4905 00001FEE 8C5CFE <1> mov word [ si-2 ], ds ; set pspInt22 (required) 4906 00001FF1 BE1600 <1> mov si, 16h 4907 00001FF4 A5 <1> movsw ; save parent 4908 00001FF5 8C5CFE <1> mov word [ si-2 ], ds ; set pspParent 4909 00001FF8 B82225 <1> mov ax, 2522h ; set Int22 4910 00001FFB CD21 <1> int 21h ; (not really required) 4911 <1> 4912 <1> ; shrink to required resident size 4913 00001FFD 1E <1> push ds 4914 00001FFE 07 <1> pop es 4915 00001FFF B44A <1> mov ah, 4Ah 4916 00002001 2E8B1E[900A] <1> mov bx, word [cs:memsize] 4917 00002006 891E[1C01] <1> mov word [alloc_size], bx 4918 0000200A 8C1E[1E01] <1> mov word [alloc_seg], ds 4919 <1> 4920 0000200E BE[31B7] <1> mov si, initcont 4921 00002011 FF36[1001] <1> push word [code_seg] 4922 00002015 56 <1> push si 4923 00002016 CB <1> retf 4924 <1> %endif 4925 <1> 4926 <1> 4927 <1> %if _DEVICE 4928 <1> .device: 4929 00002017 BE8000 <1> mov si, 80h ; -> command line tail 4930 0000201A 89F1 <1> mov cx, si ; = 128 4931 0000201C 29CC <1> sub sp, cx ; -> buffer on stack 4932 0000201E 89E7 <1> mov di, sp 4933 00002020 F3A4 <1> rep movsb ; preserve it 4934 <1> 4935 00002022 8CDA <1> mov dx, ds 4936 00002024 B455 <1> mov ah, 55h 4937 00002026 F8 <1> clc 4938 00002027 CD21 <1> int 21h ; create child PSP 4939 <1> 4940 00002029 BE0E00 <1> mov si, TPIV + 4 4941 0000202C BA[6040] <1> mov dx, debug22 4942 0000202F 8954FC <1> mov word [ si-4 ], dx 4943 00002032 8C5CFE <1> mov word [ si-2 ], ds ; set pspInt22 (required) 4944 <1> %if _DEVICE_SET_2324 4945 00002035 C704[6E4B] <1> mov word [ si ], devint23 4946 00002039 8C5C02 <1> mov word [ si + 2 ], ds ; set pspInt23 4947 0000203C C74404[704B] <1> mov word [ si + 4 ], devint24 4948 00002041 8C5C06 <1> mov word [ si + 6 ], ds ; set pspInt24 4949 <1> %endif 4950 00002044 BE1800 <1> mov si, 16h + 2 4951 00002047 8C5CFE <1> mov word [ si-2 ], ds ; set pspParent 4952 <1> ; mov ax, 2522h ; set Int22 4953 <1> ; int 21h ; (not really required) 4954 <1> 4955 0000204A 31C0 <1> xor ax, ax 4956 0000204C A32C00 <1> mov word [2Ch], ax ; set environment to none 4957 <1> 4958 0000204F BB0500 <1> mov bx, 5 ; close file handles past std (5) 4959 00002052 8B0E3200 <1> mov cx, word [32h] ; = number of file handles 4960 00002056 29D9 <1> sub cx, bx ; = number past std handles 4961 00002058 7607 <1> jbe @FF ; if <= 0 handles to close --> 4962 <1> @@: 4963 0000205A B43E <1> mov ah, 3Eh 4964 0000205C CD21 <1> int 21h ; close file handle 4965 0000205E 43 <1> inc bx ; next handle 4966 0000205F E2F9 <1> loop @B ; loop --> 4967 <1> @@: 4968 <1> 4969 00002061 89E6 <1> mov si, sp ; -> buffer on stack 4970 00002063 BF8000 <1> mov di, 80h ; -> command line tail buffer in PSP 4971 00002066 89F8 <1> mov ax, di ; = 128 4972 00002068 89F9 <1> mov cx, di ; = 128 4973 0000206A F3A4 <1> rep movsb ; 4974 0000206C 01C4 <1> add sp, ax ; discard buffer 4975 <1> 4976 0000206E BE[33B7] <1> mov si, initcont.device 4977 00002071 FF36[1001] <1> push word [code_seg] 4978 00002075 56 <1> push si 4979 00002076 CB <1> retf 4980 <1> %endif 4981 <1> %endif 4982 <1> 4983 <1> 4984 <1> ; Skip blanks and tabs 4985 <1> ; 4986 <1> ; INP: ds:si-> first character 4987 <1> ; OUT: al = first non-blank character 4988 <1> ; ds:si-> character behind the first non-blank 4989 <1> ; NC 4990 <1> ; CHG: - 4991 <1> ; STK: 1 word 4992 <1> init_skipwhite: 4993 00002077 AC <1> lodsb 4994 <1> 4995 <1> ; Same as above, but first character in al 4996 <1> ; 4997 <1> ; INP: al = first character 4998 <1> ; ds:si-> next character 4999 <1> ; OUT: al = first non-blank character 5000 <1> ; ds:si-> character behind the first non-blank 5001 <1> ; NC 5002 <1> ; CHG: - 5003 <1> ; STK: 1 word 5004 <1> init_skipwh0: 5005 00002078 3C20 <1> cmp al, 32 5006 0000207A 74FB <1> je init_skipwhite 5007 0000207C 3C09 <1> cmp al, 9 5008 0000207E 74F7 <1> je init_skipwhite 5009 00002080 F8 <1> clc 5010 00002081 C3 <1> retn 5011 <1> 5012 <1> 5013 <1> ; Compare character with separators 5014 <1> ; 5015 <1> ; INP: al = character 5016 <1> ; OUT: ZR if al is CR, NUL, blank, tab, comma, semicolon, or equal sign 5017 <1> ; ZR if switch character is a slash and al is a slash 5018 <1> ; NZ else 5019 <1> ; REM: This is only used for parsing FCBs. 5020 <1> init_ifsep: 5021 00002082 3C00 <1> cmp al, 0 5022 00002084 741D <1> je .return 5023 00002086 3C0D <1> cmp al, 13 5024 00002088 7419 <1> je .return 5025 0000208A 3C3B <1> cmp al, ';' 5026 0000208C 7415 <1> je .return 5027 0000208E 3C20 <1> cmp al, 32 5028 00002090 7411 <1> je .return 5029 00002092 3C09 <1> cmp al, 9 5030 00002094 740D <1> je .return 5031 00002096 3C2C <1> cmp al, ',' 5032 00002098 7409 <1> je .return 5033 0000209A 3C3D <1> cmp al, '=' 5034 0000209C 7405 <1> je .return 5035 0000209E 363A06[570B] <1> cmp al, byte [ss:swch1] 5036 <1> .return: 5037 000020A3 C3 <1> retn 5038 <1> 5039 <1> 5040 <1> ; INP: es:bx -> name to try, cx = length 5041 <1> ; dl = zero if to attempt filename extensions 5042 <1> ; ss:while_buffer -> prefix, ss:di -> after 5043 <1> ; OUT: NC if file found, 5044 <1> ; ss:while_buffer = name, ss:di -> after NUL 5045 <1> ; CY if file not found 5046 <1> ; ds = ss 5047 <1> ; CHG: si, ax 5048 <1> init_check_filename: 5049 000020A4 06 <1> push es 5050 000020A5 51 <1> push cx 5051 <1> 5052 000020A6 06 <1> push es 5053 000020A7 1F <1> pop ds 5054 000020A8 89DE <1> mov si, bx ; ds:si -> name 5055 000020AA 16 <1> push ss 5056 000020AB 07 <1> pop es ; es:di -> where to append name 5057 000020AC F3A4 <1> rep movsb ; append the name 5058 000020AE 57 <1> push di ; on stack: at initial terminator 5059 000020AF BE[AE0A] <1> mov si, imsg.p_extensions 5060 <1> ; cs:si -> extensions to try 5061 <1> .loop: 5062 000020B2 B000 <1> mov al, 0 5063 000020B4 AA <1> stosb ; zero-terminate name 5064 000020B5 B80043 <1> mov ax, 4300h ; get attributes 5065 000020B8 52 <1> push dx 5066 000020B9 16 <1> push ss 5067 000020BA 1F <1> pop ds 5068 000020BB BA[F00C] <1> mov dx, while_buffer ; ds:dx -> pathname to try 5069 000020BE F9 <1> stc 5070 000020BF CD21 <1> int 21h ; try to get attributes 5071 000020C1 5A <1> pop dx 5072 000020C2 731A <1> jnc .ret ; --> (NC) 5073 000020C4 84D2 <1> test dl, dl ; had an extension originally ? 5074 000020C6 7515 <1> jnz .ret_CY ; yes, do not try to append one --> 5075 000020C8 2ED006[990A] <1> rol byte [cs:init_switch_p_guessextension], 1 5076 000020CD 730E <1> jnc .ret_CY ; if no guessing extension --> 5077 000020CF 5F <1> pop di 5078 000020D0 57 <1> push di 5079 000020D1 2E803C00 <1> cmp byte [cs:si], 0 ; last attempt done ? 5080 000020D5 7406 <1> je .ret_CY ; yes --> 5081 000020D7 2EA5 <1> cs movsw ; ".C" 5082 000020D9 2EA5 <1> cs movsw ; "OM" 5083 000020DB EBD5 <1> jmp .loop 5084 <1> 5085 <1> .ret_CY: 5086 000020DD F9 <1> stc ; CY 5087 <1> .ret: 5088 000020DE 58 <1> pop ax ; (discard) 5089 000020DF 59 <1> pop cx 5090 000020E0 07 <1> pop es 5091 000020E1 C3 <1> retn 5092 <1> 5093 <1> 5094 <1> ; INP: ax => environment, zero if none 5095 <1> ; cs:di -> variable name, including '=' terminator 5096 <1> ; cx = variable name length, including '=' terminator 5097 <1> ; OUT: CY if not found 5098 <1> ; NC if found, 5099 <1> ; ds:si -> behind '=' of found variable 5100 <1> ; CHG: ax, es, di, ds, si, cx 5101 <1> init_findvar: 5102 000020E2 85C0 <1> test ax, ax 5103 000020E4 7415 <1> jz .notvar 5104 000020E6 8ED8 <1> mov ds, ax 5105 000020E8 31F6 <1> xor si, si 5106 <1> 5107 <1> @@: 5108 000020EA 0E <1> push cs 5109 000020EB 07 <1> pop es 5110 000020EC 51 <1> push cx 5111 000020ED 57 <1> push di 5112 000020EE 56 <1> push si 5113 000020EF F3A6 <1> repe cmpsb 5114 000020F1 740A <1> je .foundvar ; --> (NC) 5115 000020F3 5E <1> pop si 5116 000020F4 5F <1> pop di 5117 000020F5 59 <1> pop cx 5118 000020F6 E82C00 <1> call init_nextvar 5119 000020F9 75EF <1> jnz @B 5120 <1> .notvar: 5121 000020FB F9 <1> stc 5122 000020FC C3 <1> retn 5123 <1> 5124 <1> .foundvar: 5125 000020FD 58 <1> pop ax 5126 000020FE 58 <1> pop ax 5127 000020FF 58 <1> pop ax 5128 00002100 C3 <1> retn 5129 <1> 5130 <1> 5131 <1> %if _CONFIG 5132 <1> ; INP: ax => environment, zero if none 5133 <1> ; cs:di -> variable name, including '=' terminator 5134 <1> ; cx = variable name length, including '=' terminator 5135 <1> ; ss:dx -> buffer to write to, 256 bytes 5136 <1> ; OUT: es = ds = ss 5137 <1> ; CY if not found 5138 <1> ; NC if found, 5139 <1> ; buffer filled 5140 <1> init_copyvar: 5141 00002101 E8DEFF <1> call init_findvar 5142 00002104 721A <1> jc .endvar 5143 <1> 5144 <1> .foundvar: 5145 00002106 1E <1> push ds 5146 00002107 07 <1> pop es 5147 00002108 89F7 <1> mov di, si 5148 0000210A B000 <1> mov al, 0 5149 0000210C B9FF00 <1> mov cx, 255 5150 0000210F F2AE <1> repne scasb 5151 <1> 5152 00002111 29F7 <1> sub di, si 5153 00002113 4F <1> dec di 5154 00002114 89F9 <1> mov cx, di 5155 <1> 5156 00002116 16 <1> push ss 5157 00002117 07 <1> pop es 5158 00002118 89D7 <1> mov di, dx 5159 0000211A F3A4 <1> rep movsb 5160 0000211C B000 <1> mov al, 0 5161 0000211E AA <1> stosb 5162 0000211F F8 <1> clc 5163 <1> 5164 <1> .endvar: 5165 00002120 16 <1> push ss 5166 00002121 1F <1> pop ds 5167 00002122 16 <1> push ss 5168 00002123 07 <1> pop es 5169 00002124 C3 <1> retn 5170 <1> %endif 5171 <1> 5172 <1> 5173 <1> init_nextvar: 5174 <1> @@: 5175 00002125 AC <1> lodsb 5176 00002126 84C0 <1> test al, al 5177 00002128 75FB <1> jnz @B 5178 0000212A 803C00 <1> cmp byte [si], 0 5179 0000212D C3 <1> retn 5180 <1> 5181 <1> 5182 <1> %define PREFIX init_ 5183 <1> %include "isstring.asm" 1 <2> 2 <2> %if 0 3 <2> 4 <2> lDebug string keyword comparison 5 <2> 6 <2> Copyright (C) 1995-2003 Paul Vojta 7 <2> Copyright (C) 2008-2023 C. Masloch 8 <2> 9 <2> Usage of the works is permitted provided that this 10 <2> instrument is retained with the works, so that any entity 11 <2> that uses the works is notified of this instrument. 12 <2> 13 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 14 <2> 15 <2> %endif 16 <2> 17 <2> 18 <2> ; Check for given string (cap-insensitive) 19 <2> ; 20 <2> ; INP: ds:si -> input string to check (either cap), 21 <2> ; terminated by CR (13), NUL, semicolon, space, 22 <2> ; tab, dot, comma, equals, colon, [, ], (, or ) 23 <2> ; es:dx -> ASCIZ string to check (all-caps) 24 <2> ; OUT: Iff string matches, 25 <2> ; ZR 26 <2> ; si -> at separator that terminates the keyword 27 <2> ; else, 28 <2> ; NZ 29 <2> ; si = input si 30 <2> ; STT: ds = es = ss 31 <2> ; CHG: dx, al 32 <2> %[PREFIX]isstring?: 33 0000212E 56 <2> push si 34 0000212F 87D7 <2> xchg dx, di 35 <2> .loop: 36 00002131 AC <2> lodsb 37 00002132 E84E00 <2> call %[PREFIX]uppercase 38 00002135 AE <2> scasb 39 00002136 7506 <2> jne .mismatch 40 00002138 84C0 <2> test al, al 41 0000213A 75F5 <2> jne .loop 42 0000213C EB3F <2> jmp .matched_zr 43 <2> 44 <2> .mismatch: 45 0000213E E84D00 <2> call %[PREFIX]iseol? 46 00002141 7433 <2> je .checkend 47 00002143 3C20 <2> cmp al, 32 48 00002145 742F <2> je .checkend 49 00002147 3C09 <2> cmp al, 9 50 00002149 742B <2> je .checkend 51 0000214B 3C2E <2> cmp al, '.' 52 0000214D 7427 <2> je .checkend 53 0000214F 3C2C <2> cmp al, ',' 54 00002151 7423 <2> je .checkend 55 00002153 3C3D <2> cmp al, '=' 56 00002155 741F <2> je .checkend 57 00002157 3C3A <2> cmp al, ':' 58 00002159 741B <2> je .checkend 59 0000215B 3C5B <2> cmp al, '[' 60 0000215D 7417 <2> je .checkend 61 0000215F 3C5D <2> cmp al, ']' 62 00002161 7413 <2> je .checkend 63 00002163 3C28 <2> cmp al, '(' 64 00002165 740F <2> je .checkend 65 00002167 3C29 <2> cmp al, ')' 66 00002169 740B <2> je .checkend 67 <2> %ifidni PREFIX, init_ 68 0000216B 363A06[570B] <2> cmp al, byte [ss:swch1] 69 00002170 7404 <2> je .checkend 70 <2> %endif 71 <2> .ret_nz: 72 <2> ; NZ 73 00002172 5E <2> pop si 74 <2> .ret: 75 00002173 87D7 <2> xchg dx, di 76 00002175 C3 <2> retn 77 <2> 78 <2> .checkend: 79 00002176 26807DFF00 <2> cmp byte [es:di - 1], 0 80 0000217B 75F5 <2> jne .ret_nz 81 <2> .matched_zr: ; ZR 82 0000217D 5F <2> pop di ; (discard) 83 0000217E 8D74FF <2> lea si, [si - 1] ; -> separator (preserve ZR) 84 00002181 EBF0 <2> jmp .ret 85 <2> 86 <2> 87 <2> %[PREFIX]uppercase: section_of_function 88 00002183 3C61 <2> cmp al, 'a' 89 00002185 7206 <2> jb .ret 90 00002187 3C7A <2> cmp al, 'z' 91 00002189 7702 <2> ja .ret 92 0000218B 24DF <2> and al, TOUPPER 93 <2> .ret: 94 0000218D C3 <2> retn 95 <2> 96 <2> %ifempty PREFIX 97 <2> iseol?_or_then: 98 <2> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 99 <2> testopt [internalflags3], dif3_in_if 100 <2> jz iseol? 101 <2> mov dx, msg.then 102 <2> dec si 103 <2> call isstring? 104 <2> je iseol?.ret 105 <2> lodsb 106 <2> %endif 107 <2> %endif 108 <2> 109 <2> %[PREFIX]iseol?: 110 0000218E 3C3B <2> cmp al, ';' 111 00002190 7406 <2> je .ret 112 <2> .notsemicolon: 113 00002192 3C0D <2> cmp al, 13 ; this *IS* iseol? 114 00002194 7402 <2> je .ret 115 00002196 3C00 <2> cmp al, 0 116 <2> .ret: 117 00002198 C3 <2> retn 5184 <1> 5185 <1> 5186 <1> ; INP: bx => destination for auxbuff 5187 <1> ; (The following are not actually used by this function, 5188 <1> ; they're just what is passed in and preserved to 5189 <1> ; be used by the caller after returning.) 5190 <1> ; dx => destination for code image 5191 <1> ; (if boot-loaded:) cx => destination for pseudo-PSP 5192 <1> ; (implies cx+10h => destination for data_entry) 5193 <1> ; ax => segment for history buffer 5194 <1> 5195 <1> init_app_layout_1: 5196 <1> %if 0 5197 <1> mov bx, ds 5198 <1> mov dx, bx 5199 <1> add bx, paras(AUXTARGET1) 5200 <1> add dx, paras(CODETARGET1) 5201 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 5202 <1> mov ax, bx 5203 <1> add ax, paras(auxbuff_size) 5204 <1> %if AUXTARGET1_equate <= CODETARGET1_equate 5205 <1> ... 5206 <1> %endif 5207 <1> %endif 5208 <1> mov cx, dx 5209 <1> %endif 5210 <1> 5211 <1> ; REM: Only history segment is behind auxbuff. 5212 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 5213 00002199 A1[6C0B] <1> mov ax, word [history.segorsel + soaSegSel] 5214 <1> ; => history segment 5215 0000219C 89C2 <1> mov dx, ax 5216 0000219E 01F2 <1> add dx, si 5217 000021A0 B90002 <1> mov cx, paras(historysegment_size) 5218 000021A3 E863F2 <1> call init_movp 5219 <1> init_app_layout_common: 5220 000021A6 0136[6C0B] <1> add word [history.segorsel + soaSegSel], si 5221 <1> %if _PM 5222 <1> add word [history.segorsel + soaSegment], si 5223 <1> %endif 5224 <1> %else 5225 <1> init_app_layout_common: 5226 <1> %endif 5227 000021AA 2E0136[900A] <1> add word [cs:memsize], si 5228 000021AF 8E06[4A0A] <1> mov es, word [auxbuff_segorsel + soaSegSel] 5229 000021B3 BF1020 <1> mov di, fromwords(words(_AUXBUFFSIZE)) 5230 000021B6 89F1 <1> mov cx, si 5231 000021B8 D1E9 <1> shr cx, 1 5232 000021BA 31C0 <1> xor ax, ax 5233 000021BC F3AB <1> rep stosw ; initialise auxbuff trail 5234 000021BE F8 <1> clc 5235 000021BF C3 <1> retn 5236 <1> 5237 <1> 5238 <1> init_app_layout_2: 5239 <1> %if 0 5240 <1> mov bx, ds 5241 <1> mov dx, bx 5242 <1> add bx, paras(AUXTARGET2) 5243 <1> add dx, paras(CODETARGET2) 5244 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 5245 <1> %if (paras(AUXTARGET1_equate) + paras(auxbuff_size_equate)) != (paras(CODETARGET2_equate) + paras(ldebug_codes_truncated_size_equate)) 5247 <1> ... 5248 <1> %endif 5249 <1> %endif 5250 <1> %endif 5251 <1> 5252 <1> ; REM: Code1/code2 and history segment are behind auxbuff. 5253 000021C0 A1[1001] <1> mov ax, word [code_seg] 5254 000021C3 89C2 <1> mov dx, ax 5255 000021C5 01F2 <1> add dx, si 5256 000021C7 B9760D <1> mov cx, ldebug_code_bootldr_truncated_size_p + ldebug_code2_size_p + paras(historysegment_size) 5259 000021CA E83CF2 <1> call init_movp 5260 <1> 5261 000021CD 8EC2 <1> mov es, dx 5262 000021CF 0136[1001] <1> add word [code_seg], si 5263 <1> %if _DUALCODE 5264 <1> add word [code2_seg], si 5265 <1> mov dx, word [code2_seg] 5266 <1> repatch_relocate: 5267 <1> push si 5268 <1> %if ! _PM 5269 <1> mov si, relocate_from_code 5270 <1> mov di, relocate_from_code.end 5271 <1> call .patch 5272 <1> mov si, relocate_from_code2 5273 <1> mov di, relocate_from_code2.end 5274 <1> %endif 5275 <1> push es 5276 <1> mov es, dx 5277 <1> pop dx 5278 <1> %if ! _PM 5279 <1> call .patch 5280 <1> jmp .done 5281 <1> 5282 <1> .loop: 5283 <1> cs lodsw 5284 <1> xchg bx, ax 5285 <1> mov word [es:bx], dx 5286 <1> .patch: 5287 <1> cmp si, di 5288 <1> jb .loop 5289 <1> retn 5290 <1> 5291 <1> .done: 5292 <1> pop si 5293 <1> %endif 5294 <1> %endif 5295 <1> 5296 <1> %if _AREAS && _AREAS_HOOK_CLIENT 5297 <1> mov ax, si 5298 <1> call add_to_areas_linear_code1 5299 <1> %if _DUALCODE && _EXPRDUALCODE 5300 <1> mov ax, si 5301 <1> call add_to_areas_linear_code2 5302 <1> %endif 5303 <1> %endif 5304 <1> 5305 000021D3 EBD1 <1> jmp init_app_layout_common 5306 <1> 5307 <1> 5308 <1> ; REM: Only history segment is behind auxbuff. 5309 <1> init_app_layout_3: equ init_app_layout_1 5310 <1> %if 0 5311 <1> ; If both prior attempts failed, we allocate 5312 <1> ; an additional 8 KiB and move the buffer to 5313 <1> ; that. This should always succeed. 5314 <1> mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 5317 <1> ; enlarge the final memory block size 5318 <1> 5319 <1> mov bx, ds 5320 <1> add bx, paras(AUXTARGET3) 5321 <1> mov dx, cx 5322 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 5323 <1> mov ax, bx 5324 <1> add ax, paras(auxbuff_size) 5325 <1> %endif 5326 <1> %endif 5327 <1> 5328 <1> 5329 <1> %if _DEVICE 5330 <1> init_dev_layout_1: 5331 <1> %if 0 5332 <1> mov bx, ds 5333 <1> add bx, paras(DEVICEADJUST) 5334 <1> mov dx, bx 5335 <1> add bx, paras(AUXTARGET1) 5336 <1> add dx, paras(CODETARGET1) 5337 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 5338 <1> mov ax, bx 5339 <1> add ax, paras(auxbuff_size) 5340 <1> %endif 5341 <1> mov cx, dx 5342 <1> %endif 5343 000021D5 E8C1FF <1> call init_app_layout_1 5344 000021D8 EB08 <1> jmp init_dev_layout_common 5345 <1> 5346 <1> 5347 <1> init_dev_layout_2: 5348 <1> %if 0 5349 <1> mov bx, ds 5350 <1> add bx, paras(DEVICEADJUST) 5351 <1> mov dx, bx 5352 <1> add bx, paras(AUXTARGET2) 5353 <1> add dx, paras(CODETARGET2) 5354 <1> %endif 5355 000021DA E8E3FF <1> call init_app_layout_2 5356 000021DD EB03 <1> jmp init_dev_layout_common 5357 <1> 5358 <1> 5359 <1> init_dev_layout_3: 5360 <1> %if 0 5361 <1> mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 5364 <1> ; enlarge the final memory block size 5365 <1> 5366 <1> mov bx, ds 5367 <1> add bx, paras(DEVICEADJUST) 5368 <1> add bx, paras(AUXTARGET3) 5369 <1> mov dx, cx 5370 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 5371 <1> mov ax, bx 5372 <1> add ax, paras(auxbuff_size) 5373 <1> %endif 5374 <1> %endif 5375 <1> 5376 000021DF E8B7FF <1> call init_app_layout_3 5377 <1> init_dev_layout_common: 5378 000021E2 0136[3E0C] <1> add word [device_mcb_paragraphs], si 5379 <1> ; fix our variable 5380 000021E6 0136[1C01] <1> add word [alloc_size], si ; this one too 5381 000021EA 8CD8 <1> mov ax, ds ; => PSP 5382 000021EC 2E0306[900A] <1> add ax, word [cs:memsize] ; => where to place container sig 5383 000021F1 E8AFE5 <1> call init_dev_place_container_signature 5384 <1> ; CHG: es, di, cx, si 5385 <1> ; ax => behind memory used for device 5386 000021F4 8E06[C80C] <1> mov es, word [reg_es] 5387 000021F8 8B1E[A80C] <1> mov bx, word [reg_ebx] ; -> device request header 5388 000021FC 26894710 <1> mov word [es:bx + 0Eh + 2], ax ; -> behind memory in use 5389 00002200 F8 <1> clc 5390 00002201 C3 <1> retn 5391 <1> %endif 5392 <1> 5393 <1> 5394 <1> init_layout_none: 5395 00002202 F9 <1> stc 5396 00002203 C3 <1> retn 5397 <1> 5398 <1> 5399 <1> %if _AREAS && _AREAS_HOOK_CLIENT 5400 <1> add_to_areas_linear_code1: 5401 <1> xor dx, dx 5402 <1> mov cx, 4 5403 <1> @@: 5404 <1> shl ax, 1 5405 <1> rcl dx, 1 5406 <1> loop @B 5407 <1> 5408 <1> add word [areas_sub + areastrucsubLinear], ax 5409 <1> adc word [areas_sub + areastrucsubLinear + 2], dx 5410 <1> add word [areas_sub + areastrucsubLinearEnd], ax 5411 <1> adc word [areas_sub + areastrucsubLinearEnd + 2], dx 5412 <1> 5413 <1> add word [areas_fun + areastrucfunLinear], ax 5414 <1> adc word [areas_fun + areastrucfunLinear + 2], dx 5415 <1> add word [areas_fun + areastrucfunLinearEnd], ax 5416 <1> adc word [areas_fun + areastrucfunLinearEnd + 2], dx 5417 <1> retn 5418 <1> 5419 <1> %if _DUALCODE && _EXPRDUALCODE 5420 <1> add_to_areas_linear_code2: 5421 <1> xor dx, dx 5422 <1> mov cx, 4 5423 <1> @@: 5424 <1> shl ax, 1 5425 <1> rcl dx, 1 5426 <1> loop @B 5427 <1> 5428 <1> add word [areas_sub + AREASTRUCSUB_size + areastrucsubLinear], ax 5429 <1> adc word [areas_sub + AREASTRUCSUB_size + areastrucsubLinear + 2], dx 5430 <1> add word [areas_sub + AREASTRUCSUB_size + areastrucsubLinearEnd], ax 5431 <1> adc word [areas_sub + AREASTRUCSUB_size + areastrucsubLinearEnd + 2], dx 5432 <1> retn 5433 <1> %endif 5434 <1> %endif 5435 <1> 5436 <1> 5437 <1> %if _CONFIG 5438 <1> do_truename: 5439 <1> .: 5440 00002204 16 <1> push ss 5441 00002205 1F <1> pop ds 5442 00002206 89D6 <1> mov si, dx ; ds:si -> source 5443 00002208 16 <1> push ss 5444 00002209 07 <1> pop es 5445 0000220A 89D7 <1> mov di, dx ; es:di -> destination (same) 5446 0000220C B460 <1> mov ah, 60h 5447 0000220E CD21 <1> int 21h 5448 00002210 7309 <1> jnc .done 5449 00002212 803C00 <1> cmp byte [si], 0 ; empty ? (kernel rejects this) 5450 00002215 C7042E00 <1> mov word [si], "." ; make a dot + NUL (current directory) 5451 00002219 74E9 <1> je . ; if expected failure then repeat --> 5452 <1> 5453 <1> .done: 5454 0000221B B000 <1> mov al, 0 5455 0000221D B98000 <1> mov cx, 128 5456 00002220 F2AE <1> repne scasb ; scan for NUL 5457 00002222 4F <1> dec di ; -> at the NUL 5458 <1> 5459 <1> @@: 5460 00002223 39F7 <1> cmp di, si 5461 00002225 760C <1> jbe @F 5462 00002227 807DFF2F <1> cmp byte [di - 1], '/' 5463 0000222B 740A <1> je @FF 5464 0000222D 807DFF5C <1> cmp byte [di - 1], '\' 5465 00002231 7404 <1> je @FF 5466 <1> @@: 5467 00002233 C6055C <1> mov byte [di], '\' 5468 00002236 47 <1> inc di 5469 <1> @@: 5470 00002237 C3 <1> retn 5471 <1> %endif 7664 7665 usesection INIT 7666 00002238 00 align 16, db 0 7667 init_size equ $-section.INIT.vstart 7668 endarea init, 1 7669 7670 7671 usesection lDEBUG_DATA_ENTRY 7672 00005B02 00 align 16, db 0 7673 ldebug_data_entry_size equ $-section.lDEBUG_DATA_ENTRY.vstart 7674 endarea ldebug_data_entry, 1 7675 7676 usesection ASMTABLE1 7677 000016C3 00 align 16, db 0 7678 asmtable1_size equ $-section.ASMTABLE1.vstart 7679 endarea asmtable1, 1 7680 7681 usesection ASMTABLE2 7682 0000089C 00 align 16, db 0 7683 asmtable2_size equ $-section.ASMTABLE2.vstart 7684 endarea asmtable2, 1 7685 7686 7687 usesection MESSAGESEGMENT 7688 00005517 00 align 16, db 0 7689 messagesegment_size equ $-section.MESSAGESEGMENT.vstart 7690 endarea messagesegment, 1 7691 7692 7693 usesection DATASTACK 7694 %define SECTIONFIXUP - $$ + 100h + DATAENTRYTABLESIZE 7695 7696 ; I/O buffers 7697 alignb 2 7698 00000000 ?? line_in: resb 1 ; maximal length of input line 7699 00000001 ?? resb 1 ; actual length (must be one less than previous byte) 7700 00000002 resb 255 ; buffer for 13-terminated input line 7701 .end: 7702 7703 %if _CONFIG 7704 00000101 ?? alignb 2 7705 00000102 configpath: resb 128 + 256 7706 00000282 ???? .dir_end: resw 1 7707 7708 alignb 2 7709 00000284 scriptspath: resb 128 + 256 7710 00000404 ???? .dir_end: resw 1 7711 7712 yy_try_scriptspath: 7713 00000406 ?? .nokeywordused: resb 1 7714 00000407 ?? .didnotyettry: resb 1 7715 %endif 7716 7717 ; zero-initialisation starts here 7718 ..@init_first: 7719 ; b_bplist and g_bplist are expected in that order by initcont 7720 %if _BREAKPOINTS 7721 alignb 2 7722 b_bplist: 7723 00000408 ???? .used_mask: resb (_NUM_B_BP + _NUM_SYM_BP + 7) >> 3 7724 ; bitmask of used points 7725 0000040A ???? .disabled_mask: resb (_NUM_B_BP + _NUM_SYM_BP + 7) >> 3 7726 ; bitmask of disabled points 7727 %if _BREAKPOINTS_STICKY 7728 .sticky_mask: resb (_NUM_B_BP + _NUM_SYM_BP + 7) >> 3 7729 ; bitmask of sticky points 7730 ; desc: stay around during DEBUG's operation unless 7731 ; explicitly removed/un-stickified. This allows 7732 ; to keep breakpoints around while changing from PM. 7733 ; Hits while in DEBUG are ignored though, use DDEBUG. 7734 ; Disabling won't remove them, just ignores hits. 7735 %endif 7736 alignb 2 7737 0000040C .bp: resb (_NUM_B_BP + _NUM_SYM_BP) * BPSIZE 7738 alignb 2 7739 0000046C .counter: resw _NUM_B_BP 7740 alignb 2 7741 0000048C .id: resw _NUM_B_BP ; array of lengths/offsets, 0 = unused 7742 ; low 10 bits = offset into .idbuffer (0..1023) 7743 ; high 6 bits = length (0..63, 0 if unused) 7744 alignb 2 7745 000004AC .when: resw _NUM_B_BP ; array of pointers, 0 = unused 7746 7747 .idbuffer.length: equ _NUM_B_ID_BYTES 7748 .idbuffer.free: 7749 000004CC ???? resw 1 ; offset into .idbuffer of free space 7750 ; (0..1024) 7751 7752 .whenbuffer.length: equ _NUM_B_WHEN_BYTES 7753 .whenbuffer.free: 7754 000004CE ???? resw 1 ; *offset* into .whenbuffer 7755 ; (not a pointer) 7756 7757 .idbuffer: 7758 000004D0 resb .idbuffer.length ; buffer holding ID strings 7759 .whenbuffer: 7760 00000650 resb .whenbuffer.length ; buffer holding condition strings 7761 %endif 7762 %if _NUM_G_BP 7763 00000A50 ?? resb 1 - (($-$$) % 2) ; make g_bplist.bp aligned 7764 g_bplist: 7765 00000A51 ?? .used_count: resb 1 ; for the byte counter of saved breakpoints 7766 00000A52 .bp: resb _NUM_G_BP*BPSIZE 7767 .end: 7768 %endif 7769 00000AB2 ?? sss_silent_count_used: resb 1 7770 %if _HISTORY && ! _HISTORY_SEPARATE_FIXED 7771 alignb 2 7772 historybuffer: resb _HISTORY_SIZE 7773 .end: 7774 %endif 7775 7776 ; $ - $$ = offset into section 7777 ; % 2 = 1 if odd offset, 0 if even 7778 ; 2 - = 1 if odd, 2 if even 7779 ; % 2 = 1 if odd, 0 if even 7780 ; resb (2 - (($-$$) % 2)) % 2 7781 ; $ - $$ = offset into section 7782 ; % 2 = 1 if odd offset, 0 if even 7783 ; 1 - = 0 if odd, 1 if even 7784 resb 1 - (($-$$) % 2) ; make line_out aligned 7785 00000AB3 ?? trim_overflow: resb 1 ; actually part of line_out to avoid overflow of trimputs loop 7786 00000AB4 line_out: resb 263 7787 00000BBB ?? resb 1 ; reserved for terminating zero 7788 line_out_end: 7789 alignb 2 7790 00000BBC ???? line_out_overflow: resw 1 ; 2642h if line_out didn't overflow 7791 7792 00000BBE ???? alignb 4 7793 00000BC0 ???????? sss_silent_count: resd 1 7794 alignb 2 7795 00000BC4 ???? getrange_lines: resw 1 7796 7797 00000BC6 ???? serial_save_irq_mask: resw 1 7798 00000BC8 ???? serial_save_irq_off: resw 1 7799 00000BCA ???? serial_save_dl: resw 1 7800 00000BCC ?? serial_save_ier: resb 1 7801 00000BCD ?? serial_save_lcr: resb 1 7802 00000BCE ?? serial_save_mcr: resb 1 7803 %if _USE_TX_FIFO 7804 00000BCF ?? serial_fcr_setting: resb 1 7805 %endif 7806 00000BD0 ?? serial_use_intnum: resb 1 7807 00000BD1 ?? serial_use_params: resb 1 7808 00000BD2 ?? serial_use_fifo: resb 1 7809 %if _RH 7810 00000BD3 ?? rh_display_with_count: resb 1 7811 alignb 2 7812 00000BD4 ???? rh_count_number: resw 1 7813 %endif 7814 alignb 2 7815 baseport: 7816 00000BD6 ???? serial_use_baseport: resw 1 7817 00000BD8 ???? serial_use_dl: resw 1 7818 00000BDA ???? serial_use_irqmask: resw 1 7819 7820 alignb 2 7821 00000BDC ???? rxhead: resw 1 7822 00000BDE ???? rxtail: resw 1 7823 00000BE0 ???? txhead: resw 1 7824 00000BE2 ???? txtail: resw 1 7825 00000BE4 alignb 16 7826 00000BF0 rxfifo: resb _RXFIFOSIZE 7827 alignb 16 7828 00000C70 txfifo: resb _TXFIFOSIZE 7829 7830 %if _HELP_COMPRESSED 7831 alignb 16 7832 hshrink_message_buffer: 7833 resb 1024 * 3 7834 .end: 7835 %endif 7836 7837 %if _SYMBOLIC 7838 %if _BUFFER_86MM_SLICE || _XMS_SYMBOL_TABLE 7839 alignb 16 7840 access_slice_buffer: 7841 .: 7842 resb ssString + 255 7843 alignb 2 7844 .size: equ $ - . 7845 %if _SECOND_SLICE 7846 alignb 16 7847 second_access_slice_buffer: 7848 .: 7849 resb ssString + 255 7850 alignb 2 7851 .size: equ $ - . 7852 %endif 7853 %endif 7854 %endif 7855 7856 alignb 2 7857 while_buffer: 7858 .length equ _WHILEBUFFSIZE 7859 00000CF0 resb .length 7860 .end: 7861 7862 %if _SYMBOLIC 7863 alignb 16 7864 str_buffer: resb 512 ; long enough for smName1 + smName2 content 7865 ; by placing this buffer below the stack, a stack overflow 7866 ; might be less harmful if the str_buffer isn't in use. 7867 %endif 7868 7869 ; zero-initialisation ends here 7870 ..@init_behind: 7871 7872 00000DF8 ???????????????? alignb 16 ; stack might be re-used as GDT, so align it on a paragraph 7873 00000E00 stack: resb _STACKSIZE 7874 alignb 2 ; ensure stack aligned 7875 stack_end: 7876 7877 alignb 16 7878 datastack_size equ $-section.DATASTACK.vstart 7879 endarea datastack, 1 7880 7881 7882 auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 7883 endarea auxbuff, 1 7884 7885 auxbuff_max_size: equ (_AUXBUFFMAXSIZE+15) & ~15 7886 endarea auxbuff_max, 1 7887 7888 7889 pspsegment_size: equ 100h + DATAENTRYTABLESIZE + datastack_size 7890 endarea pspsegment, 1 ; size of PSP and image when installed 7891 7892 7893 numdef SHOWASMTABLESIZE, _DEFAULTSHOWSIZE 7894 %if _SHOWASMTABLESIZE 7895 %assign ASMTABLESIZE asmtable1_size + asmtable2_size 7896 %warning asmtables hold ASMTABLESIZE bytes 7897 %endif 7898 7899 7900 %assign __INITSIZE init_size 7901 %if __INITSIZE > (64 * 1024) 7902 %error init segment too large (%[__INITSIZE]) 7903 %endif 7904 7905 numdef SHOWINITSIZE, _DEFAULTSHOWSIZE 7906 %if _SHOWINITSIZE 7907 %warning init segment holds __INITSIZE bytes 7908 %endif 7909 7910 7911 %assign __CODESIZE ldebug_code_size 7912 %if __CODESIZE > (64 * 1024) 7913 %error code segment too large (%[__CODESIZE]) 7914 %endif 7915 7916 numdef SHOWCODESIZE, _DEFAULTSHOWSIZE 7917 %if _SHOWCODESIZE 7918 %warning code segment holds __CODESIZE bytes 7919 %endif 7920 7921 7922 %assign __CODETRUNCATEDSIZE ldebug_code_bootldr_truncated_size 7923 %assign __CODEDISCARDSIZE ldebug_code_size - ldebug_code_bootldr_truncated_size 7924 7925 %if _BOOTLDR_DISCARD 7926 numdef SHOWCODETRUNCATEDSIZE, _DEFAULTSHOWSIZE 7927 %else 7928 numdef SHOWCODETRUNCATEDSIZE, 0 7929 %endif 7930 %if _SHOWCODETRUNCATEDSIZE 7931 %warning code segment truncated holds __CODETRUNCATEDSIZE bytes (__CODEDISCARDSIZE bytes discarded) 7932 %endif 7933 7934 7935 %assign __CODE2SIZE ldebug_code2_size 7936 %if __CODE2SIZE > (64 * 1024) 7937 %error code segment 2 too large (%[__CODE2SIZE]) 7938 %endif 7939 7940 %if _DUALCODE 7941 numdef SHOWCODE2SIZE, _DEFAULTSHOWSIZE 7942 %else 7943 numdef SHOWCODE2SIZE, 0 7944 %endif 7945 %if _SHOWCODE2SIZE 7946 %warning code segment 2 holds __CODE2SIZE bytes 7947 %endif 7948 7949 7950 %assign __MESSAGESEGMENTSIZE messagesegment_size 7951 %if __MESSAGESEGMENTSIZE > (64 * 1024) 7952 %error message segment too large (%[__MESSAGESEGMENTSIZE]) 7953 %endif 7954 7955 %if _MESSAGESEGMENT 7956 numdef SHOWMESSAGESEGMENTSIZE, _DEFAULTSHOWSIZE 7957 %else 7958 numdef SHOWMESSAGESEGMENTSIZE, 0 7959 %endif 7960 %if _SHOWMESSAGESEGMENTSIZE 7961 %warning message segment holds __MESSAGESEGMENTSIZE bytes 7962 %endif 7963 7964 7965 %assign __MESSAGESEGMENTTRUNCATEDSIZE messagesegment_truncated_size 7966 %assign __MESSAGESEGMENTDISCARDSIZE messagesegment_size - messagesegment_truncated_size 7967 7968 %if _BOOTLDR_DISCARD_HELP 7969 numdef SHOWMESSAGESEGMENTTRUNCATEDSIZE, _DEFAULTSHOWSIZE 7970 %else 7971 numdef SHOWMESSAGESEGMENTTRUNCATEDSIZE, 0 7972 %endif 7973 %if _SHOWMESSAGESEGMENTTRUNCATEDSIZE 7974 %warning message segment truncated holds __MESSAGESEGMENTTRUNCATEDSIZE bytes (__MESSAGESEGMENTDISCARDSIZE bytes discarded) 7975 %endif 7976 7977 7978 %assign __PSPSEGMENTSIZE pspsegment_size 7979 %if __PSPSEGMENTSIZE > (64 * 1024) 7980 %error resident size of PSP segment too large (%[__PSPSEGMENTSIZE]) 7981 %endif 7982 7983 numdef SHOWPSPSIZE, _DEFAULTSHOWSIZE 7984 %if _SHOWPSPSIZE 7985 %warning PSP segment holds __PSPSEGMENTSIZE bytes 7986 %endif 7987 7988 %if CODE_INSURE_COUNT 7989 %warning code_insure_low_byte_not_0CCh needed CODE_INSURE_COUNT times 7990 %endif