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 -] 150 <3> [list -] 137 <2> [list -] 124 <1> [list -] 126 <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 118 addsection ASMTABLE1, align=16 follows=lDEBUG_DATA_ENTRY 119 addsection ASMTABLE2, align=16 follows=ASMTABLE1 120 addsection lDEBUG_CODE, align=16 follows=ASMTABLE2 vstart=0 121 code_start: 122 addsection DATASTACK, align=16 follows=ASMTABLE2 nobits 123 addsection INIT, align=16 follows=lDEBUG_CODE vstart=0 124 125 126 usesection lDEBUG_DATA_ENTRY 127 128 %define DATASECTIONFIXUP -data_entry_start+100h 129 %define CODESECTIONFIXUP -code_start+0 130 %define CODESECTIONOFFSET (100h+ldebug_data_entry_size+asmtable1_size+asmtable2_size) 131 %define INITSECTIONOFFSET (CODESECTIONOFFSET+ldebug_code_size) 132 133 %define CODETARGET1 (CODESECTIONOFFSET+datastack_size) 134 %define CODETARGET2 (CODETARGET1+auxbuff_size) 135 136 %define AUXTARGET1 (CODETARGET1+ldebug_code_size) 137 %define AUXTARGET2 CODETARGET1 138 %define AUXTARGET3 AUXTARGET1+auxbuff_size 139 140 %define NONBOOTINITTARGET (INITSECTIONOFFSET + datastack_size + auxbuff_size * 2 + historysegment_size) 144 %define NONBOOTINITSTACK_START (NONBOOTINITTARGET+init_size) 145 NONBOOTINITSTACK_SIZE equ 512 ; must be even 146 %define NONBOOTINITSTACK_END (NONBOOTINITSTACK_START+NONBOOTINITSTACK_SIZE) 147 148 BOOTINITSTACK_SIZE equ 512 ; must be divisible by 16 149 %define BOOTDELTA (fromkib(kib(auxbuff_size * 2 + historysegment_size + datastack_size + INITSECTIONOFFSET + 16))) 153 154 155 %if _DEVICE 156 ; Note: Once this is implemented, the final 157 ; copy of this device header should live 158 ; in front of our PSP. Therefore, this space 159 ; after the PSP can be re-used for the newly 160 ; expanded N buffer. (Refer to N_BUFFER_END.) 161 fill 4,0FFh,jmp initcode_j 162 dw 8000h 163 dw deviceinit -$$ 164 dw deviceinit.retf -$$ 165 fill 8,32,db "DEBUG$$" 166 %else 167 00000000 EB3E jmp initcode_j 168 %endif 169 ; Startup codes can be discarded after one of 170 ; them is used to enter the initialisation part. 171 ; Therefore the N buffer is now extended past 172 ; these codes, refer to N_BUFFER_END. 173 %if _BOOTLDR 174 00000002 00 align 32, db 0 175 00000020 8CC8 mov ax, cs 176 00000022 83E810 sub ax, 10h 177 00000025 8ED8 mov ds, ax 178 00000027 BB[0C01] mov bx, boot_initcode 179 0000002A EB18 jmp @F 180 %endif 181 0000002C 00 align 64, db 0 182 initcode_j: 183 00000040 8CC8 mov ax, cs 184 00000042 31DB xor bx, bx 185 @@: 186 00000044 05DB18 add ax, paras(INITSECTIONOFFSET) 187 00000047 50 push ax 188 00000048 53 push bx 189 00000049 CB retf 190 191 192 align 2, db 0 193 N_BUFFER_END equ $ ; end of N buffer (starts in PSP at 80h) 194 195 0000004A [4905][0384][5D5E]- cmdlist: dw aa,bb,cc,ddd,ee,ff,gg,hh,ii,error,error,ll,mm,nn,oo 195 00000050 [CB12][518C][D78D]- 195 00000056 [BD2E][B18E][DD90]- 195 0000005C [12A5][12A5][9A93]- 195 00000062 [E595][5197][4B90] 196 00000068 [623E][B299][3C20]- dw pp,qq,rr,sss,tt,uu,error,ww,xx,yy 196 0000006E [489E][4C39][7347]- 196 00000074 [12A5][71A1][F3A2]- 196 0000007A [02CA] 197 198 align 4, db 0 199 ; options, startoptions and internalflags 200 ; have to be consecutive 201 0000007C 00000000 options: dd DEFAULTOPTIONS ; run-time options 202 dispregs32 equ 1 ; RX: 32-bit register display (R, T/P/G) 203 traceints equ 2 ; TM: trace into interrupts (T) 204 cpdepchars equ 4 ; allow dumping of CP-dependant characters (D, DX) 205 fakeindos equ 8 ; always assume InDOS flag non-zero (all) 206 nonpagingdevice equ 10h ; disallow paged output with [more] prompt (all exc. P, T) 207 pagingdevice equ 20h ; allow paged output with [more] prompt (all exc. P, T) 208 ; paged output is by default on if the output device is StdOut, else off 209 hexrn equ 40h ; display raw hexadecimal content of FPU registers (RN) 210 ;novdd equ 80h ; don't use a registered NTVDM VDD (L, W) 211 nondospaging equ 100h ; paging: don't use DOS for input when waiting for a key 212 nohlt equ 200h ; HLT doesn't work, don't use it 213 biosidles equ 400h ; don't idle with HLT or Int2F.1680, only call BIOS Int16.00 214 opt_userawinput equ 800h ; use rawinput for int 21h interactive input 215 use_si_units equ 1000h ; in disp_*_size use SI units (kB = 1000, etc) 216 use_jedec_units equ 2000h ; in disp_*_size use JEDEC units (kB = 1024) 217 enable_serial equ 4000h ; enable serial I/O (preferred over DOS or BIOS terminal) 218 int8_disable_serial equ 8000h ; disable serial I/O when breaking due to intr8 219 gg_do_not_skip_bp equ 1_0000h ; gg: do not skip a breakpoint (bb or gg) 220 gg_no_autorepeat equ 2_0000h ; gg: do not auto-repeat 221 tp_do_not_skip_bp equ 4_0000h ; T/TP/P: do not skip a (bb) breakpoint 222 gg_bb_hit_no_repeat equ 8_0000h ; gg: do not auto-repeat after bb hit 223 tp_bb_hit_no_repeat equ 10_0000h ; T/TP/P: do not auto-repeat after bb hit 224 gg_unexpected_no_repeat equ 20_0000h ; gg: do not auto-repeat after unexpectedinterrupt 225 tp_unexpected_no_repeat equ 40_0000h ; T/TP/P 226 ss_no_dump: equ 80_0000h 227 rr_disasm_no_rept: equ 1000_0000h 228 rr_disasm_no_show: equ 2000_0000h 229 opt_cmdline_quiet_input:equ 4000_0000h 230 opt_cmdline_quiet_output:equ 8000_0000h 231 DEFAULTOPTIONS equ 0 232 233 00000080 10410000 options2: dd DEFAULTOPTIONS2 234 opt2_db_header: equ 1 235 opt2_db_trailer: equ 2 236 opt2_dw_header: equ 10h 237 opt2_dw_trailer: equ 20h 238 opt2_dd_header: equ 100h 239 opt2_dd_trailer: equ 200h 240 opt2_rawinput_dpmi: equ 800h 241 opt2_hh_compat: equ 1000h 242 opt2_getc_idle: equ 2000h 243 opt2_getc_idle_dpmi: equ 4000h 244 opt2_re_cancel_tpg: equ 8000h 245 DEFAULTOPTIONS2 equ opt2_dw_header | opt2_dd_header | opt2_getc_idle_dpmi 246 247 00000084 0F000060 options3: dd DEFAULTOPTIONS3 248 opt3_tt_no_paging: equ 1 249 opt3_tp_no_paging: equ 2 250 opt3_pp_no_paging: equ 4 251 opt3_gg_no_paging: equ 8 252 opt3_silence_paging_set:equ 100h 253 opt3_silence_paging_on: equ 200h 254 opt3_r_highlight_diff: equ 10000h 255 opt3_r_highlight_dumb: equ 20000h 256 opt3_r_highlight_full: equ 40000h 257 opt3_r_highlight_eip: equ 80000h 258 %if _PM 259 opt3_ss_b_bit_set: equ 10_0000h 260 %endif 261 opt3_no_idle_2F: equ 200_0000h 262 %if _DELAY_BEFORE_BP 263 opt3_delay_before_bp: equ 400_0000h 264 %endif 265 opt3_no_call_update: equ 800_0000h 266 opt3_disable_autorepeat:equ 1000_0000h 267 opt3_check_ctrlc_keyb: equ 2000_0000h 268 opt3_check_ctrlc_0bh: equ 4000_0000h 269 opt3_tsr_quit_leave_tf: equ 8000_0000h 270 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 273 274 00000088 02000000 options4: dd DEFAULTOPTIONS4 275 opt4_int_2F_hook: equ 2 276 opt4_int_08_hook: equ 4 277 opt4_int_2D_hook: equ 8 278 opt4_int_serial_force: equ 1_0000h 279 opt4_int_2F_force: equ 2_0000h 280 opt4_int_08_force: equ 4_0000h 281 opt4_int_2D_force: equ 8_0000h 282 opt4_int_00_force: equ 100_0000h 283 opt4_int_01_force: equ 200_0000h 284 opt4_int_03_force: equ 400_0000h 285 opt4_int_06_force: equ 800_0000h 286 opt4_int_18_force: equ 1000_0000h 287 opt4_int_19_force: equ 2000_0000h 288 DEFAULTOPTIONS4 equ opt4_int_2F_hook 289 ; options, options2, options3, options4 290 ; are each assumed to be dwords 291 ; and all consecutive in expr.asm isvariable? 292 293 0000008C 00000000 startoptions: dd DEFAULTOPTIONS ; options as determined during startup; read-only for user 294 00000090 10410000 startoptions2: dd DEFAULTOPTIONS2 295 00000094 0F000060 startoptions3: dd DEFAULTOPTIONS3 296 00000098 02000000 startoptions4: dd DEFAULTOPTIONS4 297 ; startoptions, startoptions2, startoptions3, startoptions4 298 ; are each assumed 299 ; to be dwords and all consecutive in expr.asm isvariable? 300 301 0000009C F8348000 internalflags: dd attachedterm|pagedcommand|notstdinput|inputfile|notstdoutput|outputfile|(!!_PM*dpminohlt)|debuggeeA20|debuggerA20 302 ; flags only modified by DEBUG itself 303 oldpacket equ 1 ; Int25/Int26 packet method available (L, W) 304 newpacket equ 2 ; Int21.7305 packet method available (L, W) 305 ntpacket equ 4 ; VDD registered and usable (L, W) 306 pagedcommand equ 8 ; allows paging in puts 307 notstdinput equ 10h ; DEBUG's StdIn isn't a device with StdIn bit (is file or other device) 308 inputfile equ 20h ; DEBUG's StdIn is a file, notstdinput also set 309 notstdoutput equ 40h ; DEBUG's StdOut isn't a device with StdOut bit (is file or other device) 310 outputfile equ 80h ; DEBUG's StdOut is a file, notstdoutput also set 311 hooked2F equ 100h ; Int2F hooked 312 nohook2F equ 200h ; don't hook Int2F.1687 (required for Win9x, DosEmu?) 313 dpminohlt equ 400h ; DPMI doesn't like hlt 314 protectedmode equ 800h ; in (DPMI) protected mode 315 debuggeeA20 equ 1000h ; state of debuggee's A20 316 debuggerA20 equ 2000h ; state of debugger's A20 (will be on if possible) 317 nodosloaded equ 4000h ; No DOS loaded currently (Boot loader mode) 318 has386 equ 8000h ; CPU is a 386 319 usecharcounter equ 1_0000h ; don't reset charcounter between calls to puts 320 runningnt equ 2_0000h ; running in NTVDM 321 canswitchmode equ 4_0000h ; can switch modes (auxbuff large enough, DPMI mode switch set up) 322 modeswitched equ 8_0000h ; switched mode (now in the mode that we weren't entered in) 323 promptwaiting equ 10_0000h ; puts: any more output needs to display a prompt first 324 switchbuffer equ 20_0000h ; mode switch needs a buffer (auxbuff) 325 tsrmode equ 40_0000h ; in TSR mode; DPI and DPP not valid 326 attachedterm equ 80_0000h ; the attached process terminated 327 runningdosemu equ 100_0000h ; running in dosemu 328 ; load_is_ldp equ 200_0000h ; boot load: partition specified as "ldp" 329 tt_while: equ 400_0000h ; tt: while condition specified 330 tt_p: equ 800_0000h ; tt: proceed past repeated string instructions 331 tt_silent_mode: equ 1000_0000h ; tt: run should be silent (dump at end) 332 tt_silence: equ 2000_0000h ; tt: silent writing (write to auxbuff instead) 333 tt_no_bb: equ 4000_0000h ; tt: do not use bb breakpoints 334 tt_no_bb_first: equ 8000_0000h ; tt: do not use bb breakpoints at first 335 336 000000A0 00000000 internalflags2: dd 0 337 dif2_gg_is_first: equ 1 338 dif2_gg_skip_non_cseip: equ 2 339 dif2_gg_skip_cseip: equ 4 340 dif2_gg_is_gg: equ 8 341 dif2_gg_first_detected: equ 10h 342 dif2_gg_again: equ 20h 343 dif2_tpg_proceed_bp_set:equ 40h 344 dif2_tpg_keep_proceed_bp: equ 80h 345 dif2_tpg_have_bp: equ 100h 346 dif2_tpg_adjusted_cseip:equ 200h 347 dif2_tpg_do_not_adjust: equ 400h 348 dif2_bp_failure: equ 800h 349 dif2_is_pp: equ 1000h 350 %if _INPUT_FILE_HANDLES 351 dif2_input_file: equ 10_0000h 352 dif2_closed_input_file: equ 20_0000h 353 %endif 354 dif2_did_getline_file: equ 40_0000h 355 dif2_boot_loaded_kernel:equ 100_0000h 356 %if _INPUT_FILE_BOOT 357 dif2_input_file_boot: equ 200_0000h 358 dif2_closed_input_file_boot: equ 400_0000h 359 %endif 360 dif2_in_silence_dump: equ 1000_0000h 361 dif2_int31_segment: equ 2000_0000h 362 363 000000A4 80000000 internalflags3: dd dif3_partition_changed 364 dif3_load_is_ldp: equ 1 ; boot load: partition specified as "ldp" 365 dif3_load_is_sdp: equ 2 ; boot load: partition specified as "sdp" 366 dif3_load_is_ydp: equ 4 ; boot load: partition specified as "ydp" 367 dif3_load_is_dp: equ dif3_load_is_ldp | dif3_load_is_sdp | dif3_load_is_ydp 370 dif3_load_dir_dir: equ 8 371 dif3_input_terminal_override: equ 10h 372 dif3_input_serial_override: equ 20h 373 dif3_if_not: equ 40h 374 dif3_partition_changed: equ 80h 375 ; 376 dif3_input_cmdline: equ 100h; input reading from cmdline_buffer 377 dif3_input_cmdline_closed: equ 200h 378 dif3_at_line_end: equ 400h 379 dif3_quiet_input_single:equ 800h 380 dif3_quiet_output: equ 1000h 381 dif3_unquiet_error: equ 2000h 382 dif3_unquiet_prompt: equ 4000h 383 dif3_unquiet: equ dif3_unquiet_error | dif3_unquiet_prompt 384 dif3_return_eof: equ 8000h 385 dif3_highlighting: equ 1_0000h 386 dif3_do_not_highlight: equ 2_0000h 387 dif3_int10_highlight: equ 2_0000h 388 %if _PM 389 dif3_ss_b_bit_set: equ 10_0000h 390 %endif 391 %if _DELAY_BEFORE_BP 392 dif3_delayed equ 80_0000h 393 %endif 394 dif3_input_re: equ 100_0000h ; input reading from re_buffer 395 dif3_input_re_closed: equ 200_0000h 396 dif3_accept_getrange_0: equ 400_0000h 397 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 398 dif3_in_if: equ 800_0000h 399 %endif 400 dif3_auxbuff_guarded_1: equ 1000_0000h 401 dif3_auxbuff_guarded_2: equ 2000_0000h 402 dif3_prior_pm: equ 4000_0000h 403 dif3_sss_is_reverse: equ 8000_0000h 404 405 000000A8 00000000 internalflags4: dd 0 406 dif4_int_serial_hooked: equ 1 407 dif4_int_2F_hooked: equ 2 408 dif4_int_08_hooked: equ 4 409 dif4_int_2D_hooked: equ 8 410 ; internalflags, internalflags2, internalflags3, internalflags4 411 ; are each assumed 412 ; to be dwords and all consecutive in expr.asm isvariable? 413 414 000000AC 07000000 asm_options: dd DEFAULTASMOPTIONS 415 disasm_lowercase equ 1 416 disasm_commablank equ 2 417 disasm_nasm equ 4 418 disasm_lowercase_refmem:equ 8 419 disasm_show_short: equ 10h 420 disasm_show_near: equ 20h 421 disasm_show_far: equ 40h 422 DEFAULTASMOPTIONS equ disasm_lowercase|disasm_commablank|disasm_nasm 423 424 asm_startoptions: 425 000000B0 07000000 dd DEFAULTASMOPTIONS 426 427 000000B4 00000000 gg_first_cseip_linear: dd 0 428 000000B8 00000000 gg_next_cseip_linear: dd 0 429 000000BC 00000000 tpg_possible_breakpoint:dd 0 430 000000C0 [6370] gg_deferred_message: dw msg.empty_message 431 bb_deferred_message_in_lineout_behind: 432 000000C2 0000 dw 0 433 align 4, db 0 434 000000C4 00 tpg_proceed_bp: times BPSIZE db 0 435 %if _DEBUG1 436 align 2, db 0 437 test_records_Readmem: times 6 * 16 db 0 438 test_records_Writemem: times 6 * 16 db 0 439 test_records_getLinear: times 6 * 16 db 0 440 test_records_getSegmented: times 6 * 16 db 0 441 442 test_readmem_value: db 0 443 %endif 444 000000CD 00 align 2, db 0 445 000000CE 0000 code_seg: dw 0 446 %if _PM 447 000000D0 0000 code_sel: dw 0 448 %endif 449 450 000000D2 00 align 16, db 0 451 000000E0 00 cmdline_buffer: times 256 db 0 452 000001E0 [E000] .position: dw cmdline_buffer 453 454 000001E2 0D db 13 455 000001E3 0D align 2, db 13 ; insure the re_buffer is prefixed by CR 456 re_buffer: 457 .size: equ _RE_BUFFER_SIZE 458 000001E4 405200 fill .size,0,db "@R" 459 .end: 460 000009E4 [E401] .position: dw re_buffer 461 462 000009E6 00 align 4, db 0 463 000009E8 00000000 re_count: dd 0 464 000009EC 00010000 re_limit: dd 256 465 466 align 2, db 0 467 %if _PM 468 000009F0 0000 auxbuff_switchbuffer_size: dw 0 469 %endif 470 000009F2 00 auxbuff_segorsel:segonlyaddress 471 auxbuff_behind_while_condition: 472 000009F8 0000 dw 0 ; -> behind while condition stored in auxbuff 473 ; (this is also the first silent buffer entry) 474 auxbuff_behind_last_silent: 475 000009FA 0000 dw 0 ; -> behind last silent buffer entry 476 tt_silent_mode_number: 477 000009FC 0000 dw 0 ; if non-zero: maximum amount of dumps 478 ; displayed after T/TP/P while silent 479 %if _INPUT_FILE_HANDLES 480 000009FE 90 align INPUTFILEHANDLE_size 481 input_file_handles: 482 00000A00 FF times _INPUT_FILE_HANDLES * INPUTFILEHANDLE_size db -1 483 00000A80 0000 .active: dw 0 484 00000A82 0000 .to_close: dw 0 485 %endif 486 align 2, db 0 487 00000A84 0142 indos_remember_seek_function: dw 4201h 488 00000A86 FFFF indos_remember_seek_handle: dw -1 489 align 4, db 0 490 00000A88 00000000 indos_remember_seek_offset: dd 0 491 %if _INPUT_FILE_BOOT 492 align 4, db 0 493 00000A8C 00000000 boot_remember_seek_offset: dd 0 494 align 2, db 0 495 00000A90 FFFF boot_remember_seek_handle: dw -1 496 %endif 497 498 00000A92 00 charcounter: db 0 ; used by raw output to handle tab 499 00000A93 00 linecounter: db 0 ; used by paging in puts 500 align 4, db 0 501 00000A94 0000 savesp: dw 0 ; saved stack pointer 502 00000A96 0000 dw 0 ; 0 to set high word of esp 503 00000A98 0000 re_sp: dw 0 504 00000A9A [0000] errret: dw cmd3 ; return here if error 505 00000A9C [31A5] throwret: dw errhandler ; return here if error - priority, no display 506 00000A9E [3E0C] throwsp: dw stack_end - 2; stack pointer set before jumping to throwret 507 00000AA0 0000 run_sp: dw 0 ; stack pointer when running 508 00000AA2 4000 spadjust: dw 40h ; adjust sp by this amount for save 509 00000AA4 0000 pspdbe: dw 0 ; debuggee's PSP (unless DIF&attachedterm) 510 00000AA6 0000 pspdbg: dw 0 ; debugger's PSP (RM segment) 511 align 4, db 0 512 00000AA8 0000000000000000 run2324: dd 0,0 ; debuggee's interrupt vectors 23h and 24h (both modes) 513 %if _PM 514 00000AB0 00000000 dd 0 515 00000AB4 [848A][9F8A] dbg2324: dw i23pm, i24pm 516 %endif 517 %if _VDD 518 00000AB8 FFFF hVdd: dw -1 ; NTVDM VDD handle 519 %endif 520 00000ABA 00 align 4, db 0 521 00000ABC 0000000000000000 sav2324: dd 0,0 ; debugger's interrupt vectors 23h and 24h (real-mode only) 522 00000AC4 00 hakstat: db 0 ; whether we have hacked the vectors or not 523 00000AC5 00 align 4, db 0 524 00000AC8 00000000 psp22: dd 0 ; original terminate address from our PSP 525 00000ACC 0000 parent: dw 0 ; original parent process from our PSP (must follow psp22) 526 %if _MCB || _INT 527 00000ACE FFFF firstmcb: dw -1 ; start of MCB chain (always segment) 528 00000AD0 FFFF firstumcb: dw -1 529 %endif 530 00000AD2 00 pInDOS: segofs16address ; far16 address of InDOS flag (bimodal) 531 %if _USESDA 532 00000ADA FFFFFFFFFFFFFFFF pSDA: segofs16address minusone 533 ; far16 address of SDA (bimodal) 534 %endif 535 00000AE2 00 machine: db 0 ; type of processor for assembler and disassembler (1..6) 536 00000AE3 00 has_87: db 0 ; if there is a math coprocessor present 537 00000AE4 00 mach_87: db 0 ; type of coprocessor present 538 %if _MMXSUPP 539 00000AE5 00 has_mmx: db 0 540 %endif 541 00000AE6 01 bInDbg: db 1 ; 1=debugger is running 542 00000AE7 0A notatty: db 10 ; if standard input is from a file 543 ; this is also used for a linebreak processing hack 544 00000AE8 00 switchar: db 0 ; switch character 545 00000AE9 20 swch1: db ' ' ; switch character if it's a slash 546 align 2, db 0 547 00000AEA 0000 promptlen: dw 0 ; length of prompt 548 00000AEC [0200] bufnext: dw line_in+2 ; address of next available character 549 00000AEE [0200] bufend: dw line_in+2 ; address + 1 of last valid character 550 00000AF0 0000 rc: dw 0 551 00000AF2 0000 priorrc: dw 0 552 00000AF4 0000 erc: dw 0 553 %if _HISTORY 554 history: 555 %if _HISTORY_SEPARATE_FIXED 556 00000AF6 00 .segorsel: segonlyaddress 557 00000AFC FE1F .first: dw _HISTORY_SIZE - 2 558 00000AFE FE1F .last: dw _HISTORY_SIZE - 2 559 %else 560 .first: dw historybuffer.end - 2 561 .last: dw historybuffer.end - 2 562 %endif 563 %endif 564 565 var_addr_entries: 566 00000B00 00 a_addr: segmentedaddress; address for next A command 567 00000B0A 00 d_addr: segmentedaddress; address for next D command; must follow a_addr 568 00000B14 00 behind_r_u_addr:segmentedaddress; address behind R's disassembly 569 00000B1E 00 u_addr: segmentedaddress; address for next U command; must follow d_addr 570 00000B28 00 e_addr: segmentedaddress; address for current/next E command 571 %if _DSTRINGS 572 00000B32 00 dz_addr: segmentedaddress; address for next ASCIZ string 573 00000B3C 00 dcpm_addr: segmentedaddress; address for next $-terminated string 574 00000B46 00 dcount_addr: segmentedaddress; address for next byte-counted string 575 00000B50 00 dwcount_addr: segmentedaddress; address for next word-counted string 576 %endif 577 var_addr_entries.amount equ ($ - var_addr_entries) / SEGADR_size 578 %if _PM 579 00000B5A 00000000 x_addr: dd 0 ; (phys) address for next DX command 580 %endif 581 %if _DSTRINGS 582 00000B5E 00 dstringtype: db 0 ; FFh byte-counted, FEh word-counted, else terminator byte 583 00000B5F 00 align 2, db 0 584 00000B60 [320B] dstringaddr: dw dz_addr ; -> address of last string 585 %endif 586 %if _INT 587 00000B62 00 align 4, db 0 588 00000B64 00000000 intaddress: dd 0 589 lastint_is_86m_and_mcb: 590 00000B68 0000 dw 0 591 00000B6A 00 lastint: db 0 592 %endif 593 00000B6B 00 align 4, db 0 594 search_results: 595 %if _PM 596 00000B6C 00 times 6 * 16 db 0 597 %else 598 times 4 * 16 db 0 599 %endif 600 align 4, db 0 601 00000BCC 00000000 sscounter: dd 0 602 00000BD0 00 eqflag: db 0 ; flag indicating presence of `=' operand 603 00000BD1 00 align 2, db 0 604 00000BD2 000000000000 eqladdr: dw 0,0,0 ; address of `=' operand in G, P and T command 605 align 2, db 0 606 00000BD8 0000 run_int: dw 0 ; interrupt type that stopped the running 607 00000BDA [1404] lastcmd: dw dmycmd 608 00000BDC 00 bInit: db 0 ; 0=ensure a valid opcode is at debuggee's CS:IP 609 00000BDD 00 fileext: db 0 ; file extension (0 if no file name) 610 EXT_OTHER equ 1 611 EXT_COM equ 2 612 EXT_EXE equ 4 613 EXT_HEX equ 8 614 615 00000BDE 00 align 4, db 0 616 00000BE0 00000000 mmxbuff: dd 0 ; buffer with a (read-only) part of MMX register 617 ; for access from within expressions 618 %if _CATCHINT08 619 00000BE4 0000 intr8_counter: dw 0 620 %endif 621 00000BE6 00 maxmachinetype: db 0 622 serial_rows: 623 00000BE7 18 db 24 624 serial_columns: 625 00000BE8 50 db 80 626 serial_keep_timeout: 627 00000BE9 0F db 15 628 %if _USE_TX_FIFO 629 serial_fifo_size: 630 00000BEA 10 db _BI_TX_FIFO_SIZE 631 ; size of built-in TX fifo (1 is as if no FIFO) 632 %endif 633 serial_flags: 634 00000BEB 00 db 0 635 sf_init_done: equ 1 636 sf_ctrl_c: equ 2 637 sf_double_ctrl_c: equ 4 638 sf_built_in_fifo: equ 8 639 640 00000BEC 0B serial_var_intnum: db _INTNUM 641 00000BED 03 serial_var_params: db _UART_PARAMS 642 00000BEE 00 serial_var_fifo: db _UART_FIFO 643 00000BEF 00 align 2, db 0 644 00000BF0 F802 serial_var_baseport: dw _UART_BASE 645 00000BF2 0C00 serial_var_dl: dw _UART_RATE 646 00000BF4 0800 serial_var_irqmask: dw _OFFMASK 647 648 00000BF6 01 io_rows: db 1 649 00000BF7 01 io_columns: db 1 650 align 2, db 0 651 00000BF8 0000 io_start_buffer: dw 0 652 00000BFA 0000 io_end_buffer: dw 0 653 00000BFC FF00 io_levels: dw 255 654 00000BFE 0100 io_flags: dw DEFAULTIOFLAGS 655 iof_extra_iol_for_tpg_re: equ 1 656 DEFAULTIOFLAGS equ iof_extra_iol_for_tpg_re 657 658 align 2, db 0 659 00000C00 0000 getline_timer_count: dw 0 660 00000C02 0000 getline_timer_last: dw 0 661 00000C04 [1404] getline_timer_func: dw dmycmd 662 663 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 664 align 2, db 0 665 00000C06 0000 if_exists_then_address: dw 0 666 00000C08 0000 if_exists_si: dw 0 667 00000C0A 0000 if_exists_sp: dw 0 668 00000C0C 0000 if_exists_length: dw 0 669 %endif 670 671 align 2, db 0 672 terminator_in_line_in: 673 00000C0E 0000 .offset: dw 0 674 00000C10 00 .value: db 0 675 676 00000C11 00 termcode: db 0 677 678 align 2, db 0 679 inttab_optional: 680 .: 681 serial_installed_intnum: equ $ 682 00000C12 0000 dw 0 683 00000C14 [F895] dw serial_interrupt_handler 684 00000C16 0100 dw dif4_int_serial_hooked 685 %if _PM 686 00000C18 2F00 dw 2Fh 687 00000C1A [4089] dw debug2F 688 00000C1C 0200 dw dif4_int_2F_hooked 689 %endif 690 %if _CATCHINT08 691 00000C1E 0800 dw 8 692 00000C20 [5685] dw intr8 693 00000C22 0400 dw dif4_int_08_hooked 694 %endif 695 .amount: equ ($ - .) / 6 696 00000C24 FFFF dw -1 697 698 699 amisintr_offset: 700 00000C26 [310C] dw inttab 701 702 inttab_pre: 703 00000C28 00 times 3 * inttab_optional.amount db 0 704 705 inttab: 706 %if _CATCHINT00 707 00000C31 00 db 0 708 00000C32 [3686] dw intr0 ; table of interrupt initialization stuff 709 %endif 710 %if _CATCHINT01 711 00000C34 01 db 1 712 00000C35 [F285] dw intr1 713 %endif 714 %if _CATCHINT03 715 00000C37 03 db 3 716 00000C38 [5286] dw intr3 717 %endif 718 %if _CATCHINT06 719 00000C3A 06 db 6 720 00000C3B [6E86] dw intr6 721 %endif 722 %if _CATCHINT18 723 00000C3D 18 db 18h 724 00000C3E [8A86] dw intr18 725 %endif 726 %if _CATCHINT19 727 00000C40 19 db 19h 728 00000C41 [A686] dw intr19 729 %endif 730 endarea inttab 731 inttab_number equ inttab_size / 3 732 %if _CATCHINT2D 733 00000C43 2D .i2D: db 2Dh 734 00000C44 [4C81] dw int2D 735 %endif 736 737 738 intforcetab: 739 %if _CATCHINT00 740 00000C46 01 db opt4_int_00_force >> 24 741 %endif 742 %if _CATCHINT01 743 00000C47 02 db opt4_int_01_force >> 24 744 %endif 745 %if _CATCHINT03 746 00000C48 04 db opt4_int_03_force >> 24 747 %endif 748 %if _CATCHINT06 749 00000C49 08 db opt4_int_06_force >> 24 750 %endif 751 %if _CATCHINT18 752 00000C4A 10 db opt4_int_18_force >> 24 753 %endif 754 %if _CATCHINT19 755 00000C4B 20 db opt4_int_19_force >> 24 756 %endif 757 758 759 align 2, db 0 760 ; Parameter block for EXEC call 761 00000C4C 0000 execblk:dw 0 ;(00) zero: copy the parent's environment 762 00000C4E 00000000 dw 0,0 ;(02) address of command tail to copy 763 00000C52 5C000000 dw 5Ch,0 ;(06) address of first FCB to copy 764 00000C56 6C000000 dw 6Ch,0 ;(10) address of second FCB to copy 765 00000C5A 00000000 dw 0,0 ;(14) initial SS:SP 766 00000C5E 00000000 dw 0,0 ;(18) initial CS:IP 767 768 769 ; Register save area (32 words). 770 ; must be DWORD aligned, used as stack 771 00000C62 00 align 4, db 0 772 regs: 773 00000C64 00000000 reg_eax: dd 0 ;+00 eax 774 00000C68 00000000 reg_ebx: dd 0 ;+04 ebx 775 00000C6C 00000000 reg_ecx: dd 0 ;+08 ecx 776 00000C70 00000000 reg_edx: dd 0 ;+12 edx 777 00000C74 00000000 reg_esp: dd 0 ;+16 esp 778 00000C78 00000000 reg_ebp: dd 0 ;+20 ebp 779 00000C7C 00000000 reg_esi: dd 0 ;+24 esi 780 00000C80 00000000 reg_edi: dd 0 ;+28 edi 781 00000C84 00000000 reg_ds: dd 0 ;+32 ds (high word unused) 782 00000C88 00000000 reg_es: dd 0 ;+36 es (high word unused) 783 00000C8C 00000000 reg_ss: dd 0 ;+40 ss (high word unused) 784 00000C90 00000000 reg_cs: dd 0 ;+44 cs (high word unused) 785 00000C94 00000000 reg_fs: dd 0 ;+48 fs (high word unused) 786 00000C98 00000000 reg_gs: dd 0 ;+52 gs (high word unused) 787 00000C9C 00000000 reg_eip: dd 0 ;+56 eip 788 00000CA0 00000000 reg_efl: dd 0 ;+60 efl(ags) 789 regs.end: 790 regs.size: equ regs.end - regs 791 792 regs_prior: 793 .: 794 00000CA4 00000000 times 16 dd 0 795 .end: 796 .size: equ .end - . 797 798 %if .size != regs.size 799 %error regs prior save area size mismatch 800 %endif 801 802 %if _VARIABLES 803 00000CE4 00000000 vregs: times 256 dd 0 ; internal v0..vff 804 %endif 805 806 ; possible byte encoding of lDebug variables for dynamic computations: 807 ; xxxxyyyy 808 ; 10: register 809 ; xx: size (0 = 1, 1 = 2, 2 = 4) 810 ; yyyy: 0..15: register as stored in the register save area 811 ; as SIL, DIL, BPL, SPL aren't supported these map to xH 812 ; xSL, IPL and FLL are invalid, ExS are invalid 813 ; 1011: variable 814 ; yyyy: which variable. variables are always dword-sized 815 ; 11000000: 32-bit compound, next byte stores: xxxxyyyy first, second 16-bit reg 816 ; 11000001..11111111: available for encoding other compound regs, vars, indirection, 817 ; symbols, types etc 818 ; 0xxxxxxx: operators 819 820 821 ; Instruction set information needed for the 'p' command. 822 ; ppbytes and ppinfo needs to be consecutive. 823 000010E4 6667262E363E6465F2- ppbytes:db 66h,67h,26h,2Eh,36h,3Eh,64h,65h,0F2h,0F3h ; prefixes 823 000010ED F3 824 .string: 825 000010EE ACADAAABA4A5 db 0ACh,0ADh,0AAh,0ABh,0A4h,0A5h ; lods,stos,movs 826 000010F4 6C6D6E6F db 6Ch,6Dh,6Eh,6Fh ; ins,outs 827 000010F8 A6A7AEAF db 0A6h,0A7h,0AEh,0AFh ; cmps,scas 828 PPLEN_ONLY_STRING equ $-ppbytes 829 .string_amount: equ $ - .string 830 000010FC CCCD db 0CCh,0CDh ; int instructions 831 000010FE E0E1E2 db 0E0h,0E1h,0E2h ; loop instructions 832 00001101 E8 db 0E8h ; call rel16/32 833 00001102 9A db 09Ah ; call far seg16:16/32 834 ; (This last one is done explicitly by the code.) 835 ; db 0FFh ; FF/2 or FF/3: indirect call 836 837 PPLEN equ $-ppbytes ; size of the above table 838 839 ; Info for the above, respectively. This MUST follow 840 ; immediately after ppbytes, as we add + PPLEN - 1 to 841 ; di after repne scasb to index into this (ppinfo). 842 ; 80h = prefix; 82h = operand size prefix; 81h = address size prefix. 843 ; If the high bit is not set, the next highest bit (40h) indicates 844 ; that the instruction size depends on whether there is an operand 845 ; size prefix; if set, under o32 two bytes are added to the size. 846 ; (This is only used for direct near and far call.) 847 ; If both the two highest bits are clear, then PP_STRDEST, 848 ; PP_STRSRC, or PP_STRSRC2 may be set. This only happens for 849 ; string instructions, which always are neither prefixes nor 850 ; use additional bytes. 851 ; The remaining bits tell the number of additional bytes in the 852 ; instruction. This is at most 4. It must be below-or-equal to 853 ; 7, or if PP_VARSIZ is used, 5 (so the sum stays below 8). 854 855 PP_ADRSIZ equ 01h 856 PP_OPSIZ equ 02h 857 PP_PREFIX equ 80h 858 PP_VARSIZ equ 40h 859 PP_STRDEST equ 20h 860 PP_STRSRC equ 10h 861 PP_STRSRC2 equ 08h 862 PP_SIZ_MASK equ 07h 863 864 00001103 8281 ppinfo: db PP_PREFIX | PP_OPSIZ, PP_PREFIX | PP_ADRSIZ 865 00001105 80 times 8 db PP_PREFIX ; prefixes 866 0000110D 1010 db PP_STRSRC, PP_STRSRC ; lods 867 0000110F 2020 db PP_STRDEST, PP_STRDEST ; stos 868 00001111 3030 db PP_STRDEST | PP_STRSRC, PP_STRDEST | PP_STRSRC 869 ; movs 870 00001113 2020 db PP_STRDEST, PP_STRDEST ; ins 871 00001115 1010 db PP_STRSRC, PP_STRSRC ; outs 872 00001117 1818 db PP_STRSRC2 | PP_STRSRC, PP_STRSRC2 | PP_STRSRC 873 ; cmps 874 00001119 0808 db PP_STRSRC2, PP_STRSRC2 ; scas 875 0000111B 0001 db 0,1 ; int 876 0000111D 010101 db 1,1,1 ; loop 877 00001120 42 db PP_VARSIZ | 2 ; call rel16/32 with displacement 878 00001121 44 db PP_VARSIZ | 4 ; call far 16:16 or 16:32 immediate 879 880 %if PPLEN != $-ppinfo 881 %error "ppinfo table has wrong size" 882 %endif 883 884 885 ; Equates for instruction operands. 886 ; First the sizes. 887 888 OP_ALL equ 40h ; byte/word/dword operand (could be 30h but ...) 889 OP_1632 equ 50h ; word or dword operand 890 OP_8 equ 60h ; byte operand 891 OP_16 equ 70h ; word operand 892 OP_32 equ 80h ; dword operand 893 OP_64 equ 90h ; qword operand 894 OP_1632_DEFAULT equ 0A0h ; word or dword or default opsize 895 896 OP_SIZE equ OP_ALL ; the lowest of these 897 898 ; These operand types need to be combined with a size. 899 ; Bits 0 to 3 give one of these types (maximum 15), 900 ; and bits 4 to 7 specify the size. Table entries 901 ; for these are identified by detecting that they 902 ; are above-or-equal OP_SIZE. 903 ; The first parameter to the opsizeditem macro is the 904 ; name of the item. It has to match the names used in 905 ; the instr.key and debugtbl.inc files. 906 ; The second parameter is the entry for bittab that 907 ; is used by aa.asm (the assembler). 908 ; The third parameter is the suffix used to create the 909 ; entry for asmjmp (prefix aop_) and disjmp2 (dop_). 910 911 %macro opsizeditem 3.nolist 912 %1 equ nextindex 913 %xdefine BITTAB_OPSIZEDITEMS BITTAB_OPSIZEDITEMS,%2 914 %xdefine ASMJMP_OPSIZEDITEMS ASMJMP_OPSIZEDITEMS,aop_%3 915 %xdefine DISJMP2_OPSIZEDITEMS DISJMP2_OPSIZEDITEMS,dop_%3 916 %assign nextindex nextindex + 1 917 %endmacro 918 %assign nextindex 0 919 %define BITTAB_OPSIZEDITEMS "" 920 %define ASMJMP_OPSIZEDITEMS "" 921 %define DISJMP2_OPSIZEDITEMS "" 922 opsizeditem OP_IMM, ARG_IMMED, imm ; immediate 923 opsizeditem OP_RM,ARG_DEREF+ARG_JUSTREG,rm ; reg/mem 924 opsizeditem OP_M, ARG_DEREF, m ; mem (but not reg) 925 opsizeditem OP_R_MOD, ARG_JUSTREG, r_mod ; register, determined from MOD R/M part 926 opsizeditem OP_MOFFS, ARG_DEREF, moffs ; memory offset; e.g., [1234] 927 opsizeditem OP_R, ARG_JUSTREG, r ; reg part of reg/mem byte 928 opsizeditem OP_R_ADD, ARG_JUSTREG, r_add ; register, determined from instruction byte 929 opsizeditem OP_AX, ARG_JUSTREG, ax ; al or ax or eax 930 %if nextindex > 16 931 %error Too many op sized items 932 %endif 933 934 ; These don't need a size. 935 ; Because the size needs to be clear to indicate 936 ; that one of these is to be used, the maximum 937 ; value for these is 63 (as 64 is OP_SIZE). 938 ; The minimum value for these is 1 because a 0 939 ; without size means the end of an op list (OP_END). 940 ; The first parameter to the opitem macro is the name 941 ; of the item. It has to match the names used in the 942 ; instr.key and debugtbl.inc files. 943 ; The second parameter is the entry for bittab that 944 ; is used by aa.asm (the assembler). The third 945 ; parameter is the entry for asmjmp. 946 ; The fourth parameter is the entry for optab as used 947 ; by uu.asm (the disassembler). 948 ; 949 ; asm_siznum contains entries for OP_M64 to OP_MXX. 950 ; (The order has to match their opitem order.) 951 ; asm_regnum contains entries for OP_DX to OP_GS. 952 ; (The order has to match their opitem order.) 953 954 %macro opitem 4.nolist 955 %1 equ nextindex 956 %xdefine BITTAB_OPITEMS BITTAB_OPITEMS,%2 957 %xdefine ASMJMP_OPITEMS ASMJMP_OPITEMS,%3 958 %xdefine OPTAB_OPITEMS OPTAB_OPITEMS,%4 959 %assign nextindex nextindex + 1 960 %endmacro 961 OP_END equ 0 962 %assign nextindex 1 963 %define BITTAB_OPITEMS "" 964 %define ASMJMP_OPITEMS "" 965 %define OPTAB_OPITEMS "" 966 ; order of the following (ao17 entries) must match asm_siznum in aa.asm 967 OP_FIRST_ASM_SIZNUM equ nextindex ; corresponding to asm_siznum start 968 opitem OP_M64, ARG_DEREF, ao17,dop_m64 ; qword memory (obsolete?) 969 opitem OP_MFLOAT, ARG_DEREF, ao17,dop_mfloat ; float memory 970 opitem OP_MDOUBLE, ARG_DEREF, ao17,dop_mdouble; double-precision floating memory 971 opitem OP_M80, ARG_DEREF, ao17,dop_m80 ; tbyte memory 972 opitem OP_MXX, ARG_DEREF, ao17,dop_mxx ; memory (size unknown) 973 opitem OP_FARIMM, ARG_FARADDR, ao21,dop_farimm ; far16/far32 immediate 974 opitem OP_REL8, ARG_IMMED, ao23,dop_rel8 ; byte address relative to IP 975 opitem OP_REL1632, ARG_IMMED, ao25,dop_rel1632; word or dword address relative to IP 976 opitem OP_1CHK, ARG_WEIRDREG, ao29,dop49 ; check for ST(1) 977 opitem OP_STI, ARG_WEIRDREG, aop_sti,dop_sti ; ST(I) 978 opitem OP_CR, ARG_WEIRDREG, aop_cr,dop_cr ; CRx 979 opitem OP_DR, ARG_WEIRDREG, ao34,dop_dr ; DRx 980 opitem OP_TR, ARG_WEIRDREG, ao35,dop_tr ; TRx 981 opitem OP_SEGREG, ARG_WEIRDREG, ao39,dop_segreg ; segment register 982 opitem OP_IMMS8, ARG_IMMED, ao41,dop_imms8 ; sign extended immediate byte 983 opitem OP_IMMS8_EXTEND, ARG_IMMED, ao41_extend,dop_imms8 ; add etc word/dword r/m, imms8 984 opitem OP_IMM8, ARG_IMMED, ao42,dop_imm8 ; immediate byte (other args may be (d)word) 985 opitem OP_IMM8_INT, ARG_IMMED, ao42,dop_imm8_int ; immediate byte for int 986 opitem OP_MMX, ARG_WEIRDREG, aop_mmx,dop_mmx ; MMx 987 opitem OP_MMX_MOD, ARG_WEIRDREG, aop_mmx_mod,dop_mmx_mod ; MMx, but in ModR/M part 988 opitem OP_SHOSIZ, 0FFh, ao44, dop_shosiz ; set flag to always show the size 989 opitem OP_SHORT, 0FFh, ao_short,dop_short ; allow short keyword 990 opitem OP_NEAR, 0FFh, ao_near,dop_near ; allow near keyword 991 opitem OP_FAR, 0FFh, ao_far, dop_far ; allow far keyword 992 opitem OP_FAR_REQUIRED, 0FFh, ao_far_required,dop_far_required ; require far keyword 993 opitem OP_FAR_M, 0FFh, ao_modifier_continue,dop_far_m ; les, lds, lss, lfs, lgs, or jmp/call far mem 994 opitem OP_DOUBLE_M, 0FFh, ao_modifier_continue,dop_double_m ; bound 995 opitem OP_M_SRC, 0FFh, ao_modifier_continue,dop_m_src 996 opitem OP_M_DST, 0FFh, ao_modifier_continue,dop_m_dst 997 opitem OP_M_SRC_DST, 0FFh, ao_modifier_continue,dop_m_src_dst 998 opitem OP_STACK_PUSH, 0FFh, ac09_internal_error,dop_stack_push 999 opitem OP_STACK_POP, 0FFh, ac09_internal_error,dop_stack_pop 1000 opitem OP_STACK_SPECIAL,0FFh, ac09_internal_error,dop_stack_special 1001 opitem OP_E_CX, ARG_JUSTREG, aop_e_cx, da_internal_error ; (E)CX 1002 OP_FIRST_STRING equ nextindex 1003 opitem OP_1, ARG_IMMED, ao46, "1" ; 1 (simple "string" ops from here on) 1004 opitem OP_3, ARG_IMMED, ao47, "3" ; 3 1005 ; order of the following (ao48 entries) must match asm_regnum in aa.asm 1006 OP_FIRST_ASM_REGNUM equ nextindex ; corresponding to asm_regnum start 1007 opitem OP_DX, ARG_JUSTREG, ao48, "DX" ; DX 1008 opitem OP_CL, ARG_JUSTREG, ao48, "CL" ; CL 1009 opitem OP_ST, ARG_WEIRDREG, ao48, "ST" ; ST (top of coprocessor stack) 1010 opitem OP_CS, ARG_WEIRDREG, ao48, "CS" ; CS 1011 opitem OP_DS, ARG_WEIRDREG, ao48, "DS" ; DS 1012 opitem OP_ES, ARG_WEIRDREG, ao48, "ES" ; ES 1013 opitem OP_FS, ARG_WEIRDREG, ao48, "FS" ; FS 1014 opitem OP_GS, ARG_WEIRDREG, ao48, "GS" ; GS 1015 opitem OP_SS, ARG_WEIRDREG, ao48, "SS" ; SS 1016 OP_AFTER_LAST equ nextindex 1017 %if nextindex > OP_SIZE 1018 %error Too many op items 1019 %endif 1020 OP_AMOUNT_TABLE equ nextindex + 16 - 1 1021 ; nextindex: amount sizeless types 1022 ; 16: OP_SIZE combined types 1023 ; -1: OP_END does not occur in tables 1024 1025 ; Instructions that have an implicit operand subject to a segment prefix. 1026 ; This means a prefixed segment is allowed by the strict assembler, and 1027 ; the disassembler treats a segment prefix as part of the instruction and 1028 ; displays it in front of the instruction's mnemonic. 1029 ; (outs, movs, cmps, lods, xlat). 1030 segprfxtab: 1031 00001122 6E6FA4A5A6A7ACAD db 06Eh,06Fh,0A4h,0A5h,0A6h,0A7h,0ACh,0ADh 1032 a32prfxtab: 1033 0000112A D7 db 0D7h ; xlat, last in segprfxtab, first in a32prfxtab 1034 SEGP_LEN equ $-segprfxtab 1035 1036 ; Instructions that can be used with REPE/REPNE. 1037 ; (ins, outs, movs, stos, lods; cmps, scas) 1038 0000112B 6C6EA4AAAC replist:db 06Ch,06Eh,0A4h,0AAh,0ACh ; REP (no difference) 1039 REP_SAME_LEN equ $-replist ; number of indifferent replist entries 1040 00001130 A6AE db 0A6h,0AEh ; REPE/REPNE 1041 REP_LEN equ $-replist 1042 REP_DIFF_LEN equ REP_LEN-REP_SAME_LEN ; number of replist entries with difference 1043 1044 A32P_LEN equ $-a32prfxtab 1045 1046 ; prfxtab P_LEN REP_LEN REPE_REPNE_LEN 1047 1048 ; All the instructions in replist also have an implicit operand 1049 ; subject to ASIZE (similar to segprfxtab). Additionally, the 1050 ; xlat instruction (0D7h) has such an implicit operand too. 1051 ; maskmovq too. 1052 1053 1054 %include "asmtabs.asm" 1055 <1> [list -] 1410 <1> usesection ASMTABLE2 1411 <1> asmtab: 1412 <1> usesection ASMTABLE1 1413 <1> %include "debugtbl.inc" 1414 <2> 1415 <2> ;--- This file was generated by mktables.exe. 1416 <2> 1417 <2> OPTYPES_BASE EQU 0Ch 1418 <2> 1419 <2> ;--- Operand type lists. 1420 <2> ;--- They were read from file INSTR.KEY. 1421 <2> 1422 <2> oplists label byte 1423 00000000 00 <2> opl OP_END ; idx=0, ofs=Ch, used=99 1424 00000001 474000 <2> opl OP_ALL+OP_AX, OP_ALL+OP_IMM, OP_END ; idx=1, ofs=Dh, used=18 1425 00000004 1E414000 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=2, ofs=10h, used=7 1426 00000008 1C414000 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=3, ofs=14h, used=3 1427 0000000C 1D414000 <2> opl OP_M_DST, OP_ALL+OP_RM, OP_ALL+OP_IMM, OP_END ; idx=4, ofs=18h, used=1 1428 00000010 1E511000 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=5, ofs=1Ch, used=7 1429 00000014 1C511000 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_IMMS8_EXTEND, OP_END ; idx=6, ofs=20h, used=1 1430 00000018 1E414500 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=7, ofs=24h, used=19 1431 0000001C 1C414500 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=8, ofs=28h, used=4 1432 00000020 1D414500 <2> opl OP_M_DST, OP_ALL+OP_RM, OP_ALL+OP_R, OP_END ; idx=9, ofs=2Ch, used=2 1433 00000024 45 <2> opl OP_ALL+OP_R ; idx=10, ofs=30h, used=19 1434 00000025 1C4100 <2> opl OP_M_SRC, OP_ALL+OP_RM, OP_END ; idx=11, ofs=31h, used=4 + 19 1435 00000028 45 <2> opl OP_ALL+OP_R ; idx=12, ofs=34h, used=2 1436 00000029 1E4100 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_END ; idx=13, ofs=35h, used=6 + 2 1437 0000002C 1E717500 <2> opl OP_M_SRC_DST, OP_16+OP_RM, OP_16+OP_R, OP_END ; idx=14, ofs=38h, used=1 1438 00000030 551C1A5200 <2> opl OP_1632+OP_R, OP_M_SRC, OP_FAR_M, OP_1632+OP_M, OP_END ; idx=15, ofs=3Ch, used=5 1439 00000035 551C5100 <2> opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=16, ofs=41h, used=35 1440 00000039 8600 <2> opl OP_32+OP_R_ADD, OP_END ; idx=17, ofs=45h, used=8 1441 0000003B 1E515500 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=18, ofs=47h, used=3 1442 0000003F 1C515500 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_1632+OP_R, OP_END ; idx=19, ofs=4Bh, used=1 1443 00000043 1E51 <2> opl OP_M_SRC_DST, OP_1632+OP_RM ; idx=20, ofs=4Fh, used=3 1444 00000045 1100 <2> opl OP_IMM8, OP_END ; idx=21, ofs=51h, used=2 + 3 1445 00000047 1C511100 <2> opl OP_M_SRC, OP_1632+OP_RM, OP_IMM8, OP_END ; idx=22, ofs=53h, used=1 1446 0000004B 1F <2> opl OP_STACK_PUSH ; idx=23, ofs=57h, used=1 1447 0000004C 170800 <2> opl OP_NEAR, OP_REL1632, OP_END ; idx=24, ofs=58h, used=31 + 1 1448 0000004F 21 <2> opl OP_STACK_SPECIAL ; idx=25, ofs=5Bh, used=1 1449 00000050 180600 <2> opl OP_FAR, OP_FARIMM, OP_END ; idx=26, ofs=5Ch, used=1 + 1 1450 00000053 21 <2> opl OP_STACK_SPECIAL ; idx=27, ofs=5Fh, used=1 1451 00000054 191C1AA200 <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 1452 00000059 1E0100 <2> opl OP_M_SRC_DST, OP_M64, OP_END ; idx=29, ofs=65h, used=1 1453 0000005C 1C0100 <2> opl OP_M_SRC, OP_M64, OP_END ; idx=30, ofs=68h, used=1 1454 0000005F 1D0100 <2> opl OP_M_DST, OP_M64, OP_END ; idx=31, ofs=6Bh, used=1 1455 00000062 1F <2> opl OP_STACK_PUSH ; idx=32, ofs=6Eh, used=8 1456 00000063 5600 <2> opl OP_1632+OP_R_ADD, OP_END ; idx=33, ofs=6Fh, used=16 + 8 1457 00000065 205600 <2> opl OP_STACK_POP, OP_1632+OP_R_ADD, OP_END ; idx=34, ofs=71h, used=8 1458 00000068 1F701100 <2> opl OP_STACK_PUSH, OP_16+OP_IMM, OP_IMM8, OP_END ; idx=35, ofs=74h, used=1 1459 0000006C 1C0200 <2> opl OP_M_SRC, OP_MFLOAT, OP_END ; idx=36, ofs=78h, used=9 1460 0000006F 1D0200 <2> opl OP_M_DST, OP_MFLOAT, OP_END ; idx=37, ofs=7Bh, used=2 1461 00000072 1C0300 <2> opl OP_M_SRC, OP_MDOUBLE, OP_END ; idx=38, ofs=7Eh, used=9 1462 00000075 1D0300 <2> opl OP_M_DST, OP_MDOUBLE, OP_END ; idx=39, ofs=81h, used=2 1463 00000078 27 <2> opl OP_ST ; idx=40, ofs=84h, used=20 1464 00000079 0A00 <2> opl OP_STI, OP_END ; idx=41, ofs=85h, used=4 + 20 1465 0000007B 09 <2> opl OP_1CHK ; idx=42, ofs=87h, used=6 1466 0000007C 0A2700 <2> opl OP_STI, OP_ST, OP_END ; idx=43, ofs=88h, used=6 + 6 1467 0000007F 1C8200 <2> opl OP_M_SRC, OP_32+OP_M, OP_END ; idx=44, ofs=8Bh, used=9 1468 00000082 1D8200 <2> opl OP_M_DST, OP_32+OP_M, OP_END ; idx=45, ofs=8Eh, used=2 1469 00000085 1C7200 <2> opl OP_M_SRC, OP_16+OP_M, OP_END ; idx=46, ofs=91h, used=10 1470 00000088 1D7200 <2> opl OP_M_DST, OP_16+OP_M, OP_END ; idx=47, ofs=94h, used=4 1471 0000008B 1C0400 <2> opl OP_M_SRC, OP_M80, OP_END ; idx=48, ofs=97h, used=2 1472 0000008E 1D0400 <2> opl OP_M_DST, OP_M80, OP_END ; idx=49, ofs=9Ah, used=2 1473 00000091 090A00 <2> opl OP_1CHK, OP_STI, OP_END ; idx=50, ofs=9Dh, used=9 1474 00000094 1C <2> opl OP_M_SRC ; idx=51, ofs=A0h, used=4 1475 00000095 0500 <2> opl OP_MXX, OP_END ; idx=52, ofs=A1h, used=1 + 4 1476 00000097 1D0500 <2> opl OP_M_DST, OP_MXX, OP_END ; idx=53, ofs=A3h, used=4 1477 0000009A 7700 <2> opl OP_16+OP_AX, OP_END ; idx=54, ofs=A6h, used=1 1478 0000009C 551C510F00 <2> opl OP_1632+OP_R, OP_M_SRC, OP_1632+OP_RM, OP_IMMS8, OP_END ; idx=55, ofs=A8h, used=1 1479 000000A1 53550F00 <2> opl OP_1632+OP_R_MOD, OP_1632+OP_R, OP_IMMS8, OP_END ; idx=56, ofs=ADh, used=1 1480 000000A5 551C515000 <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 1481 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 1482 000000AE 471100 <2> opl OP_ALL+OP_AX, OP_IMM8, OP_END ; idx=59, ofs=BAh, used=2 1483 000000B1 472500 <2> opl OP_ALL+OP_AX, OP_DX, OP_END ; idx=60, ofs=BDh, used=2 1484 000000B4 212400 <2> opl OP_STACK_SPECIAL, OP_3, OP_END ; idx=61, ofs=C0h, used=1 1485 000000B7 160700 <2> opl OP_SHORT, OP_REL8, OP_END ; idx=62, ofs=C3h, used=42 1486 000000BA 1F1C5100 <2> opl OP_STACK_PUSH, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=63, ofs=C6h, used=1 1487 000000BE 1D7100 <2> opl OP_M_DST, OP_16+OP_RM, OP_END ; idx=64, ofs=CAh, used=1 1488 000000C1 1D510E00 <2> opl OP_M_DST, OP_1632+OP_RM, OP_SEGREG, OP_END ; idx=65, ofs=CDh, used=1 1489 000000C5 0E1C5100 <2> opl OP_SEGREG, OP_M_SRC, OP_1632+OP_RM, OP_END ; idx=66, ofs=D1h, used=1 1490 000000C9 471C4400 <2> opl OP_ALL+OP_AX, OP_M_SRC, OP_ALL+OP_MOFFS, OP_END ; idx=67, ofs=D5h, used=2 1491 000000CD 1D444700 <2> opl OP_M_DST, OP_ALL+OP_MOFFS, OP_ALL+OP_AX, OP_END ; idx=68, ofs=D9h, used=2 1492 000000D1 666000 <2> opl OP_8+OP_R_ADD, OP_8+OP_IMM, OP_END ; idx=69, ofs=DDh, used=8 1493 000000D4 565000 <2> opl OP_1632+OP_R_ADD, OP_1632+OP_IMM, OP_END ; idx=70, ofs=E0h, used=8 1494 000000D7 55151C6100 <2> opl OP_1632+OP_R, OP_SHOSIZ, OP_M_SRC, OP_8+OP_RM, OP_END ; idx=71, ofs=E3h, used=2 1495 000000DC 5515 <2> opl OP_1632+OP_R, OP_SHOSIZ ; idx=72, ofs=E8h, used=2 1496 000000DE 1C7100 <2> opl OP_M_SRC, OP_16+OP_RM, OP_END ; idx=73, ofs=EAh, used=5 + 2 1497 000000E1 114700 <2> opl OP_IMM8, OP_ALL+OP_AX, OP_END ; idx=74, ofs=EDh, used=2 1498 000000E4 254700 <2> opl OP_DX, OP_ALL+OP_AX, OP_END ; idx=75, ofs=F0h, used=2 1499 000000E7 20 <2> opl OP_STACK_POP ; idx=76, ofs=F3h, used=1 1500 000000E8 1D5100 <2> opl OP_M_DST, OP_1632+OP_RM, OP_END ; idx=77, ofs=F4h, used=2 + 1 1501 000000EB 1F15A000 <2> opl OP_STACK_PUSH, OP_SHOSIZ, OP_1632_DEFAULT+OP_IMM, OP_END ; idx=78, ofs=F7h, used=2 1502 000000EF 1F150F00 <2> opl OP_STACK_PUSH, OP_SHOSIZ, OP_IMMS8, OP_END ; idx=79, ofs=FBh, used=2 1503 000000F3 1E412300 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_1, OP_END ; idx=80, ofs=FFh, used=9 1504 000000F7 1E412600 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_CL, OP_END ; idx=81, ofs=103h, used=9 1505 000000FB 1E411100 <2> opl OP_M_SRC_DST, OP_ALL+OP_RM, OP_IMM8, OP_END ; idx=82, ofs=107h, used=9 1506 000000FF 20 <2> opl OP_STACK_POP ; idx=83, ofs=10Bh, used=2 1507 00000100 7000 <2> opl OP_16+OP_IMM, OP_END ; idx=84, ofs=10Ch, used=1 + 2 1508 00000102 217000 <2> opl OP_STACK_SPECIAL, OP_16+OP_IMM, OP_END ; idx=85, ofs=10Eh, used=1 1509 00000105 1D6100 <2> opl OP_M_DST, OP_8+OP_RM, OP_END ; idx=86, ofs=111h, used=30 1510 00000108 1E51551100 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_IMM8, OP_END ; idx=87, ofs=114h, used=2 1511 0000010D 1E51552600 <2> opl OP_M_SRC_DST, OP_1632+OP_RM, OP_1632+OP_R, OP_CL, OP_END ; idx=88, ofs=119h, used=2 1512 00000112 575600 <2> opl OP_1632+OP_AX, OP_1632+OP_R_ADD, OP_END ; idx=89, ofs=11Eh, used=7 1513 00000115 565700 <2> opl OP_1632+OP_R_ADD, OP_1632+OP_AX, OP_END ; idx=90, ofs=121h, used=1 1514 00000118 1F <2> opl OP_STACK_PUSH ; idx=91, ofs=124h, used=1 1515 00000119 2A00 <2> opl OP_ES, OP_END ; idx=92, ofs=125h, used=1 + 1 1516 0000011B 1F <2> opl OP_STACK_PUSH ; idx=93, ofs=127h, used=1 1517 0000011C 2800 <2> opl OP_CS, OP_END ; idx=94, ofs=128h, used=1 + 1 1518 0000011E 1F <2> opl OP_STACK_PUSH ; idx=95, ofs=12Ah, used=1 1519 0000011F 2D00 <2> opl OP_SS, OP_END ; idx=96, ofs=12Bh, used=1 + 1 1520 00000121 1F <2> opl OP_STACK_PUSH ; idx=97, ofs=12Dh, used=1 1521 00000122 2900 <2> opl OP_DS, OP_END ; idx=98, ofs=12Eh, used=1 + 1 1522 00000124 1F <2> opl OP_STACK_PUSH ; idx=99, ofs=130h, used=1 1523 00000125 2B00 <2> opl OP_FS, OP_END ; idx=100, ofs=131h, used=1 + 1 1524 00000127 1F <2> opl OP_STACK_PUSH ; idx=101, ofs=133h, used=1 1525 00000128 2C00 <2> opl OP_GS, OP_END ; idx=102, ofs=134h, used=1 + 1 1526 0000012A 202A00 <2> opl OP_STACK_POP, OP_ES, OP_END ; idx=103, ofs=136h, used=1 1527 0000012D 202D00 <2> opl OP_STACK_POP, OP_SS, OP_END ; idx=104, ofs=139h, used=1 1528 00000130 202900 <2> opl OP_STACK_POP, OP_DS, OP_END ; idx=105, ofs=13Ch, used=1 1529 00000133 202B00 <2> opl OP_STACK_POP, OP_FS, OP_END ; idx=106, ofs=13Fh, used=1 1530 00000136 202C00 <2> opl OP_STACK_POP, OP_GS, OP_END ; idx=107, ofs=142h, used=1 1531 00000139 830B00 <2> opl OP_32+OP_R_MOD, OP_CR, OP_END ; idx=108, ofs=145h, used=1 1532 0000013C 0B8300 <2> opl OP_CR, OP_32+OP_R_MOD, OP_END ; idx=109, ofs=148h, used=1 1533 0000013F 830C00 <2> opl OP_32+OP_R_MOD, OP_DR, OP_END ; idx=110, ofs=14Bh, used=1 1534 00000142 0C8300 <2> opl OP_DR, OP_32+OP_R_MOD, OP_END ; idx=111, ofs=14Eh, used=1 1535 00000145 830D00 <2> opl OP_32+OP_R_MOD, OP_TR, OP_END ; idx=112, ofs=151h, used=1 1536 00000148 0D8300 <2> opl OP_TR, OP_32+OP_R_MOD, OP_END ; idx=113, ofs=154h, used=1 1537 0000014B 131C8100 <2> opl OP_MMX, OP_M_SRC, OP_32+OP_RM, OP_END ; idx=114, ofs=157h, used=1 1538 0000014F 1D811300 <2> opl OP_M_DST, OP_32+OP_RM, OP_MMX, OP_END ; idx=115, ofs=15Bh, used=1 1539 00000153 131C9100 <2> opl OP_MMX, OP_M_SRC, OP_64+OP_RM, OP_END ; idx=116, ofs=15Fh, used=45 1540 00000157 1D911300 <2> opl OP_M_DST, OP_64+OP_RM, OP_MMX, OP_END ; idx=117, ofs=163h, used=1 1541 0000015B 141100 <2> opl OP_MMX_MOD, OP_IMM8, OP_END ; idx=118, ofs=167h, used=8 1542 0000015E 550500 <2> opl OP_1632+OP_R, OP_MXX, OP_END ; idx=119, ofs=16Ah, used=1 1543 00000161 1F <2> opl OP_STACK_PUSH ; idx=120, ofs=16Dh, used=1 1544 00000162 171CA100 <2> opl OP_NEAR, OP_M_SRC, OP_1632_DEFAULT+OP_RM, OP_END ; idx=121, ofs=16Eh, used=1 + 1 1545 00000166 551C1B5200 <2> opl OP_1632+OP_R, OP_M_SRC, OP_DOUBLE_M, OP_1632+OP_M, OP_END ; idx=122, ofs=172h, used=1 1546 0000016B 211200 <2> opl OP_STACK_SPECIAL, OP_IMM8_INT, OP_END ; idx=123, ofs=177h, used=1 1547 0000016E 16072200 <2> opl OP_SHORT, OP_REL8, OP_E_CX, OP_END ; idx=124, ofs=17Ah, used=5 1548 00000172 2000 <2> opl OP_STACK_POP, OP_END ; idx=125, ofs=17Eh, used=3 1549 00000174 1F00 <2> opl OP_STACK_PUSH, OP_END ; idx=126, ofs=180h, used=1 1550 00000176 2100 <2> opl OP_STACK_SPECIAL, OP_END ; idx=127, ofs=182h, used=11 1551 <2> 1552 <2> ASMMOD EQU opidx 1553 <2> 1554 <2> ;--- Assembler: data on groups. 1555 <2> ;--- If > 100h, it's a "0F-prefix" group. 1556 <2> 1557 <2> align 2, db 0 1558 <2> agroups label word 1559 00000178 FE00 <2> dw 0FEh ; 0 1560 0000017A 8300 <2> dw 083h ; 1 1561 0000017C 8000 <2> dw 080h ; 2 1562 0000017E BA01 <2> dw 1BAh ; 3 1563 00000180 FF00 <2> dw 0FFh ; 4 1564 00000182 C701 <2> dw 1C7h ; 5 1565 00000184 F600 <2> dw 0F6h ; 6 1566 00000186 0101 <2> dw 101h ; 7 1567 00000188 0001 <2> dw 100h ; 8 1568 0000018A C600 <2> dw 0C6h ; 9 1569 0000018C 7101 <2> dw 171h ; 10 1570 0000018E 7201 <2> dw 172h ; 11 1571 00000190 7301 <2> dw 173h ; 12 1572 00000192 8F00 <2> dw 08Fh ; 13 1573 00000194 D000 <2> dw 0D0h ; 14 1574 00000196 D200 <2> dw 0D2h ; 15 1575 00000198 C000 <2> dw 0C0h ; 16 1576 <2> 1577 <2> ;--- List of assembler mnemonics and data. 1578 <2> ;--- variant's 1. argument (=a): 1579 <2> ;--- if a < 0x100: one byte opcode. 1580 <2> ;--- if a >= 0x100 && a < 0x200: two byte "0F"-opcode. 1581 <2> ;--- if a >= 0x200 && a < 0x240: fp instruction. 1582 <2> ;--- if a >= 0x240: refers to agroups [macro AGRP() is used]. 1583 <2> ;--- variant's 2. argument is index into array opindex. 1584 <2> 1585 <2> mnlist label near 1586 <2> mnsuffix 1587 <2> 1588 <2> mne A32, ASM_SPECIAL ; ofs=0h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000000 FF <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000019A 0300 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000019C 413332 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1589 <2> mne A16, ASM_SPECIAL ; ofs=2h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000001 FF <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000019F 1300 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001A1 413136 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1590 <2> mne O32, ASM_SPECIAL ; ofs=4h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000002 FF <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001A4 2300 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001A6 4F3332 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1591 <2> mne O16, ASM_SPECIAL ; ofs=6h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000003 FF <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001A9 3300 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001AB 4F3136 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1592 <2> mne BOXCB ; ofs=8h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001AE 4500 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001B0 424F584342 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1593 00000004 F42FD4 <2> variant AGRP(0,7), 84 1594 00000007 FF <2> endvariant 1595 <2> mne AAA ; ofs=Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001B5 8300 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001B7 414141 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1596 00000008 1B80 <2> variant 037h, 0 1597 0000000A FF <2> endvariant 1598 <2> mne AAD, ASM_SPECIAL ; ofs=Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 0000000B FF <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001BA B300 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001BC 414144 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1599 0000000C 6A95 <2> variant 0D5h, 21 1600 0000000E FF <2> endvariant 1601 <2> mne AAM, ASM_SPECIAL ; ofs=13h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 0000000F FF <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001BF F300 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001C1 41414D <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1602 00000010 6A15 <2> variant 0D4h, 21 1603 00000012 FF <2> endvariant 1604 <2> mne AAS ; ofs=17h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001C4 3301 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001C6 414153 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1605 00000013 1F80 <2> variant 03Fh, 0 1606 00000015 FF <2> endvariant 1607 <2> mne ADC ; ofs=1Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001C9 6301 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001CB 414443 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1608 00000016 FBF43105 <2> variant AGRP(1,2), 5, ASM_LOCKABLE 1609 0000001A 0A01 <2> variant 014h, 1 1610 0000001C FBF43502 <2> variant AGRP(2,2), 2, ASM_LOCKABLE 1611 00000020 FB0807 <2> variant 010h, 7, ASM_LOCKABLE 1612 00000023 090A <2> variant 012h, 10 1613 00000025 FF <2> endvariant 1614 <2> mne ADD ; ofs=2Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001CE 6302 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001D0 414444 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1615 00000026 FBF43005 <2> variant AGRP(1,0), 5, ASM_LOCKABLE 1616 0000002A 0201 <2> variant 004h, 1 1617 0000002C FBF43402 <2> variant AGRP(2,0), 2, ASM_LOCKABLE 1618 00000030 FB0007 <2> variant 000h, 7, ASM_LOCKABLE 1619 00000033 010A <2> variant 002h, 10 1620 00000035 FF <2> endvariant 1621 <2> mne AND ; ofs=3Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001D3 6303 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001D5 414E44 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1622 00000036 FBF43205 <2> variant AGRP(1,4), 5, ASM_LOCKABLE 1623 0000003A 1201 <2> variant 024h, 1 1624 0000003C FBF43602 <2> variant AGRP(2,4), 2, ASM_LOCKABLE 1625 00000040 FB1007 <2> variant 020h, 7, ASM_LOCKABLE 1626 00000043 110A <2> variant 022h, 10 1627 00000045 FF <2> endvariant 1628 <2> mne ARPL ; ofs=4Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001D8 6404 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001DA 4152504C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1629 00000046 F6318E <2> variant 063h, 14, ASM_MACH2 1630 00000049 FF <2> endvariant 1631 <2> mne BOUND ; ofs=4Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001DE A504 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001E0 424F554E44 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1632 0000004A F5317A <2> variant 062h, 122, ASM_MACH1 1633 0000004D FF <2> endvariant 1634 <2> mne BSF ; ofs=52h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001E5 E304 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001E7 425346 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1635 0000004E F7DE10 <2> variant 1BCh, 16, ASM_MACH3 1636 00000051 FF <2> endvariant 1637 <2> mne BSR ; ofs=56h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001EA 2305 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001EC 425352 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1638 00000052 F7DE90 <2> variant 1BDh, 16, ASM_MACH3 1639 00000055 FF <2> endvariant 1640 <2> mne BSWAP, ASM_D32 ; ofs=5Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000056 FD <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001EF 6505 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001F1 4253574150 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1641 00000057 F8E411 <2> variant 1C8h, 17, ASM_MACH4 1642 0000005A FF <2> endvariant 1643 <2> mne BT ; ofs=5Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001F6 B205 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001F8 4254 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1644 0000005B F7D193 <2> variant 1A3h, 19, ASM_MACH3 1645 0000005E F7F43A16 <2> variant AGRP(3,4), 22, ASM_MACH3 1646 00000062 FF <2> endvariant 1647 <2> mne BTC ; ofs=67h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001FA 3306 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000001FC 425443 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1648 00000063 FBF7DD92 <2> variant 1BBh, 18, ASM_LOCKABLE, ASM_MACH3 1649 00000067 FBF7F43B94 <2> variant AGRP(3,7), 20, ASM_LOCKABLE, ASM_MACH3 1650 0000006C FF <2> endvariant 1651 <2> mne BTR ; ofs=71h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000001FF D306 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000201 425452 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1652 0000006D FBF7D992 <2> variant 1B3h, 18, ASM_LOCKABLE, ASM_MACH3 1653 00000071 FBF7F43B14 <2> variant AGRP(3,6), 20, ASM_LOCKABLE, ASM_MACH3 1654 00000076 FF <2> endvariant 1655 <2> mne BTS ; ofs=7Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000204 7307 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000206 425453 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1656 00000077 FBF7D592 <2> variant 1ABh, 18, ASM_LOCKABLE, ASM_MACH3 1657 0000007B FBF7F43A94 <2> variant AGRP(3,5), 20, ASM_LOCKABLE, ASM_MACH3 1658 00000080 FF <2> endvariant 1659 <2> mne CALL ; ofs=85h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000209 1408 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000020B 43414C4C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1660 00000081 7417 <2> variant 0E8h, 23 1661 00000083 F43D78 <2> variant AGRP(4,2), 120 1662 00000086 F43D9B <2> variant AGRP(4,3), 27 1663 00000089 4D19 <2> variant 09Ah, 25 1664 0000008B FF <2> endvariant 1665 <2> mne CBW, ASM_D16 ; ofs=90h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 0000008C FC <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000020F C308 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000211 434257 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1666 <2> mne CWDE, ASM_D32 ; ofs=91h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 0000008D FD <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000214 D408 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000216 43574445 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1667 0000008E 4C00 <2> variant 098h, 0 1668 00000090 FF <2> endvariant 1669 <2> mne CLC ; ofs=95h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000021A 1309 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000021C 434C43 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1670 00000091 7C00 <2> variant 0F8h, 0 1671 00000093 FF <2> endvariant 1672 <2> mne CLD ; ofs=98h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000021F 4309 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000221 434C44 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1673 00000094 7E00 <2> variant 0FCh, 0 1674 00000096 FF <2> endvariant 1675 <2> mne CLI ; ofs=9Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000224 7309 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000226 434C49 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1676 00000097 7D00 <2> variant 0FAh, 0 1677 00000099 FF <2> endvariant 1678 <2> mne CLTS ; ofs=9Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000229 A409 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000022B 434C5453 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1679 0000009A F68300 <2> variant 106h, 0, ASM_MACH2 1680 0000009D FF <2> endvariant 1681 <2> mne CMC ; ofs=A2h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000022F E309 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000231 434D43 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1682 0000009E 7A80 <2> variant 0F5h, 0 1683 000000A0 FF <2> endvariant 1684 <2> mne CMOVA ; ofs=A5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000234 150A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000236 434D4F5641 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1685 000000A1 FAA390 <2> variant 147h, 16, ASM_MACH6 1686 000000A4 FF <2> endvariant 1687 <2> mne CMOVAE ; ofs=A9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000023B 560A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000023D 434D4F564145 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1688 000000A5 FAA190 <2> variant 143h, 16, ASM_MACH6 1689 000000A8 FF <2> endvariant 1690 <2> mne CMOVB ; ofs=ADh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000243 950A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000245 434D4F5642 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1691 000000A9 FAA110 <2> variant 142h, 16, ASM_MACH6 1692 000000AC FF <2> endvariant 1693 <2> mne CMOVBE ; ofs=B1h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000024A D60A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000024C 434D4F564245 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1694 000000AD FAA310 <2> variant 146h, 16, ASM_MACH6 1695 000000B0 FF <2> endvariant 1696 <2> mne CMOVC ; ofs=B5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000252 150B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000254 434D4F5643 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1697 000000B1 FAA110 <2> variant 142h, 16, ASM_MACH6 1698 000000B4 FF <2> endvariant 1699 <2> mne CMOVE ; ofs=B9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000259 550B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000025B 434D4F5645 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1700 000000B5 FAA210 <2> variant 144h, 16, ASM_MACH6 1701 000000B8 FF <2> endvariant 1702 <2> mne CMOVG ; ofs=BDh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000260 950B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000262 434D4F5647 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1703 000000B9 FAA790 <2> variant 14Fh, 16, ASM_MACH6 1704 000000BC FF <2> endvariant 1705 <2> mne CMOVGE ; ofs=C1h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000267 D60B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000269 434D4F564745 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1706 000000BD FAA690 <2> variant 14Dh, 16, ASM_MACH6 1707 000000C0 FF <2> endvariant 1708 <2> mne CMOVL ; ofs=C5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000026F 150C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000271 434D4F564C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1709 000000C1 FAA610 <2> variant 14Ch, 16, ASM_MACH6 1710 000000C4 FF <2> endvariant 1711 <2> mne CMOVLE ; ofs=C9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000276 560C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000278 434D4F564C45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1712 000000C5 FAA710 <2> variant 14Eh, 16, ASM_MACH6 1713 000000C8 FF <2> endvariant 1714 <2> mne CMOVNA ; ofs=CDh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000027E 960C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000280 434D4F564E41 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1715 000000C9 FAA310 <2> variant 146h, 16, ASM_MACH6 1716 000000CC FF <2> endvariant 1717 <2> mne CMOVNAE ; ofs=D1h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000286 D70C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000288 434D4F564E4145 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1718 000000CD FAA110 <2> variant 142h, 16, ASM_MACH6 1719 000000D0 FF <2> endvariant 1720 <2> mne CMOVNB ; ofs=D5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000028F 160D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000291 434D4F564E42 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1721 000000D1 FAA190 <2> variant 143h, 16, ASM_MACH6 1722 000000D4 FF <2> endvariant 1723 <2> mne CMOVNBE ; ofs=D9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000297 570D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000299 434D4F564E4245 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1724 000000D5 FAA390 <2> variant 147h, 16, ASM_MACH6 1725 000000D8 FF <2> endvariant 1726 <2> mne CMOVNC ; ofs=DDh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000002A0 960D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000002A2 434D4F564E43 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1727 000000D9 FAA190 <2> variant 143h, 16, ASM_MACH6 1728 000000DC FF <2> endvariant 1729 <2> mne CMOVNE ; ofs=E1h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000002A8 D60D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000002AA 434D4F564E45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1730 000000DD FAA290 <2> variant 145h, 16, ASM_MACH6 1731 000000E0 FF <2> endvariant 1732 <2> mne CMOVNG ; ofs=E5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000002B0 160E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000002B2 434D4F564E47 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1733 000000E1 FAA710 <2> variant 14Eh, 16, ASM_MACH6 1734 000000E4 FF <2> endvariant 1735 <2> mne CMOVNGE ; ofs=E9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000002B8 570E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000002BA 434D4F564E4745 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1736 000000E5 FAA610 <2> variant 14Ch, 16, ASM_MACH6 1737 000000E8 FF <2> endvariant 1738 <2> mne CMOVNL ; ofs=EDh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000002C1 960E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000002C3 434D4F564E4C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1739 000000E9 FAA690 <2> variant 14Dh, 16, ASM_MACH6 1740 000000EC FF <2> endvariant 1741 <2> mne CMOVNLE ; ofs=F1h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000002C9 D70E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000002CB 434D4F564E4C45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1742 000000ED FAA790 <2> variant 14Fh, 16, ASM_MACH6 1743 000000F0 FF <2> endvariant 1744 <2> mne CMOVNO ; ofs=F5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000002D2 160F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000002D4 434D4F564E4F <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1745 000000F1 FAA090 <2> variant 141h, 16, ASM_MACH6 1746 000000F4 FF <2> endvariant 1747 <2> mne CMOVNP ; ofs=F9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000002DA 560F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000002DC 434D4F564E50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1748 000000F5 FAA590 <2> variant 14Bh, 16, ASM_MACH6 1749 000000F8 FF <2> endvariant 1750 <2> mne CMOVNS ; ofs=FDh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000002E2 960F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000002E4 434D4F564E53 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1751 000000F9 FAA490 <2> variant 149h, 16, ASM_MACH6 1752 000000FC FF <2> endvariant 1753 <2> mne CMOVNZ ; ofs=101h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000002EA D60F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000002EC 434D4F564E5A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1754 000000FD FAA290 <2> variant 145h, 16, ASM_MACH6 1755 00000100 FF <2> endvariant 1756 <2> mne CMOVO ; ofs=105h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000002F2 1510 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000002F4 434D4F564F <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1757 00000101 FAA010 <2> variant 140h, 16, ASM_MACH6 1758 00000104 FF <2> endvariant 1759 <2> mne CMOVP ; ofs=109h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000002F9 5510 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000002FB 434D4F5650 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1760 00000105 FAA510 <2> variant 14Ah, 16, ASM_MACH6 1761 00000108 FF <2> endvariant 1762 <2> mne CMOVPE ; ofs=10Dh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000300 9610 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000302 434D4F565045 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1763 00000109 FAA510 <2> variant 14Ah, 16, ASM_MACH6 1764 0000010C FF <2> endvariant 1765 <2> mne CMOVPO ; ofs=111h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000308 D610 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000030A 434D4F56504F <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1766 0000010D FAA590 <2> variant 14Bh, 16, ASM_MACH6 1767 00000110 FF <2> endvariant 1768 <2> mne CMOVS ; ofs=115h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000310 1511 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000312 434D4F5653 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1769 00000111 FAA410 <2> variant 148h, 16, ASM_MACH6 1770 00000114 FF <2> endvariant 1771 <2> mne CMOVZ ; ofs=119h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000317 5511 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000319 434D4F565A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1772 00000115 FAA210 <2> variant 144h, 16, ASM_MACH6 1773 00000118 FF <2> endvariant 1774 <2> mne CMP ; ofs=11Dh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000031E 9311 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000320 434D50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1775 00000119 F43386 <2> variant AGRP(1,7), 6 1776 0000011C 1E01 <2> variant 03Ch, 1 1777 0000011E F43783 <2> variant AGRP(2,7), 3 1778 00000121 1C08 <2> variant 038h, 8 1779 00000123 1D0A <2> variant 03Ah, 10 1780 00000125 FF <2> endvariant 1781 <2> mne CMPSB ; ofs=12Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000323 6512 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000325 434D505342 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1782 00000126 5300 <2> variant 0A6h, 0 1783 00000128 FF <2> endvariant 1784 <2> mne CMPXCHG ; ofs=130h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000032A 9712 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000032C 434D5058434847 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1785 00000129 FBF8D807 <2> variant 1B0h, 7, ASM_LOCKABLE, ASM_MACH4 1786 0000012D FF <2> endvariant 1787 <2> mne CMPXCHG8B ; ofs=135h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000333 E912 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000335 434D50584348473842 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1788 0000012E F9F4409D <2> variant AGRP(5,1), 29, ASM_MACH5 1789 00000132 FF <2> endvariant 1790 <2> mne CPUID ; ofs=13Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000033E 3513 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000340 4350554944 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1791 00000133 F9D100 <2> variant 1A2h, 0, ASM_MACH5 1792 00000136 FF <2> endvariant 1793 <2> mne CWD, ASM_D16 ; ofs=13Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000137 FC <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000345 7313 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000347 435744 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1794 <2> mne CDQ, ASM_D32 ; ofs=13Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000138 FD <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000034A 8313 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000034C 434451 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1795 00000139 4C80 <2> variant 099h, 0 1796 0000013B FF <2> endvariant 1797 <2> mne DAA ; ofs=143h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000034F C313 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000351 444141 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1798 0000013C 1380 <2> variant 027h, 0 1799 0000013E FF <2> endvariant 1800 <2> mne DAS ; ofs=146h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000354 F313 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000356 444153 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1801 0000013F 1780 <2> variant 02Fh, 0 1802 00000141 FF <2> endvariant 1803 <2> mne DB, ASM_SPECIAL ; ofs=149h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000142 FF <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000359 2214 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000035B 4442 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1804 <2> mne DD, ASM_SPECIAL ; ofs=14Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000143 FF <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000035D 3214 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000035F 4444 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1805 <2> mne DEC ; ofs=14Dh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000361 4314 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000363 444543 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1806 00000144 2421 <2> variant 048h, 33 1807 00000146 FBF42C8D <2> variant AGRP(0,1), 13, ASM_LOCKABLE 1808 0000014A FF <2> endvariant 1809 <2> mne DIV ; ofs=154h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000366 B314 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000368 444956 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1810 0000014B F4470B <2> variant AGRP(6,6), 11 1811 0000014E FF <2> endvariant 1812 <2> mne DW, ASM_SPECIAL ; ofs=158h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 0000014F FF <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000036B F214 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000036D 4457 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1813 <2> mne EMMS ; ofs=15Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000036F 0415 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000371 454D4D53 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1814 00000150 F9BB80 <2> variant 177h, 0, ASM_MACH5 1815 00000153 FF <2> endvariant 1816 <2> mne F2XM1 ; ofs=162h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000375 4515 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000377 4632584D31 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1817 00000154 6C80F0 <2> fpvariant 0D9h, 0, 0F0h 1818 00000157 FF <2> endvariant 1819 <2> mne FABS ; ofs=166h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000037C 8415 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000037E 46414253 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1820 00000158 6C80E1 <2> fpvariant 0D9h, 0, 0E1h 1821 0000015B FF <2> endvariant 1822 <2> mne FADD ; ofs=16Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000382 C415 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000384 46414444 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1823 0000015C F40C24 <2> variant 200h, 36 1824 0000015F F40E26 <2> variant 204h, 38 1825 00000162 6C28C0 <2> fpvariant 0D8h, 40, 0C0h 1826 00000165 6E2BC0 <2> fpvariant 0DCh, 43, 0C0h 1827 00000168 FF <2> endvariant 1828 <2> mne FADDP ; ofs=177h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000388 9516 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000038A 4641444450 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1829 00000169 6F2AC0 <2> fpvariant 0DEh, 42, 0C0h 1830 0000016C 6F00C1 <2> fpvariant 0DEh, 0, 0C1h 1831 0000016F FF <2> endvariant 1832 <2> mne FIADD ; ofs=17Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000038F 0517 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000391 4649414444 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1833 00000170 F40D2C <2> variant 202h, 44 1834 00000173 F40F2E <2> variant 206h, 46 1835 00000176 FF <2> endvariant 1836 <2> mne FBLD ; ofs=185h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000396 7417 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000398 46424C44 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1837 00000177 F41FB0 <2> variant 227h, 48 1838 0000017A FF <2> endvariant 1839 <2> mne FBSTP ; ofs=189h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000039C B517 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000039E 4642535450 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1840 0000017B F427B1 <2> variant 237h, 49 1841 0000017E FF <2> endvariant 1842 <2> mne FCHS ; ofs=18Dh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000003A3 F417 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000003A5 46434853 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1843 0000017F 6C80E0 <2> fpvariant 0D9h, 0, 0E0h 1844 00000182 FF <2> endvariant 1845 <2> mne FCLEX, ASM_WAIT ; ofs=191h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000183 FE <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000003A9 3518 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000003AB 46434C4558 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1846 <2> mne FNCLEX ; ofs=192h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000003B0 4618 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000003B2 464E434C4558 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1847 00000184 6D80E2 <2> fpvariant 0DBh, 0, 0E2h 1848 00000187 FF <2> endvariant 1849 <2> mne FCMOVA ; ofs=196h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000003B8 8618 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000003BA 46434D4F5641 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1850 00000188 FA6DA8D0 <2> fpvariant 0DBh, 40, 0D0h, ASM_MACH6 1851 0000018C FF <2> endvariant 1852 <2> mne FCMOVAE ; ofs=19Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000003C0 D718 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000003C2 46434D4F564145 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1853 0000018D FA6DA8C0 <2> fpvariant 0DBh, 40, 0C0h, ASM_MACH6 1854 00000191 FF <2> endvariant 1855 <2> mne FCMOVB ; ofs=1A0h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000003C9 2619 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000003CB 46434D4F5642 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1856 00000192 FA6D28C0 <2> fpvariant 0DAh, 40, 0C0h, ASM_MACH6 1857 00000196 FF <2> endvariant 1858 <2> mne FCMOVBE ; ofs=1A5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000003D1 7719 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000003D3 46434D4F564245 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1859 00000197 FA6D28D0 <2> fpvariant 0DAh, 40, 0D0h, ASM_MACH6 1860 0000019B FF <2> endvariant 1861 <2> mne FCMOVE ; ofs=1AAh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000003DA C619 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000003DC 46434D4F5645 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1862 0000019C FA6D28C8 <2> fpvariant 0DAh, 40, 0C8h, ASM_MACH6 1863 000001A0 FF <2> endvariant 1864 <2> mne FCMOVNA ; ofs=1AFh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000003E2 171A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000003E4 46434D4F564E41 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1865 000001A1 FA6D28D0 <2> fpvariant 0DAh, 40, 0D0h, ASM_MACH6 1866 000001A5 FF <2> endvariant 1867 <2> mne FCMOVNAE ; ofs=1B4h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000003EB 681A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000003ED 46434D4F564E4145 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1868 000001A6 FA6D28C0 <2> fpvariant 0DAh, 40, 0C0h, ASM_MACH6 1869 000001AA FF <2> endvariant 1870 <2> mne FCMOVNB ; ofs=1B9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000003F5 B71A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000003F7 46434D4F564E42 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1871 000001AB FA6DA8C0 <2> fpvariant 0DBh, 40, 0C0h, ASM_MACH6 1872 000001AF FF <2> endvariant 1873 <2> mne FCMOVNBE ; ofs=1BEh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000003FE 081B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000400 46434D4F564E4245 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1874 000001B0 FA6DA8D0 <2> fpvariant 0DBh, 40, 0D0h, ASM_MACH6 1875 000001B4 FF <2> endvariant 1876 <2> mne FCMOVNE ; ofs=1C3h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000408 571B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000040A 46434D4F564E45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1877 000001B5 FA6DA8C8 <2> fpvariant 0DBh, 40, 0C8h, ASM_MACH6 1878 000001B9 FF <2> endvariant 1879 <2> mne FCMOVNU ; ofs=1C8h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000411 A71B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000413 46434D4F564E55 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1880 000001BA FA6DA8D8 <2> fpvariant 0DBh, 40, 0D8h, ASM_MACH6 1881 000001BE FF <2> endvariant 1882 <2> mne FCMOVNZ ; ofs=1CDh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000041A F71B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000041C 46434D4F564E5A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1883 000001BF FA6DA8C8 <2> fpvariant 0DBh, 40, 0C8h, ASM_MACH6 1884 000001C3 FF <2> endvariant 1885 <2> mne FCMOVU ; ofs=1D2h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000423 461C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000425 46434D4F5655 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1886 000001C4 FA6D28D8 <2> fpvariant 0DAh, 40, 0D8h, ASM_MACH6 1887 000001C8 FF <2> endvariant 1888 <2> mne FCMOVZ ; ofs=1D7h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000042B 961C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000042D 46434D4F565A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1889 000001C9 FA6D28C8 <2> fpvariant 0DAh, 40, 0C8h, ASM_MACH6 1890 000001CD FF <2> endvariant 1891 <2> mne FCOM ; ofs=1DCh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000433 E41C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000435 46434F4D <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1892 000001CE F41424 <2> variant 210h, 36 1893 000001D1 F41626 <2> variant 214h, 38 1894 000001D4 6C32D0 <2> fpvariant 0D8h, 50, 0D0h 1895 000001D7 6C00D1 <2> fpvariant 0D8h, 0, 0D1h 1896 000001DA FF <2> endvariant 1897 <2> mne FCOMI ; ofs=1E9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000439 B51D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000043B 46434F4D49 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1898 000001DB FA6DB2F0 <2> fpvariant 0DBh, 50, 0F0h, ASM_MACH6 1899 000001DF FA6D80F1 <2> fpvariant 0DBh, 0, 0F1h, ASM_MACH6 1900 000001E3 FF <2> endvariant 1901 <2> mne FCOMIP ; ofs=1F2h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000440 461E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000442 46434F4D4950 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1902 000001E4 FA6FB2F0 <2> fpvariant 0DFh, 50, 0F0h, ASM_MACH6 1903 000001E8 FA6F80F1 <2> fpvariant 0DFh, 0, 0F1h, ASM_MACH6 1904 000001EC FF <2> endvariant 1905 <2> mne FCOMP ; ofs=1FBh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000448 D51E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000044A 46434F4D50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1906 000001ED F41824 <2> variant 218h, 36 1907 000001F0 F41A26 <2> variant 21Ch, 38 1908 000001F3 6C32D8 <2> fpvariant 0D8h, 50, 0D8h 1909 000001F6 6C00D9 <2> fpvariant 0D8h, 0, 0D9h 1910 000001F9 FF <2> endvariant 1911 <2> mne FCOMPP ; ofs=208h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000044F A61F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000451 46434F4D5050 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1912 000001FA 6F00D9 <2> fpvariant 0DEh, 0, 0D9h 1913 000001FD FF <2> endvariant 1914 <2> mne FCOS ; ofs=20Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000457 E41F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000459 46434F53 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1915 000001FE F76C80FF <2> fpvariant 0D9h, 0, 0FFh, ASM_MACH3 1916 00000202 FF <2> endvariant 1917 <2> mne FDECSTP ; ofs=211h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000045D 3720 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000045F 46444543535450 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1918 00000203 6C80F6 <2> fpvariant 0D9h, 0, 0F6h 1919 00000206 FF <2> endvariant 1920 <2> mne FDISI, ASM_WAIT ; ofs=215h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000207 FE <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000466 7520 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000468 4644495349 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1921 <2> mne FNDISI ; ofs=216h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000046D 8620 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000046F 464E44495349 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1922 00000208 6D80E1 <2> fpvariant 0DBh, 0, 0E1h 1923 0000020B FF <2> endvariant 1924 <2> mne FDIV ; ofs=21Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000475 C420 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000477 46444956 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1925 0000020C F42424 <2> variant 230h, 36 1926 0000020F F42626 <2> variant 234h, 38 1927 00000212 6C28F0 <2> fpvariant 0D8h, 40, 0F0h 1928 00000215 6E2BF8 <2> fpvariant 0DCh, 43, 0F8h 1929 00000218 FF <2> endvariant 1930 <2> mne FDIVP ; ofs=227h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000047B 9521 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000047D 4644495650 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1931 00000219 6F2AF8 <2> fpvariant 0DEh, 42, 0F8h 1932 0000021C 6F00F9 <2> fpvariant 0DEh, 0, 0F9h 1933 0000021F FF <2> endvariant 1934 <2> mne FIDIV ; ofs=22Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000482 0522 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000484 4649444956 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1935 00000220 F4252C <2> variant 232h, 44 1936 00000223 F4272E <2> variant 236h, 46 1937 00000226 FF <2> endvariant 1938 <2> mne FDIVR ; ofs=235h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000489 7522 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000048B 4644495652 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1939 00000227 F42824 <2> variant 238h, 36 1940 0000022A F42A26 <2> variant 23Ch, 38 1941 0000022D 6C28F8 <2> fpvariant 0D8h, 40, 0F8h 1942 00000230 6E2BF0 <2> fpvariant 0DCh, 43, 0F0h 1943 00000233 FF <2> endvariant 1944 <2> mne FDIVRP ; ofs=242h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000490 4623 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000492 464449565250 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1945 00000234 6F2AF0 <2> fpvariant 0DEh, 42, 0F0h 1946 00000237 6F00F1 <2> fpvariant 0DEh, 0, 0F1h 1947 0000023A FF <2> endvariant 1948 <2> mne FIDIVR ; ofs=249h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000498 B623 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000049A 464944495652 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1949 0000023B F4292C <2> variant 23Ah, 44 1950 0000023E F42B2E <2> variant 23Eh, 46 1951 00000241 FF <2> endvariant 1952 <2> mne FENI, ASM_WAIT ; ofs=250h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000242 FE <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004A0 2424 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004A2 46454E49 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1953 <2> mne FNENI ; ofs=251h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004A6 3524 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004A8 464E454E49 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1954 00000243 6D80E0 <2> fpvariant 0DBh, 0, 0E0h 1955 00000246 FF <2> endvariant 1956 <2> mne FFREE ; ofs=255h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004AD 7524 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004AF 4646524545 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1957 00000247 6EA9C0 <2> fpvariant 0DDh, 41, 0C0h 1958 0000024A FF <2> endvariant 1959 <2> mne FICOM ; ofs=259h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004B4 B524 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004B6 4649434F4D <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1960 0000024B F4152C <2> variant 212h, 44 1961 0000024E F4172E <2> variant 216h, 46 1962 00000251 FF <2> endvariant 1963 <2> mne FICOMP ; ofs=260h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004BB 2625 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004BD 4649434F4D50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1964 00000252 F4192C <2> variant 21Ah, 44 1965 00000255 F41B2E <2> variant 21Eh, 46 1966 00000258 FF <2> endvariant 1967 <2> mne FILD ; ofs=267h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004C3 9425 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004C5 46494C44 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1968 00000259 F40DAC <2> variant 203h, 44 1969 0000025C F40FAE <2> variant 207h, 46 1970 0000025F F4239E <2> variant 22Fh, 30 1971 00000262 FF <2> endvariant 1972 <2> mne FINCSTP ; ofs=271h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004C9 3726 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004CB 46494E43535450 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1973 00000263 6C80F7 <2> fpvariant 0D9h, 0, 0F7h 1974 00000266 FF <2> endvariant 1975 <2> mne FINIT, ASM_WAIT ; ofs=275h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000267 FE <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004D2 7526 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004D4 46494E4954 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1976 <2> mne FNINIT ; ofs=276h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004D9 8626 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004DB 464E494E4954 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1977 00000268 6D80E3 <2> fpvariant 0DBh, 0, 0E3h 1978 0000026B FF <2> endvariant 1979 <2> mne FIST ; ofs=27Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004E1 C426 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004E3 46495354 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1980 0000026C F415AD <2> variant 213h, 45 1981 0000026F F417AF <2> variant 217h, 47 1982 00000272 FF <2> endvariant 1983 <2> mne FISTP ; ofs=281h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004E7 3527 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004E9 4649535450 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1984 00000273 F419AD <2> variant 21Bh, 45 1985 00000276 F41BAF <2> variant 21Fh, 47 1986 00000279 F42B9F <2> variant 23Fh, 31 1987 0000027C FF <2> endvariant 1988 <2> mne FLD ; ofs=28Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004EE D327 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004F0 464C44 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1989 0000027D F40CA4 <2> variant 201h, 36 1990 00000280 F40EA6 <2> variant 205h, 38 1991 00000283 F421B0 <2> variant 22Bh, 48 1992 00000286 6CA9C0 <2> fpvariant 0D9h, 41, 0C0h 1993 00000289 FF <2> endvariant 1994 <2> mne FLD1 ; ofs=298h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004F3 A428 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004F5 464C4431 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1995 0000028A 6C80E8 <2> fpvariant 0D9h, 0, 0E8h 1996 0000028D FF <2> endvariant 1997 <2> mne FLDL2T ; ofs=29Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000004F9 E628 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000004FB 464C444C3254 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 1998 0000028E 6C80E9 <2> fpvariant 0D9h, 0, 0E9h 1999 00000291 FF <2> endvariant 2000 <2> mne FLDL2E ; ofs=2A0h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000501 2629 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000503 464C444C3245 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2001 00000292 6C80EA <2> fpvariant 0D9h, 0, 0EAh 2002 00000295 FF <2> endvariant 2003 <2> mne FLDPI ; ofs=2A4h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000509 6529 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000050B 464C445049 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2004 00000296 6C80EB <2> fpvariant 0D9h, 0, 0EBh 2005 00000299 FF <2> endvariant 2006 <2> mne FLDLG2 ; ofs=2A8h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000510 A629 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000512 464C444C4732 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2007 0000029A 6C80EC <2> fpvariant 0D9h, 0, 0ECh 2008 0000029D FF <2> endvariant 2009 <2> mne FLDLN2 ; ofs=2ACh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000518 E629 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000051A 464C444C4E32 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2010 0000029E 6C80ED <2> fpvariant 0D9h, 0, 0EDh 2011 000002A1 FF <2> endvariant 2012 <2> mne FLDZ ; ofs=2B0h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000520 242A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000522 464C445A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2013 000002A2 6C80EE <2> fpvariant 0D9h, 0, 0EEh 2014 000002A5 FF <2> endvariant 2015 <2> mne FLDCW, ASM_WAIT ; ofs=2B4h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000002A6 FE <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000526 652A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000528 464C444357 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2016 <2> mne FNLDCW ; ofs=2B5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000052D 762A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000052F 464E4C444357 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2017 000002A7 F420AE <2> variant 229h, 46 2018 000002AA FF <2> endvariant 2019 <2> mne FMUL ; ofs=2BDh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000535 B42A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000537 464D554C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2020 000002AB F41024 <2> variant 208h, 36 2021 000002AE F41226 <2> variant 20Ch, 38 2022 000002B1 6C28C8 <2> fpvariant 0D8h, 40, 0C8h 2023 000002B4 6E2BC8 <2> fpvariant 0DCh, 43, 0C8h 2024 000002B7 FF <2> endvariant 2025 <2> mne FMULP ; ofs=2CAh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000053B 852B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000053D 464D554C50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2026 000002B8 6F2AC8 <2> fpvariant 0DEh, 42, 0C8h 2027 000002BB 6F00C9 <2> fpvariant 0DEh, 0, 0C9h 2028 000002BE FF <2> endvariant 2029 <2> mne FIMUL ; ofs=2D1h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000542 F52B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000544 46494D554C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2030 000002BF F4112C <2> variant 20Ah, 44 2031 000002C2 F4132E <2> variant 20Eh, 46 2032 000002C5 FF <2> endvariant 2033 <2> mne FNOP ; ofs=2D8h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000549 642C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000054B 464E4F50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2034 000002C6 6C80D0 <2> fpvariant 0D9h, 0, 0D0h 2035 000002C9 FF <2> endvariant 2036 <2> mne FPATAN ; ofs=2DCh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000054F A62C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000551 46504154414E <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2037 000002CA 6C80F3 <2> fpvariant 0D9h, 0, 0F3h 2038 000002CD FF <2> endvariant 2039 <2> mne FPREM ; ofs=2E0h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000557 E52C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000559 465052454D <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2040 000002CE 6C80F8 <2> fpvariant 0D9h, 0, 0F8h 2041 000002D1 FF <2> endvariant 2042 <2> mne FPREM1 ; ofs=2E4h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000055E 262D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000560 465052454D31 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2043 000002D2 F76C80F5 <2> fpvariant 0D9h, 0, 0F5h, ASM_MACH3 2044 000002D6 FF <2> endvariant 2045 <2> mne FPTAN ; ofs=2E9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000566 752D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000568 465054414E <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2046 000002D7 6C80F2 <2> fpvariant 0D9h, 0, 0F2h 2047 000002DA FF <2> endvariant 2048 <2> mne FRNDINT ; ofs=2EDh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000056D B72D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000056F 46524E44494E54 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2049 000002DB 6C80FC <2> fpvariant 0D9h, 0, 0FCh 2050 000002DE FF <2> endvariant 2051 <2> mne FSCALE ; ofs=2FAh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000576 F62D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000578 465343414C45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2052 000002DF 6C80FD <2> fpvariant 0D9h, 0, 0FDh 2053 000002E2 FF <2> endvariant 2054 <2> mne FSETPM, ASM_WAIT ; ofs=2FEh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000002E3 FE <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000057E 362E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000580 46534554504D <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2055 <2> mne FNSETPM ; ofs=2FFh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000586 472E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000588 464E534554504D <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2056 000002E4 F66D80E4 <2> fpvariant 0DBh, 0, 0E4h, ASM_MACH2 2057 000002E8 FF <2> endvariant 2058 <2> mne FSIN ; ofs=304h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000058F 942E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000591 4653494E <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2059 000002E9 F76C80FE <2> fpvariant 0D9h, 0, 0FEh, ASM_MACH3 2060 000002ED FF <2> endvariant 2061 <2> mne FSINCOS ; ofs=309h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000595 E72E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000597 4653494E434F53 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2062 000002EE F76C80FB <2> fpvariant 0D9h, 0, 0FBh, ASM_MACH3 2063 000002F2 FF <2> endvariant 2064 <2> mne FSQRT ; ofs=30Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000059E 352F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005A0 4653515254 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2065 000002F3 6C80FA <2> fpvariant 0D9h, 0, 0FAh 2066 000002F6 FF <2> endvariant 2067 <2> mne FST ; ofs=312h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005A5 732F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005A7 465354 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2068 000002F7 F414A5 <2> variant 211h, 37 2069 000002FA F416A7 <2> variant 215h, 39 2070 000002FD 6EA9D0 <2> fpvariant 0DDh, 41, 0D0h 2071 00000300 FF <2> endvariant 2072 <2> mne FSTP ; ofs=31Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005AA 1430 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005AC 46535450 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2073 00000301 F418A5 <2> variant 219h, 37 2074 00000304 F41AA7 <2> variant 21Dh, 39 2075 00000307 F429B1 <2> variant 23Bh, 49 2076 0000030A 6EA9D8 <2> fpvariant 0DDh, 41, 0D8h 2077 0000030D FF <2> endvariant 2078 <2> mne FSTCW, ASM_WAIT ; ofs=329h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 0000030E FE <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005B0 E530 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005B2 4653544357 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2079 <2> mne FNSTCW ; ofs=32Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005B7 F630 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005B9 464E53544357 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2080 0000030F F428AF <2> variant 239h, 47 2081 00000312 FF <2> endvariant 2082 <2> mne FSTSW, ASM_WAIT ; ofs=333h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000313 FE <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005BF 3531 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005C1 4653545357 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2083 <2> mne FNSTSW ; ofs=334h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005C6 4631 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005C8 464E53545357 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2084 00000314 6FB6E0 <2> fpvariant 0DFh, 54, 0E0h 2085 00000317 F42AAF <2> variant 23Dh, 47 2086 0000031A FF <2> endvariant 2087 <2> mne FSUB ; ofs=33Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005CE B431 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005D0 46535542 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2088 0000031B F41C24 <2> variant 220h, 36 2089 0000031E F41E26 <2> variant 224h, 38 2090 00000321 6C28E0 <2> fpvariant 0D8h, 40, 0E0h 2091 00000324 6E2BE8 <2> fpvariant 0DCh, 43, 0E8h 2092 00000327 FF <2> endvariant 2093 <2> mne FSUBP ; ofs=348h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005D4 8532 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005D6 4653554250 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2094 00000328 6F2AE8 <2> fpvariant 0DEh, 42, 0E8h 2095 0000032B 6F00E9 <2> fpvariant 0DEh, 0, 0E9h 2096 0000032E FF <2> endvariant 2097 <2> mne FISUB ; ofs=34Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005DB F532 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005DD 4649535542 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2098 0000032F F41D2C <2> variant 222h, 44 2099 00000332 F41F2E <2> variant 226h, 46 2100 00000335 FF <2> endvariant 2101 <2> mne FSUBR ; ofs=356h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005E2 6533 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005E4 4653554252 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2102 00000336 F42024 <2> variant 228h, 36 2103 00000339 F42226 <2> variant 22Ch, 38 2104 0000033C 6C28E8 <2> fpvariant 0D8h, 40, 0E8h 2105 0000033F 6E2BE0 <2> fpvariant 0DCh, 43, 0E0h 2106 00000342 FF <2> endvariant 2107 <2> mne FSUBRP ; ofs=363h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005E9 3634 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005EB 465355425250 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2108 00000343 6F2AE0 <2> fpvariant 0DEh, 42, 0E0h 2109 00000346 6F00E1 <2> fpvariant 0DEh, 0, 0E1h 2110 00000349 FF <2> endvariant 2111 <2> mne FISUBR ; ofs=36Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005F1 A634 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005F3 464953554252 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2112 0000034A F4212C <2> variant 22Ah, 44 2113 0000034D F4232E <2> variant 22Eh, 46 2114 00000350 FF <2> endvariant 2115 <2> mne FTST ; ofs=371h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005F9 1435 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000005FB 46545354 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2116 00000351 6C80E4 <2> fpvariant 0D9h, 0, 0E4h 2117 00000354 FF <2> endvariant 2118 <2> mne FUCOM ; ofs=375h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000005FF 5535 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000601 4655434F4D <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2119 00000355 F76EB2E0 <2> fpvariant 0DDh, 50, 0E0h, ASM_MACH3 2120 00000359 F76E80E1 <2> fpvariant 0DDh, 0, 0E1h, ASM_MACH3 2121 0000035D FF <2> endvariant 2122 <2> mne FUCOMI ; ofs=37Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000606 E635 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000608 4655434F4D49 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2123 0000035E FA6DB2E8 <2> fpvariant 0DBh, 50, 0E8h, ASM_MACH6 2124 00000362 FA6D80E9 <2> fpvariant 0DBh, 0, 0E9h, ASM_MACH6 2125 00000366 FF <2> endvariant 2126 <2> mne FUCOMIP ; ofs=387h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000060E 7736 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000610 4655434F4D4950 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2127 00000367 FA6FB2E8 <2> fpvariant 0DFh, 50, 0E8h, ASM_MACH6 2128 0000036B FA6F80E9 <2> fpvariant 0DFh, 0, 0E9h, ASM_MACH6 2129 0000036F FF <2> endvariant 2130 <2> mne FUCOMP ; ofs=390h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000617 0637 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000619 4655434F4D50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2131 00000370 F76EB2E8 <2> fpvariant 0DDh, 50, 0E8h, ASM_MACH3 2132 00000374 F76E80E9 <2> fpvariant 0DDh, 0, 0E9h, ASM_MACH3 2133 00000378 FF <2> endvariant 2134 <2> mne FUCOMPP ; ofs=399h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000061F 9737 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000621 4655434F4D5050 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2135 00000379 F76D00E9 <2> fpvariant 0DAh, 0, 0E9h, ASM_MACH3 2136 0000037D FF <2> endvariant 2137 <2> mne FWAIT ; ofs=39Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000628 E537 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000062A 4657414954 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2138 0000037E 4D80 <2> variant 09Bh, 0 2139 00000380 FF <2> endvariant 2140 <2> mne FXAM ; ofs=3A1h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000062F 1438 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000631 4658414D <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2141 00000381 6C80E5 <2> fpvariant 0D9h, 0, 0E5h 2142 00000384 FF <2> endvariant 2143 <2> mne FXCH ; ofs=3A5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000635 5438 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000637 46584348 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2144 00000385 6CB2C8 <2> fpvariant 0D9h, 50, 0C8h 2145 00000388 6C80C9 <2> fpvariant 0D9h, 0, 0C9h 2146 0000038B FF <2> endvariant 2147 <2> mne FXTRACT ; ofs=3ACh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000063B C738 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000063D 46585452414354 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2148 0000038C 6C80F4 <2> fpvariant 0D9h, 0, 0F4h 2149 0000038F FF <2> endvariant 2150 <2> mne FYL2X ; ofs=3B0h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000644 0539 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000646 46594C3258 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2151 00000390 6C80F1 <2> fpvariant 0D9h, 0, 0F1h 2152 00000393 FF <2> endvariant 2153 <2> mne FYL2XP1 ; ofs=3B4h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000064B 4739 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000064D 46594C32585031 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2154 00000394 6C80F9 <2> fpvariant 0D9h, 0, 0F9h 2155 00000397 FF <2> endvariant 2156 <2> mne HLT ; ofs=3B8h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000654 8339 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000656 484C54 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2157 00000398 7A00 <2> variant 0F4h, 0 2158 0000039A FF <2> endvariant 2159 <2> mne IDIV ; ofs=3BBh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000659 B439 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000065B 49444956 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2160 0000039B F4478B <2> variant AGRP(6,7), 11 2161 0000039E FF <2> endvariant 2162 <2> mne IMUL ; ofs=3BFh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000065F F439 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000661 494D554C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2163 0000039F F4468B <2> variant AGRP(6,5), 11 2164 000003A2 F7D790 <2> variant 1AFh, 16, ASM_MACH3 2165 000003A5 F535B7 <2> variant 06Bh, 55, ASM_MACH1 2166 000003A8 F535B8 <2> variant 06Bh, 56, ASM_MACH1 2167 000003AB F534B9 <2> variant 069h, 57, ASM_MACH1 2168 000003AE F534BA <2> variant 069h, 58, ASM_MACH1 2169 000003B1 FF <2> endvariant 2170 <2> mne IN ; ofs=3D2h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000665 223B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000667 494E <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2171 000003B2 723B <2> variant 0E4h, 59 2172 000003B4 763C <2> variant 0ECh, 60 2173 000003B6 FF <2> endvariant 2174 <2> mne INC ; ofs=3D7h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000669 733B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000066B 494E43 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2175 000003B7 2021 <2> variant 040h, 33 2176 000003B9 FBF42C0D <2> variant AGRP(0,0), 13, ASM_LOCKABLE 2177 000003BD FF <2> endvariant 2178 <2> mne INSB ; ofs=3DEh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000066E E43B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000670 494E5342 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2179 000003BE F53600 <2> variant 06Ch, 0, ASM_MACH1 2180 000003C1 FF <2> endvariant 2181 <2> mne INT ; ofs=3E6h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000674 233C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000676 494E54 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2182 000003C2 663D <2> variant 0CCh, 61 2183 000003C4 66FB <2> variant 0CDh, 123 2184 000003C6 FF <2> endvariant 2185 <2> mne INT1 ; ofs=3EBh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000679 743C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000067B 494E5431 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2186 000003C7 FA78FF <2> variant 0F1h, 127, ASM_MACH6 2187 000003CA FF <2> endvariant 2188 <2> mne INT01 ; ofs=3EFh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000067F B53C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000681 494E543031 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2189 000003CB FA78FF <2> variant 0F1h, 127, ASM_MACH6 2190 000003CE FF <2> endvariant 2191 <2> mne ICEBP ; ofs=3F3h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000686 F53C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000688 4943454250 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2192 000003CF FA78FF <2> variant 0F1h, 127, ASM_MACH6 2193 000003D2 FF <2> endvariant 2194 <2> mne INT3 ; ofs=3F7h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000068D 343D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000068F 494E5433 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2195 000003D3 667F <2> variant 0CCh, 127 2196 000003D5 FF <2> endvariant 2197 <2> mne INT03 ; ofs=3FAh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000693 653D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000695 494E543033 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2198 000003D6 667F <2> variant 0CCh, 127 2199 000003D8 FF <2> endvariant 2200 <2> mne INTO ; ofs=3FDh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000069A 943D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000069C 494E544F <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2201 000003D9 677F <2> variant 0CEh, 127 2202 000003DB FF <2> endvariant 2203 <2> mne INVD ; ofs=400h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006A0 C43D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006A2 494E5644 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2204 000003DC F88400 <2> variant 108h, 0, ASM_MACH4 2205 000003DF FF <2> endvariant 2206 <2> mne INVLPG ; ofs=404h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006A6 063E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006A8 494E564C5047 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2207 000003E0 F8F44BB4 <2> variant AGRP(7,7), 52, ASM_MACH4 2208 000003E4 FF <2> endvariant 2209 <2> mne JA ; ofs=40Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006AE 523E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006B0 4A41 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2210 000003E5 3BBE <2> variant 077h, 62 2211 000003E7 F7C398 <2> variant 187h, 24, ASM_MACH3 2212 000003EA FF <2> endvariant 2213 <2> mne JAE ; ofs=412h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006B2 B33E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006B4 4A4145 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2214 000003EB 39BE <2> variant 073h, 62 2215 000003ED F7C198 <2> variant 183h, 24, ASM_MACH3 2216 000003F0 FF <2> endvariant 2217 <2> mne JB ; ofs=418h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006B7 123F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006B9 4A42 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2218 000003F1 393E <2> variant 072h, 62 2219 000003F3 F7C118 <2> variant 182h, 24, ASM_MACH3 2220 000003F6 FF <2> endvariant 2221 <2> mne JBE ; ofs=41Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006BB 733F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006BD 4A4245 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2222 000003F7 3B3E <2> variant 076h, 62 2223 000003F9 F7C318 <2> variant 186h, 24, ASM_MACH3 2224 000003FC FF <2> endvariant 2225 <2> mne JC ; ofs=424h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006C0 D23F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006C2 4A43 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2226 000003FD 393E <2> variant 072h, 62 2227 000003FF F7C118 <2> variant 182h, 24, ASM_MACH3 2228 00000402 FF <2> endvariant 2229 <2> mne JCXZ, ASM_D16 ; ofs=42Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000403 FC <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006C4 3440 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006C6 4A43585A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2230 <2> mne JECXZ, ASM_D32 ; ofs=42Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000404 FD <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006CA 4540 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006CC 4A4543585A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2231 00000405 71BE <2> variant 0E3h, 62 2232 00000407 FF <2> endvariant 2233 <2> mne JE ; ofs=42Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006D1 8240 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006D3 4A45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2234 00000408 3A3E <2> variant 074h, 62 2235 0000040A F7C218 <2> variant 184h, 24, ASM_MACH3 2236 0000040D FF <2> endvariant 2237 <2> mne JG ; ofs=435h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006D5 E240 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006D7 4A47 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2238 0000040E 3FBE <2> variant 07Fh, 62 2239 00000410 F7C798 <2> variant 18Fh, 24, ASM_MACH3 2240 00000413 FF <2> endvariant 2241 <2> mne JGE ; ofs=43Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006D9 4341 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006DB 4A4745 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2242 00000414 3EBE <2> variant 07Dh, 62 2243 00000416 F7C698 <2> variant 18Dh, 24, ASM_MACH3 2244 00000419 FF <2> endvariant 2245 <2> mne JL ; ofs=441h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006DE A241 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006E0 4A4C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2246 0000041A 3E3E <2> variant 07Ch, 62 2247 0000041C F7C618 <2> variant 18Ch, 24, ASM_MACH3 2248 0000041F FF <2> endvariant 2249 <2> mne JLE ; ofs=447h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006E2 0342 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006E4 4A4C45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2250 00000420 3F3E <2> variant 07Eh, 62 2251 00000422 F7C718 <2> variant 18Eh, 24, ASM_MACH3 2252 00000425 FF <2> endvariant 2253 <2> mne JNA ; ofs=44Dh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006E7 6342 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006E9 4A4E41 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2254 00000426 3B3E <2> variant 076h, 62 2255 00000428 F7C318 <2> variant 186h, 24, ASM_MACH3 2256 0000042B FF <2> endvariant 2257 <2> mne JNAE ; ofs=453h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006EC C442 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006EE 4A4E4145 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2258 0000042C 393E <2> variant 072h, 62 2259 0000042E F7C118 <2> variant 182h, 24, ASM_MACH3 2260 00000431 FF <2> endvariant 2261 <2> mne JNB ; ofs=459h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006F2 2343 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006F4 4A4E42 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2262 00000432 39BE <2> variant 073h, 62 2263 00000434 F7C198 <2> variant 183h, 24, ASM_MACH3 2264 00000437 FF <2> endvariant 2265 <2> mne JNBE ; ofs=45Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006F7 8443 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006F9 4A4E4245 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2266 00000438 3BBE <2> variant 077h, 62 2267 0000043A F7C398 <2> variant 187h, 24, ASM_MACH3 2268 0000043D FF <2> endvariant 2269 <2> mne JNC ; ofs=465h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000006FD E343 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000006FF 4A4E43 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2270 0000043E 39BE <2> variant 073h, 62 2271 00000440 F7C198 <2> variant 183h, 24, ASM_MACH3 2272 00000443 FF <2> endvariant 2273 <2> mne JNE ; ofs=46Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000702 4344 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000704 4A4E45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2274 00000444 3ABE <2> variant 075h, 62 2275 00000446 F7C298 <2> variant 185h, 24, ASM_MACH3 2276 00000449 FF <2> endvariant 2277 <2> mne JNG ; ofs=471h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000707 A344 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000709 4A4E47 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2278 0000044A 3F3E <2> variant 07Eh, 62 2279 0000044C F7C718 <2> variant 18Eh, 24, ASM_MACH3 2280 0000044F FF <2> endvariant 2281 <2> mne JNGE ; ofs=477h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000070C 0445 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000070E 4A4E4745 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2282 00000450 3E3E <2> variant 07Ch, 62 2283 00000452 F7C618 <2> variant 18Ch, 24, ASM_MACH3 2284 00000455 FF <2> endvariant 2285 <2> mne JNL ; ofs=47Dh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000712 6345 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000714 4A4E4C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2286 00000456 3EBE <2> variant 07Dh, 62 2287 00000458 F7C698 <2> variant 18Dh, 24, ASM_MACH3 2288 0000045B FF <2> endvariant 2289 <2> mne JNLE ; ofs=483h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000717 C445 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000719 4A4E4C45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2290 0000045C 3FBE <2> variant 07Fh, 62 2291 0000045E F7C798 <2> variant 18Fh, 24, ASM_MACH3 2292 00000461 FF <2> endvariant 2293 <2> mne JNO ; ofs=489h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000071D 2346 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000071F 4A4E4F <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2294 00000462 38BE <2> variant 071h, 62 2295 00000464 F7C098 <2> variant 181h, 24, ASM_MACH3 2296 00000467 FF <2> endvariant 2297 <2> mne JNP ; ofs=48Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000722 8346 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000724 4A4E50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2298 00000468 3DBE <2> variant 07Bh, 62 2299 0000046A F7C598 <2> variant 18Bh, 24, ASM_MACH3 2300 0000046D FF <2> endvariant 2301 <2> mne JNS ; ofs=495h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000727 E346 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000729 4A4E53 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2302 0000046E 3CBE <2> variant 079h, 62 2303 00000470 F7C498 <2> variant 189h, 24, ASM_MACH3 2304 00000473 FF <2> endvariant 2305 <2> mne JNZ ; ofs=49Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000072C 4347 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000072E 4A4E5A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2306 00000474 3ABE <2> variant 075h, 62 2307 00000476 F7C298 <2> variant 185h, 24, ASM_MACH3 2308 00000479 FF <2> endvariant 2309 <2> mne JO ; ofs=4A1h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000731 A247 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000733 4A4F <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2310 0000047A 383E <2> variant 070h, 62 2311 0000047C F7C018 <2> variant 180h, 24, ASM_MACH3 2312 0000047F FF <2> endvariant 2313 <2> mne JP ; ofs=4A7h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000735 0248 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000737 4A50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2314 00000480 3D3E <2> variant 07Ah, 62 2315 00000482 F7C518 <2> variant 18Ah, 24, ASM_MACH3 2316 00000485 FF <2> endvariant 2317 <2> mne JPE ; ofs=4ADh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000739 6348 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000073B 4A5045 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2318 00000486 3D3E <2> variant 07Ah, 62 2319 00000488 F7C518 <2> variant 18Ah, 24, ASM_MACH3 2320 0000048B FF <2> endvariant 2321 <2> mne JPO ; ofs=4B3h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000073E C348 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000740 4A504F <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2322 0000048C 3DBE <2> variant 07Bh, 62 2323 0000048E F7C598 <2> variant 18Bh, 24, ASM_MACH3 2324 00000491 FF <2> endvariant 2325 <2> mne JS ; ofs=4B9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000743 2249 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000745 4A53 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2326 00000492 3C3E <2> variant 078h, 62 2327 00000494 F7C418 <2> variant 188h, 24, ASM_MACH3 2328 00000497 FF <2> endvariant 2329 <2> mne JZ ; ofs=4BFh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000747 8249 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000749 4A5A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2330 00000498 3A3E <2> variant 074h, 62 2331 0000049A F7C218 <2> variant 184h, 24, ASM_MACH3 2332 0000049D FF <2> endvariant 2333 <2> mne JMP ; ofs=4C5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000074B E349 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000074D 4A4D50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2334 0000049E 75BE <2> variant 0EBh, 62 2335 000004A0 7498 <2> variant 0E9h, 24 2336 000004A2 F43E79 <2> variant AGRP(4,4), 121 2337 000004A5 F43E9C <2> variant AGRP(4,5), 28 2338 000004A8 751A <2> variant 0EAh, 26 2339 000004AA FF <2> endvariant 2340 <2> mne LAHF ; ofs=4D2h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000750 B44A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000752 4C414846 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2341 000004AB 4F80 <2> variant 09Fh, 0 2342 000004AD FF <2> endvariant 2343 <2> mne LAR ; ofs=4D5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000756 E34A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000758 4C4152 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2344 000004AE F68110 <2> variant 102h, 16, ASM_MACH2 2345 000004B1 FF <2> endvariant 2346 <2> mne LDS ; ofs=4D9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000075B 234B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000075D 4C4453 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2347 000004B2 628F <2> variant 0C5h, 15 2348 000004B4 FF <2> endvariant 2349 <2> mne LSS ; ofs=4DCh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000760 534B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000762 4C5353 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2350 000004B5 F7D90F <2> variant 1B2h, 15, ASM_MACH3 2351 000004B8 FF <2> endvariant 2352 <2> mne LES ; ofs=4E0h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000765 934B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000767 4C4553 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2353 000004B9 620F <2> variant 0C4h, 15 2354 000004BB FF <2> endvariant 2355 <2> mne LFS ; ofs=4E3h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000076A C34B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000076C 4C4653 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2356 000004BC F7DA0F <2> variant 1B4h, 15, ASM_MACH3 2357 000004BF FF <2> endvariant 2358 <2> mne LGS ; ofs=4E7h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000076F 034C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000771 4C4753 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2359 000004C0 F7DA8F <2> variant 1B5h, 15, ASM_MACH3 2360 000004C3 FF <2> endvariant 2361 <2> mne LEA ; ofs=4EBh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000774 434C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000776 4C4541 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2362 000004C4 46F7 <2> variant 08Dh, 119 2363 000004C6 FF <2> endvariant 2364 <2> mne LGDT ; ofs=4F2h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000779 744C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000077B 4C474454 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2365 000004C7 F6F44933 <2> variant AGRP(7,2), 51, ASM_MACH2 2366 000004CB FF <2> endvariant 2367 <2> mne LIDT ; ofs=4F7h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000077F C44C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000781 4C494454 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2368 000004CC F6F449B3 <2> variant AGRP(7,3), 51, ASM_MACH2 2369 000004D0 FF <2> endvariant 2370 <2> mne LLDT ; ofs=4FCh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000785 144D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000787 4C4C4454 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2371 000004D1 F6F44D49 <2> variant AGRP(8,2), 73, ASM_MACH2 2372 000004D5 FF <2> endvariant 2373 <2> mne LMSW ; ofs=501h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000078B 644D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000078D 4C4D5357 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2374 000004D6 F6F44B49 <2> variant AGRP(7,6), 73, ASM_MACH2 2375 000004DA FF <2> endvariant 2376 <2> mne LOCK, ASM_SPECIAL, 0F0h ; ofs=506h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000004DB FFF0 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000791 B44D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000793 4C4F434B <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2377 <2> mne LODSB ; ofs=508h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000797 D54D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000799 4C4F445342 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2378 000004DD 5600 <2> variant 0ACh, 0 2379 000004DF FF <2> endvariant 2380 <2> mne LOOP ; ofs=51Dh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000079E 044E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007A0 4C4F4F50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2381 000004E0 717C <2> variant 0E2h, 124 2382 000004E2 713E <2> variant 0E2h, 62 2383 000004E4 FF <2> endvariant 2384 <2> mne LOOPZ ; ofs=522h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007A4 554E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007A6 4C4F4F505A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2385 000004E5 70FC <2> variant 0E1h, 124 2386 000004E7 70BE <2> variant 0E1h, 62 2387 000004E9 FF <2> endvariant 2388 <2> mne LOOPE ; ofs=527h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007AB A54E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007AD 4C4F4F5045 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2389 000004EA 70FC <2> variant 0E1h, 124 2390 000004EC 70BE <2> variant 0E1h, 62 2391 000004EE FF <2> endvariant 2392 <2> mne LOOPNZ ; ofs=52Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007B2 F64E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007B4 4C4F4F504E5A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2393 000004EF 707C <2> variant 0E0h, 124 2394 000004F1 703E <2> variant 0E0h, 62 2395 000004F3 FF <2> endvariant 2396 <2> mne LOOPNE ; ofs=531h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007BA 464F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007BC 4C4F4F504E45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2397 000004F4 707C <2> variant 0E0h, 124 2398 000004F6 703E <2> variant 0E0h, 62 2399 000004F8 FF <2> endvariant 2400 <2> mne LSL ; ofs=536h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007C2 934F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007C4 4C534C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2401 000004F9 F68190 <2> variant 103h, 16, ASM_MACH2 2402 000004FC FF <2> endvariant 2403 <2> mne LTR ; ofs=53Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007C7 D34F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007C9 4C5452 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2404 000004FD F6F44DC9 <2> variant AGRP(8,3), 73, ASM_MACH2 2405 00000501 FF <2> endvariant 2406 <2> mne MOV ; ofs=53Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007CC 2350 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007CE 4D4F56 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2407 00000502 5043 <2> variant 0A0h, 67 2408 00000504 5144 <2> variant 0A2h, 68 2409 00000506 4409 <2> variant 088h, 9 2410 00000508 450A <2> variant 08Ah, 10 2411 0000050A 4641 <2> variant 08Ch, 65 2412 0000050C 4742 <2> variant 08Eh, 66 2413 0000050E 5845 <2> variant 0B0h, 69 2414 00000510 5C46 <2> variant 0B8h, 70 2415 00000512 F45004 <2> variant AGRP(9,0), 4 2416 00000515 F7906C <2> variant 120h, 108, ASM_MACH3 2417 00000518 F7916D <2> variant 122h, 109, ASM_MACH3 2418 0000051B F790EE <2> variant 121h, 110, ASM_MACH3 2419 0000051E F791EF <2> variant 123h, 111, ASM_MACH3 2420 00000521 F79270 <2> variant 124h, 112, ASM_MACH3 2421 00000524 F79371 <2> variant 126h, 113, ASM_MACH3 2422 00000527 FF <2> endvariant 2423 <2> mne MOVD ; ofs=565h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007D1 8452 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007D3 4D4F5644 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2424 00000528 F9B772 <2> variant 16Eh, 114, ASM_MACH5 2425 0000052B F9BF73 <2> variant 17Eh, 115, ASM_MACH5 2426 0000052E FF <2> endvariant 2427 <2> mne MOVQ ; ofs=56Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007D7 F452 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007D9 4D4F5651 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2428 0000052F F9B7F4 <2> variant 16Fh, 116, ASM_MACH5 2429 00000532 F9BFF5 <2> variant 17Fh, 117, ASM_MACH5 2430 00000535 FF <2> endvariant 2431 <2> mne PACKSSDW ; ofs=573h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007DD 6853 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007DF 5041434B53534457 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2432 00000536 F9B5F4 <2> variant 16Bh, 116, ASM_MACH5 2433 00000539 FF <2> endvariant 2434 <2> mne PACKSSWB ; ofs=577h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007E7 A853 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007E9 5041434B53535742 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2435 0000053A F9B1F4 <2> variant 163h, 116, ASM_MACH5 2436 0000053D FF <2> endvariant 2437 <2> mne PACKUSWB ; ofs=57Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007F1 E853 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007F3 5041434B55535742 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2438 0000053E F9B3F4 <2> variant 167h, 116, ASM_MACH5 2439 00000541 FF <2> endvariant 2440 <2> mne PADDB ; ofs=57Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000007FB 2554 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000007FD 5041444442 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2441 00000542 F9F40A74 <2> variant 1FCh, 116, ASM_MACH5 2442 00000546 FF <2> endvariant 2443 <2> mne PADDW ; ofs=584h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000802 7554 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000804 5041444457 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2444 00000547 F9F40AF4 <2> variant 1FDh, 116, ASM_MACH5 2445 0000054B FF <2> endvariant 2446 <2> mne PADDD ; ofs=589h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000809 C554 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000080B 5041444444 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2447 0000054C F9F40B74 <2> variant 1FEh, 116, ASM_MACH5 2448 00000550 FF <2> endvariant 2449 <2> mne PADDSB ; ofs=58Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000810 1655 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000812 504144445342 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2450 00000551 F9F40274 <2> variant 1ECh, 116, ASM_MACH5 2451 00000555 FF <2> endvariant 2452 <2> mne PADDSW ; ofs=593h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000818 6655 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000081A 504144445357 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2453 00000556 F9F402F4 <2> variant 1EDh, 116, ASM_MACH5 2454 0000055A FF <2> endvariant 2455 <2> mne PADDUSB ; ofs=598h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000820 B755 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000822 50414444555342 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2456 0000055B F9EE74 <2> variant 1DCh, 116, ASM_MACH5 2457 0000055E FF <2> endvariant 2458 <2> mne PADDUSW ; ofs=59Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000829 F755 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000082B 50414444555357 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2459 0000055F F9EEF4 <2> variant 1DDh, 116, ASM_MACH5 2460 00000562 FF <2> endvariant 2461 <2> mne PAND ; ofs=5A0h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000832 3456 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000834 50414E44 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2462 00000563 F9EDF4 <2> variant 1DBh, 116, ASM_MACH5 2463 00000566 FF <2> endvariant 2464 <2> mne PANDN ; ofs=5A4h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000838 7556 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000083A 50414E444E <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2465 00000567 F9EFF4 <2> variant 1DFh, 116, ASM_MACH5 2466 0000056A FF <2> endvariant 2467 <2> mne PCMPEQB ; ofs=5A8h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000083F B756 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000841 50434D50455142 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2468 0000056B F9BA74 <2> variant 174h, 116, ASM_MACH5 2469 0000056E FF <2> endvariant 2470 <2> mne PCMPEQW ; ofs=5ACh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000848 F756 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000084A 50434D50455157 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2471 0000056F F9BAF4 <2> variant 175h, 116, ASM_MACH5 2472 00000572 FF <2> endvariant 2473 <2> mne PCMPEQD ; ofs=5B0h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000851 3757 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000853 50434D50455144 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2474 00000573 F9BB74 <2> variant 176h, 116, ASM_MACH5 2475 00000576 FF <2> endvariant 2476 <2> mne PCMPGTB ; ofs=5B4h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000085A 7757 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000085C 50434D50475442 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2477 00000577 F9B274 <2> variant 164h, 116, ASM_MACH5 2478 0000057A FF <2> endvariant 2479 <2> mne PCMPGTW ; ofs=5B8h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000863 B757 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000865 50434D50475457 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2480 0000057B F9B2F4 <2> variant 165h, 116, ASM_MACH5 2481 0000057E FF <2> endvariant 2482 <2> mne PCMPGTD ; ofs=5BCh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000086C F757 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000086E 50434D50475444 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2483 0000057F F9B374 <2> variant 166h, 116, ASM_MACH5 2484 00000582 FF <2> endvariant 2485 <2> mne PMADDWD ; ofs=5C0h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000875 3758 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000877 504D4144445744 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2486 00000583 F9F406F4 <2> variant 1F5h, 116, ASM_MACH5 2487 00000587 FF <2> endvariant 2488 <2> mne PMULHW ; ofs=5C5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000087E 8658 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000880 504D554C4857 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2489 00000588 F9F2F4 <2> variant 1E5h, 116, ASM_MACH5 2490 0000058B FF <2> endvariant 2491 <2> mne PMULLW ; ofs=5C9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000886 C658 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000888 504D554C4C57 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2492 0000058C F9EAF4 <2> variant 1D5h, 116, ASM_MACH5 2493 0000058F FF <2> endvariant 2494 <2> mne POR ; ofs=5CDh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000088E 0359 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000890 504F52 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2495 00000590 F9F401F4 <2> variant 1EBh, 116, ASM_MACH5 2496 00000594 FF <2> endvariant 2497 <2> mne PSLLW ; ofs=5D2h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000893 5559 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000895 50534C4C57 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2498 00000595 F9F404F4 <2> variant 1F1h, 116, ASM_MACH5 2499 00000599 F9F45776 <2> variant AGRP(10,6), 118, ASM_MACH5 2500 0000059D FF <2> endvariant 2501 <2> mne PSLLD ; ofs=5DBh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000089A E559 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000089C 50534C4C44 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2502 0000059E F9F40574 <2> variant 1F2h, 116, ASM_MACH5 2503 000005A2 F9F45B76 <2> variant AGRP(11,6), 118, ASM_MACH5 2504 000005A6 FF <2> endvariant 2505 <2> mne PSLLQ ; ofs=5E4h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008A1 755A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008A3 50534C4C51 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2506 000005A7 F9F405F4 <2> variant 1F3h, 116, ASM_MACH5 2507 000005AB F9F45F76 <2> variant AGRP(12,6), 118, ASM_MACH5 2508 000005AF FF <2> endvariant 2509 <2> mne PSRAW ; ofs=5EDh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008A8 055B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008AA 5053524157 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2510 000005B0 F9F0F4 <2> variant 1E1h, 116, ASM_MACH5 2511 000005B3 F9F45676 <2> variant AGRP(10,4), 118, ASM_MACH5 2512 000005B7 FF <2> endvariant 2513 <2> mne PSRAD ; ofs=5F5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008AF 855B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008B1 5053524144 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2514 000005B8 F9F174 <2> variant 1E2h, 116, ASM_MACH5 2515 000005BB F9F45A76 <2> variant AGRP(11,4), 118, ASM_MACH5 2516 000005BF FF <2> endvariant 2517 <2> mne PSRLW ; ofs=5FDh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008B6 055C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008B8 5053524C57 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2518 000005C0 F9E8F4 <2> variant 1D1h, 116, ASM_MACH5 2519 000005C3 F9F45576 <2> variant AGRP(10,2), 118, ASM_MACH5 2520 000005C7 FF <2> endvariant 2521 <2> mne PSRLD ; ofs=605h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008BD 855C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008BF 5053524C44 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2522 000005C8 F9E974 <2> variant 1D2h, 116, ASM_MACH5 2523 000005CB F9F45976 <2> variant AGRP(11,2), 118, ASM_MACH5 2524 000005CF FF <2> endvariant 2525 <2> mne PSRLQ ; ofs=60Dh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008C4 055D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008C6 5053524C51 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2526 000005D0 F9E9F4 <2> variant 1D3h, 116, ASM_MACH5 2527 000005D3 F9F45D76 <2> variant AGRP(12,2), 118, ASM_MACH5 2528 000005D7 FF <2> endvariant 2529 <2> mne PSUBB ; ofs=615h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008CB 855D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008CD 5053554242 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2530 000005D8 F9F40874 <2> variant 1F8h, 116, ASM_MACH5 2531 000005DC FF <2> endvariant 2532 <2> mne PSUBW ; ofs=61Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008D2 D55D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008D4 5053554257 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2533 000005DD F9F408F4 <2> variant 1F9h, 116, ASM_MACH5 2534 000005E1 FF <2> endvariant 2535 <2> mne PSUBD ; ofs=61Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008D9 255E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008DB 5053554244 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2536 000005E2 F9F40974 <2> variant 1FAh, 116, ASM_MACH5 2537 000005E6 FF <2> endvariant 2538 <2> mne PSUBSB ; ofs=624h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008E0 765E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008E2 505355425342 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2539 000005E7 F9F40074 <2> variant 1E8h, 116, ASM_MACH5 2540 000005EB FF <2> endvariant 2541 <2> mne PSUBSW ; ofs=629h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008E8 C65E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008EA 505355425357 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2542 000005EC F9F400F4 <2> variant 1E9h, 116, ASM_MACH5 2543 000005F0 FF <2> endvariant 2544 <2> mne PSUBUSB ; ofs=62Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008F0 175F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008F2 50535542555342 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2545 000005F1 F9EC74 <2> variant 1D8h, 116, ASM_MACH5 2546 000005F4 FF <2> endvariant 2547 <2> mne PSUBUSW ; ofs=632h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000008F9 575F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000008FB 50535542555357 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2548 000005F5 F9ECF4 <2> variant 1D9h, 116, ASM_MACH5 2549 000005F8 FF <2> endvariant 2550 <2> mne PUNPCKHBW ; ofs=636h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000902 995F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000904 50554E50434B484257 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2551 000005F9 F9B474 <2> variant 168h, 116, ASM_MACH5 2552 000005FC FF <2> endvariant 2553 <2> mne PUNPCKHWD ; ofs=63Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000090D D95F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000090F 50554E50434B485744 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2554 000005FD F9B4F4 <2> variant 169h, 116, ASM_MACH5 2555 00000600 FF <2> endvariant 2556 <2> mne PUNPCKHDQ ; ofs=63Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000918 1960 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000091A 50554E50434B484451 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2557 00000601 F9B574 <2> variant 16Ah, 116, ASM_MACH5 2558 00000604 FF <2> endvariant 2559 <2> mne PUNPCKLBW ; ofs=642h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000923 5960 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000925 50554E50434B4C4257 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2560 00000605 F9B074 <2> variant 160h, 116, ASM_MACH5 2561 00000608 FF <2> endvariant 2562 <2> mne PUNPCKLWD ; ofs=646h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000092E 9960 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000930 50554E50434B4C5744 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2563 00000609 F9B0F4 <2> variant 161h, 116, ASM_MACH5 2564 0000060C FF <2> endvariant 2565 <2> mne PUNPCKLDQ ; ofs=64Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000939 D960 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000093B 50554E50434B4C4451 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2566 0000060D F9B174 <2> variant 162h, 116, ASM_MACH5 2567 00000610 FF <2> endvariant 2568 <2> mne PXOR ; ofs=64Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000944 1461 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000946 50584F52 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2569 00000611 F9F403F4 <2> variant 1EFh, 116, ASM_MACH5 2570 00000615 FF <2> endvariant 2571 <2> mne MOVSB ; ofs=653h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000094A 6561 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000094C 4D4F565342 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2572 00000616 5200 <2> variant 0A4h, 0 2573 00000618 FF <2> endvariant 2574 <2> mne MOVSX ; ofs=659h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000951 9561 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000953 4D4F565358 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2575 00000619 F7DF47 <2> variant 1BEh, 71, ASM_MACH3 2576 0000061C F7DFC8 <2> variant 1BFh, 72, ASM_MACH3 2577 0000061F FF <2> endvariant 2578 <2> mne MOVZX ; ofs=660h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000958 0562 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000095A 4D4F565A58 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2579 00000620 F7DB47 <2> variant 1B6h, 71, ASM_MACH3 2580 00000623 F7DBC8 <2> variant 1B7h, 72, ASM_MACH3 2581 00000626 FF <2> endvariant 2582 <2> mne MUL ; ofs=667h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000095F 7362 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000961 4D554C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2583 00000627 F4460B <2> variant AGRP(6,4), 11 2584 0000062A FF <2> endvariant 2585 <2> mne NEG ; ofs=66Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000964 B362 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000966 4E4547 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2586 0000062B FBF4458D <2> variant AGRP(6,3), 13, ASM_LOCKABLE 2587 0000062F FF <2> endvariant 2588 <2> mne NOP ; ofs=670h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000969 0363 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000096B 4E4F50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2589 00000630 4800 <2> variant 090h, 0 2590 00000632 FF <2> endvariant 2591 <2> mne NOT ; ofs=673h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000096E 3363 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000970 4E4F54 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2592 00000633 FBF4450D <2> variant AGRP(6,2), 13, ASM_LOCKABLE 2593 00000637 FF <2> endvariant 2594 <2> mne OR ; ofs=678h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000973 8263 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000975 4F52 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2595 00000638 FBF43085 <2> variant AGRP(1,1), 5, ASM_LOCKABLE 2596 0000063C 0601 <2> variant 00Ch, 1 2597 0000063E FBF43482 <2> variant AGRP(2,1), 2, ASM_LOCKABLE 2598 00000642 FB0407 <2> variant 008h, 7, ASM_LOCKABLE 2599 00000645 050A <2> variant 00Ah, 10 2600 00000647 FF <2> endvariant 2601 <2> mne ORG, ASM_SPECIAL ; ofs=688h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000648 FF <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000977 8364 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000979 4F5247 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2602 <2> mne OUT ; ofs=68Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000097C 9364 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000097E 4F5554 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2603 00000649 734A <2> variant 0E6h, 74 2604 0000064B 774B <2> variant 0EEh, 75 2605 0000064D FF <2> endvariant 2606 <2> mne OUTSB ; ofs=68Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000981 E564 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000983 4F55545342 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2607 0000064E F53700 <2> variant 06Eh, 0, ASM_MACH1 2608 00000651 FF <2> endvariant 2609 <2> mne POP ; ofs=697h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000988 2365 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000098A 504F50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2610 00000652 2C22 <2> variant 058h, 34 2611 00000654 F4604C <2> variant AGRP(13,0), 76 2612 00000657 0FE9 <2> variant 01Fh, 105 2613 00000659 03E7 <2> variant 007h, 103 2614 0000065B 0BE8 <2> variant 017h, 104 2615 0000065D F7D0EA <2> variant 1A1h, 106, ASM_MACH3 2616 00000660 F7D4EB <2> variant 1A9h, 107, ASM_MACH3 2617 00000663 FF <2> endvariant 2618 <2> mne PUSH ; ofs=6B0h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000098D 4466 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000098F 50555348 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2619 00000664 2820 <2> variant 050h, 32 2620 00000666 F43F3F <2> variant AGRP(4,6), 63 2621 00000669 F5354F <2> variant 06Ah, 79, ASM_MACH1 2622 0000066C F5344E <2> variant 068h, 78, ASM_MACH1 2623 0000066F 075D <2> variant 00Eh, 93 2624 00000671 0B5F <2> variant 016h, 95 2625 00000673 0F61 <2> variant 01Eh, 97 2626 00000675 035B <2> variant 006h, 91 2627 00000677 F7D063 <2> variant 1A0h, 99, ASM_MACH3 2628 0000067A F7D465 <2> variant 1A8h, 101, ASM_MACH3 2629 0000067D FF <2> endvariant 2630 <2> mne RCL ; ofs=6D8h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000993 E367 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000995 52434C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2631 0000067E F46550 <2> variant AGRP(14,2), 80 2632 00000681 F46951 <2> variant AGRP(15,2), 81 2633 00000684 F5F46D52 <2> variant AGRP(16,2), 82, ASM_MACH1 2634 00000688 FF <2> endvariant 2635 <2> mne RCR ; ofs=6E3h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000998 9368 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000099A 524352 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2636 00000689 F465D0 <2> variant AGRP(14,3), 80 2637 0000068C F469D1 <2> variant AGRP(15,3), 81 2638 0000068F F5F46DD2 <2> variant AGRP(16,3), 82, ASM_MACH1 2639 00000693 FF <2> endvariant 2640 <2> mne ROL ; ofs=6EEh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 0000099D 4369 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 0000099F 524F4C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2641 00000694 F46450 <2> variant AGRP(14,0), 80 2642 00000697 F46851 <2> variant AGRP(15,0), 81 2643 0000069A F5F46C52 <2> variant AGRP(16,0), 82, ASM_MACH1 2644 0000069E FF <2> endvariant 2645 <2> mne ROR ; ofs=6F9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009A2 F369 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009A4 524F52 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2646 0000069F F464D0 <2> variant AGRP(14,1), 80 2647 000006A2 F468D1 <2> variant AGRP(15,1), 81 2648 000006A5 F5F46CD2 <2> variant AGRP(16,1), 82, ASM_MACH1 2649 000006A9 FF <2> endvariant 2650 <2> mne RDMSR ; ofs=704h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009A7 A56A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009A9 52444D5352 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2651 000006AA F99900 <2> variant 132h, 0, ASM_MACH5 2652 000006AD FF <2> endvariant 2653 <2> mne RDTSC ; ofs=708h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009AE E56A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009B0 5244545343 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2654 000006AE F99880 <2> variant 131h, 0, ASM_MACH5 2655 000006B1 FF <2> endvariant 2656 <2> mne REP, ASM_SPECIAL, 0F3h ; ofs=70Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000006B2 FFF3 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009B5 236B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009B7 524550 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2657 <2> mne REPZ, ASM_SPECIAL, 0F3h ; ofs=70Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000006B4 FFF3 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009BA 446B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009BC 5245505A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2658 <2> mne REPNZ, ASM_SPECIAL, 0F2h ; ofs=710h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000006B6 FFF2 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009C0 656B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009C2 5245504E5A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2659 <2> mne REPE, ASM_SPECIAL, 0F3h ; ofs=712h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000006B8 FFF3 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009C7 846B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009C9 52455045 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2660 <2> mne REPNE, ASM_SPECIAL, 0F2h ; ofs=714h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000006BA FFF2 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009CD A56B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009CF 5245504E45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2661 <2> mne RSM ; ofs=725h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009D4 C36B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009D6 52534D <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2662 000006BC F9D500 <2> variant 1AAh, 0, ASM_MACH5 2663 000006BF FF <2> endvariant 2664 <2> mne SAHF ; ofs=729h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009D9 046C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009DB 53414846 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2665 000006C0 4F00 <2> variant 09Eh, 0 2666 000006C2 FF <2> endvariant 2667 <2> mne SAL ; ofs=72Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009DF 336C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009E1 53414C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2668 000006C3 F46650 <2> variant AGRP(14,4), 80 2669 000006C6 F46A51 <2> variant AGRP(15,4), 81 2670 000006C9 F5F46E52 <2> variant AGRP(16,4), 82, ASM_MACH1 2671 000006CD FF <2> endvariant 2672 <2> mne SAR ; ofs=737h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009E4 E36C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009E6 534152 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2673 000006CE F467D0 <2> variant AGRP(14,7), 80 2674 000006D1 F46BD1 <2> variant AGRP(15,7), 81 2675 000006D4 F5F46FD2 <2> variant AGRP(16,7), 82, ASM_MACH1 2676 000006D8 FF <2> endvariant 2677 <2> mne SEG ; ofs=742h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009E9 936D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009EB 534547 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2678 000006D9 135C <2> variant 026h, 92 2679 000006DB 175E <2> variant 02Eh, 94 2680 000006DD 1B60 <2> variant 036h, 96 2681 000006DF 1F62 <2> variant 03Eh, 98 2682 000006E1 3264 <2> variant 064h, 100 2683 000006E3 32E6 <2> variant 065h, 102 2684 000006E5 FF <2> endvariant 2685 <2> mne ES, ASM_SPECIAL, 026h ; ofs=74Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000006E6 FF26 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009EE 626E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009F0 4553 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2686 <2> mne CS, ASM_SPECIAL, 02Eh ; ofs=751h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000006E8 FF2E <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009F2 826E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009F4 4353 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2687 <2> mne SS, ASM_SPECIAL, 036h ; ofs=753h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000006EA FF36 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009F6 A26E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009F8 5353 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2688 <2> mne DS, ASM_SPECIAL, 03Eh ; ofs=755h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000006EC FF3E <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009FA C26E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 000009FC 4453 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2689 <2> mne FS, ASM_SPECIAL, 064h ; ofs=757h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000006EE FF64 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 000009FE E26E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A00 4653 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2690 <2> mne GS, ASM_SPECIAL, 065h ; ofs=759h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 000006F0 FF65 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A02 026F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A04 4753 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2691 <2> mne SHL ; ofs=75Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A06 236F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A08 53484C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2692 000006F2 F46650 <2> variant AGRP(14,4), 80 2693 000006F5 F46A51 <2> variant AGRP(15,4), 81 2694 000006F8 F5F46E52 <2> variant AGRP(16,4), 82, ASM_MACH1 2695 000006FC FF <2> endvariant 2696 <2> mne SHR ; ofs=766h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A0B D36F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A0D 534852 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2697 000006FD F466D0 <2> variant AGRP(14,5), 80 2698 00000700 F46AD1 <2> variant AGRP(15,5), 81 2699 00000703 F5F46ED2 <2> variant AGRP(16,5), 82, ASM_MACH1 2700 00000707 FF <2> endvariant 2701 <2> mne SBB ; ofs=771h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A10 8370 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A12 534242 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2702 00000708 FBF43185 <2> variant AGRP(1,3), 5, ASM_LOCKABLE 2703 0000070C 0E01 <2> variant 01Ch, 1 2704 0000070E FBF43582 <2> variant AGRP(2,3), 2, ASM_LOCKABLE 2705 00000712 FB0C07 <2> variant 018h, 7, ASM_LOCKABLE 2706 00000715 0D0A <2> variant 01Ah, 10 2707 00000717 FF <2> endvariant 2708 <2> mne SCASB ; ofs=781h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A15 8571 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A17 5343415342 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2709 00000718 5700 <2> variant 0AEh, 0 2710 0000071A FF <2> endvariant 2711 <2> mne SETA ; ofs=787h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A1C B471 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A1E 53455441 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2712 0000071B F7CBD6 <2> variant 197h, 86, ASM_MACH3 2713 0000071E FF <2> endvariant 2714 <2> mne SETAE ; ofs=78Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A22 F571 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A24 5345544145 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2715 0000071F F7C9D6 <2> variant 193h, 86, ASM_MACH3 2716 00000722 FF <2> endvariant 2717 <2> mne SETB ; ofs=78Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A29 3472 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A2B 53455442 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2718 00000723 F7C956 <2> variant 192h, 86, ASM_MACH3 2719 00000726 FF <2> endvariant 2720 <2> mne SETBE ; ofs=793h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A2F 7572 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A31 5345544245 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2721 00000727 F7CB56 <2> variant 196h, 86, ASM_MACH3 2722 0000072A FF <2> endvariant 2723 <2> mne SETC ; ofs=797h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A36 B472 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A38 53455443 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2724 0000072B F7C956 <2> variant 192h, 86, ASM_MACH3 2725 0000072E FF <2> endvariant 2726 <2> mne SETE ; ofs=79Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A3C F472 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A3E 53455445 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2727 0000072F F7CA56 <2> variant 194h, 86, ASM_MACH3 2728 00000732 FF <2> endvariant 2729 <2> mne SETG ; ofs=79Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A42 3473 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A44 53455447 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2730 00000733 F7CFD6 <2> variant 19Fh, 86, ASM_MACH3 2731 00000736 FF <2> endvariant 2732 <2> mne SETGE ; ofs=7A3h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A48 7573 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A4A 5345544745 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2733 00000737 F7CED6 <2> variant 19Dh, 86, ASM_MACH3 2734 0000073A FF <2> endvariant 2735 <2> mne SETL ; ofs=7A7h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A4F B473 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A51 5345544C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2736 0000073B F7CE56 <2> variant 19Ch, 86, ASM_MACH3 2737 0000073E FF <2> endvariant 2738 <2> mne SETLE ; ofs=7ABh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A55 F573 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A57 5345544C45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2739 0000073F F7CF56 <2> variant 19Eh, 86, ASM_MACH3 2740 00000742 FF <2> endvariant 2741 <2> mne SETNA ; ofs=7AFh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A5C 3574 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A5E 5345544E41 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2742 00000743 F7CB56 <2> variant 196h, 86, ASM_MACH3 2743 00000746 FF <2> endvariant 2744 <2> mne SETNAE ; ofs=7B3h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A63 7674 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A65 5345544E4145 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2745 00000747 F7C956 <2> variant 192h, 86, ASM_MACH3 2746 0000074A FF <2> endvariant 2747 <2> mne SETNB ; ofs=7B7h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A6B B574 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A6D 5345544E42 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2748 0000074B F7C9D6 <2> variant 193h, 86, ASM_MACH3 2749 0000074E FF <2> endvariant 2750 <2> mne SETNBE ; ofs=7BBh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A72 F674 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A74 5345544E4245 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2751 0000074F F7CBD6 <2> variant 197h, 86, ASM_MACH3 2752 00000752 FF <2> endvariant 2753 <2> mne SETNC ; ofs=7BFh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A7A 3575 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A7C 5345544E43 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2754 00000753 F7C9D6 <2> variant 193h, 86, ASM_MACH3 2755 00000756 FF <2> endvariant 2756 <2> mne SETNE ; ofs=7C3h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A81 7575 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A83 5345544E45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2757 00000757 F7CAD6 <2> variant 195h, 86, ASM_MACH3 2758 0000075A FF <2> endvariant 2759 <2> mne SETNG ; ofs=7C7h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A88 B575 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A8A 5345544E47 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2760 0000075B F7CF56 <2> variant 19Eh, 86, ASM_MACH3 2761 0000075E FF <2> endvariant 2762 <2> mne SETNGE ; ofs=7CBh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A8F F675 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A91 5345544E4745 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2763 0000075F F7CE56 <2> variant 19Ch, 86, ASM_MACH3 2764 00000762 FF <2> endvariant 2765 <2> mne SETNL ; ofs=7CFh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A97 3576 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000A99 5345544E4C <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2766 00000763 F7CED6 <2> variant 19Dh, 86, ASM_MACH3 2767 00000766 FF <2> endvariant 2768 <2> mne SETNLE ; ofs=7D3h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000A9E 7676 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000AA0 5345544E4C45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2769 00000767 F7CFD6 <2> variant 19Fh, 86, ASM_MACH3 2770 0000076A FF <2> endvariant 2771 <2> mne SETNO ; ofs=7D7h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000AA6 B576 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000AA8 5345544E4F <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2772 0000076B F7C8D6 <2> variant 191h, 86, ASM_MACH3 2773 0000076E FF <2> endvariant 2774 <2> mne SETNP ; ofs=7DBh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000AAD F576 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000AAF 5345544E50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2775 0000076F F7CDD6 <2> variant 19Bh, 86, ASM_MACH3 2776 00000772 FF <2> endvariant 2777 <2> mne SETNS ; ofs=7DFh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000AB4 3577 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000AB6 5345544E53 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2778 00000773 F7CCD6 <2> variant 199h, 86, ASM_MACH3 2779 00000776 FF <2> endvariant 2780 <2> mne SETNZ ; ofs=7E3h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000ABB 7577 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000ABD 5345544E5A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2781 00000777 F7CAD6 <2> variant 195h, 86, ASM_MACH3 2782 0000077A FF <2> endvariant 2783 <2> mne SETO ; ofs=7E7h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000AC2 B477 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000AC4 5345544F <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2784 0000077B F7C856 <2> variant 190h, 86, ASM_MACH3 2785 0000077E FF <2> endvariant 2786 <2> mne SETP ; ofs=7EBh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000AC8 F477 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000ACA 53455450 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2787 0000077F F7CD56 <2> variant 19Ah, 86, ASM_MACH3 2788 00000782 FF <2> endvariant 2789 <2> mne SETPE ; ofs=7EFh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000ACE 3578 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000AD0 5345545045 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2790 00000783 F7CD56 <2> variant 19Ah, 86, ASM_MACH3 2791 00000786 FF <2> endvariant 2792 <2> mne SETPO ; ofs=7F3h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000AD5 7578 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000AD7 534554504F <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2793 00000787 F7CDD6 <2> variant 19Bh, 86, ASM_MACH3 2794 0000078A FF <2> endvariant 2795 <2> mne SETS ; ofs=7F7h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000ADC B478 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000ADE 53455453 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2796 0000078B F7CC56 <2> variant 198h, 86, ASM_MACH3 2797 0000078E FF <2> endvariant 2798 <2> mne SETZ ; ofs=7FBh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000AE2 F478 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000AE4 5345545A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2799 0000078F F7CA56 <2> variant 194h, 86, ASM_MACH3 2800 00000792 FF <2> endvariant 2801 <2> mne SGDT ; ofs=7FFh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000AE8 3479 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000AEA 53474454 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2802 00000793 F6F44835 <2> variant AGRP(7,0), 53, ASM_MACH2 2803 00000797 FF <2> endvariant 2804 <2> mne SIDT ; ofs=804h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000AEE 8479 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000AF0 53494454 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2805 00000798 F6F448B5 <2> variant AGRP(7,1), 53, ASM_MACH2 2806 0000079C FF <2> endvariant 2807 <2> mne SHLD ; ofs=809h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000AF4 D479 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000AF6 53484C44 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2808 0000079D F7D257 <2> variant 1A4h, 87, ASM_MACH3 2809 000007A0 F7D2D8 <2> variant 1A5h, 88, ASM_MACH3 2810 000007A3 FF <2> endvariant 2811 <2> mne SHRD ; ofs=810h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000AFA 447A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000AFC 53485244 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2812 000007A4 F7D657 <2> variant 1ACh, 87, ASM_MACH3 2813 000007A7 F7D6D8 <2> variant 1ADh, 88, ASM_MACH3 2814 000007AA FF <2> endvariant 2815 <2> mne SLDT ; ofs=817h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B00 B47A <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B02 534C4454 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2816 000007AB F6F44C4D <2> variant AGRP(8,0), 77, ASM_MACH2 2817 000007AF FF <2> endvariant 2818 <2> mne SMSW ; ofs=81Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B06 047B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B08 534D5357 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2819 000007B0 F6F44A4D <2> variant AGRP(7,4), 77, ASM_MACH2 2820 000007B4 FF <2> endvariant 2821 <2> mne STC ; ofs=821h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B0C 537B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B0E 535443 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2822 000007B5 7C80 <2> variant 0F9h, 0 2823 000007B7 FF <2> endvariant 2824 <2> mne STD ; ofs=824h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B11 837B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B13 535444 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2825 000007B8 7E80 <2> variant 0FDh, 0 2826 000007BA FF <2> endvariant 2827 <2> mne STI ; ofs=827h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B16 B37B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B18 535449 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2828 000007BB 7D80 <2> variant 0FBh, 0 2829 000007BD FF <2> endvariant 2830 <2> mne STOSB ; ofs=82Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B1B E57B <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B1D 53544F5342 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2831 000007BE 5500 <2> variant 0AAh, 0 2832 000007C0 FF <2> endvariant 2833 <2> mne STR ; ofs=830h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B22 137C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B24 535452 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2834 000007C1 F6F44CC0 <2> variant AGRP(8,1), 64, ASM_MACH2 2835 000007C5 FF <2> endvariant 2836 <2> mne SUB ; ofs=835h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B27 637C <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B29 535542 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2837 000007C6 FBF43285 <2> variant AGRP(1,5), 5, ASM_LOCKABLE 2838 000007CA 1601 <2> variant 02Ch, 1 2839 000007CC FBF43682 <2> variant AGRP(2,5), 2, ASM_LOCKABLE 2840 000007D0 FB1407 <2> variant 028h, 7, ASM_LOCKABLE 2841 000007D3 150A <2> variant 02Ah, 10 2842 000007D5 FF <2> endvariant 2843 <2> mne SALC ; ofs=845h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B2C 647D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B2E 53414C43 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2844 000007D6 F66B00 <2> variant 0D6h, 0, ASM_MACH2 2845 000007D9 FF <2> endvariant 2846 <2> mne SETALC ; ofs=849h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B32 A67D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B34 534554414C43 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2847 000007DA F66B00 <2> variant 0D6h, 0, ASM_MACH2 2848 000007DD FF <2> endvariant 2849 <2> mne TEST ; ofs=84Dh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B3A E47D <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B3C 54455354 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2850 000007DE 5401 <2> variant 0A8h, 1 2851 000007E0 F44403 <2> variant AGRP(6,0), 3 2852 000007E3 4208 <2> variant 084h, 8 2853 000007E5 420A <2> variant 084h, 10 2854 000007E7 FF <2> endvariant 2855 <2> mne UD0 ; ofs=857h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B40 837E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B42 554430 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2856 000007E8 F5F40B80 <2> variant 1FFh, 0, ASM_MACH1 2857 000007EC FF <2> endvariant 2858 <2> mne UD1 ; ofs=85Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B45 D37E <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B47 554431 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2859 000007ED F5DC80 <2> variant 1B9h, 0, ASM_MACH1 2860 000007F0 FF <2> endvariant 2861 <2> mne UD2 ; ofs=860h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B4A 137F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B4C 554432 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2862 000007F1 F58580 <2> variant 10Bh, 0, ASM_MACH1 2863 000007F4 FF <2> endvariant 2864 <2> mne VERR ; ofs=864h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B4F 547F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B51 56455252 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2865 000007F5 F6F44E49 <2> variant AGRP(8,4), 73, ASM_MACH2 2866 000007F9 FF <2> endvariant 2867 <2> mne VERW ; ofs=869h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B55 A47F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B57 56455257 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2868 000007FA F6F44EC9 <2> variant AGRP(8,5), 73, ASM_MACH2 2869 000007FE FF <2> endvariant 2870 <2> mne WAIT ; ofs=86Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B5B F47F <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B5D 57414954 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2871 000007FF 4D80 <2> variant 09Bh, 0 2872 00000801 FF <2> endvariant 2873 <2> mne WBINVD ; ofs=871h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B61 2680 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B63 5742494E5644 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2874 00000802 F88480 <2> variant 109h, 0, ASM_MACH4 2875 00000805 FF <2> endvariant 2876 <2> mne WRMSR ; ofs=875h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B69 6580 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B6B 57524D5352 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2877 00000806 F99800 <2> variant 130h, 0, ASM_MACH5 2878 00000809 FF <2> endvariant 2879 <2> mne XADD ; ofs=879h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B70 A480 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B72 58414444 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2880 0000080A FBF8E007 <2> variant 1C0h, 7, ASM_LOCKABLE, ASM_MACH4 2881 0000080E FF <2> endvariant 2882 <2> mne XCHG ; ofs=87Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B76 F480 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B78 58434847 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2883 0000080F 4859 <2> variant 090h, 89 2884 00000811 485A <2> variant 090h, 90 2885 00000813 FB4307 <2> variant 086h, 7, ASM_LOCKABLE 2886 00000816 FB430C <2> variant 086h, 12, ASM_LOCKABLE 2887 00000819 FF <2> endvariant 2888 <2> mne XLAT ; ofs=889h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B7C A481 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B7E 584C4154 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2889 0000081A 6B80 <2> variant 0D7h, 0 2890 0000081C FF <2> endvariant 2891 <2> mne XLATB ; ofs=88Ch 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B82 D581 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B84 584C415442 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2892 0000081D 6B80 <2> variant 0D7h, 0 2893 0000081F FF <2> endvariant 2894 <2> mne XOR ; ofs=88Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B89 0382 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B8B 584F52 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2895 00000820 FBF43305 <2> variant AGRP(1,6), 5, ASM_LOCKABLE 2896 00000824 1A01 <2> variant 034h, 1 2897 00000826 FBF43702 <2> variant AGRP(2,6), 2, ASM_LOCKABLE 2898 0000082A FB1807 <2> variant 030h, 7, ASM_LOCKABLE 2899 0000082D 190A <2> variant 032h, 10 2900 0000082F FF <2> endvariant 2901 <2> 2902 <2> ; The following mnemonics allow an address size suffix 2903 <2> ; but do not require it. 2904 <2> 2905 <2> mnlist_a_suffix_allowed label near 2906 <2> mnsuffix _ASA 2907 <2> 2908 <2> mne LOOP ; ofs=50Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B8E 0483 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B90 4C4F4F50 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2909 00000830 713E <2> variant 0E2h, 62 2910 00000832 FF <2> endvariant 2911 <2> mne LOOPZ ; ofs=511h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B94 3583 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B96 4C4F4F505A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2912 00000833 70BE <2> variant 0E1h, 62 2913 00000835 FF <2> endvariant 2914 <2> mne LOOPE ; ofs=514h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000B9B 6583 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000B9D 4C4F4F5045 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2915 00000836 70BE <2> variant 0E1h, 62 2916 00000838 FF <2> endvariant 2917 <2> mne LOOPNZ ; ofs=517h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BA2 9683 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BA4 4C4F4F504E5A <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2918 00000839 703E <2> variant 0E0h, 62 2919 0000083B FF <2> endvariant 2920 <2> mne LOOPNE ; ofs=51Ah 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BAA C683 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BAC 4C4F4F504E45 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2921 0000083C 703E <2> variant 0E0h, 62 2922 0000083E FF <2> endvariant 2923 <2> 2924 <2> ; The following mnemonics allow an operand size suffix 2925 <2> ; but do not require it. 2926 <2> 2927 <2> mnlist_o_suffix_allowed label near 2928 <2> mnsuffix _OSA 2929 <2> 2930 <2> mne ENTER ; ofs=15Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BB2 F583 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BB4 454E544552 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2931 0000083F F56423 <2> variant 0C8h, 35, ASM_MACH1 2932 00000842 FF <2> endvariant 2933 <2> mne FLDENV ; ofs=2B9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BB9 3684 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BBB 464C44454E56 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2934 00000843 F41CB3 <2> variant 221h, 51 2935 00000846 FF <2> endvariant 2936 <2> mne FRSTOR ; ofs=2F1h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BC1 7684 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BC3 465253544F52 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2937 00000847 F41EB3 <2> variant 225h, 51 2938 0000084A FF <2> endvariant 2939 <2> mne FSAVE, ASM_WAIT ; ofs=2F5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 0000084B FE <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BC9 B584 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BCB 4653415645 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2940 <2> mne FNSAVE ; ofs=2F6h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BD0 C684 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BD2 464E53415645 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2941 0000084C F426B5 <2> variant 235h, 53 2942 0000084F FF <2> endvariant 2943 <2> mne FSTENV, ASM_WAIT ; ofs=32Eh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 00000850 FE <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BD8 0685 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BDA 465354454E56 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2944 <2> mne FNSTENV ; ofs=32Fh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BE0 1785 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BE2 464E5354454E56 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2945 00000851 F424B5 <2> variant 231h, 53 2946 00000854 FF <2> endvariant 2947 <2> mne IRET ; ofs=409h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BE9 5485 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BEB 49524554 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2948 00000855 67FF <2> variant 0CFh, 127 2949 00000857 FF <2> endvariant 2950 <2> mne LEAVE ; ofs=4EEh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BEF 8585 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BF1 4C45415645 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2951 00000858 F564FF <2> variant 0C9h, 127, ASM_MACH1 2952 0000085B FF <2> endvariant 2953 <2> mne POPA ; ofs=6A9h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BF6 C485 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BF8 504F5041 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2954 0000085C F530FF <2> variant 061h, 127, ASM_MACH1 2955 0000085F FF <2> endvariant 2956 <2> mne POPF ; ofs=6ADh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000BFC 0486 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000BFE 504F5046 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2957 00000860 4EFD <2> variant 09Dh, 125 2958 00000862 FF <2> endvariant 2959 <2> mne PUSH ; ofs=6CAh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C02 3486 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C04 50555348 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2960 00000863 F5354F <2> variant 06Ah, 79, ASM_MACH1 2961 00000866 F5344E <2> variant 068h, 78, ASM_MACH1 2962 00000869 FF <2> endvariant 2963 <2> mne PUSHA ; ofs=6D1h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C08 A586 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C0A 5055534841 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2964 0000086A F5307F <2> variant 060h, 127, ASM_MACH1 2965 0000086D FF <2> endvariant 2966 <2> mne PUSHF ; ofs=6D5h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C0F E586 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C11 5055534846 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2967 0000086E 4E7E <2> variant 09Ch, 126 2968 00000870 FF <2> endvariant 2969 <2> mne RETN ; ofs=716h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C16 1487 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C18 5245544E <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2970 00000871 61FD <2> variant 0C3h, 125 2971 00000873 6153 <2> variant 0C2h, 83 2972 00000875 FF <2> endvariant 2973 <2> mne RET ; ofs=71Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C1C 6387 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C1E 524554 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2974 00000876 61FD <2> variant 0C3h, 125 2975 00000878 6153 <2> variant 0C2h, 83 2976 0000087A FF <2> endvariant 2977 <2> mne RETF ; ofs=720h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C21 B487 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C23 52455446 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2978 0000087B 65FF <2> variant 0CBh, 127 2979 0000087D 6555 <2> variant 0CAh, 85 2980 0000087F FF <2> endvariant 2981 <2> 2982 <2> ; The following mnemonics require an operand size suffix. 2983 <2> 2984 <2> mnlist_o_suffix_required label near 2985 <2> mnsuffix _OSR 2986 <2> 2987 <2> mne CMPS ; ofs=12Dh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C27 0488 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C29 434D5053 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2988 00000880 5380 <2> variant 0A7h, 0 2989 00000882 FF <2> endvariant 2990 <2> mne INS ; ofs=3E2h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C2D 3388 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C2F 494E53 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2991 00000883 F53680 <2> variant 06Dh, 0, ASM_MACH1 2992 00000886 FF <2> endvariant 2993 <2> mne LODS ; ofs=50Bh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C32 7488 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C34 4C4F4453 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2994 00000887 5680 <2> variant 0ADh, 0 2995 00000889 FF <2> endvariant 2996 <2> mne MOVS ; ofs=656h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C38 A488 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C3A 4D4F5653 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 2997 0000088A 5280 <2> variant 0A5h, 0 2998 0000088C FF <2> endvariant 2999 <2> mne OUTS ; ofs=693h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C3E D488 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C40 4F555453 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 3000 0000088D F53780 <2> variant 06Fh, 0, ASM_MACH1 3001 00000890 FF <2> endvariant 3002 <2> mne SCAS ; ofs=784h 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C44 1489 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C46 53434153 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 3003 00000891 5780 <2> variant 0AFh, 0 3004 00000893 FF <2> endvariant 3005 <2> mne STOS ; ofs=82Dh 1140 <3> %push 1141 <3> usesection ASMTABLE2, 1 1142 <3> %assign %$currofs $ - asmtab 1143 <3> %ifnempty %2 1144 <3> db %2 1145 <3> %endif 1146 <3> __SECT__ 1147 <3> %defstr %$string %1 1148 <3> %strlen %$string_size %$string 1149 <3> %if %$string_size > 15 1150 <3> %error Mnemonic %1 is too long! 1151 <3> %endif 1152 00000C4A 4489 <3> dw (%$currofs)<<4|%$string_size 1153 <3> %assign MN_%1%[MNSUFFIX] $ - mnlist 1154 00000C4C 53544F53 <3> db %$string 1155 <3> %pop 1156 <3> %define MNCURRENT %1%[MNSUFFIX] 3006 00000894 5580 <2> variant 0ABh, 0 3007 00000896 FF <2> endvariant 3008 <2> 3009 <2> end_mnlist label near 3010 <2> 3011 <2> ;--- Disassembler: compressed table of the opcode types. 3012 <2> ;--- If the item has the format OT(xx), it refers to table 'oplists'. 3013 <2> ;--- Otherwise it's an offset for internal table 'disjmp'. 3014 <2> 3015 <2> align 8, db 0 3016 <2> optypes label byte 3017 00000C50 131316160D0D6773 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5B),OT(67) ; 00 - 07 (main opcode part) 3018 00000C58 131316160D0D6902 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5D), 002h ; 08 - 0F 3019 00000C60 131316160D0D6B74 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(5F),OT(68) ; 10 - 17 3020 00000C68 131316160D0D6D75 <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01),OT(61),OT(69) ; 18 - 1F 3021 00000C70 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 20 - 27 3022 00000C78 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 28 - 2F 3023 00000C80 131316160D0D0A0C <2> db OT(07),OT(07),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 30 - 37 3024 00000C88 141416160D0D0A0C <2> db OT(08),OT(08),OT(0A),OT(0A),OT(01),OT(01), 00Ah,OT(00) ; 38 - 3F 3025 00000C90 2D2D2D2D2D2D2D2D <2> db OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21) ; 40 - 47 3026 00000C98 2D2D2D2D2D2D2D2D <2> db OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21),OT(21) ; 48 - 4F 3027 00000CA0 2C2C2C2C2C2C2C2C <2> db OT(20),OT(20),OT(20),OT(20),OT(20),OT(20),OT(20),OT(20) ; 50 - 57 3028 00000CA8 2E2E2E2E2E2E2E2E <2> db OT(22),OT(22),OT(22),OT(22),OT(22),OT(22),OT(22),OT(22) ; 58 - 5F 3029 00000CB0 8B8B861A0A0A0A0A <2> db OT(7F),OT(7F),OT(7A),OT(0E), 00Ah, 00Ah, 00Ah, 00Ah ; 60 - 67 3030 00000CB8 5A455B430C0C0C0C <2> db OT(4E),OT(39),OT(4F),OT(37),OT(00),OT(00),OT(00),OT(00) ; 68 - 6F 3031 00000CC0 4A4A4A4A4A4A4A4A <2> db OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E) ; 70 - 77 3032 00000CC8 4A4A4A4A4A4A4A4A <2> db OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E),OT(3E) ; 78 - 7F 3033 00000CD0 0404040414141818 <2> db 004h, 004h, 004h, 004h,OT(08),OT(08),OT(0C),OT(0C) ; 80 - 87 3034 00000CD8 151516164D834E04 <2> db OT(09),OT(09),OT(0A),OT(0A),OT(41),OT(77),OT(42), 004h ; 88 - 8F 3035 00000CE0 0C65656565656565 <2> db OT(00),OT(59),OT(59),OT(59),OT(59),OT(59),OT(59),OT(59) ; 90 - 97 3036 00000CE8 0C0C250C8A890C0C <2> db OT(00),OT(00),OT(19),OT(00),OT(7E),OT(7D),OT(00),OT(00) ; 98 - 9F 3037 00000CF0 4F4F50500C0C0C0C <2> db OT(43),OT(43),OT(44),OT(44),OT(00),OT(00),OT(00),OT(00) ; A0 - A7 3038 00000CF8 0D0D0C0C0C0C0C0C <2> db OT(01),OT(01),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; A8 - AF 3039 00000D00 5151515151515151 <2> db OT(45),OT(45),OT(45),OT(45),OT(45),OT(45),OT(45),OT(45) ; B0 - B7 3040 00000D08 5252525252525252 <2> db OT(46),OT(46),OT(46),OT(46),OT(46),OT(46),OT(46),OT(46) ; B8 - BF 3041 00000D10 04045F891B1B0404 <2> db 004h, 004h,OT(53),OT(7D),OT(0F),OT(0F), 004h, 004h ; C0 - C7 3042 00000D18 2F8B618B8B878B8B <2> db OT(23),OT(7F),OT(55),OT(7F),OT(7F),OT(7B),OT(7F),OT(7F) ; C8 - CF 3043 00000D20 0404040421210C0C <2> db 004h, 004h, 004h, 004h,OT(15),OT(15),OT(00),OT(00) ; D0 - D7 3044 00000D28 0606060606060606 <2> db 006h, 006h, 006h, 006h, 006h, 006h, 006h, 006h ; D8 - DF 3045 00000D30 4A4A4A4A47475656 <2> db OT(3E),OT(3E),OT(3E),OT(3E),OT(3B),OT(3B),OT(4A),OT(4A) ; E0 - E7 3046 00000D38 2324264A48485757 <2> db OT(17),OT(18),OT(1A),OT(3E),OT(3C),OT(3C),OT(4B),OT(4B) ; E8 - EF 3047 00000D40 0A8B0A0A0C0C0404 <2> db 00Ah,OT(7F), 00Ah, 00Ah,OT(00),OT(00), 004h, 004h ; F0 - F7 3048 00000D48 0C0C0C0C0C0C0404 <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 004h, 004h ; F8 - FF 3049 00000D50 0E0E0E0E0E0E0E0F <2> db OT(02),OT(02),OT(02),OT(02),OT(02),OT(02),OT(02),OT(03) ; 100 - 107 (Intel group 1) 3050 00000D58 1111111111111112 <2> db OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(05),OT(06) ; 108 - 10F 3051 00000D60 5C5C5C5C5C5C5C5C <2> db OT(50),OT(50),OT(50),OT(50),OT(50),OT(50),OT(50),OT(50) ; 110 - 117 (Intel group 2) 3052 00000D68 5D5D5D5D5D5D5D5D <2> db OT(51),OT(51),OT(51),OT(51),OT(51),OT(51),OT(51),OT(51) ; 118 - 11F 3053 00000D70 5E5E5E5E5E5E5E5E <2> db OT(52),OT(52),OT(52),OT(52),OT(52),OT(52),OT(52),OT(52) ; 120 - 127 (Intel group 2a) 3054 00000D78 0F0F191917171717 <2> db OT(03),OT(03),OT(0D),OT(0D),OT(0B),OT(0B),OT(0B),OT(0B) ; 128 - 12F (Intel group 3) 3055 00000D80 1919842785284B00 <2> db OT(0D),OT(0D),OT(78),OT(1B),OT(79),OT(1C),OT(3F), 000h ; 130 - 137 (Intel group 5) 3056 00000D88 594C555555550000 <2> db OT(4D),OT(40),OT(49),OT(49),OT(49),OT(49), 000h, 000h ; 138 - 13F (Intel group 6) 3057 00000D90 41413F3F59005540 <2> db OT(35),OT(35),OT(33),OT(33),OT(4D), 000h,OT(49),OT(34) ; 140 - 147 (Intel group 7) 3058 00000D98 3030303030303030 <2> db OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24),OT(24) ; 148 - 14F (Coprocessor d8) 3059 00000DA0 34343E3E34343434 <2> db OT(28),OT(28),OT(32),OT(32),OT(28),OT(28),OT(28),OT(28) ; 150 - 157 3060 00000DA8 300031313F3A413B <2> db OT(24), 000h,OT(25),OT(25),OT(33),OT(2E),OT(35),OT(2F) ; 158 - 15F (Coprocessor d9) 3061 00000DB0 353E080008080808 <2> db OT(29),OT(32), 008h, 000h, 008h, 008h, 008h, 008h ; 160 - 167 3062 00000DB8 3838383838383838 <2> db OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C),OT(2C) ; 168 - 16F (Coprocessor da) 3063 00000DC0 3434343400080000 <2> db OT(28),OT(28),OT(28),OT(28), 000h, 008h, 000h, 000h ; 170 - 177 3064 00000DC8 38003939003C003D <2> db OT(2C), 000h,OT(2D),OT(2D), 000h,OT(30), 000h,OT(31) ; 178 - 17F (Coprocessor db) 3065 00000DD0 34343434083E3E00 <2> db OT(28),OT(28),OT(28),OT(28), 008h,OT(32),OT(32), 000h ; 180 - 187 3066 00000DD8 3232323232323232 <2> db OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26),OT(26) ; 188 - 18F (Coprocessor dc) 3067 00000DE0 3737000037373737 <2> db OT(2B),OT(2B), 000h, 000h,OT(2B),OT(2B),OT(2B),OT(2B) ; 190 - 197 3068 00000DE8 320033333F00413B <2> db OT(26), 000h,OT(27),OT(27),OT(33), 000h,OT(35),OT(2F) ; 198 - 19F (Coprocessor dd) 3069 00000DF0 350035353E3E0000 <2> db OT(29), 000h,OT(29),OT(29),OT(32),OT(32), 000h, 000h ; 1A0 - 1A7 3070 00000DF8 3A3A3A3A3A3A3A3A <2> db OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E),OT(2E) ; 1A8 - 1AF (Coprocessor de) 3071 00000E00 3636000836363636 <2> db OT(2A),OT(2A), 000h, 008h,OT(2A),OT(2A),OT(2A),OT(2A) ; 1B0 - 1B7 3072 00000E08 3A003B3B3C2A3D2B <2> db OT(2E), 000h,OT(2F),OT(2F),OT(30),OT(1E),OT(31),OT(1F) ; 1B8 - 1BF (Coprocessor df) 3073 00000E10 00000000083E3E00 <2> db 000h, 000h, 000h, 000h, 008h,OT(32),OT(32), 000h ; 1C0 - 1C7 3074 00000E18 0C0C0C0C0C0C0C00 <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00), 000h ; 1C8 - 1CF (Coprocessor groups) 3075 00000E20 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D0 - 1D7 3076 00000E28 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; 1D8 - 1DF 3077 <2> ;--- The rest of these are squeezed. 3078 00000E30 0004041C1C0C0C0C <2> db 0, 004h, 004h,OT(10),OT(10),OT(00),OT(00),OT(00) ; 00 3079 00000E38 0C787A797B7C7D0C <2> db OT(00),OT(6C),OT(6E),OT(6D),OT(6F),OT(70),OT(71),OT(00) ; 08 3080 00000E40 0C0C1C1C1C1C1C1C <2> db OT(00),OT(00),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 10 3081 00000E48 1C1C1C1C1C1C1C1C <2> db OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10),OT(10) ; 18 3082 00000E50 1C1C808080808080 <2> db OT(10),OT(10),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 20 3083 00000E58 8080808080807E80 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(72),OT(74) ; 28 3084 00000E60 0404048080800C7F <2> db 004h, 004h, 004h,OT(74),OT(74),OT(74),OT(00),OT(73) ; 30 3085 00000E68 8124242424242424 <2> db OT(75),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18) ; 38 3086 00000E70 2424242424242424 <2> db OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18),OT(18) ; 40 3087 00000E78 2462626262626262 <2> db OT(18),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56) ; 48 3088 00000E80 6262626262626262 <2> db OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56),OT(56) ; 50 3089 00000E88 626F760C1F636471 <2> db OT(56),OT(63),OT(6A),OT(00),OT(13),OT(57),OT(58),OT(65) ; 58 3090 00000E90 770C1E63641C1313 <2> db OT(6B),OT(00),OT(12),OT(57),OT(58),OT(10),OT(07),OT(07) ; 60 3091 00000E98 1B1E1B1B53540C04 <2> db OT(0F),OT(12),OT(0F),OT(0F),OT(47),OT(48),OT(00), 004h ; 68 3092 00000EA0 1E1C1C5354131304 <2> db OT(12),OT(10),OT(10),OT(47),OT(48),OT(07),OT(07), 004h ; 70 3093 00000EA8 1D1D1D1D1D1D1D1D <2> db OT(11),OT(11),OT(11),OT(11),OT(11),OT(11),OT(11),OT(11) ; 78 3094 00000EB0 8080808080808080 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 80 3095 00000EB8 8080808080808080 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 88 3096 00000EC0 8080808080808080 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74),OT(74) ; 90 3097 00000EC8 80808080800C1919 <2> db OT(74),OT(74),OT(74),OT(74),OT(74),OT(00),OT(0D),OT(0D) ; 98 3098 00000ED0 6022202020295810 <2> db OT(54),OT(16),OT(14),OT(14),OT(14),OT(1D),OT(4C),OT(04) ; A0 3099 00000ED8 8282828282828282 <2> db OT(76),OT(76),OT(76),OT(76),OT(76),OT(76),OT(76),OT(76) ; A8 3100 00000EE0 0C0C0C0C0C0C0C0C <2> db OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00),OT(00) ; B0 3101 00000EE8 0C0C0C0C42 <2> db OT(00),OT(00),OT(00),OT(00),OT(36) 3102 <2> 3103 <2> P186 equ 1000h 3104 <2> P286 equ 2000h 3105 <2> P386 equ 3000h 3106 <2> P486 equ 4000h 3107 <2> P586 equ 5000h 3108 <2> P686 equ 6000h 3109 <2> 3110 <2> ;--- Disassembler: compressed table of additional information. 3111 <2> ;--- Bits 0-11 usually are the offset of the mnemonics table. 3112 <2> ;--- Bits 12-15 are the CPU which introduced this opcode. 3113 <2> 3114 00000EED 00 <2> align 2, db 0 3115 <2> opinfo label word 3116 00000EEE 3600360036003600 <2> dw MN_ADD, MN_ADD, MN_ADD, MN_ADD ; 00 3117 00000EF6 36003600F507F007 <2> dw MN_ADD, MN_ADD, MN_PUSH, MN_POP ; 04 3118 00000EFE DB07DB07DB07DB07 <2> dw MN_OR, MN_OR, MN_OR, MN_OR ; 08 3119 00000F06 DB07DB07F507E001 <2> dw MN_OR, MN_OR, MN_PUSH, 01E0h ; 0C 3120 00000F0E 3100310031003100 <2> dw MN_ADC, MN_ADC, MN_ADC, MN_ADC ; 10 3121 00000F16 31003100F507F007 <2> dw MN_ADC, MN_ADC, MN_PUSH, MN_POP ; 14 3122 00000F1E 7808780878087808 <2> dw MN_SBB, MN_SBB, MN_SBB, MN_SBB ; 18 3123 00000F26 78087808F507F007 <2> dw MN_SBB, MN_SBB, MN_PUSH, MN_POP ; 1C 3124 00000F2E 3B003B003B003B00 <2> dw MN_AND, MN_AND, MN_AND, MN_AND ; 20 3125 00000F36 3B003B000100B701 <2> dw MN_AND, MN_AND, 0001h, MN_DAA ; 24 3126 00000F3E 8F098F098F098F09 <2> dw MN_SUB, MN_SUB, MN_SUB, MN_SUB ; 28 3127 00000F46 8F098F090101BC01 <2> dw MN_SUB, MN_SUB, 0101h, MN_DAS ; 2C 3128 00000F4E F109F109F109F109 <2> dw MN_XOR, MN_XOR, MN_XOR, MN_XOR ; 30 3129 00000F56 F109F10901021D00 <2> dw MN_XOR, MN_XOR, 0201h, MN_AAA ; 34 3130 00000F5E 8601860186018601 <2> dw MN_CMP, MN_CMP, MN_CMP, MN_CMP ; 38 3131 00000F66 8601860101032C00 <2> dw MN_CMP, MN_CMP, 0301h, MN_AAS ; 3C 3132 00000F6E D104D104D104D104 <2> dw MN_INC, MN_INC, MN_INC, MN_INC ; 40 3133 00000F76 D104D104D104D104 <2> dw MN_INC, MN_INC, MN_INC, MN_INC ; 44 3134 00000F7E C901C901C901C901 <2> dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 48 3135 00000F86 C901C901C901C901 <2> dw MN_DEC, MN_DEC, MN_DEC, MN_DEC ; 4C 3136 00000F8E F507F507F507F507 <2> dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 50 3137 00000F96 F507F507F507F507 <2> dw MN_PUSH, MN_PUSH, MN_PUSH, MN_PUSH ; 54 3138 00000F9E F007F007F007F007 <2> dw MN_POP, MN_POP, MN_POP, MN_POP ; 58 3139 00000FA6 F007F007F007F007 <2> dw MN_POP, MN_POP, MN_POP, MN_POP ; 5C 3140 00000FAE 701A5E1A46104020 <2> dw P186 + MN_PUSHA_OSA, P186 + MN_POPA_OSA, P186 + MN_BOUND, P286 + MN_ARPL ; 60 3141 00000FB6 0134013510302030 <2> dw P386 + 0401h, P386 + 0501h, P386 + 0010h, P386 + 0020h ; 64 3142 00000FBE 6A1AC7146A1AC714 <2> dw P186 + MN_PUSH_OSA, P186 + MN_IMUL, P186 + MN_PUSH_OSA, P186 + MN_IMUL ; 68 3143 00000FC6 D614951AE917A61A <2> dw P186 + MN_INSB, P186 + MN_INS_OSR, P186 + MN_OUTSB, P186 + MN_OUTS_OSR ; 6C 3144 00000FCE 990585051F051A05 <2> dw MN_JO, MN_JNO, MN_JB, MN_JAE ; 70 3145 00000FD6 AF05940523051605 <2> dw MN_JZ, MN_JNZ, MN_JBE, MN_JA ; 74 3146 00000FDE AB058F05A105A605 <2> dw MN_JS, MN_JNS, MN_JPE, MN_JPO ; 78 3147 00000FE6 460541054A053D05 <2> dw MN_JL, MN_JGE, MN_JLE, MN_JG ; 7C 3148 00000FEE 0001000100010801 <2> dw 0100h, 0100h, 0100h, 0108h ; 80 3149 00000FF6 A209A209DE09DE09 <2> dw MN_TEST, MN_TEST, MN_XCHG, MN_XCHG ; 84 3150 00000FFE 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; 88 3151 00001006 3406DC053406F802 <2> dw MN_MOV, MN_LEA, MN_MOV, 02F8h ; 8C 3152 0000100E D107DE09DE09DE09 <2> dw MN_NOP, MN_XCHG, MN_XCHG, MN_XCHG ; 90 3153 00001016 DE09DE09DE09DE09 <2> dw MN_XCHG, MN_XCHG, MN_XCHG, MN_XCHG ; 94 3154 0000101E 7700AD017100C309 <2> dw MN_CBW, MN_CWD, MN_CALL, MN_WAIT ; 98 3155 00001026 770A640A4108B805 <2> dw MN_PUSHF_OSA, MN_POPF_OSA, MN_SAHF, MN_LAHF ; 9C 3156 0000102E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; A0 3157 00001036 B207A00A8B018F0A <2> dw MN_MOVSB, MN_MOVS_OSR, MN_CMPSB, MN_CMPS_OSR ; A4 3158 0000103E A209A2098309B20A <2> dw MN_TEST, MN_TEST, MN_STOSB, MN_STOS_OSR ; A8 3159 00001046 FF059A0A7D08AC0A <2> dw MN_LODSB, MN_LODS_OSR, MN_SCASB, MN_SCAS_OSR ; AC 3160 0000104E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B0 3161 00001056 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B4 3162 0000105E 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; B8 3163 00001066 3406340634063406 <2> dw MN_MOV, MN_MOV, MN_MOV, MN_MOV ; BC 3164 0000106E 200120017E0A7E0A <2> dw 0120h, 0120h, MN_RETN_OSA, MN_RETN_OSA ; C0 3165 00001076 CD05C30500030003 <2> dw MN_LES, MN_LDS, 0300h, 0300h ; C4 3166 0000107E 1A1A571A890A890A <2> dw P186 + MN_ENTER_OSA, P186 + MN_LEAVE_OSA, MN_RETF_OSA, MN_RETF_OSA ; C8 3167 00001086 F504DC040205510A <2> dw MN_INT3, MN_INT, MN_INTO, MN_IRET_OSA ; CC 3168 0000108E 1001100118011801 <2> dw 0110h, 0110h, 0118h, 0118h ; D0 3169 00001096 270022009A29EA09 <2> dw MN_AAM, MN_AAD, P286 + MN_SETALC, MN_XLATB ; D4 3170 0000109E 4801580168017801 <2> dw 0148h, 0158h, 0168h, 0178h ; D8 3171 000010A6 88019801A801B801 <2> dw 0188h, 0198h, 01A8h, 01B8h ; DC 3172 000010AE 0A0AFC09F6092C05 <2> dw MN_LOOPNZ_ASA, MN_LOOPZ_ASA, MN_LOOP_ASA, MN_JCXZ ; E0 3173 000010B6 CD04CD04E407E407 <2> dw MN_IN, MN_IN, MN_OUT, MN_OUT ; E4 3174 000010BE 7100B305B305B305 <2> dw MN_CALL, MN_JMP, MN_JMP, MN_JMP ; E8 3175 000010C6 CD04CD04E407E407 <2> dw MN_IN, MN_IN, MN_OUT, MN_OUT ; EC 3176 000010CE 0800E16402000600 <2> dw 0008h, P686 + MN_INT1, 0002h, 0006h ; F0 3177 000010D6 BC04970028012801 <2> dw MN_HLT, MN_CMC, 0128h, 0128h ; F4 3178 000010DE 820074098C007E09 <2> dw MN_CLC, MN_STC, MN_CLI, MN_STI ; F8 3179 000010E6 87007909E0023001 <2> dw MN_CLD, MN_STD, 02E0h, 0130h ; FC 3180 000010EE 3600DB0731007808 <2> dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 100 3181 000010F6 3B008F09F1098601 <2> dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 104 3182 000010FE 3600DB0731007808 <2> dw MN_ADD, MN_OR, MN_ADC, MN_SBB ; 108 3183 00001106 3B008F09F1098601 <2> dw MN_AND, MN_SUB, MN_XOR, MN_CMP ; 10C 3184 0000110E 05080A08FB070008 <2> dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 110 3185 00001116 6E0873086E084C08 <2> dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 114 3186 0000111E 05080A08FB070008 <2> dw MN_ROL, MN_ROR, MN_RCL, MN_RCR ; 118 3187 00001126 6E0873086E084C08 <2> dw MN_SHL, MN_SHR, MN_SHL, MN_SAR ; 11C 3188 0000112E 05180A18FB170018 <2> dw P186 + MN_ROL, P186 + MN_ROR, P186 + MN_RCL, P186 + MN_RCR ; 120 3189 00001136 6E1873186E184C18 <2> dw P186 + MN_SHL, P186 + MN_SHR, P186 + MN_SHL, P186 + MN_SAR ; 124 3190 0000113E A209A209D607CC07 <2> dw MN_TEST, MN_TEST, MN_NOT, MN_NEG ; 128 3191 00001146 C707C704CE01C104 <2> dw MN_MUL, MN_IMUL, MN_DIV, MN_IDIV ; 12C 3192 0000114E D104C90171007100 <2> dw MN_INC, MN_DEC, MN_CALL, MN_CALL ; 130 3193 00001156 B305B305F5070000 <2> dw MN_JMP, MN_JMP, MN_PUSH, 0000h ; 134 3194 0000115E 68298A29ED252F26 <2> dw P286 + MN_SLDT, P286 + MN_STR, P286 + MN_LLDT, P286 + MN_LTR ; 138 3195 00001166 B729BD2900000000 <2> dw P286 + MN_VERR, P286 + MN_VERW, 0000h, 0000h ; 13C 3196 0000116E 50295629E125E725 <2> dw P286 + MN_SGDT, P286 + MN_SIDT, P286 + MN_LGDT, P286 + MN_LIDT ; 140 3197 00001176 6E290000F3250E45 <2> dw P286 + MN_SMSW, 0000h, P286 + MN_LMSW, P486 + MN_INVLPG ; 144 3198 0000117E EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 148 3199 00001186 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 14C 3200 0000118E EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 150 3201 00001196 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 154 3202 0000119E 560300000D041204 <2> dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 158 3203 000011A6 210A9503480A1F04 <2> dw MN_FLDENV_OSA, MN_FNLDCW, MN_FNSTENV_OSA, MN_FNSTCW ; 15C 3204 000011AE 56039D0420030000 <2> dw MN_FLD, MN_FXCH, 0320h, 0000h ; 160 3205 000011B6 2803C801D001D801 <2> dw 0328h, 01C8h, 01D0h, 01D8h ; 164 3206 000011BE F701AA031C032303 <2> dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 168 3207 000011C6 43045904EA020003 <2> dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 16C 3208 000011CE 3162426239628B62 <2> dw P686 + MN_FCMOVB, P686 + MN_FCMOVE, P686 + MN_FCMOVBE, P686 + MN_FCMOVU ; 170 3209 000011D6 0000300300000000 <2> dw 0000h, 0330h, 0000h, 0000h ; 174 3210 000011DE 2B03000049034F03 <2> dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 178 3211 000011E6 0000560300001204 <2> dw 0000h, MN_FLD, 0000h, MN_FSTP ; 17C 3212 000011EE 5D62706266627962 <2> dw P686 + MN_FCMOVNB, P686 + MN_FCMOVNE, P686 + MN_FCMOVNBE, P686 + MN_FCMOVNU ; 180 3213 000011F6 38036E64A1620000 <2> dw 0338h, P686 + MN_FUCOMI, P686 + MN_FCOMI, 0000h ; 184 3214 000011FE EA019D039B02B002 <2> dw MN_FADD, MN_FMUL, MN_FCOM, MN_FCOMP ; 188 3215 00001206 36044A04DD02F102 <2> dw MN_FSUB, MN_FSUBR, MN_FDIV, MN_FDIVR ; 18C 3216 0000120E EA019D0300000000 <2> dw MN_FADD, MN_FMUL, 0000h, 0000h ; 190 3217 00001216 4A043604F102DD02 <2> dw MN_FSUBR, MN_FSUB, MN_FDIVR, MN_FDIV ; 194 3218 0000121E 560300000D041204 <2> dw MN_FLD, 0000h, MN_FST, MN_FSTP ; 198 3219 00001226 290A0000380A2E04 <2> dw MN_FRSTOR_OSA, 0000h, MN_FNSAVE_OSA, MN_FNSTSW ; 19C 3220 0000122E 150300000D041204 <2> dw MN_FFREE, 0000h, MN_FST, MN_FSTP ; 1A0 3221 00001236 67347F3400000000 <2> dw P386 + MN_FUCOM, P386 + MN_FUCOMP, 0000h, 0000h ; 1A4 3222 0000123E F701AA031C032303 <2> dw MN_FIADD, MN_FIMUL, MN_FICOM, MN_FICOMP ; 1A8 3223 00001246 43045904EA020003 <2> dw MN_FISUB, MN_FISUBR, MN_FIDIV, MN_FIDIVR ; 1AC 3224 0000124E F001A30300004003 <2> dw MN_FADDP, MN_FMULP, 0000h, 0340h ; 1B0 3225 00001256 51043C04F802E302 <2> dw MN_FSUBRP, MN_FSUBP, MN_FDIVRP, MN_FDIVP ; 1B4 3226 0000125E 2B03000049034F03 <2> dw MN_FILD, 0000h, MN_FIST, MN_FISTP ; 1B8 3227 00001266 FE012B0304024F03 <2> dw MN_FBLD, MN_FILD, MN_FBSTP, MN_FISTP ; 1BC 3228 0000126E 0000000000000000 <2> dw 0000h, 0000h, 0000h, 0000h ; 1C0 3229 00001276 48037664A8620000 <2> dw 0348h, P686 + MN_FUCOMIP, P686 + MN_FCOMIP, 0000h ; 1C4 3230 0000127E 5B03610369037103 <2> dw MN_FLD1, MN_FLDL2T, MN_FLDL2E, MN_FLDPI ; 1C8 3231 00001286 7803800388030000 <2> dw MN_FLDLG2, MN_FLDLN2, MN_FLDZ, 0000h ; 1CC 3232 0000128E DD01AC04CE03B703 <2> dw MN_F2XM1, MN_FYL2X, MN_FPTAN, MN_FPATAN ; 1D0 3233 00001296 A304C633C5023103 <2> dw MN_FXTRACT, P386 + MN_FPREM1, MN_FDECSTP, MN_FINCSTP ; 1D4 3234 0000129E BF03B3040604FD33 <2> dw MN_FPREM, MN_FYL2XP1, MN_FSQRT, P386 + MN_FSINCOS ; 1D8 3235 000012A6 D503DE03F733BF32 <2> dw MN_FRNDINT, MN_FSCALE, P386 + MN_FSIN, P386 + MN_FCOS ; 1DC 3236 <2> ;--- The rest of these are squeezed. 3237 000012AE 000038014001BE25 <2> dw 0, 0138h, 0140h, P286 + MN_LAR ; 00 3238 000012B6 2A2691200845C949 <2> dw P286 + MN_LSL, P286 + MN_CLTS, P486 + MN_INVD, P486 + MN_WBINVD ; 04 3239 000012BE B219343634363436 <2> dw P186 + MN_UD2, P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV ; 08 3240 000012C6 343634363436D159 <2> dw P386 + MN_MOV, P386 + MN_MOV, P386 + MN_MOV, P586 + MN_WRMSR ; 0C 3241 000012CE 16580F585A613A61 <2> dw P586 + MN_RDTSC, P586 + MN_RDMSR, P686 + MN_CMOVO, P686 + MN_CMOVNO ; 10 3242 000012D6 AB60A3607F615261 <2> dw P686 + MN_CMOVB, P686 + MN_CMOVAE, P686 + MN_CMOVZ, P686 + MN_CMOVNZ ; 14 3243 000012DE B2609C6078614A61 <2> dw P686 + MN_CMOVBE, P686 + MN_CMOVA, P686 + MN_CMOVS, P686 + MN_CMOVNS ; 18 3244 000012E6 68617061D760CF60 <2> dw P686 + MN_CMOVPE, P686 + MN_CMOVPO, P686 + MN_CMOVL, P686 + MN_CMOVGE ; 1C 3245 000012EE DE60C8608B579657 <2> dw P686 + MN_CMOVLE, P686 + MN_CMOVG, P586 + MN_PUNPCKLBW, P586 + MN_PUNPCKLWD ; 20 3246 000012F6 A1574F56C256CB56 <2> dw P586 + MN_PUNPCKLDQ, P586 + MN_PACKSSWB, P586 + MN_PCMPGTB, P586 + MN_PCMPGTW ; 24 3247 000012FE D45659566A577557 <2> dw P586 + MN_PCMPGTD, P586 + MN_PACKUSWB, P586 + MN_PUNPCKHBW, P586 + MN_PUNPCKHWD ; 28 3248 00001306 8057455639563F56 <2> dw P586 + MN_PUNPCKHDQ, P586 + MN_PACKSSDW, P586 + MN_MOVD, P586 + MN_MOVQ ; 2C 3249 0000130E 080310031803A756 <2> dw 0308h, 0310h, 0318h, P586 + MN_PCMPEQB ; 30 3250 00001316 B056B956D7513956 <2> dw P586 + MN_PCMPEQW, P586 + MN_PCMPEQD, P586 + MN_EMMS, P586 + MN_MOVD ; 34 3251 0000131E 3F56993585351F35 <2> dw P586 + MN_MOVQ, P386 + MN_JO, P386 + MN_JNO, P386 + MN_JB ; 38 3252 00001326 1A35AF3594352335 <2> dw P386 + MN_JAE, P386 + MN_JZ, P386 + MN_JNZ, P386 + MN_JBE ; 3C 3253 0000132E 1635AB358F35A135 <2> dw P386 + MN_JA, P386 + MN_JS, P386 + MN_JNS, P386 + MN_JPE ; 40 3254 00001336 A635463541354A35 <2> dw P386 + MN_JPO, P386 + MN_JL, P386 + MN_JGE, P386 + MN_JLE ; 44 3255 0000133E 3D352A390E399138 <2> dw P386 + MN_JG, P386 + MN_SETO, P386 + MN_SETNO, P386 + MN_SETB ; 48 3256 00001346 8A384A3923399738 <2> dw P386 + MN_SETAE, P386 + MN_SETZ, P386 + MN_SETNZ, P386 + MN_SETBE ; 4C 3257 0000134E 843844391C393639 <2> dw P386 + MN_SETA, P386 + MN_SETS, P386 + MN_SETNS, P386 + MN_SETPE ; 50 3258 00001356 3D39B738B038BD38 <2> dw P386 + MN_SETPO, P386 + MN_SETL, P386 + MN_SETGE, P386 + MN_SETLE ; 54 3259 0000135E AA38F537F037A651 <2> dw P386 + MN_SETG, P386 + MN_PUSH, P386 + MN_POP, P586 + MN_CPUID ; 58 3260 00001366 5E305C395C39F537 <2> dw P386 + MN_BT, P386 + MN_SHLD, P386 + MN_SHLD, P386 + MN_PUSH ; 5C 3261 0000136E F0373C586C306239 <2> dw P386 + MN_POP, P586 + MN_RSM, P386 + MN_BTS, P386 + MN_SHRD ; 60 3262 00001376 6239C73492419241 <2> dw P386 + MN_SHRD, P386 + MN_IMUL, P486 + MN_CMPXCHG, P486 + MN_CMPXCHG ; 64 3263 0000137E C8356730D235D735 <2> dw P386 + MN_LSS, P386 + MN_BTR, P386 + MN_LFS, P386 + MN_LGS ; 68 3264 00001386 C037C037AD19E802 <2> dw P386 + MN_MOVZX, P386 + MN_MOVZX, P186 + MN_UD1, 02E8h ; 6C 3265 0000138E 62304D305230B937 <2> dw P386 + MN_BTC, P386 + MN_BSF, P386 + MN_BSR, P386 + MN_MOVSX ; 70 3266 00001396 B937D849D849F002 <2> dw P386 + MN_MOVSX, P486 + MN_XADD, P486 + MN_XADD, 02F0h ; 74 3267 0000139E 5740574057405740 <2> dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 78 3268 000013A6 5740574057405740 <2> dw P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP, P486 + MN_BSWAP ; 7C 3269 000013AE 1E5725572C57EE56 <2> dw P586 + MN_PSRLW, P586 + MN_PSRLD, P586 + MN_PSRLQ, P586 + MN_PMULLW ; 80 3270 000013B6 585761579A568856 <2> dw P586 + MN_PSUBUSB, P586 + MN_PSUBUSW, P586 + MN_PAND, P586 + MN_PADDUSB ; 84 3271 000013BE 9156A05610571757 <2> dw P586 + MN_PADDUSW, P586 + MN_PANDN, P586 + MN_PSRAW, P586 + MN_PSRAD ; 88 3272 000013C6 E65648575057F656 <2> dw P586 + MN_PMULHW, P586 + MN_PSUBSB, P586 + MN_PSUBSW, P586 + MN_POR ; 8C 3273 000013CE 78568056AC57FB56 <2> dw P586 + MN_PADDSB, P586 + MN_PADDSW, P586 + MN_PXOR, P586 + MN_PSLLW ; 90 3274 000013D6 02570957DD563357 <2> dw P586 + MN_PSLLD, P586 + MN_PSLLQ, P586 + MN_PMADDWD, P586 + MN_PSUBB ; 94 3275 000013DE 3A57415763566A56 <2> dw P586 + MN_PSUBW, P586 + MN_PSUBD, P586 + MN_PADDB, P586 + MN_PADDW ; 98 3276 000013E6 7156A819D104C901 <2> dw P586 + MN_PADDD, P186 + MN_UD0, MN_INC, MN_DEC ; 9C 3277 000013EE 16005E306C306730 <2> dw MN_BOXCB, P386 + MN_BT, P386 + MN_BTS, P386 + MN_BTR ; A0 3278 000013F6 62309B51F0073406 <2> dw P386 + MN_BTC, P586 + MN_CMPXCHG8B, MN_POP, MN_MOV ; A4 3279 000013FE 1E571057FB562557 <2> dw P586 + MN_PSRLW, P586 + MN_PSRAW, P586 + MN_PSLLW, P586 + MN_PSRLD ; A8 3280 00001406 175702572C570957 <2> dw P586 + MN_PSRAD, P586 + MN_PSLLD, P586 + MN_PSRLQ, P586 + MN_PSLLQ ; AC 3281 0000140E B1030B02E4016104 <2> dw MN_FNOP, MN_FCHS, MN_FABS, MN_FTST ; B0 3282 00001416 970487340E03D502 <2> dw MN_FXAM, P386 + MN_FUCOMPP, MN_FNENI, MN_FNDISI ; B4 3283 0000141E 18024103EE23B702 <2> dw MN_FNCLEX, MN_FNINIT, P286 + MN_FNSETPM, MN_FCOMPP ; B8 3284 00001426 2E04 <2> dw MN_FNSTSW 3285 <2> 3286 <2> ;--- Disassembler: table converts unsqueezed numbers to squeezed. 3287 <2> 3288 <2> align 8, db 0 3289 <2> sqztab label byte 3290 00001428 0102030400000500 <2> db 1, 2, 3, 4, 0, 0, 5, 0 ; 1E0 3291 00001430 0607000800000000 <2> db 6, 7, 0, 8, 0, 0, 0, 0 ; 1E8 3292 00001438 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F0 3293 00001440 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 1F8 3294 00001448 090A0B0C0D000E00 <2> db 9, 10, 11, 12, 13, 0, 14, 0 ; 200 3295 00001450 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 208 3296 00001458 0F10110000000000 <2> db 15, 16, 17, 0, 0, 0, 0, 0 ; 210 3297 00001460 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 218 3298 00001468 1213141516171819 <2> db 18, 19, 20, 21, 22, 23, 24, 25 ; 220 3299 00001470 1A1B1C1D1E1F2021 <2> db 26, 27, 28, 29, 30, 31, 32, 33 ; 228 3300 00001478 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 230 3301 00001480 0000000000000000 <2> db 0, 0, 0, 0, 0, 0, 0, 0 ; 238 3302 00001488 2223242526272829 <2> db 34, 35, 36, 37, 38, 39, 40, 41 ; 240 3303 00001490 2A2B2C2D00002E2F <2> db 42, 43, 44, 45, 0, 0, 46, 47 ; 248 3304 00001498 0030313233343536 <2> db 0, 48, 49, 50, 51, 52, 53, 54 ; 250 3305 000014A0 0000000000003738 <2> db 0, 0, 0, 0, 0, 0, 55, 56 ; 258 3306 000014A8 393A3B3C3D3E3F40 <2> db 57, 58, 59, 60, 61, 62, 63, 64 ; 260 3307 000014B0 4142434445464748 <2> db 65, 66, 67, 68, 69, 70, 71, 72 ; 268 3308 000014B8 494A4B4C4D4E4F50 <2> db 73, 74, 75, 76, 77, 78, 79, 80 ; 270 3309 000014C0 5152535455565758 <2> db 81, 82, 83, 84, 85, 86, 87, 88 ; 278 3310 000014C8 595A5B5C5D5E0000 <2> db 89, 90, 91, 92, 93, 94, 0, 0 ; 280 3311 000014D0 5F60616263640065 <2> db 95, 96, 97, 98, 99,100, 0,101 ; 288 3312 000014D8 666768696A6B6C6D <2> db 102,103,104,105,106,107,108,109 ; 290 3313 000014E0 006E6F7071727374 <2> db 0,110,111,112,113,114,115,116 ; 298 3314 000014E8 7576000000000077 <2> db 117,118, 0, 0, 0, 0, 0,119 ; 2A0 3315 000014F0 78797A7B7C7D7E7F <2> db 120,121,122,123,124,125,126,127 ; 2A8 3316 000014F8 0080818200830000 <2> db 0,128,129,130, 0,131, 0, 0 ; 2B0 3317 00001500 8485008687880089 <2> db 132,133, 0,134,135,136, 0,137 ; 2B8 3318 00001508 008A8B00008C0000 <2> db 0,138,139, 0, 0,140, 0, 0 ; 2C0 3319 00001510 8D8E008F90910092 <2> db 141,142, 0,143,144,145, 0,146 ; 2C8 3320 00001518 0093949500960000 <2> db 0,147,148,149, 0,150, 0, 0 ; 2D0 3321 00001520 979899009A9B9C9D <2> db 151,152,153, 0,154,155,156,157 ; 2D8 3322 00001528 9E9F0000000000A0 <2> db 158,159, 0, 0, 0, 0, 0,160 ; 2E0 3323 00001530 00000000A1A2A3A4 <2> db 0, 0, 0, 0,161,162,163,164 ; 2E8 3324 00001538 00A5000000000000 <2> db 0,165, 0, 0, 0, 0, 0, 0 ; 2F0 3325 00001540 A600000000000000 <2> db 166, 0, 0, 0, 0, 0, 0, 0 ; 2F8 3326 00001548 A700000000000000 <2> db 167, 0, 0, 0, 0, 0, 0, 0 ; 300 3327 00001550 0000A800A900AA00 <2> db 0, 0,168, 0,169, 0,170, 0 ; 308 3328 00001558 0000AB00AC00AD00 <2> db 0, 0,171, 0,172, 0,173, 0 ; 310 3329 00001560 0000AE000000AF00 <2> db 0, 0,174, 0, 0, 0,175, 0 ; 318 3330 00001568 B000000000000000 <2> db 176, 0, 0, 0, 0, 0, 0, 0 ; 320 3331 00001570 B1B20000B3B40000 <2> db 177,178, 0, 0,179,180, 0, 0 ; 328 3332 00001578 00B5000000000000 <2> db 0,181, 0, 0, 0, 0, 0, 0 ; 330 3333 00001580 B6B7B8B9BA000000 <2> db 182,183,184,185,186, 0, 0, 0 ; 338 3334 00001588 00BB000000000000 <2> db 0,187, 0, 0, 0, 0, 0, 0 ; 340 3335 00001590 BC00000000000000 <2> db 188, 0, 0, 0, 0, 0, 0, 0 ; 348 3336 <2> 3337 <2> ;--- Disassembler: table of mnemonics that change in the presence of a WAIT 3338 <2> ;--- instruction. 3339 <2> 3340 <2> align 2, db 0 3341 <2> wtab1 label word 3342 00001598 3A03390338033B035D- <2> dw 033Ah,0339h,0338h,033Bh,015Dh,019Eh,033Ch,015Fh 3342 000015A1 019E013C035F01 <2> 3343 000015A8 5E0148039F01 <2> dw 015Eh,0348h,019Fh 3344 <2> wtab2 label word 3345 000015AE 1102 <2> dw MN_FCLEX 3346 000015B0 CE02 <2> dw MN_FDISI 3347 000015B2 0803 <2> dw MN_FENI 3348 000015B4 3A03 <2> dw MN_FINIT 3349 000015B6 8E03 <2> dw MN_FLDCW 3350 000015B8 310A <2> dw MN_FSAVE_OSA 3351 000015BA E603 <2> dw MN_FSETPM 3352 000015BC 1804 <2> dw MN_FSTCW 3353 000015BE 400A <2> dw MN_FSTENV_OSA 3354 000015C0 2704 <2> dw MN_FSTSW 3355 000015C2 2704 <2> dw MN_FSTSW 3356 <2> N_WTAB equ ($ - wtab2) / 2 3357 <2> 3358 <2> ;--- Disassembler: table for operands which have a different mnemonic for 3359 <2> ;--- their 32 bit versions (66h prefix). 3360 <2> 3361 <2> align 2, db 0 3362 <2> ltabo1 label word 3363 000015C4 98009900 <2> dw 098h,099h 3364 <2> ltabo2 label word 3365 000015C8 7C00 <2> dw MN_CWDE 3366 000015CA B201 <2> dw MN_CDQ 3367 <2> N_LTABO equ ($ - ltabo2) / 2 3368 <2> 3369 <2> ;--- Disassembler: table for operands which have a different mnemonic for 3370 <2> ;--- their 32 bit versions (67h prefix). 3371 <2> 3372 <2> align 2, db 0 3373 <2> ltaba1 label word 3374 000015CC E300 <2> dw 0E3h 3375 <2> ltaba2 label word 3376 000015CE 3205 <2> dw MN_JECXZ 3377 <2> N_LTABA equ ($ - ltaba2) / 2 3378 <2> 3379 <2> ;--- Disassembler: table of lockable instructions 3380 <2> 3381 <2> align 2, db 0 3382 <2> locktab label word 3383 000015D0 0A0102011000110008- <2> dw 010Ah,0102h,010h,011h,0108h,0100h,00h,01h 3383 000015D9 01000100000100 <2> 3384 000015E0 0C010401200021009B- <2> dw 010Ch,0104h,020h,021h,029Bh,02EFh,0293h,02EEh 3384 000015E9 02EF029302EE02 <2> 3385 000015F0 8B02ED0290029102E1- <2> dw 028Bh,02EDh,0290h,0291h,02E1h,0131h,02E0h,0130h 3385 000015F9 023101E0023001 <2> 3386 00001600 2B012A010901010108- <2> dw 012Bh,012Ah,0109h,0101h,08h,09h,010Bh,0103h 3386 00001609 0009000B010301 <2> 3387 00001610 180019000D01050128- <2> dw 018h,019h,010Dh,0105h,028h,029h,02A0h,02A1h 3387 00001619 002900A002A102 <2> 3388 00001620 860087000E01060130- <2> dw 086h,087h,010Eh,0106h,030h,031h 3388 00001629 003100 <2> 3389 <2> N_LOCK equ ($ - locktab) / 2 3390 <2> 3391 <2> ;--- Equates used in the assembly-language code. 3392 <2> 3393 <2> SPARSE_BASE equ 01E0h 3394 <2> SFPGROUP3 equ 0338h 3395 <2> GROUP7 equ 0130h 1414 <1> [list +] 1415 <1> opindex: 1416 <1> [list -] 1433 0000162C 01 <2> db %$index 1434 <2> [list -] 1433 0000162D 00 <2> db %$index 1434 <2> [list -] 1433 0000162E 01 <2> db %$index 1434 <2> [list -] 1433 0000162F 03 <2> db %$index 1434 <2> [list -] 1433 00001630 05 <2> db %$index 1434 <2> [list -] 1433 00001631 07 <2> db %$index 1434 <2> [list -] 1433 00001632 09 <2> db %$index 1434 <2> [list -] 1433 00001633 0B <2> db %$index 1434 <2> [list -] 1433 00001634 0D <2> db %$index 1434 <2> [list -] 1433 00001635 0F <2> db %$index 1434 <2> [list -] 1433 00001636 11 <2> db %$index 1434 <2> [list -] 1433 00001637 10 <2> db %$index 1434 <2> [list -] 1433 00001638 11 <2> db %$index 1434 <2> [list -] 1433 00001639 10 <2> db %$index 1434 <2> [list -] 1433 0000163A 11 <2> db %$index 1434 <2> [list -] 1433 0000163B 13 <2> db %$index 1434 <2> [list -] 1433 0000163C 16 <2> db %$index 1434 <2> [list -] 1433 0000163D 18 <2> db %$index 1434 <2> [list -] 1433 0000163E 18 <2> db %$index 1434 <2> [list -] 1433 0000163F 1A <2> db %$index 1434 <2> [list -] 1433 00001640 1C <2> db %$index 1434 <2> [list -] 1433 00001641 1C <2> db %$index 1434 <2> [list -] 1433 00001642 1C <2> db %$index 1434 <2> [list -] 1433 00001643 1E <2> db %$index 1434 <2> [list -] 1433 00001644 1D <2> db %$index 1434 <2> [list -] 1433 00001645 1E <2> db %$index 1434 <2> [list -] 1433 00001646 1D <2> db %$index 1434 <2> [list -] 1433 00001647 1E <2> db %$index 1434 <2> [list -] 1433 00001648 1D <2> db %$index 1434 <2> [list -] 1433 00001649 20 <2> db %$index 1434 <2> [list -] 1433 0000164A 21 <2> db %$index 1434 <2> [list -] 1433 0000164B 22 <2> db %$index 1434 <2> [list -] 1433 0000164C 23 <2> db %$index 1434 <2> [list -] 1433 0000164D 22 <2> db %$index 1434 <2> [list -] 1433 0000164E 22 <2> db %$index 1434 <2> [list -] 1433 0000164F 23 <2> db %$index 1434 <2> [list -] 1433 00001650 25 <2> db %$index 1434 <2> [list -] 1433 00001651 26 <2> db %$index 1434 <2> [list -] 1433 00001652 27 <2> db %$index 1434 <2> [list -] 1433 00001653 28 <2> db %$index 1434 <2> [list -] 1433 00001654 29 <2> db %$index 1434 <2> [list -] 1433 00001655 28 <2> db %$index 1434 <2> [list -] 1433 00001656 28 <2> db %$index 1434 <2> [list -] 1433 00001657 27 <2> db %$index 1434 <2> [list -] 1433 00001658 28 <2> db %$index 1434 <2> [list -] 1433 00001659 29 <2> db %$index 1434 <2> [list -] 1433 0000165A 2A <2> db %$index 1434 <2> [list -] 1433 0000165B 2B <2> db %$index 1434 <2> [list -] 1433 0000165C 2C <2> db %$index 1434 <2> [list -] 1433 0000165D 2D <2> db %$index 1434 <2> [list -] 1433 0000165E 2E <2> db %$index 1434 <2> [list -] 1433 0000165F 2F <2> db %$index 1434 <2> [list -] 1433 00001660 2E <2> db %$index 1434 <2> [list -] 1433 00001661 2E <2> db %$index 1434 <2> [list -] 1433 00001662 2F <2> db %$index 1434 <2> [list -] 1433 00001663 2F <2> db %$index 1434 <2> [list -] 1433 00001664 32 <2> db %$index 1434 <2> [list -] 1433 00001665 34 <2> db %$index 1434 <2> [list -] 1433 00001666 37 <2> db %$index 1434 <2> [list -] 1433 00001667 39 <2> db %$index 1434 <2> [list -] 1433 00001668 3A <2> db %$index 1434 <2> [list -] 1433 00001669 3B <2> db %$index 1434 <2> [list -] 1433 0000166A 3C <2> db %$index 1434 <2> [list -] 1433 0000166B 3D <2> db %$index 1434 <2> [list -] 1433 0000166C 3F <2> db %$index 1434 <2> [list -] 1433 0000166D 40 <2> db %$index 1434 <2> [list -] 1433 0000166E 42 <2> db %$index 1434 <2> [list -] 1433 0000166F 44 <2> db %$index 1434 <2> [list -] 1433 00001670 46 <2> db %$index 1434 <2> [list -] 1433 00001671 48 <2> db %$index 1434 <2> [list -] 1433 00001672 49 <2> db %$index 1434 <2> [list -] 1433 00001673 4A <2> db %$index 1434 <2> [list -] 1433 00001674 4D <2> db %$index 1434 <2> [list -] 1433 00001675 4D <2> db %$index 1434 <2> [list -] 1433 00001676 4E <2> db %$index 1434 <2> [list -] 1433 00001677 4F <2> db %$index 1434 <2> [list -] 1433 00001678 50 <2> db %$index 1434 <2> [list -] 1433 00001679 4F <2> db %$index 1434 <2> [list -] 1433 0000167A 50 <2> db %$index 1434 <2> [list -] 1433 0000167B 52 <2> db %$index 1434 <2> [list -] 1433 0000167C 54 <2> db %$index 1434 <2> [list -] 1433 0000167D 56 <2> db %$index 1434 <2> [list -] 1433 0000167E 58 <2> db %$index 1434 <2> [list -] 1433 0000167F 5A <2> db %$index 1434 <2> [list -] 1433 00001680 59 <2> db %$index 1434 <2> [list -] 1433 00001681 59 <2> db %$index 1434 <2> [list -] 1433 00001682 5A <2> db %$index 1434 <2> [list -] 1433 00001683 5B <2> db %$index 1434 <2> [list -] 1433 00001684 5E <2> db %$index 1434 <2> [list -] 1433 00001685 61 <2> db %$index 1434 <2> [list -] 1433 00001686 62 <2> db %$index 1434 <2> [list -] 1433 00001687 63 <2> db %$index 1434 <2> [list -] 1433 00001688 62 <2> db %$index 1434 <2> [list -] 1433 00001689 62 <2> db %$index 1434 <2> [list -] 1433 0000168A 61 <2> db %$index 1434 <2> [list -] 1433 0000168B 61 <2> db %$index 1434 <2> [list -] 1433 0000168C 60 <2> db %$index 1434 <2> [list -] 1433 0000168D 60 <2> db %$index 1434 <2> [list -] 1433 0000168E 5F <2> db %$index 1434 <2> [list -] 1433 0000168F 5F <2> db %$index 1434 <2> [list -] 1433 00001690 5E <2> db %$index 1434 <2> [list -] 1433 00001691 5E <2> db %$index 1434 <2> [list -] 1433 00001692 5D <2> db %$index 1434 <2> [list -] 1433 00001693 5D <2> db %$index 1434 <2> [list -] 1433 00001694 5E <2> db %$index 1434 <2> [list -] 1433 00001695 5F <2> db %$index 1434 <2> [list -] 1433 00001696 60 <2> db %$index 1434 <2> [list -] 1433 00001697 61 <2> db %$index 1434 <2> [list -] 1433 00001698 62 <2> db %$index 1434 <2> [list -] 1433 00001699 63 <2> db %$index 1434 <2> [list -] 1433 0000169A 64 <2> db %$index 1434 <2> [list -] 1433 0000169B 65 <2> db %$index 1434 <2> [list -] 1433 0000169C 66 <2> db %$index 1434 <2> [list -] 1433 0000169D 67 <2> db %$index 1434 <2> [list -] 1433 0000169E 68 <2> db %$index 1434 <2> [list -] 1433 0000169F 6A <2> db %$index 1434 <2> [list -] 1433 000016A0 6C <2> db %$index 1434 <2> [list -] 1433 000016A1 6E <2> db %$index 1434 <2> [list -] 1433 000016A2 70 <2> db %$index 1434 <2> [list -] 1433 000016A3 71 <2> db %$index 1434 <2> [list -] 1433 000016A4 72 <2> db %$index 1434 <2> [list -] 1433 000016A5 71 <2> db %$index 1434 <2> [list -] 1433 000016A6 73 <2> db %$index 1434 <2> [list -] 1433 000016A7 76 <2> db %$index 1434 <2> [list -] 1433 000016A8 77 <2> db %$index 1434 <2> [list -] 1433 000016A9 79 <2> db %$index 1434 <2> [list -] 1433 000016AA 79 <2> db %$index 1434 <2> [list -] 1433 000016AB 79 <2> db %$index 1434 <2> [list -] 1434 ****************** <2> warning: Most assembler table prefix bytes: 1 (ofs 4h) mne BOXCB variant (240h + 0*8 + 7),84,, [-w+user] 1498 <1> 1499 <1> usesection lDEBUG_DATA_ENTRY 1055 1056 1057 usesection lDEBUG_DATA_ENTRY 1058 1059 msg_start: 1060 %include "msg.asm" 1061 <1> 1062 <1> %if 0 1063 <1> 1064 <1> lDebug messages 1065 <1> 1066 <1> Copyright (C) 1995-2003 Paul Vojta 1067 <1> Copyright (C) 2008-2012 C. Masloch 1068 <1> 1069 <1> Usage of the works is permitted provided that this 1070 <1> instrument is retained with the works, so that any entity 1071 <1> that uses the works is notified of this instrument. 1072 <1> 1073 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 1074 <1> 1075 <1> %endif 1076 <1> 1077 <1> 1078 <1> usesection lDEBUG_DATA_ENTRY 1079 <1> 1080 <1> msg: 1081 <1> .help: 1082 00001132 6C4465627567582028- <1> db _PROGNAME,_VERSION," help screen",13,10 1082 0000113B 323032322D30342D32- <1> 1082 00001144 33292068656C702073- <1> 1082 0000114D 637265656E0D0A <1> 1083 00001154 617373656D626C6509- <1> db "assemble",9, "A [address]",13,10 1083 0000115D 41205B616464726573- <1> 1083 00001166 735D0D0A <1> 1084 <1> %if 0 1085 <1> db "set option bits",9, "BS value",13,10 1086 <1> db "unset opt bits",9, "BU value",13,10 1087 <1> db "reset opt bits",9, "BR value",13,10 1088 <1> %endif 1089 <1> %if _BREAKPOINTS 1090 0000116A 73657420627265616B- <1> db "set breakpoint",9, "BP index|AT|NEW address [[NUMBER=]number] [WHEN=cond] [ID=id]",13,10 1090 00001173 706F696E7409425020- <1> 1090 0000117C 696E6465787C41547C- <1> 1090 00001185 4E4557206164647265- <1> 1090 0000118E 7373205B5B4E554D42- <1> 1090 00001197 45523D5D6E756D6265- <1> 1090 000011A0 725D205B5748454E3D- <1> 1090 000011A9 636F6E645D205B4944- <1> 1090 000011B2 3D69645D0D0A <1> 1091 000011B8 207365742049440909- <1> db " set ID",9,9, "BI index|AT address [ID=]id",13,10 1091 000011C1 424920696E6465787C- <1> 1091 000011CA 415420616464726573- <1> 1091 000011D3 73205B49443D5D6964- <1> 1091 000011DC 0D0A <1> 1092 000011DE 2073657420636F6E64- <1> db " set condition",9, "BW index|AT address [WHEN=]cond",13,10 1092 000011E7 6974696F6E09425720- <1> 1092 000011F0 696E6465787C415420- <1> 1092 000011F9 61646472657373205B- <1> 1092 00001202 5748454E3D5D636F6E- <1> 1092 0000120B 640D0A <1> 1093 0000120E 20736574206F666673- <1> db " set offset",9, "BO index|AT address [OFFSET=]number",13,10 1093 00001217 657409424F20696E64- <1> 1093 00001220 65787C415420616464- <1> 1093 00001229 72657373205B4F4646- <1> 1093 00001232 5345543D5D6E756D62- <1> 1093 0000123B 65720D0A <1> 1094 0000123F 20736574206E756D62- <1> db " set number",9, "BN index|AT address|ALL number",13,10 1094 00001248 657209424E20696E64- <1> 1094 00001251 65787C415420616464- <1> 1094 0000125A 726573737C414C4C20- <1> 1094 00001263 6E756D6265720D0A <1> 1095 0000126B 20636C656172090942- <1> db " clear",9,9, "BC index|AT address|ALL",13,10 1095 00001274 4320696E6465787C41- <1> 1095 0000127D 542061646472657373- <1> 1095 00001286 7C414C4C0D0A <1> 1096 0000128C 2064697361626C6509- <1> db " disable",9, "BD index|AT address|ALL",13,10 1096 00001295 424420696E6465787C- <1> 1096 0000129E 415420616464726573- <1> 1096 000012A7 737C414C4C0D0A <1> 1097 000012AE 20656E61626C650909- <1> db " enable",9,9, "BE index|AT address|ALL",13,10 1097 000012B7 424520696E6465787C- <1> 1097 000012C0 415420616464726573- <1> 1097 000012C9 737C414C4C0D0A <1> 1098 000012D0 20746F67676C650909- <1> db " toggle",9,9, "BT index|AT address|ALL",13,10 1098 000012D9 425420696E6465787C- <1> 1098 000012E2 415420616464726573- <1> 1098 000012EB 737C414C4C0D0A <1> 1099 000012F2 206C6973740909424C- <1> db " list",9,9, "BL [index|AT address|ALL]",13,10 1099 000012FB 205B696E6465787C41- <1> 1099 00001304 542061646472657373- <1> 1099 0000130D 7C414C4C5D0D0A <1> 1100 <1> %endif 1101 <1> %if _DEBUG 1102 <1> db "break upwards",9, "BU",13,10 1103 <1> %endif 1104 00001314 636F6D706172650909- <1> db "compare",9,9, "C range address",13,10 1104 0000131D 432072616E67652061- <1> 1104 00001326 6464726573730D0A <1> 1105 0000132E 64756D70090944205B- <1> db "dump",9,9, "D [range]",13,10 1105 00001337 72616E67655D0D0A <1> 1106 0000133F 64756D702062797465- <1> db "dump bytes",9, "DB [range]",13,10 1106 00001348 73094442205B72616E- <1> 1106 00001351 67655D0D0A <1> 1107 00001356 64756D7020776F7264- <1> db "dump words",9, "DW [range]",13,10 1107 0000135F 73094457205B72616E- <1> 1107 00001368 67655D0D0A <1> 1108 0000136D 64756D702064776F72- <1> db "dump dwords",9, "DD [range]",13,10 1108 00001376 6473094444205B7261- <1> 1108 0000137F 6E67655D0D0A <1> 1109 <1> %if _INT 1110 00001385 64756D7020696E7465- <1> db "dump interrupts",9, "DI[R][M][L] interrupt [count]",13,10 1110 0000138E 727275707473094449- <1> 1110 00001397 5B525D5B4D5D5B4C5D- <1> 1110 000013A0 20696E746572727570- <1> 1110 000013A9 74205B636F756E745D- <1> 1110 000013B2 0D0A <1> 1111 <1> %endif 1112 <1> %if _PM 1113 000013B4 64756D70204C445409- <1> db "dump LDT",9, "DL selector [count]",13,10 1113 000013BD 444C2073656C656374- <1> 1113 000013C6 6F72205B636F756E74- <1> 1113 000013CF 5D0D0A <1> 1114 <1> %endif 1115 <1> %if _MCB 1116 000013D2 64756D70204D434220- <1> db "dump MCB chain",9, "DM [segment]",13,10 1116 000013DB 636861696E09444D20- <1> 1116 000013E4 5B7365676D656E745D- <1> 1116 000013ED 0D0A <1> 1117 <1> ;db "dump S/SD MCBs",9, "DS",13,10 1118 <1> %endif 1119 <1> %if _DSTRINGS 1120 000013EF 646973706C61792073- <1> db "display strings",9, "DZ/D$/D[W]# [address]",13,10 1120 000013F8 7472696E677309445A- <1> 1120 00001401 2F44242F445B575D23- <1> 1120 0000140A 205B61646472657373- <1> 1120 00001413 5D0D0A <1> 1121 <1> %endif 1122 <1> %if _PM 1123 00001416 64756D702065787420- <1> db "dump ext memory",9, "DX physical_address",13,10 1123 0000141F 6D656D6F7279094458- <1> 1123 00001428 20706879736963616C- <1> 1123 00001431 5F616464726573730D- <1> 1123 0000143A 0A <1> 1124 <1> %endif 1125 0000143B 656E74657209094520- <1> db "enter",9,9, "E address [list]",13,10 1125 00001444 61646472657373205B- <1> 1125 0000144D 6C6973745D0D0A <1> 1126 00001454 66696C6C0909462072- <1> db "fill",9,9, "F range [RANGE range|list]",13,10 1126 0000145D 616E6765205B52414E- <1> 1126 00001466 47452072616E67657C- <1> 1126 0000146F 6C6973745D0D0A <1> 1127 00001476 676F090947205B3D61- <1> db "go",9,9, "G [=address] [breakpts]",13,10 1127 0000147F 6464726573735D205B- <1> 1127 00001488 627265616B7074735D- <1> 1127 00001491 0D0A <1> 1128 00001493 676F746F0909474F54- <1> db "goto",9,9, "GOTO :label",13,10 1128 0000149C 4F203A6C6162656C0D- <1> 1128 000014A5 0A <1> 1129 000014A6 686578206164642F73- <1> db "hex add/sub",9, "H value1 [value2 [...]]",13,10 1129 000014AF 756209482076616C75- <1> 1129 000014B8 6531205B76616C7565- <1> 1129 000014C1 32205B2E2E2E5D5D0D- <1> 1129 000014CA 0A <1> 1130 000014CB 626173652064697370- <1> db "base display",9, "H BASE=number [GROUP=number] [WIDTH=number] value",13,10 1130 000014D4 6C6179094820424153- <1> 1130 000014DD 453D6E756D62657220- <1> 1130 000014E6 5B47524F55503D6E75- <1> 1130 000014EF 6D6265725D205B5749- <1> 1130 000014F8 4454483D6E756D6265- <1> 1130 00001501 725D2076616C75650D- <1> 1130 0000150A 0A <1> 1131 0000150B 696E7075740909495B- <1> db "input",9,9, "I[W|D] port",13,10 1131 00001514 577C445D20706F7274- <1> 1131 0000151D 0D0A <1> 1132 0000151F 6966206E756D657269- <1> db "if numeric",9, "IF [NOT] (cond) THEN cmd",13,10 1132 00001528 63094946205B4E4F54- <1> 1132 00001531 5D2028636F6E642920- <1> 1132 0000153A 5448454E20636D640D- <1> 1132 00001543 0A <1> 1133 00001544 696620736372697074- <1> db "if script file",9, "IF [NOT] EXISTS Y file [:label] THEN cmd",13,10 1133 0000154D 2066696C6509494620- <1> 1133 00001556 5B4E4F545D20455849- <1> 1133 0000155F 53545320592066696C- <1> 1133 00001568 65205B3A6C6162656C- <1> 1133 00001571 5D205448454E20636D- <1> 1133 0000157A 640D0A <1> 1134 0000157D 6C6F61642070726F67- <1> db "load program",9, "L [address]",13,10 1134 00001586 72616D094C205B6164- <1> 1134 0000158F 64726573735D0D0A <1> 1135 00001597 6C6F61642073656374- <1> db "load sectors",9, "L address drive sector count",13,10 1135 000015A0 6F7273094C20616464- <1> 1135 000015A9 726573732064726976- <1> 1135 000015B2 6520736563746F7220- <1> 1135 000015BB 636F756E740D0A <1> 1136 000015C2 6D6F766509094D2072- <1> db "move",9,9, "M range address",13,10 1136 000015CB 616E67652061646472- <1> 1136 000015D4 6573730D0A <1> 1137 000015D9 38307838362F783837- <1> db "80x86/x87 mode",9, "M [0..6|C|NC|C2|?]",13,10 1137 000015E2 206D6F6465094D205B- <1> 1137 000015EB 302E2E367C437C4E43- <1> 1137 000015F4 7C43327C3F5D0D0A <1> 1138 000015FC 736574206E616D6509- <1> db "set name",9, "N [[drive:][path]progname.ext [parameters]]",13,10 1138 00001605 4E205B5B6472697665- <1> 1138 0000160E 3A5D5B706174685D70- <1> 1138 00001617 726F676E616D652E65- <1> 1138 00001620 7874205B706172616D- <1> 1138 00001629 65746572735D5D0D0A <1> 1139 00001632 6F757470757409094F- <1> db "output",9,9, "O[W|D] port value",13,10 1139 0000163B 5B577C445D20706F72- <1> 1139 00001644 742076616C75650D0A <1> 1140 0000164D 70726F636565640909- <1> db "proceed",9,9, "P [=address] [count [WHILE cond] [SILENT [count]]]",13,10 1140 00001656 50205B3D6164647265- <1> 1140 0000165F 73735D205B636F756E- <1> 1140 00001668 74205B5748494C4520- <1> 1140 00001671 636F6E645D205B5349- <1> 1140 0000167A 4C454E54205B636F75- <1> 1140 00001683 6E745D5D5D0D0A <1> 1141 0000168A 717569740909510D0A <1> db "quit",9,9, "Q",13,10 1142 00001693 726567697374657209- <1> db "register",9, "R [register [value]]",13,10 1142 0000169C 52205B726567697374- <1> 1142 000016A5 6572205B76616C7565- <1> 1142 000016AE 5D5D0D0A <1> 1143 000016B2 5220657874656E6465- <1> db "R extended",9, "RE",13,10 1143 000016BB 640952450D0A <1> 1144 000016C1 524520636F6D6D616E- <1> db "RE commands",9, "RE.LIST|APPEND|REPLACE [commands]",13,10 1144 000016CA 64730952452E4C4953- <1> 1144 000016D3 547C415050454E447C- <1> 1144 000016DC 5245504C414345205B- <1> 1144 000016E5 636F6D6D616E64735D- <1> 1144 000016EE 0D0A <1> 1145 <1> %if _MMXSUPP 1146 000016F0 4D4D58207265676973- <1> db "MMX register",9, "RM",13,10 1146 000016F9 74657209524D0D0A <1> 1147 <1> %endif 1148 <1> %if _RN 1149 00001701 465055207265676973- <1> db "FPU register",9, "RN",13,10 1149 0000170A 74657209524E0D0A <1> 1150 <1> %endif 1151 00001712 746F67676C65203338- <1> db "toggle 386 regs",9, "RX",13,10 1151 0000171B 362072656773095258- <1> 1151 00001724 0D0A <1> 1152 00001726 736561726368090953- <1> db "search",9,9, "S range [REVERSE] [RANGE range|list]",13,10 1152 0000172F 2072616E6765205B52- <1> 1152 00001738 4556455253455D205B- <1> 1152 00001741 52414E47452072616E- <1> 1152 0000174A 67657C6C6973745D0D- <1> 1152 00001753 0A <1> 1153 00001754 736C6565700909534C- <1> db "sleep",9,9, "SLEEP count [SECONDS|TICKS]",13,10 1153 0000175D 45455020636F756E74- <1> 1153 00001766 205B5345434F4E4453- <1> 1153 0000176F 7C5449434B535D0D0A <1> 1154 00001778 747261636509095420- <1> db "trace",9,9, "T [=address] [count [WHILE cond] [SILENT [count]]]",13,10 1154 00001781 5B3D61646472657373- <1> 1154 0000178A 5D205B636F756E7420- <1> 1154 00001793 5B5748494C4520636F- <1> 1154 0000179C 6E645D205B53494C45- <1> 1154 000017A5 4E54205B636F756E74- <1> 1154 000017AE 5D5D5D0D0A <1> 1155 000017B3 747261636520286578- <1> db "trace (exc str)",9 1155 000017BC 63207374722909 <1> 1156 000017C3 5450205B3D61646472- <1> db "TP [=address] [count [WHILE cond] [SILENT [count]]]",13,10 1156 000017CC 6573735D205B636F75- <1> 1156 000017D5 6E74205B5748494C45- <1> 1156 000017DE 20636F6E645D205B53- <1> 1156 000017E7 494C454E54205B636F- <1> 1156 000017F0 756E745D5D5D0D0A <1> 1157 000017F8 7472616365206D6F64- <1> db "trace mode",9, "TM [0|1]",13,10 1157 00001801 6509544D205B307C31- <1> 1157 0000180A 5D0D0A <1> 1158 <1> %if _TSR 1159 0000180D 656E74657220545352- <1> db "enter TSR mode",9, "TSR",13,10 1159 00001816 206D6F646509545352- <1> 1159 0000181F 0D0A <1> 1160 <1> %endif 1161 00001821 756E617373656D626C- <1> db "unassemble",9, "U [range]",13,10 1161 0000182A 650955205B72616E67- <1> 1161 00001833 655D0D0A <1> 1162 00001837 77726974652070726F- <1> db "write program",9, "W [address]",13,10 1162 00001840 6772616D0957205B61- <1> 1162 00001849 6464726573735D0D0A <1> 1163 00001852 777269746520736563- <1> db "write sectors",9, "W address drive sector count",13,10 1163 0000185B 746F72730957206164- <1> 1163 00001864 647265737320647269- <1> 1163 0000186D 766520736563746F72- <1> 1163 00001876 20636F756E740D0A <1> 1164 <1> %if _EMS 1165 0000187E 657870616E64656420- <1> db "expanded mem",9, "XA/XD/XM/XR/XS, X? for help",13,10 1165 00001887 6D656D0958412F5844- <1> 1165 00001890 2F584D2F58522F5853- <1> 1165 00001899 2C20583F20666F7220- <1> 1165 000018A2 68656C700D0A <1> 1166 <1> %endif 1167 000018A8 72756E207363726970- <1> db "run script",9, "Y [partition/][scriptfile] [:label]",13,10 1167 000018B1 740959205B70617274- <1> 1167 000018BA 6974696F6E2F5D5B73- <1> 1167 000018C3 637269707466696C65- <1> 1167 000018CC 5D205B3A6C6162656C- <1> 1167 000018D5 5D0D0A <1> 1168 000018D8 0D0A <1> db 13,10 1169 000018DA 4164646974696F6E61- <1> db "Additional help topics:",13,10 1169 000018E3 6C2068656C7020746F- <1> 1169 000018EC 706963733A0D0A <1> 1170 <1> %if _EXTHELP 1171 000018F3 205265676973746572- <1> db " Registers",9, "?R",13,10 1171 000018FC 73093F520D0A <1> 1172 00001902 20466C61677309093F- <1> db " Flags",9,9, "?F",13,10 1172 0000190B 460D0A <1> 1173 <1> %if _COND 1174 0000190E 20436F6E646974696F- <1> db " Conditionals",9, "?C",13,10 1174 00001917 6E616C73093F430D0A <1> 1175 <1> %endif 1176 <1> %if _EXPRESSIONS 1177 00001920 204578707265737369- <1> db " Expressions",9, "?E",13,10 1177 00001929 6F6E73093F450D0A <1> 1178 <1> %endif 1179 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1180 00001931 205661726961626C65- <1> db " Variables",9, "?V",13,10 1180 0000193A 73093F560D0A <1> 1181 <1> %endif 1182 00001940 205220457874656E64- <1> db " R Extended",9, "?RE",13,10 1182 00001949 6564093F52450D0A <1> 1183 00001951 2052756E206B657977- <1> db " Run keywords",9, "?RUN",13,10 1183 0000195A 6F726473093F52554E- <1> 1183 00001963 0D0A <1> 1184 <1> %if _OPTIONS 1185 00001965 204F7074696F6E7309- <1> db " Options",9, "?O",13,10 1185 0000196E 3F4F0D0A <1> 1186 <1> %endif 1187 <1> %if _BOOTLDR 1188 00001972 20426F6F74206C6F61- <1> db " Boot loading",9, "?BOOT",13,10 1188 0000197B 64696E67093F424F4F- <1> 1188 00001984 540D0A <1> 1189 <1> %endif 1190 <1> %endif 1191 00001987 206C44656275672062- <1> db " lDebug build",9, "?BUILD",13,10 1191 00001990 75696C64093F425549- <1> 1191 00001999 4C440D0A <1> 1192 0000199D 206C44656275672062- <1> db " lDebug build",9, "?B",13,10 1192 000019A6 75696C64093F420D0A <1> 1193 <1> %if _EXTHELP 1194 000019AF 206C44656275672073- <1> db " lDebug sources",9, "?SOURCE",13,10 1194 000019B8 6F7572636573093F53- <1> 1194 000019C1 4F555243450D0A <1> 1195 000019C8 206C4465627567206C- <1> db " lDebug license",9, "?L",13,10 1195 000019D1 6963656E7365093F4C- <1> 1195 000019DA 0D0A <1> 1196 <1> %endif 1197 <1> %if _PM 1198 000019DC 0D0A <1> db 13,10 1199 000019DE 50726F6D7074733A20- <1> db "Prompts: '-' = real or V86 mode; '#' = protected mode",13,10 1199 000019E7 272D27203D20726561- <1> 1199 000019F0 6C206F722056383620- <1> 1199 000019F9 6D6F64653B20272327- <1> 1199 00001A02 203D2070726F746563- <1> 1199 00001A0B 746564206D6F64650D- <1> 1199 00001A14 0A <1> 1200 <1> %endif 1201 00001A15 00 <1> asciz 1202 <1> 1203 <1> %if _EXTHELP 1204 00001A16 534F5552434500 <1> .source:asciz "SOURCE" 1205 <1> .help_source: 1206 00001A1D 546865206F72696769- <1> db "The original lDebug sources can be obtained from the repo located at",13,10 1206 00001A26 6E616C206C44656275- <1> 1206 00001A2F 6720736F7572636573- <1> 1206 00001A38 2063616E206265206F- <1> 1206 00001A41 627461696E65642066- <1> 1206 00001A4A 726F6D207468652072- <1> 1206 00001A53 65706F206C6F636174- <1> 1206 00001A5C 65642061740D0A <1> 1207 00001A63 68747470733A2F2F68- <1> db "https://hg.pushbx.org/ecm/ldebug (E. C. Masloch's repo)",13,10 1207 00001A6C 672E7075736862782E- <1> 1207 00001A75 6F72672F65636D2F6C- <1> 1207 00001A7E 64656275672028452E- <1> 1207 00001A87 20432E204D61736C6F- <1> 1207 00001A90 63682773207265706F- <1> 1207 00001A99 290D0A <1> 1208 00001A9C 0D0A <1> db 13,10 1209 00001A9E 52656C656173657320- <1> db "Releases of lDebug are available via the website at",13,10 1209 00001AA7 6F66206C4465627567- <1> 1209 00001AB0 206172652061766169- <1> 1209 00001AB9 6C61626C6520766961- <1> 1209 00001AC2 207468652077656273- <1> 1209 00001ACB 6974652061740D0A <1> 1210 00001AD3 68747470733A2F2F70- <1> db "https://pushbx.org/ecm/web/#projects-ldebug",13,10 1210 00001ADC 75736862782E6F7267- <1> 1210 00001AE5 2F65636D2F7765622F- <1> 1210 00001AEE 2370726F6A65637473- <1> 1210 00001AF7 2D6C64656275670D0A <1> 1211 00001B00 0D0A <1> db 13,10 1212 00001B02 546865206D6F737420- <1> db "The most recent manual is hosted at https://pushbx.org/ecm/doc/ in the",13,10 1212 00001B0B 726563656E74206D61- <1> 1212 00001B14 6E75616C2069732068- <1> 1212 00001B1D 6F7374656420617420- <1> 1212 00001B26 68747470733A2F2F70- <1> 1212 00001B2F 75736862782E6F7267- <1> 1212 00001B38 2F65636D2F646F632F- <1> 1212 00001B41 20696E207468650D0A <1> 1213 00001B4A 66696C6573206C6465- <1> db "files ldebug.htm, ldebug.txt, and ldebug.pdf",13,10 1213 00001B53 6275672E68746D2C20- <1> 1213 00001B5C 6C64656275672E7478- <1> 1213 00001B65 742C20616E64206C64- <1> 1213 00001B6E 656275672E7064660D- <1> 1213 00001B77 0A <1> 1214 00001B78 00 <1> asciz 1215 <1> %endif 1216 <1> 1217 <1> .re: 1218 00001B79 524500 <1> asciz "RE" 1219 <1> .help_re: 1220 00001B7C 5468652052554E2063- <1> db "The RUN commands (T, TP, P, G) and the RE command use the RE command",13,10 1220 00001B85 6F6D6D616E64732028- <1> 1220 00001B8E 542C2054502C20502C- <1> 1220 00001B97 20472920616E642074- <1> 1220 00001BA0 686520524520636F6D- <1> 1220 00001BA9 6D616E642075736520- <1> 1220 00001BB2 74686520524520636F- <1> 1220 00001BBB 6D6D616E640D0A <1> 1221 00001BC2 62756666657220746F- <1> db "buffer to run commands. Most commands are allowed to be run from the",13,10 1221 00001BCB 2072756E20636F6D6D- <1> 1221 00001BD4 616E64732E204D6F73- <1> 1221 00001BDD 7420636F6D6D616E64- <1> 1221 00001BE6 732061726520616C6C- <1> 1221 00001BEF 6F77656420746F2062- <1> 1221 00001BF8 652072756E2066726F- <1> 1221 00001C01 6D207468650D0A <1> 1222 00001C08 524520627566666572- <1> db "RE buffer. Disallowed commands include program-loading L, A, E that",13,10 1222 00001C11 2E20446973616C6C6F- <1> 1222 00001C1A 77656420636F6D6D61- <1> 1222 00001C23 6E647320696E636C75- <1> 1222 00001C2C 64652070726F677261- <1> 1222 00001C35 6D2D6C6F6164696E67- <1> 1222 00001C3E 204C2C20412C204520- <1> 1222 00001C47 746861740D0A <1> 1223 00001C4D 737769746368657320- <1> db "switches the line input mode, TSR, Q, Y, RE, and further RUN commands.",13,10 1223 00001C56 746865206C696E6520- <1> 1223 00001C5F 696E707574206D6F64- <1> 1223 00001C68 652C205453522C2051- <1> 1223 00001C71 2C20592C2052452C20- <1> 1223 00001C7A 616E64206675727468- <1> 1223 00001C83 65722052554E20636F- <1> 1223 00001C8C 6D6D616E64732E0D0A <1> 1224 00001C95 5768656E2074686520- <1> db "When the RE buffer is used as input during T, TP, or P with either",13,10 1224 00001C9E 524520627566666572- <1> 1224 00001CA7 206973207573656420- <1> 1224 00001CB0 617320696E70757420- <1> 1224 00001CB9 647572696E6720542C- <1> 1224 00001CC2 2054502C206F722050- <1> 1224 00001CCB 207769746820656974- <1> 1224 00001CD4 6865720D0A <1> 1225 00001CD9 6F6620746865205748- <1> db "of the WHILE or SILENT keywords, commands that use the auxbuff are",13,10 1225 00001CE2 494C45206F72205349- <1> 1225 00001CEB 4C454E54206B657977- <1> 1225 00001CF4 6F7264732C20636F6D- <1> 1225 00001CFD 6D616E647320746861- <1> 1225 00001D06 742075736520746865- <1> 1225 00001D0F 206175786275666620- <1> 1225 00001D18 6172650D0A <1> 1226 00001D1D 616C736F2064697361- <1> db "also disallowed and will emit an error noting the conflict.",13,10 1226 00001D26 6C6C6F77656420616E- <1> 1226 00001D2F 642077696C6C20656D- <1> 1226 00001D38 697420616E20657272- <1> 1226 00001D41 6F72206E6F74696E67- <1> 1226 00001D4A 2074686520636F6E66- <1> 1226 00001D53 6C6963742E0D0A <1> 1227 00001D5A 0D0A <1> db 13,10 1228 00001D5C 52452E4C4953542073- <1> db "RE.LIST shows the current RE buffer contents in a format usable by",13,10 1228 00001D65 686F77732074686520- <1> 1228 00001D6E 63757272656E742052- <1> 1228 00001D77 452062756666657220- <1> 1228 00001D80 636F6E74656E747320- <1> 1228 00001D89 696E206120666F726D- <1> 1228 00001D92 617420757361626C65- <1> 1228 00001D9B 2062790D0A <1> 1229 00001DA0 746865206F74686572- <1> db "the other RE commands. RE.APPEND appends the following commands to",13,10 1229 00001DA9 20524520636F6D6D61- <1> 1229 00001DB2 6E64732E2052452E41- <1> 1229 00001DBB 5050454E4420617070- <1> 1229 00001DC4 656E64732074686520- <1> 1229 00001DCD 666F6C6C6F77696E67- <1> 1229 00001DD6 20636F6D6D616E6473- <1> 1229 00001DDF 20746F0D0A <1> 1230 00001DE4 746865206275666665- <1> db "the buffer, if they fit. RE.REPLACE appends to the start of the",13,10 1230 00001DED 722C20696620746865- <1> 1230 00001DF6 79206669742E205245- <1> 1230 00001DFF 2E5245504C41434520- <1> 1230 00001E08 617070656E64732074- <1> 1230 00001E11 6F2074686520737461- <1> 1230 00001E1A 7274206F6620746865- <1> 1230 00001E23 0D0A <1> 1231 00001E25 6275666665722E2057- <1> db "buffer. When specifying commands, an unescaped semicolon is parsed",13,10 1231 00001E2E 68656E207370656369- <1> 1231 00001E37 6679696E6720636F6D- <1> 1231 00001E40 6D616E64732C20616E- <1> 1231 00001E49 20756E657363617065- <1> 1231 00001E52 642073656D69636F6C- <1> 1231 00001E5B 6F6E20697320706172- <1> 1231 00001E64 7365640D0A <1> 1232 00001E69 61732061206C696E65- <1> db "as a linebreak to break apart individual commands. Backslashes can",13,10 1232 00001E72 627265616B20746F20- <1> 1232 00001E7B 627265616B20617061- <1> 1232 00001E84 727420696E64697669- <1> 1232 00001E8D 6475616C20636F6D6D- <1> 1232 00001E96 616E64732E20426163- <1> 1232 00001E9F 6B736C617368657320- <1> 1232 00001EA8 63616E0D0A <1> 1233 00001EAD 626520757365642074- <1> db "be used to escape semicolons and backslashes themselves.",13,10 1233 00001EB6 6F2065736361706520- <1> 1233 00001EBF 73656D69636F6C6F6E- <1> 1233 00001EC8 7320616E6420626163- <1> 1233 00001ED1 6B736C617368657320- <1> 1233 00001EDA 7468656D73656C7665- <1> 1233 00001EE3 732E0D0A <1> 1234 00001EE7 0D0A <1> db 13,10 1235 00001EE9 507265666978696E67- <1> db "Prefixing a line with an @ (AT sign) causes the command not to be",13,10 1235 00001EF2 2061206C696E652077- <1> 1235 00001EFB 69746820616E204020- <1> 1235 00001F04 284154207369676E29- <1> 1235 00001F0D 206361757365732074- <1> 1235 00001F16 686520636F6D6D616E- <1> 1235 00001F1F 64206E6F7420746F20- <1> 1235 00001F28 62650D0A <1> 1236 00001F2C 73686F776E20746F20- <1> db "shown to the standard output of the debugger when run. Otherwise,",13,10 1236 00001F35 746865207374616E64- <1> 1236 00001F3E 617264206F75747075- <1> 1236 00001F47 74206F662074686520- <1> 1236 00001F50 646562756767657220- <1> 1236 00001F59 7768656E2072756E2E- <1> 1236 00001F62 204F74686572776973- <1> 1236 00001F6B 652C0D0A <1> 1237 00001F6F 74686520636F6D6D61- <1> db "the command will be shown with a percent sign % or ~% prompt.",13,10 1237 00001F78 6E642077696C6C2062- <1> 1237 00001F81 652073686F776E2077- <1> 1237 00001F8A 697468206120706572- <1> 1237 00001F93 63656E74207369676E- <1> 1237 00001F9C 2025206F72207E2520- <1> 1237 00001FA5 70726F6D70742E0D0A <1> 1238 00001FAE 0D0A <1> db 13,10 1239 00001FB0 546865206465666175- <1> db "The default RE buffer content is @R. This content is also",13,10 1239 00001FB9 6C7420524520627566- <1> 1239 00001FC2 66657220636F6E7465- <1> 1239 00001FCB 6E742069732040522E- <1> 1239 00001FD4 205468697320636F6E- <1> 1239 00001FDD 74656E742069732061- <1> 1239 00001FE6 6C736F0D0A <1> 1240 00001FEB 646574656374656420- <1> db "detected and handled specifically; if found as the only command",13,10 1240 00001FF4 616E642068616E646C- <1> 1240 00001FFD 656420737065636966- <1> 1240 00002006 6963616C6C793B2069- <1> 1240 0000200F 6620666F756E642061- <1> 1240 00002018 7320746865206F6E6C- <1> 1240 00002021 7920636F6D6D616E64- <1> 1240 0000202A 0D0A <1> 1241 0000202C 7468652068616E646C- <1> db "the handler directly calls the register dump implementation",13,10 1241 00002035 657220646972656374- <1> 1241 0000203E 6C792063616C6C7320- <1> 1241 00002047 746865207265676973- <1> 1241 00002050 7465722064756D7020- <1> 1241 00002059 696D706C656D656E74- <1> 1241 00002062 6174696F6E0D0A <1> 1242 00002069 776974686F75742073- <1> db "without setting up and tearing down the special execution",13,10 1242 00002072 657474696E67207570- <1> 1242 0000207B 20616E642074656172- <1> 1242 00002084 696E6720646F776E20- <1> 1242 0000208D 746865207370656369- <1> 1242 00002096 616C20657865637574- <1> 1242 0000209F 696F6E0D0A <1> 1243 000020A4 656E7669726F6E6D65- <1> db "environment used to run arbitrary commands from the RE buffer.",13,10 1243 000020AD 6E7420757365642074- <1> 1243 000020B6 6F2072756E20617262- <1> 1243 000020BF 69747261727920636F- <1> 1243 000020C8 6D6D616E6473206672- <1> 1243 000020D1 6F6D20746865205245- <1> 1243 000020DA 206275666665722E0D- <1> 1243 000020E3 0A <1> 1244 000020E4 00 <1> asciz 1245 <1> 1246 <1> .run: 1247 000020E5 52554E00 <1> asciz "RUN" 1248 <1> .help_run: 1249 000020E9 542028747261636529- <1> db "T (trace), TP (trace except proceed past string operations), and P (proceed)",13,10 1249 000020F2 2C2054502028747261- <1> 1249 000020FB 636520657863657074- <1> 1249 00002104 2070726F6365656420- <1> 1249 0000210D 706173742073747269- <1> 1249 00002116 6E67206F7065726174- <1> 1249 0000211F 696F6E73292C20616E- <1> 1249 00002128 642050202870726F63- <1> 1249 00002131 656564290D0A <1> 1250 00002137 63616E20626520666F- <1> db "can be followed by a number of repetitions and then the keyword WHILE,",13,10 1250 00002140 6C6C6F776564206279- <1> 1250 00002149 2061206E756D626572- <1> 1250 00002152 206F66207265706574- <1> 1250 0000215B 6974696F6E7320616E- <1> 1250 00002164 64207468656E207468- <1> 1250 0000216D 65206B6579776F7264- <1> 1250 00002176 205748494C452C0D0A <1> 1251 0000217F 7768696368206D7573- <1> db "which must be followed by a conditional expression.",13,10 1251 00002188 7420626520666F6C6C- <1> 1251 00002191 6F7765642062792061- <1> 1251 0000219A 20636F6E646974696F- <1> 1251 000021A3 6E616C206578707265- <1> 1251 000021AC 7373696F6E2E0D0A <1> 1252 000021B4 0D0A <1> db 13,10 1253 000021B6 5468652073656C6563- <1> db "The selected run command is repeated as many times as specified by the",13,10 1253 000021BF 7465642072756E2063- <1> 1253 000021C8 6F6D6D616E64206973- <1> 1253 000021D1 207265706561746564- <1> 1253 000021DA 206173206D616E7920- <1> 1253 000021E3 74696D657320617320- <1> 1253 000021EC 737065636966696564- <1> 1253 000021F5 206279207468650D0A <1> 1254 000021FE 6E756D6265722C206F- <1> db "number, or until the WHILE condition evaluates no longer to true.",13,10 1254 00002207 7220756E74696C2074- <1> 1254 00002210 6865205748494C4520- <1> 1254 00002219 636F6E646974696F6E- <1> 1254 00002222 206576616C75617465- <1> 1254 0000222B 73206E6F206C6F6E67- <1> 1254 00002234 657220746F20747275- <1> 1254 0000223D 652E0D0A <1> 1255 00002241 0D0A <1> db 13,10 1256 00002243 416674657220746865- <1> db "After the number of repetitions or (if present) after the WHILE condition",13,10 1256 0000224C 206E756D626572206F- <1> 1256 00002255 662072657065746974- <1> 1256 0000225E 696F6E73206F722028- <1> 1256 00002267 69662070726573656E- <1> 1256 00002270 742920616674657220- <1> 1256 00002279 746865205748494C45- <1> 1256 00002282 20636F6E646974696F- <1> 1256 0000228B 6E0D0A <1> 1257 0000228E 746865206B6579776F- <1> db "the keyword SILENT may follow. If that is the case, all register dumps",13,10 1257 00002297 72642053494C454E54- <1> 1257 000022A0 206D617920666F6C6C- <1> 1257 000022A9 6F772E204966207468- <1> 1257 000022B2 617420697320746865- <1> 1257 000022BB 20636173652C20616C- <1> 1257 000022C4 6C2072656769737465- <1> 1257 000022CD 722064756D70730D0A <1> 1258 000022D6 646F6E652064757269- <1> db "done during the run are buffered by the debugger and the run remains",13,10 1258 000022DF 6E6720746865207275- <1> 1258 000022E8 6E2061726520627566- <1> 1258 000022F1 666572656420627920- <1> 1258 000022FA 746865206465627567- <1> 1258 00002303 67657220616E642074- <1> 1258 0000230C 68652072756E207265- <1> 1258 00002315 6D61696E730D0A <1> 1259 0000231C 73696C656E742E2041- <1> db "silent. After the run, the last dumps are replayed from the buffer",13,10 1259 00002325 667465722074686520- <1> 1259 0000232E 72756E2C2074686520- <1> 1259 00002337 6C6173742064756D70- <1> 1259 00002340 732061726520726570- <1> 1259 00002349 6C617965642066726F- <1> 1259 00002352 6D2074686520627566- <1> 1259 0000235B 6665720D0A <1> 1260 00002360 616E6420646973706C- <1> db "and displayed. At most as many dumps as fit into the buffer are",13,10 1260 00002369 617965642E20417420- <1> 1260 00002372 6D6F7374206173206D- <1> 1260 0000237B 616E792064756D7073- <1> 1260 00002384 206173206669742069- <1> 1260 0000238D 6E746F207468652062- <1> 1260 00002396 756666657220617265- <1> 1260 0000239F 0D0A <1> 1261 000023A1 646973706C61796564- <1> db "displayed. (The buffer is currently up to 8 KiB sized.)",13,10 1261 000023AA 2E2028546865206275- <1> 1261 000023B3 666665722069732063- <1> 1261 000023BC 757272656E746C7920- <1> 1261 000023C5 757020746F2038204B- <1> 1261 000023CE 69422073697A65642E- <1> 1261 000023D7 290D0A <1> 1262 000023DA 0D0A <1> db 13,10 1263 000023DC 49662061206E756D62- <1> db "If a number follows behind the SILENT keyword, only at most that many",13,10 1263 000023E5 657220666F6C6C6F77- <1> 1263 000023EE 7320626568696E6420- <1> 1263 000023F7 7468652053494C454E- <1> 1263 00002400 54206B6579776F7264- <1> 1263 00002409 2C206F6E6C79206174- <1> 1263 00002412 206D6F737420746861- <1> 1263 0000241B 74206D616E790D0A <1> 1264 00002423 64756D707320617265- <1> db "dumps are displayed from the buffer. The dumps that are displayed",13,10 1264 0000242C 20646973706C617965- <1> 1264 00002435 642066726F6D207468- <1> 1264 0000243E 65206275666665722E- <1> 1264 00002447 205468652064756D70- <1> 1264 00002450 732074686174206172- <1> 1264 00002459 6520646973706C6179- <1> 1264 00002462 65640D0A <1> 1265 00002466 61726520616C776179- <1> db "are always those last written into the buffer, thus last occurred.",13,10 1265 0000246F 732074686F7365206C- <1> 1265 00002478 617374207772697474- <1> 1265 00002481 656E20696E746F2074- <1> 1265 0000248A 686520627566666572- <1> 1265 00002493 2C2074687573206C61- <1> 1265 0000249C 7374206F6363757272- <1> 1265 000024A5 65642E0D0A <1> 1266 000024AA 00 <1> asciz 1267 <1> 1268 000024AB 00 <1> align 2, db 0 1269 <1> .build_array: 1270 000024AC [BE24] <1> dw .build_nameversion 1271 000024AE [3E25] <1> dw .build_lmacros 1272 000024B0 [7E25] <1> dw .build_scanptab 1273 000024B2 [BE25] <1> dw .build_inicomp 1274 <1> %if _CHECKSUM 1275 <1> dw .build_inicheck 1276 <1> %endif 1277 000024B4 [FE25] <1> dw .build_ldosboot 1278 <1> .build_short_amount: equ ($ - .build_array) / 2 1279 000024B6 [3E26] <1> dw .build_long 1280 <1> .build_long_amount: equ ($ - .build_array) / 2 1281 <1> 1282 <1> .string_build: 1283 000024B8 4255494C4400 <1> asciz "BUILD" 1284 <1> 1285 <1> .build_nameversion: 1286 000024BE 6C4465627567582028- <1> db _PROGNAME,_VERSION,13,10 1286 000024C7 323032322D30342D32- <1> 1286 000024D0 33290D0A <1> 1287 <1> %ifnidn _REVISIONID,"" 1288 000024D4 536F7572636520436F- <1> db "Source Control Revision ID: ",_REVISIONID,13,10 1288 000024DD 6E74726F6C20526576- <1> 1288 000024E6 6973696F6E2049443A- <1> 1288 000024EF 206867203862393232- <1> 1288 000024F8 643966326434652B20- <1> 1288 00002501 283236393720616E63- <1> 1288 0000250A 6573746F7273290D0A <1> 1289 <1> %endif 1290 00002513 00 <1> asciz 1291 00002514 00 <1> _fill 128, 0, .build_nameversion 1292 <1> .build_lmacros: 1293 0000253E 55736573206C6D6163- <1> fill 64, 0, asciz _REVISIONID_LMACROS 1293 00002547 726F733A2020526576- <1> 1293 00002550 6973696F6E20494420- <1> 1293 00002559 686720396661306536- <1> 1293 00002562 343033346364202831- <1> 1293 0000256B 353020616E63657374- <1> 1293 00002574 6F7273290D0A0000- <1> 1293 00002574 <1> 1294 <1> .build_scanptab: 1295 0000257E 55736573207363616E- <1> fill 64, 0, asciz _REVISIONID_SCANPTAB 1295 00002587 707461623A20526576- <1> 1295 00002590 6973696F6E20494420- <1> 1295 00002599 686720306535333038- <1> 1295 000025A2 316331353331202831- <1> 1295 000025AB 3020616E636573746F- <1> 1295 000025B4 7273290D0A0000- <1> 1295 000025B4 <1> 1296 <1> .build_inicomp: 1297 000025BE 5573657320696E6963- <1> fill 64, 0, asciz _REVISIONID_INICOMP 1297 000025C7 6F6D703A2020526576- <1> 1297 000025D0 6973696F6E20494420- <1> 1297 000025D9 686720363433313030- <1> 1297 000025E2 646533363934202835- <1> 1297 000025EB 333220616E63657374- <1> 1297 000025F4 6F7273290D0A0000- <1> 1297 000025F4 <1> 1298 <1> %if _CHECKSUM 1299 <1> .build_inicheck: 1300 <1> fill 64, 0, asciz _REVISIONID_INICHECK 1301 <1> %endif 1302 <1> .build_ldosboot: 1303 000025FE 55736573206C646F73- <1> fill 64, 0, asciz _REVISIONID_LDOSBOOT 1303 00002607 626F6F743A20526576- <1> 1303 00002610 6973696F6E20494420- <1> 1303 00002619 686720306435346665- <1> 1303 00002622 346161613036202835- <1> 1303 0000262B 373120616E63657374- <1> 1303 00002634 6F7273290D0A0000- <1> 1303 00002634 <1> 1304 <1> 1305 <1> .build_long: 1306 <1> %if _EXTHELP 1307 0000263E 0D0A <1> db 13,10 1308 <1> %if _PM 1309 00002640 44504D492D63617061- <1> db "DPMI-capable",13,10 1309 00002649 626C650D0A <1> 1310 <1> %if _NOEXTENDER 1311 0000264E 2044504D4920686F73- <1> db " DPMI host without extender",13,10 1311 00002657 7420776974686F7574- <1> 1311 00002660 20657874656E646572- <1> 1311 00002669 0D0A <1> 1312 <1> %endif 1313 <1> %if 0 1314 <1> %if _WIN9XSUPP 1315 <1> db " No Windows 4 DPMI hook",13,10 1316 <1> %endif 1317 <1> %if _PM && _DOSEMU 1318 <1> db " No DOSEMU DPMI hook",13,10 1319 <1> %endif 1320 <1> %else 1321 0000266B 204175746F6D617469- <1> db " Automatic DPMI entrypoint hook detection",13,10 1321 00002674 632044504D4920656E- <1> 1321 0000267D 747279706F696E7420- <1> 1321 00002686 686F6F6B2064657465- <1> 1321 0000268F 6374696F6E0D0A <1> 1322 <1> %endif 1323 <1> %if _EXCCSIP 1324 00002696 20446973706C617920- <1> db " Display exception address",13,10 1324 0000269F 657863657074696F6E- <1> 1324 000026A8 20616464726573730D- <1> 1324 000026B1 0A <1> 1325 <1> %endif 1326 <1> %if _DISPHOOK 1327 000026B2 20446973706C617920- <1> db " Display hooking DPMI entry",13,10 1327 000026BB 686F6F6B696E672044- <1> 1327 000026C4 504D4920656E747279- <1> 1327 000026CD 0D0A <1> 1328 <1> %endif 1329 <1> %endif 1330 <1> %if _DEBUG 1331 <1> db "Debuggable",13,10 1332 <1> %endif 1333 <1> %if _INT 1334 000026CF 444920636F6D6D616E- <1> db "DI command",13,10 1334 000026D8 640D0A <1> 1335 <1> %endif 1336 <1> %if _MCB 1337 000026DB 444D20636F6D6D616E- <1> db "DM command",13,10 1337 000026E4 640D0A <1> 1338 <1> %endif 1339 <1> %if _DSTRINGS 1340 000026E7 4420737472696E6720- <1> db "D string commands",13,10 1340 000026F0 636F6D6D616E64730D- <1> 1340 000026F9 0A <1> 1341 <1> %endif 1342 <1> %if _SDUMP 1343 000026FA 53206D617463682064- <1> db "S match dumps line of following data",13,10 1343 00002703 756D7073206C696E65- <1> 1343 0000270C 206F6620666F6C6C6F- <1> 1343 00002715 77696E672064617461- <1> 1343 0000271E 0D0A <1> 1344 <1> %endif 1345 <1> %if _RN 1346 00002720 524E20636F6D6D616E- <1> db "RN command",13,10 1346 00002729 640D0A <1> 1347 <1> %endif 1348 <1> %if _USESDA 1349 0000272C 416363657373205344- <1> db "Access SDA current PSP field",13,10 1349 00002735 412063757272656E74- <1> 1349 0000273E 20505350206669656C- <1> 1349 00002747 640D0A <1> 1350 <1> %endif 1351 <1> %if _VDD 1352 0000274A 4C6F6164204E545644- <1> db "Load NTVDM VDD for sector access",13,10 1352 00002753 4D2056444420666F72- <1> 1352 0000275C 20736563746F722061- <1> 1352 00002765 63636573730D0A <1> 1353 <1> %endif 1354 <1> %if _EMS 1355 0000276C 5820636F6D6D616E64- <1> db "X commands for EMS access",13,10 1355 00002775 7320666F7220454D53- <1> 1355 0000277E 206163636573730D0A <1> 1356 <1> %endif 1357 <1> %if _MMXSUPP 1358 00002787 524D20636F6D6D616E- <1> db "RM command and reading MMX registers as variables",13,10 1358 00002790 6420616E6420726561- <1> 1358 00002799 64696E67204D4D5820- <1> 1358 000027A2 726567697374657273- <1> 1358 000027AB 206173207661726961- <1> 1358 000027B4 626C65730D0A <1> 1359 <1> %endif 1360 <1> %if _EXPRESSIONS 1361 000027BA 45787072657373696F- <1> db "Expression evaluator",13,10 1361 000027C3 6E206576616C756174- <1> 1361 000027CC 6F720D0A <1> 1362 <1> %endif 1363 <1> %if _INDIRECTION 1364 000027D0 20496E646972656374- <1> db " Indirection in expressions",13,10 1364 000027D9 696F6E20696E206578- <1> 1364 000027E2 7072657373696F6E73- <1> 1364 000027EB 0D0A <1> 1365 <1> %endif 1366 <1> %if _VARIABLES 1367 000027ED 5661726961626C6573- <1> db "Variables with user-defined purpose",13,10 1367 000027F6 207769746820757365- <1> 1367 000027FF 722D646566696E6564- <1> 1367 00002808 20707572706F73650D- <1> 1367 00002811 0A <1> 1368 <1> %endif 1369 <1> %if _OPTIONS 1370 00002812 446562756767657220- <1> db "Debugger option and status variables",13,10 1370 0000281B 6F7074696F6E20616E- <1> 1370 00002824 642073746174757320- <1> 1370 0000282D 7661726961626C6573- <1> 1370 00002836 0D0A <1> 1371 <1> %endif 1372 <1> %if _PSPVARIABLES 1373 00002838 505350207661726961- <1> db "PSP variables",13,10 1373 00002841 626C65730D0A <1> 1374 <1> %endif 1375 <1> %if _COND 1376 00002847 436F6E646974696F6E- <1> db "Conditional jump notice in register dump",13,10 1376 00002850 616C206A756D70206E- <1> 1376 00002859 6F7469636520696E20- <1> 1376 00002862 726567697374657220- <1> 1376 0000286B 64756D700D0A <1> 1377 <1> %endif 1378 <1> %if _TSR 1379 00002871 545352206D6F646520- <1> db "TSR mode (Process detachment)",13,10 1379 0000287A 2850726F6365737320- <1> 1379 00002883 6465746163686D656E- <1> 1379 0000288C 74290D0A <1> 1380 <1> %endif 1381 <1> %if _DEVICE 1382 <1> db "Loadable device driver",13,10 1383 <1> %endif 1384 <1> %if _BOOTLDR 1385 00002890 426F6F74206C6F6164- <1> db "Boot loader",13,10 1385 00002899 65720D0A <1> 1386 <1> %endif 1387 <1> %if _BREAKPOINTS 1388 0000289D 5065726D616E656E74- <1> db "Permanent breakpoints",13,10 1388 000028A6 20627265616B706F69- <1> 1388 000028AF 6E74730D0A <1> 1389 <1> %endif 1390 <1> %push 1391 000028B4 496E74657263657074- <1> db "Intercepted" 1391 000028BD 6564 <1> 1392 <1> %if _PM 1393 000028BF 2038364D <1> db " 86M" 1394 <1> %endif 1395 000028C3 20696E746572727570- <1> db " interrupts:" 1395 000028CC 74733A <1> 1396 <1> %define %$pref " " 1397 <1> %macro dispint 2.nolist 1398 <1> %if %1 1399 <1> db %$pref, %2 1400 <1> %define %$pref ", " 1401 <1> %endif 1402 <1> %endmacro 1403 000028CF 203030 <1> dispint _CATCHINT00, "00" 1404 000028D2 2C203031 <1> dispint _CATCHINT01, "01" 1405 000028D6 2C203033 <1> dispint _CATCHINT03, "03" 1406 000028DA 2C203036 <1> dispint _CATCHINT06, "06" 1407 000028DE 2C203138 <1> dispint _CATCHINT18, "18" 1408 000028E2 2C203139 <1> dispint _CATCHINT19, "19" 1409 <1> %ifidn %$pref," " 1410 <1> db " none" 1411 <1> %endif 1412 000028E6 0D0A <1> db 13,10 1413 <1> %if _PM || _CATCHINT08 1414 000028E8 50726F636573736564 <1> db "Processed" 1415 <1> %if _PM 1416 000028F1 2038364D <1> db " 86M" 1417 <1> %endif 1418 000028F5 20696E746572727570- <1> db " interrupts:" 1418 000028FE 74733A <1> 1419 <1> %define %$pref " " 1420 00002901 203038 <1> dispint _CATCHINT08, "08" 1421 00002904 2C2032462E31363837 <1> dispint _PM, "2F.1687" 1422 <1> %ifidn %$pref," " 1423 <1> db " none" 1424 <1> %endif 1425 0000290D 0D0A <1> db 13,10 1426 <1> %endif 1427 <1> %if _PM 1428 0000290F 496E74657263657074- <1> db "Intercepted DPMI exceptions:" 1428 00002918 65642044504D492065- <1> 1428 00002921 7863657074696F6E73- <1> 1428 0000292A 3A <1> 1429 <1> %define %$pref " " 1430 0000292B 203030 <1> dispint _CATCHEXC00, "00" 1431 0000292E 2C203031 <1> dispint _CATCHEXC01, "01" 1432 00002932 2C203033 <1> dispint _CATCHEXC03, "03" 1433 00002936 2C203036 <1> dispint _CATCHEXC06, "06" 1434 0000293A 2C203043 <1> dispint _CATCHEXC0C, "0C" 1435 0000293E 2C203044 <1> dispint _CATCHEXC0D, "0D" 1436 00002942 2C203045 <1> dispint _CATCHEXC0E, "0E" 1437 <1> %ifidn %$pref," " 1438 <1> db " none" 1439 <1> %endif 1440 00002946 0D0A <1> db 13,10 1441 <1> %endif 1442 <1> %unmacro dispint 2.nolist 1443 <1> %pop 1444 <1> %if _PM && _CATCHPMINT214C 1445 00002948 50726F636573736564- <1> db "Processed DPMI interrupts: 21.4C",13,10 1445 00002951 2044504D4920696E74- <1> 1445 0000295A 657272757074733A20- <1> 1445 00002963 32312E34430D0A <1> 1446 <1> %endif 1447 <1> %if _EXTHELP 1448 0000296A 457874656E64656420- <1> db "Extended built-in help pages",13,10 1448 00002973 6275696C742D696E20- <1> 1448 0000297C 68656C702070616765- <1> 1448 00002985 730D0A <1> 1449 <1> %endif 1450 <1> %if _ONLYNON386 1451 <1> db "Only supports non-386 operation",13,10 1452 <1> %endif 1453 <1> %if _ONLY386 1454 <1> db "Only supports 386+ operation",13,10 1455 <1> %endif 1456 <1> %else 1457 <1> %if _BOOTLDR 1458 <1> asciz 1459 <1> ; This message is used by mak.sh to detect that we 1460 <1> ; are building with boot load support. 1461 <1> db 13,10,"Boot loader",13,10 1462 <1> %endif 1463 <1> %endif 1464 00002988 00 <1> asciz 1465 <1> 1466 <1> %if _EXTHELP 1467 <1> .license: 1468 00002989 6C4465627567202D20- <1> db "lDebug - libre 86-DOS debugger",13,10 1468 00002992 6C696272652038362D- <1> 1468 0000299B 444F53206465627567- <1> 1468 000029A4 6765720D0A <1> 1469 000029A9 0D0A <1> db 13,10 1470 000029AB 436F70797269676874- <1> db "Copyright (C) 1995-2003 Paul Vojta",13,10 1470 000029B4 202843292031393935- <1> 1470 000029BD 2D3230303320506175- <1> 1470 000029C6 6C20566F6A74610D0A <1> 1471 000029CF 436F70797269676874- <1> db "Copyright (C) 2008-2021 C. Masloch",13,10 1471 000029D8 202843292032303038- <1> 1471 000029E1 2D3230323120432E20- <1> 1471 000029EA 4D61736C6F63680D0A <1> 1472 000029F3 0D0A <1> db 13,10 1473 000029F5 5573616765206F6620- <1> db "Usage of the works is permitted provided that this",13,10 1473 000029FE 74686520776F726B73- <1> 1473 00002A07 206973207065726D69- <1> 1473 00002A10 747465642070726F76- <1> 1473 00002A19 696465642074686174- <1> 1473 00002A22 20746869730D0A <1> 1474 00002A29 696E737472756D656E- <1> db "instrument is retained with the works, so that any entity",13,10 1474 00002A32 742069732072657461- <1> 1474 00002A3B 696E65642077697468- <1> 1474 00002A44 2074686520776F726B- <1> 1474 00002A4D 732C20736F20746861- <1> 1474 00002A56 7420616E7920656E74- <1> 1474 00002A5F 6974790D0A <1> 1475 00002A64 746861742075736573- <1> db "that uses the works is notified of this instrument.",13,10 1475 00002A6D 2074686520776F726B- <1> 1475 00002A76 73206973206E6F7469- <1> 1475 00002A7F 66696564206F662074- <1> 1475 00002A88 68697320696E737472- <1> 1475 00002A91 756D656E742E0D0A <1> 1476 00002A99 0D0A <1> db 13,10 1477 00002A9B 444953434C41494D45- <1> db "DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.",13,10 1477 00002AA4 523A2054484520574F- <1> 1477 00002AAD 524B53204152452057- <1> 1477 00002AB6 4954484F5554205741- <1> 1477 00002ABF 5252414E54592E0D0A <1> 1478 00002AC8 0D0A <1> db 13,10 1479 00002ACA 0D0A <1> db 13,10 1480 00002ACC 416C6C20636F6E7472- <1> db "All contributions by Paul Vojta or C. Masloch to the debugger are available",13,10 1480 00002AD5 69627574696F6E7320- <1> 1480 00002ADE 6279205061756C2056- <1> 1480 00002AE7 6F6A7461206F722043- <1> 1480 00002AF0 2E204D61736C6F6368- <1> 1480 00002AF9 20746F207468652064- <1> 1480 00002B02 656275676765722061- <1> 1480 00002B0B 726520617661696C61- <1> 1480 00002B14 626C650D0A <1> 1481 00002B19 756E64657220612063- <1> db "under a choice of three different licenses. These are the Fair License, the",13,10 1481 00002B22 686F696365206F6620- <1> 1481 00002B2B 746872656520646966- <1> 1481 00002B34 666572656E74206C69- <1> 1481 00002B3D 63656E7365732E2054- <1> 1481 00002B46 686573652061726520- <1> 1481 00002B4F 746865204661697220- <1> 1481 00002B58 4C6963656E73652C20- <1> 1481 00002B61 7468650D0A <1> 1482 00002B66 53696D706C69666965- <1> db "Simplified 2-Clause BSD License, or the MIT License.",13,10 1482 00002B6F 6420322D436C617573- <1> 1482 00002B78 6520425344204C6963- <1> 1482 00002B81 656E73652C206F7220- <1> 1482 00002B8A 746865204D4954204C- <1> 1482 00002B93 6963656E73652E0D0A <1> 1483 00002B9C 0D0A <1> db 13,10 1484 00002B9E 546869732069732074- <1> db "This is the license and copyright information that applies to lDebug; but note",13,10 1484 00002BA7 6865206C6963656E73- <1> 1484 00002BB0 6520616E6420636F70- <1> 1484 00002BB9 79726967687420696E- <1> 1484 00002BC2 666F726D6174696F6E- <1> 1484 00002BCB 207468617420617070- <1> 1484 00002BD4 6C69657320746F206C- <1> 1484 00002BDD 44656275673B206275- <1> 1484 00002BE6 74206E6F74650D0A <1> 1485 00002BEE 746861742074686572- <1> db "that there have been substantial contributions to the code base that are not",13,10 1485 00002BF7 652068617665206265- <1> 1485 00002C00 656E20737562737461- <1> 1485 00002C09 6E7469616C20636F6E- <1> 1485 00002C12 747269627574696F6E- <1> 1485 00002C1B 7320746F2074686520- <1> 1485 00002C24 636F64652062617365- <1> 1485 00002C2D 207468617420617265- <1> 1485 00002C36 206E6F740D0A <1> 1486 00002C3C 636F70797269676874- <1> db "copyrighted (public domain).",13,10 1486 00002C45 656420287075626C69- <1> 1486 00002C4E 6320646F6D61696E29- <1> 1486 00002C57 2E0D0A <1> 1487 00002C5A 00 <1> asciz 1488 <1> 1489 <1> .reghelp: 1490 00002C5B 417661696C61626C65- <1> db "Available 16-bit registers:",9,9,"Available 32-bit registers: (386+)",13,10 1490 00002C64 2031362D6269742072- <1> 1490 00002C6D 65676973746572733A- <1> 1490 00002C76 0909417661696C6162- <1> 1490 00002C7F 6C652033322D626974- <1> 1490 00002C88 207265676973746572- <1> 1490 00002C91 733A20283338362B29- <1> 1490 00002C9A 0D0A <1> 1491 00002C9C 415809416363756D75- <1> db "AX",9,"Accumulator",9,9,9,"EAX",13,10 1491 00002CA5 6C61746F7209090945- <1> 1491 00002CAE 41580D0A <1> 1492 00002CB2 425809426173652072- <1> db "BX",9,"Base register",9,9,9,"EBX",13,10 1492 00002CBB 656769737465720909- <1> 1492 00002CC4 094542580D0A <1> 1493 00002CCA 435809436F756E7465- <1> db "CX",9,"Counter",9,9,9,9,"ECX",13,10 1493 00002CD3 72090909094543580D- <1> 1493 00002CDC 0A <1> 1494 00002CDD 445809446174612072- <1> db "DX",9,"Data register",9,9,9,"EDX",13,10 1494 00002CE6 656769737465720909- <1> 1494 00002CEF 094544580D0A <1> 1495 00002CF5 535009537461636B20- <1> db "SP",9,"Stack pointer",9,9,9,"ESP",13,10 1495 00002CFE 706F696E7465720909- <1> 1495 00002D07 094553500D0A <1> 1496 00002D0D 425009426173652070- <1> db "BP",9,"Base pointer",9,9,9,"EBP",13,10 1496 00002D16 6F696E746572090909- <1> 1496 00002D1F 4542500D0A <1> 1497 00002D24 534909536F75726365- <1> db "SI",9,"Source index",9,9,9,"ESI",13,10 1497 00002D2D 20696E646578090909- <1> 1497 00002D36 4553490D0A <1> 1498 00002D3B 44490944657374696E- <1> db "DI",9,"Destination index",9,9,"EDI",13,10 1498 00002D44 6174696F6E20696E64- <1> 1498 00002D4D 657809094544490D0A <1> 1499 00002D56 445309446174612073- <1> db "DS",9,"Data segment",13,10 1499 00002D5F 65676D656E740D0A <1> 1500 00002D67 455309457874726120- <1> db "ES",9,"Extra segment",13,10 1500 00002D70 7365676D656E740D0A <1> 1501 00002D79 535309537461636B20- <1> db "SS",9,"Stack segment",13,10 1501 00002D82 7365676D656E740D0A <1> 1502 00002D8B 435309436F64652073- <1> db "CS",9,"Code segment",13,10 1502 00002D94 65676D656E740D0A <1> 1503 00002D9C 465309457874726120- <1> db "FS",9,"Extra segment 2 (386+)",13,10 1503 00002DA5 7365676D656E742032- <1> 1503 00002DAE 20283338362B290D0A <1> 1504 00002DB7 475309457874726120- <1> db "GS",9,"Extra segment 3 (386+)",13,10 1504 00002DC0 7365676D656E742033- <1> 1504 00002DC9 20283338362B290D0A <1> 1505 00002DD2 495009496E73747275- <1> db "IP",9,"Instruction pointer",9,9,"EIP",13,10 1505 00002DDB 6374696F6E20706F69- <1> 1505 00002DE4 6E7465720909454950- <1> 1505 00002DED 0D0A <1> 1506 00002DEF 464C09466C61677309- <1> db "FL",9,"Flags",9,9,9,9,"EFL",13,10 1506 00002DF8 09090945464C0D0A <1> 1507 00002E00 0D0A <1> db 13,10 1508 <1> %if _MMXSUPP && 0 1509 <1> db "Available 64-bit Matrix Math Extension (MMX) registers: (if supported)",13,10 1510 <1> db "MMx",9,"MM(x)",9,"MMX register x, where x is 0 to 7",13,10 1511 <1> db 13,10 1512 <1> %endif 1513 00002E02 456E746572203F4620- <1> db "Enter ?F to display the recognized flags.",13,10 1513 00002E0B 746F20646973706C61- <1> 1513 00002E14 792074686520726563- <1> 1513 00002E1D 6F676E697A65642066- <1> 1513 00002E26 6C6167732E0D0A <1> 1514 00002E2D 00 <1> asciz 1515 <1> 1516 <1> .flaghelp: 1517 00002E2E 5265636F676E697A65- <1> db "Recognized flags:",13,10 1517 00002E37 6420666C6167733A0D- <1> 1517 00002E40 0A <1> 1518 00002E41 56616C7565094E616D- <1> db "Value",9,"Name",9,9,9, " Set",9,9,9, " Clear",13,10 1518 00002E4A 650909092020536574- <1> 1518 00002E53 0909092020436C6561- <1> 1518 00002E5C 720D0A <1> 1519 00002E5F 3038303020204F4620- <1> db "0800 OF Overflow Flag",9,9,"OV Overflow",9,9, "NV No overflow",13,10 1519 00002E68 204F766572666C6F77- <1> 1519 00002E71 20466C616709094F56- <1> 1519 00002E7A 20204F766572666C6F- <1> 1519 00002E83 7709094E5620204E6F- <1> 1519 00002E8C 206F766572666C6F77- <1> 1519 00002E95 0D0A <1> 1520 00002E97 303430302020444620- <1> db "0400 DF Direction Flag",9,"DN Down",9,9, "UP Up",13,10 1520 00002EA0 20446972656374696F- <1> 1520 00002EA9 6E20466C616709444E- <1> 1520 00002EB2 2020446F776E090955- <1> 1520 00002EBB 50202055700D0A <1> 1521 00002EC2 303230302020494620- <1> db "0200 IF Interrupt Flag",9,"EI Enable interrupts",9,"DI Disable interrupts",13,10 1521 00002ECB 20496E746572727570- <1> 1521 00002ED4 7420466C6167094549- <1> 1521 00002EDD 2020456E61626C6520- <1> 1521 00002EE6 696E74657272757074- <1> 1521 00002EEF 730944492020446973- <1> 1521 00002EF8 61626C6520696E7465- <1> 1521 00002F01 7272757074730D0A <1> 1522 00002F09 303038302020534620- <1> db "0080 SF Sign Flag",9,9, "NG Negative",9,9, "PL Plus",13,10 1522 00002F12 205369676E20466C61- <1> 1522 00002F1B 6709094E4720204E65- <1> 1522 00002F24 676174697665090950- <1> 1522 00002F2D 4C2020506C75730D0A <1> 1523 00002F36 3030343020205A4620- <1> db "0040 ZF Zero Flag",9,9, "ZR Zero",9,9, "NZ Not zero",13,10 1523 00002F3F 205A65726F20466C61- <1> 1523 00002F48 6709095A5220205A65- <1> 1523 00002F51 726F09094E5A20204E- <1> 1523 00002F5A 6F74207A65726F0D0A <1> 1524 00002F63 303031302020414620- <1> db "0010 AF Auxiliary Flag",9,"AC Auxiliary carry",9,"NA No auxiliary carry",13,10 1524 00002F6C 20417578696C696172- <1> 1524 00002F75 7920466C6167094143- <1> 1524 00002F7E 2020417578696C6961- <1> 1524 00002F87 727920636172727909- <1> 1524 00002F90 4E4120204E6F206175- <1> 1524 00002F99 78696C696172792063- <1> 1524 00002FA2 617272790D0A <1> 1525 00002FA8 303030342020504620- <1> db "0004 PF Parity Flag",9,9, "PE Parity even",9,9, "PO Parity odd",13,10 1525 00002FB1 205061726974792046- <1> 1525 00002FBA 6C6167090950452020- <1> 1525 00002FC3 506172697479206576- <1> 1525 00002FCC 656E0909504F202050- <1> 1525 00002FD5 6172697479206F6464- <1> 1525 00002FDE 0D0A <1> 1526 00002FE0 303030312020434620- <1> db "0001 CF Carry Flag",9,9, "CY Carry",9,9, "NC No carry",13,10 1526 00002FE9 20436172727920466C- <1> 1526 00002FF2 616709094359202043- <1> 1526 00002FFB 6172727909094E4320- <1> 1526 00003004 204E6F206361727279- <1> 1526 0000300D 0D0A <1> 1527 0000300F 0D0A <1> db 13,10 1528 00003011 5468652073686F7274- <1> db "The short names of the flag states are displayed when dumping registers",13,10 1528 0000301A 206E616D6573206F66- <1> 1528 00003023 2074686520666C6167- <1> 1528 0000302C 207374617465732061- <1> 1528 00003035 726520646973706C61- <1> 1528 0000303E 796564207768656E20- <1> 1528 00003047 64756D70696E672072- <1> 1528 00003050 65676973746572730D- <1> 1528 00003059 0A <1> 1529 0000305A 616E642063616E2062- <1> db "and can be entered to modify the symbolic F register with R. The short",13,10 1529 00003063 6520656E7465726564- <1> 1529 0000306C 20746F206D6F646966- <1> 1529 00003075 79207468652073796D- <1> 1529 0000307E 626F6C696320462072- <1> 1529 00003087 656769737465722077- <1> 1529 00003090 69746820522E205468- <1> 1529 00003099 652073686F72740D0A <1> 1530 000030A2 6E616D6573206F6620- <1> db "names of the flags can be modified by R.",13,10 1530 000030AB 74686520666C616773- <1> 1530 000030B4 2063616E206265206D- <1> 1530 000030BD 6F6469666965642062- <1> 1530 000030C6 7920522E0D0A <1> 1531 000030CC 00 <1> asciz 1532 <1> 1533 <1> %if _COND 1534 <1> .condhelp: 1535 000030CD 496E20746865207265- <1> db "In the register dump displayed by the R, T, P and G commands, conditional",13,10 1535 000030D6 676973746572206475- <1> 1535 000030DF 6D7020646973706C61- <1> 1535 000030E8 796564206279207468- <1> 1535 000030F1 6520522C20542C2050- <1> 1535 000030FA 20616E64204720636F- <1> 1535 00003103 6D6D616E64732C2063- <1> 1535 0000310C 6F6E646974696F6E61- <1> 1535 00003115 6C0D0A <1> 1536 00003118 6A756D707320617265- <1> db "jumps are displayed with a notice that shows whether the instruction will",13,10 1536 00003121 20646973706C617965- <1> 1536 0000312A 642077697468206120- <1> 1536 00003133 6E6F74696365207468- <1> 1536 0000313C 61742073686F777320- <1> 1536 00003145 776865746865722074- <1> 1536 0000314E 686520696E73747275- <1> 1536 00003157 6374696F6E2077696C- <1> 1536 00003160 6C0D0A <1> 1537 00003163 63617573652061206A- <1> db "cause a jump depending on its condition and the current register and flag",13,10 1537 0000316C 756D7020646570656E- <1> 1537 00003175 64696E67206F6E2069- <1> 1537 0000317E 747320636F6E646974- <1> 1537 00003187 696F6E20616E642074- <1> 1537 00003190 68652063757272656E- <1> 1537 00003199 742072656769737465- <1> 1537 000031A2 7220616E6420666C61- <1> 1537 000031AB 670D0A <1> 1538 000031AE 636F6E74656E74732E- <1> db 'contents. This notice shows either "jumping" or "not jumping" as appropriate.',13,10 1538 000031B7 2054686973206E6F74- <1> 1538 000031C0 6963652073686F7773- <1> 1538 000031C9 206569746865722022- <1> 1538 000031D2 6A756D70696E672220- <1> 1538 000031DB 6F7220226E6F74206A- <1> 1538 000031E4 756D70696E67222061- <1> 1538 000031ED 7320617070726F7072- <1> 1538 000031F6 696174652E0D0A <1> 1539 000031FD 0D0A <1> db 13,10 1540 000031FF 54686520636F6E6469- <1> db "The conditional jumps use these conditions: (second column negates)",13,10 1540 00003208 74696F6E616C206A75- <1> 1540 00003211 6D7073207573652074- <1> 1540 0000321A 6865736520636F6E64- <1> 1540 00003223 6974696F6E733A2028- <1> 1540 0000322C 7365636F6E6420636F- <1> 1540 00003235 6C756D6E206E656761- <1> 1540 0000323E 746573290D0A <1> 1541 00003244 206A6F09096A6E6F09- <1> db " jo",9,9,"jno",9,9,"OF",13,10 1541 0000324D 094F460D0A <1> 1542 00003252 206A63206A62206A6E- <1> db " jc jb jnae",9,"jnc jnb jae",9,"CF",13,10 1542 0000325B 6165096A6E63206A6E- <1> 1542 00003264 62206A61650943460D- <1> 1542 0000326D 0A <1> 1543 0000326E 206A7A206A6509096A- <1> db " jz je",9,9,"jnz jne",9,9,"ZF",13,10 1543 00003277 6E7A206A6E6509095A- <1> 1543 00003280 460D0A <1> 1544 00003283 206A6265206A6E6109- <1> db " jbe jna",9,"jnbe ja",9,9,"ZF||CF",13,10 1544 0000328C 6A6E6265206A610909- <1> 1544 00003295 5A467C7C43460D0A <1> 1545 0000329D 206A7309096A6E7309- <1> db " js",9,9,"jns",9,9,"SF",13,10 1545 000032A6 0953460D0A <1> 1546 000032AB 206A70206A70650909- <1> db " jp jpe",9,9,"jnp jpo",9,9,"PF",13,10 1546 000032B4 6A6E70206A706F0909- <1> 1546 000032BD 50460D0A <1> 1547 000032C1 206A6C206A6E676509- <1> db " jl jnge",9,"jnl jge",9,9,"OF^^SF",13,10 1547 000032CA 6A6E6C206A67650909- <1> 1547 000032D3 4F465E5E53460D0A <1> 1548 000032DB 206A6C65206A6E6709- <1> db " jle jng",9,"jnle jg",9,9,"OF^^SF || ZF",13,10 1548 000032E4 6A6E6C65206A670909- <1> 1548 000032ED 4F465E5E5346207C7C- <1> 1548 000032F6 205A460D0A <1> 1549 000032FB 206A28652963787A09- <1> db " j(e)cxz",9,9,9,"(e)cx==0",13,10 1549 00003304 090928652963783D3D- <1> 1549 0000330D 300D0A <1> 1550 00003310 206C6F6F7009090909- <1> db " loop",9,9,9,9,"(e)cx!=1",13,10 1550 00003319 2865296378213D310D- <1> 1550 00003322 0A <1> 1551 00003323 206C6F6F707A206C6F- <1> db " loopz loope",9,9,9,"(e)cx!=1 && ZF",13,10 1551 0000332C 6F7065090909286529- <1> 1551 00003335 6378213D3120262620- <1> 1551 0000333E 5A460D0A <1> 1552 00003342 206C6F6F706E7A206C- <1> db " loopnz loopne",9,9,9,"(e)cx!=1 && !ZF",13,10 1552 0000334B 6F6F706E6509090928- <1> 1552 00003354 65296378213D312026- <1> 1552 0000335D 2620215A460D0A <1> 1553 00003364 0D0A <1> db 13,10 1554 00003366 456E746572203F4620- <1> db "Enter ?F to display a description of the flag names.",13,10 1554 0000336F 746F20646973706C61- <1> 1554 00003378 792061206465736372- <1> 1554 00003381 697074696F6E206F66- <1> 1554 0000338A 2074686520666C6167- <1> 1554 00003393 206E616D65732E0D0A <1> 1555 0000339C 00 <1> asciz 1556 <1> %endif 1557 <1> 1558 <1> %if _EXPRESSIONS 1559 <1> .expressionhelp: 1560 0000339D 5265636F676E697A65- <1> db "Recognized operators in expressions:",13,10 1560 000033A6 64206F70657261746F- <1> 1560 000033AF 727320696E20657870- <1> 1560 000033B8 72657373696F6E733A- <1> 1560 000033C1 0D0A <1> 1561 000033C3 7C0962697477697365- <1> db "|",9, "bitwise OR",9,9, "||",9, "boolean OR",13,10 1561 000033CC 204F5209097C7C0962- <1> 1561 000033D5 6F6F6C65616E204F52- <1> 1561 000033DE 0D0A <1> 1562 000033E0 5E0962697477697365- <1> db "^",9, "bitwise XOR",9,9, "^^",9, "boolean XOR",13,10 1562 000033E9 20584F5209095E5E09- <1> 1562 000033F2 626F6F6C65616E2058- <1> 1562 000033FB 4F520D0A <1> 1563 000033FF 260962697477697365- <1> db "&",9, "bitwise AND",9,9, "&&",9, "boolean AND",13,10 1563 00003408 20414E440909262609- <1> 1563 00003411 626F6F6C65616E2041- <1> 1563 0000341A 4E440D0A <1> 1564 0000341E 3E3E096269742D7368- <1> db ">>",9, "bit-shift right",9,9, ">",9,"test if above",13,10 1564 00003427 696674207269676874- <1> 1564 00003430 09093E097465737420- <1> 1564 00003439 69662061626F76650D- <1> 1564 00003442 0A <1> 1565 00003443 3E3E3E097369676E65- <1> db ">>>",9, "signed bit-shift right",9, "<",9,"test if below",13,10 1565 0000344C 64206269742D736869- <1> 1565 00003455 667420726967687409- <1> 1565 0000345E 3C0974657374206966- <1> 1565 00003467 2062656C6F770D0A <1> 1566 0000346F 3C3C096269742D7368- <1> db "<<",9, "bit-shift left",9,9, ">=",9,"test if above-or-equal",13,10 1566 00003478 696674206C65667409- <1> 1566 00003481 093E3D097465737420- <1> 1566 0000348A 69662061626F76652D- <1> 1566 00003493 6F722D657175616C0D- <1> 1566 0000349C 0A <1> 1567 0000349D 3E3C096269742D6D69- <1> db "><",9, "bit-mirror",9,9, "<=",9,"test if below-or-equal",13,10 1567 000034A6 72726F7209093C3D09- <1> 1567 000034AF 746573742069662062- <1> 1567 000034B8 656C6F772D6F722D65- <1> 1567 000034C1 7175616C0D0A <1> 1568 000034C7 2B096164646974696F- <1> db "+",9, "addition",9,9, "==",9,"test if equal",13,10 1568 000034D0 6E09093D3D09746573- <1> 1568 000034D9 742069662065717561- <1> 1568 000034E2 6C0D0A <1> 1569 000034E5 2D0973756274726163- <1> db "-",9, "subtraction",9,9, "!=",9,"test if not equal",13,10 1569 000034EE 74696F6E0909213D09- <1> 1569 000034F7 74657374206966206E- <1> 1569 00003500 6F7420657175616C0D- <1> 1569 00003509 0A <1> 1570 0000350A 2A096D756C7469706C- <1> db "*",9, "multiplication",9,9, "=>",9,"same as >=",13,10 1570 00003513 69636174696F6E0909- <1> 1570 0000351C 3D3E0973616D652061- <1> 1570 00003525 73203E3D0D0A <1> 1571 0000352B 2F096469766973696F- <1> db "/",9, "division",9,9, "=<",9,"same as <=",13,10 1571 00003534 6E09093D3C0973616D- <1> 1571 0000353D 65206173203C3D0D0A <1> 1572 00003546 25096D6F64756C6F20- <1> db "%",9, "modulo (A-(A/B*B))",9, "<>",9,"same as !=",13,10 1572 0000354F 28412D28412F422A42- <1> 1572 00003558 2929093C3E0973616D- <1> 1572 00003561 6520617320213D0D0A <1> 1573 0000356A 2A2A09706F7765720D- <1> db "**",9, "power",13,10 1573 00003573 0A <1> 1574 00003574 0D0A <1> db 13,10 1575 00003576 496D706C6963697420- <1> db "Implicit operater precedence is handled in the listed order, with increasing",13,10 1575 0000357F 6F7065726174657220- <1> 1575 00003588 707265636564656E63- <1> 1575 00003591 652069732068616E64- <1> 1575 0000359A 6C656420696E207468- <1> 1575 000035A3 65206C697374656420- <1> 1575 000035AC 6F726465722C207769- <1> 1575 000035B5 746820696E63726561- <1> 1575 000035BE 73696E670D0A <1> 1576 000035C4 707265636564656E63- <1> db "precedence: (Brackets specify explicit precedence of an expression.)",13,10 1576 000035CD 653A2028427261636B- <1> 1576 000035D6 657473207370656369- <1> 1576 000035DF 6679206578706C6963- <1> 1576 000035E8 697420707265636564- <1> 1576 000035F1 656E6365206F662061- <1> 1576 000035FA 6E2065787072657373- <1> 1576 00003603 696F6E2E290D0A <1> 1577 0000360A 20626F6F6C65616E20- <1> db " boolean operators OR, XOR, AND (each has a different precedence)",13,10 1577 00003613 6F70657261746F7273- <1> 1577 0000361C 204F522C20584F522C- <1> 1577 00003625 20414E442028656163- <1> 1577 0000362E 682068617320612064- <1> 1577 00003637 6966666572656E7420- <1> 1577 00003640 707265636564656E63- <1> 1577 00003649 65290D0A <1> 1578 0000364D 20636F6D7061726973- <1> db " comparison operators",13,10 1578 00003656 6F6E206F7065726174- <1> 1578 0000365F 6F72730D0A <1> 1579 00003664 206269747769736520- <1> db " bitwise operators OR, XOR, AND (each has a different precedence)",13,10 1579 0000366D 6F70657261746F7273- <1> 1579 00003676 204F522C20584F522C- <1> 1579 0000367F 20414E442028656163- <1> 1579 00003688 682068617320612064- <1> 1579 00003691 6966666572656E7420- <1> 1579 0000369A 707265636564656E63- <1> 1579 000036A3 65290D0A <1> 1580 000036A7 20736869667420616E- <1> db " shift and bit-mirror operators",13,10 1580 000036B0 64206269742D6D6972- <1> 1580 000036B9 726F72206F70657261- <1> 1580 000036C2 746F72730D0A <1> 1581 000036C8 206164646974696F6E- <1> db " addition and subtraction operators",13,10 1581 000036D1 20616E642073756274- <1> 1581 000036DA 72616374696F6E206F- <1> 1581 000036E3 70657261746F72730D- <1> 1581 000036EC 0A <1> 1582 000036ED 206D756C7469706C69- <1> db " multiplication, division and modulo operators",13,10 1582 000036F6 636174696F6E2C2064- <1> 1582 000036FF 69766973696F6E2061- <1> 1582 00003708 6E64206D6F64756C6F- <1> 1582 00003711 206F70657261746F72- <1> 1582 0000371A 730D0A <1> 1583 0000371D 20706F776572206F70- <1> db " power operator",13,10 1583 00003726 657261746F720D0A <1> 1584 0000372E 0D0A <1> db 13,10 1585 00003730 5265636F676E697A65- <1> db "Recognized unary operators: (modifying the next number)",13,10 1585 00003739 6420756E617279206F- <1> 1585 00003742 70657261746F72733A- <1> 1585 0000374B 20286D6F6469667969- <1> 1585 00003754 6E6720746865206E65- <1> 1585 0000375D 7874206E756D626572- <1> 1585 00003766 290D0A <1> 1586 00003769 2B09706F7369746976- <1> db "+",9, "positive (does nothing)",13,10 1586 00003772 652028646F6573206E- <1> 1586 0000377B 6F7468696E67290D0A <1> 1587 00003784 2D096E656761746976- <1> db "-",9, "negative",13,10 1587 0000378D 650D0A <1> 1588 00003790 7E0962697477697365- <1> db "~",9, "bitwise NOT",13,10 1588 00003799 204E4F540D0A <1> 1589 0000379F 2109626F6F6C65616E- <1> db "!",9, "boolean NOT",13,10 1589 000037A8 204E4F540D0A <1> 1590 000037AE 3F096162736F6C7574- <1> db "?",9, "absolute value",13,10 1590 000037B7 652076616C75650D0A <1> 1591 000037C0 212109636F6E766572- <1> db "!!",9, "convert to boolean",13,10 1591 000037C9 7420746F20626F6F6C- <1> 1591 000037D2 65616E0D0A <1> 1592 000037D7 0D0A <1> db 13,10 1593 000037D9 4E6F74652074686174- <1> db "Note that the power operator does not affect unary operator handling.",13,10 1593 000037E2 2074686520706F7765- <1> 1593 000037EB 72206F70657261746F- <1> 1593 000037F4 7220646F6573206E6F- <1> 1593 000037FD 742061666665637420- <1> 1593 00003806 756E617279206F7065- <1> 1593 0000380F 7261746F722068616E- <1> 1593 00003818 646C696E672E0D0A <1> 1594 00003820 466F7220696E737461- <1> db 'For instance, "- 2 ** 2" is parsed as "(-2) ** 2" and evaluates to 4.',13,10 1594 00003829 6E63652C20222D2032- <1> 1594 00003832 202A2A203222206973- <1> 1594 0000383B 207061727365642061- <1> 1594 00003844 732022282D3229202A- <1> 1594 0000384D 2A20322220616E6420- <1> 1594 00003856 6576616C7561746573- <1> 1594 0000385F 20746F20342E0D0A <1> 1595 00003867 0D0A <1> db 13,10 1596 00003869 416C74686F75676820- <1> db "Although a negative unary and signed bit-shift right operator are provided",13,10 1596 00003872 61206E656761746976- <1> 1596 0000387B 6520756E6172792061- <1> 1596 00003884 6E64207369676E6564- <1> 1596 0000388D 206269742D73686966- <1> 1596 00003896 74207269676874206F- <1> 1596 0000389F 70657261746F722061- <1> 1596 000038A8 72652070726F766964- <1> 1596 000038B1 65640D0A <1> 1597 000038B5 746865206578707265- <1> db "the expression evaluator is intrinsically unsigned. Particularly the division,",13,10 1597 000038BE 7373696F6E20657661- <1> 1597 000038C7 6C7561746F72206973- <1> 1597 000038D0 20696E7472696E7369- <1> 1597 000038D9 63616C6C7920756E73- <1> 1597 000038E2 69676E65642E205061- <1> 1597 000038EB 72746963756C61726C- <1> 1597 000038F4 792074686520646976- <1> 1597 000038FD 6973696F6E2C0D0A <1> 1598 00003905 6D756C7469706C6963- <1> db "multiplication, modulo and all comparison operators operate unsigned. Due to",13,10 1598 0000390E 6174696F6E2C206D6F- <1> 1598 00003917 64756C6F20616E6420- <1> 1598 00003920 616C6C20636F6D7061- <1> 1598 00003929 7269736F6E206F7065- <1> 1598 00003932 7261746F7273206F70- <1> 1598 0000393B 657261746520756E73- <1> 1598 00003944 69676E65642E204475- <1> 1598 0000394D 6520746F0D0A <1> 1599 00003953 746869732C20746865- <1> db 'this, the expression "-1 < 0" evaluates to zero.',13,10 1599 0000395C 206578707265737369- <1> 1599 00003965 6F6E20222D31203C20- <1> 1599 0000396E 3022206576616C7561- <1> 1599 00003977 74657320746F207A65- <1> 1599 00003980 726F2E0D0A <1> 1600 00003985 0D0A <1> db 13,10 1601 00003987 5265636F676E697A65- <1> db "Recognized terms in an expression:",13,10 1601 00003990 64207465726D732069- <1> 1601 00003999 6E20616E2065787072- <1> 1601 000039A2 657373696F6E3A0D0A <1> 1602 000039AB 2033322D6269742069- <1> db " 32-bit immediates",13,10 1602 000039B4 6D6D65646961746573- <1> 1602 000039BD 0D0A <1> 1603 000039BF 20382D626974207265- <1> db " 8-bit registers",13,10 1603 000039C8 676973746572730D0A <1> 1604 000039D1 2031362D6269742072- <1> db " 16-bit registers including segment registers (except FS, GS)",13,10 1604 000039DA 656769737465727320- <1> 1604 000039E3 696E636C7564696E67- <1> 1604 000039EC 207365676D656E7420- <1> 1604 000039F5 726567697374657273- <1> 1604 000039FE 202865786365707420- <1> 1604 00003A07 46532C204753290D0A <1> 1605 00003A10 2033322D6269742063- <1> db " 32-bit compound registers made of two 16-bit registers (eg DXAX)",13,10 1605 00003A19 6F6D706F756E642072- <1> 1605 00003A22 656769737465727320- <1> 1605 00003A2B 6D616465206F662074- <1> 1605 00003A34 776F2031362D626974- <1> 1605 00003A3D 207265676973746572- <1> 1605 00003A46 732028656720445841- <1> 1605 00003A4F 58290D0A <1> 1606 00003A53 2033322D6269742072- <1> db " 32-bit registers and FS, GS only if running on a 386+",13,10 1606 00003A5C 656769737465727320- <1> 1606 00003A65 616E642046532C2047- <1> 1606 00003A6E 53206F6E6C79206966- <1> 1606 00003A77 2072756E6E696E6720- <1> 1606 00003A80 6F6E2061203338362B- <1> 1606 00003A89 0D0A <1> 1607 <1> %if 0 && _MMXSUPP 1608 <1> db " 64-bit MMX registers only if running on a CPU with MMX (r/o for now)",13,10 1609 <1> db " MM0L, MM(0)L accesses the low 32 bits of the register",13,10 1610 <1> db " MM0H, MM(0)H accesses the high 32 bits of the register",13,10 1611 <1> db " MM0Z, MM(0)Z reads the low 32 bits; writes the full register (zero-extend)",13,10 1612 <1> db " MM0S, MM(0)S reads the low 32 bits; writes the full register (sign-extend)",13,10 1613 <1> db " MM0, MM(0) is an alias for the MM0Z syntax",13,10 1614 <1> %endif 1615 <1> %if _VARIABLES 1616 00003A8B 2033322D6269742076- <1> db " 32-bit variables V00..VFF",13,10 1616 00003A94 61726961626C657320- <1> 1616 00003A9D 5630302E2E5646460D- <1> 1616 00003AA6 0A <1> 1617 <1> %endif 1618 <1> %if _OPTIONS || _PSPVARIABLES 1619 00003AA7 2033322D6269742073- <1> db " 32-bit special variable" 1619 00003AB0 70656369616C207661- <1> 1619 00003AB9 726961626C65 <1> 1620 <1> %if _OPTIONS 1621 00003ABF 732044434F2C204443- <1> db "s DCO, DCS, DAO, DAS, DIF, DPI" 1621 00003AC8 532C2044414F2C2044- <1> 1621 00003AD1 41532C204449462C20- <1> 1621 00003ADA 445049 <1> 1622 <1> %if _PSPVARIABLES 1623 00003ADD 2C <1> db "," 1624 <1> %endif 1625 <1> %endif 1626 <1> %if _PSPVARIABLES 1627 00003ADE 20505049 <1> db " PPI" 1628 <1> %endif 1629 00003AE2 0D0A <1> db 13,10 1630 00003AE4 2031362D6269742073- <1> db " 16-bit special variables" 1630 00003AED 70656369616C207661- <1> 1630 00003AF6 726961626C6573 <1> 1631 <1> %if _OPTIONS 1632 00003AFD 204450522C20445050 <1> db " DPR, DPP" 1633 <1> %if _PM 1634 00003B06 2C20445053 <1> db ", DPS" 1635 <1> %endif 1636 <1> %if _PSPVARIABLES 1637 00003B0B 2C <1> db "," 1638 <1> %endif 1639 <1> %endif 1640 <1> %if _PSPVARIABLES 1641 00003B0C 205053502C20505052 <1> db " PSP, PPR" 1642 <1> %endif 1643 00003B15 0D0A <1> db 13,10 1644 00003B17 20202866756C6C6572- <1> db " (fuller variable reference in the manual)",13,10 1644 00003B20 207661726961626C65- <1> 1644 00003B29 207265666572656E63- <1> 1644 00003B32 6520696E2074686520- <1> 1644 00003B3B 6D616E75616C290D0A <1> 1645 <1> %endif 1646 <1> %if _INDIRECTION 1647 00003B44 20627974652F776F72- <1> db " byte/word/3byte/dword memory content (eg byte [seg:ofs], where both the",13,10 1647 00003B4D 642F33627974652F64- <1> 1647 00003B56 776F7264206D656D6F- <1> 1647 00003B5F 727920636F6E74656E- <1> 1647 00003B68 742028656720627974- <1> 1647 00003B71 65205B7365673A6F66- <1> 1647 00003B7A 735D2C207768657265- <1> 1647 00003B83 20626F746820746865- <1> 1647 00003B8C 0D0A <1> 1648 00003B8E 20206F7074696F6E61- <1> db " optional segment as well as the offset are expressions too)",13,10 1648 00003B97 6C207365676D656E74- <1> 1648 00003BA0 2061732077656C6C20- <1> 1648 00003BA9 617320746865206F66- <1> 1648 00003BB2 667365742061726520- <1> 1648 00003BBB 65787072657373696F- <1> 1648 00003BC4 6E7320746F6F290D0A <1> 1649 <1> %endif 1650 00003BCD 546865206578707265- <1> db "The expression evaluator case-insensitively checks for names of variables",13,10 1650 00003BD6 7373696F6E20657661- <1> 1650 00003BDF 6C7561746F72206361- <1> 1650 00003BE8 73652D696E73656E73- <1> 1650 00003BF1 69746976656C792063- <1> 1650 00003BFA 6865636B7320666F72- <1> 1650 00003C03 206E616D6573206F66- <1> 1650 00003C0C 207661726961626C65- <1> 1650 00003C15 730D0A <1> 1651 00003C18 616E64207265676973- <1> db "and registers" 1651 00003C21 74657273 <1> 1652 <1> %if _INDIRECTION 1653 00003C25 2061732077656C6C20- <1> db " as well as size specifiers" 1653 00003C2E 61732073697A652073- <1> 1653 00003C37 706563696669657273 <1> 1654 <1> %endif 1655 00003C40 2E0D0A <1> db '.',13,10 1656 00003C43 0D0A <1> db 13,10 1657 00003C45 456E746572203F5220- <1> db "Enter ?R to display the recognized register names.",13,10 1657 00003C4E 746F20646973706C61- <1> 1657 00003C57 792074686520726563- <1> 1657 00003C60 6F676E697A65642072- <1> 1657 00003C69 65676973746572206E- <1> 1657 00003C72 616D65732E0D0A <1> 1658 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1659 00003C79 456E746572203F5620- <1> db "Enter ?V to display the recognized variables.",13,10 1659 00003C82 746F20646973706C61- <1> 1659 00003C8B 792074686520726563- <1> 1659 00003C94 6F676E697A65642076- <1> 1659 00003C9D 61726961626C65732E- <1> 1659 00003CA6 0D0A <1> 1660 <1> %endif 1661 00003CA8 00 <1> asciz 1662 <1> %endif 1663 <1> 1664 <1> %if _OPTIONS 1665 <1> .ophelp: 1666 00003CA9 417661696C61626C65- <1> db "Available options: (read/write DCO, read DCS)",13,10 1666 00003CB2 206F7074696F6E733A- <1> 1666 00003CBB 2028726561642F7772- <1> 1666 00003CC4 6974652044434F2C20- <1> 1666 00003CCD 726561642044435329- <1> 1666 00003CD6 0D0A <1> 1667 00003CD8 303030312052583A20- <1> db _4digitshex(dispregs32), " RX: 32-bit register display",13,10 1667 00003CE1 33322D626974207265- <1> 1667 00003CEA 676973746572206469- <1> 1667 00003CF3 73706C61790D0A <1> 1668 00003CFA 3030303220544D3A20- <1> db _4digitshex(traceints), " TM: trace into interrupts",13,10 1668 00003D03 747261636520696E74- <1> 1668 00003D0C 6F20696E7465727275- <1> 1668 00003D15 7074730D0A <1> 1669 00003D1A 3030303420616C6C6F- <1> db _4digitshex(cpdepchars), " allow dumping of CP-dependant characters",13,10 1669 00003D23 772064756D70696E67- <1> 1669 00003D2C 206F662043502D6465- <1> 1669 00003D35 70656E64616E742063- <1> 1669 00003D3E 686172616374657273- <1> 1669 00003D47 0D0A <1> 1670 00003D49 3030303820616C7761- <1> db _4digitshex(fakeindos), " always assume InDOS flag non-zero, to debug DOS or TSRs",13,10 1670 00003D52 797320617373756D65- <1> 1670 00003D5B 20496E444F5320666C- <1> 1670 00003D64 6167206E6F6E2D7A65- <1> 1670 00003D6D 726F2C20746F206465- <1> 1670 00003D76 62756720444F53206F- <1> 1670 00003D7F 7220545352730D0A <1> 1671 00003D87 303031302064697361- <1> db _4digitshex(nonpagingdevice)," disallow paged output to StdOut",13,10 1671 00003D90 6C6C6F772070616765- <1> 1671 00003D99 64206F757470757420- <1> 1671 00003DA2 746F205374644F7574- <1> 1671 00003DAB 0D0A <1> 1672 00003DAD 3030323020616C6C6F- <1> db _4digitshex(pagingdevice), " allow paged output to non-StdOut",13,10 1672 00003DB6 77207061676564206F- <1> 1672 00003DBF 757470757420746F20- <1> 1672 00003DC8 6E6F6E2D5374644F75- <1> 1672 00003DD1 740D0A <1> 1673 00003DD4 303034302064697370- <1> db _4digitshex(hexrn), " display raw hexadecimal content of FPU registers",13,10 1673 00003DDD 6C6179207261772068- <1> 1673 00003DE6 657861646563696D61- <1> 1673 00003DEF 6C20636F6E74656E74- <1> 1673 00003DF8 206F66204650552072- <1> 1673 00003E01 65676973746572730D- <1> 1673 00003E0A 0A <1> 1674 00003E0B 30313030207768656E- <1> db _4digitshex(nondospaging), " when prompting during paging, do not use DOS for input",13,10 1674 00003E14 2070726F6D7074696E- <1> 1674 00003E1D 6720647572696E6720- <1> 1674 00003E26 706167696E672C2064- <1> 1674 00003E2F 6F206E6F7420757365- <1> 1674 00003E38 20444F5320666F7220- <1> 1674 00003E41 696E7075740D0A <1> 1675 00003E48 3032303020646F206E- <1> db _4digitshex(nohlt), " do not execute HLT instruction to idle",13,10 1675 00003E51 6F7420657865637574- <1> 1675 00003E5A 6520484C5420696E73- <1> 1675 00003E63 7472756374696F6E20- <1> 1675 00003E6C 746F2069646C650D0A <1> 1676 00003E75 3034303020646F206E- <1> db _4digitshex(biosidles), " do not idle, the keyboard BIOS idles itself",13,10 1676 00003E7E 6F742069646C652C20- <1> 1676 00003E87 746865206B6579626F- <1> 1676 00003E90 6172642042494F5320- <1> 1676 00003E99 69646C657320697473- <1> 1676 00003EA2 656C660D0A <1> 1677 00003EA7 303830302075736520- <1> db _4digitshex(opt_userawinput)," use rawinput for int 21h interactive input",13,10 1677 00003EB0 726177696E70757420- <1> 1677 00003EB9 666F7220696E742032- <1> 1677 00003EC2 316820696E74657261- <1> 1677 00003ECB 637469766520696E70- <1> 1677 00003ED4 75740D0A <1> 1678 00003ED8 3130303020696E2064- <1> db _4digitshex(use_si_units), " in disp_*_size use SI units (kB = 1000, etc)." 1678 00003EE1 6973705F2A5F73697A- <1> 1678 00003EEA 652075736520534920- <1> 1678 00003EF3 756E69747320286B42- <1> 1678 00003EFC 203D20313030302C20- <1> 1678 00003F05 657463292E <1> 1679 00003F0A 206F76657272696465- <1> db " overrides ",_4digitshex(use_jedec_units),"!",13,10 1679 00003F13 732032303030210D0A <1> 1680 00003F1C 3230303020696E2064- <1> db _4digitshex(use_jedec_units)," in disp_*_size use JEDEC units (KB = 1024)",13,10 1680 00003F25 6973705F2A5F73697A- <1> 1680 00003F2E 6520757365204A4544- <1> 1680 00003F37 454320756E69747320- <1> 1680 00003F40 284B42203D20313032- <1> 1680 00003F49 34290D0A <1> 1681 00003F4D 3430303020656E6162- <1> db _4digitshex(enable_serial), " enable serial I/O (port ",_4digitshex(_UART_BASE),"h interrupt ",_2digitshex(_INTNUM),"h)",13,10 1681 00003F56 6C652073657269616C- <1> 1681 00003F5F 20492F4F2028706F72- <1> 1681 00003F68 742030324638682069- <1> 1681 00003F71 6E7465727275707420- <1> 1681 00003F7A 304268290D0A <1> 1682 00003F80 383030302064697361- <1> db _4digitshex(int8_disable_serial), " disable serial I/O when breaking after 5 seconds Ctrl pressed",13,10 1682 00003F89 626C65207365726961- <1> 1682 00003F92 6C20492F4F20776865- <1> 1682 00003F9B 6E20627265616B696E- <1> 1682 00003FA4 672061667465722035- <1> 1682 00003FAD 207365636F6E647320- <1> 1682 00003FB6 4374726C2070726573- <1> 1682 00003FBF 7365640D0A <1> 1683 00003FC4 303030313030303020- <1> db _8digitshex(gg_do_not_skip_bp), " gg: do not skip a breakpoint (bb or gg)",13,10 1683 00003FCD 67673A20646F206E6F- <1> 1683 00003FD6 7420736B6970206120- <1> 1683 00003FDF 627265616B706F696E- <1> 1683 00003FE8 7420286262206F7220- <1> 1683 00003FF1 6767290D0A <1> 1684 00003FF6 303030323030303020- <1> db _8digitshex(gg_no_autorepeat), " gg: do not auto-repeat",13,10 1684 00003FFF 67673A20646F206E6F- <1> 1684 00004008 74206175746F2D7265- <1> 1684 00004011 706561740D0A <1> 1685 00004017 303030343030303020- <1> db _8digitshex(tp_do_not_skip_bp), " T/TP/P: do not skip a (bb) breakpoint",13,10 1685 00004020 542F54502F503A2064- <1> 1685 00004029 6F206E6F7420736B69- <1> 1685 00004032 702061202862622920- <1> 1685 0000403B 627265616B706F696E- <1> 1685 00004044 740D0A <1> 1686 00004047 303030383030303020- <1> db _8digitshex(gg_bb_hit_no_repeat), " gg: do not auto-repeat after bb hit",13,10 1686 00004050 67673A20646F206E6F- <1> 1686 00004059 74206175746F2D7265- <1> 1686 00004062 706561742061667465- <1> 1686 0000406B 72206262206869740D- <1> 1686 00004074 0A <1> 1687 00004075 303031303030303020- <1> db _8digitshex(tp_bb_hit_no_repeat), " T/TP/P: do not auto-repeat after bb hit",13,10 1687 0000407E 542F54502F503A2064- <1> 1687 00004087 6F206E6F7420617574- <1> 1687 00004090 6F2D72657065617420- <1> 1687 00004099 616674657220626220- <1> 1687 000040A2 6869740D0A <1> 1688 000040A7 303032303030303020- <1> db _8digitshex(gg_unexpected_no_repeat)," gg: do not auto-repeat after unexpectedinterrupt",13,10 1688 000040B0 67673A20646F206E6F- <1> 1688 000040B9 74206175746F2D7265- <1> 1688 000040C2 706561742061667465- <1> 1688 000040CB 7220756E6578706563- <1> 1688 000040D4 746564696E74657272- <1> 1688 000040DD 7570740D0A <1> 1689 000040E2 303034303030303020- <1> db _8digitshex(tp_unexpected_no_repeat)," T/TP/P: do not auto-repeat after unexpectedinterrupt",13,10 1689 000040EB 542F54502F503A2064- <1> 1689 000040F4 6F206E6F7420617574- <1> 1689 000040FD 6F2D72657065617420- <1> 1689 00004106 616674657220756E65- <1> 1689 0000410F 78706563746564696E- <1> 1689 00004118 746572727570740D0A <1> 1690 00004121 303038303030303020- <1> db _8digitshex(ss_no_dump), " S: do not dump data after matches",13,10 1690 0000412A 533A20646F206E6F74- <1> 1690 00004133 2064756D7020646174- <1> 1690 0000413C 61206166746572206D- <1> 1690 00004145 6174636865730D0A <1> 1691 0000414D 313030303030303020- <1> db _8digitshex(rr_disasm_no_rept), " R: do not repeat disassembly",13,10 1691 00004156 523A20646F206E6F74- <1> 1691 0000415F 207265706561742064- <1> 1691 00004168 6973617373656D626C- <1> 1691 00004171 790D0A <1> 1692 00004174 323030303030303020- <1> db _8digitshex(rr_disasm_no_show), " R: do not show memory reference in disassembly",13,10 1692 0000417D 523A20646F206E6F74- <1> 1692 00004186 2073686F77206D656D- <1> 1692 0000418F 6F7279207265666572- <1> 1692 00004198 656E636520696E2064- <1> 1692 000041A1 6973617373656D626C- <1> 1692 000041AA 790D0A <1> 1693 000041AD 343030303030303020- <1> db _8digitshex(opt_cmdline_quiet_input)," quiet command line buffer input",13,10 1693 000041B6 717569657420636F6D- <1> 1693 000041BF 6D616E64206C696E65- <1> 1693 000041C8 206275666665722069- <1> 1693 000041D1 6E7075740D0A <1> 1694 000041D7 383030303030303020- <1> db _8digitshex(opt_cmdline_quiet_output)," quiet command line buffer output",13,10 1694 000041E0 717569657420636F6D- <1> 1694 000041E9 6D616E64206C696E65- <1> 1694 000041F2 20627566666572206F- <1> 1694 000041FB 75747075740D0A <1> 1695 00004202 0D0A <1> db 13,10 1696 00004204 4D6F7265206F707469- <1> db "More options: (read/write DCO2, read DCS2)",13,10 1696 0000420D 6F6E733A2028726561- <1> 1696 00004216 642F77726974652044- <1> 1696 0000421F 434F322C2072656164- <1> 1696 00004228 2044435332290D0A <1> 1697 00004230 303030312044423A20- <1> db _4digitshex(opt2_db_header), " DB: show header",13,10 1697 00004239 73686F772068656164- <1> 1697 00004242 65720D0A <1> 1698 00004246 303030322044423A20- <1> db _4digitshex(opt2_db_trailer)," DB: show trailer",13,10 1698 0000424F 73686F772074726169- <1> 1698 00004258 6C65720D0A <1> 1699 0000425D 303031302044573A20- <1> db _4digitshex(opt2_dw_header), " DW: show header",13,10 1699 00004266 73686F772068656164- <1> 1699 0000426F 65720D0A <1> 1700 00004273 303032302044573A20- <1> db _4digitshex(opt2_dw_trailer)," DW: show trailer",13,10 1700 0000427C 73686F772074726169- <1> 1700 00004285 6C65720D0A <1> 1701 0000428A 303130302044443A20- <1> db _4digitshex(opt2_dd_header), " DD: show header",13,10 1701 00004293 73686F772068656164- <1> 1701 0000429C 65720D0A <1> 1702 000042A0 303230302044443A20- <1> db _4digitshex(opt2_dd_trailer)," DD: show trailer",13,10 1702 000042A9 73686F772074726169- <1> 1702 000042B2 6C65720D0A <1> 1703 000042B7 303830302075736520- <1> db _4digitshex(opt2_rawinput_dpmi)," use rawinput for int 21h interactive input in DPMI",13,10 1703 000042C0 726177696E70757420- <1> 1703 000042C9 666F7220696E742032- <1> 1703 000042D2 316820696E74657261- <1> 1703 000042DB 637469766520696E70- <1> 1703 000042E4 757420696E2044504D- <1> 1703 000042ED 490D0A <1> 1704 000042F0 3130303020483A2073- <1> db _4digitshex(opt2_hh_compat), " H: stay compatible to MS-DOS Debug",13,10 1704 000042F9 74617920636F6D7061- <1> 1704 00004302 7469626C6520746F20- <1> 1704 0000430B 4D532D444F53204465- <1> 1704 00004314 6275670D0A <1> 1705 00004319 323030302069646C65- <1> db _4digitshex(opt2_getc_idle), " idle and check for Ctrl-C in getc",13,10 1705 00004322 20616E642063686563- <1> 1705 0000432B 6B20666F7220437472- <1> 1705 00004334 6C2D4320696E206765- <1> 1705 0000433D 74630D0A <1> 1706 00004341 343030302069646C65- <1> db _4digitshex(opt2_getc_idle_dpmi)," idle and check for Ctrl-C in getc in DPMI",13,10 1706 0000434A 20616E642063686563- <1> 1706 00004353 6B20666F7220437472- <1> 1706 0000435C 6C2D4320696E206765- <1> 1706 00004365 746320696E2044504D- <1> 1706 0000436E 490D0A <1> 1707 00004371 3830303020542F5450- <1> db _4digitshex(opt2_re_cancel_tpg)," T/TP/P/G: cancel run after RE command buffer execution",13,10 1707 0000437A 2F502F473A2063616E- <1> 1707 00004383 63656C2072756E2061- <1> 1707 0000438C 667465722052452063- <1> 1707 00004395 6F6D6D616E64206275- <1> 1707 0000439E 666665722065786563- <1> 1707 000043A7 7574696F6E0D0A <1> 1708 000043AE 0D0A <1> db 13,10 1709 000043B0 4D6F7265206F707469- <1> db "More options: (read/write DCO3, read DCS3)",13,10 1709 000043B9 6F6E733A2028726561- <1> 1709 000043C2 642F77726974652044- <1> 1709 000043CB 434F332C2072656164- <1> 1709 000043D4 2044435333290D0A <1> 1710 000043DC 3030303120543A2064- <1> db _4digitshex(opt3_tt_no_paging)," T: do not page output",13,10 1710 000043E5 6F206E6F7420706167- <1> 1710 000043EE 65206F75747075740D- <1> 1710 000043F7 0A <1> 1711 000043F8 303030322054503A20- <1> db _4digitshex(opt3_tp_no_paging)," TP: do not page output",13,10 1711 00004401 646F206E6F74207061- <1> 1711 0000440A 6765206F7574707574- <1> 1711 00004413 0D0A <1> 1712 00004415 3030303420503A2064- <1> db _4digitshex(opt3_pp_no_paging)," P: do not page output",13,10 1712 0000441E 6F206E6F7420706167- <1> 1712 00004427 65206F75747075740D- <1> 1712 00004430 0A <1> 1713 00004431 3030303820473A2064- <1> db _4digitshex(opt3_gg_no_paging)," G: do not page output",13,10 1713 0000443A 6F206E6F7420706167- <1> 1713 00004443 65206F75747075740D- <1> 1713 0000444C 0A <1> 1714 0000444D 3031303020542F5450- <1> db _4digitshex(opt3_silence_paging_set), " T/TP/P: modify paging for silent dump",13,10 1714 00004456 2F503A206D6F646966- <1> 1714 0000445F 7920706167696E6720- <1> 1714 00004468 666F722073696C656E- <1> 1714 00004471 742064756D700D0A <1> 1715 00004479 3032303020542F5450- <1> db _4digitshex(opt3_silence_paging_on), " T/TP/P: if ",_4digitshex(opt3_silence_paging_set)," set: turn paging on, else off",13,10 1715 00004482 2F503A206966203031- <1> 1715 0000448B 3030207365743A2074- <1> 1715 00004494 75726E20706167696E- <1> 1715 0000449D 67206F6E2C20656C73- <1> 1715 000044A6 65206F66660D0A <1> 1716 000044AD 30313030303020523A- <1> db _6digitshex(opt3_r_highlight_diff), " R: highlight changed digits (needs ANSI for DOS output)",13,10 1716 000044B6 20686967686C696768- <1> 1716 000044BF 74206368616E676564- <1> 1716 000044C8 206469676974732028- <1> 1716 000044D1 6E6565647320414E53- <1> 1716 000044DA 4920666F7220444F53- <1> 1716 000044E3 206F7574707574290D- <1> 1716 000044EC 0A <1> 1717 000044ED 30323030303020523A- <1> db _6digitshex(opt3_r_highlight_dumb), " R: highlight escape sequences to int 10h, else video attributes",13,10 1717 000044F6 20686967686C696768- <1> 1717 000044FF 742065736361706520- <1> 1717 00004508 73657175656E636573- <1> 1717 00004511 20746F20696E742031- <1> 1717 0000451A 30682C20656C736520- <1> 1717 00004523 766964656F20617474- <1> 1717 0000452C 726962757465730D0A <1> 1718 00004535 30343030303020523A- <1> db _6digitshex(opt3_r_highlight_full), " R: highlight changed registers (overrides ",_6digitshex(opt3_r_highlight_diff),")",13,10 1718 0000453E 20686967686C696768- <1> 1718 00004547 74206368616E676564- <1> 1718 00004550 207265676973746572- <1> 1718 00004559 7320286F7665727269- <1> 1718 00004562 646573203031303030- <1> 1718 0000456B 30290D0A <1> 1719 0000456F 30383030303020523A- <1> db _6digitshex(opt3_r_highlight_eip), " R: include highlighting of EIP",13,10 1719 00004578 20696E636C75646520- <1> 1719 00004581 686967686C69676874- <1> 1719 0000458A 696E67206F66204549- <1> 1719 00004593 500D0A <1> 1720 00004596 303230303030303020- <1> db _8digitshex(opt3_no_idle_2F), " do not call int 2F.1680 for idling",13,10 1720 0000459F 646F206E6F74206361- <1> 1720 000045A8 6C6C20696E74203246- <1> 1720 000045B1 2E3136383020666F72- <1> 1720 000045BA 2069646C696E670D0A <1> 1721 <1> %if _DELAY_BEFORE_BP 1722 000045C3 303430303030303020- <1> db _8digitshex(opt3_delay_before_bp), " delay for a tick before writing breakpoints",13,10 1722 000045CC 64656C617920666F72- <1> 1722 000045D5 2061207469636B2062- <1> 1722 000045DE 65666F726520777269- <1> 1722 000045E7 74696E672062726561- <1> 1722 000045F0 6B706F696E74730D0A <1> 1723 <1> %endif 1724 000045F9 303830303030303020- <1> db _8digitshex(opt3_no_call_update), " do not call other lDebug instance's Update IISP Header call",13,10 1724 00004602 646F206E6F74206361- <1> 1724 0000460B 6C6C206F7468657220- <1> 1724 00004614 6C446562756720696E- <1> 1724 0000461D 7374616E6365277320- <1> 1724 00004626 557064617465204949- <1> 1724 0000462F 535020486561646572- <1> 1724 00004638 2063616C6C0D0A <1> 1725 0000463F 313030303030303020- <1> db _8digitshex(opt3_disable_autorepeat), " disable auto-repeat",13,10 1725 00004648 64697361626C652061- <1> 1725 00004651 75746F2D7265706561- <1> 1725 0000465A 740D0A <1> 1726 0000465D 323030303030303020- <1> db _8digitshex(opt3_check_ctrlc_keyb), " check int 16h buffer for Control-C if inputting from int 16h",13,10 1726 00004666 636865636B20696E74- <1> 1726 0000466F 203136682062756666- <1> 1726 00004678 657220666F7220436F- <1> 1726 00004681 6E74726F6C2D432069- <1> 1726 0000468A 6620696E7075747469- <1> 1726 00004693 6E672066726F6D2069- <1> 1726 0000469C 6E74203136680D0A <1> 1727 000046A4 343030303030303020- <1> db _8digitshex(opt3_check_ctrlc_0bh), " call DOS service 0Bh to check for Control-C",13,10 1727 000046AD 63616C6C20444F5320- <1> 1727 000046B6 736572766963652030- <1> 1727 000046BF 426820746F20636865- <1> 1727 000046C8 636B20666F7220436F- <1> 1727 000046D1 6E74726F6C2D430D0A <1> 1728 000046DA 383030303030303020- <1> db _8digitshex(opt3_tsr_quit_leave_tf), " when Q command is used while TSR, leave TF as is",13,10 1728 000046E3 7768656E205120636F- <1> 1728 000046EC 6D6D616E6420697320- <1> 1728 000046F5 75736564207768696C- <1> 1728 000046FE 65205453522C206C65- <1> 1728 00004707 617665205446206173- <1> 1728 00004710 2069730D0A <1> 1729 00004715 0D0A <1> db 13,10 1730 00004717 4D6F7265206F707469- <1> db "More options: (read/write DCO4, read DCS4)",13,10 1730 00004720 6F6E733A2028726561- <1> 1730 00004729 642F77726974652044- <1> 1730 00004732 434F342C2072656164- <1> 1730 0000473B 2044435334290D0A <1> 1731 <1> %if _PM 1732 00004743 3030303220656E6162- <1> db _4digitshex(opt4_int_2F_hook)," enable interrupt 2Fh hook while in 86 Mode",13,10 1732 0000474C 6C6520696E74657272- <1> 1732 00004755 757074203246682068- <1> 1732 0000475E 6F6F6B207768696C65- <1> 1732 00004767 20696E203836204D6F- <1> 1732 00004770 64650D0A <1> 1733 <1> %endif 1734 00004774 3030303420656E6162- <1> db _4digitshex(opt4_int_08_hook)," enable interrupt 8 hook",13,10 1734 0000477D 6C6520696E74657272- <1> 1734 00004786 757074203820686F6F- <1> 1734 0000478F 6B0D0A <1> 1735 00004792 3030303820656E6162- <1> db _4digitshex(opt4_int_2D_hook)," enable interrupt 2Dh hook",13,10 1735 0000479B 6C6520696E74657272- <1> 1735 000047A4 757074203244682068- <1> 1735 000047AD 6F6F6B0D0A <1> 1736 000047B2 303030313030303020- <1> db _8digitshex(opt4_int_serial_force)," force serial interrupt unhooking",13,10 1736 000047BB 666F72636520736572- <1> 1736 000047C4 69616C20696E746572- <1> 1736 000047CD 7275707420756E686F- <1> 1736 000047D6 6F6B696E670D0A <1> 1737 <1> %if _PM 1738 000047DD 303030323030303020- <1> db _8digitshex(opt4_int_2F_force)," force interrupt 2Fh unhooking",13,10 1738 000047E6 666F72636520696E74- <1> 1738 000047EF 657272757074203246- <1> 1738 000047F8 6820756E686F6F6B69- <1> 1738 00004801 6E670D0A <1> 1739 <1> %endif 1740 00004805 303030343030303020- <1> db _8digitshex(opt4_int_08_force)," force interrupt 8 unhooking",13,10 1740 0000480E 666F72636520696E74- <1> 1740 00004817 657272757074203820- <1> 1740 00004820 756E686F6F6B696E67- <1> 1740 00004829 0D0A <1> 1741 0000482B 303030383030303020- <1> db _8digitshex(opt4_int_2D_force)," force interrupt 2Dh unhooking",13,10 1741 00004834 666F72636520696E74- <1> 1741 0000483D 657272757074203244- <1> 1741 00004846 6820756E686F6F6B69- <1> 1741 0000484F 6E670D0A <1> 1742 00004853 303130303030303020- <1> db _8digitshex(opt4_int_00_force)," force interrupt 0 unhooking",13,10 1742 0000485C 666F72636520696E74- <1> 1742 00004865 657272757074203020- <1> 1742 0000486E 756E686F6F6B696E67- <1> 1742 00004877 0D0A <1> 1743 00004879 303230303030303020- <1> db _8digitshex(opt4_int_01_force)," force interrupt 1 unhooking",13,10 1743 00004882 666F72636520696E74- <1> 1743 0000488B 657272757074203120- <1> 1743 00004894 756E686F6F6B696E67- <1> 1743 0000489D 0D0A <1> 1744 0000489F 303430303030303020- <1> db _8digitshex(opt4_int_03_force)," force interrupt 3 unhooking",13,10 1744 000048A8 666F72636520696E74- <1> 1744 000048B1 657272757074203320- <1> 1744 000048BA 756E686F6F6B696E67- <1> 1744 000048C3 0D0A <1> 1745 000048C5 303830303030303020- <1> db _8digitshex(opt4_int_06_force)," force interrupt 6 unhooking",13,10 1745 000048CE 666F72636520696E74- <1> 1745 000048D7 657272757074203620- <1> 1745 000048E0 756E686F6F6B696E67- <1> 1745 000048E9 0D0A <1> 1746 000048EB 313030303030303020- <1> db _8digitshex(opt4_int_18_force)," force interrupt 18h unhooking",13,10 1746 000048F4 666F72636520696E74- <1> 1746 000048FD 657272757074203138- <1> 1746 00004906 6820756E686F6F6B69- <1> 1746 0000490F 6E670D0A <1> 1747 00004913 323030303030303020- <1> db _8digitshex(opt4_int_19_force)," force interrupt 19h unhooking",13,10 1747 0000491C 666F72636520696E74- <1> 1747 00004925 657272757074203139- <1> 1747 0000492E 6820756E686F6F6B69- <1> 1747 00004937 6E670D0A <1> 1748 0000493B 0D0A <1> db 13,10 1749 0000493D 496E7465726E616C20- <1> db "Internal flags: (read DIF)",13,10 1749 00004946 666C6167733A202872- <1> 1749 0000494F 65616420444946290D- <1> 1749 00004958 0A <1> 1750 00004959 30303030303120496E- <1> db _6digitshex(oldpacket), " Int25/Int26 packet method available",13,10 1750 00004962 7432352F496E743236- <1> 1750 0000496B 207061636B6574206D- <1> 1750 00004974 6574686F6420617661- <1> 1750 0000497D 696C61626C650D0A <1> 1751 00004985 30303030303220496E- <1> db _6digitshex(newpacket), " Int21.7305 packet method available",13,10 1751 0000498E 7432312E3733303520- <1> 1751 00004997 7061636B6574206D65- <1> 1751 000049A0 74686F642061766169- <1> 1751 000049A9 6C61626C650D0A <1> 1752 <1> %if _VDD 1753 000049B0 303030303034205644- <1> db _6digitshex(ntpacket), " VDD registered and usable",13,10 1753 000049B9 442072656769737465- <1> 1753 000049C2 72656420616E642075- <1> 1753 000049CB 7361626C650D0A <1> 1754 <1> %endif 1755 000049D2 30303030303820696E- <1> db _6digitshex(pagedcommand), " internal flag for paged output",13,10 1755 000049DB 7465726E616C20666C- <1> 1755 000049E4 616720666F72207061- <1> 1755 000049ED 676564206F75747075- <1> 1755 000049F6 740D0A <1> 1756 000049F9 303030303130204445- <1> db _6digitshex(notstdinput), " DEBUG's input isn't StdIn",13,10 1756 00004A02 425547277320696E70- <1> 1756 00004A0B 75742069736E277420- <1> 1756 00004A14 537464496E0D0A <1> 1757 00004A1B 303030303230204445- <1> db _6digitshex(inputfile), " DEBUG's input is a file",13,10 1757 00004A24 425547277320696E70- <1> 1757 00004A2D 757420697320612066- <1> 1757 00004A36 696C650D0A <1> 1758 00004A3B 303030303430204445- <1> db _6digitshex(notstdoutput), " DEBUG's output isn't StdOut",13,10 1758 00004A44 4255472773206F7574- <1> 1758 00004A4D 7075742069736E2774- <1> 1758 00004A56 205374644F75740D0A <1> 1759 00004A5F 303030303830204445- <1> db _6digitshex(outputfile), " DEBUG's output is a file",13,10 1759 00004A68 4255472773206F7574- <1> 1759 00004A71 707574206973206120- <1> 1759 00004A7A 66696C650D0A <1> 1760 <1> %if _PM 1761 00004A80 30303031303020496E- <1> db _6digitshex(hooked2F), " Int2F.1687 hooked",13,10 1761 00004A89 7432462E3136383720- <1> 1761 00004A92 686F6F6B65640D0A <1> 1762 00004A9A 30303032303020496E- <1> db _6digitshex(nohook2F), " Int2F.1687 won't be hooked",13,10 1762 00004AA3 7432462E3136383720- <1> 1762 00004AAC 776F6E277420626520- <1> 1762 00004AB5 686F6F6B65640D0A <1> 1763 00004ABD 30303034303020646F- <1> db _6digitshex(dpminohlt), " do not execute HLT to idle in PM",13,10 1763 00004AC6 206E6F742065786563- <1> 1763 00004ACF 75746520484C542074- <1> 1763 00004AD8 6F2069646C6520696E- <1> 1763 00004AE1 20504D0D0A <1> 1764 00004AE6 30303038303020696E- <1> db _6digitshex(protectedmode), " in protected mode",13,10 1764 00004AEF 2070726F7465637465- <1> 1764 00004AF8 64206D6F64650D0A <1> 1765 <1> %endif 1766 00004B00 303031303030207374- <1> db _6digitshex(debuggeeA20), " state of debuggee's A20",13,10 1766 00004B09 617465206F66206465- <1> 1766 00004B12 627567676565277320- <1> 1766 00004B1B 4132300D0A <1> 1767 00004B20 303032303030207374- <1> db _6digitshex(debuggerA20), " state of debugger's A20 (not implemented: same as previous)",13,10 1767 00004B29 617465206F66206465- <1> 1767 00004B32 627567676572277320- <1> 1767 00004B3B 41323020286E6F7420- <1> 1767 00004B44 696D706C656D656E74- <1> 1767 00004B4D 65643A2073616D6520- <1> 1767 00004B56 61732070726576696F- <1> 1767 00004B5F 7573290D0A <1> 1768 <1> %if _BOOTLDR 1769 00004B64 303034303030206465- <1> db _6digitshex(nodosloaded), " debugger booted independent of a DOS",13,10 1769 00004B6D 62756767657220626F- <1> 1769 00004B76 6F74656420696E6465- <1> 1769 00004B7F 70656E64656E74206F- <1> 1769 00004B88 66206120444F530D0A <1> 1770 <1> %endif 1771 00004B91 303038303030204350- <1> db _6digitshex(has386), " CPU is at least a 386 (32-bit CPU)",13,10 1771 00004B9A 55206973206174206C- <1> 1771 00004BA3 656173742061203338- <1> 1771 00004BAC 36202833322D626974- <1> 1771 00004BB5 20435055290D0A <1> 1772 00004BBC 30313030303020696E- <1> db _6digitshex(usecharcounter), " internal flag for tab output processing",13,10 1772 00004BC5 7465726E616C20666C- <1> 1772 00004BCE 616720666F72207461- <1> 1772 00004BD7 62206F757470757420- <1> 1772 00004BE0 70726F63657373696E- <1> 1772 00004BE9 670D0A <1> 1773 <1> %if _VDD 1774 00004BEC 303230303030207275- <1> db _6digitshex(runningnt), " running inside NTVDM",13,10 1774 00004BF5 6E6E696E6720696E73- <1> 1774 00004BFE 696465204E5456444D- <1> 1774 00004C07 0D0A <1> 1775 <1> %endif 1776 <1> %if _PM 1777 00004C09 303430303030204450- <1> db _6digitshex(canswitchmode), " DPMI raw mode switch usable to set breakpoints",13,10 1777 00004C12 4D4920726177206D6F- <1> 1777 00004C1B 646520737769746368- <1> 1777 00004C24 20757361626C652074- <1> 1777 00004C2D 6F2073657420627265- <1> 1777 00004C36 616B706F696E74730D- <1> 1777 00004C3F 0A <1> 1778 00004C40 30383030303020696E- <1> db _6digitshex(modeswitched), " internal flag for mode switching",13,10 1778 00004C49 7465726E616C20666C- <1> 1778 00004C52 616720666F72206D6F- <1> 1778 00004C5B 646520737769746368- <1> 1778 00004C64 696E670D0A <1> 1779 <1> %endif 1780 00004C69 31303030303020696E- <1> db _6digitshex(promptwaiting), " internal flag for paged output",13,10 1780 00004C72 7465726E616C20666C- <1> 1780 00004C7B 616720666F72207061- <1> 1780 00004C84 676564206F75747075- <1> 1780 00004C8D 740D0A <1> 1781 <1> %if _PM 1782 00004C90 32303030303020696E- <1> db _6digitshex(switchbuffer), " internal flag for mode switching",13,10 1782 00004C99 7465726E616C20666C- <1> 1782 00004CA2 616720666F72206D6F- <1> 1782 00004CAB 646520737769746368- <1> 1782 00004CB4 696E670D0A <1> 1783 <1> %endif 1784 <1> %if _TSR 1785 00004CB9 34303030303020696E- <1> db _6digitshex(tsrmode), " in TSR mode (detached debugger process)",13,10 1785 00004CC2 20545352206D6F6465- <1> 1785 00004CCB 202864657461636865- <1> 1785 00004CD4 642064656275676765- <1> 1785 00004CDD 722070726F63657373- <1> 1785 00004CE6 290D0A <1> 1786 <1> %endif 1787 <1> %if _DOSEMU 1788 00004CE9 303130303030303020- <1> db _8digitshex(runningdosemu), " running inside dosemu",13,10 1788 00004CF2 72756E6E696E672069- <1> 1788 00004CFB 6E7369646520646F73- <1> 1788 00004D04 656D750D0A <1> 1789 <1> %endif 1790 00004D09 3034303030303030 <1> db _8digitshex(tt_while) 1791 00004D11 20542F54502F503A20- <1> db " T/TP/P: while condition specified",13,10 1791 00004D1A 7768696C6520636F6E- <1> 1791 00004D23 646974696F6E207370- <1> 1791 00004D2C 656369666965640D0A <1> 1792 00004D35 3038303030303030 <1> db _8digitshex(tt_p) 1793 00004D3D 2054503A2050207370- <1> db " TP: P specified (proceed past string ops)",13,10 1793 00004D46 656369666965642028- <1> 1793 00004D4F 70726F636565642070- <1> 1793 00004D58 61737420737472696E- <1> 1793 00004D61 67206F7073290D0A <1> 1794 00004D69 3130303030303030 <1> db _8digitshex(tt_silent_mode) 1795 00004D71 20542F54502F503A20- <1> db " T/TP/P: silent mode (SILENT specified)",13,10 1795 00004D7A 73696C656E74206D6F- <1> 1795 00004D83 6465202853494C454E- <1> 1795 00004D8C 542073706563696669- <1> 1795 00004D95 6564290D0A <1> 1796 00004D9A 3230303030303030 <1> db _8digitshex(tt_silence) 1797 00004DA2 20542F54502F503A20- <1> db " T/TP/P: silent mode is active, writing to silent buffer",13,10 1797 00004DAB 73696C656E74206D6F- <1> 1797 00004DB4 646520697320616374- <1> 1797 00004DBD 6976652C2077726974- <1> 1797 00004DC6 696E6720746F207369- <1> 1797 00004DCF 6C656E742062756666- <1> 1797 00004DD8 65720D0A <1> 1798 00004DDC 0D0A <1> db 13,10 1799 00004DDE 417661696C61626C65- <1> db "Available assembler/disassembler options: (read/write DAO, read DAS)",13,10 1799 00004DE7 20617373656D626C65- <1> 1799 00004DF0 722F64697361737365- <1> 1799 00004DF9 6D626C6572206F7074- <1> 1799 00004E02 696F6E733A20287265- <1> 1799 00004E0B 61642F777269746520- <1> 1799 00004E14 44414F2C2072656164- <1> 1799 00004E1D 20444153290D0A <1> 1800 00004E24 303120446973617373- <1> db _2digitshex(disasm_lowercase), " Disassembler: lowercase output",13,10 1800 00004E2D 656D626C65723A206C- <1> 1800 00004E36 6F7765726361736520- <1> 1800 00004E3F 6F75747075740D0A <1> 1801 00004E47 303220446973617373- <1> db _2digitshex(disasm_commablank)," Disassembler: output blank behind comma",13,10 1801 00004E50 656D626C65723A206F- <1> 1801 00004E59 757470757420626C61- <1> 1801 00004E62 6E6B20626568696E64- <1> 1801 00004E6B 20636F6D6D610D0A <1> 1802 00004E73 303420446973617373- <1> db _2digitshex(disasm_nasm), " Disassembler: output addresses in NASM syntax",13,10 1802 00004E7C 656D626C65723A206F- <1> 1802 00004E85 757470757420616464- <1> 1802 00004E8E 72657373657320696E- <1> 1802 00004E97 204E41534D2073796E- <1> 1802 00004EA0 7461780D0A <1> 1803 00004EA5 3038 <1> db _2digitshex(disasm_lowercase_refmem) 1804 00004EA7 20446973617373656D- <1> db " Disassembler: lowercase referenced memory location segreg",13,10 1804 00004EB0 626C65723A206C6F77- <1> 1804 00004EB9 657263617365207265- <1> 1804 00004EC2 666572656E63656420- <1> 1804 00004ECB 6D656D6F7279206C6F- <1> 1804 00004ED4 636174696F6E207365- <1> 1804 00004EDD 677265670D0A <1> 1805 00004EE3 313020446973617373- <1> db _2digitshex(disasm_show_short)," Disassembler: always show SHORT keyword",13,10 1805 00004EEC 656D626C65723A2061- <1> 1805 00004EF5 6C776179732073686F- <1> 1805 00004EFE 772053484F5254206B- <1> 1805 00004F07 6579776F72640D0A <1> 1806 00004F0F 323020446973617373- <1> db _2digitshex(disasm_show_near), " Disassembler: always show NEAR keyword",13,10 1806 00004F18 656D626C65723A2061- <1> 1806 00004F21 6C776179732073686F- <1> 1806 00004F2A 77204E454152206B65- <1> 1806 00004F33 79776F72640D0A <1> 1807 00004F3A 343020446973617373- <1> db _2digitshex(disasm_show_far), " Disassembler: always show FAR keyword",13,10 1807 00004F43 656D626C65723A2061- <1> 1807 00004F4C 6C776179732073686F- <1> 1807 00004F55 7720464152206B6579- <1> 1807 00004F5E 776F72640D0A <1> 1808 00004F64 00 <1> asciz 1809 <1> %endif 1810 <1> 1811 <1> %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1812 <1> .varhelp: 1813 00004F65 417661696C61626C65- <1> db "Available " 1813 00004F6E 20 <1> 1814 <1> %if _PSPVARIABLES && !(_VARIABLES || _OPTIONS) 1815 <1> db "read-only " 1816 <1> %endif 1817 00004F6F 6C4465627567207661- <1> db "lDebug variables:",13,10 1817 00004F78 726961626C65733A0D- <1> 1817 00004F81 0A <1> 1818 <1> %if _VARIABLES 1819 00004F82 56302E2E5646095573- <1> db "V0..VF",9,"User-specified usage",13,10 1819 00004F8B 65722D737065636966- <1> 1819 00004F94 696564207573616765- <1> 1819 00004F9D 0D0A <1> 1820 <1> %endif 1821 <1> %if _OPTIONS 1822 00004F9F 44434F094465627567- <1> db "DCO",9,"Debugger Common Options",13,10 1822 00004FA8 67657220436F6D6D6F- <1> 1822 00004FB1 6E204F7074696F6E73- <1> 1822 00004FBA 0D0A <1> 1823 00004FBC 44414F094465627567- <1> db "DAO",9,"Debugger Assembler/disassembler Options",13,10 1823 00004FC5 67657220417373656D- <1> 1823 00004FCE 626C65722F64697361- <1> 1823 00004FD7 7373656D626C657220- <1> 1823 00004FE0 4F7074696F6E730D0A <1> 1824 <1> %endif 1825 <1> %if _OPTIONS || _PSPVARIABLES && (_OPTIONS || _VARIABLES) 1826 00004FE9 2054686520666F6C6C- <1> db " The following variables cannot be written:",13,10 1826 00004FF2 6F77696E6720766172- <1> 1826 00004FFB 6961626C6573206361- <1> 1826 00005004 6E6E6F742062652077- <1> 1826 0000500D 72697474656E3A0D0A <1> 1827 <1> %endif 1828 <1> %if _PSPVARIABLES 1829 00005016 505350094465627567- <1> db "PSP",9,"Debuggee Process" 1829 0000501F 6765652050726F6365- <1> 1829 00005028 7373 <1> 1830 <1> %if _PM 1831 0000502A 20286173207265616C- <1> db " (as real mode segment)" 1831 00005033 206D6F646520736567- <1> 1831 0000503C 6D656E7429 <1> 1832 <1> %endif 1833 00005041 0D0A <1> db 13,10 1834 00005043 505052094465627567- <1> db "PPR",9,"Debuggee's Parent Process",13,10 1834 0000504C 676565277320506172- <1> 1834 00005055 656E742050726F6365- <1> 1834 0000505E 73730D0A <1> 1835 00005062 505049094465627567- <1> db "PPI",9,"Debuggee's Parent Process Interrupt 22h",13,10 1835 0000506B 676565277320506172- <1> 1835 00005074 656E742050726F6365- <1> 1835 0000507D 737320496E74657272- <1> 1835 00005086 757074203232680D0A <1> 1836 <1> %endif 1837 <1> %if _OPTIONS 1838 0000508F 444946094465627567- <1> db "DIF",9,"Debugger Internal Flags",13,10 1838 00005098 67657220496E746572- <1> 1838 000050A1 6E616C20466C616773- <1> 1838 000050AA 0D0A <1> 1839 000050AC 444353094465627567- <1> db "DCS",9,"Debugger Common Startup options",13,10 1839 000050B5 67657220436F6D6D6F- <1> 1839 000050BE 6E2053746172747570- <1> 1839 000050C7 206F7074696F6E730D- <1> 1839 000050D0 0A <1> 1840 000050D1 444153094465627567- <1> db "DAS",9,"Debugger Assembler/disassembler Startup options",13,10 1840 000050DA 67657220417373656D- <1> 1840 000050E3 626C65722F64697361- <1> 1840 000050EC 7373656D626C657220- <1> 1840 000050F5 53746172747570206F- <1> 1840 000050FE 7074696F6E730D0A <1> 1841 00005106 445052094465627567- <1> db "DPR",9,"Debugger Process" 1841 0000510F 6765722050726F6365- <1> 1841 00005118 7373 <1> 1842 <1> %if _PM 1843 0000511A 20286173205265616C- <1> db " (as Real mode segment)",13,10 1843 00005123 206D6F646520736567- <1> 1843 0000512C 6D656E74290D0A <1> 1844 00005133 445053094465627567- <1> db "DPS",9,"Debugger Process Selector (zero in real mode)" 1844 0000513C 6765722050726F6365- <1> 1844 00005145 73732053656C656374- <1> 1844 0000514E 6F7220287A65726F20- <1> 1844 00005157 696E207265616C206D- <1> 1844 00005160 6F646529 <1> 1845 <1> %endif 1846 00005164 0D0A <1> db 13,10 1847 00005166 445050094465627567- <1> db "DPP",9,"Debugger's Parent Process" 1847 0000516F 676572277320506172- <1> 1847 00005178 656E742050726F6365- <1> 1847 00005181 7373 <1> 1848 <1> %if _TSR 1849 00005183 20287A65726F20696E- <1> db " (zero in TSR mode)" 1849 0000518C 20545352206D6F6465- <1> 1849 00005195 29 <1> 1850 <1> %endif 1851 00005196 0D0A <1> db 13,10 1852 00005198 445049094465627567- <1> db "DPI",9,"Debugger's Parent process Interrupt 22h" 1852 000051A1 676572277320506172- <1> 1852 000051AA 656E742070726F6365- <1> 1852 000051B3 737320496E74657272- <1> 1852 000051BC 75707420323268 <1> 1853 <1> %if _TSR 1854 000051C3 20287A65726F20696E- <1> db " (zero in TSR mode)" 1854 000051CC 20545352206D6F6465- <1> 1854 000051D5 29 <1> 1855 <1> %endif 1856 000051D6 0D0A <1> db 13,10 1857 000051D8 0D0A <1> db 13,10 1858 000051DA 456E746572203F4F20- <1> db "Enter ?O to display the options and internal flags.",13,10 1858 000051E3 746F20646973706C61- <1> 1858 000051EC 7920746865206F7074- <1> 1858 000051F5 696F6E7320616E6420- <1> 1858 000051FE 696E7465726E616C20- <1> 1858 00005207 666C6167732E0D0A <1> 1859 <1> %endif 1860 0000520F 00 <1> asciz 1861 <1> %endif 1862 <1> %if _BOOTLDR 1863 <1> .boothelp: 1864 00005210 426F6F74206C6F6164- <1> db "Boot loading commands:",13,10 1864 00005219 696E6720636F6D6D61- <1> 1864 00005222 6E64733A0D0A <1> 1865 00005228 424F4F54204C495354- <1> db "BOOT LIST HDA",13,10 1865 00005231 204844410D0A <1> 1866 00005237 424F4F542044495220- <1> db "BOOT DIR [partition] [dirname]",13,10 1866 00005240 5B706172746974696F- <1> 1866 00005249 6E5D205B6469726E61- <1> 1866 00005252 6D655D0D0A <1> 1867 00005257 424F4F542052454144- <1> db "BOOT READ|WRITE [partition] segment [[HIDDEN=sector] sector] [count]",13,10 1867 00005260 7C5752495445205B70- <1> 1867 00005269 6172746974696F6E5D- <1> 1867 00005272 207365676D656E7420- <1> 1867 0000527B 5B5B48494444454E3D- <1> 1867 00005284 736563746F725D2073- <1> 1867 0000528D 6563746F725D205B63- <1> 1867 00005296 6F756E745D0D0A <1> 1868 <1> %if _DOSEMU 1869 0000529D 424F4F542051554954- <1> db "BOOT QUIT",9,"[exits dosemu or shuts down using APM]",13,10 1869 000052A6 095B65786974732064- <1> 1869 000052AF 6F73656D75206F7220- <1> 1869 000052B8 736875747320646F77- <1> 1869 000052C1 6E207573696E672041- <1> 1869 000052CA 504D5D0D0A <1> 1870 <1> %else 1871 <1> db "BOOT QUIT",9,"[shuts down using APM]",13,10 1872 <1> %endif 1873 000052CF 424F4F54205B50524F- <1> db "BOOT [PROTOCOL=SECTOR] partition",13,10 1873 000052D8 544F434F4C3D534543- <1> 1873 000052E1 544F525D2070617274- <1> 1873 000052EA 6974696F6E0D0A <1> 1874 000052F1 424F4F542050524F54- <1> db "BOOT PROTOCOL=proto [opt] [partition] [filename1] [filename2] [cmdline]",13,10 1874 000052FA 4F434F4C3D70726F74- <1> 1874 00005303 6F205B6F70745D205B- <1> 1874 0000530C 706172746974696F6E- <1> 1874 00005315 5D205B66696C656E61- <1> 1874 0000531E 6D65315D205B66696C- <1> 1874 00005327 656E616D65325D205B- <1> 1874 00005330 636D646C696E655D0D- <1> 1874 00005339 0A <1> 1875 0000533A 0974686520666F6C6C- <1> db 9,"the following partitions may be specified:",13,10 1875 00005343 6F77696E6720706172- <1> 1875 0000534C 746974696F6E73206D- <1> 1875 00005355 617920626520737065- <1> 1875 0000535E 6369666965643A0D0A <1> 1876 00005367 09204844416E756D09- <1> db 9," HDAnum",9,"first hard disk, num = partition (1-4 primary, 5+ logical)",13,10 1876 00005370 666972737420686172- <1> 1876 00005379 64206469736B2C206E- <1> 1876 00005382 756D203D2070617274- <1> 1876 0000538B 6974696F6E2028312D- <1> 1876 00005394 34207072696D617279- <1> 1876 0000539D 2C20352B206C6F6769- <1> 1876 000053A6 63616C290D0A <1> 1877 000053AC 09204844426E756D09- <1> db 9," HDBnum",9,"second hard disk (etc), num = partition",13,10 1877 000053B5 7365636F6E64206861- <1> 1877 000053BE 7264206469736B2028- <1> 1877 000053C7 657463292C206E756D- <1> 1877 000053D0 203D20706172746974- <1> 1877 000053D9 696F6E0D0A <1> 1878 000053DE 092048444109666972- <1> db 9," HDA",9,"first hard disk (only valid for READ|WRITE|PROTOCOL=SECTOR)",13,10 1878 000053E7 737420686172642064- <1> 1878 000053F0 69736B20286F6E6C79- <1> 1878 000053F9 2076616C696420666F- <1> 1878 00005402 7220524541447C5752- <1> 1878 0000540B 4954457C50524F544F- <1> 1878 00005414 434F4C3D534543544F- <1> 1878 0000541D 52290D0A <1> 1879 00005421 092046444109666972- <1> db 9," FDA",9,"first floppy disk",13,10 1879 0000542A 737420666C6F707079- <1> 1879 00005433 206469736B0D0A <1> 1880 0000543A 092046444209736563- <1> db 9," FDB",9,"second floppy disk (etc)",13,10 1880 00005443 6F6E6420666C6F7070- <1> 1880 0000544C 79206469736B202865- <1> 1880 00005455 7463290D0A <1> 1881 0000545A 09204C445009706172- <1> db 9," LDP",9,"partition the debugger loaded from",13,10 1881 00005463 746974696F6E207468- <1> 1881 0000546C 652064656275676765- <1> 1881 00005475 72206C6F6164656420- <1> 1881 0000547E 66726F6D0D0A <1> 1882 00005484 092059445009706172- <1> db 9," YDP",9,"partition the most recent Y command loaded from",13,10 1882 0000548D 746974696F6E207468- <1> 1882 00005496 65206D6F7374207265- <1> 1882 0000549F 63656E74205920636F- <1> 1882 000054A8 6D6D616E64206C6F61- <1> 1882 000054B1 6465642066726F6D0D- <1> 1882 000054BA 0A <1> 1883 000054BB 0920534450096C6173- <1> db 9," SDP",9,"last used partition (default if no partition specified)",13,10 1883 000054C4 742075736564207061- <1> 1883 000054CD 72746974696F6E2028- <1> 1883 000054D6 64656661756C742069- <1> 1883 000054DF 66206E6F2070617274- <1> 1883 000054E8 6974696F6E20737065- <1> 1883 000054F1 636966696564290D0A <1> 1884 000054FA 0966696C656E616D65- <1> db 9,"filename2 may be double-slash // for none",13,10 1884 00005503 32206D617920626520- <1> 1884 0000550C 646F75626C652D736C- <1> 1884 00005515 617368202F2F20666F- <1> 1884 0000551E 72206E6F6E650D0A <1> 1885 00005526 09636D646C696E6520- <1> db 9,"cmdline is only valid for lDOS, RxDOS.2, RxDOS.3 protocols",13,10 1885 0000552F 6973206F6E6C792076- <1> 1885 00005538 616C696420666F7220- <1> 1885 00005541 6C444F532C20527844- <1> 1885 0000554A 4F532E322C20527844- <1> 1885 00005553 4F532E332070726F74- <1> 1885 0000555C 6F636F6C730D0A <1> 1886 00005563 0966696C6573272064- <1> db 9,"files' directory entries are loaded to 500h and 520h",13,10 1886 0000556C 69726563746F727920- <1> 1886 00005575 656E74726965732061- <1> 1886 0000557E 7265206C6F61646564- <1> 1886 00005587 20746F203530306820- <1> 1886 00005590 616E6420353230680D- <1> 1886 00005599 0A <1> 1887 0000559A 0D0A <1> db 13,10 1888 0000559C 417661696C61626C65- <1> db "Available protocols: (default filenames, load segment, then entrypoint)",13,10 1888 000055A5 2070726F746F636F6C- <1> 1888 000055AE 733A20286465666175- <1> 1888 000055B7 6C742066696C656E61- <1> 1888 000055C0 6D65732C206C6F6164- <1> 1888 000055C9 207365676D656E742C- <1> 1888 000055D2 207468656E20656E74- <1> 1888 000055DB 7279706F696E74290D- <1> 1888 000055E4 0A <1> 1889 000055E5 204C444F5309094C44- <1> db " LDOS",9,9, "LDOS.COM or L[D]DEBUG.COM at 200h, 0:400h",13,10 1889 000055EE 4F532E434F4D206F72- <1> 1889 000055F7 204C5B445D44454255- <1> 1889 00005600 472E434F4D20617420- <1> 1889 00005609 323030682C20303A34- <1> 1889 00005612 3030680D0A <1> 1890 00005617 2046524545444F5309- <1> db " FREEDOS",9,"KERNEL.SYS or METAKERN.SYS at 60h, 0:0",13,10 1890 00005620 4B45524E454C2E5359- <1> 1890 00005629 53206F72204D455441- <1> 1890 00005632 4B45524E2E53595320- <1> 1890 0000563B 6174203630682C2030- <1> 1890 00005644 3A300D0A <1> 1891 00005648 20444F534309094950- <1> db " DOSC",9,9, "IPL.SYS at 2000h, 0:0",13,10 1891 00005651 4C2E53595320617420- <1> 1891 0000565A 32303030682C20303A- <1> 1891 00005663 300D0A <1> 1892 00005666 20454452444F530909- <1> db " EDRDOS",9,9,"DRBIO.SYS at 70h, 0:0",13,10 1892 0000566F 445242494F2E535953- <1> 1892 00005678 206174203730682C20- <1> 1892 00005681 303A300D0A <1> 1893 00005686 204D53444F53360909- <1> db " MSDOS6",9,9, "IO.SYS + MSDOS.SYS at 70h, 0:0",13,10 1893 0000568F 494F2E535953202B20- <1> 1893 00005698 4D53444F532E535953- <1> 1893 000056A1 206174203730682C20- <1> 1893 000056AA 303A300D0A <1> 1894 000056AF 204D53444F53370909- <1> db " MSDOS7",9,9, "IO.SYS at 70h, 0:200h",13,10 1894 000056B8 494F2E535953206174- <1> 1894 000056C1 203730682C20303A32- <1> 1894 000056CA 3030680D0A <1> 1895 000056CF 2049424D444F530909- <1> db " IBMDOS",9,9, "IBMBIO.COM + IBMDOS.COM at 70h, 0:0",13,10 1895 000056D8 49424D42494F2E434F- <1> 1895 000056E1 4D202B2049424D444F- <1> 1895 000056EA 532E434F4D20617420- <1> 1895 000056F3 3730682C20303A300D- <1> 1895 000056FC 0A <1> 1896 000056FD 204E544C445209094E- <1> db " NTLDR",9,9, "NTLDR at 2000h, 0:0",13,10 1896 00005706 544C44522061742032- <1> 1896 0000570F 303030682C20303A30- <1> 1896 00005718 0D0A <1> 1897 0000571A 20424F4F544D475209- <1> db " BOOTMGR",9, "BOOTMGR at 2000h, 0:0",13,10 1897 00005723 424F4F544D47522061- <1> 1897 0000572C 742032303030682C20- <1> 1897 00005735 303A300D0A <1> 1898 0000573A 205258444F532E3009- <1> db " RXDOS.0",9,"RXDOSBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 1898 00005743 5258444F5342494F2E- <1> 1898 0000574C 535953202B20525844- <1> 1898 00005755 4F532E535953206174- <1> 1898 0000575E 203730682C20303A30- <1> 1898 00005767 0D0A <1> 1899 00005769 205258444F532E3109- <1> db " RXDOS.1",9,"RXBIO.SYS + RXDOS.SYS at 70h, 0:0",13,10 1899 00005772 525842494F2E535953- <1> 1899 0000577B 202B205258444F532E- <1> 1899 00005784 535953206174203730- <1> 1899 0000578D 682C20303A300D0A <1> 1900 00005795 205258444F532E3209- <1> db " RXDOS.2",9,"RXDOS.COM at 70h, 0:400h",13,10 1900 0000579E 5258444F532E434F4D- <1> 1900 000057A7 206174203730682C20- <1> 1900 000057B0 303A343030680D0A <1> 1901 000057B8 205258444F532E3309- <1> db " RXDOS.3",9,"RXDOS.COM at 200h, 0:400h",13,10 1901 000057C1 5258444F532E434F4D- <1> 1901 000057CA 20617420323030682C- <1> 1901 000057D3 20303A343030680D0A <1> 1902 000057DC 20434841494E090942- <1> db " CHAIN",9,9,"BOOTSECT.DOS at 7C0h, -7C0h:7C00h",13,10 1902 000057E5 4F4F54534543542E44- <1> 1902 000057EE 4F5320617420374330- <1> 1902 000057F7 682C202D374330683A- <1> 1902 00005800 37433030680D0A <1> 1903 00005807 20534543544F520909- <1> db " SECTOR",9,9,"(default) load partition boot sector or MBR",13,10 1903 00005810 2864656661756C7429- <1> 1903 00005819 206C6F616420706172- <1> 1903 00005822 746974696F6E20626F- <1> 1903 0000582B 6F7420736563746F72- <1> 1903 00005834 206F72204D42520D0A <1> 1904 0000583D 20534543544F52414C- <1> db " SECTORALT",9,"as SECTOR, but entry at 07C0h:0",13,10 1904 00005846 540961732053454354- <1> 1904 0000584F 4F522C206275742065- <1> 1904 00005858 6E7472792061742030- <1> 1904 00005861 374330683A300D0A <1> 1905 00005869 0D0A <1> db 13,10 1906 0000586B 417661696C61626C65- <1> db "Available options:",13,10 1906 00005874 206F7074696F6E733A- <1> 1906 0000587D 0D0A <1> 1907 0000587F 204D494E504152413D- <1> db " MINPARA=num",9,9, "load at least that many paragraphs",13,10 1907 00005888 6E756D09096C6F6164- <1> 1907 00005891 206174206C65617374- <1> 1907 0000589A 2074686174206D616E- <1> 1907 000058A3 792070617261677261- <1> 1907 000058AC 7068730D0A <1> 1908 000058B1 204D4158504152413D- <1> db " MAXPARA=num",9,9, "load at most that many paragraphs (0 = as many as fit)",13,10 1908 000058BA 6E756D09096C6F6164- <1> 1908 000058C3 206174206D6F737420- <1> 1908 000058CC 74686174206D616E79- <1> 1908 000058D5 207061726167726170- <1> 1908 000058DE 6873202830203D2061- <1> 1908 000058E7 73206D616E79206173- <1> 1908 000058F0 20666974290D0A <1> 1909 000058F7 205345474D454E543D- <1> db " SEGMENT=num",9,9, "change segment at that the kernel loads",13,10 1909 00005900 6E756D09096368616E- <1> 1909 00005909 6765207365676D656E- <1> 1909 00005912 742061742074686174- <1> 1909 0000591B 20746865206B65726E- <1> 1909 00005924 656C206C6F6164730D- <1> 1909 0000592D 0A <1> 1910 0000592E 20454E5452593D5B6E- <1> db " ENTRY=[num:]num",9,"change entrypoint (CS (relative) : IP)",13,10 1910 00005937 756D3A5D6E756D0963- <1> 1910 00005940 68616E676520656E74- <1> 1910 00005949 7279706F696E742028- <1> 1910 00005952 4353202872656C6174- <1> 1910 0000595B 69766529203A204950- <1> 1910 00005964 290D0A <1> 1911 00005967 204250423D5B6E756D- <1> db " BPB=[num:]num",9,9, "change BPB load address (segment -1 = auto-BPB)",13,10 1911 00005970 3A5D6E756D09096368- <1> 1911 00005979 616E67652042504220- <1> 1911 00005982 6C6F61642061646472- <1> 1911 0000598B 65737320287365676D- <1> 1911 00005994 656E74202D31203D20- <1> 1911 0000599D 6175746F2D42504229- <1> 1911 000059A6 0D0A <1> 1913 000059A8 20434845434B4F4646- <1> db " CHECKOFFSET=num",9,"set address of word to check, must be even",13,10 1913 000059B1 5345543D6E756D0973- <1> 1913 000059BA 657420616464726573- <1> 1913 000059C3 73206F6620776F7264- <1> 1913 000059CC 20746F20636865636B- <1> 1913 000059D5 2C206D757374206265- <1> 1913 000059DE 206576656E0D0A <1> 1914 000059E5 20434845434B56414C- <1> db " CHECKVALUE=num",9,9,"set value of word to check (0 = no check)",13,10 1914 000059EE 55453D6E756D090973- <1> 1914 000059F7 65742076616C756520- <1> 1914 00005A00 6F6620776F72642074- <1> 1914 00005A09 6F20636865636B2028- <1> 1914 00005A12 30203D206E6F206368- <1> 1914 00005A1B 65636B290D0A <1> 1915 00005A21 426F6F6C65616E206F- <1> db "Boolean options: [opt=bool]",13,10 1915 00005A2A 7074696F6E733A205B- <1> 1915 00005A33 6F70743D626F6F6C5D- <1> 1915 00005A3C 0D0A <1> 1916 00005A3E 205345545F444C5F55- <1> db " SET_DL_UNIT",9,9,"set dl to load unit",13,10 1916 00005A47 4E4954090973657420- <1> 1916 00005A50 646C20746F206C6F61- <1> 1916 00005A59 6420756E69740D0A <1> 1917 00005A61 205345545F424C5F55- <1> db " SET_BL_UNIT",9,9,"set bl to load unit",13,10 1917 00005A6A 4E4954090973657420- <1> 1917 00005A73 626C20746F206C6F61- <1> 1917 00005A7C 6420756E69740D0A <1> 1918 00005A84 205345545F53494449- <1> db " SET_SIDI_CLUSTER",9,"set si:di to first cluster",13,10 1918 00005A8D 5F434C555354455209- <1> 1918 00005A96 7365742073693A6469- <1> 1918 00005A9F 20746F206669727374- <1> 1918 00005AA8 20636C75737465720D- <1> 1918 00005AB1 0A <1> 1919 00005AB2 205345545F44535349- <1> db " SET_DSSI_DPT",9,9,"set ds:si to DPT address",13,10 1919 00005ABB 5F4450540909736574- <1> 1919 00005AC4 2064733A736920746F- <1> 1919 00005ACD 204450542061646472- <1> 1919 00005AD6 6573730D0A <1> 1920 00005ADB 20505553485F445054- <1> db " PUSH_DPT",9,9,"push DPT address and DPT entry address",13,10 1920 00005AE4 090970757368204450- <1> 1920 00005AED 542061646472657373- <1> 1920 00005AF6 20616E642044505420- <1> 1920 00005AFF 656E74727920616464- <1> 1920 00005B08 726573730D0A <1> 1921 00005B0E 204441544153544152- <1> db " DATASTART_HIDDEN",9,"add hidden sectors to datastart var",13,10 1921 00005B17 545F48494444454E09- <1> 1921 00005B20 616464206869646465- <1> 1921 00005B29 6E20736563746F7273- <1> 1921 00005B32 20746F206461746173- <1> 1921 00005B3B 74617274207661720D- <1> 1921 00005B44 0A <1> 1922 00005B45 205345545F41584258- <1> db " SET_AXBX_DATASTART",9,"set ax:bx to datastart var",13,10 1922 00005B4E 5F4441544153544152- <1> 1922 00005B57 54097365742061783A- <1> 1922 00005B60 627820746F20646174- <1> 1922 00005B69 617374617274207661- <1> 1922 00005B72 720D0A <1> 1923 00005B75 205345545F44534250- <1> db " SET_DSBP_BPB",9,9,"set ds:bp to BPB address",13,10 1923 00005B7E 5F4250420909736574- <1> 1923 00005B87 2064733A627020746F- <1> 1923 00005B90 204250422061646472- <1> 1923 00005B99 6573730D0A <1> 1924 00005B9E 204C42415F5345545F- <1> db " LBA_SET_TYPE",9,9,"set LBA partition type in BPB",13,10 1924 00005BA7 545950450909736574- <1> 1924 00005BB0 204C42412070617274- <1> 1924 00005BB9 6974696F6E20747970- <1> 1924 00005BC2 6520696E204250420D- <1> 1924 00005BCB 0A <1> 1925 00005BCC 204D4553534147455F- <1> db " MESSAGE_TABLE",9,9, "provide message table pointed to at 1EEh",13,10 1925 00005BD5 5441424C4509097072- <1> 1925 00005BDE 6F76696465206D6573- <1> 1925 00005BE7 73616765207461626C- <1> 1925 00005BF0 6520706F696E746564- <1> 1925 00005BF9 20746F206174203145- <1> 1925 00005C02 45680D0A <1> 1927 00005C06 205345545F41584258- <1> db " SET_AXBX_ROOT_HIDDEN",9, "set ax:bx to root start with hidden sectors",13,10 1927 00005C0F 5F524F4F545F484944- <1> 1927 00005C18 44454E097365742061- <1> 1927 00005C21 783A627820746F2072- <1> 1927 00005C2A 6F6F74207374617274- <1> 1927 00005C33 207769746820686964- <1> 1927 00005C3C 64656E20736563746F- <1> 1927 00005C45 72730D0A <1> 1929 00005C49 204E4F5F4250420909- <1> db " NO_BPB",9,9,9, "do not load BPB",13,10 1929 00005C52 09646F206E6F74206C- <1> 1929 00005C5B 6F6164204250420D0A <1> 1930 00005C64 205345545F44535349- <1> db " SET_DSSI_PARTINFO",9, "load part table to 600h, point ds:si + ds:bp to it",13,10 1930 00005C6D 5F50415254494E464F- <1> 1930 00005C76 096C6F616420706172- <1> 1930 00005C7F 74207461626C652074- <1> 1930 00005C88 6F20363030682C2070- <1> 1930 00005C91 6F696E742064733A73- <1> 1930 00005C9A 69202B2064733A6270- <1> 1930 00005CA3 20746F2069740D0A <1> 1931 00005CAB 00 <1> asciz 1932 <1> %endif 1933 <1> %endif 1934 <1> 1935 00005CAC 54686973206C446562- <1> .readonly: asciz "This lDebug variable cannot be written to. See ?V.",13,10 1935 00005CB5 756720766172696162- <1> 1935 00005CBE 6C652063616E6E6F74- <1> 1935 00005CC7 206265207772697474- <1> 1935 00005CD0 656E20746F2E205365- <1> 1935 00005CD9 65203F562E0D0A00 <1> 1936 00005CE1 54686973206D656D6F- <1> .readonly_mem: asciz "This memory variable cannot be written to.",13,10 1936 00005CEA 727920766172696162- <1> 1936 00005CF3 6C652063616E6E6F74- <1> 1936 00005CFC 206265207772697474- <1> 1936 00005D05 656E20746F2E0D0A00 <1> 1937 00005D0E 5B6D6F72655D <1> .more: db "[more]" 1938 <1> .more_size equ $-.more 1939 00005D14 0D2020202020200D <1> .more_over: db 13," ",13 ; to overwrite previous prompt 1940 <1> .more_over_size equ $-.more_over 1941 00005D1C 5E430D0A <1> .ctrlc: db "^C",13,10 1942 <1> .ctrlc_size equ $-.ctrlc 1943 00005D20 00 <1> asciz 1944 <1> .freedos_ctrlc_workaround: 1945 00005D21 20284F6C6420467265- <1> asciz " (Old FreeDOS kernel Ctrl-C work around happened)",13,10 1945 00005D2A 65444F53206B65726E- <1> 1945 00005D33 656C204374726C2D43- <1> 1945 00005D3C 20776F726B2061726F- <1> 1945 00005D45 756E64206861707065- <1> 1945 00005D4E 6E6564290D0A00 <1> 1946 <1> .not_while_indos: 1947 00005D55 436F6D6D616E64206E- <1> asciz "Command not supported while in InDOS mode.",13,10 1947 00005D5E 6F7420737570706F72- <1> 1947 00005D67 746564207768696C65- <1> 1947 00005D70 20696E20496E444F53- <1> 1947 00005D79 206D6F64652E0D0A00 <1> 1948 00005D82 43757272656E74206D- <1> .rv_mode.before: asciz "Current mode: " 1948 00005D8B 6F64653A2000 <1> 1949 <1> %if _PM 1950 00005D91 44504D492031362D62- <1> .rv_mode_dpmi_16: asciz "DPMI 16-bit CS",13,10 1950 00005D9A 69742043530D0A00 <1> 1951 00005DA2 44504D492033322D62- <1> .rv_mode_dpmi_32: asciz "DPMI 32-bit CS",13,10 1951 00005DAB 69742043530D0A00 <1> 1952 <1> %endif 1953 00005DB3 5265616C203836204D- <1> .rv_mode_r86m: asciz "Real 86 Mode",13,10 1953 00005DBC 6F64650D0A00 <1> 1954 00005DC2 5669727475616C2038- <1> .rv_mode_v86m: asciz "Virtual 86 Mode",13,10 1954 00005DCB 36204D6F64650D0A00 <1> 1955 <1> 1956 00005DD4 333836207265676973- <1> .regs386: asciz "386 registers are " 1956 00005DDD 746572732061726520- <1> 1956 00005DE6 00 <1> 1957 00005DE7 6E6F7420 <1> .regs386_off:db "not " 1958 00005DEB 646973706C61796564- <1> .regs386_on: asciz "displayed",13,10 1958 00005DF4 0D0A00 <1> 1959 <1> 1960 <1> %if _EMS 1961 <1> .xhelp: 1962 00005DF7 457870616E64656420- <1> db "Expanded memory (EMS) commands:",13,10 1962 00005E00 6D656D6F7279202845- <1> 1962 00005E09 4D532920636F6D6D61- <1> 1962 00005E12 6E64733A0D0A <1> 1963 00005E18 2020416C6C6F636174- <1> db " Allocate",9, "XA count",13,10 1963 00005E21 6509584120636F756E- <1> 1963 00005E2A 740D0A <1> 1964 00005E2D 20204465616C6C6F63- <1> db " Deallocate",9, "XD handle",13,10 1964 00005E36 617465095844206861- <1> 1964 00005E3F 6E646C650D0A <1> 1965 00005E45 20204D6170206D656D- <1> db " Map memory",9, "XM logical-page physical-page handle",13,10 1965 00005E4E 6F727909584D206C6F- <1> 1965 00005E57 676963616C2D706167- <1> 1965 00005E60 652070687973696361- <1> 1965 00005E69 6C2D70616765206861- <1> 1965 00005E72 6E646C650D0A <1> 1966 00005E78 20205265616C6C6F63- <1> db " Reallocate",9, "XR handle count",13,10 1966 00005E81 617465095852206861- <1> 1966 00005E8A 6E646C6520636F756E- <1> 1966 00005E93 740D0A <1> 1967 00005E96 202053686F77207374- <1> db " Show status",9, "XS",13,10 1967 00005E9F 617475730958530D0A <1> 1968 00005EA8 00 <1> asciz 1969 <1> %endif 1970 <1> 1971 <1> %if _MCB 1972 00005EA9 456E64206F66206368- <1> .invmcbadr: asciz "End of chain: invalid MCB address.",13,10 1972 00005EB2 61696E3A20696E7661- <1> 1972 00005EBB 6C6964204D43422061- <1> 1972 00005EC4 6464726573732E0D0A- <1> 1972 00005ECD 00 <1> 1973 <1> %endif 1974 <1> 1975 <1> %if _TSR 1976 00005ECE 43616E6E6F7420676F- <1> .pspnotfound: asciz "Cannot go resident, child PSP not found.",13,10 1976 00005ED7 207265736964656E74- <1> 1976 00005EE0 2C206368696C642050- <1> 1976 00005EE9 5350206E6F7420666F- <1> 1976 00005EF2 756E642E0D0A00 <1> 1977 00005EF9 43616E6E6F7420676F- <1> .psphooked: asciz "Cannot go resident, child PSP parent return address hooked.",13,10 1977 00005F02 207265736964656E74- <1> 1977 00005F0B 2C206368696C642050- <1> 1977 00005F14 535020706172656E74- <1> 1977 00005F1D 2072657475726E2061- <1> 1977 00005F26 64647265737320686F- <1> 1977 00005F2F 6F6B65642E0D0A00 <1> 1978 00005F37 506174636865642050- <1> .nowtsr1: asciz "Patched PSP at " 1978 00005F40 53502061742000 <1> 1979 00005F47 2C206E6F7720726573- <1> .nowtsr2: asciz ", now resident.",13,10 1979 00005F50 6964656E742E0D0A00 <1> 1980 00005F59 416C72656164792072- <1> .alreadytsr: asciz "Already resident.",13,10 1980 00005F62 65736964656E742E0D- <1> 1980 00005F6B 0A00 <1> 1981 <1> %endif 1982 <1> %if _PM && (_TSR || _BOOTLDR) 1983 00005F6D 43616E6E6F74207175- <1> .cannotpmquit: asciz "Cannot quit, still in protected mode.",13,10 1983 00005F76 69742C207374696C6C- <1> 1983 00005F7F 20696E2070726F7465- <1> 1983 00005F88 63746564206D6F6465- <1> 1983 00005F91 2E0D0A00 <1> 1984 <1> %endif 1985 <1> %if _BOOTLDR 1986 00005F95 436F6D6D616E64206E- <1> .nobootsupp: asciz "Command not supported in boot loaded mode.",13,10 1986 00005F9E 6F7420737570706F72- <1> 1986 00005FA7 74656420696E20626F- <1> 1986 00005FB0 6F74206C6F61646564- <1> 1986 00005FB9 206D6F64652E0D0A00 <1> 1987 00005FC2 53687574646F776E20- <1> .boot_quit_fail:asciz "Shutdown not supported.",13,10 1987 00005FCB 6E6F7420737570706F- <1> 1987 00005FD4 727465642E0D0A00 <1> 1988 00005FDC 426F6F74206661696C- <1> .bootfail: asciz "Boot failure: " 1988 00005FE5 7572653A2000 <1> 1989 00005FEB 52656164696E672073- <1> .bootfail_read: db "Reading sector failed (error " 1989 00005FF4 6563746F7220666169- <1> 1989 00005FFD 6C656420286572726F- <1> 1989 00006006 7220 <1> 1990 00006008 5F5F68292E0D0A00 <1> .bootfail_read_errorcode: asciz "__h).",13,10 1991 00006010 426F6F742073656374- <1> .bootfail_sig: asciz "Boot sector signature missing (is not AA55h).",13,10 1991 00006019 6F72207369676E6174- <1> 1991 00006022 757265206D69737369- <1> 1991 0000602B 6E6720286973206E6F- <1> 1991 00006034 74204141353568292E- <1> 1991 0000603D 0D0A00 <1> 1992 00006040 506172746974696F6E- <1> .bootfail_sig_parttable: ascii "Partition table signature missing" 1992 00006049 207461626C65207369- <1> 1992 00006052 676E6174757265206D- <1> 1992 0000605B 697373696E67 <1> 1993 00006061 20286973206E6F7420- <1> asciz " (is not AA55h).",13,10 1993 0000606A 4141353568292E0D0A- <1> 1993 00006073 00 <1> 1994 00006074 426F6F742073656374- <1> .bootfail_code: asciz "Boot sector code invalid (is 0000h).",13,10 1994 0000607D 6F7220636F64652069- <1> 1994 00006086 6E76616C6964202869- <1> 1994 0000608F 73203030303068292E- <1> 1994 00006098 0D0A00 <1> 1995 <1> .bootfail_secsizediffer: 1996 0000609B 425042204270532064- <1> asciz "BPB BpS differs from actual sector size.",13,10 1996 000060A4 696666657273206672- <1> 1996 000060AD 6F6D2061637475616C- <1> 1996 000060B6 20736563746F722073- <1> 1996 000060BF 697A652E0D0A00 <1> 1997 <1> .bootfail_stack_underflow: 1998 000060C6 426F6F742073746163- <1> asciz "Boot stack underflowed.",13,10 1998 000060CF 6B20756E646572666C- <1> 1998 000060D8 6F7765642E0D0A00 <1> 1999 <1> .bootfail_check_mismatch: 2000 000060E0 436865636B206D6973- <1> db "Check mismatch, expected " 2000 000060E9 6D617463682C206578- <1> 2000 000060F2 70656374656420 <1> 2001 <1> .bootfail_check_mismatch.check_value: 2002 000060F9 5F5F5F5F6820617420- <1> db "____h at offset " 2002 00006102 6F666673657420 <1> 2003 <1> .bootfail_check_mismatch.check_offset: 2004 00006109 5F5F5F5F6820627574- <1> db "____h but has " 2004 00006112 2068617320 <1> 2005 <1> .bootfail_check_mismatch.check_got: 2006 00006117 5F5F5F5F682E0D0A00 <1> asciz "____h.",13,10 2007 00006120 4F7574206F66206D65- <1> .boot_out_of_memory_error: asciz "Out of memory.", 13,10 2007 00006129 6D6F72792E0D0A00 <1> 2008 00006131 546F6F206D616E7920- <1> .boot_too_many_partitions_error:asciz "Too many partitions (or a loop).",13,10 2008 0000613A 706172746974696F6E- <1> 2008 00006143 7320286F722061206C- <1> 2008 0000614C 6F6F70292E0D0A00 <1> 2009 00006154 506172746974696F6E- <1> .boot_partition_cycle_error: asciz "Partition table cycle detected.",13,10 2009 0000615D 207461626C65206379- <1> 2009 00006166 636C65206465746563- <1> 2009 0000616F 7465642E0D0A00 <1> 2010 00006176 506172746974696F6E- <1> .boot_partition_not_found: asciz "Partition not found.",13,10 2010 0000617F 206E6F7420666F756E- <1> 2010 00006188 642E0D0A00 <1> 2011 0000618D 52656164206572726F- <1> .boot_access_error: asciz "Read error.", 13,10 2011 00006196 722E0D0A00 <1> 2012 0000619B 536563746F72207369- <1> .boot_sector_too_large: asciz "Sector size too small (< 32 bytes).", 13,10 2012 000061A4 7A6520746F6F20736D- <1> 2012 000061AD 616C6C20283C203332- <1> 2012 000061B6 206279746573292E0D- <1> 2012 000061BF 0A00 <1> 2013 000061C1 536563746F72207369- <1> .boot_sector_too_small: asciz "Sector size too large (> 8192 bytes).", 13,10 2013 000061CA 7A6520746F6F206C61- <1> 2013 000061D3 72676520283E203831- <1> 2013 000061DC 393220627974657329- <1> 2013 000061E5 2E0D0A00 <1> 2014 000061E9 536563746F72207369- <1> .boot_sector_not_power: asciz "Sector size not a power of two.", 13,10 2014 000061F2 7A65206E6F74206120- <1> 2014 000061FB 706F776572206F6620- <1> 2014 00006204 74776F2E0D0A00 <1> 2015 0000620B 496E76616C69642067- <1> .boot_invalid_sectors: asciz "Invalid geometry sectors.", 13,10 2015 00006214 656F6D657472792073- <1> 2015 0000621D 6563746F72732E0D0A- <1> 2015 00006226 00 <1> 2016 00006227 496E76616C69642067- <1> .boot_invalid_heads: asciz "Invalid geometry heads.", 13,10 2016 00006230 656F6D657472792068- <1> 2016 00006239 656164732E0D0A00 <1> 2017 00006241 46696C65206E6F7420- <1> .boot_file_not_found: asciz "File not found.",13,10 2017 0000624A 666F756E642E0D0A00 <1> 2018 00006253 46696C6520746F6F20- <1> .boot_file_too_big_error: asciz "File too big.",13,10 2018 0000625C 6269672E0D0A00 <1> 2019 00006263 46696C6520746F6F20- <1> .boot_file_too_small_error: asciz "File too small.",13,10 2019 0000626C 736D616C6C2E0D0A00 <1> 2020 00006275 42616420616D6F756E- <1> .boot_badclusters: asciz "Bad amount of clusters.",13,10 2020 0000627E 74206F6620636C7573- <1> 2020 00006287 746572732E0D0A00 <1> 2021 0000628F 42616420636C757374- <1> .boot_badchain: asciz "Bad cluster chain.",13,10 2021 00006298 657220636861696E2E- <1> 2021 000062A1 0D0A00 <1> 2022 000062A4 4261642046696C6520- <1> .boot_badfat: asciz "Bad File Allocation Table.",13,10 2022 000062AD 416C6C6F636174696F- <1> 2022 000062B6 6E205461626C652E0D- <1> 2022 000062BF 0A00 <1> 2023 000062C1 496E76616C69642066- <1> .boot_invalid_filename: asciz "Invalid filename.",13,10 2023 000062CA 696C656E616D652E0D- <1> 2023 000062D3 0A00 <1> 2024 000062D5 43616E6E6F74207365- <1> .boot_cannot_set_both: asciz "Cannot set both " 2024 000062DE 7420626F74682000 <1> 2025 000062E6 20616E642000 <1> .boot_and: asciz " and " 2026 000062EC 2E0D0A00 <1> .boot_dot_crlf: asciz ".",13,10 2027 000062F0 2120496E7465726E61- <1> .boot_internal_error: asciz "! Internal error !",13,10 2027 000062F9 6C206572726F722021- <1> 2027 00006302 0D0A00 <1> 2028 00006305 42504220616E64206C- <1> .boot_bpb_load_overlap: asciz "BPB and load area overlap.",13,10 2028 0000630E 6F6164206172656120- <1> 2028 00006317 6F7665726C61702E0D- <1> 2028 00006320 0A00 <1> 2029 00006322 5365676D656E742074- <1> .boot_segment_too_low: asciz "Segment too low.",13,10 2029 0000632B 6F6F206C6F772E0D0A- <1> 2029 00006334 00 <1> 2030 00006335 42504220746F6F206C- <1> .boot_bpb_too_low: asciz "BPB too low.",13,10 2030 0000633E 6F772E0D0A00 <1> 2031 00006344 2120496E7465726E61- <1> .boot_auxbuff_crossing: db "! Internal error !, " 2031 0000634D 6C206572726F722021- <1> 2031 00006356 2C20 <1> 2032 00006358 617578627566662063- <1> asciz "auxbuff crosses 64 KiB boundary.",13,10 2032 00006361 726F73736573203634- <1> 2032 0000636A 204B694220626F756E- <1> 2032 00006373 646172792E0D0A00 <1> 2033 0000637B 5245414400 <1> .read: asciz "READ" 2034 00006380 575249544500 <1> .write: asciz "WRITE" 2035 00006386 48494444454E00 <1> .hidden: asciz "HIDDEN" 2036 0000638D 44495200 <1> .dir: asciz "DIR" 2037 00006391 082020205B4449525D <1> .dirinsteadsize:countedb " [DIR]" 2038 0000639A 2F00 <1> .emptydirname: asciz "/" 2039 0000639C 424F4F5400 <1> .boot: asciz "BOOT" 2040 000063A1 5155495400 <1> .quit: asciz "QUIT" 2041 000063A6 50524F544F434F4C00 <1> .protocol: asciz "PROTOCOL" 2042 000063AF 5345474D454E5400 <1> .segment: asciz "SEGMENT" 2043 000063B7 454E54525900 <1> .entry: asciz "ENTRY" 2044 000063BD 42504200 <1> .bpb: asciz "BPB" 2045 000063C1 4D494E5041524100 <1> .minpara: asciz "MINPARA" 2046 000063C9 4D41585041524100 <1> .maxpara: asciz "MAXPARA" 2047 000063D1 434845434B4F464653- <1> .checkoffset: asciz "CHECKOFFSET" 2047 000063DA 455400 <1> 2048 000063DD 434845434B56414C55- <1> .checkvalue: asciz "CHECKVALUE" 2048 000063E6 4500 <1> 2049 000063E8 534543544F5200 <1> .sector: asciz "SECTOR" 2050 000063EF 534543544F52414C54- <1> .sector_alt: asciz "SECTORALT" 2050 000063F8 00 <1> 2051 000063F9 4B45524E454C2E5359- <1> .freedos_kernel_name: asciz "KERNEL.SYS" 2051 00006402 5300 <1> 2052 00006404 49504C2E53595300 <1> .dosc_kernel_name: asciz "IPL.SYS" 2053 0000640C 445242494F2E535953- <1> .edrdos_kernel_name: asciz "DRBIO.SYS" 2053 00006415 00 <1> 2054 00006416 4C444F532E434F4D00 <1> .ldos_kernel_name: asciz "LDOS.COM" 2055 <1> .msdos7_kernel_name: 2056 0000641F 494F2E53595300 <1> .msdos6_kernel_name: asciz "IO.SYS" 2057 00006426 4D53444F532E535953- <1> .msdos6_add_name: asciz "MSDOS.SYS" 2057 0000642F 00 <1> 2058 00006430 49424D42494F2E434F- <1> .ibmdos_kernel_name: asciz "IBMBIO.COM" 2058 00006439 4D00 <1> 2059 0000643B 49424D444F532E434F- <1> .ibmdos_add_name: asciz "IBMDOS.COM" 2059 00006444 4D00 <1> 2060 00006446 4E544C445200 <1> .ntldr_kernel_name: asciz "NTLDR" 2061 0000644C 424F4F544D475200 <1> .bootmgr_kernel_name: asciz "BOOTMGR" 2062 00006454 424F4F54534543542E- <1> .chain_kernel_name: asciz "BOOTSECT.DOS" 2062 0000645D 444F5300 <1> 2063 00006461 5258444F5342494F2E- <1> .rxdos.0_kernel_name: asciz "RXDOSBIO.SYS" 2063 0000646A 53595300 <1> 2064 0000646E 525842494F2E535953- <1> .rxdos.1_kernel_name: asciz "RXBIO.SYS" 2064 00006477 00 <1> 2065 <1> .rxdos.0_add_name: 2066 00006478 5258444F532E535953- <1> .rxdos.1_add_name: asciz "RXDOS.SYS" 2066 00006481 00 <1> 2067 00006482 5258444F532E434F4D- <1> .rxdos.2_kernel_name: asciz "RXDOS.COM" 2067 0000648B 00 <1> 2068 0000648C 00 <1> .addname_empty: asciz 2069 0000648D 43616E6E6F74207175- <1> .cannotbootquit_memsizes: asciz "Cannot quit, memory size changed.",13,10 2069 00006496 69742C206D656D6F72- <1> 2069 0000649F 792073697A65206368- <1> 2069 000064A8 616E6765642E0D0A00 <1> 2070 <1> %endif 2071 000064B1 5448454E00 <1> .then: asciz "THEN" 2072 000064B6 4E4F5400 <1> .not: asciz "NOT" 2073 000064BA 565600 <1> .vv: asciz "VV" 2074 000064BD 564D00 <1> .vm: asciz "VM" 2075 000064C0 0D436F646520736567- <1> .vm_codeseg: counted "Code segment=" 2075 000064C9 6D656E743D <1> 2076 000064CE 0D4461746120736567- <1> .vm_dataseg: counted "Data segment=" 2076 000064D7 6D656E743D <1> 2077 000064DC 0E456E747279207365- <1> .vm_entryseg: counted "Entry segment=" 2077 000064E5 676D656E743D <1> 2078 000064EB 104175786275666620- <1> .vm_auxseg: counted "Auxbuff segment=" 2078 000064F4 7365676D656E743D <1> 2079 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2080 000064FC 10486973746F727920- <1> .vm_hisseg: counted "History segment=" 2080 00006505 7365676D656E743D <1> 2081 <1> %endif 2082 <1> %if _PM 2083 0000650D 0A2073656C6563746F- <1> .vm_selector: counted " selector=" 2083 00006516 723D <1> 2084 <1> %endif 2085 00006518 546F6F206C6F6E6720- <1> .n_toolongtail: asciz "Too long N command tail!",13,10 2085 00006521 4E20636F6D6D616E64- <1> 2085 0000652A 207461696C210D0A00 <1> 2086 00006533 546F6F206C6F6E6720- <1> .n_toolongname: asciz "Too long N command name!",13,10 2086 0000653C 4E20636F6D6D616E64- <1> 2086 00006545 206E616D65210D0A00 <1> 2087 0000654E 4E554D42455200 <1> .number: asciz "NUMBER" 2088 00006555 434F554E54455200 <1> .counter: asciz "COUNTER" 2089 0000655D 494400 <1> .id: asciz "ID" 2090 00006560 5748454E00 <1> .when: asciz "WHEN" 2091 00006565 4F464653455400 <1> .offset: asciz "OFFSET" 2092 0000656C 3F00 <1> .questionmark: asciz "?" 2093 0000656E 4F <1> .or: db "O" 2094 0000656F 5200 <1> .r: asciz "R" 2095 00006571 4E4400 <1> .nd: asciz "ND" 2096 00006574 52454D454D42455200 <1> .remember: asciz "REMEMBER" 2097 0000657D 474F544F00 <1> .goto: asciz "GOTO" 2098 00006582 534F4600 <1> .sof: asciz "SOF" 2099 00006586 454F4600 <1> .eof: asciz "EOF" 2100 0000658A 4572726F723A20474F- <1> .goto_not_file: asciz "Error: GOTO command not supported when not reading a script.",13,10 2100 00006593 544F20636F6D6D616E- <1> 2100 0000659C 64206E6F7420737570- <1> 2100 000065A5 706F72746564207768- <1> 2100 000065AE 656E206E6F74207265- <1> 2100 000065B7 6164696E6720612073- <1> 2100 000065C0 63726970742E0D0A00 <1> 2101 000065C9 4572726F723A20474F- <1> .goto_empty: asciz "Error: GOTO needs a destination label.",13,10 2101 000065D2 544F206E6565647320- <1> 2101 000065DB 612064657374696E61- <1> 2101 000065E4 74696F6E206C616265- <1> 2101 000065ED 6C2E0D0A00 <1> 2102 000065F2 4572726F723A20474F- <1> .goto_not_found.1: asciz "Error: GOTO destination label ",'"' 2102 000065FB 544F2064657374696E- <1> 2102 00006604 6174696F6E206C6162- <1> 2102 0000660D 656C202200 <1> 2103 00006612 22206E6F7420666F75- <1> .goto_not_found.2: asciz '"'," not found.",13,10 2103 0000661B 6E642E0D0A00 <1> 2104 00006621 4572726F723A206175- <1> .guard_auxbuff_error: asciz "Error: auxbuff already guarded!",13,10 2104 0000662A 786275666620616C72- <1> 2104 00006633 656164792067756172- <1> 2104 0000663C 646564210D0A00 <1> 2105 00006643 4572726F723A20436F- <1> .guard_re_error: asciz "Error: Command not supported while reading from RE buffer.",13,10 2105 0000664C 6D6D616E64206E6F74- <1> 2105 00006655 20737570706F727465- <1> 2105 0000665E 64207768696C652072- <1> 2105 00006667 656164696E67206672- <1> 2105 00006670 6F6D20524520627566- <1> 2105 00006679 6665722E0D0A00 <1> 2106 00006680 4572726F723A20556E- <1> .unexpected_auxbuff_guard: asciz "Error: Unexpected auxbuff guard!",13,10 2106 00006689 657870656374656420- <1> 2106 00006692 617578627566662067- <1> 2106 0000669B 75617264210D0A00 <1> 2107 000066A3 4572726F723A20556E- <1> .unexpected_noneol_re: asciz "Error: Unexpected non-EOL in RE processing!",13,10 2107 000066AC 657870656374656420- <1> 2107 000066B5 6E6F6E2D454F4C2069- <1> 2107 000066BE 6E2052452070726F63- <1> 2107 000066C7 657373696E67210D0A- <1> 2107 000066D0 00 <1> 2108 000066D1 5245504C41434500 <1> .replace: asciz "REPLACE" 2109 000066D9 415050454E4400 <1> .append: asciz "APPEND" 2110 000066E0 44 <1> .dword: db "D" 2111 000066E1 574F524400 <1> .word: asciz "WORD" 2112 000066E6 33 <1> .3byte: db "3" 2113 000066E7 4259544500 <1> .byte: asciz "BYTE" 2114 000066EC 44 <1> .dwords: db "D" 2115 000066ED 574F52445300 <1> .words: asciz "WORDS" 2116 000066F3 425954455300 <1> .bytes: asciz "BYTES" 2117 000066F9 4C454E47544800 <1> .length: asciz "LENGTH" 2118 00006700 52414E474500 <1> .range: asciz "RANGE" 2119 00006706 5245564552534500 <1> .reverse: asciz "REVERSE" 2120 0000670E 56414C554500 <1> .value: asciz "VALUE" 2121 00006714 494E00 <1> .in: asciz "IN" 2122 00006717 46524F4D00 <1> .from: asciz "FROM" 2123 0000671C 544F00 <1> .to: asciz "TO" 2124 0000671F 455845435554494E47- <1> .executing: asciz "EXECUTING" 2124 00006728 00 <1> 2125 00006729 46524F4D204C494E45- <1> .executing_value_range: asciz "FROM LINEAR cs:eip LENGTH abo - eip" 2125 00006732 41522063733A656970- <1> 2125 0000673B 204C454E4754482061- <1> 2125 00006744 626F202D2065697000 <1> 2126 0000674D 4C494E45415200 <1> .linear: asciz "LINEAR" 2127 00006754 4241534500 <1> .base: asciz "BASE" 2128 00006759 47524F555000 <1> .group: asciz "GROUP" 2129 0000675F 574944544800 <1> .width: asciz "WIDTH" 2130 <1> %if _HISTORY 2131 <1> .history_internal_error: 2132 00006765 0D0A496E7465726E61- <1> asciz 13,10,"Internal error in history handling!",13,10 2132 0000676E 6C206572726F722069- <1> 2132 00006777 6E20686973746F7279- <1> 2132 00006780 2068616E646C696E67- <1> 2132 00006789 210D0A00 <1> 2133 <1> %endif 2134 0000678D 07204572726F7221 <1> .di_error: counted " Error!" 2135 00006795 0768696464656E20 <1> .di_hidden: counted "hidden " 2136 0000679D 0720284949535029 <1> .di_iisp: counted " (IISP)" 2137 000067A5 1320286E6F6E737461- <1> .di_nonstd_iisp:counted " (nonstandard IISP)" 2137 000067AE 6E6461726420494953- <1> 2137 000067B7 5029 <1> 2138 000067B9 132028756E696E7374- <1> .di_uninst_iisp:counted " (uninstalled IISP)" 2138 000067C2 616C6C656420494953- <1> 2138 000067CB 5029 <1> 2139 <1> .di_freedos_reloc: 2140 000067CD 1220284644206B6572- <1> counted " (FD kernel reloc)" 2140 000067D6 6E656C2072656C6F63- <1> 2140 000067DF 29 <1> 2141 000067E0 0E2028666172206A6D- <1> .di_jmpfar: counted " (far jmp imm)" 2141 000067E9 7020696D6D29 <1> 2142 <1> .di_jmpfarindirect: 2143 000067EF 132028666172206A6D- <1> counted " (far jmp indirect)" 2143 000067F8 7020696E6469726563- <1> 2143 00006801 7429 <1> 2144 00006803 0C2028746573742068- <1> .di_testhook: counted " (test hook)" 2144 0000680C 6F6F6B29 <1> 2145 00006810 1C2028746F6F206D61- <1> .di_toomany: counted " (too many chained handlers)" 2145 00006819 6E7920636861696E65- <1> 2145 00006822 642068616E646C6572- <1> 2145 0000682B 7329 <1> 2146 0000682D 0F20656D707479204D- <1> .di_empty: counted " empty MCB name" 2146 00006836 4342206E616D65 <1> 2147 0000683D 0B2073797374656D20- <1> .di_system_mcb: counted " system MCB" 2147 00006846 4D4342 <1> 2148 <1> .di_system_upper: 2149 00006849 0E2073797374656D20- <1> counted " system in UMA" 2149 00006852 696E20554D41 <1> 2150 00006858 0E2073797374656D20- <1> .di_system_low: counted " system in LMA" 2150 00006861 696E204C4D41 <1> 2151 00006867 112068696768206D65- <1> .di_hma: counted " high memory area" 2151 00006870 6D6F72792061726561 <1> 2152 00006879 06205B6D70783A <1> .di_multiplex.1:counted " [mpx:" 2153 00006880 0768206C6973743A <1> .di_multiplex.2:counted "h list:" 2154 00006888 02685D <1> .di_multiplex.3:counted "h]" 2155 0000688B 68656164657200 <1> .header: asciz "header" 2156 <1> .header.length: equ $ - 1 - .header 2157 00006892 747261696C657200 <1> .trailer: asciz "trailer" 2158 <1> .trailer.length:equ $ - 1 - .trailer 2159 0000689A 415400 <1> .at: asciz "AT" 2160 0000689D 5748494C4500 <1> .while: asciz "WHILE" 2161 000068A3 53494C454E5400 <1> .silent: asciz "SILENT" 2162 000068AA 534C45455000 <1> .sleep: asciz "SLEEP" 2163 000068B0 5345434F4E445300 <1> .seconds: asciz "SECONDS" 2164 000068B8 5449434B5300 <1> .ticks: asciz "TICKS" 2165 000068BE 52452070726F636573- <1> .re_limit_reached: asciz "RE processing reached RELIMIT, aborting.",13,10 2165 000068C7 73696E672072656163- <1> 2165 000068D0 6865642052454C494D- <1> 2165 000068D9 49542C2061626F7274- <1> 2165 000068E2 696E672E0D0A00 <1> 2166 000068E9 2120496E7465726E61- <1> .silent_error: asciz "! Internal error during silent buffer handling !",13,10 2166 000068F2 6C206572726F722064- <1> 2166 000068FB 7572696E672073696C- <1> 2166 00006904 656E74206275666665- <1> 2166 0000690D 722068616E646C696E- <1> 2166 00006916 6720210D0A00 <1> 2167 0000691C 5768696C6520636F6E- <1> .while_not_true:asciz "While condition not true, returning.",13,10 2167 00006925 646974696F6E206E6F- <1> 2167 0000692E 7420747275652C2072- <1> 2167 00006937 657475726E696E672E- <1> 2167 00006940 0D0A00 <1> 2168 00006943 5768696C6520636F6E- <1> .while_terminated_before: asciz "While condition ",'"' 2168 0000694C 646974696F6E202200 <1> 2169 00006955 22206E6F206C6F6E67- <1> .while_terminated_after: asciz '"'," no longer true.",13,10 2169 0000695E 657220747275652E0D- <1> 2169 00006967 0A00 <1> 2170 00006969 4E6F2073657269616C- <1> .no_progress: asciz "No serial comm progress after 5 seconds, giving up. (Keyboard enabled.)",13,10 2170 00006972 20636F6D6D2070726F- <1> 2170 0000697B 677265737320616674- <1> 2170 00006984 65722035207365636F- <1> 2170 0000698D 6E64732C2067697669- <1> 2170 00006996 6E672075702E20284B- <1> 2170 0000699F 6579626F6172642065- <1> 2170 000069A8 6E61626C65642E290D- <1> 2170 000069B1 0A00 <1> 2171 000069B3 0D0A6C446562756758- <1> .serial_request_keep: asciz 13,10,_PROGNAME," connected to serial port. Enter KEEP to confirm.",13,10 2171 000069BC 20636F6E6E65637465- <1> 2171 000069C5 6420746F2073657269- <1> 2171 000069CE 616C20706F72742E20- <1> 2171 000069D7 456E746572204B4545- <1> 2171 000069E0 5020746F20636F6E66- <1> 2171 000069E9 69726D2E0D0A00 <1> 2172 000069F0 4E6F204B454550206B- <1> .serial_no_keep_timer: asciz "No KEEP keyword confirmation after timeout, giving up. (Keyboard enabled.)",13,10 2172 000069F9 6579776F726420636F- <1> 2172 00006A02 6E6669726D6174696F- <1> 2172 00006A0B 6E2061667465722074- <1> 2172 00006A14 696D656F75742C2067- <1> 2172 00006A1D 6976696E672075702E- <1> 2172 00006A26 20284B6579626F6172- <1> 2172 00006A2F 6420656E61626C6564- <1> 2172 00006A38 2E290D0A00 <1> 2173 00006A3D 4E6F204B454550206B- <1> .serial_no_keep_enter: asciz "No KEEP keyword confirmation, enabling keyboard.",13,10 2173 00006A46 6579776F726420636F- <1> 2173 00006A4F 6E6669726D6174696F- <1> 2173 00006A58 6E2C20656E61626C69- <1> 2173 00006A61 6E67206B6579626F61- <1> 2173 00006A6A 72642E0D0A00 <1> 2174 00006A70 4B45455000 <1> .keep: asciz "KEEP" 2175 00006A75 4572726F723A20556E- <1> .cannot_hook_2D.invalid: asciz "Error: Unable to hook interrupt 2Dh due to invalid handler.",13,10 2175 00006A7E 61626C6520746F2068- <1> 2175 00006A87 6F6F6B20696E746572- <1> 2175 00006A90 727570742032446820- <1> 2175 00006A99 64756520746F20696E- <1> 2175 00006AA2 76616C69642068616E- <1> 2175 00006AAB 646C65722E0D0A00 <1> 2176 00006AB3 4572726F723A20556E- <1> .cannot_hook_2D.nofree: asciz "Error: Unable to hook interrupt 2Dh, no free multiplex number.",13,10 2176 00006ABC 61626C6520746F2068- <1> 2176 00006AC5 6F6F6B20696E746572- <1> 2176 00006ACE 72757074203244682C- <1> 2176 00006AD7 206E6F206672656520- <1> 2176 00006AE0 6D756C7469706C6578- <1> 2176 00006AE9 206E756D6265722E0D- <1> 2176 00006AF2 0A00 <1> 2177 00006AF4 5761726E696E673A20 <1> .serial_cannot_unhook: db "Warning: " 2178 00006AFD 556E61626C6520746F- <1> .serial_cannot_unhook.nowarn: db "Unable to unhook interrupt " 2178 00006B06 20756E686F6F6B2069- <1> 2178 00006B0F 6E7465727275707420 <1> 2179 00006B18 2D2D682E0D0A00 <1> .serial_cannot_unhook.int: asciz "--h.",13,10 2180 00006B1F 4572726F723A20556E- <1> .serial_cannot_hook: db "Error: Unable to hook interrupt " 2180 00006B28 61626C6520746F2068- <1> 2180 00006B31 6F6F6B20696E746572- <1> 2180 00006B3A 7275707420 <1> 2181 00006B3F 2D2D68206265636175- <1> .serial_cannot_hook.new_int: db "--h because interrupt " 2181 00006B48 736520696E74657272- <1> 2181 00006B51 75707420 <1> 2182 00006B55 2D2D68207374696C6C- <1> .serial_cannot_hook.old_int: asciz "--h still hooked.",13,10 2182 00006B5E 20686F6F6B65642E0D- <1> 2182 00006B67 0A00 <1> 2183 00006B69 537563636565646564- <1> .serial_late_unhook: db "Succeeded in unhooking interrupt " 2183 00006B72 20696E20756E686F6F- <1> 2183 00006B7B 6B696E6720696E7465- <1> 2183 00006B84 727275707420 <1> 2184 00006B8A 2D2D682E0D0A00 <1> .serial_late_unhook.int: asciz "--h.",13,10 2185 00006B91 496E7465726E616C20- <1> .line_out_overflow: asciz "Internal error, line_out buffer overflowed!",13,10 2185 00006B9A 6572726F722C206C69- <1> 2185 00006BA3 6E655F6F7574206275- <1> 2185 00006BAC 66666572206F766572- <1> 2185 00006BB5 666C6F776564210D0A- <1> 2185 00006BBE 00 <1> 2186 00006BBF 041B5B376D <1> .highlight: counted 27,"[7m" 2187 00006BC4 031B5B6D <1> .unhighlight: counted 27,"[m" 2188 00006BC8 206B4D475400 <1> .prefixes: asciz " kMGT" 2189 00006BCE 50726F63657373206C- <1> .ll_unterm: ascizline "Process loading aborted: Attached process didn't terminate!" 2189 00006BD7 6F6164696E67206162- <1> 2189 00006BE0 6F727465643A204174- <1> 2189 00006BE9 746163686564207072- <1> 2189 00006BF2 6F6365737320646964- <1> 2189 00006BFB 6E2774207465726D69- <1> 2189 00006C04 6E617465210D0A00 <1> 2190 00006C0C 43616E6E6F74207175- <1> .qq_unterm: ascizline "Cannot quit, attached process didn't terminate!" 2190 00006C15 69742C206174746163- <1> 2190 00006C1E 6865642070726F6365- <1> 2190 00006C27 7373206469646E2774- <1> 2190 00006C30 207465726D696E6174- <1> 2190 00006C39 65210D0A00 <1> 2191 00006C3E 43616E6E6F74207175- <1> .qq_still_pm: ascizline "Cannot quit, still in PM after attached process terminated!" 2191 00006C47 69742C207374696C6C- <1> 2191 00006C50 20696E20504D206166- <1> 2191 00006C59 746572206174746163- <1> 2191 00006C62 6865642070726F6365- <1> 2191 00006C6B 7373207465726D696E- <1> 2191 00006C74 61746564210D0A00 <1> 2192 <1> 2193 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 2194 00006C7C 45584953545300 <1> .exists: asciz "EXISTS" 2195 00006C83 5900 <1> .y: asciz "Y" 2196 00006C85 5920636F6D6D616E64- <1> .yy_requires_filename: asciz "Y command requires a filename.",13,10 2196 00006C8E 207265717569726573- <1> 2196 00006C97 20612066696C656E61- <1> 2196 00006CA0 6D652E0D0A00 <1> 2197 00006CA6 5920636F6D6D616E64- <1> .yy_filename_empty: asciz "Y command filename is empty.",13,10 2197 00006CAF 2066696C656E616D65- <1> 2197 00006CB8 20697320656D707479- <1> 2197 00006CC1 2E0D0A00 <1> 2198 00006CC5 5920636F6D6D616E64- <1> .yy_too_many_handles: asciz "Y command has too many open files.",13,10 2198 00006CCE 2068617320746F6F20- <1> 2198 00006CD7 6D616E79206F70656E- <1> 2198 00006CE0 2066696C65732E0D0A- <1> 2198 00006CE9 00 <1> 2199 00006CEA 5920636F6D6D616E64- <1> .yy_error_file_open: asciz "Y command failed to open file.",13,10 2199 00006CF3 206661696C65642074- <1> 2199 00006CFC 6F206F70656E206669- <1> 2199 00006D05 6C652E0D0A00 <1> 2200 00006D0B 5920636F6D6D616E64- <1> .yy_no_file: asciz "Y command limited to label only valid in script file.",13,10 2200 00006D14 206C696D6974656420- <1> 2200 00006D1D 746F206C6162656C20- <1> 2200 00006D26 6F6E6C792076616C69- <1> 2200 00006D2F 6420696E2073637269- <1> 2200 00006D38 70742066696C652E0D- <1> 2200 00006D41 0A00 <1> 2201 <1> %endif 2202 <1> %if _INPUT_FILE_HANDLES 2203 00006D43 5920636F6D6D616E64- <1> .yy_no_dos: asciz "Y command requires DOS to be available.",13,10 2203 00006D4C 207265717569726573- <1> 2203 00006D55 20444F5320746F2062- <1> 2203 00006D5E 6520617661696C6162- <1> 2203 00006D67 6C652E0D0A00 <1> 2204 <1> .yy_filename_missing_unquote: 2205 00006D6D 5920636F6D6D616E64- <1> asciz "Y command filename missing ending quote.",13,10 2205 00006D76 2066696C656E616D65- <1> 2205 00006D7F 206D697373696E6720- <1> 2205 00006D88 656E64696E67207175- <1> 2205 00006D91 6F74652E0D0A00 <1> 2206 <1> %endif 2207 <1> %if _INPUT_FILE_BOOT 2208 00006D98 5920636F6D6D616E64- <1> .yy_too_large: asciz "Y command file too large.",13,10 2208 00006DA1 2066696C6520746F6F- <1> 2208 00006DAA 206C617267652E0D0A- <1> 2208 00006DB3 00 <1> 2209 00006DB4 5920636F6D6D616E64- <1> .yy_empty: asciz "Y command file empty.",13,10 2209 00006DBD 2066696C6520656D70- <1> 2209 00006DC6 74792E0D0A00 <1> 2210 <1> %endif 2211 <1> 2212 <1> %if _BREAKPOINTS 2213 00006DCC 414C4C00 <1> .all: asciz "ALL" 2214 00006DD0 4E455700 <1> .new: asciz "NEW" 2215 00006DD4 4E6F20756E75736564- <1> .bb_no_new: asciz "No unused breakpoint left!",13,10 2215 00006DDD 20627265616B706F69- <1> 2215 00006DE6 6E74206C656674210D- <1> 2215 00006DEF 0A00 <1> 2216 00006DF1 19486974207065726D- <1> .bb_hit.1: counted "Hit permanent breakpoint " 2216 00006DFA 616E656E7420627265- <1> 2216 00006E03 616B706F696E7420 <1> 2217 <1> .bb_hit.2.nocounter: 2218 00006E0B 020D0A <1> counted 13,10 2219 00006E0E 1C5061737365642070- <1> .bb_pass.1: counted "Passed permanent breakpoint " 2219 00006E17 65726D616E656E7420- <1> 2219 00006E20 627265616B706F696E- <1> 2219 00006E29 7420 <1> 2220 <1> .bb_hit.2.counter: 2221 00006E2B 0A2C20636F756E7465- <1> .bb_pass.2: counted ", counter=" 2221 00006E34 723D <1> 2222 <1> .bb_hit.3.counter.no_id: 2223 <1> .bb_pass.3.no_id: 2224 <1> .bb_hitpass_id.after: 2225 00006E36 020D0A <1> counted 13,10 2226 <1> .bb_hitpass_id.long: 2227 00006E39 070D0A2049443A20 <1> counted 13,10," ID: " 2228 <1> .bb_hitpass_id.short: 2229 00006E41 062C2049443A20 <1> counted ", ID: " 2230 00006E48 205748454E2000 <1> .bb_when: asciz " WHEN " 2231 <1> 2232 00006E4F 42502000 <1> .bp: asciz "BP " 2233 00006E53 202B00 <1> .bpenabled: asciz " +" 2234 00006E56 202D00 <1> .bpdisabled: asciz " -" 2235 00006E59 20556E7573656400 <1> .bpunused: asciz " Unused" 2236 00006E61 204C696E3D00 <1> .bpaddress: asciz " Lin=" 2237 00006E67 202800 <1> .bpcontent: asciz " (" 2238 00006E6A 2920436F756E746572- <1> .bpcounter: asciz ") Counter=" 2238 00006E73 3D00 <1> 2239 <1> %if 0 2240 <1> BP 00 Unused 2241 <1> BP 00 + Lin=12345678 (CC) Counter=8000 2242 <1> 1234567890123456789012345678901234567890 2243 <1> %endif 2244 00006E75 4E6F20627265616B70- <1> .bpnone: asciz "No breakpoints set currently.",13,10 2244 00006E7E 6F696E747320736574- <1> 2244 00006E87 2063757272656E746C- <1> 2244 00006E90 792E0D0A00 <1> 2245 00006E95 4E6F20627265616B70- <1> .bpnone_at: asciz "No breakpoint set at given address currently.",13,10 2245 00006E9E 6F696E742073657420- <1> 2245 00006EA7 617420676976656E20- <1> 2245 00006EB0 616464726573732063- <1> 2245 00006EB9 757272656E746C792E- <1> 2245 00006EC2 0D0A00 <1> 2246 <1> %endif 2247 00006EC5 5468652000 <1> .cant_bp_the: asciz "The " 2248 00006ECA 70726F636565642062- <1> .cant_bp_type_proceed: asciz "proceed breakpoint" 2248 00006ED3 7265616B706F696E74- <1> 2248 00006EDC 00 <1> 2249 00006EDD 7065726D616E656E74- <1> .cant_bp_type_permanent: db "permanent breakpoint " 2249 00006EE6 20627265616B706F69- <1> 2249 00006EEF 6E7420 <1> 2250 00006EF2 5F5F00 <1> .cant_bp_type_permanent.index: asciz "__" 2251 00006EF5 204720627265616B70- <1> .cant_bp_type_gg: asciz " G breakpoint" 2251 00006EFE 6F696E7400 <1> 2252 00006F03 20286C696E65617220 <1> .cant_bp_linear: db " (linear " 2253 00006F0C 2D2D2D2D5F <1> .cant_bp_linear.address1: db "----_" 2254 00006F11 2D2D2D2D292000 <1> .cant_bp_linear.address2: asciz "----) " 2255 00006F18 63616E6E6F74206265- <1> .cant_bp_write: asciz "cannot be written." 2255 00006F21 207772697474656E2E- <1> 2255 00006F2A 00 <1> 2256 00006F2B 63616E6E6F74206265- <1> .cant_bp_restore: db "cannot be restored to " 2256 00006F34 20726573746F726564- <1> 2256 00006F3D 20746F20 <1> 2257 00006F41 5F5F2E00 <1> .cant_bp_restore.value: asciz "__." 2258 <1> %if 0 2259 <1> The 15th G breakpoint (linear 0010_FFFF) cannot be written. 2260 <1> The proceed breakpoint (linear 0010_FFFF) cannot be written. 2261 <1> The permanent breakpoint 0F (linear 0010_FFFF) cannot be written. 2262 <1> The permanent breakpoint 0F (linear 0010_FFFF) cannot be restored to __. 2263 <1> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 2264 <1> %endif 2265 00006F45 0D0A20526561736F6E- <1> .cant_bp_reason: asciz 13,10," Reason: " 2265 00006F4E 3A2000 <1> 2266 00006F51 4E6F206572726F722E- <1> .cant_bp_reason0: asciz "No error. (Internal error, report!)",13,10 2266 00006F5A 2028496E7465726E61- <1> 2266 00006F63 6C206572726F722C20- <1> 2266 00006F6C 7265706F727421290D- <1> 2266 00006F75 0A00 <1> 2267 00006F77 497420697320726561- <1> .cant_bp_reason1: asciz "It is read-only.",13,10 2267 00006F80 642D6F6E6C792E0D0A- <1> 2267 00006F89 00 <1> 2268 00006F8A 497420697320756E72- <1> .cant_bp_reason2: asciz "It is unreachable.",13,10 2268 00006F93 6561636861626C652E- <1> 2268 00006F9C 0D0A00 <1> 2269 00006F9F 497420686173206265- <1> .cant_bp_reason3: db "It has been overwritten with " 2269 00006FA8 656E206F7665727772- <1> 2269 00006FB1 697474656E20776974- <1> 2269 00006FBA 6820 <1> 2270 00006FBC 5F5F2E0D0A00 <1> .cant_bp_reason3.value: asciz "__.",13,10 2271 00006FC2 556E6B6E6F776E2065- <1> .cant_bp_reasonu: asciz "Unknown error. (Internal error, report!)",13,10 2271 00006FCB 72726F722E2028496E- <1> 2271 00006FD4 7465726E616C206572- <1> 2271 00006FDD 726F722C207265706F- <1> 2271 00006FE6 727421290D0A00 <1> 2272 <1> 2273 00006FED 20202000 <1> .list_bp.first: asciz " " 2274 00006FF1 204720627265616B70- <1> .list_bp.second:db " G breakpoint, linear " 2274 00006FFA 6F696E742C206C696E- <1> 2274 00007003 65617220 <1> 2275 <1> .list_bp.address1: 2276 00007007 2D2D2D2D5F <1> db "----_" 2277 <1> .list_bp.address2: 2278 0000700C 2D2D2D2D00 <1> asciz "----" 2279 00007011 2C20636F6E74656E74- <1> .list_bp.third: db ", content " 2279 0000701A 20 <1> 2280 <1> .list_bp.value: 2281 0000701B 5F5F00 <1> asciz "__" 2282 <1> .list_bp_not_cseip: equ crlf 2283 <1> %if _PM 2284 <1> .list_bp_cseip_32: 2285 0000701E 202869732061742043- <1> asciz " (is at CS:EIP)",13,10 2285 00007027 533A454950290D0A00 <1> 2286 <1> %endif 2287 <1> .list_bp_csip_16: 2288 00007030 202869732061742043- <1> asciz " (is at CS:IP)",13,10 2288 00007039 533A4950290D0A00 <1> 2289 <1> .list_bp_none: 2290 00007041 546865204720627265- <1> asciz "The G breakpoint list is empty.",13,10 2290 0000704A 616B706F696E74206C- <1> 2290 00007053 69737420697320656D- <1> 2290 0000705C 7074792E0D0A00 <1> 2291 <1> %if 0 2292 <1> 2nd G breakpoint, linear 0003_28D3 $3600:12345678, content CC (is at CS:EIP) 2293 <1> 12345678901234567890123456789012345678901234567890123456789012345678901234567890 2294 <1> %endif 2295 00007063 00 <1> .empty_message: asciz 2296 00007064 4C49535400 <1> .list: asciz "LIST" 2297 00007069 414741494E00 <1> .again: asciz "AGAIN" 2298 0000706F 52656163686564206C- <1> .uu_too_many_repeat: asciz "Reached limit of repeating disassembly.",13,10 2298 00007078 696D6974206F662072- <1> 2298 00007081 6570656174696E6720- <1> 2298 0000708A 646973617373656D62- <1> 2298 00007093 6C792E0D0A00 <1> 2299 00007099 496E7465726E616C20- <1> .uu_internal_error: asciz "Internal error in disassembler!",13,10 2299 000070A2 6572726F7220696E20- <1> 2299 000070AB 646973617373656D62- <1> 2299 000070B4 6C6572210D0A00 <1> 2300 000070BB 496E7465726E616C20- <1> .aa_internal_error: asciz "Internal error in assembler!",13,10 2300 000070C4 6572726F7220696E20- <1> 2300 000070CD 617373656D626C6572- <1> 2300 000070D6 210D0A00 <1> 2301 000070DA 537461636B206F7665- <1> .stack_overflow: db "Stack overflow occurred, IP=" 2301 000070E3 72666C6F77206F6363- <1> 2301 000070EC 75727265642C204950- <1> 2301 000070F5 3D <1> 2302 000070F6 5F5F5F5F682C206475- <1> .stack_overflow.caller: asciz "____h, due to " 2302 000070FF 6520746F2000 <1> 2303 00007105 65787072657373696F- <1> .stack_overflow.indirection: asciz "expression indirection.",13,10 2303 0000710E 6E20696E6469726563- <1> 2303 00007117 74696F6E2E0D0A00 <1> 2304 0000711F 65787072657373696F- <1> .stack_overflow.parens: asciz "expression parentheses.",13,10 2304 00007128 6E20706172656E7468- <1> 2304 00007131 657365732E0D0A00 <1> 2305 00007139 65787072657373696F- <1> .stack_overflow.precedence: asciz "expression precedence.",13,10 2305 00007142 6E2070726563656465- <1> 2305 0000714B 6E63652E0D0A00 <1> 2306 00007152 65787072657373696F- <1> .stack_overflow.value_in: asciz "expression VALUE x IN y.",13,10 2306 0000715B 6E2056414C55452078- <1> 2306 00007164 20494E20792E0D0A00 <1> 2307 0000716D 65787072657373696F- <1> .stack_overflow.linear: asciz "expression LINEAR.",13,10 2307 00007176 6E204C494E4541522E- <1> 2307 0000717F 0D0A00 <1> 2308 00007182 65787072657373696F- <1> .stack_overflow.cond: asciz "expression conditional ?? x :: y.",13,10 2308 0000718B 6E20636F6E64697469- <1> 2308 00007194 6F6E616C203F3F2078- <1> 2308 0000719D 203A3A20792E0D0A00 <1> 2309 <1> %if _MEMREF_AMOUNT 2310 <1> %if _DEBUG2 2311 <1> .memrefs_branchdirect: asciz 9, "direct branch target = " 2312 <1> .memrefs_stringsource: asciz 9, "string source = " 2313 <1> .memrefs_stringdest: asciz 9, "string destination = " 2314 <1> .memrefs_memsource: asciz 9, "memory source = " 2315 <1> .memrefs_memdest: asciz 9, "memory destination = " 2316 <1> .memrefs_memsourcedest: asciz 9, "memory source/dest = " 2317 <1> .memrefs_mem_unknown: asciz 9, "memory (unknown) = " 2318 <1> .memrefs_unknown: asciz 9, "unknown mem ref type = " 2319 <1> .memrefs_length: counted " length=" 2320 <1> %endif 2321 <1> .memrefs_invalid_internal: 2322 000071A6 496E7465726E616C20- <1> asciz "Internal error, invalid use of too many memrefs!",13,10 2322 000071AF 6572726F722C20696E- <1> 2322 000071B8 76616C696420757365- <1> 2322 000071C1 206F6620746F6F206D- <1> 2322 000071CA 616E79206D656D7265- <1> 2322 000071D3 6673210D0A00 <1> 2323 <1> %endif 2324 <1> 2325 <1> %if 0 2326 <1> align 2, db 0 2327 <1> .optiontable: dw dispregs32, .r32off, .r32on 2328 <1> dw traceints, .traceoff, .traceon 2329 <1> dw cpdepchars, .cpoff, .cpon 2330 <1> dw fakeindos, .dosoff, .doson 2331 <1> dw nonpagingdevice, .nonpageoff, .nonpageon 2332 <1> dw pagingdevice, .pageoff, .pageon 2333 <1> dw hexrn, .readrnoff, .readrnon 2334 <1> dw 0 2335 <1> 2336 <1> .r32off: asciz "Dump 16-bit register set" 2337 <1> .r32on: asciz "Dump 32-bit register set" 2338 <1> .traceoff: asciz "Interrupts are traced" 2339 <1> .traceon: asciz "Interrupts are processed" 2340 <1> .cpoff: asciz "Extended ASCII characters replaced" 2341 <1> .cpon: asciz "Extended ASCII characters displayed" 2342 <1> .dosoff: asciz "InDOS is checked" 2343 <1> .doson: asciz "InDOS assumed on" 2344 <1> ;asciz "InDOS assumed off" 2345 <1> .nonpageoff: asciz 2346 <1> .nonpageon: asciz "Paging disabled" 2347 <1> .pageoff: asciz 2348 <1> .pageon: asciz "Paging enabled" 2349 <1> .readrnoff: asciz "Readable RN enabled" 2350 <1> .readrnon: asciz "Readable RN disabled" 2351 <1> %endif 2352 <1> 2353 000071D9 5761726E696E673A20- <1> .warnprefix: asciz "Warning: Prefixes in excess of 14, using trace flag.",13,10 2353 000071E2 507265666978657320- <1> 2353 000071EB 696E20657863657373- <1> 2353 000071F4 206F662031342C2075- <1> 2353 000071FD 73696E672074726163- <1> 2353 00007206 6520666C61672E0D0A- <1> 2353 0000720F 00 <1> 2354 <1> 2355 <1> %if _DEBUG 2356 <1> .bu: asciz "Breaking to next instance.",13,10 2357 <1> %else 2358 00007210 416C72656164792069- <1> .notbu: asciz "Already in topmost instance. (This is no debugging build of lDebug.)",13,10 2358 00007219 6E20746F706D6F7374- <1> 2358 00007222 20696E7374616E6365- <1> 2358 0000722B 2E2028546869732069- <1> 2358 00007234 73206E6F2064656275- <1> 2358 0000723D 6767696E6720627569- <1> 2358 00007246 6C64206F66206C4465- <1> 2358 0000724F 6275672E290D0A00 <1> 2359 <1> %endif 2360 <1> 2361 <1> %if _PM 2362 00007257 43616E6E6F74206163- <1> .ofs32: asciz "Cannot access 16-bit segment with 32-bit offset.",13,10 2362 00007260 636573732031362D62- <1> 2362 00007269 6974207365676D656E- <1> 2362 00007272 742077697468203332- <1> 2362 0000727B 2D626974206F666673- <1> 2362 00007284 65742E0D0A00 <1> 2363 <1> %endif 2364 <1> 2365 <1> 2366 <1> %define smcb_messages ..@notype,"" 2367 <1> 2368 <1> %imacro smcbtype 2.nolist 2369 <1> dw %2, %%label 2370 <1> %defstr %%str %1 2371 <1> %xdefine smcb_messages smcb_messages,%%label,%%str 2372 <1> %endmacro 2373 <1> 2374 <1> %imacro smcbmsg 2-*.nolist 2375 <1> %if %0 & 1 2376 <1> %error Expected even number of parameters 2377 <1> %endif 2378 <1> %rotate 2 2379 <1> %rep (%0 - 2) / 2 2380 <1> %1: asciz %2 2381 <1> %rotate 2 2382 <1> %endrep 2383 <1> %endmacro 2384 <1> 2385 0000728A 00 <1> align 4, db 0 2386 <1> smcbtypes: 2387 0000728C 0000[0873] <1> smcbtype S_OTHER, 00h 2388 00007290 0100[1073] <1> smcbtype S_DOSENTRY, 01h 2389 00007294 0200[1B73] <1> smcbtype S_DOSCODE, 02h 2390 00007298 0300[2573] <1> smcbtype S_DOSDATA, 03h 2391 0000729C 0400[2F73] <1> smcbtype S_IRQSCODE, 04h 2392 000072A0 0500[3A73] <1> smcbtype S_IRQSDATA, 05h 2393 000072A4 0600[4573] <1> smcbtype S_CDS, 06h 2394 000072A8 0700[4B73] <1> smcbtype S_LFNCDS, 07h 2395 000072AC 0800[5473] <1> smcbtype S_DPB, 08h 2396 000072B0 0900[5A73] <1> smcbtype S_UPB, 09h 2397 000072B4 0A00[6073] <1> smcbtype S_SFT, 0Ah 2398 000072B8 0B00[6673] <1> smcbtype S_FCBSFT, 0Bh 2399 000072BC 0C00[6F73] <1> smcbtype S_CCB, 0Ch 2400 000072C0 0D00[7573] <1> smcbtype S_IRT, 0Dh 2401 000072C4 0E00[7B73] <1> smcbtype S_SECTOR, 0Eh 2402 000072C8 0F00[8473] <1> smcbtype S_NLS, 0Fh 2403 000072CC 1000[8A73] <1> smcbtype S_EBDA, 10h 2404 000072D0 1900[9173] <1> smcbtype S_INITCONFIG, 19h 2405 000072D4 1A00[9E73] <1> smcbtype S_INITFATSEG, 1Ah 2406 000072D8 1B00[AB73] <1> smcbtype S_INITSECTORSEG, 1Bh 2407 000072DC 1C00[BB73] <1> smcbtype S_INITSTACKBPB,1Ch 2408 000072E0 1D00[CA73] <1> smcbtype S_INITPSP, 1Dh 2409 000072E4 1E00[D473] <1> smcbtype S_ENVIRONMENT, 1Eh 2410 000072E8 1F00[E273] <1> smcbtype S_INITIALIZE, 1Fh 2411 000072EC 2000[EF73] <1> smcbtype S_DEVICE, 20h ; Device 2412 000072F0 2100[F873] <1> smcbtype S_DEVICEMEMORY,21h ; Allocated by device 2413 000072F4 3000[0774] <1> smcbtype S_EXCLDUMA, 30h ; Excluded UMA 2414 000072F8 3100[1274] <1> smcbtype S_EXCLDUMASUB, 31h ; Excluded UMA with sub-chain of used MCBs 2415 000072FC 3200[2074] <1> smcbtype S_EXCLDLH, 32h ; Excluded by LH 2416 00007300 3300[2A74] <1> smcbtype S_EXCLDDOS, 33h 2417 00007304 FFFFFFFF <1> dw -1, -1 2418 <1> 2419 00007308 535F4F544845520053- <1> smcbmsg smcb_messages 2419 00007311 5F444F53454E545259- <1> 2419 0000731A 00535F444F53434F44- <1> 2419 00007323 4500535F444F534441- <1> 2419 0000732C 544100535F49525153- <1> 2419 00007335 434F444500535F4952- <1> 2419 0000733E 51534441544100535F- <1> 2419 00007347 43445300535F4C464E- <1> 2419 00007350 43445300535F445042- <1> 2419 00007359 00535F55504200535F- <1> 2419 00007362 53465400535F464342- <1> 2419 0000736B 53465400535F434342- <1> 2419 00007374 00535F49525400535F- <1> 2419 0000737D 534543544F5200535F- <1> 2419 00007386 4E4C5300535F454244- <1> 2419 0000738F 4100535F494E495443- <1> 2419 00007398 4F4E46494700535F49- <1> 2419 000073A1 4E4954464154534547- <1> 2419 000073AA 00535F494E49545345- <1> 2419 000073B3 43544F525345470053- <1> 2419 000073BC 5F494E495453544143- <1> 2419 000073C5 4B42504200535F494E- <1> 2419 000073CE 495450535000535F45- <1> 2419 000073D7 4E5649524F4E4D454E- <1> 2419 000073E0 5400535F494E495449- <1> 2419 000073E9 414C495A4500535F44- <1> 2419 000073F2 455649434500535F44- <1> 2419 000073FB 45564943454D454D4F- <1> 2419 00007404 525900535F4558434C- <1> 2419 0000740D 44554D4100535F4558- <1> 2419 00007416 434C44554D41535542- <1> 2419 0000741F 00535F4558434C444C- <1> 2419 00007428 4800535F4558434C44- <1> 2419 00007431 444F5300 <1> 2420 <1> 2421 00007435 756E6B6E6F776E00 <1> smcbmsg_unknown: asciz "unknown" 2422 <1> 2423 <1> %undef smcb_messages 2424 <1> %unimacro smcbtype 2.nolist 2425 <1> %unimacro smcbmsg 2-*.nolist 2426 <1> 2427 0000743D 5E204572726F7207 <1> errcarat: db "^ Error",7 2428 00007445 0D0A00 <1> crlf: asciz 13,10 2429 <1> 2430 <1> 2431 <1> align 4, db 0 2432 <1> msgtable_value_range: 2433 00007448 [1F67][2967] <1> dw msg.executing, msg.executing_value_range 2434 <1> %if _ACCESS_VARIABLES_AMOUNT 2435 0000744C [5E74][6674] <1> dw .reading, .reading_range 2436 00007450 [E174][E974] <1> dw .writing, .writing_range 2437 00007454 [6475][6F75] <1> dw .memoperand, .memoperand_range 2438 00007458 [8075][8A75] <1> dw .accessing, .accessing_range 2439 <1> %endif 2440 0000745C 0000 <1> dw 0 2441 <1> 2442 <1> %if _ACCESS_VARIABLES_AMOUNT 2443 0000745E 52454144494E4700 <1> .reading: asciz "READING" 2444 <1> .reading_range: 2445 <1> %assign iicounter 0 2446 <1> %define iiprefix "" 2447 <1> %rep _ACCESS_VARIABLES_AMOUNT 2448 <1> _autohexitsstrdef IIDEF, iicounter 2449 <1> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2450 <1> %assign iicounter iicounter + 1 2451 <1> %define iiprefix ", " 2452 <1> %endrep 2448 <2> _autohexitsstrdef IIDEF, iicounter 2449 00007466 46524F4D2072656164- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2449 0000746F 61647230204C454E47- <2> 2449 00007478 544820726561646C65- <2> 2449 00007481 6E30 <2> 2450 <2> %assign iicounter iicounter + 1 2451 <2> %define iiprefix ", " 2448 <2> _autohexitsstrdef IIDEF, iicounter 2449 00007483 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2449 0000748C 616461647231204C45- <2> 2449 00007495 4E4754482072656164- <2> 2449 0000749E 6C656E31 <2> 2450 <2> %assign iicounter iicounter + 1 2451 <2> %define iiprefix ", " 2448 <2> _autohexitsstrdef IIDEF, iicounter 2449 000074A2 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2449 000074AB 616461647232204C45- <2> 2449 000074B4 4E4754482072656164- <2> 2449 000074BD 6C656E32 <2> 2450 <2> %assign iicounter iicounter + 1 2451 <2> %define iiprefix ", " 2448 <2> _autohexitsstrdef IIDEF, iicounter 2449 000074C1 2C2046524F4D207265- <2> db iiprefix,"FROM readadr",_IIDEF," LENGTH readlen",_IIDEF 2449 000074CA 616461647233204C45- <2> 2449 000074D3 4E4754482072656164- <2> 2449 000074DC 6C656E33 <2> 2450 <2> %assign iicounter iicounter + 1 2451 <2> %define iiprefix ", " 2453 000074E0 00 <1> asciz 2454 000074E1 57524954494E4700 <1> .writing: asciz "WRITING" 2455 <1> .writing_range: 2456 <1> %assign iicounter 0 2457 <1> %define iiprefix "" 2458 <1> %rep _ACCESS_VARIABLES_AMOUNT 2459 <1> _autohexitsstrdef IIDEF, iicounter 2460 <1> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2461 <1> %assign iicounter iicounter + 1 2462 <1> %define iiprefix ", " 2463 <1> %endrep 2459 <2> _autohexitsstrdef IIDEF, iicounter 2460 000074E9 46524F4D2077726974- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2460 000074F2 61647230204C454E47- <2> 2460 000074FB 544820777269746C65- <2> 2460 00007504 6E30 <2> 2461 <2> %assign iicounter iicounter + 1 2462 <2> %define iiprefix ", " 2459 <2> _autohexitsstrdef IIDEF, iicounter 2460 00007506 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2460 0000750F 697461647231204C45- <2> 2460 00007518 4E4754482077726974- <2> 2460 00007521 6C656E31 <2> 2461 <2> %assign iicounter iicounter + 1 2462 <2> %define iiprefix ", " 2459 <2> _autohexitsstrdef IIDEF, iicounter 2460 00007525 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2460 0000752E 697461647232204C45- <2> 2460 00007537 4E4754482077726974- <2> 2460 00007540 6C656E32 <2> 2461 <2> %assign iicounter iicounter + 1 2462 <2> %define iiprefix ", " 2459 <2> _autohexitsstrdef IIDEF, iicounter 2460 00007544 2C2046524F4D207772- <2> db iiprefix,"FROM writadr",_IIDEF," LENGTH writlen",_IIDEF 2460 0000754D 697461647233204C45- <2> 2460 00007556 4E4754482077726974- <2> 2460 0000755F 6C656E33 <2> 2461 <2> %assign iicounter iicounter + 1 2462 <2> %define iiprefix ", " 2464 00007563 00 <1> asciz 2465 <1> 2466 00007564 4D454D4F504552414E- <1> .memoperand: asciz "MEMOPERAND" 2466 0000756D 4400 <1> 2467 0000756F 52454144494E472C20- <1> .memoperand_range: asciz "READING, WRITING" 2467 00007578 57524954494E4700 <1> 2468 00007580 414343455353494E47- <1> .accessing: asciz "ACCESSING" 2468 00007589 00 <1> 2469 0000758A 52454144494E472C20- <1> .accessing_range: asciz "READING, WRITING, EXECUTING" 2469 00007593 57524954494E472C20- <1> 2469 0000759C 455845435554494E47- <1> 2469 000075A5 00 <1> 2470 <1> %endif 2471 <1> 2472 <1> 2473 <1> %if _BOOTLDR 2474 <1> %define lot_list 2475 <1> %define lot_comma 2476 <1> %macro lot_entry 2.nolist 2477 <1> LOAD_%2 equ %1 2478 <1> dw LOAD_%2, .%2 2479 <1> %defstr %%string %2 2480 <1> %xdefine lot_list lot_list lot_comma .%2:, db %%string, db 0 2481 <1> %define lot_comma , 2482 <1> %endmacro 2483 <1> 2484 <1> %macro lot_messages 0-*.nolist 2485 <1> %rep (%0 / 3) 2486 <1> %1 2487 <1> %2 2488 <1> %3 2489 <1> %rotate 3 2490 <1> %endrep 2491 <1> %endmacro 2492 <1> 2493 000075A6 00 <1> align 4, db 0 2494 <1> loadoptiontable: 2495 000075A8 0100[1476] <1> lot_entry 1, SET_DL_UNIT 2496 000075AC 0200[2076] <1> lot_entry 2, SET_BL_UNIT 2497 000075B0 0400[2C76] <1> lot_entry 4, SET_SIDI_CLUSTER 2498 000075B4 1000[3D76] <1> lot_entry 10h, SET_DSSI_DPT 2499 000075B8 2000[4A76] <1> lot_entry 20h, PUSH_DPT 2500 000075BC 4000[5376] <1> lot_entry 40h, DATASTART_HIDDEN 2501 000075C0 8000[6476] <1> lot_entry 80h, SET_AXBX_DATASTART 2502 000075C4 0001[7776] <1> lot_entry 100h, SET_DSBP_BPB 2503 000075C8 0002[8476] <1> lot_entry 200h, LBA_SET_TYPE 2504 000075CC 0004[9176] <1> lot_entry 400h, MESSAGE_TABLE 2505 000075D0 0008[9F76] <1> lot_entry 800h, SET_AXBX_ROOT_HIDDEN 2506 000075D4 0010[B476] <1> lot_entry 1000h, CMDLINE 2507 000075D8 0020[BC76] <1> lot_entry 2000h, NO_BPB 2508 000075DC 0040[C376] <1> lot_entry 4000h, SET_DSSI_PARTINFO 2509 000075E0 00000000 <1> dw 0, 0 2510 <1> 2511 <1> .incompatible: 2512 000075E4 02008000 <1> dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_DATASTART 2513 000075E8 02000008 <1> dw LOAD_SET_BL_UNIT, LOAD_SET_AXBX_ROOT_HIDDEN 2514 000075EC 80000008 <1> dw LOAD_SET_AXBX_DATASTART, LOAD_SET_AXBX_ROOT_HIDDEN 2515 000075F0 04001000 <1> dw LOAD_SET_SIDI_CLUSTER, LOAD_SET_DSSI_DPT 2516 000075F4 00011000 <1> dw LOAD_SET_DSBP_BPB, LOAD_SET_DSSI_DPT 2517 000075F8 00200001 <1> dw LOAD_NO_BPB, LOAD_SET_DSBP_BPB 2518 000075FC 00200002 <1> dw LOAD_NO_BPB, LOAD_LBA_SET_TYPE 2519 00007600 00200004 <1> dw LOAD_NO_BPB, LOAD_MESSAGE_TABLE 2520 00007604 00400400 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_SIDI_CLUSTER 2521 00007608 00401000 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSSI_DPT 2522 0000760C 00400001 <1> dw LOAD_SET_DSSI_PARTINFO, LOAD_SET_DSBP_BPB 2523 00007610 00000000 <1> dw 0, 0 2524 <1> 2525 00007614 5345545F444C5F554E- <1> lot_messages lot_list 2525 0000761D 4954005345545F424C- <1> 2525 00007626 5F554E495400534554- <1> 2525 0000762F 5F534944495F434C55- <1> 2525 00007638 53544552005345545F- <1> 2525 00007641 445353495F44505400- <1> 2525 0000764A 505553485F44505400- <1> 2525 00007653 444154415354415254- <1> 2525 0000765C 5F48494444454E0053- <1> 2525 00007665 45545F415842585F44- <1> 2525 0000766E 415441535441525400- <1> 2525 00007677 5345545F445342505F- <1> 2525 00007680 425042004C42415F53- <1> 2525 00007689 45545F54595045004D- <1> 2525 00007692 4553534147455F5441- <1> 2525 0000769B 424C45005345545F41- <1> 2525 000076A4 5842585F524F4F545F- <1> 2525 000076AD 48494444454E00434D- <1> 2525 000076B6 444C494E45004E4F5F- <1> 2525 000076BF 425042005345545F44- <1> 2525 000076C8 5353495F5041525449- <1> 2525 000076D1 4E464F00 <1> 2526 <1> 2527 <1> %unmacro lot_entry 2.nolist 2528 <1> %unmacro lot_messages 0-*.nolist 2529 <1> 2530 <1> 2531 <1> msdos7_message_table: 2532 <1> ; the first four bytes give displacements to the various 2533 <1> ; messages. an ASCIZ message indicates that this was the 2534 <1> ; last message. a message terminated by 0FFh indicates 2535 <1> ; that the last message (displacement at table + 3) is 2536 <1> ; to follow after this message. 2537 <1> ; the maximum allowed displacement is 7Fh. the minimum 2538 <1> ; allowed displacement is 1, to avoid a zero displacement. 2539 <1> ; only the last message is terminated by a zero byte, 2540 <1> ; as that zero byte indicates the end of the message table. 2541 <1> ; (the entire table is treated as one ASCIZ string.) 2542 <1> ; MS-DOS 7.10 from MSW 98 SE seems to have at least 167h (359) 2543 <1> ; bytes allocated to its buffer for these. 2544 <1> ; 2545 <1> ; this message table was discussed in a dosemu2 repo at 2546 <1> ; https://github.com/stsp/dosemu2/issues/681 2547 000076D5 03 <1> .: db .msg_invalid_system - ($ + 1) 2548 000076D6 13 <1> db .msg_io_error - ($ + 1) 2549 000076D7 01 <1> db .msg_invalid_system - ($ + 1) 2550 000076D8 1D <1> db .msg_press_any_key - ($ + 1) 2551 <1> 2552 <1> .msg_invalid_system: 2553 000076D9 0D0A496E76616C6964- <1> db 13,10,"Invalid system", -1 2553 000076E2 2073797374656DFF <1> 2554 <1> 2555 <1> .msg_io_error: 2556 000076EA 0D0A492F4F20657272- <1> db 13,10,"I/O error", -1 2556 000076F3 6F72FF <1> 2557 <1> 2558 <1> .msg_press_any_key: 2559 000076F6 0D0A4368616E676520- <1> db 13,10,"Change disk and press any key",13,10,0 2559 000076FF 6469736B20616E6420- <1> 2559 00007708 707265737320616E79- <1> 2559 00007711 206B65790D0A00 <1> 2560 <1> .end: 2561 <1> .size: equ .end - . 2562 <1> 2563 <1> %if .size > 150h 2564 <1> %error Message table too large! 2565 <1> %endif 2566 <1> 2567 <1> 2568 <1> 2569 <1> align 4, db 0 2570 <1> loadsettings: 2571 <1> istruc LOADSETTINGS 2572 00007718 [1664] <1> at lsKernelName, dw msg.ldos_kernel_name 2573 0000771A [8C64] <1> at lsAddName, dw msg.addname_empty 2574 0000771C 6000 <1> at lsMinPara, dw 60h 2575 0000771E 0000 <1> at lsMaxPara, dw 0 2576 00007720 0010 <1> at lsOptions, dw LOAD_CMDLINE 2577 00007722 0002 <1> at lsSegment, dw 200h 2578 00007724 00040000 <1> at lsEntry, dd 400h 2579 00007728 007CFFFF <1> at lsBPB, dw 7C00h, -1 2580 0000772C FC03 <1> at lsCheckOffset, dw 1020 2581 0000772E 6C44 <1> at lsCheckValue, db "lD" 2582 00007730 4C444F5300 <1> at lsName, asciz "LDOS" 2583 00007735 00 <1> iend 2584 <1> istruc LOADSETTINGS 2585 00007738 [F963] <1> at lsKernelName, dw msg.freedos_kernel_name 2586 0000773A [8C64] <1> at lsAddName, dw msg.addname_empty 2587 0000773C 2000 <1> at lsMinPara, dw 20h 2588 0000773E FFFF <1> at lsMaxPara, dw -1 2589 00007740 0300 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 2590 00007742 6000 <1> at lsSegment, dw 60h 2591 00007744 00000000 <1> at lsEntry, dd 0 2592 00007748 007CFFFF <1> at lsBPB, dw 7C00h, -1 2593 0000774C 0046524545- <1> at lsName, asciz "FREEDOS" 2593 00007754 444F5300 <1> 2594 <1> iend 2595 <1> istruc LOADSETTINGS 2596 00007758 [0464] <1> at lsKernelName, dw msg.dosc_kernel_name 2597 0000775A [8C64] <1> at lsAddName, dw msg.addname_empty 2598 0000775C 2000 <1> at lsMinPara, dw 20h 2599 0000775E FFFF <1> at lsMaxPara, dw -1 2600 00007760 0300 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT 2601 00007762 0020 <1> at lsSegment, dw 2000h 2602 00007764 00000000 <1> at lsEntry, dd 0 2603 00007768 007C0000 <1> at lsBPB, dw 7C00h, 0 2604 0000776C 00444F5343- <1> at lsName, asciz "DOSC" 2604 00007774 00 <1> 2605 00007775 00 <1> iend 2606 <1> istruc LOADSETTINGS 2607 00007778 [0C64] <1> at lsKernelName, dw msg.edrdos_kernel_name 2608 0000777A [8C64] <1> at lsAddName, dw msg.addname_empty 2609 0000777C 2000 <1> at lsMinPara, dw 20h 2610 0000777E FFFF <1> at lsMaxPara, dw -1 2611 00007780 0301 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_BL_UNIT | LOAD_SET_DSBP_BPB 2613 00007782 7000 <1> at lsSegment, dw 70h 2614 00007784 00000000 <1> at lsEntry, dd 0 2615 00007788 007CFFFF <1> at lsBPB, dw 7C00h, -1 2616 0000778C 0045445244- <1> at lsName, asciz "EDRDOS" 2616 00007794 4F5300 <1> 2617 00007797 00 <1> iend 2618 <1> istruc LOADSETTINGS 2619 00007798 [1F64] <1> at lsKernelName, dw msg.msdos6_kernel_name 2620 0000779A [2664] <1> at lsAddName, dw msg.msdos6_add_name 2621 0000779C 2000 <1> at lsMinPara, dw 20h 2622 0000779E 6000 <1> at lsMaxPara, dw 60h 2623 000077A0 F100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2626 000077A2 7000 <1> at lsSegment, dw 70h 2627 000077A4 00000000 <1> at lsEntry, dd 0 2628 000077A8 007C0000 <1> at lsBPB, dw 7C00h, 0 2629 000077AC 004D53444F- <1> at lsName, asciz "MSDOS6" 2629 000077B4 533600 <1> 2630 000077B7 00 <1> iend 2631 <1> istruc LOADSETTINGS 2632 000077B8 [6164] <1> at lsKernelName, dw msg.rxdos.0_kernel_name 2633 000077BA [7864] <1> at lsAddName, dw msg.rxdos.0_add_name 2634 000077BC 2000 <1> at lsMinPara, dw 20h 2635 000077BE 6000 <1> at lsMaxPara, dw 60h 2636 000077C0 3108 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2638 000077C2 7000 <1> at lsSegment, dw 70h 2639 000077C4 00000000 <1> at lsEntry, dd 0 2640 000077C8 007C0000 <1> at lsBPB, dw 7C00h, 0 2641 000077CC 005258444F- <1> at lsName, asciz "RXDOS.0" 2641 000077D4 532E3000 <1> 2642 <1> iend 2643 <1> istruc LOADSETTINGS 2644 000077D8 [6E64] <1> at lsKernelName, dw msg.rxdos.1_kernel_name 2645 000077DA [7864] <1> at lsAddName, dw msg.rxdos.1_add_name 2646 000077DC 2000 <1> at lsMinPara, dw 20h 2647 000077DE 6000 <1> at lsMaxPara, dw 60h 2648 000077E0 3108 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_ROOT_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2650 000077E2 7000 <1> at lsSegment, dw 70h 2651 000077E4 00000000 <1> at lsEntry, dd 0 2652 000077E8 007C0000 <1> at lsBPB, dw 7C00h, 0 2653 000077EC 005258444F- <1> at lsName, asciz "RXDOS.1" 2653 000077F4 532E3100 <1> 2654 <1> iend 2655 <1> istruc LOADSETTINGS 2656 000077F8 [8264] <1> at lsKernelName, dw msg.rxdos.2_kernel_name 2657 000077FA [8C64] <1> at lsAddName, dw msg.addname_empty 2658 000077FC 6000 <1> at lsMinPara, dw 60h 2659 000077FE 0000 <1> at lsMaxPara, dw 0 2660 00007800 0010 <1> at lsOptions, dw LOAD_CMDLINE 2661 00007802 7000 <1> at lsSegment, dw 70h 2662 00007804 00040000 <1> at lsEntry, dd 400h 2663 00007808 007CFFFF <1> at lsBPB, dw 7C00h, -1 2664 0000780C 005258444F- <1> at lsName, asciz "RXDOS.2" 2664 00007814 532E3200 <1> 2665 <1> iend 2666 <1> istruc LOADSETTINGS 2667 00007818 [8264] <1> at lsKernelName, dw msg.rxdos.2_kernel_name 2668 0000781A [8C64] <1> at lsAddName, dw msg.addname_empty 2669 0000781C 6000 <1> at lsMinPara, dw 60h 2670 0000781E 0000 <1> at lsMaxPara, dw 0 2671 00007820 0010 <1> at lsOptions, dw LOAD_CMDLINE 2672 00007822 0002 <1> at lsSegment, dw 200h 2673 00007824 00040000 <1> at lsEntry, dd 400h 2674 00007828 007CFFFF <1> at lsBPB, dw 7C00h, -1 2675 0000782C FC03 <1> at lsCheckOffset, dw 1020 2676 0000782E 6C44 <1> at lsCheckValue, db "lD" 2677 00007830 5258444F532E3300 <1> at lsName, asciz "RXDOS.3" 2678 <1> iend 2679 <1> istruc LOADSETTINGS 2680 00007838 [3064] <1> at lsKernelName, dw msg.ibmdos_kernel_name 2681 0000783A [3B64] <1> at lsAddName, dw msg.ibmdos_add_name 2682 0000783C 2000 <1> at lsMinPara, dw 20h 2683 0000783E 8000 <1> at lsMaxPara, dw 80h 2684 00007840 F100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_AXBX_DATASTART | LOAD_DATASTART_HIDDEN | LOAD_SET_DSSI_DPT | LOAD_PUSH_DPT 2687 00007842 7000 <1> at lsSegment, dw 70h 2688 00007844 00000000 <1> at lsEntry, dd 0 2689 00007848 007C0000 <1> at lsBPB, dw 7C00h, 0 2690 0000784C 0049424D44- <1> at lsName, asciz "IBMDOS" 2690 00007854 4F5300 <1> 2691 00007857 00 <1> iend 2692 <1> istruc LOADSETTINGS 2693 00007858 [1F64] <1> at lsKernelName, dw msg.msdos7_kernel_name 2694 0000785A [8C64] <1> at lsAddName, dw msg.addname_empty 2695 0000785C 4000 <1> at lsMinPara, dw 40h 2696 0000785E 8000 <1> at lsMaxPara, dw 80h 2697 00007860 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 2700 00007862 7000 <1> at lsSegment, dw 70h 2701 00007864 00020000 <1> at lsEntry, dd 200h 2702 00007868 007CFFFF <1> at lsBPB, dw 7C00h, -1 2703 0000786C 0002 <1> at lsCheckOffset, dw 200h 2704 0000786E 424A <1> at lsCheckValue, db "BJ" 2705 00007870 4D53444F533700 <1> at lsName, asciz "MSDOS7" 2706 00007877 00 <1> iend 2707 <1> istruc LOADSETTINGS 2708 00007878 [4664] <1> at lsKernelName, dw msg.ntldr_kernel_name 2709 0000787A [8C64] <1> at lsAddName, dw msg.addname_empty 2710 0000787C 2000 <1> at lsMinPara, dw 20h 2711 0000787E FFFF <1> at lsMaxPara, dw -1 2712 00007880 4100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 2714 00007882 0020 <1> at lsSegment, dw 2000h 2715 00007884 00000000 <1> at lsEntry, dd 0 2716 00007888 007C0000 <1> at lsBPB, dw 7C00h, 0 2717 0000788C 004E544C44- <1> at lsName, asciz "NTLDR" 2717 00007894 5200 <1> 2718 00007896 00 <1> iend 2719 <1> istruc LOADSETTINGS 2720 00007898 [4C64] <1> at lsKernelName, dw msg.bootmgr_kernel_name 2721 0000789A [8C64] <1> at lsAddName, dw msg.addname_empty 2722 0000789C 2000 <1> at lsMinPara, dw 20h 2723 0000789E FFFF <1> at lsMaxPara, dw -1 2724 000078A0 4100 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_DATASTART_HIDDEN 2726 000078A2 0020 <1> at lsSegment, dw 2000h 2727 000078A4 00000000 <1> at lsEntry, dd 0 2728 000078A8 007C0000 <1> at lsBPB, dw 7C00h, 0 2729 000078AC 00424F4F54- <1> at lsName, asciz "BOOTMGR" 2729 000078B4 4D475200 <1> 2730 <1> iend 2731 <1> istruc LOADSETTINGS 2732 000078B8 [5464] <1> at lsKernelName, dw msg.chain_kernel_name 2733 000078BA [8C64] <1> at lsAddName, dw msg.addname_empty 2734 000078BC 2000 <1> at lsMinPara, dw paras(512) 2735 000078BE 0002 <1> at lsMaxPara, dw paras(8192) 2736 000078C0 0160 <1> at lsOptions, dw LOAD_SET_DL_UNIT | LOAD_SET_DSSI_PARTINFO | LOAD_NO_BPB 2738 000078C2 C007 <1> at lsSegment, dw 7C0h 2739 000078C4 007C40F8 <1> at lsEntry, dw 7C00h, -7C0h 2740 000078C8 007C0000 <1> at lsBPB, dw 7C00h, 0 2741 000078CC FE01 <1> at lsCheckOffset, dw 510 2742 000078CE 55AA <1> at lsCheckValue, dw 0AA55h 2743 000078D0 434841494E00 <1> at lsName, asciz "CHAIN" 2744 000078D6 00 <1> iend 2745 000078D8 0000 <1> dw 0 2746 <1> %endif 2747 <1> 2748 <1> 2749 000078DA 0D21 <1> dskerrs: db dskerr0-dskerrs,dskerr1-dskerrs 2750 000078DC 3444 <1> db dskerr2-dskerrs,dskerr3-dskerrs 2751 000078DE 5494 <1> db dskerr4-dskerrs,dskerr9-dskerrs 2752 000078E0 6570 <1> db dskerr6-dskerrs,dskerr7-dskerrs 2753 000078E2 8394 <1> db dskerr8-dskerrs,dskerr9-dskerrs 2754 000078E4 A2AE <1> db dskerra-dskerrs,dskerrb-dskerrs 2755 000078E6 B9 <1> db dskerrc-dskerrs 2756 000078E7 57726974652070726F- <1> dskerr0: asciz "Write protect error" 2756 000078F0 74656374206572726F- <1> 2756 000078F9 7200 <1> 2757 000078FB 556E6B6E6F776E2075- <1> dskerr1: asciz "Unknown unit error" 2757 00007904 6E6974206572726F72- <1> 2757 0000790D 00 <1> 2758 0000790E 4472697665206E6F74- <1> dskerr2: asciz "Drive not ready" 2758 00007917 20726561647900 <1> 2759 0000791E 556E6B6E6F776E2063- <1> dskerr3: asciz "Unknown command" 2759 00007927 6F6D6D616E6400 <1> 2760 0000792E 44617461206572726F- <1> dskerr4: asciz "Data error (CRC)" 2760 00007937 7220284352432900 <1> 2761 0000793F 5365656B206572726F- <1> dskerr6: asciz "Seek error" 2761 00007948 7200 <1> 2762 0000794A 556E6B6E6F776E206D- <1> dskerr7: asciz "Unknown media type" 2762 00007953 656469612074797065- <1> 2762 0000795C 00 <1> 2763 0000795D 536563746F72206E6F- <1> dskerr8: asciz "Sector not found" 2763 00007966 7420666F756E6400 <1> 2764 0000796E 556E6B6E6F776E2065- <1> dskerr9: asciz "Unknown error" 2764 00007977 72726F7200 <1> 2765 0000797C 577269746520666175- <1> dskerra: asciz "Write fault" 2765 00007985 6C7400 <1> 2766 00007988 52656164206661756C- <1> dskerrb: asciz "Read fault" 2766 00007991 7400 <1> 2767 00007993 47656E6572616C2066- <1> dskerrc: asciz "General failure" 2767 0000799C 61696C75726500 <1> 2768 000079A3 207265616400 <1> reading: asciz " read" 2769 000079A9 207772697400 <1> writing: asciz " writ" 2770 000079AF 696E67206472697665- <1> drive: db "ing drive " 2770 000079B8 20 <1> 2771 000079B9 5F00 <1> driveno: asciz "_" 2772 000079BB 383038362F383800 <1> msg8088: asciz "8086/88" 2773 000079C3 78383600 <1> msgx86: asciz "x86" 2774 000079C7 20776974686F757420- <1> no_copr: asciz " without coprocessor" 2774 000079D0 636F70726F63657373- <1> 2774 000079D9 6F7200 <1> 2775 000079DC 207769746820636F70- <1> has_copr: asciz " with coprocessor" 2775 000079E5 726F636573736F7200 <1> 2776 000079EE 207769746820323837- <1> has_287: asciz " with 287" 2776 000079F7 00 <1> 2777 000079F8 7472616365206D6F64- <1> tmodes: db "trace mode is " 2777 00007A01 6520697320 <1> 2778 00007A06 5F202D20696E746572- <1> tmodev: asciz "_ - interrupts are " 2778 00007A0F 727570747320617265- <1> 2778 00007A18 2000 <1> 2779 00007A1A 74726163656400 <1> tmode1: asciz "traced" 2780 00007A21 70726F636573736564- <1> tmode0: asciz "processed" 2780 00007A2A 00 <1> 2781 00007A2B 2028756E7573656429- <1> unused: asciz " (unused)" 2781 00007A34 00 <1> 2782 <1> needsmsg: 2783 00007A35 5B6E6565647320 <1> .: db "[needs " 2784 <1> .digit_x_ofs: equ $ - . 2785 00007A3C 7838 <1> db "x8" 2786 <1> .digit_6_ofs: equ $ - . 2787 00007A3E 365D <1> db "6]" 2788 <1> needsmsg_L: equ $-needsmsg 2789 00007A40 5B6E65656473206D61- <1> needsmath: db "[needs math coprocessor]" 2789 00007A49 746820636F70726F63- <1> 2789 00007A52 6573736F725D <1> 2790 <1> needsmath_L: equ $-needsmath 2791 00007A58 5B6F62736F6C657465- <1> obsolete: db "[obsolete]" 2791 00007A61 5D <1> 2792 <1> obsolete_L: equ $-obsolete 2793 00007A62 446976696465206572- <1> int0msg: asciz "Divide error",13,10 2793 00007A6B 726F720D0A00 <1> 2794 00007A71 556E65787065637465- <1> int1msg: asciz "Unexpected single-step interrupt",13,10 2794 00007A7A 642073696E676C652D- <1> 2794 00007A83 7374657020696E7465- <1> 2794 00007A8C 72727570740D0A00 <1> 2795 00007A94 556E65787065637465- <1> int3msg: asciz "Unexpected breakpoint interrupt",13,10 2795 00007A9D 6420627265616B706F- <1> 2795 00007AA6 696E7420696E746572- <1> 2795 00007AAF 727570740D0A00 <1> 2796 <1> %if _CATCHINT06 2797 00007AB6 496E76616C6964206F- <1> int6msg: asciz "Invalid opcode",13,10 2797 00007ABF 70636F64650D0A00 <1> 2798 <1> %endif 2799 <1> %if _CATCHINT08 2800 00007AC7 446574656374656420- <1> int8msg: asciz "Detected Control pressed 5 seconds",13,10 2800 00007AD0 436F6E74726F6C2070- <1> 2800 00007AD9 726573736564203520- <1> 2800 00007AE2 7365636F6E64730D0A- <1> 2800 00007AEB 00 <1> 2801 00007AEC 446574656374656420- <1> int8_kbd_msg: asciz "Detected Control pressed 5 seconds (Keyboard enabled)",13,10 2801 00007AF5 436F6E74726F6C2070- <1> 2801 00007AFE 726573736564203520- <1> 2801 00007B07 7365636F6E64732028- <1> 2801 00007B10 4B6579626F61726420- <1> 2801 00007B19 656E61626C6564290D- <1> 2801 00007B22 0A00 <1> 2802 <1> runint_ctrlc_msg: 2803 00007B24 446574656374656420- <1> asciz "Detected double Control-C via serial",13,10 2803 00007B2D 646F75626C6520436F- <1> 2803 00007B36 6E74726F6C2D432076- <1> 2803 00007B3F 69612073657269616C- <1> 2803 00007B48 0D0A00 <1> 2804 <1> %endif 2805 <1> %if _CATCHINT18 2806 00007B4B 4469736B6C65737320- <1> int18msg: asciz "Diskless boot hook called",13,10 2806 00007B54 626F6F7420686F6F6B- <1> 2806 00007B5D 2063616C6C65640D0A- <1> 2806 00007B66 00 <1> 2807 <1> %endif 2808 <1> %if _CATCHINT19 2809 00007B67 426F6F74206C6F6164- <1> int19msg: asciz "Boot load called",13,10 2809 00007B70 2063616C6C65640D0A- <1> 2809 00007B79 00 <1> 2810 <1> %endif 2811 <1> %if _PM 2812 <1> %if _CATCHEXC06 2813 00007B7A 496E76616C6964206F- <1> exc6msg: asciz "Invalid opcode fault",13,10 2813 00007B83 70636F646520666175- <1> 2813 00007B8C 6C740D0A00 <1> 2814 <1> %endif 2815 <1> %if _CATCHEXC0C 2816 00007B91 537461636B20666175- <1> excCmsg: asciz "Stack fault",13,10 2816 00007B9A 6C740D0A00 <1> 2817 <1> %endif 2818 00007B9F 47656E6572616C2070- <1> excDmsg: asciz "General protection fault",13,10 2818 00007BA8 726F74656374696F6E- <1> 2818 00007BB1 206661756C740D0A00 <1> 2819 <1> %if _EXCCSIP 2820 00007BBA 43533A49503D <1> excloc: db "CS:IP=" 2821 00007BC0 202020203A20202020- <1> exccsip: asciz " : ",13,10 2821 00007BC9 0D0A00 <1> 2822 <1> %endif 2823 00007BCC 50616765206661756C- <1> excEmsg: asciz "Page fault",13,10 2823 00007BD5 740D0A00 <1> 2824 00007BD9 436F6D6D616E64206E- <1> nodosext: asciz "Command not supported in protected mode without a DOS extender",13,10 2824 00007BE2 6F7420737570706F72- <1> 2824 00007BEB 74656420696E207072- <1> 2824 00007BF4 6F746563746564206D- <1> 2824 00007BFD 6F646520776974686F- <1> 2824 00007C06 7574206120444F5320- <1> 2824 00007C0F 657874656E6465720D- <1> 2824 00007C18 0A00 <1> 2825 00007C1A 436F6D6D616E64206E- <1> nopmsupp: asciz "Command not supported in protected mode",13,10 2825 00007C23 6F7420737570706F72- <1> 2825 00007C2C 74656420696E207072- <1> 2825 00007C35 6F746563746564206D- <1> 2825 00007C3E 6F64650D0A00 <1> 2826 <1> %if _DISPHOOK 2827 00007C44 44504D4920656E7472- <1> dpmihook: db "DPMI entry hooked, new entry=" 2827 00007C4D 7920686F6F6B65642C- <1> 2827 00007C56 206E657720656E7472- <1> 2827 00007C5F 793D <1> 2828 00007C61 5F5F5F5F3A38413736- <1> dpmihookcs: asciz "____:",_4digitshex(mydpmientry+DATASECTIONFIXUP),13,10 2828 00007C6A 0D0A00 <1> 2829 <1> %endif 2830 00007C6D 44504D4920656E7472- <1> msg.dpmi_no_hook: asciz "DPMI entry cannot be hooked!",13,10 2830 00007C76 792063616E6E6F7420- <1> 2830 00007C7F 626520686F6F6B6564- <1> 2830 00007C88 210D0A00 <1> 2831 00007C8C 7265736F7572636520- <1> nodesc: asciz "resource not accessible in real mode",13,10 2831 00007C95 6E6F74206163636573- <1> 2831 00007C9E 7369626C6520696E20- <1> 2831 00007CA7 7265616C206D6F6465- <1> 2831 00007CB0 0D0A00 <1> 2832 <1> ;descwrong: asciz "descriptor not accessible",13,10 2833 00007CB3 67617465206E6F7420- <1> gatewrong: asciz "gate not accessible",13,10 2833 00007CBC 61636365737369626C- <1> 2833 00007CC5 650D0A00 <1> 2834 00007CC9 4D532D444F5300 <1> msg.msdos: asciz "MS-DOS" 2835 00007CD0 5F5F5F5F2062617365- <1> descr: db "____ base=" 2835 00007CD9 3D <1> 2836 00007CDA 5F5F5F5F5F5F5F5F20- <1> descbase: db "________ limit=" 2836 00007CE3 6C696D69743D <1> 2837 00007CE9 5F5F5F5F5F5F5F5F20- <1> desclim: db "________ attr=" 2837 00007CF2 617474723D <1> 2838 00007CF7 5F5F5F5F0D0A <1> descattr: db "____",13,10 2839 00007CFD 00 <1> asciz 2840 <1> %endif ; _PM 2841 00007CFE 4572726F7220696E20- <1> ph_msg: asciz "Error in sequence of calls to hack.",13,10 2841 00007D07 73657175656E636520- <1> 2841 00007D10 6F662063616C6C7320- <1> 2841 00007D19 746F206861636B2E0D- <1> 2841 00007D22 0A00 <1> 2842 <1> 2843 00007D24 0D0A50726F6772616D- <1> progtrm: db 13,10,"Program terminated normally (" 2843 00007D2D 207465726D696E6174- <1> 2843 00007D36 6564206E6F726D616C- <1> 2843 00007D3F 6C792028 <1> 2844 00007D43 5F5F5F5F290D0A00 <1> progexit: asciz "____)",13,10 2845 00007D4B 45584520616E642048- <1> nowhexe: asciz "EXE and HEX files cannot be written",13,10 2845 00007D54 45582066696C657320- <1> 2845 00007D5D 63616E6E6F74206265- <1> 2845 00007D66 207772697474656E0D- <1> 2845 00007D6F 0A00 <1> 2846 00007D71 43616E6E6F74207772- <1> nownull: asciz "Cannot write: no file name given",13,10 2846 00007D7A 6974653A206E6F2066- <1> 2846 00007D83 696C65206E616D6520- <1> 2846 00007D8C 676976656E0D0A00 <1> 2847 00007D94 57726974696E672000 <1> wwmsg1: asciz "Writing " 2848 00007D9D 2062797465730D0A00 <1> wwmsg2: asciz " bytes",13,10 2849 00007DA6 4469736B2066756C6C- <1> diskful: asciz "Disk full",13,10 2849 00007DAF 0D0A00 <1> 2850 00007DB2 4572726F7220 <1> openerr: db "Error " 2851 00007DB8 5F5F5F5F206F70656E- <1> openerr1: asciz "____ opening file",13,10 2851 00007DC1 696E672066696C650D- <1> 2851 00007DCA 0A00 <1> 2852 00007DCC 46696C65206E6F7420- <1> doserr2: asciz "File not found",13,10 2852 00007DD5 666F756E640D0A00 <1> 2853 00007DDD 50617468206E6F7420- <1> doserr3: asciz "Path not found",13,10 2853 00007DE6 666F756E640D0A00 <1> 2854 00007DEE 416363657373206465- <1> doserr5: asciz "Access denied",13,10 2854 00007DF7 6E6965640D0A00 <1> 2855 00007DFE 496E73756666696369- <1> doserr8: asciz "Insufficient memory",13,10 2855 00007E07 656E74206D656D6F72- <1> 2855 00007E10 790D0A00 <1> 2856 <1> 2857 <1> %if _EMS 2858 <1> ;emmname: db "EMMXXXX0" 2859 00007E14 454D53206E6F742069- <1> emsnot: asciz "EMS not installed",13,10 2859 00007E1D 6E7374616C6C65640D- <1> 2859 00007E26 0A00 <1> 2860 00007E28 454D5320696E746572- <1> emserr1: asciz "EMS internal error",13,10 2860 00007E31 6E616C206572726F72- <1> 2860 00007E3A 0D0A00 <1> 2861 00007E3D 48616E646C65206E6F- <1> emserr3: asciz "Handle not found",13,10 2861 00007E46 7420666F756E640D0A- <1> 2861 00007E4F 00 <1> 2862 00007E50 4E6F20667265652068- <1> emserr5: asciz "No free handles",13,10 2862 00007E59 616E646C65730D0A00 <1> 2863 00007E62 546F74616C20706167- <1> emserr7: asciz "Total pages exceeded",13,10 2863 00007E6B 657320657863656564- <1> 2863 00007E74 65640D0A00 <1> 2864 00007E79 467265652070616765- <1> emserr8: asciz "Free pages exceeded",13,10 2864 00007E82 732065786365656465- <1> 2864 00007E8B 640D0A00 <1> 2865 00007E8F 506172616D65746572- <1> emserr9: asciz "Parameter error",13,10 2865 00007E98 206572726F720D0A00 <1> 2866 00007EA1 4C6F676963616C2070- <1> emserra: asciz "Logical page out of range",13,10 2866 00007EAA 616765206F7574206F- <1> 2866 00007EB3 662072616E67650D0A- <1> 2866 00007EBC 00 <1> 2867 00007EBD 506879736963616C20- <1> emserrb: asciz "Physical page out of range",13,10 2867 00007EC6 70616765206F757420- <1> 2867 00007ECF 6F662072616E67650D- <1> 2867 00007ED8 0A00 <1> 2868 <1> align 2, db 0 2869 00007EDA [287E][287E]0000- <1> emserrs: dw emserr1,emserr1,0,emserr3,0,emserr5,0,emserr7 2869 00007EE0 [3D7E]0000[507E]00- <1> 2869 00007EE7 00[627E] <1> 2870 00007EEA [797E][8F7E][A17E]- <1> dw emserr8,emserr9,emserra,emserrb 2870 00007EF0 [BD7E] <1> 2871 00007EF2 454D53206572726F72- <1> emserrx: asciz "EMS error " 2871 00007EFB 2000 <1> 2872 00007EFD 48616E646C65206372- <1> xaans: db "Handle created = " 2872 00007F06 6561746564203D20 <1> 2873 00007F0E 5F5F5F5F0D0A00 <1> xaans1: asciz "____",13,10 2874 00007F15 48616E646C6520 <1> xdans: db "Handle " 2875 00007F1C 5F5F5F5F206465616C- <1> xdans1: asciz "____ deallocated",13,10 2875 00007F25 6C6F63617465640D0A- <1> 2875 00007F2E 00 <1> 2876 00007F2F 48616E646C65207265- <1> xrans: asciz "Handle reallocated",13,10 2876 00007F38 616C6C6F6361746564- <1> 2876 00007F41 0D0A00 <1> 2877 00007F44 4C6F676963616C2070- <1> xmans: db "Logical page " 2877 00007F4D 61676520 <1> 2878 00007F51 5F5F5F5F206D617070- <1> xmans1: db "____ mapped to physical page " 2878 00007F5A 656420746F20706879- <1> 2878 00007F63 736963616C20706167- <1> 2878 00007F6C 6520 <1> 2879 00007F6E 5F5F0D0A00 <1> xmans2: asciz "__",13,10 2880 00007F73 48616E646C6520 <1> xsstr1: db "Handle " 2881 00007F7A 5F5F5F5F2068617320 <1> xsstr1a: db "____ has " 2882 00007F83 5F5F5F5F2070616765- <1> xsstr1b: asciz "____ pages allocated",13,10 2882 00007F8C 7320616C6C6F636174- <1> 2882 00007F95 65640D0A00 <1> 2883 00007F9A 706879732E20706167- <1> xsstr2: db "phys. page " 2883 00007FA3 6520 <1> 2884 00007FA5 5F5F203D207365676D- <1> xsstr2a: db "__ = segment " 2884 00007FAE 656E7420 <1> 2885 00007FB2 5F5F5F5F202000 <1> xsstr2b: asciz "____ " 2886 00007FB9 5F5F5F5F206F662061- <1> xsstr3: db "____ of a total " 2886 00007FC2 20746F74616C20 <1> 2887 00007FC9 5F5F5F5F20454D5320- <1> xsstr3a: asciz "____ EMS " 2887 00007FD2 00 <1> 2888 00007FD3 657320686176652062- <1> xsstr4: asciz "es have been allocated",13,10 2888 00007FDC 65656E20616C6C6F63- <1> 2888 00007FE5 617465640D0A00 <1> 2889 00007FEC 70616700 <1> xsstrpg: asciz "pag" 2890 00007FF0 68616E646C00 <1> xsstrhd: asciz "handl" 2891 00007FF6 6E6F206D6170706162- <1> xsnopgs: asciz "no mappable pages",13,10,13,10 2891 00007FFF 6C652070616765730D- <1> 2891 00008008 0A0D0A00 <1> 2892 <1> %endif 2893 <1> 2894 <1> align 4, db 0 2895 0000800C 000800040002800040- <1> flagbits: dw 800h,400h,200h, 80h,040h,010h,004h,001h 2895 00008015 00100004000100 <1> 2896 0000801C 4F56444E45494E475A- <1> flagson: dw "OV","DN","EI","NG","ZR","AC","PE","CY" 2896 00008025 52414350454359 <1> 2897 0000802C 4E5655504449504C4E- <1> flagsoff: dw "NV","UP","DI","PL","NZ","NA","PO","NC" 2897 00008035 5A4E41504F4E43 <1> 2898 0000803C 4F464446494653465A- <1> flagnames: dw "OF","DF","IF","SF","ZF","AF","PF","CF" 2898 00008045 46414650464346 <1> 2899 <1> 2900 <1> %if _COND 2901 0000804C 6E6F7420 <1> msg.condnotjump:db "not " 2902 00008050 6A756D70696E6700 <1> msg.condjump: asciz "jumping" 2903 <1> %endif 2904 <1> 2905 00008058 206D6174636865730D- <1> msg.matches: asciz " matches",13,10 2905 00008061 0A00 <1> 2906 <1> 2907 00008063 00 <1> align 4, db 0 2908 00008064 414C4148424C424843- <1> reg8names: dw "AL","AH","BL","BH","CL","CH","DL","DH" 2908 0000806D 4C4348444C4448 <1> 2909 <1> ; Even entries are xL registers, odd ones the xH ones. 2910 <1> ; Order matches that of the first four regs entries. 2911 <1> 2912 00008074 415842584358445853- <1> reg16names: dw "AX","BX","CX","DX","SP","BP","SI","DI" 2912 0000807D 50425053494449 <1> 2913 00008084 445345535353435346- <1> dw "DS","ES","SS","CS","FS","GS","IP","FL" 2913 0000808D 5347534950464C <1> 2914 <1> ; 32-bit registers are the first eight and last two entries of 2915 <1> ; reg16names with 'E', which are all non-segment registers. 2916 <1> ; Segment registers can be detected by the 'S' as second letter. 2917 <1> ; FS and GS are the fourth- and third-to-last entries. 2918 <1> ; Order matches that of the sixteen regs entries. 2919 <1> 2920 <1> 2921 <1> ; Table of recognised default (unsigned) types. 2922 <1> ; 2923 <1> ; If any number of characters match, use the type. 2924 <1> ; If an additional "S" is found in front of a valid 2925 <1> ; type, the type is set to signed. (Word and byte 2926 <1> ; types are sign-extended to a dword value.) 2927 <1> ; 2928 <1> ; Each odd entry is an alternative name for the even 2929 <1> ; entry preceding it. 2930 <1> types: 2931 00008094 0442595445 <1> countedb "BYTE" ; ("B" is hexadecimal) 2932 00008099 0443484152 <1> countedb "CHAR" ; ("C" is hexadecimal) 2933 0000809E 04574F5244 <1> countedb "WORD" 2934 000080A3 0553484F5254 <1> countedb "SHORT" 2935 000080A9 053342595445 <1> countedb "3BYTE" ; ("3" and "3B" are numeric) 2936 000080AF 053342595445 <1> countedb "3BYTE" 2937 000080B5 0544574F5244 <1> countedb "DWORD" ; ("D" is hexadecimal) 2938 000080BB 044C4F4E47 <1> countedb "LONG" 2939 <1> .addresses: 2940 000080C0 07504F494E544552 <1> countedb "POINTER" 2941 000080C8 03505452 <1> countedb "PTR" 2942 000080CC 064F4646534554 <1> countedb "OFFSET" 2943 000080D3 034F4653 <1> countedb "OFS" 2944 000080D7 075345474D454E54 <1> countedb "SEGMENT" 2945 <1> .end: 2946 <1> 2947 <1> maxtypesize equ 7 ; size of "SEGMENT" and "POINTER" 1061 1062 msg_end: 1063 1064 numdef SHOWMSGSIZE, 0 1065 %if _SHOWMSGSIZE 1066 %assign MSGSIZE msg_end - msg_start 1067 %warning msg holds MSGSIZE bytes 1068 %endif 1069 1070 1071 usesection lDEBUG_DATA_ENTRY 1072 ; INP: word [cs:ip] = near address to jump to in other segment 1073 ..@symhint_trace_caller_entry_to_code_seg: 1074 entry_to_code_seg: 1075 000080DF 50 push ax ; word space for ?jumpaddress_ip, is ax 1076 000080E0 2EA1[CE00] mov ax, word [cs:code_seg] 1077 %if _PM 1078 000080E4 EB05 jmp entry_to_code_common 1079 1080 ..@symhint_trace_caller_entry_to_code_sel: 1081 entry_to_code_sel: 1082 000080E6 50 push ax 1083 000080E7 2EA1[D000] mov ax, word [cs:code_sel] 1084 %endif 1085 1086 entry_to_code_common: 1087 lframe 0 1088 lpar word, jumpaddress_cs_and_orig_ip 1089 lpar word, jumpaddress_ip 1090 000080EB 5589E5 lenter 1091 1092 000080EE 56 push si 1093 000080EF 9C pushf 1094 000080F0 FC cld 1095 1096 000080F1 874604 xchg word [bp + ?jumpaddress_cs_and_orig_ip], ax ; fill function segment 1097 000080F4 89C6 mov si, ax 1098 000080F6 2EAD cs lodsw 1099 %if _DEBUG 1100 cmp al, 0CCh ; debugger breakpoint ? 1101 jne @F ; no --> 1102 int3 ; break to make it remove the breakpoint 1103 dec si 1104 dec si 1105 cs lodsw ; reload the word 1106 cmp al, 0CCh 1107 jne @F 1108 1109 .l: 1110 int3 1111 jmp .l 1112 1113 @@: 1114 %endif 1115 000080F8 874602 xchg word [bp + ?jumpaddress_ip], ax ; fill function offset 1116 ; (and restore ax) 1117 1118 000080FB 9D popf 1119 000080FC 5E pop si 1120 1121 000080FD 5D lleave 1122 000080FE CB retf ; jump to dword [bp + ?jumpaddress] 1123 1124 1125 1126 ; debug22 - Interrupt 22h handler 1127 ; 1128 ; This is for DEBUG itself: it's a catch-all for the various Int23 1129 ; and Int24 calls that may occur unpredictably at any time. What we 1130 ; do is pretend to be a command interpreter (which we are, in a sense, 1131 ; just with different sort of commands) by setting our parent PSP 1132 ; value equal to our own PSP so that DOS does not free our memory when 1133 ; we quit. Therefore control ends up here when DOS detects Control-C 1134 ; or an Abort in the critical error prompt is selected. 1135 debug22: 1136 000080FF FA cli 1137 .cleartraceflag: 1138 00008100 FC cld ; reestablish things 1139 00008101 8CC8 mov ax, cs 1140 00008103 8ED8 mov ds, ax 1141 00008105 8ED0 mov ss, ax 1142 00008107 8B26[940A] mov sp, word [ savesp ] ; restore stack 1143 %if _PM 1144 0000810B 8026[9D00]F7 clropt [internalflags], protectedmode ; reset PM flag 1145 %endif 1146 00008110 90 times 1 - (($ - $$) & 1) nop ; align in-code parameter 1147 00008111 E8CBFF call entry_to_code_seg 1148 00008114 [A903] dw cmd2_reset_re_maybe_pm 1149 1150 1151 usesection lDEBUG_CODE 1152 1153 %if $ - $$ 1154 %error cmd3 is not at offset 0 in lDEBUG_CODE 1155 %endif 1156 1157 code_insure_low_byte_not_0CCh 1158 ; Begin main command loop. 1159 cmd3: 1160 00000000 16 push ss 1161 00000001 1F pop ds 1162 00000002 66 _386_o32 ; mov esp 1163 00000003 8B26[940A] mov sp, word [ savesp ] ; restore stack 1164 00000007 83E4FC _386 and sp, ~3 ; align stack 1165 0000000A 66 _386_o32 1166 0000000B 31C0 xor ax, ax 1167 0000000D 66 _386_o32 1168 0000000E 50 push ax 1169 0000000F 66 _386_o32 1170 00000010 9D popf 1171 00000011 8B26[940A] _386 mov sp, word [ savesp ] ; restore stack 1172 00000015 FC cld 1173 00000016 FB sti 1174 00000017 C706[9A0A][0000] mov word [ errret ], cmd3 1175 0000001D C706[9C0A][31A5] mov word [ throwret ], errhandler 1176 00000023 8926[9E0A] mov word [ throwsp ], sp 1177 00000027 1E push ds 1178 00000028 07 pop es 1179 1180 00000029 31FF xor di, di 1181 0000002B 873E[0E0C] xchg di, word [terminator_in_line_in.offset] 1182 0000002F 85FF test di, di 1183 00000031 7409 jz @F 1184 00000033 803D00 cmp byte [di], 0 1185 00000036 7504 jne @F 1186 00000038 A0[100C] mov al, byte [terminator_in_line_in.value] 1187 0000003B AA stosb 1188 @@: 1189 1190 0000003C 8026[A500]DF clropt [internalflags3], dif3_unquiet_error 1191 00000041 8026[A600]FD clropt [internalflags3], dif3_do_not_highlight 1192 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 1193 00000046 8026[A700]E7 clropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_in_if 1194 %else 1195 clropt [internalflags3], dif3_auxbuff_guarded_1 1196 %endif 1197 0000004B 8026[A400]CF clropt [internalflags3], dif3_input_serial_override | dif3_input_terminal_override 1199 00000050 8026[A300]EF clropt [internalflags2], dif2_in_silence_dump 1200 %if _PM 1201 00000055 E85338 call resetmode 1202 %endif 1203 1204 1205 %if _PM 1206 cmd3_int2F_init: 1207 00000058 B02F mov al, 2Fh ; interrupt number 1208 0000005A BE[4089] mov si, debug2F ; -> IISP entry header 1209 1210 0000005D F606[8800]02 testopt [options4], opt4_int_2F_hook 1211 00000062 751C jnz .done 1212 .check_disable: 1213 00000064 F606[A800]02 testopt [internalflags4], dif4_int_2F_hooked 1214 00000069 7415 jz .done 1215 1216 0000006B BA0200 mov dx, opt4_int_2F_force >> 16 1217 0000006E E851D2 call UnhookInterruptForce 1218 00000071 720D jc .done 1219 1220 00000073 8026[9D00]FE clropt [internalflags], hooked2F 1221 00000078 8026[A800]FD clropt [internalflags4], dif4_int_2F_hooked 1222 0000007D E84FD3 call update_inttab_optional 1223 1224 .done: 1225 %endif 1226 1227 1228 %if _CATCHINT08 1229 cmd3_int08_init: 1230 00000080 B008 mov al, 08h ; interrupt number 1231 00000082 BE[5685] mov si, intr8 ; -> IISP entry header 1232 1233 00000085 F606[8800]04 testopt [options4], opt4_int_08_hook 1234 0000008A 7414 jz .check_disable 1235 .check_enable: 1236 0000008C F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 1237 00000091 7524 jnz .done 1238 1239 00000093 E8B2D0 call install_86m_interrupt_handler 1240 00000096 800E[A800]04 setopt [internalflags4], dif4_int_08_hooked 1241 0000009B E831D3 call update_inttab_optional 1242 0000009E EB17 jmp .done 1243 1244 .check_disable: 1245 000000A0 F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 1246 000000A5 7410 jz .done 1247 1248 000000A7 BA0400 mov dx, opt4_int_08_force >> 16 1249 000000AA E815D2 call UnhookInterruptForce 1250 000000AD 7208 jc .done 1251 1252 000000AF 8026[A800]FB clropt [internalflags4], dif4_int_08_hooked 1253 000000B4 E818D3 call update_inttab_optional 1254 1255 .done: 1256 %endif 1257 1258 1259 %if _CATCHINT2D 1260 cmd3_int2D_init: 1261 000000B7 B02D mov al, 2Dh ; interrupt number 1262 000000B9 BE[4C81] mov si, int2D ; -> IISP entry header 1263 1264 000000BC F606[8800]08 testopt [options4], opt4_int_2D_hook 1265 000000C1 744A jz .check_disable 1266 .check_enable: 1267 000000C3 F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 1268 000000C8 7557 jnz .done 1269 1270 000000CA E807D1 call intchk ; ZR if offset = -1 or segment = 0 1271 ; CHG: ax, dx, bx 1272 000000CD 7431 jz .fail 1273 1274 000000CF 8A26[4881] mov ah, byte [try_amis_multiplex_number] 1275 000000D3 B000 mov al, 00h 1276 ; function 0 changes dx, di, cx, al 1277 %if _PM 1278 000000D5 E88F92 call call_int2D 1279 %else 1280 int 2Dh ; enquire whether there's anyone 1281 %endif 1282 000000D8 84C0 test al, al 1283 000000DA 7414 jz .got 1284 1285 000000DC 31C0 xor ax, ax ; start with multiplex number 0 1286 .loopplex: 1287 000000DE B000 mov al, 00h ; AMIS installation check 1288 ; function 0 changes dx, di, cx, al 1289 %if _PM 1290 000000E0 E88492 call call_int2D 1291 %else 1292 int 2Dh ; enquire whether there's anyone 1293 %endif 1294 000000E3 84C0 test al, al ; free ? 1295 000000E5 7409 jz .got ; yes, put it to use --> 1296 000000E7 FEC4 inc ah 1297 000000E9 75F3 jnz .loopplex ; try next multiplexer --> 1298 1299 000000EB BA[B36A] mov dx, msg.cannot_hook_2D.nofree 1300 000000EE EB13 jmp .fail_putsz 1301 1302 .got: 1303 000000F0 8826[6081] mov byte [amis_multiplex_number], ah 1304 1305 000000F4 B02D mov al, 2Dh ; interrupt number 1306 000000F6 E84FD0 call install_86m_interrupt_handler 1307 000000F9 800E[A800]08 setopt [internalflags4], dif4_int_2D_hooked 1308 000000FE EB21 jmp .done 1309 1310 .fail: 1311 00000100 BA[756A] mov dx, msg.cannot_hook_2D.invalid 1312 .fail_putsz: 1313 00000103 E8EABC call putsz 1314 00000106 8026[8800]F7 clropt [options4], opt4_int_2D_hook 1315 0000010B EB14 jmp .done 1316 1317 .check_disable: 1318 0000010D F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 1319 00000112 740D jz .done 1320 1321 00000114 BA0800 mov dx, opt4_int_2D_force >> 16 1322 00000117 E8A8D1 call UnhookInterruptForce 1323 0000011A 7205 jc .done 1324 1325 0000011C 8026[A800]F7 clropt [internalflags4], dif4_int_2D_hooked 1326 1327 .done: 1328 %endif 1329 1330 1331 00000121 F606[A700]01 testopt [internalflags3], dif3_input_re 1332 00000126 7403E96B01 jnz cmd3_continue_1_re 1333 0000012B 8026[8100]7F clropt [options2], opt2_re_cancel_tpg 1334 00000130 E8FDBB call silence_dump 1335 1336 1337 cmd3_serial_init: 1338 00000133 F606[7D00]40 testopt [options], enable_serial 1339 00000138 7503E9E000 jz .check_disable_serial 1340 .check_enable_serial: 1341 0000013D F606[EB0B]01 testopt [serial_flags], sf_init_done 1342 00000142 7403E91801 jnz .done_serial 1343 .enable_serial: 1344 1345 00000147 A0[EC0B] mov al, byte [serial_var_intnum] 1346 0000014A A2[2209] mov byte [serial_use_intnum], al 1347 0000014D A0[ED0B] mov al, byte [serial_var_params] 1348 00000150 A2[2309] mov byte [serial_use_params], al 1349 00000153 A0[EE0B] mov al, byte [serial_var_fifo] 1350 00000156 A2[2409] mov byte [serial_use_fifo], al 1351 00000159 A1[F00B] mov ax, word [serial_var_baseport] 1352 0000015C A3[2609] mov word [serial_use_baseport], ax 1353 0000015F A1[F20B] mov ax, word [serial_var_dl] 1354 00000162 A3[2809] mov word [serial_use_dl], ax 1355 00000165 A1[F40B] mov ax, word [serial_var_irqmask] 1356 00000168 A3[2A09] mov word [serial_use_irqmask], ax 1357 0000016B E8C9CD call serial_clear_fifos 1358 0000016E E88FCD call serial_install_interrupt_handler 1359 00000171 7317 jnc @F 1360 00000173 BF[556B] mov di, msg.serial_cannot_hook.old_int 1361 00000176 A0[120C] mov al, byte [serial_installed_intnum] 1362 00000179 E8C5B8 call hexbyte 1363 0000017C BF[3F6B] mov di, msg.serial_cannot_hook.new_int 1364 0000017F A0[2209] mov al, byte [serial_use_intnum] 1365 00000182 E8BCB8 call hexbyte 1366 00000185 BA[1F6B] mov dx, msg.serial_cannot_hook 1367 00000188 EB49 jmp .no_keep 1368 1369 @@: 1370 0000018A C606[0096]80 mov byte [serial_interrupt_handler + ieEOI], 80h 1371 0000018F E8B8CD call serial_init_UART 1372 1373 00000192 800E[EB0B]01 setopt [serial_flags], sf_init_done 1374 1375 00000197 BA[B369] mov dx, msg.serial_request_keep 1376 0000019A E853BC call putsz 1377 1378 0000019D BF[0E08] mov di, line_out 1379 %if _DEBUG 1380 mov al, '~' ; indicate instance is to be debugged 1381 stosb 1382 %endif 1383 000001A0 B03D mov al, '=' 1384 000001A2 AA stosb 1385 000001A3 B020 mov al, 32 1386 000001A5 AA stosb 1387 1388 000001A6 31C0 xor ax, ax 1389 000001A8 A3[000C] mov word [getline_timer_count], ax 1390 000001AB A3[020C] mov word [getline_timer_last], ax 1391 000001AE C706[040C][DE01] mov word [getline_timer_func], .timer 1392 1393 ; if we're executing from the command line 1394 ; buffer or a Y file then we want to 1395 ; override input to be from serial for the 1396 ; KEEP confirmation prompt. 1397 ; output is always to serial if we're here. 1398 000001B4 800E[A400]20 setopt [internalflags3], dif3_input_serial_override 1399 000001B9 E8E9BF call getline00 1400 000001BC 8026[A400]DF clropt [internalflags3], dif3_input_serial_override 1401 1402 000001C1 E89DB7 call skipcomm0 1403 000001C4 4E dec si 1404 000001C5 BA[706A] mov dx, msg.keep 1405 000001C8 E810B7 call isstring? 1406 000001CB 7503E98F00 je .done_serial 1407 1408 000001D0 BA[3D6A] mov dx, msg.serial_no_keep_enter 1409 .no_keep: 1410 000001D3 8026[7D00]BF clropt [options], enable_serial 1411 000001D8 E815BC call putsz 1412 000001DB E922FE jmp cmd3 1413 1414 1415 .timer: 1416 000001DE 50 push ax 1417 000001DF 52 push dx 1418 000001E0 51 push cx 1419 000001E1 06 push es 1420 1421 000001E2 BA4000 mov dx, 40h 1422 000001E5 8EC2 mov es, dx 1423 1424 000001E7 8B0E[000C] mov cx, word [getline_timer_count] 1425 000001EB 8B16[020C] mov dx, word [getline_timer_last] 1426 1427 000001EF 263B166C00 cmp dx, word [es:6Ch] 1428 000001F4 741A je .timer_next 1429 000001F6 268B166C00 mov dx, word [es:6Ch] 1430 000001FB 41 inc cx 1431 000001FC B012 mov al, 18 1432 000001FE F626[E90B] mul byte [serial_keep_timeout] 1433 00000202 85C0 test ax, ax 1434 00000204 740A jz .timer_next 1435 00000206 39C1 cmp cx, ax 1436 00000208 7206 jb .timer_next 1437 1438 0000020A 07 pop es 1439 0000020B BA[F069] mov dx, msg.serial_no_keep_timer 1440 0000020E EBC3 jmp .no_keep 1441 1442 .timer_next: 1443 00000210 890E[000C] mov word [getline_timer_count], cx 1444 00000214 8916[020C] mov word [getline_timer_last], dx 1445 00000218 07 pop es 1446 00000219 59 pop cx 1447 0000021A 5A pop dx 1448 0000021B 58 pop ax 1449 0000021C C3 retn 1450 1451 1452 .check_disable_serial: 1453 ; If serial is initialised, uninstall it. 1454 0000021D F606[EB0B]01 testopt [serial_flags], sf_init_done 1455 00000222 751D jnz .disable_serial 1456 ; Not initialised. Is the interrupt still hooked? 1457 00000224 F606[A800]01 testopt [internalflags4], dif4_int_serial_hooked 1458 00000229 7434 jz .done_serial 1459 ; Try unhooking the interrupt handler. 1460 0000022B E830CE call serial_uninstall_interrupt_handler 1461 0000022E 722F jc .done_serial ; if it failed again --> 1462 00000230 BF[8A6B] mov di, msg.serial_late_unhook.int 1463 00000233 A0[120C] mov al, byte [serial_installed_intnum] 1464 00000236 E808B8 call hexbyte 1465 00000239 BA[696B] mov dx, msg.serial_late_unhook 1466 0000023C E8B1BB call putsz 1467 0000023F EB1E jmp .done_serial 1468 1469 .disable_serial: 1470 1471 00000241 E8CFCD call serial_clean_up 1472 00000244 7314 jnc @F 1473 00000246 BF[186B] mov di, msg.serial_cannot_unhook.int 1474 00000249 A0[120C] mov al, byte [serial_installed_intnum] 1475 0000024C E8F2B7 call hexbyte 1476 0000024F BA[F46A] mov dx, msg.serial_cannot_unhook 1477 00000252 E89BBB call putsz 1478 00000255 C606[0096]00 mov byte [serial_interrupt_handler + ieEOI], 0 1479 ; we do not issue EOI any longer 1480 @@: 1481 0000025A 8026[EB0B]FE clropt [serial_flags], sf_init_done 1482 .done_serial: 1483 1484 1485 %if _PM 1486 cmd3_ss_init: 1487 0000025F E89B8F call ispm 1488 00000262 752F jnz .done 1489 1490 subcpu 286 1491 00000264 8CD3 mov bx, ss 1492 00000266 0F02CB lar cx, bx 1493 00000269 7528 jnz .done 1494 0000026B C1E908 shr cx, 8 1495 1496 0000026E F606[8600]10 testopt [options3], opt3_ss_b_bit_set 1497 00000273 740B jz .check_clear 1498 .check_set: 1499 00000275 F606[A600]10 testopt [internalflags3], dif3_ss_b_bit_set 1500 0000027A 7517 jnz .done 1501 1502 0000027C B540 mov ch, 40h 1503 0000027E EB07 jmp @F 1504 1505 .check_clear: 1506 00000280 F606[A600]10 testopt [internalflags3], dif3_ss_b_bit_set 1507 00000285 740C jz .done 1508 1509 @@: 1510 00000287 B80900 mov ax, 0009h 1511 0000028A CD31 int 31h 1512 0000028C 7205 jc .done 1513 1514 0000028E 8036[A600]10 xoropt [internalflags3], dif3_ss_b_bit_set 1515 subcpureset 1516 1517 .done: 1518 %endif 1519 1520 1521 00000293 E89FD1 call ensuredebuggeeloaded ; if no task is active, create a dummy one 1522 1523 cmd3_continue_1_re: 1524 00000296 BF[0E08] mov di, line_out ; build prompt 1525 %if _DEBUG 1526 mov al, '~' ; indicate instance is to be debugged 1527 stosb 1528 %endif 1529 %if _INDOS_PROMPT 1530 00000299 E842A4 call InDos 1531 0000029C 740F jz @F 1532 %if _BOOTLDR 1533 0000029E F606[9D00]40 testopt [internalflags], nodosloaded 1534 ; boot mode ? 1535 %if _INDOS_PROMPT_NOBOOT 1536 000002A3 7508 jnz @F ; yes, do not show special prompt --> 1537 %elif _INDOS_PROMPT_NOFLAG 1538 jnz .indos_prompt ; yes, show special prompt --> 1539 ; (do not call .real_indos check) 1540 %endif 1541 %endif 1542 %if _INDOS_PROMPT_NOFLAG 1543 000002A5 E844A4 call InDos.real_indos ; real InDOS set ? 1544 000002A8 7403 jz @F ; no, do not show special prompt --> 1545 %endif 1546 .indos_prompt: 1547 000002AA B021 mov al, '!' 1548 000002AC AA stosb 1549 @@: 1550 %endif 1551 000002AD B02D mov al, '-' ; main prompt 1552 %if _PM 1553 000002AF E84B8F call ispm 1554 000002B2 7502 jnz .realmode 1555 000002B4 B023 mov al, '#' ; PM main prompt 1556 .realmode: 1557 %endif 1558 000002B6 F606[A700]01 testopt [internalflags3], dif3_input_re 1559 000002BB 7402 jz @F 1560 000002BD B025 mov al, '%' 1561 @@: 1562 000002BF AA stosb 1563 1564 000002C0 C606[CC95]00 mov byte [hhflag], 0 1565 000002C5 8326[C895]00 and word [hh_depth], 0 1566 000002CA 8326[CA95]00 and word [hh_depth_of_single_term], 0 1567 000002CF C706[040C][1404] mov word [getline_timer_func], dmycmd 1568 000002D5 8026[9E00]FE clropt [internalflags], usecharcounter ; reset this automatically 1569 1570 000002DA F606[A700]01 testopt [internalflags3], dif3_input_re 1571 000002DF 7515 jnz cmd3_continue_2_re 1572 1573 000002E1 800E[9C00]08 setopt [internalflags], pagedcommand ; 2009-02-21: default to page all commands 1574 000002E6 8026[9F00]CF clropt [internalflags], tt_silence | tt_silent_mode 1575 ; reset, in case it's still set 1576 000002EB 8126[A000]3FF7 clropt [internalflags2], dif2_tpg_proceed_bp_set | dif2_bp_failure | dif2_tpg_keep_proceed_bp, 1 1578 %if _INPUT_FILE_HANDLES 1579 000002F1 8026[A200]DF clropt [internalflags2], dif2_closed_input_file 1580 %endif 1581 1582 cmd3_continue_2_re: 1583 000002F6 E8C001 call determine_quiet_output 1584 1585 000002F9 31C9 xor cx, cx 1586 000002FB 870E[F00A] xchg cx, word [rc] ; reset rc 1587 000002FF 890E[F20A] mov word [priorrc], cx ; make prior value available 1588 00000303 E304 jcxz @F 1589 00000305 890E[F40A] mov word [erc], cx ; update to last non-zero value 1590 @@: 1591 1592 00000309 F606[A700]01 testopt [internalflags3], dif3_input_re 1593 0000030E 7431 jz cmd3_continue_not_re 1594 1595 00000310 8306[E809]01 add word [re_count], 1 1596 00000315 8316[EA09]00 adc word [re_count + 2], 0 1597 0000031A 8B16[EE09] mov dx, word [re_limit + 2] 1598 0000031E A1[EC09] mov ax, word [re_limit] 1599 00000321 3916[EA09] cmp word [re_count + 2], dx 1600 00000325 7504 jne @F 1601 00000327 3906[E809] cmp word [re_count], ax 1602 @@: 1603 0000032B 7614 jbe cmd3_continue_not_re 1604 1605 0000032D BA[BE68] mov dx, msg.re_limit_reached 1606 00000330 E8B7BA call putsz_error 1607 00000333 B80401 mov ax, 0104h 1608 00000336 E820A2 call setrc 1609 00000339 800E[A500]04 setopt [internalflags3], dif3_at_line_end 1610 0000033E E931C1 jmp getline_close_file 1611 1612 cmd3_continue_not_re: 1613 1614 cmd3_check_line_out_overflow: 1615 00000341 813E[1609]4226 cmp word [line_out_overflow], 2642h 1616 00000347 740C je @F 1617 00000349 C706[1609]4226 mov word [line_out_overflow], 2642h 1618 0000034F BA[916B] mov dx, msg.line_out_overflow 1619 00000352 E895BA call putsz_error 1620 @@: 1621 1622 cmd3_getline: 1623 00000355 E84DBE call getline00 ; prompted input, also resets linecounter 1624 1625 00000358 E8E3B5 call iseol?.notsemicolon 1626 0000035B 7518 jne cmd3_notblank 1627 0000035D F606[8700]10 testopt [options3], opt3_disable_autorepeat 1628 00000362 7508 jnz @F 1629 00000364 8B16[DA0B] mov dx, word [lastcmd] 1630 00000368 8804 mov byte [si], al 1631 0000036A EB35 jmp short cmd4 1632 1633 @@: 1634 0000036C C706[DA0B][1404] mov word [lastcmd], dmycmd 1635 00000372 E98BFC jmp cmd3 1636 1637 cmd3_notblank: 1638 00000375 C706[DA0B][1404] mov word [lastcmd], dmycmd 1639 0000037B 3C3B cmp al, ';' 1640 0000037D 7427 je cmd3_j1 ; if comment --> 1641 0000037F 3C3A cmp al, ':' 1642 00000381 7423 je cmd3_j1 ; if jump label --> 1643 00000383 3C3F cmp al, '?' 1644 00000385 7503E98B00 je help ; if request for help --> 1645 0000038A E8B688 call uppercase 1646 0000038D 2C41 sub al, 'A' 1647 0000038F 3C18 cmp al, 'Y'-'A' 1648 00000391 7603E97CA1 ja error ; if not recognized 1649 00000396 98 cbw 1650 00000397 93 xchg bx, ax 1651 00000398 E8C5B5 call skipcomma 1652 0000039B D1E3 shl bx, 1 1653 0000039D 8B97[4A00] mov dx, word [ cmdlist+bx ] 1654 cmd4: 1655 000003A1 BF[0E08] mov di, line_out 1656 000003A4 FFD2 call dx 1657 cmd3_j1: 1658 000003A6 E957FC jmp cmd3 ; back to the top 1659 1660 1661 code_insure_low_byte_not_0CCh 1662 cmd2_reset_re_maybe_pm: 1663 1664 000003A9 66 _386_o32 ; mov esp 1665 000003AA 8B26[940A] mov sp, word [ savesp ] ; restore stack 1666 000003AE 83E4FC _386 and sp, ~3 ; align stack 1667 000003B1 66 _386_o32 1668 000003B2 31C0 xor ax, ax 1669 000003B4 66 _386_o32 1670 000003B5 50 push ax 1671 000003B6 66 _386_o32 1672 000003B7 9D popf 1673 000003B8 8B26[940A] _386 mov sp, word [ savesp ] ; restore stack 1674 000003BC FC cld 1675 000003BD FB sti 1676 1677 %if _PM 1678 000003BE E89B40 call handle_mode_changed 1679 %endif 1680 1681 code_insure_low_byte_not_0CCh 1682 cmd2_reset_re: 1683 000003C1 8B1E[FC0B] mov bx, word [io_levels] 1684 .entry_bx_levels: 1685 000003C5 31C9 xor cx, cx 1686 .entry_bx_levels_cx_cmdline: 1687 000003C7 31D2 xor dx, dx 1688 %if _INPUT_FILE_HANDLES 1689 000003C9 F606[A200]10 testopt [internalflags2], dif2_input_file 1690 000003CE 7405 jz @F 1691 000003D0 030E[800A] add cx, word [input_file_handles.active] 1692 000003D4 41 inc cx 1693 @@: 1694 %endif 1695 %if _INPUT_FILE_BOOT 1696 000003D5 F606[A300]02 testopt [internalflags2], dif2_input_file_boot 1697 000003DA 7405 jz @F 1698 000003DC 030E[D08F] add cx, word [load_input_file.active] 1699 000003E0 41 inc cx 1700 @@: 1701 %endif 1702 000003E1 F606[A700]01 testopt [internalflags3], dif3_input_re 1703 000003E6 740D jz @F 1704 000003E8 41 inc cx 1705 000003E9 42 inc dx 1706 000003EA F606[FE0B]01 testopt [io_flags], iof_extra_iol_for_tpg_re 1707 000003EF 7404 jz @F 1708 000003F1 43 inc bx 1709 000003F2 7501 jnz @F 1710 000003F4 4B dec bx 1711 @@: 1712 000003F5 39D9 cmp cx, bx 1713 000003F7 7602 jbe @F 1714 000003F9 89D9 mov cx, bx 1715 @@: 1716 000003FB E3A9 jcxz cmd3_j1 1717 000003FD 1E push ds 1718 000003FE 07 pop es 1719 @@: 1720 000003FF 51 push cx 1721 00000400 52 push dx 1722 00000401 E8BCC0 call getline_close_file.resetstuff 1723 00000404 5A pop dx 1724 00000405 59 pop cx 1725 00000406 E2F7 loop @B 1726 00000408 85D2 test dx, dx 1727 0000040A 749A jz cmd3_j1 1728 0000040C 800E[8100]80 setopt [options2], opt2_re_cancel_tpg 1729 00000411 E94323 jmp dumpregs_extended.exit 1730 1731 1732 dmycmd: 1733 00000414 C3 retn 1734 1735 help: 1736 00000415 E848B5 call skipcomma 1737 00000418 E82888 call uppercase 1738 %if _EXTHELP 1739 %if _COND 1740 0000041B BA[CD30] mov dx, msg.condhelp 1741 0000041E 3C43 cmp al, 'C' 1742 00000420 747B je .spec 1743 %endif 1744 %if _OPTIONS 1745 00000422 BA[A93C] mov dx, msg.ophelp 1746 00000425 3C4F cmp al, 'O' 1747 00000427 7474 je .spec ; option help --> 1748 %endif 1749 %if _EXPRESSIONS 1750 00000429 BA[9D33] mov dx, msg.expressionhelp 1751 0000042C 3C45 cmp al, 'E' 1752 0000042E 746D je .spec 1753 %endif 1754 %endif 1755 %if _EMS 1756 00000430 BA[F75D] mov dx, msg.xhelp 1757 00000433 3C58 cmp al, 'X' 1758 00000435 7466 je .spec 1759 %endif 1760 00000437 4E dec si 1761 %if _BOOTLDR && _EXTHELP 1762 00000438 BA[9C63] mov dx, msg.boot 1763 0000043B E89DB4 call isstring? 1764 0000043E BA[1052] mov dx, msg.boothelp 1765 00000441 745A je .spec 1766 %endif 1767 %if _EXTHELP 1768 00000443 BA[161A] mov dx, msg.source 1769 00000446 E892B4 call isstring? 1770 00000449 BA[1D1A] mov dx, msg.help_source 1771 0000044C 744F je .spec 1772 %endif 1773 0000044E BA[791B] mov dx, msg.re 1774 00000451 E887B4 call isstring? 1775 00000454 BA[7C1B] mov dx, msg.help_re 1776 00000457 7444 je .spec 1777 00000459 BA[E520] mov dx, msg.run 1778 0000045C E87CB4 call isstring? 1779 0000045F BA[E920] mov dx, msg.help_run 1780 00000462 7439 je .spec 1781 00000464 BA[B824] mov dx, msg.string_build 1782 00000467 E871B4 call isstring? 1783 0000046A BB[AC24] mov bx, msg.build_array 1784 0000046D B90500 mov cx, msg.build_short_amount 1785 00000470 7438 je .spec_multi 1786 00000472 AC lodsb 1787 00000473 E8CD87 call uppercase 1788 00000476 B90600 mov cx, msg.build_long_amount 1789 00000479 3C42 cmp al, 'B' 1790 0000047B 742D je .spec_multi ; build info --> 1791 %if _EXTHELP 1792 0000047D BA[8929] mov dx, msg.license 1793 00000480 3C4C cmp al, 'L' 1794 00000482 7419 je .spec ; licence --> 1795 00000484 BA[2E2E] mov dx, msg.flaghelp 1796 00000487 3C46 cmp al, 'F' 1797 00000489 7412 je .spec ; flag help --> 1798 0000048B BA[5B2C] mov dx, msg.reghelp 1799 0000048E 3C52 cmp al, 'R' 1800 00000490 740B je .spec ; register help --> 1801 %if _VARIABLES || _OPTIONS || _PSPVARIABLES 1802 00000492 BA[654F] mov dx, msg.varhelp 1803 00000495 3C56 cmp al, 'V' 1804 00000497 7404 je .spec ; variable help --> 1805 %endif 1806 %endif 1807 00000499 BA[3211] mov dx, msg.help ; default help 1808 0000049C A8 db __TEST_IMM8 ; (skip lodsb) 1809 .spec: 1810 0000049D AC lodsb 1811 0000049E E8AEB4 call chkeol 1812 prnquit: 1813 000004A1 E84CB9 call putsz ; print string 1814 cmd3_j1a: 1815 000004A4 E9FFFE jmp cmd3_j1 ; done 1816 1817 000004A7 E968A0 errorj1:jmp error 1818 1819 help.spec_multi: 1820 000004AA AC lodsb 1821 000004AB E8A1B4 call chkeol 1822 .loop: 1823 000004AE 8B17 mov dx, word [bx] 1824 000004B0 E83DB9 call putsz 1825 000004B3 43 inc bx 1826 000004B4 43 inc bx 1827 000004B5 E2F7 loop .loop 1828 000004B7 EBEB jmp short cmd3_j1a 1829 1830 1831 determine_quiet_output: 1832 000004B9 8026[A500]EF clropt [internalflags3], dif3_quiet_output 1833 1834 000004BE 57 push di 1835 000004BF 50 push ax 1836 000004C0 F606[A700]01 testopt [internalflags3], dif3_input_re 1837 000004C5 7549 jnz .notquiet 1838 1839 %if _INPUT_FILE_BOOT 1840 000004C7 F606[A300]02 testopt [internalflags2], dif2_input_file_boot 1841 000004CC 7412 jz @F 1842 000004CE B8A000 mov ax, LOAD_INPUT_FILE_SIZE 1843 000004D1 52 push dx 1844 000004D2 F726[D08F] mul word [load_input_file.active] 1845 000004D6 5A pop dx 1846 000004D7 89C7 mov di, ax 1847 000004D9 F685[778D]80 testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietOutput 1848 000004DE EB29 jmp .quiet_if_nz 1849 1850 @@: 1851 %endif 1852 %if _INPUT_FILE_HANDLES 1853 000004E0 E8FBA1 call InDos 1854 000004E3 7518 jnz @F 1855 1856 000004E5 F606[A200]10 testopt [internalflags2], dif2_input_file 1857 000004EA 7411 jz @F 1858 000004EC 8B3E[800A] mov di, word [input_file_handles.active] 1859 000004F0 D1E7 shl di, 1 1860 000004F2 D1E7 shl di, 1 1861 000004F4 D1E7 shl di, 1 ; to qword array index 1862 %if INPUTFILEHANDLE_size != 8 1863 %error Unexpected structure size 1864 %endif 1865 000004F6 F685[030A]80 testopt [input_file_handles + di + ifhFlags], ifhfQuietOutput 1866 000004FB EB0C jmp .quiet_if_nz 1867 1868 @@: 1869 %endif 1870 000004FD F606[A500]01 testopt [internalflags3], dif3_input_cmdline 1871 00000502 740C jz @F 1872 00000504 F606[7F00]80 testopt [options], opt_cmdline_quiet_output 1873 ; jmp .quiet_if_nz 1874 1875 .quiet_if_nz: 1876 00000509 7405 jz @F 1877 .quiet: 1878 0000050B 800E[A500]10 setopt [internalflags3], dif3_quiet_output 1879 .notquiet: 1880 @@: 1881 00000510 58 pop ax 1882 00000511 5F pop di 1883 00000512 C3 retn 1884 1885 1886 guard_auxbuff: 1887 00000513 F606[A700]30 testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 1888 00000518 7506 jnz @F 1889 0000051A 800E[A700]10 setopt [internalflags3], dif3_auxbuff_guarded_1 1890 0000051F C3 retn 1891 1892 @@: 1893 00000520 B80101 mov ax, 0101h 1894 00000523 E833A0 call setrc 1895 00000526 BA[2166] mov dx, msg.guard_auxbuff_error 1896 .putsz_error: 1897 00000529 E8C4B8 call putsz 1898 0000052C E9D1FA jmp cmd3 1899 1900 1901 ; This is used to disallow commands 1902 ; while reading from the RE buffer. 1903 guard_re: 1904 0000052F F606[A700]01 testopt [internalflags3], dif3_input_re 1905 00000534 7501 jnz @F 1906 00000536 C3 retn 1907 1908 @@: 1909 00000537 B80201 mov ax, 0102h 1910 0000053A E81CA0 call setrc 1911 0000053D BA[4366] mov dx, msg.guard_re_error 1912 00000540 EBE7 jmp guard_auxbuff.putsz_error 1913 1914 1915 usesection lDEBUG_DATA_ENTRY 1916 1917 align 2, db 0 1918 00008116 0000 debuggerfunction: dw 0 1919 1920 %if ! _CATCHINT2D 1921 align 2, db 0 1922 debuggeramissig: 1923 .ven: fill 8,32,db "ecm" ; vendor 1924 .prod: fill 8,32,db "lDebug" ; product 1925 db 0, 0 1926 1927 try_debugger_amis_multiplex_number: 1928 db -1 1929 %else 1930 %if 0 1931 1932 Supported Int2D functions: 1933 1934 AMIS - Installation check 1935 INP: al = 00h 1936 OUT: al = 0FFh 1937 cx = Private version number (currently 0100h) 1938 dx:di-> signature: "ecm ", "lDebug " 1939 1940 AMIS - Get private entry point - NOP: no private entry point 1941 INP: al = 01h 1942 OUT: al = 00h 1943 1944 AMIS - Uninstall - NOP: can't uninstall 1945 INP: al = 02h 1946 OUT: al = 00h (not implemented) 1947 1948 AMIS - Request pop-up - NOP: no pop-up 1949 INP: al = 03h 1950 OUT: al = 00h 1951 1952 AMIS - Determine chained interrupts 1953 INP: al = 04h 1954 OUT: al = 04h 1955 dx:bx -> interrupt hook list (Int2D always.) 1956 1957 AMIS - Get hotkeys - NOP: no hotkeys 1958 INP: al = 05h 1959 OUT: al = 00h 1960 1961 AMIS - Get device driver information - NOP: no device 1962 INP: al = 06h 1963 OUT: al = 00h 1964 1965 AMIS - Reserved for AMIS 1966 INP: al = 07h..0Fh 1967 OUT: al = 00h 1968 1969 TSR - Reserved for TSR 1970 INP: al = 10h..2Fh 1971 OUT: al = 00h 1972 1973 lDebug - Update IISP Header 1974 INP: al = 30h 1975 ds:si -> source IISP header (or pseudo header) 1976 es:di -> destination IISP header 1977 OUT: al = FFh to indicate suppported, 1978 si and di both incremented by 6 1979 destination's ieNext field updated from source 1980 al != FFh if not supported, 1981 si and di unchanged 1982 CHG: - 1983 REM: This function is intended to aid in debugging 1984 handler re-ordering, removal, or insertion. 1985 The 32-bit far pointer needs to be updated 1986 as atomically as possible to avoid using 1987 an incorrect pointer. 1988 Test case: Run a program such as our TSRs' 1989 uninstaller or SHUFHOOK and step through it 1990 with "tp fffff" when operating on something 1991 crucial such as interrupt 21h. Without this 1992 function the machine will crash! 1993 To enable this function to be called, enter 1994 the command "r dco4 or= 8" first (install our 1995 AMIS multiplexer handler). 1996 Other workaround: Use SILENT for TP and disable 1997 DCO3 flag 4000_0000 (do not call int 21.0B to 1998 check for Ctrl-C status). 1999 Yet another workaround: Set flag DCO 8 (enable 2000 fake InDOS mode, avoid calling int 21h). 2001 REM: The source may be a pseudo IISP header. In this 2002 case the ieEntry field should hold 0FEEBh 2003 (jmp short $) and the ieSignature field 2004 should indicate the source, eg "VT" for the IVT 2005 or "NH" for inserting a New Handler. 2006 2007 TSR - Reserved for TSR 2008 INP: al = 31h..FFh 2009 OUT: al = 00h 2010 2011 %endif 2012 2013 align 2, db 0 2014 debuggeramissig: 2015 amissig: 2016 00008118 65636D20 .ven: fill 8,32,db "ecm" ; vendor 2017 00008120 6C446562756720- .prod: fill 8,32,db "lDebug" ; product 2017 00008120 2018 00008128 6C4465627567582028- .desc: asciz _PROGNAME,_VERSION,", debugger." 2018 00008131 323032322D30342D32- 2018 0000813A 33292C206465627567- 2018 00008143 6765722E00 2019 ; description 2020 %if $ - .desc > 64 2021 %error AMIS description too long 2022 %endif 2023 2024 try_amis_multiplex_number: 2025 00008148 00 db 0 2026 try_debugger_amis_multiplex_number: 2027 00008149 FF db -1 2028 2029 2030 0000814A CB90EB10000000004B- iispentry int2D 2030 00008153 4200EBF300 2031 0000815E 80FC00 cmp ah, 0 2032 amis_multiplex_number equ $-1 ; AMIS multiplex number (data for cmp opcode) 2033 00008161 7405 je .handle ; our multiplex number --> 2034 00008163 2EFF2E[4E81] jmp far [cs:.next] ; else go to next handler --> 2035 2036 .handle: 2037 00008168 84C0 test al, al 2038 0000816A 740B jz .installationcheck ; installation check --> 2039 ; cmp al, 02h 2040 ; je .uninstall ; uninstallation --> 2041 0000816C 3C04 cmp al, 04h 2042 0000816E 7412 je .determineinterrupts ; determine hooked interrupts --> 2043 00008170 3C30 cmp al, 30h 2044 00008172 7415 je .updateiispheader 2045 ; all other functions are reserved or not supported by TSR 2046 .uninstall: 2047 .nop: 2048 00008174 B000 mov al, 0 ; show not implemented 2049 00008176 CF iret 2050 2051 .installationcheck: 2052 00008177 FEC8 dec al ; (= FFh) show we're here 2053 00008179 B90001 mov cx, 0100h ; = version 2054 0000817C BF[1881] mov di, amissig ; dx:di -> AMIS signature strings of this program 2055 .iret_dx_cs: 2056 0000817F 8CCA mov dx, cs 2057 .iret: 2058 00008181 CF iret 2059 2060 .determineinterrupts: ; al = 04h, always returns list 2061 00008182 2E8B1E[260C] mov bx, word [cs:amisintr_offset] 2062 ; dx:bx -> hooked interrupts list 2063 00008187 EBF6 jmp short .iret_dx_cs 2064 2065 .updateiispheader: 2066 00008189 B0FF mov al, 0FFh ; show supported 2067 0000818B FC cld 2068 0000818C FA cli ; try to rest while updating chain 2069 0000818D A7 cmpsw ; skip over first word (entrypoint) 2070 ; (generally xxEBh or 0EA90h) 2071 0000818E A5 movsw 2072 0000818F A5 movsw ; transfer source ieNext to dest ieNext 2073 00008190 CF iret 2074 %endif 2075 2076 2077 ; doscall is used by symbols.asm and run.asm, so define it prior 2078 %if _PM && _NOEXTENDER 2079 %macro doscall 0 2080 call _doscall 2081 %endmacro 2082 %else 2083 ; When we don't support non-extended DPMI all Int21 calls 2084 ; are either in Real Mode or extended (all are real Int21 2085 ; instructions). 2086 %macro doscall 0 2087 int 21h 2088 %endmacro 2089 %endif 2090 2091 2092 usesection lDEBUG_CODE 2093 2094 %if _DEBUG4 || _DEBUG5 2095 %define _DEB_ASM_PREFIX 2096 %include "deb.asm" 2097 %endif 2098 2099 2100 %include "aa.asm" 2101 <1> 2102 <1> %if 0 2103 <1> 2104 <1> lDebug A command - Assembler 2105 <1> 2106 <1> Copyright (C) 1995-2003 Paul Vojta 2107 <1> Copyright (C) 2008-2012 C. Masloch 2108 <1> 2109 <1> Usage of the works is permitted provided that this 2110 <1> instrument is retained with the works, so that any entity 2111 <1> that uses the works is notified of this instrument. 2112 <1> 2113 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2114 <1> 2115 <1> %endif 2116 <1> 2117 <1> 2118 <1> usesection lDEBUG_DATA_ENTRY 2119 <1> 2120 00008191 00 <1> align 2, db 0 2121 00008192 0000 <1> aa13a_mnemposition: dw 0 ; -> mnemonic, to display error 2122 00008194 00 <1> aa_mnemsuffix: db 0 ; 0 = normal, 1 = 'W' suffix, 2 = 'D' suffix 2123 <1> 2124 00008195 00 <1> asm_mn_flags: db 0 ; flags for the mnemonic 2125 <1> AMF_D32 equ 1 ; 32-bit opcode/data operand 2126 <1> AMF_WAIT equ 2 2127 <1> AMF_A32 equ 4 ; address operand is 32-bit 2128 <1> AMF_SIB equ 8 ; there's a SIB in the arguments 2129 <1> AMF_MSEG equ 10h ; if a seg prefix was given before mnemonic 2130 <1> AMF_FSGS equ 20h ; if FS or GS was encountered 2131 <1> AMF_D16 equ 40h ; 16-bit opcode/data operand 2132 <1> AMF_ADDR equ 80h ; address operand is given (write address size prefix) 2133 <1> 2134 00008196 00 <1> aa_saved_prefix:db 0 ; WAIT or REP... prefix 2135 <1> ; aa_saved_prefix and aa_seg_pre must be consecutive. 2136 00008197 00 <1> aa_seg_pre: db 0 ; segment prefix 2137 <1> 2138 <1> align 2, db 0 2139 00008198 0000 <1> mneminfo: dw 0 ; address associated with the mnemonic 2140 <1> 2141 <1> ; The following 7 words (including alloweddist) must all be consecutive. 2142 0000819A 0000 <1> rmaddr: dw 0 ; address of operand giving the R/M byte 2143 <1> ; regmem and sibbyte must be consecutive 2144 0000819C 00 <1> regmem: db 0 ; mod reg r/m part of instruction 2145 0000819D 00 <1> sibbyte: db 0 ; SIB byte 2146 0000819E 0000 <1> immaddr: dw 0 ; address of operand giving the immed stf 2147 000081A0 0000 <1> xxaddr: dw 0 ; address of additional stuff 2148 <1> ; dismach and dmflags must be consecutive 2149 000081A2 00 <1> dismach: db 0 ; type of processor needed 2150 000081A3 00 <1> dmflags: db 0 ; flags for extra processor features 2151 <1> 2152 <1> DM_COPR equ 1 ; math coprocessor 2153 <1> DM_MMX equ 2 ; MMX extensions 2154 <1> 2155 000081A4 00 <1> opcode_or: db 0 ; extra bits in the op code 2156 000081A5 00 <1> opsize: db 0 ; size of this operation (2 or 4) 2157 000081A6 00 <1> varflags: db 0 ; flags for this variant 2158 <1> 2159 <1> VAR_LOCKABLE equ 1 ; variant is lockable 2160 <1> VAR_MODRM equ 2 ; if there's a MOD R/M here 2161 <1> VAR_SIZ_GIVN equ 4 ; if a size was given 2162 <1> VAR_SIZ_FORCD equ 8 ; if only one size is permitted 2163 <1> VAR_SIZ_NEED equ 10h ; if we need the size 2164 <1> VAR_D16 equ 20h ; if operand size is WORD 2165 <1> VAR_D32 equ 40h ; if operand size is DWORD 2166 000081A7 00 <1> alloweddist: db 0 2167 <1> 2168 000081A8 00 <1> a_reqsize: db 0 ; size that this arg should be 2169 000081A9 00 <1> align 2, db 0 2170 000081AA 0000 <1> a_opcode: dw 0 ; op code info for this variant 2171 <1> 2172 <1> align 2, db 0 2173 000081AC 0000 <1> a_opcode2: dw 0 ; copy of a_opcode for obs-instruction 2174 000081AE E0DBE1DBE4DB240126- <1> a_obstab: dw 0DBE0h,0DBE1h,0DBE4h,124h,126h ; obs. instruction codes 2174 000081B7 01 <1> 2175 000081B8 0101020404 <1> obsmach: db 1,1,2,4,4 ; max permissible machine for the above 2176 <1> ; This is used to search for obsolete instructions: 2177 <1> ; DBE0h: feni 2178 <1> ; DBE1h: fdisi 2179 <1> ; DBE4h: fsetpm 2180 <1> ; 124h: mov trX, reg 2181 <1> ; 126h: mov reg, trX 2182 <1> 2183 000081BD 00040201 <1> aadbsiz: db 0,4,2,1 ; table for max size of db operand 2184 000081C1 00 <1> align 2, db 0 2185 000081C2 0000[1F08][2108]- <1> aadbsto: dw 0,aa28,aa29,aa30 ; table for routine to store a number 2185 000081C8 [2308] <1> 2186 <1> 2187 <1> align 2, db 0 ; (modrmtab really is an array of words) 2188 000081CA 0B000D00 <1> modrmtab: db REG_BX,0,REG_BP,0 ; [bx], [bp] 2189 000081CE 0F000E00 <1> db REG_DI,0,REG_SI,0 ; [di], [si] 2190 000081D2 0F0D0E0D <1> db REG_DI,REG_BP,REG_SI,REG_BP ; [bp+di],[bp+si] 2191 000081D6 0F0B0E0B <1> db REG_DI,REG_BX,REG_SI,REG_BX ; [bx+di],[bx+si] 2192 <1> 2193 000081DA 610D <1> aam_args: db 'a',13 2194 <1> 2195 <1> ; Equates for parsed arguments, stored in OPRND.flags 2196 <1> ARG_DEREF equ 1 ; non-immediate memory reference 2197 <1> ARG_MODRM equ 2 ; if we've computed the MOD R/M byte 2198 <1> ARG_JUSTREG equ 4 ; a solo register 2199 <1> ARG_WEIRDREG equ 8 ; if it's a segment register or CR, etc. 2200 <1> ARG_IMMED equ 10h ; if it's just a number 2201 <1> ARG_FARADDR equ 20h ; if it's of the form xxxx:yyyyyyyy 2202 <1> ARG_ECX_SPECIAL equ 80h ; have to overflow loop displacement 2203 <1> 2204 <1> ; For each operand type in the following table, the value 2205 <1> ; is the bits at least one of which must be present. 2206 <1> ; For each entry in bittab, there's an entry in asmjmp. 2207 <1> ; Entries are defined in the debug.asm opsizeditem list. 2208 <1> bittab: 2209 000081DC 1005010401040404 <1> db BITTAB_OPSIZEDITEMS 2210 000081E4 00 <1> times 16 - ($ - bittab) db 0 ; unused OP_SIZE combined types 2211 <1> 2212 <1> ; OP_END does not have a table entry. Subsequent 2213 <1> ; entries are defined in the debug.asm opitem list. 2214 000081EC 010101010120101008- <1> db BITTAB_OPITEMS 2214 000081F5 080808080810101010- <1> 2214 000081FE 0808FFFFFFFFFFFFFF- <1> 2214 00008207 FFFFFFFFFFFF041010- <1> 2214 00008210 040408080808080808 <1> 2215 <1> %if ($ - bittab) != OP_AMOUNT_TABLE 2216 <1> %error bittab has wrong size 2217 <1> %endif 2218 <1> 2219 <1> ; Jump table for operand types. 2220 <1> ; Entries are defined in the debug.asm opsizeditem list. 2221 00008219 00 <1> align 2, db 0 2222 <1> asmjmp: 2223 0000821A [320E][140E][140E]- <1> dw ASMJMP_OPSIZEDITEMS 2223 00008220 [140E][380E][190E]- <1> 2223 00008226 [280E][430E] <1> 2224 0000822A [6D11] <1> times 16 - (($ - asmjmp) / 2) dw ao50 ; unused size-combined types (reject) 2225 <1> 2226 <1> ; OP_END does not have a table entry. Subsequent 2227 <1> ; entries are defined in the debug.asm opitem list. 2228 0000823A [DD0E][DD0E][DD0E]- <1> dw ASMJMP_OPITEMS 2228 00008240 [DD0E][DD0E][E70E]- <1> 2228 00008246 [2B0F][A30F][1110]- <1> 2228 0000824C [1510][2A10][4610]- <1> 2228 00008252 [4A10][7410][8B10]- <1> 2228 00008258 [9010][9910][9910]- <1> 2228 0000825E [1C10][2010][0111]- <1> 2228 00008264 [3911][4111][4B11]- <1> 2228 0000826A [4511][3511][3511]- <1> 2228 00008270 [3511][3511][3511]- <1> 2228 00008276 [5A0C][5A0C][5A0C]- <1> 2228 0000827C [BD10][4F11][5611]- <1> 2228 00008282 [6311][6311][6311]- <1> 2228 00008288 [6311][6311][6311]- <1> 2228 0000828E [6311][6311][6311] <1> 2229 <1> %if ($ - asmjmp) / 2 != OP_AMOUNT_TABLE 2230 <1> %error asmjmp has wrong size 2231 <1> %endif 2232 <1> 2233 <1> ; special ops DX, CL, ST, CS, DS, ES, FS, GS, SS 2234 <1> ; entry required if ao48 is used in the opitem list 2235 <1> ; order has to match opitem order 2236 <1> ; refer to aagetreg comment for the number assignments 2237 00008294 0A011E <1> asm_regnum: db REG_DX, REG_CL, REG_ST 2238 00008297 191B181C1D1A <1> db REG_CS, REG_DS, REG_ES, REG_FS, REG_GS, REG_SS 2239 <1> 2240 <1> ; sizes for OP_M64, OP_MFLOAT, OP_MDOUBLE, OP_M80, OP_MXX 2241 <1> ; entry required if ao17 is used in the opitem list 2242 <1> ; order has to match opitem order 2243 0000829D 05060708 <1> asm_siznum: db SIZ_QWORD, SIZ_FLOAT, SIZ_DOUBLE, SIZ_TBYTE 2244 000082A1 FF <1> db -1 ; none 2245 <1> 2246 <1> ; size qualifier 2247 <1> ; 1 BY = BYTE 2248 <1> ; 2 WO = WORD 2249 <1> ; 3 unused 2250 <1> ; 4 DW = DWORD 2251 <1> ; 5 QW = QWORD 2252 <1> ; 6 FL = FLOAT (REAL4) 2253 <1> ; 7 DO = DOUBLE (REAL8) 2254 <1> ; 8 TB = TBYTE (REAL10) 2255 <1> 2256 <1> SIZ_NONE equ 0 2257 <1> SIZ_BYTE equ 1 2258 <1> SIZ_WORD equ 2 2259 <1> SIZ_DWORD equ 4 2260 <1> SIZ_QWORD equ 5 2261 <1> SIZ_FLOAT equ 6 2262 <1> SIZ_DOUBLE equ 7 2263 <1> SIZ_TBYTE equ 8 2264 <1> 2265 <1> align 2, db 0 2266 000082A2 4259574F574F445751- <1> sizetcnam: db "BY","WO","WO","DW","QW","FL","DO","TB" 2266 000082AB 57464C444F5442 <1> 2267 <1> endarea sizetcnam 2268 <1> 2269 <1> align 2, db 0 2270 000082B2 53484E454641 <1> distnam: db "SH","NE","FA" 2271 <1> endarea distnam 2272 <1> 2273 <1> 2274 <1> usesection lDEBUG_CODE 2275 <1> 2276 <1> %if 0 2277 <1> ; write byte in al to bx:(e)dx, then increment (e)dx 2278 <1> writeasm: 2279 <1> call writemem 2280 <1> _386_PM_o32 ; inc edx 2281 <1> inc dx 2282 <1> retn 2283 <1> 2284 <1> ; write cx bytes from ds:si to bx:(e)dx 2285 <1> writeasmn: 2286 <1> jcxz .nowrite 2287 <1> .loop: 2288 <1> lodsb 2289 <1> call writeasm 2290 <1> loop .loop 2291 <1> .nowrite: 2292 <1> retn 2293 <1> %endif 2294 <1> 2295 <1> 2296 <1> aa_cmd3_check: 2297 00000542 AC <1> lodsb 2298 00000543 E809B4 <1> call chkeol 2299 <1> aa_cmd3: 2300 00000546 E9B7FA <1> jmp cmd3 ; exit assembler mode --> 2301 <1> 2302 <1> 2303 <1> aa: 2304 00000549 E8E3FF <1> call guard_re 2305 0000054C 8B1E[900C] <1> mov bx, word [ reg_cs ] ; default segment to use 2306 <1> aa00a: 2307 00000550 E8E7B3 <1> call iseol? 2308 00000553 741E <1> je aa01 ; if end of line --> 2309 00000555 E8EEA3 <1> call getaddr ; get address into bx:(e)dx 2310 00000558 E8F4B3 <1> call chkeol ; expect end of line here 2311 0000055B 66 <1> _386_PM_o32 ; mov dword [ a_addr ], edx 2312 0000055C 8916[000B] <1> mov word [ a_addr ], dx ; save the address 2313 00000560 891E[040B] <1> mov word [a_addr + saSegSel], bx 2314 <1> %if _PM 2315 00000564 E8968C <1> call ispm 2316 00000567 7506 <1> jnz .86m 2317 <1> .pm: 2318 00000569 891E[080B] <1> mov word [a_addr + saSelector], bx 2319 0000056D EB04 <1> jmp @F 2320 <1> .86m: 2321 0000056F 891E[060B] <1> mov word [a_addr + saSegment], bx 2322 <1> @@: 2323 <1> %endif 2324 <1> 2325 <1> ; Begin loop over input lines. 2326 <1> aa01: 2327 00000573 C706[9A0A][7305] <1> mov word [ errret ], aa01 2328 00000579 8B26[940A] <1> mov sp, word [ savesp ] ; restore the stack (this implies no "retn") 2329 0000057D BF[0E08] <1> mov di, line_out 2330 00000580 A1[040B] <1> mov ax, word [a_addr + saSegSel] 2331 <1> %if _PM 2332 00000583 89C3 <1> mov bx, ax 2333 <1> %endif 2334 00000585 E8B2B4 <1> call hexword 2335 00000588 B03A <1> mov al, ':' 2336 0000058A AA <1> stosb 2337 0000058B C606[9581]00 <1> mov byte [ asm_mn_flags ], 0 2338 <1> %if _PM 2339 00000590 C606[DB88]00 <1> mov byte [ bCSAttr ], 0 2340 00000595 E8D057 <1> call test_d_b_bit 2341 00000598 740B <1> jz .16 2342 0000059A C606[DB88]40 <1> mov byte [ bCSAttr ], 40h ; set 32-bit attrib for later checks here 2343 0000059F A1[020B] <1> mov ax, word [ a_addr+2 ] 2344 000005A2 E895B4 <1> call hexword 2345 <1> .16: 2346 <1> %endif 2347 000005A5 A1[000B] <1> mov ax, word [ a_addr+0 ] 2348 000005A8 E88FB4 <1> call hexword 2349 000005AB B020 <1> mov al, 32 2350 000005AD AA <1> stosb 2351 000005AE E8F4BB <1> call getline00 2352 000005B1 3C2E <1> cmp al, '.' 2353 000005B3 748D <1> je aa_cmd3_check 2354 000005B5 3C3B <1> cmp al, ';' 2355 000005B7 74BA <1> je aa01 ; if comment 2356 000005B9 E882B3 <1> call iseol?.notsemicolon 2357 000005BC 7488 <1> je aa_cmd3 ; if done, return to command line --> 2358 000005BE C706[9681]0000 <1> mov word [ aa_saved_prefix ], 0 ; clear aa_saved_prefix and aa_seg_pre 2359 <1> 2360 <1> ; Get mnemonic and look it up. 2361 <1> ; (At this point, it has been determined that it is not empty.) 2362 <1> ; 2363 <1> ; INP: al = first character 2364 <1> ; si-> remaining string (al isn't EOL) 2365 <1> aa02: 2366 000005C4 BF[0E08] <1> mov di, line_out ; -> buffer 2367 000005C7 31C9 <1> xor cx, cx ; = 0 2368 000005C9 8936[9281] <1> mov [ aa13a_mnemposition ], si 2369 <1> 2370 000005CD A9 <1> db __TEST_IMM16 ; skip stosb,lodsb initially 2371 <1> @@: 2372 000005CE AA <1> stosb 2373 000005CF AC <1> lodsb 2374 000005D0 41 <1> inc cx ; count length 2375 000005D1 E86F86 <1> call uppercase 2376 000005D4 E863B3 <1> call iseol? ; end of mnemonic ? 2377 000005D7 740C <1> je @F 2378 000005D9 3C3A <1> cmp al, ':' 2379 000005DB 7408 <1> je @F ; (for prefixes, else will be an error later) 2380 000005DD 3C20 <1> cmp al, 32 2381 000005DF 7404 <1> je @F 2382 000005E1 3C09 <1> cmp al, 9 2383 000005E3 75E9 <1> jne @B ; not yet --> 2384 <1> @@: 2385 <1> 2386 000005E5 49 <1> dec cx ; = length of input 2387 000005E6 E8A7B3 <1> call skipwh0 ; skip to next field 2388 000005E9 4E <1> dec si 2389 <1> 2390 000005EA 8A45FF <1> mov al, [di-1] ; get last stored character 2391 000005ED 3C57 <1> cmp al, 'W' ; possible suffix? 2392 000005EF 7406 <1> je @F 2393 000005F1 3C44 <1> cmp al, 'D' 2394 000005F3 7402 <1> je @F ; yes --> 2395 000005F5 30C0 <1> xor al, al 2396 <1> @@: 2397 000005F7 A2[9481] <1> mov [aa_mnemsuffix], al ; store 'D', 'W', or 0 2398 <1> 2399 000005FA 56 <1> push si ; save position in input line 2400 <1> 2401 000005FB BE[9A01] <1> mov si, mnlist ; -> first area: no or optional suffix 2402 000005FE BA[270C] <1> mov dx, mnlist_o_suffix_required; -> end of first area 2403 <1> 2404 <1> ; [line_out] = name to search 2405 <1> ; cx = length of name to search 2406 <1> ; si-> next mnlist entry 2407 <1> ; dx-> behind last mnlist entry of this area 2408 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 2409 <1> aa_mnemlistloop: 2410 00000601 AD <1> lodsw ; load combined word, si-> name 2411 00000602 83E00F <1> and ax, 0Fh ; separate mnemonic length 2412 00000605 39C8 <1> cmp ax, cx ; length matches ? 2413 00000607 741D <1> je .length_match ; yes, check name --> 2414 <1> .cmps_mismatch: 2415 00000609 01C6 <1> add si, ax ; -> behind entry 2416 0000060B 39D6 <1> cmp si, dx ; at end of this list area ? 2417 0000060D 72F2 <1> jb aa_mnemlistloop ; not yet, check next entry --> 2418 <1> 2419 0000060F 81FA[270C] <1> cmp dx, mnlist_o_suffix_required; was first or second area ? 2420 00000613 750D <1> jne .mnem_invalid ; second, not found --> 2421 <1> 2422 00000615 BE[8E0B] <1> mov si, mnlist_a_suffix_allowed ; -> second area: optional or required suffix 2423 00000618 BA[500C] <1> mov dx, end_mnlist ; -> end of second area 2424 <1> 2425 0000061B 49 <1> dec cx ; prepare for second look-up 2426 0000061C 3826[9481] <1> cmp [aa_mnemsuffix], ah ; is there a valid suffix ? (ah still 0) 2427 00000620 75DF <1> jne aa_mnemlistloop ; yes, check for suffixed instruction --> 2428 <1> 2429 <1> .mnem_invalid: 2430 00000622 58 <1> pop ax ; (discard) 2431 00000623 E96901 <1> jmp aa13a ; complain --> 2432 <1> 2433 <1> .length_match: ; found a name of correct length 2434 00000626 BF[0E08] <1> mov di, line_out ; -> all-capitals input 2435 00000629 89F3 <1> mov bx, si ; -> name 2436 0000062B F3A6 <1> repe cmpsb ; compare names 2437 0000062D 89DE <1> mov si, bx 2438 0000062F 89C1 <1> mov cx, ax ; restore length 2439 00000631 75D6 <1> jne .cmps_mismatch ; not this, continue --> 2440 <1> 2441 <1> ; We found the mnemonic. 2442 <1> ; (bx=si)-> entry's mnemonic 2443 <1> ; dx-> behind last mnlist entry of this area 2444 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 2445 00000633 89F0 <1> mov ax, si ; -> mnemonic's name 2446 <1> 2447 00000635 81FA[500C] <1> cmp dx, end_mnlist ; was first or second area ? 2448 00000639 740B <1> je .handlesuffix ; second, there's a suffix to handle --> 2449 <1> 2450 0000063B 3D[8E0B] <1> cmp ax, mnlist_a_suffix_allowed ; optional suffix that was not specified? 2451 0000063E 7234 <1> jb aa_mnemonic_found ; no, done with the suffixes already --> 2452 <1> 2453 <1> %if _PM 2454 00000640 8A16[DB88] <1> mov dl, byte [ bCSAttr ] ; dl = whether a 32-bit CS 2455 <1> %else 2456 <1> xor dl, dl ; 86 Mode is always 16-bit 2457 <1> %endif 2458 00000644 EB09 <1> jmp sho .suffix_decide 2459 <1> 2460 <1> .handlesuffix: 2461 <1> 2462 00000646 8A16[9481] <1> mov dl, byte [ aa_mnemsuffix ] ; dl = 'W' or 'D'. 'W' is odd, 'D' is even 2463 0000064A F6D2 <1> not dl ; make 'W' an even value, 'D' an odd one 2464 0000064C 80E201 <1> and dl, 1 ; 'W' results in 0, 'D' in 1 2465 <1> 2466 <1> .suffix_decide: 2467 0000064F 3D[B20B] <1> cmp ax, mnlist_o_suffix_allowed ; address size suffix ? 2468 00000652 7212 <1> jb .a_suffix ; yes --> 2469 <1> 2470 <1> ; Operand size suffix. 2471 00000654 84D2 <1> test dl, dl ; which ? 2472 00000656 7407 <1> jz .o_suffix_w 2473 00000658 800E[9581]01 <1> or byte [asm_mn_flags], AMF_D32 ; o32 2474 0000065D EB15 <1> jmp sho aa_mnemonic_found 2475 <1> 2476 <1> .o_suffix_w: 2477 0000065F 800E[9581]40 <1> or byte [asm_mn_flags], AMF_D16 ; o16 2478 00000664 EB0E <1> jmp sho aa_mnemonic_found 2479 <1> 2480 <1> ; Address size suffix. 2481 <1> .a_suffix: 2482 00000666 84D2 <1> test dl, dl ; which ? 2483 00000668 7405 <1> jz .a_suffix_w 2484 0000066A 800E[9581]84 <1> or byte [asm_mn_flags], AMF_ADDR|AMF_A32; a32 2485 <1> .a_suffix_w: 2486 0000066F 800E[9581]80 <1> or byte [asm_mn_flags], AMF_ADDR ; a16 (AMF_A32 still clear) 2487 <1> 2488 <1> aa_mnemonic_found: 2489 00000674 B104 <1> mov cl, 4 2490 00000676 8B74FE <1> mov si, [si-2] ; get the combined word 2491 00000679 D3EE <1> shr si, cl ; extract offset into asmtab 2492 0000067B 81C6[0000] <1> add si, asmtab ; -> asmtab sequence 2493 <1> 2494 <1> ; bx-> name of matching mnlist entry 2495 <1> ; If this mnemonic is suffixable/suffixed, 2496 <1> ; AMF_D32,AMF_D16,AMF_ADDR,AMF_A32 show suffix status 2497 <1> ; si-> associated asmtab sequence 2498 <1> ; w[ss:sp]-> next field in input line (operand or EOL) 2499 <1> 2500 <1> %if 0 2501 <1> 2502 <1> Now si points to the spot in asmtab corresponding to this mnemonic. 2503 <1> The format of the assembler table is as follows. 2504 <1> First, there is optionally one of the following bytes: 2505 <1> 2506 <1> ASM_SPECIAL This is a special mnemonic (directive or AAx). 2507 <1> ASM_WAIT The instruction is prefixed by a WAIT. 2508 <1> ASM_D32 This is a 32-bit instruction variant. 2509 <1> ASM_D16 This is a 16-bit instruction variant. 2510 <1> 2511 <1> Then, except for non-AAx ASM_SPECIAL, this is followed by one or 2512 <1> more of the following sequences, indicating an instruction variant. 2513 <1> 2514 <1> ASM_LOCKABLE Indicates that this instruction can follow a LOCK prefix. 2515 <1> ASM_MACHx Indicates the CPU this instruction requires, 1..6 (186..686). 2516 <1> ASM_ESCAPE Escapes a large following word. The assembler table contains 2517 <1> as many escapes as necessary; each escape means to add the 2518 <1> value of ASM_ESCAPE to the following high byte of the info 2519 <1> word. This will easily overflow the word, so a dword is 2520 <1> required to process the info word. ASM_ESCAPE currently 2521 <1> needs to be equal to ASM_FIRST (ie. the lowest assembler 2522 <1> table prefix byte) because otherwise some values would have 2523 <1> no valid encoding. _ASM_ESCAPE_USED is a preprocessor 2524 <1> variable which will be 0 in case there are no ASM_ESCAPE 2525 <1> bytes to be found in the table. 2526 <1> [word] This is a 16-bit integer, most significant byte first, giving 2527 <1> ASMMOD * a + b, where b is an index into the array opindex 2528 <1> (indicating the operand list), and a is as follows (hex): 2529 <1> 0..FF The (one-byte) instruction. 2530 <1> 100..1FF The lower 8 bits give the second byte of 2531 <1> a two-byte instruction beginning with 0Fh. 2532 <1> 200..23F Bits 2-0 say which floating point instruction 2533 <1> this is (D8h-DFh), and 5-3 give the /r field. 2534 <1> 240..1247 (a-240h)/8 is the index in the array agroups 2535 <1> (which gives the real value of a), and the 2536 <1> low-order 3 bits gives the /r field. 2537 <1> [byte] This gives the second byte of a floating point 2538 <1> instruction if 0D8h <= a <= 0DFh. 2539 <1> 2540 <1> Following these is an ASM_END byte. (ASM_SPECIAL has the same value as 2541 <1> ASM_END, but the context allows to decide which one is meant.) 2542 <1> 2543 <1> Exceptions: 2544 <1> ASM_SPECIAL are not followed by this opcode information (except AAx). 2545 <1> ASM_SPECIAL segment, LOCK and REP prefixes are followed by the literal 2546 <1> prefix byte. 2547 <1> ASM_SPECIAL for all mnemonics except AAx and the prefixes are not 2548 <1> followed by anything at all. 2549 <1> 2550 <1> The ASM_ symbols are defined where debugtbl.inc is included in debug.asm. 2551 <1> 2552 <1> %endif 2553 <1> 2554 <1> ; To do: BITS, USE16, USE32, USEAUTO, CPU 2555 0000067F AC <1> lodsb ; get a possible prefix 2556 <1> .checkprefix: 2557 <1> %if 1 2558 00000680 3CFF <1> cmp al, ASM_SPECIAL ; a special mnemonic ? 2559 00000682 7403E99900 <1> jne .notspecial ; no --> 2560 <1> 2561 <1> ; Dispatch based on mnemonic. 2562 00000687 31C0 <1> xor ax, ax 2563 00000689 81FB[AB01] <1> cmp bx, mnlist+MN_O16 2564 0000068D 7503E9A500 <1> je aa_sizeprefix ; o16 (ax = 0) --> 2565 00000692 40 <1> inc ax 2566 00000693 81FB[A101] <1> cmp bx, mnlist+MN_A16 2567 00000697 7503E99B00 <1> je aa_sizeprefix ; a16 (ax = 1) --> 2568 0000069C B402 <1> mov ah, 2 2569 0000069E 81FB[9C01] <1> cmp bx, mnlist+MN_A32 2570 000006A2 7503E99000 <1> je aa_sizeprefix ; a32 (ax = 201h) --> 2571 000006A7 48 <1> dec ax 2572 000006A8 81FB[A601] <1> cmp bx, mnlist+MN_O32 2573 000006AC 7503E98600 <1> je aa_sizeprefix ; o32 (ax = 200h) --> 2574 000006B1 81FB[9307] <1> cmp bx, mnlist+MN_LOCK 2575 000006B5 7503E9CC00 <1> je aa18 ; lock --> 2576 000006BA 81FB[B709] <1> cmp bx, mnlist+MN_REP 2577 000006BE 7209 <1> jb .notreplock 2578 000006C0 81FB[CF09] <1> cmp bx, mnlist+MN_REPNE 2579 000006C4 7703E9BD00 <1> jbe aa18 ; rep, repe, repne --> 2580 <1> .notreplock: 2581 000006C9 81FB[F009] <1> cmp bx, mnlist+MN_ES 2582 000006CD 7209 <1> jb .notseg 2583 000006CF 81FB[040A] <1> cmp bx, mnlist+MN_GS 2584 000006D3 7703E9A300 <1> jbe aa17 ; single segment prefix --> 2585 <1> .notseg: 2586 000006D8 81FB[BC01] <1> cmp bx, mnlist+MN_AAD 2587 000006DC 7503E94401 <1> je aa_aax ; aad --> 2588 000006E1 81FB[C101] <1> cmp bx, mnlist+MN_AAM 2589 000006E5 7503E93B01 <1> je aa_aax ; aam --> 2590 000006EA 833E[9681]00 <1> cmp word [ aa_saved_prefix ], byte 0 2591 000006EF 7403E99B00 <1> jne aa13a ; if there was a prefix or a segment, error --> 2592 000006F4 5E <1> pop si ; get position in input line 2593 <1> ;cmp bx, mnlist+MN_SEG 2594 <1> ;je aa_seg ; SEG mnemonic, process --> 2595 000006F5 81FB[7909] <1> cmp bx, mnlist+MN_ORG 2596 000006F9 7503E99800 <1> je aa_org 2597 000006FE B80100 <1> mov ax, 1 2598 00000701 81FB[5F03] <1> cmp bx, mnlist+MN_DD 2599 00000705 7503E99400 <1> je aa20m ; dd (ax = 1) --> 2600 0000070A 40 <1> inc ax 2601 0000070B 81FB[6D03] <1> cmp bx, mnlist+MN_DW 2602 0000070F 7503E98A00 <1> je aa20m ; dw (ax = 2) --> 2603 00000714 40 <1> inc ax 2604 00000715 81FB[5B03] <1> cmp bx, mnlist+MN_DB 2605 00000719 7503E98000 <1> je aa20m ; db (ax = 3) --> 2606 0000071E EB6F <1> jmp short aa13a ; unhandled special mnemonic --> 2607 <1> 2608 <1> .notspecial: 2609 00000720 2CFC <1> sub al, ASM_D16 ; mnemonic has a prefix ? 2610 00000722 7207 <1> jb .normal ; no --> 2611 00000724 7409 <1> je .d16 ; it is a 16-bit mnemonic form --> 2612 <1> %else 2613 <1> cmp al, ASM_O16PREF 2614 <1> jb .normal ; no special mnemonic --> 2615 <1> cmp al, ASM_A32PREF 2616 <1> jbe aa_sizeprefix ; 386 address/operand size prefix --> 2617 <1> 2618 <1> sub al, ASM_LOCKREP ; check for mnemonic flag byte, 2619 <1> ; and convert it to 0..9 if one 2620 <1> jb .normal ; if none --> 2621 <1> je aa18 ; if LOCK/REP --> 2622 <1> cbw 2623 <1> dec ax 2624 <1> jz aa17 ; if segment prefix (ASM_SEG) --> 2625 <1> dec ax 2626 <1> jz aa_aax ; if aad or aam (ASM_AAX) --> 2627 <1> dec ax 2628 <1> jz .d16 ; if ASM_D16 --> 2629 <1> cmp al, 3 2630 <1> jae aa20 ; if ASM_ORG or ASM_DD or ASM_DW or ASM_DB --> 2631 <1> %endif 2632 00000726 0806[9581] <1> or [ asm_mn_flags ], al ; save AMF_D32 or AMF_WAIT (1 or 2) 2633 0000072A A8 <1> db __TEST_IMM8 ; (skip dec) 2634 <1> .normal: 2635 0000072B 4E <1> dec si ; -> first byte of mnemonic info 2636 <1> .ab01: 2637 0000072C E90601 <1> jmp ab01 ; now process the arguments 2638 <1> .d16: 2639 0000072F 800E[9581]40 <1> or byte [ asm_mn_flags ], AMF_D16 2640 00000734 46 <1> inc si ; skip the ASM_D32 byte 2641 00000735 EBF5 <1> jmp short .ab01 ; now process the arguments 2642 <1> 2643 <1> aa_sizeprefix: 2644 <1> %if 0 2645 <1> sub al, ASM_O16PREF ; 0 = o16, 1 = a16, 2 = o32, 3 = a32 2646 <1> mov ah, al 2647 <1> and ax, (2<<8)|1 ; ah = 2 if 32-bit prefix, al = 1 if ASIZE 2648 <1> %endif 2649 <1> %if _PM 2650 00000737 0A26[DB88] <1> or ah, byte [ bCSAttr ] 2651 0000073B 740E <1> jz .nobyte ; 16-bit CS and 16-bit prefix, no output --> 2652 0000073D 80FC42 <1> cmp ah, 40h| 2 2653 00000740 7409 <1> je .nobyte ; 32-bit CS and 32-bit prefix, no output --> 2654 <1> %else 2655 <1> test ah, ah 2656 <1> jz .nobyte ; 16-bit CS and 16-bit prefix --> 2657 <1> %endif 2658 <1> 2659 <1> ; CS differs from the prefix's type. 2660 <1> ; Output a prefix byte. 2661 00000742 0466 <1> add al, 66h ; 66h if OSIZE, 67h if ASIZE 2662 00000744 BF[0E08] <1> mov di, line_out 2663 00000747 AA <1> stosb 2664 00000748 E8B100 <1> call aa_copymem 2665 <1> .nobyte: 2666 <1> aa_handleprefixes: 2667 0000074B 5E <1> pop si 2668 0000074C AC <1> lodsb ; get character 2669 0000074D 3C3A <1> cmp al, ':' 2670 0000074F 7503 <1> jne .nocolon 2671 00000751 E83BB2 <1> call skipwhite ; skip a colon 2672 <1> .nocolon: 2673 00000754 E8E3B1 <1> call iseol? ; end of line? 2674 00000757 7403E968FE <1> jne aa02 ; no, process instruction --> 2675 <1> 2676 <1> ; No instruction follows. 2677 <1> ; Write out saved LOCK/REP and/or segment prefix. 2678 0000075C A0[9781] <1> mov al, byte [ aa_seg_pre ] 2679 0000075F 84C0 <1> test al, al 2680 00000761 7407 <1> jz .noseg 2681 00000763 BF[0E08] <1> mov di, line_out 2682 00000766 AA <1> stosb 2683 00000767 E89200 <1> call aa_copymem 2684 <1> .noseg: 2685 0000076A A0[9681] <1> mov al, byte [ aa_saved_prefix ] 2686 0000076D 84C0 <1> test al, al 2687 0000076F 7407 <1> jz .noreplock 2688 00000771 BF[0E08] <1> mov di, line_out 2689 00000774 AA <1> stosb 2690 00000775 E88400 <1> call aa_copymem 2691 <1> .noreplock: 2692 <1> aa01_j1: 2693 00000778 E9F8FD <1> jmp aa01 ; return to prompt 2694 <1> 2695 <1> %if 0 2696 <1> ; SEG directive (segment prefix follows) 2697 <1> aa_seg: 2698 <1> call skipwhite 2699 <1> mov ah, byte [si] 2700 <1> and ax, ~2020h 2701 <1> mov di, segrgnam 2702 <1> mov cx, 6 2703 <1> repne scasw 2704 <1> jne aa24 ; if not found 2705 <1> push si ; save si in case there's no colon 2706 <1> inc si ; skip "?s" 2707 <1> call skipwhite 2708 <1> pop si 2709 <1> call chkeol 2710 <1> mov bx, prefixlist + 5 2711 <1> sub bx, cx 2712 <1> mov al, byte [ bx ] ; look up the prefix byte 2713 <1> mov di, line_out 2714 <1> stosb 2715 <1> call aa_copymem 2716 <1> jmp short aa01_j1 2717 <1> %endif 2718 <1> 2719 <1> ; segment prefix 2720 <1> aa17: 2721 0000077B AC <1> lodsb ; get prefix value 2722 0000077C A2[9781] <1> mov byte [ aa_seg_pre ], al 2723 0000077F 800E[9581]10 <1> or byte [ asm_mn_flags ], AMF_MSEG 2724 00000784 EBC5 <1> jmp short aa_handleprefixes 2725 <1> 2726 <1> ; LOCK or REP prefix 2727 <1> aa18: 2728 00000786 AC <1> lodsb ; get prefix value 2729 00000787 8606[9681] <1> xchg al, byte [ aa_saved_prefix ] 2730 0000078B 84C0 <1> test al, al 2731 0000078D 74BC <1> jz aa_handleprefixes 2732 <1> ; if there already was a saved prefix: 2733 <1> aa13a: 2734 0000078F 8B36[9281] <1> mov si, [ aa13a_mnemposition ] 2735 00000793 E97C9D <1> jmp error 2736 <1> 2737 <1> %if 0 2738 <1> ; Pseudo ops (org or db/dw/dd). 2739 <1> aa20: 2740 <1> cmp word [ aa_saved_prefix ], byte 0 2741 <1> jne aa13a ; if there was a prefix or a segment, error --> 2742 <1> pop si ; get position in input line 2743 <1> sub al, 3 ; AX=0 if org, 1 if dd, 2 if dw, 3 if db. 2744 <1> jne aa20m ; if not ORG 2745 <1> %endif 2746 <1> 2747 <1> aa_org: 2748 <1> ; Process ORG pseudo op. 2749 00000796 AC <1> lodsb 2750 00000797 8B1E[040B] <1> mov bx, word [a_addr + saSegSel]; default segment 2751 0000079B E9B2FD <1> jmp aa00a ; go to top, set address if any given 2752 <1> 2753 <1> ; Data instructions (DB/DW/DD). 2754 <1> aa20m: 2755 0000079E BF[0E08] <1> mov di, line_out ; put the bytes here when we get them 2756 000007A1 93 <1> xchg ax, bx ; mov bx,ax 2757 000007A2 8A87[BD81] <1> mov al, byte [ aadbsiz+bx ] ; move maximum size 2758 000007A6 A2[BD81] <1> mov byte [ aadbsiz ], al 2759 000007A9 D1E3 <1> shl bx, 1 2760 000007AB 8B87[C281] <1> mov ax, word [ aadbsto+bx ] ; move address of storage routine 2761 000007AF A3[C281] <1> mov word [ aadbsto ],ax 2762 000007B2 E8DAB1 <1> call skipwhite 2763 000007B5 E882B1 <1> call iseol? 2764 000007B8 743E <1> je aa27 ; if end of line 2765 <1> 2766 <1> aa21: 2767 000007BA 3C22 <1> cmp al, '"' 2768 000007BC 741B <1> je aa22 ; if string 2769 000007BE 3C27 <1> cmp al, "'" 2770 000007C0 7417 <1> je aa22 ; if string 2771 000007C2 E8160A <1> call aageti ; get a numerical value into dx:bx, size into cl 2772 000007C5 3A0E[BD81] <1> cmp cl, byte [ aadbsiz ] 2773 000007C9 7721 <1> ja aa24 ; if overflow 2774 000007CB 93 <1> xchg ax, bx 2775 000007CC FF16[C281] <1> call near [ aadbsto ] ; store the value 2776 000007D0 81FF[1609] <1> cmp di, line_out_end 2777 000007D4 7716 <1> ja aa24 ; if output line overflow 2778 000007D6 93 <1> xchg ax, bx 2779 000007D7 EB17 <1> jmp short aa26 ; done with this one 2780 <1> 2781 <1> aa22: 2782 000007D9 88C4 <1> mov ah, al 2783 <1> aa23: 2784 000007DB AC <1> lodsb 2785 000007DC E85FB1 <1> call iseol?.notsemicolon 2786 000007DF 740B <1> je aa24 ; if end of line (closing quote missing) --> 2787 000007E1 38E0 <1> cmp al, ah 2788 000007E3 740A <1> je aa25 ; if end of string 2789 000007E5 AA <1> stosb 2790 000007E6 81FF[1609] <1> cmp di, line_out_end 2791 000007EA 76EF <1> jbe aa23 ; if output line not overflowing 2792 <1> aa24: 2793 000007EC E9239D <1> jmp error ; error 2794 <1> aa25: 2795 000007EF AC <1> lodsb 2796 <1> aa26: 2797 000007F0 E86EB1 <1> call skipcomm0 2798 000007F3 E844B1 <1> call iseol? 2799 000007F6 75C2 <1> jne aa21 ; if not end of line 2800 <1> 2801 <1> ; End of line. Copy it to debuggee's memory. 2802 <1> aa27: 2803 000007F8 B8[7305] <1> mov ax, aa01 2804 000007FB 50 <1> push ax 2805 <1> 2806 <1> ; INP: di-> behind memory to copy (starts at line_out) 2807 <1> ; [a_addr]-> destination 2808 <1> ; OUT: memory copied 2809 <1> ; a_addr offset updated 2810 <1> ; es set to ss 2811 <1> ; CHG: (e)si, (e)cx, (e)di 2812 <1> aa_copymem: 2813 000007FC BE[0E08] <1> mov si, line_out ; ds:si-> data 2814 000007FF 89F9 <1> mov cx, di ; -> behind data 2815 00000801 29F1 <1> sub cx, si ; = size of data 2816 00000803 8E06[040B] <1> mov es, word [a_addr + saSegSel] 2817 00000807 66 <1> _386_PM_o32 ; mov edi, dword [ a_addr+0 ] 2818 00000808 8B3E[000B] <1> mov di, word [ a_addr+0 ] ; es:(e)di-> destination 2819 0000080C 660FB7C9 <1> _386_PM movzx ecx, cx 2820 00000810 660FB7F6 <1> _386_PM movzx esi, si ; fix high words 2821 00000814 67 <1> _386_PM_a32 2822 00000815 F3A4 <1> rep movsb ; copy it 2823 00000817 66 <1> _386_PM_o32 ; mov dword [ a_addr+0 ], edi 2824 00000818 893E[000B] <1> mov word [ a_addr+0 ], di ; save new address 2825 0000081C 16 <1> push ss 2826 0000081D 07 <1> pop es 2827 0000081E C3 <1> retn 2828 <1> 2829 <1> ; Routines to store a byte/word/dword, 2830 <1> ; into a buffer in our memory. 2831 <1> aa28: 2832 0000081F AB <1> stosw ; store a dword value 2833 00000820 92 <1> xchg ax, dx 2834 <1> aa29: 2835 00000821 AB <1> stosw ; store a word value 2836 00000822 C3 <1> retn 2837 <1> 2838 <1> aa30: 2839 00000823 AA <1> stosb ; store a byte value 2840 00000824 C3 <1> retn 2841 <1> 2842 <1> %if _PM && 0 2843 <1> aa_use16: 2844 <1> cmp word [ aa_saved_prefix ], byte 0 2845 <1> jne aa13a 2846 <1> pop si 2847 <1> lodsb 2848 <1> call chkeol 2849 <1> mov dl, 16 2850 <1> jmp short aa_bits.parse 2851 <1> 2852 <1> aa_use32: 2853 <1> cmp word [ aa_saved_prefix ], byte 0 2854 <1> jne aa13a 2855 <1> pop si 2856 <1> lodsb 2857 <1> call chkeol 2858 <1> mov dl, 32 2859 <1> jmp short aa_bits.parse 2860 <1> 2861 <1> aa_useauto: 2862 <1> cmp word [ aa_saved_prefix ], byte 0 2863 <1> jne aa13a 2864 <1> pop si 2865 <1> lodsb 2866 <1> call chkeol 2867 <1> jmp short aa_bits.auto 2868 <1> 2869 <1> aa_bits: 2870 <1> cmp word [ aa_saved_prefix ], byte 0 2871 <1> jne aa13a ; if there was a prefix or a segment, error --> 2872 <1> pop si ; get position in input line 2873 <1> 2874 <1> ; Check whether "AUTO" requested. 2875 <1> push si 2876 <1> lodsw 2877 <1> and ax, ~2020h 2878 <1> cmp ax, "AU" 2879 <1> jne .notauto 2880 <1> lodsw 2881 <1> and ax, ~2020h 2882 <1> cmp ax, "TO" 2883 <1> jne .notauto 2884 <1> lodsb 2885 <1> call iseol? 2886 <1> jne .notauto 2887 <1> pop ax 2888 <1> .auto: 2889 <1> xor ax, ax 2890 <1> mov al, byte [ bCSAttr+1 ] 2891 <1> test al, al ; any saved ? 2892 <1> jz aa01_j1 ; no --> 2893 <1> mov word [ bCSAttr ], ax ; restore 2894 <1> jmp short aa01_j1 2895 <1> 2896 <1> .notauto: 2897 <1> pop si 2898 <1> lodsb 2899 <1> push si 2900 <1> call getbyte 2901 <1> call chkeol 2902 <1> pop si 2903 <1> .parse: 2904 <1> mov ax, word [ bCSAttr ] 2905 <1> or al, 1 2906 <1> cmp dl, 16 2907 <1> je .16 2908 <1> cmp dl, 16h 2909 <1> je .16 2910 <1> cmp dl, 32 2911 <1> je .32 2912 <1> cmp dl, 32h 2913 <1> jne aa24 2914 <1> .32: 2915 <1> _no386 jmp aa24 2916 <1> test ah, ah 2917 <1> mov ah, al 2918 <1> mov al, 40h 2919 <1> jmp short .save 2920 <1> 2921 <1> .16: 2922 <1> test ah, ah 2923 <1> mov ah, al 2924 <1> mov al, 0 2925 <1> .save: 2926 <1> jnz .saved 2927 <1> mov byte [ bCSAttr+1 ], ah 2928 <1> .saved: 2929 <1> mov byte [ bCSAttr ], al 2930 <1> jmp short aa01_j1 2931 <1> %endif 2932 <1> 2933 <1> ; Here we process the AAD and AAM instructions. They are special 2934 <1> ; in that they may take a one-byte argument, or none (in which case 2935 <1> ; the argument defaults to 0Ah = ten). 2936 <1> aa_aax: 2937 00000825 8936[9881] <1> mov word [ mneminfo ], si ; save this address 2938 00000829 5E <1> pop si 2939 0000082A AC <1> lodsb 2940 0000082B E80CB1 <1> call iseol? 2941 0000082E 750B <1> jne ab01b ; if not end of line --> 2942 00000830 BE[DA81] <1> mov si, aam_args ; fake a 0Ah argument if none given 2943 00000833 EB05 <1> jmp short ab01a 2944 <1> 2945 <1> 2946 <1> ; Process normal instructions. 2947 <1> 2948 <1> ; First we parse each argument into the following structure, 2949 <1> ; stored consecutively at line_out, line_out+OPRND_size, etc. 2950 <1> ; 2951 <1> ; For arguments of the form xxxx:yyyyyyyy, xxxx is stored in 2952 <1> ; OPRND.num2, and yyyyyyyy in OPRND.num. The number of bytes 2953 <1> ; in yyyyyyyy is stored in opaddr, 2 is stored in OPRND.numadd, 2954 <1> ; and di is stored in xxaddr. 2955 <1> struc OPRND 2956 00000000 ?? <1> .flags: resb 1 ; 0 flags (ARG_DEREF, etc) 2957 00000001 ?? <1> .distflags: resb 1 ; 1 distance flags 2958 <1> ; (short = 1, near = 2, far = 4) 2959 00000002 ?? <1> .sizearg: resb 1 ; 2 size argument, if any 2960 <1> ; (1=byte, 2=word, 4=dword, 5=qword, 6=float, 7=double, 8=tbyte) 2961 <1> ; (refer to SIZ_ equs, sizetcnam, and asm_siznum) 2962 00000003 ?? <1> .sizedis: resb 1 ; 3 size of ModR/M displacement 2963 <1> .reg1: ; 4 ModR/M byte or first register (byte) 2964 00000004 ?? <1> .numadd: resb 1 ; 4 number of additional bytes at num2 (up to 4) 2965 <1> .num2: ; 5 second number (word) 2966 00000005 ?? <1> .reg2: resb 1 ; 5 index register, second register or SIB byte 2967 <1> ; reg2 needs to follow reg1 immediately 2968 00000006 ?? <1> .index: resb 1 ; 6 index factor 2969 00000007 ?? <1> .orednum: resb 1 ; 7 sizes of numbers are ORed here 2970 00000008 ???????? <1> .num: resd 1 ; 8 number 2971 <1> endstruc 1 2972 <1> 2973 <1> odfShort: equ 1 2974 <1> odfNear: equ 2 2975 <1> odfFar: equ 4 2976 <1> 2977 <1> 2978 <1> ab01: 2979 00000835 8936[9881] <1> mov word [ mneminfo ], si ; save this address 2980 00000839 5E <1> pop si ; get position in line 2981 <1> ab01a: 2982 0000083A AC <1> lodsb 2983 <1> ab01b: 2984 0000083B BF[0E08] <1> mov di, line_out 2985 <1> 2986 <1> ; Loop over operands. 2987 <1> ab02: 2988 0000083E E8F9B0 <1> call iseol? 2989 00000841 7503 <1> jne ab04 ; if not end of line 2990 <1> ab99_j1: 2991 00000843 E93503 <1> jmp ab99 ; to next phase 2992 <1> 2993 <1> ab04: 2994 00000846 57 <1> push di ; clear out the next storage area 2995 00000847 B90600 <1> mov cx, OPRND_size_w 2996 0000084A 31C0 <1> xor ax, ax 2997 0000084C F3AB <1> rep stosw 2998 0000084E 5F <1> pop di 2999 <1> 3000 <1> ; Small loop over "BYTE PTR" and segment prefixes. 3001 <1> ab05: 3002 0000084F 4E <1> dec si 3003 00000850 8B04 <1> mov ax, word [ si ] 3004 00000852 25DFDF <1> and ax, TOUPPER_W 3005 <1> .checksize: 3006 00000855 807D0200 <1> cmp byte [ di+OPRND.sizearg ], SIZ_NONE 3007 00000859 750C <1> jne .notsize ; if already have a size qualifier ("BYTE PTR",...) 3008 0000085B 57 <1> push di 3009 0000085C BF[A282] <1> mov di, sizetcnam 3010 0000085F B90800 <1> mov cx, sizetcnam_size_w 3011 00000862 F2AF <1> repne scasw 3012 00000864 5F <1> pop di 3013 00000865 742D <1> je .size ; if found --> 3014 <1> .notsize: 3015 <1> .checkdist: 3016 00000867 F64501FF <1> test byte [ di + OPRND.distflags ], -1 3017 0000086B 7541 <1> jnz .notdist 3018 0000086D 57 <1> push di 3019 0000086E BF[B282] <1> mov di, distnam 3020 00000871 B90300 <1> mov cx, distnam_size_w 3021 00000874 F2AF <1> repne scasw 3022 00000876 5F <1> pop di 3023 00000877 7535 <1> jne .notdist 3024 00000879 85C9 <1> test cx, cx 3025 0000087B 7509 <1> jnz .dist ; if not "FA" 3026 0000087D 8A4402 <1> mov al, byte [ si+2 ] 3027 00000880 24DF <1> and al, TOUPPER 3028 00000882 3C52 <1> cmp al, 'R' 3029 00000884 7528 <1> jne .notdist ; if not "FAR" (could be hexadecimal) --> 3030 <1> .dist: 3031 <1> ; 0 = far, 1 = near, 2 = short 3032 00000886 80E902 <1> sub cl, distnam_size_w - 1 3033 <1> ; -2 = far, -1 = near, -0 = short 3034 00000889 F6D9 <1> neg cl 3035 <1> ; 2 = far, 1 = near, 0 = short 3036 0000088B B501 <1> mov ch, 1 3037 0000088D D2E5 <1> shl ch, cl 3038 <1> ; 4 = far, 2 = near, 1 = short 3039 <1> ; 3040 <1> ; This matches odfFar = 4, odfNear = 2, odfShort = 1 3041 0000088F 886D01 <1> mov byte [ di + OPRND.distflags ], ch 3042 00000892 EB08 <1> jmp .skipptr 3043 <1> 3044 <1> .size: 3045 00000894 80E908 <1> sub cl, sizetcnam_size_w 3046 00000897 F6D9 <1> neg cl ; convert to 1..8 3047 00000899 884D02 <1> mov byte [ di+OPRND.sizearg ], cl 3048 <1> .skipptr: 3049 0000089C E8E6B0 <1> call skipalpha ; go to next token 3050 0000089F 8A24 <1> mov ah, byte [si] 3051 000008A1 25DFDF <1> and ax, TOUPPER_W 3052 000008A4 3D5054 <1> cmp ax, "PT" 3053 000008A7 7503 <1> jne ab05_j1 ; if not "PTR" 3054 000008A9 E8D9B0 <1> call skipalpha ; go to next token (ignore "PTR") 3055 <1> ab05_j1: equ $ 3056 000008AC EBA1 <1> jmp ab05 3057 <1> 3058 <1> .notdist: 3059 <1> ab07: 3060 000008AE E80400 <1> call ab08 3061 000008B1 7531 <1> jne ab09 ; not a segment prefix --> 3062 000008B3 EBF7 <1> jmp short ab05_j1 ; if it was a segment prefix --> 3063 <1> 3064 <1> ; Test for and process segment prefix 3065 <1> ; 3066 <1> ; INP: b[aa_seg_pre] 3067 <1> ; si-> string 3068 <1> ; ax = w[si] (uppercased) 3069 <1> ; OUT: NZ if no segment prefix, 3070 <1> ; si unchanged 3071 <1> ; ZR if segment prefix, 3072 <1> ; si-> behind prefix + 1 3073 <1> ; al = character behind prefix 3074 <1> ; CHG: ax, bx, cx 3075 <1> ab08: 3076 000008B5 803E[9781]00 <1> cmp byte [ aa_seg_pre ], 0 3077 000008BA 7525 <1> jne .ret ; if we already have a segment prefix 3078 000008BC 57 <1> push di 3079 000008BD BF[1288] <1> mov di, segrgnam 3080 000008C0 B90600 <1> mov cx, N_SEGREGS 3081 000008C3 F2AF <1> repne scasw 3082 000008C5 5F <1> pop di 3083 000008C6 7519 <1> jne .ret ; if not found 3084 000008C8 56 <1> push si ; save si in case there's no colon 3085 000008C9 AD <1> lodsw ; skip "?s" 3086 000008CA E8C2B0 <1> call skipwhite 3087 000008CD 3C3A <1> cmp al, ':' 3088 000008CF 7511 <1> jne .retpopsi ; if not followed by ':' 3089 000008D1 58 <1> pop ax ; discard saved si 3090 000008D2 E8BAB0 <1> call skipwhite ; skip it 3091 000008D5 BB[4988] <1> mov bx, prefixlist + 5 3092 000008D8 29CB <1> sub bx, cx 3093 000008DA 8A07 <1> mov al, byte [ bx ] ; look up the prefix byte 3094 000008DC A2[9781] <1> mov byte [ aa_seg_pre ], al ; save it away 3095 000008DF 38C0 <1> cmp al, al ; ZR, valid segment prefix 3096 <1> .ret: 3097 000008E1 C3 <1> retn 3098 <1> 3099 <1> .retpopsi: 3100 000008E2 5E <1> pop si 3101 000008E3 C3 <1> retn 3102 <1> 3103 <1> ; Begin parsing main part of argument. 3104 <1> 3105 <1> ; First check registers. 3106 <1> ab09: 3107 000008E4 57 <1> push di ; check for solo registers 3108 000008E5 BF[F287] <1> mov di, rgnam816 3109 000008E8 B91B00 <1> mov cx, N_ALLREGS ; 27 3110 000008EB E89B09 <1> call aagetreg 3111 000008EE 5F <1> pop di 3112 000008EF 727F <1> jc ab14 ; if not a register 3113 000008F1 800D04 <1> or byte [di+OPRND.flags], ARG_JUSTREG 3114 000008F4 885D04 <1> mov byte [di+OPRND.reg1], bl ; save register number 3115 000008F7 80FB18 <1> cmp bl, 24 ; 0..23 = AL..DH, AX..DI, EAX..EDI 3116 000008FA 730B <1> jae ab09a ; if it's not a normal register 3117 000008FC 93 <1> xchg ax, bx ; mov al, bl 3118 000008FD B103 <1> mov cl, 3 3119 000008FF D2E8 <1> shr al, cl ; al = size: 0 -> byte, 1 -> word, 2 -> dword 3120 00000901 04FE <1> add al, -2 3121 00000903 1403 <1> adc al, 3 ; convert to 1, 2, 4 (respectively) 3122 <1> ; matching SIZ_BYTE, SIZ_WORD, SIZ_DWORD 3123 00000905 EB5A <1> jmp short ab13 3124 <1> 3125 <1> ab09a: 3126 00000907 80350C <1> xor byte [di+OPRND.flags], ARG_JUSTREG|ARG_WEIRDREG 3127 0000090A B002 <1> mov al, SIZ_WORD ; register size 3128 0000090C 80FB1E <1> cmp bl, REG_ST ; 24..29 = segment registers 3129 0000090F 7737 <1> ja ab11 ; if it's MM, CR, DR, or TR --> 3130 00000911 740C <1> je ab09b ; if it's ST --> 3131 00000913 80FB1C <1> cmp bl, 28 3132 00000916 7249 <1> jb ab13 ; if it's a non-386 segment register --> 3133 00000918 800E[9581]20 <1> or byte [asm_mn_flags], AMF_FSGS ; else flag it 3134 0000091D EB42 <1> jmp short ab13 3135 <1> 3136 <1> ; ST registers 3137 <1> ab09b: 3138 0000091F AC <1> lodsb 3139 <1> ; Check for NASM FPU register notation: ST0..ST7 3140 00000920 3C30 <1> cmp al, '0' ; digit following ? 3141 00000922 720B <1> jb .par 3142 00000924 3C37 <1> cmp al, '7' 3143 00000926 7707 <1> ja .par ; no --> 3144 00000928 2C30 <1> sub al, '0' 3145 0000092A 884505 <1> mov byte [di+OPRND.reg2], al ; save number 3146 0000092D EB30 <1> jmp short ab12 ; --> 3147 <1> 3148 <1> .par: 3149 <1> ; Check for MASM FPU register notation: ST(0)..ST(7) 3150 0000092F 3C28 <1> cmp al, '(' ; parenthesis following ? 3151 00000931 7403 <1> je .ispar ; yes --> 3152 <1> ; Plain ST (= ST0) 3153 00000933 4E <1> dec si 3154 00000934 EB29 <1> jmp short ab12 3155 <1> 3156 <1> .ispar: 3157 00000936 AC <1> lodsb ; get digit 3158 00000937 2C30 <1> sub al, '0' 3159 00000939 3C07 <1> cmp al, 7 3160 0000093B 7708 <1> ja ab10 ; if not 0..7 3161 0000093D 884505 <1> mov byte [di+OPRND.reg2], al ; save the number 3162 00000940 AC <1> lodsb 3163 00000941 3C29 <1> cmp al, ')' ; validate that there's a closing parenthesis 3164 00000943 741A <1> je ab12 ; okay --> 3165 <1> ab10: 3166 <1> aa24_j2: 3167 00000945 E9A4FE <1> jmp aa24 ; error 3168 <1> 3169 <1> ; other registers: 31..34 (MM, CR, DR, TR) 3170 <1> ab11: 3171 00000948 AC <1> lodsb 3172 00000949 2C30 <1> sub al, '0' ; get digit 3173 0000094B 3C07 <1> cmp al, 7 3174 0000094D 77F6 <1> ja ab10 ; if error --> 3175 0000094F 884505 <1> mov byte [di+OPRND.reg2], al ; save the number 3176 00000952 B004 <1> mov al, SIZ_DWORD ; register size 3177 00000954 80FB1F <1> cmp bl, REG_MM 3178 00000957 7508 <1> jne ab13 ; if not MM register 3179 00000959 800D04 <1> or byte [di+OPRND.flags], ARG_JUSTREG 3180 0000095C B005 <1> mov al, SIZ_QWORD 3181 0000095E A9 <1> db __TEST_IMM16 ; (skip mov) 3182 <1> ab12: 3183 0000095F B000 <1> mov al, 0 ; size for ST registers 3184 <1> ab13: 3185 00000961 3A4502 <1> cmp al, byte [di+OPRND.sizearg] ; compare with stated size 3186 00000964 7407 <1> je ab13a ; if same 3187 00000966 864502 <1> xchg al, byte [di+OPRND.sizearg] 3188 00000969 84C0 <1> test al, al ; SIZ_NONE ? 3189 0000096B 75D8 <1> jnz ab10 ; if wrong size given, error --> 3190 <1> ab13a: 3191 0000096D E9ED01 <1> jmp ab44 ; done with this operand 3192 <1> 3193 <1> ; It's not a register reference. Try for a number. 3194 <1> ab14: 3195 00000970 AC <1> lodsb 3196 00000971 E84308 <1> call aaifnum 3197 00000974 7236 <1> jc ab17 ; it's not a number 3198 <1> ab14a: 3199 00000976 E86208 <1> call aageti ; get the number 3200 00000979 884D07 <1> mov byte [di+OPRND.orednum], cl 3201 0000097C 895D08 <1> mov word [di+OPRND.num+0], bx 3202 0000097F 89550A <1> mov word [di+OPRND.num+2], dx 3203 00000982 E80BB0 <1> call skipwh0 3204 00000985 80F902 <1> cmp cl, 2 3205 00000988 7F22 <1> jg ab17 ; if we can't have a colon here 3206 0000098A 3C3A <1> cmp al, ':' 3207 0000098C 751E <1> jne ab17 ; if not xxxx:yyyy 3208 0000098E E8FEAF <1> call skipwhite 3209 00000991 E84708 <1> call aageti 3210 00000994 8B4D08 <1> mov cx, word [di+OPRND.num+0] 3211 00000997 894D05 <1> mov word [di+OPRND.num2], cx 3212 0000099A 895D08 <1> mov word [di+OPRND.num+0], bx 3213 0000099D 89550A <1> mov word [di+OPRND.num+2], dx 3214 000009A0 800D20 <1> or byte [di+OPRND.flags], ARG_FARADDR 3215 000009A3 E9B601 <1> jmp ab43 ; done with this operand 3216 <1> 3217 <1> ab15: 3218 000009A6 E9B300 <1> jmp ab30 ; do post-processing 3219 <1> 3220 <1> ; Check for [...]. 3221 <1> ab16: 3222 000009A9 E8E3AF <1> call skipwhite 3223 <1> ab17: 3224 000009AC 3C5B <1> cmp al, '[' ; begin loop over sets of [] 3225 000009AE 75F6 <1> jne ab15 ; if not [ 3226 000009B0 800D01 <1> or byte [di+OPRND.flags], ARG_DEREF ; set the flag 3227 <1> 3228 <1> ; Process NASM segment prefix inside brackets if any 3229 000009B3 E8D9AF <1> call skipwhite 3230 000009B6 8A24 <1> mov ah, byte [si] 3231 000009B8 25DFDF <1> and ax, TOUPPER_W 3232 000009BB 4E <1> dec si ; set up for ab08 3233 000009BC E8F6FE <1> call ab08 3234 000009BF 7403 <1> jz ab19 ; if segment prefix (called skipwhite) 3235 <1> ab18: 3236 000009C1 E8CBAF <1> call skipwhite 3237 <1> ab19: 3238 000009C4 3C5D <1> cmp al, ']' ; begin loop within [] 3239 000009C6 74E1 <1> je ab16 ; if done 3240 <1> 3241 <1> ; Check for a register (within []). 3242 000009C8 4E <1> dec si 3243 000009C9 57 <1> push di 3244 000009CA BF[0288] <1> mov di, rgnam16 3245 000009CD B90800 <1> mov cx, N_REGS16 3246 000009D0 E8B608 <1> call aagetreg 3247 000009D3 5F <1> pop di 3248 000009D4 7243 <1> jc ab25 ; if not a register 3249 000009D6 80FB10 <1> cmp bl, 16 3250 000009D9 7305 <1> jae ab20 ; if 32-bit register 3251 000009DB 80C308 <1> add bl, 8 ; adjust 0..7 to 8..15 3252 000009DE EB1D <1> jmp short ab21 3253 <1> ab20: 3254 000009E0 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3255 000009E4 7517 <1> jnz ab21 ; if we already have an index 3256 000009E6 E8A6AF <1> call skipwhite 3257 000009E9 4E <1> dec si 3258 000009EA 3C2A <1> cmp al, '*' 3259 000009EC 750F <1> jne ab21 ; if not followed by '*' 3260 000009EE 46 <1> inc si 3261 000009EF 885D05 <1> mov byte [di+OPRND.reg2], bl ; save index register 3262 000009F2 E89AAF <1> call skipwhite 3263 000009F5 E8E307 <1> call aageti 3264 000009F8 E86C08 <1> call aaconvindex 3265 000009FB EB51 <1> jmp short ab28 ; ready for next part 3266 <1> 3267 <1> ab21: 3268 000009FD 807D0400 <1> cmp byte [di+OPRND.reg1], 0 3269 00000A01 7505 <1> jne ab22 ; if there's already a register 3270 00000A03 885D04 <1> mov byte [di+OPRND.reg1], bl 3271 00000A06 EB09 <1> jmp ab23 3272 <1> ab22: 3273 00000A08 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3274 00000A0C 7508 <1> jne ab24 ; if too many registers 3275 00000A0E 885D05 <1> mov byte [di+OPRND.reg2], bl 3276 <1> ab23: 3277 00000A11 E87BAF <1> call skipwhite 3278 00000A14 EB38 <1> jmp short ab28 ; ready for next part 3279 <1> 3280 <1> ab24: 3281 <1> aa24_j3: 3282 00000A16 E9D3FD <1> jmp aa24 ; error 3283 <1> 3284 <1> ; Try for a number (within []). 3285 <1> ab25: 3286 00000A19 AC <1> lodsb 3287 <1> ab26: 3288 00000A1A E8BE07 <1> call aageti ; get a number (or flag an error) 3289 00000A1D E870AF <1> call skipwh0 3290 00000A20 3C2A <1> cmp al, '*' 3291 00000A22 740B <1> je ab27 ; if it's an index factor 3292 00000A24 084D07 <1> or byte [di+OPRND.orednum], cl 3293 00000A27 015D08 <1> add word [di+OPRND.num+0], bx 3294 00000A2A 11550A <1> adc word [di+OPRND.num+2], dx 3295 00000A2D EB1F <1> jmp short ab28 ; next part ... 3296 <1> 3297 <1> ab27: 3298 00000A2F E83508 <1> call aaconvindex 3299 00000A32 E85AAF <1> call skipwhite 3300 00000A35 4E <1> dec si 3301 00000A36 57 <1> push di 3302 00000A37 BF[0288] <1> mov di, rgnam16 3303 00000A3A 31C9 <1> xor cx, cx 3304 00000A3C E84A08 <1> call aagetreg 3305 00000A3F 5F <1> pop di 3306 00000A40 72D4 <1> jc ab24 ; if error 3307 00000A42 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3308 00000A46 75CE <1> jne ab24 ; if there is already a register 3309 00000A48 885D05 <1> mov byte [di+OPRND.reg2], bl 3310 00000A4B E841AF <1> call skipwhite 3311 <1> 3312 <1> ; Ready for the next term within []. 3313 <1> ab28: 3314 00000A4E 3C2D <1> cmp al, '-' 3315 00000A50 74C8 <1> je ab26 ; if a (negative) number is next 3316 00000A52 3C2B <1> cmp al, '+' 3317 00000A54 7503 <1> jne ab29 ; if no next term (presumably) 3318 00000A56 E968FF <1> jmp ab18 3319 <1> ab29: 3320 00000A59 E968FF <1> jmp ab19 ; back for more 3321 <1> 3322 <1> ; Post-processing for complicated arguments. 3323 <1> ab30: 3324 00000A5C 837D0400 <1> cmp word [di+OPRND.reg1], 0 3325 00000A60 752C <1> jne ab32 ; if registers were given ( ==> create MOD R/M) 3326 00000A62 807D0700 <1> cmp byte [di+OPRND.orednum], 0 3327 00000A66 7424 <1> je ab31 ; if nothing was given ( ==> error) 3328 00000A68 803D00 <1> cmp byte [di+OPRND.flags], 0 3329 00000A6B 7506 <1> jne ab30b ; if it was not immediate 3330 00000A6D 800D10 <1> or byte [di+OPRND.flags], ARG_IMMED 3331 <1> ab30a: 3332 00000A70 E9E900 <1> jmp ab43 ; done with this argument 3333 <1> ab30b: 3334 00000A73 800E[9581]80 <1> or byte [asm_mn_flags], AMF_ADDR 3335 00000A78 B002 <1> mov al, 2 ; size of the displacement 3336 00000A7A F6450704 <1> test byte [di+OPRND.orednum], 4 3337 00000A7E 7407 <1> jz ab30c ; if no 32-bit displacement --> 3338 00000A80 40 <1> inc ax 3339 00000A81 40 <1> inc ax ; al = 4 3340 00000A82 800E[9581]04 <1> or byte [asm_mn_flags], AMF_A32 ; 32-bit addressing 3341 <1> ab30c: 3342 00000A87 884503 <1> mov byte [di+OPRND.sizedis], al ; save displacement size 3343 00000A8A EBE4 <1> jmp short ab30a ; done with this argument 3344 <1> ab31: 3345 00000A8C EB88 <1> jmp short aa24_j3 ; flag an error 3346 <1> 3347 <1> ; Create the MOD R/M byte. 3348 <1> ; (For disp-only or register, this will be done later as needed.) 3349 <1> ab32: 3350 00000A8E 800D02 <1> or byte [di+OPRND.flags], ARG_MODRM 3351 00000A91 8A4504 <1> mov al, byte [di+OPRND.reg1] 3352 00000A94 0A4505 <1> or al, byte [di+OPRND.reg2] 3353 00000A97 A810 <1> test al, 10h 3354 00000A99 7525 <1> jnz ab34 ; if 32-bit addressing 3355 00000A9B F6450704 <1> test byte [di+OPRND.orednum], 4 3356 00000A9F 751F <1> jnz ab34 ; if 32-bit addressing 3357 00000AA1 800E[9581]80 <1> or byte [asm_mn_flags], AMF_ADDR 3358 00000AA6 8B4504 <1> mov ax, word [di+OPRND.reg1] ; get reg1 and reg2 3359 00000AA9 38E0 <1> cmp al, ah 3360 00000AAB 7702 <1> ja ab33 ; make sure al >= ah 3361 00000AAD 86C4 <1> xchg al, ah 3362 <1> ab33: 3363 00000AAF 57 <1> push di 3364 00000AB0 BF[CA81] <1> mov di, modrmtab 3365 00000AB3 B90800 <1> mov cx, 8 3366 00000AB6 F2AF <1> repne scasw 3367 00000AB8 5F <1> pop di 3368 00000AB9 75D1 <1> jne ab31 ; if not among the possibilities (error) 3369 00000ABB BB0602 <1> mov bx, 206h ; max disp = 2 bytes; 6 ==> (non-existent) [bp] 3370 00000ABE EB6A <1> jmp short ab39 ; done (just about) 3371 <1> 3372 <1> ; 32-bit addressing 3373 <1> ab34: 3374 00000AC0 800E[9581]84 <1> or byte [asm_mn_flags], AMF_A32 | AMF_ADDR ; 32-bit addressing 3375 00000AC5 8A4504 <1> mov al, byte [di+OPRND.reg1] 3376 00000AC8 0A4506 <1> or al, byte [di+OPRND.index] 3377 00000ACB 7508 <1> jnz ab35 ; if we can't optimize [Exx*1] to [Exx] 3378 00000ACD 8B4504 <1> mov ax, word [di+OPRND.reg1] 3379 00000AD0 86C4 <1> xchg al, ah 3380 00000AD2 894504 <1> mov word [di+OPRND.reg1], ax 3381 <1> ab35: 3382 00000AD5 BB0504 <1> mov bx, 405h ; max disp = 4 bytes; 5 ==> (non-existent) [bp] 3383 00000AD8 807D0500 <1> cmp byte [di+OPRND.reg2], 0 3384 00000ADC 7510 <1> jne ab36 ; if there's a SIB 3385 00000ADE 8A4D04 <1> mov cl, byte [di+OPRND.reg1] 3386 00000AE1 80F910 <1> cmp cl, 16 3387 00000AE4 7CA6 <1> jl ab31 ; if wrong register type 3388 00000AE6 80E107 <1> and cl, 7 3389 00000AE9 80F904 <1> cmp cl, 4 ; check for ESP 3390 00000AEC 753C <1> jne ab39 ; if not, then we're done (otherwise do SIB) 3391 <1> 3392 <1> ab36: 3393 00000AEE 800E[9581]08 <1> or byte [asm_mn_flags], AMF_SIB ; form SIB 3394 00000AF3 8A6D06 <1> mov ch, byte [di+OPRND.index] ; get SS bits 3395 00000AF6 B103 <1> mov cl, 3 3396 00000AF8 D2E5 <1> shl ch, cl ; shift them halfway into place 3397 00000AFA 8A4505 <1> mov al, byte [di+OPRND.reg2] ; index register 3398 00000AFD 3C14 <1> cmp al, 20 3399 00000AFF 748B <1> je ab31 ; if ESP ( ==> error) 3400 00000B01 3C00 <1> cmp al, 0 3401 00000B03 7502 <1> jne ab37 ; if not zero 3402 00000B05 B014 <1> mov al, 20 ; set it for index byte 4 3403 <1> ab37: 3404 00000B07 3C10 <1> cmp al, 16 3405 00000B09 7C81 <1> jl ab31 ; if wrong register type 3406 00000B0B 2407 <1> and al, 7 3407 00000B0D 08C5 <1> or ch, al ; put it into the SIB 3408 00000B0F D2E5 <1> shl ch, cl ; shift it into place 3409 00000B11 41 <1> inc cx ; R/M for SIB = 4 3410 00000B12 8A4504 <1> mov al, byte [di+OPRND.reg1] ; now get the low 3 bits 3411 00000B15 84C0 <1> test al, al 3412 00000B17 7505 <1> jnz ab38 ; if there was a first register 3413 00000B19 80CD05 <1> or ch, 5 3414 00000B1C EB38 <1> jmp short ab42 ; MOD = 0, disp is 4 bytes 3415 <1> 3416 <1> ab38: 3417 00000B1E 3C10 <1> cmp al, 16 3418 00000B20 7C56 <1> jl ab45 ; if wrong register type 3419 00000B22 2407 <1> and al, 7 ; first register 3420 00000B24 08C5 <1> or ch, al ; put it into the SIB 3421 00000B26 3C05 <1> cmp al, 5 3422 00000B28 7406 <1> je ab40 ; if it's EBP, then we don't recognize disp=0 3423 <1> ; otherwise bl will be set to 0 3424 <1> 3425 <1> ; Find the size of the displacement. 3426 <1> ab39: 3427 00000B2A 38D9 <1> cmp cl, bl 3428 00000B2C 7402 <1> je ab40 ; if it's [(E)BP], then disp=0 is still 1 byte 3429 00000B2E B300 <1> mov bl, 0 ; allow 0-byte disp 3430 <1> 3431 <1> ab40: 3432 00000B30 51 <1> push cx 3433 00000B31 8A4508 <1> mov al, byte [di+OPRND.num+0] 3434 00000B34 B107 <1> mov cl, 7 3435 00000B36 D2F8 <1> sar al, cl 3436 00000B38 59 <1> pop cx 3437 00000B39 8A6509 <1> mov ah, byte [di+OPRND.num+1] 3438 00000B3C 38E0 <1> cmp al, ah 3439 00000B3E 7513 <1> jne ab41 ; if it's bigger than 1 byte 3440 00000B40 3B450A <1> cmp ax, word [di+OPRND.num+2] 3441 00000B43 750E <1> jne ab41 ; ditto 3442 00000B45 B700 <1> mov bh, 0 ; no displacement 3443 00000B47 0A5D08 <1> or bl, byte [di+OPRND.num+0] 3444 00000B4A 740A <1> jz ab42 ; if disp = 0 and it's not (E)BP 3445 00000B4C FEC7 <1> inc bh ; disp = 1 byte 3446 00000B4E 80C940 <1> or cl, 40h ; set MOD = 1 3447 00000B51 EB03 <1> jmp short ab42 ; done 3448 <1> 3449 <1> ab41: 3450 00000B53 80C980 <1> or cl, 80h ; set MOD = 2 3451 <1> 3452 <1> ab42: 3453 00000B56 887D03 <1> mov byte [di+OPRND.sizedis], bh ; store displacement size 3454 00000B59 894D04 <1> mov word [di+OPRND.reg1], cx ; store MOD R/M and maybe SIB 3455 <1> 3456 <1> ; Finish up with the operand. 3457 <1> ab43: 3458 00000B5C 4E <1> dec si 3459 <1> ab44: 3460 00000B5D E82FAE <1> call skipwhite 3461 00000B60 83C70C <1> add di, byte OPRND_size 3462 00000B63 E8D4AD <1> call iseol? 3463 00000B66 7413 <1> je ab99 ; if end of line --> 3464 00000B68 3C2C <1> cmp al, ',' 3465 00000B6A 750C <1> jne ab45 ; if not comma ( ==> error) 3466 00000B6C 81FF[3208] <1> cmp di, line_out+3*OPRND_size 3467 00000B70 7306 <1> jae ab45 ; if too many operands 3468 00000B72 E81AAE <1> call skipwhite 3469 00000B75 E9C6FC <1> jmp ab02 3470 <1> 3471 <1> ab45: 3472 00000B78 E971FC <1> jmp aa24 ; error jump 3473 <1> 3474 <1> ab99: 3475 00000B7B C605FF <1> mov byte [di+OPRND.flags], -1 ; end of parsing phase 3476 <1> 3477 <1> %if 0 3478 <1> For the next phase, we match the parsed arguments with the set of 3479 <1> permissible argument lists for the opcode. The first match wins. 3480 <1> Therefore the argument lists should be ordered such that the 3481 <1> cheaper ones come first. 3482 <1> 3483 <1> There is a tricky issue regarding sizes of memory references. 3484 <1> Here are the rules: 3485 <1> 1. If a memory reference is given with a size, then it's OK. 3486 <1> 2. If a memory reference is given without a size, but some 3487 <1> other argument is a register (which implies a size), 3488 <1> then the memory reference inherits that size. 3489 <1> Exceptions: OP_CL does not imply a size (it's the shift counter) 3490 <1> OP_SHOSIZ 3491 <1> 3. If 1 and 2 do not apply, but this is the last possible argument 3492 <1> list, and if the argument list requires a particular size, then 3493 <1> that size is used. 3494 <1> 4. In all other cases, flag an error. 3495 <1> %endif 3496 <1> 3497 <1> ac01: 3498 00000B7E 31C0 <1> xor ax, ax 3499 00000B80 BF[9A81] <1> mov di, rmaddr 3500 00000B83 B90700 <1> mov cx, 7 3501 00000B86 F3AB <1> rep stosw ; clear variant-specific variables 3502 <1> ; cx = 0 3503 00000B88 8B36[9881] <1> mov si, word [mneminfo] 3504 <1> ; -> the next argument variant 3505 <1> %if _ASM_ESCAPE_USED 3506 00000B8C 31DB <1> xor bx, bx ; cx:bx = counter of ASM_ESCAPEs 3507 <1> %endif 3508 <1> ; Parse the variant's assembler table entry 3509 <1> ; si-> next argument variant 3510 <1> ; variant-specific variables cleared 3511 <1> ; cx:bx = 0 3512 <1> 3513 <1> ac02: 3514 00000B8E AC <1> lodsb 3515 <1> %if _ASM_ESCAPE_USED 3516 00000B8F 3CF4 <1> cmp al, ASM_ESCAPE 3517 00000B91 750B <1> jne .notescape 3518 00000B93 81C300F4 <1> add bx, ASM_ESCAPE << 8 3519 00000B97 83D100 <1> adc cx, byte 0 3520 00000B9A 7219 <1> jc ac04 ; if this branches, too many escapes --> 3521 00000B9C EBF0 <1> jmp short ac02 3522 <1> .notescape: 3523 <1> %endif 3524 00000B9E 2CF5 <1> sub al, ASM_MACH1 3525 00000BA0 7216 <1> jb ac05 ; if no more special bytes 3526 00000BA2 3C06 <1> cmp al, ASM_LOCKABLE-ASM_MACH1 3527 00000BA4 7408 <1> je ac03 ; if ASM_LOCKABLE 3528 00000BA6 770D <1> ja ac04 ; if ASM_END or another (--> error) 3529 00000BA8 40 <1> inc ax 3530 00000BA9 A2[A281] <1> mov byte [dismach], al ; save machine type 3531 00000BAC EBE0 <1> jmp short ac02 ; back for next byte 3532 <1> ac03: 3533 00000BAE 800E[A681]01 <1> or byte [varflags], VAR_LOCKABLE 3534 00000BB3 EBD9 <1> jmp short ac02 ; back for next byte 3535 <1> 3536 <1> ac04: 3537 00000BB5 E9D7FB <1> jmp aa13a ; error 3538 <1> 3539 <1> ; Get and unpack the word. 3540 <1> ac05: 3541 00000BB8 4E <1> dec si 3542 00000BB9 AD <1> lodsw 3543 00000BBA 86C4 <1> xchg al, ah ; put into little-endian order 3544 00000BBC 31D2 <1> xor dx, dx 3545 <1> %if _ASM_ESCAPE_USED 3546 00000BBE 01D8 <1> add ax, bx ; add in the ASM_ESCAPE adjustment 3547 00000BC0 11CA <1> adc dx, cx ; account for overflow (cx = 0) 3548 <1> %endif 3549 00000BC2 BB8000 <1> mov bx, ASMMOD 3550 00000BC5 F7F3 <1> div bx ; ax = a_opcode; dx = index into opindex 3551 00000BC7 A3[AA81] <1> mov word [a_opcode], ax ; save ax 3552 00000BCA A3[AC81] <1> mov word [a_opcode2], ax ; save the second copy 3553 00000BCD 3DDF00 <1> cmp ax, 0DFh ; a coprocessor instruction ? 3554 00000BD0 7717 <1> ja ac05a 3555 00000BD2 3CD8 <1> cmp al, 0D8h 3556 00000BD4 7213 <1> jb ac05a ; if no coprocessor instruction --> 3557 00000BD6 800E[A381]01 <1> or byte [dmflags], DM_COPR ; flag it as an x87 instruction 3558 00000BDB 88C4 <1> mov ah, al ; ah = low order byte of opcode 3559 00000BDD AC <1> lodsb ; get extra byte 3560 00000BDE A2[9C81] <1> mov byte [regmem], al ; save it in regmem 3561 00000BE1 A3[AC81] <1> mov word [a_opcode2], ax ; save this for obsolete-instruction detection 3562 00000BE4 800E[A681]02 <1> or byte [varflags], VAR_MODRM ; flag its presence 3563 <1> ac05a: 3564 00000BE9 8936[9881] <1> mov [mneminfo], si ; save si back again 3565 00000BED 89D6 <1> mov si, dx 3566 <1> %if ASMMOD > 0FFh 3567 <1> xor bx, bx 3568 <1> %endif 3569 00000BEF 8A9C[2C16] <1> mov bl, byte [opindex+si] 3570 00000BF3 01D2 <1> add dx, dx 3571 00000BF5 4A <1> dec dx 3572 00000BF6 01D3 <1> add bx, dx ; adjust to get correct index into oplists 3573 00000BF8 8DB7[0000] <1> lea si, [oplists+bx] ; si = the address of our operand list 3574 00000BFC BF[0E08] <1> mov di, line_out 3575 <1> 3576 <1> ; Begin loop over operands. 3577 <1> ; [a_opcode] etc set for opcode 3578 <1> ; si-> operand list 3579 <1> ; di-> next parsed operand 3580 <1> ; [mneminfo]-> mnemonic's next variant in assembler table 3581 <1> ac06: 3582 00000BFF AC <1> lodsb ; get next operand byte 3583 00000C00 3C00 <1> cmp al, OP_END 3584 00000C02 745F <1> je ac10 ; if end of list 3585 <1> 3586 <1> ; The OP_STACK_* operand types don't really need another 3587 <1> ; operand structure. So handle them before checking for 3588 <1> ; a valid operand structure. This is required for the 3589 <1> ; cases with no regular operands following the stack hint. 3590 <1> ; Because they aren't needed by the assembler anyway we 3591 <1> ; just loop back to ac06 to load the next operand type. 3592 00000C04 3C1F <1> cmp al, OP_STACK_PUSH 3593 00000C06 74F7 <1> je ac06 3594 00000C08 3C20 <1> cmp al, OP_STACK_POP 3595 00000C0A 74F3 <1> je ac06 3596 00000C0C 3C21 <1> cmp al, OP_STACK_SPECIAL 3597 00000C0E 74EF <1> je ac06 3598 <1> 3599 <1> ; Actual operand, or one of these always followed by one 3600 <1> ; or more actual operands (OP_M_*, OP_SHORT|NEAR|FAR), 3601 <1> ; so check for another valid operand structure. 3602 00000C10 803DFF <1> cmp byte [di+OPRND.flags], -1 3603 00000C13 744B <1> je ac01_j1 ; if too few operands were given 3604 00000C15 3C40 <1> cmp al, OP_SIZE 3605 00000C17 720E <1> jb ac07 ; if no size needed 3606 <1> %if 1 3607 00000C19 B400 <1> mov ah, 0 3608 00000C1B B104 <1> mov cl, 4 3609 00000C1D D3E0 <1> shl ax, cl ; move bits 4..7 (size) to ah (OP_1632=5, OP_8=6, OP_16=7, ...) 3610 00000C1F D2E8 <1> shr al, cl ; move bits 0..3 back 3611 <1> %else 3612 <1> aam 16 ; ax=00XY -> ax=0X0Y 3613 <1> %endif 3614 00000C21 8826[A881] <1> mov byte [a_reqsize], ah ; save it away 3615 00000C25 EB02 <1> jmp short ac08 3616 <1> 3617 <1> ac07: ; al = OP_M64.. 3618 <1> ; have al = 1..x 3619 <1> ; want al = 16..y 3620 00000C27 040F <1> add al, 16-1 ; adjust for the 16 start entries in asmjmp 3621 <1> 3622 <1> ac08: 3623 00000C29 98 <1> cbw ; al = 0..7 or 16..y, 3624 <1> ; al < 128, thus ax = al 3625 00000C2A 93 <1> xchg ax, bx ; now bx contains the index 3626 00000C2B 8A87[DC81] <1> mov al, byte [bittab+bx] 3627 00000C2F D1E3 <1> shl bx, 1 ; = offset into word array 3628 00000C31 8B8F[1A82] <1> mov cx, word [asmjmp + bx] 3629 <1> ; subroutine address 3630 00000C35 D1EB <1> shr bx, 1 ; return to index 3631 00000C37 83FB3D <1> cmp bx, OP_AMOUNT_TABLE 3632 00000C3A 731E <1> jae ac09_internal_error ; internal error 3633 00000C3C 8405 <1> test al, byte [di+OPRND.flags] 3634 00000C3E 7420 <1> jz ac09 ; if no required bits are present 3635 00000C40 B400 <1> mov ah, 0 ; (insure ah = 0 for ao90) 3636 00000C42 FFD1 <1> call cx ; call its specific routine 3637 00000C44 A0[A781] <1> mov al, [alloweddist] 3638 00000C47 F6D0 <1> not al 3639 00000C49 844501 <1> test byte [di + OPRND.distflags], al 3640 00000C4C 7512 <1> jnz ac09 ; if invalid distance specified --> 3641 00000C4E 817CFF5355 <1> cmp word [si-1], (OP_1632|OP_R)<<8|(OP_1632|OP_R_MOD) 3642 00000C53 7403 <1> je ac06_j1 ; (hack) for IMUL instruction 3643 00000C55 83C70C <1> add di, byte OPRND_size 3644 <1> ; -> next operand 3645 <1> ac06_j1: 3646 00000C58 EBA5 <1> jmp ac06 ; back for more 3647 <1> 3648 <1> ac09_internal_error: 3649 00000C5A BA[BB70] <1> mov dx, msg.aa_internal_error 3650 00000C5D E890B1 <1> call putsz 3651 <1> ac09: 3652 <1> ac01_j1: 3653 00000C60 E91BFF <1> jmp ac01 ; back to next possibility 3654 <1> 3655 <1> ; End of operand list. 3656 <1> ac10: 3657 00000C63 803DFF <1> cmp byte [di+OPRND.flags], -1 3658 00000C66 75F8 <1> jne ac09 ; if too many operands were given 3659 <1> 3660 <1> ; Final check on sizes 3661 00000C68 A0[A681] <1> mov al, byte [varflags] 3662 00000C6B A810 <1> test al, VAR_SIZ_NEED 3663 00000C6D 7414 <1> jz ac12 ; if no size needed 3664 00000C6F A804 <1> test al, VAR_SIZ_GIVN 3665 00000C71 7510 <1> jnz ac12 ; if a size was given 3666 00000C73 A808 <1> test al, VAR_SIZ_FORCD 3667 00000C75 74E9 <1> jz ac09 ; if the size was not forced ( ==> reject) 3668 00000C77 8B36[9881] <1> mov si, word [mneminfo] 3669 00000C7B 803CFF <1> cmp byte [si], ASM_END 3670 00000C7E 7403 <1> je ac12 ; if this is the last one 3671 <1> ac11: 3672 00000C80 E90CFB <1> jmp aa13a ; it was not, error --> (not a retry) 3673 <1> 3674 <1> ; Check other prefixes. 3675 <1> ac12: 3676 00000C83 A0[9681] <1> mov al, byte [aa_saved_prefix] 3677 00000C86 3C00 <1> cmp al, 0 3678 00000C88 7421 <1> je ac14 ; if no saved prefixes to check 3679 00000C8A 3CF0 <1> cmp al, 0F0h 3680 00000C8C 7509 <1> jne ac13 ; if it's a rep prefix 3681 00000C8E F606[A681]01 <1> test byte [varflags], VAR_LOCKABLE 3682 00000C93 74EB <1> jz ac11 ; if this variant is not lockable, error --> 3683 00000C95 EB14 <1> jmp short ac14 ; done 3684 <1> 3685 <1> ac13: 3686 00000C97 A1[AA81] <1> mov ax, word [a_opcode] ; check if opcode is OK for rep{,z,nz} 3687 00000C9A 24FE <1> and al, ~1 ; clear low order bit (MOVSW -> MOVSB) 3688 <1> 3689 00000C9C 3DFF00 <1> cmp ax, 0FFh 3690 00000C9F 77DF <1> ja ac11 ; if it's not a 1-byte instruction, error --> 3691 00000CA1 BF[2B11] <1> mov di, replist ; list of instructions that go with rep 3692 00000CA4 B90700 <1> mov cx, REP_LEN ; scan all (REP + REPxx) 3693 00000CA7 F2AE <1> repne scasb 3694 00000CA9 75D5 <1> jne ac11 ; if it's not among them, error --> 3695 <1> 3696 <1> ac14: 3697 00000CAB F606[9581]10 <1> test byte [asm_mn_flags], AMF_MSEG 3698 00000CB0 7412 <1> jz ac15 ; if no segment prefix before mnemonic --> 3699 00000CB2 A1[AA81] <1> mov ax, word [a_opcode] ; check if opcode allows this 3700 00000CB5 3DFF00 <1> cmp ax, 0FFh 3701 00000CB8 77C6 <1> ja ac11 ; if it's not a 1-byte instruction, error --> 3702 00000CBA BF[2211] <1> mov di, segprfxtab 3703 00000CBD B90900 <1> mov cx, SEGP_LEN 3704 00000CC0 F2AE <1> repne scasb 3705 00000CC2 75BC <1> jne ac11 ; if it's not in the list, error --> 3706 <1> 3707 <1> ac15: 3708 00000CC4 8B1E[9E81] <1> mov bx, word [immaddr] 3709 00000CC8 09DB <1> or bx, bx 3710 00000CCA 740C <1> jz ac16 ; if no immediate data 3711 00000CCC A0[A581] <1> mov al, byte [opsize] 3712 00000CCF F6D8 <1> neg al 3713 00000CD1 D0E0 <1> shl al, 1 3714 00000CD3 844707 <1> test al, byte [bx+7] 3715 00000CD6 75A8 <1> jnz ac11 ; if the immediate data was too big, error --> 3716 <1> 3717 <1> ; Put the instruction together 3718 <1> ; (maybe is this why they call it an assembler) 3719 <1> 3720 <1> ; First, the prefixes (including preceding WAIT instruction) 3721 <1> ac16: 3722 00000CD8 66 <1> _386_PM_o32 ; mov edi, dword [a_addr] 3723 00000CD9 8B3E[000B] <1> mov di, word [a_addr] 3724 00000CDD 8E06[040B] <1> mov es, word [a_addr + saSegSel] 3725 00000CE1 F606[9581]02 <1> test byte [asm_mn_flags], AMF_WAIT 3726 00000CE6 7404 <1> jz .nowaitprefix ; if no wait instruction beforehand 3727 00000CE8 B09B <1> mov al, 9Bh 3728 00000CEA 67 <1> _386_PM_a32 3729 00000CEB AA <1> stosb 3730 <1> .nowaitprefix: 3731 <1> 3732 00000CEC A0[9681] <1> mov al,[aa_saved_prefix] 3733 00000CEF 84C0 <1> test al, al 3734 00000CF1 7402 <1> jz .noprefix ; if no LOCK or REP prefix 3735 00000CF3 67 <1> _386_PM_a32 3736 00000CF4 AA <1> stosb 3737 <1> .noprefix: 3738 <1> 3739 <1> ;--- a 67h address size prefix is needed 3740 <1> ;--- 1. for CS16: if AMF_ADDR=1 and AMF_A32=1 3741 <1> ;--- 2. for CS32: if AMF_ADDR=1 and AMF_A32=0 3742 <1> 3743 00000CF5 A0[9581] <1> mov al, byte [asm_mn_flags] 3744 00000CF8 A880 <1> test al, AMF_ADDR 3745 00000CFA 7410 <1> jz .noaddressprefix 3746 00000CFC 2404 <1> and al, AMF_A32 3747 <1> %if _PM 3748 00000CFE 0A06[DB88] <1> or al, byte [bCSAttr] 3749 00000D02 7408 <1> jz .noaddressprefix ; if 16-bit CS and 16-bit addressing --> 3750 00000D04 3C44 <1> cmp al, AMF_A32| 40h 3751 00000D06 7404 <1> jz .noaddressprefix ; if 32-bit CS and 32-bit addressing --> 3752 <1> %else 3753 <1> jz .noaddressprefix ; 16-bit addressing in RM --> 3754 <1> %endif 3755 <1> ; Otherwise, the CS and addressing bitness mismatch. Write a prefix. 3756 00000D08 B067 <1> mov al, 67h 3757 00000D0A 67 <1> _386_PM_a32 3758 00000D0B AA <1> stosb ; store address size prefix 3759 <1> .noaddressprefix: 3760 <1> 3761 <1> ;--- a 66h data size prefix is needed 3762 <1> ;--- for CS16: if VAR_D32 == 1 or AMF_D32 == 1 3763 <1> ;--- for CS32: if VAR_D16 == 1 or AMF_D16 == 1 3764 <1> 3765 00000D0C 8A26[9581] <1> mov ah, byte [asm_mn_flags] 3766 00000D10 A0[A681] <1> mov al, byte [varflags] 3767 <1> %if _PM 3768 00000D13 F606[DB88]40 <1> test byte [bCSAttr], 40h 3769 00000D18 7407 <1> jz .dataprefix_rm 3770 00000D1A A92040 <1> test ax, VAR_D16|(AMF_D16<<8) 3771 00000D1D 7507 <1> jnz .dataprefix 3772 00000D1F EB09 <1> jmp short .nodataprefix 3773 <1> .dataprefix_rm: 3774 <1> %endif 3775 00000D21 A94001 <1> test ax, VAR_D32|(AMF_D32<<8) 3776 00000D24 7404 <1> jz .nodataprefix 3777 <1> .dataprefix: 3778 00000D26 B066 <1> mov al, 66h 3779 00000D28 67 <1> _386_PM_a32 3780 00000D29 AA <1> stosb ; store operand size prefix 3781 <1> .nodataprefix: 3782 <1> 3783 00000D2A A0[9781] <1> mov al, [aa_seg_pre] 3784 00000D2D 3C00 <1> cmp al, 0 3785 00000D2F 740B <1> je ac22 ; if no segment prefix 3786 00000D31 67 <1> _386_PM_a32 3787 00000D32 AA <1> stosb 3788 00000D33 3C64 <1> cmp al, 64h 3789 00000D35 7205 <1> jb ac22 ; if not 64 or 65 (FS or GS) --> 3790 00000D37 800E[9581]20 <1> or byte [asm_mn_flags], AMF_FSGS ; flag it 3791 <1> ac22: 3792 <1> 3793 <1> ; Now emit the instruction itself. 3794 00000D3C A1[AA81] <1> mov ax, word [a_opcode] 3795 00000D3F 89C3 <1> mov bx, ax 3796 00000D41 81EB4002 <1> sub bx, 240h 3797 00000D45 7317 <1> jae ac23 ; if 576.. (AGRP) --> 3798 00000D47 3D0002 <1> cmp ax, 200h 3799 00000D4A 7229 <1> jb ac24 ; if regular instruction --> 3800 00000D4C 800E[A381]01 <1> or byte [dmflags], DM_COPR ; flag it as an x87 instruction 3801 00000D51 2438 <1> and al, 38h ; get register part 3802 00000D53 0806[9C81] <1> or byte [regmem], al 3803 00000D57 93 <1> xchg ax, bx ; mov ax, bx (the low bits of bx are good) 3804 00000D58 2407 <1> and al, 7 3805 00000D5A 0CD8 <1> or al, 0D8h 3806 00000D5C EB21 <1> jmp short ac25 ; on to decoding the instruction 3807 <1> 3808 <1> ac23: 3809 00000D5E 800E[A681]02 <1> or byte [varflags], VAR_MODRM ; flag presence of ModR/M byte 3810 00000D63 B103 <1> mov cl, 3 ; one instruction of a group 3811 00000D65 D3EB <1> shr bx, cl ; separate AGRP()'s num part 3812 00000D67 2407 <1> and al, 7 ; separate ModR/M register value 3813 00000D69 D2E0 <1> shl al, cl 3814 00000D6B 0806[9C81] <1> or byte [regmem], al ; fix ModR/M byte 3815 00000D6F D1E3 <1> shl bx, 1 3816 00000D71 8B87[7801] <1> mov ax, word [agroups+bx] ; get actual opcode 3817 <1> 3818 <1> ac24: 3819 00000D75 84E4 <1> test ah, ah 3820 00000D77 7406 <1> jz ac25 ; if no 0Fh first --> 3821 00000D79 50 <1> push ax ; store a 0Fh 3822 00000D7A B00F <1> mov al, 0Fh 3823 00000D7C 67 <1> _386_PM_a32 3824 00000D7D AA <1> stosb 3825 00000D7E 58 <1> pop ax 3826 <1> ac25: 3827 00000D7F 0A06[A481] <1> or al, byte [opcode_or] ; put additional bits into the opcode 3828 00000D83 67 <1> _386_PM_a32 3829 00000D84 AA <1> stosb ; store the op code itself 3830 <1> 3831 <1> ; Now store the extra stuff that comes with the instruction. 3832 00000D85 A1[9C81] <1> mov ax, word [regmem] 3833 00000D88 F606[A681]02 <1> test byte [varflags], VAR_MODRM 3834 00000D8D 740D <1> jz ac26 ; if no ModR/M --> 3835 00000D8F 67 <1> _386_PM_a32 3836 00000D90 AA <1> stosb ; store the ModR/M byte 3837 00000D91 F606[9581]08 <1> test byte [asm_mn_flags], AMF_SIB 3838 00000D96 7404 <1> jz ac26 ; if no SIB --> 3839 00000D98 88E0 <1> mov al, ah 3840 00000D9A 67 <1> _386_PM_a32 3841 00000D9B AA <1> stosb ; store the SIB byte, too 3842 <1> ac26: 3843 <1> 3844 00000D9C 8B1E[9A81] <1> mov bx, word [rmaddr] 3845 00000DA0 85DB <1> test bx, bx 3846 00000DA2 740D <1> jz ac27 ; if no offset associated with the R/M --> 3847 00000DA4 66 <1> _386_PM_o32 ; xor ecx, ecx 3848 00000DA5 31C9 <1> xor cx, cx 3849 00000DA7 8A4F03 <1> mov cl, byte [bx+OPRND.sizedis] 3850 00000DAA 66 <1> _386_PM_o32 ; lea esi, [bx+OPRND.num] 3851 00000DAB 8D7708 <1> lea si, [bx+OPRND.num] 3852 00000DAE 67 <1> _386_PM_a32 3853 00000DAF F3A4 <1> rep movsb ; store the R/M offset (or memory offset) 3854 <1> ac27: 3855 <1> 3856 <1> ; Now store immediate data 3857 00000DB1 8B1E[9E81] <1> mov bx, word [immaddr] 3858 00000DB5 85DB <1> test bx, bx 3859 00000DB7 740E <1> jz ac28 ; if no immediate data --> 3860 00000DB9 66 <1> _386_PM_o32 ; xor ecx, ecx 3861 00000DBA 31C9 <1> xor cx, cx 3862 00000DBC 8A0E[A581] <1> mov cl, byte [opsize] 3863 00000DC0 66 <1> _386_PM_o32 ; lea esi, [bx+OPRND.num] 3864 00000DC1 8D7708 <1> lea si, [bx+OPRND.num] 3865 00000DC4 67 <1> _386_PM_a32 3866 00000DC5 F3A4 <1> rep movsb 3867 <1> ac28: 3868 <1> 3869 <1> ; Now store additional bytes (needed for, e.g., enter instruction 3870 <1> ; and far memory address) 3871 00000DC7 8B1E[A081] <1> mov bx, word [xxaddr] 3872 00000DCB 85DB <1> test bx, bx 3873 00000DCD 740D <1> jz ac29 ; if no additional data --> 3874 00000DCF 66 <1> _386_PM_o32 ; lea esi, [bx+OPRND.numadd] 3875 00000DD0 8D7704 <1> lea si, [bx+OPRND.numadd] 3876 00000DD3 66 <1> _386_PM_o32 ; xor eax, eax 3877 00000DD4 31C0 <1> xor ax, ax 3878 00000DD6 AC <1> lodsb 3879 00000DD7 66 <1> _386_PM_o32 ; xchg eax, ecx 3880 00000DD8 91 <1> xchg ax, cx ; (mov cx, ax) 3881 00000DD9 67 <1> _386_PM_a32 3882 00000DDA F3A4 <1> rep movsb 3883 <1> ac29: 3884 <1> 3885 <1> ; Done emitting. Update assembler address offset. 3886 00000DDC 16 <1> push ss 3887 00000DDD 07 <1> pop es ; restore es 3888 00000DDE 66 <1> _386_PM_o32 ; mov dword [a_addr], edi 3889 00000DDF 893E[000B] <1> mov word [a_addr], di 3890 <1> 3891 <1> ; Compute machine type. 3892 00000DE3 803E[A281]03 <1> cmp byte [dismach], 3 3893 00000DE8 7313 <1> jae ac31 ; if we already know a 386 is needed 3894 00000DEA F606[9581]25 <1> test byte [asm_mn_flags], AMF_D32 | AMF_A32 | AMF_FSGS 3895 00000DEF 7507 <1> jnz ac30 ; if 386 --> 3896 00000DF1 F606[A681]40 <1> test byte [varflags], VAR_D32 3897 00000DF6 7405 <1> jz ac31 ; if not 386 --> 3898 <1> ac30: 3899 00000DF8 C606[A281]03 <1> mov byte [dismach], 3 3900 <1> ac31: 3901 00000DFD BF[AE81] <1> mov di, a_obstab ; info on this instruction 3902 00000E00 8B0E[AC81] <1> mov cx, word [a_opcode2] 3903 00000E04 E8224B <1> call showmach ; get machine message into si, length into cx 3904 00000E07 E308 <1> jcxz ac33 ; if no message 3905 <1> 3906 <1> ac32: 3907 00000E09 BF[0E08] <1> mov di, line_out 3908 00000E0C F3A4 <1> rep movsb ; copy the line to line_out 3909 00000E0E E861AC <1> call putsline_crlf 3910 <1> 3911 <1> ac33: 3912 00000E11 E95FF7 <1> jmp aa01 ; back for the next input line 3913 <1> 3914 <1> %if 0 3915 <1> ; This is debugging code. It assumes that the original value 3916 <1> ; of a_addr is on the top of the stack. 3917 <1> pop si ; get orig. a_addr 3918 <1> mov ax, word [a_addr + saSegSel] 3919 <1> mov word [u_addr], si 3920 <1> mov word [u_addr + saSegSel], ax ; (doesn't work with 32-bit CS) 3921 <1> %if _PM 3922 <1> mov ax, word [a_addr + saSegment] 3923 <1> mov word [u_addr + saSegment], ax 3924 <1> mov ax, word [a_addr + saSelector] 3925 <1> mov word [u_addr + saSelector], ax 3926 <1> %endif 3927 <1> mov bx, word [a_addr] 3928 <1> sub bx, si 3929 <1> mov di, line_out 3930 <1> mov cx, 10 3931 <1> mov al, ' ' 3932 <1> rep stosb 3933 <1> mov ds, word [a_addr + saSegSel] 3934 <1> 3935 <1> ax1: lodsb 3936 <1> call hexbyte ; display the generated bytes 3937 <1> dec bx 3938 <1> jnz ax1 3939 <1> push ss 3940 <1> pop ds 3941 <1> call putsline_crlf 3942 <1> and word [disflags], 0 3943 <1> call disasm ; disassemble the new instruction 3944 <1> jmp aa01 ; back to next input line 3945 <1> %endif 3946 <1> 3947 <1> ; Routines to check for specific operand types. 3948 <1> ; Upon success, the routine returns. 3949 <1> ; Upon failure, it pops the return address and jumps to ac01. 3950 <1> ; The routines must preserve si and di. 3951 <1> 3952 <1> ; OP_RM, OP_M, OP_R_MOD: form MOD R/M byte. 3953 <1> aop_rm: 3954 <1> aop_m: 3955 <1> aop_r_mod: 3956 00000E14 E86903 <1> call ao90 ; form reg/mem byte 3957 00000E17 EB30 <1> jmp short ao07 ; go to the size check 3958 <1> 3959 <1> ; OP_R: register. 3960 <1> aop_r: 3961 00000E19 8A4504 <1> mov al, byte [di+OPRND.reg1] ; register number 3962 00000E1C 2407 <1> and al, 7 3963 00000E1E B103 <1> mov cl, 3 3964 00000E20 D2E0 <1> shl al, cl ; shift it into place 3965 00000E22 0806[9C81] <1> or byte [regmem], al ; put it into the reg/mem byte 3966 00000E26 EB21 <1> jmp short ao07 ; go to the size check 3967 <1> 3968 <1> ; OP_R_ADD: register, added to the instruction. 3969 <1> aop_r_add: 3970 00000E28 8A4504 <1> mov al, byte [di+OPRND.reg1] 3971 00000E2B 2407 <1> and al, 7 3972 00000E2D A2[A481] <1> mov byte [opcode_or], al ; put it there 3973 00000E30 EB17 <1> jmp short ao07 ; go to the size check 3974 <1> 3975 <1> ; OP_IMM: immediate data. 3976 <1> aop_imm: 3977 00000E32 893E[9E81] <1> mov word [immaddr], di ; save the location of this 3978 00000E36 EB11 <1> jmp short ao07 ; go to the size check 3979 <1> 3980 <1> ; OP_MOFFS: just the memory offset 3981 <1> aop_moffs: 3982 00000E38 F60502 <1> test byte [di+OPRND.flags], ARG_MODRM 3983 00000E3B 754F <1> jnz ao11 ; if MOD R/M byte ( ==> reject) 3984 00000E3D 893E[9A81] <1> mov word [rmaddr], di ; save the operand pointer 3985 00000E41 EB06 <1> jmp short ao07 ; go to the size check 3986 <1> 3987 <1> ; OP_AX: check for AL/AX/EAX 3988 <1> aop_ax: 3989 00000E43 F6450407 <1> test byte [di+OPRND.reg1], 7 3990 00000E47 7543 <1> jnz ao11 ; if wrong register, reject --> 3991 <1> ; jmp short ao07 ; go to the size check 3992 <1> 3993 <1> ; Size check 3994 <1> ao07: 3995 00000E49 800E[A681]10 <1> or byte [varflags], VAR_SIZ_NEED 3996 00000E4E A0[A881] <1> mov al, byte [a_reqsize] 3997 00000E51 2C05 <1> sub al, 5 ; OP_1632 >> 4 3998 00000E53 7C3A <1> jl ao12 ; if OP_ALL 3999 00000E55 7463 <1> je ao13 ; if OP_1632 4000 00000E57 3C05 <1> cmp al, 5 ; OP_1632_DEFAULT ? 4001 00000E59 7444 <1> je ao_1632_default 4002 <1> ; OP_8 = 1, OP_16 = 2, OP_32 = 3, OP_64 = 4 4003 00000E5B 04FD <1> add al, -3 4004 00000E5D 1403 <1> adc al, 3 ; convert 3 --> 4 and 4 --> 5 4005 <1> ao08: 4006 00000E5F 800E[A681]18 <1> or byte [varflags], VAR_SIZ_FORCD| VAR_SIZ_NEED 4007 <1> ao08_1: 4008 00000E64 8A5D02 <1> mov bl, byte [di+OPRND.sizearg] 4009 00000E67 84DB <1> test bl, bl ; SIZ_NONE ? 4010 00000E69 7409 <1> jz ao09 ; yes, if no size given --> 4011 00000E6B 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN 4012 00000E70 38D8 <1> cmp al, bl 4013 00000E72 7518 <1> jne ao11 ; if sizes conflict, reject --> 4014 <1> ao09: 4015 00000E74 3A06[A581] <1> cmp al, byte [opsize] 4016 00000E78 7411 <1> je ao10 ; if sizes agree --> 4017 00000E7A 3CFF <1> cmp al, -1 ; is it OP_MXX (for lea) ? 4018 00000E7C 740D <1> je ao10 4019 00000E7E 8606[A581] <1> xchg al, byte [opsize] 4020 00000E82 3C00 <1> cmp al, SIZ_NONE 4021 00000E84 7506 <1> jne ao11 ; if sizes disagree, reject --> 4022 00000E86 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN ; added in DEBUG/X 1.18 4023 <1> ao10: 4024 00000E8B C3 <1> retn 4025 <1> 4026 <1> ao11: 4027 <1> ao50_j1: 4028 00000E8C E9DE02 <1> jmp ao50 ; reject 4029 <1> 4030 <1> ; OP_ALL - Allow all sizes. 4031 <1> ao12: 4032 00000E8F 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4033 00000E92 3C01 <1> cmp al, SIZ_BYTE 4034 00000E94 743F <1> je ao15 ; if byte 4035 00000E96 7225 <1> jb ao14 ; if unknown (SIZ_NONE) --> 4036 00000E98 800E[A481]01 <1> or byte [opcode_or], 1 ; set bit in instruction 4037 00000E9D EB1E <1> jmp short ao14 ; if size is 16 or 32 4038 <1> 4039 <1> ; OP_1632_DEFAULT 4040 <1> ao_1632_default: 4041 00000E9F 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4042 00000EA2 84C0 <1> test al, al ; SIZ_NONE ? 4043 00000EA4 751B <1> jnz @F ; no --> 4044 00000EA6 A0[A581] <1> mov al, byte [opsize] ; (for push imm16/32) 4045 00000EA9 84C0 <1> test al, al ; SIZ_NONE ? 4046 00000EAB 7514 <1> jnz @F ; no --> 4047 00000EAD B002 <1> mov al, SIZ_WORD 4048 <1> %if _PM 4049 00000EAF F606[DB88]40 <1> test byte [bCSAttr], 40h 4050 00000EB4 740B <1> jz @F 4051 00000EB6 B004 <1> mov al, SIZ_DWORD 4052 <1> %endif 4053 00000EB8 EB07 <1> jmp @F 4054 <1> 4055 <1> ; OP_1632 - word or dword. 4056 <1> ao13: 4057 00000EBA 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4058 <1> ao14: 4059 00000EBD 84C0 <1> test al, al ; SIZ_NONE ? 4060 00000EBF 741B <1> jz ao16 ; yes, if still unknown --> 4061 <1> @@: 4062 00000EC1 3C02 <1> cmp al, SIZ_WORD 4063 00000EC3 7507 <1> jne ao15_1 ; if word 4064 00000EC5 800E[A681]20 <1> or byte [varflags], VAR_D16 4065 00000ECA EB09 <1> jmp short ao15 4066 <1> ao15_1: 4067 00000ECC 3C04 <1> cmp al, SIZ_DWORD 4068 00000ECE 75BC <1> jne ao11 ; if not dword 4069 00000ED0 800E[A681]40 <1> or byte [varflags], VAR_D32 ; set flag 4070 <1> ao15: 4071 00000ED5 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN 4072 <1> ; hack for pushd/pushw imm: check for match 4073 00000EDA EB98 <1> jmp ao09 4074 <1> ao16: 4075 00000EDC C3 <1> retn 4076 <1> 4077 <1> ; OP_M64 - 64-bit memory reference. 4078 <1> ; OP_MFLOAT - single-precision floating point memory reference. 4079 <1> ; OP_MDOUBLE - double-precision floating point memory reference. 4080 <1> ; OP_M80 - 80-bit memory reference. 4081 <1> ; OP_MXX - memory reference, size unknown. 4082 <1> ; INP: (from ac08 calling this:) 4083 <1> ; bx = index into bittab 4084 <1> ao17: 4085 00000EDD E8A002 <1> call ao90 ; form reg/mem byte 4086 00000EE0 8A87[8D82] <1> mov al, byte [asm_siznum + bx - (OP_FIRST_ASM_SIZNUM + 16 - 1)] 4087 00000EE4 E978FF <1> jmp ao08 ; check size 4088 <1> 4089 <1> ; OP_FARIMM - far address contained in instruction 4090 <1> ao21: 4091 00000EE7 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4092 00000EEA 84C0 <1> test al, al ; have a size ? (check for not SIZ_NONE) 4093 00000EEC 750B <1> jnz @F ; yes --> 4094 00000EEE B002 <1> mov al, SIZ_WORD ; default to word, assuming 16-bit CS 4095 <1> %if _PM 4096 00000EF0 F606[DB88]40 <1> test byte [bCSAttr], 40h; is it a 32-bit CS ? 4097 00000EF5 7402 <1> jz @F ; no --> 4098 00000EF7 B004 <1> mov al, SIZ_DWORD ; yes, default to dword 4099 <1> %endif 4100 <1> 4101 <1> @@: 4102 00000EF9 3C02 <1> cmp al, SIZ_WORD ; is it word ? 4103 00000EFB 750D <1> jne .o32_check ; no, check for dword size --> 4104 <1> .o16: 4105 00000EFD 800E[A681]20 <1> or byte [varflags], VAR_D16 4106 <1> ; mark flag for o16 prefix if needed 4107 <1> 4108 00000F02 837D0A00 <1> cmp word [di+OPRND.num+2], byte 0 4109 00000F06 7504 <1> jne ..@ao50_j_NZ ; if not a 16-bit offset --> 4110 <1> 4111 00000F08 EB0C <1> jmp short .common 4112 <1> 4113 <1> .o32_check: 4114 00000F0A 3C04 <1> cmp al, SIZ_DWORD ; is it dword ? 4115 <1> ..@ao50_j_NZ: 4116 00000F0C 7403E95C02 <1> jne ao50 ; no, invalid --> 4117 <1> .o32: 4118 00000F11 800E[A681]40 <1> or byte [varflags], VAR_D32 4119 <1> ; mark flag for o32 prefix if needed 4120 <1> 4121 <1> .common: 4122 00000F16 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN 4123 <1> 4124 00000F1B C6450402 <1> mov byte [di+OPRND.numadd], 2 ; 2 additional bytes (segment part) 4125 00000F1F 893E[9E81] <1> mov word [immaddr], di 4126 00000F23 A2[A581] <1> mov byte [opsize], al ; size of offset, 2 or 4 4127 <1> ao22a: 4128 00000F26 893E[A081] <1> mov word [xxaddr], di 4129 00000F2A C3 <1> retn 4130 <1> 4131 <1> ; OP_REL8 - relative address 4132 <1> ao23: 4133 00000F2B 807D0200 <1> cmp byte [di+OPRND.sizearg], SIZ_NONE 4134 00000F2F 75DB <1> jne ..@ao50_j_NZ 4135 <1> 4136 00000F31 66 <1> _386_PM_o32 4137 00000F32 A1[000B] <1> mov ax, word [a_addr] ; offset 4138 00000F35 66 <1> _386_PM_o32 4139 00000F36 40 <1> inc ax 4140 00000F37 66 <1> _386_PM_o32 4141 00000F38 40 <1> inc ax ; $ 4142 00000F39 8A0E[9581] <1> mov cl, byte [asm_mn_flags] 4143 <1> 4144 00000F3D F6C180 <1> test cl, AMF_ADDR 4145 00000F40 7517 <1> jnz ao23aa 4146 <1> ; JxCXZ, LOOPx, LOOPZx and LOOPNZx need a 67h, not a 66h prefix 4147 00000F42 F6C141 <1> test cl, AMF_D32 | AMF_D16 4148 00000F45 7422 <1> jz ao23b ; if not JxCXZ, LOOPx 4149 00000F47 F6C101 <1> test cl, AMF_D32 4150 00000F4A 7403 <1> jz ao23a 4151 00000F4C 80C904 <1> or cl, AMF_A32 4152 <1> ao23a: 4153 00000F4F 80E1BE <1> and cl, ~(AMF_D32 | AMF_D16) 4154 00000F52 80C980 <1> or cl, AMF_ADDR 4155 00000F55 880E[9581] <1> mov byte [asm_mn_flags], cl 4156 <1> ao23aa: 4157 00000F59 80E104 <1> and cl, AMF_A32 4158 <1> %if _PM 4159 00000F5C 0A0E[DB88] <1> or cl, byte [bCSAttr] 4160 00000F60 7407 <1> jz ao23b ; 16-bit CS and addressing --> 4161 00000F62 80F944 <1> cmp cl, AMF_A32| 40h 4162 00000F65 7402 <1> je ao23b ; 32-bit CS and addressing --> 4163 <1> %else 4164 <1> jz ao23b ; RM CS and 16-bit addressing --> 4165 <1> %endif 4166 00000F67 66 <1> _386_PM_o32 4167 00000F68 40 <1> inc ax ; adjust $ for the prefix that will be used 4168 <1> ao23b: 4169 00000F69 89C3 <1> mov bx, ax 4170 00000F6B 31C9 <1> xor cx, cx 4171 00000F6D 6650 <1> _386_PM push eax 4172 00000F6F 58 <1> _386_PM pop ax 4173 00000F70 59 <1> _386_PM pop cx 4174 00000F71 8B4508 <1> mov ax, word [di+OPRND.num+0] 4175 00000F74 8B550A <1> mov dx, word [di+OPRND.num+2] 4176 00000F77 29D8 <1> sub ax, bx 4177 00000F79 19CA <1> sbb dx, cx 4178 <1> 4179 00000F7B 884505 <1> mov byte [di+OPRND.num2], al 4180 00000F7E 3D8000 <1> cmp ax, 80h ; just one byte beyond range ? 4181 00000F81 750E <1> jne @F 4182 00000F83 85D2 <1> test dx, dx 4183 00000F85 750A <1> jnz @F ; no --> 4184 00000F87 803C22 <1> cmp byte [si], OP_E_CX ; we're trying for loop with (e)cx explicit ? 4185 00000F8A 7505 <1> jne @F ; no --> 4186 00000F8C 800D80 <1> setopt [di + OPRND.flags], ARG_ECX_SPECIAL 4187 <1> ; remember that we have to overflow 4188 00000F8F EB0C <1> jmp @FF 4189 <1> @@: 4190 00000F91 B107 <1> mov cl, 7 4191 00000F93 D2F8 <1> sar al, cl 4192 00000F95 38E0 <1> cmp al, ah 4193 00000F97 7575 <1> jne ao24 ; if too big, reject --> 4194 00000F99 39D0 <1> cmp ax, dx 4195 00000F9B 7571 <1> jne ao24 ; if too big, reject --> 4196 <1> @@: 4197 00000F9D C6450401 <1> mov byte [di+OPRND.numadd], 1 ; save the length 4198 00000FA1 EB83 <1> jmp short ao22a ; save it away 4199 <1> 4200 <1> 4201 <1> ; OP_REL1632: relative jump/call to a longer address. 4202 <1> ; 4203 <1> ; size of instruction is 4204 <1> ; a) CS 16-bit: 4205 <1> ; 3 (xx xxxx, near jmp/call E9/E8) or 4206 <1> ; 4 (0F xx xxxx, near jcc 0F 80+cc) 4207 <1> ; 6 (66 xx xxxxxxxx, near 32-bit jmp/call E9/E8) 4208 <1> ; 7 (66 0F xx xxxxxxxx, near 32-bit jcc 0F 80+cc) 4209 <1> ; 4210 <1> ; b) CS 32-bit: 4211 <1> ; 5 (xx xxxxxxxx, near jmp/call E9/E8) or 4212 <1> ; 6 (0F xx xxxxxxxx, near jcc 0F 80+cc) 4213 <1> ; 4 (66 xx xxxx, near 16-bit jmp/call E9/E8) 4214 <1> ; 5 (66 0F xx xxxx, near 16-bit jcc 0F 80+cc) 4215 <1> ao25: 4216 00000FA3 8B1E[000B] <1> mov bx, word [a_addr+0] 4217 <1> %if _PM 4218 00000FA7 8B0E[020B] <1> mov cx, word [a_addr+2] 4219 <1> %else 4220 <1> xor cx, cx 4221 <1> %endif 4222 <1> 4223 00000FAB 31C0 <1> xor ax, ax 4224 00000FAD 8A4502 <1> mov al, byte [di+OPRND.sizearg] 4225 00000FB0 84C0 <1> test al, al ; SIZ_NONE ? 4226 00000FB2 750B <1> jnz @F ; no --> 4227 00000FB4 B002 <1> mov al, SIZ_WORD ; in 16-bit CS default to word (2) 4228 <1> %if _PM 4229 00000FB6 F606[DB88]40 <1> test byte [bCSAttr], 40h 4230 00000FBB 7402 <1> jz @F 4231 00000FBD B004 <1> mov al, SIZ_DWORD ; in 32-bit CS default to dword (4) 4232 <1> %endif 4233 <1> @@: 4234 00000FBF 50 <1> push ax ; preserve size 4235 <1> 4236 <1> %if _PM 4237 00000FC0 F606[DB88]40 <1> test byte [bCSAttr], 40h 4238 00000FC5 7404 <1> jz .adjust_16bitcs 4239 <1> .adjust_32bitcs: 4240 00000FC7 3C04 <1> cmp al, SIZ_DWORD ; default size ? 4241 00000FC9 EB02 <1> jmp .adjust_common 4242 <1> %endif 4243 <1> 4244 <1> .adjust_16bitcs: 4245 00000FCB 3C02 <1> cmp al, SIZ_WORD ; default size ? 4246 <1> .adjust_common: 4247 00000FCD 7401 <1> je .adjust_done 4248 00000FCF 40 <1> inc ax ; no, increment for 66h prefix (osize) 4249 <1> .adjust_done: 4250 <1> 4251 00000FD0 40 <1> inc ax ; add size of opcode (E8h/E9h/80h+cc) 4252 <1> 4253 00000FD1 813E[AA81]0001 <1> cmp word [a_opcode], 100h 4254 <1> ; is it a 0Fh-prefixed opcode ? 4255 <1> ; (that is, a 0Fh 80h+cc conditional jump) 4256 00000FD7 7201 <1> jb @F 4257 00000FD9 40 <1> inc ax ; add size of 0Fh prefix opcode 4258 <1> @@: 4259 00000FDA 01C3 <1> add bx, ax 4260 00000FDC 83D100 <1> adc cx, byte 0 4261 00000FDF 58 <1> pop ax ; restore size (2 or 4) 4262 00000FE0 8B550A <1> mov dx, word [di+OPRND.num+2] 4263 <1> 4264 00000FE3 3C04 <1> cmp al, SIZ_DWORD 4265 00000FE5 740B <1> je ao27_1 ; if the size given was "dword" --> 4266 <1> 4267 <1> ao27: 4268 00000FE7 85D2 <1> test dx, dx 4269 00000FE9 7523 <1> jnz ao24 ; if operand is too big, reject --> 4270 00000FEB 800E[A681]20 <1> or byte [varflags], VAR_D16 4271 00000FF0 EB05 <1> jmp short ao28 4272 <1> 4273 <1> ao27_1: 4274 00000FF2 800E[A681]40 <1> or byte [varflags], VAR_D32 4275 <1> 4276 <1> ao28: 4277 00000FF7 884504 <1> mov byte [di+OPRND.numadd], al ; store the size 4278 00000FFA 8B4508 <1> mov ax, word [di+OPRND.num+0] 4279 00000FFD 31C9 <1> xor cx, cx 4280 00000FFF 29D8 <1> sub ax, bx 4281 00001001 19CA <1> sbb dx, cx ; compute DX:AX - CX:BX 4282 00001003 894505 <1> mov word [di+OPRND.num2+0], ax 4283 00001006 895507 <1> mov word [di+OPRND.num2+2], dx 4284 00001009 893E[A081] <1> mov word [xxaddr], di 4285 0000100D C3 <1> retn 4286 <1> 4287 <1> ao24: 4288 <1> ao50_j2: 4289 0000100E E95C01 <1> jmp ao50 ; reject 4290 <1> 4291 <1> ; OP_1CHK - The assembler can ignore this one. 4292 <1> ao29: 4293 00001011 58 <1> pop ax ; discard return address 4294 <1> ac06_j2: 4295 00001012 E943FC <1> jmp ac06_j1 ; next operand 4296 <1> 4297 <1> ; OP_STI - ST(I). 4298 <1> aop_sti: 4299 00001015 B01E <1> mov al, REG_ST ; code for ST 4300 00001017 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 4301 0000101A EB47 <1> jmp short ao38 ; to common code --> 4302 <1> 4303 <1> ; OP_MMX (previously was OP_ECX (used for LOOPx)) 4304 <1> aop_mmx: 4305 0000101C B01F <1> mov al, REG_MM 4306 0000101E EB3C <1> jmp short ao37 ; to common code --> 4307 <1> 4308 <1> ; OP_MMX_MOD 4309 <1> aop_mmx_mod: 4310 00001020 B01F <1> mov al, REG_MM 4311 00001022 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 4312 00001025 80CBC0 <1> or bl, 0C0h 4313 00001028 EB39 <1> jmp short ao38 4314 <1> 4315 <1> ; OP_CR 4316 <1> aop_cr: 4317 0000102A 8A4505 <1> mov al, byte [di+OPRND.reg2] ; get the index 4318 0000102D 3C04 <1> cmp al, 4 4319 0000102F 77DD <1> ja ao24 ; if too big, reject --> 4320 00001031 7505 <1> jne ao32 ; if not CR4 4321 00001033 C606[A281]05 <1> mov byte [dismach], 5 ; CR4 is new to the 586 4322 <1> ao32: 4323 00001038 3C01 <1> cmp al, 1 4324 0000103A 7506 <1> jne ao33 4325 0000103C 807D0CFF <1> cmp byte [di+OPRND_size+OPRND.flags], -1 4326 00001040 75CC <1> jne ao24 ; reject if no other arg (can't mov CR1,xx) 4327 <1> ao33: 4328 00001042 B020 <1> mov al, REG_CR ; code for CR 4329 00001044 EB16 <1> jmp short ao37 ; to common code 4330 <1> 4331 <1> ; OP_DR 4332 <1> ao34: 4333 00001046 B021 <1> mov al, REG_DR ; code for DR 4334 00001048 EB12 <1> jmp short ao37 ; to common code 4335 <1> 4336 <1> ; OP_TR 4337 <1> ao35: 4338 0000104A 8A4505 <1> mov al, byte [di+OPRND.reg2] ; get the index 4339 0000104D 3C03 <1> cmp al, 3 4340 0000104F 72BD <1> jb ao24 ; if too small, reject --> 4341 00001051 3C06 <1> cmp al, 6 4342 00001053 7305 <1> jae ao36 4343 00001055 C606[A281]04 <1> mov byte [dismach], 4 ; TR3-5 are new to the 486 4344 <1> ao36: 4345 0000105A B022 <1> mov al, REG_TR ; code for TR 4346 <1> 4347 <1> ; Common code for these weird registers. 4348 <1> ao37: 4349 0000105C 8A5D05 <1> mov bl, byte [di+OPRND.reg2] 4350 0000105F B103 <1> mov cl, 3 4351 00001061 D2E3 <1> shl bl, cl 4352 <1> ao38: 4353 00001063 081E[9C81] <1> or byte [regmem], bl 4354 00001067 800E[A681]02 <1> or byte [varflags], VAR_MODRM 4355 0000106C 3A4504 <1> cmp al, byte [di+OPRND.reg1] ; check for the right numbered register 4356 0000106F 7419 <1> je ao40 ; if yes, then return 4357 <1> ao38a: 4358 00001071 E9F900 <1> jmp ao50 ; reject --> 4359 <1> 4360 <1> ; OP_SEGREG 4361 <1> ao39: 4362 00001074 8A4504 <1> mov al, byte [di+OPRND.reg1] 4363 00001077 2C18 <1> sub al, 24 4364 00001079 3C06 <1> cmp al, 6 4365 0000107B 73F4 <1> jae ao38a ; if not a segment register, reject --> 4366 0000107D B103 <1> mov cl, 3 4367 0000107F D2E0 <1> shl al, cl 4368 00001081 0806[9C81] <1> or byte [regmem], al 4369 <1> ;--- v1.26: don't force size for MOV sreg, mxx / MOV mxx, sreg 4370 00001085 800E[A681]04 <1> or byte [varflags], VAR_SIZ_GIVN 4371 <1> ao40: 4372 0000108A C3 <1> retn 4373 <1> 4374 <1> ; OP_IMMS8 - Sign-extended immediate byte (PUSH xx) 4375 <1> ao41: 4376 0000108B 8026[A681]EF <1> and byte [varflags], ~VAR_SIZ_NEED ; added for v1.09. Ok? 4377 <1> ao41_extend: 4378 00001090 8B4508 <1> mov ax, word [di+OPRND.num+0] 4379 00001093 B107 <1> mov cl, 7 4380 00001095 D2F8 <1> sar al, cl 4381 00001097 EB05 <1> jmp short ao43 ; common code 4382 <1> 4383 <1> ; OP_IMM8 - Immediate byte 4384 <1> ao42: 4385 00001099 8B4508 <1> mov ax, word [di+OPRND.num+0] 4386 0000109C B000 <1> mov al, 0 4387 <1> ao43: 4388 0000109E 38E0 <1> cmp al, ah 4389 000010A0 7403E9C800 <1> jne ao50 ; if too big, reject --> 4390 000010A5 3B450A <1> cmp ax, word [di+OPRND.num+2] 4391 000010A8 7403E9C000 <1> jne ao50 ; if too big, reject --> 4392 000010AD B001 <1> mov al, SIZ_BYTE 4393 000010AF E8C000 <1> call aasizchk ; check that size == 0 or 1 4394 000010B2 8A6508 <1> mov ah, byte [di+OPRND.num+0] ; store the byte, length 1 4395 000010B5 894504 <1> mov word [di+OPRND.numadd], ax ; store length (0/1) + the byte 4396 000010B8 893E[A081] <1> mov word [xxaddr], di 4397 <1> ao43r: 4398 000010BC C3 <1> retn 4399 <1> 4400 <1> 4401 <1> aop_e_cx: 4402 000010BD B980FB <1> mov cx, AMF_ADDR | 0 | (~AMF_A32 << 8) 4403 000010C0 837D0409 <1> cmp word [di + OPRND.reg1], REG_CX 4404 000010C4 740B <1> je .a16 4405 <1> .a32: 4406 000010C6 B984FF <1> mov cx, AMF_ADDR | AMF_A32 | (~0 << 8) 4407 000010C9 E80500 <1> call .common 4408 000010CC B011 <1> mov al, REG_CX + 8 4409 000010CE E99600 <1> jmp ao48a 4410 <1> 4411 <1> .a16: 4412 <1> .common: 4413 000010D1 202E[9581] <1> and byte [asm_mn_flags], ch 4414 000010D5 080E[9581] <1> or byte [asm_mn_flags], cl 4415 <1> 4416 000010D9 8B1E[A081] <1> mov bx, word [xxaddr] 4417 000010DD 8A0E[9581] <1> mov cl, byte [asm_mn_flags] 4418 000010E1 80E104 <1> and cl, AMF_A32 4419 <1> %if _PM 4420 000010E4 0A0E[DB88] <1> or cl, byte [bCSAttr] 4421 000010E8 7410 <1> jz .noprefix ; 16-bit CS and addressing --> 4422 000010EA 80F944 <1> cmp cl, AMF_A32| 40h 4423 000010ED 740B <1> je .noprefix ; 32-bit CS and addressing --> 4424 <1> %else 4425 <1> jz .noprefix ; 86 Mode CS and 16-bit addressing --> 4426 <1> %endif 4427 000010EF FE4F05 <1> dec byte [bx + OPRND.num2] 4428 000010F2 7105 <1> jno .ret ; (no need to check special flag) 4429 <1> .prefix_overflow: 4430 000010F4 F60780 <1> testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 4431 000010F7 7406 <1> jz .ao50 ; not special, overflow -128 to +127 4432 <1> ; special, accept +128 to +127 4433 <1> .ret: 4434 000010F9 C3 <1> retn 4435 <1> 4436 <1> .noprefix: 4437 000010FA F60780 <1> testopt [bx + OPRND.flags], ARG_ECX_SPECIAL 4438 000010FD 74FA <1> jz .ret ; not special, no prefix 4439 <1> ; special and no prefix: reject 4440 <1> .ao50: 4441 000010FF EB6C <1> jmp ao50 4442 <1> 4443 <1> 4444 <1> ; OP_SHOSIZ - force the user to declare the size of the next operand 4445 <1> ao44: 4446 00001101 F606[A681]10 <1> test byte [varflags], VAR_SIZ_NEED 4447 00001106 7407 <1> jz ao45 ; if no testing needs to be done 4448 00001108 F606[A681]04 <1> test byte [varflags], VAR_SIZ_GIVN 4449 0000110D 745E <1> jz ao50 ; if size was given ( ==> reject) 4450 <1> ao45: 4451 0000110F 8026[A681]FB <1> and byte [varflags], ~VAR_SIZ_GIVN ; clear the flag 4452 00001114 803C11 <1> cmp byte [si], OP_IMM8 4453 00001117 7405 <1> je ao45a ; if OP_IMM8 is next, then don't set VAR_SIZ_NEED 4454 00001119 800E[A681]10 <1> or byte [varflags], VAR_SIZ_NEED 4455 <1> ao45a: 4456 <1> 4457 <1> ; hack for pushd/pushw imm (the only OP_SHOSIZ with suffix), 4458 <1> ; set operand size to 2 for pushw, 4 for pushd. 4459 <1> ; this is checked by ao15 later so as to match. 4460 0000111E B002 <1> mov al, 2 4461 00001120 8A26[9481] <1> mov ah, byte [aa_mnemsuffix] 4462 <1> ; 0 = normal, 'W' suffix, or 'D' suffix 4463 00001124 80FC44 <1> cmp ah, 'D' 4464 00001127 7407 <1> je @F ; if D, al = 2 --> 4465 00001129 48 <1> dec ax ; al = 1 4466 0000112A 80FC57 <1> cmp ah, 'W' 4467 0000112D 7401 <1> je @F ; if W, al = 1 --> 4468 0000112F 48 <1> dec ax ; al = 0 4469 <1> @@: 4470 00001130 00C0 <1> add al, al ; 0 = no suffix, 2 = 'W' suffix, 4 = 'D' suffix 4471 <1> ; as 0 = SIZ_NONE, 2 = SIZ_WORD, 4 = SIZ_DWORD 4472 00001132 A2[A581] <1> mov byte [opsize], al 4473 <1> ao_modifier_continue: 4474 00001135 58 <1> pop ax ; discard return address 4475 00001136 E9D9FE <1> jmp ac06_j2 ; next operand 4476 <1> 4477 <1> 4478 <1> ao_short: 4479 00001139 B001 <1> mov al, odfShort 4480 <1> ao_distance: 4481 0000113B 0806[A781] <1> or byte [alloweddist], al 4482 0000113F EBF4 <1> jmp ao_modifier_continue 4483 <1> 4484 <1> ao_near: 4485 00001141 B002 <1> mov al, odfNear 4486 00001143 EBF6 <1> jmp ao_distance 4487 <1> 4488 <1> ao_far_required: 4489 00001145 F6450104 <1> test byte [di + OPRND.distflags], odfFar 4490 00001149 7422 <1> jz ao50 ; if not far, reject --> 4491 <1> ao_far: 4492 0000114B B004 <1> mov al, odfFar 4493 0000114D EBEC <1> jmp ao_distance 4494 <1> 4495 <1> 4496 <1> ; OP_1 4497 <1> ao46: 4498 0000114F 817D070101 <1> cmp word [di+OPRND.orednum], 101h 4499 <1> ; check both size and value (OPRND.num) 4500 00001154 EB15 <1> jmp short ao49 ; test it later 4501 <1> 4502 <1> ; OP_3 4503 <1> ao47: 4504 00001156 807D0200 <1> cmp byte [di + OPRND.sizearg], SIZ_NONE 4505 0000115A 7511 <1> jne ao50 ; if BYTE is specified, reject this --> 4506 0000115C 817D070103 <1> cmp word [di+OPRND.orednum], 301h 4507 <1> ; check both size and value (OPRND.num) 4508 00001161 EB08 <1> jmp short ao49 ; test it later 4509 <1> 4510 <1> ; OP_DX, OP_CL, OP_ST, OP_ES, ..., OP_GS 4511 <1> ; INP: (from ac08 calling this:) 4512 <1> ; bx = index into bittab 4513 <1> ao48: 4514 00001163 8A87[6082] <1> mov al, [asm_regnum + bx - (OP_FIRST_ASM_REGNUM + 16 - 1)] 4515 <1> ao48a: 4516 00001167 98 <1> cbw 4517 00001168 3B4504 <1> cmp ax, word [di+OPRND.reg1] 4518 <1> 4519 <1> ao49: 4520 0000116B 7404 <1> je ao51 4521 <1> 4522 <1> ; Reject this operand list. 4523 <1> ao50: 4524 0000116D 58 <1> pop ax ; discard return address 4525 0000116E E90DFA <1> jmp ac01 ; go back to try the next alternative 4526 <1> 4527 <1> ao51: 4528 00001171 C3 <1> retn 4529 <1> 4530 <1> ; AASIZCHK - Check that the size given is 0 or AL. 4531 <1> aasizchk: 4532 00001172 807D0200 <1> cmp byte [di+OPRND.sizearg], SIZ_NONE 4533 00001176 74F9 <1> je ao51 4534 00001178 384502 <1> cmp byte [di+OPRND.sizearg], al 4535 0000117B 74F4 <1> je ao51 4536 0000117D 58 <1> pop ax ; discard return address 4537 0000117E EBED <1> jmp short ao50 ; reject this list --> 4538 <1> 4539 <1> ; Do reg/mem processing. 4540 <1> ; 4541 <1> ; INP: di-> OPRND structure 4542 <1> ; CHG: ax 4543 <1> ao90: 4544 00001180 F60504 <1> test byte [di+OPRND.flags], ARG_JUSTREG 4545 00001183 7516 <1> jnz ao92 ; if just register 4546 00001185 F60502 <1> test byte [di+OPRND.flags], ARG_MODRM 4547 00001188 7405 <1> jz ao91 ; if no precomputed MOD R/M byte 4548 0000118A 8B4504 <1> mov ax, word [di+OPRND.reg1] ; get the precomputed bytes 4549 0000118D EB1A <1> jmp short ao93 ; done 4550 <1> 4551 <1> ao91: 4552 0000118F B006 <1> mov al, 6 ; convert plain displacement to MOD R/M 4553 00001191 F606[9581]04 <1> test byte [asm_mn_flags], AMF_A32 4554 00001196 7411 <1> jz ao93 ; if 16-bit addressing 4555 00001198 48 <1> dec ax 4556 00001199 EB0E <1> jmp short ao93 ; done 4557 <1> 4558 <1> ao92: 4559 0000119B 8A4504 <1> mov al, byte [di+OPRND.reg1] ; convert register to MOD R/M 4560 <1> %if 1 4561 0000119E 3C1F <1> cmp al, REG_MM 4562 000011A0 7503 <1> jne .notmm 4563 000011A2 8A4505 <1> mov al, byte [di+OPRND.reg2] 4564 <1> .notmm: 4565 <1> %endif 4566 000011A5 2407 <1> and al, 7 ; get low 3 bits 4567 000011A7 0CC0 <1> or al, 0C0h 4568 <1> 4569 <1> ao93: 4570 000011A9 0906[9C81] <1> or word [regmem], ax ; store the MOD R/M and SIB 4571 000011AD 800E[A681]02 <1> or byte [varflags], VAR_MODRM ; flag its presence 4572 000011B2 893E[9A81] <1> mov word [rmaddr], di ; save a pointer 4573 000011B6 C3 <1> retn ; done 4574 <1> 4575 <1> ; AAIFNUM - Determine if a number starts here 4576 <1> ; 4577 <1> ; INP: al = first character 4578 <1> ; si-> next character 4579 <1> ; OUT: CY if no number starts there 4580 <1> ; NC if a number starts there 4581 <1> ; CHG: - 4582 <1> ; 4583 <1> ; Note: Actually checks for a plus or minus sign that 4584 <1> ; is followed by a valid (hexadecimal) digit, 4585 <1> ; or just a digit without specified sign. 4586 <1> aaifnum: 4587 000011B7 56 <1> push si 4588 000011B8 50 <1> push ax 4589 000011B9 3C2D <1> cmp al, '-' ; minus or plus sign ? 4590 000011BB 7404 <1> je @F 4591 000011BD 3C2B <1> cmp al, '+' 4592 000011BF 7503 <1> jne @FF ; no --> 4593 <1> @@: 4594 000011C1 E8CBA7 <1> call skipwhite ; skip sign, and (if any) blanks 4595 <1> @@: 4596 000011C4 3C28 <1> cmp al, '(' 4597 000011C6 F9 <1> stc 4598 000011C7 7404 <1> je @F 4599 000011C9 2C30 <1> sub al, '0' 4600 000011CB 3C0A <1> cmp al, 10 4601 <1> @@: 4602 000011CD 58 <1> pop ax 4603 000011CE 7208 <1> jb @F ; if a decimal digit --> 4604 <1> 4605 000011D0 50 <1> push ax 4606 000011D1 24DF <1> and al, TOUPPER 4607 000011D3 2C41 <1> sub al, 'A' 4608 000011D5 3C06 <1> cmp al, 6 4609 000011D7 58 <1> pop ax 4610 <1> @@: 4611 000011D8 F5 <1> cmc ; carry clear <==> it's a number 4612 000011D9 5E <1> pop si 4613 000011DA C3 <1> retn 4614 <1> 4615 <1> 4616 <1> ; AAGETI - Get a number from the input line. 4617 <1> ; 4618 <1> ; Entry AL First character of number 4619 <1> ; SI Address of next character of number 4620 <1> ; Exit DX:BX Resulting number 4621 <1> ; CL 1 if it's a byte, 2 if a word, 4 if a dword 4622 <1> ; AL Next character not in number 4623 <1> ; SI Address of next character after that 4624 <1> ; Uses AH, CH 4625 <1> aageti: 4626 <1> ; Incorporate expression evaluator here. 4627 000011DB 3C2D <1> cmp al, '-' 4628 000011DD 7416 <1> je aag1 ; if negative number --> 4629 000011DF 3C2B <1> cmp al, '+' ; (unnecessary) plus sign ? 4630 000011E1 7503 <1> jne @F ; no --> 4631 000011E3 E8A9A7 <1> call skipwhite ; skip it, plus blanks 4632 <1> @@: 4633 000011E6 E84100 <1> call aag4 ; get the bare number 4634 000011E9 B90100 <1> mov cx, 1 ; set up cx 4635 000011EC 09D2 <1> or dx, dx 4636 000011EE 7536 <1> jnz aag2 ; if dword 4637 000011F0 08FF <1> or bh, bh 4638 000011F2 7534 <1> jnz aag3 ; if word 4639 000011F4 C3 <1> retn ; it's a byte 4640 <1> 4641 <1> aag1: 4642 000011F5 E897A7 <1> call skipwhite 4643 000011F8 E82F00 <1> call aag4 ; get the bare number 4644 000011FB 89D9 <1> mov cx, bx 4645 000011FD 09D1 <1> or cx, dx 4646 000011FF B90100 <1> mov cx, 1 4647 00001202 7421 <1> jz aag1a ; if -0 4648 00001204 F7D2 <1> not dx ; negate the answer 4649 00001206 F7DB <1> neg bx 4650 00001208 F5 <1> cmc 4651 00001209 83D200 <1> adc dx, byte 0 4652 0000120C F6C680 <1> test dh, 80h 4653 0000120F 7453 <1> jz aag7 ; if error 4654 00001211 83FAFF <1> cmp dx, byte -1 4655 00001214 7510 <1> jne aag2 ; if dword 4656 00001216 F6C780 <1> test bh, 80h 4657 00001219 740B <1> jz aag2 ; if dword 4658 0000121B 80FFFF <1> cmp bh, -1 4659 0000121E 7508 <1> jne aag3 ; if word 4660 00001220 F6C380 <1> test bl, 80h 4661 00001223 7403 <1> jz aag3 ; if word 4662 <1> aag1a: 4663 <1> aag4.got_expr: 4664 00001225 C3 <1> retn ; it's a byte 4665 <1> 4666 <1> aag2: 4667 00001226 41 <1> inc cx ;return: it's a dword 4668 00001227 41 <1> inc cx 4669 <1> aag3: 4670 00001228 41 <1> inc cx ;return: it's a word 4671 00001229 C3 <1> retn 4672 <1> 4673 <1> aag4: 4674 0000122A 3C28 <1> cmp al, '(' 4675 0000122C 7511 <1> jne .not_expr 4676 0000122E AC <1> lodsb ; skip opening paren 4677 0000122F E801A1 <1> call getexpression ; returns bx:dx = numerical value 4678 00001232 87DA <1> xchg bx, dx ; dx:bx = number 4679 00001234 E859A7 <1> call skipwh0 4680 00001237 3C29 <1> cmp al, ')' 4681 00001239 AC <1> lodsb 4682 0000123A 74E9 <1> je .got_expr 4683 0000123C 4E <1> dec si 4684 0000123D EB25 <1> jmp aag7 4685 <1> 4686 <1> .not_expr: 4687 0000123F 31DB <1> xor bx, bx ; get the basic integer 4688 00001241 31D2 <1> xor dx, dx 4689 00001243 E8F8A5 <1> call getnyb 4690 00001246 721C <1> jc aag7 ; if not a hex digit 4691 <1> aag5: 4692 00001248 08C3 <1> or bl, al ; add it to the number 4693 <1> @@: 4694 0000124A AC <1> lodsb 4695 0000124B 3C5F <1> cmp al, '_' 4696 0000124D 74FB <1> je @B 4697 0000124F E8ECA5 <1> call getnyb 4698 00001252 72D1 <1> jc aag1a ; if done 4699 00001254 F6C6F0 <1> test dh, 0F0h 4700 00001257 750B <1> jnz aag7 ; if overflow 4701 00001259 B90400 <1> mov cx, 4 4702 <1> aag6: 4703 0000125C D1E3 <1> shl bx, 1 ; shift it by 4 4704 0000125E D1D2 <1> rcl dx, 1 4705 00001260 E2FA <1> loop aag6 4706 00001262 EBE4 <1> jmp short aag5 4707 <1> 4708 <1> aag7: 4709 00001264 E9AB92 <1> jmp error 4710 <1> 4711 <1> ; AACONVINDEX - Convert results from AAGETI and store index value 4712 <1> ; 4713 <1> ; Entry DX:BX,CL As in exit from AAGETI 4714 <1> ; DI Points to information record for this arg 4715 <1> ; Exit SS bits stored in [di+OPRND.index] 4716 <1> ; Uses DL 4717 <1> aaconvindex: 4718 00001267 80F901 <1> cmp cl, 1 4719 0000126A 7517 <1> jne aacv1 ; if the number is too large 4720 0000126C 80FB01 <1> cmp bl, 1 4721 0000126F 7414 <1> je aacv2 ; if 1 4722 00001271 42 <1> inc dx 4723 00001272 80FB02 <1> cmp bl, 2 4724 00001275 740E <1> je aacv2 ; if 2 4725 00001277 42 <1> inc dx 4726 00001278 80FB04 <1> cmp bl, 4 4727 0000127B 7408 <1> je aacv2 ; if 4 4728 0000127D 42 <1> inc dx 4729 0000127E 80FB08 <1> cmp bl, 8 4730 00001281 7402 <1> je aacv2 ; if 8 4731 <1> aacv1: 4732 00001283 EBDF <1> jmp short aag7 ; error 4733 <1> 4734 <1> aacv2: 4735 00001285 885506 <1> mov byte [di+OPRND.index], dl ; save the value 4736 00001288 C3 <1> retn 4737 <1> 4738 <1> ; AAGETREG - Get register for the assembler. 4739 <1> ; 4740 <1> ; Entry DI Start of register table 4741 <1> ; CX Length of register table (or 0) 4742 <1> ; SI Address of first character in register name 4743 <1> ; Exit NC if a register was found, 4744 <1> ; SI Updated if a register was found 4745 <1> ; BX Register number, defined as in the table below 4746 <1> ; Uses AX, CX, DI 4747 <1> ; 4748 <1> ; Exit value of BX: 4749 <1> ; DI = rgnam816, CX = 27 DI = rgnam16, CX = 8 4750 <1> ; ---------------------- -------------------- 4751 <1> ; 0 .. 7: AL .. BH 0 .. 7: AX .. DI 4752 <1> ; 8 .. 15: AX .. DI 4753 <1> ; 16 .. 23: EAX..EDI 16 .. 23: EAX..EDI 4754 <1> ; 24 .. 29: ES .. GS 4755 <1> ; 30 .. 34: ST .. TR 4756 <1> ; (This has to match the REG_ equs defined in uu.asm 4757 <1> ; around rgnam816 and following.) 4758 <1> aagetreg: 4759 00001289 8B04 <1> mov ax, word [si] 4760 0000128B 25DFDF <1> and ax, TOUPPER_W ; convert to upper case 4761 0000128E 3C45 <1> cmp al, 'E' ; check for EAX, etc. 4762 00001290 7522 <1> jne aagr1 ; if not 'E' --> (NZ) 4763 00001292 50 <1> push ax 4764 00001293 88E0 <1> mov al, ah 4765 00001295 8A6402 <1> mov ah, byte [si+2] 4766 00001298 80E4DF <1> and ah, TOUPPER 4767 0000129B 57 <1> push di 4768 0000129C BF[0288] <1> mov di, rgnam16 4769 0000129F 51 <1> push cx 4770 000012A0 B90800 <1> mov cx, N_REGS16 4771 000012A3 F2AF <1> repne scasw 4772 000012A5 89CB <1> mov bx, cx 4773 000012A7 59 <1> pop cx 4774 000012A8 5F <1> pop di 4775 000012A9 58 <1> pop ax 4776 000012AA 7508 <1> jne aagr1 ; if no match --> (NZ) 4777 000012AC 46 <1> inc si 4778 000012AD F7D3 <1> not bx 4779 000012AF 80C318 <1> add bl, 8+16 ; adjust BX 4780 000012B2 EB11 <1> jmp short aagr2 ; finish up 4781 <1> 4782 <1> aagr1: ; (entered with NZ) 4783 000012B4 89CB <1> mov bx, cx ; (if cx = 0, this is always reached with 4784 000012B6 F2AF <1> repne scasw ; ZF clear, that is, NZ) 4785 000012B8 750F <1> jne aagr3 ; if no match 4786 000012BA 29CB <1> sub bx, cx 4787 000012BC 4B <1> dec bx 4788 000012BD 80FB10 <1> cmp bl, 16 4789 000012C0 7203 <1> jb aagr2 ; if AL .. BH or AX .. DI 4790 000012C2 80C308 <1> add bl, 8 4791 <1> aagr2: 4792 000012C5 46 <1> inc si ; skip the register name 4793 000012C6 46 <1> inc si 4794 000012C7 F8 <1> clc 4795 000012C8 C3 <1> retn 4796 <1> aagr3: 4797 000012C9 F9 <1> stc ; not found 4798 000012CA C3 <1> retn 2101 %include "dd.asm" 2102 <1> 2103 <1> %if 0 2104 <1> 2105 <1> lDebug D commands - Dump data 2106 <1> 2107 <1> Copyright (C) 1995-2003 Paul Vojta 2108 <1> Copyright (C) 2008-2012 C. Masloch 2109 <1> 2110 <1> Usage of the works is permitted provided that this 2111 <1> instrument is retained with the works, so that any entity 2112 <1> that uses the works is notified of this instrument. 2113 <1> 2114 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2115 <1> 2116 <1> %endif 2117 <1> 2118 <1> 2119 <1> usesection lDEBUG_DATA_ENTRY 2120 <1> align 4, db 0 2121 000082B8 0000 <1> ddoffset: dw 0 ; offset word for dd 2122 <1> ; (number of skipped bytes at start of line) 2123 <1> %if _PM 2124 000082BA 0000 <1> dw 0 ; high word initialised to and fixed at zero 2125 <1> %endif 2126 000082BC 0000 <1> ddskipped: dw 0 2127 <1> %if _PM 2128 000082BE 0000 <1> dw 0 ; high word initialised to and fixed at zero 2129 <1> %endif 2130 000082C0 0100 <1> ddsize: dw 1 ; size of dd item 2131 000082C2 00 <1> ddoffset2: db 0 2132 <1> 2133 <1> 2134 <1> usesection lDEBUG_CODE 2135 <1> 2136 <1> ; D command - hex/ASCII dump. 2137 <1> ddd: 2138 <1> %if _INT || _PM || _MCB || _DSTRINGS 2139 000012CB E87579 <1> call uppercase 2140 <1> %endif 2141 000012CE 86C4 <1> xchg al, ah 2142 000012D0 8A44FE <1> mov al, byte [si - 2] 2143 000012D3 E86D79 <1> call uppercase 2144 000012D6 3C44 <1> cmp al, 'D' 2145 000012D8 86C4 <1> xchg al, ah 2146 000012DA 7569 <1> jne .not_d_suffix 2147 <1> %if _DSTRINGS 2148 000012DC 3C5A <1> cmp al, 'Z' ; DZ command ? 2149 000012DE 7503E9D803 <1> je dz ; yes --> 2150 000012E3 3C24 <1> cmp al, '$' ; D$ command ? 2151 000012E5 7503E9AA03 <1> je dcpm ; yes --> 2152 000012EA 3C23 <1> cmp al, '#' ; D# command ? 2153 000012EC 7503E9BD03 <1> je dcounted ; yes --> 2154 000012F1 3C57 <1> cmp al, 'W' 2155 000012F3 750B <1> jne .notstring 2156 000012F5 50 <1> push ax 2157 000012F6 AC <1> lodsb 2158 000012F7 3C23 <1> cmp al, '#' ; DW# command ? 2159 000012F9 58 <1> pop ax 2160 000012FA 7503E9A203 <1> je dwcounted ; yes --> 2161 000012FF 4E <1> dec si 2162 <1> .notstring: 2163 <1> %endif 2164 <1> %if _INT 2165 00001300 3C49 <1> cmp al, 'I' ; DI command ? 2166 00001302 750D <1> jne .notdi 2167 <1> %if 1 2168 00001304 50 <1> push ax 2169 00001305 AC <1> lodsb 2170 00001306 4E <1> dec si 2171 00001307 24DF <1> and al, TOUPPER 2172 00001309 3C50 <1> cmp al, 'P' ; distinguish 'di ...' and 'd ip' 2173 0000130B 58 <1> pop ax 2174 0000130C 7403 <1> je .notdi 2175 <1> %endif 2176 0000130E E96004 <1> jmp gateout ; yes --> 2177 <1> .notdi: 2178 <1> %endif 2179 <1> %if _PM 2180 00001311 3C4C <1> cmp al, 'L' ; DL command ? 2181 00001313 7503 <1> jne .notdl 2182 00001315 E9D102 <1> jmp descout ; yes --> 2183 <1> .notdl: 2184 00001318 3C58 <1> cmp al, 'X' ; DX command ? 2185 0000131A 0F846F0B <1> _386 je extmem ; yes --> 2186 <1> .notdx: 2187 <1> %endif 2188 <1> %if _MCB 2189 0000131E 3C4D <1> cmp al, 'M' ; DM command ? 2190 00001320 7503 <1> jne .notdm 2191 00001322 E93F0A <1> jmp mcbout ; yes --> 2192 <1> .notdm: 2193 <1> %endif 2194 00001325 B90100 <1> mov cx, 1 2195 00001328 3C42 <1> cmp al, 'B' 2196 0000132A 740B <1> je .d_suffix_size 2197 0000132C 41 <1> inc cx ; = 2 2198 0000132D 3C57 <1> cmp al, 'W' 2199 0000132F 7406 <1> je .d_suffix_size 2200 00001331 41 <1> inc cx 2201 00001332 41 <1> inc cx ; = 4 2202 00001333 3C44 <1> cmp al, 'D' 2203 00001335 750E <1> jne .not_d_suffix 2204 <1> .d_suffix_size: 2205 00001337 880E[C082] <1> mov byte [ddsize], cl 2206 0000133B E851A6 <1> call skipwhite 2207 0000133E E8F9A5 <1> call iseol? 2208 00001341 7536 <1> jne dd1 ; jump to getting range --> (with new size) 2209 00001343 EB08 <1> jmp lastddd ; default range (ADS:ADO length 128), 2210 <1> ; but with new size --> 2211 <1> 2212 <1> .not_d_suffix: 2213 00001345 E848A6 <1> call skipwh0 2214 00001348 E8EFA5 <1> call iseol? 2215 0000134B 7527 <1> jne dd1_bytes ; if an address was given --> (set byte size) 2216 <1> 2217 <1> lastddd: 2218 <1> ; byte [ddsize] = size already set 2219 0000134D 66 <1> _386_PM_o32 ; mov edx, dword [d_addr] 2220 0000134E 8B16[0A0B] <1> mov dx, word [d_addr] ; compute range of 80h or until end of segment 2221 00001352 66 <1> _386_PM_o32 ; mov esi, edx 2222 00001353 89D6 <1> mov si, dx 2223 00001355 8B1E[0E0B] <1> mov bx, [d_addr + saSegSel] 2224 00001359 E80C4A <1> _386_PM call test_d_b_bit 2225 0000135C 750A <1> _386_PM jnz .32 2226 0000135E 83C27F <1> add dx, byte 7Fh 2227 00001361 733C <1> jnc dd2_0 2228 00001363 83CAFF <1> or dx, byte -1 2229 00001366 EB37 <1> jmp short dd2_0 2230 <1> 2231 <1> %if _PM 2232 <1> [cpu 386] 2233 <1> .32: 2234 00001368 6683C27F <1> add edx, byte 7Fh 2235 0000136C 7331 <1> jnc dd2_0 ; if no overflow 2236 0000136E 6683CAFF <1> or edx, byte -1 2237 00001372 EB2B <1> jmp short dd2_0 2238 <1> __CPU__ 2239 <1> %endif 2240 <1> 2241 <1> dd1_bytes: 2242 00001374 C606[C082]01 <1> mov byte [ddsize], 1 2243 <1> dd1: 2244 00001379 B98000 <1> mov cx, 80h ; default length (128 bytes) 2245 0000137C 8B1E[840C] <1> mov bx, word [reg_ds] 2246 00001380 E8DB94 <1> call getrangeX ; get address range into bx:(e)dx 2247 00001383 E8C9A5 <1> call chkeol ; expect end of line here 2248 <1> 2249 00001386 891E[0E0B] <1> mov word [d_addr + saSegSel], bx 2250 <1> ; save segment (offset is saved later) 2251 <1> %if _PM 2252 0000138A E8707E <1> call ispm 2253 0000138D 7506 <1> jnz .86m 2254 <1> .pm: 2255 0000138F 891E[120B] <1> mov word [d_addr + saSelector], bx 2256 00001393 EB04 <1> jmp @F 2257 <1> .86m: 2258 00001395 891E[100B] <1> mov word [d_addr + saSegment], bx 2259 <1> @@: 2260 <1> %endif 2261 00001399 66 <1> _386_PM_o32 ; mov esi, edx 2262 0000139A 89D6 <1> mov si, dx ; bx:(e)si = start 2263 0000139C 66 <1> _386_PM_o32 ; mov edx, ecx 2264 0000139D 89CA <1> mov dx, cx ; bx:(e)dx = last 2265 <1> %if _PM && 0 2266 <1> jmp short dd2_1 2267 <1> %endif 2268 <1> 2269 <1> ; Parsing is done. Print first line. 2270 <1> dd2_0: 2271 <1> %if _PM 2272 0000139F E85B7E <1> call ispm 2273 000013A2 750B <1> jnz dd2_1 2274 <1> [cpu 286] 2275 000013A4 0F00E3 <1> verr bx ; readable ? 2276 <1> __CPU__ 2277 000013A7 7406 <1> jz dd2_1 2278 <1> %if 1 2279 000013A9 BA[C382] <1> mov dx, .errmsg 2280 000013AC E93BAA <1> jmp putsz_error 2281 <1> usesection lDEBUG_DATA_ENTRY 2282 000082C3 5365676D656E742069- <1> .errmsg:asciz "Segment is not readable.",13,10 2282 000082CC 73206E6F7420726561- <1> 2282 000082D5 6461626C652E0D0A00 <1> 2283 <1> usesection lDEBUG_CODE 2284 <1> %else 2285 <1> mov bx, word [reg_ds] 2286 <1> mov word [d_addr + saSegSel], bx 2287 <1> %if _PM 2288 <1> call ispm 2289 <1> jnz .86m 2290 <1> .pm: 2291 <1> mov word [d_addr + saSelector], bx 2292 <1> jmp @F 2293 <1> .86m: 2294 <1> mov word [d_addr + saSegment], bx 2295 <1> @@: 2296 <1> %endif 2297 <1> %endif 2298 <1> dd2_1: 2299 <1> %endif 2300 <1> 2301 000013AF A1[C082] <1> mov ax, word [ddsize] 2302 000013B2 48 <1> dec ax ; 0 = byte, 1 = word, 3 = dword 2303 000013B3 21F0 <1> and ax, si ; how many bytes to skip at the beginning 2304 000013B5 A2[C282] <1> mov byte [ddoffset2], al 2305 <1> 2306 000013B8 B80100 <1> mov ax, opt2_db_header 2307 000013BB 803E[C082]02 <1> cmp byte [ddsize], 2 2308 000013C0 7207 <1> jb @F 2309 000013C2 B010 <1> mov al, opt2_dw_header 2310 000013C4 7403 <1> je @F 2311 000013C6 B80001 <1> mov ax, opt2_dd_header 2312 <1> @@: 2313 000013C9 E81400 <1> call dd_header_or_trailer 2314 <1> 2315 000013CC E88700 <1> call dd_display 2316 <1> 2317 000013CF B80200 <1> mov ax, opt2_db_trailer 2318 000013D2 803E[C082]02 <1> cmp byte [ddsize], 2 2319 000013D7 7207 <1> jb @F 2320 000013D9 B020 <1> mov al, opt2_dw_trailer 2321 000013DB 7403 <1> je @F 2322 000013DD B80002 <1> mov ax, opt2_dd_trailer 2323 <1> @@: 2324 <1> ; fall through 2325 <1> 2326 <1> 2327 <1> ; INP: ax = flag value to check 2328 <1> ; (determines whether "header" or "trailer" is written, 2329 <1> ; and which flag must be set in word [options2]) 2330 <1> ; byte [ddoffset2] = how many bytes to skip at the start 2331 <1> ; CHG: ax, cx, di 2332 <1> ; STT: ds = es = ss 2333 <1> dd_header_or_trailer: 2334 000013E0 8506[8000] <1> test word [options2], ax 2335 000013E4 746F <1> jz .ret 2336 000013E6 53 <1> push bx 2337 000013E7 56 <1> push si 2338 000013E8 52 <1> push dx 2339 <1> 2340 000013E9 B90600 <1> mov cx, msg.header.length 2341 000013EC BA[8B68] <1> mov dx, msg.header 2342 000013EF A91101 <1> test ax, opt2_db_header | opt2_dw_header | opt2_dd_header 2343 000013F2 7506 <1> jnz @F 2344 000013F4 B90700 <1> mov cx, msg.trailer.length 2345 000013F7 BA[9268] <1> mov dx, msg.trailer 2346 <1> @@: 2347 000013FA E8F3A9 <1> call putsz ; put initial word 2348 000013FD F7D9 <1> neg cx ; minus length of initial word 2349 000013FF B80B00 <1> mov ax, 4 + 1 + 4 + 2 ; length of address with 16-bit offset 2350 <1> %if _PM 2351 00001402 8B1E[0E0B] <1> mov bx, word [d_addr + saSegSel] 2352 00001406 E85F49 <1> call test_d_b_bit ; 32-bit segment ? 2353 00001409 7403 <1> jz .16 ; no --> 2354 0000140B B80F00 <1> mov ax, 4 + 1 + 8 + 2 ; length of address with 32-bit offset 2355 <1> .16: 2356 <1> %endif 2357 0000140E 01C1 <1> add cx, ax ; length of address minus length of word 2358 <1> ; = length to pad 2359 00001410 B020 <1> mov al, 32 2360 00001412 BF[0E08] <1> mov di, line_out 2361 00001415 F3AA <1> rep stosb ; pad 2362 <1> ; ch = 0 2363 <1> 2364 00001417 B83020 <1> mov ax, '0 ' ; al = '0', ah = blank 2365 0000141A 8A0E[C282] <1> mov cl, byte [ddoffset2]; cx = ddoffset2 2366 0000141E E304 <1> jcxz @FF ; if none to skip --> 2367 <1> @@: 2368 00001420 AB <1> stosw 2369 00001421 40 <1> inc ax ; increment the number (up to '3') 2370 00001422 E2FC <1> loop @B ; loop for skipping --> 2371 <1> @@: 2372 00001424 2C30 <1> sub al, '0' ; = back to numerical (0 .. 3) 2373 00001426 89C2 <1> mov dx, ax ; dl = numerical offset 2374 <1> 2375 00001428 52 <1> push dx 2376 00001429 BE1000 <1> mov si, 16 ; loop counter 2377 0000142C 8B1E[C082] <1> mov bx, [ddsize] ; ddsize 2378 <1> @@: 2379 00001430 88D0 <1> mov al, dl ; next numerical offset 2380 00001432 E817A6 <1> call hexnyb ; display it 2381 00001435 89D9 <1> mov cx, bx 2382 00001437 01C9 <1> add cx, cx ; cx = 2 * ddsize 2383 00001439 B020 <1> mov al, 32 2384 0000143B F3AA <1> rep stosb ; pad to next position 2385 0000143D 01DA <1> add dx, bx ; increment dl by how many positions we use 2386 0000143F 29DE <1> sub si, bx ; decrement loop counter 2387 00001441 77ED <1> ja @B ; don't jump if si was below-or-equal-to bx 2388 00001443 5A <1> pop dx 2389 <1> 2390 00001444 B91000 <1> mov cx, 16 ; loop counter 2391 <1> @@: 2392 00001447 88D0 <1> mov al, dl 2393 00001449 E800A6 <1> call hexnyb ; display an offset 2394 <1> ; Note that this will wrap around for the last 1, 2, or 3 2395 <1> ; characters if byte [ddoffset2] is non-zero. 2396 0000144C 42 <1> inc dx ; increment offset 2397 0000144D E2F8 <1> loop @B ; loop 2398 <1> 2399 0000144F E820A6 <1> call putsline_crlf 2400 <1> 2401 00001452 5A <1> pop dx 2402 00001453 5E <1> pop si 2403 00001454 5B <1> pop bx 2404 <1> .ret: 2405 00001455 C3 <1> retn 2406 <1> 2407 <1> 2408 <1> ; INP: word [d_addr + saSegSel] = segment/selector to dump 2409 <1> ; (e)si = start offset 2410 <1> ; (e)dx = end offset 2411 <1> ; byte [ddsize] = 1, 2, or 4 (for byte, word, or dword) 2412 <1> ; OUT: (d)word [d_addr] updated 2413 <1> ; (e)dx = (d)word [d_addr] 2414 <1> ; displayed 2415 <1> dd_display: 2416 00001456 16 <1> push ss 2417 00001457 07 <1> pop es 2418 <1> dd2_loop: 2419 00001458 E87C2B <1> call handle_serial_flags_ctrl_c 2420 <1> 2421 0000145B C706[DA0B][4D13] <1> mov word [lastcmd], lastddd 2422 <1> 2423 00001461 BF[0E08] <1> mov di, line_out ; reset di for next line 2424 00001464 E85501 <1> call dd_display_offset.masklownybble 2425 <1> ; ax = offset & ~ 0Fh 2426 <1> 2427 00001467 8B0E[C082] <1> mov cx, word [ddsize] 2428 0000146B 51 <1> push cx 2429 0000146C 49 <1> dec cx ; 0 = byte, 1 = word, 3 = dword 2430 0000146D 21F1 <1> and cx, si ; how many bytes to skip at the beginning 2431 <1> ; eg: si = 101h, cx = 1, skip 1 byte, ax = 101h 2432 <1> ; si = 102h, cx = 3, skip 2 bytes, ax = 102h 2433 <1> ; si = 103h, cx = 3, skip 3 bytes, ax = 103h 2434 <1> ; si = 103h, cx = 1, skip 1 byte, ax = 101h 2435 <1> ; si = 10Fh, cx = 1, skip 1 byte, ax = 101h 2436 <1> ; si = 10Fh, cx = 3, skip 3 bytes, ax = 103h 2437 0000146F 01C8 <1> add ax, cx ; = where to start 2438 00001471 890E[B882] <1> mov word [ddoffset], cx 2439 00001475 50 <1> push ax 2440 00001476 B82020 <1> mov ax, 32 << 8 | 32 2441 00001479 F3AB <1> rep stosw 2442 0000147B 58 <1> pop ax 2443 0000147C 59 <1> pop cx 2444 <1> 2445 0000147D BB3000 <1> mov bx, (2+1)*16 ; 16 bytes (2 digits each) 2446 00001480 80F902 <1> cmp cl, 2 2447 00001483 7206 <1> jb @F ; if it is 1 --> 2448 00001485 B328 <1> mov bl, (4+1)*8 ; 8 words (4 digits each) 2449 00001487 7402 <1> je @F ; if it is 2 --> 2450 <1> ; it is 4 2451 00001489 B324 <1> mov bl, (8+1)*4 ; 4 dwords (8 digits each) 2452 <1> @@: 2453 0000148B 01FB <1> add bx, di 2454 0000148D E8C191 <1> call prephack ; set up for faking int vectors 23 and 24 2455 <1> 2456 00001490 50 <1> push ax 2457 <1> ; blank the start of the line if offset isn't paragraph aligned 2458 <1> dd3: 2459 00001491 39F0 <1> cmp ax, si ; skip to position in line 2460 00001493 7429 <1> je dd4 ; if we're there yet 2461 00001495 7718 <1> ja .error 2462 00001497 50 <1> push ax 2463 00001498 B82020 <1> mov ax, 32 << 8| 32 2464 0000149B 51 <1> push cx 2465 0000149C F3AB <1> rep stosw ; store two blanks (2 * 1) if byte, 2466 <1> ; four blanks (2 * 2) if word, 2467 <1> ; eight blanks (2 * 4) if dword 2468 0000149E 59 <1> pop cx 2469 0000149F AA <1> stosb ; store additional blank as separator 2470 000014A0 51 <1> push cx 2471 <1> @@: 2472 000014A1 268807 <1> mov byte [es:bx], al 2473 000014A4 43 <1> inc bx 2474 000014A5 E2FA <1> loop @B ; store as many blanks in text dump as bytes 2475 000014A7 59 <1> pop cx 2476 000014A8 58 <1> pop ax 2477 000014A9 0306[C082] <1> add ax, word [ddsize] ; -> behind the byte/word/dword just written 2478 000014AD EBE2 <1> jmp short dd3 2479 <1> 2480 <1> 2481 <1> .error: 2482 000014AF BA[DE82] <1> mov dx, .msg_internal_error 2483 000014B2 E835A9 <1> call putsz_error 2484 000014B5 B80106 <1> mov ax, 0601h 2485 000014B8 E89E90 <1> call setrc 2486 000014BB E942EB <1> jmp cmd3 2487 <1> 2488 <1> usesection lDEBUG_DATA_ENTRY 2489 <1> .msg_internal_error: 2490 000082DE 496E7465726E616C20- <1> asciz "Internal error in dd3.",13,10 2490 000082E7 6572726F7220696E20- <1> 2490 000082F0 6464332E0D0A00 <1> 2491 <1> usesection lDEBUG_CODE 2492 <1> 2493 <1> 2494 <1> ; Begin main loop over lines of output. 2495 <1> dd4: 2496 000014BE 58 <1> pop ax 2497 000014BF 66 <1> _386_PM_o32 ; mov ecx, eax 2498 000014C0 89C1 <1> mov cx, ax 2499 000014C2 66 <1> _386_PM_o32 2500 000014C3 83C10F <1> add cx, strict byte 0Fh 2501 000014C6 7205 <1> jc @F 2502 000014C8 66 <1> _386_PM_o32 ; cmp ecx, edx 2503 000014C9 39D1 <1> cmp cx, dx ; compare with end address 2504 000014CB 7202 <1> jb dd5 ; if we write to the end of the line --> 2505 <1> @@: 2506 <1> ;_386_PM_o32 ; mov ecx, edx 2507 000014CD 89D1 <1> mov cx, dx ; only write until (e)dx, inclusive 2508 <1> dd5: 2509 <1> ;_386_PM_o32 ; sub ecx, esi 2510 000014CF 29F1 <1> sub cx, si 2511 <1> ;_386_PM_o32 ; inc ecx 2512 000014D1 41 <1> inc cx ; cx = number of bytes to print this line 2513 <1> ; up to 16. no 32-bit register required 2514 000014D2 8326[BC82]00 <1> and word [ddskipped], 0 2515 <1> 2516 000014D7 E8A591 <1> call dohack ; substitute interrupt vectors 2517 000014DA 8E1E[0E0B] <1> mov ds, word [d_addr + saSegSel] 2518 <1> 2519 <1> dd6: 2520 000014DE 36A1[C082] <1> mov ax, word [ss:ddsize] 2521 000014E2 39C8 <1> cmp ax, cx ; ddsize <= left bytes ? 2522 000014E4 7617 <1> jbe dd6_simple ; yes, display ddsize bytes --> 2523 <1> 2524 000014E6 50 <1> push ax 2525 000014E7 51 <1> push cx 2526 000014E8 57 <1> push di 2527 000014E9 F7D9 <1> neg cx ; - left bytes 2528 000014EB 01C1 <1> add cx, ax ; ddsize - left bytes = how many skipped 2529 000014ED 36890E[BC82] <1> mov word [ss:ddskipped], cx 2530 <1> 2531 000014F2 89C1 <1> mov cx, ax ; 1 = bytes, 2 = words, 4 = dwords 2532 000014F4 49 <1> dec cx ; 0 = bytes, 1 = words, 3 = dwords 2533 000014F5 B85858 <1> mov ax, 'XX' 2534 000014F8 F3AB <1> rep stosw ; fill filler digits not to be written 2535 000014FA 5F <1> pop di 2536 000014FB 59 <1> pop cx 2537 000014FC 58 <1> pop ax 2538 <1> 2539 <1> dd6_simple: 2540 000014FD 01C0 <1> add ax, ax ; 2 = bytes, 4 = words, 8 = dwords 2541 000014FF 50 <1> push ax 2542 <1> @@: 2543 00001500 48 <1> dec ax 2544 00001501 48 <1> dec ax 2545 <1> ; first iteration: 0 = bytes, 2 = words, 6 = dwords 2546 <1> ; second iteration: 0 = words, 4 = dwords 2547 <1> ; third iteration: (0 = 3byte,) 2 = dwords 2548 <1> ; fourth iteration: 0 = dwords 2549 00001502 57 <1> push di 2550 00001503 01C7 <1> add di, ax ; -> where to write next 2 hex digits 2551 00001505 50 <1> push ax 2552 00001506 67 <1> _386_PM_a32 2553 00001507 AC <1> lodsb ; al = data 2554 00001508 E8BE00 <1> call dd_store ; stores number at es:di->, char at es:bx-> 2555 0000150B 58 <1> pop ax 2556 0000150C 5F <1> pop di ; -> start of hex digits space 2557 0000150D 85C0 <1> test ax, ax ; did we write the left-most digits? 2558 0000150F E0EF <1> loopnz @B ; not yet --> (or no more bytes to display) 2559 00001511 58 <1> pop ax ; = how many digits we wrote 2560 00001512 01C7 <1> add di, ax ; -> after right-most digit 2561 00001514 B020 <1> mov al, 32 2562 00001516 AA <1> stosb ; store a blank 2563 00001517 85C9 <1> test cx, cx 2564 00001519 75C3 <1> jnz dd6 ; (16-bit. cx <= 16) 2565 <1> 2566 0000151B 16 <1> push ss ; restore ds 2567 0000151C 1F <1> pop ds 2568 0000151D 66 <1> _386_PM_o32 2569 0000151E 2B36[B882] <1> sub si, word [ddoffset] 2570 00001522 66 <1> _386_PM_o32 2571 00001523 0336[BC82] <1> add si, word [ddskipped] 2572 <1> 2573 <1> dd9: 2574 00001527 F7C60F00 <1> test si, 0Fh ; space out till end of line 2575 0000152B 7417 <1> jz dd10 2576 0000152D B82020 <1> mov ax, 32 << 8 | 32 2577 00001530 8B0E[C082] <1> mov cx, word [ddsize] 2578 00001534 51 <1> push cx 2579 00001535 F3AB <1> rep stosw ; store blanks for the number 2580 00001537 AA <1> stosb ; store additional blank as separator 2581 00001538 59 <1> pop cx 2582 <1> @@: 2583 00001539 46 <1> inc si ; skip as many bytes 2584 0000153A F7C60F00 <1> test si, 0Fh 2585 0000153E 7404 <1> jz dd10 2586 00001540 E2F7 <1> loop @B 2587 00001542 EBE3 <1> jmp short dd9 2588 <1> 2589 <1> dd10: 2590 00001544 66 <1> _386_PM_o32 2591 00001545 0336[B882] <1> add si, word [ddoffset] 2592 00001549 66 <1> _386_PM_o32 2593 0000154A 2B36[BC82] <1> sub si, word [ddskipped] 2594 <1> 2595 0000154E B91900 <1> mov cx, (1 + 8 * (2 + 1)) ; go back 8 bytes (2 digits each) 2596 00001551 803E[C082]02 <1> cmp byte [ddsize], 2 2597 00001556 7206 <1> jb @F ; if it is 1 --> 2598 00001558 B115 <1> mov cl, (1 + 4 * (4 + 1)) ; go back 4 words (4 digits each) 2599 0000155A 7402 <1> je @F ; if it is 2 --> 2600 <1> ; it is 4 2601 0000155C B113 <1> mov cl, (1 + 2 * (8 + 1)) ; go back 2 dwords (8 digits each) 2602 <1> @@: 2603 0000155E 29CF <1> sub di, cx 2604 00001560 C6052D <1> mov byte [di], '-' 2605 00001563 E84D91 <1> call unhack 2606 00001566 89DF <1> mov di, bx 2607 00001568 52 <1> push dx 2608 00001569 E806A5 <1> call putsline_crlf 2609 0000156C 5A <1> pop dx 2610 0000156D 66 <1> _386_PM_o32 ; dec esi 2611 0000156E 4E <1> dec si 2612 0000156F 66 <1> _386_PM_o32 ; cmp esi, edx 2613 00001570 39D6 <1> cmp si, dx 2614 00001572 66 <1> _386_PM_o32 ; inc esi 2615 00001573 46 <1> inc si 2616 00001574 7303E9DFFE <1> jb dd2_loop ; display next line --> 2617 <1> dd11: 2618 <1> ; This check is necessary to wrap around at FFFFh (64 KiB) 2619 <1> ; for 16-bit segments instead of at FFFFFFFFh (4 GiB). 2620 00001579 8B1E[0E0B] <1> _386_PM mov bx, word [d_addr + saSegSel] 2621 <1> ; reset bx 2622 0000157D E8E847 <1> _386_PM call test_d_b_bit ; 32-bit segment ? 2623 00001580 7401 <1> _386_PM jz .16 ; no --> 2624 00001582 66 <1> _386_PM_o32 ; inc edx 2625 <1> .16: 2626 00001583 42 <1> inc dx ; set up the address for the next 'D' command. 2627 00001584 66 <1> _386_PM_o32 ; mov dword [d_addr], edx 2628 00001585 8916[0A0B] <1> mov word [d_addr], dx 2629 00001589 C3 <1> retn 2630 <1> 2631 <1> 2632 <1> ; INP: (e)si = offset (to display) 2633 <1> ; (e)dx = end offset (for range check of 16-bit segment) 2634 <1> ; word [d_addr + saSegSel] = segment/selector 2635 <1> ; es:di -> where to write to 2636 <1> ; OUT: bx = segment/selector 2637 <1> dd_display_offset: 2638 <1> .: 2639 0000158A A1[0E0B] <1> mov ax, word [d_addr + saSegSel] 2640 0000158D 89C3 <1> mov bx, ax 2641 0000158F E8A8A4 <1> call hexword 2642 00001592 B03A <1> mov al, ':' 2643 00001594 AA <1> stosb 2644 00001595 66 <1> _386_PM_o32 ; mov eax, esi 2645 00001596 89F0 <1> mov ax, si 2646 <1> %if _PM 2647 00001598 E8CD47 <1> call test_d_b_bit ; 32-bit segment ? 2648 0000159B 7405 <1> jz .16 ; no --> (don't display zero high word) 2649 0000159D E88EA4 <1> call hexword_high ; yes, display high word of address 2650 000015A0 EB12 <1> jmp short .common 2651 <1> 2652 <1> ; Insure that the high word is zero. 2653 <1> .16: 2654 <1> ;_386 test esi, ~0FFFFh 2655 <1> ;_386 jnz .error 2656 000015A2 66F7C20000FFFF <1> _386 test edx, ~0FFFFh 2657 000015A9 7409 <1> _386 jz .common 2658 <1> ;.error: 2659 000015AB BA[5772] <1> _386 mov dx, msg.ofs32 2660 000015AE E839A8 <1> _386 call putsz_error 2661 000015B1 E94CEA <1> _386 jmp cmd3 2662 <1> .common: 2663 <1> %endif 2664 000015B4 E883A4 <1> call hexword 2665 000015B7 B82020 <1> mov ax, 32<<8|32 2666 000015BA AB <1> stosw 2667 000015BB C3 <1> retn 2668 <1> 2669 <1> ; INP: (e)si = offset (to display) 2670 <1> ; (e)dx = end offset (for range check of 16-bit segment) 2671 <1> ; word [d_addr + saSegSel] = segment/selector 2672 <1> ; es:di -> where to write to 2673 <1> ; OUT: bx = segment/selector 2674 <1> ; (e)ax = offset & ~0Fh 2675 <1> .masklownybble: 2676 000015BC 56 <1> push si 2677 000015BD 83E6F0 <1> and si, ~0Fh 2678 000015C0 66 <1> _386_PM_o32 2679 000015C1 56 <1> push si 2680 000015C2 E8C5FF <1> call . 2681 000015C5 66 <1> _386_PM_o32 2682 000015C6 58 <1> pop ax 2683 000015C7 5E <1> pop si 2684 000015C8 C3 <1> retn 2685 <1> 2686 <1> 2687 <1> ; Store a character into the buffer. Characters that can't 2688 <1> ; be displayed are replaced by a dot. 2689 <1> ; 2690 <1> ; INP: al = character 2691 <1> ; es:bx-> buffer for displayed characters 2692 <1> ; es:di-> buffer for hexadecimal number 2693 <1> ; OUT: es:bx-> behind displayed character 2694 <1> ; es:di-> behind hexadecimal number and space 2695 <1> ; CHG: ax 2696 <1> ; STT: ds unknown 2697 <1> dd_store: 2698 000015C9 88C4 <1> mov ah, al 2699 000015CB 3C20 <1> cmp al, 32 ; below blank ? 2700 000015CD 720E <1> jb .ctrl ; control char --> 2701 000015CF 3C7F <1> cmp al, 127 ; DEL ? 2702 000015D1 740A <1> je .ctrl ; yes, control char --> 2703 000015D3 720A <1> jb .noctrl ; below, not a control char --> 2704 000015D5 36F606[7C00]04 <1> testopt [ss:options], cpdepchars ; allow CP-dependant characters ? 2705 000015DB 7502 <1> jnz .noctrl ; yes --> 2706 <1> .ctrl: 2707 000015DD B42E <1> mov ah, '.' 2708 <1> .noctrl: 2709 000015DF 268827 <1> mov byte [es:bx], ah 2710 000015E2 43 <1> inc bx 2711 000015E3 51 <1> push cx 2712 000015E4 E85AA4 <1> call hexbyte 2713 000015E7 59 <1> pop cx 2714 000015E8 C3 <1> retn 2715 <1> 2716 <1> 2717 <1> %if _PM 2718 <1> ; DL command 2719 <1> descout: 2720 000015E9 E8A3A3 <1> call skipwhite 2721 000015EC E82AA2 <1> call getword ; get word into DX 2722 000015EF 89D3 <1> mov bx, dx 2723 000015F1 E86DA3 <1> call skipcomm0 2724 000015F4 BA0100 <1> mov dx, 1 2725 000015F7 E840A3 <1> call iseol? 2726 000015FA 7410 <1> je .onlyone 2727 000015FC E84476 <1> call uppercase 2728 000015FF 3C4C <1> cmp al, 'L' 2729 00001601 7503 <1> jne .notlength 2730 00001603 E85AA3 <1> call skipcomma 2731 <1> .notlength: 2732 00001606 E810A2 <1> call getword 2733 00001609 E843A3 <1> call chkeol 2734 <1> .onlyone: 2735 0000160C 42 <1> inc dx ; (note js at nextdesc changed to jz) 2736 0000160D 89D6 <1> mov si, dx ; save count 2737 0000160F E8EB7B <1> call ispm 2738 00001612 7407 <1> je nextdesc 2739 00001614 BA[8C7C] <1> mov dx, nodesc 2740 00001617 E9D6A7 <1> jmp putsz 2741 <1> desc_done: 2742 0000161A C3 <1> retn 2743 <1> subcpu 286 2744 <1> nextdesc: 2745 0000161B 4E <1> dec si 2746 0000161C 74FC <1> jz desc_done 2747 0000161E BF[D07C] <1> mov di, descr 2748 00001621 89D8 <1> mov ax, bx 2749 00001623 E814A4 <1> call hexword 2750 00001626 BF[DA7C] <1> mov di, descbase 2751 00001629 57 <1> push di 2752 0000162A B83F3F <1> mov ax, "??" 2753 0000162D AB <1> stosw 2754 0000162E AB <1> stosw 2755 0000162F AB <1> stosw 2756 00001630 AB <1> stosw 2757 00001631 83C707 <1> add di, byte (desclim-(descbase+8)) 2758 00001634 AB <1> stosw 2759 00001635 AB <1> stosw 2760 00001636 AB <1> stosw 2761 00001637 AB <1> stosw 2762 00001638 83C706 <1> add di, byte (descattr-(desclim+8)) 2763 0000163B AB <1> stosw 2764 0000163C AB <1> stosw 2765 0000163D 5F <1> pop di 2766 <1> ; lar ax, bx 2767 <1> ; jnz skipdesc ; tell that this descriptor is invalid 2768 0000163E B80600 <1> mov ax, 6 2769 00001641 CD31 <1> int 31h 2770 00001643 720A <1> jc desc_o1 2771 00001645 89C8 <1> mov ax, cx 2772 00001647 E8F0A3 <1> call hexword 2773 0000164A 89D0 <1> mov ax, dx 2774 0000164C E8EBA3 <1> call hexword 2775 <1> desc_o1: 2776 0000164F BF[E97C] <1> mov di, desclim 2777 00001652 EB2B <1> _no386_jmps use16desc 2778 <1> subcpu 386 2779 00001654 660F03C3 <1> lsl eax, ebx 2780 00001658 751A <1> jnz desc_out 2781 0000165A 50 <1> push ax 2782 0000165B 66C1E810 <1> shr eax, 16 2783 0000165F E8D8A3 <1> call hexword 2784 00001662 58 <1> pop ax 2785 00001663 E8D4A3 <1> call hexword 2786 00001666 660F02C3 <1> lar eax, ebx 2787 0000166A 66C1E808 <1> shr eax, 8 2788 <1> desc_o2: 2789 0000166E BF[F77C] <1> mov di, descattr 2790 00001671 E8C6A3 <1> call hexword 2791 <1> desc_out: 2792 00001674 BA[D07C] <1> mov dx, descr 2793 00001677 E876A7 <1> call putsz 2794 0000167A 83C308 <1> add bx, byte 8 2795 0000167D EB9C <1> jmp short nextdesc 2796 <1> subcpureset ; subcpu 386 2797 <1> use16desc: 2798 0000167F 0F03C3 <1> lsl ax, bx 2799 00001682 75F0 <1> jnz desc_out 2800 00001684 E8B3A3 <1> call hexword 2801 00001687 B82020 <1> mov ax, 32<<8|32 2802 0000168A AB <1> stosw 2803 0000168B AB <1> stosw 2804 0000168C 0F02C3 <1> lar ax, bx 2805 0000168F C1E808 <1> shr ax, 8 2806 00001692 EBDA <1> jmp short desc_o2 2807 <1> subcpureset ; subcpu 286 2808 <1> %endif 2809 <1> 2810 <1> %if _DSTRINGS 2811 <1> ; D$ command 2812 <1> dcpm: 2813 00001694 C606[5E0B]24 <1> mov byte [dstringtype], 36 2814 00001699 C706[600B][3C0B] <1> mov word [dstringaddr], dcpm_addr 2815 0000169F EB25 <1> jmp short dstring 2816 <1> 2817 <1> ; DW# command 2818 <1> dwcounted: 2819 000016A1 C606[5E0B]FE <1> mov byte [dstringtype], 0FEh 2820 000016A6 C706[600B][500B] <1> mov word [dstringaddr], dwcount_addr 2821 000016AC EB18 <1> jmp short dstring 2822 <1> 2823 <1> ; D# command 2824 <1> dcounted: 2825 000016AE C606[5E0B]FF <1> mov byte [dstringtype], 0FFh 2826 000016B3 C706[600B][460B] <1> mov word [dstringaddr], dcount_addr 2827 000016B9 EB0B <1> jmp short dstring 2828 <1> 2829 <1> ; DZ command 2830 <1> dz: 2831 000016BB C606[5E0B]00 <1> mov byte [dstringtype], 0 2832 000016C0 C706[600B][320B] <1> mov word [dstringaddr], dz_addr 2833 <1> 2834 <1> ; common code for all string commands 2835 <1> dstring: 2836 000016C6 E8C6A2 <1> call skipwhite 2837 000016C9 E86EA2 <1> call iseol? 2838 000016CC 7509 <1> jne .getaddr ; if an address was given 2839 <1> .last: 2840 000016CE 8B1E[600B] <1> mov bx, word [dstringaddr] 2841 000016D2 66 <1> _386_PM_o32 ; mov edx, dword [bx] 2842 000016D3 8B17 <1> mov dx, word [bx] 2843 000016D5 EB20 <1> jmp short .haveaddr ; edx = offset, [bx + saSegSel] = segment 2844 <1> .getaddr: 2845 000016D7 8B1E[840C] <1> mov bx, word [reg_ds] 2846 000016DB E86E92 <1> call getaddrX ; get address into bx:(e)dx 2847 000016DE E86EA2 <1> call chkeol ; expect end of line here 2848 <1> %if _PM 2849 000016E1 53 <1> push bx 2850 <1> %endif 2851 000016E2 53 <1> push bx 2852 000016E3 8B1E[600B] <1> mov bx, word [dstringaddr] 2853 000016E7 8F4704 <1> pop word [bx + saSegSel]; save segment (offset behind string is saved later) 2854 <1> %if _PM 2855 000016EA E8107B <1> call ispm 2856 000016ED 7505 <1> jnz .86m 2857 <1> .pm: 2858 000016EF 8F4708 <1> pop word [bx + saSelector] 2859 000016F2 EB03 <1> jmp @F 2860 <1> .86m: 2861 000016F4 8F4706 <1> pop word [bx + saSegment] 2862 <1> @@: 2863 <1> %endif 2864 <1> .haveaddr: 2865 000016F7 C706[DA0B][CE16] <1> mov word [lastcmd], dstring.last 2866 000016FD E8518F <1> call prephack 2867 00001700 66 <1> _386_PM_o32 ; mov esi, edx 2868 00001701 89D6 <1> mov si, dx 2869 00001703 800E[9E00]01 <1> setopt [internalflags], usecharcounter 2870 00001708 C606[920A]01 <1> mov byte [ charcounter ], 1 2871 <1> ; initialize 2872 0000170D E86F8F <1> call dohack 2873 00001710 8E5F04 <1> mov ds, word [bx + saSegSel] 2874 <1> ; ds:(e)si-> string 2875 00001713 36803E[5E0B]FE <1> cmp byte [ss:dstringtype], 0FEh 2876 00001719 7235 <1> jb .terminated ; terminated string --> 2877 0000171B 9F <1> lahf 2878 0000171C 67 <1> _386_PM_a32 2879 0000171D AC <1> lodsb ; load first byte 2880 0000171E 31C9 <1> xor cx, cx 2881 00001720 88C1 <1> mov cl, al ; low byte of count 2882 00001722 9E <1> sahf 2883 00001723 7504 <1> jne .counted ; only byte count --> 2884 00001725 67 <1> _386_PM_a32 2885 00001726 AC <1> lodsb ; load second byte 2886 00001727 88C5 <1> mov ch, al ; high byte of count 2887 <1> .counted: 2888 00001729 E333 <1> jcxz .done ; length zero --> 2889 <1> .loop: 2890 0000172B 67 <1> _386_PM_a32 2891 0000172C AC <1> lodsb ; get character 2892 0000172D E80400 <1> call .char ; display 2893 00001730 E2F9 <1> loop .loop ; until done --> 2894 00001732 EB2A <1> jmp short .done 2895 <1> 2896 <1> .char: 2897 00001734 16 <1> push ss 2898 00001735 1F <1> pop ds 2899 00001736 50 <1> push ax 2900 00001737 E8798F <1> call unhack ; restore state 2901 0000173A 58 <1> pop ax 2902 0000173B 56 <1> push si 2903 0000173C 51 <1> push cx 2904 0000173D E8D3A6 <1> call putc ; display 2905 00001740 59 <1> pop cx 2906 00001741 5E <1> pop si 2907 00001742 E89228 <1> call handle_serial_flags_ctrl_c 2908 00001745 E8378F <1> call dohack 2909 00001748 8B1E[600B] <1> mov bx, word [dstringaddr] 2910 0000174C 8E5F04 <1> mov ds, word [bx + saSegSel] 2911 <1> ; go back to special state 2912 0000174F C3 <1> retn 2913 <1> 2914 <1> .terminated: 2915 00001750 67 <1> _386_PM_a32 2916 00001751 AC <1> lodsb ; load character 2917 00001752 363A06[5E0B] <1> cmp al, byte [ss:dstringtype] 2918 00001757 7405 <1> je .done ; it's the terminator --> 2919 00001759 E8D8FF <1> call .char ; display 2920 0000175C EBF2 <1> jmp short .terminated ; and get next --> 2921 <1> 2922 <1> .done: 2923 0000175E 16 <1> push ss 2924 0000175F 1F <1> pop ds ; restore ds 2925 00001760 66 <1> _386_PM_o32 ; mov dword [bx], esi 2926 00001761 8937 <1> mov word [bx], si 2927 00001763 E84D8F <1> call unhack 2928 00001766 B00D <1> mov al, 13 2929 00001768 E8A8A6 <1> call putc 2930 0000176B B00A <1> mov al, 10 2931 0000176D E8A3A6 <1> call putc 2932 00001770 C3 <1> retn 2933 <1> %endif 2934 <1> 2935 <1> %if _INT 2936 <1> ; DI command 2937 <1> gateout: 2938 00001771 31C9 <1> xor cx, cx 2939 00001773 AC <1> lodsb 2940 00001774 E8CC74 <1> call uppercase 2941 00001777 3C52 <1> cmp al, 'R' 2942 00001779 7502 <1> jne @F 2943 0000177B 41 <1> inc cx ; always 86 Mode 2944 0000177C AC <1> lodsb 2945 <1> @@: 2946 0000177D E8C374 <1> call uppercase 2947 00001780 3C4D <1> cmp al, 'M' 2948 00001782 7503 <1> jne @F 2949 00001784 FEC5 <1> inc ch ; show MCB names 2950 00001786 AC <1> lodsb 2951 <1> @@: 2952 00001787 E8B974 <1> call uppercase 2953 0000178A 3C4C <1> cmp al, 'L' 2954 0000178C 7504 <1> jne @F 2955 0000178E 80CD02 <1> or ch, 2 ; follow AMIS interrupt lists 2956 00001791 AC <1> lodsb 2957 <1> @@: 2958 00001792 E8FBA1 <1> call skipwh0 2959 <1> 2960 00001795 4E <1> dec si 2961 00001796 BA[1467] <1> mov dx, msg.in 2962 00001799 E83FA1 <1> call isstring? 2963 0000179C 755C <1> jne .not_in 2964 <1> 2965 0000179E 56 <1> push si 2966 0000179F 51 <1> push cx 2967 <1> .in.loop: 2968 000017A0 E8ECA1 <1> call skipwhite 2969 000017A3 4E <1> dec si 2970 <1> 2971 000017A4 E8B2A0 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 2972 000017A7 730D <1> jnc @F 2973 000017A9 7508 <1> jnz .error 2974 000017AB 81FFFF00 <1> cmp di, 255 2975 000017AF 7702 <1> ja .error 2976 000017B1 E317 <1> jcxz .in.next 2977 <1> .error: 2978 000017B3 E95C8D <1> jmp error 2979 <1> 2980 <1> @@: 2981 000017B6 81FFFF00 <1> cmp di, 255 2982 000017BA 77F7 <1> ja .error 2983 000017BC E302 <1> jcxz @F 2984 000017BE EBF3 <1> jmp .error 2985 <1> 2986 <1> @@: 2987 000017C0 85DB <1> test bx, bx 2988 000017C2 75EF <1> jnz .error 2989 000017C4 81FAFF00 <1> cmp dx, 255 2990 000017C8 77E9 <1> ja .error 2991 <1> 2992 <1> .in.next: 2993 <1> @@: 2994 000017CA E8C3A1 <1> call skipwh0 2995 000017CD 3C2C <1> cmp al, ',' 2996 000017CF 74CF <1> je .in.loop 2997 000017D1 E87BA1 <1> call chkeol 2998 000017D4 59 <1> pop cx 2999 000017D5 E89300 <1> call .prepare 3000 000017D8 5E <1> pop si 3001 <1> 3002 <1> .indo.loop: 3003 000017D9 E8B3A1 <1> call skipwhite 3004 000017DC 4E <1> dec si 3005 <1> 3006 000017DD 51 <1> push cx 3007 000017DE E878A0 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 3008 000017E1 59 <1> pop cx 3009 000017E2 720D <1> jc .indo.next 3010 <1> 3011 000017E4 89FB <1> mov bx, di 3012 000017E6 A8 <1> db __TEST_IMM8 ; (skip inc) 3013 <1> @@: 3014 000017E7 43 <1> inc bx 3015 000017E8 52 <1> push dx 3016 000017E9 E89400 <1> call .do 3017 000017EC 5A <1> pop dx 3018 000017ED 39D3 <1> cmp bx, dx 3019 000017EF 72F6 <1> jb @B 3020 <1> 3021 <1> .indo.next: 3022 000017F1 4E <1> dec si 3023 000017F2 E89AA1 <1> call skipwhite 3024 000017F5 3C2C <1> cmp al, ',' 3025 000017F7 74E0 <1> je .indo.loop 3026 000017F9 C3 <1> retn 3027 <1> 3028 <1> 3029 <1> 3030 <1> .not_in: 3031 000017FA AC <1> lodsb 3032 000017FB E829A0 <1> call getbyte ; get byte into DL 3033 000017FE 30F6 <1> xor dh, dh 3034 00001800 89D3 <1> mov bx, dx 3035 00001802 E85CA1 <1> call skipcomm0 3036 00001805 BA0100 <1> mov dx, 1 3037 00001808 E82FA1 <1> call iseol? 3038 0000180B 7451 <1> je .onlyone 3039 0000180D E83374 <1> call uppercase 3040 00001810 3C4C <1> cmp al, 'L' 3041 00001812 753F <1> jne .notlength 3042 00001814 E849A1 <1> call skipcomma 3043 00001817 E8FF9F <1> call getword ; get byte into DL 3044 0000181A 85D2 <1> test dx, dx 3045 0000181C 741A <1> jz .err 3046 0000181E 81FA0001 <1> cmp dx, 100h 3047 00001822 740A <1> je .checkrange 3048 00001824 50 <1> push ax 3049 00001825 80E41F <1> and ah, 1Fh 3050 00001828 80FC08 <1> cmp ah, 8 3051 0000182B 58 <1> pop ax 3052 0000182C 770A <1> ja .err 3053 <1> .checkrange: 3054 0000182E 52 <1> push dx 3055 0000182F 01DA <1> add dx, bx 3056 00001831 81FA0001 <1> cmp dx, 100h 3057 00001835 5A <1> pop dx 3058 00001836 7623 <1> jna .rangeok 3059 <1> .err: 3060 00001838 E9D78C <1> jmp error 3061 <1> 3062 <1> .last: 3063 0000183B 31DB <1> xor bx, bx 3064 0000183D 8A1E[6A0B] <1> mov bl, byte [lastint] 3065 00001841 8B0E[680B] <1> mov cx, word [lastint_is_86m_and_mcb] 3066 00001845 BA0100 <1> mov dx, 1 3067 00001848 FEC3 <1> inc bl 3068 0000184A 7512 <1> jnz .onlyone 3069 0000184C C706[DA0B][1404] <1> mov word [lastcmd], dmycmd 3070 00001852 C3 <1> retn 3071 <1> 3072 <1> .notlength: 3073 00001853 E8D19F <1> call getbyte 3074 00001856 30F6 <1> xor dh, dh 3075 00001858 28DA <1> sub dl, bl 3076 0000185A 42 <1> inc dx 3077 <1> .rangeok: 3078 0000185B E8F1A0 <1> call chkeol 3079 <1> .onlyone: 3080 0000185E E80A00 <1> call .prepare 3081 00001861 89D6 <1> mov si, dx ; save count 3082 <1> .next: 3083 00001863 E81A00 <1> call .do 3084 00001866 43 <1> inc bx 3085 00001867 4E <1> dec si 3086 00001868 75F9 <1> jnz .next 3087 0000186A C3 <1> retn 3088 <1> 3089 <1> 3090 <1> .prepare: 3091 0000186B F6C502 <1> test ch, 2 3092 0000186E 7403 <1> jz @F 3093 00001870 E8A0EC <1> call guard_auxbuff 3094 <1> @@: 3095 00001873 C706[DA0B][3B18] <1> mov word [lastcmd], .last 3096 00001879 890E[680B] <1> mov word [lastint_is_86m_and_mcb], cx 3097 0000187D E9D18D <1> jmp prephack 3098 <1> 3099 <1> 3100 <1> ; INP: bx = interrupt number 3101 <1> ; cx = options 3102 <1> ; CHG: di, eax. edx, bp 3103 <1> ; STT: ds = es = ss 3104 <1> ; prephack called 3105 <1> .do: 3106 00001880 881E[6A0B] <1> mov byte [lastint], bl 3107 00001884 E85027 <1> call handle_serial_flags_ctrl_c 3108 00001887 E8F58D <1> call dohack 3109 0000188A BF[0E08] <1> mov di, line_out 3110 0000188D B8696E <1> mov ax, "in" 3111 00001890 AB <1> stosw 3112 00001891 B87420 <1> mov ax, "t " 3113 00001894 AB <1> stosw 3114 00001895 88D8 <1> mov al, bl 3115 00001897 E8A7A1 <1> call hexbyte 3116 0000189A B020 <1> mov al, 32 3117 0000189C AA <1> stosb 3118 <1> %if _PM 3119 0000189D 84C9 <1> test cl, cl 3120 0000189F 7545 <1> jnz .rm 3121 000018A1 E85979 <1> call ispm 3122 000018A4 7540 <1> jnz .rm 3123 <1> 3124 000018A6 B80402 <1> mov ax, 0204h 3125 000018A9 80FB20 <1> cmp bl, 20h 3126 000018AC 80D701 <1> adc bh, 1 ; if below, bh = 2 3127 <1> .loopexception: 3128 000018AF 51 <1> push cx 3129 000018B0 CD31 <1> int 31h 3130 000018B2 89C8 <1> mov ax, cx 3131 000018B4 59 <1> pop cx 3132 000018B5 7303E9B000 <1> jc .failed 3133 000018BA E87DA1 <1> call hexword 3134 000018BD B03A <1> mov al, ':' 3135 000018BF AA <1> stosb 3136 000018C0 66 <1> _386_PM_o32 ; mov eax, edx 3137 000018C1 89D0 <1> mov ax, dx 3138 000018C3 803E[DA88]00 <1> cmp byte [dpmi32], 0 3139 000018C8 7403 <1> jz .gate16 3140 000018CA E861A1 <1> call hexword_high 3141 <1> .gate16: 3142 000018CD E86AA1 <1> call hexword 3143 000018D0 B020 <1> mov al, 32 3144 000018D2 AA <1> stosb 3145 000018D3 B80202 <1> mov ax, 0202h 3146 000018D6 FECF <1> dec bh 3147 000018D8 75D5 <1> jnz .loopexception 3148 000018DA 4F <1> dec di 3149 000018DB E8D58D <1> call unhack 3150 000018DE 53 <1> push bx 3151 000018DF 51 <1> push cx 3152 000018E0 E88FA1 <1> call putsline_crlf 3153 000018E3 59 <1> pop cx 3154 000018E4 5B <1> pop bx 3155 000018E5 C3 <1> retn 3156 <1> 3157 <1> .rm: 3158 <1> %endif 3159 000018E6 53 <1> push bx 3160 000018E7 51 <1> push cx 3161 000018E8 56 <1> push si 3162 <1> 3163 000018E9 53 <1> push bx 3164 000018EA 31ED <1> xor bp, bp 3165 000018EC D1E3 <1> shl bx, 1 3166 000018EE D1E3 <1> shl bx, 1 3167 000018F0 31D2 <1> xor dx, dx 3168 <1> %if _PM 3169 000018F2 E821B9 <1> call setes2dx 3170 <1> %else 3171 <1> mov es, dx ; es => IVT 3172 <1> %endif 3173 000018F5 268B4702 <1> mov ax, word [es:bx + 2] ; ax = segment 3174 000018F9 268B17 <1> mov dx, word [es:bx] 3175 000018FC 5B <1> pop bx 3176 <1> 3177 000018FD F6C502 <1> test ch, 2 3178 00001900 7572 <1> jnz int_list 3179 <1> 3180 <1> .loop_chain: 3181 00001902 50 <1> push ax ; segment 3182 00001903 52 <1> push dx 3183 <1> 3184 00001904 16 <1> push ss 3185 00001905 07 <1> pop es 3186 00001906 E831A1 <1> call hexword 3187 00001909 B03A <1> mov al, ':' 3188 0000190B AA <1> stosb 3189 0000190C 89D0 <1> mov ax, dx 3190 0000190E E829A1 <1> call hexword 3191 <1> 3192 00001911 5B <1> pop bx 3193 00001912 5A <1> pop dx ; segment 3194 <1> 3195 00001913 8916[660B] <1> mov word [intaddress + 2], dx 3196 00001917 891E[640B] <1> mov word [intaddress], bx 3197 <1> 3198 0000191B 45 <1> inc bp 3199 0000191C 81FD0001 <1> cmp bp, 256 3200 00001920 7740 <1> ja .toomany 3201 <1> 3202 00001922 E80003 <1> call check_int_chain 3203 00001925 722C <1> jc .end_chain 3204 <1> 3205 00001927 52 <1> push dx ; segment 3206 00001928 50 <1> push ax 3207 00001929 16 <1> push ss 3208 0000192A 07 <1> pop es 3209 0000192B E8858D <1> call unhack 3210 0000192E 51 <1> push cx 3211 0000192F E8041B <1> call copy_single_counted_string 3212 00001932 59 <1> pop cx 3213 00001933 E88B03 <1> call .mcbname 3214 00001936 51 <1> push cx 3215 00001937 E838A1 <1> call putsline_crlf 3216 0000193A 59 <1> pop cx 3217 0000193B E89926 <1> call handle_serial_flags_ctrl_c 3218 0000193E E83E8D <1> call dohack 3219 00001941 BF[0E08] <1> mov di, line_out 3220 00001944 B8202D <1> mov ax, " -" 3221 00001947 AB <1> stosw 3222 00001948 B82D3E <1> mov ax, "->" 3223 0000194B AB <1> stosw 3224 0000194C B020 <1> mov al, 32 3225 0000194E AA <1> stosb 3226 <1> 3227 0000194F 5A <1> pop dx 3228 00001950 58 <1> pop ax ; (ax = segment) 3229 00001951 EBAF <1> jmp .loop_chain 3230 <1> 3231 <1> .end_chain: 3232 00001953 16 <1> push ss 3233 00001954 07 <1> pop es 3234 00001955 E85B8D <1> call unhack 3235 00001958 E86603 <1> call .mcbname 3236 0000195B E814A1 <1> call putsline_crlf 3237 <1> .86next: 3238 0000195E 5E <1> pop si 3239 0000195F 59 <1> pop cx 3240 00001960 5B <1> pop bx 3241 00001961 C3 <1> retn 3242 <1> 3243 <1> .toomany: 3244 00001962 BE[1068] <1> mov si, msg.di_toomany 3245 00001965 E8CE1A <1> call copy_single_counted_string 3246 00001968 EBE9 <1> jmp .end_chain 3247 <1> 3248 <1> %if _PM 3249 <1> .failed: 3250 0000196A E8468D <1> call unhack 3251 0000196D 5A <1> pop dx ; discard a near return address 3252 0000196E BA[B37C] <1> mov dx, gatewrong 3253 00001971 E97CA4 <1> jmp putsz 3254 <1> %endif 3255 <1> 3256 <1> 3257 <1> int_list: 3258 00001974 57 <1> push di 3259 00001975 51 <1> push cx 3260 00001976 53 <1> push bx 3261 00001977 92 <1> xchg ax, dx ; dx = segment 3262 <1> 3263 00001978 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3264 0000197D 31FF <1> xor di, di ; -> auxbuff 3265 0000197F AB <1> stosw ; store offset 3266 00001980 92 <1> xchg ax, dx ; dx = offset 3267 00001981 AB <1> stosw ; store segment 3268 00001982 92 <1> xchg ax, dx ; dx = segment 3269 00001983 93 <1> xchg bx, ax ; bx = offset 3270 00001984 B80003 <1> mov ax, 300h ; flag for IVT | unused 3271 00001987 AB <1> stosw ; which multiplex number 3272 00001988 31C0 <1> xor ax, ax 3273 0000198A AB <1> stosw ; which int list entry = none = 0 3274 <1> 3275 <1> .loop_ivt_chain: 3276 0000198B E89702 <1> call check_int_chain 3277 0000198E 7219 <1> jc .end_ivt_chain 3278 <1> 3279 00001990 81FFF81F <1> cmp di, _AUXBUFFSIZE - 3 * 8 3280 00001994 7735 <1> ja .error 3281 00001996 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3282 0000199B AB <1> stosw ; store offset 3283 0000199C 92 <1> xchg ax, dx 3284 0000199D AB <1> stosw ; store segment 3285 0000199E 92 <1> xchg ax, dx 3286 0000199F 93 <1> xchg bx, ax 3287 000019A0 B80002 <1> mov ax, 200h ; flag for unused 3288 000019A3 AB <1> stosw ; found in chain = 200h 3289 000019A4 31C0 <1> xor ax, ax 3290 000019A6 AB <1> stosw 3291 000019A7 EBE2 <1> jmp .loop_ivt_chain 3292 <1> 3293 <1> .end_ivt_chain: 3294 000019A9 83C8FF <1> or ax, -1 3295 000019AC 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3296 000019B1 B90800 <1> mov cx, 8 3297 000019B4 F3AB <1> rep stosw ; terminator is all-ones 3298 <1> ; (two terminators actually) 3299 <1> 3300 000019B6 31C0 <1> xor ax, ax 3301 <1> .loopplex: 3302 000019B8 B000 <1> mov al, 00h ; AMIS installation check 3303 000019BA 51 <1> push cx 3304 <1> ; function 0 changes dx, di, cx, al 3305 <1> %if _PM 3306 000019BB E8A979 <1> call call_int2D 3307 <1> %else 3308 <1> int 2Dh ; enquire whether there's anyone 3309 <1> %endif 3310 000019BE 59 <1> pop cx ; but we don't care who it might be 3311 000019BF FEC0 <1> inc al ; = FFh ? 3312 000019C1 7503E90201 <1> jz .search ; yes, it is in use --> 3313 <1> .nextplex: 3314 000019C6 FEC4 <1> inc ah 3315 000019C8 75EE <1> jnz .loopplex ; try next multiplexer --> 3316 <1> 3317 <1> .done: 3318 000019CA A8 <1> db __TEST_IMM8 ; (NC) 3319 <1> .error: 3320 000019CB F9 <1> stc 3321 <1> 3322 000019CC 5B <1> pop bx 3323 000019CD 59 <1> pop cx 3324 000019CE 5F <1> pop di 3325 000019CF 16 <1> push ss 3326 000019D0 1F <1> pop ds 3327 000019D1 16 <1> push ss 3328 000019D2 07 <1> pop es 3329 <1> 3330 000019D3 BE[8D67] <1> mov si, msg.di_error 3331 000019D6 7303E9B000 <1> jc .error_string 3332 <1> 3333 000019DB 31F6 <1> xor si, si 3334 <1> 3335 <1> .loop_chain: 3336 000019DD 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3337 000019E1 AD <1> lodsw 3338 000019E2 92 <1> xchg ax, dx 3339 000019E3 AD <1> lodsw 3340 000019E4 83C604 <1> add si, 4 3341 <1> 3342 000019E7 89C3 <1> mov bx, ax 3343 000019E9 21D3 <1> and bx, dx 3344 000019EB 43 <1> inc bx 3345 000019EC 746D <1> jz .next_seq 3346 <1> 3347 <1> .next_chain: 3348 000019EE 16 <1> push ss 3349 000019EF 1F <1> pop ds 3350 <1> 3351 000019F0 50 <1> push ax ; segment 3352 000019F1 52 <1> push dx 3353 <1> 3354 000019F2 16 <1> push ss 3355 000019F3 07 <1> pop es 3356 000019F4 E843A0 <1> call hexword 3357 000019F7 B03A <1> mov al, ':' 3358 000019F9 AA <1> stosb 3359 000019FA 89D0 <1> mov ax, dx 3360 000019FC E83BA0 <1> call hexword 3361 <1> 3362 000019FF 5B <1> pop bx 3363 00001A00 5A <1> pop dx ; segment 3364 <1> 3365 00001A01 8916[660B] <1> mov word [intaddress + 2], dx 3366 00001A05 891E[640B] <1> mov word [intaddress], bx 3367 <1> 3368 00001A09 56 <1> push si 3369 00001A0A E81802 <1> call check_int_chain 3370 00001A0D 722E <1> jc .end_chain 3371 <1> 3372 00001A0F 16 <1> push ss 3373 00001A10 07 <1> pop es 3374 00001A11 E89F8C <1> call unhack 3375 00001A14 51 <1> push cx 3376 00001A15 E81E1A <1> call copy_single_counted_string 3377 00001A18 59 <1> pop cx 3378 00001A19 5E <1> pop si 3379 00001A1A E87A00 <1> call .mpx 3380 00001A1D 56 <1> push si 3381 00001A1E E8A002 <1> call gateout.mcbname 3382 00001A21 51 <1> push cx 3383 00001A22 E84DA0 <1> call putsline_crlf 3384 00001A25 59 <1> pop cx 3385 00001A26 E8AE25 <1> call handle_serial_flags_ctrl_c 3386 00001A29 E8538C <1> call dohack 3387 00001A2C BF[0E08] <1> mov di, line_out 3388 00001A2F B8202D <1> mov ax, " -" 3389 00001A32 AB <1> stosw 3390 00001A33 B82D3E <1> mov ax, "->" 3391 00001A36 AB <1> stosw 3392 00001A37 B020 <1> mov al, 32 3393 00001A39 AA <1> stosb 3394 <1> 3395 00001A3A 5E <1> pop si 3396 00001A3B EBA0 <1> jmp .loop_chain 3397 <1> 3398 <1> .end_chain: 3399 00001A3D 16 <1> push ss 3400 00001A3E 07 <1> pop es 3401 00001A3F E8718C <1> call unhack 3402 00001A42 5E <1> pop si 3403 00001A43 E85100 <1> call .mpx 3404 00001A46 56 <1> push si 3405 00001A47 E87702 <1> call gateout.mcbname 3406 00001A4A 51 <1> push cx 3407 00001A4B E824A0 <1> call putsline_crlf 3408 00001A4E 59 <1> pop cx 3409 00001A4F BF[0E08] <1> mov di, line_out 3410 00001A52 E88225 <1> call handle_serial_flags_ctrl_c 3411 00001A55 E8278C <1> call dohack 3412 00001A58 5E <1> pop si 3413 00001A59 EB82 <1> jmp .loop_chain 3414 <1> 3415 <1> .next_seq: 3416 00001A5B AD <1> lodsw 3417 00001A5C 92 <1> xchg ax, dx 3418 00001A5D AD <1> lodsw 3419 00001A5E 83C604 <1> add si, 4 3420 <1> 3421 00001A61 89C3 <1> mov bx, ax 3422 00001A63 21D3 <1> and bx, dx 3423 00001A65 43 <1> inc bx 3424 00001A66 741A <1> jz @F 3425 <1> 3426 00001A68 16 <1> push ss 3427 00001A69 1F <1> pop ds 3428 00001A6A 16 <1> push ss 3429 00001A6B 07 <1> pop es 3430 00001A6C E8448C <1> call unhack 3431 00001A6F 51 <1> push cx 3432 00001A70 56 <1> push si 3433 00001A71 BE[9567] <1> mov si, msg.di_hidden 3434 00001A74 E8BF19 <1> call copy_single_counted_string 3435 00001A77 5E <1> pop si 3436 00001A78 59 <1> pop cx 3437 00001A79 E85B25 <1> call handle_serial_flags_ctrl_c 3438 00001A7C E8008C <1> call dohack 3439 <1> 3440 00001A7F E96CFF <1> jmp .next_chain 3441 <1> 3442 <1> @@: 3443 00001A82 16 <1> push ss 3444 00001A83 1F <1> pop ds 3445 00001A84 16 <1> push ss 3446 00001A85 07 <1> pop es 3447 00001A86 E82A8C <1> call unhack 3448 00001A89 EB09 <1> jmp @F 3449 <1> 3450 <1> 3451 <1> .error_string: 3452 00001A8B E8A819 <1> call copy_single_counted_string 3453 <1> 3454 00001A8E E8228C <1> call unhack 3455 00001A91 E8DE9F <1> call putsline_crlf 3456 <1> @@: 3457 <1> %if 0 ; _DEBUG 3458 <1> mov es, word [auxbuff_segorsel] 3459 <1> int3 3460 <1> push ss 3461 <1> pop es 3462 <1> %endif 3463 00001A94 E9C7FE <1> jmp gateout.86next 3464 <1> 3465 <1> 3466 <1> .mpx: 3467 00001A97 8E06[F209] <1> mov es, word [auxbuff_segorsel] 3468 00001A9B 268B44FC <1> mov ax, word [es:si - 4] 3469 00001A9F 268B54FE <1> mov dx, word [es:si - 2] 3470 00001AA3 16 <1> push ss 3471 00001AA4 07 <1> pop es 3472 00001AA5 F6C402 <1> test ah, 2 3473 00001AA8 751D <1> jnz @F 3474 00001AAA 56 <1> push si 3475 00001AAB 51 <1> push cx 3476 00001AAC BE[7968] <1> mov si, msg.di_multiplex.1 3477 00001AAF E88419 <1> call copy_single_counted_string 3478 00001AB2 E88C9F <1> call hexbyte 3479 00001AB5 BE[8068] <1> mov si, msg.di_multiplex.2 3480 00001AB8 E87B19 <1> call copy_single_counted_string 3481 00001ABB 92 <1> xchg ax, dx 3482 00001ABC E87B9F <1> call hexword 3483 00001ABF BE[8868] <1> mov si, msg.di_multiplex.3 3484 00001AC2 E87119 <1> call copy_single_counted_string 3485 00001AC5 59 <1> pop cx 3486 00001AC6 5E <1> pop si 3487 <1> @@: 3488 00001AC7 C3 <1> retn 3489 <1> 3490 <1> 3491 <1> ; INP: ah = multiplex number of AMIS TSR to search through 3492 <1> ; ss:sp-> interrupt number (byte), must be preserved 3493 <1> ; CHG: es, di, dx, bx 3494 <1> .search: 3495 00001AC8 B004 <1> mov al, 04h 3496 00001ACA 5B <1> pop bx 3497 00001ACB 53 <1> push bx ; low byte is the interrupt number 3498 <1> ; function 4 changes dx, bx, al 3499 <1> %if _PM 3500 00001ACC E89878 <1> call call_int2D 3501 <1> %else 3502 <1> int 2Dh 3503 <1> %endif 3504 00001ACF 3C03 <1> cmp al, 03h ; returned its interrupt entry ? 3505 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 3506 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 3507 <1> ; and SearchIISPChain checks the interrupt entry anyway. 3508 00001AD1 743D <1> je .search_dxbx 3509 00001AD3 3C04 <1> cmp al, 04h ; returned list of hooked interrupts ? 3510 00001AD5 7403E9ECFE <1> jne .nextplex ; no, try next multiplexer --> 3511 00001ADA 89DF <1> mov di, bx 3512 00001ADC 5B <1> pop bx 3513 00001ADD 53 <1> push bx ; bl = interrupt number 3514 00001ADE 31C9 <1> xor cx, cx ; = index into list 3515 00001AE0 88D8 <1> mov al, bl 3516 <1> .search_intlist_seg: 3517 <1> %if _PM 3518 00001AE2 E831B7 <1> call setes2dx 3519 <1> %else 3520 <1> mov es, dx ; es:di-> list 3521 <1> %endif 3522 <1> .search_intlist: ; Search the returned list for the required interrupt number. 3523 00001AE5 AE <1> scasb ; our interrupt number ? 3524 00001AE6 740E <1> je .search_found_intlist 3525 00001AE8 26807DFF2D <1> cmp byte [es:di-1], 2Dh ; was last in list ? 3526 00001AED 7503E9D4FE <1> je .nextplex 3527 00001AF2 AF <1> scasw ; skip pointer 3528 00001AF3 41 <1> inc cx 3529 00001AF4 EBEF <1> jmp short .search_intlist ; try next entry --> 3530 <1> 3531 <1> .search_found_intlist: 3532 00001AF6 268B1D <1> mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 3533 00001AF9 AF <1> scasw ; skip pointer 3534 00001AFA 52 <1> push dx ; preserve dx for .search_intlist_seg 3535 00001AFB 57 <1> push di 3536 00001AFC E82200 <1> call .add 3537 00001AFF 5F <1> pop di 3538 00001B00 5A <1> pop dx 3539 00001B01 7303E9C5FE <1> jc .error 3540 <1> ; je .search_found ; found entry --> 3541 <1> ; This specific jump supports TSRs that hook the same 3542 <1> ; interrupt more than once; jumping to .nextplex instead 3543 <1> ; (as previously) aborts the search after the first match 3544 <1> ; in the interrupt list. This support might become useful. 3545 00001B06 3C2D <1> cmp al, 2Dh ; was last in list ? 3546 00001B08 7503E9B9FE <1> je .nextplex 3547 00001B0D 41 <1> inc cx 3548 00001B0E EBD2 <1> jmp short .search_intlist_seg 3549 <1> 3550 <1> .search_dxbx: 3551 <1> %if _PM 3552 00001B10 E803B7 <1> call setes2dx 3553 <1> %else 3554 <1> mov es, dx ; es:bx-> (IISP) interrupt entry 3555 <1> %endif 3556 <1> ; The entry we found now is possibly behind the non-IISP entry that 3557 <1> ; terminated our first SearchIISPChain call (at .hard). We then 3558 <1> ; possibly might find our entry in this hidden part of the chain. 3559 00001B13 83C9FF <1> or cx, -1 3560 00001B16 E80800 <1> call .add 3561 00001B19 7303E9ADFE <1> jc .error 3562 <1> ; jne .nextplex ; didn't find our entry in the chain --> 3563 00001B1E E9A5FE <1> jmp .nextplex 3564 <1> 3565 <1> 3566 <1> int_list.add: 3567 00001B21 31FF <1> xor di, di 3568 00001B23 368E1E[F209] <1> mov ds, word [ss:auxbuff_segorsel] 3569 00001B28 83CEFF <1> or si, -1 3570 00001B2B E8D400 <1> call .check 3571 00001B2E 7516 <1> jne @F 3572 00001B30 F6450502 <1> testopt [di + 4], 200h 3573 00001B34 7503E9C700 <1> jz .error 3574 00001B39 886504 <1> mov byte [di + 4], ah 3575 00001B3C 806505FD <1> clropt [di + 4], 200h 3576 00001B40 894D06 <1> mov word [di + 6], cx 3577 00001B43 E9B900 <1> jmp .done 3578 <1> 3579 <1> @@: 3580 <1> ; ds:di -> second terminator 3581 00001B46 81FFF81F <1> cmp di, _AUXBUFFSIZE - 8 * 3 3582 00001B4A 7603E9B100 <1> ja .error 3583 00001B4F 8D75F8 <1> lea si, [di - 8] 3584 <1> 3585 00001B52 93 <1> xchg ax, bx 3586 00001B53 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3587 <1> ; => auxbuff 3588 00001B58 AB <1> stosw ; store offset 3589 00001B59 92 <1> xchg ax, dx ; dx = offset 3590 00001B5A AB <1> stosw ; store segment 3591 00001B5B 92 <1> xchg ax, dx ; dx = segment 3592 00001B5C 93 <1> xchg ax, bx 3593 00001B5D 50 <1> push ax 3594 00001B5E B000 <1> mov al, 0 3595 00001B60 86C4 <1> xchg al, ah 3596 00001B62 AB <1> stosw ; which multiplex number 3597 00001B63 89C8 <1> mov ax, cx 3598 00001B65 AB <1> stosw ; which int list entry = none = 0 3599 00001B66 58 <1> pop ax 3600 <1> 3601 <1> .loop_chain: 3602 00001B67 50 <1> push ax 3603 00001B68 56 <1> push si 3604 00001B69 E8B900 <1> call check_int_chain 3605 00001B6C 5E <1> pop si 3606 00001B6D 5B <1> pop bx 3607 00001B6E 727E <1> jc .end_chain 3608 <1> 3609 00001B70 81FFF81F <1> cmp di, _AUXBUFFSIZE - 3 * 8 3610 00001B74 7603E98700 <1> ja .error 3611 00001B79 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3612 00001B7E AB <1> stosw ; store offset 3613 00001B7F 92 <1> xchg ax, dx 3614 00001B80 AB <1> stosw ; store segment 3615 00001B81 92 <1> xchg ax, dx 3616 00001B82 93 <1> xchg bx, ax ; ah = multiplex number, bx = offset 3617 00001B83 50 <1> push ax 3618 00001B84 B80002 <1> mov ax, 200h 3619 00001B87 AB <1> stosw ; found in chain = 200h 3620 00001B88 31C0 <1> xor ax, ax 3621 00001B8A AB <1> stosw 3622 00001B8B 58 <1> pop ax 3623 00001B8C 57 <1> push di 3624 00001B8D 31FF <1> xor di, di 3625 00001B8F E87000 <1> call .check 3626 00001B92 7403 <1> je @F 3627 00001B94 5F <1> pop di 3628 00001B95 EBD0 <1> jmp .loop_chain 3629 <1> 3630 <1> @@: 3631 00001B97 5B <1> pop bx 3632 00001B98 F6450501 <1> testopt [di + 4], 100h 3633 00001B9C 7562 <1> jnz .error 3634 00001B9E 837DFCFF <1> cmp word [di - 8 + 4], -1 3635 00001BA2 755C <1> jne .error 3636 <1> ; di -> match (insert to move here) 3637 <1> ; bx -> after repeat 3638 <1> ; bx - 8 -> repeat 3639 <1> ; bx - 16 -> last entry to move 3640 <1> ; si -> single terminator 3641 <1> ; si + 8 -> first entry to move 3642 <1> 3643 00001BA4 83EB10 <1> sub bx, 16 ; -> last entry to move 3644 <1> 3645 <1> .insert: 3646 <1> ; di -> match (insert to move here) 3647 <1> ; bx + 8 -> repeat 3648 <1> ; bx -> last entry to move 3649 <1> ; si -> single terminator 3650 <1> ; si + 8 -> first entry to move 3651 <1> 3652 00001BA7 FF7706 <1> push word [bx + 6] 3653 00001BAA FF7704 <1> push word [bx + 4] 3654 00001BAD FF7702 <1> push word [bx + 2] 3655 00001BB0 FF37 <1> push word [bx] ; get the last entry 3656 00001BB2 57 <1> push di 3657 00001BB3 56 <1> push si 3658 00001BB4 51 <1> push cx 3659 00001BB5 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3660 00001BBA 89F9 <1> mov cx, di ; = where to insert 3661 <1> ; -> first to displace 3662 00001BBC F7D9 <1> neg cx 3663 00001BBE 89DE <1> mov si, bx ; -> after end of source 3664 00001BC0 8D7F08 <1> lea di, [bx + 8] ; -> after end of dest 3665 00001BC3 01F1 <1> add cx, si ; after end of source - first to displace 3666 <1> ; = how many bytes to displace 3667 00001BC5 D1E9 <1> shr cx, 1 3668 00001BC7 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 3669 00001BC8 A7 <1> cmpsw ; si -= 2, di -= 2 3670 <1> 3671 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 3672 <1> ; Refer to comment in init.asm init_movp. 3673 <1> 3674 <1> %if _AMD_ERRATUM_109_WORKAROUND 3675 00001BC9 E308 <1> jcxz @FF 3676 00001BCB 83F914 <1> cmp cx, 20 3677 00001BCE 7703 <1> ja @FF 3678 <1> @@: 3679 00001BD0 A5 <1> movsw 3680 00001BD1 E2FD <1> loop @B 3681 <1> @@: 3682 <1> %endif 3683 00001BD3 F3A5 <1> rep movsw 3684 00001BD5 FC <1> cld 3685 00001BD6 59 <1> pop cx 3686 00001BD7 5E <1> pop si 3687 00001BD8 5F <1> pop di 3688 00001BD9 8F05 <1> pop word [di] 3689 00001BDB 8F4502 <1> pop word [di + 2] 3690 00001BDE 8F4504 <1> pop word [di + 4] 3691 00001BE1 8F4506 <1> pop word [di + 6] ; insert moved entry 3692 00001BE4 83C608 <1> add si, 8 3693 <1> 3694 <1> ; di -> match (inserted here, insert next here) 3695 <1> ; bx + 8 -> repeat 3696 <1> ; bx -> last entry to move 3697 <1> ; si -> single terminator 3698 <1> ; si + 8 -> first entry to move 3699 00001BE7 39DE <1> cmp si, bx ; if last to move != terminator 3700 00001BE9 75BC <1> jne .insert ; then move another -> 3701 00001BEB 89F7 <1> mov di, si ; where to put double terminator 3702 <1> 3703 00001BED 93 <1> xchg ax, bx 3704 <1> .end_chain: 3705 00001BEE 53 <1> push bx 3706 00001BEF 51 <1> push cx 3707 00001BF0 83C8FF <1> or ax, -1 3708 00001BF3 368E06[F209] <1> mov es, word [ss:auxbuff_segorsel] 3709 00001BF8 B90800 <1> mov cx, 8 3710 00001BFB F3AB <1> rep stosw ; terminator is all-ones 3711 <1> ; (two terminators actually) 3712 00001BFD 59 <1> pop cx 3713 00001BFE 58 <1> pop ax 3714 <1> 3715 <1> .done: 3716 00001BFF A8 <1> db __TEST_IMM8 ; (NC) 3717 <1> .error: 3718 00001C00 F9 <1> stc 3719 <1> 3720 00001C01 C3 <1> retn 3721 <1> 3722 <1> 3723 <1> ; INP: dx:bx = 86 Mode far pointer to handler 3724 <1> ; di -> to check 3725 <1> ; si = end of area to check 3726 <1> 3727 <1> .check: 3728 00001C02 391D <1> cmp word [di + 0], bx 3729 00001C04 7506 <1> jne .mismatch 3730 00001C06 395502 <1> cmp word [di + 2], dx 3731 00001C09 7501 <1> jne .mismatch 3732 <1> .match: 3733 00001C0B C3 <1> retn 3734 <1> 3735 <1> .mismatch: 3736 00001C0C 83C708 <1> add di, 8 3737 <1> 3738 00001C0F 39F7 <1> cmp di, si 3739 00001C11 730F <1> jae .checkret 3740 <1> 3741 00001C13 837D04FF <1> cmp word [di + 4], -1 3742 00001C17 75E9 <1> jne .check 3743 <1> 3744 00001C19 83C708 <1> add di, 8 3745 00001C1C 837D04FF <1> cmp word [di + 4], -1 3746 00001C20 75E0 <1> jne .check 3747 <1> .checkret: 3748 00001C22 85FF <1> test di, di 3749 00001C24 C3 <1> retn 3750 <1> 3751 <1> 3752 <1> ; INP: dx:bx = 86 Mode far pointer to int handler 3753 <1> ; OUT: NC if chain found, 3754 <1> ; dx:ax = 86 Mode far pointer to next 3755 <1> ; ss:si -> type message (counted) 3756 <1> ; STT: es != ss, ds != ss 3757 <1> check_int_chain: 3758 <1> %if _PM 3759 00001C25 E8EEB5 <1> call setes2dx 3760 <1> %else 3761 <1> mov es, dx ; es:bx -> entrypoint 3762 <1> %endif 3763 00001C28 E876B7 <1> call IsIISPEntry? 3764 00001C2B 752A <1> jnz .not_iisp 3765 <1> 3766 00001C2D 26FF7704 <1> push word [es:bx + ieNext + 2] 3767 00001C31 26FF7702 <1> push word [es:bx + ieNext] 3768 <1> 3769 00001C35 BE[B967] <1> mov si, msg.di_uninst_iisp 3770 00001C38 26813F90EA <1> cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 3771 00001C3D 7414 <1> je @F 3772 00001C3F BE[9D67] <1> mov si, msg.di_iisp 3773 00001C42 26807F09EB <1> cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ? 3774 00001C47 7507 <1> jne .nonstd 3775 00001C49 26813FEB10 <1> cmp word [ es:bx + ieEntry ], 010EBh ; jmp short $+18 ? 3776 00001C4E 7403 <1> je @F 3777 <1> .nonstd: 3778 00001C50 BE[A567] <1> mov si, msg.di_nonstd_iisp 3779 <1> @@: 3780 00001C53 58 <1> pop ax 3781 00001C54 5A <1> pop dx ; segment 3782 00001C55 F8 <1> clc 3783 00001C56 C3 <1> retn 3784 <1> 3785 <1> 3786 <1> .not_iisp: 3787 00001C57 26803FE8 <1> cmp byte [es:bx], 0E8h 3788 00001C5B 7514 <1> jne .not_fd 3789 00001C5D 26807F03EA <1> cmp byte [es:bx + 3], 0EAh 3790 00001C62 750D <1> jne .not_fd 3791 00001C64 26FF7706 <1> push word [es:bx + 4 + 2] 3792 00001C68 26FF7704 <1> push word [es:bx + 4] 3793 00001C6C BE[CD67] <1> mov si, msg.di_freedos_reloc 3794 00001C6F EBE2 <1> jmp @B 3795 <1> 3796 <1> .not_fd: 3797 00001C71 BE[E067] <1> mov si, msg.di_jmpfar 3798 00001C74 26803FEA <1> cmp byte [es:bx], 0EAh 3799 00001C78 750A <1> jne .not_jmpfar 3800 00001C7A 26FF7703 <1> push word [es:bx + 1 + 2] 3801 00001C7E 26FF7701 <1> push word [es:bx + 1] 3802 00001C82 EBCF <1> jmp @B 3803 <1> 3804 <1> .not_jmpfar: 3805 00001C84 BE[EF67] <1> mov si, msg.di_jmpfarindirect 3806 00001C87 26803FEB <1> cmp byte [es:bx], 0EBh 3807 00001C8B 750D <1> jne .not_testhook_try_jmpfarindirect 3808 00001C8D BE[0368] <1> mov si, msg.di_testhook 3809 00001C90 268A4701 <1> mov al, byte [es:bx + 1] 3810 00001C94 98 <1> cbw 3811 00001C95 83C002 <1> add ax, 2 3812 00001C98 01C3 <1> add bx, ax 3813 <1> .not_testhook_try_jmpfarindirect: 3814 00001C9A 83FBFA <1> cmp bx, -6 3815 00001C9D 7720 <1> ja .not_testhook_or_jmpfarindirect 3816 00001C9F 26813F2EFF <1> cmp word [es:bx], 0FF2Eh 3817 00001CA4 7519 <1> jne .not_testhook_or_jmpfarindirect 3818 00001CA6 26807F022E <1> cmp byte [es:bx + 2], 2Eh 3819 00001CAB 7512 <1> jne .not_testhook_or_jmpfarindirect 3820 00001CAD 268B5F03 <1> mov bx, word [es:bx + 3] 3821 00001CB1 83FBFC <1> cmp bx, -4 3822 00001CB4 7709 <1> ja .not_testhook_or_jmpfarindirect 3823 00001CB6 26FF7702 <1> push word [es:bx + 2] 3824 00001CBA 26FF37 <1> push word [es:bx] 3825 00001CBD EB94 <1> jmp @B 3826 <1> 3827 <1> .not_testhook_or_jmpfarindirect: 3828 00001CBF F9 <1> stc 3829 00001CC0 C3 <1> retn 3830 <1> 3831 <1> 3832 <1> gateout.mcbname: 3833 00001CC1 F6C501 <1> test ch, 1 3834 00001CC4 7503E99A00 <1> jz .ret 3835 00001CC9 8B16[CE0A] <1> mov dx, word [firstmcb] 3836 00001CCD 83FAFF <1> cmp dx, -1 3837 00001CD0 7503E98E00 <1> je .ret 3838 00001CD5 51 <1> push cx 3839 00001CD6 A1[640B] <1> mov ax, word [intaddress] 3840 00001CD9 B104 <1> mov cl, 4 3841 00001CDB D3E8 <1> shr ax, cl 3842 00001CDD 0306[660B] <1> add ax, word [intaddress + 2] ; => segment of handler 3843 00001CE1 7251 <1> jc .hma 3844 <1> .loop: 3845 <1> %if _PM 3846 00001CE3 E830B5 <1> call setes2dx 3847 <1> %else 3848 <1> mov es, dx 3849 <1> %endif 3850 00001CE6 89D1 <1> mov cx, dx 3851 00001CE8 26030E0300 <1> add cx, word [es:3] 3852 00001CED 41 <1> inc cx 3853 00001CEE 39D0 <1> cmp ax, dx 3854 00001CF0 7247 <1> jb .next 3855 00001CF2 39C8 <1> cmp ax, cx 3856 00001CF4 7343 <1> jae .next 3857 00001CF6 268B160100 <1> mov dx, word [es:1] 3858 00001CFB BE[3D68] <1> mov si, msg.di_system_mcb 3859 00001CFE 83FA50 <1> cmp dx, 50h 3860 00001D01 725A <1> jb .copy 3861 00001D03 4A <1> dec dx 3862 <1> %if _PM 3863 00001D04 E80FB5 <1> call setes2dx 3864 <1> %else 3865 <1> mov es, dx 3866 <1> %endif 3867 00001D07 06 <1> push es 3868 00001D08 1F <1> pop ds 3869 00001D09 16 <1> push ss 3870 00001D0A 07 <1> pop es 3871 00001D0B B020 <1> mov al, 32 3872 00001D0D AA <1> stosb 3873 00001D0E 89F8 <1> mov ax, di 3874 00001D10 BE0800 <1> mov si, 8 3875 00001D13 89F1 <1> mov cx, si 3876 00001D15 57 <1> push di 3877 00001D16 F3A4 <1> rep movsb 3878 00001D18 B000 <1> mov al, 0 3879 00001D1A AA <1> stosb ; append zero-value byte 3880 00001D1B 5F <1> pop di ; -> name in buffer 3881 00001D1C 16 <1> push ss 3882 00001D1D 1F <1> pop ds 3883 <1> @@: 3884 00001D1E AE <1> scasb ; is it zero ? 3885 00001D1F 75FD <1> jne @B ; no, continue --> 3886 <1> ; first dec makes it -> at the zero 3887 <1> @@: 3888 00001D21 4F <1> dec di 3889 00001D22 39F8 <1> cmp ax, di 3890 00001D24 7408 <1> je .empty 3891 00001D26 807DFF20 <1> cmp byte [di - 1], 32 3892 00001D2A 74F5 <1> je @B 3893 00001D2C EB34 <1> jmp .ret_cx 3894 <1> 3895 <1> .empty: 3896 00001D2E 4F <1> dec di 3897 00001D2F BE[2D68] <1> mov si, msg.di_empty 3898 00001D32 EB29 <1> jmp .copy 3899 <1> 3900 <1> .hma: 3901 00001D34 BE[6768] <1> mov si, msg.di_hma 3902 00001D37 EB24 <1> jmp .copy 3903 <1> 3904 <1> .next: 3905 00001D39 89CA <1> mov dx, cx 3906 00001D3B 3B16[D00A] <1> cmp dx, word [firstumcb]; is next one the first UMCB ? 3907 00001D3F 74A2 <1> je .loop ; yes, ignore the "Z" (if any) --> 3908 00001D41 26803E00004D <1> cmp byte [es:0], "M" ; check current signature 3909 00001D47 749A <1> je .loop ; if "M" then loop to next --> 3910 <1> 3911 00001D49 8B36[D00A] <1> mov si, word [firstumcb] 3912 00001D4D 46 <1> inc si 3913 00001D4E 7503 <1> jnz @F 3914 00001D50 BE00A0 <1> mov si, 0A000h 3915 <1> @@: 3916 00001D53 39F0 <1> cmp ax, si 3917 00001D55 BE[4968] <1> mov si, msg.di_system_upper 3918 00001D58 7303 <1> jae @F 3919 00001D5A BE[5868] <1> mov si, msg.di_system_low 3920 <1> @@: 3921 <1> .copy: 3922 00001D5D 16 <1> push ss 3923 00001D5E 07 <1> pop es 3924 00001D5F E8D416 <1> call copy_single_counted_string 3925 <1> .ret_cx: 3926 00001D62 59 <1> pop cx 3927 <1> .ret: 3928 00001D63 C3 <1> retn 3929 <1> 3930 <1> %endif 3931 <1> 3932 <1> %if _MCB 3933 <1> ; DM command 3934 <1> mcbout: 3935 00001D64 E8289C <1> call skipwhite 3936 00001D67 8B16[CE0A] <1> mov dx, word [firstmcb] 3937 00001D6B E8CC9B <1> call iseol? 3938 00001D6E 7406 <1> je .lolmcb 3939 00001D70 E8A69A <1> call getword 3940 00001D73 E8D99B <1> call chkeol 3941 <1> .lolmcb: 3942 00001D76 89D6 <1> mov si, dx 3943 00001D78 BF[0E08] <1> mov di, line_out 3944 00001D7B B85053 <1> mov ax, "PS" 3945 00001D7E AB <1> stosw 3946 00001D7F B8503A <1> mov ax, "P:" 3947 00001D82 AB <1> stosw 3948 00001D83 B020 <1> mov al, 32 3949 00001D85 AA <1> stosb 3950 00001D86 A1[A40A] <1> mov ax, word [pspdbe] 3951 00001D89 E8AE9C <1> call hexword 3952 00001D8C E8E39C <1> call putsline_crlf ; destroys cx,dx,bx 3953 00001D8F B14D <1> mov cl, 'M' 3954 <1> .next: 3955 00001D91 83FEFF <1> cmp si, byte -1 3956 00001D94 7405 <1> je .invmcb 3957 00001D96 83FE50 <1> cmp si, byte 50h 3958 00001D99 7306 <1> jae .valmcb 3959 <1> .invmcb: 3960 00001D9B BA[A95E] <1> mov dx, msg.invmcbadr 3961 00001D9E E94FA0 <1> jmp putsz 3962 <1> .valmcb: 3963 00001DA1 BF[0E08] <1> mov di, line_out 3964 00001DA4 1E <1> push ds 3965 <1> %if _PM 3966 00001DA5 E8D600 <1> call setds2si 3967 <1> %else 3968 <1> mov ds, si 3969 <1> %endif 3970 00001DA8 8A2E0000 <1> mov ch, byte [0000] 3971 00001DAC 8B1E0100 <1> mov bx, word [0001] 3972 00001DB0 8B160300 <1> mov dx, word [0003] 3973 <1> 3974 00001DB4 89F0 <1> mov ax, si 3975 00001DB6 E8819C <1> call hexword ; segment address of MCB 3976 00001DB9 B020 <1> mov al, 32 3977 00001DBB AA <1> stosb 3978 00001DBC 88E8 <1> mov al, ch 3979 00001DBE E8809C <1> call hexbyte ; 'M' or 'Z' 3980 00001DC1 B020 <1> mov al, 32 3981 00001DC3 AA <1> stosb 3982 00001DC4 89D8 <1> mov ax, bx 3983 00001DC6 E8719C <1> call hexword ; MCB owner 3984 00001DC9 B020 <1> mov al, 32 3985 00001DCB AA <1> stosb 3986 00001DCC 89D0 <1> mov ax, dx 3987 00001DCE E8699C <1> call hexword ; MCB size in paragraphs 3988 <1> 3989 00001DD1 B020 <1> mov al, 32 3990 00001DD3 AA <1> stosb 3991 00001DD4 89D0 <1> mov ax, dx ; ax = size in paragraphs 3992 00001DD6 53 <1> push bx 3993 00001DD7 50 <1> push ax 3994 00001DD8 52 <1> push dx 3995 00001DD9 51 <1> push cx 3996 00001DDA 31D2 <1> xor dx, dx ; dx:ax = size in paragraphs 3997 00001DDC B91000 <1> mov cx, 16 ; cx = 16, multiplier (get size in bytes) 3998 00001DDF BB0800 <1> mov bx, 4+4 ; bx = 4+4, width 3999 <1> 4000 00001DE2 E87801 <1> call disp_dxax_times_cx_width_bx_size.store 4001 00001DE5 59 <1> pop cx 4002 00001DE6 5A <1> pop dx 4003 00001DE7 58 <1> pop ax 4004 00001DE8 5B <1> pop bx 4005 <1> 4006 00001DE9 85DB <1> test bx, bx 4007 00001DEB 7472 <1> jz .freemcb ; free MCBs have no name --> 4008 00001DED B020 <1> mov al, 32 4009 00001DEF AA <1> stosb 4010 00001DF0 56 <1> push si 4011 00001DF1 51 <1> push cx 4012 00001DF2 52 <1> push dx 4013 <1> 4014 00001DF3 1E <1> push ds 4015 00001DF4 BE0800 <1> mov si, 8 4016 00001DF7 B90200 <1> mov cx, 2 4017 00001DFA 39F3 <1> cmp bx, si ; is it a "system" MCB? (owner 0008h or 0007h) 4018 00001DFC 7707 <1> ja @F 4019 00001DFE 803C53 <1> cmp byte [si], "S" ; "S", "SD", "SC" ? 4020 00001E01 7408 <1> je .nextmcbchar ; yes, limit name to two characters --> 4021 00001E03 EB04 <1> jmp .nextmcbchar_cx_si ; no, assume full name given 4022 <1> @@: 4023 00001E05 4B <1> dec bx ; => owner block's MCB 4024 <1> %if _PM 4025 00001E06 E87700 <1> call setds2bx 4026 <1> %else 4027 <1> mov ds, bx 4028 <1> %endif 4029 <1> .nextmcbchar_cx_si: 4030 00001E09 89F1 <1> mov cx, si ; = 8 4031 <1> .nextmcbchar: ; copy name of owner MCB 4032 00001E0B AC <1> lodsb 4033 00001E0C AA <1> stosb 4034 00001E0D 08C0 <1> or al, al 4035 00001E0F E0FA <1> loopnz .nextmcbchar ; was not NUL and more bytes left ? 4036 00001E11 84C0 <1> test al, al 4037 00001E13 7501 <1> jnz @F 4038 00001E15 4F <1> dec di 4039 <1> @@: 4040 00001E16 1F <1> pop ds 4041 <1> 4042 00001E17 833E010008 <1> cmp word [1], 8 4043 00001E1C 753E <1> jne .not_s_mcb 4044 00001E1E 833E080053 <1> cmp word [8], "S" ; S MCB ? 4045 00001E23 7537 <1> jne .not_s_mcb 4046 <1> 4047 00001E25 B82074 <1> mov ax, " t" 4048 00001E28 AB <1> stosw 4049 00001E29 B87970 <1> mov ax, "yp" 4050 00001E2C AB <1> stosw 4051 00001E2D B86520 <1> mov ax, "e " 4052 00001E30 AB <1> stosw 4053 <1> 4054 00001E31 31C0 <1> xor ax, ax 4055 00001E33 A00A00 <1> mov al, [10] 4056 00001E36 E8089C <1> call hexbyte 4057 <1> 4058 00001E39 16 <1> push ss 4059 00001E3A 1F <1> pop ds 4060 00001E3B BE[8C72] <1> mov si, smcbtypes 4061 <1> .s_mcb_loop: 4062 00001E3E 833CFF <1> cmp word [si], -1 4063 00001E41 740E <1> je .s_mcb_unknown 4064 00001E43 3904 <1> cmp word [si], ax 4065 00001E45 7405 <1> je .s_mcb_known 4066 00001E47 83C604 <1> add si, 4 4067 00001E4A EBF2 <1> jmp .s_mcb_loop 4068 <1> 4069 <1> .s_mcb_known: 4070 00001E4C 8B7402 <1> mov si, word [si + 2] 4071 00001E4F EB03 <1> jmp .s_mcb_common 4072 <1> 4073 <1> .s_mcb_unknown: 4074 00001E51 BE[3574] <1> mov si, smcbmsg_unknown 4075 <1> .s_mcb_common: 4076 00001E54 B020 <1> mov al, 32 4077 <1> @@: 4078 00001E56 AA <1> stosb 4079 00001E57 AC <1> lodsb 4080 00001E58 84C0 <1> test al, al 4081 00001E5A 75FA <1> jnz @B 4082 <1> 4083 <1> .not_s_mcb: 4084 00001E5C 5A <1> pop dx 4085 00001E5D 59 <1> pop cx 4086 00001E5E 5E <1> pop si 4087 <1> .freemcb: 4088 <1> 4089 00001E5F 1F <1> pop ds 4090 00001E60 80FD4D <1> cmp ch, 'M' 4091 00001E63 7406 <1> je .disp 4092 00001E65 80FD5A <1> cmp ch, 'Z' 4093 00001E68 7401 <1> je .disp 4094 <1> .ret: 4095 00001E6A C3 <1> retn 4096 <1> 4097 <1> .disp: 4098 00001E6B 88E9 <1> mov cl, ch 4099 00001E6D 52 <1> push dx 4100 00001E6E 51 <1> push cx 4101 00001E6F E8009C <1> call putsline_crlf ; destroys cx,dx,bx 4102 00001E72 59 <1> pop cx 4103 00001E73 5A <1> pop dx 4104 00001E74 01D6 <1> add si, dx 4105 00001E76 72F2 <1> jc .ret ; over FFFFh, must be end of chain --> (hmm) 4106 00001E78 46 <1> inc si 4107 00001E79 74EF <1> jz .ret 4108 00001E7B E913FF <1> jmp .next 4109 <1> 4110 <1> %if _PM 4111 <1> setds2si: 4112 00001E7E 89F3 <1> mov bx, si 4113 <1> setds2bx: 4114 00001E80 E87A73 <1> call ispm 4115 00001E83 7505 <1> jnz sd2s_ex 4116 00001E85 89DA <1> mov dx, bx 4117 00001E87 E86D7A <1> call setrmsegm 4118 <1> sd2s_ex: 4119 00001E8A 8EDB <1> mov ds, bx 4120 00001E8C C3 <1> retn 4121 <1> %endif ; _PM 4122 <1> %endif ; _MCB 4123 <1> 4124 <1> ;--- DX command. Display extended memory 4125 <1> 4126 <1> %if _PM 4127 <1> [cpu 386] 4128 <1> extmem: 4129 00001E8D 8B16[5A0B] <1> mov dx, word [x_addr+0] 4130 00001E91 8B1E[5C0B] <1> mov bx, word [x_addr+2] 4131 00001E95 E8F79A <1> call skipwhite 4132 00001E98 E89F9A <1> call iseol? 4133 00001E9B 7406 <1> je extmem_1 4134 00001E9D E89394 <1> call getdword ; get linear address into bx:dx 4135 00001EA0 E8AC9A <1> call chkeol ; expect end of line here 4136 <1> extmem_1: 4137 00001EA3 C706[DA0B][8D1E] <1> mov word [lastcmd], extmem 4138 00001EA9 53 <1> push bx 4139 00001EAA 52 <1> push dx 4140 00001EAB 665D <1> pop ebp 4141 <1> 4142 00001EAD BF[400A] <1> mov di, stack ; create a GDT for Int15.87 4143 00001EB0 31C0 <1> xor ax, ax 4144 00001EB2 B90800 <1> mov cx, 8 4145 00001EB5 F3AB <1> rep stosw 4146 00001EB7 B87F00 <1> mov ax, 007Fh 4147 00001EBA AB <1> stosw 4148 00001EBB 89D0 <1> mov ax, dx 4149 00001EBD AB <1> stosw 4150 00001EBE 88D8 <1> mov al, bl 4151 00001EC0 AA <1> stosb 4152 00001EC1 B89300 <1> mov ax, 0093h 4153 00001EC4 AB <1> stosw 4154 00001EC5 88F8 <1> mov al, bh 4155 00001EC7 AA <1> stosb 4156 00001EC8 B87F00 <1> mov ax, 007Fh 4157 00001ECB AB <1> stosw 4158 00001ECC B8[8000] <1> mov ax, line_in+128 4159 00001ECF 8B1E[A60A] <1> mov bx, word [pspdbg] 4160 00001ED3 660FB7DB <1> movzx ebx, bx 4161 00001ED7 66C1E304 <1> shl ebx, 4 4162 00001EDB 660FB7C0 <1> movzx eax, ax 4163 00001EDF 6601D8 <1> add eax, ebx ; eax = flat address of line_in+128 4164 00001EE2 AB <1> stosw 4165 00001EE3 66C1E810 <1> shr eax, 16 4166 00001EE7 AA <1> stosb 4167 00001EE8 88E3 <1> mov bl, ah 4168 00001EEA B89300 <1> mov ax, 0093h 4169 00001EED AB <1> stosw 4170 00001EEE 88D8 <1> mov al, bl 4171 00001EF0 AA <1> stosb 4172 00001EF1 B90800 <1> mov cx, 8 4173 00001EF4 31C0 <1> xor ax, ax 4174 00001EF6 F3AB <1> rep stosw 4175 <1> 4176 00001EF8 E80273 <1> call ispm 4177 00001EFB BE[400A] <1> mov si, stack 4178 00001EFE B94000 <1> mov cx, 0040h 4179 00001F01 B487 <1> mov ah, 87h 4180 00001F03 750B <1> jnz extmem_rm 4181 00001F05 FF36[A60A] <1> push word [pspdbg] 4182 00001F09 6A15 <1> push 15h 4183 00001F0B E84174 <1> call intcall 4184 00001F0E EB02 <1> jmp short i15ok 4185 <1> extmem_rm: 4186 00001F10 CD15 <1> int 15h 4187 <1> i15ok: 4188 00001F12 7247 <1> jc extmem_exit 4189 00001F14 BE[8000] <1> mov si, line_in+128 4190 00001F17 B508 <1> mov ch, 8h 4191 <1> nexti15l: 4192 00001F19 E8BB20 <1> call handle_serial_flags_ctrl_c 4193 00001F1C BF[0E08] <1> mov di, line_out 4194 00001F1F 6689E8 <1> mov eax, ebp 4195 00001F22 66C1E810 <1> shr eax, 16 4196 00001F26 E8119B <1> call hexword 4197 00001F29 89E8 <1> mov ax, bp 4198 00001F2B E80C9B <1> call hexword 4199 00001F2E B82020 <1> mov ax, 32<<8|32 4200 00001F31 AB <1> stosw 4201 00001F32 BB[4808] <1> mov bx, line_out+10+3*16 4202 00001F35 B110 <1> mov cl, 10h 4203 <1> nexti15b: 4204 00001F37 AC <1> lodsb 4205 00001F38 E88EF6 <1> call dd_store 4206 00001F3B B020 <1> mov al, 32 4207 00001F3D AA <1> stosb 4208 00001F3E FEC9 <1> dec cl 4209 00001F40 75F5 <1> jnz nexti15b 4210 00001F42 C645E72D <1> mov byte [di-(8*3+1)], '-' ; display a '-' after 8 bytes 4211 00001F46 83C710 <1> add di, 16 4212 00001F49 51 <1> push cx 4213 00001F4A E8259B <1> call putsline_crlf 4214 00001F4D 59 <1> pop cx 4215 00001F4E 6683C510 <1> add ebp, byte 10h 4216 00001F52 FECD <1> dec ch 4217 00001F54 75C3 <1> jnz nexti15l 4218 00001F56 66892E[5A0B] <1> mov dword [x_addr], ebp 4219 <1> extmem_exit: 4220 00001F5B C3 <1> retn 4221 <1> __CPU__ 4222 <1> %endif 4223 <1> 4224 <1> ; INP: dx:ax = numerator 4225 <1> ; cx = multiplier (0 to take si:dx:ax as numerator) 4226 <1> ; bx = field width 4227 <1> ; es:di -> buffer where to store 4228 <1> ; STT: UP, ds = ss 4229 <1> ; OUT: written to buffer, es:di -> behind written string 4230 <1> disp_dxax_times_cx_width_bx_size: 4231 00001F5C A8 <1> db __TEST_IMM8 ; (skip stc, NC) 4232 <1> .store: 4233 00001F5D F9 <1> stc 4234 <1> 4235 <1> lframe near 4236 <1> lequ 4 + 4 + 2, buffer_size 4237 <1> ; 4: "2048" (maximum number) 4238 <1> ; 4: " ?iB" (IEC prefixed unit) 4239 <1> ; 2: ??? 4240 <1> lvar ?buffer_size, buffer 4241 <1> lvar 6, dividend 4242 00001F5E 5589E58D66F0 <1> lenter 4243 <1> lvar word, bit_0_is_store 4244 00001F64 9C <1> pushf 4245 <1> lvar word, width 4246 00001F65 53 <1> push bx 4247 00001F66 56 <1> push si 4248 00001F67 1E <1> push ds 4249 00001F68 51 <1> push cx 4250 00001F69 50 <1> push ax 4251 00001F6A 52 <1> push dx 4252 00001F6B 06 <1> push es 4253 00001F6C 57 <1> push di 4254 <1> 4255 00001F6D 16 <1> push ss ; push cs 4256 00001F6E 1F <1> pop ds 4257 00001F6F 16 <1> push ss 4258 00001F70 07 <1> pop es 4259 <1> 4260 00001F71 E310 <1> jcxz .use_si 4261 <1> 4262 00001F73 52 <1> push dx 4263 00001F74 F7E1 <1> mul cx 4264 00001F76 97 <1> xchg ax, di 4265 00001F77 87D6 <1> xchg dx, si ; si:di = first mul 4266 <1> 4267 00001F79 58 <1> pop ax 4268 00001F7A F7E1 <1> mul cx 4269 00001F7C 01F0 <1> add ax, si 4270 00001F7E 83D200 <1> adc dx, 0 ; dx:ax = second mul + adj, dx:ax:di = mul 4271 <1> 4272 00001F81 EB05 <1> jmp @F 4273 <1> 4274 <1> .use_si: 4275 00001F83 89C7 <1> mov di, ax 4276 00001F85 92 <1> xchg ax, dx 4277 00001F86 89F2 <1> mov dx, si 4278 <1> 4279 <1> @@: 4280 00001F88 897EF0 <1> mov word [bp + ?dividend], di 4281 00001F8B 8946F2 <1> mov word [bp + ?dividend + 2], ax 4282 00001F8E 8956F4 <1> mov word [bp + ?dividend + 4], dx 4283 <1> 4284 <1> ; set up divisor for the unit prefixes 4285 00001F91 B90004 <1> mov cx, 1024 ; 1000 here if SI units 4286 00001F94 F606[7D00]10 <1> testopt [options], use_si_units ; SI units ? 4287 00001F99 7403 <1> jz @F ; no --> 4288 00001F9B B9E803 <1> mov cx, 1000 ; yes, use 1000 4289 <1> @@: 4290 <1> 4291 00001F9E BE[C86B] <1> mov si, msg.prefixes ; -> first prefix (blank) 4292 <1> .loop: 4293 00001FA1 837EF400 <1> cmp word [bp + ?dividend + 4], 0 4294 00001FA5 750D <1> jnz .divide 4295 00001FA7 837EF200 <1> cmp word [bp + ?dividend + 2], 0 4296 00001FAB 7507 <1> jnz .divide 4297 00001FAD 817EF00008 <1> cmp word [bp + ?dividend], 2048 4298 00001FB2 7614 <1> jbe .end 4299 <1> .divide: 4300 00001FB4 46 <1> inc si ; -> next prefix 4301 <1> 4302 00001FB5 31D2 <1> xor dx, dx 4303 00001FB7 BF0600 <1> mov di, 6 4304 <1> .loop_divide: 4305 00001FBA 8B43EE <1> mov ax, [bp + ?dividend - 2 + di] 4306 00001FBD F7F1 <1> div cx 4307 00001FBF 8943EE <1> mov word [bp + ?dividend - 2 + di], ax 4308 00001FC2 4F <1> dec di 4309 00001FC3 4F <1> dec di 4310 00001FC4 75F4 <1> jnz .loop_divide 4311 <1> ; dx = last remainder 4312 00001FC6 EBD9 <1> jmp .loop 4313 <1> 4314 <1> .end: 4315 00001FC8 8D7EFF <1> lea di, [bp + ?buffer + ?buffer_size - 1] 4316 00001FCB FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 4317 00001FCC B042 <1> mov al, "B" 4318 00001FCE AA <1> stosb 4319 00001FCF 8A04 <1> mov al, [si] 4320 00001FD1 3C20 <1> cmp al, 32 4321 00001FD3 7416 <1> je @FF 4322 <1> 4323 00001FD5 F606[7D00]10 <1> testopt [options], use_si_units 4324 <1> ; SI units ? 4325 00001FDA 750E <1> jnz @F ; yes --> 4326 00001FDC 24DF <1> and al, ~20h ; uppercase, don't do this if SI units 4327 00001FDE F606[7D00]20 <1> testopt [options], use_jedec_units 4328 <1> ; JEDEC units ? 4329 00001FE3 7505 <1> jnz @F ; yes --> 4330 00001FE5 50 <1> push ax 4331 00001FE6 B069 <1> mov al, "i" 4332 00001FE8 AA <1> stosb ; don't store this if SI or JEDEC units 4333 00001FE9 58 <1> pop ax 4334 <1> @@: 4335 00001FEA AA <1> stosb 4336 <1> @@: 4337 00001FEB B020 <1> mov al, 32 4338 00001FED AA <1> stosb 4339 <1> 4340 00001FEE 8B46F0 <1> mov ax, word [bp + ?dividend] 4341 00001FF1 B90A00 <1> mov cx, 10 4342 <1> .loop_write: 4343 00001FF4 31D2 <1> xor dx, dx 4344 00001FF6 F7F1 <1> div cx 4345 00001FF8 92 <1> xchg ax, dx 4346 <1> ; ax = remainder (next digit) 4347 <1> ; dx = result of div 4348 00001FF9 0430 <1> add al, '0' 4349 00001FFB AA <1> stosb 4350 00001FFC 92 <1> xchg ax, dx ; ax = result of div 4351 00001FFD 85C0 <1> test ax, ax ; any more ? 4352 00001FFF 75F3 <1> jnz .loop_write ; loop --> 4353 <1> 4354 00002001 FC <1> cld 4355 <1> 4356 00002002 47 <1> inc di ; -> first digit 4357 00002003 8D5E00 <1> lea bx, [bp + ?buffer + ?buffer_size] 4358 <1> ; -> behind 'B' 4359 00002006 29FB <1> sub bx, di ; = length of string 4360 00002008 89FE <1> mov si, di 4361 <1> 4362 0000200A 5F <1> pop di 4363 0000200B 07 <1> pop es ; restore es:di 4364 <1> ; -> where to store (if storing) 4365 <1> 4366 0000200C 8B4EEC <1> mov cx, [bp + ?width] 4367 0000200F 29D9 <1> sub cx, bx 4368 00002011 760F <1> jbe .none_blank 4369 00002013 B020 <1> mov al, 32 4370 00002015 F646EE01 <1> test byte [bp + ?bit_0_is_store], 1 4371 00002019 7505 <1> jnz @F 4372 <1> .loop_blank_disp: 4373 0000201B E8F59D <1> call disp_al 4374 0000201E E2FB <1> loop .loop_blank_disp 4375 <1> ; now cx = 0 so the rep stosb is a nop 4376 <1> @@: 4377 00002020 F3AA <1> rep stosb 4378 <1> .none_blank: 4379 <1> 4380 <1> 4381 00002022 89D9 <1> mov cx, bx 4382 00002024 F646EE01 <1> test byte [bp + ?bit_0_is_store], 1 4383 00002028 7506 <1> jnz @F 4384 <1> 4385 <1> ; ! note ss = ds 4386 0000202A 89F2 <1> mov dx, si ; ds:dx -> string 4387 0000202C E8A73D <1> call disp_message_length_cx 4388 0000202F A9 <1> db __TEST_IMM16 ; (skip rep movsb) 4389 <1> @@: 4390 <1> ; ! note ss = ds 4391 <1> ; ds:si -> string, cx = length 4392 00002030 F3A4 <1> rep movsb 4393 <1> 4394 00002032 5A <1> pop dx 4395 00002033 58 <1> pop ax 4396 00002034 59 <1> pop cx 4397 00002035 1F <1> pop ds 4398 00002036 5E <1> pop si 4399 00002037 5B <1> pop bx 4400 00002038 89EC5D <1> lleave 4401 0000203B C3 <1> lret 4402 <1> 2102 %include "rr.asm" 2103 <1> 2104 <1> %if 0 2105 <1> 2106 <1> lDebug R commands - Register access 2107 <1> 2108 <1> Copyright (C) 1995-2003 Paul Vojta 2109 <1> Copyright (C) 2008-2012 C. Masloch 2110 <1> 2111 <1> Usage of the works is permitted provided that this 2112 <1> instrument is retained with the works, so that any entity 2113 <1> that uses the works is notified of this instrument. 2114 <1> 2115 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2116 <1> 2117 <1> %endif 2118 <1> 2119 <1> 2120 <1> usesection lDEBUG_CODE 2121 <1> 2122 <1> ; R command - dump and manipulate registers. 2123 <1> rr: 2124 0000203C E8FB98 <1> call iseol? 2125 0000203F 7503E94A07 <1> je dumpregs ; if no parameters --> 2126 <1> 2127 00002044 E8FC6B <1> call uppercase 2128 00002047 3C45 <1> cmp al, 'E' 2129 00002049 7514 <1> jne @F 2130 <1> 2131 0000204B 50 <1> push ax 2132 0000204C 56 <1> push si 2133 0000204D AC <1> lodsb 2134 0000204E 3C2E <1> cmp al, '.' 2135 00002050 7503E99E05 <1> je re_cmd 2136 00002055 E8E298 <1> call iseol? 2137 00002058 5E <1> pop si 2138 00002059 58 <1> pop ax 2139 0000205A 7503E98406 <1> je dumpregs_extended 2140 <1> @@: 2141 <1> 2142 <1> %if !_ONLYNON386 || (_OPTIONS || _VARIABLES) || _MMXSUPP || _RN 2143 0000205F 4E <1> dec si 2144 00002060 BA[BA64] <1> mov dx, msg.vv 2145 00002063 E87598 <1> call isstring? 2146 00002066 7503E9B90B <1> je dumpallvars 2147 0000206B BA[BD64] <1> mov dx, msg.vm 2148 0000206E E86A98 <1> call isstring? 2149 00002071 7503E9F30B <1> je dumpmemory 2150 00002076 AC <1> lodsb 2151 00002077 E8C96B <1> call uppercase 2152 <1> 2153 0000207A 50 <1> push ax 2154 0000207B 56 <1> push si 2155 0000207C E81099 <1> call skipwhite 2156 0000207F E8B898 <1> call iseol? ; line ends after single character ? 2157 00002082 5E <1> pop si 2158 00002083 58 <1> pop ax 2159 00002084 7550 <1> jne short rr1 ; no, not other kinds of dumps --> 2160 <1> 2161 00002086 3C46 <1> cmp al, 'F' ; only valid input to a later check 2162 00002088 7503E9D703 <1> je rr2.writeprompt ; so go there --> 2163 <1> ; (note that byte [si-1] must != '.') 2164 <1> %if _OPTIONS || _VARIABLES 2165 0000208D 3C56 <1> cmp al, 'V' 2166 0000208F 7503E9AC0A <1> je dumpvars 2167 <1> %endif 2168 <1> %if _MMXSUPP 2169 00002094 3C4D <1> cmp al, 'M' 2170 00002096 750A <1> jne .notrm 2171 00002098 803E[E50A]00 <1> cmp byte [has_mmx], 0 2172 0000209D 7403 <1> je .notrm 2173 0000209F E9220C <1> jmp dumpregsMMX 2174 <1> .notrm: 2175 <1> %endif 2176 000020A2 3C58 <1> _386 cmp al, 'X' 2177 000020A4 7411 <1> _386 je short rrx 2178 <1> %if _RN 2179 000020A6 3C4E <1> cmp al, 'N' 2180 000020A8 750A <1> jne .notrn 2181 000020AA 803E[E30A]00 <1> cmp byte [has_87], 0 2182 000020AF 7403 <1> je .notrn 2183 000020B1 E9EF08 <1> jmp dumpregsFPU 2184 <1> .notrn: 2185 <1> %endif 2186 000020B4 E95B84 <1> jmp error ; all other single characters are invalid 2187 <1> %endif 2188 <1> 2189 <1> %ifn _ONLYNON386 2190 <1> rrx: 2191 000020B7 AC <1> lodsb 2192 000020B8 E89498 <1> call chkeol 2193 000020BB 8036[7C00]01 <1> xoropt [options], dispregs32 2194 000020C0 BA[D45D] <1> mov dx, msg.regs386 2195 000020C3 E82A9D <1> call putsz 2196 000020C6 BA[EB5D] <1> mov dx, msg.regs386_on 2197 000020C9 F606[7C00]01 <1> testopt [options], dispregs32 2198 000020CE 7503 <1> jnz .on 2199 000020D0 BA[E75D] <1> mov dx, msg.regs386_off 2200 <1> .on: 2201 000020D3 E91A9D <1> jmp putsz 2202 <1> %endif 2203 <1> 2204 <1> rr1: 2205 <1> lframe 2206 <1> lvar dword, offset 2207 <1> lvar word, segsel 2208 <1> lvar word, memsizestring 2209 <1> lvar word, ismem_high_size_low 2210 <1> lequ ?ismem_high_size_low, size 2211 <1> lequ ?ismem_high_size_low + 1, ismem 2212 <1> lvar word, hhtype_high_rrtype_low 2213 <1> lequ ?hhtype_high_rrtype_low, replace_rrtype 2214 <1> %define rrtype bp + ?replace_rrtype 2215 <1> lequ ?hhtype_high_rrtype_low + 1, hhtype 2216 <1> lvar word, replace_rrmask 2217 <1> %define rrmask bp + ?replace_rrmask 2218 <1> lvar word, hhoffset 2219 <1> lequ 16, namebufferlength 2220 <1> lvar ?namebufferlength, namebuffer 2221 000020D6 5589E58D66E0 <1> lenter 2222 000020DC 89E7 <1> mov di, sp ; -> ?namebuffer 2223 000020DE E8578E <1> call isvariable?.return_name 2224 000020E1 7203E93501 <1> jnc rr1_variable 2225 <1> 2226 000020E6 4E <1> dec si 2227 000020E7 BA[E766] <1> mov dx, msg.byte 2228 000020EA BB0101 <1> mov bx, 101h 2229 000020ED 52 <1> push dx 2230 000020EE E8EA97 <1> call isstring? 2231 000020F1 7428 <1> je rr1_memory 2232 000020F3 5A <1> pop dx 2233 000020F4 BA[E166] <1> mov dx, msg.word 2234 000020F7 43 <1> inc bx ; = 102h 2235 000020F8 52 <1> push dx 2236 000020F9 E8DF97 <1> call isstring? 2237 000020FC 741D <1> je rr1_memory 2238 000020FE 5A <1> pop dx 2239 000020FF BA[E666] <1> mov dx, msg.3byte 2240 00002102 43 <1> inc bx ; = 103h 2241 00002103 52 <1> push dx 2242 00002104 E8D497 <1> call isstring? 2243 00002107 7412 <1> je rr1_memory 2244 00002109 5A <1> pop dx 2245 0000210A BA[E066] <1> mov dx, msg.dword 2246 0000210D 43 <1> inc bx ; = 104h 2247 0000210E 52 <1> push dx 2248 0000210F E8C997 <1> call isstring? 2249 00002112 7407 <1> je rr1_memory 2250 <1> ; pop dx 2251 00002114 89EC5D <1> lleave code 2252 00002117 AC <1> lodsb 2253 00002118 E92703 <1> jmp rr2 2254 <1> 2255 <1> rr1_memory: 2256 0000211B 8F46F8 <1> pop word [bp + ?memsizestring] 2257 0000211E 895EF6 <1> mov word [bp + ?ismem_high_size_low], bx 2258 <1> 2259 00002121 31C0 <1> xor ax, ax 2260 00002123 88D8 <1> mov al, bl 2261 00002125 F7D8 <1> neg ax 2262 00002127 05[A895] <1> add ax, masks + 4 ; 4 - size = offset into masks 2263 0000212A 8946F2 <1> mov word [rrmask], ax ; -> mask 2264 0000212D E83098 <1> call skipcomma 2265 00002130 3C5B <1> cmp al, '[' 2266 00002132 7403E9DB83 <1> jne error 2267 00002137 AC <1> lodsb 2268 00002138 8B1E[840C] <1> mov bx, word [reg_ds] 2269 0000213C E80D88 <1> call getaddrX 2270 0000213F 895EFA <1> mov word [bp + ?segsel], bx 2271 00002142 66 <1> _386_PM_o32 2272 00002143 8956FC <1> mov word [bp + ?offset], dx 2273 00002146 E81898 <1> call skipcomm0 2274 00002149 3C5D <1> cmp al, ']' 2275 0000214B 7403E9C283 <1> jne error 2276 <1> 2277 00002150 E80D98 <1> call skipcomma 2278 00002153 3C2E <1> cmp al, '.' ; special ? 2279 00002155 7405 <1> je short .writeprompt ; yes --> 2280 00002157 E8E097 <1> call iseol? 2281 0000215A 7566 <1> jne short .noprompt 2282 <1> .writeprompt: 2283 <1> ; si -> behind dot if any 2284 0000215C BF[0E08] <1> mov di, line_out 2285 0000215F 56 <1> push si 2286 00002160 8B76F8 <1> mov si, word [bp + ?memsizestring] 2287 <1> ; si -> size string (ASCIZ) 2288 00002163 A8 <1> db __TEST_IMM8 ; (skip stosb) 2289 <1> @@: 2290 00002164 AA <1> stosb ; store next byte 2291 00002165 AC <1> lodsb ; load next byte 2292 00002166 84C0 <1> test al, al ; is zero ? 2293 00002168 75FA <1> jnz @B ; not yet, loop --> 2294 0000216A 5E <1> pop si ; (preserve si) 2295 0000216B B8205B <1> mov ax, " [" 2296 0000216E AB <1> stosw 2297 0000216F 8B46FA <1> mov ax, word [bp + ?segsel] 2298 00002172 89C3 <1> mov bx, ax 2299 00002174 E8C398 <1> call hexword 2300 00002177 B03A <1> mov al, ':' 2301 00002179 AA <1> stosb 2302 0000217A 66 <1> _386_PM_o32 2303 0000217B 8B46FC <1> mov ax, word [bp + ?offset] 2304 <1> %if _PM 2305 0000217E E8E73B <1> call test_d_b_bit 2306 00002181 7403 <1> jz .16 2307 00002183 E8A898 <1> call hexword_high 2308 <1> .16: 2309 <1> %endif 2310 00002186 E8B198 <1> call hexword 2311 00002189 B85D20 <1> mov ax, "] " 2312 0000218C AB <1> stosw 2313 <1> 2314 0000218D E8C184 <1> call prephack 2315 00002190 E83700 <1> call rr1_read_mem_dxax 2316 <1> 2317 00002193 80F904 <1> cmp cl, 4 2318 00002196 7207 <1> jb .pnohigh 2319 00002198 92 <1> xchg ax, dx 2320 00002199 E89E98 <1> call hexword ; display high word 2321 0000219C 92 <1> xchg ax, dx 2322 0000219D EB0C <1> jmp @F 2323 <1> .pnohigh: 2324 0000219F 80F903 <1> cmp cl, 3 2325 000021A2 7207 <1> jb @F 2326 000021A4 86C2 <1> xchg al, dl 2327 000021A6 E89898 <1> call hexbyte 2328 000021A9 86C2 <1> xchg al, dl 2329 <1> @@: 2330 000021AB 80F902 <1> cmp cl, 2 2331 000021AE 7207 <1> jb .pnobyte 2332 000021B0 86C4 <1> xchg al, ah 2333 000021B2 E88C98 <1> call hexbyte ; display high byte 2334 000021B5 86C4 <1> xchg al, ah 2335 <1> .pnobyte: 2336 000021B7 E88798 <1> call hexbyte ; display low byte 2337 <1> 2338 000021BA E8FC03 <1> call dot_prompt 2339 000021BD 7503E9CC01 <1> je .return 2340 <1> .noprompt: 2341 000021C2 31C9 <1> xor cx, cx 2342 000021C4 8A4EF6 <1> mov cl, byte [bp + ?size] 2343 000021C7 E9B900 <1> jmp rr1_common 2344 <1> 2345 <1> 2346 <1> ; OUT: cl = ?size 2347 <1> ; dx:ax = value read from memory 2348 <1> ; CHG: bx 2349 <1> rr1_read_mem_dxax: 2350 000021CA E8B284 <1> call dohack 2351 000021CD 31C0 <1> xor ax, ax 2352 000021CF 31D2 <1> xor dx, dx 2353 000021D1 8A4EF6 <1> mov cl, byte [bp + ?size] 2354 <1> %if _PM 2355 000021D4 8B5EFA <1> mov bx, word [bp + ?segsel] 2356 000021D7 E88E3B <1> call test_d_b_bit 2357 000021DA 8EDB <1> mov ds, bx 2358 <1> %else 2359 <1> mov ds, word [bp + ?segsel] 2360 <1> %endif 2361 000021DC 66 <1> _386_PM_o32 2362 000021DD 8B5EFC <1> mov bx, word [bp + ?offset] 2363 <1> %if _PM 2364 000021E0 741D <1> jz .16 2365 <1> 2366 <1> [cpu 386] 2367 <1> .32: 2368 000021E2 80F902 <1> cmp cl, 2 2369 000021E5 7213 <1> jb .32_1 2370 000021E7 740D <1> je .32_2 2371 000021E9 80F904 <1> cmp cl, 4 2372 000021EC 7204 <1> jb .32_3 2373 <1> .32_4: 2374 000021EE 678A7303 <1> mov dh, byte [ebx + 3] 2375 <1> .32_3: 2376 000021F2 678A5302 <1> mov dl, byte [ebx + 2] 2377 <1> .32_2: 2378 000021F6 678A6301 <1> mov ah, byte [ebx + 1] 2379 <1> .32_1: 2380 000021FA 678A03 <1> mov al, byte [ebx] 2381 000021FD EB17 <1> jmp .ret 2382 <1> __CPU__ 2383 <1> %endif 2384 <1> 2385 <1> .16: 2386 000021FF 80F902 <1> cmp cl, 2 2387 00002202 7210 <1> jb .16_1 2388 00002204 740B <1> je .16_2 2389 00002206 80F904 <1> cmp cl, 4 2390 00002209 7203 <1> jb .16_3 2391 <1> .16_4: 2392 0000220B 8A7703 <1> mov dh, byte [bx + 3] 2393 <1> .16_3: 2394 0000220E 8A5702 <1> mov dl, byte [bx + 2] 2395 <1> .16_2: 2396 00002211 8A6701 <1> mov ah, byte [bx + 1] 2397 <1> .16_1: 2398 00002214 8A07 <1> mov al, byte [bx] 2399 <1> .ret: 2400 00002216 16 <1> push ss 2401 00002217 1F <1> pop ds 2402 00002218 E99884 <1> jmp unhack 2403 <1> 2404 <1> 2405 <1> rr1_variable: 2406 0000221B 897EF2 <1> mov word [rrmask], di ; -> mask of read-only bits 2407 0000221E 88C8 <1> mov al, cl 2408 00002220 B100 <1> mov cl, 0 2409 00002222 4E <1> dec si ; (to reload al) 2410 00002223 50 <1> push ax ; h = variable's field type, l = its size 2411 00002224 B400 <1> mov ah, 0 2412 00002226 8946F6 <1> mov word [bp + ?ismem_high_size_low], ax 2413 00002229 86CD <1> xchg cl, ch ; cx = variable's name's length 2414 <1> 2415 0000222B E83297 <1> call skipcomma 2416 0000222E 3C2E <1> cmp al, '.' ; special ? 2417 00002230 7405 <1> je short .writeprompt ; yes --> 2418 00002232 E80597 <1> call iseol? 2419 00002235 7542 <1> jne short .noprompt 2420 <1> .writeprompt: 2421 00002237 56 <1> push si ; -> behind dot if any 2422 00002238 8D76E0 <1> lea si, [bp + ?namebuffer] 2423 <1> ; -> name 2424 0000223B BF[0E08] <1> mov di, line_out 2425 0000223E F3A4 <1> rep movsb 2426 00002240 5E <1> pop si ; -> behind dot if any 2427 00002241 B020 <1> mov al, 32 2428 00002243 AA <1> stosb 2429 00002244 59 <1> pop cx ; h = variable's field type, l = its size 2430 00002245 87DA <1> xchg bx, dx 2431 00002247 8B07 <1> mov ax, word [bx] 2432 00002249 87DA <1> xchg bx, dx 2433 0000224B 51 <1> push cx 2434 0000224C 80F904 <1> cmp cl, 4 2435 0000224F 7205 <1> jb .pnohigh 2436 00002251 E8E697 <1> call hexword ; display high word 2437 00002254 EB08 <1> jmp @F 2438 <1> .pnohigh: 2439 00002256 80F903 <1> cmp cl, 3 2440 00002259 7203 <1> jb @F 2441 0000225B E8E397 <1> call hexbyte 2442 <1> @@: 2443 0000225E 8B07 <1> mov ax, word [bx] 2444 00002260 80F902 <1> cmp cl, 2 2445 00002263 7207 <1> jb .pnobyte 2446 00002265 86C4 <1> xchg al, ah 2447 00002267 E8D797 <1> call hexbyte ; display high byte 2448 0000226A 86C4 <1> xchg al, ah 2449 <1> .pnobyte: 2450 0000226C E8D297 <1> call hexbyte ; display low byte 2451 0000226F E84703 <1> call dot_prompt 2452 00002272 59 <1> pop cx ; h = variable's field type, l = its size 2453 00002273 7503E91601 <1> je .return 2454 00002278 A8 <1> db __TEST_IMM8 ; (skip pop) 2455 <1> .noprompt: 2456 00002279 59 <1> pop cx ; h = variable's field type, l = its size 2457 0000227A 84ED <1> test ch, ch 2458 0000227C 7403E91101 <1> jnz rr1_readonly 2459 00002281 53 <1> push bx 2460 00002282 52 <1> push dx 2461 <1> rr1_common: 2462 00002283 884EF4 <1> mov byte [rrtype], cl 2463 00002286 51 <1> push cx 2464 00002287 50 <1> push ax 2465 00002288 56 <1> push si 2466 00002289 E87387 <1> call isoperator? 2467 0000228C 750E <1> jne .nooperator 2468 0000228E 89CB <1> mov bx, cx 2469 00002290 01DB <1> add bx, bx ; bh = 0 ! 2470 00002292 50 <1> push ax 2471 00002293 FF97[D090] <1> call near [operatordispatchers+bx] 2472 00002297 58 <1> pop ax 2473 00002298 85DB <1> test bx, bx 2474 0000229A 7504 <1> jnz .gotoperator 2475 <1> .nooperator: 2476 0000229C BB1800 <1> mov bx, OPERATOR_RIGHTOP; set default computation function 2477 0000229F A8 <1> db __TEST_IMM8 2478 <1> .gotoperator: 2479 000022A0 AC <1> lodsb 2480 <1> 2481 000022A1 E83803 <1> call isassignmentoperator? 2482 000022A4 7317 <1> jnc .assign_op_done ; found an assignment operator --> 2483 000022A6 83FB18 <1> cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 2484 000022A9 7412 <1> je .assign_op_done ; yes, assignment operator not required --> 2485 000022AB 59 <1> pop cx 2486 000022AC 58 <1> pop ax ; restore al, si in front of operator 2487 000022AD 50 <1> push ax 2488 000022AE 51 <1> push cx 2489 000022AF 87F1 <1> xchg si, cx 2490 000022B1 51 <1> push cx 2491 000022B2 E84487 <1> call isunaryoperator? ; is this a valid unary operator too ? 2492 000022B5 59 <1> pop cx 2493 000022B6 74E4 <1> je .nooperator ; yes --> 2494 000022B8 87F1 <1> xchg si, cx 2495 <1> errorj9: equ $ 2496 000022BA E95582 <1> jmp error ; error where the assignment operator needs to be 2497 <1> .assign_op_done: 2498 000022BD 59 <1> pop cx 2499 000022BE 59 <1> pop cx 2500 000022BF 59 <1> pop cx 2501 000022C0 53 <1> push bx 2502 000022C1 80FB17 <1> cmp bl, OPERATOR_COND 2503 000022C4 7503E94982 <1> je error 2504 000022C9 E89596 <1> call skipcomm0 2505 <1> 2506 000022CC E86490 <1> call getexpression ; bx:dx = expression result 2507 000022CF 8866F5 <1> mov byte [bp + ?hhtype], ah 2508 000022D2 8976F0 <1> mov word [bp + ?hhoffset], si 2509 000022D5 E87796 <1> call chkeol 2510 000022D8 59 <1> pop cx ; operator computation function 2511 <1> 2512 000022D9 807EF700 <1> cmp byte [bp + ?ismem], 0 2513 000022DD 7419 <1> je .var_hhvar 2514 <1> 2515 <1> .mem_hhvar: 2516 000022DF 89C7 <1> mov di, ax 2517 000022E1 89D6 <1> mov si, dx 2518 000022E3 53 <1> push bx 2519 000022E4 51 <1> push cx 2520 000022E5 E8E2FE <1> call rr1_read_mem_dxax 2521 000022E8 59 <1> pop cx 2522 000022E9 5B <1> pop bx 2523 000022EA 52 <1> push dx 2524 000022EB 50 <1> push ax 2525 000022EC 89F8 <1> mov ax, di 2526 000022EE 89F2 <1> mov dx, si 2527 000022F0 BF[A495] <1> mov di, mask_4byte ; di -> zero 2528 000022F3 BE[A695] <1> mov si, mask_4byte + 2 ; si -> zero 2529 <1> 2530 000022F6 EB06 <1> jmp .common_hhvar 2531 <1> 2532 <1> .var_hhvar: 2533 000022F8 5E <1> pop si ; si-> high word 2534 000022F9 5F <1> pop di ; di-> low word 2535 000022FA FF34 <1> push word [si] 2536 000022FC FF35 <1> push word [di] 2537 <1> 2538 <1> .common_hhvar: 2539 000022FE 8F06[C495] <1> pop word [hhvar] 2540 00002302 8F06[C695] <1> pop word [hhvar+2] ; save variable's current value (as left operand) 2541 <1> 2542 00002306 C606[CD95]00 <1> mov byte [hhtype], 0 ; type info signed=0 pointer=0 2543 0000230B 807EF404 <1> cmp byte [rrtype], 4 2544 0000230F 7317 <1> jae .cleardword 2545 00002311 807EF402 <1> cmp byte [rrtype], 2 2546 00002315 770C <1> ja .clearthreebyte 2547 00002317 7405 <1> je .clearword 2548 <1> .clearbyte: 2549 00002319 C606[C595]00 <1> mov byte [hhvar + 1], 0 ; clear second byte 2550 <1> .clearword: 2551 0000231E C606[C695]00 <1> mov byte [hhvar + 2], 0 ; clear third byte 2552 <1> .clearthreebyte: 2553 00002323 C606[C795]00 <1> mov byte [hhvar + 3], 0 ; clear fourth byte 2554 <1> .cleardword: 2555 00002328 87CB <1> xchg cx, bx 2556 0000232A 01DB <1> add bx, bx 2557 0000232C 8B9F[1091] <1> mov bx, word [bx + operatorfunctions] 2558 00002330 87CB <1> xchg cx, bx ; cx = operator function 2559 00002332 8A66F5 <1> mov ah, byte [bp + ?hhtype] 2560 00002335 FFD1 <1> call cx ; compute 2561 <1> 2562 00002337 E8FF93 <1> call getexpression.countsignificantbits 2563 0000233A 53 <1> push bx 2564 0000233B 56 <1> push si 2565 0000233C 31DB <1> xor bx, bx 2566 0000233E 8A5EF4 <1> mov bl, byte [rrtype] 2567 00002341 01DB <1> add bx, bx 2568 00002343 8B76F0 <1> mov si, word [bp + ?hhoffset] 2569 00002346 FF97[F882] <1> call near word [checksignificantbits_table + bx] 2570 0000234A 5E <1> pop si 2571 0000234B 5B <1> pop bx 2572 <1> 2573 0000234C 97 <1> xchg ax, di ; ax -> low word of variable 2574 0000234D 8B7EF2 <1> mov di, word [rrmask] ; di -> mask dword 2575 00002350 53 <1> push bx ; use bx as a scratch space 2576 00002351 8B0D <1> mov cx, word [di] ; = low word of mask 2577 00002353 51 <1> push cx ; preserve low word of mask 2578 00002354 97 <1> xchg ax, di ; di -> low word of variable 2579 00002355 230D <1> and cx, word [di] ; cx = low word value to preserve 2580 00002357 5B <1> pop bx ; = low word of mask 2581 00002358 F7D3 <1> not bx ; = bitmask of bits to use from result 2582 0000235A 21DA <1> and dx, bx ; dx = bits to use from result low word 2583 0000235C 09CA <1> or dx, cx ; dx = low word compound 2584 0000235E 5B <1> pop bx ; restore high word after scratch use 2585 0000235F 97 <1> xchg ax, di ; di -> mask dword 2586 00002360 52 <1> push dx ; use dx as a scratch space 2587 00002361 8B4D02 <1> mov cx, word [di + 2] ; = high word of mask 2588 00002364 51 <1> push cx ; preserve high word of mask 2589 00002365 230C <1> and cx, word [si] ; cx = high word value to preserve 2590 00002367 5A <1> pop dx ; = high word of mask 2591 00002368 F7D2 <1> not dx ; = bitmask of bits to use from result 2592 0000236A 21D3 <1> and bx, dx ; bx = bits to use from result high word 2593 0000236C 09CB <1> or bx, cx 2594 0000236E 5A <1> pop dx ; restore low word after scratch use 2595 0000236F 97 <1> xchg ax, di ; di -> low word of variable 2596 <1> 2597 00002370 807EF700 <1> cmp byte [bp + ?ismem], 0 2598 00002374 7524 <1> jne rr1_mem_set 2599 <1> 2600 <1> .var_set: 2601 00002376 807EF402 <1> cmp byte [rrtype], 2 2602 0000237A 7210 <1> jb .setbyte 2603 0000237C 740B <1> je .setword 2604 0000237E 807EF404 <1> cmp byte [rrtype], 4 2605 00002382 7203 <1> jb .setthreebyte 2606 <1> .setdword: 2607 00002384 887C01 <1> mov byte [si + 1], bh ; set fourth byte 2608 <1> .setthreebyte: 2609 00002387 881C <1> mov byte [si], bl ; set third byte 2610 <1> .setword: 2611 00002389 887501 <1> mov byte [di + 1], dh ; set second byte 2612 <1> .setbyte: 2613 0000238C 8815 <1> mov byte [di], dl ; set first byte 2614 <1> .return: 2615 <1> rr1_memory.return: 2616 <1> rr1_variable.return: 2617 0000238E 89EC5D <1> lleave code 2618 <1> rr1b: 2619 00002391 C3 <1> retn 2620 <1> 2621 <1> 2622 <1> rr1_readonly: 2623 00002392 BA[AC5C] <1> mov dx, msg.readonly 2624 00002395 E8529A <1> call putsz_error 2625 00002398 EBF4 <1> jmp rr1_variable.return 2626 <1> 2627 <1> 2628 <1> rr1_mem_set: 2629 0000239A 89D0 <1> mov ax, dx 2630 0000239C 89DA <1> mov dx, bx 2631 <1> 2632 0000239E E8DE82 <1> call dohack 2633 000023A1 8A4EF6 <1> mov cl, byte [bp + ?size] 2634 <1> %if _PM 2635 000023A4 8B5EFA <1> mov bx, word [bp + ?segsel] 2636 000023A7 E81475 <1> call verifysegm 2637 000023AA 7303E98700 <1> jc .ro 2638 000023AF E8B639 <1> call test_d_b_bit 2639 000023B2 8EDB <1> mov ds, bx 2640 <1> %else 2641 <1> mov ds, word [bp + ?segsel] 2642 <1> %endif 2643 000023B4 66 <1> _386_PM_o32 2644 000023B5 8B5EFC <1> mov bx, word [bp + ?offset] 2645 <1> %if _PM 2646 000023B8 7440 <1> jz .16 2647 <1> 2648 <1> [cpu 386] 2649 <1> .32: 2650 000023BA 80F902 <1> cmp cl, 2 2651 000023BD 7213 <1> jb .32_1 2652 000023BF 740D <1> je .32_2 2653 000023C1 80F904 <1> cmp cl, 4 2654 000023C4 7204 <1> jb .32_3 2655 <1> .32_4: 2656 000023C6 67887303 <1> mov byte [ebx + 3], dh 2657 <1> .32_3: 2658 000023CA 67885302 <1> mov byte [ebx + 2], dl 2659 <1> .32_2: 2660 000023CE 67886301 <1> mov byte [ebx + 1], ah 2661 <1> .32_1: 2662 000023D2 678803 <1> mov byte [ebx], al 2663 <1> 2664 <1> .32_check: 2665 000023D5 80F902 <1> cmp cl, 2 2666 000023D8 7219 <1> jb .32_check_1 2667 000023DA 7411 <1> je .32_check_2 2668 000023DC 80F904 <1> cmp cl, 4 2669 000023DF 7206 <1> jb .32_check_3 2670 <1> .32_check_4: 2671 000023E1 673A7303 <1> cmp dh, byte [ebx + 3] 2672 000023E5 754F <1> jne .ro 2673 <1> .32_check_3: 2674 000023E7 673A5302 <1> cmp dl, byte [ebx + 2] 2675 000023EB 7549 <1> jne .ro 2676 <1> .32_check_2: 2677 000023ED 673A6301 <1> cmp ah, byte [ebx + 1] 2678 000023F1 7543 <1> jne .ro 2679 <1> .32_check_1: 2680 000023F3 673A03 <1> cmp al, byte [ebx] 2681 000023F6 753E <1> jne .ro 2682 000023F8 EB36 <1> jmp .ret 2683 <1> __CPU__ 2684 <1> %endif 2685 <1> 2686 <1> .16: 2687 000023FA 80F902 <1> cmp cl, 2 2688 000023FD 7210 <1> jb .16_1 2689 000023FF 740B <1> je .16_2 2690 00002401 80F904 <1> cmp cl, 4 2691 00002404 7203 <1> jb .16_3 2692 <1> .16_4: 2693 00002406 887703 <1> mov byte [bx + 3], dh 2694 <1> .16_3: 2695 00002409 885702 <1> mov byte [bx + 2], dl 2696 <1> .16_2: 2697 0000240C 886701 <1> mov byte [bx + 1], ah 2698 <1> .16_1: 2699 0000240F 8807 <1> mov byte [bx], al 2700 <1> 2701 <1> .16_check: 2702 00002411 80F902 <1> cmp cl, 2 2703 00002414 7216 <1> jb .16_check_1 2704 00002416 740F <1> je .16_check_2 2705 00002418 80F904 <1> cmp cl, 4 2706 0000241B 7205 <1> jb .16_check_3 2707 <1> .16_check_4: 2708 0000241D 3A7703 <1> cmp dh, byte [bx + 3] 2709 00002420 7514 <1> jne .ro 2710 <1> .16_check_3: 2711 00002422 3A5702 <1> cmp dl, byte [bx + 2] 2712 00002425 750F <1> jne .ro 2713 <1> .16_check_2: 2714 00002427 3A6701 <1> cmp ah, byte [bx + 1] 2715 0000242A 750A <1> jne .ro 2716 <1> .16_check_1: 2717 0000242C 3A07 <1> cmp al, byte [bx] 2718 0000242E 7506 <1> jne .ro 2719 <1> .ret: 2720 00002430 E86168 <1> call ee0a 2721 00002433 E958FF <1> jmp rr1_memory.return 2722 <1> 2723 <1> .ro: 2724 00002436 E85B68 <1> call ee0a 2725 00002439 BA[E15C] <1> mov dx, msg.readonly_mem 2726 0000243C E8AB99 <1> call putsz_error 2727 0000243F E94CFF <1> jmp rr1_memory.return 2728 <1> 2729 <1> lleave ctx 2730 <1> 2731 <1> 2732 <1> usesection lDEBUG_DATA_ENTRY 2733 000082F7 00 <1> align 2, db 0 2734 <1> checksignificantbits_table: 2735 000082F8 [12A5] <1> dw error 2736 000082FA [30B8] <1> dw getbyte.checksignificantbits 2737 000082FC [1EB8] <1> dw getword.checksignificantbits 2738 000082FE [10B8] <1> dw get3byte.checksignificantbits 2739 00008300 [1404] <1> dw dmycmd 2740 <1> 2741 <1> usesection lDEBUG_CODE 2742 <1> 2743 <1> 2744 <1> ; Change flag register with mnemonics - F 2745 <1> rr2: 2746 00002442 E8FE67 <1> call uppercase 2747 00002445 3C46 <1> cmp al, 'F' 2748 00002447 7403E99B00 <1> jne rr3 ; if not 'F' --> 2749 0000244C 50 <1> push ax 2750 0000244D 8A04 <1> mov al, byte [si] 2751 0000244F E8C385 <1> call isseparator? ; valid separator ? 2752 00002452 58 <1> pop ax 2753 00002453 7403E98F00 <1> jne rr3 ; no --> 2754 <1> .ef: 2755 00002458 E80595 <1> call skipcomma 2756 0000245B 3C2E <1> cmp al, '.' ; special ? 2757 0000245D 7405 <1> je .writeprompt ; yes --> 2758 0000245F E8D894 <1> call iseol? ; end of line ? 2759 00002462 7512 <1> jne .noprompt ; no --> 2760 <1> .writeprompt: 2761 00002464 800E[A600]02 <1> setopt [internalflags3], dif3_do_not_highlight 2762 00002469 56 <1> push si 2763 0000246A E89206 <1> call dmpflags 2764 0000246D 5E <1> pop si ; -> behind dot if any 2765 0000246E E84801 <1> call dot_prompt 2766 00002471 7503E91BFF <1> je rr1b ; if no change 2767 <1> .noprompt: 2768 <1> 2769 00002476 E86301 <1> call isassignmentoperator? 2770 00002479 56 <1> push si 2771 0000247A 7308 <1> jnc .noteol ; at least one value is required --> 2772 <1> .check_loop: 2773 0000247C E8E294 <1> call skipcomm0 2774 0000247F E8B894 <1> call iseol? 2775 00002482 7420 <1> je .really ; return if done 2776 <1> .noteol: 2777 00002484 E8BC67 <1> call uppercase 2778 00002487 86C4 <1> xchg al, ah 2779 00002489 AC <1> lodsb 2780 0000248A E8B667 <1> call uppercase 2781 0000248D 86C4 <1> xchg al, ah ; ax = mnemonic 2782 0000248F BF[1C80] <1> mov di, flagson 2783 00002492 B91000 <1> mov cx, 16 2784 00002495 F2AF <1> repne scasw 2785 00002497 7507 <1> jne short .errordec ; if no match 2786 00002499 AC <1> lodsb 2787 0000249A E87885 <1> call isseparator? 2788 0000249D 74DD <1> je .check_loop 2789 <1> .errordec2: 2790 0000249F 4E <1> dec si 2791 <1> .errordec: 2792 <1> errordec: equ $ 2793 000024A0 4E <1> dec si ; back up one before flagging an error 2794 000024A1 E96E80 <1> jmp error 2795 <1> 2796 <1> .really: 2797 000024A4 5E <1> pop si 2798 000024A5 4E <1> dec si 2799 000024A6 AC <1> lodsb 2800 <1> .loop: 2801 000024A7 E89094 <1> call iseol? 2802 000024AA 7503E9E2FE <1> je rr1b ; return if done 2803 <1> 2804 000024AF E89167 <1> call uppercase 2805 000024B2 86C4 <1> xchg al, ah 2806 000024B4 AC <1> lodsb 2807 000024B5 E88B67 <1> call uppercase 2808 000024B8 86C4 <1> xchg al, ah ; ax = mnemonic 2809 <1> 2810 000024BA BF[1C80] <1> mov di, flagson 2811 000024BD B91000 <1> mov cx, 16 2812 000024C0 F2AF <1> repne scasw 2813 000024C2 75DC <1> jne short .errordec ; if no match 2814 000024C4 81FF[2C80] <1> cmp di, flagsoff 2815 000024C8 7709 <1> ja .clear ; if we're clearing 2816 000024CA 8B45EE <1> mov ax, word [di-(flagson-flagbits)-2] 2817 000024CD 0906[A00C] <1> or word [reg_efl], ax ; set the bit 2818 000024D1 EB09 <1> jmp short .common 2819 <1> .clear: 2820 000024D3 8B45DE <1> mov ax, word [di-(flagsoff-flagbits)-2] 2821 000024D6 F7D0 <1> not ax 2822 000024D8 2106[A00C] <1> and word [reg_efl], ax ; clear the bit 2823 <1> .common: 2824 000024DC AC <1> lodsb 2825 000024DD E83585 <1> call isseparator? 2826 000024E0 75BD <1> jne short .errordec2 2827 000024E2 E87C94 <1> call skipcomm0 2828 000024E5 EBC0 <1> jmp short .loop 2829 <1> 2830 <1> ; Change flag register with mnemonics - EF 2831 <1> rr3: 2832 000024E7 86C4 <1> xchg al, ah 2833 000024E9 AC <1> lodsb 2834 000024EA E85667 <1> call uppercase 2835 000024ED 86C4 <1> xchg al, ah ; ax = next two characters 2836 000024EF 3D4546 <1> _386 cmp ax, "EF" 2837 000024F2 750B <1> _386 jne rr4 ; if not "EF" --> 2838 000024F4 50 <1> _386 push ax 2839 000024F5 8A04 <1> _386 mov al, byte [si] 2840 000024F7 E81B85 <1> _386 call isseparator? ; valid separator ? 2841 000024FA 58 <1> _386 pop ax 2842 000024FB 0F8459FF <1> _386 je rr2.ef 2843 <1> 2844 <1> ; Change a single flag with mnemonic 2845 <1> rr4: 2846 000024FF BF[3C80] <1> mov di, flagnames 2847 00002502 B90800 <1> mov cx, 8 2848 00002505 F2AF <1> repne scasw 2849 00002507 7597 <1> jne short rr2.errordec 2850 00002509 89C2 <1> mov dx, ax 2851 0000250B AC <1> lodsb 2852 0000250C E80685 <1> call isseparator? 2853 0000250F 758E <1> jne short rr2.errordec2 2854 00002511 FF75CE <1> push word [di-(flagnames-flagbits)-2] 2855 00002514 E84A94 <1> call skipcomm0 2856 00002517 3C2E <1> cmp al, '.' ; special ? 2857 00002519 7405 <1> je .writeprompt ; yes --> 2858 0000251B E81C94 <1> call iseol? 2859 0000251E 7519 <1> jne .noprompt 2860 <1> .writeprompt: 2861 00002520 BF[0E08] <1> mov di, line_out 2862 00002523 89D0 <1> mov ax, dx 2863 00002525 AB <1> stosw 2864 00002526 58 <1> pop ax 2865 00002527 50 <1> push ax 2866 00002528 8506[A00C] <1> test word [reg_efl], ax ; is it off ? 2867 0000252C B82030 <1> mov ax, " 0" ; assume so 2868 0000252F 7402 <1> jz .off ; it is off --> 2869 00002531 FEC4 <1> inc ah ; is on, set to '1' 2870 <1> .off: 2871 00002533 AB <1> stosw 2872 00002534 E88200 <1> call dot_prompt 2873 00002537 747E <1> je .ret_pop ; if no change --> 2874 <1> .noprompt: 2875 00002539 E8FE93 <1> call iseol? ; end of line ? 2876 0000253C 7479 <1> je .ret_pop ; yes, no change requested --> 2877 0000253E 51 <1> push cx 2878 0000253F 50 <1> push ax 2879 00002540 56 <1> push si 2880 00002541 E8BB84 <1> call isoperator? 2881 00002544 7520 <1> jne .nooperator 2882 00002546 89CB <1> mov bx, cx 2883 00002548 01DB <1> add bx, bx ; bh = 0 ! 2884 0000254A 50 <1> push ax 2885 0000254B FF97[D090] <1> call near [operatordispatchers+bx] 2886 0000254F 58 <1> pop ax 2887 00002550 85DB <1> test bx, bx 2888 00002552 7412 <1> jz .nooperator 2889 00002554 80FB16 <1> cmp bl, OPERATOR_BOOL_AND 2890 00002557 770D <1> ja .nooperator 2891 00002559 80FB14 <1> cmp bl, OPERATOR_BOOL_OR 2892 0000255C 730C <1> jae .gotoperator 2893 0000255E 80C303 <1> add bl, OPERATOR_BOOL_OR - OPERATOR_BIT_OR 2894 00002561 80FB14 <1> cmp bl, OPERATOR_BOOL_OR 2895 00002564 7304 <1> jae .gotoperator 2896 <1> .nooperator: 2897 00002566 BB1800 <1> mov bx, OPERATOR_RIGHTOP; set default computation function 2898 00002569 A8 <1> db __TEST_IMM8 2899 <1> .gotoperator: 2900 0000256A AC <1> lodsb 2901 <1> 2902 0000256B E86E00 <1> call isassignmentoperator? 2903 0000256E 7308 <1> jnc .assign_op_done ; found an assignment operator --> 2904 00002570 83FB18 <1> cmp bx, OPERATOR_RIGHTOP; dummy (no operator specified) ? 2905 <1> %if 1 ; since | ^ & are never unary operators 2906 00002573 7403E99A7F <1> jne error 2907 <1> %else 2908 <1> je .assign_op_done ; yes, assignment operator not required --> 2909 <1> pop cx 2910 <1> pop ax ; restore al, si in front of operator 2911 <1> push ax 2912 <1> push cx 2913 <1> xchg si, cx 2914 <1> push cx 2915 <1> call isunaryoperator? ; is this a valid unary operator too ? 2916 <1> pop cx 2917 <1> je .nooperator ; yes --> 2918 <1> xchg si, cx 2919 <1> jmp error ; error where the assignment operator needs to be 2920 <1> %endif 2921 <1> .assign_op_done: 2922 00002578 59 <1> pop cx 2923 00002579 59 <1> pop cx 2924 0000257A 59 <1> pop cx 2925 0000257B 53 <1> push bx 2926 0000257C E8B48D <1> call getexpression 2927 0000257F E8CD93 <1> call chkeol 2928 00002582 E8C087 <1> call toboolean 2929 00002585 59 <1> pop cx ; operator index 2930 00002586 31C0 <1> xor ax, ax 2931 00002588 A2[CD95] <1> mov byte [hhtype], al 2932 0000258B A3[C695] <1> mov word [hhvar+2], ax 2933 0000258E 5E <1> pop si 2934 0000258F 56 <1> push si ; flag 2935 00002590 8536[A00C] <1> test word [reg_efl], si 2936 00002594 7401 <1> jz .notset 2937 00002596 40 <1> inc ax 2938 <1> .notset: 2939 00002597 A3[C495] <1> mov word [hhvar], ax 2940 0000259A 87CB <1> xchg cx, bx 2941 0000259C 01DB <1> add bx, bx 2942 0000259E 8B9F[1091] <1> mov bx, word [bx+operatorfunctions] 2943 000025A2 87CB <1> xchg cx, bx ; cx = operator function 2944 000025A4 FFD1 <1> call cx ; compute 2945 000025A6 58 <1> pop ax 2946 000025A7 85D2 <1> test dx, dx 2947 000025A9 7405 <1> jz .clear 2948 000025AB 0906[A00C] <1> or word [reg_efl], ax ; set the bit 2949 000025AF C3 <1> retn 2950 <1> .clear: 2951 000025B0 F7D0 <1> not ax 2952 000025B2 2106[A00C] <1> and word [reg_efl], ax ; clear the bit 2953 000025B6 C3 <1> retn 2954 <1> 2955 <1> .ret_pop: 2956 000025B7 58 <1> pop ax 2957 000025B8 C3 <1> retn 2958 <1> 2959 <1> 2960 <1> ; INP: di-> behind prompt to display (in line_out) 2961 <1> ; Iff byte[si-1] == '.', 2962 <1> ; only display without actual prompting 2963 <1> ; si-> line to check for EOL 2964 <1> ; OUT: NZ iff actually prompted and got non-empty line, 2965 <1> ; al = first character 2966 <1> ; si-> next character 2967 <1> ; dx, bx preserved 2968 <1> ; CHG: ax, cx, si, di, dx, bx 2969 <1> dot_prompt: 2970 000025B9 807CFF2E <1> cmp byte [si-1], '.' ; syntax for display without prompt ? 2971 000025BD 7414 <1> je .onlydisplay ; yes --> 2972 000025BF 53 <1> push bx 2973 000025C0 52 <1> push dx 2974 000025C1 E8DA9B <1> call getline0 2975 000025C4 5A <1> pop dx 2976 000025C5 5B <1> pop bx 2977 000025C6 E87193 <1> call iseol? ; no change requested ? 2978 000025C9 7410 <1> je .ret ; yes --> (ZR) 2979 000025CB 3C2E <1> cmp al, '.' ; other syntax for no change ? 2980 000025CD 750C <1> jne .ret ; no --> (NZ) 2981 <1> .chkeol1: 2982 000025CF AC <1> lodsb 2983 000025D0 E97C93 <1> jmp chkeol ; (ZR) 2984 <1> 2985 <1> .onlydisplay: 2986 000025D3 E8F9FF <1> call .chkeol1 2987 000025D6 E89994 <1> call putsline_crlf 2988 000025D9 38C0 <1> cmp al, al ; ZR 2989 <1> .ret: 2990 000025DB C3 <1> retn 2991 <1> 2992 <1> 2993 <1> ; INP: al = first character 2994 <1> ; si-> remaining string 2995 <1> ; OUT: CY if no assignment operator was found 2996 <1> ; NC if an assignment operator was found, 2997 <1> ; al = first character behind it (skipcomma called) 2998 <1> ; si-> remaining string behind character al 2999 <1> isassignmentoperator?: 3000 000025DC 3C3A <1> cmp al, ':' 3001 000025DE 750A <1> jne .checksingleequality 3002 000025E0 AC <1> lodsb 3003 000025E1 3C3D <1> cmp al, '=' 3004 000025E3 7409 <1> je .skip ; long form assignment operator --> 3005 <1> ; A single colon. Report "no assignment operator" here. 3006 000025E5 4E <1> dec si 3007 000025E6 B03A <1> mov al, ':' ; restore si, al 3008 <1> .return_cy: 3009 000025E8 F9 <1> stc 3010 000025E9 C3 <1> retn 3011 <1> 3012 <1> .checksingleequality: 3013 000025EA 3C3D <1> cmp al, '=' 3014 000025EC 75FA <1> jne .return_cy ; no assignment operator --> 3015 <1> .skip: 3016 000025EE E86F93 <1> call skipcomma 3017 000025F1 F8 <1> clc 3018 000025F2 C3 <1> retn 3019 <1> 3020 <1> 3021 <1> ; INP: al = '.' 3022 <1> ; si -> next character 3023 <1> re_cmd: 3024 000025F3 5B <1> pop bx 3025 000025F4 5B <1> pop bx ; discard si and ax on stack 3026 000025F5 BA[6470] <1> mov dx, msg.list 3027 000025F8 E8E092 <1> call isstring? 3028 000025FB 7503E98900 <1> je .list 3029 <1> 3030 00002600 E82CDF <1> call guard_re 3031 00002603 BF[E401] <1> mov di, re_buffer 3032 <1> 3033 00002606 BA[D966] <1> mov dx, msg.append 3034 00002609 E8CF92 <1> call isstring? 3035 0000260C 740D <1> je .append 3036 0000260E BA[D166] <1> mov dx, msg.replace 3037 00002611 E8C792 <1> call isstring? 3038 00002614 740D <1> je .common ; di -> at first byte (where to append) 3039 00002616 B80401 <1> mov ax, 0104h 3040 00002619 EB68 <1> jmp .error_common 3041 <1> 3042 <1> .append: 3043 0000261B 30C0 <1> xor al, al 3044 0000261D B9FFFF <1> mov cx, -1 3045 00002620 F2AE <1> repne scasb ; di -> after zero byte 3046 00002622 4F <1> dec di ; -> at zero byte 3047 <1> 3048 <1> .common: 3049 00002623 E86993 <1> call skipwhite 3050 00002626 E8EADE <1> call guard_auxbuff 3051 <1> 3052 00002629 31DB <1> xor bx, bx 3053 <1> 3054 0000262B 50 <1> push ax 3055 0000262C B00D <1> mov al, 13 3056 0000262E 3845FF <1> cmp byte [di - 1], al ; is there an EOL in front of us? 3057 00002631 8E06[F209] <1> mov es, word [auxbuff_segorsel] 3058 00002635 87DF <1> xchg bx, di ; es:di -> auxbuff, bx -> at zero byte 3059 00002637 7401 <1> je @F ; yes --> 3060 <1> 3061 00002639 AA <1> stosb ; first store a CR 3062 <1> @@: 3063 0000263A 58 <1> pop ax 3064 <1> .loop: 3065 0000263B 3C5C <1> cmp al, '\' 3066 0000263D 750A <1> jne .literal 3067 <1> 3068 0000263F AC <1> lodsb ; load escaped character 3069 00002640 E8FB92 <1> call iseol?.notsemicolon; EOL ? 3070 00002643 7436 <1> je .error_escaped_cr ; yes, error --> 3071 00002645 AA <1> stosb ; store escaped literal 3072 00002646 AC <1> lodsb ; load next 3073 00002647 EBF2 <1> jmp .loop 3074 <1> 3075 <1> .literal: 3076 00002649 E8F292 <1> call iseol?.notsemicolon; EOL ? 3077 0000264C 7410 <1> je .end ; got all --> 3078 0000264E 3C3B <1> cmp al, ';' ; semicolon ? 3079 00002650 7508 <1> jne @F 3080 00002652 B00D <1> mov al, 13 3081 00002654 AA <1> stosb ; store linebreak 3082 00002655 E83793 <1> call skipwhite ; skip leading blanks 3083 00002658 EBE1 <1> jmp .loop 3084 <1> 3085 <1> @@: 3086 0000265A AA <1> stosb ; store character 3087 0000265B AC <1> lodsb 3088 0000265C EBDD <1> jmp .loop 3089 <1> 3090 <1> .end: 3091 <1> ; di -> behind last character 3092 0000265E 31C0 <1> xor ax, ax 3093 00002660 AA <1> stosb 3094 00002661 89D8 <1> mov ax, bx 3095 00002663 01F8 <1> add ax, di 3096 00002665 7219 <1> jc .error_too_much 3097 00002667 3D[E409] <1> cmp ax, re_buffer.end 3098 0000266A 7714 <1> ja .error_too_much 3099 0000266C 31F6 <1> xor si, si 3100 0000266E 06 <1> push es 3101 0000266F 1F <1> pop ds 3102 00002670 16 <1> push ss 3103 00002671 07 <1> pop es 3104 00002672 89F9 <1> mov cx, di 3105 00002674 89DF <1> mov di, bx 3106 00002676 F3A4 <1> rep movsb 3107 00002678 16 <1> push ss 3108 00002679 1F <1> pop ds 3109 0000267A C3 <1> retn 3110 <1> 3111 <1> .error_escaped_cr: 3112 0000267B B80501 <1> mov ax, 0105h 3113 0000267E EB03 <1> jmp .error_common 3114 <1> 3115 <1> .error_too_much: 3116 00002680 B80601 <1> mov ax, 0106h 3117 <1> 3118 <1> .error_common: 3119 00002683 E8D37E <1> call setrc 3120 00002686 E9897E <1> jmp error 3121 <1> 3122 <1> re_cmd.list: 3123 00002689 AC <1> lodsb 3124 0000268A E8C292 <1> call chkeol 3125 <1> 3126 0000268D BE[E401] <1> mov si, re_buffer 3127 00002690 B400 <1> mov ah, 0 ; ah = 0 (flag to escape blanks) 3128 <1> .loop: 3129 00002692 AC <1> lodsb 3130 00002693 84C0 <1> test al, al 3131 00002695 7442 <1> jz .end 3132 00002697 3C0D <1> cmp al, 13 ; (intentionally not iseol?) 3133 00002699 742E <1> je .cr 3134 0000269B 3C20 <1> cmp al, 32 3135 0000269D 741B <1> je .escapeif 3136 0000269F 3C09 <1> cmp al, 9 3137 000026A1 7417 <1> je .escapeif 3138 000026A3 B401 <1> mov ah, 1 ; ah = 1 3139 000026A5 3C3B <1> cmp al, ';' 3140 000026A7 7417 <1> je .escape 3141 000026A9 3C22 <1> cmp al, '"' 3142 000026AB 7413 <1> je .escape 3143 000026AD 3C27 <1> cmp al, "'" 3144 000026AF 740F <1> je .escape 3145 000026B1 3C5C <1> cmp al, '\' 3146 000026B3 740B <1> je .escape 3147 <1> .put: 3148 000026B5 E85B97 <1> call putc 3149 000026B8 EBD8 <1> jmp .loop 3150 <1> 3151 <1> .escapeif: 3152 000026BA 84E4 <1> test ah, ah 3153 000026BC 75F7 <1> jnz .put 3154 000026BE B401 <1> mov ah, 1 ; ah = 1 3155 <1> .escape: 3156 000026C0 50 <1> push ax 3157 000026C1 B05C <1> mov al, '\' 3158 000026C3 E84D97 <1> call putc 3159 000026C6 58 <1> pop ax 3160 000026C7 EBEC <1> jmp .put 3161 <1> 3162 <1> .cr: 3163 000026C9 AC <1> lodsb 3164 000026CA 84C0 <1> test al, al 3165 000026CC 740B <1> jz .end 3166 000026CE 4E <1> dec si 3167 000026CF B03B <1> mov al, ';' 3168 000026D1 E83F97 <1> call putc 3169 000026D4 B82000 <1> mov ax, 32 ; ah = 0 3170 000026D7 EBDC <1> jmp .put 3171 <1> 3172 <1> .end: 3173 000026D9 B00D <1> mov al, 13 3174 000026DB E83597 <1> call putc 3175 000026DE B00A <1> mov al, 10 3176 000026E0 E93097 <1> jmp putc 3177 <1> 3178 <1> 3179 <1> dumpregs_extended: 3180 000026E3 E849DE <1> call guard_re 3181 000026E6 813E[E401]4052 <1> cmp word [re_buffer], "@R" 3182 000026EC 7408 <1> je @F 3183 000026EE 813E[E401]4072 <1> cmp word [re_buffer], "@r" 3184 000026F4 750A <1> jne .complex 3185 <1> @@: 3186 000026F6 803E[E601]00 <1> cmp byte [re_buffer + 2], 0 3187 000026FB 7503E98E00 <1> je .just_dumpregs 3188 <1> 3189 <1> .complex: 3190 00002700 F606[A700]20 <1> testopt [internalflags3], dif3_auxbuff_guarded_2 3191 00002705 740C <1> jz @F 3192 <1> 3193 00002707 B80301 <1> mov ax, 0103h 3194 0000270A E84C7E <1> call setrc 3195 0000270D BA[8066] <1> mov dx, msg.unexpected_auxbuff_guard 3196 00002710 E9DD96 <1> jmp putsz 3197 <1> 3198 <1> @@: 3199 00002713 E832A5 <1> call yy_reset_buf 3200 <1> 3201 00002716 C706[E409][E401] <1> mov word [re_buffer.position], re_buffer 3202 0000271C 8326[E809]00 <1> and word [re_count], 0 3203 00002721 8326[EA09]00 <1> and word [re_count + 2], 0 3204 <1> 3205 00002726 FF36[F00A] <1> push word [rc] 3206 0000272A FF36[940A] <1> push word [savesp] 3207 0000272E FF36[9E0A] <1> push word [throwsp] 3208 00002732 FF36[DA0B] <1> push word [lastcmd] 3209 00002736 55 <1> push bp 3210 00002737 8926[940A] <1> mov word [savesp], sp 3211 0000273B 8926[9E0A] <1> mov word [throwsp], sp 3212 0000273F 8926[980A] <1> mov word [re_sp], sp 3213 <1> 3214 00002743 800E[A700]01 <1> setopt [internalflags3], dif3_input_re 3215 <1> 3216 00002748 F606[A700]10 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 3217 0000274D 7405 <1> jz @F 3218 0000274F 8036[A700]30 <1> xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 3219 <1> @@: 3220 <1> .cmd3: 3221 00002754 E9A9D8 <1> jmp cmd3 3222 <1> 3223 <1> .exit: 3224 00002757 8B26[980A] <1> mov sp, word [re_sp] 3225 0000275B 5D <1> pop bp 3226 0000275C 8F06[DA0B] <1> pop word [lastcmd] 3227 00002760 8F06[9E0A] <1> pop word [throwsp] 3228 00002764 8F06[940A] <1> pop word [savesp] 3229 00002768 58 <1> pop ax 3230 00002769 85C0 <1> test ax, ax 3231 0000276B 7403 <1> jz @F 3232 0000276D A3[F00A] <1> mov word [rc], ax 3233 <1> @@: 3234 00002770 8026[A700]FE <1> clropt [internalflags3], dif3_input_re 3235 <1> 3236 00002775 F606[A700]20 <1> testopt [internalflags3], dif3_auxbuff_guarded_2 3237 0000277A 7405 <1> jz @F 3238 0000277C 8036[A700]30 <1> xoropt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 3239 <1> @@: 3240 <1> 3241 00002781 F606[8100]80 <1> testopt [options2], opt2_re_cancel_tpg 3242 00002786 7501 <1> jnz @F 3243 <1> 3244 00002788 C3 <1> retn 3245 <1> 3246 <1> @@: 3247 00002789 E8ED17 <1> call terminate_silent_dump.if_nonnull 3248 0000278C EBC6 <1> jmp .cmd3 3249 <1> 3250 <1> 3251 <1> .just_dumpregs: 3252 <1> ; DUMPREGS - Dump registers. 3253 <1> ; 3254 <1> ; 16 bit: 8 regs, line break, first 4 segment regs, IP, flags 3255 <1> ; 32 bit: 6 regs, line break, 2 regs, flags, line break, 6 segment regs, EIP 3256 <1> ; 3257 <1> ; CHG: ax, bx, cx, dx, di, si 3258 <1> dumpregs: 3259 0000278E F606[8600]08 <1> testopt [options3], opt3_r_highlight_eip 3260 00002793 750C <1> jnz @F 3261 00002795 A1[9C0C] <1> mov ax, word [reg_eip] 3262 00002798 A3[DC0C] <1> mov word [reg_eip - regs + regs_prior], ax 3263 <1> %if _PM 3264 0000279B A1[9E0C] <1> mov ax, word [reg_eip + 2] 3265 0000279E A3[DE0C] <1> mov word [reg_eip + 2 - regs + regs_prior], ax 3266 <1> %endif 3267 <1> @@: 3268 <1> 3269 000027A1 BE[7480] <1> mov si, reg16names 3270 000027A4 BF[0E08] <1> mov di, line_out 3271 000027A7 B90800 <1> mov cx, 8 ; display all 8 standard regs (16-bit) 3272 000027AA F606[7C00]01 <1> testopt [options], dispregs32 3273 000027AF 7402 <1> jz .firstrow16 3274 000027B1 B106 <1> mov cl, 6 ; room for 6 standard regs (32-bit) only 3275 <1> .firstrow16: 3276 000027B3 9C <1> pushf 3277 000027B4 57 <1> push di 3278 000027B5 E81101 <1> call dmpr1 ; display first row 3279 000027B8 E8AF92 <1> call trimputs 3280 000027BB 5F <1> pop di ; (reset di) 3281 000027BC 9D <1> popf ; (reset ZF) 3282 000027BD 7511 <1> jnz .secondrow32 3283 000027BF B104 <1> mov cl, 4 ; display 4 segment regs 3284 000027C1 E80501 <1> call dmpr1 3285 000027C4 83C604 <1> add si, byte 2*2 ; skip FS+GS 3286 000027C7 41 <1> inc cx ; (= 1) 3287 000027C8 E8FE00 <1> call dmpr1 ; display IP 3288 000027CB E83103 <1> call dmpflags ; display flags in 16-bit display 3289 000027CE EB18 <1> jmp short .lastrowdone 3290 <1> .secondrow32: 3291 000027D0 57 <1> push di 3292 000027D1 B102 <1> mov cl, 2 ; display rest of 32-bit standard regs 3293 000027D3 E8F300 <1> call dmpr1 3294 000027D6 56 <1> push si 3295 000027D7 E82503 <1> call dmpflags ; display flags in 32-bit display 3296 000027DA E89592 <1> call putsline_crlf 3297 000027DD 5E <1> pop si 3298 000027DE 5F <1> pop di ; (reset di) 3299 000027DF B106 <1> mov cl, 6 ; display all segment registers 3300 000027E1 E8E500 <1> call dmpr1 3301 000027E4 41 <1> inc cx ; (= 1) 3302 000027E5 E8E100 <1> call dmpr1 ; display EIP 3303 <1> .lastrowdone: 3304 000027E8 E87F92 <1> call trimputs 3305 <1> 3306 000027EB BE[640C] <1> mov si, regs 3307 000027EE BF[A40C] <1> mov di, regs_prior 3308 000027F1 B92000 <1> mov cx, words(regs_prior.size) 3309 000027F4 F3A5 <1> rep movsw ; update prior regs save area 3310 <1> 3311 <1> ; Set U address to CS:(E)IP. 3312 000027F6 BE[9C0C] <1> mov si, reg_eip 3313 000027F9 BF[1E0B] <1> mov di, u_addr 3314 000027FC A5 <1> movsw ; first word of saOffset 3315 <1> %if saSegSel == 4 3316 000027FD A5 <1> movsw ; second word of saOffset 3317 <1> %endif 3318 000027FE A1[900C] <1> mov ax, word [reg_cs] 3319 00002801 AB <1> stosw ; saSegSel 3320 <1> %if _PM 3321 00002802 E8F869 <1> call ispm 3322 00002805 7501 <1> jnz .86m 3323 <1> .pm: 3324 00002807 AF <1> scasw ; skip saSegment, sto to saSelector 3325 <1> .86m: 3326 00002808 AB <1> stosw ; (if jumped to .86m) saSegment 3327 <1> @@: 3328 <1> %endif 3329 <1> 3330 00002809 B80300 <1> mov ax, DIS_F_REPT | DIS_F_SHOW 3331 0000280C F606[7F00]10 <1> testopt [options], rr_disasm_no_rept 3332 00002811 7402 <1> jz @F 3333 00002813 24FE <1> and al, ~ DIS_F_REPT 3334 <1> @@: 3335 00002815 F606[7F00]20 <1> testopt [options], rr_disasm_no_show 3336 0000281A 7402 <1> jz @F 3337 0000281C 24FD <1> and al, ~ DIS_F_SHOW 3338 <1> @@: 3339 0000281E A3[D687] <1> mov word [disflags], ax 3340 00002821 E8BB1F <1> call disasm 3341 <1> 3342 <1> ; Set ABO to address after the dumpregs disassembly. 3343 00002824 BF[140B] <1> mov di, behind_r_u_addr 3344 00002827 BE[1E0B] <1> mov si, u_addr 3345 0000282A A5 <1> movsw ; first word of saOffset 3346 <1> %if saSegSel == 4 3347 0000282B A5 <1> movsw ; second word of saOffset 3348 <1> %endif 3349 0000282C A5 <1> movsw ; saSegSel 3350 <1> %if _PM 3351 0000282D A5 <1> movsw ; saSegment 3352 0000282E A5 <1> movsw ; saSelector 3353 <1> %endif 3354 <1> %if (behind_r_u_addr + SEGADR_size) != u_addr 3355 <1> %error Expected u_addr behind behind_r_u_addr 3356 <1> ; mov di, u_addr 3357 <1> %endif 3358 <1> ; Reset U offset to (E)IP. 3359 0000282F BE[9C0C] <1> mov si, reg_eip 3360 00002832 A5 <1> movsw ; first word of saOffset 3361 00002833 A5 <1> _386_PM movsw ; second word of saOffset 3362 <1> 3363 <1> 3364 <1> %if _ACCESS_VARIABLES_AMOUNT 3365 <1> dumpregs_set_access_variables: 3366 00002834 31C0 <1> xor ax, ax 3367 00002836 BF[0483] <1> mov di, reading_access_variables 3368 00002839 B92000 <1> mov cx, words(_ACCESS_VARIABLES_AMOUNT * 8 * 2) 3369 0000283C F3AB <1> rep stosw 3370 <1> 3371 0000283E 8B0E[B087] <1> mov cx, [memrefs.free] 3372 00002842 85C9 <1> test cx, cx 3373 00002844 744A <1> jz .none 3374 00002846 31F6 <1> xor si, si 3375 <1> .loop: 3376 00002848 89F3 <1> mov bx, si 3377 0000284A E86E2C <1> call get_memref_index_bx 3378 0000284D 8B87[7A87] <1> mov ax, word [memrefs + bx + mrFlags] 3379 00002851 A801 <1> test al, mrfBranchDirect 3380 00002853 7537 <1> jnz .next 3381 00002855 31D2 <1> xor dx, dx ; 0 = reading 3382 00002857 A840 <1> test al, mrfStringSource 3383 00002859 751C <1> jnz .gotmsg 3384 0000285B 42 <1> inc dx ; 1 = writing 3385 0000285C A880 <1> test al, mrfStringDest 3386 0000285E 7517 <1> jnz .gotmsg 3387 00002860 88C2 <1> mov dl, al 3388 00002862 80E20C <1> and dl, mrfMemSource | mrfMemDest 3389 00002865 80FA0C <1> cmp dl, mrfMemSource | mrfMemDest 3390 00002868 B202 <1> mov dl, 2 ; 2 = r/w 3391 0000286A 740B <1> je .gotmsg 3392 0000286C 31D2 <1> xor dx, dx ; 0 = reading 3393 0000286E A804 <1> test al, mrfMemSource 3394 00002870 7505 <1> jnz .gotmsg 3395 00002872 42 <1> inc dx ; 1 = writing 3396 00002873 A808 <1> test al, mrfMemDest 3397 <1> ; jnz .gotmsg 3398 00002875 7415 <1> jz .next 3399 <1> .gotmsg: 3400 <1> 3401 00002877 84D2 <1> test dl, dl 3402 00002879 740B <1> jz .read 3403 <1> 3404 <1> .write: 3405 0000287B BF[2483] <1> mov di, writing_access_variables 3406 0000287E E81000 <1> call add_access_variable 3407 00002881 80FA01 <1> cmp dl, 1 3408 00002884 7406 <1> je .next 3409 <1> 3410 <1> .read: 3411 00002886 BF[0483] <1> mov di, reading_access_variables 3412 00002889 E80500 <1> call add_access_variable 3413 <1> 3414 <1> .next: 3415 0000288C 46 <1> inc si 3416 0000288D 49 <1> dec cx 3417 0000288E 75B8 <1> jnz .loop 3418 <1> .none: 3419 <1> %endif 3420 00002890 C3 <1> retn 3421 <1> 3422 <1> 3423 <1> %if _ACCESS_VARIABLES_AMOUNT 3424 <1> add_access_variable: 3425 00002891 93 <1> xchg ax, bx 3426 00002892 31DB <1> xor bx, bx 3427 <1> .loop: 3428 00002894 83790400 <1> cmp word [di + bx + 4], 0 3429 00002898 7525 <1> jne .next 3430 0000289A 83790600 <1> cmp word [di + bx + 4 + 2], 0 3431 0000289E 751F <1> jne .next 3432 000028A0 93 <1> xchg ax, bx 3433 000028A1 FFB7[7287] <1> push word [memrefs + bx + mrLinear + 2] 3434 000028A5 FFB7[7087] <1> push word [memrefs + bx + mrLinear] 3435 000028A9 FFB7[7E87] <1> push word [memrefs + bx + mrLength + 2] 3436 000028AD FFB7[7C87] <1> push word [memrefs + bx + mrLength] 3437 000028B1 93 <1> xchg ax, bx 3438 000028B2 8F4104 <1> pop word [di + bx + 4] 3439 000028B5 8F4106 <1> pop word [di + bx + 4 + 2] 3440 000028B8 8F01 <1> pop word [di + bx] 3441 000028BA 8F4102 <1> pop word [di + bx + 2] 3442 000028BD 93 <1> xchg ax, bx 3443 000028BE C3 <1> retn 3444 <1> 3445 <1> .next: 3446 000028BF 83C308 <1> add bx, 8 3447 000028C2 83FB20 <1> cmp bx, _ACCESS_VARIABLES_AMOUNT * 8 3448 000028C5 72CD <1> jb .loop 3449 000028C7 93 <1> xchg ax, bx 3450 000028C8 C3 <1> retn 3451 <1> 3452 <1> 3453 <1> usesection lDEBUG_DATA_ENTRY 3454 00008302 00 <1> align 4, db 0 3455 <1> reading_access_variables: 3456 00008304 00 <1> times _ACCESS_VARIABLES_AMOUNT * 8 db 0 3457 <1> 3458 <1> writing_access_variables: 3459 00008324 00 <1> times _ACCESS_VARIABLES_AMOUNT * 8 db 0 3460 <1> 3461 <1> usesection lDEBUG_CODE 3462 <1> %endif 3463 <1> 3464 <1> 3465 <1> ; Function to display multiple register entries. 3466 <1> ; 3467 <1> ; INP: [options]&dispregs32 = whether to display 32-bit registers, 3468 <1> ; except segment registers which are always 16-bit 3469 <1> ; si-> 2-byte register name in table 3470 <1> ; cx = number of registers to display 3471 <1> ; OUT: si-> register name in table after the last one displayed 3472 <1> ; cx = 0 3473 <1> ; CHG: bx, ax, dx 3474 <1> dmpr1: 3475 <1> .: 3476 000028C9 8D9C8C7E <1> lea bx, [si-(reg16names+DATASECTIONFIXUP)] 3477 000028CD 01DB <1> add bx, bx ; index * 4 3478 000028CF 807C0153 <1> cmp byte [si+1], 'S' ; segment register ? 3479 000028D3 740A <1> je .no_e ; always 16-bit --> (ZR) 3480 000028D5 F606[7C00]01 <1> testopt [options], dispregs32 ; display 32-bit register ? 3481 000028DA 7403 <1> jz .no_e ; no --> (ZR) 3482 000028DC B045 <1> mov al, 'E' 3483 000028DE AA <1> stosb ; store E for Exx register name 3484 <1> .no_e: 3485 000028DF A5 <1> movsw ; store register name, increase pointer 3486 000028E0 B03D <1> mov al, '=' 3487 000028E2 AA <1> stosb ; store equality sign 3488 000028E3 742E <1> jz .no_high ; (ZF left from before) 3489 <1> 3490 000028E5 8026[A600]FE <1> clropt [internalflags3], dif3_highlighting 3491 000028EA 8B87[660C] <1> mov ax, word [regs + bx + 2] 3492 000028EE 8B97[A60C] <1> mov dx, word [regs_prior + bx + 2] 3493 000028F2 F606[8600]04 <1> testopt [options3], opt3_r_highlight_full 3494 000028F7 7417 <1> jz @F 3495 000028F9 39C2 <1> cmp dx, ax 3496 000028FB 7510 <1> jne .highlighthigh 3497 000028FD 52 <1> push dx 3498 000028FE 50 <1> push ax 3499 000028FF 8B87[640C] <1> mov ax, word [regs + bx] 3500 00002903 8B97[A40C] <1> mov dx, word [regs_prior + bx] 3501 00002907 39C2 <1> cmp dx, ax 3502 00002909 58 <1> pop ax 3503 0000290A 5A <1> pop dx 3504 0000290B 7403 <1> je @F 3505 <1> .highlighthigh: 3506 0000290D E82500 <1> call highlight 3507 <1> @@: 3508 00002910 E85000 <1> call hexword_diff ; store high word (only if 32-bit register) 3509 <1> .no_high: 3510 00002913 8B87[640C] <1> mov ax, word [regs + bx] 3511 00002917 8B97[A40C] <1> mov dx, word [regs_prior + bx] 3512 0000291B F606[8600]04 <1> testopt [options3], opt3_r_highlight_full 3513 00002920 7407 <1> jz @F 3514 00002922 39C2 <1> cmp dx, ax 3515 00002924 7403 <1> je @F 3516 00002926 E80C00 <1> call highlight 3517 <1> @@: 3518 00002929 E83700 <1> call hexword_diff ; store low word 3519 <1> 3520 0000292C E81D00 <1> call unhighlight 3521 <1> 3522 0000292F B020 <1> mov al, 32 3523 00002931 AA <1> stosb ; store space 3524 00002932 E295 <1> loop . 3525 00002934 C3 <1> retn 3526 <1> ; Note: This code doesn't use 386+ registers to display our internal 3527 <1> ; variables for these. Currently, setting the RX bit of options 3528 <1> ; will display the 32-bit variables even on non-386 machines. 3529 <1> ; Changing this code to require EAX would require changes to our 3530 <1> ; check too. 3531 <1> ; 32-bit code probably wouldn't be much shorter than the current 3532 <1> ; implementation as well. 3533 <1> 3534 <1> highlight: 3535 00002935 F606[A600]01 <1> testopt [internalflags3], dif3_highlighting 3536 0000293A 750F <1> jnz @F 3537 0000293C 800E[A600]01 <1> setopt [internalflags3], dif3_highlighting 3538 00002941 56 <1> push si 3539 00002942 51 <1> push cx 3540 00002943 BE[BF6B] <1> mov si, msg.highlight 3541 00002946 E8ED0A <1> call copy_single_counted_string 3542 00002949 59 <1> pop cx 3543 0000294A 5E <1> pop si 3544 <1> @@: 3545 0000294B C3 <1> retn 3546 <1> 3547 <1> unhighlight: 3548 0000294C F606[A600]01 <1> testopt [internalflags3], dif3_highlighting 3549 00002951 740F <1> jz @F 3550 00002953 8026[A600]FE <1> clropt [internalflags3], dif3_highlighting 3551 00002958 56 <1> push si 3552 00002959 51 <1> push cx 3553 0000295A BE[C46B] <1> mov si, msg.unhighlight 3554 0000295D E8D60A <1> call copy_single_counted_string 3555 00002960 59 <1> pop cx 3556 00002961 5E <1> pop si 3557 <1> @@: 3558 00002962 C3 <1> retn 3559 <1> 3560 <1> hexword_diff: 3561 00002963 F606[8600]01 <1> testopt [options3], opt3_r_highlight_diff 3562 00002968 7407 <1> jz @F 3563 0000296A F606[8600]04 <1> testopt [options3], opt3_r_highlight_full 3564 0000296F 7403 <1> jz @FF 3565 <1> @@: 3566 00002971 E9C690 <1> jmp hexword 3567 <1> 3568 <1> @@: 3569 <1> .hexword: 3570 00002974 86C4 <1> xchg al, ah 3571 00002976 86D6 <1> xchg dl, dh 3572 00002978 E80400 <1> call .hexbyte 3573 0000297B 86C4 <1> xchg al, ah 3574 0000297D 86D6 <1> xchg dl, dh 3575 <1> 3576 <1> .hexbyte: 3577 0000297F 51 <1> push cx 3578 00002980 B104 <1> mov cl, 4 3579 00002982 D2C0 <1> rol al, cl 3580 00002984 D2C2 <1> rol dl, cl 3581 00002986 E80500 <1> call .hexnyb 3582 00002989 D2C0 <1> rol al, cl 3583 0000298B D2C2 <1> rol dl, cl 3584 0000298D 59 <1> pop cx 3585 <1> 3586 <1> .hexnyb: 3587 0000298E 50 <1> push ax 3588 0000298F 88D4 <1> mov ah, dl 3589 00002991 250F0F <1> and ax, 0F0Fh 3590 00002994 38E0 <1> cmp al, ah 3591 00002996 7405 <1> je .unhighlight 3592 <1> .highlight: 3593 00002998 E89AFF <1> call highlight 3594 0000299B EB03 <1> jmp .common 3595 <1> 3596 <1> .unhighlight: 3597 0000299D E8ACFF <1> call unhighlight 3598 <1> .common: 3599 <1> ; INP: original ax on stack, then return near address 3600 <1> ; al = nybble value to display, 0..15 3601 <1> ; es:di -> where to store 3602 <1> ; OUT: es:di incremented 3603 <1> ; ax restored 3604 <1> ; return to near address that was on stack 3605 000029A0 E9AC90 <1> jmp hexnyb.common 3606 <1> 3607 <1> 3608 <1> %if _RN 3609 <1> ; The layout for FSAVE/FRSTOR depends on mode and 16-/32-bit. 3610 <1> 3611 <1> %if 0 3612 <1> struc FPENV16 3613 <1> .cw: resw 1 ; 00h 3614 <1> .sw: resw 1 ; 02h 3615 <1> .tw: resw 1 ; 04h 3616 <1> .fip: resw 1 ; 06h IP offset 3617 <1> .opc: ; 08h RM: opcode (0-10), IP 16-19 in high bits 3618 <1> .fcs: resw 1 ; 08h PM: IP selector 3619 <1> .fop: resw 1 ; 0Ah operand pointer offset 3620 <1> .foph: ; 0Ch RM: operand pointer 16-19 in high bits 3621 <1> .fos: resw 1 ; 0Ch PM: operand pointer selector 3622 <1> endstruc; 0Eh 3623 <1> 3624 <1> struc FPENV32 3625 <1> .cw: resd 1 ; 00h 3626 <1> .sw: resd 1 ; 04h 3627 <1> .tw: resd 1 ; 08h 3628 <1> .fip: resd 1 ; 0Ch ip offset (RM: bits 0-15 only) 3629 <1> .fopcr: ; 10h (dword) RM: opcode (0-10), ip (12-27) 3630 <1> .fcs: resw 1 ; 10h PM: ip selector 3631 <1> .fopcp: resw 1 ; 12h PM: opcode (bits 0-10) 3632 <1> .foo: resd 1 ; 14h operand pointer offset (RM: bits 0-15 only) 3633 <1> .fooh: ; 18h (dword) RM: operand pointer (12-27) 3634 <1> .fos: resw 1 ; 18h PM: operand pointer selector 3635 <1> resw 1 ; 1Ah PM: not used 3636 <1> endstruc; 1Ch 3637 <1> %endif 3638 <1> 3639 <1> 3640 <1> usesection lDEBUG_DATA_ENTRY 3641 <1> 3642 <1> ; dumpregsFPU - Dump Floating Point Registers 3643 <1> fregnames: 3644 00008344 435753575457 <1> db "CW", "SW", "TW" 3645 0000834A 4F50433D49503D4450- <1> db "OPC=", "IP=", "DP=" 3645 00008353 3D <1> 3646 00008354 656D707479 <1> msg.empty: db "empty" 3647 <1> endarea msg.empty 3648 00008359 4E614E <1> msg.nan: db "NaN" 3649 <1> endarea msg.nan 3650 <1> 3651 <1> 3652 <1> usesection lDEBUG_CODE 3653 <1> 3654 <1> dumpregsFPU: 3655 000029A3 E86DDB <1> call guard_auxbuff 3656 000029A6 8E06[F209] <1> mov es, word [auxbuff_segorsel] 3657 <1> ; => auxbuff 3658 000029AA 31FF <1> xor di, di ; -> auxbuff 3659 000029AC B98000 <1> mov cx, 128 3660 000029AF 31C0 <1> xor ax, ax 3661 000029B1 F3AB <1> rep stosw ; initialise auxbuff 3662 <1> %if _AUXBUFFSIZE < (128 * 2) 3663 <1> %error auxbuff not large enough for dumpregsFPU 3664 <1> %endif 3665 000029B3 BF[0E08] <1> mov di, line_out 3666 000029B6 BE[4483] <1> mov si, fregnames 3667 000029B9 31DB <1> xor bx, bx ; es:bx -> auxbuff 3668 000029BB 66 <1> _386_o32 3669 000029BC 26DD37 <1> fnsave [es:bx] 3670 <1> 3671 <1> ; display CW, SW and TW 3672 000029BF 16 <1> push ss 3673 000029C0 07 <1> pop es ; es:di -> line_out 3674 000029C1 B90300 <1> mov cx, 3 3675 <1> .nextfpr: 3676 000029C4 A5 <1> movsw 3677 000029C5 B03D <1> mov al, '=' 3678 000029C7 AA <1> stosb 3679 000029C8 87F3 <1> xchg si, bx 3680 000029CA 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3681 <1> ; ds:si -> auxbuff entry 3682 000029CE 66 <1> _386_o32 ; lodsd 3683 000029CF AD <1> lodsw 3684 000029D0 16 <1> push ss 3685 000029D1 1F <1> pop ds ; ds:si -> fregnames entry 3686 000029D2 87F3 <1> xchg si, bx 3687 000029D4 50 <1> push ax 3688 000029D5 E86290 <1> call hexword 3689 000029D8 B020 <1> mov al, 32 3690 000029DA AA <1> stosb 3691 000029DB E2E7 <1> loop .nextfpr 3692 <1> 3693 <1> ; display OPC 3694 <1> ; in 16-bit PM, there's no OPC 3695 <1> ; in 32-bit PM, there's one, but the location differs from RM 3696 000029DD 53 <1> push bx 3697 <1> %if _PM 3698 000029DE E81C68 <1> call ispm 3699 000029E1 7408 <1> jz .notpm_opc 3700 000029E3 83C302 <1> add bx, byte 2 ; location of OPC in PM differs from RM 3701 000029E6 83C604 <1> _no386 add si, byte 4 ; no OPC in 16-bit PM 3702 000029E9 EB18 <1> _no386 jmp short .no_opc 3703 <1> .notpm_opc: 3704 <1> %endif 3705 000029EB A5 <1> movsw 3706 000029EC A5 <1> movsw 3707 000029ED 87F3 <1> xchg si, bx 3708 000029EF 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3709 <1> ; ds:si -> auxbuff entry 3710 000029F3 66 <1> _386_o32 ; lodsd 3711 000029F4 AD <1> lodsw ; skip word/dword 3712 000029F5 AD <1> lodsw 3713 000029F6 16 <1> push ss 3714 000029F7 1F <1> pop ds ; ds:si -> fregnames entry 3715 000029F8 87F3 <1> xchg si, bx 3716 000029FA 25FF07 <1> and ax, 07FFh ; bits 0-10 only 3717 000029FD E83A90 <1> call hexword 3718 00002A00 B020 <1> mov al, 32 3719 00002A02 AA <1> stosb 3720 <1> .no_opc: 3721 00002A03 5B <1> pop bx 3722 <1> 3723 <1> ; display IP and DP 3724 00002A04 B102 <1> mov cl, 2 3725 <1> .nextfp: 3726 00002A06 51 <1> push cx 3727 00002A07 16 <1> push ss 3728 00002A08 1F <1> pop ds ; ds:si -> fregnames entry 3729 00002A09 A5 <1> movsw 3730 00002A0A A4 <1> movsb 3731 00002A0B 87F3 <1> xchg si, bx 3732 00002A0D 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3733 <1> ; ds:si -> auxbuff entry 3734 00002A11 66 <1> _386_o32 ; lodsd 3735 00002A12 AD <1> lodsw 3736 00002A13 66 <1> _386_o32 ; mov edx, eax 3737 00002A14 89C2 <1> mov dx, ax 3738 00002A16 66 <1> _386_o32 ; lodsd 3739 00002A17 AD <1> lodsw 3740 00002A18 87F3 <1> xchg si, bx 3741 00002A1A 16 <1> push ss 3742 00002A1B 1F <1> pop ds ; ds:si -> fregnames entry 3743 <1> %if _PM 3744 00002A1C E8DE67 <1> call ispm 3745 00002A1F 7408 <1> jz .notpm_ipdp 3746 00002A21 E81690 <1> call hexword 3747 00002A24 B03A <1> mov al, ':' 3748 00002A26 AA <1> stosb 3749 00002A27 EB0D <1> jmp short .fppm 3750 <1> .notpm_ipdp: 3751 <1> %endif 3752 00002A29 B10C <1> mov cl, 12 3753 00002A2B 66 <1> _386_o32 ; shr eax, cl 3754 00002A2C D3E8 <1> shr ax, cl 3755 00002A2E E80990 <1> _386 call hexword 3756 00002A31 EB03 <1> _386 jmp short .fppm 3757 00002A33 E81690 <1> call hexnyb 3758 <1> .fppm: 3759 00002A36 66 <1> _386_PM_o32 ; mov eax, edx 3760 00002A37 89D0 <1> mov ax, dx 3761 00002A39 E8C167 <1> _386_PM call ispm 3762 00002A3C 7403 <1> _386_PM jz .notpm_fppm 3763 00002A3E E8ED8F <1> _386_PM call hexword_high 3764 <1> .notpm_fppm: 3765 00002A41 E8F68F <1> call hexword 3766 00002A44 B020 <1> mov al, 32 3767 00002A46 AA <1> stosb 3768 00002A47 59 <1> pop cx 3769 00002A48 E2BC <1> loop .nextfp 3770 <1> 3771 00002A4A 87F3 <1> xchg si, bx 3772 00002A4C 16 <1> push ss 3773 00002A4D 1F <1> pop ds ; ds = es = ss 3774 00002A4E E81990 <1> call trimputs 3775 <1> 3776 <1> ; display ST0..7 3777 00002A51 5D <1> pop bp ; TW 3778 00002A52 58 <1> pop ax ; SW 3779 00002A53 5A <1> pop dx ; CW (discarded here) 3780 <1> 3781 00002A54 B10A <1> mov cl, 10 3782 00002A56 D3E8 <1> shr ax, cl ; move TOP to bits 1..3 3783 00002A58 240E <1> and al, 1110b ; separate TOP 3784 00002A5A 88C1 <1> mov cl, al 3785 00002A5C D3CD <1> ror bp, cl ; adjust TW 3786 <1> 3787 00002A5E B130 <1> mov cl, '0' 3788 <1> .nextst: 3789 00002A60 BF[0E08] <1> mov di, line_out 3790 00002A63 51 <1> push cx 3791 00002A64 B85354 <1> mov ax, "ST" 3792 00002A67 AB <1> stosw 3793 00002A68 88C8 <1> mov al, cl 3794 00002A6A B43D <1> mov ah, '=' 3795 00002A6C AB <1> stosw 3796 00002A6D 57 <1> push di 3797 00002A6E A801 <1> test al, 1 3798 00002A70 B020 <1> mov al, 32 3799 00002A72 B91600 <1> mov cx, 22 3800 00002A75 F3AA <1> rep stosb 3801 00002A77 7404 <1> jz .oddst 3802 00002A79 B80D0A <1> mov ax, 10<<8|13 3803 00002A7C AB <1> stosw 3804 <1> .oddst: 3805 00002A7D B000 <1> mov al, 0 3806 00002A7F AA <1> stosb ; make it an ASCIZ string 3807 00002A80 5F <1> pop di 3808 <1> 3809 00002A81 89E8 <1> mov ax, bp 3810 00002A83 D1CD <1> ror bp, 1 3811 00002A85 D1CD <1> ror bp, 1 3812 00002A87 2403 <1> and al, 3 ; 00b = valid, 01b = zero, 10b = NaN, 11b = empty 3813 00002A89 741F <1> jz .isvalid 3814 00002A8B 56 <1> push si 3815 00002A8C 16 <1> push ss 3816 00002A8D 1F <1> pop ds ; ds = es = ss 3817 00002A8E BE[5483] <1> mov si, msg.empty 3818 00002A91 B105 <1> mov cl, msg.empty_size 3819 00002A93 3C03 <1> cmp al, 3 3820 00002A95 740E <1> je .gotst 3821 00002A97 BE[5983] <1> mov si, msg.nan 3822 00002A9A B103 <1> mov cl, msg.nan_size 3823 00002A9C 3C02 <1> cmp al, 2 3824 00002A9E 7405 <1> je .gotst 3825 00002AA0 B030 <1> mov al, '0' 3826 00002AA2 AA <1> stosb 3827 00002AA3 31C9 <1> xor cx, cx 3828 <1> .gotst: 3829 00002AA5 F3A4 <1> rep movsb 3830 00002AA7 5E <1> pop si 3831 00002AA8 EB34 <1> jmp short .regoutdone 3832 <1> 3833 <1> .isvalid: 3834 00002AAA 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] 3835 <1> ; ds:si -> auxbuff entry 3836 00002AAE 36F606[7C00]40 <1> testopt [ss:options], hexrn 3837 00002AB4 7508 <1> jnz .hex 3838 00002AB6 57 <1> push di ; -> buffer (first parameter; in es = ss) 3839 00002AB7 1E <1> push ds 3840 00002AB8 56 <1> push si ; -> auxbuff entry (second parameter) 3841 00002AB9 E8E402 <1> call FloatToStr 3842 00002ABC EB20 <1> jmp short .regoutdone 3843 <1> 3844 <1> .hex: 3845 00002ABE 8B4408 <1> mov ax, word [si+8] 3846 00002AC1 E8768F <1> call hexword 3847 00002AC4 B02E <1> mov al, '.' 3848 00002AC6 AA <1> stosb 3849 00002AC7 8B4406 <1> mov ax, word [si+6] 3850 00002ACA E86D8F <1> call hexword 3851 00002ACD 8B4404 <1> mov ax, word [si+4] 3852 00002AD0 E8678F <1> call hexword 3853 00002AD3 8B4402 <1> mov ax, word [si+2] 3854 00002AD6 E8618F <1> call hexword 3855 00002AD9 8B04 <1> mov ax, word [si+0] 3856 00002ADB E85C8F <1> call hexword 3857 <1> 3858 <1> .regoutdone: 3859 00002ADE BA[0E08] <1> mov dx, line_out 3860 00002AE1 16 <1> push ss 3861 00002AE2 1F <1> pop ds ; ds = es = ss 3862 00002AE3 E80A93 <1> call putsz 3863 00002AE6 59 <1> pop cx 3864 <1> 3865 00002AE7 83C60A <1> add si, byte 10 ; -> next ST 3866 00002AEA FEC1 <1> inc cl 3867 00002AEC 80F938 <1> cmp cl, '8' 3868 00002AEF 7403E96CFF <1> jne .nextst 3869 00002AF4 8E06[F209] <1> mov es, word [auxbuff_segorsel] 3870 <1> ; es => auxbuff 3871 00002AF8 66 <1> _386_o32 3872 00002AF9 26DD260000 <1> frstor [es:0] 3873 00002AFE C3 <1> retn 3874 <1> %endif 3875 <1> 3876 <1> 3877 <1> ; DMPFLAGS - Dump flags output. 3878 <1> dmpflags: 3879 00002AFF 52 <1> push dx 3880 00002B00 53 <1> push bx 3881 00002B01 BE[0C80] <1> mov si, flagbits 3882 00002B04 B90800 <1> mov cx, 8 3883 00002B07 AD <1> .loop: lodsw 3884 00002B08 8B16[E00C] <1> mov dx, word [reg_efl - regs + regs_prior] 3885 00002B0C 21C2 <1> and dx, ax 3886 00002B0E 8B1E[A00C] <1> mov bx, word [reg_efl] 3887 00002B12 21C3 <1> and bx, ax 3888 00002B14 39DA <1> cmp dx, bx 3889 00002B16 7411 <1> je @F 3890 00002B18 F606[8600]05 <1> testopt [options3], opt3_r_highlight_diff | opt3_r_highlight_full 3891 00002B1D 740A <1> jz @F 3892 00002B1F F606[A600]02 <1> testopt [internalflags3], dif3_do_not_highlight 3893 00002B24 7503 <1> jnz @F 3894 00002B26 E80CFE <1> call highlight 3895 <1> @@: 3896 00002B29 85DB <1> test bx, bx 3897 00002B2B 8B441E <1> mov ax, word [si+(flagsoff-flagbits)-2] 3898 00002B2E 7403 <1> jz .off ; if not set 3899 00002B30 8B440E <1> mov ax, word [si+(flagson-flagbits)-2] 3900 00002B33 AB <1> .off: stosw 3901 00002B34 E815FE <1> call unhighlight 3902 00002B37 B020 <1> mov al, 32 3903 00002B39 AA <1> stosb 3904 00002B3A E2CB <1> loop .loop 3905 00002B3C 4F <1> dec di ; -> last (unnecessary) blank 3906 00002B3D 5B <1> pop bx 3907 00002B3E 5A <1> pop dx 3908 00002B3F C3 <1> retn 3909 <1> 3910 <1> 3911 <1> %if _OPTIONS || _VARIABLES 3912 <1> dumpvars: 3913 <1> %if _VARIABLES 3914 00002B40 BE[E40C] <1> mov si, vregs 3915 <1> %endif 3916 00002B43 31DB <1> xor bx, bx 3917 <1> .loop: 3918 00002B45 BF[0E08] <1> mov di, line_out 3919 00002B48 31D2 <1> xor dx, dx 3920 <1> %if _VARIABLES 3921 00002B4A B90400 <1> mov cx, 4 3922 00002B4D E8B000 <1> call .dump ; display four variables 3923 00002B50 43 <1> inc bx ; (would be one off here) 3924 00002B51 56 <1> push si 3925 <1> %else 3926 <1> add bx, byte 4 ; (no motivation to optimize that) 3927 <1> %endif 3928 <1> %if _OPTIONS 3929 <1> %if _VARIABLES 3930 00002B52 B82020 <1> mov ax, 32<<8|32 3931 00002B55 AB <1> stosw ; more blanks inbetween 3932 <1> %endif 3933 00002B56 80FB10 <1> cmp bl, 16 3934 00002B59 7439 <1> je .3 3935 00002B5B 80FB08 <1> cmp bl, 8 3936 00002B5E 7721 <1> ja .2 3937 00002B60 7411 <1> je .1 3938 <1> 3939 <1> ; First line, display DCO and DCS 3940 <1> .0: 3941 00002B62 B8434F <1> mov ax, "CO" 3942 00002B65 BE[7C00] <1> mov si, options 3943 00002B68 E88600 <1> call .dump_option 3944 00002B6B B84353 <1> mov ax, "CS" 3945 00002B6E BE[8C00] <1> mov si, startoptions 3946 00002B71 EB44 <1> jmp short .next 3947 <1> 3948 <1> ; Second line, DAO and DAS 3949 <1> .1: 3950 00002B73 B8414F <1> mov ax, "AO" 3951 00002B76 BE[AC00] <1> mov si, asm_options 3952 00002B79 E87500 <1> call .dump_option 3953 00002B7C B84153 <1> mov ax, "AS" 3954 <1> ; asm_startoptions follows directly behind asm_options 3955 00002B7F EB36 <1> jmp short .next 3956 <1> 3957 <1> ; Third line, DIF and DPI 3958 <1> .2: 3959 00002B81 B84946 <1> mov ax, "IF" 3960 00002B84 BE[9C00] <1> mov si, internalflags 3961 00002B87 E86700 <1> call .dump_option 3962 00002B8A B85049 <1> mov ax, "PI" 3963 00002B8D BE[C80A] <1> mov si, psp22 3964 00002B90 42 <1> inc dx 3965 00002B91 42 <1> inc dx 3966 00002B92 EB23 <1> jmp short .next 3967 <1> 3968 <1> ; Fourth line, DPR, DPS (if _PM) and DPP 3969 <1> .3: 3970 00002B94 42 <1> inc dx 3971 00002B95 B85052 <1> mov ax, "PR" 3972 00002B98 BE[A60A] <1> mov si, pspdbg 3973 00002B9B E85300 <1> call .dump_option 3974 <1> %if _PM 3975 00002B9E 31C0 <1> xor ax, ax 3976 00002BA0 E85A66 <1> call ispm 3977 00002BA3 7502 <1> jnz .3_rm 3978 00002BA5 1E <1> push ds 3979 00002BA6 A8 <1> db __TEST_IMM8 ; (skip push) 3980 <1> .3_rm: 3981 00002BA7 50 <1> push ax 3982 00002BA8 B85053 <1> mov ax, "PS" 3983 00002BAB 89E6 <1> mov si, sp 3984 00002BAD E84100 <1> call .dump_options 3985 00002BB0 58 <1> pop ax 3986 <1> %else 3987 <1> mov ax, 32<<8|32 3988 <1> stosw 3989 <1> stosw 3990 <1> %endif 3991 00002BB1 B85050 <1> mov ax, "PP" 3992 00002BB4 BE[CC0A] <1> mov si, parent 3993 <1> 3994 <1> .next: 3995 00002BB7 E83700 <1> call .dump_options 3996 <1> %endif 3997 00002BBA 53 <1> push bx 3998 00002BBB E8B48E <1> call putsline_crlf ; display line 3999 00002BBE 5B <1> pop bx ; (retain counter) 4000 <1> %if _VARIABLES 4001 00002BBF 5E <1> pop si ; (retain pointer to next variable) 4002 <1> %endif 4003 00002BC0 80FB10 <1> cmp bl, 16 ; was end ? 4004 00002BC3 7580 <1> jne .loop ; no, loop --> 4005 <1> 4006 <1> ; done 4007 <1> .mode: 4008 00002BC5 BA[825D] <1> mov dx, msg.rv_mode.before 4009 00002BC8 E82592 <1> call putsz 4010 <1> %if _PM 4011 00002BCB E82F66 <1> call ispm 4012 00002BCE 7511 <1> jnz .mode_86m 4013 00002BD0 BA[915D] <1> mov dx, msg.rv_mode_dpmi_16 4014 00002BD3 8B1E[900C] <1> mov bx, word [reg_cs] 4015 00002BD7 E88E31 <1> call test_d_b_bit 4016 00002BDA 7412 <1> jz @F 4017 00002BDC BA[A25D] <1> mov dx, msg.rv_mode_dpmi_32 4018 00002BDF EB0D <1> jmp @F 4019 <1> 4020 <1> .mode_86m: 4021 <1> %endif 4022 00002BE1 BA[B35D] <1> mov dx, msg.rv_mode_r86m 4023 <1> ; (only 386+ has the V86M so even though smsw ax is a 4024 <1> ; 286 level instruction, so could be used without a 386, 4025 <1> ; we only really need it on a 386+.) 4026 00002BE4 0F01E0 <1> _386 smsw ax 4027 00002BE7 A801 <1> _386 test al, 1 4028 00002BE9 7403 <1> _386 jz @F 4029 00002BEB BA[C25D] <1> _386 mov dx, msg.rv_mode_v86m 4030 <1> @@: 4031 00002BEE E9FF91 <1> jmp putsz 4032 <1> 4033 <1> 4034 <1> ; INP: ax = 2-byte option name ('N' will precede this) 4035 <1> ; d[si] = value 4036 <1> ; OUT: si-> behind value 4037 <1> ; cx = 0 4038 <1> ; CHG: ax 4039 <1> .dump_options: 4040 <1> %if _VARIABLES 4041 <1> .dump_option: 4042 00002BF1 C7052044 <1> mov word [di], " D" 4043 00002BF5 AF <1> scasw 4044 <1> %else 4045 <1> mov byte [di], ' ' 4046 <1> inc di 4047 <1> .dump_option: 4048 <1> mov byte [di], 'D' 4049 <1> inc di 4050 <1> %endif 4051 00002BF6 AB <1> stosw 4052 <1> %if _VARIABLES ; falls through otherwise, always count 1 4053 00002BF7 B90100 <1> mov cx, 1 4054 00002BFA EB0C <1> jmp short .dump_one 4055 <1> %endif 4056 <1> 4057 <1> %if 0 4058 <1> PM && OPTIONS && VARIABLES 4059 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 4060 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 4061 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 4062 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPS=0000 DPP=0616 4063 <1> 4064 <1> !PM && OPTIONS && VARIABLES 4065 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 DCO=00000000 DCS=00000000 4066 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 DAO=00000000 DAS=00000000 4067 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 DIF=0000840D DPI=0616:01DE 4068 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 DPR=0984 DPP=0616 4069 <1> 4070 <1> !OPTIONS && VARIABLES 4071 <1> V0=00000000 V1=00000000 V2=00000000 V3=00000000 4072 <1> V4=00000000 V5=00000000 V6=00000000 V7=00000000 4073 <1> V8=00000000 V9=00000000 VA=00000000 VB=00000000 4074 <1> VC=00000000 VD=00000000 VE=00000000 VF=00000000 4075 <1> 4076 <1> !PM && OPTIONS && !VARIABLES 4077 <1> DCO=00000000 DCS=00000000 4078 <1> DAO=00000000 DAS=00000000 4079 <1> DIF=0000840D DPI=0616:01DE 4080 <1> DPR=0984 DPP=0616 4081 <1> 4082 <1> PM && OPTIONS && !VARIABLES 4083 <1> DCO=00000000 DCS=00000000 4084 <1> DAO=00000000 DAS=00000000 4085 <1> DIF=0000840D DPI=0616:01DE 4086 <1> DPR=0984 DPS=0000 DPP=0616 4087 <1> 4088 <1> !OPTIONS && !VARIABLES 4089 <1> %endif 4090 <1> %if 0 4091 <1> DCO Debugger Common Options 4092 <1> DCS Debugger Common Startup options 4093 <1> DIF Debugger Internal Flags 4094 <1> DPR Debugger Process (Real-mode segment) 4095 <1> DPS Debugger Process Selector, or zero 4096 <1> DPP Debugger Parent Process 4097 <1> DPI Debugger Parent Interrupt 22h 4098 <1> DAO Debugger Assembler/disassembler Options 4099 <1> DAS Debugger Assembler/disassembler Startup options 4100 <1> %endif 4101 <1> 4102 <1> %if _VARIABLES 4103 <1> .dump_loop: 4104 00002BFC 43 <1> inc bx 4105 00002BFD B020 <1> mov al, 32 4106 00002BFF AA <1> stosb 4107 <1> .dump: 4108 00002C00 B056 <1> mov al, 'V' 4109 00002C02 AA <1> stosb 4110 00002C03 88D8 <1> mov al, bl 4111 00002C05 E8448E <1> call hexnyb 4112 <1> %endif 4113 <1> .dump_one: 4114 00002C08 B03D <1> mov al, '=' 4115 00002C0A AA <1> stosb 4116 00002C0B AD <1> lodsw 4117 00002C0C 80FA01 <1> cmp dl, 1 4118 00002C0F 740D <1> je .dumpw 4119 00002C11 50 <1> push ax 4120 00002C12 AD <1> lodsw 4121 00002C13 9C <1> pushf 4122 00002C14 E8238E <1> call hexword 4123 00002C17 9D <1> popf ; CF 4124 00002C18 7203 <1> jb .nocolon 4125 00002C1A B03A <1> mov al, ':' 4126 00002C1C AA <1> stosb 4127 <1> .nocolon: 4128 00002C1D 58 <1> pop ax 4129 <1> .dumpw: 4130 00002C1E E8198E <1> call hexword 4131 <1> %if _VARIABLES 4132 00002C21 E2D9 <1> loop .dump_loop 4133 <1> %endif 4134 00002C23 C3 <1> retn 4135 <1> %endif 4136 <1> 4137 <1> 4138 <1> dumpallvars: 4139 00002C24 AC <1> lodsb 4140 00002C25 E8278D <1> call chkeol 4141 00002C28 BE[E40C] <1> mov si, vregs 4142 00002C2B 31DB <1> xor bx, bx 4143 <1> .loop: 4144 00002C2D BF[0E08] <1> mov di, line_out 4145 00002C30 B90400 <1> mov cx, 4 4146 00002C33 31D2 <1> xor dx, dx 4147 00002C35 E81500 <1> call .dump ; display four variables 4148 00002C38 43 <1> inc bx ; (would be one off here) 4149 00002C39 85D2 <1> test dx, dx 4150 00002C3B 7407 <1> jz @F 4151 00002C3D 56 <1> push si 4152 00002C3E 53 <1> push bx 4153 00002C3F E8308E <1> call putsline_crlf ; display line 4154 00002C42 5B <1> pop bx ; (retain counter) 4155 00002C43 5E <1> pop si ; (retain pointer to next variable) 4156 <1> @@: 4157 00002C44 84DB <1> test bl, bl ; was end ? 4158 00002C46 75E5 <1> jnz .loop ; no, loop --> 4159 00002C48 C3 <1> retn 4160 <1> 4161 <1> .dump_loop: 4162 00002C49 43 <1> inc bx 4163 00002C4A B020 <1> mov al, 32 4164 00002C4C AA <1> stosb 4165 <1> .dump: 4166 00002C4D B056 <1> mov al, 'V' 4167 00002C4F AA <1> stosb 4168 00002C50 88D8 <1> mov al, bl 4169 00002C52 E8EC8D <1> call hexbyte 4170 <1> .dump_one: 4171 00002C55 B03D <1> mov al, '=' 4172 00002C57 AA <1> stosb 4173 00002C58 AD <1> lodsw 4174 00002C59 09C2 <1> or dx, ax 4175 00002C5B 50 <1> push ax 4176 00002C5C AD <1> lodsw 4177 00002C5D 09C2 <1> or dx, ax 4178 00002C5F E8D88D <1> call hexword 4179 00002C62 58 <1> pop ax 4180 00002C63 E8D48D <1> call hexword 4181 00002C66 E2E1 <1> loop .dump_loop 4182 00002C68 C3 <1> retn 4183 <1> 4184 <1> 4185 <1> dumpmemory: 4186 00002C69 AC <1> lodsb 4187 00002C6A E8E28C <1> call chkeol 4188 <1> 4189 00002C6D A1[CE00] <1> mov ax, word [code_seg] 4190 <1> %if _PM 4191 00002C70 8B16[D000] <1> mov dx, word [code_sel] 4192 <1> %endif 4193 00002C74 BE[C064] <1> mov si, msg.vm_codeseg 4194 00002C77 E82F00 <1> call .line 4195 <1> 4196 <1> %if _PM 4197 00002C7A A1[A60A] <1> mov ax, word [pspdbg] 4198 00002C7D 8CD2 <1> mov dx, ss 4199 <1> %else 4200 <1> mov ax, ss 4201 <1> %endif 4202 00002C7F BE[CE64] <1> mov si, msg.vm_dataseg 4203 00002C82 E82400 <1> call .line 4204 <1> 4205 <1> %if _PM 4206 00002C85 A1[A60A] <1> mov ax, word [pspdbg] 4207 00002C88 8B16[D688] <1> mov dx, word [cssel] 4208 <1> %else 4209 <1> mov ax, ss 4210 <1> %endif 4211 00002C8C BE[DC64] <1> mov si, msg.vm_entryseg 4212 00002C8F E81700 <1> call .line 4213 <1> 4214 <1> %if _PM 4215 00002C92 A1[F409] <1> mov ax, word [auxbuff_segorsel + soaSegment] 4216 00002C95 8B16[F609] <1> mov dx, word [auxbuff_segorsel + soaSelector] 4217 <1> %else 4218 <1> mov ax, word [auxbuff_segorsel] 4219 <1> %endif 4220 00002C99 BE[EB64] <1> mov si, msg.vm_auxseg 4221 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 4222 00002C9C E80A00 <1> call .line 4223 <1> 4224 <1> %if _PM 4225 00002C9F A1[F80A] <1> mov ax, word [history.segorsel + soaSegment] 4226 00002CA2 8B16[FA0A] <1> mov dx, word [history.segorsel + soaSelector] 4227 <1> %else 4228 <1> mov ax, word [history.segorsel] 4229 <1> %endif 4230 00002CA6 BE[FC64] <1> mov si, msg.vm_hisseg 4231 <1> %endif 4232 <1> 4233 <1> .line: 4234 00002CA9 BF[0E08] <1> mov di, line_out 4235 00002CAC E88707 <1> call copy_single_counted_string 4236 00002CAF E8888D <1> call hexword 4237 <1> %if _PM 4238 00002CB2 E84865 <1> call ispm 4239 00002CB5 750A <1> jnz @F 4240 00002CB7 BE[0D65] <1> mov si, msg.vm_selector 4241 00002CBA E87907 <1> call copy_single_counted_string 4242 00002CBD 92 <1> xchg ax, dx 4243 00002CBE E8798D <1> call hexword 4244 <1> @@: 4245 <1> %endif 4246 00002CC1 E9AE8D <1> jmp putsline_crlf 4247 <1> 4248 <1> 4249 <1> %if _MMXSUPP 4250 <1> subcpu 586 4251 <1> dumpregsMMX: 4252 00002CC4 E84CD8 <1> call guard_auxbuff 4253 00002CC7 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 4254 00002CCB 66 <1> o32 4255 00002CCC DD360000 <1> fnsave [0] 4256 00002CD0 BE1C00 <1> mov si, 7*4 4257 00002CD3 B130 <1> mov cl, '0' 4258 00002CD5 BF[0E08] <1> mov di, line_out 4259 <1> .nextreg: 4260 00002CD8 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 4261 00002CDC B84D4D <1> mov ax, "MM" 4262 00002CDF AB <1> stosw 4263 00002CE0 88C8 <1> mov al, cl 4264 00002CE2 B43D <1> mov ah, '=' 4265 00002CE4 AB <1> stosw 4266 00002CE5 51 <1> push cx 4267 00002CE6 B208 <1> mov dl, 8 4268 <1> .nextbyte: 4269 00002CE8 AC <1> lodsb 4270 00002CE9 E8558D <1> call hexbyte 4271 00002CEC B020 <1> mov al, 32 4272 00002CEE F6C201 <1> test dl, 1 4273 00002CF1 7402 <1> jz .oddbyte 4274 00002CF3 B02D <1> mov al, '-' 4275 <1> .oddbyte: 4276 00002CF5 AA <1> stosb 4277 00002CF6 FECA <1> dec dl 4278 00002CF8 75EE <1> jnz .nextbyte 4279 00002CFA 4F <1> dec di 4280 00002CFB B82020 <1> mov ax, 32<<8|32 4281 00002CFE AB <1> stosw 4282 00002CFF 83C602 <1> add si, byte 2 4283 00002D02 59 <1> pop cx 4284 00002D03 F6C101 <1> test cl, 1 4285 00002D06 740A <1> jz .oddreg 4286 00002D08 51 <1> push cx 4287 00002D09 16 <1> push ss 4288 00002D0A 1F <1> pop ds ; ds = es = ss 4289 00002D0B E85C8D <1> call trimputs 4290 00002D0E 59 <1> pop cx 4291 00002D0F BF[0E08] <1> mov di, line_out 4292 <1> .oddreg: 4293 00002D12 FEC1 <1> inc cl 4294 00002D14 80F938 <1> cmp cl, '8' 4295 00002D17 75BF <1> jne .nextreg 4296 00002D19 8E1E[F209] <1> mov ds, word [auxbuff_segorsel] ; => auxbuff 4297 00002D1D 66 <1> o32 4298 00002D1E D9260000 <1> fldenv [0] 4299 00002D22 C3 <1> retn 4300 <1> subcpureset 4301 <1> %endif 2103 %if _RN 2104 %include "fptostr.asm" 2105 <1> 2106 <1> %if 0 2107 <1> 2108 <1> Copyright (C) 2008-2012 C. Masloch 2109 <1> 2110 <1> Usage of the works is permitted provided that this 2111 <1> instrument is retained with the works, so that any entity 2112 <1> that uses the works is notified of this instrument. 2113 <1> 2114 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2115 <1> 2116 <1> %endif 2117 <1> 2118 <1> 2119 <1> usesection lDEBUG_DATA_ENTRY 2120 <1> 2121 <1> ;--- defines procedures 2122 <1> ;--- PowerOf10 2123 <1> ;--- FloatToBCD 2124 <1> ;--- FloatToStr 2125 <1> 2126 <1> ; These are bits in the FP status word. 2127 <1> 2128 <1> FP_LESSTHAN equ 01h 2129 <1> FP_EQUALTO equ 40h 2130 <1> 2131 0000835C 00 <1> align 8, db 0 2132 00008360 0000000000002440 <1> ten: dq 10.0 2133 00008368 0080E03779C34143 <1> ten16: dq 1.0e16 2134 <1> ;rounder:dq 5.0e10 2135 <1> 2136 00008370 00000000000000A002- <1> ten_1: dt 1.0e1 ; 10.0 2136 00008379 40 <1> 2137 0000837A 00000000000000C805- <1> dt 1.0e2 ; 100.0 2137 00008383 40 <1> 2138 00008384 00000000000000FA08- <1> dt 1.0e3 ; 1,000.0 2138 0000838D 40 <1> 2139 0000838E 000000000000409C0C- <1> dt 1.0e4 ; 10,000.0 2139 00008397 40 <1> 2140 00008398 00000000000050C30F- <1> dt 1.0e5 ; 100,000.0 2140 000083A1 40 <1> 2141 000083A2 00000000000024F412- <1> dt 1.0e6 ; 1,000,000.0 2141 000083AB 40 <1> 2142 000083AC 000000000080969816- <1> dt 1.0e7 ; 10,000,000.0 2142 000083B5 40 <1> 2143 000083B6 000000000020BCBE19- <1> dt 1.0e8 ; 100,000,000.0 2143 000083BF 40 <1> 2144 000083C0 0000000000286BEE1C- <1> dt 1.0e9 ; 1,000,000,000.0 2144 000083C9 40 <1> 2145 000083CA 0000000000F9029520- <1> dt 1.0e10 ; 10,000,000,000.0 2145 000083D3 40 <1> 2146 000083D4 0000000040B743BA23- <1> dt 1.0e11 ; 100,000,000,000.0 2146 000083DD 40 <1> 2147 000083DE 0000000010A5D4E826- <1> dt 1.0e12 ; 1,000,000,000,000.0 2147 000083E7 40 <1> 2148 000083E8 000000002AE784912A- <1> dt 1.0e13 ; 10,000,000,000,000.0 2148 000083F1 40 <1> 2149 000083F2 00000080F420E6B52D- <1> dt 1.0e14 ; 100,000,000,000,000.0 2149 000083FB 40 <1> 2150 000083FC 000000A031A95FE330- <1> dt 1.0e15 ; 1,000,000,000,000,000.0 2150 00008405 40 <1> 2151 <1> 2152 00008406 00000004BFC91B8E34- <1> ten_16: dt 1.0e16 2152 0000840F 40 <1> 2153 00008410 9EB5702BA8ADC59D69- <1> dt 1.0e32 2153 00008419 40 <1> 2154 0000841A D795430E058D29AF9E- <1> dt 1.0e48 2154 00008423 40 <1> 2155 00008424 D5A6CFFF491F78C2D3- <1> dt 1.0e64 2155 0000842D 40 <1> 2156 0000842E FCF7DA878F7AE7D708- <1> dt 1.0e80 2156 00008437 41 <1> 2157 00008438 A3149BC516ABB3EF3D- <1> dt 1.0e96 2157 00008441 41 <1> 2158 00008442 9E322399C0AD0F8573- <1> dt 1.0e112 2158 0000844B 41 <1> 2159 0000844C E08CE980C947BA93A8- <1> dt 1.0e128 2159 00008455 41 <1> 2160 00008456 E7A6D3A8C5B902A4DD- <1> dt 1.0e144 2160 0000845F 41 <1> 2161 00008460 AA17E67F2BA116B612- <1> dt 1.0e160 2161 00008469 42 <1> 2162 0000846A 93BF9B8591A228CA47- <1> dt 1.0e176 2162 00008473 42 <1> 2163 00008474 6B5527398DF770E07C- <1> dt 1.0e192 2163 0000847D 42 <1> 2164 0000847E 46618237350C2EF9B1- <1> dt 1.0e208 2164 00008487 42 <1> 2165 00008488 30C93CE3FF96528AE7- <1> dt 1.0e224 2165 00008491 42 <1> 2166 00008492 6617BFD6F3A691991C- <1> dt 1.0e240 2166 0000849B 43 <1> 2167 <1> 2168 0000849C 8EDEF99DFBEB7EAA51- <1> ten_256:dt 1.0e256 2168 000084A5 43 <1> 2169 <1> 2170 <1> ; The remaining exponents are only necessary for 10-byte doubles. 2171 <1> 2172 000084A6 C7910EA6AEA019E3A3- <1> dt 1.0e512 2172 000084AF 46 <1> 2173 000084B0 8CA600CDA89C3F97F6- <1> dt 1.0e768 2173 000084B9 49 <1> 2174 000084BA 170C7581867576C948- <1> dt 1.0e1024 2174 000084C3 4D <1> 2175 000084C4 CB6E85EB0E8C2C869B- <1> dt 1.0e1280 2175 000084CD 50 <1> 2176 000084CE E4A793393B35B8B2ED- <1> dt 1.0e1536 2176 000084D7 53 <1> 2177 000084D8 8CB84A9284DD0DEE3F- <1> dt 1.0e1792 2177 000084E1 57 <1> 2178 000084E2 E55D3DC55D3B8B9E92- <1> dt 1.0e2048 2178 000084EB 5A <1> 2179 000084EC 6F80F44132202ED3E4- <1> dt 1.0e2304 2179 000084F5 5D <1> 2180 000084F6 A6F0A120C054A58C37- <1> dt 1.0e2560 2180 000084FF 61 <1> 2181 00008500 CC77D99B9A0A57BB89- <1> dt 1.0e2816 2181 00008509 64 <1> 2182 0000850A 8B5A8BD8255D89F9DB- <1> dt 1.0e3072 2182 00008513 67 <1> 2183 00008514 45FE99567DEF30A62E- <1> dt 1.0e3328 2183 0000851D 6B <1> 2184 0000851E F8F327BFA2C85DDD80- <1> dt 1.0e3584 2184 00008527 6E <1> 2185 00008528 9B97208A025260C425- <1> dt 1.0e4096 2185 00008531 75 <1> 2186 00008532 B41CE17BE352C98278- <1> dt 1.0e4352 2186 0000853B 78 <1> 2187 0000853C F059D56E621135AECA- <1> dt 1.0e4608 2187 00008545 7B <1> 2188 00008546 6D6D14B97F380BE81C- <1> dt 1.0e4864 2188 0000854F 7F <1> 2189 <1> 2190 <1> 2191 <1> usesection lDEBUG_CODE 2192 <1> 2193 <1> ; Divide or multiply st0 to normalize it 2194 <1> ; 2195 <1> ; INP: ax = exponent word 2196 <1> ; CHG: bx, dx, cl 2197 <1> PowerOf10: 2198 00002D23 56 <1> push si 2199 00002D24 50 <1> push ax 2200 00002D25 85C0 <1> test ax, ax 2201 00002D27 7902 <1> jns .notnegative 2202 00002D29 F7D8 <1> neg ax 2203 <1> .notnegative: 2204 00002D2B D9E8 <1> fld1 2205 00002D2D 88C3 <1> mov bl, al 2206 00002D2F 80E30F <1> and bl, 0Fh ; bits 0..3 2207 00002D32 7406 <1> je .0..3zero 2208 00002D34 BE[7083] <1> mov si, ten_1 2209 00002D37 E82B00 <1> call mul10 2210 <1> .0..3zero: 2211 00002D3A 88C3 <1> mov bl, al 2212 00002D3C B104 <1> mov cl, 4 2213 00002D3E D2EB <1> shr bl, cl 2214 00002D40 80E30F <1> and bl, 0Fh ; bits 4..7 2215 00002D43 7406 <1> je .4..7zero 2216 00002D45 BE[0684] <1> mov si, ten_16 2217 00002D48 E81A00 <1> call mul10 2218 <1> .4..7zero: 2219 00002D4B 88E3 <1> mov bl, ah 2220 00002D4D 80E31F <1> and bl, 1Fh ; bits 8..12 2221 00002D50 7406 <1> jz .8..12zero 2222 00002D52 BE[9C84] <1> mov si, ten_256 2223 00002D55 E80D00 <1> call mul10 2224 <1> .8..12zero: 2225 00002D58 58 <1> pop ax 2226 00002D59 85C0 <1> test ax, ax 2227 00002D5B 7904 <1> jns .notnegative2 2228 00002D5D DEF9 <1> fdivp st1 2229 00002D5F 5E <1> pop si 2230 00002D60 C3 <1> retn 2231 <1> 2232 <1> .notnegative2: 2233 00002D61 DEC9 <1> fmulp st1 2234 00002D63 5E <1> pop si 2235 00002D64 C3 <1> retn 2236 <1> 2237 <1> mul10: 2238 00002D65 FECB <1> dec bl 2239 00002D67 B700 <1> mov bh, 0 2240 00002D69 50 <1> push ax 2241 00002D6A 89D8 <1> mov ax, bx 2242 00002D6C 01C0 <1> add ax, ax 2243 00002D6E 01C0 <1> add ax, ax ; *4 2244 00002D70 01C3 <1> add bx, ax ; *5 2245 00002D72 01DB <1> add bx, bx ; *10 2246 00002D74 58 <1> pop ax 2247 00002D75 DB28 <1> fld tword [bx + si] 2248 00002D77 DEC9 <1> fmulp st1 2249 00002D79 C3 <1> retn 2250 <1> 2251 <1> 2252 <1> ; Convert a floating point register to ASCII. For internal use. 2253 <1> ; The result always has exactly 18 digits, with zero padding 2254 <1> ; on the left if required. 2255 <1> ; 2256 <1> ; INP: st0 = number to convert, 0 <= st0 < 1.0E19 2257 <1> ; di-> 18-character output buffer 2258 <1> ; CHG: si, di, cx, ax 2259 <1> FloatToBCD: 2260 00002D7A 55 <1> push bp 2261 00002D7B 89E5 <1> mov bp, sp 2262 00002D7D 83EC0C <1> sub sp, 12 2263 <1> 2264 <1> ; The fbstp instruction converts the top of the stack to 2265 <1> ; a packed BCD form in ten bytes, with two digits per 2266 <1> ; byte. The top byte has the sign, which we ignore. 2267 00002D80 DF76F4 <1> fbstp [ bp-12 ] 2268 <1> 2269 <1> ; Now we need to unpack the BCD to ASCII. 2270 00002D83 8D76FC <1> lea si, [ bp-4 ] 2271 00002D86 B90900 <1> mov cx, 9 2272 <1> .nextdigits: 2273 00002D89 8A04 <1> mov al, byte [ si ] ; xxxx xxxx AAAA BBBB 2274 00002D8B 4E <1> dec si 2275 <1> %if 1 2276 00002D8C B400 <1> mov ah, 0 ; 0000 0000 AAAA BBBB 2277 00002D8E 51 <1> push cx 2278 00002D8F B104 <1> mov cl, 4 2279 00002D91 D3C8 <1> ror ax, cl ; BBBB xxxx xxxx AAAA 2280 00002D93 D2C4 <1> rol ah, cl ; xxxx BBBB xxxx AAAA 2281 00002D95 59 <1> pop cx 2282 <1> ;and ax, 0F0Fh ; 0000 BBBB 0000 AAAA 2283 <1> %else 2284 <1> aam 16 ; 0000 AAAA 0000 BBBB 2285 <1> xchg al, ah ; 0000 BBBB 0000 AAAA 2286 <1> %endif 2287 00002D96 053030 <1> add ax, "00" 2288 00002D99 AB <1> stosw 2289 00002D9A E2ED <1> loop .nextdigits 2290 00002D9C 89EC <1> mov sp, bp 2291 00002D9E 5D <1> pop bp 2292 00002D9F C3 <1> retn 2293 <1> 2294 <1> 2295 <1> ; Convert a double precision number to a string. 2296 <1> ; 2297 <1> ; Entry: dword [far pfpin] -> 8-byte double to convert, non-zero 2298 <1> ; es = ss : word [pszDbl] -> character buffer 2299 <1> ; 2300 <1> ; Exit: es = ss : word [pszDbl] -> converted value 2301 <1> ; 2302 <1> ; CHG: ax, bx, cx, dx 2303 <1> ; 2304 <1> ; The buffer at pszDbl should be at least 19 bytes long. 2305 <1> ; The buffer needs to be initialized with blanks. 2306 <1> 2307 <1> ;FloatToStr PROC stdcall public USES si di pfpin: ptr TBYTE, pszDbl: PTR BYTE 2308 <1> FloatToStr: 2309 <1> lframe near 2310 <1> lpar word, ??pszDbl ; pszDbl: PTR BYTE, near 2311 <1> lpar dword, ??pfpin ; pfpin: ptr TBYTE, but far 2312 <1> lvar word, ??iExp ; LOCAL iExp: WORD 2313 <1> lvar word, ??mystat ; LOCAL mystat: WORD 2314 <1> lvar 10, ??fpin ; LOCAL fpin: TBYTE 2315 <1> lvar 22, ??szTemp ; LOCAL szTemp[22]: BYTE 2316 00002DA0 5589E58D66DC <1> lenter 2317 <1> 2318 <1> %define iExp bp+???%+%? 2319 <1> %define mystat bp+???%+%? 2320 <1> %define fpin bp+???%+%? 2321 <1> %define szTemp bp+???%+%? 2322 <1> %define pfpin bp+???%+%? 2323 <1> %define pszDbl bp+???%+%? 2324 <1> 2325 00002DA6 1E <1> push ds 2326 00002DA7 56 <1> push si ; USES si 2327 00002DA8 06 <1> push es 2328 00002DA9 57 <1> push di ; USES di 2329 <1> 2330 <1> ; Special case zero has been filtered already. (fxtract fails for zero.) 2331 00002DAA C57604 <1> lds si, [pfpin] 2332 00002DAD 16 <1> push ss 2333 00002DAE 07 <1> pop es 2334 00002DAF 8D7EF2 <1> lea di, [fpin] 2335 00002DB2 B90500 <1> mov cx, 5 2336 00002DB5 F3A5 <1> rep movsw ; store number in local buffer 2337 00002DB7 16 <1> push ss 2338 00002DB8 1F <1> pop ds 2339 <1> 2340 00002DB9 8B7E08 <1> mov di, [pszDbl] ; -> output buffer 2341 <1> 2342 <1> ; Check for a negative number. 2343 00002DBC F646FB80 <1> test byte [fpin+9], 80h 2344 00002DC0 7407 <1> jz .ispositive 2345 00002DC2 8066FB7F <1> and byte [fpin+9], ~80h ; change to positive 2346 00002DC6 B02D <1> mov al, '-' ; store a minus sign 2347 00002DC8 AA <1> stosb 2348 <1> .ispositive: 2349 <1> 2350 <1> ; Load our value onto the stack two times. 2351 00002DC9 DB6EF2 <1> fld tword [fpin] 2352 00002DCC D9C0 <1> fld st0 2353 <1> 2354 <1> ; Compute the closest power of 10 below the number. We can't get an 2355 <1> ; exact value because of rounding. We could get close by adding in 2356 <1> ; log10(mantissa), but it still wouldn't be exact. Since we'll have to 2357 <1> ; check the result anyway, it's silly to waste cycles worrying about 2358 <1> ; the mantissa. 2359 <1> ; 2360 <1> ; The exponent is basically log2(fpin). Those of you who remember 2361 <1> ; algebra realize that log2(fpin) x log10(2) = log10(fpin), which is 2362 <1> ; what we want. 2363 <1> 2364 00002DCE D9F4 <1> fxtract ; ST = mantissa, exponent, fpin 2365 00002DD0 DDD8 <1> fstp st0 ; discard the mantissa 2366 00002DD2 D9EC <1> fldlg2 ; push log10(2) 2367 00002DD4 DEC9 <1> fmulp st1, st0 ; ST = log10(fpin), fpin 2368 00002DD6 DF5EFE <1> fistp word [iExp] ; ST = fpin 2369 <1> 2370 <1> ; An 8-byte double can carry almost 16 digits of precision. Actually, it's 2371 <1> ; 15.9 digits, so some numbers close to 1E17 will be wrong in the bottom 2372 <1> ; digit. If this is a concern, change the 18 or 16 to a 15. 2373 <1> ; 2374 <1> ; A 10-byte double can carry almost 19 digits, but fbstp only stores the 2375 <1> ; guaranteed 18. Since we're doing 10-byte doubles, we check for 18 instead of 16. 2376 <1> 2377 00002DD9 837EFE12 <1> cmp word [iExp], 18 2378 00002DDD 7332 <1> jae .notbelow18 2379 00002DDF D9C0 <1> fld st0 ; ST = fpin, fpin 2380 00002DE1 D9FC <1> frndint ; ST = int(fpin), fpin 2381 00002DE3 D8D9 <1> fcomp st1 ; ST = fpin, status set 2382 00002DE5 9BDD7EFC <1> fstsw word [mystat] 2383 00002DE9 8B46FC <1> mov ax, word [mystat] 2384 00002DEC 9E <1> sahf 2385 00002DED 7522 <1> jne .notequal 2386 <1> 2387 <1> ; We have an integer! Lucky day. Go convert it into a temp buffer. 2388 <1> 2389 00002DEF 57 <1> push di 2390 00002DF0 8D7EDC <1> lea di, [szTemp] 2391 00002DF3 E884FF <1> call FloatToBCD 2392 00002DF6 5F <1> pop di 2393 <1> 2394 00002DF7 B81100 <1> mov ax, 16+1 2395 00002DFA 8B4EFE <1> mov cx, word [iExp] 2396 00002DFD 29C8 <1> sub ax, cx 2397 00002DFF 41 <1> inc cx 2398 00002E00 8D76DC <1> lea si, [szTemp] 2399 00002E03 01C6 <1> add si, ax 2400 <1> 2401 <1> ; The off-by-one order of magnitude problem below can hit us here. 2402 <1> ; We just trim off the possible leading zero. 2403 <1> 2404 00002E05 803C30 <1> cmp byte [si], '0' 2405 00002E08 7502 <1> jnz .not0digit 2406 00002E0A 46 <1> inc si 2407 00002E0B 49 <1> dec cx 2408 <1> .not0digit: 2409 <1> 2410 <1> ; Copy the rest of the converted BCD value to our buffer. 2411 <1> 2412 00002E0C F3A4 <1> rep movsb 2413 00002E0E E99800 <1> jmp .ftsExit 2414 <1> 2415 <1> .notequal: 2416 <1> .notbelow18: 2417 <1> 2418 <1> ; Have fbstp round to 17 places. 2419 <1> 2420 00002E11 B81000 <1> mov ax, 16 ; experiment 2421 00002E14 2B46FE <1> sub ax, word [iExp] ; adjust exponent to 17 2422 00002E17 E809FF <1> call PowerOf10 2423 <1> 2424 <1> ; Either we have exactly 17 digits, or we have exactly 16 digits. We can 2425 <1> ; detect that condition and adjust now. 2426 <1> 2427 00002E1A DC16[6883] <1> fcom qword [ten16] 2428 <1> ; x0xxxx00 means top of stack > ten16 2429 <1> ; x0xxxx01 means top of stack < ten16 2430 <1> ; x1xxxx00 means top of stack = ten16 2431 00002E1E 9BDD7EFC <1> fstsw word [mystat] 2432 00002E22 8B46FC <1> mov ax, word [mystat] 2433 00002E25 F6C401 <1> test ah, 1 2434 00002E28 7407 <1> jz .notset1 2435 00002E2A DC0E[6083] <1> fmul qword [ten] 2436 00002E2E FF4EFE <1> dec word [iExp] 2437 <1> .notset1: 2438 <1> 2439 <1> ; Go convert to BCD. 2440 <1> 2441 00002E31 57 <1> push di 2442 00002E32 8D7EDC <1> lea di, [szTemp] 2443 00002E35 E842FF <1> call FloatToBCD 2444 00002E38 5F <1> pop di 2445 <1> 2446 00002E39 8D76DD <1> lea si, [szTemp+1] ; point to converted buffer 2447 <1> 2448 <1> ; If the exponent is between -15 and 16, we should express this as a number 2449 <1> ; without scientific notation. 2450 <1> 2451 00002E3C 8B4EFE <1> mov cx, word [iExp] 2452 00002E3F 51 <1> push cx 2453 00002E40 83C10F <1> add cx, 15 2454 00002E43 83F91F <1> cmp cx, 15+16 2455 00002E46 59 <1> pop cx 2456 00002E47 7734 <1> ja .fts6 2457 <1> 2458 <1> ; If the exponent is less than zero, we insert '0.', then -cx 2459 <1> ; leading zeros, then 16 digits of mantissa. If the exponent is 2460 <1> ; positive, we copy cx+1 digits, then a decimal point (maybe), then 2461 <1> ; the remaining 16-cx digits. 2462 <1> 2463 00002E49 41 <1> inc cx 2464 00002E4A 83F900 <1> cmp cx, byte 0 2465 00002E4D 7F0F <1> jg .ispos1 2466 00002E4F B8302E <1> mov ax, "0." 2467 00002E52 AB <1> stosw 2468 00002E53 F7D9 <1> neg cx 2469 00002E55 B030 <1> mov al, '0' 2470 00002E57 F3AA <1> rep stosb 2471 00002E59 B91000 <1> mov cx, 16 2472 00002E5C EB0B <1> jmp short .fts3 2473 <1> .ispos1: 2474 00002E5E F3A4 <1> rep movsb 2475 00002E60 B02E <1> mov al, '.' 2476 00002E62 AA <1> stosb 2477 00002E63 B91000 <1> mov cx, 16 2478 00002E66 2B4EFE <1> sub cx, word [iExp] 2479 <1> .fts3: 2480 00002E69 F3A4 <1> rep movsb 2481 <1> 2482 <1> ; Trim off trailing zeros. 2483 <1> 2484 <1> .nextitem2: 2485 00002E6B 807DFF30 <1> cmp byte [di-1], '0' 2486 00002E6F 7503 <1> jne .fts1 2487 00002E71 4F <1> dec di 2488 00002E72 EBF7 <1> jmp short .nextitem2 2489 <1> .fts1: 2490 <1> 2491 <1> ; If we cleared out all the decimal digits, kill the decimal point, too. 2492 <1> 2493 00002E74 807DFF2E <1> cmp byte [di-1], '.' 2494 00002E78 7501 <1> jnz .fts2 2495 00002E7A 4F <1> dec di 2496 <1> .fts2: 2497 <1> 2498 <1> ; That's it. 2499 <1> 2500 00002E7B EB2C <1> jmp short .ftsExit 2501 <1> .fts6: 2502 <1> 2503 <1> ; Now convert this to a standard, usable format. If needed, a minus 2504 <1> ; sign is already present in the outgoing buffer, and di already points 2505 <1> ; past it. 2506 <1> 2507 00002E7D A4 <1> movsb ; copy the first digit 2508 00002E7E B02E <1> mov al, '.' 2509 00002E80 AA <1> stosb ; plop in a decimal point 2510 00002E81 A5 <1> movsw 2511 00002E82 A5 <1> movsw 2512 00002E83 A5 <1> movsw ; copy six more digits 2513 <1> 2514 <1> %if 0 2515 <1> 2516 <1> ; The printf %g specified trims off trailing zeros here. I dislike 2517 <1> ; this, so I've disabled it. Comment out the %if 0 and %endif if you 2518 <1> ; want this. 2519 <1> 2520 <1> .fts61: 2521 <1> cmp byte [di-1], '0' 2522 <1> je .fts62 2523 <1> dec di 2524 <1> jmp short .fts61 2525 <1> .fts62: 2526 <1> %endif 2527 <1> 2528 <1> ; Shove in the exponent. If you support 10-byte reals, remember to 2529 <1> ; allow 4 digits for the exponent. 2530 <1> 2531 00002E84 B8652B <1> mov ax, "e+" 2532 00002E87 8B56FE <1> mov dx, word [iExp] 2533 00002E8A 85D2 <1> test dx, dx 2534 00002E8C 7904 <1> jns .fts7 2535 00002E8E F7DA <1> neg dx 2536 00002E90 B42D <1> mov ah, '-' 2537 <1> .fts7: 2538 00002E92 AB <1> stosw 2539 <1> 2540 00002E93 92 <1> xchg ax, dx 2541 00002E94 BE0A00 <1> mov si, 10 2542 00002E97 B90400 <1> mov cx, 4 2543 <1> .fts8: 2544 00002E9A 31D2 <1> xor dx, dx 2545 00002E9C F7F6 <1> div si 2546 00002E9E 52 <1> push dx 2547 00002E9F E2F9 <1> loop .fts8 2548 00002EA1 B104 <1> mov cl, 4 2549 <1> .fts9: 2550 00002EA3 58 <1> pop ax 2551 00002EA4 0430 <1> add al, '0' 2552 00002EA6 AA <1> stosb 2553 00002EA7 E2FA <1> loop .fts9 2554 <1> 2555 <1> %if 0 2556 <1> add di, byte 4 ; -> terminator 2557 <1> %endif 2558 <1> 2559 <1> ; Clean up and go home. 2560 <1> 2561 <1> .ftsExit: 2562 <1> ; fldcw [stat] ; restore control word 2563 <1> ; fwait 2564 <1> %if 0 2565 <1> mov ax, di 2566 <1> sub ax, word [pszDbl] 2567 <1> mov cx, 21 2568 <1> sub cx, ax 2569 <1> mov al, 32 2570 <1> rep stosb 2571 <1> %endif 2572 00002EA9 5F <1> pop di 2573 00002EAA 07 <1> pop es 2574 00002EAB 5E <1> pop si 2575 00002EAC 1F <1> pop ds 2576 <1> 2577 00002EAD 89EC5D <1> lleave 2578 00002EB0 C20600 <1> lret 2579 <1> 2580 <1> %undef pfpin 2581 <1> %undef pszDbl 2582 <1> %undef iExp 2583 <1> %undef mystat 2584 <1> %undef fpin 2585 <1> %undef szTemp 2105 %endif 2106 %include "run.asm" 2107 <1> 2108 <1> %if 0 2109 <1> 2110 <1> lDebug code and commands (P, T, G) to run debuggee code 2111 <1> 2112 <1> Copyright (C) 1995-2003 Paul Vojta 2113 <1> Copyright (C) 2008-2012 C. Masloch 2114 <1> 2115 <1> Usage of the works is permitted provided that this 2116 <1> instrument is retained with the works, so that any entity 2117 <1> that uses the works is notified of this instrument. 2118 <1> 2119 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2120 <1> 2121 <1> %endif 2122 <1> 2123 <1> 2124 <1> usesection lDEBUG_CODE 2125 <1> 2126 <1> gg_repeat: 2127 00002EB3 E879D6 <1> call guard_re 2128 00002EB6 800E[A000]20 <1> setopt [internalflags2], dif2_gg_again 2129 00002EBB EB17 <1> jmp @F 2130 <1> 2131 <1> ; G command - go. 2132 <1> gg: 2133 00002EBD 4E <1> dec si 2134 00002EBE 4E <1> dec si 2135 00002EBF BA[7D65] <1> mov dx, msg.goto 2136 00002EC2 E8168A <1> call isstring? 2137 00002EC5 7503E9EA9E <1> je cmd_goto 2138 00002ECA 46 <1> inc si 2139 00002ECB AC <1> lodsb 2140 <1> 2141 00002ECC E860D6 <1> call guard_re 2142 <1> 2143 00002ECF 8026[A000]DF <1> clropt [internalflags2], dif2_gg_again 2144 <1> @@: 2145 00002ED4 C706[C000][6370] <1> mov word [gg_deferred_message], msg.empty_message 2146 00002EDA 8326[C200]00 <1> and word [bb_deferred_message_in_lineout_behind], 0 2147 <1> 2148 00002EDF BB[1404] <1> mov bx, dmycmd 2149 00002EE2 F606[7E00]02 <1> testopt [options], gg_no_autorepeat 2150 00002EE7 7503 <1> jnz @F 2151 00002EE9 BB[B32E] <1> mov bx, gg_repeat 2152 <1> @@: 2153 00002EEC 891E[DA0B] <1> mov word [lastcmd], bx 2154 <1> 2155 00002EF0 800E[A000]08 <1> setopt [internalflags2], dif2_gg_is_gg 2156 00002EF5 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2159 <1> 2160 00002EFA FF36[900C] <1> push word [reg_cs] ; save original CS 2161 00002EFE 8F06[D60B] <1> pop word [eqladdr+4] 2162 00002F02 E82118 <1> call parseql ; process =addr 2163 <1> 2164 00002F05 F606[7E00]01 <1> testopt [options], gg_do_not_skip_bp 2165 00002F0A 752C <1> jnz .do_not_skip_cseip 2166 00002F0C 800E[A000]01 <1> setopt [internalflags2], dif2_gg_is_first 2167 <1> 2168 00002F11 803E[D00B]00 <1> cmp byte [eqflag], 0 2169 00002F16 7508 <1> jne .cseip_take_eql 2170 <1> 2171 00002F18 66 <1> _386_PM_o32 ; xor ecx, ecx 2172 00002F19 31C9 <1> xor cx, cx 2173 00002F1B E86808 <1> call get_cseip_ecx_linear 2174 00002F1E EB0C <1> jmp .got_cseip 2175 <1> 2176 <1> .cseip_take_eql: 2177 00002F20 8B1E[D60B] <1> mov bx, word [eqladdr + 4] 2178 00002F24 66 <1> _386_PM_o32 ; mov edx, dword [eqladdr] 2179 00002F25 8B16[D20B] <1> mov dx, word [eqladdr] 2180 00002F29 E86608 <1> call getlinear 2181 <1> .got_cseip: 2182 00002F2C 7303E9E175 <1> jc error 2183 00002F31 A3[B400] <1> mov word [gg_first_cseip_linear], ax 2184 00002F34 8916[B600] <1> mov word [gg_first_cseip_linear + 2], dx 2185 <1> .do_not_skip_cseip: 2186 <1> 2187 <1> %ifn _NUM_G_BP 2188 <1> call chkeol 2189 <1> 2190 <1> testopt [options3], opt3_gg_no_paging 2191 <1> jz @F 2192 <1> clropt [internalflags], pagedcommand 2193 <1> @@: 2194 <1> call tpg_initialise_empty_auxbuff 2195 <1> 2196 <1> %if _BREAKPOINTS 2197 <1> call bb_writepoints_init_reset 2198 <1> %endif 2199 <1> 2200 <1> %else 2201 00002F38 4E <1> dec si 2202 00002F39 E8248A <1> call skipcomma 2203 00002F3C 4E <1> dec si 2204 00002F3D BA[6970] <1> mov dx, msg.again 2205 00002F40 E89889 <1> call isstring? 2206 00002F43 7531 <1> jne @F ; (after this, do not dec si!) 2207 <1> 2208 <1> gg_again: 2209 <1> 2210 <1> %if _AUXBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 2211 <1> %error auxbuff not large enough for gg breakpoint list 2212 <1> %endif 2213 <1> 2214 00002F45 56 <1> push si 2215 00002F46 BE[7B07] <1> mov si, g_bplist.used_count 2216 00002F49 31C0 <1> xor ax, ax 2217 00002F4B AC <1> lodsb ; ax = number of breakpoints set yet 2218 00002F4C 4E <1> dec si ; -> gg breakpoint list 2219 00002F4D 89C1 <1> mov cx, ax 2220 00002F4F 01C9 <1> add cx, cx 2221 00002F51 01C9 <1> add cx, cx ; * 4 2222 <1> %if BPSIZE == 4 2223 <1> %elif BPSIZE == 5 2224 <1> add cx, ax ; * 5 2225 <1> %elif BPSIZE == 6 2226 <1> add cx, ax ; * 5 2227 <1> add cx, ax ; * 6 2228 <1> %elif BPSIZE == 9 2229 00002F53 01C9 <1> add cx, cx ; * 8 2230 00002F55 01C1 <1> add cx, ax ; * 9 2231 <1> %else 2232 <1> %error Unexpected breakpoint size 2233 <1> %endif 2234 00002F57 41 <1> inc cx ; include the count 2235 00002F58 E8B8D5 <1> call guard_auxbuff 2236 00002F5B 8E06[F209] <1> mov es, word [auxbuff_segorsel] 2237 00002F5F 31FF <1> xor di, di ; es:di -> auxbuff 2238 00002F61 F3A4 <1> rep movsb ; initialise auxbuff list 2239 <1> 2240 00002F63 5E <1> pop si ; si -> separator after "AGAIN" keyword 2241 00002F64 BF0100 <1> mov di, 1 ; -> first point 2242 00002F67 89C1 <1> mov cx, ax 2243 00002F69 B0CC <1> mov al, 0CCh 2244 00002F6B E306 <1> jcxz .end 2245 <1> .loop: 2246 00002F6D 83C708 <1> add di, BPSIZE - 1 ; -> point content 2247 00002F70 AA <1> stosb ; initialise breakpoint content 2248 00002F71 E2FA <1> loop .loop 2249 <1> .end: 2250 <1> ; es:di -> after last breakpoint in array 2251 00002F73 E9B200 <1> jmp gg3 ; parse additional points (do not dec si!) 2252 <1> 2253 <1> @@: 2254 00002F76 F606[A000]20 <1> testopt [internalflags2], dif2_gg_again 2255 00002F7B 75C8 <1> jnz gg_again 2256 <1> 2257 <1> 2258 <1> gg_list: 2259 00002F7D BA[6470] <1> mov dx, msg.list 2260 00002F80 E85889 <1> call isstring? 2261 00002F83 7403E99400 <1> jne .not 2262 <1> 2263 00002F88 AC <1> lodsb 2264 00002F89 E8C389 <1> call chkeol 2265 <1> 2266 00002F8C 800E[A000]05 <1> setopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip 2267 <1> 2268 00002F91 BE[7C07] <1> mov si, g_bplist.bp 2269 00002F94 31C9 <1> xor cx, cx 2270 00002F96 8A4CFF <1> mov cl, byte [si - 1] 2271 00002F99 31DB <1> xor bx, bx 2272 00002F9B E379 <1> jcxz .none 2273 <1> .loop: 2274 00002F9D 43 <1> inc bx 2275 00002F9E 51 <1> push cx 2276 00002F9F 53 <1> push bx 2277 <1> 2278 00002FA0 89D8 <1> mov ax, bx ; 1-based index 2279 00002FA2 BF[0E08] <1> mov di, line_out 2280 00002FA5 E84707 <1> call ordinalbyte 2281 <1> 2282 00002FA8 57 <1> push di 2283 00002FA9 81EF[1108] <1> sub di, line_out + 1 + 2 2284 <1> ; 1 = a digit, 2 = ordinal suffix, 2285 <1> ; result = how many additional digits are used 2286 00002FAD BA[ED6F] <1> mov dx, msg.list_bp.first 2287 00002FB0 01FA <1> add dx, di 2288 00002FB2 E83B8E <1> call putsz ; show blanks first 2289 00002FB5 5F <1> pop di 2290 00002FB6 E8BD8A <1> call putsline 2291 <1> 2292 00002FB9 E8A504 <1> call gg_bb_lods_bp_linear 2293 <1> ; BPSIZE implied 2294 <1> 2295 00002FBC BF[0770] <1> mov di, msg.list_bp.address1 2296 00002FBF 92 <1> xchg ax, dx 2297 00002FC0 E8778A <1> call hexword 2298 00002FC3 47 <1> inc di 2299 <1> ; mov di, msg.list_bp.address2 2300 00002FC4 92 <1> xchg ax, dx 2301 00002FC5 E8728A <1> call hexword 2302 <1> 2303 00002FC8 E8EA06 <1> call gg_bb_check_is_first 2304 <1> ; we set up the dif2_gg_skip_cseip flag, 2305 00002FCB B9[4574] <1> mov cx, msg.list_bp_not_cseip 2306 <1> ; so if CY (do not skip), initialise this 2307 00002FCE 721C <1> jc .not_cseip 2308 <1> ; if NC (do skip), use other string 2309 <1> %if _PM 2310 00002FD0 53 <1> push bx 2311 00002FD1 8B1E[900C] <1> mov bx, word [reg_cs] 2312 00002FD5 803E[D00B]00 <1> cmp byte [eqflag], 0 2313 00002FDA 7404 <1> je @F 2314 00002FDC 8B1E[D60B] <1> mov bx, word [eqladdr + 4] 2315 <1> @@: 2316 00002FE0 E8852D <1> call test_d_b_bit 2317 00002FE3 5B <1> pop bx 2318 00002FE4 B9[1E70] <1> mov cx, msg.list_bp_cseip_32 2319 00002FE7 7503 <1> jnz @F ; if 32-bit cs --> 2320 <1> %endif 2321 00002FE9 B9[3070] <1> mov cx, msg.list_bp_csip_16 2322 <1> @@: 2323 <1> .not_cseip: 2324 <1> %if BPSIZE == 6 || BPSIZE == 9 2325 <1> ; INP: dx:ax = linear address 2326 <1> ; si -> (d)word offset 2327 <1> ; di -> where to store 2328 <1> ; OUT: cx = length displayed 2329 <1> ; si -> after offset 2330 <1> ; di -> after stored string 2331 <1> ; CHG: ax, dx 2332 00002FEC 51 <1> push cx 2333 00002FED BF[0E08] <1> mov di, line_out 2334 00002FF0 E8AC5B <1> call bp_display_offset ; BPSIZE implied 2335 00002FF3 57 <1> push di 2336 <1> %endif 2337 00002FF4 BF[1B70] <1> mov di, msg.list_bp.value 2338 00002FF7 AC <1> lodsb ; BPSIZE implied 2339 00002FF8 E8468A <1> call hexbyte 2340 <1> 2341 00002FFB BA[F16F] <1> mov dx, msg.list_bp.second 2342 00002FFE E8EF8D <1> call putsz 2343 <1> 2344 <1> %if BPSIZE == 6 || BPSIZE == 9 2345 00003001 5F <1> pop di 2346 00003002 E8718A <1> call putsline 2347 00003005 59 <1> pop cx 2348 <1> %endif 2349 <1> 2350 00003006 BA[1170] <1> mov dx, msg.list_bp.third 2351 00003009 E8E48D <1> call putsz 2352 <1> 2353 0000300C 89CA <1> mov dx, cx 2354 0000300E E8DF8D <1> call putsz 2355 <1> 2356 00003011 5B <1> pop bx 2357 00003012 59 <1> pop cx 2358 00003013 E288 <1> loop .loop 2359 <1> .end: 2360 <1> ; mov dx, msg.list_bp_first_detected 2361 <1> ; testopt [internalflags2], dif2_gg_first_detected 2362 <1> ; jnz .putsz 2363 00003015 C3 <1> retn 2364 <1> 2365 <1> .none: 2366 00003016 BA[4170] <1> mov dx, msg.list_bp_none 2367 <1> .putsz: 2368 00003019 E9D48D <1> jmp putsz 2369 <1> 2370 <1> .not: 2371 <1> 2372 <1> ; Store the address of each breakpoint into the buffer. We also 2373 <1> ; make sure that there aren't too many breakpoints. (The user can 2374 <1> ; specify them with 2 byte per breakpoints which gives about 128 2375 <1> ; breakpoints with a full command line.) The breakpoints will only 2376 <1> ; be set later when we have verified that the line contains no 2377 <1> ; syntax errors and that there aren't too many breakpoints. 2378 <1> ; 2379 <1> ; Note: With "G AGAIN" (or the gg_repeat handler), the user 2380 <1> ; can actually specify an arbitrary amount of 2381 <1> ; breakpoints. However, we limit the amount. 2382 <1> %if _AUXBUFFSIZE < (BPSIZE * _NUM_G_BP + 1) 2383 <1> %error auxbuff not large enough for gg breakpoint list 2384 <1> %endif 2385 0000301C E8F4D4 <1> call guard_auxbuff 2386 0000301F 8E06[F209] <1> mov es, word [auxbuff_segorsel] 2387 00003023 31FF <1> xor di, di ; es:di -> auxbuff 2388 00003025 31C0 <1> xor ax, ax 2389 00003027 AA <1> stosb ; counter of saved breakpoints 2390 <1> gg3: 2391 <1> ; dec si ; don't use skipcomm0 instead - need to restore al 2392 00003028 E83589 <1> call skipcomma 2393 0000302B E80C89 <1> call iseol? 2394 0000302E 7453 <1> je gg4 ; if done --> 2395 <1> 2396 00003030 06 <1> push es 2397 00003031 16 <1> push ss 2398 00003032 07 <1> pop es ; set STT es = ds = ss 2399 00003033 4E <1> dec si 2400 00003034 BA[7465] <1> mov dx, msg.remember 2401 00003037 E8A188 <1> call isstring? 2402 0000303A AC <1> lodsb 2403 0000303B 7517 <1> jne @F 2404 <1> 2405 0000303D E80F89 <1> call chkeol 2406 00003040 89F9 <1> mov cx, di ; -> after last point, = size of list 2407 00003042 1E <1> push ds 2408 00003043 07 <1> pop es 2409 00003044 1F <1> pop ds ; swap 2410 00003045 31F6 <1> xor si, si ; ds:si -> auxbuff 2411 00003047 BF[7B07] <1> mov di, g_bplist.used_count 2412 <1> ; es:di -> gg breakpoint list 2413 0000304A F3A4 <1> rep movsb ; copy list over 2414 0000304C 16 <1> push ss 2415 0000304D 1F <1> pop ds ; reset segregs 2416 0000304E 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 2417 00003053 C3 <1> retn 2418 <1> 2419 <1> @@: 2420 00003054 8B1E[D60B] <1> mov bx, word [eqladdr+4]; default segment 2421 00003058 E88307 <1> call getlinearaddr ; get linear address into bx:dx (CHG edx) 2422 0000305B 07 <1> pop es 2423 0000305C 7303E9B174 <1> jc error 2424 00003061 26803E000010 <1> cmp byte [es:0], _NUM_G_BP 2425 00003067 7203E9A674 <1> jae error ; can't store another breakpoint, g_bplist is full --> 2426 0000306C 92 <1> xchg ax, dx ; ax = low word 2427 0000306D AB <1> stosw 2428 0000306E 93 <1> xchg ax, bx ; to store high byte/word 2429 <1> %if _PM 2430 0000306F AB <1> stosw 2431 <1> %else 2432 <1> stosb ; bits 24-31 (dh) always zero in 21-bit addresses 2433 <1> %endif 2434 <1> ; BPSIZE implied 2435 <1> %if BPSIZE == 6 2436 <1> mov ax, word [bp_offset] 2437 <1> stosw ; write offset (R86M-only 16-bit) 2438 <1> %elif BPSIZE == 9 2439 00003070 A1[5085] <1> mov ax, word [bp_offset] 2440 00003073 AB <1> stosw 2441 00003074 A1[5285] <1> mov ax, word [bp_offset + 2] 2442 00003077 AB <1> stosw ; write offset (PM 32-bit) 2443 <1> %endif 2444 00003078 B0CC <1> mov al, 0CCh 2445 0000307A AA <1> stosb ; later filled with the byte read from this address 2446 0000307B 26FE060000 <1> inc byte [es:0] ; increment count 2447 00003080 4E <1> dec si 2448 00003081 EBA5 <1> jmp short gg3 2449 <1> 2450 <1> gg4: 2451 00003083 89F9 <1> mov cx, di ; -> after last point, = size of list 2452 00003085 06 <1> push es 2453 00003086 1E <1> push ds 2454 00003087 07 <1> pop es 2455 00003088 1F <1> pop ds ; swap 2456 00003089 31F6 <1> xor si, si ; ds:si -> auxbuff 2457 0000308B BF[7B07] <1> mov di, g_bplist.used_count 2458 <1> ; es:di -> gg breakpoint list 2459 0000308E F3A4 <1> rep movsb ; copy list over 2460 00003090 16 <1> push ss 2461 00003091 1F <1> pop ds ; reset segregs 2462 00003092 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 2463 <1> 2464 00003097 F606[8400]08 <1> testopt [options3], opt3_gg_no_paging 2465 0000309C 7405 <1> jz @F 2466 0000309E 8026[9C00]F7 <1> clropt [internalflags], pagedcommand 2467 <1> @@: 2468 <1> 2469 <1> gg5: 2470 000030A3 E87316 <1> call tpg_initialise_empty_auxbuff 2471 <1> %if _BREAKPOINTS 2472 000030A6 E83804 <1> call bb_writepoints_init_reset 2473 <1> ; try to write bb points 2474 <1> ; (detect and write to cseip point too) 2475 <1> ; If this fails, it handles the errors and tries to restore 2476 <1> ; all its own points, then aborts the command. 2477 <1> 2478 <1> ; This call might return modeswitched. 2479 <1> %endif 2480 000030A9 BE[7B07] <1> mov si, g_bplist.used_count 2481 000030AC 31C0 <1> xor ax, ax 2482 000030AE AC <1> lodsb ; si-> first point 2483 000030AF 89C1 <1> mov cx, ax ; cx = number of saved breakpoints 2484 000030B1 51 <1> push cx 2485 000030B2 E8A305 <1> call gg_writepoints ; Store breakpoint bytes in the given locations. 2486 000030B5 5A <1> pop dx 2487 <1> ; dx = number of points tried to write 2488 <1> ; cx = number of points not written 2489 000030B6 7342 <1> jnc .points_set ; successful --> 2490 <1> 2491 <1> 2492 <1> ; Failure to write to a gg breakpoint. Now the fun starts! 2493 000030B8 29CA <1> sub dx, cx ; = number of points written 2494 000030BA 89D1 <1> mov cx, dx 2495 <1> ; We now first have to try restoring all the points we 2496 <1> ; already set because they might be inside the DOS or 2497 <1> ; BIOS handlers we would otherwise call. So instead of 2498 <1> ; displaying errors as we detect them, all the intel is 2499 <1> ; stored first until all points have been taken care of 2500 <1> ; (if possible). We then display error messages. 2501 <1> %if _BREAKPOINTS 2502 000030BC 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 2503 <1> %endif 2504 000030BF 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 2505 000030C1 01D2 <1> add dx, dx 2506 000030C3 29D4 <1> sub sp, dx ; reserve space for gg error info 2507 000030C5 50 <1> push ax ; store error info on point that failed to be written 2508 <1> 2509 <1> ; The gg points were written last, so restore them first. 2510 000030C6 E89604 <1> call gg_restorepoints_and_init_error_info 2511 <1> %if _BREAKPOINTS 2512 000030C9 51 <1> push cx 2513 <1> ; Next, restore the bb points. 2514 000030CA B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 2515 000030CD E8DF04 <1> call bb_restorepoints_and_init_error_info 2516 000030D0 59 <1> pop cx ; (preserve index of failed gg point) 2517 <1> %endif 2518 000030D1 58 <1> pop ax 2519 <1> 2520 000030D2 E8AA01 <1> call put_deferred_message_silent 2521 <1> ; CHG: dx 2522 <1> 2523 <1> ; ax = info on initially failed point 2524 <1> ; cx = 0-based index of initially failed point 2525 <1> ; = number of points tried to restore 2526 000030D5 89CE <1> mov si, cx 2527 000030D7 01F6 <1> add si, si 2528 000030D9 01F6 <1> add si, si ; *4 2529 <1> %if BPSIZE == 4 2530 <1> %elif BPSIZE == 5 2531 <1> add si, cx ; * 5 2532 <1> %elif BPSIZE == 6 2533 <1> add si, cx ; * 5 2534 <1> add si, cx ; * 6 2535 <1> %elif BPSIZE == 9 2536 000030DB 01F6 <1> add si, si ; * 8 2537 000030DD 01CE <1> add si, cx ; * 9 2538 <1> %else 2539 <1> %error Unexpected breakpoint size 2540 <1> %endif 2541 000030DF 81C6[7C07] <1> add si, g_bplist.bp 2542 <1> 2543 <1> ; si-> point 2544 <1> ; ax = info (ah = reason, al = new value if reason 3) 2545 <1> ; cx = 0-based index of initially failed point 2546 000030E3 51 <1> push cx 2547 000030E4 FF7402 <1> push word [si + 2] 2548 000030E7 FF34 <1> push word [si] ; stack: linear address 2549 000030E9 BB0080 <1> mov bx, 8000h ; bh = 80h (gg), 2550 <1> ; bl = what we tried to restore (n/a) 2551 000030EC E8F20F <1> call display_breakpoint_failure 2552 000030EF 59 <1> pop cx 2553 000030F0 E85606 <1> call gg_handlefailedrestore 2554 <1> %if _BREAKPOINTS 2555 000030F3 E82106 <1> call bb_handlefailedrestore 2556 000030F6 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2557 <1> %else 2558 <1> mov sp, bp 2559 <1> %endif 2560 <1> ; (discard bb + gg error info) 2561 000030F9 C3 <1> retn 2562 <1> 2563 <1> 2564 <1> .points_set: 2565 <1> ; All bb and gg points were successfully written. 2566 <1> ; Next: Handle cseip case, if such a point has been detected. 2567 <1> 2568 <1> 2569 <1> ; old cseip breakpoint handling comment: 2570 <1> ; interrupt ? emuint : .isstdtrace (including DPMI hack, pushf handling) 2571 <1> 2572 <1> %endif ; _NUM_G_BP 2573 <1> 2574 <1> 2575 <1> %if _NUM_G_BP || _BREAKPOINTS 2576 000030FA F606[A000]10 <1> testopt [internalflags2], dif2_gg_first_detected 2577 000030FF 7503E91C01 <1> jz .only_run ; easy case, no cseip point detected --> 2578 <1> 2579 <1> 2580 <1> ; Enter special mode: Restore cseip breakpoint content. 2581 00003104 800E[A000]02 <1> setopt [internalflags2], dif2_gg_skip_non_cseip 2582 <1> 2583 00003109 89D1 <1> mov cx, dx ; = number of points set 2584 <1> %if _BREAKPOINTS 2585 0000310B 83EC20 <1> sub sp, _NUM_B_BP * 2 2586 <1> %endif 2587 0000310E 89E5 <1> mov bp, sp ; -> behind error info 2588 <1> %if _NUM_G_BP 2589 00003110 89CA <1> mov dx, cx 2590 00003112 01D2 <1> add dx, dx 2591 00003114 29D4 <1> sub sp, dx 2592 00003116 E84604 <1> call gg_restorepoints_and_init_error_info 2593 <1> 2594 00003119 7326 <1> jnc .gg_restore_cseip_success 2595 <1> 2596 <1> 2597 <1> ; Error in gg_restorepoints. Try to restore other gg, all bb. 2598 <1> 2599 <1> ; Exit special mode: Handle non-cseip breakpoints again. 2600 0000311B 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 2601 <1> 2602 <1> ; Enter special mode: Skip cseip breakpoints. 2603 00003120 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 2604 <1> 2605 <1> ; As we already tried to restore all cseip gg points, 2606 <1> ; here we skip these in the gg_restorepoints call. 2607 00003125 E83A04 <1> call gg_restorepoints 2608 <1> 2609 <1> ; Exit special mode: No longer skip cseip breakpoints. 2610 00003128 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 2611 <1> 2612 <1> ; Any cseip bb points aren't yet restored, so do not skip them. 2613 <1> %if _BREAKPOINTS 2614 0000312D 51 <1> push cx 2615 0000312E B91000 <1> mov cx, _NUM_B_BP 2616 00003131 E87B04 <1> call bb_restorepoints_and_init_error_info 2617 00003134 59 <1> pop cx 2618 <1> %endif 2619 <1> %else 2620 <1> jmp .gg_restore_cseip_success 2621 <1> %endif 2622 <1> 2623 <1> .gg_bb_cseip_fail_common: 2624 <1> ; The failure that led us here is already noted in the info. 2625 <1> %if _NUM_G_BP 2626 00003135 E81106 <1> call gg_handlefailedrestore 2627 <1> %endif 2628 <1> %if _BREAKPOINTS 2629 00003138 E8DC05 <1> call bb_handlefailedrestore 2630 <1> %endif 2631 <1> %if _NUM_G_BP 2632 <1> %if _BREAKPOINTS 2633 0000313B 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2634 <1> %else 2635 <1> mov sp, bp 2636 <1> %endif 2637 <1> %elif _BREAKPOINTS 2638 <1> add sp, _NUM_B_BP * 2 2639 <1> %endif 2640 0000313E E9BFCE <1> jmp cmd3 2641 <1> 2642 <1> .gg_restore_cseip_success: 2643 <1> %if _BREAKPOINTS 2644 00003141 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 2645 00003144 E86804 <1> call bb_restorepoints_and_init_error_info 2646 00003147 7322 <1> jnc @F ; no error ? --> 2647 <1> 2648 <1> ; Error in bb_restorepoints. Try to restore other gg, other bb. 2649 <1> 2650 <1> ; Exit special mode: Handle non-cseip breakpoints again. 2651 00003149 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 2652 <1> 2653 <1> ; Enter special mode: Skip cseip breakpoints. 2654 0000314E 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 2655 <1> 2656 <1> ; As we already tried to restore all cseip gg and bb points, 2657 <1> ; here we skip these in the bb_restorepoints call. 2658 <1> %if _NUM_G_BP 2659 00003153 31C9 <1> xor cx, cx 2660 00003155 8A0E[7B07] <1> mov cl, byte [g_bplist.used_count] 2661 00003159 E80604 <1> call gg_restorepoints 2662 0000315C 51 <1> push cx 2663 <1> %endif 2664 0000315D B91000 <1> mov cx, _NUM_B_BP 2665 00003160 E84F04 <1> call bb_restorepoints 2666 <1> %if _NUM_G_BP 2667 00003163 59 <1> pop cx 2668 <1> %endif 2669 <1> 2670 <1> ; Exit special mode: No longer skip cseip breakpoints. 2671 00003164 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 2672 <1> 2673 00003169 EBCA <1> jmp .gg_bb_cseip_fail_common 2674 <1> 2675 <1> @@: 2676 <1> ; Success! Now discard the reserved error info. 2677 0000316B 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2678 <1> %else 2679 <1> mov sp, bp 2680 <1> %endif 2681 <1> 2682 <1> ; Special mode restoration handled. Now trace one instruction. 2683 <1> ; (Proceed if repeated string op or interrupt.) 2684 <1> %if _PM 2685 0000316E E83A07 <1> call resetmode 2686 <1> %endif 2687 00003171 E8E015 <1> call seteq ; make the = operand take effect 2688 00003174 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 2689 00003177 8B1E[900C] <1> mov bx, word [reg_cs] 2690 0000317B 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 2691 0000317C 8B36[9C0C] <1> mov si, word [reg_eip] 2692 <1> .pp2: 2693 00003180 E8C410 <1> call pp16 ; get next instruction byte into AL 2694 00003183 BF[E410] <1> mov di, ppbytes 2695 00003186 B91800 <1> mov cx, PPLEN_ONLY_STRING 2696 00003189 F2AE <1> repne scasb 2697 0000318B 752D <1> jne .not_p ; if not one of these --> 2698 0000318D 8A451E <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 2699 00003190 A880 <1> test al, PP_PREFIX ; prefix ? 2700 00003192 740E <1> jz .pp3 ; no --> 2701 00003194 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 2702 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 2703 <1> ; between decoding as O32 and O16, they're always 2704 <1> ; decoded as O32. The same is true for A32, and 2705 <1> ; in a 32-bit cs for O16 and A16. 2706 00003196 FECA <1> dec dl 2707 00003198 75E6 <1> jnz .pp2 ; if not out of bytes --> 2708 0000319A C706[C000][D971] <1> mov word [gg_deferred_message], msg.warnprefix 2709 000031A0 EB18 <1> jmp .not_p 2710 <1> 2711 <1> ; A repeatable string instruction is to be decoded. 2712 <1> ; Finish the decoding and skip the appropriate number 2713 <1> ; of opcode bytes. 2714 <1> .pp3: 2715 000031A2 E8B40C <1> _386_PM call pp_fix32bitflags 2716 000031A5 A847 <1> test al, PP_VARSIZ | PP_SIZ_MASK 2717 000031A7 7403E96673 <1> jnz error 2718 <1> %if 0 2719 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 2720 <1> jz .ignoreosize ; no --> 2721 <1> and dh, 2 2722 <1> add al, dh 2723 <1> .ignoreosize: 2724 <1> and ax, PP_SIZ_MASK 2725 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 2726 <1> _386_PM_o32 ; add esi, eax 2727 <1> add si, ax 2728 <1> %endif 2729 <1> ; pp10: 2730 <1> ; jmp short pp11 ; we have a skippable instruction here 2731 <1> ; pp11: 2732 000031AC E8B92B <1> _386_PM call test_d_b_bit 2733 000031AF 7504 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 2734 000031B1 660FB7F6 <1> _386_PM movzx esi, si ; clear high word here 2735 <1> .32: 2736 000031B5 E8F90F <1> call proceedbreakpoint ; run until the breakpoint is hit 2737 <1> ; This call might return modeswitched. 2738 000031B8 EB03 <1> jmp short @F 2739 <1> 2740 <1> .not_p: 2741 000031BA E8F80A <1> call traceone ; call common code 2742 <1> @@: 2743 000031BD 9C <1> pushf 2744 <1> 2745 <1> ; Exit special mode, do not skip non-cseip breakpoints anymore. 2746 000031BE 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 2747 <1> 2748 <1> ; Enter special mode: Skip matching/restoring cseip breakpoint. 2749 000031C3 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 2750 <1> 2751 000031C8 F6C47F <1> test ah, 7Fh ; error happened during proceedbreakpoint ? 2752 000031CB 7440 <1> jz @F ; no --> 2753 <1> 2754 000031CD 59 <1> pop cx ; (discard flags on stack) 2755 <1> 2756 <1> %if _NUM_G_BP 2757 000031CE 31C9 <1> xor cx, cx 2758 000031D0 8A0E[7B07] <1> mov cl, byte [g_bplist.used_count] 2759 <1> %endif 2760 <1> 2761 <1> %if _BREAKPOINTS 2762 000031D4 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 2763 <1> %endif 2764 000031D7 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 2765 <1> %if _NUM_G_BP 2766 000031D9 89CA <1> mov dx, cx 2767 000031DB 01D2 <1> add dx, dx 2768 000031DD 29D4 <1> sub sp, dx ; reserve space for gg error info 2769 <1> %endif 2770 000031DF 50 <1> push ax 2771 <1> %if _NUM_G_BP 2772 000031E0 E87C03 <1> call gg_restorepoints_and_init_error_info 2773 <1> %endif 2774 <1> %if _BREAKPOINTS 2775 000031E3 51 <1> push cx 2776 000031E4 B91000 <1> mov cx, _NUM_B_BP 2777 000031E7 E8C503 <1> call bb_restorepoints_and_init_error_info 2778 000031EA 59 <1> pop cx 2779 <1> %endif 2780 <1> ; Exit special mode: No longer skip cseip breakpoints. 2781 000031EB 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 2782 000031F0 58 <1> pop ax 2783 000031F1 51 <1> push cx 2784 <1> 2785 <1> %if _PM 2786 000031F2 E8B606 <1> call resetmode 2787 <1> %endif 2788 000031F5 E88700 <1> call put_deferred_message_silent 2789 <1> 2790 000031F8 FF36[C600] <1> push word [tpg_proceed_bp + 2] 2791 000031FC FF36[C400] <1> push word [tpg_proceed_bp] 2792 00003200 8A1E[CC00] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 2793 00003204 B700 <1> mov bh, 0 ; proceed breakpoint 2794 00003206 E8D80E <1> call display_breakpoint_failure 2795 00003209 59 <1> pop cx 2796 0000320A E928FF <1> jmp .gg_bb_cseip_fail_common 2797 <1> 2798 <1> 2799 <1> @@: 2800 0000320D 9D <1> popf ; CF 2801 <1> 2802 0000320E 7218 <1> jc .after_run ; an unexpected interrupt occured --> 2803 <1> 2804 00003210 E84000 <1> call .after_run_restore ; restore stuff 2805 00003213 E85002 <1> call gg_bb_check_hit ; expected interrupt matches our gg or bb ? 2806 00003216 7321 <1> jnc .expectedinterrupt ; yes, handle expected interrupt --> 2807 <1> 2808 <1> 2809 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 2810 00003218 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2813 0000321D E983FE <1> jmp gg5 ; next write all points and run --> 2814 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 2815 <1> 2816 <1> .only_run: 2817 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 2818 00003220 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 2821 <1> 2822 00003225 E8B510 <1> call run ; Now run the program. 2823 <1> .after_run: 2824 <1> %if _NUM_G_BP || _BREAKPOINTS 2825 00003228 E82800 <1> call .after_run_restore 2826 <1> 2827 0000322B E83802 <1> call gg_bb_check_hit 2828 <1> .after_gg_bb_check_hit: 2829 0000322E 7309 <1> jnc .expectedinterrupt 2830 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 2831 <1> .unexpectedinterrupt: 2832 <1> %if _PM 2833 00003230 E87806 <1> call resetmode 2834 <1> %endif 2835 00003233 E84900 <1> call put_deferred_message_silent 2836 00003236 E9430A <1> jmp unexpectedinterrupt ; print messages for unexpected breakpoint and quit. 2837 <1> 2838 <1> %if _NUM_G_BP || _BREAKPOINTS 2839 <1> .expectedinterrupt: 2840 00003239 E86500 <1> call adjust_cseip_after_breakpoint 2841 <1> ; it's one of our breakpoints, adjust (e)ip 2842 <1> 2843 0000323C 89C1 <1> mov cx, ax ; handle_bb_* expects flags in cx 2844 0000323E 50 <1> push ax 2845 0000323F 50 <1> push ax ; handle_bb_* expects dword counter on stack 2846 00003240 E8DD08 <1> call handle_bb_hit_pass_match 2847 00003243 58 <1> pop ax 2848 00003244 58 <1> pop ax ; discard 2849 00003245 7203E959FE <1> jnc gg5 ; if it was a pass non-hit or non-pass non-hit 2850 <1> ; then jump back to do a subsequent G step 2851 <1> ; If jumping, the function has set up gg_first_cseip_linear 2852 <1> ; with the current CS:(E)IP so that the next step will start 2853 <1> ; out with skipping past the breakpoint(s) on that address. 2854 <1> ; Note that gg_bb_check_hit returns ax = 7 if a gg point is 2855 <1> ; hit, so we always fall through to .actual_hit here. 2856 <1> 2857 <1> .actual_hit: 2858 <1> %if _PM 2859 0000324A E85E06 <1> call resetmode 2860 <1> %endif 2861 0000324D E82F00 <1> call put_deferred_message_silent 2862 <1> ; (put bb message after gg_bb_check_hit call) 2863 00003250 E9630D <1> jmp dumpregs_extended_silent 2864 <1> ; (handles sf_(double_)ctrl_c) 2865 <1> %endif 2866 <1> 2867 <1> 2868 <1> .after_run_restore: 2869 <1> %if _NUM_G_BP || _BREAKPOINTS 2870 00003253 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 2871 00003256 89E5 <1> mov bp, sp ; -> behind gg error info, -> bb error info 2872 <1> %if _NUM_G_BP 2873 00003258 31C9 <1> xor cx, cx 2874 0000325A 8A0E[7B07] <1> mov cl, byte [g_bplist.used_count] 2875 0000325E 89CA <1> mov dx, cx 2876 00003260 01D2 <1> add dx, dx 2877 00003262 29D4 <1> sub sp, dx ; reserve space for gg error info 2878 00003264 E8F802 <1> call gg_restorepoints_and_init_error_info 2879 <1> ; try restoring gg points, and fill error info 2880 <1> %endif 2881 <1> %if _BREAKPOINTS 2882 00003267 51 <1> push cx 2883 00003268 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 2884 0000326B E84103 <1> call bb_restorepoints_and_init_error_info 2885 <1> ; try restoring bb points, and fill error info 2886 0000326E 59 <1> pop cx 2887 <1> %endif 2888 <1> 2889 <1> %if _PM 2890 0000326F E83906 <1> call resetmode 2891 <1> %endif 2892 00003272 E80A00 <1> call put_deferred_message_silent 2893 <1> 2894 <1> %if _NUM_G_BP 2895 00003275 E8D104 <1> call gg_handlefailedrestore 2896 <1> ; handle gg point restore failures 2897 <1> %endif 2898 <1> %if _BREAKPOINTS 2899 00003278 E89C04 <1> call bb_handlefailedrestore 2900 <1> ; handle bb point restore failures 2901 <1> %endif 2902 <1> %if _NUM_G_BP 2903 <1> %if _BREAKPOINTS 2904 0000327B 8D6620 <1> lea sp, [bp + _NUM_B_BP * 2] 2905 <1> %else 2906 <1> mov sp, bp ; remove the stack frame 2907 <1> %endif 2908 <1> %else 2909 <1> add sp, _NUM_B_BP * 2 2910 <1> %endif 2911 <1> %endif ; _NUM_G_BP || _BREAKPOINTS 2912 0000327E C3 <1> retn 2913 <1> 2914 <1> 2915 <1> ; INP: word [gg_deferred_message] 2916 <1> ; word [bb_deferred_message_in_lineout_behind] 2917 <1> ; OUT: variables reset to msg.empty_message 2918 <1> ; messages displayed; first the gg one then the bb one 2919 <1> ; CHG: dx 2920 <1> ; STT: ds = es = ss 2921 <1> ; 2922 <1> ; Note: Uses putsz_silent and putsline_silent, meaning 2923 <1> ; if silent mode is enabled, the messages are 2924 <1> ; written to the silent buffer instead of displayed. 2925 <1> put_deferred_message_silent: 2926 0000327F BA[6370] <1> mov dx, msg.empty_message 2927 00003282 8716[C000] <1> xchg dx, word [gg_deferred_message] 2928 00003286 E89E09 <1> call putsz_silent 2929 00003289 BA[433C] <1> mov dx, putsline_silent 2930 <1> 2931 <1> ; INP: dx = puts function to call, CHG ax, bx, cx, dx, di 2932 <1> ; CHG: dx 2933 <1> ; STT: ds = es = ss 2934 <1> put_bb_deferred_message_calling_dx: 2935 0000328C 57 <1> push di 2936 0000328D 31FF <1> xor di, di 2937 0000328F 873E[C200] <1> xchg di, word [bb_deferred_message_in_lineout_behind] 2938 00003293 85FF <1> test di, di 2939 00003295 7408 <1> jz @F 2940 00003297 50 <1> push ax 2941 00003298 53 <1> push bx 2942 00003299 51 <1> push cx 2943 0000329A FFD2 <1> call dx 2944 0000329C 59 <1> pop cx 2945 0000329D 5B <1> pop bx 2946 0000329E 58 <1> pop ax 2947 <1> @@: 2948 0000329F 5F <1> pop di 2949 000032A0 C3 <1> retn 2950 <1> 2951 <1> 2952 <1> ; INP: [internalflags2] & dif2_tpg_adjusted_cseip 2953 <1> ; [internalflags2] & dif2_tpg_do_not_adjust 2954 <1> ; word [reg_cs] 2955 <1> ; (d)word [reg_eip] 2956 <1> ; OUT: If both flags clear on input, 2957 <1> ; set [internalflags2] & dif2_tpg_adjusted_cseip 2958 <1> ; cs:(e)ip adjusted by decrementing (e)ip 2959 <1> ; (It is only decremented by the first call to this 2960 <1> ; function, which sets the flag in dif2.) 2961 <1> ; Else, 2962 <1> ; do nothing 2963 <1> ; CHG: bx 2964 <1> ; STT: ds = ss = debugger data selector 2965 <1> adjust_cseip_after_breakpoint: 2966 000032A1 F606[A100]06 <1> testopt [internalflags2], dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust 2968 000032A6 7513 <1> jnz .retn 2969 000032A8 800E[A100]02 <1> setopt [internalflags2], dif2_tpg_adjusted_cseip 2970 000032AD 8B1E[900C] <1> _386_PM mov bx, word [reg_cs] 2971 000032B1 E8B12A <1> _386_PM call resetmode_and_test_d_b_bit 2972 000032B4 7401 <1> _386_PM jz .16 ; 16-bit cs --> 2973 000032B6 66 <1> _386_PM o32 ; dec dword [reg_eip] 2974 <1> .16: 2975 000032B7 FF0E[9C0C] <1> dec word [reg_eip] ; re-execute (restored) opcode one byte in front of this 2976 <1> .retn: 2977 000032BB C3 <1> retn 2978 <1> 2979 <1> 2980 <1> %ifn _BREAKPOINTS 2981 <1> bb_check_hit: 2982 <1> xor ax, ax 2983 <1> stc 2984 <1> retn 2985 <1> %else 2986 <1> ; INP: word [run_int] 2987 <1> ; word [reg_cs] 2988 <1> ; (d)word [reg_eip] 2989 <1> ; bb breakpoints 2990 <1> ; OUT: NC if a breakpoint was hit, 2991 <1> ; (e)ip must be decremented by one 2992 <1> ; word [bb_deferred_message_in_lineout_behind] set 2993 <1> ; and line_out written if bb point matched 2994 <1> ; (The bb point's index is already written to this msg.) 2995 <1> ; ax & 1 set if non-pass match (actual hit), 2996 <1> ; else ax & 2 set if pass match (consider as hit first, 2997 <1> ; but dump registers next (not to silent buffer) 2998 <1> ; and then continue execution) 2999 <1> ; else ax & 4 always set, indicates any match 3000 <1> ; (including matches that should merely continue) 3001 <1> ; all pass points' counters stepped 3002 <1> ; CY if no breakpoint was hit, 3003 <1> ; ax = 0 3004 <1> ; CHG: all 3005 <1> ; STT: es = ds = ss 3006 <1> bb_check_hit: 3007 <1> lframe near 3008 000032BC 5589E5 <1> lenter 3009 000032BF 31C0 <1> xor ax, ax 3010 <1> lequ 1, flag_trigger 3011 <1> lequ 2, flag_pass 3012 <1> lequ 4, flag_match 3013 <1> lvar word, flags 3014 000032C1 50 <1> push ax 3015 <1> 3016 <1> ; Finish up. Check if it was one of _our_ breakpoints. 3017 000032C2 813E[D80B][947A] <1> cmp word [run_int], int3msg 3018 000032C8 7505 <1> jne @F ; if not interrupt 03h --> 3019 <1> 3020 <1> ; Get previous cs:eip (where breakpoint was executed if any at all). 3021 000032CA E86405 <1> call get_cseip_of_possible_breakpoint 3022 <1> ; dx:ax = linear address of previous cs:eip 3023 <1> ; bx = reg_cs 3024 000032CD EB16 <1> jmp .check 3025 <1> 3026 <1> @@: 3027 <1> ; For T/TP/P: if trace interrupt fired just while 3028 <1> ; pointing at a bb point, do match. 3029 000032CF 813E[D80B][717A] <1> cmp word [run_int], int1msg 3030 000032D5 7403E95501 <1> jne .gg9 3031 <1> 3032 000032DA 800E[A100]04 <1> setopt [internalflags2], dif2_tpg_do_not_adjust 3033 <1> ; remember that we should not adjust 3034 000032DF 66 <1> _386_PM_o32 3035 000032E0 31C9 <1> xor cx, cx 3036 000032E2 E8A104 <1> call get_cseip_ecx_linear 3037 <1> ; get linear of this cs:(e)ip 3038 <1> .check: 3039 000032E5 7303E94501 <1> jc .gg9 3040 <1> 3041 <1> ; Store the matched address (if any) here in case of non-hit 3042 <1> ; match. (Ie, non-hit pass match or non-hit non-pass match.) 3043 000032EA A3[B800] <1> mov word [gg_next_cseip_linear], ax 3044 000032ED 8916[BA00] <1> mov word [gg_next_cseip_linear + 2], dx 3045 <1> 3046 000032F1 87DA <1> xchg bx, dx 3047 000032F3 91 <1> xchg cx, ax ; bx:cx = linear address of previous cs:eip 3048 000032F4 31C0 <1> xor ax, ax 3049 <1> .loop: 3050 000032F6 53 <1> push bx 3051 000032F7 50 <1> push ax 3052 000032F8 E80E58 <1> call calcpointbit ; bx = index, ah = value 3053 000032FB 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 3054 <1> ; (NC) 3055 000032FF 7503E91901 <1> jz .next 3056 00003304 84A7[0401] <1> test byte [b_bplist.disabled_mask+bx], ah 3057 <1> ; (NC) 3058 00003308 7403E91001 <1> jnz .next 3059 0000330D 58 <1> pop ax 3060 0000330E 5B <1> pop bx 3061 0000330F 53 <1> push bx 3062 00003310 50 <1> push ax 3063 00003311 89C6 <1> mov si, ax 3064 00003313 01F6 <1> add si, si 3065 00003315 01F6 <1> add si, si 3066 <1> %if BPSIZE == 4 3067 <1> %elif BPSIZE == 5 3068 <1> add si, ax 3069 <1> %elif BPSIZE == 6 3070 <1> add si, ax ; * 5 3071 <1> add si, ax ; * 6 3072 <1> %elif BPSIZE == 9 3073 00003317 01F6 <1> add si, si ; * 8 3074 00003319 01C6 <1> add si, ax ; * 9 3075 <1> %else 3076 <1> %error Unexpected breakpoint size 3077 <1> %endif 3078 0000331B 81C6[0601] <1> add si, b_bplist.bp ; -> point 3079 <1> 3080 0000331F E83F01 <1> call gg_bb_lods_bp_linear 3081 <1> 3082 00003322 E89003 <1> call gg_bb_check_is_first 3083 00003325 7203E9F300 <1> jnc .next 3084 <1> 3085 0000332A 39C8 <1> cmp ax, cx 3086 0000332C 7403E9EC00 <1> jne .next 3087 00003331 39DA <1> cmp dx, bx 3088 00003333 7403E9E500 <1> jne .next 3089 <1> 3090 <1> .hit: 3091 00003338 58 <1> pop ax 3092 00003339 50 <1> push ax 3093 <1> 3094 0000333A 804EFE04 <1> or byte [bp + ?flags], ?flag_match 3095 <1> 3096 0000333E 89C7 <1> mov di, ax 3097 00003340 01FF <1> add di, di 3098 <1> 3099 00003342 8BB5[D601] <1> mov si, [b_bplist.when + di] 3100 <1> ; si -> condition 3101 00003346 85F6 <1> test si, si ; any ? 3102 00003348 741E <1> jz @F ; no --> 3103 <1> %if _PM 3104 0000334A E85E05 <1> call resetmode 3105 <1> %endif 3106 0000334D FF36[F00A] <1> push word [rc] 3107 00003351 8F06[F20A] <1> pop word [priorrc] 3108 00003355 AC <1> lodsb 3109 00003356 E8DA7F <1> call getexpression ; parse stored expression 3110 00003359 E8F385 <1> call chkeol 3111 0000335C E8E679 <1> call toboolean ; get boolean 3112 0000335F 85D2 <1> test dx, dx ; true ? 3113 00003361 7503E9B700 <1> jz .next ; no, skip --> 3114 00003366 58 <1> pop ax 3115 00003367 50 <1> push ax 3116 <1> @@: 3117 <1> 3118 00003368 8D9D[9601] <1> lea bx, [b_bplist.counter + di] 3119 <1> ; word [bx] = this matched point's counter 3120 <1> 3121 0000336C F646FE03 <1> test byte [bp + ?flags], ?flag_trigger | ?flag_pass 3122 00003370 7413 <1> jz @F ; none set yet ? --> 3123 00003372 E8C900 <1> call step_pass_counter ; step counter even if already matched 3124 00003375 7203E9A300 <1> jnc .next ; (either is already set, so additional 3125 <1> ; setting of ?flag_pass is skipped) 3126 0000337A F646FE01 <1> test byte [bp + ?flags], ?flag_trigger 3127 0000337E 7403E99A00 <1> jnz .next ; (trigger is already set, so skip triggering) 3128 00003383 EB05 <1> jmp .setup_trigger ; triggered (after previous pass match) 3129 <1> 3130 <1> @@: 3131 00003385 E8B600 <1> call step_pass_counter ; step counter of matched point, no flag yet 3132 00003388 7340 <1> jnc .check_pass ; not triggered, check for pass match --> 3133 <1> 3134 <1> .setup_trigger: 3135 <1> ; Trigger! (And the first detected triggering point.) 3136 0000338A 804EFE01 <1> or byte [bp + ?flags], ?flag_trigger 3137 <1> 3138 0000338E 51 <1> push cx 3139 0000338F BF[0E08] <1> mov di, line_out 3140 00003392 BE[F16D] <1> mov si, msg.bb_hit.1 3141 00003395 E89E00 <1> call copy_single_counted_string 3142 <1> ; Now si -> msg.bb_hit.2.nocounter 3143 <1> 3144 00003398 89C2 <1> mov dx, ax 3145 <1> ; Store breakpoint index in message. 3146 0000339A E8A486 <1> call hexbyte ; store index of this point 3147 <1> 3148 <1> ; Get counter of this breakpoint. 3149 0000339D 8B07 <1> mov ax, word [bx] 3150 <1> 3151 <1> ; Is it equal to default ? 3152 0000339F 3D0080 <1> cmp ax, 8000h 3153 000033A2 7409 <1> je @F ; yes, skip --> 3154 <1> 3155 000033A4 BE[2B6E] <1> mov si, msg.bb_hit.2.counter 3156 000033A7 E88C00 <1> call copy_single_counted_string 3157 <1> ; Now si -> msg.bb_hit.3.counter.no_id 3158 <1> 3159 <1> ; Store counter in message. 3160 000033AA E88D86 <1> call hexword 3161 <1> 3162 <1> @@: 3163 000033AD F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 3164 000033B2 7407 <1> jz @F 3165 000033B4 F606[7E00]08 <1> testopt [options], gg_bb_hit_no_repeat 3166 000033B9 EB05 <1> jmp @FF 3167 <1> @@: 3168 000033BB F606[7E00]10 <1> testopt [options], tp_bb_hit_no_repeat 3169 <1> @@: 3170 000033C0 7406 <1> jz @F 3171 000033C2 C706[DA0B][1404] <1> mov word [lastcmd], dmycmd 3172 <1> @@: 3173 000033C8 EB1D <1> jmp .trigger_common 3174 <1> 3175 <1> 3176 <1> .check_pass: 3177 000033CA 7451 <1> jz .next ; no pass match ? --> 3178 <1> 3179 000033CC 804EFE02 <1> or byte [bp + ?flags], ?flag_pass 3180 <1> 3181 000033D0 51 <1> push cx 3182 000033D1 BF[0E08] <1> mov di, line_out 3183 000033D4 BE[0E6E] <1> mov si, msg.bb_pass.1 3184 000033D7 E85C00 <1> call copy_single_counted_string 3185 <1> ; Now si -> msg.bb_pass.2 3186 <1> 3187 000033DA 89C2 <1> mov dx, ax 3188 <1> ; Store breakpoint index in message. 3189 000033DC E86286 <1> call hexbyte ; store index of this point 3190 <1> 3191 000033DF E85400 <1> call copy_single_counted_string 3192 <1> ; Now si -> msg.bb_pass.3.no_id 3193 <1> 3194 <1> ; Get counter of this breakpoint. 3195 000033E2 8B07 <1> mov ax, word [bx] 3196 <1> ; Store counter in message. 3197 000033E4 E85386 <1> call hexword 3198 <1> 3199 <1> .trigger_common: 3200 000033E7 53 <1> push bx 3201 000033E8 BBFFFF <1> mov bx, -1 3202 000033EB E82953 <1> call get_set_id_offset_length 3203 000033EE F6C7FC <1> test bh, 63 << 2 ; length nonzero ? 3204 000033F1 7421 <1> jz @F ; no --> 3205 <1> 3206 <1> ; The maximum length of a short ID is based on 3207 <1> ; how much space there is after the longest message 3208 <1> ; ("Passed ..., counter=XXXX") assuming 80 columns. 3209 000033F3 BE[416E] <1> mov si, msg.bb_hitpass_id.short 3210 000033F6 80FF74 <1> cmp bh, 29 << 2 ; long ? 3211 000033F9 7203 <1> jb .trigger_short_id 3212 <1> ; This jump MUST be a jb, not jbe. The jbe 3213 <1> ; would not match ZR for words where the 3214 <1> ; idbuffer offset is a nonzero value. 3215 000033FB BE[396E] <1> mov si, msg.bb_hitpass_id.long 3216 <1> .trigger_short_id: 3217 <1> 3218 000033FE E83500 <1> call copy_single_counted_string 3219 00003401 88F9 <1> mov cl, bh 3220 00003403 D0E9 <1> shr cl, 1 3221 00003405 D0E9 <1> shr cl, 1 ; cx = length 3222 00003407 81E3FF03 <1> and bx, 1023 ; bx = offset 3223 0000340B 8DB7[FA01] <1> lea si, [b_bplist.idbuffer + bx] 3224 0000340F F3A4 <1> rep movsb 3225 <1> 3226 00003411 BE[366E] <1> mov si, msg.bb_hitpass_id.after 3227 <1> 3228 <1> @@: 3229 00003414 5B <1> pop bx 3230 00003415 E81E00 <1> call copy_single_counted_string 3231 <1> 3232 00003418 893E[C200] <1> mov word [bb_deferred_message_in_lineout_behind], di 3233 0000341C 59 <1> pop cx 3234 <1> 3235 <1> .next: 3236 0000341D 58 <1> pop ax 3237 0000341E 5B <1> pop bx 3238 <1> 3239 0000341F 40 <1> inc ax 3240 00003420 83F810 <1> cmp ax, _NUM_B_BP 3241 00003423 7303E9CEFE <1> jb .loop 3242 <1> 3243 00003428 8B46FE <1> mov ax, word [bp + ?flags] 3244 0000342B A807 <1> test al, ?flag_pass | ?flag_trigger | ?flag_match 3245 0000342D 7503 <1> jnz .return ; (NC) 3246 <1> 3247 <1> .gg9: 3248 0000342F 31C0 <1> xor ax, ax 3249 00003431 F9 <1> stc 3250 <1> .return: 3251 00003432 89EC5D <1> lleave 3252 00003435 C3 <1> retn 3253 <1> 3254 <1> 3255 <1> ; INP: byte [ds:si] = length of source string 3256 <1> ; ds:si + 1 -> source string 3257 <1> ; es:di -> destination buffer 3258 <1> ; OUT: cx = 0 3259 <1> ; ds:si -> after source string 3260 <1> ; es:di -> after written string 3261 <1> ; CHG: - 3262 <1> ; STT: UP 3263 <1> copy_single_counted_string: 3264 00003436 91 <1> xchg ax, cx 3265 00003437 31C0 <1> xor ax, ax 3266 00003439 AC <1> lodsb 3267 0000343A 91 <1> xchg ax, cx 3268 0000343B F3A4 <1> rep movsb 3269 0000343D C3 <1> retn 3270 <1> 3271 <1> 3272 <1> ; INP: word [bx] = pass counter of this breakpoint 3273 <1> ; OUT: NC if to proceed (no trigger), 3274 <1> ; ZR if no pass message display 3275 <1> ; NZ if pass message display 3276 <1> ; CY if to trigger 3277 <1> step_pass_counter: 3278 0000343E F707FF3F <1> test word [bx], 3FFFh ; is it already at a terminal state ? 3279 00003442 740A <1> jz .no_decrement ; yes, do not further decrement --> 3280 00003444 FF0F <1> dec word [bx] ; decrement (to 0/4000h/8000h/C000h) 3281 00003446 7417 <1> jz .trigger ; case for decrementing 1 to 0 --> 3282 00003448 813F0040 <1> cmp word [bx], 4000h 3283 0000344C 7411 <1> je .trigger ; case for decrementing 4001h to 4000h 3284 <1> .no_decrement: 3285 0000344E 813F0080 <1> cmp word [bx], 8000h ; decrement resulted in 8000h 3286 00003452 740B <1> je .trigger ; or was already in that state? --> 3287 00003454 813F00C0 <1> cmp word [bx], 0_C000h 3288 00003458 7405 <1> je .trigger ; or C000h --> 3289 <1> .proceed: 3290 0000345A F6470140 <1> test byte [bx + 1], 40h ; (NC) ZR if no pass message 3291 0000345E C3 <1> retn 3292 <1> 3293 <1> .trigger: 3294 0000345F F9 <1> stc 3295 00003460 C3 <1> retn 3296 <1> %endif 3297 <1> 3298 <1> 3299 <1> ; INP: si -> linear address of breakpoint 3300 <1> ; (32 bits if _PM, else 24 bits) 3301 <1> ; OUT: dx:ax = linear address of breakpoint 3302 <1> ; si -> behind linear address 3303 <1> gg_bb_lods_bp_linear: 3304 00003461 AD <1> lodsw 3305 00003462 92 <1> xchg ax, dx 3306 <1> %if _PM 3307 00003463 AD <1> lodsw 3308 <1> %else 3309 <1> xor ax, ax 3310 <1> lodsb 3311 <1> %endif 3312 00003464 92 <1> xchg ax, dx 3313 00003465 C3 <1> retn 3314 <1> 3315 <1> 3316 <1> ; INP: word [run_int] 3317 <1> ; word [reg_cs] 3318 <1> ; (d)word [reg_eip] 3319 <1> ; gg/bb breakpoints 3320 <1> ; OUT: NC if a breakpoint was hit, 3321 <1> ; (e)ip must be decremented by one 3322 <1> ; word [bb_deferred_message_in_lineout_behind] set 3323 <1> ; and line_out written if bb point matched 3324 <1> ; (The bb point's index is already written to this msg.) 3325 <1> ; ax = 7 if non-bb match, else 3326 <1> ; ax & 1 set if non-pass match (actual hit), 3327 <1> ; else ax & 2 set if pass match (consider as hit first, 3328 <1> ; but dump registers next (not to silent buffer) 3329 <1> ; and then continue execution) 3330 <1> ; else ax & 4 always set, indicates any match 3331 <1> ; (including matches that should merely continue) 3332 <1> ; all pass points' counters stepped 3333 <1> ; CY if no breakpoint was hit, 3334 <1> ; ax = 0 3335 <1> ; CHG: all 3336 <1> ; STT: es = ds = ss 3337 <1> gg_bb_check_hit: 3338 00003466 E853FE <1> call bb_check_hit 3339 00003469 720D <1> jc .gg_check_hit 3340 <1> 3341 0000346B A801 <1> test al, 1 ; actual bb hit ? 3342 0000346D 7507 <1> jnz .ret_NC ; yes, return as hit 3343 <1> 3344 0000346F 50 <1> push ax ; bb is pass match or any other match, 3345 00003470 E80500 <1> call gg_check_hit ; is gg a match ? 3346 00003473 58 <1> pop ax 3347 00003474 732D <1> jnc gg_check_hit.hit ; yes --> (set NC, ax = 7) 3348 <1> 3349 <1> ; Here, we return the flags 2 (set if pass match) and 3350 <1> ; 4 (always set, indicating any match). 3351 <1> 3352 <1> .ret_NC: 3353 00003476 F8 <1> clc 3354 00003477 C3 <1> retn 3355 <1> 3356 <1> .gg_check_hit: 3357 <1> ; (fall through) 3358 <1> 3359 <1> %ifn _NUM_G_BP 3360 <1> gg_check_hit: 3361 <1> stc 3362 <1> retn 3363 <1> %else 3364 <1> ; INP: word [run_int] 3365 <1> ; word [reg_cs] 3366 <1> ; (d)word [reg_eip] 3367 <1> ; bb breakpoints 3368 <1> ; OUT: NC if a breakpoint was hit, 3369 <1> ; (e)ip must be decremented by one 3370 <1> ; ax = 7 3371 <1> ; CY if no breakpoint was hit, 3372 <1> ; ax = 0 3373 <1> ; CHG: all 3374 <1> ; STT: es = ds = ss 3375 <1> gg_check_hit: 3376 <1> ; Finish up. Check if it was one of _our_ breakpoints. 3377 00003478 813E[D80B][947A] <1> cmp word [run_int], int3msg 3378 0000347E 752D <1> jne .gg9 ; if not interrupt 03h --> 3379 <1> 3380 <1> ; Get previous cs:eip (where breakpoint was executed if any at all). 3381 00003480 E8AE03 <1> call get_cseip_of_possible_breakpoint 3382 <1> ; dx:ax = linear address of previous cs:eip 3383 00003483 7228 <1> jc .gg9 3384 00003485 BE[7C07] <1> mov si, g_bplist.bp 3385 00003488 31C9 <1> xor cx, cx 3386 0000348A 8A4CFF <1> mov cl, byte [si-1] ; number of saved breakpoints 3387 0000348D E31E <1> jcxz .gg9 ; none, so always unexpected --> 3388 <1> 3389 0000348F 89C7 <1> mov di, ax 3390 00003491 89D3 <1> mov bx, dx ; bx:di = linear address of previous cs:(e)ip 3391 <1> 3392 <1> .loop_gg6: 3393 00003493 E8CBFF <1> call gg_bb_lods_bp_linear 3394 <1> 3395 00003496 E81C02 <1> call gg_bb_check_is_first 3396 00003499 730D <1> jnc .next 3397 <1> 3398 0000349B 39DA <1> cmp dx, bx 3399 0000349D 7509 <1> jne .next 3400 0000349F 39F8 <1> cmp ax, di 3401 000034A1 7505 <1> jne .next 3402 <1> 3403 <1> .hit: 3404 000034A3 B80700 <1> mov ax, 7 3405 000034A6 F8 <1> clc 3406 000034A7 C3 <1> retn 3407 <1> 3408 <1> .next: 3409 <1> 3410 <1> %if BPSIZE == 4 || BPSIZE == 5 3411 <1> inc si ; skip saved (actually CCh) byte 3412 <1> %elif BPSIZE == 6 3413 <1> add si, 3 ; skip word offset and byte content 3414 <1> %elif BPSIZE == 9 3415 000034A8 83C605 <1> add si, 5 ; skip dword offset and byte content 3416 <1> %endif 3417 <1> ; BPSIZE implied 3418 000034AB E2E6 <1> loop .loop_gg6 ; try next if there's any 3419 <1> 3420 <1> .gg9: 3421 000034AD 31C0 <1> xor ax, ax 3422 000034AF F9 <1> stc 3423 000034B0 C3 <1> retn 3424 <1> %endif 3425 <1> 3426 <1> 3427 <1> %if _DELAY_BEFORE_BP 3428 <1> delay_before_bp: 3429 000034B1 F606[8700]04 <1> testopt [options3], opt3_delay_before_bp 3430 000034B6 7428 <1> jz .ret 3431 000034B8 F606[A600]80 <1> testopt [internalflags3], dif3_delayed 3432 000034BD 7521 <1> jnz .ret 3433 000034BF 800E[A600]80 <1> setopt [internalflags3], dif3_delayed 3434 000034C4 06 <1> push es 3435 000034C5 57 <1> push di 3436 000034C6 50 <1> push ax 3437 000034C7 BF4000 <1> mov di, 40h ; dual mode segment/selector 3438 000034CA 8EC7 <1> mov es, di 3439 000034CC 268B3E6C00 <1> mov di, word [es:6Ch] 3440 <1> @@: 3441 000034D1 263B3E6C00 <1> cmp di, word [es:6Ch] 3442 000034D6 7505 <1> jne @F 3443 000034D8 E8408C <1> call idle 3444 000034DB EBF4 <1> jmp @B 3445 <1> @@: 3446 000034DD 58 <1> pop ax 3447 000034DE 5F <1> pop di 3448 000034DF 07 <1> pop es 3449 <1> .ret: 3450 000034E0 C3 <1> retn 3451 <1> %endif 3452 <1> 3453 <1> 3454 <1> %if _BREAKPOINTS 3455 <1> bb_writepoints_init_reset: 3456 000034E1 BF[0601] <1> mov di, b_bplist.bp 3457 000034E4 B0CC <1> mov al, 0CCh 3458 000034E6 B91000 <1> mov cx, _NUM_B_BP 3459 <1> .loop: 3460 000034E9 83C708 <1> add di, BPSIZE - 1 3461 000034EC AA <1> stosb 3462 000034ED E2FA <1> loop .loop 3463 <1> 3464 <1> ; This is called first by gg before writing any of the 3465 <1> ; gg points. So, if it fails, it only needs to restore 3466 <1> ; its own points, not any of the gg points. 3467 <1> ; This is also called deep down in run_with_bb when called 3468 <1> ; from tt or pp. In this case, there may be a proceed 3469 <1> ; breakpoint already written. On failure, after having 3470 <1> ; restored all yet-written bb points, this proceed 3471 <1> ; breakpoint is restored too. 3472 <1> ; 3473 <1> ; INP: bb breakpoints 3474 <1> ; tpg_proceed_bp 3475 <1> ; OUT: does not return if an error occurred, 3476 <1> ; instead jumps to cmd3 3477 <1> ; STT: might return modeswitched 3478 <1> bb_writepoints_init: 3479 000034EF E8D500 <1> call bb_writepoints 3480 000034F2 735B <1> jnc .retn 3481 <1> 3482 000034F4 83EC20 <1> sub sp, _NUM_B_BP * 2 ; reserve space for bb error info 3483 000034F7 89E5 <1> mov bp, sp 3484 <1> ; cx = index of failed point 3485 <1> ; = index above last one to restore 3486 <1> ; ax = error info of failed point 3487 000034F9 50 <1> push ax 3488 000034FA 51 <1> push cx 3489 000034FB E8B100 <1> call bb_restorepoints_and_init_error_info 3490 <1> 3491 <1> bb_restorepoints_exit: equ $ 3492 <1> ; If this is not gg and T/P wrote a proceed breakpoint, 3493 <1> ; restore it here (after having restored bb points). 3494 000034FE E8770B <1> call proceed_writepoint_restore 3495 <1> ; This call might return modeswitched. 3496 00003501 BB0000 <1> mov bx, 0 ; (preserve CF) 3497 00003504 7305 <1> jnc @F 3498 00003506 80CC80 <1> or ah, 80h ; mark error during restoration 3499 00003509 89C3 <1> mov bx, ax ; bx & 80h set: error restoring pp 3500 <1> @@: 3501 <1> 3502 0000350B 59 <1> pop cx 3503 0000350C 58 <1> pop ax ; error info + index of failed point 3504 <1> 3505 0000350D 89CE <1> mov si, cx 3506 0000350F 01F6 <1> add si, si 3507 00003511 01F6 <1> add si, si ; * 4 3508 <1> %if BPSIZE == 4 3509 <1> %elif BPSIZE == 5 3510 <1> add si, cx ; * 5 3511 <1> %elif BPSIZE == 6 3512 <1> add si, cx ; * 5 3513 <1> add si, cx ; * 6 3514 <1> %elif BPSIZE == 9 3515 00003513 01F6 <1> add si, si ; * 8 3516 00003515 01CE <1> add si, cx ; * 9 3517 <1> %else 3518 <1> %error Unexpected breakpoint size 3519 <1> %endif 3520 00003517 81C6[0601] <1> add si, b_bplist.bp ; -> point 3521 <1> 3522 0000351B 53 <1> push bx 3523 <1> 3524 0000351C E860FD <1> call put_deferred_message_silent 3525 <1> ; CHG: dx 3526 <1> 3527 0000351F 83F9FF <1> cmp cx, -1 3528 00003522 740B <1> je @F 3529 <1> 3530 <1> ; si-> point 3531 <1> ; ax = info (ah = reason, al = new value if reason 3) 3532 <1> ; cx = 0-based index of initially failed point 3533 00003524 FF7402 <1> push word [si + 2] 3534 00003527 FF34 <1> push word [si] ; stack: linear address 3535 00003529 BB0040 <1> mov bx, 4000h ; bh = 40h (bb), 3536 <1> ; bl = what we tried to restore (n/a) 3537 0000352C E8B20B <1> call display_breakpoint_failure 3538 <1> ; This function calls resetmode. 3539 <1> 3540 <1> @@: 3541 0000352F E8E501 <1> call bb_handlefailedrestore 3542 <1> ; This function calls resetmode. 3543 <1> 3544 00003532 58 <1> pop ax 3545 00003533 F6C480 <1> test ah, 80h ; pp failed to restore ? 3546 00003536 7411 <1> jz @F 3547 <1> 3548 00003538 FF36[C600] <1> push word [tpg_proceed_bp + 2] 3549 0000353C FF36[C400] <1> push word [tpg_proceed_bp] 3550 00003540 8A1E[CC00] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 3551 00003544 B700 <1> mov bh, 0 ; proceed breakpoint 3552 00003546 E8980B <1> call display_breakpoint_failure 3553 <1> @@: 3554 00003549 83C420 <1> add sp, _NUM_B_BP * 2 ; discard bb error info 3555 0000354C E9B1CA <1> jmp cmd3 3556 <1> 3557 <1> .retn: 3558 0000354F C3 <1> retn 3559 <1> %endif 3560 <1> 3561 <1> 3562 <1> %if _NUM_G_BP 3563 <1> ; INP: ss:bp -> behind gg error info space 3564 <1> ; cx = number of error info words on stack 3565 <1> ; OUT: error info space initialised to all zeros 3566 <1> ; CHG: ax, di, es 3567 <1> ; STT: sets es to ss 3568 <1> gg_restorepoints_init_error_info: 3569 00003550 16 <1> push ss 3570 00003551 07 <1> pop es 3571 00003552 89EF <1> mov di, bp ; es:di -> behind error info 3572 00003554 51 <1> push cx 3573 00003555 4F <1> dec di 3574 00003556 4F <1> dec di 3575 00003557 31C0 <1> xor ax, ax 3576 00003559 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 3577 0000355A F3AB <1> rep stosw ; initialize error info 3578 0000355C FC <1> cld 3579 0000355D 59 <1> pop cx 3580 0000355E C3 <1> retn 3581 <1> 3582 <1> 3583 <1> gg_restorepoints_and_init_error_info: 3584 0000355F E8EEFF <1> call gg_restorepoints_init_error_info 3585 <1> 3586 <1> ; Restore gg breakpoints. 3587 <1> ; On errors remember failures but restore all remaining anyway. 3588 <1> ; 3589 <1> ; INP: cx = number of breakpoints to restore (<= 255), 3590 <1> ; assumed at beginning of g_bplist.bp 3591 <1> ; ss:bp -> behind cx words for error info 3592 <1> ; OUT: NC if all points restored successfully 3593 <1> ; CY if at least one point couldn't be restored, 3594 <1> ; error info filled, high byte: 3595 <1> ; reason = 0 = no error (this point didn't fail), 3596 <1> ; 1 = couldn't write, 3597 <1> ; 2 = unreachable, 3598 <1> ; 3 = overwritten), 3599 <1> ; low byte: new byte value (if reason 3) 3600 <1> ; CHG: ax, bx, (e)dx, si, di, es 3601 <1> ; STT: sets es to ss 3602 <1> ; might return modeswitched 3603 <1> ; 3604 <1> ; Note: The points are restored in reverse, from the last back 3605 <1> ; to the front. The first point is handled last. 3606 <1> gg_restorepoints: 3607 00003562 89CE <1> mov si, cx 3608 00003564 01F6 <1> add si, si 3609 00003566 01F6 <1> add si, si ; * 4 3610 <1> %if BPSIZE == 4 3611 <1> %elif BPSIZE == 5 3612 <1> add si, cx ; * 5 3613 <1> %elif BPSIZE == 6 3614 <1> add si, cx ; * 5 3615 <1> add si, cx ; * 6 3616 <1> %elif BPSIZE == 9 3617 00003568 01F6 <1> add si, si ; * 8 3618 0000356A 01CE <1> add si, cx ; * 9 3619 <1> %else 3620 <1> %error Unexpected breakpoint size 3621 <1> %endif 3622 0000356C 81C6[7307] <1> add si, g_bplist.bp - BPSIZE ; -> last point in list (first to restore) 3623 <1> 3624 00003570 F8 <1> clc ; assume success 3625 00003571 51 <1> push cx 3626 00003572 9C <1> pushf 3627 00003573 E329 <1> jcxz .done ; nothing to do --> 3628 <1> .loop: 3629 00003575 E8E400 <1> call gg_writepoints_restore ; Restore breakpoint bytes. 3630 00003578 7324 <1> jnc .done ; successful --> 3631 0000357A 5A <1> pop dx ; discard flags 3632 0000357B 5B <1> pop bx 3633 0000357C 53 <1> push bx 3634 0000357D 9C <1> pushf ; store (CY) flags 3635 <1> 3636 0000357E 50 <1> push ax 3637 0000357F 89F7 <1> mov di, si 3638 00003581 81EF[8507] <1> sub di, BPSIZE+g_bplist.bp 3639 <1> %if BPSIZE == 5 || BPSIZE == 6 || BPSIZE == 9 3640 00003585 89F8 <1> mov ax, di 3641 00003587 31D2 <1> xor dx, dx 3642 00003589 BF0900 <1> mov di, BPSIZE 3643 0000358C F7F7 <1> div di 3644 0000358E 89C7 <1> mov di, ax ; di = 0-based point index 3645 00003590 D1E7 <1> shl di, 1 ; di = 0-based error info offset 3646 <1> %elif BPSIZE == 4 3647 <1> shr di, 1 ; di = 0-based error info offset 3648 <1> %else 3649 <1> %error "Unexpected BPSIZE" 3650 <1> %endif 3651 00003592 29DF <1> sub di, bx 3652 00003594 29DF <1> sub di, bx 3653 00003596 8F03 <1> pop word [bp+di] ; store error info 3654 00003598 49 <1> dec cx ; exclude the failed point 3655 00003599 83EE12 <1> sub si, 2*BPSIZE ; -> the point _before_ failed one 3656 0000359C EBD7 <1> jmp short .loop 3657 <1> .done: 3658 0000359E 9D <1> popf ; get flags. CY if any couldn't be restored 3659 0000359F 59 <1> pop cx ; restore cx 3660 000035A0 C3 <1> retn 3661 <1> %endif 3662 <1> 3663 <1> 3664 <1> %if _BREAKPOINTS 3665 <1> ; INP: ss:bp -> error info space (one word per bb breakpoint) 3666 <1> ; OUT: error info space initialised to all zeros 3667 <1> ; CHG: ax, di, es 3668 <1> ; STT: sets es to ss 3669 <1> ; 3670 <1> ; Note: This initialises words for all bb points. 3671 <1> ; While the value in cx is preserved, it is 3672 <1> ; assumed that space for all points is allocated. 3673 <1> bb_restorepoints_init_error_info: 3674 000035A1 16 <1> push ss 3675 000035A2 07 <1> pop es 3676 000035A3 89EF <1> mov di, bp 3677 000035A5 31C0 <1> xor ax, ax 3678 000035A7 51 <1> push cx 3679 000035A8 B91000 <1> mov cx, _NUM_B_BP 3680 000035AB F3AB <1> rep stosw 3681 000035AD 59 <1> pop cx 3682 000035AE C3 <1> retn 3683 <1> 3684 <1> 3685 <1> bb_restorepoints_and_init_error_info: 3686 000035AF E8EFFF <1> call bb_restorepoints_init_error_info 3687 <1> 3688 <1> ; Restore bb breakpoints. 3689 <1> ; On errors remember failures but restore all remaining anyway. 3690 <1> ; 3691 <1> ; INP: cx = index above last one to restore 3692 <1> ; ss:bp -> error info space (one word per bb breakpoint) 3693 <1> ; OUT: NC if all points restored successfully 3694 <1> ; CY if at least one point couldn't be restored, 3695 <1> ; error info filled, high byte: 3696 <1> ; reason = 0 = no error (this point didn't fail), 3697 <1> ; 1 = couldn't write, 3698 <1> ; 2 = unreachable, 3699 <1> ; 3 = overwritten), 3700 <1> ; low byte: new byte value (if reason 3) 3701 <1> ; CHG: ax, bx, cx, (e)dx, si, di, es 3702 <1> ; STT: sets es to ss 3703 <1> ; might return modeswitched 3704 <1> ; 3705 <1> ; Note: The points are restored in reverse, from the list back 3706 <1> ; to the front. The first point is handled last. 3707 <1> bb_restorepoints: 3708 <1> 3709 000035B2 F8 <1> clc ; assume success 3710 000035B3 9C <1> pushf 3711 000035B4 E30F <1> jcxz .done 3712 <1> .loop: 3713 000035B6 E81400 <1> call bb_writepoints_restore 3714 000035B9 730A <1> jnc .done 3715 000035BB 5A <1> pop dx ; (discard flags) 3716 000035BC 9C <1> pushf ; store (CY) flags 3717 <1> ; cx = index of point that failed to write 3718 <1> ; ah = reason, al = new byte value (reason 3) 3719 000035BD 89CF <1> mov di, cx 3720 000035BF 01FF <1> add di, di 3721 000035C1 8903 <1> mov word [bp + di], ax ; store error info 3722 000035C3 EBF1 <1> jmp .loop 3723 <1> 3724 <1> .done: 3725 000035C5 9D <1> popf ; CF 3726 000035C6 C3 <1> retn 3727 <1> 3728 <1> 3729 <1> ; Loop through bb breakpoints and exchange the saved 3730 <1> ; byte with that one at the actual address. Used to write 3731 <1> ; the breakpoints. 3732 <1> ; 3733 <1> ; INP: - 3734 <1> ; OUT: NC if successful 3735 <1> ; CY if error writing a point, 3736 <1> ; cx = index of point that failed to write 3737 <1> ; (all PRIOR points were processed successfully, 3738 <1> ; either written successfully or skipped) 3739 <1> ; CHG: ax, bx, (e)dx, si, cx, di 3740 <1> ; STT: might return modeswitched 3741 <1> bb_writepoints: 3742 000035C7 31C9 <1> xor cx, cx 3743 000035C9 BF0100 <1> mov di, 1 3744 000035CC A9 <1> db __TEST_IMM16 ; (skip xor, NC) 3745 <1> 3746 <1> ; Same, but go through the breakpoints in reverse order 3747 <1> ; and check that what we overwrite is a 0CCh byte. If so, 3748 <1> ; restore the original value. (The 0CCh is discarded.) 3749 <1> ; 3750 <1> ; INP: cx = index *above* last to write (_NUM_B_BP for all) 3751 <1> ; OUT: NC if successful 3752 <1> ; CY if error writing a point, 3753 <1> ; cx = index of point that failed to write 3754 <1> ; ah = 1 if error because point could not be written 3755 <1> ; ah = 2 if error because address is unreachable 3756 <1> ; ah = 3 if error because point contained non-0CCh value, 3757 <1> ; al = new byte 3758 <1> ; CHG: ax, bx, (e)dx, si, cx, di 3759 <1> ; STT: might return modeswitched 3760 <1> bb_writepoints_restore: 3761 000035CD 31FF <1> xor di, di ; (NC) 3762 <1> bb_wp: 3763 <1> lframe near 3764 000035CF 5589E5 <1> lenter 3765 <1> lvar word, is_write 3766 000035D2 57 <1> push di 3767 <1> 3768 000035D3 F646FE01 <1> test byte [bp + ?is_write], 1 3769 <1> ; (NC) is it writing ? 3770 000035D7 7459 <1> jz .next ; no, is restoring, first decrement cx --> 3771 <1> 3772 <1> .loop: 3773 000035D9 89C8 <1> mov ax, cx 3774 000035DB E82B55 <1> call calcpointbit ; bx = index, ah = value 3775 000035DE 84A7[0201] <1> test byte [b_bplist.used_mask+bx], ah 3776 <1> ; (NC) 3777 000035E2 744E <1> jz .next 3778 000035E4 84A7[0401] <1> test byte [b_bplist.disabled_mask+bx], ah 3779 <1> ; (NC) 3780 000035E8 7548 <1> jnz .next 3781 <1> 3782 000035EA 89CE <1> mov si, cx 3783 000035EC 01F6 <1> add si, si 3784 000035EE 01F6 <1> add si, si ; * 4 3785 <1> %if BPSIZE == 4 3786 <1> %elif BPSIZE == 5 3787 <1> add si, cx ; * 5 3788 <1> %elif BPSIZE == 6 3789 <1> add si, cx ; * 5 3790 <1> add si, cx ; * 6 3791 <1> %elif BPSIZE == 9 3792 000035F0 01F6 <1> add si, si ; * 8 3793 000035F2 01CE <1> add si, cx ; * 9 3794 <1> %else 3795 <1> %error Unexpected breakpoint size 3796 <1> %endif 3797 000035F4 81C6[0601] <1> add si, b_bplist.bp ; -> point 3798 <1> 3799 000035F8 E866FE <1> call gg_bb_lods_bp_linear 3800 <1> ; dx:ax = linear address 3801 <1> 3802 000035FB E8B700 <1> call gg_bb_check_is_first 3803 000035FE 7332 <1> jnc .next ; (NC) 3804 <1> 3805 00003600 E8CD02 <1> call getsegmented ; bx:(e)dx = segmented address 3806 <1> %if BPSIZE == 6 3807 <1> lodsw ; skip word offset 3808 <1> %elif BPSIZE == 9 3809 00003603 AD <1> lodsw 3810 00003604 AD <1> lodsw ; skip dword offset 3811 <1> %endif 3812 00003605 AC <1> lodsb ; get byte to write 3813 00003606 B402 <1> mov ah, 2 3814 00003608 723E <1> jc .return ; not in PM anymore/address not available --> (CY) 3815 0000360A F646FE01 <1> test byte [bp + ?is_write], 1 3816 <1> ; writing? 3817 0000360E 7517 <1> jnz .forward_nocheck ; yes --> 3818 <1> 3819 <1> .backward_check: 3820 00003610 50 <1> push ax 3821 00003611 E88663 <1> call readmem ; read current byte 3822 00003614 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 3823 00003616 B483 <1> mov ah, 83h ; (80h = error occurred while restoring) 3824 00003618 F9 <1> stc 3825 00003619 752D <1> jne .return_discard ; nope --> (CY) 3826 0000361B 58 <1> pop ax 3827 0000361C E84E63 <1> call writemem ; return the byte to its original value 3828 0000361F 7211 <1> jc .next ; failed --> (CY, handled there) 3829 00003621 C644FFCC <1> mov byte [si-1], 0CCh ; reset stored point 3830 00003625 EB0B <1> jmp short .next 3831 <1> 3832 <1> .forward_nocheck: 3833 <1> %if _DELAY_BEFORE_BP 3834 00003627 E887FE <1> call delay_before_bp 3835 <1> %endif 3836 0000362A E84063 <1> call writemem 3837 0000362D 7203 <1> jc .next 3838 0000362F 8844FF <1> mov byte [si-1], al ; save the previous byte there 3839 <1> .next: 3840 00003632 B401 <1> mov ah, 1 ; (in case of error) 3841 00003634 7212 <1> jc .return ; failed to write --> (CY) 3842 <1> 3843 00003636 F646FE01 <1> test byte [bp + ?is_write], 1 3844 0000363A 7505 <1> jnz .is_write_next 3845 0000363C 49 <1> dec cx ; restore: decrement index 3846 0000363D 799A <1> jns .loop ; decremented to 0FFFFh ? no, loop --> 3847 0000363F EB06 <1> jmp .return_NC 3848 <1> 3849 <1> .is_write_next: 3850 00003641 41 <1> inc cx ; write: increment index 3851 00003642 83F910 <1> cmp cx, _NUM_B_BP ; above last ? 3852 00003645 7292 <1> jb .loop ; no, loop --> 3853 <1> .return_NC: 3854 00003647 F8 <1> clc 3855 <1> .return: 3856 <1> .return_discard: 3857 00003648 730A <1> jnc .ret 3858 <1> 3859 0000364A F646FE01 <1> test byte [bp + ?is_write], 1 3860 <1> ; restoring ? 3861 0000364E 7503 <1> jnz .ret_CY ; no --> 3862 00003650 80CC80 <1> or ah, 80h ; error occurred while restoring 3863 <1> .ret_CY: 3864 00003653 F9 <1> stc 3865 <1> .ret: 3866 00003654 89EC5D <1> lleave 3867 00003657 C3 <1> lret 3868 <1> %endif 3869 <1> 3870 <1> 3871 <1> %if _NUM_G_BP 3872 <1> ; Loop through saved breakpoints and exchange the saved 3873 <1> ; byte with that one at the actual address. Used to write 3874 <1> ; the breakpoints. 3875 <1> ; 3876 <1> ; INP: si-> current point 3877 <1> ; cx = number of points to write (might be zero) 3878 <1> ; OUT: NC if successful 3879 <1> ; CY if error writing a point, 3880 <1> ; cx = number of points still to write (including failed one) 3881 <1> ; (si-BPSIZE)-> point that failed 3882 <1> ; CHG: ax, bx, (e)dx, si, cx, di 3883 <1> gg_writepoints: 3884 00003658 BF0100 <1> mov di, 1 3885 0000365B A9 <1> db __TEST_IMM16 ; (skip xor, NC) 3886 <1> 3887 <1> ; Same, but go through the breakpoints in reverse order 3888 <1> ; and check that what we overwrite is a 0CCh byte. If so, 3889 <1> ; restore the original value. (The 0CCh is discarded.) 3890 <1> ; 3891 <1> ; Additionally: 3892 <1> ; OUT: CY if error writing a point, 3893 <1> ; ah = 1 if error because point could not be written 3894 <1> ; ah = 2 if error because address is unreachable 3895 <1> ; ah = 3 if error because point contained non-0CCh value, 3896 <1> ; al = new byte 3897 <1> gg_writepoints_restore: 3898 0000365C 31FF <1> xor di, di ; (NC) 3899 <1> gg_wp: 3900 0000365E E348 <1> jcxz .return ;if nothing to do --> (still NC from xor/test) 3901 <1> .loop: 3902 00003660 E8FEFD <1> call gg_bb_lods_bp_linear 3903 <1> ; dx:ax = linear address 3904 <1> 3905 00003663 E84F00 <1> call gg_bb_check_is_first 3906 00003666 7209 <1> jc @F ; if to handle this breakpoint --> 3907 <1> 3908 <1> ; Skip to next breakpoint. 3909 <1> %if BPSIZE == 4 || BPSIZE == 5 3910 <1> inc si ; -> after point 3911 <1> %elif BPSIZE == 6 3912 <1> add si, 3 ; skip word offset and byte content 3913 <1> %elif BPSIZE == 9 3914 00003668 83C605 <1> add si, 5 ; skip dword offset and byte content 3915 <1> %endif 3916 <1> ; BPSIZE implied 3917 <1> 3918 0000366B 85FF <1> test di, di ; (NC) 3919 0000366D 7533 <1> jnz .next ; going forward --> 3920 0000366F EB23 <1> jmp .next_lea_si ; (NC) 3921 <1> 3922 <1> ; Handle this breakpoint. 3923 <1> @@: 3924 00003671 E85C02 <1> call getsegmented ; bx:(e)dx = segmented address 3925 <1> %if BPSIZE == 6 3926 <1> lodsw ; skip word offset 3927 <1> %elif BPSIZE == 9 3928 00003674 AD <1> lodsw 3929 00003675 AD <1> lodsw ; skip dword offset 3930 <1> %endif 3931 00003676 AC <1> lodsb ; get byte to write 3932 00003677 B402 <1> mov ah, 2 3933 00003679 722D <1> jc .return ; not in PM anymore/address not available --> (CY) 3934 0000367B 85FF <1> test di, di ; writing? 3935 0000367D 751A <1> jnz .forward_nocheck ; yes --> 3936 <1> 3937 <1> .backward_check: 3938 0000367F 50 <1> push ax 3939 00003680 E81763 <1> call readmem ; read current byte 3940 00003683 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 3941 00003685 B483 <1> mov ah, 83h ; (80h = error occurred while restoring) 3942 00003687 F9 <1> stc 3943 00003688 7529 <1> jne .return_discard ; nope --> (CY) 3944 0000368A 58 <1> pop ax 3945 0000368B E8DF62 <1> call writemem ; return the byte to its original value 3946 0000368E 7212 <1> jc .next ; failed --> (CY, handled there) 3947 00003690 C644FFCC <1> mov byte [si-1], 0CCh ; reset stored point 3948 <1> .next_lea_si: 3949 00003694 8D74EE <1> lea si, [si-2*BPSIZE] ; adjust (for reverse writing) 3950 00003697 EB09 <1> jmp short .next 3951 <1> 3952 <1> .forward_nocheck: 3953 <1> %if _DELAY_BEFORE_BP 3954 00003699 E815FE <1> call delay_before_bp 3955 <1> %endif 3956 0000369C E8CE62 <1> call writemem 3957 0000369F 8844FF <1> mov byte [si-1], al ; save the previous byte there 3958 <1> .next: 3959 000036A2 B401 <1> mov ah, 1 ; (in case of error) 3960 000036A4 7202 <1> jc .return ; failed to write --> (CY) 3961 000036A6 E2B8 <1> loop .loop 3962 <1> .return: ; (NC) 3963 000036A8 730A <1> jnc .ret 3964 <1> 3965 000036AA 85FF <1> test di, di ; restoring ? 3966 000036AC 7503 <1> jnz .ret_CY ; no --> 3967 000036AE 80CC80 <1> or ah, 80h ; error occurred while restoring 3968 <1> .ret_CY: 3969 000036B1 F9 <1> stc 3970 000036B2 52 <1> push dx ; (counteract effect of pop) 3971 <1> .return_discard: 3972 000036B3 5A <1> pop dx 3973 <1> .ret: 3974 000036B4 C3 <1> retn 3975 <1> %endif 3976 <1> 3977 <1> 3978 <1> ; INP: dx:ax = linear address of point to be (re)set 3979 <1> ; dword [internalflags2] 3980 <1> ; dword [gg_first_cseip_linear] 3981 <1> ; OUT: CY if to (re)set breakpoint 3982 <1> ; if: no flag set 3983 <1> ; or: dx:ax doesn't match, dif2_gg_skip_non_cseip clear 3984 <1> ; (setting non-cseip point) 3985 <1> ; or: dx:ax matches, dif2_gg_skip_cseip clear 3986 <1> ; (setting cseip point afterwards) 3987 <1> ; NC if to not (re)set breakpoint 3988 <1> ; if: dx:ax doesn't match, dif2_gg_skip_non_cseip set 3989 <1> ; (not setting non-cseip point afterwards) 3990 <1> ; or: dx:ax matches, dif2_gg_skip_cseip set 3991 <1> ; (not setting cseip point) 3992 <1> gg_bb_check_is_first: 3993 000036B5 F606[A000]07 <1> testopt [internalflags2], dif2_gg_is_first | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 3995 000036BA 7418 <1> jz .continue 3996 <1> 3997 000036BC 3906[B400] <1> cmp [gg_first_cseip_linear], ax 3998 000036C0 7514 <1> jne .is_not_first 3999 000036C2 3916[B600] <1> cmp [gg_first_cseip_linear + 2], dx 4000 000036C6 750E <1> jne .is_not_first 4001 <1> 4002 <1> .is_first: 4003 000036C8 800E[A000]10 <1> setopt [internalflags2], dif2_gg_first_detected 4004 000036CD F606[A000]04 <1> testopt [internalflags2], dif2_gg_skip_cseip 4005 000036D2 7509 <1> jnz .skip 4006 <1> .continue: 4007 000036D4 F9 <1> stc 4008 000036D5 C3 <1> retn 4009 <1> 4010 <1> .is_not_first: 4011 000036D6 F606[A000]02 <1> testopt [internalflags2], dif2_gg_skip_non_cseip 4012 000036DB 74F7 <1> jz .continue 4013 <1> .skip: 4014 000036DD F8 <1> clc 4015 000036DE C3 <1> retn 4016 <1> 4017 <1> 4018 <1> ; INP: al = number to put 4019 <1> ; OUT: putsline called with ordinal string 4020 <1> ; CHG: di, [line_out], ax 4021 <1> putordinalbyte: 4022 000036DF 53 <1> push bx 4023 000036E0 51 <1> push cx 4024 000036E1 52 <1> push dx 4025 <1> 4026 <1> ; Note that trim_overflow in front of line_out is 4027 <1> ; initialised to '0', which we depend on here. 4028 <1> ; With the output from decbyte, at least two decimal 4029 <1> ; digits are always valid in the buffer. 4030 000036E2 BF[0E08] <1> mov di, line_out 4031 000036E5 E80700 <1> call ordinalbyte 4032 000036E8 E88B83 <1> call putsline 4033 000036EB 5A <1> pop dx 4034 000036EC 59 <1> pop cx 4035 000036ED 5B <1> pop bx 4036 000036EE C3 <1> retn 4037 <1> 4038 <1> 4039 <1> ordinalbyte: 4040 000036EF E8AF82 <1> call decbyte 4041 000036F2 8B45FE <1> mov ax, [di - 2] ; al = lower address, higher decimal digit 4042 <1> ; ah = higher address, lower decimal digit 4043 000036F5 3C31 <1> cmp al, '1' 4044 000036F7 7417 <1> je .gotsuf_th ; 11th, 12th, 13th or other teen --> 4045 000036F9 BA7374 <1> mov dx, "st" 4046 000036FC 80FC31 <1> cmp ah, '1' 4047 000036FF 7412 <1> je .gotsuf ; if low digit was one --> 4048 00003701 BA6E64 <1> mov dx, "nd" 4049 00003704 80FC32 <1> cmp ah, '2' 4050 00003707 740A <1> je .gotsuf ; if low digit was two --> 4051 00003709 B272 <1> mov dl, 'r' 4052 0000370B 80FC33 <1> cmp ah, '3' 4053 0000370E 7403 <1> je .gotsuf ; if low digit was three --> 4054 <1> .gotsuf_th: 4055 00003710 BA7468 <1> mov dx, "th" 4056 <1> .gotsuf: 4057 00003713 89D0 <1> mov ax, dx 4058 00003715 AB <1> stosw 4059 00003716 C3 <1> retn 4060 <1> 4061 <1> 4062 <1> %if _BREAKPOINTS 4063 <1> ; INP: ss:bp -> error info (points at first info word) 4064 <1> ; Each word provides information for one point we tried 4065 <1> ; to restore. The lowest info word corresponds to the 4066 <1> ; first bb breakpoint (bb 00), followed by the info word 4067 <1> ; for the second bb breakpoint (bb 01), and so on. 4068 <1> ; There are always as many info words as there are 4069 <1> ; bb breakpoints. 4070 <1> ; CHG: ax, bx, cx, dx, di, si 4071 <1> ; STT: sets es to ss 4072 <1> bb_handlefailedrestore: 4073 <1> %if _PM 4074 00003717 E89101 <1> call resetmode 4075 <1> %endif 4076 0000371A 31FF <1> xor di, di 4077 0000371C 31C9 <1> xor cx, cx 4078 0000371E 16 <1> push ss 4079 0000371F 07 <1> pop es 4080 00003720 BE[0601] <1> mov si, b_bplist.bp 4081 <1> .loop: 4082 00003723 8B03 <1> mov ax, word [bp + di] 4083 00003725 F6C47F <1> test ah, 7Fh ; failed ? 4084 00003728 7414 <1> jz .next 4085 0000372A 51 <1> push cx 4086 0000372B 57 <1> push di 4087 <1> ; cx = 0-based index 4088 0000372C FF7402 <1> push word [si + 2] 4089 0000372F FF34 <1> push word [si] ; stack: linear address 4090 00003731 8A5C08 <1> mov bl, byte [si + BPSIZE - 1] 4091 <1> ; bl = what we tried to restore 4092 00003734 B740 <1> mov bh, 40h ; bh = 40h (bb) 4093 00003736 80CC80 <1> or ah, 80h ; ah & 80h = set (is restore) 4094 00003739 E8A509 <1> call display_breakpoint_failure 4095 0000373C 5F <1> pop di 4096 0000373D 59 <1> pop cx 4097 <1> .next: 4098 0000373E 83C609 <1> add si, BPSIZE 4099 00003741 AF <1> scasw ; di += 2 4100 00003742 41 <1> inc cx 4101 00003743 83F910 <1> cmp cx, _NUM_B_BP 4102 00003746 72DB <1> jb .loop 4103 <1> .end: 4104 00003748 C3 <1> retn 4105 <1> %endif 4106 <1> 4107 <1> 4108 <1> %if _NUM_G_BP 4109 <1> ; INP: cx = number of restored points (number of info words) 4110 <1> ; ss:bp-> error info (points *behind* last info word) 4111 <1> ; Each word provides information for one point we tried 4112 <1> ; to restore. The lowest info word corresponds to the 4113 <1> ; first gg breakpoint, followed by the info word for 4114 <1> ; the second gg breakpoint (if any), and so on. 4115 <1> ; CHG: ax, bx, cx, dx, di, si 4116 <1> ; STT: sets es to ss 4117 <1> gg_handlefailedrestore: 4118 <1> %if _PM 4119 00003749 E85F01 <1> call resetmode 4120 <1> %endif 4121 0000374C 89CF <1> mov di, cx 4122 0000374E 01FF <1> add di, di 4123 00003750 F7DF <1> neg di 4124 00003752 16 <1> push ss 4125 00003753 07 <1> pop es 4126 00003754 BB0000 <1> mov bx, 0 4127 00003757 BE[7C07] <1> mov si, g_bplist.bp 4128 0000375A E325 <1> jcxz .end 4129 <1> .loop: 4130 0000375C 8B03 <1> mov ax, word [bp+di] 4131 0000375E F6C47F <1> test ah, 7Fh ; failed? 4132 00003761 7416 <1> jz .next ; no --> 4133 <1> 4134 <1> ; si-> point 4135 <1> ; ax = info (ah = reason, al = new value if reason 3) 4136 <1> ; bx = point's 0-based index 4137 <1> .display: 4138 00003763 53 <1> push bx 4139 00003764 57 <1> push di 4140 00003765 89D9 <1> mov cx, bx ; cx = 0-based index 4141 00003767 FF7402 <1> push word [si + 2] 4142 0000376A FF34 <1> push word [si] ; stack: linear address 4143 0000376C 8A5C08 <1> mov bl, byte [si + BPSIZE - 1] 4144 <1> ; bl = what we tried to restore 4145 0000376F B780 <1> mov bh, 80h ; bh = 80h (gg) 4146 00003771 80CC80 <1> or ah, 80h ; ah & 80h = set (is restore) 4147 00003774 E86A09 <1> call display_breakpoint_failure 4148 00003777 5F <1> pop di 4149 00003778 5B <1> pop bx 4150 <1> .next: 4151 00003779 43 <1> inc bx ; increment counter 4152 0000377A 83C609 <1> add si, BPSIZE ; -> next point 4153 0000377D 47 <1> inc di 4154 0000377E 47 <1> inc di ; di+bp-> next error info 4155 0000377F 75DB <1> jnz .loop ; not yet at end --> 4156 <1> .end: 4157 00003781 C3 <1> retn 4158 <1> %endif ; _NUM_G_BP 4159 <1> 4160 <1> 4161 <1> ; INP: word [reg_cs] 4162 <1> ; (d)word [reg_eip] 4163 <1> ; OUT: bx = word [reg_cs] 4164 <1> ; CY if invalid address 4165 <1> ; NC if address is valid, 4166 <1> ; dx:ax = linear address 4167 <1> ; CHG: edx, ax, ecx 4168 <1> get_cseip_minus_1_linear: 4169 00003782 66 <1> _386_PM_o32 ; or ecx, byte -1 4170 00003783 83C9FF <1> or cx, byte -1 4171 <1> 4172 <1> ; INP: word [reg_cs] 4173 <1> ; (d)word [reg_eip] 4174 <1> ; (e)cx = adjustment to (e)ip 4175 <1> ; OUT: bx = word [reg_cs] 4176 <1> ; CY if invalid address 4177 <1> ; NC if address is valid, 4178 <1> ; dx:ax = linear address 4179 <1> ; CHG: edx, ax 4180 <1> get_cseip_ecx_linear: 4181 00003786 8B1E[900C] <1> mov bx, [reg_cs] ; bx = cs 4182 0000378A 66 <1> _386_PM_o32 4183 0000378B 8B16[9C0C] <1> mov dx, [reg_eip] ; (e)dx = (e)ip 4184 0000378F 66 <1> _386_PM_o32 4185 00003790 01CA <1> add dx, cx ; bx:(e)dx = adjusted cs:(e)ip 4186 <1> ; (getlinear doesn't use the high word of edx if it's a 16-bit cs) 4187 <1> ; call getlinear ; dx:ax = linear address of this cs:eip 4188 <1> ; (fall through) 4189 <1> 4190 <1> ; INP: If currently in RM, 4191 <1> ; bx:dx = segment:offset of address 4192 <1> ; If currently in PM, 4193 <1> ; bx:(e)dx = selector:offset of address 4194 <1> ; OUT: bx = unchanged (selector/segment) 4195 <1> ; CY if address is invalid, 4196 <1> ; because Int31.0006 failed for bx or 4197 <1> ; because 32-bit address overflowed or 4198 <1> ; because A20 could not be switched on 4199 <1> ; NC if address is valid, 4200 <1> ; dx:ax = linear address 4201 <1> ; dh is always zero if the address is in RM address space 4202 <1> ; CHG: dx, ax 4203 <1> getlinear: 4204 <1> %if _PM 4205 00003792 E81601 <1> call resetmode 4206 <1> ; This must execute in the correct mode, 4207 <1> ; because we get the input from whatever 4208 <1> ; mode we were originally entered in. 4209 <1> %endif 4210 <1> %if _DEBUG1 4211 <1> call .do_not_use_test ; get linear address 4212 <1> jc @F ; already an error ? then return --> 4213 <1> push bx 4214 <1> push cx 4215 <1> mov bx, test_records_getLinear 4216 <1> call handle_test_case_multiple_16 4217 <1> ; check whether this should testcase the error 4218 <1> ; CY to indicate error from this call 4219 <1> pop cx 4220 <1> pop bx 4221 <1> @@: 4222 <1> retn 4223 <1> 4224 <1> %endif 4225 <1> .do_not_use_test: 4226 00003795 53 <1> push bx 4227 <1> %if _PM 4228 00003796 E8645A <1> call ispm 4229 00003799 7521 <1> jnz .rm 4230 0000379B B80600 <1> mov ax, 0006h 4231 0000379E 51 <1> push cx 4232 0000379F 52 <1> push dx 4233 000037A0 CD31 <1> int 31h ; get selector base address into cx:dx 4234 000037A2 58 <1> pop ax ; (edxh:)ax = offset, cx:dx = base 4235 000037A3 7214 <1> jc .return_cx_bx 4236 <1> 4237 000037A5 E8C025 <1> _386 call test_d_b_bit 4238 000037A8 7406 <1> _386 jz .16 4239 000037AA 6652 <1> _386 push edx 4240 000037AC 5B <1> _386 pop bx 4241 000037AD 5B <1> _386 pop bx ; bx = high word edx (in 32-bit PM segment) 4242 000037AE EB02 <1> _386 jmp .32 4243 <1> .16: ; bx:ax = offset 4244 000037B0 31DB <1> xor bx, bx ; 16-bit PM segment, clear offset high word 4245 <1> .32: 4246 000037B2 01D0 <1> add ax, dx 4247 000037B4 11CB <1> adc bx, cx ; add the base 4248 000037B6 87DA <1> xchg bx, dx ; dx:ax = 32-bit linear address 4249 000037B8 F8 <1> clc 4250 <1> 4251 <1> .return_cx_bx: 4252 000037B9 59 <1> pop cx 4253 000037BA 5B <1> pop bx 4254 000037BB C3 <1> retn 4255 <1> .rm: 4256 <1> %endif 4257 000037BC 89D8 <1> mov ax, bx 4258 000037BE 51 <1> push cx 4259 000037BF B104 <1> mov cl, 4 4260 000037C1 D3C0 <1> rol ax, cl 4261 000037C3 59 <1> pop cx 4262 000037C4 BBF0FF <1> mov bx, 0FFF0h 4263 000037C7 21C3 <1> and bx, ax ; bx = low word adjustment 4264 000037C9 83E00F <1> and ax, byte 0Fh ; ax = higher bits which don't fit in the low word 4265 000037CC 01DA <1> add dx, bx 4266 000037CE 83D000 <1> adc ax, byte 0 4267 000037D1 92 <1> xchg ax, dx ; dx:ax = 21-bit linear address 4268 000037D2 F606[9D00]10 <1> testopt [internalflags], debuggeeA20 4269 000037D7 7503 <1> jnz .return_bx ; A20 line enabled, no need to adjust (NC) 4270 000037D9 80E2EF <1> and dl, ~10h ; clear corresponding bit of the address if it was set (NC) 4271 <1> .return_bx: 4272 000037DC 5B <1> pop bx 4273 000037DD C3 <1> retn 4274 <1> 4275 <1> 4276 <1> ; INP: bx = segment/selector to use by default 4277 <1> ; al = next character in input 4278 <1> ; si -> following character in input 4279 <1> ; OUT: NC if successful, 4280 <1> ; bx:dx = linear address 4281 <1> ; (if not _PM, this always fits in 24 bits) 4282 <1> ; al = next character 4283 <1> ; si -> following character 4284 <1> ; (d)word [bp_offset] = preferred offset, -1 if none 4285 <1> ; CY if error 4286 <1> ; CHG: edx, bx, ax, si, (d)word [bp_offset] 4287 <1> getlinearaddr: 4288 <1> %if _PM 4289 000037DE E8CA00 <1> call resetmode 4290 <1> %endif 4291 000037E1 66 <1> _386_PM_o32 ; or dword 4292 000037E2 830E[5085]FF <1> or word [bp_offset], strict byte -1 4293 000037E7 E87781 <1> call skipcomm0 4294 000037EA 3C40 <1> cmp al, '@' 4295 000037EC 752B <1> jne .at_not 4296 000037EE AC <1> lodsb ; insure we have a blank or opening parens 4297 000037EF 3C28 <1> cmp al, '(' 4298 000037F1 740A <1> je .at 4299 000037F3 3C09 <1> cmp al, 9 4300 000037F5 7406 <1> je .at 4301 000037F7 3C20 <1> cmp al, 32 4302 000037F9 7402 <1> je .at 4303 000037FB EB19 <1> jmp .at_not_reload ; assume the @ is part of a symbol 4304 <1> 4305 <1> .at: 4306 000037FD E89081 <1> call skipwh0 4307 00003800 3C28 <1> cmp al, '(' 4308 00003802 750D <1> jne .at_not_paren 4309 <1> 4310 00003804 E82C7B <1> call getdword 4311 00003807 E88681 <1> call skipwh0 4312 0000380A 3C29 <1> cmp al, ')' 4313 0000380C 7521 <1> jne .error 4314 0000380E AC <1> lodsb 4315 <1> 4316 0000380F EB03 <1> jmp .at_got 4317 <1> 4318 <1> .at_not_paren: 4319 00003811 E81F7B <1> call getdword 4320 <1> .at_got: 4321 <1> %ifn _PM 4322 <1> ; test bh, bh 4323 <1> ; jnz .error 4324 <1> cmp bx, 11h 4325 <1> jae .error 4326 <1> %endif 4327 00003814 F8 <1> clc 4328 00003815 C3 <1> retn 4329 <1> 4330 <1> .at_not_reload: 4331 00003816 4E <1> dec si 4332 00003817 4E <1> dec si 4333 00003818 AC <1> lodsb 4334 <1> .at_not: 4335 00003819 E83071 <1> call getaddrX 4336 <1> %if _PM 4337 0000381C 8326[5285]00 <1> _no386 and word [bp_offset + 2], 0 4338 <1> %endif 4339 00003821 66 <1> _386_PM_o32 ; mov dword [bp_offset], edx 4340 00003822 8916[5085] <1> mov word [bp_offset], dx 4341 00003826 50 <1> push ax 4342 00003827 E868FF <1> call getlinear 4343 0000382A 93 <1> xchg bx, ax ; dx:bx = linear 4344 0000382B 87D3 <1> xchg dx, bx ; bx:dx = linear 4345 0000382D 58 <1> pop ax ; al = next character 4346 0000382E C3 <1> retn 4347 <1> 4348 <1> .error: 4349 0000382F F9 <1> stc 4350 00003830 C3 <1> retn 4351 <1> 4352 <1> 4353 <1> usesection lDEBUG_DATA_ENTRY 4354 <1> align 4, db 0 4355 00008550 0000 <1> bp_offset: dw 0 4356 <1> %if _PM 4357 00008552 0000 <1> dw 0 4358 <1> %endif 4359 <1> usesection lDEBUG_CODE 4360 <1> 4361 <1> 4362 <1> ; INP: word [reg_cs] 4363 <1> ; (d)word [reg_eip] 4364 <1> ; dword [tpg_possible_breakpoint] 4365 <1> ; [internalflags2] & dif2_tpg_have_bp 4366 <1> ; OUT: CY if invalid address 4367 <1> ; NC if address is valid, 4368 <1> ; dx:ax = linear address 4369 <1> ; CHG: edx, ax, ecx, bx 4370 <1> ; STT: ds = ss = debugger data selector 4371 <1> get_cseip_of_possible_breakpoint: 4372 00003831 A1[BC00] <1> mov ax, [tpg_possible_breakpoint] 4373 00003834 8B16[BE00] <1> mov dx, [tpg_possible_breakpoint + 2] 4374 <1> ; dx:ax = stored possible breakpoint address 4375 00003838 F606[A100]01 <1> testopt [internalflags2], dif2_tpg_have_bp 4376 0000383D 7511 <1> jnz .retn ; (NC) if already stored --> 4377 0000383F E840FF <1> call get_cseip_minus_1_linear 4378 <1> ; dx:ax = linear address at cs:(e)ip - 1 4379 00003842 720C <1> jc .retn ; (CY) if getlinear failed --> 4380 00003844 A3[BC00] <1> mov [tpg_possible_breakpoint], ax 4381 00003847 8916[BE00] <1> mov [tpg_possible_breakpoint + 2], dx 4382 <1> ; store for later use 4383 0000384B 800E[A100]01 <1> setopt [internalflags2], dif2_tpg_have_bp 4384 <1> ; (NC) 4385 <1> .retn: 4386 00003850 C3 <1> retn 4387 <1> 4388 <1> 4389 <1> %if _PM 4390 <1> 4391 <1> ; DEBUGX: when a mode switch from PM to RM did occur in the debuggee, 4392 <1> ; breakpoint addresses in non-RM address space are unreachable. 4393 <1> ; To enable the debugger to reset the breakpoints, it has to switch 4394 <1> ; temporarily to PM. (In DEBUG/X 1.19, a switch from RM to PM in the 4395 <1> ; debuggee will temporarily switch the debugger back to RM too. We 4396 <1> ; handle this case without a switch as the linear RM address can be 4397 <1> ; accessed directly in PM, assuming that the DPMI hosts linear-to- 4398 <1> ; physical mapping for the RM address space is the same as the one 4399 <1> ; we get in PM.) 4400 <1> 4401 <1> ; (To use mode switching in any case, the format the breakpoints are 4402 <1> ; stored in needs to be modified. Additionally, the mode switching 4403 <1> ; needs to be done elsewhere instead of in getsegmented. resetmode 4404 <1> ; can be used as is, even if a mode switch from PM to RM occured.) 4405 <1> 4406 <1> switchmode: 4407 <1> ;--- raw switch: 4408 <1> ;--- si:e/di: new cs:e/ip 4409 <1> ;--- dx:e/bx: new ss:e/sp 4410 <1> ;--- ax: new ds 4411 <1> ;--- cx: new es 4412 00003851 6631DB <1> _386 xor ebx, ebx ; clear ebxh 4413 00003854 89E3 <1> mov bx, sp 4414 00003856 6631FF <1> _386 xor edi, edi ; clear edih 4415 00003859 BF[8038] <1> mov di, .back_after_switch 4416 0000385C E89E59 <1> call ispm 4417 0000385F 740F <1> jz .pm 4418 <1> .r86m: 4419 <1> d4 call d4message 4420 <1> d4 asciz "In switchmode.r86m",13,10 4421 00003861 A1[D488] <1> mov ax, [dssel] ; switch rm -> pm 4422 00003864 8B36[D000] <1> mov si, [code_sel] 4423 00003868 89C2 <1> mov dx, ax 4424 0000386A 89C1 <1> mov cx, ax 4425 0000386C FF2E[C088] <1> jmp far [dpmi_rm2pm] 4426 <1> .pm: 4427 <1> d4 call d4message 4428 <1> d4 asciz "In switchmode.pm",13,10 4429 00003870 A1[A60A] <1> mov ax, [pspdbg] ; switch pm -> rm 4430 00003873 8B36[CE00] <1> mov si, [code_seg] 4431 00003877 89C2 <1> mov dx, ax 4432 00003879 89C1 <1> mov cx, ax 4433 0000387B 66 <1> _386_o32 ; jmp far dword [dpmi_pm2rm] 4434 0000387C FF2E[C888] <1> jmp far [dpmi_pm2rm] 4435 <1> 4436 <1> .back_after_switch: 4437 00003880 8036[9D00]08 <1> xoropt [internalflags], protectedmode 4438 <1> d4 call d4message 4439 <1> d4 asciz "In switchmode.back_after_switch",13,10 4440 00003885 C3 <1> retn 4441 <1> 4442 <1> 4443 <1> ; INP: al = direction, 0 = save state, 1 = restore state 4444 <1> ; [auxbuff] = state buffer 4445 <1> ; ES = debugger data selector 4446 <1> ; CHG: edi 4447 <1> sr_state: 4448 00003886 F606[9E00]20 <1> testopt [internalflags], switchbuffer 4449 0000388B 741B <1> jz .return ; no need to call --> 4450 0000388D 66 <1> _386_o32 ; xor edi, edi 4451 0000388E 31FF <1> xor di, di 4452 00003890 E86A59 <1> call ispm 4453 00003893 740A <1> jz .pm 4454 <1> .r86m: 4455 <1> d4 call d4message 4456 <1> d4 asciz "In sr_state.r86m",13,10 4457 00003895 8E06[F409] <1> mov es, word [auxbuff_segorsel + soaSegment] 4458 00003899 FF1E[C488] <1> call far [dpmi_rmsav] 4459 0000389D EB09 <1> jmp .return 4460 <1> 4461 <1> .pm: 4462 <1> d4 call d4message 4463 <1> d4 asciz "In sr_state.pm",13,10 4464 0000389F 8E06[F609] <1> mov es, word [auxbuff_segorsel + soaSelector] 4465 000038A3 66 <1> _386_o32 ; call far dword [dpmi_pmsav] 4466 000038A4 FF1E[CE88] <1> call far [dpmi_pmsav] 4467 <1> .return: 4468 000038A8 16 <1> push ss 4469 000038A9 07 <1> pop es 4470 000038AA C3 <1> retn 4471 <1> 4472 <1> 4473 <1> ; INP: [internalflags] & modeswitched 4474 <1> ; OUT: flag cleared, mode switched back if had been switched 4475 <1> ; EI 4476 <1> ; CHG: - (not even flags!) 4477 <1> ; STT: es = ds = ss = gs = fs = debugger data segment/selector 4478 <1> ; 4479 <1> ; Switches back to RM if a mode switch to PM was done by getsegmented. 4480 <1> ; Does nothing otherwise. (Can be called multiple times.) 4481 <1> resetmode: 4482 000038AB 9C <1> pushf 4483 000038AC F606[9E00]08 <1> testopt [internalflags], modeswitched ; switched mode previously ? 4484 000038B1 741A <1> jz .return ; no --> 4485 <1> d4 call d4message 4486 <1> d4 asciz "In resetmode (actually resetting)",13,10 4487 <1> subcpu 286 4488 000038B3 66 <1> _386_o32 4489 000038B4 60 <1> pusha 4490 000038B5 E899FF <1> call switchmode ; switch back to the mode we were entered in (RM) 4491 000038B8 B001 <1> mov al, 1 4492 000038BA E8C9FF <1> call sr_state ; restore state 4493 000038BD E89C0B <1> call handle_mode_changed ; ! called with flag set 4494 000038C0 8026[9E00]F7 <1> clropt [internalflags], modeswitched ; reset the flag 4495 000038C5 16 <1> _386 push ss 4496 000038C6 0FA9 <1> _386 pop gs 4497 000038C8 16 <1> _386 push ss 4498 000038C9 0FA1 <1> _386 pop fs 4499 000038CB 66 <1> _386_o32 4500 000038CC 61 <1> popa 4501 <1> subcpureset 4502 <1> .return: 4503 000038CD 9D <1> popf 4504 000038CE FB <1> sti 4505 000038CF C3 <1> retn 4506 <1> %endif 4507 <1> 4508 <1> ; INP: dx:ax = linear address 4509 <1> ; OUT: CY if inaccessible 4510 <1> ; NC if accessible, 4511 <1> ; bx:(e)dx = segment:offset or selector:offset address 4512 <1> ; A temporary mode switch from RM to PM might have occured. 4513 <1> ; This has to be reset by calling resetmode. 4514 <1> ; CHG: (e)ax, (e)bx, (e)dx, fs, gs 4515 <1> ; STT: es = ds = ss = our segment/selector 4516 <1> ; 4517 <1> ; It is assumed that only one byte needs to be accessed. 4518 <1> ; (A workaround to access multiple bytes would be to access each 4519 <1> ; byte separately and call this function for each of the bytes.) 4520 <1> ; 4521 <1> ; The TSR command code assumes that getsegmented.pm does not switch 4522 <1> ; modes and that it will return an offset in (e)dx that allows 4523 <1> ; 16-bit access. Adjust that code if either is no longer true. 4524 <1> getsegmented: 4525 <1> %if _DEBUG1 4526 <1> push bx 4527 <1> push cx 4528 <1> mov bx, test_records_getSegmented 4529 <1> call handle_test_case_multiple_16 4530 <1> pop cx 4531 <1> pop bx 4532 <1> jnc @F 4533 <1> ; stc ; (already CY if the conditional didn't jump) 4534 <1> retn 4535 <1> 4536 <1> @@: 4537 <1> %endif 4538 <1> .do_not_use_test: 4539 <1> 4540 <1> %if _PM 4541 000038D0 E82A59 <1> call ispm 4542 000038D3 7513 <1> jnz .rm 4543 <1> .pm: 4544 000038D5 51 <1> push cx 4545 000038D6 8B1E[D888] <1> mov bx, word [scratchsel] 4546 000038DA 92 <1> xchg ax, dx 4547 000038DB 91 <1> xchg ax, cx ; cx:dx = linear address 4548 000038DC B80700 <1> mov ax, 0007h 4549 000038DF CD31 <1> int 31h ; set base to the address 4550 000038E1 59 <1> pop cx 4551 000038E2 723B <1> jc .invalid 4552 <1> %if 0 ; scratchsel is expected by other code to access arbitrary data ?? 4553 <1> push cx 4554 <1> mov ax, 0008h 4555 <1> xor cx, cx 4556 <1> xor dx, dx 4557 <1> int 31h ; set limit to zero (access to one byte only) 4558 <1> pop cx 4559 <1> jc .invalid 4560 <1> %endif 4561 000038E4 66 <1> _386_o32 ; xor edx, edx 4562 000038E5 31D2 <1> xor dx, dx ; bx:(e)dx = selector:offset (using scratchsel with the address as base) 4563 000038E7 C3 <1> retn ; (NC) 4564 <1> %endif 4565 <1> .rm: 4566 000038E8 83FA10 <1> cmp dx, byte 10h ; check for address space 4567 000038EB 7249 <1> jb .nothma ; below HMA, normal access --> 4568 000038ED 7432 <1> je .checkhma ; possibly in HMA --> 4569 <1> .nonrmspace: ; above HMA 4570 <1> %if _PM 4571 <1> ; It's a PM address but we are in RM. 4572 000038EF F606[9E00]04 <1> testopt [internalflags], canswitchmode 4573 000038F4 7429 <1> jz .invalid ; can't switch to PM --> 4574 <1> .switchmodes: 4575 000038F6 66 <1> _386_o32 4576 000038F7 56 <1> push si 4577 000038F8 66 <1> _386_o32 4578 000038F9 57 <1> push di 4579 000038FA 66 <1> _386_o32 4580 000038FB 51 <1> push cx 4581 000038FC 66 <1> _386_o32 4582 000038FD 55 <1> push bp 4583 000038FE 52 <1> push dx 4584 000038FF 50 <1> push ax 4585 <1> d4 call d4message 4586 <1> d4 asciz "In getsegmented.switchmodes (switching to access memory beyond 1088 KiB)",13,10 4587 00003900 E82A0C <1> call remember_mode 4588 00003903 800E[9E00]08 <1> setopt [internalflags], modeswitched ; set flag for resetmode 4589 00003908 B000 <1> mov al, 0 4590 0000390A E879FF <1> call sr_state ; save state 4591 0000390D E841FF <1> call switchmode ; switch to PM 4592 00003910 E8490B <1> call handle_mode_changed ; ! called with flag set 4593 00003913 58 <1> pop ax 4594 00003914 5A <1> pop dx 4595 00003915 66 <1> _386_o32 4596 00003916 5D <1> pop bp 4597 00003917 66 <1> _386_o32 4598 00003918 59 <1> pop cx 4599 00003919 66 <1> _386_o32 4600 0000391A 5F <1> pop di 4601 0000391B 66 <1> _386_o32 4602 0000391C 5E <1> pop si 4603 0000391D EBB6 <1> jmp .pm 4604 <1> 4605 <1> .invalid: ; the address is inaccessible 4606 <1> %endif 4607 0000391F F9 <1> stc 4608 00003920 C3 <1> retn 4609 <1> 4610 <1> .checkhma: 4611 00003921 83F8F0 <1> cmp ax, -10h ; valid offset for HMA ? 4612 00003924 73C9 <1> jae .nonrmspace ; no, above HMA --> 4613 00003926 F606[9D00]20 <1> testopt [internalflags], debuggerA20 ; A20 on, HMA accessible ? 4614 0000392B 74C2 <1> jz .nonrmspace ; no, treat as above HMA (DEBUGX) --> 4615 0000392D BBFFFF <1> mov bx, 0FFFFh ; the HMA must always be addressed by segment FFFFh 4616 00003930 83C010 <1> add ax, byte 10h ; and the offset is always at least 0010h (FFFFh:0010h = 00100000h) 4617 <1> ; (NC because we checked that this won't overflow) 4618 00003933 92 <1> xchg ax, dx ; bx:dx = segment:offset 4619 00003934 EB11 <1> jmp .zero_edxh 4620 <1> 4621 <1> .nothma: 4622 00003936 51 <1> push cx 4623 00003937 B104 <1> mov cl, 4 4624 00003939 D3CA <1> ror dx, cl ; dx (high 4 bits) = high 4 bits of segment 4625 0000393B 89C3 <1> mov bx, ax 4626 0000393D D3EB <1> shr bx, cl ; bx = low 12 bits of segment 4627 0000393F 09DA <1> or dx, bx ; dx = segment 4628 00003941 83E00F <1> and ax, byte 0Fh ; ax = low 4 bits of linear, used as offset (NC) 4629 00003944 92 <1> xchg ax, dx 4630 00003945 93 <1> xchg ax, bx ; bx:dx = segment:offset 4631 00003946 59 <1> pop cx 4632 <1> .zero_edxh: 4633 00003947 660FB7D2 <1> _386_PM movzx edx, dx 4634 0000394B C3 <1> retn 4635 <1> 4636 <1> 4637 <1> ; T command - Trace. 4638 <1> tt: 4639 0000394C 88C4 <1> mov ah, al 4640 0000394E 80E4DF <1> and ah, TOUPPER 4641 00003951 80FC4D <1> cmp ah, 'M' 4642 00003954 7548 <1> jnz isnotmodeset 4643 00003956 E80780 <1> call skipcomma 4644 00003959 E8DE7F <1> call iseol? 4645 0000395C 741C <1> je ismodeget 4646 0000395E E8B87E <1> call getword 4647 00003961 E8EB7F <1> call chkeol ; expect end of line here 4648 00003964 83FA01 <1> cmp dx, 1 4649 00003967 7603E9A66B <1> ja error 4650 0000396C 7407 <1> je .set ; selected 1 --> 4651 <1> .clear: ; selected 0 4652 0000396E 8026[7C00]FD <1> clropt [options], traceints 4653 00003973 EB05 <1> jmp short .get 4654 <1> .set: 4655 00003975 800E[7C00]02 <1> setopt [options], traceints 4656 <1> .get: 4657 <1> ismodeget: 4658 0000397A B030 <1> mov al, '0' 4659 0000397C BE[217A] <1> mov si, tmode0 4660 0000397F F606[7C00]02 <1> testopt [options], traceints 4661 00003984 7404 <1> jz .zero 4662 00003986 40 <1> inc ax 4663 00003987 BE[1A7A] <1> mov si, tmode1 4664 <1> .zero: 4665 0000398A A2[067A] <1> mov byte [tmodev], al 4666 0000398D BF[0E08] <1> mov di, line_out 4667 00003990 56 <1> push si 4668 00003991 BE[F879] <1> mov si, tmodes 4669 00003994 E80480 <1> call showstring 4670 00003997 5E <1> pop si 4671 00003998 E80080 <1> call showstring 4672 0000399B E9D480 <1> jmp putsline_crlf 4673 <1> 4674 <1> isnotmodeset: 4675 <1> %if _TTEST 4676 0000399E 50 <1> push ax 4677 0000399F 80FC54 <1> cmp ah, 'T' 4678 000039A2 7516 <1> jne @F 4679 000039A4 8B04 <1> mov ax, word [si] 4680 000039A6 25DFDF <1> and ax, TOUPPER_W 4681 000039A9 3D4553 <1> cmp ax, "ES" 4682 000039AC 750C <1> jne @F 4683 000039AE 8A4402 <1> mov al, byte [si + 2] 4684 000039B1 24DF <1> and al, TOUPPER 4685 000039B3 3C54 <1> cmp al, 'T' 4686 000039B5 7503E9C900 <1> je ttestcmd 4687 <1> @@: 4688 000039BA 58 <1> pop ax 4689 <1> %endif 4690 <1> %if _TSR 4691 000039BB 80FC53 <1> cmp ah, 'S' 4692 000039BE 750D <1> jne @F 4693 000039C0 50 <1> push ax 4694 000039C1 8A04 <1> mov al, byte [si] 4695 000039C3 24DF <1> and al, TOUPPER 4696 000039C5 3C52 <1> cmp al, 'R' 4697 000039C7 58 <1> pop ax 4698 000039C8 7503E9C401 <1> je tsr 4699 <1> %endif 4700 <1> @@: 4701 000039CD 8026[9F00]F7 <1> clropt [internalflags], tt_p 4702 000039D2 80FC50 <1> cmp ah, 'P' 4703 000039D5 7506 <1> jne @F 4704 000039D7 AC <1> lodsb 4705 000039D8 800E[9F00]08 <1> setopt [internalflags], tt_p 4706 <1> @@: 4707 <1> tt0: 4708 000039DD C706[DA0B][DD39] <1> mov word [lastcmd], tt0 4709 000039E3 8026[A100]EF <1> clropt [internalflags2], dif2_is_pp 4710 000039E8 E89F0B <1> call parse_pt ; process arguments 4711 <1> 4712 <1> ; Do it times. 4713 <1> tt1: 4714 000039EB 53 <1> push bx 4715 000039EC 51 <1> push cx 4716 <1> 4717 000039ED F606[9F00]08 <1> testopt [internalflags], tt_p 4718 000039F2 7449 <1> jz .not_p 4719 <1> 4720 <1> %if _PM 4721 000039F4 E8B4FE <1> call resetmode 4722 <1> %endif 4723 000039F7 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 4724 000039FA 8B1E[900C] <1> mov bx, word [reg_cs] 4725 000039FE 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 4726 000039FF 8B36[9C0C] <1> mov si, word [reg_eip] 4727 <1> .pp2: 4728 00003A03 E84108 <1> call pp16 ; get next instruction byte into AL 4729 00003A06 BF[E410] <1> mov di, ppbytes 4730 00003A09 B91800 <1> mov cx, PPLEN_ONLY_STRING 4731 00003A0C F2AE <1> repne scasb 4732 00003A0E 752D <1> jne .not_p ; if not one of these --> 4733 00003A10 8A451E <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 4734 00003A13 A880 <1> test al, PP_PREFIX ; prefix ? 4735 00003A15 740E <1> jz .pp3 ; no --> 4736 00003A17 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 4737 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 4738 <1> ; between decoding as O32 and O16, they're always 4739 <1> ; decoded as O32. The same is true for A32, and 4740 <1> ; in a 32-bit cs for O16 and A16. 4741 00003A19 FECA <1> dec dl 4742 00003A1B 75E6 <1> jnz .pp2 ; if not out of bytes --> 4743 00003A1D BA[D971] <1> mov dx, msg.warnprefix 4744 00003A20 E8CD83 <1> call putsz 4745 00003A23 EB18 <1> jmp .not_p 4746 <1> 4747 <1> ; A repeatable string instruction is to be decoded. 4748 <1> ; Finish the decoding and skip the appropriate number 4749 <1> ; of opcode bytes. 4750 <1> .pp3: 4751 00003A25 E83104 <1> _386_PM call pp_fix32bitflags 4752 00003A28 A847 <1> test al, PP_VARSIZ | PP_SIZ_MASK 4753 00003A2A 7403E9E36A <1> jnz error 4754 <1> %if 0 4755 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 4756 <1> jz .ignoreosize ; no --> 4757 <1> and dh, 2 4758 <1> add al, dh 4759 <1> .ignoreosize: 4760 <1> and ax, PP_SIZ_MASK 4761 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 4762 <1> _386_PM_o32 ; add esi, eax 4763 <1> add si, ax 4764 <1> %endif 4765 <1> ; pp10: 4766 <1> ; jmp short pp11 ; we have a skippable instruction here 4767 <1> ; pp11: 4768 00003A2F E83323 <1> _386_PM call resetmode_and_test_d_b_bit 4769 00003A32 7504 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 4770 00003A34 660FB7F6 <1> _386_PM movzx esi, si ; clear high word here 4771 <1> .32: 4772 00003A38 E87607 <1> call proceedbreakpoint ; run until the breakpoint is hit 4773 <1> ; This call might return modeswitched. 4774 00003A3B EB03 <1> jmp short @F 4775 <1> 4776 <1> .not_p: 4777 00003A3D E87502 <1> call traceone ; call common code 4778 <1> @@: 4779 00003A40 7303E93702 <1> jc unexpectedinterrupt ; an unexpected interrupt occured --> 4780 <1> %if _BREAKPOINTS 4781 00003A45 7416 <1> jz @F ; (breakpoint after instruction was hit) 4782 <1> 4783 <1> ; bb breakpoint was hit. dumpregs, then return 4784 00003A47 E8D600 <1> call handle_bb_hit_pass_match 4785 00003A4A 7204 <1> jc .actual_hit ; actual match ? --> 4786 00003A4C 7418 <1> jz tt2.nodump ; non-silent mode ? --> 4787 00003A4E EB0D <1> jmp tt2 ; silent mode --> 4788 <1> 4789 <1> .actual_hit: 4790 <1> %if _PM 4791 00003A50 E858FE <1> call resetmode 4792 <1> %endif 4793 00003A53 E829F8 <1> call put_deferred_message_silent 4794 00003A56 E85D05 <1> call dumpregs_extended_silent 4795 00003A59 59 <1> pop cx 4796 00003A5A 5B <1> pop bx ; (discard counter) 4797 00003A5B EB1C <1> jmp @FF 4798 <1> @@: 4799 <1> %endif 4800 <1> tt2: 4801 <1> %if _PM 4802 00003A5D E84BFE <1> call resetmode 4803 <1> %endif 4804 00003A60 E81CF8 <1> call put_deferred_message_silent 4805 00003A63 E85005 <1> call dumpregs_extended_silent 4806 <1> ; dump registers 4807 <1> .nodump: 4808 <1> 4809 00003A66 E85600 <1> call tt_handle_while 4810 00003A69 59 <1> pop cx 4811 00003A6A 5B <1> pop bx 4812 <1> 4813 00003A6B 83E901 <1> sub cx, 1 4814 00003A6E 83DB00 <1> sbb bx, 0 ; decrement loop counter 4815 <1> 4816 00003A71 85DB <1> test bx, bx 4817 00003A73 750B <1> jnz tt1_jmp ; loop --> 4818 00003A75 85C9 <1> test cx, cx 4819 00003A77 7507 <1> jnz tt1_jmp ; loop --> 4820 <1> 4821 <1> @@: 4822 <1> %if _PM 4823 00003A79 E82FFE <1> call resetmode 4824 <1> %endif 4825 00003A7C E8B182 <1> call silence_dump 4826 <1> 4827 00003A7F C3 <1> retn 4828 <1> 4829 <1> tt1_jmp: 4830 00003A80 E968FF <1> jmp tt1 4831 <1> 4832 <1> 4833 <1> %if _TTEST 4834 <1> ttestcmd: 4835 00003A83 58 <1> pop ax 4836 00003A84 46 <1> inc si 4837 00003A85 46 <1> inc si 4838 00003A86 46 <1> inc si 4839 00003A87 E8057F <1> call skipwhite 4840 <1> 4841 <1> .tt0: 4842 00003A8A C706[DA0B][8A3A] <1> mov word [lastcmd], .tt0 4843 00003A90 8026[A100]EF <1> clropt [internalflags2], dif2_is_pp 4844 00003A95 E8F20A <1> call parse_pt ; process arguments 4845 <1> 4846 <1> ; Do it times. 4847 <1> .tt1: 4848 00003A98 53 <1> push bx 4849 00003A99 51 <1> push cx 4850 <1> 4851 <1> .tt2: 4852 <1> %if _PM 4853 00003A9A E80EFE <1> call resetmode 4854 <1> %endif 4855 00003A9D E8DFF7 <1> call put_deferred_message_silent 4856 00003AA0 E81305 <1> call dumpregs_extended_silent 4857 <1> ; dump registers 4858 <1> .nodump: 4859 <1> 4860 00003AA3 E81900 <1> call tt_handle_while 4861 00003AA6 59 <1> pop cx 4862 00003AA7 5B <1> pop bx 4863 <1> 4864 00003AA8 83E901 <1> sub cx, 1 4865 00003AAB 83DB00 <1> sbb bx, 0 ; decrement loop counter 4866 <1> 4867 00003AAE 85DB <1> test bx, bx 4868 00003AB0 750B <1> jnz .tt1_jmp ; loop --> 4869 00003AB2 85C9 <1> test cx, cx 4870 00003AB4 7507 <1> jnz .tt1_jmp ; loop --> 4871 <1> 4872 <1> @@: 4873 <1> %if _PM 4874 00003AB6 E8F2FD <1> call resetmode 4875 <1> %endif 4876 00003AB9 E87482 <1> call silence_dump 4877 <1> 4878 00003ABC C3 <1> retn 4879 <1> 4880 <1> .tt1_jmp: 4881 00003ABD EBD9 <1> jmp .tt1 4882 <1> %endif 4883 <1> 4884 <1> 4885 <1> tt_handle_while: 4886 00003ABF F606[9F00]04 <1> testopt [internalflags], tt_while 4887 00003AC4 7434 <1> jz @F 4888 <1> 4889 <1> %if _PM 4890 00003AC6 E8E2FD <1> call resetmode 4891 <1> %endif 4892 00003AC9 E82F00 <1> call .copy_condition_to_line_out 4893 <1> ; dx = si -> line_out with condition 4894 00003ACC FF36[F00A] <1> push word [rc] 4895 00003AD0 8F06[F20A] <1> pop word [priorrc] 4896 00003AD4 AC <1> lodsb 4897 00003AD5 E85B78 <1> call getexpression ; parse stored expression 4898 00003AD8 E8747E <1> call chkeol 4899 00003ADB E86772 <1> call toboolean ; get boolean 4900 00003ADE 85D2 <1> test dx, dx ; true ? 4901 00003AE0 7518 <1> jnz @F ; yes, continue --> 4902 <1> 4903 00003AE2 E84B82 <1> call silence_dump 4904 <1> 4905 00003AE5 BA[4369] <1> mov dx, msg.while_terminated_before 4906 00003AE8 E80583 <1> call putsz 4907 00003AEB E80D00 <1> call .copy_condition_to_line_out 4908 00003AEE E8FF82 <1> call putsz ; display condition 4909 00003AF1 BA[5569] <1> mov dx, msg.while_terminated_after 4910 00003AF4 E8F982 <1> call putsz 4911 00003AF7 E906C5 <1> jmp cmd3 4912 <1> 4913 <1> @@: 4914 00003AFA C3 <1> retn 4915 <1> 4916 <1> 4917 <1> .copy_condition_to_line_out: 4918 00003AFB 8E06[F209] <1> mov es, word [auxbuff_segorsel] 4919 00003AFF 31FF <1> xor di, di ; -> stored expression (if not PM) 4920 <1> %if _PM 4921 00003B01 033E[F009] <1> add di, word [auxbuff_switchbuffer_size] 4922 <1> ; -> stored expression 4923 <1> %endif 4924 00003B05 89FE <1> mov si, di 4925 00003B07 B9FFFF <1> mov cx, -1 4926 00003B0A B000 <1> mov al, 0 4927 00003B0C F2AE <1> repne scasb 4928 00003B0E F7D1 <1> not cx ; = length, including zero terminator 4929 00003B10 06 <1> push es 4930 00003B11 1F <1> pop ds ; ds:si -> auxbuff stored expression 4931 00003B12 16 <1> push ss 4932 00003B13 07 <1> pop es 4933 00003B14 BF[0E08] <1> mov di, line_out ; -> line_out 4934 00003B17 57 <1> push di 4935 00003B18 F3A4 <1> rep movsb ; move over 4936 00003B1A 5E <1> pop si 4937 <1> 4938 00003B1B 89F2 <1> mov dx, si 4939 00003B1D 16 <1> push ss 4940 00003B1E 1F <1> pop ds ; -> line_out 4941 00003B1F C3 <1> retn 4942 <1> 4943 <1> 4944 <1> ; INP: cl = flags indicating what kind of bb match occurred 4945 <1> ; cl & 1 set if actual hit, 4946 <1> ; else cl & 2 set if pass match, 4947 <1> ; else it is a non-pass non-hit match 4948 <1> ; (cl & 4 always set (indicates any bb match)) 4949 <1> ; cl & 8 set if pp/tt breakpoint hit 4950 <1> ; dword [ss:sp] = command repetition counter 4951 <1> ; OUT: NC if pass match or non-pass non-hit match, 4952 <1> ; if pass match: deferred message output, dumpregs output 4953 <1> ; if cl & 8 set (pass/nonpass bb, tt/pp hit): 4954 <1> ; ZR if [internalflags] & tt_silent_mode clear 4955 <1> ; NZ if [internalflags] & tt_silent_mode set 4956 <1> ; if cl & 8 clear (pass/nonpass bb, no tt/pp hit): 4957 <1> ; ZR 4958 <1> ; dword [ss:sp] increased by 1 4959 <1> ; CY if actual hit (hit bb) 4960 <1> ; ax = INP:cx 4961 <1> ; CHG: dx, bx, cx, si, di, all high words, fs, gs 4962 <1> ; STT: ds = es = ss 4963 <1> handle_bb_hit_pass_match: 4964 <1> d5 call d5message 4965 <1> d5 asciz "in handle_bb_hit_pass_match",13,10 4966 <1> 4967 00003B20 91 <1> xchg ax, cx 4968 <1> 4969 00003B21 F606[A100]08 <1> testopt [internalflags2], dif2_bp_failure 4970 00003B26 7567 <1> jnz .actual_hit ; after failure, handle as actual hit 4971 <1> 4972 00003B28 A801 <1> test al, 1 ; actual hit ? else: non-hit, pass or non-pass 4973 00003B2A 7563 <1> jnz .actual_hit ; yes --> 4974 <1> 4975 00003B2C A802 <1> test al, 2 ; at least pass match ? 4976 00003B2E 7418 <1> jz .nonpassnonhit ; no --> 4977 <1> 4978 <1> .passnonhit: 4979 <1> 4980 <1> d5 call d5message 4981 <1> d5 asciz "bb pass non-hit",13,10 4982 <1> 4983 <1> %if _PM 4984 00003B30 E878FD <1> call resetmode 4985 <1> %endif 4986 <1> ; call put_deferred_message_loud 4987 00003B33 BA[6370] <1> mov dx, msg.empty_message 4988 00003B36 8716[C000] <1> xchg dx, word [gg_deferred_message] 4989 00003B3A E8B382 <1> call putsz 4990 00003B3D BA[76BA] <1> mov dx, putsline 4991 00003B40 E849F7 <1> call put_bb_deferred_message_calling_dx 4992 <1> 4993 00003B43 50 <1> push ax 4994 <1> ; call dumpregs_extended_loud 4995 <1> ; (includes handle_serial_flags_ctrl_c) 4996 00003B44 E89CEB <1> call dumpregs_extended 4997 00003B47 58 <1> pop ax ; (preserve so the test al, 8 can use it) 4998 <1> .nonpassnonhit: 4999 00003B48 E88C04 <1> call handle_serial_flags_ctrl_c 5000 <1> 5001 <1> ; al & 4 always set 5002 <1> 5003 00003B4B 8026[A000]E9 <1> clropt [internalflags2], dif2_gg_skip_non_cseip | dif2_gg_skip_cseip | dif2_gg_first_detected 5005 00003B50 800E[A000]01 <1> setopt [internalflags2], dif2_gg_is_first 5006 <1> 5007 00003B55 FF36[BA00] <1> push word [gg_next_cseip_linear + 2] 5008 00003B59 FF36[B800] <1> push word [gg_next_cseip_linear] 5009 00003B5D 8F06[B400] <1> pop word [gg_first_cseip_linear] 5010 00003B61 8F06[B600] <1> pop word [gg_first_cseip_linear + 2] 5011 <1> 5012 00003B65 A808 <1> test al, 8 ; not bb hit, is tt/pp hit ? 5013 00003B67 7519 <1> jnz @FF ; yes --> 5014 <1> 5015 00003B69 F706[A000]8010 <1> testopt [internalflags2], dif2_is_pp | dif2_tpg_keep_proceed_bp, 1 5016 00003B6F 7502 <1> jnz @F 5017 00003B71 EB0F <1> jmp @FF 5018 <1> 5019 <1> @@: 5020 <1> lframe near 5021 <1> lpar dword, counter 5022 <1> lpar_return 5023 00003B73 5589E5 <1> lenter 5024 00003B76 83460401 <1> add word [bp + ?counter], 1 5025 00003B7A 83560600 <1> adc word [bp + ?counter + 2], 0 5026 00003B7E 5D <1> lleave 5027 00003B7F 38C0 <1> cmp al, al ; (NC, ZR) 5028 00003B81 C3 <1> retn 5029 <1> 5030 <1> @@: 5031 00003B82 A802 <1> test al, 2 ; displayed pass point ? 5032 00003B84 7503 <1> jnz @F ; yes --> 5033 00003B86 A8FF <1> test al, -1 ; NC, NZ (do not skip dump) 5034 <1> ; al & 0Ch is set so this test is NZ 5035 00003B88 C3 <1> retn 5036 <1> 5037 <1> @@: 5038 00003B89 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5039 <1> ; (NC, ZF is ZR if to skip dump) 5040 00003B8E C3 <1> retn 5041 <1> 5042 <1> .actual_hit: 5043 <1> d5 call d5message 5044 <1> d5 asciz "bb hit",13,10 5045 <1> 5046 00003B8F F9 <1> stc 5047 00003B90 C3 <1> retn 5048 <1> 5049 <1> 5050 <1> %if _TSR 5051 <1> tsr: 5052 00003B91 E89BC9 <1> call guard_re 5053 00003B94 46 <1> inc si 5054 00003B95 AC <1> lodsb 5055 00003B96 E8B67D <1> call chkeol 5056 00003B99 F606[9E00]40 <1> testopt [internalflags], tsrmode 5057 00003B9E 7405 <1> jz .try ; not yet resident --> 5058 00003BA0 BA[595F] <1> mov dx, msg.alreadytsr 5059 00003BA3 EB53 <1> jmp short .putsz 5060 <1> .try: 5061 00003BA5 8B16[A40A] <1> mov dx, word [pspdbe] 5062 00003BA9 8B1E[A60A] <1> mov bx, word [pspdbg] 5063 00003BAD BF0A00 <1> mov di, 0Ah 5064 <1> .loop: 5065 <1> %if _PM 5066 00003BB0 89D1 <1> mov cx, dx ; = original segment address 5067 00003BB2 E84856 <1> call ispm 5068 00003BB5 7514 <1> jnz .rm 5069 00003BB7 53 <1> push bx 5070 00003BB8 89D0 <1> mov ax, dx 5071 <1> [cpu 286] 5072 00003BBA C1EA0C <1> shr dx, 12 5073 00003BBD C1E004 <1> shl ax, 4 ; shift to get a 32-bit linear address 5074 <1> __CPU__ 5075 00003BC0 E812FD <1> call getsegmented.pm ; set up selector for access 5076 <1> ; This call makes some assumptions: 5077 <1> ; - No mode switch occurs; we are still in PM. 5078 <1> ; Currently none is performed from PM. 5079 <1> ; - (e)dx isn't larger than about FFD0h. 5080 <1> ; Currently scratchsel with an offset of zero is returned. 5081 00003BC3 89D7 <1> mov di, dx ; -> PSP 5082 00003BC5 89DA <1> mov dx, bx 5083 00003BC7 5B <1> pop bx 5084 00003BC8 83C70A <1> add di, byte 0Ah ; -> PSP termination vector 5085 <1> .rm: 5086 <1> %endif 5087 00003BCB 8EC2 <1> mov es, dx 5088 00003BCD 268B450C <1> mov ax, word [es:(di-0Ah)+16h] 5089 00003BD1 40 <1> inc ax 5090 00003BD2 741F <1> jz .pspnotfound 5091 00003BD4 48 <1> dec ax 5092 00003BD5 741C <1> jz .pspnotfound ; parent is invalid --> 5093 <1> %if _PM 5094 00003BD7 39C8 <1> cmp ax, cx 5095 <1> %else 5096 <1> cmp ax, dx 5097 <1> %endif 5098 00003BD9 7418 <1> je .pspnotfound ; parent is the process itself --> 5099 00003BDB 89C2 <1> mov dx, ax 5100 00003BDD 39D8 <1> cmp ax, bx 5101 00003BDF 75CF <1> jne .loop ; parent is not us --> 5102 00003BE1 26813D[D085] <1> cmp word [es:di], int22 5103 00003BE6 7506 <1> jne .psphooked 5104 00003BE8 26395D02 <1> cmp word [es:di+2], bx 5105 00003BEC 740D <1> je .found ; correct vector --> (otherwise: hooked) 5106 <1> .psphooked: 5107 00003BEE BA[F95E] <1> mov dx, msg.psphooked 5108 00003BF1 EB03 <1> jmp short .putsz_es 5109 <1> .pspnotfound: 5110 00003BF3 BA[CE5E] <1> mov dx, msg.pspnotfound 5111 <1> .putsz_es: 5112 00003BF6 16 <1> push ss 5113 00003BF7 07 <1> pop es 5114 <1> .putsz: 5115 00003BF8 E9F581 <1> jmp putsz 5116 <1> 5117 <1> .found: 5118 00003BFB BE[C80A] <1> mov si, psp22 5119 00003BFE A5 <1> movsw 5120 00003BFF A5 <1> movsw ; write our parent's vector 5121 00003C00 83C708 <1> add di, 16h-(0Ah+4) 5122 00003C03 A5 <1> movsw ; write our parent 5123 00003C04 800E[9E00]40 <1> setopt [internalflags], tsrmode ; note that we are resident 5124 <1> %if _PM 5125 00003C09 51 <1> push cx 5126 <1> %else 5127 <1> push es 5128 <1> %endif 5129 00003C0A BA[375F] <1> mov dx, msg.nowtsr1 5130 00003C0D E8E6FF <1> call .putsz_es 5131 00003C10 58 <1> pop ax 5132 00003C11 BF[0E08] <1> mov di, line_out 5133 00003C14 E8237E <1> call hexword 5134 00003C17 E85C7E <1> call putsline 5135 00003C1A BF[C80A] <1> mov di, psp22 5136 00003C1D 31C0 <1> xor ax, ax 5137 00003C1F AB <1> stosw 5138 00003C20 AB <1> stosw 5139 00003C21 AB <1> stosw ; clear our parent/int22 fields 5140 00003C22 BA[475F] <1> mov dx, msg.nowtsr2 5141 00003C25 EBD1 <1> jmp short .putsz 5142 <1> %endif 5143 <1> 5144 <1> 5145 <1> ; INP: dx -> message, zero-terminated 5146 <1> ; CHG: - 5147 <1> ; OUT: message displayed or put into silent buffer 5148 <1> ; STT: ds = es = ss = debugger data selector 5149 <1> putsz_silent: 5150 00003C27 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5151 00003C2C 7405 <1> jz @F 5152 00003C2E 800E[9F00]20 <1> setopt [internalflags], tt_silence 5153 <1> @@: 5154 00003C33 E8BA81 <1> call putsz ; print string 5155 00003C36 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5156 00003C3B 7405 <1> jz @F 5157 00003C3D 8026[9F00]DF <1> clropt [internalflags], tt_silence 5158 <1> @@: 5159 00003C42 C3 <1> retn 5160 <1> 5161 <1> 5162 <1> ; INP: es:di -> behind message in line_out 5163 <1> ; CHG: ax, bx, cx, dx 5164 <1> ; OUT: message displayed or put into silent buffer 5165 <1> ; STT: ds = es = ss = debugger data selector 5166 <1> putsline_silent: 5167 00003C43 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5168 00003C48 7405 <1> jz @F 5169 00003C4A 800E[9F00]20 <1> setopt [internalflags], tt_silence 5170 <1> @@: 5171 00003C4F E8247E <1> call putsline 5172 00003C52 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5173 00003C57 7405 <1> jz @F 5174 00003C59 8026[9F00]DF <1> clropt [internalflags], tt_silence 5175 <1> @@: 5176 00003C5E C3 <1> retn 5177 <1> 5178 <1> 5179 <1> ; INP: word [run_int] 5180 <1> ; InDOS status 5181 <1> ; STT: es = ds = ss 5182 <1> ; OUT: dx -> message 5183 <1> ; CHG: ax, di 5184 <1> getrunint: 5185 00003C5F 8B16[D80B] <1> mov dx, word [run_int] 5186 00003C63 81FA[247D] <1> cmp dx, progtrm 5187 00003C67 7512 <1> jne .ret 5188 <1> 5189 00003C69 B8FFFF <1> mov ax, -1 5190 00003C6C E86F6A <1> call InDos 5191 00003C6F 7504 <1> jnz .no_int21_4D 5192 <1> 5193 00003C71 B44D <1> mov ah, 4Dh 5194 00003C73 CD21 <1> int 21h 5195 <1> .no_int21_4D: 5196 00003C75 BF[437D] <1> mov di, progexit 5197 00003C78 E8BF7D <1> call hexword 5198 <1> .ret: 5199 00003C7B C3 <1> retn 5200 <1> 5201 <1> 5202 <1> ; Print message about unexpected interrupt, dump registers, and 5203 <1> ; end command. This code is also used by the G and P commands. 5204 <1> unexpectedinterrupt: 5205 <1> %if _PM 5206 00003C7C E82CFC <1> call resetmode 5207 <1> %endif 5208 00003C7F E8DDFF <1> call getrunint 5209 00003C82 E8A2FF <1> call putsz_silent 5210 <1> %if _CATCHINT19 5211 00003C85 81FA[677B] <1> cmp dx, int19msg 5212 00003C89 7409 <1> je .noregs ; if it terminated, skip the registers 5213 <1> %endif 5214 00003C8B 81FA[247D] <1> cmp dx, progtrm 5215 00003C8F 7403 <1> je .noregs ; if it terminated, skip the registers 5216 00003C91 E82203 <1> call dumpregs_extended_silent 5217 <1> .noregs: 5218 00003C94 E89980 <1> call silence_dump 5219 <1> 5220 00003C97 F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 5221 00003C9C 7407 <1> jz @F 5222 00003C9E F606[7E00]20 <1> testopt [options], gg_unexpected_no_repeat 5223 00003CA3 EB05 <1> jmp @FF 5224 <1> @@: 5225 00003CA5 F606[7E00]40 <1> testopt [options], tp_unexpected_no_repeat 5226 <1> @@: 5227 00003CAA 7406 <1> jz @F 5228 00003CAC C706[DA0B][1404] <1> mov word [lastcmd], dmycmd 5229 <1> @@: 5230 <1> 5231 00003CB2 E94BC3 <1> jmp cmd3 ; back to the start 5232 <1> 5233 <1> 5234 <1> ; Trace an instruction. 5235 <1> ; INP: word [reg_cs], dword [reg_eip], other register values 5236 <1> ; OUT: NC if the breakpoint or trace interrupt was hit, 5237 <1> ; ah = 0 5238 <1> ; ch = 0 5239 <1> ; d[reg_eip] adjusted if a breakpoint (bb) hit 5240 <1> ; cx & 8 set if trace interrupt hit 5241 <1> ; (assumed to be the expected trace hit) 5242 <1> ; (ZF only set if _BREAKPOINTS) 5243 <1> ; ZR if trace interrupt was hit, 5244 <1> ; cx & 7 = 0 5245 <1> ; NZ if a breakpoint (bb) was hit (or both were hit), 5246 <1> ; cx & 1 set if non-pass match (actual hit), 5247 <1> ; else cx & 2 set if pass match (consider as hit first, 5248 <1> ; but dump registers next (not to silent buffer) 5249 <1> ; and then continue execution) 5250 <1> ; else cx & 4 always set, indicates any match 5251 <1> ; (including matches that should merely continue) 5252 <1> ; all pass points' counters stepped 5253 <1> ; CY if no breakpoint and no trace interrupt was hit, 5254 <1> ; cx = 0 5255 <1> ; If [internalflags2] & dif2_gg_is_gg is set: 5256 <1> ; ah & 7Fh = status = 0 = no error, 5257 <1> ; 1 = couldn't write, 5258 <1> ; 2 = unreachable, 5259 <1> ; 3 = overwritten, al = new value 5260 <1> ; ah & 80h = set if error restoring point, 5261 <1> ; else error writing point to begin with 5262 <1> ; If that flag is clear: 5263 <1> ; Does not return if a breakpoint cannot be written 5264 <1> ; or cannot be restored, jumps to cmd3 instead. 5265 <1> ; CHG: all 5266 <1> ; STT: ds = es = ss 5267 <1> ; might return modeswitched (if dif2_gg_is_gg) 5268 <1> ; might be called while modeswitched 5269 <1> traceone: 5270 00003CB5 F606[A000]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 5271 00003CBA 7403E99A00 <1> jnz .proceedbreakpoint 5272 <1> 5273 <1> %if _PM 5274 00003CBF E8E9FB <1> call resetmode 5275 <1> %endif 5276 00003CC2 31C9 <1> xor cx, cx 5277 00003CC4 E8495C <1> call getcseipbyte 5278 00003CC7 3CCD <1> cmp al, 0CDh ; int opcode? 5279 00003CC9 7403E98E00 <1> jne .isstdtrace ; no --> 5280 00003CCE 41 <1> inc cx 5281 00003CCF E83E5C <1> call getcseipbyte 5282 00003CD2 3C03 <1> cmp al, 3 5283 00003CD4 7503E98300 <1> je .isstdtrace ; int 3 opcode --> 5284 00003CD9 F606[7C00]02 <1> testopt [options], traceints ; TM=1? 5285 00003CDE 7503E9E800 <1> jz isstdtraceX 5286 00003CE3 3C01 <1> cmp al, 1 5287 00003CE5 7475 <1> je .isstdtrace ; int 1 opcode --> 5288 <1> 5289 <1> ; TM==1, single-step into the INT 5290 00003CE7 88C3 <1> mov bl, al 5291 <1> %if _PM 5292 00003CE9 E81155 <1> call ispm 5293 00003CEC 745C <1> jz .singlestep_into_interrupt_pm 5294 <1> %endif 5295 00003CEE B700 <1> mov bh, 0 5296 00003CF0 1E <1> push ds 5297 00003CF1 31C0 <1> xor ax, ax 5298 00003CF3 8ED8 <1> mov ds, ax 5299 00003CF5 D1E3 <1> shl bx, 1 5300 00003CF7 D1E3 <1> shl bx, 1 5301 00003CF9 C537 <1> lds si, [bx] 5302 00003CFB FA <1> cli 5303 00003CFC 8A04 <1> mov al, byte [si] 5304 00003CFE FE04 <1> inc byte [si] 5305 00003D00 3804 <1> cmp byte [si], al 5306 00003D02 8804 <1> mov byte [si], al 5307 00003D04 FB <1> sti 5308 00003D05 8CDB <1> mov bx, ds ; bx:si-> interrupt handler (RM, 16 bit) 5309 00003D07 89D8 <1> mov ax, bx 5310 00003D09 1F <1> pop ds 5311 00003D0A 754D <1> jne .singlestep_into_interrupt_setbp 5312 <1> 5313 <1> ; The interrupt handler is in a ROM. 5314 <1> %if 0 5315 <1> jmp short isstdtraceX 5316 <1> %else 5317 00003D0C 8736[9C0C] <1> xchg si, word [reg_eip] 5318 00003D10 8706[900C] <1> xchg ax, word [reg_cs] ; get cs:ip, set interrupt handler address 5319 00003D14 8B0E[A00C] <1> mov cx, word [reg_efl] ; get flags 5320 00003D18 1E <1> push ds 5321 00003D19 8B1E[740C] <1> mov bx, word [reg_esp] 5322 00003D1D 8E1E[8C0C] <1> mov ds, word [reg_ss] ; ds:bx-> debuggee stack 5323 00003D21 83EB06 <1> sub bx, byte 6 ; reserve enough space for flags, cs, ip 5324 00003D24 46 <1> inc si 5325 00003D25 46 <1> inc si ; skip CDh xxh opcode 5326 00003D26 894F04 <1> mov word [bx+4], cx 5327 00003D29 894702 <1> mov word [bx+2], ax 5328 00003D2C 8937 <1> mov word [bx+0], si ; save flags, cs, ip on stack 5329 00003D2E 1F <1> pop ds 5330 00003D2F 891E[740C] <1> mov word [reg_esp], bx ; update sp 5331 00003D33 8026[A10C]FC <1> and byte [reg_efl+1], ~(2|1) ; clear IF and TF (NC) 5332 <1> ; Note: If invalid flag values were previously set by the user 5333 <1> ; by directly accessing the FL or EFL register, these won't be 5334 <1> ; fixed by us now. This could be worked around by executing a 5335 <1> ; NOP in debuggee's environment (or only with debuggee's flags) 5336 <1> ; first, but I don't think it's much of an issue. 5337 00003D38 C706[D80B][717A] <1> mov word [run_int], int1msg 5338 00003D3E 8126[A000]7FF8 <1> clropt [internalflags2], dif2_tpg_have_bp | dif2_tpg_adjusted_cseip | dif2_tpg_do_not_adjust | dif2_tpg_keep_proceed_bp, 1 5341 00003D44 B90800 <1> mov cx, 8 5342 00003D47 31C0 <1> xor ax, ax ; NC, ZR 5343 00003D49 C3 <1> retn 5344 <1> 5345 <1> %endif 5346 <1> %if _PM 5347 <1> .singlestep_into_interrupt_pm: 5348 00003D4A B80402 <1> mov ax, 0204h 5349 00003D4D CD31 <1> int 31h 5350 00003D4F 89CB <1> mov bx, cx 5351 00003D51 66 <1> _386_o32 ; mov esi, edx 5352 00003D52 89D6 <1> mov si, dx ; bx:(e)si-> interrupt handler 5353 00003D54 F6C304 <1> test bl, 4 ; is it a LDT selector? (NC) 5354 00003D57 7472 <1> jz isstdtraceX ; no --> 5355 <1> %endif 5356 <1> .singlestep_into_interrupt_setbp: 5357 <1> .proceedbreakpoint: 5358 00003D59 E95504 <1> jmp proceedbreakpoint 5359 <1> 5360 <1> .isstdtrace: 5361 <1> %if _PM 5362 00003D5C E89E54 <1> call ispm 5363 00003D5F 7415 <1> jz .notdpmientry ; already in PM --> 5364 00003D61 A1[9C0C] <1> mov ax, w[reg_eip] ; is this a switch to protected mode ? 5365 00003D64 3B06[BC88] <1> cmp ax, w[dpmiwatch+0] 5366 00003D68 750C <1> jne .notdpmientry 5367 00003D6A A1[900C] <1> mov ax, w[reg_cs] 5368 00003D6D 3B06[BE88] <1> cmp ax, w[dpmiwatch+2] 5369 00003D71 7503E91404 <1> je isdpmientry ; yes, catch it --> (this means really "go") 5370 <1> .notdpmientry: 5371 <1> %endif 5372 00003D76 800E[A10C]01 <1> or byte [reg_efl+1], 1 ; set single-step mode (cleared when returning into DEBUG) 5373 00003D7B 31C9 <1> xor cx, cx 5374 00003D7D E86300 <1> call skipprefixes 5375 00003D80 3C9C <1> cmp al, 9Ch ; opcode "PUSHF"? 5376 00003D82 7527 <1> jnz .notpushf 5377 <1> %if _BREAKPOINTS 5378 00003D84 E8CC04 <1> call run_with_bb 5379 00003D87 B400 <1> mov ah, 0 5380 00003D89 9C <1> pushf 5381 <1> %else 5382 <1> call run 5383 <1> xor cx, cx 5384 <1> xor ax, ax 5385 <1> %endif 5386 <1> ; Clear TF in the fl word or efl dword 5387 <1> ; pointed to by debuggee's ss:(e)sp 5388 00003D8A 06 <1> push es 5389 <1> %if _PM 5390 00003D8B 8B1E[8C0C] <1> mov bx, word [reg_ss] ; get ss selector into bx 5391 00003D8F 8EC3 <1> mov es, bx 5392 00003D91 E8D41F <1> _386 call test_d_b_bit ; check whether a 32-bit ss 5393 <1> %else 5394 <1> mov es, word [reg_ss] 5395 <1> %endif 5396 00003D94 66 <1> _386_PM_o32 ; mov ebx, dword [reg_esp] 5397 00003D95 8B1E[740C] <1> mov bx, word [reg_esp] ; es:(e)bx-> debuggee's stack 5398 00003D99 7408 <1> _386_PM jz .pushf_16 5399 00003D9B 2667806301FE <1> _386_PM and byte [es:ebx+1], ~1 ; clear TF 5400 00003DA1 EB05 <1> _386_PM jmp short .pushf_common 5401 <1> .pushf_16: 5402 00003DA3 26806701FE <1> and byte [es:bx+1], ~1 ; clear TF 5403 <1> .pushf_common: 5404 00003DA8 07 <1> pop es 5405 00003DA9 EB06 <1> jmp short .checkreturn 5406 <1> .notpushf: 5407 <1> %if _BREAKPOINTS 5408 00003DAB E8A504 <1> call run_with_bb 5409 00003DAE B400 <1> mov ah, 0 5410 00003DB0 9C <1> pushf 5411 <1> %else 5412 <1> call run 5413 <1> xor cx, cx 5414 <1> xor ax, ax 5415 <1> %endif 5416 <1> .checkreturn: 5417 00003DB1 813E[D80B][717A] <1> cmp word [run_int], int1msg 5418 00003DB7 7509 <1> jne .nomatch 5419 00003DB9 80C908 <1> or cl, 8 5420 <1> %if _BREAKPOINTS 5421 00003DBC 9D <1> popf ; CF 5422 00003DBD 7308 <1> jnc .ret_NZ_NC 5423 <1> %endif 5424 00003DBF 38C0 <1> cmp al, al ; if correct interrupt (ZR, NC) 5425 00003DC1 C3 <1> retn 5426 <1> 5427 <1> .nomatch: 5428 <1> %if _BREAKPOINTS 5429 00003DC2 9D <1> popf ; CF 5430 00003DC3 7302 <1> jnc .ret_NZ_NC 5431 <1> %endif 5432 00003DC5 F9 <1> stc 5433 00003DC6 C3 <1> retn 5434 <1> 5435 <1> %if _BREAKPOINTS 5436 <1> .ret_NZ_NC: 5437 00003DC7 80C904 <1> or cl, 4 ; (NZ, NC) 5438 00003DCA C3 <1> retn 5439 <1> %endif 5440 <1> 5441 <1> 5442 <1> ; an INT is to be processed (TM is 0) 5443 <1> ; to avoid the nasty x86 bug which makes IRET 5444 <1> ; cause a debug exception 1 instruction too late 5445 <1> ; a breakpoint is set behind the INT 5446 <1> 5447 <1> isstdtraceX: 5448 00003DCB B90200 <1> mov cx, 2 5449 00003DCE E84800 <1> call iswriteablecseip ; is it ROM ? 5450 00003DD1 7289 <1> jc traceone.isstdtrace ; is read-only --> 5451 00003DD3 8B1E[900C] <1> mov bx, word [reg_cs] 5452 <1> 5453 <1> ; (e)si = (e)ip + 2 5454 <1> ; We don't test whether it's a 32-bit code segment here. 5455 <1> ; The previous code would leave the high word of esi uninitialized then. 5456 00003DD7 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 5457 00003DD8 8B36[9C0C] <1> mov si, word [reg_eip] 5458 00003DDC 66 <1> _386_PM_o32 ; add esi, byte 2 5459 00003DDD 83C602 <1> add si, byte 2 ; ! do not remove the byte override, else o32 won't work 5460 00003DE0 E9CE03 <1> jmp proceedbreakpoint ; set BP at BX:(E)SI and run debuggee 5461 <1> 5462 <1> ; Call getcseipbyte and loop while increasing cx if the returned 5463 <1> ; byte was a prefix. Returns the first non-prefix byte (an opcode) 5464 <1> ; in al. (WAIT or FWAIT is not considered a prefix because it's 5465 <1> ; really an opcode and we also trace it without executing a 5466 <1> ; following FPU opcode.) 5467 <1> skipprefixes: 5468 <1> .: 5469 00003DE3 E82A5B <1> call getcseipbyte 5470 00003DE6 3C26 <1> cmp al, 26h 5471 00003DE8 742A <1> je .prefix ; ES 5472 00003DEA 3C2E <1> cmp al, 2Eh 5473 00003DEC 7426 <1> je .prefix ; CS 5474 00003DEE 3C36 <1> cmp al, 36h 5475 00003DF0 7422 <1> je .prefix ; SS 5476 00003DF2 3C3E <1> cmp al, 3Eh 5477 00003DF4 741E <1> je .prefix ; DS 5478 00003DF6 3CF0 <1> cmp al, 0F0h 5479 00003DF8 741A <1> je .prefix ; LOCK 5480 00003DFA 3CF3 <1> cmp al, 0F3h 5481 00003DFC 7416 <1> je .prefix ; REPZ 5482 00003DFE 3CF2 <1> cmp al, 0F2h 5483 00003E00 7412 <1> je .prefix ; REPNZ 5484 00003E02 EB14 <1> _no386_jmps .noprefix ; no 386, following aren't prefixes (invalid opcodes on 186+) --> 5485 00003E04 3C64 <1> cmp al, 64h 5486 00003E06 740C <1> je .prefix ; FS 5487 00003E08 3C65 <1> cmp al, 65h 5488 00003E0A 7408 <1> je .prefix ; GS 5489 00003E0C 3C66 <1> cmp al, 66h 5490 00003E0E 7404 <1> je .prefix ; o32/o16 5491 00003E10 3C67 <1> cmp al, 67h 5492 00003E12 7504 <1> jne .noprefix ; not a32/a16 5493 <1> .prefix: 5494 00003E14 41 <1> inc cx 5495 <1> ; jmp short . 5496 00003E15 79CC <1> jns . ; this is not correct but serves as hack to avoid an infinite loop 5497 <1> ; (note that getcseipbyte really uses cx as signed number) 5498 00003E17 49 <1> dec cx ; back to 07FFFh 5499 <1> .noprefix: 5500 00003E18 C3 <1> retn 5501 <1> 5502 <1> 5503 <1> ;--- test if memory at CS:E/IP can be written to 5504 <1> ;--- return C if not 5505 <1> 5506 <1> iswriteablecseip: 5507 00003E19 E8F45A <1> call getcseipbyte ; get byte at CS:EIP+CX 5508 00003E1C 88C4 <1> mov ah, al 5509 00003E1E 34FF <1> xor al, 0FFh 5510 00003E20 E81A5B <1> call setcseipbyte 5511 00003E23 720E <1> jc .return 5512 00003E25 E8E85A <1> call getcseipbyte 5513 00003E28 38C4 <1> cmp ah, al ; is it ROM? 5514 00003E2A F9 <1> stc 5515 00003E2B 7406 <1> jz .return 5516 00003E2D 88E0 <1> mov al, ah 5517 00003E2F E80B5B <1> call setcseipbyte 5518 00003E32 F8 <1> clc 5519 <1> .return: 5520 00003E33 C3 <1> retn 5521 <1> 5522 <1> 5523 <1> %if _PM 5524 <1> debuggerexception: 5525 00003E34 FC <1> cld 5526 00003E35 16 <1> push ss 5527 00003E36 1F <1> pop ds 5528 00003E37 E87968 <1> call unhack ; sets es to ss 5529 00003E3A E822FE <1> call getrunint 5530 00003E3D E8B07F <1> call putsz ; print string 5531 <1> %if _EXCCSIP 5532 00003E40 BF[C07B] <1> mov di, exccsip 5533 00003E43 A1[B688] <1> mov ax, word [exception_csip + 2] 5534 00003E46 E8F17B <1> call hexword 5535 00003E49 47 <1> inc di 5536 00003E4A A1[B488] <1> mov ax, word [exception_csip] 5537 00003E4D E8EA7B <1> call hexword 5538 <1> 5539 00003E50 BA[BA7B] <1> mov dx, excloc 5540 00003E53 E89A7F <1> call putsz 5541 <1> %endif 5542 00003E56 E9A7C1 <1> jmp cmd3 5543 <1> %endif 5544 <1> 5545 <1> 5546 <1> %if _PM 5547 <1> [cpu 386] 5548 <1> ; INP: dh = flags as for pp2,pp3,pp5 (1 = ASIZE, 2 = OSIZE) 5549 <1> ; OUT: dh = flags as used by pp3,pp5 (1 = A32, 2 = O32) 5550 <1> pp_fix32bitflags: 5551 00003E59 E80C1F <1> call test_d_b_bit 5552 00003E5C 7403 <1> jz .16 5553 00003E5E 80F603 <1> xor dh, 1|2 ; toggle OSIZE and ASIZE (once) 5554 <1> .16: 5555 00003E61 C3 <1> retn 5556 <1> __CPU__ 5557 <1> %endif 5558 <1> 5559 <1> ; P command - proceed (i.e., skip over call/int/loop/string instruction). 5560 <1> pp: 5561 00003E62 C706[DA0B][623E] <1> mov word [lastcmd], pp 5562 00003E68 800E[A100]10 <1> setopt [internalflags2], dif2_is_pp 5563 00003E6D E81A07 <1> call parse_pt ; process arguments 5564 <1> 5565 <1> ; Do it times. First check the type of instruction. 5566 <1> pp1: 5567 00003E70 53 <1> push bx 5568 00003E71 51 <1> push cx ; save bx:cx 5569 <1> %if _PM 5570 00003E72 E836FA <1> call resetmode 5571 <1> %endif 5572 00003E75 BA0F00 <1> mov dx, 15 ; DL = number of bytes to go; DH = prefix flags. 5573 00003E78 8B1E[900C] <1> mov bx, word [reg_cs] 5574 00003E7C 66 <1> _386_PM_o32 ; mov esi, dword [reg_eip] 5575 00003E7D 8B36[9C0C] <1> mov si, word [reg_eip] 5576 <1> pp2: 5577 00003E81 E8C303 <1> call pp16 ; get next instruction byte into AL 5578 00003E84 BF[E410] <1> mov di, ppbytes 5579 00003E87 B91F00 <1> mov cx, PPLEN 5580 00003E8A F2AE <1> repne scasb 5581 00003E8C 752E <1> jne pp5 ; if not one of these --> 5582 00003E8E 8A451E <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 5583 00003E91 A880 <1> test al, PP_PREFIX ; prefix ? 5584 00003E93 740F <1> jz pp3 ; no --> 5585 00003E95 08C6 <1> or dh, al ; set the OSIZE or ASIZE flags if either of these 5586 <1> ; Note: Multiple OSIZE in a 16-bit cs do not toggle 5587 <1> ; between decoding as O32 and O16, they're always 5588 <1> ; decoded as O32. The same is true for A32, and 5589 <1> ; in a 32-bit cs for O16 and A16. 5590 00003E97 FECA <1> dec dl 5591 00003E99 75E6 <1> jnz pp2 ; if not out of bytes --> 5592 00003E9B BA[D971] <1> mov dx, msg.warnprefix 5593 00003E9E E84F7F <1> call putsz 5594 00003EA1 E98000 <1> jmp pp12 5595 <1> 5596 <1> ; A repeatable string, interrupt, call immediate or loop 5597 <1> ; instruction is to be decoded. Finish the decoding and 5598 <1> ; skip the appropriate number of opcode bytes. 5599 <1> pp3: 5600 00003EA4 E8B2FF <1> _386_PM call pp_fix32bitflags 5601 00003EA7 A840 <1> test al, PP_VARSIZ ; different opcode length depends on OSIZE ? 5602 00003EA9 7405 <1> jz .ignoreosize ; no --> 5603 00003EAB 80E602 <1> and dh, 2 5604 00003EAE 00F0 <1> add al, dh 5605 <1> .ignoreosize: 5606 00003EB0 83E007 <1> and ax, PP_SIZ_MASK 5607 00003EB3 660FB7C0 <1> _386_PM movzx eax, ax ; clear high word (in case it counts) 5608 00003EB7 66 <1> _386_PM_o32 ; add esi, eax 5609 00003EB8 01C6 <1> add si, ax 5610 00003EBA EB56 <1> jmp pp10 5611 <1> 5612 <1> 5613 <1> pp5: 5614 00003EBC E89AFF <1> _386_PM call pp_fix32bitflags 5615 00003EBF 3CFF <1> cmp al, 0FFh ; FF/2 or FF/3 indirect NEAR or FAR call ? 5616 00003EC1 7561 <1> jne pp12 ; no, just an ordinary instruction --> 5617 00003EC3 E88103 <1> call pp16 ; get MOD REG R/M byte 5618 00003EC6 24F7 <1> and al, ~ (1 << 3) ; clear lowest bit of REG field (/3 to /2) 5619 00003EC8 3410 <1> xor al, 2 << 3 ; /3 or /2 to /0 5620 00003ECA A838 <1> test al, 7 << 3 5621 00003ECC 7556 <1> jnz pp12 ; if not FF/2 or FF/3 --> 5622 00003ECE 3CC0 <1> cmp al, 0C0h ; mod = 3 ? 5623 00003ED0 7340 <1> jae .adjust0 ; if just a register --> 5624 00003ED2 F6C601 <1> test dh, 1 5625 00003ED5 750E <1> jnz .a32 ; if 32-bit addressing --> 5626 00003ED7 3C06 <1> cmp al, 6 ; mod = 0 r/m = 6 would encode bp ? 5627 00003ED9 7433 <1> je .adjust2 ; if just plain disp16 --> 5628 00003EDB 3C40 <1> cmp al, 40h 5629 00003EDD 7233 <1> jb .adjust0 ; if indirect register --> 5630 00003EDF 3C80 <1> cmp al, 80h 5631 00003EE1 722D <1> jb .adjust1 ; if disp8[reg(s)] 5632 00003EE3 EB29 <1> jmp short .adjust2 ; it's disp16[reg(s)] 5633 <1> 5634 <1> ; Handle 32-bit addressing (A32 ModR/M referencing memory) 5635 <1> .a32: 5636 00003EE5 3C05 <1> cmp al, 5 ; mod = 0 and r/m = 5 (would encode ebp) ? 5637 00003EE7 7421 <1> je .adjust4 ; if just plain disp32 --> 5638 00003EE9 3404 <1> xor al, 4 ; 4 to 0 (r/m 4 would encode esp) 5639 00003EEB A807 <1> test al, 7 ; 0 if r/m would encode esp 5640 00003EED 7513 <1> jnz .a32_nosib ; if no SIB byte --> 5641 00003EEF 86C4 <1> xchg al, ah 5642 00003EF1 E85303 <1> call pp16 5643 00003EF4 86C4 <1> xchg al, ah ; load and skip the SIB byte 5644 <1> ; The SIB byte is only used here to detect the 5645 <1> ; special case encoding of disp32 with mod=0 5646 <1> ; and base=5. index=4 is also special but it 5647 <1> ; does not alter the size of the displacement 5648 <1> ; that we have to skip. 5649 00003EF6 A8C0 <1> test al, 0C0h ; is it mod = 0 ? 5650 00003EF8 7508 <1> jnz @F ; no, not a special case --> 5651 00003EFA 80E407 <1> and ah, 7 5652 00003EFD 80FC05 <1> cmp ah, 5 ; is it base = 5 ? 5653 00003F00 7408 <1> je .adjust4 ; yes, special case encoding of disp32 --> 5654 <1> @@: 5655 <1> .a32_nosib: 5656 00003F02 3C40 <1> cmp al, 40h 5657 00003F04 720C <1> jb .adjust0 ; if indirect register --> 5658 00003F06 3C80 <1> cmp al, 80h 5659 00003F08 7206 <1> jb .adjust1 ; if disp8[reg(s)] --> 5660 <1> ; otherwise, it's disp32[reg(s)] 5661 <1> .adjust4: 5662 00003F0A 66 <1> _386_PM_o32 ; inc esi 5663 00003F0B 46 <1> inc si ; skip an instruction byte 5664 00003F0C 66 <1> _386_PM_o32 ; inc esi 5665 00003F0D 46 <1> inc si ; skip an instruction byte 5666 <1> .adjust2: 5667 00003F0E 66 <1> _386_PM_o32 ; inc esi 5668 00003F0F 46 <1> inc si ; skip an instruction byte 5669 <1> .adjust1: 5670 00003F10 66 <1> _386_PM_o32 ; inc esi 5671 00003F11 46 <1> inc si ; skip an instruction byte 5672 <1> .adjust0: 5673 <1> 5674 <1> pp10: 5675 <1> ; jmp pp11 ; we have a skippable instruction here 5676 <1> pp11: 5677 00003F12 E8531E <1> _386_PM call test_d_b_bit 5678 00003F15 7504 <1> _386_PM jnz .32 ; full 32-bit offset valid --> 5679 00003F17 660FB7F6 <1> _386_PM movzx esi, si ; clear high word here 5680 <1> .32: 5681 <1> @@: 5682 00003F1B E89302 <1> call proceedbreakpoint ; run until the breakpoint is hit 5683 00003F1E 7256 <1> jc pp15 ; unexpected --> 5684 <1> %if _BREAKPOINTS 5685 00003F20 7510 <1> jnz pp12.bb_hit 5686 <1> %endif 5687 00003F22 EB2C <1> jmp short pp13 5688 <1> 5689 <1> pp12: 5690 00003F24 F606[A000]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 5691 00003F29 75F0 <1> jnz @B 5692 <1> 5693 00003F2B E887FD <1> call traceone 5694 00003F2E 7246 <1> jc pp15 5695 <1> ; jc unexpectedinterrupt 5696 <1> 5697 <1> %if _BREAKPOINTS 5698 00003F30 7416 <1> jz @F 5699 <1> 5700 <1> .bb_hit: 5701 00003F32 E8EBFB <1> call handle_bb_hit_pass_match 5702 00003F35 7204 <1> jc .actual_hit 5703 <1> d5 call d5message 5704 <1> d5 asciz "in pp12.bb_hit after non-hit",13,10 5705 00003F37 7420 <1> jz pp13.nodump 5706 00003F39 EB15 <1> jmp pp13 5707 <1> 5708 <1> 5709 <1> .actual_hit: 5710 <1> %if _PM 5711 00003F3B E86DF9 <1> call resetmode 5712 <1> %endif 5713 00003F3E E83EF3 <1> call put_deferred_message_silent 5714 00003F41 E87200 <1> call dumpregs_extended_silent 5715 00003F44 59 <1> pop cx 5716 00003F45 5B <1> pop bx ; (discard counter) 5717 00003F46 EB24 <1> jmp @FF 5718 <1> 5719 <1> @@: 5720 <1> %endif 5721 <1> 5722 <1> ; We could check here for the correct address too, but that 5723 <1> ; would require disassembling the instruction and correctly so. 5724 <1> ; (Disassembling it incorrectly would only result in spurious 5725 <1> ; "Unexpected single-step interrupt" messages aborting multi- 5726 <1> ; traces though, so it won't be fatal.) 5727 <1> ; Wouldn't really be useful though: Only the "int1" or "int 01h" 5728 <1> ; instructions should cause this, and their operation means we 5729 <1> ; might as well behave as if the breakpoint was expected. 5730 00003F48 813E[D80B][717A] <1> cmp word [run_int], int1msg 5731 00003F4E 7526 <1> jne pp15 ; if some other interrupt (unexpected) --> 5732 <1> 5733 <1> pp13: 5734 <1> %if _PM 5735 00003F50 E858F9 <1> call resetmode 5736 <1> %endif 5737 <1> ; An expected breakpoint. Dump registers, then loop. 5738 00003F53 E829F3 <1> call put_deferred_message_silent 5739 00003F56 E85D00 <1> call dumpregs_extended_silent 5740 <1> 5741 <1> .nodump: 5742 00003F59 E863FB <1> call tt_handle_while 5743 00003F5C 59 <1> pop cx 5744 00003F5D 5B <1> pop bx 5745 <1> 5746 00003F5E 83E901 <1> sub cx, 1 5747 00003F61 83DB00 <1> sbb bx, 0 5748 <1> 5749 00003F64 85DB <1> test bx, bx 5750 00003F66 750B <1> jnz pp14 5751 00003F68 85C9 <1> test cx, cx 5752 00003F6A 7507 <1> jnz pp14 ; back for more --> 5753 <1> 5754 <1> @@: 5755 <1> %if _PM 5756 00003F6C E83CF9 <1> call resetmode 5757 <1> %endif 5758 00003F6F E8BE7D <1> call silence_dump 5759 <1> 5760 00003F72 C3 <1> retn 5761 <1> 5762 <1> %if ($ - pp1 - 1) < 128 5763 <1> pp14: equ pp1 5764 <1> %else 5765 00003F73 E9FAFE <1> pp14: jmp pp1 5766 <1> %endif 5767 <1> 5768 <1> pp15: 5769 00003F76 E903FD <1> jmp unexpectedinterrupt ; print message about unexpected interrupt 5770 <1> ; and quit 5771 <1> 5772 <1> 5773 <1> terminate_silent_dump.if_nonnull: 5774 00003F79 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5775 00003F7E 7435 <1> jz terminate_silent_dump.ret 5776 00003F80 06 <1> push es 5777 00003F81 57 <1> push di 5778 00003F82 50 <1> push ax 5779 00003F83 8E06[F209] <1> mov es, word [auxbuff_segorsel] 5780 00003F87 8B3E[FA09] <1> mov di, word [auxbuff_behind_last_silent] 5781 00003F8B 3B3E[F809] <1> cmp di, word [auxbuff_behind_while_condition] 5782 00003F8F 7421 <1> je terminate_silent_dump.done 5783 00003F91 4F <1> dec di 5784 00003F92 B000 <1> mov al, 0 5785 00003F94 AE <1> scasb 5786 00003F95 741B <1> je terminate_silent_dump.done 5787 00003F97 EB14 <1> jmp @F 5788 <1> 5789 <1> terminate_silent_dump: 5790 00003F99 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5791 00003F9E 7415 <1> jz .ret 5792 <1> .is_silent: 5793 00003FA0 06 <1> push es 5794 00003FA1 57 <1> push di 5795 00003FA2 50 <1> push ax 5796 00003FA3 8E06[F209] <1> mov es, word [auxbuff_segorsel] 5797 00003FA7 8B3E[FA09] <1> mov di, word [auxbuff_behind_last_silent] 5798 00003FAB B000 <1> mov al, 0 5799 <1> @@: 5800 00003FAD AA <1> stosb 5801 00003FAE FF06[FA09] <1> inc word [auxbuff_behind_last_silent] 5802 <1> ; -> point past the NUL 5803 <1> .done: 5804 00003FB2 58 <1> pop ax 5805 00003FB3 5F <1> pop di 5806 00003FB4 07 <1> pop es 5807 <1> .ret: 5808 00003FB5 C3 <1> retn 5809 <1> 5810 <1> 5811 <1> dumpregs_extended_silent: 5812 <1> %if _PM 5813 00003FB6 E8F2F8 <1> call resetmode 5814 <1> %endif 5815 00003FB9 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5816 00003FBE 7405 <1> jz @F 5817 00003FC0 800E[9F00]20 <1> setopt [internalflags], tt_silence 5818 <1> ; Call dumpregs (trimputs, puts, putsline, disasm) with 5819 <1> ; "silence" flag (writes to auxbuff instead of terminal). 5820 <1> @@: 5821 00003FC5 E81BE7 <1> call dumpregs_extended 5822 00003FC8 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode 5823 00003FCD 7408 <1> jz @F 5824 <1> ; Terminate the last dump's output with a NUL byte. 5825 00003FCF E8CEFF <1> call terminate_silent_dump.is_silent 5826 00003FD2 8026[9F00]DF <1> clropt [internalflags], tt_silence 5827 <1> @@: 5828 <1> 5829 <1> handle_serial_flags_ctrl_c: 5830 00003FD7 1E <1> push ds 5831 00003FD8 50 <1> push ax 5832 00003FD9 16 <1> push ss 5833 00003FDA 1F <1> pop ds 5834 00003FDB F606[8700]40 <1> testopt [options3], opt3_check_ctrlc_0bh 5835 00003FE0 740A <1> jz @FF 5836 <1> ; The following DOS call originated in sleepcmd. 5837 <1> ; However, it is useful for all callers of this 5838 <1> ; function so put it here. 5839 00003FE2 E8F966 <1> call InDos 5840 00003FE5 7505 <1> jnz @F 5841 00003FE7 B40B <1> mov ah, 0Bh 5842 <1> doscall ; allow to break with Ctrl-C 2080 00003FE9 E8AF1D <2> call _doscall 5843 <1> @@: 5844 <1> @@: 5845 00003FEC F606[EB0B]02 <1> testopt [serial_flags], sf_ctrl_c 5846 00003FF1 755B <1> jnz handle_ctrl_c 5847 00003FF3 F606[7D00]40 <1> testopt [options], enable_serial 5848 00003FF8 7551 <1> jnz .ret 5849 00003FFA E8E166 <1> call InDos 5850 00003FFD 744C <1> jz .ret 5851 00003FFF F606[8700]20 <1> testopt [options3], opt3_check_ctrlc_keyb 5852 00004004 7445 <1> jz .ret 5853 <1> 5854 <1> .check_rombios_buffer: 5855 00004006 53 <1> push bx 5856 00004007 52 <1> push dx 5857 00004008 B84000 <1> mov ax, 40h ; dual mode segment/selector 5858 0000400B 50 <1> push ax 5859 0000400C A1[FA0B] <1> mov ax, word [io_end_buffer] 5860 0000400F 8B16[F80B] <1> mov dx, word [io_start_buffer] 5861 00004013 1F <1> pop ds 5862 00004014 85C0 <1> test ax, ax 5863 00004016 7503 <1> jnz @F 5864 00004018 A18200 <1> mov ax, word [82h] ; end of circular keypress buffer 5865 <1> @@: 5866 0000401B 85D2 <1> test dx, dx 5867 0000401D 7504 <1> jnz @F 5868 0000401F 8B168000 <1> mov dx, word [80h] ; start of circular buffer 5869 <1> @@: 5870 00004023 89C3 <1> mov bx, ax 5871 00004025 29D3 <1> sub bx, dx ; cmp end, start 5872 00004027 7620 <1> jbe .ret_dx_bx ; invalid --> 5873 00004029 F6C301 <1> test bl, 1 ; even amount of bytes ? 5874 0000402C 751B <1> jnz .ret_dx_bx ; invalid --> 5875 0000402E 8B1E1A00 <1> mov bx, word [1Ah] ; current head of circular buffer 5876 <1> .loop: 5877 00004032 3B1E1C00 <1> cmp bx, word [1Ch] ; equal to current tail ? 5878 00004036 7411 <1> je .ret_dx_bx ; yes, all entries checked --> 5879 00004038 803F03 <1> cmp byte [bx], 3 ; is it Ctrl-C ? 5880 0000403B 7411 <1> je handle_ctrl_c ; yes, handle --> 5881 0000403D 43 <1> inc bx 5882 0000403E 43 <1> inc bx ; -> next entry 5883 0000403F 39C3 <1> cmp bx, ax ; at end of buffer ? 5884 00004041 72EF <1> jb .loop ; no, loop --> 5885 00004043 7704 <1> ja .ret_dx_bx ; invalid --> 5886 00004045 89D3 <1> mov bx, dx ; reset to start of buffer 5887 00004047 EBE9 <1> jmp .loop ; then loop --> 5888 <1> 5889 <1> .ret_dx_bx: 5890 00004049 5A <1> pop dx 5891 0000404A 5B <1> pop bx 5892 <1> 5893 <1> .ret: 5894 0000404B 58 <1> pop ax 5895 0000404C 1F <1> pop ds 5896 0000404D C3 <1> retn 5897 <1> 5898 <1> 5899 <1> handle_ctrl_c: 5900 0000404E 16 <1> push ss 5901 0000404F 1F <1> pop ds 5902 00004050 16 <1> push ss 5903 00004051 07 <1> pop es 5904 00004052 8026[EB0B]F9 <1> clropt [serial_flags], sf_ctrl_c | sf_double_ctrl_c 5905 <1> %if _PM 5906 00004057 E851F8 <1> call resetmode 5907 <1> %endif 5908 0000405A E81CFF <1> call terminate_silent_dump.if_nonnull 5909 0000405D E8D07C <1> call silence_dump 5910 00004060 BA[1C5D] <1> mov dx, msg.ctrlc 5911 00004063 E88A7D <1> call putsz 5912 <1> 5913 00004066 800E[A400]10 <1> setopt [internalflags3], dif3_input_terminal_override 5914 <1> ; make sure we drain terminal input 5915 <1> @@: 5916 0000406B E8D37F <1> call getc_if_any ; drain the buffer 5917 0000406E 75FB <1> jnz @B ; if any was available --> 5918 <1> 5919 00004070 8026[A400]EF <1> clropt [internalflags3], dif3_input_terminal_override 5920 00004075 E949C3 <1> jmp cmd2_reset_re 5921 <1> 5922 <1> 5923 <1> ; INP: bp [tpg_proceed_bp], 5924 <1> ; linear address and point content to write 5925 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5926 <1> ; set if a breakpoint was written 5927 <1> ; OUT: CY if error, 5928 <1> ; bp [tpg_proceed_bp] = has point content to restore 5929 <1> ; ah = reason = 0 = no error (never), 5930 <1> ; 1 = couldn't write, 5931 <1> ; 2 = unreachable, 5932 <1> ; 3 = overwritten, al = new byte value 5933 <1> ; NC if no error, 5934 <1> ; ah = 0 5935 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5936 <1> ; cleared 5937 <1> ; CHG: di, (e)dx, ax, bx 5938 <1> ; STT: might switch modes due to getsegmented call 5939 <1> proceed_writepoint_restore: 5940 00004078 B400 <1> mov ah, 0 5941 0000407A F606[A000]40 <1> testopt [internalflags2], dif2_tpg_proceed_bp_set 5942 0000407F 745F <1> jz proceed_wp.retn ; (NC) 5943 00004081 BF0100 <1> mov di, 1 5944 00004084 EB05 <1> jmp proceed_wp 5945 <1> 5946 <1> ; INP: bp [tpg_proceed_bp], 5947 <1> ; linear address and point content to write (0CCh) 5948 <1> ; OUT: CY if error, 5949 <1> ; bp [tpg_proceed_bp] = has point content 0CCh 5950 <1> ; ah = reason = 0 = no error (never), 5951 <1> ; 1 = couldn't write, 5952 <1> ; 2 = unreachable, 5953 <1> ; 3 = overwritten (never) 5954 <1> ; NC if no error (either flag not set or point restored), 5955 <1> ; ah = 0 5956 <1> ; opt [internalflags2] & dif2_tpg_proceed_bp_set 5957 <1> ; set 5958 <1> ; CHG: di, (e)dx, ax, bx 5959 <1> ; STT: might switch modes due to getsegmented call 5960 <1> proceed_writepoint: 5961 <1> %if _DELAY_BEFORE_BP 5962 00004086 E828F4 <1> call delay_before_bp 5963 <1> %endif 5964 00004089 31FF <1> xor di, di 5965 <1> proceed_wp: 5966 <1> lframe near 5967 0000408B 5589E5 <1> lenter 5968 0000408E 83F701 <1> xor di, 1 5969 <1> lvar word, is_write 5970 00004091 57 <1> push di 5971 <1> 5972 00004092 A1[C400] <1> mov ax, word [tpg_proceed_bp] 5973 <1> %if _PM 5974 00004095 8B16[C600] <1> mov dx, word [tpg_proceed_bp + 2] 5975 <1> %else 5976 <1> xor dx, dx 5977 <1> mov dl, byte [tpg_proceed_bp + 2] 5978 <1> %endif 5979 00004099 E834F8 <1> call getsegmented 5980 0000409C A0[CC00] <1> mov al, byte [tpg_proceed_bp + BPSIZE - 1] 5981 <1> ; al = byte to restore 5982 0000409F B402 <1> mov ah, 2 ; error reason: unreachable 5983 000040A1 723A <1> jc .return 5984 <1> 5985 000040A3 F646FE01 <1> test byte [bp + ?is_write], 1 5986 <1> ; (NC) is it writing ? 5987 000040A7 7518 <1> jnz .write 5988 <1> .restore: 5989 000040A9 50 <1> push ax 5990 000040AA E8ED58 <1> call readmem ; read current byte 5991 000040AD 3CCC <1> cmp al, 0CCh ; is this still what we wrote? 5992 000040AF B403 <1> mov ah, 3 ; error reason: overwritten, al = new value 5993 000040B1 F9 <1> stc 5994 000040B2 7529 <1> jne .return_discard ; nope --> (CY) 5995 000040B4 58 <1> pop ax 5996 000040B5 E8B558 <1> call writemem ; return the byte to its original value 5997 000040B8 720D <1> jc .next ; failed --> (CY, handled there) 5998 000040BA C606[CC00]CC <1> mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 5999 <1> ; reset stored point 6000 000040BF EB06 <1> jmp short .next 6001 <1> 6002 <1> .write: 6003 000040C1 E8A958 <1> call writemem 6004 000040C4 A2[CC00] <1> mov byte [tpg_proceed_bp + BPSIZE - 1], al 6005 <1> ; save the previous byte there 6006 <1> .next: 6007 000040C7 B401 <1> mov ah, 1 ; (in case of error) error reason: cannot write 6008 000040C9 7212 <1> jc .return ; failed to write --> (CY) 6009 000040CB B400 <1> mov ah, 0 ; (no error) 6010 <1> 6011 000040CD 800E[A000]40 <1> setopt [internalflags2], dif2_tpg_proceed_bp_set 6012 <1> ; set flag in case of successful writing 6013 000040D2 F646FE01 <1> test byte [bp + ?is_write], 1 6014 <1> ; (NC) is it writing ? 6015 000040D6 7505 <1> jnz .return ; yes, leave flag set --> 6016 000040D8 8026[A000]BF <1> clropt [internalflags2], dif2_tpg_proceed_bp_set 6017 <1> ; (NC) clear flag in case of successful restoring 6018 <1> .return: 6019 <1> .return_discard: 6020 000040DD 89EC5D <1> lleave 6021 <1> .retn: 6022 000040E0 C3 <1> retn 6023 <1> 6024 <1> 6025 <1> ; INP: ah & 7Fh = status = 0 = no error, 6026 <1> ; 1 = couldn't write, 6027 <1> ; 2 = unreachable, 6028 <1> ; 3 = overwritten, al = new value 6029 <1> ; ah & 80h = set if error restoring point, 6030 <1> ; else error writing point 6031 <1> ; bh & 80h = set if gg breakpoint, 6032 <1> ; cx = index (0-based) 6033 <1> ; bh & 40h = set if bb breakpoint, 6034 <1> ; cx = index (0-based) 6035 <1> ; bh & C0h = clear if proceed breakpoint 6036 <1> ; bl = what we tried to restore, only set if ah & 80h set 6037 <1> ; dword [ss:sp] = linear address (24 bit if non-_PM) 6038 <1> ; CHG: ax, bx, cx, dx, di 6039 <1> ; STT: ds = es = ss = debugger data selector 6040 <1> display_breakpoint_failure: 6041 <1> %if _PM 6042 000040E1 E8C7F7 <1> call resetmode 6043 <1> %endif 6044 <1> 6045 000040E4 50 <1> push ax 6046 000040E5 53 <1> push bx 6047 000040E6 51 <1> push cx 6048 000040E7 56 <1> push si 6049 000040E8 E8457C <1> call silence_dump ; do away with silent mode 6050 000040EB 5E <1> pop si 6051 000040EC 59 <1> pop cx 6052 000040ED 5B <1> pop bx 6053 000040EE 58 <1> pop ax 6054 <1> 6055 000040EF 800E[A100]08 <1> setopt [internalflags2], dif2_bp_failure 6056 <1> 6057 <1> lframe near 6058 <1> lpar dword, linear 6059 000040F4 5589E5 <1> lenter 6060 <1> lvar word, input_ax 6061 000040F7 50 <1> push ax 6062 <1> 6063 000040F8 BA[C56E] <1> mov dx, msg.cant_bp_the 6064 000040FB E8F27C <1> call putsz 6065 000040FE F6C780 <1> test bh, 80h 6066 00004101 740B <1> jz @F 6067 <1> 6068 00004103 89C8 <1> mov ax, cx 6069 00004105 40 <1> inc ax ; make it 1-based 6070 00004106 E8D6F5 <1> call putordinalbyte 6071 <1> 6072 00004109 BA[F56E] <1> mov dx, msg.cant_bp_type_gg 6073 0000410C EB15 <1> jmp .got_type 6074 <1> 6075 <1> @@: 6076 0000410E F6C740 <1> test bh, 40h 6077 00004111 740D <1> jz @F 6078 <1> 6079 00004113 89C8 <1> mov ax, cx 6080 00004115 BF[F26E] <1> mov di, msg.cant_bp_type_permanent.index 6081 00004118 E82679 <1> call hexbyte ; (0-based index) 6082 <1> 6083 0000411B BA[DD6E] <1> mov dx, msg.cant_bp_type_permanent 6084 0000411E EB03 <1> jmp .got_type 6085 <1> 6086 <1> @@: 6087 00004120 BA[CA6E] <1> mov dx, msg.cant_bp_type_proceed 6088 <1> 6089 <1> .got_type: 6090 00004123 E8CA7C <1> call putsz 6091 <1> 6092 00004126 BF[0C6F] <1> mov di, msg.cant_bp_linear.address1 6093 00004129 8B4606 <1> mov ax, word [bp + ?linear + 2] 6094 <1> %ifn _PM 6095 <1> mov ah, 0 6096 <1> %endif 6097 0000412C E80B79 <1> call hexword 6098 0000412F 47 <1> inc di 6099 <1> ; mov di, msg.cant_bp_linear.address2 6100 00004130 8B4604 <1> mov ax, word [bp + ?linear] 6101 00004133 E80479 <1> call hexword 6102 <1> 6103 00004136 BA[036F] <1> mov dx, msg.cant_bp_linear 6104 00004139 E8B47C <1> call putsz 6105 <1> 6106 0000413C BF[416F] <1> mov di, msg.cant_bp_restore.value 6107 0000413F 89D8 <1> mov ax, bx 6108 00004141 E8FD78 <1> call hexbyte 6109 <1> 6110 00004144 BA[186F] <1> mov dx, msg.cant_bp_write 6111 00004147 8B46FE <1> mov ax, word [bp + ?input_ax] 6112 0000414A F6C480 <1> test ah, 80h 6113 0000414D 7406 <1> jz @F 6114 0000414F 80E47F <1> and ah, ~80h 6115 00004152 BA[2B6F] <1> mov dx, msg.cant_bp_restore 6116 <1> @@: 6117 00004155 E8987C <1> call putsz 6118 <1> 6119 00004158 BF[BC6F] <1> mov di, msg.cant_bp_reason3.value 6120 0000415B E8E378 <1> call hexbyte 6121 <1> 6122 0000415E BA[456F] <1> mov dx, msg.cant_bp_reason 6123 00004161 E88C7C <1> call putsz 6124 <1> 6125 00004164 BA[516F] <1> mov dx, msg.cant_bp_reason0 6126 00004167 80FC01 <1> cmp ah, 1 6127 0000416A 7215 <1> jb @F 6128 0000416C BA[776F] <1> mov dx, msg.cant_bp_reason1 6129 0000416F 7410 <1> je @F 6130 00004171 BA[8A6F] <1> mov dx, msg.cant_bp_reason2 6131 00004174 80FC03 <1> cmp ah, 3 6132 00004177 7208 <1> jb @F 6133 00004179 BA[9F6F] <1> mov dx, msg.cant_bp_reason3 6134 0000417C 7403 <1> je @F 6135 0000417E BA[C26F] <1> mov dx, msg.cant_bp_reasonu 6136 <1> @@: 6137 00004181 E86C7C <1> call putsz 6138 <1> 6139 00004184 89EC5D <1> lleave 6140 00004187 C20400 <1> lret 6141 <1> 6142 <1> 6143 <1> %if _PM 6144 <1> isdpmientry: 6145 0000418A F606[A800]02 <1> testopt [internalflags4], dif4_int_2F_hooked 6146 0000418F 7407 <1> jz @F 6147 00004191 F606[9D00]02 <1> testopt [internalflags], nohook2F 6148 00004196 740A <1> jz .stdhook 6149 <1> @@: 6150 00004198 C706[9C0C][7689] <1> mov word [reg_eip], mydpmientry 6151 0000419E 8C1E[900C] <1> mov word [reg_cs], ds ; if Int2F not hooked, point to the hook here 6152 <1> ; ds => lDEBUG_DATA_ENTRY 6153 <1> .stdhook: 6154 <1> ; Run code until it returned far. 6155 000041A2 8B1E[740C] <1> mov bx, word [reg_esp] 6156 000041A6 1E <1> push ds 6157 000041A7 8E1E[8C0C] <1> mov ds, word [reg_ss] ; ds:bx-> (16-bit) stack 6158 000041AB 8B37 <1> mov si, word [bx+0] 6159 000041AD 8B5F02 <1> mov bx, word [bx+2] ; get (16-bit) far return address 6160 000041B0 1F <1> pop ds 6161 <1> %endif 6162 <1> ; Proceed over an instruction 6163 <1> ; INP: bx:(e)si-> where to write the breakpoint 6164 <1> ; OUT: NC if the breakpoint was hit, 6165 <1> ; ah = 0 6166 <1> ; ch = 0 6167 <1> ; d[reg_eip] adjusted 6168 <1> ; cx & 8 set if proceed point hit 6169 <1> ; (ZF only set if _BREAKPOINTS) 6170 <1> ; ZR if breakpoint after instruction was hit, 6171 <1> ; cx & 7 = 0 6172 <1> ; NZ if another breakpoint (bb) was hit (or both), 6173 <1> ; cx & 1 set if non-pass match (actual hit), 6174 <1> ; else cx & 2 set if pass match (consider as hit first, 6175 <1> ; but dump registers next (not to silent buffer) 6176 <1> ; and then continue execution) 6177 <1> ; else cx & 4 always set, indicates any match 6178 <1> ; (including matches that should merely continue) 6179 <1> ; all pass points' counters stepped 6180 <1> ; CY if the breakpoint was not hit, 6181 <1> ; cx = 0 6182 <1> ; If [internalflags2] & dif2_gg_is_gg is set: 6183 <1> ; ah & 7Fh = status = 0 = no error, 6184 <1> ; 1 = couldn't write, 6185 <1> ; 2 = unreachable, 6186 <1> ; 3 = overwritten, al = new value 6187 <1> ; ah & 80h = set if error restoring point, 6188 <1> ; else error writing point to begin with 6189 <1> ; If that flag is clear: 6190 <1> ; Does not return if a breakpoint cannot be written 6191 <1> ; or cannot be restored, jumps to cmd3 instead. 6192 <1> ; CHG: all 6193 <1> ; STT: ds = es = ss 6194 <1> ; might return modeswitched (if dif2_gg_is_gg) 6195 <1> ; might be called while modeswitched 6196 <1> proceedbreakpoint: 6197 000041B1 F606[A000]80 <1> testopt [internalflags2], dif2_tpg_keep_proceed_bp 6198 000041B6 750D <1> jnz @F 6199 <1> 6200 000041B8 66 <1> _386_PM_o32 ; mov edx, esi 6201 000041B9 89F2 <1> mov dx, si ; bx:(e)dx = segmented 6202 000041BB E8D4F5 <1> call getlinear ; dx:ax = linear 6203 <1> 6204 000041BE A3[C400] <1> mov word [tpg_proceed_bp], ax 6205 <1> ; The following two instructions must be in this order. 6206 <1> ; For the non-_PM build, writing to the second word 6207 <1> ; of the breakpoint also writes to the content byte. 6208 000041C1 8916[C600] <1> mov word [tpg_proceed_bp + 2], dx 6209 <1> ; store in point 6210 <1> @@: 6211 000041C5 C606[CC00]CC <1> mov byte [tpg_proceed_bp + BPSIZE - 1], 0CCh 6212 <1> ; initialise content 6213 000041CA E8B9FE <1> call proceed_writepoint 6214 <1> ; This call might return modeswitched. 6215 000041CD 7308 <1> jnc @F 6216 <1> 6217 000041CF 80E47F <1> and ah, ~80h ; mark error during writing 6218 <1> 6219 000041D2 31C9 <1> xor cx, cx ; cx = 0 in case of branching 6220 000041D4 51 <1> push cx ; put the zero on the stack 6221 <1> 6222 000041D5 EB0E <1> jmp .failure 6223 <1> 6224 <1> @@: 6225 <1> ; The run functions call resetmode. 6226 <1> %if _BREAKPOINTS 6227 000041D7 E87900 <1> call run_with_bb 6228 000041DA 89C8 <1> mov ax, cx 6229 <1> %else 6230 <1> call run 6231 <1> xor ax, ax 6232 <1> %endif 6233 000041DC 50 <1> push ax 6234 <1> 6235 <1> ; It's important to keep the linear address saved inbetween, 6236 <1> ; even though we save by value (as opposed to DEBUG/X G's saving 6237 <1> ; of the reference) because the selector that we used for the 6238 <1> ; access might now be invalid or (worse) point elsewhere, or 6239 <1> ; a mode change might have occured. (The latter is sometimes 6240 <1> ; handled by a specific kludge in DEBUG/X, but not always.) 6241 <1> 6242 000041DD E898FE <1> call proceed_writepoint_restore 6243 <1> ; This call might return modeswitched. 6244 000041E0 7329 <1> jnc @F 6245 <1> 6246 000041E2 80CC80 <1> or ah, 80h ; mark error during restoration 6247 <1> 6248 <1> .failure: 6249 <1> ; Here we may be modeswitched. 6250 000041E5 F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 6251 <1> ; is it from gg ? 6252 000041EA 7558 <1> jnz .return_CY_pop_cx ; (CY) yes, return to gg 6253 <1> ; This branch may be taken while modeswitched. 6254 <1> 6255 <1> %if _PM 6256 000041EC E8BCF6 <1> call resetmode 6257 <1> %endif 6258 <1> 6259 000041EF E88DF0 <1> call put_deferred_message_silent 6260 <1> 6261 000041F2 50 <1> push ax 6262 000041F3 E83A7B <1> call silence_dump 6263 000041F6 58 <1> pop ax 6264 <1> 6265 000041F7 FF36[C600] <1> push word [tpg_proceed_bp + 2] 6266 000041FB FF36[C400] <1> push word [tpg_proceed_bp] 6267 000041FF 8A1E[CC00] <1> mov bl, [tpg_proceed_bp + BPSIZE - 1] 6268 00004203 B700 <1> mov bh, 0 6269 00004205 E8D9FE <1> call display_breakpoint_failure 6270 <1> ; This function calls resetmode. 6271 00004208 E9F5BD <1> jmp cmd3 6272 <1> 6273 <1> @@: 6274 0000420B E823F6 <1> call get_cseip_of_possible_breakpoint 6275 <1> ; dx:ax = linear address 1 before cs:(e)ip 6276 0000420E 7232 <1> jc .return_CY_pop_cx_ax_zero 6277 <1> 6278 00004210 59 <1> pop cx 6279 <1> %if _PM 6280 00004211 3916[C600] <1> cmp word [tpg_proceed_bp + 2], dx 6281 <1> %else 6282 <1> test dh, dh ; (bits 24 to 31 set. shouldn't happen) 6283 <1> jnz .not_pp 6284 <1> cmp byte [tpg_proceed_bp + 2], dl 6285 <1> %endif 6286 00004215 7511 <1> jne .not_pp 6287 00004217 3906[C400] <1> cmp word [tpg_proceed_bp], ax 6288 0000421B 750B <1> jne .not_pp ; is unexpected (not behind the breakpoint) --> 6289 <1> 6290 <1> ; Need to check this here, because we have to 6291 <1> ; decrement (e)ip if the breakpoint was hit. 6292 0000421D 813E[D80B][947A] <1> cmp word [run_int], int3msg 6293 00004223 7503 <1> jne .not_pp ; is unexpected (not returned by interrupt 03h) --> 6294 00004225 80C908 <1> or cl, 8 ; set flag: pp hit 6295 <1> 6296 <1> .not_pp: 6297 00004228 B400 <1> mov ah, 0 ; set error to "no error" 6298 <1> 6299 0000422A E319 <1> jcxz .return_CY ; bb hit/pass/nonpass or pp hit ? if no --> 6300 <1> 6301 0000422C E872F0 <1> call adjust_cseip_after_breakpoint 6302 <1> ; decrement (e)ip to point at the instruction 6303 <1> 6304 0000422F F6C101 <1> test cl, 1 ; bb hit ? 6305 00004232 750A <1> jnz .return ; yes, return (NC, NZ) --> 6306 <1> 6307 00004234 F6C108 <1> test cl, 8 ; proceed point matched ? 6308 00004237 7506 <1> jnz @F ; yes --> 6309 <1> 6310 00004239 800E[A000]80 <1> setopt [internalflags2], dif2_tpg_keep_proceed_bp 6311 <1> ; flag that we should keep this proceed point 6312 <1> ; (NC, NZ) 6313 <1> .return: 6314 0000423E C3 <1> retn 6315 <1> 6316 <1> @@: 6317 <1> ; return with ax = 0, NC, ZR 6318 <1> ; 6319 <1> ; (hit proceed point, no hit bb (possibly pass/non-pass bb) 6320 0000423F 31C0 <1> xor ax, ax ; ah = 0 (NC, ZR) 6321 00004241 C3 <1> retn 6322 <1> 6323 <1> ; set ax = 0, pop cx, CY 6324 <1> .return_CY_pop_cx_ax_zero: 6325 00004242 31C0 <1> xor ax, ax 6326 <1> 6327 <1> ; pop cx, CY (preserve ax) 6328 <1> .return_CY_pop_cx: 6329 00004244 59 <1> pop cx 6330 <1> .return_CY: 6331 00004245 F9 <1> stc 6332 00004246 C3 <1> retn 6333 <1> 6334 <1> 6335 <1> ; PPX - Get next byte in instruction stream. 6336 <1> ; INP: bx:(e)si-> next byte 6337 <1> ; OUT: al = next byte 6338 <1> ; (e)si incremented 6339 <1> pp16: 6340 <1> %if _PM 6341 00004247 E81B1B <1> call resetmode_and_test_d_b_bit 6342 <1> %endif 6343 0000424A 1E <1> push ds 6344 0000424B 8EDB <1> mov ds, bx 6345 <1> %if _PM 6346 0000424D 7401 <1> jz .16 6347 0000424F 67 <1> a32 ; use esi for lodsb 6348 <1> .16: 6349 <1> %endif 6350 00004250 AC <1> lodsb 6351 00004251 1F <1> pop ds 6352 00004252 C3 <1> retn 6353 <1> ; begin loop over instruction bytes. 6354 <1> 6355 <1> 6356 <1> %if _BREAKPOINTS 6357 <1> ; Run with bb breakpoints 6358 <1> ; 6359 <1> ; OUT: CY if another breakpoint (not a bb one) or trace hit, 6360 <1> ; cx = 0 6361 <1> ; NC if a bb breakpoint hit, 6362 <1> ; cx & 1 set if it is an actual hit 6363 <1> ; else cx & 2 set if it is a pass match, 6364 <1> ; else it is a non-pass non-match 6365 <1> ; (cx & 4 always set) 6366 <1> ; STT: might return modeswitched 6367 <1> run_with_bb: 6368 00004253 F606[A000]08 <1> testopt [internalflags2], dif2_gg_is_gg 6369 00004258 750C <1> jnz .no_bb 6370 <1> 6371 0000425A F606[9F00]C0 <1> testopt [internalflags], tt_no_bb | tt_no_bb_first 6372 0000425F 740C <1> jz @F 6373 <1> 6374 00004261 8026[9F00]7F <1> clropt [internalflags], tt_no_bb_first 6375 <1> 6376 <1> .no_bb: 6377 00004266 E87400 <1> call run 6378 00004269 31C9 <1> xor cx, cx 6379 0000426B F9 <1> stc 6380 0000426C C3 <1> retn 6381 <1> 6382 <1> @@: 6383 <1> .gg5: 6384 <1> %if _BREAKPOINTS 6385 0000426D E871F2 <1> call bb_writepoints_init_reset 6386 <1> %endif 6387 <1> 6388 00004270 F606[A000]10 <1> testopt [internalflags2], dif2_gg_first_detected 6389 00004275 7436 <1> jz .only_run ; easy case, no cseip point detected --> 6390 <1> 6391 <1> 6392 <1> ; Enter special mode: Restore cseip breakpoint content. 6393 00004277 800E[A000]02 <1> setopt [internalflags2], dif2_gg_skip_non_cseip 6394 <1> 6395 0000427C 83EC20 <1> sub sp, _NUM_B_BP * 2 6396 0000427F 89E5 <1> mov bp, sp ; -> error info 6397 <1> 6398 00004281 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 6399 00004284 E828F3 <1> call bb_restorepoints_and_init_error_info 6400 00004287 7317 <1> jnc @F ; no error ? --> 6401 <1> 6402 <1> ; Error in bb_restorepoints. Try to restore other bb. 6403 <1> 6404 <1> ; Exit special mode: Handle non-cseip breakpoints again. 6405 00004289 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 6406 <1> 6407 <1> ; Enter special mode: Skip cseip breakpoints. 6408 0000428E 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 6409 <1> 6410 <1> ; As we already tried to restore all cseip bb points, 6411 <1> ; here we skip these in the bb_restorepoints call. 6412 00004293 B91000 <1> mov cx, _NUM_B_BP 6413 00004296 E819F3 <1> call bb_restorepoints 6414 <1> 6415 <1> ; Exit special mode: No longer skip cseip breakpoints. 6416 00004299 8026[A000]FB <1> clropt [internalflags2], dif2_gg_skip_cseip 6417 <1> 6418 <1> ; The failure that led us here is already noted in the info. 6419 0000429E EB1D <1> jmp .bb_exit 6420 <1> 6421 <1> 6422 <1> @@: 6423 <1> ; Success! Now discard the reserved error info. 6424 000042A0 83C420 <1> add sp, _NUM_B_BP * 2 6425 <1> 6426 <1> ; Exit special mode, do not skip non-cseip breakpoints anymore. 6427 000042A3 8026[A000]FD <1> clropt [internalflags2], dif2_gg_skip_non_cseip 6428 <1> 6429 <1> ; Enter special mode: Skip matching/restoring cseip breakpoint. 6430 000042A8 800E[A000]04 <1> setopt [internalflags2], dif2_gg_skip_cseip 6431 <1> 6432 <1> .only_run: 6433 000042AD E82D00 <1> call run 6434 <1> .after_run: 6435 <1> 6436 <1> %if _BREAKPOINTS 6437 000042B0 83EC20 <1> sub sp, _NUM_B_BP * 2 6438 000042B3 89E5 <1> mov bp, sp 6439 <1> 6440 000042B5 B91000 <1> mov cx, _NUM_B_BP ; = index above last one to restore 6441 000042B8 E8F4F2 <1> call bb_restorepoints_and_init_error_info 6442 000042BB 7308 <1> jnc @F 6443 <1> 6444 <1> .bb_exit: 6445 000042BD B8FFFF <1> mov ax, -1 6446 000042C0 50 <1> push ax ; (unused: ax error info) 6447 000042C1 50 <1> push ax ; cx error point index, -1 = invalid 6448 <1> 6449 000042C2 E939F2 <1> jmp bb_restorepoints_exit 6450 <1> 6451 <1> 6452 <1> @@: 6453 000042C5 83C420 <1> add sp, _NUM_B_BP * 2 6454 <1> 6455 000042C8 E8F1EF <1> call bb_check_hit 6456 000042CB 89C1 <1> mov cx, ax 6457 000042CD 9C <1> pushf 6458 <1> ; Clear all special modes. Stop specialcasing cseip breakpoint. 6459 <1> ; 6460 <1> ; This resets all the special flags for subsequent calls. 6461 000042CE 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 6464 000042D3 9D <1> popf ; CF 6465 000042D4 7302 <1> jnc @F 6466 <1> 6467 000042D6 F9 <1> stc 6468 <1> ; cx = flags as returned by bb_check_hit 6469 000042D7 C3 <1> retn 6470 <1> 6471 <1> @@: 6472 000042D8 E8C6EF <1> call adjust_cseip_after_breakpoint 6473 <1> ; re-execute (restored) opcode one byte in front of this 6474 000042DB F8 <1> clc ; (NC) 6475 <1> ; cx = flags as returned by bb_check_hit 6476 000042DC C3 <1> retn 6477 <1> %endif 6478 <1> %endif 6479 <1> 6480 <1> 6481 <1> ; Run - Start up the running program. 6482 <1> ; 6483 <1> ; INP: b[eqflag], a[eqladdr] = address given behind '=' for command 6484 <1> ; w[pspdbe] = process of debuggee 6485 <1> ; [run2324] = interrupt handlers 23h and 24h to set 6486 <1> ; values for registers in d[reg_eax] etc 6487 <1> ; OUT: (_DEBUG && _DEBUGUPDATESAVE) 6488 <1> ; interrupt handlers' ieNext fields updated 6489 <1> ; d[reg_eax] etc updated 6490 <1> ; w[run_int]-> message of how execution returned 6491 <1> ; UP, EI, high word efl = 0, es = ds = ss 6492 <1> ; CHG: all 6493 <1> ; STT: ds = ss 6494 <1> ; UP 6495 <1> ; (INP:es ignored) 6496 <1> run: 6497 000042DD 16 <1> push ss 6498 000042DE 07 <1> pop es 6499 <1> %if _PM 6500 000042DF E8C9F5 <1> call resetmode 6501 000042E2 E84802 <1> call remember_mode 6502 <1> %endif 6503 <1> %if _DELAY_BEFORE_BP 6504 000042E5 8026[A600]7F <1> clropt [internalflags3], dif3_delayed 6505 <1> %endif 6506 000042EA 8126[A000]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 6510 000042F0 E86104 <1> call seteq ; set CS:IP to '=' address 6511 <1> 6512 <1> ; For DDebugX: Do this before we install our 6513 <1> ; exception handlers. So if an exception 6514 <1> ; is raised then it is handled by the outer 6515 <1> ; instance instead of our handler. 6516 <1> ; (The actual problem may be that we don't 6517 <1> ; restore the handlers in the entrypoint 6518 <1> ; that leads to debuggerexception.) 6519 <1> ; Also, for non-_DEBUG DebugX too, check the 6520 <1> ; validity before setting debuggee PSP and 6521 <1> ; int 23h, 24h so they needn't be reset. 6522 <1> %if _PM 6523 <1> ; Load segreg values into es to make sure 6524 <1> ; they're valid. (Previously done with 6525 <1> ; the stack pointing into the reg array. 6526 <1> ; Better to do it now with a valid stack.) 6527 <1> ; Only done if we may be in Protected Mode. 6528 <1> ; 86 Mode allows any value to be loaded. 6529 000042F3 8E06[840C] <1> mov es, word [reg_ds] 6530 000042F7 8E06[8C0C] <1> mov es, word [reg_ss] 6531 000042FB 8E06[940C] <1> _386 mov es, word [reg_fs] 6532 000042FF 8E06[980C] <1> _386 mov es, word [reg_gs] 6533 <1> %endif 6534 00004303 8E06[880C] <1> mov es, word [reg_es] ; last one: actual es value 6535 <1> 6536 00004307 8B1E[A40A] <1> mov bx, word [pspdbe] 6537 0000430B E8FC4E <1> call setpsp ; set debuggee's PSP 6538 0000430E E89062 <1> call setint2324 ; set debuggee's int 23/24 6539 <1> %if _DEBUG ; set this copy's divide/trace/breakpoint ints 6540 <1> %if _TSR || _BOOTLDR 6541 <1> ..@patch_tsr_quit_run: 6542 <1> db __TEST_IMM16 6543 <1> dw __REL16__(.skipints) 6544 <1> %endif 6545 <1> push cx 6546 <1> push si 6547 <1> push ax 6548 <1> push dx 6549 <1> push es 6550 <1> push bx 6551 <1> push bp 6552 <1> push di 6553 <1> 6554 <1> %if _PM 6555 <1> call ispm 6556 <1> jz @F ; in PM --> 6557 <1> testopt [internalflags], canswitchmode 6558 <1> jz @FF ; in 86 Mode and cannot switch to PM --> 6559 <1> 6560 <1> d4 call d4message 6561 <1> d4 asciz "In run (switch mode before calling pm_set_handlers)",13,10 6562 <1> setopt [internalflags], modeswitched ; set flag for resetmode 6563 <1> mov al, 0 6564 <1> call sr_state ; save state 6565 <1> call switchmode ; switch to PM 6566 <1> ; ! handle_mode_changed not called here ! 6567 <1> ; do not call InDos or other functions using seg/sels 6568 <1> @@: 6569 <1> call pm_set_handlers 6570 <1> ; ! this calls resetmode 6571 <1> @@: 6572 <1> %endif 6573 <1> 6574 <1> mov cx, inttab_number 6575 <1> mov si, inttab 6576 <1> .intloop: 6577 <1> lodsb 6578 <1> xchg ax, dx 6579 <1> lodsw ; get address 6580 <1> xchg ax, dx 6581 <1> %if _DEBUGUPDATESAVE 6582 <1> mov di, dx ; -> IISP header 6583 <1> %endif 6584 <1> 6585 <1> call InDos 6586 <1> jz .int21_25 6587 <1> 6588 <1> xor bx, bx 6589 <1> %if _PM 6590 <1> call ispm 6591 <1> jnz @F 6592 <1> push dx 6593 <1> mov dx, bx ; set segment to access (= 0) 6594 <1> call setrmsegm ; get bx = selector configured to this 6595 <1> pop dx 6596 <1> @@: 6597 <1> %endif 6598 <1> mov es, bx ; => 86 Mode IVT (segment or selector) 6599 <1> %if _PM 6600 <1> xor bx, bx ; bh = 0 6601 <1> %endif 6602 <1> mov bl, al 6603 <1> add bx, bx 6604 <1> add bx, bx 6605 <1> 6606 <1> %if _DEBUGUPDATESAVE 6607 <1> push word [ es:bx + 2 ] 6608 <1> push word [ es:bx ] ; get vector 6609 <1> pop word [ di + ieNext ] 6610 <1> pop word [ di + ieNext + 2] 6611 <1> %endif 6612 <1> 6613 <1> mov word [ es:bx ], dx 6614 <1> %if _PM 6615 <1> push word [ pspdbg ] ; => lDEBUG_DATA_ENTRY (86 Mode seg) 6616 <1> pop word [ es:bx + 2 ] 6617 <1> %else 6618 <1> mov word [ es:bx + 2 ], ds ; => lDEBUG_DATA_ENTRY 6619 <1> %endif 6620 <1> jmp short .intset 6621 <1> 6622 <1> .int21_25: 6623 <1> 6624 <1> %if _PM 6625 <1> %if _DEBUGUPDATESAVE 6626 <1> mov ah, 35h ; get interrupt vector 6627 <1> push word [pspdbg] ; => lDEBUG_DATA_ENTRY 6628 <1> call _doscall_return_es_parameter_es_ds 6629 <1> mov word [ di + ieNext ], bx 6630 <1> pop word [ di + ieNext + 2 ] 6631 <1> %endif 6632 <1> mov ah, 25h ; set interrupt vector 6633 <1> push word [pspdbg] ; => lDEBUG_DATA_ENTRY 6634 <1> call _doscall_return_es_parameter_es_ds 6635 <1> pop ax ; (discard returned parameter) 6636 <1> %else 6637 <1> %if _DEBUGUPDATESAVE 6638 <1> mov ah, 35h 6639 <1> int 21h ; get vector 6640 <1> mov word [ di + ieNext ], bx 6641 <1> mov word [ di + ieNext + 2 ], es 6642 <1> %endif 6643 <1> mov ah, 25h ; set interrupt vector 6644 <1> int 21h ; ds => lDEBUG_DATA_ENTRY 6645 <1> %endif 6646 <1> .intset: 6647 <1> loop .intloop 6648 <1> 6649 <1> pop di 6650 <1> pop bp 6651 <1> pop bx 6652 <1> pop es 6653 <1> pop dx 6654 <1> pop ax 6655 <1> pop si 6656 <1> pop cx 6657 <1> .skipints: 6658 <1> %endif 6659 <1> 6660 <1> .2: 6661 00004311 8926[A00A] <1> mov word [run_sp], sp ; save stack position 6662 <1> 6663 <1> ; Disable this for now. The debugger uses its ss 6664 <1> ; for 86 Mode and Protected Mode at the same area 6665 <1> ; so it should always be valid to adjust SPSAV with 6666 <1> ; the current run_sp, regardless of current mode. 6667 <1> ; Update: SPSAV should always hold a 86 Mode address. 6668 <1> ; So check for our segment, not the current ss. (But 6669 <1> ; for _PM=0 ss is always equal to word [pspdbg].) 6670 <1> ; I assume that the original fix was intended for cases 6671 <1> ; where the segment doesn't match our 86 Mode ss, that 6672 <1> ; is the word [pspdbg]. 6673 <1> %if 1 6674 <1> ; 16.2.2021: check if saved SS is debugger's SS. If no, don't adjust saved SP. 6675 <1> ; SS may be != saved SS if debugger is stopped in protected-mode - then the 6676 <1> ; current DPMI real-mode stack may be stored in SPSAV. 6677 <1> %if _PM 6678 00004315 A1[A60A] <1> mov ax, word [pspdbg] 6679 <1> %else 6680 <1> mov ax, ss 6681 <1> %endif 6682 00004318 3B063000 <1> cmp ax, word [SPSAV + 2] 6683 0000431C 7508 <1> jne @F 6684 <1> %endif 6685 0000431E 2B26[A20A] <1> sub sp, word [spadjust] 6686 00004322 89262E00 <1> mov word [SPSAV], sp 6687 <1> @@: 6688 00004326 FA <1> cli 6689 <1> 6690 00004327 BC[640C] <1> mov sp, regs 6691 <1> %ifn _ONLY386 6692 0000432A EB11 <1> _386_jmps .386 ; --> 6693 0000432C 58 <1> pop ax 6694 0000432D 58 <1> pop ax ; discard all high words 6695 0000432E 5B <1> pop bx 6696 0000432F 58 <1> pop ax 6697 00004330 59 <1> pop cx 6698 00004331 58 <1> pop ax 6699 00004332 5A <1> pop dx 6700 00004333 58 <1> pop ax 6701 00004334 58 <1> pop ax ; we'll get esp later 6702 00004335 58 <1> pop ax 6703 00004336 5D <1> pop bp 6704 00004337 58 <1> pop ax 6705 00004338 5E <1> pop si 6706 00004339 58 <1> pop ax 6707 0000433A 5F <1> pop di 6708 <1> ; ds, ss, cs loaded later 6709 <1> ; es already loaded 6710 <1> %endif 6711 <1> %ifn _ONLYNON386 6712 <1> %ifn _ONLY386 6713 0000433B EB18 <1> jmp short .common 6714 <1> %endif 6715 <1> 6716 <1> .386: 6717 <1> [cpu 386] 6718 0000433D 6658 <1> pop eax 6719 0000433F 665B <1> pop ebx 6720 00004341 6659 <1> pop ecx 6721 00004343 665A <1> pop edx 6722 00004345 58 <1> pop ax 6723 00004346 58 <1> pop ax ; we'll get esp later 6724 00004347 665D <1> pop ebp 6725 00004349 665E <1> pop esi 6726 0000434B 665F <1> pop edi 6727 <1> ; pop ax ; get ds later 6728 <1> ; pop ax ; discard high words of segment registers 6729 <1> ; pop ax ; es already loaded 6730 <1> ; pop ax 6731 <1> ; pop ax ; get ss later 6732 <1> ; pop ax 6733 <1> ; pop ax ; get cs later 6734 <1> ; pop ax 6735 0000434D 83C410 <1> add sp, byte 8 * 2 6736 00004350 0FA1 <1> pop fs 6737 00004352 58 <1> pop ax 6738 00004353 0FA9 <1> pop gs 6739 <1> __CPU__ 6740 <1> .common: 6741 <1> %endif 6742 00004355 A1[640C] <1> mov ax, word [reg_eax] ; restore ax (used to discard words) 6743 00004358 8E16[8C0C] <1> mov ss, word [reg_ss] 6744 <1> %if _ONLYNON386 6745 <1> mov sp, word [reg_esp] 6746 <1> %else 6747 <1> ..@patch_no386_ds: 6748 0000435C 66 <1> o32 ; mov esp, dword [reg_esp] 6749 0000435D 8B26[740C] <1> mov sp, word [reg_esp] ; restore program stack 6750 <1> %endif 6751 00004361 C606[E60A]00 <1> mov byte [bInDbg], 0 6752 00004366 66 <1> _386_o32 ; push dword [reg_efl] 6753 00004367 FF36[A00C] <1> push word [reg_efl] 6754 0000436B 66 <1> _386_o32 ; push dword [reg_cs] ; high word is zero 6755 0000436C FF36[900C] <1> push word [reg_cs] 6756 00004370 66 <1> _386_o32 ; push dword [reg_eip] 6757 00004371 FF36[9C0C] <1> push word [reg_eip] 6758 00004375 F606[A10C]02 <1> test byte [reg_efl+1], 2 ; IF set? 6759 0000437A 8E1E[840C] <1> mov ds, word [reg_ds] ; restore ds 6760 0000437E 7401 <1> jz .di 6761 00004380 FB <1> sti ; required for ring3 protected mode if IOPL==0 6762 <1> .di: 6763 <1> %if _ONLYNON386 6764 <1> iret 6765 <1> %else 6766 <1> ..@patch_no386_iret: 6767 00004381 66 <1> o32 ; iretd 6768 00004382 CF <1> iret ; jump to program 6769 <1> %endif 6770 <1> 6771 <1> ; The byte at ..@patch_no386_ds will be adjusted to a ds prefix on non-386 processors. 6772 <1> ; This does not change the following instruction's behaviour (aside from changing it 6773 <1> ; to a 16-bit instruction as intended) and insures that sp is set in the instruction 6774 <1> ; right behind the instruction that sets ss. 6775 <1> 6776 <1> ; The byte at ..@patch_no386_iret will be adjusted to an iret instruction on non-386 processors. 6777 <1> ; This avoids the NOP that would be written there if _386_o32 was used, because the iret 6778 <1> ; should follow right behind the sti instruction. 6779 <1> 6780 <1> 6781 <1> usesection lDEBUG_DATA_ENTRY 6782 <1> 6783 <1> %if _CATCHINT08 6784 00008554 CB90EB10000000004B- <1> iispentry intr8, 0 6784 0000855D 4200EBF300 <1> 6785 <1> intr8_original: equ intr8.next 6786 00008568 9C <1> pushf 6787 00008569 2EFF1E[5885] <1> call far [cs:intr8_original] 6788 0000856E 9C <1> pushf 6789 0000856F 53 <1> push bx 6790 00008570 1E <1> push ds 6791 <1> 6792 00008571 0E <1> push cs 6793 00008572 1F <1> pop ds 6794 <1> 6795 00008573 803E[E60A]00 <1> cmp byte [bInDbg], 0 ; in debugger ? 6796 00008578 754D <1> jne .reset ; yes --> 6797 <1> 6798 0000857A F606[EB0B]04 <1> testopt [serial_flags], sf_double_ctrl_c 6799 0000857F 7408 <1> jz @F 6800 <1> 6801 00008581 C706[D80B][247B] <1> mov word [run_int], runint_ctrlc_msg 6802 00008587 EB38 <1> jmp @FF 6803 <1> 6804 <1> @@: 6805 00008589 BB4000 <1> mov bx, 40h 6806 0000858C 8EDB <1> mov ds, bx 6807 0000858E F606170004 <1> test byte [17h], 4 ; CTRL currently pressed ? 6808 00008593 0E <1> push cs 6809 00008594 1F <1> pop ds 6810 00008595 7430 <1> jz .reset ; no --> 6811 <1> 6812 00008597 FF06[E40B] <1> inc word [intr8_counter] 6813 0000859B 833E[E40B]5A <1> cmp word [intr8_counter], 18 * 5 ; ca 5 seconds 6814 000085A0 722A <1> jb .return 6815 <1> 6816 000085A2 C706[D80B][C77A] <1> mov word [run_int], int8msg 6817 000085A8 F606[7D00]80 <1> testopt [options], int8_disable_serial 6818 000085AD 7412 <1> jz @F 6819 000085AF F606[7D00]40 <1> testopt [options], enable_serial 6820 000085B4 740B <1> jz @F 6821 <1> 6822 000085B6 8026[7D00]BF <1> clropt [options], enable_serial 6823 000085BB C706[D80B][EC7A] <1> mov word [run_int], int8_kbd_msg 6824 <1> 6825 <1> @@: 6826 000085C1 1F <1> pop ds 6827 000085C2 5B <1> pop bx 6828 000085C3 9D <1> popf ; (in 86 Mode) 6829 000085C4 E90B01 <1> jmp intrtn 6830 <1> 6831 <1> .reset: 6832 000085C7 8326[E40B]00 <1> and word [intr8_counter], 0 6833 <1> .return: 6834 000085CC 1F <1> pop ds 6835 000085CD 5B <1> pop bx 6836 000085CE 9D <1> popf ; (in 86 Mode) 6837 000085CF CF <1> iret 6838 <1> %endif 6839 <1> 6840 <1> 6841 <1> ; Interrupt 22h (program termination) handler. 6842 <1> int22: 6843 000085D0 FA <1> cli 6844 <1> .cleartraceflag: 6845 000085D1 0E <1> push cs 6846 000085D2 1F <1> pop ds 6847 000085D3 0E <1> push cs 6848 000085D4 17 <1> pop ss 6849 000085D5 8B26[A00A] <1> mov sp, word [run_sp] ; restore running stack 6850 000085D9 C706[D80B][247D] <1> mov word [run_int], progtrm ; set interrupt message 6851 000085DF C706[DA0B][1404] <1> mov word [lastcmd], dmycmd ; disable T/P/G auto-repeat 6852 <1> %if _PM 6853 000085E5 8026[9D00]F7 <1> clropt [internalflags], protectedmode ; reset PM flag 6854 <1> %endif 6855 000085EA 90 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 6856 000085EB E8F1FA <1> call entry_to_code_seg 6857 000085EE [F743] <1> dw intrtn1_code 6858 <1> ; jump to register saving routine 6859 <1> 6860 <1> 6861 <1> sharedentry1.hwreset: 6862 000085F0 CB <1> retf 6863 <1> 6864 <1> 6865 <1> ; Interrupt 01h (single-step interrupt) handler. 6866 000085F1 90EB10000000004B42- <1> iispentry intr1, 0, sharedentry1 6866 000085FA 00EBF300 <1> 6867 <1> lframe int 6868 00008604 5589E5 <1> lenter 6869 00008607 50 <1> push ax 6870 <1> 6871 00008608 806607FE <1> clropt [bp + ?frame_fl], 100h ; clear TF (always) 6872 0000860C 8CC8 <1> mov ax, cs 6873 0000860E 394604 <1> cmp word [bp + ?frame_cs], ax ; entry segment ? 6874 00008611 7513 <1> jne .if_ZR ; no --> (NZ) 6875 <1> %if _PM 6876 00008613 817E02[E595] <1> cmp word [bp + ?frame_ip], getline_extra_int22.cleartraceflag 6877 00008618 740C <1> je .if_ZR ; that one --> (ZR) 6878 <1> %endif 6879 0000861A 817E02[D185] <1> cmp word [bp + ?frame_ip], int22.cleartraceflag 6880 0000861F 7405 <1> je .if_ZR ; that one --> (ZR) 6881 00008621 817E02[0081] <1> cmp word [bp + ?frame_ip], debug22.cleartraceflag 6882 <1> .if_ZR: 6883 00008626 58 <1> pop ax 6884 00008627 5D <1> lleave , optimiserestoresp 6885 00008628 7501 <1> jnz @F 6886 0000862A CF <1> iret ; continue run if matched 6887 <1> 6888 <1> @@: 6889 0000862B 2EC706[D80B][717A] <1> mov word [cs:run_int], int1msg ; remember interrupt type 6890 00008632 E99D00 <1> jmp intrtn ; jump to register saving routine 6891 <1> 6892 <1> 6893 <1> ; Interrupt 00h (divide error) handler. 6894 00008635 90EB10000000004B42- <1> iispentry intr0, 0, sharedentry1 6894 0000863E 00EBAF00 <1> 6895 00008648 2EC706[D80B][627A] <1> mov word [cs:run_int], int0msg ; remember interrupt type 6896 0000864F E98000 <1> jmp intrtn ; jump to register saving routine 6897 <1> 6898 <1> 6899 <1> 6900 <1> ; Interrupt 03h (breakpoint interrupt) handler. 6901 00008652 EB10000000004B4200- <1> iispentry intr3, 0, sharedentry1 6901 0000865B EB9300 <1> 6902 00008664 2EC706[D80B][947A] <1> mov word [cs:run_int], int3msg ; remember interrupt type 6903 <1> %if _CATCHINT06 6904 0000866B EB65 <1> jmp intrtn ; jump to register saving routine 6905 <1> 6906 <1> 6907 <1> ; Interrupt 06h (invalid opcode) handler. 6908 0000866D 90EB10000000004B42- <1> iispentry intr6, 0, sharedentry2 6908 00008676 00EB7B00 <1> 6909 00008680 2EC706[D80B][B67A] <1> mov word [cs:run_int], int6msg ; remember interrupt type 6910 <1> %endif 6911 <1> %if _CATCHINT18 6912 00008687 EB49 <1> jmp intrtn ; jump to register saving routine 6913 <1> 6914 <1> 6915 <1> ; Interrupt 18h (diskless boot hook) handler. 6916 00008689 90EB10000000004B42- <1> iispentry intr18, 0, sharedentry2 6916 00008692 00EB5F00 <1> 6917 0000869C 2EC706[D80B][4B7B] <1> mov word [cs:run_int], int18msg ; remember interrupt type 6918 <1> %endif 6919 <1> %if _CATCHINT19 6920 000086A3 EB2D <1> jmp intrtn ; jump to register saving routine 6921 <1> 6922 <1> 6923 <1> ; Interrupt 19h (boot load) handler. 6924 000086A5 90EB10000000004B42- <1> iispentry intr19, 0, sharedentry2 6924 000086AE 00EB4300 <1> 6925 000086B8 2EC706[D80B][677B] <1> mov word [cs:run_int], int19msg ; remember interrupt type 6926 000086BF 2EC706[DA0B][1404] <1> mov word [cs:lastcmd], dmycmd ; disable T/P/G auto-repeat 6927 000086C6 2EC606[DC0B]00 <1> mov byte [cs:bInit], 0 6928 000086CC 2E8026[A300]FE <1> clropt [cs:internalflags2], dif2_boot_loaded_kernel 6929 <1> %endif 6930 <1> 6931 <1> ; Common interrupt routine. 6932 <1> 6933 <1> ; Housekeeping. 6934 <1> intrtn: 6935 000086D2 FA <1> cli ; just in case 6936 000086D3 2E8F06[9C0C] <1> pop word [cs:reg_eip] ; recover things from stack 6937 000086D8 2E8F06[900C] <1> pop word [cs:reg_cs] 6938 000086DD 2E8F06[A00C] <1> pop word [cs:reg_efl] 6939 000086E2 2E8C1E[840C] <1> mov word [cs:reg_ds], ds ; ! word-aligned (AC flag) 6940 000086E7 2EA3[640C] <1> mov word [cs:reg_eax], ax ; ! word-aligned (AC flag) 6941 000086EB 8CC8 <1> mov ax, cs 6942 000086ED 8ED8 <1> mov ds, ax ; => lDEBUG_DATA_ENTRY 6943 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 6944 000086EF E8EDF9 <1> call entry_to_code_seg 6945 000086F2 [8343] <1> dw intrtn_code 6946 <1> ; To avoid delaying the code segment switch, we use the client's 6947 <1> ; stack here to call (jump) via entry_to_code_seg. 6948 <1> 6949 <1> 6950 <1> sharedentry2.hwreset: 6951 000086F4 CB <1> retf 6952 <1> 6953 <1> 6954 <1> usesection lDEBUG_CODE 6955 <1> 6956 <1> code_insure_low_byte_not_0CCh 6957 <1> intrtn_code: 6958 00004383 8C16[8C0C] <1> mov word [reg_ss], ss ; save stack position 6959 00004387 8326[9E0C]00 <1> _386 and word [reg_eip+2], byte 0 ; we're from real mode 6960 0000438C 66 <1> _386_o32 ; mov dword [reg_esp], esp 6961 0000438D 8926[740C] <1> mov word [reg_esp], sp 6962 00004391 8ED0 <1> mov ss, ax ; mov ss, cs ; (don't use the stack here) 6963 <1> 6964 <1> %if _PM 6965 00004393 8026[9D00]F7 <1> clropt [internalflags], protectedmode ; reset PM flag 6966 00004398 EB0D <1> jmp @F 6967 <1> 6968 <1> intrtn2_code: ; <--- entry protected mode 6969 0000439A 368C1E[840C] <1> mov word [ss:reg_ds], ds ; ! word-aligned (AC flag) 6970 0000439F 36A3[640C] <1> mov word [ss:reg_eax], ax ; ! word-aligned (AC flag) 6971 000043A3 8CD0 <1> mov ax, ss 6972 000043A5 8ED8 <1> mov ds, ax ; mov ds, ss 6973 <1> @@: 6974 <1> %endif 6975 000043A7 B80200 <1> mov ax, 2 6976 <1> %ifn _ONLY386 6977 000043AA EB1A <1> _386_jmps .386 ; --> 6978 000043AC BC[8A0C] <1> mov sp, reg_es+2 6979 000043AF 06 <1> push es 6980 <1> ; sub sp, ax 6981 <1> ; sub sp, ax ; ds already saved 6982 <1> ; sub sp, ax ; don't overwrite high word of di 6983 000043B0 83EC06 <1> sub sp, byte 3*2 6984 000043B3 57 <1> push di 6985 000043B4 29C4 <1> sub sp, ax 6986 000043B6 56 <1> push si 6987 000043B7 29C4 <1> sub sp, ax 6988 000043B9 55 <1> push bp 6989 <1> ; sub sp, ax 6990 <1> ; sub sp, ax ; sp already saved 6991 <1> ; sub sp, ax 6992 000043BA 83EC06 <1> sub sp, byte 3*2 6993 000043BD 52 <1> push dx 6994 000043BE 29C4 <1> sub sp, ax 6995 000043C0 51 <1> push cx 6996 000043C1 29C4 <1> sub sp, ax 6997 000043C3 53 <1> push bx 6998 <1> %endif 6999 <1> %ifn _ONLYNON386 7000 <1> %ifn _ONLY386 7001 000043C4 EB31 <1> jmp short .common 7002 <1> %endif 7003 <1> 7004 <1> .386: 7005 <1> [cpu 386] 7006 000043C6 BC[9A0C] <1> mov sp, reg_gs+2 7007 000043C9 0FA8 <1> push gs 7008 000043CB 29C4 <1> sub sp, ax ; don't overwrite high words of segments 7009 000043CD 0FA0 <1> push fs 7010 <1> ; sub sp, ax 7011 <1> ; sub sp, ax ; cs already saved 7012 <1> ; sub sp, ax 7013 <1> ; sub sp, ax ; ss already saved 7014 <1> ; sub sp, ax 7015 000043CF 83EC0A <1> sub sp, byte 5*2 7016 000043D2 06 <1> push es 7017 <1> ; sub sp, ax 7018 <1> ; sub sp, ax ; ds already saved 7019 000043D3 83EC04 <1> sub sp, byte 2*2 7020 000043D6 6657 <1> push edi 7021 000043D8 6656 <1> push esi 7022 000043DA 6655 <1> push ebp 7023 <1> ; sub sp, ax 7024 <1> ; sub sp, ax ; sp already saved 7025 000043DC 83EC04 <1> sub sp, byte 2*2 7026 000043DF 6652 <1> push edx 7027 000043E1 6651 <1> push ecx 7028 000043E3 669C <1> pushfd ; (this overwrites reg_ebx) 7029 000043E5 01C4 <1> add sp, ax ; discard low word of efl 7030 000043E7 8F06[A20C] <1> pop word [reg_efl+2] 7031 000043EB 6A00 <1> push 0 7032 000043ED 9C <1> pushf ; (this also overwrites reg_ebx) 7033 000043EE 669D <1> popfd ; clear high word of efl inside debugger (resets AC flag) 7034 000043F0 6653 <1> push ebx 7035 000043F2 A1[640C] <1> mov ax, word [reg_eax] ; restore ax 7036 000043F5 6650 <1> push eax ; so we don't overwrite it with 2 here 7037 <1> __CPU__ 7038 <1> .common: 7039 <1> %endif 7040 <1> 7041 <1> code_insure_low_byte_not_0CCh 7042 <1> ; Clean up. 7043 <1> intrtn1_code: 7044 000043F7 8B26[A00A] <1> mov sp, word [run_sp] ; restore running stack 7045 000043FB FC <1> cld ; clear direction flag 7046 000043FC FB <1> sti ; interrupts back on 7047 000043FD 8026[A10C]FE <1> clropt [reg_efl], 100h ; clear TF 7048 <1> 7049 <1> %if _PM 7050 00004402 E85700 <1> call handle_mode_changed 7051 <1> %endif 7052 <1> 7053 00004405 E8474E <1> call getpsp 7054 00004408 891E[A40A] <1> mov word [pspdbe], bx 7055 <1> 7056 0000440C E8D361 <1> call getint2324 ; save debuggee's int 23/24, set debugger's int 23/24 7057 <1> 7058 0000440F 16 <1> push ss 7059 00004410 07 <1> pop es 7060 00004411 E8F44D <1> call setpspdbg ; set PSP of debugger 7061 <1> 7062 00004414 E81AF4 <1> call get_cseip_of_possible_breakpoint 7063 <1> ; Initialise this here. This means we do not need to call 7064 <1> ; resetmode between proceed_wp and bb_wp and gg_wp. If 7065 <1> ; more than one point needs to switch modes this avoids 7066 <1> ; repeated modeswitching back and forth. 7067 <1> 7068 <1> %if _DEBUG ; reset to next copy's divide/trace/breakpoint ints 7069 <1> push cx 7070 <1> push si 7071 <1> push di 7072 <1> push ax 7073 <1> push bx 7074 <1> push dx 7075 <1> push bp 7076 <1> 7077 <1> %if _PM 7078 <1> call ispm 7079 <1> jz @F ; in PM --> 7080 <1> testopt [internalflags], canswitchmode 7081 <1> jz @FF ; in 86 Mode and cannot switch to PM --> 7082 <1> 7083 <1> d4 call d4message 7084 <1> d4 asciz "In intrtn1_code (switch mode before calling pm_reset_handlers)",13,10 7085 <1> setopt [internalflags], modeswitched ; set flag for resetmode 7086 <1> mov al, 0 7087 <1> call sr_state ; save state 7088 <1> call switchmode ; switch to PM 7089 <1> ; ! handle_mode_changed not called here ! 7090 <1> ; do not call InDos or other functions using seg/sels 7091 <1> @@: 7092 <1> call pm_reset_handlers 7093 <1> ; ! this calls resetmode 7094 <1> @@: 7095 <1> 7096 <1> numdef OVERRIDE_BUILD_PM_DEBUG, 0 7097 <1> %if ! _CATCHPMINT214C && ! _OVERRIDE_BUILD_PM_DEBUG 7098 <1> %fatal Cannot build DDEBUGX: handler switching without Int21.4C hook untested 7099 <1> %endif 7100 <1> %endif 7101 <1> 7102 <1> %if CATCHINTAMOUNT 7103 <1> mov cx, inttab_number 7104 <1> mov si, inttab 7105 <1> mov dx, -1 ; always force 7106 <1> .nextint: 7107 <1> lodsb 7108 <1> xchg ax, bx ; bl = number 7109 <1> lodsw ; si -> list 7110 <1> xchg ax, si ; si -> entry, ax -> list 7111 <1> xchg ax, bx ; al = number, bx -> list 7112 <1> call UnhookInterruptForce 7113 <1> xchg bx, si ; si -> list 7114 <1> loop .nextint 7115 <1> %endif 7116 <1> 7117 <1> pop bp 7118 <1> pop dx 7119 <1> pop bx 7120 <1> pop ax 7121 <1> pop di 7122 <1> pop si 7123 <1> pop cx 7124 <1> %endif 7125 <1> 7126 00004417 800E[9D00]30 <1> setopt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is on 7127 <1> %if _PM 7128 0000441C E8DE4D <1> call ispm 7129 0000441F 7420 <1> jz .a20done ; assume A20 on. (is this the right thing to do?) 7130 <1> %endif 7131 00004421 06 <1> push es 7132 00004422 1E <1> push ds 7133 00004423 57 <1> push di 7134 00004424 56 <1> push si 7135 00004425 51 <1> push cx 7136 00004426 31F6 <1> xor si, si 7137 00004428 8EDE <1> mov ds, si ; ds = 0000h 7138 0000442A 4E <1> dec si 7139 0000442B 8EC6 <1> mov es, si ; es = FFFFh 7140 0000442D 46 <1> inc si ; ds:si = 0000h:0000h = 00000h 7141 0000442E BF1000 <1> mov di, 0010h ; es:di = FFFFh:0010h = 100000h (same address if it overflows) 7142 00004431 89F9 <1> mov cx, di ; 32 byte (16 = 10h word) 7143 00004433 F3A7 <1> repe cmpsw ; compare them and assume A20 line switched off if same 7144 00004435 59 <1> pop cx 7145 00004436 5E <1> pop si 7146 00004437 5F <1> pop di 7147 00004438 1F <1> pop ds 7148 00004439 07 <1> pop es 7149 0000443A 7505 <1> jne .a20done ; not equal, A20 line is switched on --> 7150 <1> ; if equal, the A20 line is probably switched off 7151 0000443C 8026[9D00]CF <1> clropt [internalflags], debuggerA20|debuggeeA20 ; assume A20 is off 7152 <1> 7153 <1> %if 0 ;_LOCALENABLEA20 7154 <1> ; This doesn't serve any particular reason if we have no business accessing the HMA. 7155 <1> ; What's more important is that the dump, assemble, and disassemble commands *should* 7156 <1> ; use a disabled A20 if it is disabled to the debuggee. Thus, enabling A20 belongs, if 7157 <1> ; at all, into getsegmented (similar to the switch to PM) as there may be breakpoints in 7158 <1> ; the HMA that we need to reset. 7159 <1> %if _GUARD_86M_INT2F 7160 <1> push es 7161 <1> xor ax, ax 7162 <1> mov es, ax ; (only used in 86 Mode) 7163 <1> mov ax, [es:2Fh * 4] 7164 <1> cmp ax, -1 7165 <1> je @F ; --> (ZR) 7166 <1> or ax, [es:2Fh * 4 + 2] 7167 <1> @@: 7168 <1> pop es 7169 <1> jz @F 7170 <1> %endif 7171 <1> mov ax, 4300h 7172 <1> int 2Fh ; XMS v2 installation check 7173 <1> cmp al, 80h ; installed ? 7174 <1> jne .a20done ; no --> 7175 <1> mov ax, 4310h 7176 <1> int 2Fh ; get entry 7177 <1> mov ah, 05h 7178 <1> push cs 7179 <1> call callfaresbx ; local enable A20 7180 <1> push ds 7181 <1> pop es 7182 <1> dec ax 7183 <1> jnz .a20done ; not able to enable A20 --> 7184 <1> ; actually check here to insure it is on? 7185 <1> setopt [internalflags], debuggerA20 ; our A20 is on 7186 <1> @@: 7187 <1> %endif 7188 <1> .a20done: 7189 <1> 7190 00004441 C606[E60A]01 <1> mov byte [bInDbg], 1 7191 <1> %if _CATCHINT19 7192 00004446 813E[D80B][677B] <1> cmp word [run_int], int19msg 7193 0000444C 7408 <1> je @F 7194 <1> %endif 7195 0000444E 813E[D80B][247D] <1> cmp word [run_int], progtrm 7196 00004454 7505 <1> jnz .isnotterm 7197 <1> @@: 7198 00004456 800E[9E00]80 <1> setopt [internalflags], attachedterm 7199 <1> .isnotterm: 7200 0000445B C3 <1> retn 7201 <1> 7202 <1> %if 0 ;_LOCALENABLEA20 7203 <1> callfaresbx: 7204 <1> push es 7205 <1> push bx 7206 <1> retf 7207 <1> %endif 7208 <1> 7209 <1> 7210 <1> %if _PM 7211 <1> ; INP: flag for PM 7212 <1> ; flag for prior PM (from remember_mode) 7213 <1> ; flag for modeswitched (set if in modeswitching) 7214 <1> ; OUT: seg/sels initialised for new mode, if changed 7215 <1> handle_mode_changed: 7216 0000445C BE[DE88] <1> mov si, convsegs 7217 0000445F B90600 <1> mov cx, convsegs.amount 7218 <1> 7219 00004462 E8984D <1> call ispm 7220 00004465 7503E98000 <1> jz .now_pm 7221 <1> [cpu 286] 7222 <1> .now_86m: 7223 0000446A F606[A700]40 <1> testopt [internalflags3], dif3_prior_pm 7224 0000446F 7503E9B900 <1> jz .from_no_change 7225 <1> .from_pm_now_86m: 7226 <1> .from_pm_now_86m.loop: 7227 00004474 AD <1> lodsw 7228 00004475 97 <1> xchg ax, di 7229 00004476 81FE[E688] <1> cmp si, convsegs.end_fixed 7230 0000447A 770A <1> ja @F 7231 0000447C 8B5502 <1> mov dx, word [di + soaSegment] 7232 0000447F 8915 <1> mov word [di + soaSegSel], dx 7233 00004481 E2F1 <1> loop .from_pm_now_86m.loop 7234 00004483 E9A700 <1> jmp .from_done_change 7235 <1> 7236 <1> @@: 7237 <1> ; We want to switch modes to get the segment bases. 7238 <1> ; First check we aren't already modeswitched. 7239 00004486 F606[9E00]08 <1> testopt [internalflags], modeswitched 7240 0000448B 7403E99D00 <1> jnz .from_done_change ; cancel this --> 7241 <1> 7242 00004490 F606[9E00]04 <1> testopt [internalflags], canswitchmode 7243 00004495 7510 <1> jnz @FF 7244 00004497 EB02 <1> jmp @F 7245 <1> 7246 <1> .from_pm_now_86m.loop.nonfixed.nomodeswitch: 7247 00004499 AD <1> lodsw 7248 0000449A 97 <1> xchg ax, di 7249 <1> @@: 7250 0000449B 31D2 <1> xor dx, dx 7251 0000449D 895502 <1> mov word [di + soaSegment], dx 7252 000044A0 8915 <1> mov word [di + soaSegSel], dx 7253 000044A2 E2F5 <1> loop .from_pm_now_86m.loop.nonfixed.nomodeswitch 7254 000044A4 E98600 <1> jmp .from_done_change 7255 <1> 7256 <1> @@: 7257 000044A7 51 <1> push cx 7258 000044A8 57 <1> push di 7259 000044A9 56 <1> push si 7260 <1> d4 call d4message 7261 <1> d4 asciz "In intrtn1_code.from_pm_now_86m (switching modes to access selectors)",13,10 7262 000044AA 800E[9E00]08 <1> setopt [internalflags], modeswitched ; set flag for resetmode 7263 000044AF B000 <1> mov al, 0 7264 000044B1 E8D2F3 <1> call sr_state ; save state 7265 000044B4 E89AF3 <1> call switchmode ; switch to PM 7266 <1> ; ! handle_mode_changed not called here ! 7267 <1> ; do not call InDos or other functions using seg/sels 7268 000044B7 5E <1> pop si 7269 000044B8 5F <1> pop di 7270 000044B9 EB03 <1> jmp @F 7271 <1> 7272 <1> .from_pm_now_86m.loop.nonfixed: 7273 000044BB AD <1> lodsw 7274 000044BC 97 <1> xchg ax, di 7275 000044BD 51 <1> push cx 7276 <1> @@: 7277 000044BE 31DB <1> xor bx, bx 7278 000044C0 875D04 <1> xchg bx, word [di + soaSelector] 7279 000044C3 B80600 <1> mov ax, 0006h 7280 000044C6 CD31 <1> int 31h 7281 000044C8 7245 <1> jc @F 7282 000044CA F6C20F <1> test dl, 15 7283 000044CD 7540 <1> jnz @F 7284 000044CF F7C1F0FF <1> test cx, 0FFF0h 7285 000044D3 753A <1> jnz @F 7286 000044D5 C1EA04 <1> shr dx, 4 7287 000044D8 C1E10C <1> shl cx, 12 7288 000044DB 09CA <1> or dx, cx 7289 000044DD 895502 <1> mov word [di + soaSegment], dx 7290 000044E0 59 <1> pop cx 7291 000044E1 8915 <1> mov word [di + soaSegSel], dx 7292 000044E3 E2D6 <1> loop .from_pm_now_86m.loop.nonfixed 7293 000044E5 E8C3F3 <1> call resetmode ; ! only if we did the switch 7294 <1> ; Note: This recursively calls this function, 7295 <1> ; handle_mode_changed. Because the modeswitched 7296 <1> ; flag is set during this call, this only re- 7297 <1> ; initialises the fixed seg/sels with the segment 7298 <1> ; values. That is redundant but does no harm. 7299 000044E8 EB43 <1> jmp .from_done_change 7300 <1> __CPU__ 7301 <1> 7302 <1> .now_pm: 7303 000044EA F606[A700]40 <1> testopt [internalflags3], dif3_prior_pm 7304 000044EF 753C <1> jnz .from_no_change 7305 <1> .from_86m_now_pm: 7306 <1> .from_86m_now_pm.loop: 7307 000044F1 AD <1> lodsw 7308 000044F2 97 <1> xchg ax, di 7309 000044F3 81FE[E688] <1> cmp si, convsegs.end_fixed 7310 000044F7 7716 <1> ja @F 7311 <1> 7312 000044F9 8B4504 <1> mov ax, word [di + soaSelector] 7313 000044FC 85C0 <1> test ax, ax 7314 000044FE 750B <1> jnz .no_dosdata_change 7315 00004500 8B5D02 <1> mov bx, word [di + soaSegment] 7316 00004503 B80200 <1> mov ax, 0002h 7317 00004506 CD31 <1> int 31h 7318 00004508 894504 <1> mov word [di + soaSelector], ax 7319 <1> 7320 <1> .no_dosdata_change: 7321 0000450B 8905 <1> mov word [di + soaSegSel], ax 7322 0000450D EB1C <1> jmp @FFF 7323 <1> 7324 <1> @@: 7325 <1> ; Magic: Do not modify if called during modeswitching. 7326 0000450F F606[9E00]08 <1> testopt [internalflags], modeswitched 7327 00004514 7517 <1> jnz .from_done_change ; cancel this --> 7328 <1> 7329 00004516 8B5D02 <1> mov bx, word [di + soaSegment] 7330 00004519 B80200 <1> mov ax, 0002h 7331 0000451C CD31 <1> int 31h 7332 0000451E 7302 <1> jnc @F 7333 00004520 31C0 <1> xor ax, ax 7334 <1> @@: 7335 00004522 8905 <1> mov word [di + soaSegSel], ax 7336 00004524 894504 <1> mov word [di + soaSelector], ax 7337 00004527 83650200 <1> and word [di + soaSegment], 0 7338 <1> @@: 7339 <1> %if $ - .from_86m_now_pm.loop > 126 7340 <1> loop .from_86m_now_pm.loop_j 7341 <1> jmp .from_done_change 7342 <1> 7343 <1> .from_86m_now_pm.loop_j: 7344 <1> jmp .from_86m_now_pm.loop 7345 <1> %else 7346 0000452B E2C4 <1> loop .from_86m_now_pm.loop 7347 <1> %endif 7348 <1> .from_done_change: 7349 <1> .from_no_change: 7350 <1> 7351 <1> 7352 <1> remember_mode: 7353 0000452D E8CD4C <1> call ispm 7354 00004530 7507 <1> jnz .from_86m 7355 <1> .from_pm: 7356 00004532 800E[A700]40 <1> setopt [internalflags3], dif3_prior_pm 7357 00004537 EB05 <1> jmp @F 7358 <1> 7359 <1> .from_86m: 7360 00004539 8026[A700]BF <1> clropt [internalflags3], dif3_prior_pm 7361 <1> @@: 7362 0000453E C3 <1> retn 7363 <1> %endif 7364 <1> 7365 <1> 7366 <1> %if _PM && _DEBUG 7367 <1> ; INP: - 7368 <1> ; OUT: es = ds 7369 <1> ; CHG: eax, edx, bx, cx, bp, si, di 7370 <1> ; STT: in PM 7371 <1> ; do not call InDos or other functions using seg/sels 7372 <1> pm_set_handlers: 7373 <1> xor bp, bp ; = 0 if no 386 7374 <1> _386 inc bp 7375 <1> _386 inc bp ; = 2 if 386 7376 <1> 7377 <1> push ds 7378 <1> pop es 7379 <1> 7380 <1> mov si, exctab ; hook several exceptions 7381 <1> %if _DEBUGUPDATESAVE 7382 <1> mov di, excsave 7383 <1> %endif 7384 <1> _386 xor edx, edx ; clear edxh 7385 <1> mov dx, exc_first 7386 <1> .loopexc: 7387 <1> lodsb 7388 <1> mov bl, al 7389 <1> 7390 <1> %if _DEBUGUPDATESAVE 7391 <1> _386_o32 ; push edx 7392 <1> push dx ; preserve excXX pointer 7393 <1> mov ax, 0202h 7394 <1> ; (edxh is zero) 7395 <1> int 31h ; cx:(e)dx -> prior handler 7396 <1> _386_o32 ; xchg eax, edx 7397 <1> xchg ax, dx 7398 <1> _386_o32 ; stosd 7399 <1> stosw ; store offset (dword on 386+, else word) 7400 <1> xchg ax, cx 7401 <1> stosw ; store selector 7402 <1> mov ax, 4 7403 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7404 <1> add di, ax ; -> next entry of excsave 7405 <1> _386_o32 ; pop edx 7406 <1> pop dx 7407 <1> %endif 7408 <1> 7409 <1> mov cx, word [cssel] ; -> our handler for this exception 7410 <1> mov ax, 0203h 7411 <1> int 31h ; set our handler 7412 <1> add dx, byte exc_second - exc_first 7413 <1> ; -> next handler 7414 <1> cmp si, endexctab ; if another to go --> 7415 <1> jb .loopexc 7416 <1> 7417 <1> %if _CATCHPMINT214C 7418 <1> mov si, pminttab ; ds:si -> pminttab 7419 <1> %if _DEBUGUPDATESAVE 7420 <1> mov di, pmintsave ; es:di -> pmintsave 7421 <1> %endif 7422 <1> .loopint: 7423 <1> lodsb ; get interrupt number 7424 <1> mov bl, al ; bl = interrupt number 7425 <1> 7426 <1> %if _DEBUGUPDATESAVE 7427 <1> _386 xor edx, edx ; clear edxh 7428 <1> mov ax, 0204h 7429 <1> int 31h ; cx:(e)dx -> prior handler 7430 <1> _386_o32 ; xchg eax, edx 7431 <1> xchg ax, dx ; (e)ax = offset 7432 <1> _386_o32 ; stosd 7433 <1> stosw ; store offset (dword on 386+, else word) 7434 <1> xchg ax, cx 7435 <1> stosw ; store selector 7436 <1> mov ax, 4 7437 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7438 <1> add di, ax ; -> next entry of pmintsave 7439 <1> %endif 7440 <1> 7441 <1> lodsw ; ax -> our handler 7442 <1> _386 xor edx, edx 7443 <1> xchg ax, dx ; (e)dx -> our handler 7444 <1> mov cx, word [cssel] ; cx:(e)dx -> our handler 7445 <1> mov ax, 0205h 7446 <1> int 31h 7447 <1> cmp si, pminttab.end 7448 <1> jb .loopint 7449 <1> %endif 7450 <1> 7451 <1> jmp resetmode 7452 <1> %endif 7453 <1> 7454 <1> 7455 <1> %if _PM && (_DEBUG || 1 || _CATCHPMINT214C) 7456 <1> ; INP: - 7457 <1> ; OUT: - 7458 <1> ; CHG: eax, edx, bx, cx, bp, si, di 7459 <1> ; STT: in PM 7460 <1> ; do not call InDos or other functions using seg/sels 7461 <1> pm_reset_handlers: 7462 0000453F 31ED <1> xor bp, bp ; = 0 if no 386 7463 00004541 45 <1> _386 inc bp 7464 00004542 45 <1> _386 inc bp ; = 2 if 386 7465 <1> 7466 <1> 7467 <1> %if CATCHEXCAMOUNT 7468 <1> ; unhook exceptions 7469 00004543 BF[EA88] <1> mov di, exctab 7470 00004546 BE[F888] <1> mov si, excsave 7471 <1> .loopexc: 7472 00004549 8A1D <1> mov bl, [di] ; bl = exception number 7473 0000454B 47 <1> inc di 7474 0000454C 66 <1> _386_o32 ; lodsd 7475 0000454D AD <1> lodsw ; load offset (dword on 386+, else word) 7476 0000454E 66 <1> _386_o32 ; xchg eax, edx 7477 0000454F 92 <1> xchg ax, dx 7478 00004550 AD <1> lodsw ; load selector 7479 00004551 91 <1> xchg ax, cx ; cx:(e)dx -> prior handler 7480 00004552 B80400 <1> mov ax, 4 7481 00004555 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7482 00004557 01C6 <1> add si, ax ; -> next entry of excsave 7483 00004559 B80302 <1> mov ax, 0203h 7484 0000455C CD31 <1> int 31h ; set previous handler 7485 0000455E 81FF[F188] <1> cmp di, endexctab ; if another to go --> 7486 00004562 72E5 <1> jb .loopexc 7487 <1> %endif 7488 <1> 7489 <1> 7490 <1> %if CATCHPMINTAMOUNT 7491 <1> ; unhook interrupts 7492 00004564 BF[3089] <1> mov di, pminttab ; ds:di -> pminttab 7493 00004567 BE[3889] <1> mov si, pmintsave ; ds:si -> pmintsave 7494 <1> .loopint: 7495 0000456A 8A1D <1> mov bl, [di] ; bl = interrupt number 7496 0000456C 83C703 <1> add di, 3 ; -> after this pminttab entry 7497 0000456F 66 <1> _386_o32 ; lodsd 7498 00004570 AD <1> lodsw ; load offset (dword on 386+, else word) 7499 00004571 66 <1> _386_o32 ; xchg eax, edx 7500 00004572 92 <1> xchg ax, dx 7501 00004573 AD <1> lodsw ; load selector 7502 00004574 91 <1> xchg ax, cx ; cx:(e)dx -> prior handler 7503 00004575 B80400 <1> mov ax, 4 7504 00004578 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 7505 0000457A 01C6 <1> add si, ax ; -> next entry of pmintsave 7506 0000457C B80502 <1> mov ax, 0205h 7507 0000457F CD31 <1> int 31h ; set previous handler 7508 00004581 81FF[3389] <1> cmp di, pminttab.end ; if another to go --> 7509 00004585 72E3 <1> jb .loopint 7510 <1> %endif 7511 <1> 7512 00004587 E921F3 <1> jmp resetmode 7513 <1> %endif 7514 <1> 7515 <1> 7516 <1> %if _DEBUG1 7517 <1> ; INP: bx -> dword address, word counter 7518 <1> ; dx:ax = linear address to check 7519 <1> ; OUT: NC if to proceed as usual 7520 <1> ; CY if address matched and counter indicates trigger 7521 <1> ; (ie, this should cause the caller to fail) 7522 <1> ; If the address matched, the counter has been stepped. 7523 <1> ; (The result of that step indicates whether to trigger.) 7524 <1> ; STT: ds = ss = debugger data selector 7525 <1> handle_test_case: 7526 <1> cmp word [bx], ax 7527 <1> jne .proceed 7528 <1> cmp word [bx + 2], dx 7529 <1> jne .proceed 7530 <1> 7531 <1> test word [bx + 4], 7FFFh ; is it already at a terminal state ? 7532 <1> jz .no_decrement ; yes, do not further decrement --> 7533 <1> dec word [bx + 4] ; decrement (towards 0 or 8000h) 7534 <1> jz .trigger ; case for decrementing 1 to 0 --> 7535 <1> .no_decrement: 7536 <1> cmp word [bx + 4], 8000h ; decrement resulted in 8000h 7537 <1> je .trigger ; or was already in that state? --> 7538 <1> .proceed: 7539 <1> clc 7540 <1> retn 7541 <1> 7542 <1> .trigger: 7543 <1> stc 7544 <1> retn 7545 <1> 7546 <1> 7547 <1> ; INP: bx -> first test record (dword address, word counter) 7548 <1> ; dx:ax = linear address to check 7549 <1> ; cx = number of consecutive test records to check 7550 <1> ; OUT: NC if to proceed as usual 7551 <1> ; CY if address matched and counter indicates trigger 7552 <1> ; (ie, this should cause the caller to fail) 7553 <1> ; CHG: bx, cx 7554 <1> ; STT: ds = ss = debugger data selector 7555 <1> ; 7556 <1> ; Note that all test cases are tried and, if the address 7557 <1> ; matches, their counters are stepped. In particular, 7558 <1> ; a trigger no longer causes us to skip all further 7559 <1> ; test cases that may have the same address. 7560 <1> ; If at least one of the matching test cases indicates a 7561 <1> ; trigger condition after its stepping, the return is CY. 7562 <1> handle_test_case_multiple_16: 7563 <1> mov cx, 16 7564 <1> handle_test_case_multiple: 7565 <1> clc 7566 <1> pushf ; initialise flags on stack with NC 7567 <1> jcxz .end 7568 <1> .loop: 7569 <1> call handle_test_case 7570 <1> jnc .next 7571 <1> popf ; (discard) 7572 <1> stc 7573 <1> pushf ; new flags on stack with CY 7574 <1> .next: 7575 <1> add bx, 6 7576 <1> loop .loop 7577 <1> .end: 7578 <1> popf ; CF 7579 <1> retn 7580 <1> %endif 7581 <1> 7582 <1> 7583 <1> usesection lDEBUG_DATA_ENTRY 7584 000086F5 00 <1> align 4, db 0 7585 000086F8 01000000 <1> default_pp_count: dd 1 7586 000086FC 01000000 <1> default_tp_count: dd 1 7587 00008700 01000000 <1> default_tt_count: dd 1 7588 <1> 7589 <1> 7590 <1> usesection lDEBUG_CODE 7591 <1> ; PARSE_PT - Parse 'p' or 't' command. Also resets pagedcommand flag. 7592 <1> ; Entry AL First character of command 7593 <1> ; SI Address of next character 7594 <1> ; [internalflags2] & dif2_is_pp = set if P 7595 <1> ; [internalflags] & tt_p = set if TP 7596 <1> ; both clear if T 7597 <1> ; Exit BX:CX Number of times to repeat 7598 <1> ; Uses AH,BX,CX,DX. 7599 <1> 7600 <1> parse_pt: 7601 0000458A E8A2BF <1> call guard_re 7602 0000458D C706[C000][6370] <1> mov word [gg_deferred_message], msg.empty_message 7603 00004593 8326[C200]00 <1> and word [bb_deferred_message_in_lineout_behind], 0 7604 00004598 8026[A000]F7 <1> clropt [internalflags2], dif2_gg_is_gg 7605 0000459D 8026[9F00]2B <1> clropt [internalflags], tt_while | tt_silent_mode | tt_no_bb | tt_no_bb_first 7607 000045A2 8326[FC09]00 <1> and word [tt_silent_mode_number], 0 7608 <1> 7609 <1> ; TP.NB, T.NB, P.NB: trace/proceed without bb breakpoints 7610 <1> ; 7611 <1> ; Note that when such a command is repeated through lastcmd, 7612 <1> ; it gets an empty line, thus tt_no_bb remains clear, and 7613 <1> ; the corresponding command without .NB is run. 7614 000045A7 3C2E <1> cmp al, '.' 7615 000045A9 7520 <1> jne .no_dot 7616 <1> 7617 000045AB AD <1> lodsw 7618 000045AC 25DFDF <1> and ax, TOUPPER_W 7619 000045AF 3D4E42 <1> cmp ax, "NB" 7620 000045B2 7411 <1> je .dot_nb 7621 <1> ; TP.SB, T.SB, P.SB: trace/proceed without bb for first step 7622 000045B4 3D5342 <1> cmp ax, "SB" 7623 000045B7 7405 <1> je .dot_sb 7624 000045B9 4E <1> dec si 7625 000045BA 4E <1> dec si 7626 000045BB E9545F <1> jmp error 7627 <1> 7628 <1> .dot_sb: 7629 000045BE 800E[9F00]80 <1> setopt [internalflags], tt_no_bb_first 7630 000045C3 EB05 <1> jmp .dot_common 7631 <1> 7632 <1> .dot_nb: 7633 000045C5 800E[9F00]40 <1> setopt [internalflags], tt_no_bb 7634 <1> .dot_common: 7635 000045CA AC <1> lodsb 7636 <1> .no_dot: 7637 000045CB E85801 <1> call parseql ; process =addr 7638 000045CE E89073 <1> call skipcomm0 ; skip any white space 7639 <1> 7640 000045D1 BA0400 <1> mov dx, opt3_pp_no_paging 7641 000045D4 8B1E[FA86] <1> mov bx, word [default_pp_count + 2] 7642 000045D8 8B0E[F886] <1> mov cx, word [default_pp_count] 7643 000045DC F606[A100]10 <1> testopt [internalflags2], dif2_is_pp 7644 000045E1 751D <1> jnz @F 7645 000045E3 BA0200 <1> mov dx, opt3_tp_no_paging 7646 000045E6 8B1E[FE86] <1> mov bx, word [default_tp_count + 2] 7647 000045EA 8B0E[FC86] <1> mov cx, word [default_tp_count] 7648 000045EE F606[9F00]08 <1> testopt [internalflags], tt_p 7649 000045F3 750B <1> jnz @F 7650 000045F5 BA0100 <1> mov dx, opt3_tt_no_paging 7651 000045F8 8B1E[0287] <1> mov bx, word [default_tt_count + 2] 7652 000045FC 8B0E[0087] <1> mov cx, word [default_tt_count] 7653 <1> @@: ; bx:cx = default count 7654 <1> 7655 00004600 8516[8400] <1> test word [options3], dx 7656 00004604 7405 <1> jz @F 7657 00004606 8026[9C00]F7 <1> clropt [internalflags], pagedcommand 7658 <1> @@: 7659 <1> 7660 <1> ; Initialise auxbuff pointers in case there is no WHILE clause. 7661 0000460B E80B01 <1> call tpg_initialise_empty_auxbuff 7662 <1> 7663 0000460E E82973 <1> call iseol? 7664 00004611 7503E99500 <1> je .ppt1 ; if no count given --> (uses bx:cx = default) 7665 00004616 E81A6D <1> call getdword ; bx:dx = given count 7666 <1> 7667 00004619 53 <1> push bx 7668 0000461A 52 <1> push dx ; push count 7669 0000461B E87273 <1> call skipwh0 7670 0000461E E81973 <1> call iseol? 7671 00004621 7503E98300 <1> je .no_while 7672 00004626 4E <1> dec si 7673 00004627 BA[9D68] <1> mov dx, msg.while 7674 0000462A E8AE72 <1> call isstring? 7675 0000462D 7408 <1> je .found_while 7676 <1> 7677 0000462F E8E1BE <1> call guard_auxbuff 7678 00004632 E8C100 <1> call .handle_silent ; (error if no SILENT keyword) 7679 <1> 7680 00004635 EB72 <1> jmp .no_while 7681 <1> 7682 <1> 7683 <1> .found_while: 7684 00004637 E8D9BE <1> call guard_auxbuff 7685 0000463A E82373 <1> call skipcomma 7686 0000463D 4E <1> dec si 7687 0000463E 89F1 <1> mov cx, si 7688 00004640 AC <1> lodsb 7689 00004641 E8EF6C <1> call getexpression 7690 00004644 E8FE66 <1> call toboolean 7691 00004647 E84673 <1> call skipwh0 7692 0000464A 52 <1> push dx 7693 0000464B 56 <1> push si 7694 0000464C E8EB72 <1> call iseol? ; expect end of line here 7695 0000464F 7404 <1> je .no_while_silent 7696 <1> 7697 00004651 4E <1> dec si 7698 00004652 E8A100 <1> call .handle_silent 7699 <1> 7700 <1> .no_while_silent: 7701 00004655 5E <1> pop si 7702 00004656 5A <1> pop dx 7703 00004657 85D2 <1> test dx, dx ; condition true now ? 7704 00004659 7509 <1> jnz @F 7705 <1> 7706 0000465B BA[1C69] <1> mov dx, msg.while_not_true 7707 0000465E E88F77 <1> call putsz 7708 00004661 E99CB9 <1> jmp cmd3 7709 <1> 7710 <1> @@: 7711 <1> %if _PM 7712 00004664 8B1E[F009] <1> mov bx, word [auxbuff_switchbuffer_size] 7713 <1> %else 7714 <1> xor bx, bx 7715 <1> %endif 7716 <1> ; (si + 1) -> line terminator (13, ';', 0) or next keyword 7717 <1> @@: 7718 00004668 4E <1> dec si ; -> terminator, or blank 7719 00004669 807CFF20 <1> cmp byte [si - 1], 32 ; another blank at end ? 7720 0000466D 74F9 <1> je @B ; yes --> 7721 0000466F 807CFF09 <1> cmp byte [si - 1], 9 7722 00004673 74F3 <1> je @B ; yes --> 7723 00004675 89F0 <1> mov ax, si 7724 00004677 29C8 <1> sub ax, cx ; ax = length of expression 7725 00004679 53 <1> push bx 7726 0000467A 01C3 <1> add bx, ax 7727 0000467C 81FB0F20 <1> cmp bx, _AUXBUFFSIZE - 1 7728 00004680 7603E98D5E <1> ja error 7729 00004685 8E06[F209] <1> mov es, word [auxbuff_segorsel] 7730 <1> ; => auxbuff 7731 00004689 5B <1> pop bx ; -> behind switchbuffer 7732 0000468A 89CE <1> mov si, cx ; -> expression start 7733 0000468C 89C1 <1> mov cx, ax ; = length of expression 7734 <1> .loop: 7735 0000468E AC <1> lodsb 7736 0000468F 268807 <1> mov byte [es:bx], al 7737 00004692 43 <1> inc bx ; store expression 7738 00004693 E2F9 <1> loop .loop 7739 00004695 26C60700 <1> mov byte [es:bx], 0 ; terminate string 7740 00004699 43 <1> inc bx 7741 0000469A 891E[F809] <1> mov word [auxbuff_behind_while_condition], bx 7742 0000469E 891E[FA09] <1> mov word [auxbuff_behind_last_silent], bx 7743 000046A2 16 <1> push ss 7744 000046A3 07 <1> pop es 7745 <1> 7746 000046A4 800E[9F00]04 <1> setopt [internalflags], tt_while 7747 <1> .no_while: 7748 000046A9 59 <1> pop cx 7749 000046AA 5B <1> pop bx ; bx:cx = given count 7750 <1> 7751 <1> .ppt1: 7752 000046AB 85DB <1> test bx, bx 7753 000046AD 7507 <1> jnz @F 7754 000046AF 85C9 <1> test cx, cx 7755 000046B1 7503E95C5E <1> jz error ; must be at least 1, else error --> 7756 <1> @@: 7757 000046B6 53 <1> push bx 7758 000046B7 51 <1> push cx 7759 <1> 7760 000046B8 8026[A000]E8 <1> clropt [internalflags2], dif2_gg_is_first | dif2_gg_first_detected | dif2_gg_skip_cseip | dif2_gg_skip_non_cseip 7763 <1> 7764 000046BD F606[7E00]04 <1> testopt [options], tp_do_not_skip_bp 7765 000046C2 752C <1> jnz .do_not_skip_cseip 7766 000046C4 800E[A000]01 <1> setopt [internalflags2], dif2_gg_is_first 7767 <1> 7768 000046C9 803E[D00B]00 <1> cmp byte [eqflag], 0 7769 000046CE 7508 <1> jne .cseip_take_eql 7770 <1> 7771 000046D0 66 <1> _386_PM_o32 ; xor ecx, ecx 7772 000046D1 31C9 <1> xor cx, cx 7773 000046D3 E8B0F0 <1> call get_cseip_ecx_linear 7774 000046D6 EB0C <1> jmp .got_cseip 7775 <1> 7776 <1> .cseip_take_eql: 7777 000046D8 8B1E[D60B] <1> mov bx, word [eqladdr + 4] 7778 000046DC 66 <1> _386_PM_o32 ; mov edx, dword [eqladdr] 7779 000046DD 8B16[D20B] <1> mov dx, word [eqladdr] 7780 000046E1 E8AEF0 <1> call getlinear 7781 <1> .got_cseip: 7782 000046E4 7303E9295E <1> jc error 7783 000046E9 A3[B400] <1> mov word [gg_first_cseip_linear], ax 7784 000046EC 8916[B600] <1> mov word [gg_first_cseip_linear + 2], dx 7785 <1> .do_not_skip_cseip: 7786 <1> 7787 000046F0 59 <1> pop cx 7788 000046F1 5B <1> pop bx 7789 <1> 7790 000046F2 E85F00 <1> call seteq ; make the = operand take effect 7791 000046F5 C3 <1> retn 7792 <1> 7793 <1> 7794 <1> .handle_silent: 7795 000046F6 BA[A368] <1> mov dx, msg.silent 7796 000046F9 E8DF71 <1> call isstring? 7797 000046FC 7403E9115E <1> jne error 7798 00004701 E85C72 <1> call skipcomma 7799 00004704 E83372 <1> call iseol? 7800 00004707 740A <1> je .no_silent_mode_number 7801 <1> 7802 00004709 E80D71 <1> call getword 7803 0000470C 8916[FC09] <1> mov word [tt_silent_mode_number], dx 7804 00004710 E83C72 <1> call chkeol 7805 <1> 7806 <1> .no_silent_mode_number: 7807 00004713 800E[9F00]10 <1> setopt [internalflags], tt_silent_mode 7808 00004718 C3 <1> retn 7809 <1> 7810 <1> 7811 <1> ; INP: (_PM) word [auxbuff_switchbuffer_size] 7812 <1> ; OUT: word [auxbuff_behind_while_condition] 7813 <1> ; word [auxbuff_behind_last_silent] 7814 <1> ; CHG: dx 7815 <1> tpg_initialise_empty_auxbuff: 7816 <1> %if _PM 7817 00004719 8B16[F009] <1> mov dx, word [auxbuff_switchbuffer_size] 7818 <1> %else 7819 <1> xor dx, dx 7820 <1> %endif 7821 0000471D 8916[F809] <1> mov word [auxbuff_behind_while_condition], dx 7822 00004721 8916[FA09] <1> mov word [auxbuff_behind_last_silent], dx 7823 00004725 C3 <1> retn 7824 <1> 7825 <1> 7826 <1> ; PARSEQL - Parse `=' operand for `g', 'p' and `t' commands. 7827 <1> ; Entry AL First character of command 7828 <1> ; SI Address of next character 7829 <1> ; Exit AL First character beyond range 7830 <1> ; SI Address of the character after that 7831 <1> ; eqflag Nonzero if an `=' operand was present 7832 <1> ; eqladdr Address, if one was given 7833 <1> ; Uses AH,BX,CX,DX. 7834 <1> 7835 <1> parseql: 7836 00004726 C606[D00B]00 <1> mov byte [eqflag], 0 ; mark '=' as absent 7837 0000472B 3C3D <1> cmp al, '=' 7838 0000472D 7524 <1> jne peq1 ; if no '=' operand 7839 0000472F E85D72 <1> call skipwhite 7840 00004732 8B1E[900C] <1> mov bx, word [reg_cs] ; default segment 7841 00004736 E81362 <1> call getaddrX ; get the address into bx:(e)dx 7842 <1> %if _PM 7843 00004739 C706[D40B]0000 <1> mov word [eqladdr+2], 0 7844 0000473F 803E[DC88]00 <1> cmp byte [bAddr32], 0 7845 00004744 7401 <1> jz .nohighofs 7846 00004746 66 <1> o32 ; mov dword [eqladdr], edx 7847 <1> .nohighofs: 7848 <1> %endif 7849 00004747 8916[D20B] <1> mov word [eqladdr+0], dx 7850 0000474B 891E[D60B] <1> mov word [eqladdr+4], bx 7851 0000474F FE06[D00B] <1> inc byte [eqflag] 7852 <1> peq1: 7853 00004753 C3 <1> retn 7854 <1> 7855 <1> 7856 <1> ; SETEQ - Copy the = arguments to their place, if appropriate. 7857 <1> ; (This is not done immediately, because the command may have 7858 <1> ; a syntax error.) 7859 <1> ; Uses AX. 7860 <1> seteq: 7861 00004754 803E[D00B]00 <1> cmp byte [eqflag], 0 7862 00004759 7417 <1> je .return ; if no `=' operand 7863 0000475B A1[D20B] <1> mov ax, word [eqladdr+0] 7864 0000475E A3[9C0C] <1> mov word [reg_eip], ax 7865 <1> %if _PM 7866 00004761 A1[D40B] <1> mov ax, word [eqladdr+2] 7867 00004764 A3[9E0C] <1> mov word [reg_eip+2], ax 7868 <1> %endif 7869 00004767 A1[D60B] <1> mov ax, word [eqladdr+4] 7870 0000476A A3[900C] <1> mov word [reg_cs], ax 7871 0000476D C606[D00B]00 <1> mov byte [eqflag], 0 ; clear the flag 7872 <1> .return: 7873 00004772 C3 <1> retn 2107 %include "uu.asm" 2108 <1> 2109 <1> %if 0 2110 <1> 2111 <1> lDebug U command - Disassembler 2112 <1> 2113 <1> Copyright (C) 1995-2003 Paul Vojta 2114 <1> Copyright (C) 2008-2012 C. Masloch 2115 <1> 2116 <1> Usage of the works is permitted provided that this 2117 <1> instrument is retained with the works, so that any entity 2118 <1> that uses the works is notified of this instrument. 2119 <1> 2120 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2121 <1> 2122 <1> %endif 2123 <1> 2124 <1> 2125 <1> usesection lDEBUG_CODE 2126 <1> 2127 <1> ; U command - disassemble. 2128 <1> uu: 2129 00004773 C706[DA0B][7E47] <1> mov word [lastcmd], lastuu 2130 00004779 E8BE71 <1> call iseol? 2131 0000477C 7514 <1> jne uu1 ; if an address was given 2132 <1> 2133 <1> lastuu: 2134 0000477E 66 <1> _386_PM_o32 ; mov ecx, dword [u_addr] 2135 0000477F 8B0E[1E0B] <1> mov cx, word [u_addr] 2136 00004783 66 <1> _386_PM_o32 ; mov edx, ecx 2137 00004784 89CA <1> mov dx, cx 2138 00004786 66 <1> _386_PM_o32 ; add ecx, byte 1Fh 2139 00004787 83C11F <1> add cx, byte 1Fh 2140 0000478A 7304 <1> jnc .no_overflow ; if no overflow --> 2141 0000478C 66 <1> _386_PM_o32 ; or ecx, byte -1 2142 0000478D 83C9FF <1> or cx, byte -1 ; til end of segment 2143 <1> .no_overflow: 2144 00004790 EB25 <1> jmp short uu2 2145 <1> 2146 <1> uu1: 2147 00004792 B92000 <1> mov cx, 20h ; default length 2148 00004795 8B1E[900C] <1> mov bx, word [reg_cs] 2149 00004799 E8C260 <1> call getrangeX ; get address range into bx:(e)dx 2150 0000479C E8B071 <1> call chkeol ; expect end of line here 2151 0000479F 891E[220B] <1> mov word [u_addr + saSegSel], bx 2152 <1> %if _PM 2153 000047A3 E8574A <1> call ispm 2154 000047A6 7506 <1> jnz .86m 2155 <1> .pm: 2156 000047A8 891E[260B] <1> mov word [u_addr + saSelector], bx 2157 000047AC EB04 <1> jmp @F 2158 <1> .86m: 2159 000047AE 891E[240B] <1> mov word [u_addr + saSegment], bx 2160 <1> @@: 2161 <1> %endif 2162 000047B2 66 <1> _386_PM_o32 ; mov dword [u_addr], edx 2163 000047B3 8916[1E0B] <1> mov word [u_addr], dx 2164 <1> 2165 <1> ; (d)word [u_addr] = offset start address 2166 <1> ; word [u_addr + saSegSel] = segment start address 2167 <1> ; (e)cx = end address 2168 <1> ; (e)dx = start adddress (same as [u_addr]) 2169 <1> uu2: 2170 000047B7 66 <1> _386_PM_o32 ; inc ecx 2171 000047B8 41 <1> inc cx 2172 <1> uu3: 2173 000047B9 E81BF8 <1> call handle_serial_flags_ctrl_c 2174 000047BC 66 <1> _386_PM_o32 ; push ecx 2175 000047BD 51 <1> push cx 2176 000047BE 66 <1> _386_PM_o32 ; push edx 2177 000047BF 52 <1> push dx 2178 000047C0 8326[D687]00 <1> and word [disflags], 0 2179 000047C5 E81700 <1> call disasm ; do it 2180 000047C8 66 <1> _386_PM_o32 ; pop ebx 2181 000047C9 5B <1> pop bx 2182 000047CA 66 <1> _386_PM_o32 ; pop ecx 2183 000047CB 59 <1> pop cx 2184 000047CC 66 <1> _386_PM_o32 ; mov eax, dword [u_addr] 2185 000047CD A1[1E0B] <1> mov ax, word [u_addr] 2186 000047D0 66 <1> _386_PM_o32 ; mov edx, eax 2187 000047D1 89C2 <1> mov dx, ax 2188 000047D3 66 <1> _386_PM_o32 ; sub eax, ecx 2189 000047D4 29C8 <1> sub ax, cx ; current position - end 2190 000047D6 66 <1> _386_PM_o32 ; sub ebx, ecx 2191 000047D7 29CB <1> sub bx, cx ; previous position - end 2192 000047D9 66 <1> _386_PM_o32 ; cmp eax, ebx 2193 000047DA 39D8 <1> cmp ax, bx 2194 000047DC 73DB <1> jnb uu3 ; if we haven't reached the goal 2195 000047DE C3 <1> retn 2196 <1> 2197 <1> 2198 <1> usesection lDEBUG_DATA_ENTRY 2199 <1> 2200 <1> ; Jump table for displaying sized operands. 2201 <1> ; Entries are defined in the debug.asm opsizeditem list. 2202 <1> align 2, db 0 2203 <1> disjmp2: 2204 00008704 [DB4F][0C50][3C52]- <1> dw DISJMP2_OPSIZEDITEMS 2204 0000870A [4952][FD4F][5252]- <1> 2204 00008710 [8C52][9152] <1> 2205 <1> .end: 2206 <1> 2207 <1> ; Jump table for displaying operands. 2208 <1> ; Entries are defined in the debug.asm opitem list. 2209 <1> align 2, db 0 2210 <1> optab: 2211 00008714 [6F49] <1> dw da_internal_error ; entry for OP_END 2212 00008716 [9552][9952][AA52]- <1> dw OPTAB_OPITEMS 2212 0000871C [C752][DD52][EF52]- <1> 2212 00008722 [9A53][D853][9955]- <1> 2212 00008728 [A955][BF55][DF55]- <1> 2212 0000872E [EA55][0956][2A56]- <1> 2212 00008734 [2A56][3C56][4256]- <1> 2212 0000873A [5056][5856][2857]- <1> 2212 00008740 [5257][6D57][7957]- <1> 2212 00008746 [8057][3157][3857]- <1> 2212 0000874C [3F57][4B57][4657]- <1> 2212 00008752 [6956][9156][D056]- <1> 2212 00008758 [6F49]310033004458- <1> 2212 00008760 434C53544353445345- <1> 2212 00008769 53465347535353 <1> 2213 <1> 2214 <1> 2215 <1> %if _MEMREF_AMOUNT 2216 <1> align 16, db 0 2217 00008770 00 <1> memrefs: times MEMREF_size * _MEMREF_AMOUNT db 0 2218 000087B0 0000 <1> .free: dw 0 2219 <1> 2220 000087B2 00 <1> align 4, db 0 2221 <1> string_memref_counter: 2222 000087B4 00000000 <1> dd 0 2223 <1> %endif 2224 <1> 2225 <1> 2226 <1> ; DISASM - Disassemble. 2227 <1> 2228 <1> align 2, db 0 2229 000087B8 0000 <1> dis_n: dw 0 ; number of bytes in instruction so far 2230 000087BA 0000 <1> dw 0 2231 000087BC 00 <1> preflags: db 0 ; flags for prefixes found so far (includes OSIZE,ASIZE) 2232 000087BD 00 <1> preused: db 0 ; flags for prefixes used so far 2233 <1> %if _PM 2234 000087BE 00 <1> presizeflags: db 0 ; O32,A32 flags = (OSIZE,ASIZE) XOR (32-bit cs?) 2235 <1> %else 2236 <1> presizeflags: equ preflags ; O32,A32 flags are always equal to OSIZE,ASIZE 2237 <1> %endif 2238 <1> 2239 <1> PRESEG equ 1 ; segment prefix 2240 <1> PREREP equ 2 ; rep prefixes 2241 <1> PREREPZ equ 4 ; F3h, not F2h 2242 <1> PRELOCK equ 8 ; lock prefix 2243 <1> PREOSIZE equ 10h ; flag for OSIZE prefix 2244 <1> PREASIZE equ 20h ; flag for ASIZE prefix 2245 <1> PRE32D equ 10h ; flag for 32-bit data 2246 <1> PRE32A equ 20h ; flag for 32-bit addressing 2247 <1> PREWAIT equ 40h ; prefix wait (not really a prefix) 2248 <1> GOTREGM equ 80h ; set if we have the reg/mem part 2249 <1> 2250 000087BF 00 <1> instru: db 0 ; the main instruction byte 2251 000087C0 00 <1> disp8: db 0 2252 000087C1 00 <1> align 2, db 0 2253 000087C2 0000 <1> index: dw 0 ; index of the instruction (unsqueezed) 2254 000087C4 380339033C03 <1> obsinst:dw SFPGROUP3, SFPGROUP3+1, SFPGROUP3+4 2255 000087CA 04020602 <1> dw SPARSE_BASE+24h, SPARSE_BASE+26h ; obsolete-instruction values 2256 <1> ; This is used to search for obsolete instructions: 2257 <1> ; DBE0h: feni 2258 <1> ; DBE1h: fdisi 2259 <1> ; DBE4h: fsetpm 2260 <1> ; 124h: mov trX, reg 2261 <1> ; 126h: mov reg, trX 2262 <1> 2263 000087CE 00 <1> rmsize: db 0 ; <0 or 0 or >0 means mod r/m is 8 or 16 or 32 2264 000087CF 00 <1> segmnt: db 0 ; segment determined by prefix (or otherwise) 2265 <1> align 4, db 0 2266 000087D0 00000000 <1> addrr: dd 0 ; address in mod r/m byte 2267 000087D4 0000 <1> savesp2:dw 0 ; save the stack pointer here (used in disasm) 2268 <1> 2269 <1> align 2, db 0 2270 000087D6 0000 <1> disflags: dw 0 ; flags for the disassembler 2271 <1> 2272 <1> ;--- equates for disflags: 2273 <1> 2274 <1> DIS_F_REPT equ 1 ; repeat after pop ss, etc. 2275 <1> DIS_F_SHOW equ 2 ; show memory contents 2276 <1> DIS_I_SHOW equ 4 ; there are memory contents to show 2277 <1> DIS_I_UNUSED equ 8 ; (internal) print " (unused)" 2278 <1> DIS_I_SHOWSIZ equ 10h ; (internal) always show the operand size 2279 <1> DIS_I_KNOWSIZ equ 20h ; (internal) we know the operand size of instr. 2280 <1> DIS_I_MOV_SS equ 40h ; (internal) note for repetition: mov ss 2281 <1> DIS_I_DONTSHOW equ 80h ; do not show memory contents override 2282 <1> DIS_I_NOSIZ equ 100h ; do not show size 2283 <1> DIS_I_FAR_M equ 200h ; far memory reference, show segment word contents 2284 <1> DIS_I_DOUBLE_M equ 400h ; double memory reference, show second item contents 2285 <1> DIS_I_SHOW_A32 equ 800h ; memory contents to show are 32-bit addressed 2286 <1> DIS_I_M_SRC equ 1000h ; memory operand is source 2287 <1> DIS_I_M_DST equ 2000h ; memory operand is destination 2288 <1> ; both of the above may be set 2289 <1> 2290 000087D8 00 <1> disflags2: db 0 ; another copy of DIS_I_KNOWSIZ 2291 000087D9 00 <1> disrepeatcount: db 0 2292 <1> 2293 <1> align 2, db 0 2294 000087DA 0000 <1> sizeloc: dw 0 ; address of size words in output line 2295 <1> %if _COND 2296 000087DC 0000 <1> condmsg: dw 0 ; -> conditionals message to display (if R and no mem) 2297 <1> %endif 2298 <1> 2299 <1> ; Jump table for a certain place. 2300 <1> ; The size of this table matches OPTYPES_BASE. 2301 <1> align 2, db 0 2302 <1> disjmp: 2303 000087DE [A057] <1> dw disbad ; illegal instruction 2304 000087E0 [8048] <1> dw da_twobyte ; two-byte instruction 2305 000087E2 [8C48] <1> dw da_insgrp ; instruction group 2306 000087E4 [9348] <1> dw da_fpuins ; coprocessor instruction 2307 000087E6 [AE48] <1> dw da_fpugrp ; coprocessor instruction group 2308 000087E8 [B748] <1> dw da_insprf ; instruction prefix (including 66h/67h) 2309 <1> %if ($ - disjmp) != OPTYPES_BASE 2310 <1> %error Wrong length of table disjmp 2311 <1> %endif 2312 <1> 2313 <1> ; Table for 16-bit mod r/m addressing. 8 = BX, 4 = BP, 2 = SI, 1 = DI. 2314 000087EA 0A09060502010408 <1> rmtab: db 8+2, 8+1, 4+2, 4+1, 2, 1, 4, 8 2315 <1> 2316 <1> 2317 <1> %macro defgpr 1.nolist 2318 <1> REG_ %+ %1: equ ($ - rgnam816) / 2 2319 <1> %defstr %%string %1 2320 <1> db %%string 2321 <1> %endmacro 2322 <1> %macro defsr 1.nolist 2323 <1> REG_ %+ %1: equ REG_NO_GPR + ($ - segrgnam) / 2 2324 <1> %defstr %%string %1 2325 <1> db %%string 2326 <1> %endmacro 2327 <1> 2328 <1> REG_NO_GPR equ 24 ; 16..23 are registers eax..edi 2329 <1> 2330 <1> align 2, db 0 2331 <1> ; Tables of register names. 2332 <1> ; rgnam816/rgnam16/segrgnam/xregnam must be consecutive. 2333 <1> rgnam816: 2334 000087F2 414C <1> defgpr AL 2335 000087F4 434C <1> defgpr CL 2336 000087F6 444C <1> defgpr DL 2337 000087F8 424C <1> defgpr BL 2338 000087FA 4148 <1> defgpr AH 2339 000087FC 4348 <1> defgpr CH 2340 000087FE 4448 <1> defgpr DH 2341 00008800 4248 <1> defgpr BH ; 0..7 2342 <1> rgnam16: 2343 00008802 4158 <1> defgpr AX 2344 00008804 4358 <1> defgpr CX 2345 00008806 4458 <1> defgpr DX 2346 00008808 4258 <1> defgpr BX 2347 0000880A 5350 <1> defgpr SP 2348 0000880C 4250 <1> defgpr BP 2349 0000880E 5349 <1> defgpr SI 2350 00008810 4449 <1> defgpr DI ; 8..15 (16-bit), 16..23 (32-bit) 2351 <1> N_REGS16 equ ($ - rgnam16) >> 1 2352 <1> segrgnam: 2353 00008812 4553 <1> defsr ES 2354 00008814 4353 <1> defsr CS 2355 00008816 5353 <1> defsr SS 2356 00008818 4453 <1> defsr DS 2357 0000881A 4653 <1> defsr FS 2358 0000881C 4753 <1> defsr GS ; 24..29 2359 <1> N_SEGREGS equ ($ - segrgnam) >> 1 2360 <1> xregnam: 2361 0000881E 5354 <1> defsr ST 2362 00008820 4D4D <1> defsr MM 2363 00008822 4352 <1> defsr CR 2364 00008824 4452 <1> defsr DR 2365 00008826 5452 <1> defsr TR ; 30..34 2366 <1> N_ALLREGS equ ($ - rgnam816) >> 1 2367 <1> 2368 <1> 2369 <1> align 2, db 0 2370 00008828 [640C][6C0C][700C]- <1> reg32addr: dw reg_eax, reg_ecx, reg_edx, reg_ebx 2370 0000882E [680C] <1> 2371 00008830 [740C][780C][7C0C]- <1> dw reg_esp, reg_ebp, reg_esi, reg_edi 2371 00008836 [800C] <1> 2372 <1> 2373 <1> align 2, db 0 2374 00008838 [880C][900C][8C0C]- <1> segrgaddr: dw reg_es,reg_cs,reg_ss,reg_ds,reg_fs,reg_gs 2374 0000883E [840C][940C][980C] <1> 2375 <1> 2376 <1> ; Tables for handling of named prefixes. 2377 <1> 2378 00008844 262E363E6465 <1> prefixlist: db 26h,2Eh,36h,3Eh,64h,65h ; segment prefixes (in order) 2379 0000884A 9BF0F2F3 <1> db 9Bh,0F0h,0F2h,0F3h ; WAIT,LOCK,REPNE,REPE 2380 0000884E 6667 <1> db 066h,067h ; OSIZE, ASIZE 2381 <1> N_PREFIX: equ $ - prefixlist 2382 <1> 2383 <1> align 2, db 0 2384 00008850 C309F90535082F08 <1> prefixmnem: dw MN_WAIT,MN_LOCK,MN_REPNE,MN_REPE 2385 00008858 0C000200 <1> dw MN_O32,MN_A32 ; in 16-bit CS, OSIZE is O32 and ASIZE is A32 2386 <1> %if _PM 2387 0000885C 11000700 <1> dw MN_O16,MN_A16 ; in 32-bit CS, OSIZE is O16 and ASIZE is A16 2388 <1> %endif 2389 <1> 2390 <1> %if _COND 2391 <1> align 2, db 0 2392 <1> cond_table: 2393 00008860 0008 <1> dw 800h ; OF 2394 00008862 0100 <1> dw 1 ; CF 2395 00008864 4000 <1> dw 40h ; ZF 2396 00008866 4100 <1> dw 41h ; CF | ZF 2397 00008868 8000 <1> dw 80h ; SF 2398 0000886A 0400 <1> dw 4 ; PF 2399 <1> ; dw cond_L_GE ; handled specifically 2400 <1> ; dw cond_LE_G ; handled specifically 2401 <1> %endif 2402 <1> 2403 <1> single_byte_opcodes_repeat_disassembly: 2404 <1> .: 2405 0000886C 17 <1> db 17h ; pop ss 2406 0000886D E6 <1> db 0E6h ; out imm8, al 2407 0000886E E7 <1> db 0E7h ; out imm8, (e)ax 2408 0000886F EE <1> db 0EEh ; out dx, al 2409 00008870 EF <1> db 0EFh ; out dx, (e)ax 2410 00008871 6E <1> db 06Eh ; outsb 2411 00008872 6F <1> db 06Fh ; outsw/outsd 2412 00008873 E4 <1> db 0E4h ; in al, imm8 2413 00008874 E5 <1> db 0E5h ; in (e)ax, imm8 2414 00008875 EC <1> db 0ECh ; in al, dx 2415 00008876 ED <1> db 0EDh ; in (e)ax, dx 2416 00008877 6C <1> db 06Ch ; insb 2417 00008878 6D <1> db 06Dh ; insw/insd 2418 00008879 F4 <1> db 0F4h ; hlt 2419 0000887A FB <1> db 0FBh ; sti 2420 <1> .length: equ $ - . 2421 <1> 2422 <1> 2423 <1> usesection lDEBUG_CODE 2424 <1> 2425 <1> disasm: 2426 000047DF C606[D987]00 <1> mov byte [disrepeatcount], 0 ; number of repeated disassembly lines 2427 <1> 2428 <1> %if _MEMREF_AMOUNT 2429 000047E4 B90400 <1> mov cx, _MEMREF_AMOUNT 2430 000047E7 BF[7087] <1> mov di, memrefs 2431 <1> @@: 2432 000047EA E8190D <1> call init_one_memref 2433 000047ED E2FB <1> loop @B 2434 000047EF AB <1> stosw ; memrefs.free 2435 <1> %endif 2436 <1> 2437 <1> .preserve_disrepeatcount: 2438 <1> %if _COND 2439 000047F0 8326[DC87]00 <1> and word [condmsg], 0 ; initialize conditions message 2440 <1> %endif 2441 <1> .preserve_condmsg_and_disrepeatcount: 2442 000047F5 8926[D487] <1> mov word [savesp2], sp 2443 000047F9 66 <1> _386_PM_o32 ; xor eax, eax 2444 000047FA 31C0 <1> xor ax, ax 2445 000047FC 66 <1> _386_PM_o32 ; mov dword [dis_n], eax 2446 000047FD A3[B887] <1> mov word [dis_n], ax 2447 00004800 A2[C087] <1> mov byte [disp8], al 2448 00004803 A3[BC87] <1> mov word [preflags], ax ; clear preflags and preused 2449 00004806 C606[CF87]03 <1> mov byte [segmnt], 3 ; initially use DS segment 2450 0000480B C606[CE87]80 <1> mov byte [rmsize], 80h ; don't display any memory 2451 00004810 A3[A281] <1> mov word [dismach], ax ; no special machine needed, so far 2452 00004813 8B1E[220B] <1> mov bx, word [u_addr + saSegSel] 2453 <1> %if _PM 2454 00004817 A2[DB88] <1> mov byte [bCSAttr], al 2455 0000481A E84B15 <1> call test_d_b_bit 2456 0000481D 7405 <1> jz .16 2457 0000481F C606[DB88]40 <1> mov byte [bCSAttr], 40h 2458 <1> .16: 2459 <1> %endif 2460 <1> 2461 00004824 E86111 <1> call disgetbyte ; get a byte of the instruction 2462 00004827 3C9B <1> cmp al, 9Bh ; wait instruction (must be the first prefix) 2463 00004829 7508 <1> jne da2 ; if not --> 2464 <1> 2465 <1> ; The wait instruction is actually a separate instruction as far as 2466 <1> ; the x86 is concerned, but we treat it as a prefix since there are 2467 <1> ; some mnemonics that incorporate it. But it has to be treated specially 2468 <1> ; since you can't do, e.g., seg cs wait ... but must do wait seg cs ... 2469 <1> ; instead. We'll catch it later if the wait instruction is not going to 2470 <1> ; be part of a shared mnemonic. 2471 <1> 2472 0000482B 800E[BC87]40 <1> or byte [preflags], PREWAIT 2473 <1> 2474 <1> ; If we've found a prefix, we return here for the actual instruction 2475 <1> ; (or another prefix). 2476 <1> 2477 <1> da1: 2478 00004830 E85511 <1> call disgetbyte 2479 <1> da2: 2480 00004833 A2[BF87] <1> mov [instru],al ; save away the instruction 2481 00004836 B400 <1> mov ah,0 2482 <1> 2483 <1> ; Now we have the sequence number of the instruction in AX. Look it up. 2484 <1> 2485 <1> da3: 2486 00004838 89C3 <1> mov bx,ax 2487 0000483A A3[C287] <1> mov [index],ax ; save the compressed index 2488 0000483D 3DE001 <1> cmp ax,SPARSE_BASE 2489 00004840 720A <1> jb da4 ; if it's not from the squeezed part of the table 2490 00004842 8A9F[4812] <1> mov bl,[sqztab+bx-SPARSE_BASE] 2491 00004846 B700 <1> mov bh,0 2492 00004848 81C3E001 <1> add bx,SPARSE_BASE ; bx = compressed index 2493 <1> 2494 <1> da4: 2495 0000484C 8A8F[500C] <1> mov cl, [optypes+bx]; cx = opcode type 2496 00004850 B500 <1> mov ch, 0 2497 00004852 D1E3 <1> shl bx, 1 2498 00004854 8B9F[EE0E] <1> mov bx, [opinfo+bx] ; bx = other info (usually the mnemonic) 2499 00004858 89CE <1> mov si, cx 2500 0000485A 89D8 <1> mov ax, bx 2501 0000485C B10C <1> mov cl, 12 2502 0000485E D3E8 <1> shr ax, cl 2503 00004860 3A06[A281] <1> cmp al, [dismach] 2504 00004864 7203 <1> jb da5 ; if a higher machine is already required 2505 00004866 A2[A281] <1> mov [dismach], al ; set machine type 2506 <1> da5: 2507 00004869 80E70F <1> and bh, 0Fh ; remove the machine field 2508 0000486C 83FE0C <1> cmp si, OPTYPES_BASE 2509 0000486F 7360 <1> jae da13_unp ; if this is an actual instruction 2510 00004871 F7C60100 <1> test si, 1 ; check whether valid displacement 2511 00004875 7403E9F500 <1> jnz da_internal_error ; if not --> 2512 0000487A FF94[DE87] <1> call [disjmp+si] ; otherwise, do more specific processing 2513 0000487E EBB8 <1> jmp s da3 ; back for more 2514 <1> 2515 <1> ; Two-byte instruction. 2516 <1> 2517 <1> da_twobyte: 2518 00004880 E80511 <1> call disgetbyte 2519 00004883 A2[BF87] <1> mov [instru],al 2520 00004886 B400 <1> mov ah,0 2521 00004888 05E001 <1> add ax,SPARSE_BASE 2522 0000488B C3 <1> ret 2523 <1> 2524 <1> ; Instruction group. 2525 <1> 2526 <1> da_insgrp: 2527 0000488C E87B0F <1> call getregmem_r ; get the middle 3 bits of the R/M byte 2528 0000488F 98 <1> cbw 2529 00004890 01D8 <1> add ax,bx ; offset 2530 00004892 C3 <1> ret 2531 <1> 2532 <1> ; Coprocessor instruction. 2533 <1> 2534 <1> da_fpuins: 2535 00004893 800E[D687]10 <1> or byte [disflags],DIS_I_SHOWSIZ 2536 00004898 800E[A381]01 <1> or byte [dmflags],DM_COPR 2537 0000489D E8740F <1> call getregmem 2538 000048A0 3CC0 <1> cmp al,0c0h 2539 000048A2 72E8 <1> jb da_insgrp ;range 00-bfh is same as an instruction group 2540 000048A4 B103 <1> mov cl,3 2541 000048A6 D2E8 <1> shr al,cl ;C0h --> 18h 2542 000048A8 2C10 <1> sub al,18h-8 ;18h --> 8 2543 000048AA 98 <1> cbw 2544 000048AB 01D8 <1> add ax,bx ;offset 2545 000048AD C3 <1> ret 2546 <1> 2547 <1> ; Coprocessor instruction group. 2548 <1> 2549 <1> da_fpugrp: 2550 000048AE A0[9C81] <1> mov al,[regmem] 2551 000048B1 2407 <1> and al,7 2552 000048B3 98 <1> cbw 2553 000048B4 01D8 <1> add ax,bx 2554 000048B6 C3 <1> ret 2555 <1> 2556 <1> ; Instruction prefix. At this point, bl = prefix bits; bh = segment 2557 <1> 2558 <1> da_insprf: 2559 000048B7 841E[BC87] <1> test bl,[preflags] 2560 000048BB 7511 <1> jnz da12 ; if there are duplicates 2561 000048BD 081E[BC87] <1> or [preflags],bl 2562 000048C1 F6C301 <1> test bl,PRESEG 2563 000048C4 7404 <1> jz da11 ; if not a segment 2564 000048C6 883E[CF87] <1> mov [segmnt],bh ; save the segment 2565 <1> da11: 2566 000048CA 58 <1> pop ax ; discard return address 2567 000048CB E962FF <1> jmp da1 2568 <1> 2569 <1> da12: 2570 000048CE E9CF0E <1> jmp disbad ; we don't allow duplicate prefixes 2571 <1> 2572 <1> ; si = index into table opindex, + OPTYPES_BASE 2573 <1> da13_unp: 2574 000048D1 83EE0C <1> sub si, OPTYPES_BASE ; = offset into opindex 2575 000048D4 31C0 <1> xor ax, ax 2576 000048D6 8A84[2C16] <1> mov al, [si + opindex] ; ax = adjustment (from opindex) 2577 000048DA 01F6 <1> add si, si ; take offset twice 2578 000048DC 4E <1> dec si ; subtract one 2579 000048DD 01C6 <1> add si, ax ; add in the adjustment 2580 <1> 2581 <1> ; OK. Here we go. This is an actual instruction. 2582 <1> ; bx = offset of mnemonic in mnlist 2583 <1> ; si = offset of operand list in oplists 2584 <1> ; First print the op mnemonic. 2585 <1> 2586 <1> da13: 2587 <1> %if _PM 2588 000048DF A0[BC87] <1> mov al, byte [preflags] 2589 000048E2 2430 <1> and al, PREOSIZE | PREASIZE ; get OSIZE,ASIZE status (= O32,A32 in 16-bit cs) 2590 000048E4 F606[DB88]40 <1> _386 test byte [bCSAttr], 40h ; in a 32-bit segment? 2591 000048E9 7402 <1> _386 jz .16 ; no --> 2592 000048EB 3430 <1> _386 xor al, PRE32D | PRE32A ; OSIZE,ASIZE present means O16,A16 2593 <1> .16: 2594 000048ED A2[BE87] <1> mov byte [presizeflags], al ; set O32,A32 status 2595 <1> %endif 2596 000048F0 56 <1> push si 2597 000048F1 8DB7[9A01] <1> lea si,[mnlist+bx] ; offset of mnemonic 2598 000048F5 81FE[F101] <1> cmp si,mnlist+MN_BSWAP 2599 000048F9 7505 <1> jne da13a ; if not BSWAP 2600 000048FB E82010 <1> call dischk32d 2601 000048FE 74CE <1> jz da12 ; if no operand-size prefix --> 2602 <1> da13a: 2603 00004900 E8590F <1> call showop ; print out the op code (at line_out+28) 2604 00004903 8326[DA87]00 <1> and word [sizeloc], 0 ; clear out this flag 2605 00004908 5E <1> pop si ; recover list of operands (offset in oplists) 2606 00004909 81C6[0000] <1> add si, oplists ; -> actual oplist entry 2607 <1> 2608 <1> da14_check_end: 2609 0000490D 803C00 <1> cmp byte [si], OP_END 2610 00004910 7503E98400 <1> je da_op_end_e ; if we're done --> 2611 <1> 2612 <1> ; Loop over operands. si-> next operand type. 2613 <1> ; Fortunately the operands appear in the instruction in the same 2614 <1> ; order as they appear in the disassembly output. 2615 <1> 2616 <1> da14: 2617 00004915 C606[D887]00 <1> mov byte [disflags2], 0 ; clear out size-related flags 2618 0000491A AC <1> lodsb ; get the operand type 2619 0000491B 3C40 <1> cmp al,OP_SIZE 2620 0000491D 7259 <1> jb da18 ; if it's not size dependent 2621 0000491F C606[D887]20 <1> mov byte [disflags2],DIS_I_KNOWSIZ ;indicate variable size 2622 00004924 3CA0 <1> cmp al,OP_1632_DEFAULT 2623 00004926 7313 <1> jae da15_default 2624 00004928 3C60 <1> cmp al,OP_8 2625 0000492A 7329 <1> jae da16 ; if the size is fixed (8, 16, 32, 64) 2626 0000492C 3C50 <1> cmp al,OP_1632 2627 0000492E 7317 <1> jae da15 ; if word or dword 2628 <1> ; OP_ALL here. This has a width of 2. 2629 <1> ; If the low bit is clear, this means 2630 <1> ; 8 bit, else 16/32 bits. 2631 00004930 B4FF <1> mov ah,-1 2632 00004932 F606[BF87]01 <1> test byte [instru],1 2633 00004937 7424 <1> jz da17 ; if byte --> 2634 00004939 EB0C <1> jmp da15 2635 <1> da15_default: 2636 0000493B F606[BC87]10 <1> test byte [preflags], PREOSIZE 2637 00004940 7505 <1> jnz da15 2638 00004942 800E[D787]01 <1> setopt [disflags], DIS_I_NOSIZ 2639 <1> da15: 2640 00004947 800E[BD87]10 <1> or byte [preused],PRE32D; mark this flag as used 2641 0000494C 8A26[BE87] <1> mov ah,[presizeflags] 2642 00004950 80E410 <1> and ah,PRE32D ;this will be 10h for dword, 00h for word 2643 00004953 EB08 <1> jmp s da17 ;done 2644 <1> 2645 <1> da16: 2646 00004955 88C4 <1> mov ah,al ;OP_8, OP_16, OP_32 or OP_64 (we know which) 2647 00004957 80E4F0 <1> and ah,0f0h ;this converts ah to <0 for byte, =0 for word, 2648 0000495A 80EC70 <1> sub ah,OP_16 ;and >0 for dword (byte=F0h, word=00h, dword=10h, qword=20h) 2649 <1> 2650 <1> ; Now we know the size (in ah); branch off to do the operand itself. 2651 <1> 2652 <1> da17: 2653 0000495D 88C3 <1> mov bl, al 2654 0000495F 83E30F <1> and bx, 0Fh ; 8 entries (IMM, RM, M, R_MOD, M_OFFS, R, R_ADD, AX) 2655 00004962 D1E3 <1> shl bx, 1 2656 00004964 83FB10 <1> cmp bx, disjmp2.end - disjmp2 2657 00004967 7306 <1> jae @F 2658 00004969 FF97[0487] <1> call [disjmp2 + bx] ; print out the operand 2659 0000496D EB27 <1> jmp short da20 ; done with operand 2660 <1> 2661 <1> @@: 2662 <1> da_internal_error: 2663 0000496F BA[9970] <1> mov dx, msg.uu_internal_error 2664 00004972 E87B74 <1> call putsz 2665 00004975 E988B6 <1> jmp cmd3 2666 <1> 2667 <1> 2668 <1> ; Sizeless operands. 2669 <1> 2670 <1> da18: 2671 00004978 98 <1> cbw 2672 00004979 93 <1> xchg ax, bx ; bx = index 2673 0000497A D1E3 <1> shl bx, 1 2674 0000497C 8B87[1487] <1> mov ax, [optab + bx] 2675 00004980 83FB46 <1> cmp bx, OP_FIRST_STRING << 1 2676 00004983 720F <1> jb da19 ; if it's not a string 2677 00004985 83FB5C <1> cmp bx, OP_AFTER_LAST << 1 2678 00004988 73E5 <1> jae @B 2679 0000498A E8260F <1> call dis_stosw_lowercase 2680 0000498D 84E4 <1> test ah, ah 2681 0000498F 7505 <1> jnz da20 ; if it's two characters 2682 00004991 4F <1> dec di 2683 00004992 EB02 <1> jmp s da20 ; done with operand 2684 <1> 2685 <1> da19: 2686 00004994 FFD0 <1> call ax ; otherwise, do something else 2687 <1> 2688 <1> ; Operand done, check if there's another one. 2689 <1> da20: 2690 00004996 803C00 <1> cmp byte [si], OP_END 2691 <1> da_op_end_e: 2692 00004999 7410 <1> je da_op_end ; if we're done --> 2693 0000499B B02C <1> mov al,',' 2694 0000499D AA <1> stosb 2695 0000499E F606[AC00]02 <1> testopt [asm_options], disasm_commablank 2696 000049A3 7403 <1> jz .nospace 2697 000049A5 B020 <1> mov al, 32 2698 000049A7 AA <1> stosb 2699 <1> .nospace: 2700 000049A8 E96AFF <1> jmp da14 ;another operand 2701 <1> 2702 <1> 2703 <1> ; All operands done. Now handle prefixes: 2704 <1> ; OPSIZE (66h), ADDRSIZE (67h), WAIT, segment, REP, LOCK 2705 <1> da_op_end: 2706 <1> 2707 <1> ; Now check whether O32 or A32 modifies the opcode. 2708 <1> da_modify_opcode_osize_asize: 2709 000049AB B90200 <1> mov cx, N_LTABO 2710 000049AE BB[C415] <1> mov bx, ltabo1 2711 000049B1 BA0200 <1> mov dx, 2*N_LTABO-2 2712 000049B4 B410 <1> mov ah, PRE32D 2713 000049B6 E87D00 <1> call da23_osize_asize 2714 <1> 2715 000049B9 B90100 <1> mov cx, N_LTABA 2716 000049BC BB[CC15] <1> mov bx, ltaba1 2717 000049BF BA0000 <1> mov dx, 2*N_LTABA-2 2718 000049C2 B420 <1> mov ah, PRE32A 2719 000049C4 E86F00 <1> call da23_osize_asize 2720 <1> 2721 <1> ; Now check and loop for unused prefixes. 2722 <1> da21: 2723 000049C7 A0[BD87] <1> mov al, [preused] ; = flags that are used 2724 000049CA F6D0 <1> not al ; = flags that are not used 2725 000049CC 2206[BC87] <1> and al, [preflags] ; = flags that are not used but present 2726 000049D0 7503E92B01 <1> jz da28 ; if all present flags were used --> 2727 <1> 2728 000049D5 B90B00 <1> mov cx, N_WTAB 2729 000049D8 BB[9815] <1> mov bx, wtab1 2730 000049DB BA1400 <1> mov dx, 2*N_WTAB-2 2731 000049DE B440 <1> mov ah, PREWAIT 2732 000049E0 84E0 <1> test al, ah 2733 000049E2 7407 <1> jz @F 2734 <1> ; if there's a WAIT prefix hanging 2735 000049E4 E84B00 <1> call da23_wait 2736 000049E7 7572 <1> jne disbad2 2737 000049E9 EBDC <1> jmp da21 2738 <1> 2739 <1> @@: 2740 000049EB B420 <1> mov ah, PREASIZE 2741 000049ED 84E0 <1> test al, ah 2742 000049EF 746D <1> jz da24 ; if it isn't a 67h prefix --> 2743 <1> 2744 <1> ; check whether ASIZE applies to an implicit operand 2745 000049F1 57 <1> push di 2746 000049F2 50 <1> push ax 2747 000049F3 A1[C287] <1> mov ax, [index] 2748 000049F6 84E4 <1> test ah, ah 2749 000049F8 750D <1> jnz .nota32prfx_nz ; opcode index > FF, not in this list --> 2750 000049FA BF[2A11] <1> mov di, a32prfxtab 2751 000049FD AE <1> scasb ; xlatb ? 2752 000049FE 7407 <1> je @F ; yes --> (ZR) 2753 00004A00 24FE <1> and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 2754 00004A02 B90700 <1> mov cx, A32P_LEN - 1 2755 00004A05 F2AE <1> repne scasb ; scan table (low bit cleared) 2756 <1> @@: 2757 <1> .nota32prfx_nz: 2758 00004A07 58 <1> pop ax 2759 00004A08 5F <1> pop di 2760 00004A09 7550 <1> jne .nota32prfx ; not in the list --> 2761 <1> 2762 00004A0B 0826[BD87] <1> or [preused], ah ; mark it as used 2763 00004A0F B104 <1> mov cl, 4 ; (ch = 0 because A32P_LEN < 256) 2764 00004A11 E8C60F <1> call moveover ; make space for "A32 " 2765 00004A14 B84133 <1> mov ax, "A3" 2766 00004A17 E8170E <1> call dis_lowercase ; al = "a" if lowercase option specified 2767 00004A1A A3[2A08] <1> mov word [line_out+MNEMONOFS], ax 2768 00004A1D C706[2C08]3220 <1> mov word [line_out+MNEMONOFS+2], "2 " 2769 00004A23 F606[BE87]20 <1> _386_PM test byte [presizeflags], PRE32A 2770 <1> _386_PM ; do we have 32-bit ASIZE ? 2771 00004A28 7506 <1> _386_PM jnz da21_j0 ; yes, keep a32 (in 16-bit cs) --> 2772 00004A2A C706[2B08]3136 <1> _386_PM mov word [line_out + MNEMONOFS + 1], "16" 2773 <1> ; no, make it a16 (in 32-bit cs) 2774 <1> da21_j0: equ $ 2775 00004A30 EB95 <1> jmp s da21 2776 <1> 2777 <1> .nota32prfx: equ disbad2 2778 <1> 2779 <1> 2780 <1> da23_osize_asize: equ da23 2781 <1> 2782 <1> da23_wait: 2783 <1> %if _PM 2784 00004A32 0826[BE87] <1> or byte [presizeflags], ah 2785 <1> ; Fake that this flag is set for da23's check. 2786 <1> ; If not _PM then presizeflags == preflags and 2787 <1> ; PREWAIT is already set in that variable. 2788 <1> %endif 2789 <1> 2790 <1> ; INP: bx -> array of words to match against word [index] 2791 <1> ; cx = number of array entries 2792 <1> ; ah = preused flag to mark as used if match 2793 <1> ; ah = presizeflags flag to check if in use 2794 <1> ; dx = offset to add to di -> behind matched word 2795 <1> ; OUT: ZR if one of the array entries matched, 2796 <1> ; byte [preused] |= INP:ah 2797 <1> ; if also flag in byte [presizeflags] was set, 2798 <1> ; mnemonic replaced 2799 <1> ; NZ if no entry matched 2800 <1> ; CHG: ax, cx, si 2801 <1> ; 2802 <1> ; Note: If this is called with a 32-bit CS then the 2803 <1> ; OSIZE/ASIZE value in the byte [preflags] is 2804 <1> ; inverted to that in the byte [presizeflags]. 2805 <1> ; As we check the latter, for O16/A16 we will 2806 <1> ; not modify the mnemonics (keeping the 16-bit 2807 <1> ; default mnemonics) but will mark the prefix 2808 <1> ; as used by setting the flag in byte [preused]. 2809 <1> ; If there is no OSIZE/ASIZE in 32-bit CS then 2810 <1> ; the preused flag is also set (which does no 2811 <1> ; harm) and the 32-bit mnemonic is selected. 2812 <1> ; Operation in 16-bit CS has the same result as 2813 <1> ; the prior handling, though it will always 2814 <1> ; scan for the affected opcodes, and set the 2815 <1> ; preused flag even if no prefix is used. 2816 <1> da23: 2817 00004A36 57 <1> push di 2818 00004A37 89DF <1> mov di, bx 2819 00004A39 50 <1> push ax 2820 00004A3A A1[C287] <1> mov ax, [index] 2821 00004A3D F2AF <1> repne scasw 2822 00004A3F 58 <1> pop ax 2823 00004A40 7517 <1> jne .ret ; if not found in the list --> (NZ) 2824 00004A42 0826[BD87] <1> or byte [preused], ah ; mark this (OSIZE, ASIZE or WAIT) prefix as used 2825 00004A46 8426[BE87] <1> test byte [presizeflags], ah 2826 <1> ; is it O32, A32, or is WAIT present ? 2827 00004A4A 740D <1> jz .ret ; no, do not modify mnemonic --> 2828 00004A4C 01D7 <1> add di, dx ; replace the mnemonic with the modified name 2829 00004A4E 8B35 <1> mov si, [di] 2830 00004A50 81C6[9A01] <1> add si, mnlist 2831 00004A54 E8050E <1> call showop ; copy instruction mnemonic 2832 00004A57 38C0 <1> cmp al, al ; ZR 2833 <1> .ret: 2834 00004A59 5F <1> pop di 2835 00004A5A C3 <1> retn 2836 <1> 2837 <1> 2838 <1> da21_j1: equ da21_j0 2839 <1> 2840 <1> disbad2: 2841 00004A5B E9420D <1> jmp disbad 2842 <1> 2843 <1> da24: 2844 00004A5E A801 <1> test al, PRESEG 2845 00004A60 7434 <1> jz da25 ; if not because of a segment prefix --> 2846 00004A62 A1[C287] <1> mov ax, [index] 2847 00004A65 84E4 <1> test ah, ah 2848 00004A67 75F2 <1> jnz disbad2 ; if index > 256, it's none of these --> 2849 00004A69 57 <1> push di 2850 00004A6A B90900 <1> mov cx, SEGP_LEN 2851 00004A6D BF[2211] <1> mov di, segprfxtab 2852 00004A70 F2AE <1> repne scasb 2853 00004A72 5F <1> pop di 2854 00004A73 75E6 <1> jne disbad2 ; if it's not on the list --> 2855 00004A75 B90300 <1> mov cx, 3 2856 00004A78 E85F0F <1> call moveover 2857 00004A7B 57 <1> push di 2858 00004A7C BF[2A08] <1> mov di, line_out+MNEMONOFS 2859 00004A7F E82E0E <1> call showseg ; show segment register 2860 00004A82 B03A <1> mov al, ':' 2861 00004A84 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 2862 00004A89 7402 <1> jz .notnasm 2863 00004A8B B020 <1> mov al, 32 2864 <1> .notnasm: 2865 00004A8D AA <1> stosb 2866 00004A8E 5F <1> pop di 2867 00004A8F 800E[BD87]01 <1> or byte [preused], PRESEG ; mark it as used 2868 <1> da21_j2: 2869 00004A94 EB9A <1> jmp s da21_j1 2870 <1> 2871 <1> da25: 2872 00004A96 A802 <1> test al, PREREP 2873 00004A98 7435 <1> jz da26 ; if not a REP prefix 2874 00004A9A 2406 <1> and al, PREREP|PREREPZ 2875 00004A9C 0806[BD87] <1> or [preused], al 2876 00004AA0 A1[C287] <1> mov ax, [index] 2877 00004AA3 84E4 <1> test ah, ah 2878 00004AA5 7525 <1> jnz disbad3 ; if not in the first 256 bytes 2879 00004AA7 24FE <1> and al, ~1 ; clear the low bit (MOVSW -> MOVSB) 2880 00004AA9 57 <1> push di 2881 00004AAA BF[2B11] <1> mov di, replist 2882 00004AAD B90500 <1> mov cx, REP_SAME_LEN; scan those for REP first 2883 00004AB0 F2AE <1> repne scasb 2884 00004AB2 BE[B709] <1> mov si, mnlist+MN_REP 2885 00004AB5 7439 <1> je da27 ; if one of the REP instructions --> 2886 00004AB7 B102 <1> mov cl, REP_DIFF_LEN; (ch = 0) 2887 00004AB9 F2AE <1> repne scasb 2888 00004ABB 750F <1> jne disbad3 ; if not one of the REPE/REPNE instructions 2889 00004ABD BE[C909] <1> mov si, mnlist+MN_REPE 2890 00004AC0 F606[BD87]04 <1> test byte [preused], PREREPZ 2891 00004AC5 7529 <1> jnz da27 ; if REPE 2892 00004AC7 BE[CF09] <1> mov si, mnlist+MN_REPNE 2893 00004ACA EB24 <1> jmp s da27 ; it's REPNE 2894 <1> 2895 <1> disbad3: 2896 00004ACC E9D10C <1> jmp disbad 2897 <1> 2898 <1> da26: 2899 00004ACF A808 <1> test al, PRELOCK 2900 00004AD1 74F9 <1> jz disbad3 ; if not a lock prefix, either --> 2901 00004AD3 57 <1> push di 2902 00004AD4 A1[C287] <1> mov ax, [index] 2903 00004AD7 BF[D015] <1> mov di, locktab 2904 00004ADA B92E00 <1> mov cx, N_LOCK 2905 00004ADD F2AF <1> repne scasw 2906 00004ADF 75EB <1> jne disbad3 ; if not in the approved list --> 2907 00004AE1 F606[BD87]01 <1> test byte [preused], PRESEG 2908 00004AE6 74E4 <1> jz disbad3 ; if memory was not accessed --> 2909 00004AE8 BE[9307] <1> mov si, mnlist+MN_LOCK 2910 00004AEB 800E[BD87]08 <1> or byte [preused], PRELOCK 2911 <1> 2912 <1> ; Slip in another mnemonic (REP or LOCK). 2913 <1> ; SI = offset of mnemonic, what should be 2914 <1> ; DI is on the stack. 2915 <1> 2916 <1> da27: 2917 00004AF0 5F <1> pop di 2918 00004AF1 B90800 <1> mov cx, 8 2919 00004AF4 56 <1> push si 2920 00004AF5 E8E20E <1> call moveover 2921 00004AF8 5E <1> pop si 2922 00004AF9 57 <1> push di 2923 00004AFA E85F0D <1> call showop 2924 00004AFD 5F <1> pop di 2925 00004AFE EB94 <1> jmp s da21_j2 2926 <1> 2927 <1> ; Done with instruction. Erase the size indicator, if appropriate. 2928 <1> 2929 <1> da28: 2930 00004B00 8B0E[DA87] <1> mov cx, [sizeloc] 2931 00004B04 E324 <1> jcxz da28b ;if there was no size given 2932 00004B06 A0[D687] <1> mov al,[disflags] 2933 00004B09 A810 <1> test al,DIS_I_SHOWSIZ 2934 00004B0B 751D <1> jnz da28b ;if we need to show the size 2935 00004B0D A820 <1> test al,DIS_I_KNOWSIZ 2936 00004B0F 7419 <1> jz da28b ;if the size is not known already 2937 00004B11 87CF <1> xchg cx,di 2938 00004B13 89FE <1> mov si,di ;save old di 2939 00004B15 B020 <1> mov al, 32 2940 <1> da28a: 2941 00004B17 AE <1> scasb ;skip size name 2942 00004B18 75FD <1> jne da28a ;if not done yet 2943 <1> ;(The above is the same as repne scasb, but 2944 <1> ;has no effect on cx.) 2945 00004B1A F606[AC00]04 <1> testopt [asm_options], disasm_nasm 2946 00004B1F 7503 <1> jnz .nasm 2947 00004B21 83C704 <1> add di, byte 4 ;skip 'PTR ' 2948 <1> .nasm: 2949 00004B24 87F7 <1> xchg si,di 2950 00004B26 29F1 <1> sub cx,si 2951 00004B28 F3A4 <1> rep movsb ;move the line 2952 <1> 2953 <1> ; Now we're really done. Print out the bytes on the left. 2954 <1> 2955 <1> da28b: 2956 00004B2A 57 <1> push di ;print start of disassembly line 2957 00004B2B BF[0E08] <1> mov di,line_out 2958 00004B2E A1[220B] <1> mov ax,[u_addr + saSegSel] 2959 <1> ; print address 2960 00004B31 E8066F <1> call hexword 2961 00004B34 B03A <1> mov al,':' 2962 00004B36 AA <1> stosb 2963 00004B37 66 <1> _386_PM_o32 ; mov eax, dword [u_addr] 2964 00004B38 A1[1E0B] <1> mov ax, word [u_addr] 2965 <1> %if _PM 2966 00004B3B F606[DB88]40 <1> test byte [bCSAttr], 40h 2967 00004B40 7403 <1> jz .16 2968 00004B42 E8E96E <1> call hexword_high 2969 <1> .16: 2970 <1> %endif 2971 00004B45 E8F26E <1> call hexword 2972 00004B48 B020 <1> mov al, 32 2973 00004B4A AA <1> stosb 2974 00004B4B 8B1E[B887] <1> mov bx, [dis_n] 2975 <1> da28c: 2976 00004B4F BE[2908] <1> mov si,line_out+MNEMONOFS - 1 2977 00004B52 29FE <1> sub si, di 2978 00004B54 D1EE <1> shr si, 1 2979 00004B56 39F3 <1> cmp bx, si 2980 00004B58 7619 <1> jbe da29 ; if it's a short instruction which fits in one line 2981 00004B5A 29F3 <1> sub bx, si 2982 00004B5C 53 <1> push bx 2983 00004B5D 89F3 <1> mov bx, si 2984 00004B5F 57 <1> push di 2985 00004B60 E85E0E <1> call disshowbytes 2986 00004B63 E80C6F <1> call putsline_crlf 2987 00004B66 59 <1> pop cx 2988 00004B67 5B <1> pop bx 2989 00004B68 BF[0E08] <1> mov di, line_out 2990 00004B6B 29F9 <1> sub cx, di 2991 00004B6D B020 <1> mov al, 32 2992 00004B6F F3AA <1> rep stosb 2993 00004B71 EBDC <1> jmp short da28c 2994 <1> da29: 2995 00004B73 E84B0E <1> call disshowbytes 2996 <1> da30: 2997 00004B76 B020 <1> mov al, 32 ; pad to op code 2998 00004B78 B9[2A08] <1> mov cx,line_out+MNEMONOFS 2999 00004B7B 29F9 <1> sub cx,di 3000 00004B7D 7202 <1> jc da30_1 3001 00004B7F F3AA <1> rep stosb 3002 <1> da30_1: 3003 00004B81 5F <1> pop di 3004 00004B82 F606[D687]08 <1> test byte [disflags],DIS_I_UNUSED 3005 00004B87 740D <1> jz da32 ; if we don't print ` (unused)' 3006 00004B89 BE[2B7A] <1> mov si,unused 3007 00004B8C 807DFF20 <1> cmp byte [di-1], 32 3008 00004B90 7501 <1> jne da31 ; if there's already a space here 3009 00004B92 46 <1> inc si 3010 <1> da31: 3011 00004B93 E8056E <1> call showstring 3012 <1> 3013 <1> ; Print info on minimal processor needed. 3014 <1> 3015 <1> da32: 3016 00004B96 A0[A281] <1> mov al, [dismach] 3017 00004B99 3A06[E60B] <1> cmp al, [maxmachinetype] 3018 00004B9D 7603 <1> jbe @F 3019 00004B9F A2[E60B] <1> mov [maxmachinetype], al 3020 <1> @@: 3021 00004BA2 57 <1> push di 3022 00004BA3 BF[C487] <1> mov di, obsinst 3023 00004BA6 8B0E[C287] <1> mov cx, word [index] 3024 00004BAA E87C0D <1> call showmach ;show the machine type, if needed 3025 00004BAD 5F <1> pop di 3026 00004BAE E30F <1> jcxz da32f_j1 ; if no message --> 3027 <1> 3028 <1> ; Print a message on the far right. 3029 <1> 3030 <1> da32_tabto: 3031 00004BB0 B8[5D08] <1> mov ax, line_out+79 3032 00004BB3 29C8 <1> sub ax, cx 3033 00004BB5 51 <1> push cx 3034 00004BB6 E89E6E <1> call tab_to ; tab out to the location 3035 00004BB9 59 <1> pop cx 3036 00004BBA F3A4 <1> rep movsb ; copy the string 3037 <1> da32z_j1: 3038 00004BBC E97302 <1> jmp da32z ; done 3039 <1> 3040 <1> da32f_j1: 3041 00004BBF EB73 <1> jmp da32f 3042 <1> 3043 <1> %if _COND 3044 <1> ; Try dumping a condition status. 3045 <1> da32_cond: 3046 <1> %if _COND_RDUMP_ONLY 3047 00004BC1 A802 <1> test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 3048 00004BC3 75F7 <1> jnz da32z_j1 ; not showing conditionals message --> 3049 <1> %endif 3050 00004BC5 8B36[DC87] <1> mov si, word [condmsg] 3051 00004BC9 85F6 <1> test si, si ; stored a message here ? 3052 00004BCB 74EF <1> jz da32z_j1 ; no --> 3053 00004BCD 57 <1> push di 3054 00004BCE 89F7 <1> mov di, si 3055 00004BD0 B9FFFF <1> mov cx, -1 3056 00004BD3 31C0 <1> xor ax, ax 3057 00004BD5 F2AE <1> repne scasb 3058 00004BD7 F7D9 <1> neg cx 3059 00004BD9 49 <1> dec cx 3060 00004BDA 49 <1> dec cx ; get string length 3061 00004BDB 5F <1> pop di 3062 00004BDC EBD2 <1> jmp short da32_tabto 3063 <1> %else 3064 <1> da32_cond: equ da32z_j1 3065 <1> %endif 3066 <1> 3067 <1> da32_xlatb: 3068 00004BDE A802 <1> test al, DIS_F_SHOW ; (! DIS_F_SHOW|DIS_I_SHOW is negated here) 3069 00004BE0 75DF <1> jnz da32_cond 3070 00004BE2 803E[CF87]03 <1> _no386 cmp byte [segmnt], 3 3071 00004BE7 77D8 <1> _no386 ja da32_cond ; if FS or GS on non-386 --> (invalid) 3072 00004BE9 F606[BE87]20 <1> _no386 test byte [presizeflags], PRE32A 3073 00004BEE 75D1 <1> _no386 jnz da32_cond 3074 00004BF0 803E[CF87]05 <1> cmp byte [segmnt], 5 3075 00004BF5 77CA <1> ja da32_cond ; if invalid segment --> 3076 00004BF7 813E[C287]D700 <1> cmp word [index], 0D7h ; xlatb ? 3077 00004BFD 75C2 <1> jne da32_cond 3078 00004BFF A1[680C] <1> mov ax, word [reg_ebx] 3079 00004C02 A3[D087] <1> mov word [addrr], ax 3080 00004C05 A1[6A0C] <1> mov ax, word [reg_ebx + 2] 3081 00004C08 A3[D287] <1> mov word [addrr + 2], ax; get address in (e)bx 3082 00004C0B A0[640C] <1> mov al, byte [reg_eax] 3083 00004C0E 0006[D087] <1> add byte [addrr], al 3084 00004C12 8016[D187]00 <1> adc byte [addrr + 1], 0 3085 00004C17 8316[D287]00 <1> adc word [addrr + 2], 0 ; add al 3086 00004C1C C606[CE87]80 <1> mov byte [rmsize], 80h ; byte size 3087 <1> %if _MEMREF_AMOUNT 3088 00004C21 800E[D787]10 <1> setopt [disflags], DIS_I_M_SRC 3089 <1> %endif 3090 00004C26 F606[BE87]20 <1> test byte [presizeflags], PRE32A 3091 00004C2B 7425 <1> jz @F 3092 00004C2D 800E[D787]08 <1> setopt [disflags], DIS_I_SHOW_A32 3093 <1> ; set flag if 32-bit 3094 00004C32 EB1E <1> jmp @F 3095 <1> 3096 <1> 3097 <1> ; Dump referenced memory location. 3098 <1> 3099 <1> da32f: 3100 00004C34 A0[D687] <1> mov al,[disflags] 3101 00004C37 3406 <1> xor al, DIS_F_SHOW | DIS_I_SHOW 3102 00004C39 A886 <1> test al, DIS_F_SHOW | DIS_I_SHOW | DIS_I_DONTSHOW 3103 <1> ; (NZ if either _SHOW is clear, or _DONTSHOW is set) 3104 00004C3B 75A1 <1> jnz da32_xlatb ; if there is no memory location to show --> 3105 00004C3D 803E[CF87]03 <1> _no386 cmp byte [segmnt], 3 3106 00004C42 779A <1> _no386 ja da32_xlatb ; if FS or GS on non-386 --> (invalid) 3107 00004C44 F606[D787]08 <1> _no386 testopt [disflags], DIS_I_SHOW_A32 3108 00004C49 7593 <1> _no386 jnz da32_xlatb 3109 00004C4B 803E[CF87]05 <1> cmp byte [segmnt], 5 3110 00004C50 778C <1> ja da32_xlatb ; if invalid segment --> 3111 <1> @@: 3112 <1> %if _PM 3113 00004C52 50 <1> push ax 3114 <1> %endif 3115 00004C53 A0[CF87] <1> mov al, [segmnt] ; segment number 3116 00004C56 98 <1> cbw 3117 00004C57 D1E0 <1> shl ax, 1 3118 00004C59 93 <1> xchg ax, bx ; mov bx, ax 3119 00004C5A 8B9F[3888] <1> mov bx, [segrgaddr + bx]; get address of value 3120 <1> %if _PM 3121 00004C5E 58 <1> pop ax 3122 00004C5F E89B45 <1> call ispm 3123 00004C62 7508 <1> jnz @F ; if 86 Mode, all segments readable --> 3124 <1> [cpu 286] 3125 00004C64 0F0027 <1> verr word [bx] 3126 00004C67 7403E955FF <1> jnz da32_cond ; (NOT to da32_xlatb) 3127 <1> __CPU__ 3128 <1> @@: 3129 <1> %endif 3130 00004C6C 53 <1> push bx 3131 <1> %if _MEMREF_AMOUNT 3132 00004C6D FF37 <1> push word [bx] ; = segment/selector value 3133 00004C6F E84508 <1> call get_free_memref ; memrefs + bx -> the memref structure 3134 00004C72 8F87[7887] <1> pop word [memrefs + bx + mrSegmentSelector] 3135 00004C76 808F[7A87]02 <1> or byte [memrefs + bx + mrFlags], mrfMem 3136 00004C7B F606[D787]10 <1> testopt [disflags], DIS_I_M_SRC 3137 00004C80 7405 <1> jz @F 3138 00004C82 808F[7A87]04 <1> or byte [memrefs + bx + mrFlags], mrfMemSource 3139 <1> @@: 3140 00004C87 F606[D787]20 <1> testopt [disflags], DIS_I_M_DST 3141 00004C8C 7405 <1> jz @F 3142 00004C8E 808F[7A87]08 <1> or byte [memrefs + bx + mrFlags], mrfMemDest 3143 <1> @@: 3144 <1> %endif 3145 <1> 3146 00004C93 B8[5408] <1> mov ax, line_out + 79 - 9 3147 <1> ; 9 is composed of: 3148 <1> ; 1 additional blank (added to the one that is 3149 <1> ; already given by tab_to in any case) 3150 <1> ; 3 segreg name + colon 3151 <1> ; 4 low word offset 3152 <1> ; 1 equals sign 3153 <1> ; 79 means we write to the very right of an 80-columns 3154 <1> ; display, up to the second-to-last column. 3155 00004C96 B90200 <1> mov cx, 2 ; if byte then content uses 2 digits 3156 <1> %if _MEMREF_AMOUNT 3157 00004C99 C687[7C87]01 <1> mov byte [memrefs + bx + mrLength], 1 3158 <1> ; if byte then length = 1 3159 <1> %endif 3160 00004C9E 803E[CE87]00 <1> cmp byte [rmsize],0 3161 00004CA3 7C10 <1> jl da32h ; if byte 3162 00004CA5 7408 <1> jz da32g ; if word 3163 <1> %if _MEMREF_AMOUNT 3164 00004CA7 8087[7C87]02 <1> add byte [memrefs + bx + mrLength], 2 3165 <1> ; add 2 bytes to length for high half of dword 3166 <1> %endif 3167 00004CAC 83C104 <1> add cx, byte 4 ; add 4 digits for high half of dword 3168 <1> da32g: 3169 <1> %if _MEMREF_AMOUNT 3170 00004CAF FE87[7C87] <1> inc byte [memrefs + bx + mrLength] 3171 <1> ; add 1 byte to length for the high byte 3172 <1> %endif 3173 00004CB3 41 <1> inc cx 3174 00004CB4 41 <1> inc cx ; add 2 digits for the high byte 3175 <1> da32h: 3176 00004CB5 F606[D787]04 <1> testopt [disflags], DIS_I_DOUBLE_M 3177 00004CBA 740B <1> jz @F 3178 <1> %if _MEMREF_AMOUNT 3179 00004CBC 8A97[7C87] <1> mov dl, byte [memrefs + bx + mrLength] 3180 00004CC0 0097[7C87] <1> add byte [memrefs + bx + mrLength], dl 3181 <1> ; double the amount of bytes 3182 <1> %endif 3183 00004CC4 01C9 <1> add cx, cx ; double the amount of digits 3184 00004CC6 41 <1> inc cx ; plus one slot for the comma 3185 <1> @@: 3186 00004CC7 F606[D787]02 <1> testopt [disflags], DIS_I_FAR_M 3187 00004CCC 7408 <1> jz @F 3188 <1> %if _MEMREF_AMOUNT 3189 00004CCE 8087[7C87]02 <1> add byte [memrefs + bx + mrLength], 2 3190 <1> ; add 2 bytes to the length for the segment 3191 <1> %endif 3192 00004CD3 83C105 <1> add cx, 5 ; 4 digits for segment plus 1 colon 3193 <1> @@: 3194 <1> %if _MEMREF_AMOUNT 3195 00004CD6 FF36[D087] <1> push word [addrr] 3196 00004CDA 8F87[7487] <1> pop word [memrefs + bx + mrOffset] 3197 <1> %endif 3198 00004CDE F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3199 00004CE3 7410 <1> jz @F 3200 <1> %if _MEMREF_AMOUNT 3201 00004CE5 FF36[D287] <1> push word [addrr + 2] 3202 00004CE9 8F87[7687] <1> pop word [memrefs + bx + mrOffset + 2] 3203 00004CED 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 3204 <1> %endif 3205 00004CF2 83C104 <1> add cx, 4 ; add 4 digits for high word offset 3206 <1> @@: 3207 <1> %if _MEMREF_AMOUNT 3208 00004CF5 E8DA07 <1> call calc_linear_memref_and_mark_nonfree 3209 <1> %endif 3210 00004CF8 29C8 <1> sub ax, cx 3211 00004CFA E85A6D <1> call tab_to ; CHG: ax, bx, cx, dx, di 3212 00004CFD B020 <1> mov al, 32 3213 00004CFF AA <1> stosb 3214 00004D00 E8A10B <1> call showseg_uppercase_ax 3215 <1> ; ax = segment register name 3216 00004D03 E83D0B <1> call dis_lowercase_refmem_w 3217 00004D06 AB <1> stosw 3218 00004D07 B03A <1> mov al, ':' 3219 00004D09 AA <1> stosb 3220 00004D0A F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3221 00004D0F 7406 <1> jz @F 3222 00004D11 A1[D287] <1> mov ax, [addrr + 2] 3223 00004D14 E8236D <1> call hexword ; show high word of offset 3224 <1> @@: 3225 00004D17 A1[D087] <1> mov ax, [addrr] 3226 00004D1A E81D6D <1> call hexword ; show offset 3227 00004D1D B03D <1> mov al,'=' 3228 00004D1F AA <1> stosb 3229 00004D20 5B <1> pop bx 3230 00004D21 06 <1> push es 3231 00004D22 8E07 <1> mov es, [bx] 3232 00004D24 66 <1> _386_o32 3233 00004D25 8B1E[D087] <1> mov bx, [addrr] 3234 <1> 3235 00004D29 F606[D787]02 <1> testopt [disflags], DIS_I_FAR_M 3236 00004D2E 743D <1> jz .no_far_m 3237 00004D30 BE0100 <1> mov si, 1 3238 00004D33 803E[CE87]00 <1> cmp byte [rmsize], 0 3239 00004D38 7C08 <1> jl @F 3240 00004D3A BE0200 <1> mov si, 2 3241 00004D3D 7403 <1> jz @F 3242 00004D3F BE0400 <1> mov si, 4 3243 <1> @@: 3244 00004D42 F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3245 00004D47 7411 <1> jz @F 3246 <1> [cpu 386] 3247 00004D49 660FB7F6 <1> movzx esi, si 3248 00004D4D 26678A0433 <1> mov al, byte [es:ebx + esi] 3249 00004D52 26678A643301 <1> mov ah, byte [es:ebx + esi + 1] 3250 <1> __CPU__ 3251 00004D58 EB07 <1> jmp @FF 3252 <1> @@: 3253 00004D5A 268A00 <1> mov al, byte [es:bx + si] 3254 00004D5D 268A6001 <1> mov ah, byte [es:bx + si + 1] 3255 <1> @@: 3256 00004D61 8CC6 <1> mov si, es 3257 00004D63 07 <1> pop es 3258 00004D64 06 <1> push es 3259 00004D65 E8D26C <1> call hexword 3260 00004D68 B03A <1> mov al, ':' 3261 00004D6A AA <1> stosb 3262 00004D6B 8EC6 <1> mov es, si 3263 <1> .no_far_m: 3264 <1> 3265 00004D6D 8CC6 <1> mov si, es 3266 00004D6F F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3267 00004D74 741E <1> jz @F 3268 <1> [cpu 386] 3269 00004D76 26678A03 <1> mov al, [es:ebx] ; avoid a "mov ax,[-1]" 3270 00004D7A 803E[CE87]00 <1> cmp byte [rmsize], 0 3271 00004D7F 7C38 <1> jl .displaybyte ; if byte --> 3272 00004D81 26678A6301 <1> mov ah, [es:ebx + 1] 3273 00004D86 742B <1> jz .displayword ; if word --> 3274 00004D88 26678A5302 <1> mov dl, [es:ebx + 2] ; avoid a "mov dx,[-1]" 3275 00004D8D 26678A7303 <1> mov dh, [es:ebx + 3] 3276 <1> __CPU__ 3277 00004D92 EB18 <1> jmp .displaydword ; is dword --> 3278 <1> @@: 3279 00004D94 268A07 <1> mov al, [es:bx] ; avoid a "mov ax,[-1]" 3280 00004D97 803E[CE87]00 <1> cmp byte [rmsize], 0 3281 00004D9C 7C1B <1> jl .displaybyte ; if byte 3282 00004D9E 268A6701 <1> mov ah, [es:bx + 1] 3283 00004DA2 740F <1> jz .displayword ; if word 3284 00004DA4 268A5702 <1> mov dl, [es:bx + 2] ; avoid a "mov dx,[-1]" 3285 00004DA8 268A7703 <1> mov dh, [es:bx + 3] 3286 <1> .displaydword: 3287 00004DAC 07 <1> pop es 3288 00004DAD 92 <1> xchg ax, dx 3289 00004DAE E8896C <1> call hexword 3290 00004DB1 92 <1> xchg ax, dx 3291 00004DB2 A8 <1> db __TEST_IMM8 ; (skip pop) 3292 <1> .displayword: 3293 00004DB3 07 <1> pop es 3294 00004DB4 E8836C <1> call hexword 3295 00004DB7 EB04 <1> jmp short .displayed ; done 3296 <1> .displaybyte: 3297 00004DB9 07 <1> pop es 3298 00004DBA E8846C <1> call hexbyte ; display byte 3299 <1> .displayed: 3300 <1> 3301 00004DBD F606[D787]04 <1> testopt [disflags], DIS_I_DOUBLE_M 3302 00004DC2 746E <1> jz .no_double_m 3303 <1> 3304 00004DC4 B02C <1> mov al, ',' 3305 00004DC6 AA <1> stosb 3306 <1> 3307 00004DC7 06 <1> push es 3308 00004DC8 8EC6 <1> mov es, si 3309 <1> 3310 00004DCA BE0100 <1> mov si, 1 3311 00004DCD 803E[CE87]00 <1> cmp byte [rmsize], 0 3312 00004DD2 7C08 <1> jl @F 3313 00004DD4 BE0200 <1> mov si, 2 3314 00004DD7 7403 <1> jz @F 3315 00004DD9 BE0400 <1> mov si, 4 3316 <1> @@: 3317 00004DDC F606[D787]08 <1> testopt [disflags], DIS_I_SHOW_A32 3318 00004DE1 7426 <1> jz @F 3319 <1> [cpu 386] 3320 00004DE3 660FB7F6 <1> movzx esi, si 3321 00004DE7 26678A0433 <1> mov al, [es:ebx + esi] ; avoid a "mov ax,[-1]" 3322 00004DEC 803E[CE87]00 <1> cmp byte [rmsize], 0 3323 00004DF1 7C3B <1> jl .double_displaybyte ; if byte --> 3324 00004DF3 26678A643301 <1> mov ah, [es:ebx + esi + 1] 3325 00004DF9 742D <1> jz .double_displayword ; if word --> 3326 00004DFB 26678A543302 <1> mov dl, [es:ebx + esi + 2] 3327 <1> ; avoid a "mov dx,[-1]" 3328 00004E01 26678A743303 <1> mov dh, [es:ebx + esi + 3] 3329 <1> __CPU__ 3330 00004E07 EB18 <1> jmp .double_displaydword 3331 <1> @@: 3332 00004E09 268A00 <1> mov al, [es:bx + si] ; avoid a "mov ax,[-1]" 3333 00004E0C 803E[CE87]00 <1> cmp byte [rmsize], 0 3334 00004E11 7C1B <1> jl .double_displaybyte ; if byte --> 3335 00004E13 268A6001 <1> mov ah, [es:bx + si + 1] 3336 00004E17 740F <1> jz .double_displayword ; if word --> 3337 00004E19 268A5002 <1> mov dl, [es:bx + si + 2]; avoid a "mov dx,[-1]" 3338 00004E1D 268A7003 <1> mov dh, [es:bx + si + 3] 3339 <1> .double_displaydword: 3340 00004E21 07 <1> pop es 3341 00004E22 92 <1> xchg ax, dx 3342 00004E23 E8146C <1> call hexword 3343 00004E26 92 <1> xchg ax, dx 3344 00004E27 A8 <1> db __TEST_IMM8 ; (skip pop) 3345 <1> .double_displayword: 3346 00004E28 07 <1> pop es 3347 00004E29 E80E6C <1> call hexword 3348 00004E2C EB04 <1> jmp short .double_displayed 3349 <1> .double_displaybyte: 3350 00004E2E 07 <1> pop es 3351 00004E2F E80F6C <1> call hexbyte ; display byte 3352 <1> .double_displayed: 3353 <1> .no_double_m: 3354 <1> 3355 <1> da32z: 3356 00004E32 E8356C <1> call trimputs ; done with operand list 3357 <1> 3358 <1> %if _MEMREF_AMOUNT 3359 <1> set_string_memref: 3360 00004E35 A1[C287] <1> mov ax, [index] 3361 00004E38 84E4 <1> test ah, ah 3362 00004E3A 7403E9F100 <1> jnz .none 3363 00004E3F BF[EE10] <1> mov di, ppbytes.string ; list of string opcodes 3364 00004E42 B90E00 <1> mov cx, ppbytes.string_amount 3365 00004E45 F2AE <1> repne scasb 3366 00004E47 7403E9E400 <1> jne .none ; if not one of these --> 3367 <1> ; last entries are: 0A6h,0A7h,0AEh,0AFh 3368 <1> ; corresponding to cmpsb, cmpsw/d, scasb, scasw/d 3369 <1> ; so cx = 0 means scasw, = 1 scasb, = 2 cmpsw, = 3 cmpsb 3370 00004E4C 8A451E <1> mov al,byte [di+PPLEN-1]; get corresponding byte in ppinfo 3371 <1> 3372 00004E4F 31D2 <1> xor dx, dx 3373 00004E51 FF36[6C0C] <1> push word [reg_ecx] 3374 00004E55 8F06[B487] <1> pop word [string_memref_counter] 3375 00004E59 F606[BE87]20 <1> test byte [presizeflags], PRE32A 3376 00004E5E 7404 <1> jz @F ; if 16-bit addressing --> 3377 00004E60 8B16[6E0C] <1> mov dx, [reg_ecx + 2] ; = ecxh value 3378 <1> @@: 3379 00004E64 8916[B687] <1> mov word [string_memref_counter + 2], dx 3380 <1> 3381 00004E68 80F904 <1> cmp cl, 4 ; repetition differs for memory content ? 3382 00004E6B 737B <1> jae @F ; no --> 3383 00004E6D F606[BC87]02 <1> test byte [preflags], PREREP 3384 00004E72 7474 <1> jz @F ; if not repeated --> 3385 <1> 3386 00004E74 01C9 <1> add cx, cx ; 0 = scasd, 2 = scasb, 4 = cmpsd, 6 = cmpsb 3387 00004E76 F606[BE87]10 <1> test byte [presizeflags], PRE32D 3388 00004E7B 7501 <1> jnz .iso32 3389 00004E7D 41 <1> inc cx ; point to word entry, not dword 3390 <1> .iso32: 3391 <1> 3392 00004E7E 01C9 <1> add cx, cx ; table entries are words, so 0..14 3393 <1> 3394 00004E80 F606[BC87]04 <1> test byte [preflags], PREREPZ 3395 00004E85 7403 <1> jz .isrepne 3396 00004E87 83C110 <1> add cx, simulate_rep_sca_cmp.table_repe_offset 3397 <1> ; from 0..14 to 16..30 3398 <1> .isrepne: 3399 <1> 3400 00004E8A 89CB <1> mov bx, cx ; = index into table 3401 00004E8C 8B97[7C88] <1> mov dx, word [bx + simulate_rep_sca_cmp.table] 3402 <1> ; function to call 3403 00004E90 F606[BE87]20 <1> test byte [presizeflags], PRE32A 3404 00004E95 7401 <1> jz .isa16 ; if 16-bit addressing --> 3405 00004E97 4A <1> dec dx ; a32 prefix is 1 byte lower than table entry 3406 <1> .isa16: 3407 <1> 3408 00004E98 66 <1> _386_o32 3409 00004E99 8B36[7C0C] <1> mov si, word [reg_esi] 3410 00004E9D 66 <1> _386_o32 3411 00004E9E 8B3E[800C] <1> mov di, word [reg_edi] 3412 00004EA2 66 <1> _386_o32 3413 00004EA3 8B0E[6C0C] <1> mov cx, word [reg_ecx] 3414 00004EA7 8E06[880C] <1> mov es, word [reg_es] 3415 00004EAB 50 <1> push ax 3416 00004EAC A810 <1> test al, PP_STRSRC ; cmps ? 3417 00004EAE 740D <1> jz .issca ; no, no need to load ds --> 3418 <1> 3419 00004EB0 A0[CF87] <1> mov al, [segmnt] ; segment number 3420 00004EB3 98 <1> cbw 3421 00004EB4 D1E0 <1> shl ax, 1 3422 00004EB6 93 <1> xchg ax, bx ; mov bx, ax 3423 00004EB7 8B9F[3888] <1> mov bx, word [segrgaddr + bx] 3424 <1> ; si = address of segment/selector reg 3425 00004EBB 8E1F <1> mov ds, [bx] 3426 <1> 3427 <1> .issca: 3428 00004EBD 66 <1> _386_o32 3429 00004EBE 36A1[640C] <1> mov ax, word [ss:reg_eax] 3430 <1> 3431 00004EC2 36F606[A10C]04 <1> testopt [ss:reg_efl], 400h 3432 <1> ; DF set ? 3433 00004EC8 7401 <1> jz .up 3434 00004ECA FD <1> std 3435 <1> .up: 3436 00004ECB FFD2 <1> call dx ; simulate the repeated string op 3437 00004ECD FC <1> cld 3438 00004ECE 16 <1> push ss 3439 00004ECF 1F <1> pop ds 3440 00004ED0 16 <1> push ss 3441 00004ED1 07 <1> pop es 3442 <1> 3443 00004ED2 6651 <1> _386 push ecx 3444 00004ED4 59 <1> _386 pop cx 3445 00004ED5 5A <1> _386 pop dx 3446 <1> 3447 00004ED6 F606[BE87]20 <1> _386 test byte [presizeflags], PRE32A 3448 00004EDB 7502 <1> _386 jnz .count32 ; if 32-bit addressing --> 3449 00004EDD 31D2 <1> xor dx, dx 3450 <1> .count32: 3451 00004EDF 290E[B487] <1> sub word [string_memref_counter], cx 3452 00004EE3 1916[B687] <1> sbb word [string_memref_counter + 2], dx 3453 <1> 3454 00004EE7 58 <1> pop ax 3455 <1> @@: 3456 <1> 3457 00004EE8 A810 <1> test al, PP_STRSRC 3458 00004EEA 7429 <1> jz .no_src 3459 <1> 3460 00004EEC 803E[CF87]03 <1> _no386 cmp byte [segmnt], 3 3461 00004EF1 7722 <1> _no386 ja .no_src ; if FS or GS on non-386 --> (invalid) 3462 00004EF3 803E[CF87]05 <1> cmp byte [segmnt], 5 3463 00004EF8 771B <1> ja .no_src ; if invalid segment --> 3464 <1> 3465 00004EFA 50 <1> push ax 3466 00004EFB A0[CF87] <1> mov al, [segmnt] ; segment number 3467 00004EFE 98 <1> cbw 3468 00004EFF D1E0 <1> shl ax, 1 3469 00004F01 93 <1> xchg ax, bx ; mov bx, ax 3470 00004F02 58 <1> pop ax 3471 00004F03 8BB7[3888] <1> mov si, word [segrgaddr + bx] 3472 <1> ; si = address of segment/selector reg 3473 00004F07 BF[7C0C] <1> mov di, reg_esi ; di = address of offset reg 3474 00004F0A E80606 <1> call init_string_memref 3475 <1> @@: ; entry: set memref to string source and mark 3476 <1> ; (jump to .none afterwards if al is zero) 3477 00004F0D 808F[7A87]60 <1> or byte [memrefs + bx + mrFlags], mrfString | mrfStringSource 3478 00004F12 E8BD05 <1> call calc_linear_memref_and_mark_nonfree 3479 <1> 3480 <1> .no_src: 3481 00004F15 A828 <1> test al, PP_STRDEST | PP_STRSRC2 3482 00004F17 7417 <1> jz .none 3483 00004F19 BE[880C] <1> mov si, reg_es ; si = address of segment/selector reg 3484 00004F1C BF[800C] <1> mov di, reg_edi ; di = address of offset reg 3485 00004F1F E8F105 <1> call init_string_memref 3486 00004F22 A808 <1> test al, PP_STRSRC2 ; alternative string source ? 3487 00004F24 B000 <1> mov al, 0 ; (cause conditional branch to jump) 3488 00004F26 75E5 <1> jnz @B ; yes, set as string source --> 3489 00004F28 808F[7A87]A0 <1> or byte [memrefs + bx + mrFlags], mrfString | mrfStringDest 3490 00004F2D E8A205 <1> call calc_linear_memref_and_mark_nonfree 3491 <1> 3492 <1> .none: 3493 <1> 3494 <1> %if _DEBUG2 3495 <1> display_memrefs: 3496 <1> mov cx, [memrefs.free] 3497 <1> test cx, cx 3498 <1> jz .none 3499 <1> xor si, si 3500 <1> .loop: 3501 <1> mov bx, si 3502 <1> call get_memref_index_bx 3503 <1> mov ax, word [memrefs + bx + mrFlags] 3504 <1> mov dx, msg.memrefs_branchdirect 3505 <1> test al, mrfBranchDirect 3506 <1> jnz .gotmsg 3507 <1> mov dx, msg.memrefs_stringsource 3508 <1> test al, mrfStringSource 3509 <1> jnz .gotmsg 3510 <1> mov dx, msg.memrefs_stringdest 3511 <1> test al, mrfStringDest 3512 <1> jnz .gotmsg 3513 <1> mov dl, al 3514 <1> and dl, mrfMemSource | mrfMemDest 3515 <1> cmp dl, mrfMemSource | mrfMemDest 3516 <1> mov dx, msg.memrefs_memsourcedest 3517 <1> je .gotmsg 3518 <1> mov dx, msg.memrefs_memsource 3519 <1> test al, mrfMemSource 3520 <1> jnz .gotmsg 3521 <1> mov dx, msg.memrefs_memdest 3522 <1> test al, mrfMemDest 3523 <1> jnz .gotmsg 3524 <1> mov dx, msg.memrefs_mem_unknown 3525 <1> test al, mrfMem 3526 <1> jnz .gotmsg 3527 <1> mov dx, msg.memrefs_unknown 3528 <1> .gotmsg: 3529 <1> call putsz 3530 <1> 3531 <1> mov di, line_out 3532 <1> mov ax, word [memrefs + bx + mrSegmentSelector] 3533 <1> call hexword 3534 <1> push word [memrefs + bx + mrOffset] 3535 <1> mov al, ':' 3536 <1> stosb 3537 <1> %if 1 || _PM 3538 <1> mov ax, word [memrefs + bx + mrOffset + 2] 3539 <1> test byte [memrefs + bx + mrFlags], mrfA32 3540 <1> jz .16 3541 <1> call hexword 3542 <1> .16: 3543 <1> %endif 3544 <1> pop ax 3545 <1> call hexword 3546 <1> push si 3547 <1> push cx 3548 <1> mov si, msg.memrefs_length 3549 <1> call copy_single_counted_string 3550 <1> mov ax, word [memrefs + bx + mrLength + 2] 3551 <1> test ax, ax 3552 <1> jz @F 3553 <1> call hexword 3554 <1> @@: 3555 <1> mov ax, word [memrefs + bx + mrLength] 3556 <1> call hexword 3557 <1> call putsline_crlf 3558 <1> pop cx 3559 <1> pop si 3560 <1> 3561 <1> inc si 3562 <1> dec cx 3563 <1> jnz .loop 3564 <1> .none: 3565 <1> %endif ; _DEBUG2 3566 <1> %endif ; _MEMREF_AMOUNT 3567 <1> 3568 <1> da_repeat: 3569 00004F30 A0[D687] <1> mov al, [disflags] 3570 00004F33 A801 <1> test al, DIS_F_REPT 3571 00004F35 7437 <1> jz @FF ; if not repeating --> 3572 00004F37 A808 <1> test al, DIS_I_UNUSED 3573 00004F39 751A <1> jnz @F ; if " (unused)" was displayed --> 3574 00004F3B A840 <1> test al, DIS_I_MOV_SS 3575 00004F3D A1[C287] <1> mov ax, [index] 3576 00004F40 7405 <1> jz .not_mov_to_ss ; not mov to ss --> 3577 <1> 3578 <1> ; DIS_I_MOV_SS is set, check for wo[index] == 8Eh; 3579 <1> ; as we only want to match move *to* ss, not from (8Ch). 3580 00004F42 3D8E00 <1> cmp ax, 8Eh ; move to seg reg? 3581 00004F45 740E <1> je @F ; yes, it is mov to ss --> 3582 <1> 3583 <1> .not_mov_to_ss: 3584 00004F47 84E4 <1> test ah, ah 3585 00004F49 7524 <1> jnz .not_single_byte_opcode 3586 <1> 3587 00004F4B BF[6C88] <1> mov di, single_byte_opcodes_repeat_disassembly 3588 00004F4E B90F00 <1> mov cx, single_byte_opcodes_repeat_disassembly.length 3589 00004F51 F2AE <1> repne scasb 3590 00004F53 751A <1> jne @FFF 3591 <1> @@: 3592 00004F55 8326[D687]03 <1> and word [disflags], DIS_F_REPT|DIS_F_SHOW 3593 00004F5A FE06[D987] <1> inc byte [disrepeatcount] 3594 00004F5E 803E[D987]10 <1> cmp byte [disrepeatcount], 16 3595 00004F63 7303E988F8 <1> jb disasm.preserve_disrepeatcount 3596 <1> 3597 00004F68 BA[6F70] <1> mov dx, msg.uu_too_many_repeat 3598 00004F6B E8826E <1> call putsz 3599 <1> @@: 3600 00004F6E C3 <1> retn 3601 <1> 3602 <1> @@: 3603 <1> .not_single_byte_opcode: 3604 <1> 3605 00004F6F 8A3E[C087] <1> mov bh, byte [disp8] 3606 00004F73 3DEB00 <1> cmp ax, 0EBh ; unconditional short jump ? 3607 00004F76 74F6 <1> je @BB ; yes, return --> 3608 00004F78 66 <1> _386_PM_o32 ; and dword [dis_n], byte 0 3609 00004F79 8326[B887]00 <1> and word [dis_n], byte 0 3610 00004F7E E8070A <1> call disgetbyte 3611 00004F81 B302 <1> mov bl, 2 ; displacement to skip a jmp short 3612 00004F83 3CEB <1> cmp al, 0EBh ; jmp short ? 3613 00004F85 740F <1> je @F ; yes --> 3614 00004F87 B303 <1> mov bl, 3 ; displacement to skip a 16-bit jmp near 3615 00004F89 3CE9 <1> cmp al, 0E9h ; jmp near ? 3616 00004F8B 75E1 <1> jne @BB ; no, return --> 3617 <1> %if _PM 3618 00004F8D F606[DB88]40 <1> test byte [bCSAttr], 40h ; 32-bit code segment ? 3619 00004F92 7402 <1> jz @F ; no, 16-bit, use displacement 3 --> 3620 00004F94 B305 <1> mov bl, 5 ; displacement to skip a 32-bit jmp near 3621 <1> %endif 3622 <1> @@: 3623 00004F96 38DF <1> cmp bh, bl ; right displacement ? 3624 00004F98 75D4 <1> jne @BBB ; no --> 3625 <1> 3626 00004F9A 8326[D687]03 <1> and word [disflags], DIS_F_REPT|DIS_F_SHOW 3627 00004F9F 8336[DC87]1C <1> xor word [condmsg], (msg.condnotjump + DATASECTIONFIXUP) ^ (msg.condjump + DATASECTIONFIXUP) 3629 00004FA4 E94EF8 <1> jmp disasm.preserve_condmsg_and_disrepeatcount 3630 <1> 3631 <1> 3632 <1> %if _MEMREF_AMOUNT 3633 <1> simulate_rep_sca_cmp: 3634 <1> 3635 00004FA7 67 <1> _386_a32 3636 <1> .repne_scasd: 3637 00004FA8 66 <1> _386_o32 3638 00004FA9 F2 <1> repne 3639 00004FAA AF <1> scasw 3640 00004FAB C3 <1> retn 3641 <1> 3642 00004FAC 67 <1> _386_a32 3643 <1> .repne_scasw: 3644 00004FAD F2AF <1> repne scasw 3645 00004FAF C3 <1> retn 3646 <1> 3647 00004FB0 67 <1> _386_a32 3648 <1> .repne_scasb: 3649 00004FB1 F2AE <1> repne scasb 3650 00004FB3 C3 <1> retn 3651 <1> 3652 00004FB4 67 <1> _386_a32 3653 <1> .repne_cmpsd: 3654 00004FB5 66 <1> _386_o32 3655 00004FB6 F2 <1> repne 3656 00004FB7 A7 <1> cmpsw 3657 00004FB8 C3 <1> retn 3658 <1> 3659 00004FB9 67 <1> _386_a32 3660 <1> .repne_cmpsw: 3661 00004FBA F2A7 <1> repne cmpsw 3662 00004FBC C3 <1> retn 3663 <1> 3664 00004FBD 67 <1> _386_a32 3665 <1> .repne_cmpsb: 3666 00004FBE F2A6 <1> repne cmpsb 3667 00004FC0 C3 <1> retn 3668 <1> 3669 00004FC1 67 <1> _386_a32 3670 <1> .repe_scasd: 3671 00004FC2 66 <1> _386_o32 3672 00004FC3 F3 <1> repe 3673 00004FC4 AF <1> scasw 3674 00004FC5 C3 <1> retn 3675 <1> 3676 00004FC6 67 <1> _386_a32 3677 <1> .repe_scasw: 3678 00004FC7 F3AF <1> repe scasw 3679 00004FC9 C3 <1> retn 3680 <1> 3681 00004FCA 67 <1> _386_a32 3682 <1> .repe_scasb: 3683 00004FCB F3AE <1> repe scasb 3684 00004FCD C3 <1> retn 3685 <1> 3686 00004FCE 67 <1> _386_a32 3687 <1> .repe_cmpsd: 3688 00004FCF 66 <1> _386_o32 3689 00004FD0 F3 <1> repe 3690 00004FD1 A7 <1> cmpsw 3691 00004FD2 C3 <1> retn 3692 <1> 3693 00004FD3 67 <1> _386_a32 3694 <1> .repe_cmpsw: 3695 00004FD4 F3A7 <1> repe cmpsw 3696 00004FD6 C3 <1> retn 3697 <1> 3698 00004FD7 67 <1> _386_a32 3699 <1> .repe_cmpsb: 3700 00004FD8 F3A6 <1> repe cmpsb 3701 00004FDA C3 <1> retn 3702 <1> 3703 <1> 3704 <1> usesection lDEBUG_DATA_ENTRY 3705 0000887B 00 <1> align 2, db 0 3706 <1> .table: 3707 0000887C [A84F] <1> dw .repne_scasd 3708 0000887E [AD4F] <1> dw .repne_scasw 3709 00008880 [B14F] <1> dw .repne_scasb 3710 00008882 [B14F] <1> dw .repne_scasb 3711 00008884 [B54F] <1> dw .repne_cmpsd 3712 00008886 [BA4F] <1> dw .repne_cmpsw 3713 00008888 [BE4F] <1> dw .repne_cmpsb 3714 0000888A [BE4F] <1> dw .repne_cmpsb 3715 <1> .table_repe_offset: equ $ - .table 3716 0000888C [C24F] <1> dw .repe_scasd 3717 0000888E [C74F] <1> dw .repe_scasw 3718 00008890 [CB4F] <1> dw .repe_scasb 3719 00008892 [CB4F] <1> dw .repe_scasb 3720 00008894 [CF4F] <1> dw .repe_cmpsd 3721 00008896 [D44F] <1> dw .repe_cmpsw 3722 00008898 [D84F] <1> dw .repe_cmpsb 3723 0000889A [D84F] <1> dw .repe_cmpsb 3724 <1> 3725 <1> usesection lDEBUG_CODE 3726 <1> %endif 3727 <1> 3728 <1> 3729 <1> ; Here are the routines for printing out the operands themselves. 3730 <1> ; Immediate data (OP_IMM) 3731 <1> 3732 <1> dop_imm: 3733 00004FDB 80FC00 <1> cmp ah, 0 3734 00004FDE 7C17 <1> jl dop03 ; if just a byte --> 3735 00004FE0 9C <1> pushf 3736 00004FE1 F606[D687]10 <1> test byte [disflags], DIS_I_SHOWSIZ 3737 00004FE6 7403 <1> jz .nosize ; if we don't need to show the size --> 3738 00004FE8 E8CD08 <1> call showsize 3739 <1> .nosize: 3740 00004FEB E8B609 <1> call disgetword 3741 00004FEE 9D <1> popf ; ZF 3742 00004FEF 7503E9466A <1> je hexword ; if just a word 3743 00004FF4 E90D09 <1> jmp disp32.ax 3744 <1> 3745 <1> dop03: 3746 00004FF7 E88E09 <1> call disgetbyte ; print immediate byte 3747 00004FFA E9446A <1> jmp hexbyte 3748 <1> 3749 <1> 3750 <1> ; Memory offset reference (OP_MOFFS) 3751 <1> 3752 <1> dop_moffs: 3753 00004FFD B005 <1> mov al, 5 3754 00004FFF F606[BE87]20 <1> test byte [presizeflags], PRE32A 3755 00005004 7501 <1> jnz .32 ; if 32-bit addressing --> 3756 00005006 40 <1> inc ax 3757 <1> .32: 3758 00005007 A2[9C81] <1> mov [regmem], al 3759 0000500A EB0A <1> jmp s dop05 3760 <1> 3761 <1> 3762 <1> ; MOD R/M (OP_RM) 3763 <1> 3764 <1> dop_rm: 3765 0000500C E80508 <1> call getregmem 3766 0000500F 3CC0 <1> cmp al,0c0h 3767 00005011 7203E93F02 <1> jae dop33 ; if pure register reference --> 3768 <1> 3769 <1> dop05: ; <--- used by OP_M, OP_M64, OP_M80, OP_MOFFS 3770 00005016 8826[CE87] <1> mov byte [rmsize], ah ; save r/m size 3771 0000501A F606[D787]01 <1> testopt [disflags], DIS_I_NOSIZ 3772 0000501F 7506 <1> jnz @F 3773 00005021 E89408 <1> call showsize ; print out size 3774 00005024 E8C808 <1> call showptr ; append "PTR " (if not NASM syntax) 3775 <1> @@: 3776 <1> dop06: ; <--- used by OP_MXX, OP_MFLOAT, OP_MDOUBLE 3777 00005027 800E[BD87]01 <1> or byte [preused],PRESEG ; needed even if there's no segment override 3778 <1> ; because handling of LOCK prefix relies on it 3779 0000502C B05B <1> mov al, '[' 3780 0000502E E80202 <1> call stosb_nasm 3781 <1> 3782 00005031 F606[BC87]01 <1> test byte [preflags],PRESEG 3783 00005036 7406 <1> jz dop07 ;if no segment override 3784 00005038 E87508 <1> call showseg ;print segment name 3785 0000503B B03A <1> mov al,':' 3786 0000503D AA <1> stosb 3787 <1> dop07: 3788 0000503E A0[9C81] <1> mov al,[regmem] 3789 00005041 24C7 <1> and al,0c7h 3790 00005043 800E[BD87]20 <1> or byte [preused],PREASIZE 3791 00005048 F606[BE87]20 <1> test byte [presizeflags],PRE32A 3792 0000504D 7403E9AF00 <1> jnz dop18 ;if 32-bit addressing 3793 00005052 800E[D687]04 <1> or byte [disflags],DIS_I_SHOW ;we'd like to show this address 3794 00005057 8326[D087]00 <1> and word [addrr], 0 ; zero out the address initially 3795 0000505C 93 <1> xchg ax,bx ;mov bx,ax 3796 0000505D E8C601 <1> call store_opensqubracket 3797 00005060 80FB06 <1> cmp bl,6 3798 00005063 7503E98B00 <1> je dop16 ;if [xxxx] 3799 00005068 83E307 <1> and bx,7 3800 0000506B 8A9F[EA87] <1> mov bl,[rmtab+bx] 3801 0000506F F6C308 <1> test bl,8 3802 00005072 7525 <1> jnz dop09 ;if BX 3803 00005074 F6C304 <1> test bl,4 3804 00005077 7436 <1> jz dop11 ;if not BP 3805 00005079 B84250 <1> mov ax,'BP' 3806 0000507C 8B0E[780C] <1> mov cx,[reg_ebp] 3807 00005080 E80A00 <1> call da_set_default_ss 3808 00005083 EB1B <1> jmp dop10 3809 <1> 3810 <1> 3811 <1> ; INP: al = 2 * register number 3812 <1> ; [preflags] & PRESEG set if segment overridden 3813 <1> ; else, 3814 <1> ; byte [segmnt] = initialised to 3 (ds) 3815 <1> ; OUT: no action if register number not for esp or ebp 3816 <1> ; no action if segment overridden 3817 <1> ; otherwise, 3818 <1> ; byte [segmnt] -= 1, resulting in 2 (ss) 3819 <1> da_set_default_ss_if_esp_ebp: 3820 00005085 3C08 <1> cmp al, 2 * 4 3821 00005087 7404 <1> je @F 3822 00005089 3C0A <1> cmp al, 2 * 5 3823 0000508B 750B <1> jne @FF 3824 <1> @@: 3825 <1> da_set_default_ss: 3826 0000508D F606[BC87]01 <1> test byte [preflags], PRESEG 3827 00005092 7504 <1> jnz @F ; if segment override --> 3828 00005094 FE0E[CF87] <1> dec byte [segmnt] ; default is now SS 3829 <1> @@: 3830 00005098 C3 <1> retn 3831 <1> 3832 <1> 3833 <1> dop09: 3834 00005099 B84258 <1> mov ax,'BX' ;BX 3835 0000509C 8B0E[680C] <1> mov cx,[reg_ebx] 3836 <1> 3837 <1> dop10: 3838 000050A0 890E[D087] <1> mov [addrr],cx ;print it out, etc. 3839 000050A4 E80C08 <1> call dis_stosw_lowercase 3840 000050A7 F6C303 <1> test bl,2+1 3841 000050AA 741C <1> jz dop13 ;if done 3842 000050AC B02B <1> mov al,'+' 3843 000050AE AA <1> stosb 3844 <1> dop11: 3845 000050AF B85349 <1> mov ax,'SI' 3846 000050B2 8B0E[7C0C] <1> mov cx,[reg_esi] 3847 000050B6 F6C301 <1> test bl,1 3848 000050B9 7406 <1> jz dop12 ;if SI 3849 000050BB B044 <1> mov al,'D' ;DI 3850 000050BD 8B0E[800C] <1> mov cx,[reg_edi] 3851 <1> 3852 <1> dop12: 3853 000050C1 010E[D087] <1> add [addrr], cx ; print it out, etc. 3854 000050C5 E8EB07 <1> call dis_stosw_lowercase 3855 <1> dop13: 3856 000050C8 F606[9C81]C0 <1> test byte [regmem], 0C0h 3857 000050CD 742E <1> jz s dop17 ; if no displacement --> 3858 000050CF F606[9C81]80 <1> test byte [regmem], 80h 3859 000050D4 751A <1> jnz dop15 ; if word displacement --> 3860 000050D6 E8AF08 <1> call disgetbyte 3861 000050D9 98 <1> cbw 3862 000050DA 0106[D087] <1> add [addrr], ax 3863 000050DE 3C00 <1> cmp al, 0 3864 000050E0 B42B <1> mov ah, '+' 3865 000050E2 7D04 <1> jge dop14 ; if not negative --> 3866 000050E4 B42D <1> mov ah, '-' 3867 000050E6 F6D8 <1> neg al 3868 <1> dop14: 3869 000050E8 8825 <1> mov [di], ah 3870 000050EA 47 <1> inc di 3871 000050EB E85369 <1> call hexbyte ; print the byte displacement 3872 000050EE EB0D <1> jmp s dop17 ; done --> 3873 <1> 3874 <1> dop15: 3875 000050F0 B02B <1> mov al, '+' 3876 000050F2 AA <1> stosb 3877 <1> dop16: 3878 000050F3 E8AE08 <1> call disgetword 3879 000050F6 0106[D087] <1> add [addrr], ax 3880 000050FA E83D69 <1> call hexword ; print word displacement 3881 <1> 3882 <1> dop17: 3883 000050FD B05D <1> mov al, ']' 3884 000050FF AA <1> stosb 3885 00005100 C3 <1> retn 3886 <1> 3887 <1> ; 32-bit MOD REG R/M addressing. 3888 <1> 3889 <1> dop18: 3890 00005101 810E[D687]0408 <1> or word [disflags], DIS_I_SHOW | DIS_I_SHOW_A32 3891 00005107 8326[D087]00 <1> and word [addrr], 0 3892 0000510C 8326[D287]00 <1> and word [addrr + 2], 0 ; zero out the address initially 3893 00005111 3C05 <1> cmp al, 5 ; mod=0 and r/m=5 ? 3894 00005113 7503E98200 <1> je dop19 ; yes, just a disp32 address --> 3895 00005118 50 <1> push ax 3896 00005119 2407 <1> and al, 7 3897 0000511B 3C04 <1> cmp al, 4 3898 0000511D 7506 <1> jne dop20 ; if no SIB --> 3899 0000511F E86608 <1> call disgetbyte ; get and save it 3900 00005122 A2[9D81] <1> mov [sibbyte], al 3901 <1> dop20: 3902 00005125 58 <1> pop ax 3903 00005126 A880 <1> test al, 80h 3904 00005128 7538 <1> jnz dop22 ; if disp32 --> 3905 0000512A A840 <1> test al, 40h 3906 0000512C 743A <1> jz dop23 ; if no disp8 --> 3907 0000512E E85708 <1> call disgetbyte 3908 <1> 3909 00005131 98 <1> cbw 3910 00005132 99 <1> cwd 3911 00005133 0106[D087] <1> add word [addrr], ax 3912 00005137 1116[D287] <1> adc word [addrr + 2], dx 3913 <1> 3914 0000513B 3C00 <1> cmp al, 0 3915 0000513D 7D06 <1> jge dop21 ; if not negative --> 3916 0000513F F6D8 <1> neg al 3917 00005141 C6052D <1> mov byte [di], '-' 3918 00005144 47 <1> inc di 3919 <1> dop21: 3920 00005145 E8F968 <1> call hexbyte 3921 00005148 EB1B <1> jmp s dop22a ; done --> 3922 <1> 3923 <1> disp32_add_to_addrr: 3924 0000514A E85708 <1> call disgetword 3925 0000514D 0106[D087] <1> add word [addrr], ax 3926 00005151 50 <1> push ax 3927 00005152 9C <1> pushf 3928 00005153 E84E08 <1> call disgetword 3929 00005156 9D <1> popf 3930 00005157 1106[D287] <1> adc word [addrr + 2], ax 3931 0000515B E8DC68 <1> call hexword 3932 0000515E 58 <1> pop ax 3933 0000515F E9D868 <1> jmp hexword 3934 <1> 3935 <1> dop22: 3936 00005162 E8E5FF <1> call disp32_add_to_addrr 3937 <1> ; print disp32 3938 <1> 3939 <1> dop22a: 3940 00005165 E8C900 <1> call store_plus 3941 <1> 3942 <1> dop23: 3943 00005168 A0[9C81] <1> mov al,[regmem] 3944 0000516B 2407 <1> and al,7 3945 0000516D 3C04 <1> cmp al,4 3946 0000516F 7403E99800 <1> jne dop28 ;if no SIB 3947 00005174 A0[9D81] <1> mov al, [sibbyte] 3948 00005177 88C4 <1> mov ah, al 3949 00005179 250738 <1> and ax, 00_111_000_00_000_111b 3950 <1> ; ah = index << 3, al = base 3951 0000517C 80FC20 <1> cmp ah, 4 << 3 ; index encodes esp ? 3952 0000517F 7414 <1> je dop_sib_index_4 ; yes, use base only --> 3953 <1> ; When this branch is taken, the scale is ignored. 3954 <1> ; This is typically used only for encoding [esp] 3955 <1> ; and [esp + x] but is a valid encoding even for 3956 <1> ; other base registers. So better support it. 3957 <1> ; (This used to be a special case for SIB == 24h 3958 <1> ; only because it doesn't usually occur else. 3959 <1> ; The other cases were rejected in dop25.) 3960 <1> 3961 00005181 E80700 <1> call dop_is_mod_0_and_base_5 3962 00005184 7539 <1> jnz dop24 ; if not mod=0 base=5 --> 3963 00005186 E8C1FF <1> call disp32_add_to_addrr; show 32-bit displacement instead of [EBP] 3964 00005189 EB45 <1> jmp dop25 ; and handle the scale and index --> 3965 <1> 3966 <1> 3967 <1> ; INP: al = low 3 bits of SIB byte (= base) 3968 <1> ; byte [regmem] = ModR/M byte 3969 <1> ; OUT: NZ if not mod=0 base=5 special case 3970 <1> ; ZR else 3971 <1> ; REM: base=5 usually encodes [ebp], and mod=0 3972 <1> ; usually encodes no displacement field. 3973 <1> ; If both are true however, then the 3974 <1> ; special case is true: there is no base 3975 <1> ; register and a 32-bit displacement. 3976 <1> dop_is_mod_0_and_base_5: 3977 0000518B 3C05 <1> cmp al, 5 3978 0000518D 7505 <1> jne @F ; NZ if not base=5 --> 3979 0000518F F606[9C81]C0 <1> test byte [regmem], 1100_0000b 3980 <1> ; NZ if not mod=0 3981 <1> @@: 3982 00005194 C3 <1> retn 3983 <1> 3984 <1> 3985 <1> dop_sib_index_4: 3986 <1> ; The mod=0 base=5 special case and the 3987 <1> ; index=4 special case can occur both 3988 <1> ; together. That is a SIB encoding of 3989 <1> ; a 32-bit displacement without any 3990 <1> ; index or base registers. 3991 <1> ; 3992 <1> ; This was noted on stackoverflow.com by 3993 <1> ; Peter Cordes: "x86-32 has 2 redundant 3994 <1> ; ways to encode [0x123456], i.e. no-base 3995 <1> ; + disp32: with or without a SIB byte, 3996 <1> ; because SIB has an encoding for no-base 3997 <1> ; and no-index." (There is a use for this 3998 <1> ; distinction and thus the SIB form only 3999 <1> ; in 64-bit mode but it is accepted as a 4000 <1> ; valid alternative encoding even for us.) 4001 <1> ; 4002 <1> ; - https://stackoverflow.com/questions/48124293/can-rip-be-used-with-another-register-with-rip-relative-addressing/48125453#48125453 4003 00005195 E8F3FF <1> call dop_is_mod_0_and_base_5 4004 00005198 7572 <1> jnz dop28 ; if not mod=0 base=5 --> 4005 <1> ; fall through to dop19 4006 <1> 4007 <1> dop19: 4008 0000519A E88900 <1> call store_opensqubracket 4009 0000519D E8AAFF <1> call disp32_add_to_addrr 4010 <1> ; display 32-bit offset 4011 <1> dop17_j1: 4012 000051A0 E95AFF <1> jmp dop17 4013 <1> 4014 <1> add_reg32_to_addrr: 4015 000051A3 B90100 <1> mov cx, 1 4016 <1> add_reg32_times_cx_to_addrr: 4017 000051A6 50 <1> push ax 4018 000051A7 53 <1> push bx 4019 000051A8 93 <1> xchg ax, bx 4020 000051A9 8B9F[2888] <1> mov bx, word [reg32addr + bx] 4021 <1> @@: 4022 000051AD 8B07 <1> mov ax, word [bx] 4023 000051AF 0106[D087] <1> add word [addrr], ax 4024 000051B3 8B4702 <1> mov ax, word [bx + 2] 4025 000051B6 1106[D287] <1> adc word [addrr + 2], ax 4026 000051BA E2F1 <1> loop @B 4027 000051BC 5B <1> pop bx 4028 000051BD 58 <1> pop ax 4029 000051BE C3 <1> retn 4030 <1> 4031 <1> dop24: 4032 000051BF E85800 <1> call store_opensqubracket_e 4033 000051C2 E84A07 <1> call showreg16 ; show 16-bit register name (number in AL) 4034 000051C5 E8BDFE <1> call da_set_default_ss_if_esp_ebp 4035 000051C8 E8D8FF <1> call add_reg32_to_addrr 4036 000051CB B05D <1> mov al, ']' 4037 000051CD E85800 <1> call stosb_notnasm 4038 <1> dop25: 4039 000051D0 E85E00 <1> call store_plus 4040 <1> 4041 000051D3 A0[9D81] <1> mov al, [sibbyte] 4042 000051D6 E83406 <1> call da_get_bits_3_to_5 ; al = index 4043 <1> ; (In dop23 we already checked this is not = 4 4044 <1> ; which is a special escaping encoding.) 4045 <1> 4046 000051D9 E83E00 <1> call store_opensqubracket_e 4047 <1> 4048 000051DC 8A26[9D81] <1> mov ah, [sibbyte] 4049 000051E0 B90100 <1> mov cx, 1 4050 000051E3 F6C4C0 <1> test ah, 0C0h 4051 000051E6 740F <1> jz @F 4052 000051E8 41 <1> inc cx 4053 000051E9 F6C480 <1> test ah, 80h 4054 000051EC 7409 <1> jz @F 4055 000051EE B104 <1> mov cl, 4 4056 000051F0 F6C440 <1> test ah, 40h 4057 000051F3 7402 <1> jz @F 4058 000051F5 B108 <1> mov cl, 8 4059 <1> @@: 4060 <1> 4061 000051F7 E81507 <1> call showreg16 4062 000051FA 51 <1> push cx 4063 000051FB E8A8FF <1> call add_reg32_times_cx_to_addrr 4064 000051FE 59 <1> pop cx 4065 000051FF 49 <1> dec cx ; = 0-based scale 4066 00005200 7408 <1> jz dop27 ; if scale == 1 (S=00b) --> 4067 00005202 B02A <1> mov al, '*' 4068 00005204 AA <1> stosb 4069 00005205 88C8 <1> mov al, cl 4070 00005207 0431 <1> add al, '1' ; from 0-based to '1'-based 4071 <1> dop26: 4072 00005209 AA <1> stosb 4073 <1> dop27: 4074 <1> dop17_j2: 4075 0000520A EB94 <1> jmp s dop17_j1 4076 <1> 4077 <1> ; 32-bit addressing without SIB 4078 <1> 4079 <1> dop28: 4080 0000520C E80B00 <1> call store_opensqubracket_e 4081 0000520F E8FD06 <1> call showreg16 4082 00005212 E870FE <1> call da_set_default_ss_if_esp_ebp 4083 00005215 E88BFF <1> call add_reg32_to_addrr 4084 00005218 EBF0 <1> jmp short dop27 4085 <1> 4086 <1> ; Store '[' if not NASM syntax, 4087 <1> ; then (regardless of syntax) store 'E' 4088 <1> ; INP: di-> buffer 4089 <1> ; OUT: di-> behind "[E" or 'E' 4090 <1> ; CHG: - 4091 <1> ; 4092 <1> ; The 'E' is lowercased if that option is selected. 4093 <1> store_opensqubracket_e: 4094 0000521A 50 <1> push ax 4095 0000521B E80800 <1> call store_opensqubracket 4096 0000521E B045 <1> mov al, 'E' 4097 00005220 E80E06 <1> call dis_lowercase 4098 00005223 AA <1> stosb 4099 00005224 58 <1> pop ax 4100 00005225 C3 <1> retn 4101 <1> 4102 <1> ; Store '[' if not NASM syntax 4103 <1> ; INP: di-> buffer 4104 <1> ; OUT: di-> behind '[' if not NASM syntax 4105 <1> ; CHG: al 4106 <1> store_opensqubracket: 4107 00005226 B05B <1> mov al, '[' 4108 <1> 4109 <1> ; Store al if not NASM syntax 4110 <1> ; INP: di-> buffer 4111 <1> ; OUT: di-> behind stored byte if not NASM syntax 4112 <1> ; CHG: - 4113 <1> stosb_notnasm: 4114 00005228 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 4115 0000522D 7501 <1> jnz .ret 4116 0000522F AA <1> stosb 4117 00005230 C3 <1> .ret: retn 4118 <1> 4119 <1> ; Store '+' if NASM syntax 4120 <1> ; INP: di-> buffer 4121 <1> ; OUT: di-> behind '+' if NASM syntax 4122 <1> ; CHG: al 4123 <1> store_plus: 4124 00005231 B02B <1> mov al, '+' 4125 <1> 4126 <1> ; Store al if NASM syntax 4127 <1> ; INP: di-> buffer 4128 <1> ; OUT: di-> behind stored byte if NASM syntax 4129 <1> ; CHG: - 4130 <1> stosb_nasm: 4131 00005233 F606[AC00]04 <1> testopt [asm_options], disasm_nasm 4132 00005238 7401 <1> jz .ret 4133 0000523A AA <1> stosb 4134 0000523B C3 <1> .ret: retn 4135 <1> 4136 <1> 4137 <1> ; Memory-only reference (OP_M) 4138 <1> 4139 <1> dop_m: 4140 0000523C E8D505 <1> call getregmem 4141 0000523F 3CC0 <1> cmp al, 0C0h 4142 00005241 7303E9D0FD <1> jb dop05 ; if it's what we expect --> 4143 <1> 4144 <1> ; it's a register reference 4145 00005246 E95705 <1> disbad1:jmp disbad ; this is not supposed to happen --> 4146 <1> 4147 <1> ; Register reference from MOD R/M part (OP_R_MOD) 4148 <1> 4149 <1> dop_r_mod: 4150 00005249 E8C805 <1> call getregmem 4151 0000524C 3CC0 <1> cmp al,0c0h 4152 0000524E 72F6 <1> jb disbad1 ;if it's a memory reference 4153 00005250 EB03 <1> jmp s dop33 4154 <1> 4155 <1> ; Pure register reference (OP_R) 4156 <1> 4157 <1> dop_r: 4158 00005252 E8B505 <1> call getregmem_r 4159 <1> 4160 <1> dop33: ; <--- used by OP_RM, OP_R_MOD and OP_R_ADD 4161 00005255 2407 <1> and al,7 ;entry point for regs from MOD R/M, and others 4162 00005257 8A0E[D887] <1> mov cl,[disflags2] 4163 0000525B 080E[D687] <1> or [disflags],cl ;if it was variable size operand, the size 4164 <1> ;should now be marked as known. 4165 0000525F 80FC00 <1> cmp ah,0 4166 00005262 7C11 <1> jl dop35 ;if byte register 4167 00005264 740D <1> jz dop34 ;if word register 4168 <1> dop33a: 4169 00005266 80FC20 <1> cmp ah, 20h ; qword register (MMX) ? 4170 00005269 7415 <1> je dop35_1 ; --> 4171 0000526B 50 <1> push ax 4172 0000526C B045 <1> mov al, 'E' 4173 0000526E E8C005 <1> call dis_lowercase 4174 00005271 AA <1> stosb 4175 00005272 58 <1> pop ax 4176 <1> ;mov byte [di],'E' ;enter here from OP_ECX 4177 <1> ;inc di 4178 <1> dop34: 4179 00005273 0408 <1> add al,8 4180 <1> dop35: 4181 00005275 98 <1> cbw 4182 00005276 D1E0 <1> shl ax,1 4183 00005278 93 <1> xchg ax,bx ;mov bx,ax 4184 00005279 8B87[F287] <1> mov ax,[rgnam816+bx];get the register name 4185 0000527D E93306 <1> jmp dis_stosw_lowercase 4186 <1> 4187 <1> dop35_1: 4188 00005280 50 <1> push ax 4189 00005281 B84D4D <1> mov ax, "MM" 4190 00005284 E82C06 <1> call dis_stosw_lowercase 4191 00005287 58 <1> pop ax 4192 00005288 0430 <1> add al, '0' 4193 0000528A AA <1> stosb 4194 0000528B C3 <1> retn 4195 <1> 4196 <1> ; Register number embedded in the instruction (OP_R_ADD) 4197 <1> 4198 <1> dop_r_add: 4199 0000528C A0[BF87] <1> mov al,[instru] 4200 0000528F EBC4 <1> jmp s dop33 4201 <1> 4202 <1> ; AL or AX or EAX (OP_AX) 4203 <1> 4204 <1> dop_ax: 4205 00005291 B000 <1> mov al,0 4206 00005293 EBC0 <1> jmp s dop33 4207 <1> 4208 <1> ; QWORD mem (OP_M64) 4209 <1> ; This operand type is used by CMPXCHG8B, FILD and FISTP. 4210 <1> dop_m64: 4211 <1> ;mov ax, 'Q' ; print "QWORD" 4212 00005295 B420 <1> mov ah, 20h ; size QWORD 4213 00005297 EB35 <1> jmp s dop40 4214 <1> 4215 <1> ; FLOAT (=REAL4) mem (OP_MFLOAT) 4216 <1> dop_mfloat: 4217 00005299 B8464C <1> mov ax, "FL" 4218 0000529C E81406 <1> call dis_stosw_lowercase 4219 0000529F B84F41 <1> mov ax, "OA" 4220 000052A2 E80E06 <1> call dis_stosw_lowercase 4221 000052A5 B85420 <1> mov ax, "T " 4222 000052A8 EB15 <1> jmp short dop38c 4223 <1> 4224 <1> ; DOUBLE (=REAL8) mem (OP_MDOUBLE). 4225 <1> 4226 <1> dop_mdouble: 4227 000052AA B8444F <1> mov ax, "DO" 4228 000052AD E80306 <1> call dis_stosw_lowercase 4229 000052B0 B85542 <1> mov ax, "UB" 4230 000052B3 E8FD05 <1> call dis_stosw_lowercase 4231 000052B6 B04C <1> mov al, 'L' 4232 000052B8 E87605 <1> call dis_lowercase 4233 000052BB AA <1> stosb 4234 000052BC B84520 <1> mov ax, "E " 4235 <1> dop38c: 4236 000052BF E8F105 <1> call dis_stosw_lowercase 4237 000052C2 E82A06 <1> call showptr 4238 000052C5 EB1B <1> jmp s dop42a 4239 <1> 4240 <1> ; TBYTE (=REAL10) mem (OP_M80). 4241 <1> 4242 <1> dop_m80: 4243 000052C7 B854FF <1> mov ax,0FF00h+'T' ;print 'T' + "BYTE" 4244 000052CA E86405 <1> call dis_lowercase 4245 000052CD AA <1> stosb 4246 <1> dop40: 4247 000052CE E84305 <1> call getregmem 4248 000052D1 3CC0 <1> cmp al,0c0h 4249 000052D3 7317 <1> jae disbad5 ; if it's a register reference 4250 000052D5 800E[D687]80 <1> or byte [disflags], DIS_I_DONTSHOW 4251 <1> ; don't show this 4252 000052DA E939FD <1> jmp dop05 4253 <1> 4254 <1> %if 0 4255 <1> ; Far memory (OP_FARMEM). 4256 <1> ; This is either a FAR16 (DWORD) or FAR32 (FWORD) pointer. 4257 <1> dop_farmem: 4258 <1> call dischk32d 4259 <1> jz dop41a ; if not dword far 4260 <1> call showdword 4261 <1> dop41a: 4262 <1> mov ax, "FA" ; store "FAR " 4263 <1> call dis_stosw_lowercase 4264 <1> mov ax, "R " 4265 <1> call dis_stosw_lowercase 4266 <1> %endif 4267 <1> 4268 <1> ; mem (OP_MXX). 4269 <1> 4270 <1> dop_mxx: 4271 000052DD 800E[D687]80 <1> or byte [disflags], DIS_I_DONTSHOW 4272 <1> ; don't show this 4273 <1> dop42a: 4274 000052E2 E82F05 <1> call getregmem 4275 000052E5 3CC0 <1> cmp al,0c0h 4276 000052E7 7303E93BFD <1> jb dop06 ; mem ref, don't show size --> 4277 <1> disbad5: 4278 000052EC E9B104 <1> jmp disbad 4279 <1> 4280 <1> ; Far immediate (OP_FARP). Either FAR16 or FAR32. 4281 <1> dop_farimm: 4282 000052EF E8B206 <1> call disgetword 4283 000052F2 50 <1> push ax 4284 000052F3 E82806 <1> call dischk32d 4285 000052F6 7410 <1> jz dop44_word ; if not 32-bit address 4286 <1> 4287 <1> dop44_dword: 4288 <1> %if _PM 4289 000052F8 F606[DB88]40 <1> test byte [bCSAttr],40h ; for 16-bit code segments 4290 000052FD 7503 <1> jnz @F ; no need to display "WORD " 4291 <1> %endif 4292 000052FF E8D505 <1> call showdword 4293 <1> @@: 4294 <1> 4295 00005302 E89F06 <1> call disgetword 4296 00005305 50 <1> push ax 4297 00005306 EB0A <1> jmp dop44_common 4298 <1> 4299 <1> dop44_word: 4300 <1> %if _PM 4301 00005308 F606[DB88]40 <1> test byte [bCSAttr],40h ; for 32-bit code segments 4302 0000530D 7403 <1> jz @F ; no need to display "DWORD " 4303 0000530F E8CB05 <1> call showword 4304 <1> @@: 4305 <1> %endif 4306 <1> 4307 <1> dop44_common: 4308 00005312 E88F06 <1> call disgetword 4309 <1> %if _MEMREF_AMOUNT 4310 00005315 E89F01 <1> call get_free_memref 4311 00005318 8987[7887] <1> mov word [memrefs + bx + mrSegmentSelector], ax 4312 <1> %endif 4313 0000531C E81B67 <1> call hexword 4314 0000531F B03A <1> mov al,':' 4315 00005321 AA <1> stosb 4316 00005322 E8F905 <1> call dischk32d 4317 00005325 740D <1> jz dop45 ;if not 32-bit address 4318 00005327 58 <1> pop ax 4319 <1> %if _MEMREF_AMOUNT 4320 00005328 8987[7687] <1> mov word [memrefs + bx + mrOffset + 2], ax 4321 0000532C 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4322 <1> %endif 4323 00005331 E80667 <1> call hexword 4324 <1> dop45: 4325 00005334 58 <1> pop ax 4326 <1> %if _MEMREF_AMOUNT 4327 00005335 8987[7487] <1> mov word [memrefs + bx + mrOffset], ax 4328 00005339 808F[7A87]01 <1> or byte [memrefs + bx + mrFlags], mrfBranchDirect 4329 0000533E E89101 <1> call calc_linear_memref_and_mark_nonfree 4330 <1> %endif 4331 00005341 E9F666 <1> jmp hexword 4332 <1> 4333 <1> 4334 <1> %if _COND 4335 <1> ; INP: [presizeflags] & PRE32A, d[reg_ecx] 4336 <1> ; OUT: dx:ax = (e)cx 4337 <1> cond_get_ecx: 4338 00005344 A1[6C0C] <1> mov ax, word [reg_ecx] 4339 00005347 F606[BE87]20 <1> test byte [presizeflags], PRE32A ; A32 ? 4340 0000534C 8B16[6E0C] <1> mov dx, word [reg_ecx+2] 4341 00005350 7502 <1> jnz .ecx 4342 00005352 31D2 <1> xor dx, dx 4343 <1> .ecx: 4344 00005354 C3 <1> retn 4345 <1> 4346 <1> ; INP: ax = 0..15 condition code, else invalid 4347 <1> ; OUT: w[condmsg] set as appropriate 4348 <1> cond_handle: 4349 00005355 83F80F <1> cmp ax, 15 4350 00005358 7738 <1> ja .return 4351 0000535A 8B0E[A00C] <1> mov cx, word [reg_efl] ; get flags 4352 0000535E 89C3 <1> mov bx, ax 4353 00005360 80E3FE <1> and bl, ~1 ; make even 4354 00005363 2401 <1> and al, 1 ; 1 if negated condition 4355 00005365 80FB0C <1> cmp bl, 12 ; L/GE or LE/G? 4356 00005368 7306 <1> jae .specific ; yes --> 4357 <1> 4358 0000536A 858F[6088] <1> test cx, [cond_table+bx]; flag(s) set ? 4359 0000536E EB14 <1> jmp short .jump_ZF ; NZ if (normal) condition true --> 4360 <1> 4361 <1> .specific: 4362 00005370 80FB0E <1> cmp bl, 14 4363 00005373 7205 <1> jb .L_GE 4364 <1> 4365 <1> ; Handle LE/NG and G/NLE conditions. 4366 <1> ; The former says ZF | (OF ^ SF). 4367 <1> .LE_G: 4368 00005375 F6C140 <1> test cl, 40h ; ZF | .. 4369 00005378 750C <1> jnz .jump_true 4370 <1> 4371 <1> ; Handle L/NGE and GE/NL conditions. 4372 <1> ; The former says OF ^ SF. 4373 <1> .L_GE: 4374 0000537A 81E18008 <1> and cx, 880h ; OF ^ SF 4375 0000537E 7408 <1> jz .jump_false ; both clear --> 4376 00005380 81F18008 <1> xor cx, 880h 4377 <1> .jump_ZF: 4378 00005384 7402 <1> jz .jump_false ; both set --> (or ZR: (normal) condition false) 4379 <1> .jump_true: 4380 00005386 3401 <1> xor al, 1 ; (negating ^ raw truth) = cooked truth 4381 <1> .jump_false: 4382 00005388 84C0 <1> test al, al ; true ? 4383 0000538A 7507 <1> jnz .msg_jumping ; yes --> 4384 <1> 4385 <1> .msg_notjumping: 4386 0000538C C706[DC87][4C80] <1> mov word [condmsg], msg.condnotjump 4387 <1> .return: 4388 00005392 C3 <1> retn 4389 <1> 4390 <1> .msg_jumping: 4391 00005393 C706[DC87][5080] <1> mov word [condmsg], msg.condjump 4392 00005399 C3 <1> retn 4393 <1> %endif 4394 <1> 4395 <1> 4396 <1> ; 8-bit relative jump (OP_REL8) 4397 <1> 4398 <1> dop_rel8: 4399 <1> %if _COND 4400 0000539A A1[C287] <1> mov ax, word [index] 4401 0000539D 3DE300 <1> cmp ax, 0E3h 4402 000053A0 772C <1> ja .cond_done ; no conditional jump --> 4403 000053A2 7211 <1> jb .cond_noncx ; not jcxz, check for other --> 4404 <1> 4405 000053A4 E89DFF <1> call cond_get_ecx 4406 000053A7 09D0 <1> or ax, dx 4407 000053A9 7405 <1> jz .cond_msg_jumping 4408 <1> .cond_msg_notjumping: 4409 000053AB E8DEFF <1> call cond_handle.msg_notjumping 4410 000053AE EB1E <1> jmp short .cond_done 4411 <1> 4412 <1> .cond_msg_jumping: 4413 000053B0 E8E0FF <1> call cond_handle.msg_jumping 4414 000053B3 EB19 <1> jmp short .cond_done 4415 <1> 4416 <1> .cond_noncx: 4417 000053B5 3CE0 <1> cmp al, 0E0h 4418 000053B7 7210 <1> jb .cond_nonloop ; not loop, check for other --> 4419 <1> 4420 000053B9 50 <1> push ax 4421 000053BA E887FF <1> call cond_get_ecx 4422 000053BD 48 <1> dec ax ; = 0 if cx is 1 4423 000053BE 09D0 <1> or ax, dx ; = 0 if cx is 1 and ecx is cx 4424 000053C0 58 <1> pop ax 4425 000053C1 74E8 <1> jz .cond_msg_notjumping ; if (e)cx is 1 --> 4426 000053C3 3CE2 <1> cmp al, 0E2h 4427 000053C5 74E9 <1> je .cond_msg_jumping ; loop without additional condition --> 4428 000053C7 3495 <1> xor al, 0E0h^75h ; E0h (loopnz) to 75h (jnz), 4429 <1> ; E1h (loopz) to 74h (jz) 4430 <1> 4431 <1> .cond_nonloop: 4432 000053C9 2C70 <1> sub al, 70h ; (ah = 0) 4433 000053CB E887FF <1> call cond_handle ; call common code (checks for ax < 16) 4434 <1> .cond_done: 4435 <1> %endif 4436 000053CE E8B705 <1> call disgetbyte 4437 000053D1 98 <1> cbw 4438 000053D2 A2[C087] <1> mov byte [disp8], al 4439 000053D5 E99E00 <1> jmp dop48 4440 <1> 4441 <1> ; 16/32-bit relative jump (OP_REL1632) 4442 <1> 4443 <1> dop_rel1632: 4444 <1> %if _COND 4445 000053D8 A1[C287] <1> mov ax, word [index] 4446 000053DB 2D6002 <1> sub ax, SPARSE_BASE+80h 4447 000053DE E874FF <1> call cond_handle 4448 <1> %endif 4449 000053E1 E8C005 <1> call disgetword 4450 000053E4 E83705 <1> call dischk32d 4451 000053E7 7465 <1> jz dop48_near ; if not 32-bit offset 4452 000053E9 92 <1> xchg ax, dx ; mov dx, ax 4453 000053EA E8B705 <1> call disgetword 4454 <1> 4455 000053ED 813E[C287]E800 <1> cmp word [index], 00E8h 4456 000053F3 7429 <1> je .not_show_keyword ; no need to distinguish NEAR call --> 4457 <1> ; ax:dx between FFFFh:FF80h (-128) .. 0000h:007Fh (127): 4458 <1> ; == show "NEAR" keyword 4459 <1> ; 4460 <1> ; Note: This is not entirely correct. If a jump short is 4461 <1> ; used, the actual opcode is shorter, thus the 4462 <1> ; exact distance that can be reached by the jump short 4463 <1> ; differs from what the jump near can reach with 4464 <1> ; a rel16/32 displacement between -128..127. 4465 000053F5 83F8FF <1> cmp ax, -1 4466 000053F8 7410 <1> je .checkminus 4467 000053FA 85C0 <1> test ax, ax 4468 000053FC 7520 <1> jnz .not_show_keyword 4469 <1> .checkplus: 4470 000053FE 83FA7F <1> cmp dx, byte 127 4471 00005401 7F1B <1> jg .not_show_keyword 4472 00005403 83FA00 <1> cmp dx, 0 4473 00005406 7C16 <1> jl .not_show_keyword 4474 00005408 EB0A <1> jmp .show_keyword 4475 <1> 4476 <1> .checkminus: 4477 0000540A 83FA80 <1> cmp dx, byte -128 4478 0000540D 7C0F <1> jl .not_show_keyword 4479 0000540F 83FA00 <1> cmp dx, 0 4480 00005412 7D0A <1> jge .not_show_keyword 4481 <1> 4482 <1> .show_keyword: 4483 00005414 F606[AC00]20 <1> testopt [asm_options], disasm_show_near 4484 00005419 7503 <1> jnz .not_show_keyword 4485 0000541B E87003 <1> call dop_show_near 4486 <1> .not_show_keyword: 4487 <1> 4488 <1> %if _PM 4489 0000541E F606[DB88]40 <1> test byte [bCSAttr],40h ; for 32-bit code segments 4490 00005423 7505 <1> jnz @F ; no need to display "DWORD " 4491 <1> %endif 4492 00005425 50 <1> push ax 4493 00005426 E8AE04 <1> call showdword 4494 00005429 58 <1> pop ax 4495 <1> @@: 4496 <1> 4497 0000542A 8B1E[1E0B] <1> mov bx,[u_addr+0] 4498 0000542E 031E[B887] <1> add bx,[dis_n] 4499 00005432 1306[BA87] <1> adc ax,[dis_n + 2] 4500 00005436 01DA <1> add dx,bx 4501 <1> %if _PM 4502 00005438 1306[200B] <1> adc ax,[u_addr+2] 4503 <1> %else 4504 <1> adc ax, 0 4505 <1> %endif 4506 <1> %if _MEMREF_AMOUNT 4507 0000543C E87800 <1> call get_free_memref 4508 0000543F 8987[7687] <1> mov word [memrefs + bx + mrOffset + 2], ax 4509 00005443 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4510 <1> %endif 4511 00005448 E8EF65 <1> call hexword 4512 0000544B 92 <1> xchg ax,dx 4513 0000544C EB4F <1> jmp s dop_branch_word 4514 <1> 4515 <1> 4516 <1> dop48_near: 4517 0000544E 813E[C287]E800 <1> cmp word [index], 00E8h 4518 00005454 7414 <1> je @F ; no need to distinguish NEAR call --> 4519 <1> ; ax between FF80h (-128) .. 007Fh (127): 4520 <1> ; == show "NEAR" keyword 4521 <1> ; 4522 <1> ; Note: This is not entirely correct. If a jump short is 4523 <1> ; used, the actual opcode is shorter, thus the 4524 <1> ; exact distance that can be reached by the jump short 4525 <1> ; differs from what the jump near can reach with 4526 <1> ; a rel16/32 displacement between -128..127. 4527 00005456 83F880 <1> cmp ax, byte -128 4528 00005459 7C0F <1> jl @F 4529 0000545B 83F87F <1> cmp ax, byte 127 4530 0000545E 7F0A <1> jg @F 4531 00005460 F606[AC00]20 <1> testopt [asm_options], disasm_show_near 4532 00005465 7503 <1> jnz @F 4533 00005467 E82403 <1> call dop_show_near 4534 <1> @@: 4535 <1> 4536 <1> %if _PM 4537 0000546A F606[DB88]40 <1> test byte [bCSAttr],40h ; for 16-bit code segments 4538 0000546F 7405 <1> jz @F ; no need to display "WORD " 4539 00005471 50 <1> push ax 4540 00005472 E86804 <1> call showword 4541 00005475 58 <1> pop ax 4542 <1> @@: 4543 <1> %endif 4544 <1> 4545 <1> dop48: 4546 00005476 99 <1> cwd 4547 00005477 0306[1E0B] <1> add ax, word [u_addr] 4548 <1> %if _PM 4549 0000547B 1316[200B] <1> adc dx, word [u_addr + 2] 4550 <1> %else 4551 <1> adc dx, 0 4552 <1> %endif 4553 0000547F 0306[B887] <1> add ax, word [dis_n] 4554 00005483 1316[BA87] <1> adc dx, word [dis_n + 2] 4555 00005487 E89404 <1> call dischk32d ; 32-bit opsize ? 4556 0000548A 7411 <1> jz .16 ; no --> 4557 0000548C 92 <1> xchg ax, dx 4558 0000548D E8AA65 <1> call hexword ; yes, display high word 4559 00005490 92 <1> xchg ax, dx 4560 <1> %if _MEMREF_AMOUNT 4561 00005491 E82300 <1> call get_free_memref 4562 00005494 8997[7687] <1> mov word [memrefs + bx + mrOffset + 2], dx 4563 00005498 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4564 <1> %endif 4565 <1> .16: 4566 <1> 4567 <1> dop_branch_word: 4568 <1> %if _MEMREF_AMOUNT 4569 0000549D E81700 <1> call get_free_memref 4570 000054A0 8987[7487] <1> mov word [memrefs + bx + mrOffset], ax 4571 000054A4 FF36[220B] <1> push word [u_addr + saSegSel] 4572 000054A8 8F87[7887] <1> pop word [memrefs + bx + mrSegmentSelector] 4573 000054AC 808F[7A87]01 <1> or byte [memrefs + bx + mrFlags], mrfBranchDirect 4574 000054B1 E81E00 <1> call calc_linear_memref_and_mark_nonfree 4575 <1> %endif 4576 000054B4 E98365 <1> jmp hexword ; call hexword and return 4577 <1> 4578 <1> 4579 <1> %if _MEMREF_AMOUNT 4580 <1> ; INP: word [memrefs.free] 4581 <1> ; OUT: bx = byte index into memref array 4582 <1> ; CHG: - 4583 <1> ; STT: ss = ds = es 4584 <1> get_free_memref: 4585 000054B7 8B1E[B087] <1> mov bx, [memrefs.free] 4586 <1> get_memref_index_bx: 4587 000054BB 83FB04 <1> cmp bx, _MEMREF_AMOUNT 4588 000054BE 7309 <1> jae @F 4589 000054C0 01DB <1> add bx, bx 4590 000054C2 01DB <1> add bx, bx 4591 000054C4 01DB <1> add bx, bx 4592 000054C6 01DB <1> add bx, bx 4593 <1> %if MEMREF_size != 16 4594 <1> %error Adjust multiplication 4595 <1> %endif 4596 000054C8 C3 <1> retn 4597 <1> 4598 <1> @@: 4599 000054C9 BA[A671] <1> mov dx, msg.memrefs_invalid_internal 4600 000054CC E82169 <1> call putsz 4601 000054CF E92EAB <1> jmp cmd3 4602 <1> 4603 <1> 4604 <1> ; INP: word [memrefs.free] 4605 <1> ; [memrefs] array entry 4606 <1> ; OUT: NC if valid segmented address (getlinear succeeded), 4607 <1> ; dword [memrefs + x + mrLinear] filled 4608 <1> ; word [memrefs.free] incremented 4609 <1> ; CY if invalid address, 4610 <1> ; [memrefs + x] re-initialised 4611 <1> ; word [memrefs.free] left unmodified 4612 <1> ; CHG: - 4613 <1> ; STT: ss = ds = es 4614 <1> calc_linear_memref_and_mark_nonfree: 4615 000054D2 50 <1> push ax 4616 000054D3 53 <1> push bx 4617 000054D4 66 <1> _386_PM_o32 4618 000054D5 52 <1> push dx 4619 000054D6 E8DEFF <1> call get_free_memref 4620 000054D9 53 <1> push bx 4621 000054DA 66 <1> _386_PM_o32 4622 000054DB 8B97[7487] <1> mov dx, word [memrefs + bx + mrOffset] 4623 000054DF 8B9F[7887] <1> mov bx, word [memrefs + bx + mrSegmentSelector] 4624 000054E3 E8ACE2 <1> call getlinear 4625 000054E6 5B <1> pop bx 4626 000054E7 7211 <1> jc .error 4627 <1> 4628 000054E9 8987[7087] <1> mov word [memrefs + bx + mrLinear], ax 4629 000054ED 8997[7287] <1> mov word [memrefs + bx + mrLinear + 2], dx 4630 000054F1 FF06[B087] <1> inc word [memrefs.free] 4631 <1> 4632 <1> ; clc 4633 <1> .return: 4634 000054F5 66 <1> _386_PM_o32 4635 000054F6 5A <1> pop dx 4636 000054F7 5B <1> pop bx 4637 000054F8 58 <1> pop ax 4638 000054F9 C3 <1> retn 4639 <1> 4640 <1> .error: 4641 000054FA 57 <1> push di 4642 000054FB 8DBF[7087] <1> lea di, [memrefs + bx] 4643 000054FF E80400 <1> call init_one_memref 4644 00005502 5F <1> pop di 4645 00005503 F9 <1> stc 4646 00005504 EBEF <1> jmp .return 4647 <1> 4648 <1> 4649 <1> ; INP: di -> memref to initialise 4650 <1> ; OUT: ax = 0 4651 <1> ; di -> past initialised memref 4652 <1> ; CHG: - 4653 <1> ; STT: ss = ds = es 4654 <1> init_one_memref: 4655 00005506 31C0 <1> xor ax, ax 4656 <1> 4657 <1> ; INP: di -> memref to initialise 4658 <1> ; ax = 0 4659 <1> ; OUT: di -> past initialised memref 4660 <1> ; CHG: - 4661 <1> ; STT: ss = ds = es 4662 <1> .ax_already_zero: 4663 00005508 AB <1> stosw ; zero-initialise all memrefs 4664 00005509 AB <1> stosw ; mrLinear 4665 0000550A AB <1> stosw 4666 0000550B AB <1> stosw ; mrOffset 4667 0000550C AB <1> stosw ; mrSegmentSelector 4668 0000550D AB <1> stosw ; mrFlags 4669 0000550E 40 <1> inc ax 4670 0000550F AB <1> stosw 4671 00005510 48 <1> dec ax 4672 00005511 AB <1> stosw ; mrLength = 1 4673 00005512 C3 <1> retn 4674 <1> 4675 <1> 4676 <1> ; INP: si = address of segreg (reg_cs, reg_ds, etc) 4677 <1> ; di = address of index reg (reg_esi or reg_edi) 4678 <1> ; [memrefs] 4679 <1> ; [presizeflags] 4680 <1> ; byte [index] = which opcode 4681 <1> ; [reg_ecx] 4682 <1> ; [reg_efl] & 400h = Direction Flag 4683 <1> ; OUT: memrefs + bx -> current memref (partially filled) 4684 <1> ; CHG: bx, si, di, cx, dx 4685 <1> init_string_memref: 4686 00005513 E8A1FF <1> call get_free_memref 4687 00005516 FF34 <1> push word [si] ; get segment/selector 4688 00005518 8F87[7887] <1> pop word [memrefs + bx + mrSegmentSelector] 4689 <1> ; store segment/selector 4690 0000551C FF35 <1> push word [di] 4691 0000551E 8F87[7487] <1> pop word [memrefs + bx + mrOffset] 4692 <1> ; store low word of offset 4693 00005522 8B0E[B687] <1> mov cx, word [string_memref_counter + 2] 4694 00005526 8B16[B487] <1> mov dx, word [string_memref_counter] 4695 <1> 4696 0000552A F606[BE87]20 <1> test byte [presizeflags], PRE32A 4697 0000552F 740C <1> jz @F ; if 16-bit addressing --> 4698 00005531 FF7502 <1> push word [di + 2] 4699 00005534 8F87[7687] <1> pop word [memrefs + bx + mrOffset + 2] 4700 <1> ; store high word of offset 4701 00005538 808F[7A87]10 <1> or byte [memrefs + bx + mrFlags], mrfA32 4702 <1> ; remember that it is a32 4703 <1> @@: 4704 <1> 4705 0000553D F606[BC87]02 <1> test byte [preflags], PREREP 4706 00005542 7505 <1> jnz @F ; if to take (e)cx repetitions --> 4707 00005544 BA0100 <1> mov dx, 1 4708 00005547 31C9 <1> xor cx, cx ; cx:dx = 1, just one element 4709 <1> @@: 4710 <1> 4711 00005549 50 <1> push ax 4712 0000554A B80100 <1> mov ax, 1 4713 0000554D F606[C287]01 <1> test byte [index], 1 ; element size is byte ? 4714 00005552 740A <1> jz @F ; yes, ax = 1 4715 00005554 40 <1> inc ax ; = 2 4716 00005555 F606[BE87]10 <1> test byte [presizeflags], PRE32D 4717 <1> ; element size is word ? 4718 0000555A 7402 <1> jz @F ; yes, ax = 2 4719 0000555C 01C0 <1> add ax, ax ; = 4 4720 <1> @@: 4721 <1> 4722 0000555E 3C01 <1> cmp al, 1 ; byte size ? 4723 00005560 7415 <1> je @F ; yes, do not multiply --> 4724 00005562 01D2 <1> add dx, dx 4725 00005564 11C9 <1> adc cx, cx ; * 2, word to byte 4726 00005566 720A <1> jc .carry_counter 4727 00005568 3C02 <1> cmp al, 2 ; word size ? 4728 0000556A 740B <1> je @F ; yes, done multiplying --> 4729 0000556C 01D2 <1> add dx, dx 4730 0000556E 11C9 <1> adc cx, cx ; * 4, dword to byte 4731 00005570 7305 <1> jnc @F 4732 <1> .carry_counter: 4733 00005572 BAFFFF <1> mov dx, -1 4734 00005575 89D1 <1> mov cx, dx ; in case the counter is large 4735 <1> ; A carry out of an a16 address is not yet handled. 4736 <1> ; Note that eg cx=8000h a16 movsw may be valid to 4737 <1> ; copy exactly 64 KiB. Likewise, technically a 4738 <1> ; size of exactly 4 GiB is valid; however, our 4739 <1> ; memref format cannot store that. 4740 <1> @@: 4741 00005577 8997[7C87] <1> mov word [memrefs + bx + mrLength], dx 4742 0000557B 898F[7E87] <1> mov word [memrefs + bx + mrLength + 2], cx 4743 <1> 4744 0000557F F606[A10C]04 <1> testopt [reg_efl], 400h ; DF set ? 4745 00005584 7411 <1> jz @F 4746 <1> 4747 00005586 0187[7487] <1> add word [memrefs + bx + mrOffset], ax 4748 0000558A 8397[7687]00 <1> adc word [memrefs + bx + mrOffset + 2], 0 4749 0000558F 2997[7487] <1> sub word [memrefs + bx + mrOffset], dx 4750 00005593 198F[7687] <1> sbb word [memrefs + bx + mrOffset + 2], cx 4751 <1> 4752 <1> @@: 4753 00005597 58 <1> pop ax 4754 00005598 C3 <1> retn 4755 <1> %endif 4756 <1> 4757 <1> 4758 <1> ; Check for ST(1) (OP_1CHK). 4759 <1> 4760 <1> dop49: 4761 00005599 58 <1> pop ax ;discard return address 4762 0000559A A0[9C81] <1> mov al,[regmem] 4763 0000559D 2407 <1> and al,7 4764 0000559F 3C01 <1> cmp al,1 4765 000055A1 7403 <1> je dop50 ;if it's ST(1) 4766 000055A3 E96FF3 <1> jmp da14 ;another operand (but no comma) 4767 <1> 4768 <1> dop50: 4769 000055A6 E902F4 <1> jmp da_op_end ; end of list --> 4770 <1> 4771 <1> ; ST(I) (OP_STI). 4772 <1> 4773 <1> dop_sti: 4774 000055A9 A0[9C81] <1> mov al, byte [regmem] 4775 000055AC 2407 <1> and al, 7 4776 000055AE 93 <1> xchg ax, bx ;mov bx,ax 4777 000055AF B85354 <1> mov ax, 'ST' 4778 000055B2 E8FE02 <1> call dis_stosw_lowercase; store ST(bl) 4779 000055B5 B028 <1> mov al, '(' 4780 000055B7 AA <1> stosb 4781 000055B8 B83029 <1> mov ax, '0)' 4782 000055BB 08D8 <1> or al, bl 4783 000055BD AB <1> stosw 4784 000055BE C3 <1> retn 4785 <1> 4786 <1> ; CRx (OP_CR). 4787 <1> 4788 <1> dop_cr: 4789 000055BF BB4352 <1> mov bx,'CR' 4790 000055C2 E84502 <1> call getregmem_r 4791 000055C5 3C04 <1> cmp al,4 4792 000055C7 7713 <1> ja disbad4 ;if too large 4793 000055C9 7505 <1> jne dop52a 4794 000055CB C606[A281]05 <1> mov byte [dismach],5 ;CR4 is new to the 586 4795 <1> dop52a: 4796 000055D0 813E[C287]0202 <1> cmp word [index],SPARSE_BASE+22h 4797 000055D6 7528 <1> jne dop55 ;if not MOV CRx,xx 4798 000055D8 3C01 <1> cmp al,1 4799 000055DA 7524 <1> jne dop55 ;if not CR1 4800 <1> 4801 000055DC E9C101 <1> disbad4:jmp disbad ;can't MOV CR1,xx 4802 <1> 4803 <1> ; DRx (OP_DR). 4804 <1> 4805 <1> dop_dr: 4806 000055DF E82802 <1> call getregmem_r 4807 000055E2 BB4452 <1> mov bx,'DR' 4808 000055E5 B9FFFF <1> mov cx,-1 ;no max or illegal value 4809 000055E8 EB16 <1> jmp s dop55 4810 <1> 4811 <1> ; TRx (OP_TR). 4812 <1> 4813 <1> dop_tr: 4814 000055EA E81D02 <1> call getregmem_r 4815 000055ED 3C03 <1> cmp al,3 4816 000055EF 7303E9AC01 <1> jb disbad ;if too small 4817 000055F4 3C06 <1> cmp al,6 4818 000055F6 7305 <1> jae dop54a ;if TR6-7 4819 000055F8 C606[A281]04 <1> mov byte [dismach],4 ;TR3-5 are new to the 486 4820 <1> dop54a: 4821 000055FD BB5452 <1> mov bx,'TR' 4822 <1> 4823 <1> dop55: 4824 00005600 93 <1> xchg ax, bx 4825 00005601 E8AF02 <1> call dis_stosw_lowercase; store XX 4826 00005604 93 <1> xchg ax, bx 4827 00005605 0C30 <1> or al, '0' 4828 00005607 AA <1> stosb 4829 00005608 C3 <1> retn 4830 <1> 4831 <1> ; Segment register (OP_SEGREG). 4832 <1> 4833 <1> dop_segreg: 4834 00005609 E8FE01 <1> call getregmem_r 4835 0000560C 3C06 <1> cmp al,6 4836 0000560E 7203E98D01 <1> jae disbad ; if not a segment register --> 4837 00005613 3C02 <1> cmp al,2 4838 00005615 7505 <1> jne @F ; if not SS --> 4839 00005617 800E[D687]40 <1> or byte [disflags], DIS_I_MOV_SS ; note this 4840 <1> @@: 4841 0000561C 3C04 <1> cmp al,4 4842 0000561E 7205 <1> jb dop57a ;if not FS or GS 4843 00005620 C606[A281]03 <1> mov byte [dismach],3;(no new 486-686 instructions involve seg regs) 4844 <1> dop57a: 4845 00005625 0410 <1> add al,16 4846 00005627 E94BFC <1> jmp dop35 ;go print it out 4847 <1> 4848 <1> ; Sign-extended immediate byte (OP_IMMS8). "push xx" 4849 <1> 4850 <1> dop_imms8: 4851 0000562A E85B03 <1> call disgetbyte 4852 0000562D 3C00 <1> cmp al,0 4853 0000562F 93 <1> xchg ax,bx ;mov bl,al 4854 00005630 B02B <1> mov al,'+' 4855 00005632 7D04 <1> jge dop58a ;if >= 0 4856 00005634 F6DB <1> neg bl 4857 00005636 B02D <1> mov al,'-' 4858 <1> dop58a: 4859 00005638 AA <1> stosb 4860 00005639 93 <1> xchg ax,bx ;mov al,bl 4861 0000563A EB03 <1> jmp s dop59a ;call hexbyte and return 4862 <1> 4863 <1> 4864 <1> ; Immediate byte (OP_IMM8). 4865 <1> 4866 <1> dop_imm8: 4867 0000563C E84903 <1> call disgetbyte 4868 <1> dop59a: 4869 0000563F E9FF63 <1> jmp hexbyte ;call hexbyte and return 4870 <1> 4871 <1> 4872 <1> dop_imm8_int: 4873 00005642 E84303 <1> call disgetbyte 4874 00005645 3C03 <1> cmp al, 3 4875 00005647 75F6 <1> jne dop59a 4876 00005649 50 <1> push ax 4877 0000564A E87F02 <1> call showsize.byte 4878 0000564D 58 <1> pop ax 4879 0000564E EBEF <1> jmp dop59a 4880 <1> 4881 <1> 4882 <1> ; Show MMx reg (OP_MMX; previously was "Show ECX if 32-bit LOOPxx"). 4883 <1> dop_mmx: 4884 00005650 BB4D4D <1> mov bx, "MM" 4885 00005653 E8B401 <1> call getregmem_r 4886 00005656 EBA8 <1> jmp short dop55 4887 <1> 4888 <1> ; MMX register (in ModR/M part) 4889 <1> dop_mmx_mod: 4890 00005658 BB4D4D <1> mov bx, "MM" 4891 0000565B E8B601 <1> call getregmem 4892 0000565E 3CC0 <1> cmp al, 0C0h 4893 00005660 7303E93B01 <1> jb disbad ; needs to be encoded as register --> 4894 00005665 2407 <1> and al, 7 4895 00005667 EB97 <1> jmp short dop55 4896 <1> 4897 <1> 4898 <1> %if _MEMREF_AMOUNT 4899 <1> dop_stack_push: 4900 00005669 B80200 <1> mov ax, 2 4901 <1> .special: 4902 0000566C F606[BE87]10 <1> test byte [presizeflags], PRE32D 4903 00005671 7402 <1> jz .iso16 4904 00005673 01C0 <1> add ax, ax 4905 <1> .iso16: 4906 00005675 E83FFE <1> call get_free_memref ; memrefs + bx -> the memref structure 4907 <1> 4908 00005678 8987[7C87] <1> mov word [memrefs + bx + mrLength], ax 4909 0000567C 8B0E[760C] <1> mov cx, word [reg_esp + 2] 4910 00005680 8B16[740C] <1> mov dx, word [reg_esp] 4911 00005684 29C2 <1> sub dx, ax 4912 00005686 83D900 <1> sbb cx, 0 4913 <1> 4914 00005689 8997[7487] <1> mov word [memrefs + bx + mrOffset], dx 4915 <1> 4916 0000568D B20A <1> mov dl, mrfMemDest | mrfMem 4917 <1> 4918 0000568F EB21 <1> jmp dop_stack_common 4919 <1> 4920 <1> 4921 <1> dop_stack_pop: 4922 00005691 B80200 <1> mov ax, 2 4923 <1> .special: 4924 00005694 8B0E[760C] <1> mov cx, word [reg_esp + 2] 4925 00005698 8B16[740C] <1> mov dx, word [reg_esp] 4926 <1> .leave: 4927 0000569C F606[BE87]10 <1> test byte [presizeflags], PRE32D 4928 000056A1 7402 <1> jz .iso16 4929 000056A3 01C0 <1> add ax, ax 4930 <1> .iso16: 4931 000056A5 E80FFE <1> call get_free_memref ; memrefs + bx -> the memref structure 4932 <1> 4933 000056A8 8987[7C87] <1> mov word [memrefs + bx + mrLength], ax 4934 <1> 4935 000056AC 8997[7487] <1> mov word [memrefs + bx + mrOffset], dx 4936 <1> 4937 000056B0 B206 <1> mov dl, mrfMemSource | mrfMem 4938 <1> 4939 <1> dop_stack_common: 4940 000056B2 A1[8C0C] <1> mov ax, word [reg_ss] ; get ss selector into ax 4941 000056B5 8987[7887] <1> mov word [memrefs + bx + mrSegmentSelector], ax 4942 <1> 4943 000056B9 93 <1> _386_PM xchg ax, bx ; selector in bx 4944 000056BA E8AB06 <1> _386_PM call test_d_b_bit ; check whether a 32-bit ss 4945 000056BD 93 <1> _386_PM xchg ax, bx 4946 000056BE 7407 <1> _386_PM jz .isstack16 4947 000056C0 80CA10 <1> _386_PM or dl, mrfA32 4948 000056C3 898F[7687] <1> _386_PM mov word [memrefs + bx + mrOffset + 2], cx 4949 <1> .isstack16: 4950 <1> 4951 000056C7 0897[7A87] <1> or byte [memrefs + bx + mrFlags], dl 4952 000056CB E804FE <1> call calc_linear_memref_and_mark_nonfree 4953 000056CE EB54 <1> jmp dop_continue_maybe_end 4954 <1> 4955 <1> 4956 <1> dop_stack_special: 4957 000056D0 A1[C287] <1> mov ax, [index] 4958 000056D3 3D3301 <1> cmp ax, GROUP7 + 3 ; call far [mem] ? 4959 000056D6 7414 <1> je .callfar 4960 000056D8 84E4 <1> test ah, ah 4961 000056DA 7545 <1> jnz .error 4962 000056DC 57 <1> push di 4963 000056DD BF[9C88] <1> mov di, .bytes ; list of opcodes 4964 000056E0 B90B00 <1> mov cx, .bytes_amount 4965 000056E3 F2AE <1> repne scasb 4966 000056E5 8A450A <1> mov al, [di + .bytes_amount - 1] 4967 000056E8 5F <1> pop di 4968 000056E9 7536 <1> jne .error ; if not one of these --> 4969 <1> 4970 000056EB A9 <1> db __TEST_IMM16 ; (skip mov) 4971 <1> .callfar: 4972 000056EC B044 <1> mov al, 40h + 4 4973 <1> 4974 <1> .haveinfo: 4975 000056EE 89C3 <1> mov bx, ax 4976 000056F0 83E03F <1> and ax, 3Fh 4977 000056F3 80FB80 <1> cmp bl, 80h 4978 000056F6 739C <1> jae dop_stack_pop.special 4979 000056F8 80FB40 <1> cmp bl, 40h 4980 000056FB 7203E96CFF <1> jae dop_stack_push.special 4981 00005700 84C0 <1> test al, al 4982 00005702 740F <1> jz .leave 4983 00005704 3C01 <1> cmp al, 1 4984 00005706 7519 <1> jne .error 4985 <1> .into: 4986 00005708 F606[A10C]08 <1> testopt [reg_efl], 800h 4987 0000570D 7415 <1> jz .none 4988 0000570F B046 <1> mov al, 40h + 6 4989 00005711 EBDB <1> jmp .haveinfo 4990 <1> 4991 <1> .leave: 4992 00005713 B80200 <1> mov ax, 2 ; pop size = 1 word or 1 dword 4993 00005716 8B0E[7A0C] <1> mov cx, word [reg_ebp + 2] 4994 0000571A 8B16[780C] <1> mov dx, word [reg_ebp] ; pop from address in (e)bp, not (e)sp 4995 0000571E E97BFF <1> jmp dop_stack_pop.leave 4996 <1> 4997 <1> .error: 4998 00005721 E94BF2 <1> jmp da_internal_error 4999 <1> 5000 <1> usesection lDEBUG_DATA_ENTRY 5001 <1> 5002 <1> .bytes: 5003 0000889C CDCE <1> db 0CDh, 0CEh ; int, into 5004 0000889E CCF1 <1> db 0CCh, 0F1h ; int3, int1 5005 000088A0 9A <1> db 9Ah ; call far imm:imm 5006 000088A1 CFCACB <1> db 0CFh, 0CAh, 0CBh ; iret, retf imm, retf 5007 000088A4 60 <1> db 60h ; pusha 5008 000088A5 61 <1> db 61h ; popa 5009 000088A6 C9 <1> db 0C9h ; leave 5010 <1> .bytes_amount: equ $ - .bytes 5011 <1> 5012 <1> ; In this table the bits have the following meaning: 5013 <1> ; 5014 <1> ; flag 80h: special pop 5015 <1> ; flag 40h: special push 5016 <1> ; if neither flag set: unusual, for leave and into 5017 <1> ; else: masked with 3Fh gives amount of bytes to push/pop 5018 <1> ; in o16, which needs to be doubled to get the amount 5019 <1> ; to push/pop in o32 instead. 5020 <1> .info: 5021 000088A7 46 <1> db 40h + 6 ; int 5022 000088A8 01 <1> db 1 ; into 5023 000088A9 46 <1> db 40h + 6 ; int3 5024 000088AA 46 <1> db 40h + 6 ; int1 5025 000088AB 44 <1> db 40h + 4 ; call far imm:imm 5026 000088AC 86 <1> db 80h + 6 ; iret 5027 000088AD 84 <1> db 80h + 4 ; retf imm 5028 000088AE 84 <1> db 80h + 4 ; retf 5029 000088AF 50 <1> db 40h + 16 ; pusha 5030 000088B0 90 <1> db 80h + 16 ; popa 5031 000088B1 00 <1> db 0 ; leave 5032 <1> 5033 <1> usesection lDEBUG_CODE 5034 <1> 5035 <1> .none: 5036 <1> %else 5037 <1> dop_stack_push: 5038 <1> dop_stack_pop: 5039 <1> dop_stack_special: 5040 <1> %endif 5041 <1> dop_continue_maybe_end: 5042 00005724 58 <1> pop ax ; discard return address 5043 00005725 E9E5F1 <1> jmp da14_check_end ; next --> 5044 <1> 5045 <1> ; Set flag to always show size (OP_SHOSIZ). 5046 <1> dop_shosiz: 5047 00005728 800E[D687]10 <1> or byte [disflags],DIS_I_SHOWSIZ 5048 <1> dop60a: 5049 0000572D 58 <1> pop ax ; discard return address 5050 0000572E E9E4F1 <1> jmp da14 ; next... 5051 <1> 5052 <1> dop_far_m: 5053 00005731 800E[D787]02 <1> setopt [disflags], DIS_I_FAR_M 5054 00005736 EBF5 <1> jmp dop60a 5055 <1> 5056 <1> dop_double_m: 5057 00005738 800E[D787]04 <1> setopt [disflags], DIS_I_DOUBLE_M 5058 0000573D EBEE <1> jmp dop60a 5059 <1> 5060 <1> 5061 <1> %if _MEMREF_AMOUNT 5062 <1> dop_m_src: 5063 0000573F 800E[D787]10 <1> setopt [disflags], DIS_I_M_SRC 5064 00005744 EBE7 <1> jmp dop60a 5065 <1> 5066 <1> dop_m_src_dst: 5067 00005746 800E[D787]10 <1> setopt [disflags], DIS_I_M_SRC 5068 <1> dop_m_dst: 5069 0000574B 800E[D787]20 <1> setopt [disflags], DIS_I_M_DST 5070 00005750 EBDB <1> jmp dop60a 5071 <1> %else 5072 <1> dop_m_src: equ dop60a 5073 <1> dop_m_src_dst: equ dop60a 5074 <1> dop_m_dst: equ dop60a 5075 <1> %endif 5076 <1> 5077 <1> 5078 <1> dop_short: 5079 00005752 F606[AC00]10 <1> testopt [asm_options], disasm_show_short 5080 00005757 74D4 <1> jz dop60a 5081 00005759 B85348 <1> mov ax, "SH" 5082 0000575C E85401 <1> call dis_stosw_lowercase 5083 0000575F B84F52 <1> mov ax, "OR" 5084 00005762 E84E01 <1> call dis_stosw_lowercase 5085 00005765 B85420 <1> mov ax, "T " 5086 00005768 E84801 <1> call dis_stosw_lowercase 5087 <1> dop60a_1: 5088 0000576B EBC0 <1> jmp dop60a 5089 <1> 5090 <1> dop_near: 5091 0000576D F606[AC00]20 <1> testopt [asm_options], disasm_show_near 5092 00005772 74F7 <1> jz dop60a_1 5093 00005774 E81700 <1> call dop_show_near 5094 <1> dop60a_2: 5095 00005777 EBF2 <1> jmp dop60a_1 5096 <1> 5097 <1> dop_far: 5098 00005779 F606[AC00]40 <1> testopt [asm_options], disasm_show_far 5099 0000577E 74F7 <1> jz dop60a_2 5100 <1> dop_far_required: 5101 00005780 B84641 <1> mov ax, "FA" ; store "FAR " 5102 00005783 E82D01 <1> call dis_stosw_lowercase 5103 00005786 B85220 <1> mov ax, "R " 5104 00005789 E82701 <1> call dis_stosw_lowercase 5105 0000578C EBE9 <1> jmp dop60a_2 5106 <1> 5107 <1> dop_show_near: 5108 0000578E 50 <1> push ax 5109 0000578F B84E45 <1> mov ax, "NE" 5110 00005792 E81E01 <1> call dis_stosw_lowercase 5111 00005795 B84152 <1> mov ax, "AR" 5112 00005798 E81801 <1> call dis_stosw_lowercase 5113 0000579B B020 <1> mov al, " " 5114 0000579D AA <1> stosb 5115 0000579E 58 <1> pop ax 5116 0000579F C3 <1> retn 5117 <1> 5118 <1> 5119 <1> disbad: 5120 000057A0 8B26[D487] <1> mov sp,[savesp2] ;pop junk off stack 5121 000057A4 B8[DF48] <1> mov ax, da13 5122 000057A7 50 <1> push ax 5123 000057A8 66 <1> _386_PM_o32 ; xor eax, eax 5124 000057A9 31C0 <1> xor ax, ax 5125 000057AB 66 <1> _386_PM_o32 ; mov dword [dis_n], eax 5126 000057AC A3[B887] <1> mov word [dis_n], ax 5127 000057AF A3[BC87] <1> mov word [preflags], ax ; clear preflags and preused 5128 <1> %if _COND 5129 000057B2 A3[DC87] <1> mov word [condmsg], ax ; initialize conditions message 5130 <1> %endif 5131 000057B5 C606[CE87]80 <1> mov byte [rmsize], 80h ; don't display any memory 5132 000057BA A3[A281] <1> mov word [dismach], ax ; forget about the machine type 5133 000057BD 8026[D687]FB <1> and byte [disflags],~DIS_I_SHOW ;and flags 5134 000057C2 E8C301 <1> call disgetbyte 5135 000057C5 BF[4488] <1> mov di,prefixlist 5136 000057C8 B90C00 <1> mov cx,N_PREFIX 5137 000057CB F2AE <1> repne scasb 5138 000057CD 740C <1> je .namedprefix ;if it's a named prefix 5139 000057CF 66 <1> _386_PM_o32 ; dec dword [dis_n] 5140 000057D0 FF0E[B887] <1> dec word [dis_n] 5141 000057D4 BBC101 <1> mov bx,MN_DB ;offset of 'DB' mnemonic 5142 000057D7 BEAC16 <1> mov si, fake_oplist.op_imm8 - oplists 5143 000057DA C3 <1> retn 5144 <1> 5145 <1> .namedprefix: 5146 000057DB 800E[D687]08 <1> or byte [disflags],DIS_I_UNUSED ;print special flag 5147 000057E0 BB0B00 <1> mov bx,N_PREFIX - 1 5148 000057E3 29CB <1> sub bx,cx 5149 000057E5 D1E3 <1> shl bx,1 5150 000057E7 83FB0C <1> cmp bx, byte 6 *2 5151 000057EA 7216 <1> jb .segprefix ; if SEG directive --> 5152 <1> %if _PM 5153 000057EC 83FB14 <1> cmp bx, byte 10 *2 5154 000057EF 720A <1> jb .non16prefix ; if not OSIZE or ASIZE --> 5155 000057F1 F606[DB88]40 <1> test byte [bCSAttr], 40h; 32-bit code segment ? 5156 000057F6 7403 <1> jz .non16prefix ; no, O32 or A32 --> 5157 000057F8 83C304 <1> add bx, byte 4 ; yes, change to O16 or A16 5158 <1> .non16prefix: 5159 <1> %endif 5160 000057FB 8B9F[4488] <1> mov bx,[prefixmnem+bx-6*2] 5161 000057FF 31F6 <1> xor si, si ; no operand (empty oplist) 5162 00005801 C3 <1> retn 5163 <1> 5164 <1> .segprefix: 5165 00005802 8DB7AE16 <1> lea si, [bx + fake_oplist.op_segments - oplists] 5166 <1> ; -> fake OPLIST for segments 5167 00005806 BB5108 <1> mov bx,MN_SEG 5168 00005809 C3 <1> retn 5169 <1> 5170 <1> 5171 <1> usesection ASMTABLE1, 1 5172 <1> fake_oplist: 5173 <1> .op_imm8: 5174 000016AC 1100 <1> db OP_IMM8, 0 5175 <1> .op_segments: 5176 000016AE 2A00 <1> db OP_ES, 0 5177 000016B0 2800 <1> db OP_CS, 0 5178 000016B2 2D00 <1> db OP_SS, 0 5179 000016B4 2900 <1> db OP_DS, 0 5180 000016B6 2B00 <1> db OP_FS, 0 5181 000016B8 2C00 <1> db OP_GS, 0 5182 <1> __SECT__ 5183 <1> 5184 <1> 5185 <1> ; GETREGMEM_R - Get the reg part of the reg/mem part of the instruction 5186 <1> ; Uses CL 5187 <1> 5188 <1> getregmem_r: 5189 0000580A E80700 <1> call getregmem 5190 <1> 5191 <1> ; INP: al = bits 3 to 5 has value to extract 5192 <1> ; OUT: al = (INP:al >> 3) & 7 5193 <1> ; CHG: cl 5194 <1> da_get_bits_3_to_5: 5195 0000580D B103 <1> mov cl,3 5196 0000580F D2E8 <1> shr al,cl 5197 00005811 2407 <1> and al,7 5198 00005813 C3 <1> ret 5199 <1> 5200 <1> ; GETREGMEM - Get the reg/mem part of the instruction 5201 <1> 5202 <1> getregmem: 5203 00005814 F606[BD87]80 <1> test byte [preused],GOTREGM 5204 00005819 750B <1> jnz grm1 ;if we have it already 5205 0000581B 800E[BD87]80 <1> or byte [preused],GOTREGM 5206 00005820 E86501 <1> call disgetbyte ;get the byte 5207 00005823 A2[9C81] <1> mov [regmem],al ;save it away 5208 <1> 5209 00005826 A0[9C81] <1> grm1: mov al,[regmem] 5210 00005829 C3 <1> ret 5211 <1> 5212 <1> dis_lowercase_w: 5213 0000582A 86C4 <1> xchg al, ah 5214 0000582C E80200 <1> call dis_lowercase 5215 0000582F 86C4 <1> xchg al, ah 5216 <1> dis_lowercase: 5217 00005831 3C41 <1> cmp al, 'A' 5218 00005833 720D <1> jb .not 5219 00005835 3C5A <1> cmp al, 'Z' 5220 00005837 7709 <1> ja .not 5221 00005839 F606[AC00]01 <1> testopt [asm_options], disasm_lowercase 5222 0000583E 7402 <1> jz .not 5223 00005840 0C20 <1> or al, 20h 5224 <1> .not: 5225 00005842 C3 <1> retn 5226 <1> 5227 <1> 5228 <1> dis_lowercase_refmem_w: 5229 00005843 86C4 <1> xchg al, ah 5230 00005845 E80200 <1> call dis_lowercase_refmem 5231 00005848 86C4 <1> xchg al, ah 5232 <1> dis_lowercase_refmem: 5233 0000584A 3C41 <1> cmp al, 'A' 5234 0000584C 720D <1> jb .not 5235 0000584E 3C5A <1> cmp al, 'Z' 5236 00005850 7709 <1> ja .not 5237 00005852 F606[AC00]08 <1> testopt [asm_options], disasm_lowercase_refmem 5238 00005857 7402 <1> jz .not 5239 00005859 0C20 <1> or al, 20h 5240 <1> .not: 5241 0000585B C3 <1> retn 5242 <1> 5243 <1> 5244 <1> ; Show the opcode mnemonic 5245 <1> ; 5246 <1> ; INP: si-> Opcode mnemonic string of an mnlist entry. 5247 <1> ; w[si-2] & 0Fh = Length of that string. 5248 <1> ; OUT: di-> next available byte in output line 5249 <1> ; (>= line_out + 32 due to padding) 5250 <1> ; CHG: ax, cx, si 5251 <1> showop: 5252 0000585C BF[2A08] <1> mov di, line_out+MNEMONOFS 5253 0000585F 56 <1> push si 5254 <1> 5255 00005860 8B4CFE <1> mov cx, [si-2] 5256 00005863 83E10F <1> and cx, 0Fh 5257 <1> .loop: 5258 00005866 AC <1> lodsb 5259 00005867 E8C7FF <1> call dis_lowercase 5260 0000586A AA <1> stosb 5261 0000586B E2F9 <1> loop .loop 5262 <1> 5263 0000586D 58 <1> pop ax ; ax-> mnemonic 5264 0000586E 3D[8E0B] <1> cmp ax, mnlist_a_suffix_allowed ; non-suffixed mnemonic ? 5265 00005871 7227 <1> jb .nosuffix ; yes --> 5266 00005873 3D[B20B] <1> cmp ax, mnlist_o_suffix_allowed ; optional address size suffix ? 5267 00005876 7208 <1> jb .a_suffix_allowed ; yes --> 5268 00005878 3D[270C] <1> cmp ax, mnlist_o_suffix_required; optional operand size suffix ? 5269 0000587B B410 <1> mov ah, PREOSIZE ; (OSIZE: check OSIZE/O32) 5270 0000587D 7309 <1> jae .suffix_decide ; no, it's required --> 5271 0000587F A9 <1> db __TEST_IMM16 ; (skip mov) 5272 <1> .a_suffix_allowed: 5273 00005880 B420 <1> mov ah, PREASIZE ; optional ASIZE: check ASIZE/A32 5274 <1> 5275 <1> .suffix_decide_optional: ; check whether the suffix is necessary 5276 00005882 8426[BC87] <1> test byte [preflags], ah ; check if such a prefix occured (ZR if not) 5277 00005886 740E <1> jz .suffix_invisible ; no, is default form --> (hide suffix) 5278 <1> 5279 <1> .suffix_decide: ; suffix will be displayed, now only decide which 5280 00005888 B057 <1> mov al, 'W' 5281 0000588A 8426[BE87] <1> test byte [presizeflags], ah ; 32-bit form ? 5282 0000588E 7402 <1> jz .got_suffix ; no --> 5283 00005890 B044 <1> mov al, 'D' 5284 <1> .got_suffix: 5285 00005892 E89CFF <1> call dis_lowercase 5286 00005895 AA <1> stosb ; store suffix 5287 <1> 5288 <1> .suffix_invisible: ; notional suffix either displayed or left hidden, 5289 00005896 0826[BD87] <1> or byte [preused], ah ; in any case, mark opcode prefix as used 5290 <1> 5291 <1> .nosuffix: 5292 <1> 5293 <1> ; Store blanks to pad to 8 characters, but at least one 5294 0000589A B020 <1> mov al, 32 5295 <1> .pad: 5296 0000589C AA <1> stosb 5297 0000589D 81FF[3208] <1> cmp di, line_out+MNEMONOFS+8 5298 000058A1 72F9 <1> jb .pad 5299 <1> 5300 000058A3 C3 <1> retn 5301 <1> 5302 <1> 5303 <1> ; INP: byte [segmnt] = number of segment register 5304 <1> ; [segrgnam] = uppercase segment register names 5305 <1> ; CHG: bx, ax 5306 <1> ; OUT: ax = uppercase segment register name 5307 <1> showseg_uppercase_ax: 5308 000058A4 A0[CF87] <1> mov al,[segmnt] ;segment number 5309 000058A7 98 <1> cbw 5310 000058A8 D1E0 <1> shl ax,1 5311 000058AA 93 <1> xchg ax,bx ;mov bx,ax 5312 000058AB 8B87[1288] <1> mov ax,[segrgnam+bx] ;get register name 5313 000058AF C3 <1> retn 5314 <1> 5315 <1> ; SHOWSEG - Show the segment descriptor in SEGMNT 5316 <1> ; Entry DI Where to put it 5317 <1> ; Exit DI Updated 5318 <1> ; Uses AX, BX 5319 <1> 5320 <1> showseg: 5321 000058B0 E8F1FF <1> call showseg_uppercase_ax 5322 <1> dis_stosw_lowercase: 5323 000058B3 E874FF <1> call dis_lowercase_w 5324 000058B6 AB <1> stosw 5325 000058B7 C3 <1> retn 5326 <1> 5327 <1> 5328 <1> ; Write a size specifier to the buffer 5329 <1> ; and set some flags 5330 <1> ; INP: ah = r/m size value, 5331 <1> ; F0h byte (less than zero) 5332 <1> ; 00h word (equal to zero) 5333 <1> ; 10h dword (greater than zero, but != 20h) 5334 <1> ; 20h qword (greater than zero, == 20h) 5335 <1> ; di-> buffer 5336 <1> ; OUT: di-> behind size specifier in buffer 5337 <1> ; by[rmsize] set 5338 <1> ; wo[sizeloc]-> size specifier in buffer 5339 <1> ; CHG: ax 5340 <1> ; 5341 <1> ; Size specifiers are BYTE, WORD, DWORD, and QWORD. One 5342 <1> ; blank is appended to the size specifier. 5343 <1> ; 5344 <1> ; Size specifiers are lowercased if that option is selected. 5345 <1> showsize: 5346 000058B8 8826[CE87] <1> mov [rmsize], ah ; save r/m size 5347 000058BC 893E[DA87] <1> mov [sizeloc], di ; save where we're putting this 5348 000058C0 B051 <1> mov al, 'Q' 5349 000058C2 80FC20 <1> cmp ah, 20h ; QWORD ? 5350 000058C5 7412 <1> je .qword ; yes --> 5351 000058C7 80FC00 <1> cmp ah, 0 5352 000058CA 7D09 <1> jge .notbyte ; if word or dword --> 5353 <1> .byte: 5354 000058CC B85445 <1> mov ax, "TE" 5355 000058CF 50 <1> push ax 5356 000058D0 B84259 <1> mov ax, "BY" 5357 000058D3 EB0F <1> jmp s .common 5358 <1> 5359 <1> .notbyte: 5360 000058D5 7406 <1> je .word ; if word 5361 <1> .dword: 5362 000058D7 B044 <1> mov al, 'D' 5363 <1> .qword: 5364 000058D9 E855FF <1> call dis_lowercase 5365 000058DC AA <1> stosb 5366 <1> .word: 5367 000058DD B85244 <1> mov ax, "RD" 5368 000058E0 50 <1> push ax 5369 000058E1 B8574F <1> mov ax, "WO" 5370 <1> .common: 5371 000058E4 E8CCFF <1> call dis_stosw_lowercase 5372 000058E7 58 <1> pop ax 5373 000058E8 E8C8FF <1> call dis_stosw_lowercase 5374 000058EB B020 <1> mov al, 32 5375 000058ED AA <1> stosb 5376 <1> showptr.ret: 5377 000058EE C3 <1> retn 5378 <1> 5379 <1> ; Write "PTR " to a buffer if NASM syntax is not selected. 5380 <1> ; INP: di-> buffer 5381 <1> ; OUT: di-> behind written string "PTR " (or unchanged) 5382 <1> ; CHG: ax 5383 <1> ; 5384 <1> ; The string is lowercased if that option is selected. 5385 <1> showptr: 5386 000058EF F606[AC00]04 <1> testopt [asm_options], disasm_nasm 5387 000058F4 75F8 <1> jnz .ret 5388 000058F6 B85054 <1> mov ax, "PT" 5389 000058F9 E8B7FF <1> call dis_stosw_lowercase 5390 000058FC B85220 <1> mov ax, "R " 5391 000058FF EBB2 <1> jmp s dis_stosw_lowercase 5392 <1> 5393 <1> ; Write "DWORD " to a buffer 5394 <1> ; INP: di-> buffer 5395 <1> ; OUT: di-> behind written string "DWORD " 5396 <1> ; CHG: ax 5397 <1> ; 5398 <1> ; The string is lowercased if that option is selected. 5399 <1> showdword: equ showsize.dword 5400 <1> showword: equ showsize.word 5401 <1> 5402 <1> ; DISP32 - Print 32-bit displacement for addressing modes. 5403 <1> ; Entry None 5404 <1> ; Exit None 5405 <1> ; Uses AX 5406 <1> 5407 <1> disp32: 5408 00005901 E8A000 <1> call disgetword 5409 <1> .ax: 5410 00005904 50 <1> push ax 5411 00005905 E89C00 <1> call disgetword 5412 00005908 E82F61 <1> call hexword 5413 0000590B 58 <1> pop ax 5414 0000590C E92B61 <1> jmp hexword 5415 <1> 5416 <1> ; SHOWREG16 - Show 16-bit register name. 5417 <1> ; 5418 <1> ; INP: al = register number, 0 to 7 5419 <1> ; di -> buffer 5420 <1> ; OUT: register name stored to buffer 5421 <1> ; ax = INP:al * 2 5422 <1> showreg16: 5423 0000590F 98 <1> cbw 5424 00005910 D1E0 <1> shl ax,1 5425 00005912 93 <1> xchg ax,bx 5426 00005913 50 <1> push ax 5427 00005914 8B87[0288] <1> mov ax,[rgnam16+bx] 5428 00005918 E898FF <1> call dis_stosw_lowercase 5429 0000591B 58 <1> pop ax 5430 0000591C 93 <1> xchg ax,bx 5431 0000591D C3 <1> ret 5432 <1> 5433 <1> 5434 <1> ; DISCHK32D - Check for O32 (32-bit operand size). 5435 <1> dischk32d: 5436 0000591E 800E[BD87]10 <1> or byte [preused], PREOSIZE 5437 00005923 F606[BE87]10 <1> test byte [presizeflags], PRE32D 5438 00005928 C3 <1> retn 5439 <1> 5440 <1> 5441 <1> ; SHOWMACH - Return string "[needs math coprocessor]", etc. 5442 <1> ; Entry di -> table of 5 words 5443 <1> ; cx = instruction 5444 <1> ; Exit si Address of string 5445 <1> ; cx Length of string, or 0 if not needed 5446 <1> ; Uses al, di 5447 <1> 5448 <1> showmach: 5449 00005929 BE[357A] <1> mov si,needsmsg ; candidate message 5450 0000592C F606[A381]01 <1> test byte [dmflags],DM_COPR 5451 00005931 741E <1> jz sm1 ; if not a coprocessor instruction 5452 00005933 C6440937 <1> mov byte [si + needsmsg.digit_6_ofs], '7' 5453 <1> ; change message text 5454 00005937 A0[E40A] <1> mov al,[mach_87] 5455 0000593A 803E[E30A]00 <1> cmp byte [has_87],0 5456 0000593F 7517 <1> jnz sm2 ; if it has a coprocessor 5457 00005941 A0[E20A] <1> mov al,[machine] 5458 00005944 3A06[A281] <1> cmp al,[dismach] 5459 00005948 7214 <1> jb sm3 ; if we display the message 5460 0000594A BE[407A] <1> mov si,needsmath ; print this message instead 5461 0000594D B91800 <1> mov cx,needsmath_L 5462 00005950 C3 <1> retn 5463 <1> 5464 <1> sm1: 5465 00005951 C6440936 <1> mov byte [si + needsmsg.digit_6_ofs], '6' 5466 <1> ; reset message text 5467 00005955 A0[E20A] <1> mov al,[machine] 5468 <1> sm2: 5469 00005958 3A06[A281] <1> cmp al,[dismach] 5470 0000595C 730C <1> jae sm4 ; if no message (so far) 5471 <1> sm3: 5472 0000595E A0[A281] <1> mov al,[dismach] 5473 00005961 0430 <1> add al,'0' 5474 00005963 884407 <1> mov byte [si + needsmsg.digit_x_ofs], al 5475 00005966 B90B00 <1> mov cx,needsmsg_L ; length of the message 5476 00005969 C3 <1> retn 5477 <1> 5478 <1> ; Check for obsolete instruction. 5479 <1> sm4: 5480 0000596A BE[587A] <1> mov si, obsolete ; candidate message 5481 0000596D 89C8 <1> mov ax, cx ; get info on this instruction 5482 0000596F B90500 <1> mov cx, 5 5483 00005972 F2AF <1> repne scasw 5484 00005974 7511 <1> jne sm6 ; if no matches 5485 00005976 BF[BC81] <1> mov di, obsmach + 5 - 1 5486 00005979 29CF <1> sub di, cx 5487 0000597B 31C9 <1> xor cx, cx ; clear CX: no message 5488 0000597D A0[E40A] <1> mov al, byte [mach_87] 5489 00005980 3A05 <1> cmp al, byte [di] 5490 00005982 7E03 <1> jle sm5 ; if this machine is OK 5491 00005984 B90A00 <1> mov cx, obsolete_L 5492 <1> sm5: 5493 00005987 C3 <1> retn 5494 <1> 5495 <1> sm6: equ sm5 5496 <1> 5497 <1> 5498 <1> ; DISGETBYTE - Get byte for disassembler. 5499 <1> ; Entry None 5500 <1> ; Exit AL Next byte in instruction stream 5501 <1> ; Uses None 5502 <1> 5503 <1> disgetbyte: 5504 00005988 1E <1> push ds 5505 00005989 66 <1> _386_PM_o32 ; push esi 5506 0000598A 56 <1> push si ; save ds, (e)si 5507 0000598B 66 <1> _386_PM_o32 ; mov esi, dword [u_addr] 5508 0000598C 8B36[1E0B] <1> mov si, word [u_addr] 5509 00005990 66 <1> _386_PM_o32 ; add esi, dword [dis_n] 5510 00005991 0336[B887] <1> add si, word [dis_n] ; index to the right byte 5511 00005995 8E1E[220B] <1> mov ds, word [u_addr + saSegSel] 5512 00005999 67 <1> _386_PM_a32 5513 0000599A AC <1> lodsb ; get the byte 5514 0000599B 66 <1> _386_PM_o32 ; pop esi 5515 0000599C 5E <1> pop si 5516 0000599D 1F <1> pop ds ; restore regs 5517 0000599E 66 <1> _386_PM_o32 ; inc dword [dis_n] 5518 0000599F FF06[B887] <1> inc word [dis_n] ; indicate that we've gotten this byte 5519 000059A3 C3 <1> retn 5520 <1> 5521 <1> 5522 <1> ; DISGETWORD - Get word for disassembler. 5523 <1> ; Entry None 5524 <1> ; Exit AX Next word 5525 <1> ; Uses None 5526 <1> 5527 <1> disgetword: 5528 000059A4 1E <1> push ds 5529 000059A5 66 <1> _386_PM_o32 ; push esi 5530 000059A6 56 <1> push si ; save ds, (e)si 5531 000059A7 66 <1> _386_PM_o32 ; mov esi, dword [u_addr] 5532 000059A8 8B36[1E0B] <1> mov si, word [u_addr] 5533 000059AC 66 <1> _386_PM_o32 ; add esi, dword [dis_n] 5534 000059AD 0336[B887] <1> add si, word [dis_n] ; index to the right byte 5535 000059B1 8E1E[220B] <1> mov ds, word [u_addr + saSegSel] 5536 000059B5 67 <1> _386_PM_a32 5537 000059B6 AD <1> lodsw ; get the word 5538 000059B7 66 <1> _386_PM_o32 ; pop esi 5539 000059B8 5E <1> pop si 5540 000059B9 1F <1> pop ds ; restore regs 5541 000059BA 66 <1> _386_PM_o32 ; add dword [dis_n], byte 2 5542 000059BB 8306[B887]02 <1> add word [dis_n], byte 2 ; indicate that we've gotten this word 5543 000059C0 C3 <1> retn 5544 <1> 5545 <1> 5546 <1> ; DISSHOWBYTES - Show bytes for the disassembler. 5547 <1> ; Entry BX Number of bytes (must be > 0) 5548 <1> ; di-> output line 5549 <1> ; Exit u_addr updated 5550 <1> ; Uses BX, (E)SI. 5551 <1> 5552 <1> disshowbytes: 5553 000059C1 66 <1> _386_PM_o32 ; mov esi, dword [u_addr] 5554 000059C2 8B36[1E0B] <1> mov si, word [u_addr] 5555 000059C6 8E1E[220B] <1> mov ds, word [u_addr + saSegSel] 5556 <1> .loop: 5557 000059CA 67 <1> _386_PM_a32 5558 000059CB AC <1> lodsb 5559 000059CC E87260 <1> call hexbyte 5560 000059CF 4B <1> dec bx 5561 000059D0 75F8 <1> jnz .loop 5562 000059D2 16 <1> push ss 5563 000059D3 1F <1> pop ds 5564 000059D4 66 <1> _386_PM_o32 ; mov dword [u_addr], esi 5565 000059D5 8936[1E0B] <1> mov word [u_addr], si 5566 000059D9 C3 <1> retn 5567 <1> 5568 <1> ; MOVEOVER - Move the line to the right. 5569 <1> ; Entry DI Last address + 1 of line so far 5570 <1> ; Exit CX Number of bytes to move 5571 <1> ; DI Updated 5572 <1> ; Uses SI 5573 <1> moveover: 5574 000059DA 833E[DA87]00 <1> cmp word [sizeloc], byte 0 5575 000059DF 7404 <1> je mo1 ; if sizeloc not saved 5576 000059E1 010E[DA87] <1> add word [sizeloc], cx 5577 <1> 5578 <1> mo1: 5579 000059E5 89FE <1> mov si, di 5580 000059E7 01CF <1> add di, cx 5581 000059E9 89F9 <1> mov cx, di 5582 000059EB 81E9[2A08] <1> sub cx, line_out+MNEMONOFS 5583 000059EF 57 <1> push di 5584 000059F0 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 5585 000059F1 4E <1> dec si 5586 000059F2 4F <1> dec di 5587 <1> 5588 <1> 5589 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 5590 <1> ; Refer to comment in init.asm init_movp. 5591 <1> 5592 <1> %if _AMD_ERRATUM_109_WORKAROUND 5593 000059F3 E308 <1> jcxz @FF 5594 000059F5 83F914 <1> cmp cx, 20 5595 000059F8 7703 <1> ja @FF 5596 <1> @@: 5597 000059FA A4 <1> movsb 5598 000059FB E2FD <1> loop @B 5599 <1> @@: 5600 <1> %endif 5601 000059FD F3A4 <1> rep movsb 5602 000059FF 5F <1> pop di 5603 00005A00 FC <1> cld 5604 00005A01 C3 <1> retn 2108 2109 2110 %if _PM 2111 %include "pmdata.asm" 2112 <1> 2113 <1> %if 0 2114 <1> 2115 <1> lDebugX PM data 2116 <1> 2117 <1> Copyright (C) 1995-2003 Paul Vojta 2118 <1> Copyright (C) 2008-2021 C. Masloch 2119 <1> 2120 <1> Usage of the works is permitted provided that this 2121 <1> instrument is retained with the works, so that any entity 2122 <1> that uses the works is notified of this instrument. 2123 <1> 2124 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2125 <1> 2126 <1> %endif 2127 <1> 2128 <1> 2129 <1> usesection lDEBUG_DATA_ENTRY 2130 <1> 2131 000088B2 00 <1> align 4, db 0 2132 000088B4 00000000 <1> exception_csip: dd 0 ; 16:16 far 16-bit address of debugger exception 2133 000088B8 00000000 <1> dpmientry: dd 0 ; DPMI entry point returned by DPMI host 2134 000088BC 00000000 <1> dpmiwatch: dd 0 2135 000088C0 00000000 <1> dpmi_rm2pm: dd 0 2136 000088C4 00000000 <1> dpmi_rmsav: dd 0 2137 000088C8 000000000000 <1> dpmi_pm2rm: dw 0,0,0 2138 000088CE 000000000000 <1> dpmi_pmsav: dw 0,0,0 2139 <1> align 2, db 0 2140 000088D4 0000 <1> dssel: dw 0 ; debugger's (16-bit RW) data selector 2141 000088D6 0000 <1> cssel: dw 0 ; debugger's (16-bit RE) code selector 2142 000088D8 0000 <1> scratchsel: dw 0 ; scratch selector used for various purposes, limit -1 2143 000088DA 00 <1> dpmi32: db 0 ; 32-bit client if true 2144 000088DB 00 <1> bCSAttr: db 0 ; current code attribute (D bit) 2145 <1> align 2, db 0 2146 000088DC 00 <1> bAddr32: db 0 ; Address attribute. if 1, hiword(edx) is valid 2147 000088DD 00 <1> db 0 ; read/written when bAddr32 is pushed/popped 2148 <1> 2149 <1> 2150 <1> align 2, db 0 2151 <1> convsegs: 2152 <1> .: 2153 000088DE [D40A] <1> dw pInDOS + so16aSegSel 2154 <1> %if _USESDA 2155 000088E0 [DC0A] <1> dw pSDA + so16aSegSel 2156 <1> %endif 2157 000088E2 [F209] <1> dw auxbuff_segorsel + soaSegSel 2158 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 2159 000088E4 [F60A] <1> dw history.segorsel + soaSegSel 2160 <1> %endif 2161 <1> .end_fixed: 2162 <1> .amount_fixed: equ (.end_fixed - .) / 2 2163 000088E6 [040B] <1> dw a_addr + saSegSel 2164 000088E8 [0E0B] <1> dw d_addr + saSegSel 2165 <1> .end: 2166 <1> .amount: equ (.end - .) / 2 2167 <1> 2168 <1> exctab: 2169 <1> %if _CATCHEXC00 2170 000088EA 00 <1> db 00h 2171 <1> %endif 2172 <1> %if _CATCHEXC01 2173 000088EB 01 <1> db 01h 2174 <1> %endif 2175 <1> %if _CATCHEXC03 2176 000088EC 03 <1> db 03h 2177 <1> %endif 2178 <1> %if _CATCHEXC06 2179 000088ED 06 <1> db 06h 2180 <1> %endif 2181 <1> %if _CATCHEXC0C 2182 000088EE 0C <1> db 0Ch 2183 <1> %endif 2184 <1> %if _CATCHEXC0D 2185 000088EF 0D <1> db 0Dh 2186 <1> %endif 2187 <1> %if _CATCHEXC0E 2188 000088F0 0E <1> db 0Eh 2189 <1> %endif 2190 <1> endexctab: 2191 <1> 2192 <1> %if _CATCHPMINT214C || _DEBUG 2193 000088F1 00 <1> align 8, db 0 2194 <1> excsave: 2195 <1> .: 2196 <1> %if _CATCHEXC00 2197 000088F8 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0 2198 <1> %endif 2199 <1> %if _CATCHEXC01 2200 00008900 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 1 2201 <1> %endif 2202 <1> %if _CATCHEXC03 2203 00008908 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 3 2204 <1> %endif 2205 <1> %if _CATCHEXC06 2206 00008910 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 6 2207 <1> %endif 2208 <1> %if _CATCHEXC0C 2209 00008918 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0C 2210 <1> %endif 2211 <1> %if _CATCHEXC0D 2212 00008920 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0D 2213 <1> %endif 2214 <1> %if _CATCHEXC0E 2215 00008928 FFFFFFFFFFFF0000 <1> dw -1,-1,-1,0 ; 0E 2216 <1> %endif 2217 <1> .end: 2218 <1> .amount: equ (.end - .) / 8 2219 <1> 2220 <1> %if .amount != (endexctab - exctab) 2221 <1> %error Wrong excsave length 2222 <1> %endif 2223 <1> %endif 2224 <1> 2225 <1> %if CATCHPMINTAMOUNT 2226 <1> pminttab: 2227 <1> .: 2228 <1> %if _CATCHPMINT214C 2229 00008930 21 <1> db 21h 2230 00008931 [368A] <1> dw pmint21 2231 <1> %endif 2232 <1> .end: 2233 <1> .amount: equ (.end - .) / 3 2234 <1> 2235 00008933 00 <1> align 8, db 0 2236 <1> pmintsave: 2237 <1> .: 2238 <1> %if _CATCHPMINT214C 2239 00008938 FFFFFFFFFFFF0000 <1> .int21: dw -1,-1,-1,0 2240 <1> %endif 2241 <1> .end: 2242 <1> .amount: equ (.end - .) / 8 2243 <1> %endif 2112 %include "pminit.asm" 2113 <1> 2114 <1> %if 0 2115 <1> 2116 <1> lDebugX PM initialisation 2117 <1> 2118 <1> Copyright (C) 1995-2003 Paul Vojta 2119 <1> Copyright (C) 2008-2021 C. Masloch 2120 <1> 2121 <1> Usage of the works is permitted provided that this 2122 <1> instrument is retained with the works, so that any entity 2123 <1> that uses the works is notified of this instrument. 2124 <1> 2125 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2126 <1> 2127 <1> %endif 2128 <1> 2129 <1> 2130 <1> usesection lDEBUG_DATA_ENTRY 2131 <1> 2132 <1> ; Int2F handler. Starts with an IISP header. 2133 <1> align 2, db 0 2134 00008940 EB10000000004B4200- <1> iispentry debug2F, 0, debug2F 2134 00008949 EB4100 <1> 2135 <1> oldi2F: equ debug2F.next 2136 00008952 9C <1> pushf 2137 00008953 3D8716 <1> cmp ax, 1687h 2138 <1> dpmidisable: ; set this byte to __TEST_IMM8 to disable new DPMI entry 2139 00008956 7406 <1> je dpmiquery 2140 00008958 9D <1> popf 2141 <1> jumpoldi2F: 2142 00008959 2EFF2E[4289] <1> jmp far [ cs:oldi2F ] 2143 <1> 2144 <1> dpmiquery: 2145 0000895E 0E <1> push cs 2146 0000895F E8F7FF <1> call jumpoldi2F 2147 00008962 85C0 <1> test ax, ax 2148 00008964 750F <1> jnz .nohost 2149 <1> 2150 00008966 2E893E[B888] <1> mov word [ cs:dpmientry+0 ], di 2151 0000896B 2E8C06[BA88] <1> mov word [ cs:dpmientry+2 ], es 2152 00008970 BF[7689] <1> mov di, mydpmientry 2153 00008973 0E <1> push cs 2154 00008974 07 <1> pop es 2155 <1> .nohost: 2156 00008975 CF <1> iret 2157 <1> 2158 <1> mydpmientry: 2159 00008976 2EC606[DA88]00 <1> mov byte [ cs:dpmi32 ], 0 2160 0000897C A801 <1> test al, 1 2161 0000897E 7405 <1> jz .16 2162 00008980 2EFE06[DA88] <1> inc byte [ cs:dpmi32 ] 2163 <1> .16: 2164 00008985 2EFF1E[B888] <1> call far [ cs:dpmientry ] 2165 0000898A 7301 <1> jnc installdpmi 2166 <1> debug2F.hwreset: 2167 0000898C CB <1> retf 2168 <1> 2169 <1> 2170 <1> subcpu 286 2171 <1> installdpmi: 2172 0000898D 60 <1> pusha 2173 0000898E 89E5 <1> mov bp, sp ; [bp+16]=ip, [bp+18]=cs 2174 00008990 9C <1> pushf 2175 00008991 1E <1> push ds 2176 00008992 06 <1> push es 2177 <1> 2178 00008993 8CCB <1> mov bx, cs 2179 00008995 B80600 <1> mov ax, 0006h 2180 00008998 CD31 <1> int 31h 2181 0000899A 7303E99200 <1> jc .fataldpmierr ; get base address of cs 2182 0000899F F6C20F <1> test dl, 15 2183 000089A2 7403E98A00 <1> jnz .fataldpmierr 2184 000089A7 F7C1F0FF <1> test cx, 0FFF0h 2185 000089AB 7403E98100 <1> jnz .fataldpmierr 2186 000089B0 C1EA04 <1> shr dx, 4 2187 000089B3 C1E10C <1> shl cx, 12 2188 000089B6 09CA <1> or dx, cx 2189 000089B8 2E3916[A60A] <1> cmp word [cs:pspdbg], dx 2190 000089BD 7572 <1> jne .fataldpmierr 2191 <1> 2192 000089BF 8CCB <1> mov bx, cs 2193 000089C1 B80A00 <1> mov ax, 000Ah ; get a data descriptor for DEBUG's segment 2194 000089C4 CD31 <1> int 31h 2195 000089C6 7269 <1> jc .fataldpmierr 2196 000089C8 8ED8 <1> mov ds, ax 2197 000089CA 8C0E[D688] <1> mov word [ cssel ], cs 2198 000089CE A3[D488] <1> mov word [ dssel ], ax 2199 <1> 2200 000089D1 89C3 <1> mov bx, ax 2201 000089D3 0F02CB <1> lar cx, bx 2202 000089D6 7559 <1> jnz .fataldpmierr 2203 000089D8 C1E908 <1> shr cx, 8 2204 000089DB F606[8600]10 <1> testopt [options3], opt3_ss_b_bit_set 2205 000089E0 7407 <1> jz @F 2206 000089E2 800E[A600]10 <1> setopt [internalflags3], dif3_ss_b_bit_set 2207 000089E7 B540 <1> mov ch, 40h 2208 <1> @@: 2209 000089E9 B80900 <1> mov ax, 0009h 2210 000089EC CD31 <1> int 31h 2211 000089EE 7241 <1> jc .fataldpmierr 2212 <1> 2213 000089F0 B90100 <1> mov cx, 1 ; allocate code_sel selector 2214 000089F3 31C0 <1> xor ax, ax 2215 000089F5 CD31 <1> int 31h 2216 000089F7 7238 <1> jc .fataldpmierr 2217 000089F9 A3[D000] <1> mov word [ code_sel ], ax 2218 000089FC 89C3 <1> mov bx, ax 2219 000089FE 31C9 <1> xor cx, cx 2220 00008A00 83CAFF <1> or dx, -1 ; cx:dx = 0FFFFh 2221 00008A03 B80800 <1> mov ax, 0008h 2222 00008A06 CD31 <1> int 31h ; set limit 64 KiB 2223 00008A08 7227 <1> jc .fataldpmierr 2224 00008A0A 0F020E[D688] <1> lar cx, word [ cssel ] ; get access rights/type of cs 2225 00008A0F 7520 <1> jnz .fataldpmierr 2226 00008A11 C1E908 <1> shr cx, 8 ; proper format for 31.0009 2227 <1> ; high byte zero (16-bit and byte-granular selector) 2228 00008A14 B80900 <1> mov ax, 0009h 2229 00008A17 CD31 <1> int 31h ; set descriptor access rights/type 2230 00008A19 7216 <1> jc .fataldpmierr 2231 <1> 2232 00008A1B 8B16[CE00] <1> mov dx, word [ code_seg ] 2233 00008A1F 89D1 <1> mov cx, dx 2234 00008A21 C1E204 <1> shl dx, 4 2235 00008A24 C1E90C <1> shr cx, 12 2236 00008A27 B80700 <1> mov ax, 0007h 2237 00008A2A CD31 <1> int 31h ; set selector base to code segment's base 2238 <1> 2239 00008A2C E8B7F6 <1> call entry_to_code_sel 2240 00008A2F [025A] <1> dw installdpmi_code 2241 <1> 2242 <1> .fataldpmierr: 2243 00008A31 B8FF4C <1> mov ax, 4CFFh 2244 00008A34 CD21 <1> int 21h 2245 <1> 2246 <1> 2247 <1> usesection lDEBUG_CODE 2248 <1> 2249 <1> code_insure_low_byte_not_0CCh 2250 <1> installdpmi_code: 2251 <1> ; Some code (particularly d4message) may expect us to 2252 <1> ; run on the debugger's stack, to access the data 2253 <1> ; segment. Therefore, switch stacks. 2254 00005A02 8CDA <1> mov dx, ds ; dx = ds = debugger data selector 2255 00005A04 8CD0 <1> mov ax, ss 2256 00005A06 89E3 <1> mov bx, sp ; ax:bx = stack to restore 2257 00005A08 8ED2 <1> mov ss, dx 2258 00005A0A 8B26[A00A] <1> mov sp, [run_sp] ; switch to our stack 2259 <1> 2260 00005A0E 50 <1> push ax 2261 00005A0F 53 <1> push bx ; save original stack, far pointer 2262 <1> 2263 00005A10 800E[9D00]08 <1> setopt [internalflags], protectedmode 2264 <1> 2265 <1> d4 call d4message 2266 <1> d4 asciz "In installdpmi_code",13,10 2267 <1> 2268 00005A15 B90200 <1> mov cx, 2 ; alloc 2 descriptors 2269 00005A18 31C0 <1> xor ax, ax 2270 00005A1A CD31 <1> int 31h 2271 00005A1C 7303E9F101 <1> jc .fataldpmierr 2272 <1> 2273 <1> d4 call d4message 2274 <1> d4 asciz "In installdpmi_code, allocated 2 descriptors",13,10 2275 <1> 2276 00005A21 A3[D888] <1> mov word [ scratchsel ], ax ; the first is used as scratch descriptor 2277 00005A24 89C3 <1> mov bx, ax 2278 00005A26 31C9 <1> xor cx, cx 2279 <1> %if 1 2280 00005A28 49 <1> _386 dec cx ; set a limit of FFFFFFFFh if 386 2281 <1> %else 2282 <1> cmp byte [ dpmi32 ], 0 2283 <1> je .16 2284 <1> dec cx ; set a limit of FFFFFFFFh if 32-bit client 2285 <1> .16: 2286 <1> %endif 2287 00005A29 83CAFF <1> or dx, byte -1 2288 00005A2C B80800 <1> mov ax, 0008h 2289 00005A2F CD31 <1> int 31h 2290 00005A31 B80300 <1> mov ax, 0003h 2291 00005A34 CD31 <1> int 31h ; get selector increment 2292 <1> %if 0 2293 <1> jnc .03sup 2294 <1> mov ax, 8 2295 <1> .03sup: 2296 <1> %endif 2297 00005A36 01C3 <1> add bx, ax ; the second selector is client's CS 2298 00005A38 31C9 <1> xor cx, cx ; this limit is FFFFh even for 32-bits 2299 00005A3A B80800 <1> mov ax, 0008h 2300 00005A3D CD31 <1> int 31h 2301 <1> 2302 00005A3F 5A <1> pop dx 2303 00005A40 58 <1> pop ax 2304 00005A41 8EC0 <1> mov es, ax 2305 00005A43 50 <1> push ax 2306 00005A44 52 <1> push dx 2307 <1> 2308 00005A45 268B5612 <1> mov dx, word [ es:bp+18 ] 2309 <1> ; get client's CS 2310 00005A49 E8B03E <1> call setrmaddr ; set base 2311 00005A4C 0F020E[D688] <1> lar cx, word [ cssel ] 2312 00005A51 7403E9BC01 <1> jnz .fataldpmierr 2313 00005A56 C1E908 <1> shr cx, 8 ; CS remains 16-bit 2314 00005A59 B80900 <1> mov ax, 0009h 2315 00005A5C CD31 <1> int 31h 2316 00005A5E 89DA <1> mov dx, bx 2317 00005A60 26895E12 <1> mov word [ es:bp+18 ], bx 2318 <1> 2319 00005A64 FC <1> cld 2320 <1> 2321 00005A65 BE[DE88] <1> mov si, convsegs 2322 00005A68 B90400 <1> mov cx, convsegs.amount_fixed 2323 <1> .loopseg: 2324 <1> d4 call d4message 2325 <1> d4 asciz "In installdpmi_code.loopseg",13,10 2326 <1> 2327 00005A6B AD <1> lodsw 2328 00005A6C 89C7 <1> mov di, ax 2329 00005A6E 8B5D02 <1> mov bx, word [di + soaSegment] 2330 00005A71 B80200 <1> mov ax, 0002h 2331 00005A74 CD31 <1> int 31h 2332 00005A76 7303E99701 <1> jc .fataldpmierr 2333 00005A7B 894504 <1> mov word [di + soaSelector], ax 2334 00005A7E E2EB <1> loop .loopseg 2335 <1> 2336 <1> d4 call d4message 2337 <1> d4 asciz "In installdpmi_code after .loopseg",13,10 2338 <1> 2339 00005A80 6657 <1> _386 push edi 2340 00005A82 6631FF <1> _386 xor edi, edi ; clear edih 2341 00005A85 8026[9E00]DB <1> clropt [internalflags], canswitchmode|switchbuffer 2342 00005A8A 31ED <1> xor bp, bp 2343 00005A8C 45 <1> _386 inc bp 2344 00005A8D 45 <1> _386 inc bp 2345 <1> .save16: 2346 00005A8E B80503 <1> mov ax, 0305h ; get raw mode-switch save state addresses 2347 00005A91 CD31 <1> int 31h 2348 00005A93 7303E9A000 <1> jc .cannotswitch 2349 00005A98 3D1020 <1> cmp ax, _AUXBUFFSIZE ; fits into auxbuff ? 2350 00005A9B 7603E99800 <1> ja .cannotswitch ; no --> 2351 00005AA0 85C0 <1> test ax, ax 2352 00005AA2 7473 <1> jz .nobuffer 2353 <1> 2354 <1> .switchbuffer_init: 2355 00005AA4 50 <1> push ax ; ax = target switchbuffer size 2356 00005AA5 53 <1> push bx 2357 00005AA6 51 <1> push cx 2358 00005AA7 56 <1> push si 2359 00005AA8 57 <1> push di ; preserve regs returned by fn 0305h 2360 <1> 2361 00005AA9 8B3E[F009] <1> mov di, word [auxbuff_switchbuffer_size] 2362 00005AAD 89F9 <1> mov cx, di 2363 00005AAF 29C1 <1> sub cx, ax 2364 00005AB1 7441 <1> je .no_switchbuffer_size_change 2365 00005AB3 8E06[F609] <1> mov es, word [auxbuff_segorsel + soaSelector] 2366 00005AB7 7737 <1> ja .fillblanks 2367 <1> 2368 00005AB9 F7D9 <1> neg cx ; = amount of bytes to move 2369 <1> 2370 <1> .try_again: 2371 00005ABB 8B36[FA09] <1> mov si, word [auxbuff_behind_last_silent] 2372 <1> ; (auxbuff):di -> next buffer (if it fits) 2373 00005ABF B81020 <1> mov ax, _AUXBUFFSIZE 2374 00005AC2 29F0 <1> sub ax, si ; number of bytes left free 2375 00005AC4 39C8 <1> cmp ax, cx ; fits ? 2376 00005AC6 7307 <1> jae .simple ; yes --> 2377 <1> 2378 <1> .delete: 2379 00005AC8 E83862 <1> call silence_delete_one_string.internal 2380 00005ACB 7228 <1> jc .switchbuffer_error 2381 00005ACD EBEC <1> jmp .try_again 2382 <1> 2383 <1> .simple: 2384 00005ACF 1E <1> push ds 2385 00005AD0 56 <1> push si 2386 <1> ; -> behind used data minus start of auxbuff (0) 2387 <1> ; = how much to copy 2388 00005AD1 4E <1> dec si ; -> last used byte 2389 00005AD2 89F7 <1> mov di, si ; -> last used source byte 2390 00005AD4 01CF <1> add di, cx ; -> destination of last byte 2391 00005AD6 010E[FA09] <1> add word [auxbuff_behind_last_silent], cx 2392 <1> ; update silent pointer 2393 00005ADA 010E[F809] <1> add word [auxbuff_behind_while_condition], cx 2394 <1> ; update while pointer 2395 00005ADE 59 <1> pop cx ; = how much to copy 2396 00005ADF FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 2397 00005AE0 06 <1> push es 2398 00005AE1 1F <1> pop ds 2399 <1> 2400 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 2401 <1> ; Refer to comment in init.asm init_movp. 2402 <1> 2403 <1> %if _AMD_ERRATUM_109_WORKAROUND 2404 00005AE2 E308 <1> jcxz @FF 2405 00005AE4 83F914 <1> cmp cx, 20 2406 00005AE7 7703 <1> ja @FF 2407 <1> @@: 2408 00005AE9 A4 <1> movsb 2409 00005AEA E2FD <1> loop @B 2410 <1> @@: 2411 <1> %endif 2412 00005AEC F3A4 <1> rep movsb ; copy up silent buffer and while cond 2413 00005AEE FC <1> cld 2414 <1> 2415 00005AEF 1F <1> pop ds 2416 <1> 2417 <1> ; (fall through. cx is equal to zero here so the 2418 <1> ; rep stosb in .fillblanks is effectively a no-op.) 2419 <1> 2420 <1> .fillblanks: 2421 <1> ; This isn't really supported but we'll do enough 2422 <1> ; to handle basic cases. WHILE conditions use the 2423 <1> ; switchbuffer size to find their stored condition. 2424 <1> ; So fill the additional space with blanks, which 2425 <1> ; WHILE condition parsing will happily eat up. 2426 00005AF0 B020 <1> mov al, 32 2427 00005AF2 F3AA <1> rep stosb 2428 <1> 2429 <1> .no_switchbuffer_size_change: 2430 00005AF4 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 2431 <1> .switchbuffer_error: 2432 00005AF5 F9 <1> stc 2433 00005AF6 5F <1> pop di 2434 00005AF7 5E <1> pop si 2435 00005AF8 59 <1> pop cx 2436 00005AF9 5B <1> pop bx ; restore returned registers 2437 00005AFA 58 <1> pop ax ; ax = target switchbuffer size 2438 00005AFB 723B <1> jc .cannotswitch 2439 00005AFD A3[F009] <1> mov word [auxbuff_switchbuffer_size], ax 2440 00005B00 800E[9E00]20 <1> setopt [internalflags], switchbuffer 2441 00005B05 890E[C488] <1> mov word [dpmi_rmsav+0], cx 2442 00005B09 891E[C688] <1> mov word [dpmi_rmsav+2], bx 2443 00005B0D 66 <1> _386_o32 ; mov dword [dpmi_pmsav], edi 2444 00005B0E 893E[CE88] <1> mov word [dpmi_pmsav], di 2445 00005B12 3E89B6[D088] <1> mov word [ds:bp+dpmi_pmsav+2], si 2446 <1> .nobuffer: 2447 00005B17 6631FF <1> _386 xor edi, edi ; clear edih 2448 00005B1A B80603 <1> mov ax, 0306h ; get raw mode-switch addresses 2449 00005B1D CD31 <1> int 31h 2450 00005B1F 7217 <1> jc .cannotswitch 2451 00005B21 800E[9E00]04 <1> setopt [internalflags], canswitchmode 2452 00005B26 890E[C088] <1> mov word [dpmi_rm2pm+0], cx 2453 00005B2A 891E[C288] <1> mov word [dpmi_rm2pm+2], bx 2454 00005B2E 66 <1> _386_o32 ; mov dword [dpmi_pm2rm], edi 2455 00005B2F 893E[C888] <1> mov word [dpmi_pm2rm], di 2456 00005B33 3E89B6[CA88] <1> mov word [ds:bp+dpmi_pm2rm+2], si 2457 <1> .cannotswitch: 2458 00005B38 665F <1> _386 pop edi 2459 <1> 2460 00005B3A 6652 <1> _386 push edx 2461 00005B3C 6650 <1> _386 push eax 2462 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2463 00005B3E 06 <1> push es 2464 00005B3F 1E <1> push ds 2465 00005B40 07 <1> pop es 2466 <1> %endif 2467 <1> 2468 <1> %if CATCHEXCAMOUNT 2469 00005B41 BE[EA88] <1> mov si, exctab ; hook several exceptions 2470 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2471 00005B44 BF[F888] <1> mov di, excsave 2472 <1> %endif 2473 00005B47 6631D2 <1> _386 xor edx, edx ; clear edxh 2474 00005B4A BA[4E8A] <1> mov dx, exc_first 2475 <1> .loopexc: 2476 00005B4D AC <1> lodsb 2477 <1> d4 call d4message 2478 <1> d4 asciz "In installdpmi_code.loopexc, ax=" 2479 <1> d4 push ax 2480 <1> d4 call d4disp_stack_hex 2481 <1> d4 call d4message 2482 <1> d4 asciz 13,10 2483 <1> 2484 00005B4E 88C3 <1> mov bl, al 2485 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2486 00005B50 66 <1> _386_o32 ; push edx 2487 00005B51 52 <1> push dx ; preserve excXX pointer 2488 00005B52 B80202 <1> mov ax, 0202h 2489 <1> ; (edxh is zero) 2490 00005B55 CD31 <1> int 31h ; cx:(e)dx -> prior handler 2491 00005B57 66 <1> _386_o32 ; xchg eax, edx 2492 00005B58 92 <1> xchg ax, dx 2493 00005B59 66 <1> _386_o32 ; stosd 2494 00005B5A AB <1> stosw ; store offset (dword on 386+, else word) 2495 00005B5B 91 <1> xchg ax, cx 2496 00005B5C AB <1> stosw ; store selector 2497 00005B5D B80400 <1> mov ax, 4 2498 00005B60 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 2499 00005B62 01C7 <1> add di, ax ; -> next entry of excsave 2500 00005B64 66 <1> _386_o32 ; pop edx 2501 00005B65 5A <1> pop dx 2502 <1> %endif 2503 00005B66 8B0E[D688] <1> mov cx, word [cssel] ; -> our handler for this exception 2504 00005B6A B80302 <1> mov ax, 0203h 2505 00005B6D CD31 <1> int 31h ; set our handler 2506 00005B6F 83C206 <1> add dx, byte exc_second - exc_first 2507 <1> ; -> next handler 2508 00005B72 81FE[F188] <1> cmp si, endexctab ; if another to go --> 2509 00005B76 72D5 <1> jb .loopexc 2510 <1> %endif 2511 <1> 2512 <1> %if CATCHPMINTAMOUNT 2513 00005B78 BE[3089] <1> mov si, pminttab ; ds:si -> pminttab 2514 00005B7B BF[3889] <1> mov di, pmintsave ; es:di -> pmintsave 2515 <1> .loopint: 2516 00005B7E AC <1> lodsb ; get interrupt number 2517 00005B7F 88C3 <1> mov bl, al ; bl = interrupt number 2518 00005B81 6631D2 <1> _386 xor edx, edx ; clear edxh 2519 00005B84 B80402 <1> mov ax, 0204h 2520 00005B87 CD31 <1> int 31h ; cx:(e)dx -> prior handler 2521 00005B89 66 <1> _386_o32 ; xchg eax, edx 2522 00005B8A 92 <1> xchg ax, dx ; (e)ax = offset 2523 00005B8B 66 <1> _386_o32 ; stosd 2524 00005B8C AB <1> stosw ; store offset (dword on 386+, else word) 2525 00005B8D 91 <1> xchg ax, cx 2526 00005B8E AB <1> stosw ; store selector 2527 00005B8F B80400 <1> mov ax, 4 2528 00005B92 29E8 <1> sub ax, bp ; if 386, ax = 4 - 2 = 2, else ax = 4 2529 00005B94 01C7 <1> add di, ax ; -> next entry of pmintsave 2530 00005B96 AD <1> lodsw ; ax -> our handler 2531 00005B97 6631D2 <1> _386 xor edx, edx 2532 00005B9A 92 <1> xchg ax, dx ; (e)dx -> our handler 2533 00005B9B 8B0E[D688] <1> mov cx, word [cssel] ; cx:(e)dx -> our handler 2534 00005B9F B80502 <1> mov ax, 0205h 2535 00005BA2 CD31 <1> int 31h 2536 00005BA4 81FE[3389] <1> cmp si, pminttab.end 2537 00005BA8 72D4 <1> jb .loopint 2538 <1> %endif 2539 <1> 2540 <1> %if (_CATCHPMINT214C || _DEBUG) || 1 2541 00005BAA 07 <1> pop es 2542 <1> %endif 2543 00005BAB 6658 <1> _386 pop eax 2544 00005BAD 665A <1> _386 pop edx 2545 <1> 2546 00005BAF BE[DE88] <1> mov si, convsegs 2547 <1> @@: 2548 00005BB2 AD <1> lodsw 2549 00005BB3 97 <1> xchg ax, di 2550 00005BB4 FF7504 <1> push word [di + soaSelector] 2551 00005BB7 8F05 <1> pop word [di + soaSegSel] 2552 00005BB9 81FE[E688] <1> cmp si, convsegs.end_fixed 2553 00005BBD 72F3 <1> jb @B 2554 <1> 2555 00005BBF F606[9D00]01 <1> testopt [internalflags], hooked2F 2556 00005BC4 7431 <1> jz .notours ; not currently hooked --> 2557 <1> 2558 00005BC6 B02F <1> mov al, 2Fh ; interrupt number 2559 00005BC8 BE[4089] <1> mov si, debug2F ; -> IISP entry header 2560 00005BCB BA0200 <1> mov dx, opt4_int_2F_force >> 16 2561 00005BCE E8F176 <1> call UnhookInterruptForce 2562 <1> ; try unhooking it 2563 00005BD1 730B <1> jnc .got2F 2564 <1> 2565 <1> .not2F: 2566 00005BD3 C706[186B]3246 <1> mov word [msg.serial_cannot_unhook.int], "2F" 2567 00005BD9 BA[F46A] <1> mov dx, msg.serial_cannot_unhook 2568 00005BDC EB16 <1> jmp @F 2569 <1> 2570 <1> .got2F: 2571 00005BDE 8026[9D00]FE <1> clropt [internalflags], hooked2F 2572 00005BE3 8026[A800]FD <1> clropt [internalflags4], dif4_int_2F_hooked 2573 00005BE8 E8E477 <1> call update_inttab_optional 2574 00005BEB C706[8A6B]3246 <1> mov word [msg.serial_late_unhook.int], "2F" 2575 00005BF1 BA[696B] <1> mov dx, msg.serial_late_unhook 2576 <1> @@: 2577 00005BF4 E8F961 <1> call putsz 2578 <1> .notours: 2579 <1> 2580 <1> 2581 <1> ; This is a bit silly: If we're never 2582 <1> ; entered in PM except for installdpmi 2583 <1> ; then the debugger thinks that the 2584 <1> ; SegSel fields should be segments. 2585 <1> ; It won't re-initialise them because 2586 <1> ; according to the flag used by run, 2587 <1> ; it was last running in 86 Mode. 2588 <1> ; So for now just hack them back. 2589 00005BF7 BE[DE88] <1> mov si, convsegs 2590 <1> @@: 2591 00005BFA AD <1> lodsw 2592 00005BFB 97 <1> xchg ax, di 2593 00005BFC FF7502 <1> push word [di + soaSegment] 2594 00005BFF 8F05 <1> pop word [di + soaSegSel] 2595 00005C01 81FE[E688] <1> cmp si, convsegs.end_fixed 2596 00005C05 72F3 <1> jb @B 2597 <1> 2598 <1> d4 call d4message 2599 <1> d4 asciz "In installdpmi_code end",13,10 2600 <1> 2601 00005C07 5B <1> pop bx 2602 00005C08 58 <1> pop ax 2603 00005C09 8ED0 <1> mov ss, ax 2604 00005C0B 89DC <1> mov sp, bx ; return to user stack 2605 <1> 2606 00005C0D 07 <1> pop es 2607 00005C0E 1F <1> pop ds 2608 00005C0F 9D <1> popf 2609 00005C10 61 <1> popa 2610 00005C11 CB <1> retf 2611 <1> 2612 <1> .fataldpmierr: 2613 <1> d4 call d4message 2614 <1> d4 asciz "In installdpmi_code.fataldpmierr",13,10 2615 00005C12 B8FF4C <1> mov ax, 4CFFh 2616 00005C15 CD21 <1> int 21h 2113 %include "pmentry.asm" 2114 <1> 2115 <1> %if 0 2116 <1> 2117 <1> lDebugX PM entrypoints 2118 <1> 2119 <1> Copyright (C) 1995-2003 Paul Vojta 2120 <1> Copyright (C) 2008-2021 C. Masloch 2121 <1> 2122 <1> Usage of the works is permitted provided that this 2123 <1> instrument is retained with the works, so that any entity 2124 <1> that uses the works is notified of this instrument. 2125 <1> 2126 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2127 <1> 2128 <1> %endif 2129 <1> 2130 <1> 2131 <1> usesection lDEBUG_DATA_ENTRY 2132 <1> 2133 <1> %if _CATCHPMINT214C 2134 <1> pmint21: 2135 00008A36 80FC4C <1> cmp ah, 4Ch 2136 00008A39 750C <1> jne .next_no_pop 2137 00008A3B 1E <1> push ds 2138 00008A3C 2E8E1E[D488] <1> mov ds, word [cs:dssel] 2139 00008A41 E8A2F6 <1> call entry_to_code_sel 2140 00008A44 [175C] <1> dw pmint21_4C_code 2141 <1> 2142 <1> .next: 2143 00008A46 1F <1> pop ds 2144 <1> .next_no_pop: 2145 <1> %ifn _ONLYNON386 2146 <1> ..@patch_no386_nop_DATA_ENTRY: 2147 00008A47 66 <1> o32 2148 <1> %endif 2149 00008A48 2EFF2E[3889] <1> jmp far [cs:pmintsave.int21] 2150 <1> 2151 <1> 2152 <1> usesection lDEBUG_CODE 2153 <1> 2154 <1> code_insure_low_byte_not_0CCh 2155 <1> pmint21_4C_code: 2156 00005C17 FF36[D688] <1> push word [cssel] 2157 00005C1B 68[468A] <1> push word pmint21.next 2158 <1> 2159 00005C1E 66 <1> _386_o32 2160 00005C1F 60 <1> pusha 2161 00005C20 06 <1> push es 2162 <1> 2163 <1> ; Some code (particularly d4message) may expect us to 2164 <1> ; run on the debugger's stack, to access the data 2165 <1> ; segment. Therefore, switch stacks. 2166 00005C21 8CDA <1> mov dx, ds ; dx = ds = debugger data selector 2167 00005C23 8CD0 <1> mov ax, ss 2168 00005C25 66 <1> _386_o32 ; mov ebx, esp 2169 00005C26 89E3 <1> mov bx, sp ; ax:(e)bx = stack to restore 2170 00005C28 6631C9 <1> _386 xor ecx, ecx ; clear ecxh 2171 00005C2B 8B0E[A00A] <1> mov cx, word [run_sp] ; dx:(e)cx = our stack 2172 00005C2F 8ED2 <1> mov ss, dx 2173 <1> %ifn _ONLYNON386 2174 <1> ..@patch_no386_ds_2: ; (as for the other case in run.asm 2175 <1> ; insure to set sp directly after ss) 2176 00005C31 66 <1> o32 ; mov esp, ecx 2177 <1> %endif 2178 00005C32 89CC <1> mov sp, cx ; switch to our stack 2179 <1> 2180 00005C34 50 <1> push ax 2181 00005C35 66 <1> _386_o32 ; push ebx 2182 00005C36 53 <1> push bx ; save original stack, far pointer 2183 <1> 2184 00005C37 800E[9D00]08 <1> setopt [internalflags], protectedmode 2185 <1> 2186 <1> 2187 <1> ; remember that we cannot access Protected Mode any longer 2188 <1> ; (also clear modeswitched flag so resetmode is a no-op) 2189 00005C3C 8026[9E00]D3 <1> clropt [internalflags], canswitchmode | switchbuffer | modeswitched 2190 <1> 2191 00005C41 8B0E[F009] <1> mov cx, word [auxbuff_switchbuffer_size] 2192 00005C45 E30A <1> jcxz .no_switchbuffer_size_change 2193 00005C47 8E06[F609] <1> mov es, word [auxbuff_segorsel + soaSelector] 2194 00005C4B 31FF <1> xor di, di ; es:di -> auxbuff switchbuffer 2195 00005C4D B020 <1> mov al, 32 2196 00005C4F F3AA <1> rep stosb ; fill with blanks (for WHILE) 2197 <1> .no_switchbuffer_size_change: 2198 00005C51 8326[F009]00 <1> and word [auxbuff_switchbuffer_size], 0 2199 <1> 2200 00005C56 16 <1> push ss 2201 00005C57 07 <1> pop es 2202 <1> 2203 00005C58 E8E4E8 <1> call pm_reset_handlers 2204 <1> 2205 <1> 2206 00005C5B 66 <1> _386_o32 2207 00005C5C 5B <1> pop bx 2208 00005C5D 58 <1> pop ax ; ax:(e)bx = original stack 2209 00005C5E 8ED0 <1> mov ss, ax 2210 <1> %ifn _ONLYNON386 2211 <1> ..@patch_no386_ds_3: ; (as for the other case above 2212 <1> ; insure to set sp directly after ss) 2213 00005C60 66 <1> o32 ; mov esp, ebx 2214 <1> %endif 2215 00005C61 89DC <1> mov sp, bx ; return to user stack 2216 <1> 2217 00005C63 07 <1> pop es 2218 00005C64 66 <1> _386_o32 2219 00005C65 61 <1> popa 2220 <1> 2221 00005C66 CB <1> retf ; jump to cssel:pmint21.next 2222 <1> %endif 2223 <1> 2224 <1> 2225 <1> usesection lDEBUG_DATA_ENTRY 2226 <1> 2227 <1> struc exceptionframe16 2228 00000000 <1> resw 8 ; pusha 2229 00000010 ???? <1> fr16_ds: resw 1 ; push ds 2230 00000012 ???????? <1> resw 2 ; 16-bit return address to DPMI host 2231 00000016 ???? <1> resw 1 ; error code 2232 00000018 ???? <1> fr16_ip: resw 1 2233 0000001A ???? <1> fr16_cs: resw 1 2234 0000001C ???? <1> fr16_fl: resw 1 2235 0000001E ???? <1> fr16_sp: resw 1 2236 00000020 ???? <1> fr16_ss: resw 1 2237 <1> endstruc 2238 <1> 2239 <1> struc exceptionframe32 2240 00000000 <1> resd 8 ; pushad 2241 00000020 ???? <1> resw 1 ; stack alignment 2242 00000022 ???? <1> fr32_ds: resw 1 ; push ds 2243 00000024 ???????????????? <1> resd 2 ; 32-bit return address to DPMI host 2244 0000002C ???????? <1> resd 1 ; error code 2245 00000030 ???????? <1> fr32_eip: resd 1 2246 00000034 ???????? <1> fr32_cs: resd 1 2247 00000038 ???????? <1> fr32_efl: resd 1 2248 0000003C ???????? <1> fr32_esp: resd 1 2249 00000040 ???????? <1> fr32_ss: resd 1 2250 <1> endstruc 2251 <1> 2252 <1> %assign EXC_ENTRY_FIRST 1 2253 <1> %macro exc_entry 2.nolist 2254 <1> %ifn EXC_ENTRY_FIRST 2255 <1> jmp strict short exc 2256 <1> %endif 2257 <1> exc %+ %1 %+ : 2258 <1> push ds 2259 <1> push %2 2260 <1> %if EXC_ENTRY_FIRST 2261 <1> exc_second: equ $ + 2 ; + 2 for short jump 2262 <1> %endif 2263 <1> %assign EXC_ENTRY_FIRST 0 2264 <1> %endmacro 2265 <1> 2266 00008A4D 00 <1> align 2, db 0 2267 <1> ; Exception handlers. 2268 <1> ; These are the entry into the debugger in protected mode. 2269 <1> ; The address difference between exc_first and exc_second 2270 <1> ; is assumed to be the same for all the entries. This is 2271 <1> ; above, in installdpmi, as well as in run.asm run. These 2272 <1> ; are where the exception handlers are installed. 2273 <1> 2274 <1> exc_first: 2275 <1> %if _CATCHEXC00 2276 00008A4E 1E68[627A] <1> exc_entry 00, int0msg 2277 <1> %endif 2278 <1> %if _CATCHEXC01 2279 00008A52 EB221E68[717A] <1> exc_entry 01, int1msg 2280 <1> %endif 2281 <1> %if _CATCHEXC03 2282 00008A58 EB1C1E68[947A] <1> exc_entry 03, int3msg 2283 <1> %endif 2284 <1> %if _CATCHEXC06 2285 00008A5E EB161E68[7A7B] <1> exc_entry 06, exc6msg 2286 <1> %endif 2287 <1> %if _CATCHEXC0C 2288 00008A64 EB101E68[917B] <1> exc_entry 0C, excCmsg 2289 <1> %endif 2290 <1> %if _CATCHEXC0D 2291 00008A6A EB0A1E68[9F7B] <1> exc_entry 0D, excDmsg 2292 <1> %endif 2293 <1> %if _CATCHEXC0E 2294 00008A70 EB041E68[CC7B] <1> exc_entry 0E, excEmsg 2295 <1> %endif 2296 <1> exc: 2297 00008A76 2E8E1E[D488] <1> mov ds, word [cs:dssel] 2298 00008A7B 8F06[D80B] <1> pop word [run_int] 2299 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 2300 00008A7F E864F6 <1> call entry_to_code_sel 2301 00008A82 [675C] <1> dw exc_code 2302 <1> 2303 <1> 2304 <1> usesection lDEBUG_CODE 2305 <1> 2306 <1> code_insure_low_byte_not_0CCh 2307 <1> exc_code: 2308 00005C67 803E[DA88]00 <1> cmp byte [dpmi32], 0 2309 00005C6C 7503E98D00 <1> jz exc16 2310 <1> 2311 <1> [cpu 386] 2312 <1> exc32: 2313 00005C71 50 <1> push ax ; stack alignment 2314 00005C72 6660 <1> pushad 2315 00005C74 6689E5 <1> mov ebp, esp 2316 00005C77 66678B4530 <1> mov eax, dword [ ebp + fr32_eip ] 2317 00005C7C 678B5D34 <1> mov bx, word [ ebp + fr32_cs ] 2318 00005C80 66678B4D38 <1> mov ecx, dword [ ebp + fr32_efl ] 2319 00005C85 66678B553C <1> mov edx, dword [ ebp + fr32_esp ] 2320 00005C8A 678B7540 <1> mov si, word [ ebp + fr32_ss ] 2321 00005C8E 678C4D34 <1> mov word [ ebp + fr32_cs ], cs 2322 00005C92 678C5D40 <1> mov word [ ebp + fr32_ss ], ds 2323 00005C96 803E[E60A]00 <1> cmp byte [ bInDbg ], 0 ; did the exception occur inside DEBUG? 2324 00005C9B 7422 <1> je @F ; no --> 2325 <1> 2326 <1> ; inside debugger 2327 <1> %if _EXCCSIP 2328 00005C9D A3[B488] <1> mov word [exception_csip], ax 2329 00005CA0 891E[B688] <1> mov word [exception_csip + 2], bx 2330 <1> ; render CS:IP if internal GPF 2331 <1> %endif 2332 00005CA4 6667C74530- <1> mov dword [ ebp + fr32_eip ], debuggerexception 2332 00005CA9 [343E0000] <1> 2333 00005CAD 660FB706[940A] <1> movzx eax, word [ savesp ] 2334 00005CB3 666789453C <1> mov dword [ ebp + fr32_esp ], eax 2335 00005CB8 67806539FE <1> clropt [ ebp + fr32_efl ], 100h ; reset TF 2336 00005CBD EB39 <1> jmp short @FF 2337 <1> 2338 <1> @@: ; inside debuggee 2339 00005CBF 800E[9D00]08 <1> setopt [internalflags], protectedmode 2340 00005CC4 6667C74530- <1> mov dword [ ebp + fr32_eip ], intrtn2_code 2340 00005CC9 [9A430000] <1> 2341 00005CCD 67806539FC <1> clropt [ ebp + fr32_efl ], 300h ; reset IF + TF 2342 00005CD2 6667C7453C- <1> mov dword [ ebp + fr32_esp ], reg_ss 2342 00005CD7 [8C0C0000] <1> 2343 00005CDB 66A3[9C0C] <1> mov dword [ reg_eip ], eax 2344 00005CDF 891E[900C] <1> mov word [ reg_cs ], bx 2345 <1> ; mov dword [ reg_efl ], ecx ; (eflh is saved in intrtn2_code) 2346 00005CE3 890E[A00C] <1> mov word [ reg_efl ], cx 2347 00005CE7 668916[740C] <1> mov dword [ reg_esp ], edx 2348 00005CEC 8936[8C0C] <1> mov word [ reg_ss ], si 2349 00005CF0 67FF7522 <1> push word [ ebp + fr32_ds ] 2350 00005CF4 8F06[840C] <1> pop word [ reg_ds ] 2351 <1> 2352 <1> @@: 2353 00005CF8 6661 <1> popad 2354 00005CFA 58 <1> pop ax ; stack alignment 2355 00005CFB 1F <1> pop ds 2356 00005CFC 66CB <1> o32 retf 2357 <1> 2358 <1> __CPU__ 2359 <1> exc16: 2360 00005CFE 60 <1> pusha 2361 00005CFF 89E5 <1> mov bp, sp 2362 00005D01 8B4618 <1> mov ax, word [ bp + fr16_ip ] 2363 00005D04 8B5E1A <1> mov bx, word [ bp + fr16_cs ] 2364 00005D07 8B4E1C <1> mov cx, word [ bp + fr16_fl ] 2365 00005D0A 8B561E <1> mov dx, word [ bp + fr16_sp ] 2366 00005D0D 8B7620 <1> mov si, word [ bp + fr16_ss ] 2367 00005D10 8C4E1A <1> mov word [ bp + fr16_cs ], cs 2368 00005D13 8C5E20 <1> mov word [ bp + fr16_ss ], ds 2369 00005D16 803E[E60A]00 <1> cmp byte [ bInDbg ], 0 ; did the exception occur inside DEBUG? 2370 00005D1B 7418 <1> je isdebuggee16 2371 <1> %if _EXCCSIP 2372 00005D1D A3[B488] <1> mov word [exception_csip], ax 2373 00005D20 891E[B688] <1> mov word [exception_csip + 2], bx 2374 <1> ; render CS:IP if internal GPF 2375 <1> %endif 2376 00005D24 C74618[343E] <1> mov word [ bp + fr16_ip ], debuggerexception 2377 00005D29 A1[940A] <1> mov ax, word [ savesp ] 2378 00005D2C 89461E <1> mov word [ bp + fr16_sp ], ax 2379 00005D2F 80661DFE <1> clropt [ bp + fr16_fl ], 100h ; reset TF 2380 00005D33 EB2D <1> jmp short isdebugger16 2381 <1> isdebuggee16: 2382 00005D35 800E[9D00]08 <1> setopt [internalflags], protectedmode 2383 00005D3A C74618[9A43] <1> mov word [ bp + fr16_ip ], intrtn2_code 2384 00005D3F 80661DFC <1> clropt [ bp + fr16_fl ], 300h ; reset IF + TF 2385 00005D43 C7461E[8C0C] <1> mov word [ bp + fr16_sp ], reg_ss 2386 00005D48 A3[9C0C] <1> mov word [ reg_eip ], ax 2387 00005D4B 891E[900C] <1> mov word [ reg_cs ], bx 2388 00005D4F 890E[A00C] <1> mov word [ reg_efl ], cx 2389 00005D53 8916[740C] <1> mov word [ reg_esp ], dx 2390 00005D57 8936[8C0C] <1> mov word [ reg_ss ], si 2391 00005D5B FF7610 <1> push word [ bp + fr16_ds ] 2392 00005D5E 8F06[840C] <1> pop word [ reg_ds ] 2393 <1> isdebugger16: 2394 00005D62 61 <1> popa 2395 00005D63 1F <1> pop ds 2396 00005D64 CB <1> retf 2397 <1> 2398 <1> 2399 <1> usesection lDEBUG_DATA_ENTRY 2400 <1> 2401 <1> i23pm: 2402 <1> %if 1 2403 00008A84 1E <1> push ds 2404 00008A85 2E8E1E[D488] <1> mov ds, word [cs:dssel] 2405 00008A8A 800E[EB0B]02 <1> setopt [serial_flags], sf_ctrl_c 2406 00008A8F 1F <1> pop ds 2407 <1> %endif 2408 00008A90 2E803E[DA88]00 <1> cmp byte [ cs:dpmi32 ], 0 ; ! always NC 2409 00008A96 7404 <1> je .retfw_2 2410 <1> [cpu 386] 2411 00008A98 66CA0400 <1> retfd 4 ; (NC) 2412 <1> __CPU__ 2413 <1> .retfw_2: 2414 00008A9C CA0200 <1> retfw 2 ; (NC) 2415 <1> 2416 <1> i24pm: 2417 00008A9F B003 <1> mov al, 03h ; fail 2418 00008AA1 2E803E[DA88]00 <1> cmp byte [ cs:dpmi32 ], 0 2419 00008AA7 7401 <1> je .iret16 2420 00008AA9 66 <1> o32 ; iretd 2421 <1> .iret16: 2422 00008AAA CF <1> iret 2114 2115 2116 usesection lDEBUG_CODE 2117 2118 resetmode_and_test_d_b_bit: 2119 %if _PM 2120 00005D65 E843DB call resetmode 2121 %endif 2122 2123 ; Test if bx is a 32-bit selector 2124 ; (as opposed to a 16-bit selector or a segment) 2125 ; 2126 ; INP: bx = selector (PM) or segment (86M) 2127 ; OUT: NZ = 32-bit 2128 ; ZR = 16-bit (always if 86M) 2129 ; NC 2130 ; REM: This checks whether a code segment's D bit or 2131 ; a stack segment's B bit is set. This operation 2132 ; is not meaningful otherwise. 2133 test_d_b_bit: 2134 00005D68 E89234 _386 call ispm 2135 00005D6B 7403 _386 jz .pm ; 386 and PM, check selector --> 2136 ; not PM or no 386 2137 .ZR: 2138 00005D6D 38C0 cmp al, al ; ZR, NC 2139 00005D6F C3 retn 2140 .pm: 2141 [cpu 386] 2142 00005D70 6650 push eax 2143 00005D72 6631C0 xor eax, eax ; use rights = 0 if inaccessible 2144 00005D75 660F02C3 lar eax, ebx ; access rights 2145 ; eax is unchanged if the access rights are inaccessible 2146 ; (and NZ is set in that case) 2147 00005D79 66A900004000 test eax, 400000h ; test bit (NC) 2148 00005D7F 6658 pop eax 2149 00005D81 C3 retn 2150 __CPU__ 2151 2152 2153 ; Test if selector in bx has a limit beyond 64 KiB - 1 B 2154 ; 2155 ; INP: bx = selector (PM) or segment (86M) 2156 ; OUT: NZ = limit above 64 KiB - 1 B 2157 ; ZR = limit below 64 KiB (always if 86M) 2158 ; NC 2159 test_high_limit: 2160 00005D82 E87834 _386 call ispm 2161 00005D85 7402 _386 jz .pm ; 386 and PM, check selector --> 2162 ; not PM or no 386 2163 00005D87 EBE4 jmp test_d_b_bit.ZR 2164 2165 .pm: 2166 [cpu 386] 2167 00005D89 6650 push eax 2168 00005D8B 6631C0 xor eax, eax ; use limit = 0 if inaccessible 2169 00005D8E 660F03C3 lsl eax, ebx ; segment limit 2170 ; eax is unchanged if the segment limit is inaccessible 2171 ; (and NZ is set in that case) 2172 00005D92 66A90000FFFF test eax, 0FFFF_0000h ; (NC) ZR if low limit, else NZ 2173 00005D98 6658 pop eax 2174 00005D9A C3 retn 2175 __CPU__ 2176 2177 subcpureset ; subcpu used in pminit.asm 2178 %endif ; _PM 2179 2180 %if _NOEXTENDER 2181 ; When we support non-extended DPMI, some calls to Int21 2182 ; are (extended) Int21 calls and some are (not extended) 2183 ; calls down to the real mode Int21. doscall is a macro 2184 ; that will always call the non-extended Int21. 2185 2186 ; Execute a non-extended DOS call 2187 _doscall: 2188 00005D9B 9C pushf 2189 00005D9C E85E34 call ispm 2190 00005D9F 750C jnz .rm 2191 subcpu 286 2192 ; Execute a non-extended DOS call from PM 2193 00005DA1 9D popf 2194 .pm: 2195 00005DA2 36FF36[A60A] push word [ss:pspdbg] 2196 00005DA7 6A21 push 21h 2197 00005DA9 E8A335 call intcall 2198 00005DAC C3 retn 2199 subcpureset 2200 .rm: 2201 00005DAD 9D popf 2202 00005DAE E90F35 jmp _int21 2203 %endif 2204 2205 %if _PM 2206 ; For branches other than symbolic, here's selector_to_segment 2207 ; (as used by the puts in expr.asm). Picked from symsnip 2208 ; binsrch.asm at revision 9c232415d568. 2209 ; INP: word [ss:sp] = selector to access 2210 ; OUT: word [ss:sp] = segment value to use for access 2211 ; CHG: - 2212 selector_to_segment: 2213 lframe near 2214 lpar word, in_selector_out_segment 2215 lpar_return 2216 00005DB1 5589E5 lenter 2217 2218 00005DB4 E84634 call ispm ; is it PM ? 2219 00005DB7 751B jnz .ret ; no, 86M --> (selector == segment) 2220 2221 subcpu 286 2222 00005DB9 50 push ax 2223 00005DBA 53 push bx 2224 00005DBB 51 push cx 2225 00005DBC 52 push dx 2226 2227 00005DBD 8B5E04 mov bx, word [bp + ?in_selector_out_segment] 2228 00005DC0 B80600 mov ax, 6 2229 00005DC3 CD31 int 31h ; get segment base to cx:dx 2230 00005DC5 C1EA04 shr dx, 4 2231 00005DC8 C1E10C shl cx, 12 2232 00005DCB 09CA or dx, cx 2233 00005DCD 895604 mov word [bp + ?in_selector_out_segment], dx 2234 2235 00005DD0 5A pop dx 2236 00005DD1 59 pop cx 2237 00005DD2 5B pop bx 2238 00005DD3 58 pop ax 2239 subcpureset 2240 2241 .ret: 2242 00005DD4 5D lleave 2243 00005DD5 C3 lret 2244 %endif 2245 2246 2247 ; support functions for symbols.asm 2248 2249 2250 ; INP: ds:dx -> message 2251 ; cx = length 2252 ; CHG: - 2253 ; STT: ds, es don't care 2254 disp_message_length_cx: 2255 00005DD6 50 push ax 2256 00005DD7 53 push bx 2257 00005DD8 51 push cx 2258 00005DD9 52 push dx 2259 00005DDA 06 push es 2260 00005DDB 1E push ds 2261 00005DDC 1E push ds 2262 00005DDD 07 pop es ; es:dx -> message, cx = length 2263 00005DDE 16 push ss 2264 00005DDF 1F pop ds ; ds = ss (required for puts) 2265 00005DE0 E89A5C call puts 2266 00005DE3 1F pop ds 2267 00005DE4 07 pop es 2268 00005DE5 5A pop dx 2269 00005DE6 59 pop cx 2270 00005DE7 5B pop bx 2271 00005DE8 58 pop ax 2272 00005DE9 C3 retn 2273 2274 ; INP: ds:dx -> message, ASCIZ 2275 ; CHG: - 2276 ; STT: ds, es don't care 2277 disp_message: 2278 00005DEA 06 push es 2279 00005DEB 1E push ds 2280 00005DEC 07 pop es ; es:dx -> message 2281 00005DED E80060 call putsz ; (sets up ds = ss internally) 2282 00005DF0 07 pop es 2283 00005DF1 C3 retn 2284 2285 ; INP: al = character to display 2286 ; CHG: - 2287 ; STT: ds, es don't care 2288 disp_al: equ putc 2289 2290 2291 ; Display number in ax hexadecimal, always 4 digits 2292 ; 2293 ; INP: ax = number 2294 ; OUT: displayed using disp_al 2295 ; CHG: none 2296 disp_ax_hex: 2297 00005DF2 86C4 xchg al, ah 2298 00005DF4 E80200 call disp_al_hex 2299 00005DF7 86C4 xchg al, ah 2300 disp_al_hex: 2301 00005DF9 51 push cx 2302 00005DFA B104 mov cl, 4 2303 00005DFC D2C0 rol al, cl 2304 00005DFE E80300 call disp_al_nybble_hex 2305 00005E01 D2C0 rol al, cl 2306 00005E03 59 pop cx 2307 disp_al_nybble_hex: 2308 00005E04 50 push ax 2309 00005E05 240F and al, 0Fh 2310 00005E07 0430 add al, '0' 2311 00005E09 3C39 cmp al, '9' 2312 00005E0B 7602 jbe @F 2313 00005E0D 0407 add al, -'9' -1 +'A' 2314 @@: 2315 00005E0F E80160 call disp_al 2316 00005E12 58 pop ax 2317 00005E13 C3 retn 2318 2319 2320 ; Display number in ax decimal 2321 ; 2322 ; INP: ax = number 2323 ; OUT: displayed using disp_al 2324 ; CHG: none 2325 disp_ax_dec: ; ax (no leading zeros) 2326 00005E14 53 push bx 2327 00005E15 31DB xor bx, bx 2328 .pushax: 2329 00005E17 52 push dx 2330 00005E18 50 push ax 2331 00005E19 08DB or bl, bl 2332 00005E1B 7405 jz .nobl 2333 00005E1D 80EB05 sub bl, 5 2334 00005E20 F6DB neg bl 2335 .nobl: 2336 00005E22 51 push cx 2337 00005E23 B91027 mov cx, 10000 2338 00005E26 E81B00 call .divide_out 2339 00005E29 B9E803 mov cx, 1000 2340 00005E2C E81500 call .divide_out 2341 00005E2F B96400 mov cx, 100 2342 00005E32 E80F00 call .divide_out 2343 00005E35 B10A mov cl, 10 2344 00005E37 E80A00 call .divide_out 2345 ; (Divisor 1 is useless) 2346 00005E3A 0430 add al, '0' 2347 00005E3C E8D45F call disp_al 2348 00005E3F 59 pop cx 2349 00005E40 58 pop ax 2350 00005E41 5A pop dx 2351 00005E42 5B pop bx ; Caller's register 2352 00005E43 C3 retn 2353 2354 2355 ; INP: ax = number 2356 ; cx = divisor 2357 ; OUT: ax = remainder of operation 2358 ; result displayed 2359 .divide_out: 2360 00005E44 52 push dx 2361 00005E45 31D2 xor dx, dx 2362 00005E47 F7F1 div cx ; 0:ax / cx 2363 00005E49 52 push dx ; remainder 2364 00005E4A FECB dec bl 2365 00005E4C 7503 jnz .nobl2 2366 00005E4E 80CF01 or bh, 1 2367 .nobl2: 2368 00005E51 08C7 or bh, al 2369 00005E53 7405 jz .leadingzero 2370 00005E55 0430 add al, '0' 2371 00005E57 E8B95F call disp_al ; display result 2372 .leadingzero: 2373 00005E5A 58 pop ax ; remainder 2374 00005E5B 5A pop dx 2375 00005E5C C3 retn 2376 2377 2378 ; C command - compare bytes. 2379 cc: 2380 00005E5D E8D148 call parsecm ; parse arguments 2381 2382 ; To make the 16-bit 64 KiB compare hack below work, the 2383 ; full ecx mustn't be increased here for 16-bit segments. 2384 ; The passed ecx isn't higher than FFFFh for 16-bit segments, 2385 ; and a value of 0001_0000h needs to be passed as zero to 2386 ; the hack anyway. 2387 %if _PM 2388 00005E60 36803E[DC88]00 cmp byte [ss:bAddr32], 0 2389 00005E66 7407 je .16 2390 [cpu 386] 2391 00005E68 6641 inc ecx 2392 00005E6A 7504 jnz cc1 2393 00005E6C E9A346 jmp error 2394 __CPU__ 2395 .16: 2396 %endif 2397 00005E6F 41 inc cx 2398 cc1: 2399 00005E70 1E push ds 2400 00005E71 06 push es 2401 00005E72 16 push ss 2402 00005E73 1F pop ds ; ds := cs 2403 00005E74 E80848 call dohack ; do the interrupt pointer hack 2404 00005E77 07 pop es 2405 00005E78 1F pop ds 2406 %if _PM 2407 00005E79 36803E[DC88]00 cmp byte [ss:bAddr32], 0 2408 00005E7F 740E jz .cmp16 2409 00005E81 F367A6 a32 repe cmpsb 2410 00005E84 678A56FF mov dl, byte [esi-1] 2411 00005E88 26678A77FF mov dh, byte [es:edi-1] 2412 00005E8D EB0D jmp short .cmpdone 2413 .cmp16: 2414 %endif 2415 ; The following 3 instructions make a hack to support 64 KiB 2416 ; compare. The only time we get here with cx = 0 is the first 2417 ; iteration for a 64 KiB compare. In that case, dec cx results 2418 ; in FFFFh making repe cmpsb work. The single cmpsb will either 2419 ; jump the repe cmpsb (if it found a mismatch) or not jump it. 2420 ; The repe cmpsb might be executed with cx = 0, but will then 2421 ; not change anything including the flags so it works. 2422 00005E8F 49 dec cx 2423 00005E90 A6 cmpsb 2424 00005E91 7502 jne .skip 2425 00005E93 F3A6 repe cmpsb ; start comparing 2426 .skip: 2427 00005E95 8A54FF mov dl, byte [si-1] ; save the possibly errant characters 2428 00005E98 268A75FF mov dh, byte [es:di-1] 2429 .cmpdone: 2430 00005E9C 9F lahf 2431 00005E9D 1E push ds 2432 00005E9E 06 push es 2433 00005E9F 16 push ss 2434 00005EA0 1F pop ds 2435 00005EA1 E80F48 call unhack ; undo the interrupt pointer hack 2436 00005EA4 07 pop es 2437 00005EA5 1F pop ds 2438 00005EA6 9E sahf 2439 00005EA7 7475 je cc2 ; if we're done 2440 00005EA9 06 push es 2441 00005EAA 16 push ss 2442 00005EAB 07 pop es 2443 00005EAC 66 _386_PM_o32 ; mov ebx, edi 2444 00005EAD 89FB mov bx, di 2445 00005EAF BF[0E08] mov di, line_out 2446 00005EB2 8CD8 mov ax, ds 2447 00005EB4 E8835B call hexword 2448 00005EB7 B03A mov al, ':' 2449 00005EB9 AA stosb 2450 00005EBA 66 _386_PM_o32 ; mov eax, esi 2451 00005EBB 89F0 mov ax, si 2452 00005EBD 66 _386_PM_o32 ; dec eax 2453 00005EBE 48 dec ax 2454 %if _PM 2455 00005EBF 36803E[DC88]00 cmp byte [ss:bAddr32], 0 2456 00005EC5 7403 jz .16si 2457 00005EC7 E8645B call hexword_high 2458 .16si: 2459 %endif 2460 00005ECA E86D5B call hexword 2461 00005ECD B82020 mov ax, 32<<8|32 2462 00005ED0 AB stosw 2463 00005ED1 88D0 mov al, dl 2464 00005ED3 E86B5B call hexbyte 2465 00005ED6 B82020 mov ax, 32<<8|32 2466 00005ED9 AB stosw 2467 00005EDA 88F0 mov al, dh 2468 00005EDC E8625B call hexbyte 2469 00005EDF B82020 mov ax, 32<<8|32 2470 00005EE2 AB stosw 2471 00005EE3 58 pop ax 2472 00005EE4 50 push ax 2473 00005EE5 E8525B call hexword 2474 00005EE8 B03A mov al, ':' 2475 00005EEA AA stosb 2476 00005EEB 66 _386_PM_o32 ; mov eax, ebx 2477 00005EEC 89D8 mov ax, bx 2478 00005EEE 66 _386_PM_o32 ; dec eax 2479 00005EEF 48 dec ax 2480 %if _PM 2481 00005EF0 36803E[DC88]00 cmp byte [ss:bAddr32], 0 2482 00005EF6 7403 jz .16bx 2483 00005EF8 E8335B call hexword_high 2484 .16bx: 2485 %endif 2486 00005EFB E83C5B call hexword 2487 00005EFE 1E push ds 2488 00005EFF 16 push ss 2489 00005F00 1F pop ds 2490 00005F01 53 push bx 2491 00005F02 51 push cx 2492 00005F03 E86C5B call putsline_crlf 2493 00005F06 59 pop cx 2494 00005F07 5F pop di 2495 00005F08 1F pop ds 2496 00005F09 07 pop es 2497 %if _PM 2498 00005F0A 36803E[DC88]00 cmp byte [ss:bAddr32],0 2499 00005F10 7406 jz cc1_6 2500 [cpu 386] 2501 00005F12 67E309 jecxz cc2 2502 __CPU__ 2503 cc1_j1: 2504 00005F15 E958FF jmp cc1 2505 cc1_6: 2506 %else 2507 cc1_j1 equ cc1 2508 %endif 2509 %if 0 2510 _386_PM_o32 ; inc ecx 2511 inc cx 2512 _386_PM_a32 ; loopd cc1 2513 loop cc1 ; if not done yet 2514 %else 2515 00005F18 67 _386_PM_a32 ; jecxz cc2 2516 00005F19 E303 jcxz cc2 2517 00005F1B E952FF jmp cc1 ; if not done yet 2518 %endif 2519 cc2: 2520 00005F1E 16 push ss ; restore segment registers 2521 00005F1F 1F pop ds 2522 00005F20 16 push ss 2523 00005F21 07 pop es 2524 00005F22 C3 retn 2525 2526 2527 %if _BOOTLDR 2528 %include "boot.asm" 2529 <1> 2530 <1> %if 0 2531 <1> 2532 <1> lDebug "boot" commands - boot loading 2533 <1> 2534 <1> Copyright (C) 2008-2017 C. Masloch 2535 <1> 2536 <1> Usage of the works is permitted provided that this 2537 <1> instrument is retained with the works, so that any entity 2538 <1> that uses the works is notified of this instrument. 2539 <1> 2540 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 2541 <1> 2542 <1> %endif 2543 <1> 2544 <1> 2545 <1> usesection lDEBUG_DATA_ENTRY 2546 <1> 2547 00008AAB 00 <1> align 16, db 0 2548 <1> load_unit_flags: 2549 00008AB0 00 <1> times 128 db _LUF_DEFAULT_DISKETTE 2550 00008B30 00 <1> times 128 db _LUF_DEFAULT_HARDDISK 2551 <1> 2552 <1> align 16, db 0 2553 00008BB0 00 <1> load_partition_table: times 16 * 4 db 0 2554 <1> .end: 2555 <1> 2556 <1> align 16, db 0 2557 <1> ; Data passed to us from loader (in case we booted) 2558 <1> loaddata_loadedfrom: 2559 00008BF0 00 <1> times (-LOADDATA + bsBPB + ebpbNew + BPBN_size) db 0 2560 <1> 2561 00008C6A 00 <1> align 16, db 0 2562 <1> load_data_lowest: 2563 00008C70 00 <1> times LOADDATA3_size db 0 2564 <1> ; data used to access storage 2565 <1> load_data: 2566 00008C80 00 <1> times (-LOADDATA2 + bsBPB + ebpbNew + BPBN_size) db 0 2567 00008D0A 00 <1> align 16, db 0 2568 <1> load_current_settings: 2569 <1> istruc LOADSETTINGS 2570 00008D10 0000 <1> at lsKernelName, load_kernelname_default: dw 0 2571 00008D12 0000 <1> at lsAddName, load_addname_default: dw 0 2572 00008D14 0000 <1> at lsMinPara, load_minpara: dw 0 2573 00008D16 0000 <1> at lsMaxPara, load_maxpara: dw 0 2574 00008D18 0000 <1> at lsOptions, load_options: dw 0 2575 00008D1A 0000 <1> at lsSegment, load_loadseg: dw 0 2576 00008D1C 00000000 <1> at lsEntry, load_entrypoint: dd 0 2577 00008D20 00000000 <1> at lsBPB, load_bpb: dd 0 2578 00008D24 0000 <1> at lsCheckOffset, load_check_offset: dw 0 2579 00008D26 0000 <1> at lsCheckValue, load_check_value: dw 0 2580 <1> at lsName 2581 <1> ; iend 2582 <1> %pop ; (pop off the istruc context) 2583 <1> 2584 <1> %if _INPUT_FILE_BOOT 2585 00008D28 00 <1> align 16, db 0 2586 <1> load_yy_direntry: 2587 00008D30 00 <1> times DIRENTRY_size db 0 2588 <1> 2589 <1> LOAD_INPUT_FILE_SIZE equ fromparas(paras(-LOADDATA3 + bsBPB + ebpbNew + BPBN_size)) 2590 <1> align 16, db 0 2591 <1> load_input_file: 2592 00008D50 00 <1> times _INPUT_FILE_BOOT * LOAD_INPUT_FILE_SIZE db 0 2593 <1> .active: 2594 00008FD0 0000 <1> dw 0 2595 <1> .goto_offset: 2596 00008FD2 0000 <1> dw 0 2597 <1> %endif 2598 <1> 2599 <1> align 4, db 0 2600 00008FD4 00000000 <1> load_bpb_dest: dd 0 2601 <1> load_sectors: equ load_data - LOADDATA2 + bsBPB + bpbCHSSectors 2602 <1> load_heads: equ load_data - LOADDATA2 + bsBPB + bpbCHSHeads 2603 <1> load_sectorsize: equ load_data - LOADDATA2 + bsBPB + bpbBytesPerSector 2604 <1> load_sectorsizepara: equ load_data - LOADDATA2 + ldParaPerSector 2605 <1> load_sectorseg: equ load_data - LOADDATA2 + ldSectorSeg 2606 00008FD8 00000000 <1> load_partition_sector: dd 0 2607 <1> load_ldp_sector: equ loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 2608 <1> ; load_sdp_sector: equ load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 2609 00008FDC 0000 <1> load_partition_cycle: dw 0 2610 00008FDE 0000 <1> load_cmdline: dw 0 2611 <1> load_ldflags: equ load_data - LOADDATA2 + ldFlags 2612 <1> load_unit: equ load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 2613 00008FE0 0000 <1> load_partition_entry: dw 0 2614 00008FE2 00 <1> load_partition: db 0 2615 00008FE3 00 <1> load_current_partition: db 0 2616 00008FE4 00 <1> load_found_partition: db 0 2617 00008FE5 00 <1> load_check_dir_attr: db 0 2618 00008FE6 00 <1> load_sector_alt: db 0 2619 <1> 2620 00008FE7 00 <1> align 4, db 0 2621 00008FE8 00 <1> load_kernel_name: times 11 + 1 db 0 2622 <1> align 2, db 0 2623 <1> ; load_kernelname_default:dw 0 2624 <1> ; ASCIZ filename for if load_kernelname_input terminates in '/' 2625 00008FF4 0000 <1> load_kernelname_input: dw 0 2626 <1> ; input (ASCIZ '/'-terminated pathnames + optional filename) 2627 00008FF6 0000 <1> load_kernelname_next: dw 0 2628 <1> ; next element in ASCIZ load_kernelname_input, 2629 <1> ; empty string if pathname terminated in '/' 2630 <1> ; load_addname_default: dw 0 2631 00008FF8 0000 <1> load_addname_input: dw 0 2632 00008FFA 0000 <1> load_addname_next: dw 0 2633 <1> %if _INPUT_FILE_BOOT 2634 00008FFC 0000 <1> load_yyname_input: dw 0 2635 00008FFE 0000 <1> load_yyname_next: dw 0 2636 <1> %endif 2637 <1> 2638 <1> align 2, db 0 2639 00009000 0000 <1> load_adr_dirbuf_segment:dw 0 2640 00009002 0000 <1> boot_new_memsizekib: dw 0 2641 00009004 0000 <1> boot_old_memsizekib: dw 0 2642 00009006 00 <1> boot_ebdaflag: db 0 ; EBDA flag: non-zero if present 2643 <1> 2644 00009007 00 <1> align 4, db 0 2645 00009008 00000000 <1> load_readwrite_sector: dd 0 2646 0000900C 0000 <1> load_readwrite_buffer: dw 0 2647 0000900E 0000 <1> load_readwrite_count: dw 0 2648 00009010 0000 <1> load_readwrite_function:dw 0 2649 <1> 2650 <1> 2651 <1> usesection lDEBUG_CODE 2652 <1> 2653 <1> init_bootcmd: 2654 00005F23 E809A6 <1> call guard_re 2655 00005F26 BD[B08C] <1> mov bp, load_data - LOADDATA2 2656 <1> 2657 00005F29 F606[A400]80 <1> testopt [internalflags3], dif3_partition_changed 2658 00005F2E 7413 <1> jz @F 2659 <1> 2660 00005F30 FF761E <1> push word [bp + bsBPB + bpbHiddenSectors + 2] 2661 00005F33 FF761C <1> push word [bp + bsBPB + bpbHiddenSectors] 2662 00005F36 8F06[D88F] <1> pop word [load_partition_sector] 2663 00005F3A 8F06[DA8F] <1> pop word [load_partition_sector + 2] 2664 00005F3E 8026[A400]7F <1> clropt [internalflags3], dif3_partition_changed 2665 <1> @@: 2666 <1> 2667 00005F43 31C9 <1> xor cx, cx 2668 00005F45 894E1C <1> mov [bp + bsBPB + bpbHiddenSectors + 0], cx 2669 00005F48 894E1E <1> mov [bp + bsBPB + bpbHiddenSectors + 2], cx 2670 00005F4B 880E[E68F] <1> mov byte [load_sector_alt], cl 2671 00005F4F C3 <1> retn 2672 <1> 2673 <1> 2674 <1> bootcmd: 2675 <1> %if _PM 2676 00005F50 E8AA32 <1> call ispm 2677 00005F53 750C <1> jnz .rm 2678 00005F55 BA[1A7C] <1> mov dx, nopmsupp 2679 00005F58 B80102 <1> mov ax, 0201h 2680 00005F5B E8FB45 <1> call setrc 2681 00005F5E E9895E <1> jmp putsz_error 2682 <1> .rm: 2683 <1> %endif 2684 <1> d4 call d4message 2685 <1> d4 asciz "In bootcmd",13,10 2686 <1> 2687 00005F61 E8BFFF <1> call init_bootcmd 2688 <1> 2689 00005F64 E8F959 <1> call skipcomma 2690 00005F67 4E <1> dec si 2691 00005F68 BA[6470] <1> mov dx, msg.list 2692 00005F6B E86D59 <1> call isstring? 2693 00005F6E 7503E9D304 <1> je .list 2694 <1> 2695 00005F73 BA[A163] <1> mov dx, msg.quit 2696 00005F76 E86259 <1> call isstring? 2697 00005F79 7536 <1> jne .not_quit 2698 <1> .quit: 2699 <1> %if _DOSEMU 2700 00005F7B F606[9F00]01 <1> testopt [internalflags], runningdosemu 2701 00005F80 7407 <1> jz .quit_not_dosemu 2702 <1> 2703 00005F82 31DB <1> xor bx, bx 2704 00005F84 B8FFFF <1> mov ax, -1 2705 00005F87 CDE6 <1> int 0E6h ; dosemu quit 2706 <1> 2707 <1> .quit_not_dosemu: 2708 <1> %endif 2709 <1> 2710 <1> ; from https://stackoverflow.com/a/5240330/738287 2711 00005F89 B80153 <1> mov ax, 5301h 2712 00005F8C 31DB <1> xor bx, bx 2713 00005F8E CD15 <1> int 15h ; connect to APM API 2714 <1> 2715 00005F90 B80E53 <1> mov ax, 530Eh 2716 00005F93 31DB <1> xor bx, bx 2717 00005F95 B90201 <1> mov cx, 0102h 2718 00005F98 CD15 <1> int 15h ; set APM version to 1.02 2719 <1> 2720 00005F9A B80753 <1> mov ax, 5307h 2721 00005F9D BB0100 <1> mov bx, 1 2722 00005FA0 B90300 <1> mov cx, 3 2723 00005FA3 CD15 <1> int 15h ; shut down system 2724 <1> 2725 00005FA5 BA[C25F] <1> mov dx, msg.boot_quit_fail 2726 00005FA8 B80202 <1> mov ax, 0202h 2727 00005FAB E8AB45 <1> call setrc 2728 00005FAE E9395E <1> jmp putsz_error 2729 <1> 2730 <1> .not_quit: 2731 00005FB1 BA[7B63] <1> mov dx, msg.read 2732 00005FB4 E82459 <1> call isstring? 2733 00005FB7 7503E96408 <1> je boot_read 2734 <1> 2735 00005FBC BA[8063] <1> mov dx, msg.write 2736 00005FBF E81959 <1> call isstring? 2737 00005FC2 7503E96108 <1> je boot_write 2738 <1> 2739 00005FC7 BA[8D63] <1> mov dx, msg.dir 2740 00005FCA E80E59 <1> call isstring? 2741 00005FCD 7503E97110 <1> je boot_dir 2742 <1> 2743 00005FD2 BA[A663] <1> mov dx, msg.protocol 2744 00005FD5 E80359 <1> call isstring? 2745 00005FD8 7533 <1> jne .notproto 2746 <1> 2747 00005FDA E89C59 <1> call skipequals 2748 00005FDD 4E <1> dec si 2749 00005FDE BA[E863] <1> mov dx, msg.sector 2750 00005FE1 E8F758 <1> call isstring? 2751 00005FE4 7423 <1> je .proto_sector 2752 <1> 2753 00005FE6 BA[EF63] <1> mov dx, msg.sector_alt 2754 00005FE9 E8EF58 <1> call isstring? 2755 00005FEC 7416 <1> je .proto_sector_alt 2756 <1> 2757 00005FEE BB[1877] <1> mov bx, loadsettings 2758 <1> .proto_settings_next: 2759 00005FF1 8D5718 <1> lea dx, [bx + lsName] 2760 00005FF4 E8E458 <1> call isstring? 2761 00005FF7 7421 <1> je .proto_settings 2762 00005FF9 83C320 <1> add bx, LOADSETTINGS_size 2763 00005FFC 833F00 <1> cmp word [bx], 0 2764 00005FFF 75F0 <1> jne .proto_settings_next 2765 <1> 2766 00006001 E90E45 <1> jmp error 2767 <1> 2768 <1> .proto_sector_alt: 2769 00006004 C606[E68F]01 <1> mov byte [load_sector_alt], 1 2770 <1> .proto_sector: 2771 00006009 E85459 <1> call skipcomma 2772 0000600C A8 <1> db __TEST_IMM8 2773 <1> .notproto: 2774 0000600D AC <1> lodsb 2775 0000600E E81D06 <1> call parseloadunit_default_sdp 2776 00006011 E93303 <1> jmp .load 2777 <1> 2778 <1> 2779 <1> .errordec: 2780 00006014 4E <1> dec si 2781 <1> .error: 2782 00006015 A8 <1> db __TEST_IMM8 ; skip pop 2783 <1> .errorpop: 2784 00006016 5E <1> pop si 2785 00006017 E9F844 <1> jmp error 2786 <1> 2787 <1> 2788 <1> .proto_settings: 2789 0000601A 56 <1> push si 2790 0000601B 89DE <1> mov si, bx 2791 0000601D BF[108D] <1> mov di, load_current_settings 2792 00006020 B90C00 <1> mov cx, lsName >> 1 2793 00006023 F3A5 <1> rep movsw 2794 <1> %if lsName & 1 2795 <1> movsb 2796 <1> %endif 2797 00006025 FF75E8 <1> push word [load_kernelname_default - (load_current_settings + lsName) + di] 2798 00006028 8F85CC02 <1> pop word [load_kernelname_input - (load_current_settings + lsName) + di] 2799 0000602C FF75EA <1> push word [load_addname_default - (load_current_settings + lsName) + di] 2800 0000602F 8F85D002 <1> pop word [load_addname_input - (load_current_settings + lsName) + di] 2801 <1> 2802 00006033 5E <1> pop si 2803 <1> 2804 <1> d4 call d4message 2805 <1> d4 asciz "In bootcmd.proto_settings",13,10 2806 <1> 2807 <1> .proto_next: 2808 00006034 E82959 <1> call skipcomma 2809 00006037 4E <1> dec si 2810 00006038 BA[AF63] <1> mov dx, msg.segment 2811 0000603B E89D58 <1> call isstring? 2812 0000603E 7478 <1> je .proto_segment 2813 00006040 BA[B763] <1> mov dx, msg.entry 2814 00006043 E89558 <1> call isstring? 2815 00006046 7503E98C00 <1> je .proto_entry 2816 0000604B BA[BD63] <1> mov dx, msg.bpb 2817 0000604E E88A58 <1> call isstring? 2818 00006051 7503E9A000 <1> je .proto_bpb 2819 00006056 BA[C163] <1> mov dx, msg.minpara 2820 00006059 E87F58 <1> call isstring? 2821 0000605C 7503E9B400 <1> je .proto_minpara 2822 00006061 BA[C963] <1> mov dx, msg.maxpara 2823 00006064 E87458 <1> call isstring? 2824 00006067 7503E9B700 <1> je .proto_maxpara 2825 0000606C BA[D163] <1> mov dx, msg.checkoffset 2826 0000606F E86958 <1> call isstring? 2827 00006072 7503E9BA00 <1> je .proto_checkoffset 2828 00006077 BA[DD63] <1> mov dx, msg.checkvalue 2829 0000607A E85E58 <1> call isstring? 2830 0000607D 7503E9C800 <1> je .proto_checkvalue 2831 <1> 2832 00006082 BB[A875] <1> mov bx, loadoptiontable 2833 <1> .proto_lot_next: 2834 00006085 8B0F <1> mov cx, [bx] ; flag 2835 00006087 8B5702 <1> mov dx, [bx + 2] ; -> ASCIZ message 2836 0000608A 85C9 <1> test cx, cx 2837 0000608C 7503E9C700 <1> jz .proto_done 2838 00006091 E84758 <1> call isstring? 2839 00006094 7405 <1> je .proto_lot 2840 00006096 83C304 <1> add bx, 4 2841 00006099 EBEA <1> jmp .proto_lot_next 2842 <1> 2843 <1> .proto_lot: 2844 0000609B E8DB58 <1> call skipequals 2845 0000609E 89CA <1> mov dx, cx 2846 000060A0 F7D2 <1> not dx 2847 000060A2 2116[188D] <1> and word [load_options], dx 2848 000060A6 E88A52 <1> call getexpression 2849 000060A9 E8994C <1> call toboolean 2850 000060AC 85D2 <1> test dx, dx 2851 000060AE 7404 <1> jz @F 2852 000060B0 090E[188D] <1> or word [load_options], cx 2853 <1> @@: 2854 000060B4 4E <1> dec si 2855 000060B5 E97CFF <1> jmp .proto_next 2856 <1> 2857 <1> .proto_segment: 2858 000060B8 E8BE58 <1> call skipequals 2859 000060BB E85B57 <1> call getword ; dx = word 2860 000060BE 83FA50 <1> cmp dx, 50h 2861 000060C1 7208 <1> jb @F 2862 000060C3 8916[1A8D] <1> mov word [load_loadseg], dx 2863 000060C7 4E <1> dec si 2864 000060C8 E969FF <1> jmp .proto_next 2865 <1> 2866 <1> @@: 2867 000060CB BA[2263] <1> mov dx, msg.boot_segment_too_low 2868 000060CE B81002 <1> mov ax, 0210h 2869 000060D1 E88544 <1> call setrc 2870 000060D4 E95803 <1> jmp .fail 2871 <1> 2872 <1> 2873 <1> .proto_entry: 2874 000060D7 E89F58 <1> call skipequals 2875 000060DA 31DB <1> xor bx, bx 2876 000060DC E86748 <1> call getaddr ; bx:(e)dx = addr 2877 000060DF 66F7C20000FFFF <1> _386 test edx, 0_FFFF_0000h 2878 000060E6 0F852BFF <1> _386 jnz .error 2879 000060EA 8916[1C8D] <1> mov word [load_entrypoint], dx 2880 000060EE 891E[1E8D] <1> mov word [load_entrypoint + 2], bx 2881 000060F2 4E <1> dec si 2882 000060F3 E93EFF <1> jmp .proto_next 2883 <1> 2884 <1> .proto_bpb: 2885 000060F6 E88058 <1> call skipequals 2886 000060F9 31DB <1> xor bx, bx 2887 000060FB E84848 <1> call getaddr ; bx:(e)dx = addr 2888 000060FE 66F7C20000FFFF <1> _386 test edx, 0_FFFF_0000h 2889 00006105 0F850CFF <1> _386 jnz .error 2890 00006109 8916[208D] <1> mov word [load_bpb], dx 2891 0000610D 891E[228D] <1> mov word [load_bpb + 2], bx 2892 00006111 4E <1> dec si 2893 00006112 E91FFF <1> jmp .proto_next 2894 <1> 2895 <1> .proto_minpara: 2896 00006115 E86158 <1> call skipequals 2897 00006118 E8FE56 <1> call getword ; dx = word 2898 0000611B 8916[148D] <1> mov word [load_minpara], dx 2899 0000611F 4E <1> dec si 2900 00006120 E911FF <1> jmp .proto_next 2901 <1> 2902 <1> .proto_maxpara: 2903 00006123 E85358 <1> call skipequals 2904 00006126 E8F056 <1> call getword ; dx = word 2905 00006129 8916[168D] <1> mov word [load_maxpara], dx 2906 0000612D 4E <1> dec si 2907 0000612E E903FF <1> jmp .proto_next 2908 <1> 2909 <1> .proto_checkoffset: 2910 00006131 E84558 <1> call skipequals 2911 00006134 E8E256 <1> call getword ; dx = word 2912 00006137 89D0 <1> mov ax, dx 2913 00006139 241F <1> and al, 31 2914 0000613B 3C1F <1> cmp al, 31 2915 0000613D 7503E9D3FE <1> je .error 2916 <1> ; Previously we rejected all odd values here. Now, 2917 <1> ; we only reject a subset of odd values, namely 2918 <1> ; those that may actually cross a sector boundary. 2919 <1> ; Note that sectors may be as small as 32 bytes. 2920 <1> ; This insures the checked word never crosses a sector 2921 <1> ; boundary. Thus, loading a single sector suffices. 2922 00006142 8916[248D] <1> mov word [load_check_offset], dx 2923 00006146 4E <1> dec si 2924 00006147 E9EAFE <1> jmp .proto_next 2925 <1> 2926 <1> .proto_checkvalue: 2927 0000614A E82C58 <1> call skipequals 2928 0000614D E8C956 <1> call getword ; dx = word 2929 00006150 8916[268D] <1> mov word [load_check_value], dx 2930 00006154 4E <1> dec si 2931 00006155 E9DCFE <1> jmp .proto_next 2932 <1> 2933 <1> .proto_done: 2934 00006158 BB[E475] <1> mov bx, loadoptiontable.incompatible 2935 <1> @@: 2936 0000615B 8B0F <1> mov cx, [bx] 2937 0000615D 0B4F02 <1> or cx, [bx + 2] 2938 00006160 746B <1> jz .proto_compatible 2939 00006162 8B16[188D] <1> mov dx, word [load_options] 2940 00006166 21CA <1> and dx, cx 2941 00006168 39CA <1> cmp dx, cx 2942 0000616A 7405 <1> je .proto_incompatible 2943 0000616C 83C304 <1> add bx, 4 2944 0000616F EBEA <1> jmp @B 2945 <1> 2946 <1> .proto_incompatible: 2947 00006171 16 <1> push ss 2948 00006172 07 <1> pop es 2949 00006173 B80302 <1> mov ax, 0203h 2950 00006176 E8E043 <1> call setrc 2951 00006179 BA[DC5F] <1> mov dx, msg.bootfail 2952 0000617C E86B5C <1> call putsz_error 2953 0000617F BA[D562] <1> mov dx, msg.boot_cannot_set_both 2954 00006182 E8655C <1> call putsz_error 2955 00006185 8B07 <1> mov ax, word [bx] 2956 00006187 E82200 <1> call .proto_incompatible_get_label 2957 0000618A E85D5C <1> call putsz_error 2958 0000618D BA[E662] <1> mov dx, msg.boot_and 2959 00006190 E8575C <1> call putsz_error 2960 00006193 8B4702 <1> mov ax, word [bx + 2] 2961 00006196 E81300 <1> call .proto_incompatible_get_label 2962 00006199 E84E5C <1> call putsz_error 2963 0000619C BA[EC62] <1> mov dx, msg.boot_dot_crlf 2964 <1> .putsz_errret: 2965 0000619F B80402 <1> mov ax, 0204h 2966 000061A2 E8B443 <1> call setrc 2967 000061A5 E8425C <1> call putsz_error 2968 000061A8 FF26[9A0A] <1> jmp near word [errret] 2969 <1> 2970 <1> .proto_incompatible_get_label: 2971 000061AC 53 <1> push bx 2972 000061AD BB[A875] <1> mov bx, loadoptiontable 2973 <1> @@: 2974 000061B0 8B0F <1> mov cx, [bx] 2975 000061B2 E30E <1> jcxz .proto_internal_error 2976 000061B4 39C8 <1> cmp ax, cx 2977 000061B6 8B5702 <1> mov dx, word [bx + 2] 2978 000061B9 7405 <1> je @F 2979 000061BB 83C304 <1> add bx, 4 2980 000061BE EBF0 <1> jmp @B 2981 <1> 2982 <1> @@: 2983 000061C0 5B <1> pop bx 2984 000061C1 C3 <1> retn 2985 <1> 2986 <1> .proto_internal_error: 2987 000061C2 BA[F062] <1> mov dx, msg.boot_internal_error 2988 000061C5 B80502 <1> mov ax, 0205h 2989 000061C8 E88E43 <1> call setrc 2990 000061CB EBD2 <1> jmp .putsz_errret 2991 <1> 2992 <1> 2993 <1> .proto_compatible: 2994 000061CD AC <1> lodsb 2995 000061CE E85D04 <1> call parseloadunit_default_sdp 2996 000061D1 7503E98800 <1> jz .fn_done_eol ; no filename given, use defaults --> 2997 <1> ; al was = '/' or '\' or first pathname's first character 2998 <1> ; si-> next char 2999 000061D6 BB[F48F] <1> mov bx, load_kernelname_input 3000 000061D9 E83E00 <1> call .pathname_parse_super 3001 <1> 3002 000061DC 56 <1> push si 3003 000061DD 50 <1> push ax 3004 000061DE E8AF57 <1> call skipwh0 3005 000061E1 E85657 <1> call iseol? 3006 000061E4 58 <1> pop ax 3007 000061E5 5E <1> pop si 3008 000061E6 7478 <1> je .fn_done 3009 <1> 3010 000061E8 BB[F88F] <1> mov bx, load_addname_input 3011 <1> 3012 000061EB E8A257 <1> call skipwh0 3013 000061EE 3C2F <1> cmp al, '/' 3014 000061F0 7404 <1> je @F 3015 000061F2 3C5C <1> cmp al, '\' 3016 000061F4 751F <1> jne .proto_not_double_slash 3017 <1> @@: 3018 000061F6 803C2F <1> cmp byte [si], '/' 3019 000061F9 7405 <1> je @F 3020 000061FB 803C5C <1> cmp byte [si], '\' 3021 000061FE 7515 <1> jne .proto_not_double_slash 3022 <1> @@: 3023 00006200 4E <1> dec si 3024 00006201 8937 <1> mov word [bx], si 3025 00006203 C7042F2F <1> mov word [si], "//" 3026 00006207 46 <1> inc si 3027 00006208 46 <1> inc si 3028 00006209 E82E57 <1> call iseol? 3029 0000620C C60400 <1> mov byte [si], 0 3030 0000620F 7401 <1> je @F 3031 00006211 46 <1> inc si 3032 <1> @@: 3033 00006212 AC <1> lodsb 3034 00006213 EB4B <1> jmp .fn_done 3035 <1> 3036 <1> .proto_not_double_slash: 3037 00006215 E80200 <1> call .pathname_parse_super 3038 00006218 EB46 <1> jmp .fn_done 3039 <1> 3040 <1> 3041 <1> ; INP: bx -> word variable to hold filename 3042 <1> ; OUT: word [bx] -> list of /-separated pathnames, zero-terminated 3043 <1> ; CHG: ax, cx, si, di, [es:load_kernel_name] 3044 <1> .pathname_parse_super: 3045 <1> d4 call d4message 3046 <1> d4 asciz "In bootcmd.pathname_parse_super",13,10 3047 <1> 3048 0000621A E87357 <1> call skipwh0 3049 0000621D 3C2F <1> cmp al, '/' 3050 0000621F 7404 <1> je @F 3051 00006221 3C5C <1> cmp al, '\' 3052 00006223 7506 <1> jne @FF 3053 <1> @@: 3054 00006225 4E <1> dec si 3055 00006226 8937 <1> mov word [bx], si 3056 00006228 46 <1> inc si 3057 00006229 EB0E <1> jmp .pathname_check 3058 <1> 3059 <1> @@: 3060 0000622B 4E <1> dec si 3061 0000622C 8937 <1> mov word [bx], si 3062 <1> 3063 <1> .pathname_parse: 3064 <1> .pathname_next: 3065 <1> d4 call d4message 3066 <1> d4 asciz "In bootcmd.pathname_parse",13,10 3067 0000622E E8D306 <1> call boot_parse_fn 3068 <1> ; al = separator char 3069 <1> ; si -> next char after that (if any) 3070 00006231 3C2F <1> cmp al, '/' ; path separator? 3071 00006233 7404 <1> je .pathname_check 3072 00006235 3C5C <1> cmp al, '\' 3073 00006237 7517 <1> jne .pathname_none ; no, this was the filename --> 3074 <1> .pathname_check: 3075 <1> d4 call d4message 3076 <1> d4 asciz "In bootcmd.pathname_parse_check",13,10 3077 00006239 C644FF2F <1> mov byte [si - 1], '/' ; normalise path separator 3078 0000623D AC <1> lodsb 3079 0000623E 3C20 <1> cmp al, 32 ; space ? 3080 00006240 740E <1> je .pathname_gotfirst 3081 00006242 3C09 <1> cmp al, 9 3082 00006244 740A <1> je .pathname_gotfirst ; yes, allow for second name --> 3083 00006246 4E <1> dec si 3084 00006247 E8F056 <1> call iseol? ; EOL ? 3085 0000624A 75E2 <1> jne .pathname_next ; no, next pathname element --> 3086 0000624C C60400 <1> mov byte [si], 0 ; terminate after trailing path sep 3087 0000624F C3 <1> retn 3088 <1> 3089 <1> .pathname_gotfirst: 3090 <1> .pathname_none: 3091 00006250 B000 <1> mov al, 0 3092 00006252 4E <1> dec si 3093 00006253 8604 <1> xchg al, byte [si] ; terminate after filename 3094 00006255 8936[0E0C] <1> mov word [terminator_in_line_in.offset], si 3095 00006259 A2[100C] <1> mov byte [terminator_in_line_in.value], al 3096 0000625C 46 <1> inc si 3097 0000625D C3 <1> retn 3098 <1> 3099 <1> 3100 <1> ; DPR:word [load_kernelname_input] -> ASCIZ pathname. 3101 <1> ; if it ends in '/', append DPR:word [load_kernelname_default] 3102 <1> ; DPR:word [load_addname_input] -> ASCIZ pathname. 3103 <1> ; if it ends in '/', append DPR:word [load_addname_default] 3104 <1> ; if it's empty (and no trailing '/' in front of the zero) 3105 <1> ; then no additional name is given. 3106 <1> .fn_done_eol: 3107 0000625E B00D <1> mov al, 13 3108 <1> .fn_done: 3109 <1> d4 call d4message 3110 <1> d4 asciz "In bootcmd.fn_done",13,10 3111 <1> 3112 00006260 8326[DE8F]00 <1> and word [load_cmdline], 0 3113 <1> 3114 00006265 E8D256 <1> call iseol? 3115 00006268 743E <1> je @F 3116 <1> 3117 0000626A F606[198D]10 <1> testopt [load_options], LOAD_CMDLINE 3118 0000626F 7503E99E42 <1> jz error 3119 <1> 3120 00006274 E81957 <1> call skipwh0 3121 00006277 B400 <1> mov ah, 0 3122 00006279 3C22 <1> cmp al, '"' 3123 0000627B 7404 <1> je .cmdline_quote 3124 0000627D 3C27 <1> cmp al, "'" 3125 0000627F 7503 <1> jne .cmdline_no_quote 3126 <1> .cmdline_quote: 3127 00006281 88C4 <1> mov ah, al 3128 00006283 A8 <1> db __TEST_IMM8 3129 <1> .cmdline_no_quote: 3130 00006284 4E <1> dec si 3131 00006285 8936[DE8F] <1> mov word [load_cmdline], si 3132 <1> .cmdline_loop: 3133 00006289 AC <1> lodsb 3134 0000628A E8B156 <1> call iseol?.notsemicolon 3135 0000628D 740E <1> je .cmdline_eol 3136 0000628F 38E0 <1> cmp al, ah 3137 00006291 75F6 <1> jne .cmdline_loop 3138 <1> .cmdline_quote_eol: 3139 00006293 C644FF00 <1> mov byte [si - 1], 0 3140 00006297 AC <1> lodsb 3141 00006298 E8B456 <1> call chkeol 3142 0000629B EB0B <1> jmp @F 3143 <1> 3144 <1> .cmdline_eol: 3145 0000629D 84E4 <1> test ah, ah 3146 0000629F 7403E96E42 <1> jnz error 3147 000062A4 C644FF00 <1> mov byte [si - 1], 0 3148 <1> 3149 <1> @@: 3150 000062A8 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3151 000062AD 7527 <1> jnz .load_kernel_from_ldp 3152 <1> 3153 000062AF 8A1E[E28F] <1> mov bl, [load_partition] 3154 000062B3 803E[F08C]80 <1> cmp byte [load_unit], 80h 3155 000062B8 7228 <1> jb .p_f_is_diskette 3156 000062BA 84DB <1> test bl, bl ; partition specified ? 3157 000062BC 7503E954FD <1> jz .error ; no, error --> 3158 <1> 3159 000062C1 E8B914 <1> call query_geometry 3160 <1> 3161 000062C4 B9[F869] <1> mov cx, load_freedos_from_partition 3162 000062C7 E80B13 <1> call scan_partitions 3163 000062CA BA[7661] <1> mov dx, msg.boot_partition_not_found 3164 000062CD B81102 <1> mov ax, 0211h 3165 000062D0 E88642 <1> call setrc 3166 000062D3 E95901 <1> jmp .fail 3167 <1> 3168 <1> 3169 <1> .load_kernel_from_ldp: 3170 000062D6 E8A414 <1> call query_geometry 3171 000062D9 A1[D88F] <1> mov ax, word [load_partition_sector] 3172 000062DC 8B16[DA8F] <1> mov dx, word [load_partition_sector + 2] 3173 000062E0 EB0E <1> jmp @F 3174 <1> 3175 <1> 3176 <1> .p_f_is_diskette: 3177 000062E2 84DB <1> test bl, bl ; partition specified ? 3178 000062E4 7403E92CFD <1> jnz .error ; yes, error --> 3179 <1> 3180 000062E9 E89114 <1> call query_geometry 3181 <1> 3182 000062EC 31C0 <1> xor ax, ax 3183 000062EE 31D2 <1> xor dx, dx 3184 <1> @@: 3185 000062F0 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 3186 000062F4 52 <1> push dx 3187 000062F5 50 <1> push ax 3188 000062F6 E83A16 <1> call read_ae_512_bytes 3189 <1> 3190 000062F9 26813EFE0155AA <1> cmp word [es:510], 0AA55h 3191 00006300 7403E91C19 <1> jne boot_sigmismatch 3192 00006305 58 <1> pop ax 3193 00006306 5A <1> pop dx 3194 <1> 3195 00006307 06 <1> push es 3196 00006308 F606[198D]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 3197 0000630D 7434 <1> jz @F 3198 <1> 3199 0000630F 50 <1> push ax 3200 00006310 31FF <1> xor di, di 3201 00006312 8EC7 <1> mov es, di 3202 00006314 BF0006 <1> mov di, 600h 3203 00006317 B8CD19 <1> mov ax, 19CDh 3204 0000631A AB <1> stosw ; fake boot sector loader 3205 0000631B B9FE00 <1> mov cx, 508 / 2 3206 0000631E 31C0 <1> xor ax, ax 3207 00006320 F3AB <1> rep stosw ; initialise pseudo MBR 3208 00006322 B855AA <1> mov ax, 0AA55h 3209 00006325 AB <1> stosw ; fake boot sector signature 3210 00006326 58 <1> pop ax 3211 <1> 3212 00006327 BEBE07 <1> mov si, 600h + 512 - 2 - 64 3213 0000632A 26894408 <1> mov word [es:si + 8], ax 3214 0000632E 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 3215 00006332 26C60480 <1> mov byte [es:si + piBoot], 80h ; fake primary active 3216 00006336 26C64404FF <1> mov byte [es:si + piType], 0FFh ; fake a type 3217 0000633B 26FE440C <1> inc byte [es:si + piLength] ; fake a size 3218 <1> 3219 0000633F 8936[E08F] <1> mov word [load_partition_entry], si 3220 <1> @@: 3221 00006343 07 <1> pop es 3222 <1> 3223 00006344 E92007 <1> jmp load_freedos_common 3224 <1> 3225 <1> 3226 <1> .load: 3227 00006347 7403E9C9FC <1> jnz bootcmd.error 3228 <1> 3229 0000634C F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3230 00006351 751C <1> jnz .load_sector_from_ldp 3231 <1> 3232 00006353 803E[E28F]00 <1> cmp byte [load_partition], 0 3233 00006358 7421 <1> je .load_boot 3234 <1> 3235 0000635A E82014 <1> call query_geometry 3236 <1> 3237 <1> d4 call d4message 3238 <1> d4 asciz "In bootcmd.load (before call to scan_partitions)",13,10 3239 <1> 3240 0000635D B9[8969] <1> mov cx, load_from_partition 3241 00006360 E87212 <1> call scan_partitions 3242 00006363 BA[7661] <1> mov dx, msg.boot_partition_not_found 3243 00006366 B81202 <1> mov ax, 0212h 3244 00006369 E8ED41 <1> call setrc 3245 0000636C E9C000 <1> jmp .fail 3246 <1> 3247 <1> 3248 <1> .load_sector_from_ldp: 3249 0000636F E80B14 <1> call query_geometry 3250 00006372 A1[D88F] <1> mov ax, word [load_partition_sector] 3251 00006375 8B16[DA8F] <1> mov dx, word [load_partition_sector + 2] 3252 00006379 EB07 <1> jmp @F 3253 <1> 3254 <1> .load_boot: 3255 0000637B E8FF13 <1> call query_geometry 3256 <1> 3257 0000637E 31C0 <1> xor ax, ax 3258 00006380 31D2 <1> xor dx, dx 3259 <1> @@: 3260 00006382 BBC007 <1> mov bx, 7C0h 3261 <1> d4 call d4dumpregs 3262 <1> d4 call d4message 3263 <1> d4 asciz 13,10,"In bootcmd.load_boot (before call to read_sector)",13,10 3264 00006385 52 <1> push dx 3265 00006386 50 <1> push ax 3266 00006387 E8A915 <1> call read_ae_512_bytes 3267 <1> d4 call d4message 3268 <1> d4 asciz "In bootcmd.load_boot (after call to read_sector)",13,10 3269 0000638A 31D2 <1> xor dx, dx 3270 0000638C 8EC2 <1> mov es, dx 3271 <1> 3272 0000638E A0[F08C] <1> mov al, byte [load_unit] ; al = boot unit 3273 00006391 BB007C <1> mov bx, 7C00h 3274 <1> 3275 00006394 26813EFE7D55AA <1> cmp word [es:7C00h + 510], 0AA55h 3276 0000639B 7403E98118 <1> jne boot_sigmismatch 3277 <1> 3278 000063A0 26833F00 <1> cmp word [es:bx], 0 3279 000063A4 7503E98418 <1> je boot_codemismatch 3280 <1> 3281 000063A9 50 <1> push ax 3282 000063AA B9FF00 <1> mov cx, 510 / 2 3283 000063AD BF0006 <1> mov di, 600h ; MBR location 3284 000063B0 31C0 <1> xor ax, ax 3285 000063B2 F3AB <1> rep stosw ; initialise (sector and all entries) 3286 000063B4 B855AA <1> mov ax, 0AA55h 3287 000063B7 AB <1> stosw ; initialise boot sector signature 3288 000063B8 26C7060006CD19 <1> mov word [es:600h], 019CDh ; initialise boot sector code 3289 000063BF BFBE07 <1> mov di, 600h + 510 - 4*16 ; -> first partition table entry 3290 000063C2 58 <1> pop ax 3291 000063C3 268F4508 <1> pop word [es:di + piStart] 3292 000063C7 268F450A <1> pop word [es:di + piStart + 2] ; = boot sector LBA 3293 000063CB 26C60580 <1> mov byte [es:di + 0], 80h ; "bootable" flag set 3294 000063CF 26C64504FF <1> mov byte [es:di + 4], 0FFh ; dummy value for FS type (nonzero) 3295 000063D4 26C6450C01 <1> mov byte [es:di + 12], 1 ; dummy value for length (nonzero) 3296 <1> 3297 <1> load_partition_common: equ $ 3298 000063D9 8126[A00C]FFF8 <1> and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 3299 000063DF 893E[7C0C] <1> mov word [reg_esi], di 3300 000063E3 893E[780C] <1> mov word [reg_ebp], di 3301 000063E7 890E[840C] <1> mov word [reg_ds], cx ; ds:si -> 0:600h + offset to first entry 3302 000063EB A2[700C] <1> mov byte [reg_edx], al ; dl = boot unit 3303 000063EE 891E[9C0C] <1> mov word [reg_eip], bx 3304 000063F2 890E[9E0C] <1> mov word [reg_eip + 2], cx 3305 000063F6 890E[900C] <1> mov word [reg_cs], cx ; cs:eip = 0:7C00h 3306 000063FA 803E[E68F]00 <1> cmp byte [load_sector_alt], 0 3307 000063FF 740A <1> je @F 3308 00006401 890E[9C0C] <1> mov word [reg_eip], cx 3309 00006405 C706[900C]C007 <1> mov word [reg_cs], 7C0h ; cs:eip = 07C0h:0 3310 <1> @@: 3311 0000640B 891E[740C] <1> mov word [reg_esp], bx 3312 0000640F 890E[760C] <1> mov word [reg_esp + 2], cx 3313 00006413 890E[8C0C] <1> mov word [reg_ss], cx ; ss:esp = 0:7C00h 3314 00006417 800E[A300]01 <1> setopt [internalflags2], dif2_boot_loaded_kernel 3315 0000641C C3 <1> retn 3316 <1> 3317 <1> 3318 <1> .fail_read: 3319 0000641D 16 <1> push ss 3320 0000641E 07 <1> pop es 3321 0000641F BF[0860] <1> mov di, msg.bootfail_read_errorcode 3322 00006422 88E0 <1> mov al, ah 3323 00006424 B404 <1> mov ah, 04h 3324 00006426 E83041 <1> call setrc 3325 00006429 E81556 <1> call hexbyte 3326 0000642C BA[EB5F] <1> mov dx, msg.bootfail_read 3327 <1> 3328 <1> .fail: 3329 0000642F 16 <1> push ss 3330 00006430 07 <1> pop es 3331 00006431 52 <1> push dx 3332 00006432 BA[DC5F] <1> mov dx, msg.bootfail 3333 00006435 E8B259 <1> call putsz_error 3334 00006438 5A <1> pop dx 3335 00006439 E8AE59 <1> call putsz_error 3336 0000643C B8FF02 <1> mov ax, 02FFh 3337 0000643F E81741 <1> call setrc 3338 00006442 FF26[9A0A] <1> jmp near word [errret] 3339 <1> 3340 <1> 3341 <1> bootcmd.list: 3342 00006446 E81755 <1> call skipcomma 3343 <1> 3344 00006449 E8E201 <1> call parseloadunit_default_sdp 3345 0000644C 7403E9C4FB <1> jnz bootcmd.error 3346 <1> 3347 00006451 E82913 <1> call query_geometry 3348 <1> 3349 00006454 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 3350 00006459 752B <1> jnz .list_ldp 3351 <1> 3352 0000645B 803E[E28F]00 <1> cmp byte [load_partition], 0 3353 00006460 741E <1> je .listall 3354 <1> 3355 00006462 C606[E48F]00 <1> mov byte [load_found_partition], 0 3356 00006467 B9[BF64] <1> mov cx, list_single_partition 3357 0000646A E86811 <1> call scan_partitions 3358 0000646D 803E[E48F]00 <1> cmp byte [load_found_partition], 0 3359 00006472 750B <1> jne @F 3360 00006474 BA[7661] <1> mov dx, msg.boot_partition_not_found 3361 00006477 B81302 <1> mov ax, 0213h 3362 0000647A E8DC40 <1> call setrc 3363 0000647D EBB0 <1> jmp bootcmd.fail 3364 <1> @@: 3365 0000647F C3 <1> retn 3366 <1> 3367 <1> .listall: 3368 00006480 B9[CD64] <1> mov cx, list_any_partition 3369 00006483 E94F11 <1> jmp scan_partitions 3370 <1> 3371 <1> .list_ldp: 3372 00006486 C606[E48F]00 <1> mov byte [load_found_partition], 0 3373 0000648B B9[A464] <1> mov cx, list_partition_if_ldp 3374 0000648E E84411 <1> call scan_partitions 3375 00006491 803E[E48F]00 <1> cmp byte [load_found_partition], 0 3376 00006496 750B <1> jne @F 3377 00006498 BA[7661] <1> mov dx, msg.boot_partition_not_found 3378 0000649B B81402 <1> mov ax, 0214h 3379 0000649E E8B840 <1> call setrc 3380 000064A1 EB8C <1> jmp bootcmd.fail 3381 <1> @@: 3382 000064A3 C3 <1> retn 3383 <1> 3384 <1> 3385 <1> list_partition_if_ldp: 3386 <1> d4 call d4message 3387 <1> d4 asciz "In list_partition_if_ldp",13,10 3388 <1> 3389 000064A4 8B43F8 <1> mov ax, word [bp + di - 8] 3390 000064A7 8B53FA <1> mov dx, word [bp + di - 6] ; root 3391 000064AA 26034408 <1> add ax, word [es:si + 8] 3392 000064AE 2613540A <1> adc dx, word [es:si + 8 + 2] ; add partition offset 3393 000064B2 3906[D88F] <1> cmp word [load_partition_sector], ax 3394 000064B6 7506 <1> jne @F 3395 000064B8 3916[DA8F] <1> cmp word [load_partition_sector + 2], dx 3396 000064BC 740B <1> je list_single_partition.gotit 3397 <1> @@: 3398 000064BE C3 <1> retn 3399 <1> 3400 <1> list_single_partition: 3401 <1> d4 call d4message 3402 <1> d4 asciz "In list_single_partition",13,10 3403 <1> 3404 000064BF A0[E38F] <1> mov al, byte [load_current_partition] 3405 000064C2 3A06[E28F] <1> cmp al, byte [load_partition] 3406 000064C6 7401 <1> je .gotit 3407 000064C8 C3 <1> retn 3408 <1> 3409 <1> .gotit: 3410 000064C9 FE06[E48F] <1> inc byte [load_found_partition] 3411 <1> 3412 <1> ; INP: es:si -> partition table entry, 3413 <1> ; si = load_partition_table .. load_partition_table+48, 3414 <1> ; es = ss 3415 <1> ; bp + di -> above part table metadata, 3416 <1> ; dwo [bp + di - 4] = root (outermost extended position) 3417 <1> ; dwo [bp + di - 8] = base (current table position) 3418 <1> ; CHG: ax, bx, (cx), dx 3419 <1> list_any_partition: 3420 000064CD 06 <1> push es 3421 000064CE 51 <1> push cx 3422 000064CF 56 <1> push si 3423 000064D0 57 <1> push di 3424 <1> 3425 000064D1 BF[0E08] <1> mov di, line_out ; reset di 3426 000064D4 B075 <1> mov al, "u" 3427 000064D6 AA <1> stosb 3428 000064D7 A0[F08C] <1> mov al, byte [load_unit] 3429 000064DA E86455 <1> call hexbyte 3430 000064DD B02E <1> mov al, '.' 3431 000064DF AA <1> stosb 3432 000064E0 A0[E38F] <1> mov al, byte [load_current_partition] 3433 000064E3 E8BB54 <1> call decbyte 3434 000064E6 3C0A <1> cmp al, 10 3435 000064E8 B020 <1> mov al, 32 3436 000064EA 7301 <1> jae @F 3437 000064EC AA <1> stosb 3438 <1> @@: 3439 000064ED AA <1> stosb 3440 <1> 3441 000064EE A0[F08C] <1> mov al, byte [load_unit] 3442 000064F1 BB6664 <1> mov bx, "fd" 3443 000064F4 3C80 <1> cmp al, 80h 3444 000064F6 7202 <1> jb @F 3445 000064F8 B368 <1> mov bl, "h" 3446 <1> @@: 3447 000064FA 247F <1> and al, ~80h 3448 000064FC 0461 <1> add al, 'a' 3449 000064FE 3C7A <1> cmp al, 'z' 3450 00006500 7609 <1> jbe @F 3451 00006502 B020 <1> mov al, 32 3452 00006504 B90500 <1> mov cx, 3 + 2 3453 00006507 F3AA <1> rep stosb 3454 00006509 EB11 <1> jmp @FF 3455 <1> 3456 <1> @@: 3457 0000650B 93 <1> xchg ax, bx 3458 0000650C AB <1> stosw 3459 0000650D 93 <1> xchg ax, bx 3460 0000650E AA <1> stosb 3461 0000650F A0[E38F] <1> mov al, byte [load_current_partition] 3462 00006512 E88C54 <1> call decbyte 3463 00006515 3C0A <1> cmp al, 10 3464 00006517 B020 <1> mov al, 32 3465 00006519 7301 <1> jae @F 3466 0000651B AA <1> stosb 3467 <1> @@: 3468 0000651C AA <1> stosb 3469 <1> 3470 0000651D 8A4404 <1> mov al, byte [si + 4] 3471 00006520 E81E55 <1> call hexbyte 3472 <1> 3473 00006523 B020 <1> mov al, 32 3474 00006525 AA <1> stosb 3475 <1> 3476 00006526 89F9 <1> mov cx, di ; (preserve di in line_out) 3477 00006528 5F <1> pop di ; get di of scan_partitions 3478 00006529 57 <1> push di 3479 0000652A 8B43F8 <1> mov ax, word [bp + di - 8] 3480 0000652D 8B53FA <1> mov dx, word [bp + di - 6] ; root 3481 00006530 89CF <1> mov di, cx ; (preserve di in line_out) 3482 00006532 034408 <1> add ax, word [si + 8] 3483 00006535 13540A <1> adc dx, word [si + 8 + 2] ; add partition offset 3484 00006538 92 <1> xchg ax, dx 3485 00006539 E8FE54 <1> call hexword 3486 0000653C 92 <1> xchg ax, dx 3487 0000653D E8FA54 <1> call hexword 3488 <1> 3489 00006540 50 <1> push ax 3490 00006541 B82028 <1> mov ax, " (" 3491 00006544 AB <1> stosw 3492 00006545 58 <1> pop ax 3493 00006546 51 <1> push cx 3494 00006547 53 <1> push bx 3495 00006548 8B0E[BB8C] <1> mov cx, [load_sectorsize] 3496 0000654C BB0800 <1> mov bx, 4+4 3497 0000654F E80BBA <1> call disp_dxax_times_cx_width_bx_size.store 3498 00006552 50 <1> push ax 3499 00006553 B82920 <1> mov ax, ") " 3500 00006556 AB <1> stosw 3501 00006557 58 <1> pop ax 3502 <1> 3503 00006558 52 <1> push dx 3504 00006559 50 <1> push ax 3505 <1> 3506 0000655A 8B440C <1> mov ax, word [si + 12] 3507 0000655D 8B540E <1> mov dx, word [si + 12 + 2] 3508 00006560 92 <1> xchg ax, dx 3509 00006561 E8D654 <1> call hexword 3510 00006564 92 <1> xchg ax, dx 3511 00006565 E8D254 <1> call hexword 3512 <1> 3513 00006568 50 <1> push ax 3514 00006569 B82028 <1> mov ax, " (" 3515 0000656C AB <1> stosw 3516 0000656D 58 <1> pop ax 3517 0000656E E8ECB9 <1> call disp_dxax_times_cx_width_bx_size.store 3518 00006571 B029 <1> mov al, ")" 3519 00006573 AA <1> stosb 3520 <1> 3521 00006574 58 <1> pop ax 3522 00006575 5A <1> pop dx 3523 <1> 3524 00006576 5B <1> pop bx 3525 00006577 59 <1> pop cx 3526 <1> 3527 00006578 807C0483 <1> cmp byte [si + piType], ptLinux 3528 0000657C 7544 <1> jne .notlinux 3529 <1> 3530 0000657E 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 3531 00006582 E89D13 <1> call read_ae_1536_bytes 3532 <1> 3533 00006585 26813E380453EF <1> cmp word [es:1024 + 56], 0xEF53 ; s_magic == EXT2_SUPER_MAGIC ? 3534 0000658C 7403E99300 <1> jne .nolabel 3535 <1> 3536 00006591 26833E4E0400 <1> cmp word [es:1024 + 76 + 2], 0 3537 00006597 7403E98800 <1> jne .nolabel 3538 0000659C 26833E4C0401 <1> cmp word [es:1024 + 76], 1 ; s_rev_level == EXT2_DYNAMIC_REV ? 3539 000065A2 7403E97D00 <1> jne .nolabel 3540 <1> 3541 000065A7 06 <1> push es 3542 000065A8 1F <1> pop ds 3543 000065A9 BE7804 <1> mov si, 1024 + 120 3544 000065AC B91000 <1> mov cx, 16 3545 000065AF 16 <1> push ss 3546 000065B0 07 <1> pop es 3547 <1> 3548 000065B1 B020 <1> mov al, 32 3549 000065B3 AA <1> stosb 3550 <1> @@: 3551 000065B4 AC <1> lodsb 3552 000065B5 84C0 <1> test al, al 3553 000065B7 7403 <1> jz @F 3554 000065B9 AA <1> stosb 3555 000065BA E2F8 <1> loop @B 3556 <1> @@: 3557 <1> 3558 000065BC 16 <1> push ss 3559 000065BD 1F <1> pop ds 3560 <1> 3561 000065BE 59 <1> pop cx 3562 000065BF 5E <1> pop si 3563 000065C0 56 <1> push si ; get si of scan_partitions 3564 000065C1 51 <1> push cx 3565 <1> 3566 <1> .notlinux: 3567 000065C2 8A5C04 <1> mov bl, byte [si + piType] 3568 000065C5 80FB01 <1> cmp bl, ptFAT12 3569 000065C8 7419 <1> je .isfat 3570 000065CA 80FB04 <1> cmp bl, ptFAT16_16BIT_CHS 3571 000065CD 7414 <1> je .isfat 3572 000065CF 80FB06 <1> cmp bl, ptFAT16_CHS 3573 000065D2 740F <1> je .isfat 3574 000065D4 80FB0B <1> cmp bl, ptFAT32_CHS 3575 000065D7 740A <1> je .isfat 3576 000065D9 80FB0C <1> cmp bl, ptFAT32 3577 000065DC 7405 <1> je .isfat 3578 000065DE 80FB0E <1> cmp bl, ptFAT16 3579 000065E1 7541 <1> jne .notfat 3580 <1> .isfat: 3581 <1> 3582 000065E3 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 3583 000065E7 E84913 <1> call read_ae_512_bytes 3584 <1> 3585 000065EA 26813EFE0155AA <1> cmp word [es:510], 0AA55h 3586 000065F1 7531 <1> jne .nolabel 3587 000065F3 26833E0B0000 <1> cmp word [es:bsBPB + bpbBytesPerSector], 0 3588 000065F9 7429 <1> je .nolabel 3589 000065FB BE2B00 <1> mov si, bsBPB + bpbNew + bpbnVolumeLabel 3590 000065FE 26833E160000 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], 0 3591 00006604 7503 <1> jne @F 3592 00006606 BE4700 <1> mov si, bsBPB + ebpbNew + bpbnVolumeLabel 3593 <1> @@: 3594 00006609 26807CFB29 <1> cmp byte [es:si - bpbnVolumeLabel + bpbnExtBPBSignature], 29h 3595 0000660E 7514 <1> jne .nolabel 3596 00006610 B90B00 <1> mov cx, 11 3597 <1> 3598 00006613 06 <1> push es 3599 00006614 1F <1> pop ds 3600 00006615 16 <1> push ss 3601 00006616 07 <1> pop es 3602 <1> 3603 00006617 B020 <1> mov al, 32 3604 00006619 AA <1> stosb 3605 <1> @@: 3606 0000661A AC <1> lodsb 3607 0000661B 84C0 <1> test al, al 3608 0000661D 7403 <1> jz @F 3609 0000661F AA <1> stosb 3610 00006620 E2F8 <1> loop @B 3611 <1> @@: 3612 <1> 3613 00006622 16 <1> push ss 3614 00006623 1F <1> pop ds 3615 <1> .notfat: 3616 <1> .nolabel: 3617 00006624 16 <1> push ss 3618 00006625 07 <1> pop es 3619 00006626 E84954 <1> call putsline_crlf 3620 <1> 3621 00006629 5F <1> pop di 3622 0000662A 5E <1> pop si 3623 0000662B 59 <1> pop cx 3624 0000662C 07 <1> pop es 3625 0000662D C3 <1> retn 3626 <1> 3627 <1> 3628 <1> ; INP: al = first character 3629 <1> ; si -> next 3630 <1> ; OUT: NC 3631 <1> ; byte [load_unit] set 3632 <1> ; byte [load_partition] set 3633 <1> ; (zero if none specified, -1 if ldp or sdp) 3634 <1> ; opt [internalflags3] & dif3_load_is_ldp 3635 <1> ; opt [internalflags3] & dif3_load_is_sdp 3636 <1> ; dword [load_partition_sector] set if ldp or sdp 3637 <1> ; ZR if no filename specified (at end of input) 3638 <1> ; NZ if presumably a filename specified, 3639 <1> ; al = first character (slash or whatever non-blank) 3640 <1> ; si -> next 3641 <1> ; CHG: bx, cx, dx, ax, si, di 3642 <1> ; STT: ds = es = ss 3643 <1> parseloadunit_default_sdp: 3644 0000662E E81C00 <1> call parseloadunit 3645 00006631 7319 <1> jnc @F 3646 <1> 3647 00006633 8A16[F08C] <1> mov dl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 3649 00006637 8816[F08C] <1> mov byte [load_unit], dl 3650 0000663B C606[E28F]FF <1> mov byte [load_partition], -1 3651 00006640 800E[A400]02 <1> or byte [internalflags3], dif3_load_is_sdp 3652 <1> 3653 00006645 E84853 <1> call skipwh0 3654 00006648 E8EF52 <1> call iseol? 3655 0000664B F8 <1> clc 3656 <1> @@: 3657 0000664C C3 <1> retn 3658 <1> 3659 <1> 3660 <1> ; INP: al = first character 3661 <1> ; si -> next 3662 <1> ; OUT: CY if no load unit 3663 <1> ; (not "HD[A-Z]", "FD[A-Z]", "LD[P]", "SD[P]", "U[0-9A-F]") 3664 <1> ; note: this is barely used! 3665 <1> ; NC else, 3666 <1> ; byte [load_unit] set 3667 <1> ; byte [load_partition] set 3668 <1> ; (zero if none specified, -1 if ldp or sdp) 3669 <1> ; opt [internalflags3] & dif3_load_is_ldp 3670 <1> ; opt [internalflags3] & dif3_load_is_sdp 3671 <1> ; dword [load_partition_sector] set if ldp or sdp 3672 <1> ; ZR if no filename specified (at end of input) 3673 <1> ; NZ if presumably a filename specified, 3674 <1> ; al = first character (slash or whatever non-blank) 3675 <1> ; si -> next 3676 <1> ; CHG: bx, cx, dx, ax, si, di 3677 <1> ; STT: ds = es = ss 3678 <1> parseloadunit: 3679 0000664D 31DB <1> xor bx, bx 3680 <1> lframe near 3681 <1> lvar word, unit_low_partition_high 3682 <1> lequ ?unit_low_partition_high, unit 3683 <1> lequ ?unit_low_partition_high + 1, partition 3684 0000664F 5589E550 <1> lenter 3685 <1> lvar word, dif3_set 3686 00006653 53 <1> push bx 3687 <1> lvar dword, load_partition_sector 3688 00006654 FF36[DA8F] <1> push word [load_partition_sector + 2] 3689 00006658 FF36[D88F] <1> push word [load_partition_sector] 3690 <1> 3691 0000665C 89F7 <1> mov di, si 3692 0000665E 8026[A400]F8 <1> clropt [internalflags3], dif3_load_is_dp 3693 00006663 E8DD25 <1> call uppercase 3694 00006666 3C48 <1> cmp al, 'H' 3695 00006668 7503E9EF00 <1> je .load_hd 3696 0000666D 3C46 <1> cmp al, 'F' 3697 0000666F 7503E9E500 <1> je .load_fd 3698 00006674 B401 <1> mov ah, dif3_load_is_ldp 3699 00006676 3C4C <1> cmp al, 'L' 3700 00006678 7419 <1> je .load_ld_sd 3701 0000667A B402 <1> mov ah, dif3_load_is_sdp 3702 0000667C 3C53 <1> cmp al, 'S' 3703 0000667E 7413 <1> je .load_ld_sd 3704 <1> %if _INPUT_FILE_BOOT 3705 00006680 B404 <1> mov ah, dif3_load_is_ydp 3706 00006682 3C59 <1> cmp al, 'Y' 3707 00006684 740D <1> je .load_ld_sd 3708 <1> %endif 3709 00006686 3C55 <1> cmp al, 'U' 3710 00006688 747C <1> je .load_u 3711 <1> .retc: 3712 0000668A 89FE <1> mov si, di 3713 0000668C 4E <1> dec si 3714 0000668D AC <1> lodsb 3715 0000668E F9 <1> stc 3716 <1> .ret: 3717 0000668F 89EC5D <1> lleave code 3718 00006692 C3 <1> lret 3719 <1> 3720 <1> .load_ld_sd: 3721 00006693 AC <1> lodsb 3722 00006694 E8AC25 <1> call uppercase 3723 00006697 3C44 <1> cmp al, 'D' 3724 00006699 75EF <1> jne .retc 3725 <1> 3726 <1> d4 call d4message 3727 <1> d4 asciz "In parseloadunit.load_ld_sd",13,10 3728 <1> 3729 0000669B 8A16[F08C] <1> mov dl, byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit] 3731 0000669F 80FC02 <1> cmp ah, dif3_load_is_sdp 3732 000066A2 741D <1> je @F 3733 000066A4 8A16[508C] <1> mov dl, byte [loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit] 3735 <1> %if _INPUT_FILE_BOOT 3736 000066A8 80FC01 <1> cmp ah, dif3_load_is_ldp 3737 000066AB 7414 <1> je @F 3738 000066AD F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 3739 000066B2 74D6 <1> jz .retc 3740 <1> 3741 000066B4 93 <1> xchg ax, bx 3742 000066B5 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 3743 000066B8 F726[D08F] <1> mul word [load_input_file.active] 3744 <1> 3745 <1> ; test dx, dx 3746 <1> ; jnz .error 3747 <1> 3748 000066BC 93 <1> xchg ax, bx 3749 000066BD 8A97[D08D] <1> mov dl, byte [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 3751 <1> %endif 3752 <1> @@: 3753 000066C1 AC <1> lodsb 3754 000066C2 E87E25 <1> call uppercase 3755 000066C5 3C50 <1> cmp al, 'P' 3756 000066C7 7403E9AD00 <1> jne .got_unit 3757 <1> 3758 <1> d4 call d4message 3759 <1> d4 asciz "In parseloadunit.load_ld_sd with ldp",13,10 3760 <1> 3761 000066CC 8856FE <1> mov byte [bp + ?unit], dl 3762 000066CF C646FFFF <1> mov byte [bp + ?partition], -1 3763 000066D3 0866FC <1> or byte [bp + ?dif3_set], ah 3764 <1> 3765 000066D6 80FC02 <1> cmp ah, dif3_load_is_sdp 3766 000066D9 741D <1> je @F 3767 <1> %if _INPUT_FILE_BOOT 3768 000066DB 80FC01 <1> cmp ah, dif3_load_is_ldp 3769 000066DE 740A <1> je .is_ldp 3770 000066E0 FFB7[AE8D] <1> push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors + 2] 3772 000066E4 FFB7[AC8D] <1> push word [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 3774 000066E8 EB08 <1> jmp .is_ldp_ydp 3775 <1> 3776 <1> %endif 3777 <1> .is_ldp: 3778 000066EA FF36[2E8C] <1> push word [load_ldp_sector + 2] 3779 000066EE FF36[2C8C] <1> push word [load_ldp_sector] 3780 <1> .is_ldp_ydp: 3781 000066F2 8F46F8 <1> pop word [bp + ?load_partition_sector] 3782 000066F5 8F46FA <1> pop word [bp + ?load_partition_sector + 2] 3783 <1> @@: 3784 <1> 3785 000066F8 E89452 <1> call skipwhite 3786 000066FB E83C52 <1> call iseol? 3787 000066FE 7403E9F700 <1> jne .fn 3788 00006703 E9F000 <1> jmp .ret_nc 3789 <1> 3790 <1> .load_u: 3791 00006706 AC <1> lodsb 3792 00006707 E83925 <1> call uppercase 3793 <1> 3794 0000670A 3C28 <1> cmp al, '(' 3795 0000670C 7419 <1> je @F 3796 0000670E 3C30 <1> cmp al, '0' 3797 00006710 7303E975FF <1> jb .retc 3798 00006715 3C39 <1> cmp al, '9' 3799 00006717 760E <1> jbe @F 3800 00006719 3C41 <1> cmp al, 'A' 3801 0000671B 7303E96AFF <1> jb .retc 3802 00006720 3C46 <1> cmp al, 'F' 3803 00006722 7603E963FF <1> ja .retc 3804 <1> @@: 3805 <1> 3806 00006727 3C28 <1> cmp al, '(' 3807 00006729 7511 <1> jne .u_not_expr 3808 0000672B AC <1> lodsb 3809 0000672C E8044C <1> call getexpression 3810 0000672F E85E52 <1> call skipwh0 3811 00006732 3C29 <1> cmp al, ')' 3812 00006734 AC <1> lodsb 3813 00006735 7403E9DAF8 <1> jne bootcmd.errordec 3814 0000673A EB03 <1> jmp .u_check_dot 3815 <1> 3816 <1> .u_not_expr: 3817 0000673C E8E90F <1> call boot_get_hexadecimal_literal 3818 <1> .u_check_dot: 3819 0000673F 3C2E <1> cmp al, '.' 3820 00006741 7403E9CFF8 <1> jne bootcmd.error 3821 00006746 AC <1> lodsb 3822 00006747 85DB <1> test bx, bx 3823 00006749 7403E9C7F8 <1> jnz bootcmd.error 3824 0000674E 81FA0001 <1> cmp dx, 256 3825 00006752 7203E9BEF8 <1> jae bootcmd.error 3826 00006757 EB20 <1> jmp .got_unit 3827 <1> 3828 <1> .load_fd: 3829 00006759 B200 <1> mov dl, 0 3830 <1> 3831 <1> d4 call d4message 3832 <1> d4 asciz "In parseloadunit.load_fd",13,10 3833 <1> 3834 0000675B A9 <1> db __TEST_IMM16 ; skip mov 3835 <1> .load_hd: 3836 0000675C B280 <1> mov dl, 80h 3837 <1> d4 call d4message 3838 <1> d4 asciz "In parseloadunit.load_fd or .load_hd",13,10 3839 <1> 3840 0000675E AC <1> lodsb 3841 0000675F E8E124 <1> call uppercase 3842 00006762 3C44 <1> cmp al, 'D' 3843 00006764 7403E921FF <1> jne .retc 3844 00006769 AC <1> lodsb 3845 0000676A E8D624 <1> call uppercase 3846 0000676D 2C41 <1> sub al, 'A' 3847 0000676F 3C19 <1> cmp al, 'Z' - 'A' 3848 00006771 7603E914FF <1> ja .retc 3849 00006776 08C2 <1> or dl, al ; hdX: 80h + number, fdX: 0 + number 3850 00006778 AC <1> lodsb 3851 <1> 3852 <1> .got_unit: 3853 00006779 89D1 <1> mov cx, dx 3854 0000677B 884EFE <1> mov byte [bp + ?unit], cl 3855 0000677E C646FF00 <1> mov byte [bp + ?partition], 0 3856 00006782 3C2F <1> cmp al, '/' ; slash ? 3857 00006784 7474 <1> je .fn 3858 00006786 3C5C <1> cmp al, '\' 3859 00006788 7470 <1> je .fn ; got a filename --> 3860 0000678A 3C20 <1> cmp al, 32 ; or blank ? 3861 0000678C 7404 <1> je @F 3862 0000678E 3C09 <1> cmp al, 9 3863 00006790 7508 <1> jne .checkeol ; check for EOL -- but no filename 3864 <1> ; (hdd1name is invalid -- must be hdd1/name or hdd1 name) 3865 <1> @@: ; was blank 3866 00006792 E8FB51 <1> call skipwh0 ; skip blanks 3867 00006795 E8A251 <1> call iseol? ; EOL ? 3868 00006798 7560 <1> jne .fn ; no, is filename --> 3869 <1> ; will jump after this 3870 <1> .checkeol: 3871 0000679A E89D51 <1> call iseol? ; EOL ? 3872 0000679D 7457 <1> je .ret_nc ; yes, no filename --> 3873 <1> 3874 0000679F 3C28 <1> cmp al, '(' 3875 000067A1 740E <1> je @F 3876 000067A3 3C30 <1> cmp al, '0' 3877 000067A5 7303E9E0FE <1> jb .retc 3878 000067AA 3C39 <1> cmp al, '9' 3879 000067AC 7603E9D9FE <1> ja .retc 3880 <1> @@: 3881 <1> 3882 <1> d4 call d4message 3883 <1> d4 asciz "In parseloadunit (after no EOL found)",13,10 3884 000067B1 51 <1> push cx 3885 000067B2 80FA80 <1> cmp dl, 80h 3886 000067B5 7303E95BF8 <1> jb bootcmd.error ; diskettes aren't partitioned 3887 000067BA 3C28 <1> cmp al, '(' 3888 000067BC 750F <1> jne .not_expr 3889 000067BE AC <1> lodsb ; skip opening paren 3890 <1> 3891 <1> d4 call d4message 3892 <1> d4 asciz "In parseloadunit (before call to getexpression)",13,10 3893 <1> 3894 000067BF E8714B <1> call getexpression 3895 <1> 3896 <1> d4 call d4message 3897 <1> d4 asciz "In parseloadunit (after call to getexpression)",13,10 3898 000067C2 E8CB51 <1> call skipwh0 3899 000067C5 3C29 <1> cmp al, ')' 3900 000067C7 AC <1> lodsb 3901 000067C8 7406 <1> je .got_expr 3902 000067CA E947F8 <1> jmp bootcmd.errordec 3903 <1> 3904 <1> .not_expr: 3905 <1> d4 call d4message 3906 <1> d4 asciz "In parseloadunit (before call to boot_get_decimal_literal)",13,10 3907 000067CD E8500F <1> call boot_get_decimal_literal 3908 <1> .got_expr: ; bx:dx = load partition number 3909 <1> d4 call d4message 3910 <1> d4 asciz "In parseloadunit.got_expr",13,10 3911 000067D0 59 <1> pop cx ; cl = load unit 3912 000067D1 85DB <1> test bx, bx 3913 000067D3 7403E93DF8 <1> jnz bootcmd.error 3914 000067D8 81FAFF00 <1> cmp dx, 255 3915 000067DC 7603E934F8 <1> ja bootcmd.error 3916 000067E1 85D2 <1> test dx, dx 3917 000067E3 7503E92DF8 <1> jz bootcmd.error 3918 000067E8 E8A551 <1> call skipwh0 3919 000067EB 8856FF <1> mov byte [bp + ?partition], dl 3920 000067EE 884EFE <1> mov byte [bp + ?unit], cl 3921 000067F1 E84651 <1> call iseol? 3922 000067F4 7504 <1> jne .fn 3923 <1> .ret_nc: 3924 000067F6 31DB <1> xor bx, bx ; NC, ZR 3925 000067F8 EB06 <1> jmp @F 3926 <1> 3927 <1> .fn: 3928 000067FA E89351 <1> call skipwh0 3929 000067FD 83CB01 <1> or bx, 1 ; NC, NZ 3930 <1> @@: 3931 00006800 8F06[D88F] <1> pop word [load_partition_sector] 3932 00006804 8F06[DA8F] <1> pop word [load_partition_sector + 2] 3933 <1> ; pop from ?load_partition_sector 3934 00006808 9C <1> pushf 3935 00006809 8B5EFE <1> mov bx, word [bp + ?unit_low_partition_high] 3936 0000680C 881E[F08C] <1> mov byte [load_unit], bl 3937 00006810 883E[E28F] <1> mov byte [load_partition], bh 3938 00006814 8A5EFC <1> mov bl, byte [bp + ?dif3_set] 3939 00006817 081E[A400] <1> or byte [internalflags3], bl 3940 0000681B 9D <1> popf ; ZF, CF 3941 0000681C E970FE <1> jmp .ret 3942 <1> 3943 <1> lleave ctx 3944 <1> 3945 <1> 3946 0000681F 00 <1> align 4, db 0 3947 <1> 3948 <1> boot_read: 3949 00006820 C706[1090][4579] <1> mov word [load_readwrite_function], read_sector 3950 00006826 EB06 <1> jmp boot_readwrite 3951 <1> 3952 <1> boot_write: 3953 00006828 C706[1090][4479] <1> mov word [load_readwrite_function], write_sector 3954 <1> 3955 <1> boot_readwrite: 3956 <1> 3957 <1> d4 call d4message 3958 <1> d4 asciz "In boot_readwrite",13,10 3959 <1> 3960 0000682E E84851 <1> call skipequals 3961 00006831 E8FAFD <1> call parseloadunit_default_sdp 3962 00006834 7503E9C800 <1> jz .error 3963 <1> 3964 <1> %if 0 3965 <1> call skipwh0 3966 <1> mov bx, word [reg_ds] ; default segment 3967 <1> call getaddr ; get buffer address into bx:(e)dx 3968 <1> 3969 <1> _386 test edx, 0FFFF_0000h 3970 <1> _386 jnz .error 3971 <1> 3972 <1> ; (variable must be a dword!) 3973 <1> mov word [load_readwrite_buffer], dx 3974 <1> mov word [load_readwrite_buffer + 2], bx 3975 <1> %else 3976 00006839 E8DD4F <1> call getword 3977 <1> ; (variable is a word) 3978 0000683C 8916[0C90] <1> mov word [load_readwrite_buffer], dx 3979 <1> %endif 3980 <1> 3981 00006840 E84D51 <1> call skipwh0 3982 00006843 E8F450 <1> call iseol? 3983 00006846 750F <1> jne @F 3984 <1> 3985 <1> d4 call d4message 3986 <1> d4 asciz "In boot_readwrite no sector given no count given",13,10 3987 <1> 3988 00006848 8326[0890]00 <1> and word [load_readwrite_sector], 0 3989 0000684D 8326[0A90]00 <1> and word [load_readwrite_sector + 2], 0 3990 00006852 BA0100 <1> mov dx, 1 3991 00006855 EB36 <1> jmp @FF 3992 <1> 3993 <1> @@: 3994 00006857 BA[8663] <1> mov dx, msg.hidden 3995 0000685A 4E <1> dec si 3996 0000685B E87D50 <1> call isstring? 3997 0000685E 7510 <1> jne .nothidden 3998 <1> 3999 00006860 E81651 <1> call skipequals 4000 00006863 E8CD4A <1> call getdword 4001 <1> 4002 00006866 89561C <1> mov word [bp + bsBPB + bpbHiddenSectors + 0], dx 4003 00006869 895E1E <1> mov word [bp + bsBPB + bpbHiddenSectors + 2], bx 4004 0000686C E82151 <1> call skipwh0 4005 <1> 4006 0000686F A8 <1> db __TEST_IMM8 4007 <1> .nothidden: 4008 00006870 AC <1> lodsb 4009 00006871 E8BF4A <1> call getexpression ; bx:dx = value 4010 <1> 4011 00006874 8916[0890] <1> mov word [load_readwrite_sector], dx 4012 00006878 891E[0A90] <1> mov word [load_readwrite_sector + 2], bx 4013 <1> 4014 0000687C E81151 <1> call skipwh0 4015 0000687F BA0100 <1> mov dx, 1 4016 00006882 E8B550 <1> call iseol? 4017 00006885 7406 <1> je @F 4018 00006887 E88F4F <1> call getword 4019 0000688A E8C250 <1> call chkeol 4020 <1> @@: 4021 0000688D 8916[0E90] <1> mov word [load_readwrite_count], dx 4022 <1> 4023 00006891 E8E90E <1> call query_geometry 4024 <1> 4025 00006894 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 4026 00006899 753C <1> jnz .ldp 4027 <1> 4028 0000689B 803E[E28F]00 <1> cmp byte [load_partition], 0 4029 000068A0 7447 <1> je .whole_unit 4030 <1> 4031 000068A2 C606[E48F]00 <1> mov byte [load_found_partition], 0 4032 000068A7 B9[B968] <1> mov cx, .single_partition 4033 000068AA E8280D <1> call scan_partitions 4034 <1> ; cmp byte [load_found_partition], 0 4035 <1> ; jne @F 4036 000068AD BA[7661] <1> mov dx, msg.boot_partition_not_found 4037 000068B0 B81502 <1> mov ax, 0215h 4038 000068B3 E8A33C <1> call setrc 4039 000068B6 E976FB <1> jmp bootcmd.fail 4040 <1> ;@@: 4041 <1> ; retn 4042 <1> 4043 <1> 4044 <1> .single_partition: 4045 <1> ; INP: es:si -> partition table entry, 4046 <1> ; si = load_partition_table .. load_partition_table+48, 4047 <1> ; es = ss 4048 <1> ; bp + di -> above part table metadata, 4049 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4050 <1> ; dwo [bp + di - 8] = base (current table position) 4051 <1> ;; CHG: ax, bx, (cx), dx 4052 <1> ; CHG: all 4053 <1> 4054 <1> d4 call d4message 4055 <1> d4 asciz "In boot_readwrite.single_partition",13,10 4056 <1> 4057 000068B9 A0[E38F] <1> mov al, byte [load_current_partition] 4058 000068BC 3A06[E28F] <1> cmp al, byte [load_partition] 4059 000068C0 7401 <1> je .gotit 4060 000068C2 C3 <1> retn 4061 <1> 4062 <1> .gotit: 4063 <1> d4 call d4message 4064 <1> d4 asciz "In boot_readwrite.gotit",13,10 4065 <1> 4066 <1> ; inc byte [load_found_partition] 4067 <1> 4068 000068C3 8B43F8 <1> mov ax, [bp + di - 8] 4069 000068C6 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4070 <1> 4071 000068C9 26034408 <1> add ax, [es:si + 8] 4072 000068CD 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4073 <1> 4074 000068D1 89EC <1> mov sp, bp 4075 000068D3 5D <1> pop bp ; restore bp (scan_partitions) 4076 000068D4 5B <1> pop bx ; discard ret address (scan_partitions) 4077 000068D5 EB07 <1> jmp .gotbase_dxax 4078 <1> 4079 <1> 4080 <1> .ldp: 4081 000068D7 A1[D88F] <1> mov ax, word [load_partition_sector] 4082 000068DA 8B16[DA8F] <1> mov dx, word [load_partition_sector + 2] 4083 <1> 4084 <1> .gotbase_dxax: 4085 000068DE 89461C <1> mov word [bp + bsBPB + bpbHiddenSectors + 0], ax 4086 000068E1 89561E <1> mov word [bp + bsBPB + bpbHiddenSectors + 2], dx 4087 000068E4 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 4088 <1> 4089 <1> .whole_unit: 4090 000068E9 A1[0890] <1> mov ax, word [load_readwrite_sector] 4091 000068EC 8B16[0A90] <1> mov dx, word [load_readwrite_sector + 2] 4092 000068F0 8B0E[0E90] <1> mov cx, word [load_readwrite_count] 4093 000068F4 8B1E[0C90] <1> mov bx, word [load_readwrite_buffer] 4094 <1> 4095 000068F8 E306 <1> jcxz @FF 4096 <1> @@: 4097 000068FA FF16[1090] <1> call near word [load_readwrite_function] 4098 000068FE E2FA <1> loop @B 4099 <1> @@: 4100 00006900 C3 <1> retn 4101 <1> 4102 <1> .error: 4103 00006901 E90E3C <1> jmp error 4104 <1> 4105 <1> 4106 <1> ; INP: ds:si-> first letter of name 4107 <1> ; es:load_kernel_name-> 12-byte buffer (for fn + 0) 4108 <1> ; CHG: ax, cx, di 4109 <1> ; OUT: al = first character after name (EOL, blank, or slash) 4110 <1> ; si -> next character 4111 <1> boot_parse_fn: 4112 00006904 B020 <1> mov al, 32 4113 00006906 BF[E88F] <1> mov di, load_kernel_name 4114 00006909 B90B00 <1> mov cx, 11 4115 0000690C F3AA <1> rep stosb ; initialise to empty 4116 <1> 4117 0000690E BF[E88F] <1> mov di, load_kernel_name 4118 00006911 B90900 <1> mov cx, 9 4119 <1> .loop_name: 4120 00006914 AC <1> lodsb 4121 00006915 E82B23 <1> call uppercase 4122 00006918 E81F50 <1> call iseol? 4123 0000691B 7455 <1> je .loop_name_done 4124 0000691D 3C20 <1> cmp al, 32 4125 0000691F 7451 <1> je .loop_name_done 4126 00006921 3C09 <1> cmp al, 9 4127 00006923 744D <1> je .loop_name_done 4128 00006925 3C2F <1> cmp al, '/' 4129 00006927 7449 <1> je .loop_name_done 4130 00006929 3C5C <1> cmp al, '\' 4131 0000692B 7445 <1> je .loop_name_done 4132 0000692D 3C2E <1> cmp al, '.' 4133 0000692F 740F <1> je .loop_name_ext 4134 00006931 AA <1> stosb 4135 00006932 E2E0 <1> loop .loop_name 4136 <1> .invalid: 4137 00006934 BA[C162] <1> mov dx, msg.boot_invalid_filename 4138 00006937 B81602 <1> mov ax, 0216h 4139 0000693A E81C3C <1> call setrc 4140 0000693D E9EFFA <1> jmp bootcmd.fail 4141 <1> 4142 <1> .loop_name_ext: 4143 00006940 83F909 <1> cmp cx, 9 4144 00006943 74EF <1> je .invalid 4145 00006945 B90400 <1> mov cx, 4 4146 00006948 BF[F08F] <1> mov di, load_kernel_name + 8 4147 <1> .loop_ext: 4148 0000694B AC <1> lodsb 4149 0000694C E8F422 <1> call uppercase 4150 0000694F E8E84F <1> call iseol? 4151 00006952 7419 <1> je .loop_ext_done 4152 00006954 3C20 <1> cmp al, 32 4153 00006956 7415 <1> je .loop_ext_done 4154 00006958 3C09 <1> cmp al, 9 4155 0000695A 7411 <1> je .loop_ext_done 4156 0000695C 3C2F <1> cmp al, '/' 4157 0000695E 740D <1> je .loop_ext_done 4158 00006960 3C5C <1> cmp al, '\' 4159 00006962 7409 <1> je .loop_ext_done 4160 00006964 3C2E <1> cmp al, '.' 4161 00006966 74CC <1> je .invalid 4162 00006968 AA <1> stosb 4163 00006969 E2E0 <1> loop .loop_ext 4164 0000696B EBC7 <1> jmp .invalid 4165 <1> 4166 <1> .loop_ext_done: 4167 0000696D 83F904 <1> cmp cx, 4 4168 00006970 74C2 <1> je .invalid 4169 <1> .loop_name_done: 4170 00006972 83F909 <1> cmp cx, 9 4171 00006975 74BD <1> je .invalid 4172 00006977 C606[F38F]00 <1> mov byte [load_kernel_name + 11], 0 4173 0000697C 803E[E88F]E5 <1> cmp byte [load_kernel_name], 0E5h 4174 00006981 7505 <1> jne @F 4175 00006983 C606[E88F]05 <1> mov byte [load_kernel_name], 05h 4176 <1> @@: 4177 00006988 C3 <1> retn 4178 <1> 4179 <1> 4180 <1> ; INP: es:si -> partition table entry, 4181 <1> ; si = load_partition_table .. load_partition_table+48, 4182 <1> ; es = ss 4183 <1> ; bp + di -> above part table metadata, 4184 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4185 <1> ; dwo [bp + di - 8] = base (current table position) 4186 <1> ; CHG: ax, bx, (cx), dx 4187 <1> load_from_partition: 4188 <1> d4 call d4message 4189 <1> d4 asciz "In load_from_partition",13,10 4190 <1> 4191 00006989 A0[E38F] <1> mov al, byte [load_current_partition] 4192 0000698C 3A06[E28F] <1> cmp al, byte [load_partition] 4193 00006990 7401 <1> je .gotit 4194 00006992 C3 <1> retn 4195 <1> 4196 <1> .gotit: 4197 <1> d4 call d4message 4198 <1> d4 asciz "In load_from_partition.gotit",13,10 4199 <1> 4200 00006993 8B43F8 <1> mov ax, [bp + di - 8] 4201 00006996 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4202 <1> 4203 00006999 52 <1> push dx 4204 0000699A 50 <1> push ax 4205 0000699B 06 <1> push es 4206 0000699C BB6000 <1> mov bx, 60h 4207 0000699F E8910F <1> call read_ae_512_bytes ; load partition table to 0:600h 4208 000069A2 07 <1> pop es 4209 000069A3 58 <1> pop ax 4210 000069A4 5A <1> pop dx 4211 <1> 4212 000069A5 26034408 <1> add ax, [es:si + 8] 4213 000069A9 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4214 <1> 4215 000069AD 26894408 <1> mov word [es:si + 8], ax 4216 000069B1 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4217 <1> 4218 000069B5 31C9 <1> xor cx, cx 4219 000069B7 8EC1 <1> mov es, cx ; es = 0 4220 000069B9 8DB40E7B <1> lea si, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 4221 <1> ; si = 600h + 510-64 .. 600h + 510-16 4222 000069BD 26894408 <1> mov word [es:si + 8], ax 4223 000069C1 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4224 <1> 4225 <1> ; dx:ax = absolute sector number 4226 000069C5 BBC007 <1> mov bx, 7C0h ; bx:0 = 7C0h:0 -> boot sector area 4227 000069C8 E8680F <1> call read_ae_512_bytes ; load partition boot sector to 0:7C00h 4228 <1> 4229 000069CB 89EC <1> mov sp, bp 4230 000069CD 5D <1> pop bp ; restore bp (scan_partitions) 4231 000069CE 58 <1> pop ax ; discard ret address (scan_partitions) 4232 <1> 4233 000069CF 26813EFE0155AA <1> cmp word [es:510], 0AA55h 4234 000069D6 7403E94612 <1> jne boot_sigmismatch 4235 <1> 4236 000069DB 31C9 <1> xor cx, cx 4237 000069DD 26390E0000 <1> cmp word [es:0], cx 4238 000069E2 7503E94612 <1> je boot_codemismatch 4239 <1> 4240 000069E7 8EC1 <1> mov es, cx ; cx = 0, es = 0 4241 000069E9 89F7 <1> mov di, si ; di -> partition table entry (seg 0) 4242 000069EB 26800D80 <1> or byte [es:di + 0], 80h ; set bootable flag 4243 000069EF A0[F08C] <1> mov al, byte [load_unit] ; al = unit 4244 000069F2 BB007C <1> mov bx, 7C00h ; bx = 7C00h 4245 000069F5 E9E1F9 <1> jmp load_partition_common 4246 <1> 4247 <1> 4248 <1> ; INP: es:si -> partition table entry, 4249 <1> ; si = load_partition_table .. load_partition_table+48, 4250 <1> ; es = ss 4251 <1> ; bp + di -> above part table metadata, 4252 <1> ; dwo [bp + di - 4] = root (outermost extended position) 4253 <1> ; dwo [bp + di - 8] = base (current table position) 4254 <1> ; CHG: ax, bx, (cx), dx 4255 <1> load_freedos_from_partition: 4256 <1> d4 call d4message 4257 <1> d4 asciz "In load_freedos_from_partition",13,10 4258 <1> 4259 000069F8 A0[E38F] <1> mov al, byte [load_current_partition] 4260 000069FB 3A06[E28F] <1> cmp al, byte [load_partition] 4261 000069FF 7401 <1> je .gotit 4262 00006A01 C3 <1> retn 4263 <1> 4264 <1> .gotit: 4265 <1> d4 call d4message 4266 <1> d4 asciz "In load_freedos_from_partition.gotit",13,10 4267 <1> 4268 00006A02 8B43F8 <1> mov ax, [bp + di - 8] 4269 00006A05 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4270 <1> 4271 00006A08 26034408 <1> add ax, [es:si + 8] 4272 00006A0C 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 4273 <1> 4274 00006A10 26894408 <1> mov word [es:si + 8], ax 4275 00006A14 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 4276 00006A18 26800C80 <1> or byte [es:si + 0], 80h ; set bootable flag 4277 <1> 4278 <1> 4279 00006A1C F606[198D]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 4280 00006A21 7427 <1> jz @F 4281 <1> 4282 00006A23 52 <1> push dx 4283 00006A24 50 <1> push ax 4284 <1> 4285 00006A25 8B43F8 <1> mov ax, [bp + di - 8] 4286 00006A28 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 4287 <1> 4288 00006A2B 52 <1> push dx 4289 00006A2C 50 <1> push ax 4290 00006A2D 06 <1> push es 4291 00006A2E BB6000 <1> mov bx, 60h 4292 00006A31 E8FF0E <1> call read_ae_512_bytes ; load partition table to 0:600h 4293 00006A34 07 <1> pop es 4294 00006A35 58 <1> pop ax 4295 00006A36 5A <1> pop dx 4296 <1> 4297 00006A37 31C9 <1> xor cx, cx 4298 00006A39 8EC1 <1> mov es, cx ; es = 0 4299 00006A3B 8DBC0E7B <1> lea di, [si - (load_partition_table + DATASECTIONFIXUP) + 600h + (510 - 64)] 4300 <1> ; si = 600h + 510-64 .. 600h + 510-16 4301 00006A3F B108 <1> mov cl, 16 / 2 4302 00006A41 57 <1> push di 4303 00006A42 F3A5 <1> rep movsw 4304 <1> 4305 00006A44 8F06[E08F] <1> pop word [load_partition_entry] 4306 <1> 4307 00006A48 58 <1> pop ax 4308 00006A49 5A <1> pop dx 4309 <1> @@: 4310 <1> 4311 <1> 4312 00006A4A 89EC <1> mov sp, bp 4313 00006A4C 5D <1> pop bp ; restore bp (scan_partitions) 4314 00006A4D 5B <1> pop bx ; discard ret address (scan_partitions) 4315 <1> 4316 <1> ; dx:ax = absolute sector number 4317 00006A4E 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 4318 00006A52 50 <1> push ax 4319 00006A53 52 <1> push dx 4320 00006A54 E8DC0E <1> call read_ae_512_bytes ; load partition boot sector 4321 <1> 4322 00006A57 26813EFE0155AA <1> cmp word [es:510], 0AA55h 4323 00006A5E 7403E9BE11 <1> jne boot_sigmismatch 4324 <1> 4325 00006A63 31C9 <1> xor cx, cx 4326 <1> ; cmp word [es:0], cx 4327 <1> ; je boot_codemismatch 4328 <1> 4329 00006A65 5A <1> pop dx 4330 00006A66 58 <1> pop ax 4331 <1> 4332 <1> ; dx:ax = boot sector 4333 <1> ; byte [load_unit] = unit 4334 <1> ; es:0-> read sector 4335 <1> load_freedos_common: 4336 00006A67 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 4337 00006A6B 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 4338 <1> 4339 00006A70 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 4340 00006A73 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 4341 00006A78 7403E9B811 <1> jne boot_secsizemismatch 4342 <1> 4343 <1> ; preserve some variables from our pseudo BPB 4344 00006A7D 31C0 <1> xor ax, ax 4345 00006A7F FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 4346 00006A82 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 4347 00006A87 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 4348 00006A8A 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 4349 <1> 4350 00006A8F 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 4351 00006A92 D1EB <1> shr bx, 1 4352 00006A94 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 4353 <1> 4354 00006A97 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 4355 00006A9C 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 4356 00006A9F 7407 <1> je .is_fat32 4357 00006AA1 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 4358 00006AA6 EB05 <1> jmp short .was_fat1612 4359 <1> .is_fat32: 4360 00006AA8 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 4361 <1> .was_fat1612: 4362 <1> 4363 00006AAD 06 <1> push es 4364 00006AAE 1E <1> push ds 4365 00006AAF 06 <1> push es 4366 00006AB0 1F <1> pop ds 4367 00006AB1 31F6 <1> xor si, si ; -> BPB from boot partition 4368 00006AB3 16 <1> push ss 4369 00006AB4 07 <1> pop es 4370 00006AB5 BF[B08C] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 4371 00006AB8 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 4372 00006ABB F3A4 <1> rep movsb ; get the BPB 4373 <1> 4374 00006ABD 1F <1> pop ds 4375 00006ABE 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 4376 <1> 4377 00006AC3 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 4378 00006AC6 740B <1> je @F ; is FAT32 --> 4379 00006AC8 BE[D48C] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 4380 00006ACB BF[F08C] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 4381 00006ACE B91A00 <1> mov cx, BPBN_size 4382 00006AD1 F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 4383 <1> ; to where the FAT32 BPBN lives 4384 <1> @@: 4385 00006AD3 07 <1> pop es 4386 <1> 4387 00006AD4 E82869 <1> call bootgetmemorysize 4388 00006AD7 8956E0 <1> mov word [bp + ldMemoryTop], dx 4389 00006ADA 81EA0005 <1> sub dx, (20 * 1024) >> 4 4390 <1> ; leave 20 KiB free at the top, to 4391 <1> ; allow loading with the lDOS protocol (needs BPB and FAT seg 4392 <1> ; to live below its destination buffers for these) 4393 00006ADE 7303 <1> jnc @F 4394 <1> .outofmem: 4395 00006AE0 E9FE0D <1> jmp query_geometry.out_of_memory_error 4396 <1> @@: 4397 <1> 4398 00006AE3 81EA0002 <1> sub dx, 8192 >> 4 4399 00006AE7 72F7 <1> jc .outofmem 4400 00006AE9 8956F8 <1> mov word [bp + lsvFATSeg], dx 4401 00006AEC B8FFFF <1> mov ax, -1 4402 00006AEF 8946F4 <1> mov word [bp + lsvFATSector], ax 4403 00006AF2 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 4404 <1> 4405 00006AF5 FF36[1A8D] <1> push word [load_loadseg] 4406 00006AF9 8F46FA <1> pop word [bp + lsvLoadSeg] 4407 <1> 4408 00006AFC 31DB <1> xor bx, bx 4409 00006AFE B90808 <1> mov cx, ((- LOADSTACKVARS + 15 + 4096) & ~15) >> 1 4410 00006B01 F606[198D]20 <1> testopt [load_options], LOAD_NO_BPB 4411 00006B06 7506 <1> jnz @F 4412 00006B08 BB0002 <1> mov bx, 512 4413 00006B0B B90809 <1> mov cx, ((512 - LOADSTACKVARS + 15 + 4096) & ~15) >> 1 4414 <1> @@: 4415 <1> 4416 00006B0E 833E[228D]FF <1> cmp word [load_bpb + 2], -1 4417 00006B13 7469 <1> je .auto_bpb 4418 <1> 4419 00006B15 A1[208D] <1> mov ax, [load_bpb] 4420 00006B18 D1E8 <1> shr ax, 1 4421 00006B1A D1E8 <1> shr ax, 1 4422 00006B1C D1E8 <1> shr ax, 1 4423 00006B1E D1E8 <1> shr ax, 1 ; round down: start of BPB 4424 00006B20 0306[228D] <1> add ax, [load_bpb + 2] ; start of BPB 4425 00006B24 2D0101 <1> sub ax, (4096 - LOADSTACKVARS + 15) >> 4 4426 <1> ; start of stack area 4427 00006B27 50 <1> push ax 4428 00006B28 7235 <1> jc .bpb_too_low 4429 <1> 4430 00006B2A 3B46FA <1> cmp ax, word [bp + lsvLoadSeg] 4431 00006B2D 773B <1> ja .loads_below_bpb 4432 <1> 4433 00006B2F 83F860 <1> cmp ax, 60h 4434 00006B32 722B <1> jb .bpb_too_low 4435 <1> 4436 00006B34 A1[208D] <1> mov ax, [load_bpb] 4437 00006B37 01D8 <1> add ax, bx 4438 00006B39 83C00F <1> add ax, 15 4439 00006B3C D1E8 <1> shr ax, 1 4440 00006B3E D1E8 <1> shr ax, 1 4441 00006B40 D1E8 <1> shr ax, 1 4442 00006B42 D1E8 <1> shr ax, 1 4443 00006B44 0306[228D] <1> add ax, [load_bpb + 2] ; end of BPB / pseudo-boot-sector 4444 <1> 4445 00006B48 3B46FA <1> cmp ax, word [bp + lsvLoadSeg] 4446 00006B4B 761F <1> jbe .loads_above_bpb 4447 <1> 4448 00006B4D BA[0563] <1> mov dx, msg.boot_bpb_load_overlap 4449 00006B50 B81702 <1> mov ax, 0217h 4450 00006B53 E8033A <1> call setrc 4451 <1> .fail: 4452 00006B56 B81802 <1> mov ax, 0218h 4453 00006B59 E8FD39 <1> call setrc 4454 00006B5C E9D0F8 <1> jmp bootcmd.fail 4455 <1> 4456 <1> .bpb_too_low: 4457 00006B5F BA[3563] <1> mov dx, msg.boot_bpb_too_low 4458 00006B62 B81902 <1> mov ax, 0219h 4459 00006B65 E8F139 <1> call setrc 4460 00006B68 EBEC <1> jmp .fail 4461 <1> 4462 <1> 4463 <1> 4464 <1> .loads_below_bpb: 4465 00006B6A 89C2 <1> mov dx, ax ; set load top to before BPB/lsv/stack 4466 <1> 4467 <1> .loads_above_bpb: ; dx = word [bp + ldLoadTop] = word [bp + lsvFATSeg] 4468 00006B6C FF36[228D] <1> push word [load_bpb + 2] 4469 00006B70 8F06[D68F] <1> pop word [load_bpb_dest + 2] 4470 00006B74 FF36[208D] <1> push word [load_bpb] 4471 00006B78 8F06[D48F] <1> pop word [load_bpb_dest] 4472 00006B7C EB37 <1> jmp .got_bpb_set_load_top 4473 <1> 4474 <1> 4475 <1> ; auto-BPB: allocate BPB at top and load below that 4476 <1> .auto_bpb: 4477 00006B7E 81EA0101 <1> sub dx, (-LOADSTACKVARS + 15 + 4096) >> 4 4478 00006B82 7303E959FF <1> jc .outofmem 4479 00006B87 85DB <1> test bx, bx 4480 00006B89 7408 <1> jz @F 4481 00006B8B 83EA20 <1> sub dx, 512 >> 4 4482 00006B8E 7303E94DFF <1> jc .outofmem 4483 <1> @@: 4484 <1> 4485 00006B93 52 <1> push dx 4486 00006B94 89D0 <1> mov ax, dx 4487 <1> ; eg dx = 800h 4488 <1> ; want (((800h<<4) + 4096 - LOADSTACKVARS) - 7C00h) >> 4 4489 <1> ; which is 143h 4490 <1> ; which :7C00h = 903h:0 4491 <1> ; dx + ( 4096 - LOADSTACKVARS - 7C00h) / 16 4492 <1> ; dx - (-4096 + LOADSTACKVARS + 7C00h) / 16 4493 00006B96 BBF0EF <1> mov bx, (-4096 +LOADSTACKVARS) 4494 00006B99 031E[208D] <1> add bx, word [load_bpb] 4495 00006B9D 51 <1> push cx 4496 00006B9E B104 <1> mov cl, 4 4497 00006BA0 D3EB <1> shr bx, cl 4498 00006BA2 59 <1> pop cx 4499 00006BA3 29D8 <1> sub ax, bx 4500 <1> ; sub ax, (-4096 +LOADSTACKVARS + 7C00h) / 16 4501 00006BA5 7303E936FF <1> jc .outofmem 4502 <1> ; mov word [load_bpb_dest], 7C00h 4503 00006BAA FF36[208D] <1> push word [load_bpb] 4504 00006BAE 8F06[D48F] <1> pop word [load_bpb_dest] 4505 00006BB2 A3[D68F] <1> mov word [load_bpb_dest + 2], ax 4506 <1> .got_bpb_set_load_top: 4507 00006BB5 8956E2 <1> mov word [bp + ldLoadTop], dx 4508 <1> 4509 <1> .got_bpb: ; cx = how many words are used for stack/lsv/BPB 4510 00006BB8 58 <1> pop ax ; -> stack area 4511 00006BB9 06 <1> push es 4512 00006BBA 8EC0 <1> mov es, ax 4513 00006BBC 31FF <1> xor di, di 4514 00006BBE 31C0 <1> xor ax, ax 4515 00006BC0 F3AB <1> rep stosw 4516 00006BC2 07 <1> pop es 4517 <1> 4518 00006BC3 E8C916 <1> call initialise_fs 4519 <1> 4520 00006BC6 C606[E58F]00 <1> mov byte [load_check_dir_attr], 0 4521 00006BCB 8B36[F48F] <1> mov si, word [load_kernelname_input] 4522 00006BCF 803C2F <1> cmp byte [si], '/' 4523 00006BD2 7501 <1> jne @F 4524 00006BD4 46 <1> inc si 4525 <1> @@: 4526 00006BD5 803C00 <1> cmp byte [si], 0 4527 00006BD8 7504 <1> jne @F 4528 00006BDA 8B36[108D] <1> mov si, word [load_kernelname_default] 4529 <1> @@: 4530 00006BDE 16 <1> push ss 4531 00006BDF 07 <1> pop es 4532 00006BE0 E821FD <1> call boot_parse_fn ; get next pathname 4533 00006BE3 3C2F <1> cmp al, '/' 4534 00006BE5 7509 <1> jne @F 4535 00006BE7 C606[E58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4536 00006BEC 8936[F68F] <1> mov word [load_kernelname_next], si 4537 <1> @@: 4538 <1> 4539 00006BF0 BFFFFF <1> mov di, -1 4540 00006BF3 89FE <1> mov si, di 4541 00006BF5 897EF4 <1> mov [bp + lsvFATSector], di 4542 00006BF8 8976F6 <1> mov [bp + lsvFATSector + 2], si 4543 <1> 4544 00006BFB 31C0 <1> xor ax, ax 4545 00006BFD 31D2 <1> xor dx, dx 4546 <1> 4547 <1> scan_dir_kernelname_loop: 4548 00006BFF 8946EC <1> mov word [bp + ldDirCluster], ax 4549 00006C02 8956EE <1> mov word [bp + ldDirCluster + 2], dx 4550 <1> 4551 00006C05 31DB <1> xor bx, bx 4552 00006C07 8EC3 <1> mov es, bx 4553 00006C09 BB0005 <1> mov bx, 500h 4554 00006C0C E8C607 <1> call scan_dir_aux_for_file 4555 <1> 4556 00006C0F 803E[E58F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 4557 00006C14 753C <1> jne got_kernelentry 4558 <1> 4559 00006C16 56 <1> push si 4560 00006C17 57 <1> push di 4561 00006C18 C606[E58F]00 <1> mov byte [load_check_dir_attr], 0 4562 00006C1D 8B36[F68F] <1> mov si, word [load_kernelname_next] 4563 00006C21 803C00 <1> cmp byte [si], 0 4564 00006C24 7504 <1> jne @F 4565 00006C26 8B36[108D] <1> mov si, word [load_kernelname_default] 4566 <1> @@: 4567 00006C2A 06 <1> push es 4568 00006C2B 16 <1> push ss 4569 00006C2C 07 <1> pop es 4570 00006C2D E8D4FC <1> call boot_parse_fn ; get next pathname 4571 00006C30 07 <1> pop es 4572 00006C31 3C2F <1> cmp al, '/' 4573 00006C33 7509 <1> jne @F 4574 00006C35 C606[E58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4575 00006C3A 8936[F68F] <1> mov word [load_kernelname_next], si 4576 <1> @@: 4577 00006C3E 5F <1> pop di 4578 00006C3F 5E <1> pop si 4579 <1> 4580 00006C40 31D2 <1> xor dx, dx 4581 00006C42 268B471A <1> mov ax, [es:bx + deClusterLow] 4582 <1> ; = first cluster (not FAT32) 4583 00006C46 807EE620 <1> cmp byte [bp + ldFATType], 32 4584 00006C4A 7504 <1> jne @F 4585 00006C4C 268B5714 <1> mov dx, [es:bx + deClusterHigh] 4586 <1> ; dx:ax = first cluster (FAT32) 4587 <1> @@: 4588 <1> 4589 00006C50 EBAD <1> jmp scan_dir_kernelname_loop 4590 <1> 4591 <1> 4592 <1> got_kernelentry: 4593 00006C52 56 <1> push si 4594 00006C53 57 <1> push di 4595 <1> 4596 00006C54 C606[E58F]00 <1> mov byte [load_check_dir_attr], 0 4597 00006C59 8B36[F88F] <1> mov si, word [load_addname_input] 4598 00006C5D 803C2F <1> cmp byte [si], '/' 4599 00006C60 7511 <1> jne @F 4600 00006C62 46 <1> inc si 4601 00006C63 803C2F <1> cmp byte [si], '/' 4602 00006C66 7503E9A400 <1> je got_no_addentry.no_dxax_on_stack 4603 <1> 4604 00006C6B 31C0 <1> xor ax, ax 4605 00006C6D 8946EC <1> mov word [bp + ldDirCluster], ax 4606 00006C70 8946EE <1> mov word [bp + ldDirCluster + 2], ax 4607 <1> ; search from root directory 4608 <1> @@: 4609 00006C73 803C00 <1> cmp byte [si], 0 4610 00006C76 750C <1> jne @F 4611 00006C78 8B36[128D] <1> mov si, word [load_addname_default] 4612 00006C7C 803C00 <1> cmp byte [si], 0 4613 00006C7F 7503E98B00 <1> je got_no_addentry.no_dxax_on_stack 4614 <1> @@: 4615 00006C84 16 <1> push ss 4616 00006C85 07 <1> pop es 4617 00006C86 E87BFC <1> call boot_parse_fn ; get next pathname 4618 00006C89 3C2F <1> cmp al, '/' 4619 00006C8B 7509 <1> jne @F 4620 00006C8D C606[E58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4621 00006C92 8936[F68F] <1> mov word [load_kernelname_next], si 4622 <1> @@: 4623 00006C96 5F <1> pop di 4624 00006C97 5E <1> pop si 4625 00006C98 EB06 <1> jmp @F 4626 <1> 4627 <1> scan_dir_addname_loop: 4628 00006C9A 8946EC <1> mov word [bp + ldDirCluster], ax 4629 00006C9D 8956EE <1> mov word [bp + ldDirCluster + 2], dx 4630 <1> 4631 <1> @@: 4632 00006CA0 31DB <1> xor bx, bx 4633 00006CA2 8EC3 <1> mov es, bx 4634 00006CA4 BB2005 <1> mov bx, 520h ; 0:bx -> space for second directory entry 4635 00006CA7 E82B07 <1> call scan_dir_aux_for_file 4636 <1> 4637 00006CAA 803E[E58F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 4638 00006CAF 756C <1> jne got_addentry 4639 <1> 4640 00006CB1 56 <1> push si 4641 00006CB2 57 <1> push di 4642 00006CB3 52 <1> push dx 4643 00006CB4 50 <1> push ax 4644 00006CB5 C606[E58F]00 <1> mov byte [load_check_dir_attr], 0 4645 00006CBA 8B36[FA8F] <1> mov si, word [load_addname_next] 4646 00006CBE 803C00 <1> cmp byte [si], 0 4647 00006CC1 7509 <1> jne @F 4648 00006CC3 8B36[128D] <1> mov si, word [load_addname_default] 4649 00006CC7 803C00 <1> cmp byte [si], 0 4650 00006CCA 7441 <1> je got_no_addentry 4651 <1> @@: 4652 00006CCC 06 <1> push es 4653 00006CCD 16 <1> push ss 4654 00006CCE 07 <1> pop es 4655 00006CCF E832FC <1> call boot_parse_fn ; get next pathname 4656 00006CD2 07 <1> pop es 4657 00006CD3 3C2F <1> cmp al, '/' 4658 00006CD5 7509 <1> jne @F 4659 00006CD7 C606[E58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 4660 00006CDC 8936[FA8F] <1> mov word [load_addname_next], si 4661 <1> @@: 4662 00006CE0 58 <1> pop ax 4663 00006CE1 5A <1> pop dx 4664 00006CE2 5F <1> pop di 4665 00006CE3 5E <1> pop si 4666 <1> 4667 00006CE4 31D2 <1> xor dx, dx 4668 00006CE6 268B471A <1> mov ax, [es:bx + deClusterLow] 4669 <1> ; = first cluster (not FAT32) 4670 00006CEA 807EE620 <1> cmp byte [bp + ldFATType], 32 4671 00006CEE 7504 <1> jne @F 4672 00006CF0 268B5714 <1> mov dx, [es:bx + deClusterHigh] 4673 <1> ; dx:ax = first cluster (FAT32) 4674 <1> @@: 4675 <1> 4676 00006CF4 EBA4 <1> jmp scan_dir_addname_loop 4677 <1> 4678 <1> 4679 <1> helper_shift_down_and_clamp: 4680 00006CF6 B90400 <1> mov cx, 4 4681 <1> @@: 4682 00006CF9 D0EA <1> shr dl, 1 4683 00006CFB D1D8 <1> rcr ax, 1 4684 00006CFD D1DB <1> rcr bx, 1 4685 00006CFF E2F8 <1> loop @B 4686 <1> 4687 00006D01 08D0 <1> or al, dl 4688 00006D03 89DA <1> mov dx, bx ; size in paragraphs 4689 00006D05 85C0 <1> test ax, ax ; > 0FFFFh ? 4690 00006D07 7403 <1> jz @F ; no, take actual size --> 4691 00006D09 BAFFFF <1> mov dx, 0FFFFh ; clamp to 0FFFFh 4692 <1> @@: 4693 00006D0C C3 <1> retn 4694 <1> 4695 <1> got_no_addentry: 4696 00006D0D 58 <1> pop ax 4697 00006D0E 5A <1> pop dx 4698 <1> .no_dxax_on_stack: 4699 <1> ; push ax 4700 00006D0F B91000 <1> mov cx, 16 4701 00006D12 31C0 <1> xor ax, ax 4702 00006D14 8EC0 <1> mov es, ax 4703 00006D16 BF2005 <1> mov di, 520h ; es:di -> space for second directory entry 4704 00006D19 F3AB <1> rep stosw ; store zeros 4705 <1> ; pop ax 4706 <1> 4707 00006D1B 5F <1> pop di 4708 00006D1C 5E <1> pop si 4709 <1> 4710 <1> got_addentry: 4711 00006D1D 31C0 <1> xor ax, ax 4712 00006D1F 8EC0 <1> mov es, ax 4713 <1> 4714 <1> 4715 <1> ; (boot32.asm code starts here) 4716 <1> 4717 00006D21 8B46E2 <1> mov ax, word [bp + ldLoadTop] 4718 00006D24 2B46EA <1> sub ax, word [bp + ldParaPerSector] 4719 00006D27 7303E9B4FD <1> jc load_freedos_common.outofmem 4720 00006D2C 8946D6 <1> mov [bp + ldLastAvailableSector], ax 4721 <1> 4722 00006D2F 268B1E1C05 <1> mov bx, [es:500h + deSize] 4723 00006D34 26A11E05 <1> mov ax, [es:500h + deSize + 2] ; ax:bx = file size 4724 00006D38 268A160C05 <1> mov dl, [es:500h + 12] ; dl = FAT+ size bits 4725 00006D3D 88D6 <1> mov dh, dl 4726 00006D3F 81E207E0 <1> and dx, 0E007h ; obtain bits 7-5 and 2-0 4727 00006D43 D0EE <1> shr dh, 1 4728 00006D45 D0EE <1> shr dh, 1 4729 00006D47 08F2 <1> or dl, dh ; dl:ax:bx = file size 4730 00006D49 52 <1> push dx 4731 00006D4A 50 <1> push ax 4732 00006D4B 53 <1> push bx 4733 <1> 4734 00006D4C E8A7FF <1> call helper_shift_down_and_clamp 4735 <1> ; round down to next paragraph boundary 4736 00006D4F 3916[148D] <1> cmp word [load_minpara], dx 4737 00006D53 7603E9A400 <1> ja error_filetoosmall 4738 <1> 4739 00006D58 5B <1> pop bx 4740 00006D59 58 <1> pop ax 4741 00006D5A 5A <1> pop dx 4742 00006D5B 8B4E0B <1> mov cx, [bp + bsBPB + bpbBytesPerSector] 4743 00006D5E 49 <1> dec cx ; BpS - 1 4744 00006D5F 01CB <1> add bx, cx 4745 00006D61 83D000 <1> adc ax, 0 4746 00006D64 80D200 <1> adc dl, 0 ; round up to next sector 4747 00006D67 F7D1 <1> not cx ; ~ (BpS - 1) 4748 00006D69 21CB <1> and bx, cx ; mask to limit to rounded-up sector 4749 00006D6B E888FF <1> call helper_shift_down_and_clamp 4750 <1> 4751 <1> ; dl:ax:bx = size in paragraphs 4752 00006D6E A1[168D] <1> mov ax, word [load_maxpara] 4753 00006D71 39C2 <1> cmp dx, ax ; actual size below maximum ? 4754 00006D73 7602 <1> jbe @F ; yes, use actual size --> 4755 00006D75 89C2 <1> mov dx, ax ; use maximum size 4756 <1> @@: 4757 00006D77 8956D8 <1> mov word [bp + ldParasLeft], dx 4758 00006D7A C746DA0000 <1> mov word [bp + ldParasDone], 0 4759 <1> 4760 <1> ; get starting cluster of file 4761 00006D7F 31D2 <1> xor dx, dx 4762 00006D81 26A11A05 <1> mov ax, [es:500h + deClusterLow] 4763 <1> ; = first cluster (not FAT32) 4764 <1> 4765 00006D85 807EE620 <1> cmp byte [bp + ldFATType], 32 4766 00006D89 7505 <1> jne @F 4767 00006D8B 268B161405 <1> mov dx, [es:500h + deClusterHigh] 4768 <1> ; dx:ax = first cluster (FAT32) 4769 <1> @@: 4770 <1> 4771 00006D90 8946F0 <1> mov word [bp + lsvFirstCluster], ax 4772 00006D93 8956F2 <1> mov word [bp + lsvFirstCluster + 2], dx 4773 <1> 4774 00006D96 E80A08 <1> call check_clust 4775 00006D99 7303E92E15 <1> jc error_badchain 4776 <1> 4777 <1> next_load_cluster: 4778 00006D9E E82107 <1> call clust_to_first_sector 4779 <1> ; dx:ax = first sector of cluster 4780 <1> ; cx:bx = cluster value 4781 00006DA1 51 <1> push cx 4782 00006DA2 53 <1> push bx ; preserve cluster number for later 4783 <1> 4784 00006DA3 8B4EE8 <1> mov cx, [bp + ldClusterSize] 4785 <1> 4786 00006DA6 8B5EFA <1> mov bx, [bp + lsvLoadSeg] 4787 <1> ; xxx - this will always load an entire cluster (e.g. 64 sectors), 4788 <1> ; even if the file is shorter than this 4789 <1> @@: 4790 00006DA9 3B5ED6 <1> cmp bx, [bp + ldLastAvailableSector] 4791 00006DAC 7613 <1> jbe @F 4792 00006DAE 833E[168D]00 <1> cmp word [load_maxpara], 0 4793 00006DB3 743D <1> je @FF ; if to allow partial load --> 4794 00006DB5 BA[5362] <1> mov dx, msg.boot_file_too_big_error 4795 00006DB8 B81A02 <1> mov ax, 021Ah 4796 00006DBB E89B37 <1> call setrc 4797 00006DBE E96EF6 <1> jmp bootcmd.fail 4798 <1> 4799 <1> @@: 4800 00006DC1 06 <1> push es ; (must preserve ADR_FATBUF reference) 4801 00006DC2 E8800B <1> call read_sector 4802 00006DC5 07 <1> pop es 4803 00006DC6 895EFA <1> mov [bp + lsvLoadSeg], bx ; => after last read data 4804 <1> 4805 00006DC9 50 <1> push ax 4806 00006DCA 8B46EA <1> mov ax, [bp + ldParaPerSector] 4807 00006DCD 0146DA <1> add word [bp + ldParasDone], ax 4808 00006DD0 833E[168D]00 <1> cmp word [load_maxpara], 0 4809 00006DD5 7407 <1> je .donotuseleft 4810 00006DD7 2946D8 <1> sub word [bp + ldParasLeft], ax 4811 00006DDA 58 <1> pop ax 4812 00006DDB 7615 <1> jbe @F ; read enough --> 4813 00006DDD A8 <1> db __TEST_IMM8 ; (skip pop) 4814 <1> .donotuseleft: 4815 00006DDE 58 <1> pop ax 4816 <1> 4817 00006DDF E2C8 <1> loop @BB 4818 00006DE1 5B <1> pop bx 4819 00006DE2 59 <1> pop cx 4820 <1> 4821 00006DE3 E80507 <1> call clust_next 4822 00006DE6 73B6 <1> jnc next_load_cluster 4823 00006DE8 40 <1> inc ax 4824 00006DE9 40 <1> inc ax 4825 00006DEA A808 <1> test al, 8 ; set in 0FFF_FFF8h--0FFF_FFFFh, 4826 <1> ; clear in 0, 1, and 0FFF_FFF7h 4827 00006DEC 7503E9DB14 <1> jz error_badchain 4828 00006DF1 A9 <1> db __TEST_IMM16 4829 <1> @@: 4830 00006DF2 5B <1> pop bx 4831 00006DF3 59 <1> pop cx 4832 <1> 4833 00006DF4 A1[148D] <1> mov ax, word [load_minpara] 4834 00006DF7 3B46DA <1> cmp ax, word [bp + ldParasDone] 4835 00006DFA 760C <1> jbe @F 4836 <1> error_filetoosmall: 4837 00006DFC BA[6362] <1> mov dx, msg.boot_file_too_small_error 4838 00006DFF B81B02 <1> mov ax, 021Bh 4839 00006E02 E85437 <1> call setrc 4840 00006E05 E927F6 <1> jmp bootcmd.fail 4841 <1> @@: 4842 <1> 4843 <1> 4844 00006E08 8E06[1A8D] <1> mov es, word [load_loadseg] 4845 00006E0C 8B3E[248D] <1> mov di, word [load_check_offset] 4846 00006E10 A1[268D] <1> mov ax, word [load_check_value] 4847 00006E13 85C0 <1> test ax, ax 4848 00006E15 7406 <1> jz @F 4849 00006E17 AF <1> scasw 4850 00006E18 7403E9F301 <1> jne .error_check_mismatch 4851 <1> @@: 4852 <1> 4853 <1> ; turn off floppy motor 4854 00006E1D BAF203 <1> mov dx,3F2h 4855 00006E20 B000 <1> mov al,0 4856 00006E22 EE <1> out dx,al 4857 <1> 4858 <1> ; Set-up registers for and jump to loaded file 4859 <1> 4860 00006E23 8A5640 <1> mov dl, [bp + bsBPB + ebpbNew + bpbnBootUnit] 4861 <1> ; testopt [load_options], LOAD_SET_DL_UNIT 4862 <1> ; jz @F 4863 <1> ; (always set dl) 4864 00006E26 8816[700C] <1> mov byte [reg_edx], dl 4865 <1> @@: 4866 <1> 4867 <1> ; testopt [load_options], LOAD_SET_BL_UNIT 4868 <1> ; jz @F 4869 <1> ; (always set bl -- overwritten later if LOAD_SET_AXBX_DATASTART) 4870 00006E2A 8816[680C] <1> mov byte [reg_ebx], dl 4871 <1> @@: 4872 <1> 4873 00006E2E 8A6E15 <1> mov ch, byte [bp + bsBPB + bpbMediaID] 4874 00006E31 882E[6D0C] <1> mov byte [reg_ecx + 1], ch 4875 <1> 4876 00006E35 F606[188D]40 <1> testopt [load_options], LOAD_DATASTART_HIDDEN 4877 00006E3A 740C <1> jz @F 4878 00006E3C 8B5E1C <1> mov bx, [bp + bsBPB + bpbHiddenSectors] 4879 00006E3F 8B461E <1> mov ax, [bp + bsBPB + bpbHiddenSectors + 2] 4880 00006E42 015EFC <1> add word [bp + lsvDataStart], bx 4881 00006E45 1146FE <1> adc word [bp + lsvDataStart + 2], ax 4882 <1> @@: 4883 <1> 4884 00006E48 F606[188D]80 <1> testopt [load_options], LOAD_SET_AXBX_DATASTART 4885 00006E4D 740D <1> jz @F 4886 00006E4F 8B5EFC <1> mov bx, word [bp + lsvDataStart] 4887 00006E52 8B46FE <1> mov ax, word [bp + lsvDataStart + 2] 4888 00006E55 891E[680C] <1> mov word [reg_ebx], bx 4889 00006E59 A3[640C] <1> mov word [reg_eax], ax 4890 <1> @@: 4891 <1> 4892 00006E5C F606[198D]08 <1> testopt [load_options], LOAD_SET_AXBX_ROOT_HIDDEN 4893 00006E61 7413 <1> jz @F 4894 00006E63 8B5ED0 <1> mov bx, word [bp + ldRootSector] 4895 00006E66 8B46D2 <1> mov ax, word [bp + ldRootSector + 2] 4896 00006E69 035E1C <1> add bx, word [bp + bsBPB + bpbHiddenSectors] 4897 00006E6C 13461E <1> adc ax, word [bp + bsBPB + bpbHiddenSectors + 2] 4898 00006E6F 891E[680C] <1> mov word [reg_ebx], bx 4899 00006E73 A3[640C] <1> mov word [reg_eax], ax 4900 <1> @@: 4901 <1> 4902 00006E76 F606[188D]04 <1> testopt [load_options], LOAD_SET_SIDI_CLUSTER 4903 00006E7B 740D <1> jz @F 4904 00006E7D 8B56F2 <1> mov dx, word [bp + lsvFirstCluster + 2] 4905 00006E80 8B46F0 <1> mov ax, word [bp + lsvFirstCluster] 4906 00006E83 8916[7C0C] <1> mov word [reg_esi], dx 4907 00006E87 A3[800C] <1> mov word [reg_edi], ax 4908 <1> @@: 4909 <1> 4910 <1> ; (boot.asm code ends here) 4911 <1> 4912 <1> 4913 00006E8A C43E[D48F] <1> les di, [load_bpb_dest] 4914 00006E8E 57 <1> push di 4915 00006E8F 83EF10 <1> sub di, -LOADSTACKVARS 4916 00006E92 BE[A08C] <1> mov si, load_data - LOADDATA2 + LOADSTACKVARS 4917 00006E95 B91000 <1> mov cx, -LOADSTACKVARS 4918 00006E98 F606[198D]20 <1> testopt [load_options], LOAD_NO_BPB 4919 00006E9D 7568 <1> jnz .no_bpb_movsb 4920 00006E9F B93400 <1> mov cx, -LOADSTACKVARS + bsBPB + bpbNew 4921 00006EA2 F3A4 <1> rep movsb ; move common BPB part 4922 <1> 4923 00006EA4 394E16 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], cx 4924 00006EA7 B93600 <1> mov cx, ebpbNew - bpbNew + BPBN_size ; move FAT32 EBPB part + BPBN 4925 00006EAA 7406 <1> je @F 4926 00006EAC 83C61C <1> add si, ebpbNew - bpbNew; -> BPBN 4927 00006EAF B91A00 <1> mov cx, BPBN_size ; move only BPBN 4928 <1> @@: 4929 00006EB2 F3A4 <1> rep movsb 4930 <1> 4931 00006EB4 89F8 <1> mov ax, di 4932 00006EB6 5F <1> pop di 4933 00006EB7 29F8 <1> sub ax, di 4934 00006EB9 48 <1> dec ax 4935 00006EBA 48 <1> dec ax 4936 00006EBB 86C4 <1> xchg al, ah 4937 00006EBD B0EB <1> mov al, 0EBh 4938 00006EBF 268905 <1> mov word [es:di], ax 4939 00006EC2 26C6450290 <1> mov byte [es:di + 2], 90h 4940 <1> 4941 00006EC7 F606[198D]02 <1> testopt [load_options], LOAD_LBA_SET_TYPE 4942 00006ECC 7416 <1> jz @F 4943 00006ECE F646E701 <1> test byte [bp + ldFlags], ldfHasLBA 4944 00006ED2 7410 <1> jz @F 4945 <1> 4946 00006ED4 26C645020E <1> mov byte [es:di + 2], 0Eh ; (LBA-enabled) FAT16 FS partition type 4947 00006ED9 807EE620 <1> cmp byte [bp + ldFATType], 32 4948 00006EDD 7205 <1> jb @F 4949 00006EDF 26C645020C <1> mov byte [es:di + 2], 0Ch ; (LBA-enabled) FAT32 FS partition type 4950 <1> @@: 4951 <1> 4952 00006EE4 26C785FE0155AA <1> mov word [es:di + 510], 0AA55h 4953 00006EEB 1E <1> push ds 4954 00006EEC 31C9 <1> xor cx, cx 4955 00006EEE 8ED9 <1> mov ds, cx 4956 00006EF0 BE0005 <1> mov si, 500h 4957 00006EF3 57 <1> push di 4958 00006EF4 81C7D601 <1> add di, 512 - 2 - 2 - 14 - 12 - 12 4959 <1> ; 2: AA55 sig, 2: null word, 14: MS-DOS 7 protocol 4960 <1> ; message table pointer lives here, 4961 <1> ; 12: add name, 12: kernel name 4962 00006EF8 B10B <1> mov cl, 11 4963 00006EFA F3A4 <1> rep movsb ; put kernel filename into the pseudo boot sector 4964 00006EFC 47 <1> inc di 4965 00006EFD BE2005 <1> mov si, 520h 4966 00006F00 B10B <1> mov cl, 11 4967 00006F02 F3A4 <1> rep movsb ; put additional filename (if any), cx = 0 4968 00006F04 5F <1> pop di 4969 00006F05 1F <1> pop ds 4970 <1> 4971 <1> ; cx = 0 4972 00006F06 A8 <1> db __TEST_IMM8 ; (skip pop) 4973 <1> .no_bpb_movsb: 4974 00006F07 58 <1> pop ax ; discard word on stack 4975 00006F08 F3A4 <1> rep movsb 4976 <1> 4977 00006F0A 8126[A00C]FFF8 <1> and word [reg_efl], ~(400h|200h|100h) ; UP, DI, TF=0 4978 <1> 4979 00006F10 890E[9E0C] <1> mov word [reg_eip + 2], cx 4980 00006F14 FF36[1C8D] <1> push word [load_entrypoint] 4981 00006F18 8F06[9C0C] <1> pop word [reg_eip] 4982 00006F1C A1[1E8D] <1> mov ax, word [load_entrypoint + 2] 4983 00006F1F 0306[1A8D] <1> add ax, word [load_loadseg] 4984 00006F23 A3[900C] <1> mov word [reg_cs], ax 4985 <1> 4986 00006F26 A1[D68F] <1> mov ax, word [load_bpb_dest + 2] 4987 00006F29 A3[8C0C] <1> mov word [reg_ss], ax 4988 <1> ; testopt [load_options], LOAD_SET_DSBP_BPB 4989 <1> ; jz @F 4990 <1> ; (always set ds -- overwritten later if LOAD_SET_DSSI_DPT) 4991 00006F2C A3[840C] <1> mov word [reg_ds], ax 4992 <1> @@: 4993 00006F2F 8B1E[D48F] <1> mov bx, word [load_bpb_dest] 4994 00006F33 890E[7A0C] <1> mov word [reg_ebp + 2], cx 4995 00006F37 891E[780C] <1> mov word [reg_ebp], bx 4996 00006F3B 89D8 <1> mov ax, bx 4997 00006F3D 83EB10 <1> sub bx, -LOADSTACKVARS ; (subtracts --10h) 4998 00006F40 890E[760C] <1> mov word [reg_esp + 2], cx 4999 00006F44 891E[740C] <1> mov word [reg_esp], bx 5000 <1> 5001 00006F48 F606[198D]20 <1> testopt [load_options], LOAD_NO_BPB 5002 00006F4D 751B <1> jnz @F 5003 <1> 5004 00006F4F F606[198D]04 <1> testopt [load_options], LOAD_MESSAGE_TABLE 5005 00006F54 7414 <1> jz @F 5006 00006F56 B96000 <1> mov cx, (bsBPB + ebpbNew + BPBN_size + 2 + 15) & ~15 5007 00006F59 01C8 <1> add ax, cx 5008 00006F5B 268985EE01 <1> mov word [es:di + 1EEh], ax 5009 <1> ; this pointer points to the MS-DOS 7 message table. 5010 <1> ; 5011 <1> ; note that in actual MS-DOS 7 boot sectors, this value is 5012 <1> ; eg 17Fh, which is incorrectly used with the boot sector's 5013 <1> ; ss to load the table into the initial loader. 5014 <1> ; 5015 <1> ; refer to comments in msg.asm about msdos7_message_table. 5016 00006F60 BE[D576] <1> mov si, msdos7_message_table 5017 00006F63 01CF <1> add di, cx 5018 00006F65 B94300 <1> mov cx, msdos7_message_table.size 5019 00006F68 F3A4 <1> rep movsb 5020 <1> @@: 5021 <1> 5022 00006F6A F606[198D]10 <1> testopt [load_options], LOAD_CMDLINE 5023 00006F6F 7440 <1> jz .no_cmdline 5024 <1> 5025 00006F71 8B36[DE8F] <1> mov si, word [load_cmdline] 5026 00006F75 85F6 <1> test si, si 5027 00006F77 7503 <1> jnz @F 5028 00006F79 BE[DE8F] <1> mov si, load_cmdline 5029 <1> @@: 5030 <1> 5031 <1> ; due to the size of our line_in buffer, 5032 <1> ; the command line is never too long for 5033 <1> ; the lsv command line buffer (256 bytes). 5034 00006F7C B98000 <1> mov cx, lsvclBufferLength / 2 5035 00006F7F 812E[740C]0401 <1> sub word [reg_esp], - lsvCommandLine.start + LOADSTACKVARS 5036 <1> ; hazard: if sp is too low, this underflows! 5037 00006F85 7303E9AD00 <1> jc .error_stack_underflow 5038 00006F8A 8E06[8C0C] <1> mov es, [reg_ss] 5039 00006F8E 8B3E[740C] <1> mov di, [reg_esp] ; es:di -> stack area for the pointers 5040 00006F92 81FF0001 <1> cmp di, 256 5041 00006F96 7303E99C00 <1> jb .error_stack_underflow 5042 00006F9B 57 <1> push di 5043 00006F9C F3A5 <1> rep movsw 5044 00006F9E 26884DFF <1> mov byte [es:di - 1], cl; truncate command line if too long 5045 00006FA2 B8434C <1> mov ax, lsvclSignature 5046 00006FA5 AB <1> stosw ; write lsvCommandLine.signature 5047 00006FA6 31C0 <1> xor ax, ax 5048 00006FA8 AB <1> stosw ; write lsvExtra 5049 00006FA9 5F <1> pop di 5050 00006FAA B90001 <1> mov cx, lsvclBufferLength 5051 00006FAD F2AE <1> repne scasb ; search terminator 5052 00006FAF F3AA <1> rep stosb ; zero buffer behind terminator 5053 <1> .no_cmdline: 5054 <1> 5055 00006FB1 31C0 <1> xor ax, ax 5056 00006FB3 8EC0 <1> mov es, ax 5057 00006FB5 BF7800 <1> mov di, 1Eh * 4 5058 00006FB8 268B5502 <1> mov dx, word [es:di + 2] 5059 00006FBC 268B1D <1> mov bx, word [es:di] 5060 <1> 5061 00006FBF F606[188D]10 <1> testopt [load_options], LOAD_SET_DSSI_DPT 5062 00006FC4 7408 <1> jz @F 5063 00006FC6 8916[840C] <1> mov word [reg_ds], dx 5064 00006FCA 891E[7C0C] <1> mov word [reg_esi], bx 5065 <1> @@: 5066 00006FCE F606[188D]20 <1> testopt [load_options], LOAD_PUSH_DPT 5067 00006FD3 7419 <1> jz @F 5068 <1> 5069 00006FD5 06 <1> push es 5070 00006FD6 57 <1> push di 5071 00006FD7 832E[740C]08 <1> sub word [reg_esp], 4 * 2 ; push four words 5072 00006FDC 8E06[8C0C] <1> mov es, [reg_ss] 5073 00006FE0 8B3E[740C] <1> mov di, [reg_esp] ; es:di -> stack area for the pointers 5074 00006FE4 58 <1> pop ax ; di (1Eh * 4) 5075 00006FE5 AB <1> stosw 5076 00006FE6 58 <1> pop ax ; es (0) 5077 00006FE7 AB <1> stosw 5078 00006FE8 89D8 <1> mov ax, bx 5079 00006FEA AB <1> stosw ; si (Int1E offset) 5080 00006FEB 89D0 <1> mov ax, dx 5081 00006FED AB <1> stosw ; ds (Int1E segment) 5082 <1> @@: 5083 <1> 5084 00006FEE F606[198D]40 <1> testopt [load_options], LOAD_SET_DSSI_PARTINFO 5085 00006FF3 7415 <1> jz @F 5086 00006FF5 A1[E08F] <1> mov ax, word [load_partition_entry] 5087 00006FF8 8326[840C]00 <1> and word [reg_ds], 0 5088 00006FFD A3[7C0C] <1> mov word [reg_esi], ax 5089 00007000 F606[198D]20 <1> testopt [load_options], LOAD_NO_BPB 5090 00007005 7403 <1> jz @F 5091 00007007 A3[780C] <1> mov word [reg_ebp], ax 5092 <1> @@: 5093 0000700A 800E[A300]01 <1> setopt [internalflags2], dif2_boot_loaded_kernel 5094 0000700F C3 <1> retn 5095 <1> 5096 <1> 5097 <1> .error_check_mismatch: 5098 00007010 4F <1> dec di 5099 00007011 4F <1> dec di ; = offset into file 5100 00007012 26FF35 <1> push word [es:di] ; = value we got in file 5101 00007015 57 <1> push di ; = offset 5102 00007016 16 <1> push ss 5103 00007017 07 <1> pop es ; set STT 5104 00007018 BF[F960] <1> mov di, msg.bootfail_check_mismatch.check_value 5105 0000701B E81C4A <1> call hexword ; write expected value 5106 0000701E 58 <1> pop ax 5107 0000701F BF[0961] <1> mov di, msg.bootfail_check_mismatch.check_offset 5108 00007022 E8154A <1> call hexword ; write offset 5109 00007025 58 <1> pop ax 5110 00007026 BF[1761] <1> mov di, msg.bootfail_check_mismatch.check_got 5111 00007029 E80E4A <1> call hexword ; write what we got in file 5112 <1> 5113 0000702C BA[E060] <1> mov dx, msg.bootfail_check_mismatch 5114 0000702F B81C02 <1> mov ax, 021Ch 5115 00007032 E82435 <1> call setrc 5116 00007035 EB09 <1> jmp @F ; fail with error message 5117 <1> 5118 <1> .error_stack_underflow: 5119 00007037 BA[C660] <1> mov dx, msg.bootfail_stack_underflow 5120 0000703A B81D02 <1> mov ax, 021Dh 5121 0000703D E81935 <1> call setrc 5122 <1> @@: 5123 00007040 E9ECF3 <1> jmp bootcmd.fail 5124 <1> 5125 <1> 5126 <1> boot_dir: 5127 00007043 8026[A400]F7 <1> clropt [internalflags3], dif3_load_dir_dir 5128 00007048 E84449 <1> call skipwhite 5129 0000704B 4E <1> dec si 5130 0000704C BA[8D63] <1> mov dx, msg.dir 5131 0000704F E88948 <1> call isstring? 5132 00007052 7505 <1> jne @F 5133 00007054 800E[A400]08 <1> setopt [internalflags3], dif3_load_dir_dir 5134 <1> @@: 5135 00007059 C706[F48F][9A63] <1> mov word [load_kernelname_input], msg.emptydirname 5136 0000705F AC <1> lodsb 5137 00007060 E8CBF5 <1> call parseloadunit_default_sdp 5138 00007063 7409 <1> jz .fn_done_eol ; no filename given, use defaults --> 5139 <1> ; al was = '/' or '\' or first pathname's first character 5140 <1> ; si-> next char 5141 00007065 BB[F48F] <1> mov bx, load_kernelname_input 5142 00007068 E8AFF1 <1> call bootcmd.pathname_parse_super 5143 0000706B E8E148 <1> call chkeol 5144 <1> 5145 <1> .fn_done_eol: 5146 0000706E F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 5147 00007073 7527 <1> jnz .boot_dir_from_ldp 5148 <1> 5149 00007075 8A1E[E28F] <1> mov bl, [load_partition] 5150 00007079 803E[F08C]80 <1> cmp byte [load_unit], 80h 5151 0000707E 7228 <1> jb .boot_dir_is_diskette 5152 00007080 84DB <1> test bl, bl ; partition specified ? 5153 00007082 7503E98EEF <1> jz bootcmd.error ; no, error --> 5154 <1> 5155 00007087 E8F306 <1> call query_geometry 5156 <1> 5157 0000708A B9[CF70] <1> mov cx, boot_dir_from_partition 5158 0000708D E84505 <1> call scan_partitions 5159 00007090 BA[7661] <1> mov dx, msg.boot_partition_not_found 5160 00007093 B81102 <1> mov ax, 0211h 5161 00007096 E8C034 <1> call setrc 5162 00007099 E993F3 <1> jmp bootcmd.fail 5163 <1> 5164 <1> 5165 <1> .boot_dir_from_ldp: 5166 0000709C E8DE06 <1> call query_geometry 5167 0000709F A1[D88F] <1> mov ax, word [load_partition_sector] 5168 000070A2 8B16[DA8F] <1> mov dx, word [load_partition_sector + 2] 5169 000070A6 EB0E <1> jmp @F 5170 <1> 5171 <1> 5172 <1> .boot_dir_is_diskette: 5173 000070A8 84DB <1> test bl, bl ; partition specified ? 5174 000070AA 7403E966EF <1> jnz bootcmd.error ; yes, error --> 5175 <1> 5176 000070AF E8CB06 <1> call query_geometry 5177 <1> 5178 000070B2 31C0 <1> xor ax, ax 5179 000070B4 31D2 <1> xor dx, dx 5180 <1> @@: 5181 000070B6 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 5182 000070BA 52 <1> push dx 5183 000070BB 50 <1> push ax 5184 000070BC E87408 <1> call read_ae_512_bytes 5185 <1> 5186 000070BF 26813EFE0155AA <1> cmp word [es:510], 0AA55h 5187 000070C6 7403E9560B <1> jne boot_sigmismatch 5188 000070CB 58 <1> pop ax 5189 000070CC 5A <1> pop dx 5190 <1> 5191 000070CD EB41 <1> jmp boot_dir_common 5192 <1> 5193 <1> 5194 <1> ; INP: es:si -> partition table entry, 5195 <1> ; si = load_partition_table .. load_partition_table+48, 5196 <1> ; es = ss 5197 <1> ; bp + di -> above part table metadata, 5198 <1> ; dwo [bp + di - 4] = root (outermost extended position) 5199 <1> ; dwo [bp + di - 8] = base (current table position) 5200 <1> ; CHG: ax, bx, (cx), dx 5201 <1> boot_dir_from_partition: 5202 <1> d4 call d4message 5203 <1> d4 asciz "In boot_dir_from_partition",13,10 5204 <1> 5205 000070CF A0[E38F] <1> mov al, byte [load_current_partition] 5206 000070D2 3A06[E28F] <1> cmp al, byte [load_partition] 5207 000070D6 7401 <1> je .gotit 5208 000070D8 C3 <1> retn 5209 <1> 5210 <1> .gotit: 5211 <1> d4 call d4message 5212 <1> d4 asciz "In boot_dir_from_partition.gotit",13,10 5213 <1> 5214 000070D9 8B43F8 <1> mov ax, [bp + di - 8] 5215 000070DC 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 5216 <1> 5217 000070DF 26034408 <1> add ax, [es:si + 8] 5218 000070E3 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 5219 <1> 5220 000070E7 26894408 <1> mov word [es:si + 8], ax 5221 000070EB 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 5222 000070EF 26800C80 <1> or byte [es:si + 0], 80h ; set bootable flag 5223 <1> 5224 000070F3 89EC <1> mov sp, bp 5225 000070F5 5D <1> pop bp ; restore bp (scan_partitions) 5226 000070F6 5B <1> pop bx ; discard ret address (scan_partitions) 5227 <1> 5228 <1> ; dx:ax = absolute sector number 5229 000070F7 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 5230 000070FB 50 <1> push ax 5231 000070FC 52 <1> push dx 5232 000070FD E83308 <1> call read_ae_512_bytes ; load partition boot sector 5233 <1> 5234 00007100 26813EFE0155AA <1> cmp word [es:510], 0AA55h 5235 00007107 7403E9150B <1> jne boot_sigmismatch 5236 <1> 5237 0000710C 31C9 <1> xor cx, cx 5238 <1> ; cmp word [es:0], cx 5239 <1> ; je boot_codemismatch 5240 <1> 5241 0000710E 5A <1> pop dx 5242 0000710F 58 <1> pop ax 5243 <1> 5244 <1> ; dx:ax = boot sector 5245 <1> ; byte [load_unit] = unit 5246 <1> ; es:0-> read sector 5247 <1> boot_dir_common: 5248 00007110 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 5249 00007114 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 5250 <1> 5251 00007119 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 5252 0000711C 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 5253 00007121 7403E90F0B <1> jne boot_secsizemismatch 5254 <1> 5255 <1> ; preserve some variables from our pseudo BPB 5256 00007126 31C0 <1> xor ax, ax 5257 00007128 FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 5258 0000712B 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 5259 00007130 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 5260 00007133 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 5261 <1> 5262 00007138 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 5263 0000713B D1EB <1> shr bx, 1 5264 0000713D 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 5265 <1> 5266 00007140 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 5267 00007145 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 5268 00007148 7407 <1> je .is_fat32 5269 0000714A 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 5270 0000714F EB05 <1> jmp short .was_fat1612 5271 <1> .is_fat32: 5272 00007151 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 5273 <1> .was_fat1612: 5274 <1> 5275 00007156 06 <1> push es 5276 00007157 1E <1> push ds 5277 00007158 06 <1> push es 5278 00007159 1F <1> pop ds 5279 0000715A 31F6 <1> xor si, si ; -> BPB from boot partition 5280 0000715C 16 <1> push ss 5281 0000715D 07 <1> pop es 5282 0000715E BF[B08C] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 5283 00007161 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 5284 00007164 F3A4 <1> rep movsb ; get the BPB 5285 <1> 5286 00007166 1F <1> pop ds 5287 00007167 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 5288 <1> 5289 0000716C 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 5290 0000716F 740B <1> je @F ; is FAT32 --> 5291 00007171 BE[D48C] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 5292 00007174 BF[F08C] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 5293 00007177 B91A00 <1> mov cx, BPBN_size 5294 0000717A F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 5295 <1> ; to where the FAT32 BPBN lives 5296 <1> @@: 5297 0000717C 07 <1> pop es 5298 <1> 5299 0000717D FF36[F209] <1> push word [auxbuff_segorsel] 5300 00007181 8F46F8 <1> pop word [bp + lsvFATSeg] 5301 00007184 804EE702 <1> or byte [bp + ldFlags], ldfFATInvalid 5302 00007188 B8FFFF <1> mov ax, -1 5303 0000718B 8946F4 <1> mov word [bp + lsvFATSector], ax 5304 0000718E 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 5305 <1> 5306 00007191 E8FB10 <1> call initialise_fs 5307 <1> 5308 00007194 C706[1290][A673] <1> mov word [handle_scan_dir_entry], scan_dir_entry 5309 <1> 5310 0000719A C606[E58F]00 <1> mov byte [load_check_dir_attr], 0 5311 0000719F 8B36[F48F] <1> mov si, word [load_kernelname_input] 5312 000071A3 803C2F <1> cmp byte [si], '/' 5313 000071A6 7501 <1> jne @F 5314 000071A8 46 <1> inc si 5315 <1> @@: 5316 000071A9 803C00 <1> cmp byte [si], 0 5317 000071AC 7503E99B00 <1> je .root 5318 000071B1 16 <1> push ss 5319 000071B2 07 <1> pop es 5320 000071B3 E84EF7 <1> call boot_parse_fn ; get next pathname 5321 000071B6 3C2F <1> cmp al, '/' 5322 000071B8 7509 <1> jne @F 5323 000071BA C606[E58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 5324 000071BF 8936[F68F] <1> mov word [load_kernelname_next], si 5325 <1> @@: 5326 000071C3 84C0 <1> test al, al 5327 000071C5 7506 <1> jnz @F 5328 000071C7 C706[1290][A373] <1> mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 5329 <1> @@: 5330 <1> 5331 000071CD BFFFFF <1> mov di, -1 5332 000071D0 89FE <1> mov si, di 5333 000071D2 897EF4 <1> mov [bp + lsvFATSector], di 5334 000071D5 8976F6 <1> mov [bp + lsvFATSector + 2], si 5335 <1> 5336 000071D8 31C0 <1> xor ax, ax 5337 000071DA 31D2 <1> xor dx, dx 5338 <1> 5339 000071DC 83EC20 <1> sub sp, 32 5340 <1> 5341 <1> .scan_dir_dirname_loop: 5342 000071DF 8946EC <1> mov word [bp + ldDirCluster], ax 5343 000071E2 8956EE <1> mov word [bp + ldDirCluster + 2], dx 5344 <1> 5345 000071E5 16 <1> push ss 5346 000071E6 07 <1> pop es 5347 000071E7 89E3 <1> mov bx, sp 5348 000071E9 E8EF01 <1> call scan_dir_aux_with_error 5349 <1> 5350 000071EC 803E[E58F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 5351 000071F1 7542 <1> jne .got_direntry 5352 <1> 5353 000071F3 56 <1> push si 5354 000071F4 57 <1> push di 5355 000071F5 C606[E58F]00 <1> mov byte [load_check_dir_attr], 0 5356 000071FA 8B36[F68F] <1> mov si, word [load_kernelname_next] 5357 000071FE 803C00 <1> cmp byte [si], 0 5358 00007201 744F <1> je .sub 5359 <1> 5360 00007203 06 <1> push es 5361 00007204 16 <1> push ss 5362 00007205 07 <1> pop es 5363 00007206 E8FBF6 <1> call boot_parse_fn ; get next pathname 5364 00007209 07 <1> pop es 5365 0000720A 3C2F <1> cmp al, '/' 5366 0000720C 7509 <1> jne @F 5367 0000720E C606[E58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 5368 00007213 8936[F68F] <1> mov word [load_kernelname_next], si 5369 <1> @@: 5370 00007217 84C0 <1> test al, al 5371 00007219 7506 <1> jnz @F 5372 0000721B C706[1290][A373] <1> mov word [handle_scan_dir_entry], scan_dir_entry_dir_or_file 5373 <1> @@: 5374 <1> 5375 00007221 5F <1> pop di 5376 00007222 5E <1> pop si 5377 <1> 5378 00007223 31D2 <1> xor dx, dx 5379 00007225 268B471A <1> mov ax, [es:bx + deClusterLow] 5380 <1> ; = first cluster (not FAT32) 5381 00007229 807EE620 <1> cmp byte [bp + ldFATType], 32 5382 0000722D 7504 <1> jne @F 5383 0000722F 268B5714 <1> mov dx, [es:bx + deClusterHigh] 5384 <1> ; dx:ax = first cluster (FAT32) 5385 <1> @@: 5386 <1> 5387 00007233 EBAA <1> jmp .scan_dir_dirname_loop 5388 <1> 5389 <1> .got_direntry: 5390 00007235 F606[A400]08 <1> testopt [internalflags3], dif3_load_dir_dir 5391 0000723A 7507 <1> jnz @F 5392 0000723C 26F6470B10 <1> test byte [es:bx + deAttrib], ATTR_DIRECTORY 5393 00007241 7511 <1> jnz @FF 5394 <1> @@: 5395 00007243 89DF <1> mov di, bx 5396 00007245 E83400 <1> call list_dir_entry 5397 00007248 83C420 <1> add sp, 32 5398 0000724B C3 <1> retn 5399 <1> 5400 <1> .root: 5401 0000724C 31C0 <1> xor ax, ax 5402 0000724E 31D2 <1> xor dx, dx 5403 00007250 EB15 <1> jmp .scan 5404 <1> 5405 <1> .sub: 5406 00007252 5F <1> pop di 5407 00007253 5E <1> pop si 5408 <1> 5409 <1> @@: 5410 00007254 83C420 <1> add sp, 32 5411 <1> 5412 00007257 31D2 <1> xor dx, dx 5413 00007259 268B471A <1> mov ax, [es:bx + deClusterLow] 5414 <1> ; = first cluster (not FAT32) 5415 0000725D 807EE620 <1> cmp byte [bp + ldFATType], 32 5416 00007261 7504 <1> jne @F 5417 00007263 268B5714 <1> mov dx, [es:bx + deClusterHigh] 5418 <1> ; dx:ax = first cluster (FAT32) 5419 <1> @@: 5420 <1> .scan: 5421 00007267 8946EC <1> mov word [bp + ldDirCluster], ax 5422 0000726A 8956EE <1> mov word [bp + ldDirCluster + 2], dx 5423 <1> 5424 0000726D C706[1290][7C72] <1> mov word [handle_scan_dir_entry], list_dir_entry 5425 00007273 C706[1490][1404] <1> mov word [handle_scan_dir_not_found], dmycmd 5426 <1> 5427 00007279 E96501 <1> jmp scan_dir_aux 5428 <1> 5429 <1> 5430 <1> list_dir_entry: 5431 0000727C 26803D00 <1> cmp byte [es:di], 0 5432 00007280 7503E91D01 <1> je .ret ; (NC, ZR) 5433 00007285 26803DE5 <1> cmp byte [es:di], 0E5h 5434 00007289 7504 <1> jne @F 5435 0000728B 80CB01 <1> or bl, 1 ; (NC, NZ) 5436 0000728E C3 <1> retn 5437 <1> 5438 <1> @@: 5439 0000728F 268A5D0B <1> mov bl, byte [es:di + deAttrib] 5440 00007293 F6C308 <1> test bl, ATTR_VOLLABEL 5441 00007296 7403E90401 <1> jnz .ret_NC_NZ ; skip volume labels (and LFNs) --> (NZ) 5442 <1> 5443 0000729B 26803D2E <1> cmp byte [es:di], '.' ; dot or dotdot entry ? 5444 0000729F 7503E9FB00 <1> je .ret_NC_NZ ; yes, skip --> 5445 <1> 5446 000072A4 50 <1> push ax 5447 000072A5 53 <1> push bx 5448 000072A6 51 <1> push cx 5449 000072A7 52 <1> push dx 5450 000072A8 56 <1> push si 5451 000072A9 57 <1> push di 5452 000072AA 06 <1> push es 5453 000072AB 1E <1> push ds 5454 000072AC 06 <1> push es 5455 000072AD 1F <1> pop ds 5456 000072AE 89FE <1> mov si, di 5457 <1> 5458 000072B0 16 <1> push ss 5459 000072B1 07 <1> pop es 5460 000072B2 BF[0E08] <1> mov di, line_out 5461 000072B5 B90800 <1> mov cx, 8 5462 000072B8 F3A4 <1> rep movsb 5463 000072BA B82020 <1> mov ax, 2020h 5464 000072BD AA <1> stosb 5465 000072BE B103 <1> mov cl, 3 5466 000072C0 F3A4 <1> rep movsb 5467 000072C2 AB <1> stosw 5468 <1> 5469 000072C3 1F <1> pop ds 5470 000072C4 B02D <1> mov al, '-' 5471 000072C6 F6C320 <1> test bl, ATTR_ARCHIVE 5472 000072C9 7402 <1> jz @F 5473 000072CB B041 <1> mov al, 'A' 5474 <1> @@: 5475 000072CD AA <1> stosb 5476 000072CE B02D <1> mov al, '-' 5477 000072D0 F6C302 <1> test bl, ATTR_HIDDEN 5478 000072D3 7402 <1> jz @F 5479 000072D5 B048 <1> mov al, 'H' 5480 <1> @@: 5481 000072D7 AA <1> stosb 5482 000072D8 B02D <1> mov al, '-' 5483 000072DA F6C301 <1> test bl, ATTR_READONLY 5484 000072DD 7402 <1> jz @F 5485 000072DF B052 <1> mov al, 'R' 5486 <1> @@: 5487 000072E1 AA <1> stosb 5488 000072E2 B02D <1> mov al, '-' 5489 000072E4 F6C304 <1> test bl, ATTR_SYSTEM 5490 000072E7 7402 <1> jz @F 5491 000072E9 B053 <1> mov al, 'S' 5492 <1> @@: 5493 000072EB AA <1> stosb 5494 000072EC B82020 <1> mov ax, 2020h 5495 000072EF AB <1> stosw 5496 <1> 5497 000072F0 F6C310 <1> test bl, ATTR_DIRECTORY 5498 000072F3 7408 <1> jz @F 5499 000072F5 BE[9163] <1> mov si, msg.dirinsteadsize 5500 000072F8 E83BC1 <1> call copy_single_counted_string 5501 000072FB EB2D <1> jmp @FF 5502 <1> 5503 <1> @@: 5504 000072FD 07 <1> pop es 5505 000072FE 5E <1> pop si 5506 000072FF 56 <1> push si 5507 00007300 06 <1> push es 5508 00007301 268A440C <1> mov al, byte [es:si + dePlusSize] 5509 00007305 88C4 <1> mov ah, al 5510 00007307 2507E0 <1> and ax, 0E007h 5511 0000730A 88E2 <1> mov dl, ah 5512 0000730C B400 <1> mov ah, 0 5513 0000730E B600 <1> mov dh, 0 5514 00007310 D1EA <1> shr dx, 1 5515 00007312 D1EA <1> shr dx, 1 5516 00007314 09D0 <1> or ax, dx 5517 00007316 50 <1> push ax 5518 00007317 268B541E <1> mov dx, word [es:si + deSize + 2] 5519 0000731B 268B441C <1> mov ax, word [es:si + deSize] 5520 0000731F 5E <1> pop si 5521 00007320 16 <1> push ss 5522 00007321 07 <1> pop es 5523 00007322 31C9 <1> xor cx, cx 5524 00007324 BB0800 <1> mov bx, 4+4 5525 00007327 E833AC <1> call disp_dxax_times_cx_width_bx_size.store 5526 <1> 5527 <1> @@: 5528 0000732A B82020 <1> mov ax, 2020h 5529 0000732D AB <1> stosw 5530 0000732E 07 <1> pop es 5531 0000732F 5E <1> pop si 5532 00007330 56 <1> push si 5533 00007331 06 <1> push es 5534 00007332 268B5C18 <1> mov bx, word [es:si + deDate] 5535 00007336 268B7416 <1> mov si, word [es:si + deTime] 5536 0000733A 16 <1> push ss 5537 0000733B 07 <1> pop es 5538 0000733C 89D8 <1> mov ax, bx 5539 0000733E B90900 <1> mov cx, 9 5540 00007341 D3E8 <1> shr ax, cl 5541 00007343 05BC07 <1> add ax, 1980 5542 00007346 31D2 <1> xor dx, dx 5543 00007348 B104 <1> mov cl, 4 5544 0000734A E88546 <1> call dec_dword_minwidth 5545 0000734D B02D <1> mov al, '-' 5546 0000734F AA <1> stosb 5547 00007350 89D8 <1> mov ax, bx 5548 00007352 B105 <1> mov cl, 5 5549 00007354 D3E8 <1> shr ax, cl 5550 00007356 83E00F <1> and ax, 15 5551 00007359 B102 <1> mov cl, 2 5552 0000735B E87446 <1> call dec_dword_minwidth 5553 0000735E B02D <1> mov al, '-' 5554 00007360 AA <1> stosb 5555 00007361 89D8 <1> mov ax, bx 5556 00007363 83E01F <1> and ax, 31 5557 00007366 E86946 <1> call dec_dword_minwidth 5558 00007369 B020 <1> mov al, 32 5559 0000736B AA <1> stosb 5560 0000736C 89F0 <1> mov ax, si 5561 0000736E B10B <1> mov cl, 11 5562 00007370 D3E8 <1> shr ax, cl 5563 00007372 B102 <1> mov cl, 2 5564 00007374 E85B46 <1> call dec_dword_minwidth 5565 00007377 B03A <1> mov al, ':' 5566 00007379 AA <1> stosb 5567 0000737A 89F0 <1> mov ax, si 5568 0000737C B105 <1> mov cl, 5 5569 0000737E D3E8 <1> shr ax, cl 5570 00007380 83E03F <1> and ax, 63 5571 00007383 B102 <1> mov cl, 2 5572 00007385 E84A46 <1> call dec_dword_minwidth 5573 00007388 B03A <1> mov al, ':' 5574 0000738A AA <1> stosb 5575 0000738B 89F0 <1> mov ax, si 5576 0000738D 83E01F <1> and ax, 31 5577 00007390 D1E0 <1> shl ax, 1 5578 00007392 E83D46 <1> call dec_dword_minwidth 5579 <1> 5580 00007395 E8DA46 <1> call putsline_crlf 5581 <1> 5582 00007398 07 <1> pop es 5583 00007399 5F <1> pop di 5584 0000739A 5E <1> pop si 5585 0000739B 5A <1> pop dx 5586 0000739C 59 <1> pop cx 5587 0000739D 5B <1> pop bx 5588 0000739E 58 <1> pop ax 5589 <1> 5590 <1> .ret_NC_NZ: 5591 0000739F 80CB01 <1> or bl, 1 ; (NC, NZ) 5592 <1> .ret: 5593 000073A2 C3 <1> retn 5594 <1> 5595 <1> 5596 <1> usesection lDEBUG_DATA_ENTRY 5597 <1> 5598 <1> align 2, db 0 5599 <1> handle_scan_dir_entry: 5600 00009012 [12A5] <1> dw error 5601 <1> handle_scan_dir_not_found: 5602 00009014 [12A5] <1> dw error 5603 <1> 5604 <1> 5605 <1> usesection lDEBUG_CODE 5606 <1> 5607 <1> scan_dir_entry_dir_or_file: 5608 000073A3 B701 <1> mov bh, 1 5609 000073A5 A9 <1> db __TEST_IMM16 ; (skip mov) 5610 <1> 5611 <1> scan_dir_entry: 5612 000073A6 B700 <1> mov bh, 0 5613 000073A8 26803D00 <1> cmp byte [es:di], 0 5614 000073AC F9 <1> stc 5615 000073AD 7425 <1> je .ret 5616 000073AF 268A5D0B <1> mov bl, byte [es:di + deAttrib] 5617 000073B3 F6C308 <1> test bl, ATTR_VOLLABEL 5618 000073B6 751B <1> jnz @F ; skip volume labels (and LFNs) --> (NZ) 5619 000073B8 84FF <1> test bh, bh 5620 000073BA 7509 <1> jnz .no_check_dir 5621 000073BC 80E310 <1> and bl, ATTR_DIRECTORY ; isolate directory bit 5622 000073BF 3A1E[E58F] <1> cmp bl, byte [load_check_dir_attr] ; is it what we're searching? 5623 000073C3 750E <1> jne @F ; no --> 5624 <1> .no_check_dir: 5625 000073C5 56 <1> push si 5626 000073C6 57 <1> push di 5627 000073C7 51 <1> push cx 5628 000073C8 BE[E88F] <1> mov si, load_kernel_name ; ds:si-> name to match 5629 000073CB B90B00 <1> mov cx, 11 ; length of padded 8.3 FAT filename 5630 000073CE F3A6 <1> repe cmpsb ; check entry 5631 000073D0 59 <1> pop cx 5632 000073D1 5F <1> pop di 5633 000073D2 5E <1> pop si 5634 <1> @@: 5635 000073D3 F8 <1> clc 5636 <1> .ret: 5637 000073D4 C3 <1> retn 5638 <1> 5639 <1> 5640 <1> ; INP: es:bx -> where to place directory entry 5641 <1> ; si:di = loaded FAT sector (0 = first FAT sector) 5642 <1> ; dword [bp + ldDirCluster] = directory cluster to scan, 5643 <1> ; 0 for root dir 5644 <1> ; byte [bp + ldFATType] = size of FAT entry in bits 5645 <1> ; OUT: es:bx -> directory entry (es:bx unchanged) 5646 <1> ; si:di = loaded FAT sector 5647 <1> ; CHG: dx, ax, si, di, cx 5648 <1> scan_dir_aux_for_file: 5649 000073D5 C706[1290][A673] <1> mov word [handle_scan_dir_entry], scan_dir_entry 5650 <1> 5651 <1> scan_dir_aux_with_error: 5652 000073DB C706[1490][3774] <1> mov word [handle_scan_dir_not_found], error_filenotfound 5653 <1> 5654 <1> scan_dir_aux: 5655 000073E1 FF36[F209] <1> push word [auxbuff_segorsel] 5656 000073E5 8F06[0090] <1> pop word [load_adr_dirbuf_segment] 5657 <1> 5658 <1> scan_dir: 5659 000073E9 8B46EC <1> mov ax, word [bp + ldDirCluster] 5660 000073EC 8B56EE <1> mov dx, word [bp + ldDirCluster + 2] 5661 <1> 5662 000073EF 85C0 <1> test ax, ax 5663 000073F1 7576 <1> jnz fat32_scan_root.dir_clust_dxax 5664 000073F3 85D2 <1> test dx, dx 5665 000073F5 7572 <1> jnz fat32_scan_root.dir_clust_dxax 5666 <1> 5667 <1> ; got to scan root directory. use FAT12/FAT16 walker if so, 5668 <1> ; else use FAT32 walker 5669 <1> 5670 000073F7 807EE610 <1> cmp byte [bp + ldFATType], 16 5671 000073FB 7766 <1> ja fat32_scan_root 5672 <1> 5673 000073FD 56 <1> push si 5674 000073FE 57 <1> push di 5675 000073FF 06 <1> push es 5676 00007400 53 <1> push bx 5677 <1> 5678 00007401 8B7611 <1> mov si, word [bp + bsBPB + bpbNumRootDirEnts] 5679 <1> 5680 <1> 5681 <1> ; (boot.asm code starts here) 5682 <1> 5683 <1> fat16_scan_root: 5684 00007404 85F6 <1> test si, si 5685 00007406 7424 <1> jz handle_filenotfound_fat16 5686 <1> 5687 00007408 8B46D0 <1> mov ax, [bp + ldRootSector] 5688 0000740B 8B56D2 <1> mov dx, [bp + ldRootSector + 2] 5689 <1> 5690 <1> ; Scan root directory for file. We don't bother to check for deleted 5691 <1> ; entries (E5h) or entries that mark the end of the directory (00h). 5692 <1> ; number of root entries in si here 5693 <1> fat16_next_sect: 5694 0000740E 8B1E[0090] <1> mov bx, [load_adr_dirbuf_segment] 5695 00007412 E83005 <1> call read_sector 5696 <1> 5697 00007415 8B4ED4 <1> mov cx, [bp + ldEntriesPerSector] ; entries per sector as loop counter 5698 00007418 31FF <1> xor di, di ; es:di-> first entry in this sector 5699 <1> fat16_next_ent: 5700 0000741A FF16[1290] <1> call near word [handle_scan_dir_entry] 5701 0000741E 720C <1> jc handle_filenotfound_fat16 5702 00007420 8D7D20 <1> lea di, [di + DIRENTRY_size] ; bytes/dirent 5703 00007423 7428 <1> je fat16_found_it ; found entry --> 5704 <1> 5705 00007425 4E <1> dec si ; count down entire root's entries 5706 00007426 E0F2 <1> loopnz fat16_next_ent ; count down sector's entries (jumps iff si >0 && cx >0) 5707 00007428 85F6 <1> test si, si ; work around qemu bug 5708 0000742A 75E2 <1> jnz fat16_next_sect ; (jumps iff si >0 && cx ==0) 5709 <1> ; ends up here iff si ==0 5710 <1> ; ie all root entries checked unsuccessfully 5711 <1> %if 0 5712 <1> 5713 <1> qemu prior to 2020-08 has a bug which affects the above 5714 <1> conditionals. The bug is that if NZ is set (like when the 5715 <1> branch to fat16_found_it is not taken) and then another 5716 <1> instruction sets ZR (like the dec si at the end of the root 5717 <1> directory) and then loopnz is used which sets cx to zero 5718 <1> then after the loopnz FL will be NZ leading to the jnz branch 5719 <1> to be taken. Eventually the entire load unit is traversed and 5720 <1> qemu returns error 01h when trying to read past the end of 5721 <1> the unit (at least for 1440 KiB diskettes). 5722 <1> 5723 <1> The bug is now worked around by the comparison with zero at 5724 <1> the fat16_next_ent label. The test si, si serves as another 5725 <1> workaround to forcibly set the flag correctly after loopnz. 5726 <1> It is only really needed when the entire root is filled with 5727 <1> non-zero directory entries and an older qemu is used. 5728 <1> 5729 <1> Reference: https://bugs.launchpad.net/qemu/+bug/1888165 5730 <1> 5731 <1> %endif 5732 <1> 5733 <1> handle_filenotfound_fat16: 5734 0000742C 5B <1> pop bx 5735 0000742D 07 <1> pop es 5736 0000742E 5F <1> pop di 5737 0000742F 5E <1> pop si 5738 <1> 5739 00007430 A9 <1> db __TEST_IMM16 ; (skip pop and pop) 5740 <1> handle_filenotfound_fat32: 5741 00007431 5B <1> pop bx 5742 00007432 07 <1> pop es 5743 <1> 5744 <1> handle_filenotfound: 5745 00007433 FF26[1490] <1> jmp near word [handle_scan_dir_not_found] 5746 <1> 5747 <1> error_filenotfound: 5748 <1> %if _INPUT_FILE_BOOT 5749 00007437 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 5750 0000743C 7403E96E1C <1> jnz if_exists_not_found 5751 <1> %endif 5752 00007441 BA[4162] <1> mov dx, msg.boot_file_not_found 5753 00007444 B81E02 <1> mov ax, 021Eh 5754 00007447 E80F31 <1> call setrc 5755 0000744A E9E2EF <1> jmp bootcmd.fail 5756 <1> 5757 <1> fat16_found_it: 5758 0000744D 5B <1> pop bx 5759 0000744E 58 <1> pop ax 5760 0000744F B92000 <1> mov cx, 32 5761 00007452 29CF <1> sub di, cx 5762 00007454 1E <1> push ds 5763 00007455 06 <1> push es 5764 00007456 1F <1> pop ds 5765 00007457 89FE <1> mov si, di ; ds:si -> entry in directory buffer 5766 00007459 89DF <1> mov di, bx 5767 0000745B 8EC0 <1> mov es, ax ; es:di -> destination for entry 5768 0000745D F3A4 <1> rep movsb 5769 0000745F 1F <1> pop ds 5770 00007460 5F <1> pop di 5771 00007461 5E <1> pop si 5772 00007462 C3 <1> retn 5773 <1> 5774 <1> 5775 <1> ; (boot32.asm code starts here) 5776 <1> 5777 <1> fat32_scan_root: 5778 00007463 8B462C <1> mov ax, [bp + bsBPB + ebpbRootCluster] 5779 00007466 8B562E <1> mov dx, [bp + bsBPB + ebpbRootCluster + 2] 5780 <1> 5781 <1> .dir_clust_dxax: 5782 00007469 06 <1> push es 5783 0000746A 53 <1> push bx 5784 <1> 5785 0000746B E83501 <1> call check_clust 5786 0000746E 72C1 <1> jc handle_filenotfound_fat32 5787 <1> 5788 <1> fat32_next_root_clust: 5789 00007470 E84F00 <1> call clust_to_first_sector 5790 00007473 51 <1> push cx 5791 00007474 53 <1> push bx 5792 00007475 8B4EE8 <1> mov cx, [bp + ldClusterSize] 5793 <1> fat32_next_root_sect: 5794 00007478 51 <1> push cx 5795 00007479 8B4ED4 <1> mov cx, [bp + ldEntriesPerSector] 5796 <1> 5797 <1> ; Scan root directory for file. We don't bother to check for deleted 5798 <1> ; entries (E5h) or entries that mark the end of the directory (00h). 5799 0000747C 8B1E[0090] <1> mov bx, [load_adr_dirbuf_segment] 5800 00007480 E8C204 <1> call read_sector 5801 <1> 5802 00007483 57 <1> push di 5803 00007484 31FF <1> xor di, di ; es:di-> first entry in this sector 5804 <1> fat32_next_ent: 5805 00007486 FF16[1290] <1> call near word [handle_scan_dir_entry] 5806 0000748A 7214 <1> jc handle_filenotfound_fat32_pop 5807 0000748C 8D7D20 <1> lea di, [di + DIRENTRY_size] ; bytes/dirent 5808 0000748F 7415 <1> je fat32_found_it ; found entry --> 5809 <1> 5810 00007491 E2F3 <1> loop fat32_next_ent ; count down sector's entries (jumps iff cx >0) 5811 00007493 5F <1> pop di 5812 00007494 59 <1> pop cx 5813 00007495 E2E1 <1> loop fat32_next_root_sect 5814 00007497 5B <1> pop bx 5815 00007498 59 <1> pop cx 5816 00007499 E84F00 <1> call clust_next 5817 0000749C 73D2 <1> jnc fat32_next_root_clust 5818 0000749E EB04 <1> jmp @F 5819 <1> 5820 <1> handle_filenotfound_fat32_pop: 5821 000074A0 5F <1> pop di 5822 000074A1 59 <1> pop cx 5823 000074A2 5B <1> pop bx 5824 000074A3 59 <1> pop cx 5825 <1> @@: 5826 000074A4 EB8B <1> jmp handle_filenotfound_fat32 5827 <1> 5828 <1> 5829 <1> fat32_found_it: 5830 000074A6 5A <1> pop dx ; value for di 5831 000074A7 83C406 <1> add sp, 6 ; discard sector-in-cluster counter and cluster 5832 000074AA 5B <1> pop bx 5833 000074AB 58 <1> pop ax 5834 000074AC B92000 <1> mov cx, 32 5835 000074AF 29CF <1> sub di, cx 5836 000074B1 1E <1> push ds 5837 000074B2 06 <1> push es 5838 000074B3 1F <1> pop ds 5839 000074B4 56 <1> push si 5840 000074B5 89FE <1> mov si, di ; ds:si -> entry in directory buffer 5841 000074B7 89DF <1> mov di, bx 5842 000074B9 8EC0 <1> mov es, ax ; es:di -> destination for entry 5843 000074BB F3A4 <1> rep movsb 5844 000074BD 5E <1> pop si 5845 000074BE 1F <1> pop ds 5846 000074BF 89D7 <1> mov di, dx ; restore si:di = loaded FAT sector 5847 000074C1 C3 <1> retn 5848 <1> 5849 <1> 5850 <1> ; (iniload.asm code continues here) 5851 <1> 5852 <1> ; INP: dx:ax = cluster - 2 (0-based cluster) 5853 <1> ; OUT: cx:bx = input dx:ax 5854 <1> ; dx:ax = first sector of that cluster 5855 <1> ; CHG: - 5856 <1> clust_to_first_sector: 5857 000074C2 52 <1> push dx 5858 000074C3 50 <1> push ax 5859 000074C4 52 <1> push dx 5860 000074C5 F726[988C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 5861 000074C9 93 <1> xchg bx, ax 5862 000074CA 87CA <1> xchg cx, dx 5863 000074CC 58 <1> pop ax 5864 000074CD F726[988C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 5865 000074D1 85D2 <1> test dx, dx 5866 000074D3 7513 <1> jnz .error_badchain 5867 000074D5 92 <1> xchg dx, ax 5868 000074D6 01CA <1> add dx, cx 5869 000074D8 720E <1> jc .error_badchain 5870 000074DA 93 <1> xchg ax, bx 5871 <1> 5872 000074DB 0306[AC8C] <1> add ax, [load_data - LOADDATA2 + lsvDataStart] 5873 000074DF 1316[AE8C] <1> adc dx, [load_data - LOADDATA2 + lsvDataStart + 2] 5874 000074E3 7203 <1> jc .error_badchain 5875 <1> ; dx:ax = first sector in cluster 5876 000074E5 5B <1> pop bx 5877 000074E6 59 <1> pop cx ; cx:bx = cluster 5878 000074E7 C3 <1> retn 5879 <1> 5880 <1> .error_badchain: 5881 000074E8 E9E10D <1> jmp error_badchain 5882 <1> 5883 <1> 5884 <1> ; INP: cx:bx = cluster (0-based) 5885 <1> ; si:di = loaded FAT sector, -1 if none 5886 <1> ; OUT: CY if no next cluster 5887 <1> ; NC if next cluster found, 5888 <1> ; dx:ax = next cluster value (0-based) 5889 <1> ; si:di = loaded FAT sector 5890 <1> ; CHG: cx, bx 5891 <1> clust_next: 5892 000074EB 89D8 <1> mov ax, bx 5893 000074ED 89CA <1> mov dx, cx 5894 <1> .dxax: 5895 000074EF 83C002 <1> add ax, 2 5896 000074F2 83D200 <1> adc dx, 0 5897 <1> 5898 000074F5 06 <1> push es 5899 000074F6 803E[968C]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 5900 000074FB 7452 <1> je .fat16 5901 000074FD 774C <1> ja .fat32 5902 <1> 5903 <1> .fat12: 5904 <1> ; FAT12 entries are 12 bits, bytes are 8 bits. Ratio is 3 / 2, 5905 <1> ; so multiply cluster number by 3 first, then divide by 2. 5906 <1> ; ax = cluster number (up to 12 bits set) 5907 000074FF 89C2 <1> mov dx, ax 5908 00007501 D1E0 <1> shl ax, 1 ; = 2n (up to 13 bits set) 5909 00007503 01D0 <1> add ax, dx ; = 2n+n = 3n (up to 14 bits set) 5910 00007505 D1E8 <1> shr ax, 1 ; ax = byte offset into FAT (0..6129) 5911 <1> ; CF = whether to use high 12 bits 5912 00007507 19C9 <1> sbb cx, cx ; = -1 iff CY, else 0 5913 <1> 5914 <1> ; Use the calculated byte offset as an offset into the FAT 5915 <1> ; buffer, which holds all of the FAT's relevant data. 5916 00007509 8E06[A88C] <1> mov es, [load_data - LOADDATA2 + lsvFATSeg] 5917 0000750D 89C3 <1> mov bx, ax ; -> 16-bit word in FAT to load 5918 <1> 5919 0000750F F606[978C]02 <1> test byte [load_ldflags], ldfFATInvalid 5920 00007514 7426 <1> jz .fat12_have_fat ; already have it --> 5921 00007516 51 <1> push cx 5922 00007517 31D2 <1> xor dx, dx 5923 00007519 F736[BB8C] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5924 <1> ; dx = remainder, byte offset 5925 <1> ; ax = sector to read 5926 0000751D 52 <1> push dx 5927 0000751E 31D2 <1> xor dx, dx 5928 00007520 0306[BE8C] <1> add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 5929 00007524 11D2 <1> adc dx, dx 5930 00007526 8B1E[A88C] <1> mov bx, [load_data - LOADDATA2 + lsvFATSeg] 5931 0000752A E81804 <1> call read_sector 5932 0000752D 59 <1> pop cx 5933 0000752E 3B0E[BB8C] <1> cmp cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5934 00007532 7505 <1> jne .fat12_have_fat_cx 5935 00007534 06 <1> push es 5936 00007535 E80D04 <1> call read_sector ; read second sector for straddling entry 5937 00007538 07 <1> pop es 5938 <1> 5939 <1> .fat12_have_fat_cx: 5940 00007539 89CB <1> mov bx, cx 5941 0000753B 59 <1> pop cx 5942 <1> 5943 <1> .fat12_have_fat: 5944 <1> 5945 <1> ; get 16 bits from FAT 5946 0000753C 268B07 <1> mov ax, [es:bx] 5947 <1> 5948 0000753F 80E104 <1> and cl, 4 ; = 4 iff CY after shift, else 0 5949 00007542 D3E8 <1> shr ax, cl ; shift down iff odd entry, else unchanged 5950 00007544 25FF0F <1> and ax, 0FFFh ; insure it's only 12 bits 5951 00007547 31D2 <1> xor dx, dx 5952 00007549 EB57 <1> jmp short .gotvalue 5953 <1> 5954 <1> .fat32: 5955 <1> ; * 4 = byte offset into FAT (0--4000_0000h) 5956 0000754B 01C0 <1> add ax, ax 5957 0000754D 11D2 <1> adc dx, dx 5958 <1> .fat16: 5959 <1> ; * 2 = byte offset into FAT (0--2_0000h) 5960 0000754F 01C0 <1> add ax, ax 5961 00007551 11D2 <1> adc dx, dx 5962 <1> 5963 00007553 50 <1> push ax 5964 00007554 92 <1> xchg ax, dx 5965 00007555 31D2 <1> xor dx, dx ; dx:ax = high word 5966 00007557 F736[BB8C] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5967 0000755B 89C3 <1> mov bx, ax 5968 0000755D 58 <1> pop ax ; dx = remainder, ax = low word 5969 0000755E F736[BB8C] <1> div word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 5970 00007562 87D3 <1> xchg dx, bx ; dx:ax = result, bx = remainder 5971 <1> ; dx:ax = sector offset into FAT (0--200_0000h) 5972 <1> ; bx = byte offset into FAT sector (0--8190) 5973 00007564 F606[978C]02 <1> test byte [load_ldflags], ldfFATInvalid 5974 00007569 7513 <1> jnz .read_no_store ; always read --> 5975 <1> 5976 0000756B 39F2 <1> cmp dx, si 5977 0000756D 7504 <1> jne @F ; read sector 5978 0000756F 39F8 <1> cmp ax, di 5979 00007571 741B <1> je @FF ; sector is already buffered 5980 <1> @@: 5981 00007573 89D6 <1> mov si, dx 5982 00007575 89C7 <1> mov di, ax 5983 00007577 8916[A68C] <1> mov word [load_data - LOADDATA2 + lsvFATSector + 2], dx 5984 0000757B A3[A48C] <1> mov word [load_data - LOADDATA2 + lsvFATSector + 0], ax 5985 <1> 5986 <1> .read_no_store: 5987 0000757E 53 <1> push bx 5988 0000757F 0306[BE8C] <1> add ax, [load_data - LOADDATA2 + bsBPB + bpbReservedSectors] 5989 00007583 83D200 <1> adc dx, 0 5990 00007586 8B1E[A88C] <1> mov bx, [load_data - LOADDATA2 + lsvFATSeg] 5991 0000758A E8B803 <1> call read_sector 5992 0000758D 5B <1> pop bx 5993 <1> @@: 5994 0000758E 8E06[A88C] <1> mov es, [load_data - LOADDATA2 + lsvFATSeg] 5995 00007592 31D2 <1> xor dx, dx 5996 00007594 268B07 <1> mov ax, [es:bx] 5997 <1> 5998 00007597 803E[968C]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 5999 0000759C 7404 <1> je @F 6000 0000759E 268B5702 <1> mov dx, [es:bx + 2] 6001 <1> @@: 6002 <1> .gotvalue: 6003 000075A2 07 <1> pop es 6004 <1> 6005 <1> ; INP: dx:ax = cluster value, 2-based 6006 <1> ; OUT: dx:ax -= 2 (makes it 0-based) 6007 <1> ; CY iff invalid cluster 6008 <1> check_clust: 6009 000075A3 80E60F <1> and dh, 0Fh 6010 000075A6 83E802 <1> sub ax, 2 6011 000075A9 83DA00 <1> sbb dx, 0 6012 <1> 6013 000075AC 803E[968C]10 <1> cmp byte [load_data - LOADDATA2 + ldFATType], 16 6014 000075B1 7707 <1> ja .fat32 6015 000075B3 740B <1> je .fat16 6016 <1> 6017 <1> .fat12: 6018 000075B5 3DF50F <1> cmp ax, 0FF7h - 2 6019 000075B8 EB09 <1> jmp short .common 6020 <1> 6021 <1> .fat32: 6022 000075BA 81FAFF0F <1> cmp dx, 0FFFh 6023 000075BE 7203 <1> jb @F ; CY here means valid ...- 6024 <1> 6025 <1> .fat16: 6026 000075C0 83F8F5 <1> cmp ax, 0FFF7h - 2 6027 <1> @@: ; -... or if NC first, CY here also 6028 <1> .common: 6029 000075C3 F5 <1> cmc ; NC if valid 6030 000075C4 720E <1> jc .ret 6031 000075C6 3B16[728C] <1> cmp dx, word [load_data - LOADDATA2 + ldMaxCluster + 2] 6032 000075CA 7504 <1> jne @F 6033 000075CC 3B06[708C] <1> cmp ax, word [load_data - LOADDATA2 + ldMaxCluster] 6034 <1> @@: 6035 000075D0 7701 <1> ja .ret_CY 6036 000075D2 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 6037 <1> .ret_CY: 6038 000075D3 F9 <1> stc 6039 <1> .ret: 6040 000075D4 C3 <1> retn 6041 <1> 6042 <1> 6043 <1> partition_table equ load_partition_table 6044 <1> partition_table.end equ load_partition_table.end 6045 <1> %define _SCANPTAB_PREFIX 6046 <1> %define _SCANPTAB_DEBUG4_PREFIX 6047 <1> %assign _PARTITION_TABLE_IN_CS 0 6048 <1> %define _BASE bp 6049 <1> %include "scanptab.asm" 6050 <2> 6051 <2> %if 0 6052 <2> 6053 <2> scanptab - Scan partition table 6054 <2> 2019 by C. Masloch 6055 <2> 6056 <2> Usage of the works is permitted provided that this 6057 <2> instrument is retained with the works, so that any entity 6058 <2> that uses the works is notified of this instrument. 6059 <2> 6060 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 6061 <2> 6062 <2> %endif 6063 <2> 6064 <2> ; _SCANPTAB_PREFIX = prefix for our variables and functions 6065 <2> ; _SCANPTAB_DEBUG4_PREFIX = prefix for d4 function calls 6066 <2> numdef PARTITION_TABLE_IN_CS, 1 6067 <2> numdef BOOTCMD_FAIL_ERROR, 1 6068 <2> gendef BASE, ss:bx 6069 <2> %ifidn _BASE, ss:bx 6070 <2> %elifidn _BASE, bp 6071 <2> %else 6072 <2> %error Invalid base 6073 <2> %endif 6074 <2> 6075 <2> 6076 <2> ; INP: byte [%load_unit] = unit to scan 6077 <2> ; cx = function to call for each partition 6078 <2> ; OUT: function called for each partition 6079 <2> ; CHG: di, si, ax, bx, (cx), dx, es 6080 <2> ; STT: ds => data segment (used for %load_* variables, unless bp-based) 6081 <2> ; 6082 <2> ; Note: Calls %read_partition_table (in this module), 6083 <2> ; which calls %read_ae_512_bytes, which calls 6084 <2> ; read_sector. The read_sector base must be 6085 <2> ; zero and the geometry must be initialised. 6086 <2> 6087 <2> ; Function in cx is called with: 6088 <2> ; INP: es:si -> partition table entry, 6089 <2> ; si = %partition_table .. %partition_table+48, 6090 <2> ; es = ss (if not _PARTITION_TABLE_IN_CS) 6091 <2> ; es = cs (if _PARTITION_TABLE_IN_CS) 6092 <2> ; byte [%load_current_partition] = partition number, 6093 <2> ; 0 for diskette (unpartitioned), 6094 <2> ; 1 to 4 for primary partitions, 6095 <2> ; 5+ for logical partitions 6096 <2> ; _BASE + di -> above part table metadata, 6097 <2> ; dword [_BASE + di - 4] = root (outermost extended position) 6098 <2> ; dword [_BASE + di - 8] = base (current table position) 6099 <2> ; dword [es:si + piStart] = local partition start 6100 <2> ; base + local start = absolute partition start 6101 <2> ; _BASE -> bp value (dummy if _BASE is not bp), 6102 <2> ; near return address of scan_partitions 6103 <2> ; CHG: ax, (cx), dx, bx (unless part of _BASE) 6104 <2> ; STT: ds => data segment (used for load_* variables, unless bp-based) 6105 <2> ; Note: preserves (cx), si, di, ds, es, (bp), _BASE 6106 <2> ; 6107 <2> ; Note: If the function returns to scan_partitions, 6108 <2> ; cx must be left as the function to call for 6109 <2> ; subsequent partitions afterwards. 6110 <2> ; Note: May load sp from _BASE then pop bp then return 6111 <2> ; near if the scan should stop after the call. 6112 <2> %[_SCANPTAB_PREFIX]scan_partitions: 6113 000075D5 8326[DC8F]00 <2> and word [ %[_SCANPTAB_PREFIX]load_partition_cycle], 0 6114 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6115 <2> d4 asciz "In scan_partitions",13,10 6116 <2> 6117 000075DA 55 <2> push bp 6118 <2> %ifidn _BASE, ss:bx 6119 <2> mov bx, sp 6120 <2> %elifidn _BASE, bp 6121 000075DB 89E5 <2> mov bp, sp 6122 <2> %endif 6123 000075DD 31FF <2> xor di, di 6124 000075DF 57 <2> push di ; [_BASE+di-2] 6125 000075E0 57 <2> push di ; [_BASE+di-4] 6126 000075E1 57 <2> push di ; [_BASE+di-6] 6127 000075E2 57 <2> push di ; [_BASE+di-8] 6128 <2> 6129 000075E3 803E[F08C]80 <2> cmp byte [ %[_SCANPTAB_PREFIX]load_unit], 80h 6130 000075E8 7325 <2> jae @F 6131 <2> 6132 000075EA 57 <2> push di 6133 000075EB 51 <2> push cx 6134 <2> %if _PARTITION_TABLE_IN_CS 6135 <2> push cs 6136 <2> %else 6137 000075EC 16 <2> push ss 6138 <2> %endif 6139 000075ED 07 <2> pop es 6140 000075EE BF[B08B] <2> mov di, %[_SCANPTAB_PREFIX]partition_table 6141 000075F1 31C0 <2> xor ax, ax 6142 000075F3 B92000 <2> mov cx, (4 * 16) >> 1 6143 000075F6 F3AB <2> rep stosw ; initialise fake partition table 6144 000075F8 59 <2> pop cx 6145 000075F9 5F <2> pop di 6146 000075FA BE[B08B] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 6147 <2> ; -> fake PARTINFO 6148 000075FD 26C60480 <2> mov byte [es:si + piBoot], 80h ; fake primary active 6149 00007601 26C64404FF <2> mov byte [es:si + piType], 0FFh ; fake a type 6150 00007606 C606[E38F]00 <2> mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], 0 ; special: 0 = diskette 6151 <2> ; piLength is 0, too 6152 0000760B FFD1 <2> call cx 6153 <2> 6154 0000760D EB66 <2> jmp %[_SCANPTAB_PREFIX]scan_logical.end 6155 <2> 6156 <2> 6157 <2> @@: 6158 0000760F 31C0 <2> xor ax, ax 6159 00007611 31D2 <2> xor dx, dx 6160 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6161 <2> d4 asciz "In scan_partitions (before first call to read_partition_table)",13,10 6162 00007613 E8DA00 <2> call %[_SCANPTAB_PREFIX]read_partition_table 6163 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6164 <2> d4 asciz "In scan_partitions (after first call to read_partition_table)",13,10 6165 00007616 BE[B08B] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 6166 00007619 8816[E38F] <2> mov byte [ %[_SCANPTAB_PREFIX]load_current_partition], dl ; = 0 6167 <2> .loop_primary_parts: 6168 0000761D FE06[E38F] <2> inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 6169 00007621 26807C0400 <2> cmp byte [es:si + piType], 0 6170 00007626 7402 <2> je .loop_primary_skip 6171 00007628 FFD1 <2> call cx ; es:si -> partition table entry 6172 <2> ; byte [load_current_partition] = which 6173 <2> .loop_primary_skip: 6174 0000762A 83C610 <2> add si, 16 6175 0000762D 81FE[F08B] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 6176 00007631 72EA <2> jb .loop_primary_parts 6177 <2> 6178 <2> %[_SCANPTAB_PREFIX]scan_logical: 6179 <2> .: 6180 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6181 <2> d4 asciz "In scan_logical.",13,10 6182 00007633 BE[B08B] <2> mov si, %[_SCANPTAB_PREFIX]partition_table 6183 <2> .loop: 6184 00007636 FF06[DC8F] <2> inc word [ %[_SCANPTAB_PREFIX]load_partition_cycle] 6185 0000763A 7503E9A500 <2> jz .got_partition_cycle 6186 <2> 6187 0000763F 268A4404 <2> mov al, [es:si + piType] 6188 <2> 6189 <2> %ifidn _BASE, bp 6190 00007643 31DB <2> xor bx, bx 6191 <2> %endif 6192 00007645 84C0 <2> test al, al 6193 00007647 741F <2> jz .next 6194 00007649 3C0F <2> cmp al, 0Fh ; extended partition (LBA aware) ? 6195 0000764B 742C <2> je .push ; yes --> 6196 0000764D 247F <2> and al, ~80h ; extended partition Linux (85h) ? 6197 0000764F 3C05 <2> cmp al, 05h ; or extended partition DOS (05h) ? 6198 00007651 7426 <2> je .push ; yes --> 6199 <2> 6200 <2> %ifidn _BASE, bp 6201 00007653 395BFE <2> cmp word [_BASE+di-2], bx 6202 00007656 7505 <2> jne .logical 6203 00007658 395BFC <2> cmp word [_BASE+di-4], bx 6204 <2> %else 6205 <2> cmp word [_BASE+di-2], 0 6206 <2> jne .logical 6207 <2> cmp word [_BASE+di-4], 0 6208 <2> %endif 6209 0000765B 740B <2> je .next 6210 <2> .logical: 6211 0000765D FE06[E38F] <2> inc byte [ %[_SCANPTAB_PREFIX]load_current_partition] 6212 00007661 7503E98400 <2> jz .error_too_many_partitions 6213 00007666 FFD1 <2> call cx 6214 <2> ; CHG: ax, (cx), dx, bx if _BASE = bp 6215 <2> ; preserve: (cx), si, di, ds, es, bx if _BASE = ss:bx 6216 <2> .next: 6217 00007668 83C610 <2> add si, 16 ; -> next partition table entry 6218 0000766B 81FE[F08B] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 6219 <2> ; was last? 6220 0000766F 72C5 <2> jb .loop ; no, loop --> 6221 00007671 85FF <2> test di, di ; still some on stack? 6222 00007673 7546 <2> jnz .pop ; yes, pop 6223 <2> .end: 6224 <2> %ifidn _BASE, bp 6225 00007675 89EC <2> mov sp, bp ; restore sp 6226 00007677 5D <2> pop bp 6227 <2> %else 6228 <2> mov sp, bx ; restore sp 6229 <2> pop ax ; (discard dummy bp value) 6230 <2> %endif 6231 00007678 C3 <2> retn ; and bye 6232 <2> 6233 <2> .push: 6234 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6235 <2> d4 asciz "In scan_logical.push",13,10 6236 <2> 6237 00007679 56 <2> push si 6238 <2> .push_check_empty_next: 6239 0000767A 83C610 <2> add si, 16 ; -> next 6240 0000767D 81FE[F08B] <2> cmp si, %[_SCANPTAB_PREFIX]partition_table.end 6241 <2> ; at end? 6242 00007681 734A <2> jae .replace ; yes, no other partitions found, replace --> 6243 00007683 26807C0400 <2> cmp byte [es:si + piType], 0 ; is this a partition? 6244 00007688 74F0 <2> je .push_check_empty_next ; no, check next --> 6245 <2> ; found a partition after this, do push 6246 <2> ; (possibly logical or another extended) 6247 <2> .push_check_is_not_empty: 6248 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6249 <2> d4 asciz "In scan_logical.push_check_is_not_empty",13,10 6250 0000768A 5E <2> pop si ; restore -> partition table entry 6251 0000768B 56 <2> push si ; stored at word [_BASE+di-10] 6252 0000768C 83EF0A <2> sub di, 10 6253 0000768F FF7308 <2> push word [_BASE+di+10-2] 6254 00007692 FF7306 <2> push word [_BASE+di+10-4] ; copy root 6255 <2> 6256 00007695 268B4408 <2> mov ax, word [es:si + piStart] 6257 00007699 268B540A <2> mov dx, word [es:si + piStart + 2] ; get extended partition offset 6258 0000769D 0343FC <2> add ax, word [_BASE+di-4] 6259 000076A0 1353FE <2> adc dx, word [_BASE+di-2] ; add in root to get absolute sector number 6260 <2> 6261 000076A3 52 <2> push dx 6262 000076A4 50 <2> push ax ; new base 6263 <2> 6264 <2> .replace_common: 6265 <2> %ifidn _BASE, bp 6266 000076A5 395BFE <2> cmp word [_BASE+di-2], bx ; have a (nonzero) root? 6267 000076A8 750B <2> jne .have_root 6268 000076AA 395BFC <2> cmp word [_BASE+di-4], bx 6269 <2> %else 6270 <2> cmp word [_BASE+di-2], 0 ; have a (nonzero) root? 6271 <2> jne .have_root 6272 <2> cmp word [_BASE+di-4], 0 6273 <2> %endif 6274 000076AD 7506 <2> jne .have_root ; yes --> 6275 <2> 6276 000076AF 8953FE <2> mov word [_BASE+di-2], dx 6277 000076B2 8943FC <2> mov word [_BASE+di-4], ax ; set root 6278 <2> .have_root: 6279 <2> 6280 000076B5 E83800 <2> call %[_SCANPTAB_PREFIX]read_partition_table 6281 000076B8 E978FF <2> jmp . 6282 <2> 6283 <2> .pop: 6284 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6285 <2> d4 asciz "In scan_logical.pop",13,10 6286 <2> 6287 000076BB 83C70A <2> add di, 10 6288 000076BE 83C408 <2> add sp, 8 6289 000076C1 5E <2> pop si 6290 <2> 6291 000076C2 8B43F8 <2> mov ax, word [_BASE+di-8] 6292 000076C5 8B53FA <2> mov dx, word [_BASE+di-6] 6293 000076C8 E82500 <2> call %[_SCANPTAB_PREFIX]read_partition_table 6294 000076CB EB9B <2> jmp .next 6295 <2> 6296 <2> .replace: 6297 <2> d4 call %[_SCANPTAB_DEBUG4_PREFIX]d4message 6298 <2> d4 asciz "In scan_logical.replace",13,10 6299 <2> 6300 000076CD 5E <2> pop si ; (discard) 6301 000076CE 268B4408 <2> mov ax, word [es:si + piStart] 6302 000076D2 268B540A <2> mov dx, word [es:si + piStart + 2] ; get extended partition offset 6303 000076D6 0343FC <2> add ax, word [_BASE+di - 4] 6304 000076D9 1353FE <2> adc dx, word [_BASE+di - 2] ; add in root 6305 000076DC 8943F8 <2> mov word [_BASE+di - 8], ax 6306 000076DF 8953FA <2> mov word [_BASE+di - 6], dx ; set base 6307 <2> 6308 000076E2 EBC1 <2> jmp .replace_common 6309 <2> 6310 <2> 6311 <2> %if _BOOTCMD_FAIL_ERROR 6312 <2> .got_partition_cycle: 6313 000076E4 BA[5461] <2> mov dx, msg.boot_partition_cycle_error 6314 000076E7 E945ED <2> jmp bootcmd.fail 6315 <2> 6316 <2> .error_too_many_partitions: 6317 000076EA BA[3161] <2> mov dx, msg.boot_too_many_partitions_error 6318 000076ED E93FED <2> jmp bootcmd.fail 6319 <2> %endif 6320 <2> 6321 <2> 6322 <2> ; if _PARTITION_TABLE_IN_CS: 6323 <2> ; INP: dx:ax = partition table sector to read 6324 <2> ; CHG: ax, dx 6325 <2> ; OUT: es = cs 6326 <2> ; 64 bytes [es:partition_table] = partition table 6327 <2> ; does not return if error 6328 <2> 6329 <2> ; else: 6330 <2> ; INP: dx:ax = partition table sector to read 6331 <2> ; CHG: ax, dx 6332 <2> ; OUT: es = ss 6333 <2> ; 64 bytes [es:partition_table] = partition table 6334 <2> ; does not return if error 6335 <2> %[_SCANPTAB_PREFIX]read_partition_table: 6336 000076F0 53 <2> push bx 6337 <2> %ifidn _BASE, bp 6338 000076F1 8B1E[F209] <2> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 6339 <2> %else 6340 <2> mov bx, word [bp + ldSectorSeg] 6341 <2> %endif 6342 000076F5 E83B02 <2> call %[_SCANPTAB_PREFIX]read_ae_512_bytes 6343 000076F8 5B <2> pop bx 6344 000076F9 26813EFE0155AA <2> cmp word [es:510], 0AA55h 6345 00007700 7518 <2> jne .signature_fail 6346 00007702 1E <2> push ds 6347 00007703 57 <2> push di 6348 00007704 56 <2> push si 6349 00007705 51 <2> push cx 6350 00007706 06 <2> push es 6351 00007707 1F <2> pop ds 6352 00007708 BEBE01 <2> mov si, 510 - 4*16 ; ds:si -> partition table in sectorseg 6353 <2> %if _PARTITION_TABLE_IN_CS 6354 <2> push cs 6355 <2> %else 6356 0000770B 16 <2> push ss 6357 <2> %endif 6358 0000770C 07 <2> pop es 6359 0000770D BF[B08B] <2> mov di, %[_SCANPTAB_PREFIX]partition_table 6360 <2> ; es:di -> cs:%[_SCANPTAB_PREFIX]partition_table 6361 00007710 B92000 <2> mov cx, 4*16 / 2 6362 00007713 F3A5 <2> rep movsw 6363 00007715 59 <2> pop cx 6364 00007716 5E <2> pop si 6365 00007717 5F <2> pop di 6366 00007718 1F <2> pop ds 6367 00007719 C3 <2> retn 6368 <2> 6369 <2> 6370 <2> %if _BOOTCMD_FAIL_ERROR 6371 <2> .signature_fail: 6372 0000771A BA[4060] <2> mov dx, msg.bootfail_sig_parttable 6373 0000771D E90FED <2> jmp bootcmd.fail 6374 <2> %endif 6050 <1> 6051 <1> 6052 <1> ; INP: al = first character 6053 <1> ; si -> next 6054 <1> ; OUT: doesn't return if error 6055 <1> ; bx:dx = number read 6056 <1> ; al = character after the number 6057 <1> ; si -> next 6058 <1> ; CHG: cx, ax, di 6059 <1> boot_get_decimal_literal: 6060 00007720 BA0A00 <1> mov dx, 10 ; set base: decimal 6061 <1> %if 1 6062 00007723 B93940 <1> mov cx, '9' | (('A'-10-1 + 10) << 8) 6063 <1> %else 6064 <1> mov cl, dl 6065 <1> add cl, '0'-1 6066 <1> cmp cl, '9' 6067 <1> jbe .lit_basebelow11 6068 <1> mov cl, '9' 6069 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 6070 <1> mov ch, dl 6071 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 6072 <1> %endif 6073 00007726 EB06 <1> jmp @F 6074 <1> 6075 <1> 6076 <1> boot_get_hexadecimal_literal: 6077 00007728 BA1000 <1> mov dx, 16 ; set base: hexadecimal 6078 <1> %if 1 6079 0000772B B93946 <1> mov cx, '9' | (('A'-10-1 + 16) << 8) 6080 <1> %else 6081 <1> mov cl, dl 6082 <1> add cl, '0'-1 6083 <1> cmp cl, '9' 6084 <1> jbe .lit_basebelow11 6085 <1> mov cl, '9' 6086 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 6087 <1> mov ch, dl 6088 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 6089 <1> %endif 6090 <1> 6091 <1> @@: 6092 0000772E B400 <1> mov ah, 0 6093 00007730 31DB <1> xor bx, bx 6094 00007732 89D7 <1> mov di, dx ; di = base 6095 <1> 6096 00007734 E85640 <1> call getexpression.lit_isdigit? ; first character must be a digit 6097 00007737 7241 <1> jc .err2 6098 00007739 31D2 <1> xor dx, dx ; initialize value 6099 <1> .lit_loopdigit: 6100 0000773B 3C5F <1> cmp al, '_' 6101 0000773D 7432 <1> je .lit_skip 6102 0000773F E84B40 <1> call getexpression.lit_isdigit? ; was last character ? 6103 00007742 7230 <1> jc .lit_end ; yes --> 6104 00007744 E8FC14 <1> call uppercase 6105 00007747 2C30 <1> sub al, '0' 6106 00007749 3C09 <1> cmp al, 9 ; was decimal digit ? 6107 0000774B 7602 <1> jbe .lit_decimaldigit ; yes --> 6108 0000774D 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 6109 <1> .lit_decimaldigit: 6110 0000774F 50 <1> push ax 6111 00007750 89D0 <1> mov ax, dx 6112 00007752 53 <1> push bx 6113 00007753 F7E7 <1> mul di ; multiply low word with base 6114 00007755 89D3 <1> mov bx, dx 6115 00007757 89C2 <1> mov dx, ax 6116 00007759 58 <1> pop ax 6117 0000775A 52 <1> push dx 6118 0000775B F7E7 <1> mul di ; multiply high word with base 6119 0000775D 85D2 <1> test dx, dx 6120 0000775F 5A <1> pop dx 6121 00007760 7518 <1> jnz .err2 ; overflow --> 6122 00007762 01C3 <1> add bx, ax ; add them 6123 00007764 58 <1> pop ax 6124 00007765 7213 <1> jc .err2 ; overflow --> 6125 00007767 00C2 <1> add dl, al ; add in the new digit 6126 00007769 80D600 <1> adc dh, 0 6127 0000776C 83D300 <1> adc bx, byte 0 6128 0000776F 7209 <1> jc .err2 ; overflow --> 6129 <1> 6130 <1> .lit_skip: 6131 00007771 AC <1> lodsb 6132 00007772 EBC7 <1> jmp short .lit_loopdigit 6133 <1> 6134 <1> .lit_end: 6135 00007774 E89E32 <1> call isseparator? ; after the number, there must be a separator 6136 00007777 7501 <1> jne .err2 ; none here --> 6137 00007779 C3 <1> retn 6138 <1> 6139 <1> .err2: 6140 0000777A E9952D <1> jmp error 6141 <1> 6142 <1> 6143 <1> query_geometry: 6144 0000777D E8938D <1> call guard_auxbuff 6145 00007780 8A16[F08C] <1> mov dl, [load_unit] 6146 <1> ; test dl, dl ; floppy? 6147 <1> ; jns @F ; don't attempt query, might fail --> 6148 <1> ; Note that while the original PC BIOS doesn't support this function 6149 <1> ; (for its diskettes), it does properly return the error code 01h. 6150 <1> ; https://sites.google.com/site/pcdosretro/ibmpcbios (IBM PC version 1) 6151 00007784 B408 <1> mov ah, 08h 6152 00007786 31C9 <1> xor cx, cx ; initialise cl to 0 6153 00007788 890E[CA8C] <1> mov [load_heads], cx 6154 0000778C 890E[C88C] <1> mov [load_sectors], cx 6155 00007790 F9 <1> stc ; initialise to CY 6156 00007791 E83701 <1> call .int13_retry ; query drive geometry 6157 00007794 720C <1> jc .try_bootsector ; apparently failed --> 6158 00007796 88F2 <1> mov dl, dh 6159 00007798 B600 <1> mov dh, 0 ; dx = maximum head number 6160 0000779A 42 <1> inc dx ; dx = number of heads (H is 0-based) 6161 0000779B 89C8 <1> mov ax, cx ; ax & 3Fh = maximum sector number 6162 0000779D 83E03F <1> and ax, 3Fh ; get sectors (number of sectors, S is 1-based) 6163 000077A0 7523 <1> jnz .got_sectors_heads ; valid (S is 1-based), use these --> 6164 <1> ; zero = invalid 6165 <1> .try_bootsector: 6166 000077A2 8E06[F209] <1> mov es, word [auxbuff_segorsel] ; es => auxbuff 6167 000077A6 31DB <1> xor bx, bx ; es:bx -> auxbuff 6168 000077A8 B80102 <1> mov ax, 0201h ; read sector, 1 sector 6169 000077AB B90100 <1> mov cx, 1 ; sector 1 (1-based!), cylinder 0 (0-based) 6170 000077AE B600 <1> mov dh, 0 ; head 0 (0-based) 6171 000077B0 8A16[F08C] <1> mov dl, [load_unit] 6172 000077B4 F9 <1> stc 6173 000077B5 E81301 <1> call .int13_retry 6174 000077B8 7303E92B01 <1> jc .access_error 6175 <1> 6176 <1> ; note: the smallest supported sector size, 32 bytes, 6177 <1> ; does contain these entries (offset 18h and 1Ah in sector) 6178 <1> ; within the first BPB sector. 6179 000077BD 268B4718 <1> mov ax, word [es:bx + bsBPB + bpbCHSSectors] 6180 000077C1 268B571A <1> mov dx, word [es:bx + bsBPB + bpbCHSHeads] 6181 <1> 6182 <1> .got_sectors_heads: 6183 000077C5 A3[C88C] <1> mov word [load_sectors], ax 6184 000077C8 8916[CA8C] <1> mov word [load_heads], dx 6185 <1> 6186 000077CC 85C0 <1> test ax, ax 6187 000077CE 7503E93B01 <1> jz .invalid_sectors 6188 000077D3 83F83F <1> cmp ax, 63 6189 000077D6 7603E93301 <1> ja .invalid_sectors 6190 000077DB 85D2 <1> test dx, dx 6191 000077DD 7503E93301 <1> jz .invalid_heads 6192 000077E2 81FA0001 <1> cmp dx, 100h 6193 000077E6 7603E92A01 <1> ja .invalid_heads 6194 <1> 6195 000077EB 8E06[F209] <1> mov es, word [auxbuff_segorsel] ; es => auxbuff 6196 000077EF 31DB <1> xor bx, bx ; es:bx -> auxbuff 6197 000077F1 31C0 <1> xor ax, ax 6198 <1> 6199 <1> %if _AUXBUFFSIZE < 8192+2 6200 <1> %error Expecting to use auxbuff as sector size detection buffer 6201 <1> %endif 6202 <1> 6203 <1> d5 call d5dumpregs 6204 <1> d5 call d5message 6205 <1> d5 asciz 13,10,"In query_geometry 0",13,10 6206 <1> 6207 000077F3 89DF <1> mov di, bx 6208 000077F5 B90110 <1> mov cx, (8192 + 2) >> 1 6209 <1> ; es:bx -> auxbuff, es:di = same 6210 000077F8 F3AB <1> rep stosw ; fill buffer, di -> behind (auxbuff+8192+2) 6211 000077FA B80102 <1> mov ax, 0201h ; read sector, 1 sector 6212 000077FD 41 <1> inc cx ; sector 1 (1-based!), cylinder 0 (0-based) 6213 000077FE B600 <1> mov dh, 0 ; head 0 (0-based) 6214 00007800 8A16[F08C] <1> mov dl, [load_unit] 6215 00007804 F9 <1> stc 6216 00007805 E8C300 <1> call .int13_retry 6217 00007808 7303E9DB00 <1> jc .access_error 6218 <1> 6219 0000780D FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 6220 0000780E AF <1> scasw ; -> auxbuff+8192 (at last word to sca) 6221 <1> d5 call d5dumpregs 6222 <1> d5 call d5message 6223 <1> d5 asciz 13,10,"In query_geometry 1",13,10 6224 0000780F B90110 <1> mov cx, (8192 + 2) >> 1 6225 00007812 31C0 <1> xor ax, ax 6226 00007814 F3AF <1> repe scasw 6227 00007816 83C704 <1> add di, 4 ; di -> first differing byte (from top) 6228 00007819 FC <1> cld 6229 0000781A 57 <1> push di 6230 <1> 6231 0000781B 89DF <1> mov di, bx 6232 0000781D B90110 <1> mov cx, (8192 + 2) >> 1 6233 00007820 48 <1> dec ax ; = FFFFh 6234 00007821 F3AB <1> rep stosw 6235 <1> 6236 00007823 B80102 <1> mov ax, 0201h 6237 00007826 41 <1> inc cx 6238 00007827 B600 <1> mov dh, 0 6239 00007829 8A16[F08C] <1> mov dl, [load_unit] 6240 0000782D F9 <1> stc 6241 0000782E E89A00 <1> call .int13_retry 6242 00007831 7303E9B200 <1> jc .access_error 6243 <1> 6244 00007836 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 6245 00007837 AF <1> scasw ; di -> auxbuff+8192 (last word to sca) 6246 <1> d5 call d5dumpregs 6247 <1> d5 call d5message 6248 <1> d5 asciz 13,10,"In query_geometry 2",13,10 6249 00007838 5A <1> pop dx 6250 00007839 B8FFFF <1> mov ax, -1 6251 0000783C B90110 <1> mov cx, (8192 + 2) >> 1 6252 0000783F F3AF <1> repe scasw 6253 <1> %if 0 6254 <1> AAAB 6255 <1> ^ 6256 <1> sca B, match 6257 <1> ^ 6258 <1> sca B, mismatch 6259 <1> ^ 6260 <1> stop 6261 <1> %endif 6262 00007841 83C704 <1> add di, 4 ; di -> first differing byte (from top) 6263 00007844 FC <1> cld 6264 <1> 6265 <1> %if 0 6266 <1> 0000000000000 6267 <1> AAAAAAAA00000 6268 <1> ^ 6269 <1> FFFFFFFFFFFFF 6270 <1> AAAAAAAA00FFF 6271 <1> ^ 6272 <1> %endif 6273 00007845 39FA <1> cmp dx, di ; choose the higher one 6274 00007847 7302 <1> jae @F 6275 00007849 89FA <1> mov dx, di 6276 <1> @@: 6277 0000784B 29DA <1> sub dx, bx ; dx = sector size 6278 <1> 6279 <1> d5 call d5dumpregs 6280 <1> d5 call d5message 6281 <1> d5 asciz 13,10,"In query_geometry 3",13,10 6282 <1> 6283 0000784D 81FA0220 <1> cmp dx, 8192 + 2 6284 00007851 7203E9A300 <1> jae .sector_too_large 6285 00007856 B82000 <1> mov ax, 32 6286 00007859 39C2 <1> cmp dx, ax 6287 0000785B 7303E9A000 <1> jb .sector_too_small 6288 <1> @@: 6289 00007860 39C2 <1> cmp dx, ax 6290 00007862 740C <1> je .got_match 6291 00007864 3D0020 <1> cmp ax, 8192 6292 00007867 7203E99B00 <1> jae .sector_not_power 6293 0000786C D1E0 <1> shl ax, 1 6294 0000786E EBF0 <1> jmp @B 6295 <1> 6296 <1> .got_match: 6297 00007870 A3[BB8C] <1> mov word [load_sectorsize], ax 6298 00007873 B104 <1> mov cl, 4 6299 00007875 D3E8 <1> shr ax, cl 6300 00007877 A3[9A8C] <1> mov word [load_sectorsizepara], ax 6301 <1> 6302 0000787A C606[978C]00 <1> mov byte [load_ldflags], 0 6303 0000787F 8A16[F08C] <1> mov dl, [load_unit] 6304 00007883 31DB <1> xor bx, bx 6305 00007885 88D3 <1> mov bl, dl 6306 00007887 F687[B08A]01 <1> testopt [load_unit_flags + bx], lufForceCHS 6307 0000788C 7519 <1> jnz .no_lba 6308 0000788E B441 <1> mov ah, 41h 6309 00007890 BBAA55 <1> mov bx, 55AAh 6310 00007893 F9 <1> stc 6311 00007894 CD13 <1> int 13h ; 13.41.bx=55AA extensions installation check 6312 00007896 720F <1> jc .no_lba 6313 00007898 81FB55AA <1> cmp bx, 0AA55h 6314 0000789C 7509 <1> jne .no_lba 6315 0000789E F6C101 <1> test cl, 1 ; support bitmap bit 0 6316 000078A1 7404 <1> jz .no_lba 6317 <1> 6318 <1> %if ldfHasLBA != 1 6319 <1> %error Assuming ldfHasLBA is 1 6320 <1> %endif 6321 000078A3 FE06[978C] <1> inc byte [load_ldflags] 6322 <1> .no_lba: 6323 <1> 6324 000078A7 A1[F209] <1> mov ax, word [auxbuff_segorsel] ; ax => auxbuff 6325 000078AA 89C2 <1> mov dx, ax 6326 000078AC 81C2FF01 <1> add dx, (8192 - 16) >> 4 6327 000078B0 89C3 <1> mov bx, ax 6328 000078B2 89D1 <1> mov cx, dx 6329 000078B4 81E300F0 <1> and bx, 0F000h 6330 000078B8 81E100F0 <1> and cx, 0F000h 6331 000078BC 39D9 <1> cmp cx, bx 6332 000078BE 7504 <1> jne @F 6333 000078C0 A3[948C] <1> mov word [load_sectorseg], ax 6334 000078C3 C3 <1> retn 6335 <1> 6336 <1> @@: 6337 000078C4 BA[4463] <1> mov dx, msg.boot_auxbuff_crossing 6338 000078C7 B020 <1> mov al, 20h 6339 000078C9 EB4F <1> jmp .error_common_j 6340 <1> 6341 <1> 6342 <1> .int13_retry: 6343 000078CB 9C <1> pushf 6344 000078CC 50 <1> push ax 6345 000078CD CD13 <1> int 13h ; first try 6346 000078CF 730B <1> jnc @F ; NC, success on first attempt --> 6347 <1> 6348 <1> ; reset drive 6349 000078D1 31C0 <1> xor ax, ax 6350 000078D3 CD13 <1> int 13h 6351 000078D5 7205 <1> jc @F ; CY, reset failed, error in ah --> 6352 <1> 6353 <1> ; try read again 6354 000078D7 58 <1> pop ax ; restore function number 6355 000078D8 9D <1> popf ; CF 6356 000078D9 CD13 <1> int 13h ; retry, CF error status, ah error number 6357 000078DB C3 <1> retn 6358 <1> 6359 <1> @@: ; NC or CY, stack has function number 6360 000078DC 44 <1> inc sp 6361 000078DD 44 <1> inc sp 6362 000078DE 44 <1> inc sp 6363 000078DF 44 <1> inc sp ; discard two words on stack, preserve CF 6364 000078E0 C3 <1> retn 6365 <1> 6366 <1> 6367 <1> .out_of_memory_error: 6368 000078E1 BA[2061] <1> mov dx, msg.boot_out_of_memory_error 6369 000078E4 B021 <1> mov al, 21h 6370 000078E6 EB32 <1> jmp .error_common_j 6371 <1> .access_error: 6372 <1> %if _INPUT_FILE_BOOT 6373 000078E8 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 6374 000078ED 7403E9BD17 <1> jnz if_exists_not_found 6375 <1> %endif 6376 000078F2 BA[8D61] <1> mov dx, msg.boot_access_error 6377 000078F5 B022 <1> mov al, 22h 6378 000078F7 EB21 <1> jmp .error_common_j 6379 <1> .sector_too_large: 6380 000078F9 BA[9B61] <1> mov dx, msg.boot_sector_too_large 6381 000078FC B023 <1> mov al, 23h 6382 000078FE EB1A <1> jmp .error_common_j 6383 <1> .sector_too_small: 6384 00007900 BA[C161] <1> mov dx, msg.boot_sector_too_small 6385 00007903 B024 <1> mov al, 24h 6386 00007905 EB13 <1> jmp .error_common_j 6387 <1> .sector_not_power: 6388 00007907 BA[E961] <1> mov dx, msg.boot_sector_not_power 6389 0000790A B025 <1> mov al, 25h 6390 0000790C EB0C <1> jmp .error_common_j 6391 <1> .invalid_sectors: 6392 0000790E BA[0B62] <1> mov dx, msg.boot_invalid_sectors 6393 00007911 B026 <1> mov al, 26h 6394 00007913 EB05 <1> jmp .error_common_j 6395 <1> .invalid_heads: 6396 00007915 BA[2762] <1> mov dx, msg.boot_invalid_heads 6397 00007918 B027 <1> mov al, 27h 6398 <1> .error_common_j: 6399 0000791A B402 <1> mov ah, 02h 6400 0000791C E83A2C <1> call setrc 6401 0000791F E90DEB <1> jmp bootcmd.fail 6402 <1> 6403 <1> 6404 <1> ; INP: dx:ax = first sector 6405 <1> ; bx:0 -> buffer 6406 <1> ; OUT: dx:ax = sector number after last read 6407 <1> ; es = input bx 6408 <1> ; bx:0 -> buffer after last written 6409 <1> ; CHG: - 6410 <1> ; STT: ds = ss 6411 <1> read_ae_1536_bytes: 6412 00007922 51 <1> push cx 6413 00007923 53 <1> push bx 6414 00007924 B90006 <1> mov cx, 1536 6415 <1> .loop: 6416 00007927 E81B00 <1> call read_sector 6417 0000792A 2B0E[BB8C] <1> sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 6418 0000792E 77F7 <1> ja .loop 6419 00007930 07 <1> pop es 6420 00007931 59 <1> pop cx 6421 00007932 C3 <1> retn 6422 <1> 6423 <1> ; INP: dx:ax = first sector 6424 <1> ; bx:0 -> buffer 6425 <1> ; OUT: dx:ax = sector number after last read 6426 <1> ; es = input bx 6427 <1> ; bx:0 -> buffer after last written 6428 <1> ; CHG: - 6429 <1> ; STT: ds = ss 6430 <1> read_ae_512_bytes: 6431 00007933 51 <1> push cx 6432 00007934 53 <1> push bx 6433 00007935 B90002 <1> mov cx, 512 6434 <1> .loop: 6435 00007938 E80A00 <1> call read_sector 6436 0000793B 2B0E[BB8C] <1> sub cx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 6437 0000793F 77F7 <1> ja .loop 6438 00007941 07 <1> pop es 6439 00007942 59 <1> pop cx 6440 00007943 C3 <1> retn 6441 <1> 6442 <1> 6443 <1> ; Write a sector using Int13.03 or Int13.43 6444 <1> ; 6445 <1> ; Protocol as for read_sector 6446 <1> write_sector: 6447 00007944 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 6448 <1> 6449 <1> ; Read a sector using Int13.02 or Int13.42 6450 <1> ; 6451 <1> ; INP: dx:ax = sector number (within partition) 6452 <1> ; bx:0-> buffer 6453 <1> ; (_LBA) ds = ss 6454 <1> ; dword[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors] 6455 <1> ; = base sector number (dx:ax is added to this to get 6456 <1> ; the absolute sector number in the selected unit.) 6457 <1> ; OUT: If unable to read, 6458 <1> ; ! jumps to error instead of returning 6459 <1> ; If sector has been read, 6460 <1> ; dx:ax = next sector number (has been incremented) 6461 <1> ; bx:0-> next buffer (bx = es+word[load_sectorsizepara]) 6462 <1> ; es = input bx 6463 <1> ; CHG: - 6464 <1> ; 6465 <1> ; Note: If error 09h (data boundary error) is returned, 6466 <1> ; the read is done into the load_sectorseg buffer, 6467 <1> ; then copied into the user buffer. 6468 <1> read_sector: 6469 00007945 F9 <1> stc 6470 <1> 6471 <1> read_sector_CY_or_write_sector_NC: 6472 <1> lframe near 6473 00007946 5589E5 <1> lenter 6474 <1> lvar word, is_read_bit0 6475 00007949 9C <1> pushf 6476 <1> 6477 <1> .err: equ bootcmd.fail_read 6478 <1> d5 call d5dumpregs 6479 <1> d5 call d5message 6480 <1> d5 asciz 13,10,"In read_sector",13,10 6481 <1> 6482 0000794A 52 <1> push dx 6483 0000794B 51 <1> push cx 6484 0000794C 50 <1> push ax 6485 0000794D 56 <1> push si 6486 <1> 6487 0000794E 53 <1> push bx 6488 <1> 6489 <1> ; DX:AX==LBA sector number 6490 <1> ; add partition start (= number of hidden sectors) 6491 0000794F 0306[CC8C] <1> add ax,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 0] 6492 00007953 1316[CE8C] <1> adc dx,[load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2] 6493 <1> 6494 00007957 19F6 <1> sbb si, si ; -1 if was CY, 0 else 6495 00007959 F7DE <1> neg si ; 1 if was CY, 0 else 6496 0000795B 31C9 <1> xor cx, cx 6497 0000795D 51 <1> push cx 6498 0000795E 56 <1> push si ; bit 32 = 1 if operating in 33-bit space 6499 0000795F 52 <1> push dx 6500 00007960 50 <1> push ax ; qword sector number (lpSector) 6501 00007961 53 <1> push bx 6502 00007962 51 <1> push cx ; bx:0 -> buffer (lpBuffer) 6503 00007963 41 <1> inc cx 6504 00007964 51 <1> push cx ; word number of sectors to read (lpCount) 6505 00007965 B110 <1> mov cl, 10h 6506 00007967 51 <1> push cx ; word size of disk address packet (lpSize) 6507 00007968 89E6 <1> mov si, sp ; ds:si -> disk address packet (on stack) 6508 <1> 6509 0000796A F606[978C]01 <1> test byte [load_data - LOADDATA2 + ldFlags], ldfHasLBA 6510 0000796F 7503E9BB00 <1> jz .no_lba 6511 <1> 6512 <1> d5 call d5message 6513 <1> d5 asciz "In read_sector.lba",13,10 6514 <1> 6515 00007974 8A16[F08C] <1> mov dl, byte [load_unit] 6516 00007978 E89A01 <1> call .set_ah_function_42_or_43 6517 0000797B CD13 <1> int 13h ; 13.42 extensions read 6518 0000797D 7203E9A600 <1> jnc .lba_done 6519 <1> 6520 00007982 31C0 <1> xor ax, ax 6521 00007984 CD13 <1> int 13h 6522 00007986 7303E992EA <1> jc .lba_error 6523 <1> 6524 <1> ; have to reset the LBAPACKET's lpCount, as the handler may 6525 <1> ; set it to "the number of blocks successfully transferred". 6526 <1> ; (in any case, the high byte is still zero.) 6527 0000798B C6440201 <1> mov byte [si + lpCount], 1 6528 <1> 6529 0000798F E88301 <1> call .set_ah_function_42_or_43 6530 00007992 CD13 <1> int 13h 6531 00007994 7203E98F00 <1> jnc .lba_done 6532 <1> 6533 00007999 80FC09 <1> cmp ah, 9 ; data boundary error? 6534 0000799C 7403E97CEA <1> jne .lba_error 6535 <1> 6536 <1> .lba_sectorseg: 6537 <1> d4 call d4dumpregs 6538 <1> d4 call d4message 6539 <1> d4 asciz 13,10,"In read_sector.lba_sectorseg",13,10 6540 <1> 6541 000079A1 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6542 000079A5 7542 <1> jnz .lba_sectorseg_read 6543 <1> 6544 <1> .lba_sectorseg_write: 6545 000079A7 1E <1> push ds 6546 000079A8 56 <1> push si 6547 000079A9 06 <1> push es 6548 000079AA 57 <1> push di 6549 000079AB 8B0E[BB8C] <1> mov cx, word [load_sectorsize] 6550 000079AF 8E06[948C] <1> mov es, word [load_sectorseg] ; => sectorseg 6551 <1> ; lds si, [si + lpBuffer + 0] 6552 000079B3 8E5C06 <1> mov ds, word [si + lpBuffer + 2]; => user buffer 6553 000079B6 31F6 <1> xor si, si 6554 000079B8 31FF <1> xor di, di 6555 000079BA F3A4 <1> rep movsb ; copy data into sectorseg 6556 000079BC 5F <1> pop di 6557 000079BD 07 <1> pop es 6558 000079BE 5E <1> pop si 6559 000079BF 1F <1> pop ds 6560 <1> 6561 000079C0 FF36[948C] <1> push word [load_sectorseg] 6562 000079C4 8F4406 <1> pop word [si + lpBuffer + 2] ; => sectorseg 6563 <1> ; and word [si + lpBuffer + 0], byte 0 6564 <1> 6565 000079C7 C6440201 <1> mov byte [si + lpCount], 1 6566 000079CB B443 <1> mov ah, 43h 6567 000079CD CD13 <1> int 13h 6568 000079CF 7316 <1> jnc @F 6569 <1> 6570 000079D1 31C0 <1> xor ax, ax 6571 000079D3 CD13 <1> int 13h 6572 000079D5 7303E943EA <1> jc .lba_error 6573 <1> 6574 000079DA C6440201 <1> mov byte [si + lpCount], 1 6575 000079DE B443 <1> mov ah, 43h 6576 000079E0 CD13 <1> int 13h 6577 000079E2 7303E936EA <1> jc .lba_error 6578 <1> @@: 6579 000079E7 EB3F <1> jmp .lba_done 6580 <1> 6581 <1> 6582 <1> .lba_sectorseg_read: 6583 <1> ; the offset part of the pointer is already zero! 6584 <1> ; push word [si + lpBuffer + 0] 6585 000079E9 FF7406 <1> push word [si + lpBuffer + 2] ; user buffer 6586 000079EC FF36[948C] <1> push word [load_sectorseg] 6587 000079F0 8F4406 <1> pop word [si + lpBuffer + 2] 6588 <1> ; and word [si + lpBuffer + 0], byte 0 6589 <1> 6590 000079F3 C6440201 <1> mov byte [si + lpCount], 1 6591 000079F7 E81B01 <1> call .set_ah_function_42_or_43 6592 000079FA CD13 <1> int 13h 6593 000079FC 7317 <1> jnc .lba_sectorseg_done 6594 <1> 6595 000079FE 31C0 <1> xor ax, ax 6596 00007A00 CD13 <1> int 13h 6597 00007A02 7303E916EA <1> jc .lba_error 6598 <1> 6599 00007A07 C6440201 <1> mov byte [si + lpCount], 1 6600 00007A0B E80701 <1> call .set_ah_function_42_or_43 6601 00007A0E CD13 <1> int 13h 6602 00007A10 7303E908EA <1> jc .lba_error 6603 <1> .lba_sectorseg_done: 6604 <1> 6605 00007A15 31F6 <1> xor si, si 6606 00007A17 8E1E[948C] <1> mov ds, word [load_sectorseg] 6607 00007A1B 07 <1> pop es 6608 <1> ; pop cx 6609 00007A1C 57 <1> push di 6610 <1> ; mov di, cx 6611 00007A1D 31FF <1> xor di, di 6612 00007A1F 8B0E[BB8C] <1> mov cx, word [load_sectorsize] 6613 00007A23 F3A4 <1> rep movsb 6614 00007A25 5F <1> pop di 6615 <1> 6616 00007A26 16 <1> push ss 6617 00007A27 1F <1> pop ds 6618 <1> .lba_done: 6619 00007A28 83C410 <1> add sp, 10h 6620 00007A2B 5B <1> pop bx 6621 00007A2C E9D400 <1> jmp .chs_done 6622 <1> 6623 <1> .lba_error: equ .err 6624 <1> 6625 <1> .no_lba: 6626 00007A2F 83C408 <1> add sp, 8 6627 00007A32 58 <1> pop ax 6628 00007A33 5A <1> pop dx 6629 00007A34 5E <1> pop si 6630 00007A35 59 <1> pop cx 6631 00007A36 85F6 <1> test si, si 6632 00007A38 7403E9E0E9 <1> jnz .err 6633 <1> 6634 <1> ; DX:AX=LBA sector number 6635 <1> ; divide by number of sectors per track to get sector number 6636 <1> ; Use 32:16 DIV instead of 64:32 DIV for 8088 compatability 6637 <1> ; Use two-step 32:16 divide to avoid overflow 6638 00007A3D 89C1 <1> mov cx,ax 6639 00007A3F 89D0 <1> mov ax,dx 6640 00007A41 31D2 <1> xor dx,dx 6641 00007A43 F736[C88C] <1> div word [load_sectors] 6642 00007A47 91 <1> xchg cx,ax 6643 00007A48 F736[C88C] <1> div word [load_sectors] 6644 00007A4C 87CA <1> xchg cx,dx 6645 <1> 6646 <1> ; DX:AX=quotient, CX=remainder=sector (S) - 1 6647 <1> ; divide quotient by number of heads 6648 00007A4E 89C3 <1> mov bx, ax 6649 00007A50 92 <1> xchg ax, dx 6650 00007A51 31D2 <1> xor dx, dx 6651 00007A53 F736[CA8C] <1> div word [load_heads] 6652 00007A57 93 <1> xchg bx, ax 6653 00007A58 F736[CA8C] <1> div word [load_heads] 6654 <1> 6655 <1> ; bx:ax=quotient=cylinder (C), dx=remainder=head (H) 6656 <1> ; move variables into registers for INT 13h AH=02h 6657 00007A5C 88D6 <1> mov dh, dl ; dh = head 6658 00007A5E 41 <1> inc cx ; cl5:0 = sector 6659 00007A5F 86E8 <1> xchg ch, al ; ch = cylinder 7:0, al = 0 6660 00007A61 D1E8 <1> shr ax, 1 6661 00007A63 D1E8 <1> shr ax, 1 ; al7:6 = cylinder 9:8 6662 <1> ; bx has bits set iff it's > 0, indicating a cylinder >= 65536. 6663 00007A65 08FB <1> or bl, bh ; collect set bits from bh 6664 00007A67 08C1 <1> or cl, al ; cl7:6 = cylinder 9:8 6665 <1> ; ah has bits set iff it was >= 4, indicating a cylinder >= 1024. 6666 00007A69 08E3 <1> or bl, ah ; collect set bits from ah 6667 00007A6B 8A16[F08C] <1> mov dl, [load_unit] 6668 <1> ; dl = drive 6669 00007A6F B404 <1> mov ah, 04h ; error number: sector not found 6670 00007A71 7403E9A7E9 <1> jnz .err ; error if cylinder >= 1024 --> 6671 <1> ; ! bx = 0 (for 13.02 call) 6672 <1> 6673 <1> ; we call INT 13h AH=02h once for each sector. Multi-sector reads 6674 <1> ; may fail if we cross a track or 64K boundary 6675 00007A76 07 <1> pop es 6676 <1> 6677 00007A77 BE1100 <1> mov si, 16 + 1 6678 <1> .loop_chs_retry_repeat: 6679 00007A7A E8A300 <1> call .set_ax_function_0201_or_0301 6680 00007A7D CD13 <1> int 13h ; read one sector 6681 00007A7F 7203E97D00 <1> jnc .done 6682 00007A84 50 <1> push ax 6683 00007A85 31C0 <1> xor ax, ax 6684 00007A87 CD13 <1> int 13h ; reset disk 6685 00007A89 58 <1> pop ax 6686 00007A8A 4E <1> dec si ; another attempt ? 6687 00007A8B 75ED <1> jnz .loop_chs_retry_repeat ; yes --> 6688 <1> 6689 00007A8D 80FC09 <1> cmp ah, 9 ; data boundary error? 6690 00007A90 7403E988E9 <1> jne .err 6691 <1> 6692 <1> .chs_sectorseg: 6693 <1> d4 call d4dumpregs 6694 <1> d4 call d4message 6695 <1> d4 asciz 13,10,"In read_sector.chs_sectorseg",13,10 6696 <1> 6697 00007A95 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6698 00007A99 7534 <1> jnz .chs_sectorseg_read 6699 <1> 6700 <1> .chs_sectorseg_write: 6701 00007A9B 06 <1> push es 6702 <1> 6703 00007A9C 1E <1> push ds 6704 00007A9D 57 <1> push di 6705 00007A9E 51 <1> push cx 6706 00007A9F 8B0E[BB8C] <1> mov cx, word [load_sectorsize] 6707 00007AA3 06 <1> push es 6708 00007AA4 8E06[948C] <1> mov es, word [load_sectorseg] ; => sectorseg 6709 00007AA8 1F <1> pop ds ; => user buffer 6710 00007AA9 31F6 <1> xor si, si 6711 00007AAB 31FF <1> xor di, di 6712 00007AAD F3A4 <1> rep movsb ; copy data into sectorseg 6713 00007AAF 59 <1> pop cx 6714 00007AB0 5F <1> pop di 6715 00007AB1 1F <1> pop ds 6716 <1> 6717 00007AB2 B80103 <1> mov ax, 0301h 6718 00007AB5 CD13 <1> int 13h 6719 00007AB7 7313 <1> jnc @F 6720 <1> 6721 00007AB9 31C0 <1> xor ax, ax 6722 00007ABB CD13 <1> int 13h 6723 00007ABD 7303E95BE9 <1> jc .err 6724 <1> 6725 00007AC2 B80103 <1> mov ax, 0301h 6726 00007AC5 CD13 <1> int 13h 6727 00007AC7 7303E951E9 <1> jc .err 6728 <1> @@: 6729 00007ACC 5B <1> pop bx 6730 00007ACD EB34 <1> jmp .chs_done 6731 <1> 6732 <1> 6733 <1> .chs_sectorseg_read: 6734 <1> 6735 00007ACF 06 <1> push es ; user buffer 6736 00007AD0 8E06[948C] <1> mov es, word [load_sectorseg] 6737 <1> 6738 00007AD4 E84900 <1> call .set_ax_function_0201_or_0301 6739 00007AD7 CD13 <1> int 13h 6740 00007AD9 7313 <1> jnc .chs_sectorseg_done 6741 <1> 6742 00007ADB 31C0 <1> xor ax, ax 6743 00007ADD CD13 <1> int 13h 6744 00007ADF 7303E939E9 <1> jc .err 6745 <1> 6746 00007AE4 E83900 <1> call .set_ax_function_0201_or_0301 6747 00007AE7 CD13 <1> int 13h 6748 00007AE9 7303E92FE9 <1> jc .err 6749 <1> .chs_sectorseg_done: 6750 <1> 6751 00007AEE 31F6 <1> xor si, si 6752 00007AF0 8E1E[948C] <1> mov ds, word [load_sectorseg] 6753 00007AF4 07 <1> pop es 6754 00007AF5 57 <1> push di 6755 00007AF6 31FF <1> xor di, di 6756 00007AF8 8B0E[BB8C] <1> mov cx, word [load_sectorsize] 6757 00007AFC F3A4 <1> rep movsb 6758 00007AFE 5F <1> pop di 6759 <1> 6760 00007AFF 16 <1> push ss 6761 00007B00 1F <1> pop ds 6762 <1> .done: 6763 <1> ; increment segment 6764 00007B01 8CC3 <1> mov bx, es 6765 <1> 6766 <1> .chs_done: 6767 00007B03 8EC3 <1> mov es, bx 6768 00007B05 031E[9A8C] <1> add bx, word [load_sectorsizepara] 6769 <1> 6770 00007B09 5E <1> pop si 6771 00007B0A 58 <1> pop ax 6772 00007B0B 59 <1> pop cx 6773 00007B0C 5A <1> pop dx 6774 <1> ; increment LBA sector number 6775 00007B0D 40 <1> inc ax 6776 00007B0E 7501 <1> jne @F 6777 00007B10 42 <1> inc dx 6778 <1> @@: 6779 00007B11 89EC5D <1> lleave code 6780 00007B14 C3 <1> retn 6781 <1> 6782 <1> .set_ah_function_42_or_43: 6783 00007B15 B442 <1> mov ah, 42h 6784 00007B17 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6785 00007B1B 7502 <1> jnz @F 6786 00007B1D B443 <1> mov ah, 43h 6787 <1> @@: 6788 00007B1F C3 <1> retn 6789 <1> 6790 <1> .set_ax_function_0201_or_0301: 6791 00007B20 B001 <1> mov al, 1 6792 <1> .set_ah_function_02_or_03: 6793 00007B22 B402 <1> mov ah, 02h 6794 00007B24 F646FE01 <1> test byte [bp + ?is_read_bit0], 1 6795 00007B28 7502 <1> jnz @F 6796 00007B2A B403 <1> mov ah, 03h 6797 <1> @@: 6798 00007B2C C3 <1> retn 6799 <1> 6800 <1> lleave ctx 6801 <1> 6802 <1> 6803 <1> %if _INPUT_FILE_BOOT 6804 <1> yy_boot: 6805 00007B2D E8F3E3 <1> call init_bootcmd 6806 <1> 6807 00007B30 E8FBEA <1> call parseloadunit_default_sdp 6808 00007B33 7510 <1> jnz .have_filename 6809 <1> 6810 00007B35 BA[856C] <1> mov dx, msg.yy_requires_filename 6811 <1> .disp_error_1: 6812 00007B38 B80002 <1> mov ax, 0200h 6813 00007B3B E81B2A <1> call setrc 6814 00007B3E E8A942 <1> call putsz_error 6815 00007B41 FF26[9A0A] <1> jmp near word [errret] 6816 <1> 6817 <1> .have_filename: 6818 00007B45 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 6819 00007B4A 740C <1> jz @F 6820 00007B4C 833E[D08F]03 <1> cmp word [load_input_file.active], _INPUT_FILE_BOOT - 1 6821 00007B51 7205 <1> jb @F 6822 <1> 6823 00007B53 BA[C56C] <1> mov dx, msg.yy_too_many_handles 6824 00007B56 EBE0 <1> jmp .disp_error_1 6825 <1> @@: 6826 <1> 6827 <1> ; al was = '/' or '\' or first pathname's first character 6828 <1> ; si-> next char 6829 00007B58 3C3A <1> cmp al, ':' 6830 00007B5A 751F <1> jne .not_yy_goto_subfunction 6831 <1> 6832 00007B5C F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 6833 00007B61 7413 <1> jz @F 6834 <1> 6835 00007B63 E8293E <1> call skipwhite 6836 00007B66 4E <1> dec si 6837 00007B67 8936[D28F] <1> mov word [load_input_file.goto_offset], si 6838 <1> 6839 00007B6B E8F402 <1> call yy_boot_get 6840 00007B6E 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 6841 00007B73 E97F02 <1> jmp load_yy_finish 6842 <1> 6843 <1> @@: 6844 00007B76 BA[0B6D] <1> mov dx, msg.yy_no_file 6845 00007B79 EBBD <1> jmp .disp_error_1 6846 <1> .not_yy_goto_subfunction: 6847 <1> 6848 00007B7B BB[FC8F] <1> mov bx, load_yyname_input 6849 00007B7E E899E6 <1> call bootcmd.pathname_parse_super 6850 <1> 6851 00007B81 8326[D28F]00 <1> and word [load_input_file.goto_offset], 0 6852 00007B86 E8073E <1> call skipwh0 6853 00007B89 8936[060C] <1> mov word [if_exists_then_address], si 6854 00007B8D E8993D <1> call iseol?_or_then 6855 00007B90 7427 <1> je .not_yy_goto 6856 <1> 6857 00007B92 3C3A <1> cmp al, ':' 6858 00007B94 7403E97929 <1> jne error 6859 <1> 6860 00007B99 E8F33D <1> call skipwhite 6861 00007B9C 4E <1> dec si 6862 00007B9D 8936[D28F] <1> mov word [load_input_file.goto_offset], si 6863 <1> 6864 <1> @@: 6865 00007BA1 AC <1> lodsb 6866 00007BA2 3C20 <1> cmp al, 32 6867 00007BA4 7409 <1> je @F 6868 00007BA6 3C09 <1> cmp al, 9 6869 00007BA8 7405 <1> je @F 6870 00007BAA E88D3D <1> call iseol? 6871 00007BAD 75F2 <1> jne @B 6872 <1> @@: 6873 00007BAF E8DE3D <1> call skipwh0 6874 00007BB2 8936[060C] <1> mov word [if_exists_then_address], si 6875 00007BB6 E88C3D <1> call chkeol_or_then 6876 <1> 6877 <1> .not_yy_goto: 6878 <1> 6879 00007BB9 F606[A400]07 <1> testopt [internalflags3], dif3_load_is_dp 6880 00007BBE 7555 <1> jnz .load_yy_from_ldp 6881 <1> 6882 00007BC0 8A1E[E28F] <1> mov bl, [load_partition] 6883 00007BC4 803E[F08C]80 <1> cmp byte [load_unit], 80h 6884 00007BC9 7226 <1> jb .p_f_is_diskette 6885 00007BCB 84DB <1> test bl, bl ; partition specified ? 6886 00007BCD 7503E94029 <1> jz error ; no, error --> 6887 <1> 6888 00007BD2 E8A8FB <1> call query_geometry 6889 <1> 6890 00007BD5 B9[3D7C] <1> mov cx, load_yy_from_partition 6891 00007BD8 E8FAF9 <1> call scan_partitions 6892 00007BDB F606[A700]08 <1> testopt [internalflags3], dif3_in_if 6893 00007BE0 7403E9CA14 <1> jnz if_exists_not_found 6894 00007BE5 BA[7661] <1> mov dx, msg.boot_partition_not_found 6895 00007BE8 B80602 <1> mov ax, 0206h 6896 00007BEB E86B29 <1> call setrc 6897 00007BEE E93EE8 <1> jmp bootcmd.fail 6898 <1> 6899 <1> 6900 <1> .p_f_is_diskette: 6901 00007BF1 84DB <1> test bl, bl ; partition specified ? 6902 00007BF3 7403E91A29 <1> jnz error ; yes, error --> 6903 <1> 6904 00007BF8 E882FB <1> call query_geometry 6905 <1> 6906 00007BFB 31C0 <1> xor ax, ax 6907 00007BFD 31D2 <1> xor dx, dx 6908 <1> @@: 6909 00007BFF 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 6910 00007C03 52 <1> push dx 6911 00007C04 50 <1> push ax 6912 00007C05 E82BFD <1> call read_ae_512_bytes 6913 <1> 6914 00007C08 26813EFE0155AA <1> cmp word [es:510], 0AA55h 6915 00007C0F 7510 <1> jne boot_sigmismatch 6916 00007C11 58 <1> pop ax 6917 00007C12 5A <1> pop dx 6918 <1> 6919 00007C13 EB62 <1> jmp load_yy_common 6920 <1> 6921 <1> 6922 <1> .load_yy_from_ldp: 6923 00007C15 E865FB <1> call query_geometry 6924 00007C18 A1[D88F] <1> mov ax, word [load_partition_sector] 6925 00007C1B 8B16[DA8F] <1> mov dx, word [load_partition_sector + 2] 6926 00007C1F EBDE <1> jmp @B 6927 <1> %endif 6928 <1> 6929 <1> 6930 <1> boot_sigmismatch: 6931 00007C21 BA[1060] <1> mov dx, msg.bootfail_sig 6932 00007C24 B80702 <1> mov ax, 0207h 6933 <1> @@: 6934 00007C27 E82F29 <1> call setrc 6935 00007C2A E902E8 <1> jmp bootcmd.fail 6936 <1> 6937 <1> boot_codemismatch: 6938 00007C2D BA[7460] <1> mov dx, msg.bootfail_code 6939 00007C30 B80802 <1> mov ax, 0208h 6940 00007C33 EBF2 <1> jmp @B 6941 <1> 6942 <1> boot_secsizemismatch: 6943 00007C35 BA[9B60] <1> mov dx, msg.bootfail_secsizediffer 6944 00007C38 B80902 <1> mov ax, 0209h 6945 00007C3B EBEA <1> jmp @B 6946 <1> 6947 <1> 6948 <1> %if _INPUT_FILE_BOOT 6949 <1> ; INP: es:si -> partition table entry, 6950 <1> ; si = load_partition_table .. load_partition_table+48, 6951 <1> ; es = ss 6952 <1> ; bp + di -> above part table metadata, 6953 <1> ; dwo [bp + di - 4] = root (outermost extended position) 6954 <1> ; dwo [bp + di - 8] = base (current table position) 6955 <1> ; CHG: ax, bx, (cx), dx 6956 <1> load_yy_from_partition: 6957 <1> d4 call d4message 6958 <1> d4 asciz "In load_yy_from_partition",13,10 6959 <1> 6960 00007C3D A0[E38F] <1> mov al, byte [load_current_partition] 6961 00007C40 3A06[E28F] <1> cmp al, byte [load_partition] 6962 00007C44 7401 <1> je .gotit 6963 00007C46 C3 <1> retn 6964 <1> 6965 <1> .gotit: 6966 <1> d4 call d4message 6967 <1> d4 asciz "In load_yy_from_partition.gotit",13,10 6968 <1> 6969 00007C47 8B43F8 <1> mov ax, [bp + di - 8] 6970 00007C4A 8B53FA <1> mov dx, [bp + di - 6] ; base (current table position) 6971 <1> 6972 00007C4D 26034408 <1> add ax, [es:si + 8] 6973 00007C51 2613540A <1> adc dx, [es:si + 8 + 2] ; add offset to logical partition 6974 <1> 6975 00007C55 26894408 <1> mov word [es:si + 8], ax 6976 00007C59 2689540A <1> mov word [es:si + 8 + 2], dx ; store in partition table entry 6977 <1> 6978 00007C5D 89EC <1> mov sp, bp 6979 00007C5F 5D <1> pop bp ; restore bp (scan_partitions) 6980 00007C60 5B <1> pop bx ; discard ret address (scan_partitions) 6981 <1> 6982 <1> ; dx:ax = absolute sector number 6983 00007C61 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] ; bx => auxbuff 6984 00007C65 50 <1> push ax 6985 00007C66 52 <1> push dx 6986 00007C67 E8C9FC <1> call read_ae_512_bytes ; load partition boot sector 6987 <1> 6988 00007C6A 26813EFE0155AA <1> cmp word [es:510], 0AA55h 6989 00007C71 75AE <1> jne boot_sigmismatch 6990 <1> 6991 00007C73 31C9 <1> xor cx, cx 6992 <1> ; cmp word [es:0], cx 6993 <1> ; je boot_codemismatch 6994 <1> 6995 00007C75 5A <1> pop dx 6996 00007C76 58 <1> pop ax 6997 <1> 6998 <1> ; dx:ax = boot sector 6999 <1> ; byte [load_unit] = unit 7000 <1> ; es:0-> read sector 7001 <1> load_yy_common: 7002 00007C77 26A31C00 <1> mov word [es:bsBPB + bpbHiddenSectors], ax 7003 00007C7B 2689161E00 <1> mov word [es:bsBPB + bpbHiddenSectors + 2], dx 7004 <1> 7005 00007C80 8B5E0B <1> mov bx, [bp + bsBPB + bpbBytesPerSector] 7006 00007C83 263B1E0B00 <1> cmp bx, [es:bsBPB + bpbBytesPerSector] 7007 00007C88 75AB <1> jne boot_secsizemismatch 7008 <1> 7009 <1> ; preserve some variables from our pseudo BPB 7010 00007C8A 31C0 <1> xor ax, ax 7011 00007C8C FF7618 <1> push word [bp + bsBPB + bpbCHSSectors] 7012 00007C8F 268F061800 <1> pop word [es:bsBPB + bpbCHSSectors] 7013 00007C94 FF761A <1> push word [bp + bsBPB + bpbCHSHeads] 7014 00007C97 268F061A00 <1> pop word [es:bsBPB + bpbCHSHeads] ; preserve geometry 7015 <1> 7016 00007C9C 8B5EEA <1> mov bx, word [bp + ldParaPerSector] 7017 00007C9F D1EB <1> shr bx, 1 7018 00007CA1 895ED4 <1> mov word [bp + ldEntriesPerSector], bx 7019 <1> 7020 00007CA4 2639061600 <1> cmp word [es:bsBPB + bpbSectorsPerFAT], ax 7021 00007CA9 8A5E40 <1> mov bl, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 7022 00007CAC 7407 <1> je .is_fat32 7023 00007CAE 26881E2400 <1> mov byte [es:bsBPB + bpbNew + bpbnBootUnit], bl 7024 00007CB3 EB05 <1> jmp short .was_fat1612 7025 <1> .is_fat32: 7026 00007CB5 26881E4000 <1> mov byte [es:bsBPB + ebpbNew + bpbnBootUnit], bl 7027 <1> .was_fat1612: 7028 <1> 7029 00007CBA 06 <1> push es 7030 00007CBB 1E <1> push ds 7031 00007CBC 06 <1> push es 7032 00007CBD 1F <1> pop ds 7033 00007CBE 31F6 <1> xor si, si ; -> BPB from boot partition 7034 00007CC0 16 <1> push ss 7035 00007CC1 07 <1> pop es 7036 00007CC2 BF[B08C] <1> mov di, load_data - LOADDATA2 ; -> our copy of a BPB 7037 00007CC5 B95A00 <1> mov cx, (bsBPB + ebpbNew + BPBN_size) 7038 00007CC8 F3A4 <1> rep movsb ; get the BPB 7039 <1> 7040 00007CCA 1F <1> pop ds 7041 00007CCB 800E[A400]80 <1> setopt [internalflags3], dif3_partition_changed 7042 <1> 7043 00007CD0 394616 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], ax 7044 00007CD3 740B <1> je @F ; is FAT32 --> 7045 00007CD5 BE[D48C] <1> mov si, load_data - LOADDATA2 + bsBPB + bpbNew 7046 00007CD8 BF[F08C] <1> mov di, load_data - LOADDATA2 + bsBPB + ebpbNew 7047 00007CDB B91A00 <1> mov cx, BPBN_size 7048 00007CDE F3A4 <1> rep movsb ; clone the FAT16 / FAT12 BPBN 7049 <1> ; to where the FAT32 BPBN lives 7050 <1> @@: 7051 00007CE0 07 <1> pop es 7052 <1> 7053 <1> .outofmem: equ query_geometry.out_of_memory_error 7054 <1> 7055 00007CE1 FF36[F209] <1> push word [auxbuff_segorsel] 7056 00007CE5 8F46F8 <1> pop word [bp + lsvFATSeg] 7057 00007CE8 804EE702 <1> or byte [bp + ldFlags], ldfFATInvalid 7058 00007CEC B8FFFF <1> mov ax, -1 7059 00007CEF 8946F4 <1> mov word [bp + lsvFATSector], ax 7060 00007CF2 8946F6 <1> mov word [bp + lsvFATSector + 2], ax 7061 <1> 7062 00007CF5 E89705 <1> call initialise_fs 7063 <1> 7064 00007CF8 C606[E58F]00 <1> mov byte [load_check_dir_attr], 0 7065 00007CFD 8B36[FC8F] <1> mov si, word [load_yyname_input] 7066 00007D01 803C2F <1> cmp byte [si], '/' 7067 00007D04 7501 <1> jne @F 7068 00007D06 46 <1> inc si 7069 <1> @@: 7070 00007D07 803C00 <1> cmp byte [si], 0 7071 00007D0A 750C <1> jne @F 7072 <1> ..@yy_filename_empty: 7073 00007D0C BA[A66C] <1> mov dx, msg.yy_filename_empty 7074 00007D0F B80A02 <1> mov ax, 020Ah 7075 00007D12 E84428 <1> call setrc 7076 00007D15 E917E7 <1> jmp bootcmd.fail 7077 <1> @@: 7078 00007D18 16 <1> push ss 7079 00007D19 07 <1> pop es 7080 00007D1A E8E7EB <1> call boot_parse_fn ; get next pathname 7081 00007D1D 3C2F <1> cmp al, '/' 7082 00007D1F 7509 <1> jne @F 7083 00007D21 C606[E58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 7084 00007D26 8936[FE8F] <1> mov word [load_yyname_next], si 7085 <1> @@: 7086 <1> 7087 00007D2A BFFFFF <1> mov di, -1 7088 00007D2D 89FE <1> mov si, di 7089 00007D2F 897EF4 <1> mov [bp + lsvFATSector], di 7090 00007D32 8976F6 <1> mov [bp + lsvFATSector + 2], si 7091 <1> 7092 00007D35 31C0 <1> xor ax, ax 7093 00007D37 31D2 <1> xor dx, dx 7094 <1> 7095 <1> scan_dir_yyname_loop: 7096 00007D39 8946EC <1> mov word [bp + ldDirCluster], ax 7097 00007D3C 8956EE <1> mov word [bp + ldDirCluster + 2], dx 7098 <1> 7099 00007D3F 16 <1> push ss 7100 00007D40 07 <1> pop es 7101 00007D41 BB[308D] <1> mov bx, load_yy_direntry 7102 <1> 7103 00007D44 E88EF6 <1> call scan_dir_aux_for_file 7104 <1> 7105 00007D47 803E[E58F]10 <1> cmp byte [load_check_dir_attr], ATTR_DIRECTORY 7106 00007D4C 753A <1> jne got_yyentry 7107 <1> 7108 00007D4E 56 <1> push si 7109 00007D4F 57 <1> push di 7110 00007D50 C606[E58F]00 <1> mov byte [load_check_dir_attr], 0 7111 00007D55 8B36[FE8F] <1> mov si, word [load_yyname_next] 7112 00007D59 803C00 <1> cmp byte [si], 0 7113 00007D5C 7502 <1> jne @F 7114 00007D5E EBAC <1> jmp ..@yy_filename_empty 7115 <1> @@: 7116 00007D60 06 <1> push es 7117 00007D61 16 <1> push ss 7118 00007D62 07 <1> pop es 7119 00007D63 E89EEB <1> call boot_parse_fn ; get next pathname 7120 00007D66 07 <1> pop es 7121 00007D67 3C2F <1> cmp al, '/' 7122 00007D69 7509 <1> jne @F 7123 00007D6B C606[E58F]10 <1> mov byte [load_check_dir_attr], ATTR_DIRECTORY 7124 00007D70 8936[FE8F] <1> mov word [load_yyname_next], si 7125 <1> @@: 7126 00007D74 5F <1> pop di 7127 00007D75 5E <1> pop si 7128 <1> 7129 00007D76 31D2 <1> xor dx, dx 7130 00007D78 268B471A <1> mov ax, [es:bx + deClusterLow] 7131 <1> ; = first cluster (not FAT32) 7132 00007D7C 807EE620 <1> cmp byte [bp + ldFATType], 32 7133 00007D80 7504 <1> jne @F 7134 00007D82 268B5714 <1> mov dx, [es:bx + deClusterHigh] 7135 <1> ; dx:ax = first cluster (FAT32) 7136 <1> @@: 7137 <1> 7138 00007D86 EBB1 <1> jmp scan_dir_yyname_loop 7139 <1> 7140 <1> 7141 <1> got_yyentry: 7142 <1> 7143 <1> 7144 <1> ; (boot32.asm code starts here) 7145 <1> 7146 00007D88 8B1E[4C8D] <1> mov bx, [load_yy_direntry + deSize] 7147 00007D8C A1[4E8D] <1> mov ax, [load_yy_direntry + deSize + 2] 7148 <1> ; ax:bx = file size 7149 00007D8F 8A16[3C8D] <1> mov dl, [load_yy_direntry + 12] 7150 <1> ; dl = FAT+ size bits 7151 00007D93 88D6 <1> mov dh, dl 7152 00007D95 81E207E0 <1> and dx, 0E007h ; obtain bits 7-5 and 2-0 7153 00007D99 740C <1> jz @F 7154 00007D9B BA[986D] <1> mov dx, msg.yy_too_large 7155 00007D9E B80B02 <1> mov ax, 020Bh 7156 00007DA1 E8B527 <1> call setrc 7157 00007DA4 E988E6 <1> jmp bootcmd.fail 7158 <1> @@: 7159 00007DA7 895EC4 <1> mov word [bp + ldFileSize], bx 7160 00007DAA 8946C6 <1> mov word [bp + ldFileSize + 2], ax 7161 <1> 7162 00007DAD 09D8 <1> or ax, bx 7163 00007DAF 7516 <1> jnz @F 7164 <1> 7165 00007DB1 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 7166 00007DB6 7403E9F412 <1> jnz if_exists_not_found 7167 00007DBB BA[B46D] <1> mov dx, msg.yy_empty 7168 00007DBE B80C02 <1> mov ax, 020Ch 7169 00007DC1 E89527 <1> call setrc 7170 00007DC4 E968E6 <1> jmp bootcmd.fail 7171 <1> @@: 7172 <1> 7173 <1> ; get starting cluster of file 7174 00007DC7 31D2 <1> xor dx, dx 7175 00007DC9 A1[4A8D] <1> mov ax, [load_yy_direntry + deClusterLow] 7176 <1> ; = first cluster (not FAT32) 7177 <1> 7178 00007DCC 807EE620 <1> cmp byte [bp + ldFATType], 32 7179 00007DD0 7504 <1> jne @F 7180 00007DD2 8B16[448D] <1> mov dx, [load_yy_direntry + deClusterHigh] 7181 <1> ; dx:ax = first cluster (FAT32) 7182 <1> @@: 7183 <1> 7184 00007DD6 80E60F <1> and dh, 0Fh 7185 00007DD9 8946F0 <1> mov word [bp + lsvFirstCluster], ax 7186 00007DDC 8956F2 <1> mov word [bp + lsvFirstCluster + 2], dx 7187 <1> 7188 00007DDF 8946C8 <1> mov word [bp + ldCurrentCluster], ax 7189 00007DE2 8956CA <1> mov word [bp + ldCurrentCluster + 2], dx 7190 00007DE5 31DB <1> xor bx, bx 7191 00007DE7 895ECC <1> mov word [bp + ldCurrentSeek], bx 7192 00007DEA 895ECE <1> mov word [bp + ldCurrentSeek + 2], bx 7193 00007DED E8B3F7 <1> call check_clust 7194 00007DF0 7303E9D704 <1> jc error_badchain 7195 <1> 7196 <1> load_yy_finish: 7197 00007DF5 31ED <1> xor bp, bp 7198 00007DF7 31DB <1> xor bx, bx 7199 00007DF9 BE[708C] <1> mov si, load_data_lowest 7200 00007DFC B95000 <1> mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 7201 <1> 7202 00007DFF BF[508D] <1> mov di, load_input_file 7203 00007E02 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 7204 00007E07 7415 <1> jz @F 7205 00007E09 8B1E[D08F] <1> mov bx, word [load_input_file.active] 7206 00007E0D 43 <1> inc bx 7207 00007E0E B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 7208 00007E11 F7E3 <1> mul bx 7209 <1> ; test dx, dx 7210 <1> ; jnz error 7211 00007E13 01C7 <1> add di, ax 7212 00007E15 8B5586 <1> mov dx, word [di - LOAD_INPUT_FILE_SIZE - LOADDATA3 + ldFATType] 7213 00007E18 81E200F0 <1> and dx, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 7215 00007E1C 09D5 <1> or bp, dx 7216 <1> 7217 <1> @@: 7218 <1> 7219 00007E1E 092E[968C] <1> or word [load_data - LOADDATA2 + ldFATType], bp 7220 00007E22 16 <1> push ss 7221 00007E23 07 <1> pop es 7222 00007E24 F3A5 <1> rep movsw 7223 <1> 7224 <1> ; hazard: this uses load_input_file and 7225 <1> ; load_data_lowest if we are already in 7226 <1> ; a yy_boot script. 7227 00007E26 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 7228 00007E2B E81A4E <1> call yy_reset_buf 7229 <1> 7230 00007E2E 891E[D08F] <1> mov word [load_input_file.active], bx 7231 00007E32 800E[A300]02 <1> setopt [internalflags2], dif2_input_file_boot 7232 <1> 7233 00007E37 8B36[D28F] <1> mov si, word [load_input_file.goto_offset] 7234 00007E3B 85F6 <1> test si, si 7235 00007E3D 7403E9944F <1> jnz cmd_goto.yy_entry 7236 <1> 7237 00007E42 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 7238 00007E47 7403E97012 <1> jnz if_exists_found_open 7239 00007E4C C3 <1> retn 7240 <1> 7241 <1> 7242 <1> ; INP: [load_input_file], dif2_input_file_boot 7243 <1> ; OUT: most recent file closed, flag cleared if no longer file 7244 <1> ; CHG: di, bx, ax 7245 <1> yy_boot_close_file: 7246 00007E4D A1[D08F] <1> mov ax, word [load_input_file.active] 7247 00007E50 48 <1> dec ax 7248 00007E51 790B <1> jns .next 7249 00007E53 8026[A300]FD <1> clropt [internalflags2], dif2_input_file_boot 7250 00007E58 800E[A300]04 <1> setopt [internalflags2], dif2_closed_input_file_boot 7251 00007E5D C3 <1> retn 7252 <1> .next: 7253 00007E5E A3[D08F] <1> mov word [load_input_file.active], ax 7254 00007E61 C3 <1> retn 7255 <1> 7256 <1> 7257 <1> ; INP: [load_input_file] 7258 <1> ; OUT: [load_data_lowest] = LOADDATA[123], lsv, BPB 7259 <1> ; CHG: es, ax, dx, di, si 7260 <1> yy_boot_get: 7261 00007E62 16 <1> push ss 7262 00007E63 07 <1> pop es 7263 <1> 7264 00007E64 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 7265 00007E67 F726[D08F] <1> mul word [load_input_file.active] 7266 <1> 7267 <1> ; test dx, dx 7268 <1> ; jnz .error 7269 <1> 7270 00007E6B 51 <1> push cx 7271 00007E6C BF[708C] <1> mov di, load_data_lowest 7272 00007E6F B95000 <1> mov cx, (LOAD_INPUT_FILE_SIZE + 1) >> 1 7273 <1> 7274 00007E72 BE[508D] <1> mov si, load_input_file 7275 00007E75 01C6 <1> add si, ax 7276 <1> 7277 00007E77 F3A5 <1> rep movsw 7278 00007E79 59 <1> pop cx 7279 00007E7A C3 <1> retn 7280 <1> 7281 <1> 7282 <1> ; INP: [load_data_lowest] = LOADDATA3 7283 <1> ; OUT: [load_input_file] 7284 <1> ; CHG: es, ax, dx, di, si 7285 <1> ; Note: Preserves flags (ZF, CF) 7286 <1> yy_boot_update: 7287 00007E7B 9C <1> pushf 7288 <1> 7289 00007E7C 16 <1> push ss 7290 00007E7D 07 <1> pop es 7291 <1> 7292 00007E7E B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 7293 00007E81 F726[D08F] <1> mul word [load_input_file.active] 7294 <1> 7295 <1> ; test dx, dx 7296 <1> ; jnz .error 7297 <1> 7298 00007E85 51 <1> push cx 7299 00007E86 BE[708C] <1> mov si, load_data_lowest 7300 00007E89 B90800 <1> mov cx, LOADDATA3_size >> 1 7301 <1> 7302 00007E8C BF[508D] <1> mov di, load_input_file 7303 00007E8F 01C7 <1> add di, ax 7304 <1> 7305 00007E91 F3A5 <1> rep movsw 7306 00007E93 59 <1> pop cx 7307 00007E94 9D <1> popf ; ZF, CF 7308 00007E95 C3 <1> retn 7309 <1> 7310 <1> 7311 <1> 7312 <1> ; INP: [load_input_file] = active file 7313 <1> ; cx = how many bytes to read 7314 <1> ; ds:dx -> buffer 7315 <1> ; OUT: CY if error reading 7316 <1> ; NC if success 7317 <1> ; ax = how many bytes read 7318 <1> ; CHG: bx, cx 7319 <1> ; STT: ds = es = ss 7320 <1> yy_boot_read: 7321 <1> lframe near 7322 <1> lvar word, length 7323 <1> lvar word, length_this_cluster 7324 <1> lvar dword, bytes_per_cluster 7325 <1> lvar dword, how_far_in_cluster 7326 00007E96 5589E58D66F4 <1> lenter 7327 <1> lvar dword, pointer 7328 00007E9C 1E <1> push ds 7329 00007E9D 52 <1> push dx 7330 00007E9E 31C0 <1> xor ax, ax 7331 <1> lvar word, did_guard_auxbuff 7332 00007EA0 50 <1> push ax 7333 <1> lvar word, read_how_many 7334 00007EA1 50 <1> push ax 7335 00007EA2 52 <1> push dx 7336 00007EA3 56 <1> push si 7337 00007EA4 57 <1> push di 7338 <1> 7339 00007EA5 FF36[9A0A] <1> push word [errret] 7340 00007EA9 FF36[9C0A] <1> push word [throwret] 7341 00007EAD FF36[9E0A] <1> push word [throwsp] 7342 <1> 7343 00007EB1 55 <1> push bp 7344 <1> 7345 00007EB2 C706[9A0A][1A80] <1> mov word [errret], .err_ret 7346 00007EB8 C706[9C0A][1A80] <1> mov word [throwret], .err_ret 7347 00007EBE 8926[9E0A] <1> mov word [throwsp], sp 7348 <1> 7349 00007EC2 E89DFF <1> call yy_boot_get 7350 <1> 7351 00007EC5 E84B86 <1> call guard_auxbuff 7352 00007EC8 FF46EE <1> inc word [bp + ?did_guard_auxbuff] 7353 <1> 7354 00007ECB 8B16[768C] <1> mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 7355 00007ECF A1[748C] <1> mov ax, word [load_data - LOADDATA2 + ldFileSize] 7356 <1> 7357 00007ED2 2B06[7C8C] <1> sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 7358 00007ED6 1B16[7E8C] <1> sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7359 <1> 7360 00007EDA 85D2 <1> test dx, dx 7361 00007EDC 7506 <1> jnz .use_count 7362 00007EDE 39C8 <1> cmp ax, cx 7363 00007EE0 7302 <1> jae .use_count 7364 00007EE2 89C1 <1> mov cx, ax 7365 <1> .use_count: 7366 00007EE4 85C9 <1> test cx, cx 7367 00007EE6 7503E90801 <1> jz .success 7368 00007EEB 894EFE <1> mov word [bp + ?length], cx 7369 <1> 7370 <1> .next_cluster: 7371 00007EEE 8B36[7E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7372 00007EF2 8B3E[7C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7373 00007EF6 A1[BB8C] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7374 00007EF9 F726[988C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 7375 <1> 7376 00007EFD 8946F8 <1> mov word [bp + ?bytes_per_cluster], ax 7377 00007F00 8956FA <1> mov word [bp + ?bytes_per_cluster + 2], dx 7378 00007F03 83E801 <1> sub ax, 1 7379 00007F06 83DA00 <1> sbb dx, 0 7380 00007F09 21D6 <1> and si, dx 7381 00007F0B 21C7 <1> and di, ax ; how far are we into cluster 7382 <1> 7383 00007F0D 897EF4 <1> mov word [bp + ?how_far_in_cluster], di 7384 00007F10 8976F6 <1> mov word [bp + ?how_far_in_cluster + 2], si 7385 <1> 7386 00007F13 F7DE <1> neg si 7387 00007F15 F7DF <1> neg di 7388 00007F17 83DE00 <1> sbb si, byte 0 ; neg si:di 7389 <1> 7390 00007F1A 037EF8 <1> add di, word [bp + ?bytes_per_cluster] 7391 00007F1D 1376FA <1> adc si, word [bp + ?bytes_per_cluster + 2] 7392 <1> ; cluster size - how far we are 7393 <1> ; = how much to read from this cluster 7394 00007F20 85F6 <1> test si, si 7395 00007F22 7506 <1> jnz .use_count_2 7396 00007F24 39CF <1> cmp di, cx 7397 00007F26 7302 <1> jae .use_count_2 7398 00007F28 89F9 <1> mov cx, di 7399 <1> .use_count_2: 7400 00007F2A 894EFC <1> mov word [bp + ?length_this_cluster], cx 7401 <1> 7402 <1> .next_sector: 7403 00007F2D A1[788C] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7404 00007F30 8B16[7A8C] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7405 00007F34 E86CF6 <1> call check_clust 7406 00007F37 7303E9B800 <1> jc .error 7407 00007F3C E883F5 <1> call clust_to_first_sector 7408 00007F3F 8B1E[BB8C] <1> mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7409 00007F43 8B7EF4 <1> mov di, word [bp + ?how_far_in_cluster] 7410 00007F46 8B76F6 <1> mov si, word [bp + ?how_far_in_cluster + 2] 7411 00007F49 87D6 <1> xchg dx, si 7412 00007F4B 97 <1> xchg ax, di 7413 00007F4C F7F3 <1> div bx 7414 <1> ; dx = byte offset into sector 7415 <1> ; ax = sector offset into cluster's data 7416 00007F4E 01C7 <1> add di, ax 7417 00007F50 83D600 <1> adc si, 0 7418 00007F53 87D6 <1> xchg dx, si 7419 00007F55 97 <1> xchg ax, di 7420 <1> ; dx:ax = sector in fs 7421 <1> ; si = byte offset 7422 <1> 7423 00007F56 89F1 <1> mov cx, si ; = byte offset 7424 00007F58 F7D9 <1> neg cx ; - byte offset 7425 00007F5A 01D9 <1> add cx, bx ; sector size - byte offset 7426 <1> ; = length this sector 7427 00007F5C 3B4EFC <1> cmp cx, word [bp + ?length_this_cluster] 7428 00007F5F 7603 <1> jbe @F ; sector has less than requested --> 7429 00007F61 8B4EFC <1> mov cx, word [bp + ?length_this_cluster] 7430 <1> ; fill entire remaining request 7431 <1> @@: 7432 00007F64 8B1E[F209] <1> mov bx, word [auxbuff_segorsel] 7433 00007F68 E8DAF9 <1> call read_sector 7434 00007F6B 1E <1> push ds 7435 <1> 7436 00007F6C 06 <1> push es 7437 <1> ; es:si -> data in sector buffer 7438 00007F6D C47EF0 <1> les di, [bp + ?pointer] 7439 <1> ; es:di -> buffer 7440 00007F70 014EEC <1> add word [bp + ?read_how_many], cx 7441 00007F73 294EFC <1> sub word [bp + ?length_this_cluster], cx 7442 00007F76 294EFE <1> sub word [bp + ?length], cx 7443 00007F79 010E[7C8C] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 7444 00007F7D 8316[7E8C]00 <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7445 00007F82 014EF4 <1> add word [bp + ?how_far_in_cluster], cx 7446 00007F85 8356F600 <1> adc word [bp + ?how_far_in_cluster + 2], 0 7447 00007F89 1F <1> pop ds ; ds:si -> data in sector buffer 7448 00007F8A F3A4 <1> rep movsb ; copy 7449 00007F8C 897EF0 <1> mov word [bp + ?pointer], di 7450 <1> ; update pointer 7451 00007F8F 1F <1> pop ds 7452 <1> 7453 00007F90 837EFC00 <1> cmp word [bp + ?length_this_cluster], 0 7454 00007F94 7597 <1> jne .next_sector 7455 <1> 7456 00007F96 8B7EF8 <1> mov di, word [bp + ?bytes_per_cluster] 7457 00007F99 8B76FA <1> mov si, word [bp + ?bytes_per_cluster + 2] 7458 00007F9C 397EF4 <1> cmp word [bp + ?how_far_in_cluster], di 7459 00007F9F 7505 <1> jne @F 7460 00007FA1 3976F6 <1> cmp word [bp + ?how_far_in_cluster + 2], si 7461 00007FA4 7408 <1> je @FF 7462 <1> @@: 7463 00007FA6 837EFE00 <1> cmp word [bp + ?length], 0 7464 00007FAA 7548 <1> jne .error 7465 00007FAC EB45 <1> jmp .success 7466 <1> 7467 <1> @@: 7468 00007FAE A1[788C] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7469 00007FB1 8B16[7A8C] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7470 00007FB5 E8EBF5 <1> call check_clust 7471 00007FB8 723A <1> jc .error 7472 00007FBA E832F5 <1> call clust_next.dxax 7473 00007FBD 731B <1> jnc @F ; (NC) --> 7474 00007FBF B8F6FF <1> mov ax, 0FFF8h - 2 7475 00007FC2 BAFF0F <1> mov dx, 0FFFh 7476 00007FC5 8B3E[7C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7477 00007FC9 8B36[7E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7478 00007FCD 3B36[748C] <1> cmp si, word [load_data - LOADDATA2 + ldFileSize] 7479 00007FD1 7506 <1> jne .set_error 7480 00007FD3 3B3E[768C] <1> cmp di, word [load_data - LOADDATA2 + ldFileSize + 2] 7481 00007FD7 7401 <1> je .do_not_set_error ; if same then NC --> 7482 <1> .set_error: 7483 00007FD9 F9 <1> stc 7484 <1> .do_not_set_error: 7485 <1> @@: 7486 00007FDA 9C <1> pushf 7487 00007FDB 83C002 <1> add ax, 2 7488 00007FDE 83D200 <1> adc dx, 0 7489 00007FE1 A3[788C] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 7490 00007FE4 8916[7A8C] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 7491 00007FE8 9D <1> popf ; CF 7492 00007FE9 7209 <1> jc .error 7493 00007FEB 8B4EFE <1> mov cx, word [bp + ?length] 7494 00007FEE E303 <1> jcxz .success 7495 00007FF0 E9FBFE <1> jmp .next_cluster 7496 <1> 7497 <1> .success: 7498 00007FF3 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 7499 <1> .error: 7500 00007FF4 F9 <1> stc 7501 <1> 7502 00007FF5 5D <1> pop bp 7503 <1> 7504 00007FF6 8F06[9E0A] <1> pop word [throwsp] 7505 00007FFA 8F06[9C0A] <1> pop word [throwret] ; restore throw destination 7506 00007FFE 8F06[9A0A] <1> pop word [errret] 7507 <1> 7508 00008002 9C <1> pushf 7509 00008003 F646EE01 <1> testopt [bp + ?did_guard_auxbuff], 1 7510 00008007 7405 <1> jz @F 7511 00008009 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 7512 <1> @@: 7513 0000800E 9D <1> popf ; CF 7514 <1> 7515 0000800F E869FE <1> call yy_boot_update 7516 <1> 7517 00008012 5F <1> pop di 7518 00008013 5E <1> pop si 7519 00008014 5A <1> pop dx 7520 00008015 58 <1> pop ax ; pop from ?read_how_many 7521 00008016 89EC5D <1> lleave 7522 00008019 C3 <1> retn 7523 <1> 7524 <1> .err_ret: 7525 0000801A 8B26[9E0A] <1> mov sp, word [throwsp] ; restore stack 7526 <1> ; (needed here if returned to errret) 7527 0000801E EBD4 <1> jmp .error 7528 <1> 7529 <1> 7530 <1> ; INP: [load_input_file] = active file 7531 <1> ; cx:dx = signed seek distance from current 7532 <1> ; OUT: - 7533 <1> ; CHG: ax, bx, cx, dx 7534 <1> ; STT: ds = es = ss 7535 <1> yy_boot_seek_current: 7536 <1> lframe near 7537 <1> lvar dword, length 7538 <1> lvar dword, length_this_cluster 7539 <1> lvar dword, bytes_per_cluster 7540 <1> lvar dword, how_far_in_cluster 7541 00008020 5589E58D66F0 <1> lenter 7542 <1> lvar dword, seek_distance 7543 00008026 51 <1> push cx 7544 00008027 52 <1> push dx 7545 00008028 31C0 <1> xor ax, ax 7546 <1> lvar word, did_guard_auxbuff 7547 0000802A 50 <1> push ax 7548 0000802B 56 <1> push si 7549 0000802C 57 <1> push di 7550 <1> 7551 0000802D FF36[9A0A] <1> push word [errret] 7552 00008031 FF36[9C0A] <1> push word [throwret] 7553 00008035 FF36[9E0A] <1> push word [throwsp] 7554 <1> 7555 00008039 55 <1> push bp 7556 <1> 7557 0000803A C706[9A0A][6482] <1> mov word [errret], .err_ret 7558 00008040 C706[9C0A][6482] <1> mov word [throwret], .err_ret 7559 00008046 8926[9E0A] <1> mov word [throwsp], sp 7560 <1> 7561 0000804A E815FE <1> call yy_boot_get 7562 <1> 7563 0000804D E8C384 <1> call guard_auxbuff 7564 00008050 FF46EA <1> inc word [bp + ?did_guard_auxbuff] 7565 <1> 7566 00008053 85C9 <1> test cx, cx 7567 00008055 7975 <1> jns .plus 7568 <1> 7569 00008057 8B36[7E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7570 0000805B 8B3E[7C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7571 0000805F A1[BB8C] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7572 00008062 F726[988C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 7573 <1> 7574 00008066 8946F4 <1> mov word [bp + ?bytes_per_cluster], ax 7575 00008069 8956F6 <1> mov word [bp + ?bytes_per_cluster + 2], dx 7576 0000806C 83E801 <1> sub ax, 1 7577 0000806F 83DA00 <1> sbb dx, 0 7578 00008072 F7D0 <1> not ax 7579 00008074 F7D2 <1> not dx 7580 <1> 7581 00008076 56 <1> push si 7582 00008077 57 <1> push di 7583 <1> 7584 00008078 21D6 <1> and si, dx 7585 0000807A 21C7 <1> and di, ax ; start seek of current cluster 7586 <1> 7587 0000807C 58 <1> pop ax 7588 0000807D 5A <1> pop dx ; current seek 7589 <1> 7590 0000807E 0346EC <1> add ax, word [bp + ?seek_distance] 7591 00008081 1356EE <1> adc dx, word [bp + ?seek_distance + 2] 7592 00008084 7203E9B801 <1> jnc .error ; target seek 7593 <1> 7594 <1> ; if the cluster is invalid, need to reset 7595 00008089 813E[7A8C]FF0F <1> cmp word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 7596 0000808F 7207 <1> jb @F 7597 00008091 833E[788C]F8 <1> cmp word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 7598 00008096 7308 <1> jae .minus_reset 7599 <1> @@: 7600 <1> 7601 00008098 39F2 <1> cmp dx, si ; is target seek 7602 <1> ; >= start seek of current cluster? 7603 0000809A 7502 <1> jne @F 7604 0000809C 39F8 <1> cmp ax, di 7605 <1> @@: 7606 0000809E 7322 <1> jae .minus_simple ; yes, simple --> 7607 <1> 7608 <1> .minus_reset: 7609 <1> ; reset current cluster to first, seek to 0 7610 000080A0 FF36[A28C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 7611 000080A4 FF36[A08C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster] 7612 000080A8 8F06[788C] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster] 7613 000080AC 8F06[7A8C] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7614 000080B0 8326[7C8C]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek], 0 7615 000080B5 8326[7E8C]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7616 <1> 7617 <1> ; set distance 7618 000080BA 8946EC <1> mov word [bp + ?seek_distance], ax 7619 000080BD 8956EE <1> mov word [bp + ?seek_distance + 2], dx 7620 <1> ; use positive seek code 7621 000080C0 EB0A <1> jmp .plus 7622 <1> 7623 <1> .minus_simple: 7624 <1> ; just set seek, current cluster still valid 7625 000080C2 A3[7C8C] <1> mov word [load_data - LOADDATA2 + ldCurrentSeek], ax 7626 000080C5 8916[7E8C] <1> mov word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 7627 000080C9 E97501 <1> jmp .return 7628 <1> 7629 <1> .plus: 7630 000080CC 8B16[768C] <1> mov dx, word [load_data - LOADDATA2 + ldFileSize + 2] 7631 000080D0 A1[748C] <1> mov ax, word [load_data - LOADDATA2 + ldFileSize] 7632 <1> 7633 000080D3 2B06[7C8C] <1> sub ax, word [load_data - LOADDATA2 + ldCurrentSeek] 7634 000080D7 1B16[7E8C] <1> sbb dx, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7635 <1> 7636 000080DB 720A <1> jc .eof 7637 <1> ; dx:ax = how far we can seek within file 7638 000080DD 3B56EE <1> cmp dx, word [bp + ?seek_distance + 2] 7639 000080E0 7503 <1> jne @F 7640 000080E2 3B46EC <1> cmp ax, word [bp + ?seek_distance] 7641 <1> @@: 7642 000080E5 771D <1> ja .not_eof 7643 <1> .eof: 7644 000080E7 8B46EC <1> mov ax, word [bp + ?seek_distance] 7645 000080EA 8B56EE <1> mov dx, word [bp + ?seek_distance + 2] 7646 000080ED 0106[7C8C] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], ax 7647 000080F1 1116[7E8C] <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], dx 7648 000080F5 C706[788C]F8FF <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], 0FFF8h 7649 000080FB C706[7A8C]FF0F <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], 0FFFh 7650 00008101 E93D01 <1> jmp .return 7651 <1> 7652 <1> .not_eof: 7653 00008104 8B4EEC <1> mov cx, word [bp + ?seek_distance] 7654 00008107 8B5EEE <1> mov bx, word [bp + ?seek_distance + 2] 7655 0000810A 85DB <1> test bx, bx 7656 0000810C 7507 <1> jnz @F 7657 0000810E 85C9 <1> test cx, cx 7658 00008110 7503E92C01 <1> jz .return 7659 <1> @@: 7660 00008115 894EFC <1> mov word [bp + ?length], cx 7661 00008118 895EFE <1> mov word [bp + ?length + 2], bx 7662 <1> 7663 <1> ; bx:cx = length 7664 <1> .next_cluster: 7665 0000811B 8B36[7E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7666 0000811F 8B3E[7C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7667 00008123 A1[BB8C] <1> mov ax, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7668 00008126 F726[988C] <1> mul word [load_data - LOADDATA2 + ldClusterSize] 7669 <1> 7670 0000812A 8946F4 <1> mov word [bp + ?bytes_per_cluster], ax 7671 0000812D 8956F6 <1> mov word [bp + ?bytes_per_cluster + 2], dx 7672 00008130 83E801 <1> sub ax, 1 7673 00008133 83DA00 <1> sbb dx, 0 7674 00008136 21D6 <1> and si, dx 7675 00008138 21C7 <1> and di, ax ; how far are we into cluster 7676 <1> 7677 0000813A 897EF0 <1> mov word [bp + ?how_far_in_cluster], di 7678 0000813D 8976F2 <1> mov word [bp + ?how_far_in_cluster + 2], si 7679 <1> 7680 00008140 F7DE <1> neg si 7681 00008142 F7DF <1> neg di 7682 00008144 83DE00 <1> sbb si, byte 0 ; neg si:di 7683 <1> 7684 00008147 037EF4 <1> add di, word [bp + ?bytes_per_cluster] 7685 0000814A 1376F6 <1> adc si, word [bp + ?bytes_per_cluster + 2] 7686 <1> ; cluster size - how far we are 7687 <1> ; = how much to read from this cluster 7688 0000814D 39DE <1> cmp si, bx 7689 0000814F 7502 <1> jne @F 7690 00008151 39CF <1> cmp di, cx 7691 <1> @@: 7692 00008153 7304 <1> jae .use_count_2 7693 00008155 89F9 <1> mov cx, di 7694 00008157 89F3 <1> mov bx, si 7695 <1> .use_count_2: 7696 <1> ; bx:cx = how far to seek in this cluster 7697 00008159 894EF8 <1> mov word [bp + ?length_this_cluster], cx 7698 0000815C 895EFA <1> mov word [bp + ?length_this_cluster + 2], bx 7699 <1> 7700 <1> .next_sector: 7701 0000815F A1[788C] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7702 00008162 8B16[7A8C] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7703 00008166 E83AF4 <1> call check_clust 7704 00008169 7303E9D300 <1> jc .error 7705 0000816E 8B1E[BB8C] <1> mov bx, word [load_data - LOADDATA2 + bsBPB + bpbBytesPerSector] 7706 00008172 8B7EF0 <1> mov di, word [bp + ?how_far_in_cluster] 7707 00008175 8B76F2 <1> mov si, word [bp + ?how_far_in_cluster + 2] 7708 <1> 7709 00008178 87D6 <1> xchg dx, si 7710 0000817A 97 <1> xchg ax, di 7711 0000817B F7F3 <1> div bx 7712 <1> ; dx = byte offset into sector 7713 <1> ; ax = sector offset into cluster's data 7714 0000817D 87D6 <1> xchg dx, si 7715 0000817F 97 <1> xchg ax, di 7716 <1> ; si = byte offset 7717 <1> 7718 00008180 89F1 <1> mov cx, si ; = byte offset 7719 00008182 F7D9 <1> neg cx ; - byte offset 7720 00008184 01D9 <1> add cx, bx ; sector size - byte offset 7721 <1> ; = length this sector 7722 00008186 837EFA00 <1> cmp word [bp + ?length_this_cluster + 2], 0 7723 0000818A 7508 <1> jne @F ; fill remaining sector size 7724 0000818C 3B4EF8 <1> cmp cx, word [bp + ?length_this_cluster] 7725 0000818F 7603 <1> jbe @F ; sector has less than requested --> 7726 00008191 8B4EF8 <1> mov cx, word [bp + ?length_this_cluster] 7727 <1> ; fill entire remaining request 7728 <1> @@: 7729 00008194 294EF8 <1> sub word [bp + ?length_this_cluster], cx 7730 00008197 835EFA00 <1> sbb word [bp + ?length_this_cluster + 2], 0 7731 0000819B 294EFC <1> sub word [bp + ?length], cx 7732 0000819E 835EFE00 <1> sbb word [bp + ?length + 2], 0 7733 000081A2 010E[7C8C] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 7734 000081A6 8316[7E8C]00 <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7735 000081AB 014EF0 <1> add word [bp + ?how_far_in_cluster], cx 7736 000081AE 8356F200 <1> adc word [bp + ?how_far_in_cluster + 2], 0 7737 <1> 7738 000081B2 837EFA00 <1> cmp word [bp + ?length_this_cluster + 2], 0 7739 000081B6 75A7 <1> jne .next_sector 7740 000081B8 837EF800 <1> cmp word [bp + ?length_this_cluster], 0 7741 000081BC 75A1 <1> jne .next_sector 7742 <1> 7743 000081BE 8B7EF4 <1> mov di, word [bp + ?bytes_per_cluster] 7744 000081C1 8B76F6 <1> mov si, word [bp + ?bytes_per_cluster + 2] 7745 000081C4 397EF0 <1> cmp word [bp + ?how_far_in_cluster], di 7746 000081C7 7505 <1> jne @F 7747 000081C9 3976F2 <1> cmp word [bp + ?how_far_in_cluster + 2], si 7748 000081CC 740E <1> je @FF 7749 <1> @@: 7750 000081CE 837EFE00 <1> cmp word [bp + ?length + 2], 0 7751 000081D2 756D <1> jne .error 7752 000081D4 837EFC00 <1> cmp word [bp + ?length], 0 7753 000081D8 7567 <1> jne .error 7754 000081DA EB65 <1> jmp .return 7755 <1> 7756 <1> @@: 7757 000081DC A1[788C] <1> mov ax, word [load_data - LOADDATA2 + ldCurrentCluster] 7758 000081DF 8B16[7A8C] <1> mov dx, word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7759 000081E3 E8BDF3 <1> call check_clust 7760 000081E6 7259 <1> jc .error 7761 000081E8 E804F3 <1> call clust_next.dxax 7762 000081EB 732F <1> jnc @F ; (NC) --> 7763 000081ED B8F6FF <1> mov ax, 0FFF8h - 2 7764 000081F0 BAFF0F <1> mov dx, 0FFFh 7765 000081F3 8B3E[7C8C] <1> mov di, word [load_data - LOADDATA2 + ldCurrentSeek] 7766 000081F7 8B36[7E8C] <1> mov si, word [load_data - LOADDATA2 + ldCurrentSeek + 2] 7767 000081FB 3B36[748C] <1> cmp si, word [load_data - LOADDATA2 + ldFileSize] 7768 000081FF 7506 <1> jne .set_error 7769 00008201 3B3E[768C] <1> cmp di, word [load_data - LOADDATA2 + ldFileSize + 2] 7770 00008205 7401 <1> je .do_not_set_error ; if same then NC --> 7771 <1> .set_error: 7772 00008207 F9 <1> stc 7773 <1> .do_not_set_error: 7774 00008208 9C <1> pushf 7775 00008209 31C9 <1> xor cx, cx 7776 0000820B 31DB <1> xor bx, bx 7777 0000820D 874EFC <1> xchg cx, word [bp + ?length] 7778 00008210 875EFE <1> xchg bx, word [bp + ?length + 2] 7779 00008213 010E[7C8C] <1> add word [load_data - LOADDATA2 + ldCurrentSeek], cx 7780 00008217 111E[7E8C] <1> adc word [load_data - LOADDATA2 + ldCurrentSeek + 2], bx 7781 0000821B A8 <1> db __TEST_IMM8 ; (skip pushf) 7782 <1> @@: 7783 0000821C 9C <1> pushf 7784 0000821D 83C002 <1> add ax, 2 7785 00008220 83D200 <1> adc dx, 0 7786 00008223 A3[788C] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster], ax 7787 00008226 8916[7A8C] <1> mov word [load_data - LOADDATA2 + ldCurrentCluster + 2], dx 7788 0000822A 9D <1> popf ; CF 7789 0000822B 7214 <1> jc .error 7790 0000822D 8B4EFC <1> mov cx, word [bp + ?length] 7791 00008230 8B5EFE <1> mov bx, word [bp + ?length + 2] 7792 00008233 85DB <1> test bx, bx 7793 00008235 7403E9E1FE <1> jnz .next_cluster 7794 0000823A 85C9 <1> test cx, cx 7795 0000823C 7403E9DAFE <1> jnz .next_cluster 7796 <1> .return: 7797 <1> .error: 7798 <1> 7799 00008241 5D <1> pop bp 7800 <1> 7801 00008242 8F06[9E0A] <1> pop word [throwsp] 7802 00008246 8F06[9C0A] <1> pop word [throwret] ; restore throw destination 7803 0000824A 8F06[9A0A] <1> pop word [errret] 7804 <1> 7805 0000824E 9C <1> pushf 7806 0000824F F646EA01 <1> testopt [bp + ?did_guard_auxbuff], 1 7807 00008253 7405 <1> jz @F 7808 00008255 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 7809 <1> @@: 7810 0000825A 9D <1> popf ; CF 7811 <1> 7812 0000825B E81DFC <1> call yy_boot_update 7813 <1> 7814 0000825E 5F <1> pop di 7815 0000825F 5E <1> pop si 7816 00008260 89EC5D <1> lleave 7817 00008263 C3 <1> retn 7818 <1> 7819 <1> .err_ret: 7820 00008264 8B26[9E0A] <1> mov sp, word [throwsp] ; restore stack 7821 <1> ; (needed here if returned to errret) 7822 00008268 EBD7 <1> jmp .error 7823 <1> 7824 <1> 7825 <1> ; INP: [load_input_file] = active file 7826 <1> ; cx:dx = 0 7827 <1> ; OUT: - 7828 <1> ; CHG: ax, bx, cx, dx 7829 <1> ; STT: ds = es = ss 7830 <1> yy_boot_seek_start: 7831 0000826A 56 <1> push si 7832 0000826B 57 <1> push di 7833 <1> 7834 0000826C E8F3FB <1> call yy_boot_get 7835 <1> 7836 <1> .reset: 7837 <1> ; reset current cluster to first, seek to 0 7838 0000826F FF36[A28C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster + 2] 7839 00008273 FF36[A08C] <1> push word [load_data - LOADDATA2 + lsvFirstCluster] 7840 00008277 8F06[788C] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster] 7841 0000827B 8F06[7A8C] <1> pop word [load_data - LOADDATA2 + ldCurrentCluster + 2] 7842 0000827F 8326[7C8C]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek], 0 7843 00008284 8326[7E8C]00 <1> and word [load_data - LOADDATA2 + ldCurrentSeek + 2], 0 7844 <1> 7845 00008289 E8EFFB <1> call yy_boot_update 7846 <1> 7847 0000828C 5F <1> pop di 7848 0000828D 5E <1> pop si 7849 0000828E C3 <1> retn 7850 <1> %endif 7851 <1> 7852 <1> 7853 <1> ; INP: bp = load_data - LOADDATA2 7854 <1> initialise_fs: 7855 <1> ; (boot.asm code starts here) 7856 <1> 7857 0000828F 31C0 <1> xor ax, ax 7858 <1> ; calculate some values that we need: 7859 <1> ; adjusted sectors per cluster (store in a word, 7860 <1> ; and decode EDR-DOS's special value 0 meaning 256) 7861 00008291 8A460D <1> mov al, [bp + bsBPB + bpbSectorsPerCluster] 7862 00008294 FEC8 <1> dec al 7863 00008296 40 <1> inc ax 7864 00008297 8946E8 <1> mov [bp + ldClusterSize], ax 7865 <1> 7866 0000829A 8B46D4 <1> mov ax, [bp + ldEntriesPerSector] 7867 <1> 7868 <1> ; number of sectors used for root directory (store in CX) 7869 0000829D 31D2 <1> xor dx, dx 7870 0000829F 89C3 <1> mov bx, ax 7871 000082A1 48 <1> dec ax ; rounding up 7872 000082A2 034611 <1> add ax, [bp + bsBPB + bpbNumRootDirEnts] ; (0 iff FAT32) 7873 000082A5 11D2 <1> adc dx, dx ; account for overflow (dx was zero) 7874 000082A7 F7F3 <1> div bx ; get number of root sectors 7875 000082A9 91 <1> xchg ax, cx ; cx = number of root secs 7876 <1> 7877 <1> 7878 <1> ; (iniload.asm code starts here) 7879 <1> 7880 000082AA 51 <1> push cx ; number of root secs 7881 000082AB 31C0 <1> xor ax, ax 7882 <1> ; first sector of root directory 7883 000082AD 8A4610 <1> mov al, [bp + bsBPB + bpbNumFATs] ; ! ah = 0, hence ax = number of FATs 7884 000082B0 8B4E16 <1> mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 7885 000082B3 31FF <1> xor di, di ; di:cx = sectors per FAT 7886 <1> ; iff FAT12, FAT16 7887 000082B5 85C9 <1> test cx, cx ; is FAT32 ? 7888 000082B7 7506 <1> jnz @F ; no --> 7889 000082B9 8B4E24 <1> mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 7890 000082BC 8B7E26 <1> mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 7891 <1> @@: 7892 000082BF 50 <1> push ax 7893 000082C0 F7E1 <1> mul cx 7894 <1> ; ax = low word SpF*nF 7895 <1> ; dx = high word 7896 000082C2 93 <1> xchg bx, ax 7897 000082C3 87CA <1> xchg cx, dx 7898 <1> ; cx:bx = first mul 7899 000082C5 58 <1> pop ax 7900 000082C6 F7E7 <1> mul di 7901 <1> ; ax = high word adjust 7902 <1> ; dx = third word 7903 000082C8 85D2 <1> test dx, dx 7904 000082CA 740C <1> jz @F 7905 <1> .error_badchain: 7906 <1> error_badchain: equ $ 7907 000082CC BA[8F62] <1> mov dx, msg.boot_badchain 7908 000082CF B80D02 <1> mov ax, 020Dh 7909 000082D2 E88422 <1> call setrc 7910 000082D5 E957E1 <1> jmp bootcmd.fail 7911 <1> 7912 <1> @@: 7913 000082D8 92 <1> xchg dx, ax 7914 <1> ; dx = high word adjust 7915 000082D9 01CA <1> add dx, cx 7916 <1> ; dx:bx = result 7917 000082DB 93 <1> xchg ax, bx 7918 <1> ; dx:ax = result 7919 000082DC 72EE <1> jc .error_badchain 7920 <1> 7921 000082DE 03460E <1> add ax, [bp + bsBPB + bpbReservedSectors] 7922 000082E1 83D200 <1> adc dx, byte 0 7923 000082E4 72E6 <1> jc .error_badchain 7924 <1> 7925 000082E6 59 <1> pop cx ; number of root sectors 7926 000082E7 31FF <1> xor di, di 7927 <1> 7928 <1> ; first sector of disk data area: 7929 000082E9 01C1 <1> add cx, ax 7930 000082EB 11D7 <1> adc di, dx 7931 000082ED 72DD <1> jc .error_badchain 7932 000082EF 894EFC <1> mov [bp + lsvDataStart], cx 7933 000082F2 897EFE <1> mov [bp + lsvDataStart + 2], di 7934 <1> 7935 000082F5 8946D0 <1> mov [bp + ldRootSector], ax 7936 000082F8 8956D2 <1> mov [bp + ldRootSector + 2], dx 7937 <1> 7938 <1> ; total sectors 7939 000082FB 31D2 <1> xor dx, dx 7940 000082FD 8B4613 <1> mov ax, [bp + bsBPB + bpbTotalSectors] 7941 00008300 85C0 <1> test ax, ax 7942 00008302 7506 <1> jnz @F 7943 00008304 8B5622 <1> mov dx, [bp + bsBPB + bpbTotalSectorsLarge + 2] 7944 00008307 8B4620 <1> mov ax, [bp + bsBPB + bpbTotalSectorsLarge] 7945 <1> 7946 <1> ; fall through and let it overwrite the field with the 7947 <1> ; already current contents. saves a jump. 7948 <1> @@: 7949 0000830A 895622 <1> mov [bp + bsBPB + bpbTotalSectorsLarge + 2], dx 7950 0000830D 894620 <1> mov [bp + bsBPB + bpbTotalSectorsLarge], ax 7951 <1> 7952 <1> ; dx:ax = total sectors 7953 <1> 7954 00008310 8B5E16 <1> mov bx, [bp + bsBPB + bpbSectorsPerFAT] 7955 00008313 C646E620 <1> mov byte [bp + ldFATType], 32 7956 00008317 85DB <1> test bx, bx 7957 00008319 740B <1> jz @F 7958 <1> 7959 0000831B 31C9 <1> xor cx, cx 7960 <1> 7961 0000831D 895E24 <1> mov word [bp + bsBPB + ebpbSectorsPerFATLarge], bx 7962 00008320 894E26 <1> mov word [bp + bsBPB + ebpbSectorsPerFATLarge + 2], cx 7963 00008323 894E28 <1> mov word [bp + bsBPB + ebpbFSFlags], cx 7964 <1> ; FSVersion, RootCluster, FSINFOSector, BackupSector, Reserved: 7965 <1> ; uninitialised here (initialised by loaded_all later) 7966 <1> 7967 <1> @@: 7968 <1> ; dx:ax = total amount of sectors 7969 00008326 2B46FC <1> sub ax, word [bp + lsvDataStart] 7970 00008329 1B56FE <1> sbb dx, word [bp + lsvDataStart + 2] 7971 <1> 7972 <1> ; dx:ax = total amount of data sectors 7973 0000832C 89C3 <1> mov bx, ax 7974 0000832E 92 <1> xchg ax, dx 7975 0000832F 31D2 <1> xor dx, dx 7976 00008331 F776E8 <1> div word [bp + ldClusterSize] 7977 00008334 93 <1> xchg bx, ax 7978 00008335 F776E8 <1> div word [bp + ldClusterSize] 7979 <1> ; bx:ax = quotient, dx = remainder 7980 <1> ; bx:ax = number of clusters 7981 00008338 85DB <1> test bx, bx 7982 0000833A 741F <1> jz @FF 7983 <1> ; >= 1_0000h clusters, should be FAT32 7984 0000833C 81FBFF0F <1> cmp bx, 0FFFh 7985 00008340 770D <1> ja .badclusters 7986 00008342 7505 <1> jne @F 7987 00008344 83F8F5 <1> cmp ax, 0FFF7h - 2 7988 00008347 7706 <1> ja .badclusters 7989 <1> @@: 7990 <1> ; check it is really FAT32 7991 00008349 837E1600 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 7992 0000834D 7447 <1> je .gotfattype 7993 <1> 7994 <1> .badclusters: 7995 0000834F BA[7562] <1> mov dx, msg.boot_badclusters 7996 00008352 B80E02 <1> mov ax, 020Eh 7997 00008355 E80122 <1> call setrc 7998 00008358 E9D4E0 <1> jmp bootcmd.fail 7999 <1> 8000 <1> @@: 8001 <1> ; <= FFFFh clusters, must be FAT16 or FAT12 8002 <1> ; check it is really not FAT32 8003 0000835B 837E1600 <1> cmp word [bp + bsBPB + bpbSectorsPerFAT], 0 8004 0000835F 74EE <1> je .badclusters 8005 <1> 8006 00008361 83F8F5 <1> cmp ax, 0FFF7h - 2 ; too much for FAT16 ? 8007 00008364 77E9 <1> ja .badclusters 8008 00008366 C646E610 <1> mov byte [bp + ldFATType], 16 8009 0000836A 3DF50F <1> cmp ax, 0FF7h - 2 ; is it FAT12 ? 8010 0000836D 7727 <1> ja .gotfattype ; no, is FAT16 --> 8011 <1> 8012 0000836F C646E60C <1> mov byte [bp + ldFATType], 12 8013 <1> 8014 00008373 F606[978C]02 <1> testopt [load_ldflags], ldfFATInvalid 8015 00008378 751C <1> jnz .gotfattype 8016 <1> 8017 0000837A 53 <1> push bx 8018 0000837B 50 <1> push ax 8019 <1> ; (boot.asm code continues here) 8020 <1> 8021 <1> ; Load the entire FAT into memory. This is easily feasible for FAT12, 8022 <1> ; as the FAT can only contain at most 4096 entries. 8023 <1> ; (The exact condition should be "at most 4087 entries", or with a 8024 <1> ; specific FF7h semantic, "at most 4088 entries"; the more reliable 8025 <1> ; and portable alternative would be "at most 4080 entries".) 8026 <1> ; Thus, no more than 6 KiB need to be read, even though the FAT size 8027 <1> ; as indicated by word[sectors_per_fat] could be much higher. The 8028 <1> ; first loop condition below is to correctly handle the latter case. 8029 <1> ; (Sector size is assumed to be a power of two between 32 and 8192 8030 <1> ; bytes, inclusive. An 8 KiB buffer is necessary if the sector size 8031 <1> ; is 4 or 8 KiB, because reading the FAT can or will write to 8 KiB 8032 <1> ; of memory instead of only the relevant 6 KiB. This is always true 8033 <1> ; if the sector size is 8 KiB, and with 4 KiB sector size it is true 8034 <1> ; iff word[sectors_per_fat] is higher than one.) 8035 0000837C BF0018 <1> mov di, 6 << 10 ; maximum size of FAT12 to load 8036 0000837F 8B4E16 <1> mov cx, [bp + bsBPB + bpbSectorsPerFAT] 8037 <1> ; maximum size of this FS's FAT 8038 00008382 31D2 <1> xor dx, dx 8039 00008384 8B460E <1> mov ax, [bp + bsBPB + bpbReservedSectors]; = first FAT sector 8040 00008387 8B5EF8 <1> mov bx, [bp + lsvFATSeg] 8041 <1> @@: 8042 0000838A E8B8F5 <1> call read_sector ; read next FAT sector 8043 0000838D 2B7E0B <1> sub di, [bp + bsBPB + bpbBytesPerSector] 8044 <1> ; di = bytes still left to read 8045 00008390 7602 <1> jbe @F ; if none --> 8046 <1> ; (jbe means jump if CF || ZF) 8047 00008392 E2F6 <1> loop @B ; if any FAT sector still remains --> 8048 <1> @@: ; one of the limits reached; FAT read 8049 00008394 58 <1> pop ax 8050 00008395 5B <1> pop bx 8051 <1> 8052 <1> .gotfattype: 8053 <1> 8054 <1> ; if bx:ax = 1, then entries 0, 1, 2 are valid 8055 00008396 83C001 <1> add ax, 1 8056 00008399 83D300 <1> adc bx, 0 8057 <1> ; max entry is x+1 (2 if x=1) 8058 <1> 8059 0000839C 8946C0 <1> mov word [bp + ldMaxCluster], ax 8060 0000839F 895EC2 <1> mov word [bp + ldMaxCluster + 2], bx 8061 <1> 8062 <1> ; if bx:ax was = 1, then entries below 3 have to exist 8063 000083A2 83C001 <1> add ax, 1 8064 000083A5 83D300 <1> adc bx, 0 8065 <1> ; if bx:ax was 1, bx:ax now = 3 8066 <1> 8067 000083A8 89DA <1> mov dx, bx 8068 <1> 8069 000083AA 807EE610 <1> cmp byte [bp + ldFATType], 16 8070 000083AE 720C <1> jb .check_fat_limit_12 8071 000083B0 7404 <1> je .check_fat_limit_16 8072 <1> .check_fat_limit_32: 8073 000083B2 01C0 <1> add ax, ax 8074 000083B4 11D2 <1> adc dx, dx 8075 <1> .check_fat_limit_16: 8076 000083B6 01C0 <1> add ax, ax 8077 000083B8 11D2 <1> adc dx, dx 8078 000083BA EB0D <1> jmp @F 8079 <1> 8080 <1> .check_fat_limit_12: 8081 000083BC 89C2 <1> mov dx, ax 8082 000083BE 01C0 <1> add ax, ax 8083 000083C0 01D0 <1> add ax, dx ; * 3 8084 000083C2 D1E8 <1> shr ax, 1 ; * 3 / 2 = * 1.5 8085 000083C4 83D000 <1> adc ax, 0 ; if the last nybble is needed 8086 000083C7 31D2 <1> xor dx, dx 8087 <1> 8088 <1> @@: 8089 000083C9 8B5E0B <1> mov bx, word [bp + bsBPB + bpbBytesPerSector] 8090 000083CC 4B <1> dec bx 8091 000083CD 01D8 <1> add ax, bx 8092 000083CF 83D200 <1> adc dx, 0 8093 000083D2 43 <1> inc bx 8094 <1> 8095 000083D3 91 <1> xchg cx, ax 8096 000083D4 89D0 <1> mov ax, dx 8097 000083D6 31D2 <1> xor dx, dx 8098 000083D8 F7F3 <1> div bx 8099 000083DA 91 <1> xchg cx, ax 8100 000083DB F7F3 <1> div bx 8101 000083DD 87CA <1> xchg cx, dx 8102 <1> ; cx = remainder, dx:ax = number of sectors needed 8103 <1> 8104 000083DF 8B4E16 <1> mov cx, word [bp + bsBPB + bpbSectorsPerFAT] 8105 000083E2 31FF <1> xor di, di ; di:cx = sectors per FAT 8106 <1> ; iff FAT12, FAT16 8107 000083E4 85C9 <1> test cx, cx ; is FAT32 ? 8108 000083E6 7506 <1> jnz @F ; no --> 8109 000083E8 8B4E24 <1> mov cx, word [bp + bsBPB + ebpbSectorsPerFATLarge] 8110 000083EB 8B7E26 <1> mov di, word [bp + bsBPB + ebpbSectorsPerFATLarge + 2] ; for FAT32 8111 <1> @@: 8112 <1> 8113 000083EE 39D7 <1> cmp di, dx 8114 000083F0 7502 <1> jne @F 8115 000083F2 39C1 <1> cmp cx, ax 8116 <1> @@: 8117 000083F4 730C <1> jae @F 8118 <1> .badfat: 8119 000083F6 BA[A462] <1> mov dx, msg.boot_badfat 8120 000083F9 B80F02 <1> mov ax, 020Fh 8121 000083FC E85A21 <1> call setrc 8122 000083FF E92DE0 <1> jmp bootcmd.fail 8123 <1> 8124 <1> @@: 8125 00008402 C3 <1> retn 2529 %endif 2530 2531 2532 usesection lDEBUG_CODE 2533 2534 bb: 2535 %if _BOOTLDR 2536 00008403 F606[9D00]40 testopt [internalflags], nodosloaded 2537 00008408 740F jz @F 2538 0000840A 4E dec si 2539 0000840B 4E dec si ; -> at 'B' 2540 0000840C BA[9C63] mov dx, msg.boot 2541 0000840F E8C934 call isstring? ; check for "BOOT" 2542 00008412 7503E939DB je bootcmd 2543 00008417 46 inc si ; skip 'B' 2544 00008418 AC lodsb ; load next 2545 @@: 2546 %endif 2547 00008419 E82708 call uppercase 2548 %if _BREAKPOINTS 2549 0000841C 3C50 cmp al, 'P' 2550 0000841E 7449 je point_set 2551 00008420 3C4E cmp al, 'N' 2552 00008422 7503E91302 je point_number 2553 00008427 3C43 cmp al, 'C' 2554 00008429 7503E9AA04 je point_clear 2555 0000842E 3C44 cmp al, 'D' 2556 00008430 7503E91E05 je point_disable 2557 00008435 3C45 cmp al, 'E' 2558 00008437 7503E90B05 je point_enable 2559 0000843C 3C54 cmp al, 'T' 2560 0000843E 7503E91A05 je point_toggle 2561 00008443 3C4C cmp al, 'L' 2562 00008445 7503E91D05 je point_list 2563 0000844A 3C49 cmp al, 'I' 2564 0000844C 7503E94102 je point_id 2565 00008451 3C57 cmp al, 'W' 2566 00008453 7503E97F03 je point_when 2567 %if BPSIZE == 6 || BPSIZE == 9 2568 00008458 3C4F cmp al, 'O' 2569 0000845A 7503E91803 je point_offset 2570 %endif 2571 %endif 2572 0000845F 3C55 cmp al, 'U' ; BU command ? 2573 00008461 7503E9D307 je bu_breakpoint 2574 2575 00008466 E9A920 jmp error ; no valid subcommand --> 2576 2577 %if _BREAKPOINTS 2578 point_set: 2579 00008469 E82335 call skipwhite 2580 2581 0000846C E8EB06 call getpointat ; "AT" keyword ? 2582 0000846F 720B jc .not_at ; no --> 2583 00008471 BF[AF84] mov di, .get_saved ; access saved address later 2584 00008474 E8A106 call findpointat ; do we find it ? 2585 00008477 7210 jc .find_new ; no, treat as if "NEW" keyword given --> 2586 ; point index is in dx 2587 00008479 52 push dx 2588 0000847A EB51 jmp @FF ; skip check whether used 2589 2590 .not_at: 2591 0000847C BF[A384] mov di, .get_addr ; get address from input command line later 2592 0000847F E8F906 call getpointindex 2593 00008482 7338 jnc @F ; got an index --> 2594 00008484 7503E98920 jz error ; "ALL" is invalid 2595 ; got "NEW" keyword 2596 .find_new: 2597 00008489 31C9 xor cx, cx 2598 0000848B 50 push ax 2599 .new_loop: 2600 0000848C 89C8 mov ax, cx ; try this index 2601 0000848E E87806 call calcpointbit 2602 %if ((_NUM_B_BP+7)>>3) != 1 2603 00008491 84A7[0201] test byte [b_bplist.used_mask+bx], ah 2604 %else 2605 test byte [b_bplist.used_mask], ah 2606 %endif 2607 00008495 7421 jz .new_found ; found unused one --> 2608 2609 00008497 41 inc cx ; = next index 2610 00008498 83F910 cmp cx, _NUM_B_BP ; valid ? 2611 0000849B 72EF jb .new_loop ; yes, try next --> 2612 2613 0000849D BA[D46D] mov dx, msg.bb_no_new 2614 000084A0 E9FE7F jmp prnquit 2615 2616 2617 ; INP: al=, si-> input line 2618 ; OUT: al=, si-> after 2619 ; bx:dx = linear adddress 2620 ; does not return if error 2621 ; CHG: edxh 2622 .get_addr: 2623 000084A3 8B1E[900C] mov bx, word [reg_cs] 2624 000084A7 E834B3 call getlinearaddr 2625 000084AA 730B jnc .retn 2626 000084AC E96320 jmp error 2627 2628 2629 ; INP: al=, si-> input line 2630 ; OUT: bx:dx = linear address 2631 ; CHG: - 2632 .get_saved: 2633 000084AF 8B16[1890] mov dx, word [..@bb_saved_linear] 2634 000084B3 8B1E[1A90] mov bx, word [..@bb_saved_linear + 2] 2635 .retn: 2636 000084B7 C3 retn 2637 2638 usesection lDEBUG_DATA_ENTRY 2639 00009016 00 align 4, db 0 2640 ..@bb_saved_linear: 2641 00009018 00000000 dd 0 2642 usesection lDEBUG_CODE 2643 2644 2645 .new_found: 2646 000084B8 58 pop ax 2647 000084B9 51 push cx 2648 000084BA EB11 jmp @FF 2649 2650 @@: 2651 000084BC 52 push dx 2652 000084BD 50 push ax 2653 000084BE 89D0 mov ax, dx 2654 000084C0 E84606 call calcpointbit 2655 %if ((_NUM_B_BP+7)>>3) != 1 2656 000084C3 84A7[0201] test byte [b_bplist.used_mask+bx], ah 2657 %else 2658 test byte [b_bplist.used_mask], ah 2659 %endif 2660 000084C7 58 pop ax 2661 000084C8 7403E94520 jnz error 2662 @@: 2663 000084CD FFD7 call di ; call either .get_addr or .get_saved 2664 ; in any case, bx:dx = linear address 2665 000084CF BF0080 mov di, 8000h ; default counter 2666 000084D2 52 push dx 2667 000084D3 31D2 xor dx, dx 2668 2669 usesection lDEBUG_DATA_ENTRY 2670 align 4, db 0 2671 ..@bb_id_start: 2672 0000901C 0000 dw 0 2673 ..@bb_id_length: 2674 0000901E 0000 dw 0 2675 ..@bb_when_start: 2676 00009020 0000 dw 0 2677 ..@bb_when_length: 2678 00009022 0000 dw 0 2679 usesection lDEBUG_CODE 2680 2681 2682 000084D5 8916[1E90] mov word [..@bb_id_length], dx 2683 000084D9 8916[2290] mov word [..@bb_when_length], dx 2684 ; initialise to empty ID 2685 000084DD 52 push dx 2686 .loop_additional: 2687 000084DE E8AF34 call skipwh0 2688 000084E1 4E dec si 2689 000084E2 BA[4E65] mov dx, msg.number 2690 000084E5 E8F333 call isstring? 2691 000084E8 7435 je .additional_number 2692 000084EA BA[5565] mov dx, msg.counter 2693 000084ED E8EB33 call isstring? 2694 000084F0 742D je .additional_number 2695 000084F2 BA[5D65] mov dx, msg.id 2696 000084F5 E8E333 call isstring? 2697 000084F8 745A je .additional_id 2698 000084FA BA[6065] mov dx, msg.when 2699 000084FD E8DB33 call isstring? 2700 00008500 7444 je .additional_when 2701 %if BPSIZE == 6 || BPSIZE == 9 2702 00008502 BA[6565] mov dx, msg.offset 2703 00008505 E8D333 call isstring? 2704 00008508 7425 je .additional_offset 2705 %endif 2706 0000850A AC lodsb 2707 0000850B E82C34 call iseol? 2708 0000850E 744B je .no_additional 2709 00008510 5A pop dx 2710 00008511 85D2 test dx, dx ; already got a number without keyword? 2711 00008513 7403E9FA1F jnz error ; yes --> 2712 00008518 42 inc dx ; remember for subsequent iterations 2713 00008519 52 push dx 2714 0000851A E87334 call skipwh0 2715 0000851D EB0B jmp @F 2716 2717 .additional_number: 2718 0000851F E85734 call skipequals 2719 00008522 E81534 call iseol? 2720 00008525 7503E9E81F je error 2721 @@: 2722 0000852A E8DC00 call getcounter 2723 0000852D EBAF jmp .loop_additional 2724 2725 %if BPSIZE == 6 || BPSIZE == 9 2726 .additional_offset: 2727 0000852F 5A pop dx 2728 00008530 80CA01 or dl, 1 ; remember for subsequent iterations 2729 ; not to accept number without keyword 2730 00008533 52 push dx 2731 00008534 E84234 call skipequals 2732 %if _PM 2733 00008537 53 push bx 2734 00008538 E8F82D call getdword 2735 0000853B 8916[5085] mov word [bp_offset], dx 2736 0000853F 891E[5285] mov word [bp_offset + 2], bx 2737 00008543 5B pop bx 2738 %else 2739 call getword 2740 mov word [bp_offset], dx 2741 %endif 2742 00008544 EB98 jmp .loop_additional 2743 %endif 2744 2745 .additional_when: 2746 00008546 5A pop dx 2747 00008547 80CA01 or dl, 1 ; remember for subsequent iterations 2748 ; not to accept number without keyword 2749 0000854A 52 push dx 2750 0000854B E82B34 call skipequals 2751 0000854E 4E dec si 2752 0000854F E88C00 call get_when 2753 00008552 EB8A jmp .loop_additional 2754 2755 .additional_id: 2756 00008554 E82234 call skipequals 2757 00008557 4E dec si 2758 00008558 E85300 call get_id 2759 2760 .no_additional: 2761 0000855B 5A pop dx ; discard non-keyword NUMBER indicator 2762 0000855C 5A pop dx ; restore dx = low word of linear 2763 2764 0000855D 87DA xchg bx, dx ; dx:bx = linear 2765 0000855F 93 xchg bx, ax ; dx:ax = linear 2766 00008560 5B pop bx ; = 0-based point index to set 2767 00008561 52 push dx 2768 00008562 50 push ax ; on stack: dword linear 2769 2770 00008563 57 push di 2771 00008564 87D3 xchg dx, bx ; dx = point index 2772 2773 ; As for set_id, set_when will free a prior condition 2774 ; when writing the new one. However, we check for the 2775 ; appropriate buffer size being still free before 2776 ; calling set_when because we want to cancel the point 2777 ; initialisation if either the ID or the condition do 2778 ; not fit, without having yet written anything. 2779 00008566 E8F602 call check_when_space ; CHG ax, bx, cx, si, di 2780 2781 ; Note that point_clear and init both leave the 2782 ; empty word in the ID array. Therefore we can 2783 ; always handle this by freeing the prior value 2784 ; first, which is required if we're resetting 2785 ; an existing point with BP AT. 2786 ; The set_id function takes care of this. 2787 00008569 E86501 call set_id ; CHG ax, bx, cx, si, di 2788 2789 ; After check_when_space then set_id both returned, 2790 ; we have finally checked all error conditions and 2791 ; are now actually modifying things. 2792 0000856C E8B402 call set_when ; CHG ax, bx, cx, si, di 2793 0000856F 92 xchg ax, dx ; ax = point index 2794 00008570 5F pop di ; preserve counter value 2795 2796 00008571 89C3 mov bx, ax 2797 00008573 01DB add bx, bx 2798 00008575 01DB add bx, bx 2799 %if BPSIZE == 4 2800 %elif BPSIZE == 5 2801 add bx, ax 2802 %elif BPSIZE == 6 2803 add bx, ax ; * 5 2804 add bx, ax ; * 6 2805 %elif BPSIZE == 9 2806 00008577 01DB add bx, bx ; * 8 2807 00008579 01C3 add bx, ax ; * 9 2808 %else 2809 %error Unexpected breakpoint size 2810 %endif 2811 0000857B 8F87[0601] pop word [ b_bplist.bp + bx ] 2812 ; These two instructions need to stay in that order. 2813 ; For the non-PM version, the pop overwrites the byte 2814 ; that is then initialized to 0CCh (the breakpoint 2815 ; content byte). 2816 ; (This is not true for BPSIZE == 6. Instead, the pop 2817 ; overwrites the first byte of the preferred offset.) 2818 0000857F 8F87[0801] pop word [ b_bplist.bp + bx + 2 ] 2819 00008583 C687[0E01]CC mov byte [ b_bplist.bp + bx + BPSIZE - 1 ], 0CCh 2820 %if BPSIZE == 6 2821 push word [bp_offset] 2822 pop word [ b_bplist.bp + bx + 3 ] 2823 %elif BPSIZE == 9 2824 00008588 FF36[5085] push word [bp_offset] 2825 0000858C 8F87[0A01] pop word [ b_bplist.bp + bx + 4 ] 2826 00008590 FF36[5285] push word [bp_offset + 2] 2827 00008594 8F87[0C01] pop word [ b_bplist.bp + bx + 6 ] 2828 %endif 2829 00008598 89C3 mov bx, ax 2830 0000859A 01DB add bx, bx 2831 0000859C 89BF[9601] mov word [ b_bplist.counter + bx ], di 2832 000085A0 E86605 call calcpointbit 2833 %if ((_NUM_B_BP+7)>>3) != 1 2834 000085A3 08A7[0201] or byte [b_bplist.used_mask+bx], ah 2835 000085A7 F6D4 not ah 2836 000085A9 20A7[0401] and byte [b_bplist.disabled_mask+bx], ah 2837 %if _BREAKPOINTS_STICKY 2838 and byte [b_bplist.sticky_mask+bx], ah 2839 %endif 2840 %else 2841 or byte [b_bplist.used_mask], ah 2842 not ah 2843 and byte [b_bplist.disabled_mask], ah 2844 %if _BREAKPOINTS_STICKY 2845 and byte [b_bplist.sticky_mask], ah 2846 %endif 2847 %endif 2848 000085AD C3 retn 2849 2850 2851 ; INP: si -> first non-blank character 2852 ; OUT: ..@bb_id_start and ..@bb_id_length set 2853 ; does not return if error (too long) 2854 ; CHG: ax, cx, si 2855 get_id: 2856 000085AE 8936[1C90] mov word [..@bb_id_start], si 2857 @@: 2858 000085B2 AC lodsb 2859 000085B3 E88833 call iseol?.notsemicolon 2860 000085B6 75FA jne @B 2861 ; si -> after EOL char 2862 ; si - 1 -> EOL char 2863 @@: 2864 000085B8 4E dec si 2865 000085B9 3B36[1C90] cmp si, word [..@bb_id_start] 2866 000085BD 740C je @F 2867 000085BF 807CFF20 cmp byte [si - 1], 32 2868 000085C3 74F3 je @B 2869 000085C5 807CFF09 cmp byte [si - 1], 9 2870 000085C9 74ED je @B 2871 @@: 2872 000085CB 89F1 mov cx, si 2873 000085CD 2B0E[1C90] sub cx, word [..@bb_id_start] 2874 000085D1 890E[1E90] mov word [..@bb_id_length], cx 2875 000085D5 83F93F cmp cx, 63 2876 000085D8 7603E9351F ja error 2877 2878 %if 0 2879 push dx 2880 mov dx, msg.id 2881 call putsz 2882 mov al, 32 2883 call putc 2884 mov al, '"' 2885 call putc 2886 mov dx, word [..@bb_id_start] 2887 mov cx, word [..@bb_id_length] 2888 call disp_message_length_cx 2889 mov al, '"' 2890 call putc 2891 mov dx, crlf 2892 call putsz 2893 pop dx 2894 %endif 2895 000085DD C3 retn 2896 2897 2898 ; INP: si -> first non-blank character 2899 ; OUT: ..@bb_when_start and ..@bb_when_length set 2900 ; does not return if error 2901 ; al = character after the condition, si -> next 2902 ; CHG: ax, cx, si 2903 get_when: 2904 000085DE 8936[2090] mov word [..@bb_when_start], si 2905 @@: 2906 000085E2 AC lodsb 2907 000085E3 52 push dx 2908 000085E4 53 push bx 2909 000085E5 E84B2D call getexpression 2910 000085E8 5B pop bx 2911 000085E9 5A pop dx 2912 ; si -> after condition char 2913 ; si - 1 -> last condition char 2914 @@: 2915 000085EA 4E dec si 2916 000085EB 3B36[2090] cmp si, word [..@bb_when_start] 2917 000085EF 740C je @F 2918 000085F1 807CFF20 cmp byte [si - 1], 32 2919 000085F5 74F3 je @B 2920 000085F7 807CFF09 cmp byte [si - 1], 9 2921 000085FB 74ED je @B 2922 @@: 2923 000085FD 89F1 mov cx, si 2924 000085FF 2B0E[2090] sub cx, word [..@bb_when_start] 2925 00008603 890E[2290] mov word [..@bb_when_length], cx 2926 2927 00008607 AC lodsb 2928 %if 0 2929 push dx 2930 mov dx, msg.when 2931 call putsz 2932 mov al, 32 2933 call putc 2934 mov al, '"' 2935 call putc 2936 mov dx, word [..@bb_when_start] 2937 mov cx, word [..@bb_when_length] 2938 call disp_message_length_cx 2939 mov al, '"' 2940 call putc 2941 mov dx, crlf 2942 call putsz 2943 dec si 2944 lodsb 2945 pop dx 2946 %endif 2947 00008608 C3 retn 2948 2949 2950 ; INP: al = first character, si -> next character 2951 ; di = default value 2952 ; OUT: di = counter value (default if EOL) 2953 ; al = first character after number, si -> next 2954 ; CHG: - 2955 ; does not return if error encountered 2956 getcounter: 2957 .: 2958 00008609 E88433 call skipwh0 2959 0000860C E82B33 call iseol? 2960 0000860F 7407 je .got_counter 2961 00008611 52 push dx 2962 00008612 E80432 call getword 2963 00008615 89D7 mov di, dx 2964 00008617 5A pop dx 2965 .got_counter: 2966 00008618 C3 retn 2967 2968 2969 ; INP: al = first character, si -> next character 2970 ; OUT: di = counter value (defaults to 8000h) 2971 ; CHG: ax, si (flags not changed) 2972 ; does not return if error encountered 2973 .pushf_chkeol: 2974 00008619 9C pushf 2975 0000861A 52 push dx 2976 0000861B 4E dec si 2977 0000861C BA[4E65] mov dx, msg.number 2978 0000861F E8B932 call isstring? 2979 00008622 7408 je @F 2980 00008624 BA[5565] mov dx, msg.counter 2981 00008627 E8B132 call isstring? 2982 0000862A 7504 jne @FF 2983 @@: 2984 0000862C E84A33 call skipequals 2985 0000862F A8 db __TEST_IMM8 ; (skip lodsb) 2986 @@: 2987 00008630 AC lodsb 2988 00008631 5A pop dx 2989 00008632 E8D4FF call . 2990 00008635 E81733 call chkeol 2991 00008638 9D popf 2992 00008639 C3 retn 2993 2994 2995 point_number: 2996 0000863A E85233 call skipwhite 2997 2998 0000863D E81A05 call getpointat ; "AT" keyword ? 2999 00008640 7210 jc .not_at ; no --> 3000 00008642 E8D304 call findpointat ; do we find it ? 3001 00008645 7303E9C81E jc error ; not found --> 3002 0000864A BF0080 mov di, 8000h ; default counter 3003 0000864D E8C9FF call getcounter.pushf_chkeol 3004 00008650 EB29 jmp @F ; point index is in dx --> 3005 3006 .not_at: 3007 00008652 E82605 call getpointindex 3008 00008655 BF0080 mov di, 8000h ; default counter 3009 00008658 E8BEFF call getcounter.pushf_chkeol 3010 0000865B 731E jnc @F 3011 0000865D 7403E9B01E jnz error ; "NEW" is invalid --> 3012 3013 00008662 31C9 xor cx, cx 3014 .all_loop: 3015 00008664 89C8 mov ax, cx 3016 00008666 89CA mov dx, cx 3017 00008668 E89E04 call calcpointbit 3018 %if ((_NUM_B_BP+7)>>3) != 1 3019 0000866B 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3020 %else 3021 test byte [b_bplist.used_mask], ah 3022 %endif 3023 0000866F 7403 jz .all_next 3024 00008671 E81500 call .setnumber 3025 .all_next: 3026 00008674 41 inc cx 3027 00008675 83F910 cmp cx, _NUM_B_BP 3028 00008678 72EA jb .all_loop 3029 0000867A C3 retn 3030 3031 @@: 3032 0000867B 89D0 mov ax, dx 3033 0000867D E88904 call calcpointbit 3034 %if ((_NUM_B_BP+7)>>3) != 1 3035 00008680 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3036 %else 3037 test byte [b_bplist.used_mask], ah 3038 %endif 3039 00008684 7503E9891E jz error 3040 3041 .setnumber: 3042 00008689 89D3 mov bx, dx 3043 0000868B 01DB add bx, bx 3044 0000868D 89BF[9601] mov word [b_bplist.counter + bx], di 3045 00008691 C3 retn 3046 3047 3048 point_id: 3049 00008692 E8FA32 call skipwhite 3050 3051 00008695 E8C204 call getpointat ; "AT" keyword ? 3052 00008698 720A jc .not_at ; no --> 3053 0000869A E87B04 call findpointat ; do we find it ? 3054 0000869D 7303E9701E jc error ; not found --> 3055 000086A2 EB08 jmp @F ; point index is in dx --> 3056 3057 .not_at: 3058 000086A4 E8D404 call getpointindex 3059 000086A7 7303E9661E jc error ; "NEW" and "ALL" keywords are invalid --> 3060 3061 @@: 3062 000086AC 50 push ax 3063 000086AD 89D0 mov ax, dx 3064 000086AF E85704 call calcpointbit 3065 %if ((_NUM_B_BP+7)>>3) != 1 3066 000086B2 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3067 %else 3068 test byte [b_bplist.used_mask], ah 3069 %endif 3070 000086B6 7503E9571E jz error 3071 000086BB 58 pop ax 3072 3073 000086BC E8D132 call skipwh0 3074 3075 000086BF 4E dec si 3076 000086C0 52 push dx 3077 000086C1 BA[5D65] mov dx, msg.id 3078 000086C4 E81432 call isstring? 3079 000086C7 7504 jne .no_id_kw 3080 000086C9 E8AD32 call skipequals 3081 000086CC 4E dec si 3082 .no_id_kw: 3083 000086CD 5A pop dx 3084 000086CE E8DDFE call get_id 3085 3086 ; INP: ..@bb_id_start 3087 ; ..@bb_id_length 3088 ; dx = point index 3089 ; OUT: jumps to error if failure (too long) 3090 ; CHG: ax, bx, cx, si, di 3091 set_id: 3092 000086D1 BBFFFF mov bx, -1 3093 000086D4 E84000 call get_set_id_offset_length 3094 000086D7 B10A mov cl, 10 3095 000086D9 89D8 mov ax, bx 3096 000086DB D3EB shr bx, cl ; bx = length of ID to free 3097 3098 000086DD 8B36[F601] mov si, word [b_bplist.idbuffer.free] 3099 ; offset free 3100 000086E1 F7DE neg si ; - offset free 3101 000086E3 81C68001 add si, b_bplist.idbuffer.length 3102 ; 1024 - offset free = amount free 3103 000086E7 01DE add si, bx ; amount free + length of ID to free 3104 000086E9 8B0E[1E90] mov cx, word [..@bb_id_length] 3105 000086ED E33F jcxz .empty ; if no ID to set --> 3106 000086EF 39CE cmp si, cx ; enough free ? 3107 000086F1 8B36[1C90] mov si, word [..@bb_id_start] 3108 ; -> ID string 3109 000086F5 7303E9181E jb error ; no --> 3110 3111 000086FA 51 push cx 3112 000086FB E83700 call free_id ; actually free it now 3113 000086FE 59 pop cx 3114 000086FF 51 push cx 3115 00008700 89CB mov bx, cx ; length 3116 00008702 B10A mov cl, 10 ; offset part is 10 bits (0..1023) 3117 00008704 D3E3 shl bx, cl ; length is in top 6 bits (0..63) 3118 00008706 59 pop cx 3119 00008707 8B3E[F601] mov di, word [b_bplist.idbuffer.free] 3120 ; = offset of free part 3121 0000870B 010E[F601] add word [b_bplist.idbuffer.free], cx 3122 ; mark space as used 3123 0000870F 09FB or bx, di ; OR in the offset 3124 00008711 81C7[FA01] add di, b_bplist.idbuffer 3125 ; -> into buffer space 3126 00008715 F3A4 rep movsb ; write 3127 3128 ; now remember this 3129 .after_empty: 3130 ; INP: dx = 0-based point index 3131 ; bx = word to set (-1 if not to modify) 3132 ; OUT: bx = word read 3133 get_set_id_offset_length: equ $ 3134 00008717 87D3 xchg dx, bx 3135 00008719 D1E3 shl bx, 1 3136 0000871B FFB7[B601] push word [b_bplist.id + bx] 3137 0000871F 83FAFF cmp dx, -1 3138 00008722 7404 je @F 3139 00008724 8997[B601] mov word [b_bplist.id + bx], dx 3140 @@: 3141 00008728 5A pop dx 3142 00008729 D1EB shr bx, 1 3143 0000872B 87D3 xchg dx, bx 3144 0000872D C3 retn 3145 3146 .empty: 3147 0000872E E80400 call free_id 3148 00008731 31DB xor bx, bx ; offset = 0 and length = 0 3149 00008733 EBE2 jmp .after_empty 3150 3151 3152 ; INP: ax = offset/length word of ID to free 3153 ; (length zero means none) 3154 ; b_bplist.id = ID array (ONE of which matches ax) 3155 ; CHG: ax, bx, cx 3156 ; OUT: b_bplist.id entries adjusted 3157 ; (the one that is being freed is unaffected) 3158 ; b_bplist.idbuffer adjusted 3159 ; STT: UP, ss = ds = es 3160 ; REM: The b_bplist.id array contains zeroes as 3161 ; indicators of unused entries. This implies 3162 ; that the length field is zero too. However, 3163 ; the canonical NULL entry is *all* zeros. 3164 free_id: 3165 00008735 B10A mov cl, 10 3166 00008737 89C3 mov bx, ax 3167 00008739 81E3FF03 and bx, 1023 ; bx = offset of ID to free 3168 0000873D D3E8 shr ax, cl ; ax = length of ID to free 3169 0000873F 91 xchg cx, ax ; cx = length of ID to free 3170 3171 00008740 56 push si 3172 00008741 57 push di 3173 3174 00008742 E330 jcxz .return ; if none to free --> 3175 3176 00008744 51 push cx 3177 00008745 8DBF[FA01] lea di, [b_bplist.idbuffer + bx] 3178 ; -> ID to be freed 3179 ; (destination of following data) 3180 00008749 89FE mov si, di 3181 0000874B 01CE add si, cx ; -> behind ID to be freed 3182 ; (source of following data) 3183 0000874D 89F1 mov cx, si 3184 0000874F F7D9 neg cx ; minus pointer to first subsequent data 3185 00008751 81C1[7A03] add cx, b_bplist.idbuffer + b_bplist.idbuffer.length 3186 ; pointer behind buffer - pointer subsequent data 3187 ; = length of data to move 3188 00008755 F3A4 rep movsb ; now di -> first uninitialised byte 3189 00008757 59 pop cx ; = length of data freed 3190 3191 00008758 290E[F601] sub word [b_bplist.idbuffer.free], cx 3192 ; mark as free 3193 0000875C 51 push cx 3194 0000875D 30C0 xor al, al 3195 0000875F F3AA rep stosb ; clear the buffer trailer (uninitialised part) 3196 00008761 5F pop di ; di = length of data freed 3197 3198 00008762 BE[B601] mov si, b_bplist.id 3199 %if _NUM_B_BP < 256 3200 00008765 B110 mov cl, _NUM_B_BP 3201 %else 3202 mov cx, _NUM_B_BP 3203 %endif 3204 .loop: 3205 00008767 AD lodsw 3206 00008768 25FF03 and ax, 1023 ; get offset 3207 0000876B 39D8 cmp ax, bx ; offset matches what we're freeing ?, OR 3208 ; is it below/equal the offset we're freeing ? 3209 0000876D 7603 jbe .next ; yes --> (also jumps if ax == 0) 3210 0000876F 297CFE sub word [si - 2], di ; adjust offset 3211 ; This subtraction shouldn't underflow the 10 bits 3212 ; used for the offset, so it should leave the top 3213 ; 6 bits for the ID length unchanged. 3214 .next: 3215 00008772 E2F3 loop .loop 3216 3217 .return: 3218 00008774 5F pop di 3219 00008775 5E pop si 3220 00008776 C3 retn 3221 3222 3223 %if BPSIZE == 6 || BPSIZE == 9 3224 point_offset: 3225 00008777 E81532 call skipwhite 3226 3227 0000877A E8DD03 call getpointat ; "AT" keyword ? 3228 0000877D 720A jc .not_at ; no --> 3229 0000877F E89603 call findpointat ; do we find it ? 3230 00008782 7303E98B1D jc error ; not found --> 3231 00008787 EB08 jmp @F ; point index is in dx --> 3232 3233 .not_at: 3234 00008789 E8EF03 call getpointindex 3235 0000878C 7303E9811D jc error ; "NEW" and "ALL" keywords are invalid --> 3236 3237 @@: 3238 00008791 50 push ax 3239 00008792 89D0 mov ax, dx 3240 00008794 E87203 call calcpointbit 3241 %if ((_NUM_B_BP+7)>>3) != 1 3242 00008797 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3243 %else 3244 test byte [b_bplist.used_mask], ah 3245 %endif 3246 0000879B 7503E9721D jz error 3247 000087A0 58 pop ax 3248 3249 000087A1 E8EC31 call skipwh0 3250 000087A4 52 push dx 3251 000087A5 BAFFFF mov dx, -1 3252 %if BPSIZE == 9 3253 000087A8 89D3 mov bx, dx 3254 %endif 3255 000087AA E88D31 call iseol? 3256 000087AD 7414 je @F 3257 000087AF 4E dec si 3258 000087B0 BA[6565] mov dx, msg.offset 3259 000087B3 E82531 call isstring? 3260 000087B6 7504 jne .no_offset_kw 3261 000087B8 E8BE31 call skipequals 3262 000087BB 4E dec si 3263 .no_offset_kw: 3264 000087BC AC lodsb 3265 %if BPSIZE == 9 3266 000087BD E8732B call getdword ; bx:dx = offset 3267 %else 3268 call getword ; dx = offset 3269 %endif 3270 000087C0 E88C31 call chkeol 3271 @@: 3272 000087C3 58 pop ax 3273 000087C4 89C7 mov di, ax 3274 000087C6 01FF add di, di 3275 000087C8 01FF add di, di ; * 4 3276 %if BPSIZE == 6 3277 add di, ax ; * 5 3278 add di, ax ; * 6 3279 add di, b_bplist.bp + 3 3280 %elif BPSIZE == 9 3281 000087CA 01FF add di, di ; * 8 3282 000087CC 01C7 add di, ax ; * 9 3283 000087CE 81C7[0A01] add di, b_bplist.bp + 4 3284 %else 3285 %error Unexpected breakpoint size 3286 %endif 3287 000087D2 92 xchg ax, dx 3288 000087D3 AB stosw ; store low word of offset 3289 %if BPSIZE == 9 3290 000087D4 93 xchg ax, bx 3291 000087D5 AB stosw ; store high word of offset 3292 %endif 3293 000087D6 C3 retn 3294 %endif 3295 3296 3297 point_when: 3298 000087D7 E8B531 call skipwhite 3299 3300 000087DA E87D03 call getpointat ; "AT" keyword ? 3301 000087DD 720A jc .not_at ; no --> 3302 000087DF E83603 call findpointat ; do we find it ? 3303 000087E2 7303E92B1D jc error ; not found --> 3304 000087E7 EB08 jmp @F ; point index is in dx --> 3305 3306 .not_at: 3307 000087E9 E88F03 call getpointindex 3308 000087EC 7303E9211D jc error ; "NEW" and "ALL" keywords are invalid --> 3309 3310 @@: 3311 000087F1 50 push ax 3312 000087F2 89D0 mov ax, dx 3313 000087F4 E81203 call calcpointbit 3314 %if ((_NUM_B_BP+7)>>3) != 1 3315 000087F7 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3316 %else 3317 test byte [b_bplist.used_mask], ah 3318 %endif 3319 000087FB 7503E9121D jz error 3320 00008800 58 pop ax 3321 3322 00008801 E88C31 call skipwh0 3323 00008804 8326[2290]00 and word [..@bb_when_length], 0 3324 00008809 E82E31 call iseol? 3325 0000880C 7415 je @F 3326 0000880E 4E dec si 3327 0000880F 52 push dx 3328 00008810 BA[6065] mov dx, msg.when 3329 00008813 E8C530 call isstring? 3330 00008816 7504 jne .no_when_kw 3331 00008818 E85E31 call skipequals 3332 0000881B 4E dec si 3333 .no_when_kw: 3334 0000881C 5A pop dx 3335 0000881D E8BEFD call get_when 3336 00008820 E82C31 call chkeol 3337 @@: 3338 3339 3340 ; INP: ..@bb_when_start 3341 ; ..@bb_when_length 3342 ; dx = point index 3343 ; OUT: jumps to error if failure (too long) 3344 ; CHG: ax, bx, cx, si, di 3345 ; STT: UP, ss = ds = es 3346 set_when: 3347 00008823 E83900 call check_when_space ; cx = length (with terminating NUL) or 0, 3348 ; si -> clause (if cx != 0), 3349 ; ax = prior pointer or 0 3350 00008826 E330 jcxz .empty 3351 3352 00008828 51 push cx 3353 00008829 E86B00 call free_when ; actually free it now (INP ax) 3354 0000882C 59 pop cx 3355 0000882D 8B3E[F801] mov di, word [b_bplist.whenbuffer.free] 3356 ; = offset of free part 3357 00008831 010E[F801] add word [b_bplist.whenbuffer.free], cx 3358 ; mark space as used 3359 00008835 81C7[7A03] add di, b_bplist.whenbuffer 3360 ; -> into buffer space 3361 00008839 89FB mov bx, di ; bx -> buffer for clause, for set function 3362 ; si -> new clause (left by check function) 3363 0000883B F3A4 rep movsb ; write (with space for the NUL) 3364 0000883D C645FF00 mov byte [di - 1], 0 ; actually write a NUL 3365 3366 ; now remember this 3367 .after_empty: 3368 ; INP: dx = 0-based point index 3369 ; bx = word to set (-1 if not to modify) 3370 ; OUT: bx = word read 3371 get_set_when_offset: equ $ 3372 00008841 87D3 xchg dx, bx 3373 00008843 D1E3 shl bx, 1 3374 00008845 FFB7[D601] push word [b_bplist.when + bx] 3375 00008849 83FAFF cmp dx, -1 3376 0000884C 7404 je @F 3377 0000884E 8997[D601] mov word [b_bplist.when + bx], dx 3378 @@: 3379 00008852 5A pop dx 3380 00008853 D1EB shr bx, 1 3381 00008855 87D3 xchg dx, bx 3382 00008857 C3 retn 3383 3384 .empty: 3385 00008858 E83C00 call free_when 3386 0000885B 31DB xor bx, bx ; offset = 0 3387 0000885D EBE2 jmp .after_empty 3388 3389 3390 ; INP: ..@bb_when_start 3391 ; ..@bb_when_length 3392 ; dx = point index 3393 ; OUT: jumps to error if failure (too long) 3394 ; ax = prior pointer from array (to be freed), 3395 ; or 0 if no prior clause to free 3396 ; cx = length (including terminating NUL) 3397 ; or = 0 if no WHEN clause 3398 ; (if cx != 0) si -> WHEN clause data 3399 ; CHG: ax, bx, cx, si, di 3400 ; STT: UP, ss = ds = es 3401 check_when_space: 3402 0000885F BBFFFF mov bx, -1 3403 00008862 E8DCFF call get_set_when_offset 3404 3405 00008865 53 push bx 3406 00008866 85DB test bx, bx 3407 00008868 740D jz @F 3408 0000886A 89DF mov di, bx 3409 0000886C B9FFFF mov cx, -1 3410 0000886F B000 mov al, 0 3411 00008871 F2AE repne scasb 3412 00008873 F7D1 not cx ; = length to free (including terminating NUL) 3413 00008875 89CB mov bx, cx 3414 @@: ; bx = length to free 3415 00008877 58 pop ax ; ax -> prior clause in .whenbuffer 3416 3417 00008878 8B36[F801] mov si, word [b_bplist.whenbuffer.free] 3418 ; offset free 3419 0000887C F7DE neg si ; - offset free 3420 0000887E 81C60004 add si, b_bplist.whenbuffer.length 3421 ; 1024 - offset free = amount free 3422 00008882 01DE add si, bx ; amount free + length of condition to free 3423 00008884 8B0E[2290] mov cx, word [..@bb_when_length] 3424 00008888 E30C jcxz .empty ; if no condition to set --> 3425 0000888A 41 inc cx ; count terminating NUL 3426 0000888B 39CE cmp si, cx ; enough free ? 3427 0000888D 8B36[2090] mov si, word [..@bb_when_start] 3428 ; -> condition string 3429 00008891 7303E97C1C jb error ; no --> 3430 .empty: 3431 00008896 C3 retn 3432 3433 3434 ; INP: ax = offset word of condition to free 3435 ; (zero means none) 3436 ; b_bplist.when = condition array (ONE of which matches ax) 3437 ; CHG: ax, bx, cx 3438 ; OUT: b_bplist.when entries adjusted 3439 ; (the one that is being freed is unaffected) 3440 ; b_bplist.whenbuffer adjusted 3441 ; STT: UP, ss = ds = es 3442 ; REM: The b_bplist.when array contains actual offsets 3443 ; into the b_bplist.whenbuffer space. Therefore 3444 ; a value of zero acts as a NULL pointer and valid 3445 ; values are >= b_bplist.whenbuffer. 3446 free_when: 3447 00008897 56 push si 3448 00008898 57 push di 3449 3450 00008899 85C0 test ax, ax 3451 0000889B 7438 jz .return 3452 3453 0000889D 89C7 mov di, ax 3454 0000889F 89C3 mov bx, ax 3455 ; -> condition to be freed 3456 ; (destination of following data) 3457 000088A1 57 push di 3458 000088A2 B9FFFF mov cx, -1 3459 000088A5 B000 mov al, 0 3460 000088A7 F2AE repne scasb 3461 000088A9 F7D1 not cx ; = length to free (including terminating NUL) 3462 000088AB 5F pop di 3463 000088AC 51 push cx 3464 000088AD 89FE mov si, di 3465 000088AF 01CE add si, cx ; -> behind condition to be freed 3466 ; (source of following data) 3467 000088B1 89F1 mov cx, si 3468 000088B3 F7D9 neg cx ; minus pointer to first subsequent data 3469 000088B5 81C1[7A07] add cx, b_bplist.whenbuffer + b_bplist.whenbuffer.length 3470 ; pointer behind buffer - pointer subsequent data 3471 ; = length of data to move 3472 000088B9 F3A4 rep movsb ; now di -> first uninitialised byte 3473 000088BB 59 pop cx ; = length of data freed 3474 3475 000088BC 290E[F801] sub word [b_bplist.whenbuffer.free], cx 3476 ; mark as free 3477 000088C0 51 push cx 3478 000088C1 30C0 xor al, al 3479 000088C3 F3AA rep stosb ; clear the buffer trailer (uninitialised part) 3480 000088C5 5F pop di ; di = length of data freed 3481 3482 000088C6 BE[D601] mov si, b_bplist.when 3483 %if _NUM_B_BP < 256 3484 000088C9 B110 mov cl, _NUM_B_BP 3485 %else 3486 mov cx, _NUM_B_BP 3487 %endif 3488 .loop: 3489 000088CB AD lodsw 3490 000088CC 39D8 cmp ax, bx ; offset we're freeing ?, OR 3491 ; is it below/equal the offset we're freeing ? 3492 000088CE 7603 jbe .next ; yes --> (also jumps if ax == 0) 3493 000088D0 297CFE sub word [si - 2], di ; adjust offset 3494 .next: 3495 000088D3 E2F6 loop .loop 3496 3497 .return: 3498 000088D5 5F pop di 3499 000088D6 5E pop si 3500 000088D7 C3 retn 3501 3502 3503 point_clear: 3504 000088D8 BF[DD88] mov di, .clear 3505 000088DB EB1F jmp point_clear_enable_disable_toggle_common 3506 3507 .clear: 3508 000088DD F7D0 not ax 3509 %if ((_NUM_B_BP+7)>>3) != 1 3510 000088DF 20A7[0201] and byte [b_bplist.used_mask+bx], ah 3511 000088E3 20A7[0401] and byte [b_bplist.disabled_mask+bx], ah 3512 %else 3513 and byte [b_bplist.used_mask], ah 3514 and byte [b_bplist.disabled_mask], ah 3515 %endif 3516 000088E7 51 push cx 3517 3518 000088E8 31DB xor bx, bx ; replace by empty word 3519 000088EA E82AFE call get_set_id_offset_length 3520 000088ED 93 xchg ax, bx ; ax = word what to free 3521 000088EE E844FE call free_id ; actually free it now 3522 3523 000088F1 31DB xor bx, bx ; replace by empty word 3524 000088F3 E84BFF call get_set_when_offset 3525 000088F6 93 xchg ax, bx ; ax = word what to free 3526 000088F7 E89DFF call free_when ; actually free it now 3527 3528 %if 0 3529 xor cx, cx 3530 3531 mov bx, dx 3532 add bx, bx ; * 2 3533 mov word [b_bplist.counter + bx], cx 3534 3535 add bx, bx ; * 4 3536 %if BPSIZE == 4 3537 %elif BPSIZE == 5 3538 add bx, dx ; * 5 3539 %elif BPSIZE == 6 3540 add bx, dx ; * 5 3541 add bx, dx ; * 6 3542 %elif BPSIZE == 9 3543 add bx, bx ; * 8 3544 add bx, dx ; * 9 3545 %else 3546 %error Unexpected breakpoint size 3547 %endif 3548 add bx, b_bplist.bp 3549 mov word [bx], cx 3550 mov word [bx + 2], cx 3551 %if BPSIZE == 4 3552 %elif BPSIZE == 5 3553 mov byte [bx + 4], cl 3554 %elif BPSIZE == 6 3555 mov word [bx + 4], cx 3556 %elif BPSIZE == 9 3557 mov word [bx + 4], cx 3558 mov word [bx + 6], cx 3559 mov byte [bx + 8], cl 3560 %else 3561 %error Unexpected breakpoint size 3562 %endif 3563 3564 %endif 3565 3566 000088FA 59 pop cx 3567 000088FB C3 retn 3568 3569 point_clear_enable_disable_toggle_common: 3570 000088FC E89030 call skipwhite 3571 3572 000088FF E85802 call getpointat ; "AT" keyword ? 3573 00008902 720A jc .not_at ; no --> 3574 00008904 E81102 call findpointat ; do we find it ? 3575 00008907 7303E9061C jc error ; not found --> 3576 0000890C EB25 jmp @F ; point index is in dx --> 3577 3578 .not_at: 3579 0000890E E86A02 call getpointindex 3580 00008911 7320 jnc @F ; point index is in dx, no keyword --> 3581 00008913 7403E9FA1B jnz error ; "NEW" is invalid --> 3582 3583 00008918 E83430 call chkeol 3584 0000891B 31C9 xor cx, cx 3585 .all_loop: 3586 0000891D 89C8 mov ax, cx 3587 0000891F E8E701 call calcpointbit 3588 %if ((_NUM_B_BP+7)>>3) != 1 3589 00008922 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3590 %else 3591 test byte [b_bplist.used_mask], ah 3592 %endif 3593 00008926 7404 jz .all_next 3594 00008928 89CA mov dx, cx 3595 0000892A FFD7 call di 3596 .all_next: 3597 0000892C 41 inc cx 3598 0000892D 83F910 cmp cx, _NUM_B_BP 3599 00008930 72EB jb .all_loop 3600 00008932 C3 retn 3601 3602 @@: 3603 00008933 E81930 call chkeol 3604 00008936 89D0 mov ax, dx 3605 00008938 E8CE01 call calcpointbit 3606 %if ((_NUM_B_BP+7)>>3) != 1 3607 0000893B 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3608 %else 3609 test byte [b_bplist.used_mask], ah 3610 %endif 3611 0000893F 7503E9CE1B jz error 3612 00008944 FFD7 call di 3613 00008946 C3 retn 3614 3615 3616 point_enable: 3617 00008947 BF[4C89] mov di, .enable 3618 0000894A EBB0 jmp point_clear_enable_disable_toggle_common 3619 3620 .enable: 3621 0000894C F7D0 not ax 3622 %if ((_NUM_B_BP+7)>>3) != 1 3623 0000894E 20A7[0401] and byte [b_bplist.disabled_mask+bx], ah 3624 %else 3625 and byte [b_bplist.disabled_mask], ah 3626 %endif 3627 00008952 C3 retn 3628 3629 3630 point_disable: 3631 00008953 BF[5889] mov di, .disable 3632 00008956 EBA4 jmp point_clear_enable_disable_toggle_common 3633 3634 .disable: 3635 %if ((_NUM_B_BP+7)>>3) != 1 3636 00008958 08A7[0401] or byte [b_bplist.disabled_mask+bx], ah 3637 %else 3638 or byte [b_bplist.disabled_mask], ah 3639 %endif 3640 0000895C C3 retn 3641 3642 3643 point_toggle: 3644 0000895D BF[6289] mov di, .toggle 3645 00008960 EB9A jmp point_clear_enable_disable_toggle_common 3646 3647 .toggle: 3648 %if ((_NUM_B_BP+7)>>3) != 1 3649 00008962 30A7[0401] xor byte [b_bplist.disabled_mask+bx], ah 3650 %else 3651 xor byte [b_bplist.disabled_mask], ah 3652 %endif 3653 00008966 C3 retn 3654 3655 3656 point_list: 3657 00008967 E82530 call skipwhite 3658 0000896A E8CD2F call iseol? 3659 0000896D 747B je .all 3660 3661 0000896F E8E801 call getpointat ; "AT" keyword ? 3662 00008972 7256 jc .not_at ; no --> 3663 00008974 E8A101 call findpointat ; do we find it ? 3664 ; Here we ignore the point index in dx, we just 3665 ; take note that at least one point matching the 3666 ; specified address exists. The points are matched 3667 ; against the linear address in ..@bb_saved_linear. 3668 00008977 7307 jnc .all_matching 3669 3670 00008979 BA[956E] mov dx, msg.bpnone_at 3671 0000897C E87134 call putsz 3672 0000897F C3 retn 3673 3674 3675 .all_matching: 3676 00008980 31ED xor bp, bp 3677 00008982 31DB xor bx, bx 3678 00008984 31D2 xor dx, dx 3679 00008986 BF[0E08] mov di, line_out 3680 .loop_matching: 3681 00008989 89DE mov si, bx 3682 0000898B 01F6 add si, si 3683 0000898D 01F6 add si, si 3684 %if BPSIZE == 4 3685 %elif BPSIZE == 5 3686 add si, bx 3687 %elif BPSIZE == 6 3688 add si, bx ; * 5 3689 add si, bx ; * 6 3690 %elif BPSIZE == 9 3691 0000898F 01F6 add si, si ; * 8 3692 00008991 01DE add si, bx ; * 9 3693 %else 3694 %error Unexpected breakpoint size 3695 %endif 3696 00008993 81C6[0601] add si, b_bplist.bp 3697 00008997 AD lodsw 3698 00008998 3906[1890] cmp word [..@bb_saved_linear], ax 3699 0000899C 7524 jne .next_matching 3700 %if _PM 3701 0000899E AD lodsw 3702 %else 3703 xor ax, ax 3704 lodsb 3705 %endif 3706 0000899F 3906[1A90] cmp word [..@bb_saved_linear + 2], ax 3707 000089A3 751D jne .next_matching 3708 3709 000089A5 57 push di 3710 000089A6 B020 mov al, 32 3711 000089A8 B92800 mov cx, 40 3712 000089AB F3AA rep stosb ; initialize field with blanks 3713 000089AD 30C0 xor al, al 3714 000089AF AA stosb ; terminate it 3715 000089B0 5F pop di 3716 3717 000089B1 E88000 call .single ; fill buffer 3718 3719 000089B4 52 push dx 3720 000089B5 53 push bx 3721 %if 0 3722 test dl, 1 ; an odd point ? 3723 jnz .odd_matching ; yes --> 3724 mov di, line_out + 40 ; write next point after the field 3725 jmp .was_even_matching 3726 .odd_matching: 3727 %endif 3728 000089B6 E8B930 call putsline_crlf ; put line with linebreak (and no excess blanks) 3729 000089B9 E83301 call handle_bl_when 3730 000089BC BF[0E08] mov di, line_out ; write next point at start of field 3731 .was_even_matching: 3732 000089BF 5B pop bx 3733 000089C0 5A pop dx 3734 000089C1 42 inc dx ; increment odd/even counter 3735 .next_matching: 3736 000089C2 43 inc bx ; increment breakpoint index 3737 000089C3 83FB10 cmp bx, _NUM_B_BP 3738 000089C6 75C1 jne .loop_matching 3739 000089C8 EB51 jmp .end 3740 3741 3742 .not_at: 3743 000089CA E8AE01 call getpointindex 3744 000089CD 730A jnc @F 3745 000089CF 7403E93E1B jnz error ; "NEW" is invalid --> 3746 3747 000089D4 E8782F call chkeol 3748 000089D7 EB11 jmp .all 3749 @@: 3750 000089D9 E8732F call chkeol 3751 000089DC 89D3 mov bx, dx 3752 000089DE BF[0E08] mov di, line_out 3753 000089E1 E85000 call .single 3754 000089E4 E88B30 call putsline_crlf 3755 000089E7 E90501 jmp handle_bl_when 3756 3757 3758 .all: 3759 000089EA 31ED xor bp, bp ; high byte: any set points encountered yet, 3760 ; low byte: current line has any set points 3761 000089EC 31DB xor bx, bx 3762 000089EE BF[0E08] mov di, line_out 3763 .loop: 3764 000089F1 57 push di 3765 000089F2 B020 mov al, 32 3766 000089F4 B92800 mov cx, 40 3767 000089F7 F3AA rep stosb ; initialize field with blanks 3768 000089F9 30C0 xor al, al 3769 000089FB AA stosb ; terminate it 3770 000089FC 5F pop di 3771 3772 000089FD E83400 call .single ; fill buffer 3773 3774 00008A00 53 push bx 3775 %if 0 3776 test bl, 1 ; an odd point ? 3777 jnz .odd ; yes --> 3778 mov di, line_out + 40 ; write next point after the field 3779 jmp .was_even 3780 .odd: 3781 %endif 3782 00008A01 F7C5FF00 test bp, 00FFh ; any point set in this line ? 3783 00008A05 740A jz .skip_putsline ; no --> 3784 00008A07 E86830 call putsline_crlf ; put line with linebreak (and no excess blanks) 3785 00008A0A E8E200 call handle_bl_when 3786 3787 00008A0D 81E500FF and bp, ~00FFh ; clear flag for next line processing 3788 .skip_putsline: 3789 00008A11 BF[0E08] mov di, line_out ; write next point at start of field 3790 .was_even: 3791 00008A14 5B pop bx 3792 00008A15 43 inc bx 3793 00008A16 83FB10 cmp bx, _NUM_B_BP 3794 00008A19 75D6 jne .loop 3795 .end: 3796 00008A1B 81FF[0E08] cmp di, line_out 3797 00008A1F 7406 je @F 3798 00008A21 E84E30 call putsline_crlf 3799 00008A24 E8C800 call handle_bl_when 3800 @@: 3801 00008A27 F7C500FF test bp, 0FF00h 3802 00008A2B 7506 jnz @F 3803 00008A2D BA[756E] mov dx, msg.bpnone 3804 00008A30 E8BD33 call putsz 3805 @@: 3806 00008A33 C3 retn 3807 3808 .single: 3809 00008A34 BE[4F6E] mov si, msg.bp 3810 00008A37 E8612F call showstring 3811 00008A3A 53 push bx 3812 00008A3B 89D8 mov ax, bx 3813 00008A3D E80130 call hexbyte ; store index of this point 3814 00008A40 E8C600 call calcpointbit 3815 00008A43 BE[596E] mov si, msg.bpunused 3816 %if ((_NUM_B_BP+7)>>3) != 1 3817 00008A46 84A7[0201] test byte [b_bplist.used_mask+bx], ah 3818 %else 3819 test byte [b_bplist.used_mask], ah 3820 %endif 3821 00008A4A 7508 jnz @F ; if set --> 3822 00008A4C E84C2F call showstring 3823 00008A4F 31F6 xor si, si 3824 00008A51 E99900 jmp .unused 3825 3826 @@: 3827 00008A54 81CD0101 or bp, 0101h ; flag that there was a point set in this line 3828 00008A58 BE[566E] mov si, msg.bpdisabled 3829 %if ((_NUM_B_BP+7)>>3) != 1 3830 00008A5B 84A7[0401] test byte [b_bplist.disabled_mask+bx], ah 3831 %else 3832 test byte [b_bplist.disabled_mask], ah 3833 %endif 3834 00008A5F 7503 jnz .disabled ; disabled --> (D) 3835 00008A61 BE[536E] mov si, msg.bpenabled 3836 .disabled: 3837 00008A64 E8342F call showstring 3838 00008A67 BE[616E] mov si, msg.bpaddress 3839 00008A6A E82E2F call showstring 3840 00008A6D 58 pop ax 3841 00008A6E 50 push ax 3842 00008A6F 89C6 mov si, ax 3843 00008A71 01F6 add si, si 3844 00008A73 01F6 add si, si 3845 %if BPSIZE == 4 3846 %elif BPSIZE == 5 3847 add si, ax 3848 %elif BPSIZE == 6 3849 add si, ax ; * 5 3850 add si, ax ; * 6 3851 %elif BPSIZE == 9 3852 00008A75 01F6 add si, si ; * 8 3853 00008A77 01C6 add si, ax ; * 9 3854 %else 3855 %error Unexpected breakpoint size 3856 %endif 3857 00008A79 81C6[0601] add si, b_bplist.bp ; -> point 3858 00008A7D 52 push dx 3859 00008A7E AD lodsw 3860 00008A7F 92 xchg ax, dx 3861 %if _PM 3862 00008A80 AD lodsw 3863 00008A81 E8B62F call hexword 3864 %else 3865 xor ax, ax 3866 lodsb 3867 call hexbyte 3868 %endif 3869 00008A84 50 push ax 3870 00008A85 B05F mov al, '_' 3871 00008A87 AA stosb 3872 00008A88 58 pop ax 3873 00008A89 92 xchg ax, dx 3874 00008A8A E8AD2F call hexword ; display (linear) address 3875 %if BPSIZE == 6 || BPSIZE == 9 3876 ; INP: dx:ax = linear address 3877 ; si -> (d)word offset 3878 ; di -> where to store 3879 ; OUT: cx = length displayed 3880 ; si -> after offset 3881 ; di -> after stored string 3882 ; CHG: ax, dx 3883 00008A8D E80F01 call bp_display_offset ; BPSIZE implied 3884 %else 3885 xor cx, cx 3886 %endif 3887 00008A90 5A pop dx 3888 00008A91 AC lodsb 3889 00008A92 50 push ax 3890 00008A93 BE[676E] mov si, msg.bpcontent 3891 00008A96 E8022F call showstring 3892 00008A99 58 pop ax 3893 00008A9A E8A42F call hexbyte ; display content 3894 00008A9D BE[6A6E] mov si, msg.bpcounter 3895 00008AA0 E8F82E call showstring 3896 00008AA3 58 pop ax 3897 00008AA4 50 push ax 3898 00008AA5 89C3 mov bx, ax 3899 00008AA7 52 push dx 3900 00008AA8 89C2 mov dx, ax 3901 00008AAA 01DB add bx, bx 3902 00008AAC 8B87[9601] mov ax, word [b_bplist.counter + bx] 3903 00008AB0 E8872F call hexword 3904 3905 00008AB3 BBFFFF mov bx, -1 3906 00008AB6 E85EFC call get_set_id_offset_length 3907 00008AB9 F6C7FC test bh, 63 << 2 ; length nonzero ? 3908 00008ABC 7426 jz @F ; no --> 3909 3910 ; The maximum length of a short ID is based on 3911 ; how much space there is assuming 80 columns. 3912 00008ABE BE[416E] mov si, msg.bb_hitpass_id.short 3913 00008AC1 D0E1 shl cl, 1 3914 00008AC3 D0E1 shl cl, 1 3915 00008AC5 F6D9 neg cl 3916 00008AC7 80C18C add cl, 35 << 2 3917 00008ACA 38CF cmp bh, cl ; long ? 3918 00008ACC 7203 jb .trigger_short_id 3919 ; This jump MUST be a jb, not jbe. The jbe 3920 ; would not match ZR for words where the 3921 ; idbuffer offset is a nonzero value. 3922 00008ACE BE[396E] mov si, msg.bb_hitpass_id.long 3923 .trigger_short_id: 3924 3925 00008AD1 E862A9 call copy_single_counted_string 3926 00008AD4 88F9 mov cl, bh 3927 00008AD6 D0E9 shr cl, 1 3928 00008AD8 D0E9 shr cl, 1 ; cx = length 3929 00008ADA 81E3FF03 and bx, 1023 ; bx = offset 3930 00008ADE 8DB7[FA01] lea si, [b_bplist.idbuffer + bx] 3931 00008AE2 F3A4 rep movsb 3932 3933 @@: 3934 3935 00008AE4 BBFFFF mov bx, -1 3936 00008AE7 E857FD call get_set_when_offset 3937 00008AEA 89DE mov si, bx 3938 00008AEC 5A pop dx 3939 3940 .unused: 3941 00008AED 5B pop bx ; restore counter (if displaying all) 3942 00008AEE C3 retn 3943 3944 3945 ; CHG: si, al 3946 handle_bl_when: 3947 00008AEF 87D6 xchg dx, si 3948 00008AF1 85D2 test dx, dx 3949 00008AF3 7411 jz @F 3950 00008AF5 52 push dx 3951 00008AF6 BA[486E] mov dx, msg.bb_when 3952 00008AF9 E8F432 call putsz 3953 00008AFC 5A pop dx 3954 00008AFD E8F032 call putsz 3955 %if 0 3956 mov al, '$' 3957 call putc 3958 %endif 3959 00008B00 BA[4574] mov dx, crlf 3960 00008B03 E8EA32 call putsz 3961 @@: 3962 00008B06 87D6 xchg dx, si 3963 00008B08 C3 retn 3964 3965 3966 ; INP: ax = 0-based index of point 3967 ; OUT: (bx-> byte to access. only if at least 9 points) 3968 ; (bx = 0 always if 8 or fewer points) 3969 ; ah = value to access 3970 ; CHG: al 3971 calcpointbit: 3972 %if ((_NUM_B_BP+7)>>3) != 1 3973 00008B09 89C3 mov bx, ax 3974 %endif 3975 00008B0B 2407 and al, 7 3976 00008B0D B401 mov ah, 1 3977 00008B0F 91 xchg ax, cx 3978 00008B10 D2E5 shl ch, cl 3979 %if ((_NUM_B_BP+7)>>3) != 1 3980 00008B12 B103 mov cl, 3 3981 00008B14 D3EB shr bx, cl 3982 %else 3983 xor bx, bx 3984 %endif 3985 00008B16 91 xchg ax, cx 3986 00008B17 C3 retn 3987 3988 3989 ; INP: bx:dx = linear address 3990 ; OUT: NC if point found, 3991 ; dx = point index 3992 ; CY if point not found, 3993 ; bx:dx unchanged 3994 ; CHG: di 3995 findpointat: 3996 lframe near 3997 00008B18 5589E5 lenter 3998 lvar word, orig_ax 3999 00008B1B 50 push ax 4000 lvar word, orig_si 4001 00008B1C 56 push si 4002 lvar dword, orig_bxdx 4003 00008B1D 53 push bx 4004 00008B1E 52 push dx 4005 00008B1F 31D2 xor dx, dx 4006 .loop: 4007 00008B21 89D0 mov ax, dx 4008 00008B23 E8E3FF call calcpointbit 4009 %if ((_NUM_B_BP+7)>>3) != 1 4010 00008B26 84A7[0201] test byte [b_bplist.used_mask + bx], ah 4011 %else 4012 test byte [b_bplist.used_mask], ah 4013 %endif 4014 00008B2A 741F jz .next 4015 4016 00008B2C 89D6 mov si, dx 4017 00008B2E 01F6 add si, si 4018 00008B30 01F6 add si, si 4019 %if BPSIZE == 4 4020 %elif BPSIZE == 5 4021 add si, dx 4022 %elif BPSIZE == 6 4023 add si, dx ; * 5 4024 add si, dx ; * 6 4025 %elif BPSIZE == 9 4026 00008B32 01F6 add si, si ; * 8 4027 00008B34 01D6 add si, dx ; * 9 4028 %else 4029 %error Unexpected breakpoint size 4030 %endif 4031 00008B36 81C6[0601] add si, b_bplist.bp ; -> point 4032 00008B3A AD lodsw 4033 00008B3B 3946F8 cmp word [bp + ?orig_bxdx], ax 4034 00008B3E 750B jne .next 4035 %if _PM 4036 00008B40 AD lodsw 4037 %else 4038 xor ax, ax 4039 lodsb 4040 %endif 4041 00008B41 3946FA cmp word [bp + ?orig_bxdx + 2], ax 4042 00008B44 7505 jne .next 4043 ; (NC) 4044 00008B46 8956F8 mov word [bp + ?orig_bxdx], dx 4045 00008B49 EB07 jmp .ret 4046 4047 .next: 4048 00008B4B 42 inc dx 4049 00008B4C 83FA10 cmp dx, _NUM_B_BP 4050 00008B4F 72D0 jb .loop 4051 4052 00008B51 F9 stc 4053 .ret: 4054 00008B52 5A pop dx 4055 00008B53 5B pop bx ; pop ?orig_bxdx 4056 00008B54 5E pop si ; pop ?orig_si 4057 00008B55 58 pop ax ; pop ?orig_ax 4058 00008B56 89EC5D lleave 4059 00008B59 C3 lret 4060 4061 4062 ; INP: si->, al= 4063 ; OUT: CY if no "AT" keyword + address, 4064 ; si, al unchanged 4065 ; NC if "AT" keyword + address, 4066 ; si->, al= after 4067 ; bx:dx = dword [..@bb_saved_linear] = linear address 4068 ; CHG: edx, bx 4069 getpointat: 4070 00008B5A 4E dec si 4071 00008B5B BA[9A68] mov dx, msg.at 4072 00008B5E E87A2D call isstring? 4073 00008B61 AC lodsb 4074 00008B62 7402 je .at 4075 00008B64 F9 stc 4076 00008B65 C3 retn 4077 4078 .at: 4079 00008B66 8B1E[900C] mov bx, word [reg_cs] 4080 00008B6A E871AC call getlinearaddr 4081 00008B6D 7303E9A019 jc error 4082 00008B72 8916[1890] mov word [..@bb_saved_linear], dx 4083 00008B76 891E[1A90] mov word [..@bb_saved_linear + 2], bx 4084 00008B7A C3 retn 4085 4086 4087 ; INP: si->, al= 4088 ; OUT: NC if a point is specified, 4089 ; dx = point index (0-based, below _NUM_B_BP) 4090 ; CY if a keyword is specified, 4091 ; ZR if "ALL" keyword specified 4092 ; NZ if "NEW" keyword specified 4093 getpointindex: 4094 00008B7B 4E dec si 4095 00008B7C BA[CC6D] mov dx, msg.all 4096 00008B7F E8592D call isstring? 4097 00008B82 7418 je .is_all ; (ZR) 4098 00008B84 BA[D06D] mov dx, msg.new 4099 00008B87 E8512D call isstring? 4100 00008B8A 740E je .is_new 4101 00008B8C AC lodsb 4102 00008B8D E8892C call getword 4103 00008B90 83FA10 cmp dx, _NUM_B_BP 4104 00008B93 7203E97A19 jae error 4105 00008B98 F8 clc ; (NC) 4106 00008B99 C3 retn 4107 4108 .is_new: 4109 00008B9A 85F6 test si, si ; (NZ) 4110 .is_all: 4111 00008B9C F9 stc ; (CY) 4112 00008B9D AC lodsb ; al = separator, si-> after 4113 00008B9E C3 retn 4114 %endif 4115 4116 4117 %if BPSIZE == 6 || BPSIZE == 9 4118 ; INP: dx:ax = linear address 4119 ; si -> (d)word offset 4120 ; di -> where to store 4121 ; OUT: cx = length displayed 4122 ; si -> after offset 4123 ; di -> after stored string 4124 ; CHG: ax, dx 4125 bp_display_offset: 4126 lframe 4127 lvar dword, offset 4128 00008B9F 5589E55050 lenter 4129 lvar dword, linear 4130 00008BA4 52 push dx 4131 00008BA5 50 push ax 4132 00008BA6 B82020 mov ax, " " 4133 lvar word, prefix 4134 00008BA9 50 push ax 4135 lvar word, start_write 4136 00008BAA 57 push di 4137 00008BAB 53 push bx 4138 00008BAC AD lodsw 4139 %if _PM 4140 00008BAD 92 xchg ax, dx 4141 00008BAE AD lodsw 4142 00008BAF 83F8FF cmp ax, -1 4143 00008BB2 92 xchg ax, dx 4144 00008BB3 7505 jne @F 4145 %else 4146 xor dx, dx 4147 %endif 4148 00008BB5 83F8FF cmp ax, -1 4149 00008BB8 746A je .skip 4150 @@: 4151 00008BBA 8956FE mov word [bp + ?offset + 2], dx 4152 00008BBD 8946FC mov word [bp + ?offset], ax 4153 4154 00008BC0 8B56FA mov dx, word [bp + ?linear + 2] 4155 00008BC3 8B46F8 mov ax, word [bp + ?linear] 4156 00008BC6 2B46FC sub ax, word [bp + ?offset] 4157 00008BC9 1B56FE sbb dx, word [bp + ?offset + 2] 4158 4159 %if _PM 4160 00008BCC E82E06 call ispm 4161 00008BCF 7525 jnz .r86m 4162 4163 00008BD1 52 push dx 4164 00008BD2 50 push ax 4165 00008BD3 B80600 mov ax, 6 4166 00008BD6 8B1E[900C] mov bx, word [reg_cs] 4167 00008BDA CD31 int 31h 4168 00008BDC 58 pop ax 4169 00008BDD 5B pop bx 4170 00008BDE 7212 jc .try_r86m 4171 4172 00008BE0 39D9 cmp cx, bx 4173 00008BE2 750E jne .try_r86m 4174 00008BE4 39C2 cmp dx, ax 4175 00008BE6 750A jne .try_r86m 4176 4177 00008BE8 B82020 mov ax, " " 4178 00008BEB AB stosw 4179 00008BEC B84353 mov ax, "CS" 4180 00008BEF AB stosw 4181 00008BF0 EB1F jmp .offset 4182 4183 .try_r86m: 4184 00008BF2 C646F724 mov byte [bp + ?prefix + 1], '$' 4185 %endif 4186 4187 .r86m: 4188 00008BF6 B90400 mov cx, 4 4189 00008BF9 A80F test al, 15 4190 00008BFB 7531 jnz .questionmarks 4191 00008BFD F7C2F0FF test dx, 0FFF0h 4192 00008C01 752B jnz .questionmarks 4193 00008C03 D3E8 shr ax, cl 4194 00008C05 D3CA ror dx, cl 4195 00008C07 09C2 or dx, ax 4196 00008C09 8B46F6 mov ax, word [bp + ?prefix] 4197 00008C0C AB stosw 4198 00008C0D 92 xchg ax, dx 4199 00008C0E E8292E call hexword 4200 4201 .offset: 4202 00008C11 B03A mov al, ':' 4203 00008C13 AA stosb 4204 %if _PM 4205 00008C14 8B46FE mov ax, word [bp + ?offset + 2] 4206 00008C17 85C0 test ax, ax 4207 00008C19 7403 jz @F 4208 00008C1B E81C2E call hexword 4209 @@: 4210 %endif 4211 00008C1E 8B46FC mov ax, word [bp + ?offset] 4212 00008C21 E8162E call hexword 4213 4214 .skip: 4215 00008C24 5B pop bx 4216 00008C25 59 pop cx ; get ?start_write 4217 00008C26 F7D9 neg cx 4218 00008C28 01F9 add cx, di 4219 00008C2A 89EC5D lleave 4220 00008C2D C3 retn 4221 4222 .questionmarks: 4223 00008C2E B82020 mov ax, " " 4224 00008C31 AB stosw 4225 00008C32 B83F3F mov ax, "??" 4226 00008C35 AB stosw 4227 00008C36 AB stosw 4228 00008C37 EBD8 jmp .offset 4229 %endif 4230 4231 4232 bu_breakpoint: 4233 00008C39 AC lodsb 4234 00008C3A E8122D call chkeol 4235 %if _DEBUG 4236 mov dx, msg.bu 4237 call putsz 4238 int3 4239 retn 4240 %else 4241 00008C3D BA[1072] mov dx, msg.notbu 4242 00008C40 E9AD31 jmp putsz 4243 %endif 4244 4245 4246 uppercase: 4247 00008C43 3C61 cmp al, 'a' 4248 00008C45 7206 jb .ret 4249 00008C47 3C7A cmp al, 'z' 4250 00008C49 7702 ja .ret 4251 00008C4B 24DF and al, TOUPPER 4252 .ret: 4253 00008C4D C3 retn 4254 4255 4256 errorj4: 4257 00008C4E E9C118 jmp error 4258 4259 4260 %if 0 4261 4262 ee 0: 4263 push ss 4264 pop ds 4265 push ss 4266 pop es 4267 mov ax, word [ savesp ] 4268 inc ax 4269 inc ax 4270 mov sp, ax ; restore stack 4271 mov bx, word [e_addr + saSegSel] 4272 _386_PM_o32 4273 mov dx, word [ e_addr ] ; get back address 4274 4275 4276 ; Prompt mode. 4277 ee 1: 4278 mov word [ errret ], ee 0 4279 4280 ; Begin loop over lines. 4281 ee 2: ; <--- next line 4282 mov word [e_addr + saSegSel], bx 4283 %if _PM 4284 call ispm 4285 jnz .86m 4286 .pm: 4287 mov word [e_addr + saSelector], bx 4288 jmp @F 4289 .86m: 4290 mov word [e_addr + saSegment], bx 4291 @@: 4292 %endif 4293 _386_PM_o32 4294 mov word [ e_addr ], dx ; save address 4295 mov di, line_out 4296 mov ax, bx ; print out segment and offset 4297 call hexword 4298 4299 === 4300 4301 4302 mov al, '.' 4303 stosb 4304 call getline00 ; read input line 4305 call iseol? 4306 je .end 4307 %if _PM 4308 xor bx, bx 4309 %endif 4310 mov dx, 1 4311 call ee_checkplusminus 4312 jne .notplusminus 4313 cmp al, '+' 4314 je ee 3 4315 jmp short ee 2 4316 4317 .notplusminus: 4318 4319 === 4320 4321 4322 ; INP: al = character, si-> line 4323 ; bx:dx = increment to add/subtract if this is an add/sub request 4324 ; OUT: al, si unchanged 4325 ; NZ if no add/sub request 4326 ; ZR if add/sub request, 4327 ; [ e_addr ] offset adjusted 4328 ee_checkplusminus: 4329 cmp al, '-' 4330 jne .not 4331 cmp al, '+' 4332 jne .not 4333 push si 4334 push ax 4335 call skipwhite 4336 call iseol? 4337 pop ax 4338 pop si 4339 jne .not 4340 cmp al, '-' 4341 je .minus 4342 add word [ e_addr ], dx 4343 _386_PM adc word [ e_addr+2 ], bx 4344 jmp short .done 4345 4346 .minus: 4347 sub word [ e_addr ], dx 4348 _386_PM sbb word [ e_addr+2 ], bx 4349 .done: 4350 cmp al, al 4351 .not: 4352 retn 4353 4354 === 4355 4356 4357 ee 9: 4358 call getline00 4359 4360 %endif 4361 4362 4363 ; E command - edit memory. 4364 ee: 4365 00008C51 E8FD19 call prephack 4366 00008C54 8B1E[840C] mov bx, word [reg_ds] 4367 00008C58 E8EB1C call getaddr ; get address into bx:(e)dx 4368 00008C5B E8032D call skipcomm0 4369 00008C5E E8D92C call iseol? 4370 00008C61 743E je ee1 ; if prompt mode 4371 4372 eeparsestr: 4373 00008C63 52 push dx ; save destination offset 4374 00008C64 E8511D call getstr ; get data bytes 4375 00008C67 89F9 mov cx, di 4376 00008C69 BA[0E08] mov dx, line_out 4377 00008C6C 29D1 sub cx, dx ; length of byte string 4378 00008C6E 5F pop di 4379 00008C6F 89C8 mov ax, cx 4380 00008C71 48 dec ax 4381 00008C72 01F8 add ax, di 4382 00008C74 72D8 jc short errorj4 ; if it wraps around 4383 00008C76 E8061A call dohack 4384 00008C79 89D6 mov si, dx 4385 00008C7B 8EC3 mov es, bx 4386 %if _PM 4387 00008C7D 803E[DC88]00 cmp byte [bAddr32], 0 4388 00008C82 740E jz ee_2 4389 [cpu 386] 4390 00008C84 89FA mov dx, di ; dx was destroyed 4391 00008C86 6689D7 mov edi, edx 4392 00008C89 660FB7F6 movzx esi, si 4393 00008C8D 660FB7C9 movzx ecx, cx 4394 00008C91 67 a32 4395 __CPU__ 4396 ee_2: 4397 %endif 4398 00008C92 F3A4 rep movsb 4399 4400 ; Restore ds + es and undo the interrupt vector hack. 4401 ; This code is also used by the `m' command. 4402 ee0a: 4403 00008C94 16 push ss ; restore ds 4404 00008C95 1F pop ds 4405 00008C96 16 push ss ; restore es 4406 00008C97 07 pop es 4407 00008C98 BF[A80A] mov di, run2324 ; debuggee's int 23/24 values 4408 00008C9B E8CC19 call prehak1 ; copy things back 4409 00008C9E E9121A jmp unhack 4410 4411 4412 4413 ; Prompt mode. 4414 ee1: 4415 00008CA1 E88B78 call guard_re 4416 ; Begin loop over lines. 4417 ee2: ; <--- next line 4418 00008CA4 89D8 mov ax, bx ; print out segment and offset 4419 00008CA6 E8912D call hexword 4420 00008CA9 B03A mov al, ':' 4421 00008CAB AA stosb 4422 00008CAC 66 _386_PM_o32 ; mov eax, edx 4423 00008CAD 89D0 mov ax, dx 4424 %if _PM 4425 00008CAF E8B6D0 call test_d_b_bit ; 32-bit segment ? 4426 00008CB2 7403 jz .16 ; no --> 4427 00008CB4 E8772D call hexword_high 4428 .16: 4429 %endif 4430 00008CB7 E8802D call hexword 4431 4432 ; Begin loop over bytes. 4433 ee3: ; <--- next byte 4434 00008CBA B82020 mov ax, 32<<8|32 ; print old value of byte 4435 00008CBD AB stosw 4436 00008CBE E8BE19 call dohack ; do the INT pointer hack 4437 00008CC1 E8D60C call readmem ; read mem at BX:(E)DX 4438 00008CC4 E8EC19 call unhack ; undo the INT pointer hack 4439 00008CC7 E8772D call hexbyte 4440 00008CCA B02E mov al, '.' 4441 00008CCC AA stosb 4442 00008CCD C606[930A]00 mov byte [ linecounter ], 0 ; reset counter 4443 00008CD2 8026[9E00]EF clropt [internalflags], promptwaiting 4444 00008CD7 53 push bx 4445 00008CD8 52 push dx 4446 00008CD9 E89A2D call putsline 4447 00008CDC 5A pop dx 4448 00008CDD 5B pop bx 4449 00008CDE BE[1E08] mov si, line_out+16 ; address of buffer for characters 4450 00008CE1 31C9 xor cx, cx ; number of characters so far 4451 4452 ee4_next: 4453 00008CE3 E85337 call getline_is_input_file? 4454 00008CE6 7238 jc ee9_getc_tty ; if it's a TTY 4455 4456 ee_getc_file: 4457 00008CE8 800E[A200]40 setopt [internalflags2], dif2_did_getline_file 4458 ; set this flag so yy_reset_buf knows 4459 ; that we may have buffered the file 4460 4461 00008CED 56 push si 4462 %if _NEWFULLHANDLING 4463 00008CEE BF[0300] mov di, line_in+3 ; read max 4464 %else 4465 mov di, line_in+2 4466 %endif 4467 00008CF1 8B36[EC0A] mov si, word [bufnext] 4468 ee5: 4469 00008CF5 3B36[EE0A] cmp si, word [bufend] 4470 00008CF9 7207 jb ee6 ; if there's a character already 4471 00008CFB E8463C call fillbuf 4472 00008CFE B00D mov al, 13 4473 00008D00 7217 jc ee8 ; if eof 4474 ee6: 4475 00008D02 803E[E70A]0D cmp byte [notatty], 13 4476 00008D07 750C jne ee7 ; if no need to compress CR/LF 4477 00008D09 803C0A cmp byte [si], 10 4478 00008D0C 7507 jne ee7 ; if not a line feed 4479 00008D0E 46 inc si ; skip it 4480 00008D0F FE06[E70A] inc byte [notatty] ; avoid repeating this 4481 00008D13 EBE0 jmp ee5 ; next character 4482 4483 ee7: 4484 00008D15 AC lodsb ; get the character 4485 00008D16 A2[E70A] mov byte [notatty], al 4486 ee8: 4487 00008D19 8936[EC0A] mov word [bufnext], si 4488 00008D1D 5E pop si 4489 00008D1E EB03 jmp ee10_got_codepoint 4490 4491 ee9_getc_tty: 4492 00008D20 E83231 call getc ; character input without echo 4493 ee10_got_codepoint: 4494 00008D23 3C20 cmp al, 32 ; (go to next byte) 4495 00008D25 7448 je ee13_write 4496 00008D27 3C2D cmp al, '-' ; (go to prior byte) 4497 00008D29 7444 je ee13_write 4498 00008D2B 3C2E cmp al, '.' ; (exit E interactive mode) 4499 00008D2D 7440 je ee13_write 4500 00008D2F 3C0A cmp al, 10 4501 00008D31 743C je ee13_write 4502 00008D33 E8082C call iseol?.notsemicolon; (also exit E interactive mode) 4503 00008D36 7437 je ee13_write ; all: done with this byte --> 4504 00008D38 3C08 cmp al, 8 4505 00008D3A 7423 je ee11_backspace ; if backspace --> 4506 00008D3C 3C7F cmp al, 7Fh 4507 00008D3E 741F je ee11_backspace ; if DEL (handle like backspace) --> 4508 00008D40 83F902 cmp cx, byte 2 ; otherwise, it should be a hex character 4509 00008D43 739E jae ee4_next ; if we have a full byte already 4510 00008D45 8804 mov byte [si], al 4511 00008D47 E8F42A call getnyb 4512 00008D4A 7297 jc ee4_next ; if it's not a hex character 4513 00008D4C 41 inc cx 4514 00008D4D AC lodsb ; get the character back 4515 00008D4E EB19 jmp ee12_put_then_next 4516 4517 ee112_priorbyte: 4518 00008D50 E8C030 call putc ; display the minus 4519 00008D53 E812D0 _386_PM call test_d_b_bit ; 32-bit segment ? 4520 00008D56 7401 _386_PM jz .16 ; no --> 4521 00008D58 66 _386_PM_o32 4522 .16: 4523 00008D59 4A dec dx ; decrement offset (16 bit or 32 bit) 4524 00008D5A BF[0E08] mov di, line_out 4525 00008D5D EB6E jmp ee15_linebreak_and_ee2 4526 4527 ee11_backspace: 4528 00008D5F E382 jcxz ee4_next ; if nothing to backspace over 4529 00008D61 49 dec cx 4530 00008D62 4E dec si 4531 00008D63 E8233B call fullbsout 4532 00008D66 E97AFF jmp ee4_next 4533 4534 ee12_put_then_next: 4535 00008D69 E8A730 call putc 4536 00008D6C E974FF jmp ee4_next ; back for more 4537 4538 ; We have a byte (if CX != 0). 4539 ; 4540 ; cx = number of digits we have (0..2) 4541 ; al = codepoint specifying how to proceed after writing 4542 ee13_write: 4543 00008D6F E329 jcxz ee14_done_write ; if no change for this byte 4544 4545 00008D71 50 push ax ; preserve proceed control 4546 00008D72 31C0 xor ax, ax ; ah = 0, al = 0 4547 00008D74 8804 mov byte [si], al ; terminate the string 4548 00008D76 29CE sub si, cx ; point to beginning 4549 @@: 4550 00008D78 00E4 add ah, ah 4551 00008D7A 00E4 add ah, ah 4552 00008D7C 00E4 add ah, ah 4553 00008D7E 00E4 add ah, ah ; prior value times 16 4554 00008D80 00C4 add ah, al ; add next digit (0 in first iteration) 4555 00008D82 AC lodsb ; load next digit (or NUL) 4556 00008D83 E8B82A call getnyb 4557 00008D86 73F0 jnc @B ; if another digit --> (NC) 4558 ; (CY can only mean we reached the NUL) 4559 00008D88 88E0 mov al, ah ; get byte value 4560 00008D8A E8F218 call dohack ; do the INT pointer hack 4561 00008D8D E8DD0B call writemem ; write AL at BX:(E)DX 4562 00008D90 BF[A80A] mov di, run2324 ; debuggee's int 23/24 4563 00008D93 E8D418 call prehak1 ; copy things back 4564 00008D96 E81A19 call unhack ; undo the INT pointer hack 4565 00008D99 58 pop ax ; al = how to proceed 4566 4567 ; End the loop over bytes. 4568 ee14_done_write: 4569 00008D9A BF[0E08] mov di, line_out ; reset output buffer 4570 4571 00008D9D 3C20 cmp al, 32 ; (go to next byte) 4572 00008D9F 7414 je ee_nextbyte 4573 00008DA1 3C2D cmp al, '-' ; (go to prior byte) 4574 00008DA3 74AB je ee112_priorbyte 4575 00008DA5 3C2E cmp al, '.' ; (exit E interactive mode) 4576 00008DA7 742B je ee16_end 4577 00008DA9 3C0A cmp al, 10 4578 00008DAB 7427 je ee16_end 4579 00008DAD E88E2B call iseol?.notsemicolon; (also exit E interactive mode) 4580 00008DB0 7422 je ee16_end 4581 00008DB2 E95D17 jmp error ; unexpected value 4582 4583 ee_nextbyte: 4584 00008DB5 E8B0CF _386_PM call test_d_b_bit ; 32-bit segment ? 4585 00008DB8 7401 _386_PM jz .16 ; no --> 4586 00008DBA 66 _386_PM_o32 4587 .16: 4588 00008DBB 42 inc dx ; increment offset (16 bit or 32 bit) 4589 00008DBC F6C207 test dl, 7 4590 00008DBF 740C jz ee15_linebreak_and_ee2 4591 ; if new line 4592 00008DC1 F7D1 not cx 4593 00008DC3 83C104 add cx, byte 4 ; compute 3 - cx 4594 00008DC6 B020 mov al, 32 4595 00008DC8 F3AA rep stosb ; store that many spaces 4596 00008DCA E9EDFE jmp ee3 ; back for more 4597 4598 ee15_linebreak_and_ee2: 4599 00008DCD B80D0A mov ax, 10 << 8 | 13 ; terminate this line 4600 00008DD0 AB stosw 4601 00008DD1 E9D0FE jmp ee2 ; back for a new line 4602 4603 ee16_end: 4604 00008DD4 E99B2C jmp putsline_crlf ; call putsline and return 4605 4606 4607 ; F command - fill memory 4608 ff: 4609 00008DD7 31C9 xor cx, cx ; get address range (no default length) 4610 00008DD9 8B1E[840C] mov bx, word [reg_ds] 4611 00008DDD E88E1A call getrange ; get address range into bx:(e)dx 4612 00008DE0 66 _386_PM_o32 ; sub ecx, edx 4613 00008DE1 29D1 sub cx, dx 4614 00008DE3 66 _386_PM_o32 ; inc ecx 4615 00008DE4 41 inc cx ; (e)cx = number of bytes 4616 00008DE5 53 push bx 4617 00008DE6 66 _386_PM_o32 ; push ecx 4618 00008DE7 51 push cx ; save it 4619 00008DE8 66 _386_PM_o32 ; push edx 4620 00008DE9 52 push dx ; save start address 4621 4622 00008DEA 4E dec si 4623 00008DEB BA[0067] mov dx, msg.range 4624 00008DEE E8EA2A call isstring? 4625 00008DF1 AC lodsb 4626 00008DF2 7517 jne .notrange 4627 4628 00008DF4 8B1E[840C] mov bx, word [reg_ds] ; get search range 4629 00008DF8 800E[A700]04 setopt [internalflags3], dif3_accept_getrange_0 4630 00008DFD E8671A call getrangeX.ecx_and_0_valid 4631 ; try to get second range 4632 00008E00 E84C2B call chkeol ; and insure end-of-line 4633 ; successful if it returned 4634 00008E03 66 _386_PM_o32 ; mov esi, edx 4635 00008E04 89D6 mov si, dx ; bx:esi-> source string 4636 00008E06 66 _386_PM_o32 ; sub ecx, edx 4637 00008E07 29D1 sub cx, dx ; ecx = count - 1 4638 00008E09 EB1E jmp short @F 4639 4640 .notrange: 4641 00008E0B E8532B call skipcomm0 4642 00008E0E E8A71B call getstr ; get string of bytes 4643 00008E11 89F9 mov cx, di 4644 00008E13 81E9[0E08] sub cx, line_out 4645 00008E17 7503E9F616 jz error 4646 00008E1C 49 dec cx 4647 00008E1D 660FB7C9 _386_PM movzx ecx, cx 4648 00008E21 8CDB mov bx, ds 4649 00008E23 6631F6 _386_PM xor esi, esi 4650 00008E26 BE[0E08] mov si, line_out 4651 4652 @@: 4653 00008E29 66 _386_PM_o32 ; pop edi 4654 00008E2A 5F pop di 4655 00008E2B 66 _386_PM_o32 ; pop eax 4656 00008E2C 58 pop ax 4657 00008E2D 07 pop es 4658 00008E2E 8EDB mov ds, bx 4659 %if _PM 4660 00008E30 36803E[DC88]00 cmp byte [ss:bAddr32], 0 4661 00008E36 7440 jz ff16 4662 ff32: 4663 [cpu 386] 4664 00008E38 6641 inc ecx 4665 00008E3A 0F84D416 jz error 4666 00008E3E 6683F901 cmp ecx, byte 1 4667 00008E42 7429 je .onebytesource 4668 00008E44 6631D2 xor edx, edx ; edx:eax = size 4669 00008E47 66F7F1 div ecx 4670 00008E4A 6685C0 test eax, eax 4671 00008E4D 7413 jz .partial 4672 .loop: 4673 00008E4F 6656 push esi 4674 00008E51 6651 push ecx 4675 00008E53 67A4 a32 movsb 4676 00008E55 6649 dec ecx 4677 00008E57 F367A4 a32 rep movsb 4678 00008E5A 6659 pop ecx 4679 00008E5C 665E pop esi 4680 00008E5E 6648 dec eax 4681 00008E60 75ED jnz .loop 4682 .partial: 4683 00008E62 6689D1 mov ecx, edx ; get remainder (number of bytes in partial copy) 4684 00008E65 67E344 jecxz ffret ; if no partial copy --> 4685 00008E68 F367A4 a32 rep movsb 4686 00008E6B EB3F jmp short ffret ; done --> 4687 .onebytesource: 4688 00008E6D 6689C1 mov ecx, eax ; size 4689 00008E70 678A06 mov al, byte [esi] 4690 00008E73 F367AA a32 rep stosb 4691 00008E76 EB34 jmp short ffret 4692 __CPU__ 4693 ff16: 4694 %endif 4695 00008E78 31D2 xor dx, dx ; dx:ax = size 4696 00008E7A 83F801 cmp ax, byte 1 4697 00008E7D 83D200 adc dx, byte 0 ; convert 0000:0000 to 0001:0000 (0 = 64 KiB) 4698 00008E80 41 inc cx 4699 00008E81 7503 jnz @F 4700 ; dx:ax = 1_0000h, remainder = 0, quotient = 1 4701 ; dx:ax = 1, remainder = 1, quotient = 0 4702 ; dx:ax = 1234h, remainder = 1234h, quotient = 0 4703 00008E83 92 xchg ax, dx 4704 00008E84 EB07 jmp @FF 4705 4706 @@: 4707 00008E86 83F901 cmp cx, byte 1 4708 00008E89 7419 je .onebytesource ; a common optimization 4709 00008E8B F7F1 div cx ; compute number of whole repetitions 4710 @@: 4711 00008E8D 85C0 test ax, ax 4712 00008E8F 740B jz .partial ; if less than one whole rep 4713 .loop: 4714 00008E91 56 push si 4715 00008E92 51 push cx 4716 00008E93 A4 movsb 4717 00008E94 49 dec cx 4718 00008E95 F3A4 rep movsb 4719 00008E97 59 pop cx 4720 00008E98 5E pop si 4721 00008E99 48 dec ax 4722 00008E9A 75F5 jnz .loop ; if more to go 4723 .partial: 4724 00008E9C 89D1 mov cx, dx ; get remainder (number of bytes in partial copy) 4725 00008E9E E30C jcxz ffret ; if no partial copy --> 4726 00008EA0 F3A4 rep movsb 4727 00008EA2 EB08 jmp short ffret ; done --> 4728 .onebytesource: 4729 00008EA4 89C1 mov cx, ax ; size 4730 00008EA6 8A04 mov al, byte [si] 4731 00008EA8 AA stosb ; cx=0 -> 64 kB 4732 00008EA9 49 dec cx 4733 00008EAA F3AA rep stosb 4734 ffret: 4735 00008EAC 16 push ss ; restore ds 4736 00008EAD 1F pop ds 4737 00008EAE 16 push ss ; restore es 4738 00008EAF 07 pop es 4739 00008EB0 C3 retn 4740 4741 4742 %if _EXPRESSIONS 4743 4744 ; H command - hex computation 4745 hh: 4746 00008EB1 E8AD2A call skipcomm0 4747 00008EB4 4E dec si 4748 00008EB5 BA[5467] mov dx, msg.base 4749 00008EB8 E8202A call isstring? 4750 00008EBB 7403E9CC00 jne .normal 4751 00008EC0 E8B62A call skipequals 4752 00008EC3 E86D24 call getexpression 4753 00008EC6 85DB test bx, bx 4754 @@: 4755 00008EC8 7403E94516 jnz error 4756 00008ECD 83FA24 cmp dx, 36 4757 00008ED0 77F6 ja @B 4758 00008ED2 83FA02 cmp dx, 2 4759 00008ED5 72F1 jb @B 4760 00008ED7 52 push dx 4761 4762 00008ED8 E8862A call skipcomm0 4763 00008EDB 4E dec si 4764 00008EDC BA[5967] mov dx, msg.group 4765 00008EDF E8F929 call isstring? 4766 00008EE2 BA0000 mov dx, 0 4767 00008EE5 7513 jne .gotgroup 4768 00008EE7 E88F2A call skipequals 4769 00008EEA E84624 call getexpression 4770 00008EED E8712A call skipcomm0 4771 00008EF0 85DB test bx, bx 4772 00008EF2 75D4 jnz @B 4773 00008EF4 83FA20 cmp dx, 32 4774 00008EF7 77CF ja @B 4775 00008EF9 4E dec si 4776 .gotgroup: 4777 00008EFA 52 push dx 4778 00008EFB BA[5F67] mov dx, msg.width 4779 00008EFE E8DA29 call isstring? 4780 00008F01 BB0000 mov bx, 0 4781 00008F04 7515 jne .gotwidth 4782 00008F06 E8702A call skipequals 4783 00008F09 E82724 call getexpression 4784 00008F0C E8522A call skipcomm0 4785 00008F0F 85DB test bx, bx 4786 00008F11 75B5 jnz @B 4787 00008F13 83FA20 cmp dx, 32 4788 00008F16 77B0 ja @B 4789 00008F18 89D3 mov bx, dx 4790 00008F1A A8 db __TEST_IMM8 ; (skip lodsb) 4791 .gotwidth: 4792 00008F1B AC lodsb 4793 00008F1C 53 push bx 4794 00008F1D E8E200 call .compute 4795 00008F20 58 pop ax 4796 00008F21 5E pop si 4797 00008F22 59 pop cx 4798 00008F23 BF[5008] mov di, line_out + 66 4799 4800 00008F26 E81901 call .storeresult 4801 4802 00008F29 93 xchg bx, ax ; ax:dx = number, bx = width 4803 00008F2A 92 xchg ax, dx ; dx:ax = number 4804 lframe 4805 00008F2B 5589E5 lenter 4806 lvar dword, dividend 4807 00008F2E 52 push dx 4808 00008F2F 50 push ax 4809 00008F30 4B dec bx 4810 lvar word, minwidth 4811 00008F31 53 push bx 4812 lvar word, group 4813 00008F32 56 push si 4814 lvar word, groupcounter 4815 00008F33 56 push si 4816 4817 00008F34 89FB mov bx, di 4818 00008F36 FD std ; _AMD_ERRATUM_109_WORKAROUND does not apply 4819 4820 ; dword [bp + ?dividend] = number to display 4821 ; cx = base 4822 .loop_write: 4823 4824 00008F37 31D2 xor dx, dx 4825 00008F39 57 push di 4826 00008F3A BF0400 mov di, 4 4827 .loop_divide: 4828 00008F3D 8B43FA mov ax, [bp + ?dividend - 2 + di] 4829 00008F40 F7F1 div cx 4830 00008F42 8943FA mov word [bp + ?dividend - 2 + di], ax 4831 00008F45 4F dec di 4832 00008F46 4F dec di 4833 00008F47 75F4 jnz .loop_divide 4834 ; dx = last remainder 4835 00008F49 5F pop di 4836 00008F4A 92 xchg ax, dx ; ax = remainder (next digit) 4837 ; dword [bp + ?dividend] = result of div 4838 00008F4B 0430 add al, '0' 4839 00008F4D 3C39 cmp al, '9' 4840 00008F4F 7602 jbe @F 4841 00008F51 0407 add al, -('9'+1)+'A' 4842 @@: 4843 00008F53 AA stosb 4844 4845 00008F54 FF4EF6 dec word [bp + ?groupcounter] 4846 00008F57 7509 jnz @F 4847 00008F59 FF76F8 push word [bp + ?group] 4848 00008F5C 8F46F6 pop word [bp + ?groupcounter] 4849 00008F5F B05F mov al, '_' 4850 00008F61 AA stosb 4851 @@: 4852 4853 00008F62 FF4EFA dec word [bp + ?minwidth] 4854 00008F65 79D0 jns .loop_write 4855 4856 00008F67 837EFE00 cmp word [bp + ?dividend + 2], 0 4857 00008F6B 75CA jnz .loop_write 4858 00008F6D 837EFC00 cmp word [bp + ?dividend], 0 4859 ; any more ? 4860 00008F71 75C4 jnz .loop_write ; loop --> 4861 4862 00008F73 FC cld 4863 4864 00008F74 29FB sub bx, di 4865 00008F76 89D9 mov cx, bx 4866 00008F78 89FE mov si, di 4867 00008F7A 46 inc si 4868 4869 00008F7B BF[0E08] mov di, line_out 4870 4871 00008F7E 803C5F cmp byte [si], '_' 4872 00008F81 7502 jne @F 4873 00008F83 46 inc si 4874 00008F84 49 dec cx 4875 ; never need to loop because next digit is always a digit 4876 4877 @@: 4878 00008F85 F3A4 rep movsb ; overlapping! 4879 4880 00008F87 89EC5D lleave 4881 00008F8A EB73 jmp short .putsline_crlf 4882 4883 4884 .normal: 4885 00008F8C AC lodsb 4886 00008F8D 56 push si 4887 00008F8E 50 push ax 4888 00008F8F 800E[CC95]01 or byte [hhflag], 1 ; set flag so no operator means add 4889 00008F94 E86B00 call .compute 4890 00008F97 58 pop ax 4891 00008F98 5E pop si 4892 00008F99 E8A600 call .storeresult 4893 00008F9C F606[CC95]04 test byte [hhflag], 4 ; any two-fold operation ? 4894 00008FA1 741F jz .single ; no --> 4895 00008FA3 8A26[8100] mov ah, byte [options2 + 1] 4896 00008FA7 80E410 and ah, opt2_hh_compat >> 8 4897 00008FAA E87100 call .store2 ; display "FFFFFFFF (-0001)" 4898 00008FAD 50 push ax 4899 00008FAE B82020 mov ax, 32<<8|32 4900 00008FB1 AB stosw 4901 00008FB2 58 pop ax 4902 00008FB3 50 push ax 4903 00008FB4 800E[CC95]02 or byte [hhflag], 2 ; set flag so no operator means sub 4904 00008FB9 E84600 call .compute 4905 00008FBC 58 pop ax 4906 00008FBD E85E00 call .store2 ; display "FFFFFFFF (-0001)" 4907 00008FC0 EB3D jmp short .putsline_crlf 4908 4909 .single: 4910 00008FC2 B400 mov ah, 0 4911 00008FC4 53 push bx 4912 00008FC5 52 push dx 4913 00008FC6 E85500 call .store2 4914 4915 00008FC9 B82020 mov ax, (32 << 8) | 32 4916 00008FCC AB stosw 4917 00008FCD B86465 mov ax, "de" 4918 00008FD0 AB stosw 4919 00008FD1 B86369 mov ax, "ci" 4920 00008FD4 AB stosw 4921 00008FD5 B86D61 mov ax, "ma" 4922 00008FD8 AB stosw 4923 00008FD9 B86C3A mov ax, "l:" 4924 00008FDC AB stosw 4925 00008FDD B020 mov al, 32 4926 00008FDF AA stosb 4927 00008FE0 58 pop ax 4928 00008FE1 5A pop dx 4929 00008FE2 E8E529 call decdword 4930 00008FE5 85D2 test dx, dx ; result negative ? 4931 00008FE7 7916 jns @F ; no --> 4932 00008FE9 50 push ax 4933 00008FEA B82028 mov ax, " (" 4934 00008FED AB stosw 4935 00008FEE B02D mov al, "-" 4936 00008FF0 AA stosb 4937 00008FF1 58 pop ax 4938 00008FF2 F7DA neg dx 4939 00008FF4 F7D8 neg ax 4940 00008FF6 83DA00 sbb dx, byte 0 ; neg bx:dx 4941 00008FF9 E8CE29 call decdword 4942 00008FFC B029 mov al, ")" 4943 00008FFE AA stosb 4944 @@: 4945 .putsline_crlf: 4946 00008FFF E9702A jmp putsline_crlf 4947 4948 4949 .compute: 4950 00009002 E82E23 call getdword 4951 00009005 E84729 call chkeol ; expect end of line here 4952 .comp_ret: 4953 00009008 C3 retn 4954 4955 ; INP: bx:dx = result 4956 ; ah = flag, nonzero if to stay 86-DOS Debug compatible 4957 ; OUT: displayed 4958 ; CHG: di, bx, dx 4959 .store: 4960 00009009 50 push ax 4961 0000900A 84E4 test ah, ah 4962 0000900C 7509 jnz .store_nothigh 4963 0000900E 85DB test bx, bx 4964 00009010 7405 jz .store_nothigh ; no need to display 32-bit value 4965 00009012 89D8 mov ax, bx 4966 00009014 E8232A call hexword 4967 .store_nothigh: 4968 00009017 89D0 mov ax, dx 4969 00009019 E81E2A call hexword 4970 0000901C 58 pop ax 4971 0000901D C3 retn 4972 4973 .store2: 4974 0000901E E8E8FF call .store 4975 00009021 50 push ax 4976 00009022 84E4 test ah, ah 4977 00009024 751A jnz .store2_ret 4978 00009026 85DB test bx, bx ; result negative ? 4979 00009028 7916 jns .store2_ret ; no --> 4980 0000902A B82028 mov ax, " (" 4981 0000902D AB stosw 4982 0000902E B02D mov al, "-" 4983 00009030 AA stosb 4984 00009031 F7DB neg bx 4985 00009033 F7DA neg dx 4986 00009035 83DB00 sbb bx, byte 0 ; neg bx:dx 4987 00009038 58 pop ax 4988 00009039 50 push ax 4989 0000903A E8CCFF call .store 4990 0000903D B029 mov al, ")" 4991 0000903F AA stosb 4992 .store2_ret: 4993 00009040 58 pop ax 4994 00009041 C3 retn 4995 4996 4997 .storeresult: 4998 00009042 8916[2490] mov word [hhresult], dx 4999 00009046 891E[2690] mov word [hhresult + 2], bx 5000 0000904A C3 retn 5001 %else 5002 ; H command - hex addition and subtraction. 5003 hh: 5004 call getdword 5005 push bx 5006 push dx 5007 call skipcomm0 5008 call getdword 5009 call chkeol ; expect end of line here 5010 pop cx 5011 pop ax ; first value in AX:CX, second in BX:DX 5012 mov si, ax 5013 mov bp, cx ; first value in SI:BP now 5014 mov ax, cx 5015 add ax, dx 5016 push ax 5017 mov ax, si 5018 adc ax, bx 5019 jz .nothigh1 ; no need to display 32-bit value 5020 call hexword 5021 .nothigh1: 5022 pop ax 5023 call hexword 5024 mov ax, 2020h 5025 stosw 5026 mov ax, bp 5027 sub ax, dx 5028 push ax 5029 mov ax, si 5030 sbb ax, bx 5031 jz .nothigh2 ; no need to display 32-bit value 5032 or si, bx 5033 jz .nothigh2 ; both were zero, non-zero result only by carry --> 5034 call hexword 5035 .nothigh2: 5036 pop ax 5037 call hexword 5038 call putsline_crlf 5039 retn 5040 %endif 5041 5042 5043 usesection lDEBUG_DATA_ENTRY 5044 5045 align 4, db 0 5046 00009024 00000000 hhresult: dd 0 5047 5048 usesection lDEBUG_CODE 5049 5050 5051 ; O command - output to I/O port. 5052 oo: 5053 0000904B B44F mov ah, 'O' 5054 0000904D BB[5490] mov bx, .tab 5055 00009050 E95A01 jmp ii.common 5056 5057 5058 00009053 00 align 2, db 0 5059 .tab: 5060 00009054 [5A90][6490][6E90] dw .byte, .word, .dword 5061 5062 5063 .byte: 5064 0000905A E8CA27 call getbyte ; read value from command line 5065 0000905D E8EF28 call chkeol ; expect end of line here 5066 00009060 92 xchg ax, dx ; al = value 5067 00009061 5A pop dx ; recover port number 5068 00009062 EE out dx, al ; send 5069 00009063 C3 retn 5070 5071 .word: 5072 00009064 E8B227 call getword 5073 00009067 E8E528 call chkeol 5074 0000906A 92 xchg ax, dx ; ax = value 5075 0000906B 5A pop dx 5076 0000906C EF out dx, ax 5077 0000906D C3 retn 5078 5079 .dword: 5080 [cpu 386] 5081 0000906E E8C222 call getdword 5082 00009071 E8DB28 call chkeol ; expect end of line here 5083 00009074 53 push bx 5084 00009075 52 push dx 5085 00009076 6658 pop eax ; eax = value 5086 00009078 5A pop dx 5087 00009079 66EF out dx, eax 5088 0000907B C3 retn 5089 __CPU__ 5090 5091 5092 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 5093 if_exists_check: 5094 0000907C 16 push ss 5095 0000907D 07 pop es 5096 0000907E 8B3E[080C] mov di, word [if_exists_si] 5097 00009082 8B0E[0C0C] mov cx, word [if_exists_length] 5098 00009086 8B36[0A0C] mov si, word [if_exists_sp] 5099 0000908A F3A4 rep movsb 5100 0000908C 8B0E[0C0C] mov cx, word [if_exists_length] 5101 00009090 41 inc cx 5102 00009091 80E1FE and cl, ~1 5103 5104 00009094 8B36[060C] mov si, word [if_exists_then_address] 5105 00009098 85F6 test si, si 5106 0000909A 740A jz .error 5107 0000909C 4E dec si 5108 0000909D BA[B164] mov dx, msg.then 5109 000090A0 E83828 call isstring? 5110 000090A3 7501 jne .error 5111 000090A5 C3 retn 5112 5113 .error: 5114 000090A6 B80701 mov ax, 107h 5115 000090A9 E8AD14 call setrc 5116 000090AC E96314 jmp error 5117 5118 if_exists_not_found: 5119 000090AF E8CAFF call if_exists_check 5120 000090B2 F606[A400]40 testopt [internalflags3], dif3_if_not 5121 000090B7 7512 jnz if_exists_condition_met 5122 if_exists_condition_not_met: 5123 000090B9 E9446F jmp cmd3 5124 5125 if_exists_found_open: 5126 000090BC 16 push ss 5127 000090BD 07 pop es 5128 000090BE E8B133 call getline_close_file 5129 5130 if_exists_found_closed: 5131 000090C1 E8B8FF call if_exists_check 5132 000090C4 F606[A400]40 testopt [internalflags3], dif3_if_not 5133 000090C9 75EE jnz if_exists_condition_not_met 5134 if_exists_condition_met: 5135 000090CB 8B26[0A0C] mov sp, word [if_exists_sp] 5136 000090CF 01CC add sp, cx 5137 000090D1 E8BB28 call skipwhite 5138 000090D4 5A pop dx ; discard near return address 5139 000090D5 8026[A700]E7 clropt [internalflags3], dif3_in_if | dif3_auxbuff_guarded_1 5140 000090DA E99872 jmp cmd3_notblank 5141 %endif 5142 5143 5144 ; I command - input from I/O port. 5145 ; 5146 ; IF command -- conditional 5147 ii: 5148 000090DD 89F2 mov dx, si 5149 000090DF 50 push ax 5150 000090E0 8B44FE mov ax, [si - 2] 5151 000090E3 25DFDF and ax, TOUPPER_W 5152 000090E6 3D4946 cmp ax, "IF" 5153 000090E9 58 pop ax 5154 000090EA 7403E9B500 jne .not_if 5155 5156 000090EF E89D28 call skipwhite 5157 000090F2 E80A19 call isoperator? 5158 000090F5 7514 jne .if 5159 000090F7 89CB mov bx, cx 5160 000090F9 01DB add bx, bx ; bh = 0 ! 5161 000090FB 50 push ax 5162 000090FC FF97[D090] call near [operatordispatchers+bx] 5163 00009100 58 pop ax 5164 00009101 85DB test bx, bx 5165 00009103 7403E99C00 jnz .not_if 5166 00009108 E88428 call skipwhite 5167 .if: 5168 0000910B 8026[A400]BF clropt [internalflags3], dif3_if_not 5169 00009110 4E dec si 5170 00009111 BA[B664] mov dx, msg.not 5171 00009114 E8C427 call isstring? 5172 00009117 AC lodsb 5173 00009118 7508 jne @F 5174 0000911A E87328 call skipwh0 5175 0000911D 800E[A400]40 setopt [internalflags3], dif3_if_not 5176 5177 @@: 5178 %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 5179 00009122 4E dec si 5180 00009123 BA[7C6C] mov dx, msg.exists 5181 00009126 E8B227 call isstring? 5182 00009129 AC lodsb 5183 0000912A 754C jne .if_numeric 5184 0000912C E86128 call skipwh0 5185 0000912F 4E dec si 5186 00009130 BA[836C] mov dx, msg.y 5187 00009133 E8A527 call isstring? 5188 00009136 7403E9D713 jne error 5189 0000913B E85128 call skipwhite 5190 5191 0000913E 4E dec si 5192 0000913F 8936[080C] mov word [if_exists_si], si 5193 00009143 89F3 mov bx, si 5194 @@: 5195 00009145 AC lodsb 5196 00009146 E8F527 call iseol?.notsemicolon 5197 00009149 75FA jne @B 5198 0000914B 89F1 mov cx, si ; -> after EOL byte 5199 0000914D 29D9 sub cx, bx ; = length including EOL 5200 0000914F 890E[0C0C] mov word [if_exists_length], cx 5201 00009153 41 inc cx ; round up 5202 00009154 80E1FE and cl, ~1 ; make even 5203 00009157 29CC sub sp, cx 5204 00009159 8926[0A0C] mov word [if_exists_sp], sp 5205 0000915D 89E7 mov di, sp 5206 0000915F 89DE mov si, bx 5207 00009161 D1E9 shr cx, 1 5208 00009163 F3A5 rep movsw 5209 5210 00009165 89DE mov si, bx 5211 00009167 AC lodsb 5212 00009168 8326[060C]00 and word [if_exists_then_address], 0 5213 0000916D 800E[A700]08 setopt [internalflags3], dif3_in_if 5214 00009172 E88D38 call yy 5215 00009175 E99A13 jmp error 5216 %endif 5217 5218 .if_numeric: 5219 00009178 E8B821 call getexpression 5220 0000917B E8C71B call toboolean 5221 0000917E 89D3 mov bx, dx 5222 00009180 BA[B164] mov dx, msg.then 5223 00009183 4E dec si 5224 00009184 E85427 call isstring? 5225 00009187 7403E98613 jne error 5226 0000918C E80028 call skipwhite 5227 0000918F F606[A400]40 testopt [internalflags3], dif3_if_not 5228 00009194 7403 jz @F 5229 00009196 80F301 xor bl, 1 5230 @@: 5231 00009199 85DB test bx, bx 5232 0000919B 7404 jz .if_false 5233 0000919D 5B pop bx ; discard near return address to cmd3 5234 0000919E E9D471 jmp cmd3_notblank ; execute tail 5235 5236 .if_false: 5237 000091A1 E91E3D jmp resetrc 5238 5239 .not_if: 5240 000091A4 89D6 mov si, dx 5241 000091A6 4E dec si 5242 000091A7 AC lodsb 5243 5244 000091A8 B449 mov ah, 'I' 5245 000091AA BB[E091] mov bx, .tab 5246 5247 ; bx = jump table for byte, word, dword handler 5248 ; ah = letter of the command 5249 ; si, al etc. 5250 .common: 5251 000091AD 50 push ax 5252 000091AE E892FA call uppercase 5253 000091B1 3C57 cmp al, 'W' 5254 000091B3 7507 jne .notw 5255 .incbx2: 5256 000091B5 43 inc bx 5257 000091B6 43 inc bx ; use word handler 5258 000091B7 E8D527 call skipwhite ; skip the 'W' til next character 5259 000091BA EB12 jmp short .sizeset 5260 5261 .notw: 5262 000091BC 3C44 cmp al, 'D' 5263 000091BE 750E jne .sizeset 5264 %if 1 5265 000091C0 3264FE xor ah, byte [si-2] 5266 000091C3 7405 jz .d ; "Id" or "Od" --> (uppercase command) 5267 000091C5 80F420 xor ah, 32 5268 000091C8 7504 jnz .sizeset ; no space is allowed between the command and 'D' --> 5269 ; "id" or "od" here (lowercase command) 5270 .d: 5271 %endif 5272 000091CA 43 _386 inc bx 5273 000091CB 43 _386 inc bx ; use dword handler 5274 000091CC EBE7 _386_jmps .incbx2 ; bx += 2 and skip the 'D' 5275 ; no 386 here. try with D as part of port number 5276 .sizeset: 5277 000091CE E84826 call getword ; get port 5278 000091D1 59 pop cx ; restore letter if necessary 5279 000091D2 80FD49 cmp ch, 'I' ; check whether I or O 5280 000091D5 7504 jne .o ; O --> 5281 000091D7 E87527 call chkeol ; expect end of line here for I commands 5282 000091DA A8 db __TEST_IMM8 ; (skip push) 5283 .o: 5284 000091DB 52 push dx ; save port number for O commands 5285 000091DC 2EFF27 jmp near [cs:bx] 5286 5287 5288 000091DF 00 align 2, db 0 5289 .tab: 5290 000091E0 [E691][EC91][F391] dw .byte, .word, .dword 5291 5292 .byte: 5293 000091E6 EC in al, dx 5294 000091E7 E85728 call hexbyte 5295 000091EA EB04 jmp short .done 5296 5297 .word: 5298 000091EC ED in ax, dx 5299 .doneword: 5300 000091ED E84A28 call hexword 5301 .done: 5302 000091F0 E97F28 jmp putsline_crlf 5303 5304 .dword: 5305 [cpu 386] 5306 000091F3 66ED in eax, dx 5307 000091F5 E83628 call hexword_high 5308 __CPU__ 5309 000091F8 EBF3 jmp short .doneword 5310 5311 5312 000091FA E91513 errorj5:jmp error 5313 5314 5315 %if _PM 5316 ; OUT: NC 5317 ; ZR if in protected mode 5318 ; NZ otherwise 5319 ; STT: - 5320 ; ([internalflags] & nodosloaded, [internalflags] & protectedmode set up) 5321 ispm: 5322 000091FD 50 push ax 5323 %if protectedmode & ~0FF00h 5324 %error Internal flags re-ordered, adjust code here 5325 %endif 5326 000091FE 36A0[9D00] mov al, byte [ss:internalflags+1] ; get flag byte 5327 00009202 2408 and al, protectedmode>>8 ; separate PM flag 5328 00009204 3408 xor al, protectedmode>>8 ; ZR if in PM (NC) 5329 00009206 58 pop ax 5330 00009207 C3 retn 5331 %endif 5332 5333 5334 setpspdbg: 5335 00009208 8CD3 mov bx, ss 5336 setpsp: 5337 %if _BOOTLDR 5338 0000920A F606[9D00]40 testopt [internalflags], nodosloaded 5339 0000920F 753D jnz .ret ; no PSPs --> 5340 %endif 5341 00009211 B450 mov ah, 50h 5342 %if _PM && (_NOEXTENDER || _USESDA) 5343 00009213 E8E7FF call ispm 5344 %if _NOEXTENDER 5345 00009216 751B jnz .rm 5346 subcpu 286 5347 00009218 51 push cx 5348 00009219 52 push dx 5349 0000921A 53 push bx 5350 0000921B 50 push ax 5351 0000921C B80600 mov ax, 0006h 5352 0000921F CD31 int 31h 5353 00009221 58 pop ax 5354 00009222 C1E10C shl cx, 12 5355 00009225 C1EA04 shr dx, 4 5356 00009228 09CA or dx, cx 5357 0000922A 89D3 mov bx, dx 5358 0000922C E873CB call _doscall.pm ; insure non-extended 5359 0000922F 5B pop bx 5360 00009230 5A pop dx 5361 00009231 59 pop cx 5362 00009232 C3 retn 5363 subcpureset 5364 %else 5365 jz _int21 ; extended 5366 %endif 5367 %endif 5368 .rm: 5369 %if _USESDA 5370 00009233 833E[DA0A]FF cmp word [pSDA+0], byte -1 5371 00009238 7503E98300 je _int21 5372 0000923D 1E push ds 5373 0000923E 56 push si 5374 0000923F BE[DC0A] mov si, pSDA + so16aSegSel 5375 00009242 E8B814 call update_dosdata_segment 5376 00009245 C574FE lds si, [si - so16aSegSel] 5377 00009248 895C10 mov word [si+10h], bx 5378 0000924B 5E pop si 5379 0000924C 1F pop ds 5380 0000924D C3 retn 5381 %else 5382 jmp short _int21 5383 %endif 5384 %if _BOOTLDR 5385 .ret: 5386 getpsp.ret: 5387 0000924E C3 retn 5388 %endif 5389 5390 getpsp: 5391 %if _BOOTLDR 5392 0000924F 31DB xor bx, bx 5393 00009251 F606[9D00]40 testopt [internalflags], nodosloaded 5394 00009256 75F6 jnz .ret ; no PSPs --> 5395 %endif 5396 00009258 B451 mov ah, 51h 5397 %if _PM && (_NOEXTENDER || _USESDA) 5398 0000925A E8A0FF call ispm 5399 %if _NOEXTENDER 5400 0000925D 750B jnz .rm 5401 0000925F E840CB call _doscall.pm ; insure non-extended 5402 00009262 B80200 mov ax, 2 5403 00009265 CD31 int 31h 5404 00009267 89C3 mov bx, ax 5405 00009269 C3 retn 5406 %else 5407 jz _int21 ; extended 5408 %endif 5409 %endif 5410 .rm: 5411 %if _USESDA 5412 0000926A 833E[DA0A]FF cmp word [pSDA+0], byte -1 5413 0000926F 744F je _int21 5414 00009271 1E push ds 5415 00009272 56 push si 5416 00009273 BE[DC0A] mov si, pSDA + so16aSegSel 5417 00009276 E88414 call update_dosdata_segment 5418 00009279 C574FE lds si, [si - so16aSegSel] 5419 0000927C 8B5C10 mov bx, word [si + 10h] 5420 0000927F 5E pop si 5421 00009280 1F pop ds 5422 00009281 C3 retn 5423 %else 5424 jmp short _int21 5425 %endif 5426 5427 5428 _doscall_return_es: 5429 _doscall_return_es_parameter_es_ds: 5430 lframe near 5431 lpar word, es_ds_value 5432 lpar_return 5433 %if _PM 5434 lvar word, int_number 5435 00009282 5589E550 lenter 5436 00009286 C746FE2100 mov word [bp + ?int_number], 21h 5437 0000928B 9C pushf 5438 0000928C E86EFF call ispm 5439 0000928F 7518 jnz .rm 5440 .pm: 5441 00009291 9D popf 5442 00009292 FF7604 push word [bp + ?es_ds_value] 5443 00009295 FF7604 push word [bp + ?es_ds_value] 5444 00009298 FF76FE push word [bp + ?int_number] 5445 0000929B FF7600 push word [bp + ?frame_bp] 5446 0000929E E83100 call intcall_return_parameter_es_parameter_ds 5447 000092A1 8F4604 pop word [bp + ?es_ds_value] ; discard returned ds 5448 000092A4 8F4604 pop word [bp + ?es_ds_value] ; get es 5449 000092A7 EB13 jmp .ret 5450 .rm: 5451 000092A9 9D popf 5452 %else 5453 lenter 5454 %endif 5455 000092AA 06 push es 5456 000092AB 1E push ds 5457 000092AC FF7604 push word [bp + ?es_ds_value] 5458 000092AF 1F pop ds 5459 000092B0 FF7604 push word [bp + ?es_ds_value] 5460 000092B3 07 pop es 5461 000092B4 CD21 int 21h 5462 000092B6 06 push es 5463 000092B7 8F4604 pop word [bp + ?es_ds_value] 5464 000092BA 1F pop ds 5465 000092BB 07 pop es 5466 .ret: 5467 000092BC 89EC5D lleave 5468 000092BF C3 lret 5469 5470 5471 ; Execute real Int21 instruction. If this is in PM it might get extended. 5472 _int21: 5473 %if _BOOTLDR 5474 000092C0 9C pushf 5475 000092C1 F606[9D00]40 testopt [internalflags], nodosloaded 5476 000092C6 7504 jnz .reterr ; no Int21 --> (throw?) 5477 000092C8 9D popf 5478 %endif 5479 000092C9 CD21 int 21h 5480 000092CB C3 retn 5481 %if _BOOTLDR 5482 .reterr: 5483 000092CC 9D popf 5484 000092CD B80100 mov ax, 1 5485 000092D0 F9 stc 5486 000092D1 C3 retn 5487 %endif 5488 5489 5490 %if _PM 5491 intcall_return_parameter_es_parameter_ds: 5492 lframe near 5493 lpar word, es_value 5494 lpar word, ds_value 5495 lpar_return 5496 lpar word, int_number 5497 lpar word, bp_value 5498 lvar 32h, 86m_call_struc 5499 000092D2 5589E58D66CE lenter 5500 000092D8 06 push es 5501 000092D9 897ECE mov word [bp + ?86m_call_struc +00h], di ; edi 5502 000092DC 8976D2 mov word [bp + ?86m_call_struc +04h], si ; esi 5503 000092DF 895EDE mov word [bp + ?86m_call_struc +10h], bx ; ebx 5504 000092E2 8956E2 mov word [bp + ?86m_call_struc +14h], dx ; edx 5505 000092E5 894EE6 mov word [bp + ?86m_call_struc +18h], cx ; ecx 5506 000092E8 8946EA mov word [bp + ?86m_call_struc +1Ch], ax ; eax 5507 000092EB 8B4604 mov ax, word [bp + ?bp_value] 5508 000092EE 8946D6 mov word [bp + ?86m_call_struc +08h], ax ; bp 5509 000092F1 B000 mov al, 0 ; (preserve flags!) 5510 000092F3 9F lahf 5511 000092F4 86C4 xchg al, ah 5512 000092F6 8946EE mov word [bp + ?86m_call_struc +20h], ax ; flags 5513 000092F9 31C0 xor ax, ax 5514 000092FB 8946DC mov word [bp + ?86m_call_struc +0Ch + 2], ax 5515 000092FE 8946DA mov word [bp + ?86m_call_struc +0Ch], ax 5516 00009301 8946FC mov word [bp + ?86m_call_struc +2Eh], ax ; sp 5517 00009304 8946FE mov word [bp + ?86m_call_struc +30h], ax ; ss 5518 00009307 8B460A mov ax, word [bp + ?es_value] ; usually [pspdbg] 5519 0000930A 8946F0 mov word [bp + ?86m_call_struc +22h], ax ; es 5520 0000930D 8B4608 mov ax, word [bp + ?ds_value] ; usually [pspdbg] 5521 00009310 8946F2 mov word [bp + ?86m_call_struc +24h], ax ; ds 5522 00009313 16 push ss 5523 00009314 07 pop es ; => stack 5524 00009315 8D7ECE lea di, [bp + ?86m_call_struc] ; -> 86-Mode call structure 5525 00009318 660FB7FF _386 movzx edi, di ; (previously checked b[dpmi32] here) 5526 0000931C 8B5E06 mov bx, word [bp + ?int_number] ; int# 5527 0000931F 31C9 xor cx, cx 5528 00009321 B80003 mov ax, 0300h 5529 00009324 CD31 int 31h 5530 00009326 8A66EE mov ah, byte [bp + ?86m_call_struc +20h] ; flags 5531 00009329 9E sahf 5532 0000932A 8B7ECE mov di, word [bp + ?86m_call_struc +00h] ; edi 5533 0000932D 8B76D2 mov si, word [bp + ?86m_call_struc +04h] ; esi 5534 00009330 8B5EDE mov bx, word [bp + ?86m_call_struc +10h] ; ebx 5535 00009333 8B56E2 mov dx, word [bp + ?86m_call_struc +14h] ; edx 5536 00009336 8B4EE6 mov cx, word [bp + ?86m_call_struc +18h] ; ecx 5537 00009339 8B46EA mov ax, word [bp + ?86m_call_struc +1Ch] ; eax 5538 0000933C FF76F0 push word [bp + ?86m_call_struc +22h] ; return es value 5539 0000933F 8F460A pop word [bp + ?es_value] ; in the parameter 5540 00009342 FF76F2 push word [bp + ?86m_call_struc +24h] ; return ds value 5541 00009345 8F4608 pop word [bp + ?ds_value] ; in the parameter 5542 00009348 07 pop es 5543 00009349 89EC5D lleave 5544 0000934C C20400 lret 5545 5546 intcall: 5547 lframe near 5548 lpar word, es_ds_value 5549 lpar word, int_number 5550 0000934F 5589E5 lenter 5551 00009352 FF7606 push word [bp + ?es_ds_value] ; es 5552 00009355 FF7606 push word [bp + ?es_ds_value] ; ds 5553 00009358 FF7604 push word [bp + ?int_number] ; int number 5554 0000935B FF7600 push word [bp + ?frame_bp] ; bp 5555 0000935E E871FF call intcall_return_parameter_es_parameter_ds 5556 ; (discard returned parameters ?es_value, ?ds_value, done by lleave) 5557 00009361 89EC5D lleave , forcerestoresp 5558 00009364 C20400 lret 5559 5560 5561 call_int2D: 5562 00009367 E893FE call ispm 5563 0000936A 750B jnz short .rm 5564 subcpu 286 5565 0000936C 36FF36[A60A] push word [ss:pspdbg] ; es ds value. generally unused 5566 00009371 6A2D push 2Dh ; interrupt 2Dh 5567 00009373 E8D9FF call intcall ; call it 5568 00009376 C3 retn 5569 subcpureset 5570 .rm: 5571 00009377 CD2D int 2Dh ; directly call int 2Dh 5572 00009379 C3 retn 5573 5574 5575 ; Called in PM only, ds unknown. 5576 ; 5577 ; INP: - 5578 ; OUT: CY if no DOS extender available ("MS-DOS" on Int2F.168A) 5579 ; NC if DOS extender available 5580 ; CHG: - 5581 isextenderavailable: 5582 subcpu 286 5583 0000937A 1E push ds 5584 0000937B 06 push es 5585 0000937C 60 pusha 5586 0000937D 16 push ss 5587 0000937E 1F pop ds 5588 0000937F BE[C97C] mov si, msg.msdos 5589 00009382 660FB7F6 _386 movzx esi, si 5590 00009386 B88A16 mov ax, 168Ah 5591 00009389 CD2F int 2Fh 5592 0000938B 3C01 cmp al, 1 ; CY if al is zero 5593 0000938D F5 cmc ; NC if al is zero, CY else 5594 0000938E 61 popa 5595 0000938F 07 pop es 5596 00009390 1F pop ds 5597 00009391 C3 retn 5598 subcpureset 5599 5600 nodosextinst: 5601 00009392 16 push ss 5602 00009393 1F pop ds 5603 00009394 BA[D97B] mov dx, nodosext 5604 00009397 E9562A jmp putsz 5605 %endif 5606 5607 5608 ; L command - read a program, or disk sectors, from disk. 5609 ll: 5610 %if _BOOTLDR 5611 0000939A F606[9D00]40 testopt [internalflags], nodosloaded 5612 0000939F 7406 jz @F 5613 000093A1 BA[955F] mov dx, msg.nobootsupp 5614 000093A4 E9492A jmp putsz 5615 @@: 5616 %endif 5617 5618 000093A7 E8C513 call parselw ; parse L and W argument format 5619 000093AA 7441 jz ll1 ; if request to read program 5620 %if _PM && _NOEXTENDER 5621 000093AC E84EFE call ispm 5622 000093AF 7505 jnz .rm 5623 000093B1 E8C6FF call isextenderavailable 5624 000093B4 72DC jc nodosextinst 5625 .rm: 5626 %endif 5627 000093B6 36F606[9C00]06 testopt [ss:internalflags], newpacket| ntpacket 5628 000093BC 7427 jz .oldint 5629 000093BE 88C2 mov dl, al ; zero-based drive 5630 000093C0 BE0060 mov si, 6000h ; read, assume "file data" 5631 %if _VDD 5632 000093C3 F606[9C00]04 testopt [internalflags], ntpacket 5633 000093C8 750A jnz .vdd 5634 %endif 5635 000093CA FEC2 inc dl ; one-based drive 5636 000093CC B80573 mov ax, 7305h ; ds:(e)bx-> packet 5637 000093CF F9 stc 5638 000093D0 CD21 int 21h ; use int 21h here, not doscall 5639 000093D2 EB13 jmp short .done 5640 %if _VDD 5641 .vdd: 5642 000093D4 A1[B80A] mov ax, word [hVdd] 5643 000093D7 B90500 mov cx, 5 5644 %if _PM 5645 000093DA 020E[DA88] add cl, byte [dpmi32] 5646 %endif 5647 000093DE C4C4580290 DispatchCall 5648 000093E3 EB02 jmp short .done 5649 %endif 5650 .oldint: 5651 000093E5 CD25 int 25h 5652 .done: 5653 000093E7 BA[A379] mov dx, reading 5654 000093EA E9DF0D jmp ww1 5655 5656 ; For .COM or .EXE files, we can only load at cs:100. Check that first. 5657 ll1: 5658 000093ED E8EE12 call InDos 5659 000093F0 7519 jnz not_while_indos 5660 000093F2 E83A71 call guard_re 5661 000093F5 F606[DD0B]06 test byte [fileext], EXT_COM| EXT_EXE 5662 000093FA 7423 jz ll4 ; if not .COM or .EXE file 5663 000093FC 3B1E[900C] cmp bx, word [reg_cs] 5664 00009400 7506 jne ll2 ; if segment is wrong 5665 00009402 81FA0001 cmp dx, 100h 5666 00009406 7417 je ll4 ; if address is OK (or not given) 5667 ll2: 5668 00009408 E90711 jmp error ; can only load .COM or .EXE at cs:100 5669 5670 not_while_indos: 5671 0000940B B80501 mov ax, 0105h 5672 0000940E E84811 call setrc 5673 00009411 BA[555D] mov dx, msg.not_while_indos 5674 00009414 E9D329 jmp putsz_error 5675 5676 5677 ; load (any) file (if not .EXE or .COM, load at BX:DX) 5678 ll3: 5679 00009417 803E[DD0B]00 cmp byte [fileext], 0 5680 0000941C 7501 jne ll4 5681 0000941E C3 retn 5682 5683 ; open file and get length 5684 ll4: 5685 0000941F 89DE mov si, bx ; save destination address, segment 5686 00009421 89D7 mov di, dx ; and offset 5687 00009423 B8003D mov ax, 3D00h ; open file for reading 5688 00009426 BA8000 mov dx, DTA 5689 doscall 2080 00009429 E86FC9 <1> call _doscall 5690 0000942C 7303E9AB01 jc ll16 ; error 5691 00009431 93 xchg ax, bx ; mov bx, ax 5692 00009432 B80242 mov ax, 4202h ; lseek 5693 00009435 31C9 xor cx, cx 5694 00009437 31D2 xor dx, dx 5695 00009439 CD21 int 21h 5696 5697 ; Split off file types 5698 ; At this point: 5699 ; bx file handle 5700 ; dx:ax file length 5701 ; si:di load address (CS:100h for .EXE or .COM) 5702 5703 0000943B F606[DD0B]06 test byte [fileext], EXT_COM | EXT_EXE 5704 00009440 7403E97E00 jnz ll13 ; if .COM or .EXE file 5705 5706 %if _PM 5707 ;--- dont load a file in protected mode, 5708 ;--- the read loop makes some segment register arithmetic 5709 00009445 E8B5FD call ispm 5710 00009448 7508 jnz .rm 5711 0000944A BA[1A7C] mov dx, nopmsupp 5712 0000944D E8A029 call putsz 5713 00009450 EB6A jmp ll12 5714 .rm: 5715 %endif 5716 5717 ; Load it ourselves. 5718 ; For non-.com/.exe files, we just do a read, and set BX:CX to the 5719 ; number of bytes read. 5720 5721 00009452 E8E03F call ensuredebuggeeloaded ; make sure a debuggee is loaded 5722 00009455 8E06[A40A] mov es, word [pspdbe] 5723 5724 ; Check the size against available space. 5725 00009459 56 push si 5726 0000945A 53 push bx 5727 5728 0000945B 263B360200 cmp si, word [es:ALASAP] 5729 00009460 9C pushf 5730 00009461 F7DE neg si 5731 00009463 9D popf 5732 00009464 7305 jae ll6 ; if loading past end of mem, allow through ffff 5733 00009466 2603360200 add si, word [es:ALASAP] ; si = number of paragraphs available 5734 ll6: 5735 0000946B B90400 mov cx, 4 5736 0000946E 31DB xor bx, bx 5737 ll7: 5738 00009470 D1E6 shl si, 1 5739 00009472 D1D3 rcl bx, 1 5740 00009474 E2FA loop ll7 5741 00009476 29FE sub si, di 5742 00009478 19CB sbb bx, cx ; bx:si = number of words left 5743 0000947A 7208 jb ll9 ; if already we're out of space 5744 0000947C 39D3 cmp bx, dx 5745 0000947E 7502 jne ll8 5746 00009480 39C6 cmp si, ax 5747 ll8: 5748 00009482 730A jae ll10 ; if not out of space 5749 ll9: 5750 00009484 5B pop bx ; out of space 5751 00009485 5E pop si 5752 00009486 BA[FE7D] mov dx, doserr8 ; not enough memory 5753 00009489 E86429 call putsz ; print string 5754 0000948C EB2E jmp short ll12 5755 5756 ll10: 5757 0000948E 5B pop bx 5758 0000948F 5E pop si 5759 5760 ; Store length in registers 5761 5762 ; seems a bit unwise to modify registers if a debuggee is running 5763 ; but MS DEBUG does it as well 5764 5765 %if 0 5766 mov cx,[reg_cs] 5767 cmp cx,[pspdbe] 5768 jnz .noregmodify 5769 cmp word [reg_eip], 100h 5770 jnz .noregmodify 5771 %endif 5772 00009490 8916[680C] mov word [reg_ebx], dx 5773 00009494 A3[6C0C] mov word [reg_ecx], ax 5774 .noregmodify: 5775 5776 ; Rewind the file 5777 00009497 B80042 mov ax, 4200h ; lseek 5778 0000949A 31C9 xor cx, cx 5779 0000949C 31D2 xor dx, dx 5780 0000949E CD21 int 21h 5781 5782 000094A0 BA0F00 mov dx, 0Fh 5783 000094A3 21FA and dx, di 5784 000094A5 B104 mov cl, 4 5785 000094A7 D3EF shr di, cl 5786 000094A9 01FE add si, di ; si:dx is the address to read to 5787 5788 ; Begin loop over chunks to read 5789 ll11: 5790 000094AB B43F mov ah, 3Fh ; read from file into DS:(E)DX 5791 000094AD B900FE mov cx, 0FE00h ; read up to this many bytes 5792 000094B0 8EDE mov ds, si 5793 000094B2 CD21 int 21h 5794 5795 000094B4 81C6E00F add si,0fe0h ;wont work in protected-mode! 5796 000094B8 39C8 cmp ax,cx 5797 000094BA 74EF je ll11 ;if end of file reached 5798 5799 ; Close the file and finish up. 5800 5801 ll12: 5802 000094BC B43E mov ah, 3Eh ; close file 5803 000094BE CD21 int 21h 5804 000094C0 16 push ss ; restore ds 5805 000094C1 1F pop ds 5806 000094C2 C3 retn ; done 5807 5808 ll13: 5809 ; file is .EXE or .COM 5810 ; Close the file 5811 %if 0 5812 push ax 5813 mov ah, 3Eh ; close file 5814 int 21h 5815 pop bx ; dx:bx is the file length 5816 5817 ; adjust .exe size by 200h (who knows why) 5818 ; cm: this is wrong. It needs to be adjusted by the header size, 5819 ; which is stored (as number of paragraphs) in the .EXE header. 5820 ; The header size is often 200h, but not always. 5821 test byte [fileext], EXT_EXE 5822 jz ll14 ; if not .EXE 5823 sub bx, 200h 5824 sbb dx, 0 5825 %else 5826 000094C3 52 push dx 5827 000094C4 50 push ax 5828 5829 000094C5 B80042 mov ax, 4200h ; lseek set 5830 000094C8 31C9 xor cx, cx 5831 000094CA 31D2 xor dx, dx 5832 000094CC CD21 int 21h 5833 000094CE 16 push ss 5834 000094CF 1F pop ds 5835 5836 000094D0 89E5 mov bp, sp 5837 000094D2 B91C00 mov cx, EXEHEADER_size 5838 000094D5 29CC sub sp, cx 5839 000094D7 89E2 mov dx, sp 5840 000094D9 89E6 mov si, sp 5841 000094DB B43F mov ah, 3Fh 5842 000094DD CD21 int 21h 5843 5844 000094DF 50 push ax 5845 000094E0 B43E mov ah, 3Eh ; close file 5846 000094E2 CD21 int 21h 5847 000094E4 58 pop ax 5848 5849 000094E5 39C8 cmp ax, cx 5850 000094E7 7524 jne .no_exe 5851 000094E9 813C4D5A cmp word [si + exeSignature], "MZ" 5852 000094ED 7406 je @F 5853 000094EF 813C5A4D cmp word [si + exeSignature], "ZM" 5854 000094F3 7518 jne .no_exe 5855 @@: 5856 5857 ; This possibly should honour the size of the image in pages 5858 ; as indicated by the header, instead of the file size. 5859 ; Oh well, for now we use the file size (on stack). 5860 000094F5 8B4408 mov ax, [si + exeHeaderSize] 5861 000094F8 31F6 xor si, si 5862 000094FA B90400 mov cx, 4 5863 @@: 5864 000094FD D1E0 shl ax, 1 5865 000094FF D1D6 rcl si, 1 5866 00009501 E2FA loop @B ; si:ax <<= 4 5867 5868 00009503 89EC mov sp, bp 5869 00009505 5B pop bx 5870 00009506 5A pop dx 5871 5872 00009507 29C3 sub bx, ax 5873 00009509 19F2 sbb dx, si ; file size minus header size 5874 5875 0000950B EB04 jmp @F 5876 5877 .no_exe: 5878 0000950D 89EC mov sp, bp 5879 0000950F 5B pop bx 5880 00009510 5A pop dx ; full file size 5881 @@: 5882 %endif 5883 5884 ; Clear registers 5885 5886 ll14: 5887 00009511 53 push bx 5888 00009512 52 push dx 5889 ; mov word [reg_ebx], dx 5890 ; mov word [reg_ecx], bx 5891 5892 ;--- cancel current process (unless there is none) 5893 ;--- this will also put cpu back in real-mode!!! 5894 5895 00009513 E84E10 call terminate_attached_process 5896 00009516 7503E9C400 jz ll_attached_unterminated 5897 5898 0000951B BF[640C] mov di, regs 5899 0000951E B92000 mov cx, 16*2 ;(8 std, 6 seg, ip, fl) * 2 5900 00009521 31C0 xor ax, ax 5901 00009523 F3AB rep stosw 5902 5903 00009525 8F06[680C] pop word [reg_ebx] 5904 00009529 8F06[6C0C] pop word [reg_ecx] 5905 5906 ; Fix up interrupt vectors in PSP 5907 0000952D BE0E00 mov si, CCIV ; address of original INT 23 and 24 (in PSP) 5908 00009530 BF[A80A] mov di, run2324 5909 00009533 A5 movsw 5910 00009534 A5 movsw 5911 00009535 A5 movsw 5912 00009536 A5 movsw 5913 5914 ; Actual program loading. Use the DOS interrupt. 5915 00009537 B8014B mov ax, 4B01h ; load program 5916 0000953A BA8000 mov dx, DTA ; offset of file to load 5917 0000953D BB[4C0C] mov bx, execblk ; parameter block 5918 00009540 CD21 int 21h ; load it 5919 00009542 7303E99500 jc ll16 ; if error 5920 00009547 89E0 mov ax, sp 5921 00009549 2B062E00 sub ax, [SPSAV] 5922 0000954D 3D8000 cmp ax, 80h 5923 00009550 7203 jb ll15 ; if in range 5924 00009552 B88000 mov ax, 80h 5925 ll15: 5926 00009555 A3[A20A] mov word [spadjust], ax 5927 00009558 C436[5A0C] les si, [execblk+14] 5928 0000955C 26AD es lodsw ; recover ax 5929 0000955E A3[640C] mov word [reg_eax], ax 5930 00009561 8936[740C] mov word [reg_esp], si 5931 00009565 8326[760C]00 and word [reg_esp + 2], 0 5932 0000956A 8C06[8C0C] mov word [reg_ss], es 5933 0000956E C436[5E0C] les si, [execblk+18] 5934 00009572 8936[9C0C] mov word [reg_eip], si 5935 00009576 8326[9E0C]00 and word [reg_eip + 2], 0 5936 0000957B 8C06[900C] mov word [reg_cs], es 5937 0000957F C606[DC0B]00 mov byte [bInit],0 5938 00009584 16 push ss 5939 00009585 07 pop es 5940 00009586 E8CC3F call set_efl_to_fl 5941 00009589 E8C3FC call getpsp 5942 0000958C 89D8 mov ax, bx 5943 0000958E A3[A40A] mov word [pspdbe], ax 5944 00009591 8026[9E00]7F clropt [internalflags], attachedterm 5945 00009596 BF[840C] mov di, reg_ds 5946 00009599 AB stosw 5947 0000959A AF scasw 5948 0000959B AB stosw ; reg_es 5949 0000959C E869FC call setpspdbg 5950 5951 ; Finish up. Set termination address. 5952 0000959F B82225 mov ax, 2522h ; set interrupt vector 22h 5953 000095A2 BA[D085] mov dx, int22 ; ds => lDEBUG_DATA_ENTRY 5954 000095A5 CD21 int 21h 5955 000095A7 8E1E[A40A] mov ds, word [pspdbe] 5956 000095AB 89160A00 mov word [TPIV], dx 5957 000095AF 8C160C00 mov word [TPIV+2], ss ; => lDEBUG_DATA_ENTRY 5958 000095B3 16 push ss 5959 000095B4 1F pop ds 5960 5961 ; Set up initial addresses for 'a', 'd', and 'u' commands. 5962 adusetup: 5963 000095B5 A1[9C0C] mov ax, word [reg_eip] 5964 000095B8 8B0E[9E0C] mov cx, word [reg_eip+2] 5965 000095BC 8B1E[900C] mov bx, word [reg_cs] 5966 000095C0 BA0900 mov dx, var_addr_entries.amount 5967 000095C3 BF[000B] mov di, var_addr_entries 5968 5969 .loop: 5970 000095C6 AB stosw ; IP 5971 %if saSegSel == 4 5972 000095C7 890D mov word [di], cx 5973 000095C9 AF scasw ; skip this word 5974 %endif 5975 000095CA 93 xchg ax, bx 5976 000095CB AB stosw ; CS 5977 %if _PM 5978 %if SEGADR_size != 10 5979 %error Unexpected SEGADR size 5980 %endif 5981 000095CC E82EFC call ispm 5982 000095CF 7504 jnz .86m 5983 .pm: 5984 000095D1 AF scasw ; skip saSegment 5985 000095D2 AB stosw ; store saSelector 5986 000095D3 EB02 jmp @F 5987 .86m: 5988 000095D5 AB stosw ; store saSegment 5989 000095D6 AF scasw ; skip saSelector 5990 @@: 5991 %else 5992 %if SEGADR_size == 10 5993 %error Unexpected SEGADR size 5994 %endif 5995 %endif 5996 000095D7 93 xchg ax, bx ; d_addr 5997 5998 000095D8 4A dec dx 5999 000095D9 75EB jnz .loop 6000 000095DB C3 retn 6001 6002 ; Error messages. Print and quit. 6003 ll16: 6004 000095DC E9E80C jmp ww15 ; print error message 6005 6006 ll_attached_unterminated: 6007 000095DF BA[CE6B] mov dx, msg.ll_unterm 6008 000095E2 E90B28 jmp putsz 6009 6010 ; M command - move from place to place. 6011 ; 6012 ; first check if there is more than 1 argument 6013 ; 0 or 1 arguments are handled by the 'M [cpu]' code 6014 mm: 6015 %if 0 6016 push si 6017 call iseol? 6018 je mc ; no argument, CPU-related M command 6019 mov ah, byte [ si ] 6020 push ax 6021 and ax, ~(2020h) 6022 cmp ax, "NC" 6023 pop ax 6024 je mc 6025 call getdword 6026 call iseol? 6027 je mc ; one argument, CPU-related 6028 cmp al, 32 6029 je .blank ; end of first argument 6030 cmp al, 9 6031 jne .nonblank ; not end of first argument 6032 .blank: 6033 %else 6034 000095E5 56 push si 6035 000095E6 E85123 call iseol? 6036 000095E9 7503E9CF00 je mc ; no argument, CPU-related M command 6037 .nonblank: 6038 000095EE AC lodsb ; is a non-space and non-CR ? 6039 000095EF E84823 call iseol? 6040 000095F2 7503E9C600 je mc ; one argument, CPU-related 6041 000095F7 3C20 cmp al, 32 6042 000095F9 7404 je .blank ; end of first argument 6043 000095FB 3C09 cmp al, 9 6044 000095FD 75EF jne .nonblank ; not end of first argument 6045 .blank: 6046 %endif 6047 000095FF E88E23 call skipwh0 ; skip blanks behind argument 6048 00009602 E83523 call iseol? 6049 00009605 7503E9B300 je mc ; one argument, CPU-related 6050 0000960A 5E pop si 6051 0000960B 4E dec si 6052 0000960C AC lodsb 6053 ; It is a normal M command (Move) 6054 0000960D E82111 call parsecm ; parse arguments (DS:ESI, ES:EDI, ECX) 6055 00009610 51 push cx 6056 %if _PM 6057 00009611 E8E9FB call ispm 6058 00009614 7543 jnz .rm 6059 00009616 8CD8 mov ax, ds 6060 00009618 8CC1 mov cx, es 6061 0000961A 39C8 cmp ax, cx 6062 0000961C 7470 je .pmsimple ; same selector, simple --> 6063 6064 0000961E B80600 mov ax, 0006h 6065 00009621 8CDB mov bx, ds 6066 00009623 CD31 int 31h ; get selector's base 6067 00009625 7303E9E80E jc error 6068 0000962A 51 push cx 6069 0000962B 52 push dx 6070 0000962C B80600 mov ax, 0006h 6071 0000962F 8CC3 mov bx, es 6072 00009631 CD31 int 31h ; get selector's base 6073 00009633 7303E9DA0E jc error ; throw 6074 00009638 36803E[DC88]00 cmp byte [ss:bAddr32], 0 6075 0000963E 7430 je .pm16 6076 [cpu 386] 6077 00009640 6658 pop eax 6078 00009642 51 push cx 6079 00009643 52 push dx 6080 00009644 665A pop edx ; mov edx, cxdx 6081 00009646 6601F0 add eax, esi ; add offset to source selector's base 6082 00009649 0F82C50E jc error 6083 0000964D 6601FA add edx, edi ; add offset to destination selector's base 6084 00009650 0F82BE0E jc error ; if overflow (> 4 GiB) --> 6085 00009654 6639D0 cmp eax, edx ; compare linear source to linear destination 6086 00009657 EB38 jmp short m3 ; and decide whether to move up or down --> 6087 __CPU__ 6088 6089 .rm: 6090 00009659 8CD8 mov ax, ds 6091 0000965B 8CDB mov bx, ds 6092 0000965D 8CC2 mov dx, es 6093 0000965F B10C mov cl, 12 6094 00009661 D3EB shr bx, cl 6095 00009663 D3EA shr dx, cl 6096 00009665 52 push dx 6097 00009666 8CC2 mov dx, es 6098 00009668 B104 mov cl, 4 6099 0000966A D3E0 shl ax, cl 6100 0000966C D3E2 shl dx, cl 6101 0000966E 59 pop cx 6102 0000966F A9 db __TEST_IMM16 ; (skip 2 pop instructions) 6103 6104 .pm16: 6105 00009670 58 pop ax 6106 00009671 5B pop bx 6107 00009672 01F0 add ax, si 6108 00009674 83D300 adc bx, byte 0 ; add offset to source selector's base 6109 00009677 7303E9960E jc error 6110 0000967C 01FA add dx, di 6111 0000967E 83D100 adc cx, byte 0 ; add offset to destination selector's base 6112 00009681 7303E98C0E jc error ; if overflow (> 4 GiB) --> 6113 00009686 39CB cmp bx, cx ; compare linear source to linear destination 6114 00009688 7507 jne m3 6115 0000968A 39D0 cmp ax, dx 6116 0000968C EB03 jmp short m3 ; and decide whether to move up or down --> 6117 6118 .pmsimple: 6119 0000968E 66 _386_o32 ; cmp esi, edi 6120 0000968F 39FE cmp si, di 6121 %else 6122 mov dx, di 6123 mov bx, es 6124 mov cl, 4 6125 shr dx, cl 6126 add dx, bx ; upper 16 bits of destination 6127 mov ax, si 6128 shr ax, cl 6129 mov bx, ds 6130 add ax, bx 6131 cmp ax, dx 6132 jne m3 ; if we know which is larger 6133 mov ax, si 6134 and al, 0Fh 6135 mov bx, di 6136 and bl, 0Fh 6137 cmp al, bl 6138 %endif 6139 00009691 59 m3: pop cx 6140 00009692 9F lahf 6141 00009693 1E push ds 6142 00009694 06 push es 6143 00009695 16 push ss ; ds := cs 6144 00009696 1F pop ds 6145 00009697 E8E50F call dohack ; do the interrupt pointer hack 6146 0000969A 07 pop es 6147 0000969B 1F pop ds 6148 0000969C 9E sahf 6149 0000969D 7315 jae .forward ; if forward copy is OK 6150 0000969F 66 _386_PM_o32 6151 000096A0 01CE add si, cx 6152 000096A2 66 _386_PM_o32 6153 000096A3 01CF add di, cx ; point both behind data 6154 000096A5 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 6155 6156 6157 numdef AMD_ERRATUM_109_WORKAROUND, 1 6158 ; Refer to comment in init.asm init_movp. 6159 6160 %if _AMD_ERRATUM_109_WORKAROUND 6161 000096A6 67 _386_PM_a32 6162 000096A7 E30B jcxz @FF 6163 000096A9 66 _386_PM_o32 6164 000096AA 83F914 cmp cx, strict byte 20 6165 000096AD 7705 ja @FF 6166 @@: 6167 000096AF 67 _386_PM_a32 6168 000096B0 A4 movsb 6169 000096B1 67 _386_PM_a32 6170 000096B2 E2FB loop @B 6171 @@: 6172 %endif 6173 .forward: 6174 000096B4 67 _386_PM_a32 6175 000096B5 F3A4 rep movsb ; do the move 6176 000096B7 67 _386_PM_a32 6177 000096B8 A4 movsb ; one more byte (length of zero means 64 KiB. or 4 GiB..) 6178 .was32: 6179 000096B9 FC cld ; restore flag 6180 000096BA E9D7F5 jmp ee0a ; restore segments and undo the interrupt pointer hack 6181 6182 6183 ; Other M command: set machine type. 6184 mc: 6185 000096BD 5E pop si 6186 000096BE 4E dec si 6187 000096BF AC lodsb 6188 000096C0 E87722 call iseol? 6189 000096C3 7456 je m10 ; if just an 'm' (query machine type) 6190 000096C5 3C3F cmp al, '?' 6191 000096C7 7452 je m10 ; if '?' (also query) 6192 000096C9 3C30 cmp al, '0' 6193 000096CB 720D jb mc1 ; if not a digit 6194 000096CD 3C36 cmp al, '6' 6195 000096CF 7709 ja mc1 ; ditto 6196 000096D1 2C30 sub al, '0' 6197 000096D3 A2[E20A] mov byte [machine], al ; set machine type 6198 000096D6 A2[E40A] mov byte [mach_87], al ; coprocessor type, too 6199 000096D9 C3 retn 6200 6201 000096DA 0C20 mc1: or al, TOLOWER 6202 000096DC 3C63 cmp al, 'c' 6203 000096DE 7415 je mcc ; if coprocessor declaration 6204 000096E0 3C6E cmp al, 'n' 6205 000096E2 756A jne short errorj3 ; if something else 6206 000096E4 AC lodsb 6207 000096E5 0C20 or al, TOLOWER 6208 000096E7 3C63 cmp al, 'c' 6209 000096E9 7563 jne short errorj3 ; if not 'c' after that 6210 000096EB AC lodsb 6211 000096EC E86022 call chkeol 6212 000096EF C606[E30A]00 mov byte [has_87], 0 ; clear coprocessor flag 6213 000096F4 C3 retn ; done 6214 6215 mcc: 6216 000096F5 E89722 call skipwhite ; get next nonblank character 6217 000096F8 8A26[E20A] mov ah, byte [machine] 6218 000096FC 80FC03 cmp ah, 3 6219 000096FF 750D jne mcc2 ; if not a 386 6220 00009701 3C33 cmp al, '3' 6221 00009703 7406 je mcc1 ; if declaring a 387 6222 00009705 3C32 cmp al, '2' 6223 00009707 7505 jne mcc2 ; if not '2' 6224 00009709 B402 mov ah, 2 6225 mcc1: 6226 0000970B E88122 call skipwhite 6227 mcc2: 6228 0000970E E83E22 call chkeol 6229 00009711 C606[E30A]01 mov byte [has_87], 1 ; set coprocessor flag 6230 00009716 8826[E40A] mov byte [mach_87], ah ; set copr. type 6231 0000971A C3 retn 6232 6233 ; Display machine type. 6234 m10: 6235 0000971B BE[BB79] mov si, msg8088 6236 0000971E A0[E20A] mov al, byte [machine] 6237 00009721 3C00 cmp al, 0 6238 00009723 7407 je .88or86 ; if 8088 6239 00009725 BE[C379] mov si, msgx86 6240 00009728 0430 add al, '0' 6241 0000972A 8804 mov byte [si], al 6242 .88or86: 6243 0000972C E86C22 call showstring 6244 0000972F BE[C779] mov si, no_copr 6245 00009732 803E[E30A]00 cmp byte [has_87], 0 6246 00009737 740F je m12 ; if no coprocessor 6247 00009739 BE[DC79] mov si, has_copr 6248 0000973C A0[E40A] mov al, byte [mach_87] 6249 0000973F 3A06[E20A] cmp al, byte [machine] 6250 00009743 7403 je m12 ; if has coprocessor same as processor 6251 00009745 BE[EE79] mov si, has_287 6252 m12: 6253 00009748 E85022 call showstring ; show string 6254 0000974B E92423 jmp putsline_crlf ; call puts and quit 6255 6256 errorj3: 6257 0000974E E9C10D jmp error 6258 6259 6260 ; N command - change the name of the program being debugged. 6261 nn: 6262 00009751 16 push ss 6263 00009752 07 pop es 6264 %if _BOOTLDR 6265 00009753 36F606[9D00]40 testopt [ss:internalflags], nodosloaded 6266 00009759 7406 jz @F 6267 0000975B BA[955F] mov dx, msg.nobootsupp 6268 0000975E E98F26 jmp putsz 6269 @@: 6270 %endif 6271 00009761 BF8000 mov di, DTA ; destination address 6272 6273 ; Copy and canonicalize file name. 6274 nn1: 6275 00009764 81FF[4A00] cmp di, N_BUFFER_END 6276 00009768 7313 jae .toolong 6277 0000976A E83D01 call ifsep ; check for separators CR, blank, tab, comma, ;, = 6278 0000976D 7428 je nn3 ; if end of file name 6279 0000976F 363A06[E90A] cmp al, byte [ss:swch1] 6280 ; The use of ss here appears to be intended to 6281 ; allow loading from ds different from the 6282 ; data entry and PSP segment, However, the 6283 ; subsequent copy of the command tail around 6284 ; nn4 does not participate in this scheme. 6285 ; So if this is used make sure to adjust that. 6286 00009774 7421 je nn3 ; if '/' (and '/' is the switch character) 6287 00009776 E8CAF4 call uppercase 6288 00009779 AA stosb 6289 0000977A AC lodsb 6290 0000977B EBE7 jmp short nn1 ; back for more 6291 6292 .toolong: 6293 nn4.toolong: 6294 0000977D 16 push ss 6295 0000977E 1F pop ds 6296 0000977F BA[3365] mov dx, msg.n_toolongname 6297 00009782 E86B26 call putsz 6298 00009785 BF[4700] mov di, N_BUFFER_END - 3 6299 00009788 B000 mov al, 0 ; truncate the name 6300 0000978A AA stosb 6301 0000978B A2[DD0B] mov byte [fileext], al ; invalid / none 6302 0000978E 893E[4E0C] mov word [execblk+2], di 6303 00009792 B8000D mov ax, 13 << 8 ; 0 in low byte (tail length), CR in high byte 6304 00009795 AB stosw 6305 00009796 C3 retn 6306 6307 6308 nn3: 6309 00009797 16 push ss 6310 00009798 1F pop ds 6311 00009799 B000 mov al, 0 ; null terminate the file name string 6312 0000979B AA stosb 6313 0000979C 893E[4E0C] mov word [execblk+2], di; save start of command tail 6314 6315 %if _DEBUG4 6316 push dx 6317 mov dx, DTA 6318 call d4disp_msg 6319 mov dx, crlf 6320 call d4disp_msg 6321 pop dx 6322 %endif 6323 ; Determine file extension 6324 000097A0 81FF8100 cmp di, DTA+1 6325 000097A4 7438 je nn3d ; if no file name at all 6326 000097A6 81FF8500 cmp di, DTA+5 6327 000097AA 7230 jb nn3c ; if no extension (name too short) 6328 000097AC B008 mov al, EXT_HEX 6329 000097AE 817DFB2E48 cmp word [di-5], ".H" 6330 000097B3 7507 jne nn3a ; if not .HEX 6331 000097B5 817DFD4558 cmp word [di-3], "EX" 6332 000097BA 7422 je nn3d ; if .HEX 6333 nn3a: 6334 000097BC B004 mov al, EXT_EXE 6335 000097BE 817DFB2E45 cmp word [di-5], ".E" 6336 000097C3 7507 jne nn3b ; if not .EXE 6337 000097C5 817DFD5845 cmp word [di-3], "XE" 6338 000097CA 7412 je nn3d ; if .EXE 6339 nn3b: 6340 000097CC B002 mov al, EXT_COM 6341 000097CE 817DFB2E43 cmp word [di-5], ".C" 6342 000097D3 7507 jne nn3c ; if not .COM 6343 000097D5 817DFD4F4D cmp word [di-3], "OM" 6344 000097DA 7402 je nn3d ; if .COM 6345 nn3c: 6346 000097DC B001 mov al, EXT_OTHER 6347 nn3d: 6348 000097DE A2[DD0B] mov byte [fileext], al 6349 6350 ; Finish the N command 6351 000097E1 57 push di 6352 000097E2 BF[0E08] mov di, line_out 6353 000097E5 4E dec si 6354 nn4: 6355 000097E6 AC lodsb ; copy the remainder to line_out 6356 000097E7 AA stosb 6357 000097E8 E85321 call iseol?.notsemicolon 6358 000097EB 75F9 jne nn4 6359 6360 000097ED E8EE0E call InDos 6361 000097F0 7407 jz .fcb_setup 6362 000097F2 8326[640C]00 and word [reg_eax], 0 6363 000097F7 EB15 jmp .fcb_none 6364 6365 .fcb_setup: 6366 ; Set up FCBs. 6367 000097F9 BE[0E08] mov si, line_out 6368 000097FC BF5C00 mov di, 5Ch 6369 000097FF E85100 call nn6 ; do first FCB 6370 00009802 A2[640C] mov byte [reg_eax], al 6371 00009805 BF6C00 mov di, 6Ch 6372 00009808 E84800 call nn6 ; second FCB 6373 0000980B A2[650C] mov byte [reg_eax+1], al 6374 .fcb_none: 6375 6376 ; Copy command tail. 6377 0000980E BE[0E08] mov si, line_out 6378 00009811 5F pop di 6379 00009812 81FF[4800] cmp di, N_BUFFER_END - 2 6380 00009816 7203E962FF jae .toolong 6381 0000981B 57 push di 6382 0000981C 47 inc di 6383 nn5: 6384 0000981D AC lodsb 6385 0000981E AA stosb 6386 0000981F 81FF[4A00] cmp di, N_BUFFER_END 6387 00009823 731F jae .toolong 6388 00009825 E81621 call iseol?.notsemicolon 6389 00009828 75F3 jne nn5 ; if not end of string 6390 ; test al, al 6391 ; jnz @B 6392 0000982A C645FF0D mov byte [di - 1], 13 ; (just overwrite this unconditionally) 6393 ; @@: ; jump destination from above if al == 13 6394 @@: ; jump destination from .toolong 6395 0000982E 57 push di 6396 0000982F 89F9 mov cx, di 6397 00009831 81E9[4A00] sub cx, N_BUFFER_END 6398 00009835 F7D9 neg cx 6399 00009837 31C0 xor ax, ax 6400 00009839 F3AA rep stosb 6401 0000983B 5F pop di 6402 0000983C 58 pop ax ; recover old DI 6403 0000983D 97 xchg ax, di 6404 0000983E 29F8 sub ax, di ; compute length of tail 6405 00009840 48 dec ax 6406 00009841 48 dec ax 6407 00009842 AA stosb 6408 %if _DEBUG4 6409 mov dx, DTA 6410 call d4disp_msg 6411 mov dx, crlf 6412 call d4disp_msg 6413 %endif 6414 00009843 C3 retn ; done 6415 6416 .toolong: 6417 00009844 BA[1865] mov dx, msg.n_toolongtail 6418 00009847 E8A625 call putsz 6419 0000984A BF[4A00] mov di, N_BUFFER_END 6420 0000984D C645FF0D mov byte [di - 1], 13 6421 00009851 EBDB jmp @B 6422 6423 6424 ; Subroutine to process an FCB. 6425 ; 6426 ; INP: di -> FCB 6427 ; si -> input 6428 nn6: 6429 00009853 AC lodsb 6430 00009854 E8E720 call iseol?.notsemicolon 6431 00009857 740B je nn7 ; if end 6432 00009859 E84E00 call ifsep 6433 0000985C 74F5 je nn6 ; if separator (other than CR) 6434 0000985E 3A06[E80A] cmp al, byte [switchar] 6435 00009862 741C je nn10 ; if switch character 6436 nn7: 6437 00009864 4E dec si 6438 00009865 B80129 mov ax, 2901h ; parse filename 6439 doscall 2080 00009868 E830C5 <1> call _doscall 6440 0000986B 50 push ax ; save AL 6441 nn8: 6442 0000986C AC lodsb ; skip till separator 6443 0000986D E83A00 call ifsep 6444 00009870 7406 je nn9 ; if separator character (including CR) 6445 00009872 3A06[E90A] cmp al, byte [swch1] 6446 00009876 75F4 jne nn8 ; if not switchar (sort of) 6447 nn9: 6448 00009878 4E dec si 6449 00009879 58 pop ax ; recover AL 6450 0000987A 3C01 cmp al, 1 6451 0000987C 7501 jne nn9a ; if not 1 6452 0000987E 48 dec ax 6453 nn9a: 6454 0000987F C3 retn 6455 6456 ; Handle a switch (differently). 6457 00009880 AC nn10: lodsb 6458 00009881 E8BA20 call iseol?.notsemicolon 6459 00009884 74DE je nn7 ; if end of string 6460 00009886 E82100 call ifsep 6461 00009889 74F5 je nn10 ; if another separator (other than CR) 6462 0000988B B000 mov al, 0 6463 0000988D AA stosb 6464 0000988E 4E dec si 6465 0000988F AC lodsb 6466 00009890 3C61 cmp al, 'a' 6467 00009892 7206 jb nn11 ; if not a lower case letter 6468 00009894 3C7A cmp al, 'z' 6469 00009896 7702 ja nn11 6470 00009898 24DF and al, TOUPPER ; convert to upper case 6471 0000989A AA nn11: stosb 6472 0000989B B82020 mov ax, 32<<8|32 6473 0000989E AB stosw 6474 0000989F AB stosw 6475 000098A0 AB stosw 6476 000098A1 AB stosw 6477 000098A2 AB stosw 6478 000098A3 31C0 xor ax, ax 6479 000098A5 AB stosw 6480 000098A6 AB stosw 6481 000098A7 AB stosw 6482 000098A8 AB stosw 6483 000098A9 C3 retn ; return with al = 0 6484 6485 6486 ; Compare character with separators 6487 ; 6488 ; INP: al = character 6489 ; OUT: ZR if al is CR, NUL, blank, tab, comma, semicolon, or equal sign 6490 ; NZ else 6491 ; REM: This is only used for parsing FCBs. 6492 ifsep: 6493 000098AA E88D20 call iseol? ; semicolon or CR or NUL 6494 000098AD 740E je .return 6495 000098AF 3C20 cmp al, 32 6496 000098B1 740A je .return 6497 000098B3 3C09 cmp al, 9 6498 000098B5 7406 je .return 6499 000098B7 3C2C cmp al, ',' 6500 000098B9 7402 je .return 6501 000098BB 3C3D cmp al, '=' 6502 .return: 6503 000098BD C3 retn 6504 6505 6506 ; Ensure segment in bx is writeable 6507 ; 6508 ; INP: bx = selector/segment 6509 ; OUT: NC if in 86M, bx unchanged 6510 ; NC if in PM and bx not a code segment, bx unchanged 6511 ; NC if in PM and was a code segment, 6512 ; bx = word [scratchsel], set up to mirror INP:bx selector 6513 ; CY if in PM and a failure occurred, segment not writeable 6514 ; CHG: bx 6515 ; STT: (if in PM) es = ss = debugger data selector 6516 %if _PM 6517 verifysegm: 6518 000098BE E83CF9 call ispm 6519 000098C1 7533 jnz .rm ; (NC) 6520 000098C3 50 push ax 6521 000098C4 66 _386_o32 ; push edi 6522 000098C5 57 push di 6523 000098C6 55 push bp 6524 000098C7 89E5 mov bp, sp 6525 000098C9 83EC08 sub sp, 8 6526 000098CC 89E7 mov di, sp 6527 000098CE 660FB7FF _386 movzx edi, di 6528 000098D2 B80B00 mov ax, 000Bh ; get descriptor 6529 000098D5 CD31 int 31h 6530 000098D7 7217 jc @F 6531 000098D9 F6450508 test byte [di+5], 8 ; code segment ? 6532 000098DD 7411 jz @F ; (NC) no --> 6533 000098DF 806505F3 and byte [di+5], 0F3h ; reset CODE+conforming attr 6534 000098E3 804D0502 or byte [di+5], 2 ; set writable 6535 000098E7 8B1E[D888] mov bx, word [scratchsel] 6536 000098EB B80C00 mov ax, 000Ch 6537 000098EE CD31 int 31h 6538 @@: 6539 000098F0 89EC mov sp, bp 6540 000098F2 5D pop bp 6541 000098F3 66 _386_o32 ; pop edi 6542 000098F4 5F pop di 6543 000098F5 58 pop ax 6544 .rm: 6545 000098F6 C3 retn 6546 6547 subcpu 286 6548 ; INP: dx = 86 Mode segment to access 6549 ; OUT: bx = scratch selector, addressing that segment 6550 ; CHG: - 6551 ; STT: ss = lDEBUG_DATA_ENTRY selector, in PM 6552 setrmsegm: 6553 000098F7 368B1E[D888] mov bx, word [ss:scratchsel] 6554 setrmaddr: ;<--- set selector in BX to segment address in DX 6555 .: 6556 000098FC 52 push dx 6557 000098FD 50 push ax 6558 000098FE 51 push cx 6559 000098FF 89D1 mov cx, dx 6560 00009901 C1E204 shl dx, 4 6561 00009904 C1E90C shr cx, 12 6562 00009907 B80700 mov ax, 7 6563 0000990A CD31 int 31h 6564 0000990C 59 pop cx 6565 0000990D 58 pop ax 6566 0000990E 5A pop dx 6567 0000990F C3 retn 6568 6569 subcpureset 6570 %endif 6571 6572 ; Read a byte relative to cs:eip 6573 ; 6574 ; INP: reg_cs, reg_eip 6575 ; cx = (signed) eip adjustment 6576 ; OUT: al = byte at that address 6577 ; (e)bx = new offset (eip+adjustment) 6578 ; CHG: - 6579 getcseipbyte: 6580 00009910 06 push es 6581 %if _PM 6582 00009911 8B1E[900C] mov bx, word [reg_cs] 6583 00009915 8EC3 mov es, bx 6584 00009917 E84EC4 call test_d_b_bit 6585 0000991A 7416 jz .16 6586 [cpu 386] 6587 0000991C 668B1E[9C0C] mov ebx, dword [reg_eip] 6588 00009921 6652 push edx 6589 00009923 660FBFD1 movsx edx, cx 6590 00009927 6601D3 add ebx, edx 6591 0000992A 26678A03 mov al, byte [es:ebx] 6592 0000992E 665A pop edx 6593 00009930 07 pop es 6594 00009931 C3 retn 6595 __CPU__ 6596 .16: 6597 %else 6598 mov es, word [reg_cs] 6599 %endif 6600 00009932 8B1E[9C0C] mov bx, word [reg_eip] 6601 00009936 01CB add bx, cx 6602 00009938 268A07 mov al, byte [es:bx] 6603 0000993B 07 pop es 6604 0000993C C3 retn 6605 6606 ; Write to a byte relative to cs:eip 6607 ; 6608 ; INP: reg_cs, reg_eip 6609 ; cx = (signed) eip adjustment 6610 ; OUT: al = byte at that address 6611 ; CHG: (e)bx 6612 setcseipbyte: 6613 0000993D 06 push es 6614 %if _PM 6615 0000993E 8B1E[900C] mov bx, word [reg_cs] 6616 00009942 E879FF call verifysegm 6617 00009945 7224 jc .ret 6618 00009947 8EC3 mov es, bx 6619 00009949 E81CC4 call test_d_b_bit 6620 0000994C 7414 jz .16 6621 [cpu 386] 6622 0000994E 668B1E[9C0C] mov ebx, dword [reg_eip] 6623 00009953 6652 push edx 6624 00009955 660FBFD1 movsx edx, cx 6625 00009959 2667880413 mov byte [es:ebx+edx],al 6626 0000995E 665A pop edx 6627 00009960 07 pop es 6628 00009961 C3 retn 6629 __CPU__ 6630 .16: 6631 %else 6632 mov es, word [reg_cs] 6633 %endif 6634 00009962 8B1E[9C0C] mov bx, word [reg_eip] 6635 00009966 01CB add bx, cx 6636 00009968 268807 mov byte [es:bx], al 6637 .ret: 6638 0000996B 07 pop es 6639 0000996C C3 retn 6640 6641 ; Exchange byte with memory 6642 ; 6643 ; INP: bx:(e)dx-> destination byte 6644 ; al = source byte 6645 ; OUT: CY if failed due to segment not writable 6646 ; NC if successful, 6647 ; al = previous value of destination byte 6648 ; CHG: ah 6649 writemem: 6650 %if _DEBUG1 6651 push dx 6652 push ax 6653 6654 call getlinear.do_not_use_test 6655 jc @F ; already an error ? then return --> (CY) 6656 push bx 6657 push cx 6658 mov bx, test_records_Writemem 6659 call handle_test_case_multiple_16 6660 ; check whether this should testcase the error 6661 ; CY to indicate error from this call 6662 pop cx 6663 pop bx 6664 @@: 6665 pop ax 6666 pop dx 6667 jnc .do_not_use_test 6668 retn ; return CY here 6669 6670 %endif 6671 .do_not_use_test: 6672 6673 0000996D 88C4 mov ah, al 6674 %if _PM 6675 0000996F E88BF8 call ispm 6676 00009972 7516 jnz .16 ; (NC from ispm) --> 6677 00009974 E847FF call verifysegm ; make bx a writeable segment 6678 00009977 7220 jc .ret 6679 00009979 E8ECC3 call test_d_b_bit 6680 0000997C 740C jz .16 ; (NC from test_d_b_bit) --> 6681 [cpu 386] 6682 0000997E 1E push ds 6683 0000997F 8EDB mov ds, bx 6684 00009981 678602 xchg al, byte [edx] 6685 00009984 673A22 cmp ah, byte [edx] 6686 00009987 1F pop ds 6687 __CPU__ 6688 00009988 EB0C jmp short .cmp 6689 .16: 6690 %endif 6691 0000998A 1E push ds 6692 0000998B 8EDB mov ds, bx 6693 0000998D 53 push bx 6694 0000998E 89D3 mov bx, dx 6695 00009990 8607 xchg al, byte [bx] 6696 00009992 3A27 cmp ah, byte [bx] 6697 00009994 5B pop bx 6698 00009995 1F pop ds 6699 .cmp: 6700 00009996 7401 je .ret ; (NC) 6701 00009998 F9 stc ; Failed to compare (i.e. memory wasn't our byte after writing). 6702 ; This check catches ROM that will silently fail to write. 6703 .ret: 6704 00009999 C3 retn 6705 6706 6707 ;--- read byte at BX:EDX into AL 6708 6709 readmem: 6710 %if _DEBUG1 6711 push dx 6712 push ax 6713 6714 call getlinear.do_not_use_test 6715 jc @F ; already an error ? then return --> (CY) 6716 push bx 6717 push cx 6718 mov bx, test_records_Readmem 6719 call handle_test_case_multiple_16 6720 ; check whether this should testcase the error 6721 ; CY to indicate error from this call 6722 pop cx 6723 pop bx 6724 @@: 6725 pop ax 6726 pop dx 6727 jnc .do_not_use_test 6728 mov al, byte [test_readmem_value] 6729 ; return a most likely wrong value 6730 retn 6731 6732 %endif 6733 .do_not_use_test: 6734 6735 %if _PM 6736 0000999A E8CBC3 call test_d_b_bit 6737 0000999D 7408 jz .16 6738 [cpu 386] 6739 0000999F 1E push ds 6740 000099A0 8EDB mov ds, bx 6741 000099A2 678A02 mov al, byte [edx] 6742 000099A5 1F pop ds 6743 000099A6 C3 retn 6744 __CPU__ 6745 .16: 6746 %endif 6747 000099A7 1E push ds 6748 000099A8 53 push bx 6749 000099A9 8EDB mov ds, bx 6750 000099AB 89D3 mov bx, dx 6751 000099AD 8A07 mov al, byte [bx] 6752 000099AF 5B pop bx 6753 000099B0 1F pop ds 6754 000099B1 C3 retn 6755 6756 6757 ; Q command - quit. 6758 qq: 6759 000099B2 E87A6B call guard_re 6760 %if _BOOTLDR 6761 ; Test whether we are in non-DOS mode, and were 6762 ; currently entered in protected mode. Since 6763 ; this will make the entire operation fail, 6764 ; it has to be checked for before modifying 6765 ; or releasing any of the resources. 6766 ; (Does this ever occur? No?) 6767 000099B5 F606[9D00]40 testopt [internalflags], nodosloaded 6768 000099BA 7418 jz .notpmnodos 6769 %if _PM 6770 000099BC E83EF8 call ispm 6771 %if _TSR ; same message, reuse code 6772 000099BF 741F jz .cannotpmquit 6773 %else 6774 jnz .notpmnodos_nodos 6775 mov dx, msg.cannotpmquit 6776 jmp putsz 6777 %endif 6778 %endif 6779 .notpmnodos_nodos: 6780 000099C1 E83B3A call bootgetmemorysize ; dx => behind usable memory 6781 000099C4 A1[0290] mov ax, word [ boot_new_memsizekib ] 6782 000099C7 B106 mov cl, 6 6783 000099C9 D3E0 shl ax, cl 6784 000099CB 39D0 cmp ax, dx ; same? 6785 000099CD 7405 je @F 6786 000099CF BA[8D64] mov dx, msg.cannotbootquit_memsizes 6787 000099D2 EB0F jmp .putsz 6788 %if !_TSR || !_PM 6789 .putsz equ putsz 6790 %endif 6791 6792 @@: 6793 .notpmnodos: 6794 %endif 6795 %if _PM 6796 %if _TSR 6797 ; Test whether we are in TSR mode, and were 6798 ; currently entered in protected mode. Since 6799 ; this will make the entire operation fail, 6800 ; it has to be checked for before modifying 6801 ; or releasing any of the resources. 6802 000099D4 F606[9E00]40 testopt [internalflags], tsrmode 6803 000099D9 740B jz .notpmtsr 6804 000099DB E81FF8 call ispm 6805 000099DE 7506 jnz .notpmtsr 6806 6807 ; This isn't yet implemented. Broken down: 6808 ; * Uses terminate_attached_process which returns in real mode. 6809 ; * Exception vectors are implicitly restored/discarded by that. 6810 ; * (RM) Interrupt vectors are currently restored in real mode. Unnecessary. 6811 ; * The VDD is un-registered in real mode. Necessary? 6812 ; * Normal 21.4C is used to return to the real parent. 6813 ; * We have to discard our DOS process resources. Any DPMI TSR resources? 6814 ; * We must again gain control in debuggee's mode after discarding them. 6815 ; * We must return to the debuggee and seemlessly discard our memory. The 6816 ; stack trick possibly/probably does not work in protected mode. 6817 6818 .cannotpmquit: 6819 000099E0 BA[6D5F] mov dx, msg.cannotpmquit 6820 .putsz: 6821 000099E3 E90A24 jmp putsz 6822 6823 .notpmtsr: 6824 %endif 6825 6826 %if (nohook2F)&~0FF00h 6827 %fatal Internal flags re-ordered, adjust code here 6828 %endif 6829 000099E6 A1[9C00] mov ax, [internalflags] 6830 000099E9 B0A8 mov al, __TEST_IMM8 6831 000099EB 8606[5689] xchg al, [dpmidisable] ; disable DPMI hook 6832 ; (SMC in section lDEBUG_DATA_ENTRY) 6833 000099EF 50 push ax 6834 000099F0 800E[9D00]02 setopt [internalflags], nohook2F ; avoid a new hook while terminating 6835 %endif 6836 6837 6838 qq_restore_interrupts_simulated: 6839 000099F5 31ED xor bp, bp 6840 %if _CATCHINT2D 6841 .2D: 6842 000099F7 F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 6843 000099FC 741C jz .noint2D 6844 6845 000099FE B02D mov al, 2Dh ; interrupt number 6846 00009A00 BE[4C81] mov si, int2D ; -> IISP entry header 6847 00009A03 BA0800 mov dx, opt4_int_2D_force >> 16 6848 00009A06 E8E838 call UnhookInterruptForceSim 6849 ; try unhooking it 6850 00009A09 16 push ss 6851 00009A0A 07 pop es 6852 00009A0B 730D jnc .got2D 6853 6854 .not2D: 6855 00009A0D C706[186B]3244 mov word [msg.serial_cannot_unhook.int], "2D" 6856 00009A13 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6857 00009A16 E8D723 call putsz 6858 00009A19 45 inc bp 6859 6860 .got2D: 6861 .noint2D: 6862 %endif 6863 6864 6865 %if _CATCHINT08 6866 .08: 6867 00009A1A F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 6868 00009A1F 741C jz .noint08 6869 6870 00009A21 B008 mov al, 08h ; interrupt number 6871 00009A23 BE[5685] mov si, intr8 ; -> IISP entry header 6872 00009A26 BA0400 mov dx, opt4_int_08_force >> 16 6873 00009A29 E8C538 call UnhookInterruptForceSim 6874 ; try unhooking it 6875 00009A2C 16 push ss 6876 00009A2D 07 pop es 6877 00009A2E 730D jnc .got08 6878 6879 .not08: 6880 00009A30 C706[186B]3038 mov word [msg.serial_cannot_unhook.int], "08" 6881 00009A36 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6882 00009A39 E8B423 call putsz 6883 00009A3C 45 inc bp 6884 6885 .got08: 6886 .noint08: 6887 %endif 6888 6889 6890 .serial: 6891 00009A3D F606[A800]01 testopt [internalflags4], dif4_int_serial_hooked 6892 00009A42 7420 jz .done_serial 6893 00009A44 BE[F895] mov si, serial_interrupt_handler 6894 00009A47 A0[120C] mov al, byte [serial_installed_intnum] 6895 00009A4A BA0100 mov dx, opt4_int_serial_force >> 16 6896 00009A4D E8A138 call UnhookInterruptForceSim 6897 00009A50 16 push ss 6898 00009A51 07 pop es 6899 00009A52 7310 jnc .done_serial ; if it succeeded --> 6900 6901 00009A54 BF[186B] mov di, msg.serial_cannot_unhook.int 6902 00009A57 A0[120C] mov al, byte [serial_installed_intnum] 6903 00009A5A E8E41F call hexbyte 6904 00009A5D BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6905 00009A60 E88D23 call putsz 6906 00009A63 45 inc bp 6907 6908 .done_serial: 6909 6910 %if _PM 6911 .2F: 6912 00009A64 F606[9D00]01 testopt [internalflags], hooked2F 6913 00009A69 741C jz .noint2F 6914 6915 00009A6B B02F mov al, 2Fh ; interrupt number 6916 00009A6D BE[4089] mov si, debug2F ; -> IISP entry header 6917 00009A70 BA0200 mov dx, opt4_int_2F_force >> 16 6918 00009A73 E87B38 call UnhookInterruptForceSim 6919 ; try unhooking it 6920 00009A76 16 push ss 6921 00009A77 07 pop es 6922 00009A78 730D jnc .got2F 6923 6924 .not2F: 6925 00009A7A C706[186B]3246 mov word [msg.serial_cannot_unhook.int], "2F" 6926 00009A80 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6927 00009A83 E86A23 call putsz 6928 00009A86 45 inc bp 6929 6930 .got2F: 6931 .noint2F: 6932 %endif 6933 6934 6935 %if CATCHINTAMOUNT && ! _DEBUG 6936 ; Simulate to restore interrupt vectors. 6937 00009A87 BE[310C] mov si, inttab 6938 00009A8A BF[460C] mov di, intforcetab 6939 00009A8D B90600 mov cx, inttab_number 6940 00009A90 31D2 xor dx, dx 6941 .nextintsim: 6942 00009A92 AC lodsb 6943 00009A93 93 xchg ax, bx ; bl = number 6944 00009A94 AD lodsw ; si -> list 6945 00009A95 96 xchg ax, si ; si -> entry, ax -> list 6946 00009A96 93 xchg ax, bx ; al = number, bx -> list 6947 00009A97 57 push di 6948 00009A98 8A35 mov dh, byte [di] 6949 00009A9A E85438 call UnhookInterruptForceSim 6950 00009A9D 5F pop di 6951 00009A9E 16 push ss 6952 00009A9F 07 pop es 6953 00009AA0 730D jnc @F 6954 00009AA2 BF[186B] mov di, msg.serial_cannot_unhook.int 6955 00009AA5 E8991F call hexbyte 6956 00009AA8 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6957 00009AAB E84223 call putsz 6958 00009AAE 45 inc bp 6959 @@: 6960 00009AAF 47 inc di 6961 00009AB0 87DE xchg bx, si ; si -> list 6962 00009AB2 E2DE loop .nextintsim 6963 %endif 6964 6965 00009AB4 BA[6370] mov dx, msg.empty_message 6966 00009AB7 85ED test bp, bp 6967 00009AB9 7403E99601 jnz qq_attached_unterminated.common 6968 6969 6970 qq_restore_interrupts: 6971 %if _CATCHINT2D 6972 .2D: 6973 00009ABE F606[A800]08 testopt [internalflags4], dif4_int_2D_hooked 6974 00009AC3 741E jz .noint2D 6975 6976 00009AC5 B02D mov al, 2Dh ; interrupt number 6977 00009AC7 BE[4C81] mov si, int2D ; -> IISP entry header 6978 00009ACA BA0800 mov dx, opt4_int_2D_force >> 16 6979 00009ACD E8F237 call UnhookInterruptForce 6980 ; try unhooking it 6981 00009AD0 730C jnc .got2D 6982 6983 .not2D: 6984 00009AD2 C706[186B]3244 mov word [msg.serial_cannot_unhook.int], "2D" 6985 00009AD8 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 6986 00009ADB E97601 jmp qq_attached_unterminated.common 6987 6988 .got2D: 6989 00009ADE 8026[A800]F7 clropt [internalflags4], dif4_int_2D_hooked 6990 .noint2D: 6991 %endif 6992 6993 6994 %if _CATCHINT08 6995 .08: 6996 00009AE3 F606[A800]04 testopt [internalflags4], dif4_int_08_hooked 6997 00009AE8 7421 jz .noint08 6998 6999 00009AEA B008 mov al, 08h ; interrupt number 7000 00009AEC BE[5685] mov si, intr8 ; -> IISP entry header 7001 00009AEF BA0400 mov dx, opt4_int_08_force >> 16 7002 00009AF2 E8CD37 call UnhookInterruptForce 7003 ; try unhooking it 7004 00009AF5 730C jnc .got08 7005 7006 .not08: 7007 00009AF7 C706[186B]3038 mov word [msg.serial_cannot_unhook.int], "08" 7008 00009AFD BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 7009 00009B00 E95101 jmp qq_attached_unterminated.common 7010 7011 .got08: 7012 00009B03 8026[A800]FB clropt [internalflags4], dif4_int_08_hooked 7013 00009B08 E8C438 call update_inttab_optional 7014 .noint08: 7015 %endif 7016 7017 7018 .serial: 7019 00009B0B F606[EB0B]01 testopt [serial_flags], sf_init_done 7020 00009B10 740D jz @F 7021 00009B12 E8FE34 call serial_clean_up ; unhook interrupt 7022 00009B15 8026[EB0B]FE clropt [serial_flags], sf_init_done ; clear (in case return to cmd3) 7023 00009B1A 8026[7D00]BF clropt [options], enable_serial ; do not output to serial any longer 7024 @@: 7025 00009B1F F606[A800]01 testopt [internalflags4], dif4_int_serial_hooked 7026 00009B24 7419 jz .done_serial 7027 00009B26 E83535 call serial_uninstall_interrupt_handler 7028 00009B29 7314 jnc .done_serial ; if it succeeded --> 7029 7030 00009B2B BF[186B] mov di, msg.serial_cannot_unhook.int 7031 00009B2E A0[120C] mov al, byte [serial_installed_intnum] 7032 00009B31 E80D1F call hexbyte 7033 00009B34 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 7034 00009B37 C606[0096]00 mov byte [serial_interrupt_handler + ieEOI], 0 7035 ; we do not issue EOI any longer 7036 00009B3C E91501 jmp qq_attached_unterminated.common 7037 7038 7039 .done_serial: 7040 7041 %if _PM 7042 .2F: 7043 00009B3F F606[9D00]01 testopt [internalflags], hooked2F 7044 00009B44 7426 jz .noint2F 7045 7046 00009B46 B02F mov al, 2Fh ; interrupt number 7047 00009B48 BE[4089] mov si, debug2F ; -> IISP entry header 7048 00009B4B BA0200 mov dx, opt4_int_2F_force >> 16 7049 00009B4E E87137 call UnhookInterruptForce 7050 ; try unhooking it 7051 00009B51 730C jnc .got2F 7052 7053 .not2F: 7054 00009B53 C706[186B]3246 mov word [msg.serial_cannot_unhook.int], "2F" 7055 00009B59 BA[FD6A] mov dx, msg.serial_cannot_unhook.nowarn 7056 00009B5C E9F500 jmp qq_attached_unterminated.common 7057 7058 .got2F: 7059 00009B5F 8026[9D00]FE clropt [internalflags], hooked2F 7060 00009B64 8026[A800]FD clropt [internalflags4], dif4_int_2F_hooked 7061 00009B69 E86338 call update_inttab_optional 7062 .noint2F: 7063 %endif 7064 7065 7066 %if _BOOTLDR 7067 00009B6C F606[9D00]40 testopt [internalflags], nodosloaded 7068 00009B71 753D jnz .restoreints 7069 %endif 7070 7071 ; Cancel child's process if any. 7072 ; This will drop to real mode if debuggee is in protected mode. 7073 %if _TSR 7074 00009B73 F606[9E00]40 testopt [internalflags], tsrmode 7075 00009B78 7423 jz .terminate_attached 7076 7077 %if _PM 7078 00009B7A E880F6 call ispm 7079 00009B7D 7414 jz @F ; in PM --> 7080 00009B7F F606[9E00]04 testopt [internalflags], canswitchmode 7081 00009B84 7415 jz @FF ; in 86 Mode and cannot switch to PM --> 7082 7083 00009B86 800E[9E00]08 setopt [internalflags], modeswitched ; set flag for resetmode 7084 00009B8B B000 mov al, 0 7085 00009B8D E8F69C call sr_state ; save state 7086 00009B90 E8BE9C call switchmode ; switch to PM 7087 ; ! handle_mode_changed not called here ! 7088 ; do not call InDos or other functions using seg/sels 7089 @@: 7090 00009B93 E8A9A9 call pm_reset_handlers 7091 ; ! this calls resetmode 7092 7093 ; remember that we cannot access Protected Mode any longer 7094 00009B96 8026[9E00]DB clropt [internalflags], canswitchmode | switchbuffer 7095 @@: 7096 %endif 7097 7098 00009B9B EB13 jmp .restoreints 7099 7100 .terminate_attached: 7101 %endif 7102 7103 00009B9D E8C409 call terminate_attached_process 7104 00009BA0 7503E9AC00 jz qq_attached_unterminated 7105 %if _PM 7106 00009BA5 E855F6 call ispm 7107 00009BA8 7506 jnz @F 7108 7109 00009BAA BA[3E6C] mov dx, msg.qq_still_pm 7110 00009BAD E9A400 jmp qq_attached_unterminated.common 7111 @@: 7112 %endif 7113 7114 .restoreints: 7115 %if CATCHINTAMOUNT && ! _DEBUG 7116 ; Restore interrupt vectors. 7117 00009BB0 BE[310C] mov si, inttab 7118 00009BB3 BF[460C] mov di, intforcetab 7119 00009BB6 B90600 mov cx, inttab_number 7120 00009BB9 31D2 xor dx, dx 7121 .nextint: 7122 00009BBB AC lodsb 7123 00009BBC 93 xchg ax, bx ; bl = number 7124 00009BBD AD lodsw ; si -> list 7125 00009BBE 96 xchg ax, si ; si -> entry, ax -> list 7126 00009BBF 93 xchg ax, bx ; al = number, bx -> list 7127 00009BC0 57 push di 7128 00009BC1 8A35 mov dh, byte [di] 7129 00009BC3 E8FC36 call UnhookInterruptForce 7130 00009BC6 5F pop di 7131 00009BC7 47 inc di 7132 00009BC8 87DE xchg bx, si ; si -> list 7133 00009BCA E2EF loop .nextint 7134 %endif 7135 7136 7137 %if _PM 7138 00009BCC 58 pop ax ; (discard) 7139 %endif 7140 7141 7142 qqlate: 7143 ; Release the registered VDD. 7144 %if _VDD 7145 00009BCD F606[9C00]04 testopt [internalflags], ntpacket 7146 00009BD2 7408 jz .novdd 7147 00009BD4 A1[B80A] mov ax, word [hVdd] 7148 00009BD7 C4C4580190 UnRegisterModule 7149 .novdd: 7150 %endif 7151 7152 ; Restore termination address. 7153 %if _BOOTLDR 7154 00009BDC F606[9D00]40 testopt [internalflags], nodosloaded 7155 00009BE1 7403E99200 jnz .bootterminate ; terminate --> 7156 %endif 7157 %if _TSR 7158 00009BE6 F606[9E00]40 testopt [internalflags], tsrmode 7159 00009BEB 744C jz .nontsrterminate 7160 00009BED 31F6 xor si, si 7161 00009BEF E82169 call guard_auxbuff 7162 00009BF2 8E06[F209] mov es, word [auxbuff_segorsel] 7163 00009BF6 31FF xor di, di 7164 00009BF8 31C0 xor ax, ax 7165 00009BFA B90800 mov cx, 8 7166 00009BFD F3AB rep stosw ; 10h MCB bytes 7167 00009BFF B94000 mov cx, 40h 7168 00009C02 F3A5 rep movsw ; 80h PSP bytes 7169 00009C04 8CC0 mov ax, es 7170 00009C06 40 inc ax 7171 00009C07 26A30100 mov word [es:1], ax ; fake MCB 7172 00009C0B 1E push ds 7173 00009C0C 8ED8 mov ds, ax 7174 00009C0E C70634001800 mov word [34h], 18h 7175 00009C14 A33600 mov word [36h], ax ; insure default PHT and fix segment 7176 00009C17 C70632000100 mov word [32h], 1 ; only one PHT entry (zero might crash) 7177 00009C1D C6061800FF mov byte [18h], -1 ; PHT entry is closed 7178 00009C22 C7062C000000 mov word [2Ch], 0 ; PSP clear 7179 00009C28 E83F00 call .setparent ; make it self-owned, just in case 7180 00009C2B 8CD3 mov bx, ss 7181 00009C2D 4B dec bx 7182 00009C2E 8EDB mov ds, bx ; => our (real) MCB 7183 00009C30 A30100 mov word [1], ax ; parent = fake PSP 7184 00009C33 1F pop ds 7185 00009C34 E83300 call .setparent ; make the fake PSP our parent 7186 00009C37 EB13 jmp short terminate_00 ; see ya 7187 7188 .nontsrterminate: 7189 %endif 7190 00009C39 BE[C80A] mov si, psp22 ; restore termination address 7191 00009C3C BF0A00 mov di, TPIV 7192 00009C3F A5 movsw 7193 00009C40 A5 movsw 7194 00009C41 BF1600 mov di, 16h ; restore PSP of parent 7195 00009C44 A5 movsw 7196 ; Really done. 7197 00009C45 B44C mov ah, 4Ch ; quit 7198 00009C47 A0[110C] mov al, byte [termcode] ; return code 7199 00009C4A CD21 int 21h 7200 7201 7202 terminate_00: ; used by terminate_attached_process 7203 00009C4C B8004C mov ax, 4C00h ; quit 7204 00009C4F CD21 int 21h 7205 7206 7207 qq_attached_unterminated: 7208 00009C51 BA[0C6C] mov dx, msg.qq_unterm 7209 7210 .common: 7211 ; Restore state: 7212 %if _PM 7213 %if (nohook2F)&~0FF00h 7214 %fatal Internal flags re-ordered, adjust code here 7215 %endif 7216 00009C54 58 pop ax 7217 00009C55 A2[5689] mov [dpmidisable], al ; (SMC in section lDEBUG_DATA_ENTRY) 7218 00009C58 80E402 and ah, nohook2F>>8 7219 00009C5B 8026[9D00]FD clropt [internalflags], nohook2F 7220 00009C60 0826[9D00] or [internalflags+1], ah 7221 %endif 7222 00009C64 E98921 jmp putsz 7223 7224 7225 usesection lDEBUG_DATA_ENTRY 7226 7227 %if _TSR 7228 qq.proceedtsrtermination: 7229 00009028 FA cli 7230 00009029 FC cld 7231 0000902A 8CC8 mov ax, cs 7232 0000902C 8ED8 mov ds, ax 7233 0000902E 8ED0 mov ss, ax 7234 00009030 BC[400C] mov sp, stack_end 7235 00009033 FB sti 7236 00009034 832E[740C]10 sub word [reg_esp], 2+4+((qq.tsrfreecode_size+1)&~1) 7237 00009039 8B3E[740C] mov di, word [reg_esp] ; -> stack frame 7238 0000903D 8E06[8C0C] mov es, word [reg_ss] 7239 00009041 A1[840C] mov ax, word [reg_ds] 7240 00009044 AB stosw ; debuggee's ds 7241 00009045 A1[9C0C] mov ax, word [reg_eip] 7242 00009048 AB stosw 7243 00009049 A1[900C] mov ax, word [reg_cs] 7244 0000904C AB stosw ; debuggee's cs:ip 7245 0000904D 06 push es 7246 0000904E 57 push di 7247 0000904F BE[7690] mov si, qq.tsrfreecode 7248 00009052 B90500 mov cx, ((qq.tsrfreecode_size+1)>>1) 7249 00009055 F3A5 rep movsw ; code on stack 7250 00009057 8CC8 mov ax, cs 7251 00009059 48 dec ax 7252 0000905A A3[840C] mov word [reg_ds], ax ; = our MCB 7253 0000905D 8F06[9C0C] pop word [reg_eip] 7254 00009061 8F06[900C] pop word [reg_cs] ; -> code on stack 7255 00009065 F606[8700]80 testopt [options3], opt3_tsr_quit_leave_tf 7256 0000906A 7505 jnz @F 7257 0000906C 8026[A10C]FE clropt [reg_efl], 100h ; clear TF 7258 @@: 7259 7260 00009071 E86BF0 call entry_to_code_seg 7261 00009074 [679C] dw .proceedtsrcode 7262 7263 7264 usesection lDEBUG_CODE 7265 7266 code_insure_low_byte_not_0CCh 7267 .proceedtsrcode: 7268 %if _DEBUG 7269 ; avoid hooking interrupts again: 7270 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 7271 ; (SMC in section lDEBUG_CODE) 7272 %endif 7273 00009C67 E973A6 jmp run ; run this 7274 7275 7276 usesection lDEBUG_DATA_ENTRY 7277 7278 align 2, db 0 7279 ; (Update: Explicitly clears TF now, except if the 7280 ; option opt3_tsr_quit_leave_tf is set. See above.) 7281 ; 7282 ; Note that since we are in control of debuggee's TF and 7283 ; reset it every time the debugger is entered, this code 7284 ; will not be entered with TF set. It might be entered 7285 ; with IF set and an interrupt might occur; the only harm 7286 ; done then is that the interrupt handler has less stack 7287 ; available. All flags must be preserved by this code. 7288 qq.tsrfreecode: 7289 00009076 C70601000000 mov word [1], 0 ; free the MCB 7290 0000907C 1F pop ds ; restore debuggee's ds 7291 0000907D CA0A00 retf ((qq.tsrfreecode_size+1)&~1) ; jump 7292 qq.tsrfreecode_size: equ $-qq.tsrfreecode 7293 7294 7295 usesection lDEBUG_CODE 7296 7297 qqlate.setparent: 7298 00009C6A A31600 mov word [16h], ax 7299 00009C6D C7060A00[2890] mov word [0Ah], qq.proceedtsrtermination 7300 00009C73 8C160C00 mov word [0Ah+2], ss 7301 00009C77 C3 retn 7302 %endif 7303 7304 %if _BOOTLDR 7305 qqlate.bootterminate: 7306 00009C78 812E[740C]BC00 sub word [reg_esp], 2*8+4+((qq.bootfreecode_size+1)&~1) 7307 00009C7E 8B3E[740C] mov di, word [reg_esp] ; -> stack frame 7308 00009C82 8E06[8C0C] mov es, word [reg_ss] 7309 00009C86 A1[840C] mov ax, word [reg_ds] 7310 00009C89 AB stosw 7311 00009C8A A1[880C] mov ax, word [reg_es] 7312 00009C8D AB stosw 7313 00009C8E A1[7C0C] mov ax, word [reg_esi] 7314 00009C91 AB stosw 7315 00009C92 A1[800C] mov ax, word [reg_edi] 7316 00009C95 AB stosw 7317 00009C96 A1[640C] mov ax, word [reg_eax] 7318 00009C99 AB stosw 7319 00009C9A A1[6C0C] mov ax, word [reg_ecx] 7320 00009C9D AB stosw 7321 00009C9E A1[680C] mov ax, word [reg_ebx] 7322 00009CA1 AB stosw 7323 00009CA2 A1[700C] mov ax, word [reg_edx] 7324 00009CA5 AB stosw 7325 00009CA6 A1[9C0C] mov ax, word [reg_eip] 7326 00009CA9 AB stosw 7327 00009CAA A1[900C] mov ax, word [reg_cs] 7328 00009CAD AB stosw ; debuggee's cs:ip 7329 00009CAE 06 push es 7330 00009CAF 57 push di 7331 00009CB0 1E push ds 7332 00009CB1 0E push cs 7333 00009CB2 1F pop ds ; => lDEBUG_CODE 7334 00009CB3 BE[1A9D] mov si, qq.bootfreecode 7335 00009CB6 B95400 mov cx, ((qq.bootfreecode_size+1)>>1) 7336 00009CB9 F3A5 rep movsw ; code on stack 7337 00009CBB 1F pop ds 7338 7339 00009CBC 16 push ss 7340 00009CBD 07 pop es 7341 7342 00009CBE A1[0290] mov ax, word [ boot_new_memsizekib ] 7343 00009CC1 B106 mov cl, 6 7344 00009CC3 D3E0 shl ax, cl ; ax => source of EBDA (new position) 7345 00009CC5 8B16[0490] mov dx, word [ boot_old_memsizekib ] 7346 00009CC9 D3E2 shl dx, cl ; dx => destination of EBDA (old position) 7347 00009CCB 31C9 xor cx, cx ; size of EBDA to move (if none) 7348 00009CCD 1E push ds 7349 00009CCE 8ED9 mov ds, cx 7350 00009CD0 8B1E0E04 mov bx, word [40Eh] ; new ref in word [0:40Eh] (if none) 7351 00009CD4 1F pop ds 7352 00009CD5 803E[0690]00 cmp byte [ boot_ebdaflag ], 0 ; any EBDA ? 7353 00009CDA 7412 jz .noebda 7354 7355 00009CDC 1E push ds 7356 00009CDD 8ED8 mov ds, ax ; => EBDA 7357 00009CDF 31DB xor bx, bx 7358 00009CE1 8A1E0000 mov bl, byte [ 0 ] ; EBDA size in KiB 7359 00009CE5 B106 mov cl, 6 7360 00009CE7 D3E3 shl bx, cl ; *64, to paragraphs 7361 00009CE9 89D9 mov cx, bx ; = size of EBDA to move (in paragraphs) 7362 00009CEB 89D3 mov bx, dx ; = new EBDA reference to put in word [0:40Eh] 7363 00009CED 1F pop ds 7364 7365 .noebda: 7366 00009CEE A3[640C] mov word [reg_eax], ax ; => relocated (new) EBDA position 7367 ; (in front of debugger image) 7368 00009CF1 891E[680C] mov word [reg_ebx], bx ; = what to put in word [0:40Eh], 7369 ; unchanged content of that word if no EBDA 7370 00009CF5 890E[6C0C] mov word [reg_ecx], cx ; = EBDA size, 0 if no EBDA 7371 00009CF9 8916[700C] mov word [reg_edx], dx ; = original (old) EBDA position 7372 ; = original mem size (in paras) 7373 ; (behind/in debugger image) 7374 00009CFD C706[840C]0000 mov word [reg_ds], 0 7375 7376 00009D03 8F06[9C0C] pop word [reg_eip] 7377 00009D07 8F06[900C] pop word [reg_cs] ; -> code on stack 7378 00009D0B F606[8700]80 testopt [options3], opt3_tsr_quit_leave_tf 7379 00009D10 7505 jnz @F 7380 00009D12 8026[A10C]FE clropt [reg_efl], 100h ; clear TF 7381 @@: 7382 ; call dumpregs 7383 %if _DEBUG 7384 ; avoid hooking interrupts again: 7385 mov byte [cs:..@patch_tsr_quit_run], __JMP_REL16 7386 ; (SMC in section lDEBUG_CODE) 7387 %endif 7388 ; jmp cmd3 7389 00009D17 E9C3A5 jmp run ; run this 7390 7391 7392 align 2, db 0 7393 qq.bootfreecode: 7394 00009D1A 9C pushf 7395 00009D1B E81800 call movp ; move EBDA back (if any) 7396 00009D1E 891E0E04 mov word [40Eh], bx ; back relocate EBDA (if any) 7397 00009D22 B106 mov cl, 6 7398 00009D24 D3EA shr dx, cl ; = to KiB 7399 00009D26 89161304 mov word [413h], dx ; back relocate mem size 7400 00009D2A 9D popf 7401 00009D2B 1F pop ds 7402 00009D2C 07 pop es 7403 00009D2D 5E pop si 7404 00009D2E 5F pop di 7405 00009D2F 58 pop ax 7406 00009D30 59 pop cx 7407 00009D31 5B pop bx 7408 00009D32 5A pop dx 7409 00009D33 CAA800 retf ((qq.bootfreecode_size+1)&~1) 7410 7411 7412 ; Move paragraphs 7413 ; 7414 ; INP: ax:0-> source 7415 ; dx:0-> destination 7416 ; cx = number of paragraphs 7417 ; CHG: - 7418 ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 7419 ; Do not provide a wrapped/HMA source or destination! 7420 movp: 7421 00009D36 51 push cx 7422 00009D37 1E push ds 7423 00009D38 56 push si 7424 00009D39 06 push es 7425 00009D3A 57 push di 7426 7427 00009D3B 39D0 cmp ax, dx ; source above destination ? 7428 00009D3D 770A ja .up ; yes, move up (forwards) --> 7429 00009D3F 747B je .return ; same, no need to move --> 7430 00009D41 50 push ax 7431 00009D42 01C8 add ax, cx ; (expected not to carry) 7432 00009D44 39D0 cmp ax, dx ; end of source is above destination ? 7433 00009D46 58 pop ax 7434 00009D47 7730 ja .down ; yes, move from top down --> 7435 ; Here, the end of source is below-or-equal the destination, 7436 ; so they do not overlap. In this case we prefer moving up. 7437 7438 .up: 7439 00009D49 50 push ax 7440 00009D4A 52 push dx 7441 .uploop: 7442 00009D4B 8ED8 mov ds, ax 7443 00009D4D 8EC2 mov es, dx 7444 00009D4F 31FF xor di, di 7445 00009D51 31F6 xor si, si ; -> start of segment 7446 00009D53 81E90010 sub cx, 1000h ; 64 KiB left ? 7447 00009D57 7610 jbe .uplast ; no --> 7448 00009D59 51 push cx 7449 00009D5A B90080 mov cx, 10000h /2 7450 00009D5D F3A5 rep movsw ; move 64 KiB 7451 00009D5F 59 pop cx 7452 00009D60 050010 add ax, 1000h 7453 00009D63 81C20010 add dx, 1000h ; -> next segment 7454 00009D67 EBE2 jmp short .uploop ; proceed for more --> 7455 .uplast: 7456 00009D69 81C10010 add cx, 1000h ; restore counter 7457 00009D6D D1E1 shl cx, 1 7458 00009D6F D1E1 shl cx, 1 7459 00009D71 D1E1 shl cx, 1 ; *8, paragraphs to words 7460 00009D73 F3A5 rep movsw ; move last part 7461 00009D75 5A pop dx 7462 00009D76 58 pop ax 7463 00009D77 EB43 jmp short .return 7464 7465 .down: 7466 00009D79 FD std ; _AMD_ERRATUM_109_WORKAROUND as below 7467 .dnloop: 7468 00009D7A 81E90010 sub cx, 1000h ; 64 KiB left ? 7469 00009D7E 761A jbe .dnlast ; no --> 7470 00009D80 50 push ax 7471 00009D81 52 push dx 7472 00009D82 01C8 add ax, cx 7473 00009D84 01CA add dx, cx 7474 00009D86 8ED8 mov ds, ax ; -> 64 KiB not yet moved 7475 00009D88 8EC2 mov es, dx 7476 00009D8A 5A pop dx 7477 00009D8B 58 pop ax 7478 00009D8C BFFEFF mov di, -2 7479 00009D8F 89FE mov si, di ; moved from last word down 7480 00009D91 51 push cx 7481 00009D92 B90080 mov cx, 10000h /2 7482 00009D95 F3A5 rep movsw ; move 64 KiB 7483 00009D97 59 pop cx 7484 00009D98 EBE0 jmp short .dnloop ; proceed for more --> 7485 .dnlast: 7486 00009D9A 81C10010 add cx, 1000h ; restore counter 7487 00009D9E D1E1 shl cx, 1 7488 00009DA0 D1E1 shl cx, 1 7489 00009DA2 D1E1 shl cx, 1 ; *8, paragraphs to words 7490 00009DA4 89CF mov di, cx 7491 00009DA6 4F dec di 7492 00009DA7 D1E7 shl di, 1 ; words to offset, -> last word 7493 00009DA9 89FE mov si, di 7494 00009DAB 8ED8 mov ds, ax 7495 00009DAD 8EC2 mov es, dx ; first segment correct 7496 7497 7498 numdef AMD_ERRATUM_109_WORKAROUND, 1 7499 ; Refer to comment in init.asm init_movp. 7500 7501 %if _AMD_ERRATUM_109_WORKAROUND 7502 00009DAF E308 jcxz @FF 7503 00009DB1 83F914 cmp cx, 20 7504 00009DB4 7703 ja @FF 7505 @@: 7506 00009DB6 A5 movsw 7507 00009DB7 E2FD loop @B 7508 @@: 7509 %endif 7510 00009DB9 F3A5 rep movsw ; move first part 7511 00009DBB FC cld 7512 .return: 7513 00009DBC 5F pop di 7514 00009DBD 07 pop es 7515 00009DBE 5E pop si 7516 00009DBF 1F pop ds 7517 00009DC0 59 pop cx 7518 00009DC1 C3 retn 7519 qq.bootfreecode_size: equ $-qq.bootfreecode 7520 %endif 7521 7522 7523 sleepcmd: 7524 00009DC2 E89B1B call skipcomma 7525 00009DC5 E86B15 call getdword 7526 00009DC8 53 push bx 7527 00009DC9 52 push dx 7528 00009DCA E8C31B call skipwh0 7529 00009DCD E86A1B call iseol? 7530 00009DD0 7421 je .seconds 7531 00009DD2 4E dec si 7532 00009DD3 BA[B068] mov dx, msg.seconds 7533 00009DD6 E8021B call isstring? 7534 00009DD9 7414 je .seconds_check_eol 7535 00009DDB BA[B868] mov dx, msg.ticks 7536 00009DDE E8FA1A call isstring? 7537 .error_NZ: 7538 00009DE1 7403E92C07 jne error 7539 .ticks_check_eol: 7540 00009DE6 AC lodsb 7541 00009DE7 E8651B call chkeol 7542 7543 00009DEA B80100 mov ax, 1 7544 00009DED EB07 jmp .common 7545 7546 .seconds_check_eol: 7547 00009DEF AC lodsb 7548 00009DF0 E85C1B call chkeol 7549 .seconds: 7550 00009DF3 B81200 mov ax, 18 7551 .common: 7552 00009DF6 5A pop dx 7553 00009DF7 50 push ax 7554 00009DF8 F7E2 mul dx ; dx:ax = low word times multiplier 7555 00009DFA 89D3 mov bx, dx 7556 00009DFC 89C1 mov cx, ax ; bx:cx = low word times multiplier 7557 00009DFE 58 pop ax 7558 00009DFF 5A pop dx 7559 00009E00 F7E2 mul dx ; dx:ax = high word times multiplier 7560 00009E02 01C3 add bx, ax 7561 00009E04 83D200 adc dx, 0 ; dx:bx:cx = entire result 7562 00009E07 75D8 jnz .error_NZ 7563 7564 00009E09 85C9 test cx, cx 7565 00009E0B 7504 jnz @F 7566 00009E0D 85DB test bx, bx 7567 00009E0F 7436 jz .end 7568 @@: 7569 7570 00009E11 B84000 mov ax, 40h ; bimodal segment/selector 7571 00009E14 8EC0 mov es, ax 7572 .loop_reset: 7573 00009E16 268B166C00 mov dx, word [es:6Ch] 7574 .loop: 7575 00009E1B 263B166C00 cmp dx, word [es:6Ch] 7576 00009E20 7519 jne .next 7577 00009E22 E8B2A1 call handle_serial_flags_ctrl_c 7578 00009E25 F606[8700]40 testopt [options3], opt3_check_ctrlc_0bh 7579 00009E2A 750A jnz @F ; already called function 0Bh --> 7580 00009E2C E8AF08 call InDos 7581 00009E2F 7505 jnz @F 7582 00009E31 B40B mov ah, 0Bh 7583 doscall ; allow to break with Ctrl-C 2080 00009E33 E865BF <1> call _doscall 7584 @@: 7585 00009E36 E8E222 call idle 7586 00009E39 EBE0 jmp .loop 7587 7588 .next: 7589 00009E3B 83E901 sub cx, 1 7590 00009E3E 83DB00 sbb bx, 0 7591 00009E41 75D3 jnz .loop_reset 7592 00009E43 E302 jcxz .end 7593 00009E45 EBCF jmp .loop_reset 7594 7595 .end: 7596 00009E47 C3 retn 7597 7598 7599 ; S command - search for a string of bytes. 7600 sss: 7601 00009E48 4E dec si 7602 00009E49 4E dec si ; -> at 'S' 7603 00009E4A BA[AA68] mov dx, msg.sleep 7604 00009E4D E88B1A call isstring? ; check for "SLEEP" 7605 00009E50 7503E96DFF je sleepcmd 7606 00009E55 46 inc si ; skip 'S' 7607 00009E56 AC lodsb ; load next 7608 7609 00009E57 8026[A700]7F clropt [internalflags3], dif3_sss_is_reverse 7610 7611 00009E5C 8B1E[840C] mov bx, word [reg_ds] ; get search range 7612 00009E60 66 _386_PM_o32 ; xor ecx, ecx 7613 00009E61 31C9 xor cx, cx 7614 00009E63 E8F809 call getrangeX ; get address range into BX:(E)DX..BX:(E)CX 7615 00009E66 E8F81A call skipcomm0 7616 00009E69 66 _386_PM_o32 ; push edx 7617 00009E6A 52 push dx 7618 00009E6B 66 _386_PM_o32 ; push ecx 7619 00009E6C 51 push cx 7620 00009E6D 53 push bx 7621 7622 00009E6E BA[0667] mov dx, msg.reverse 7623 00009E71 4E dec si 7624 00009E72 E8661A call isstring? 7625 00009E75 7509 jne @F 7626 7627 00009E77 800E[A700]80 setopt [internalflags3], dif3_sss_is_reverse 7628 00009E7C E8101B call skipwhite 7629 00009E7F 4E dec si 7630 @@: 7631 00009E80 BA[0067] mov dx, msg.range 7632 00009E83 E8551A call isstring? 7633 00009E86 AC lodsb 7634 00009E87 7514 jne .notrange 7635 7636 00009E89 8B1E[840C] mov bx, word [reg_ds] ; get search range 7637 00009E8D 31C9 xor cx, cx 7638 00009E8F E8CC09 call getrangeX ; try to get second range 7639 00009E92 E8BA1A call chkeol ; and insure end-of-line 7640 ; successful if it returned 7641 00009E95 66 _386_PM_o32 ; mov esi, edx 7642 00009E96 89D6 mov si, dx ; bx:esi-> source string 7643 00009E98 66 _386_PM_o32 ; sub ecx, edx 7644 00009E99 29D1 sub cx, dx ; ecx = count - 1 7645 00009E9B EB28 jmp short .setesedi 7646 7647 .notrange: 7648 00009E9D E8180B call getstr ; get string of bytes 7649 00009EA0 81EF[0E08] sub di, line_out ; di = number of bytes to look for 7650 00009EA4 7503E96906 jz error 7651 00009EA9 89F9 mov cx, di 7652 00009EAB 4F dec di ; minus one 7653 00009EAC BE[0E08] mov si, line_out 7654 00009EAF 57 push di 7655 00009EB0 E86066 call guard_auxbuff 7656 00009EB3 8E06[F209] mov es, word [auxbuff_segorsel] 7657 00009EB7 31FF xor di, di 7658 00009EB9 F3A4 rep movsb ; move to auxbuff 7659 00009EBB 66 _386_PM_o32 ; xor esi, esi 7660 00009EBC 31F6 xor si, si 7661 00009EBE 8CC3 mov bx, es ; bx:esi -> auxbuff 7662 00009EC0 59 pop cx 7663 00009EC1 660FB7C9 _386_PM movzx ecx, cx ; ecx = count - 1 7664 .setesedi: 7665 00009EC5 16 push ss 7666 00009EC6 07 pop es 7667 00009EC7 BF[6C0B] mov di, search_results 7668 00009ECA 31C0 xor ax, ax 7669 00009ECC A3[CC0B] mov word [sscounter], ax 7670 00009ECF A3[CE0B] mov word [sscounter + 2], ax 7671 00009ED2 51 push cx 7672 %if _PM 7673 00009ED3 B93000 mov cx, (6 * 16) >> 1 7674 %else 7675 mov cx, (4 * 16) >> 1 7676 %endif 7677 00009ED6 F3AB rep stosw 7678 00009ED8 59 pop cx 7679 7680 00009ED9 E87507 call prephack ; set up for the interrupt vector hack 7681 00009EDC E8A007 call dohack 7682 00009EDF 8EDB mov ds, bx 7683 00009EE1 07 pop es 7684 00009EE2 E92501 _386_PM_jmpn .386init ; 386 --> 7685 .init: 7686 00009EE5 5B pop bx 7687 00009EE6 5A pop dx 7688 .init_popped: 7689 00009EE7 29D3 sub bx, dx ; bx = number of bytes in search range minus one 7690 00009EE9 29CB sub bx, cx ; = number of possible positions of string minus 1 7691 00009EEB 7303E92206 jb error 7692 00009EF0 89D7 mov di, dx 7693 00009EF2 89CA mov dx, cx 7694 00009EF4 89D9 mov cx, bx 7695 7696 ; ds:si-> search string, length (dx+1) 7697 ; es:di-> data to search in, (cx+1) bytes 7698 00009EF6 36F606[A700]80 testopt [ss:internalflags3], dif3_sss_is_reverse 7699 00009EFC 7516 jnz .reverse 7700 .loop: 7701 00009EFE 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7702 00009F00 56 push si 7703 00009F01 AC lodsb ; first character in al 7704 00009F02 F2AE repne scasb ; look for first byte 7705 00009F04 7408 je .foundbyte 7706 00009F06 AE scasb ; count in cx was cnt-1 7707 00009F07 7536 jne .done 7708 .found_last_byte: 7709 00009F09 E85600 call .handle_found_byte 7710 00009F0C EB31 jmp .done 7711 7712 .foundbyte: 7713 00009F0E E85100 call .handle_found_byte 7714 00009F11 5E pop si 7715 00009F12 EBEA jmp .loop ; cx = 0 if one to search, 7716 ; cx = 1 if two to search, etc 7717 7718 .reverse: 7719 00009F14 01CF add di, cx ; -> last position to check 7720 .reverseloop: 7721 00009F16 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7722 00009F18 56 push si 7723 00009F19 AC lodsb ; first character in al 7724 00009F1A FD std ; no AMD erratum workaround needed 7725 00009F1B F2AE repne scasb ; look for first byte 7726 00009F1D 7411 je .reversefoundbyte 7727 00009F1F AE scasb ; count in cx was cnt-1 7728 00009F20 751D jne .done 7729 .reversefound_last_byte: 7730 00009F22 FC cld 7731 00009F23 83C702 add di, 2 7732 00009F26 38C0 cmp al, al ; ZR for case if dx = 0 7733 00009F28 E83700 call .handle_found_byte 7734 00009F2B 83EF02 sub di, 2 7735 00009F2E EB0F jmp .done 7736 7737 .reversefoundbyte: 7738 00009F30 FC cld 7739 00009F31 83C702 add di, 2 7740 00009F34 38C0 cmp al, al ; ZR for case if dx = 0 7741 00009F36 E82900 call .handle_found_byte 7742 00009F39 83EF02 sub di, 2 7743 00009F3C 5E pop si 7744 00009F3D EBD7 jmp .reverseloop ; cx = 0 if one to search, 7745 ; cx = 1 if two to search, etc 7746 7747 .done: 7748 00009F3F 5E pop si ; discard 7749 .commondone: 7750 00009F40 FC cld 7751 00009F41 16 push ss 7752 00009F42 1F pop ds 7753 00009F43 E86D07 call unhack 7754 00009F46 BF[0E08] mov di, line_out 7755 7756 00009F49 A1[CE0B] mov ax, word [sscounter + 2] 7757 00009F4C 85C0 test ax, ax 7758 00009F4E 7403 jz .nohighcounter 7759 00009F50 E8E71A call hexword 7760 .nohighcounter: 7761 7762 00009F53 A1[CC0B] mov ax, word [sscounter] 7763 00009F56 E8E11A call hexword 7764 00009F59 E81A1B call putsline 7765 00009F5C BA[5880] mov dx, msg.matches 7766 00009F5F E98E1E jmp putsz 7767 7768 7769 ; INP: ZR 7770 .handle_found_byte: 7771 00009F62 51 push cx 7772 00009F63 57 push di 7773 00009F64 89D1 mov cx, dx 7774 00009F66 F3A6 repe cmpsb ; compare string behind first byte 7775 ; If we're searching for a single-byte value then 7776 ; dx is equal to zero here. In that case cx gets 7777 ; the value zero and then repe cmpsb does not 7778 ; alter ZF, meaning it will stay ZR (as noted for 7779 ; the comment INP section). 7780 00009F68 5F pop di 7781 00009F69 7402 je .display ; if equal 7782 .next: 7783 00009F6B 59 pop cx 7784 00009F6C C3 retn 7785 7786 .display: 7787 00009F6D 8CC3 mov bx, es 7788 00009F6F 57 push di 7789 00009F70 1E push ds 7790 00009F71 06 push es 7791 00009F72 16 push ss 7792 00009F73 1F pop ds 7793 00009F74 E83C07 call unhack ; undo the interrupt vector hack and restore es 7794 00009F77 57 push di 7795 00009F78 833E[CE0B]00 cmp word [sscounter + 2], 0 7796 00009F7D 751F jne @F 7797 00009F7F 8B3E[CC0B] mov di, word [sscounter] 7798 00009F83 83FF10 cmp di, 16 7799 00009F86 7316 jae @F 7800 %if _PM 7801 00009F88 01FF add di, di ; * 2 7802 00009F8A 89F8 mov ax, di 7803 00009F8C 01FF add di, di ; * 4 7804 00009F8E 01C7 add di, ax ; * 4 + * 2 = * 6 7805 %else 7806 add di, di 7807 add di, di ; * 4 7808 %endif 7809 00009F90 81C7[6C0B] add di, search_results 7810 00009F94 58 pop ax 7811 00009F95 50 push ax 7812 00009F96 48 dec ax 7813 00009F97 AB stosw 7814 %if _PM 7815 00009F98 31C0 xor ax, ax 7816 00009F9A AB stosw 7817 %endif 7818 00009F9B 89D8 mov ax, bx 7819 00009F9D AB stosw 7820 7821 @@: 7822 00009F9E 8306[CC0B]01 add word [sscounter], 1 7823 00009FA3 8316[CE0B]00 adc word [sscounter + 2], 0 7824 00009FA8 89D8 mov ax, bx 7825 00009FAA BF[0E08] mov di, line_out 7826 00009FAD E88A1A call hexword ; 4 (segment) 7827 00009FB0 B03A mov al, ':' 7828 00009FB2 AA stosb ; +1=5 7829 00009FB3 58 pop ax 7830 00009FB4 48 dec ax 7831 00009FB5 E8821A call hexword 7832 %if _SDUMP 7833 00009FB8 F606[7E00]80 testopt [options], ss_no_dump 7834 00009FBD 753D jnz @F 7835 00009FBF F9 stc 7836 00009FC0 11D0 adc ax, dx ; -> behind result 7837 00009FC2 7638 jbe .noresult ; end of segment 7838 00009FC4 89C6 mov si, ax 7839 00009FC6 B82020 mov ax, 32<<8|32 7840 00009FC9 AB stosw 7841 00009FCA 8D5D30 lea bx, [di+3*16] 7842 00009FCD 89F1 mov cx, si 7843 00009FCF F7D9 neg cx 7844 00009FD1 83F910 cmp cx, byte 16 7845 00009FD4 7603 jbe .cxdone 7846 00009FD6 B91000 mov cx, 16 7847 .cxdone: 7848 00009FD9 1F pop ds 7849 00009FDA 1E push ds ; restore search's segment 7850 00009FDB 51 push cx 7851 .disploop: 7852 00009FDC AC lodsb 7853 00009FDD E8E975 call dd_store 7854 00009FE0 B020 mov al, 32 7855 00009FE2 AA stosb 7856 00009FE3 E2F7 loop .disploop 7857 00009FE5 59 pop cx 7858 00009FE6 16 push ss 7859 00009FE7 1F pop ds 7860 00009FE8 F7D9 neg cx 7861 00009FEA 83C110 add cx, byte 16 7862 00009FED 7407 jz .noblanks 7863 .loopblanks: 7864 00009FEF B82020 mov ax, 32<<8|32 7865 00009FF2 AB stosw 7866 00009FF3 AA stosb 7867 00009FF4 E2F9 loop .loopblanks 7868 .noblanks: 7869 00009FF6 C645E72D mov byte [di-(1+(8*3))], '-' 7870 00009FFA 89DF mov di, bx 7871 .noresult: 7872 @@: 7873 %endif ; _SDUMP 7874 00009FFC 52 push dx 7875 00009FFD E8721A call putsline_crlf 7876 0000A000 E87C06 call dohack 7877 0000A003 5A pop dx 7878 0000A004 07 pop es 7879 0000A005 1F pop ds 7880 0000A006 5F pop di 7881 0000A007 E961FF jmp .next 7882 7883 %if _PM 7884 .386init: 7885 [cpu 386] 7886 0000A00A 665B pop ebx 7887 0000A00C 665A pop edx 7888 0000A00E E8ECF1 call ispm 7889 0000A011 0F85D2FE jnz .init_popped ; not PM --> 7890 0000A015 6629D3 sub ebx, edx ; ebx = number of bytes in search range minus one 7891 0000A018 6629CB sub ebx, ecx ; = number of possible positions of string minus 1 7892 0000A01B 0F82F304 jb error 7893 0000A01F 6689D7 mov edi, edx 7894 0000A022 6689CA mov edx, ecx 7895 0000A025 6689D9 mov ecx, ebx 7896 7897 ; ds:esi-> search string, length (edx+1) 7898 ; es:edi-> data to search in, (ecx+1) bytes 7899 ; Although 386+ RM still uses 64 KiB segments, it allows 7900 ; us to use the 32-bit addressing variant of the string 7901 ; instructions as long as we never access any byte above 7902 ; the 64 KiB limit. (Even if the index register contains 7903 ; 00010000h after an instruction executed.) 7904 0000A028 36F606[A700]80 testopt [ss:internalflags3], dif3_sss_is_reverse 7905 0000A02E 751B jnz .386reverse 7906 .386loop: 7907 0000A030 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7908 0000A032 6656 push esi 7909 0000A034 67AC a32 lodsb ; first character in al 7910 0000A036 F267AE a32 repne scasb ; look for first byte 7911 0000A039 7409 je .386foundbyte 7912 0000A03B 67AE a32 scasb ; count in ecx was cnt-1 7913 0000A03D 7541 jne .386done 7914 .386found_last_byte: 7915 0000A03F E84300 call .386handle_found_byte 7916 0000A042 EB3C jmp .386done 7917 7918 .386foundbyte: 7919 0000A044 E83E00 call .386handle_found_byte 7920 0000A047 665E pop esi 7921 0000A049 EBE5 jmp .386loop ; ecx = 0 if one to search, 7922 ; ecx = 1 if two to search, etc 7923 7924 .386reverse: 7925 0000A04B 6601CF add edi, ecx ; -> last position to check 7926 .386reverseloop: 7927 0000A04E 0C01 or al, 1 ; NZ (iff cx==0, repne scasb doesn't change ZF) 7928 0000A050 6656 push esi 7929 0000A052 67AC a32 lodsb ; first character in al 7930 0000A054 FD std ; no AMD erratum workaround needed 7931 0000A055 F267AE a32 repne scasb ; look for first byte 7932 0000A058 7414 je .386reversefoundbyte 7933 0000A05A 67AE a32 scasb ; count in ecx was cnt-1 7934 0000A05C 7522 jne .386done 7935 .386reversefound_last_byte: 7936 0000A05E FC cld 7937 0000A05F 6683C702 add edi, 2 7938 0000A063 38C0 cmp al, al ; ZR for case if edx = 0 7939 0000A065 E81D00 call .386handle_found_byte 7940 0000A068 6683EF02 sub edi, 2 7941 0000A06C EB12 jmp .386done 7942 7943 .386reversefoundbyte: 7944 0000A06E FC cld 7945 0000A06F 6683C702 add edi, 2 7946 0000A073 38C0 cmp al, al ; ZR for case if edx = 0 7947 0000A075 E80D00 call .386handle_found_byte 7948 0000A078 6683EF02 sub edi, 2 7949 0000A07C 665E pop esi 7950 0000A07E EBCE jmp .386reverseloop ; ecx = 0 if one to search, 7951 ; ecx = 1 if two to search, etc 7952 7953 .386done: 7954 0000A080 665E pop esi ; discard 7955 0000A082 E9BBFE jmp .commondone 7956 7957 7958 ; INP: ZR 7959 .386handle_found_byte: 7960 0000A085 6651 push ecx 7961 0000A087 6657 push edi 7962 0000A089 6689D1 mov ecx, edx 7963 0000A08C F367A6 a32 repe cmpsb ; compare string behind first byte 7964 ; If we're searching for a single-byte value then 7965 ; edx is equal to zero here. In that case ecx gets 7966 ; the value zero and then a32 repe cmpsb does not 7967 ; alter ZF, meaning it will stay ZR (as noted for 7968 ; the comment INP section). 7969 0000A08F 665F pop edi 7970 0000A091 7403 je .386display ; if equal 7971 .386next: 7972 0000A093 6659 pop ecx 7973 0000A095 C3 retn 7974 7975 .386display: 7976 0000A096 8CC3 mov bx, es 7977 0000A098 6657 push edi 7978 0000A09A 1E push ds 7979 0000A09B 06 push es 7980 0000A09C 16 push ss 7981 0000A09D 1F pop ds 7982 0000A09E E81206 call unhack ; undo the interrupt vector hack and restore es 7983 0000A0A1 6657 push edi 7984 0000A0A3 668B3E[CC0B] mov edi, dword [sscounter] 7985 0000A0A8 6683FF10 cmp edi, 16 7986 0000A0AC 7317 jae @F 7987 0000A0AE 01FF add di, di ; * 2 7988 0000A0B0 89F8 mov ax, di 7989 0000A0B2 01FF add di, di ; * 4 7990 0000A0B4 01C7 add di, ax ; * 4 + * 2 = * 6 7991 0000A0B6 81C7[6C0B] add di, search_results 7992 0000A0BA 6658 pop eax 7993 0000A0BC 6650 push eax 7994 0000A0BE 6648 dec eax 7995 0000A0C0 66AB stosd 7996 0000A0C2 89D8 mov ax, bx 7997 0000A0C4 AB stosw 7998 7999 @@: 8000 0000A0C5 66FF06[CC0B] inc dword [sscounter] 8001 0000A0CA 89D8 mov ax, bx 8002 0000A0CC BF[0E08] mov di, line_out 8003 0000A0CF E86819 call hexword ; 4 (segment) 8004 0000A0D2 B03A mov al, ':' 8005 0000A0D4 AA stosb ; +1=5 8006 0000A0D5 6658 pop eax 8007 0000A0D7 6648 dec eax 8008 0000A0D9 E88CBC call test_d_b_bit 8009 0000A0DC 7403 jz .noa32 8010 0000A0DE E84D19 call hexword_high 8011 .noa32: 8012 0000A0E1 E85619 call hexword 8013 %if _SDUMP 8014 0000A0E4 F606[7E00]80 testopt [options], ss_no_dump 8015 0000A0E9 7543 jnz @F 8016 0000A0EB F9 stc 8017 0000A0EC 6611D0 adc eax, edx ; -> behind result 8018 0000A0EF 763D jbe .386noresult ; end of segment 8019 0000A0F1 6689C6 mov esi, eax 8020 0000A0F4 B82020 mov ax, 32<<8|32 8021 0000A0F7 AB stosw 8022 0000A0F8 8D5D30 lea bx, [di+3*16] 8023 0000A0FB 6689F1 mov ecx, esi 8024 0000A0FE 66F7D9 neg ecx 8025 0000A101 6683F910 cmp ecx, byte 16 8026 0000A105 7603 jbe .386cxdone 8027 0000A107 B91000 mov cx, 16 8028 .386cxdone: 8029 0000A10A 1F pop ds 8030 0000A10B 1E push ds ; restore search's segment 8031 0000A10C 51 push cx 8032 .386disploop: 8033 0000A10D 67AC a32 lodsb 8034 0000A10F E8B774 call dd_store 8035 0000A112 B020 mov al, 32 8036 0000A114 AA stosb 8037 0000A115 E2F6 loop .386disploop 8038 0000A117 59 pop cx 8039 0000A118 16 push ss 8040 0000A119 1F pop ds 8041 0000A11A F7D9 neg cx 8042 0000A11C 83C110 add cx, byte 16 8043 0000A11F 7407 jz .386noblanks 8044 .386loopblanks: 8045 0000A121 B82020 mov ax, 32<<8|32 8046 0000A124 AB stosw 8047 0000A125 AA stosb 8048 0000A126 E2F9 loop .386loopblanks 8049 .386noblanks: 8050 0000A128 C645E72D mov byte [di-(1+(8*3))], '-' 8051 0000A12C 89DF mov di, bx 8052 .386noresult: 8053 @@: 8054 %endif ; _SDUMP 8055 0000A12E 52 push dx 8056 0000A12F E84019 call putsline_crlf 8057 0000A132 E84A05 call dohack 8058 0000A135 5A pop dx 8059 0000A136 07 pop es 8060 0000A137 1F pop ds 8061 0000A138 665F pop edi 8062 0000A13A E956FF jmp .386next 8063 __CPU__ 8064 %endif ; _PM 8065 8066 8067 %if 0 8068 getdebuggeebyte: 8069 push bp 8070 mov bp, sp 8071 sub sp, byte 4 8072 push bx 8073 push cx 8074 %define _dedata -4 8075 %define _bp 0 8076 %define _ip 2 8077 %define _adroffset 4 8078 %define _adrsegment 8 8079 test byte [], memorydump 8080 jz .realmemory 8081 8082 jmp short .return 8083 .realmemory32: 8084 .realmemory: 8085 mov ax, word [ bp + _adrsegment ] 8086 mov bx, word [ bp + _adroffset ] 8087 push ds 8088 mov ds, ax 8089 push word [ bx ] 8090 pop word [ bp + _dedata ] 8091 push word [ bx +2 ] 8092 pop word [ bp + _dedata +2 ] 8093 pop ds 8094 ; test ax, ax 8095 ; jnz .return 8096 mov dx, ax 8097 mov cl, 4 8098 shl ax, cl 8099 mov cl, 12 8100 shr dx, cl 8101 add ax, bx 8102 adc dx, byte 0 8103 jnz .return 8104 sub ax, 23h*4 8105 jb .return 8106 cmp ax, 2*4 8107 jae .return 8108 8109 push ds 8110 xor bx, bx 8111 mov ds, bx 8112 push si 8113 push di 8114 mov si, 22h*4 8115 mov di, hackints.dummy22 8116 movsw 8117 movsw 8118 mov bl, 8 8119 add si, bx 8120 add di, bx 8121 movsw 8122 movsw 8123 8124 mov cl, byte [ bx - 4 + hackints2324 ] 8125 mov byte [ bp + _dedata ], cl 8126 .return: 8127 pop cx 8128 pop bx 8129 pop ax 8130 pop dx 8131 pop bp 8132 retn 6 8133 8134 8135 ; Interrupt hack table 8136 ; 8137 ; This contains the Int23 and Int24 handler we want to show 8138 ; the user. As we'll retrieve a dword per access, 8139 align 4, db 0 8140 hackints: 8141 .dummy22: dd 0 8142 .23: dd 0 8143 .24: dd 0 8144 .dummy25: dd 0 8145 %endif 8146 8147 8148 lockdrive: 8149 0000A13D 50 push ax 8150 0000A13E 53 push bx 8151 0000A13F 51 push cx 8152 0000A140 52 push dx 8153 0000A141 88C3 mov bl, al 8154 0000A143 FEC3 inc bl 8155 0000A145 B700 mov bh, 0 8156 0000A147 B94A08 mov cx, 084Ah 8157 0000A14A BA0100 mov dx, 0001h 8158 0000A14D B80D44 mov ax, 440Dh 8159 0000A150 CD21 int 21h 8160 0000A152 5A pop dx 8161 0000A153 59 pop cx 8162 0000A154 5B pop bx 8163 0000A155 58 pop ax 8164 0000A156 C3 retn 8165 8166 unlockdrive: 8167 0000A157 50 push ax 8168 0000A158 53 push bx 8169 0000A159 51 push cx 8170 0000A15A 52 push dx 8171 0000A15B 88C3 mov bl, al 8172 0000A15D FEC3 inc bl 8173 0000A15F B700 mov bh, 0 8174 0000A161 B96A08 mov cx, 086Ah 8175 0000A164 BA0100 mov dx, 0001h 8176 0000A167 B80D44 mov ax, 440Dh 8177 0000A16A CD21 int 21h 8178 0000A16C 5A pop dx 8179 0000A16D 59 pop cx 8180 0000A16E 5B pop bx 8181 0000A16F 58 pop ax 8182 0000A170 C3 retn 8183 8184 8185 ; W command - write a program, or disk sectors, to disk. 8186 ww: 8187 %if _BOOTLDR 8188 0000A171 F606[9D00]40 testopt [internalflags], nodosloaded 8189 0000A176 7406 jz @F 8190 0000A178 BA[955F] mov dx, msg.nobootsupp 8191 0000A17B E9721C jmp putsz 8192 @@: 8193 %endif 8194 8195 0000A17E E8EE05 call parselw ; parse L and W argument format 8196 0000A181 747B jz ww4 ; if request to write program 8197 %if _PM && _NOEXTENDER 8198 0000A183 E877F0 call ispm 8199 0000A186 7508 jnz .rm 8200 0000A188 E8EFF1 call isextenderavailable 8201 0000A18B 7303E902F2 jc nodosextinst 8202 .rm: 8203 %endif 8204 0000A190 36F606[9C00]06 testopt [ss:internalflags], newpacket| ntpacket 8205 0000A196 742F jz .oldint 8206 0000A198 88C2 mov dl, al ; A: = 0, ... 8207 0000A19A BE0160 mov si, 6001h ; write, assume "file data" 8208 %if _VDD 8209 0000A19D F606[9C00]04 testopt [internalflags], ntpacket 8210 0000A1A2 7512 jnz .vdd 8211 %endif 8212 0000A1A4 FEC2 inc dl ; A: = 1, ... 8213 0000A1A6 E894FF call lockdrive 8214 0000A1A9 B80573 mov ax, 7305h ; ds:(e)bx-> packet 8215 0000A1AC F9 stc 8216 0000A1AD CD21 int 21h ; use int 21h here, not doscall 8217 0000A1AF 9C pushf 8218 0000A1B0 E8A4FF call unlockdrive 8219 0000A1B3 9D popf 8220 0000A1B4 EB13 jmp short .done 8221 %if _VDD 8222 .vdd: 8223 0000A1B6 A1[B80A] mov ax, word [hVdd] 8224 0000A1B9 B90500 mov cx, 5 8225 %if _PM 8226 0000A1BC 020E[DA88] add cl, byte [dpmi32] 8227 %endif 8228 0000A1C0 C4C4580290 DispatchCall 8229 0000A1C5 EB02 jmp short .done 8230 %endif 8231 .oldint: 8232 0000A1C7 CD26 int 26h 8233 .done: 8234 0000A1C9 BA[A979] mov dx, writing 8235 ww1: 8236 0000A1CC 8CD3 mov bx, ss ; restore segment registers 8237 0000A1CE 8EDB mov ds, bx 8238 0000A1D0 8B26[940A] mov sp, word [savesp] 8239 0000A1D4 8EC3 mov es, bx 8240 0000A1D6 7323 jnc ww3 ; if no error 8241 0000A1D8 3C0C cmp al, 0Ch 8242 0000A1DA 7602 jbe ww2 ; if in range 8243 0000A1DC B00C mov al, 0Ch 8244 ww2: 8245 0000A1DE 98 cbw ; ah = 0 8246 0000A1DF BB[DA78] mov bx, dskerrs ; -> byte table 8247 0000A1E2 D7 xlatb ; get offset from dskerrs 8248 0000A1E3 01D8 add ax, bx ; -> message 8249 0000A1E5 BF[0E08] mov di, line_out 8250 0000A1E8 89C6 mov si, ax 8251 0000A1EA E8AE17 call showstring 8252 0000A1ED 89D6 mov si, dx 8253 0000A1EF E8A917 call showstring 8254 0000A1F2 BE[AF79] mov si, drive 8255 0000A1F5 E8A317 call showstring 8256 0000A1F8 E87718 call putsline_crlf 8257 ww3: 8258 0000A1FB E9025E jmp cmd3 ; can't return because Int26 leaves stack wrong 8259 8260 ; Write to file. First check the file extension. 8261 ; size of file is in client's BX:CX, 8262 ; default start address is DS:100h 8263 8264 ww4: 8265 0000A1FE E8DD04 call InDos 8266 0000A201 7403E905F2 jnz not_while_indos 8267 8268 0000A206 A0[DD0B] mov al, byte [fileext] ; get flags of file extension 8269 0000A209 A80C test al, EXT_EXE + EXT_HEX 8270 0000A20B 7405 jz ww5 ; if not EXE or HEX 8271 0000A20D BA[4B7D] mov dx, nowhexe 8272 0000A210 EB07 jmp short ww6 8273 8274 ww5: 8275 0000A212 3C00 cmp al, 0 8276 0000A214 7506 jnz ww7 ; if extension exists 8277 0000A216 BA[717D] mov dx, nownull 8278 ww6: 8279 0000A219 E9D400 jmp ww16 8280 8281 ; File extension is OK; write it. First, create the file. 8282 ww7: 8283 %if _PM 8284 0000A21C E8DEEF call ispm 8285 0000A21F 7506 jnz ww7_1 8286 0000A221 BA[1A7C] mov dx, nopmsupp 8287 0000A224 E9C91B jmp putsz 8288 ww7_1: 8289 %endif 8290 0000A227 BD[0E08] mov bp, line_out 8291 0000A22A 80FEFE cmp dh, 0FEh 8292 0000A22D 7207 jb ww8 ; if (dx < 0xFE00) 8293 0000A22F 80EEFE sub dh, 0FEh ; dx -= 0xFE00; 8294 0000A232 81C3E00F add bx, 0FE0h 8295 ww8: 8296 0000A236 89560A mov word [bp+10], dx ; save lower part of address in line_out+10 8297 0000A239 89DE mov si, bx ; upper part goes into si 8298 0000A23B B43C mov ah, 3Ch ; create file 8299 0000A23D 31C9 xor cx, cx ; no attributes 8300 0000A23F BA8000 mov dx, DTA 8301 doscall 2080 0000A242 E856BB <1> call _doscall 8302 0000A245 7303E97D00 jc ww15 ; if error 8303 0000A24A 50 push ax ; save file handle 8304 8305 ; Print message about writing. 8306 0000A24B BA[947D] mov dx, wwmsg1 8307 0000A24E E89F1B call putsz ; print string 8308 0000A251 A1[680C] mov ax, word [reg_ebx] 8309 0000A254 83F810 cmp ax, 10h 8310 0000A257 7202 jb ww9 ; if not too large 8311 0000A259 31C0 xor ax, ax ; too large: zero it out 8312 ww9: 8313 0000A25B 894608 mov word [bp+8], ax 8314 0000A25E 85C0 test ax, ax 8315 0000A260 7403 jz ww10 8316 0000A262 E8E717 call hexnyb 8317 ww10: 8318 0000A265 A1[6C0C] mov ax, word [reg_ecx] 8319 0000A268 894606 mov word [bp+6], ax 8320 0000A26B E8CC17 call hexword 8321 0000A26E E80518 call putsline ; print size 8322 0000A271 BA[9D7D] mov dx, wwmsg2 8323 0000A274 E8791B call putsz ; print string 8324 8325 ; Now write the file. Size remaining is in line_out+6. 8326 0000A277 5B pop bx ; recover file handle 8327 0000A278 8B560A mov dx, word [bp+10] ; address to write from is si:dx 8328 ww11: 8329 0000A27B B800FE mov ax, 0FE00h 8330 0000A27E 29D0 sub ax, dx 8331 0000A280 807E0800 cmp byte [bp+8], 0 8332 0000A284 7508 jnz ww12 ; if more than 0FE00h bytes remaining 8333 0000A286 3B4606 cmp ax, word [bp+6] 8334 0000A289 7203 jb ww12 ; ditto 8335 0000A28B 8B4606 mov ax, word [bp+6] 8336 ww12: 8337 0000A28E 91 xchg ax, cx ; mov cx, ax 8338 0000A28F 8EDE mov ds, si 8339 0000A291 B440 mov ah, 40h ; write to file 8340 0000A293 CD21 int 21h ; use INT, not doscall 8341 0000A295 16 push ss ; restore DS 8342 0000A296 1F pop ds 8343 0000A297 39C8 cmp ax, cx 8344 0000A299 7515 jne ww13 ; if disk full 8345 0000A29B 31D2 xor dx, dx ; next time write from xxxx:0 8346 0000A29D 81C6E00F add si, 0FE0h ; update segment pointer 8347 0000A2A1 294E06 sub word [bp+6], cx 8348 0000A2A4 9F lahf 8349 0000A2A5 805E0800 sbb byte [bp+8], 0 8350 0000A2A9 75D0 jnz ww11 ; if more to go 8351 0000A2AB 9E sahf 8352 0000A2AC 75CD jnz ww11 ; ditto 8353 0000A2AE EB12 jmp short ww14 ; done 8354 8355 ww13: 8356 0000A2B0 BA[A67D] mov dx, diskful 8357 0000A2B3 E83A1B call putsz ; print string 8358 0000A2B6 E80900 call ww14 ; close file 8359 8360 0000A2B9 B441 mov ah, 41h ; unlink file 8361 0000A2BB BA8000 mov dx, DTA 8362 doscall 2080 0000A2BE E8DABA <1> call _doscall 8363 0000A2C1 C3 retn 8364 8365 ; Close the file. 8366 ww14: 8367 0000A2C2 B43E mov ah, 3Eh ; close file 8368 0000A2C4 CD21 int 21h 8369 0000A2C6 C3 retn 8370 8371 ; Error opening file. This is also called by the load command. 8372 ww15: 8373 0000A2C7 83F802 cmp ax, byte 2 8374 0000A2CA BA[CC7D] mov dx, doserr2 ; File not found 8375 0000A2CD 7421 je ww16 8376 0000A2CF 83F803 cmp ax, byte 3 8377 0000A2D2 BA[DD7D] mov dx, doserr3 ; Path not found 8378 0000A2D5 7419 je ww16 8379 0000A2D7 83F805 cmp ax, byte 5 8380 0000A2DA BA[EE7D] mov dx, doserr5 ; Access denied 8381 0000A2DD 7411 je ww16 8382 0000A2DF 83F808 cmp ax, byte 8 8383 0000A2E2 BA[FE7D] mov dx, doserr8 ; Insufficient memory 8384 0000A2E5 7409 je ww16 8385 0000A2E7 BF[B87D] mov di, openerr1 8386 0000A2EA E84D17 call hexword 8387 0000A2ED BA[B27D] mov dx, openerr ; Error ____ opening file 8388 ww16: 8389 0000A2F0 E9FD1A jmp putsz 8390 8391 8392 %ifn _EMS 8393 xx: equ error 8394 %else 8395 ; X commands - manipulate EMS memory. 8396 ; 8397 ; Reference: 8398 ; http://www.nondot.org/sabre/os/files/MemManagement/LIMEMS41.txt 8399 8400 0000A2F3 3C3F xx: cmp al, '?' 8401 0000A2F5 741F je xhelp ; if a call for help 8402 0000A2F7 0C20 or al, TOLOWER 8403 0000A2F9 3C61 cmp al, 'a' 8404 0000A2FB 7423 je xa ; if XA command 8405 0000A2FD 3C64 cmp al, 'd' 8406 0000A2FF 7446 je xd ; if XD command 8407 0000A301 3C6D cmp al, 'm' 8408 0000A303 7503E97E00 je xm ; if XM command 8409 0000A308 3C72 cmp al, 'r' 8410 0000A30A 7459 je xr ; if XR command 8411 0000A30C 3C73 cmp al, 's' 8412 0000A30E 7503E9A900 je xs ; if XS command 8413 0000A313 E9FC01 jmp error 8414 8415 0000A316 AC xhelp: lodsb 8416 0000A317 E83516 call chkeol 8417 0000A31A BA[F75D] mov dx, msg.xhelp 8418 0000A31D E9D01A jmp putsz ; print string and return 8419 8420 ; XA - Allocate EMS. 8421 0000A320 E89201 xa: call emschk 8422 0000A323 E83A16 call skipcomma 8423 0000A326 E8F014 call getword ; get argument into DX 8424 0000A329 E82316 call chkeol ; expect end of line here 8425 0000A32C 89D3 mov bx, dx 8426 8427 0000A32E B8005A mov ax, 5A00h ; use the EMS 4.0 version to alloc 0 pages 8428 0000A331 85DB test bx, bx 8429 0000A333 7402 jz short .nullcnt 8430 0000A335 B443 mov ah, 43h ; allocate handle 8431 .nullcnt: 8432 0000A337 E83C01 call emscall 8433 0000A33A 92 xchg ax, dx ; mov ax, dx 8434 0000A33B BF[0E7F] mov di, xaans1 8435 0000A33E E8F916 call hexword 8436 0000A341 BA[FD7E] mov dx, xaans 8437 0000A344 E9A91A jmp putsz ; print string and return 8438 8439 ; XD - Deallocate EMS handle. 8440 0000A347 E86B01 xd: call emschk 8441 0000A34A E81316 call skipcomma 8442 0000A34D E8C914 call getword ; get argument into DX 8443 0000A350 E8FC15 call chkeol ; expect end of line here 8444 8445 0000A353 B445 mov ah, 45h ; deallocate handle 8446 0000A355 E81E01 call emscall 8447 0000A358 92 xchg ax, dx ; mov ax,dx 8448 0000A359 BF[1C7F] mov di, xdans1 8449 0000A35C E8DB16 call hexword 8450 0000A35F BA[157F] mov dx, xdans 8451 0000A362 E98B1A jmp putsz ; print string and return 8452 8453 ; XR - Reallocate EMS handle. 8454 0000A365 E84D01 xr: call emschk 8455 0000A368 E8F515 call skipcomma 8456 0000A36B E8AB14 call getword ; get handle argument into DX 8457 0000A36E 89D3 mov bx, dx 8458 0000A370 E8EE15 call skipcomm0 8459 0000A373 E8A314 call getword ; get count argument into DX 8460 0000A376 E8D615 call chkeol ; expect end of line here 8461 0000A379 87DA xchg bx, dx 8462 8463 0000A37B B451 mov ah, 51h ; reallocate handle 8464 0000A37D E8F600 call emscall 8465 0000A380 BA[2F7F] mov dx, xrans 8466 0000A383 E96A1A jmp putsz ; print string and return 8467 8468 ; XM - Map EMS memory to physical page. 8469 0000A386 E82C01 xm: call emschk 8470 0000A389 E8D415 call skipcomma 8471 0000A38C E88A14 call getword ; get logical page (FFFFh means unmap) 8472 0000A38F 89D3 mov bx, dx ; save it in BX 8473 0000A391 E8CD15 call skipcomm0 8474 0000A394 E89014 call getbyte ; get physical page (DL) 8475 0000A397 52 push dx 8476 0000A398 E8C615 call skipcomm0 8477 0000A39B E87B14 call getword ; get handle into DX 8478 0000A39E E8AE15 call chkeol ; expect end of line 8479 0000A3A1 58 pop ax ; recover physical page into AL 8480 0000A3A2 50 push ax 8481 0000A3A3 B444 mov ah, 44h ; function 5 - map memory 8482 0000A3A5 E8CE00 call emscall 8483 0000A3A8 BF[517F] mov di, xmans1 8484 0000A3AB 93 xchg ax, bx ; mov ax, bx 8485 0000A3AC E88B16 call hexword 8486 0000A3AF BF[6E7F] mov di, xmans2 8487 0000A3B2 58 pop ax 8488 0000A3B3 E88B16 call hexbyte 8489 0000A3B6 BA[447F] mov dx, xmans 8490 0000A3B9 E9341A jmp putsz ; print string and return 8491 8492 ; XS - Print EMS status. 8493 xs: 8494 0000A3BC E8F600 call emschk 8495 0000A3BF AC lodsb 8496 0000A3C0 E88C15 call chkeol ; no arguments allowed 8497 8498 ; First print out the handles and handle sizes. This can be done either 8499 ; by trying all possible handles or getting a handle table. 8500 ; The latter is preferable, if it fits in memory. 8501 0000A3C3 B44B mov ah, 4Bh ; function 12 - get handle count 8502 0000A3C5 E8AE00 call emscall 8503 0000A3C8 83FB42 cmp bx, (line_out_end-line_out)/4 8504 0000A3CB 762B jbe short xs3 ; if we can do it by getting the table 8505 0000A3CD 31D2 xor dx, dx ; handle 8506 8507 xs1: 8508 ; try EMS 4.0 function 5402h to get total number of handles 8509 0000A3CF B80254 mov ax, 5402h 8510 0000A3D2 E8CB00 call emscall.witherrors 8511 0000A3D5 89D9 mov cx, bx ; cx = number of handles 8512 0000A3D7 7403 jz @F 8513 8514 0000A3D9 B9FF00 mov cx, 0FFh ; total number of handles (assumed) 8515 ; this does not match the prior code here, 8516 ; which used 100h handles assuming that 8517 ; 0FFh is the last valid handle number. 8518 ; however, if we assume that there are 0FFh 8519 ; valid handles then the last number is 0FEh! 8520 @@: 8521 8522 0000A3DC B44C mov ah, 4Ch ; function 13 - get handle pages 8523 0000A3DE E8BF00 call emscall.witherrors 8524 0000A3E1 750D jnz short .err 8525 0000A3E3 93 xchg ax, bx ; mov ax,bx 8526 0000A3E4 E8E200 call hndlshow 8527 .cont: 8528 0000A3E7 42 inc dx ; increment handle number to access 8529 0000A3E8 7404 jz @F ; (if 0000h handles, do not loop forever) 8530 0000A3EA 39CA cmp dx, cx ; end of the loop ? 8531 0000A3EC 72E1 jb short xs1 ; if more to be done --> 8532 @@: 8533 0000A3EE EB1F jmp short xs5 ; done with this part 8534 8535 .err: 8536 0000A3F0 80FC83 cmp ah, 83h ; no such handle? 8537 0000A3F3 74F2 je short .cont ; just skip --> 8538 0000A3F5 E98300 jmp emscall.errorhandle ; if other error --> 8539 8540 ; Get the information in tabular form. 8541 xs3: 8542 0000A3F8 B44D mov ah, 4Dh ; function 14 - get all handle pages 8543 0000A3FA BF[0E08] mov di, line_out 8544 0000A3FD E87600 call emscall 8545 0000A400 85DB test bx, bx 8546 0000A402 740B jz short xs5 8547 0000A404 89FE mov si, di 8548 xs4: 8549 0000A406 AD lodsw 8550 0000A407 92 xchg ax, dx 8551 0000A408 AD lodsw 8552 0000A409 E8BD00 call hndlshow 8553 0000A40C 4B dec bx 8554 0000A40D 75F7 jnz short xs4 ; if more to go 8555 8556 xs5: 8557 0000A40F BA[4574] mov dx, crlf 8558 0000A412 E8DB19 call putsz ; print string 8559 8560 ; Next print the mappable physical address array. 8561 ; The size of the array shouldn't be a problem. 8562 0000A415 B80058 mov ax, 5800h ; function 25 - get mappable phys. address array 8563 0000A418 BF[0E08] mov di, line_out ; address to put array 8564 0000A41B E85800 call emscall 8565 0000A41E BA[F67F] mov dx, xsnopgs 8566 0000A421 E328 jcxz xs7 ; NO mappable pages! 8567 8568 0000A423 89FE mov si, di 8569 xs6: 8570 0000A425 51 push cx 8571 0000A426 AD lodsw 8572 0000A427 BF[B27F] mov di, xsstr2b 8573 0000A42A E80D16 call hexword 8574 0000A42D AD lodsw 8575 0000A42E BF[A57F] mov di, xsstr2a 8576 0000A431 E80D16 call hexbyte 8577 0000A434 BA[9A7F] mov dx, xsstr2 8578 0000A437 E8B619 call putsz ; print string 8579 0000A43A 59 pop cx ; end of loop 8580 0000A43B F6C101 test cl, 1 8581 0000A43E 7406 jz short xs_nonl 8582 0000A440 BA[4574] mov dx, crlf ; blank line 8583 0000A443 E8AA19 call putsz ; print string 8584 xs_nonl: 8585 0000A446 E2DD loop xs6 8586 0000A448 BA[4574] mov dx, crlf ; blank line 8587 xs7: 8588 0000A44B E8A219 call putsz ; print string 8589 8590 ; Finally, print the cumulative totals. 8591 0000A44E B442 mov ah, 42h ; function 3 - get unallocated page count 8592 0000A450 E82300 call emscall 8593 0000A453 89D0 mov ax, dx ; total pages available 8594 0000A455 29D8 sub ax, bx ; number of pages allocated 8595 0000A457 BB[EC7F] mov bx, xsstrpg 8596 0000A45A E88300 call sumshow ; print the line 8597 0000A45D B44B mov ah, 4Bh ; function 12 - get handle count 8598 0000A45F E81400 call emscall 8599 0000A462 53 push bx ; number of handles allocated 8600 8601 ; try EMS 4.0 function 5402h to get total number of handles 8602 0000A463 B80254 mov ax, 5402h 8603 0000A466 E83700 call emscall.witherrors ; don't use emscall, this function may fail! 8604 0000A469 89DA mov dx, bx 8605 0000A46B 7403 jz @F 8606 8607 0000A46D BAFF00 mov dx, 0FFh ; total number of handles 8608 @@: 8609 0000A470 58 pop ax ; ax = number of handles allocated 8610 0000A471 BB[F07F] mov bx, xsstrhd 8611 0000A474 EB6A jmp sumshow ; print the line 8612 8613 ; Call EMS 8614 emscall: 8615 0000A476 E82700 call .witherrors 8616 0000A479 7439 jz short .ret ; return if OK 8617 .errorhandle: 8618 0000A47B 88E0 mov al, ah 8619 0000A47D 3C8B cmp al, 8Bh 8620 0000A47F 7F0D jg short .ce2 ; if out of range (signed comparison intended) 8621 0000A481 98 cbw 8622 0000A482 89C3 mov bx, ax 8623 0000A484 D1E3 shl bx, 1 8624 0000A486 8B97[DA7F] mov dx, word [emserrs+100h+bx] 8625 0000A48A 85D2 test dx, dx 8626 0000A48C 7538 jnz short .ce4 ; if there's a word there 8627 .ce2: 8628 0000A48E BA[F27E] mov dx, emserrx 8629 0000A491 E85C19 call putsz 8630 0000A494 BF[0E08] mov di, line_out 8631 0000A497 E8A715 call hexbyte 8632 0000A49A E8D515 call putsline_crlf 8633 0000A49D E9605B jmp cmd3 ; quit 8634 8635 .witherrors: 8636 %if _PM 8637 0000A4A0 E85AED call ispm 8638 0000A4A3 750B jnz short .rm 8639 subcpu 286 8640 0000A4A5 36FF36[A60A] push word [ss:pspdbg] 8641 0000A4AA 6A67 push 67h 8642 0000A4AC E8A0EE call intcall 8643 0000A4AF A9 db __TEST_IMM16 ; (skip int opcode) 8644 subcpureset 8645 .rm: 8646 %endif 8647 0000A4B0 CD67 int 67h 8648 0000A4B2 84E4 test ah, ah 8649 .ret: 8650 emschk.ret: 8651 0000A4B4 C3 retn 8652 8653 8654 ; Check for EMS 8655 ; maybe should disable this while bootloaded ? 8656 emschk: 8657 0000A4B5 B067 mov al, 67h 8658 0000A4B7 E81A2D call intchk ; ZR if offset = -1 or segment = 0 8659 ; CHG: ax, dx, bx 8660 0000A4BA 7407 jz .failed 8661 0000A4BC B446 mov ah, 46h 8662 0000A4BE E8DFFF call emscall.witherrors ; get version 8663 0000A4C1 74F1 jz short .ret ; success --> 8664 .failed: 8665 0000A4C3 BA[147E] mov dx, emsnot 8666 emscall.ce4: 8667 0000A4C6 E9D85F jmp prnquit ; otherwise abort with message --> 8668 8669 ; HNDLSHOW - Print XS line giving the handle and pages allocated. 8670 ; 8671 ; Entry DX Handle 8672 ; AX Number of pages 8673 ; 8674 ; Exit Line printed 8675 ; 8676 ; Uses ax, di 8677 hndlshow: 8678 0000A4C9 BF[837F] mov di, xsstr1b 8679 0000A4CC E86B15 call hexword 8680 0000A4CF 89D0 mov ax, dx 8681 0000A4D1 BF[7A7F] mov di, xsstr1a 8682 0000A4D4 E86315 call hexword 8683 0000A4D7 52 push dx 8684 0000A4D8 BA[737F] mov dx, xsstr1 8685 0000A4DB E81219 call putsz ; print string 8686 0000A4DE 5A pop dx 8687 0000A4DF C3 retn 8688 8689 ; SUMSHOW - Print summary line for XS command. 8690 ; 8691 ; Entry AX Number of xxxx's that have been used 8692 ; DX Total number of xxxx's 8693 ; BX Name of xxxx 8694 ; 8695 ; Exit String printed 8696 ; 8697 ; Uses AX, CX, DX, DI 8698 sumshow: 8699 0000A4E0 BF[B97F] mov di, xsstr3 8700 0000A4E3 57 push di 8701 0000A4E4 E81600 call trimhex 8702 0000A4E7 92 xchg ax, dx ; mov ax,dx 8703 0000A4E8 BF[C97F] mov di, xsstr3a 8704 0000A4EB E80F00 call trimhex 8705 0000A4EE 5A pop dx ; mov dx,xsstr3 8706 0000A4EF E8FE18 call putsz ; print string 8707 0000A4F2 89DA mov dx, bx 8708 0000A4F4 E8F918 call putsz ; print string 8709 0000A4F7 BA[D37F] mov dx, xsstr4 8710 0000A4FA E9F318 jmp putsz ; print string and return 8711 8712 ; TRIMHEX - Print word without leading zeroes. 8713 ; 8714 ; Entry AX Number to print 8715 ; DI Where to print it 8716 ; 8717 ; Uses AX, CX, DI. 8718 trimhex: 8719 0000A4FD E83A15 call hexword 8720 0000A500 83EF04 sub di, 4 ; back up DI to start of word 8721 0000A503 B90300 mov cx, 3 8722 0000A506 B030 mov al, '0' 8723 .loop: 8724 0000A508 AE scasb 8725 0000A509 7506 jne .done ; return if not a '0' 8726 0000A50B C645FF20 mov byte [di-1], ' ' 8727 0000A50F E2F7 loop .loop 8728 .done: 8729 0000A511 C3 retn 8730 %endif ; _EMS 8731 8732 ; Error handlers. 8733 error: 8734 0000A512 16 push ss 8735 0000A513 07 pop es 8736 0000A514 16 push ss 8737 0000A515 1F pop ds 8738 0000A516 89F1 mov cx, si 8739 0000A518 81E9[0300] sub cx, line_in+3 8740 0000A51C 81F90001 cmp cx, 256 8741 0000A520 7705 ja .invalid 8742 0000A522 030E[EA0A] add cx, word [promptlen]; number of spaces to skip 8743 0000A526 A9 db __TEST_IMM16 ; (skip xor) 8744 .invalid: 8745 0000A527 31C9 xor cx, cx ; if we're really messed up 8746 0000A529 8B26[9E0A] mov sp, [throwsp] 8747 0000A52D FF26[9C0A] jmp near [throwret] 8748 ; INP: cx = number of spaces to indent 8749 8750 ; This is the default address in throwret. 8751 ; Display the error, then jump to errret. 8752 errhandler: 8753 0000A531 E86423 call get_columns ; ax = columns 8754 .: 8755 0000A534 29C1 sub cx, ax 8756 0000A536 73FC jnc . 8757 0000A538 01C1 add cx, ax 8758 0000A53A 7407 jz err2 8759 0000A53C B020 mov al, 32 8760 .loop: 8761 0000A53E E8D218 call putc 8762 0000A541 E2FB loop .loop 8763 err2: 8764 0000A543 BA[3D74] mov dx, errcarat 8765 0000A546 E8A718 call putsz ; print string 8766 0000A549 B8FF01 mov ax, 01FFh 8767 0000A54C E80A00 call setrc 8768 0000A54F C706[DA0B][1404] mov word [lastcmd], dmycmd 8769 ; cancel command repetition 8770 0000A555 FF26[9A0A] jmp near [errret] ; return to the prompt (cmd3, aa01) 8771 8772 8773 setrc: 8774 0000A559 833E[F00A]00 cmp word [rc], 0 8775 0000A55E 7503 jne .ret 8776 0000A560 A3[F00A] mov word [rc], ax 8777 .ret: 8778 0000A563 C3 retn 8779 8780 8781 ; Terminate the attached process, if any 8782 ; 8783 ; OUT: NZ if now no process attached 8784 ; ZR if still a process attached, 8785 ; ie we failed to terminate this one 8786 terminate_attached_process: 8787 0000A564 F606[9E00]80 testopt [internalflags], attachedterm 8788 0000A569 7535 jnz @F 8789 8790 0000A56B 8026[A10C]FC clropt [reg_efl], 300h ; clear TF and IF 8791 0000A570 8C0E[900C] mov word [reg_cs], cs 8792 0000A574 C706[9C0C][4C9C] mov word [reg_eip], terminate_00 8793 0000A57A 50 push ax ; (dummy to take space for return address) 8794 0000A57B 8C16[8C0C] mov word [reg_ss], ss 8795 0000A57F 8926[740C] mov word [reg_esp], sp ; save current ss:sp 8796 0000A583 58 pop ax ; (discard) 8797 0000A584 31C0 xor ax, ax 8798 0000A586 A3[9E0C] mov word [reg_eip+2], ax 8799 0000A589 A3[760C] mov word [reg_esp+2], ax 8800 %if _PM 8801 0000A58C A3[880C] mov word [reg_es], ax 8802 0000A58F A3[840C] mov word [reg_ds], ax 8803 0000A592 A3[940C] mov word [reg_fs], ax 8804 0000A595 A3[980C] mov word [reg_gs], ax ; insure valid segregs in PM 8805 %endif 8806 0000A598 E8429D call run 8807 ; The dummy stack space above is to hold the return address 8808 ; of this call. The debugger stack is used by this run. 8809 8810 0000A59B F606[9E00]80 testopt [internalflags], attachedterm 8811 @@: 8812 0000A5A0 C3 retn 8813 8814 8815 ;--- this is called by "run" 8816 ;--- better don't use INTs inside 8817 ;--- set debuggee's INT 23/24 8818 8819 ; Low-level functions to reset to debuggee's interrupt vectors 23h/24h 8820 ; INP: - 8821 ; OUT: - 8822 ; CHG: bx, (e)dx, cx, ax 8823 ; STT: ds = our segment 8824 ; Do not use Int21, even if not in InDOS mode 8825 setint2324: 8826 %if _BOOTLDR 8827 0000A5A1 F606[9D00]40 testopt [internalflags], nodosloaded 8828 0000A5A6 751C jnz .ret ; don't touch int23/24 --> 8829 %endif 8830 %if _PM 8831 0000A5A8 E852EC call ispm 8832 0000A5AB 7418 jz .pm 8833 %endif 8834 0000A5AD 06 push es 8835 0000A5AE 57 push di 8836 0000A5AF 56 push si 8837 8838 0000A5B0 31FF xor di, di 8839 0000A5B2 8EC7 mov es, di 8840 0000A5B4 BF8C00 mov di, 23h *4 8841 0000A5B7 BE[A80A] mov si, run2324 8842 0000A5BA A5 movsw 8843 0000A5BB A5 movsw 8844 0000A5BC A5 movsw 8845 0000A5BD A5 movsw 8846 8847 %if _PM 8848 0000A5BE E8A22F call hook2F 8849 %endif 8850 0000A5C1 5E pop si 8851 0000A5C2 5F pop di 8852 0000A5C3 07 pop es 8853 .ret: 8854 0000A5C4 C3 retn 8855 %if _PM 8856 .pm: 8857 0000A5C5 56 push si 8858 0000A5C6 BE[A80A] mov si, run2324 8859 0000A5C9 BB2302 mov bx, 0223h 8860 .loop: 8861 0000A5CC 66 _386_o32 ; mov edx, dword [si+0] 8862 0000A5CD 8B14 mov dx, word [si+0] 8863 0000A5CF 8B4C04 mov cx, word [si+4] 8864 0000A5D2 B80502 mov ax, 0205h 8865 0000A5D5 CD31 int 31h 8866 0000A5D7 83C606 add si, 6 8867 0000A5DA FEC3 inc bl 8868 0000A5DC FECF dec bh 8869 0000A5DE 75EC jnz .loop 8870 0000A5E0 5E pop si 8871 0000A5E1 C3 retn 8872 %endif 8873 8874 ; Low-level functions to save debuggee's interrupt vectors 23h/24h 8875 ; and set our interrupt vectors instead 8876 ; INP: - 8877 ; OUT: - 8878 ; CHG: - 8879 ; STT: ds = our segment 8880 ; Do not use Int21, even if not in InDOS mode 8881 getint2324: 8882 %if _BOOTLDR 8883 0000A5E2 F606[9D00]40 testopt [internalflags], nodosloaded 8884 0000A5E7 752A jnz .ret ; don't touch int23/24 --> 8885 %endif 8886 %if _PM 8887 0000A5E9 E811EC call ispm 8888 0000A5EC 7426 jz .pm 8889 %endif 8890 0000A5EE 56 push si 8891 0000A5EF 57 push di 8892 0000A5F0 06 push es 8893 8894 0000A5F1 1E push ds 8895 0000A5F2 07 pop es 8896 0000A5F3 31FF xor di, di 8897 0000A5F5 8EDF mov ds, di 8898 0000A5F7 BF[A80A] mov di, run2324 8899 0000A5FA BE8C00 mov si, 23h *4 8900 0000A5FD 56 push si 8901 0000A5FE A5 movsw ; save interrupt vector 23h 8902 0000A5FF A5 movsw 8903 0000A600 A5 movsw ; save interrupt vector 24h 8904 0000A601 A5 movsw 8905 0000A602 5F pop di 8906 0000A603 06 push es 8907 0000A604 1F pop ds 8908 0000A605 31F6 xor si, si 8909 0000A607 8EC6 mov es, si 8910 0000A609 BE0E00 mov si, CCIV 8911 0000A60C A5 movsw 8912 0000A60D A5 movsw 8913 0000A60E A5 movsw 8914 0000A60F A5 movsw 8915 8916 0000A610 07 pop es 8917 0000A611 5F pop di 8918 0000A612 5E pop si 8919 .ret: 8920 0000A613 C3 retn 8921 %if _PM 8922 subcpu 286 8923 .pm: 8924 0000A614 66 _386_o32 8925 0000A615 60 pusha 8926 0000A616 BF[A80A] mov di, run2324 8927 0000A619 BB2302 mov bx, 0223h 8928 .loop: 8929 0000A61C B80402 mov ax, 0204h 8930 0000A61F CD31 int 31h 8931 0000A621 66 _386_o32 ; mov dword [di+0], edx 8932 0000A622 8915 mov word [di+0], dx 8933 0000A624 894D04 mov word [di+4], cx 8934 0000A627 83C706 add di, byte 6 8935 0000A62A FEC3 inc bl 8936 0000A62C FECF dec bh 8937 0000A62E 75EC jnz .loop 8938 %if _ONLYNON386 8939 db __TEST_IMM8 ; (skip pusha) 8940 %else 8941 0000A630 A9 db __TEST_IMM16 ; (skip pushad) 8942 %endif 8943 8944 restoredbgi2324: 8945 setdbgi2324: 8946 0000A631 66 _386_o32 8947 0000A632 60 pusha 8948 0000A633 BE[B40A] mov si, dbg2324 8949 0000A636 BB2302 mov bx, 0223h 8950 0000A639 6631D2 _386 xor edx, edx 8951 .loop: 8952 0000A63C AD lodsw 8953 0000A63D 89C2 mov dx, ax 8954 0000A63F 8B0E[D688] mov cx, word [cssel] 8955 0000A643 B80502 mov ax, 0205h 8956 0000A646 CD31 int 31h 8957 0000A648 FEC3 inc bl 8958 0000A64A FECF dec bh 8959 0000A64C 75EE jnz .loop 8960 0000A64E 66 _386_o32 8961 0000A64F 61 popa 8962 0000A650 C3 retn 8963 subcpureset 8964 %endif 8965 8966 %if 0 8967 The next three subroutines concern the handling of Int23 and 24. 8968 These interrupt vectors are saved and restored when running the 8969 child process, but are not active when DEBUG itself is running. 8970 It is still useful for the programmer to be able to check where Int23 8971 and 24 point, so these values are copied into the interrupt table 8972 during parts of the C, D, (DX, DI,) E, M, and S commands, so that 8973 they appear to be in effect. The E command also copies these values 8974 back. 8975 8976 Between calls to dohack and unhack, there should be no calls to DOS, 8977 so that there is no possibility of these vectors being used when 8978 DEBUG itself is running. 8979 8980 ; As long as no DOS is loaded anyway, Int23 and Int24 won't be touched 8981 by us, so the whole hack is unnecessary and will be skipped. 8982 %endif 8983 8984 ; PREPHACK - Set up for interrupt vector substitution. 8985 ; Entry es = cs 8986 prephack: 8987 0000A651 803E[C40A]00 cmp byte [hakstat], 0 8988 0000A656 7509 jne .err ; if hack status error --> 8989 0000A658 57 push di 8990 0000A659 BF[BC0A] mov di, sav2324 ; debugger's Int2324 8991 0000A65C E80B00 call prehak1 8992 0000A65F 5F pop di 8993 0000A660 C3 retn 8994 8995 .err: 8996 0000A661 52 push dx 8997 0000A662 BA[FE7C] mov dx, ph_msg 8998 0000A665 E88817 call putsz ; display error 8999 0000A668 5A pop dx 9000 0000A669 C3 retn 9001 9002 ; INP: di-> saved interrupt vectors 9003 ; OUT: - 9004 ; CHG: - 9005 prehak1: 9006 %if _PM 9007 0000A66A E890EB call ispm 9008 0000A66D 740F jz .pm ; nothing to do 9009 %endif 9010 0000A66F 1E push ds 9011 0000A670 56 push si 9012 0000A671 31F6 xor si, si 9013 0000A673 8EDE mov ds, si 9014 0000A675 BE8C00 mov si, 23h *4 9015 0000A678 A5 movsw 9016 0000A679 A5 movsw 9017 0000A67A A5 movsw 9018 0000A67B A5 movsw 9019 0000A67C 5E pop si 9020 0000A67D 1F pop ds 9021 .pm: 9022 0000A67E C3 retn 9023 9024 9025 ; DOHACK - Fake the interrupt vectors 23h and 24h to debuggee's 9026 ; UNHACK - Restore interrupt vectors 23h and 24h to our values 9027 ; It's OK to do either of these twice in a row. 9028 ; In particular, the S command may do unhack twice in a row. 9029 ; INP: ds = our segment 9030 ; OUT: es = our segment 9031 ; CHG: - 9032 ; STT: Do not use Int21 9033 dohack: 9034 0000A67F 16 push ss 9035 0000A680 07 pop es 9036 %if _BOOTLDR 9037 0000A681 F606[9D00]40 testopt [internalflags], nodosloaded 9038 0000A686 7555 jnz unhack.ret ; nothing to hack --> 9039 %endif 9040 0000A688 56 push si 9041 0000A689 C606[C40A]01 mov byte [hakstat], 1 9042 0000A68E BE[A80A] mov si, run2324 ; debuggee's interrupt vectors 9043 %if _PM 9044 0000A691 E869EB call ispm 9045 0000A694 7537 jnz unhack.common 9046 subcpu 286 9047 0000A696 66 _386_o32 9048 0000A697 60 pusha 9049 0000A698 BB2302 mov bx, 0223h 9050 .pm_loop: 9051 0000A69B 66 _386_o32 9052 0000A69C 8B14 mov dx, word [si+0+0] 9053 0000A69E 8B4C04 mov cx, word [si+0+4] 9054 0000A6A1 B80502 mov ax, 205h 9055 0000A6A4 CD31 int 31h 9056 0000A6A6 83C606 add si, byte 6 9057 0000A6A9 FEC3 inc bl 9058 0000A6AB FECF dec bh 9059 0000A6AD 75EC jnz .pm_loop 9060 0000A6AF 66 _386_o32 9061 0000A6B0 61 popa 9062 0000A6B1 5E pop si 9063 0000A6B2 C3 retn 9064 subcpureset 9065 %else 9066 jmp short unhack.common 9067 %endif 9068 9069 unhack: 9070 0000A6B3 16 push ss 9071 0000A6B4 07 pop es 9072 %if _BOOTLDR 9073 0000A6B5 F606[9D00]40 testopt [internalflags], nodosloaded 9074 0000A6BA 7521 jnz .ret ; nothing to hack --> 9075 %endif 9076 0000A6BC C606[C40A]00 mov byte [hakstat], 0 9077 %if _PM 9078 0000A6C1 E839EB call ispm 9079 0000A6C4 7503E968FF jz restoredbgi2324 9080 %endif 9081 0000A6C9 56 push si 9082 0000A6CA BE[BC0A] mov si, sav2324 ; debugger's interrupt vectors 9083 .common: 9084 0000A6CD 57 push di 9085 0000A6CE 06 push es 9086 0000A6CF 31FF xor di, di 9087 0000A6D1 8EC7 mov es, di 9088 0000A6D3 BF8C00 mov di, 23h *4 9089 0000A6D6 A5 movsw 9090 0000A6D7 A5 movsw 9091 0000A6D8 A5 movsw 9092 0000A6D9 A5 movsw 9093 0000A6DA 07 pop es 9094 0000A6DB 5F pop di 9095 0000A6DC 5E pop si 9096 .ret: 9097 0000A6DD C3 retn 9098 9099 9100 ; OUT: NZ if InDOS mode 9101 ; ZR if not 9102 ; CHG: - 9103 ; STT: ss = ds 9104 InDos: 9105 %if _BOOTLDR 9106 0000A6DE F606[9D00]40 testopt [internalflags], nodosloaded 9107 0000A6E3 7517 jnz .return ; always "in DOS" --> 9108 %endif 9109 0000A6E5 F606[7C00]08 testopt [options], fakeindos 9110 0000A6EA 7510 jnz .return ; faking InDOS on anyway --> 9111 .real_indos: 9112 0000A6EC 1E push ds 9113 0000A6ED 56 push si 9114 0000A6EE BE[D40A] mov si, pInDOS + so16aSegSel 9115 0000A6F1 E80900 call update_dosdata_segment 9116 0000A6F4 C574FE lds si, [si - so16aSegSel] 9117 0000A6F7 803C00 cmp byte [si], 0 9118 0000A6FA 5E pop si 9119 0000A6FB 1F pop ds 9120 .return: 9121 0000A6FC C3 retn 9122 9123 9124 ; INP: si -> word seg or sel, word segment, word selector 9125 update_dosdata_segment: 9126 0000A6FD F606[A300]20 testopt [internalflags2], dif2_int31_segment 9127 0000A702 742C jz .ret 9128 0000A704 52 push dx 9129 0000A705 50 push ax 9130 0000A706 53 push bx 9131 0000A707 B031 mov al, 31h 9132 0000A709 E88F2A call get_86m_interrupt_handler_no_dos 9133 %if _PM 9134 0000A70C 395402 cmp word [si + soaSegment], dx 9135 0000A70F 7419 je @F 9136 9137 0000A711 E8E9EA call ispm 9138 0000A714 750E jnz .realmode 9139 9140 0000A716 89D3 mov bx, dx 9141 0000A718 B80200 mov ax, 0002h 9142 0000A71B CD31 int 31h 9143 9144 0000A71D 8904 mov word [si + soaSegSel], ax 9145 0000A71F 894404 mov word [si + soaSelector], ax 9146 0000A722 EB06 jmp @F 9147 9148 .realmode: 9149 0000A724 8914 mov word [si + soaSegSel], dx 9150 0000A726 83640400 and word [si + soaSelector], 0 9151 9152 @@: 9153 0000A72A 895402 mov word [si + soaSegment], dx 9154 0000A72D 5B pop bx 9155 0000A72E 58 pop ax 9156 %else 9157 pop bx 9158 pop ax 9159 mov word [si + soaSegSel], dx 9160 %endif 9161 0000A72F 5A pop dx 9162 .ret: 9163 0000A730 C3 retn 9164 9165 9166 ; PARSECM - Parse command line for C and M commands. 9167 ; Entry AL First nonwhite character of parameters 9168 ; SI Address of the character after that 9169 ; Exit DS:ESI Address from first parameter 9170 ; ES:EDI Address from second parameter 9171 ; ECX Length of address range minus one 9172 ; [bAddr32] Set if any high word non-zero 9173 9174 parsecm: 9175 0000A731 E81DFF call prephack 9176 0000A734 8B1E[840C] mov bx, word [reg_ds] ; get source range 9177 0000A738 31C9 xor cx, cx 9178 0000A73A E83101 call getrange ; get address range into bx:(e)dx bx:(e)cx 9179 0000A73D 53 push bx ; save segment first address 9180 0000A73E E82012 call skipcomm0 9181 0000A741 8B1E[840C] mov bx, word [reg_ds] 9182 0000A745 66 _386_PM_o32 ; sub ecx, edx 9183 0000A746 29D1 sub cx, dx ; number of bytes minus one 9184 0000A748 66 _386_PM_o32 ; push edx 9185 0000A749 52 push dx 9186 0000A74A 66 _386_PM_o32 ; push ecx 9187 0000A74B 51 push cx 9188 %if _PM 9189 0000A74C 8A0E[DC88] mov cl, byte [bAddr32] 9190 0000A750 51 push cx 9191 0000A751 E8F201 call getaddr ; get destination address into bx:edx 9192 0000A754 59 pop cx 9193 0000A755 080E[DC88] or byte [bAddr32], cl ; if either is 32-bit, handle both as 32-bit 9194 %else 9195 call getaddr ; get destination address into bx:dx 9196 %endif 9197 0000A759 66 _386_PM_o32 9198 0000A75A 59 pop cx ; pop ecx 9199 0000A75B 66 _386_PM_o32 ; mov edi, edx 9200 0000A75C 89D7 mov di, dx 9201 0000A75E 66 _386_PM_o32 9202 0000A75F 01CA add dx, cx ; add edx, ecx 9203 0000A761 7209 jc short errorj7 ; if it wrapped around 9204 0000A763 E8E911 call chkeol ; expect end of line 9205 0000A766 8EC3 mov es, bx 9206 0000A768 66 _386_PM_o32 ; pop esi 9207 0000A769 5E pop si 9208 0000A76A 1F pop ds 9209 0000A76B C3 retn 9210 9211 errorj7: 9212 0000A76C E9A3FD jmp error 9213 9214 ; PARSELW - Parse command line for L and W commands. 9215 ; 9216 ; Entry AL First nonwhite character of parameters 9217 ; SI Address of the character after that 9218 ; 9219 ; Exit If there is at most one argument (program load/write), then the 9220 ; zero flag is set, and registers are set as follows: 9221 ; bx:(e)dx Transfer address 9222 ; 9223 ; If there are more arguments (absolute disk read/write), then the 9224 ; zero flag is clear, and registers are set as follows: 9225 ; 9226 ; DOS versions prior to 3.31: 9227 ; AL Drive number 9228 ; CX Number of sectors to read 9229 ; DX Beginning logical sector number 9230 ; DS:BX Transfer address 9231 ; 9232 ; Later DOS versions: 9233 ; AL Drive number 9234 ; BX Offset of packet 9235 ; CX 0FFFFh 9236 9237 usesection lDEBUG_DATA_ENTRY 9238 align 4, db 0 9239 00009080 00000000 packet: dd 0 ; sector number 9240 00009084 0000 dw 0 ; number of sectors to read 9241 00009086 00000000 dd 0 ; transfer address Segm:OOOO 9242 %if _PM 9243 0000908A 0000 dw 0 ; transfer address might be Segm:OOOOOOOO! 9244 %endif 9245 9246 usesection lDEBUG_CODE 9247 parselw: 9248 0000A76F 8B1E[900C] mov bx, word [reg_cs] ; default segment 9249 0000A773 6631D2 _386 xor edx, edx 9250 0000A776 BA0001 mov dx, 100h ; default offset 9251 0000A779 E8BE11 call iseol? 9252 0000A77C 7468 je plw2 ; if no arguments 9253 0000A77E E8C501 call getaddr ; get buffer address into bx:(e)dx 9254 0000A781 E8DD11 call skipcomm0 9255 0000A784 E8B311 call iseol? 9256 0000A787 745D je plw2 ; if only one argument 9257 0000A789 53 push bx ; save segment 9258 0000A78A 52 push dx ; save offset 9259 0000A78B BB8000 mov bx, 80h ; max number of sectors to read 9260 0000A78E F7DA neg dx 9261 0000A790 7406 jz plw1 ; if address is zero 9262 0000A792 B109 mov cl, 9 9263 0000A794 D3EA shr dx, cl ; max number of sectors which can be read 9264 0000A796 89D7 mov di, dx 9265 plw1: 9266 0000A798 803C3A cmp byte [si], ':' ; drive letter specification ? 9267 0000A79B 750F jne @F ; no --> 9268 9269 0000A79D 50 push ax 9270 0000A79E E8A2E4 call uppercase 9271 0000A7A1 2C41 sub al, 'A' 9272 0000A7A3 3C20 cmp al, 32 ; valid drive ? 9273 0000A7A5 88C2 mov dl, al ; put drive number 9274 0000A7A7 46 inc si ; -> past the colon 9275 0000A7A8 58 pop ax 9276 0000A7A9 7205 jb @FF ; got it --> 9277 0000A7AB 4E dec si ; -> at colon 9278 9279 @@: 9280 0000A7AC E87810 call getbyte ; get drive number (DL) 9281 0000A7AF A8 db __TEST_IMM8 ; (skip lodsb) 9282 @@: 9283 0000A7B0 AC lodsb 9284 0000A7B1 E8AD11 call skipcomm0 9285 0000A7B4 52 push dx 9286 0000A7B5 80C241 add dl, 'A' 9287 0000A7B8 8816[B979] mov byte [driveno], dl 9288 0000A7BC E8740B call getdword ; get relative sector number 9289 0000A7BF E89F11 call skipcomm0 9290 0000A7C2 53 push bx ; save sector number high 9291 0000A7C3 52 push dx ; save sector number low 9292 0000A7C4 56 push si ; in case we find an error 9293 0000A7C5 E85110 call getword ; get sector count 9294 0000A7C8 4A dec dx 9295 0000A7C9 39FA cmp dx, di 9296 0000A7CB 739F jae errorj7 ; if too many sectors 9297 0000A7CD 42 inc dx 9298 0000A7CE 89D1 mov cx, dx 9299 0000A7D0 E87C11 call chkeol ; expect end of line 9300 0000A7D3 F606[9C00]07 testopt [internalflags], oldpacket| newpacket| ntpacket 9301 0000A7D8 750D jnz plw3 ; if using a packet --> 9302 0000A7DA 5E pop si ; in case of error 9303 0000A7DB 5A pop dx ; get LoWord starting logical sector number 9304 0000A7DC 5B pop bx ; get HiWord 9305 0000A7DD 85DB test bx, bx ; just a 16-bit sector number possible 9306 0000A7DF 758B jnz errorj7 ; if too big 9307 0000A7E1 58 pop ax ; drive number 9308 0000A7E2 5B pop bx ; transfer buffer ofs 9309 0000A7E3 1F pop ds ; transfer buffer seg 9310 0000A7E4 85C9 test cx, cx ; NZ 9311 plw2: 9312 0000A7E6 C3 retn 9313 9314 ; disk I/O packet for Int25/Int26, Int21.7305, VDD 9315 plw3: 9316 0000A7E7 5B pop bx ; discard si 9317 0000A7E8 BB[8090] mov bx, packet 9318 0000A7EB 8F07 pop word [bx+0] ; LoWord sector number 9319 0000A7ED 8F4702 pop word [bx+2] ; HiWord sector number 9320 0000A7F0 894F04 mov word [bx+4], cx ; number of sectors 9321 0000A7F3 58 pop ax ; drive number 9322 0000A7F4 8F4706 pop word [bx+6] ; transfer address ofs 9323 0000A7F7 5A pop dx 9324 0000A7F8 31C9 xor cx, cx 9325 %if _PM 9326 0000A7FA E800EA call ispm 9327 0000A7FD 751B jnz plw3_1 9328 0000A7FF 803E[DA88]00 cmp byte [dpmi32], 0 9329 0000A804 7414 jz plw3_1 9330 [cpu 386] 9331 0000A806 89570A mov word [bx+10], dx ; save segment of transfer buffer 9332 0000A809 660FB7DB movzx ebx, bx 9333 0000A80D 66C1EA10 shr edx, 16 ; get HiWord(offset) 9334 0000A811 803E[DC88]01 cmp byte [bAddr32], 1 9335 0000A816 7402 jz plw3_1 9336 0000A818 31D2 xor dx, dx 9337 __CPU__ 9338 plw3_1: 9339 %endif 9340 0000A81A 895708 mov word [bx+8], dx ; transfer address seg 9341 0000A81D 49 dec cx ; NZ and make cx = -1 9342 0000A81E C3 retn 9343 9344 9345 %include "expr.asm" 9346 <1> 9347 <1> %if 0 9348 <1> 9349 <1> lDebug expression evaluator 9350 <1> 9351 <1> Copyright (C) 1995-2003 Paul Vojta 9352 <1> Copyright (C) 2008-2012 C. Masloch 9353 <1> 9354 <1> Usage of the works is permitted provided that this 9355 <1> instrument is retained with the works, so that any entity 9356 <1> that uses the works is notified of this instrument. 9357 <1> 9358 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9359 <1> 9360 <1> %endif 9361 <1> 9362 <1> 9363 <1> usesection lDEBUG_CODE 9364 <1> 9365 <1> ;--- get a valid offset for segment in BX 9366 <1> 9367 <1> ; INP: bx = segment 9368 <1> ; al = first character, si -> next character 9369 <1> ; ah = 1 if might be a segment or pointer 9370 <1> ; ah = 0 if must be an offset 9371 <1> ; OUT: CY if pointer type return, bx:dx = pointer 9372 <1> ; DebugX on a 386: 9373 <1> ; edx = offset (even if 16-bit PM/86M segment) 9374 <1> ; ah = 1 if a 32-bit segment, 0 if a 16-bit segment 9375 <1> ; DebugX otherwise: 9376 <1> ; dx = offset 9377 <1> ; ah = 0 9378 <1> ; Debug: 9379 <1> ; dx = offset 9380 <1> ; al, si refer to next part of command line 9381 <1> ; CHG: Debug: ah, DebugX: - 9382 <1> ; REM: The byte [bAddr32] is no longer changed by this 9383 <1> ; function. The caller has to use the status that 9384 <1> ; is returned in ah, if desired. 9385 <1> getofsforbx: 9386 0000A81F 51 <1> push cx ; preserve 9387 0000A820 53 <1> push bx ; preserve 9388 0000A821 88E5 <1> mov ch, ah ; ch = 0 if must be an offset 9389 <1> %if _PM 9390 0000A823 6631D2 <1> _386 xor edx, edx ; properly initialize high word 9391 0000A826 E83FB5 <1> call test_d_b_bit 9392 0000A829 740E <1> jz .16 ; 16-bit segment --> 9393 <1> [cpu 386] 9394 0000A82B E8050B <1> call getdword 9395 0000A82E 53 <1> push bx 9396 0000A82F 52 <1> push dx 9397 0000A830 665A <1> pop edx ; edx = 32-bit offset 9398 0000A832 E81300 <1> call checkpointer 9399 0000A835 B401 <1> mov ah, 1 ; return 32-bit offset flag 9400 0000A837 EB0B <1> jmp .ret_pop_NC 9401 <1> __CPU__ 9402 <1> %endif 9403 <1> 9404 <1> .16: 9405 0000A839 E8F70A <1> call getexpression 9406 0000A83C E80900 <1> call checkpointer 9407 0000A83F E8DC0F <1> call getword.checksignificantbits 9408 <1> %if _PM 9409 0000A842 B400 <1> mov ah, 0 ; return 16-bit offset flag 9410 <1> %endif 9411 <1> .ret_pop_NC: 9412 0000A844 5B <1> pop bx 9413 0000A845 59 <1> pop cx ; restore 9414 0000A846 F8 <1> clc 9415 0000A847 C3 <1> retn 9416 <1> 9417 <1> checkpointer: 9418 0000A848 84E4 <1> test ah, ah ; pointer type ? 9419 0000A84A 790E <1> jns .ret ; no --> 9420 0000A84C 84ED <1> test ch, ch ; can be a pointer or segment ? 9421 0000A84E 740B <1> jz errorj10 ; no --> 9422 0000A850 59 <1> pop cx ; discard a near return address 9423 0000A851 59 <1> pop cx ; discard bx 9424 0000A852 59 <1> pop cx ; restore cx 9425 <1> %if _PM 9426 0000A853 660FB7D2 <1> _386 movzx edx, dx ; edx = dx 9427 0000A857 B400 <1> mov ah, 0 ; always treat as 16-bit offset 9428 <1> %endif 9429 0000A859 F9 <1> stc ; return a pointer type 9430 0000A85A C3 <1> .ret: retn 9431 <1> 9432 0000A85B E9B4FC <1> errorj10: jmp error 9433 <1> 9434 <1> 9435 <1> ; GETRANGE - Get address range from input line. 9436 <1> ; a range consists of either start and end address 9437 <1> ; or a start address, a 'L' and a length. 9438 <1> ; Entry AL First character of range 9439 <1> ; SI Address of next character 9440 <1> ; BX Default segment to use 9441 <1> ; CX Default length to use (or 0 if not allowed) 9442 <1> ; Exit AL First character beyond range 9443 <1> ; SI Address of the character after that 9444 <1> ; BX:(E)DX First address in range 9445 <1> ; BX:(E)CX Last address in range 9446 <1> ; Uses AH 9447 <1> 9448 <1> getrangeX: 9449 <1> %if _PM 9450 0000A85E 8026[A700]FB <1> clropt [internalflags3], dif3_accept_getrange_0 9451 0000A863 660FB7C9 <1> _386 movzx ecx, cx 9452 <1> .ecx_and_0_valid: 9453 0000A867 66 <1> _386_PM_o32 9454 0000A868 51 <1> push cx 9455 0000A869 E8E000 <1> call getaddrX 9456 0000A86C EB0E <1> jmp short getrange.common 9457 <1> %else 9458 <1> .ecx_and_0_valid: equ getrange.ecx_and_0_valid 9459 <1> %endif 9460 <1> 9461 <1> getrange: 9462 0000A86E 8026[A700]FB <1> clropt [internalflags3], dif3_accept_getrange_0 9463 0000A873 660FB7C9 <1> _386_PM movzx ecx, cx 9464 <1> .ecx_and_0_valid: 9465 0000A877 66 <1> _386_PM_o32 9466 0000A878 51 <1> push cx ; save the default length 9467 0000A879 E8CA00 <1> call getaddr ; get address into bx:(e)dx (sets bAddr32) (returns edx) 9468 <1> .common: 9469 0000A87C 56 <1> push si 9470 0000A87D E8E110 <1> call skipcomm0 9471 0000A880 E8B710 <1> call iseol? 9472 0000A883 753E <1> jne gr2 9473 0000A885 5E <1> pop si ; restore si and cx 9474 0000A886 66 <1> _386_PM_o32 9475 0000A887 59 <1> pop cx 9476 0000A888 4E <1> dec si ; restore al 9477 0000A889 AC <1> lodsb 9478 0000A88A F606[A700]04 <1> testopt [internalflags3], dif3_accept_getrange_0 9479 0000A88F 7503 <1> jnz @F 9480 0000A891 67 <1> _386_PM_a32 9481 0000A892 E3C7 <1> jcxz errorj10 ; if a range is mandatory 9482 <1> @@: 9483 0000A894 30E4 <1> xor ah, ah 9484 <1> gr3.addcheck: 9485 0000A896 803E[DC88]00 <1> _386_PM cmp byte [bAddr32], 0 9486 0000A89B 740D <1> _386_PM je .16 9487 0000A89D 6649 <1> _386_PM dec ecx 9488 0000A89F 6601D1 <1> _386_PM add ecx, edx 9489 0000A8A2 731E <1> _386_PM jnc gr1 ; if no wraparound 9490 0000A8A4 6683C9FF <1> _386_PM or ecx, byte -1 ; go to end of segment 9491 0000A8A8 EB14 <1> _386_PM jmp short .checkgr3 9492 <1> .16: 9493 0000A8AA 6681F9FFFF0000 <1> _386_PM cmp ecx, 0FFFFh ; was high ? 9494 0000A8B1 7603 <1> _386_PM jbe @F ; no --> (ecxh = 0) 9495 0000A8B3 6631C9 <1> _386_PM xor ecx, ecx ; ecxh = 0 and prepare so as to 9496 <1> ; result in cx = FFFFh after dec 9497 <1> @@: 9498 0000A8B6 49 <1> dec cx 9499 0000A8B7 01D1 <1> add cx, dx 9500 0000A8B9 7307 <1> jnc gr1 ; if no wraparound 9501 0000A8BB B9FFFF <1> mov cx, -1 ; go to end of segment 9502 <1> .checkgr3: 9503 0000A8BE 84E4 <1> test ah, ah 9504 0000A8C0 7599 <1> jnz short errorj10 ; if specified length wrapped --> 9505 <1> gr1: 9506 0000A8C2 C3 <1> retn 9507 <1> 9508 <1> gr2: 9509 0000A8C3 83C402 <1> _386_PM add sp, byte 2 ; for the ecxh on stack 9510 0000A8C6 83C404 <1> add sp, byte 4 ; discard saved cx, si 9511 0000A8C9 E877E3 <1> call uppercase 9512 0000A8CC 3C4C <1> cmp al, 'L' 9513 0000A8CE 7414 <1> je gr3 ; if a range is given 9514 <1> ; call skipwh0 ; get next nonblank 9515 0000A8D0 66 <1> _386_PM_o32 ; xchg ecx, edx 9516 0000A8D1 87CA <1> xchg cx, dx 9517 0000A8D3 B400 <1> mov ah, 0 ; must be offset 9518 0000A8D5 E8D800 <1> call getofsforbx_remember_bitness 9519 <1> ; (DebugX: returns edx no matter what) 9520 0000A8D8 66 <1> _386_PM_o32 ; xchg ecx, edx 9521 0000A8D9 87CA <1> xchg cx, dx 9522 0000A8DB 66 <1> _386_PM_o32 ; cmp edx, ecx 9523 0000A8DC 39CA <1> cmp dx, cx 9524 0000A8DE 7603E9A500 <1> ja errorj2 ; if empty range --> 9525 0000A8E3 C3 <1> retn 9526 <1> 9527 <1> gr3: 9528 0000A8E4 4E <1> dec si ; -> at 'L' 9529 0000A8E5 52 <1> push dx 9530 0000A8E6 BA[F966] <1> mov dx, msg.length 9531 0000A8E9 E8EF0F <1> call isstring? 9532 0000A8EC 5A <1> pop dx 9533 0000A8ED 7501 <1> jne .notlength 9534 0000A8EF A8 <1> db __TEST_IMM8 ; (skip inc, si -> terminator after "LENGTH") 9535 <1> .notlength: 9536 0000A8F0 46 <1> inc si ; -> behind 'L' 9537 0000A8F1 E86C10 <1> call skipcomma ; discard the 'L' 9538 <1> ;--- a range is entered with the L/ength argument 9539 <1> ;--- get a valid length for segment in BX 9540 0000A8F4 52 <1> push dx 9541 0000A8F5 53 <1> push bx 9542 0000A8F6 E86FB4 <1> _386_PM call test_d_b_bit 9543 0000A8F9 9C <1> _386_PM pushf 9544 0000A8FA E8360A <1> call getdword 9545 <1> 9546 0000A8FD 4E <1> dec si 9547 0000A8FE 52 <1> push dx 9548 0000A8FF B90200 <1> mov cx, 2 ; shift count = 2 (do times 4) 9549 0000A902 BA[EC66] <1> mov dx, msg.dwords 9550 0000A905 E8D30F <1> call isstring? 9551 0000A908 7410 <1> je .gotsize 9552 0000A90A 49 <1> dec cx ; shift count = 1 9553 0000A90B BA[ED66] <1> mov dx, msg.words 9554 0000A90E E8CA0F <1> call isstring? 9555 0000A911 7407 <1> je .gotsize 9556 0000A913 49 <1> dec cx ; shift count = 0 9557 0000A914 BA[F366] <1> mov dx, msg.bytes 9558 0000A917 E8C10F <1> call isstring? 9559 <1> ; je .gotsize 9560 <1> .gotsize: ; si -> terminator after length unit 9561 <1> ; (or -> after expression if no unit) 9562 0000A91A 5A <1> pop dx 9563 0000A91B E30B <1> jcxz .noshift ; "BYTES" or no unit given --> 9564 <1> .shiftloop: 9565 0000A91D D1E2 <1> shl dx, 1 9566 0000A91F D1D3 <1> rcl bx, 1 9567 0000A921 7303E9ECFB <1> jc error ; too large --> 9568 0000A926 E2F5 <1> loop .shiftloop ; loop shifting (if it was shift count = 2) 9569 <1> .noshift: 9570 0000A928 AC <1> lodsb ; al = next character, si -> after that 9571 0000A929 9D <1> _386_PM popf 9572 0000A92A 740B <1> _386_PM jz .not16_64kib ; don't check for <= 64 KiB 9573 0000A92C 83FB01 <1> cmp bx, byte 1 9574 0000A92F 7206 <1> jb .not16_64kib ; < 64 KiB in 16-bit segment --> 9575 0000A931 7555 <1> jne short errorj2 ; 16-bit segment, above 64 KiB --> 9576 0000A933 85D2 <1> test dx, dx 9577 0000A935 7551 <1> jnz short errorj2 ; 16-bit segment, above 64 KiB --> 9578 <1> .not16_64kib: 9579 <1> %if _PM 9580 0000A937 53 <1> _386 push bx ; (only push high word on 386+) 9581 0000A938 52 <1> push dx 9582 0000A939 66 <1> _386_o32 ; pop ecx ; mov ecx, bxdx 9583 0000A93A 59 <1> pop cx ; mov cx, dx 9584 <1> %else 9585 <1> mov cx, dx 9586 <1> %endif 9587 0000A93B 09D3 <1> or bx, dx ; zero ? 9588 0000A93D 7449 <1> jz short errorj2 ; yes, error --> 9589 0000A93F 5B <1> pop bx 9590 0000A940 5A <1> pop dx 9591 0000A941 B401 <1> mov ah, 1 9592 0000A943 E950FF <1> jmp .addcheck 9593 <1> 9594 <1> %ifn _PM 9595 <1> errorj2: 9596 <1> jmp error 9597 <1> %endif 9598 <1> 9599 <1> 9600 <1> ; GETADDR - Get address from input line. 9601 <1> ; Entry AL First character of address 9602 <1> ; SI Address of next character 9603 <1> ; BX Default segment to use 9604 <1> ; Exit AL First character beyond address 9605 <1> ; SI Address of the character after that 9606 <1> ; BX:(E)DX Address found 9607 <1> ; Uses AH,CX 9608 <1> 9609 <1> getaddr: 9610 <1> %if _PM 9611 0000A946 E80300 <1> call getaddrX 9612 0000A949 E972EF <1> jmp verifysegm ; make BX a writeable segment 9613 <1> 9614 <1> ; getaddrX differs from getaddr in that BX is not ensured 9615 <1> ; to be writeable in PM. 9616 <1> ; 9617 <1> ; For DEBUG without PM support, getaddr is getaddrX. Both don't return CF. 9618 <1> 9619 <1> getaddrX: 9620 0000A94C C606[DC88]00 <1> mov byte [bAddr32], 0 9621 0000A951 3C24 <1> cmp al, '$' ; a real-mode segment? 9622 0000A953 7536 <1> jne ga1_1 9623 0000A955 AC <1> lodsb 9624 <1> 9625 0000A956 6631D2 <1> _386 xor edx, edx ; edxh = 0 9626 0000A959 E8D709 <1> call getexpression 9627 0000A95C 84E4 <1> test ah, ah ; pointer type ? 9628 0000A95E 7911 <1> jns @F 9629 <1> 9630 0000A960 E89AE8 <1> call ispm ; need to translate ? 9631 0000A963 750B <1> jnz .ret ; no --> 9632 <1> ; bx = segment 9633 <1> ; after falling through we get bx:(e)dx = segmented address 9634 <1> 9635 <1> seg_bx_to_sel: equ $ ; (no base for local labels) 9636 0000A965 50 <1> push ax 9637 0000A966 B80200 <1> mov ax, 0002h 9638 0000A969 CD31 <1> int 31h 9639 0000A96B 721B <1> jc short errorj2 9640 0000A96D 89C3 <1> mov bx, ax ; bx = segment 9641 0000A96F 58 <1> pop ax 9642 <1> .ret: 9643 0000A970 C3 <1> retn 9644 <1> 9645 <1> @@: 9646 0000A971 E8AA0E <1> call getword.checksignificantbits 9647 0000A974 E886E8 <1> call ispm ; need to translate ? 9648 0000A977 7507 <1> jnz .checkseg ; no --> 9649 0000A979 89D3 <1> mov bx, dx 9650 0000A97B E8E7FF <1> call seg_bx_to_sel 9651 0000A97E 89DA <1> mov dx, bx 9652 <1> .checkseg: 9653 0000A980 56 <1> push si 9654 0000A981 E80C10 <1> call skipwh0 9655 0000A984 3C3A <1> cmp al, ':' ; was a segment at all? 9656 0000A986 7420 <1> je ga2_2 ; yes --> 9657 <1> errorj2: 9658 0000A988 E987FB <1> jmp error 9659 <1> %else 9660 <1> getaddrX: 9661 <1> cmp al, '$' 9662 <1> jne ga1_1 9663 <1> lodsb 9664 <1> call getexpression 9665 <1> test ah, ah ; pointer type ? 9666 <1> js .ret ; return bx:dx = segmented address 9667 <1> push ax ; (unused) 9668 <1> call getword.checksignificantbits 9669 <1> call skipwh0 9670 <1> cmp al, ':' 9671 <1> je ga2_2 9672 <1> jmp error 9673 <1> 9674 <1> .ret: 9675 <1> retn 9676 <1> %endif 9677 <1> ga1_1: 9678 0000A98B B401 <1> mov ah, 1 ; might be a pointer type 9679 0000A98D E88FFE <1> call getofsforbx 9680 0000A990 720B <1> jc .ret 9681 0000A992 56 <1> push si 9682 0000A993 E8FA0F <1> call skipwh0 9683 0000A996 3C3A <1> cmp al, ':' 9684 0000A998 7405 <1> je ga2 ; if this is a segment/selector --> 9685 0000A99A 5E <1> pop si 9686 0000A99B 4E <1> dec si 9687 0000A99C AC <1> lodsb 9688 <1> .ret: 9689 <1> %if _PM 9690 0000A99D EB14 <1> jmp short remember_bitness 9691 <1> ; remember 32-bitness (only if no segment) 9692 <1> %else 9693 <1> retn 9694 <1> %endif 9695 <1> 9696 <1> ga2: 9697 0000A99F 6681FA00000100 <1> _386_PM cmp edx, 0001_0000h ; segment/selector fits in word ? 9698 0000A9A6 73E0 <1> _386_PM jae short errorj2 ; no --> 9699 <1> ga2_2: 9700 0000A9A8 58 <1> pop ax ; throw away saved si 9701 0000A9A9 89D3 <1> mov bx, dx ; mov segment into BX 9702 0000A9AB E8E10F <1> call skipwhite ; skip to next word 9703 0000A9AE B400 <1> mov ah, 0 ; must be an offset 9704 <1> %if _PM 9705 <1> getofsforbx_remember_bitness: 9706 0000A9B0 E86CFE <1> call getofsforbx 9707 <1> remember_bitness: 9708 0000A9B3 0826[DC88] <1> or byte [bAddr32], ah ; remember 32-bitness 9709 0000A9B7 C3 <1> retn 9710 <1> %else 9711 <1> jmp getofsforbx 9712 <1> 9713 <1> getofsforbx_remember_bitness: equ getofsforbx 9714 <1> %endif 9715 <1> 9716 <1> 9717 <1> ; GETSTR - Get string of bytes. Put the answer in line_out. 9718 <1> ; Entry AL first character 9719 <1> ; SI address of next character 9720 <1> ; Exit [line_out] first byte of string 9721 <1> ; DI address of last+1 byte of string 9722 <1> ; Uses AX,CL,DL,SI 9723 <1> 9724 <1> getstr: 9725 0000A9B8 BF[0E08] <1> mov di, line_out 9726 0000A9BB E87C0F <1> call iseol? 9727 0000A9BE 74C8 <1> je short errorj2 ; we don't allow empty byte strings 9728 <1> gs1: 9729 0000A9C0 3C27 <1> cmp al, "'" 9730 0000A9C2 740C <1> je gs2 ; if string 9731 0000A9C4 3C22 <1> cmp al, '"' 9732 0000A9C6 7408 <1> je gs2 ; ditto 9733 0000A9C8 E85C0E <1> call getbyte ; byte in DL 9734 0000A9CB 8815 <1> mov byte [di], dl ; store the byte 9735 0000A9CD 47 <1> inc di 9736 0000A9CE EB14 <1> jmp short gs6 9737 <1> 9738 <1> gs2: 9739 0000A9D0 88C4 <1> mov ah, al ; save quote character 9740 <1> gs3: 9741 0000A9D2 AC <1> lodsb 9742 0000A9D3 38E0 <1> cmp al, ah 9743 0000A9D5 7408 <1> je gs5 ; if possible end of string 9744 0000A9D7 E8640F <1> call iseol?.notsemicolon 9745 0000A9DA 74AC <1> je short errorj2 ; if end of line 9746 <1> gs4: 9747 0000A9DC AA <1> stosb ; save character and continue 9748 0000A9DD EBF3 <1> jmp short gs3 9749 <1> 9750 <1> gs5: 9751 0000A9DF AC <1> lodsb 9752 0000A9E0 38E0 <1> cmp al, ah 9753 0000A9E2 74F8 <1> je gs4 ; if doubled quote character 9754 <1> gs6: 9755 0000A9E4 E87A0F <1> call skipcomm0 ; go back for more 9756 0000A9E7 E8500F <1> call iseol? 9757 0000A9EA 75D4 <1> jne gs1 ; if not done yet 9758 <1> .ret: 9759 0000A9EC C3 <1> retn 9760 <1> 9761 <1> isbracketorunaryoperator?: 9762 0000A9ED E80900 <1> call isunaryoperator? 9763 0000A9F0 7406 <1> je .yes 9764 <1> %if _INDIRECTION 9765 0000A9F2 3C5B <1> cmp al, '[' 9766 0000A9F4 7402 <1> je .yes 9767 <1> %endif 9768 0000A9F6 3C28 <1> cmp al, '(' 9769 <1> .yes: 9770 0000A9F8 C3 <1> retn 9771 <1> 9772 <1> 9773 <1> ; Is al one of the simple unary operators? 9774 <1> ; OUT: NZ if not 9775 <1> ; ZR if so, 9776 <1> ; NC 9777 <1> ; cx = index into unaryoperators 9778 <1> isunaryoperator?: 9779 0000A9F9 57 <1> push di 9780 0000A9FA BF[BE90] <1> mov di, unaryoperators 9781 0000A9FD EB04 <1> jmp short isoperator?.common 9782 <1> 9783 <1> ; See previous description. 9784 <1> isoperator?: 9785 0000A9FF 57 <1> push di 9786 0000AA00 BF[A890] <1> mov di, operators 9787 <1> .common: 9788 0000AA03 8B0D <1> mov cx, word [di] 9789 0000AA05 51 <1> push cx 9790 0000AA06 AF <1> scasw 9791 0000AA07 F2AE <1> repne scasb 9792 0000AA09 5F <1> pop di 9793 0000AA0A 7507 <1> jne .no 9794 0000AA0C F7D9 <1> neg cx 9795 0000AA0E 01F9 <1> add cx, di 9796 0000AA10 49 <1> dec cx 9797 0000AA11 38C0 <1> cmp al, al ; NC, ZR 9798 <1> .no: 9799 0000AA13 5F <1> pop di 9800 0000AA14 C3 <1> retn 9801 <1> 9802 <1> 9803 <1> ; INP: al = character 9804 <1> ; OUT: al = capitalised character 9805 <1> ; ZR, NC if a separator 9806 <1> ; NZ if no separator 9807 <1> isseparator?: 9808 <1> .: 9809 0000AA15 E82BE2 <1> call uppercase 9810 0000AA18 51 <1> push cx 9811 <1> %if _EXPRESSIONS 9812 0000AA19 3C41 <1> cmp al, 'A' 9813 0000AA1B 7204 <1> jb @F 9814 0000AA1D 3C5A <1> cmp al, 'Z' 9815 0000AA1F 7605 <1> jbe @FF 9816 <1> @@: 9817 0000AA21 E8DBFF <1> call isoperator? ; normal operators are separators (also handles equality sign) 9818 0000AA24 740A <1> je .yes ; if match --> (ZR, NC) 9819 <1> @@: 9820 <1> %endif 9821 0000AA26 57 <1> push di 9822 0000AA27 BF[B495] <1> mov di, separators 9823 0000AA2A 8B0D <1> mov cx, word [di] 9824 0000AA2C AF <1> scasw 9825 0000AA2D F2AE <1> repne scasb ; ZR, NC on match, NZ else 9826 0000AA2F 5F <1> pop di 9827 <1> .yes: 9828 0000AA30 59 <1> pop cx 9829 0000AA31 C3 <1> retn 9830 <1> 9831 <1> ; INP: al = character 9832 <1> ; OUT: al = capitalised character 9833 <1> ; ZR, NC if a separator (not L or dot) 9834 <1> ; NZ if no separator (including L or dot) 9835 <1> .except_L_or_dot: 9836 0000AA32 E80EE2 <1> call uppercase 9837 0000AA35 3C2E <1> cmp al, '.' 9838 0000AA37 7404 <1> je .ret_NZ 9839 0000AA39 3C4C <1> cmp al, 'L' 9840 0000AA3B 75D8 <1> jne . 9841 <1> .ret_NZ: 9842 0000AA3D 84C0 <1> test al, al 9843 0000AA3F C3 <1> retn 9844 <1> 9845 <1> 9846 <1> ; Does one of the type operators start in input? 9847 <1> ; 9848 <1> ; INP: al = first character 9849 <1> ; si-> next character 9850 <1> ; OUT: Iff NC, 9851 <1> ; bx>>1 = offset into typebitmasks and typehandlers tables 9852 <1> ; bx&1 = set iff signed type 9853 <1> ; di-> behind the type operator 9854 <1> ; CHG: bx, cx, di 9855 <1> ; 9856 <1> ; Note: Signed types are specified by an S prefix to 9857 <1> ; the type names. Only non-address types can 9858 <1> ; be signed (that is, offset, segment, and 9859 <1> ; pointer cannot be signed). 9860 <1> ; Types can be specified with abbreviated names, 9861 <1> ; except where that would clash with numeric 9862 <1> ; input or a register name or ambiguity would 9863 <1> ; be caused. These cases are: 9864 <1> ; SS, S (short, seg, signed, ss) 9865 <1> ; B (byte, numeric 0Bh) 9866 <1> ; C (char, numeric 0Ch) 9867 <1> ; D (dword, numeric 0Dh) 9868 <1> ; 3 (3byte, numeric 3) 9869 <1> ; 3B (3byte, numeric 3Bh) 9870 <1> ; CH (char, register ch) 9871 <1> istype?: 9872 <1> %if maxtypesize & 1 9873 0000AA40 B90800 <1> mov cx, maxtypesize+1 ; = maximum count + 1 9874 <1> %else 9875 <1> mov cx, maxtypesize ; = maximum count 9876 <1> %endif 9877 <1> ; cx is even here! 9878 0000AA43 52 <1> push dx 9879 0000AA44 50 <1> push ax 9880 0000AA45 56 <1> push si 9881 <1> 9882 0000AA46 29CC <1> sub sp, cx ; allocate name buffer 9883 0000AA48 89E7 <1> mov di, sp ; -> name buffer 9884 0000AA4A 57 <1> push di 9885 0000AA4B 31DB <1> xor bx, bx ; initialise count 9886 <1> %ifn maxtypesize & 1 9887 <1> inc cx ; = maximum count + 1 9888 <1> %endif 9889 <1> ; The +1 does not represent an off-by-one 9890 <1> ; because the below loop stores to the 9891 <1> ; buffer at the beginning of subsequent 9892 <1> ; iterations, after checking cx. 9893 <1> 9894 0000AA4D A9 <1> db __TEST_IMM16 ; (skip stosb and lodsb) 9895 <1> .storename: 9896 0000AA4E AA <1> stosb ; store in name buffer 9897 0000AA4F AC <1> lodsb ; get next character to check 9898 0000AA50 E8F0E1 <1> call uppercase 9899 0000AA53 51 <1> push cx 9900 0000AA54 E896FF <1> call isbracketorunaryoperator? ; terminator ? 9901 0000AA57 59 <1> pop cx 9902 0000AA58 7413 <1> je .endname 9903 0000AA5A E8DD0E <1> call iseol? 9904 0000AA5D 740E <1> je .endname 9905 0000AA5F 3C20 <1> cmp al, 32 9906 0000AA61 740A <1> je .endname 9907 0000AA63 3C09 <1> cmp al, 9 9908 0000AA65 7406 <1> je .endname ; yes --> 9909 <1> ; We don't check for digits here. 9910 <1> ; Immediate values and variables 9911 <1> ; must leave a space inbetween. 9912 0000AA67 43 <1> inc bx ; count characters 9913 0000AA68 E2E4 <1> loop .storename ; count remaining buffer space 9914 <1> ; Here, the potential name was too 9915 <1> ; long for a valid type name. 9916 0000AA6A F9 <1> stc 9917 0000AA6B EB1F <1> jmp short .done ; --> 9918 <1> 9919 <1> .endname: 9920 0000AA6D E8200F <1> call skipwh0 ; skip to next field 9921 0000AA70 4E <1> dec si ; -> behind potential name 9922 0000AA71 5F <1> pop di ; -> name buffer 9923 0000AA72 89D9 <1> mov cx, bx ; cx = length 9924 0000AA74 56 <1> push si ; save position in input line 9925 0000AA75 89FE <1> mov si, di ; si-> name buffer 9926 0000AA77 53 <1> push bx 9927 0000AA78 57 <1> push di 9928 0000AA79 F8 <1> clc ; indicate unsigned check 9929 0000AA7A E81900 <1> call isunsignedtype? ; matches an unsigned type ? 9930 0000AA7D 5E <1> pop si 9931 0000AA7E 59 <1> pop cx 9932 0000AA7F 730B <1> jnc .done ; yes --> 9933 <1> 9934 0000AA81 AC <1> lodsb ; al = first, si-> second character 9935 0000AA82 49 <1> dec cx ; cx = length less one 9936 0000AA83 3C53 <1> cmp al, 'S' ; first character an "S" ? 9937 0000AA85 F9 <1> stc ; (indicate signed check, or: no type) 9938 0000AA86 7504 <1> jne .done ; no, not signed either --> 9939 0000AA88 E80B00 <1> call isunsignedtype? ; matches an unsigned type now ? 9940 0000AA8B 43 <1> inc bx ; if NC, set to indicate signed type 9941 <1> .done: 9942 0000AA8C 9F <1> lahf 9943 0000AA8D 5F <1> pop di ; if NC, -> behind matched type name 9944 0000AA8E 83C408 <1> add sp, (maxtypesize+1) & ~1 ; discard name buffer 9945 0000AA91 5E <1> pop si 9946 0000AA92 9E <1> sahf 9947 0000AA93 58 <1> pop ax 9948 0000AA94 5A <1> pop dx 9949 0000AA95 C3 <1> retn 9950 <1> 9951 <1> ; Does one of the unsigned type operators start in buffer? 9952 <1> ; 9953 <1> ; INP: si-> name buffer with capitalised potential name 9954 <1> ; cx = length of potential name 9955 <1> ; CY iff looking for signed type 9956 <1> ; OUT: Iff NC, 9957 <1> ; bx>>1 = offset into typebitmasks and typehandlers tables 9958 <1> ; bx&1 = 0 9959 <1> ; CHG: ax, bx, cx, dx, si, di 9960 <1> isunsignedtype?: 9961 0000AA96 BF[9480] <1> mov di, types 9962 0000AA99 19D2 <1> sbb dx, dx ; 0FFFFh if signed check else 0 9963 0000AA9B E351 <1> jcxz .notype ; if zero characters --> 9964 0000AA9D 83F902 <1> cmp cx, 2 9965 0000AAA0 750C <1> jne @F 9966 0000AAA2 813C4348 <1> cmp word [si], "CH" 9967 0000AAA6 7446 <1> je .notype 9968 0000AAA8 813C3342 <1> cmp word [si], "3B" 9969 0000AAAC 7440 <1> je .notype 9970 <1> @@: 9971 0000AAAE E214 <1> loop .single_character_checked ; if not single character --> 9972 <1> 9973 0000AAB0 AC <1> lodsb ; get that character 9974 0000AAB1 3C53 <1> cmp al, 'S' ; specified "S" or "SS" ? 9975 0000AAB3 7439 <1> je .notype ; yes, not allowed --> 9976 0000AAB5 08D0 <1> or al, dl ; iff signed check, al |= 0FFh 9977 0000AAB7 4E <1> dec si ; (restore) 9978 0000AAB8 3C33 <1> cmp al, '3' 9979 0000AABA 7432 <1> je .notype 9980 0000AABC 3C41 <1> cmp al, 'A' ; specified only a valid digit ? 9981 0000AABE 7204 <1> jb .single_character_checked 9982 0000AAC0 3C47 <1> cmp al, 'F'+1 9983 0000AAC2 722A <1> jb .notype ; yes, not allowed --> 9984 <1> 9985 <1> .single_character_checked: 9986 0000AAC4 41 <1> inc cx ; (restore) 9987 0000AAC5 83E2E1 <1> and dx, types.addresses-types.end ; = 0 iff unsigned check 9988 0000AAC8 31C0 <1> xor ax, ax ; initialise ah, and ax = 0 first 9989 0000AACA 31DB <1> xor bx, bx 9990 0000AACC 87FE <1> xchg di, si 9991 0000AACE 81C2[DF80] <1> add dx, types.end ; = .addresses for signed check, 9992 <1> ; = .end for unsigned check 9993 <1> 9994 <1> ; Before each iteration, 9995 <1> ; si-> byte-counted next name to check 9996 <1> ; di-> potential name (in name buffer) 9997 <1> ; cx = cl = length of potential name 9998 <1> ; (dx-1) = maximum value for si 9999 <1> ; ah = 0 10000 <1> ; Before the first iteration additionally, 10001 <1> ; bx&~3 = index to return for this name (if match) 10002 <1> ; al = 0 10003 <1> ; Before subsequent iterations additionally, 10004 <1> ; (bx+2)&~3 = index to return for this name (if match) 10005 <1> ; al = offset to add to si first 10006 0000AAD2 A9 <1> db __TEST_IMM16 ; (skip two times inc bx) 10007 <1> .loop: 10008 0000AAD3 43 <1> inc bx 10009 0000AAD4 43 <1> inc bx ; increase index 10010 0000AAD5 01C6 <1> add si, ax ; -> next table entry 10011 0000AAD7 AC <1> lodsb ; ax = length of full name 10012 0000AAD8 39D6 <1> cmp si, dx ; checked all allowed names? 10013 0000AADA 7312 <1> jae .notype ; yes, done --> 10014 0000AADC 39C8 <1> cmp ax, cx ; full name large enough ? 10015 0000AADE 72F3 <1> jb .loop ; no --> 10016 0000AAE0 57 <1> push di 10017 0000AAE1 51 <1> push cx 10018 0000AAE2 56 <1> push si 10019 0000AAE3 F3A6 <1> repe cmpsb ; potential name matches ? 10020 0000AAE5 5E <1> pop si 10021 0000AAE6 59 <1> pop cx 10022 0000AAE7 5F <1> pop di 10023 0000AAE8 75E9 <1> jne .loop ; no --> 10024 <1> 10025 0000AAEA 80E3FC <1> and bl, ~3 ; conflate alternative type names 10026 0000AAED A8 <1> db __TEST_IMM8 ; (NC, skip stc) 10027 <1> .notype: 10028 0000AAEE F9 <1> stc 10029 0000AAEF C3 <1> retn 10030 <1> 10031 <1> 10032 <1> usesection lDEBUG_DATA_ENTRY 10033 <1> 10034 <1> ; Table of bit masks and shift counts to determine 10035 <1> ; how a type modifies the bit mask of required bytes. 10036 <1> ; 10037 <1> ; It would be possible to always retrieve a full dword 10038 <1> ; from memory to process indirection in expressions, 10039 <1> ; but this could fault if accessing inexistent data. 10040 <1> ; Hence the debugger should minimise memory access. 10041 <1> ; For this reason, types allow the expression evaluator 10042 <1> ; to keep track which of the term's bytes are actually 10043 <1> ; going to be used. The bit mask of required bytes 10044 <1> ; indicates which bytes are not discarded by any of a 10045 <1> ; term's type operators. 10046 <1> ; 10047 <1> ; The second byte of each entry (applied to ch by the 10048 <1> ; reader, ie high byte of cx) indicates a mask to 10049 <1> ; apply to the bit mask of required bytes. Note that 10050 <1> ; this mask is applied first, before the shift that's 10051 <1> ; described next. 10052 <1> ; The first byte of each entry (loaded into cl by the 10053 <1> ; reader, ie low byte of cx) indicates a shift left 10054 <1> ; count to apply to the bit mask of required bytes. 10055 <1> ; (Only the segment type doesn't have 0 currently.) 10056 <1> ; 10057 <1> ; Note that types are parsed forwards through the input 10058 <1> ; (ie the specified command) but are actually applied 10059 <1> ; to the numeric value they refer to backwards, that 10060 <1> ; is, a type that is closer to the term in the input 10061 <1> ; is applied to the term's result before a type that's 10062 <1> ; farther from the term. 10063 <1> ; Misleadingly, this reversal isn't very apparent in 10064 <1> ; most processing of the type and unary operators. 10065 <1> ; The segment type's shifting and masking reflects the 10066 <1> ; reversal: while the actual operation is to shift 10067 <1> ; right then restrict to the low word, the entry in 10068 <1> ; this table indicates to restrict the bit mask to 10069 <1> ; the low word then shift left. 10070 <1> align 2, db 0 10071 <1> typebitmasks: 10072 0000908C 0001 <1> db 0, 1b ; byte 10073 0000908E 0003 <1> db 0, 11b ; word 10074 00009090 0007 <1> db 0, 111b ; 3byte 10075 00009092 000F <1> db 0, 1111b ; dword 10076 00009094 000F <1> db 0, 1111b ; pointer 10077 00009096 0003 <1> db 0, 11b ; offset 10078 00009098 0203 <1> db 2, 11b ; segment 10079 <1> 10080 <1> 10081 <1> ; Dispatch table for type conversion functions. 10082 <1> ; 10083 <1> ; INP: bx:dx = dword input 10084 <1> ; CF = signedness of type conversion 10085 <1> ; ah from lahf with the same CF as current 10086 <1> ; al = type (80h = pointer, 40h = signed) 10087 <1> ; OUT: bx:dx = new value 10088 <1> ; ah = type (80h = pointer, 40h = signed) 10089 <1> ; CHG: ax 10090 <1> align 2, db 0 10091 <1> typehandlers: 10092 0000909A [03AB] <1> dw handlebyte 10093 0000909C [0EAB] <1> dw handleword 10094 0000909E [F6AA] <1> dw handle3byte 10095 000090A0 [19AB] <1> dw handledword 10096 000090A2 [21AB] <1> dw handlepointer 10097 000090A4 [0EAB] <1> dw handleoffset 10098 000090A6 [F0AA] <1> dw handlesegment 10099 <1> 10100 <1> 10101 <1> usesection lDEBUG_CODE 10102 <1> 10103 <1> handlesegment: 10104 0000AAF0 89DA <1> mov dx, bx 10105 0000AAF2 30E4 <1> xor ah, ah ; NC, ah = 0 10106 0000AAF4 EB18 <1> jmp short handleword 10107 <1> handleoffset equ handleword 10108 <1> 10109 <1> handle3byte: 10110 0000AAF6 B700 <1> mov bh, 0 10111 0000AAF8 7307 <1> jnc .zero ; (iff unsigned type -->) 10112 0000AAFA 84DB <1> test bl, bl ; signed ? 10113 0000AAFC 7902 <1> jns .zero_f ; no --> 10114 0000AAFE FECF <1> dec bh 10115 <1> .zero_f: 10116 0000AB00 9E <1> sahf ; restore CF 10117 <1> .zero: 10118 0000AB01 EB16 <1> jmp handledword 10119 <1> 10120 <1> handlebyte: 10121 0000AB03 B600 <1> mov dh, 0 10122 0000AB05 7307 <1> jnc .zero ; (iff unsigned type -->) 10123 0000AB07 84D2 <1> test dl, dl ; signed ? 10124 0000AB09 7902 <1> jns .zero_f ; no --> 10125 0000AB0B FECE <1> dec dh 10126 <1> .zero_f: 10127 0000AB0D 9E <1> sahf ; restore CF 10128 <1> .zero: 10129 <1> handleword: 10130 0000AB0E BB0000 <1> mov bx, 0 10131 0000AB11 7306 <1> jnc .zero ; (iff unsigned type -->) 10132 0000AB13 85D2 <1> test dx, dx ; signed ? 10133 0000AB15 7901 <1> jns .zero_f ; no --> 10134 0000AB17 4B <1> dec bx 10135 <1> .zero_f: 10136 0000AB18 9E <1> sahf ; restore CF 10137 <1> .zero: 10138 <1> handledword: 10139 0000AB19 7203 <1> jc .signed ; if signed --> 10140 0000AB1B 30E4 <1> xor ah, ah ; return pointer=0 signed=0 10141 0000AB1D C3 <1> retn 10142 <1> 10143 <1> .signed: 10144 0000AB1E B440 <1> mov ah, 40h ; return pointer=0 signed=1 10145 0000AB20 C3 <1> retn 10146 <1> 10147 <1> handlepointer: 10148 0000AB21 B480 <1> mov ah, 80h ; return pointer=1 signed=0 10149 0000AB23 C3 <1> retn 10150 <1> 10151 <1> 10152 <1> usesection lDEBUG_DATA_ENTRY 10153 <1> 10154 <1> ; List of binary and unary operators. 10155 <1> ; The order has to match that in the respective 10156 <1> ; operator handler dispatch table below. 10157 <1> align 2, db 0 10158 <1> operators: 10159 000090A8 13002B2D2A2F253C3E- <1> .: countedw "+-*/%<>=!|&^oOaAxX?" 10159 000090B1 3D217C265E6F4F6141- <1> 10159 000090BA 78583F <1> 10160 <1> .amount: equ $ - . - 2 10161 000090BD 00 <1> align 2, db 0 10162 <1> unaryoperators: 10163 000090BE 05002B2D7E213F <1> .: countedw "+-~!?" 10164 <1> .amount: equ $ - . - 2 10165 <1> 10166 <1> 10167 <1> ; Dispatch table for unary operators, 10168 <1> ; used by getexpression. 10169 <1> ; Functions in this table are called with: 10170 <1> ; 10171 <1> ; INP: bx:dx = number 10172 <1> ; ah = type 10173 <1> ; OUT: bx:dx = result 10174 <1> ; ah = type 10175 <1> ; CHG: - 10176 000090C5 00 <1> align 2, db 0 10177 <1> unaryoperatorhandlers: 10178 <1> .: 10179 000090C6 [36AB] <1> dw uoh_plus ; + 10180 000090C8 [2CAB] <1> dw uoh_minus ; - 10181 000090CA [37AB] <1> dw uoh_not_bitwise ; ~ 10182 000090CC [3EAB] <1> dw uoh_not_boolean ; ! 10183 000090CE [24AB] <1> dw uoh_abs ; ? 10184 <1> .amount: equ ($ - .) / 2 10185 <1> %if .amount != unaryoperators.amount 10186 <1> %error String and table mismatch 10187 <1> %endif 10188 <1> 10189 <1> 10190 <1> usesection lDEBUG_CODE 10191 <1> 10192 <1> uoh_abs: 10193 0000AB24 80E4BF <1> and ah, ~ 40h ; make type signed=0 10194 0000AB27 F6C780 <1> test bh, 80h ; negative ? 10195 0000AB2A 740A <1> jz uoh_plus ; no --> 10196 <1> uoh_minus: 10197 0000AB2C 80CC40 <1> or ah, 40h ; make type signed=1 10198 <1> calculate_minus_bxdx: 10199 0000AB2F F7DB <1> neg bx 10200 0000AB31 F7DA <1> neg dx 10201 0000AB33 83DB00 <1> sbb bx, byte 0 ; neg bx:dx 10202 <1> uoh_plus: ; (nop) 10203 0000AB36 C3 <1> retn 10204 <1> 10205 <1> uoh_not_bitwise: 10206 0000AB37 B400 <1> mov ah, 0 ; make type pointer=0 signed=0 10207 0000AB39 F7D3 <1> not bx 10208 0000AB3B F7D2 <1> not dx 10209 0000AB3D C3 <1> retn 10210 <1> 10211 <1> uoh_not_boolean: 10212 0000AB3E B400 <1> mov ah, 0 ; make type pointer=0 signed=0 10213 0000AB40 E80202 <1> call toboolean 10214 0000AB43 80F201 <1> xor dl, 1 ; toggle only bit 0 10215 0000AB46 C3 <1> retn 10216 <1> 10217 <1> 10218 <1> usesection lDEBUG_DATA_ENTRY 10219 <1> 10220 <1> ; Word table operatordispatchers: order as in string operators 10221 <1> ; Pointed functions dispatch depending on operator characters 10222 <1> ; Return: operator index, 0 = invalid 10223 <1> 10224 <1> ; Operator index (byte): 10225 <1> ; 0 = invalid, no operator found 10226 <1> ; 1.. = 1-based index in byte table operatorprecedences 10227 <1> ; = 1-based index in word table operatorfunctions 10228 <1> 10229 <1> 10230 <1> ; Dispatch table for (binary) expression operators, 10231 <1> ; used by getexpression. 10232 <1> ; Functions in this table are called with: 10233 <1> ; INP: al = operator character (which is also implicit) 10234 <1> ; si-> remaining line (directly) behind operator character 10235 <1> ; OUT: bl != 0 if a valid operator, 10236 <1> ; bl = operator index 10237 <1> ; si-> behind the last character belonging to the operator 10238 <1> ; bl = 0 if no valid operator 10239 <1> ; CHG: al, bh, dx 10240 <1> 10241 <1> struc opprecs 10242 00000000 ?? <1> OPPREC_INVALID: resb 1 10243 00000001 ?? <1> OPPREC_COND: resb 1 10244 00000002 ?? <1> OPPREC_BOOL_OR: resb 1 10245 00000003 ?? <1> OPPREC_BOOL_XOR:resb 1 10246 00000004 ?? <1> OPPREC_BOOL_AND:resb 1 10247 00000005 ?? <1> OPPREC_COMPARE: resb 1 10248 00000006 ?? <1> OPPREC_BIT_OR: resb 1 10249 00000007 ?? <1> OPPREC_BIT_XOR: resb 1 10250 00000008 ?? <1> OPPREC_BIT_AND: resb 1 10251 00000009 ?? <1> OPPREC_SHIFT: resb 1 10252 0000000A ?? <1> OPPREC_ADDSUB: resb 1 10253 0000000B ?? <1> OPPREC_MULDIV: resb 1 10254 0000000C ?? <1> OPPREC_POWER: resb 1 10255 <1> OPPREC_RIGHTOP: ; (to process it first in getexpression) 10256 <1> endstruc 10257 <1> ; The number of precedence levels indicates how many 10258 <1> ; intermediate results getexpression might have to save 10259 <1> ; on its stack. With eleven levels of precedence, up to 10260 <1> ; ten intermediate results are pushed by getexpression. 10261 <1> ; (With 6 bytes each, that gives a moderate 60 bytes.) 10262 <1> ; Key to this is that, in case of a low enough operator 10263 <1> ; behind the one that triggered the pushing, the pushed 10264 <1> ; value will be popped before proceeding. This way more 10265 <1> ; intermediate results may be pushed later but the stack 10266 <1> ; never holds intermediate results that don't need to be 10267 <1> ; on the stack. 10268 <1> 10269 <1> ; This is the definition of operator index values. The tables 10270 <1> ; operatorprecedences and operatorfunctions are ordered by this. 10271 <1> ; The operator dispatchers return one of these. 10272 <1> struc ops 10273 00000000 ?? <1> OPERATOR_INVALID: resb 1 ; 0 - invalid 10274 00000001 ?? <1> OPERATOR_PLUS: resb 1 ; + 10275 00000002 ?? <1> OPERATOR_MINUS: resb 1 ; - 10276 00000003 ?? <1> OPERATOR_MULTIPLY: resb 1 ; * 10277 00000004 ?? <1> OPERATOR_DIVIDE: resb 1 ; / 10278 00000005 ?? <1> OPERATOR_MODULO: resb 1 ; % 10279 00000006 ?? <1> OPERATOR_POWER: resb 1 ; ** 10280 00000007 ?? <1> OPERATOR_CMP_BELOW: resb 1 ; < 10281 00000008 ?? <1> OPERATOR_CMP_BELOW_EQUAL: resb 1 ; <= 10282 00000009 ?? <1> OPERATOR_CMP_ABOVE: resb 1 ; > 10283 0000000A ?? <1> OPERATOR_CMP_ABOVE_EQUAL: resb 1 ; >= 10284 0000000B ?? <1> OPERATOR_CMP_EQUAL: resb 1 ; == 10285 0000000C ?? <1> OPERATOR_CMP_NOT_EQUAL: resb 1 ; != 10286 0000000D ?? <1> OPERATOR_SHIFT_LEFT: resb 1 ; << 10287 0000000E ?? <1> OPERATOR_SHIFT_RIGHT: resb 1 ; >> 10288 0000000F ?? <1> OPERATOR_SHIFT_RIGHT_SIGNED: resb 1 ; >>> 10289 00000010 ?? <1> OPERATOR_BIT_MIRROR: resb 1 ; >< 10290 00000011 ?? <1> OPERATOR_BIT_OR: resb 1 ; | 10291 00000012 ?? <1> OPERATOR_BIT_XOR: resb 1 ; ^ 10292 00000013 ?? <1> OPERATOR_BIT_AND: resb 1 ; & 10293 00000014 ?? <1> OPERATOR_BOOL_OR: resb 1 ; || 10294 00000015 ?? <1> OPERATOR_BOOL_XOR: resb 1 ; ^^ 10295 00000016 ?? <1> OPERATOR_BOOL_AND: resb 1 ; && 10296 00000017 ?? <1> OPERATOR_COND: resb 1 ; ?? :: construct (special) 10297 00000018 ?? <1> OPERATOR_RIGHTOP: resb 1 ; (dummy right-operand operator) 10298 <1> endstruc 10299 <1> ; Order of BIT_* needs to be the same as that of BOOL_*. 10300 <1> ; BOOL_* have to follow directly behind BIT_*. 10301 <1> ; "r cf op= expr" depends on that. 10302 <1> 10303 <1> align 2, db 0 10304 <1> operatordispatchers: 10305 <1> .: 10306 000090D0 [4AAB] <1> dw od_plus ; + 10307 000090D2 [47AB] <1> dw od_minus ; - 10308 000090D4 [4DAB] <1> dw od_multiply ; * ** 10309 000090D6 [57AB] <1> dw od_divide ; / 10310 000090D8 [5AAB] <1> dw od_modulo ; % 10311 000090DA [82AB] <1> dw od_below ; < <> <= << 10312 000090DC [5DAB] <1> dw od_above ; > >< >= >> >>> 10313 000090DE [9FAB] <1> dw od_equal ; == =< => 10314 000090E0 [B1AB] <1> dw od_not ; != 10315 000090E2 [B9AB] <1> dw od_or ; | || 10316 000090E4 [C4AB] <1> dw od_and ; & && 10317 000090E6 [CFAB] <1> dw od_xor ; ^ ^^ 10318 000090E8 [E1AB] <1> dw od_o ; o 10319 000090EA [E1AB] <1> dw od_o ; O 10320 000090EC [E8AB] <1> dw od_a ; a 10321 000090EE [E8AB] <1> dw od_a ; A 10322 000090F0 [EFAB] <1> dw od_x ; x 10323 000090F2 [EFAB] <1> dw od_x ; X 10324 000090F4 [DAAB] <1> dw od_cond ; ? 10325 <1> .end: equ $ - . 10326 <1> .amount: equ ($ - .) / 2 10327 <1> %if .amount != operators.amount 10328 <1> %error String and table mismatch 10329 <1> %endif 10330 <1> %if .amount > 100h 10331 <1> %error Too many operator dispatchers 10332 <1> %endif 10333 <1> 10334 <1> 10335 <1> operatorprecedences: 10336 <1> .: 10337 000090F6 00 <1> db OPPREC_INVALID ; need this for some checks 10338 000090F7 0A <1> db OPPREC_ADDSUB ; + 10339 000090F8 0A <1> db OPPREC_ADDSUB ; - 10340 000090F9 0B <1> db OPPREC_MULDIV ; * 10341 000090FA 0B <1> db OPPREC_MULDIV ; / 10342 000090FB 0B <1> db OPPREC_MULDIV ; % 10343 000090FC 0C <1> db OPPREC_POWER ; ** 10344 000090FD 05 <1> db OPPREC_COMPARE ; < 10345 000090FE 05 <1> db OPPREC_COMPARE ; <= 10346 000090FF 05 <1> db OPPREC_COMPARE ; > 10347 00009100 05 <1> db OPPREC_COMPARE ; >= 10348 00009101 05 <1> db OPPREC_COMPARE ; == 10349 00009102 05 <1> db OPPREC_COMPARE ; != 10350 00009103 09 <1> db OPPREC_SHIFT ; << 10351 00009104 09 <1> db OPPREC_SHIFT ; >> 10352 00009105 09 <1> db OPPREC_SHIFT ; >>> 10353 00009106 09 <1> db OPPREC_SHIFT ; >< 10354 00009107 06 <1> db OPPREC_BIT_OR ; | 10355 00009108 07 <1> db OPPREC_BIT_XOR ; ^ 10356 00009109 08 <1> db OPPREC_BIT_AND ; & 10357 0000910A 02 <1> db OPPREC_BOOL_OR ; || 10358 0000910B 03 <1> db OPPREC_BOOL_XOR ; ^^ 10359 0000910C 04 <1> db OPPREC_BOOL_AND ; && 10360 0000910D 01 <1> db OPPREC_COND ; ?? :: construct 10361 0000910E 0D <1> db OPPREC_RIGHTOP ; getexpression: no number yet 10362 <1> .amount: equ $ - . 10363 <1> %if .amount != ops_size 10364 <1> %error Operators table size mismatch 10365 <1> %endif 10366 <1> 10367 <1> 10368 0000910F 00 <1> align 2, db 0 10369 <1> operatorfunctions: 10370 <1> .: 10371 00009110 [12A5] <1> dw error ; should not be called 10372 00009112 [1FAC] <1> dw of_plus ; + 10373 00009114 [1CAC] <1> dw of_minus ; - 10374 00009116 [2CAC] <1> dw of_multiply ; * 10375 00009118 [57AC] <1> dw of_divide ; / 10376 0000911A [FCAB] <1> dw of_modulo ; % 10377 0000911C [CEAC] <1> dw of_power ; ** 10378 0000911E [27AD] <1> dw of_compare_below ; < 10379 00009120 [21AD] <1> dw of_compare_below_equal ; <= 10380 00009122 [3FAD] <1> dw of_compare_above ; > 10381 00009124 [39AD] <1> dw of_compare_above_equal ; >= 10382 00009126 [33AD] <1> dw of_compare_equal ; == 10383 00009128 [2DAD] <1> dw of_compare_not_equal ; != 10384 0000912A [7AAD] <1> dw of_shift_left ; << 10385 0000912C [62AD] <1> dw of_shift_right ; >> 10386 0000912E [6EAD] <1> dw of_shift_right_signed ; >>> 10387 00009130 [A1AD] <1> dw of_bit_mirror ; >< 10388 00009132 [ECAD] <1> dw of_or_bitwise ; | 10389 00009134 [0FAE] <1> dw of_xor_bitwise ; ^ 10390 00009136 [FEAD] <1> dw of_and_bitwise ; & 10391 00009138 [F7AD] <1> dw of_or_boolean ; || 10392 0000913A [19AE] <1> dw of_xor_boolean ; ^^ 10393 0000913C [08AE] <1> dw of_and_boolean ; && 10394 0000913E [A7B7] <1> dw of_cond ; ?? :: construct 10395 00009140 [4FAD] <1> dw of_rightop ; set to right operand 10396 <1> .amount: equ ($ - .) / 2 10397 <1> %if .amount != ops_size 10398 <1> %error Operators table size mismatch 10399 <1> %endif 10400 <1> 10401 <1> 10402 <1> usesection lDEBUG_CODE 10403 <1> 10404 <1> od_minus: 10405 0000AB47 B302 <1> mov bl, OPERATOR_MINUS 10406 0000AB49 C3 <1> retn 10407 <1> 10408 <1> od_plus: 10409 0000AB4A B301 <1> mov bl, OPERATOR_PLUS 10410 0000AB4C C3 <1> retn 10411 <1> 10412 <1> od_multiply: 10413 0000AB4D B303 <1> mov bl, OPERATOR_MULTIPLY 10414 0000AB4F 3804 <1> cmp byte [si], al 10415 0000AB51 7503 <1> jne .ret 10416 0000AB53 46 <1> inc si 10417 0000AB54 B306 <1> mov bl, OPERATOR_POWER 10418 <1> .ret: 10419 0000AB56 C3 <1> retn 10420 <1> 10421 <1> od_divide: 10422 0000AB57 B304 <1> mov bl, OPERATOR_DIVIDE 10423 0000AB59 C3 <1> retn 10424 <1> 10425 <1> od_modulo: 10426 0000AB5A B305 <1> mov bl, OPERATOR_MODULO 10427 0000AB5C C3 <1> retn 10428 <1> 10429 <1> od_above: 10430 0000AB5D 3804 <1> cmp byte [si], al 10431 0000AB5F 7411 <1> je .shr 10432 0000AB61 803C3C <1> cmp byte [si], '<' 10433 0000AB64 7418 <1> je .mirror 10434 0000AB66 803C3D <1> cmp byte [si], '=' 10435 0000AB69 7403 <1> je .cmp_ae 10436 0000AB6B B309 <1> mov bl, OPERATOR_CMP_ABOVE 10437 0000AB6D C3 <1> retn 10438 <1> .cmp_ae: 10439 0000AB6E 46 <1> inc si 10440 0000AB6F B30A <1> mov bl, OPERATOR_CMP_ABOVE_EQUAL 10441 0000AB71 C3 <1> retn 10442 <1> .shr: 10443 0000AB72 46 <1> inc si 10444 0000AB73 3804 <1> cmp byte [si], al 10445 0000AB75 7403 <1> je .sar 10446 0000AB77 B30E <1> mov bl, OPERATOR_SHIFT_RIGHT 10447 0000AB79 C3 <1> retn 10448 <1> .sar: 10449 0000AB7A 46 <1> inc si 10450 0000AB7B B30F <1> mov bl, OPERATOR_SHIFT_RIGHT_SIGNED 10451 0000AB7D C3 <1> retn 10452 <1> .mirror: 10453 0000AB7E 46 <1> inc si 10454 0000AB7F B310 <1> mov bl, OPERATOR_BIT_MIRROR 10455 0000AB81 C3 <1> retn 10456 <1> 10457 <1> od_below: 10458 0000AB82 3804 <1> cmp byte [si], al 10459 0000AB84 7411 <1> je .shl 10460 0000AB86 803C3E <1> cmp byte [si], '>' 10461 0000AB89 7410 <1> je .ncmp 10462 0000AB8B 803C3D <1> cmp byte [si], '=' 10463 0000AB8E 7403 <1> je .cmp_be 10464 0000AB90 B307 <1> mov bl, OPERATOR_CMP_BELOW 10465 0000AB92 C3 <1> retn 10466 <1> .cmp_be: 10467 0000AB93 46 <1> inc si 10468 0000AB94 B308 <1> mov bl, OPERATOR_CMP_BELOW_EQUAL 10469 0000AB96 C3 <1> retn 10470 <1> .shl: 10471 0000AB97 46 <1> inc si 10472 0000AB98 B30D <1> mov bl, OPERATOR_SHIFT_LEFT 10473 0000AB9A C3 <1> retn 10474 <1> .ncmp: 10475 <1> od_not.ncmp: 10476 0000AB9B 46 <1> inc si 10477 0000AB9C B30C <1> mov bl, OPERATOR_CMP_NOT_EQUAL 10478 0000AB9E C3 <1> retn 10479 <1> 10480 <1> od_equal: 10481 0000AB9F 803C3E <1> cmp byte [si], '>' 10482 0000ABA2 74CA <1> je od_above.cmp_ae 10483 0000ABA4 803C3C <1> cmp byte [si], '<' 10484 0000ABA7 74EA <1> je od_below.cmp_be 10485 0000ABA9 3804 <1> cmp byte [si], al 10486 0000ABAB 7509 <1> jne .invalid ; no valid operator --> 10487 <1> .cmp: 10488 0000ABAD 46 <1> inc si 10489 0000ABAE B30B <1> mov bl, OPERATOR_CMP_EQUAL 10490 0000ABB0 C3 <1> retn 10491 <1> 10492 <1> od_not: 10493 0000ABB1 803C3D <1> cmp byte [si], '=' 10494 0000ABB4 74E5 <1> je .ncmp 10495 <1> od_equal.invalid: 10496 0000ABB6 B300 <1> mov bl, OPERATOR_INVALID 10497 0000ABB8 C3 <1> retn 10498 <1> 10499 <1> od_or: 10500 0000ABB9 3804 <1> cmp byte [si], al 10501 0000ABBB 7403 <1> je .boolean 10502 0000ABBD B311 <1> mov bl, OPERATOR_BIT_OR 10503 0000ABBF C3 <1> retn 10504 <1> .boolean: 10505 0000ABC0 46 <1> inc si 10506 0000ABC1 B314 <1> mov bl, OPERATOR_BOOL_OR 10507 0000ABC3 C3 <1> retn 10508 <1> od_and: 10509 0000ABC4 3804 <1> cmp byte [si], al 10510 0000ABC6 7403 <1> je .boolean 10511 0000ABC8 B313 <1> mov bl, OPERATOR_BIT_AND 10512 0000ABCA C3 <1> retn 10513 <1> .boolean: 10514 0000ABCB 46 <1> inc si 10515 0000ABCC B316 <1> mov bl, OPERATOR_BOOL_AND 10516 0000ABCE C3 <1> retn 10517 <1> 10518 <1> od_xor: 10519 0000ABCF 3804 <1> cmp byte [si], al 10520 0000ABD1 7403 <1> je .boolean 10521 0000ABD3 B312 <1> mov bl, OPERATOR_BIT_XOR 10522 0000ABD5 C3 <1> retn 10523 <1> .boolean: 10524 0000ABD6 46 <1> inc si 10525 0000ABD7 B315 <1> mov bl, OPERATOR_BOOL_XOR 10526 0000ABD9 C3 <1> retn 10527 <1> 10528 <1> 10529 <1> od_cond: 10530 0000ABDA B317 <1> mov bl, OPERATOR_COND 10531 0000ABDC BA[6C65] <1> mov dx, msg.questionmark 10532 0000ABDF EB13 <1> jmp od_string_common 10533 <1> 10534 <1> od_o: 10535 0000ABE1 B311 <1> mov bl, OPERATOR_BIT_OR 10536 0000ABE3 BA[6F65] <1> mov dx, msg.r 10537 0000ABE6 EB0C <1> jmp od_string_common 10538 <1> 10539 <1> od_a: 10540 0000ABE8 B313 <1> mov bl, OPERATOR_BIT_AND 10541 0000ABEA BA[7165] <1> mov dx, msg.nd 10542 0000ABED EB05 <1> jmp od_string_common 10543 <1> 10544 <1> od_x: 10545 0000ABEF B312 <1> mov bl, OPERATOR_BIT_XOR 10546 0000ABF1 BA[6E65] <1> mov dx, msg.or 10547 <1> ; jmp od_string_common 10548 <1> 10549 <1> od_string_common: 10550 0000ABF4 E8E40C <1> call isstring? 10551 0000ABF7 7402 <1> je .ret 10552 <1> .none: 10553 0000ABF9 31DB <1> xor bx, bx 10554 <1> .ret: 10555 0000ABFB C3 <1> retn 10556 <1> 10557 <1> 10558 <1> ; (Binary) Expression operator functions, 10559 <1> ; used by getexpression. 10560 <1> ; These functions are called with: 10561 <1> ; INP: dword [hhvar] = previous number (left-hand operand) 10562 <1> ; byte [hhtype] = previous type 10563 <1> ; bx:dx = following number (right-hand operand) 10564 <1> ; ah = following type 10565 <1> ; OUT: bx:dx = result 10566 <1> ; ah = type 10567 <1> ; CHG: ax, cx 10568 <1> ; Note: Errors (divisor zero) are currently simply handled 10569 <1> ; by jumping to "error". 10570 <1> ; getexpression mustn't be called after until hhvar is 10571 <1> ; no longer used, as the call might overwrite hhvar. 10572 <1> ; 10573 <1> ; Type info (in ah and b[hhtype]) appears to be correctly 10574 <1> ; passed to here already. However, how should that be used? 10575 <1> ; 10576 <1> ; Quite simply, doing any arithmetic on two unsigned numbers 10577 <1> ; could return the smallest possible unsigned type (so that 10578 <1> ; if the result is <= 255 then the type is 1, if <= 65536 10579 <1> ; then the type is 2, else the type is 4). 10580 <1> ; 10581 <1> ; Handling two signed numbers here might be equally simple: 10582 <1> ; if the result is >= -128 && <= 127 then the type is 81h, 10583 <1> ; if the result is >= -32768 && <= 32767 then the type is 10584 <1> ; 82h, otherwise the type is 84h. Have to look into this. 10585 <1> ; (How does this interact with the unsignedness of the 10586 <1> ; actual computations?) 10587 <1> ; 10588 <1> ; It gets hairy when one operand is signed and the other 10589 <1> ; isn't; generally, two sub-cases of this exist: first, the 10590 <1> ; signed operand is positive, second, the signed operand is 10591 <1> ; negative. (Whether this distinction actually makes sense 10592 <1> ; for the implementation is still to be determined.) 10593 <1> ; Possible models: 10594 <1> ; * Result is always signed. 10595 <1> ; * Result is always unsigned(?!). 10596 <1> ; * Result is treated as signed, but if it's positive its 10597 <1> ; type is changed to unsigned. 10598 <1> ; 10599 <1> ; It is also possible that operators could be handled 10600 <1> ; differently, for example, (some) bit and boolean 10601 <1> ; operators could imply unsigned operands in any case. 10602 <1> ; (>>> obviously implies a signed left operand already.) 10603 <1> ; 10604 <1> ; Note that (signed) negative bit shifting counts could 10605 <1> ; imply reversing the operation; << becomes >> and such. 10606 <1> ; 10607 <1> ; Note that for the addition of, for example, bit rotation, 10608 <1> ; it would be useful to retain the originally used type 10609 <1> ; inside getdword. At the end of getdword, the current bit 10610 <1> ; counting could be changed to use the "signed" bit of the 10611 <1> ; types and then determine which signed or unsigned type is 10612 <1> ; large enough to hold the value. (It might already work 10613 <1> ; mostly like that.) (Is this specifically about binary 10614 <1> ; operators? - No. In fact, binary operators are the most 10615 <1> ; likely to be (one of) the syntactic element(s) which 10616 <1> ; should change (and possible 'optimize') types. - Then 10617 <1> ; this might still apply to unary operators, and brackets 10618 <1> ; and parentheses. In particular, the later should call 10619 <1> ; a different entry or instruct getdword not to optimize 10620 <1> ; the type at the end so as to retain it. - Although in 10621 <1> ; cases where that matters, the parentheses are arguably 10622 <1> ; unnecessary, aren't they?) 10623 <1> ; 10624 <1> ; It has to be decided whether there should be implicit 10625 <1> ; dispatching based on the operands' types' signedness. 10626 <1> ; For example, currently (with all operands being implied 10627 <1> ; to be unsigned) there exist >> and >>>, and there could 10628 <1> ; exist > and S>. With implicit signedness dispatching, the 10629 <1> ; behaviour of >> would change: it would expose the current 10630 <1> ; >>'s behaviour with an unsigned (left) operand, and the 10631 <1> ; current >>>'s behaviour with a signed (left) operand. 10632 <1> ; (Either U(nsigned)>> and S(igned)>> operators could then 10633 <1> ; exist, which would imply an unsigned or signed left 10634 <1> ; operand respectively, or the affected operands' signedness 10635 <1> ; could be changed with the currently available prefix or 10636 <1> ; possible new postfix unary operators. 10637 <1> of_modulo: 10638 0000ABFC FF36[C695] <1> push word [hhvar+2] 10639 0000AC00 FF36[C495] <1> push word [hhvar] 10640 0000AC04 53 <1> push bx 10641 0000AC05 52 <1> push dx 10642 0000AC06 E84E00 <1> call of_divide ; bx:dx := prev / foll 10643 0000AC09 8F06[C495] <1> pop word [hhvar] 10644 0000AC0D 8F06[C695] <1> pop word [hhvar+2] 10645 0000AC11 E81800 <1> call of_multiply ; bx:dx := (prev / foll) * foll 10646 0000AC14 8F06[C495] <1> pop word [hhvar] 10647 0000AC18 8F06[C695] <1> pop word [hhvar+2] 10648 <1> ; jmp short of_minus ; bx:dx := prev - ((prev / foll) * foll) 10649 <1> 10650 <1> of_minus: 10651 0000AC1C E810FF <1> call calculate_minus_bxdx 10652 <1> of_plus: 10653 0000AC1F 0316[C495] <1> add dx, word [hhvar] 10654 0000AC23 131E[C695] <1> adc bx, word [hhvar+2] 10655 <1> or_hhtype: 10656 0000AC27 0A26[CD95] <1> or ah, byte [hhtype] 10657 0000AC2B C3 <1> retn 10658 <1> 10659 <1> of_multiply: ; bx:dx := var * bx:dx 10660 0000AC2C 0826[CD95] <1> or byte [hhtype], ah 10661 0000AC30 56 <1> push si 10662 0000AC31 57 <1> push di ; si:di is used as temporary storage 10663 0000AC32 89D0 <1> mov ax, dx 10664 0000AC34 50 <1> push ax 10665 0000AC35 F726[C495] <1> mul word [hhvar] 10666 0000AC39 89C7 <1> mov di, ax 10667 0000AC3B 89D6 <1> mov si, dx 10668 0000AC3D 58 <1> pop ax 10669 0000AC3E F726[C695] <1> mul word [hhvar+2] 10670 0000AC42 01C6 <1> add si, ax 10671 0000AC44 89D8 <1> mov ax, bx 10672 0000AC46 F726[C495] <1> mul word [hhvar] 10673 0000AC4A 01C6 <1> add si, ax 10674 <1> ; bx*[hhvar+2] not required, completely overflows 10675 0000AC4C 89FA <1> mov dx, di 10676 0000AC4E 89F3 <1> mov bx, si 10677 0000AC50 5F <1> pop di 10678 0000AC51 5E <1> pop si ; restore those 10679 <1> set_hhtype: 10680 0000AC52 8A26[CD95] <1> mov ah, byte [hhtype] 10681 0000AC56 C3 <1> retn 10682 <1> 10683 <1> of_divide: ; bx:dx := var / bx:dx 10684 0000AC57 0826[CD95] <1> or byte [hhtype], ah 10685 0000AC5B 53 <1> push bx 10686 0000AC5C 09D3 <1> or bx, dx ; divisor zero ? 10687 0000AC5E 5B <1> pop bx 10688 0000AC5F 7503E9AEF8 <1> jz error ; divisor zero ! 10689 0000AC64 EB48 <1> _386_jmps .32 ; 386, use 32-bit code --> 10690 0000AC66 85DB <1> test bx, bx ; need only 16-bit divisor ? 10691 0000AC68 7514 <1> jnz .difficultdiv16 ; nope --> 10692 0000AC6A 89D1 <1> mov cx, dx 10693 0000AC6C 31D2 <1> xor dx, dx 10694 0000AC6E A1[C695] <1> mov ax, word [hhvar+2] ; dx:ax = high word of previous number 10695 0000AC71 F7F1 <1> div cx 10696 0000AC73 89C3 <1> mov bx, ax 10697 0000AC75 A1[C495] <1> mov ax, word [hhvar] ; ax = low word of previous number, dx = remainder 10698 0000AC78 F7F1 <1> div cx 10699 0000AC7A 89C2 <1> mov dx, ax ; bx:dx = result 10700 0000AC7C EBD4 <1> jmp set_hhtype 10701 <1> 10702 <1> .difficultdiv16: ; code adapted from Art of Assembly chapter 9 10703 <1> ; refer to http://www.plantation-productions.com/Webster/www.artofasm.com/DOS/ch09/CH09-4.html#HEADING4-99 10704 0000AC7E B92000 <1> mov cx, 32 10705 0000AC81 55 <1> push bp 10706 0000AC82 56 <1> push si 10707 0000AC83 57 <1> push di 10708 0000AC84 A1[C495] <1> mov ax, word [hhvar] 10709 0000AC87 8B2E[C695] <1> mov bp, word [hhvar+2] ; bp:ax = previous number 10710 0000AC8B 31FF <1> xor di, di 10711 0000AC8D 31F6 <1> xor si, si ; clear variable si:di 10712 0000AC8F 92 <1> xchg ax, dx 10713 0000AC90 87EB <1> xchg bp, bx ; bx:dx = previous number, bp:ax = divisor 10714 <1> .bitloop: 10715 0000AC92 D1E2 <1> shl dx, 1 10716 0000AC94 D1D3 <1> rcl bx, 1 10717 0000AC96 D1D7 <1> rcl di, 1 10718 0000AC98 D1D6 <1> rcl si, 1 ; si:di:bx:dx << 1 10719 0000AC9A 39EE <1> cmp si, bp ; does the divisor fit into si:di here ? 10720 0000AC9C 7502 <1> jne @F 10721 0000AC9E 39C7 <1> cmp di, ax 10722 <1> @@: 10723 0000ACA0 7205 <1> jb .trynext ; no --> 10724 <1> .goesinto: 10725 0000ACA2 29C7 <1> sub di, ax 10726 0000ACA4 19EE <1> sbb si, bp ; subtract divisor 10727 0000ACA6 42 <1> inc dx ; set a bit of the result (bit was zero before, never carries) 10728 <1> .trynext: 10729 0000ACA7 E2E9 <1> loop .bitloop ; loop for 32 bits 10730 0000ACA9 5F <1> pop di 10731 0000ACAA 5E <1> pop si 10732 0000ACAB 5D <1> pop bp 10733 0000ACAC EBA4 <1> jmp set_hhtype 10734 <1> 10735 <1> %ifn _ONLYNON386 10736 <1> .32: 10737 <1> [cpu 386] 10738 0000ACAE 6650 <1> push eax 10739 0000ACB0 6653 <1> push ebx 10740 0000ACB2 6652 <1> push edx ; to preserve the high words 10741 0000ACB4 53 <1> push bx 10742 0000ACB5 52 <1> push dx 10743 0000ACB6 665B <1> pop ebx ; ebx = following number 10744 0000ACB8 6631D2 <1> xor edx, edx 10745 0000ACBB 66A1[C495] <1> mov eax, dword [hhvar] ; edx:eax = previous number 10746 0000ACBF 66F7F3 <1> div ebx 10747 0000ACC2 665A <1> pop edx 10748 0000ACC4 665B <1> pop ebx ; restore high words 10749 0000ACC6 6650 <1> push eax 10750 0000ACC8 5A <1> pop dx 10751 0000ACC9 5B <1> pop bx ; bx:dx = result 10752 0000ACCA 6658 <1> pop eax ; restore high word of eax 10753 <1> __CPU__ 10754 0000ACCC EB84 <1> jmp set_hhtype 10755 <1> %endif 10756 <1> 10757 <1> 10758 <1> of_power: 10759 0000ACCE 0826[CD95] <1> or byte [hhtype], ah 10760 0000ACD2 89D9 <1> mov cx, bx 10761 0000ACD4 89D0 <1> mov ax, dx ; get exponent 10762 0000ACD6 09D3 <1> or bx, dx ; exponent zero ? 10763 0000ACD8 BB0000 <1> mov bx, 0 10764 0000ACDB BA0100 <1> mov dx, 1 10765 0000ACDE 743E <1> jz .ret ; yes, return with result as 1 --> 10766 0000ACE0 3916[C495] <1> cmp word [hhvar], dx ; optimization: 10767 0000ACE4 7506 <1> jne .notone 10768 0000ACE6 391E[C695] <1> cmp word [hhvar+2], bx 10769 0000ACEA 7432 <1> je .ret ; if base is one (and exponent not zero), result is 1 --> 10770 <1> .notone: 10771 0000ACEC 55 <1> push bp 10772 <1> 10773 <1> .loop: ; cx:ax non-zero here 10774 0000ACED D1E9 <1> shr cx, 1 10775 0000ACEF D1D8 <1> rcr ax, 1 ; exponent /= 2 10776 0000ACF1 50 <1> push ax 10777 0000ACF2 51 <1> push cx 10778 0000ACF3 7303 <1> jnc .even ; if exponent was even --> 10779 0000ACF5 E834FF <1> call of_multiply ; var *= base 10780 <1> .even: 10781 <1> ; In the last iteration, cx:ax might be zero here 10782 <1> ; making the next call unnecessary. Oh well. 10783 0000ACF8 53 <1> push bx 10784 0000ACF9 52 <1> push dx 10785 0000ACFA 8B1E[C695] <1> mov bx, word [hhvar+2] 10786 0000ACFE 8B16[C495] <1> mov dx, word [hhvar] ; base 10787 0000AD02 E827FF <1> call of_multiply ; * base = base squared 10788 0000AD05 891E[C695] <1> mov word [hhvar+2], bx 10789 0000AD09 8916[C495] <1> mov word [hhvar], dx ; store as new base 10790 0000AD0D 5A <1> pop dx 10791 0000AD0E 5B <1> pop bx 10792 0000AD0F 59 <1> pop cx 10793 0000AD10 58 <1> pop ax 10794 <1> 10795 0000AD11 89DD <1> mov bp, bx ; optimization: 10796 0000AD13 09D5 <1> or bp, dx ; register now zero ? 10797 0000AD15 7406 <1> jz .ret_bp ; if so, return now --> (multiplying zero always results in zero) 10798 0000AD17 89CD <1> mov bp, cx 10799 0000AD19 09C5 <1> or bp, ax ; exponent now zero ? 10800 0000AD1B 75D0 <1> jnz .loop ; no, loop --> 10801 <1> 10802 <1> .ret_bp: 10803 0000AD1D 5D <1> pop bp 10804 <1> .ret: 10805 0000AD1E E931FF <1> jmp set_hhtype 10806 <1> 10807 <1> of_compare_below_equal: 10808 0000AD21 E82C00 <1> call of_helper_compare 10809 0000AD24 7628 <1> jbe of_helper_compare_true 10810 0000AD26 C3 <1> retn 10811 <1> 10812 <1> of_compare_below: 10813 0000AD27 E82600 <1> call of_helper_compare 10814 0000AD2A 7222 <1> jb of_helper_compare_true 10815 0000AD2C C3 <1> retn 10816 <1> 10817 <1> of_compare_not_equal: 10818 0000AD2D E82000 <1> call of_helper_compare 10819 0000AD30 751C <1> jne of_helper_compare_true 10820 0000AD32 C3 <1> retn 10821 <1> 10822 <1> of_compare_equal: 10823 0000AD33 E81A00 <1> call of_helper_compare 10824 0000AD36 7416 <1> je of_helper_compare_true 10825 0000AD38 C3 <1> retn 10826 <1> 10827 <1> of_compare_above_equal: 10828 0000AD39 E81400 <1> call of_helper_compare 10829 0000AD3C 7310 <1> jae of_helper_compare_true 10830 0000AD3E C3 <1> retn 10831 <1> 10832 <1> of_compare_above: 10833 0000AD3F E80E00 <1> call of_helper_compare 10834 0000AD42 770A <1> ja of_helper_compare_true 10835 0000AD44 C3 <1> retn 10836 <1> 10837 <1> 10838 <1> ; Called by operator functions to convert a number to boolean 10839 <1> ; 10840 <1> ; INP: bx:dx 10841 <1> ; OUT: dx = 0 or 1 10842 <1> ; bx = 0 10843 <1> ; ZF 10844 <1> toboolean: 10845 0000AD45 09D3 <1> or bx, dx ; = 0 iff it was 0000_0000h 10846 0000AD47 83FB01 <1> cmp bx, byte 1 ; CY iff it was 0000_0000h, else NC 10847 0000AD4A 19D2 <1> sbb dx, dx ; -1 iff it was 0000_0000h, else 0 10848 0000AD4C 31DB <1> xor bx, bx 10849 <1> 10850 <1> ; INP: dx 10851 <1> ; OUT: dx += 1 10852 <1> of_helper_compare_true: 10853 0000AD4E 42 <1> inc dx ; bx:dx = 0 iff it was 0000_0000h, else 1 10854 <1> 10855 <1> ; Dummy operator computation function, 10856 <1> ; used when setting a register without operator (rr) 10857 <1> ; and to initialize the first getexpression loop iteration 10858 <1> ; INP: dword [hhvar] = previous number (left-hand operand) 10859 <1> ; byte [hhtype] = previous type 10860 <1> ; bx:dx = following number (right-hand operand) 10861 <1> ; ah = following type 10862 <1> ; OUT: bx:dx = result (right-hand operand) 10863 <1> ; ah = type 10864 <1> ; CHG: ax, cx 10865 <1> of_rightop: 10866 0000AD4F C3 <1> retn 10867 <1> 10868 <1> 10869 <1> ; Called by operator functions to compare operands 10870 <1> ; 10871 <1> ; INP: dword [hhvar], byte [hhtype] 10872 <1> ; bx:dx, ah 10873 <1> ; OUT: Flags as for "cmp d[hhvar], bxdx" 10874 <1> ; bx:dx = 0 10875 <1> ; ah = 0 10876 <1> of_helper_compare: 10877 0000AD50 30E4 <1> xor ah, ah ; type signed=0 pointer=0 10878 0000AD52 391E[C695] <1> cmp word [hhvar+2], bx 10879 0000AD56 7504 <1> jne .ret 10880 0000AD58 3916[C495] <1> cmp word [hhvar], dx 10881 <1> .ret: 10882 0000AD5C BB0000 <1> mov bx, 0 10883 0000AD5F 89DA <1> mov dx, bx ; set both to zero (without affecting flags) 10884 0000AD61 C3 <1> retn 10885 <1> 10886 <1> of_shift_right: 10887 0000AD62 30E4 <1> xor ah, ah 10888 0000AD64 E81F00 <1> call of_helper_getshiftdata 10889 <1> .loop: 10890 0000AD67 D1EB <1> shr bx, 1 10891 0000AD69 D1DA <1> rcr dx, 1 10892 0000AD6B E2FA <1> loop .loop 10893 0000AD6D C3 <1> retn 10894 <1> 10895 <1> of_shift_right_signed: 10896 0000AD6E B440 <1> mov ah, 40h 10897 0000AD70 E81300 <1> call of_helper_getshiftdata 10898 <1> .loop: 10899 0000AD73 D1FB <1> sar bx, 1 10900 0000AD75 D1DA <1> rcr dx, 1 10901 0000AD77 E2FA <1> loop .loop 10902 0000AD79 C3 <1> retn 10903 <1> 10904 <1> of_shift_left: 10905 0000AD7A 30E4 <1> xor ah, ah 10906 0000AD7C E80700 <1> call of_helper_getshiftdata 10907 <1> .loop: 10908 0000AD7F D1E2 <1> shl dx, 1 10909 0000AD81 D1D3 <1> rcl bx, 1 10910 0000AD83 E2FA <1> loop .loop 10911 0000AD85 C3 <1> retn 10912 <1> 10913 <1> ; Called by operator functions to get shift data 10914 <1> ; 10915 <1> ; This returns to the next caller with the unchanged input 10916 <1> ; operand if the shift count is zero. Otherwise, large shift 10917 <1> ; counts are normalized so the returned value in cx is not 10918 <1> ; zero and not higher than 32. This normalization is not just 10919 <1> ; an optimization, it's required for shift counts that don't 10920 <1> ; fit into a 16-bit counter. 10921 <1> ; 10922 <1> ; INP: bx:dx = shift count 10923 <1> ; OUT: bx:dx = input operand 10924 <1> ; If shift count is >= 1 and <= 32, 10925 <1> ; cx = shift count 10926 <1> ; If shift count is > 32, 10927 <1> ; cx = 32 10928 <1> ; If shift count is zero, 10929 <1> ; discards one near return address before returning 10930 <1> ; CHG: cx 10931 <1> of_helper_getshiftdata: 10932 0000AD86 89D1 <1> mov cx, dx 10933 0000AD88 85DB <1> test bx, bx 10934 0000AD8A 7505 <1> jnz .largeshift 10935 0000AD8C 83FA20 <1> cmp dx, byte 32 10936 0000AD8F 7203 <1> jb .normalshift 10937 <1> .largeshift: 10938 0000AD91 B92000 <1> mov cx, 32 ; fix at maximal shift count 10939 <1> .normalshift: 10940 0000AD94 8B16[C495] <1> mov dx, word [hhvar] 10941 0000AD98 8B1E[C695] <1> mov bx, word [hhvar+2] 10942 0000AD9C E301 <1> jcxz .break ; shift count zero, return input --> 10943 0000AD9E C3 <1> retn 10944 <1> 10945 <1> .break: 10946 0000AD9F 59 <1> pop cx ; discard near return address 10947 0000ADA0 C3 <1> retn 10948 <1> 10949 <1> of_bit_mirror: 10950 0000ADA1 30E4 <1> xor ah, ah 10951 0000ADA3 89D1 <1> mov cx, dx 10952 0000ADA5 85DB <1> test bx, bx 10953 0000ADA7 7505 <1> jnz .large 10954 0000ADA9 83FA40 <1> cmp dx, byte 64 10955 0000ADAC 7205 <1> jb .normal 10956 <1> .large: 10957 0000ADAE 31DB <1> xor bx, bx ; mirror count 64 or higher: 10958 0000ADB0 31D2 <1> xor dx, dx ; all 32 bits mirrored with (nonexistent) zero bits 10959 0000ADB2 C3 <1> retn 10960 <1> .normal: 10961 0000ADB3 8B16[C495] <1> mov dx, word [hhvar] 10962 0000ADB7 8B1E[C695] <1> mov bx, word [hhvar+2] 10963 0000ADBB 80F901 <1> cmp cl, 1 10964 0000ADBE 762B <1> jbe .ret ; mirror count one or zero, return input --> 10965 0000ADC0 56 <1> push si 10966 0000ADC1 57 <1> push di 10967 <1> 10968 0000ADC2 51 <1> push cx 10969 0000ADC3 BFFFFF <1> mov di, -1 10970 0000ADC6 89FE <1> mov si, di 10971 <1> .loopmask: 10972 0000ADC8 D1E7 <1> shl di, 1 10973 0000ADCA D1D6 <1> rcl si, 1 10974 0000ADCC E2FA <1> loop .loopmask ; create mask of bits not involved in mirroring 10975 0000ADCE 21DE <1> and si, bx 10976 0000ADD0 21D7 <1> and di, dx ; get the uninvolved bits 10977 0000ADD2 59 <1> pop cx 10978 <1> 10979 0000ADD3 56 <1> push si 10980 0000ADD4 57 <1> push di ; save them 10981 0000ADD5 31F6 <1> xor si, si 10982 0000ADD7 31FF <1> xor di, di ; initialize mirrored register 10983 <1> .loop: 10984 0000ADD9 D1EB <1> shr bx, 1 10985 0000ADDB D1DA <1> rcr dx, 1 ; shift out of original register's current LSB 10986 0000ADDD D1D7 <1> rcl di, 1 10987 0000ADDF D1D6 <1> rcl si, 1 ; into other register's current LSB 10988 0000ADE1 E2F6 <1> loop .loop 10989 0000ADE3 5A <1> pop dx 10990 0000ADE4 5B <1> pop bx ; restore uninvolved bits 10991 0000ADE5 09F3 <1> or bx, si 10992 0000ADE7 09FA <1> or dx, di ; combine with mirrored bits 10993 <1> 10994 0000ADE9 5F <1> pop di 10995 0000ADEA 5E <1> pop si 10996 <1> .ret: 10997 0000ADEB C3 <1> retn 10998 <1> 10999 <1> of_or_bitwise: 11000 0000ADEC 0B16[C495] <1> or dx, word [hhvar] 11001 0000ADF0 0B1E[C695] <1> or bx, word [hhvar+2] ; bitwise or 11002 <1> or_hhtype_1: 11003 0000ADF4 E930FE <1> jmp or_hhtype 11004 <1> 11005 <1> of_or_boolean: 11006 0000ADF7 E82700 <1> call of_helper_getbool 11007 0000ADFA 09DA <1> or dx, bx ; boolean or 11008 0000ADFC EB20 <1> jmp short of_helper_retbool 11009 <1> 11010 <1> of_and_bitwise: 11011 0000ADFE 2316[C495] <1> and dx, word [hhvar] 11012 0000AE02 231E[C695] <1> and bx, word [hhvar+2] ; bitwise and 11013 0000AE06 EBEC <1> jmp or_hhtype_1 11014 <1> 11015 <1> of_and_boolean: 11016 0000AE08 E81600 <1> call of_helper_getbool 11017 0000AE0B 21DA <1> and dx, bx ; boolean and 11018 0000AE0D EB0F <1> jmp short of_helper_retbool 11019 <1> 11020 <1> of_xor_bitwise: 11021 0000AE0F 3316[C495] <1> xor dx, word [hhvar] 11022 0000AE13 331E[C695] <1> xor bx, word [hhvar+2] ; bitwise xor 11023 0000AE17 EBDB <1> jmp or_hhtype_1 11024 <1> 11025 <1> of_xor_boolean: 11026 0000AE19 E80500 <1> call of_helper_getbool 11027 0000AE1C 31DA <1> xor dx, bx ; boolean xor 11028 <1> of_helper_retbool: 11029 0000AE1E 31DB <1> xor bx, bx ; high word always zero 11030 0000AE20 C3 <1> retn 11031 <1> 11032 <1> ; Called by operator functions to convert operands to boolean 11033 <1> ; 11034 <1> ; INP: bx:dx = next number, ah = type 11035 <1> ; [hhvar] = previous number, [hhtype] = type 11036 <1> ; OUT: bx = next number's boolean value 11037 <1> ; dx = previous number's boolean value 11038 <1> ; ah = 0 11039 <1> of_helper_getbool: 11040 0000AE21 30E4 <1> xor ah, ah 11041 0000AE23 E81FFF <1> call toboolean 11042 0000AE26 52 <1> push dx 11043 0000AE27 8B16[C495] <1> mov dx, word [hhvar] 11044 0000AE2B 8B1E[C695] <1> mov bx, word [hhvar+2] 11045 0000AE2F E813FF <1> call toboolean 11046 0000AE32 5B <1> pop bx 11047 0000AE33 C3 <1> retn 11048 <1> 11049 <1> 11050 <1> usesection lDEBUG_DATA_ENTRY 11051 <1> 11052 <1> isvariable_data: 11053 <1> 11054 <1> %if _DEBUG3 11055 <1> align 8, db 0 11056 <1> kregs: dd 0 11057 <1> dd 1 11058 <1> dd 0aa55aa55h 11059 <1> dd -1 11060 <1> times 12 dd 0 11061 <1> %endif 11062 <1> 11063 00009142 00 <1> align 8, db 0 11064 <1> isvariable_struc_list: 11065 <1> 11066 <1> %assign IVS_ONEBYTE 1 11067 <1> isvariable_struc_onebyte_list: 11068 <1> ; name, size, flags, address, array last index, array skip 11069 00009148 00003000[E40C]FF00 <1> isvariablestruc "V", 4, 0, vregs, 255 11070 <1> %if _DEBUG3 11071 <1> isvariablestruc "K", 4, 0, kregs, 15 11072 <1> %endif 11073 <1> isvariable_struc_onebyte_list_end: 11074 <1> 11075 <1> %assign IVS_ONEBYTE 0 11076 <1> isvariable_struc_morebyte_list: 11077 00009150 [C694]0100[E60B]00- <1> isvariablestruc "MMT", 1, 0, maxmachinetype 11077 00009157 00 <1> 11078 00009158 [C794]3103[7C00]04- <1> isvariablestruc "DCO", 4, ivfArrayOneBased | ivfArrayOptional, options, 4 11078 0000915F 00 <1> 11080 00009160 [C894]B103[8C00]04- <1> isvariablestruc "DCS", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, startoptions, 4 11080 00009167 00 <1> 11082 00009168 [C994]B103[9C00]04- <1> isvariablestruc "DIF", 4, ivfReadOnly | ivfArrayOneBased | ivfArrayOptional, internalflags, 4 11082 0000916F 00 <1> 11084 00009170 [CA94]3100[AC00]00- <1> isvariablestruc "DAO", 4, 0, asm_options 11084 00009177 00 <1> 11086 00009178 [CB94]B100[B000]00- <1> isvariablestruc "DAS", 4, ivfReadOnly, asm_startoptions 11086 0000917F 00 <1> 11088 00009180 [CC94]B100[C80A]00- <1> isvariablestruc "DPI", 4, ivfReadOnly, psp22 11088 00009187 00 <1> 11090 00009188 [CD94]9100[A60A]00- <1> isvariablestruc "DPR", 2, ivfReadOnly, pspdbg 11090 0000918F 00 <1> 11092 00009190 [CE94]9100[CC0A]00- <1> isvariablestruc "DPP", 2, ivfReadOnly, parent 11092 00009197 00 <1> 11094 <1> %if _PM 11095 00009198 [CF94]D100[34AE]00- <1> isvariablestruc "DPS", 2, ivfReadOnly | ivfSpecialSetUp, var_seldbg_setup 11095 0000919F 00 <1> 11097 <1> %endif 11098 <1> 11099 000091A0 [D094]3100[F886]00- <1> isvariablestruc "PPC", 4, 0, default_pp_count 11099 000091A7 00 <1> 11100 000091A8 [D194]3100[FC86]00- <1> isvariablestruc "TPC", 4, 0, default_tp_count 11100 000091AF 00 <1> 11101 000091B0 [D294]3100[0087]00- <1> isvariablestruc "TTC", 4, 0, default_tt_count 11101 000091B7 00 <1> 11102 <1> 11103 000091B8 [D394]3500[EC09]00- <1> isvariablestruc "RELIMIT", 4, 0, re_limit 11103 000091BF 00 <1> 11104 000091C0 [D894]3500[E809]00- <1> isvariablestruc "RECOUNT", 4, 0, re_count 11104 000091C7 00 <1> 11105 <1> 11106 000091C8 [DD94]1000[F20A]00- <1> isvariablestruc "RC", 2, 0, priorrc 11106 000091CF 00 <1> 11107 000091D0 [DD94]1100[F40A]00- <1> isvariablestruc "ERC", 2, 0, erc 11107 000091D7 00 <1> 11108 000091D8 [DE94]0400[110C]00- <1> isvariablestruc "QQCODE", 1, 0, termcode 11108 000091DF 00 <1> 11109 <1> 11110 <1> %if _PM 11111 <1> %assign var_addr_offset 4 11112 <1> %else 11113 <1> %assign var_addr_offset 2 11114 <1> %endif 11115 <1> 11116 000091E0 [E294]3100[000B]00- <1> isvariablestruc "AAO", var_addr_offset, 0, a_addr 11116 000091E7 00 <1> 11117 000091E8 [E394]1100[040B]00- <1> isvariablestruc "AAS", 2, 0, a_addr + saSegSel 11117 000091EF 00 <1> 11118 000091F0 [E494]3100[0A0B]00- <1> isvariablestruc "ADO", var_addr_offset, 0, d_addr 11118 000091F7 00 <1> 11119 000091F8 [E594]1100[0E0B]00- <1> isvariablestruc "ADS", 2, 0, d_addr + saSegSel 11119 000091FF 00 <1> 11120 00009200 [E694]3100[140B]00- <1> isvariablestruc "ABO", var_addr_offset, 0, behind_r_u_addr 11120 00009207 00 <1> 11121 00009208 [E794]1100[180B]00- <1> isvariablestruc "ABS", 2, 0, behind_r_u_addr + saSegSel 11121 0000920F 00 <1> 11122 00009210 [E894]3100[1E0B]00- <1> isvariablestruc "AUO", var_addr_offset, 0, u_addr 11122 00009217 00 <1> 11123 00009218 [E994]1100[220B]00- <1> isvariablestruc "AUS", 2, 0, u_addr + saSegSel 11123 0000921F 00 <1> 11124 00009220 [EA94]3100[280B]00- <1> isvariablestruc "AEO", var_addr_offset, 0, e_addr 11124 00009227 00 <1> 11125 00009228 [EB94]1100[2C0B]00- <1> isvariablestruc "AES", 2, 0, e_addr + saSegSel 11125 0000922F 00 <1> 11126 <1> %if _DSTRINGS 11127 00009230 [EC94]3100[320B]00- <1> isvariablestruc "AZO", var_addr_offset, 0, dz_addr 11127 00009237 00 <1> 11128 00009238 [ED94]1100[360B]00- <1> isvariablestruc "AZS", 2, 0, dz_addr + saSegSel 11128 0000923F 00 <1> 11129 00009240 [EE94]3100[3C0B]00- <1> isvariablestruc "ACO", var_addr_offset, 0, dcpm_addr 11129 00009247 00 <1> 11130 00009248 [EF94]1100[400B]00- <1> isvariablestruc "ACS", 2, 0, dcpm_addr + saSegSel 11130 0000924F 00 <1> 11131 00009250 [F094]3100[460B]00- <1> isvariablestruc "APO", var_addr_offset, 0, dcount_addr 11131 00009257 00 <1> 11132 00009258 [F194]1100[4A0B]00- <1> isvariablestruc "APS", 2, 0, dcount_addr + saSegSel 11132 0000925F 00 <1> 11133 00009260 [F294]3100[500B]00- <1> isvariablestruc "AWO", var_addr_offset, 0, dwcount_addr 11133 00009267 00 <1> 11134 00009268 [F394]1100[540B]00- <1> isvariablestruc "AWS", 2, 0, dwcount_addr + saSegSel 11134 0000926F 00 <1> 11135 <1> %endif 11136 <1> %if _PM 11137 00009270 [F494]3100[000B]00- <1> isvariablestruc "AXO", 4, 0, a_addr 11137 00009277 00 <1> 11138 <1> %endif 11139 <1> 11140 00009278 [F594]0100[E70B]00- <1> isvariablestruc "DSR", 1, 0, serial_rows 11140 0000927F 00 <1> 11141 00009280 [F694]0100[E80B]00- <1> isvariablestruc "DSC", 1, 0, serial_columns 11141 00009287 00 <1> 11142 00009288 [F794]0100[E90B]00- <1> isvariablestruc "DST", 1, 0, serial_keep_timeout 11142 0000928F 00 <1> 11143 <1> %if _USE_TX_FIFO 11144 00009290 [F894]0100[EA0B]00- <1> isvariablestruc "DSF", 1, 0, serial_fifo_size 11144 00009297 00 <1> 11145 <1> %endif 11146 00009298 [F994]0300[EC0B]00- <1> isvariablestruc "DSPVI", 1, 0, serial_var_intnum 11146 0000929F 00 <1> 11147 000092A0 [FC94]8300[2209]00- <1> isvariablestruc "DSPUI", 1, ivfReadOnly, serial_use_intnum 11147 000092A7 00 <1> 11148 000092A8 [FF94]0300[ED0B]00- <1> isvariablestruc "DSPVS", 1, 0, serial_var_params 11148 000092AF 00 <1> 11149 000092B0 [0295]8300[2309]00- <1> isvariablestruc "DSPUS", 1, ivfReadOnly, serial_use_params 11149 000092B7 00 <1> 11150 000092B8 [0595]0300[EE0B]00- <1> isvariablestruc "DSPVF", 1, 0, serial_var_fifo 11150 000092BF 00 <1> 11151 000092C0 [0895]8300[2409]00- <1> isvariablestruc "DSPUF", 1, ivfReadOnly, serial_use_fifo 11151 000092C7 00 <1> 11152 000092C8 [0B95]1300[F00B]00- <1> isvariablestruc "DSPVP", 2, 0, serial_var_baseport 11152 000092CF 00 <1> 11153 000092D0 [0E95]9300[2609]00- <1> isvariablestruc "DSPUP", 2, ivfReadOnly, serial_use_baseport 11153 000092D7 00 <1> 11154 000092D8 [1195]0300[F20B]00- <1> isvariablestruc "DSPVD", 1, 0, serial_var_dl 11154 000092DF 00 <1> 11155 000092E0 [1495]8300[2809]00- <1> isvariablestruc "DSPUD", 1, ivfReadOnly, serial_use_dl 11155 000092E7 00 <1> 11156 000092E8 [1795]0300[F40B]00- <1> isvariablestruc "DSPVM", 1, 0, serial_var_irqmask 11156 000092EF 00 <1> 11157 000092F0 [1A95]8300[2A09]00- <1> isvariablestruc "DSPUM", 1, ivfReadOnly, serial_use_irqmask 11157 000092F7 00 <1> 11158 <1> 11159 000092F8 [1D95]0100[F60B]00- <1> isvariablestruc "IOR", 1, 0, io_rows 11159 000092FF 00 <1> 11160 00009300 [1E95]0100[F70B]00- <1> isvariablestruc "IOC", 1, 0, io_columns 11160 00009307 00 <1> 11161 00009308 [1F95]1100[F80B]00- <1> isvariablestruc "IOS", 2, 0, io_start_buffer 11161 0000930F 00 <1> 11162 00009310 [2095]1100[FA0B]00- <1> isvariablestruc "IOE", 2, 0, io_end_buffer 11162 00009317 00 <1> 11163 00009318 [2195]1100[FC0B]00- <1> isvariablestruc "IOL", 2, 0, io_levels 11163 0000931F 00 <1> 11164 00009320 [2295]1100[FE0B]00- <1> isvariablestruc "IOF", 2, 0, io_flags 11164 00009327 00 <1> 11165 00009328 [2395]D100[43AE]00- <1> isvariablestruc "IOI", 2, ivfReadOnly | ivfSpecialSetUp, var_ioi_setup 11165 0000932F 00 <1> 11166 <1> 11167 <1> %if _CATCHINT2D 11168 00009330 [2495]8500[6081]00- <1> isvariablestruc "AMISNUM", 1, ivfReadOnly, amis_multiplex_number 11168 00009337 00 <1> 11169 00009338 [2995]0800[4881]00- <1> isvariablestruc "TRYAMISNUM", 1, 0, try_amis_multiplex_number 11169 0000933F 00 <1> 11170 <1> %endif 11171 <1> 11172 00009340 [3195]3600[2490]00- <1> isvariablestruc "HHRESULT", 4, 0, hhresult 11172 00009347 00 <1> 11173 <1> 11174 <1> %if _DEBUG1 11175 <1> isvariablestruc "TRC", 2, ivfArrayOptional, test_records_Readmem + 4, 15, 4 11177 <1> isvariablestruc "TRA", 4, ivfArrayOptional, test_records_Readmem, 15, 2 11179 <1> isvariablestruc "TWC", 2, ivfArrayOptional, test_records_Writemem + 4, 15, 4 11181 <1> isvariablestruc "TWA", 4, ivfArrayOptional, test_records_Writemem, 15, 2 11183 <1> isvariablestruc "TLC", 2, ivfArrayOptional, test_records_getLinear + 4, 15, 4 11185 <1> isvariablestruc "TLA", 4, ivfArrayOptional, test_records_getLinear, 15, 2 11187 <1> isvariablestruc "TSC", 2, ivfArrayOptional, test_records_getSegmented + 4, 15, 4 11189 <1> isvariablestruc "TSA", 4, ivfArrayOptional, test_records_getSegmented, 15, 2 11191 <1> isvariablestruc "TRV", 1, 0, test_readmem_value 11193 <1> %endif 11194 <1> 11195 <1> 11196 <1> %if _PM 11197 00009348 [3795]B102[6C0B]0F- <1> isvariablestruc "SRO", 4, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 11197 0000934F 02 <1> 11199 00009350 [3895]9102[700B]0F- <1> isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 4, 15, 4 11199 00009357 04 <1> 11201 <1> %else 11202 <1> isvariablestruc "SRO", 2, ivfArrayOptional | ivfReadOnly, search_results, 15, 2 11204 <1> isvariablestruc "SRS", 2, ivfArrayOptional | ivfReadOnly, search_results + 2, 15, 2 11206 <1> %endif 11207 00009358 [3995]B100[CC0B]00- <1> isvariablestruc "SRC", 4, ivfReadOnly, sscounter 11207 0000935F 00 <1> 11209 <1> 11210 00009360 [3A95]D004[25B2]FF- <1> isvariablestruc "RI", 2, ivfSpecialSetUp | ivfSeparatorSpecial | ivfReadOnly, var_ri_setup, 255 11210 00009367 00 <1> 11212 <1> 11213 <1> %if _DEBUG3 11214 <1> isvariablestruc "MT", 4, ivfSpecialSetUp, var_mt_setup, 1 11215 <1> %endif 11216 <1> 11217 <1> %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 11218 00009368 [3A95]5102[A7B2]0F- <1> isvariablestruc "YSF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 11218 0000936F 00 <1> 11220 <1> %if _INPUT_FILE_HANDLES 11221 00009370 [3B95]5102[A7B2]0F- <1> isvariablestruc "YHF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 11221 00009377 00 <1> 11223 <1> %endif 11224 <1> %if _INPUT_FILE_BOOT 11225 00009378 [3C95]5102[A7B2]0F- <1> isvariablestruc "YBF", 2, ivfSpecialSetUp | ivfArrayOptional, var_ysf_setup, 15 11225 0000937F 00 <1> 11227 <1> %endif 11228 <1> %endif 11229 <1> 11230 <1> %if _ACCESS_VARIABLES_AMOUNT 11231 00009380 [3D95]B502[0483]03- <1> isvariablestruc "READADR", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 11231 00009387 04 <1> 11233 00009388 [4295]B502[0883]03- <1> isvariablestruc "READLEN", 4, ivfReadOnly | ivfArrayOptional, reading_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 11233 0000938F 04 <1> 11235 00009390 [4795]B502[2483]03- <1> isvariablestruc "WRITADR", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables, _ACCESS_VARIABLES_AMOUNT - 1, 4 11235 00009397 04 <1> 11237 00009398 [4C95]B502[2883]03- <1> isvariablestruc "WRITLEN", 4, ivfReadOnly | ivfArrayOptional, writing_access_variables + 4, _ACCESS_VARIABLES_AMOUNT - 1, 4 11237 0000939F 04 <1> 11239 <1> %endif 11240 <1> 11241 <1> %if _PSPVARIABLES 11242 000093A0 [5195]9200[A40A]00- <1> isvariablestruc "PSPS", 2, ivfReadOnly, pspdbe 11242 000093A7 00 <1> 11243 000093A8 [5395]D100[4DAE]00- <1> isvariablestruc "PSP", 2, ivfReadOnly | ivfSpecialSetUp, var_psp_setup 11243 000093AF 00 <1> 11244 000093B0 [5495]D100[57AE]00- <1> isvariablestruc "PPR", 2, ivfReadOnly | ivfSpecialSetUp, var_ppr_setup 11244 000093B7 00 <1> 11245 000093B8 [5595]F100[70AE]00- <1> isvariablestruc "PPI", 4, ivfReadOnly | ivfSpecialSetUp, var_ppi_setup 11245 000093BF 00 <1> 11246 <1> %endif 11247 <1> 11248 <1> %if _BOOTLDR 11249 000093C0 [5695]4800[26AF]FF- <1> isvariablestruc "BOOTUNITFL", 1, ivfSpecialSetUp, var_bootunitflags_setup, 255 11249 000093C7 00 <1> 11250 000093C8 [5E95]C900[E4AE]00- <1> isvariablestruc "BOOTLDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootldpunit_setup 11250 000093CF 00 <1> 11251 000093D0 [6795]C900[E9AE]00- <1> isvariablestruc "BOOTSDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootsdpunit_setup 11251 000093D7 00 <1> 11252 <1> %if _INPUT_FILE_BOOT 11253 000093D8 [7095]C900[EEAE]00- <1> isvariablestruc "BOOTYDPUNIT", 1, ivfReadOnly | ivfSpecialSetUp, var_bootydpunit_setup 11253 000093DF 00 <1> 11254 <1> %endif 11255 000093E0 [7995]F900[05AF]00- <1> isvariablestruc "BOOTLDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootldppart_setup 11255 000093E7 00 <1> 11256 000093E8 [8295]F900[0AAF]00- <1> isvariablestruc "BOOTSDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootsdppart_setup 11256 000093EF 00 <1> 11257 <1> %if _INPUT_FILE_BOOT 11258 000093F0 [8B95]F900[0FAF]00- <1> isvariablestruc "BOOTYDPPART", 4, ivfReadOnly | ivfSpecialSetUp, var_bootydppart_setup 11258 000093F7 00 <1> 11259 <1> %endif 11260 <1> %endif 11261 <1> 11262 000093F8 [9495]0900[4981]00- <1> isvariablestruc "TRYDEBUGNUM", 1, 0, try_debugger_amis_multiplex_number 11262 000093FF 00 <1> 11263 00009400 [9D95]9700[1681]00- <1> isvariablestruc "DEBUGFUNC", 2, ivfReadOnly, debuggerfunction 11263 00009407 00 <1> 11264 <1> 11265 <1> isvariable_struc_morebyte_list_end: 11266 <1> isvariable_struc_list_end: 11267 <1> 11268 <1> align 2, db 0 11269 00009408 00000000 <1> interrupt_var: dd 0 11270 <1> align 2, db 0 11271 0000940C 0000 <1> ioi_var: dw 0 11272 <1> %if _PM 11273 <1> align 2, db 0 11274 0000940E 0000 <1> seldbg: dw 0 11275 <1> %endif 11276 <1> %if _PSPVARIABLES 11277 <1> align 2, db 0 11278 00009410 0000 <1> psp_segment: dw 0 11279 00009412 0000 <1> psp_parent: dw 0 11280 00009414 00000000 <1> psp_pra: dd 0 11281 <1> %endif 11282 <1> 11283 <1> align 2, db 0 11284 <1> isvariable_morebyte_nameheaders: 11285 00009418 4D4D44434443444944- <1> dw IVS_MOREBYTE_NAMEHEADERS 11285 00009421 414441445044504450- <1> 11285 0000942A 445050505450545452- <1> 11285 00009433 455245524345525151- <1> 11285 0000943C 414141414144414441- <1> 11285 00009445 424142415541554145- <1> 11285 0000944E 4145415A415A414341- <1> 11285 00009457 434150415041574157- <1> 11285 00009460 415844534453445344- <1> 11285 00009469 534453445344534453- <1> 11285 00009472 445344534453445344- <1> 11285 0000947B 53445344534453494F- <1> 11285 00009484 494F494F494F494F49- <1> 11285 0000948D 4F494F414D54524848- <1> 11285 00009496 535253525352524959- <1> 11285 0000949F 535948594252455245- <1> 11285 000094A8 575257525053505350- <1> 11285 000094B1 505050424F424F424F- <1> 11285 000094BA 424F424F424F424F54- <1> 11285 000094C3 524445 <1> 11286 <1> .end: 11287 <1> %if IVS_HAVE_ONEBYTE && ! IVS_SINGLE_ONEBYTE 11288 <1> isvariable_onebyte_names: 11289 <1> db IVS_ONEBYTE_NAMES 11290 <1> .end: 11291 <1> %endif 11292 <1> 11293 000094C6 544F53464F53495250- <1> isvariablestrings ISVARIABLESTRINGS 11293 000094CF 534343434C494D4954- <1> 11293 000094D8 434F554E5443434F44- <1> 11293 000094E1 454F534F534F534F53- <1> 11293 000094EA 4F534F534F534F534F- <1> 11293 000094F3 534F52435446505649- <1> 11293 000094FC 505549505653505553- <1> 11293 00009505 505646505546505650- <1> 11293 0000950E 505550505644505544- <1> 11293 00009517 50564D50554D524353- <1> 11293 00009520 454C464949534E554D- <1> 11293 00009529 59414D49534E554D52- <1> 11293 00009532 4553554C544F534346- <1> 11293 0000953B 464641444144524144- <1> 11293 00009544 4C454E495441445249- <1> 11293 0000954D 544C454E5053505249- <1> 11293 00009556 4F54554E4954464C4F- <1> 11293 0000955F 544C4450554E49544F- <1> 11293 00009568 54534450554E49544F- <1> 11293 00009571 54594450554E49544F- <1> 11293 0000957A 544C4450504152544F- <1> 11293 00009583 54534450504152544F- <1> 11293 0000958C 545944505041525459- <1> 11293 00009595 44454255474E554D42- <1> 11293 0000959E 554746554E43 <1> 11294 <1> 11295 <1> 11296 <1> usesection lDEBUG_CODE 11297 <1> isvariable_code: 11298 <1> 11299 <1> %if _PM 11300 <1> var_seldbg_setup: 11301 0000AE34 BB[0E94] <1> mov bx, seldbg 11302 0000AE37 832700 <1> and word [bx], byte 0 11303 0000AE3A E8C0E3 <1> call ispm 11304 0000AE3D 7502 <1> jnz @F 11305 0000AE3F 8C1F <1> mov word [bx], ds 11306 <1> @@: 11307 0000AE41 F8 <1> clc 11308 0000AE42 C3 <1> retn 11309 <1> %endif 11310 <1> 11311 <1> %if _DEBUG3 11312 <1> var_mt_setup: 11313 <1> mov bx, ax 11314 <1> add bx, bx 11315 <1> add bx, bx 11316 <1> mov di, bx 11317 <1> add bx, mtest_regs 11318 <1> add di, masks_test 11319 <1> clc 11320 <1> retn 11321 <1> %endif 11322 <1> 11323 <1> var_ioi_setup: 11324 0000AE43 E8E60F <1> call peekc 11325 0000AE46 BB[0C94] <1> mov bx, ioi_var 11326 0000AE49 8907 <1> mov word [bx], ax 11327 0000AE4B F8 <1> clc 11328 0000AE4C C3 <1> retn 11329 <1> 11330 <1> %if _PSPVARIABLES 11331 <1> var_psp_setup: 11332 0000AE4D BB[1094] <1> mov bx, psp_segment 11333 0000AE50 E83B00 <1> call var_get_psp_segment 11334 0000AE53 8907 <1> mov word [bx], ax 11335 0000AE55 F8 <1> clc 11336 0000AE56 C3 <1> retn 11337 <1> 11338 <1> 11339 <1> var_ppr_setup: 11340 0000AE57 BB[1294] <1> mov bx, psp_parent 11341 0000AE5A 31C0 <1> xor ax, ax 11342 0000AE5C 8907 <1> mov word [bx], ax 11343 0000AE5E E84700 <1> call var_get_psp_selector 11344 0000AE61 7206 <1> jc @F 11345 0000AE63 26A11600 <1> mov ax, word [es:16h] 11346 0000AE67 8907 <1> mov word [bx], ax ; retrieve parent process 11347 <1> @@: 11348 0000AE69 16 <1> push ss 11349 0000AE6A 07 <1> pop es 11350 <1> %if _PM ; This is not really needed but does not hurt either. 11351 <1> ; getsegmented is used above, but only from PM. 11352 <1> ; This is assumed not to switch modes. 11353 0000AE6B E83D8A <1> call resetmode ; reset mode if we switched 11354 <1> %endif 11355 0000AE6E F8 <1> clc 11356 0000AE6F C3 <1> retn 11357 <1> 11358 <1> 11359 <1> var_ppi_setup: 11360 0000AE70 BB[1494] <1> mov bx, psp_pra 11361 0000AE73 31C0 <1> xor ax, ax 11362 0000AE75 8907 <1> mov word [bx], ax 11363 0000AE77 894702 <1> mov word [bx + 2], ax 11364 0000AE7A E82B00 <1> call var_get_psp_selector 11365 0000AE7D 72EA <1> jc @B 11366 0000AE7F 26A10A00 <1> mov ax, word [es:TPIV] 11367 0000AE83 8907 <1> mov word [bx], ax 11368 0000AE85 26A10C00 <1> mov ax, word [es:TPIV + 2] 11369 0000AE89 894702 <1> mov word [bx + 2], ax ; retrieve Int22 address 11370 0000AE8C EBDB <1> jmp @B 11371 <1> 11372 <1> 11373 <1> var_get_psp_segment: 11374 0000AE8E A1[A40A] <1> mov ax, word [pspdbe] 11375 0000AE91 40 <1> inc ax ; FFFFh ? 11376 0000AE92 7410 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11377 0000AE94 48 <1> dec ax ; 0 ? 11378 0000AE95 740D <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11379 <1> %if _PM 11380 0000AE97 50 <1> push ax 11381 0000AE98 E816AF <1> call selector_to_segment 11382 0000AE9B 58 <1> pop ax 11383 0000AE9C 40 <1> inc ax ; FFFFh ? 11384 0000AE9D 7405 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11385 0000AE9F 48 <1> dec ax ; 0 ? 11386 0000AEA0 7402 <1> jz short .pspvar_psp_invalid ; yes, invalid --> 11387 <1> %endif 11388 0000AEA2 F8 <1> clc 11389 0000AEA3 C3 <1> retn 11390 <1> 11391 <1> .pspvar_psp_invalid: 11392 0000AEA4 31C0 <1> xor ax, ax 11393 0000AEA6 F9 <1> stc 11394 0000AEA7 C3 <1> retn 11395 <1> 11396 <1> 11397 <1> var_get_psp_selector: 11398 0000AEA8 E8E3FF <1> call var_get_psp_segment 11399 0000AEAB 7230 <1> jc .pspvar_psp_invalid 11400 <1> %if _PM 11401 0000AEAD E84DE3 <1> call ispm 11402 0000AEB0 751E <1> jnz short .pspvar_rm 11403 0000AEB2 53 <1> push bx 11404 0000AEB3 66 <1> _386_o32 ; push edx 11405 0000AEB4 52 <1> push dx 11406 0000AEB5 51 <1> push cx 11407 0000AEB6 31D2 <1> xor dx, dx 11408 0000AEB8 B90400 <1> mov cx, 4 11409 <1> .pspvar_shift: 11410 0000AEBB D1E0 <1> shl ax, 1 11411 0000AEBD D1D2 <1> rcl dx, 1 11412 0000AEBF E2FA <1> loop .pspvar_shift ; dx:ax = PSP segment << 4 11413 0000AEC1 E80C8A <1> call getsegmented 11414 <1> ; getsegmented is assumed not to switch modes (see below). 11415 0000AEC4 7219 <1> jc short .pspvar_error ; (shouldn't happen) 11416 0000AEC6 66 <1> _386_o32 11417 0000AEC7 85D2 <1> test dx, dx ; test edx, edx 11418 0000AEC9 7514 <1> jnz short .pspvar_error ; (assumed not to happen) 11419 0000AECB 59 <1> pop cx 11420 0000AECC 66 <1> _386_o32 11421 0000AECD 5A <1> pop dx ; pop edx 11422 0000AECE 93 <1> xchg ax, bx ; ax = selector 11423 0000AECF 5B <1> pop bx 11424 <1> .pspvar_rm: 11425 <1> %endif 11426 0000AED0 8EC0 <1> mov es, ax ; es = segment/selector 11427 0000AED2 26813E0000CD20 <1> cmp word [es:0], 20CDh ; int 20h opcode ? 11428 0000AED9 7502 <1> jne short .pspvar_psp_invalid ; no, invalid --> 11429 0000AEDB F8 <1> clc 11430 0000AEDC C3 <1> retn 11431 <1> 11432 <1> .pspvar_psp_invalid: 11433 0000AEDD F9 <1> stc 11434 0000AEDE C3 <1> retn 11435 <1> 11436 <1> .pspvar_error: 11437 0000AEDF 31F6 <1> xor si, si 11438 0000AEE1 E92EF6 <1> jmp error 11439 <1> %endif 11440 <1> 11441 <1> 11442 <1> %if _BOOTLDR 11443 <1> var_bootldpunit_setup: 11444 0000AEE4 BB[508C] <1> mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + ebpbNew + bpbnBootUnit 11446 0000AEE7 EB45 <1> jmp @F 11447 <1> 11448 <1> var_bootsdpunit_setup: 11449 0000AEE9 BB[F08C] <1> mov bx, load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit 11451 0000AEEC EB40 <1> jmp @F 11452 <1> 11453 <1> %if _INPUT_FILE_BOOT 11454 <1> var_bootydpunit_setup: 11455 0000AEEE F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11456 0000AEF3 7440 <1> jz .retc 11457 <1> 11458 0000AEF5 52 <1> push dx 11459 0000AEF6 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 11460 0000AEF9 F726[D08F] <1> mul word [load_input_file.active] 11461 0000AEFD 5A <1> pop dx 11462 <1> 11463 0000AEFE 93 <1> xchg ax, bx 11464 0000AEFF 8D9F[D08D] <1> lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + ebpbNew + bpbnBootUnit] 11466 0000AF03 EB29 <1> jmp @F 11467 <1> %endif 11468 <1> 11469 <1> var_bootldppart_setup: 11470 0000AF05 BB[2C8C] <1> mov bx, loaddata_loadedfrom - LOADDATA + bsBPB + bpbHiddenSectors 11472 0000AF08 EB24 <1> jmp @F 11473 <1> 11474 <1> var_bootsdppart_setup: 11475 0000AF0A BB[CC8C] <1> mov bx, load_data - LOADDATA2 + bsBPB + bpbHiddenSectors 11477 0000AF0D EB1F <1> jmp @F 11478 <1> 11479 <1> %if _INPUT_FILE_BOOT 11480 <1> var_bootydppart_setup: 11481 0000AF0F F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11482 0000AF14 741F <1> jz .retc 11483 <1> 11484 0000AF16 52 <1> push dx 11485 0000AF17 B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 11486 0000AF1A F726[D08F] <1> mul word [load_input_file.active] 11487 0000AF1E 5A <1> pop dx 11488 <1> 11489 0000AF1F 93 <1> xchg ax, bx 11490 0000AF20 8D9F[AC8D] <1> lea bx, [load_input_file + bx - LOADDATA3 + bsBPB + bpbHiddenSectors] 11492 0000AF24 EB08 <1> jmp @F 11493 <1> %endif 11494 <1> 11495 <1> var_bootunitflags_setup: 11496 0000AF26 05[B08A] <1> add ax, load_unit_flags 11497 0000AF29 89C3 <1> mov bx, ax 11498 0000AF2B BF[B095] <1> mov di, mask_bootunitflags 11499 <1> @@: 11500 0000AF2E F606[9D00]40 <1> testopt [internalflags], nodosloaded 11501 0000AF33 7501 <1> jnz @F ; (NC) 11502 <1> var_bootydpunit_setup.retc: 11503 <1> var_bootydppart_setup.retc: 11504 0000AF35 F9 <1> stc 11505 <1> @@: 11506 0000AF36 C3 <1> retn 11507 <1> %endif 11508 <1> 11509 <1> 11510 <1> usesection lDEBUG_DATA_ENTRY 11511 <1> 11512 <1> align 4, db 0 11513 <1> masks: 11514 <1> ; size 4 want masks + 0 11515 <1> ; size 3 want masks + 1 11516 <1> ; size 2 want masks + 2 11517 <1> ; size 1 want masks + 3 11518 <1> ; size 0 want masks + 4 11519 <1> ; 4 - size = offset into masks 11520 000095A4 00 <1> mask_4byte: db 0 11521 000095A5 00 <1> mask_3byte: db 0 11522 000095A6 00 <1> mask_2byte: db 0 11523 000095A7 00 <1> mask_1byte: db 0 11524 000095A8 FFFFFFFF <1> mask_0byte: dd -1 11525 000095AC FF0FFFFF <1> mask_ysf: dd ~ (ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput) 11527 <1> %if _BOOTLDR 11528 000095B0 FEFFFFFF <1> mask_bootunitflags: dd ~ luf_mask_writable 11529 <1> %endif 11530 <1> 11531 <1> %if _DEBUG3 11532 <1> masks_test: 11533 <1> mask_test_0: dd 0AA55AA55h 11534 <1> mask_test_1: dd 00FF00FFh 11535 <1> mtest_regs: 11536 <1> mtest_reg_0: dd 0 11537 <1> mtest_reg_1: dd 00110022h 11538 <1> %endif 11539 <1> 11540 <1> 11541 <1> usesection lDEBUG_CODE 11542 <1> ; INP: al = first character 11543 <1> ; si-> next character 11544 <1> ; OUT: CY if no variable, 11545 <1> ; al, si = unchanged 11546 <1> ; NC if variable, 11547 <1> ; bx-> low word 11548 <1> ; dx-> high word 11549 <1> ; (if cl <= 2 then dx-> some word in our memory) 11550 <1> ; (dx != bx+2 if compound register) 11551 <1> ; cl = size of variable (1, 2, 3, 4 bytes) 11552 <1> ; ch = size of variable's name (2..13 bytes) 11553 <1> ; INP:si - 1 -> variable's name 11554 <1> ; (can be modified from original content) 11555 <1> ; ah = 0 if a writeable variable (ie simply memory) 11556 <1> ; 1 if a read-only variable (ie simply memory) 11557 <1> ; 2..33 if an MMX register, see note below 11558 <1> ; al = next character behind variable 11559 <1> ; si-> behind next character 11560 <1> ; dword [di] = mask of bits that are read-only 11561 <1> ; CHG: ah, bx, dx, cx, di 11562 <1> ; STT: ss = ds = es, UP 11563 <1> ; 11564 <1> ; Note: For read access to (half of) an MMX register, no 11565 <1> ; special handling is necessary at all, because cl, 11566 <1> ; bx, and dx are set up to access a buffer that 11567 <1> ; contains the current value. (The value should be 11568 <1> ; read at once though, as the buffer may be shared 11569 <1> ; or become outdated otherwise.) 11570 <1> ; Write access to an MMX register must be handled 11571 <1> ; specifically, however. The returned field type 11572 <1> ; in ah indicates the register number (0..7) in the 11573 <1> ; lowest three bits. The two bits above those specify 11574 <1> ; the access type, which also specifies what was read 11575 <1> ; but need not be examined by readers. The access 11576 <1> ; type must be adhered to by writers. These are the 11577 <1> ; access types: 11578 <1> ; 0 zero extension from 32 bits to write all 64 bits 11579 <1> ; 1 sign extension from 32 bits to write all 64 bits 11580 <1> ; 2 writes only low 32 bits 11581 <1> ; 3 writes only high 32 bits 11582 <1> ; (Access type 3 is the only one for which the read 11583 <1> ; buffer is initialised with the high 32 bits.) 11584 <1> ; 11585 <1> ; As dx points to 'some word in our memory' if it 11586 <1> ; doesn't serve any purpose, it is still valid to 11587 <1> ; read the word that it points to. Particularly dx 11588 <1> ; mustn't contain 0FFFFh then, but with the current 11589 <1> ; implementation, it can also be assumed that we do 11590 <1> ; actually 'own' the word (even with a PM segment 11591 <1> ; shorter than 64 KiB the read would be allowed). 11592 <1> isvariable?: 11593 0000AF37 A8 <1> db __TEST_IMM8 ; (skip stc, NC) 11594 <1> 11595 <1> ; As above but additionally: 11596 <1> ; 11597 <1> ; INP: di -> buffer to receive variable name, 14 bytes 11598 <1> ; OUT: if NC, buffer filled with all-caps ASCIZ name 11599 <1> .return_name: 11600 0000AF38 F9 <1> stc 11601 <1> 11602 0000AF39 4E <1> dec si 11603 <1> lframe 11604 0000AF3A 5589E5 <1> lenter 11605 <1> lvar word, bit0_is_return_name 11606 0000AF3D 9C <1> pushf 11607 <1> lvar word, return_name_pointer 11608 0000AF3E 57 <1> push di 11609 0000AF3F 31C0 <1> xor ax, ax 11610 <1> lvar 16, namebuffer 11611 0000AF41 50 <1> push ax ; ax = 0 so that accidentally reading past 11612 <1> ; the actual buffer wouldn't match 11613 0000AF42 FF740C <1> push word [si+12] 11614 0000AF45 FF740A <1> push word [si+10] 11615 0000AF48 FF7408 <1> push word [si+8] 11616 0000AF4B FF7406 <1> push word [si+6] 11617 0000AF4E FF7404 <1> push word [si+4] 11618 0000AF51 FF7402 <1> push word [si+2] 11619 0000AF54 FF34 <1> push word [si] 11620 0000AF56 89E7 <1> mov di, sp ; -> name buffer 11621 <1> 11622 <1> lvar word, fieldtype_high_flags_low 11623 <1> lequ ?fieldtype_high_flags_low + 1, fieldtype 11624 <1> lequ ?fieldtype_high_flags_low, flags 11625 0000AF58 50 <1> push ax ; field type initialised to 0 (RW), flags too 11626 0000AF59 31DB <1> _386 xor bx, bx ; (a flag for the 32-bit register name check) 11627 <1> lvar word, length_to_add 11628 0000AF5B 50 <1> push ax ; = 0 11629 <1> lvar word, startpointer 11630 0000AF5C 56 <1> push si ; -> name start 11631 0000AF5D 89FE <1> mov si, di 11632 0000AF5F 57 <1> push di 11633 <1> 11634 0000AF60 B91000 <1> mov cx, 16 11635 <1> .store: 11636 0000AF63 AC <1> lodsb 11637 <1> ; call uppercase ; (isseparator? calls uppercase) 11638 0000AF64 E8AEFA <1> call isseparator? 11639 0000AF67 F8 <1> clc 11640 0000AF68 7501 <1> jne short .not_separator 11641 0000AF6A F9 <1> stc 11642 <1> .not_separator: 11643 0000AF6B D1DA <1> rcr dx, 1 ; dl = flags indicating separators 11644 0000AF6D AA <1> stosb 11645 0000AF6E E2F3 <1> loop .store 11646 <1> 11647 0000AF70 5E <1> pop si 11648 <1> 11649 0000AF71 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 11650 0000AF75 7409 <1> jz @F 11651 <1> 11652 0000AF77 56 <1> push si 11653 0000AF78 B107 <1> mov cl, 14 >> 1 11654 0000AF7A 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 11655 0000AF7D F3A5 <1> rep movsw 11656 0000AF7F 5E <1> pop si 11657 <1> 11658 <1> @@: 11659 0000AF80 F6C214 <1> test dl, 1<<2|1<<4 11660 0000AF83 AD <1> lodsw 11661 0000AF84 7460 <1> jz short .notreg16 11662 <1> 11663 0000AF86 E84700 <1> call .reg16names_match ; (iff no match, --> .notreg16) 11664 <1> ; bx-> regs entry of (first) match 11665 0000AF89 F6C204 <1> test dl, 1<<2 11666 0000AF8C AD <1> lodsw 11667 0000AF8D 7403E99000 <1> jnz .reg16 ; iff single match --> 11668 <1> 11669 <1> ; Check for a second 16-bit register name 11670 <1> ; (ie check for a compound register name) 11671 0000AF92 E83B00 <1> call .reg16names_match ; (iff no match, --> .notreg16) 11672 <1> ; bx-> regs entry of second match 11673 0000AF95 92 <1> xchg dx, ax ; dx-> regs entry of first match 11674 0000AF96 B90404 <1> mov cx, 4<<8|4 11675 <1> .return_success: ; cx, bx, dx, ?fieldtype set 11676 0000AF99 31C0 <1> xor ax, ax 11677 0000AF9B 88C8 <1> mov al, cl 11678 0000AF9D F7D8 <1> neg ax 11679 0000AF9F 05[A895] <1> add ax, masks + 4 ; 4 - size = offset into masks 11680 0000AFA2 97 <1> xchg di, ax ; di -> mask 11681 0000AFA3 807EEB01 <1> cmp byte [bp + ?fieldtype], 1 11682 0000AFA7 7503 <1> jne @F 11683 0000AFA9 BF[A895] <1> mov di, mask_0byte ; di -> mask 11684 <1> @@: 11685 <1> .return_success_di: 11686 0000AFAC 31C0 <1> xor ax, ax 11687 0000AFAE 88E8 <1> mov al, ch ; ax = length 11688 <1> 11689 0000AFB0 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 11690 0000AFB4 7407 <1> jz @F 11691 <1> 11692 0000AFB6 8B76FC <1> mov si, word [bp + ?return_name_pointer] 11693 0000AFB9 01C6 <1> add si, ax 11694 0000AFBB 8824 <1> mov byte [si], ah ; zero-terminate 11695 <1> @@: 11696 <1> 11697 0000AFBD 5E <1> pop si ; ?startpointer 11698 0000AFBE F646EA01 <1> testopt [bp + ?flags], 1 11699 0000AFC2 7402 <1> jz @F 11700 0000AFC4 58 <1> pop ax ; get length to add to start 11701 0000AFC5 50 <1> push ax ; fill stack slot again 11702 <1> @@: 11703 0000AFC6 01C6 <1> add si, ax ; -> behind name (should NC) 11704 0000AFC8 58 <1> pop ax ; discard ?length_to_add 11705 0000AFC9 F8 <1> clc ; (NC) 11706 <1> .return_ax_frame_lodsb: 11707 0000AFCA 58 <1> pop ax ; ah = ?type 11708 0000AFCB 89EC5D <1> lleave code 11709 0000AFCE AC <1> lodsb 11710 <1> .retn: 11711 0000AFCF C3 <1> retn 11712 <1> 11713 <1> 11714 <1> ; INP: ax = capitalised candidate register name 11715 <1> ; ch = 0 11716 <1> ; dx, si, bx, etc set up for later checks 11717 <1> ; OUT: Iff match, 11718 <1> ; bx-> associated regs entry (dword-aligned) 11719 <1> ; ax = INP:bx 11720 <1> ; Else, 11721 <1> ; returns to .notreg16 11722 <1> ; bx left unchanged on 386 systems 11723 <1> ; CHG: cl, di, bx, ax 11724 <1> ; 11725 <1> ; Note: The 32-bit register name check depends on the 11726 <1> ; fact that the low two bits of bx are set to 11727 <1> ; zero on a match, which is true because regs 11728 <1> ; is dword-aligned. 11729 <1> ; It also depends on bx being left unchanged on 11730 <1> ; a mismatch, which is the case unless the 11731 <1> ; non-386 additional FS,GS filtering occurs. 11732 <1> .reg16names_match: 11733 0000AFD0 BF[7480] <1> mov di, reg16names 11734 0000AFD3 B110 <1> mov cl, 16 11735 0000AFD5 F2AF <1> repne scasw 11736 0000AFD7 750C <1> jne short .notreg16_pop ; no match --> 11737 0000AFD9 01FF <1> add di, di 11738 0000AFDB 93 <1> xchg ax, bx ; (returned for compound register name match) 11739 0000AFDC 8D9D[7809] <1> lea bx, [di -2*(reg16names+DATASECTIONFIXUP+2) +regs] 11740 <1> ; -> regs entry 11741 0000AFE0 C3 <1> _386 retn 11742 <1> ; cx = number of remaining reg16names 11743 0000AFE1 D1E9 <1> _no386 shr cx, 1 ; cx = number of remaining reg16names pairs 11744 <1> ; = 1 iff exactly the IP,FL pair remaining 11745 <1> ; (ie matched one of FS,GS) 11746 0000AFE3 E2EA <1> _no386 loop .retn ; iff cx != 1, return the match --> 11747 <1> ; on non-386 systems, FS,GS matches fall through here 11748 <1> .notreg16_pop: 11749 0000AFE5 58 <1> pop ax ; (discard near return address) 11750 <1> .notreg16: 11751 <1> ; Check for a 32-bit register name 11752 0000AFE6 F6C208 <1> _386 test dl, 1<<3 11753 0000AFE9 7419 <1> _386 jz short .notreg32 11754 <1> 11755 0000AFEB 8D76EC <1> _386 lea si, [bp+?namebuffer] 11756 0000AFEE AC <1> _386 lodsb 11757 0000AFEF D0EB <1> _386 shr bl, 1 ; CY iff second entry during same call 11758 <1> ; (in that case, al contains 'E') 11759 0000AFF1 1C45 <1> _386 sbb al, 'E' ; possibly an 'E' register ? (on first entry) 11760 0000AFF3 AD <1> _386 lodsw 11761 0000AFF4 750E <1> _386 jne short .notreg32 ; no --> (or after second entry) 11762 0000AFF6 43 <1> _386 inc bx ; prepare flag for second entry 11763 <1> ; (this requires regs to be dword-aligned!) 11764 0000AFF7 80FC53 <1> _386 cmp ah, 'S' ; candidate segment register ? 11765 0000AFFA 7408 <1> _386 je short .notreg32 ; yes, skip check (disallow match) --> 11766 <1> 11767 0000AFFC E8D1FF <1> _386 call .reg16names_match ; (iff no match, --> .notreg16 (second entry)) 11768 <1> ; bx-> regs entry of match 11769 0000AFFF B90403 <1> _386 mov cx, 3<<8|4 11770 0000B002 EB22 <1> _386 jmp short .return_success_var32_set_dx 11771 <1> 11772 <1> .notreg32: 11773 <1> ; Check for an 8-bit register name 11774 0000B004 F6C204 <1> test dl, 1<<2 11775 0000B007 7423 <1> jz short .notreg8 11776 <1> 11777 0000B009 8D76EC <1> lea si, [bp+?namebuffer] 11778 0000B00C AD <1> lodsw 11779 0000B00D BF[6480] <1> mov di, reg8names 11780 0000B010 B108 <1> mov cl, 8 11781 0000B012 F2AF <1> repne scasw 11782 0000B014 7516 <1> jne short .notreg8 11783 <1> ; cx = cl = number of remaining reg8names 11784 0000B016 80E101 <1> and cl, 1 ; cx = cl = 1 iff an xL register, else 0 11785 0000B019 8D9DFD8B <1> lea bx, [di-reg8names-2+regs-1] 11786 <1> ; bx-> reg_eax-1 if AL, reg_eax+1 if AH, etc 11787 0000B01D 01CB <1> add bx, cx ; bx-> reg_eax if AL, reg_eax+1 if AH, etc 11788 0000B01F B101 <1> mov cl, 1 11789 <1> 11790 0000B021 A9 <1> db __TEST_IMM16 ; (NC, skip mov) 11791 <1> .reg16: 11792 0000B022 B102 <1> mov cl, 2 11793 <1> .got2bytename: 11794 <1> .got2bytename_var32_set_dx: 11795 0000B024 B502 <1> mov ch, 2 11796 <1> .return_success_var32_set_dx: 11797 0000B026 8D5702 <1> lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 11798 <1> %define .return_success_j .return_success_j1 11799 <1> %[.return_success_j]: 11800 0000B029 E96DFF <1> jmp .return_success 11801 <1> 11802 <1> .notreg8: 11803 <1> 11804 0000B02C BF[1894] <1> mov di, isvariable_morebyte_nameheaders 11805 <1> 11806 <1> .loop: 11807 0000B02F 8B46EC <1> mov ax, word [bp + ?namebuffer] 11808 0000B032 B9[C694] <1> mov cx, isvariable_morebyte_nameheaders.end 11809 0000B035 39CF <1> cmp di, cx 11810 0000B037 730A <1> jae @F 11811 0000B039 29F9 <1> sub cx, di 11812 0000B03B D1E9 <1> shr cx, 1 ; = how many headers remaining 11813 0000B03D F2AF <1> repne scasw 11814 0000B03F 741E <1> je .check_morebyte 11815 <1> %if IVS_HAVE_ONEBYTE 11816 0000B041 EB0C <1> jmp .next_no_pop 11817 <1> 11818 <1> @@: 11819 <1> %if IVS_SINGLE_ONEBYTE 11820 0000B043 41 <1> inc cx 11821 0000B044 39CF <1> cmp di, cx ; iteration after one byte var check ? 11822 0000B046 7309 <1> jae @F ; yes, end --> 11823 0000B048 47 <1> inc di ; remember we did the one byte check 11824 0000B049 3C56 <1> cmp al, IVS_SINGLE_ONEBYTE_NAME 11825 0000B04B 7407 <1> je .check_onebyte 11826 <1> %else 11827 <1> mov cx, isvariable_onebyte_names.end 11828 <1> sub cx, di ; = how many names remaining 11829 <1> jbe @F ; if none --> 11830 <1> repne scasb 11831 <1> je .check_onebyte 11832 <1> %endif 11833 <1> %endif 11834 0000B04D A8 <1> db __TEST_IMM8 ; (skip pop) 11835 <1> .next: 11836 0000B04E 5F <1> pop di 11837 <1> .next_no_pop: 11838 0000B04F EBDE <1> jmp .loop 11839 <1> 11840 <1> @@: 11841 0000B051 E94801 <1> jmp .end 11842 <1> 11843 <1> 11844 <1> %if IVS_HAVE_ONEBYTE 11845 <1> .check_onebyte: 11846 0000B054 57 <1> push di 11847 <1> %if IVS_SINGLE_ONEBYTE 11848 0000B055 BB[4891] <1> mov bx, isvariable_struc_onebyte_list 11849 <1> %else 11850 <1> sub di, isvariable_onebyte_names + 1 11851 <1> ; = index 11852 <1> %if ISVARIABLESTRUC_size == 8 11853 <1> add di, di ; = index * 2 11854 <1> add di, di ; = index * 4 11855 <1> add di, di ; = index * 8 11856 <1> %else 11857 <1> %error Unexpected structure size 11858 <1> %endif 11859 <1> lea bx, [di + isvariable_struc_onebyte_list] 11860 <1> %endif 11861 0000B058 8D76ED <1> lea si, [bp + ?namebuffer + 1] ; -> buffered string (allcaps) 11862 0000B05B 31C9 <1> xor cx, cx ; = 0, gets incremented next 11863 0000B05D EB21 <1> jmp @F 11864 <1> %endif 11865 <1> 11866 <1> .check_morebyte: 11867 0000B05F 57 <1> push di 11868 0000B060 81EF[1A94] <1> sub di, isvariable_morebyte_nameheaders + 2 11869 <1> ; = index * 2 11870 <1> %if ISVARIABLESTRUC_size == 8 11871 0000B064 01FF <1> add di, di ; = index * 4 11872 0000B066 01FF <1> add di, di ; = index * 8 11873 <1> %else 11874 <1> %error Unexpected structure size 11875 <1> %endif 11876 0000B068 8D9D[5091] <1> lea bx, [di + isvariable_struc_morebyte_list] 11877 0000B06C 8B4F02 <1> mov cx, word [bx + ivFlags] 11878 0000B06F 83E10F <1> and cx, ivfNameLengthMask ; cx = length 11879 0000B072 8B3F <1> mov di, word [bx + ivName] ; -> name 11880 0000B074 8D76EE <1> lea si, [bp + ?namebuffer + 2] ; -> buffered string (allcaps) 11881 0000B077 38C0 <1> cmp al, al ; ZR (in case remaining length is zero) 11882 0000B079 51 <1> push cx 11883 0000B07A F3A6 <1> repe cmpsb ; compare 11884 0000B07C 59 <1> pop cx 11885 0000B07D 75CF <1> jne .next ; if not same --> 11886 0000B07F 41 <1> inc cx ; increment twice 11887 <1> @@: 11888 0000B080 41 <1> inc cx ; increment once 11889 0000B081 AC <1> lodsb ; get next byte in buffer 11890 0000B082 807F0600 <1> cmp byte [bx + ivArrayLast], 0 11891 0000B086 7503E9BC00 <1> je .notarray 11892 <1> 11893 <1> .array: 11894 0000B08B 3C28 <1> cmp al, '(' 11895 0000B08D 754B <1> jne .array_not_index_expression ; not index expression --> 11896 <1> 11897 <1> .array_index_expression: 11898 0000B08F 8B76E6 <1> mov si, word [bp + ?startpointer] 11899 0000B092 01CE <1> add si, cx ; -> at opening parens 11900 0000B094 46 <1> inc si ; -> behind opening parens 11901 0000B095 AC <1> lodsb 11902 0000B096 52 <1> push dx 11903 0000B097 E88D07 <1> call getbyte 11904 0000B09A B600 <1> mov dh, 0 11905 0000B09C 89D7 <1> mov di, dx ; di = index 11906 0000B09E 5A <1> pop dx 11907 0000B09F E8EE08 <1> call skipwh0 11908 0000B0A2 3C29 <1> cmp al, ')' ; insure closing parens 11909 0000B0A4 7403E99B00 <1> jne .error_j1 11910 <1> 11911 0000B0A9 56 <1> push si 11912 0000B0AA 2B76E6 <1> sub si, word [bp + ?startpointer] 11913 <1> ; = how much to skip 11914 0000B0AD 8976E8 <1> mov word [bp + ?length_to_add], si 11915 0000B0B0 5E <1> pop si 11916 0000B0B1 804EEA01 <1> setopt [bp + ?flags], 1 11917 <1> 11918 0000B0B5 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 11919 0000B0B9 7415 <1> jz .array_no_return_name 11920 <1> 11921 0000B0BB 97 <1> xchg ax, di 11922 0000B0BC 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 11923 0000B0BF 01CF <1> add di, cx ; -> behind name 11924 0000B0C1 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 11925 0000B0C5 7705 <1> ja @F ; if >= 10h is a valid index --> 11926 0000B0C7 E88209 <1> call hexnyb ; expand to single digit 11927 0000B0CA EB03 <1> jmp @FF 11928 <1> @@: 11929 0000B0CC E87209 <1> call hexbyte ; expand to two digits 11930 <1> @@: 11931 0000B0CF 97 <1> xchg ax, di ; restore di = index 11932 <1> 11933 <1> .array_no_return_name: 11934 0000B0D0 41 <1> inc cx ; make space for one digit 11935 0000B0D1 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 11936 0000B0D5 7601 <1> jna @F ; if maximum index <= 0Fh --> 11937 0000B0D7 41 <1> inc cx ; make space for another digit 11938 <1> @@: 11939 0000B0D8 EB57 <1> jmp .array_index_expression_common 11940 <1> 11941 <1> .array_not_index_expression: 11942 0000B0DA E838F9 <1> call isseparator? ; name ends ? 11943 0000B0DD 7509 <1> jne @F ; no --> 11944 0000B0DF F6470302 <1> testopt [bx + ivFlags], ivfArrayOptional 11945 <1> ; is the index optional ? 11946 0000B0E3 7567 <1> jnz .arrayfirst ; yes, handle as if first --> 11947 <1> .next_j1: 11948 0000B0E5 E966FF <1> jmp .next ; no, mismatch --> 11949 <1> 11950 <1> @@: 11951 0000B0E8 E85307 <1> call getnyb 11952 0000B0EB 72F8 <1> jc .next_j1 11953 0000B0ED 98 <1> cbw ; ax = first nybble of index 11954 0000B0EE 97 <1> xchg di, ax ; di = first nybble of index 11955 0000B0EF AC <1> lodsb 11956 0000B0F0 F6470304 <1> testopt [bx + ivFlags], ivfSeparatorSpecial 11957 0000B0F4 7408 <1> jz @F 11958 0000B0F6 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 11959 <1> ; highest > 0Fh ? 11960 0000B0FA 7629 <1> jna .gotseparatorspecial; no --> 11961 0000B0FC EB0B <1> jmp .get_second_digit 11962 <1> 11963 <1> @@: 11964 0000B0FE E814F9 <1> call isseparator? ; single digit ? 11965 0000B101 7422 <1> je @F ; yes --> 11966 0000B103 807F060F <1> cmp byte [bx + ivArrayLast], 0Fh 11967 <1> ; highest > 0Fh ? 11968 0000B107 76DC <1> jna .next_j1 ; no --> 11969 <1> .get_second_digit: 11970 0000B109 E83207 <1> call getnyb 11971 0000B10C 72D7 <1> jc .next_j1 11972 0000B10E 98 <1> cbw ; ax = second nybble of index 11973 0000B10F 01FF <1> add di, di 11974 0000B111 01FF <1> add di, di 11975 0000B113 01FF <1> add di, di 11976 0000B115 01FF <1> add di, di ; di = first digit times 16 11977 0000B117 01C7 <1> add di, ax ; di = full index 11978 0000B119 AC <1> lodsb 11979 0000B11A F6470304 <1> testopt [bx + ivFlags], ivfSeparatorSpecial 11980 0000B11E 7505 <1> jnz @F 11981 0000B120 E8F2F8 <1> call isseparator? 11982 0000B123 75C0 <1> jne .next_j1 11983 <1> @@: 11984 <1> .gotseparatorspecial: 11985 <1> 11986 0000B125 F7DE <1> neg si ; minus -> after separator 11987 0000B127 8D4AED <1> lea cx, [bp + ?namebuffer + 1 + si] 11988 <1> ; -> buffered string plus 1 minus -> after separator 11989 <1> ; -> buffered string plus 1 minus (-> at separator plus 1) 11990 <1> ; -> buffered string minus -> at separator 11991 0000B12A F7D9 <1> neg cx ; -> at separator minus -> buffered string 11992 0000B12C 8B76E6 <1> mov si, word [bp + ?startpointer] 11993 0000B12F 01CE <1> add si, cx 11994 <1> 11995 <1> .array_index_expression_common: 11996 <1> ; si -> behind index 11997 0000B131 89F8 <1> mov ax, di 11998 <1> ; test ah, ah 11999 <1> ; jnz .error_j1 ; (not possible) 12000 0000B133 3A4706 <1> cmp al, byte [bx + ivArrayLast] 12001 <1> ; index > last ? 12002 0000B136 770C <1> ja .error_j1 ; then error --> 12003 <1> 12004 0000B138 F6470301 <1> testopt [bx + ivFlags], ivfArrayOneBased 12005 0000B13C 7403 <1> jz @F ; got index 12006 0000B13E 48 <1> dec ax ; decrement index to get 0-based 12007 0000B13F 7803 <1> js .error_j1 ; if it was 0, invalid --> 12008 <1> @@: 12009 0000B141 96 <1> xchg ax, si ; si = index 12010 0000B142 EB0A <1> jmp .arraycommon ; continue 12011 <1> 12012 <1> .error_j1: 12013 0000B144 E9CBF3 <1> jmp error 12014 <1> 12015 <1> 12016 <1> .notarray: 12017 0000B147 E8CBF8 <1> call isseparator? ; name ends ? 12018 0000B14A 7599 <1> jne .next_j1 ; no, mismatch --> 12019 <1> 12020 <1> .arrayfirst: 12021 0000B14C 31F6 <1> xor si, si ; si = array index (0 here) 12022 <1> 12023 <1> .arraycommon: 12024 0000B14E 88CD <1> mov ch, cl ; ch = name length 12025 0000B150 8B4702 <1> mov ax, word [bx + ivFlags] 12026 0000B153 83E030 <1> and ax, ivfVarLengthMask; ax = shifted encoded var length 12027 0000B156 B104 <1> mov cl, ivfVarLengthShift 12028 0000B158 D3E8 <1> shr ax, cl ; ax = encoded var length 12029 0000B15A 40 <1> inc ax ; decode var length 12030 0000B15B 88C1 <1> mov cl, al ; cl = var length 12031 <1> 12032 0000B15D 96 <1> xchg ax, si ; ax = array index 12033 <1> 12034 0000B15E F6470280 <1> testopt [bx + ivFlags], ivfReadOnly 12035 0000B162 7403 <1> jz @F 12036 0000B164 FE46EB <1> inc byte [bp + ?fieldtype] 12037 <1> ; = 1 (RO) 12038 <1> @@: 12039 0000B167 31FF <1> xor di, di 12040 0000B169 8B7704 <1> mov si, word [bx + ivAddress] 12041 0000B16C F6470240 <1> testopt [bx + ivFlags], ivfSpecialSetUp 12042 0000B170 7407 <1> jz .notspecial 12043 <1> ; (NC) 12044 0000B172 FFD6 <1> call si ; INP: ax = array index (0-based), di = 0 12045 <1> ; CHG: si, ax 12046 <1> ; OUT: NC if valid, 12047 <1> ; bx -> var, di = 0 or di -> mask 12048 0000B174 7318 <1> jnc @F 12049 0000B176 E9D5FE <1> jmp .next 12050 <1> 12051 <1> .notspecial: 12052 0000B179 8A5F07 <1> mov bl, byte [bx + ivArrayBetween] 12053 0000B17C B700 <1> mov bh, 0 ; bx = array between offset 12054 0000B17E 00CB <1> add bl, cl 12055 0000B180 80D700 <1> adc bh, 0 ; bx = array item size 12056 0000B183 F7E3 <1> mul bx ; dx:ax = ax times bx 12057 0000B185 85D2 <1> test dx, dx 12058 0000B187 75BB <1> jnz .error_j1 12059 0000B189 01F0 <1> add ax, si ; ax -> variable 12060 0000B18B 72B7 <1> jc .error_j1 12061 0000B18D 93 <1> xchg ax, bx ; bx -> variable 12062 <1> @@: 12063 0000B18E 5A <1> pop dx ; (discard pointer into names/headers) 12064 0000B18F 8D5702 <1> lea dx, [bx+2] ; (irrelevant to 8-/16-bit register return) 12065 0000B192 85FF <1> test di, di 12066 0000B194 7503E900FE <1> jz .return_success 12067 0000B199 E910FE <1> jmp .return_success_di 12068 <1> 12069 <1> 12070 <1> .end: 12071 <1> %if _MMXSUPP 12072 <1> ;MMx MMxf MM(x) MM(x)f 12073 0000B19C F6C278 <1> test dl, 1<<3|1<<4| 1<<5| 1<<6 12074 0000B19F 746A <1> jz short .notmmx 12075 <1> 12076 0000B1A1 8D76EC <1> lea si, [bp+?namebuffer] 12077 0000B1A4 803E[E50A]00 <1> cmp byte [has_mmx], 0 ; MMX supported ? 12078 0000B1A9 7460 <1> je short .notmmx ; no --> 12079 <1> [cpu 586] 12080 0000B1AB AD <1> lodsw 12081 0000B1AC 3D4D4D <1> cmp ax, "MM" ; possibly an MMX register ? 12082 0000B1AF 755A <1> jne short .notmmx ; no --> 12083 0000B1B1 AC <1> lodsb 12084 0000B1B2 E85301 <1> call getstmmxdigit 12085 0000B1B5 7254 <1> jc short .notmmx 12086 0000B1B7 88DC <1> mov ah, bl 12087 0000B1B9 C0E303 <1> shl bl, 3 ; shift into reg field 12088 0000B1BC 8D4C14 <1> lea cx, [si-?namebuffer] 12089 0000B1BF 80CB06 <1> or bl, 06h ; code to get our ModR/M byte (r/m = [ofs]) 12090 0000B1C2 29E9 <1> sub cx, bp ; length of name (if with suffix) 12091 0000B1C4 881E[F6B1] <1> mov byte [.getmmxlow_modrm], bl 12092 0000B1C8 43 <1> inc bx ; adjust the ModR/M byte (r/m = [bx]) 12093 0000B1C9 AC <1> lodsb 12094 0000B1CA 881E[1BB2] <1> mov byte [.getmmxhigh_modrm], bl 12095 0000B1CE 4E <1> dec si 12096 0000B1CF 4E <1> dec si 12097 <1> 12098 0000B1D0 E842F8 <1> call isseparator? ; a separator after potential suffix ? 12099 0000B1D3 AC <1> lodsb 12100 0000B1D4 B700 <1> mov bh, 0 12101 0000B1D6 7516 <1> jne short .check_mmx_no_suffix ; no --> 12102 <1> 12103 0000B1D8 3C5A <1> cmp al, 'Z' 12104 0000B1DA 7418 <1> je short .getmmxlow ; 0 = ZX --> 12105 0000B1DC B710 <1> mov bh, 2<<3 ; = 10h = low 12106 0000B1DE 3C4C <1> cmp al, 'L' 12107 0000B1E0 7412 <1> je short .getmmxlow 12108 0000B1E2 B708 <1> mov bh, 1<<3 ; = 8h = SX 12109 0000B1E4 3C53 <1> cmp al, 'S' 12110 0000B1E6 740C <1> je short .getmmxlow 12111 0000B1E8 3C48 <1> cmp al, 'H' 12112 0000B1EA 7425 <1> je short .getmmxhigh 12113 0000B1EC B700 <1> mov bh, 0 ; 0 = ZX 12114 <1> .check_mmx_no_suffix: 12115 0000B1EE 49 <1> dec cx ; length of name (if no suffix follows) 12116 0000B1EF E823F8 <1> call isseparator? ; immediately a separator (but no suffix) ? 12117 0000B1F2 7517 <1> jne short .notmmx ; no --> 12118 <1> ; yes, (default to) zero-extending full reg 12119 <1> .getmmxlow: 12120 <1> .getmmxlow_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 12121 0000B1F4 0F7E06[E00B] <1> movd dword [mmxbuff], mm0 12122 0000B1F9 08FC <1> or ah, bh 12123 <1> 12124 <1> .mmxcommon: 12125 0000B1FB 80C402 <1> add ah, 2 12126 0000B1FE B504 <1> mov ch, 4 12127 0000B200 86CD <1> xchg cl, ch 12128 0000B202 BB[E00B] <1> mov bx, mmxbuff 12129 0000B205 8866EB <1> mov byte [bp+?fieldtype], ah 12130 <1> .return_success_var32_set_dx_j: 12131 0000B208 E91BFE <1> jmp .return_success_var32_set_dx 12132 <1> __CPU__ 12133 <1> 12134 <1> .notmmx: 12135 <1> %endif 12136 <1> 12137 <1> .return_failure: 12138 0000B20B 5E <1> pop si ; ?startpointer 12139 0000B20C 58 <1> pop ax ; ?length_to_add 12140 0000B20D F9 <1> stc 12141 0000B20E E9B9FD <1> jmp .return_ax_frame_lodsb 12142 <1> 12143 <1> 12144 <1> %if _MMXSUPP 12145 <1> [cpu 586] 12146 <1> .getmmxhigh: 12147 0000B211 83EC08 <1> sub sp, byte 8 12148 0000B214 80CC18 <1> or ah, 3<<3 ; = 18h = high 12149 0000B217 89E3 <1> mov bx, sp ; (ss = ds) 12150 <1> .getmmxhigh_modrm: equ $+2 ; (opcode adjusted for the right MMX reg) 12151 0000B219 0F7F07 <1> movq qword [bx], mm0 12152 0000B21C 5B <1> pop bx 12153 0000B21D 5B <1> pop bx ; discard low dword 12154 0000B21E 668F06[E00B] <1> pop dword [mmxbuff] ; save high dword here 12155 0000B223 EBD6 <1> jmp short .mmxcommon 12156 <1> __CPU__ 12157 <1> %endif 12158 <1> 12159 <1> 12160 <1> var_ri_setup: 12161 0000B225 8D76F0 <1> lea si, [bp + ?namebuffer + 4] 12162 0000B228 F646EA01 <1> testopt [bp + ?flags], 1 12163 0000B22C 7409 <1> jz @F 12164 0000B22E 8B76E6 <1> mov si, word [bp + ?startpointer] 12165 0000B231 0376E8 <1> add si, word [bp + ?length_to_add] 12166 0000B234 FF46E8 <1> inc word [bp + ?length_to_add] 12167 <1> @@: 12168 0000B237 50 <1> push ax 12169 0000B238 AC <1> lodsb ; al = last letter 12170 0000B239 E807DA <1> call uppercase 12171 0000B23C 88C7 <1> mov bh, al ; bh = letter 12172 0000B23E 3C4C <1> cmp al, 'L' ; valid one ? 12173 0000B240 7408 <1> je @F 12174 0000B242 3C4F <1> cmp al, 'O' 12175 0000B244 7404 <1> je @F 12176 0000B246 3C53 <1> cmp al, 'S' 12177 0000B248 755A <1> jne .ret_CY_pop ; no --> 12178 <1> @@: ; is valid letter 12179 0000B24A AC <1> lodsb ; = candidate separator 12180 0000B24B E8C7F7 <1> call isseparator? ; is it ? 12181 0000B24E 7554 <1> jne .ret_CY_pop ; no --> 12182 0000B250 58 <1> pop ax 12183 <1> 12184 0000B251 F646FE01 <1> test byte [bp + ?bit0_is_return_name], 1 12185 0000B255 7408 <1> jz .interrupt_no_return_name 12186 <1> 12187 0000B257 8B7EFC <1> mov di, word [bp + ?return_name_pointer] 12188 0000B25A 83C704 <1> add di, 4 12189 0000B25D 883D <1> mov byte [di], bh ; store the additional letter 12190 <1> 12191 <1> .interrupt_no_return_name: 12192 0000B25F FEC5 <1> inc ch ; increment name length 12193 0000B261 93 <1> xchg ax, bx 12194 <1> 12195 <1> ; INP: bx = interrupt number 0..255 12196 <1> ; ah = 'S' for segment, 'O' for offset, 'L' for linear 12197 0000B262 31F6 <1> xor si, si 12198 <1> %if _PM 12199 0000B264 53 <1> push bx 12200 0000B265 E8166C <1> call setds2si ; ds => IVT 12201 0000B268 5B <1> pop bx 12202 <1> %else 12203 <1> mov ds, si ; ds => IVT 12204 <1> %endif 12205 0000B269 80FC53 <1> cmp ah, 'S' 12206 0000B26C 7502 <1> jne @F 12207 0000B26E 46 <1> inc si 12208 0000B26F 46 <1> inc si ; si = 2 (displacement to get segment) 12209 <1> @@: 12210 0000B270 01DB <1> add bx, bx 12211 0000B272 01DB <1> add bx, bx ; ds:bx -> IVT entry 12212 0000B274 FF7002 <1> push word [bx + si + 2] 12213 0000B277 FF30 <1> push word [bx + si] ; get segment:offset or trash:segment 12214 0000B279 16 <1> push ss 12215 0000B27A 1F <1> pop ds 12216 0000B27B BB[0894] <1> mov bx, interrupt_var 12217 0000B27E 8F07 <1> pop word [bx] 12218 0000B280 8F4702 <1> pop word [bx + 2] 12219 <1> ; store in variable 12220 0000B283 80FC4C <1> cmp ah, 'L' 12221 0000B286 7519 <1> jne @FF 12222 0000B288 51 <1> push cx 12223 0000B289 31C0 <1> xor ax, ax 12224 0000B28B 874702 <1> xchg ax, word [bx + 2] ; clear high word, get segment 12225 0000B28E 31D2 <1> xor dx, dx ; dx:ax = segment 12226 0000B290 B90400 <1> mov cx, 4 12227 <1> @@: 12228 0000B293 D1E0 <1> shl ax, 1 12229 0000B295 D1D2 <1> rcl dx, 1 12230 0000B297 E2FA <1> loop @B ; shift up 4 bits 12231 0000B299 0107 <1> add word [bx], ax 12232 0000B29B 115702 <1> adc word [bx + 2], dx ; add to dword 12233 0000B29E 59 <1> pop cx 12234 0000B29F B103 <1> mov cl, 3 ; 3byte variable (21 bits needed) 12235 <1> @@: 12236 0000B2A1 31FF <1> xor di, di ; (NC) 12237 0000B2A3 C3 <1> retn 12238 <1> 12239 <1> .ret_CY_pop: 12240 0000B2A4 58 <1> pop ax 12241 <1> .ret_CY: 12242 0000B2A5 F9 <1> stc 12243 0000B2A6 C3 <1> retn 12244 <1> 12245 <1> 12246 <1> 12247 <1> %if _INPUT_FILE_BOOT || _INPUT_FILE_HANDLES 12248 <1> var_ysf_setup: 12249 0000B2A7 93 <1> xchg ax, bx ; bx = index 12250 0000B2A8 8A46ED <1> mov al, byte [bp + ?namebuffer + 1] 12251 0000B2AB 3C53 <1> cmp al, 'S' 12252 0000B2AD 750B <1> jne @F 12253 <1> %if _INPUT_FILE_BOOT 12254 0000B2AF F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12255 0000B2B4 B042 <1> mov al, 'B' 12256 0000B2B6 7502 <1> jnz @F 12257 <1> %endif 12258 0000B2B8 B048 <1> mov al, 'H' 12259 <1> @@: 12260 0000B2BA 3C42 <1> cmp al, 'B' 12261 0000B2BC 7509 <1> jne @F 12262 <1> %if _INPUT_FILE_BOOT 12263 0000B2BE F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12264 0000B2C3 750D <1> jnz @FF 12265 <1> %endif 12266 <1> .notysf: 12267 0000B2C5 F9 <1> stc 12268 0000B2C6 C3 <1> retn 12269 <1> @@: 12270 <1> %if _INPUT_FILE_HANDLES 12271 0000B2C7 3C48 <1> cmp al, 'H' 12272 0000B2C9 75FA <1> jne short .notysf 12273 0000B2CB F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12274 0000B2D0 74F3 <1> jz .notysf 12275 <1> %else 12276 <1> jmp .notysf 12277 <1> %endif 12278 <1> @@: 12279 <1> ; bx = index 12280 <1> %if _INPUT_FILE_HANDLES 12281 0000B2D2 BF[800A] <1> mov di, input_file_handles.active 12282 <1> ; -> active index for YHF 12283 <1> %endif 12284 <1> %if _INPUT_FILE_BOOT 12285 <1> %if _INPUT_FILE_HANDLES 12286 0000B2D5 3C42 <1> cmp al, 'B' 12287 0000B2D7 7503 <1> jne @F 12288 <1> %endif 12289 0000B2D9 BF[D08F] <1> mov di, load_input_file.active 12290 <1> ; -> active index for YBF 12291 <1> @@: 12292 <1> %endif 12293 0000B2DC F7DB <1> neg bx ; -1 .. 0 12294 0000B2DE 7406 <1> jz @F ; if 0, always valid --> 12295 <1> ; index was nonzero, meaning bx now holds a 12296 <1> ; negative number. if [.active] is large enough, 12297 <1> ; adding it to bx yields a positive number, which 12298 <1> ; carries in the addition. check for that. 12299 0000B2E0 031D <1> add bx, word [di] 12300 0000B2E2 73E1 <1> jnc .notysf ; not valid index --> 12301 0000B2E4 EB02 <1> jmp @FF ; valid, use it 12302 <1> @@: 12303 0000B2E6 031D <1> add bx, word [di] 12304 <1> ; 0 means the topmost level 12305 <1> @@: 12306 <1> %if _INPUT_FILE_BOOT 12307 <1> %if _INPUT_FILE_HANDLES 12308 0000B2E8 3C42 <1> cmp al, 'B' 12309 0000B2EA 750D <1> jne @F 12310 <1> %endif 12311 <1> 12312 0000B2EC B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 12313 0000B2EF 93 <1> xchg ax, bx 12314 0000B2F0 F7E3 <1> mul bx ; dx ignored, should be zero 12315 0000B2F2 93 <1> xchg ax, bx ; bx = offset into array 12316 0000B2F3 81C3[768D] <1> add bx, load_input_file - LOADDATA3 + ldFATType 12317 <1> ; -> flag word 12318 0000B2F7 EB0A <1> jmp @FF 12319 <1> 12320 <1> @@: 12321 <1> %endif 12322 <1> %if _INPUT_FILE_HANDLES 12323 0000B2F9 D1E3 <1> shl bx, 1 12324 0000B2FB D1E3 <1> shl bx, 1 12325 0000B2FD D1E3 <1> shl bx, 1 ; to qword array index 12326 <1> %if INPUTFILEHANDLE_size != 8 12327 <1> %error Unexpected structure size 12328 <1> %endif 12329 0000B2FF 81C3[020A] <1> add bx, input_file_handles + ifhFlags 12330 <1> ; -> flags word 12331 <1> %endif 12332 <1> @@: 12333 0000B303 BF[AC95] <1> mov di, mask_ysf ; give the mask of read-only bits 12334 0000B306 F8 <1> clc 12335 0000B307 C3 <1> retn 12336 <1> %endif 12337 <1> 12338 <1> 12339 <1> lleave ctx 12340 <1> 12341 <1> 12342 <1> ; INP: al, si-> string 12343 <1> ; OUT: CY if no valid digit 0..7 12344 <1> ; NC if valid digit, 12345 <1> ; bl = 0..7 12346 <1> ; al, si-> behind digit specification 12347 <1> ; CHG: bl 12348 <1> getstmmxdigit: 12349 0000B308 3C28 <1> cmp al, '(' 12350 0000B30A 7407 <1> je .paropen 12351 0000B30C E81A00 <1> call .isdigit? 12352 0000B30F 7201 <1> jc .ret 12353 <1> .retlodsb: 12354 0000B311 AC <1> lodsb 12355 <1> .ret: 12356 0000B312 C3 <1> retn 12357 <1> 12358 <1> .paropen: 12359 0000B313 50 <1> push ax 12360 0000B314 56 <1> push si 12361 0000B315 AC <1> lodsb 12362 0000B316 E81000 <1> call .isdigit? 12363 0000B319 720B <1> jc .retpop 12364 0000B31B AC <1> lodsb 12365 0000B31C 3C29 <1> cmp al, ')' ; closing parenthesis ? 12366 0000B31E F9 <1> stc 12367 0000B31F 7505 <1> jne .retpop ; no --> (CY) 12368 0000B321 83C404 <1> add sp, byte 4 ; discard saved registers (NC) 12369 0000B324 EBEB <1> jmp short .retlodsb 12370 <1> 12371 <1> .retpop: 12372 0000B326 5E <1> pop si 12373 0000B327 58 <1> pop ax 12374 0000B328 C3 <1> retn 12375 <1> 12376 <1> .isdigit?: 12377 0000B329 88C3 <1> mov bl, al 12378 0000B32B 80EB30 <1> sub bl, '0' 12379 0000B32E 80FB08 <1> cmp bl, 8 ; valid digit 0..7 ? (CY if so) 12380 0000B331 F5 <1> cmc ; NC if so 12381 0000B332 C3 <1> retn 12382 <1> 12383 <1> 12384 <1> usesection lDEBUG_CODE 12385 <1> isvariable_code_size equ $ - isvariable_code 12386 <1> 12387 <1> 12388 <1> usesection lDEBUG_DATA_ENTRY 12389 <1> isvariable_data_size equ $ - isvariable_data 12390 <1> 12391 <1> numdef SHOW_ISVARIABLE_SIZE, 0 12392 <1> %if _SHOW_ISVARIABLE_SIZE 12393 <1> %assign CODESIZE isvariable_code_size 12394 <1> %assign DATASIZE isvariable_data_size 12395 <1> %warning isvariable size: CODESIZE code, DATASIZE data 12396 <1> %endif 12397 <1> 12398 <1> 12399 <1> align 2, db 0 12400 000095B4 0D0020090D2C4C3B5D- <1> separators: countedw 32,9,13,",L;]:)(=.",0 12400 000095BD 3A29283D2E00 <1> 12401 <1> 12402 <1> %ifn _EXPRESSIONS 12403 <1> %error Building without the expression evaluator is not possible right now 12404 <1> %endif 12405 <1> 12406 <1> %if _EXPRESSIONS 12407 <1> 12408 000095C3 00 <1> align 4, db 0 12409 000095C4 00000000 <1> hhvar: dd 0 ; left-hand operand for operator functions 12410 <1> align 2, db 0 12411 <1> hh_depth: 12412 000095C8 0000 <1> dw 0 12413 <1> hh_depth_of_single_term: 12414 000095CA 0000 <1> dw 0 12415 000095CC 00 <1> hhflag: db 0 ; &2: getdword called from hh, default to sub (precedence over 1) 12416 <1> ; &1: getdword called from hh, default to add 12417 <1> ; &4: getdword defaulted to add/sub for hh 12418 <1> ; (Note that during recursive getexpression calls (ie, 12419 <1> ; bracket handling), hh_depth is incremented to 2 and 12420 <1> ; higher. As these flags are only used with hh_depth == 1, 12421 <1> ; this means inside brackets the hh defaulting is 12422 <1> ; not in effect.) 12423 000095CD 00 <1> hhtype: db 0 ; type info on left-hand operand for operator functions 12424 <1> %endif 12425 <1> 12426 <1> 12427 <1> usesection lDEBUG_CODE 12428 <1> 12429 <1> ; Get a numerical value from input line 12430 <1> ; INP: al = first character 12431 <1> ; si-> next character 12432 <1> ; OUT: bx:dx = numerical value 12433 <1> ; ah&80h = whether a pointer 12434 <1> ; ah&40h = whether a signed type 12435 <1> ; ah&3Fh = number of significant bits 12436 <1> ; one-based position of highest one bit if unsigned or signed but positive 12437 <1> ; one-based position of lowest one bit from the top if negative signed 12438 <1> getdword: 12439 <1> getexpression: 12440 0000B333 FF06[C895] <1> inc word [hh_depth] 12441 0000B337 E82706 <1> call skipcomm0 12442 0000B33A 51 <1> push cx 12443 0000B33B 57 <1> push di 12444 <1> lframe 12445 0000B33C 5589E5 <1> lenter 12446 <1> 12447 0000B33F 31C9 <1> xor cx, cx 12448 0000B341 51 <1> push cx 12449 <1> lvar word, ??Count 12450 <1> %define lCount ???Count 12451 <1> 12452 <1> ; The first number field's operator is initialized to 12453 <1> ; the dummy right-operand operator, which is set up with 12454 <1> ; the highest precedence. This means it'll be processed 12455 <1> ; immediately in the first iteration below. 12456 0000B342 B118 <1> mov cl, OPERATOR_RIGHTOP 12457 0000B344 51 <1> push cx ; initialize dummy first number operator 12458 0000B345 83EC0A <1> sub sp, byte 6+4 12459 <1> lvar 6, ??A 12460 <1> %define lA ???A 12461 <1> lvar 6, ??B 12462 <1> %define lB ???B 12463 <1> 12464 <1> .loop: 12465 <1> ; Get next term of an expression. A term is one variable, 12466 <1> ; one immediate number, one expression contained within 12467 <1> ; round brackets or one expression used to access memory. 12468 <1> ; This code also parses any number of unary operators 12469 <1> ; (including type conversions) in front of the term. 12470 <1> ; 12471 <1> ; INP: (si-1)-> first character 12472 <1> ; OUT: (see label .operator) 12473 <1> ; bx:dx = numerical value of term 12474 <1> ; ah&80h = whether a pointer 12475 <1> ; ah&40h = whether a signed type 12476 <1> ; ah&20h = whether a positive value but signed type 12477 <1> ; al = first character behind term 12478 <1> ; si-> line 12479 <1> ; CHG: di, cx 12480 <1> ; 12481 <1> ; This part might be simplified by directly modifying 6byte[bp+lB] 12482 <1> ; instead of setting bx:dx and ah. (The current interface is one of 12483 <1> ; the holdovers of getexpressionterm as a separate function.) In 12484 <1> ; that case, bx:dx and ah presumably will then be simply added to 12485 <1> ; the CHG specification. 12486 <1> .term: 12487 0000B348 4E <1> dec si 12488 0000B349 56 <1> push si ; -> term 12489 <1> 12490 <1> ; count unary operators and type specifiers, 12491 <1> ; get the bit mask of required bytes 12492 <1> ; and skip past the operators and specifiers 12493 0000B34A E89504 <1> call count_unary_operators 12494 <1> 12495 <1> %if _INDIRECTION 12496 0000B34D 3C5B <1> cmp al, '[' 12497 0000B34F 7503E91202 <1> je .indirection ; handle indirected value --> 12498 <1> %endif 12499 0000B354 3C28 <1> cmp al, '(' 12500 0000B356 7503E95E02 <1> je .parens ; handle term with precedence --> 12501 <1> 12502 0000B35B 52 <1> push dx ; remember the count+1 12503 <1> ; (only if no indirection or bracket) 12504 <1> 12505 0000B35C 4E <1> dec si 12506 0000B35D BA[0E67] <1> mov dx, msg.value ; does a VALUE keyword for VALUE x IN y go here ? 12507 0000B360 E87805 <1> call isstring? 12508 0000B363 7503E95701 <1> je .value_in ; yes --> 12509 <1> 12510 0000B368 BA[4D67] <1> mov dx, msg.linear ; does a LINEAR keyword go here ? 12511 0000B36B E86D05 <1> call isstring? 12512 0000B36E 7503E91D01 <1> je .linear ; yes --> 12513 <1> 12514 0000B373 AC <1> lodsb 12515 <1> 12516 0000B374 E8C0FB <1> call isvariable? ; is it a variable ? 12517 0000B377 7226 <1> jc .literal ; no, must be an immediate value --> 12518 <1> 12519 <1> .variable: 12520 0000B379 87DA <1> xchg bx, dx ; bx-> high word 12521 0000B37B 88CC <1> mov ah, cl 12522 0000B37D 31C9 <1> xor cx, cx 12523 0000B37F 80FC02 <1> cmp ah, 2 12524 0000B382 7609 <1> jbe .variable_nohigh 12525 0000B384 8B0F <1> mov cx, word [bx] ; get high word 12526 0000B386 80FC03 <1> cmp ah, 3 12527 0000B389 7702 <1> ja @F 12528 0000B38B B500 <1> mov ch, 0 12529 <1> @@: 12530 <1> .variable_nohigh: 12531 0000B38D 87DA <1> xchg bx, dx ; bx-> low word 12532 0000B38F 8B17 <1> mov dx, word [bx] ; get low word 12533 0000B391 89CB <1> mov bx, cx ; high word/zero 12534 0000B393 80FC01 <1> cmp ah, 1 12535 0000B396 7702 <1> ja .variable_notbyte 12536 0000B398 B600 <1> mov dh, 0 ; limit to byte 12537 <1> .variable_notbyte: 12538 0000B39A B400 <1> mov ah, 0 ; type pointer=0 signed=0 12539 0000B39C E92A02 <1> jmp .term_end 12540 <1> 12541 <1> 12542 <1> .literal: 12543 0000B39F 31DB <1> xor bx, bx ; (in case of decimal base shortcut: 12544 0000B3A1 BA0A00 <1> mov dx, 10 ; set base: decimal) 12545 0000B3A4 3C23 <1> cmp al, '#' ; shortcut change to decimal base, or string literal? 12546 0000B3A6 753C <1> jne .lithex_common 12547 0000B3A8 803C22 <1> cmp byte [si], '"' 12548 0000B3AB 7407 <1> je .lit_string 12549 0000B3AD 803C27 <1> cmp byte [si], "'" 12550 0000B3B0 7402 <1> je .lit_string 12551 0000B3B2 EB72 <1> jmp .lit_base ; decimal base --> 12552 <1> 12553 <1> .lit_string: 12554 0000B3B4 31D2 <1> xor dx, dx 12555 0000B3B6 AC <1> lodsb 12556 0000B3B7 86C4 <1> xchg al, ah 12557 <1> 12558 0000B3B9 E81900 <1> call @F 12559 0000B3BC 88C2 <1> mov dl, al 12560 0000B3BE E81400 <1> call @F 12561 0000B3C1 88C6 <1> mov dh, al 12562 0000B3C3 E80F00 <1> call @F 12563 0000B3C6 88C3 <1> mov bl, al 12564 0000B3C8 E80A00 <1> call @F 12565 0000B3CB 88C7 <1> mov bh, al 12566 0000B3CD AC <1> lodsb 12567 0000B3CE 38E0 <1> cmp al, ah 12568 0000B3D0 740F <1> je @FFF 12569 <1> .err3: 12570 0000B3D2 E9B800 <1> jmp .err2 12571 <1> 12572 <1> @@: 12573 0000B3D5 AC <1> lodsb 12574 0000B3D6 38E0 <1> cmp al, ah 12575 0000B3D8 7406 <1> je @F 12576 0000B3DA E86105 <1> call iseol?.notsemicolon 12577 0000B3DD 74F3 <1> je .err3 12578 0000B3DF C3 <1> retn 12579 <1> 12580 <1> @@: 12581 0000B3E0 59 <1> pop cx ; (discard near return address) 12582 <1> @@: 12583 0000B3E1 AC <1> lodsb 12584 0000B3E2 EB38 <1> jmp .lit_end_string 12585 <1> 12586 <1> 12587 <1> .lithex_common: 12588 0000B3E4 E8A303 <1> call .lit_ishexdigit? ; the first character must be a digit then 12589 0000B3E7 7303E9A100 <1> jc .err2 12590 0000B3EC 30D2 <1> xor dl, dl ; initialize value 12591 <1> .lithex_loopdigit: 12592 0000B3EE 3C5F <1> cmp al, '_' 12593 0000B3F0 7423 <1> je .lithex_skip 12594 0000B3F2 E89503 <1> call .lit_ishexdigit? ; was last character ? 12595 0000B3F5 7221 <1> jc .lit_end ; yes --> 12596 0000B3F7 F6C7F0 <1> test bh, 0F0h ; would shift bits out ? 12597 0000B3FA 7403E98E00 <1> jnz .err2 12598 0000B3FF E841D8 <1> call uppercase 12599 0000B402 2C30 <1> sub al, '0' 12600 0000B404 3C09 <1> cmp al, 9 ; was decimal digit ? 12601 0000B406 7602 <1> jbe .lithex_decimaldigit; yes --> 12602 0000B408 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 12603 <1> .lithex_decimaldigit: 12604 0000B40A B90400 <1> mov cx, 4 12605 <1> .lithex_loopshift: 12606 0000B40D D1E2 <1> shl dx, 1 12607 0000B40F D1D3 <1> rcl bx, 1 12608 0000B411 E2FA <1> loop .lithex_loopshift ; *16 12609 0000B413 08C2 <1> or dl, al ; add in the new digit 12610 <1> .lithex_skip: 12611 0000B415 AC <1> lodsb 12612 0000B416 EBD6 <1> jmp short .lithex_loopdigit 12613 <1> 12614 <1> .lit_end: 12615 0000B418 3C23 <1> cmp al, '#' ; base change specification? 12616 0000B41A 740A <1> je .lit_base ; yes --> 12617 <1> .lit_end_string: 12618 0000B41C E8F6F5 <1> call isseparator? ; after the number, there must be a separator 12619 0000B41F 756C <1> jne .err2 ; none here --> 12620 0000B421 B400 <1> mov ah, 0 ; type pointer=0 signed=0 12621 0000B423 E9A301 <1> jmp .term_end ; okay --> 12622 <1> .lit_base: 12623 0000B426 85DB <1> test bx, bx ; insure base <= 36 12624 0000B428 7563 <1> jnz .err2 12625 0000B42A 83FA24 <1> cmp dx, byte 36 12626 0000B42D 775E <1> ja .err2 12627 0000B42F 83FA02 <1> cmp dx, byte 2 ; and >= 2 12628 0000B432 7259 <1> jb .err2 ; otherwise error --> 12629 <1> 12630 0000B434 AC <1> lodsb 12631 0000B435 80FA10 <1> cmp dl, 16 ; hexadecimal ? 12632 0000B438 74AA <1> je .lithex_common ; yes, use specific handling --> 12633 <1> 12634 0000B43A 89D7 <1> mov di, dx ; di = base 12635 0000B43C 88D1 <1> mov cl, dl 12636 0000B43E 80C12F <1> add cl, '0'-1 12637 0000B441 80F939 <1> cmp cl, '9' 12638 0000B444 7602 <1> jbe .lit_basebelow11 12639 0000B446 B139 <1> mov cl, '9' 12640 <1> .lit_basebelow11: ; cl = highest decimal digit for base ('1'..'9') 12641 0000B448 88D5 <1> mov ch, dl 12642 0000B44A 80C536 <1> add ch, 'A'-10-1 ; ch = highest letter for base ('A'-x..'Z') 12643 <1> 12644 0000B44D E83D03 <1> call .lit_isdigit? ; first character must be a digit 12645 0000B450 723B <1> jc .err2 12646 0000B452 31D2 <1> xor dx, dx ; initialize value 12647 <1> .lit_loopdigit: 12648 0000B454 3C5F <1> cmp al, '_' 12649 0000B456 7432 <1> je .lit_skip 12650 0000B458 E83203 <1> call .lit_isdigit? ; was last character ? 12651 0000B45B 72BB <1> jc .lit_end ; yes --> 12652 0000B45D E8E3D7 <1> call uppercase 12653 0000B460 2C30 <1> sub al, '0' 12654 0000B462 3C09 <1> cmp al, 9 ; was decimal digit ? 12655 0000B464 7602 <1> jbe .lit_decimaldigit ; yes --> 12656 0000B466 2C07 <1> sub al, 'A'-('9'+1) ; else adjust for hexadecimal digit 12657 <1> .lit_decimaldigit: 12658 0000B468 50 <1> push ax 12659 0000B469 89D0 <1> mov ax, dx 12660 0000B46B 53 <1> push bx 12661 0000B46C F7E7 <1> mul di ; multiply low word with base 12662 0000B46E 89D3 <1> mov bx, dx 12663 0000B470 89C2 <1> mov dx, ax 12664 0000B472 58 <1> pop ax 12665 0000B473 52 <1> push dx 12666 0000B474 F7E7 <1> mul di ; multiply high word with base 12667 0000B476 85D2 <1> test dx, dx 12668 0000B478 5A <1> pop dx 12669 0000B479 7512 <1> jnz .err2 ; overflow --> 12670 0000B47B 01C3 <1> add bx, ax ; add them 12671 0000B47D 58 <1> pop ax 12672 0000B47E 720D <1> jc .err2 ; overflow --> 12673 0000B480 00C2 <1> add dl, al ; add in the new digit 12674 0000B482 80D600 <1> adc dh, 0 12675 0000B485 83D300 <1> adc bx, byte 0 12676 0000B488 7203 <1> jc .err2 ; overflow --> 12677 <1> ; The value 3#102002022201221111210 is exactly equal to ffffFFFFh 12678 <1> ; so 3#102002022201221111211 (or ...2) overflows 32 bits and 12679 <1> ; needs to be detected here when adding in the as yet least 12680 <1> ; significant digit. This is why this jump is needed. 12681 <1> ; This also applies to decimal #4294967296. 12682 <1> 12683 <1> .lit_skip: 12684 0000B48A AC <1> lodsb 12685 0000B48B EBC7 <1> jmp short .lit_loopdigit 12686 <1> 12687 <1> .err2: 12688 0000B48D E982F0 <1> jmp error 12689 <1> 12690 <1> 12691 <1> .linear: 12692 0000B490 58 <1> pop ax ; discard unary operators counter 12693 <1> 12694 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_LINEAR_STACK_CHECK 12695 0000B491 E81D04 <1> call stack_check_indirection 12696 <1> %else 12697 <1> mov ax, _EXPRESSION_LINEAR_STACK_CHECK 12698 <1> call stack_check ; abort if deep recursion 12699 <1> %endif 12700 0000B494 A9[6D71] <1> test ax, msg.stack_overflow.linear 12701 <1> 12702 0000B497 E8F504 <1> call skipwhite 12703 0000B49A FF36[DC88] <1> _386_PM push word [bAddr32] 12704 0000B49E 6652 <1> _386_PM push edx 12705 0000B4A0 5A <1> _386_PM pop dx 12706 0000B4A1 8B1E[840C] <1> mov bx, word [reg_ds] 12707 0000B4A5 E83683 <1> call getlinearaddr 12708 0000B4A8 52 <1> _386_PM push dx 12709 0000B4A9 665A <1> _386_PM pop edx 12710 0000B4AB 8F06[DC88] <1> _386_PM pop word [bAddr32] 12711 0000B4AF 72DC <1> jc .err2 12712 <1> 12713 0000B4B1 66 <1> _386_PM_o32 ; or dword 12714 0000B4B2 830E[5085]FF <1> or word [bp_offset], strict byte -1 12715 <1> ; do not use a preferred offset 12716 <1> 12717 0000B4B7 E8A704 <1> call skipcomm0 12718 0000B4BA B400 <1> mov ah, 0 ; type pointer=0 signed=0 12719 0000B4BC E90901 <1> jmp .term_end_recount 12720 <1> 12721 <1> 12722 <1> .value_in: 12723 0000B4BF 58 <1> pop ax ; discard unary operators counter 12724 <1> 12725 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 12726 0000B4C0 E8EE03 <1> call stack_check_indirection 12727 <1> %else 12728 <1> mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 12729 <1> call stack_check ; abort if deep recursion 12730 <1> %endif 12731 0000B4C3 A9[5271] <1> test ax, msg.stack_overflow.value_in 12732 <1> 12733 0000B4C6 E8C604 <1> call skipwhite 12734 0000B4C9 4E <1> dec si 12735 0000B4CA BA[1F67] <1> mov dx, msg.executing 12736 0000B4CD E80B04 <1> call isstring? 12737 0000B4D0 7514 <1> jne @F 12738 0000B4D2 E8BA04 <1> call skipwhite 12739 0000B4D5 56 <1> push si 12740 0000B4D6 BE[2967] <1> mov si, msg.executing_value_range 12741 0000B4D9 E87D03 <1> call get_value_range 12742 0000B4DC 9C <1> pushf 12743 0000B4DD E86F04 <1> call chkeol 12744 0000B4E0 9D <1> popf 12745 0000B4E1 5E <1> pop si 12746 0000B4E2 4E <1> dec si 12747 0000B4E3 AC <1> lodsb 12748 0000B4E4 EB03 <1> jmp @FF 12749 <1> 12750 <1> @@: 12751 0000B4E6 E87003 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 12752 <1> @@: 12753 <1> 12754 <1> ; If the VALUE is a not normal range (zero length 12755 <1> ; or from > to) then we still have to parse the 12756 <1> ; remaining input line to find the end of the 12757 <1> ; VALUE x IN y construct. So we do this with a 12758 <1> ; sort of hack: we take the invalid / unset 12759 <1> ; range values, do all the (invalid) comparisons, 12760 <1> ; but do not count any of the possible matches. 12761 <1> ; Look at .value_in.found for this hack. 12762 <1> lframe none, nested 12763 0000B4E9 5589E5 <1> lenter 12764 <1> lvar word, bit0_do_not_match 12765 0000B4EC 9C <1> pushf 12766 <1> lvar dword, value_from 12767 0000B4ED 51 <1> push cx 12768 0000B4EE 57 <1> push di 12769 <1> lvar dword, value_to 12770 0000B4EF 53 <1> push bx 12771 0000B4F0 52 <1> push dx 12772 0000B4F1 31C9 <1> xor cx, cx 12773 <1> lvar dword, found 12774 0000B4F3 51 <1> push cx 12775 0000B4F4 51 <1> push cx 12776 <1> 12777 0000B4F5 51 <1> push cx ; zero terminator of keyword remembered offsets 12778 0000B4F6 4E <1> dec si 12779 0000B4F7 BA[1467] <1> mov dx, msg.in 12780 0000B4FA E8DE03 <1> call isstring? 12781 <1> .err3_NZ: 12782 <1> .err4_NZ: 12783 0000B4FD 758E <1> jne .err2 12784 <1> 12785 <1> .value_in.loop: 12786 0000B4FF E88D04 <1> call skipwhite 12787 0000B502 4E <1> dec si 12788 0000B503 BB[4874] <1> mov bx, msgtable_value_range 12789 <1> ; -> table 12790 <1> 12791 <1> @@: 12792 0000B506 8B17 <1> mov dx, word [bx] 12793 0000B508 85D2 <1> test dx, dx 12794 0000B50A 7419 <1> jz @F ; last checked, go get range --> 12795 0000B50C E8CC03 <1> call isstring? 12796 0000B50F 7405 <1> je .value_in.keyword ; found a keyword --> 12797 0000B511 83C304 <1> add bx, 4 ; go to next table entry 12798 0000B514 EBF0 <1> jmp @B 12799 <1> 12800 <1> .value_in.keyword: 12801 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_VALUE_IN_STACK_CHECK 12802 0000B516 E89803 <1> call stack_check_indirection 12803 <1> %else 12804 <1> mov ax, _EXPRESSION_VALUE_IN_STACK_CHECK 12805 <1> call stack_check ; abort if deep recursion 12806 <1> %endif 12807 0000B519 A9[5271] <1> test ax, msg.stack_overflow.value_in 12808 <1> 12809 0000B51C E87004 <1> call skipwhite ; skip past blanks 12810 0000B51F 56 <1> push si ; remember offset after keyword 12811 0000B520 8B7702 <1> mov si, word [bx + 2] ; -> keyword replacement text 12812 0000B523 EBDA <1> jmp .value_in.loop ; handle replacement --> 12813 <1> 12814 <1> @@: 12815 0000B525 E83103 <1> call get_value_range ; OUT: cx:di = from, bx:dx = to 12816 0000B528 7223 <1> jc .value_in.next 12817 <1> 12818 <1> ; ! (StartVal > EndMatch) 12819 0000B52A 395EFC <1> cmp word [bp + ?value_from + 2], bx 12820 0000B52D 7503 <1> jne @F 12821 0000B52F 3956FA <1> cmp word [bp + ?value_from], dx 12822 <1> @@: 12823 0000B532 7719 <1> ja .value_in.next 12824 <1> 12825 <1> ; ! (EndVal < StartMatch) 12826 0000B534 394EF8 <1> cmp word [bp + ?value_to + 2], cx 12827 0000B537 7503 <1> jne @F 12828 0000B539 397EF6 <1> cmp word [bp + ?value_to], di 12829 <1> @@: 12830 0000B53C 720F <1> jb .value_in.next 12831 <1> 12832 <1> .value_in.found: 12833 0000B53E 8B4EFE <1> mov cx, word [bp + ?bit0_do_not_match] 12834 0000B541 F7D1 <1> not cx 12835 0000B543 83E101 <1> and cx, 1 12836 0000B546 014EF2 <1> add word [bp + ?found], cx 12837 0000B549 8356F200 <1> adc word [bp + ?found], 0 12838 <1> 12839 <1> .value_in.next: 12840 <1> @@: 12841 0000B54D E84004 <1> call skipwh0 12842 0000B550 3C2C <1> cmp al, ',' 12843 0000B552 74AB <1> je .value_in.loop 12844 <1> 12845 0000B554 59 <1> pop cx ; get next remembered offset 12846 0000B555 E306 <1> jcxz @F ; if none --> 12847 0000B557 89CE <1> mov si, cx ; -> behind keyword 12848 0000B559 4E <1> dec si 12849 0000B55A AC <1> lodsb ; reload al 12850 0000B55B EBF0 <1> jmp @B ; continue after the keyword --> 12851 <1> 12852 <1> @@: 12853 0000B55D 5A <1> pop dx 12854 0000B55E 5B <1> pop bx ; pop ?found counter variable 12855 0000B55F 89EC5D <1> lleave 12856 <1> 12857 0000B562 B400 <1> mov ah, 0 ; type pointer=0 signed=0 12858 0000B564 EB62 <1> jmp .term_end_recount 12859 <1> 12860 <1> 12861 <1> %if _INDIRECTION 12862 <1> .indirection: 12863 0000B566 E84803 <1> call stack_check_indirection 12864 <1> ; abort if deep recursion 12865 0000B569 A9[0571] <1> test ax, msg.stack_overflow.indirection 12866 <1> 12867 0000B56C FF36[DC88] <1> _386_PM push word [bAddr32] 12868 0000B570 6652 <1> _386_PM push edx 12869 0000B572 5A <1> _386_PM pop dx 12870 <1> 12871 0000B573 E8EA03 <1> call skipcomma ; also skips the '[' in al 12872 0000B576 8B1E[840C] <1> mov bx, word [reg_ds] ; default segment/selector 12873 0000B57A 51 <1> push cx ; save previous bit mask (ch) 12874 0000B57B E8CEF3 <1> call getaddrX ; (recursively calls getexpression:) 12875 0000B57E 59 <1> pop cx 12876 0000B57F B100 <1> mov cl, 0 12877 0000B581 3C5D <1> cmp al, ']' ; verify this is the closing bracket 12878 <1> .err5_NZ: 12879 0000B583 7403E975FF <1> jne .err4_NZ ; if not --> 12880 0000B588 AC <1> lodsb ; get next character 12881 <1> ; bx:(e)dx-> data 12882 <1> ; ch = bit mask of required bytes 12883 <1> ; cl = 0 12884 <1> 12885 0000B589 50 <1> push ax 12886 0000B58A 55 <1> push bp 12887 0000B58B 31ED <1> xor bp, bp 12888 0000B58D 55 <1> push bp 12889 0000B58E 55 <1> push bp 12890 0000B58F 89E5 <1> mov bp, sp ; -> buffer 12891 <1> 12892 0000B591 E8BDF0 <1> call prephack 12893 0000B594 E8E8F0 <1> call dohack 12894 <1> ; Regarding how this loop handles cx, 12895 <1> ; remember that ch holds the flags for 12896 <1> ; the required bytes. 12897 <1> ; And cl is initialised to 0. In 12898 <1> ; each iteration, cl is incremented. 12899 <1> ; The loop instruction then decrements 12900 <1> ; cl again, but the entire cx is only 12901 <1> ; zero if no more bytes are required. 12902 <1> ; (This hack saves a single byte over 12903 <1> ; the "test ch, ch \ jnz" alternative 12904 <1> ; but it isn't very pretty. It 12905 <1> ; also probably slows down a bit.) 12906 <1> .indirection_loop: 12907 0000B597 D0ED <1> shr ch, 1 ; need to read this byte ? 12908 0000B599 7306 <1> jnc .indirection_skip ; no --> 12909 0000B59B E8FCE3 <1> call readmem ; else read byte 12910 0000B59E 884600 <1> mov byte [bp+0], al ; store byte 12911 <1> .indirection_skip: 12912 0000B5A1 41 <1> inc cx ; = 1 if no more to read 12913 0000B5A2 45 <1> inc bp ; increase buffer pointer 12914 0000B5A3 66 <1> _386_PM_o32 ; inc edx 12915 0000B5A4 42 <1> inc dx ; increase offset 12916 0000B5A5 E2F0 <1> loop .indirection_loop ; read next byte if any --> 12917 0000B5A7 E809F1 <1> call unhack 12918 <1> 12919 0000B5AA 5A <1> pop dx 12920 0000B5AB 5B <1> pop bx 12921 0000B5AC 5D <1> pop bp 12922 0000B5AD 58 <1> pop ax 12923 <1> 12924 0000B5AE 52 <1> _386_PM push dx 12925 0000B5AF 665A <1> _386_PM pop edx 12926 0000B5B1 8F06[DC88] <1> _386_PM pop word [bAddr32] 12927 0000B5B5 B400 <1> mov ah, 0 ; type pointer=0 signed=0 12928 0000B5B7 EB0F <1> jmp short .term_end_recount 12929 <1> %endif 12930 <1> 12931 <1> 12932 <1> .parens: 12933 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PARENS_STACK_CHECK 12934 0000B5B9 E8F502 <1> call stack_check_indirection 12935 <1> %else 12936 <1> mov ax, _EXPRESSION_PARENS_STACK_CHECK 12937 <1> call stack_check ; abort if deep recursion 12938 <1> %endif 12939 0000B5BC A9[1F71] <1> test ax, msg.stack_overflow.parens 12940 <1> 12941 0000B5BF AC <1> lodsb 12942 0000B5C0 E870FD <1> call getexpression ; (recursive) bx:dx = number, ah = type 12943 0000B5C3 3C29 <1> cmp al, ')' ; closing parens ? 12944 0000B5C5 75BC <1> jne .err5_NZ ; no --> 12945 0000B5C7 AC <1> lodsb 12946 <1> 12947 <1> .term_end_recount: 12948 0000B5C8 A9 <1> db __TEST_IMM16 ; skip pop, stc; NC 12949 <1> .term_end: 12950 0000B5C9 59 <1> pop cx ; get count+1 of unary operators and type specifiers 12951 0000B5CA F9 <1> stc 12952 0000B5CB 5F <1> pop di ; -> term 12953 0000B5CC 87F7 <1> xchg si, di 12954 0000B5CE 57 <1> push di ; save -> behind 12955 <1> ; si-> unary operators and types 12956 0000B5CF 720B <1> jc .unary_processnext ; if we preserved the count --> 12957 <1> 12958 0000B5D1 53 <1> push bx 12959 0000B5D2 52 <1> push dx 12960 0000B5D3 56 <1> push si 12961 0000B5D4 E80B02 <1> call count_unary_operators 12962 0000B5D7 89D1 <1> mov cx, dx ; get count+1 again 12963 0000B5D9 5E <1> pop si 12964 0000B5DA 5A <1> pop dx 12965 0000B5DB 5B <1> pop bx 12966 <1> 12967 <1> .unary_processnext: 12968 0000B5DC E204 <1> loop .unary_doprocess 12969 0000B5DE 5E <1> pop si ; -> behind term 12970 0000B5DF 4E <1> dec si ; -> character to reload in skipwhite 12971 0000B5E0 EB33 <1> jmp short .term_done 12972 <1> 12973 <1> .unary_doprocess: 12974 0000B5E2 56 <1> push si 12975 0000B5E3 51 <1> push cx 12976 0000B5E4 53 <1> push bx 12977 0000B5E5 52 <1> push dx 12978 <1> 12979 0000B5E6 89CF <1> mov di, cx ; count+1 of operators to skip 12980 0000B5E8 E8F901 <1> call count_unary_operators_restrict ; skip them 12981 0000B5EB 7525 <1> jnz .err ; if not enough --> (?!) 12982 <1> 12983 0000B5ED E850F4 <1> call istype? ; get type info if it's a type 12984 0000B5F0 7211 <1> jc .unary_processnotype ; isn't a type --> 12985 0000B5F2 86C4 <1> xchg al, ah ; al = type input 12986 0000B5F4 D1EB <1> shr bx, 1 ; CF = signedness 12987 0000B5F6 9F <1> lahf ; with CF = signedness 12988 0000B5F7 8B8F[9A90] <1> mov cx, word [ typehandlers + bx ] ; function 12989 <1> .unary_processcall: 12990 0000B5FB 5A <1> pop dx 12991 0000B5FC 5B <1> pop bx 12992 0000B5FD FFD1 <1> call cx ; call type or unary operator handler 12993 <1> ; bx:dx = output number, ah = type 12994 0000B5FF 59 <1> pop cx ; restore processing counter 12995 0000B600 5E <1> pop si ; restore ->term 12996 0000B601 EBD9 <1> jmp short .unary_processnext 12997 <1> 12998 <1> .unary_processnotype: 12999 0000B603 E8F3F3 <1> call isunaryoperator? ; get unary operator index 13000 0000B606 750A <1> jne .err ; if no unary operator --> (?!) 13001 0000B608 89CB <1> mov bx, cx 13002 0000B60A D1E3 <1> shl bx, 1 13003 0000B60C 8B8F[C690] <1> mov cx, word [ unaryoperatorhandlers + bx ] 13004 0000B610 EBE9 <1> jmp short .unary_processcall 13005 <1> 13006 <1> .err: 13007 0000B612 E9FDEE <1> jmp error 13008 <1> 13009 <1> .term_done: ; bx:dx = number, ah = type 13010 <1> ; get the operator following this number 13011 0000B615 E87703 <1> call skipwhite 13012 0000B618 8956F2 <1> mov word [bp+lB+0], dx 13013 0000B61B 895EF4 <1> mov word [bp+lB+2], bx ; store numeric value 13014 0000B61E 8B1E[CA95] <1> mov bx, word [hh_depth_of_single_term] 13015 0000B622 3B1E[C895] <1> cmp bx, word [hh_depth] 13016 0000B626 7455 <1> je .operator_invalid 13017 0000B628 E8D4F3 <1> call isoperator? ; cl = operator index (if any) 13018 0000B62B 7440 <1> je .operator_apparently_valid 13019 0000B62D E80A03 <1> call iseol? ; end of line follows ? 13020 0000B630 744B <1> je .operator_invalid 13021 <1> .hh_twofold_check: 13022 0000B632 807EFC17 <1> cmp byte [bp + lA + 4], OPERATOR_COND 13023 0000B636 7445 <1> je .operator_invalid ; special check for conditional operator 13024 0000B638 807EFC18 <1> cmp byte [bp + lA + 4], OPERATOR_RIGHTOP 13025 0000B63C 750D <1> jne @F 13026 0000B63E 837EFE00 <1> cmp word [bp + lCount], 0 13027 0000B642 7407 <1> je @F 13028 0000B644 59 <1> pop cx 13029 0000B645 51 <1> push cx 13030 0000B646 80F917 <1> cmp cl, OPERATOR_COND 13031 0000B649 7432 <1> je .operator_invalid ; special check for conditional operator 13032 <1> @@: 13033 0000B64B 833E[C895]01 <1> cmp word [hh_depth], 1 ; are we in first level expression ? 13034 0000B650 752B <1> jne .operator_invalid ; no, do not do special H operation --> 13035 0000B652 F606[CC95]03 <1> test byte [hhflag], 1|2 ; special H operation requested ? 13036 0000B657 7424 <1> jz .operator_invalid ; no --> 13037 0000B659 B302 <1> mov bl, OPERATOR_MINUS ; assume it's sub 13038 0000B65B F606[CC95]02 <1> test byte [hhflag], 2 ; sub requested by H ? 13039 0000B660 7501 <1> jnz .hh_twofold_found ; yes --> 13040 0000B662 4B <1> dec bx ; else it must be add 13041 <1> %if (OPERATOR_MINUS - 1) != OPERATOR_PLUS 13042 <1> %error Remove optimisation 13043 <1> %endif 13044 <1> .hh_twofold_found: 13045 0000B663 800E[CC95]04 <1> or byte [hhflag], 4 ; set flag for H twofold operation 13046 0000B668 E8F602 <1> call skipcomm0 13047 0000B66B EB12 <1> jmp short .operator_done ; return this --> 13048 <1> 13049 <1> .operator_apparently_valid: 13050 0000B66D 89CB <1> mov bx, cx 13051 0000B66F 01DB <1> add bx, bx 13052 0000B671 FF97[D090] <1> call [operatordispatchers + bx] 13053 0000B675 84DB <1> test bl, bl ; valid ? 13054 0000B677 74B9 <1> jz .hh_twofold_check ; no, check for H twofold operation --> 13055 0000B679 E81303 <1> call skipwhite 13056 0000B67C A9 <1> db __TEST_IMM16 13057 <1> .operator_invalid: 13058 0000B67D 31DB <1> xor bx, bx ; bl = 0 (no operator) 13059 <1> .operator_done: 13060 0000B67F 88E7 <1> mov bh, ah ; bh = type info 13061 0000B681 895EF6 <1> mov word [bp+lB+4], bx ; store type and following operator 13062 <1> 13063 0000B684 8A4EFC <1> mov cl, byte [bp+lA+4] 13064 0000B687 E8EE00 <1> call .compare_operators ; (cmp bl, cl = cmp Boprtr, Aoprtr) 13065 0000B68A 7249 <1> jb .high_precedence_A ; compute the first operand first --> 13066 <1> ; (jump taken for invalid Boprtr too) 13067 0000B68C 7505 <1> jne @F 13068 0000B68E 83FB01 <1> cmp bx, OPPREC_COND 13069 0000B691 7542 <1> jne .high_precedence_A 13070 <1> 13071 <1> @@: 13072 0000B693 FF46FE <1> inc word [bp+lCount] ; increase loop count 13073 0000B696 FF76F8 <1> push word [bp+lA+0] 13074 0000B699 FF76FA <1> push word [bp+lA+2] 13075 0000B69C FF76FC <1> push word [bp+lA+4] ; push A and its operator 13076 <1> 13077 0000B69F FF76F6 <1> push word [bp+lB+4] 13078 0000B6A2 FF76F4 <1> push word [bp+lB+2] 13079 0000B6A5 FF76F2 <1> push word [bp+lB+0] 13080 0000B6A8 8F46F8 <1> pop word [bp+lA+0] 13081 0000B6AB 8F46FA <1> pop word [bp+lA+2] 13082 0000B6AE 8F46FC <1> pop word [bp+lA+4] ; set A to B, including operator 13083 <1> 13084 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_PRECEDENCE_STACK_CHECK 13085 0000B6B1 E8FD01 <1> call stack_check_indirection 13086 <1> %else 13087 <1> mov ax, _EXPRESSION_PRECEDENCE_STACK_CHECK 13088 <1> call stack_check ; abort if deep recursion 13089 <1> %endif 13090 0000B6B4 A9[3971] <1> test ax, msg.stack_overflow.precedence 13091 <1> 13092 <1> d4 call d4message 13093 <1> d4 asciz "getexpression: Entering loop/recursion",13,10 13094 <1> 13095 <1> .loop_j: 13096 0000B6B7 E98EFC <1> jmp .loop ; start again (former B as first term) --> 13097 <1> 13098 <1> .cont: 13099 <1> 13100 <1> d4 call d4message 13101 <1> d4 asciz "getexpression: End of loop/recursion",13,10 13102 <1> 13103 0000B6BA FF76FC <1> push word [bp+lA+4] 13104 0000B6BD FF76FA <1> push word [bp+lA+2] 13105 0000B6C0 FF76F8 <1> push word [bp+lA+0] 13106 0000B6C3 8F46F2 <1> pop word [bp+lB+0] 13107 0000B6C6 8F46F4 <1> pop word [bp+lB+2] 13108 0000B6C9 8F46F6 <1> pop word [bp+lB+4] ; set B to A, including operator 13109 <1> 13110 0000B6CC 8F46FC <1> pop word [bp+lA+4] 13111 0000B6CF 8F46FA <1> pop word [bp+lA+2] 13112 0000B6D2 8F46F8 <1> pop word [bp+lA+0] ; pop A and its operator 13113 <1> 13114 <1> .high_precedence_A: 13115 0000B6D5 8B4EFC <1> mov cx, word [bp+lA+4] ; retrieve A's type info and operator 13116 0000B6D8 FF76FA <1> push word [bp+lA+2] 13117 0000B6DB FF76F8 <1> push word [bp+lA+0] 13118 0000B6DE 8B46F6 <1> mov ax, word [bp+lB+4] ; retrieve B's type info and operator 13119 0000B6E1 882E[CD95] <1> mov byte [hhtype], ch ; set type info 13120 0000B6E5 8F06[C495] <1> pop word [hhvar] 13121 0000B6E9 B500 <1> mov ch, 0 ; cx = A's 1-based operator index 13122 0000B6EB 8F06[C695] <1> pop word [hhvar+2] ; retrieve A's number 13123 0000B6EF 8B56F2 <1> mov dx, word [bp+lB+0] 13124 0000B6F2 89CF <1> mov di, cx 13125 0000B6F4 8B5EF4 <1> mov bx, word [bp+lB+2] ; retrieve B's number 13126 0000B6F7 01FF <1> add di, di ; = offset into dispatch table 13127 0000B6F9 50 <1> push ax ; preserve B's operator 13128 0000B6FA FF95[1091] <1> call near [operatorfunctions+di]; compute: (A) operatorA (B) 13129 0000B6FE 59 <1> pop cx ; cl = B's operator 13130 <1> 13131 0000B6FF 8956F8 <1> mov word [bp+lA+0], dx 13132 0000B702 88C8 <1> mov al, cl ; B's operator 13133 0000B704 895EFA <1> mov word [bp+lA+2], bx 13134 0000B707 8946FC <1> mov word [bp+lA+4], ax ; store result in A, with B's operator 13135 <1> 13136 <1> %if OPERATOR_INVALID != 0 13137 <1> %error Remove optimisation 13138 <1> %endif 13139 0000B70A 84C0 <1> test al, al ; (previous B's) operator valid ? 13140 0000B70C 7412 <1> jz .end ; no, end of sequence --> 13141 <1> 13142 0000B70E 837EFE00 <1> cmp word [bp+lCount], byte 0 ; in recursion ? 13143 0000B712 74A3 <1> je .loop_j ; no, loop --> 13144 <1> 13145 0000B714 5B <1> pop bx 13146 0000B715 53 <1> push bx ; retrieve saved ('@') operator 13147 <1> 13148 0000B716 E85F00 <1> call .compare_operators ; (cmp bl, cl = cmp @oprtr, Aoprtr) 13149 0000B719 729C <1> jb .loop_j ; A's operator's precedence higher --> 13150 <1> 13151 0000B71B 83FB01 <1> cmp bx, OPPREC_COND 13152 0000B71E 7497 <1> je .loop_j 13153 <1> 13154 <1> d4 call d4message 13155 <1> d4 asciz "getexpression: Loop/recursion found to be not necessary anymore",13,10 13156 <1> 13157 <1> ; dec word [bp+lCount] 13158 <1> ; jmp .cont ; return to previous level --> 13159 <1> 13160 <1> .end: 13161 0000B720 FF4EFE <1> dec word [bp+lCount] ; decrease loop count 13162 0000B723 7995 <1> jns .cont ; process next operand from stack --> 13163 <1> 13164 0000B725 8B56F8 <1> mov dx, word [bp+lA+0] 13165 0000B728 8B5EFA <1> mov bx, word [bp+lA+2] ; retrieve A 13166 0000B72B 8B46FC <1> mov ax, word [bp+lA+4] ; (discard (invalid) operator) 13167 <1> 13168 0000B72E 89EC5D <1> lleave code ; remove the stack frame 13169 <1> 13170 0000B731 5F <1> pop di 13171 0000B732 59 <1> pop cx ; restore registers 13172 <1> 13173 0000B733 FF0E[C895] <1> dec word [hh_depth] 13174 0000B737 4E <1> dec si 13175 0000B738 AC <1> lodsb ; (restore al) 13176 <1> 13177 <1> .countsignificantbits: 13178 0000B739 51 <1> push cx 13179 0000B73A 52 <1> push dx 13180 0000B73B 53 <1> push bx 13181 0000B73C B90100 <1> mov cx, 1 13182 0000B73F 53 <1> push bx 13183 0000B740 F6C440 <1> test ah, 40h ; signed type ? 13184 0000B743 7416 <1> jz .unsigned ; no --> 13185 0000B745 F6C780 <1> test bh, 80h ; negative value ? 13186 0000B748 7411 <1> jz .unsigned ; no --> 13187 <1> .signed: 13188 0000B74A 21D3 <1> and bx, dx 13189 0000B74C 43 <1> inc bx ; = 0 if -1 (all bits set) 13190 0000B74D 5B <1> pop bx 13191 0000B74E 741F <1> jz .done ; is -1, 1 significant bit --> 13192 0000B750 B122 <1> mov cl, 32+1+1 ; number of significant bits is 1 + 1-based index of highest clear bit 13193 <1> .signedloop: 13194 0000B752 D1E2 <1> shl dx, 1 13195 0000B754 D1D3 <1> rcl bx, 1 ; shift up the number 13196 0000B756 49 <1> dec cx ; maintain index 13197 0000B757 72F9 <1> jc .signedloop ; still a set bit --> 13198 0000B759 EB14 <1> jmp short .done 13199 <1> .unsigned: 13200 0000B75B 09D3 <1> or bx, dx ; = 0 if 0 (all bits cleared) 13201 0000B75D 5B <1> pop bx 13202 0000B75E 740F <1> jz .done ; is 0, 1 significant bit --> 13203 0000B760 B121 <1> mov cl, 32+1 ; number of significant bits is 1-based index of highest set bit 13204 <1> .unsignedloop: 13205 0000B762 D1E2 <1> shl dx, 1 13206 0000B764 D1D3 <1> rcl bx, 1 13207 0000B766 49 <1> dec cx 13208 0000B767 73F9 <1> jnc .unsignedloop 13209 0000B769 F6C440 <1> test ah, 40h ; positive signed value ? 13210 0000B76C 7401 <1> jz .done ; no --> 13211 0000B76E 41 <1> inc cx ; then the following zero bit is required too 13212 <1> .done: 13213 0000B76F 80E4C0 <1> and ah, 1100_0000b 13214 <1> ; insure we only pass the top two type bits 13215 0000B772 08CC <1> or ah, cl 13216 <1> ; low 6 bits = number of significant bits 13217 0000B774 5B <1> pop bx 13218 0000B775 5A <1> pop dx 13219 0000B776 59 <1> pop cx 13220 0000B777 C3 <1> retn 13221 <1> 13222 <1> 13223 <1> ; INP: bl = operator index 1 13224 <1> ; cl = operator index 2 13225 <1> ; OUT: flags as for "cmp precedence1, precedence2" 13226 <1> ; CHG: bx, cx 13227 <1> .compare_operators: 13228 0000B778 E80600 <1> call .getprecedence 13229 0000B77B E80300 <1> call .getprecedence 13230 0000B77E 39CB <1> cmp bx, cx 13231 0000B780 C3 <1> retn 13232 <1> 13233 <1> .getprecedence: 13234 0000B781 30FF <1> xor bh, bh 13235 0000B783 8A9F[F690] <1> mov bl, byte [operatorprecedences+bx] 13236 0000B787 87D9 <1> xchg bx, cx 13237 0000B789 C3 <1> retn 13238 <1> 13239 <1> getexpression.lit_ishexdigit?: 13240 0000B78A B93946 <1> mov cx, "9F" 13241 <1> getexpression.lit_isdigit?: 13242 0000B78D 3C30 <1> cmp al, '0' 13243 0000B78F 7214 <1> jb .no 13244 0000B791 38C8 <1> cmp al, cl 13245 0000B793 760D <1> jbe .yes 13246 0000B795 50 <1> push ax 13247 0000B796 E8AAD4 <1> call uppercase 13248 0000B799 38E8 <1> cmp al, ch 13249 0000B79B 7707 <1> ja .no_p 13250 0000B79D 3C41 <1> cmp al, 'A' 13251 0000B79F 7203 <1> jb .no_p 13252 0000B7A1 58 <1> pop ax 13253 <1> .yes: 13254 0000B7A2 F8 <1> clc 13255 0000B7A3 C3 <1> retn 13256 <1> 13257 <1> .no_p: 13258 0000B7A4 58 <1> pop ax 13259 <1> .no: 13260 0000B7A5 F9 <1> stc 13261 0000B7A6 C3 <1> retn 13262 <1> 13263 <1> 13264 <1> of_cond: 13265 0000B7A7 50 <1> push ax ; second operand type 13266 0000B7A8 4E <1> dec si 13267 0000B7A9 AD <1> lodsw 13268 0000B7AA 3D3A3A <1> cmp ax, "::" 13269 0000B7AD 7403E960ED <1> jne error 13270 <1> %if _EXPRESSION_INDIRECTION_STACK_CHECK == _EXPRESSION_COND_STACK_CHECK 13271 0000B7B2 E8FC00 <1> call stack_check_indirection 13272 <1> %else 13273 <1> mov ax, _EXPRESSION_COND_STACK_CHECK 13274 <1> call stack_check ; abort if deep recursion 13275 <1> %endif 13276 0000B7B5 A9[8271] <1> test ax, msg.stack_overflow.cond 13277 <1> 13278 0000B7B8 A1[C495] <1> mov ax, word [hhvar] 13279 0000B7BB 0B06[C695] <1> or ax, word [hhvar + 2] ; ax = flag (zero if to take third operand) 13280 0000B7BF 53 <1> push bx 13281 0000B7C0 52 <1> push dx 13282 0000B7C1 50 <1> push ax ; preserve stack 13283 0000B7C2 AC <1> lodsb 13284 0000B7C3 E86DFB <1> call getexpression ; parse third operand 13285 0000B7C6 E89801 <1> call skipcomm0 ; allow comma afterwards 13286 0000B7C9 59 <1> pop cx 13287 0000B7CA E309 <1> jcxz @F ; if to take third operand --> 13288 0000B7CC 5A <1> pop dx 13289 0000B7CD 5B <1> pop bx ; take second operand 13290 0000B7CE 88C1 <1> mov cl, al 13291 0000B7D0 58 <1> pop ax ; ah = second operand type 13292 0000B7D1 88C8 <1> mov al, cl ; preserve al 13293 0000B7D3 EB03 <1> jmp @FF 13294 <1> 13295 <1> @@: 13296 0000B7D5 59 <1> pop cx 13297 0000B7D6 59 <1> pop cx ; discard second operand value 13298 0000B7D7 59 <1> pop cx ; discard second operand type 13299 <1> @@: 13300 0000B7D8 59 <1> pop cx ; discard near return address 13301 0000B7D9 59 <1> pop cx ; discard cx on stack 13302 <1> 13303 0000B7DA C646FC18 <1> mov byte [bp+lA+4], OPERATOR_RIGHTOP 13304 0000B7DE 4E <1> dec si 13305 0000B7DF E933FE <1> jmp getexpression.term_done 13306 <1> 13307 <1> 13308 <1> lleave ctx 13309 <1> 13310 <1> 13311 <1> ; INP: si-> possible unary operators 13312 <1> ; OUT: dx = 1 + count of unary operators 13313 <1> ; al, si-> behind identified unary operators 13314 <1> ; ch = bit mask of required bytes, 13315 <1> ; bits 0..3 represent one byte of a dword each 13316 <1> ; bits 4..7 are clear 13317 <1> ; CHG: bx, ch, di 13318 <1> ; 13319 <1> ; Type specifications are parsed as unary operators 13320 <1> ; here. (Elsewhere, "unary operators" refers only to 13321 <1> ; the unary operators specified as one of "+-~!?".) 13322 <1> count_unary_operators: 13323 0000B7E2 31FF <1> xor di, di 13324 <1> ; INP: si-> possible unary operators 13325 <1> ; di = maximum count+1 of unary operators to process, 13326 <1> ; zero means unlimited 13327 <1> ; OUT: dx = 1 + count of unary operators, 13328 <1> ; at most di 13329 <1> ; al, si-> behind identified unary operators 13330 <1> ; ch = bit mask of required bytes, 13331 <1> ; bits 0..3 represent one byte of a dword each 13332 <1> ; bits 4..7 are clear 13333 <1> ; ZR if maximum reached 13334 <1> ; NZ if maximum not reached 13335 <1> ; CHG: bx, ch 13336 <1> count_unary_operators_restrict: 13337 0000B7E4 B50F <1> mov ch, 1111b ; default to access a full dword 13338 0000B7E6 31D2 <1> xor dx, dx ; initialize counter to zero 13339 0000B7E8 A8 <1> db __TEST_IMM8 ; skip pop 13340 <1> .loop: 13341 0000B7E9 5F <1> pop di ; get maximum count 13342 0000B7EA 42 <1> inc dx ; count unary operators and type specifiers 13343 0000B7EB 57 <1> push di ; save maximum count again 13344 0000B7EC E8A001 <1> call skipwhite ; load next character and skip blanks 13345 0000B7EF 39FA <1> cmp dx, di ; reached maximum ? 13346 0000B7F1 741B <1> je .end ; yes --> (ZR) 13347 0000B7F3 51 <1> push cx 13348 0000B7F4 E849F2 <1> call istype? ; check for type and if so retrieve info 13349 0000B7F7 720F <1> jc .notype ; not a type --> 13350 0000B7F9 59 <1> pop cx 13351 <1> 13352 0000B7FA D1EB <1> shr bx, 1 ; discard signedness bit 13353 0000B7FC 89FE <1> mov si, di ; -> behind the type specifier 13354 0000B7FE B11F <1> mov cl, 01Fh ; prepare shift count register 13355 0000B800 238F[8C90] <1> and cx,[typebitmasks+bx]; apply mask and get shift count register 13356 0000B804 D2E5 <1> shl ch, cl ; apply shift 13357 0000B806 EBE1 <1> jmp short .loop ; check for more --> 13358 <1> 13359 <1> .notype: 13360 0000B808 E8EEF1 <1> call isunaryoperator? ; is it a unary operator? 13361 0000B80B 59 <1> pop cx 13362 0000B80C 74DB <1> je .loop ; yes, check for more --> 13363 <1> ; (NZ) 13364 <1> .end: 13365 0000B80E 5F <1> pop di ; discard 13366 0000B80F C3 <1> retn 13367 <1> 13368 <1> 13369 <1> get3byte.checksignificantbits: 13370 0000B810 50 <1> push ax 13371 0000B811 80E43F <1> and ah, 3Fh 13372 0000B814 80FC18 <1> cmp ah, 24 13373 0000B817 EB1E <1> jmp checksignificantbitscommon 13374 <1> 13375 <1> getword: 13376 0000B819 53 <1> push bx 13377 0000B81A E816FB <1> call getexpression 13378 0000B81D 5B <1> pop bx 13379 <1> .checksignificantbits: 13380 0000B81E 50 <1> push ax 13381 0000B81F 80E43F <1> and ah, 3Fh 13382 0000B822 80FC10 <1> cmp ah, 16 13383 0000B825 EB10 <1> jmp checksignificantbitscommon 13384 <1> 13385 <1> getbyte: 13386 0000B827 53 <1> push bx 13387 0000B828 52 <1> push dx 13388 0000B829 E807FB <1> call getexpression 13389 0000B82C 5B <1> pop bx 13390 0000B82D 88FE <1> mov dh, bh 13391 0000B82F 5B <1> pop bx 13392 <1> .checksignificantbits: 13393 0000B830 50 <1> push ax 13394 0000B831 80E43F <1> and ah, 3Fh 13395 0000B834 80FC08 <1> cmp ah, 8 13396 <1> checksignificantbitscommon: 13397 0000B837 58 <1> pop ax 13398 0000B838 7701 <1> ja short errorj6 ; if error 13399 0000B83A C3 <1> retn 13400 <1> 13401 <1> errorj6: 13402 0000B83B E9D4EC <1> jmp error 13403 <1> 13404 <1> 13405 <1> ; GETNYB - Convert the hex character in AL into a nybble. Return 13406 <1> ; carry set in case of error. 13407 <1> 13408 <1> getnyb: 13409 0000B83E 50 <1> push ax 13410 0000B83F 2C30 <1> sub al, '0' 13411 0000B841 3C09 <1> cmp al, 9 13412 0000B843 760D <1> jbe .return ; if normal digit 13413 0000B845 58 <1> pop ax 13414 0000B846 50 <1> push ax 13415 0000B847 E8F9D3 <1> call uppercase 13416 0000B84A 2C41 <1> sub al, 'A' 13417 0000B84C 3C05 <1> cmp al, 'F'-'A' 13418 0000B84E 7706 <1> ja .error ; if not A..F 13419 0000B850 040A <1> add al, 10 13420 <1> .return: 13421 0000B852 44 <1> inc sp ; normal return (first pop old AX) 13422 0000B853 44 <1> inc sp 13423 0000B854 F8 <1> clc 13424 0000B855 C3 <1> retn 13425 <1> .error: 13426 0000B856 58 <1> pop ax ; error return 13427 0000B857 F9 <1> stc 13428 0000B858 C3 <1> retn 13429 <1> 13430 <1> 13431 <1> ; INP: si -> input line 13432 <1> ; OUT: NC if normal range (nonzero, upper >= lower), 13433 <1> ; bx:dx = TO value (upper bound) 13434 <1> ; cx:di = FROM value (lower bound) 13435 <1> ; CY if not normal, 13436 <1> ; bx:dx and cx:di may be invalid 13437 <1> ; ZR if FROM LENGTH with zero length, cx:di valid 13438 <1> ; al = first character 13439 <1> ; si -> next character 13440 <1> ; jumps to error if invalid input 13441 <1> get_value_range: 13442 0000B859 E83301 <1> call skipwhite 13443 0000B85C 4E <1> dec si 13444 0000B85D BA[1767] <1> mov dx, msg.from 13445 0000B860 E87800 <1> call isstring? 13446 0000B863 AC <1> lodsb 13447 0000B864 753B <1> jne .not_from 13448 <1> 13449 <1> .from: 13450 0000B866 E8CAFA <1> call getexpression ; (recursive) 13451 0000B869 89D7 <1> mov di, dx 13452 0000B86B 89D9 <1> mov cx, bx ; cx:di = from 13453 <1> 13454 0000B86D 4E <1> dec si 13455 0000B86E BA[1C67] <1> mov dx, msg.to 13456 0000B871 E86700 <1> call isstring? 13457 0000B874 7425 <1> je .from_to 13458 0000B876 BA[F966] <1> mov dx, msg.length 13459 0000B879 E85F00 <1> call isstring? 13460 0000B87C 7403E991EC <1> jne error 13461 <1> 13462 <1> .from_length: 13463 0000B881 AC <1> lodsb 13464 0000B882 E8AEFA <1> call getexpression ; (recursive) 13465 0000B885 85DB <1> test bx, bx 13466 0000B887 7506 <1> jnz @F 13467 0000B889 85D2 <1> test dx, dx 13468 0000B88B 7502 <1> jnz @F 13469 <1> ; ZR = length is zero, cx:di = from 13470 <1> .notnormal: 13471 0000B88D F9 <1> stc 13472 0000B88E C3 <1> retn 13473 <1> 13474 <1> @@: 13475 <1> ; bx:dx = length 13476 0000B88F 01FA <1> add dx, di 13477 0000B891 11CB <1> adc bx, cx ; bx:dx = from + length 13478 0000B893 83EA01 <1> sub dx, 1 13479 0000B896 83DB00 <1> sbb bx, 0 ; bx:dx = from + length - 1 13480 0000B899 EB0D <1> jmp @F 13481 <1> 13482 <1> .from_to: 13483 0000B89B AC <1> lodsb 13484 <1> 13485 0000B89C E894FA <1> call getexpression ; (recursive) 13486 <1> ; bx:dx = to 13487 <1> ; cx:di = from 13488 0000B89F EB07 <1> jmp @F 13489 <1> 13490 <1> .not_from: 13491 0000B8A1 E88FFA <1> call getexpression ; (recursive) 13492 0000B8A4 89D7 <1> mov di, dx 13493 0000B8A6 89D9 <1> mov cx, bx ; bx:dx = cx:ax = value 13494 <1> 13495 <1> @@: 13496 0000B8A8 39CB <1> cmp bx, cx 13497 0000B8AA 7502 <1> jne @F 13498 0000B8AC 39FA <1> cmp dx, di 13499 <1> @@: 13500 0000B8AE 72DD <1> jb .notnormal ; NZ = length overflow or not normal FROM TO 13501 0000B8B0 C3 <1> retn ; (NC) 13502 <1> 13503 <1> 13504 <1> stack_check_indirection: 13505 0000B8B1 B88000 <1> mov ax, _EXPRESSION_INDIRECTION_STACK_CHECK 13506 <1> 13507 <1> ; INP: ax = how much stack should be left 13508 <1> ; word [cs:ip + 1] = message for location 13509 <1> ; OUT: doesn't return if stack overflow 13510 <1> ; CHG: ax 13511 <1> ; STT: ds = ss 13512 <1> stack_check: 13513 0000B8B4 05[400A] <1> add ax, stack 13514 0000B8B7 39C4 <1> cmp sp, ax 13515 0000B8B9 7201 <1> jb @F 13516 0000B8BB C3 <1> retn 13517 <1> 13518 <1> @@: 13519 0000B8BC 58 <1> pop ax 13520 <1> 13521 0000B8BD 16 <1> push ss 13522 0000B8BE 07 <1> pop es 13523 0000B8BF 8B26[9E0A] <1> mov sp, [throwsp] 13524 <1> 13525 0000B8C3 BF[F670] <1> mov di, msg.stack_overflow.caller 13526 0000B8C6 E87101 <1> call hexword 13527 0000B8C9 BA[DA70] <1> mov dx, msg.stack_overflow 13528 0000B8CC E82105 <1> call putsz 13529 0000B8CF 93 <1> xchg ax, bx 13530 0000B8D0 2E8B5701 <1> mov dx, [cs:bx + 1] 13531 0000B8D4 E81905 <1> call putsz 13532 <1> 13533 0000B8D7 FF26[9A0A] <1> jmp near [errret] 9346 9347 9348 %include "lineio.asm" 9349 <1> 9350 <1> %if 0 9351 <1> 9352 <1> lDebug line input and output 9353 <1> 9354 <1> Copyright (C) 1995-2003 Paul Vojta 9355 <1> Copyright (C) 2008-2012 C. Masloch 9356 <1> 9357 <1> Usage of the works is permitted provided that this 9358 <1> instrument is retained with the works, so that any entity 9359 <1> that uses the works is notified of this instrument. 9360 <1> 9361 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9362 <1> 9363 <1> %endif 9364 <1> 9365 <1> 9366 <1> usesection lDEBUG_CODE 9367 <1> 9368 <1> ; Check for given string (cap-insensitive) 9369 <1> ; 9370 <1> ; INP: si-> input string to check (either cap), 9371 <1> ; terminated by CR (13), semicolon, space, tab, 9372 <1> ; comma, colon, [, ], (, or ) 9373 <1> ; dx-> ASCIZ string to check (all-caps) 9374 <1> ; OUT: Iff string matches, 9375 <1> ; ZR 9376 <1> ; si-> at separator that terminates the keyword 9377 <1> ; else, 9378 <1> ; NZ 9379 <1> ; si = input si 9380 <1> ; STT: ds = es = ss 9381 <1> ; CHG: dx, al 9382 <1> isstring?: 9383 0000B8DB 56 <1> push si 9384 0000B8DC 87D7 <1> xchg dx, di 9385 <1> .loop: 9386 0000B8DE AC <1> lodsb 9387 0000B8DF E861D3 <1> call uppercase 9388 0000B8E2 AE <1> scasb 9389 0000B8E3 7506 <1> jne .mismatch 9390 0000B8E5 84C0 <1> test al, al 9391 0000B8E7 75F5 <1> jne .loop 9392 0000B8E9 EB38 <1> jmp .matched_zr 9393 <1> 9394 <1> .mismatch: 9395 0000B8EB E84C00 <1> call iseol? 9396 0000B8EE 742C <1> je .checkend 9397 0000B8F0 3C20 <1> cmp al, 32 9398 0000B8F2 7428 <1> je .checkend 9399 0000B8F4 3C09 <1> cmp al, 9 9400 0000B8F6 7424 <1> je .checkend 9401 0000B8F8 3C2E <1> cmp al, '.' 9402 0000B8FA 7420 <1> je .checkend 9403 0000B8FC 3C2C <1> cmp al, ',' 9404 0000B8FE 741C <1> je .checkend 9405 0000B900 3C3D <1> cmp al, '=' 9406 0000B902 7418 <1> je .checkend 9407 0000B904 3C3A <1> cmp al, ':' 9408 0000B906 7414 <1> je .checkend 9409 0000B908 3C5B <1> cmp al, '[' 9410 0000B90A 7410 <1> je .checkend 9411 0000B90C 3C5D <1> cmp al, ']' 9412 0000B90E 740C <1> je .checkend 9413 0000B910 3C28 <1> cmp al, '(' 9414 0000B912 7408 <1> je .checkend 9415 0000B914 3C29 <1> cmp al, ')' 9416 0000B916 7404 <1> je .checkend 9417 <1> .ret_nz: 9418 <1> ; NZ 9419 0000B918 5E <1> pop si 9420 <1> .ret: 9421 0000B919 87D7 <1> xchg dx, di 9422 0000B91B C3 <1> retn 9423 <1> 9424 <1> .checkend: 9425 0000B91C 26807DFF00 <1> cmp byte [es:di - 1], 0 9426 0000B921 75F5 <1> jne .ret_nz 9427 <1> .matched_zr: ; ZR 9428 0000B923 5F <1> pop di ; (discard) 9429 0000B924 8D74FF <1> lea si, [si - 1] ; -> separator 9430 0000B927 EBF0 <1> jmp .ret 9431 <1> 9432 <1> 9433 <1> iseol?_or_then: 9434 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 9435 0000B929 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 9436 0000B92E 740A <1> jz iseol? 9437 0000B930 BA[B164] <1> mov dx, msg.then 9438 0000B933 4E <1> dec si 9439 0000B934 E8A4FF <1> call isstring? 9440 0000B937 740B <1> je iseol?.ret 9441 0000B939 AC <1> lodsb 9442 <1> %endif 9443 <1> 9444 <1> iseol?: 9445 0000B93A 3C3B <1> cmp al, ';' 9446 0000B93C 7406 <1> je .ret 9447 <1> .notsemicolon: 9448 0000B93E 3C0D <1> cmp al, 13 ; this *IS* iseol? 9449 0000B940 7402 <1> je .ret 9450 0000B942 3C00 <1> cmp al, 0 9451 <1> .ret: 9452 0000B944 C3 <1> retn 9453 <1> 9454 <1> 9455 <1> chkeol_or_then: 9456 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 9457 0000B945 E84800 <1> call skipwh0 9458 0000B948 E8DEFF <1> call iseol?_or_then 9459 0000B94B 74F7 <1> je iseol?.ret ; if EOL --> 9460 0000B94D EB08 <1> jmp @F 9461 <1> %endif 9462 <1> 9463 <1> ; Check for end of line 9464 <1> ; 9465 <1> ; INP: al = first character 9466 <1> ; ds:si-> next character 9467 <1> ; OUT: ZR 9468 <1> ; al = 13 or al = ';' or al = 0 9469 <1> ; (does not return if anything on line beside blanks) 9470 <1> chkeol: 9471 0000B94F E83E00 <1> call skipwh0 9472 0000B952 E8E5FF <1> call iseol? 9473 0000B955 74ED <1> je iseol?.ret ; if EOL --> 9474 <1> 9475 <1> @@: 9476 0000B957 B80001 <1> mov ax, 0100h 9477 0000B95A E8FCEB <1> call setrc 9478 <1> errorj8: 9479 0000B95D E9B2EB <1> jmp error 9480 <1> 9481 <1> 9482 <1> ; SKIPCOMMA - Skip white space, then an optional comma, and more white 9483 <1> ; space. 9484 <1> ; SKIPCOMM0 - Same as above, but we already have the character in AL. 9485 <1> ; STK: 3 word 9486 <1> skipcomma: 9487 0000B960 AC <1> lodsb 9488 <1> skipcomm0: 9489 0000B961 E82C00 <1> call skipwh0 9490 0000B964 3C2C <1> cmp al, ',' 9491 0000B966 7510 <1> jne .return ; if no comma 9492 0000B968 56 <1> push si 9493 0000B969 E82300 <1> call skipwhite 9494 0000B96C E8CBFF <1> call iseol? 9495 0000B96F 7504 <1> jne .noteol ; if not end of line 9496 0000B971 5E <1> pop si 9497 0000B972 B02C <1> mov al, ',' 9498 0000B974 C3 <1> retn 9499 <1> .noteol: 9500 0000B975 83C402 <1> add sp, byte 2 ; pop si into nowhere 9501 <1> .return: 9502 0000B978 C3 <1> retn 9503 <1> 9504 <1> 9505 <1> skipequals: 9506 0000B979 AC <1> lodsb 9507 <1> skipequ0: 9508 0000B97A E81300 <1> call skipwh0 9509 0000B97D 3C3D <1> cmp al, '=' 9510 0000B97F 7503 <1> jne .return 9511 0000B981 E80B00 <1> call skipwhite 9512 <1> .return: 9513 0000B984 C3 <1> retn 9514 <1> 9515 <1> 9516 <1> ; Skip alphabetic characters, and then white space 9517 <1> ; 9518 <1> ; INP: ds:si-> first character 9519 <1> ; OUT: al = first non-blank character behind alphabetic characters 9520 <1> ; ds:si-> character behind the first non-blank behind alpha. 9521 <1> ; NC 9522 <1> skipalpha: 9523 <1> .: 9524 0000B985 AC <1> lodsb 9525 0000B986 24DF <1> and al, TOUPPER 9526 0000B988 2C41 <1> sub al, 'A' 9527 0000B98A 3C19 <1> cmp al, 'Z'-'A' 9528 0000B98C 76F7 <1> jbe . 9529 0000B98E 4E <1> dec si 9530 <1> 9531 <1> ; Skip blanks and tabs 9532 <1> ; 9533 <1> ; INP: ds:si-> first character 9534 <1> ; OUT: al = first non-blank character 9535 <1> ; ds:si-> character behind the first non-blank 9536 <1> ; NC 9537 <1> ; CHG: - 9538 <1> ; STK: 1 word 9539 <1> skipwhite: 9540 0000B98F AC <1> lodsb 9541 <1> 9542 <1> ; Same as above, but first character in al 9543 <1> ; 9544 <1> ; INP: al = first character 9545 <1> ; ds:si-> next character 9546 <1> ; OUT: al = first non-blank character 9547 <1> ; ds:si-> character behind the first non-blank 9548 <1> ; NC 9549 <1> ; CHG: - 9550 <1> ; STK: 1 word 9551 <1> skipwh0: 9552 0000B990 3C20 <1> cmp al, 32 9553 0000B992 74FB <1> je skipwhite 9554 0000B994 3C09 <1> cmp al, 9 9555 0000B996 74F7 <1> je skipwhite 9556 0000B998 F8 <1> clc 9557 0000B999 C3 <1> retn 9558 <1> 9559 <1> 9560 <1> ; SHOWSTRING - Print ASCIZ string. 9561 <1> showstring.next: 9562 0000B99A AA <1> stosb 9563 <1> showstring: 9564 0000B99B AC <1> lodsb 9565 0000B99C 84C0 <1> test al, al 9566 0000B99E 75FA <1> jnz .next 9567 0000B9A0 C3 <1> retn 9568 <1> 9569 <1> 9570 <1> ; Dump byte as decimal number string 9571 <1> ; 9572 <1> ; INP: al = byte 9573 <1> ; di-> where to store 9574 <1> ; OUT: - 9575 <1> ; CHG: di-> behind variable-length string 9576 <1> decbyte: 9577 0000B9A1 50 <1> push ax 9578 0000B9A2 51 <1> push cx 9579 0000B9A3 B96400 <1> mov cx, 100 9580 0000B9A6 E80B00 <1> call .div 9581 0000B9A9 B10A <1> mov cl, 10 9582 0000B9AB E80600 <1> call .div 9583 0000B9AE 0430 <1> add al, '0' 9584 0000B9B0 AA <1> stosb 9585 0000B9B1 59 <1> pop cx 9586 0000B9B2 58 <1> pop ax 9587 0000B9B3 C3 <1> retn 9588 <1> 9589 <1> .div: 9590 0000B9B4 30E4 <1> xor ah, ah 9591 0000B9B6 F6F1 <1> div cl 9592 0000B9B8 08C5 <1> or ch, al 9593 0000B9BA 7403 <1> jz .leadingzero 9594 0000B9BC 0430 <1> add al, '0' 9595 0000B9BE AA <1> stosb 9596 <1> .leadingzero: 9597 0000B9BF 86C4 <1> xchg al, ah 9598 0000B9C1 C3 <1> retn 9599 <1> 9600 <1> 9601 <1> decword: 9602 0000B9C2 52 <1> push dx 9603 0000B9C3 31D2 <1> xor dx, dx 9604 0000B9C5 E80200 <1> call decdword 9605 0000B9C8 5A <1> pop dx 9606 0000B9C9 C3 <1> retn 9607 <1> 9608 <1> 9609 <1> decdword: 9610 0000B9CA 51 <1> push cx 9611 0000B9CB 31C9 <1> xor cx, cx 9612 0000B9CD E80200 <1> call dec_dword_minwidth 9613 0000B9D0 59 <1> pop cx 9614 0000B9D1 C3 <1> retn 9615 <1> 9616 <1> 9617 <1> ; Dump dword as decimal number string 9618 <1> ; 9619 <1> ; INP: dx:ax = dword 9620 <1> ; cx = minimum width (<= 1 for none, must be < 128) 9621 <1> ; di -> where to store 9622 <1> ; OUT: - 9623 <1> ; CHG: di -> behind variable-length string 9624 <1> ; STT: UP 9625 <1> dec_dword_minwidth: 9626 <1> lframe near 9627 <1> lequ 10, bufferlen 9628 <1> lvar ?bufferlen,buffer 9629 0000B9D2 5589E58D66F6 <1> lenter 9630 <1> lvar dword, dividend 9631 0000B9D8 52 <1> push dx 9632 0000B9D9 50 <1> push ax 9633 0000B9DA 49 <1> dec cx 9634 <1> lvar word, minwidth 9635 0000B9DB 51 <1> push cx 9636 0000B9DC 41 <1> inc cx 9637 <1> 9638 0000B9DD 50 <1> push ax 9639 0000B9DE 53 <1> push bx 9640 0000B9DF 51 <1> push cx 9641 0000B9E0 52 <1> push dx 9642 0000B9E1 56 <1> push si 9643 0000B9E2 57 <1> push di 9644 0000B9E3 06 <1> push es 9645 <1> 9646 0000B9E4 16 <1> push ss 9647 0000B9E5 07 <1> pop es 9648 <1> 9649 0000B9E6 8D7EFF <1> lea di, [bp + ?buffer + ?bufferlen - 1] 9650 0000B9E9 89FB <1> mov bx, di 9651 0000B9EB FD <1> std ; _AMD_ERRATUM_109_WORKAROUND does not apply 9652 <1> 9653 <1> ; dword [bp + ?dividend] = number to display 9654 0000B9EC B90A00 <1> mov cx, 10 ; divisor 9655 <1> .loop_write: 9656 <1> 9657 0000B9EF 31D2 <1> xor dx, dx 9658 0000B9F1 57 <1> push di 9659 0000B9F2 BF0400 <1> mov di, 4 9660 <1> .loop_divide: 9661 0000B9F5 8B43F0 <1> mov ax, [bp + ?dividend - 2 + di] 9662 0000B9F8 F7F1 <1> div cx 9663 0000B9FA 8943F0 <1> mov word [bp + ?dividend - 2 + di], ax 9664 0000B9FD 4F <1> dec di 9665 0000B9FE 4F <1> dec di 9666 0000B9FF 75F4 <1> jnz .loop_divide 9667 <1> ; dx = last remainder 9668 0000BA01 5F <1> pop di 9669 0000BA02 92 <1> xchg ax, dx ; ax = remainder (next digit) 9670 <1> ; dword [bp + ?dividend] = result of div 9671 0000BA03 0430 <1> add al, '0' 9672 0000BA05 AA <1> stosb 9673 0000BA06 FF4EF0 <1> dec word [bp + ?minwidth] 9674 0000BA09 79E4 <1> jns .loop_write 9675 <1> 9676 0000BA0B 837EF400 <1> cmp word [bp + ?dividend + 2], 0 9677 0000BA0F 75DE <1> jnz .loop_write 9678 0000BA11 837EF200 <1> cmp word [bp + ?dividend], 0 9679 <1> ; any more ? 9680 0000BA15 75D8 <1> jnz .loop_write ; loop --> 9681 <1> 9682 0000BA17 FC <1> cld 9683 <1> 9684 0000BA18 29FB <1> sub bx, di 9685 0000BA1A 89D9 <1> mov cx, bx 9686 0000BA1C 89FE <1> mov si, di 9687 0000BA1E 46 <1> inc si 9688 <1> 9689 0000BA1F 07 <1> pop es 9690 0000BA20 5F <1> pop di 9691 <1> 9692 <1> @@: 9693 0000BA21 36A4 <1> ss movsb ; do not replace by rep ss movsb, because 9694 <1> ; some 8086 don't like two-prefix opcodes 9695 0000BA23 E2FC <1> loop @B 9696 <1> 9697 0000BA25 5E <1> pop si 9698 0000BA26 5A <1> pop dx 9699 0000BA27 59 <1> pop cx 9700 0000BA28 5B <1> pop bx 9701 0000BA29 58 <1> pop ax 9702 <1> 9703 0000BA2A 89EC5D <1> lleave 9704 0000BA2D C3 <1> retn 9705 <1> 9706 <1> 9707 <1> ; dump high word of eax - assumes 386 9708 <1> hexword_high: 9709 <1> [cpu 386] 9710 0000BA2E 66C1C010 <1> rol eax, 16 9711 0000BA32 E80500 <1> call hexword 9712 0000BA35 66C1C010 <1> rol eax, 16 9713 <1> __CPU__ 9714 0000BA39 C3 <1> retn 9715 <1> 9716 <1> 9717 <1> ; hexdword - dump dword (in eax) to hex ASCII - assumes 386 9718 <1> ; HEXWORD - Print hex word (in AX). 9719 <1> ; HEXBYTE - Print hex byte (in AL). 9720 <1> ; HEXNYB - Print hex digit. 9721 <1> ; Uses none. 9722 <1> %if 0 ; currently disabled because only one call made to here (ID command) 9723 <1> hexdword: 9724 <1> call hexword_high 9725 <1> %endif 9726 <1> hexword: 9727 0000BA3A 86C4 <1> xchg al, ah 9728 0000BA3C E80200 <1> call hexbyte 9729 0000BA3F 86C4 <1> xchg al, ah 9730 <1> 9731 <1> hexbyte: 9732 0000BA41 51 <1> push cx 9733 0000BA42 B104 <1> mov cl, 4 9734 0000BA44 D2C0 <1> rol al, cl 9735 0000BA46 E80300 <1> call hexnyb 9736 0000BA49 D2C0 <1> rol al, cl 9737 0000BA4B 59 <1> pop cx 9738 <1> 9739 <1> hexnyb: 9740 0000BA4C 50 <1> push ax 9741 0000BA4D 240F <1> and al, 0Fh 9742 <1> .common: 9743 <1> ; These three instructions change to ASCII hex. 9744 <1> ; Refer to https://codegolf.stackexchange.com/questions/193793/little-endian-number-to-string-conversion/193842#193842 9745 0000BA4F 3C0A <1> cmp al, 10 ; set CF according to digit <= 9 9746 0000BA51 1C69 <1> sbb al, 69h ; read CF, set CF and conditionally set AF 9747 0000BA53 2F <1> das ; magic, which happens to work 9748 0000BA54 AA <1> stosb 9749 0000BA55 58 <1> pop ax 9750 0000BA56 C3 <1> retn 9751 <1> 9752 <1> ; TAB_TO - Space fill until reaching the column indicated by AX. 9753 <1> ; (Print a new line if necessary.) 9754 <1> 9755 <1> tab_to: 9756 0000BA57 50 <1> push ax 9757 0000BA58 29F8 <1> sub ax, di 9758 0000BA5A 7706 <1> ja tabto1 ; if there's room on this line 9759 0000BA5C E80B00 <1> call trimputs 9760 0000BA5F BF[0E08] <1> mov di, line_out 9761 <1> tabto1: 9762 0000BA62 59 <1> pop cx 9763 0000BA63 29F9 <1> sub cx, di 9764 0000BA65 B020 <1> mov al, 32 9765 0000BA67 F3AA <1> rep stosb ; space fill to the right end 9766 <1> puts.retn: 9767 0000BA69 C3 <1> retn 9768 <1> 9769 <1> ; Trim excess blanks, append linebreak and display line_out. 9770 <1> ; 9771 <1> ; INP: es:di -> behind last character to display, or blank 9772 <1> ; 9773 <1> ; Note: May overflow if line_out only contains blanks. The byte at 9774 <1> ; trim_overflow is used to avoid overflows. 9775 <1> trimputs: 9776 0000BA6A 4F <1> dec di 9777 0000BA6B 26803D20 <1> cmp byte [es:di], 32 9778 0000BA6F 74F9 <1> je trimputs 9779 0000BA71 47 <1> inc di 9780 <1> 9781 <1> ; Append linebreak and display line_out 9782 <1> ; 9783 <1> ; INP: es:di -> behind last character to display 9784 <1> ; STT: all segment registers same 9785 <1> ; CHG: ax, bx, cx, dx 9786 <1> putsline_crlf: 9787 0000BA72 B80D0A <1> mov ax, 10<<8| 13 9788 0000BA75 AB <1> stosw 9789 <1> 9790 <1> ; Display line_out 9791 <1> ; 9792 <1> ; INP: es:di -> behind last character to display 9793 <1> ; es:line_out -> first character to display 9794 <1> ; STT: all segment registers same 9795 <1> ; CHG: ax, bx, cx, dx 9796 <1> putsline: 9797 0000BA76 89F9 <1> mov cx, di 9798 0000BA78 BA[0E08] <1> mov dx, line_out 9799 0000BA7B 29D1 <1> sub cx, dx 9800 <1> 9801 <1> ; Display message 9802 <1> ; 9803 <1> ; INP: es:dx -> message to display 9804 <1> ; cx = length of message 9805 <1> ; STT: ds = ss = debugger data selector 9806 <1> ; CHG: ax, bx, cx, dx 9807 <1> puts: 9808 <1> ;d4 call d4message 9809 <1> ;d4 asciz "In puts first",13,10 9810 <1> 9811 0000BA7D F606[9F00]20 <1> testopt [internalflags], tt_silence 9812 0000BA82 7403E93302 <1> jnz puts_silence 9813 <1> 9814 0000BA87 F606[A500]60 <1> testopt [internalflags3], dif3_unquiet 9815 0000BA8C 7507 <1> jnz @F 9816 0000BA8E F606[A500]10 <1> testopt [internalflags3], dif3_quiet_output 9817 0000BA93 75D4 <1> jnz .retn 9818 <1> @@: 9819 <1> 9820 <1> ; The following code contains most of the paging support. 9821 <1> ; Based on the number of LF characters in the string it 9822 <1> ; displays only parts of the string, then interrupts it by 9823 <1> ; the "[more]" prompt which waits for any key before 9824 <1> ; proceeding. This is ensured to work proper in InDOS mode. 9825 <1> ; 9826 <1> ; Paging is deactivated if the command's output mustn't be 9827 <1> ; paged (clears pagedcommand, which is set by cmd3). It is 9828 <1> ; also not used when we output to a file. 9829 0000BA95 F606[7C00]10 <1> testopt [options], nonpagingdevice 9830 0000BA9A 7403E9FE00 <1> jnz .display ; deactivated by user --> 9831 0000BA9F F606[A700]01 <1> testopt [internalflags3], dif3_input_re 9832 0000BAA4 7403E9F400 <1> jnz .display 9833 0000BAA9 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 9834 0000BAAE 7403E9EA00 <1> jnz .display 9835 <1> %if _INPUT_FILE_BOOT 9836 0000BAB3 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 9837 0000BAB8 7403E9E000 <1> jnz .display 9838 <1> %endif 9839 0000BABD E81EEC <1> call InDos ; InDOS mode ? 9840 0000BAC0 752C <1> jnz .dontcheckredirection ; yes, then we display with Int10 anyway --> 9841 <1> %if _INPUT_FILE_HANDLES 9842 0000BAC2 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 9843 0000BAC7 7403E9D100 <1> jnz .display 9844 <1> %endif 9845 0000BACC F606[7D00]40 <1> testopt [options], enable_serial ; I/O done using serial port ? 9846 0000BAD1 751B <1> jnz .dontcheckredirection ; yes, is paged --> 9847 0000BAD3 F606[9C00]80 <1> testopt [internalflags], outputfile 9848 0000BAD8 7403E9C000 <1> jnz .display ; output redirected to file. never page --> 9849 0000BADD F606[7D00]01 <1> testopt [options], nondospaging 9850 0000BAE2 750A <1> jnz .dontcheckredirection 9851 0000BAE4 F606[9C00]20 <1> testopt [internalflags], inputfile 9852 0000BAE9 7403E9AF00 <1> jnz .display ; input redirected from a file. never page --> 9853 <1> .dontcheckredirection: 9854 0000BAEE 57 <1> push di 9855 0000BAEF 51 <1> push cx ; used as variable: remaining (not yet displayed) line length 9856 0000BAF0 89D7 <1> mov di, dx ; es:di-> string, cx = length 9857 <1> .looplf: 9858 0000BAF2 85C9 <1> test cx, cx 9859 0000BAF4 7503E9A200 <1> jz .display_pop ; end of string (or ended in LF) --> 9860 <1> ; Important: We only ever jump back to .looplf when cx 9861 <1> ; zero means it's okay to ignore the waiting prompt as 9862 <1> ; flagged below. This is (A) at the start of a string, 9863 <1> ; where cx is the whole string's length, (B) after 9864 <1> ; determining that prompting is not yet necessary, in 9865 <1> ; which case the flag was checked earlier already, (C) 9866 <1> ; after the flag has been set and a substring was already 9867 <1> ; displayed (so cx is again the whole substring's length) 9868 <1> ; or (D) just after the prompt was displayed, in which 9869 <1> ; case the flag cannot be set. 9870 <1> ; In case A and C, when the (sub)string is empty (ie. cx 9871 <1> ; is zero) it's crucial to ignore the waiting prompt as 9872 <1> ; this is the exact behaviour we want: If nothing is 9873 <1> ; displayed anymore before the getline code prompts 9874 <1> ; anyway, do not display our prompt. 9875 0000BAF9 F606[9E00]10 <1> testopt [internalflags], promptwaiting ; do we have a prompt to display ? 9876 0000BAFE 7550 <1> jnz .promptnow ; yes, display it before the string --> 9877 <1> 9878 0000BB00 31C0 <1> xor ax, ax 9879 0000BB02 F606[7D00]40 <1> testopt [options], enable_serial ; serial ? 9880 0000BB07 7409 <1> jz @F ; no --> 9881 0000BB09 0A06[E70B] <1> or al, byte [serial_rows] ; ax = number of rows if serial 9882 0000BB0D 7419 <1> jz .display_pop_ZR ; if zero, do not page --> 9883 0000BB0F 48 <1> dec ax ; was 1 ? (adjust to rows minus one) 9884 0000BB10 7516 <1> jnz @FF ; no, use as rows minus one --> (NZ) 9885 <1> ; ax = 0 if it was 1 9886 <1> @@: 9887 0000BB12 0A06[F60B] <1> or al, [io_rows] 9888 0000BB16 7410 <1> jz .display_pop_ZR 9889 0000BB18 48 <1> dec ax ; was 1 ? (adjust to rows minus one) 9890 0000BB19 750D <1> jnz @F ; no, use as rows minus one --> (NZ) 9891 <1> ; yes, automatic (use BDA) 9892 0000BB1B 06 <1> push es 9893 0000BB1C B84000 <1> mov ax, 40h ; 0040h is a bimodal segment/selector 9894 0000BB1F 8EC0 <1> mov es, ax 9895 0000BB21 26A08400 <1> mov al, byte [ es:84h ] ; rows on screen 9896 0000BB25 07 <1> pop es 9897 0000BB26 85C0 <1> test ax, ax 9898 <1> @@: 9899 <1> .display_pop_ZR: 9900 0000BB28 7471 <1> jz .display_pop 9901 <1> 9902 0000BB2A 3806[930A] <1> cmp byte [ linecounter ], al 9903 0000BB2E 725E <1> jb .notyet ; not yet reached --> 9904 0000BB30 F606[9C00]08 <1> testopt [internalflags], pagedcommand ; active ? 9905 0000BB35 7506 <1> jnz .prompt ; yes, prompt --> 9906 0000BB37 FE0E[930A] <1> dec byte [ linecounter ] ; keep count, but don't prompt til next LF 9907 0000BB3B EB51 <1> jmp short .notyet 9908 <1> 9909 <1> .prompt: 9910 0000BB3D 58 <1> pop ax ; ax = length of string, cx = length of string remaining 9911 0000BB3E 29C8 <1> sub ax, cx ; ax = length of string til LF 9912 0000BB40 91 <1> xchg ax, cx ; cx = til LF incl., ax = behind LF 9913 0000BB41 50 <1> push ax ; new count 9914 <1> ; cx = length til LF 9915 <1> ; es:dx-> start of part til LF 9916 0000BB42 E85800 <1> call .display ; display part of message which fits on screen 9917 0000BB45 59 <1> pop cx 9918 0000BB46 51 <1> push cx ; update cx from variable 9919 0000BB47 89FA <1> mov dx, di ; dx-> start of next part 9920 0000BB49 800E[9E00]10 <1> setopt [internalflags], promptwaiting ; mark as prompting necessary 9921 0000BB4E EBA2 <1> jmp short .looplf ; now check whether anything follows at all 9922 <1> ; This is the magic to suppress unnecessary prompts as 9923 <1> ; were displayed previously. Now, we'll set this flag 9924 <1> ; which effectively displays the prompt before (!) any 9925 <1> ; other output is done. Previously, the prompt would be 9926 <1> ; displayed right here. The only case where behaviour 9927 <1> ; changed is when no more output occurs until the flag 9928 <1> ; is reset elsewhere - ie. if getline prompts anyway. 9929 <1> 9930 <1> .promptnow: 9931 0000BB50 52 <1> push dx 9932 0000BB51 51 <1> push cx 9933 0000BB52 C606[930A]00 <1> mov byte [ linecounter ], 0 ; prompting, so reset the line counter 9934 0000BB57 8026[9E00]EF <1> clropt [internalflags], promptwaiting 9935 0000BB5C 06 <1> push es 9936 0000BB5D 16 <1> push ss 9937 0000BB5E 07 <1> pop es 9938 0000BB5F BA[0E5D] <1> mov dx, msg.more ; es:dx -> message 9939 0000BB62 B90600 <1> mov cx, msg.more_size 9940 0000BB65 E83500 <1> call .display ; print string (avoiding a recursion) 9941 0000BB68 07 <1> pop es 9942 <1> 9943 <1> ; This option is a hack for the sole use of 9944 <1> ; demo scripts that only want the user to press 9945 <1> ; a key for paging. 9946 0000BB69 F606[7D00]01 <1> testopt [options], nondospaging 9947 0000BB6E 7405 <1> jz .getc 9948 0000BB70 E8F502 <1> call getc.rawnext ; get a character from BIOS 9949 0000BB73 EB03 <1> jmp short .dispover 9950 <1> .getc: 9951 0000BB75 E8DD02 <1> call getc ; get a character 9952 <1> .dispover: 9953 0000BB78 3C03 <1> cmp al, 3 ; is it Ctrl+C ? 9954 0000BB7A 743D <1> je .ctrlc ; yes, handle that --> 9955 0000BB7C E85884 <1> call handle_serial_flags_ctrl_c 9956 0000BB7F 06 <1> push es 9957 0000BB80 16 <1> push ss 9958 0000BB81 07 <1> pop es 9959 0000BB82 BA[145D] <1> mov dx, msg.more_over ; es:dx -> message 9960 0000BB85 B90800 <1> mov cx, msg.more_over_size 9961 0000BB88 E81200 <1> call .display ; overwrite the prompt (avoiding a recursion) 9962 0000BB8B 07 <1> pop es 9963 0000BB8C 59 <1> pop cx 9964 0000BB8D 5A <1> pop dx 9965 <1> 9966 <1> .notyet: 9967 0000BB8E B00A <1> mov al, 10 9968 0000BB90 F2AE <1> repne scasb ; search LF 9969 0000BB92 7507 <1> jne .display_pop ; none --> 9970 <1> 9971 0000BB94 FE06[930A] <1> inc byte [ linecounter ] ; record how many LFs will be displayed 9972 0000BB98 E957FF <1> jmp .looplf ; search for next LF --> 9973 <1> 9974 <1> .display_pop: 9975 0000BB9B 59 <1> pop cx 9976 0000BB9C 5F <1> pop di 9977 <1> .display: 9978 <1> ; Non-paged output code follows. 9979 <1> ;d4 call d4message 9980 <1> ;d4 asciz "In puts.display first",13,10 9981 <1> 9982 0000BB9D F606[7D00]40 <1> testopt [options], enable_serial 9983 0000BBA2 7522 <1> jnz .notdos 9984 0000BBA4 E837EB <1> call InDos 9985 0000BBA7 751D <1> jnz .notdos 9986 <1> ; es:dx -> message 9987 0000BBA9 BB0100 <1> mov bx, 1 ; standard output 9988 0000BBAC B440 <1> mov ah, 40h ; write to file 9989 <1> %if _PM 9990 <1> d5 push di 9991 0000BBAE 06 <1> push es ; point ds of _doscall* to msg segment 9992 <1> d5 call d4message 9993 <1> d5 asciz 13,10,"In puts.display, es=" 9994 <1> d5 push es 9995 <1> d5 call d4disp_stack_hex 9996 <1> d5 call d4message 9997 <1> d5 asciz "h",13,10 9998 0000BBAF E8FFA1 <1> call selector_to_segment ; make sure we give it as a segment 9999 <1> ; This assumes that non-access-slice pointers into the 10000 <1> ; symbol tables (SYMSTR particularly) can be converted 10001 <1> ; into 86M segmented addresses, ie that the selector 10002 <1> ; points into 86M-accessible memory. 10003 <1> d5 call d4message 10004 <1> d5 asciz "In puts.display, on stack =" 10005 <1> d5 pop di 10006 <1> d5 push di 10007 <1> d5 push di 10008 <1> d5 call d4disp_stack_hex 10009 <1> d5 call d4message 10010 <1> d5 asciz "h",13,10 10011 0000BBB2 E8CDD6 <1> call _doscall_return_es_parameter_es_ds 10012 0000BBB5 83C402 <1> add sp, 2 ; discard es returned from call 10013 <1> d5 pop di 10014 <1> %else 10015 <1> push ds 10016 <1> push es 10017 <1> pop ds ; ds:dx -> message 10018 <1> int 21h ; simply call into DOS 10019 <1> pop ds 10020 <1> %endif 10021 0000BBB8 C3 <1> retn 10022 <1> 10023 <1> .ctrlc: 10024 0000BBB9 F606[A300]10 <1> testopt [internalflags2], dif2_in_silence_dump 10025 0000BBBE 7403 <1> jz @F 10026 0000BBC0 E81C02 <1> call reset_silent_mode 10027 <1> @@: 10028 0000BBC3 E98884 <1> jmp handle_ctrl_c ; abort currently running command --> 10029 <1> ; If handled by DOS, Ctrl+C causes our process to be terminated. 10030 <1> ; Because we are self-owned, we re-enter our code at debug22 then. 10031 <1> ; debug22 only does some re-initialization of registers before 10032 <1> ; entering cmd3. Therefore, instead of aborting we can directly jump 10033 <1> ; to cmd3 here. This has the additional benefit of not requiring DOS 10034 <1> ; at all, so that no workarounds for InDOS mode and boot loader 10035 <1> ; operation are necessary. 10036 <1> 10037 <1> ; No command should fail spectacularly when being aborted this way, 10038 <1> ; because in fact every command calling puts can already be aborted by 10039 <1> ; DOS's Ctrl+C checking if DOS is used. This check is really only an 10040 <1> ; _additional_ way the commands can be aborted. 10041 <1> 10042 <1> ; Note that a more complete way to support command abortion would be 10043 <1> ; to hook Int1B, and to keep a flag of whether Ctrl+C or Ctrl+Break 10044 <1> ; were requested, and to additionally check before or after every I/O 10045 <1> ; operation whether Ctrl+C was pressed using non-destructive reads. 10046 <1> ; In short, exactly what DOS does. 10047 <1> 10048 <1> .notdos: 10049 0000BBC6 56 <1> push si 10050 0000BBC7 F606[9E00]01 <1> testopt [internalflags], usecharcounter 10051 0000BBCC 7505 <1> jnz .dontresetcharcounter 10052 0000BBCE C606[920A]01 <1> mov byte [ charcounter ], 1 10053 <1> ; This assumes we always start at the beginning of a line. 10054 <1> ; Therefore any call to puts must display at the beginning 10055 <1> ; of a line or tab parsing will not work. Only calls to puts 10056 <1> ; not containing tab characters may display partial lines. 10057 <1> ; (Calls to puts with partial lines and tab characters have 10058 <1> ; to set the flag usecharcounter in internalflags.) 10059 <1> .dontresetcharcounter: 10060 0000BBD3 E358 <1> jcxz .return 10061 0000BBD5 89D6 <1> mov si, dx 10062 <1> .loop: 10063 0000BBD7 26AC <1> es lodsb 10064 0000BBD9 3C09 <1> cmp al, 9 10065 0000BBDB 750B <1> jne .nottab ; is no tab --> 10066 0000BBDD A0[920A] <1> mov al, byte [ charcounter ] 10067 0000BBE0 2407 <1> and al, 7 ; at 8 character boundary ? 10068 0000BBE2 B020 <1> mov al, 32 ; (always replaced by blank) 10069 0000BBE4 7402 <1> jz .nottab ; yes, don't use hack --> 10070 0000BBE6 41 <1> inc cx 10071 0000BBE7 4E <1> dec si ; find tab again next lodsb 10072 <1> .nottab: 10073 0000BBE8 3C0D <1> cmp al, 13 ; (exact match for CR) 10074 0000BBEA 750A <1> jne .notcr 10075 0000BBEC 8026[A600]FD <1> clropt [internalflags3], dif3_int10_highlight 10076 0000BBF1 C606[920A]00 <1> mov byte [ charcounter ], 0 ; increased to one before displaying 10077 <1> .notcr: 10078 <1> %if 0 ; currently we never receive BS here 10079 <1> cmp al, 8 10080 <1> jne .notbs 10081 <1> mov ah, 0Fh 10082 <1> int 10h ; get page 10083 <1> mov bl, al ; save number of characters per column 10084 <1> push cx 10085 <1> mov ah, 03h 10086 <1> int 10h ; get cursor position dx 10087 <1> pop cx 10088 <1> dec byte [ charcounter ] ; assume not at start of line 10089 <1> mov al, 8 ; changed by Int10 10090 <1> or dl, dl 10091 <1> jnz .dontcount ; not first column, so display normal --> 10092 <1> mov byte [ charcounter ], 1 ; assume at start of screen 10093 <1> or dh, dh 10094 <1> jz .next ; at start of screen, don't display --> 10095 <1> dec dh ; previous line 10096 <1> mov dl, bl 10097 <1> mov byte [ charcounter ], dl ; really at end of line (one-based counter) 10098 <1> dec dl ; last column 10099 <1> mov ah, 02h 10100 <1> int 10h ; set new cursor position 10101 <1> jmp short .next 10102 <1> .notbs: 10103 <1> %endif 10104 0000BBF6 3C0A <1> cmp al, 10 10105 0000BBF8 7404 <1> je .dontcount ; must not count line feeds! 10106 0000BBFA FE06[920A] <1> inc byte [ charcounter ] 10107 <1> .dontcount: 10108 0000BBFE F606[7D00]40 <1> testopt [options], enable_serial 10109 0000BC03 7405 <1> jz @F 10110 <1> 10111 0000BC05 E87914 <1> call serial_send_char 10112 <1> 10113 0000BC08 EB21 <1> jmp .next 10114 <1> @@: 10115 <1> 10116 0000BC0A 3C1B <1> cmp al, 27 10117 0000BC0C 7421 <1> je .try_highlight 10118 <1> 10119 <1> .nohighlight: 10120 0000BC0E F606[A600]02 <1> testopt [internalflags3], dif3_int10_highlight 10121 0000BC13 740F <1> jz @F 10122 0000BC15 B409 <1> mov ah, 09h 10123 0000BC17 B700 <1> mov bh, 0 10124 0000BC19 8A1E[CE95] <1> mov bl, byte [.attribute] 10125 0000BC1D 51 <1> push cx 10126 0000BC1E B90100 <1> mov cx, 1 10127 0000BC21 CD10 <1> int 10h 10128 0000BC23 59 <1> pop cx 10129 <1> 10130 <1> @@: 10131 0000BC24 BB0700 <1> mov bx, 0007 10132 0000BC27 B40E <1> mov ah, 0Eh 10133 0000BC29 CD10 <1> int 10h 10134 <1> .next: 10135 0000BC2B E2AA <1> loop .loop 10136 <1> .return: 10137 0000BC2D 5E <1> pop si 10138 0000BC2E C3 <1> retn 10139 <1> 10140 <1> .try_highlight: 10141 0000BC2F F606[8600]02 <1> testopt [options3], opt3_r_highlight_dumb 10142 0000BC34 75D8 <1> jnz .nohighlight 10143 0000BC36 83F902 <1> cmp cx, 2 10144 0000BC39 76D3 <1> jbe .nohighlight 10145 0000BC3B 26803C5B <1> cmp byte [es:si], '[' 10146 0000BC3F 75CD <1> jne .nohighlight 10147 0000BC41 26807C016D <1> cmp byte [es:si + 1], 'm' 10148 0000BC46 742C <1> je .highlight_reset 10149 0000BC48 83F903 <1> cmp cx, 3 10150 0000BC4B 74C1 <1> je .nohighlight 10151 0000BC4D 26807C0137 <1> cmp byte [es:si + 1], '7' 10152 0000BC52 75BA <1> jne .nohighlight 10153 0000BC54 26807C026D <1> cmp byte [es:si + 2], 'm' 10154 0000BC59 75B3 <1> jne .nohighlight 10155 <1> .highlight_set: 10156 0000BC5B 50 <1> push ax 10157 0000BC5C 51 <1> push cx 10158 0000BC5D B403 <1> mov ah, 3 10159 0000BC5F B700 <1> mov bh, 0 10160 0000BC61 31D2 <1> xor dx, dx ; pre-initialise to zero 10161 0000BC63 CD10 <1> int 10h ; dl = column, dh = row 10162 0000BC65 84D2 <1> test dl, dl 10163 0000BC67 59 <1> pop cx 10164 0000BC68 58 <1> pop ax 10165 0000BC69 74A3 <1> jz .nohighlight 10166 <1> ; This test fails if we are at the very left of 10167 <1> ; the screen or in dosemu -dumb mode. So don't 10168 <1> ; use highlighting at the beginning of a line! 10169 0000BC6B 800E[A600]02 <1> setopt [internalflags3], dif3_int10_highlight 10170 0000BC70 49 <1> dec cx 10171 0000BC71 46 <1> inc si 10172 0000BC72 EB10 <1> jmp @F 10173 <1> 10174 <1> .highlight_reset: 10175 0000BC74 50 <1> push ax 10176 0000BC75 51 <1> push cx 10177 0000BC76 B403 <1> mov ah, 3 10178 0000BC78 B700 <1> mov bh, 0 10179 0000BC7A 31D2 <1> xor dx, dx ; pre-initialise to zero 10180 0000BC7C CD10 <1> int 10h ; dl = column, dh = row 10181 0000BC7E 84D2 <1> test dl, dl 10182 0000BC80 59 <1> pop cx 10183 0000BC81 58 <1> pop ax 10184 0000BC82 748A <1> jz .nohighlight 10185 <1> ; Refer to above comment. 10186 <1> @@: 10187 0000BC84 800E[A600]02 <1> setopt [internalflags3], dif3_int10_highlight 10188 0000BC89 FECA <1> dec dl 10189 0000BC8B B402 <1> mov ah, 02h 10190 0000BC8D B700 <1> mov bh, 0 10191 0000BC8F CD10 <1> int 10h ; set cursor position 10192 0000BC91 B408 <1> mov ah, 08h 10193 0000BC93 B700 <1> mov bh, 0 10194 0000BC95 CD10 <1> int 10h ; read attribute to ah 10195 0000BC97 50 <1> push ax 10196 0000BC98 FEC2 <1> inc dl 10197 0000BC9A B402 <1> mov ah, 02h 10198 0000BC9C B700 <1> mov bh, 0 10199 0000BC9E CD10 <1> int 10h ; set cursor position 10200 0000BCA0 58 <1> pop ax 10201 0000BCA1 88E0 <1> mov al, ah 10202 0000BCA3 257788 <1> and ax, 8877h 10203 0000BCA6 D0C0 <1> rol al, 1 10204 0000BCA8 D0C0 <1> rol al, 1 10205 0000BCAA D0C0 <1> rol al, 1 10206 0000BCAC D0C0 <1> rol al, 1 10207 0000BCAE 08E0 <1> or al, ah 10208 0000BCB0 A2[CE95] <1> mov byte [.attribute], al 10209 <1> 10210 0000BCB3 49 <1> dec cx 10211 0000BCB4 49 <1> dec cx 10212 0000BCB5 46 <1> inc si 10213 0000BCB6 46 <1> inc si 10214 0000BCB7 E971FF <1> jmp .next 10215 <1> 10216 <1> 10217 <1> usesection lDEBUG_DATA_ENTRY 10218 000095CE 00 <1> .attribute: db 0 10219 <1> usesection lDEBUG_CODE 10220 <1> 10221 <1> 10222 <1> ; INP: es:dx -> message to display 10223 <1> ; cx = length of message 10224 <1> ; STT: ds = ss = debugger data selector 10225 <1> ; CHG: ax, bx, cx, dx 10226 <1> puts_silence: 10227 0000BCBA 56 <1> push si 10228 0000BCBB 57 <1> push di 10229 <1> 10230 <1> .try_again: 10231 0000BCBC 89D6 <1> mov si, dx ; es:si -> message 10232 0000BCBE 8B3E[FA09] <1> mov di, word [auxbuff_behind_last_silent] 10233 <1> ; (auxbuff):di -> next buffer (if it fits) 10234 0000BCC2 B80F20 <1> mov ax, _AUXBUFFSIZE - 1 10235 0000BCC5 29F8 <1> sub ax, di ; number of bytes left free 10236 <1> ; (+ 1 byte terminator) 10237 0000BCC7 7204 <1> jc .delete 10238 0000BCC9 39C8 <1> cmp ax, cx ; fits ? 10239 0000BCCB 730B <1> jae .simple ; yes --> 10240 <1> 10241 <1> .delete: 10242 0000BCCD 06 <1> push es 10243 0000BCCE 8E06[F209] <1> mov es, word [auxbuff_segorsel] 10244 0000BCD2 E81700 <1> call silence_delete_one_string 10245 0000BCD5 07 <1> pop es 10246 0000BCD6 EBE4 <1> jmp .try_again 10247 <1> 10248 <1> .simple: 10249 0000BCD8 1E <1> push ds 10250 0000BCD9 06 <1> push es 10251 0000BCDA FF36[F209] <1> push word [auxbuff_segorsel] 10252 0000BCDE 06 <1> push es 10253 0000BCDF 1F <1> pop ds ; ds:si -> message 10254 0000BCE0 07 <1> pop es ; es:di -> next buffer 10255 0000BCE1 F3A4 <1> rep movsb ; copy over 10256 0000BCE3 07 <1> pop es 10257 0000BCE4 1F <1> pop ds 10258 0000BCE5 893E[FA09] <1> mov word [auxbuff_behind_last_silent], di 10259 <1> ; update pointer 10260 0000BCE9 5F <1> pop di 10261 0000BCEA 5E <1> pop si 10262 0000BCEB C3 <1> retn 10263 <1> 10264 <1> 10265 <1> ; INP: es => auxbuff 10266 <1> ; ds = ss 10267 <1> ; [auxbuff_behind_last_silent] -> behind last silent 10268 <1> ; [auxbuff_behind_while_condition] 10269 <1> ; OUT: [auxbuff_behind_last_silent] updated 10270 <1> ; auxbuff updated (deleted one of the dump strings, 10271 <1> ; moved forwards in the buffer the remainder) 10272 <1> ; if error, aborts command by jumping to cmd3 10273 <1> ; CHG: ax, di, si 10274 <1> silence_delete_one_string: 10275 0000BCEC E81400 <1> call .internal ; call internal implementation 10276 0000BCEF 733E <1> jnc .retn ; no error ? --> 10277 <1> .error: ; else: error, abort command 10278 0000BCF1 16 <1> push ss 10279 0000BCF2 1F <1> pop ds 10280 0000BCF3 16 <1> push ss 10281 0000BCF4 07 <1> pop es 10282 0000BCF5 8026[9F00]DF <1> clropt [internalflags], tt_silence 10283 0000BCFA BA[E968] <1> mov dx, msg.silent_error 10284 0000BCFD E8F000 <1> call putsz 10285 0000BD00 E9FD42 <1> jmp cmd3 10286 <1> 10287 <1> 10288 <1> ; INP: as for silence_delete_one_string 10289 <1> ; OUT: as for silence_delete_one_string, but: 10290 <1> ; CY if error (no more space) 10291 <1> ; NC if success 10292 <1> ; CHG: ax, di, si 10293 <1> ; STT: ds = ss 10294 <1> .internal: 10295 0000BD03 51 <1> push cx 10296 0000BD04 8B0E[FA09] <1> mov cx, [auxbuff_behind_last_silent] 10297 <1> ; -> next buffer position 10298 0000BD08 8B3E[F809] <1> mov di, word [auxbuff_behind_while_condition] 10299 0000BD0C 29F9 <1> sub cx, di 10300 0000BD0E B000 <1> mov al, 0 10301 0000BD10 3C01 <1> cmp al, 1 ; initialise to NZ (if cx is zero) 10302 0000BD12 F2AE <1> repne scasb 10303 0000BD14 F9 <1> stc 10304 0000BD15 7518 <1> jne .retn ; error, no NUL found in data (CY) 10305 <1> ; es:di -> behind first NUL 10306 <1> 10307 0000BD17 89FE <1> mov si, di ; es:si -> next message 10308 0000BD19 8B3E[F809] <1> mov di, word [auxbuff_behind_while_condition] 10309 0000BD1D 8B0E[FA09] <1> mov cx, word [auxbuff_behind_last_silent] 10310 0000BD21 06 <1> push es 10311 0000BD22 1F <1> pop ds ; ds:si -> next message 10312 0000BD23 29F1 <1> sub cx, si ; remaining buffer 10313 0000BD25 F3A4 <1> rep movsb ; move to start of silent buffer 10314 0000BD27 16 <1> push ss 10315 0000BD28 1F <1> pop ds 10316 0000BD29 893E[FA09] <1> mov word [auxbuff_behind_last_silent], di 10317 0000BD2D 59 <1> pop cx 10318 0000BD2E F8 <1> clc ; (NC) 10319 <1> .retn: 10320 0000BD2F C3 <1> retn 10321 <1> 10322 <1> 10323 <1> ; After having used puts_silence, this dumps all data 10324 <1> ; remaining in the silent buffer in auxbuff. 10325 <1> ; If word [tt_silent_mode_number] is set, only that many 10326 <1> ; data strings (zero-terminated) are dumped, from the end 10327 <1> ; of the buffer. 10328 <1> ; 10329 <1> ; CHG: ax, bx, cx, dx, si, di, es 10330 <1> ; STT: ds = ss = debugger data selector 10331 <1> ; sets es to ss 10332 <1> silence_dump: 10333 0000BD30 F606[9F00]10 <1> testopt [internalflags], tt_silent_mode ; is in use ? 10334 0000BD35 7501 <1> jnz @F ; yes --> 10335 0000BD37 C3 <1> retn ; no. simple 10336 <1> 10337 <1> @@: 10338 0000BD38 8026[9F00]DF <1> clropt [internalflags], tt_silence 10339 0000BD3D 800E[A300]10 <1> setopt [internalflags2], dif2_in_silence_dump 10340 <1> 10341 0000BD42 F606[8500]01 <1> testopt [options3], opt3_silence_paging_set 10342 0000BD47 7413 <1> jz @F 10343 0000BD49 F606[8500]02 <1> testopt [options3], opt3_silence_paging_on 10344 0000BD4E 7407 <1> jz .turn_paging_off 10345 <1> 10346 <1> .turn_paging_on: 10347 0000BD50 800E[9C00]08 <1> setopt [internalflags], pagedcommand 10348 0000BD55 EB05 <1> jmp @F 10349 <1> 10350 <1> .turn_paging_off: 10351 0000BD57 8026[9C00]F7 <1> clropt [internalflags], pagedcommand 10352 <1> @@: 10353 <1> 10354 0000BD5C 8B16[FC09] <1> mov dx, word [tt_silent_mode_number] 10355 0000BD60 85D2 <1> test dx, dx 10356 0000BD62 7428 <1> jz .no_number_given 10357 <1> 10358 0000BD64 8E06[F209] <1> mov es, word [auxbuff_segorsel] 10359 0000BD68 8B3E[F809] <1> mov di, word [auxbuff_behind_while_condition] 10360 0000BD6C 8B0E[FA09] <1> mov cx, word [auxbuff_behind_last_silent] 10361 0000BD70 29F9 <1> sub cx, di 10362 0000BD72 7418 <1> jz .no_number_given 10363 <1> 10364 0000BD74 31DB <1> xor bx, bx ; counter of zeros 10365 <1> @@: 10366 0000BD76 B000 <1> mov al, 0 10367 0000BD78 E307 <1> jcxz @F ; no more data --> 10368 0000BD7A F2AE <1> repne scasb ; another zero ? 10369 0000BD7C 7503 <1> jne @F ; no, done --> 10370 0000BD7E 43 <1> inc bx ; count zeros 10371 0000BD7F EBF5 <1> jmp @B ; search for next --> 10372 <1> 10373 <1> @@: 10374 0000BD81 29D3 <1> sub bx, dx ; number of dumps - requested number 10375 <1> ; = excess number of dumps 10376 0000BD83 7607 <1> jbe .no_number_given 10377 <1> 10378 0000BD85 89D9 <1> mov cx, bx ; use excess number as loop counter 10379 <1> @@: 10380 0000BD87 E862FF <1> call silence_delete_one_string 10381 <1> ; delete one string 10382 0000BD8A E2FB <1> loop @B ; loop for however many to delete --> 10383 <1> 10384 <1> .no_number_given: 10385 0000BD8C 8B3E[F809] <1> mov di, word [auxbuff_behind_while_condition] 10386 <1> ; es:di -> silent buffer 10387 <1> .loop_line: 10388 0000BD90 8E06[F209] <1> mov es, word [auxbuff_segorsel] 10389 0000BD94 8B0E[FA09] <1> mov cx, word [auxbuff_behind_last_silent] 10390 0000BD98 29F9 <1> sub cx, di ; any more data ? 10391 0000BD9A 7439 <1> jz .return ; no, return --> 10392 0000BD9C B000 <1> mov al, 0 10393 0000BD9E 49 <1> dec cx ; (in case of branching for next conditional) 10394 0000BD9F AE <1> scasb ; starts with a NUL byte ? 10395 0000BDA0 7402 <1> je @F ; yes, skipped --> 10396 0000BDA2 41 <1> inc cx ; (restore cx to original value) 10397 0000BDA3 4F <1> dec di ; no, decrement 10398 <1> @@: 10399 0000BDA4 89FE <1> mov si, di ; es:si -> start of string 10400 <1> 10401 0000BDA6 81F90001 <1> cmp cx, 256 ; cx > 256 ? 10402 0000BDAA 7603 <1> jbe @F ; no --> 10403 0000BDAC B90001 <1> mov cx, 256 ; limit to 256 bytes per string 10404 <1> ; (line_out is 264 bytes) 10405 <1> @@: 10406 0000BDAF E324 <1> jcxz .return ; (if single byte that was NUL remaining -->) 10407 0000BDB1 89CB <1> mov bx, cx ; search string length 10408 0000BDB3 B000 <1> mov al, 0 10409 0000BDB5 F2AE <1> repne scasb ; scan for NUL bytes 10410 0000BDB7 7501 <1> jne @F ; (if none found: cx = 0) 10411 <1> ; (if any found: cx = remaining length) 10412 0000BDB9 41 <1> inc cx ; cx = remaining length + 1 (do not output NUL) 10413 <1> @@: 10414 0000BDBA 29CB <1> sub bx, cx ; search length - remaining = found length 10415 0000BDBC 89D9 <1> mov cx, bx ; how much to show 10416 0000BDBE 06 <1> push es 10417 0000BDBF 1F <1> pop ds ; ds => auxbuff (ds:si -> start of string) 10418 0000BDC0 16 <1> push ss 10419 0000BDC1 07 <1> pop es ; es => line_out 10420 0000BDC2 BF[0E08] <1> mov di, line_out ; es:di -> line_out 10421 0000BDC5 51 <1> push cx 10422 0000BDC6 F3A4 <1> rep movsb ; copy over to line_out 10423 0000BDC8 59 <1> pop cx ; cx = message length 10424 <1> 10425 0000BDC9 16 <1> push ss 10426 0000BDCA 1F <1> pop ds ; reset seg regs to ss 10427 0000BDCB BA[0E08] <1> mov dx, line_out ; dx -> message, cx = length 10428 0000BDCE 56 <1> push si 10429 0000BDCF E8ABFC <1> call puts ; print out 10430 0000BDD2 5F <1> pop di ; -> next silent message 10431 0000BDD3 EBBB <1> jmp .loop_line 10432 <1> 10433 <1> .return: 10434 0000BDD5 16 <1> push ss 10435 0000BDD6 07 <1> pop es 10436 0000BDD7 FF36[F809] <1> push word [auxbuff_behind_while_condition] 10437 0000BDDB 8F06[FA09] <1> pop word [auxbuff_behind_last_silent] 10438 <1> reset_silent_mode: 10439 0000BDDF 8026[9F00]CF <1> clropt [internalflags], tt_silent_mode | tt_silence 10440 0000BDE4 8026[A300]EF <1> clropt [internalflags2], dif2_in_silence_dump 10441 0000BDE9 C3 <1> retn 10442 <1> 10443 <1> 10444 <1> putsz_error: 10445 0000BDEA 36800E[A500]20 <1> setopt [ss:internalflags3], dif3_unquiet_error 10446 <1> 10447 <1> ; Display ASCIZ message 10448 <1> ; 10449 <1> ; INP: ds:dx -> ASCIZ message to display 10450 <1> ; CHG: - 10451 <1> ; STT: ds, es don't care 10452 <1> putsz: 10453 0000BDF0 50 <1> push ax 10454 0000BDF1 53 <1> push bx 10455 0000BDF2 51 <1> push cx 10456 0000BDF3 52 <1> push dx 10457 0000BDF4 06 <1> push es 10458 0000BDF5 1E <1> push ds 10459 0000BDF6 1E <1> push ds 10460 0000BDF7 07 <1> pop es 10461 0000BDF8 57 <1> push di 10462 0000BDF9 89D7 <1> mov di, dx ; es:di-> string 10463 0000BDFB 30C0 <1> xor al, al 10464 0000BDFD B9FFFF <1> mov cx, -1 10465 0000BE00 F2AE <1> repne scasb ; search zero 10466 0000BE02 F7D9 <1> neg cx 10467 0000BE04 49 <1> dec cx 10468 0000BE05 49 <1> dec cx ; cx = length of message 10469 0000BE06 5F <1> pop di 10470 0000BE07 16 <1> push ss 10471 0000BE08 1F <1> pop ds ; ds = ss 10472 0000BE09 E871FC <1> call puts 10473 0000BE0C 1F <1> pop ds 10474 0000BE0D 07 <1> pop es 10475 0000BE0E 5A <1> pop dx 10476 0000BE0F 59 <1> pop cx 10477 0000BE10 5B <1> pop bx 10478 0000BE11 58 <1> pop ax 10479 0000BE12 C3 <1> retn 10480 <1> 10481 <1> ; Display character 10482 <1> ; 10483 <1> ; INP: al = character to display 10484 <1> ; CHG: - 10485 <1> ; STT: ds, es don't care 10486 <1> putc: 10487 0000BE13 53 <1> push bx 10488 0000BE14 51 <1> push cx 10489 0000BE15 52 <1> push dx 10490 0000BE16 06 <1> push es 10491 0000BE17 1E <1> push ds 10492 0000BE18 16 <1> push ss 10493 0000BE19 07 <1> pop es ; es:dx -> message 10494 0000BE1A 16 <1> push ss 10495 0000BE1B 1F <1> pop ds ; ds = ss 10496 0000BE1C 50 <1> push ax 10497 0000BE1D B90100 <1> mov cx, 1 ; one character 10498 0000BE20 89E2 <1> mov dx, sp ; ds:dx-> ax on stack 10499 0000BE22 E858FC <1> call puts 10500 0000BE25 58 <1> pop ax 10501 0000BE26 1F <1> pop ds 10502 0000BE27 07 <1> pop es 10503 0000BE28 5A <1> pop dx 10504 0000BE29 59 <1> pop cx 10505 0000BE2A 5B <1> pop bx 10506 0000BE2B C3 <1> retn 10507 <1> 10508 <1> 10509 <1> ; OUT: ax = 0 if no input available 10510 <1> ; ax = 0FFFFh if DOS stdin input available 10511 <1> ; ah = scancode, al = ASCII if int 16h input available 10512 <1> ; ax = al = ASCII if serial input available 10513 <1> ; REM: This is always a nondestructive read. 10514 <1> peekc: 10515 0000BE2C F606[7D00]40 <1> testopt [options], enable_serial 10516 0000BE31 750C <1> jnz .serial 10517 0000BE33 E8A8E8 <1> call InDos 10518 0000BE36 740E <1> jz .dos 10519 <1> .bios: 10520 0000BE38 B401 <1> mov ah, 01h 10521 0000BE3A CD16 <1> int 16h ; key available ? 10522 <1> @@: 10523 0000BE3C 7413 <1> jz .return_ax_0 10524 0000BE3E C3 <1> retn 10525 <1> 10526 <1> .serial: 10527 0000BE3F E8AA10 <1> call serial_check_receive_char 10528 <1> ; do serial getc (check rx buffer) 10529 0000BE42 B400 <1> mov ah, 0 10530 0000BE44 EBF6 <1> jmp @B 10531 <1> 10532 <1> .dos: 10533 0000BE46 B40B <1> mov ah, 0Bh 10534 <1> doscall 2080 0000BE48 E8509F <2> call _doscall 10535 0000BE4B B4FF <1> mov ah, -1 10536 0000BE4D 84C0 <1> test al, al 10537 0000BE4F EBEB <1> jmp @B 10538 <1> 10539 <1> .return_ax_0: 10540 0000BE51 B80000 <1> mov ax, 0 10541 <1> .return: 10542 0000BE54 C3 <1> retn 10543 <1> 10544 <1> 10545 <1> ; Get character/key 10546 <1> ; 10547 <1> ; OUT: al = character (if zero, look for ah) 10548 <1> ; ah = scan code or zero 10549 <1> ; CHG: ax 10550 <1> ; STT: ds = ss = debugger segment/selector 10551 <1> ; 10552 <1> ; Idles system when in InDOS mode. When not in InDOS mode, Int21.08 10553 <1> ; is used which is assumed to idle the system itself. 10554 <1> getc: 10555 0000BE55 F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 10556 0000BE5A 750C <1> jnz @F 10557 0000BE5C F606[7D00]40 <1> testopt [options], enable_serial 10558 0000BE61 7505 <1> jnz @F 10559 0000BE63 E878E8 <1> call InDos 10560 0000BE66 7440 <1> jz getc_dos 10561 <1> @@: 10562 <1> .rawnext: 10563 0000BE68 FF16[040C] <1> call near word [getline_timer_func] 10564 <1> 10565 0000BE6C F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 10566 0000BE71 7523 <1> jnz @F 10567 0000BE73 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10568 0000BE78 751C <1> jnz @F 10569 <1> %if _INPUT_FILE_BOOT 10570 0000BE7A F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10571 0000BE7F 7515 <1> jnz @F 10572 <1> %endif 10573 0000BE81 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10574 0000BE86 750E <1> jnz @F 10575 0000BE88 F606[7D00]40 <1> testopt [options], enable_serial 10576 0000BE8D 7507 <1> jnz @F 10577 0000BE8F F606[7D00]04 <1> testopt [options], biosidles 10578 <1> ; idling disabled? 10579 0000BE94 750D <1> jnz .rawkey ; yes, just request a key --> 10580 <1> 10581 <1> @@: 10582 0000BE96 E8A801 <1> call getc_if_any ; got a key ? 10583 0000BE99 750C <1> jnz .return ; yes --> 10584 <1> .idle: ; common idling for BIOS keyboard and serial 10585 0000BE9B E83981 <1> call handle_serial_flags_ctrl_c 10586 0000BE9E E87A02 <1> call idle 10587 0000BEA1 EBC5 <1> jmp .rawnext ; check again --> 10588 <1> 10589 <1> .rawkey: 10590 0000BEA3 31C0 <1> xor ax, ax 10591 0000BEA5 CD16 <1> int 16h ; get the key and scancode 10592 <1> .return: 10593 0000BEA7 C3 <1> retn 10594 <1> 10595 <1> 10596 <1> getc_dos: 10597 <1> %if _PM 10598 0000BEA8 E852D3 <1> call ispm 10599 0000BEAB 7507 <1> jnz @F ; if 86 Mode --> 10600 0000BEAD F606[8100]40 <1> testopt [options2], opt2_getc_idle_dpmi 10601 0000BEB2 7507 <1> jnz @FF 10602 <1> @@: 10603 <1> %endif 10604 0000BEB4 F606[8100]20 <1> testopt [options2], opt2_getc_idle 10605 0000BEB9 7410 <1> jz getc_dos_internal 10606 <1> @@: 10607 <1> .with_idle: 10608 0000BEBB E88301 <1> call getc_if_any 10609 0000BEBE 7403E9B500 <1> jnz .return 10610 0000BEC3 E81181 <1> call handle_serial_flags_ctrl_c 10611 0000BEC6 E85202 <1> call idle 10612 0000BEC9 EBF0 <1> jmp .with_idle 10613 <1> 10614 <1> .return equ getc_dos_internal_get_extended.return 10615 <1> 10616 <1> 10617 <1> getc_dos_internal: ; DOS character devices handle one-byte characters. Therefore 10618 <1> ; non-ASCII keys cannot be returned with scancode in the high 10619 <1> ; byte of the same call. A non-ASCII key will be split into 10620 <1> ; two characters by CON: one NUL byte followed by the scancode. 10621 0000BECB F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10622 0000BED0 741B <1> jz @F 10623 0000BED2 56 <1> push si 10624 0000BED3 8B36[E409] <1> mov si, word [re_buffer.position] 10625 0000BED7 31C0 <1> xor ax, ax 10626 0000BED9 AC <1> lodsb 10627 0000BEDA 84C0 <1> test al, al 10628 0000BEDC 8936[E409] <1> mov word [re_buffer.position], si 10629 0000BEE0 5E <1> pop si 10630 0000BEE1 7403E99200 <1> jnz .return 10631 0000BEE6 FF0E[E409] <1> dec word [re_buffer.position] 10632 0000BEEA E98B00 <1> jmp .return 10633 <1> 10634 <1> .return equ getc_dos_internal_get_extended.return 10635 <1> 10636 <1> 10637 <1> @@: 10638 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 10639 <1> %if _INPUT_FILE_BOOT 10640 0000BEED F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10641 0000BEF2 750E <1> jnz .file 10642 <1> %endif 10643 <1> %if _INPUT_FILE_HANDLES 10644 0000BEF4 E8E7E7 <1> call InDos 10645 0000BEF7 7546 <1> jnz .file_not 10646 0000BEF9 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 10647 0000BEFE 7502 <1> jnz .file 10648 <1> %endif 10649 0000BF00 EB3D <1> jmp .file_not 10650 <1> 10651 <1> .file: 10652 0000BF02 52 <1> push dx 10653 0000BF03 51 <1> push cx 10654 0000BF04 53 <1> push bx 10655 0000BF05 57 <1> push di 10656 0000BF06 31C0 <1> xor ax, ax ; initialise ah to zero 10657 0000BF08 50 <1> push ax 10658 0000BF09 89E2 <1> mov dx, sp ; ds:dx -> al byte on stack 10659 0000BF0B B90100 <1> mov cx, 1 10660 <1> %if _INPUT_FILE_BOOT 10661 <1> %if _INPUT_FILE_HANDLES 10662 0000BF0E F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10663 0000BF13 7408 <1> jz @F 10664 <1> %endif 10665 0000BF15 E87F0E <1> call yy_boot_remember_seek 10666 0000BF18 E87BBF <1> call yy_boot_read 10667 <1> %if _INPUT_FILE_HANDLES 10668 0000BF1B EB0B <1> jmp @FF 10669 <1> @@: 10670 <1> %endif 10671 <1> %endif 10672 <1> %if _INPUT_FILE_HANDLES 10673 0000BF1D B43F <1> mov ah, 3Fh 10674 0000BF1F E81001 <1> call yy_get_handle 10675 0000BF22 E83B0E <1> call yy_remember_seek 10676 <1> doscall ; (depends on ds = ss) 2080 0000BF25 E8739E <2> call _doscall 10677 <1> %endif 10678 <1> @@: 10679 0000BF28 7204 <1> jc @F 10680 0000BF2A 85C0 <1> test ax, ax 10681 0000BF2C 750B <1> jnz .file_got 10682 <1> 10683 <1> @@: 10684 0000BF2E E85100 <1> call yy_close_file 10685 0000BF31 58 <1> pop ax 10686 0000BF32 5F <1> pop di 10687 0000BF33 5B <1> pop bx 10688 0000BF34 59 <1> pop cx 10689 0000BF35 5A <1> pop dx 10690 0000BF36 E91CFF <1> jmp getc 10691 <1> 10692 <1> 10693 <1> .file_got: 10694 0000BF39 58 <1> pop ax ; ah = 0, al = character read 10695 0000BF3A 5F <1> pop di 10696 0000BF3B 5B <1> pop bx 10697 0000BF3C 59 <1> pop cx 10698 0000BF3D 5A <1> pop dx 10699 0000BF3E C3 <1> retn 10700 <1> 10701 <1> .file_not: 10702 <1> %endif 10703 0000BF3F F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10704 0000BF44 7419 <1> jz @F 10705 0000BF46 56 <1> push si 10706 0000BF47 8B36[E001] <1> mov si, word [cmdline_buffer.position] 10707 0000BF4B 31C0 <1> xor ax, ax 10708 0000BF4D AC <1> lodsb 10709 0000BF4E 84C0 <1> test al, al 10710 0000BF50 8936[E001] <1> mov word [cmdline_buffer.position], si 10711 0000BF54 5E <1> pop si 10712 0000BF55 7521 <1> jnz .return 10713 0000BF57 8026[A500]FE <1> clropt [internalflags3], dif3_input_cmdline 10714 0000BF5C E9F6FE <1> jmp getc 10715 <1> 10716 <1> @@: 10717 0000BF5F B408 <1> mov ah, 8 10718 <1> doscall ; wait for a key 2080 0000BF61 E8379E <2> call _doscall 10719 <1> 10720 <1> getc_dos_internal_get_extended: 10721 <1> ; FreeDOS kernel 2036 returns with ax=4C00h upon Control C. 10722 <1> ; This is due to setting ax internally to terminate the 10723 <1> ; process, paired with the termination service just 10724 <1> ; returning for self-owned processes. This was eventually 10725 <1> ; fixed in https://sourceforge.net/p/freedos/svn/1469/ 10726 <1> ; This is a work around to restart our command line then. 10727 <1> ; Usually ah stays 08h when this call returns. 10728 <1> ; (06h if calling from getc_if_any to here.) 10729 0000BF64 80FC4C <1> cmp ah, 4Ch 10730 0000BF67 7410 <1> je .freedos_ctrlc_workaround 10731 0000BF69 B400 <1> mov ah, 0 ; assume it is ASCII 10732 0000BF6B 08C0 <1> or al, al 10733 0000BF6D 7509 <1> jne .return ; ASCII, return with ah zero --> 10734 0000BF6F B408 <1> mov ah, 8 10735 <1> doscall ; scancode of non-ASCII key to al 2080 0000BF71 E8279E <2> call _doscall 10736 0000BF74 86C4 <1> xchg al, ah ; to ah 10737 0000BF76 B000 <1> mov al, 0 ; return zero for non-ASCII key 10738 <1> .return: 10739 0000BF78 C3 <1> retn 10740 <1> 10741 <1> .freedos_ctrlc_workaround: 10742 0000BF79 BA[215D] <1> mov dx, msg.freedos_ctrlc_workaround 10743 0000BF7C E871FE <1> call putsz 10744 0000BF7F E937FC <1> jmp puts.ctrlc ; use common handler 10745 <1> 10746 <1> 10747 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 10748 <1> ; INP: [input_file_handles], dif2_input_file 10749 <1> ; OUT: most recent file closed, flag cleared if no longer file 10750 <1> ; CHG: di, bx, ax 10751 <1> yy_close_file: 10752 0000BF82 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10753 0000BF87 740B <1> jz @F 10754 0000BF89 8026[A700]FE <1> clropt [internalflags3], dif3_input_re 10755 0000BF8E 800E[A700]02 <1> setopt [internalflags3], dif3_input_re_closed 10756 0000BF93 C3 <1> retn 10757 <1> 10758 <1> @@: 10759 <1> %if _INPUT_FILE_BOOT 10760 0000BF94 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10761 0000BF99 7406 <1> jz @F 10762 0000BF9B E8DE0D <1> call yy_boot_clear_remember_seek 10763 0000BF9E E9ACBE <1> jmp yy_boot_close_file 10764 <1> 10765 <1> @@: 10766 <1> %endif 10767 <1> %if _INPUT_FILE_HANDLES 10768 0000BFA1 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 10769 0000BFA6 7455 <1> jz .notfile 10770 0000BFA8 8B3E[800A] <1> mov di, word [input_file_handles.active] 10771 0000BFAC 57 <1> push di 10772 0000BFAD D1E7 <1> shl di, 1 10773 0000BFAF D1E7 <1> shl di, 1 10774 0000BFB1 D1E7 <1> shl di, 1 10775 <1> %if INPUTFILEHANDLE_size != 8 10776 <1> %error Unexpected structure size 10777 <1> %endif 10778 0000BFB3 8B9D[000A] <1> mov bx, word [input_file_handles + di + ifhHandle] 10779 0000BFB7 E88A0D <1> call yy_clear_remember_seek 10780 <1> 10781 0000BFBA F685[030A]01 <1> testopt [input_file_handles + di + ifhFlags], ifhfIsDup 10782 0000BFBF 7416 <1> jz @F 10783 <1> 10784 0000BFC1 51 <1> push cx 10785 0000BFC2 52 <1> push dx 10786 <1> 10787 0000BFC3 8B9D[F809] <1> mov bx, word [input_file_handles + di - INPUTFILEHANDLE_size + ifhHandle] 10788 0000BFC7 8B95[040A] <1> mov dx, word [input_file_handles + di + ifhParentSeek] 10789 0000BFCB 8B8D[060A] <1> mov cx, word [input_file_handles + di + ifhParentSeek + 2] 10790 0000BFCF B80042 <1> mov ax, 4200h ; seek from start 10791 0000BFD2 E8F90C <1> call handle_seek_or_remember 10792 <1> 10793 0000BFD5 5A <1> pop dx 10794 0000BFD6 59 <1> pop cx 10795 <1> 10796 <1> @@: 10797 <1> 10798 0000BFD7 E804E7 <1> call InDos 10799 0000BFDA 7406 <1> jz .closefile 10800 <1> 10801 0000BFDC FF06[820A] <1> inc word [input_file_handles.to_close] 10802 0000BFE0 EB06 <1> jmp @F 10803 <1> 10804 <1> .closefile: 10805 0000BFE2 B80100 <1> mov ax, 1 10806 0000BFE5 E82C00 <1> call yy_close_file_handles 10807 <1> 10808 <1> @@: 10809 0000BFE8 5F <1> pop di 10810 0000BFE9 4F <1> dec di 10811 0000BFEA 790C <1> jns .next 10812 0000BFEC 8026[A200]EF <1> clropt [internalflags2], dif2_input_file 10813 0000BFF1 800E[A200]20 <1> setopt [internalflags2], dif2_closed_input_file 10814 0000BFF6 EB04 <1> jmp .done 10815 <1> .next: 10816 0000BFF8 893E[800A] <1> mov word [input_file_handles.active], di 10817 <1> .done: 10818 0000BFFC C3 <1> retn 10819 <1> 10820 <1> .notfile: 10821 0000BFFD F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10822 0000C002 740B <1> jz @F 10823 0000C004 8026[A500]FE <1> clropt [internalflags3], dif3_input_cmdline 10824 0000C009 800E[A500]02 <1> setopt [internalflags3], dif3_input_cmdline_closed 10825 0000C00E C3 <1> retn 10826 <1> 10827 <1> @@: 10828 0000C00F 31F6 <1> xor si, si 10829 0000C011 E9FEE4 <1> jmp error 10830 <1> 10831 <1> 10832 <1> ; INP: word [input_file_handles.to_close] = how many 10833 <1> ; ax = additionally how many (0 or 1) 10834 <1> ; input_file_handles + di -> first to close 10835 <1> ; OUT: word [input_file_handles.to_close] = 0 10836 <1> ; closed handle fields = -1 10837 <1> ; CHG: ax, bx, di 10838 <1> ; STT: DOS must be accessible 10839 <1> yy_close_file_handles: 10840 0000C014 51 <1> push cx 10841 0000C015 31C9 <1> xor cx, cx 10842 0000C017 870E[820A] <1> xchg cx, word [input_file_handles.to_close] 10843 0000C01B 01C1 <1> add cx, ax 10844 0000C01D 7411 <1> jz @FF 10845 <1> @@: 10846 0000C01F BBFFFF <1> mov bx, -1 10847 0000C022 879D[000A] <1> xchg bx, word [input_file_handles + di + ifhHandle] 10848 0000C026 B43E <1> mov ah, 3Eh 10849 <1> doscall 2080 0000C028 E8709D <2> call _doscall 10850 0000C02B 83C708 <1> add di, INPUTFILEHANDLE_size 10851 0000C02E E2EF <1> loop @B 10852 <1> @@: 10853 0000C030 59 <1> pop cx 10854 0000C031 C3 <1> retn 10855 <1> 10856 <1> 10857 <1> ; INP: - 10858 <1> ; OUT: di = active handle offset 10859 <1> ; bx = active handle 10860 <1> ; CHG: - 10861 <1> yy_get_handle: 10862 0000C032 8B3E[800A] <1> mov di, word [input_file_handles.active] 10863 0000C036 D1E7 <1> shl di, 1 10864 0000C038 D1E7 <1> shl di, 1 10865 0000C03A D1E7 <1> shl di, 1 10866 <1> %if INPUTFILEHANDLE_size != 8 10867 <1> %error Unexpected structure size 10868 <1> %endif 10869 0000C03C 8B9D[000A] <1> mov bx, word [input_file_handles + di + ifhHandle] 10870 <1> %endif 10871 0000C040 C3 <1> retn 10872 <1> %endif 10873 <1> 10874 <1> 10875 <1> ; INP: - 10876 <1> ; OUT: NZ if received any, 10877 <1> ; al = character 10878 <1> ; ah = scan code or zero 10879 <1> ; ZR if none received 10880 <1> ; CHG: ax 10881 <1> ; STT: ds = ss = debugger segment/selector 10882 <1> getc_if_any: 10883 0000C041 F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 10884 0000C046 755B <1> jnz .serial 10885 0000C048 F606[A400]10 <1> testopt [internalflags3], dif3_input_terminal_override 10886 0000C04D 754D <1> jnz .terminal 10887 <1> 10888 0000C04F F606[A700]01 <1> testopt [internalflags3], dif3_input_re 10889 0000C054 741D <1> jz @F 10890 0000C056 56 <1> push si 10891 0000C057 8B36[E409] <1> mov si, word [re_buffer.position] 10892 0000C05B 31C0 <1> xor ax, ax 10893 0000C05D AC <1> lodsb 10894 0000C05E 84C0 <1> test al, al 10895 0000C060 8936[E409] <1> mov word [re_buffer.position], si 10896 0000C064 5E <1> pop si 10897 0000C065 7403E9B000 <1> jnz .return 10898 0000C06A FF0E[E409] <1> dec word [re_buffer.position] 10899 0000C06E 38C0 <1> cmp al, al ; ZR 10900 0000C070 E9A700 <1> jmp .return 10901 <1> 10902 <1> @@: 10903 <1> %if _INPUT_FILE_BOOT 10904 0000C073 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10905 0000C078 7552 <1> jnz .file 10906 <1> %endif 10907 <1> 10908 0000C07A F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 10909 0000C07F 741B <1> jz @F 10910 0000C081 56 <1> push si 10911 0000C082 8B36[E001] <1> mov si, word [cmdline_buffer.position] 10912 0000C086 31C0 <1> xor ax, ax 10913 0000C088 AC <1> lodsb 10914 0000C089 84C0 <1> test al, al 10915 0000C08B 8936[E001] <1> mov word [cmdline_buffer.position], si 10916 0000C08F 5E <1> pop si 10917 0000C090 7403E98500 <1> jnz .return 10918 0000C095 8026[A500]FE <1> clropt [internalflags3], dif3_input_cmdline 10919 0000C09A EBA5 <1> jmp getc_if_any 10920 <1> 10921 <1> @@: 10922 <1> .terminal: 10923 0000C09C F606[7D00]40 <1> testopt [options], enable_serial 10924 0000C0A1 7408 <1> jz @F ; do BIOS keyboard or DOS getc --> 10925 <1> 10926 <1> .serial: 10927 0000C0A3 E8250E <1> call serial_receive_char ; do serial getc (check rx buffer) 10928 0000C0A6 7472 <1> jz .return ; no data, go and idle --> 10929 0000C0A8 B400 <1> mov ah, 0 10930 0000C0AA C3 <1> retn 10931 <1> 10932 <1> @@: 10933 0000C0AB E830E6 <1> call InDos 10934 0000C0AE 755C <1> jnz .bios 10935 <1> 10936 0000C0B0 F606[A400]10 <1> testopt [internalflags3], dif3_input_terminal_override 10937 0000C0B5 7547 <1> jnz .dos_terminal 10938 <1> 10939 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 10940 <1> %if _INPUT_FILE_BOOT 10941 0000C0B7 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10942 0000C0BC 750E <1> jnz .file 10943 <1> %endif 10944 <1> %if _INPUT_FILE_HANDLES 10945 0000C0BE E81DE6 <1> call InDos 10946 0000C0C1 753B <1> jnz .file_not 10947 0000C0C3 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 10948 0000C0C8 7502 <1> jnz .file 10949 <1> %endif 10950 0000C0CA EB32 <1> jmp .file_not 10951 <1> 10952 <1> .file: 10953 0000C0CC 57 <1> push di 10954 0000C0CD 53 <1> push bx 10955 0000C0CE 51 <1> push cx 10956 0000C0CF 52 <1> push dx 10957 0000C0D0 31C0 <1> xor ax, ax 10958 0000C0D2 50 <1> push ax 10959 <1> 10960 0000C0D3 89E2 <1> mov dx, sp ; ds:dx -> al byte on stack 10961 0000C0D5 B90100 <1> mov cx, 1 ; buffer length = 1 10962 <1> %if _INPUT_FILE_BOOT 10963 <1> %if _INPUT_FILE_HANDLES 10964 0000C0D8 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 10965 0000C0DD 7408 <1> jz @F 10966 <1> %endif 10967 0000C0DF E8B50C <1> call yy_boot_remember_seek 10968 0000C0E2 E8B1BD <1> call yy_boot_read 10969 0000C0E5 EB0B <1> jmp @FF 10970 <1> @@: 10971 <1> %endif 10972 <1> %if _INPUT_FILE_HANDLES 10973 0000C0E7 B43F <1> mov ah, 3Fh 10974 0000C0E9 E846FF <1> call yy_get_handle 10975 0000C0EC E8710C <1> call yy_remember_seek 10976 <1> doscall ; DOS read file (depends on ds = ss) 2080 0000C0EF E8A99C <2> call _doscall 10977 <1> %endif 10978 <1> @@: 10979 0000C0F2 7302 <1> jnc @F 10980 0000C0F4 31C0 <1> xor ax, ax 10981 <1> @@: 10982 0000C0F6 85C0 <1> test ax, ax 10983 0000C0F8 58 <1> pop ax 10984 0000C0F9 5A <1> pop dx 10985 0000C0FA 59 <1> pop cx 10986 0000C0FB 5B <1> pop bx 10987 0000C0FC 5F <1> pop di 10988 0000C0FD C3 <1> retn ; ZR if no character read 10989 <1> 10990 <1> .file_not: 10991 <1> %endif 10992 <1> .dos_terminal: 10993 <1> %if 0 10994 <1> push dx 10995 <1> mov ah, 06h 10996 <1> mov dl, -1 10997 <1> doscall 10998 <1> jz .return_dx ; none available 10999 <1> ; bugfix: the 06h call is a *destructive* read. 11000 <1> ; so do not call getc again, just handle the 11001 <1> ; possible second byte returned. 11002 <1> call getc_dos_internal_get_extended 11003 <1> pop dx 11004 <1> jmp .return_NZ 11005 <1> .return_dx: 11006 <1> pop dx 11007 <1> retn 11008 <1> %else 11009 0000C0FE B40B <1> mov ah, 0Bh 11010 <1> doscall 2080 0000C100 E8989C <2> call _doscall 11011 0000C103 84C0 <1> test al, al 11012 0000C105 7413 <1> jz .return 11013 0000C107 E8C1FD <1> call getc_dos_internal 11014 0000C10A EB0A <1> jmp .return_NZ 11015 <1> %endif 11016 <1> 11017 <1> .bios: 11018 0000C10C B401 <1> mov ah, 01h 11019 0000C10E CD16 <1> int 16h ; key available ? 11020 0000C110 7408 <1> jz .return 11021 0000C112 31C0 <1> xor ax, ax 11022 0000C114 CD16 <1> int 16h 11023 <1> .return_NZ: 11024 0000C116 50 <1> push ax 11025 0000C117 0C01 <1> or al, 1 ; (NZ) 11026 0000C119 58 <1> pop ax 11027 <1> .return: 11028 0000C11A C3 <1> retn 11029 <1> 11030 <1> 11031 <1> ; INP: - 11032 <1> ; OUT: - 11033 <1> ; CHG: ax 11034 <1> ; STT: ds = ss = debugger segment/selector 11035 <1> ; 11036 <1> ; Idle system, using 2F.1680 (in given mode), or 2F.1680 11037 <1> ; (calling down to 86 Mode), or sti \ hlt. 11038 <1> idle: 11039 <1> %if _BOOTLDR 11040 0000C11B F606[9D00]40 <1> testopt [internalflags], nodosloaded 11041 0000C120 7568 <1> jnz .hlt ; can't call 2F --> 11042 <1> %endif 11043 0000C122 F606[8700]02 <1> testopt [options3], opt3_no_idle_2F 11044 0000C127 7561 <1> jnz .hlt 11045 <1> %if _GUARD_86M_INT2F 11046 <1> %if _PM 11047 0000C129 E8D1D0 <1> call ispm 11048 0000C12C 7416 <1> jz @FF ; --> (NZ) 11049 <1> %endif 11050 0000C12E 06 <1> push es 11051 0000C12F 31C0 <1> xor ax, ax 11052 0000C131 8EC0 <1> mov es, ax ; (only used in 86 Mode) 11053 0000C133 26A1BC00 <1> mov ax, [es:2Fh * 4] 11054 0000C137 83F8FF <1> cmp ax, -1 11055 0000C13A 7405 <1> je @F ; --> (ZR) 11056 0000C13C 260B06BE00 <1> or ax, [es:2Fh * 4 + 2] 11057 <1> @@: 11058 0000C141 07 <1> pop es 11059 0000C142 7409 <1> jz @FF 11060 <1> @@: 11061 <1> %endif 11062 0000C144 B88016 <1> mov ax, 1680h 11063 0000C147 CD2F <1> int 2Fh ; release timeslice in multitasker 11064 0000C149 84C0 <1> test al, al 11065 0000C14B 7450 <1> jz .return ; done idling --> 11066 <1> @@: 11067 <1> %if _PM 11068 0000C14D E8ADD0 <1> call ispm 11069 0000C150 7538 <1> jnz .hlt 11070 <1> 11071 0000C152 53 <1> push bx 11072 0000C153 51 <1> push cx 11073 0000C154 06 <1> push es 11074 0000C155 66 <1> _386_PM_o32 ; push edi 11075 0000C156 57 <1> push di 11076 0000C157 6631FF <1> _386 xor edi, edi ; clear EDIH 11077 0000C15A 31C9 <1> xor cx, cx ; (copy no words from stack) 11078 <1> 11079 <1> [cpu 286] 11080 0000C15C 51 <1> push cx ; ss 11081 0000C15D 51 <1> push cx ; sp (0:0 = host should allocate a stack) 11082 0000C15E 83EC0C <1> sub sp, byte 12 ; cs:ip (ignored), segments (uninitialized) 11083 0000C161 9C <1> pushf 11084 0000C162 51 <1> push cx ; EAXH (uninitialized) 11085 0000C163 688016 <1> push 1680h ; AX 11086 0000C166 83EC0C <1> sub sp, byte 12 ; ecx, edx, ebx (uninitialized) 11087 0000C169 51 <1> push cx 11088 0000C16A 51 <1> push cx ; reserved (zero) 11089 0000C16B 83EC0C <1> sub sp, byte 12 ; ebp, esi, edi (uninitialized) 11090 0000C16E 16 <1> push ss 11091 0000C16F 07 <1> pop es 11092 0000C170 89E7 <1> mov di, sp ; es:(e)di -> 86 Mode call structure 11093 0000C172 B80003 <1> mov ax, 0300h 11094 0000C175 BB2F00 <1> mov bx, 2Fh ; bl = interrupt, bh = reserved (zero) 11095 0000C178 CD31 <1> int 31h ; call real mode 2F.1680 11096 <1> __CPU__ 11097 <1> 11098 0000C17A 83C41C <1> add sp, byte 28 ; discard RM call structure 11099 0000C17D 58 <1> pop ax ; get AX 11100 0000C17E 83C414 <1> add sp, byte 20 ; discard RM call structure 11101 <1> 11102 0000C181 66 <1> _386_PM_o32 ; pop edi 11103 0000C182 5F <1> pop di 11104 0000C183 07 <1> pop es 11105 0000C184 59 <1> pop cx 11106 0000C185 5B <1> pop bx 11107 <1> 11108 0000C186 84C0 <1> test al, al 11109 0000C188 7413 <1> jz .return ; done idling --> 11110 <1> %endif 11111 <1> .hlt: 11112 0000C18A F606[7D00]02 <1> testopt [options], nohlt 11113 0000C18F 750C <1> jnz .return 11114 <1> %if _PM 11115 <1> %if (protectedmode|dpminohlt)&~0FF00h 11116 <1> %error Option bits re-ordered, adjust code here 11117 <1> %endif 11118 0000C191 A0[9D00] <1> mov al, byte [internalflags+1] 11119 0000C194 240C <1> and al, (protectedmode|dpminohlt)>>8 11120 0000C196 340C <1> xor al, (protectedmode|dpminohlt)>>8 11121 0000C198 7403 <1> jz .return ; DPMI host throws GPF when we execute hlt --> 11122 <1> %endif 11123 0000C19A FB <1> sti 11124 0000C19B F4 <1> hlt ; else idle by hlt 11125 0000C19C 90 <1> nop 11126 <1> .return: 11127 0000C19D C3 <1> retn 11128 <1> 11129 <1> 11130 <1> ; GETLINE - Print a prompt (address in DX, length in CX) and read a line 11131 <1> ; of input. 11132 <1> ; GETLINE0 - Same as above, but use the output line (so far), plus two 11133 <1> ; spaces and a colon, as a prompt. 11134 <1> ; GETLINE00 - Same as above, but use the output line (so far) as a prompt. 11135 <1> ; Entry CX Length of prompt (getline only) 11136 <1> ; DX Address of prompt string (getline only) 11137 <1> ; 11138 <1> ; DI Address + 1 of last character in prompt (getline0 and 11139 <1> ; getline00 only) 11140 <1> ; 11141 <1> ; Exit AL First nonwhite character in input line 11142 <1> ; SI Address of the next character after that 11143 <1> ; Uses AH,BX,CX,DX,DI 11144 <1> 11145 <1> getline0: 11146 0000C19E B82020 <1> mov ax, 32<<8|32 ; add two spaces and a colon 11147 0000C1A1 AB <1> stosw 11148 0000C1A2 B03A <1> mov al, ':' 11149 0000C1A4 AA <1> stosb 11150 <1> getline00: 11151 0000C1A5 BA[0E08] <1> mov dx, line_out 11152 0000C1A8 89F9 <1> mov cx, di 11153 0000C1AA 29D1 <1> sub cx, dx 11154 <1> 11155 <1> getline: ; note: this entry is no longer used 11156 0000C1AC 8026[A500]77 <1> clropt [internalflags3], dif3_quiet_input_single | dif3_return_eof 11157 <1> .use_dif3_flags: 11158 <1> %if _DEBUG 11159 <1> d0bp 11160 <1> %endif 11161 0000C1B1 890E[EA0A] <1> mov word [promptlen], cx ; save length of prompt 11162 0000C1B5 C606[930A]00 <1> mov byte [linecounter], 0 ; reset counter 11163 0000C1BA 8326[0E0C]00 <1> and word [terminator_in_line_in.offset], 0 11164 <1> ; reset this when reading new line 11165 0000C1BF 8026[9E00]EF <1> clropt [internalflags], promptwaiting 11166 <1> 11167 0000C1C4 E87202 <1> call getline_is_input_file? 11168 0000C1C7 7303E9FF00 <1> jc getline_nofile 11169 <1> 11170 <1> getline_file: 11171 0000C1CC F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11172 0000C1D1 7549 <1> jnz .notquiet 11173 <1> 11174 <1> %if _INPUT_FILE_BOOT 11175 0000C1D3 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11176 0000C1D8 7412 <1> jz @F 11177 0000C1DA B8A000 <1> mov ax, LOAD_INPUT_FILE_SIZE 11178 0000C1DD 52 <1> push dx 11179 0000C1DE F726[D08F] <1> mul word [load_input_file.active] 11180 0000C1E2 5A <1> pop dx 11181 0000C1E3 89C7 <1> mov di, ax 11182 0000C1E5 F685[778D]40 <1> testopt [load_input_file + di - LOADDATA3 + ldFATType], ifhfQuietInput 11183 0000C1EA EB29 <1> jmp .quiet_if_nz 11184 <1> 11185 <1> @@: 11186 <1> %endif 11187 <1> %if _INPUT_FILE_HANDLES 11188 0000C1EC E8EFE4 <1> call InDos 11189 0000C1EF 7518 <1> jnz @F 11190 0000C1F1 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 11191 0000C1F6 7411 <1> jz @F 11192 0000C1F8 8B3E[800A] <1> mov di, word [input_file_handles.active] 11193 0000C1FC D1E7 <1> shl di, 1 11194 0000C1FE D1E7 <1> shl di, 1 11195 0000C200 D1E7 <1> shl di, 1 ; to qword array index 11196 <1> %if INPUTFILEHANDLE_size != 8 11197 <1> %error Unexpected structure size 11198 <1> %endif 11199 0000C202 F685[030A]40 <1> testopt [input_file_handles + di + ifhFlags], ifhfQuietInput 11200 0000C207 EB0C <1> jmp .quiet_if_nz 11201 <1> 11202 <1> @@: 11203 <1> %endif 11204 0000C209 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11205 0000C20E 740C <1> jz @F 11206 0000C210 F606[7F00]40 <1> testopt [options], opt_cmdline_quiet_input 11207 <1> ; jmp .quiet_if_nz 11208 <1> 11209 <1> .quiet_if_nz: 11210 0000C215 7405 <1> jz @F 11211 <1> .quiet: 11212 0000C217 800E[A500]08 <1> setopt [internalflags3], dif3_quiet_input_single 11213 <1> .notquiet: 11214 <1> @@: 11215 <1> 11216 0000C21C 800E[A200]40 <1> setopt [internalflags2], dif2_did_getline_file 11217 <1> 11218 <1> 11219 <1> ; This part reads the input line from a file (in the case of 11220 <1> ; `debug < file'). It is necessary to do this by hand because DOS 11221 <1> ; function 0Ah does not handle EOF correctly otherwise. This is 11222 <1> ; especially important for DEBUG because it traps Control-C. 11223 0000C221 C706[DA0B][1404] <1> mov word [lastcmd], dmycmd ; disable auto-repeat while reading from a file 11224 <1> 11225 <1> %if _NEWFULLHANDLING 11226 0000C227 BF[0300] <1> mov di, line_in+3 ; read max 11227 <1> %else 11228 <1> mov di, line_in+2 11229 <1> %endif 11230 0000C22A 8B36[EC0A] <1> mov si, word [bufnext] 11231 0000C22E 3B36[EE0A] <1> cmp si, word [bufend] 11232 0000C232 7216 <1> jb .char_buffered ; if there's a character already 11233 0000C234 E80D07 <1> call fillbuf 11234 0000C237 7311 <1> jnc .fillbuf_had_data 11235 0000C239 F606[A500]80 <1> testopt [internalflags3], dif3_return_eof 11236 0000C23E 7402 <1> jz @F 11237 0000C240 F9 <1> stc 11238 0000C241 C3 <1> retn 11239 <1> @@: 11240 0000C242 E82D02 <1> call getline_close_file 11241 0000C245 7403E962FF <1> jnz getline 11242 <1> 11243 <1> .fillbuf_had_data: 11244 <1> .char_buffered: 11245 <1> %if _NEWFULLHANDLING 11246 0000C24A 4F <1> dec di 11247 <1> %endif 11248 <1> 11249 <1> ; Discard an LF if the last character read was CR. 11250 0000C24B 803E[E70A]0D <1> cmp byte [notatty], 13 ; last parsed character was CR ? 11251 0000C250 750A <1> jne .no_lf_skip ; no, nothing more to do --> 11252 0000C252 803C0A <1> cmp byte [si], 10 ; first read character is LF ? 11253 0000C255 7505 <1> jne .no_lf_skip ; no --> 11254 0000C257 46 <1> inc si ; skip the LF 11255 0000C258 FE06[E70A] <1> inc byte [notatty] ; avoid repeating this 11256 <1> .no_lf_skip: 11257 <1> 11258 0000C25C 3B36[EE0A] <1> cmp si, word [bufend] 11259 0000C260 740B <1> je @F 11260 0000C262 803C40 <1> cmp byte [si], '@' ; no display ? 11261 0000C265 7506 <1> jne @F 11262 <1> 11263 0000C267 46 <1> inc si ; increment past @ 11264 0000C268 800E[A500]08 <1> setopt [internalflags3], dif3_quiet_input_single 11265 <1> @@: 11266 0000C26D F606[A500]08 <1> testopt [internalflags3], dif3_quiet_input_single 11267 0000C272 7503 <1> jnz gl1 11268 <1> 11269 0000C274 E806F8 <1> call puts ; display prompt (having checked it wasn't EOF) 11270 <1> 11271 <1> ; si-> next character in buffer 11272 <1> ; w[bufend]-> behind last valid character of buffer 11273 <1> gl1: 11274 0000C277 8B0E[EE0A] <1> mov cx, word [bufend] 11275 0000C27B 29F1 <1> sub cx, si ; cx = number of valid characters in buffer 11276 0000C27D 740C <1> jz gl3 ; if none --> 11277 <1> gl2: 11278 0000C27F AC <1> lodsb 11279 0000C280 3C0D <1> cmp al, 13 ; (exact match for CR) 11280 0000C282 7410 <1> je gl4 11281 0000C284 3C0A <1> cmp al, 10 11282 0000C286 740C <1> je gl4 ; if EOL --> 11283 0000C288 AA <1> stosb 11284 0000C289 E2F4 <1> loop gl2 ; if more valid characters --> 11285 <1> 11286 <1> ; The buffer is empty. Fill it again. 11287 <1> gl3: 11288 <1> %if _NEWFULLHANDLING 11289 0000C28B 47 <1> inc di 11290 <1> %endif 11291 0000C28C E8B506 <1> call fillbuf 11292 <1> %if _NEWFULLHANDLING 11293 0000C28F 4F <1> dec di 11294 <1> %endif 11295 0000C290 73E5 <1> jnc gl1 ; if we have more characters --> 11296 0000C292 B00A <1> mov al, 10 ; make jump after gl4 always branch 11297 <1> %ifn _NEWFULLHANDLING ; should now always have at least one byte free 11298 <1> cmp di, line_in+LINE_IN_LEN 11299 <1> jb @F 11300 <1> dec si 11301 <1> dec di 11302 <1> @@: 11303 <1> %endif 11304 <1> 11305 <1> gl4: 11306 0000C294 3C0D <1> cmp al, 13 ; terminator was CR ? 11307 0000C296 7508 <1> jne @F ; no --> 11308 0000C298 E306 <1> jcxz @F ; if no other byte buffered --> 11309 0000C29A 803C0A <1> cmp byte [si], 10 ; next byte is an LF ? 11310 0000C29D 7501 <1> jne @F ; no --> 11311 0000C29F AC <1> lodsb ; increment si past the LF and set al = 10 11312 <1> ; dec cx ; (not used in subsequent code) 11313 <1> @@: 11314 0000C2A0 8936[EC0A] <1> mov word [bufnext], si 11315 0000C2A4 A2[E70A] <1> mov byte [notatty], al ; store 10 or 13 (depending on the kind of EOL) 11316 <1> 11317 0000C2A7 800E[A500]04 <1> setopt [internalflags3], dif3_at_line_end 11318 0000C2AC E81906 <1> call getline_reset_notatty 11319 <1> 11320 0000C2AF 89F9 <1> mov cx, di ; (counter is for input without CR) 11321 0000C2B1 B00D <1> mov al, 13 11322 0000C2B3 AA <1> stosb ; terminate line for our usage 11323 0000C2B4 BA[0200] <1> mov dx, line_in + 2 11324 0000C2B7 29D1 <1> sub cx, dx ; = length of input (no CR) 11325 0000C2B9 F606[A500]08 <1> testopt [internalflags3], dif3_quiet_input_single 11326 0000C2BE 7503 <1> jnz @F 11327 0000C2C0 E8BAF7 <1> call puts ; print out the received line 11328 <1> @@: 11329 0000C2C3 49 <1> dec cx 11330 0000C2C4 880E[0100] <1> mov byte [line_in+1], cl 11331 0000C2C8 E92201 <1> jmp getline_eol ; done 11332 <1> 11333 <1> getline_nofile: 11334 0000C2CB E87A09 <1> call yy_reset_buf 11335 0000C2CE 51 <1> push cx 11336 0000C2CF 52 <1> push dx 11337 0000C2D0 E8AAF7 <1> call puts ; display prompt 11338 0000C2D3 5A <1> pop dx 11339 0000C2D4 59 <1> pop cx 11340 0000C2D5 F606[7D00]40 <1> testopt [options], enable_serial 11341 0000C2DA 7516 <1> jnz .rawinput_NZ 11342 0000C2DC E8FFE3 <1> call InDos 11343 0000C2DF 7511 <1> jnz .rawinput_NZ 11344 <1> %if _PM 11345 0000C2E1 E819CF <1> call ispm 11346 0000C2E4 7507 <1> jnz @F ; if 86 Mode --> 11347 0000C2E6 F606[8100]08 <1> testopt [options2], opt2_rawinput_dpmi 11348 0000C2EB 7505 <1> jnz .rawinput_NZ 11349 <1> @@: 11350 <1> %endif 11351 0000C2ED F606[7D00]08 <1> testopt [options], opt_userawinput 11352 <1> .rawinput_NZ: 11353 0000C2F2 7403E9E001 <1> jnz rawinput 11354 <1> 11355 <1> %if _PM 11356 0000C2F7 E803CF <1> call ispm 11357 0000C2FA 7537 <1> jnz @F ; if 86 Mode --> 11358 0000C2FC F606[9E00]04 <1> testopt [internalflags], canswitchmode 11359 0000C301 7430 <1> jz @F ; can't switch to 86M --> 11360 0000C303 800E[9E00]08 <1> setopt [internalflags], modeswitched 11361 <1> ; set flag for resetmode 11362 0000C308 B000 <1> mov al, 0 11363 0000C30A E87975 <1> call sr_state ; save state 11364 0000C30D E84175 <1> call switchmode ; switch to 86M 11365 0000C310 E84981 <1> call handle_mode_changed ; ! called with flag set 11366 <1> 11367 0000C313 BE[D095] <1> mov si, getline_extra_int23 11368 0000C316 B023 <1> mov al, 23h 11369 0000C318 E82D0E <1> call install_86m_interrupt_handler 11370 <1> ; override DPMI host's int 23h vector 11371 0000C31B BA[E495] <1> mov dx, getline_extra_int22 11372 0000C31E B82225 <1> mov ax, 2522h 11373 0000C321 CD21 <1> int 21h 11374 0000C323 89160A00 <1> mov word [TPIV], dx ; override our PRI 11375 <1> 11376 0000C327 BA[0000] <1> mov dx, line_in 11377 0000C32A B40A <1> mov ah, 0Ah 11378 0000C32C CD21 <1> int 21h ; call DOS 11379 <1> 11380 0000C32E E8D300 <1> call getline_extra_uninstall 11381 <1> ; undo patches 11382 0000C331 EB08 <1> jmp getline_eol_enter_history 11383 <1> ; go to common trail 11384 <1> 11385 <1> @@: 11386 <1> %endif 11387 0000C333 BA[0000] <1> mov dx, line_in 11388 0000C336 B40A <1> mov ah, 0Ah ; buffered keyboard input 11389 <1> doscall 2080 0000C338 E8609A <2> call _doscall 11390 <1> 11391 <1> getline_eol_enter_history: 11392 <1> %if _HISTORY 11393 <1> .loop: 11394 0000C33B BE[0200] <1> mov si, line_in + 2 11395 0000C33E 31C9 <1> xor cx, cx 11396 0000C340 0A4CFF <1> or cl, byte [si - 1] 11397 0000C343 7503E9A300 <1> jz .dontenter 11398 <1> gethistorysegment es 298 0000C348 368E06[F60A] <2> mov %1, word [ss:history.segorsel] 11399 <1> gethistoryoffset bx 301 0000C34D BB0000 <2> mov %1, 0 11400 0000C350 A1[FE0A] <1> mov ax, word [history.last] 11401 0000C353 3B06[FC0A] <1> cmp ax, word [history.first] 11402 0000C357 7419 <1> je @F 11403 0000C359 89C7 <1> mov di, ax 11404 0000C35B 268B15 <1> mov dx, [es:di] 11405 0000C35E 268B7D02 <1> mov di, [es:di + 2] 11406 0000C362 29FA <1> sub dx, di 11407 0000C364 39D1 <1> cmp cx, dx 11408 0000C366 750A <1> jne @F 11409 0000C368 8D39 <1> lea di, [di + bx] 11410 0000C36A 51 <1> push cx 11411 0000C36B 56 <1> push si 11412 0000C36C F3A6 <1> repe cmpsb 11413 0000C36E 5E <1> pop si 11414 0000C36F 59 <1> pop cx 11415 0000C370 7479 <1> je .dontenter 11416 <1> @@: 11417 0000C372 89C7 <1> mov di, ax 11418 0000C374 268B15 <1> mov dx, [es:di] 11419 0000C377 01DA <1> add dx, bx ; -> free space 11420 0000C379 F7DA <1> neg dx ; - free space start 11421 0000C37B 7502 <1> jnz @F 11422 0000C37D 4A <1> dec dx 11423 0000C37E 47 <1> inc di 11424 <1> @@: 11425 0000C37F 01FA <1> add dx, di ; free space end - free space start 11426 0000C381 730C <1> jnc .delete 11427 0000C383 740A <1> je .delete 11428 0000C385 4A <1> dec dx 11429 0000C386 7407 <1> jz .delete 11430 0000C388 4A <1> dec dx 11431 0000C389 7404 <1> jz .delete 11432 0000C38B 39D1 <1> cmp cx, dx 11433 0000C38D 7646 <1> jbe .insert 11434 <1> .delete: 11435 0000C38F 3B06[FC0A] <1> cmp ax, word [history.first] 11436 0000C393 7508 <1> jne @F 11437 <1> 11438 <1> .error: 11439 0000C395 BA[6567] <1> mov dx, msg.history_internal_error 11440 0000C398 E855FA <1> call putsz 11441 0000C39B EB4E <1> jmp .dontenter 11442 <1> 11443 <1> @@: 11444 0000C39D 89C7 <1> mov di, ax 11445 0000C39F 268B3D <1> mov di, [es:di] ; + bx -> after last 11446 0000C3A2 8B36[FC0A] <1> mov si, word [history.first] 11447 0000C3A6 268B74FE <1> mov si, [es:si - 2] ; + bx -> at second 11448 0000C3AA 29F7 <1> sub di, si ; = after last - after first 11449 <1> ; = length excluding first 11450 0000C3AC 89F9 <1> mov cx, di ; length to move 11451 0000C3AE 56 <1> push si 11452 0000C3AF 01DE <1> add si, bx ; -> after first 11453 0000C3B1 89DF <1> mov di, bx ; -> start of buffer 11454 0000C3B3 06 <1> push es 11455 0000C3B4 1F <1> pop ds 11456 0000C3B5 F3A4 <1> rep movsb ; move stuff 11457 0000C3B7 59 <1> pop cx ; = how far we moved 11458 0000C3B8 89C7 <1> mov di, ax 11459 0000C3BA 8B15 <1> mov dx, word [di] 11460 <1> @@: 11461 0000C3BC 47 <1> inc di 11462 0000C3BD 47 <1> inc di 11463 0000C3BE 363B3E[FC0A] <1> cmp di, word [ss:history.first] 11464 0000C3C3 7406 <1> je @F 11465 0000C3C5 29CA <1> sub dx, cx 11466 0000C3C7 8715 <1> xchg word [di], dx 11467 0000C3C9 EBF1 <1> jmp @B 11468 <1> 11469 <1> @@: 11470 0000C3CB 16 <1> push ss 11471 0000C3CC 1F <1> pop ds 11472 0000C3CD 8306[FE0A]02 <1> add word [history.last], 2 11473 0000C3D2 E966FF <1> jmp .loop 11474 <1> 11475 <1> .insert: 11476 0000C3D5 48 <1> dec ax 11477 0000C3D6 48 <1> dec ax 11478 0000C3D7 A3[FE0A] <1> mov word [history.last], ax 11479 0000C3DA 89C7 <1> mov di, ax 11480 0000C3DC 57 <1> push di 11481 0000C3DD 268B7D02 <1> mov di, word [es:di + 2] 11482 0000C3E1 01DF <1> add di, bx 11483 0000C3E3 F3A4 <1> rep movsb 11484 0000C3E5 5E <1> pop si 11485 0000C3E6 29DF <1> sub di, bx 11486 0000C3E8 26893C <1> mov word [es:si], di 11487 <1> 11488 <1> .dontenter: 11489 0000C3EB 16 <1> push ss 11490 0000C3EC 07 <1> pop es 11491 <1> %endif 11492 <1> 11493 <1> getline_eol: 11494 0000C3ED F606[A500]08 <1> testopt [internalflags3], dif3_quiet_input_single 11495 0000C3F2 750A <1> jnz @F 11496 0000C3F4 B00D <1> mov al, 13 11497 0000C3F6 E81AFA <1> call putc ; fix ZDOS Int21.0A display bug 11498 0000C3F9 B00A <1> mov al, 10 11499 0000C3FB E815FA <1> call putc 11500 <1> @@: 11501 0000C3FE BE[0200] <1> mov si, line_in+2 11502 0000C401 E98BF5 <1> jmp skipwhite ; NC 11503 <1> 11504 <1> 11505 <1> %if _PM 11506 <1> getline_extra_uninstall: 11507 0000C404 BA[FF80] <1> mov dx, debug22 11508 0000C407 B82225 <1> mov ax, 2522h 11509 0000C40A CD21 <1> int 21h 11510 0000C40C 89160A00 <1> mov word [TPIV], dx ; restore default int 22h (PRI) 11511 0000C410 BE[D095] <1> mov si, getline_extra_int23 11512 0000C413 B023 <1> mov al, 23h 11513 0000C415 BAFFFF <1> mov dx, -1 11514 0000C418 E8A70E <1> call UnhookInterruptForce 11515 <1> ; restore DPMI host's int 23h handler 11516 0000C41B E98D74 <1> jmp resetmode ; return to PM 11517 <1> 11518 <1> usesection lDEBUG_DATA_ENTRY 11519 <1> 11520 000095CF CBEB10000000004B42- <1> iispentry getline_extra_int23 11520 000095D8 00EBF400 <1> 11521 000095E2 F9 <1> stc 11522 000095E3 CB <1> retf ; indicate to abort syscall and process 11523 <1> 11524 <1> align 2 11525 <1> getline_extra_int22: 11526 000095E4 FA <1> cli 11527 <1> .cleartraceflag: 11528 000095E5 FC <1> cld ; reestablish things 11529 000095E6 8CC8 <1> mov ax, cs 11530 000095E8 8ED8 <1> mov ds, ax 11531 000095EA 8ED0 <1> mov ss, ax 11532 000095EC 8B26[940A] <1> mov sp, word [ savesp ] ; restore stack 11533 000095F0 90 <1> times 1 - (($ - $$) & 1) nop ; align in-code parameter 11534 000095F1 E8EBEA <1> call entry_to_code_seg 11535 000095F4 [1EC4] <1> dw .code 11536 <1> 11537 <1> usesection lDEBUG_CODE 11538 <1> 11539 <1> .code: 11540 <1> 11541 0000C41E 66 <1> _386_o32 ; mov esp 11542 0000C41F 8B26[940A] <1> mov sp, word [ savesp ] ; restore stack 11543 0000C423 83E4FC <1> _386 and sp, ~3 ; align stack 11544 0000C426 66 <1> _386_o32 11545 0000C427 31C0 <1> xor ax, ax 11546 0000C429 66 <1> _386_o32 11547 0000C42A 50 <1> push ax 11548 0000C42B 66 <1> _386_o32 11549 0000C42C 9D <1> popf 11550 0000C42D 8B26[940A] <1> _386 mov sp, word [ savesp ] ; restore stack 11551 0000C431 FC <1> cld 11552 0000C432 FB <1> sti 11553 <1> 11554 0000C433 E8CEFF <1> call getline_extra_uninstall 11555 <1> ; undo patches and return to PM 11556 0000C436 E9157C <1> jmp handle_ctrl_c ; go to common handler --> 11557 <1> %endif 11558 <1> 11559 <1> 11560 <1> getline_is_input_file?: 11561 0000C439 F606[A400]20 <1> testopt [internalflags3], dif3_input_serial_override 11562 0000C43E 7530 <1> jnz .nofile 11563 0000C440 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11564 0000C445 7528 <1> jnz .file 11565 0000C447 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11566 0000C44C 7521 <1> jnz .file 11567 <1> %if _INPUT_FILE_BOOT 11568 0000C44E F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 11569 0000C453 751A <1> jnz .file 11570 <1> %endif 11571 0000C455 E886E2 <1> call InDos 11572 0000C458 7516 <1> jnz .nofile ; InDOS, not reading from a file --> 11573 <1> %if _INPUT_FILE_HANDLES 11574 0000C45A F606[A200]10 <1> testopt [internalflags2], dif2_input_file 11575 0000C45F 750E <1> jnz .file 11576 <1> %endif 11577 0000C461 F606[7D00]40 <1> testopt [options], enable_serial 11578 0000C466 7508 <1> jnz .nofile 11579 0000C468 803E[E70A]00 <1> cmp byte [notatty], 0 ; check this weird flag 11580 0000C46D 7401 <1> je .nofile ; not reading from a file --> 11581 <1> 11582 <1> .file: 11583 0000C46F A8 <1> db __TEST_IMM8 ; (skip stc, NC) 11584 <1> .nofile: 11585 0000C470 F9 <1> stc 11586 0000C471 C3 <1> retn 11587 <1> 11588 <1> 11589 <1> getline_close_file: 11590 0000C472 51 <1> push cx 11591 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT || 1 11592 <1> ; EOF reached. if not input file, quit. else, close input file. 11593 0000C473 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 11594 0000C478 7515 <1> jnz .re 11595 <1> %if _INPUT_FILE_HANDLES && _INPUT_FILE_BOOT 11596 0000C47A F706[A200]1002 <1> testopt [internalflags2], dif2_input_file | dif2_input_file_boot, 1 11597 0000C480 750A <1> jnz @F 11598 <1> %elif _INPUT_FILE_HANDLES 11599 <1> testopt [internalflags2], dif2_input_file 11600 <1> jnz @F 11601 <1> %elif _INPUT_FILE_BOOT 11602 <1> testopt [internalflags2], dif2_input_file_boot 11603 <1> jnz @F 11604 <1> %endif 11605 0000C482 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 11606 0000C487 7503E926D5 <1> jz qq ; if EOF, quit --> 11607 <1> 11608 <1> @@: 11609 0000C48C 31C9 <1> xor cx, cx 11610 0000C48E A9 <1> db __TEST_IMM16 11611 <1> .re: 11612 0000C48F B1FF <1> mov cl, -1 11613 <1> 11614 0000C491 51 <1> push cx 11615 0000C492 E82B00 <1> call .resetstuff 11616 0000C495 59 <1> pop cx 11617 <1> 11618 0000C496 E302 <1> jcxz .notre 11619 0000C498 EB15 <1> jmp @F 11620 <1> 11621 <1> .notre: 11622 0000C49A 59 <1> pop cx 11623 0000C49B F606[A500]04 <1> testopt [internalflags3], dif3_at_line_end 11624 0000C4A0 750C <1> jnz .return ; (NZ) 11625 <1> 11626 0000C4A2 B80D0A <1> mov ax, 13 | 10 << 8 ; pretend we read a CR LF sequence 11627 0000C4A5 AB <1> stosw 11628 0000C4A6 893E[EE0A] <1> mov word [bufend], di 11629 0000C4AA 4F <1> dec di 11630 0000C4AB 4F <1> dec di 11631 0000C4AC 38C0 <1> cmp al, al ; ZR 11632 <1> .return: 11633 0000C4AE C3 <1> retn 11634 <1> 11635 <1> @@: 11636 0000C4AF 59 <1> pop cx 11637 0000C4B0 F606[A500]04 <1> testopt [internalflags3], dif3_at_line_end 11638 0000C4B5 7506 <1> jnz @F 11639 0000C4B7 BA[A366] <1> mov dx, msg.unexpected_noneol_re 11640 0000C4BA E82DF9 <1> call putsz_error 11641 <1> @@: 11642 0000C4BD E99762 <1> jmp dumpregs_extended.exit 11643 <1> %else 11644 <1> jmp qq ; if EOF, quit --> 11645 <1> %endif 11646 <1> 11647 <1> .resetstuff: 11648 0000C4C0 57 <1> push di 11649 0000C4C1 E8BEFA <1> call yy_close_file ; close file 11650 0000C4C4 5F <1> pop di 11651 <1> 11652 <1> %if _NEWFULLHANDLING 11653 0000C4C5 C706[EC0A][0300] <1> mov word [bufnext], line_in + 3 11654 0000C4CB C706[EE0A][0300] <1> mov word [bufend], line_in + 3 11655 <1> %else 11656 <1> mov word [bufnext], line_in + 2 11657 <1> mov word [bufend], line_in + 2 11658 <1> %endif 11659 <1> 11660 0000C4D1 E8F403 <1> call getline_reset_notatty 11661 <1> 11662 0000C4D4 E9E23F <1> jmp determine_quiet_output 11663 <1> 11664 <1> 11665 <1> rawinput: 11666 <1> lframe 11667 <1> lequ 254, limit 11668 <1> lvar word, columns 11669 <1> lvar word, maxpercol 11670 <1> lvar word, maxpercolhalf 11671 0000C4D7 5589E58D66FA <1> lenter 11672 0000C4DD 06 <1> push es 11673 0000C4DE 52 <1> push dx 11674 <1> lvar dword, prompt ; (in line_out buffer) 11675 0000C4DF 31C0 <1> xor ax, ax 11676 <1> %if _HISTORY 11677 0000C4E1 50 <1> push ax 11678 <1> lvar word, historyentry 11679 <1> %endif 11680 0000C4E2 50 <1> push ax 11681 <1> lvar word, length_displayed 11682 0000C4E3 50 <1> push ax 11683 <1> lvar word, length_input 11684 0000C4E4 50 <1> push ax 11685 <1> lvar word, offset 11686 0000C4E5 50 <1> push ax 11687 <1> lvar word, lastskip 11688 0000C4E6 50 <1> push ax 11689 <1> lvar word, low_redraw_and_high_beep 11690 <1> lequ ?low_redraw_and_high_beep, redraw 11691 <1> lequ ?low_redraw_and_high_beep + 1, beep 11692 0000C4E7 50 <1> push ax 11693 <1> lvar word, edited 11694 0000C4E8 51 <1> push cx 11695 <1> lvar word, column 11696 0000C4E9 51 <1> push cx 11697 <1> lvar word, promptlength 11698 <1> 11699 0000C4EA 57 <1> push di 11700 0000C4EB 1E <1> push ds 11701 0000C4EC 07 <1> pop es 11702 <1> 11703 0000C4ED BF[0200] <1> mov di, line_in+2 11704 <1> .next: 11705 0000C4F0 E8E47A <1> call handle_serial_flags_ctrl_c 11706 <1> 11707 0000C4F3 807EEA00 <1> cmp byte [bp + ?redraw], 0 11708 0000C4F7 7503E9AF00 <1> je .no_do_redraw 11709 <1> .do_redraw: 11710 <1> 11711 0000C4FC E89903 <1> call get_columns 11712 <1> 11713 0000C4FF 8946FE <1> mov word [bp + ?columns], ax 11714 0000C502 48 <1> dec ax ; $COLS - 1 11715 0000C503 2B46E4 <1> sub ax, word [bp + ?promptlength]; - $promptlength 11716 0000C506 8946FC <1> mov word [bp + ?maxpercol], ax 11717 0000C509 D1E8 <1> shr ax, 1 ; int($maxpercol / 2) 11718 0000C50B 8946FA <1> mov word [bp + ?maxpercolhalf], ax 11719 <1> 11720 0000C50E B00D <1> mov al, 13 11721 0000C510 E800F9 <1> call putc 11722 <1> 11723 0000C513 C456F6 <1> les dx, [bp + ?prompt] 11724 0000C516 8B4EE4 <1> mov cx, [bp + ?promptlength] 11725 0000C519 E861F5 <1> call puts 11726 0000C51C 8B46F0 <1> mov ax, [bp + ?length_input] 11727 0000C51F 89C1 <1> mov cx, ax 11728 0000C521 31FF <1> xor di, di ; skip 11729 <1> ; + line_in + 2 -> to display 11730 0000C523 3B46FC <1> cmp ax, word [bp + ?maxpercol] 11731 0000C526 8B46E6 <1> mov ax, word [bp + ?column] ; col 11732 0000C529 7626 <1> jna .not_show_a_maxpercol 11733 <1> .show_a_maxpercol: 11734 0000C52B 8B5EEC <1> mov bx, word [bp + ?lastskip] 11735 0000C52E 395EEE <1> cmp word [bp + ?offset], bx 11736 0000C531 7206 <1> jnae .not_offset_ae_lastskip 11737 <1> .offset_ae_lastskip: 11738 0000C533 29D8 <1> sub ax, bx ; col -= lastskip 11739 0000C535 01DF <1> add di, bx ; skip += lastskip 11740 0000C537 29D9 <1> sub cx, bx ; lessen length of part to display 11741 <1> .not_offset_ae_lastskip: 11742 <1> 11743 <1> @@: 11744 0000C539 3B46FC <1> cmp ax, word [bp + ?maxpercol] 11745 0000C53C 760B <1> jna .not_col_a_maxpercol 11746 <1> .col_a_maxpercol: 11747 0000C53E 2B46FA <1> sub ax, word [bp + ?maxpercolhalf] 11748 <1> ; lessen col 11749 0000C541 037EFA <1> add di, word [bp + ?maxpercolhalf] 11750 <1> ; heighten offset of part to display 11751 0000C544 2B4EFA <1> sub cx, word [bp + ?maxpercolhalf] 11752 <1> ; lessen length of part to display 11753 0000C547 EBF0 <1> jmp @B 11754 <1> 11755 <1> .not_col_a_maxpercol: 11756 0000C549 3B4EFC <1> cmp cx, word [bp + ?maxpercol] 11757 0000C54C 7603 <1> jbe @F 11758 0000C54E 8B4EFC <1> mov cx, word [bp + ?maxpercol] 11759 <1> @@: 11760 <1> .not_show_a_maxpercol: 11761 0000C551 897EEC <1> mov word [bp + ?lastskip], di 11762 0000C554 8D95[0200] <1> lea dx, [di + line_in + 2] 11763 0000C558 16 <1> push ss 11764 0000C559 07 <1> pop es 11765 <1> 11766 0000C55A FF76F2 <1> push word [bp + ?length_displayed] 11767 0000C55D 894EF2 <1> mov word [bp + ?length_displayed], cx 11768 0000C560 50 <1> push ax 11769 0000C561 51 <1> push cx 11770 0000C562 52 <1> push dx 11771 0000C563 E817F5 <1> call puts ; redraw 11772 0000C566 5A <1> pop dx 11773 0000C567 59 <1> pop cx 11774 0000C568 58 <1> pop ax 11775 0000C569 5B <1> pop bx 11776 <1> 11777 0000C56A 87D9 <1> xchg bx, cx ; cx = prior length displayed, 11778 <1> ; bx = new length displayed 11779 0000C56C 29D9 <1> sub cx, bx ; = how many blanks needed to overwrite 11780 0000C56E 760B <1> jbe @FF 11781 0000C570 01CB <1> add bx, cx ; = length displayed 11782 0000C572 50 <1> push ax 11783 0000C573 B020 <1> mov al, 32 11784 <1> @@: 11785 0000C575 E89BF8 <1> call putc 11786 0000C578 E2FB <1> loop @B 11787 0000C57A 58 <1> pop ax 11788 <1> @@: 11789 <1> 11790 0000C57B 52 <1> push dx 11791 0000C57C 01DA <1> add dx, bx 11792 0000C57E 81EA[0200] <1> sub dx, line_in + 2 ; offset into line (with length displayed) 11793 0000C582 0356E4 <1> add dx, word [bp + ?promptlength]; offset into display 11794 0000C585 3B56E6 <1> cmp dx, word [bp + ?column] ; same as column ? 11795 0000C588 5A <1> pop dx 11796 0000C589 741C <1> je .do_redraw_done ; yes, skip cursor movement stuff --> 11797 <1> 11798 0000C58B 50 <1> push ax 11799 0000C58C 52 <1> push dx 11800 0000C58D B00D <1> mov al, 13 11801 0000C58F E881F8 <1> call putc ; reset cursor 11802 0000C592 C456F6 <1> les dx, [bp + ?prompt] 11803 0000C595 8B4EE4 <1> mov cx, [bp + ?promptlength] 11804 0000C598 E8E2F4 <1> call puts ; redraw prompt 11805 0000C59B 16 <1> push ss 11806 0000C59C 07 <1> pop es 11807 0000C59D 5A <1> pop dx ; -> current input text 11808 0000C59E 58 <1> pop ax ; = col 11809 0000C59F 2B46E4 <1> sub ax, word [bp + ?promptlength] 11810 <1> ; = offset into input text 11811 0000C5A2 89C1 <1> mov cx, ax ; draw that much 11812 0000C5A4 E8D6F4 <1> call puts ; draw (to move cursor) 11813 <1> 11814 <1> .do_redraw_done: 11815 0000C5A7 C646EA00 <1> mov byte [bp + ?redraw], 0 11816 <1> 11817 <1> .no_do_redraw: 11818 <1> 11819 0000C5AB 807EEB00 <1> cmp byte [bp + ?beep], 0 11820 0000C5AF 7409 <1> je .no_do_beep 11821 <1> .do_beep: 11822 0000C5B1 B007 <1> mov al, 7 11823 0000C5B3 E85DF8 <1> call putc 11824 <1> 11825 0000C5B6 C646EB00 <1> mov byte [bp + ?beep], 0 11826 <1> .no_do_beep: 11827 <1> 11828 0000C5BA E898F8 <1> call getc 11829 <1> 11830 <1> ; check scancode for int 16h in non-dumb dosemu first 11831 0000C5BD 86C4 <1> xchg al, ah 11832 0000C5BF 3C48 <1> cmp al, 48h 11833 0000C5C1 7503E9F901 <1> je .up 11834 0000C5C6 3C4B <1> cmp al, 4Bh 11835 0000C5C8 7503E9CA01 <1> je .left 11836 0000C5CD 3C50 <1> cmp al, 50h 11837 0000C5CF 7503E90702 <1> je .down 11838 0000C5D4 3C4D <1> cmp al, 4Dh 11839 0000C5D6 7503E9CF01 <1> je .right 11840 0000C5DB 3C52 <1> cmp al, 52h 11841 0000C5DD 7503E95502 <1> je .insert 11842 0000C5E2 3C53 <1> cmp al, 53h 11843 0000C5E4 7503E96101 <1> je .del 11844 0000C5E9 3C47 <1> cmp al, 47h 11845 0000C5EB 7503E98301 <1> je .home 11846 0000C5F0 3C4F <1> cmp al, 4Fh 11847 0000C5F2 7503E98D01 <1> je .end 11848 0000C5F7 3C49 <1> cmp al, 49h 11849 0000C5F9 7503E93902 <1> je .pageup 11850 0000C5FE 3C51 <1> cmp al, 51h 11851 0000C600 7503E93202 <1> je .pagedown 11852 <1> 11853 <1> ; not a special scancode, check character returned 11854 0000C605 86C4 <1> xchg al, ah 11855 0000C607 3C1B <1> cmp al, 1Bh 11856 0000C609 7403E98B00 <1> jne .not_esc 11857 <1> 11858 <1> ; check escape opcodes for int 16h in -dumb dosemu 11859 <1> ; or input from serial I/O (picocom/screen/ssh/mate-terminal) 11860 <1> .esc: 11861 0000C60E E844F8 <1> call getc 11862 0000C611 3C5B <1> cmp al, '[' 11863 0000C613 7403E91F02 <1> jne .beep 11864 0000C618 E83AF8 <1> call getc 11865 0000C61B 3C41 <1> cmp al, 41h 11866 0000C61D 7503E99D01 <1> je .up 11867 0000C622 3C44 <1> cmp al, 44h 11868 0000C624 7503E96E01 <1> je .left 11869 0000C629 3C42 <1> cmp al, 42h 11870 0000C62B 7503E9AB01 <1> je .down 11871 0000C630 3C43 <1> cmp al, 43h 11872 0000C632 7503E97301 <1> je .right 11873 0000C637 3C32 <1> cmp al, 32h 11874 0000C639 7425 <1> je .check_insert 11875 0000C63B 3C33 <1> cmp al, 33h 11876 0000C63D 7421 <1> je .check_del 11877 0000C63F 3C31 <1> cmp al, 31h 11878 0000C641 741D <1> je .check_home 11879 0000C643 3C34 <1> cmp al, 34h 11880 0000C645 7419 <1> je .check_end 11881 0000C647 3C48 <1> cmp al, 48h 11882 0000C649 7503E92501 <1> je .home 11883 0000C64E 3C46 <1> cmp al, 46h 11884 0000C650 7503E92F01 <1> je .end 11885 0000C655 3C35 <1> cmp al, 35h 11886 0000C657 7407 <1> je .check_pageup 11887 0000C659 3C36 <1> cmp al, 36h 11888 0000C65B 7403 <1> je .check_pagedown 11889 0000C65D E9D701 <1> jmp .beep 11890 <1> 11891 <1> 11892 <1> .check_insert: 11893 <1> .check_del: 11894 <1> .check_home: 11895 <1> .check_end: 11896 <1> .check_pageup: 11897 <1> .check_pagedown: 11898 0000C660 50 <1> push ax 11899 0000C661 E8F1F7 <1> call getc 11900 0000C664 3C7E <1> cmp al, 7Eh 11901 0000C666 58 <1> pop ax 11902 0000C667 7403E9CB01 <1> jne .beep 11903 <1> 11904 0000C66C 3C32 <1> cmp al, 32h 11905 0000C66E 7503E9C401 <1> je .insert 11906 0000C673 3C33 <1> cmp al, 33h 11907 0000C675 7503E9D000 <1> je .del 11908 0000C67A 3C31 <1> cmp al, 31h 11909 0000C67C 7503E9F200 <1> je .home 11910 0000C681 3C34 <1> cmp al, 34h 11911 0000C683 7503E9FC00 <1> je .end 11912 0000C688 3C35 <1> cmp al, 35h 11913 0000C68A 7503E9A801 <1> je .pageup 11914 0000C68F 3C36 <1> cmp al, 36h 11915 0000C691 7503E9A101 <1> je .pagedown 11916 <1> 11917 0000C696 E99E01 <1> jmp .beep 11918 <1> 11919 <1> 11920 <1> .not_esc: 11921 <1> ; check regular characters 11922 0000C699 84C0 <1> test al, al ; waste? 11923 0000C69B 7503E950FE <1> je .next 11924 0000C6A0 3CE0 <1> cmp al, 0E0h 11925 0000C6A2 7503E949FE <1> je .next ; waste --> 11926 <1> 11927 0000C6A7 3C03 <1> cmp al, 03h 11928 0000C6A9 7503E99001 <1> je .ctrlc 11929 0000C6AE 3C09 <1> cmp al, 09h 11930 0000C6B0 7503E98201 <1> je .beep ; tab 11931 0000C6B5 3C08 <1> cmp al, 08h 11932 0000C6B7 745D <1> je .backspace 11933 0000C6B9 3C7F <1> cmp al, 7Fh 11934 <1> ; On the server in int 16h of -dumb dosemu, as well as on 11935 <1> ; both systems across serial I/O this code is used. 11936 0000C6BB 7459 <1> je .backspace 11937 0000C6BD 3C0A <1> cmp al, 10 ; (allow Linux style linebreak) 11938 0000C6BF 7503E97D01 <1> je .done 11939 0000C6C4 3C0D <1> cmp al, 13 ; (match for CR keypress) 11940 0000C6C6 7503E97601 <1> je .done 11941 <1> 11942 <1> .textcodepoint: 11943 0000C6CB 8B5EF0 <1> mov bx, word [bp + ?length_input] 11944 0000C6CE 81FBFE00 <1> cmp bx, ?limit 11945 0000C6D2 720B <1> jb @F 11946 0000C6D4 C646EA01 <1> mov byte [bp + ?redraw], 1 11947 0000C6D8 C646EB01 <1> mov byte [bp + ?beep], 1 11948 0000C6DC E911FE <1> jmp .next 11949 <1> @@: 11950 <1> 11951 0000C6DF C646E801 <1> mov byte [bp + ?edited], 1 11952 0000C6E3 8B56F0 <1> mov dx, word [bp + ?length_input] 11953 0000C6E6 89D1 <1> mov cx, dx 11954 0000C6E8 89D7 <1> mov di, dx 11955 0000C6EA 16 <1> push ss 11956 0000C6EB 07 <1> pop es 11957 0000C6EC 81C7[0200] <1> add di, line_in + 2 ; di -> behind end of input 11958 0000C6F0 89FE <1> mov si, di 11959 0000C6F2 4E <1> dec si ; si -> at last entry of input 11960 0000C6F3 2B4EEE <1> sub cx, word [bp + ?offset] 11961 0000C6F6 FD <1> std ; AMD erratum 109 workaround done 11962 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 11963 <1> %if _AMD_ERRATUM_109_WORKAROUND 11964 0000C6F7 E308 <1> jcxz @FF 11965 0000C6F9 83F914 <1> cmp cx, 20 11966 0000C6FC 7703 <1> ja @FF 11967 <1> @@: 11968 0000C6FE A4 <1> movsb 11969 0000C6FF E2FD <1> loop @B 11970 <1> @@: 11971 <1> %endif 11972 0000C701 F3A4 <1> rep movsb 11973 0000C703 FC <1> cld 11974 0000C704 8805 <1> mov byte [di], al 11975 0000C706 FF46E6 <1> inc word [bp + ?column] 11976 0000C709 FF46EE <1> inc word [bp + ?offset] 11977 0000C70C FF46F0 <1> inc word [bp + ?length_input] 11978 0000C70F C646EA01 <1> mov byte [bp + ?redraw], 1 11979 0000C713 E9DAFD <1> jmp .next 11980 <1> 11981 <1> .backspace: 11982 0000C716 837EEE00 <1> cmp word [bp + ?offset], 0 11983 0000C71A 7427 <1> je .backspace_offset_0 11984 <1> 11985 0000C71C C646E801 <1> mov byte [bp + ?edited], 1 11986 0000C720 16 <1> push ss 11987 0000C721 07 <1> pop es 11988 0000C722 8B7EEE <1> mov di, word [bp + ?offset] 11989 0000C725 8B4EF0 <1> mov cx, word [bp + ?length_input] 11990 0000C728 29F9 <1> sub cx, di ; length after offset 11991 0000C72A 81C7[0200] <1> add di, line_in + 2 ; -> at offset in line 11992 0000C72E 89FE <1> mov si, di ; -> at offset in line 11993 0000C730 4F <1> dec di ; -> at offset - 1 in line 11994 0000C731 F3A4 <1> rep movsb ; move down additional content 11995 0000C733 FF4EE6 <1> dec word [bp + ?column] 11996 0000C736 FF4EEE <1> dec word [bp + ?offset] 11997 0000C739 FF4EF0 <1> dec word [bp + ?length_input] 11998 0000C73C C646EA01 <1> mov byte [bp + ?redraw], 1 11999 0000C740 E9ADFD <1> jmp .next 12000 <1> 12001 <1> .backspace_offset_0: 12002 <1> .del_offset_ae_length_input: 12003 <1> .left_offset_0: 12004 <1> .right_offset_too_high: 12005 0000C743 C646EB01 <1> mov byte [bp + ?beep], 1 12006 0000C747 E9A6FD <1> jmp .next 12007 <1> 12008 <1> .del: 12009 0000C74A 8B46EE <1> mov ax, word [bp + ?offset] 12010 0000C74D 3B46F0 <1> cmp ax, word [bp + ?length_input] 12011 0000C750 73F1 <1> jae .del_offset_ae_length_input 12012 0000C752 C646E801 <1> mov byte [bp + ?edited], 1 12013 0000C756 89C7 <1> mov di, ax 12014 0000C758 81C7[0200] <1> add di, line_in + 2 ; -> at current offset 12015 0000C75C 89FE <1> mov si, di 12016 0000C75E 46 <1> inc si ; -> after current offset 12017 0000C75F 40 <1> inc ax ; offset + 1 12018 0000C760 F7D8 <1> neg ax ; - (offset + 1) 12019 0000C762 0346F0 <1> add ax, word [bp + ?length_input]; length input - (offset + 1) 12020 0000C765 89C1 <1> mov cx, ax 12021 0000C767 F3A4 <1> rep movsb ; move down part after deleted point 12022 0000C769 FF4EF0 <1> dec word [bp + ?length_input] 12023 0000C76C C646EA01 <1> mov byte [bp + ?redraw], 1 12024 0000C770 E97DFD <1> jmp .next 12025 <1> 12026 <1> .home: 12027 0000C773 8366EE00 <1> and word [bp + ?offset], 0 12028 0000C777 FF76E4 <1> push word [bp + ?promptlength] 12029 0000C77A 8F46E6 <1> pop word [bp + ?column] 12030 0000C77D C646EA01 <1> mov byte [bp + ?redraw], 1 12031 0000C781 E96CFD <1> jmp .next 12032 <1> 12033 <1> .end: 12034 0000C784 8B46F0 <1> mov ax, word [bp + ?length_input] 12035 0000C787 8946EE <1> mov word [bp + ?offset], ax 12036 0000C78A 0346E4 <1> add ax, word [bp + ?promptlength] 12037 0000C78D 8946E6 <1> mov word [bp + ?column], ax 12038 0000C790 C646EA01 <1> mov byte [bp + ?redraw], 1 12039 0000C794 E959FD <1> jmp .next 12040 <1> 12041 <1> .left: 12042 0000C797 837EEE00 <1> cmp word [bp + ?offset], 0 12043 0000C79B 74A6 <1> je .left_offset_0 12044 0000C79D FF4EEE <1> dec word [bp + ?offset] 12045 0000C7A0 FF4EE6 <1> dec word [bp + ?column] 12046 0000C7A3 C646EA01 <1> mov byte [bp + ?redraw], 1 12047 0000C7A7 E946FD <1> jmp .next 12048 <1> 12049 <1> .right: 12050 0000C7AA 8B46EE <1> mov ax, word [bp + ?offset] 12051 0000C7AD 3B46F0 <1> cmp ax, word [bp + ?length_input] 12052 0000C7B0 7391 <1> jnb .right_offset_too_high 12053 0000C7B2 FF46EE <1> inc word [bp + ?offset] 12054 0000C7B5 FF46E6 <1> inc word [bp + ?column] 12055 0000C7B8 C646EA01 <1> mov byte [bp + ?redraw], 1 12056 0000C7BC E931FD <1> jmp .next 12057 <1> 12058 <1> .up: 12059 0000C7BF 807EE800 <1> cmp byte [bp + ?edited], 0 12060 0000C7C3 7572 <1> jne .beep 12061 <1> %if _HISTORY 12062 0000C7C5 8B76F4 <1> mov si, word [bp + ?historyentry] 12063 0000C7C8 85F6 <1> test si, si 12064 0000C7CA 8D7402 <1> lea si, [si + 2] 12065 0000C7CD 7504 <1> jnz @F 12066 0000C7CF 8B36[FE0A] <1> mov si, word [history.last] 12067 <1> @@: 12068 0000C7D3 3B36[FC0A] <1> cmp si, word [history.first] 12069 0000C7D7 745E <1> je .beep 12070 0000C7D9 EB1B <1> jmp .copyline 12071 <1> 12072 <1> .down: 12073 0000C7DB 807EE800 <1> cmp byte [bp + ?edited], 0 12074 0000C7DF 7556 <1> jne .beep 12075 0000C7E1 8B76F4 <1> mov si, word [bp + ?historyentry] 12076 0000C7E4 85F6 <1> test si, si 12077 0000C7E6 744F <1> jz .beep 12078 0000C7E8 3B36[FE0A] <1> cmp si, word [history.last] 12079 0000C7EC 7506 <1> jne @F 12080 0000C7EE 31C0 <1> xor ax, ax 12081 0000C7F0 31C9 <1> xor cx, cx 12082 0000C7F2 EB10 <1> jmp .setline 12083 <1> 12084 <1> @@: 12085 0000C7F4 4E <1> dec si 12086 0000C7F5 4E <1> dec si 12087 <1> 12088 <1> .copyline: 12089 0000C7F6 89F0 <1> mov ax, si 12090 <1> gethistorysegment ds 298 0000C7F8 368E1E[F60A] <2> mov %1, word [ss:history.segorsel] 12091 0000C7FD 8B0C <1> mov cx, [si] 12092 0000C7FF 8B7402 <1> mov si, [si + 2] 12093 0000C802 29F1 <1> sub cx, si 12094 <1> 12095 <1> .setline: 12096 0000C804 8946F4 <1> mov word [bp + ?historyentry], ax 12097 <1> gethistoryoffset bx 301 0000C807 BB0000 <2> mov %1, 0 12098 0000C80A 8D30 <1> lea si, [si + bx] 12099 0000C80C 16 <1> push ss 12100 0000C80D 07 <1> pop es 12101 0000C80E BF[0100] <1> mov di, line_in + 1 12102 0000C811 88C8 <1> mov al, cl 12103 0000C813 AA <1> stosb 12104 0000C814 F3A4 <1> rep movsb 12105 0000C816 B00D <1> mov al, 13 12106 0000C818 AA <1> stosb 12107 0000C819 16 <1> push ss 12108 0000C81A 1F <1> pop ds 12109 <1> %else 12110 <1> .down: equ .beep 12111 <1> 12112 <1> mov byte [bp + ?edited], 1 12113 <1> %endif 12114 0000C81B 31C0 <1> xor ax, ax 12115 0000C81D A0[0100] <1> mov al, byte [line_in + 1] 12116 0000C820 8946EE <1> mov word [bp + ?offset], ax 12117 0000C823 8946F0 <1> mov word [bp + ?length_input], ax 12118 0000C826 0346E4 <1> add ax, word [bp + ?promptlength] 12119 0000C829 8946E6 <1> mov word [bp + ?column], ax 12120 0000C82C 8366EC00 <1> and word [bp + ?lastskip], 0 12121 0000C830 C646EA01 <1> mov byte [bp + ?redraw], 1 12122 0000C834 E9B9FC <1> jmp .next 12123 <1> 12124 <1> .insert: 12125 <1> .pageup: 12126 <1> .pagedown: 12127 <1> .beep: 12128 0000C837 C646EB01 <1> mov byte [bp + ?beep], 1 12129 0000C83B E9B2FC <1> jmp .next 12130 <1> 12131 <1> .ctrlc: 12132 0000C83E E90D78 <1> jmp handle_ctrl_c 12133 <1> 12134 <1> .done: 12135 0000C841 8B7EF0 <1> mov di, word [bp + ?length_input] 12136 <1> 12137 0000C844 8B56EC <1> mov dx, word [bp + ?lastskip] 12138 0000C847 0356F2 <1> add dx, word [bp + ?length_displayed] 12139 <1> ; offset into line (with length displayed) 12140 0000C84A 0356E4 <1> add dx, word [bp + ?promptlength]; offset into display 12141 0000C84D 3B56E6 <1> cmp dx, word [bp + ?column] ; same as column ? 12142 0000C850 750A <1> jne @F ; no, always redraw --> 12143 <1> 12144 0000C852 89F8 <1> mov ax, di 12145 0000C854 0346E4 <1> add ax, word [bp + ?promptlength] 12146 0000C857 3946FE <1> cmp word [bp + ?columns], ax 12147 0000C85A 7719 <1> ja .done_no_redraw 12148 <1> 12149 <1> @@: 12150 0000C85C B00D <1> mov al, 13 12151 0000C85E E8B2F5 <1> call putc ; reset cursor 12152 0000C861 C456F6 <1> les dx, [bp + ?prompt] 12153 0000C864 8B4EE4 <1> mov cx, [bp + ?promptlength] 12154 0000C867 E813F2 <1> call puts ; redraw prompt 12155 0000C86A 16 <1> push ss 12156 0000C86B 07 <1> pop es 12157 0000C86C BA[0200] <1> mov dx, line_in + 2 12158 0000C86F 8B4EF0 <1> mov cx, word [bp + ?length_input] 12159 0000C872 E808F2 <1> call puts ; draw 12160 <1> 12161 <1> .done_no_redraw: 12162 0000C875 81C7[0200] <1> add di, line_in + 2 12163 0000C879 B00D <1> mov al, 13 12164 0000C87B AA <1> stosb ; store the CR (there always is room) 12165 0000C87C 97 <1> xchg ax, di ; -> behind CR 12166 0000C87D 2C63 <1> sub al, ((-section.DATASTACK.vstart+100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size) +line_in+3) & 0FFh ; length of string, excluding CR 12169 <1> ; (This instruction disregards the unnecessary higher byte.) 12170 0000C87F 5F <1> pop di ; restore di 12171 0000C880 A2[0100] <1> mov byte [line_in+1], al ; store the length byte 12172 0000C883 89EC5D <1> lleave code 12173 0000C886 E9B2FA <1> jmp getline_eol_enter_history 12174 <1> 12175 <1> lleave ctx 12176 <1> 12177 <1> 12178 <1> fullbsout: 12179 0000C889 B008 <1> mov al, 8 12180 0000C88B E885F5 <1> call putc 12181 0000C88E B020 <1> mov al, 32 12182 0000C890 E880F5 <1> call putc 12183 0000C893 B008 <1> mov al, 8 12184 0000C895 E97BF5 <1> jmp putc 12185 <1> 12186 <1> 12187 <1> ; INP: - 12188 <1> ; OUT: ax = number of columns to use 12189 <1> ; STT: ds = ss = debugger data selector 12190 <1> get_columns: 12191 0000C898 31C0 <1> xor ax, ax 12192 0000C89A F606[7D00]40 <1> testopt [options], enable_serial ; serial ? 12193 0000C89F 7411 <1> jz @F ; no --> 12194 0000C8A1 0A06[E80B] <1> or al, byte [serial_columns] ; ax = number of columns if serial 12195 0000C8A5 7407 <1> jz .default_columns 12196 0000C8A7 3C01 <1> cmp al, 1 12197 0000C8A9 751C <1> jne @FF 12198 0000C8AB 48 <1> dec ax ; = 0 12199 0000C8AC EB04 <1> jmp @F ; use IOC / BDA selection 12200 <1> .default_columns: 12201 0000C8AE B050 <1> mov al, 80 12202 0000C8B0 EB15 <1> jmp @FF 12203 <1> @@: 12204 0000C8B2 0A06[F70B] <1> or al, [io_columns] 12205 0000C8B6 74F6 <1> jz .default_columns 12206 0000C8B8 3C01 <1> cmp al, 1 ; is 1 ? 12207 0000C8BA 750B <1> jne @F ; no, use as columns --> 12208 <1> ; yes, automatic (use BDA) 12209 0000C8BC 06 <1> push es 12210 0000C8BD B84000 <1> mov ax, 40h ; 0040h is a bimodal segment/selector 12211 0000C8C0 8EC0 <1> mov es, ax 12212 0000C8C2 26A14A00 <1> mov ax, word [ es:4Ah ] ; columns on screen 12213 0000C8C6 07 <1> pop es 12214 <1> @@: 12215 0000C8C7 C3 <1> retn 12216 <1> 12217 <1> 12218 <1> getline_reset_notatty: 12219 0000C8C8 F606[A700]02 <1> testopt [internalflags3], dif3_input_re_closed 12220 0000C8CD 7421 <1> jz @F 12221 0000C8CF 8026[A700]FD <1> clropt [internalflags3], dif3_input_re_closed 12222 0000C8D4 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12223 0000C8D9 7515 <1> jnz @F 12224 <1> %if _INPUT_FILE_HANDLES 12225 0000C8DB E800DE <1> call InDos 12226 0000C8DE 7507 <1> jnz .notfile1 12227 0000C8E0 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12228 0000C8E5 7509 <1> jnz @F 12229 <1> .notfile1: 12230 <1> %endif 12231 <1> %if _INPUT_FILE_BOOT 12232 0000C8E7 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12233 0000C8EC 7502 <1> jnz @F 12234 <1> %endif 12235 0000C8EE EB47 <1> jmp .clear_notatty 12236 <1> 12237 <1> @@: 12238 0000C8F0 F606[A500]02 <1> testopt [internalflags3], dif3_input_cmdline_closed 12239 0000C8F5 741A <1> jz @F 12240 0000C8F7 8026[A500]FD <1> clropt [internalflags3], dif3_input_cmdline_closed 12241 <1> %if _INPUT_FILE_HANDLES 12242 0000C8FC E8DFDD <1> call InDos 12243 0000C8FF 7507 <1> jnz .notfile2 12244 0000C901 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12245 0000C906 7509 <1> jnz @F 12246 <1> .notfile2: 12247 <1> %endif 12248 <1> %if _INPUT_FILE_BOOT 12249 0000C908 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12250 0000C90D 7502 <1> jnz @F 12251 <1> %endif 12252 0000C90F EB26 <1> jmp .clear_notatty 12253 <1> 12254 <1> @@: 12255 <1> %if _INPUT_FILE_BOOT 12256 0000C911 F606[A300]04 <1> testopt [internalflags2], dif2_closed_input_file_boot 12257 0000C916 7413 <1> jz @F 12258 0000C918 8026[A300]FB <1> clropt [internalflags2], dif2_closed_input_file_boot 12259 <1> %if _INPUT_FILE_HANDLES 12260 0000C91D E8BEDD <1> call InDos 12261 0000C920 7507 <1> jnz .notfile3 12262 0000C922 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12263 0000C927 7502 <1> jnz @F 12264 <1> .notfile3: 12265 <1> %endif 12266 0000C929 EB0C <1> jmp .clear_notatty 12267 <1> @@: 12268 <1> %endif 12269 <1> %if _INPUT_FILE_HANDLES 12270 0000C92B F606[A200]20 <1> testopt [internalflags2], dif2_closed_input_file 12271 0000C930 7411 <1> jz @F 12272 0000C932 8026[A200]DF <1> clropt [internalflags2], dif2_closed_input_file 12273 <1> %else 12274 <1> jmp @F 12275 <1> %endif 12276 <1> .clear_notatty: 12277 0000C937 F606[9C00]30 <1> testopt [internalflags], inputfile | notstdinput 12278 0000C93C 7505 <1> jnz @F 12279 0000C93E C606[E70A]00 <1> mov byte [notatty], 0 ; it _is_ a tty 12280 <1> @@: 12281 0000C943 C3 <1> retn 12282 <1> 12283 <1> 12284 <1> ; Fill input buffer from file. 12285 <1> ; 12286 <1> ; INP: di-> first available byte in input buffer 12287 <1> ; OUT: CY if DOS returned an error or EOF occured 12288 <1> ; NC if no error 12289 <1> ; si = di 12290 <1> ; CHG: - 12291 <1> fillbuf: 12292 0000C944 E89076 <1> call handle_serial_flags_ctrl_c 12293 0000C947 50 <1> push ax 12294 0000C948 53 <1> push bx 12295 0000C949 51 <1> push cx 12296 0000C94A 52 <1> push dx 12297 0000C94B 89FE <1> mov si, di ; we know this already 12298 0000C94D B9[0101] <1> mov cx, line_in+LINE_IN_LEN 12299 0000C950 89FA <1> mov dx, di 12300 0000C952 29F9 <1> sub cx, di 12301 0000C954 7703E99F00 <1> jbe .ret_cy ; if no more room --> 12302 <1> 12303 0000C959 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 12304 0000C95E 7429 <1> jz .not_re 12305 0000C960 56 <1> push si 12306 0000C961 57 <1> push di 12307 0000C962 89CB <1> mov bx, cx 12308 0000C964 8B36[E409] <1> mov si, word [re_buffer.position] 12309 0000C968 89F7 <1> mov di, si 12310 0000C96A B9FFFF <1> mov cx, -1 12311 0000C96D 31C0 <1> xor ax, ax 12312 0000C96F F2AE <1> repne scasb 12313 0000C971 F7D1 <1> not cx 12314 0000C973 49 <1> dec cx 12315 0000C974 39CB <1> cmp bx, cx 12316 0000C976 7702 <1> ja @F 12317 0000C978 89D9 <1> mov cx, bx 12318 <1> @@: 12319 0000C97A 89C8 <1> mov ax, cx 12320 0000C97C 89D7 <1> mov di, dx 12321 0000C97E F3A4 <1> rep movsb 12322 0000C980 8936[E409] <1> mov word [re_buffer.position], si 12323 0000C984 5F <1> pop di 12324 0000C985 5E <1> pop si 12325 0000C986 F8 <1> clc 12326 0000C987 EB61 <1> jmp .after 12327 <1> 12328 <1> .not_re: 12329 <1> 12330 <1> %if _INPUT_FILE_BOOT 12331 0000C989 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12332 0000C98E 7408 <1> jz @F 12333 0000C990 E80404 <1> call yy_boot_remember_seek 12334 0000C993 E800B5 <1> call yy_boot_read 12335 0000C996 EB52 <1> jmp .after 12336 <1> @@: 12337 <1> %endif 12338 <1> 12339 <1> %if _INPUT_FILE_HANDLES 12340 0000C998 E843DD <1> call InDos 12341 0000C99B 750E <1> jnz @F 12342 0000C99D F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12343 0000C9A2 7407 <1> jz @F ; if not input file --> 12344 0000C9A4 57 <1> push di 12345 0000C9A5 E88AF6 <1> call yy_get_handle ; bx = handle 12346 0000C9A8 5F <1> pop di 12347 0000C9A9 EB37 <1> jmp .file_handle 12348 <1> %endif 12349 <1> 12350 <1> @@: 12351 0000C9AB F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12352 0000C9B0 7429 <1> jz .not_cmdline 12353 0000C9B2 56 <1> push si 12354 0000C9B3 57 <1> push di 12355 0000C9B4 89CB <1> mov bx, cx 12356 0000C9B6 8B36[E001] <1> mov si, word [cmdline_buffer.position] 12357 0000C9BA 89F7 <1> mov di, si 12358 0000C9BC B9FFFF <1> mov cx, -1 12359 0000C9BF 31C0 <1> xor ax, ax 12360 0000C9C1 F2AE <1> repne scasb 12361 0000C9C3 F7D1 <1> not cx 12362 0000C9C5 49 <1> dec cx 12363 0000C9C6 39CB <1> cmp bx, cx 12364 0000C9C8 7702 <1> ja @F 12365 0000C9CA 89D9 <1> mov cx, bx 12366 <1> @@: 12367 0000C9CC 89C8 <1> mov ax, cx 12368 0000C9CE 89D7 <1> mov di, dx 12369 0000C9D0 F3A4 <1> rep movsb 12370 0000C9D2 8936[E001] <1> mov word [cmdline_buffer.position], si 12371 0000C9D6 5F <1> pop di 12372 0000C9D7 5E <1> pop si 12373 0000C9D8 F8 <1> clc 12374 0000C9D9 EB0F <1> jmp .after 12375 <1> 12376 <1> .not_cmdline: 12377 <1> 12378 <1> @@: 12379 0000C9DB 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12380 0000C9DD E8FEDC <1> call InDos 12381 0000C9E0 7516 <1> jnz .ret_cy 12382 <1> 12383 <1> .file_handle: 12384 0000C9E2 B43F <1> mov ah, 3Fh ; read from file 12385 0000C9E4 E87903 <1> call yy_remember_seek 12386 <1> doscall 2080 0000C9E7 E8B193 <2> call _doscall 12387 <1> .after: 12388 0000C9EA 720C <1> jc .ret_cy ; if error --> 12389 0000C9EC 85C0 <1> test ax, ax 12390 0000C9EE 7408 <1> jz .ret_cy ; if EOF --> 12391 0000C9F0 01C2 <1> add dx, ax ; -> behind last valid byte 12392 <1> 12393 0000C9F2 8026[A500]FB <1> clropt [internalflags3], dif3_at_line_end 12394 <1> 12395 0000C9F7 A8 <1> db __TEST_IMM8 ; (NC) 12396 <1> .ret_cy: 12397 0000C9F8 F9 <1> stc 12398 0000C9F9 8916[EE0A] <1> mov word [bufend], dx ; -> behind last valid byte 12399 0000C9FD 5A <1> pop dx 12400 0000C9FE 59 <1> pop cx 12401 0000C9FF 5B <1> pop bx 12402 0000CA00 58 <1> pop ax 12403 0000CA01 C3 <1> retn 12404 <1> 12405 <1> 12406 <1> %ifn _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12407 <1> yy equ error 12408 <1> %else 12409 <1> yy: 12410 0000CA02 E82A3B <1> call guard_re 12411 <1> %if _INPUT_FILE_BOOT 12412 0000CA05 F606[9D00]40 <1> testopt [internalflags], nodosloaded 12413 0000CA0A 7403E91EB1 <1> jnz yy_boot 12414 <1> %endif 12415 <1> %ifn _INPUT_FILE_HANDLES 12416 <1> jmp error 12417 <1> %else 12418 0000CA0F E8CCDC <1> call InDos 12419 0000CA12 740B <1> jz @F 12420 0000CA14 B80503 <1> mov ax, 0305h 12421 0000CA17 E83FDB <1> call setrc 12422 0000CA1A BA[436D] <1> mov dx, msg.yy_no_dos 12423 0000CA1D EB2F <1> jmp .disp_error_1 12424 <1> 12425 <1> @@: 12426 <1> ; If input_file_handles.to_close is set, 12427 <1> ; close all left over open files. (This 12428 <1> ; may only be done when DOS is available.) 12429 0000CA1F 31DB <1> xor bx, bx ; if none left open, -> first structure 12430 0000CA21 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12431 0000CA26 740B <1> jz @F 12432 0000CA28 8B1E[800A] <1> mov bx, word [input_file_handles.active] 12433 0000CA2C 43 <1> inc bx ; point to first unused structure 12434 0000CA2D D1E3 <1> shl bx, 1 12435 0000CA2F D1E3 <1> shl bx, 1 12436 0000CA31 D1E3 <1> shl bx, 1 ; to qword array index 12437 <1> %if INPUTFILEHANDLE_size != 8 12438 <1> %error Unexpected structure size 12439 <1> %endif 12440 <1> @@: 12441 0000CA33 89DF <1> mov di, bx ; + input_file_handles -> to close 12442 0000CA35 31C0 <1> xor ax, ax ; zero base amount to close 12443 0000CA37 E8DAF5 <1> call yy_close_file_handles 12444 <1> ; CHG: ax, bx, di 12445 <1> ; if we remembered to close any, do it now 12446 <1> 12447 0000CA3A 4E <1> dec si 12448 0000CA3B 89F3 <1> mov bx, si ; -> start of name 12449 0000CA3D 89F7 <1> mov di, si ; -> start of name 12450 0000CA3F AC <1> lodsb ; load character 12451 0000CA40 E8F7EE <1> call iseol? 12452 0000CA43 7515 <1> jne @F 12453 0000CA45 BA[856C] <1> mov dx, msg.yy_requires_filename 12454 0000CA48 B80403 <1> mov ax, 0304h 12455 0000CA4B E80BDB <1> call setrc 12456 <1> .disp_error_1: 12457 0000CA4E B8FF03 <1> mov ax, 03FFh 12458 0000CA51 E805DB <1> call setrc 12459 0000CA54 E893F3 <1> call putsz_error 12460 0000CA57 E9A635 <1> jmp cmd3 12461 <1> 12462 <1> @@: 12463 <1> .unquoted_loop: 12464 0000CA5A 3C20 <1> cmp al, 32 ; blank or EOL outside quoted part ? 12465 0000CA5C 7434 <1> je .blank 12466 0000CA5E 3C09 <1> cmp al, 9 12467 0000CA60 7430 <1> je .blank 12468 0000CA62 E8D5EE <1> call iseol? ; (includes semicolon in lDebug) 12469 0000CA65 742B <1> je .blank ; yes --> 12470 0000CA67 3C22 <1> cmp al, '"' ; starting quote mark ? 12471 0000CA69 740E <1> je .quoted ; yes --> 12472 0000CA6B AA <1> stosb ; store character 12473 <1> .unquote: 12474 0000CA6C AC <1> lodsb ; load character 12475 0000CA6D EBEB <1> jmp .unquoted_loop ; continue in not-quoted loop --> 12476 <1> 12477 <1> .quoted_loop: 12478 0000CA6F E8CCEE <1> call iseol?.notsemicolon; EOL inside quoted part ? 12479 0000CA72 7413 <1> je .quoted_eol ; if yes, error --> 12480 0000CA74 3C22 <1> cmp al, '"' ; ending quote mark ? 12481 0000CA76 74F4 <1> je .unquote ; yes --> 12482 0000CA78 AA <1> stosb ; store character 12483 <1> .quoted: 12484 0000CA79 AC <1> lodsb ; load character 12485 0000CA7A EBF3 <1> jmp .quoted_loop ; continue in quoted loop --> 12486 <1> 12487 <1> .empty: 12488 0000CA7C B80603 <1> mov ax, 0306h 12489 0000CA7F E8D7DA <1> call setrc 12490 0000CA82 BA[A66C] <1> mov dx, msg.yy_filename_empty 12491 0000CA85 EBC7 <1> jmp .disp_error_1 12492 <1> 12493 <1> .quoted_eol: 12494 0000CA87 B80703 <1> mov ax, 0307h 12495 0000CA8A E8CCDA <1> call setrc 12496 0000CA8D BA[6D6D] <1> mov dx, msg.yy_filename_missing_unquote 12497 0000CA90 EBBC <1> jmp .disp_error_1 12498 <1> 12499 <1> .blank: 12500 <1> ; mov byte [si - 1], 0 ; terminate (shouldn't be needed) 12501 <1> 12502 0000CA92 B000 <1> mov al, 0 12503 0000CA94 8605 <1> xchg al, byte [di] ; terminate after filename 12504 0000CA96 893E[0E0C] <1> mov word [terminator_in_line_in.offset], di 12505 0000CA9A A2[100C] <1> mov byte [terminator_in_line_in.value], al 12506 0000CA9D 39FB <1> cmp bx, di ; empty ? 12507 0000CA9F 74DB <1> je .empty ; yes --> 12508 <1> ; done 12509 <1> 12510 0000CAA1 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12511 0000CAA6 7412 <1> jz @F 12512 <1> ; IFH = 1 12513 <1> ; IFH - 1 = 0 12514 <1> ; cmp active, 0 12515 <1> ; active >= 0 --> error 12516 <1> 12517 <1> ; IFH = 2 12518 <1> ; IFH - 1 = 1 12519 <1> ; cmp active, 1 12520 <1> ; active >= 1 --> error 12521 0000CAA8 833E[800A]0F <1> cmp word [input_file_handles.active], _INPUT_FILE_HANDLES - 1 12522 0000CAAD 720B <1> jb @F 12523 <1> 12524 0000CAAF B80803 <1> mov ax, 0308h 12525 0000CAB2 E8A4DA <1> call setrc 12526 0000CAB5 BA[C56C] <1> mov dx, msg.yy_too_many_handles 12527 0000CAB8 EB94 <1> jmp .disp_error_1 12528 <1> @@: 12529 <1> 12530 0000CABA 803F3A <1> cmp byte [bx], ':' 12531 0000CABD 7552 <1> jne .not_yy_goto_subfunction 12532 <1> 12533 0000CABF F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12534 0000CAC4 750C <1> jnz @F 12535 <1> 12536 0000CAC6 E870F9 <1> call getline_is_input_file? 12537 0000CAC9 723A <1> jc .no_file 12538 0000CACB F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12539 0000CAD0 7533 <1> jnz .no_file 12540 <1> @@: 12541 0000CAD2 43 <1> inc bx 12542 0000CAD3 89DD <1> mov bp, bx 12543 <1> 12544 0000CAD5 E87001 <1> call yy_reset_buf 12545 <1> 12546 0000CAD8 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12547 <1> %if _INPUT_FILE_HANDLES 12548 0000CADA F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12549 0000CADF 7405 <1> jz @F ; if not input file --> 12550 0000CAE1 57 <1> push di 12551 0000CAE2 E84DF5 <1> call yy_get_handle ; bx = handle 12552 0000CAE5 5F <1> pop di 12553 <1> @@: 12554 <1> %endif 12555 0000CAE6 B445 <1> mov ah, 45h 12556 <1> doscall ; duplicate file handle 2080 0000CAE8 E8B092 <2> call _doscall 12557 0000CAEB 7303E9DD00 <1> jc yy_open_file.error 12558 0000CAF0 93 <1> xchg ax, bx 12559 <1> 12560 0000CAF1 31C9 <1> xor cx, cx 12561 0000CAF3 31D2 <1> xor dx, dx 12562 0000CAF5 B80142 <1> mov ax, 4201h ; lseek, from current file position 12563 <1> doscall ; call DOS 2080 0000CAF8 E8A092 <2> call _doscall 12564 0000CAFB 91 <1> xchg ax, cx ; dx:cx = current seek 12565 0000CAFC 87D1 <1> xchg dx, cx ; cx:dx = current seek 12566 0000CAFE BE0001 <1> mov si, ifhfIsDup 12567 0000CB01 93 <1> xchg ax, bx 12568 0000CB02 E9F200 <1> jmp yy_finish 12569 <1> 12570 <1> 12571 <1> .no_file: 12572 0000CB05 B80903 <1> mov ax, 0309h 12573 0000CB08 E84EDA <1> call setrc 12574 0000CB0B BA[0B6D] <1> mov dx, msg.yy_no_file 12575 0000CB0E E93DFF <1> jmp .disp_error_1 12576 <1> 12577 <1> .not_yy_goto_subfunction: 12578 0000CB11 31ED <1> xor bp, bp 12579 0000CB13 E87AEE <1> call skipwh0 12580 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12581 0000CB16 8936[060C] <1> mov word [if_exists_then_address], si 12582 <1> %endif 12583 0000CB1A E80CEE <1> call iseol?_or_then 12584 0000CB1D 7425 <1> je .not_yy_goto 12585 <1> 12586 0000CB1F 3C3A <1> cmp al, ':' 12587 0000CB21 7403E9ECD9 <1> jne error 12588 <1> 12589 0000CB26 E866EE <1> call skipwhite 12590 0000CB29 4E <1> dec si 12591 0000CB2A 89F5 <1> mov bp, si 12592 <1> 12593 <1> @@: 12594 0000CB2C AC <1> lodsb 12595 0000CB2D 3C20 <1> cmp al, 32 12596 0000CB2F 7409 <1> je @F 12597 0000CB31 3C09 <1> cmp al, 9 12598 0000CB33 7405 <1> je @F 12599 0000CB35 E802EE <1> call iseol? 12600 0000CB38 75F2 <1> jne @B 12601 <1> @@: 12602 0000CB3A E853EE <1> call skipwh0 12603 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12604 0000CB3D 8936[060C] <1> mov word [if_exists_then_address], si 12605 <1> %endif 12606 0000CB41 E801EE <1> call chkeol_or_then 12607 <1> 12608 <1> .not_yy_goto: 12609 0000CB44 89DF <1> mov di, bx 12610 <1> 12611 <1> ; INP: ds:di -> filename 12612 <1> ; OUT: File opened, 12613 <1> ; bx = file handle 12614 <1> ; STT: ds = es = ss = debugger data selector/segment 12615 <1> yy_open_file: 12616 0000CB46 E89A00 <1> call .setup_opencreate ; ds:si -> pathname 12617 0000CB49 B86C71 <1> mov ax, 716Ch ; LFN open-create 12618 0000CB4C 57 <1> push di 12619 0000CB4D 31FF <1> xor di, di ; alias hint 12620 0000CB4F F9 <1> stc 12621 <1> doscall 2080 0000CB50 E84892 <2> call _doscall 12622 0000CB53 5F <1> pop di 12623 0000CB54 7203E99500 <1> jnc .got ; LFN call succeeded --> 12624 <1> 12625 <1> ; Early case for no-LFN-interface available. 12626 <1> ; cmp ax, 1 12627 <1> ; je .try_sfn 12628 0000CB59 3D0071 <1> cmp ax, 7100h 12629 0000CB5C 744D <1> je .try_sfn 12630 <1> 12631 <1> ; Only now, we check whether the used drive supports LFNs. 12632 <1> ; If it does, then we treat the error received as an 12633 <1> ; actual error and cancel here. If not, the SFN function 12634 <1> ; is called next as a fallback. 12635 <1> ; 12636 <1> ; We cannot rely on specific error returns like the 12637 <1> ; expected 7100h CY (or 7100h CF-unchanged) or the similar 12638 <1> ; 0001h CY (Invalid function) because no one agrees on what 12639 <1> ; error code to use. 12640 <1> ; 12641 <1> ; dosemu returns 0003h (Path not found) on FATFS and 12642 <1> ; redirected-non-dosemu drives. But may be changed so as to 12643 <1> ; return 0059h (Function not supported on network). 12644 <1> ; MSWindows 98SE returns 0002h (File not found) on 12645 <1> ; DOS-redirected drives. 12646 <1> ; DOSLFN with Fallback mode enabled supports the call (albeit 12647 <1> ; limited to SFNs). 12648 <1> ; 12649 <1> ; To suss out what the error means, check LFN availability. 12650 <1> ; 12651 <1> ; Refer to https://github.com/stsp/dosemu2/issues/770 12652 0000CB5E 1E <1> push ds 12653 0000CB5F 06 <1> push es 12654 0000CB60 57 <1> push di 12655 0000CB61 50 <1> push ax 12656 <1> lframe 12657 <1> lvar 34, fstype_buffer 12658 <1> lvar 4, pathname_buffer 12659 0000CB62 5589E58D66DA <1> lenter 12660 <1> 12661 0000CB68 AD <1> lodsw ; load first two bytes of pathname 12662 <1> 12663 0000CB69 16 <1> push ss 12664 0000CB6A 1F <1> pop ds 12665 0000CB6B 89E2 <1> mov dx, sp ; ds:dx -> ?pathname_buffer 12666 0000CB6D 16 <1> push ss 12667 0000CB6E 07 <1> pop es 12668 0000CB6F 89E7 <1> mov di, sp ; es:di -> ?pathname_buffer 12669 <1> 12670 0000CB71 80FC3A <1> cmp ah, ':' ; starts with drive specifier ? 12671 0000CB74 7409 <1> je @F ; yes --> 12672 <1> 12673 0000CB76 B419 <1> mov ah, 19h 12674 <1> doscall ; get current default drive 2080 0000CB78 E82092 <2> call _doscall 12675 0000CB7B 0441 <1> add al, 'A' ; A: = 0, convert to drive letter 12676 0000CB7D B43A <1> mov ah, ':' ; drive specifier 12677 <1> @@: 12678 0000CB7F AB <1> stosw 12679 0000CB80 B85C00 <1> mov ax, '\' ; backslash and zero terminator 12680 0000CB83 AB <1> stosw ; es:di -> ?fstype_buffer 12681 <1> 12682 0000CB84 31C0 <1> xor ax, ax 12683 0000CB86 B91100 <1> mov cx, 34 >> 1 12684 0000CB89 57 <1> push di 12685 0000CB8A F3AB <1> rep stosw ; initialise ?fstype_buffer to all zeros 12686 0000CB8C 5F <1> pop di ; -> ?fstype_buffer 12687 <1> 12688 0000CB8D B92000 <1> mov cx, 32 ; size of ?fstype_buffer 12689 0000CB90 31DB <1> xor bx, bx ; harden, initialise this 12690 0000CB92 B8A071 <1> mov ax, 71A0h ; get volume information 12691 0000CB95 F9 <1> stc 12692 <1> doscall ; (depends on ds = es = ss) 2080 0000CB96 E80292 <2> call _doscall 12693 <1> 12694 0000CB99 7207 <1> jc @F ; if call not supported --> 12695 <1> ; bx = FS flags 12696 0000CB9B F6C740 <1> test bh, 0100_0000b ; LFN interface available ? 12697 0000CB9E F9 <1> stc ; if no 12698 0000CB9F 7401 <1> jz @F ; no --> 12699 <1> 12700 0000CBA1 F8 <1> clc ; is available 12701 <1> @@: 12702 <1> 12703 0000CBA2 89EC5D <1> lleave 12704 0000CBA5 58 <1> pop ax ; (restore error code) 12705 0000CBA6 5F <1> pop di 12706 0000CBA7 07 <1> pop es 12707 0000CBA8 1F <1> pop ds 12708 0000CBA9 7322 <1> jnc .error ; if LFN interface is available, actual error 12709 <1> ; if LFN interface is not available, try SFN 12710 <1> 12711 <1> .try_sfn: 12712 0000CBAB E83500 <1> call .setup_opencreate 12713 0000CBAE B8006C <1> mov ax, 6C00h ; Open-create 12714 0000CBB1 F9 <1> stc 12715 <1> doscall 2080 0000CBB2 E8E691 <2> call _doscall 12716 0000CBB5 7337 <1> jnc .got 12717 <1> 12718 0000CBB7 83F801 <1> cmp ax, 1 12719 0000CBBA 7405 <1> je .try_old_open 12720 0000CBBC 3D006C <1> cmp ax, 6C00h 12721 0000CBBF 750C <1> jne .error 12722 <1> 12723 <1> .try_old_open: 12724 0000CBC1 88D8 <1> mov al, bl ; access and sharing modes 12725 0000CBC3 B43D <1> mov ah, 3Dh ; Open 12726 0000CBC5 89F2 <1> mov dx, si ; -> filename 12727 0000CBC7 F9 <1> stc 12728 <1> doscall 2080 0000CBC8 E8D091 <2> call _doscall 12729 0000CBCB 7321 <1> jnc .got 12730 <1> 12731 <1> .error: 12732 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12733 0000CBCD F606[A700]08 <1> testopt [internalflags3], dif3_in_if 12734 0000CBD2 7403E9D8C4 <1> jnz if_exists_not_found 12735 <1> %endif 12736 0000CBD7 B80A03 <1> mov ax, 030Ah 12737 0000CBDA E87CD9 <1> call setrc 12738 0000CBDD BA[EA6C] <1> mov dx, msg.yy_error_file_open 12739 0000CBE0 E96BFE <1> jmp yy.disp_error_1 12740 <1> 12741 <1> .setup_opencreate: 12742 0000CBE3 89FE <1> mov si, di ; -> filename 12743 0000CBE5 BB2060 <1> mov bx, 0110_0000_0010_0000b ; Auto-commit, no int 24h 12744 <1> ; DENY WRITE, Read-only 12745 0000CBE8 31C9 <1> xor cx, cx ; create attribute 12746 0000CBEA BA0100 <1> mov dx, 0000_0000_0000_0001b ; no create / open, no truncate 12747 0000CBED C3 <1> retn 12748 <1> 12749 <1> .got: 12750 <1> ; ax = file handle 12751 0000CBEE E85700 <1> call yy_reset_buf 12752 <1> 12753 0000CBF1 31C9 <1> xor cx, cx 12754 0000CBF3 31D2 <1> xor dx, dx 12755 0000CBF5 31F6 <1> xor si, si 12756 <1> yy_finish: 12757 0000CBF7 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12758 0000CBFC 7509 <1> jnz @F 12759 0000CBFE 800E[A200]10 <1> setopt [internalflags2], dif2_input_file 12760 0000CC03 31DB <1> xor bx, bx 12761 0000CC05 EB18 <1> jmp @FF 12762 <1> 12763 <1> @@: 12764 0000CC07 FF06[800A] <1> inc word [input_file_handles.active] 12765 0000CC0B 8B1E[800A] <1> mov bx, word [input_file_handles.active] 12766 0000CC0F D1E3 <1> shl bx, 1 12767 0000CC11 D1E3 <1> shl bx, 1 12768 0000CC13 D1E3 <1> shl bx, 1 ; to qword array index 12769 <1> %if INPUTFILEHANDLE_size != 8 12770 <1> %error Unexpected structure size 12771 <1> %endif 12772 0000CC15 8BBF[FA09] <1> mov di, word [input_file_handles + bx - INPUTFILEHANDLE_size + ifhFlags] 12773 0000CC19 81E700F0 <1> and di, ifhfTestReserved1 | ifhfTestReserved2 | ifhfQuietInput | ifhfQuietOutput 12775 0000CC1D 09FE <1> or si, di 12776 <1> @@: 12777 <1> 12778 0000CC1F 8987[000A] <1> mov word [input_file_handles + bx + ifhHandle], ax 12779 0000CC23 89B7[020A] <1> mov word [input_file_handles + bx + ifhFlags], si 12780 0000CC27 8997[040A] <1> mov word [input_file_handles + bx + ifhParentSeek], dx 12781 0000CC2B 898F[060A] <1> mov word [input_file_handles + bx + ifhParentSeek + 2], cx 12782 <1> 12783 0000CC2F 8026[A700]EF <1> clropt [internalflags3], dif3_auxbuff_guarded_1 12784 0000CC34 89EE <1> mov si, bp 12785 0000CC36 85F6 <1> test si, si 12786 0000CC38 7403E99901 <1> jnz cmd_goto.yy_entry 12787 <1> 12788 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 12789 0000CC3D F606[A700]08 <1> testopt [internalflags3], dif3_in_if 12790 0000CC42 7403E975C4 <1> jnz if_exists_found_open 12791 <1> %endif 12792 0000CC47 C3 <1> retn 12793 <1> %endif 12794 <1> %endif 12795 <1> 12796 <1> 12797 <1> ; INP: word [bufnext], word [bufend] 12798 <1> ; CHG: - 12799 <1> ; 12800 <1> ; Note: When reading from a file, we buffer some of the input 12801 <1> ; in line_in. When switching to a non-file, or starting 12802 <1> ; to read from another file, we have to reset the seek 12803 <1> ; position of the (prior) file to avoid losing the data. 12804 <1> ; This cropped up during yy development, but actually 12805 <1> ; affects serial and InDOS input, too. Therefore, 12806 <1> ; this function is not below the conditional for yy. 12807 <1> yy_reset_buf: 12808 0000CC48 51 <1> push cx 12809 <1> %if _NEWFULLHANDLING 12810 0000CC49 B9[0300] <1> mov cx, line_in + 3 12811 <1> %else 12812 <1> mov cx, line_in + 2 12813 <1> %endif 12814 0000CC4C 870E[EC0A] <1> xchg cx, word [bufnext] 12815 0000CC50 F7D9 <1> neg cx 12816 0000CC52 030E[EE0A] <1> add cx, word [bufend] ; cx = how much remaining in buffer 12817 <1> %if _NEWFULLHANDLING 12818 0000CC56 C706[EE0A][0300] <1> mov word [bufend], line_in + 3 12819 <1> %else 12820 <1> mov word [bufend], line_in + 2 12821 <1> %endif 12822 <1> 12823 0000CC5C F606[A200]40 <1> testopt [internalflags2], dif2_did_getline_file 12824 0000CC61 7469 <1> jz .not_used 12825 <1> 12826 0000CC63 50 <1> push ax 12827 0000CC64 52 <1> push dx 12828 0000CC65 53 <1> push bx 12829 0000CC66 89CA <1> mov dx, cx 12830 0000CC68 31C9 <1> xor cx, cx 12831 0000CC6A F7DA <1> neg dx ; dx = minus how much remaining 12832 0000CC6C 7456 <1> jz .done ; if zero, do not seek at all --> 12833 0000CC6E 49 <1> dec cx ; sign extension into cx:dx 12834 <1> 12835 0000CC6F F606[A700]01 <1> testopt [internalflags3], dif3_input_re 12836 0000CC74 7406 <1> jz @F 12837 0000CC76 0116[E409] <1> add word [re_buffer.position], dx 12838 0000CC7A EB48 <1> jmp .done 12839 <1> @@: 12840 <1> 12841 <1> %if _INPUT_FILE_BOOT 12842 0000CC7C F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12843 0000CC81 741E <1> jz @F 12844 0000CC83 F606[A700]30 <1> testopt [internalflags3], dif3_auxbuff_guarded_1 | dif3_auxbuff_guarded_2 12845 0000CC88 7412 <1> jz .do_boot_seek 12846 <1> 12847 0000CC8A FF36[D08F] <1> push word [load_input_file.active] 12848 0000CC8E 8F06[900A] <1> pop word [boot_remember_seek_handle] 12849 0000CC92 890E[8E0A] <1> mov word [boot_remember_seek_offset + 2], cx 12850 0000CC96 8916[8C0A] <1> mov word [boot_remember_seek_offset], dx 12851 0000CC9A EB28 <1> jmp .done 12852 <1> 12853 <1> .do_boot_seek: 12854 0000CC9C E881B3 <1> call yy_boot_seek_current 12855 0000CC9F EB23 <1> jmp .done 12856 <1> @@: 12857 <1> %endif 12858 <1> 12859 <1> %if _INPUT_FILE_HANDLES 12860 0000CCA1 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12861 0000CCA6 7407 <1> jz @F ; if not input file --> 12862 0000CCA8 57 <1> push di 12863 0000CCA9 E886F3 <1> call yy_get_handle ; bx = handle 12864 0000CCAC 5F <1> pop di 12865 0000CCAD EB0F <1> jmp .filehandle 12866 <1> @@: 12867 <1> %endif 12868 <1> 12869 0000CCAF F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12870 0000CCB4 7406 <1> jz @F 12871 0000CCB6 0116[E001] <1> add word [cmdline_buffer.position], dx 12872 0000CCBA EB08 <1> jmp .done 12873 <1> @@: 12874 <1> 12875 0000CCBC 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12876 <1> .filehandle: 12877 0000CCBE B80142 <1> mov ax, 4201h ; lseek, from current file position 12878 0000CCC1 E80A00 <1> call handle_seek_or_remember 12879 <1> 12880 <1> .done: 12881 0000CCC4 5B <1> pop bx 12882 0000CCC5 5A <1> pop dx 12883 0000CCC6 58 <1> pop ax 12884 <1> 12885 0000CCC7 8026[A200]BF <1> clropt [internalflags2], dif2_did_getline_file 12886 <1> 12887 <1> .not_used: 12888 0000CCCC 59 <1> pop cx 12889 0000CCCD C3 <1> retn 12890 <1> 12891 <1> 12892 <1> handle_seek_or_remember: 12893 0000CCCE E80DDA <1> call InDos 12894 0000CCD1 7411 <1> jz @F 12895 <1> 12896 0000CCD3 A3[840A] <1> mov word [indos_remember_seek_function], ax 12897 0000CCD6 891E[860A] <1> mov word [indos_remember_seek_handle], bx 12898 0000CCDA 890E[8A0A] <1> mov word [indos_remember_seek_offset + 2], cx 12899 0000CCDE 8916[880A] <1> mov word [indos_remember_seek_offset], dx 12900 0000CCE2 EB03 <1> jmp .done 12901 <1> 12902 <1> @@: 12903 <1> doscall ; call DOS 2080 0000CCE4 E8B490 <2> call _doscall 12904 <1> .done: 12905 0000CCE7 C3 <1> retn 12906 <1> 12907 <1> 12908 <1> yy_reset_buf_and_seek_start: 12909 0000CCE8 51 <1> push cx 12910 0000CCE9 50 <1> push ax 12911 0000CCEA 52 <1> push dx 12912 0000CCEB 53 <1> push bx 12913 <1> %if _NEWFULLHANDLING 12914 0000CCEC B8[0300] <1> mov ax, line_in + 3 12915 <1> %else 12916 <1> mov ax, line_in + 2 12917 <1> %endif 12918 0000CCEF A3[EC0A] <1> mov word [bufnext], ax 12919 0000CCF2 A3[EE0A] <1> mov word [bufend], ax 12920 <1> 12921 0000CCF5 31D2 <1> xor dx, dx 12922 0000CCF7 31C9 <1> xor cx, cx 12923 <1> 12924 0000CCF9 F606[A700]01 <1> testopt [internalflags3], dif3_input_re 12925 0000CCFE 7408 <1> jz @F 12926 0000CD00 C706[E409][E401] <1> mov word [re_buffer.position], re_buffer 12927 0000CD06 EB37 <1> jmp .done 12928 <1> @@: 12929 <1> 12930 <1> %if _INPUT_FILE_BOOT 12931 0000CD08 F606[A300]02 <1> testopt [internalflags2], dif2_input_file_boot 12932 0000CD0D 7408 <1> jz @F 12933 0000CD0F E86A00 <1> call yy_boot_clear_remember_seek 12934 0000CD12 E855B5 <1> call yy_boot_seek_start 12935 0000CD15 EB28 <1> jmp .done 12936 <1> @@: 12937 <1> %endif 12938 <1> 12939 <1> %if _INPUT_FILE_HANDLES 12940 0000CD17 F606[A200]10 <1> testopt [internalflags2], dif2_input_file 12941 0000CD1C 7407 <1> jz @F ; if not input file --> 12942 0000CD1E 57 <1> push di 12943 0000CD1F E810F3 <1> call yy_get_handle ; bx = handle 12944 0000CD22 5F <1> pop di 12945 0000CD23 EB11 <1> jmp .filehandle 12946 <1> @@: 12947 <1> %endif 12948 <1> 12949 0000CD25 F606[A500]01 <1> testopt [internalflags3], dif3_input_cmdline 12950 0000CD2A 7408 <1> jz @F 12951 0000CD2C C706[E001][E000] <1> mov word [cmdline_buffer.position], cmdline_buffer 12952 0000CD32 EB0B <1> jmp .done 12953 <1> @@: 12954 <1> 12955 0000CD34 31DB <1> xor bx, bx ; bx = handle (0 is STDIN) 12956 <1> 12957 <1> .filehandle: 12958 0000CD36 E80B00 <1> call yy_clear_remember_seek 12959 0000CD39 B80042 <1> mov ax, 4200h ; seek from start 12960 0000CD3C E88FFF <1> call handle_seek_or_remember 12961 <1> .done: 12962 0000CD3F 5B <1> pop bx 12963 0000CD40 5A <1> pop dx 12964 0000CD41 58 <1> pop ax 12965 0000CD42 59 <1> pop cx 12966 0000CD43 C3 <1> retn 12967 <1> 12968 <1> 12969 <1> yy_clear_remember_seek: 12970 0000CD44 391E[860A] <1> cmp word [indos_remember_seek_handle], bx 12971 0000CD48 7515 <1> jne .ret 12972 <1> .clear: 12973 0000CD4A C706[840A]0142 <1> mov word [indos_remember_seek_function], 4201h 12974 0000CD50 830E[860A]FF <1> or word [indos_remember_seek_handle], -1 12975 0000CD55 8326[8A0A]00 <1> and word [indos_remember_seek_offset + 2], 0 12976 0000CD5A 8326[880A]00 <1> and word [indos_remember_seek_offset], 0 12977 <1> .ret: 12978 0000CD5F C3 <1> retn 12979 <1> 12980 <1> 12981 <1> yy_remember_seek: 12982 0000CD60 391E[860A] <1> cmp word [indos_remember_seek_handle], bx 12983 0000CD64 75F9 <1> jne yy_clear_remember_seek.ret 12984 <1> 12985 0000CD66 50 <1> push ax 12986 0000CD67 51 <1> push cx 12987 0000CD68 52 <1> push dx 12988 0000CD69 8B0E[8A0A] <1> mov cx, word [indos_remember_seek_offset + 2] 12989 0000CD6D 8B16[880A] <1> mov dx, word [indos_remember_seek_offset] 12990 0000CD71 A1[840A] <1> mov ax, word [indos_remember_seek_function] 12991 <1> doscall ; call DOS 2080 0000CD74 E82490 <2> call _doscall 12992 0000CD77 5A <1> pop dx 12993 0000CD78 59 <1> pop cx 12994 0000CD79 58 <1> pop ax 12995 0000CD7A EBCE <1> jmp yy_clear_remember_seek.clear 12996 <1> 12997 <1> 12998 <1> %if _INPUT_FILE_BOOT 12999 <1> yy_boot_clear_remember_seek: 13000 0000CD7C 50 <1> push ax 13001 0000CD7D A1[D08F] <1> mov ax, word [load_input_file.active] 13002 0000CD80 3906[900A] <1> cmp word [boot_remember_seek_handle], ax 13003 0000CD84 750F <1> jne .ret_pop_ax 13004 <1> .clear: 13005 0000CD86 830E[900A]FF <1> or word [boot_remember_seek_handle], -1 13006 0000CD8B 8326[8E0A]00 <1> and word [boot_remember_seek_offset + 2], 0 13007 0000CD90 8326[8C0A]00 <1> and word [boot_remember_seek_offset], 0 13008 <1> .ret_pop_ax: 13009 0000CD95 58 <1> pop ax 13010 0000CD96 C3 <1> retn 13011 <1> 13012 <1> 13013 <1> yy_boot_remember_seek: 13014 0000CD97 50 <1> push ax 13015 0000CD98 A1[D08F] <1> mov ax, word [load_input_file.active] 13016 0000CD9B 3906[900A] <1> cmp word [boot_remember_seek_handle], ax 13017 0000CD9F 75F4 <1> jne yy_boot_clear_remember_seek.ret_pop_ax 13018 <1> 13019 0000CDA1 53 <1> push bx 13020 0000CDA2 51 <1> push cx 13021 0000CDA3 52 <1> push dx 13022 0000CDA4 8B0E[8E0A] <1> mov cx, word [boot_remember_seek_offset + 2] 13023 0000CDA8 8B16[8C0A] <1> mov dx, word [boot_remember_seek_offset] 13024 0000CDAC E871B2 <1> call yy_boot_seek_current 13025 0000CDAF 5A <1> pop dx 13026 0000CDB0 59 <1> pop cx 13027 0000CDB1 5B <1> pop bx 13028 0000CDB2 EBD2 <1> jmp yy_boot_clear_remember_seek.clear 13029 <1> %endif 13030 <1> 13031 <1> 13032 <1> cmd_goto: 13033 0000CDB4 E8D8EB <1> call skipwhite 13034 0000CDB7 3C3A <1> cmp al, ':' 13035 0000CDB9 7503 <1> jne @F 13036 0000CDBB E8D1EB <1> call skipwhite 13037 <1> @@: 13038 <1> 13039 0000CDBE E878F6 <1> call getline_is_input_file? 13040 0000CDC1 7312 <1> jnc @F 13041 0000CDC3 BA[8A65] <1> mov dx, msg.goto_not_file 13042 0000CDC6 B80003 <1> mov ax, 0300h 13043 0000CDC9 E88DD7 <1> call setrc 13044 <1> .error: 13045 0000CDCC B8FF03 <1> mov ax, 03FFh 13046 0000CDCF E887D7 <1> call setrc 13047 0000CDD2 E915F0 <1> jmp putsz_error 13048 <1> 13049 <1> @@: 13050 0000CDD5 4E <1> dec si 13051 <1> .yy_entry: ; si -> destination label 13052 0000CDD6 BA[8265] <1> mov dx, msg.sof 13053 0000CDD9 E8FFEA <1> call isstring? 13054 0000CDDC 751B <1> jne @F 13055 0000CDDE E8AEEB <1> call skipwhite 13056 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13057 0000CDE1 8936[060C] <1> mov word [if_exists_then_address], si 13058 <1> %endif 13059 0000CDE5 E85DEB <1> call chkeol_or_then 13060 0000CDE8 E8D700 <1> call resetrc 13061 0000CDEB E8FAFE <1> call yy_reset_buf_and_seek_start 13062 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13063 0000CDEE F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13064 0000CDF3 7403E9C4C2 <1> jnz if_exists_found_open 13065 <1> %endif 13066 0000CDF8 C3 <1> retn 13067 <1> 13068 <1> @@: 13069 0000CDF9 BA[8665] <1> mov dx, msg.eof 13070 0000CDFC E8DCEA <1> call isstring? 13071 0000CDFF 751B <1> jne @F 13072 0000CE01 E88BEB <1> call skipwhite 13073 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13074 0000CE04 8936[060C] <1> mov word [if_exists_then_address], si 13075 <1> %endif 13076 0000CE08 E83AEB <1> call chkeol_or_then 13077 0000CE0B E8B400 <1> call resetrc 13078 0000CE0E E861F6 <1> call getline_close_file 13079 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13080 0000CE11 F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13081 0000CE16 7403E9A6C2 <1> jnz if_exists_found_closed 13082 <1> %endif 13083 0000CE1B C3 <1> retn 13084 <1> 13085 <1> @@: 13086 0000CE1C 89F3 <1> mov bx, si 13087 0000CE1E B9FFFF <1> mov cx, -1 13088 <1> .loop: 13089 0000CE21 41 <1> inc cx 13090 0000CE22 AC <1> lodsb 13091 0000CE23 3C20 <1> cmp al, 32 13092 0000CE25 7409 <1> je .end 13093 0000CE27 3C09 <1> cmp al, 9 13094 0000CE29 7405 <1> je .end 13095 0000CE2B E80CEB <1> call iseol? 13096 0000CE2E 75F1 <1> jne .loop 13097 <1> .end: 13098 0000CE30 C644FF00 <1> mov byte [si - 1], 0 ; terminate 13099 0000CE34 E859EB <1> call skipwh0 13100 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13101 0000CE37 8936[060C] <1> mov word [if_exists_then_address], si 13102 <1> %endif 13103 0000CE3B E807EB <1> call chkeol_or_then 13104 0000CE3E E376 <1> jcxz .empty 13105 0000CE40 41 <1> inc cx ; space for zero terminator 13106 0000CE41 41 <1> inc cx ; round up 13107 0000CE42 80E1FE <1> and cl, ~1 ; align to word 13108 0000CE45 89E5 <1> mov bp, sp 13109 0000CE47 29CC <1> sub sp, cx ; allocate stack space 13110 0000CE49 89DE <1> mov si, bx ; -> label in line_in 13111 0000CE4B 89E7 <1> mov di, sp ; -> buffer on stack 13112 0000CE4D 57 <1> push di 13113 <1> @@: 13114 0000CE4E AC <1> lodsb 13115 0000CE4F E8F1BD <1> call uppercase ; normalise the name in buffer 13116 0000CE52 AA <1> stosb 13117 0000CE53 E2F9 <1> loop @B ; copy all or all+1 13118 <1> 13119 0000CE55 E890FE <1> call yy_reset_buf_and_seek_start 13120 <1> 13121 <1> .next_line: 13122 0000CE58 800E[A500]88 <1> setopt [internalflags3], dif3_quiet_input_single | dif3_return_eof 13123 0000CE5D 31C9 <1> xor cx, cx 13124 0000CE5F E84FF3 <1> call getline.use_dif3_flags 13125 0000CE62 7228 <1> jc .notfound 13126 0000CE64 89F3 <1> mov bx, si 13127 0000CE66 3C3A <1> cmp al, ':' 13128 0000CE68 75EE <1> jne .next_line 13129 0000CE6A E822EB <1> call skipwhite 13130 0000CE6D 5A <1> pop dx 13131 0000CE6E 52 <1> push dx 13132 0000CE6F 4E <1> dec si 13133 0000CE70 E868EA <1> call isstring? 13134 0000CE73 75E3 <1> jne .next_line 13135 0000CE75 8D77FF <1> lea si, [bx - 1] 13136 0000CE78 AC <1> lodsb 13137 0000CE79 89EC <1> mov sp, bp 13138 0000CE7B E84400 <1> call resetrc 13139 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13140 0000CE7E F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13141 0000CE83 7403E934C2 <1> jnz if_exists_found_open 13142 <1> %endif 13143 0000CE88 5A <1> pop dx ; return address to cmd3 13144 0000CE89 E9E934 <1> jmp cmd3_notblank 13145 <1> 13146 <1> .notfound: 13147 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13148 0000CE8C F606[A700]08 <1> testopt [internalflags3], dif3_in_if 13149 0000CE91 751B <1> jnz @F 13150 <1> %endif 13151 0000CE93 B80103 <1> mov ax, 0301h 13152 0000CE96 E8C0D6 <1> call setrc 13153 0000CE99 BA[F265] <1> mov dx, msg.goto_not_found.1 13154 0000CE9C E84BEF <1> call putsz_error 13155 0000CE9F 5A <1> pop dx 13156 0000CEA0 E847EF <1> call putsz_error 13157 0000CEA3 BA[1266] <1> mov dx, msg.goto_not_found.2 13158 0000CEA6 E841EF <1> call putsz_error 13159 0000CEA9 89EC <1> mov sp, bp 13160 0000CEAB E9C4F5 <1> jmp getline_close_file 13161 <1> 13162 <1> %if _INPUT_FILE_HANDLES || _INPUT_FILE_BOOT 13163 <1> @@: 13164 0000CEAE 89EC <1> mov sp, bp 13165 0000CEB0 E8BFF5 <1> call getline_close_file 13166 0000CEB3 E9F9C1 <1> jmp if_exists_not_found 13167 <1> %endif 13168 <1> 13169 <1> .empty: 13170 0000CEB6 B80203 <1> mov ax, 0302h 13171 0000CEB9 E89DD6 <1> call setrc 13172 0000CEBC BA[C965] <1> mov dx, msg.goto_empty 13173 0000CEBF E90AFF <1> jmp .error 13174 <1> 13175 <1> 13176 <1> resetrc: 13177 0000CEC2 FF36[F20A] <1> push word [priorrc] 13178 0000CEC6 8F06[F00A] <1> pop word [rc] 13179 0000CECA C3 <1> retn 13180 <1> 13181 <1> 13182 <1> %include "serialp.asm" 13183 <2> 13184 <2> %if 0 13185 <2> 13186 <2> Serial port handling code 13187 <2> 13188 <2> 2019 by C. Masloch 13189 <2> based on http://www.sci.muni.cz/docs/pc/serport.txt The Serial Port rel. 14 13190 <2> 13191 <2> Usage of the works is permitted provided that this 13192 <2> instrument is retained with the works, so that any entity 13193 <2> that uses the works is notified of this instrument. 13194 <2> 13195 <2> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 13196 <2> 13197 <2> %endif 13198 <2> 13199 <2> 13200 <2> usesection lDEBUG_DATA_ENTRY 13201 <2> 13202 000095F6 CB <2> iisphwreset serial_interrupt_handler 13203 <2> 13204 000095F7 00 <2> align 2, db 0 13205 000095F8 EB10000000004B4280- <2> iispentry serial_interrupt_handler, 80h, serial_interrupt_handler 13205 00009601 EBF300 <2> 13206 0000960A 2EF606[EB0B]01 <2> testopt [cs:serial_flags], sf_init_done 13207 00009610 7505 <2> jnz @F 13208 00009612 2EFF2E[FA95] <2> jmp far [cs:.next] 13209 <2> @@: 13210 00009617 50 <2> push ax 13211 00009618 51 <2> push cx 13212 00009619 52 <2> push dx ; first save the regs we need to change 13213 0000961A 1E <2> push ds 13214 0000961B 56 <2> push si 13215 <2> 13216 0000961C 0E <2> push cs 13217 0000961D 1F <2> pop ds 13218 0000961E B020 <2> mov al, 20h ; acknowledge interrupt 13219 00009620 803E[2B09]00 <2> cmp byte [serial_use_irqmask + 1], 0 13220 00009625 7402 <2> je @F 13221 00009627 E6A0 <2> out 0A0h, al ; to secondary PIC 13222 <2> @@: 13223 00009629 E620 <2> out 20h, al ; to primary PIC 13224 0000962B FC <2> cld 13225 <2> ih_continue: 13226 0000962C 8B16[2609] <2> mov dx, [baseport] 13227 00009630 42 <2> inc dx 13228 00009631 42 <2> inc dx ; (base + 2) write FCR, read IIR 13229 <2> %if _USE_TX_FIFO 13230 00009632 A0[2109] <2> mov al, byte [serial_fcr_setting] 13231 00009635 24F9 <2> and al, ~ 0000_0110b 13232 00009637 EE <2> out dx, al ; (write FCR) configure FIFOs 13233 00009638 31C0 <2> xor ax, ax 13234 <2> %else 13235 <2> xor ax, ax 13236 <2> out dx, al ; (write FCR) configure FIFOs 13237 <2> nop 13238 <2> %endif 13239 0000963A EC <2> in al, dx ; (read IIR) get interrupt cause 13240 0000963B A801 <2> test al, 1 ; did the UART generate the int? 13241 0000963D 750C <2> jnz ih_sep ; no, then it's somebody else's problem 13242 0000963F 2406 <2> and al, 6 ; mask bits not needed 13243 00009641 89C6 <2> mov si, ax ; make a pointer out of it 13244 00009643 4A <2> dec dx 13245 00009644 4A <2> dec dx ; = base 13246 00009645 FF94[5296] <2> call near word [serial_interrupt_table + si] ; serve this int 13247 00009649 EBE1 <2> jmp ih_continue ; and look for more things to be done 13248 <2> ih_sep: 13249 0000964B 5E <2> pop si 13250 0000964C 1F <2> pop ds 13251 0000964D 5A <2> pop dx ; restore regs 13252 0000964E 59 <2> pop cx 13253 0000964F 58 <2> pop ax 13254 00009650 CF <2> iret 13255 <2> 13256 00009651 00 <2> align 2, db 0 13257 00009652 [5A96][5F96][A796]- <2> serial_interrupt_table: dw int_modem,int_tx,int_rx,int_status 13257 00009658 [FA96] <2> 13258 <2> 13259 <2> 13260 <2> int_modem: 13261 <2> ; just clear modem status, we are not interested in it 13262 0000965A 83C206 <2> add dx, 6 13263 0000965D EC <2> in al, dx ; read MSR 13264 0000965E C3 <2> retn 13265 <2> 13266 <2> 13267 <2> int_tx: 13268 0000965F 8B16[2609] <2> mov dx, [baseport] 13269 00009663 8B36[3209] <2> mov si, word [txtail] 13270 <2> 13271 00009667 52 <2> push dx 13272 00009668 83C205 <2> add dx, 5 13273 0000966B EC <2> in al, dx ; (base + 5) read LSR 13274 0000966C 5A <2> pop dx 13275 0000966D A820 <2> test al, 20h ; Transmitter Holding Register Empty ? 13276 0000966F 7421 <2> jz itx_setup_int ; no, it was a spurious interrupt --> 13277 <2> ; This conditional detects the condition specified in 13278 <2> ; the section "Known problems with several chips": 13279 <2> ; When a 1 is written to the bit 1 (Tx int enab) in the 13280 <2> ; IER, a Tx interrupt is generated. This is an erroneous 13281 <2> ; interrupt if the THRE bit is not set. [So don't set 13282 <2> ; this bit as long as the THRE bit isn't set. CB] 13283 <2> 13284 <2> ; check if there's something to be sent 13285 <2> %if _USE_TX_FIFO 13286 00009671 B90100 <2> mov cx, 1 13287 00009674 F606[EB0B]08 <2> test byte [serial_flags], sf_built_in_fifo 13288 00009679 7404 <2> jz @F 13289 0000967B 8A0E[EA0B] <2> mov cl, byte [serial_fifo_size] 13290 <2> @@: 13291 <2> %endif 13292 <2> itx_more: 13293 0000967F 3B36[3009] <2> cmp si, word [txhead] 13294 00009683 7419 <2> je itx_nothing 13295 00009685 AC <2> lodsb 13296 00009686 EE <2> out dx, al ; write it to the THR 13297 <2> ; check for wrap-around in our fifo 13298 <2> tx_checkwrap 181 00009687 81FE[400A] <3> cmp si, txfifo+_TXFIFOSIZE 182 0000968B 7203 <3> jb %%tx_nowrap 183 0000968D BE[C009] <3> mov si, txfifo 184 <3> %%tx_nowrap: 13299 <2> %if _USE_TX_FIFO 13300 <2> ; send as much bytes as the chip can take when available 13301 00009690 E2ED <2> loop itx_more 13302 <2> %endif 13303 <2> itx_setup_int: 13304 00009692 3B36[3009] <2> cmp si, word [txhead] 13305 00009696 7406 <2> je itx_nothing 13306 00009698 42 <2> inc dx 13307 00009699 B003 <2> mov al, 0000_0011b 13308 0000969B EE <2> out dx, al ; write to IER 13309 0000969C EB04 <2> jmp itx_dontstop 13310 <2> itx_nothing: 13311 <2> ; no more data in the fifo, so inhibit TX interrupts 13312 0000969E 42 <2> inc dx 13313 0000969F B001 <2> mov al, 0000_0001b 13314 000096A1 EE <2> out dx, al ; write to IER 13315 <2> itx_dontstop: 13316 000096A2 8936[3209] <2> mov word [txtail], si 13317 000096A6 C3 <2> retn 13318 <2> 13319 <2> 13320 <2> int_rx: 13321 000096A7 8B36[2C09] <2> mov si, word [rxhead] 13322 <2> irx_more: 13323 000096AB 8B16[2609] <2> mov dx, [baseport] 13324 000096AF EC <2> in al, dx ; read from RBR 13325 000096B0 3C03 <2> cmp al, 3 13326 000096B2 7511 <2> jne @FF 13327 000096B4 F606[EB0B]02 <2> testopt [serial_flags], sf_ctrl_c 13328 000096B9 7405 <2> jz @F 13329 000096BB 800E[EB0B]04 <2> setopt [serial_flags], sf_double_ctrl_c 13330 <2> @@: 13331 000096C0 800E[EB0B]02 <2> setopt [serial_flags], sf_ctrl_c 13332 <2> @@: 13333 000096C5 8804 <2> mov byte [si], al 13334 000096C7 89F0 <2> mov ax, si 13335 000096C9 46 <2> inc si 13336 <2> ; check for wrap-around 13337 <2> rx_checkwrap 174 000096CA 81FE[C009] <3> cmp si, rxfifo+_RXFIFOSIZE 175 000096CE 7203 <3> jb %%rx_nowrap 176 000096D0 BE[4009] <3> mov si, rxfifo 177 <3> %%rx_nowrap: 13338 000096D3 3936[2E09] <2> cmp word [rxtail], si 13339 000096D7 7415 <2> je @FF 13340 <2> ; see if there are more bytes to be read 13341 000096D9 83C205 <2> add dx, 5 13342 000096DC EC <2> in al, dx ; read LSR 13343 000096DD A801 <2> test al, 1 ; Data Available ? 13344 000096DF 75CA <2> jnz irx_more 13345 <2> .end: 13346 000096E1 8936[2C09] <2> mov word [rxhead], si 13347 <2> ; test al, 20h ; Transmitter Holding Register Empty ? 13348 <2> ; jnz int_tx ; yes, do transmit next --> 13349 <2> ; Sometimes when sending and receiving at the 13350 <2> ; same time, TX ints get lost. This is a cure. 13351 <2> ; retn 13352 000096E5 E977FF <2> jmp int_tx ; (this checks for THRE) 13353 <2> 13354 <2> @@: 13355 000096E8 8B16[2609] <2> mov dx, [baseport] 13356 000096EC EC <2> in al, dx ; read RBR (discard) 13357 000096ED A9 <2> db __TEST_IMM16 ; (skip mov) 13358 <2> @@: 13359 000096EE 89C6 <2> mov si, ax 13360 000096F0 83C205 <2> add dx, 5 13361 000096F3 EC <2> in al, dx ; read LSR 13362 000096F4 A801 <2> test al, 1 ; Data Available ? 13363 000096F6 75F0 <2> jnz @BB 13364 000096F8 EBE7 <2> jmp .end 13365 <2> 13366 <2> 13367 <2> int_status: 13368 <2> ; just clear the status ("this trivial task is left as an exercise 13369 <2> ; to the student") 13370 000096FA 83C205 <2> add dx, 5 13371 000096FD EC <2> in al, dx ; read LSR 13372 000096FE C3 <2> retn 13373 <2> 13374 <2> 13375 <2> usesection lDEBUG_CODE 13376 <2> 13377 <2> ; OUT: ZR if no new character in buffer 13378 <2> ; NZ if new character read, 13379 <2> ; al = character 13380 <2> ; STT: ds = debugger segment 13381 <2> serial_receive_char: 13382 0000CECB 56 <2> push si 13383 <2> ; see if there are bytes to be read from the fifo 13384 0000CECC 8B36[2E09] <2> mov si, word [rxtail] 13385 <2> 13386 0000CED0 3B36[2C09] <2> cmp si, word [rxhead] 13387 0000CED4 7412 <2> je .nodata 13388 0000CED6 AC <2> lodsb 13389 <2> %if _ECHO_RX_TO_TX 13390 <2> %if _RX_TO_TX_ADD_LF 13391 <2> call serial_send_char_add_lf 13392 <2> %else 13393 <2> call serial_send_char 13394 <2> %endif 13395 <2> %endif 13396 <2> ; check for wrap-around 13397 <2> rx_checkwrap 174 0000CED7 81FE[C009] <3> cmp si, rxfifo+_RXFIFOSIZE 175 0000CEDB 7203 <3> jb %%rx_nowrap 176 0000CEDD BE[4009] <3> mov si, rxfifo 177 <3> %%rx_nowrap: 13398 0000CEE0 8936[2E09] <2> mov word [rxtail], si 13399 0000CEE4 85F6 <2> test si, si ; (NZ) 13400 0000CEE6 EB02 <2> jmp .return 13401 <2> 13402 <2> .nodata: 13403 0000CEE8 31C0 <2> xor ax, ax ; (ZR) 13404 <2> .return: 13405 0000CEEA 5E <2> pop si 13406 0000CEEB C3 <2> retn 13407 <2> 13408 <2> 13409 <2> ; OUT: ZR if no new character in buffer 13410 <2> ; NZ if new character available, 13411 <2> ; al = character 13412 <2> ; STT: ds = debugger segment 13413 <2> serial_check_receive_char: 13414 0000CEEC 56 <2> push si 13415 <2> ; see if there are bytes to be read from the fifo 13416 0000CEED 8B36[2E09] <2> mov si, word [rxtail] 13417 <2> 13418 0000CEF1 3B36[2C09] <2> cmp si, word [rxhead] 13419 0000CEF5 7405 <2> je .nodata 13420 0000CEF7 AC <2> lodsb 13421 0000CEF8 85F6 <2> test si, si ; (NZ) 13422 0000CEFA EB02 <2> jmp .return 13423 <2> 13424 <2> .nodata: 13425 0000CEFC 31C0 <2> xor ax, ax ; (ZR) 13426 <2> .return: 13427 0000CEFE 5E <2> pop si 13428 0000CEFF C3 <2> retn 13429 <2> 13430 <2> 13431 <2> ; OUT: NC if successful 13432 <2> ; CY if handler hooked in different interrrupt 13433 <2> ; and couldn't unhook 13434 <2> serial_install_interrupt_handler: 13435 <2> ; install interrupt handler first 13436 0000CF00 A0[2209] <2> mov al, byte [serial_use_intnum] 13437 0000CF03 F606[A800]01 <2> testopt [internalflags4], dif4_int_serial_hooked 13438 0000CF08 740D <2> jz @F 13439 0000CF0A 3A06[120C] <2> cmp al, byte [serial_installed_intnum] 13440 0000CF0E 7418 <2> je .ret ; --> (NC) 13441 0000CF10 50 <2> push ax 13442 0000CF11 E84A01 <2> call serial_uninstall_interrupt_handler 13443 0000CF14 58 <2> pop ax 13444 0000CF15 7211 <2> jc .ret ; --> (CY) 13445 <2> @@: 13446 0000CF17 A2[120C] <2> mov byte [serial_installed_intnum], al 13447 0000CF1A BE[F895] <2> mov si, serial_interrupt_handler 13448 0000CF1D E82802 <2> call install_86m_interrupt_handler 13449 0000CF20 800E[A800]01 <2> setopt [internalflags4], dif4_int_serial_hooked 13450 0000CF25 E8A704 <2> call update_inttab_optional 13451 <2> ; (NC) 13452 <2> .ret: 13453 0000CF28 C3 <2> retn 13454 <2> 13455 <2> 13456 <2> %if 0 13457 <2> 13458 <2> If you do the following: 13459 <2> 13460 <2> r dspvi FF 13461 <2> r dco or= 4000 13462 <2> (wait for KEEP prompt to fail) 13463 <2> r dspvi 0B 13464 <2> r dco or= 4000 13465 <2> (try to reply to the KEEP prompt) 13466 <2> 13467 <2> In dosemu2 the default interrupt handler apparently 13468 <2> doesn't send an EOI to the PIC and thus the interrupts 13469 <2> get stuck when prompting with the correct handler. 13470 <2> Therefore, we should send an EOI to the PIC just in case. 13471 <2> 13472 <2> %endif 13473 <2> 13474 <2> ; INP: word [serial_use_irqmask] 13475 <2> ; CHG: ax 13476 <2> serial_eoi: 13477 0000CF29 B020 <2> mov al, 20h ; acknowledge interrupt 13478 0000CF2B 803E[2B09]00 <2> cmp byte [serial_use_irqmask + 1], 0 13479 0000CF30 7402 <2> je @F 13480 0000CF32 E6A0 <2> out 0A0h, al ; to secondary PIC 13481 <2> @@: 13482 0000CF34 E620 <2> out 20h, al ; to primary PIC 13483 0000CF36 C3 <2> retn 13484 <2> 13485 <2> 13486 <2> serial_clear_fifos: 13487 <2> ; clear fifos (not those in the 16550A, but ours) 13488 0000CF37 B8[4009] <2> mov ax, rxfifo 13489 0000CF3A A3[2C09] <2> mov word [rxhead], ax 13490 0000CF3D A3[2E09] <2> mov word [rxtail], ax 13491 0000CF40 B8[C009] <2> mov ax, txfifo 13492 0000CF43 A3[3009] <2> mov word [txhead], ax 13493 0000CF46 A3[3209] <2> mov word [txtail], ax 13494 0000CF49 C3 <2> retn 13495 <2> 13496 <2> 13497 <2> numdef SERIAL_DL_WORD, 0 13498 <2> 13499 <2> serial_init_UART: 13500 0000CF4A E8DCFF <2> call serial_eoi 13501 <2> ; initialize the UART 13502 0000CF4D 8B16[2609] <2> mov dx, [baseport] 13503 0000CF51 83C203 <2> add dx, 3 ; (base + 3) read/write LCR 13504 0000CF54 EC <2> in al, dx ; read LCR 13505 0000CF55 A2[1F09] <2> mov byte [serial_save_lcr], al 13506 0000CF58 B080 <2> mov al, 80h ; DLAB = 1 13507 0000CF5A EE <2> out dx, al ; write LCR, make DL register accessible 13508 0000CF5B 52 <2> push dx 13509 0000CF5C 8B16[2609] <2> mov dx, [baseport] ; (base) 13510 <2> %if _SERIAL_DL_WORD 13511 <2> in ax, dx ; read bps rate divisor (DL) 13512 <2> mov word [serial_save_dl], ax 13513 <2> mov ax, word [serial_use_dl] 13514 <2> out dx, ax ; write bps rate divisor (DL) 13515 <2> %else 13516 0000CF60 EC <2> in al, dx ; read bps rate divisor low byte (DL) 13517 0000CF61 42 <2> inc dx 13518 0000CF62 A2[1C09] <2> mov byte [serial_save_dl], al 13519 0000CF65 EC <2> in al, dx ; read bps rate divisor high byte (DL) 13520 0000CF66 A2[1D09] <2> mov byte [serial_save_dl + 1], al 13521 0000CF69 A0[2909] <2> mov al, byte [serial_use_dl + 1] 13522 0000CF6C EE <2> out dx, al ; write bps rate divisor high byte (DL) 13523 0000CF6D 4A <2> dec dx 13524 0000CF6E A0[2809] <2> mov al, byte [serial_use_dl] 13525 0000CF71 EE <2> out dx, al ; write bps rate divisor low byte (DL) 13526 <2> %endif 13527 0000CF72 5A <2> pop dx ; (base + 3) write LCR 13528 0000CF73 A0[2309] <2> mov al, byte [serial_use_params] 13529 <2> ; DLAB = 0 and control parameters 13530 0000CF76 EE <2> out dx, al ; write parameters 13531 <2> 13532 <2> ; is it a 16550A? 13533 0000CF77 4A <2> dec dx ; (base + 2) write FCR, read IIR 13534 <2> %if _USE_TX_FIFO 13535 0000CF78 B007 <2> mov al, 0000_0111b 13536 0000CF7A 0A06[2409] <2> or al, byte [serial_use_fifo] 13537 0000CF7E A2[2109] <2> mov byte [serial_fcr_setting], al 13538 0000CF81 EE <2> out dx, al ; (write FCR) try to clear and enable FIFOs 13539 0000CF82 90 <2> nop 13540 0000CF83 EC <2> in al, dx ; read IIR 13541 0000CF84 800E[EB0B]08 <2> or byte [serial_flags], sf_built_in_fifo 13542 <2> ; in case of built-in tx FIFO 13543 0000CF89 24C0 <2> and al, 1100_0000b ; mask of FIFO functional bits 13544 0000CF8B 3CC0 <2> cmp al, 1100_0000b ; both bits set ? 13545 0000CF8D 740B <2> je @F ; yes --> 13546 0000CF8F 8026[EB0B]F7 <2> and byte [serial_flags], ~ sf_built_in_fifo 13547 <2> ; no built-in tx FIFO 13548 0000CF94 31C0 <2> xor ax, ax 13549 0000CF96 A2[2109] <2> mov byte [serial_fcr_setting], al 13550 0000CF99 EE <2> out dx, al ; (write FCR) disable the FIFOs 13551 <2> @@: 13552 <2> %else 13553 <2> xor ax, ax 13554 <2> out dx, al ; (write FCR) disable the FIFOs 13555 <2> %endif 13556 0000CF9A 4A <2> dec dx ; (base + 1) 13557 0000CF9B EC <2> in al, dx ; read IER 13558 0000CF9C A2[1E09] <2> mov byte [serial_save_ier], al 13559 0000CF9F B001 <2> mov al, 0000_0001b ; allow RX interrupts 13560 0000CFA1 EE <2> out dx, al ; write to IER 13561 0000CFA2 4A <2> dec dx ; (base + 0) read RBR 13562 0000CFA3 EC <2> in al, dx ; clear receiver 13563 0000CFA4 83C205 <2> add dx, 5 ; (base + 5) read LSR 13564 0000CFA7 EC <2> in al, dx ; clear line status 13565 0000CFA8 42 <2> inc dx ; (base + 6) read MSR 13566 0000CFA9 EC <2> in al, dx ; clear modem status 13567 <2> ; free interrupt in the ICU 13568 0000CFAA 8B0E[2A09] <2> mov cx, word [serial_use_irqmask] 13569 0000CFAE F7D1 <2> not cx ; negated mask of bits to change 13570 0000CFB0 31DB <2> xor bx, bx ; all bits clear (= IRQ ON) 13571 0000CFB2 E81200 <2> call set_irq 13572 0000CFB5 891E[1A09] <2> mov word [serial_save_irq_off], bx 13573 0000CFB9 890E[1809] <2> mov word [serial_save_irq_mask], cx 13574 <2> ; and enable ints from the UART 13575 0000CFBD 4A <2> dec dx 13576 0000CFBE 4A <2> dec dx ; (base + 4) 13577 0000CFBF EC <2> in al, dx ; read MCR 13578 0000CFC0 A2[2009] <2> mov byte [serial_save_mcr], al 13579 0000CFC3 B008 <2> mov al, 0000_1000b 13580 0000CFC5 EE <2> out dx, al ; write MCR 13581 0000CFC6 C3 <2> retn 13582 <2> 13583 <2> ; INP: cx = negated mask of bits to change 13584 <2> ; (if bit is clear, modify corresponding IRQ) 13585 <2> ; bx = mask of what to set bits to (0 = IRQ ON, 1 = IRQ OFF) 13586 <2> ; OUT: bx = mask of bits previously set 13587 <2> ; CHG: ax 13588 <2> set_irq: 13589 0000CFC7 52 <2> push dx 13590 0000CFC8 BA0100 <2> mov dx, 1 13591 <2> .loop: 13592 0000CFCB 85CA <2> test dx, cx 13593 0000CFCD 753E <2> jnz .next 13594 0000CFCF 84D2 <2> test dl, dl 13595 0000CFD1 741E <2> jz .high 13596 <2> 13597 <2> .low: 13598 0000CFD3 E421 <2> in al, 21h ; get PIC configuration 13599 0000CFD5 50 <2> push ax 13600 0000CFD6 F7D2 <2> not dx ; dx = mask of bits to keep 13601 0000CFD8 20D0 <2> and al, dl ; mask to 0 the bit to set 13602 0000CFDA 53 <2> push bx 13603 0000CFDB F7D2 <2> not dx ; dx = mask of bits to change 13604 0000CFDD 20D3 <2> and bl, dl ; get bit state to change to 13605 0000CFDF 08D8 <2> or al, bl ; set this bit state 13606 0000CFE1 E621 <2> out 21h, al ; configure the PIC 13607 0000CFE3 5B <2> pop bx ; = saved states / still to set states 13608 0000CFE4 F7D2 <2> not dx ; dx = mask of bits to keep 13609 0000CFE6 58 <2> pop ax ; = prior config 13610 0000CFE7 20D3 <2> and bl, dl ; clear bits to change 13611 0000CFE9 F7D2 <2> not dx ; dx = mask of bits to change 13612 0000CFEB 20D0 <2> and al, dl ; separate out only bits to change 13613 0000CFED 08C3 <2> or bl, al ; set in bx 13614 0000CFEF EB1C <2> jmp .next 13615 <2> 13616 <2> .high: 13617 0000CFF1 E4A1 <2> in al, 0A1h ; get PIC configuration 13618 0000CFF3 50 <2> push ax 13619 0000CFF4 F7D2 <2> not dx ; dx = mask of bits to keep 13620 0000CFF6 20F0 <2> and al, dh ; mask to 0 the bit to set 13621 0000CFF8 53 <2> push bx 13622 0000CFF9 F7D2 <2> not dx ; dx = mask of bits to change 13623 0000CFFB 20F7 <2> and bh, dh ; get bit state to change to 13624 0000CFFD 08F8 <2> or al, bh ; set this bit state 13625 0000CFFF E6A1 <2> out 0A1h, al ; configure the PIC 13626 0000D001 5B <2> pop bx ; = saved states / still to set states 13627 0000D002 F7D2 <2> not dx ; dx = mask of bits to keep 13628 0000D004 58 <2> pop ax ; = prior config 13629 0000D005 20F7 <2> and bh, dh ; clear bits to change 13630 0000D007 F7D2 <2> not dx ; dx = mask of bits to change 13631 0000D009 20F0 <2> and al, dh ; separate out only bits to change 13632 0000D00B 08C7 <2> or bh, al ; set in bx 13633 <2> 13634 <2> .next: 13635 0000D00D 01D2 <2> add dx, dx 13636 0000D00F 75BA <2> jnz .loop 13637 0000D011 5A <2> pop dx 13638 0000D012 C3 <2> retn 13639 <2> 13640 <2> 13641 <2> ; OUT: NC if successful 13642 <2> ; CY if couldn't unhook 13643 <2> serial_clean_up: 13644 0000D013 E813FF <2> call serial_eoi 13645 0000D016 31C0 <2> xor ax, ax 13646 0000D018 8B16[2609] <2> mov dx, [baseport] 13647 0000D01C 83C204 <2> add dx, 4 ; (base + 4) 13648 <2> ; disconnect the UART from the int line 13649 0000D01F EE <2> out dx, al ; write MCR 13650 0000D020 4A <2> dec dx 13651 0000D021 4A <2> dec dx 13652 0000D022 4A <2> dec dx ; (base + 1) disable UART ints 13653 0000D023 EE <2> out dx, al ; write IER 13654 0000D024 42 <2> inc dx ; (base + 2) 13655 <2> ; disable the FIFOs (old software relies on it) 13656 0000D025 EE <2> out dx, al ; write FCR 13657 <2> 13658 <2> ; reset the UART 13659 0000D026 8B16[2609] <2> mov dx, [baseport] 13660 0000D02A 83C203 <2> add dx, 3 ; (base + 3) read/write LCR 13661 0000D02D B080 <2> mov al, 80h ; DLAB = 1 13662 0000D02F EE <2> out dx, al ; write LCR, make DL register accessible 13663 0000D030 52 <2> push dx 13664 0000D031 8B16[2609] <2> mov dx, [baseport] ; (base) 13665 <2> %if _SERIAL_DL_WORD 13666 <2> mov ax, word [serial_save_dl] 13667 <2> out dx, ax ; write bps rate divisor (DL) 13668 <2> %else 13669 0000D035 A0[1C09] <2> mov al, byte [serial_save_dl] 13670 0000D038 EE <2> out dx, al ; write bps rate divisor low byte (DL) 13671 0000D039 42 <2> inc dx 13672 0000D03A A0[1D09] <2> mov al, byte [serial_save_dl + 1] 13673 0000D03D EE <2> out dx, al ; write bps rate divisor high byte (DL) 13674 <2> %endif 13675 0000D03E 5A <2> pop dx ; (base + 3) write LCR 13676 0000D03F A0[1F09] <2> mov al, byte [serial_save_lcr] 13677 0000D042 EE <2> out dx, al ; write parameters 13678 <2> 13679 0000D043 4A <2> dec dx ; (base + 2) write FCR, read IIR 13680 0000D044 31C0 <2> xor ax, ax 13681 0000D046 EE <2> out dx, al ; (write FCR) disable the FIFOs 13682 0000D047 4A <2> dec dx ; (base + 1) 13683 0000D048 A0[1E09] <2> mov al, byte [serial_save_ier] 13684 0000D04B EE <2> out dx, al ; write to IER 13685 0000D04C 8B1E[1A09] <2> mov bx, [serial_save_irq_off] 13686 <2> ; bits clear for IRQ ON 13687 0000D050 8B0E[1809] <2> mov cx, [serial_save_irq_mask] 13688 <2> ; negated mask of bits to change 13689 0000D054 E870FF <2> call set_irq 13690 0000D057 42 <2> inc dx 13691 0000D058 42 <2> inc dx 13692 0000D059 42 <2> inc dx ; (base + 4) 13693 0000D05A A0[2009] <2> mov al, byte [serial_save_mcr] 13694 0000D05D EE <2> out dx, al ; write MCR 13695 <2> 13696 <2> ; restore int vector 13697 <2> ; OUT: NC if successful 13698 <2> ; CY if couldn't unhook 13699 <2> serial_uninstall_interrupt_handler: 13700 0000D05E BE[F895] <2> mov si, serial_interrupt_handler 13701 0000D061 A0[120C] <2> mov al, byte [serial_installed_intnum] 13702 0000D064 BA0100 <2> mov dx, opt4_int_serial_force >> 16 13703 0000D067 E85802 <2> call UnhookInterruptForce 13704 0000D06A 7208 <2> jc @F 13705 0000D06C 8026[A800]FE <2> clropt [internalflags4], dif4_int_serial_hooked 13706 0000D071 E85B03 <2> call update_inttab_optional 13707 <2> ; (NC) 13708 <2> @@: 13709 0000D074 C3 <2> retn 13710 <2> 13711 <2> 13712 <2> serial_send_char_add_lf: 13713 0000D075 50 <2> push ax 13714 <2> .loop: 13715 0000D076 E80800 <2> call serial_send_char 13716 0000D079 3C0D <2> cmp al, 13 ; add LF after CR; change it if you don't like it 13717 0000D07B B00A <2> mov al, 10 13718 0000D07D 74F7 <2> je .loop 13719 0000D07F 58 <2> pop ax 13720 0000D080 C3 <2> retn 13721 <2> 13722 <2> serial_send_char: 13723 0000D081 56 <2> push si 13724 0000D082 51 <2> push cx 13725 0000D083 52 <2> push dx 13726 0000D084 06 <2> push es 13727 <2> 13728 0000D085 8B36[3009] <2> mov si, word [txhead] 13729 0000D089 8804 <2> mov byte [si],al 13730 0000D08B 46 <2> inc si 13731 <2> ; check for wrap-around 13732 <2> tx_checkwrap 181 0000D08C 81FE[400A] <3> cmp si, txfifo+_TXFIFOSIZE 182 0000D090 7203 <3> jb %%tx_nowrap 183 0000D092 BE[C009] <3> mov si, txfifo 184 <3> %%tx_nowrap: 13733 <2> 13734 0000D095 50 <2> push ax 13735 <2> %if _PM 13736 0000D096 50 <2> push ax 13737 0000D097 E84F00 <2> call push_if 13738 <2> %else 13739 <2> pushf 13740 <2> %endif 13741 0000D09A 3936[3209] <2> cmp word [txtail], si 13742 0000D09E 7537 <2> jne .no_wait 13743 <2> 13744 <2> ; Because we enable the tx empty interrupt 13745 <2> ; when putting data into the buffer, it 13746 <2> ; should still be enabled here when the 13747 <2> ; buffer is currently full. So we only 13748 <2> ; need to wait for the interrupt to 13749 <2> ; occur and be processed by our handler. 13750 <2> 13751 0000D0A0 31C9 <2> xor cx, cx 13752 0000D0A2 BA4000 <2> mov dx, 40h ; 0040h is a bimodal segment/selector 13753 0000D0A5 8EC2 <2> mov es, dx 13754 <2> .wait_reset_dx: 13755 0000D0A7 268B166C00 <2> mov dx, word [es:6Ch] 13756 <2> 13757 <2> .wait: 13758 0000D0AC E86CF0 <2> call idle 13759 <2> %if _PM 13760 0000D0AF E85A00 <2> call pop_if 13761 0000D0B2 50 <2> push ax 13762 0000D0B3 E83300 <2> call push_if 13763 <2> %else 13764 <2> popf 13765 <2> pushf 13766 <2> %endif 13767 <2> 13768 0000D0B6 3B36[3209] <2> cmp si, word [txtail] 13769 0000D0BA 751B <2> jne .no_wait 13770 <2> 13771 0000D0BC 263B166C00 <2> cmp dx, word [es:6Ch] 13772 0000D0C1 74E9 <2> je .wait 13773 0000D0C3 41 <2> inc cx 13774 0000D0C4 83F95A <2> cmp cx, 5 * 18 13775 0000D0C7 72DE <2> jb .wait_reset_dx 13776 <2> 13777 0000D0C9 8026[7D00]BF <2> clropt [options], enable_serial 13778 0000D0CE BA[6969] <2> mov dx, msg.no_progress 13779 0000D0D1 E81CED <2> call putsz 13780 0000D0D4 E9292F <2> jmp cmd3 13781 <2> 13782 <2> .no_wait: 13783 0000D0D7 8936[3009] <2> mov word [txhead], si 13784 0000D0DB FA <2> cli ; try to avoid interrupt while emptying buffer 13785 <2> ; test if we can send a byte right away 13786 <2> %if 0 ; int_tx checks for THRE ...- 13787 <2> mov dx, [baseport] 13788 <2> add dx, 5 ; (base + 5) 13789 <2> in al, dx ; read LSR 13790 <2> test al, 20h ; Transmitter Holding Register Empty ? 13791 <2> jz .crank ; no, just enable the interrupt --> 13792 <2> %endif 13793 <2> 13794 <2> ; call int_tx ; send bytes, enables or disables the tx interrupt 13795 0000D0DC 0E <2> push cs 13796 0000D0DD E84C00 <2> call code_to_int_tx 13797 <2> 13798 <2> %if 0 ; -... and sets up the interrupt accordingly 13799 <2> jmp .dontcrank 13800 <2> .crank: 13801 <2> ; crank it up 13802 <2> ; note that this might not work with some very old 8250s 13803 <2> add dx, 1 - 5 ; (base + 1) write IER 13804 <2> mov al, 0000_0011b 13805 <2> out dx, al ; enable tx empty interrupt 13806 <2> .dontcrank: 13807 <2> %endif 13808 <2> %if _PM 13809 0000D0E0 E82900 <2> call pop_if 13810 <2> %else 13811 <2> popf 13812 <2> %endif 13813 0000D0E3 58 <2> pop ax 13814 0000D0E4 07 <2> pop es 13815 0000D0E5 5A <2> pop dx 13816 0000D0E6 59 <2> pop cx 13817 0000D0E7 5E <2> pop si 13818 0000D0E8 C3 <2> retn 13819 <2> 13820 <2> %if _PM 13821 <2> push_if: 13822 <2> lframe near 13823 <2> lpar word, flags 13824 <2> lpar_return 13825 0000D0E9 5589E5 <2> lenter 13826 0000D0EC E80EC1 <2> call ispm 13827 0000D0EF 7515 <2> jnz .86m 13828 <2> .pm: 13829 0000D0F1 50 <2> push ax 13830 0000D0F2 B80209 <2> mov ax, 0902h 13831 0000D0F5 CD31 <2> int 31h 13832 0000D0F7 84C0 <2> test al, al ; 0 = disabled ? 13833 0000D0F9 B80000 <2> mov ax, 0 ; initialise to IF=0 13834 0000D0FC 7402 <2> jz @F 13835 0000D0FE B402 <2> mov ah, 2 ; else, IF=1 13836 <2> @@: 13837 0000D100 894604 <2> mov word [bp + ?flags], ax 13838 0000D103 58 <2> pop ax 13839 0000D104 EB04 <2> jmp .end 13840 <2> .86m: 13841 0000D106 9C <2> pushf 13842 0000D107 8F4604 <2> pop word [bp + ?flags] 13843 <2> .end: 13844 0000D10A 5D <2> lleave 13845 0000D10B C3 <2> lret 13846 <2> 13847 <2> pop_if: 13848 <2> lframe near 13849 <2> lpar word, flags 13850 0000D10C 5589E5 <2> lenter 13851 0000D10F E8EBC0 <2> call ispm 13852 0000D112 7510 <2> jnz .86m 13853 0000D114 50 <2> push ax 13854 0000D115 B80009 <2> mov ax, 0900h ; initialise to disable VIF = 0900h 13855 0000D118 F6460502 <2> test byte [bp + ?flags + 1], 2 13856 0000D11C 7401 <2> jz @F ; if to disable --> 13857 0000D11E 40 <2> inc ax ; else enable VIF = 0901h 13858 <2> @@: 13859 0000D11F CD31 <2> int 31h 13860 0000D121 58 <2> pop ax 13861 0000D122 EB04 <2> jmp .end 13862 <2> .86m: 13863 0000D124 FF7604 <2> push word [bp + ?flags] 13864 0000D127 9D <2> popf 13865 <2> .end: 13866 0000D128 5D <2> lleave 13867 0000D129 C20200 <2> lret 13868 <2> %endif 13869 <2> 13870 <2> code_to_int_tx: 13871 0000D12C 2EFF36[46D1] <2> push word [cs:.entry_retf_word] 13872 <2> %if _PM 13873 <2> ; near return address 13874 0000D131 E8C9C0 <2> call ispm 13875 0000D134 7506 <2> jnz .rm 13876 <2> 13877 0000D136 FF36[D688] <2> push word [cssel] 13878 0000D13A EB01 <2> jmp @F 13879 <2> 13880 <2> %endif 13881 <2> .rm: 13882 0000D13C 16 <2> push ss 13883 <2> @@: 13884 0000D13D 2EFF36[44D1] <2> push word [cs:.int_tx_word] 13885 0000D142 CB <2> retf ; jump to lDEBUG_DATA_ENTRY:int_tx 13886 <2> 13887 0000D143 00 <2> align 2, db 0 13888 <2> .int_tx_word: 13889 0000D144 [5F96] <2> dw int_tx 13890 <2> .entry_retf_word: 13891 0000D146 [FF96] <2> dw entry_retf 13892 <2> 13893 <2> 13894 <2> usesection lDEBUG_DATA_ENTRY 13895 <2> 13896 <2> entry_retf: 13897 000096FF CB <2> retf 9349 9350 9351 %include "ints.asm" 9352 <1> 9353 <1> %if 0 9354 <1> 9355 <1> Interrupt hooking and unhooking 9356 <1> 9357 <1> 2021 by C. Masloch 9358 <1> 9359 <1> Usage of the works is permitted provided that this 9360 <1> instrument is retained with the works, so that any entity 9361 <1> that uses the works is notified of this instrument. 9362 <1> 9363 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9364 <1> 9365 <1> %endif 9366 <1> 9367 <1> usesection lDEBUG_CODE 9368 <1> 9369 <1> 9370 <1> ; INP: 86 Mode ss = word [pspdbg] = cs for handler 9371 <1> ; si -> handler entrypoint 9372 <1> ; dword [si + ieNext] = storage for next vector 9373 <1> ; al = interrupt number 9374 <1> ; CHG: ax, bx, cx, dx 9375 <1> ; STT: ss = ds (= word [pspdbg] if in 86 Mode) 9376 <1> install_86m_interrupt_handler: 9377 <1> %if _PM 9378 0000D148 E8B2C0 <1> call ispm 9379 0000D14B 7518 <1> jnz .rm 9380 <1> 9381 0000D14D 93 <1> xchg ax, bx ; bl = interrupt number 9382 0000D14E B80002 <1> mov ax, 0200h 9383 0000D151 CD31 <1> int 31h ; cx:dx = interrupt vector 9384 0000D153 895402 <1> mov word [si + ieNext], dx 9385 0000D156 894C04 <1> mov word [si + ieNext + 2], cx 9386 <1> 9387 0000D159 B80102 <1> mov ax, 0201h 9388 <1> ; bl still = interrupt number 9389 0000D15C 8B0E[A60A] <1> mov cx, word [pspdbg] ; cx => lDEBUG_DATA_ENTRY 9390 0000D160 89F2 <1> mov dx, si ; cx:dx -> our entrypoint 9391 0000D162 CD31 <1> int 31h ; change vector to our handler 9392 0000D164 C3 <1> retn 9393 <1> 9394 <1> .rm: 9395 <1> %endif 9396 <1> 9397 0000D165 E876D5 <1> call InDos 9398 0000D168 741E <1> jz .notindos 9399 0000D16A 06 <1> push es 9400 0000D16B 1E <1> push ds 9401 0000D16C 31DB <1> xor bx, bx 9402 0000D16E 8EDB <1> mov ds, bx 9403 0000D170 88C3 <1> mov bl, al 9404 0000D172 01DB <1> add bx, bx 9405 0000D174 01DB <1> add bx, bx ; ds:bx -> interrupt vector 9406 0000D176 C417 <1> les dx, [bx] ; es:dx = vector 9407 0000D178 36895402 <1> mov word [ss:si + ieNext], dx 9408 0000D17C 368C4404 <1> mov word [ss:si + ieNext + 2], es 9409 <1> ; save prior vector 9410 0000D180 8937 <1> mov word [bx], si 9411 0000D182 8C5702 <1> mov word [bx + 2], ss ; ss => lDEBUG_DATA_ENTRY 9412 <1> ; change vector to our handler 9413 0000D185 1F <1> pop ds 9414 0000D186 07 <1> pop es 9415 0000D187 C3 <1> retn 9416 <1> 9417 <1> .notindos: 9418 0000D188 06 <1> push es 9419 0000D189 B435 <1> mov ah, 35h 9420 0000D18B CD21 <1> int 21h 9421 0000D18D 895C02 <1> mov word [si + ieNext], bx 9422 0000D190 8C4404 <1> mov word [si + ieNext + 2], es 9423 0000D193 07 <1> pop es 9424 0000D194 B425 <1> mov ah, 25h 9425 0000D196 89F2 <1> mov dx, si ; ds => lDEBUG_DATA_ENTRY 9426 0000D198 CD21 <1> int 21h ; change vector to our handler 9427 0000D19A C3 <1> retn 9428 <1> 9429 <1> 9430 <1> %if _PM 9431 <1> get_86m_interrupt_handler_no_dos: 9432 0000D19B E85FC0 <1> call ispm 9433 0000D19E 7519 <1> jnz get_86m_interrupt_handler.rm_indos 9434 <1> %endif 9435 <1> 9436 <1> ; INP: al = interrupt number 9437 <1> ; OUT: dx:bx = 86 Mode far pointer 9438 <1> ; CHG: ah 9439 <1> get_86m_interrupt_handler: 9440 <1> %if _PM 9441 0000D1A0 E85AC0 <1> call ispm 9442 0000D1A3 750F <1> jnz .rm 9443 <1> 9444 0000D1A5 50 <1> push ax 9445 0000D1A6 51 <1> push cx 9446 0000D1A7 93 <1> xchg ax, bx ; bl = interrupt number 9447 0000D1A8 B80002 <1> mov ax, 0200h 9448 0000D1AB CD31 <1> int 31h ; cx:dx = interrupt vector 9449 0000D1AD 87CB <1> xchg cx, bx ; bx:dx 9450 0000D1AF 87DA <1> xchg bx, dx ; dx:bx 9451 0000D1B1 59 <1> pop cx 9452 0000D1B2 58 <1> pop ax 9453 0000D1B3 C3 <1> retn 9454 <1> 9455 <1> .rm: 9456 <1> %endif 9457 <1> 9458 0000D1B4 E827D5 <1> call InDos 9459 0000D1B7 7412 <1> jz .notindos 9460 <1> %ifn _PM 9461 <1> get_86m_interrupt_handler_no_dos: equ $ 9462 <1> %endif 9463 <1> .rm_indos: 9464 0000D1B9 1E <1> push ds 9465 0000D1BA 31DB <1> xor bx, bx 9466 0000D1BC 8EDB <1> mov ds, bx 9467 0000D1BE 88C3 <1> mov bl, al 9468 0000D1C0 01DB <1> add bx, bx 9469 0000D1C2 01DB <1> add bx, bx ; ds:bx -> interrupt vector 9470 0000D1C4 8B5702 <1> mov dx, word [bx + 2] 9471 0000D1C7 8B1F <1> mov bx, word [bx] 9472 0000D1C9 1F <1> pop ds 9473 0000D1CA C3 <1> retn 9474 <1> 9475 <1> .notindos: 9476 0000D1CB 06 <1> push es 9477 0000D1CC B435 <1> mov ah, 35h 9478 0000D1CE CD21 <1> int 21h 9479 0000D1D0 8CC2 <1> mov dx, es 9480 0000D1D2 07 <1> pop es 9481 0000D1D3 C3 <1> retn 9482 <1> 9483 <1> 9484 <1> ; INP: al = interrupt number 9485 <1> ; OUT: ZR if offset = -1 or segment = 0 9486 <1> ; NZ else 9487 <1> ; CHG: ah, dx, bx 9488 <1> intchk: 9489 0000D1D4 E8C9FF <1> call get_86m_interrupt_handler 9490 0000D1D7 43 <1> inc bx 9491 0000D1D8 7402 <1> jz @F ; was 0FFFFh --> 9492 0000D1DA 85D2 <1> test dx, dx 9493 <1> ; jz @F ; was 0000h --> 9494 <1> @@: 9495 0000D1DC C3 <1> retn 9496 <1> 9497 <1> 9498 <1> ; INP: al = interrupt number 9499 <1> ; dx:bx = 86 Mode far pointer 9500 <1> ; CHG: ah 9501 <1> set_86m_interrupt_handler: 9502 0000D1DD 50 <1> push ax 9503 0000D1DE 53 <1> push bx 9504 0000D1DF 51 <1> push cx 9505 0000D1E0 52 <1> push dx 9506 <1> %if _PM 9507 0000D1E1 E819C0 <1> call ispm 9508 0000D1E4 750A <1> jnz .rm 9509 <1> 9510 0000D1E6 93 <1> xchg ax, bx ; bl = interrupt number, 9511 <1> ; dx:ax = vector 9512 0000D1E7 92 <1> xchg ax, dx ; ax:dx 9513 0000D1E8 91 <1> xchg cx, ax ; cx:dx 9514 0000D1E9 B80102 <1> mov ax, 0201h 9515 0000D1EC CD31 <1> int 31h ; cx:dx = interrupt vector 9516 0000D1EE EB21 <1> jmp .ret 9517 <1> 9518 <1> .rm: 9519 <1> %endif 9520 <1> 9521 0000D1F0 1E <1> push ds 9522 0000D1F1 E8EAD4 <1> call InDos 9523 0000D1F4 7412 <1> jz .notindos 9524 0000D1F6 53 <1> push bx 9525 0000D1F7 31DB <1> xor bx, bx 9526 0000D1F9 8EDB <1> mov ds, bx 9527 0000D1FB 88C3 <1> mov bl, al 9528 0000D1FD 01DB <1> add bx, bx 9529 0000D1FF 01DB <1> add bx, bx ; ds:bx -> interrupt vector 9530 0000D201 895702 <1> mov word [bx + 2], dx 9531 0000D204 8F07 <1> pop word [bx] 9532 0000D206 EB08 <1> jmp .ret_ds 9533 <1> 9534 <1> .notindos: 9535 0000D208 87DA <1> xchg bx, dx 9536 0000D20A 8EDB <1> mov ds, bx ; ds:dx = vector 9537 0000D20C B425 <1> mov ah, 25h 9538 0000D20E CD21 <1> int 21h 9539 <1> .ret_ds: 9540 0000D210 1F <1> pop ds 9541 <1> .ret: 9542 0000D211 5A <1> pop dx 9543 0000D212 59 <1> pop cx 9544 0000D213 5B <1> pop bx 9545 0000D214 58 <1> pop ax 9546 0000D215 C3 <1> retn 9547 <1> 9548 <1> 9549 <1> ; INP: dx = 86 Mode segment to access 9550 <1> ; OUT: es => segment 9551 <1> ; CHG: - 9552 <1> %if _PM 9553 <1> setes2dx: 9554 0000D216 E8E4BF <1> call ispm 9555 0000D219 7508 <1> jnz @F 9556 0000D21B 53 <1> push bx 9557 0000D21C E8D8C6 <1> call setrmsegm 9558 0000D21F 8EC3 <1> mov es, bx 9559 0000D221 5B <1> pop bx 9560 0000D222 C3 <1> retn 9561 <1> 9562 <1> @@: 9563 0000D223 8EC2 <1> mov es, dx 9564 0000D225 C3 <1> retn 9565 <1> %endif ; _PM 9566 <1> 9567 <1> 9568 <1> ; INP: ds:si -> source IISP header (or pseudo header) 9569 <1> ; es:di -> destination IISP header 9570 <1> ; OUT: EI 9571 <1> ; si and di both incremented by 6 9572 <1> ; CHG: - 9573 <1> ; STT: UP 9574 <1> update_iisp_header: 9575 0000D226 50 <1> push ax 9576 0000D227 51 <1> push cx 9577 0000D228 52 <1> push dx 9578 0000D229 57 <1> push di 9579 0000D22A 56 <1> push si 9580 0000D22B 06 <1> push es 9581 <1> %if _PM 9582 0000D22C E8828B <1> call selector_to_segment 9583 <1> %endif 9584 0000D22F 1E <1> push ds 9585 0000D230 16 <1> push ss 9586 0000D231 1F <1> pop ds 9587 <1> 9588 <1> findinstalleddebugger: 9589 0000D232 B02D <1> mov al, 2Dh 9590 0000D234 53 <1> push bx 9591 0000D235 E89CFF <1> call intchk 9592 0000D238 5B <1> pop bx 9593 0000D239 741E <1> jz .zero 9594 <1> 9595 0000D23B F606[8700]08 <1> testopt [options3], opt3_no_call_update 9596 0000D240 7517 <1> jnz .zero 9597 <1> 9598 0000D242 8A26[4981] <1> mov ah, byte [try_debugger_amis_multiplex_number] 9599 0000D246 E81400 <1> call .check 9600 0000D249 7305 <1> jnc @F 9601 <1> 9602 0000D24B B4FF <1> mov ah, 0FFh ; start with multiplex number 0FFh 9603 <1> .loop: 9604 0000D24D E80D00 <1> call .check 9605 <1> @@: 9606 0000D250 B030 <1> mov al, 30h ; al = 30h to indicate found, ah = multiplex number 9607 0000D252 732E <1> jnc .end 9608 0000D254 80EC01 <1> sub ah, 1 ; search is backward (to find latest installed first), from 0FFh to 00h including 9609 0000D257 73F4 <1> jnc .loop ; try next if we didn't check all yet --> 9610 <1> 9611 <1> .zero: 9612 0000D259 31C0 <1> xor ax, ax ; al = 0 to indicate none found 9613 0000D25B EB25 <1> jmp .end ; If not found, continue --> 9614 <1> 9615 <1> 9616 <1> ; INP: ah = multiplex number to check 9617 <1> ; ds = ss = cs 9618 <1> ; OUT: CY if multiplex number unused or no signature match, 9619 <1> ; bp, ah, ds unmodified 9620 <1> ; NC if match found, 9621 <1> ; ah = multiplex number (unmodified) 9622 <1> ; CHG: si, di, es, cx, dx 9623 <1> .check: 9624 0000D25D F606[A800]08 <1> testopt [internalflags4], dif4_int_2D_hooked 9625 0000D262 7406 <1> jz @F 9626 0000D264 3A26[6081] <1> cmp ah, byte [amis_multiplex_number] 9627 0000D268 7416 <1> je .notfound ; do not use our own multiplexer --> 9628 <1> @@: 9629 0000D26A B000 <1> mov al, 00h ; AMIS installation check 9630 <1> %if _PM 9631 0000D26C E8F8C0 <1> call call_int2D 9632 <1> %else 9633 <1> int 2Dh ; AMIS (or "DOS reserved" = iret if no AMIS present) 9634 <1> %endif 9635 0000D26F 3CFF <1> cmp al, 0FFh 9636 0000D271 750D <1> jne .notfound 9637 0000D273 BE[1881] <1> mov si, debuggeramissig ; ds:si -> our AMIS name strings 9638 <1> %if _PM 9639 0000D276 E89DFF <1> call setes2dx 9640 <1> %else 9641 <1> mov es, dx ; es:di -> name strings of AMIS multiplexer that just answered 9642 <1> %endif 9643 0000D279 B90800 <1> mov cx, 8 ; Ignore description, only compare vendor and program name 9644 0000D27C F3A7 <1> repe cmpsw 9645 0000D27E 7401 <1> je .checkret ; ZR, NC = match --> 9646 <1> .notfound: 9647 0000D280 F9 <1> stc ; NZ, CY no match 9648 <1> .checkret: 9649 0000D281 C3 <1> retn 9650 <1> 9651 <1> .end: 9652 0000D282 A3[1681] <1> mov word [debuggerfunction], ax 9653 <1> 9654 0000D285 1F <1> pop ds ; must be not using scratchsel ! 9655 <1> %if _PM 9656 0000D286 5A <1> pop dx 9657 0000D287 E88CFF <1> call setes2dx ; this one uses scratchsel 9658 <1> %else 9659 <1> pop es 9660 <1> %endif 9661 0000D28A 5E <1> pop si 9662 0000D28B 5F <1> pop di 9663 0000D28C 5A <1> pop dx 9664 0000D28D 59 <1> pop cx 9665 <1> ; push ax 9666 0000D28E 36A1[1681] <1> mov ax, word [ss:debuggerfunction] 9667 0000D292 85C0 <1> test ax, ax ; found the debugger ? 9668 0000D294 741F <1> jz @F ; no --> 9669 <1> %if _PM 9670 0000D296 E864BF <1> call ispm 9671 0000D299 7512 <1> jnz .86m 9672 <1> [cpu 286] 9673 0000D29B 06 <1> push es ; es 9674 0000D29C E8128B <1> call selector_to_segment ; convert to segment 9675 0000D29F 1E <1> push ds ; ds 9676 0000D2A0 E80E8B <1> call selector_to_segment ; convert to segment 9677 0000D2A3 6A2D <1> push word 2Dh ; int 2Dh 9678 0000D2A5 55 <1> push bp ; bp 9679 0000D2A6 E829C0 <1> call intcall_return_parameter_es_parameter_ds 9680 0000D2A9 83C404 <1> add sp, 4 ; discard returned ds, es 9681 <1> __CPU__ 9682 0000D2AC A9 <1> db __TEST_IMM16 ; (skip int) 9683 <1> %endif 9684 <1> .86m: 9685 0000D2AD CD2D <1> int 2Dh ; call its Update IISP Header function 9686 0000D2AF 3CFF <1> cmp al, 0FFh ; supported ? 9687 0000D2B1 58 <1> pop ax 9688 0000D2B2 740D <1> je .ret ; yes. done --> 9689 0000D2B4 A8 <1> db __TEST_IMM8 ; (skip pop) 9690 <1> @@: 9691 0000D2B5 58 <1> pop ax ; restore ax, then do manual update 9692 <1> %if _PM 9693 0000D2B6 50 <1> push ax 9694 0000D2B7 E82FFE <1> call push_if 9695 <1> %else 9696 <1> pushf 9697 <1> %endif 9698 0000D2BA FA <1> cli ; try to rest while updating chain 9699 0000D2BB A7 <1> cmpsw ; skip over first word (entrypoint) 9700 <1> ; (generally xxEBh or 0EA90h) 9701 0000D2BC A5 <1> movsw 9702 0000D2BD A5 <1> movsw ; transfer source ieNext to dest ieNext 9703 <1> %if _PM 9704 0000D2BE E84BFE <1> call pop_if 9705 <1> %else 9706 <1> popf 9707 <1> %endif 9708 <1> .ret: 9709 0000D2C1 C3 <1> retn 9710 <1> 9711 <1> 9712 <1> ; INP: al = interrupt number 9713 <1> ; ds:si-> interrupt entry 9714 <1> ; dx = flag in word [options4 + 2] to force 9715 <1> ; dx = -1 to force unconditionally 9716 <1> ; OUT: es = ss 9717 <1> ; CY if unhooking failed, 9718 <1> ; ds:si preserved 9719 <1> ; NC if unhooking successful 9720 <1> ; CHG: ah, di, si 9721 <1> ; STT: ds = ss => data entry segment/selector 9722 <1> ; word [pspdbg] = data entry 86 Mode segment 9723 <1> UnhookInterruptForce: 9724 0000D2C2 E80F00 <1> call UnhookInterrupt 9725 0000D2C5 730C <1> jnc .ret 9726 0000D2C7 83FAFF <1> cmp dx, -1 9727 0000D2CA 7414 <1> je UnhookInterrupt.easy 9728 0000D2CC 8516[8A00] <1> test word [options4 + 2], dx 9729 0000D2D0 750E <1> jnz UnhookInterrupt.easy 9730 0000D2D2 F9 <1> stc 9731 <1> .ret: 9732 0000D2D3 C3 <1> retn 9733 <1> 9734 <1> 9735 <1> ; INP: al = interrupt number 9736 <1> ; ds:si-> interrupt entry 9737 <1> ; OUT: es = ss 9738 <1> ; CY if unhooking failed, 9739 <1> ; ds:si preserved 9740 <1> ; NC if unhooking successful 9741 <1> ; CHG: ah, di, si 9742 <1> ; STT: ds = ss => data entry segment/selector 9743 <1> ; word [pspdbg] = data entry 86 Mode segment 9744 <1> UnhookInterrupt: 9745 <1> ; UnhookInterruptSim (below) only checks if it's possible to unhook this interrupt. 9746 <1> ; This function really unhooks the interrupt if possible. 9747 <1> ; 9748 <1> ; This is to cover the situation when some of the hooked interrupts can unhook, 9749 <1> ; but some can't. If the uninstaller would start to unhook the interrupts and then 9750 <1> ; catch the interrupt that can't be unhooked the user would end up with a dead TSR 9751 <1> ; that's uninstalled halfway. Very bad. 9752 <1> ; 9753 <1> ; "Simulating" the unhooking first and checking if all interrupts can unhook 9754 <1> ; usually will not return such a state. 9755 0000D2D4 E82000 <1> call UnhookInterruptSim 9756 0000D2D7 7215 <1> jc .ret ; bad. --> (CY) 9757 0000D2D9 7405 <1> jz .easy 9758 <1> .hard: 9759 <1> ; "hard" case: UnhookInterruptSim has however already done the work, 9760 <1> ; so the hard case is here indeed easier than the easy case. 9761 0000D2DB E848FF <1> call update_iisp_header ; copies our stored pointer into the other's entry 9762 0000D2DE EB0D <1> jmp .ret_NC 9763 <1> .easy: 9764 0000D2E0 52 <1> push dx 9765 0000D2E1 53 <1> push bx 9766 0000D2E2 8B5404 <1> mov dx, word [si + ieNext + 2] 9767 0000D2E5 8B5C02 <1> mov bx, word [si + ieNext] ; get what we stored in the entry 9768 0000D2E8 E8F2FE <1> call set_86m_interrupt_handler ; easy case - just reset to the value stored 9769 0000D2EB 5B <1> pop bx 9770 0000D2EC 5A <1> pop dx 9771 <1> .ret_NC: 9772 0000D2ED F8 <1> clc 9773 <1> .ret: 9774 0000D2EE 16 <1> push ss 9775 0000D2EF 07 <1> pop es 9776 0000D2F0 C3 <1> retn 9777 <1> 9778 <1> 9779 <1> ; INP: al = interrupt number 9780 <1> ; ds:si-> interrupt entry 9781 <1> ; dx = flag in word [options4 + 2] to force 9782 <1> ; OUT: NC if no error (hard, easy, or forced case) 9783 <1> ; CY if error 9784 <1> ; CHG: ah, es, di 9785 <1> ; STT: ds = ss => data entry segment/selector 9786 <1> ; word [pspdbg] = data entry 86 Mode segment 9787 <1> UnhookInterruptForceSim: 9788 0000D2F1 8516[8A00] <1> test word [options4 + 2], dx 9789 0000D2F5 751D <1> jnz UnhookInterruptSim.retn ; --> (NC) 9790 <1> 9791 <1> 9792 <1> ; INP: ds:si-> IISP entry 9793 <1> ; al = interrupt number 9794 <1> ; OUT: NC if no error (either hard or easy case), 9795 <1> ; ZR if easy case, 9796 <1> ; ds:si-> our IISP entry, containing stored interrupt 9797 <1> ; NZ if hard case, 9798 <1> ; ds:si-> our IISP entry 9799 <1> ; es:di-> IISP entry to modify 9800 <1> ; implies dword [es:di + 2] = far pointer to ours 9801 <1> ; CY if error (not first handler and no IISP chain to this handler) 9802 <1> ; CHG: ah, es, di 9803 <1> ; STT: ds = ss => data entry segment/selector 9804 <1> ; word [pspdbg] = data entry 86 Mode segment 9805 <1> UnhookInterruptSim: 9806 0000D2F7 52 <1> push dx 9807 0000D2F8 53 <1> push bx 9808 <1> 9809 <1> ; harden this, check we are an IISP entry 9810 0000D2F9 1E <1> push ds 9811 0000D2FA 07 <1> pop es ; es => our handler segment 9812 0000D2FB 89F3 <1> mov bx, si ; es:bx -> our handler 9813 0000D2FD E8A100 <1> call IsIISPEntry? ; does it have an IISP header ? 9814 0000D300 753D <1> jne .fail ; fail if not 9815 <1> 9816 0000D302 E89BFE <1> call get_86m_interrupt_handler ; get current vector 9817 0000D305 39DE <1> cmp si, bx ; our pointer ? 9818 0000D307 750C <1> jne .hard 9819 0000D309 3916[A60A] <1> cmp word [pspdbg], dx ; our segment ? 9820 0000D30D 7506 <1> jne .hard 9821 <1> 9822 0000D30F 80E400 <1> and ah, 00h ; NC, ZR 9823 0000D312 5B <1> pop bx 9824 0000D313 5A <1> pop dx 9825 <1> .retn: 9826 0000D314 C3 <1> retn 9827 <1> 9828 <1> .hard: 9829 <1> %if _PM 9830 0000D315 E8FEFE <1> call setes2dx 9831 <1> %else 9832 <1> mov es, dx 9833 <1> %endif 9834 <1> 9835 <1> ; INP: ds:si-> IISP entry 9836 <1> ; es:bx-> current interrupt entry 9837 <1> ; OUT: CY if error 9838 <1> ; NC, NZ if no error, 9839 <1> ; ds:si-> our IISP entry 9840 <1> ; es:di-> IISP entry to modify 9841 <1> ; implies dword [es:di + 2] = far pointer to ours 9842 <1> ; CHG: ah, es, di, (bx, dx) 9843 <1> ; STT: ds = ss => data entry segment/selector 9844 <1> ; word [pspdbg] = data entry 86 Mode segment 9845 0000D318 E87000 <1> call SearchIISPChain 9846 0000D31B 7508 <1> jne .harder 9847 <1> .found: ; found reference to our interrupt handler 9848 0000D31D 89DF <1> mov di, bx ; es:di-> IISP entry that references our's 9849 0000D31F 80CCFF <1> or ah, 0FFh ; NC, NZ 9850 0000D322 5B <1> pop bx 9851 0000D323 5A <1> pop dx 9852 0000D324 C3 <1> retn 9853 <1> 9854 <1> .harder: ; Desperate attempt to find IISP entry that references ours by 9855 <1> ; searching through the interrupts hooked by other AMIS TSRs. Note 9856 <1> ; that the plexer loop will find and search through the list of 9857 <1> ; hooked interrupts of the uninstalling TSR itself, but this causes 9858 <1> ; no trouble. 9859 <1> ; INP: ds:si-> IISP entry 9860 <1> ; OUT: CY if error 9861 <1> ; NC, NZ if no error, 9862 <1> ; ds:si-> our IISP entry 9863 <1> ; es:di-> IISP entry to modify 9864 <1> ; implies dword [es:di + 2] = far pointer to ours 9865 <1> ; CHG: ah, es, di, (bx, dx) 9866 <1> ; STT: ds = ss => data entry segment/selector 9867 <1> ; word [pspdbg] = data entry 86 Mode segment 9868 0000D325 50 <1> push ax ; register with interrupt number last 9869 <1> 9870 0000D326 B02D <1> mov al, 2Dh 9871 0000D328 E8A9FE <1> call intchk ; ZR if offset = -1 or segment = 0 9872 <1> ; CHG: ax, dx, bx 9873 0000D32B 7411 <1> jz .fail_ax 9874 <1> 9875 0000D32D 31C0 <1> xor ax, ax 9876 <1> .loopplex: 9877 0000D32F B000 <1> mov al, 00h ; AMIS installation check 9878 0000D331 51 <1> push cx 9879 <1> ; function 0 changes dx, di, cx, al 9880 <1> %if _PM 9881 0000D332 E832C0 <1> call call_int2D 9882 <1> %else 9883 <1> int 2Dh ; enquire whether there's anyone 9884 <1> %endif 9885 0000D335 59 <1> pop cx ; but we don't care who it might be 9886 0000D336 FEC0 <1> inc al ; = FFh ? 9887 0000D338 7409 <1> jz .search ; yes, it is in use --> 9888 <1> .nextplex: 9889 0000D33A FEC4 <1> inc ah 9890 0000D33C 75F1 <1> jnz .loopplex ; try next multiplexer --> 9891 <1> .fail_ax: 9892 0000D33E 58 <1> pop ax 9893 <1> .fail: ; IISP incompatible TSR between current interrupt entry and our entry 9894 <1> ; and no AMIS compatible TSR installed on top of our entry 9895 0000D33F F9 <1> stc 9896 0000D340 5B <1> pop bx 9897 0000D341 5A <1> pop dx 9898 0000D342 C3 <1> retn 9899 <1> 9900 <1> ; INP: ah = multiplex number of AMIS TSR to search through 9901 <1> ; ss:sp-> interrupt number (byte), must be preserved 9902 <1> ; CHG: es, di, dx, bx 9903 <1> .search: 9904 0000D343 B004 <1> mov al, 04h 9905 0000D345 5B <1> pop bx 9906 0000D346 53 <1> push bx ; low byte is the interrupt number 9907 <1> ; function 4 changes dx, bx, al 9908 <1> %if _PM 9909 0000D347 E81DC0 <1> call call_int2D 9910 <1> %else 9911 <1> int 2Dh 9912 <1> %endif 9913 0000D34A 3C03 <1> cmp al, 03h ; returned its interrupt entry ? 9914 <1> ; RBIL doesn't explicitly state that this interrupt entry has to 9915 <1> ; be IISP compatible. But I'm too lazy to look up the older AMIS, 9916 <1> ; and SearchIISPChain checks the interrupt entry anyway. 9917 0000D34C 742B <1> je .search_dxbx 9918 0000D34E 3C04 <1> cmp al, 04h ; returned list of hooked interrupts ? 9919 0000D350 75E8 <1> jne .nextplex ; no, try next multiplexer --> 9920 0000D352 89DF <1> mov di, bx 9921 0000D354 5B <1> pop bx 9922 0000D355 53 <1> push bx ; bl = interrupt number 9923 0000D356 88D8 <1> mov al, bl 9924 <1> .search_intlist_seg: 9925 <1> %if _PM 9926 0000D358 E8BBFE <1> call setes2dx 9927 <1> %else 9928 <1> mov es, dx ; es:di-> list 9929 <1> %endif 9930 <1> .search_intlist: ; Search the returned list for the required interrupt number. 9931 0000D35B AE <1> scasb ; our interrupt number ? 9932 0000D35C 740A <1> je .search_found_intlist 9933 0000D35E 26807DFF2D <1> cmp byte [es:di-1], 2Dh ; was last in list ? 9934 0000D363 74D5 <1> je .nextplex 9935 0000D365 AF <1> scasw ; skip pointer 9936 0000D366 EBF3 <1> jmp short .search_intlist ; try next entry --> 9937 <1> 9938 <1> .search_found_intlist: 9939 0000D368 268B1D <1> mov bx, word [es:di] ; dx:bx = es:bx -> IISP entry 9940 0000D36B AF <1> scasw ; skip pointer 9941 0000D36C 52 <1> push dx ; preserve dx for .search_intlist_seg 9942 0000D36D E81B00 <1> call SearchIISPChain 9943 0000D370 5A <1> pop dx 9944 0000D371 740E <1> je .search_found ; found entry --> 9945 <1> ; This specific jump supports TSRs that hook the same 9946 <1> ; interrupt more than once; jumping to .nextplex instead 9947 <1> ; (as previously) aborts the search after the first match 9948 <1> ; in the interrupt list. This support might become useful. 9949 0000D373 3C2D <1> cmp al, 2Dh ; was last in list ? 9950 0000D375 74C3 <1> je .nextplex 9951 0000D377 EBDF <1> jmp short .search_intlist_seg 9952 <1> 9953 <1> .search_dxbx: 9954 <1> %if _PM 9955 0000D379 E89AFE <1> call setes2dx 9956 <1> %else 9957 <1> mov es, dx ; es:bx-> (IISP) interrupt entry 9958 <1> %endif 9959 <1> ; The entry we found now is possibly behind the non-IISP entry that 9960 <1> ; terminated our first SearchIISPChain call (at .hard). We then 9961 <1> ; possibly might find our entry in this hidden part of the chain. 9962 0000D37C E80C00 <1> call SearchIISPChain 9963 0000D37F 75B9 <1> jne .nextplex ; didn't find our entry in the chain --> 9964 <1> .search_found: 9965 0000D381 58 <1> pop ax 9966 0000D382 EB99 <1> jmp short .found 9967 <1> 9968 <1> 9969 <1> SearchIISPChain.next: 9970 <1> %if _PM 9971 <1> ; dx already next segment 9972 0000D384 268B5F02 <1> mov bx, word [es:bx + ieNext] ; get next offset 9973 0000D388 E88BFE <1> call setes2dx ; point es:bx -> next handler 9974 <1> %else 9975 <1> les bx, [es:bx + ieNext] ; get next interrupt entry 9976 <1> %endif 9977 <1> 9978 <1> ; INP: ds:si-> IISP entry 9979 <1> ; es:bx-> current interrupt entry 9980 <1> ; OUT: NZ if reference to ds:si not found in IISP chain es:bx-> 9981 <1> ; ZR if reference found, 9982 <1> ; es:bx-> IISP (or uninstalled iHPFS) interrupt entry with reference 9983 <1> ; CHG: es, bx, dx 9984 <1> SearchIISPChain: 9985 0000D38B E81300 <1> call IsIISPEntry? ; that an IISP entry ? 9986 0000D38E 7510 <1> jnz .return ; nope --> (NZ) 9987 0000D390 268B5704 <1> mov dx, word [es:bx + ieNext + 2] ; (for _PM: dx = next segment) 9988 0000D394 263B7702 <1> cmp si, word [es:bx + ieNext] ; our offset ? 9989 0000D398 75EA <1> jne .next ; no, try next --> 9990 0000D39A 3B16[A60A] <1> cmp dx, word [pspdbg] ; our segment ? 9991 0000D39E 75E4 <1> jne .next ; no, try next --> 9992 <1> .return: ; yes, found (ZR) 9993 0000D3A0 C3 <1> retn 9994 <1> 9995 <1> 9996 <1> ; INP: es:bx-> interrupt entry 9997 <1> ; OUT: NZ if non-IISP entry 9998 <1> ; ZR if IISP entry 9999 <1> IsIISPEntry?: 10000 0000D3A1 83FBF8 <1> cmp bx, - (ieSignature + 2) ; may access word at offset FFFFh ? 10001 0000D3A4 7728 <1> ja .return ; yes, avoid --> (NZ) 10002 0000D3A6 26817F064B42 <1> cmp word [ es:bx + ieSignature ], "KB" ; "KB"/424Bh ? ("BK" in MASM) 10003 0000D3AC 7520 <1> jne .return 10004 0000D3AE 26813F90EA <1> cmp word [ es:bx + ieEntry ], 0EA90h ; nop\jmp far imm16:imm16 ? 10005 0000D3B3 7419 <1> je .return ; unused IISP entry (created by iHPFS) --> 10006 0000D3B5 26803FEB <1> cmp byte [ es:bx + ieEntry ], 0EBh ; jmp short ... ? 10007 <1> ; (This opcode should strictly be jmp short $+18 but there's programs 10008 <1> ; that save an additional jmp opcode by jumping directly into their 10009 <1> ; code even though it's not right behind the header.) 10010 0000D3B9 7513 <1> jne .return 10011 0000D3BB 26807F09EB <1> cmp byte [ es:bx + ieJmphwreset ], 0EBh ; jmp short ... ? 10012 0000D3C0 740C <1> je .return ; usual IISP entry --> 10013 0000D3C2 26807F09CB <1> cmp byte [ es:bx + ieJmphwreset ], 0CBh ; retf ? 10014 0000D3C7 7405 <1> je .return ; a shorter variant --> 10015 0000D3C9 26807F09CF <1> cmp byte [ es:bx + ieJmphwreset ], 0CFh ; iret ? 10016 <1> .return: 10017 0000D3CE C3 <1> retn 10018 <1> 10019 <1> 10020 <1> update_inttab_optional: 10021 0000D3CF 50 <1> push ax 10022 0000D3D0 53 <1> push bx 10023 0000D3D1 51 <1> push cx 10024 0000D3D2 52 <1> push dx 10025 0000D3D3 56 <1> push si 10026 0000D3D4 BE[120C] <1> mov si, inttab_optional 10027 0000D3D7 BB[310C] <1> mov bx, inttab 10028 <1> .loop: 10029 0000D3DA AD <1> lodsw 10030 0000D3DB 83F8FF <1> cmp ax, -1 10031 0000D3DE 7415 <1> je .end 10032 0000D3E0 91 <1> xchg ax, cx 10033 0000D3E1 AD <1> lodsw 10034 0000D3E2 91 <1> xchg ax, cx 10035 0000D3E3 92 <1> xchg ax, dx 10036 0000D3E4 AD <1> lodsw 10037 0000D3E5 92 <1> xchg ax, dx 10038 0000D3E6 8516[A800] <1> test word [internalflags4], dx 10039 0000D3EA 7407 <1> jz .next 10040 0000D3EC 4B <1> dec bx 10041 0000D3ED 4B <1> dec bx 10042 0000D3EE 890F <1> mov word [bx], cx 10043 0000D3F0 4B <1> dec bx 10044 0000D3F1 8807 <1> mov byte [bx], al 10045 <1> .next: 10046 0000D3F3 EBE5 <1> jmp .loop 10047 <1> 10048 <1> .end: 10049 0000D3F5 891E[260C] <1> mov word [amisintr_offset], bx 10050 0000D3F9 5E <1> pop si 10051 0000D3FA 5A <1> pop dx 10052 0000D3FB 59 <1> pop cx 10053 0000D3FC 5B <1> pop bx 10054 0000D3FD 58 <1> pop ax 10055 0000D3FE C3 <1> retn 9352 9353 9354 usesection lDEBUG_CODE 9355 9356 %if _BOOTLDR 9357 ; Determine the amount of actual memory 9358 ; 9359 ; This is important to call at the time we need the size, 9360 ; not just save the size initially. Loading other pre-boot 9361 ; installers or RPLs will change the size. 9362 ; 9363 ; INP: - 9364 ; OUT: dx = segment behind usable memory (taking EBDAs & RPLs into account) 9365 ; ds = ss 9366 ; CHG: ax, cx, di, si, ds 9367 bootgetmemorysize: 9368 0000D3FF 06 push es 9369 0000D400 31C0 xor ax, ax 9370 0000D402 8ED8 mov ds, ax 9371 0000D404 CD12 int 12h ; get memory size in KiB 9372 0000D406 B106 mov cl, 6 9373 0000D408 D3E0 shl ax, cl ; *64, convert to paragraphs 9374 0000D40A 50 push ax 9375 0000D40B C536BC00 lds si, [ 2Fh *4 ] ; get current Int2F 9376 0000D40F 46 inc si ; pointer valid (not 0FFFFh) ? (left increased!) 9377 0000D410 741B jz .norpl ; no --> 9378 0000D412 8CD8 mov ax, ds 9379 0000D414 85C0 test ax, ax ; segment valid (not zero) ? 9380 0000D416 7415 jz .norpl ; no --> 9381 0000D418 46 times 2 inc si ; +3 with above inc 9382 0000D41A 0E push cs 9383 0000D41B 07 pop es 9384 0000D41C BF[32D4] mov di, .rpl 9385 0000D41F B90300 mov cx, .rpl_size 9386 0000D422 F3A6 repe cmpsb ; "RPL" signature ? 9387 0000D424 7507 jne .norpl ; no --> 9388 0000D426 5A pop dx 9389 0000D427 B8064A mov ax, 4A06h 9390 0000D42A CD2F int 2Fh ; adjust usable memory size for RPL 9391 0000D42C A8 db __TEST_IMM8 ; (skip pop) 9392 .norpl: 9393 0000D42D 5A pop dx 9394 ; dx = segment behind last available memory 9395 0000D42E 16 push ss 9396 0000D42F 1F pop ds 9397 0000D430 07 pop es 9398 0000D431 C3 retn 9399 9400 0000D432 52504C .rpl: db "RPL" 9401 endarea .rpl 9402 %endif 9403 9404 9405 ;--- ensure a debuggee is loaded 9406 ;--- set SI:DI to CS:IP, preserve AX, BX, DX 9407 9408 ensuredebuggeeloaded: 9409 0000D435 50 push ax 9410 0000D436 F606[9E00]80 testopt [internalflags], attachedterm 9411 0000D43B 7502 jnz @F ; not loaded, create --> 9412 0000D43D 58 pop ax 9413 0000D43E C3 retn ; done 9414 9415 @@: 9416 0000D43F 53 push bx 9417 0000D440 52 push dx 9418 9419 0000D441 E81101 call set_efl_to_fl ; initialize EFL, and ax = 0 9420 0000D444 BF[640C] mov di, regs 9421 0000D447 B91E00 mov cx, 15*2 ; (8 standard + 6 seg + eip) * 2 9422 0000D44A F3AB rep stosw ; initialize all regs 9423 %if _BOOTLDR 9424 0000D44C F606[9D00]40 testopt [internalflags], nodosloaded 9425 0000D451 7444 jz .dos 9426 0000D453 B86000 mov ax, 60h 9427 0000D456 50 push ax 9428 0000D457 BF[840C] mov di, reg_ds 9429 0000D45A AB stosw 9430 0000D45B AF scasw ; (skip dummy high word) 9431 0000D45C AB stosw 9432 0000D45D AF scasw 9433 0000D45E AB stosw 9434 0000D45F AF scasw 9435 0000D460 AB stosw 9436 0000D461 E851C1 call adusetup 9437 0000D464 E898FF call bootgetmemorysize 9438 0000D467 83EA60 sub dx, 60h 9439 0000D46A 81FA0010 cmp dx, 1000h 9440 0000D46E 7602 jbe .bootbelow64kib ; if memory left <= 64 KiB 9441 0000D470 31D2 xor dx, dx ; dx = 1000h (same thing, after shifting) 9442 .bootbelow64kib: 9443 0000D472 B104 mov cl, 4 9444 0000D474 D3E2 shl dx, cl 9445 0000D476 4A dec dx 9446 0000D477 4A dec dx 9447 0000D478 8916[740C] mov word [reg_esp], dx 9448 0000D47C 07 pop es 9449 0000D47D 87D7 xchg dx, di ; es:di = child stack pointer 9450 0000D47F 31C0 xor ax, ax 9451 0000D481 AB stosw ; push 0 on client's stack 9452 9453 0000D482 803E[DC0B]00 cmp byte [bInit], 0 9454 0000D487 750B jnz .bootnomemtouch 9455 0000D489 FE06[DC0B] inc byte [bInit] 9456 0000D48D 26C7060000CD19 mov word [es:0], 019CDh ; place opcode for int 19h at cs:ip 9457 .bootnomemtouch: 9458 0000D494 E9AB00 jmp .return 9459 9460 .dos: 9461 %endif 9462 0000D497 C606[9D0C]01 mov byte [reg_eip+1], 100h>>8 9463 0000D49C B448 mov ah, 48h ; get size of largest free block 9464 0000D49E BBFFFF mov bx, -1 9465 0000D4A1 CD21 int 21h 9466 0000D4A3 83FB11 cmp bx, 11h ; enough for PSP + one paragraph for code/stack ? 9467 0000D4A6 7303E99700 jb .return ; no --> 9468 0000D4AB B448 mov ah, 48h ; allocate it 9469 0000D4AD CD21 int 21h 9470 0000D4AF 7303E98E00 jc .return ; (memory taken between the calls) 9471 9472 0000D4B4 53 push bx 9473 0000D4B5 BF[840C] mov di, reg_ds ; fill segment registers ds,es,ss,cs 9474 0000D4B8 AB stosw 9475 0000D4B9 AF scasw ; (skip dummy high word) 9476 0000D4BA AB stosw 9477 0000D4BB AF scasw 9478 0000D4BC AB stosw 9479 0000D4BD AF scasw 9480 0000D4BE AB stosw 9481 0000D4BF E8F3C0 call adusetup 9482 0000D4C2 8B1E[900C] mov bx, word [reg_cs] ; bx:dx = where to load program 9483 0000D4C6 8EC3 mov es, bx 9484 0000D4C8 58 pop ax ; get size of memory block 9485 0000D4C9 89C2 mov dx, ax 9486 0000D4CB 01DA add dx, bx 9487 0000D4CD 2689160200 mov word [es:ALASAP], dx 9488 0000D4D2 3D0010 cmp ax, 1000h 9489 0000D4D5 7602 jbe .below64kib ; if memory left <= 64 KiB 9490 0000D4D7 31C0 xor ax, ax ; ax = 1000h (same thing, after shifting) 9491 .below64kib: 9492 0000D4D9 B104 mov cl, 4 9493 0000D4DB D3E0 shl ax, cl 9494 0000D4DD 48 dec ax 9495 0000D4DE 48 dec ax 9496 0000D4DF A3[740C] mov word [reg_esp], ax 9497 0000D4E2 97 xchg ax, di ; es:di = child stack pointer 9498 0000D4E3 31C0 xor ax, ax 9499 0000D4E5 AB stosw ; push 0 on client's stack 9500 9501 ; Create a PSP 9502 0000D4E6 B455 mov ah, 55h ; create child PSP 9503 0000D4E8 8CC2 mov dx, es 9504 0000D4EA 268B360200 mov si, word [es:ALASAP] 9505 0000D4EF F8 clc ; works around OS/2 bug 9506 0000D4F0 CD21 int 21h 9507 0000D4F2 E813BD call setpspdbg ; reset PSP to ours 9508 9509 ; Finish up. Set termination address. 9510 0000D4F5 B82225 mov ax, 2522h ; set interrupt vector 22h 9511 0000D4F8 BA[D085] mov dx, int22 9512 0000D4FB CD21 int 21h 9513 0000D4FD 2689160A00 mov word [es:TPIV], dx 9514 0000D502 268C1E0C00 mov word [es:TPIV+2], ds 9515 9516 0000D507 803E[DC0B]00 cmp byte [bInit], 0 9517 0000D50C 750A jnz .nomemtouch 9518 0000D50E FE06[DC0B] inc byte [bInit] 9519 0000D512 26C6060001C3 mov byte [es:100h], 0C3h ; place opcode for retn at cs:ip 9520 .nomemtouch: 9521 9522 0000D518 8C06[A40A] mov word [pspdbe], es 9523 0000D51C 8CC0 mov ax, es 9524 0000D51E 48 dec ax 9525 0000D51F 8EC0 mov es, ax 9526 0000D521 40 inc ax 9527 0000D522 26C70608004445 mov word [es:8+0], "DE" 9528 0000D529 26C7060A004255 mov word [es:8+2], "BU" 9529 0000D530 26C7060C004747 mov word [es:8+4], "GG" 9530 0000D537 26C7060E004545 mov word [es:8+6], "EE" ; set MCB name 9531 0000D53E 26A30100 mov word [es:1], ax ; set MCB owner 9532 .return: 9533 0000D542 8026[9E00]7F clropt [internalflags], attachedterm 9534 0000D547 16 push ss 9535 0000D548 07 pop es 9536 9537 0000D549 8B36[900C] mov si, word [reg_cs] 9538 0000D54D 8B3E[9C0C] mov di, word [reg_eip] 9539 0000D551 5A pop dx 9540 0000D552 5B pop bx 9541 0000D553 58 pop ax 9542 0000D554 C3 retn 9543 9544 9545 set_efl_to_fl: 9546 0000D555 31C0 xor ax, ax ; initialize ax = 0 and FL = ZR NC etc 9547 0000D557 50 _no386 push ax ; dummy high word 9548 0000D558 66 _386_o32 ; pushfd 9549 0000D559 9C pushf 9550 0000D55A 8F06[A00C] pop word [reg_efl] ; set to FL 9551 0000D55E 8F06[A20C] pop word [reg_efl+2] ; set to high word of EFL, or zero 9552 0000D562 C3 retn 9553 9554 9555 %if _PM 9556 ; Hook Int2F if a DPMI host is found. However for Win9x and DosEmu 9557 ; Int2F.1687 is not hooked because it doesn't work. Debugging in 9558 ; protected mode may still work, but the initial switch must be 9559 ; single-stepped. 9560 ; 9561 ; CHG: ax, bx, cx, dx, di, es 9562 ; STT: V86/RM 9563 ; ss = ds = debugger data segment 9564 hook2F: 9565 0000D563 E878D1 call InDos 9566 0000D566 7403E99A00 jnz .return 9567 0000D56B F606[9D00]01 testopt [internalflags], hooked2F 9568 0000D570 7403E99000 jnz .return ; don't hook now --> 9569 .loop: 9570 %if _GUARD_86M_INT2F 9571 0000D575 06 push es 9572 0000D576 31C0 xor ax, ax 9573 0000D578 8EC0 mov es, ax ; (only used in 86 Mode) 9574 0000D57A 26A1BC00 mov ax, [es:2Fh * 4] 9575 0000D57E 83F8FF cmp ax, -1 9576 0000D581 7405 je @F ; --> (ZR) 9577 0000D583 260B06BE00 or ax, [es:2Fh * 4 + 2] 9578 @@: 9579 0000D588 07 pop es 9580 0000D589 747A jz .return 9581 %endif 9582 0000D58B B88716 mov ax, 1687h ; DPMI host installed? 9583 0000D58E CD2F int 2Fh 9584 0000D590 85C0 test ax, ax 9585 0000D592 7571 jnz .return 9586 0000D594 893E[B888] mov word [dpmientry+0], di ; true host DPMI entry 9587 0000D598 8C06[BA88] mov word [dpmientry+2], es 9588 0000D59C 893E[BC88] mov word [dpmiwatch+0], di 9589 0000D5A0 8C06[BE88] mov word [dpmiwatch+2], es 9590 0000D5A4 F606[9D00]02 testopt [internalflags], nohook2F 9591 0000D5A9 755A jnz .return ; can't hook Int2F --> 9592 0000D5AB F606[8800]02 testopt [options4], opt4_int_2F_hook 9593 0000D5B0 7453 jz .return ; requested to not hook --> 9594 0000D5B2 B82F35 mov ax, 352Fh 9595 0000D5B5 CD21 int 21h 9596 0000D5B7 891E[4289] mov word [oldi2F+0], bx 9597 0000D5BB 8C06[4489] mov word [oldi2F+2], es 9598 0000D5BF BA[4089] mov dx, debug2F ; ds => lDEBUG_DATA_ENTRY 9599 0000D5C2 B82F25 mov ax, 252Fh 9600 0000D5C5 CD21 int 21h 9601 9602 ; Test whether we can hook the DPMI entrypoint call. 9603 0000D5C7 B88716 mov ax, 1687h 9604 0000D5CA CD2F int 2Fh 9605 0000D5CC 85C0 test ax, ax 9606 0000D5CE 7538 jnz .nohost 9607 0000D5D0 81FF[7689] cmp di, mydpmientry ; our entrypoint returned ? 9608 0000D5D4 7532 jne .nohook 9609 0000D5D6 8CC0 mov ax, es 9610 0000D5D8 8CDB mov bx, ds ; bx => lDEBUG_DATA_ENTRY 9611 0000D5DA 39D8 cmp ax, bx 9612 0000D5DC 752A jne .nohook ; no --> 9613 9614 0000D5DE C706[BC88][7689] mov word [dpmiwatch+0], mydpmientry 9615 0000D5E4 8C1E[BE88] mov word [dpmiwatch+2], ds ; => lDEBUG_DATA_ENTRY 9616 9617 0000D5E8 800E[9D00]01 setopt [internalflags], hooked2F 9618 0000D5ED 800E[A800]02 setopt [internalflags4], dif4_int_2F_hooked 9619 0000D5F2 E8DAFD call update_inttab_optional 9620 %if _DISPHOOK 9621 0000D5F5 8CD8 mov ax, ds ; ax => lDEBUG_DATA_ENTRY 9622 0000D5F7 1E push ds 9623 0000D5F8 07 pop es 9624 0000D5F9 BF[617C] mov di, dpmihookcs 9625 0000D5FC E83BE4 call hexword 9626 0000D5FF BA[447C] mov dx, dpmihook 9627 0000D602 E8EBE7 call putsz 9628 %endif 9629 .return: 9630 0000D605 1E push ds 9631 0000D606 07 pop es 9632 0000D607 C3 retn 9633 9634 .nohost: 9635 .nohook: 9636 0000D608 C516[4289] lds dx, [oldi2F] 9637 0000D60C B82F25 mov ax, 252Fh 9638 0000D60F CD21 int 21h ; unhook 9639 0000D611 16 push ss 9640 0000D612 1F pop ds 9641 0000D613 16 push ss 9642 0000D614 07 pop es ; restore segregs 9643 0000D615 800E[9D00]02 setopt [internalflags], nohook2F 9644 ; note that we cannot hook 9645 0000D61A BA[6D7C] mov dx, msg.dpmi_no_hook 9646 0000D61D E8D0E7 call putsz ; display message about it 9647 0000D620 E952FF jmp .loop 9648 %endif 9649 9650 9651 usesection lDEBUG_DATA_ENTRY 9652 align 16, db 0 9653 ldebug_data_entry_size equ $-section.lDEBUG_DATA_ENTRY.vstart 9654 endarea ldebug_data_entry, 1 9655 9656 usesection ASMTABLE1 9657 000016BA 00 align 16, db 0 9658 asmtable1_size equ $-section.ASMTABLE1.vstart 9659 endarea asmtable1, 1 9660 9661 usesection ASMTABLE2 9662 00000897 00 align 16, db 0 9663 asmtable2_size equ $-section.ASMTABLE2.vstart 9664 endarea asmtable2, 1 9665 9666 9667 numdef SHOWASMTABLESIZE, 0 9668 %if _SHOWASMTABLESIZE 9669 %assign ASMTABLESIZE asmtable1_size + asmtable2_size 9670 %warning asmtables hold ASMTABLESIZE bytes 9671 %endif 9672 9673 9674 usesection DATASTACK 9675 %define SECTIONFIXUP -$$+100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size 9677 9678 ; I/O buffers 9679 alignb 2 9680 00000000 ?? line_in: resb 1 ; maximal length of input line 9681 00000001 ?? resb 1 ; actual length (must be one less than previous byte) 9682 00000002 resb 255 ; buffer for 13-terminated input line 9683 .end: 9684 ; zero-initialisation starts here 9685 ..@init_first: 9686 ; b_bplist and g_bplist are expected in that order by initcont 9687 %if _BREAKPOINTS 9688 00000101 ?? alignb 2 9689 b_bplist: 9690 00000102 ???? .used_mask: resb (_NUM_B_BP+7)>>3 ; bitmask of used points 9691 00000104 ???? .disabled_mask: resb (_NUM_B_BP+7)>>3 ; bitmask of disabled points 9692 %if _BREAKPOINTS_STICKY 9693 .sticky_mask: resb (_NUM_B_BP+7)>>3 ; bitmask of sticky points 9694 ; desc: stay around during DEBUG's operation unless 9695 ; explicitly removed/un-stickified. This allows 9696 ; to keep breakpoints around while changing from PM. 9697 ; Hits while in DEBUG are ignored though, use DDEBUG. 9698 ; Disabling won't remove them, just ignores hits. 9699 %endif 9700 alignb 2 9701 00000106 .bp: resb _NUM_B_BP*BPSIZE 9702 alignb 2 9703 00000196 .counter: resw _NUM_B_BP 9704 alignb 2 9705 000001B6 .id: resw _NUM_B_BP ; array of lengths/offsets, 0 = unused 9706 ; low 10 bits = offset into .idbuffer (0..1023) 9707 ; high 6 bits = length (0..63, 0 if unused) 9708 alignb 2 9709 000001D6 .when: resw _NUM_B_BP ; array of pointers, 0 = unused 9710 9711 .idbuffer.length: equ _NUM_B_ID_BYTES 9712 .idbuffer.free: 9713 000001F6 ???? resw 1 ; offset into .idbuffer of free space 9714 ; (0..1024) 9715 9716 .whenbuffer.length: equ _NUM_B_WHEN_BYTES 9717 .whenbuffer.free: 9718 000001F8 ???? resw 1 ; *offset* into .whenbuffer 9719 ; (not a pointer) 9720 9721 .idbuffer: 9722 000001FA resb .idbuffer.length ; buffer holding ID strings 9723 .whenbuffer: 9724 0000037A resb .whenbuffer.length ; buffer holding condition strings 9725 %endif 9726 %if _NUM_G_BP 9727 0000077A ?? resb 1 - (($-$$) % 2) ; make g_bplist.bp aligned 9728 g_bplist: 9729 0000077B ?? .used_count: resb 1 ; for the byte counter of saved breakpoints 9730 0000077C .bp: resb _NUM_G_BP*BPSIZE 9731 .end: 9732 %endif 9733 %if _HISTORY && ! _HISTORY_SEPARATE_FIXED 9734 historybuffer: resb _HISTORY_SIZE 9735 .end: 9736 %endif 9737 9738 ; $ - $$ = offset into section 9739 ; % 2 = 1 if odd offset, 0 if even 9740 ; 2 - = 1 if odd, 2 if even 9741 ; % 2 = 1 if odd, 0 if even 9742 ; resb (2 - (($-$$) % 2)) % 2 9743 ; $ - $$ = offset into section 9744 ; % 2 = 1 if odd offset, 0 if even 9745 ; 1 - = 0 if odd, 1 if even 9746 0000080C ?? resb 1 - (($-$$) % 2) ; make line_out aligned 9747 0000080D ?? trim_overflow: resb 1 ; actually part of line_out to avoid overflow of trimputs loop 9748 0000080E line_out: resb 263 9749 00000915 ?? resb 1 ; reserved for terminating zero 9750 line_out_end: 9751 alignb 2 9752 00000916 ???? line_out_overflow: resw 1 ; 2642h if line_out didn't overflow 9753 9754 alignb 2 9755 00000918 ???? serial_save_irq_mask: resw 1 9756 0000091A ???? serial_save_irq_off: resw 1 9757 0000091C ???? serial_save_dl: resw 1 9758 0000091E ?? serial_save_ier: resb 1 9759 0000091F ?? serial_save_lcr: resb 1 9760 00000920 ?? serial_save_mcr: resb 1 9761 %if _USE_TX_FIFO 9762 00000921 ?? serial_fcr_setting: resb 1 9763 %endif 9764 00000922 ?? serial_use_intnum: resb 1 9765 00000923 ?? serial_use_params: resb 1 9766 00000924 ?? serial_use_fifo: resb 1 9767 00000925 ?? alignb 2 9768 baseport: 9769 00000926 ???? serial_use_baseport: resw 1 9770 00000928 ???? serial_use_dl: resw 1 9771 0000092A ???? serial_use_irqmask: resw 1 9772 9773 alignb 2 9774 0000092C ???? rxhead: resw 1 9775 0000092E ???? rxtail: resw 1 9776 00000930 ???? txhead: resw 1 9777 00000932 ???? txtail: resw 1 9778 00000934 alignb 16 9779 00000940 rxfifo: resb _RXFIFOSIZE 9780 alignb 16 9781 000009C0 txfifo: resb _TXFIFOSIZE 9782 9783 ; zero-initialisation ends here 9784 ..@init_behind: 9785 9786 alignb 16 ; stack might be re-used as GDT, so align it on a paragraph 9787 00000A40 stack: resb _STACKSIZE 9788 alignb 2 ; ensure stack aligned 9789 stack_end: 9790 9791 datastack_size equ $-section.DATASTACK.vstart 9792 endarea datastack, 1 9793 9794 9795 usesection INIT 9796 initstart: 9797 9798 %include "init.asm" 9799 <1> 9800 <1> %if 0 9801 <1> 9802 <1> lDebug initialisation 9803 <1> 9804 <1> Copyright (C) 1995-2003 Paul Vojta 9805 <1> Copyright (C) 2008-2012 C. Masloch 9806 <1> 9807 <1> Usage of the works is permitted provided that this 9808 <1> instrument is retained with the works, so that any entity 9809 <1> that uses the works is notified of this instrument. 9810 <1> 9811 <1> DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. 9812 <1> 9813 <1> %endif 9814 <1> 9815 <1> 9816 <1> usesection INIT 9817 <1> 9818 <1> initcode: 9819 <1> %if ($ - $$) != 0 9820 <1> %fatal initcode expected at start of section 9821 <1> %endif 9822 <1> 9823 00000000 8CD0 <1> mov ax, ss 9824 00000002 8CDA <1> mov dx, ds 9825 00000004 29D0 <1> sub ax, dx 9826 00000006 31D2 <1> xor dx, dx 9827 00000008 B90400 <1> mov cx, 4 9828 <1> @@: 9829 0000000B D1E0 <1> shl ax, 1 9830 0000000D D1D2 <1> rcl dx, 1 9831 0000000F E2FA <1> loop @B 9832 <1> 9833 00000011 50 <1> push ax ; (if sp was zero) 9834 <1> 9835 00000012 01E0 <1> add ax, sp 9836 00000014 83D200 <1> adc dx, 0 9837 00000017 83C00F <1> add ax, 15 9838 0000001A 83D200 <1> adc dx, 0 9839 <1> 9840 0000001D 24F0 <1> and al, ~15 9841 <1> 9842 0000001F 83FA02 <1> cmp dx, NONBOOTINITSTACK_END >> 16 9843 00000022 771B <1> ja .stackdownfirst 9844 00000024 7205 <1> jb .memupfirst 9845 00000026 3DB00E <1> cmp ax, NONBOOTINITSTACK_END & 0FFFFh 9846 00000029 7314 <1> jae .stackdownfirst 9847 <1> .memupfirst: 9848 0000002B BBEB20 <1> mov bx, paras(NONBOOTINITSTACK_END) 9849 0000002E B44A <1> mov ah, 4Ah 9850 00000030 CD21 <1> int 21h 9851 00000032 730B <1> jnc @F 9852 <1> .memfail: 9853 00000034 BA[0D08] <1> mov dx, imsg.early_mem_fail 9854 <1> .earlyfail: 9855 00000037 E8A70C <1> call init_putsz_cs 9856 0000003A B8FF4C <1> mov ax, 4CFFh 9857 0000003D CD21 <1> int 21h 9858 <1> 9859 <1> @@: 9860 <1> .stackdownfirst: 9861 0000003F 8CD8 <1> mov ax, ds 9862 00000041 05CB20 <1> add ax, paras(NONBOOTINITSTACK_START) 9863 00000044 FA <1> cli 9864 00000045 8ED0 <1> mov ss, ax 9865 00000047 BC0002 <1> mov sp, NONBOOTINITSTACK_SIZE 9866 0000004A FB <1> sti 9867 <1> 9868 <1> ; if jumped to .stackdownfirst: now, shrink our memory block 9869 <1> ; else: no-op (already grew or shrunk block) 9870 0000004B BBEB20 <1> mov bx, paras(NONBOOTINITSTACK_END) 9871 0000004E B44A <1> mov ah, 4Ah 9872 00000050 CD21 <1> int 21h 9873 00000052 72E0 <1> jc .memfail 9874 <1> 9875 <1> 9876 00000054 8CD8 <1> mov ax, ds 9877 00000056 05DB18 <1> add ax, paras(INITSECTIONOFFSET) 9878 00000059 8CDA <1> mov dx, ds 9879 0000005B 81C2A11F <1> add dx, paras(NONBOOTINITTARGET) 9880 0000005F B92A01 <1> mov cx, init_size_p 9881 00000062 E8EB0B <1> call init_movp 9882 <1> 9883 00000065 52 <1> push dx 9884 00000066 E89100 <1> call init_retf 9885 <1> 9886 00000069 8CDB <1> mov bx, ds 9887 0000006B 89DA <1> mov dx, bx 9888 0000006D 81C39F19 <1> add bx, paras(AUXTARGET1) 9889 00000071 81C23A0C <1> add dx, paras(CODETARGET1) 9890 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9891 00000075 89D8 <1> mov ax, bx 9892 00000077 050102 <1> add ax, paras(auxbuff_size) 9893 <1> CODETARGET1_equ equ CODETARGET1 9894 <1> CODETARGET2_equ equ CODETARGET2 9895 <1> AUXTARGET1_equ equ AUXTARGET1 9896 <1> AUXTARGET2_equ equ AUXTARGET2 9897 <1> %if AUXTARGET1_equ <= CODETARGET1_equ 9898 <1> %assign nn AUXTARGET1_equ 9899 <1> %assign mm CODETARGET1_equ 9900 <1> %error Unexpected layout aux = nn code = mm 9901 <1> %endif 9902 <1> %endif 9903 0000007A 89D1 <1> mov cx, dx 9904 0000007C E87C00 <1> call init_check_auxbuff 9905 0000007F 742F <1> jz @F 9906 <1> 9907 00000081 8CDB <1> mov bx, ds 9908 00000083 89DA <1> mov dx, bx 9909 00000085 81C33A0C <1> add bx, paras(AUXTARGET2) 9910 00000089 81C23B0E <1> add dx, paras(CODETARGET2) 9911 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9912 <1> ldebug_code_size_equ equ ldebug_code_size 9913 <1> auxbuff_size_equ equ auxbuff_size 9914 <1> %if (paras(AUXTARGET1_equ) + paras(auxbuff_size_equ)) != (paras(CODETARGET2_equ) + paras(ldebug_code_size_equ)) 9916 <1> %error Unexpected layout 9917 <1> %endif 9918 <1> %endif 9919 0000008D E86B00 <1> call init_check_auxbuff 9920 00000090 741E <1> jz @F 9921 <1> 9922 <1> ; If both prior attempts failed, we allocate 9923 <1> ; an additional 8 KiB and move the buffer to 9924 <1> ; that. This should always succeed. 9925 00000092 2EC706[0008]A11F <1> mov word [cs:memsize], paras(AUXTARGET3 + auxbuff_size + historysegment_size) 9928 <1> ; enlarge the final memory block size 9929 <1> 9930 00000099 8CDB <1> mov bx, ds 9931 0000009B 81C3A01B <1> add bx, paras(AUXTARGET3) 9932 0000009F 89CA <1> mov dx, cx 9933 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9934 000000A1 89D8 <1> mov ax, bx 9935 000000A3 050102 <1> add ax, paras(auxbuff_size) 9936 <1> %endif 9937 000000A6 E85200 <1> call init_check_auxbuff 9938 000000A9 7405 <1> jz @F 9939 <1> 9940 <1> ; Because this shouldn't happen, this is 9941 <1> ; considered an internal error. 9942 000000AB BA[3308] <1> mov dx, imsg.early_reloc_fail 9943 000000AE EB87 <1> jmp .earlyfail 9944 <1> 9945 <1> @@: 9946 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9947 000000B0 50 <1> push ax 9948 <1> %endif 9949 000000B1 8CD8 <1> mov ax, ds 9950 000000B3 05760B <1> add ax, paras(CODESECTIONOFFSET) 9951 000000B6 B9650D <1> mov cx, ldebug_code_size_p 9952 000000B9 E8940B <1> call init_movp 9953 <1> 9954 000000BC 8916[CE00] <1> mov word [code_seg], dx ; initialise code segment reference 9955 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 9956 000000C0 58 <1> pop ax 9957 000000C1 A3[F60A] <1> mov word [history.segorsel + soaSegSel], ax 9958 <1> %if _PM 9959 000000C4 A3[F80A] <1> mov word [history.segorsel + soaSegment], ax 9960 <1> %endif 9961 000000C7 8EC0 <1> mov es, ax 9962 000000C9 31FF <1> xor di, di 9963 000000CB B90010 <1> mov cx, historysegment_size >> 1 9964 000000CE 31C0 <1> xor ax, ax 9965 000000D0 F3AB <1> rep stosw 9966 <1> %endif 9967 <1> 9968 000000D2 89D8 <1> mov ax, bx 9969 <1> 9970 000000D4 A3[F209] <1> mov word [auxbuff_segorsel + soaSegSel], ax 9971 <1> %if _PM 9972 000000D7 A3[F409] <1> mov word [auxbuff_segorsel + soaSegment], ax 9973 <1> ; initialise auxbuff references 9974 <1> %endif 9975 000000DA 8EC0 <1> mov es, ax 9976 000000DC 31FF <1> xor di, di 9977 000000DE B90810 <1> mov cx, _AUXBUFFSIZE >> 1 9978 000000E1 31C0 <1> xor ax, ax 9979 000000E3 F3AB <1> rep stosw ; initialise auxbuff 9980 <1> 9981 000000E5 FA <1> cli 9982 000000E6 8CD8 <1> mov ax, ds 9983 000000E8 8EC0 <1> mov es, ax 9984 000000EA 8ED0 <1> mov ss, ax 9985 000000EC BC[400C] <1> mov sp, stack_end 9986 000000EF FB <1> sti 9987 <1> 9988 000000F0 B44A <1> mov ah, 4Ah 9989 000000F2 BBCB20 <1> mov bx, paras(NONBOOTINITSTACK_START) 9990 000000F5 CD21 <1> int 21h ; shrink to drop init stack 9991 <1> 9992 000000F7 E9610C <1> jmp old_initcode 9993 <1> 9994 <1> 9995 <1> init_retf: 9996 000000FA CB <1> retf 9997 <1> 9998 <1> 9999 <1> ; INP: bx => destination for auxbuff 10000 <1> ; (The following are not actually used by this function, 10001 <1> ; they're just what is passed in and preserved to 10002 <1> ; be used by the caller after returning.) 10003 <1> ; dx => destination for code image 10004 <1> ; (if boot-loaded:) cx => destination for pseudo-PSP 10005 <1> ; (implies cx+10h => destination for data_entry) 10006 <1> ; ax => segment for history buffer 10007 <1> ; OUT: ZR if this destination for auxbuff doesn't cross 10008 <1> ; a 64 KiB boundary 10009 <1> ; NZ else 10010 <1> ; CHG: si, di 10011 <1> init_check_auxbuff: 10012 000000FB 89DE <1> mov si, bx ; => auxbuff 10013 <1> %if _AUXBUFFSIZE < 8192 10014 <1> %error Expected full sector length auxbuff 10015 <1> %endif 10016 000000FD 8DBC0002 <1> lea di, [si + (8192 >> 4)]; => behind auxbuff (at additional paragraph) 10017 00000101 81E600F0 <1> and si, 0F000h ; => 64 KiB chunk of first paragraph of auxbuff 10018 00000105 81E700F0 <1> and di, 0F000h ; => 64 KiB chunk of additional paragraph 10019 00000109 39F7 <1> cmp di, si ; same ? 10020 <1> ; ZR if they are the same 10021 0000010B C3 <1> retn 10022 <1> 10023 <1> 10024 <1> %if _BOOTLDR 10025 <1> ; Our loader transfers control to us with these registers: 10026 <1> ; INP: ss:bp -> BPB 10027 <1> ; ss:bp - 16 -> loadstackvars 10028 <1> ; ss:bp - 32 -> loaddata 10029 <1> ; cs:0 -> loaded payload 10030 <1> ; cs:32 -> entry point 10031 <1> ; STT: EI, UP 10032 <1> ; all interrupts left from BIOS 10033 <1> boot_initcode: 10034 0000010C FC <1> cld 10035 <1> 10036 <1> d4 call init_d4message 10037 <1> d4 asciz "In boot_initcode",13,10 10038 <1> 10039 0000010D 8B56E0 <1> mov dx, word [bp + ldMemoryTop] 10040 <1> 10041 <1> ; initialise sdp 10042 00000110 8B461E <1> mov ax, word [bp + bsBPB + bpbHiddenSectors + 2] 10043 00000113 A3[CE8C] <1> mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors + 2], ax 10044 00000116 8B461C <1> mov ax, word [bp + bsBPB + bpbHiddenSectors] 10045 00000119 A3[CC8C] <1> mov word [load_data - LOADDATA2 + bsBPB + bpbHiddenSectors], ax 10046 0000011C 8A4640 <1> mov al, byte [bp + bsBPB + ebpbNew + bpbnBootUnit] 10047 0000011F A2[F08C] <1> mov byte [load_data - LOADDATA2 + bsBPB + ebpbNew + bpbnBootUnit], al 10048 <1> 10049 00000122 8CDB <1> mov bx, ds 10050 00000124 8EC3 <1> mov es, bx ; => data entry image 10051 00000126 BF[F08B] <1> mov di, loaddata_loadedfrom ; -> loaded from data (ldp) 10052 <1> 10053 <1> ; initialise LOADDATA, LOADSTACKVARS, and BPB 10054 00000129 16 <1> push ss 10055 0000012A 1F <1> pop ds 10056 0000012B 8D76E0 <1> lea si, [bp + LOADDATA] ; -> LOADDATA on stack 10057 0000012E B97A00 <1> mov cx, (-LOADDATA + bsBPB + ebpbNew + BPBN_size) 10058 00000131 F3A4 <1> rep movsb 10059 <1> 10060 <1> ; initialise cmdline_buffer from below LOADDATA 10061 00000133 8DB6E0FE <1> lea si, [bp + ldCommandLine.start] 10062 00000137 BF[E000] <1> mov di, cmdline_buffer ; -> our buffer in data entry 10063 <1> 10064 0000013A 813C00FF <1> cmp word [si], 0FF00h 10065 0000013E 7505 <1> jne @F 10066 <1> 10067 00000140 0E <1> push cs 10068 00000141 1F <1> pop ds 10069 00000142 BE[F209] <1> mov si, imsg.default_cmdline 10070 <1> 10071 <1> @@: 10072 00000145 AC <1> lodsb 10073 00000146 84C0 <1> test al, al 10074 00000148 741F <1> jz @FF 10075 <1> 10076 0000014A 26800E[A500]01 <1> setopt [es:internalflags3], dif3_input_cmdline 10077 00000150 A9 <1> db __TEST_IMM16 10078 <1> .switch_c_loop: 10079 00000151 AA <1> stosb 10080 00000152 AC <1> lodsb 10081 00000153 3C00 <1> cmp al, 0 10082 00000155 7411 <1> je @F 10083 00000157 3C3B <1> cmp al, ';' 10084 00000159 7504 <1> jne .switch_c_not_semicolon 10085 0000015B B00D <1> mov al, 13 10086 0000015D EBF2 <1> jmp .switch_c_loop 10087 <1> 10088 <1> .switch_c_not_semicolon: 10089 0000015F 3C5C <1> cmp al, '\' 10090 00000161 75EE <1> jne .switch_c_loop 10091 00000163 AC <1> lodsb 10092 00000164 3C00 <1> cmp al, 0 10093 00000166 75E9 <1> jne .switch_c_loop 10094 <1> 10095 <1> @@: 10096 00000168 AA <1> stosb 10097 <1> @@: 10098 <1> 10099 00000169 89D0 <1> mov ax, dx 10100 0000016B 2DC01F <1> sub ax, paras(BOOTDELTA) 10101 0000016E 7303E9E900 <1> jc .error_out_of_memory 10102 <1> ; We exaggerate the target size (BOOTDELTA) for the 10103 <1> ; worst case, thus we do not need to check for narrower 10104 <1> ; fits later on. BOOTDELTA includes the pseudo-PSP size, 10105 <1> ; data_entry size, asmtable1_size, asmtable2_size, 10106 <1> ; datastack_size, code_size, 2 times auxbuff_size, 10107 <1> ; historysegment_size, 10108 <1> ; plus 16 bytes for the image ident prefix paragraph, 10109 <1> ; and all of that rounded to a kibibyte boundary. 10110 <1> 10111 00000173 8CC9 <1> mov cx, cs 10112 00000175 81C14A01 <1> add cx, paras(init_size + BOOTINITSTACK_SIZE) 10113 00000179 7303E9DE00 <1> jc .error_out_of_memory 10114 0000017E 39D1 <1> cmp cx, dx 10115 00000180 7603E9D700 <1> ja .error_out_of_memory 10116 <1> 10117 00000185 8CCF <1> mov di, cs 10118 00000187 FA <1> cli 10119 00000188 8ED7 <1> mov ss, di 10120 0000018A BCA014 <1> mov sp, init_size + BOOTINITSTACK_SIZE 10121 0000018D FB <1> sti 10122 <1> 10123 <1> d4 call init_d4message 10124 <1> d4 asciz "Switched to init stack",13,10 10125 <1> 10126 <1> lframe none 10127 <1> lvar word, relocatedparas 10128 <1> lvar word, target 10129 0000018E 5589E55050 <1> lenter 10130 <1> lvar word, targetstart 10131 00000193 50 <1> push ax 10132 <1> lvar word, memtop 10133 00000194 52 <1> push dx 10134 00000195 8D7F10 <1> lea di, [bx + 10h] 10135 <1> lvar word, data 10136 00000198 57 <1> push di 10137 00000199 8DBF760B <1> lea di, [bx + paras(CODESECTIONOFFSET)] 10138 <1> lvar word, code 10139 0000019D 57 <1> push di 10140 <1> 10141 0000019E 39C1 <1> cmp cx, ax ; does init end below-or-equal target ? 10142 000001A0 7703E9C500 <1> jbe .no_relocation ; yes, no relocation needed --> 10143 <1> 10144 <1> d4 call init_d4message 10145 <1> d4 asciz "Needs relocation of init segment",13,10 10146 <1> 10147 000001A5 8B46F6 <1> mov ax, word [bp + ?data] 10148 000001A8 2D4A01 <1> sub ax, paras(init_size + BOOTINITSTACK_SIZE) 10149 000001AB 7303E9AC00 <1> jc .error_out_of_memory ; already at start of memory --> 10150 000001B0 83F860 <1> cmp ax, 60h 10151 000001B3 7303E9A400 <1> jb .error_out_of_memory ; already at start of memory --> 10152 <1> 10153 000001B8 0E <1> push cs 10154 000001B9 1F <1> pop ds 10155 000001BA 31F6 <1> xor si, si ; -> init source 10156 000001BC 8EC0 <1> mov es, ax 10157 000001BE 31FF <1> xor di, di ; -> init destination 10158 000001C0 B9500A <1> mov cx, words(init_size + BOOTINITSTACK_SIZE) 10159 000001C3 F3A5 <1> rep movsw ; relocate only init 10160 <1> ; Must not modify the data already on the stack here, 10161 <1> ; until after .done_relocation (which relocates ss). 10162 <1> 10163 000001C5 50 <1> push ax 10164 000001C6 E831FF <1> call init_retf ; jump to new init 10165 <1> 10166 000001C9 8ED0 <1> mov ss, ax 10167 000001CB 8B4EF4 <1> mov cx, word [bp + ?code] 10168 000001CE 81C1650D <1> add cx, paras(ldebug_code_size) 10169 000001D2 3B4EFA <1> cmp cx, word [bp + ?targetstart] 10170 <1> ; does code end below-or-equal target ? 10171 000001D5 7703E99000 <1> jbe .done_relocation ; yes, relocated enough --> 10172 <1> 10173 <1> d4 call init_d4message 10174 <1> d4 asciz "Needs relocation of entire load image",13,10 10175 <1> 10176 000001DA BA6000 <1> mov dx, 60h 10177 000001DD 8EC2 <1> mov es, dx 10178 000001DF 8CC8 <1> mov ax, cs 10179 000001E1 39C2 <1> cmp dx, ax ; already at start of memory ? 10180 000001E3 7377 <1> jae .error_out_of_memory ; then error --> 10181 <1> 10182 000001E5 42 <1> inc dx 10183 <1> ; cmp dx, ax 10184 <1> ; ja .error_out_of_memory 10185 000001E6 52 <1> push dx 10186 000001E7 2EFF36[1202] <1> push word [cs:.word_relocated] ; on stack: far address of .relocated 10187 <1> 10188 000001EC 89C1 <1> mov cx, ax ; source 10189 000001EE 29D1 <1> sub cx, dx ; source - target = how far to relocate 10190 000001F0 894EFE <1> mov word [bp + ?relocatedparas], cx 10191 <1> ; save away this value 10192 <1> 10193 000001F3 31FF <1> xor di, di ; es:di -> where to put relocator 10194 000001F5 06 <1> push es 10195 000001F6 57 <1> push di ; on stack: relocator destination 10196 000001F7 0E <1> push cs 10197 000001F8 1F <1> pop ds 10198 000001F9 BE[1402] <1> mov si, .relocator ; -> relocator source 10199 000001FC B90800 <1> mov cx, 8 10200 000001FF F3A5 <1> rep movsw ; put relocator stub 10201 <1> 10202 00000201 8EC2 <1> mov es, dx 10203 00000203 31FF <1> xor di, di ; -> where to relocate to 10204 00000205 31F6 <1> xor si, si ; -> relocate start 10205 <1> 10206 <1> BOOTRELOC1 equ paras( init_size + BOOTINITSTACK_SIZE + ldebug_data_entry_size + asmtable1_size + asmtable2_size + ldebug_code_size) 10209 <1> 10210 <1> %if 0 10211 <1> mov cx, BOOTRELOC1 ; how much to relocate 10212 <1> mov bx, 1000h 10213 <1> mov ax, cx 10214 <1> cmp ax, bx ; > 64 KiB? 10215 <1> jbe @F 10216 <1> mov cx, bx ; first relocate the first 64 KiB 10217 <1> @@: 10218 <1> sub ax, cx ; how much to relocate later 10219 <1> shl cx, 1 10220 <1> shl cx, 1 10221 <1> shl cx, 1 ; how much to relocate first, 10222 <1> ; << 3 == convert paragraphs to words 10223 <1> %else 10224 00000207 BB0010 <1> mov bx, 1000h 10225 <1> %if BOOTRELOC1 > 1000h 10226 0000020A B90080 <1> mov cx, 8000h 10227 0000020D B8150A <1> mov ax, BOOTRELOC1 - 1000h 10228 <1> %else 10229 <1> mov cx, BOOTRELOC1 << 3 10230 <1> xor ax, ax 10231 <1> %endif 10232 <1> %endif 10233 00000210 CB <1> retf ; jump to relocator 10234 <1> 10235 00000211 00 <1> align 2, db 0 10236 <1> .word_relocated: 10237 00000212 [1702] <1> dw .relocated 10238 <1> 10239 <1> ; ds:si -> first chunk of to be relocated data 10240 <1> ; es:di -> first chunk of relocation destination 10241 <1> ; cx = number of words in first chunk 10242 <1> .relocator: 10243 00000214 F3A5 <1> rep movsw 10244 00000216 CB <1> retf ; jump to relocated cs : .relocated 10245 <1> 10246 <1> .relocated: 10247 <1> @@: 10248 00000217 8CC2 <1> mov dx, es 10249 00000219 01DA <1> add dx, bx 10250 0000021B 8EC2 <1> mov es, dx ; next segment 10251 <1> 10252 0000021D 8CDA <1> mov dx, ds 10253 0000021F 01DA <1> add dx, bx 10254 00000221 8EDA <1> mov ds, dx ; next segment 10255 <1> 10256 00000223 29D8 <1> sub ax, bx ; = how much to relocate after this round 10257 00000225 B90080 <1> mov cx, 1000h << 3 ; in case another full 64 KiB to relocate 10258 00000228 730B <1> jae @F ; another full 64 KiB to relocate --> 10259 0000022A 01D8 <1> add ax, bx ; restore 10260 0000022C D1E0 <1> shl ax, 1 10261 0000022E D1E0 <1> shl ax, 1 10262 00000230 D1E0 <1> shl ax, 1 ; convert paragraphs to words 10263 00000232 91 <1> xchg cx, ax ; cx = that many words 10264 00000233 31C0 <1> xor ax, ax ; no more to relocate after this round 10265 <1> 10266 <1> @@: 10267 00000235 31F6 <1> xor si, si 10268 00000237 31FF <1> xor di, di 10269 00000239 F3A5 <1> rep movsw ; relocate next chunk 10270 0000023B 85C0 <1> test ax, ax ; another round needed? 10271 0000023D 75D8 <1> jnz @BB ; yes --> 10272 <1> 10273 0000023F 8CC8 <1> mov ax, cs 10274 00000241 8ED0 <1> mov ss, ax ; relocate the stack 10275 <1> ; The stack frame variables have been relocated here 10276 <1> ; along with the INIT segment data. 10277 <1> 10278 00000243 8B46FE <1> mov ax, word [bp + ?relocatedparas] 10279 00000246 2946F6 <1> sub word [bp + ?data], ax 10280 00000249 721A <1> jc .error_internal 10281 0000024B 2946F4 <1> sub word [bp + ?code], ax 10282 0000024E 7215 <1> jc .error_internal 10283 <1> 10284 00000250 8B4EF4 <1> mov cx, word [bp + ?code] 10285 00000253 81C1650D <1> add cx, paras(ldebug_code_size) 10286 00000257 3B4EFA <1> cmp cx, word [bp + ?targetstart] 10287 <1> ; does code end below-or-equal target ? 10288 0000025A 760E <1> jbe .done_relocation ; yes --> 10289 <1> 10290 <1> .error_out_of_memory: 10291 0000025C BA[B80A] <1> mov dx, imsg.boot_error_out_of_memory 10292 <1> .putsz_error: 10293 0000025F E8A20A <1> call init_putsz_cs_bootldr 10294 00000262 E90C02 <1> jmp init_booterror.soft 10295 <1> 10296 <1> .error_internal: 10297 00000265 BA[C90A] <1> mov dx, imsg.boot_error_internal 10298 00000268 EBF5 <1> jmp .putsz_error 10299 <1> 10300 <1> 10301 <1> .done_relocation: 10302 <1> .no_relocation: 10303 0000026A 8CC8 <1> mov ax, cs 10304 0000026C 8ED0 <1> mov ss, ax ; relocate the stack 10305 <1> ; The stack frame variables have been relocated here 10306 <1> ; along with the INIT segment data. 10307 <1> 10308 0000026E 2EC606[7604]A8 <1> mov byte [cs:init_booterror.patch_switch_stack], __TEST_IMM8 10309 <1> ; SMC in section INIT 10310 <1> 10311 <1> d4 call init_d4message 10312 <1> d4 asciz "Relocated enough",13,10 10313 <1> 10314 <1> 10315 00000274 CD12 <1> int 12h 10316 00000276 B106 <1> mov cl, 6 10317 00000278 D3E0 <1> shl ax, cl 10318 <1> 10319 0000027A 50 <1> push ax 10320 0000027B 1E <1> push ds 10321 0000027C 31F6 <1> xor si, si 10322 0000027E 92 <1> xchg dx, ax 10323 0000027F 8EDE <1> mov ds, si 10324 00000281 C536BC00 <1> lds si, [4 * 2Fh] 10325 00000285 83C603 <1> add si, 3 10326 00000288 AC <1> lodsb 10327 00000289 3C52 <1> cmp al, 'R' 10328 0000028B 750F <1> jne .no_rpl 10329 0000028D AC <1> lodsb 10330 0000028E 3C50 <1> cmp al, 'P' 10331 00000290 750A <1> jne .no_rpl 10332 00000292 AC <1> lodsb 10333 00000293 3C4C <1> cmp al, 'L' 10334 00000295 7505 <1> jne .no_rpl 10335 00000297 B8064A <1> mov ax, 4A06h 10336 0000029A CD2F <1> int 2Fh 10337 <1> .no_rpl: 10338 0000029C 92 <1> xchg ax, dx 10339 0000029D 1F <1> pop ds 10340 0000029E 5A <1> pop dx 10341 <1> 10342 0000029F 39D0 <1> cmp ax, dx 10343 000002A1 7405 <1> je .no_error_rpl 10344 <1> ; in case RPL is present, error out (for now) 10345 <1> 10346 <1> ; notes for +RPL installation: 10347 <1> ; 1. Allocate enough memory for our MCB + an PSP + our image + the last and the RPL MCB 10348 <1> ; 2. Create the RPL's MCB + a last MCB 10349 <1> ; 3. Relocate, initialise PSP 10350 <1> ; 4. Hook Int2F as RPLOADER to report DOS our new size 10351 <1> 10352 000002A3 BA[3E0A] <1> mov dx, imsg.rpl_detected 10353 000002A6 EBB7 <1> jmp .putsz_error 10354 <1> 10355 <1> .no_error_rpl: 10356 <1> d4 call init_d4message 10357 <1> d4 asciz "Loader past RPL detection",13,10 10358 <1> 10359 000002A8 8B5EF8 <1> mov bx, word [bp + ?memtop] 10360 000002AB 39C3 <1> cmp bx, ax 10361 000002AD 7405 <1> je @F 10362 <1> 10363 000002AF BA[650A] <1> mov dx, imsg.mismatch_detected 10364 000002B2 EBAB <1> jmp .putsz_error 10365 <1> 10366 <1> @@: ; bx => behind usable memory 10367 <1> %if 0 10368 <1> mov ah, 0C1h 10369 <1> stc 10370 <1> int 15h ; BIOS, do you have an EBDA? 10371 <1> mov ax, es 10372 <1> jnc .ebda ; segment in ax --> 10373 <1> ; I don't believe you, let's check 10374 <1> %endif ; Enabling this would enable the BIOS to return an EBDA even if it isn't 10375 <1> ; noted at 40h:0Eh, which would be useless because we have to relocate it. 10376 <1> 10377 000002B4 31D2 <1> xor dx, dx ; initialise dx to zero if no EBDA 10378 000002B6 B84000 <1> mov ax, 40h 10379 000002B9 8EC0 <1> mov es, ax 10380 000002BB 26A10E00 <1> mov ax, word [ es:0Eh ] ; EBDA segment (unless zero) or LPT4 base I/O address (200h..3FCh) 10381 000002BF 3D0004 <1> cmp ax, 400h 10382 000002C2 7223 <1> jb .noebda ; --> 10383 <1> .ebda: 10384 <1> d4 call init_d4message 10385 <1> d4 asciz "EBDA detected",13,10 10386 <1> 10387 000002C4 2EFE06[0C08] <1> inc byte [cs:init_boot_ebdaflag] 10388 000002C9 39D8 <1> cmp ax, bx 10389 <1> ;jb init_booterror.soft ; uhh, the EBDA is inside our memory? 10390 <1> ;ja init_booterror.soft ; EBDA higher than top of memory. This is just as unexpected. 10391 000002CB 7405 <1> je @F 10392 000002CD BA[990A] <1> mov dx, imsg.boot_ebda_unexpected 10393 000002D0 EB8D <1> jmp .putsz_error 10394 <1> 10395 <1> @@: 10396 000002D2 8ED8 <1> mov ds, ax 10397 000002D4 31D2 <1> xor dx, dx 10398 000002D6 8A160000 <1> mov dl, byte [ 0 ] ; EBDA size in KiB 10399 000002DA B106 <1> mov cl, 6 10400 000002DC D3E2 <1> shl dx, cl ; *64, to paragraphs 10401 000002DE 2E8916[0608] <1> mov word [cs:init_boot_ebdasize], dx 10402 000002E3 2EA3[0808] <1> mov word [cs:init_boot_ebdasource], ax 10403 <1> d4 jmp @F 10404 <1> .noebda: 10405 <1> d4 call init_d4message 10406 <1> d4 asciz "No EBDA detected",13,10 10407 <1> @@: 10408 <1> 10409 <1> 10410 000002E7 8B4EF8 <1> mov cx, word [bp + ?memtop] 10411 000002EA 2E030E[0608] <1> add cx, [cs:init_boot_ebdasize] 10412 000002EF 81E9A01D <1> sub cx, paras(INITSECTIONOFFSET + datastack_size + auxbuff_size + historysegment_size) 10413 <1> ; cx = paragraph of pseudo-PSP if here 10414 000002F3 49 <1> dec cx ; => paragraph of image ident 10415 000002F4 83E1C0 <1> and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 10416 000002F7 41 <1> inc cx ; => paragraph of pseudo-PSP if here 10417 <1> 10418 000002F8 89CB <1> mov bx, cx 10419 000002FA 89DA <1> mov dx, bx 10420 000002FC 81C39F19 <1> add bx, paras(AUXTARGET1) ; => auxbuff target if here 10421 00000300 81C23A0C <1> add dx, paras(CODETARGET1) ; => code target if here 10422 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10423 00000304 89D8 <1> mov ax, bx 10424 00000306 050102 <1> add ax, paras(auxbuff_size) 10425 <1> %if AUXTARGET1_equ <= CODETARGET1_equ 10426 <1> %error Unexpected layout 10427 <1> %endif 10428 <1> %endif 10429 00000309 E8EFFD <1> call init_check_auxbuff 10430 0000030C 743E <1> jz @F 10431 <1> 10432 <1> d4 call init_d4message 10433 <1> d4 asciz "First layout rejected",13,10 10434 <1> 10435 0000030E 89CB <1> mov bx, cx ; attempt same target again 10436 00000310 89DA <1> mov dx, bx 10437 00000312 81C33A0C <1> add bx, paras(AUXTARGET2) ; => auxbuff target if here 10438 00000316 81C23B0E <1> add dx, paras(CODETARGET2) ; => code target if here 10439 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10440 <1> %if (paras(AUXTARGET1_equ) + paras(auxbuff_size_equ)) != (paras(CODETARGET2_equ) + paras(ldebug_code_size_equ)) 10442 <1> %error Unexpected layout 10443 <1> %endif 10444 <1> %endif 10445 0000031A E8DEFD <1> call init_check_auxbuff 10446 0000031D 742D <1> jz @F 10447 <1> 10448 <1> d4 call init_d4message 10449 <1> d4 asciz "Second layout rejected",13,10 10450 <1> 10451 <1> ; If both prior attempts failed, we allocate 10452 <1> ; an additional 8 KiB and move the buffer to 10453 <1> ; that. This should always succeed. 10454 0000031F 8B4EF8 <1> mov cx, word [bp + ?memtop] 10455 00000322 2E030E[0608] <1> add cx, [cs:init_boot_ebdasize] 10456 00000327 81E9A11F <1> sub cx, paras(INITSECTIONOFFSET + datastack_size + auxbuff_size*2 + historysegment_size) 10457 <1> ; cx = paragraph of pseudo-PSP if here 10458 0000032B 49 <1> dec cx ; => paragraph of image ident 10459 0000032C 83E1C0 <1> and cx, ~ (paras(1024) - 1) ; round down to kibibyte boundary 10460 0000032F 41 <1> inc cx ; => paragraph of pseudo-PSP if here 10461 <1> 10462 00000330 89CB <1> mov bx, cx 10463 00000332 89DA <1> mov dx, bx 10464 00000334 81C39F19 <1> add bx, paras(AUXTARGET1) ; => auxbuff target if here 10465 <1> ; Note that we use AUXTARGET1 here, not AUXTARGET3, because 10466 <1> ; we move where the debugger starts rather than where it ends. 10467 00000338 81C23A0C <1> add dx, paras(CODETARGET1) ; => code target if here 10468 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10469 0000033C 89D8 <1> mov ax, bx 10470 0000033E 050102 <1> add ax, paras(auxbuff_size) 10471 <1> %endif 10472 00000341 E8B7FD <1> call init_check_auxbuff 10473 00000344 7406 <1> jz @F 10474 <1> 10475 <1> ; Because this shouldn't happen, this is 10476 <1> ; considered an internal error. 10477 00000346 BA[3308] <1> mov dx, imsg.early_reloc_fail 10478 00000349 E913FF <1> jmp .putsz_error 10479 <1> 10480 <1> 10481 <1> ; cx => data_entry target 10482 <1> ; dx => code target 10483 <1> ; bx => auxbuff target 10484 <1> ; ax => history segment 10485 <1> @@: 10486 <1> d4 call init_d4message 10487 <1> d4 asciz "Layout found" 10488 <1> d4 call init_d4dumpregs 10489 <1> d4 call init_d4message 10490 <1> d4 asciz 13,10 10491 <1> 10492 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10493 0000034C 50 <1> push ax 10494 <1> %endif 10495 0000034D 894EFC <1> mov word [bp + ?target], cx 10496 00000350 52 <1> push dx 10497 00000351 2E803E[0C08]00 <1> cmp byte [cs:init_boot_ebdaflag], 0 10498 00000357 742E <1> jz .reloc_memtop_no_ebda 10499 00000359 49 <1> dec cx 10500 0000035A 2E2B0E[0608] <1> sub cx, word [cs:init_boot_ebdasize] 10501 0000035F 2EA1[0808] <1> mov ax, word [cs:init_boot_ebdasource] 10502 00000363 89CA <1> mov dx, cx 10503 00000365 2E890E[0A08] <1> mov word [cs:init_boot_ebdadest], cx 10504 0000036A 2E8B0E[0608] <1> mov cx, word [cs:init_boot_ebdasize] 10505 0000036F E8DE08 <1> call init_movp 10506 00000372 014EF8 <1> add word [bp + ?memtop], cx 10507 00000375 2E800E[0C08]02 <1> or byte [cs:init_boot_ebdaflag], 2 10508 0000037B B84000 <1> mov ax, 40h 10509 0000037E 8EC0 <1> mov es, ax 10510 00000380 2689160E00 <1> mov word [es:0Eh], dx ; relocate EBDA 10511 <1> 10512 <1> d4 call init_d4message 10513 <1> d4 asciz "EBDA relocated",13,10 10514 <1> 10515 00000385 EB02 <1> jmp @F 10516 <1> 10517 <1> .reloc_memtop_no_ebda: 10518 00000387 89CA <1> mov dx, cx 10519 <1> @@: 10520 00000389 B106 <1> mov cl, 6 10521 0000038B D3EA <1> shr dx, cl 10522 0000038D B84000 <1> mov ax, 40h 10523 00000390 8EC0 <1> mov es, ax 10524 00000392 2E8916[0208] <1> mov word [ cs:init_boot_new_memsizekib ], dx 10525 00000397 2687161300 <1> xchg word [es:13h], dx 10526 0000039C 2E8916[0408] <1> mov word [ cs:init_boot_old_memsizekib ], dx 10527 000003A1 5A <1> pop dx 10528 <1> d4 call init_d4message 10529 <1> d4 asciz "Memory top relocated",13,10 10530 <1> 10531 000003A2 8B4EFC <1> mov cx, word [bp + ?target] 10532 000003A5 8ED9 <1> mov ds, cx 10533 000003A7 8B7EF8 <1> mov di, word [bp + ?memtop] ; => memory top 10534 000003AA 81EF4002 <1> sub di, paras(1024+8192) 10535 000003AE 8EC7 <1> mov es, di 10536 000003B0 39CF <1> cmp di, cx ; max padding starts below target PSP ? 10537 000003B2 7209 <1> jb @F ; yes, do not initialise padding 10538 000003B4 31FF <1> xor di, di ; -> padding 10539 000003B6 B90012 <1> mov cx, words(1024+8192) 10540 000003B9 31C0 <1> xor ax, ax 10541 000003BB F3AB <1> rep stosw ; initialise padding 10542 <1> @@: 10543 <1> 10544 000003BD 8B46F4 <1> mov ax, word [bp + ?code] ; => code source 10545 <1> ; dx => code target 10546 000003C0 B9650D <1> mov cx, ldebug_code_size_p ; = size 10547 000003C3 E88A08 <1> call init_movp ; relocate code to target 10548 <1> d4 call init_d4message 10549 <1> d4 asciz "Code segment relocated",13,10 10550 <1> 10551 000003C6 52 <1> push dx ; (code segment) 10552 000003C7 8B46F6 <1> mov ax, word [bp + ?data] ; => data_entry source 10553 000003CA 8CDA <1> mov dx, ds 10554 000003CC 83C210 <1> add dx, paras(100h) ; => data_entry target 10555 000003CF B9660B <1> mov cx, paras(ldebug_data_entry_size + asmtable1_size + asmtable2_size) 10556 000003D2 E87B08 <1> call init_movp ; relocate data_entry to target 10557 000003D5 8F06[CE00] <1> pop word [code_seg] ; initialise code reference 10558 <1> d4 call init_d4message 10559 <1> d4 asciz "Data segment relocated",13,10 10560 <1> 10561 <1> %if _HISTORY_SEPARATE_FIXED && _HISTORY 10562 000003D9 58 <1> pop ax 10563 000003DA A3[F60A] <1> mov word [history.segorsel + soaSegSel], ax 10564 <1> %if _PM 10565 000003DD A3[F80A] <1> mov word [history.segorsel + soaSegment], ax 10566 <1> %endif 10567 000003E0 8EC0 <1> mov es, ax 10568 000003E2 31FF <1> xor di, di 10569 000003E4 B90010 <1> mov cx, historysegment_size >> 1 10570 000003E7 31C0 <1> xor ax, ax 10571 000003E9 F3AB <1> rep stosw 10572 <1> %endif 10573 <1> 10574 000003EB 89D8 <1> mov ax, bx 10575 000003ED A3[F209] <1> mov word [auxbuff_segorsel + soaSegSel], ax 10576 <1> %if _PM 10577 000003F0 A3[F409] <1> mov word [auxbuff_segorsel + soaSegment], ax 10578 <1> ; initialise auxbuff references 10579 <1> %endif 10580 000003F3 8EC0 <1> mov es, ax 10581 000003F5 31FF <1> xor di, di 10582 000003F7 B90810 <1> mov cx, _AUXBUFFSIZE >> 1 10583 000003FA 31C0 <1> xor ax, ax 10584 000003FC F3AB <1> rep stosw ; initialise auxbuff 10585 <1> d4 call init_d4message 10586 <1> d4 asciz "auxbuff initialised",13,10 10587 <1> 10588 000003FE 1E <1> push ds 10589 000003FF 07 <1> pop es 10590 00000400 31FF <1> xor di, di 10591 00000402 B98000 <1> mov cx, words(100h) 10592 00000405 F3AB <1> rep stosw ; initialise pseudo-PSP 10593 <1> 10594 <1> init_boot_imageident: 10595 00000407 8CD8 <1> mov ax, ds 10596 00000409 48 <1> dec ax 10597 0000040A 8EC0 <1> mov es, ax ; => paragraph for imageident 10598 0000040C 31FF <1> xor di, di ; -> imageident target 10599 0000040E 8B5EF8 <1> mov bx, word [bp + ?memtop] 10600 00000411 29C3 <1> sub bx, ax ; = how many paragraphs do we use ? 10601 <1> 10602 00000413 0E <1> push cs 10603 00000414 1F <1> pop ds 10604 00000415 891E[F807] <1> mov word [imageident.size], bx ; set image ident size 10605 <1> 10606 00000419 BE[F007] <1> mov si, imageident 10607 0000041C 56 <1> push si 10608 0000041D B90800 <1> mov cx, 8 10609 00000420 31D2 <1> xor dx, dx 10610 <1> .loop: 10611 00000422 AD <1> lodsw 10612 00000423 01C2 <1> add dx, ax 10613 00000425 E2FB <1> loop .loop 10614 00000427 5E <1> pop si 10615 <1> 10616 00000428 F7DA <1> neg dx 10617 0000042A 8916[F607] <1> mov word [imageident.check], dx ; set image ident checksum 10618 <1> 10619 0000042E B108 <1> mov cl, 8 10620 00000430 F3A5 <1> rep movsw ; write image ident paragraph 10621 <1> 10622 00000432 8B46FC <1> mov ax, word [bp + ?target] 10623 <1> 10624 <1> lleave ctx ; dropping this frame for stack switch 10625 <1> 10626 00000435 FA <1> cli 10627 00000436 8ED8 <1> mov ds, ax 10628 00000438 8ED0 <1> mov ss, ax 10629 0000043A BC[400C] <1> mov sp, stack_end ; switch stacks 10630 0000043D FB <1> sti 10631 <1> 10632 0000043E 2EFF36[0408] <1> push word [cs:init_boot_old_memsizekib] 10633 00000443 8F06[0490] <1> pop word [boot_old_memsizekib] 10634 00000447 2EFF36[0208] <1> push word [cs:init_boot_new_memsizekib] 10635 0000044C 8F06[0290] <1> pop word [boot_new_memsizekib] 10636 00000450 2EA0[0C08] <1> mov al, byte [cs:init_boot_ebdaflag] 10637 00000454 2401 <1> and al, 1 10638 00000456 A2[0690] <1> mov byte [boot_ebdaflag], al 10639 <1> 10640 00000459 800E[9D00]40 <1> setopt [internalflags], nodosloaded 10641 0000045E 8026[9C00]0F <1> clropt [internalflags], notstdinput|inputfile|notstdoutput|outputfile 10642 00000463 C606[E70A]00 <1> mov byte [notatty], 0 ; it _is_ a tty 10643 <1> 10644 00000468 BA[3008] <1> mov dx, imsg.crlf 10645 0000046B E87308 <1> call init_putsz_cs 10646 <1> 10647 <1> d4 call init_d4message 10648 <1> d4 asciz "New boot_initcode done",13,10 10649 <1> 10650 0000046E E9D908 <1> jmp boot_old_initcode 10651 <1> 10652 <1> 10653 <1> init_booterror: 10654 <1> .soft: 10655 00000471 31C0 <1> xor ax, ax 10656 00000473 A9 <1> db __TEST_IMM16 ; (skip mov) 10657 <1> .hard: 10658 00000474 B001 <1> mov al, 1 10659 <1> 10660 <1> ;d4 call init_d4pocketdosmemdump 10661 <1> d4 call init_d4dumpregs 10662 <1> 10663 <1> .patch_switch_stack: 10664 00000476 EB09 <1> jmp strict short .no_switch_stack 10665 <1> 10666 00000478 8CCB <1> mov bx, cs 10667 0000047A FA <1> cli 10668 0000047B 8ED3 <1> mov ss, bx 10669 0000047D BCA014 <1> mov sp, init_size + BOOTINITSTACK_SIZE 10670 00000480 FB <1> sti 10671 <1> 10672 <1> .no_switch_stack: 10673 00000481 50 <1> push ax 10674 <1> 10675 00000482 B84000 <1> mov ax, 40h 10676 00000485 8EC0 <1> mov es, ax 10677 <1> 10678 00000487 2EF606[0C08]02 <1> test byte [cs:init_boot_ebdaflag], 2 10679 0000048D 7416 <1> jz @F 10680 <1> 10681 0000048F 2E8B16[0808] <1> mov dx, [cs:init_boot_ebdasource] 10682 00000494 2EA1[0A08] <1> mov ax, [cs:init_boot_ebdadest] 10683 00000498 2E8B0E[0608] <1> mov cx, [cs:init_boot_ebdasize] 10684 0000049D E8B007 <1> call init_movp 10685 <1> 10686 000004A0 2689160E00 <1> mov word [es:0Eh], dx 10687 <1> @@: 10688 <1> 10689 000004A5 2E8B16[0408] <1> mov dx, [cs:init_boot_old_memsizekib] 10690 000004AA 85D2 <1> test dx, dx 10691 000004AC 7405 <1> jz @F 10692 000004AE 2689161300 <1> mov word [es:13h], dx 10693 <1> @@: 10694 <1> 10695 000004B3 BA[F70A] <1> mov dx, imsg.booterror 10696 000004B6 E84B08 <1> call init_putsz_cs_bootldr 10697 000004B9 E82008 <1> call init_getc_bootldr 10698 000004BC 58 <1> pop ax 10699 000004BD 85C0 <1> test ax, ax 10700 000004BF 7502 <1> jnz @F 10701 000004C1 CD19 <1> int 19h 10702 <1> @@: 10703 000004C3 EA0000FFFF <1> jmp 0FFFFh:0 10704 <1> %endif ; _BOOTLDR 10705 <1> 10706 <1> 10707 <1> %if _DEBUG4 || _DEBUG5 10708 <1> %define _DEB_ASM_PREFIX init_ 10709 <1> %include "deb.asm" 10710 <1> %endif 10711 <1> 10712 <1> 10713 <1> %macro __writepatchtable2 0-*.nolist 10714 <1> %if %0 & 1 10715 <1> %fatal Expected even number of arguments 10716 <1> %endif 10717 <1> %rep %0 >> 1 10718 <1> %1 %2 10719 <1> %rotate 2 10720 <1> %endrep 10721 <1> %endmacro 10722 <1> 10723 <1> %macro __patchtable2_entry 0.nolist 10724 <1> ; only if this isn't the first (pseudo-)entry 10725 <1> %if %$lastcount != 0 10726 <1> %assign %$runscount %[%$runscount]+1 10727 <1> ; if the offset from %$previous is less than 255 10728 <1> %if (%$last-%$previous) < 255 10729 <1> %assign %$$method2tablesize %$$method2tablesize+1 10730 <1> ; then write a single byte (number of bytes not to patch between) 10731 <1> %xdefine %$$method2list %$$method2list,db,%$last-%$previous 10732 <1> %else 10733 <1> ; otherwise write a 255 ("reposition") and write the 16-bit address afterwards 10734 <1> %assign %$$method2tablesize %$$method2tablesize+3 10735 <1> %xdefine %$$method2list %$$method2list,db,255,dw,%$last 10736 <1> %assign %$reposcount %[%$reposcount]+1 10737 <1> %endif 10738 <1> %if %$lastcount == 1 10739 <1> %assign %$onecount %[%$onecount]+1 10740 <1> %endif 10741 <1> %assign %$$method2tablesize %$$method2tablesize+1 10742 <1> ; and write the number of bytes to be patched 10743 <1> %xdefine %$$method2list %$$method2list,db,%$lastcount 10744 <1> ; define %$previous for the next entry: it points to the next non-patched byte 10745 <1> %define %$previous (%[%$last]+%[%$lastcount]) 10746 <1> %endif 10747 <1> %endmacro 10748 <1> 10749 <1> %macro writepatchtable 2-*.nolist 10750 <1> 10751 <1> numdef %{1}_FORCE_METHOD, 0 10752 <1> %push 10753 <1> ; Determine length of simple table: 10754 <1> %assign %$method1tablesize (%0 - 2)*2 10755 <1> 10756 <1> %if !_%{1}_FORCE_METHOD || _%{1}_FORCE_METHOD == 2 10757 <1> ; Determine length of complicated table: 10758 <1> %assign %$method2tablesize 0 10759 <1> %define %$method2list db,"" 10760 <1> %push 10761 <1> %if _WPT_LABELS 10762 <1> %define %$previous code_start ; if list contains labels 10763 <1> %else 10764 <1> %define %$previous 0 10765 <1> %endif 10766 <1> %define %$last %[%$previous] 10767 <1> %assign %$lastcount 0 10768 <1> %assign %$onecount 0 10769 <1> %assign %$reposcount 0 10770 <1> %assign %$bytescount %0 - 2 10771 <1> %assign %$runscount 0 10772 <1> %rotate 1 10773 <1> %rep %0 - 2 10774 <1> %rotate 1 10775 <1> ;if it continues the previous patch and not too long and this isn't the first 10776 <1> %if ((%$last+%$lastcount) == %1) && (%$lastcount < 255) && (%$lastcount != 0) 10777 <1> ; then do not write an entry, just increase the patch's size 10778 <1> %assign %$lastcount %[%$lastcount]+1 10779 <1> %else 10780 <1> ; otherwise write the last entry 10781 <1> __patchtable2_entry 10782 <1> ; define new %$last to this parameter, %$lastcount to one 10783 <1> %define %$last %1 10784 <1> %assign %$lastcount 1 10785 <1> %endif 10786 <1> %endrep 10787 <1> __patchtable2_entry 10788 <1> 10789 <1> ; at the end, there's a patch with offset 0, size 0 10790 <1> %assign %$$method2tablesize %$$method2tablesize+2 10791 <1> %xdefine %$$method2list %$$method2list,db,0,db,0 10792 <1> 10793 <1> %assign %$$onecount %$onecount 10794 <1> %assign %$$reposcount %$reposcount 10795 <1> %assign %$$bytescount %$bytescount 10796 <1> %assign %$$runscount %$runscount 10797 <1> %pop 10798 <1> %rotate 1 10799 <1> %endif 10800 <1> 10801 <1> %if _%{1}_FORCE_METHOD == 2 10802 <1> %define __%{1}_method 2 10803 <1> %elif _%{1}_FORCE_METHOD == 1 10804 <1> %define __%{1}_method 1 10805 <1> %else 10806 <1> %if _%{1}_FORCE_METHOD 10807 <1> %fatal Invalid forced method selected: _%{1}_FORCE_METHOD 10808 <1> %endif 10809 <1> %if %$method1tablesize > (%$method2tablesize+20) 10810 <1> %define __%{1}_method 2 10811 <1> %else 10812 <1> %define __%{1}_method 1 10813 <1> %endif 10814 <1> %endif 10815 <1> 10816 <1> 10817 <1> %1: 10818 <1> %if __%{1}_method == 2 10819 <1> __writepatchtable2 %$method2list 10820 <1> endarea %1 10821 <1> %assign %$size %1_size 10822 <1> %warning %1: %$size bytes (Method 2) 10823 <1> %warning 1B=%$onecount repo=%$reposcount run=%$runscount byte=%$bytescount 10824 <1> %else 10825 <1> %rotate 1 10826 <1> %rep %0 - 2 10827 <1> %rotate 1 10828 <1> dw %1 10829 <1> %endrep 10830 <1> %rotate 1 10831 <1> endarea %1 10832 <1> %assign %$size %1_size 10833 <1> %warning %1: %$size bytes (Method 1) 10834 <1> %endif 10835 <1> %pop 10836 <1> %endmacro 10837 <1> 10838 <1> align 2, db 0 ; align on word boundary 10839 <1> ; Table of patches that are to be set NOP if not running on a 386. 10840 000004C8 020104040201010101- <1> writepatchtable patch_no386_table, PATCH_NO386_TABLE 10840 000004D1 04FFA9030104040201- <1> 10840 000004DA 01010104FF5B0501FF- <1> 10840 000004E3 07080104090201FFD8- <1> 10840 000004EC 0C011101080116011D- <1> 10840 000004F5 0108014A0106010B01- <1> 10840 000004FE 0A010901050103010A- <1> 10840 00000507 01060103010A010301- <1> 10840 00000510 030101010401FF310F- <1> 10840 00000519 01030101012F010504- <1> 10840 00000522 FF1A13042F01040106- <1> 10840 0000052B 053B010201FFBF1401- <1> 10840 00000534 020105013D01160104- <1> 10840 0000053D 012101040123010101- <1> 10840 00000546 0201060A010110010C- <1> 10840 0000054F 120C010401FFD21601- <1> 10840 00000558 2D011B010801050124- <1> 10840 00000561 010F01FFC01801FFA2- <1> 10840 0000056A 20049C0137016101FF- <1> 10840 00000573 B42301FFEF2410FF33- <1> 10840 0000057C 2801FFBB2901120124- <1> 10840 00000585 011D01010102011401- <1> 10840 0000058E 020503010208B701EB- <1> 10840 00000597 0AFF182F010B01FF7B- <1> 10840 000005A0 310126030709F80A28- <1> 10840 000005A9 01FF82370107010401- <1> 10840 000005B2 150B31013F012F0302- <1> 10840 000005BB 032201110115010F01- <1> 10840 000005C4 110718011101010101- <1> 10840 000005CD 010101180101010101- <1> 10840 000005D6 01012B04B301260307- <1> 10840 000005DF 09FF513D013F04040A- <1> 10840 000005E8 340104019F0127030C- <1> 10840 000005F1 0504034B0101010101- <1> 10840 000005FA 01010109FFB84101FF- <1> 10840 00000603 FB420827023A010401- <1> 10840 0000060C 040116061D02FF4145- <1> 10840 00000615 020901010120010101- <1> 10840 0000061E FFD046010B01A10104- <1> 10840 00000627 010201050125010401- <1> 10840 00000630 040101010901010101- <1> 10840 00000639 010301020102010201- <1> 10840 00000642 1F010201E709FF234A- <1> 10840 0000064B 0DFF374B01FF244D01- <1> 10840 00000654 FF984E01040104011A- <1> 10840 0000065D 01140B9B012E020301- <1> 10840 00000666 030103020301030103- <1> 10840 0000066F 020301030103020301- <1> 10840 00000678 0301FFD4540105011A- <1> 10840 00000681 01FFB9560EE1010201- <1> 10840 0000068A 2301FF895901010104- <1> 10840 00000693 010801010102010601- <1> 10840 0000069C 010104010801010102- <1> 10840 000006A5 010601080109015301- <1> 10840 000006AE 570507027F01090314- <1> 10840 000006B7 010906090306010601- <1> 10840 000006C0 01010A011C03050101- <1> 10840 000006C9 010B0311046F010601- <1> 10840 000006D2 02030A0125010801FF- <1> 10840 000006DB 685D051505FFAC5E01- <1> 10840 000006E4 0D0102012D01020129- <1> 10840 000006ED 01FFDF600B140BFFAC- <1> 10840 000006F6 8C01A6065C06250102- <1> 10840 000006FF 01020101011A010201- <1> 10840 00000708 1604020303010101FF- <1> 10840 00000711 CA9104FF1893046604- <1> 10840 0000071A FF8E96011001020103- <1> 10840 00000723 010201050101010201- <1> 10840 0000072C 0201FFC49801090421- <1> 10840 00000735 01FF609E0108010101- <1> 10840 0000073E 29010201220105041D- <1> 10840 00000747 03FFCCA50147010C01- <1> 10840 00000750 0F0107031201470104- <1> 10840 00000759 011301950102010101- <1> 10840 00000762 0E010101020109010A- <1> 10840 0000076B 03AD032D040C050B05- <1> 10840 00000774 0E010A0104200D030A- <1> 10840 0000077D 01070102011A042F03- <1> 10840 00000786 0B0101011C034609FF- <1> 10840 0000078F 64AC02FFB3AE011201- <1> 10840 00000798 05018C028501051EFF- <1> 10840 000007A1 9AB40707070201BA07- <1> 10840 000007AA 30010A07FF55C10101- <1> 10840 000007B3 032701FF1EC4010404- <1> 10840 000007BC 020101010104FF58D5- <1> 10840 000007C5 010000 <1> 10840 ****************** <1> warning: patch_no386_table: 768 (Method 2) [-w+user] 10840 ****************** <1> warning: 1B=249 repo=45 run=338 byte=785 [-w+user] 10841 <1> %undef PATCH_NO386_TABLE 10842 <1> 10843 <1> align 2, db 0 10844 <1> ; Table of patches that are to be set NOP if running on a 386. 10845 000007C8 FF521602FFE62905FF- <1> writepatchtable patch_386_table, PATCH_386_TABLE 10845 000007D1 1C3805FF023E02FFE2- <1> 10845 000007DA 4B0E4D0EFFEC4E07FF- <1> 10845 000007E3 E1AF04FF57D5010000 <1> 10845 ****************** <1> warning: patch_386_table: 36 (Method 2) [-w+user] 10845 ****************** <1> warning: 1B=1 repo=8 run=9 byte=54 [-w+user] 10846 <1> %undef PATCH_386_TABLE 10847 <1> 10848 <1> %unmacro __writepatchtable2 0-*.nolist 10849 <1> %unmacro __patchtable2_entry 0.nolist 10850 <1> %unmacro writepatchtable 2-*.nolist 10851 <1> 10852 <1> 10853 <1> %if _BOOTLDR 10854 000007EC 00 <1> align 16, db 0 10855 <1> ; Image identification 10856 <1> ; First dword: signature 10857 <1> ; Next word: version, two ASCII digits 10858 <1> ; Next word: checksum. adding up all words of the paragraph gives zero 10859 <1> ; Next word: size of image (including this paragraph) 10860 <1> ; Three words reserved, zero. 10861 <1> imageident: 10862 000007F0 4E4445423030 <1> db "NDEB00" 10863 000007F6 0000 <1> .check: dw 0 10864 000007F8 0000 <1> .size: dw 0 10865 000007FA 0000 <1> times 3 dw 0 10866 <1> %endif 10867 <1> align 2, db 0 10868 00000800 A01D <1> memsize: dw paras(CODETARGET2 + ldebug_code_size + historysegment_size) 10871 <1> ; same as paras(AUXTARGET1 + auxbuff_size + historysegment_size) 10872 <1> 10873 <1> %if _BOOTLDR 10874 00000802 0000 <1> init_boot_new_memsizekib: dw 0 10875 00000804 0000 <1> init_boot_old_memsizekib: dw 0 10876 <1> 10877 00000806 0000 <1> init_boot_ebdasize: dw 0 10878 00000808 0000 <1> init_boot_ebdasource: dw 0 10879 0000080A 0000 <1> init_boot_ebdadest: dw 0 10880 0000080C 00 <1> init_boot_ebdaflag: db 0 10881 <1> %endif 10882 <1> 10883 <1> 10884 <1> imsg: 10885 <1> .early_mem_fail: 10886 0000080D 6C4465627567583A20- <1> db _PROGNAME,": Failed to allocate memory!" 10886 00000816 4661696C656420746F- <1> 10886 0000081F 20616C6C6F63617465- <1> 10886 00000828 206D656D6F727921 <1> 10887 <1> .crlf: 10888 00000830 0D0A00 <1> asciz 13,10 10889 <1> .early_reloc_fail: 10890 00000833 6C4465627567583A20- <1> asciz _PROGNAME,": Failed to relocate, internal error!",13,10 10890 0000083C 4661696C656420746F- <1> 10890 00000845 2072656C6F63617465- <1> 10890 0000084E 2C20696E7465726E61- <1> 10890 00000857 6C206572726F72210D- <1> 10890 00000860 0A00 <1> 10891 <1> .help.defaultfilename: 10892 00000862 444542554758 <1> db _FILENAME 10893 <1> .help.defaultfilename.length equ $ - .help.defaultfilename 10894 <1> .help.1: 10895 00000868 6C4465627567582028- <1> db _PROGNAME,_VERSION,", debugger.",13,10 10895 00000871 323032322D30342D32- <1> 10895 0000087A 33292C206465627567- <1> 10895 00000883 6765722E0D0A <1> 10896 00000889 0D0A <1> db 13,10 10897 0000088B 55736167653A20 <1> db "Usage: " 10898 00000892 00 <1> asciz 10899 <1> .help.2: 10900 00000893 5B2E434F4D5D205B2F- <1> db "[.COM] [/C=commands] [[drive:][path]progname.ext [parameters]]",13,10 10900 0000089C 433D636F6D6D616E64- <1> 10900 000008A5 735D205B5B64726976- <1> 10900 000008AE 653A5D5B706174685D- <1> 10900 000008B7 70726F676E616D652E- <1> 10900 000008C0 657874205B70617261- <1> 10900 000008C9 6D65746572735D5D0D- <1> 10900 000008D2 0A <1> 10901 000008D3 0D0A <1> db 13,10 10902 000008D5 20202F433D636F6D6D- <1> db " /C=commands",9,9, "semicolon-separated list of commands (quote spaces)",13,10 10902 000008DE 616E6473090973656D- <1> 10902 000008E7 69636F6C6F6E2D7365- <1> 10902 000008F0 70617261746564206C- <1> 10902 000008F9 697374206F6620636F- <1> 10902 00000902 6D6D616E6473202871- <1> 10902 0000090B 756F74652073706163- <1> 10902 00000914 6573290D0A <1> 10903 00000919 202070726F676E616D- <1> db " progname.ext",9,9,"(executable) file to debug or examine",13,10 10903 00000922 652E65787409092865- <1> 10903 0000092B 786563757461626C65- <1> 10903 00000934 292066696C6520746F- <1> 10903 0000093D 206465627567206F72- <1> 10903 00000946 206578616D696E650D- <1> 10903 0000094F 0A <1> 10904 00000950 2020706172616D6574- <1> db " parameters",9,9, "parameters given to program",13,10 10904 00000959 657273090970617261- <1> 10904 00000962 6D6574657273206769- <1> 10904 0000096B 76656E20746F207072- <1> 10904 00000974 6F6772616D0D0A <1> 10905 0000097B 0D0A <1> db 13,10 10906 0000097D 466F722061206C6973- <1> db "For a list of debugging commands, run " 10906 00000986 74206F662064656275- <1> 10906 0000098F 6767696E6720636F6D- <1> 10906 00000998 6D616E64732C207275- <1> 10906 000009A1 6E20 <1> 10907 000009A3 00 <1> asciz 10908 <1> .help.3: 10909 000009A4 20616E642074797065- <1> db " and type ? at the prompt.",13,10 10909 000009AD 203F20617420746865- <1> 10909 000009B6 2070726F6D70742E0D- <1> 10909 000009BF 0A <1> 10910 000009C0 00 <1> asciz 10911 <1> %if _ONLY386 10912 <1> .no386: ascizline "Error: This ",_PROGNAME," build requires a 386 CPU or higher." 10913 <1> %elif _ONLYNON386 10914 <1> .386: asciiline "Warning: This ",_PROGNAME," build is ignorant of 386 CPU specifics." 10915 <1> ascizline 9," It does not allow access to the available 386-specific registers!" 10916 <1> %endif 10917 <1> 10918 <1> .invalidswitch: 10919 000009C1 496E76616C69642073- <1> db "Invalid switch - " 10919 000009CA 7769746368202D20 <1> 10920 <1> .invalidswitch_a: 10921 000009D2 780D0A00 <1> asciz "x",13,10 10922 <1> .switch_c_error: 10923 000009D6 537769746368202F43- <1> asciz "Switch /C invalid content",13,10 10923 000009DF 20696E76616C696420- <1> 10923 000009E8 636F6E74656E740D0A- <1> 10923 000009F1 00 <1> 10924 <1> %if _BOOTLDR 10925 <1> .default_cmdline: 10926 <1> db _BOOTSCRIPTPREFIX 10927 000009F2 406966206578697374- <1> db "@if exists y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 10927 000009FB 732079206C64702F4C- <1> 10927 00000A04 44454255472E534C44- <1> 10927 00000A0D 203A626F6F74737461- <1> 10927 00000A16 72747570 <1> 10928 00000A1A 207468656E2079206C- <1> db " then y ldp/",_BOOTSCRIPTNAME," :",_BOOTSCRIPTLABEL 10928 00000A23 64702F4C4445425547- <1> 10928 00000A2C 2E534C44203A626F6F- <1> 10928 00000A35 7473746172747570 <1> 10929 00000A3D 00 <1> asciz 10930 <1> .rpl_detected: 10931 00000A3E 52504C206465746563- <1> asciz "RPL detected! Currently unsupported.",13,10 10931 00000A47 746564212043757272- <1> 10931 00000A50 656E746C7920756E73- <1> 10931 00000A59 7570706F727465642E- <1> 10931 00000A62 0D0A00 <1> 10932 <1> .mismatch_detected: 10933 00000A65 4D69736D6174636820- <1> asciz "Mismatch in memory size detected! Internal error!",13,10 10933 00000A6E 696E206D656D6F7279- <1> 10933 00000A77 2073697A6520646574- <1> 10933 00000A80 65637465642120496E- <1> 10933 00000A89 7465726E616C206572- <1> 10933 00000A92 726F72210D0A00 <1> 10934 <1> .boot_ebda_unexpected: 10935 00000A99 454244412061742075- <1> asciz "EBDA at unexpected position.",13,10 10935 00000AA2 6E6578706563746564- <1> 10935 00000AAB 20706F736974696F6E- <1> 10935 00000AB4 2E0D0A00 <1> 10936 <1> .boot_error_out_of_memory: 10937 00000AB8 4F7574206F66206D65- <1> asciz "Out of memory!",13,10 10937 00000AC1 6D6F7279210D0A00 <1> 10938 <1> .boot_error_internal: 10939 00000AC9 496E7465726E616C20- <1> asciz "Internal error while relocating load image!",13,10 10939 00000AD2 6572726F7220776869- <1> 10939 00000ADB 6C652072656C6F6361- <1> 10939 00000AE4 74696E67206C6F6164- <1> 10939 00000AED 20696D616765210D0A- <1> 10939 00000AF6 00 <1> 10940 <1> .booterror: 10941 00000AF7 0D0A6C446562756758- <1> asciz 13,10,_PROGNAME," boot error. Press any key to reboot.",13,10 10941 00000B00 20626F6F7420657272- <1> 10941 00000B09 6F722E205072657373- <1> 10941 00000B12 20616E79206B657920- <1> 10941 00000B1B 746F207265626F6F74- <1> 10941 00000B24 2E0D0A00 <1> 10942 <1> %endif 10943 <1> %if _DOSEMU 10944 00000B28 30322F32352F3933 <1> .dosemudate: db "02/25/93" 10945 <1> %endif 10946 <1> %if _VDD 10947 00000B30 44454258585644442E- <1> .vdd: asciz "DEBXXVDD.DLL" 10947 00000B39 444C4C00 <1> 10948 00000B3D 446973706174636800 <1> .dispatch: asciz "Dispatch" 10949 00000B46 496E697400 <1> .init: asciz "Init" 10950 00000B4B 4D4F555345202020 <1> .mouse: db "MOUSE",32,32,32 ; Looks like a device name 10951 00000B53 416E64792057617473- <1> .andy: db "Andy Watson" ; I don't know him and why he's inside the NTVDM mouse driver 10951 00000B5C 6F6E <1> 10952 <1> endarea .andy 10953 00000B5E 57696E646F7773204E- <1> .ntdos: db "Windows NT MS-DOS subsystem Mouse Driver" ; Int33.004D mouse driver copyright string (not ASCIZ) 10953 00000B67 54204D532D444F5320- <1> 10953 00000B70 73756273797374656D- <1> 10953 00000B79 204D6F757365204472- <1> 10953 00000B82 69766572 <1> 10954 <1> endarea .ntdos 10955 <1> 10956 <1> ; INP: - 10957 <1> ; OUT: CY if not NTVDM 10958 <1> ; NC if NTVDM 10959 <1> ; ds = es = cs 10960 <1> ; CHG: ax, bx, cx, dx, di, si, bp, es, ds 10961 <1> isnt: 10962 00000B86 B80258 <1> mov ax, 5802h ; Get UMB link state 10963 00000B89 CD21 <1> int 21h 10964 00000B8B 30E4 <1> xor ah, ah 10965 00000B8D 50 <1> push ax ; Save UMB link state 10966 00000B8E B80358 <1> mov ax, 5803h ; Set UMB link state: 10967 00000B91 BB0100 <1> mov bx, 1 ; Add UMBs to memory chain 10968 00000B94 CD21 <1> int 21h 10969 00000B96 B452 <1> mov ah, 52h 10970 00000B98 BBFFFF <1> mov bx, -1 10971 00000B9B CD21 <1> int 21h ; Get list of lists 10972 00000B9D 43 <1> inc bx ; 0FFFFh ? 10973 00000B9E 7503E98600 <1> jz .notnt ; invalid --> 10974 00000BA3 268B47FD <1> mov ax, word [es:bx-3] ; First MCB 10975 00000BA7 0E <1> push cs 10976 00000BA8 07 <1> pop es ; reset es 10977 <1> .loop: 10978 00000BA9 8ED8 <1> mov ds, ax ; ds = MCB 10979 00000BAB 40 <1> inc ax ; Now segment of memory block itself 10980 00000BAC 31D2 <1> xor dx, dx 10981 00000BAE 31DB <1> xor bx, bx 10982 00000BB0 803F5A <1> cmp byte [bx], 'Z' ; End of MCB chain? 10983 00000BB3 7503 <1> jne .notlast 10984 00000BB5 42 <1> inc dx 10985 00000BB6 EB05 <1> jmp short .notchain 10986 <1> .notlast: 10987 00000BB8 803F4D <1> cmp byte [bx], 'M' ; Valid MCB chain? 10988 00000BBB 756C <1> jne .error 10989 <1> .notchain: 10990 00000BBD 8B4F03 <1> mov cx, [bx+3] ; MCB size in paragraphs 10991 <1> ; ax = current memory block 10992 <1> ; cx = size of current memory block in paragraphs 10993 <1> ; dx = flag whether this is the last MCB 10994 <1> ; ds = current MCB (before memory block) 10995 00000BC0 837F0108 <1> cmp word [bx+1], 8 ; MCB owner DOS? 10996 00000BC4 755D <1> jne .notfound_1 10997 00000BC6 817F085344 <1> cmp word [bx+8], "SD" ; MCB name "SD"? 10998 00000BCB 7556 <1> jne .notfound_1 10999 <1> .loopsub: 11000 00000BCD 8ED8 <1> mov ds, ax ; SD sub-segment inside memory block 11001 00000BCF 40 <1> inc ax 11002 00000BD0 49 <1> dec cx 11003 00000BD1 8B6F03 <1> mov bp, word [bx+3] ; Paragraphs 'til end of SD sub-segment 11004 <1> ; ax = current SD sub-segment 11005 <1> ; cx = paragraphs from SD sub-segment start (ax) to current memory block end 11006 <1> ; ds = current SD sub-MCB (like MCB, but for SD sub-segment) 11007 <1> ; bp = current SD sub-segment size in paragraphs 11008 00000BD4 39E9 <1> cmp cx, bp 11009 00000BD6 724B <1> jb .notfound_1 ; Goes beyond memory block, invalid --> 11010 00000BD8 803F51 <1> cmp byte [bx], 'Q' ; NTVDM type 51h sub-segment ? 11011 00000BDB 753C <1> jne .notfound_2 ; no --> 11012 00000BDD BE0800 <1> mov si, 8 ; Offset of device name (if SD device driver sub-segment) 11013 00000BE0 BF[4B0B] <1> mov di, imsg.mouse 11014 00000BE3 51 <1> push cx 11015 00000BE4 89F1 <1> mov cx, si ; length of name 11016 00000BE6 F3A6 <1> repe cmpsb ; blank-padded device name "MOUSE" ? 11017 00000BE8 59 <1> pop cx 11018 00000BE9 752E <1> jne .notfound_2 ; Device name doesn't match, try next SD sub-segment 11019 00000BEB 8CD8 <1> mov ax, ds 11020 00000BED 40 <1> inc ax 11021 00000BEE 8ED8 <1> mov ds, ax ; Segment of SD sub-segment 11022 <1> ; ds = current SD sub-segment 11023 00000BF0 89E8 <1> mov ax, bp ; Leave paragraph value in bp 11024 00000BF2 A900F0 <1> test ax, 0F000h ; Would *16 cause an overflow? 11025 00000BF5 7520 <1> jnz .notfound_3 ; Then too large --> 11026 00000BF7 51 <1> push cx 11027 00000BF8 B104 <1> mov cl, 4 11028 00000BFA D3E0 <1> shl ax, cl ; *16 11029 00000BFC 59 <1> pop cx 11030 <1> ; ax = current SD sub-segment size in byte 11031 <1> .andy: 11032 00000BFD BF[530B] <1> mov di, imsg.andy 11033 00000C00 51 <1> push cx 11034 00000C01 B90B00 <1> mov cx, imsg.andy_size 11035 00000C04 E82E00 <1> call findstring ; String "Andy Watson"? 11036 00000C07 59 <1> pop cx 11037 00000C08 720D <1> jc .notfound_3 11038 <1> .ntdos: 11039 00000C0A BF[5E0B] <1> mov di, imsg.ntdos 11040 00000C0D 51 <1> push cx 11041 00000C0E B92800 <1> mov cx, imsg.ntdos_size 11042 00000C11 E82100 <1> call findstring ; String "Windows NT MS-DOS subsystem Mouse Driver"? 11043 00000C14 59 <1> pop cx 11044 00000C15 7313 <1> jnc .found ; (NC) 11045 <1> .notfound_3: 11046 00000C17 8CD8 <1> mov ax, ds 11047 <1> .notfound_2: 11048 00000C19 39E9 <1> cmp cx, bp 11049 00000C1B 7406 <1> je .notfound_1 ; End of SD memory block, get next MCB 11050 00000C1D 01E8 <1> add ax, bp ; Address next SD sub-MCB 11051 00000C1F 29E9 <1> sub cx, bp 11052 00000C21 EBAA <1> jmp short .loopsub ; Try next SD sub-segment 11053 <1> .notfound_1: 11054 00000C23 01C8 <1> add ax, cx ; Address next MCB 11055 00000C25 85D2 <1> test dx, dx ; Non-zero if 'Z' MCB 11056 00000C27 7480 <1> jz .loop ; If not at end of MCB chain, try next 11057 <1> ; jmp short .notnt ; Otherwise, not found 11058 <1> .error: 11059 <1> .notnt: 11060 00000C29 F9 <1> stc 11061 <1> .found: 11062 00000C2A 0E <1> push cs 11063 00000C2B 1F <1> pop ds ; restore ds 11064 <1> 11065 00000C2C 5B <1> pop bx ; saved UMB link state 11066 00000C2D B80358 <1> mov ax, 5803h 11067 00000C30 9C <1> pushf 11068 00000C31 CD21 <1> int 21h ; Set UMB link state 11069 00000C33 9D <1> popf 11070 00000C34 C3 <1> retn 11071 <1> 11072 <1> findstring: 11073 00000C35 31F6 <1> xor si, si 11074 <1> .loop: 11075 00000C37 56 <1> push si 11076 00000C38 01CE <1> add si, cx 11077 00000C3A 7203 <1> jc .notfound_c 11078 00000C3C 4E <1> dec si ; The largest offset we need for this compare 11079 00000C3D 39F0 <1> cmp ax, si 11080 <1> .notfound_c: 11081 00000C3F 5E <1> pop si 11082 00000C40 720D <1> jb .return ; Not found if at top of memory block --> 11083 00000C42 57 <1> push di 11084 00000C43 56 <1> push si 11085 00000C44 51 <1> push cx 11086 00000C45 F3A6 <1> repe cmpsb ; String somewhere inside program? 11087 00000C47 59 <1> pop cx 11088 00000C48 5E <1> pop si 11089 00000C49 5F <1> pop di 11090 00000C4A 7403 <1> je .return ; Yes, proceed --> (if ZR, NC) 11091 00000C4C 46 <1> inc si ; Increase pointer by one 11092 00000C4D EBE8 <1> jmp short .loop ; Try next address 11093 <1> .return: 11094 00000C4F C3 <1> retn 11095 <1> %endif 11096 <1> 11097 <1> 11098 <1> ; Move paragraphs 11099 <1> ; 11100 <1> ; INP: ax:0-> source 11101 <1> ; dx:0-> destination 11102 <1> ; cx = number of paragraphs 11103 <1> ; CHG: - 11104 <1> ; Note: Doesn't work correctly on HMA; doesn't always wrap to LMA either. 11105 <1> ; Do not provide a wrapped/HMA source or destination! 11106 <1> init_movp: 11107 00000C50 51 <1> push cx 11108 00000C51 1E <1> push ds 11109 00000C52 56 <1> push si 11110 00000C53 06 <1> push es 11111 00000C54 57 <1> push di 11112 <1> 11113 00000C55 39D0 <1> cmp ax, dx ; source above destination ? 11114 00000C57 770A <1> ja .up ; yes, move up (forwards) --> 11115 00000C59 747B <1> je .return ; same, no need to move --> 11116 00000C5B 50 <1> push ax 11117 00000C5C 01C8 <1> add ax, cx ; (expected not to carry) 11118 00000C5E 39D0 <1> cmp ax, dx ; end of source is above destination ? 11119 00000C60 58 <1> pop ax 11120 00000C61 7730 <1> ja .down ; yes, move from top down --> 11121 <1> ; Here, the end of source is below-or-equal the destination, 11122 <1> ; so they do not overlap. In this case we prefer moving up. 11123 <1> 11124 <1> .up: 11125 00000C63 50 <1> push ax 11126 00000C64 52 <1> push dx 11127 <1> .uploop: 11128 00000C65 8ED8 <1> mov ds, ax 11129 00000C67 8EC2 <1> mov es, dx 11130 00000C69 31FF <1> xor di, di 11131 00000C6B 31F6 <1> xor si, si ; -> start of segment 11132 00000C6D 81E90010 <1> sub cx, 1000h ; 64 KiB left ? 11133 00000C71 7610 <1> jbe .uplast ; no --> 11134 00000C73 51 <1> push cx 11135 00000C74 B90080 <1> mov cx, 10000h /2 11136 00000C77 F3A5 <1> rep movsw ; move 64 KiB 11137 00000C79 59 <1> pop cx 11138 00000C7A 050010 <1> add ax, 1000h 11139 00000C7D 81C20010 <1> add dx, 1000h ; -> next segment 11140 00000C81 EBE2 <1> jmp short .uploop ; proceed for more --> 11141 <1> .uplast: 11142 00000C83 81C10010 <1> add cx, 1000h ; restore counter 11143 00000C87 D1E1 <1> shl cx, 1 11144 00000C89 D1E1 <1> shl cx, 1 11145 00000C8B D1E1 <1> shl cx, 1 ; *8, paragraphs to words 11146 00000C8D F3A5 <1> rep movsw ; move last part 11147 00000C8F 5A <1> pop dx 11148 00000C90 58 <1> pop ax 11149 00000C91 EB43 <1> jmp short .return 11150 <1> 11151 <1> .down: 11152 00000C93 FD <1> std ; _AMD_ERRATUM_109_WORKAROUND as below 11153 <1> .dnloop: 11154 00000C94 81E90010 <1> sub cx, 1000h ; 64 KiB left ? 11155 00000C98 761A <1> jbe .dnlast ; no --> 11156 00000C9A 50 <1> push ax 11157 00000C9B 52 <1> push dx 11158 00000C9C 01C8 <1> add ax, cx 11159 00000C9E 01CA <1> add dx, cx 11160 00000CA0 8ED8 <1> mov ds, ax ; -> 64 KiB not yet moved 11161 00000CA2 8EC2 <1> mov es, dx 11162 00000CA4 5A <1> pop dx 11163 00000CA5 58 <1> pop ax 11164 00000CA6 BFFEFF <1> mov di, -2 11165 00000CA9 89FE <1> mov si, di ; moved from last word down 11166 00000CAB 51 <1> push cx 11167 00000CAC B90080 <1> mov cx, 10000h /2 11168 00000CAF F3A5 <1> rep movsw ; move 64 KiB 11169 00000CB1 59 <1> pop cx 11170 00000CB2 EBE0 <1> jmp short .dnloop ; proceed for more --> 11171 <1> .dnlast: 11172 00000CB4 81C10010 <1> add cx, 1000h ; restore counter 11173 00000CB8 D1E1 <1> shl cx, 1 11174 00000CBA D1E1 <1> shl cx, 1 11175 00000CBC D1E1 <1> shl cx, 1 ; *8, paragraphs to words 11176 00000CBE 89CF <1> mov di, cx 11177 00000CC0 4F <1> dec di 11178 00000CC1 D1E7 <1> shl di, 1 ; words to offset, -> last word 11179 00000CC3 89FE <1> mov si, di 11180 00000CC5 8ED8 <1> mov ds, ax 11181 00000CC7 8EC2 <1> mov es, dx ; first segment correct 11182 <1> 11183 <1> 11184 <1> numdef AMD_ERRATUM_109_WORKAROUND, 1 11185 <1> %if 0 11186 <1> 11187 <1> Jack R. Ellis pointed out this erratum: 11188 <1> 11189 <1> Quoting from https://www.amd.com/system/files/TechDocs/25759.pdf page 69: 11190 <1> 11191 <1> 109 Certain Reverse REP MOVS May Produce Unpredictable Behavior 11192 <1> 11193 <1> Description 11194 <1> 11195 <1> In certain situations a REP MOVS instruction may lead to 11196 <1> incorrect results. An incorrect address size, data size 11197 <1> or source operand segment may be used or a succeeding 11198 <1> instruction may be skipped. This may occur under the 11199 <1> following conditions: 11200 <1> 11201 <1> * EFLAGS.DF=1 (the string is being moved in the reverse direction). 11202 <1> 11203 <1> * The number of items being moved (RCX) is between 1 and 20. 11204 <1> 11205 <1> * The REP MOVS instruction is preceded by some microcoded instruction 11206 <1> that has not completely retired by the time the REP MOVS begins 11207 <1> execution. The set of such instructions includes BOUND, CLI, LDS, 11208 <1> LES, LFS, LGS, LSS, IDIV, and most microcoded x87 instructions. 11209 <1> 11210 <1> Potential Effect on System 11211 <1> 11212 <1> Incorrect results may be produced or the system may hang. 11213 <1> 11214 <1> Suggested Workaround 11215 <1> 11216 <1> Contact your AMD representative for information on a BIOS update. 11217 <1> 11218 <1> %endif 11219 <1> 11220 <1> %if _AMD_ERRATUM_109_WORKAROUND 11221 00000CC9 E308 <1> jcxz @FF 11222 00000CCB 83F914 <1> cmp cx, 20 11223 00000CCE 7703 <1> ja @FF 11224 <1> @@: 11225 00000CD0 A5 <1> movsw 11226 00000CD1 E2FD <1> loop @B 11227 <1> @@: 11228 <1> %endif 11229 00000CD3 F3A5 <1> rep movsw ; move first part 11230 00000CD5 FC <1> cld 11231 <1> .return: 11232 00000CD6 5F <1> pop di 11233 00000CD7 07 <1> pop es 11234 00000CD8 5E <1> pop si 11235 00000CD9 1F <1> pop ds 11236 00000CDA 59 <1> pop cx 11237 00000CDB C3 <1> retn 11238 <1> 11239 <1> 11240 <1> %if _BOOTLDR 11241 <1> ; only called for boot-loaded mode 11242 <1> init_getc_bootldr: 11243 00000CDC 31C0 <1> xor ax, ax 11244 00000CDE CD16 <1> int 16h 11245 00000CE0 C3 <1> retn 11246 <1> %endif 11247 <1> 11248 <1> init_putsz_cs: 11249 00000CE1 50 <1> push ax 11250 00000CE2 53 <1> push bx 11251 00000CE3 51 <1> push cx 11252 00000CE4 52 <1> push dx 11253 00000CE5 1E <1> push ds 11254 00000CE6 06 <1> push es 11255 00000CE7 57 <1> push di 11256 00000CE8 0E <1> push cs 11257 00000CE9 07 <1> pop es 11258 00000CEA 0E <1> push cs 11259 00000CEB 1F <1> pop ds 11260 00000CEC 89D7 <1> mov di, dx ; es:di-> string 11261 00000CEE 30C0 <1> xor al, al 11262 00000CF0 B9FFFF <1> mov cx, -1 11263 00000CF3 F2AE <1> repne scasb ; search zero 11264 00000CF5 F7D9 <1> neg cx 11265 00000CF7 49 <1> dec cx 11266 00000CF8 49 <1> dec cx ; cx = length of message 11267 00000CF9 5F <1> pop di 11268 00000CFA E82A00 <1> call init_puts_ds 11269 00000CFD 07 <1> pop es 11270 00000CFE 1F <1> pop ds 11271 00000CFF 5A <1> pop dx 11272 00000D00 59 <1> pop cx 11273 00000D01 5B <1> pop bx 11274 00000D02 58 <1> pop ax 11275 00000D03 C3 <1> retn 11276 <1> 11277 <1> %if _BOOTLDR 11278 <1> init_putsz_cs_bootldr: 11279 00000D04 50 <1> push ax 11280 00000D05 53 <1> push bx 11281 00000D06 51 <1> push cx 11282 00000D07 52 <1> push dx 11283 00000D08 1E <1> push ds 11284 00000D09 06 <1> push es 11285 00000D0A 57 <1> push di 11286 00000D0B 0E <1> push cs 11287 00000D0C 07 <1> pop es 11288 00000D0D 0E <1> push cs 11289 00000D0E 1F <1> pop ds 11290 00000D0F 89D7 <1> mov di, dx ; es:di-> string 11291 00000D11 30C0 <1> xor al, al 11292 00000D13 B9FFFF <1> mov cx, -1 11293 00000D16 F2AE <1> repne scasb ; search zero 11294 00000D18 F7D9 <1> neg cx 11295 00000D1A 49 <1> dec cx 11296 00000D1B 49 <1> dec cx ; cx = length of message 11297 00000D1C 5F <1> pop di 11298 00000D1D E80F00 <1> call init_puts_ds_bootldr 11299 00000D20 07 <1> pop es 11300 00000D21 1F <1> pop ds 11301 00000D22 5A <1> pop dx 11302 00000D23 59 <1> pop cx 11303 00000D24 5B <1> pop bx 11304 00000D25 58 <1> pop ax 11305 00000D26 C3 <1> retn 11306 <1> %endif 11307 <1> 11308 <1> init_puts_ds: 11309 <1> %if _BOOTLDR 11310 00000D27 36F606[9D00]40 <1> testopt [ss:internalflags], nodosloaded 11311 00000D2D 7413 <1> jz @F 11312 <1> 11313 <1> init_puts_ds_bootldr: 11314 00000D2F 56 <1> push si 11315 00000D30 55 <1> push bp 11316 00000D31 89D6 <1> mov si, dx 11317 00000D33 E30A <1> jcxz .return 11318 <1> .loop: 11319 00000D35 AC <1> lodsb 11320 00000D36 BB0700 <1> mov bx, 0007 11321 00000D39 B40E <1> mov ah, 0Eh 11322 00000D3B CD10 <1> int 10h 11323 00000D3D E2F6 <1> loop .loop 11324 <1> .return: 11325 00000D3F 5D <1> pop bp 11326 00000D40 5E <1> pop si 11327 00000D41 C3 <1> retn 11328 <1> 11329 <1> @@: 11330 <1> %endif 11331 00000D42 BB0100 <1> mov bx, 1 ; standard output 11332 00000D45 B440 <1> mov ah, 40h ; write to file 11333 00000D47 CD21 <1> int 21h 11334 00000D49 C3 <1> retn 11335 <1> 11336 <1> 11337 <1> 11338 <1> %if _BOOTLDR 11339 <1> ; Initial entry when boot loading. 11340 <1> 11341 <1> ; ds = ss = debugger data segment 11342 <1> ; (ds - 1) = image ident prefix paragraph 11343 <1> boot_old_initcode: 11344 00000D4A FC <1> cld 11345 <1> 11346 <1> d4 call init_d4message 11347 <1> d4 asciz "In boot loader; press any key",13,10 11348 <1> d4 call init_d4pauseforkey 11349 <1> 11350 00000D4B C706[4E0C]8000 <1> mov word [execblk+2], 80h 11351 00000D51 C60681000D <1> mov byte [81h], 0Dh 11352 00000D56 C606[DD0B]01 <1> mov byte [fileext], EXT_OTHER ; empty file name and command line as per N 11353 <1> %endif ; _BOOTLDR 11354 <1> 11355 <1> old_initcode: 11356 00000D5B FC <1> cld 11357 <1> d0bp 11358 00000D5C 8CD8 <1> mov ax, ds 11359 00000D5E A3[500C] <1> mov word [ execblk+4 ], ax 11360 00000D61 A3[540C] <1> mov word [ execblk+8 ], ax 11361 00000D64 A3[580C] <1> mov word [ execblk+12 ], ax ; set up parameter block for exec command 11362 00000D67 A3[A60A] <1> mov word [ pspdbg ], ax 11363 <1> 11364 00000D6A 1E <1> push ds 11365 00000D6B B84000 <1> mov ax, 40h 11366 00000D6E 8ED8 <1> mov ds, ax 11367 00000D70 A18200 <1> mov ax, word [82h] ; end of circular keypress buffer 11368 00000D73 8B168000 <1> mov dx, word [80h] ; start of circular buffer 11369 00000D77 85C0 <1> test ax, ax 11370 00000D79 7431 <1> jz .forcekeybuffer 11371 00000D7B 85D2 <1> test dx, dx 11372 00000D7D 742D <1> jz .forcekeybuffer 11373 00000D7F 89C3 <1> mov bx, ax 11374 00000D81 29D3 <1> sub bx, dx ; cmp end, start 11375 00000D83 7627 <1> jbe .forcekeybuffer ; below or equal is invalid --> 11376 00000D85 F6C301 <1> test bl, 1 ; even amount of bytes ? 11377 00000D88 7522 <1> jnz .forcekeybuffer ; no, invalid --> 11378 00000D8A 8B1E1A00 <1> mov bx, word [1Ah] ; current head of circular buffer 11379 00000D8E 39C3 <1> cmp bx, ax 11380 00000D90 731A <1> jae .forcekeybuffer 11381 00000D92 29D3 <1> sub bx, dx 11382 00000D94 7216 <1> jb .forcekeybuffer 11383 00000D96 F6C301 <1> test bl, 1 11384 00000D99 7511 <1> jnz .forcekeybuffer ; invalid --> 11385 00000D9B 8B1E1C00 <1> mov bx, word [1Ch] ; current tail of circular buffer 11386 00000D9F 39C3 <1> cmp bx, ax 11387 00000DA1 7309 <1> jae .forcekeybuffer 11388 00000DA3 29D3 <1> sub bx, dx 11389 00000DA5 7205 <1> jb .forcekeybuffer 11390 00000DA7 F6C301 <1> test bl, 1 11391 00000DAA 740E <1> jz @F ; valid --> 11392 <1> .forcekeybuffer: 11393 00000DAC 1F <1> pop ds 11394 00000DAD C706[FA0B]3E00 <1> mov word [io_end_buffer], 3Eh 11395 00000DB3 C706[F80B]1E00 <1> mov word [io_start_buffer], 1Eh 11396 00000DB9 A8 <1> db __TEST_IMM8 ; (skip pop) 11397 <1> @@: 11398 00000DBA 1F <1> pop ds 11399 <1> 11400 <1> %if _BOOTLDR 11401 00000DBB F606[9D00]40 <1> testopt [internalflags], nodosloaded 11402 00000DC0 7403 <1> jz .checkio 11403 <1> d4 call init_d4message 11404 <1> d4 asciz "Common initialisation, determining processor type now",13,10 11405 00000DC2 E9A700 <1> jmp .determineprocessor 11406 <1> .checkio: 11407 <1> %endif 11408 <1> ; Check for console input vs. input from a file or other device. 11409 <1> ; This has to be done early because MS-DOS seems to switch CON 11410 <1> ; to cooked I/O mode only then. 11411 00000DC5 B80044 <1> mov ax, 4400h ; IOCTL get device information 11412 00000DC8 31DB <1> xor bx, bx ; StdIn 11413 00000DCA B283 <1> mov dl, 83h ; default if 21.4400 fails 11414 00000DCC CD21 <1> int 21h 11415 00000DCE F6C280 <1> test dl, 80h 11416 00000DD1 7414 <1> jz .inputfile 11417 00000DD3 8026[9C00]DF <1> clropt [internalflags], inputfile 11418 00000DD8 F6C203 <1> test dl, 3 11419 00000DDB 740A <1> jz .inputdevice ; if not the console input 11420 00000DDD 8026[9C00]EF <1> clropt [internalflags], notstdinput 11421 00000DE2 C606[E70A]00 <1> mov byte [notatty], 0 ; it _is_ a tty 11422 <1> .inputdevice: 11423 <1> .inputfile: 11424 00000DE7 B80044 <1> mov ax, 4400h ; IOCTL get device information 11425 00000DEA 43 <1> inc bx ; StdOut 11426 00000DEB B283 <1> mov dl, 83h ; default if 21.4400 fails 11427 00000DED CD21 <1> int 21h 11428 00000DEF F6C280 <1> test dl, 80h 11429 00000DF2 740F <1> jz .outputfile 11430 00000DF4 8026[9C00]7F <1> clropt [internalflags], outputfile 11431 00000DF9 F6C203 <1> test dl, 3 11432 00000DFC 7405 <1> jz .outputdevice ; if not the console output 11433 00000DFE 8026[9C00]BF <1> clropt [internalflags], notstdoutput 11434 <1> .outputdevice: 11435 <1> .outputfile: 11436 <1> 11437 <1> ; Check DOS version 11438 <1> %if _VDD 11439 00000E03 1E <1> push ds 11440 00000E04 0E <1> push cs 11441 00000E05 1F <1> pop ds 11442 00000E06 0E <1> push cs 11443 00000E07 07 <1> pop es 11444 00000E08 E87BFD <1> call isnt ; NTVDM ? 11445 00000E0B 1F <1> pop ds 11446 00000E0C 7205 <1> jc .isnotnt ; no --> 11447 00000E0E 800E[9E00]02 <1> setopt [internalflags], runningnt 11448 <1> .isnotnt: 11449 <1> %endif 11450 <1> 11451 00000E13 B80030 <1> mov ax, 3000h ; check DOS version 11452 00000E16 CD21 <1> int 21h 11453 00000E18 86C4 <1> xchg al, ah 11454 00000E1A 3D1F03 <1> cmp ax, ver(3,31) ; MS-DOS version > 3.30 ? 11455 00000E1D 7205 <1> jb .notoldpacket ; no --> 11456 00000E1F 800E[9C00]01 <1> setopt [internalflags], oldpacket ; assume Int25/Int26 packet method available 11457 <1> .notoldpacket: 11458 00000E24 50 <1> push ax 11459 00000E25 31DB <1> xor bx, bx ; preset to invalid value 11460 00000E27 B80633 <1> mov ax, 3306h 11461 00000E2A CD21 <1> int 21h 11462 00000E2C 08C0 <1> or al, al ; invalid, DOS 1.x error --> 11463 00000E2E 7402 <1> jz .213306invalid 11464 00000E30 3CFF <1> cmp al, -1 ; invalid 11465 <1> .213306invalid: 11466 00000E32 58 <1> pop ax 11467 00000E33 7407 <1> je .useoldver 11468 00000E35 85DB <1> test bx, bx ; 0.0 ? 11469 00000E37 7403 <1> jz .useoldver ; assume invalid --> 11470 00000E39 93 <1> xchg ax, bx ; get version to ax 11471 00000E3A 86C4 <1> xchg al, ah ; strange Microsoft version format 11472 <1> .useoldver: 11473 00000E3C 3D0107 <1> cmp ax, ver(7,01) ; MS-DOS version > 7.00 ? 11474 00000E3F 7205 <1> jb .notnewpacket ; no --> 11475 00000E41 800E[9C00]03 <1> setopt [internalflags], newpacket| oldpacket ; assume both packet methods available 11476 <1> .notnewpacket: 11477 <1> %if _VDD 11478 00000E46 F606[9E00]02 <1> testopt [internalflags], runningnt 11479 00000E4B 741F <1> jz .novdd 11480 00000E4D 1E <1> push ds 11481 00000E4E 0E <1> push cs 11482 00000E4F 1F <1> pop ds 11483 00000E50 0E <1> push cs 11484 00000E51 07 <1> pop es 11485 00000E52 BE[300B] <1> mov si, imsg.vdd ; ds:si-> ASCIZ VDD filename 11486 00000E55 BB[3D0B] <1> mov bx, imsg.dispatch ; ds:bx-> ASCIZ dispatching entry 11487 00000E58 BF[460B] <1> mov di, imsg.init ; es:di-> ASCIZ init entry 11488 00000E5B F8 <1> clc ; ! 11489 00000E5C C4C4580090 <1> RegisterModule ; register VDD 11490 00000E61 1F <1> pop ds 11491 00000E62 7208 <1> jc .novdd ; error ? --> 11492 00000E64 A3[B80A] <1> mov word [hVdd], ax 11493 00000E67 800E[9C00]05 <1> setopt [internalflags], ntpacket| oldpacket ; assume old packet method also available 11494 <1> .novdd: 11495 <1> %endif 11496 <1> .determineprocessor: 11497 <1> d4 call init_d4message 11498 <1> d4 asciz "Determining processor type",13,10 11499 <1> 11500 00000E6C B92101 <1> mov cx, 0121h 11501 00000E6F D2E5 <1> shl ch, cl 11502 00000E71 7510 <1> jnz .found_186_plus ; normal 186 masks shift count with 31 --> 11503 <1> 11504 <1> ; The NEC V20/V30 processors do support the 186 extensions 11505 <1> ; to the instruction set but do not mask the shift count. 11506 <1> ; Therefore, specifically detect them here. Based on the 11507 <1> ; text in http://www.textfiles.com/hamradio/v20_bug.txt 11508 00000E73 89E0 <1> mov ax, sp 11509 00000E75 B90100 <1> mov cx, 1 ; = 1 if on actual 8088/8086 11510 00000E78 51 <1> push cx 11511 00000E79 49 <1> dec cx ; = 0 if on NEC V20/V30 11512 00000E7A 8FC1 <1> db 8Fh, 0C1h ; pop r/m16 with cx as operand 11513 <1> ; (reportedly a nop on the NECs) 11514 00000E7C 89C4 <1> mov sp, ax ; reset stack to known state 11515 00000E7E E303 <1> jcxz .found_186_plus ; if it was a nop --> 11516 00000E80 E9A100 <1> jmp .cpudone ; is an actual 8088/8086 --> 11517 <1> 11518 <1> .found_186_plus: 11519 <1> d4 call init_d4message 11520 <1> d4 asciz "Found 186+ processor",13,10 11521 00000E83 FE06[E20A] <1> inc byte [ machine ] ; 1 11522 00000E87 54 <1> push sp 11523 00000E88 58 <1> pop ax 11524 00000E89 39E0 <1> cmp ax, sp 11525 00000E8B 7403E99400 <1> jne .cpudone ; 80186 pushes the adjusted value of sp --> 11526 <1> 11527 <1> d4 call init_d4message 11528 <1> d4 asciz "Found 286+ processor",13,10 11529 <1> ; Determine the processor type. This is adapted from code in the 11530 <1> ; Pentium Family User's Manual, Volume 3: Architecture and 11531 <1> ; Programming Manual, Intel Corp., 1994, Chapter 5. That code contains 11532 <1> ; the following comment: 11533 <1> ; 11534 <1> ; This program has been developed by Intel Corporation. 11535 <1> ; Software developers have Intel's permission to incorporate 11536 <1> ; this source code into your software royalty free. 11537 <1> ; 11538 <1> ; Intel 286 CPU check. 11539 <1> ; Bits 12-15 of the flags register are always clear on the 11540 <1> ; 286 processor in real-address mode. 11541 <1> ; Bits 12-15 of the FLAGS register are always set on the 11542 <1> ; 8086 and 186 processor. 11543 00000E90 FE06[E20A] <1> inc byte [ machine ] ; 2 11544 00000E94 9C <1> pushf ; save IF 11545 00000E95 9C <1> pushf ; get original flags into ax 11546 00000E96 58 <1> pop ax 11547 00000E97 0D00F0 <1> or ax, 0F000h ; try to set bits 12-15 11548 00000E9A 25FFFD <1> and ax, ~0200h ; clear IF 11549 00000E9D 50 <1> push ax ; save new flags value on stack 11550 00000E9E 9D <1> popf ; replace current flags value; DI 11551 00000E9F 9C <1> pushf ; get new flags 11552 00000EA0 58 <1> pop ax ; store new flags in ax 11553 00000EA1 9D <1> popf ; restore IF (in 86 Mode) 11554 00000EA2 A900F0 <1> test ax, 0F000h ; if bits 12-15 clear, CPU = 80286 11555 00000EA5 747D <1> jz .cpudone ; if 80286 --> 11556 <1> 11557 <1> d4 call init_d4message 11558 <1> d4 asciz "Found 386+ processor",13,10 11559 <1> ; Intel 386 CPU check. 11560 <1> ; The AC bit, bit #18, is a new bit introduced in the EFLAGS 11561 <1> ; register on the Intel486 DX cpu to generate alignment faults. 11562 <1> ; This bit cannot be set on the Intel386 CPU. 11563 <1> ; 11564 <1> ; It is now safe to use 32-bit opcode/operands. 11565 <1> subcpu 386 11566 00000EA7 800E[9D00]80 <1> setopt [internalflags], has386 11567 00000EAC FE06[E20A] <1> inc byte [ machine ] ; 3 11568 <1> 11569 00000EB0 89E3 <1> mov bx, sp ; save current stack pointer to align 11570 00000EB2 83E4FC <1> and sp, ~3 ; align stack to avoid AC fault 11571 00000EB5 669C <1> pushfd ; push original EFLAGS 11572 00000EB7 6658 <1> pop eax ; get original EFLAGS 11573 00000EB9 6689C1 <1> mov ecx, eax ; save original EFLAGS in ECX (including IF) 11574 <1> 11575 00000EBC 663500000400 <1> xor eax, 40000h ; flip AC bit in EFLAGS 11576 00000EC2 25FFFD <1> and ax, ~0200h ; clear IF 11577 00000EC5 6650 <1> push eax ; put new EFLAGS value on stack 11578 00000EC7 669D <1> popfd ; replace EFLAGS value; DI 11579 00000EC9 669C <1> pushfd ; get new EFLAGS 11580 00000ECB 6658 <1> pop eax ; store new EFLAGS value in EAX 11581 00000ECD 89C8 <1> mov ax, cx ; ignore low bits (including IF) 11582 00000ECF 6639C8 <1> cmp eax, ecx 11583 00000ED2 741A <1> je .cpudone_stack_eax_equals_ecx ; if 80386 --> 11584 <1> 11585 <1> d4 call init_d4message 11586 <1> d4 asciz "Found 486+ processor",13,10 11587 <1> ; Intel486 DX CPU, Intel487 SX NDP, and Intel486 SX CPU check. 11588 <1> ; Checking for ability to set/clear ID flag (bit 21) in EFLAGS 11589 <1> ; which indicates the presence of a processor with the ability 11590 <1> ; to use the CPUID instruction. 11591 00000ED4 FE06[E20A] <1> inc byte [ machine ] ; 4 11592 00000ED8 6689C8 <1> mov eax, ecx ; get original EFLAGS 11593 00000EDB 663500002000 <1> xor eax, 200000h ; flip ID bit in EFLAGS 11594 00000EE1 25FFFD <1> and ax, ~0200h ; clear IF 11595 00000EE4 6650 <1> push eax ; save new EFLAGS value on stack 11596 00000EE6 669D <1> popfd ; replace current EFLAGS value; DI 11597 00000EE8 669C <1> pushfd ; get new EFLAGS 11598 00000EEA 6658 <1> pop eax ; store new EFLAGS in EAX 11599 00000EEC 89C8 <1> mov ax, cx ; ignore low bits (including IF) 11600 <1> 11601 <1> .cpudone_stack_eax_equals_ecx: 11602 00000EEE 6651 <1> push ecx 11603 00000EF0 669D <1> popfd ; restore AC,ID bits and IF in EFLAGS (86 Mode) 11604 00000EF2 89DC <1> mov sp, bx ; restore sp 11605 <1> 11606 00000EF4 6639C8 <1> cmp eax, ecx ; check if it's changed 11607 00000EF7 742B <1> je .cpudone ; if it's a 486 (can't toggle ID bit) --> 11608 <1> 11609 <1> d4 call init_d4message 11610 <1> d4 asciz "Found processor with CPUID support",13,10 11611 <1> ; Execute CPUID instruction. 11612 <1> subcpu 486 ; NASM (at least 2.10rc1) handles cpuid itself as a 11613 <1> ; 586+ instruction, but we know better. So this 11614 <1> ; part is declared for 486 compatibility, and only 11615 <1> ; the cpuid instructions are emitted with 586 11616 <1> ; compatibility to appease NASM. 11617 <1> %if 0 11618 <1> d4 call init_d4message 11619 <1> d4 asciz "CPUID will NOT be executed, to work around official DOSBox releases",13,10 11620 <1> d4 jmp .cpudone 11621 <1> %endif 11622 00000EF9 6631C0 <1> xor eax, eax ; set up input for CPUID instruction 11623 <1> d4 call init_d4message 11624 <1> d4 asciz "Executing CPUID 0",13,10 11625 <1> [cpu 586] 11626 00000EFC 0FA2 <1> cpuid 11627 <1> __CPU__ 11628 <1> d4 call init_d4message 11629 <1> d4 asciz "CPUID 0 executed",13,10 11630 00000EFE 6683F801 <1> cmp eax, byte 1 11631 00000F02 7220 <1> jb .cpudone ; if 1 is not a valid input value for CPUID 11632 00000F04 6631C0 <1> xor eax, eax ; otherwise, run CPUID with eax = 1 11633 00000F07 6640 <1> inc eax 11634 <1> d4 call init_d4message 11635 <1> d4 asciz "Executing CPUID 1",13,10 11636 <1> [cpu 586] 11637 00000F09 0FA2 <1> cpuid 11638 <1> __CPU__ 11639 <1> d4 call init_d4message 11640 <1> d4 asciz "CPUID 1 executed",13,10 11641 <1> %if _MMXSUPP 11642 00000F0B 66F7C200008000 <1> test edx, 80_0000h 11643 00000F12 0F9506[E50A] <1> setnz byte [has_mmx] 11644 <1> %endif 11645 <1> 11646 00000F17 88E0 <1> mov al, ah 11647 00000F19 240F <1> and al, 0Fh ; bits 8..11 are the model number 11648 00000F1B 3C06 <1> cmp al, 6 11649 00000F1D 7202 <1> jb .below686 ; if < 6 11650 00000F1F B006 <1> mov al, 6 ; if >= 6, set it to 6 11651 <1> .below686: 11652 00000F21 A2[E20A] <1> mov byte [ machine ], al; save machine type (486, 586, 686+) 11653 <1> 11654 <1> .cpudone: 11655 <1> subcpureset ; subcpu 486 11656 <1> subcpureset ; subcpu 386 11657 <1> d4 call init_d4message 11658 <1> d4 asciz "Determining floating-point unit",13,10 11659 <1> 11660 <1> ; Next determine the type of FPU in a system and set the mach_87 11661 <1> ; variable with the appropriate value. All registers are used by 11662 <1> ; this code; none are preserved. 11663 <1> ; 11664 <1> ; Coprocessor check. 11665 <1> ; The algorithm is to determine whether the floating-point 11666 <1> ; status and control words can be written to. If not, no 11667 <1> ; coprocessor exists. If the status and control words can be 11668 <1> ; written to, the correct coprocessor is then determined 11669 <1> ; depending on the processor ID. The Intel 386 CPU can 11670 <1> ; work with either an Intel 287 NDP or an Intel 387 NDP. 11671 <1> ; The infinity of the coprocessor must be checked 11672 <1> ; to determine the correct coprocessor ID. 11673 00000F24 A0[E20A] <1> mov al, byte [ machine ] 11674 00000F27 A2[E40A] <1> mov byte [ mach_87 ], al ; by default, set mach_87 to machine 11675 00000F2A FE06[E30A] <1> inc byte [ has_87 ] 11676 00000F2E 3C05 <1> cmp al, 5 ; a Pentium or above always will have a FPU 11677 00000F30 7341 <1> jae .fpudone 11678 00000F32 FE0E[E30A] <1> dec byte [ has_87 ] ; assume no FPU 11679 <1> 11680 00000F36 DBE3 <1> fninit ; reset FPU 11681 00000F38 B0FF <1> mov al, -1 ; initialise with a non-zero value 11682 00000F3A 50 <1> push ax 11683 00000F3B 89E3 <1> mov bx, sp 11684 00000F3D 36DD3F <1> fnstsw word [ss:bx] ; save FP status word 11685 00000F40 58 <1> pop ax ; retrieve it 11686 00000F41 84C0 <1> test al, al 11687 00000F43 752E <1> jnz .fpudone ; if no FPU present 11688 <1> 11689 <1> ; al = 0 here 11690 00000F45 50 <1> push ax 11691 00000F46 36D93F <1> fnstcw word [ss:bx] ; save FP control word 11692 00000F49 58 <1> pop ax ; retrieve it 11693 00000F4A 253F10 <1> and ax, 103Fh ; see if selected parts look OK 11694 00000F4D 83F83F <1> cmp ax, byte 3Fh 11695 00000F50 7521 <1> jne .fpudone ; if no FPU present 11696 00000F52 FE06[E30A] <1> inc byte [ has_87 ] ; there's an FPU 11697 <1> 11698 <1> ; If we're using a 386, check for 287 vs. 387 by checking whether 11699 <1> ; +infinity = -infinity. 11700 00000F56 803E[E20A]03 <1> cmp byte [ machine ], 3 11701 00000F5B 7516 <1> jne .fpudone ; if not a 386 11702 <1> [cpu 386] 11703 00000F5D D9E8 <1> fld1 ; must use default control from FNINIT 11704 00000F5F D9EE <1> fldz ; form infinity 11705 00000F61 DEF9 <1> fdivp ST1 ; 1 / 0 = infinity 11706 00000F63 D9C0 <1> fld ST0 11707 00000F65 D9E0 <1> fchs ; form negative infinity 11708 00000F67 DED9 <1> fcompp ; see if they are the same and remove them 11709 00000F69 9BDFE0 <1> fstsw ax 11710 00000F6C 9E <1> sahf ; look at status from FCOMPP 11711 00000F6D 7504 <1> jne .fpudone ; if they are different, then it's a 387 11712 00000F6F FE0E[E40A] <1> dec byte [ mach_87 ] ; otherwise, it's a 287 11713 <1> __CPU__ 11714 <1> .fpudone: 11715 <1> 11716 <1> %if _ONLY386 11717 <1> testopt [internalflags], has386 11718 <1> jnz @F ; okay --> 11719 <1> %if _BOOTLDR 11720 <1> testopt [internalflags], nodosloaded 11721 <1> lahf ; remember status 11722 <1> %endif 11723 <1> mov dx, imsg.no386 11724 <1> call init_putsz_cs ; display the error 11725 <1> %if _BOOTLDR 11726 <1> sahf 11727 <1> jnz init_booterror.soft ; abort for loader --> 11728 <1> %endif 11729 <1> mov ax, 4C01h 11730 <1> int 21h ; abort our process 11731 <1> 11732 <1> @@: 11733 <1> %elif _ONLYNON386 11734 <1> testopt [internalflags], has386 11735 <1> jz @F ; okay --> 11736 <1> mov dx, imsg.386 11737 <1> call init_putsz_cs ; display the warning 11738 <1> @@: 11739 <1> %endif 11740 <1> 11741 <1> ; Determine which patch table to use, then patch 11742 <1> ; out either the 386+ or non-386 code as appropriate. 11743 00000F73 8E06[CE00] <1> mov es, [code_seg] 11744 00000F77 BE[C807] <1> mov si, patch_386_table ; table of patches to set for 386+ 11745 <1> %if __patch_386_table_method == 1 11746 <1> mov cx, patch_386_table_size_w 11747 <1> %endif 11748 00000F7A F606[9D00]80 <1> testopt [internalflags], has386 11749 <1> %if __patch_386_table_method == 1 11750 <1> jnz .patch1 ; set these patches (CPU is 386+) --> 11751 <1> %else 11752 00000F7F 7521 <1> jnz .patch2 ; set these patches (CPU is 386+) --> 11753 <1> %endif 11754 <1> %ifn _ONLYNON386 11755 00000F81 26C606[5C43]3E <1> mov byte [es:..@patch_no386_ds], 3Eh ; write a ds prefix 11756 00000F87 26C606[8143]CF <1> mov byte [es:..@patch_no386_iret], 0CFh ; write an iret instruction 11757 <1> %if _PM && _CATCHPMINT214C 11758 00000F8D 26C606[315C]3E <1> mov byte [es:..@patch_no386_ds_2], 3Eh 11759 00000F93 26C606[605C]3E <1> mov byte [es:..@patch_no386_ds_3], 3Eh 11760 00000F99 36C606[478A]90 <1> mov byte [ss:..@patch_no386_nop_DATA_ENTRY], 90h 11761 <1> ; write a nop (note the segment!) 11762 <1> %endif 11763 <1> %endif 11764 00000F9F BE[C804] <1> mov si, patch_no386_table ; table of patches to set for 16-bit CPU 11765 <1> %if __patch_no386_table_method == 1 11766 <1> mov cx, patch_no386_table_size_w 11767 <1> %if __patch_386_table_method == 2 11768 <1> jmp short .patch1 ; skip .patch2 code --> 11769 <1> %endif 11770 <1> %endif 11771 <1> 11772 <1> ; Complicated table patch code. 11773 <1> %if __patch_no386_table_method == 2 || __patch_386_table_method == 2 11774 <1> .patch2: 11775 00000FA2 BF[0000] <1> mov di, code_start ; initialise offset 11776 00000FA5 31C0 <1> xor ax, ax ; initialise ah 11777 <1> .looppatch2: 11778 00000FA7 2EAC <1> cs lodsb 11779 00000FA9 01C7 <1> add di, ax ; skip number of bytes to skip 11780 00000FAB 3CFF <1> cmp al, 255 ; really repositioning? 11781 00000FAD 7504 <1> jne .l2patch ; no --> 11782 00000FAF 97 <1> xchg ax, di ; (to preserve ah) 11783 00000FB0 2EAD <1> cs lodsw ; ax = new address 11784 00000FB2 97 <1> xchg ax, di ; di = new address 11785 <1> .l2patch: 11786 00000FB3 2EAC <1> cs lodsb 11787 00000FB5 89C1 <1> mov cx, ax ; cx = number of bytes to patch 11788 00000FB7 E306 <1> jcxz .patchesdone ; end of table --> 11789 00000FB9 B090 <1> mov al, 90h ; patch to NOP 11790 00000FBB F3AA <1> rep stosb ; patch as many bytes as specified 11791 00000FBD EBE8 <1> jmp short .looppatch2 11792 <1> %endif 11793 <1> 11794 <1> ; Simple table patch code. 11795 <1> %if __patch_386_table_method == 1 || __patch_no386_table_method == 1 11796 <1> .patch1: 11797 <1> jcxz .patchesdone 11798 <1> .looppatch1: 11799 <1> cs lodsw ; load address of patch 11800 <1> xchg bx, ax ; (set bx = ax, CHG ax) 11801 <1> mov byte [es:bx], 90h ; patch 11802 <1> loop .looppatch1 11803 <1> %endif 11804 <1> .patchesdone: 11805 <1> 11806 <1> ; Check for dosemu. This is done for the boot loaded instance 11807 <1> ; too, as we might be running as DOS inside dosemu. 11808 <1> %if _DOSEMU 11809 00000FBF B800F0 <1> mov ax, 0F000h 11810 00000FC2 8EC0 <1> mov es, ax 11811 00000FC4 1E <1> push ds 11812 00000FC5 0E <1> push cs 11813 00000FC6 1F <1> pop ds ; avoid "repe cs cmpsw" (8086 bug) 11814 00000FC7 BFF5FF <1> mov di, 0FFF5h 11815 00000FCA BE[280B] <1> mov si, imsg.dosemudate 11816 00000FCD B90400 <1> mov cx, 4 11817 00000FD0 F3A7 <1> repe cmpsw ; running in DosEmu? 11818 00000FD2 1F <1> pop ds 11819 00000FD3 7505 <1> jne .dosemuchecked 11820 00000FD5 800E[9F00]01 <1> setopt [internalflags], runningdosemu 11821 <1> .dosemuchecked: 11822 <1> %endif 11823 <1> 11824 00000FDA 1E <1> push ds 11825 00000FDB 07 <1> pop es ; => lDEBUG_DATA_ENTRY 11826 <1> 11827 00000FDC BF[0000] <1> mov di, line_in 11828 00000FDF B0FF <1> mov al, 255 11829 00000FE1 AA <1> stosb 11830 00000FE2 B000 <1> mov al, 0 11831 00000FE4 AA <1> stosb 11832 00000FE5 B00D <1> mov al, 13 11833 00000FE7 AA <1> stosb ; overwrite line_in beginning 11834 <1> 11835 00000FE8 BC[400C] <1> mov sp, stack_end ; stack pointer (paragraph aligned) 11836 00000FEB C706[940A][3E0C] <1> mov word [ savesp ], stack_end-2; save new SP minus two (for the word we'll push) 11837 00000FF1 BF[0101] <1> mov di, ..@init_first 11838 00000FF4 B93F09 <1> mov cx, ..@init_behind - ..@init_first 11839 00000FF7 31C0 <1> xor ax, ax 11840 00000FF9 F3AA <1> rep stosb ; initialise breakpoint lists, line_out 11841 <1> %if 1 11842 <1> %if ..@init_behind != stack 11843 <1> mov di, stack 11844 <1> %endif 11845 00000FFB B90002 <1> mov cx, stack_end - stack 11846 00000FFE B05E <1> mov al, 5Eh 11847 00001000 F3AA <1> rep stosb ; initialise the stack 11848 <1> %endif 11849 <1> 11850 00001002 C606[0D08]30 <1> mov byte [ trim_overflow ], '0' ; initialise line_out so the trimputs loop doesn't overflow 11851 00001007 C706[1609]4226 <1> mov word [line_out_overflow], 2642h 11852 <1> 11853 <1> 11854 <1> %if _BOOTLDR 11855 0000100D F606[9D00]40 <1> testopt [internalflags], nodosloaded 11856 00001012 743A <1> jz initdos 11857 <1> d4 call init_d4message 11858 <1> d4 asciz "386-related patches applied, boot initialisation proceeding",13,10 11859 <1> 11860 <1> 11861 <1> %if CATCHINTAMOUNT 11862 <1> ; Set up interrupt vectors. 11863 00001014 B90600 <1> mov cx, inttab_number 11864 00001017 BE[310C] <1> mov si, inttab 11865 <1> .bootintloop: 11866 <1> 11867 <1> ; assumes ss = lDEBUG_DATA_ENTRY 11868 0000101A 36AC <1> ss lodsb 11869 0000101C 31DB <1> xor bx, bx 11870 0000101E 8EDB <1> mov ds, bx 11871 00001020 88C3 <1> mov bl, al 11872 00001022 01DB <1> add bx, bx 11873 00001024 01DB <1> add bx, bx 11874 00001026 FF7702 <1> push word [ bx+2 ] 11875 00001029 FF37 <1> push word [ bx ] ; get vector 11876 0000102B 97 <1> xchg ax, di 11877 0000102C 36AD <1> ss lodsw ; get address of IISP header 11878 0000102E 97 <1> xchg ax, di 11879 0000102F 368F4502 <1> pop word [ ss:di + ieNext ] 11880 00001033 368F4504 <1> pop word [ ss:di + ieNext + 2 ] 11881 <1> ; store it 11882 <1> %ifn _DEBUG ; vectors are set only when debuggee runs 11883 00001037 8C5702 <1> mov word [ bx+2 ], ss 11884 0000103A 893F <1> mov word [ bx ], di ; set interrupt vector 11885 <1> %endif 11886 0000103C E2DC <1> loop .bootintloop 11887 <1> %endif 11888 <1> 11889 <1> 11890 0000103E 16 <1> push ss 11891 0000103F 1F <1> pop ds 11892 00001040 16 <1> push ss 11893 00001041 07 <1> pop es 11894 <1> 11895 <1> d4 call init_d4message 11896 <1> d4 asciz "Jumping to final boot initialisation code",13,10 11897 00001042 FF36[CE00] <1> push word [code_seg] 11898 00001046 2EFF36[4C10] <1> push word [cs:.word_initcont.boot_entry] 11899 0000104B CB <1> retf 11900 <1> 11901 <1> align 2, db 0 11902 <1> .word_initcont.boot_entry: 11903 0000104C [31D6] <1> dw initcont.boot_entry 11904 <1> %endif 11905 <1> 11906 <1> initdos: 11907 <1> %if _MCB || _INT 11908 0000104E B80258 <1> mov ax, 5802h 11909 00001051 CD21 <1> int 21h 11910 00001053 30E4 <1> xor ah, ah ; some "DOS" only return al 11911 00001055 50 <1> push ax ; save UMB link 11912 <1> 11913 <1> getfirstmcb: 11914 00001056 B452 <1> mov ah, 52h ; get list of lists 11915 00001058 CD21 <1> int 21h 11916 0000105A 268B47FE <1> mov ax, word [ es:bx-2 ]; start of MCBs 11917 0000105E A3[CE0A] <1> mov word [firstmcb], ax 11918 <1> 11919 <1> getfirstumcb: 11920 <1> ; We try to get the first UMCB for gateout 11921 <1> ; for now. To harden our code it should 11922 <1> ; not be assumed that the address is of 11923 <1> ; a valid MCB. However, it is fine to 11924 <1> ; compare an actual MCB address with it. 11925 00001061 B86112 <1> mov ax, 1261h ; PTS-DOS: Get first UMCB 11926 00001064 F9 <1> stc 11927 00001065 CD2F <1> int 2Fh 11928 00001067 720C <1> jc .determine ; not supported --> 11929 00001069 40 <1> inc ax 11930 0000106A 83F802 <1> cmp ax, byte 2 ; -1, 0, 1 ? 11931 0000106D 7606 <1> jbe .determine ; not supported (or none) --> 11932 0000106F 48 <1> dec ax 11933 00001070 A3[D00A] <1> mov word [ firstumcb ], ax ; set UMB 11934 00001073 EB4D <1> jmp short .got ; got it --> 11935 <1> 11936 <1> .determine: 11937 00001075 B80358 <1> mov ax, 5803h 11938 00001078 31DB <1> xor bx, bx 11939 0000107A CD21 <1> int 21h ; disable UMB link, leave only LMA chain 11940 0000107C 7244 <1> jc .none ; that isn't supported either --> 11941 <1> 11942 0000107E A1[CE0A] <1> mov ax, word [firstmcb] 11943 00001081 1E <1> push ds 11944 00001082 89C2 <1> mov dx, ax ; first MCB 11945 00001084 31DB <1> xor bx, bx ; use offsets from bx, not addresses 11946 <1> .looplmb: 11947 00001086 8ED8 <1> mov ds, ax 11948 00001088 40 <1> inc ax 11949 00001089 034703 <1> add ax, word [ bx + 3 ] ; next MCB's address 11950 0000108C 803F4D <1> cmp byte [ bx ], 'M' 11951 0000108F 74F5 <1> je .looplmb ; not last --> 11952 00001091 803F5A <1> cmp byte [ bx ], 'Z' 11953 00001094 752C <1> jne .none ; corrupted --> 11954 00001096 92 <1> xchg ax, dx ; dx = what we assume to be the first UMA chain MCB 11955 <1> ; ax = first MCB 11956 <1> 11957 00001097 50 <1> push ax 11958 00001098 43 <1> inc bx ; = 1 11959 00001099 B80358 <1> mov ax, 5803h 11960 0000109C CD21 <1> int 21h ; enable UMB link, include UMA chain 11961 0000109E 58 <1> pop ax 11962 0000109F 7221 <1> jc .none ; so we can disable it but not enable? --> 11963 <1> 11964 000010A1 4B <1> dec bx ; = 0 11965 000010A2 31C9 <1> xor cx, cx ; flag if assumed first UMCB found 11966 <1> .loopumb: 11967 000010A4 39D0 <1> cmp ax, dx 11968 000010A6 7501 <1> jne .notlastlmb 11969 000010A8 41 <1> inc cx ; there it is 11970 <1> .notlastlmb: 11971 000010A9 8ED8 <1> mov ds, ax 11972 000010AB 803F4D <1> cmp byte [ bx ], 'M' 11973 000010AE 7506 <1> jne .islastumb? ; last or corrupted --> 11974 000010B0 40 <1> inc ax 11975 000010B1 034703 <1> add ax, word [ bx + 3 ] 11976 000010B4 EBEE <1> jmp short .loopumb ; process next --> 11977 <1> .islastumb?: 11978 000010B6 803F5A <1> cmp byte [ bx ], 'Z' 11979 000010B9 7507 <1> jne .none ; corrupted --> 11980 000010BB E305 <1> jcxz .none ; didn't find that UMCB --> 11981 <1> ; The MCB at dx which was behind the one that contained the 'Z' 11982 <1> ; signature when we disabled the UMB link is now a valid MCB in 11983 <1> ; the MCB chain after we enabled the UMB link. All previous MCBs 11984 <1> ; are now 'M'. 11985 000010BD 1F <1> pop ds 11986 000010BE 8916[D00A] <1> mov word [ firstumcb ], dx 11987 <1> .none: 11988 <1> .got: 11989 000010C2 5B <1> pop bx 11990 000010C3 B80358 <1> mov ax, 5803h 11991 000010C6 CD21 <1> int 21h ; restore UMB link 11992 <1> %endif 11993 <1> 11994 000010C8 B434 <1> mov ah, 34h 11995 000010CA CD21 <1> int 21h 11996 000010CC 891E[D20A] <1> mov word [pInDOS + so16aOffset], bx 11997 000010D0 8C06[D40A] <1> mov word [pInDOS + so16aSegSel], es 11998 <1> %if _PM 11999 000010D4 8C06[D60A] <1> mov word [pInDOS + so16aSegment], es 12000 <1> %endif 12001 <1> 12002 <1> ; get address of DOS swappable DATA area 12003 <1> ; to be used to get/set PSP and thus avoid DOS calls 12004 <1> ; will not work for DOS < 3 12005 <1> %if _USESDA 12006 000010D8 1E <1> push ds 12007 000010D9 B8065D <1> mov ax, 5D06h 12008 000010DC F9 <1> stc ; initialise to CY 12009 000010DD CD21 <1> int 21h 12010 000010DF 8CD8 <1> mov ax, ds 12011 000010E1 1F <1> pop ds 12012 000010E2 7214 <1> jc .noSDA ; if CY returned, not supported --> 12013 000010E4 8EC0 <1> mov es, ax ; es:si -> SDA 12014 000010E6 8CDB <1> mov bx, ds ; bx = our PSP 12015 000010E8 26395C10 <1> cmp word [es:si + 10h], bx ; does this seem like the current PSP field ? 12016 000010EC 750A <1> jne .noSDA ; no --> 12017 000010EE 8936[DA0A] <1> mov word [pSDA + so16aOffset], si 12018 000010F2 A3[DC0A] <1> mov word [pSDA + so16aSegSel], ax 12019 <1> %if _PM 12020 000010F5 A3[DE0A] <1> mov word [pSDA + so16aSegment], ax 12021 <1> %endif 12022 <1> .noSDA: 12023 <1> %endif 12024 <1> 12025 000010F8 B83135 <1> mov ax, 3531h 12026 000010FB CD21 <1> int 21h 12027 000010FD 8CC3 <1> mov bx, es 12028 <1> %if _USESDA 12029 000010FF 3B1E[DC0A] <1> cmp bx, word [pSDA + so16aSegSel] 12030 00001103 750B <1> jne @F 12031 <1> %endif 12032 00001105 3B1E[D40A] <1> cmp bx, word [pInDOS + so16aSegSel] 12033 00001109 7505 <1> jne @F 12034 <1> 12035 0000110B 800E[A300]20 <1> setopt [internalflags2], dif2_int31_segment 12036 <1> @@: 12037 <1> 12038 <1> 12039 <1> commandline: 12040 00001110 16 <1> push ss 12041 00001111 07 <1> pop es 12042 <1> 12043 <1> ; Interpret switches and erase them from the command line. 12044 00001112 B80037 <1> mov ax, 3700h ; get switch character 12045 00001115 B22F <1> mov dl, '/' ; preset with default value 12046 00001117 CD21 <1> int 21h 12047 00001119 8816[E80A] <1> mov byte [ switchar ], dl 12048 0000111D 80FA2F <1> cmp dl, '/' 12049 00001120 7504 <1> jne .notslash 12050 00001122 8816[E90A] <1> mov byte [ swch1 ], dl 12051 <1> .notslash: 12052 00001126 BE8100 <1> mov si, DTA+1 12053 <1> .blankloop: 12054 00001129 AC <1> lodsb 12055 0000112A 3C20 <1> cmp al, 32 12056 0000112C 74FB <1> je .blankloop 12057 0000112E 3C09 <1> cmp al, 9 12058 00001130 74F7 <1> je .blankloop 12059 <1> 12060 <1> ; Process the /? switch (or the [switchar]? switch). 12061 <1> ; If switchar != / and /? occurs, make sure nothing follows. 12062 00001132 38D0 <1> cmp al, dl 12063 00001134 7503E99800 <1> je .switch ; if switch character --> 12064 00001139 3C2F <1> cmp al, '/' 12065 0000113B 7403E90C01 <1> jne .noswitches ; if not the help switch --> 12066 00001140 8A04 <1> mov al, byte [ si ] 12067 00001142 3C3F <1> cmp al, '?' 12068 00001144 7403E90301 <1> jne .noswitches ; if not /? 12069 00001149 8A4401 <1> mov al, byte [ si+1 ] 12070 0000114C 3C20 <1> cmp al, 32 12071 0000114E 740B <1> je .help ; if nothing after /? 12072 00001150 3C09 <1> cmp al, 9 12073 00001152 7407 <1> je .help ; ditto 12074 00001154 3C0D <1> cmp al, 13 12075 00001156 7403E9F100 <1> jne .noswitches ; if something after /? --> 12076 <1> 12077 <1> ; Print a help message 12078 <1> .help: 12079 0000115B A12C00 <1> mov ax, word [2Ch] ; => environment 12080 0000115E 85C0 <1> test ax, ax 12081 00001160 7465 <1> jz .help.no_name 12082 00001162 8ED8 <1> mov ds, ax 12083 00001164 31F6 <1> xor si, si 12084 <1> @@: 12085 00001166 AC <1> lodsb 12086 00001167 84C0 <1> test al, al 12087 00001169 75FB <1> jnz @B 12088 0000116B AC <1> lodsb 12089 0000116C 84C0 <1> test al, al 12090 0000116E 75F6 <1> jnz @B 12091 00001170 AD <1> lodsw 12092 00001171 83F801 <1> cmp ax, 1 12093 00001174 7551 <1> jne .help.no_name 12094 <1> @@: 12095 00001176 89F3 <1> mov bx, si 12096 <1> @@: 12097 00001178 AC <1> lodsb 12098 00001179 3C61 <1> cmp al, 'a' 12099 0000117B 7208 <1> jb @F 12100 0000117D 3C7A <1> cmp al, 'z' 12101 0000117F 7704 <1> ja @F 12102 00001181 806CFF20 <1> sub byte [si - 1], 'a' - 'A' 12103 <1> @@: 12104 00001185 3C5C <1> cmp al, '\' 12105 00001187 74ED <1> je @BBB 12106 00001189 3C2F <1> cmp al, '/' 12107 0000118B 74E9 <1> je @BBB 12108 0000118D 84C0 <1> test al, al 12109 0000118F 75E7 <1> jnz @BB 12110 <1> 12111 00001191 89F1 <1> mov cx, si 12112 00001193 49 <1> dec cx 12113 00001194 29D9 <1> sub cx, bx 12114 <1> 12115 <1> @@: 12116 00001196 4E <1> dec si 12117 00001197 39DE <1> cmp si, bx 12118 00001199 7209 <1> jb @F 12119 0000119B 803C2E <1> cmp byte [si], '.' 12120 0000119E 75F6 <1> jne @B 12121 <1> 12122 000011A0 89F1 <1> mov cx, si 12123 000011A2 29D9 <1> sub cx, bx 12124 <1> @@: 12125 000011A4 E321 <1> jcxz .help.no_name 12126 <1> @@: 12127 000011A6 BA[6808] <1> mov dx, imsg.help.1 ; command-line help message 12128 000011A9 E835FB <1> call init_putsz_cs 12129 000011AC 53 <1> push bx 12130 000011AD 89DA <1> mov dx, bx 12131 000011AF E875FB <1> call init_puts_ds 12132 000011B2 BA[9308] <1> mov dx, imsg.help.2 12133 000011B5 E829FB <1> call init_putsz_cs 12134 000011B8 5A <1> pop dx 12135 000011B9 E86BFB <1> call init_puts_ds 12136 000011BC BA[A409] <1> mov dx, imsg.help.3 12137 000011BF E81FFB <1> call init_putsz_cs 12138 000011C2 B8004C <1> mov ax, 4C00h 12139 000011C5 CD21 <1> int 21h ; done 12140 <1> 12141 <1> .help.no_name: 12142 000011C7 0E <1> push cs 12143 000011C8 1F <1> pop ds 12144 000011C9 BB[6208] <1> mov bx, imsg.help.defaultfilename 12145 000011CC B90600 <1> mov cx, imsg.help.defaultfilename.length 12146 000011CF EBD5 <1> jmp @B 12147 <1> 12148 <1> 12149 <1> ; Do the (proper) switches. 12150 000011D1 AC <1> .switch:lodsb 12151 000011D2 3C3F <1> cmp al,'?' 12152 000011D4 7485 <1> je .help ; if -? 12153 000011D6 3C63 <1> cmp al, 'c' 12154 000011D8 7413 <1> je .switch_c 12155 000011DA 3C43 <1> cmp al, 'C' 12156 000011DC 740F <1> je .switch_c 12157 <1> 12158 <1> ; Other switches may go here. 12159 000011DE 2EA2[D209] <1> mov [ cs:imsg.invalidswitch_a ], al 12160 000011E2 BA[C109] <1> mov dx, imsg.invalidswitch ; Invalid switch 12161 <1> ..@init_cmdline_error: 12162 000011E5 E8F9FA <1> call init_putsz_cs ; print string 12163 000011E8 B8014C <1> mov ax, 4C01h ; Quit and return error status 12164 000011EB CD21 <1> int 21h 12165 <1> 12166 <1> .switch_c: 12167 <1> @@: 12168 000011ED AC <1> lodsb 12169 000011EE 3C3D <1> cmp al, '=' 12170 000011F0 74FB <1> je @B 12171 000011F2 3C3A <1> cmp al, ':' 12172 000011F4 74F7 <1> je @B 12173 <1> 12174 000011F6 BF[E000] <1> mov di, cmdline_buffer 12175 000011F9 B400 <1> mov ah, 0 ; initialise to 0 = unquoted 12176 000011FB A9 <1> db __TEST_IMM16 12177 <1> .switch_c_loop: 12178 000011FC AA <1> stosb 12179 <1> .switch_c_quoted: 12180 000011FD AC <1> lodsb 12181 <1> 12182 000011FE 3C0D <1> cmp al, 13 12183 00001200 743A <1> je .switch_c_eol 12184 00001202 38E0 <1> cmp al, ah ; close quote mark ? 12185 00001204 7508 <1> jne @F ; no --> 12186 00001206 3C00 <1> cmp al, 0 12187 00001208 7432 <1> je .switch_c_eol 12188 0000120A B400 <1> mov ah, 0 ; continue unquoted 12189 0000120C EBEF <1> jmp .switch_c_quoted ; and load next character --> 12190 <1> 12191 <1> @@: 12192 0000120E 84E4 <1> test ah, ah ; currently quoted ? 12193 00001210 7514 <1> jnz .switch_c_not_blank ; yes --> 12194 <1> 12195 00001212 3C22 <1> cmp al, '"' ; open quote mark ? 12196 00001214 7404 <1> je @F 12197 00001216 3C27 <1> cmp al, "'" 12198 00001218 7504 <1> jne @FF ; no --> 12199 <1> @@: 12200 0000121A 88C4 <1> mov ah, al ; remember quoted state 12201 0000121C EBDF <1> jmp .switch_c_quoted ; and load next character --> 12202 <1> 12203 <1> @@: 12204 0000121E 3C20 <1> cmp al, 32 ; blank while unquoted ? 12205 00001220 741E <1> je .unquoted_blank 12206 00001222 3C09 <1> cmp al, 9 12207 00001224 741A <1> je .unquoted_blank ; yes --> 12208 <1> .switch_c_not_blank: 12209 00001226 3C3B <1> cmp al, ';' ; unescaped semicolon ? 12210 00001228 7504 <1> jne .switch_c_not_semicolon 12211 0000122A B00D <1> mov al, 13 ; yes, replace by CR 12212 0000122C EBCE <1> jmp .switch_c_loop 12213 <1> 12214 <1> .switch_c_not_semicolon: 12215 0000122E 3C5C <1> cmp al, '\' ; escape ? 12216 00001230 75CA <1> jne .switch_c_loop ; no, store literal --> 12217 00001232 AC <1> lodsb ; load escaped character 12218 <1> ; (may be backslash, semicolon, quote) 12219 00001233 3C0D <1> cmp al, 13 ; guard against EOL 12220 00001235 75C5 <1> jne .switch_c_loop 12221 <1> .switch_c_error: 12222 00001237 BA[D609] <1> mov dx, imsg.switch_c_error 12223 0000123A EBA9 <1> jmp ..@init_cmdline_error 12224 <1> 12225 <1> .switch_c_eol: 12226 0000123C 84E4 <1> test ah, ah ; in quoted state ? 12227 0000123E 75F7 <1> jnz .switch_c_error ; yes, error --> 12228 <1> .unquoted_blank: 12229 00001240 B000 <1> mov al, 0 12230 00001242 AA <1> stosb ; terminate command line buffer 12231 00001243 800E[A500]01 <1> setopt [internalflags3], dif3_input_cmdline 12232 00001248 4E <1> dec si 12233 00001249 E9DDFE <1> jmp .blankloop 12234 <1> 12235 <1> 12236 <1> .noswitches: 12237 <1> ; Feed the remaining command line to the 'n' command. 12238 0000124C 4E <1> dec si 12239 0000124D 56 <1> push si 12240 <1> 12241 <1> 12242 <1> %if CATCHINTAMOUNT 12243 <1> ; Set up interrupt vectors. 12244 0000124E B90600 <1> mov cx, inttab_number 12245 00001251 BE[310C] <1> mov si, inttab 12246 <1> .intloop: 12247 00001254 AC <1> lodsb 12248 00001255 B435 <1> mov ah, 35h 12249 00001257 CD21 <1> int 21h ; get vector 12250 00001259 97 <1> xchg ax, di 12251 0000125A AD <1> lodsw 12252 0000125B 97 <1> xchg ax, di 12253 0000125C 895D02 <1> mov word [ di + ieNext ], bx 12254 0000125F 8C4504 <1> mov word [ di + ieNext + 2 ], es 12255 <1> ; store it 12256 <1> %ifn _DEBUG ; vectors are set only when debuggee runs 12257 00001262 89FA <1> mov dx, di 12258 00001264 B425 <1> mov ah, 25h ; set interrupt vector 12259 00001266 CD21 <1> int 21h ; ds => lDEBUG_DATA_ENTRY 12260 <1> %endif 12261 00001268 E2EA <1> loop .intloop 12262 <1> %endif 12263 <1> 12264 <1> 12265 <1> ; Disabled this. hook2F (debug.asm) now detects this condition. 12266 <1> %if _PM && 0 12267 <1> ; Windows 9x and DosEmu are among those hosts which handle some 12268 <1> ; V86 Ints internally without first calling the interrupt chain. 12269 <1> ; This causes various sorts of troubles and incompatibilities; 12270 <1> ; in our case, hooking interrupt 2Fh would not intercept calls 12271 <1> ; made to the DPMI interface because the host sees them first. 12272 <1> %if _WIN9XSUPP 12273 <1> %if _GUARD_86M_INT2F 12274 <1> push es 12275 <1> xor ax, ax 12276 <1> mov es, ax ; (only used in 86 Mode) 12277 <1> mov ax, [es:2Fh * 4] 12278 <1> cmp ax, -1 12279 <1> je @F ; --> (ZR) 12280 <1> or ax, [es:2Fh * 4 + 2] 12281 <1> @@: 12282 <1> pop es 12283 <1> jz @F 12284 <1> %endif 12285 <1> mov ax, 1600h ; running in a Win9x DOS box? 12286 <1> int 2Fh 12287 <1> cmp al, 4 12288 <1> jge .no2Fhook ; this is intentionally a signed comparison! 12289 <1> @@: 12290 <1> %endif 12291 <1> %if _DOSEMU 12292 <1> testopt [internalflags], runningdosemu 12293 <1> jnz .no2Fhook 12294 <1> %endif 12295 <1> %if _WIN9XSUPP || _DOSEMU 12296 <1> jmp short .dpmihostchecked 12297 <1> .no2Fhook: 12298 <1> setopt [internalflags], nohook2F 12299 <1> .dpmihostchecked: 12300 <1> %endif 12301 <1> %endif 12302 0000126A 1E <1> push ds 12303 0000126B 07 <1> pop es 12304 <1> 12305 <1> ; Save, then modify termination address and parent PSP. 12306 0000126C BE0A00 <1> mov si, TPIV 12307 0000126F BF[C80A] <1> mov di, psp22 12308 00001272 A5 <1> movsw 12309 00001273 A5 <1> movsw ; save Int22 12310 00001274 BA[FF80] <1> mov dx, debug22 12311 00001277 8954FC <1> mov word [ si-4 ], dx 12312 0000127A 8C5CFE <1> mov word [ si-2 ], ds ; set pspInt22 (required) 12313 0000127D BE1600 <1> mov si, 16h 12314 00001280 A5 <1> movsw ; save parent 12315 00001281 8C5CFE <1> mov word [ si-2 ], ds ; set pspParent 12316 00001284 B82225 <1> mov ax, 2522h ; set Int22 12317 00001287 CD21 <1> int 21h ; (not really required) 12318 <1> 12319 <1> ; shrink to required resident size 12320 00001289 1E <1> push ds 12321 0000128A 07 <1> pop es 12322 0000128B B44A <1> mov ah, 4Ah 12323 0000128D 2E8B1E[0008] <1> mov bx, word [cs:memsize] 12324 <1> 12325 00001292 FF36[CE00] <1> push word [code_seg] 12326 00001296 2EFF36[9C12] <1> push word [cs:.word_initcont] 12327 0000129B CB <1> retf 12328 <1> 12329 <1> align 2, db 0 12330 <1> .word_initcont: 12331 0000129C [23D6] <1> dw initcont 12332 <1> 12333 <1> 12334 <1> usesection lDEBUG_CODE 12335 <1> initcont: 12336 0000D623 CD21 <1> int 21h ; resize to required 12337 <1> ; jc ... ; (expected to work since it had to be larger. also we hooked ints) 12338 <1> 12339 0000D625 1E <1> push ds 12340 0000D626 07 <1> pop es 12341 0000D627 E8B8CF <1> call getint2324 ; init run2324 to avoid using or displaying NUL vectors 12342 <1> 12343 0000D62A 1E <1> push ds 12344 0000D62B 07 <1> pop es 12345 0000D62C 5E <1> pop si 12346 0000D62D AC <1> lodsb 12347 0000D62E E820C1 <1> call nn ; process the rest of the command line 12348 <1> 12349 <1> .boot_entry: 12350 0000D631 1E <1> push ds 12351 0000D632 07 <1> pop es ; => lDEBUG_DATA_ENTRY 12352 <1> 12353 0000D633 BE[0000] <1> mov si, cmd3 12354 <1> %if _BOOTLDR 12355 0000D636 F606[9D00]40 <1> testopt [internalflags], nodosloaded 12356 0000D63B 7402 <1> jz @F 12357 0000D63D FFE6 <1> jmp si ; directly jump to cmd3 of the installed image 12358 <1> @@: 12359 <1> %endif 12360 0000D63F 56 <1> push si 12361 0000D640 E9D4BD <1> jmp ll3 ; load a program if one has been given at the command line 9799 9800 usesection INIT 9801 0000129E 00 align 16, db 0 9802 init_size equ $-section.INIT.vstart 9803 endarea init, 1 9804 9805 9806 numdef SHOWINITSIZE, 0 9807 %if _SHOWINITSIZE 9808 %assign INITSIZE init_size 9809 %warning init holds INITSIZE bytes 9810 %endif 9811 9812 9813 usesection lDEBUG_CODE 9814 0000D643 00 align 16, db 0 9815 ldebug_code_size equ $-section.lDEBUG_CODE.vstart 9816 endarea ldebug_code, 1 9817 9818 9819 auxbuff_size: equ (_AUXBUFFSIZE+15) & ~15 9820 endarea auxbuff, 1 9821 9822 transimagepsp_size: equ 100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size +datastack_size+ldebug_code_size+init_size 9825 endarea transimagepsp, 1 ; size of PSP and image during installation 9826 9827 pspsegment_size: equ 100h+ldebug_data_entry_size +asmtable1_size+asmtable2_size +datastack_size 9830 endarea pspsegment, 1 ; size of PSP and image when installed 9831 9832 resimagepsp_size: equ pspsegment_size+ldebug_code_size+auxbuff_size 9833 endarea resimagepsp, 1 ; size of PSP and image when installed 9834 9835 9836 %if transimagepsp_size > resimagepsp_size 9837 %fatal "resimagepsp_size assumed larger" 9838 %endif 9839 9840 %assign __CHECK_RESIDENTSIZE pspsegment_size 9841 %if __CHECK_RESIDENTSIZE > (64 * 1024) 9842 %error resident size of PSP segment too large (%[__CHECK_RESIDENTSIZE]) 9843 %endif 9844 9845 %if CODE_INSURE_COUNT 9846 %warning code_insure_low_byte_not_0CCh needed CODE_INSURE_COUNT times 9847 %endif